summaryrefslogtreecommitdiffstats
path: root/gl/uchar.h
diff options
context:
space:
mode:
Diffstat (limited to 'gl/uchar.h')
-rw-r--r--gl/uchar.h19
1 files changed, 6 insertions, 13 deletions
diff --git a/gl/uchar.h b/gl/uchar.h
index abc636c5..a06ed8ab 100644
--- a/gl/uchar.h
+++ b/gl/uchar.h
@@ -204,16 +204,6 @@
204#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \ 204#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \
205 _GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters 205 _GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters
206 206
207/* _GL_FUNCDECL_SYS_NAME (func) expands to plain func if C++, and to
208 parenthesized func otherwise. Parenthesization is needed in C23 if
209 the function is like strchr and so is a qualifier-generic macro
210 that expands to something more complicated. */
211#ifdef __cplusplus
212# define _GL_FUNCDECL_SYS_NAME(func) func
213#else
214# define _GL_FUNCDECL_SYS_NAME(func) (func)
215#endif
216
217/* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]); 207/* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]);
218 declares the system function, named func, with the given prototype, 208 declares the system function, named func, with the given prototype,
219 consisting of return type, parameters, and attributes. 209 consisting of return type, parameters, and attributes.
@@ -226,7 +216,7 @@
226 _GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD); 216 _GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD);
227 */ 217 */
228#define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \ 218#define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \
229 _GL_EXTERN_C_FUNC __VA_ARGS__ rettype _GL_FUNCDECL_SYS_NAME (func) parameters 219 _GL_EXTERN_C_FUNC __VA_ARGS__ rettype func parameters
230 220
231/* _GL_CXXALIAS_RPL (func, rettype, parameters); 221/* _GL_CXXALIAS_RPL (func, rettype, parameters);
232 declares a C++ alias called GNULIB_NAMESPACE::func 222 declares a C++ alias called GNULIB_NAMESPACE::func
@@ -397,7 +387,7 @@
397 _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) 387 _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE)
398# define _GL_CXXALIASWARN_1(func,namespace) \ 388# define _GL_CXXALIASWARN_1(func,namespace) \
399 _GL_CXXALIASWARN_2 (func, namespace) 389 _GL_CXXALIASWARN_2 (func, namespace)
400/* To work around GCC bug <https://gcc.gnu.org/PR43881>, 390/* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
401 we enable the warning only when not optimizing. */ 391 we enable the warning only when not optimizing. */
402# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) 392# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__)
403# define _GL_CXXALIASWARN_2(func,namespace) \ 393# define _GL_CXXALIASWARN_2(func,namespace) \
@@ -425,7 +415,7 @@
425 GNULIB_NAMESPACE) 415 GNULIB_NAMESPACE)
426# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ 416# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \
427 _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) 417 _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace)
428/* To work around GCC bug <https://gcc.gnu.org/PR43881>, 418/* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
429 we enable the warning only when not optimizing. */ 419 we enable the warning only when not optimizing. */
430# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) 420# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__)
431# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ 421# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
@@ -1037,6 +1027,7 @@ _GL_CXXALIAS_SYS (c32rtomb, size_t, (char *s, char32_t wc, mbstate_t *ps));
1037_GL_CXXALIASWARN (c32rtomb); 1027_GL_CXXALIASWARN (c32rtomb);
1038# endif 1028# endif
1039#elif defined GNULIB_POSIXCHECK 1029#elif defined GNULIB_POSIXCHECK
1030# undef c32rtomb
1040# if HAVE_RAW_DECL_C32RTOMB 1031# if HAVE_RAW_DECL_C32RTOMB
1041_GL_WARN_ON_USE (c32rtomb, "c32rtomb is not portable - " 1032_GL_WARN_ON_USE (c32rtomb, "c32rtomb is not portable - "
1042 "use gnulib module c32rtomb for portability"); 1033 "use gnulib module c32rtomb for portability");
@@ -1193,6 +1184,7 @@ _GL_CXXALIAS_SYS (mbrtoc32, size_t,
1193_GL_CXXALIASWARN (mbrtoc32); 1184_GL_CXXALIASWARN (mbrtoc32);
1194# endif 1185# endif
1195#elif defined GNULIB_POSIXCHECK 1186#elif defined GNULIB_POSIXCHECK
1187# undef mbrtoc32
1196# if HAVE_RAW_DECL_MBRTOC32 1188# if HAVE_RAW_DECL_MBRTOC32
1197_GL_WARN_ON_USE (mbrtoc32, "mbrtoc32 is not portable - " 1189_GL_WARN_ON_USE (mbrtoc32, "mbrtoc32 is not portable - "
1198 "use gnulib module mbrtoc32 for portability"); 1190 "use gnulib module mbrtoc32 for portability");
@@ -1224,6 +1216,7 @@ _GL_CXXALIAS_SYS (mbrtoc16, size_t,
1224_GL_CXXALIASWARN (mbrtoc16); 1216_GL_CXXALIASWARN (mbrtoc16);
1225# endif 1217# endif
1226#elif defined GNULIB_POSIXCHECK 1218#elif defined GNULIB_POSIXCHECK
1219# undef mbrtoc16
1227# if HAVE_RAW_DECL_MBRTOC16 1220# if HAVE_RAW_DECL_MBRTOC16
1228_GL_WARN_ON_USE (mbrtoc16, "mbrtoc16 is not portable - " 1221_GL_WARN_ON_USE (mbrtoc16, "mbrtoc16 is not portable - "
1229 "use gnulib module mbrtoc16 for portability"); 1222 "use gnulib module mbrtoc16 for portability");