diff options
| author | Vibhav Pant | 2020-08-21 14:04:35 +0530 |
|---|---|---|
| committer | Vibhav Pant | 2020-08-21 14:04:35 +0530 |
| commit | f0f8d7b82492e741950c363a03b886965c91b1b0 (patch) | |
| tree | 19b716830b1ebabc0d7d75949c4e6800c0f104ad /lib/string.in.h | |
| parent | 9e64a087c4d167e7ec1c4e22bea3e6af53b563de (diff) | |
| parent | c818c29771d3cb51875643b2f6c894073e429dd2 (diff) | |
| download | emacs-feature/native-comp-macos-fixes.tar.gz emacs-feature/native-comp-macos-fixes.zip | |
Merge branch 'feature/native-comp' into feature/native-comp-macos-fixesfeature/native-comp-macos-fixes
Diffstat (limited to 'lib/string.in.h')
| -rw-r--r-- | lib/string.in.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/string.in.h b/lib/string.in.h index c0c1a54f39d..7d83668f6ec 100644 --- a/lib/string.in.h +++ b/lib/string.in.h | |||
| @@ -123,6 +123,12 @@ _GL_WARN_ON_USE (ffsll, "ffsll is not portable - use the ffsll module"); | |||
| 123 | #endif | 123 | #endif |
| 124 | 124 | ||
| 125 | 125 | ||
| 126 | #if defined _WIN32 && !defined __CYGWIN__ | ||
| 127 | # undef memccpy | ||
| 128 | # define memccpy _memccpy | ||
| 129 | #endif | ||
| 130 | |||
| 131 | |||
| 126 | /* Return the first instance of C within N bytes of S, or NULL. */ | 132 | /* Return the first instance of C within N bytes of S, or NULL. */ |
| 127 | #if @GNULIB_MEMCHR@ | 133 | #if @GNULIB_MEMCHR@ |
| 128 | # if @REPLACE_MEMCHR@ | 134 | # if @REPLACE_MEMCHR@ |
| @@ -384,6 +390,12 @@ _GL_WARN_ON_USE (strchrnul, "strchrnul is unportable - " | |||
| 384 | # endif | 390 | # endif |
| 385 | _GL_FUNCDECL_RPL (strdup, char *, (char const *__s) _GL_ARG_NONNULL ((1))); | 391 | _GL_FUNCDECL_RPL (strdup, char *, (char const *__s) _GL_ARG_NONNULL ((1))); |
| 386 | _GL_CXXALIAS_RPL (strdup, char *, (char const *__s)); | 392 | _GL_CXXALIAS_RPL (strdup, char *, (char const *__s)); |
| 393 | # elif defined _WIN32 && !defined __CYGWIN__ | ||
| 394 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 395 | # undef strdup | ||
| 396 | # define strdup _strdup | ||
| 397 | # endif | ||
| 398 | _GL_CXXALIAS_MDA (strdup, char *, (char const *__s)); | ||
| 387 | # else | 399 | # else |
| 388 | # if defined __cplusplus && defined GNULIB_NAMESPACE && defined strdup | 400 | # if defined __cplusplus && defined GNULIB_NAMESPACE && defined strdup |
| 389 | /* strdup exists as a function and as a macro. Get rid of the macro. */ | 401 | /* strdup exists as a function and as a macro. Get rid of the macro. */ |
| @@ -401,6 +413,9 @@ _GL_CXXALIASWARN (strdup); | |||
| 401 | _GL_WARN_ON_USE (strdup, "strdup is unportable - " | 413 | _GL_WARN_ON_USE (strdup, "strdup is unportable - " |
| 402 | "use gnulib module strdup for portability"); | 414 | "use gnulib module strdup for portability"); |
| 403 | # endif | 415 | # endif |
| 416 | #elif defined _WIN32 && !defined __CYGWIN__ | ||
| 417 | # undef strdup | ||
| 418 | # define strdup _strdup | ||
| 404 | #endif | 419 | #endif |
| 405 | 420 | ||
| 406 | /* Append no more than N characters from SRC onto DEST. */ | 421 | /* Append no more than N characters from SRC onto DEST. */ |