summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gl/pthread.h2612
-rw-r--r--gl/sched.h622
-rw-r--r--gl/stdlib.in.h6
-rw-r--r--gl/uchar.h1449
-rw-r--r--gl/unicase/.deps/libgnu_a-tolower.Po43
-rw-r--r--gl/unictype/.deps/libgnu_a-ctype_alnum.Po42
-rw-r--r--gl/unictype/.deps/libgnu_a-ctype_alpha.Po42
-rw-r--r--gl/unictype/.deps/libgnu_a-ctype_blank.Po42
-rw-r--r--gl/unictype/.deps/libgnu_a-ctype_cntrl.Po42
-rw-r--r--gl/unictype/.deps/libgnu_a-ctype_digit.Po42
-rw-r--r--gl/unictype/.deps/libgnu_a-ctype_graph.Po42
-rw-r--r--gl/unictype/.deps/libgnu_a-ctype_lower.Po42
-rw-r--r--gl/unictype/.deps/libgnu_a-ctype_print.Po42
-rw-r--r--gl/unictype/.deps/libgnu_a-ctype_punct.Po42
-rw-r--r--gl/unictype/.deps/libgnu_a-ctype_space.Po42
-rw-r--r--gl/unictype/.deps/libgnu_a-ctype_upper.Po42
-rw-r--r--gl/unictype/.deps/libgnu_a-ctype_xdigit.Po42
-rw-r--r--gl/uniwidth/.deps/libgnu_a-width.Po53
-rw-r--r--plugins/Makefile.am2
-rw-r--r--plugins/check_cluster.c2
-rw-r--r--plugins/check_curl.c2
-rw-r--r--plugins/check_dig.c2
-rw-r--r--plugins/check_disk.c2
-rw-r--r--plugins/check_fping.c2
-rw-r--r--plugins/check_game.c2
-rw-r--r--plugins/check_hpjd.c2
-rw-r--r--plugins/check_ide_smart.c2
-rw-r--r--plugins/check_ldap.c2
-rw-r--r--plugins/check_load.c2
-rw-r--r--plugins/check_mysql.c2
-rw-r--r--plugins/check_nagios.c2
-rw-r--r--plugins/check_ping.c2
-rw-r--r--plugins/check_procs.c2
-rw-r--r--plugins/check_radius.c2
-rw-r--r--plugins/check_real.d/config.h2
-rw-r--r--plugins/check_snmp.c13
-rw-r--r--plugins/check_snmp.d/check_snmp_helpers.c19
-rw-r--r--plugins/check_tcp.c2
-rw-r--r--plugins/check_time.c2
-rw-r--r--plugins/common.h7
-rw-r--r--plugins/utils.h1
41 files changed, 5336 insertions, 31 deletions
diff --git a/gl/pthread.h b/gl/pthread.h
new file mode 100644
index 00000000..62e1b503
--- /dev/null
+++ b/gl/pthread.h
@@ -0,0 +1,2612 @@
1/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
2/* Implement the most essential subset of POSIX pthread.h.
3
4 Copyright (C) 2009-2025 Free Software Foundation, Inc.
5
6 This file is free software: you can redistribute it and/or modify
7 it under the terms of the GNU Lesser General Public License as
8 published by the Free Software Foundation; either version 2.1 of the
9 License, or (at your option) any later version.
10
11 This file is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public License
17 along with this program. If not, see <https://www.gnu.org/licenses/>. */
18
19/* Written by Paul Eggert, Glen Lenker, and Bruno Haible. */
20
21#if __GNUC__ >= 3
22#pragma GCC system_header
23#endif
24
25
26#if defined _GL_ALREADY_INCLUDING_PTHREAD_H
27/* Special invocation convention:
28 On Android, we have a sequence of nested includes
29 <pthread.h> -> <time.h> -> <sys/time.h> -> <sys/select.h> ->
30 <signal.h> -> <pthread.h>.
31 In this situation, PTHREAD_COND_INITIALIZER is not yet defined,
32 therefore we should not attempt to define PTHREAD_MUTEX_NORMAL etc. */
33
34#include_next <pthread.h>
35
36#else
37/* Normal invocation convention. */
38
39#ifndef _GL_PTHREAD_H_
40
41#if 1
42
43# define _GL_ALREADY_INCLUDING_PTHREAD_H
44
45/* The include_next requires a split double-inclusion guard. */
46# include_next <pthread.h>
47
48# undef _GL_ALREADY_INCLUDING_PTHREAD_H
49
50#endif
51
52#ifndef _GL_PTHREAD_H_
53#define _GL_PTHREAD_H_
54
55/* This file uses _Noreturn, _GL_ATTRIBUTE_PURE, GNULIB_POSIXCHECK,
56 HAVE_RAW_DECL_*. */
57#if !_GL_CONFIG_H_INCLUDED
58 #error "Please include config.h first."
59#endif
60
61#define __need_system_stdlib_h
62#include <stdlib.h>
63#undef __need_system_stdlib_h
64
65
66/* The pthreads-win32 <pthread.h> defines a couple of broken macros. */
67#undef asctime_r
68#undef ctime_r
69#undef gmtime_r
70#undef localtime_r
71#undef rand_r
72#undef strtok_r
73
74#include <errno.h>
75#include <sched.h>
76#include <sys/types.h>
77#include <time.h>
78
79/* The __attribute__ feature is available in gcc versions 2.5 and later.
80 The attribute __pure__ was added in gcc 2.96. */
81#ifndef _GL_ATTRIBUTE_PURE
82# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || defined __clang__
83# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
84# else
85# define _GL_ATTRIBUTE_PURE /* empty */
86# endif
87#endif
88
89/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
90/* C++ compatible function declaration macros.
91 Copyright (C) 2010-2025 Free Software Foundation, Inc.
92
93 This program is free software: you can redistribute it and/or modify it
94 under the terms of the GNU Lesser General Public License as published
95 by the Free Software Foundation; either version 2 of the License, or
96 (at your option) any later version.
97
98 This program is distributed in the hope that it will be useful,
99 but WITHOUT ANY WARRANTY; without even the implied warranty of
100 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
101 Lesser General Public License for more details.
102
103 You should have received a copy of the GNU Lesser General Public License
104 along with this program. If not, see <https://www.gnu.org/licenses/>. */
105
106#ifndef _GL_CXXDEFS_H
107#define _GL_CXXDEFS_H
108
109/* Begin/end the GNULIB_NAMESPACE namespace. */
110#if defined __cplusplus && defined GNULIB_NAMESPACE
111# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE {
112# define _GL_END_NAMESPACE }
113#else
114# define _GL_BEGIN_NAMESPACE
115# define _GL_END_NAMESPACE
116#endif
117
118/* The three most frequent use cases of these macros are:
119
120 * For providing a substitute for a function that is missing on some
121 platforms, but is declared and works fine on the platforms on which
122 it exists:
123
124 #if @GNULIB_FOO@
125 # if !@HAVE_FOO@
126 _GL_FUNCDECL_SYS (foo, ...);
127 # endif
128 _GL_CXXALIAS_SYS (foo, ...);
129 _GL_CXXALIASWARN (foo);
130 #elif defined GNULIB_POSIXCHECK
131 ...
132 #endif
133
134 * For providing a replacement for a function that exists on all platforms,
135 but is broken/insufficient and needs to be replaced on some platforms:
136
137 #if @GNULIB_FOO@
138 # if @REPLACE_FOO@
139 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
140 # undef foo
141 # define foo rpl_foo
142 # endif
143 _GL_FUNCDECL_RPL (foo, ...);
144 _GL_CXXALIAS_RPL (foo, ...);
145 # else
146 _GL_CXXALIAS_SYS (foo, ...);
147 # endif
148 _GL_CXXALIASWARN (foo);
149 #elif defined GNULIB_POSIXCHECK
150 ...
151 #endif
152
153 * For providing a replacement for a function that exists on some platforms
154 but is broken/insufficient and needs to be replaced on some of them and
155 is additionally either missing or undeclared on some other platforms:
156
157 #if @GNULIB_FOO@
158 # if @REPLACE_FOO@
159 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
160 # undef foo
161 # define foo rpl_foo
162 # endif
163 _GL_FUNCDECL_RPL (foo, ...);
164 _GL_CXXALIAS_RPL (foo, ...);
165 # else
166 # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@
167 _GL_FUNCDECL_SYS (foo, ...);
168 # endif
169 _GL_CXXALIAS_SYS (foo, ...);
170 # endif
171 _GL_CXXALIASWARN (foo);
172 #elif defined GNULIB_POSIXCHECK
173 ...
174 #endif
175*/
176
177/* _GL_EXTERN_C declaration;
178 performs the declaration with C linkage. */
179#if defined __cplusplus
180# define _GL_EXTERN_C extern "C"
181#else
182# define _GL_EXTERN_C extern
183#endif
184
185/* _GL_EXTERN_C_FUNC declaration;
186 performs the declaration of a function with C linkage. */
187#if defined __cplusplus
188# define _GL_EXTERN_C_FUNC extern "C"
189#else
190/* In C mode, omit the 'extern' keyword, because attributes in bracket syntax
191 are not allowed between 'extern' and the return type (see gnulib-common.m4).
192 */
193# define _GL_EXTERN_C_FUNC
194#endif
195
196/* _GL_FUNCDECL_RPL (func, rettype, parameters, [attributes]);
197 declares a replacement function, named rpl_func, with the given prototype,
198 consisting of return type, parameters, and attributes.
199 Although attributes are optional, the comma before them is required
200 for portability to C17 and earlier. The attribute _GL_ATTRIBUTE_NOTHROW,
201 if needed, must be placed after the _GL_FUNCDECL_RPL invocation,
202 at the end of the declaration.
203 Examples:
204 _GL_FUNCDECL_RPL (free, void, (void *ptr), ) _GL_ATTRIBUTE_NOTHROW;
205 _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...),
206 _GL_ARG_NONNULL ((1)));
207
208 Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front
209 of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's
210 because
211 [[...]] extern "C" <declaration>;
212 is invalid syntax in C++.)
213 */
214#define _GL_FUNCDECL_RPL(func,rettype,parameters,...) \
215 _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters, __VA_ARGS__)
216#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \
217 _GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters
218
219/* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]);
220 declares the system function, named func, with the given prototype,
221 consisting of return type, parameters, and attributes.
222 Although attributes are optional, the comma before them is required
223 for portability to C17 and earlier. The attribute _GL_ATTRIBUTE_NOTHROW,
224 if needed, must be placed after the _GL_FUNCDECL_RPL invocation,
225 at the end of the declaration.
226 Examples:
227 _GL_FUNCDECL_SYS (getumask, mode_t, (void), ) _GL_ATTRIBUTE_NOTHROW;
228 _GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD);
229 */
230#define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \
231 _GL_EXTERN_C_FUNC __VA_ARGS__ rettype func parameters
232
233/* _GL_CXXALIAS_RPL (func, rettype, parameters);
234 declares a C++ alias called GNULIB_NAMESPACE::func
235 that redirects to rpl_func, if GNULIB_NAMESPACE is defined.
236 Example:
237 _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...));
238
239 Wrapping rpl_func in an object with an inline conversion operator
240 avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is
241 actually used in the program. */
242#define _GL_CXXALIAS_RPL(func,rettype,parameters) \
243 _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters)
244#if defined __cplusplus && defined GNULIB_NAMESPACE
245# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
246 namespace GNULIB_NAMESPACE \
247 { \
248 static const struct _gl_ ## func ## _wrapper \
249 { \
250 typedef rettype (*type) parameters; \
251 \
252 inline operator type () const \
253 { \
254 return ::rpl_func; \
255 } \
256 } func = {}; \
257 } \
258 _GL_EXTERN_C int _gl_cxxalias_dummy
259#else
260# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
261 _GL_EXTERN_C int _gl_cxxalias_dummy
262#endif
263
264/* _GL_CXXALIAS_MDA (func, rettype, parameters);
265 is to be used when func is a Microsoft deprecated alias, on native Windows.
266 It declares a C++ alias called GNULIB_NAMESPACE::func
267 that redirects to _func, if GNULIB_NAMESPACE is defined.
268 Example:
269 _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...));
270 */
271#define _GL_CXXALIAS_MDA(func,rettype,parameters) \
272 _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters)
273
274/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters);
275 is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters);
276 except that the C function rpl_func may have a slightly different
277 declaration. A cast is used to silence the "invalid conversion" error
278 that would otherwise occur. */
279#if defined __cplusplus && defined GNULIB_NAMESPACE
280# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
281 namespace GNULIB_NAMESPACE \
282 { \
283 static const struct _gl_ ## func ## _wrapper \
284 { \
285 typedef rettype (*type) parameters; \
286 \
287 inline operator type () const \
288 { \
289 return reinterpret_cast<type>(::rpl_func); \
290 } \
291 } func = {}; \
292 } \
293 _GL_EXTERN_C int _gl_cxxalias_dummy
294#else
295# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
296 _GL_EXTERN_C int _gl_cxxalias_dummy
297#endif
298
299/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters);
300 is like _GL_CXXALIAS_MDA (func, rettype, parameters);
301 except that the C function func may have a slightly different declaration.
302 A cast is used to silence the "invalid conversion" error that would
303 otherwise occur. */
304#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \
305 _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters)
306
307/* _GL_CXXALIAS_SYS (func, rettype, parameters);
308 declares a C++ alias called GNULIB_NAMESPACE::func
309 that redirects to the system provided function func, if GNULIB_NAMESPACE
310 is defined.
311 Example:
312 _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...));
313
314 Wrapping func in an object with an inline conversion operator
315 avoids a reference to func unless GNULIB_NAMESPACE::func is
316 actually used in the program. */
317#if defined __cplusplus && defined GNULIB_NAMESPACE
318# define _GL_CXXALIAS_SYS(func,rettype,parameters) \
319 namespace GNULIB_NAMESPACE \
320 { \
321 static const struct _gl_ ## func ## _wrapper \
322 { \
323 typedef rettype (*type) parameters; \
324 \
325 inline operator type () const \
326 { \
327 return ::func; \
328 } \
329 } func = {}; \
330 } \
331 _GL_EXTERN_C int _gl_cxxalias_dummy
332#else
333# define _GL_CXXALIAS_SYS(func,rettype,parameters) \
334 _GL_EXTERN_C int _gl_cxxalias_dummy
335#endif
336
337/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters);
338 is like _GL_CXXALIAS_SYS (func, rettype, parameters);
339 except that the C function func may have a slightly different declaration.
340 A cast is used to silence the "invalid conversion" error that would
341 otherwise occur. */
342#if defined __cplusplus && defined GNULIB_NAMESPACE
343# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
344 namespace GNULIB_NAMESPACE \
345 { \
346 static const struct _gl_ ## func ## _wrapper \
347 { \
348 typedef rettype (*type) parameters; \
349 \
350 inline operator type () const \
351 { \
352 return reinterpret_cast<type>(::func); \
353 } \
354 } func = {}; \
355 } \
356 _GL_EXTERN_C int _gl_cxxalias_dummy
357#else
358# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
359 _GL_EXTERN_C int _gl_cxxalias_dummy
360#endif
361
362/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2);
363 is like _GL_CXXALIAS_SYS (func, rettype, parameters);
364 except that the C function is picked among a set of overloaded functions,
365 namely the one with rettype2 and parameters2. Two consecutive casts
366 are used to silence the "cannot find a match" and "invalid conversion"
367 errors that would otherwise occur. */
368#if defined __cplusplus && defined GNULIB_NAMESPACE
369 /* The outer cast must be a reinterpret_cast.
370 The inner cast: When the function is defined as a set of overloaded
371 functions, it works as a static_cast<>, choosing the designated variant.
372 When the function is defined as a single variant, it works as a
373 reinterpret_cast<>. The parenthesized cast syntax works both ways. */
374# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
375 namespace GNULIB_NAMESPACE \
376 { \
377 static const struct _gl_ ## func ## _wrapper \
378 { \
379 typedef rettype (*type) parameters; \
380 \
381 inline operator type () const \
382 { \
383 return reinterpret_cast<type>((rettype2 (*) parameters2)(::func)); \
384 } \
385 } func = {}; \
386 } \
387 _GL_EXTERN_C int _gl_cxxalias_dummy
388#else
389# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
390 _GL_EXTERN_C int _gl_cxxalias_dummy
391#endif
392
393/* _GL_CXXALIASWARN (func);
394 causes a warning to be emitted when ::func is used but not when
395 GNULIB_NAMESPACE::func is used. func must be defined without overloaded
396 variants. */
397#if defined __cplusplus && defined GNULIB_NAMESPACE
398# define _GL_CXXALIASWARN(func) \
399 _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE)
400# define _GL_CXXALIASWARN_1(func,namespace) \
401 _GL_CXXALIASWARN_2 (func, namespace)
402/* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
403 we enable the warning only when not optimizing. */
404# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__)
405# define _GL_CXXALIASWARN_2(func,namespace) \
406 _GL_WARN_ON_USE (func, \
407 "The symbol ::" #func " refers to the system function. " \
408 "Use " #namespace "::" #func " instead.")
409# elif (__GNUC__ >= 3 || defined __clang__) && GNULIB_STRICT_CHECKING
410# define _GL_CXXALIASWARN_2(func,namespace) \
411 extern __typeof__ (func) func
412# else
413# define _GL_CXXALIASWARN_2(func,namespace) \
414 _GL_EXTERN_C int _gl_cxxalias_dummy
415# endif
416#else
417# define _GL_CXXALIASWARN(func) \
418 _GL_EXTERN_C int _gl_cxxalias_dummy
419#endif
420
421/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes);
422 causes a warning to be emitted when the given overloaded variant of ::func
423 is used but not when GNULIB_NAMESPACE::func is used. */
424#if defined __cplusplus && defined GNULIB_NAMESPACE
425# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
426 _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \
427 GNULIB_NAMESPACE)
428# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \
429 _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace)
430/* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
431 we enable the warning only when not optimizing. */
432# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__)
433# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
434 _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \
435 "The symbol ::" #func " refers to the system function. " \
436 "Use " #namespace "::" #func " instead.")
437# else
438# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
439 _GL_EXTERN_C int _gl_cxxalias_dummy
440# endif
441#else
442# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
443 _GL_EXTERN_C int _gl_cxxalias_dummy
444#endif
445
446#endif /* _GL_CXXDEFS_H */
447
448/* The definition of _Noreturn is copied here. */
449/* A C macro for declaring that a function does not return.
450 Copyright (C) 2011-2025 Free Software Foundation, Inc.
451
452 This program is free software: you can redistribute it and/or modify it
453 under the terms of the GNU Lesser General Public License as published
454 by the Free Software Foundation; either version 2 of the License, or
455 (at your option) any later version.
456
457 This program is distributed in the hope that it will be useful,
458 but WITHOUT ANY WARRANTY; without even the implied warranty of
459 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
460 Lesser General Public License for more details.
461
462 You should have received a copy of the GNU Lesser General Public License
463 along with this program. If not, see <https://www.gnu.org/licenses/>. */
464
465/* The _Noreturn keyword of C11.
466 Do not use [[noreturn]], because with it the syntax
467 extern _Noreturn void func (...);
468 would not be valid; such a declaration would be valid only with 'extern'
469 and '_Noreturn' swapped, or without the 'extern' keyword. However, some
470 AIX system header files and several gnulib header files use precisely
471 this syntax with 'extern'. So even though C23 deprecates _Noreturn,
472 it is currently more portable to prefer it to [[noreturn]].
473
474 Also, do not try to work around LLVM bug 59792 (clang 15 or earlier).
475 This rare bug can be worked around by compiling with 'clang -D_Noreturn=',
476 though the workaround may generate many false-alarm warnings. */
477#ifndef _Noreturn
478# if ((!defined __cplusplus || defined __clang__) \
479 && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0)))
480 /* _Noreturn works as-is. */
481# elif (2 < __GNUC__ + (8 <= __GNUC_MINOR__) || defined __clang__ \
482 || 0x5110 <= __SUNPRO_C)
483 /* Prefer __attribute__ ((__noreturn__)) to plain _Noreturn even if the
484 latter works, as 'gcc -std=gnu99 -Wpedantic' warns about _Noreturn. */
485# define _Noreturn __attribute__ ((__noreturn__))
486# elif 1200 <= (defined _MSC_VER ? _MSC_VER : 0)
487# define _Noreturn __declspec (noreturn)
488# else
489# define _Noreturn
490# endif
491#endif
492
493/* The definition of _GL_ARG_NONNULL is copied here. */
494/* A C macro for declaring that specific arguments must not be NULL.
495 Copyright (C) 2009-2025 Free Software Foundation, Inc.
496
497 This program is free software: you can redistribute it and/or modify it
498 under the terms of the GNU Lesser General Public License as published
499 by the Free Software Foundation; either version 2 of the License, or
500 (at your option) any later version.
501
502 This program is distributed in the hope that it will be useful,
503 but WITHOUT ANY WARRANTY; without even the implied warranty of
504 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
505 Lesser General Public License for more details.
506
507 You should have received a copy of the GNU Lesser General Public License
508 along with this program. If not, see <https://www.gnu.org/licenses/>. */
509
510/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools
511 that the values passed as arguments n, ..., m must be non-NULL pointers.
512 n = 1 stands for the first argument, n = 2 for the second argument etc. */
513#ifndef _GL_ARG_NONNULL
514# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__
515# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params))
516# else
517# define _GL_ARG_NONNULL(params)
518# endif
519#endif
520
521/* The definition of _GL_WARN_ON_USE is copied here. */
522/* A C macro for emitting warnings if a function is used.
523 Copyright (C) 2010-2025 Free Software Foundation, Inc.
524
525 This program is free software: you can redistribute it and/or modify it
526 under the terms of the GNU Lesser General Public License as published
527 by the Free Software Foundation; either version 2 of the License, or
528 (at your option) any later version.
529
530 This program is distributed in the hope that it will be useful,
531 but WITHOUT ANY WARRANTY; without even the implied warranty of
532 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
533 Lesser General Public License for more details.
534
535 You should have received a copy of the GNU Lesser General Public License
536 along with this program. If not, see <https://www.gnu.org/licenses/>. */
537
538/* _GL_WARN_ON_USE (function, "literal string") issues a declaration
539 for FUNCTION which will then trigger a compiler warning containing
540 the text of "literal string" anywhere that function is called, if
541 supported by the compiler. If the compiler does not support this
542 feature, the macro expands to an unused extern declaration.
543
544 _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the
545 attribute used in _GL_WARN_ON_USE. If the compiler does not support
546 this feature, it expands to empty.
547
548 These macros are useful for marking a function as a potential
549 portability trap, with the intent that "literal string" include
550 instructions on the replacement function that should be used
551 instead.
552 _GL_WARN_ON_USE is for functions with 'extern' linkage.
553 _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline'
554 linkage.
555
556 _GL_WARN_ON_USE should not be used more than once for a given function
557 in a given compilation unit (because this may generate a warning even
558 if the function is never called).
559
560 However, one of the reasons that a function is a portability trap is
561 if it has the wrong signature. Declaring FUNCTION with a different
562 signature in C is a compilation error, so this macro must use the
563 same type as any existing declaration so that programs that avoid
564 the problematic FUNCTION do not fail to compile merely because they
565 included a header that poisoned the function. But this implies that
566 _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already
567 have a declaration. Use of this macro implies that there must not
568 be any other macro hiding the declaration of FUNCTION; but
569 undefining FUNCTION first is part of the poisoning process anyway
570 (although for symbols that are provided only via a macro, the result
571 is a compilation error rather than a warning containing
572 "literal string"). Also note that in C++, it is only safe to use if
573 FUNCTION has no overloads.
574
575 For an example, it is possible to poison 'getline' by:
576 - adding a call to gl_WARN_ON_USE_PREPARE([[#include <stdio.h>]],
577 [getline]) in configure.ac, which potentially defines
578 HAVE_RAW_DECL_GETLINE
579 - adding this code to a header that wraps the system <stdio.h>:
580 #undef getline
581 #if HAVE_RAW_DECL_GETLINE
582 _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but"
583 "not universally present; use the gnulib module getline");
584 #endif
585
586 It is not possible to directly poison global variables. But it is
587 possible to write a wrapper accessor function, and poison that
588 (less common usage, like &environ, will cause a compilation error
589 rather than issue the nice warning, but the end result of informing
590 the developer about their portability problem is still achieved):
591 #if HAVE_RAW_DECL_ENVIRON
592 static char ***
593 rpl_environ (void) { return &environ; }
594 _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared");
595 # undef environ
596 # define environ (*rpl_environ ())
597 #endif
598 or better (avoiding contradictory use of 'static' and 'extern'):
599 #if HAVE_RAW_DECL_ENVIRON
600 static char ***
601 _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared")
602 rpl_environ (void) { return &environ; }
603 # undef environ
604 # define environ (*rpl_environ ())
605 #endif
606 */
607#ifndef _GL_WARN_ON_USE
608
609# if (4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)) && !defined __clang__
610/* A compiler attribute is available in gcc versions 4.3.0 and later. */
611# define _GL_WARN_ON_USE(function, message) \
612_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message)))
613# define _GL_WARN_ON_USE_ATTRIBUTE(message) \
614 __attribute__ ((__warning__ (message)))
615# elif __clang_major__ >= 4
616/* Another compiler attribute is available in clang. */
617# define _GL_WARN_ON_USE(function, message) \
618_GL_WARN_EXTERN_C __typeof__ (function) function \
619 __attribute__ ((__diagnose_if__ (1, message, "warning")))
620# define _GL_WARN_ON_USE_ATTRIBUTE(message) \
621 __attribute__ ((__diagnose_if__ (1, message, "warning")))
622# elif (__GNUC__ >= 3 || defined __clang__) && GNULIB_STRICT_CHECKING
623/* Verify the existence of the function. */
624# define _GL_WARN_ON_USE(function, message) \
625_GL_WARN_EXTERN_C __typeof__ (function) function
626# define _GL_WARN_ON_USE_ATTRIBUTE(message)
627# else /* Unsupported. */
628# define _GL_WARN_ON_USE(function, message) \
629_GL_WARN_EXTERN_C int _gl_warn_on_use
630# define _GL_WARN_ON_USE_ATTRIBUTE(message)
631# endif
632#endif
633
634/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message")
635 is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the
636 function is declared with the given prototype, consisting of return type,
637 parameters, and attributes.
638 This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does
639 not work in this case. */
640#ifndef _GL_WARN_ON_USE_CXX
641# if !defined __cplusplus
642# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \
643 _GL_WARN_ON_USE (function, msg)
644# else
645# if (4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)) && !defined __clang__
646/* A compiler attribute is available in gcc versions 4.3.0 and later. */
647# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \
648extern rettype_gcc function parameters_and_attributes \
649 __attribute__ ((__warning__ (msg)))
650# elif __clang_major__ >= 4
651/* Another compiler attribute is available in clang. */
652# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \
653extern rettype_clang function parameters_and_attributes \
654 __attribute__ ((__diagnose_if__ (1, msg, "warning")))
655# elif (__GNUC__ >= 3 || defined __clang__) && GNULIB_STRICT_CHECKING
656/* Verify the existence of the function. */
657# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \
658extern rettype_gcc function parameters_and_attributes
659# else /* Unsupported. */
660# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \
661_GL_WARN_EXTERN_C int _gl_warn_on_use
662# endif
663# endif
664#endif
665
666/* _GL_WARN_EXTERN_C declaration;
667 performs the declaration with C linkage. */
668#ifndef _GL_WARN_EXTERN_C
669# if defined __cplusplus
670# define _GL_WARN_EXTERN_C extern "C"
671# else
672# define _GL_WARN_EXTERN_C extern
673# endif
674#endif
675
676/* =========== Thread types and macros =========== */
677
678#if (defined _WIN32 && ! defined __CYGWIN__) && USE_WINDOWS_THREADS
679# if 0
680# include "windows-thread.h"
681# if 1
682# define pthread_t rpl_pthread_t
683# define pthread_attr_t rpl_pthread_attr_t
684# endif
685# if !GNULIB_defined_pthread_thread_types
686typedef glwthread_thread_t pthread_t;
687typedef unsigned int pthread_attr_t;
688# define GNULIB_defined_pthread_thread_types 1
689# endif
690# else
691# if 1
692# define pthread_t rpl_pthread_t
693# define pthread_attr_t rpl_pthread_attr_t
694# endif
695# if !GNULIB_defined_pthread_thread_types
696typedef int pthread_t;
697typedef unsigned int pthread_attr_t;
698# define GNULIB_defined_pthread_thread_types 1
699# endif
700# endif
701# undef PTHREAD_CREATE_JOINABLE
702# undef PTHREAD_CREATE_DETACHED
703# define PTHREAD_CREATE_JOINABLE 0
704# define PTHREAD_CREATE_DETACHED 1
705#else
706# if !1
707# if !GNULIB_defined_pthread_thread_types
708typedef int pthread_t;
709typedef unsigned int pthread_attr_t;
710# define GNULIB_defined_pthread_thread_types 1
711# endif
712# endif
713# if !1
714# define PTHREAD_CREATE_JOINABLE 0
715# define PTHREAD_CREATE_DETACHED 1
716# endif
717#endif
718
719/* =========== Once-only control (initialization) types and macros ========== */
720
721#if (defined _WIN32 && ! defined __CYGWIN__) && USE_WINDOWS_THREADS
722# if 1
723# include "windows-once.h"
724# if 1
725# define pthread_once_t rpl_pthread_once_t
726# endif
727# if !GNULIB_defined_pthread_once_types
728typedef glwthread_once_t pthread_once_t;
729# define GNULIB_defined_pthread_once_types 1
730# endif
731# undef PTHREAD_ONCE_INIT
732# define PTHREAD_ONCE_INIT GLWTHREAD_ONCE_INIT
733# else
734# if 1
735# define pthread_once_t rpl_pthread_once_t
736# endif
737# if !GNULIB_defined_pthread_once_types
738typedef int pthread_once_t;
739# define GNULIB_defined_pthread_once_types 1
740# endif
741# undef PTHREAD_ONCE_INIT
742# define PTHREAD_ONCE_INIT { 0 }
743# endif
744#else
745# if !1
746# if !GNULIB_defined_pthread_once_types
747typedef int pthread_once_t;
748# define GNULIB_defined_pthread_once_types 1
749# endif
750# undef PTHREAD_ONCE_INIT
751# define PTHREAD_ONCE_INIT { 0 }
752# endif
753#endif
754
755/* =========== Mutex types and macros =========== */
756
757#if (defined _WIN32 && ! defined __CYGWIN__) && USE_WINDOWS_THREADS
758# if 0
759# include "windows-timedmutex.h"
760# include "windows-timedrecmutex.h"
761# if 1
762# define pthread_mutex_t rpl_pthread_mutex_t
763# define pthread_mutexattr_t rpl_pthread_mutexattr_t
764# endif
765# if !GNULIB_defined_pthread_mutex_types
766typedef struct
767 {
768 int type;
769 union
770 {
771 glwthread_timedmutex_t u_timedmutex;
772 glwthread_timedrecmutex_t u_timedrecmutex;
773 }
774 u;
775 }
776 pthread_mutex_t;
777typedef unsigned int pthread_mutexattr_t;
778# define GNULIB_defined_pthread_mutex_types 1
779# endif
780# undef PTHREAD_MUTEX_INITIALIZER
781# define PTHREAD_MUTEX_INITIALIZER { 1, { GLWTHREAD_TIMEDMUTEX_INIT } }
782# else
783# if 1
784# define pthread_mutex_t rpl_pthread_mutex_t
785# define pthread_mutexattr_t rpl_pthread_mutexattr_t
786# endif
787# if !GNULIB_defined_pthread_mutex_types
788typedef int pthread_mutex_t;
789typedef unsigned int pthread_mutexattr_t;
790# define GNULIB_defined_pthread_mutex_types 1
791# endif
792# undef PTHREAD_MUTEX_INITIALIZER
793# define PTHREAD_MUTEX_INITIALIZER { 0 }
794# endif
795# undef PTHREAD_MUTEX_DEFAULT
796# undef PTHREAD_MUTEX_NORMAL
797# undef PTHREAD_MUTEX_ERRORCHECK
798# undef PTHREAD_MUTEX_RECURSIVE
799# define PTHREAD_MUTEX_DEFAULT PTHREAD_MUTEX_NORMAL
800# define PTHREAD_MUTEX_NORMAL 0
801# define PTHREAD_MUTEX_ERRORCHECK 1
802# define PTHREAD_MUTEX_RECURSIVE 2
803# undef PTHREAD_MUTEX_STALLED
804# undef PTHREAD_MUTEX_ROBUST
805# define PTHREAD_MUTEX_STALLED 0
806# define PTHREAD_MUTEX_ROBUST 1
807#else
808# if !1
809# if !GNULIB_defined_pthread_mutex_types
810typedef int pthread_mutex_t;
811typedef unsigned int pthread_mutexattr_t;
812# define GNULIB_defined_pthread_mutex_types 1
813# endif
814# undef PTHREAD_MUTEX_INITIALIZER
815# define PTHREAD_MUTEX_INITIALIZER { 0 }
816# endif
817# if !1
818# define PTHREAD_MUTEX_DEFAULT PTHREAD_MUTEX_NORMAL
819# define PTHREAD_MUTEX_NORMAL 0
820# define PTHREAD_MUTEX_ERRORCHECK 1
821# define PTHREAD_MUTEX_RECURSIVE 2
822# endif
823# if !1
824# define PTHREAD_MUTEX_STALLED 0
825# define PTHREAD_MUTEX_ROBUST 1
826# endif
827#endif
828
829/* =========== Read-write lock types and macros =========== */
830
831#if (defined _WIN32 && ! defined __CYGWIN__) && USE_WINDOWS_THREADS
832# if 0
833# include "windows-timedrwlock.h"
834# if 1
835# define pthread_rwlock_t rpl_pthread_rwlock_t
836# define pthread_rwlockattr_t rpl_pthread_rwlockattr_t
837# endif
838# if !GNULIB_defined_pthread_rwlock_types
839typedef glwthread_timedrwlock_t pthread_rwlock_t;
840typedef unsigned int pthread_rwlockattr_t;
841# define GNULIB_defined_pthread_rwlock_types 1
842# endif
843# undef PTHREAD_RWLOCK_INITIALIZER
844# define PTHREAD_RWLOCK_INITIALIZER GLWTHREAD_TIMEDRWLOCK_INIT
845# else
846# if 1
847# define pthread_rwlock_t rpl_pthread_rwlock_t
848# define pthread_rwlockattr_t rpl_pthread_rwlockattr_t
849# endif
850# if !GNULIB_defined_pthread_rwlock_types
851typedef int pthread_rwlock_t;
852typedef unsigned int pthread_rwlockattr_t;
853# define GNULIB_defined_pthread_rwlock_types 1
854# endif
855# undef PTHREAD_RWLOCK_INITIALIZER
856# define PTHREAD_RWLOCK_INITIALIZER { 0 }
857# endif
858#elif 0 && 0 /* i.e. PTHREAD_RWLOCK_UNIMPLEMENTED */
859# if 1
860# define pthread_rwlock_t rpl_pthread_rwlock_t
861# define pthread_rwlockattr_t rpl_pthread_rwlockattr_t
862# endif
863# if !GNULIB_defined_pthread_rwlock_types
864typedef struct
865 {
866 pthread_mutex_t lock; /* protects the remaining fields */
867 pthread_cond_t waiting_readers; /* waiting readers */
868 pthread_cond_t waiting_writers; /* waiting writers */
869 unsigned int waiting_writers_count; /* number of waiting writers */
870 int runcount; /* number of readers running, or -1 when a writer runs */
871 }
872 pthread_rwlock_t;
873typedef unsigned int pthread_rwlockattr_t;
874# define GNULIB_defined_pthread_rwlock_types 1
875# endif
876# undef PTHREAD_RWLOCK_INITIALIZER
877# define PTHREAD_RWLOCK_INITIALIZER \
878 { PTHREAD_MUTEX_INITIALIZER, PTHREAD_COND_INITIALIZER, PTHREAD_COND_INITIALIZER, 0, 0 }
879#elif 0 && 0 /* i.e. PTHREAD_RWLOCK_BAD_WAITQUEUE */
880/* Use rwlocks of kind PREFER_WRITER or PREFER_WRITER_NONRECURSIVE instead of
881 the DEFAULT. */
882# undef PTHREAD_RWLOCK_INITIALIZER
883# define PTHREAD_RWLOCK_INITIALIZER PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP
884#else
885# if 1
886# if !defined PTHREAD_RWLOCK_INITIALIZER && defined PTHREAD_RWLOCK_INITIALIZER_NP /* z/OS */
887# define PTHREAD_RWLOCK_INITIALIZER PTHREAD_RWLOCK_INITIALIZER_NP
888# endif
889# else
890# if !GNULIB_defined_pthread_rwlock_types
891typedef int pthread_rwlock_t;
892typedef unsigned int pthread_rwlockattr_t;
893# define GNULIB_defined_pthread_rwlock_types 1
894# endif
895# undef PTHREAD_RWLOCK_INITIALIZER
896# define PTHREAD_RWLOCK_INITIALIZER { 0 }
897# endif
898#endif
899
900/* =========== Condition variable types and macros =========== */
901
902#if (defined _WIN32 && ! defined __CYGWIN__) && USE_WINDOWS_THREADS
903# if 0
904# include "windows-cond.h"
905# if 1
906# define pthread_cond_t rpl_pthread_cond_t
907# define pthread_condattr_t rpl_pthread_condattr_t
908# endif
909# if !GNULIB_defined_pthread_cond_types
910typedef glwthread_cond_t pthread_cond_t;
911typedef unsigned int pthread_condattr_t;
912# define GNULIB_defined_pthread_cond_types 1
913# endif
914# undef PTHREAD_COND_INITIALIZER
915# define PTHREAD_COND_INITIALIZER GLWTHREAD_COND_INIT
916# else
917# if 1
918# define pthread_cond_t rpl_pthread_cond_t
919# define pthread_condattr_t rpl_pthread_condattr_t
920# endif
921# if !GNULIB_defined_pthread_cond_types
922typedef int pthread_cond_t;
923typedef unsigned int pthread_condattr_t;
924# define GNULIB_defined_pthread_cond_types 1
925# endif
926# undef PTHREAD_COND_INITIALIZER
927# define PTHREAD_COND_INITIALIZER { 0 }
928# endif
929#else
930# if !1
931# if !GNULIB_defined_pthread_cond_types
932typedef int pthread_cond_t;
933typedef unsigned int pthread_condattr_t;
934# define GNULIB_defined_pthread_cond_types 1
935# endif
936# undef PTHREAD_COND_INITIALIZER
937# define PTHREAD_COND_INITIALIZER { 0 }
938# endif
939#endif
940
941/* =========== Thread-specific storage types and macros =========== */
942
943#if (defined _WIN32 && ! defined __CYGWIN__) && USE_WINDOWS_THREADS
944# if 0
945# include "windows-tls.h"
946# if 1
947# define pthread_key_t rpl_pthread_key_t
948# endif
949# if !GNULIB_defined_pthread_tss_types
950typedef glwthread_tls_key_t pthread_key_t;
951# define GNULIB_defined_pthread_tss_types 1
952# endif
953# undef PTHREAD_DESTRUCTOR_ITERATIONS
954# define PTHREAD_DESTRUCTOR_ITERATIONS GLWTHREAD_DESTRUCTOR_ITERATIONS
955# else
956# if 1
957# define pthread_key_t rpl_pthread_key_t
958# endif
959# if !GNULIB_defined_pthread_tss_types
960typedef void ** pthread_key_t;
961# define GNULIB_defined_pthread_tss_types 1
962# endif
963# undef PTHREAD_DESTRUCTOR_ITERATIONS
964# define PTHREAD_DESTRUCTOR_ITERATIONS 0
965# endif
966#else
967# if !1
968# if !GNULIB_defined_pthread_tss_types
969typedef void ** pthread_key_t;
970# define GNULIB_defined_pthread_tss_types 1
971# endif
972# undef PTHREAD_DESTRUCTOR_ITERATIONS
973# define PTHREAD_DESTRUCTOR_ITERATIONS 0
974# endif
975#endif
976
977/* =========== Spinlock types and macros =========== */
978
979#if (defined _WIN32 && ! defined __CYGWIN__) && USE_WINDOWS_THREADS
980# if 0
981# include "windows-spin.h"
982# if 1
983# define pthread_spinlock_t rpl_pthread_spinlock_t
984# endif
985# if !GNULIB_defined_pthread_spin_types
986typedef glwthread_spinlock_t pthread_spinlock_t;
987# define GNULIB_defined_pthread_spin_types 1
988# endif
989# else
990# if 1
991# define pthread_spinlock_t rpl_pthread_spinlock_t
992# endif
993# if !GNULIB_defined_pthread_spin_types
994typedef pthread_mutex_t pthread_spinlock_t;
995# define GNULIB_defined_pthread_spin_types 1
996# endif
997# endif
998# undef PTHREAD_PROCESS_PRIVATE
999# undef PTHREAD_PROCESS_SHARED
1000# define PTHREAD_PROCESS_PRIVATE 0
1001# define PTHREAD_PROCESS_SHARED 1
1002#else
1003# if 1
1004/* <pthread.h> exists and defines pthread_spinlock_t. */
1005# if !1 || 0
1006/* If the 'pthread-spin' module is in use, it defines all the pthread_spin*
1007 functions. Prepare for it by overriding pthread_spinlock_t if that might
1008 be needed. */
1009# if !(((__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7) \
1010 || __clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 1)) \
1011 || (((__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1)) \
1012 && !defined __ANDROID__) \
1013 || __clang_major__ >= 3)) \
1014 && !defined __ibmxl__)
1015/* We can't use GCC built-ins. Approximate spinlocks with mutexes. */
1016# if !GNULIB_defined_pthread_spin_types
1017# define pthread_spinlock_t pthread_mutex_t
1018# define GNULIB_defined_pthread_spin_types 1
1019# endif
1020# endif
1021# endif
1022# else
1023/* Approximate spinlocks with mutexes. */
1024# if !GNULIB_defined_pthread_spin_types
1025typedef pthread_mutex_t pthread_spinlock_t;
1026# define GNULIB_defined_pthread_spin_types 1
1027# endif
1028# endif
1029# if !1
1030# define PTHREAD_PROCESS_PRIVATE 0
1031# define PTHREAD_PROCESS_SHARED 1
1032# endif
1033#endif
1034
1035/* =========== Other types and macros =========== */
1036
1037#if !1
1038# if !GNULIB_defined_other_pthread_types
1039typedef int pthread_barrier_t;
1040typedef unsigned int pthread_barrierattr_t;
1041# define GNULIB_defined_other_pthread_types 1
1042# endif
1043#endif
1044
1045#if !defined PTHREAD_CANCELED
1046
1047# define PTHREAD_BARRIER_SERIAL_THREAD (-1)
1048
1049# define PTHREAD_CANCEL_DEFERRED 0
1050# define PTHREAD_CANCEL_ASYNCHRONOUS 1
1051
1052# define PTHREAD_CANCEL_ENABLE 0
1053# define PTHREAD_CANCEL_DISABLE 1
1054
1055# define PTHREAD_CANCELED ((void *) -1)
1056
1057# define PTHREAD_INHERIT_SCHED 0
1058# define PTHREAD_EXPLICIT_SCHED 1
1059
1060# define PTHREAD_PRIO_NONE 0
1061# define PTHREAD_PRIO_INHERIT 1
1062# define PTHREAD_PRIO_PROTECT 2
1063
1064# define PTHREAD_SCOPE_SYSTEM 0
1065# define PTHREAD_SCOPE_PROCESS 1
1066
1067#endif
1068
1069/* =========== Thread functions =========== */
1070
1071#if 0
1072/* The 'restrict' qualifier on ARG is nonsense, but POSIX specifies it this way.
1073 Sigh. */
1074# if 0
1075# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1076# undef pthread_create
1077# define pthread_create rpl_pthread_create
1078# endif
1079_GL_FUNCDECL_RPL (pthread_create, int,
1080 (pthread_t *restrict threadp,
1081 const pthread_attr_t *restrict attr,
1082 void * (*mainfunc) (void *), void *restrict arg),
1083 _GL_ARG_NONNULL ((1, 3)));
1084_GL_CXXALIAS_RPL (pthread_create, int,
1085 (pthread_t *restrict threadp,
1086 const pthread_attr_t *restrict attr,
1087 void * (*mainfunc) (void *), void *restrict arg));
1088# else
1089# if !1
1090_GL_FUNCDECL_SYS (pthread_create, int,
1091 (pthread_t *restrict threadp,
1092 const pthread_attr_t *restrict attr,
1093 void * (*mainfunc) (void *), void *restrict arg),
1094 _GL_ARG_NONNULL ((1, 3)));
1095# endif
1096_GL_CXXALIAS_SYS_CAST (pthread_create, int,
1097 (pthread_t *restrict threadp,
1098 const pthread_attr_t *restrict attr,
1099 void * (*mainfunc) (void *), void *restrict arg));
1100# endif
1101# if __GLIBC__ >= 2
1102_GL_CXXALIASWARN (pthread_create);
1103# endif
1104#elif defined GNULIB_POSIXCHECK
1105# undef pthread_create
1106# if HAVE_RAW_DECL_PTHREAD_CREATE
1107_GL_WARN_ON_USE (pthread_create, "pthread_create is not portable - "
1108 "use gnulib module pthread-thread for portability");
1109# endif
1110#endif
1111
1112#if 0
1113# if 0
1114# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1115# undef pthread_attr_init
1116# define pthread_attr_init rpl_pthread_attr_init
1117# endif
1118_GL_FUNCDECL_RPL (pthread_attr_init, int, (pthread_attr_t *attr),
1119 _GL_ARG_NONNULL ((1)));
1120_GL_CXXALIAS_RPL (pthread_attr_init, int, (pthread_attr_t *attr));
1121# else
1122# if !1
1123_GL_FUNCDECL_SYS (pthread_attr_init, int, (pthread_attr_t *attr),
1124 _GL_ARG_NONNULL ((1)));
1125# endif
1126_GL_CXXALIAS_SYS (pthread_attr_init, int, (pthread_attr_t *attr));
1127# endif
1128# if __GLIBC__ >= 2
1129_GL_CXXALIASWARN (pthread_attr_init);
1130# endif
1131#elif defined GNULIB_POSIXCHECK
1132# undef pthread_attr_init
1133# if HAVE_RAW_DECL_PTHREAD_ATTR_INIT
1134_GL_WARN_ON_USE (pthread_attr_init, "pthread_attr_init is not portable - "
1135 "use gnulib module pthread-thread for portability");
1136# endif
1137#endif
1138
1139#if 0
1140# if 0
1141# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1142# undef pthread_attr_getdetachstate
1143# define pthread_attr_getdetachstate rpl_pthread_attr_getdetachstate
1144# endif
1145_GL_FUNCDECL_RPL (pthread_attr_getdetachstate, int,
1146 (const pthread_attr_t *attr, int *detachstatep),
1147 _GL_ARG_NONNULL ((1, 2)));
1148_GL_CXXALIAS_RPL (pthread_attr_getdetachstate, int,
1149 (const pthread_attr_t *attr, int *detachstatep));
1150# else
1151# if !1
1152_GL_FUNCDECL_SYS (pthread_attr_getdetachstate, int,
1153 (const pthread_attr_t *attr, int *detachstatep),
1154 _GL_ARG_NONNULL ((1, 2)));
1155# endif
1156_GL_CXXALIAS_SYS (pthread_attr_getdetachstate, int,
1157 (const pthread_attr_t *attr, int *detachstatep));
1158# endif
1159# if __GLIBC__ >= 2
1160_GL_CXXALIASWARN (pthread_attr_getdetachstate);
1161# endif
1162#elif defined GNULIB_POSIXCHECK
1163# undef pthread_attr_getdetachstate
1164# if HAVE_RAW_DECL_PTHREAD_ATTR_GETDETACHSTATE
1165_GL_WARN_ON_USE (pthread_attr_getdetachstate, "pthread_attr_getdetachstate is not portable - "
1166 "use gnulib module pthread-thread for portability");
1167# endif
1168#endif
1169
1170#if 0
1171# if 0
1172# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1173# undef pthread_attr_setdetachstate
1174# define pthread_attr_setdetachstate rpl_pthread_attr_setdetachstate
1175# endif
1176_GL_FUNCDECL_RPL (pthread_attr_setdetachstate, int,
1177 (pthread_attr_t *attr, int detachstate),
1178 _GL_ARG_NONNULL ((1)));
1179_GL_CXXALIAS_RPL (pthread_attr_setdetachstate, int,
1180 (pthread_attr_t *attr, int detachstate));
1181# else
1182# if !1
1183_GL_FUNCDECL_SYS (pthread_attr_setdetachstate, int,
1184 (pthread_attr_t *attr, int detachstate),
1185 _GL_ARG_NONNULL ((1)));
1186# endif
1187_GL_CXXALIAS_SYS (pthread_attr_setdetachstate, int,
1188 (pthread_attr_t *attr, int detachstate));
1189# endif
1190# if __GLIBC__ >= 2
1191_GL_CXXALIASWARN (pthread_attr_setdetachstate);
1192# endif
1193#elif defined GNULIB_POSIXCHECK
1194# undef pthread_attr_setdetachstate
1195# if HAVE_RAW_DECL_PTHREAD_ATTR_SETDETACHSTATE
1196_GL_WARN_ON_USE (pthread_attr_setdetachstate, "pthread_attr_setdetachstate is not portable - "
1197 "use gnulib module pthread-thread for portability");
1198# endif
1199#endif
1200
1201#if 0
1202# if 0
1203# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1204# undef pthread_attr_destroy
1205# define pthread_attr_destroy rpl_pthread_attr_destroy
1206# endif
1207_GL_FUNCDECL_RPL (pthread_attr_destroy, int, (pthread_attr_t *attr),
1208 _GL_ARG_NONNULL ((1)));
1209_GL_CXXALIAS_RPL (pthread_attr_destroy, int, (pthread_attr_t *attr));
1210# else
1211# if !1
1212_GL_FUNCDECL_SYS (pthread_attr_destroy, int, (pthread_attr_t *attr),
1213 _GL_ARG_NONNULL ((1)));
1214# endif
1215_GL_CXXALIAS_SYS (pthread_attr_destroy, int, (pthread_attr_t *attr));
1216# endif
1217# if __GLIBC__ >= 2
1218_GL_CXXALIASWARN (pthread_attr_destroy);
1219# endif
1220#elif defined GNULIB_POSIXCHECK
1221# undef pthread_attr_destroy
1222# if HAVE_RAW_DECL_PTHREAD_ATTR_DESTROY
1223_GL_WARN_ON_USE (pthread_attr_destroy, "pthread_attr_destroy is not portable - "
1224 "use gnulib module pthread-thread for portability");
1225# endif
1226#endif
1227
1228#if 0
1229# if 0
1230# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1231# undef pthread_self
1232# define pthread_self rpl_pthread_self
1233# endif
1234_GL_FUNCDECL_RPL (pthread_self, pthread_t, (void), _GL_ATTRIBUTE_PURE);
1235_GL_CXXALIAS_RPL (pthread_self, pthread_t, (void));
1236# else
1237# if !1
1238_GL_FUNCDECL_SYS (pthread_self, pthread_t, (void), _GL_ATTRIBUTE_PURE);
1239# endif
1240_GL_CXXALIAS_SYS (pthread_self, pthread_t, (void));
1241# endif
1242# if __GLIBC__ >= 2
1243_GL_CXXALIASWARN (pthread_self);
1244# endif
1245#elif defined GNULIB_POSIXCHECK
1246# undef pthread_self
1247# if HAVE_RAW_DECL_PTHREAD_SELF
1248_GL_WARN_ON_USE (pthread_self, "pthread_self is not portable - "
1249 "use gnulib module pthread-thread for portability");
1250# endif
1251#endif
1252
1253#if 0
1254# if 0
1255# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1256# undef pthread_equal
1257# define pthread_equal rpl_pthread_equal
1258# endif
1259_GL_FUNCDECL_RPL (pthread_equal, int, (pthread_t thread1, pthread_t thread2), );
1260_GL_CXXALIAS_RPL (pthread_equal, int, (pthread_t thread1, pthread_t thread2));
1261# else
1262# if !1
1263_GL_FUNCDECL_SYS (pthread_equal, int, (pthread_t thread1, pthread_t thread2), );
1264# endif
1265_GL_CXXALIAS_SYS (pthread_equal, int, (pthread_t thread1, pthread_t thread2));
1266# endif
1267# if __GLIBC__ >= 2
1268_GL_CXXALIASWARN (pthread_equal);
1269# endif
1270#elif defined GNULIB_POSIXCHECK
1271# undef pthread_equal
1272# if HAVE_RAW_DECL_PTHREAD_EQUAL
1273_GL_WARN_ON_USE (pthread_equal, "pthread_equal is not portable - "
1274 "use gnulib module pthread-thread for portability");
1275# endif
1276#endif
1277
1278#if 0
1279# if 0
1280# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1281# undef pthread_detach
1282# define pthread_detach rpl_pthread_detach
1283# endif
1284_GL_FUNCDECL_RPL (pthread_detach, int, (pthread_t thread), );
1285_GL_CXXALIAS_RPL (pthread_detach, int, (pthread_t thread));
1286# else
1287# if !1
1288_GL_FUNCDECL_SYS (pthread_detach, int, (pthread_t thread), );
1289# endif
1290_GL_CXXALIAS_SYS (pthread_detach, int, (pthread_t thread));
1291# endif
1292# if __GLIBC__ >= 2
1293_GL_CXXALIASWARN (pthread_detach);
1294# endif
1295#elif defined GNULIB_POSIXCHECK
1296# undef pthread_detach
1297# if HAVE_RAW_DECL_PTHREAD_DETACH
1298_GL_WARN_ON_USE (pthread_detach, "pthread_detach is not portable - "
1299 "use gnulib module pthread-thread for portability");
1300# endif
1301#endif
1302
1303#if 0
1304# if 0
1305# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1306# undef pthread_join
1307# define pthread_join rpl_pthread_join
1308# endif
1309_GL_FUNCDECL_RPL (pthread_join, int, (pthread_t thread, void **valuep), );
1310_GL_CXXALIAS_RPL (pthread_join, int, (pthread_t thread, void **valuep));
1311# else
1312# if !1
1313_GL_FUNCDECL_SYS (pthread_join, int, (pthread_t thread, void **valuep), );
1314# endif
1315_GL_CXXALIAS_SYS (pthread_join, int, (pthread_t thread, void **valuep));
1316# endif
1317# if __GLIBC__ >= 2
1318_GL_CXXALIASWARN (pthread_join);
1319# endif
1320#elif defined GNULIB_POSIXCHECK
1321# undef pthread_join
1322# if HAVE_RAW_DECL_PTHREAD_JOIN
1323_GL_WARN_ON_USE (pthread_join, "pthread_join is not portable - "
1324 "use gnulib module pthread-thread for portability");
1325# endif
1326#endif
1327
1328#if 0
1329# if 0
1330# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1331# undef pthread_exit
1332# define pthread_exit rpl_pthread_exit
1333# endif
1334_GL_FUNCDECL_RPL (pthread_exit, _Noreturn void, (void *value), );
1335_GL_CXXALIAS_RPL (pthread_exit, void, (void *value));
1336# else
1337# if !1
1338_GL_FUNCDECL_SYS (pthread_exit, _Noreturn void, (void *value), );
1339# endif
1340/* Need to cast because of AIX with xlclang++. */
1341_GL_CXXALIAS_SYS_CAST (pthread_exit, void, (void *value));
1342# endif
1343# if __GLIBC__ >= 2
1344_GL_CXXALIASWARN (pthread_exit);
1345# endif
1346#elif defined GNULIB_POSIXCHECK
1347# undef pthread_exit
1348# if HAVE_RAW_DECL_PTHREAD_EXIT
1349_GL_WARN_ON_USE (pthread_exit, "pthread_exit is not portable - "
1350 "use gnulib module pthread-thread for portability");
1351# endif
1352#endif
1353
1354/* =========== Once-only control (initialization) functions =========== */
1355
1356#if 1
1357# if 0
1358# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1359# undef pthread_once
1360# define pthread_once rpl_pthread_once
1361# endif
1362_GL_FUNCDECL_RPL (pthread_once, int,
1363 (pthread_once_t *once_control, void (*initfunction) (void)),
1364 _GL_ARG_NONNULL ((1, 2)));
1365_GL_CXXALIAS_RPL (pthread_once, int,
1366 (pthread_once_t *once_control, void (*initfunction) (void)));
1367# else
1368# if !1
1369_GL_FUNCDECL_SYS (pthread_once, int,
1370 (pthread_once_t *once_control, void (*initfunction) (void)),
1371 _GL_ARG_NONNULL ((1, 2)));
1372# endif
1373_GL_CXXALIAS_SYS_CAST (pthread_once, int,
1374 (pthread_once_t *once_control,
1375 void (*initfunction) (void)));
1376# endif
1377# if __GLIBC__ >= 2
1378_GL_CXXALIASWARN (pthread_once);
1379# endif
1380#elif defined GNULIB_POSIXCHECK
1381# undef pthread_once
1382# if HAVE_RAW_DECL_PTHREAD_ONCE
1383_GL_WARN_ON_USE (pthread_once, "pthread_once is not portable - "
1384 "use gnulib module pthread-once for portability");
1385# endif
1386#endif
1387
1388/* =========== Mutex functions =========== */
1389
1390#if 0
1391# if 0
1392# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1393# undef pthread_mutex_init
1394# define pthread_mutex_init rpl_pthread_mutex_init
1395# endif
1396_GL_FUNCDECL_RPL (pthread_mutex_init, int,
1397 (pthread_mutex_t *restrict mutex,
1398 const pthread_mutexattr_t *restrict attr),
1399 _GL_ARG_NONNULL ((1)));
1400_GL_CXXALIAS_RPL (pthread_mutex_init, int,
1401 (pthread_mutex_t *restrict mutex,
1402 const pthread_mutexattr_t *restrict attr));
1403# else
1404# if !1
1405_GL_FUNCDECL_SYS (pthread_mutex_init, int,
1406 (pthread_mutex_t *restrict mutex,
1407 const pthread_mutexattr_t *restrict attr),
1408 _GL_ARG_NONNULL ((1)));
1409# endif
1410_GL_CXXALIAS_SYS (pthread_mutex_init, int,
1411 (pthread_mutex_t *restrict mutex,
1412 const pthread_mutexattr_t *restrict attr));
1413# endif
1414# if __GLIBC__ >= 2
1415_GL_CXXALIASWARN (pthread_mutex_init);
1416# endif
1417#elif defined GNULIB_POSIXCHECK
1418# undef pthread_mutex_init
1419# if HAVE_RAW_DECL_PTHREAD_MUTEX_INIT
1420_GL_WARN_ON_USE (pthread_mutex_init, "pthread_mutex_init is not portable - "
1421 "use gnulib module pthread-mutex for portability");
1422# endif
1423#endif
1424
1425#if 0
1426# if 0
1427# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1428# undef pthread_mutexattr_init
1429# define pthread_mutexattr_init rpl_pthread_mutexattr_init
1430# endif
1431_GL_FUNCDECL_RPL (pthread_mutexattr_init, int, (pthread_mutexattr_t *attr),
1432 _GL_ARG_NONNULL ((1)));
1433_GL_CXXALIAS_RPL (pthread_mutexattr_init, int, (pthread_mutexattr_t *attr));
1434# else
1435# if !1
1436_GL_FUNCDECL_SYS (pthread_mutexattr_init, int, (pthread_mutexattr_t *attr),
1437 _GL_ARG_NONNULL ((1)));
1438# endif
1439_GL_CXXALIAS_SYS (pthread_mutexattr_init, int, (pthread_mutexattr_t *attr));
1440# endif
1441# if __GLIBC__ >= 2
1442_GL_CXXALIASWARN (pthread_mutexattr_init);
1443# endif
1444#elif defined GNULIB_POSIXCHECK
1445# undef pthread_mutexattr_init
1446# if HAVE_RAW_DECL_PTHREAD_MUTEXATTR_INIT
1447_GL_WARN_ON_USE (pthread_mutexattr_init, "pthread_mutexattr_init is not portable - "
1448 "use gnulib module pthread-mutex for portability");
1449# endif
1450#endif
1451
1452#if 0
1453# if 0
1454# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1455# undef pthread_mutexattr_gettype
1456# define pthread_mutexattr_gettype rpl_pthread_mutexattr_gettype
1457# endif
1458_GL_FUNCDECL_RPL (pthread_mutexattr_gettype, int,
1459 (const pthread_mutexattr_t *restrict attr,
1460 int *restrict typep),
1461 _GL_ARG_NONNULL ((1, 2)));
1462_GL_CXXALIAS_RPL (pthread_mutexattr_gettype, int,
1463 (const pthread_mutexattr_t *restrict attr,
1464 int *restrict typep));
1465# else
1466# if !1
1467_GL_FUNCDECL_SYS (pthread_mutexattr_gettype, int,
1468 (const pthread_mutexattr_t *restrict attr,
1469 int *restrict typep),
1470 _GL_ARG_NONNULL ((1, 2)));
1471# endif
1472/* Need to cast, because on FreeBSD the first parameter is
1473 pthread_mutexattr_t *attr. */
1474_GL_CXXALIAS_SYS_CAST (pthread_mutexattr_gettype, int,
1475 (const pthread_mutexattr_t *restrict attr,
1476 int *restrict typep));
1477# endif
1478# if __GLIBC__ >= 2
1479_GL_CXXALIASWARN (pthread_mutexattr_gettype);
1480# endif
1481#elif defined GNULIB_POSIXCHECK
1482# undef pthread_mutexattr_gettype
1483# if HAVE_RAW_DECL_PTHREAD_MUTEXATTR_GETTYPE
1484_GL_WARN_ON_USE (pthread_mutexattr_gettype, "pthread_mutexattr_gettype is not portable - "
1485 "use gnulib module pthread-mutex for portability");
1486# endif
1487#endif
1488
1489#if 0
1490# if 0
1491# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1492# undef pthread_mutexattr_settype
1493# define pthread_mutexattr_settype rpl_pthread_mutexattr_settype
1494# endif
1495_GL_FUNCDECL_RPL (pthread_mutexattr_settype, int,
1496 (pthread_mutexattr_t *attr, int type), _GL_ARG_NONNULL ((1)));
1497_GL_CXXALIAS_RPL (pthread_mutexattr_settype, int,
1498 (pthread_mutexattr_t *attr, int type));
1499# else
1500# if !1
1501_GL_FUNCDECL_SYS (pthread_mutexattr_settype, int,
1502 (pthread_mutexattr_t *attr, int type), _GL_ARG_NONNULL ((1)));
1503# endif
1504_GL_CXXALIAS_SYS (pthread_mutexattr_settype, int,
1505 (pthread_mutexattr_t *attr, int type));
1506# endif
1507# if __GLIBC__ >= 2
1508_GL_CXXALIASWARN (pthread_mutexattr_settype);
1509# endif
1510#elif defined GNULIB_POSIXCHECK
1511# undef pthread_mutexattr_settype
1512# if HAVE_RAW_DECL_PTHREAD_MUTEXATTR_SETTYPE
1513_GL_WARN_ON_USE (pthread_mutexattr_settype, "pthread_mutexattr_settype is not portable - "
1514 "use gnulib module pthread-mutex for portability");
1515# endif
1516#endif
1517
1518#if 0
1519# if 0
1520# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1521# undef pthread_mutexattr_getrobust
1522# define pthread_mutexattr_getrobust rpl_pthread_mutexattr_getrobust
1523# endif
1524_GL_FUNCDECL_RPL (pthread_mutexattr_getrobust, int,
1525 (const pthread_mutexattr_t *restrict attr,
1526 int *restrict robustp),
1527 _GL_ARG_NONNULL ((1, 2)));
1528_GL_CXXALIAS_RPL (pthread_mutexattr_getrobust, int,
1529 (const pthread_mutexattr_t *restrict attr,
1530 int *restrict robustp));
1531# else
1532# if !1
1533_GL_FUNCDECL_SYS (pthread_mutexattr_getrobust, int,
1534 (const pthread_mutexattr_t *restrict attr,
1535 int *restrict robustp),
1536 _GL_ARG_NONNULL ((1, 2)));
1537# endif
1538/* Need to cast, because on FreeBSD the first parameter is
1539 pthread_mutexattr_t *attr. */
1540_GL_CXXALIAS_SYS_CAST (pthread_mutexattr_getrobust, int,
1541 (const pthread_mutexattr_t *restrict attr,
1542 int *restrict robustp));
1543# endif
1544# if __GLIBC__ >= 2
1545_GL_CXXALIASWARN (pthread_mutexattr_getrobust);
1546# endif
1547#elif defined GNULIB_POSIXCHECK
1548# undef pthread_mutexattr_getrobust
1549# if HAVE_RAW_DECL_PTHREAD_MUTEXATTR_GETROBUST
1550_GL_WARN_ON_USE (pthread_mutexattr_getrobust, "pthread_mutexattr_getrobust is not portable - "
1551 "use gnulib module pthread-mutex for portability");
1552# endif
1553#endif
1554
1555#if 0
1556# if 0
1557# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1558# undef pthread_mutexattr_setrobust
1559# define pthread_mutexattr_setrobust rpl_pthread_mutexattr_setrobust
1560# endif
1561_GL_FUNCDECL_RPL (pthread_mutexattr_setrobust, int,
1562 (pthread_mutexattr_t *attr, int robust),
1563 _GL_ARG_NONNULL ((1)));
1564_GL_CXXALIAS_RPL (pthread_mutexattr_setrobust, int,
1565 (pthread_mutexattr_t *attr, int robust));
1566# else
1567# if !1
1568_GL_FUNCDECL_SYS (pthread_mutexattr_setrobust, int,
1569 (pthread_mutexattr_t *attr, int robust),
1570 _GL_ARG_NONNULL ((1)));
1571# endif
1572_GL_CXXALIAS_SYS (pthread_mutexattr_setrobust, int,
1573 (pthread_mutexattr_t *attr, int robust));
1574# endif
1575# if __GLIBC__ >= 2
1576_GL_CXXALIASWARN (pthread_mutexattr_setrobust);
1577# endif
1578#elif defined GNULIB_POSIXCHECK
1579# undef pthread_mutexattr_setrobust
1580# if HAVE_RAW_DECL_PTHREAD_MUTEXATTR_SETROBUST
1581_GL_WARN_ON_USE (pthread_mutexattr_setrobust, "pthread_mutexattr_setrobust is not portable - "
1582 "use gnulib module pthread-mutex for portability");
1583# endif
1584#endif
1585
1586#if 0
1587# if 0
1588# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1589# undef pthread_mutexattr_destroy
1590# define pthread_mutexattr_destroy rpl_pthread_mutexattr_destroy
1591# endif
1592_GL_FUNCDECL_RPL (pthread_mutexattr_destroy, int, (pthread_mutexattr_t *attr),
1593 _GL_ARG_NONNULL ((1)));
1594_GL_CXXALIAS_RPL (pthread_mutexattr_destroy, int, (pthread_mutexattr_t *attr));
1595# else
1596# if !1
1597_GL_FUNCDECL_SYS (pthread_mutexattr_destroy, int, (pthread_mutexattr_t *attr),
1598 _GL_ARG_NONNULL ((1)));
1599# endif
1600_GL_CXXALIAS_SYS (pthread_mutexattr_destroy, int, (pthread_mutexattr_t *attr));
1601# endif
1602# if __GLIBC__ >= 2
1603_GL_CXXALIASWARN (pthread_mutexattr_destroy);
1604# endif
1605#elif defined GNULIB_POSIXCHECK
1606# undef pthread_mutexattr_destroy
1607# if HAVE_RAW_DECL_PTHREAD_MUTEXATTR_DESTROY
1608_GL_WARN_ON_USE (pthread_mutexattr_destroy, "pthread_mutexattr_destroy is not portable - "
1609 "use gnulib module pthread-mutex for portability");
1610# endif
1611#endif
1612
1613#if 0
1614# if 0
1615# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1616# undef pthread_mutex_lock
1617# define pthread_mutex_lock rpl_pthread_mutex_lock
1618# endif
1619_GL_FUNCDECL_RPL (pthread_mutex_lock, int, (pthread_mutex_t *mutex),
1620 _GL_ARG_NONNULL ((1)));
1621_GL_CXXALIAS_RPL (pthread_mutex_lock, int, (pthread_mutex_t *mutex));
1622# else
1623# if !1
1624_GL_FUNCDECL_SYS (pthread_mutex_lock, int, (pthread_mutex_t *mutex),
1625 _GL_ARG_NONNULL ((1)));
1626# endif
1627_GL_CXXALIAS_SYS (pthread_mutex_lock, int, (pthread_mutex_t *mutex));
1628# endif
1629# if __GLIBC__ >= 2
1630_GL_CXXALIASWARN (pthread_mutex_lock);
1631# endif
1632#elif defined GNULIB_POSIXCHECK
1633# undef pthread_mutex_lock
1634# if HAVE_RAW_DECL_PTHREAD_MUTEX_LOCK
1635_GL_WARN_ON_USE (pthread_mutex_lock, "pthread_mutex_lock is not portable - "
1636 "use gnulib module pthread-mutex for portability");
1637# endif
1638#endif
1639
1640#if 0
1641# if 0
1642# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1643# undef pthread_mutex_trylock
1644# define pthread_mutex_trylock rpl_pthread_mutex_trylock
1645# endif
1646_GL_FUNCDECL_RPL (pthread_mutex_trylock, int, (pthread_mutex_t *mutex),
1647 _GL_ARG_NONNULL ((1)));
1648_GL_CXXALIAS_RPL (pthread_mutex_trylock, int, (pthread_mutex_t *mutex));
1649# else
1650# if !1
1651_GL_FUNCDECL_SYS (pthread_mutex_trylock, int, (pthread_mutex_t *mutex),
1652 _GL_ARG_NONNULL ((1)));
1653# endif
1654_GL_CXXALIAS_SYS (pthread_mutex_trylock, int, (pthread_mutex_t *mutex));
1655# endif
1656# if __GLIBC__ >= 2
1657_GL_CXXALIASWARN (pthread_mutex_trylock);
1658# endif
1659#elif defined GNULIB_POSIXCHECK
1660# undef pthread_mutex_trylock
1661# if HAVE_RAW_DECL_PTHREAD_MUTEX_TRYLOCK
1662_GL_WARN_ON_USE (pthread_mutex_trylock, "pthread_mutex_trylock is not portable - "
1663 "use gnulib module pthread-mutex for portability");
1664# endif
1665#endif
1666
1667#if 0
1668# if 0
1669# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1670# undef pthread_mutex_timedlock
1671# define pthread_mutex_timedlock rpl_pthread_mutex_timedlock
1672# endif
1673_GL_FUNCDECL_RPL (pthread_mutex_timedlock, int,
1674 (pthread_mutex_t *restrict mutex,
1675 const struct timespec *restrict abstime),
1676 _GL_ARG_NONNULL ((1, 2)));
1677_GL_CXXALIAS_RPL (pthread_mutex_timedlock, int,
1678 (pthread_mutex_t *restrict mutex,
1679 const struct timespec *restrict abstime));
1680# else
1681# if !1
1682_GL_FUNCDECL_SYS (pthread_mutex_timedlock, int,
1683 (pthread_mutex_t *restrict mutex,
1684 const struct timespec *restrict abstime),
1685 _GL_ARG_NONNULL ((1, 2)));
1686# endif
1687_GL_CXXALIAS_SYS (pthread_mutex_timedlock, int,
1688 (pthread_mutex_t *restrict mutex,
1689 const struct timespec *restrict abstime));
1690# endif
1691# if __GLIBC__ >= 2
1692_GL_CXXALIASWARN (pthread_mutex_timedlock);
1693# endif
1694#elif defined GNULIB_POSIXCHECK
1695# undef pthread_mutex_timedlock
1696# if HAVE_RAW_DECL_PTHREAD_MUTEX_TIMEDLOCK
1697_GL_WARN_ON_USE (pthread_mutex_timedlock, "pthread_mutex_timedlock is not portable - "
1698 "use gnulib module pthread_mutex_timedlock for portability");
1699# endif
1700#endif
1701
1702#if 0
1703# if 0
1704# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1705# undef pthread_mutex_unlock
1706# define pthread_mutex_unlock rpl_pthread_mutex_unlock
1707# endif
1708_GL_FUNCDECL_RPL (pthread_mutex_unlock, int, (pthread_mutex_t *mutex),
1709 _GL_ARG_NONNULL ((1)));
1710_GL_CXXALIAS_RPL (pthread_mutex_unlock, int, (pthread_mutex_t *mutex));
1711# else
1712# if !1
1713_GL_FUNCDECL_SYS (pthread_mutex_unlock, int, (pthread_mutex_t *mutex),
1714 _GL_ARG_NONNULL ((1)));
1715# endif
1716_GL_CXXALIAS_SYS (pthread_mutex_unlock, int, (pthread_mutex_t *mutex));
1717# endif
1718# if __GLIBC__ >= 2
1719_GL_CXXALIASWARN (pthread_mutex_unlock);
1720# endif
1721#elif defined GNULIB_POSIXCHECK
1722# undef pthread_mutex_unlock
1723# if HAVE_RAW_DECL_PTHREAD_MUTEX_UNLOCK
1724_GL_WARN_ON_USE (pthread_mutex_unlock, "pthread_mutex_unlock is not portable - "
1725 "use gnulib module pthread-mutex for portability");
1726# endif
1727#endif
1728
1729#if 0
1730# if 0
1731# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1732# undef pthread_mutex_destroy
1733# define pthread_mutex_destroy rpl_pthread_mutex_destroy
1734# endif
1735_GL_FUNCDECL_RPL (pthread_mutex_destroy, int, (pthread_mutex_t *mutex),
1736 _GL_ARG_NONNULL ((1)));
1737_GL_CXXALIAS_RPL (pthread_mutex_destroy, int, (pthread_mutex_t *mutex));
1738# else
1739# if !1
1740_GL_FUNCDECL_SYS (pthread_mutex_destroy, int, (pthread_mutex_t *mutex),
1741 _GL_ARG_NONNULL ((1)));
1742# endif
1743_GL_CXXALIAS_SYS (pthread_mutex_destroy, int, (pthread_mutex_t *mutex));
1744# endif
1745# if __GLIBC__ >= 2
1746_GL_CXXALIASWARN (pthread_mutex_destroy);
1747# endif
1748#elif defined GNULIB_POSIXCHECK
1749# undef pthread_mutex_destroy
1750# if HAVE_RAW_DECL_PTHREAD_MUTEX_DESTROY
1751_GL_WARN_ON_USE (pthread_mutex_destroy, "pthread_mutex_destroy is not portable - "
1752 "use gnulib module pthread-mutex for portability");
1753# endif
1754#endif
1755
1756/* =========== Read-write lock functions =========== */
1757
1758#if 0
1759# if 0
1760# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1761# undef pthread_rwlock_init
1762# define pthread_rwlock_init rpl_pthread_rwlock_init
1763# endif
1764_GL_FUNCDECL_RPL (pthread_rwlock_init, int,
1765 (pthread_rwlock_t *restrict lock,
1766 const pthread_rwlockattr_t *restrict attr),
1767 _GL_ARG_NONNULL ((1)));
1768_GL_CXXALIAS_RPL (pthread_rwlock_init, int,
1769 (pthread_rwlock_t *restrict lock,
1770 const pthread_rwlockattr_t *restrict attr));
1771# else
1772# if !1
1773_GL_FUNCDECL_SYS (pthread_rwlock_init, int,
1774 (pthread_rwlock_t *restrict lock,
1775 const pthread_rwlockattr_t *restrict attr),
1776 _GL_ARG_NONNULL ((1)));
1777# endif
1778_GL_CXXALIAS_SYS (pthread_rwlock_init, int,
1779 (pthread_rwlock_t *restrict lock,
1780 const pthread_rwlockattr_t *restrict attr));
1781# endif
1782# if __GLIBC__ >= 2
1783_GL_CXXALIASWARN (pthread_rwlock_init);
1784# endif
1785#elif defined GNULIB_POSIXCHECK
1786# undef pthread_rwlock_init
1787# if HAVE_RAW_DECL_PTHREAD_RWLOCK_INIT
1788_GL_WARN_ON_USE (pthread_rwlock_init, "pthread_rwlock_init is not portable - "
1789 "use gnulib module pthread-rwlock for portability");
1790# endif
1791#endif
1792
1793#if 0
1794# if 0
1795# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1796# undef pthread_rwlockattr_init
1797# define pthread_rwlockattr_init rpl_pthread_rwlockattr_init
1798# endif
1799_GL_FUNCDECL_RPL (pthread_rwlockattr_init, int, (pthread_rwlockattr_t *attr),
1800 _GL_ARG_NONNULL ((1)));
1801_GL_CXXALIAS_RPL (pthread_rwlockattr_init, int, (pthread_rwlockattr_t *attr));
1802# else
1803# if !1
1804_GL_FUNCDECL_SYS (pthread_rwlockattr_init, int, (pthread_rwlockattr_t *attr),
1805 _GL_ARG_NONNULL ((1)));
1806# endif
1807_GL_CXXALIAS_SYS (pthread_rwlockattr_init, int, (pthread_rwlockattr_t *attr));
1808# endif
1809# if __GLIBC__ >= 2
1810_GL_CXXALIASWARN (pthread_rwlockattr_init);
1811# endif
1812#elif defined GNULIB_POSIXCHECK
1813# undef pthread_rwlockattr_init
1814# if HAVE_RAW_DECL_PTHREAD_RWLOCKATTR_INIT
1815_GL_WARN_ON_USE (pthread_rwlockattr_init, "pthread_rwlockattr_init is not portable - "
1816 "use gnulib module pthread-rwlock for portability");
1817# endif
1818#endif
1819
1820#if 0
1821# if 0
1822# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1823# undef pthread_rwlockattr_destroy
1824# define pthread_rwlockattr_destroy rpl_pthread_rwlockattr_destroy
1825# endif
1826_GL_FUNCDECL_RPL (pthread_rwlockattr_destroy, int,
1827 (pthread_rwlockattr_t *attr), _GL_ARG_NONNULL ((1)));
1828_GL_CXXALIAS_RPL (pthread_rwlockattr_destroy, int,
1829 (pthread_rwlockattr_t *attr));
1830# else
1831# if !1
1832_GL_FUNCDECL_SYS (pthread_rwlockattr_destroy, int,
1833 (pthread_rwlockattr_t *attr), _GL_ARG_NONNULL ((1)));
1834# endif
1835_GL_CXXALIAS_SYS (pthread_rwlockattr_destroy, int,
1836 (pthread_rwlockattr_t *attr));
1837# endif
1838# if __GLIBC__ >= 2
1839_GL_CXXALIASWARN (pthread_rwlockattr_destroy);
1840# endif
1841#elif defined GNULIB_POSIXCHECK
1842# undef pthread_rwlockattr_destroy
1843# if HAVE_RAW_DECL_PTHREAD_RWLOCKATTR_DESTROY
1844_GL_WARN_ON_USE (pthread_rwlockattr_destroy, "pthread_rwlockattr_destroy is not portable - "
1845 "use gnulib module pthread-rwlock for portability");
1846# endif
1847#endif
1848
1849#if 0
1850# if 0
1851# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1852# undef pthread_rwlock_rdlock
1853# define pthread_rwlock_rdlock rpl_pthread_rwlock_rdlock
1854# endif
1855_GL_FUNCDECL_RPL (pthread_rwlock_rdlock, int, (pthread_rwlock_t *lock),
1856 _GL_ARG_NONNULL ((1)));
1857_GL_CXXALIAS_RPL (pthread_rwlock_rdlock, int, (pthread_rwlock_t *lock));
1858# else
1859# if !1
1860_GL_FUNCDECL_SYS (pthread_rwlock_rdlock, int, (pthread_rwlock_t *lock),
1861 _GL_ARG_NONNULL ((1)));
1862# endif
1863_GL_CXXALIAS_SYS (pthread_rwlock_rdlock, int, (pthread_rwlock_t *lock));
1864# endif
1865# if __GLIBC__ >= 2
1866_GL_CXXALIASWARN (pthread_rwlock_rdlock);
1867# endif
1868#elif defined GNULIB_POSIXCHECK
1869# undef pthread_rwlock_rdlock
1870# if HAVE_RAW_DECL_PTHREAD_RWLOCK_RDLOCK
1871_GL_WARN_ON_USE (pthread_rwlock_rdlock, "pthread_rwlock_rdlock is not portable - "
1872 "use gnulib module pthread-rwlock for portability");
1873# endif
1874#endif
1875
1876#if 0
1877# if 0
1878# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1879# undef pthread_rwlock_wrlock
1880# define pthread_rwlock_wrlock rpl_pthread_rwlock_wrlock
1881# endif
1882_GL_FUNCDECL_RPL (pthread_rwlock_wrlock, int, (pthread_rwlock_t *lock),
1883 _GL_ARG_NONNULL ((1)));
1884_GL_CXXALIAS_RPL (pthread_rwlock_wrlock, int, (pthread_rwlock_t *lock));
1885# else
1886# if !1
1887_GL_FUNCDECL_SYS (pthread_rwlock_wrlock, int, (pthread_rwlock_t *lock),
1888 _GL_ARG_NONNULL ((1)));
1889# endif
1890_GL_CXXALIAS_SYS (pthread_rwlock_wrlock, int, (pthread_rwlock_t *lock));
1891# endif
1892# if __GLIBC__ >= 2
1893_GL_CXXALIASWARN (pthread_rwlock_wrlock);
1894# endif
1895#elif defined GNULIB_POSIXCHECK
1896# undef pthread_rwlock_wrlock
1897# if HAVE_RAW_DECL_PTHREAD_RWLOCK_WRLOCK
1898_GL_WARN_ON_USE (pthread_rwlock_wrlock, "pthread_rwlock_wrlock is not portable - "
1899 "use gnulib module pthread-rwlock for portability");
1900# endif
1901#endif
1902
1903#if 0
1904# if 0
1905# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1906# undef pthread_rwlock_tryrdlock
1907# define pthread_rwlock_tryrdlock rpl_pthread_rwlock_tryrdlock
1908# endif
1909_GL_FUNCDECL_RPL (pthread_rwlock_tryrdlock, int, (pthread_rwlock_t *lock),
1910 _GL_ARG_NONNULL ((1)));
1911_GL_CXXALIAS_RPL (pthread_rwlock_tryrdlock, int, (pthread_rwlock_t *lock));
1912# else
1913# if !1
1914_GL_FUNCDECL_SYS (pthread_rwlock_tryrdlock, int, (pthread_rwlock_t *lock),
1915 _GL_ARG_NONNULL ((1)));
1916# endif
1917_GL_CXXALIAS_SYS (pthread_rwlock_tryrdlock, int, (pthread_rwlock_t *lock));
1918# endif
1919# if __GLIBC__ >= 2
1920_GL_CXXALIASWARN (pthread_rwlock_tryrdlock);
1921# endif
1922#elif defined GNULIB_POSIXCHECK
1923# undef pthread_rwlock_tryrdlock
1924# if HAVE_RAW_DECL_PTHREAD_RWLOCK_TRYRDLOCK
1925_GL_WARN_ON_USE (pthread_rwlock_tryrdlock, "pthread_rwlock_tryrdlock is not portable - "
1926 "use gnulib module pthread-rwlock for portability");
1927# endif
1928#endif
1929
1930#if 0
1931# if 0
1932# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1933# undef pthread_rwlock_trywrlock
1934# define pthread_rwlock_trywrlock rpl_pthread_rwlock_trywrlock
1935# endif
1936_GL_FUNCDECL_RPL (pthread_rwlock_trywrlock, int, (pthread_rwlock_t *lock),
1937 _GL_ARG_NONNULL ((1)));
1938_GL_CXXALIAS_RPL (pthread_rwlock_trywrlock, int, (pthread_rwlock_t *lock));
1939# else
1940# if !1
1941_GL_FUNCDECL_SYS (pthread_rwlock_trywrlock, int, (pthread_rwlock_t *lock),
1942 _GL_ARG_NONNULL ((1)));
1943# endif
1944_GL_CXXALIAS_SYS (pthread_rwlock_trywrlock, int, (pthread_rwlock_t *lock));
1945# endif
1946# if __GLIBC__ >= 2
1947_GL_CXXALIASWARN (pthread_rwlock_trywrlock);
1948# endif
1949#elif defined GNULIB_POSIXCHECK
1950# undef pthread_rwlock_trywrlock
1951# if HAVE_RAW_DECL_PTHREAD_RWLOCK_TRYWRLOCK
1952_GL_WARN_ON_USE (pthread_rwlock_trywrlock, "pthread_rwlock_trywrlock is not portable - "
1953 "use gnulib module pthread-rwlock for portability");
1954# endif
1955#endif
1956
1957#if 0
1958# if 0
1959# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1960# undef pthread_rwlock_timedrdlock
1961# define pthread_rwlock_timedrdlock rpl_pthread_rwlock_timedrdlock
1962# endif
1963_GL_FUNCDECL_RPL (pthread_rwlock_timedrdlock, int,
1964 (pthread_rwlock_t *restrict lock,
1965 const struct timespec *restrict abstime),
1966 _GL_ARG_NONNULL ((1, 2)));
1967_GL_CXXALIAS_RPL (pthread_rwlock_timedrdlock, int,
1968 (pthread_rwlock_t *restrict lock,
1969 const struct timespec *restrict abstime));
1970# else
1971# if !1
1972_GL_FUNCDECL_SYS (pthread_rwlock_timedrdlock, int,
1973 (pthread_rwlock_t *restrict lock,
1974 const struct timespec *restrict abstime),
1975 _GL_ARG_NONNULL ((1, 2)));
1976# endif
1977_GL_CXXALIAS_SYS (pthread_rwlock_timedrdlock, int,
1978 (pthread_rwlock_t *restrict lock,
1979 const struct timespec *restrict abstime));
1980# endif
1981# if __GLIBC__ >= 2
1982_GL_CXXALIASWARN (pthread_rwlock_timedrdlock);
1983# endif
1984#elif defined GNULIB_POSIXCHECK
1985# undef pthread_rwlock_timedrdlock
1986# if HAVE_RAW_DECL_PTHREAD_RWLOCK_TIMEDRDLOCK
1987_GL_WARN_ON_USE (pthread_rwlock_timedrdlock, "pthread_rwlock_timedrdlock is not portable - "
1988 "use gnulib module pthread-rwlock for portability");
1989# endif
1990#endif
1991
1992#if 0
1993# if 0
1994# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1995# undef pthread_rwlock_timedwrlock
1996# define pthread_rwlock_timedwrlock rpl_pthread_rwlock_timedwrlock
1997# endif
1998_GL_FUNCDECL_RPL (pthread_rwlock_timedwrlock, int,
1999 (pthread_rwlock_t *restrict lock,
2000 const struct timespec *restrict abstime),
2001 _GL_ARG_NONNULL ((1, 2)));
2002_GL_CXXALIAS_RPL (pthread_rwlock_timedwrlock, int,
2003 (pthread_rwlock_t *restrict lock,
2004 const struct timespec *restrict abstime));
2005# else
2006# if !1
2007_GL_FUNCDECL_SYS (pthread_rwlock_timedwrlock, int,
2008 (pthread_rwlock_t *restrict lock,
2009 const struct timespec *restrict abstime),
2010 _GL_ARG_NONNULL ((1, 2)));
2011# endif
2012_GL_CXXALIAS_SYS (pthread_rwlock_timedwrlock, int,
2013 (pthread_rwlock_t *restrict lock,
2014 const struct timespec *restrict abstime));
2015# endif
2016# if __GLIBC__ >= 2
2017_GL_CXXALIASWARN (pthread_rwlock_timedwrlock);
2018# endif
2019#elif defined GNULIB_POSIXCHECK
2020# undef pthread_rwlock_timedwrlock
2021# if HAVE_RAW_DECL_PTHREAD_RWLOCK_TIMEDWRLOCK
2022_GL_WARN_ON_USE (pthread_rwlock_timedwrlock, "pthread_rwlock_timedwrlock is not portable - "
2023 "use gnulib module pthread-rwlock for portability");
2024# endif
2025#endif
2026
2027#if 0
2028# if 0
2029# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2030# undef pthread_rwlock_unlock
2031# define pthread_rwlock_unlock rpl_pthread_rwlock_unlock
2032# endif
2033_GL_FUNCDECL_RPL (pthread_rwlock_unlock, int, (pthread_rwlock_t *lock),
2034 _GL_ARG_NONNULL ((1)));
2035_GL_CXXALIAS_RPL (pthread_rwlock_unlock, int, (pthread_rwlock_t *lock));
2036# else
2037# if !1
2038_GL_FUNCDECL_SYS (pthread_rwlock_unlock, int, (pthread_rwlock_t *lock),
2039 _GL_ARG_NONNULL ((1)));
2040# endif
2041_GL_CXXALIAS_SYS (pthread_rwlock_unlock, int, (pthread_rwlock_t *lock));
2042# endif
2043# if __GLIBC__ >= 2
2044_GL_CXXALIASWARN (pthread_rwlock_unlock);
2045# endif
2046#elif defined GNULIB_POSIXCHECK
2047# undef pthread_rwlock_unlock
2048# if HAVE_RAW_DECL_PTHREAD_RWLOCK_UNLOCK
2049_GL_WARN_ON_USE (pthread_rwlock_unlock, "pthread_rwlock_unlock is not portable - "
2050 "use gnulib module pthread-rwlock for portability");
2051# endif
2052#endif
2053
2054#if 0
2055# if 0
2056# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2057# undef pthread_rwlock_destroy
2058# define pthread_rwlock_destroy rpl_pthread_rwlock_destroy
2059# endif
2060_GL_FUNCDECL_RPL (pthread_rwlock_destroy, int, (pthread_rwlock_t *lock),
2061 _GL_ARG_NONNULL ((1)));
2062_GL_CXXALIAS_RPL (pthread_rwlock_destroy, int, (pthread_rwlock_t *lock));
2063# else
2064# if !1
2065_GL_FUNCDECL_SYS (pthread_rwlock_destroy, int, (pthread_rwlock_t *lock),
2066 _GL_ARG_NONNULL ((1)));
2067# endif
2068_GL_CXXALIAS_SYS (pthread_rwlock_destroy, int, (pthread_rwlock_t *lock));
2069# endif
2070# if __GLIBC__ >= 2
2071_GL_CXXALIASWARN (pthread_rwlock_destroy);
2072# endif
2073#elif defined GNULIB_POSIXCHECK
2074# undef pthread_rwlock_destroy
2075# if HAVE_RAW_DECL_PTHREAD_RWLOCK_DESTROY
2076_GL_WARN_ON_USE (pthread_rwlock_destroy, "pthread_rwlock_destroy is not portable - "
2077 "use gnulib module pthread-rwlock for portability");
2078# endif
2079#endif
2080
2081/* =========== Condition variable functions =========== */
2082
2083#if 0
2084# if 0
2085# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2086# undef pthread_cond_init
2087# define pthread_cond_init rpl_pthread_cond_init
2088# endif
2089_GL_FUNCDECL_RPL (pthread_cond_init, int,
2090 (pthread_cond_t *restrict cond,
2091 const pthread_condattr_t *restrict attr),
2092 _GL_ARG_NONNULL ((1)));
2093_GL_CXXALIAS_RPL (pthread_cond_init, int,
2094 (pthread_cond_t *restrict cond,
2095 const pthread_condattr_t *restrict attr));
2096# else
2097# if !1
2098_GL_FUNCDECL_SYS (pthread_cond_init, int,
2099 (pthread_cond_t *restrict cond,
2100 const pthread_condattr_t *restrict attr),
2101 _GL_ARG_NONNULL ((1)));
2102# endif
2103_GL_CXXALIAS_SYS (pthread_cond_init, int,
2104 (pthread_cond_t *restrict cond,
2105 const pthread_condattr_t *restrict attr));
2106# endif
2107# if __GLIBC__ >= 2
2108_GL_CXXALIASWARN (pthread_cond_init);
2109# endif
2110#elif defined GNULIB_POSIXCHECK
2111# undef pthread_cond_init
2112# if HAVE_RAW_DECL_PTHREAD_COND_INIT
2113_GL_WARN_ON_USE (pthread_cond_init, "pthread_cond_init is not portable - "
2114 "use gnulib module pthread-cond for portability");
2115# endif
2116#endif
2117
2118#if 0
2119# if 0
2120# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2121# undef pthread_condattr_init
2122# define pthread_condattr_init rpl_pthread_condattr_init
2123# endif
2124_GL_FUNCDECL_RPL (pthread_condattr_init, int, (pthread_condattr_t *attr),
2125 _GL_ARG_NONNULL ((1)));
2126_GL_CXXALIAS_RPL (pthread_condattr_init, int, (pthread_condattr_t *attr));
2127# else
2128# if !1
2129_GL_FUNCDECL_SYS (pthread_condattr_init, int, (pthread_condattr_t *attr),
2130 _GL_ARG_NONNULL ((1)));
2131# endif
2132_GL_CXXALIAS_SYS (pthread_condattr_init, int, (pthread_condattr_t *attr));
2133# endif
2134# if __GLIBC__ >= 2
2135_GL_CXXALIASWARN (pthread_condattr_init);
2136# endif
2137#elif defined GNULIB_POSIXCHECK
2138# undef pthread_condattr_init
2139# if HAVE_RAW_DECL_PTHREAD_CONDATTR_INIT
2140_GL_WARN_ON_USE (pthread_condattr_init, "pthread_condattr_init is not portable - "
2141 "use gnulib module pthread-cond for portability");
2142# endif
2143#endif
2144
2145#if 0
2146# if 0
2147# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2148# undef pthread_condattr_destroy
2149# define pthread_condattr_destroy rpl_pthread_condattr_destroy
2150# endif
2151_GL_FUNCDECL_RPL (pthread_condattr_destroy, int, (pthread_condattr_t *attr),
2152 _GL_ARG_NONNULL ((1)));
2153_GL_CXXALIAS_RPL (pthread_condattr_destroy, int, (pthread_condattr_t *attr));
2154# else
2155# if !1
2156_GL_FUNCDECL_SYS (pthread_condattr_destroy, int, (pthread_condattr_t *attr),
2157 _GL_ARG_NONNULL ((1)));
2158# endif
2159_GL_CXXALIAS_SYS (pthread_condattr_destroy, int, (pthread_condattr_t *attr));
2160# endif
2161# if __GLIBC__ >= 2
2162_GL_CXXALIASWARN (pthread_condattr_destroy);
2163# endif
2164#elif defined GNULIB_POSIXCHECK
2165# undef pthread_condattr_destroy
2166# if HAVE_RAW_DECL_PTHREAD_CONDATTR_DESTROY
2167_GL_WARN_ON_USE (pthread_condattr_destroy, "pthread_condattr_destroy is not portable - "
2168 "use gnulib module pthread-cond for portability");
2169# endif
2170#endif
2171
2172#if 0
2173# if 0
2174# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2175# undef pthread_cond_wait
2176# define pthread_cond_wait rpl_pthread_cond_wait
2177# endif
2178_GL_FUNCDECL_RPL (pthread_cond_wait, int,
2179 (pthread_cond_t *restrict cond,
2180 pthread_mutex_t *restrict mutex),
2181 _GL_ARG_NONNULL ((1, 2)));
2182_GL_CXXALIAS_RPL (pthread_cond_wait, int,
2183 (pthread_cond_t *restrict cond,
2184 pthread_mutex_t *restrict mutex));
2185# else
2186# if !1
2187_GL_FUNCDECL_SYS (pthread_cond_wait, int,
2188 (pthread_cond_t *restrict cond,
2189 pthread_mutex_t *restrict mutex),
2190 _GL_ARG_NONNULL ((1, 2)));
2191# endif
2192_GL_CXXALIAS_SYS (pthread_cond_wait, int,
2193 (pthread_cond_t *restrict cond,
2194 pthread_mutex_t *restrict mutex));
2195# endif
2196# if __GLIBC__ >= 2
2197_GL_CXXALIASWARN (pthread_cond_wait);
2198# endif
2199#elif defined GNULIB_POSIXCHECK
2200# undef pthread_cond_wait
2201# if HAVE_RAW_DECL_PTHREAD_COND_WAIT
2202_GL_WARN_ON_USE (pthread_cond_wait, "pthread_cond_wait is not portable - "
2203 "use gnulib module pthread-cond for portability");
2204# endif
2205#endif
2206
2207#if 0
2208# if 0
2209# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2210# undef pthread_cond_timedwait
2211# define pthread_cond_timedwait rpl_pthread_cond_timedwait
2212# endif
2213_GL_FUNCDECL_RPL (pthread_cond_timedwait, int,
2214 (pthread_cond_t *restrict cond,
2215 pthread_mutex_t *restrict mutex,
2216 const struct timespec *restrict abstime),
2217 _GL_ARG_NONNULL ((1, 2, 3)));
2218_GL_CXXALIAS_RPL (pthread_cond_timedwait, int,
2219 (pthread_cond_t *restrict cond,
2220 pthread_mutex_t *restrict mutex,
2221 const struct timespec *restrict abstime));
2222# else
2223# if !1
2224_GL_FUNCDECL_SYS (pthread_cond_timedwait, int,
2225 (pthread_cond_t *restrict cond,
2226 pthread_mutex_t *restrict mutex,
2227 const struct timespec *restrict abstime),
2228 _GL_ARG_NONNULL ((1, 2, 3)));
2229# endif
2230_GL_CXXALIAS_SYS (pthread_cond_timedwait, int,
2231 (pthread_cond_t *restrict cond,
2232 pthread_mutex_t *restrict mutex,
2233 const struct timespec *restrict abstime));
2234# endif
2235# if __GLIBC__ >= 2
2236_GL_CXXALIASWARN (pthread_cond_timedwait);
2237# endif
2238#elif defined GNULIB_POSIXCHECK
2239# undef pthread_cond_timedwait
2240# if HAVE_RAW_DECL_PTHREAD_COND_TIMEDWAIT
2241_GL_WARN_ON_USE (pthread_cond_timedwait, "pthread_cond_timedwait is not portable - "
2242 "use gnulib module pthread-cond for portability");
2243# endif
2244#endif
2245
2246#if 0
2247# if 0
2248# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2249# undef pthread_cond_signal
2250# define pthread_cond_signal rpl_pthread_cond_signal
2251# endif
2252_GL_FUNCDECL_RPL (pthread_cond_signal, int, (pthread_cond_t *cond),
2253 _GL_ARG_NONNULL ((1)));
2254_GL_CXXALIAS_RPL (pthread_cond_signal, int, (pthread_cond_t *cond));
2255# else
2256# if !1
2257_GL_FUNCDECL_SYS (pthread_cond_signal, int, (pthread_cond_t *cond),
2258 _GL_ARG_NONNULL ((1)));
2259# endif
2260_GL_CXXALIAS_SYS (pthread_cond_signal, int, (pthread_cond_t *cond));
2261# endif
2262# if __GLIBC__ >= 2
2263_GL_CXXALIASWARN (pthread_cond_signal);
2264# endif
2265#elif defined GNULIB_POSIXCHECK
2266# undef pthread_cond_signal
2267# if HAVE_RAW_DECL_PTHREAD_COND_SIGNAL
2268_GL_WARN_ON_USE (pthread_cond_signal, "pthread_cond_signal is not portable - "
2269 "use gnulib module pthread-cond for portability");
2270# endif
2271#endif
2272
2273#if 0
2274# if 0
2275# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2276# undef pthread_cond_broadcast
2277# define pthread_cond_broadcast rpl_pthread_cond_broadcast
2278# endif
2279_GL_FUNCDECL_RPL (pthread_cond_broadcast, int, (pthread_cond_t *cond),
2280 _GL_ARG_NONNULL ((1)));
2281_GL_CXXALIAS_RPL (pthread_cond_broadcast, int, (pthread_cond_t *cond));
2282# else
2283# if !1
2284_GL_FUNCDECL_SYS (pthread_cond_broadcast, int, (pthread_cond_t *cond),
2285 _GL_ARG_NONNULL ((1)));
2286# endif
2287_GL_CXXALIAS_SYS (pthread_cond_broadcast, int, (pthread_cond_t *cond));
2288# endif
2289# if __GLIBC__ >= 2
2290_GL_CXXALIASWARN (pthread_cond_broadcast);
2291# endif
2292#elif defined GNULIB_POSIXCHECK
2293# undef pthread_cond_broadcast
2294# if HAVE_RAW_DECL_PTHREAD_COND_BROADCAST
2295_GL_WARN_ON_USE (pthread_cond_broadcast, "pthread_cond_broadcast is not portable - "
2296 "use gnulib module pthread-cond for portability");
2297# endif
2298#endif
2299
2300#if 0
2301# if 0
2302# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2303# undef pthread_cond_destroy
2304# define pthread_cond_destroy rpl_pthread_cond_destroy
2305# endif
2306_GL_FUNCDECL_RPL (pthread_cond_destroy, int, (pthread_cond_t *cond),
2307 _GL_ARG_NONNULL ((1)));
2308_GL_CXXALIAS_RPL (pthread_cond_destroy, int, (pthread_cond_t *cond));
2309# else
2310# if !1
2311_GL_FUNCDECL_SYS (pthread_cond_destroy, int, (pthread_cond_t *cond),
2312 _GL_ARG_NONNULL ((1)));
2313# endif
2314_GL_CXXALIAS_SYS (pthread_cond_destroy, int, (pthread_cond_t *cond));
2315# endif
2316# if __GLIBC__ >= 2
2317_GL_CXXALIASWARN (pthread_cond_destroy);
2318# endif
2319#elif defined GNULIB_POSIXCHECK
2320# undef pthread_cond_destroy
2321# if HAVE_RAW_DECL_PTHREAD_COND_DESTROY
2322_GL_WARN_ON_USE (pthread_cond_destroy, "pthread_cond_destroy is not portable - "
2323 "use gnulib module pthread-cond for portability");
2324# endif
2325#endif
2326
2327/* =========== Thread-specific storage functions =========== */
2328
2329#if 0
2330# if 0
2331# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2332# undef pthread_key_create
2333# define pthread_key_create rpl_pthread_key_create
2334# endif
2335_GL_FUNCDECL_RPL (pthread_key_create, int,
2336 (pthread_key_t *keyp, void (*destructor) (void *)),
2337 _GL_ARG_NONNULL ((1)));
2338_GL_CXXALIAS_RPL (pthread_key_create, int,
2339 (pthread_key_t *keyp, void (*destructor) (void *)));
2340# else
2341# if !1
2342_GL_FUNCDECL_SYS (pthread_key_create, int,
2343 (pthread_key_t *keyp, void (*destructor) (void *)),
2344 _GL_ARG_NONNULL ((1)));
2345# endif
2346_GL_CXXALIAS_SYS_CAST (pthread_key_create, int,
2347 (pthread_key_t *keyp, void (*destructor) (void *)));
2348# endif
2349# if __GLIBC__ >= 2
2350_GL_CXXALIASWARN (pthread_key_create);
2351# endif
2352#elif defined GNULIB_POSIXCHECK
2353# undef pthread_key_create
2354# if HAVE_RAW_DECL_PTHREAD_KEY_CREATE
2355_GL_WARN_ON_USE (pthread_key_create, "pthread_key_create is not portable - "
2356 "use gnulib module pthread-tss for portability");
2357# endif
2358#endif
2359
2360#if 0
2361# if 0
2362# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2363# undef pthread_setspecific
2364# define pthread_setspecific rpl_pthread_setspecific
2365# endif
2366_GL_FUNCDECL_RPL (pthread_setspecific, int,
2367 (pthread_key_t key, const void *value), );
2368_GL_CXXALIAS_RPL (pthread_setspecific, int,
2369 (pthread_key_t key, const void *value));
2370# else
2371# if !1
2372_GL_FUNCDECL_SYS (pthread_setspecific, int,
2373 (pthread_key_t key, const void *value), );
2374# endif
2375_GL_CXXALIAS_SYS (pthread_setspecific, int,
2376 (pthread_key_t key, const void *value));
2377# endif
2378# if __GLIBC__ >= 2
2379_GL_CXXALIASWARN (pthread_setspecific);
2380# endif
2381#elif defined GNULIB_POSIXCHECK
2382# undef pthread_setspecific
2383# if HAVE_RAW_DECL_PTHREAD_SETSPECIFIC
2384_GL_WARN_ON_USE (pthread_setspecific, "pthread_setspecific is not portable - "
2385 "use gnulib module pthread-tss for portability");
2386# endif
2387#endif
2388
2389#if 0
2390# if 0
2391# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2392# undef pthread_getspecific
2393# define pthread_getspecific rpl_pthread_getspecific
2394# endif
2395_GL_FUNCDECL_RPL (pthread_getspecific, void *, (pthread_key_t key), );
2396_GL_CXXALIAS_RPL (pthread_getspecific, void *, (pthread_key_t key));
2397# else
2398# if !1
2399_GL_FUNCDECL_SYS (pthread_getspecific, void *, (pthread_key_t key), );
2400# endif
2401_GL_CXXALIAS_SYS (pthread_getspecific, void *, (pthread_key_t key));
2402# endif
2403# if __GLIBC__ >= 2
2404_GL_CXXALIASWARN (pthread_getspecific);
2405# endif
2406#elif defined GNULIB_POSIXCHECK
2407# undef pthread_getspecific
2408# if HAVE_RAW_DECL_PTHREAD_GETSPECIFIC
2409_GL_WARN_ON_USE (pthread_getspecific, "pthread_getspecific is not portable - "
2410 "use gnulib module pthread-tss for portability");
2411# endif
2412#endif
2413
2414#if 0
2415# if 0
2416# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2417# undef pthread_key_delete
2418# define pthread_key_delete rpl_pthread_key_delete
2419# endif
2420_GL_FUNCDECL_RPL (pthread_key_delete, int, (pthread_key_t key), );
2421_GL_CXXALIAS_RPL (pthread_key_delete, int, (pthread_key_t key));
2422# else
2423# if !1
2424_GL_FUNCDECL_SYS (pthread_key_delete, int, (pthread_key_t key), );
2425# endif
2426_GL_CXXALIAS_SYS (pthread_key_delete, int, (pthread_key_t key));
2427# endif
2428# if __GLIBC__ >= 2
2429_GL_CXXALIASWARN (pthread_key_delete);
2430# endif
2431#elif defined GNULIB_POSIXCHECK
2432# undef pthread_key_delete
2433# if HAVE_RAW_DECL_PTHREAD_KEY_DELETE
2434_GL_WARN_ON_USE (pthread_key_delete, "pthread_key_delete is not portable - "
2435 "use gnulib module pthread-tss for portability");
2436# endif
2437#endif
2438
2439/* =========== Spinlock functions =========== */
2440
2441#if 0
2442# if 0
2443# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2444# undef pthread_spin_init
2445# define pthread_spin_init rpl_pthread_spin_init
2446# endif
2447_GL_FUNCDECL_RPL (pthread_spin_init, int,
2448 (pthread_spinlock_t *lock, int shared_across_processes),
2449 _GL_ARG_NONNULL ((1)));
2450_GL_CXXALIAS_RPL (pthread_spin_init, int,
2451 (pthread_spinlock_t *lock, int shared_across_processes));
2452# else
2453# if !1
2454_GL_FUNCDECL_SYS (pthread_spin_init, int,
2455 (pthread_spinlock_t *lock, int shared_across_processes),
2456 _GL_ARG_NONNULL ((1)));
2457# endif
2458_GL_CXXALIAS_SYS (pthread_spin_init, int,
2459 (pthread_spinlock_t *lock, int shared_across_processes));
2460# endif
2461# if __GLIBC__ >= 2
2462_GL_CXXALIASWARN (pthread_spin_init);
2463# endif
2464#elif defined GNULIB_POSIXCHECK
2465# undef pthread_spin_init
2466# if HAVE_RAW_DECL_PTHREAD_SPIN_INIT
2467_GL_WARN_ON_USE (pthread_spin_init, "pthread_spin_init is not portable - "
2468 "use gnulib module pthread-spin for portability");
2469# endif
2470#endif
2471
2472#if 0
2473# if 0
2474# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2475# undef pthread_spin_lock
2476# define pthread_spin_lock rpl_pthread_spin_lock
2477# endif
2478_GL_FUNCDECL_RPL (pthread_spin_lock, int, (pthread_spinlock_t *lock),
2479 _GL_ARG_NONNULL ((1)));
2480_GL_CXXALIAS_RPL (pthread_spin_lock, int, (pthread_spinlock_t *lock));
2481# else
2482# if !1
2483_GL_FUNCDECL_SYS (pthread_spin_lock, int, (pthread_spinlock_t *lock),
2484 _GL_ARG_NONNULL ((1)));
2485# endif
2486_GL_CXXALIAS_SYS (pthread_spin_lock, int, (pthread_spinlock_t *lock));
2487# endif
2488# if __GLIBC__ >= 2
2489_GL_CXXALIASWARN (pthread_spin_lock);
2490# endif
2491#elif defined GNULIB_POSIXCHECK
2492# undef pthread_spin_lock
2493# if HAVE_RAW_DECL_PTHREAD_SPIN_LOCK
2494_GL_WARN_ON_USE (pthread_spin_lock, "pthread_spin_lock is not portable - "
2495 "use gnulib module pthread-spin for portability");
2496# endif
2497#endif
2498
2499#if 0
2500# if 0
2501# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2502# undef pthread_spin_trylock
2503# define pthread_spin_trylock rpl_pthread_spin_trylock
2504# endif
2505_GL_FUNCDECL_RPL (pthread_spin_trylock, int, (pthread_spinlock_t *lock),
2506 _GL_ARG_NONNULL ((1)));
2507_GL_CXXALIAS_RPL (pthread_spin_trylock, int, (pthread_spinlock_t *lock));
2508# else
2509# if !1
2510_GL_FUNCDECL_SYS (pthread_spin_trylock, int, (pthread_spinlock_t *lock),
2511 _GL_ARG_NONNULL ((1)));
2512# endif
2513_GL_CXXALIAS_SYS (pthread_spin_trylock, int, (pthread_spinlock_t *lock));
2514# endif
2515# if __GLIBC__ >= 2
2516_GL_CXXALIASWARN (pthread_spin_trylock);
2517# endif
2518#elif defined GNULIB_POSIXCHECK
2519# undef pthread_spin_trylock
2520# if HAVE_RAW_DECL_PTHREAD_SPIN_TRYLOCK
2521_GL_WARN_ON_USE (pthread_spin_trylock, "pthread_spin_trylock is not portable - "
2522 "use gnulib module pthread-spin for portability");
2523# endif
2524#endif
2525
2526#if 0
2527# if 0
2528# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2529# undef pthread_spin_unlock
2530# define pthread_spin_unlock rpl_pthread_spin_unlock
2531# endif
2532_GL_FUNCDECL_RPL (pthread_spin_unlock, int, (pthread_spinlock_t *lock),
2533 _GL_ARG_NONNULL ((1)));
2534_GL_CXXALIAS_RPL (pthread_spin_unlock, int, (pthread_spinlock_t *lock));
2535# else
2536# if !1
2537_GL_FUNCDECL_SYS (pthread_spin_unlock, int, (pthread_spinlock_t *lock),
2538 _GL_ARG_NONNULL ((1)));
2539# endif
2540_GL_CXXALIAS_SYS (pthread_spin_unlock, int, (pthread_spinlock_t *lock));
2541# endif
2542# if __GLIBC__ >= 2
2543_GL_CXXALIASWARN (pthread_spin_unlock);
2544# endif
2545#elif defined GNULIB_POSIXCHECK
2546# undef pthread_spin_unlock
2547# if HAVE_RAW_DECL_PTHREAD_SPIN_UNLOCK
2548_GL_WARN_ON_USE (pthread_spin_unlock, "pthread_spin_unlock is not portable - "
2549 "use gnulib module pthread-spin for portability");
2550# endif
2551#endif
2552
2553#if 0
2554# if 0
2555# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2556# undef pthread_spin_destroy
2557# define pthread_spin_destroy rpl_pthread_spin_destroy
2558# endif
2559_GL_FUNCDECL_RPL (pthread_spin_destroy, int, (pthread_spinlock_t *lock),
2560 _GL_ARG_NONNULL ((1)));
2561_GL_CXXALIAS_RPL (pthread_spin_destroy, int, (pthread_spinlock_t *lock));
2562# else
2563# if !1
2564_GL_FUNCDECL_SYS (pthread_spin_destroy, int, (pthread_spinlock_t *lock),
2565 _GL_ARG_NONNULL ((1)));
2566# endif
2567_GL_CXXALIAS_SYS (pthread_spin_destroy, int, (pthread_spinlock_t *lock));
2568# endif
2569# if __GLIBC__ >= 2
2570_GL_CXXALIASWARN (pthread_spin_destroy);
2571# endif
2572#elif defined GNULIB_POSIXCHECK
2573# undef pthread_spin_destroy
2574# if HAVE_RAW_DECL_PTHREAD_SPIN_DESTROY
2575_GL_WARN_ON_USE (pthread_spin_destroy, "pthread_spin_destroy is not portable - "
2576 "use gnulib module pthread-spin for portability");
2577# endif
2578#endif
2579
2580
2581#if defined __cplusplus && defined GNULIB_NAMESPACE && !1 && defined __MINGW32__
2582/* Provide the symbols required by mingw's <bits/gthr-default.h>. */
2583using GNULIB_NAMESPACE::pthread_create;
2584using GNULIB_NAMESPACE::pthread_self;
2585using GNULIB_NAMESPACE::pthread_equal;
2586using GNULIB_NAMESPACE::pthread_detach;
2587using GNULIB_NAMESPACE::pthread_join;
2588using GNULIB_NAMESPACE::pthread_once;
2589using GNULIB_NAMESPACE::pthread_mutex_init;
2590using GNULIB_NAMESPACE::pthread_mutexattr_init;
2591using GNULIB_NAMESPACE::pthread_mutexattr_settype;
2592using GNULIB_NAMESPACE::pthread_mutexattr_destroy;
2593using GNULIB_NAMESPACE::pthread_mutex_lock;
2594using GNULIB_NAMESPACE::pthread_mutex_trylock;
2595using GNULIB_NAMESPACE::pthread_mutex_timedlock;
2596using GNULIB_NAMESPACE::pthread_mutex_unlock;
2597using GNULIB_NAMESPACE::pthread_mutex_destroy;
2598using GNULIB_NAMESPACE::pthread_cond_wait;
2599using GNULIB_NAMESPACE::pthread_cond_timedwait;
2600using GNULIB_NAMESPACE::pthread_cond_signal;
2601using GNULIB_NAMESPACE::pthread_cond_broadcast;
2602using GNULIB_NAMESPACE::pthread_cond_destroy;
2603using GNULIB_NAMESPACE::pthread_key_create;
2604using GNULIB_NAMESPACE::pthread_setspecific;
2605using GNULIB_NAMESPACE::pthread_getspecific;
2606using GNULIB_NAMESPACE::pthread_key_delete;
2607#endif
2608
2609
2610#endif /* _GL_PTHREAD_H_ */
2611#endif /* _GL_PTHREAD_H_ */
2612#endif
diff --git a/gl/sched.h b/gl/sched.h
new file mode 100644
index 00000000..7fd645f0
--- /dev/null
+++ b/gl/sched.h
@@ -0,0 +1,622 @@
1/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
2/* A GNU-like <sched.h>.
3 Copyright (C) 2008-2025 Free Software Foundation, Inc.
4
5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as
7 published by the Free Software Foundation; either version 2.1 of the
8 License, or (at your option) any later version.
9
10 This file is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public License
16 along with this program. If not, see <https://www.gnu.org/licenses/>. */
17
18#ifndef _GL_SCHED_H
19
20#if __GNUC__ >= 3
21#pragma GCC system_header
22#endif
23
24
25/* This file uses #include_next of a system file that defines time_t.
26 For the 'year2038' module to work right, <config.h> needs to have been
27 included before. */
28#if !_GL_CONFIG_H_INCLUDED
29 #error "Please include config.h first."
30#endif
31
32/* The include_next requires a split double-inclusion guard. */
33#if 1
34# if 1
35# include <sys/cdefs.h>
36# endif
37# include_next <sched.h>
38#endif
39
40#ifndef _GL_SCHED_H
41#define _GL_SCHED_H
42
43/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */
44#if !_GL_CONFIG_H_INCLUDED
45 #error "Please include config.h first."
46#endif
47
48/* Get pid_t.
49 This is needed on glibc 2.11 (see
50 glibc bug <https://sourceware.org/bugzilla/show_bug.cgi?id=13198>)
51 and Mac OS X 10.5. */
52#include <sys/types.h>
53
54#ifdef __KLIBC__
55/* On OS/2 kLIBC, struct sched_param is in spawn.h. */
56# include <spawn.h>
57#endif
58
59#ifdef __VMS
60/* On OpenVMS, struct sched_param is in <pthread.h>. */
61# include <pthread.h>
62#endif
63
64/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
65/* C++ compatible function declaration macros.
66 Copyright (C) 2010-2025 Free Software Foundation, Inc.
67
68 This program is free software: you can redistribute it and/or modify it
69 under the terms of the GNU Lesser General Public License as published
70 by the Free Software Foundation; either version 2 of the License, or
71 (at your option) any later version.
72
73 This program is distributed in the hope that it will be useful,
74 but WITHOUT ANY WARRANTY; without even the implied warranty of
75 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
76 Lesser General Public License for more details.
77
78 You should have received a copy of the GNU Lesser General Public License
79 along with this program. If not, see <https://www.gnu.org/licenses/>. */
80
81#ifndef _GL_CXXDEFS_H
82#define _GL_CXXDEFS_H
83
84/* Begin/end the GNULIB_NAMESPACE namespace. */
85#if defined __cplusplus && defined GNULIB_NAMESPACE
86# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE {
87# define _GL_END_NAMESPACE }
88#else
89# define _GL_BEGIN_NAMESPACE
90# define _GL_END_NAMESPACE
91#endif
92
93/* The three most frequent use cases of these macros are:
94
95 * For providing a substitute for a function that is missing on some
96 platforms, but is declared and works fine on the platforms on which
97 it exists:
98
99 #if @GNULIB_FOO@
100 # if !@HAVE_FOO@
101 _GL_FUNCDECL_SYS (foo, ...);
102 # endif
103 _GL_CXXALIAS_SYS (foo, ...);
104 _GL_CXXALIASWARN (foo);
105 #elif defined GNULIB_POSIXCHECK
106 ...
107 #endif
108
109 * For providing a replacement for a function that exists on all platforms,
110 but is broken/insufficient and needs to be replaced on some platforms:
111
112 #if @GNULIB_FOO@
113 # if @REPLACE_FOO@
114 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
115 # undef foo
116 # define foo rpl_foo
117 # endif
118 _GL_FUNCDECL_RPL (foo, ...);
119 _GL_CXXALIAS_RPL (foo, ...);
120 # else
121 _GL_CXXALIAS_SYS (foo, ...);
122 # endif
123 _GL_CXXALIASWARN (foo);
124 #elif defined GNULIB_POSIXCHECK
125 ...
126 #endif
127
128 * For providing a replacement for a function that exists on some platforms
129 but is broken/insufficient and needs to be replaced on some of them and
130 is additionally either missing or undeclared on some other platforms:
131
132 #if @GNULIB_FOO@
133 # if @REPLACE_FOO@
134 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
135 # undef foo
136 # define foo rpl_foo
137 # endif
138 _GL_FUNCDECL_RPL (foo, ...);
139 _GL_CXXALIAS_RPL (foo, ...);
140 # else
141 # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@
142 _GL_FUNCDECL_SYS (foo, ...);
143 # endif
144 _GL_CXXALIAS_SYS (foo, ...);
145 # endif
146 _GL_CXXALIASWARN (foo);
147 #elif defined GNULIB_POSIXCHECK
148 ...
149 #endif
150*/
151
152/* _GL_EXTERN_C declaration;
153 performs the declaration with C linkage. */
154#if defined __cplusplus
155# define _GL_EXTERN_C extern "C"
156#else
157# define _GL_EXTERN_C extern
158#endif
159
160/* _GL_EXTERN_C_FUNC declaration;
161 performs the declaration of a function with C linkage. */
162#if defined __cplusplus
163# define _GL_EXTERN_C_FUNC extern "C"
164#else
165/* In C mode, omit the 'extern' keyword, because attributes in bracket syntax
166 are not allowed between 'extern' and the return type (see gnulib-common.m4).
167 */
168# define _GL_EXTERN_C_FUNC
169#endif
170
171/* _GL_FUNCDECL_RPL (func, rettype, parameters, [attributes]);
172 declares a replacement function, named rpl_func, with the given prototype,
173 consisting of return type, parameters, and attributes.
174 Although attributes are optional, the comma before them is required
175 for portability to C17 and earlier. The attribute _GL_ATTRIBUTE_NOTHROW,
176 if needed, must be placed after the _GL_FUNCDECL_RPL invocation,
177 at the end of the declaration.
178 Examples:
179 _GL_FUNCDECL_RPL (free, void, (void *ptr), ) _GL_ATTRIBUTE_NOTHROW;
180 _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...),
181 _GL_ARG_NONNULL ((1)));
182
183 Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front
184 of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's
185 because
186 [[...]] extern "C" <declaration>;
187 is invalid syntax in C++.)
188 */
189#define _GL_FUNCDECL_RPL(func,rettype,parameters,...) \
190 _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters, __VA_ARGS__)
191#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \
192 _GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters
193
194/* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]);
195 declares the system function, named func, with the given prototype,
196 consisting of return type, parameters, and attributes.
197 Although attributes are optional, the comma before them is required
198 for portability to C17 and earlier. The attribute _GL_ATTRIBUTE_NOTHROW,
199 if needed, must be placed after the _GL_FUNCDECL_RPL invocation,
200 at the end of the declaration.
201 Examples:
202 _GL_FUNCDECL_SYS (getumask, mode_t, (void), ) _GL_ATTRIBUTE_NOTHROW;
203 _GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD);
204 */
205#define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \
206 _GL_EXTERN_C_FUNC __VA_ARGS__ rettype func parameters
207
208/* _GL_CXXALIAS_RPL (func, rettype, parameters);
209 declares a C++ alias called GNULIB_NAMESPACE::func
210 that redirects to rpl_func, if GNULIB_NAMESPACE is defined.
211 Example:
212 _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...));
213
214 Wrapping rpl_func in an object with an inline conversion operator
215 avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is
216 actually used in the program. */
217#define _GL_CXXALIAS_RPL(func,rettype,parameters) \
218 _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters)
219#if defined __cplusplus && defined GNULIB_NAMESPACE
220# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
221 namespace GNULIB_NAMESPACE \
222 { \
223 static const struct _gl_ ## func ## _wrapper \
224 { \
225 typedef rettype (*type) parameters; \
226 \
227 inline operator type () const \
228 { \
229 return ::rpl_func; \
230 } \
231 } func = {}; \
232 } \
233 _GL_EXTERN_C int _gl_cxxalias_dummy
234#else
235# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
236 _GL_EXTERN_C int _gl_cxxalias_dummy
237#endif
238
239/* _GL_CXXALIAS_MDA (func, rettype, parameters);
240 is to be used when func is a Microsoft deprecated alias, on native Windows.
241 It declares a C++ alias called GNULIB_NAMESPACE::func
242 that redirects to _func, if GNULIB_NAMESPACE is defined.
243 Example:
244 _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...));
245 */
246#define _GL_CXXALIAS_MDA(func,rettype,parameters) \
247 _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters)
248
249/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters);
250 is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters);
251 except that the C function rpl_func may have a slightly different
252 declaration. A cast is used to silence the "invalid conversion" error
253 that would otherwise occur. */
254#if defined __cplusplus && defined GNULIB_NAMESPACE
255# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
256 namespace GNULIB_NAMESPACE \
257 { \
258 static const struct _gl_ ## func ## _wrapper \
259 { \
260 typedef rettype (*type) parameters; \
261 \
262 inline operator type () const \
263 { \
264 return reinterpret_cast<type>(::rpl_func); \
265 } \
266 } func = {}; \
267 } \
268 _GL_EXTERN_C int _gl_cxxalias_dummy
269#else
270# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
271 _GL_EXTERN_C int _gl_cxxalias_dummy
272#endif
273
274/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters);
275 is like _GL_CXXALIAS_MDA (func, rettype, parameters);
276 except that the C function func may have a slightly different declaration.
277 A cast is used to silence the "invalid conversion" error that would
278 otherwise occur. */
279#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \
280 _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters)
281
282/* _GL_CXXALIAS_SYS (func, rettype, parameters);
283 declares a C++ alias called GNULIB_NAMESPACE::func
284 that redirects to the system provided function func, if GNULIB_NAMESPACE
285 is defined.
286 Example:
287 _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...));
288
289 Wrapping func in an object with an inline conversion operator
290 avoids a reference to func unless GNULIB_NAMESPACE::func is
291 actually used in the program. */
292#if defined __cplusplus && defined GNULIB_NAMESPACE
293# define _GL_CXXALIAS_SYS(func,rettype,parameters) \
294 namespace GNULIB_NAMESPACE \
295 { \
296 static const struct _gl_ ## func ## _wrapper \
297 { \
298 typedef rettype (*type) parameters; \
299 \
300 inline operator type () const \
301 { \
302 return ::func; \
303 } \
304 } func = {}; \
305 } \
306 _GL_EXTERN_C int _gl_cxxalias_dummy
307#else
308# define _GL_CXXALIAS_SYS(func,rettype,parameters) \
309 _GL_EXTERN_C int _gl_cxxalias_dummy
310#endif
311
312/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters);
313 is like _GL_CXXALIAS_SYS (func, rettype, parameters);
314 except that the C function func may have a slightly different declaration.
315 A cast is used to silence the "invalid conversion" error that would
316 otherwise occur. */
317#if defined __cplusplus && defined GNULIB_NAMESPACE
318# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
319 namespace GNULIB_NAMESPACE \
320 { \
321 static const struct _gl_ ## func ## _wrapper \
322 { \
323 typedef rettype (*type) parameters; \
324 \
325 inline operator type () const \
326 { \
327 return reinterpret_cast<type>(::func); \
328 } \
329 } func = {}; \
330 } \
331 _GL_EXTERN_C int _gl_cxxalias_dummy
332#else
333# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
334 _GL_EXTERN_C int _gl_cxxalias_dummy
335#endif
336
337/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2);
338 is like _GL_CXXALIAS_SYS (func, rettype, parameters);
339 except that the C function is picked among a set of overloaded functions,
340 namely the one with rettype2 and parameters2. Two consecutive casts
341 are used to silence the "cannot find a match" and "invalid conversion"
342 errors that would otherwise occur. */
343#if defined __cplusplus && defined GNULIB_NAMESPACE
344 /* The outer cast must be a reinterpret_cast.
345 The inner cast: When the function is defined as a set of overloaded
346 functions, it works as a static_cast<>, choosing the designated variant.
347 When the function is defined as a single variant, it works as a
348 reinterpret_cast<>. The parenthesized cast syntax works both ways. */
349# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
350 namespace GNULIB_NAMESPACE \
351 { \
352 static const struct _gl_ ## func ## _wrapper \
353 { \
354 typedef rettype (*type) parameters; \
355 \
356 inline operator type () const \
357 { \
358 return reinterpret_cast<type>((rettype2 (*) parameters2)(::func)); \
359 } \
360 } func = {}; \
361 } \
362 _GL_EXTERN_C int _gl_cxxalias_dummy
363#else
364# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
365 _GL_EXTERN_C int _gl_cxxalias_dummy
366#endif
367
368/* _GL_CXXALIASWARN (func);
369 causes a warning to be emitted when ::func is used but not when
370 GNULIB_NAMESPACE::func is used. func must be defined without overloaded
371 variants. */
372#if defined __cplusplus && defined GNULIB_NAMESPACE
373# define _GL_CXXALIASWARN(func) \
374 _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE)
375# define _GL_CXXALIASWARN_1(func,namespace) \
376 _GL_CXXALIASWARN_2 (func, namespace)
377/* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
378 we enable the warning only when not optimizing. */
379# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__)
380# define _GL_CXXALIASWARN_2(func,namespace) \
381 _GL_WARN_ON_USE (func, \
382 "The symbol ::" #func " refers to the system function. " \
383 "Use " #namespace "::" #func " instead.")
384# elif (__GNUC__ >= 3 || defined __clang__) && GNULIB_STRICT_CHECKING
385# define _GL_CXXALIASWARN_2(func,namespace) \
386 extern __typeof__ (func) func
387# else
388# define _GL_CXXALIASWARN_2(func,namespace) \
389 _GL_EXTERN_C int _gl_cxxalias_dummy
390# endif
391#else
392# define _GL_CXXALIASWARN(func) \
393 _GL_EXTERN_C int _gl_cxxalias_dummy
394#endif
395
396/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes);
397 causes a warning to be emitted when the given overloaded variant of ::func
398 is used but not when GNULIB_NAMESPACE::func is used. */
399#if defined __cplusplus && defined GNULIB_NAMESPACE
400# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
401 _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \
402 GNULIB_NAMESPACE)
403# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \
404 _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace)
405/* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
406 we enable the warning only when not optimizing. */
407# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__)
408# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
409 _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \
410 "The symbol ::" #func " refers to the system function. " \
411 "Use " #namespace "::" #func " instead.")
412# else
413# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
414 _GL_EXTERN_C int _gl_cxxalias_dummy
415# endif
416#else
417# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
418 _GL_EXTERN_C int _gl_cxxalias_dummy
419#endif
420
421#endif /* _GL_CXXDEFS_H */
422
423/* The definition of _GL_WARN_ON_USE is copied here. */
424/* A C macro for emitting warnings if a function is used.
425 Copyright (C) 2010-2025 Free Software Foundation, Inc.
426
427 This program is free software: you can redistribute it and/or modify it
428 under the terms of the GNU Lesser General Public License as published
429 by the Free Software Foundation; either version 2 of the License, or
430 (at your option) any later version.
431
432 This program is distributed in the hope that it will be useful,
433 but WITHOUT ANY WARRANTY; without even the implied warranty of
434 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
435 Lesser General Public License for more details.
436
437 You should have received a copy of the GNU Lesser General Public License
438 along with this program. If not, see <https://www.gnu.org/licenses/>. */
439
440/* _GL_WARN_ON_USE (function, "literal string") issues a declaration
441 for FUNCTION which will then trigger a compiler warning containing
442 the text of "literal string" anywhere that function is called, if
443 supported by the compiler. If the compiler does not support this
444 feature, the macro expands to an unused extern declaration.
445
446 _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the
447 attribute used in _GL_WARN_ON_USE. If the compiler does not support
448 this feature, it expands to empty.
449
450 These macros are useful for marking a function as a potential
451 portability trap, with the intent that "literal string" include
452 instructions on the replacement function that should be used
453 instead.
454 _GL_WARN_ON_USE is for functions with 'extern' linkage.
455 _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline'
456 linkage.
457
458 _GL_WARN_ON_USE should not be used more than once for a given function
459 in a given compilation unit (because this may generate a warning even
460 if the function is never called).
461
462 However, one of the reasons that a function is a portability trap is
463 if it has the wrong signature. Declaring FUNCTION with a different
464 signature in C is a compilation error, so this macro must use the
465 same type as any existing declaration so that programs that avoid
466 the problematic FUNCTION do not fail to compile merely because they
467 included a header that poisoned the function. But this implies that
468 _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already
469 have a declaration. Use of this macro implies that there must not
470 be any other macro hiding the declaration of FUNCTION; but
471 undefining FUNCTION first is part of the poisoning process anyway
472 (although for symbols that are provided only via a macro, the result
473 is a compilation error rather than a warning containing
474 "literal string"). Also note that in C++, it is only safe to use if
475 FUNCTION has no overloads.
476
477 For an example, it is possible to poison 'getline' by:
478 - adding a call to gl_WARN_ON_USE_PREPARE([[#include <stdio.h>]],
479 [getline]) in configure.ac, which potentially defines
480 HAVE_RAW_DECL_GETLINE
481 - adding this code to a header that wraps the system <stdio.h>:
482 #undef getline
483 #if HAVE_RAW_DECL_GETLINE
484 _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but"
485 "not universally present; use the gnulib module getline");
486 #endif
487
488 It is not possible to directly poison global variables. But it is
489 possible to write a wrapper accessor function, and poison that
490 (less common usage, like &environ, will cause a compilation error
491 rather than issue the nice warning, but the end result of informing
492 the developer about their portability problem is still achieved):
493 #if HAVE_RAW_DECL_ENVIRON
494 static char ***
495 rpl_environ (void) { return &environ; }
496 _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared");
497 # undef environ
498 # define environ (*rpl_environ ())
499 #endif
500 or better (avoiding contradictory use of 'static' and 'extern'):
501 #if HAVE_RAW_DECL_ENVIRON
502 static char ***
503 _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared")
504 rpl_environ (void) { return &environ; }
505 # undef environ
506 # define environ (*rpl_environ ())
507 #endif
508 */
509#ifndef _GL_WARN_ON_USE
510
511# if (4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)) && !defined __clang__
512/* A compiler attribute is available in gcc versions 4.3.0 and later. */
513# define _GL_WARN_ON_USE(function, message) \
514_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message)))
515# define _GL_WARN_ON_USE_ATTRIBUTE(message) \
516 __attribute__ ((__warning__ (message)))
517# elif __clang_major__ >= 4
518/* Another compiler attribute is available in clang. */
519# define _GL_WARN_ON_USE(function, message) \
520_GL_WARN_EXTERN_C __typeof__ (function) function \
521 __attribute__ ((__diagnose_if__ (1, message, "warning")))
522# define _GL_WARN_ON_USE_ATTRIBUTE(message) \
523 __attribute__ ((__diagnose_if__ (1, message, "warning")))
524# elif (__GNUC__ >= 3 || defined __clang__) && GNULIB_STRICT_CHECKING
525/* Verify the existence of the function. */
526# define _GL_WARN_ON_USE(function, message) \
527_GL_WARN_EXTERN_C __typeof__ (function) function
528# define _GL_WARN_ON_USE_ATTRIBUTE(message)
529# else /* Unsupported. */
530# define _GL_WARN_ON_USE(function, message) \
531_GL_WARN_EXTERN_C int _gl_warn_on_use
532# define _GL_WARN_ON_USE_ATTRIBUTE(message)
533# endif
534#endif
535
536/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message")
537 is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the
538 function is declared with the given prototype, consisting of return type,
539 parameters, and attributes.
540 This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does
541 not work in this case. */
542#ifndef _GL_WARN_ON_USE_CXX
543# if !defined __cplusplus
544# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \
545 _GL_WARN_ON_USE (function, msg)
546# else
547# if (4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)) && !defined __clang__
548/* A compiler attribute is available in gcc versions 4.3.0 and later. */
549# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \
550extern rettype_gcc function parameters_and_attributes \
551 __attribute__ ((__warning__ (msg)))
552# elif __clang_major__ >= 4
553/* Another compiler attribute is available in clang. */
554# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \
555extern rettype_clang function parameters_and_attributes \
556 __attribute__ ((__diagnose_if__ (1, msg, "warning")))
557# elif (__GNUC__ >= 3 || defined __clang__) && GNULIB_STRICT_CHECKING
558/* Verify the existence of the function. */
559# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \
560extern rettype_gcc function parameters_and_attributes
561# else /* Unsupported. */
562# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \
563_GL_WARN_EXTERN_C int _gl_warn_on_use
564# endif
565# endif
566#endif
567
568/* _GL_WARN_EXTERN_C declaration;
569 performs the declaration with C linkage. */
570#ifndef _GL_WARN_EXTERN_C
571# if defined __cplusplus
572# define _GL_WARN_EXTERN_C extern "C"
573# else
574# define _GL_WARN_EXTERN_C extern
575# endif
576#endif
577
578#if !1
579
580# if !GNULIB_defined_struct_sched_param
581struct sched_param
582{
583 int sched_priority;
584};
585# define GNULIB_defined_struct_sched_param 1
586# endif
587
588#endif
589
590#if !(defined SCHED_FIFO && defined SCHED_RR && defined SCHED_OTHER)
591# define SCHED_FIFO 1
592# define SCHED_RR 2
593# define SCHED_OTHER 0
594#endif
595
596#if 0
597# if 0
598# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
599# undef sched_yield
600# define sched_yield rpl_sched_yield
601# endif
602_GL_FUNCDECL_RPL (sched_yield, int, (void), );
603_GL_CXXALIAS_RPL (sched_yield, int, (void));
604# else
605# if !1
606_GL_FUNCDECL_SYS (sched_yield, int, (void), );
607# endif
608_GL_CXXALIAS_SYS (sched_yield, int, (void));
609# endif
610# if __GLIBC__ >= 2
611_GL_CXXALIASWARN (sched_yield);
612# endif
613#elif defined GNULIB_POSIXCHECK
614# undef sched_yield
615# if HAVE_RAW_DECL_SCHED_YIELD
616_GL_WARN_ON_USE (sched_yield, "sched_yield is not portable - "
617 "use gnulib module sched_yield for portability");
618# endif
619#endif
620
621#endif /* _GL_SCHED_H */
622#endif /* _GL_SCHED_H */
diff --git a/gl/stdlib.in.h b/gl/stdlib.in.h
index 95237f2a..c2d8ce33 100644
--- a/gl/stdlib.in.h
+++ b/gl/stdlib.in.h
@@ -229,9 +229,15 @@ _GL_INLINE_HEADER_BEGIN
229 229
230/* Declarations for ISO C N3322. */ 230/* Declarations for ISO C N3322. */
231#if defined __GNUC__ && __GNUC__ >= 15 && !defined __clang__ 231#if defined __GNUC__ && __GNUC__ >= 15 && !defined __clang__
232<<<<<<< HEAD
233_GL_EXTERN_C void *(bsearch) (const void *__key,
234 const void *__base, size_t __nmemb, size_t __size,
235 int (*__compare) (const void *, const void *))
236=======
232_GL_EXTERN_C void *_GL_FUNCDECL_SYS_NAME (bsearch) 237_GL_EXTERN_C void *_GL_FUNCDECL_SYS_NAME (bsearch)
233 (const void *__key, const void *__base, size_t __nmemb, size_t __size, 238 (const void *__key, const void *__base, size_t __nmemb, size_t __size,
234 int (*__compare) (const void *, const void *)) 239 int (*__compare) (const void *, const void *))
240>>>>>>> master
235 _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3) _GL_ARG_NONNULL ((5)); 241 _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3) _GL_ARG_NONNULL ((5));
236_GL_EXTERN_C void qsort (void *__base, size_t __nmemb, size_t __size, 242_GL_EXTERN_C void qsort (void *__base, size_t __nmemb, size_t __size,
237 int (*__compare) (const void *, const void *)) 243 int (*__compare) (const void *, const void *))
diff --git a/gl/uchar.h b/gl/uchar.h
new file mode 100644
index 00000000..a06ed8ab
--- /dev/null
+++ b/gl/uchar.h
@@ -0,0 +1,1449 @@
1/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
2/* <uchar.h> substitute - 16-bit and 32-bit wide character types.
3 Copyright (C) 2019-2025 Free Software Foundation, Inc.
4
5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as
7 published by the Free Software Foundation; either version 2.1 of the
8 License, or (at your option) any later version.
9
10 This file is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public License
16 along with this program. If not, see <https://www.gnu.org/licenses/>. */
17
18/* Written by Bruno Haible <bruno@clisp.org>, 2019. */
19
20/*
21 * ISO C 23 <uchar.h> for platforms that lack it.
22 */
23
24#ifndef _GL_UCHAR_H
25
26#if __GNUC__ >= 3
27#pragma GCC system_header
28#endif
29
30
31/* The include_next requires a split double-inclusion guard. */
32#if (defined __cplusplus ? 0 : 1)
33# if defined __HAIKU__
34/* Work around <https://dev.haiku-os.org/ticket/17040>. */
35# include <stdint.h>
36# endif
37/* On AIX 7.2 with xlclang++, /usr/include/uchar.h produces compilation errors
38 because it contains typedef definitions of char16_t and char32_t, however
39 char16_t and char32_t are keywords in this situation. To work around it,
40 define char16_t and char32_t as macros. */
41# if defined __cplusplus && defined _AIX && defined __ibmxl__ && defined __clang__
42# define char16_t gl_char16_t
43# define char32_t gl_char32_t
44# endif
45# include_next <uchar.h>
46#endif
47
48#ifndef _GL_UCHAR_H
49#define _GL_UCHAR_H
50
51/* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE, _GL_BEGIN_C_LINKAGE,
52 _GL_ATTRIBUTE_PURE, GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */
53#if !_GL_CONFIG_H_INCLUDED
54 #error "Please include config.h first."
55#endif
56
57/* Get uint_least16_t, uint_least32_t. */
58#include <stdint.h>
59
60/* Get mbstate_t, size_t. */
61#include <wchar.h>
62
63/* For the inline functions. */
64#include <string.h>
65#include <wctype.h>
66
67/* The __attribute__ feature is available in gcc versions 2.5 and later.
68 The attribute __pure__ was added in gcc 2.96. */
69#ifndef _GL_ATTRIBUTE_PURE
70# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || defined __clang__
71# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
72# else
73# define _GL_ATTRIBUTE_PURE /* empty */
74# endif
75#endif
76
77/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
78/* C++ compatible function declaration macros.
79 Copyright (C) 2010-2025 Free Software Foundation, Inc.
80
81 This program is free software: you can redistribute it and/or modify it
82 under the terms of the GNU Lesser General Public License as published
83 by the Free Software Foundation; either version 2 of the License, or
84 (at your option) any later version.
85
86 This program is distributed in the hope that it will be useful,
87 but WITHOUT ANY WARRANTY; without even the implied warranty of
88 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
89 Lesser General Public License for more details.
90
91 You should have received a copy of the GNU Lesser General Public License
92 along with this program. If not, see <https://www.gnu.org/licenses/>. */
93
94#ifndef _GL_CXXDEFS_H
95#define _GL_CXXDEFS_H
96
97/* Begin/end the GNULIB_NAMESPACE namespace. */
98#if defined __cplusplus && defined GNULIB_NAMESPACE
99# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE {
100# define _GL_END_NAMESPACE }
101#else
102# define _GL_BEGIN_NAMESPACE
103# define _GL_END_NAMESPACE
104#endif
105
106/* The three most frequent use cases of these macros are:
107
108 * For providing a substitute for a function that is missing on some
109 platforms, but is declared and works fine on the platforms on which
110 it exists:
111
112 #if @GNULIB_FOO@
113 # if !@HAVE_FOO@
114 _GL_FUNCDECL_SYS (foo, ...);
115 # endif
116 _GL_CXXALIAS_SYS (foo, ...);
117 _GL_CXXALIASWARN (foo);
118 #elif defined GNULIB_POSIXCHECK
119 ...
120 #endif
121
122 * For providing a replacement for a function that exists on all platforms,
123 but is broken/insufficient and needs to be replaced on some platforms:
124
125 #if @GNULIB_FOO@
126 # if @REPLACE_FOO@
127 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
128 # undef foo
129 # define foo rpl_foo
130 # endif
131 _GL_FUNCDECL_RPL (foo, ...);
132 _GL_CXXALIAS_RPL (foo, ...);
133 # else
134 _GL_CXXALIAS_SYS (foo, ...);
135 # endif
136 _GL_CXXALIASWARN (foo);
137 #elif defined GNULIB_POSIXCHECK
138 ...
139 #endif
140
141 * For providing a replacement for a function that exists on some platforms
142 but is broken/insufficient and needs to be replaced on some of them and
143 is additionally either missing or undeclared on some other platforms:
144
145 #if @GNULIB_FOO@
146 # if @REPLACE_FOO@
147 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
148 # undef foo
149 # define foo rpl_foo
150 # endif
151 _GL_FUNCDECL_RPL (foo, ...);
152 _GL_CXXALIAS_RPL (foo, ...);
153 # else
154 # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@
155 _GL_FUNCDECL_SYS (foo, ...);
156 # endif
157 _GL_CXXALIAS_SYS (foo, ...);
158 # endif
159 _GL_CXXALIASWARN (foo);
160 #elif defined GNULIB_POSIXCHECK
161 ...
162 #endif
163*/
164
165/* _GL_EXTERN_C declaration;
166 performs the declaration with C linkage. */
167#if defined __cplusplus
168# define _GL_EXTERN_C extern "C"
169#else
170# define _GL_EXTERN_C extern
171#endif
172
173/* _GL_EXTERN_C_FUNC declaration;
174 performs the declaration of a function with C linkage. */
175#if defined __cplusplus
176# define _GL_EXTERN_C_FUNC extern "C"
177#else
178/* In C mode, omit the 'extern' keyword, because attributes in bracket syntax
179 are not allowed between 'extern' and the return type (see gnulib-common.m4).
180 */
181# define _GL_EXTERN_C_FUNC
182#endif
183
184/* _GL_FUNCDECL_RPL (func, rettype, parameters, [attributes]);
185 declares a replacement function, named rpl_func, with the given prototype,
186 consisting of return type, parameters, and attributes.
187 Although attributes are optional, the comma before them is required
188 for portability to C17 and earlier. The attribute _GL_ATTRIBUTE_NOTHROW,
189 if needed, must be placed after the _GL_FUNCDECL_RPL invocation,
190 at the end of the declaration.
191 Examples:
192 _GL_FUNCDECL_RPL (free, void, (void *ptr), ) _GL_ATTRIBUTE_NOTHROW;
193 _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...),
194 _GL_ARG_NONNULL ((1)));
195
196 Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front
197 of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's
198 because
199 [[...]] extern "C" <declaration>;
200 is invalid syntax in C++.)
201 */
202#define _GL_FUNCDECL_RPL(func,rettype,parameters,...) \
203 _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters, __VA_ARGS__)
204#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \
205 _GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters
206
207/* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]);
208 declares the system function, named func, with the given prototype,
209 consisting of return type, parameters, and attributes.
210 Although attributes are optional, the comma before them is required
211 for portability to C17 and earlier. The attribute _GL_ATTRIBUTE_NOTHROW,
212 if needed, must be placed after the _GL_FUNCDECL_RPL invocation,
213 at the end of the declaration.
214 Examples:
215 _GL_FUNCDECL_SYS (getumask, mode_t, (void), ) _GL_ATTRIBUTE_NOTHROW;
216 _GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD);
217 */
218#define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \
219 _GL_EXTERN_C_FUNC __VA_ARGS__ rettype func parameters
220
221/* _GL_CXXALIAS_RPL (func, rettype, parameters);
222 declares a C++ alias called GNULIB_NAMESPACE::func
223 that redirects to rpl_func, if GNULIB_NAMESPACE is defined.
224 Example:
225 _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...));
226
227 Wrapping rpl_func in an object with an inline conversion operator
228 avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is
229 actually used in the program. */
230#define _GL_CXXALIAS_RPL(func,rettype,parameters) \
231 _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters)
232#if defined __cplusplus && defined GNULIB_NAMESPACE
233# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
234 namespace GNULIB_NAMESPACE \
235 { \
236 static const struct _gl_ ## func ## _wrapper \
237 { \
238 typedef rettype (*type) parameters; \
239 \
240 inline operator type () const \
241 { \
242 return ::rpl_func; \
243 } \
244 } func = {}; \
245 } \
246 _GL_EXTERN_C int _gl_cxxalias_dummy
247#else
248# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
249 _GL_EXTERN_C int _gl_cxxalias_dummy
250#endif
251
252/* _GL_CXXALIAS_MDA (func, rettype, parameters);
253 is to be used when func is a Microsoft deprecated alias, on native Windows.
254 It declares a C++ alias called GNULIB_NAMESPACE::func
255 that redirects to _func, if GNULIB_NAMESPACE is defined.
256 Example:
257 _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...));
258 */
259#define _GL_CXXALIAS_MDA(func,rettype,parameters) \
260 _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters)
261
262/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters);
263 is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters);
264 except that the C function rpl_func may have a slightly different
265 declaration. A cast is used to silence the "invalid conversion" error
266 that would otherwise occur. */
267#if defined __cplusplus && defined GNULIB_NAMESPACE
268# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
269 namespace GNULIB_NAMESPACE \
270 { \
271 static const struct _gl_ ## func ## _wrapper \
272 { \
273 typedef rettype (*type) parameters; \
274 \
275 inline operator type () const \
276 { \
277 return reinterpret_cast<type>(::rpl_func); \
278 } \
279 } func = {}; \
280 } \
281 _GL_EXTERN_C int _gl_cxxalias_dummy
282#else
283# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
284 _GL_EXTERN_C int _gl_cxxalias_dummy
285#endif
286
287/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters);
288 is like _GL_CXXALIAS_MDA (func, rettype, parameters);
289 except that the C function func may have a slightly different declaration.
290 A cast is used to silence the "invalid conversion" error that would
291 otherwise occur. */
292#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \
293 _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters)
294
295/* _GL_CXXALIAS_SYS (func, rettype, parameters);
296 declares a C++ alias called GNULIB_NAMESPACE::func
297 that redirects to the system provided function func, if GNULIB_NAMESPACE
298 is defined.
299 Example:
300 _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...));
301
302 Wrapping func in an object with an inline conversion operator
303 avoids a reference to func unless GNULIB_NAMESPACE::func is
304 actually used in the program. */
305#if defined __cplusplus && defined GNULIB_NAMESPACE
306# define _GL_CXXALIAS_SYS(func,rettype,parameters) \
307 namespace GNULIB_NAMESPACE \
308 { \
309 static const struct _gl_ ## func ## _wrapper \
310 { \
311 typedef rettype (*type) parameters; \
312 \
313 inline operator type () const \
314 { \
315 return ::func; \
316 } \
317 } func = {}; \
318 } \
319 _GL_EXTERN_C int _gl_cxxalias_dummy
320#else
321# define _GL_CXXALIAS_SYS(func,rettype,parameters) \
322 _GL_EXTERN_C int _gl_cxxalias_dummy
323#endif
324
325/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters);
326 is like _GL_CXXALIAS_SYS (func, rettype, parameters);
327 except that the C function func may have a slightly different declaration.
328 A cast is used to silence the "invalid conversion" error that would
329 otherwise occur. */
330#if defined __cplusplus && defined GNULIB_NAMESPACE
331# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
332 namespace GNULIB_NAMESPACE \
333 { \
334 static const struct _gl_ ## func ## _wrapper \
335 { \
336 typedef rettype (*type) parameters; \
337 \
338 inline operator type () const \
339 { \
340 return reinterpret_cast<type>(::func); \
341 } \
342 } func = {}; \
343 } \
344 _GL_EXTERN_C int _gl_cxxalias_dummy
345#else
346# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
347 _GL_EXTERN_C int _gl_cxxalias_dummy
348#endif
349
350/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2);
351 is like _GL_CXXALIAS_SYS (func, rettype, parameters);
352 except that the C function is picked among a set of overloaded functions,
353 namely the one with rettype2 and parameters2. Two consecutive casts
354 are used to silence the "cannot find a match" and "invalid conversion"
355 errors that would otherwise occur. */
356#if defined __cplusplus && defined GNULIB_NAMESPACE
357 /* The outer cast must be a reinterpret_cast.
358 The inner cast: When the function is defined as a set of overloaded
359 functions, it works as a static_cast<>, choosing the designated variant.
360 When the function is defined as a single variant, it works as a
361 reinterpret_cast<>. The parenthesized cast syntax works both ways. */
362# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
363 namespace GNULIB_NAMESPACE \
364 { \
365 static const struct _gl_ ## func ## _wrapper \
366 { \
367 typedef rettype (*type) parameters; \
368 \
369 inline operator type () const \
370 { \
371 return reinterpret_cast<type>((rettype2 (*) parameters2)(::func)); \
372 } \
373 } func = {}; \
374 } \
375 _GL_EXTERN_C int _gl_cxxalias_dummy
376#else
377# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
378 _GL_EXTERN_C int _gl_cxxalias_dummy
379#endif
380
381/* _GL_CXXALIASWARN (func);
382 causes a warning to be emitted when ::func is used but not when
383 GNULIB_NAMESPACE::func is used. func must be defined without overloaded
384 variants. */
385#if defined __cplusplus && defined GNULIB_NAMESPACE
386# define _GL_CXXALIASWARN(func) \
387 _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE)
388# define _GL_CXXALIASWARN_1(func,namespace) \
389 _GL_CXXALIASWARN_2 (func, namespace)
390/* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
391 we enable the warning only when not optimizing. */
392# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__)
393# define _GL_CXXALIASWARN_2(func,namespace) \
394 _GL_WARN_ON_USE (func, \
395 "The symbol ::" #func " refers to the system function. " \
396 "Use " #namespace "::" #func " instead.")
397# elif (__GNUC__ >= 3 || defined __clang__) && GNULIB_STRICT_CHECKING
398# define _GL_CXXALIASWARN_2(func,namespace) \
399 extern __typeof__ (func) func
400# else
401# define _GL_CXXALIASWARN_2(func,namespace) \
402 _GL_EXTERN_C int _gl_cxxalias_dummy
403# endif
404#else
405# define _GL_CXXALIASWARN(func) \
406 _GL_EXTERN_C int _gl_cxxalias_dummy
407#endif
408
409/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes);
410 causes a warning to be emitted when the given overloaded variant of ::func
411 is used but not when GNULIB_NAMESPACE::func is used. */
412#if defined __cplusplus && defined GNULIB_NAMESPACE
413# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
414 _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \
415 GNULIB_NAMESPACE)
416# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \
417 _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace)
418/* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
419 we enable the warning only when not optimizing. */
420# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__)
421# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
422 _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \
423 "The symbol ::" #func " refers to the system function. " \
424 "Use " #namespace "::" #func " instead.")
425# else
426# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
427 _GL_EXTERN_C int _gl_cxxalias_dummy
428# endif
429#else
430# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
431 _GL_EXTERN_C int _gl_cxxalias_dummy
432#endif
433
434#endif /* _GL_CXXDEFS_H */
435
436/* The definition of _GL_ARG_NONNULL is copied here. */
437/* A C macro for declaring that specific arguments must not be NULL.
438 Copyright (C) 2009-2025 Free Software Foundation, Inc.
439
440 This program is free software: you can redistribute it and/or modify it
441 under the terms of the GNU Lesser General Public License as published
442 by the Free Software Foundation; either version 2 of the License, or
443 (at your option) any later version.
444
445 This program is distributed in the hope that it will be useful,
446 but WITHOUT ANY WARRANTY; without even the implied warranty of
447 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
448 Lesser General Public License for more details.
449
450 You should have received a copy of the GNU Lesser General Public License
451 along with this program. If not, see <https://www.gnu.org/licenses/>. */
452
453/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools
454 that the values passed as arguments n, ..., m must be non-NULL pointers.
455 n = 1 stands for the first argument, n = 2 for the second argument etc. */
456#ifndef _GL_ARG_NONNULL
457# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__
458# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params))
459# else
460# define _GL_ARG_NONNULL(params)
461# endif
462#endif
463
464/* The definition of _GL_WARN_ON_USE is copied here. */
465/* A C macro for emitting warnings if a function is used.
466 Copyright (C) 2010-2025 Free Software Foundation, Inc.
467
468 This program is free software: you can redistribute it and/or modify it
469 under the terms of the GNU Lesser General Public License as published
470 by the Free Software Foundation; either version 2 of the License, or
471 (at your option) any later version.
472
473 This program is distributed in the hope that it will be useful,
474 but WITHOUT ANY WARRANTY; without even the implied warranty of
475 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
476 Lesser General Public License for more details.
477
478 You should have received a copy of the GNU Lesser General Public License
479 along with this program. If not, see <https://www.gnu.org/licenses/>. */
480
481/* _GL_WARN_ON_USE (function, "literal string") issues a declaration
482 for FUNCTION which will then trigger a compiler warning containing
483 the text of "literal string" anywhere that function is called, if
484 supported by the compiler. If the compiler does not support this
485 feature, the macro expands to an unused extern declaration.
486
487 _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the
488 attribute used in _GL_WARN_ON_USE. If the compiler does not support
489 this feature, it expands to empty.
490
491 These macros are useful for marking a function as a potential
492 portability trap, with the intent that "literal string" include
493 instructions on the replacement function that should be used
494 instead.
495 _GL_WARN_ON_USE is for functions with 'extern' linkage.
496 _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline'
497 linkage.
498
499 _GL_WARN_ON_USE should not be used more than once for a given function
500 in a given compilation unit (because this may generate a warning even
501 if the function is never called).
502
503 However, one of the reasons that a function is a portability trap is
504 if it has the wrong signature. Declaring FUNCTION with a different
505 signature in C is a compilation error, so this macro must use the
506 same type as any existing declaration so that programs that avoid
507 the problematic FUNCTION do not fail to compile merely because they
508 included a header that poisoned the function. But this implies that
509 _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already
510 have a declaration. Use of this macro implies that there must not
511 be any other macro hiding the declaration of FUNCTION; but
512 undefining FUNCTION first is part of the poisoning process anyway
513 (although for symbols that are provided only via a macro, the result
514 is a compilation error rather than a warning containing
515 "literal string"). Also note that in C++, it is only safe to use if
516 FUNCTION has no overloads.
517
518 For an example, it is possible to poison 'getline' by:
519 - adding a call to gl_WARN_ON_USE_PREPARE([[#include <stdio.h>]],
520 [getline]) in configure.ac, which potentially defines
521 HAVE_RAW_DECL_GETLINE
522 - adding this code to a header that wraps the system <stdio.h>:
523 #undef getline
524 #if HAVE_RAW_DECL_GETLINE
525 _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but"
526 "not universally present; use the gnulib module getline");
527 #endif
528
529 It is not possible to directly poison global variables. But it is
530 possible to write a wrapper accessor function, and poison that
531 (less common usage, like &environ, will cause a compilation error
532 rather than issue the nice warning, but the end result of informing
533 the developer about their portability problem is still achieved):
534 #if HAVE_RAW_DECL_ENVIRON
535 static char ***
536 rpl_environ (void) { return &environ; }
537 _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared");
538 # undef environ
539 # define environ (*rpl_environ ())
540 #endif
541 or better (avoiding contradictory use of 'static' and 'extern'):
542 #if HAVE_RAW_DECL_ENVIRON
543 static char ***
544 _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared")
545 rpl_environ (void) { return &environ; }
546 # undef environ
547 # define environ (*rpl_environ ())
548 #endif
549 */
550#ifndef _GL_WARN_ON_USE
551
552# if (4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)) && !defined __clang__
553/* A compiler attribute is available in gcc versions 4.3.0 and later. */
554# define _GL_WARN_ON_USE(function, message) \
555_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message)))
556# define _GL_WARN_ON_USE_ATTRIBUTE(message) \
557 __attribute__ ((__warning__ (message)))
558# elif __clang_major__ >= 4
559/* Another compiler attribute is available in clang. */
560# define _GL_WARN_ON_USE(function, message) \
561_GL_WARN_EXTERN_C __typeof__ (function) function \
562 __attribute__ ((__diagnose_if__ (1, message, "warning")))
563# define _GL_WARN_ON_USE_ATTRIBUTE(message) \
564 __attribute__ ((__diagnose_if__ (1, message, "warning")))
565# elif (__GNUC__ >= 3 || defined __clang__) && GNULIB_STRICT_CHECKING
566/* Verify the existence of the function. */
567# define _GL_WARN_ON_USE(function, message) \
568_GL_WARN_EXTERN_C __typeof__ (function) function
569# define _GL_WARN_ON_USE_ATTRIBUTE(message)
570# else /* Unsupported. */
571# define _GL_WARN_ON_USE(function, message) \
572_GL_WARN_EXTERN_C int _gl_warn_on_use
573# define _GL_WARN_ON_USE_ATTRIBUTE(message)
574# endif
575#endif
576
577/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message")
578 is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the
579 function is declared with the given prototype, consisting of return type,
580 parameters, and attributes.
581 This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does
582 not work in this case. */
583#ifndef _GL_WARN_ON_USE_CXX
584# if !defined __cplusplus
585# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \
586 _GL_WARN_ON_USE (function, msg)
587# else
588# if (4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)) && !defined __clang__
589/* A compiler attribute is available in gcc versions 4.3.0 and later. */
590# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \
591extern rettype_gcc function parameters_and_attributes \
592 __attribute__ ((__warning__ (msg)))
593# elif __clang_major__ >= 4
594/* Another compiler attribute is available in clang. */
595# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \
596extern rettype_clang function parameters_and_attributes \
597 __attribute__ ((__diagnose_if__ (1, msg, "warning")))
598# elif (__GNUC__ >= 3 || defined __clang__) && GNULIB_STRICT_CHECKING
599/* Verify the existence of the function. */
600# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \
601extern rettype_gcc function parameters_and_attributes
602# else /* Unsupported. */
603# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \
604_GL_WARN_EXTERN_C int _gl_warn_on_use
605# endif
606# endif
607#endif
608
609/* _GL_WARN_EXTERN_C declaration;
610 performs the declaration with C linkage. */
611#ifndef _GL_WARN_EXTERN_C
612# if defined __cplusplus
613# define _GL_WARN_EXTERN_C extern "C"
614# else
615# define _GL_WARN_EXTERN_C extern
616# endif
617#endif
618
619
620_GL_INLINE_HEADER_BEGIN
621
622
623#if !(defined __cplusplus ? 0 || 0 : 1)
624
625/* An 8-bit variant of wchar_t.
626 Note: This type is only mandated by ISO C 23 or newer, and it does
627 denote UTF-8 units. */
628typedef unsigned char char8_t;
629
630#elif 0
631
632typedef unsigned char gl_char8_t;
633# define char8_t gl_char8_t
634
635#endif
636
637#if !(defined __cplusplus ? 0 || 0 : 1)
638
639/* A 16-bit variant of wchar_t.
640 Note: This type is only mandated by ISO C 11 or newer. In ISO C 23
641 and newer, it denotes UTF-16 units; in older versions of ISO C it did
642 so only on platforms on which __STDC_UTF_16__ was defined. */
643typedef uint_least16_t char16_t;
644
645#elif 0
646
647typedef uint_least16_t gl_char16_t;
648# define char16_t gl_char16_t
649
650#endif
651
652#if !(defined __cplusplus ? 0 || 0 : 1)
653
654/* A 32-bit variant of wchar_t.
655 Note: This type is only mandated by ISO C 11 or newer. In ISO C 23
656 and newer, it denotes UTF-32 code points; in older versions of ISO C
657 it did so only on platforms on which __STDC_UTF_32__ was defined.
658 In gnulib, we guarantee that it denotes UTF-32 code points if and
659 only if the module 'uchar-h-c23' is in use. */
660typedef uint_least32_t char32_t;
661
662#elif 0
663
664typedef uint_least32_t gl_char32_t;
665# define char32_t gl_char32_t
666
667#endif
668
669/* Define if a 'char32_t' can hold more characters than a 'wchar_t'. */
670#if 0 /* 32-bit AIX, Cygwin, native Windows */
671# define _GL_SMALL_WCHAR_T 1
672#endif
673
674/* Define if 'wchar_t', like 'char32_t',
675 - is a 32-bit type, and
676 - represents Unicode code points.
677 For this test, we can use __STDC_ISO_10646__ (defined by glibc, musl libc,
678 Cygwin) but need to consider _GL_SMALL_WCHAR_T, so as to exclude Cygwin.
679 We cannot use __STDC_UTF_16__ or __STDC_UTF_32__
680 - because these macros provide info about char16_t and char32_t (not
681 wchar_t!), and
682 - because GCC >= 4.9 defines these macros on all platforms, even on
683 FreeBSD and Solaris.
684 We should better not use __STD_UTF_16__, __STD_UTF_32__ either, because
685 these macros are misspellings, only defined by Android's <uchar.h>. */
686#if defined __STDC_ISO_10646__ && !_GL_SMALL_WCHAR_T
687/* glibc, musl libc */
688# define _GL_WCHAR_T_IS_UCS4 1
689#endif
690#if _GL_WCHAR_T_IS_UCS4
691static_assert (sizeof (char32_t) == sizeof (wchar_t));
692#endif
693
694
695/* Convert a single-byte character to a 32-bit wide character. */
696#if 0
697# if _GL_WCHAR_T_IS_UCS4 && !defined IN_BTOC32
698_GL_BEGIN_C_LINKAGE
699_GL_INLINE _GL_ATTRIBUTE_PURE wint_t
700btoc32 (int c)
701{
702 return
703# if 1 && defined __cplusplus && defined GNULIB_NAMESPACE
704 GNULIB_NAMESPACE::
705# endif
706 btowc (c);
707}
708_GL_END_C_LINKAGE
709# else
710_GL_FUNCDECL_SYS (btoc32, wint_t, (int c), _GL_ATTRIBUTE_PURE);
711# endif
712_GL_CXXALIAS_SYS (btoc32, wint_t, (int c));
713_GL_CXXALIASWARN (btoc32);
714#endif
715
716
717/* Test a specific property of a 32-bit wide character. */
718#if 1
719# if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32ISALNUM
720_GL_BEGIN_C_LINKAGE
721_GL_INLINE int
722c32isalnum (wint_t wc)
723{
724 return
725# if defined __cplusplus && defined GNULIB_NAMESPACE
726 GNULIB_NAMESPACE::
727# endif
728 iswalnum (wc);
729}
730_GL_END_C_LINKAGE
731# else
732_GL_FUNCDECL_SYS (c32isalnum, int, (wint_t wc), );
733# endif
734_GL_CXXALIAS_SYS (c32isalnum, int, (wint_t wc));
735_GL_CXXALIASWARN (c32isalnum);
736#endif
737#if 1
738# if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32ISALPHA
739_GL_BEGIN_C_LINKAGE
740_GL_INLINE int
741c32isalpha (wint_t wc)
742{
743 return
744# if defined __cplusplus && defined GNULIB_NAMESPACE
745 GNULIB_NAMESPACE::
746# endif
747 iswalpha (wc);
748}
749_GL_END_C_LINKAGE
750# else
751_GL_FUNCDECL_SYS (c32isalpha, int, (wint_t wc), );
752# endif
753_GL_CXXALIAS_SYS (c32isalpha, int, (wint_t wc));
754_GL_CXXALIASWARN (c32isalpha);
755#endif
756#if 1
757# if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32ISBLANK
758_GL_BEGIN_C_LINKAGE
759_GL_INLINE int
760c32isblank (wint_t wc)
761{
762 return
763# if defined __cplusplus && defined GNULIB_NAMESPACE
764 GNULIB_NAMESPACE::
765# endif
766 iswblank (wc);
767}
768_GL_END_C_LINKAGE
769# else
770_GL_FUNCDECL_SYS (c32isblank, int, (wint_t wc), );
771# endif
772_GL_CXXALIAS_SYS (c32isblank, int, (wint_t wc));
773_GL_CXXALIASWARN (c32isblank);
774#endif
775#if 1
776# if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32ISCNTRL
777_GL_BEGIN_C_LINKAGE
778_GL_INLINE int
779c32iscntrl (wint_t wc)
780{
781 return
782# if defined __cplusplus && defined GNULIB_NAMESPACE
783 GNULIB_NAMESPACE::
784# endif
785 iswcntrl (wc);
786}
787_GL_END_C_LINKAGE
788# else
789_GL_FUNCDECL_SYS (c32iscntrl, int, (wint_t wc), );
790# endif
791_GL_CXXALIAS_SYS (c32iscntrl, int, (wint_t wc));
792_GL_CXXALIASWARN (c32iscntrl);
793#endif
794#if 1
795# if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32ISDIGIT
796_GL_BEGIN_C_LINKAGE
797_GL_INLINE int
798c32isdigit (wint_t wc)
799{
800 return
801# if 1 && defined __cplusplus && defined GNULIB_NAMESPACE
802 GNULIB_NAMESPACE::
803# endif
804 iswdigit (wc);
805}
806_GL_END_C_LINKAGE
807# else
808_GL_FUNCDECL_SYS (c32isdigit, int, (wint_t wc), );
809# endif
810_GL_CXXALIAS_SYS (c32isdigit, int, (wint_t wc));
811_GL_CXXALIASWARN (c32isdigit);
812#endif
813#if 1
814# if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32ISGRAPH
815_GL_BEGIN_C_LINKAGE
816_GL_INLINE int
817c32isgraph (wint_t wc)
818{
819 return
820# if defined __cplusplus && defined GNULIB_NAMESPACE
821 GNULIB_NAMESPACE::
822# endif
823 iswgraph (wc);
824}
825_GL_END_C_LINKAGE
826# else
827_GL_FUNCDECL_SYS (c32isgraph, int, (wint_t wc), );
828# endif
829_GL_CXXALIAS_SYS (c32isgraph, int, (wint_t wc));
830_GL_CXXALIASWARN (c32isgraph);
831#endif
832#if 1
833# if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32ISLOWER
834_GL_BEGIN_C_LINKAGE
835_GL_INLINE int
836c32islower (wint_t wc)
837{
838 return
839# if defined __cplusplus && defined GNULIB_NAMESPACE
840 GNULIB_NAMESPACE::
841# endif
842 iswlower (wc);
843}
844_GL_END_C_LINKAGE
845# else
846_GL_FUNCDECL_SYS (c32islower, int, (wint_t wc), );
847# endif
848_GL_CXXALIAS_SYS (c32islower, int, (wint_t wc));
849_GL_CXXALIASWARN (c32islower);
850#endif
851#if 1
852# if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32ISPRINT
853_GL_BEGIN_C_LINKAGE
854_GL_INLINE int
855c32isprint (wint_t wc)
856{
857 return
858# if defined __cplusplus && defined GNULIB_NAMESPACE
859 GNULIB_NAMESPACE::
860# endif
861 iswprint (wc);
862}
863_GL_END_C_LINKAGE
864# else
865_GL_FUNCDECL_SYS (c32isprint, int, (wint_t wc), );
866# endif
867_GL_CXXALIAS_SYS (c32isprint, int, (wint_t wc));
868_GL_CXXALIASWARN (c32isprint);
869#endif
870#if 1
871# if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32ISPUNCT
872_GL_BEGIN_C_LINKAGE
873_GL_INLINE int
874c32ispunct (wint_t wc)
875{
876 return
877# if defined __cplusplus && defined GNULIB_NAMESPACE
878 GNULIB_NAMESPACE::
879# endif
880 iswpunct (wc);
881}
882_GL_END_C_LINKAGE
883# else
884_GL_FUNCDECL_SYS (c32ispunct, int, (wint_t wc), );
885# endif
886_GL_CXXALIAS_SYS (c32ispunct, int, (wint_t wc));
887_GL_CXXALIASWARN (c32ispunct);
888#endif
889#if 1
890# if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32ISSPACE
891_GL_BEGIN_C_LINKAGE
892_GL_INLINE int
893c32isspace (wint_t wc)
894{
895 return
896# if defined __cplusplus && defined GNULIB_NAMESPACE
897 GNULIB_NAMESPACE::
898# endif
899 iswspace (wc);
900}
901_GL_END_C_LINKAGE
902# else
903_GL_FUNCDECL_SYS (c32isspace, int, (wint_t wc), );
904# endif
905_GL_CXXALIAS_SYS (c32isspace, int, (wint_t wc));
906_GL_CXXALIASWARN (c32isspace);
907#endif
908#if 1
909# if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32ISUPPER
910_GL_BEGIN_C_LINKAGE
911_GL_INLINE int
912c32isupper (wint_t wc)
913{
914 return
915# if defined __cplusplus && defined GNULIB_NAMESPACE
916 GNULIB_NAMESPACE::
917# endif
918 iswupper (wc);
919}
920_GL_END_C_LINKAGE
921# else
922_GL_FUNCDECL_SYS (c32isupper, int, (wint_t wc), );
923# endif
924_GL_CXXALIAS_SYS (c32isupper, int, (wint_t wc));
925_GL_CXXALIASWARN (c32isupper);
926#endif
927#if 1
928# if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32ISXDIGIT
929_GL_BEGIN_C_LINKAGE
930_GL_INLINE int
931c32isxdigit (wint_t wc)
932{
933 return
934# if 1 && defined __cplusplus && defined GNULIB_NAMESPACE
935 GNULIB_NAMESPACE::
936# endif
937 iswxdigit (wc);
938}
939_GL_END_C_LINKAGE
940# else
941_GL_FUNCDECL_SYS (c32isxdigit, int, (wint_t wc), );
942# endif
943_GL_CXXALIAS_SYS (c32isxdigit, int, (wint_t wc));
944_GL_CXXALIASWARN (c32isxdigit);
945#endif
946
947
948/* Case mapping of a 32-bit wide character. */
949#if 1
950# if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32TOLOWER
951_GL_BEGIN_C_LINKAGE
952_GL_INLINE wint_t
953c32tolower (wint_t wc)
954{
955 return
956# if defined __cplusplus && defined GNULIB_NAMESPACE
957 GNULIB_NAMESPACE::
958# endif
959 towlower (wc);
960}
961_GL_END_C_LINKAGE
962# else
963_GL_FUNCDECL_SYS (c32tolower, wint_t, (wint_t wc), );
964# endif
965_GL_CXXALIAS_SYS (c32tolower, wint_t, (wint_t wc));
966_GL_CXXALIASWARN (c32tolower);
967#endif
968#if 0
969# if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32TOUPPER
970_GL_BEGIN_C_LINKAGE
971_GL_INLINE wint_t
972c32toupper (wint_t wc)
973{
974 return
975# if defined __cplusplus && defined GNULIB_NAMESPACE
976 GNULIB_NAMESPACE::
977# endif
978 towupper (wc);
979}
980_GL_END_C_LINKAGE
981# else
982_GL_FUNCDECL_SYS (c32toupper, wint_t, (wint_t wc), );
983# endif
984_GL_CXXALIAS_SYS (c32toupper, wint_t, (wint_t wc));
985_GL_CXXALIASWARN (c32toupper);
986#endif
987
988
989/* Number of screen columns needed for a 32-bit wide character. */
990#if 1
991# if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32WIDTH
992_GL_BEGIN_C_LINKAGE
993_GL_INLINE int
994c32width (char32_t wc)
995{
996 return
997# if 1 && defined __cplusplus && defined GNULIB_NAMESPACE
998 GNULIB_NAMESPACE::
999# endif
1000 wcwidth (wc);
1001}
1002_GL_END_C_LINKAGE
1003# else
1004_GL_FUNCDECL_SYS (c32width, int, (char32_t wc), );
1005# endif
1006_GL_CXXALIAS_SYS (c32width, int, (char32_t wc));
1007_GL_CXXALIASWARN (c32width);
1008#endif
1009
1010
1011/* Converts a 32-bit wide character to a multibyte character. */
1012#if 0
1013# if 0
1014# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1015# undef c32rtomb
1016# define c32rtomb rpl_c32rtomb
1017# endif
1018_GL_FUNCDECL_RPL (c32rtomb, size_t, (char *s, char32_t wc, mbstate_t *ps), );
1019_GL_CXXALIAS_RPL (c32rtomb, size_t, (char *s, char32_t wc, mbstate_t *ps));
1020# else
1021# if !1
1022_GL_FUNCDECL_SYS (c32rtomb, size_t, (char *s, char32_t wc, mbstate_t *ps), );
1023# endif
1024_GL_CXXALIAS_SYS (c32rtomb, size_t, (char *s, char32_t wc, mbstate_t *ps));
1025# endif
1026# if __GLIBC__ + (__GLIBC_MINOR__ >= 16) > 2
1027_GL_CXXALIASWARN (c32rtomb);
1028# endif
1029#elif defined GNULIB_POSIXCHECK
1030# undef c32rtomb
1031# if HAVE_RAW_DECL_C32RTOMB
1032_GL_WARN_ON_USE (c32rtomb, "c32rtomb is not portable - "
1033 "use gnulib module c32rtomb for portability");
1034# endif
1035#endif
1036
1037
1038/* Convert a 32-bit wide string to a string. */
1039#if 0
1040# if _GL_WCHAR_T_IS_UCS4 && !defined IN_C32SNRTOMBS
1041_GL_BEGIN_C_LINKAGE
1042_GL_INLINE _GL_ARG_NONNULL ((2)) size_t
1043c32snrtombs (char *dest, const char32_t **srcp, size_t srclen, size_t len,
1044 mbstate_t *ps)
1045{
1046 return
1047# if 0 && defined __cplusplus && defined GNULIB_NAMESPACE
1048 GNULIB_NAMESPACE::
1049# endif
1050 wcsnrtombs (dest, (const wchar_t **) srcp, srclen, len, ps);
1051}
1052_GL_END_C_LINKAGE
1053# else
1054_GL_FUNCDECL_SYS (c32snrtombs, size_t,
1055 (char *dest, const char32_t **srcp, size_t srclen, size_t len,
1056 mbstate_t *ps),
1057 _GL_ARG_NONNULL ((2)));
1058# endif
1059_GL_CXXALIAS_SYS (c32snrtombs, size_t,
1060 (char *dest, const char32_t **srcp, size_t srclen, size_t len,
1061 mbstate_t *ps));
1062_GL_CXXALIASWARN (c32snrtombs);
1063#endif
1064
1065
1066/* Convert a 32-bit wide string to a string. */
1067#if 0
1068# if _GL_WCHAR_T_IS_UCS4 && !defined IN_C32SRTOMBS
1069_GL_BEGIN_C_LINKAGE
1070_GL_INLINE _GL_ARG_NONNULL ((2)) size_t
1071c32srtombs (char *dest, const char32_t **srcp, size_t len, mbstate_t *ps)
1072{
1073 return
1074# if 0 && defined __cplusplus && defined GNULIB_NAMESPACE
1075 GNULIB_NAMESPACE::
1076# endif
1077 wcsrtombs (dest, (const wchar_t **) srcp, len, ps);
1078}
1079_GL_END_C_LINKAGE
1080# else
1081_GL_FUNCDECL_SYS (c32srtombs, size_t,
1082 (char *dest, const char32_t **srcp, size_t len,
1083 mbstate_t *ps),
1084 _GL_ARG_NONNULL ((2)));
1085# endif
1086_GL_CXXALIAS_SYS (c32srtombs, size_t,
1087 (char *dest, const char32_t **srcp, size_t len,
1088 mbstate_t *ps));
1089_GL_CXXALIASWARN (c32srtombs);
1090#endif
1091
1092
1093/* Convert a 32-bit wide string to a string. */
1094#if 0
1095# if _GL_WCHAR_T_IS_UCS4 && !defined IN_C32STOMBS
1096_GL_BEGIN_C_LINKAGE
1097_GL_INLINE _GL_ARG_NONNULL ((2)) size_t
1098c32stombs (char *dest, const char32_t *src, size_t len)
1099{
1100 mbstate_t state;
1101
1102 mbszero (&state);
1103 return c32srtombs (dest, &src, len, &state);
1104}
1105_GL_END_C_LINKAGE
1106# else
1107_GL_FUNCDECL_SYS (c32stombs, size_t,
1108 (char *dest, const char32_t *src, size_t len),
1109 _GL_ARG_NONNULL ((2)));
1110# endif
1111_GL_CXXALIAS_SYS (c32stombs, size_t,
1112 (char *dest, const char32_t *src, size_t len));
1113_GL_CXXALIASWARN (c32stombs);
1114#endif
1115
1116
1117/* Number of screen columns needed for a size-bounded 32-bit wide string. */
1118#if 0
1119# if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32SWIDTH
1120_GL_BEGIN_C_LINKAGE
1121_GL_INLINE _GL_ARG_NONNULL ((1)) int
1122c32swidth (const char32_t *s, size_t n)
1123{
1124 return
1125# if 0 && defined __cplusplus && defined GNULIB_NAMESPACE
1126 GNULIB_NAMESPACE::
1127# endif
1128 wcswidth ((const wchar_t *) s, n);
1129}
1130_GL_END_C_LINKAGE
1131# else
1132_GL_FUNCDECL_SYS (c32swidth, int, (const char32_t *s, size_t n),
1133 _GL_ARG_NONNULL ((1)));
1134# endif
1135_GL_CXXALIAS_SYS (c32swidth, int, (const char32_t *s, size_t n));
1136_GL_CXXALIASWARN (c32swidth);
1137#endif
1138
1139
1140/* Converts a 32-bit wide character to unibyte character.
1141 Returns the single-byte representation of WC if it exists,
1142 or EOF otherwise. */
1143#if 0
1144# if _GL_WCHAR_T_IS_UCS4 && !defined IN_C32TOB
1145_GL_BEGIN_C_LINKAGE
1146_GL_INLINE int
1147c32tob (wint_t wc)
1148{
1149 return
1150# if 0 && defined __cplusplus && defined GNULIB_NAMESPACE
1151 GNULIB_NAMESPACE::
1152# endif
1153 wctob (wc);
1154}
1155_GL_END_C_LINKAGE
1156# else
1157_GL_FUNCDECL_SYS (c32tob, int, (wint_t wc), );
1158# endif
1159_GL_CXXALIAS_SYS (c32tob, int, (wint_t wc));
1160_GL_CXXALIASWARN (c32tob);
1161#endif
1162
1163
1164/* Converts a multibyte character to a 32-bit wide character. */
1165#if 1
1166# if 1
1167# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1168# undef mbrtoc32
1169# define mbrtoc32 rpl_mbrtoc32
1170# endif
1171_GL_FUNCDECL_RPL (mbrtoc32, size_t,
1172 (char32_t *pc, const char *s, size_t n, mbstate_t *ps), );
1173_GL_CXXALIAS_RPL (mbrtoc32, size_t,
1174 (char32_t *pc, const char *s, size_t n, mbstate_t *ps));
1175# else
1176# if !1
1177_GL_FUNCDECL_SYS (mbrtoc32, size_t,
1178 (char32_t *pc, const char *s, size_t n, mbstate_t *ps), );
1179# endif
1180_GL_CXXALIAS_SYS (mbrtoc32, size_t,
1181 (char32_t *pc, const char *s, size_t n, mbstate_t *ps));
1182# endif
1183# if __GLIBC__ + (__GLIBC_MINOR__ >= 16) > 2
1184_GL_CXXALIASWARN (mbrtoc32);
1185# endif
1186#elif defined GNULIB_POSIXCHECK
1187# undef mbrtoc32
1188# if HAVE_RAW_DECL_MBRTOC32
1189_GL_WARN_ON_USE (mbrtoc32, "mbrtoc32 is not portable - "
1190 "use gnulib module mbrtoc32 for portability");
1191# endif
1192#endif
1193
1194
1195/* Converts a multibyte character and returns the next 16-bit wide
1196 character. */
1197#if 0
1198# if 0
1199# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1200# undef mbrtoc16
1201# define mbrtoc16 rpl_mbrtoc16
1202# endif
1203_GL_FUNCDECL_RPL (mbrtoc16, size_t,
1204 (char16_t *pc, const char *s, size_t n, mbstate_t *ps), );
1205_GL_CXXALIAS_RPL (mbrtoc16, size_t,
1206 (char16_t *pc, const char *s, size_t n, mbstate_t *ps));
1207# else
1208# if !1
1209_GL_FUNCDECL_SYS (mbrtoc16, size_t,
1210 (char16_t *pc, const char *s, size_t n, mbstate_t *ps), );
1211# endif
1212_GL_CXXALIAS_SYS (mbrtoc16, size_t,
1213 (char16_t *pc, const char *s, size_t n, mbstate_t *ps));
1214# endif
1215# if __GLIBC__ + (__GLIBC_MINOR__ >= 16) > 2
1216_GL_CXXALIASWARN (mbrtoc16);
1217# endif
1218#elif defined GNULIB_POSIXCHECK
1219# undef mbrtoc16
1220# if HAVE_RAW_DECL_MBRTOC16
1221_GL_WARN_ON_USE (mbrtoc16, "mbrtoc16 is not portable - "
1222 "use gnulib module mbrtoc16 for portability");
1223# endif
1224#endif
1225
1226
1227/* Convert a string to a 32-bit wide string. */
1228#if 0
1229# if _GL_WCHAR_T_IS_UCS4 && !defined IN_MBSNRTOC32S
1230_GL_BEGIN_C_LINKAGE
1231_GL_INLINE _GL_ARG_NONNULL ((2)) size_t
1232mbsnrtoc32s (char32_t *dest, const char **srcp, size_t srclen, size_t len,
1233 mbstate_t *ps)
1234{
1235 return
1236# if 0 && defined __cplusplus && defined GNULIB_NAMESPACE
1237 GNULIB_NAMESPACE::
1238# endif
1239 mbsnrtowcs ((wchar_t *) dest, srcp, srclen, len, ps);
1240}
1241_GL_END_C_LINKAGE
1242# else
1243_GL_FUNCDECL_SYS (mbsnrtoc32s, size_t,
1244 (char32_t *dest, const char **srcp, size_t srclen, size_t len,
1245 mbstate_t *ps),
1246 _GL_ARG_NONNULL ((2)));
1247# endif
1248_GL_CXXALIAS_SYS (mbsnrtoc32s, size_t,
1249 (char32_t *dest, const char **srcp, size_t srclen, size_t len,
1250 mbstate_t *ps));
1251_GL_CXXALIASWARN (mbsnrtoc32s);
1252#endif
1253
1254
1255/* Convert a string to a 32-bit wide string. */
1256#if 0
1257# if _GL_WCHAR_T_IS_UCS4 && !defined IN_MBSRTOC32S
1258_GL_BEGIN_C_LINKAGE
1259_GL_INLINE _GL_ARG_NONNULL ((2)) size_t
1260mbsrtoc32s (char32_t *dest, const char **srcp, size_t len, mbstate_t *ps)
1261{
1262 return
1263# if 0 && defined __cplusplus && defined GNULIB_NAMESPACE
1264 GNULIB_NAMESPACE::
1265# endif
1266 mbsrtowcs ((wchar_t *) dest, srcp, len, ps);
1267}
1268_GL_END_C_LINKAGE
1269# else
1270_GL_FUNCDECL_SYS (mbsrtoc32s, size_t,
1271 (char32_t *dest, const char **srcp, size_t len,
1272 mbstate_t *ps),
1273 _GL_ARG_NONNULL ((2)));
1274# endif
1275_GL_CXXALIAS_SYS (mbsrtoc32s, size_t,
1276 (char32_t *dest, const char **srcp, size_t len,
1277 mbstate_t *ps));
1278_GL_CXXALIASWARN (mbsrtoc32s);
1279#endif
1280
1281
1282/* Convert a string to a 32-bit wide string. */
1283#if 0
1284# if _GL_WCHAR_T_IS_UCS4 && !defined IN_MBSTOC32S
1285_GL_BEGIN_C_LINKAGE
1286_GL_INLINE _GL_ARG_NONNULL ((2)) size_t
1287mbstoc32s (char32_t *dest, const char *src, size_t len)
1288{
1289 mbstate_t state;
1290
1291 mbszero (&state);
1292 return mbsrtoc32s (dest, &src, len, &state);
1293}
1294_GL_END_C_LINKAGE
1295# else
1296_GL_FUNCDECL_SYS (mbstoc32s, size_t,
1297 (char32_t *dest, const char *src, size_t len),
1298 _GL_ARG_NONNULL ((2)));
1299# endif
1300_GL_CXXALIAS_SYS (mbstoc32s, size_t,
1301 (char32_t *dest, const char *src, size_t len));
1302_GL_CXXALIASWARN (mbstoc32s);
1303#endif
1304
1305
1306#if 0 || 0
1307/* A scalar type. Instances of this type, other than (c32_type_test_t) 0,
1308 represent a character property, sometimes also viewed as a "character class".
1309 It can be applied to 32-bit wide characters. It is the counterpart of
1310 type 'wctype_t' for wide characters.
1311 To test whether a given character has a certain property, use the function
1312 'c32_apply_type_test'. */
1313# if _GL_WCHAR_T_IS_UCS4
1314typedef wctype_t c32_type_test_t;
1315# else
1316typedef /*bool*/int (*c32_type_test_t) (wint_t wc);
1317# endif
1318#endif
1319
1320/* Return a character property with the given name, or (c32_type_test_t) 0
1321 if the designated property does not exist.
1322 This function is the counterpart of function 'wctype' for wide characters.
1323 */
1324#if 0
1325# if _GL_WCHAR_T_IS_UCS4 && !defined IN_C32_GET_TYPE_TEST
1326_GL_BEGIN_C_LINKAGE
1327_GL_INLINE _GL_ARG_NONNULL ((1)) c32_type_test_t
1328c32_get_type_test (const char *name)
1329{
1330 return
1331# if 1 && defined __cplusplus && defined GNULIB_NAMESPACE
1332 GNULIB_NAMESPACE::
1333# endif
1334 wctype (name);
1335}
1336_GL_END_C_LINKAGE
1337# else
1338_GL_FUNCDECL_SYS (c32_get_type_test, c32_type_test_t, (const char *name),
1339 _GL_ARG_NONNULL ((1)));
1340# endif
1341_GL_CXXALIAS_SYS (c32_get_type_test, c32_type_test_t, (const char *name));
1342_GL_CXXALIASWARN (c32_get_type_test);
1343#endif
1344
1345/* Test whether a given 32-bit wide character has the specified character
1346 property.
1347 Return non-zero if true, zero if false or if the argument is WEOF.
1348 This function is the counterpart of function 'iswctype' for wide characters.
1349 */
1350#if 0
1351# if _GL_WCHAR_T_IS_UCS4
1352# if !defined IN_C32_APPLY_TYPE_TEST
1353_GL_BEGIN_C_LINKAGE
1354_GL_INLINE int
1355c32_apply_type_test (wint_t wc, c32_type_test_t property)
1356{
1357 return
1358# if 1 && defined __cplusplus && defined GNULIB_NAMESPACE
1359 GNULIB_NAMESPACE::
1360# endif
1361 iswctype (wc, property);
1362}
1363_GL_END_C_LINKAGE
1364# else
1365_GL_FUNCDECL_SYS (c32_apply_type_test, int,
1366 (wint_t wc, c32_type_test_t property), );
1367# endif
1368# else
1369_GL_FUNCDECL_SYS (c32_apply_type_test, int,
1370 (wint_t wc, c32_type_test_t property),
1371 _GL_ARG_NONNULL ((2)));
1372# endif
1373_GL_CXXALIAS_SYS (c32_apply_type_test, int,
1374 (wint_t wc, c32_type_test_t property));
1375_GL_CXXALIASWARN (c32_apply_type_test);
1376#endif
1377
1378
1379#if 0 || 0
1380/* A scalar type. Instances of this type, other than (c32_mapping_t) 0,
1381 represent a character mapping. It can be applied to 32-bit wide characters.
1382 It is the counterpart of type 'wctrans_t' for wide characters.
1383 To apply a certain mapping to a given character, use the function
1384 'c32_apply_mapping'. */
1385# if _GL_WCHAR_T_IS_UCS4
1386typedef wctrans_t c32_mapping_t;
1387# else
1388typedef wint_t (*c32_mapping_t) (wint_t wc);
1389# endif
1390#endif
1391
1392/* Return a character mapping with the given name, or (c32_mapping_t) 0
1393 if the designated mapping does not exist.
1394 This function is the counterpart of function 'wctrans' for wide characters.
1395 */
1396#if 0
1397# if _GL_WCHAR_T_IS_UCS4 && !defined IN_C32_GET_MAPPING
1398_GL_BEGIN_C_LINKAGE
1399_GL_INLINE _GL_ARG_NONNULL ((1)) c32_mapping_t
1400c32_get_mapping (const char *name)
1401{
1402 return
1403# if 0 && defined __cplusplus && defined GNULIB_NAMESPACE
1404 GNULIB_NAMESPACE::
1405# endif
1406 wctrans (name);
1407}
1408_GL_END_C_LINKAGE
1409# else
1410_GL_FUNCDECL_SYS (c32_get_mapping, c32_mapping_t, (const char *name),
1411 _GL_ARG_NONNULL ((1)));
1412# endif
1413_GL_CXXALIAS_SYS (c32_get_mapping, c32_mapping_t, (const char *name));
1414_GL_CXXALIASWARN (c32_get_mapping);
1415#endif
1416
1417/* Apply the specified character mapping to a given 32-bit wide character.
1418 Return the result of this mapping. Return the WC argument unchanged if it is
1419 WEOF.
1420 This function is the counterpart of function 'towctrans' for wide characters.
1421 */
1422#if 0
1423# if _GL_WCHAR_T_IS_UCS4 && !defined IN_C32_APPLY_MAPPING
1424_GL_BEGIN_C_LINKAGE
1425_GL_INLINE _GL_ARG_NONNULL ((2)) wint_t
1426c32_apply_mapping (wint_t wc, c32_mapping_t mapping)
1427{
1428 return
1429# if 0 && defined __cplusplus && defined GNULIB_NAMESPACE
1430 GNULIB_NAMESPACE::
1431# endif
1432 towctrans (wc, mapping);
1433}
1434_GL_END_C_LINKAGE
1435# else
1436_GL_FUNCDECL_SYS (c32_apply_mapping, wint_t,
1437 (wint_t wc, c32_mapping_t mapping),
1438 _GL_ARG_NONNULL ((2)));
1439# endif
1440_GL_CXXALIAS_SYS (c32_apply_mapping, wint_t,
1441 (wint_t wc, c32_mapping_t mapping));
1442_GL_CXXALIASWARN (c32_apply_mapping);
1443#endif
1444
1445
1446_GL_INLINE_HEADER_END
1447
1448#endif /* _GL_UCHAR_H */
1449#endif /* _GL_UCHAR_H */
diff --git a/gl/unicase/.deps/libgnu_a-tolower.Po b/gl/unicase/.deps/libgnu_a-tolower.Po
new file mode 100644
index 00000000..53c0e96d
--- /dev/null
+++ b/gl/unicase/.deps/libgnu_a-tolower.Po
@@ -0,0 +1,43 @@
1unicase/libgnu_a-tolower.o: unicase/tolower.c /usr/include/stdc-predef.h \
2 ../config.h unicase.h unitypes.h \
3 /usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stdint.h \
4 /usr/include/stdint.h /usr/include/bits/libc-header-start.h \
5 /usr/include/features.h /usr/include/features-time64.h \
6 /usr/include/bits/wordsize.h /usr/include/bits/timesize.h \
7 /usr/include/sys/cdefs.h /usr/include/bits/long-double.h \
8 /usr/include/gnu/stubs.h /usr/include/gnu/stubs-64.h \
9 /usr/include/bits/types.h /usr/include/bits/typesizes.h \
10 /usr/include/bits/time64.h /usr/include/bits/wchar.h \
11 /usr/include/bits/stdint-intn.h /usr/include/bits/stdint-uintn.h \
12 /usr/include/bits/stdint-least.h \
13 /usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stdbool.h stddef.h \
14 /usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stddef.h uninorm.h \
15 unicase/tolower.h unicase/simple-mapping.h
16/usr/include/stdc-predef.h:
17../config.h:
18unicase.h:
19unitypes.h:
20/usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stdint.h:
21/usr/include/stdint.h:
22/usr/include/bits/libc-header-start.h:
23/usr/include/features.h:
24/usr/include/features-time64.h:
25/usr/include/bits/wordsize.h:
26/usr/include/bits/timesize.h:
27/usr/include/sys/cdefs.h:
28/usr/include/bits/long-double.h:
29/usr/include/gnu/stubs.h:
30/usr/include/gnu/stubs-64.h:
31/usr/include/bits/types.h:
32/usr/include/bits/typesizes.h:
33/usr/include/bits/time64.h:
34/usr/include/bits/wchar.h:
35/usr/include/bits/stdint-intn.h:
36/usr/include/bits/stdint-uintn.h:
37/usr/include/bits/stdint-least.h:
38/usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stdbool.h:
39stddef.h:
40/usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stddef.h:
41uninorm.h:
42unicase/tolower.h:
43unicase/simple-mapping.h:
diff --git a/gl/unictype/.deps/libgnu_a-ctype_alnum.Po b/gl/unictype/.deps/libgnu_a-ctype_alnum.Po
new file mode 100644
index 00000000..9af7af75
--- /dev/null
+++ b/gl/unictype/.deps/libgnu_a-ctype_alnum.Po
@@ -0,0 +1,42 @@
1unictype/libgnu_a-ctype_alnum.o: unictype/ctype_alnum.c \
2 /usr/include/stdc-predef.h ../config.h unictype.h unitypes.h \
3 /usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stdint.h \
4 /usr/include/stdint.h /usr/include/bits/libc-header-start.h \
5 /usr/include/features.h /usr/include/features-time64.h \
6 /usr/include/bits/wordsize.h /usr/include/bits/timesize.h \
7 /usr/include/sys/cdefs.h /usr/include/bits/long-double.h \
8 /usr/include/gnu/stubs.h /usr/include/gnu/stubs-64.h \
9 /usr/include/bits/types.h /usr/include/bits/typesizes.h \
10 /usr/include/bits/time64.h /usr/include/bits/wchar.h \
11 /usr/include/bits/stdint-intn.h /usr/include/bits/stdint-uintn.h \
12 /usr/include/bits/stdint-least.h \
13 /usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stdbool.h stddef.h \
14 /usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stddef.h \
15 unictype/bitmap.h unictype/ctype_alnum.h
16/usr/include/stdc-predef.h:
17../config.h:
18unictype.h:
19unitypes.h:
20/usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stdint.h:
21/usr/include/stdint.h:
22/usr/include/bits/libc-header-start.h:
23/usr/include/features.h:
24/usr/include/features-time64.h:
25/usr/include/bits/wordsize.h:
26/usr/include/bits/timesize.h:
27/usr/include/sys/cdefs.h:
28/usr/include/bits/long-double.h:
29/usr/include/gnu/stubs.h:
30/usr/include/gnu/stubs-64.h:
31/usr/include/bits/types.h:
32/usr/include/bits/typesizes.h:
33/usr/include/bits/time64.h:
34/usr/include/bits/wchar.h:
35/usr/include/bits/stdint-intn.h:
36/usr/include/bits/stdint-uintn.h:
37/usr/include/bits/stdint-least.h:
38/usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stdbool.h:
39stddef.h:
40/usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stddef.h:
41unictype/bitmap.h:
42unictype/ctype_alnum.h:
diff --git a/gl/unictype/.deps/libgnu_a-ctype_alpha.Po b/gl/unictype/.deps/libgnu_a-ctype_alpha.Po
new file mode 100644
index 00000000..fe1d271e
--- /dev/null
+++ b/gl/unictype/.deps/libgnu_a-ctype_alpha.Po
@@ -0,0 +1,42 @@
1unictype/libgnu_a-ctype_alpha.o: unictype/ctype_alpha.c \
2 /usr/include/stdc-predef.h ../config.h unictype.h unitypes.h \
3 /usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stdint.h \
4 /usr/include/stdint.h /usr/include/bits/libc-header-start.h \
5 /usr/include/features.h /usr/include/features-time64.h \
6 /usr/include/bits/wordsize.h /usr/include/bits/timesize.h \
7 /usr/include/sys/cdefs.h /usr/include/bits/long-double.h \
8 /usr/include/gnu/stubs.h /usr/include/gnu/stubs-64.h \
9 /usr/include/bits/types.h /usr/include/bits/typesizes.h \
10 /usr/include/bits/time64.h /usr/include/bits/wchar.h \
11 /usr/include/bits/stdint-intn.h /usr/include/bits/stdint-uintn.h \
12 /usr/include/bits/stdint-least.h \
13 /usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stdbool.h stddef.h \
14 /usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stddef.h \
15 unictype/bitmap.h unictype/ctype_alpha.h
16/usr/include/stdc-predef.h:
17../config.h:
18unictype.h:
19unitypes.h:
20/usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stdint.h:
21/usr/include/stdint.h:
22/usr/include/bits/libc-header-start.h:
23/usr/include/features.h:
24/usr/include/features-time64.h:
25/usr/include/bits/wordsize.h:
26/usr/include/bits/timesize.h:
27/usr/include/sys/cdefs.h:
28/usr/include/bits/long-double.h:
29/usr/include/gnu/stubs.h:
30/usr/include/gnu/stubs-64.h:
31/usr/include/bits/types.h:
32/usr/include/bits/typesizes.h:
33/usr/include/bits/time64.h:
34/usr/include/bits/wchar.h:
35/usr/include/bits/stdint-intn.h:
36/usr/include/bits/stdint-uintn.h:
37/usr/include/bits/stdint-least.h:
38/usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stdbool.h:
39stddef.h:
40/usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stddef.h:
41unictype/bitmap.h:
42unictype/ctype_alpha.h:
diff --git a/gl/unictype/.deps/libgnu_a-ctype_blank.Po b/gl/unictype/.deps/libgnu_a-ctype_blank.Po
new file mode 100644
index 00000000..b7eb8ece
--- /dev/null
+++ b/gl/unictype/.deps/libgnu_a-ctype_blank.Po
@@ -0,0 +1,42 @@
1unictype/libgnu_a-ctype_blank.o: unictype/ctype_blank.c \
2 /usr/include/stdc-predef.h ../config.h unictype.h unitypes.h \
3 /usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stdint.h \
4 /usr/include/stdint.h /usr/include/bits/libc-header-start.h \
5 /usr/include/features.h /usr/include/features-time64.h \
6 /usr/include/bits/wordsize.h /usr/include/bits/timesize.h \
7 /usr/include/sys/cdefs.h /usr/include/bits/long-double.h \
8 /usr/include/gnu/stubs.h /usr/include/gnu/stubs-64.h \
9 /usr/include/bits/types.h /usr/include/bits/typesizes.h \
10 /usr/include/bits/time64.h /usr/include/bits/wchar.h \
11 /usr/include/bits/stdint-intn.h /usr/include/bits/stdint-uintn.h \
12 /usr/include/bits/stdint-least.h \
13 /usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stdbool.h stddef.h \
14 /usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stddef.h \
15 unictype/bitmap.h unictype/ctype_blank.h
16/usr/include/stdc-predef.h:
17../config.h:
18unictype.h:
19unitypes.h:
20/usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stdint.h:
21/usr/include/stdint.h:
22/usr/include/bits/libc-header-start.h:
23/usr/include/features.h:
24/usr/include/features-time64.h:
25/usr/include/bits/wordsize.h:
26/usr/include/bits/timesize.h:
27/usr/include/sys/cdefs.h:
28/usr/include/bits/long-double.h:
29/usr/include/gnu/stubs.h:
30/usr/include/gnu/stubs-64.h:
31/usr/include/bits/types.h:
32/usr/include/bits/typesizes.h:
33/usr/include/bits/time64.h:
34/usr/include/bits/wchar.h:
35/usr/include/bits/stdint-intn.h:
36/usr/include/bits/stdint-uintn.h:
37/usr/include/bits/stdint-least.h:
38/usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stdbool.h:
39stddef.h:
40/usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stddef.h:
41unictype/bitmap.h:
42unictype/ctype_blank.h:
diff --git a/gl/unictype/.deps/libgnu_a-ctype_cntrl.Po b/gl/unictype/.deps/libgnu_a-ctype_cntrl.Po
new file mode 100644
index 00000000..4416e841
--- /dev/null
+++ b/gl/unictype/.deps/libgnu_a-ctype_cntrl.Po
@@ -0,0 +1,42 @@
1unictype/libgnu_a-ctype_cntrl.o: unictype/ctype_cntrl.c \
2 /usr/include/stdc-predef.h ../config.h unictype.h unitypes.h \
3 /usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stdint.h \
4 /usr/include/stdint.h /usr/include/bits/libc-header-start.h \
5 /usr/include/features.h /usr/include/features-time64.h \
6 /usr/include/bits/wordsize.h /usr/include/bits/timesize.h \
7 /usr/include/sys/cdefs.h /usr/include/bits/long-double.h \
8 /usr/include/gnu/stubs.h /usr/include/gnu/stubs-64.h \
9 /usr/include/bits/types.h /usr/include/bits/typesizes.h \
10 /usr/include/bits/time64.h /usr/include/bits/wchar.h \
11 /usr/include/bits/stdint-intn.h /usr/include/bits/stdint-uintn.h \
12 /usr/include/bits/stdint-least.h \
13 /usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stdbool.h stddef.h \
14 /usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stddef.h \
15 unictype/bitmap.h unictype/ctype_cntrl.h
16/usr/include/stdc-predef.h:
17../config.h:
18unictype.h:
19unitypes.h:
20/usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stdint.h:
21/usr/include/stdint.h:
22/usr/include/bits/libc-header-start.h:
23/usr/include/features.h:
24/usr/include/features-time64.h:
25/usr/include/bits/wordsize.h:
26/usr/include/bits/timesize.h:
27/usr/include/sys/cdefs.h:
28/usr/include/bits/long-double.h:
29/usr/include/gnu/stubs.h:
30/usr/include/gnu/stubs-64.h:
31/usr/include/bits/types.h:
32/usr/include/bits/typesizes.h:
33/usr/include/bits/time64.h:
34/usr/include/bits/wchar.h:
35/usr/include/bits/stdint-intn.h:
36/usr/include/bits/stdint-uintn.h:
37/usr/include/bits/stdint-least.h:
38/usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stdbool.h:
39stddef.h:
40/usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stddef.h:
41unictype/bitmap.h:
42unictype/ctype_cntrl.h:
diff --git a/gl/unictype/.deps/libgnu_a-ctype_digit.Po b/gl/unictype/.deps/libgnu_a-ctype_digit.Po
new file mode 100644
index 00000000..dd88d5aa
--- /dev/null
+++ b/gl/unictype/.deps/libgnu_a-ctype_digit.Po
@@ -0,0 +1,42 @@
1unictype/libgnu_a-ctype_digit.o: unictype/ctype_digit.c \
2 /usr/include/stdc-predef.h ../config.h unictype.h unitypes.h \
3 /usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stdint.h \
4 /usr/include/stdint.h /usr/include/bits/libc-header-start.h \
5 /usr/include/features.h /usr/include/features-time64.h \
6 /usr/include/bits/wordsize.h /usr/include/bits/timesize.h \
7 /usr/include/sys/cdefs.h /usr/include/bits/long-double.h \
8 /usr/include/gnu/stubs.h /usr/include/gnu/stubs-64.h \
9 /usr/include/bits/types.h /usr/include/bits/typesizes.h \
10 /usr/include/bits/time64.h /usr/include/bits/wchar.h \
11 /usr/include/bits/stdint-intn.h /usr/include/bits/stdint-uintn.h \
12 /usr/include/bits/stdint-least.h \
13 /usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stdbool.h stddef.h \
14 /usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stddef.h \
15 unictype/bitmap.h unictype/ctype_digit.h
16/usr/include/stdc-predef.h:
17../config.h:
18unictype.h:
19unitypes.h:
20/usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stdint.h:
21/usr/include/stdint.h:
22/usr/include/bits/libc-header-start.h:
23/usr/include/features.h:
24/usr/include/features-time64.h:
25/usr/include/bits/wordsize.h:
26/usr/include/bits/timesize.h:
27/usr/include/sys/cdefs.h:
28/usr/include/bits/long-double.h:
29/usr/include/gnu/stubs.h:
30/usr/include/gnu/stubs-64.h:
31/usr/include/bits/types.h:
32/usr/include/bits/typesizes.h:
33/usr/include/bits/time64.h:
34/usr/include/bits/wchar.h:
35/usr/include/bits/stdint-intn.h:
36/usr/include/bits/stdint-uintn.h:
37/usr/include/bits/stdint-least.h:
38/usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stdbool.h:
39stddef.h:
40/usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stddef.h:
41unictype/bitmap.h:
42unictype/ctype_digit.h:
diff --git a/gl/unictype/.deps/libgnu_a-ctype_graph.Po b/gl/unictype/.deps/libgnu_a-ctype_graph.Po
new file mode 100644
index 00000000..5e4edfcf
--- /dev/null
+++ b/gl/unictype/.deps/libgnu_a-ctype_graph.Po
@@ -0,0 +1,42 @@
1unictype/libgnu_a-ctype_graph.o: unictype/ctype_graph.c \
2 /usr/include/stdc-predef.h ../config.h unictype.h unitypes.h \
3 /usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stdint.h \
4 /usr/include/stdint.h /usr/include/bits/libc-header-start.h \
5 /usr/include/features.h /usr/include/features-time64.h \
6 /usr/include/bits/wordsize.h /usr/include/bits/timesize.h \
7 /usr/include/sys/cdefs.h /usr/include/bits/long-double.h \
8 /usr/include/gnu/stubs.h /usr/include/gnu/stubs-64.h \
9 /usr/include/bits/types.h /usr/include/bits/typesizes.h \
10 /usr/include/bits/time64.h /usr/include/bits/wchar.h \
11 /usr/include/bits/stdint-intn.h /usr/include/bits/stdint-uintn.h \
12 /usr/include/bits/stdint-least.h \
13 /usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stdbool.h stddef.h \
14 /usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stddef.h \
15 unictype/bitmap.h unictype/ctype_graph.h
16/usr/include/stdc-predef.h:
17../config.h:
18unictype.h:
19unitypes.h:
20/usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stdint.h:
21/usr/include/stdint.h:
22/usr/include/bits/libc-header-start.h:
23/usr/include/features.h:
24/usr/include/features-time64.h:
25/usr/include/bits/wordsize.h:
26/usr/include/bits/timesize.h:
27/usr/include/sys/cdefs.h:
28/usr/include/bits/long-double.h:
29/usr/include/gnu/stubs.h:
30/usr/include/gnu/stubs-64.h:
31/usr/include/bits/types.h:
32/usr/include/bits/typesizes.h:
33/usr/include/bits/time64.h:
34/usr/include/bits/wchar.h:
35/usr/include/bits/stdint-intn.h:
36/usr/include/bits/stdint-uintn.h:
37/usr/include/bits/stdint-least.h:
38/usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stdbool.h:
39stddef.h:
40/usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stddef.h:
41unictype/bitmap.h:
42unictype/ctype_graph.h:
diff --git a/gl/unictype/.deps/libgnu_a-ctype_lower.Po b/gl/unictype/.deps/libgnu_a-ctype_lower.Po
new file mode 100644
index 00000000..823d6082
--- /dev/null
+++ b/gl/unictype/.deps/libgnu_a-ctype_lower.Po
@@ -0,0 +1,42 @@
1unictype/libgnu_a-ctype_lower.o: unictype/ctype_lower.c \
2 /usr/include/stdc-predef.h ../config.h unictype.h unitypes.h \
3 /usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stdint.h \
4 /usr/include/stdint.h /usr/include/bits/libc-header-start.h \
5 /usr/include/features.h /usr/include/features-time64.h \
6 /usr/include/bits/wordsize.h /usr/include/bits/timesize.h \
7 /usr/include/sys/cdefs.h /usr/include/bits/long-double.h \
8 /usr/include/gnu/stubs.h /usr/include/gnu/stubs-64.h \
9 /usr/include/bits/types.h /usr/include/bits/typesizes.h \
10 /usr/include/bits/time64.h /usr/include/bits/wchar.h \
11 /usr/include/bits/stdint-intn.h /usr/include/bits/stdint-uintn.h \
12 /usr/include/bits/stdint-least.h \
13 /usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stdbool.h stddef.h \
14 /usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stddef.h \
15 unictype/bitmap.h unictype/ctype_lower.h
16/usr/include/stdc-predef.h:
17../config.h:
18unictype.h:
19unitypes.h:
20/usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stdint.h:
21/usr/include/stdint.h:
22/usr/include/bits/libc-header-start.h:
23/usr/include/features.h:
24/usr/include/features-time64.h:
25/usr/include/bits/wordsize.h:
26/usr/include/bits/timesize.h:
27/usr/include/sys/cdefs.h:
28/usr/include/bits/long-double.h:
29/usr/include/gnu/stubs.h:
30/usr/include/gnu/stubs-64.h:
31/usr/include/bits/types.h:
32/usr/include/bits/typesizes.h:
33/usr/include/bits/time64.h:
34/usr/include/bits/wchar.h:
35/usr/include/bits/stdint-intn.h:
36/usr/include/bits/stdint-uintn.h:
37/usr/include/bits/stdint-least.h:
38/usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stdbool.h:
39stddef.h:
40/usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stddef.h:
41unictype/bitmap.h:
42unictype/ctype_lower.h:
diff --git a/gl/unictype/.deps/libgnu_a-ctype_print.Po b/gl/unictype/.deps/libgnu_a-ctype_print.Po
new file mode 100644
index 00000000..3759170a
--- /dev/null
+++ b/gl/unictype/.deps/libgnu_a-ctype_print.Po
@@ -0,0 +1,42 @@
1unictype/libgnu_a-ctype_print.o: unictype/ctype_print.c \
2 /usr/include/stdc-predef.h ../config.h unictype.h unitypes.h \
3 /usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stdint.h \
4 /usr/include/stdint.h /usr/include/bits/libc-header-start.h \
5 /usr/include/features.h /usr/include/features-time64.h \
6 /usr/include/bits/wordsize.h /usr/include/bits/timesize.h \
7 /usr/include/sys/cdefs.h /usr/include/bits/long-double.h \
8 /usr/include/gnu/stubs.h /usr/include/gnu/stubs-64.h \
9 /usr/include/bits/types.h /usr/include/bits/typesizes.h \
10 /usr/include/bits/time64.h /usr/include/bits/wchar.h \
11 /usr/include/bits/stdint-intn.h /usr/include/bits/stdint-uintn.h \
12 /usr/include/bits/stdint-least.h \
13 /usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stdbool.h stddef.h \
14 /usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stddef.h \
15 unictype/bitmap.h unictype/ctype_print.h
16/usr/include/stdc-predef.h:
17../config.h:
18unictype.h:
19unitypes.h:
20/usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stdint.h:
21/usr/include/stdint.h:
22/usr/include/bits/libc-header-start.h:
23/usr/include/features.h:
24/usr/include/features-time64.h:
25/usr/include/bits/wordsize.h:
26/usr/include/bits/timesize.h:
27/usr/include/sys/cdefs.h:
28/usr/include/bits/long-double.h:
29/usr/include/gnu/stubs.h:
30/usr/include/gnu/stubs-64.h:
31/usr/include/bits/types.h:
32/usr/include/bits/typesizes.h:
33/usr/include/bits/time64.h:
34/usr/include/bits/wchar.h:
35/usr/include/bits/stdint-intn.h:
36/usr/include/bits/stdint-uintn.h:
37/usr/include/bits/stdint-least.h:
38/usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stdbool.h:
39stddef.h:
40/usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stddef.h:
41unictype/bitmap.h:
42unictype/ctype_print.h:
diff --git a/gl/unictype/.deps/libgnu_a-ctype_punct.Po b/gl/unictype/.deps/libgnu_a-ctype_punct.Po
new file mode 100644
index 00000000..a797e4dd
--- /dev/null
+++ b/gl/unictype/.deps/libgnu_a-ctype_punct.Po
@@ -0,0 +1,42 @@
1unictype/libgnu_a-ctype_punct.o: unictype/ctype_punct.c \
2 /usr/include/stdc-predef.h ../config.h unictype.h unitypes.h \
3 /usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stdint.h \
4 /usr/include/stdint.h /usr/include/bits/libc-header-start.h \
5 /usr/include/features.h /usr/include/features-time64.h \
6 /usr/include/bits/wordsize.h /usr/include/bits/timesize.h \
7 /usr/include/sys/cdefs.h /usr/include/bits/long-double.h \
8 /usr/include/gnu/stubs.h /usr/include/gnu/stubs-64.h \
9 /usr/include/bits/types.h /usr/include/bits/typesizes.h \
10 /usr/include/bits/time64.h /usr/include/bits/wchar.h \
11 /usr/include/bits/stdint-intn.h /usr/include/bits/stdint-uintn.h \
12 /usr/include/bits/stdint-least.h \
13 /usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stdbool.h stddef.h \
14 /usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stddef.h \
15 unictype/bitmap.h unictype/ctype_punct.h
16/usr/include/stdc-predef.h:
17../config.h:
18unictype.h:
19unitypes.h:
20/usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stdint.h:
21/usr/include/stdint.h:
22/usr/include/bits/libc-header-start.h:
23/usr/include/features.h:
24/usr/include/features-time64.h:
25/usr/include/bits/wordsize.h:
26/usr/include/bits/timesize.h:
27/usr/include/sys/cdefs.h:
28/usr/include/bits/long-double.h:
29/usr/include/gnu/stubs.h:
30/usr/include/gnu/stubs-64.h:
31/usr/include/bits/types.h:
32/usr/include/bits/typesizes.h:
33/usr/include/bits/time64.h:
34/usr/include/bits/wchar.h:
35/usr/include/bits/stdint-intn.h:
36/usr/include/bits/stdint-uintn.h:
37/usr/include/bits/stdint-least.h:
38/usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stdbool.h:
39stddef.h:
40/usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stddef.h:
41unictype/bitmap.h:
42unictype/ctype_punct.h:
diff --git a/gl/unictype/.deps/libgnu_a-ctype_space.Po b/gl/unictype/.deps/libgnu_a-ctype_space.Po
new file mode 100644
index 00000000..aea98736
--- /dev/null
+++ b/gl/unictype/.deps/libgnu_a-ctype_space.Po
@@ -0,0 +1,42 @@
1unictype/libgnu_a-ctype_space.o: unictype/ctype_space.c \
2 /usr/include/stdc-predef.h ../config.h unictype.h unitypes.h \
3 /usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stdint.h \
4 /usr/include/stdint.h /usr/include/bits/libc-header-start.h \
5 /usr/include/features.h /usr/include/features-time64.h \
6 /usr/include/bits/wordsize.h /usr/include/bits/timesize.h \
7 /usr/include/sys/cdefs.h /usr/include/bits/long-double.h \
8 /usr/include/gnu/stubs.h /usr/include/gnu/stubs-64.h \
9 /usr/include/bits/types.h /usr/include/bits/typesizes.h \
10 /usr/include/bits/time64.h /usr/include/bits/wchar.h \
11 /usr/include/bits/stdint-intn.h /usr/include/bits/stdint-uintn.h \
12 /usr/include/bits/stdint-least.h \
13 /usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stdbool.h stddef.h \
14 /usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stddef.h \
15 unictype/bitmap.h unictype/ctype_space.h
16/usr/include/stdc-predef.h:
17../config.h:
18unictype.h:
19unitypes.h:
20/usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stdint.h:
21/usr/include/stdint.h:
22/usr/include/bits/libc-header-start.h:
23/usr/include/features.h:
24/usr/include/features-time64.h:
25/usr/include/bits/wordsize.h:
26/usr/include/bits/timesize.h:
27/usr/include/sys/cdefs.h:
28/usr/include/bits/long-double.h:
29/usr/include/gnu/stubs.h:
30/usr/include/gnu/stubs-64.h:
31/usr/include/bits/types.h:
32/usr/include/bits/typesizes.h:
33/usr/include/bits/time64.h:
34/usr/include/bits/wchar.h:
35/usr/include/bits/stdint-intn.h:
36/usr/include/bits/stdint-uintn.h:
37/usr/include/bits/stdint-least.h:
38/usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stdbool.h:
39stddef.h:
40/usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stddef.h:
41unictype/bitmap.h:
42unictype/ctype_space.h:
diff --git a/gl/unictype/.deps/libgnu_a-ctype_upper.Po b/gl/unictype/.deps/libgnu_a-ctype_upper.Po
new file mode 100644
index 00000000..197e89c1
--- /dev/null
+++ b/gl/unictype/.deps/libgnu_a-ctype_upper.Po
@@ -0,0 +1,42 @@
1unictype/libgnu_a-ctype_upper.o: unictype/ctype_upper.c \
2 /usr/include/stdc-predef.h ../config.h unictype.h unitypes.h \
3 /usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stdint.h \
4 /usr/include/stdint.h /usr/include/bits/libc-header-start.h \
5 /usr/include/features.h /usr/include/features-time64.h \
6 /usr/include/bits/wordsize.h /usr/include/bits/timesize.h \
7 /usr/include/sys/cdefs.h /usr/include/bits/long-double.h \
8 /usr/include/gnu/stubs.h /usr/include/gnu/stubs-64.h \
9 /usr/include/bits/types.h /usr/include/bits/typesizes.h \
10 /usr/include/bits/time64.h /usr/include/bits/wchar.h \
11 /usr/include/bits/stdint-intn.h /usr/include/bits/stdint-uintn.h \
12 /usr/include/bits/stdint-least.h \
13 /usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stdbool.h stddef.h \
14 /usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stddef.h \
15 unictype/bitmap.h unictype/ctype_upper.h
16/usr/include/stdc-predef.h:
17../config.h:
18unictype.h:
19unitypes.h:
20/usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stdint.h:
21/usr/include/stdint.h:
22/usr/include/bits/libc-header-start.h:
23/usr/include/features.h:
24/usr/include/features-time64.h:
25/usr/include/bits/wordsize.h:
26/usr/include/bits/timesize.h:
27/usr/include/sys/cdefs.h:
28/usr/include/bits/long-double.h:
29/usr/include/gnu/stubs.h:
30/usr/include/gnu/stubs-64.h:
31/usr/include/bits/types.h:
32/usr/include/bits/typesizes.h:
33/usr/include/bits/time64.h:
34/usr/include/bits/wchar.h:
35/usr/include/bits/stdint-intn.h:
36/usr/include/bits/stdint-uintn.h:
37/usr/include/bits/stdint-least.h:
38/usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stdbool.h:
39stddef.h:
40/usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stddef.h:
41unictype/bitmap.h:
42unictype/ctype_upper.h:
diff --git a/gl/unictype/.deps/libgnu_a-ctype_xdigit.Po b/gl/unictype/.deps/libgnu_a-ctype_xdigit.Po
new file mode 100644
index 00000000..86a47831
--- /dev/null
+++ b/gl/unictype/.deps/libgnu_a-ctype_xdigit.Po
@@ -0,0 +1,42 @@
1unictype/libgnu_a-ctype_xdigit.o: unictype/ctype_xdigit.c \
2 /usr/include/stdc-predef.h ../config.h unictype.h unitypes.h \
3 /usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stdint.h \
4 /usr/include/stdint.h /usr/include/bits/libc-header-start.h \
5 /usr/include/features.h /usr/include/features-time64.h \
6 /usr/include/bits/wordsize.h /usr/include/bits/timesize.h \
7 /usr/include/sys/cdefs.h /usr/include/bits/long-double.h \
8 /usr/include/gnu/stubs.h /usr/include/gnu/stubs-64.h \
9 /usr/include/bits/types.h /usr/include/bits/typesizes.h \
10 /usr/include/bits/time64.h /usr/include/bits/wchar.h \
11 /usr/include/bits/stdint-intn.h /usr/include/bits/stdint-uintn.h \
12 /usr/include/bits/stdint-least.h \
13 /usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stdbool.h stddef.h \
14 /usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stddef.h \
15 unictype/bitmap.h unictype/ctype_xdigit.h
16/usr/include/stdc-predef.h:
17../config.h:
18unictype.h:
19unitypes.h:
20/usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stdint.h:
21/usr/include/stdint.h:
22/usr/include/bits/libc-header-start.h:
23/usr/include/features.h:
24/usr/include/features-time64.h:
25/usr/include/bits/wordsize.h:
26/usr/include/bits/timesize.h:
27/usr/include/sys/cdefs.h:
28/usr/include/bits/long-double.h:
29/usr/include/gnu/stubs.h:
30/usr/include/gnu/stubs-64.h:
31/usr/include/bits/types.h:
32/usr/include/bits/typesizes.h:
33/usr/include/bits/time64.h:
34/usr/include/bits/wchar.h:
35/usr/include/bits/stdint-intn.h:
36/usr/include/bits/stdint-uintn.h:
37/usr/include/bits/stdint-least.h:
38/usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stdbool.h:
39stddef.h:
40/usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stddef.h:
41unictype/bitmap.h:
42unictype/ctype_xdigit.h:
diff --git a/gl/uniwidth/.deps/libgnu_a-width.Po b/gl/uniwidth/.deps/libgnu_a-width.Po
new file mode 100644
index 00000000..f71057dc
--- /dev/null
+++ b/gl/uniwidth/.deps/libgnu_a-width.Po
@@ -0,0 +1,53 @@
1uniwidth/libgnu_a-width.o: uniwidth/width.c /usr/include/stdc-predef.h \
2 ../config.h uniwidth.h unitypes.h \
3 /usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stdint.h \
4 /usr/include/stdint.h /usr/include/bits/libc-header-start.h \
5 /usr/include/features.h /usr/include/features-time64.h \
6 /usr/include/bits/wordsize.h /usr/include/bits/timesize.h \
7 /usr/include/sys/cdefs.h /usr/include/bits/long-double.h \
8 /usr/include/gnu/stubs.h /usr/include/gnu/stubs-64.h \
9 /usr/include/bits/types.h /usr/include/bits/typesizes.h \
10 /usr/include/bits/time64.h /usr/include/bits/wchar.h \
11 /usr/include/bits/stdint-intn.h /usr/include/bits/stdint-uintn.h \
12 /usr/include/bits/stdint-least.h stddef.h \
13 /usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stddef.h localcharset.h \
14 uniwidth/cjk.h streq.h string.h /usr/include/string.h \
15 /usr/include/bits/types/locale_t.h /usr/include/bits/types/__locale_t.h \
16 strings.h /usr/include/strings.h uniwidth/width0.h uniwidth/width2.h \
17 unictype/bitmap.h
18/usr/include/stdc-predef.h:
19../config.h:
20uniwidth.h:
21unitypes.h:
22/usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stdint.h:
23/usr/include/stdint.h:
24/usr/include/bits/libc-header-start.h:
25/usr/include/features.h:
26/usr/include/features-time64.h:
27/usr/include/bits/wordsize.h:
28/usr/include/bits/timesize.h:
29/usr/include/sys/cdefs.h:
30/usr/include/bits/long-double.h:
31/usr/include/gnu/stubs.h:
32/usr/include/gnu/stubs-64.h:
33/usr/include/bits/types.h:
34/usr/include/bits/typesizes.h:
35/usr/include/bits/time64.h:
36/usr/include/bits/wchar.h:
37/usr/include/bits/stdint-intn.h:
38/usr/include/bits/stdint-uintn.h:
39/usr/include/bits/stdint-least.h:
40stddef.h:
41/usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/stddef.h:
42localcharset.h:
43uniwidth/cjk.h:
44streq.h:
45string.h:
46/usr/include/string.h:
47/usr/include/bits/types/locale_t.h:
48/usr/include/bits/types/__locale_t.h:
49strings.h:
50/usr/include/strings.h:
51uniwidth/width0.h:
52uniwidth/width2.h:
53unictype/bitmap.h:
diff --git a/plugins/Makefile.am b/plugins/Makefile.am
index 2bea8fc0..9aefcea0 100644
--- a/plugins/Makefile.am
+++ b/plugins/Makefile.am
@@ -166,7 +166,7 @@ check_real_LDADD = $(NETLIBS)
166check_snmp_SOURCES = check_snmp.c check_snmp.d/check_snmp_helpers.c 166check_snmp_SOURCES = check_snmp.c check_snmp.d/check_snmp_helpers.c
167check_snmp_LDADD = $(BASEOBJS) 167check_snmp_LDADD = $(BASEOBJS)
168check_snmp_LDFLAGS = $(AM_LDFLAGS) -lm `net-snmp-config --libs` 168check_snmp_LDFLAGS = $(AM_LDFLAGS) -lm `net-snmp-config --libs`
169check_snmp_CFLAGS = $(AM_CFLAGS) `net-snmp-config --cflags | sed 's/-Werror=declaration-after-statement//'` 169check_snmp_CFLAGS = $(AM_CFLAGS) `net-snmp-config --cflags | sed 's/-Werror=declaration-after-statement//' | sed 's/-Wundef//'`
170check_smtp_LDADD = $(SSLOBJS) 170check_smtp_LDADD = $(SSLOBJS)
171check_ssh_LDADD = $(NETLIBS) 171check_ssh_LDADD = $(NETLIBS)
172check_swap_SOURCES = check_swap.c check_swap.d/swap.c 172check_swap_SOURCES = check_swap.c check_swap.d/swap.c
diff --git a/plugins/check_cluster.c b/plugins/check_cluster.c
index 1cbdcd60..92c3827a 100644
--- a/plugins/check_cluster.c
+++ b/plugins/check_cluster.c
@@ -175,7 +175,7 @@ check_cluster_config_wrapper process_arguments(int argc, char **argv) {
175 while (true) { 175 while (true) {
176 int option_index = getopt_long(argc, argv, "hHsvVw:c:d:l:", longopts, &option); 176 int option_index = getopt_long(argc, argv, "hHsvVw:c:d:l:", longopts, &option);
177 177
178 if (option_index == -1 || option_index == EOF || option_index == 1) { 178 if (CHECK_EOF(option_index) || option_index == 1) {
179 break; 179 break;
180 } 180 }
181 181
diff --git a/plugins/check_curl.c b/plugins/check_curl.c
index f63cdea2..94144073 100644
--- a/plugins/check_curl.c
+++ b/plugins/check_curl.c
@@ -979,7 +979,7 @@ check_curl_config_wrapper process_arguments(int argc, char **argv) {
979 int option_index = getopt_long( 979 int option_index = getopt_long(
980 argc, argv, "Vvh46t:c:w:A:k:H:P:j:T:I:a:x:b:d:e:p:s:R:r:u:f:C:J:K:DnlLS::m:M:NEB", 980 argc, argv, "Vvh46t:c:w:A:k:H:P:j:T:I:a:x:b:d:e:p:s:R:r:u:f:C:J:K:DnlLS::m:M:NEB",
981 longopts, &option); 981 longopts, &option);
982 if (option_index == -1 || option_index == EOF || option_index == 1) { 982 if (CHECK_EOF(option_index) || option_index == 1) {
983 break; 983 break;
984 } 984 }
985 985
diff --git a/plugins/check_dig.c b/plugins/check_dig.c
index 9ea19e6a..9ec8028a 100644
--- a/plugins/check_dig.c
+++ b/plugins/check_dig.c
@@ -284,7 +284,7 @@ check_dig_config_wrapper process_arguments(int argc, char **argv) {
284 int option_index = 284 int option_index =
285 getopt_long(argc, argv, "hVvt:l:H:w:c:T:p:a:A:E:X:46", longopts, &option); 285 getopt_long(argc, argv, "hVvt:l:H:w:c:T:p:a:A:E:X:46", longopts, &option);
286 286
287 if (option_index == -1 || option_index == EOF) { 287 if (CHECK_EOF(option_index)) {
288 break; 288 break;
289 } 289 }
290 290
diff --git a/plugins/check_disk.c b/plugins/check_disk.c
index 73fe815e..e773e56c 100644
--- a/plugins/check_disk.c
+++ b/plugins/check_disk.c
@@ -448,7 +448,7 @@ check_disk_config_wrapper process_arguments(int argc, char **argv) {
448 int option_index = getopt_long( 448 int option_index = getopt_long(
449 argc, argv, "+?VqhvefCt:c:w:K:W:u:p:x:X:N:mklLPg:R:r:i:I:MEAn", longopts, &option); 449 argc, argv, "+?VqhvefCt:c:w:K:W:u:p:x:X:N:mklLPg:R:r:i:I:MEAn", longopts, &option);
450 450
451 if (option_index == -1 || option_index == EOF) { 451 if (CHECK_EOF(option_index)) {
452 break; 452 break;
453 } 453 }
454 454
diff --git a/plugins/check_fping.c b/plugins/check_fping.c
index 6160c2cb..86ef64a4 100644
--- a/plugins/check_fping.c
+++ b/plugins/check_fping.c
@@ -361,7 +361,7 @@ check_fping_config_wrapper process_arguments(int argc, char **argv) {
361 int option_index = 361 int option_index =
362 getopt_long(argc, argv, "+hVvaH:S:c:w:b:n:T:i:I:M:R:46", longopts, &option); 362 getopt_long(argc, argv, "+hVvaH:S:c:w:b:n:T:i:I:M:R:46", longopts, &option);
363 363
364 if (option_index == -1 || option_index == EOF || option_index == 1) { 364 if (CHECK_EOF(option_index) || option_index == 1) {
365 break; 365 break;
366 } 366 }
367 367
diff --git a/plugins/check_game.c b/plugins/check_game.c
index 974a7253..48ec6883 100644
--- a/plugins/check_game.c
+++ b/plugins/check_game.c
@@ -186,7 +186,7 @@ check_game_config_wrapper process_arguments(int argc, char **argv) {
186 while (true) { 186 while (true) {
187 int option_index = getopt_long(argc, argv, "hVvt:H:P:G:g:p:m:", long_opts, &opt_index); 187 int option_index = getopt_long(argc, argv, "hVvt:H:P:G:g:p:m:", long_opts, &opt_index);
188 188
189 if (option_index == -1 || option_index == EOF) { 189 if (CHECK_EOF(option_index)) {
190 break; 190 break;
191 } 191 }
192 192
diff --git a/plugins/check_hpjd.c b/plugins/check_hpjd.c
index 9907abc5..883f1df0 100644
--- a/plugins/check_hpjd.c
+++ b/plugins/check_hpjd.c
@@ -299,7 +299,7 @@ check_hpjd_config_wrapper process_arguments(int argc, char **argv) {
299 while (true) { 299 while (true) {
300 int option_index = getopt_long(argc, argv, "+hVH:C:p:D", longopts, &option); 300 int option_index = getopt_long(argc, argv, "+hVH:C:p:D", longopts, &option);
301 301
302 if (option_index == -1 || option_index == EOF || option_index == 1) { 302 if (CHECK_EOF(option_index) || option_index == 1) {
303 break; 303 break;
304 } 304 }
305 305
diff --git a/plugins/check_ide_smart.c b/plugins/check_ide_smart.c
index c1325cf9..43731039 100644
--- a/plugins/check_ide_smart.c
+++ b/plugins/check_ide_smart.c
@@ -169,7 +169,7 @@ static check_ide_smart_config_wrapper process_arguments(int argc, char **argv) {
169 int longindex = 0; 169 int longindex = 0;
170 int option_index = getopt_long(argc, argv, "+d:iq10nhVv", longopts, &longindex); 170 int option_index = getopt_long(argc, argv, "+d:iq10nhVv", longopts, &longindex);
171 171
172 if (option_index == -1 || option_index == EOF || option_index == 1) { 172 if (CHECK_EOF(option_index) || option_index == 1) {
173 break; 173 break;
174 } 174 }
175 175
diff --git a/plugins/check_ldap.c b/plugins/check_ldap.c
index 7f8282b4..0e8c5804 100644
--- a/plugins/check_ldap.c
+++ b/plugins/check_ldap.c
@@ -362,7 +362,7 @@ check_ldap_config_wrapper process_arguments(int argc, char **argv) {
362 int option_index = 362 int option_index =
363 getopt_long(argc, argv, "hvV234TS6t:c:w:H:b:p:a:D:P:C:W:", longopts, &option); 363 getopt_long(argc, argv, "hvV234TS6t:c:w:H:b:p:a:D:P:C:W:", longopts, &option);
364 364
365 if (option_index == -1 || option_index == EOF) { 365 if (CHECK_EOF(option_index)) {
366 break; 366 break;
367 } 367 }
368 368
diff --git a/plugins/check_load.c b/plugins/check_load.c
index 644cd604..60fa646f 100644
--- a/plugins/check_load.c
+++ b/plugins/check_load.c
@@ -295,7 +295,7 @@ static check_load_config_wrapper process_arguments(int argc, char **argv) {
295 int option = 0; 295 int option = 0;
296 int option_index = getopt_long(argc, argv, "Vhrc:w:n:", longopts, &option); 296 int option_index = getopt_long(argc, argv, "Vhrc:w:n:", longopts, &option);
297 297
298 if (option_index == -1 || option_index == EOF) { 298 if (CHECK_EOF(option_index)) {
299 break; 299 break;
300 } 300 }
301 301
diff --git a/plugins/check_mysql.c b/plugins/check_mysql.c
index 15005bf5..b70e0e22 100644
--- a/plugins/check_mysql.c
+++ b/plugins/check_mysql.c
@@ -504,7 +504,7 @@ check_mysql_config_wrapper process_arguments(int argc, char **argv) {
504 int option_index = 504 int option_index =
505 getopt_long(argc, argv, "hlvVnSP:p:u:d:H:s:c:w:a:k:C:D:L:f:g:", longopts, &option); 505 getopt_long(argc, argv, "hlvVnSP:p:u:d:H:s:c:w:a:k:C:D:L:f:g:", longopts, &option);
506 506
507 if (option_index == -1 || option_index == EOF) { 507 if (CHECK_EOF(option_index)) {
508 break; 508 break;
509 } 509 }
510 510
diff --git a/plugins/check_nagios.c b/plugins/check_nagios.c
index a46dc1ed..e2f230c9 100644
--- a/plugins/check_nagios.c
+++ b/plugins/check_nagios.c
@@ -227,7 +227,7 @@ check_nagios_config_wrapper process_arguments(int argc, char **argv) {
227 while (true) { 227 while (true) {
228 int option_index = getopt_long(argc, argv, "+hVvF:C:e:t:", longopts, &option); 228 int option_index = getopt_long(argc, argv, "+hVvF:C:e:t:", longopts, &option);
229 229
230 if (option_index == -1 || option_index == EOF || option_index == 1) { 230 if (CHECK_EOF(option_index) || option_index == 1) {
231 break; 231 break;
232 } 232 }
233 233
diff --git a/plugins/check_ping.c b/plugins/check_ping.c
index e1ee0f5c..0c9cb19d 100644
--- a/plugins/check_ping.c
+++ b/plugins/check_ping.c
@@ -221,7 +221,7 @@ check_ping_config_wrapper process_arguments(int argc, char **argv) {
221 while (true) { 221 while (true) {
222 int option_index = getopt_long(argc, argv, "VvhnL46t:c:w:H:p:", longopts, &option); 222 int option_index = getopt_long(argc, argv, "VvhnL46t:c:w:H:p:", longopts, &option);
223 223
224 if (option_index == -1 || option_index == EOF) { 224 if (CHECK_EOF(option_index)) {
225 break; 225 break;
226 } 226 }
227 227
diff --git a/plugins/check_procs.c b/plugins/check_procs.c
index 50837cb4..174dcd97 100644
--- a/plugins/check_procs.c
+++ b/plugins/check_procs.c
@@ -432,7 +432,7 @@ check_procs_config_wrapper process_arguments(int argc, char **argv) {
432 int option_index = 432 int option_index =
433 getopt_long(argc, argv, "Vvhkt:c:w:p:s:u:C:a:z:r:m:P:TX:", longopts, &option); 433 getopt_long(argc, argv, "Vvhkt:c:w:p:s:u:C:a:z:r:m:P:TX:", longopts, &option);
434 434
435 if (option_index == -1 || option_index == EOF) { 435 if (CHECK_EOF(option_index)) {
436 break; 436 break;
437 } 437 }
438 438
diff --git a/plugins/check_radius.c b/plugins/check_radius.c
index f20af660..03153926 100644
--- a/plugins/check_radius.c
+++ b/plugins/check_radius.c
@@ -334,7 +334,7 @@ check_radius_config_wrapper process_arguments(int argc, char **argv) {
334 int option = 0; 334 int option = 0;
335 int option_index = getopt_long(argc, argv, "+hVvH:P:F:u:p:n:N:t:r:e:", longopts, &option); 335 int option_index = getopt_long(argc, argv, "+hVvH:P:F:u:p:n:N:t:r:e:", longopts, &option);
336 336
337 if (option_index == -1 || option_index == EOF || option_index == 1) { 337 if (CHECK_EOF(option_index) || option_index == 1) {
338 break; 338 break;
339 } 339 }
340 340
diff --git a/plugins/check_real.d/config.h b/plugins/check_real.d/config.h
index 2d99ad49..314aff37 100644
--- a/plugins/check_real.d/config.h
+++ b/plugins/check_real.d/config.h
@@ -9,7 +9,7 @@ enum {
9 PORT = 554 9 PORT = 554
10}; 10};
11 11
12const char *default_expect = "RTSP/1."; 12char *default_expect = "RTSP/1.";
13 13
14typedef struct { 14typedef struct {
15 char *server_address; 15 char *server_address;
diff --git a/plugins/check_snmp.c b/plugins/check_snmp.c
index 1746fd79..2b3099c9 100644
--- a/plugins/check_snmp.c
+++ b/plugins/check_snmp.c
@@ -256,7 +256,10 @@ int main(int argc, char **argv) {
256 256
257 timeout_interval = DEFAULT_SOCKET_TIMEOUT; 257 timeout_interval = DEFAULT_SOCKET_TIMEOUT;
258 258
259 np_init((char *)progname, argc, argv); 259 char progname_copy[256];
260 strncpy(progname_copy, progname, sizeof(progname_copy)-1);
261 progname_copy[255] = '\0';
262 np_init(progname_copy, argc, argv);
260 263
261 state_key stateKey = np_enable_state(NULL, 1, progname, argc, argv); 264 state_key stateKey = np_enable_state(NULL, 1, progname, argc, argv);
262 265
@@ -447,7 +450,7 @@ static process_arguments_wrapper process_arguments(int argc, char **argv) {
447 argc, argv, 450 argc, argv,
448 "nhvVO46t:c:w:H:C:o:e:E:d:D:s:t:R:r:l:u:p:m:P:N:L:U:a:x:A:X:M:f:z:", longopts, &option); 451 "nhvVO46t:c:w:H:C:o:e:E:d:D:s:t:R:r:l:u:p:m:P:N:L:U:a:x:A:X:M:f:z:", longopts, &option);
449 452
450 if (option_char == -1 || option_char == EOF) { 453 if (CHECK_EOF(option_char)) {
451 break; 454 break;
452 } 455 }
453 456
@@ -508,8 +511,8 @@ static process_arguments_wrapper process_arguments(int argc, char **argv) {
508 unsigned char *privpasswd = NULL; 511 unsigned char *privpasswd = NULL;
509 int cflags = REG_EXTENDED | REG_NOSUB | REG_NEWLINE; 512 int cflags = REG_EXTENDED | REG_NOSUB | REG_NEWLINE;
510 char *port = NULL; 513 char *port = NULL;
511 char *miblist = NULL; 514 const char *miblist = NULL;
512 char *connection_prefix = NULL; 515 const char *connection_prefix = NULL;
513 bool snmp_version_set_explicitely = false; 516 bool snmp_version_set_explicitely = false;
514 // TODO error checking 517 // TODO error checking
515 while (true) { 518 while (true) {
@@ -517,7 +520,7 @@ static process_arguments_wrapper process_arguments(int argc, char **argv) {
517 argc, argv, 520 argc, argv,
518 "nhvVO46t:c:w:H:C:o:e:E:d:D:s:t:R:r:l:u:p:m:P:N:L:U:a:x:A:X:M:f:z:", longopts, &option); 521 "nhvVO46t:c:w:H:C:o:e:E:d:D:s:t:R:r:l:u:p:m:P:N:L:U:a:x:A:X:M:f:z:", longopts, &option);
519 522
520 if (option_char == -1 || option_char == EOF) { 523 if (CHECK_EOF(option_char)) {
521 break; 524 break;
522 } 525 }
523 526
diff --git a/plugins/check_snmp.d/check_snmp_helpers.c b/plugins/check_snmp.d/check_snmp_helpers.c
index 83e94a34..c3f25307 100644
--- a/plugins/check_snmp.d/check_snmp_helpers.c
+++ b/plugins/check_snmp.d/check_snmp_helpers.c
@@ -91,6 +91,8 @@ const char DEFAULT_OUTPUT_DELIMITER[] = " ";
91 91
92const int RANDOM_STATE_DATA_LENGTH_PREDICTION = 8192; 92const int RANDOM_STATE_DATA_LENGTH_PREDICTION = 8192;
93 93
94char community[100];
95
94check_snmp_config check_snmp_config_init() { 96check_snmp_config check_snmp_config_init() {
95 check_snmp_config tmp = { 97 check_snmp_config tmp = {
96 .snmp_params = 98 .snmp_params =
@@ -129,14 +131,17 @@ check_snmp_config check_snmp_config_init() {
129 tmp.snmp_params.snmp_session.retries = DEFAULT_RETRIES; 131 tmp.snmp_params.snmp_session.retries = DEFAULT_RETRIES;
130 tmp.snmp_params.snmp_session.version = DEFAULT_SNMP_VERSION; 132 tmp.snmp_params.snmp_session.version = DEFAULT_SNMP_VERSION;
131 tmp.snmp_params.snmp_session.securityLevel = SNMP_SEC_LEVEL_NOAUTH; 133 tmp.snmp_params.snmp_session.securityLevel = SNMP_SEC_LEVEL_NOAUTH;
132 tmp.snmp_params.snmp_session.community = (unsigned char *)"public"; 134 strcpy(community, "public");
133 tmp.snmp_params.snmp_session.community_len = strlen("public"); 135 tmp.snmp_params.snmp_session.community = (unsigned char *)community;
136 tmp.snmp_params.snmp_session.community_len = strlen(community);
134 return tmp; 137 return tmp;
135} 138}
136 139
137snmp_responces do_snmp_query(check_snmp_config_snmp_parameters parameters) { 140snmp_responces do_snmp_query(check_snmp_config_snmp_parameters parameters) {
138 if (parameters.ignore_mib_parsing_errors) { 141 if (parameters.ignore_mib_parsing_errors) {
139 char *opt_toggle_res = snmp_mib_toggle_options("e"); 142 char option_e[2];
143 option_e[0] = 'e'; option_e[1] = '\0';
144 char *opt_toggle_res = snmp_mib_toggle_options(option_e);
140 if (opt_toggle_res != NULL) { 145 if (opt_toggle_res != NULL) {
141 die(STATE_UNKNOWN, "Unable to disable MIB parsing errors"); 146 die(STATE_UNKNOWN, "Unable to disable MIB parsing errors");
142 } 147 }
@@ -436,7 +441,7 @@ check_snmp_evaluation evaluate_single_unit(response_value response,
436 } 441 }
437 } else { 442 } else {
438 // It's only a counter if we cont compute rate 443 // It's only a counter if we cont compute rate
439 pd_num_val.uom = "c"; 444 pd_num_val.uom = strdup("c");
440 pd_result_val = mp_create_pd_value(response.value.uIntVal); 445 pd_result_val = mp_create_pd_value(response.value.uIntVal);
441 } 446 }
442 break; 447 break;
@@ -476,7 +481,7 @@ check_snmp_evaluation evaluate_single_unit(response_value response,
476 pd_result_val = mp_create_pd_value(treated_value); 481 pd_result_val = mp_create_pd_value(treated_value);
477 482
478 if (response.type == ASN_COUNTER) { 483 if (response.type == ASN_COUNTER) {
479 pd_num_val.uom = "c"; 484 pd_num_val.uom = strdup("c");
480 } 485 }
481 } 486 }
482 487
@@ -820,7 +825,7 @@ state_data *np_state_read(state_key stateKey) {
820 * envvar NAGIOS_PLUGIN_STATE_DIRECTORY 825 * envvar NAGIOS_PLUGIN_STATE_DIRECTORY
821 * statically compiled shared state directory 826 * statically compiled shared state directory
822 */ 827 */
823char *_np_state_calculate_location_prefix(void) { 828static const char *_np_state_calculate_location_prefix(void) {
824 char *env_dir; 829 char *env_dir;
825 830
826 /* Do not allow passing MP_STATE_PATH in setuid plugins 831 /* Do not allow passing MP_STATE_PATH in setuid plugins
@@ -871,7 +876,7 @@ state_key np_enable_state(char *keyname, int expected_data_version, const char *
871 tmp_char++; 876 tmp_char++;
872 } 877 }
873 this_state->name = temp_keyname; 878 this_state->name = temp_keyname;
874 this_state->plugin_name = (char *)plugin_name; 879 this_state->plugin_name = strdup(plugin_name);
875 this_state->data_version = expected_data_version; 880 this_state->data_version = expected_data_version;
876 this_state->state_data = NULL; 881 this_state->state_data = NULL;
877 882
diff --git a/plugins/check_tcp.c b/plugins/check_tcp.c
index 49a8c4c1..8888e0d5 100644
--- a/plugins/check_tcp.c
+++ b/plugins/check_tcp.c
@@ -562,7 +562,7 @@ static check_tcp_config_wrapper process_arguments(int argc, char **argv, check_t
562 int option_index = 562 int option_index =
563 getopt_long(argc, argv, "+hVv46EAH:s:e:q:m:c:w:t:p:C:W:d:Sr:jD:M:", longopts, &option); 563 getopt_long(argc, argv, "+hVv46EAH:s:e:q:m:c:w:t:p:C:W:d:Sr:jD:M:", longopts, &option);
564 564
565 if (option_index == -1 || option_index == EOF || option_index == 1) { 565 if (CHECK_EOF(option_index) || option_index == 1) {
566 break; 566 break;
567 } 567 }
568 568
diff --git a/plugins/check_time.c b/plugins/check_time.c
index 99708ad3..aec995d4 100644
--- a/plugins/check_time.c
+++ b/plugins/check_time.c
@@ -213,7 +213,7 @@ check_time_config_wrapper process_arguments(int argc, char **argv) {
213 int option = 0; 213 int option = 0;
214 option_char = getopt_long(argc, argv, "hVH:w:c:W:C:p:t:u", longopts, &option); 214 option_char = getopt_long(argc, argv, "hVH:w:c:W:C:p:t:u", longopts, &option);
215 215
216 if (option_char == -1 || option_char == EOF) { 216 if (CHECK_EOF(option_char)) {
217 break; 217 break;
218 } 218 }
219 219
diff --git a/plugins/common.h b/plugins/common.h
index b3053486..9d1434a3 100644
--- a/plugins/common.h
+++ b/plugins/common.h
@@ -205,4 +205,11 @@ enum {
205# define __attribute__(x) /* do nothing */ 205# define __attribute__(x) /* do nothing */
206#endif 206#endif
207 207
208/* for checking the result of getopt_long */
209#if EOF == -1
210#define CHECK_EOF(c) ((c) == EOF)
211#else
212#define CHECK_EOF(c) ((c) == -1 || (c) == EOF)
213#endif
214
208#endif /* _COMMON_H_ */ 215#endif /* _COMMON_H_ */
diff --git a/plugins/utils.h b/plugins/utils.h
index 68ff1630..c1c921fb 100644
--- a/plugins/utils.h
+++ b/plugins/utils.h
@@ -13,6 +13,7 @@ in order to resist overflow attacks. In addition, a few functions are
13provided to standardize version and error reporting across the entire 13provided to standardize version and error reporting across the entire
14suite of plugins. */ 14suite of plugins. */
15 15
16#undef USE_OPENSSL // net-snmp defines USE_OPENSSL as NETSNMP_USE_OPENSSL in net-snmp-config.h
16#include "../config.h" 17#include "../config.h"
17#include <stdbool.h> 18#include <stdbool.h>
18#include <stdint.h> 19#include <stdint.h>