aboutsummaryrefslogtreecommitdiffstats
path: root/lib/string.in.h
diff options
context:
space:
mode:
authorPaul Eggert2023-01-06 17:53:54 -0800
committerPaul Eggert2023-01-06 18:05:57 -0800
commit9e98ff562b4b8f2dae92bd4c64d15934c7d5877f (patch)
treef37ce6d03a710f541fbbe72b9533a05d1a63103f /lib/string.in.h
parent2f05f48918ecf6e59b330709b09a36f81f7b6c48 (diff)
downloademacs-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.h20
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