diff options
author | Vibhav Pant <vibhavp@gmail.com> | 2020-08-21 14:04:35 +0530 |
---|---|---|
committer | Vibhav Pant <vibhavp@gmail.com> | 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 |
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"); #endif +#if defined _WIN32 && !defined __CYGWIN__ +# undef memccpy +# define memccpy _memccpy +#endif + + /* Return the first instance of C within N bytes of S, or NULL. */ #if @GNULIB_MEMCHR@ # if @REPLACE_MEMCHR@ @@ -384,6 +390,12 @@ _GL_WARN_ON_USE (strchrnul, "strchrnul is unportable - " # endif _GL_FUNCDECL_RPL (strdup, char *, (char const *__s) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (strdup, char *, (char const *__s)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef strdup +# define strdup _strdup +# endif +_GL_CXXALIAS_MDA (strdup, char *, (char const *__s)); # else # if defined __cplusplus && defined GNULIB_NAMESPACE && defined strdup /* strdup exists as a function and as a macro. Get rid of the macro. */ @@ -401,6 +413,9 @@ _GL_CXXALIASWARN (strdup); _GL_WARN_ON_USE (strdup, "strdup is unportable - " "use gnulib module strdup for portability"); # endif +#elif defined _WIN32 && !defined __CYGWIN__ +# undef strdup +# define strdup _strdup #endif /* Append no more than N characters from SRC onto DEST. */ |