We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cffc1b2 commit 8256846Copy full SHA for 8256846
stdlib/public/stubs/Stubs.cpp
@@ -265,16 +265,19 @@ swift_stdlib_readLine_stdin(unsigned char **LinePtr) {
265
#endif
266
}
267
268
-#if defined(__CYGWIN__) || defined(_WIN32)
269
- #define strcasecmp _stricmp
270
-#endif
271
-
272
static bool swift_stringIsSignalingNaN(const char *nptr) {
273
if (nptr[0] == '+' || nptr[0] == '-') {
274
++nptr;
275
276
277
- return strcasecmp(nptr, "snan") == 0;
+ if ((nptr[0] == 's' || nptr[0] == 'S') &&
+ (nptr[1] == 'n' || nptr[1] == 'N') &&
+ (nptr[2] == 'a' || nptr[2] == 'A') &&
+ (nptr[3] == 'n' || nptr[3] == 'N') && (nptr[4] == '\0')) {
+ return true;
278
+ }
279
+
280
+ return false;
281
282
283
// This implementation should only be used on platforms without the
0 commit comments