mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
runtime: use _strdup on Windows
Windows prefers the `_strdup` extension over `strdup`. This avoids unnecessary warnings when building the standard library.
This commit is contained in:
@@ -330,7 +330,11 @@ reportOnCrash(uint32_t flags, const char *message)
|
||||
if (previous)
|
||||
swift_asprintf(¤t, "%s%s", current, message);
|
||||
else
|
||||
#if defined(_WIN32)
|
||||
current = ::_strdup(message);
|
||||
#else
|
||||
current = ::strdup(message);
|
||||
#endif
|
||||
} while (!std::atomic_compare_exchange_strong_explicit(&kFatalErrorMessage,
|
||||
&previous,
|
||||
static_cast<const char *>(current),
|
||||
|
||||
Reference in New Issue
Block a user