diff options
| author | Paul Eggert | 2023-01-06 17:53:54 -0800 |
|---|---|---|
| committer | Paul Eggert | 2023-01-06 18:05:57 -0800 |
| commit | 9e98ff562b4b8f2dae92bd4c64d15934c7d5877f (patch) | |
| tree | f37ce6d03a710f541fbbe72b9533a05d1a63103f /lib/string.in.h | |
| parent | 2f05f48918ecf6e59b330709b09a36f81f7b6c48 (diff) | |
| download | emacs-9e98ff562b4b8f2dae92bd4c64d15934c7d5877f.tar.gz emacs-9e98ff562b4b8f2dae92bd4c64d15934c7d5877f.zip | |
Update from Gnulib by running admin/merge-gnulib
Diffstat (limited to 'lib/string.in.h')
| -rw-r--r-- | lib/string.in.h | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/lib/string.in.h b/lib/string.in.h index 1e27deed982..b227a178873 100644 --- a/lib/string.in.h +++ b/lib/string.in.h | |||
| @@ -59,10 +59,11 @@ | |||
| 59 | # include <unistd.h> | 59 | # include <unistd.h> |
| 60 | #endif | 60 | #endif |
| 61 | 61 | ||
| 62 | /* AIX 7.2 declares ffsl and ffsll in <strings.h>, not in <string.h>. */ | 62 | /* AIX 7.2 and Android 13 declare ffsl and ffsll in <strings.h>, not in |
| 63 | <string.h>. */ | ||
| 63 | /* But in any case avoid namespace pollution on glibc systems. */ | 64 | /* But in any case avoid namespace pollution on glibc systems. */ |
| 64 | #if ((@GNULIB_FFSL@ || @GNULIB_FFSLL@ || defined GNULIB_POSIXCHECK) \ | 65 | #if ((@GNULIB_FFSL@ || @GNULIB_FFSLL@ || defined GNULIB_POSIXCHECK) \ |
| 65 | && defined _AIX) \ | 66 | && (defined _AIX || defined __ANDROID__)) \ |
| 66 | && ! defined __GLIBC__ | 67 | && ! defined __GLIBC__ |
| 67 | # include <strings.h> | 68 | # include <strings.h> |
| 68 | #endif | 69 | #endif |
| @@ -82,7 +83,14 @@ | |||
| 82 | can be freed via 'free'; it can be used only after declaring 'free'. */ | 83 | can be freed via 'free'; it can be used only after declaring 'free'. */ |
| 83 | /* Applies to: functions. Cannot be used on inline functions. */ | 84 | /* Applies to: functions. Cannot be used on inline functions. */ |
| 84 | #ifndef _GL_ATTRIBUTE_DEALLOC_FREE | 85 | #ifndef _GL_ATTRIBUTE_DEALLOC_FREE |
| 85 | # define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (free, 1) | 86 | # if defined __cplusplus && defined __GNUC__ && !defined __clang__ |
| 87 | /* Work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108231> */ | ||
| 88 | # define _GL_ATTRIBUTE_DEALLOC_FREE \ | ||
| 89 | _GL_ATTRIBUTE_DEALLOC ((void (*) (void *)) free, 1) | ||
| 90 | # else | ||
| 91 | # define _GL_ATTRIBUTE_DEALLOC_FREE \ | ||
| 92 | _GL_ATTRIBUTE_DEALLOC (free, 1) | ||
| 93 | # endif | ||
| 86 | #endif | 94 | #endif |
| 87 | 95 | ||
| 88 | /* _GL_ATTRIBUTE_MALLOC declares that the function returns a pointer to freshly | 96 | /* _GL_ATTRIBUTE_MALLOC declares that the function returns a pointer to freshly |
| @@ -336,7 +344,7 @@ _GL_CXXALIAS_SYS_CAST2 (memrchr, | |||
| 336 | || defined __clang__) | 344 | || defined __clang__) |
| 337 | _GL_CXXALIASWARN1 (memrchr, void *, (void *, int, size_t) throw ()); | 345 | _GL_CXXALIASWARN1 (memrchr, void *, (void *, int, size_t) throw ()); |
| 338 | _GL_CXXALIASWARN1 (memrchr, void const *, (void const *, int, size_t) throw ()); | 346 | _GL_CXXALIASWARN1 (memrchr, void const *, (void const *, int, size_t) throw ()); |
| 339 | # else | 347 | # elif __GLIBC__ >= 2 |
| 340 | _GL_CXXALIASWARN (memrchr); | 348 | _GL_CXXALIASWARN (memrchr); |
| 341 | # endif | 349 | # endif |
| 342 | #elif defined GNULIB_POSIXCHECK | 350 | #elif defined GNULIB_POSIXCHECK |
| @@ -491,7 +499,7 @@ _GL_CXXALIAS_SYS_CAST2 (strchrnul, | |||
| 491 | _GL_CXXALIASWARN1 (strchrnul, char *, (char *__s, int __c_in) throw ()); | 499 | _GL_CXXALIASWARN1 (strchrnul, char *, (char *__s, int __c_in) throw ()); |
| 492 | _GL_CXXALIASWARN1 (strchrnul, char const *, | 500 | _GL_CXXALIASWARN1 (strchrnul, char const *, |
| 493 | (char const *__s, int __c_in) throw ()); | 501 | (char const *__s, int __c_in) throw ()); |
| 494 | # else | 502 | # elif __GLIBC__ >= 2 |
| 495 | _GL_CXXALIASWARN (strchrnul); | 503 | _GL_CXXALIASWARN (strchrnul); |
| 496 | # endif | 504 | # endif |
| 497 | #elif defined GNULIB_POSIXCHECK | 505 | #elif defined GNULIB_POSIXCHECK |
| @@ -856,7 +864,7 @@ _GL_CXXALIASWARN1 (strcasestr, char *, | |||
| 856 | (char *haystack, const char *needle) throw ()); | 864 | (char *haystack, const char *needle) throw ()); |
| 857 | _GL_CXXALIASWARN1 (strcasestr, const char *, | 865 | _GL_CXXALIASWARN1 (strcasestr, const char *, |
| 858 | (const char *haystack, const char *needle) throw ()); | 866 | (const char *haystack, const char *needle) throw ()); |
| 859 | # else | 867 | # elif __GLIBC__ >= 2 |
| 860 | _GL_CXXALIASWARN (strcasestr); | 868 | _GL_CXXALIASWARN (strcasestr); |
| 861 | # endif | 869 | # endif |
| 862 | #elif defined GNULIB_POSIXCHECK | 870 | #elif defined GNULIB_POSIXCHECK |