1 |
commit: bd972ad78b31075258f6ce5292fa088e112453b0 |
2 |
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu May 26 17:57:19 2022 +0000 |
4 |
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu May 26 17:57:19 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=bd972ad7 |
7 |
|
8 |
build-sys: update gnulib |
9 |
|
10 |
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org> |
11 |
|
12 |
Makefile.in | 1 + |
13 |
autotools/gnulib/Makefile.am | 21 +- |
14 |
autotools/gnulib/Makefile.in | 129 +- |
15 |
autotools/gnulib/alloca.h | 73 + |
16 |
autotools/gnulib/cdefs.h | 16 +- |
17 |
autotools/gnulib/dirent.h | 828 ++++++++ |
18 |
autotools/gnulib/fcntl.h | 952 +++++++++ |
19 |
autotools/gnulib/fcntl.in.h | 4 + |
20 |
autotools/gnulib/inttypes.h | 1509 ++++++++++++++ |
21 |
autotools/gnulib/libc-config.h | 11 + |
22 |
autotools/gnulib/limits.h | 132 ++ |
23 |
autotools/gnulib/malloc/.dirstamp | 0 |
24 |
autotools/gnulib/malloc/scratch_buffer.gl.h | 148 ++ |
25 |
autotools/gnulib/{math.in.h => math.h} | 1071 +++++++--- |
26 |
autotools/gnulib/math.in.h | 4 + |
27 |
autotools/gnulib/openat.h | 2 + |
28 |
autotools/gnulib/renameatu.c | 15 +- |
29 |
autotools/gnulib/statat.c | 21 - |
30 |
autotools/gnulib/stdint.h | 741 +++++++ |
31 |
autotools/gnulib/stdio.h | 2218 +++++++++++++++++++++ |
32 |
autotools/gnulib/{stdlib.in.h => stdlib.h} | 874 +++++++-- |
33 |
autotools/gnulib/stdlib.in.h | 4 + |
34 |
autotools/gnulib/str-two-way.h | 4 +- |
35 |
autotools/gnulib/{string.in.h => string.h} | 784 ++++++-- |
36 |
autotools/gnulib/string.in.h | 81 +- |
37 |
autotools/gnulib/strings.h | 629 ++++++ |
38 |
autotools/gnulib/strtol.c | 408 ++++ |
39 |
autotools/gnulib/strtoll.c | 33 + |
40 |
autotools/gnulib/sys/stat.h | 1435 ++++++++++++++ |
41 |
autotools/gnulib/sys/time.h | 731 +++++++ |
42 |
autotools/gnulib/sys/types.h | 107 + |
43 |
autotools/gnulib/time.h | 959 +++++++++ |
44 |
autotools/gnulib/unistd.h | 2834 +++++++++++++++++++++++++++ |
45 |
autotools/gnulib/unlinkat.c | 5 +- |
46 |
autotools/gnulib/utime.h | 619 ++++++ |
47 |
autotools/gnulib/vasnprintf.c | 239 +-- |
48 |
autotools/gnulib/verify.h | 5 +- |
49 |
autotools/gnulib/{wchar.in.h => wchar.h} | 763 ++++++-- |
50 |
autotools/gnulib/wchar.in.h | 24 +- |
51 |
autotools/m4/gnulib-cache.m4 | 2 + |
52 |
autotools/m4/gnulib-common.m4 | 10 +- |
53 |
autotools/m4/gnulib-comp.m4 | 15 +- |
54 |
autotools/m4/strtoll.m4 | 51 + |
55 |
config.guess | 1264 ++++++------ |
56 |
config.h.in | 18 +- |
57 |
config.sub | 103 +- |
58 |
configure | 119 +- |
59 |
libq/Makefile.in | 1 + |
60 |
tests/Makefile.in | 1 + |
61 |
tests/atom_compare/Makefile.in | 1 + |
62 |
tests/atom_explode/Makefile.in | 1 + |
63 |
tests/copy_file/Makefile.in | 1 + |
64 |
tests/install/Makefile.in | 1 + |
65 |
tests/mkdir/Makefile.in | 1 + |
66 |
tests/profile/Makefile.in | 1 + |
67 |
tests/qatom/Makefile.in | 1 + |
68 |
tests/qcheck/Makefile.in | 1 + |
69 |
tests/qdepends/Makefile.in | 1 + |
70 |
tests/qfile/Makefile.in | 1 + |
71 |
tests/qlist/Makefile.in | 1 + |
72 |
tests/qlop/Makefile.in | 1 + |
73 |
tests/qmanifest/Makefile.in | 1 + |
74 |
tests/qmerge/Makefile.in | 1 + |
75 |
tests/qtbz2/Makefile.in | 1 + |
76 |
tests/quse/Makefile.in | 1 + |
77 |
tests/qxpak/Makefile.in | 1 + |
78 |
tests/rmspace/Makefile.in | 1 + |
79 |
tests/source/Makefile.in | 1 + |
80 |
68 files changed, 18385 insertions(+), 1652 deletions(-) |
81 |
|
82 |
diff --git a/Makefile.in b/Makefile.in |
83 |
index 35403dd..263bcb1 100644 |
84 |
--- a/Makefile.in |
85 |
+++ b/Makefile.in |
86 |
@@ -223,6 +223,7 @@ am__aclocal_m4_deps = $(top_srcdir)/autotools/m4/00gnulib.m4 \ |
87 |
$(top_srcdir)/autotools/m4/string_h.m4 \ |
88 |
$(top_srcdir)/autotools/m4/strings_h.m4 \ |
89 |
$(top_srcdir)/autotools/m4/strncat.m4 \ |
90 |
+ $(top_srcdir)/autotools/m4/strtoll.m4 \ |
91 |
$(top_srcdir)/autotools/m4/symlink.m4 \ |
92 |
$(top_srcdir)/autotools/m4/symlinkat.m4 \ |
93 |
$(top_srcdir)/autotools/m4/sys_socket_h.m4 \ |
94 |
|
95 |
diff --git a/autotools/gnulib/Makefile.am b/autotools/gnulib/Makefile.am |
96 |
index 75a456f..8f09743 100644 |
97 |
--- a/autotools/gnulib/Makefile.am |
98 |
+++ b/autotools/gnulib/Makefile.am |
99 |
@@ -48,6 +48,7 @@ |
100 |
# stat-time \ |
101 |
# strcasestr-simple \ |
102 |
# strncat \ |
103 |
+# strtoll \ |
104 |
# symlinkat \ |
105 |
# sys_stat \ |
106 |
# unlinkat \ |
107 |
@@ -55,7 +56,7 @@ |
108 |
# vasprintf-posix \ |
109 |
# xalloc |
110 |
|
111 |
-AUTOMAKE_OPTIONS = 1.11 gnits subdir-objects |
112 |
+AUTOMAKE_OPTIONS = 1.14 gnits subdir-objects |
113 |
|
114 |
SUBDIRS = |
115 |
noinst_HEADERS = |
116 |
@@ -1510,12 +1511,6 @@ EXTRA_DIST += stat-time.h |
117 |
|
118 |
## end gnulib module stat-time |
119 |
|
120 |
-## begin gnulib module statat |
121 |
- |
122 |
-libgnu_a_SOURCES += statat.c |
123 |
- |
124 |
-## end gnulib module statat |
125 |
- |
126 |
## begin gnulib module stdalign |
127 |
|
128 |
BUILT_SOURCES += $(STDALIGN_H) |
129 |
@@ -2121,6 +2116,18 @@ endif |
130 |
|
131 |
## end gnulib module strncat |
132 |
|
133 |
+## begin gnulib module strtoll |
134 |
+ |
135 |
+if GL_COND_OBJ_STRTOLL |
136 |
+libgnu_a_SOURCES += strtoll.c |
137 |
+endif |
138 |
+ |
139 |
+EXTRA_DIST += strtol.c |
140 |
+ |
141 |
+EXTRA_libgnu_a_SOURCES += strtol.c |
142 |
+ |
143 |
+## end gnulib module strtoll |
144 |
+ |
145 |
## begin gnulib module symlink |
146 |
|
147 |
if GL_COND_OBJ_SYMLINK |
148 |
|
149 |
diff --git a/autotools/gnulib/Makefile.in b/autotools/gnulib/Makefile.in |
150 |
index 7749a48..913f17f 100644 |
151 |
--- a/autotools/gnulib/Makefile.in |
152 |
+++ b/autotools/gnulib/Makefile.in |
153 |
@@ -62,6 +62,7 @@ |
154 |
# stat-time \ |
155 |
# strcasestr-simple \ |
156 |
# strncat \ |
157 |
+# strtoll \ |
158 |
# symlinkat \ |
159 |
# sys_stat \ |
160 |
# unlinkat \ |
161 |
@@ -201,12 +202,13 @@ host_triplet = @host@ |
162 |
@GL_COND_OBJ_STRERROR_TRUE@am__append_54 = strerror.c |
163 |
@GL_COND_OBJ_STRERROR_OVERRIDE_TRUE@am__append_55 = strerror-override.c |
164 |
@GL_COND_OBJ_STRNCAT_TRUE@am__append_56 = strncat.c |
165 |
-@GL_COND_OBJ_SYMLINK_TRUE@am__append_57 = symlink.c |
166 |
-@GL_COND_OBJ_SYMLINKAT_TRUE@am__append_58 = symlinkat.c |
167 |
-@GL_COND_OBJ_UNLINK_TRUE@am__append_59 = unlink.c |
168 |
-@GL_COND_OBJ_UNLINKAT_TRUE@am__append_60 = unlinkat.c |
169 |
-@GL_COND_OBJ_UTIME_TRUE@am__append_61 = utime.c |
170 |
-@GL_COND_OBJ_UTIMENSAT_TRUE@am__append_62 = utimensat.c |
171 |
+@GL_COND_OBJ_STRTOLL_TRUE@am__append_57 = strtoll.c |
172 |
+@GL_COND_OBJ_SYMLINK_TRUE@am__append_58 = symlink.c |
173 |
+@GL_COND_OBJ_SYMLINKAT_TRUE@am__append_59 = symlinkat.c |
174 |
+@GL_COND_OBJ_UNLINK_TRUE@am__append_60 = unlink.c |
175 |
+@GL_COND_OBJ_UNLINKAT_TRUE@am__append_61 = unlinkat.c |
176 |
+@GL_COND_OBJ_UTIME_TRUE@am__append_62 = utime.c |
177 |
+@GL_COND_OBJ_UTIMENSAT_TRUE@am__append_63 = utimensat.c |
178 |
subdir = autotools/gnulib |
179 |
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 |
180 |
am__aclocal_m4_deps = $(top_srcdir)/autotools/m4/00gnulib.m4 \ |
181 |
@@ -332,6 +334,7 @@ am__aclocal_m4_deps = $(top_srcdir)/autotools/m4/00gnulib.m4 \ |
182 |
$(top_srcdir)/autotools/m4/string_h.m4 \ |
183 |
$(top_srcdir)/autotools/m4/strings_h.m4 \ |
184 |
$(top_srcdir)/autotools/m4/strncat.m4 \ |
185 |
+ $(top_srcdir)/autotools/m4/strtoll.m4 \ |
186 |
$(top_srcdir)/autotools/m4/symlink.m4 \ |
187 |
$(top_srcdir)/autotools/m4/symlinkat.m4 \ |
188 |
$(top_srcdir)/autotools/m4/sys_socket_h.m4 \ |
189 |
@@ -395,11 +398,11 @@ am__libgnu_a_SOURCES_DIST = openat-priv.h openat-proc.c \ |
190 |
malloc/scratch_buffer_grow.c \ |
191 |
malloc/scratch_buffer_grow_preserve.c \ |
192 |
malloc/scratch_buffer_set_array_size.c signbitf.c signbitd.c \ |
193 |
- signbitl.c size_max.h stat.c stat-time.c statat.c stdio-read.c \ |
194 |
+ signbitl.c size_max.h stat.c stat-time.c stdio-read.c \ |
195 |
stdio-write.c strcasecmp.c strncasecmp.c strdup.c strerror.c \ |
196 |
- strerror-override.c strncat.c symlink.c symlinkat.c timespec.c \ |
197 |
- unistd.c dup-safer.c fd-safer.c pipe-safer.c unlink.c \ |
198 |
- unlinkat.c utime.c utimens.c utimensat.c xmalloc.c \ |
199 |
+ strerror-override.c strncat.c strtoll.c symlink.c symlinkat.c \ |
200 |
+ timespec.c unistd.c dup-safer.c fd-safer.c pipe-safer.c \ |
201 |
+ unlink.c unlinkat.c utime.c utimens.c utimensat.c xmalloc.c \ |
202 |
xalloc-die.c xsize.h xsize.c |
203 |
@GL_COND_OBJ_CANONICALIZE_LGPL_TRUE@am__objects_1 = libgnu_a-canonicalize-lgpl.$(OBJEXT) |
204 |
@GL_COND_OBJ_CHDIR_LONG_TRUE@am__objects_2 = \ |
205 |
@@ -481,14 +484,15 @@ am__dirstamp = $(am__leading_dot)dirstamp |
206 |
@GL_COND_OBJ_STRERROR_TRUE@ libgnu_a-strerror.$(OBJEXT) |
207 |
@GL_COND_OBJ_STRERROR_OVERRIDE_TRUE@am__objects_55 = libgnu_a-strerror-override.$(OBJEXT) |
208 |
@GL_COND_OBJ_STRNCAT_TRUE@am__objects_56 = libgnu_a-strncat.$(OBJEXT) |
209 |
-@GL_COND_OBJ_SYMLINK_TRUE@am__objects_57 = libgnu_a-symlink.$(OBJEXT) |
210 |
-@GL_COND_OBJ_SYMLINKAT_TRUE@am__objects_58 = \ |
211 |
+@GL_COND_OBJ_STRTOLL_TRUE@am__objects_57 = libgnu_a-strtoll.$(OBJEXT) |
212 |
+@GL_COND_OBJ_SYMLINK_TRUE@am__objects_58 = libgnu_a-symlink.$(OBJEXT) |
213 |
+@GL_COND_OBJ_SYMLINKAT_TRUE@am__objects_59 = \ |
214 |
@GL_COND_OBJ_SYMLINKAT_TRUE@ libgnu_a-symlinkat.$(OBJEXT) |
215 |
-@GL_COND_OBJ_UNLINK_TRUE@am__objects_59 = libgnu_a-unlink.$(OBJEXT) |
216 |
-@GL_COND_OBJ_UNLINKAT_TRUE@am__objects_60 = \ |
217 |
+@GL_COND_OBJ_UNLINK_TRUE@am__objects_60 = libgnu_a-unlink.$(OBJEXT) |
218 |
+@GL_COND_OBJ_UNLINKAT_TRUE@am__objects_61 = \ |
219 |
@GL_COND_OBJ_UNLINKAT_TRUE@ libgnu_a-unlinkat.$(OBJEXT) |
220 |
-@GL_COND_OBJ_UTIME_TRUE@am__objects_61 = libgnu_a-utime.$(OBJEXT) |
221 |
-@GL_COND_OBJ_UTIMENSAT_TRUE@am__objects_62 = \ |
222 |
+@GL_COND_OBJ_UTIME_TRUE@am__objects_62 = libgnu_a-utime.$(OBJEXT) |
223 |
+@GL_COND_OBJ_UTIMENSAT_TRUE@am__objects_63 = \ |
224 |
@GL_COND_OBJ_UTIMENSAT_TRUE@ libgnu_a-utimensat.$(OBJEXT) |
225 |
am_libgnu_a_OBJECTS = libgnu_a-openat-proc.$(OBJEXT) \ |
226 |
libgnu_a-basename-lgpl.$(OBJEXT) $(am__objects_1) \ |
227 |
@@ -524,15 +528,15 @@ am_libgnu_a_OBJECTS = libgnu_a-openat-proc.$(OBJEXT) \ |
228 |
malloc/libgnu_a-scratch_buffer_grow_preserve.$(OBJEXT) \ |
229 |
malloc/libgnu_a-scratch_buffer_set_array_size.$(OBJEXT) \ |
230 |
$(am__objects_47) $(am__objects_48) \ |
231 |
- libgnu_a-stat-time.$(OBJEXT) libgnu_a-statat.$(OBJEXT) \ |
232 |
- $(am__objects_49) $(am__objects_50) $(am__objects_51) \ |
233 |
- $(am__objects_52) $(am__objects_53) $(am__objects_54) \ |
234 |
- $(am__objects_55) $(am__objects_56) $(am__objects_57) \ |
235 |
- $(am__objects_58) libgnu_a-timespec.$(OBJEXT) \ |
236 |
+ libgnu_a-stat-time.$(OBJEXT) $(am__objects_49) \ |
237 |
+ $(am__objects_50) $(am__objects_51) $(am__objects_52) \ |
238 |
+ $(am__objects_53) $(am__objects_54) $(am__objects_55) \ |
239 |
+ $(am__objects_56) $(am__objects_57) $(am__objects_58) \ |
240 |
+ $(am__objects_59) libgnu_a-timespec.$(OBJEXT) \ |
241 |
libgnu_a-unistd.$(OBJEXT) libgnu_a-dup-safer.$(OBJEXT) \ |
242 |
libgnu_a-fd-safer.$(OBJEXT) libgnu_a-pipe-safer.$(OBJEXT) \ |
243 |
- $(am__objects_59) $(am__objects_60) $(am__objects_61) \ |
244 |
- libgnu_a-utimens.$(OBJEXT) $(am__objects_62) \ |
245 |
+ $(am__objects_60) $(am__objects_61) $(am__objects_62) \ |
246 |
+ libgnu_a-utimens.$(OBJEXT) $(am__objects_63) \ |
247 |
libgnu_a-xmalloc.$(OBJEXT) libgnu_a-xalloc-die.$(OBJEXT) \ |
248 |
libgnu_a-xsize.$(OBJEXT) |
249 |
libgnu_a_OBJECTS = $(am_libgnu_a_OBJECTS) |
250 |
@@ -622,7 +626,6 @@ am__depfiles_remade = ./$(DEPDIR)/libgnu_a-asnprintf.Po \ |
251 |
./$(DEPDIR)/libgnu_a-signbitl.Po \ |
252 |
./$(DEPDIR)/libgnu_a-stat-time.Po \ |
253 |
./$(DEPDIR)/libgnu_a-stat-w32.Po ./$(DEPDIR)/libgnu_a-stat.Po \ |
254 |
- ./$(DEPDIR)/libgnu_a-statat.Po \ |
255 |
./$(DEPDIR)/libgnu_a-stdio-read.Po \ |
256 |
./$(DEPDIR)/libgnu_a-stdio-write.Po \ |
257 |
./$(DEPDIR)/libgnu_a-strcasecmp.Po \ |
258 |
@@ -632,7 +635,8 @@ am__depfiles_remade = ./$(DEPDIR)/libgnu_a-asnprintf.Po \ |
259 |
./$(DEPDIR)/libgnu_a-strerror.Po \ |
260 |
./$(DEPDIR)/libgnu_a-stripslash.Po \ |
261 |
./$(DEPDIR)/libgnu_a-strncasecmp.Po \ |
262 |
- ./$(DEPDIR)/libgnu_a-strncat.Po \ |
263 |
+ ./$(DEPDIR)/libgnu_a-strncat.Po ./$(DEPDIR)/libgnu_a-strtol.Po \ |
264 |
+ ./$(DEPDIR)/libgnu_a-strtoll.Po \ |
265 |
./$(DEPDIR)/libgnu_a-symlink.Po \ |
266 |
./$(DEPDIR)/libgnu_a-symlinkat.Po \ |
267 |
./$(DEPDIR)/libgnu_a-timespec.Po \ |
268 |
@@ -2007,7 +2011,7 @@ target_alias = @target_alias@ |
269 |
top_build_prefix = @top_build_prefix@ |
270 |
top_builddir = @top_builddir@ |
271 |
top_srcdir = @top_srcdir@ |
272 |
-AUTOMAKE_OPTIONS = 1.11 gnits subdir-objects |
273 |
+AUTOMAKE_OPTIONS = 1.14 gnits subdir-objects |
274 |
SUBDIRS = |
275 |
noinst_HEADERS = |
276 |
noinst_LIBRARIES = libgnu.a |
277 |
@@ -2032,8 +2036,8 @@ EXTRA_DIST = alloca.in.h assure.h attribute.h basename-lgpl.h calloc.c \ |
278 |
arg-nonnull.h c++defs.h warn-on-use.h stat-w32.c stat-w32.h \ |
279 |
stat-time.h stdalign.in.h stdbool.in.h stddef.in.h stdint.in.h \ |
280 |
stdio.in.h stdlib.in.h str-two-way.h strcasestr.c \ |
281 |
- strerror-override.h string.in.h strings.in.h at-func.c \ |
282 |
- sys_stat.in.h sys_time.in.h sys_types.in.h time.in.h \ |
283 |
+ strerror-override.h string.in.h strings.in.h strtol.c \ |
284 |
+ at-func.c sys_stat.in.h sys_time.in.h sys_types.in.h time.in.h \ |
285 |
timespec.h unistd.in.h unistd--.h unistd-safer.h at-func.c \ |
286 |
utime.in.h utimens.h at-func.c asnprintf.c float+.h \ |
287 |
printf-args.c printf-args.h printf-parse.c printf-parse.h \ |
288 |
@@ -2087,13 +2091,13 @@ libgnu_a_SOURCES = openat-priv.h openat-proc.c basename-lgpl.c \ |
289 |
malloc/scratch_buffer_dupfree.c malloc/scratch_buffer_grow.c \ |
290 |
malloc/scratch_buffer_grow_preserve.c \ |
291 |
malloc/scratch_buffer_set_array_size.c $(am__append_47) \ |
292 |
- size_max.h $(am__append_48) stat-time.c statat.c \ |
293 |
- $(am__append_49) $(am__append_50) $(am__append_51) \ |
294 |
- $(am__append_52) $(am__append_53) $(am__append_54) \ |
295 |
- $(am__append_55) $(am__append_56) $(am__append_57) \ |
296 |
- $(am__append_58) timespec.c unistd.c dup-safer.c fd-safer.c \ |
297 |
- pipe-safer.c $(am__append_59) $(am__append_60) \ |
298 |
- $(am__append_61) utimens.c $(am__append_62) xmalloc.c \ |
299 |
+ size_max.h $(am__append_48) stat-time.c $(am__append_49) \ |
300 |
+ $(am__append_50) $(am__append_51) $(am__append_52) \ |
301 |
+ $(am__append_53) $(am__append_54) $(am__append_55) \ |
302 |
+ $(am__append_56) $(am__append_57) $(am__append_58) \ |
303 |
+ $(am__append_59) timespec.c unistd.c dup-safer.c fd-safer.c \ |
304 |
+ pipe-safer.c $(am__append_60) $(am__append_61) \ |
305 |
+ $(am__append_62) utimens.c $(am__append_63) xmalloc.c \ |
306 |
xalloc-die.c xsize.h xsize.c |
307 |
libgnu_a_CFLAGS = $(AM_CFLAGS) $(GL_CFLAG_GNULIB_WARNINGS) |
308 |
libgnu_a_LIBADD = $(gl_LIBOBJS) |
309 |
@@ -2102,8 +2106,8 @@ EXTRA_libgnu_a_SOURCES = calloc.c calloc.c at-func.c frexp.c frexp.c \ |
310 |
frexpl.c stat-w32.c at-func.c isnan.c isnand.c isnan.c \ |
311 |
isnanf.c isnan.c isnanl.c malloc.c malloc.c at-func.c \ |
312 |
printf-frexp.c at-func.c realloc.c realloc.c at-func2.c \ |
313 |
- at-func2.c stat-w32.c strcasestr.c at-func.c at-func.c \ |
314 |
- at-func.c asnprintf.c printf-args.c printf-parse.c \ |
315 |
+ at-func2.c stat-w32.c strcasestr.c strtol.c at-func.c \ |
316 |
+ at-func.c at-func.c asnprintf.c printf-args.c printf-parse.c \ |
317 |
vasnprintf.c asprintf.c vasprintf.c |
318 |
|
319 |
# Use this preprocessor expression to decide whether #include_next works. |
320 |
@@ -2310,7 +2314,6 @@ distclean-compile: |
321 |
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgnu_a-stat-time.Po@am__quote@ # am--include-marker |
322 |
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgnu_a-stat-w32.Po@am__quote@ # am--include-marker |
323 |
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgnu_a-stat.Po@am__quote@ # am--include-marker |
324 |
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgnu_a-statat.Po@am__quote@ # am--include-marker |
325 |
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgnu_a-stdio-read.Po@am__quote@ # am--include-marker |
326 |
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgnu_a-stdio-write.Po@am__quote@ # am--include-marker |
327 |
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgnu_a-strcasecmp.Po@am__quote@ # am--include-marker |
328 |
@@ -2321,6 +2324,8 @@ distclean-compile: |
329 |
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgnu_a-stripslash.Po@am__quote@ # am--include-marker |
330 |
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgnu_a-strncasecmp.Po@am__quote@ # am--include-marker |
331 |
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgnu_a-strncat.Po@am__quote@ # am--include-marker |
332 |
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgnu_a-strtol.Po@am__quote@ # am--include-marker |
333 |
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgnu_a-strtoll.Po@am__quote@ # am--include-marker |
334 |
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgnu_a-symlink.Po@am__quote@ # am--include-marker |
335 |
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgnu_a-symlinkat.Po@am__quote@ # am--include-marker |
336 |
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgnu_a-timespec.Po@am__quote@ # am--include-marker |
337 |
@@ -3434,20 +3439,6 @@ libgnu_a-stat-time.obj: stat-time.c |
338 |
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ |
339 |
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgnu_a_CFLAGS) $(CFLAGS) -c -o libgnu_a-stat-time.obj `if test -f 'stat-time.c'; then $(CYGPATH_W) 'stat-time.c'; else $(CYGPATH_W) '$(srcdir)/stat-time.c'; fi` |
340 |
|
341 |
-libgnu_a-statat.o: statat.c |
342 |
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgnu_a_CFLAGS) $(CFLAGS) -MT libgnu_a-statat.o -MD -MP -MF $(DEPDIR)/libgnu_a-statat.Tpo -c -o libgnu_a-statat.o `test -f 'statat.c' || echo '$(srcdir)/'`statat.c |
343 |
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgnu_a-statat.Tpo $(DEPDIR)/libgnu_a-statat.Po |
344 |
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='statat.c' object='libgnu_a-statat.o' libtool=no @AMDEPBACKSLASH@ |
345 |
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ |
346 |
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgnu_a_CFLAGS) $(CFLAGS) -c -o libgnu_a-statat.o `test -f 'statat.c' || echo '$(srcdir)/'`statat.c |
347 |
- |
348 |
-libgnu_a-statat.obj: statat.c |
349 |
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgnu_a_CFLAGS) $(CFLAGS) -MT libgnu_a-statat.obj -MD -MP -MF $(DEPDIR)/libgnu_a-statat.Tpo -c -o libgnu_a-statat.obj `if test -f 'statat.c'; then $(CYGPATH_W) 'statat.c'; else $(CYGPATH_W) '$(srcdir)/statat.c'; fi` |
350 |
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgnu_a-statat.Tpo $(DEPDIR)/libgnu_a-statat.Po |
351 |
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='statat.c' object='libgnu_a-statat.obj' libtool=no @AMDEPBACKSLASH@ |
352 |
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ |
353 |
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgnu_a_CFLAGS) $(CFLAGS) -c -o libgnu_a-statat.obj `if test -f 'statat.c'; then $(CYGPATH_W) 'statat.c'; else $(CYGPATH_W) '$(srcdir)/statat.c'; fi` |
354 |
- |
355 |
libgnu_a-stdio-read.o: stdio-read.c |
356 |
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgnu_a_CFLAGS) $(CFLAGS) -MT libgnu_a-stdio-read.o -MD -MP -MF $(DEPDIR)/libgnu_a-stdio-read.Tpo -c -o libgnu_a-stdio-read.o `test -f 'stdio-read.c' || echo '$(srcdir)/'`stdio-read.c |
357 |
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgnu_a-stdio-read.Tpo $(DEPDIR)/libgnu_a-stdio-read.Po |
358 |
@@ -3560,6 +3551,20 @@ libgnu_a-strncat.obj: strncat.c |
359 |
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ |
360 |
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgnu_a_CFLAGS) $(CFLAGS) -c -o libgnu_a-strncat.obj `if test -f 'strncat.c'; then $(CYGPATH_W) 'strncat.c'; else $(CYGPATH_W) '$(srcdir)/strncat.c'; fi` |
361 |
|
362 |
+libgnu_a-strtoll.o: strtoll.c |
363 |
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgnu_a_CFLAGS) $(CFLAGS) -MT libgnu_a-strtoll.o -MD -MP -MF $(DEPDIR)/libgnu_a-strtoll.Tpo -c -o libgnu_a-strtoll.o `test -f 'strtoll.c' || echo '$(srcdir)/'`strtoll.c |
364 |
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgnu_a-strtoll.Tpo $(DEPDIR)/libgnu_a-strtoll.Po |
365 |
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='strtoll.c' object='libgnu_a-strtoll.o' libtool=no @AMDEPBACKSLASH@ |
366 |
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ |
367 |
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgnu_a_CFLAGS) $(CFLAGS) -c -o libgnu_a-strtoll.o `test -f 'strtoll.c' || echo '$(srcdir)/'`strtoll.c |
368 |
+ |
369 |
+libgnu_a-strtoll.obj: strtoll.c |
370 |
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgnu_a_CFLAGS) $(CFLAGS) -MT libgnu_a-strtoll.obj -MD -MP -MF $(DEPDIR)/libgnu_a-strtoll.Tpo -c -o libgnu_a-strtoll.obj `if test -f 'strtoll.c'; then $(CYGPATH_W) 'strtoll.c'; else $(CYGPATH_W) '$(srcdir)/strtoll.c'; fi` |
371 |
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgnu_a-strtoll.Tpo $(DEPDIR)/libgnu_a-strtoll.Po |
372 |
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='strtoll.c' object='libgnu_a-strtoll.obj' libtool=no @AMDEPBACKSLASH@ |
373 |
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ |
374 |
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgnu_a_CFLAGS) $(CFLAGS) -c -o libgnu_a-strtoll.obj `if test -f 'strtoll.c'; then $(CYGPATH_W) 'strtoll.c'; else $(CYGPATH_W) '$(srcdir)/strtoll.c'; fi` |
375 |
+ |
376 |
libgnu_a-symlink.o: symlink.c |
377 |
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgnu_a_CFLAGS) $(CFLAGS) -MT libgnu_a-symlink.o -MD -MP -MF $(DEPDIR)/libgnu_a-symlink.Tpo -c -o libgnu_a-symlink.o `test -f 'symlink.c' || echo '$(srcdir)/'`symlink.c |
378 |
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgnu_a-symlink.Tpo $(DEPDIR)/libgnu_a-symlink.Po |
379 |
@@ -3952,6 +3957,20 @@ libgnu_a-strcasestr.obj: strcasestr.c |
380 |
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ |
381 |
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgnu_a_CFLAGS) $(CFLAGS) -c -o libgnu_a-strcasestr.obj `if test -f 'strcasestr.c'; then $(CYGPATH_W) 'strcasestr.c'; else $(CYGPATH_W) '$(srcdir)/strcasestr.c'; fi` |
382 |
|
383 |
+libgnu_a-strtol.o: strtol.c |
384 |
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgnu_a_CFLAGS) $(CFLAGS) -MT libgnu_a-strtol.o -MD -MP -MF $(DEPDIR)/libgnu_a-strtol.Tpo -c -o libgnu_a-strtol.o `test -f 'strtol.c' || echo '$(srcdir)/'`strtol.c |
385 |
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgnu_a-strtol.Tpo $(DEPDIR)/libgnu_a-strtol.Po |
386 |
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='strtol.c' object='libgnu_a-strtol.o' libtool=no @AMDEPBACKSLASH@ |
387 |
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ |
388 |
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgnu_a_CFLAGS) $(CFLAGS) -c -o libgnu_a-strtol.o `test -f 'strtol.c' || echo '$(srcdir)/'`strtol.c |
389 |
+ |
390 |
+libgnu_a-strtol.obj: strtol.c |
391 |
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgnu_a_CFLAGS) $(CFLAGS) -MT libgnu_a-strtol.obj -MD -MP -MF $(DEPDIR)/libgnu_a-strtol.Tpo -c -o libgnu_a-strtol.obj `if test -f 'strtol.c'; then $(CYGPATH_W) 'strtol.c'; else $(CYGPATH_W) '$(srcdir)/strtol.c'; fi` |
392 |
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgnu_a-strtol.Tpo $(DEPDIR)/libgnu_a-strtol.Po |
393 |
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='strtol.c' object='libgnu_a-strtol.obj' libtool=no @AMDEPBACKSLASH@ |
394 |
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ |
395 |
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgnu_a_CFLAGS) $(CFLAGS) -c -o libgnu_a-strtol.obj `if test -f 'strtol.c'; then $(CYGPATH_W) 'strtol.c'; else $(CYGPATH_W) '$(srcdir)/strtol.c'; fi` |
396 |
+ |
397 |
libgnu_a-asnprintf.o: asnprintf.c |
398 |
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgnu_a_CFLAGS) $(CFLAGS) -MT libgnu_a-asnprintf.o -MD -MP -MF $(DEPDIR)/libgnu_a-asnprintf.Tpo -c -o libgnu_a-asnprintf.o `test -f 'asnprintf.c' || echo '$(srcdir)/'`asnprintf.c |
399 |
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgnu_a-asnprintf.Tpo $(DEPDIR)/libgnu_a-asnprintf.Po |
400 |
@@ -4339,7 +4358,6 @@ distclean: distclean-recursive |
401 |
-rm -f ./$(DEPDIR)/libgnu_a-stat-time.Po |
402 |
-rm -f ./$(DEPDIR)/libgnu_a-stat-w32.Po |
403 |
-rm -f ./$(DEPDIR)/libgnu_a-stat.Po |
404 |
- -rm -f ./$(DEPDIR)/libgnu_a-statat.Po |
405 |
-rm -f ./$(DEPDIR)/libgnu_a-stdio-read.Po |
406 |
-rm -f ./$(DEPDIR)/libgnu_a-stdio-write.Po |
407 |
-rm -f ./$(DEPDIR)/libgnu_a-strcasecmp.Po |
408 |
@@ -4350,6 +4368,8 @@ distclean: distclean-recursive |
409 |
-rm -f ./$(DEPDIR)/libgnu_a-stripslash.Po |
410 |
-rm -f ./$(DEPDIR)/libgnu_a-strncasecmp.Po |
411 |
-rm -f ./$(DEPDIR)/libgnu_a-strncat.Po |
412 |
+ -rm -f ./$(DEPDIR)/libgnu_a-strtol.Po |
413 |
+ -rm -f ./$(DEPDIR)/libgnu_a-strtoll.Po |
414 |
-rm -f ./$(DEPDIR)/libgnu_a-symlink.Po |
415 |
-rm -f ./$(DEPDIR)/libgnu_a-symlinkat.Po |
416 |
-rm -f ./$(DEPDIR)/libgnu_a-timespec.Po |
417 |
@@ -4503,7 +4523,6 @@ maintainer-clean: maintainer-clean-recursive |
418 |
-rm -f ./$(DEPDIR)/libgnu_a-stat-time.Po |
419 |
-rm -f ./$(DEPDIR)/libgnu_a-stat-w32.Po |
420 |
-rm -f ./$(DEPDIR)/libgnu_a-stat.Po |
421 |
- -rm -f ./$(DEPDIR)/libgnu_a-statat.Po |
422 |
-rm -f ./$(DEPDIR)/libgnu_a-stdio-read.Po |
423 |
-rm -f ./$(DEPDIR)/libgnu_a-stdio-write.Po |
424 |
-rm -f ./$(DEPDIR)/libgnu_a-strcasecmp.Po |
425 |
@@ -4514,6 +4533,8 @@ maintainer-clean: maintainer-clean-recursive |
426 |
-rm -f ./$(DEPDIR)/libgnu_a-stripslash.Po |
427 |
-rm -f ./$(DEPDIR)/libgnu_a-strncasecmp.Po |
428 |
-rm -f ./$(DEPDIR)/libgnu_a-strncat.Po |
429 |
+ -rm -f ./$(DEPDIR)/libgnu_a-strtol.Po |
430 |
+ -rm -f ./$(DEPDIR)/libgnu_a-strtoll.Po |
431 |
-rm -f ./$(DEPDIR)/libgnu_a-symlink.Po |
432 |
-rm -f ./$(DEPDIR)/libgnu_a-symlinkat.Po |
433 |
-rm -f ./$(DEPDIR)/libgnu_a-timespec.Po |
434 |
|
435 |
diff --git a/autotools/gnulib/alloca.h b/autotools/gnulib/alloca.h |
436 |
new file mode 100644 |
437 |
index 0000000..d21d810 |
438 |
--- /dev/null |
439 |
+++ b/autotools/gnulib/alloca.h |
440 |
@@ -0,0 +1,73 @@ |
441 |
+/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ |
442 |
+/* Memory allocation on the stack. |
443 |
+ |
444 |
+ Copyright (C) 1995, 1999, 2001-2004, 2006-2022 Free Software Foundation, |
445 |
+ Inc. |
446 |
+ |
447 |
+ This file is free software: you can redistribute it and/or modify |
448 |
+ it under the terms of the GNU Lesser General Public License as |
449 |
+ published by the Free Software Foundation; either version 2.1 of the |
450 |
+ License, or (at your option) any later version. |
451 |
+ |
452 |
+ This file is distributed in the hope that it will be useful, |
453 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
454 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
455 |
+ GNU Lesser General Public License for more details. |
456 |
+ |
457 |
+ You should have received a copy of the GNU Lesser General Public License |
458 |
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
459 |
+ |
460 |
+/* Avoid using the symbol _ALLOCA_H here, as Bison assumes _ALLOCA_H |
461 |
+ means there is a real alloca function. */ |
462 |
+#ifndef _GL_ALLOCA_H |
463 |
+#define _GL_ALLOCA_H |
464 |
+ |
465 |
+/* alloca (N) returns a pointer to N bytes of memory |
466 |
+ allocated on the stack, which will last until the function returns. |
467 |
+ Use of alloca should be avoided: |
468 |
+ - inside arguments of function calls - undefined behaviour, |
469 |
+ - in inline functions - the allocation may actually last until the |
470 |
+ calling function returns, |
471 |
+ - for huge N (say, N >= 65536) - you never know how large (or small) |
472 |
+ the stack is, and when the stack cannot fulfill the memory allocation |
473 |
+ request, the program just crashes. |
474 |
+ */ |
475 |
+ |
476 |
+#ifndef alloca |
477 |
+ /* Some version of mingw have an <alloca.h> that causes trouble when |
478 |
+ included after 'alloca' gets defined as a macro. As a workaround, |
479 |
+ include this <alloca.h> first and define 'alloca' as a macro afterwards |
480 |
+ if needed. */ |
481 |
+# if defined __GNUC__ && (defined _WIN32 && ! defined __CYGWIN__) && 1 |
482 |
+# include_next <alloca.h> |
483 |
+# endif |
484 |
+#endif |
485 |
+#ifndef alloca |
486 |
+# if defined __GNUC__ || (__clang_major__ >= 4) |
487 |
+# define alloca __builtin_alloca |
488 |
+# elif defined _AIX |
489 |
+# define alloca __alloca |
490 |
+# elif defined _MSC_VER |
491 |
+# include <malloc.h> |
492 |
+# define alloca _alloca |
493 |
+# elif defined __DECC && defined __VMS |
494 |
+# define alloca __ALLOCA |
495 |
+# elif defined __TANDEM && defined _TNS_E_TARGET |
496 |
+# ifdef __cplusplus |
497 |
+extern "C" |
498 |
+# endif |
499 |
+void *_alloca (unsigned short); |
500 |
+# pragma intrinsic (_alloca) |
501 |
+# define alloca _alloca |
502 |
+# elif defined __MVS__ |
503 |
+# include <stdlib.h> |
504 |
+# else |
505 |
+# include <stddef.h> |
506 |
+# ifdef __cplusplus |
507 |
+extern "C" |
508 |
+# endif |
509 |
+void *alloca (size_t); |
510 |
+# endif |
511 |
+#endif |
512 |
+ |
513 |
+#endif /* _GL_ALLOCA_H */ |
514 |
|
515 |
diff --git a/autotools/gnulib/cdefs.h b/autotools/gnulib/cdefs.h |
516 |
index 44d3826..7b8ed5b 100644 |
517 |
--- a/autotools/gnulib/cdefs.h |
518 |
+++ b/autotools/gnulib/cdefs.h |
519 |
@@ -41,7 +41,9 @@ |
520 |
Similarly for __has_builtin, etc. */ |
521 |
#if (defined __has_attribute \ |
522 |
&& (!defined __clang_minor__ \ |
523 |
- || 3 < __clang_major__ + (5 <= __clang_minor__))) |
524 |
+ || (defined __apple_build_version__ \ |
525 |
+ ? 6000000 <= __apple_build_version__ \ |
526 |
+ : 3 < __clang_major__ + (5 <= __clang_minor__)))) |
527 |
# define __glibc_has_attribute(attr) __has_attribute (attr) |
528 |
#else |
529 |
# define __glibc_has_attribute(attr) 0 |
530 |
@@ -162,13 +164,13 @@ |
531 |
|| (__builtin_constant_p (__l) && (__l) > 0)) |
532 |
|
533 |
/* Length is known to be safe at compile time if the __L * __S <= __OBJSZ |
534 |
- condition can be folded to a constant and if it is true. The -1 check is |
535 |
- redundant because since it implies that __glibc_safe_len_cond is true. */ |
536 |
+ condition can be folded to a constant and if it is true, or unknown (-1) */ |
537 |
#define __glibc_safe_or_unknown_len(__l, __s, __osz) \ |
538 |
- (__glibc_unsigned_or_positive (__l) \ |
539 |
- && __builtin_constant_p (__glibc_safe_len_cond ((__SIZE_TYPE__) (__l), \ |
540 |
- __s, __osz)) \ |
541 |
- && __glibc_safe_len_cond ((__SIZE_TYPE__) (__l), __s, __osz)) |
542 |
+ ((__osz) == (__SIZE_TYPE__) -1 \ |
543 |
+ || (__glibc_unsigned_or_positive (__l) \ |
544 |
+ && __builtin_constant_p (__glibc_safe_len_cond ((__SIZE_TYPE__) (__l), \ |
545 |
+ (__s), (__osz))) \ |
546 |
+ && __glibc_safe_len_cond ((__SIZE_TYPE__) (__l), (__s), (__osz)))) |
547 |
|
548 |
/* Conversely, we know at compile time that the length is unsafe if the |
549 |
__L * __S <= __OBJSZ condition can be folded to a constant and if it is |
550 |
|
551 |
diff --git a/autotools/gnulib/dirent.h b/autotools/gnulib/dirent.h |
552 |
new file mode 100644 |
553 |
index 0000000..0c16bbe |
554 |
--- /dev/null |
555 |
+++ b/autotools/gnulib/dirent.h |
556 |
@@ -0,0 +1,828 @@ |
557 |
+/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ |
558 |
+/* A GNU-like <dirent.h>. |
559 |
+ Copyright (C) 2006-2022 Free Software Foundation, Inc. |
560 |
+ |
561 |
+ This file is free software: you can redistribute it and/or modify |
562 |
+ it under the terms of the GNU Lesser General Public License as |
563 |
+ published by the Free Software Foundation; either version 2.1 of the |
564 |
+ License, or (at your option) any later version. |
565 |
+ |
566 |
+ This file is distributed in the hope that it will be useful, |
567 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
568 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
569 |
+ GNU Lesser General Public License for more details. |
570 |
+ |
571 |
+ You should have received a copy of the GNU Lesser General Public License |
572 |
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
573 |
+ |
574 |
+#ifndef _GL_DIRENT_H |
575 |
+ |
576 |
+#if __GNUC__ >= 3 |
577 |
+#pragma GCC system_header |
578 |
+#endif |
579 |
+ |
580 |
+ |
581 |
+/* The include_next requires a split double-inclusion guard. */ |
582 |
+#if 1 |
583 |
+# include_next <dirent.h> |
584 |
+#endif |
585 |
+ |
586 |
+#ifndef _GL_DIRENT_H |
587 |
+#define _GL_DIRENT_H |
588 |
+ |
589 |
+/* Get ino_t. Needed on some systems, including glibc 2.8. */ |
590 |
+#include <sys/types.h> |
591 |
+ |
592 |
+#if !1 |
593 |
+/* Define types DIR and 'struct dirent'. */ |
594 |
+# if !GNULIB_defined_struct_dirent |
595 |
+struct dirent |
596 |
+{ |
597 |
+ char d_type; |
598 |
+ char d_name[1]; |
599 |
+}; |
600 |
+/* Possible values for 'd_type'. */ |
601 |
+# define DT_UNKNOWN 0 |
602 |
+# define DT_FIFO 1 /* FIFO */ |
603 |
+# define DT_CHR 2 /* character device */ |
604 |
+# define DT_DIR 4 /* directory */ |
605 |
+# define DT_BLK 6 /* block device */ |
606 |
+# define DT_REG 8 /* regular file */ |
607 |
+# define DT_LNK 10 /* symbolic link */ |
608 |
+# define DT_SOCK 12 /* socket */ |
609 |
+# define DT_WHT 14 /* whiteout */ |
610 |
+typedef struct gl_directory DIR; |
611 |
+# define GNULIB_defined_struct_dirent 1 |
612 |
+# endif |
613 |
+#endif |
614 |
+ |
615 |
+/* _GL_ATTRIBUTE_DEALLOC (F, I) declares that the function returns pointers |
616 |
+ that can be freed by passing them as the Ith argument to the |
617 |
+ function F. */ |
618 |
+#ifndef _GL_ATTRIBUTE_DEALLOC |
619 |
+# if __GNUC__ >= 11 |
620 |
+# define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i))) |
621 |
+# else |
622 |
+# define _GL_ATTRIBUTE_DEALLOC(f, i) |
623 |
+# endif |
624 |
+#endif |
625 |
+ |
626 |
+/* _GL_ATTRIBUTE_MALLOC declares that the function returns a pointer to freshly |
627 |
+ allocated memory. */ |
628 |
+/* Applies to: functions. */ |
629 |
+#ifndef _GL_ATTRIBUTE_MALLOC |
630 |
+# if __GNUC__ >= 3 || defined __clang__ |
631 |
+# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) |
632 |
+# else |
633 |
+# define _GL_ATTRIBUTE_MALLOC |
634 |
+# endif |
635 |
+#endif |
636 |
+ |
637 |
+/* The __attribute__ feature is available in gcc versions 2.5 and later. |
638 |
+ The attribute __pure__ was added in gcc 2.96. */ |
639 |
+#ifndef _GL_ATTRIBUTE_PURE |
640 |
+# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || defined __clang__ |
641 |
+# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) |
642 |
+# else |
643 |
+# define _GL_ATTRIBUTE_PURE /* empty */ |
644 |
+# endif |
645 |
+#endif |
646 |
+ |
647 |
+/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ |
648 |
+/* C++ compatible function declaration macros. |
649 |
+ Copyright (C) 2010-2022 Free Software Foundation, Inc. |
650 |
+ |
651 |
+ This program is free software: you can redistribute it and/or modify it |
652 |
+ under the terms of the GNU Lesser General Public License as published |
653 |
+ by the Free Software Foundation; either version 2 of the License, or |
654 |
+ (at your option) any later version. |
655 |
+ |
656 |
+ This program is distributed in the hope that it will be useful, |
657 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
658 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
659 |
+ Lesser General Public License for more details. |
660 |
+ |
661 |
+ You should have received a copy of the GNU Lesser General Public License |
662 |
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
663 |
+ |
664 |
+#ifndef _GL_CXXDEFS_H |
665 |
+#define _GL_CXXDEFS_H |
666 |
+ |
667 |
+/* Begin/end the GNULIB_NAMESPACE namespace. */ |
668 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
669 |
+# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { |
670 |
+# define _GL_END_NAMESPACE } |
671 |
+#else |
672 |
+# define _GL_BEGIN_NAMESPACE |
673 |
+# define _GL_END_NAMESPACE |
674 |
+#endif |
675 |
+ |
676 |
+/* The three most frequent use cases of these macros are: |
677 |
+ |
678 |
+ * For providing a substitute for a function that is missing on some |
679 |
+ platforms, but is declared and works fine on the platforms on which |
680 |
+ it exists: |
681 |
+ |
682 |
+ #if @GNULIB_FOO@ |
683 |
+ # if !@HAVE_FOO@ |
684 |
+ _GL_FUNCDECL_SYS (foo, ...); |
685 |
+ # endif |
686 |
+ _GL_CXXALIAS_SYS (foo, ...); |
687 |
+ _GL_CXXALIASWARN (foo); |
688 |
+ #elif defined GNULIB_POSIXCHECK |
689 |
+ ... |
690 |
+ #endif |
691 |
+ |
692 |
+ * For providing a replacement for a function that exists on all platforms, |
693 |
+ but is broken/insufficient and needs to be replaced on some platforms: |
694 |
+ |
695 |
+ #if @GNULIB_FOO@ |
696 |
+ # if @REPLACE_FOO@ |
697 |
+ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
698 |
+ # undef foo |
699 |
+ # define foo rpl_foo |
700 |
+ # endif |
701 |
+ _GL_FUNCDECL_RPL (foo, ...); |
702 |
+ _GL_CXXALIAS_RPL (foo, ...); |
703 |
+ # else |
704 |
+ _GL_CXXALIAS_SYS (foo, ...); |
705 |
+ # endif |
706 |
+ _GL_CXXALIASWARN (foo); |
707 |
+ #elif defined GNULIB_POSIXCHECK |
708 |
+ ... |
709 |
+ #endif |
710 |
+ |
711 |
+ * For providing a replacement for a function that exists on some platforms |
712 |
+ but is broken/insufficient and needs to be replaced on some of them and |
713 |
+ is additionally either missing or undeclared on some other platforms: |
714 |
+ |
715 |
+ #if @GNULIB_FOO@ |
716 |
+ # if @REPLACE_FOO@ |
717 |
+ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
718 |
+ # undef foo |
719 |
+ # define foo rpl_foo |
720 |
+ # endif |
721 |
+ _GL_FUNCDECL_RPL (foo, ...); |
722 |
+ _GL_CXXALIAS_RPL (foo, ...); |
723 |
+ # else |
724 |
+ # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ |
725 |
+ _GL_FUNCDECL_SYS (foo, ...); |
726 |
+ # endif |
727 |
+ _GL_CXXALIAS_SYS (foo, ...); |
728 |
+ # endif |
729 |
+ _GL_CXXALIASWARN (foo); |
730 |
+ #elif defined GNULIB_POSIXCHECK |
731 |
+ ... |
732 |
+ #endif |
733 |
+*/ |
734 |
+ |
735 |
+/* _GL_EXTERN_C declaration; |
736 |
+ performs the declaration with C linkage. */ |
737 |
+#if defined __cplusplus |
738 |
+# define _GL_EXTERN_C extern "C" |
739 |
+#else |
740 |
+# define _GL_EXTERN_C extern |
741 |
+#endif |
742 |
+ |
743 |
+/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); |
744 |
+ declares a replacement function, named rpl_func, with the given prototype, |
745 |
+ consisting of return type, parameters, and attributes. |
746 |
+ Example: |
747 |
+ _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) |
748 |
+ _GL_ARG_NONNULL ((1))); |
749 |
+ */ |
750 |
+#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ |
751 |
+ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) |
752 |
+#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ |
753 |
+ _GL_EXTERN_C rettype rpl_func parameters_and_attributes |
754 |
+ |
755 |
+/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); |
756 |
+ declares the system function, named func, with the given prototype, |
757 |
+ consisting of return type, parameters, and attributes. |
758 |
+ Example: |
759 |
+ _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) |
760 |
+ _GL_ARG_NONNULL ((1))); |
761 |
+ */ |
762 |
+#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ |
763 |
+ _GL_EXTERN_C rettype func parameters_and_attributes |
764 |
+ |
765 |
+/* _GL_CXXALIAS_RPL (func, rettype, parameters); |
766 |
+ declares a C++ alias called GNULIB_NAMESPACE::func |
767 |
+ that redirects to rpl_func, if GNULIB_NAMESPACE is defined. |
768 |
+ Example: |
769 |
+ _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); |
770 |
+ |
771 |
+ Wrapping rpl_func in an object with an inline conversion operator |
772 |
+ avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is |
773 |
+ actually used in the program. */ |
774 |
+#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ |
775 |
+ _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) |
776 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
777 |
+# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ |
778 |
+ namespace GNULIB_NAMESPACE \ |
779 |
+ { \ |
780 |
+ static const struct _gl_ ## func ## _wrapper \ |
781 |
+ { \ |
782 |
+ typedef rettype (*type) parameters; \ |
783 |
+ \ |
784 |
+ inline operator type () const \ |
785 |
+ { \ |
786 |
+ return ::rpl_func; \ |
787 |
+ } \ |
788 |
+ } func = {}; \ |
789 |
+ } \ |
790 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
791 |
+#else |
792 |
+# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ |
793 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
794 |
+#endif |
795 |
+ |
796 |
+/* _GL_CXXALIAS_MDA (func, rettype, parameters); |
797 |
+ is to be used when func is a Microsoft deprecated alias, on native Windows. |
798 |
+ It declares a C++ alias called GNULIB_NAMESPACE::func |
799 |
+ that redirects to _func, if GNULIB_NAMESPACE is defined. |
800 |
+ Example: |
801 |
+ _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); |
802 |
+ */ |
803 |
+#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ |
804 |
+ _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) |
805 |
+ |
806 |
+/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); |
807 |
+ is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); |
808 |
+ except that the C function rpl_func may have a slightly different |
809 |
+ declaration. A cast is used to silence the "invalid conversion" error |
810 |
+ that would otherwise occur. */ |
811 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
812 |
+# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ |
813 |
+ namespace GNULIB_NAMESPACE \ |
814 |
+ { \ |
815 |
+ static const struct _gl_ ## func ## _wrapper \ |
816 |
+ { \ |
817 |
+ typedef rettype (*type) parameters; \ |
818 |
+ \ |
819 |
+ inline operator type () const \ |
820 |
+ { \ |
821 |
+ return reinterpret_cast<type>(::rpl_func); \ |
822 |
+ } \ |
823 |
+ } func = {}; \ |
824 |
+ } \ |
825 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
826 |
+#else |
827 |
+# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ |
828 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
829 |
+#endif |
830 |
+ |
831 |
+/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); |
832 |
+ is like _GL_CXXALIAS_MDA (func, rettype, parameters); |
833 |
+ except that the C function func may have a slightly different declaration. |
834 |
+ A cast is used to silence the "invalid conversion" error that would |
835 |
+ otherwise occur. */ |
836 |
+#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ |
837 |
+ _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) |
838 |
+ |
839 |
+/* _GL_CXXALIAS_SYS (func, rettype, parameters); |
840 |
+ declares a C++ alias called GNULIB_NAMESPACE::func |
841 |
+ that redirects to the system provided function func, if GNULIB_NAMESPACE |
842 |
+ is defined. |
843 |
+ Example: |
844 |
+ _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); |
845 |
+ |
846 |
+ Wrapping func in an object with an inline conversion operator |
847 |
+ avoids a reference to func unless GNULIB_NAMESPACE::func is |
848 |
+ actually used in the program. */ |
849 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
850 |
+# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ |
851 |
+ namespace GNULIB_NAMESPACE \ |
852 |
+ { \ |
853 |
+ static const struct _gl_ ## func ## _wrapper \ |
854 |
+ { \ |
855 |
+ typedef rettype (*type) parameters; \ |
856 |
+ \ |
857 |
+ inline operator type () const \ |
858 |
+ { \ |
859 |
+ return ::func; \ |
860 |
+ } \ |
861 |
+ } func = {}; \ |
862 |
+ } \ |
863 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
864 |
+#else |
865 |
+# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ |
866 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
867 |
+#endif |
868 |
+ |
869 |
+/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); |
870 |
+ is like _GL_CXXALIAS_SYS (func, rettype, parameters); |
871 |
+ except that the C function func may have a slightly different declaration. |
872 |
+ A cast is used to silence the "invalid conversion" error that would |
873 |
+ otherwise occur. */ |
874 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
875 |
+# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ |
876 |
+ namespace GNULIB_NAMESPACE \ |
877 |
+ { \ |
878 |
+ static const struct _gl_ ## func ## _wrapper \ |
879 |
+ { \ |
880 |
+ typedef rettype (*type) parameters; \ |
881 |
+ \ |
882 |
+ inline operator type () const \ |
883 |
+ { \ |
884 |
+ return reinterpret_cast<type>(::func); \ |
885 |
+ } \ |
886 |
+ } func = {}; \ |
887 |
+ } \ |
888 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
889 |
+#else |
890 |
+# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ |
891 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
892 |
+#endif |
893 |
+ |
894 |
+/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); |
895 |
+ is like _GL_CXXALIAS_SYS (func, rettype, parameters); |
896 |
+ except that the C function is picked among a set of overloaded functions, |
897 |
+ namely the one with rettype2 and parameters2. Two consecutive casts |
898 |
+ are used to silence the "cannot find a match" and "invalid conversion" |
899 |
+ errors that would otherwise occur. */ |
900 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
901 |
+ /* The outer cast must be a reinterpret_cast. |
902 |
+ The inner cast: When the function is defined as a set of overloaded |
903 |
+ functions, it works as a static_cast<>, choosing the designated variant. |
904 |
+ When the function is defined as a single variant, it works as a |
905 |
+ reinterpret_cast<>. The parenthesized cast syntax works both ways. */ |
906 |
+# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ |
907 |
+ namespace GNULIB_NAMESPACE \ |
908 |
+ { \ |
909 |
+ static const struct _gl_ ## func ## _wrapper \ |
910 |
+ { \ |
911 |
+ typedef rettype (*type) parameters; \ |
912 |
+ \ |
913 |
+ inline operator type () const \ |
914 |
+ { \ |
915 |
+ return reinterpret_cast<type>((rettype2 (*) parameters2)(::func)); \ |
916 |
+ } \ |
917 |
+ } func = {}; \ |
918 |
+ } \ |
919 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
920 |
+#else |
921 |
+# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ |
922 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
923 |
+#endif |
924 |
+ |
925 |
+/* _GL_CXXALIASWARN (func); |
926 |
+ causes a warning to be emitted when ::func is used but not when |
927 |
+ GNULIB_NAMESPACE::func is used. func must be defined without overloaded |
928 |
+ variants. */ |
929 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
930 |
+# define _GL_CXXALIASWARN(func) \ |
931 |
+ _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) |
932 |
+# define _GL_CXXALIASWARN_1(func,namespace) \ |
933 |
+ _GL_CXXALIASWARN_2 (func, namespace) |
934 |
+/* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>, |
935 |
+ we enable the warning only when not optimizing. */ |
936 |
+# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) |
937 |
+# define _GL_CXXALIASWARN_2(func,namespace) \ |
938 |
+ _GL_WARN_ON_USE (func, \ |
939 |
+ "The symbol ::" #func " refers to the system function. " \ |
940 |
+ "Use " #namespace "::" #func " instead.") |
941 |
+# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING |
942 |
+# define _GL_CXXALIASWARN_2(func,namespace) \ |
943 |
+ extern __typeof__ (func) func |
944 |
+# else |
945 |
+# define _GL_CXXALIASWARN_2(func,namespace) \ |
946 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
947 |
+# endif |
948 |
+#else |
949 |
+# define _GL_CXXALIASWARN(func) \ |
950 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
951 |
+#endif |
952 |
+ |
953 |
+/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); |
954 |
+ causes a warning to be emitted when the given overloaded variant of ::func |
955 |
+ is used but not when GNULIB_NAMESPACE::func is used. */ |
956 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
957 |
+# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ |
958 |
+ _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ |
959 |
+ GNULIB_NAMESPACE) |
960 |
+# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ |
961 |
+ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) |
962 |
+/* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>, |
963 |
+ we enable the warning only when not optimizing. */ |
964 |
+# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) |
965 |
+# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ |
966 |
+ _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ |
967 |
+ "The symbol ::" #func " refers to the system function. " \ |
968 |
+ "Use " #namespace "::" #func " instead.") |
969 |
+# else |
970 |
+# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ |
971 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
972 |
+# endif |
973 |
+#else |
974 |
+# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ |
975 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
976 |
+#endif |
977 |
+ |
978 |
+#endif /* _GL_CXXDEFS_H */ |
979 |
+ |
980 |
+/* The definition of _GL_ARG_NONNULL is copied here. */ |
981 |
+/* A C macro for declaring that specific arguments must not be NULL. |
982 |
+ Copyright (C) 2009-2022 Free Software Foundation, Inc. |
983 |
+ |
984 |
+ This program is free software: you can redistribute it and/or modify it |
985 |
+ under the terms of the GNU Lesser General Public License as published |
986 |
+ by the Free Software Foundation; either version 2 of the License, or |
987 |
+ (at your option) any later version. |
988 |
+ |
989 |
+ This program is distributed in the hope that it will be useful, |
990 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
991 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
992 |
+ Lesser General Public License for more details. |
993 |
+ |
994 |
+ You should have received a copy of the GNU Lesser General Public License |
995 |
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
996 |
+ |
997 |
+/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools |
998 |
+ that the values passed as arguments n, ..., m must be non-NULL pointers. |
999 |
+ n = 1 stands for the first argument, n = 2 for the second argument etc. */ |
1000 |
+#ifndef _GL_ARG_NONNULL |
1001 |
+# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ |
1002 |
+# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) |
1003 |
+# else |
1004 |
+# define _GL_ARG_NONNULL(params) |
1005 |
+# endif |
1006 |
+#endif |
1007 |
+ |
1008 |
+/* The definition of _GL_WARN_ON_USE is copied here. */ |
1009 |
+/* A C macro for emitting warnings if a function is used. |
1010 |
+ Copyright (C) 2010-2022 Free Software Foundation, Inc. |
1011 |
+ |
1012 |
+ This program is free software: you can redistribute it and/or modify it |
1013 |
+ under the terms of the GNU Lesser General Public License as published |
1014 |
+ by the Free Software Foundation; either version 2 of the License, or |
1015 |
+ (at your option) any later version. |
1016 |
+ |
1017 |
+ This program is distributed in the hope that it will be useful, |
1018 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
1019 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
1020 |
+ Lesser General Public License for more details. |
1021 |
+ |
1022 |
+ You should have received a copy of the GNU Lesser General Public License |
1023 |
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
1024 |
+ |
1025 |
+/* _GL_WARN_ON_USE (function, "literal string") issues a declaration |
1026 |
+ for FUNCTION which will then trigger a compiler warning containing |
1027 |
+ the text of "literal string" anywhere that function is called, if |
1028 |
+ supported by the compiler. If the compiler does not support this |
1029 |
+ feature, the macro expands to an unused extern declaration. |
1030 |
+ |
1031 |
+ _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the |
1032 |
+ attribute used in _GL_WARN_ON_USE. If the compiler does not support |
1033 |
+ this feature, it expands to empty. |
1034 |
+ |
1035 |
+ These macros are useful for marking a function as a potential |
1036 |
+ portability trap, with the intent that "literal string" include |
1037 |
+ instructions on the replacement function that should be used |
1038 |
+ instead. |
1039 |
+ _GL_WARN_ON_USE is for functions with 'extern' linkage. |
1040 |
+ _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline' |
1041 |
+ linkage. |
1042 |
+ |
1043 |
+ However, one of the reasons that a function is a portability trap is |
1044 |
+ if it has the wrong signature. Declaring FUNCTION with a different |
1045 |
+ signature in C is a compilation error, so this macro must use the |
1046 |
+ same type as any existing declaration so that programs that avoid |
1047 |
+ the problematic FUNCTION do not fail to compile merely because they |
1048 |
+ included a header that poisoned the function. But this implies that |
1049 |
+ _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already |
1050 |
+ have a declaration. Use of this macro implies that there must not |
1051 |
+ be any other macro hiding the declaration of FUNCTION; but |
1052 |
+ undefining FUNCTION first is part of the poisoning process anyway |
1053 |
+ (although for symbols that are provided only via a macro, the result |
1054 |
+ is a compilation error rather than a warning containing |
1055 |
+ "literal string"). Also note that in C++, it is only safe to use if |
1056 |
+ FUNCTION has no overloads. |
1057 |
+ |
1058 |
+ For an example, it is possible to poison 'getline' by: |
1059 |
+ - adding a call to gl_WARN_ON_USE_PREPARE([[#include <stdio.h>]], |
1060 |
+ [getline]) in configure.ac, which potentially defines |
1061 |
+ HAVE_RAW_DECL_GETLINE |
1062 |
+ - adding this code to a header that wraps the system <stdio.h>: |
1063 |
+ #undef getline |
1064 |
+ #if HAVE_RAW_DECL_GETLINE |
1065 |
+ _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" |
1066 |
+ "not universally present; use the gnulib module getline"); |
1067 |
+ #endif |
1068 |
+ |
1069 |
+ It is not possible to directly poison global variables. But it is |
1070 |
+ possible to write a wrapper accessor function, and poison that |
1071 |
+ (less common usage, like &environ, will cause a compilation error |
1072 |
+ rather than issue the nice warning, but the end result of informing |
1073 |
+ the developer about their portability problem is still achieved): |
1074 |
+ #if HAVE_RAW_DECL_ENVIRON |
1075 |
+ static char *** |
1076 |
+ rpl_environ (void) { return &environ; } |
1077 |
+ _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); |
1078 |
+ # undef environ |
1079 |
+ # define environ (*rpl_environ ()) |
1080 |
+ #endif |
1081 |
+ or better (avoiding contradictory use of 'static' and 'extern'): |
1082 |
+ #if HAVE_RAW_DECL_ENVIRON |
1083 |
+ static char *** |
1084 |
+ _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared") |
1085 |
+ rpl_environ (void) { return &environ; } |
1086 |
+ # undef environ |
1087 |
+ # define environ (*rpl_environ ()) |
1088 |
+ #endif |
1089 |
+ */ |
1090 |
+#ifndef _GL_WARN_ON_USE |
1091 |
+ |
1092 |
+# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) |
1093 |
+/* A compiler attribute is available in gcc versions 4.3.0 and later. */ |
1094 |
+# define _GL_WARN_ON_USE(function, message) \ |
1095 |
+_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) |
1096 |
+# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ |
1097 |
+ __attribute__ ((__warning__ (message))) |
1098 |
+# elif __clang_major__ >= 4 |
1099 |
+/* Another compiler attribute is available in clang. */ |
1100 |
+# define _GL_WARN_ON_USE(function, message) \ |
1101 |
+_GL_WARN_EXTERN_C __typeof__ (function) function \ |
1102 |
+ __attribute__ ((__diagnose_if__ (1, message, "warning"))) |
1103 |
+# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ |
1104 |
+ __attribute__ ((__diagnose_if__ (1, message, "warning"))) |
1105 |
+# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING |
1106 |
+/* Verify the existence of the function. */ |
1107 |
+# define _GL_WARN_ON_USE(function, message) \ |
1108 |
+_GL_WARN_EXTERN_C __typeof__ (function) function |
1109 |
+# define _GL_WARN_ON_USE_ATTRIBUTE(message) |
1110 |
+# else /* Unsupported. */ |
1111 |
+# define _GL_WARN_ON_USE(function, message) \ |
1112 |
+_GL_WARN_EXTERN_C int _gl_warn_on_use |
1113 |
+# define _GL_WARN_ON_USE_ATTRIBUTE(message) |
1114 |
+# endif |
1115 |
+#endif |
1116 |
+ |
1117 |
+/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") |
1118 |
+ is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the |
1119 |
+ function is declared with the given prototype, consisting of return type, |
1120 |
+ parameters, and attributes. |
1121 |
+ This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does |
1122 |
+ not work in this case. */ |
1123 |
+#ifndef _GL_WARN_ON_USE_CXX |
1124 |
+# if !defined __cplusplus |
1125 |
+# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ |
1126 |
+ _GL_WARN_ON_USE (function, msg) |
1127 |
+# else |
1128 |
+# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) |
1129 |
+/* A compiler attribute is available in gcc versions 4.3.0 and later. */ |
1130 |
+# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ |
1131 |
+extern rettype_gcc function parameters_and_attributes \ |
1132 |
+ __attribute__ ((__warning__ (msg))) |
1133 |
+# elif __clang_major__ >= 4 |
1134 |
+/* Another compiler attribute is available in clang. */ |
1135 |
+# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ |
1136 |
+extern rettype_clang function parameters_and_attributes \ |
1137 |
+ __attribute__ ((__diagnose_if__ (1, msg, "warning"))) |
1138 |
+# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING |
1139 |
+/* Verify the existence of the function. */ |
1140 |
+# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ |
1141 |
+extern rettype_gcc function parameters_and_attributes |
1142 |
+# else /* Unsupported. */ |
1143 |
+# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ |
1144 |
+_GL_WARN_EXTERN_C int _gl_warn_on_use |
1145 |
+# endif |
1146 |
+# endif |
1147 |
+#endif |
1148 |
+ |
1149 |
+/* _GL_WARN_EXTERN_C declaration; |
1150 |
+ performs the declaration with C linkage. */ |
1151 |
+#ifndef _GL_WARN_EXTERN_C |
1152 |
+# if defined __cplusplus |
1153 |
+# define _GL_WARN_EXTERN_C extern "C" |
1154 |
+# else |
1155 |
+# define _GL_WARN_EXTERN_C extern |
1156 |
+# endif |
1157 |
+#endif |
1158 |
+ |
1159 |
+ |
1160 |
+/* Declare overridden functions. */ |
1161 |
+ |
1162 |
+#if 1 |
1163 |
+# if 0 |
1164 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
1165 |
+# undef closedir |
1166 |
+# define closedir rpl_closedir |
1167 |
+# define GNULIB_defined_closedir 1 |
1168 |
+# endif |
1169 |
+_GL_FUNCDECL_RPL (closedir, int, (DIR *dirp) _GL_ARG_NONNULL ((1))); |
1170 |
+_GL_CXXALIAS_RPL (closedir, int, (DIR *dirp)); |
1171 |
+# else |
1172 |
+# if !1 |
1173 |
+_GL_FUNCDECL_SYS (closedir, int, (DIR *dirp) _GL_ARG_NONNULL ((1))); |
1174 |
+# endif |
1175 |
+_GL_CXXALIAS_SYS (closedir, int, (DIR *dirp)); |
1176 |
+# endif |
1177 |
+_GL_CXXALIASWARN (closedir); |
1178 |
+#elif defined GNULIB_POSIXCHECK |
1179 |
+# undef closedir |
1180 |
+# if HAVE_RAW_DECL_CLOSEDIR |
1181 |
+_GL_WARN_ON_USE (closedir, "closedir is not portable - " |
1182 |
+ "use gnulib module closedir for portability"); |
1183 |
+# endif |
1184 |
+#endif |
1185 |
+ |
1186 |
+#if 1 |
1187 |
+# if 0 |
1188 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
1189 |
+# undef opendir |
1190 |
+# define opendir rpl_opendir |
1191 |
+# define GNULIB_defined_opendir 1 |
1192 |
+# endif |
1193 |
+_GL_FUNCDECL_RPL (opendir, DIR *, |
1194 |
+ (const char *dir_name) |
1195 |
+ _GL_ARG_NONNULL ((1)) |
1196 |
+ _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC (closedir, 1)); |
1197 |
+_GL_CXXALIAS_RPL (opendir, DIR *, (const char *dir_name)); |
1198 |
+# else |
1199 |
+# if !1 || __GNUC__ >= 11 |
1200 |
+_GL_FUNCDECL_SYS (opendir, DIR *, |
1201 |
+ (const char *dir_name) |
1202 |
+ _GL_ARG_NONNULL ((1)) |
1203 |
+ _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC (closedir, 1)); |
1204 |
+# endif |
1205 |
+_GL_CXXALIAS_SYS (opendir, DIR *, (const char *dir_name)); |
1206 |
+# endif |
1207 |
+_GL_CXXALIASWARN (opendir); |
1208 |
+#else |
1209 |
+# if 1 && __GNUC__ >= 11 && !defined opendir |
1210 |
+/* For -Wmismatched-dealloc: Associate opendir with closedir or |
1211 |
+ rpl_closedir. */ |
1212 |
+_GL_FUNCDECL_SYS (opendir, DIR *, |
1213 |
+ (const char *dir_name) |
1214 |
+ _GL_ARG_NONNULL ((1)) |
1215 |
+ _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC (closedir, 1)); |
1216 |
+# endif |
1217 |
+# if defined GNULIB_POSIXCHECK |
1218 |
+# undef opendir |
1219 |
+# if HAVE_RAW_DECL_OPENDIR |
1220 |
+_GL_WARN_ON_USE (opendir, "opendir is not portable - " |
1221 |
+ "use gnulib module opendir for portability"); |
1222 |
+# endif |
1223 |
+# endif |
1224 |
+#endif |
1225 |
+ |
1226 |
+#if 0 |
1227 |
+# if !1 |
1228 |
+_GL_FUNCDECL_SYS (readdir, struct dirent *, (DIR *dirp) _GL_ARG_NONNULL ((1))); |
1229 |
+# endif |
1230 |
+_GL_CXXALIAS_SYS (readdir, struct dirent *, (DIR *dirp)); |
1231 |
+_GL_CXXALIASWARN (readdir); |
1232 |
+#elif defined GNULIB_POSIXCHECK |
1233 |
+# undef readdir |
1234 |
+# if HAVE_RAW_DECL_READDIR |
1235 |
+_GL_WARN_ON_USE (readdir, "readdir is not portable - " |
1236 |
+ "use gnulib module readdir for portability"); |
1237 |
+# endif |
1238 |
+#endif |
1239 |
+ |
1240 |
+#if 0 |
1241 |
+# if !1 |
1242 |
+_GL_FUNCDECL_SYS (rewinddir, void, (DIR *dirp) _GL_ARG_NONNULL ((1))); |
1243 |
+# endif |
1244 |
+_GL_CXXALIAS_SYS (rewinddir, void, (DIR *dirp)); |
1245 |
+_GL_CXXALIASWARN (rewinddir); |
1246 |
+#elif defined GNULIB_POSIXCHECK |
1247 |
+# undef rewinddir |
1248 |
+# if HAVE_RAW_DECL_REWINDDIR |
1249 |
+_GL_WARN_ON_USE (rewinddir, "rewinddir is not portable - " |
1250 |
+ "use gnulib module rewinddir for portability"); |
1251 |
+# endif |
1252 |
+#endif |
1253 |
+ |
1254 |
+#if 1 |
1255 |
+/* Return the file descriptor associated with the given directory stream, |
1256 |
+ or -1 if none exists. */ |
1257 |
+# if 0 |
1258 |
+/* On kLIBC, dirfd() is a macro that does not work. Undefine it. */ |
1259 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) || defined dirfd |
1260 |
+# undef dirfd |
1261 |
+# define dirfd rpl_dirfd |
1262 |
+# endif |
1263 |
+_GL_FUNCDECL_RPL (dirfd, int, (DIR *) _GL_ARG_NONNULL ((1))); |
1264 |
+_GL_CXXALIAS_RPL (dirfd, int, (DIR *)); |
1265 |
+ |
1266 |
+# ifdef __KLIBC__ |
1267 |
+/* Gnulib internal hooks needed to maintain the dirfd metadata. */ |
1268 |
+_GL_EXTERN_C int _gl_register_dirp_fd (int fd, DIR *dirp) |
1269 |
+ _GL_ARG_NONNULL ((2)); |
1270 |
+_GL_EXTERN_C void _gl_unregister_dirp_fd (int fd); |
1271 |
+# endif |
1272 |
+# else |
1273 |
+# if defined __cplusplus && defined GNULIB_NAMESPACE && defined dirfd |
1274 |
+ /* dirfd is defined as a macro and not as a function. |
1275 |
+ Turn it into a function and get rid of the macro. */ |
1276 |
+static inline int (dirfd) (DIR *dp) { return dirfd (dp); } |
1277 |
+# undef dirfd |
1278 |
+# endif |
1279 |
+# if !(1 || defined dirfd) |
1280 |
+_GL_FUNCDECL_SYS (dirfd, int, (DIR *) _GL_ARG_NONNULL ((1))); |
1281 |
+# endif |
1282 |
+_GL_CXXALIAS_SYS (dirfd, int, (DIR *)); |
1283 |
+# endif |
1284 |
+_GL_CXXALIASWARN (dirfd); |
1285 |
+#elif defined GNULIB_POSIXCHECK |
1286 |
+# undef dirfd |
1287 |
+# if HAVE_RAW_DECL_DIRFD |
1288 |
+_GL_WARN_ON_USE (dirfd, "dirfd is unportable - " |
1289 |
+ "use gnulib module dirfd for portability"); |
1290 |
+# endif |
1291 |
+#endif |
1292 |
+ |
1293 |
+#if 1 |
1294 |
+/* Open a directory stream visiting the given directory file |
1295 |
+ descriptor. Return NULL and set errno if fd is not visiting a |
1296 |
+ directory. On success, this function consumes fd (it will be |
1297 |
+ implicitly closed either by this function or by a subsequent |
1298 |
+ closedir). */ |
1299 |
+# if 0 |
1300 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
1301 |
+# undef fdopendir |
1302 |
+# define fdopendir rpl_fdopendir |
1303 |
+# endif |
1304 |
+_GL_FUNCDECL_RPL (fdopendir, DIR *, |
1305 |
+ (int fd) |
1306 |
+ _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC (closedir, 1)); |
1307 |
+_GL_CXXALIAS_RPL (fdopendir, DIR *, (int fd)); |
1308 |
+# else |
1309 |
+# if !1 || !1 || __GNUC__ >= 11 |
1310 |
+_GL_FUNCDECL_SYS (fdopendir, DIR *, |
1311 |
+ (int fd) |
1312 |
+ _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC (closedir, 1)); |
1313 |
+# endif |
1314 |
+_GL_CXXALIAS_SYS (fdopendir, DIR *, (int fd)); |
1315 |
+# endif |
1316 |
+_GL_CXXALIASWARN (fdopendir); |
1317 |
+#else |
1318 |
+# if 1 && __GNUC__ >= 11 && !defined fdopendir |
1319 |
+/* For -Wmismatched-dealloc: Associate fdopendir with closedir or |
1320 |
+ rpl_closedir. */ |
1321 |
+_GL_FUNCDECL_SYS (fdopendir, DIR *, |
1322 |
+ (int fd) |
1323 |
+ _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC (closedir, 1)); |
1324 |
+# endif |
1325 |
+# if defined GNULIB_POSIXCHECK |
1326 |
+# undef fdopendir |
1327 |
+# if HAVE_RAW_DECL_FDOPENDIR |
1328 |
+_GL_WARN_ON_USE (fdopendir, "fdopendir is unportable - " |
1329 |
+ "use gnulib module fdopendir for portability"); |
1330 |
+# endif |
1331 |
+# endif |
1332 |
+#endif |
1333 |
+ |
1334 |
+#if 0 |
1335 |
+/* Scan the directory DIR, calling FILTER on each directory entry. |
1336 |
+ Entries for which FILTER returns nonzero are individually malloc'd, |
1337 |
+ sorted using qsort with CMP, and collected in a malloc'd array in |
1338 |
+ *NAMELIST. Returns the number of entries selected, or -1 on error. */ |
1339 |
+# if !1 |
1340 |
+_GL_FUNCDECL_SYS (scandir, int, |
1341 |
+ (const char *dir, struct dirent ***namelist, |
1342 |
+ int (*filter) (const struct dirent *), |
1343 |
+ int (*cmp) (const struct dirent **, const struct dirent **)) |
1344 |
+ _GL_ARG_NONNULL ((1, 2, 4))); |
1345 |
+# endif |
1346 |
+/* Need to cast, because on glibc systems, the fourth parameter is |
1347 |
+ int (*cmp) (const void *, const void *). */ |
1348 |
+_GL_CXXALIAS_SYS_CAST (scandir, int, |
1349 |
+ (const char *dir, struct dirent ***namelist, |
1350 |
+ int (*filter) (const struct dirent *), |
1351 |
+ int (*cmp) (const struct dirent **, const struct dirent **))); |
1352 |
+_GL_CXXALIASWARN (scandir); |
1353 |
+#elif defined GNULIB_POSIXCHECK |
1354 |
+# undef scandir |
1355 |
+# if HAVE_RAW_DECL_SCANDIR |
1356 |
+_GL_WARN_ON_USE (scandir, "scandir is unportable - " |
1357 |
+ "use gnulib module scandir for portability"); |
1358 |
+# endif |
1359 |
+#endif |
1360 |
+ |
1361 |
+#if 0 |
1362 |
+/* Compare two 'struct dirent' entries alphabetically. */ |
1363 |
+# if !1 |
1364 |
+_GL_FUNCDECL_SYS (alphasort, int, |
1365 |
+ (const struct dirent **, const struct dirent **) |
1366 |
+ _GL_ATTRIBUTE_PURE |
1367 |
+ _GL_ARG_NONNULL ((1, 2))); |
1368 |
+# endif |
1369 |
+/* Need to cast, because on glibc systems, the parameters are |
1370 |
+ (const void *, const void *). */ |
1371 |
+_GL_CXXALIAS_SYS_CAST (alphasort, int, |
1372 |
+ (const struct dirent **, const struct dirent **)); |
1373 |
+_GL_CXXALIASWARN (alphasort); |
1374 |
+#elif defined GNULIB_POSIXCHECK |
1375 |
+# undef alphasort |
1376 |
+# if HAVE_RAW_DECL_ALPHASORT |
1377 |
+_GL_WARN_ON_USE (alphasort, "alphasort is unportable - " |
1378 |
+ "use gnulib module alphasort for portability"); |
1379 |
+# endif |
1380 |
+#endif |
1381 |
+ |
1382 |
+ |
1383 |
+#endif /* _GL_DIRENT_H */ |
1384 |
+#endif /* _GL_DIRENT_H */ |
1385 |
|
1386 |
diff --git a/autotools/gnulib/fcntl.h b/autotools/gnulib/fcntl.h |
1387 |
new file mode 100644 |
1388 |
index 0000000..2683be8 |
1389 |
--- /dev/null |
1390 |
+++ b/autotools/gnulib/fcntl.h |
1391 |
@@ -0,0 +1,952 @@ |
1392 |
+/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ |
1393 |
+/* Like <fcntl.h>, but with non-working flags defined to 0. |
1394 |
+ |
1395 |
+ Copyright (C) 2006-2022 Free Software Foundation, Inc. |
1396 |
+ |
1397 |
+ This file is free software: you can redistribute it and/or modify |
1398 |
+ it under the terms of the GNU Lesser General Public License as |
1399 |
+ published by the Free Software Foundation; either version 2.1 of the |
1400 |
+ License, or (at your option) any later version. |
1401 |
+ |
1402 |
+ This file is distributed in the hope that it will be useful, |
1403 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
1404 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1405 |
+ GNU Lesser General Public License for more details. |
1406 |
+ |
1407 |
+ You should have received a copy of the GNU Lesser General Public License |
1408 |
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
1409 |
+ |
1410 |
+/* written by Paul Eggert */ |
1411 |
+ |
1412 |
+#if __GNUC__ >= 3 |
1413 |
+#pragma GCC system_header |
1414 |
+#endif |
1415 |
+ |
1416 |
+ |
1417 |
+#if defined __need_system_fcntl_h |
1418 |
+/* Special invocation convention. */ |
1419 |
+ |
1420 |
+/* Needed before <sys/stat.h>. |
1421 |
+ May also define off_t to a 64-bit type on native Windows. */ |
1422 |
+#include <sys/types.h> |
1423 |
+/* On some systems other than glibc, <sys/stat.h> is a prerequisite of |
1424 |
+ <fcntl.h>. On glibc systems, we would like to avoid namespace pollution. |
1425 |
+ But on glibc systems, <fcntl.h> includes <sys/stat.h> inside an |
1426 |
+ extern "C" { ... } block, which leads to errors in C++ mode with the |
1427 |
+ overridden <sys/stat.h> from gnulib. These errors are known to be gone |
1428 |
+ with g++ version >= 4.3. */ |
1429 |
+#if !(defined __GLIBC__ || defined __UCLIBC__) || (defined __cplusplus && defined GNULIB_NAMESPACE && (defined __ICC || !(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)))) |
1430 |
+# include <sys/stat.h> |
1431 |
+#endif |
1432 |
+#include_next <fcntl.h> |
1433 |
+ |
1434 |
+/* Native Windows platforms declare open(), creat() in <io.h>. */ |
1435 |
+#if (0 || 1 || defined GNULIB_POSIXCHECK) \ |
1436 |
+ && (defined _WIN32 && ! defined __CYGWIN__) |
1437 |
+# include <io.h> |
1438 |
+#endif |
1439 |
+ |
1440 |
+#else |
1441 |
+/* Normal invocation convention. */ |
1442 |
+ |
1443 |
+#ifndef _GL_FCNTL_H |
1444 |
+ |
1445 |
+/* Needed before <sys/stat.h>. |
1446 |
+ May also define off_t to a 64-bit type on native Windows. */ |
1447 |
+#include <sys/types.h> |
1448 |
+/* On some systems other than glibc, <sys/stat.h> is a prerequisite of |
1449 |
+ <fcntl.h>. On glibc systems, we would like to avoid namespace pollution. |
1450 |
+ But on glibc systems, <fcntl.h> includes <sys/stat.h> inside an |
1451 |
+ extern "C" { ... } block, which leads to errors in C++ mode with the |
1452 |
+ overridden <sys/stat.h> from gnulib. These errors are known to be gone |
1453 |
+ with g++ version >= 4.3. */ |
1454 |
+#if !(defined __GLIBC__ || defined __UCLIBC__) || (defined __cplusplus && defined GNULIB_NAMESPACE && (defined __ICC || !(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)))) |
1455 |
+# include <sys/stat.h> |
1456 |
+#endif |
1457 |
+/* The include_next requires a split double-inclusion guard. */ |
1458 |
+#include_next <fcntl.h> |
1459 |
+ |
1460 |
+/* Native Windows platforms declare open(), creat() in <io.h>. */ |
1461 |
+#if (0 || 1 || defined GNULIB_POSIXCHECK) \ |
1462 |
+ && (defined _WIN32 && ! defined __CYGWIN__) |
1463 |
+# include <io.h> |
1464 |
+#endif |
1465 |
+ |
1466 |
+#ifndef _GL_FCNTL_H |
1467 |
+#define _GL_FCNTL_H |
1468 |
+ |
1469 |
+#ifndef __GLIBC__ /* Avoid namespace pollution on glibc systems. */ |
1470 |
+# include <unistd.h> |
1471 |
+#endif |
1472 |
+ |
1473 |
+ |
1474 |
+/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ |
1475 |
+/* C++ compatible function declaration macros. |
1476 |
+ Copyright (C) 2010-2022 Free Software Foundation, Inc. |
1477 |
+ |
1478 |
+ This program is free software: you can redistribute it and/or modify it |
1479 |
+ under the terms of the GNU Lesser General Public License as published |
1480 |
+ by the Free Software Foundation; either version 2 of the License, or |
1481 |
+ (at your option) any later version. |
1482 |
+ |
1483 |
+ This program is distributed in the hope that it will be useful, |
1484 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
1485 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
1486 |
+ Lesser General Public License for more details. |
1487 |
+ |
1488 |
+ You should have received a copy of the GNU Lesser General Public License |
1489 |
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
1490 |
+ |
1491 |
+#ifndef _GL_CXXDEFS_H |
1492 |
+#define _GL_CXXDEFS_H |
1493 |
+ |
1494 |
+/* Begin/end the GNULIB_NAMESPACE namespace. */ |
1495 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
1496 |
+# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { |
1497 |
+# define _GL_END_NAMESPACE } |
1498 |
+#else |
1499 |
+# define _GL_BEGIN_NAMESPACE |
1500 |
+# define _GL_END_NAMESPACE |
1501 |
+#endif |
1502 |
+ |
1503 |
+/* The three most frequent use cases of these macros are: |
1504 |
+ |
1505 |
+ * For providing a substitute for a function that is missing on some |
1506 |
+ platforms, but is declared and works fine on the platforms on which |
1507 |
+ it exists: |
1508 |
+ |
1509 |
+ #if @GNULIB_FOO@ |
1510 |
+ # if !@HAVE_FOO@ |
1511 |
+ _GL_FUNCDECL_SYS (foo, ...); |
1512 |
+ # endif |
1513 |
+ _GL_CXXALIAS_SYS (foo, ...); |
1514 |
+ _GL_CXXALIASWARN (foo); |
1515 |
+ #elif defined GNULIB_POSIXCHECK |
1516 |
+ ... |
1517 |
+ #endif |
1518 |
+ |
1519 |
+ * For providing a replacement for a function that exists on all platforms, |
1520 |
+ but is broken/insufficient and needs to be replaced on some platforms: |
1521 |
+ |
1522 |
+ #if @GNULIB_FOO@ |
1523 |
+ # if @REPLACE_FOO@ |
1524 |
+ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
1525 |
+ # undef foo |
1526 |
+ # define foo rpl_foo |
1527 |
+ # endif |
1528 |
+ _GL_FUNCDECL_RPL (foo, ...); |
1529 |
+ _GL_CXXALIAS_RPL (foo, ...); |
1530 |
+ # else |
1531 |
+ _GL_CXXALIAS_SYS (foo, ...); |
1532 |
+ # endif |
1533 |
+ _GL_CXXALIASWARN (foo); |
1534 |
+ #elif defined GNULIB_POSIXCHECK |
1535 |
+ ... |
1536 |
+ #endif |
1537 |
+ |
1538 |
+ * For providing a replacement for a function that exists on some platforms |
1539 |
+ but is broken/insufficient and needs to be replaced on some of them and |
1540 |
+ is additionally either missing or undeclared on some other platforms: |
1541 |
+ |
1542 |
+ #if @GNULIB_FOO@ |
1543 |
+ # if @REPLACE_FOO@ |
1544 |
+ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
1545 |
+ # undef foo |
1546 |
+ # define foo rpl_foo |
1547 |
+ # endif |
1548 |
+ _GL_FUNCDECL_RPL (foo, ...); |
1549 |
+ _GL_CXXALIAS_RPL (foo, ...); |
1550 |
+ # else |
1551 |
+ # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ |
1552 |
+ _GL_FUNCDECL_SYS (foo, ...); |
1553 |
+ # endif |
1554 |
+ _GL_CXXALIAS_SYS (foo, ...); |
1555 |
+ # endif |
1556 |
+ _GL_CXXALIASWARN (foo); |
1557 |
+ #elif defined GNULIB_POSIXCHECK |
1558 |
+ ... |
1559 |
+ #endif |
1560 |
+*/ |
1561 |
+ |
1562 |
+/* _GL_EXTERN_C declaration; |
1563 |
+ performs the declaration with C linkage. */ |
1564 |
+#if defined __cplusplus |
1565 |
+# define _GL_EXTERN_C extern "C" |
1566 |
+#else |
1567 |
+# define _GL_EXTERN_C extern |
1568 |
+#endif |
1569 |
+ |
1570 |
+/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); |
1571 |
+ declares a replacement function, named rpl_func, with the given prototype, |
1572 |
+ consisting of return type, parameters, and attributes. |
1573 |
+ Example: |
1574 |
+ _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) |
1575 |
+ _GL_ARG_NONNULL ((1))); |
1576 |
+ */ |
1577 |
+#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ |
1578 |
+ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) |
1579 |
+#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ |
1580 |
+ _GL_EXTERN_C rettype rpl_func parameters_and_attributes |
1581 |
+ |
1582 |
+/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); |
1583 |
+ declares the system function, named func, with the given prototype, |
1584 |
+ consisting of return type, parameters, and attributes. |
1585 |
+ Example: |
1586 |
+ _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) |
1587 |
+ _GL_ARG_NONNULL ((1))); |
1588 |
+ */ |
1589 |
+#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ |
1590 |
+ _GL_EXTERN_C rettype func parameters_and_attributes |
1591 |
+ |
1592 |
+/* _GL_CXXALIAS_RPL (func, rettype, parameters); |
1593 |
+ declares a C++ alias called GNULIB_NAMESPACE::func |
1594 |
+ that redirects to rpl_func, if GNULIB_NAMESPACE is defined. |
1595 |
+ Example: |
1596 |
+ _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); |
1597 |
+ |
1598 |
+ Wrapping rpl_func in an object with an inline conversion operator |
1599 |
+ avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is |
1600 |
+ actually used in the program. */ |
1601 |
+#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ |
1602 |
+ _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) |
1603 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
1604 |
+# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ |
1605 |
+ namespace GNULIB_NAMESPACE \ |
1606 |
+ { \ |
1607 |
+ static const struct _gl_ ## func ## _wrapper \ |
1608 |
+ { \ |
1609 |
+ typedef rettype (*type) parameters; \ |
1610 |
+ \ |
1611 |
+ inline operator type () const \ |
1612 |
+ { \ |
1613 |
+ return ::rpl_func; \ |
1614 |
+ } \ |
1615 |
+ } func = {}; \ |
1616 |
+ } \ |
1617 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
1618 |
+#else |
1619 |
+# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ |
1620 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
1621 |
+#endif |
1622 |
+ |
1623 |
+/* _GL_CXXALIAS_MDA (func, rettype, parameters); |
1624 |
+ is to be used when func is a Microsoft deprecated alias, on native Windows. |
1625 |
+ It declares a C++ alias called GNULIB_NAMESPACE::func |
1626 |
+ that redirects to _func, if GNULIB_NAMESPACE is defined. |
1627 |
+ Example: |
1628 |
+ _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); |
1629 |
+ */ |
1630 |
+#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ |
1631 |
+ _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) |
1632 |
+ |
1633 |
+/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); |
1634 |
+ is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); |
1635 |
+ except that the C function rpl_func may have a slightly different |
1636 |
+ declaration. A cast is used to silence the "invalid conversion" error |
1637 |
+ that would otherwise occur. */ |
1638 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
1639 |
+# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ |
1640 |
+ namespace GNULIB_NAMESPACE \ |
1641 |
+ { \ |
1642 |
+ static const struct _gl_ ## func ## _wrapper \ |
1643 |
+ { \ |
1644 |
+ typedef rettype (*type) parameters; \ |
1645 |
+ \ |
1646 |
+ inline operator type () const \ |
1647 |
+ { \ |
1648 |
+ return reinterpret_cast<type>(::rpl_func); \ |
1649 |
+ } \ |
1650 |
+ } func = {}; \ |
1651 |
+ } \ |
1652 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
1653 |
+#else |
1654 |
+# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ |
1655 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
1656 |
+#endif |
1657 |
+ |
1658 |
+/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); |
1659 |
+ is like _GL_CXXALIAS_MDA (func, rettype, parameters); |
1660 |
+ except that the C function func may have a slightly different declaration. |
1661 |
+ A cast is used to silence the "invalid conversion" error that would |
1662 |
+ otherwise occur. */ |
1663 |
+#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ |
1664 |
+ _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) |
1665 |
+ |
1666 |
+/* _GL_CXXALIAS_SYS (func, rettype, parameters); |
1667 |
+ declares a C++ alias called GNULIB_NAMESPACE::func |
1668 |
+ that redirects to the system provided function func, if GNULIB_NAMESPACE |
1669 |
+ is defined. |
1670 |
+ Example: |
1671 |
+ _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); |
1672 |
+ |
1673 |
+ Wrapping func in an object with an inline conversion operator |
1674 |
+ avoids a reference to func unless GNULIB_NAMESPACE::func is |
1675 |
+ actually used in the program. */ |
1676 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
1677 |
+# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ |
1678 |
+ namespace GNULIB_NAMESPACE \ |
1679 |
+ { \ |
1680 |
+ static const struct _gl_ ## func ## _wrapper \ |
1681 |
+ { \ |
1682 |
+ typedef rettype (*type) parameters; \ |
1683 |
+ \ |
1684 |
+ inline operator type () const \ |
1685 |
+ { \ |
1686 |
+ return ::func; \ |
1687 |
+ } \ |
1688 |
+ } func = {}; \ |
1689 |
+ } \ |
1690 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
1691 |
+#else |
1692 |
+# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ |
1693 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
1694 |
+#endif |
1695 |
+ |
1696 |
+/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); |
1697 |
+ is like _GL_CXXALIAS_SYS (func, rettype, parameters); |
1698 |
+ except that the C function func may have a slightly different declaration. |
1699 |
+ A cast is used to silence the "invalid conversion" error that would |
1700 |
+ otherwise occur. */ |
1701 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
1702 |
+# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ |
1703 |
+ namespace GNULIB_NAMESPACE \ |
1704 |
+ { \ |
1705 |
+ static const struct _gl_ ## func ## _wrapper \ |
1706 |
+ { \ |
1707 |
+ typedef rettype (*type) parameters; \ |
1708 |
+ \ |
1709 |
+ inline operator type () const \ |
1710 |
+ { \ |
1711 |
+ return reinterpret_cast<type>(::func); \ |
1712 |
+ } \ |
1713 |
+ } func = {}; \ |
1714 |
+ } \ |
1715 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
1716 |
+#else |
1717 |
+# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ |
1718 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
1719 |
+#endif |
1720 |
+ |
1721 |
+/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); |
1722 |
+ is like _GL_CXXALIAS_SYS (func, rettype, parameters); |
1723 |
+ except that the C function is picked among a set of overloaded functions, |
1724 |
+ namely the one with rettype2 and parameters2. Two consecutive casts |
1725 |
+ are used to silence the "cannot find a match" and "invalid conversion" |
1726 |
+ errors that would otherwise occur. */ |
1727 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
1728 |
+ /* The outer cast must be a reinterpret_cast. |
1729 |
+ The inner cast: When the function is defined as a set of overloaded |
1730 |
+ functions, it works as a static_cast<>, choosing the designated variant. |
1731 |
+ When the function is defined as a single variant, it works as a |
1732 |
+ reinterpret_cast<>. The parenthesized cast syntax works both ways. */ |
1733 |
+# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ |
1734 |
+ namespace GNULIB_NAMESPACE \ |
1735 |
+ { \ |
1736 |
+ static const struct _gl_ ## func ## _wrapper \ |
1737 |
+ { \ |
1738 |
+ typedef rettype (*type) parameters; \ |
1739 |
+ \ |
1740 |
+ inline operator type () const \ |
1741 |
+ { \ |
1742 |
+ return reinterpret_cast<type>((rettype2 (*) parameters2)(::func)); \ |
1743 |
+ } \ |
1744 |
+ } func = {}; \ |
1745 |
+ } \ |
1746 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
1747 |
+#else |
1748 |
+# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ |
1749 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
1750 |
+#endif |
1751 |
+ |
1752 |
+/* _GL_CXXALIASWARN (func); |
1753 |
+ causes a warning to be emitted when ::func is used but not when |
1754 |
+ GNULIB_NAMESPACE::func is used. func must be defined without overloaded |
1755 |
+ variants. */ |
1756 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
1757 |
+# define _GL_CXXALIASWARN(func) \ |
1758 |
+ _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) |
1759 |
+# define _GL_CXXALIASWARN_1(func,namespace) \ |
1760 |
+ _GL_CXXALIASWARN_2 (func, namespace) |
1761 |
+/* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>, |
1762 |
+ we enable the warning only when not optimizing. */ |
1763 |
+# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) |
1764 |
+# define _GL_CXXALIASWARN_2(func,namespace) \ |
1765 |
+ _GL_WARN_ON_USE (func, \ |
1766 |
+ "The symbol ::" #func " refers to the system function. " \ |
1767 |
+ "Use " #namespace "::" #func " instead.") |
1768 |
+# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING |
1769 |
+# define _GL_CXXALIASWARN_2(func,namespace) \ |
1770 |
+ extern __typeof__ (func) func |
1771 |
+# else |
1772 |
+# define _GL_CXXALIASWARN_2(func,namespace) \ |
1773 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
1774 |
+# endif |
1775 |
+#else |
1776 |
+# define _GL_CXXALIASWARN(func) \ |
1777 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
1778 |
+#endif |
1779 |
+ |
1780 |
+/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); |
1781 |
+ causes a warning to be emitted when the given overloaded variant of ::func |
1782 |
+ is used but not when GNULIB_NAMESPACE::func is used. */ |
1783 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
1784 |
+# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ |
1785 |
+ _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ |
1786 |
+ GNULIB_NAMESPACE) |
1787 |
+# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ |
1788 |
+ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) |
1789 |
+/* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>, |
1790 |
+ we enable the warning only when not optimizing. */ |
1791 |
+# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) |
1792 |
+# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ |
1793 |
+ _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ |
1794 |
+ "The symbol ::" #func " refers to the system function. " \ |
1795 |
+ "Use " #namespace "::" #func " instead.") |
1796 |
+# else |
1797 |
+# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ |
1798 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
1799 |
+# endif |
1800 |
+#else |
1801 |
+# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ |
1802 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
1803 |
+#endif |
1804 |
+ |
1805 |
+#endif /* _GL_CXXDEFS_H */ |
1806 |
+ |
1807 |
+/* The definition of _GL_ARG_NONNULL is copied here. */ |
1808 |
+/* A C macro for declaring that specific arguments must not be NULL. |
1809 |
+ Copyright (C) 2009-2022 Free Software Foundation, Inc. |
1810 |
+ |
1811 |
+ This program is free software: you can redistribute it and/or modify it |
1812 |
+ under the terms of the GNU Lesser General Public License as published |
1813 |
+ by the Free Software Foundation; either version 2 of the License, or |
1814 |
+ (at your option) any later version. |
1815 |
+ |
1816 |
+ This program is distributed in the hope that it will be useful, |
1817 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
1818 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
1819 |
+ Lesser General Public License for more details. |
1820 |
+ |
1821 |
+ You should have received a copy of the GNU Lesser General Public License |
1822 |
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
1823 |
+ |
1824 |
+/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools |
1825 |
+ that the values passed as arguments n, ..., m must be non-NULL pointers. |
1826 |
+ n = 1 stands for the first argument, n = 2 for the second argument etc. */ |
1827 |
+#ifndef _GL_ARG_NONNULL |
1828 |
+# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ |
1829 |
+# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) |
1830 |
+# else |
1831 |
+# define _GL_ARG_NONNULL(params) |
1832 |
+# endif |
1833 |
+#endif |
1834 |
+ |
1835 |
+/* The definition of _GL_WARN_ON_USE is copied here. */ |
1836 |
+/* A C macro for emitting warnings if a function is used. |
1837 |
+ Copyright (C) 2010-2022 Free Software Foundation, Inc. |
1838 |
+ |
1839 |
+ This program is free software: you can redistribute it and/or modify it |
1840 |
+ under the terms of the GNU Lesser General Public License as published |
1841 |
+ by the Free Software Foundation; either version 2 of the License, or |
1842 |
+ (at your option) any later version. |
1843 |
+ |
1844 |
+ This program is distributed in the hope that it will be useful, |
1845 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
1846 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
1847 |
+ Lesser General Public License for more details. |
1848 |
+ |
1849 |
+ You should have received a copy of the GNU Lesser General Public License |
1850 |
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
1851 |
+ |
1852 |
+/* _GL_WARN_ON_USE (function, "literal string") issues a declaration |
1853 |
+ for FUNCTION which will then trigger a compiler warning containing |
1854 |
+ the text of "literal string" anywhere that function is called, if |
1855 |
+ supported by the compiler. If the compiler does not support this |
1856 |
+ feature, the macro expands to an unused extern declaration. |
1857 |
+ |
1858 |
+ _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the |
1859 |
+ attribute used in _GL_WARN_ON_USE. If the compiler does not support |
1860 |
+ this feature, it expands to empty. |
1861 |
+ |
1862 |
+ These macros are useful for marking a function as a potential |
1863 |
+ portability trap, with the intent that "literal string" include |
1864 |
+ instructions on the replacement function that should be used |
1865 |
+ instead. |
1866 |
+ _GL_WARN_ON_USE is for functions with 'extern' linkage. |
1867 |
+ _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline' |
1868 |
+ linkage. |
1869 |
+ |
1870 |
+ However, one of the reasons that a function is a portability trap is |
1871 |
+ if it has the wrong signature. Declaring FUNCTION with a different |
1872 |
+ signature in C is a compilation error, so this macro must use the |
1873 |
+ same type as any existing declaration so that programs that avoid |
1874 |
+ the problematic FUNCTION do not fail to compile merely because they |
1875 |
+ included a header that poisoned the function. But this implies that |
1876 |
+ _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already |
1877 |
+ have a declaration. Use of this macro implies that there must not |
1878 |
+ be any other macro hiding the declaration of FUNCTION; but |
1879 |
+ undefining FUNCTION first is part of the poisoning process anyway |
1880 |
+ (although for symbols that are provided only via a macro, the result |
1881 |
+ is a compilation error rather than a warning containing |
1882 |
+ "literal string"). Also note that in C++, it is only safe to use if |
1883 |
+ FUNCTION has no overloads. |
1884 |
+ |
1885 |
+ For an example, it is possible to poison 'getline' by: |
1886 |
+ - adding a call to gl_WARN_ON_USE_PREPARE([[#include <stdio.h>]], |
1887 |
+ [getline]) in configure.ac, which potentially defines |
1888 |
+ HAVE_RAW_DECL_GETLINE |
1889 |
+ - adding this code to a header that wraps the system <stdio.h>: |
1890 |
+ #undef getline |
1891 |
+ #if HAVE_RAW_DECL_GETLINE |
1892 |
+ _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" |
1893 |
+ "not universally present; use the gnulib module getline"); |
1894 |
+ #endif |
1895 |
+ |
1896 |
+ It is not possible to directly poison global variables. But it is |
1897 |
+ possible to write a wrapper accessor function, and poison that |
1898 |
+ (less common usage, like &environ, will cause a compilation error |
1899 |
+ rather than issue the nice warning, but the end result of informing |
1900 |
+ the developer about their portability problem is still achieved): |
1901 |
+ #if HAVE_RAW_DECL_ENVIRON |
1902 |
+ static char *** |
1903 |
+ rpl_environ (void) { return &environ; } |
1904 |
+ _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); |
1905 |
+ # undef environ |
1906 |
+ # define environ (*rpl_environ ()) |
1907 |
+ #endif |
1908 |
+ or better (avoiding contradictory use of 'static' and 'extern'): |
1909 |
+ #if HAVE_RAW_DECL_ENVIRON |
1910 |
+ static char *** |
1911 |
+ _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared") |
1912 |
+ rpl_environ (void) { return &environ; } |
1913 |
+ # undef environ |
1914 |
+ # define environ (*rpl_environ ()) |
1915 |
+ #endif |
1916 |
+ */ |
1917 |
+#ifndef _GL_WARN_ON_USE |
1918 |
+ |
1919 |
+# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) |
1920 |
+/* A compiler attribute is available in gcc versions 4.3.0 and later. */ |
1921 |
+# define _GL_WARN_ON_USE(function, message) \ |
1922 |
+_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) |
1923 |
+# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ |
1924 |
+ __attribute__ ((__warning__ (message))) |
1925 |
+# elif __clang_major__ >= 4 |
1926 |
+/* Another compiler attribute is available in clang. */ |
1927 |
+# define _GL_WARN_ON_USE(function, message) \ |
1928 |
+_GL_WARN_EXTERN_C __typeof__ (function) function \ |
1929 |
+ __attribute__ ((__diagnose_if__ (1, message, "warning"))) |
1930 |
+# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ |
1931 |
+ __attribute__ ((__diagnose_if__ (1, message, "warning"))) |
1932 |
+# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING |
1933 |
+/* Verify the existence of the function. */ |
1934 |
+# define _GL_WARN_ON_USE(function, message) \ |
1935 |
+_GL_WARN_EXTERN_C __typeof__ (function) function |
1936 |
+# define _GL_WARN_ON_USE_ATTRIBUTE(message) |
1937 |
+# else /* Unsupported. */ |
1938 |
+# define _GL_WARN_ON_USE(function, message) \ |
1939 |
+_GL_WARN_EXTERN_C int _gl_warn_on_use |
1940 |
+# define _GL_WARN_ON_USE_ATTRIBUTE(message) |
1941 |
+# endif |
1942 |
+#endif |
1943 |
+ |
1944 |
+/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") |
1945 |
+ is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the |
1946 |
+ function is declared with the given prototype, consisting of return type, |
1947 |
+ parameters, and attributes. |
1948 |
+ This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does |
1949 |
+ not work in this case. */ |
1950 |
+#ifndef _GL_WARN_ON_USE_CXX |
1951 |
+# if !defined __cplusplus |
1952 |
+# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ |
1953 |
+ _GL_WARN_ON_USE (function, msg) |
1954 |
+# else |
1955 |
+# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) |
1956 |
+/* A compiler attribute is available in gcc versions 4.3.0 and later. */ |
1957 |
+# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ |
1958 |
+extern rettype_gcc function parameters_and_attributes \ |
1959 |
+ __attribute__ ((__warning__ (msg))) |
1960 |
+# elif __clang_major__ >= 4 |
1961 |
+/* Another compiler attribute is available in clang. */ |
1962 |
+# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ |
1963 |
+extern rettype_clang function parameters_and_attributes \ |
1964 |
+ __attribute__ ((__diagnose_if__ (1, msg, "warning"))) |
1965 |
+# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING |
1966 |
+/* Verify the existence of the function. */ |
1967 |
+# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ |
1968 |
+extern rettype_gcc function parameters_and_attributes |
1969 |
+# else /* Unsupported. */ |
1970 |
+# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ |
1971 |
+_GL_WARN_EXTERN_C int _gl_warn_on_use |
1972 |
+# endif |
1973 |
+# endif |
1974 |
+#endif |
1975 |
+ |
1976 |
+/* _GL_WARN_EXTERN_C declaration; |
1977 |
+ performs the declaration with C linkage. */ |
1978 |
+#ifndef _GL_WARN_EXTERN_C |
1979 |
+# if defined __cplusplus |
1980 |
+# define _GL_WARN_EXTERN_C extern "C" |
1981 |
+# else |
1982 |
+# define _GL_WARN_EXTERN_C extern |
1983 |
+# endif |
1984 |
+#endif |
1985 |
+ |
1986 |
+ |
1987 |
+/* Declare overridden functions. */ |
1988 |
+ |
1989 |
+#if 0 |
1990 |
+# if 0 |
1991 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
1992 |
+# undef creat |
1993 |
+# define creat rpl_creat |
1994 |
+# endif |
1995 |
+_GL_FUNCDECL_RPL (creat, int, (const char *filename, mode_t mode) |
1996 |
+ _GL_ARG_NONNULL ((1))); |
1997 |
+_GL_CXXALIAS_RPL (creat, int, (const char *filename, mode_t mode)); |
1998 |
+# elif defined _WIN32 && !defined __CYGWIN__ |
1999 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
2000 |
+# undef creat |
2001 |
+# define creat _creat |
2002 |
+# endif |
2003 |
+_GL_CXXALIAS_MDA (creat, int, (const char *filename, mode_t mode)); |
2004 |
+# else |
2005 |
+_GL_CXXALIAS_SYS (creat, int, (const char *filename, mode_t mode)); |
2006 |
+# endif |
2007 |
+_GL_CXXALIASWARN (creat); |
2008 |
+#elif defined GNULIB_POSIXCHECK |
2009 |
+# undef creat |
2010 |
+/* Assume creat is always declared. */ |
2011 |
+_GL_WARN_ON_USE (creat, "creat is not always POSIX compliant - " |
2012 |
+ "use gnulib module creat for portability"); |
2013 |
+#elif 1 |
2014 |
+/* On native Windows, map 'creat' to '_creat', so that -loldnames is not |
2015 |
+ required. In C++ with GNULIB_NAMESPACE, avoid differences between |
2016 |
+ platforms by defining GNULIB_NAMESPACE::creat always. */ |
2017 |
+# if defined _WIN32 && !defined __CYGWIN__ |
2018 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
2019 |
+# undef creat |
2020 |
+# define creat _creat |
2021 |
+# endif |
2022 |
+/* Need to cast, because in mingw the last argument is 'int mode'. */ |
2023 |
+_GL_CXXALIAS_MDA_CAST (creat, int, (const char *filename, mode_t mode)); |
2024 |
+# else |
2025 |
+_GL_CXXALIAS_SYS (creat, int, (const char *filename, mode_t mode)); |
2026 |
+# endif |
2027 |
+_GL_CXXALIASWARN (creat); |
2028 |
+#endif |
2029 |
+ |
2030 |
+#if 1 |
2031 |
+# if 0 |
2032 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
2033 |
+# undef fcntl |
2034 |
+# define fcntl rpl_fcntl |
2035 |
+# endif |
2036 |
+_GL_FUNCDECL_RPL (fcntl, int, (int fd, int action, ...)); |
2037 |
+_GL_CXXALIAS_RPL (fcntl, int, (int fd, int action, ...)); |
2038 |
+# if !GNULIB_defined_rpl_fcntl |
2039 |
+# define GNULIB_defined_rpl_fcntl 1 |
2040 |
+# endif |
2041 |
+# else |
2042 |
+# if !1 |
2043 |
+_GL_FUNCDECL_SYS (fcntl, int, (int fd, int action, ...)); |
2044 |
+# if !GNULIB_defined_fcntl |
2045 |
+# define GNULIB_defined_fcntl 1 |
2046 |
+# endif |
2047 |
+# endif |
2048 |
+_GL_CXXALIAS_SYS (fcntl, int, (int fd, int action, ...)); |
2049 |
+# endif |
2050 |
+_GL_CXXALIASWARN (fcntl); |
2051 |
+#elif defined GNULIB_POSIXCHECK |
2052 |
+# undef fcntl |
2053 |
+# if HAVE_RAW_DECL_FCNTL |
2054 |
+_GL_WARN_ON_USE (fcntl, "fcntl is not always POSIX compliant - " |
2055 |
+ "use gnulib module fcntl for portability"); |
2056 |
+# endif |
2057 |
+#endif |
2058 |
+ |
2059 |
+#if 1 |
2060 |
+# if 0 |
2061 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
2062 |
+# undef open |
2063 |
+# define open rpl_open |
2064 |
+# endif |
2065 |
+_GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) |
2066 |
+ _GL_ARG_NONNULL ((1))); |
2067 |
+_GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); |
2068 |
+# elif defined _WIN32 && !defined __CYGWIN__ |
2069 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
2070 |
+# undef open |
2071 |
+# define open _open |
2072 |
+# endif |
2073 |
+_GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); |
2074 |
+# else |
2075 |
+_GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); |
2076 |
+# endif |
2077 |
+/* On HP-UX 11, in C++ mode, open() is defined as an inline function with a |
2078 |
+ default argument. _GL_CXXALIASWARN does not work in this case. */ |
2079 |
+# if !defined __hpux |
2080 |
+_GL_CXXALIASWARN (open); |
2081 |
+# endif |
2082 |
+#elif defined GNULIB_POSIXCHECK |
2083 |
+# undef open |
2084 |
+/* Assume open is always declared. */ |
2085 |
+_GL_WARN_ON_USE (open, "open is not always POSIX compliant - " |
2086 |
+ "use gnulib module open for portability"); |
2087 |
+#elif 1 |
2088 |
+/* On native Windows, map 'open' to '_open', so that -loldnames is not |
2089 |
+ required. In C++ with GNULIB_NAMESPACE, avoid differences between |
2090 |
+ platforms by defining GNULIB_NAMESPACE::open always. */ |
2091 |
+# if defined _WIN32 && !defined __CYGWIN__ |
2092 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
2093 |
+# undef open |
2094 |
+# define open _open |
2095 |
+# endif |
2096 |
+_GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); |
2097 |
+# else |
2098 |
+_GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); |
2099 |
+# endif |
2100 |
+# if !defined __hpux |
2101 |
+_GL_CXXALIASWARN (open); |
2102 |
+# endif |
2103 |
+#endif |
2104 |
+ |
2105 |
+#if 1 |
2106 |
+# if 0 |
2107 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
2108 |
+# undef openat |
2109 |
+# define openat rpl_openat |
2110 |
+# endif |
2111 |
+_GL_FUNCDECL_RPL (openat, int, |
2112 |
+ (int fd, char const *file, int flags, /* mode_t mode */ ...) |
2113 |
+ _GL_ARG_NONNULL ((2))); |
2114 |
+_GL_CXXALIAS_RPL (openat, int, |
2115 |
+ (int fd, char const *file, int flags, /* mode_t mode */ ...)); |
2116 |
+# else |
2117 |
+# if !1 |
2118 |
+_GL_FUNCDECL_SYS (openat, int, |
2119 |
+ (int fd, char const *file, int flags, /* mode_t mode */ ...) |
2120 |
+ _GL_ARG_NONNULL ((2))); |
2121 |
+# endif |
2122 |
+_GL_CXXALIAS_SYS (openat, int, |
2123 |
+ (int fd, char const *file, int flags, /* mode_t mode */ ...)); |
2124 |
+# endif |
2125 |
+_GL_CXXALIASWARN (openat); |
2126 |
+#elif defined GNULIB_POSIXCHECK |
2127 |
+# undef openat |
2128 |
+# if HAVE_RAW_DECL_OPENAT |
2129 |
+_GL_WARN_ON_USE (openat, "openat is not portable - " |
2130 |
+ "use gnulib module openat for portability"); |
2131 |
+# endif |
2132 |
+#endif |
2133 |
+ |
2134 |
+ |
2135 |
+/* Fix up the FD_* macros, only known to be missing on mingw. */ |
2136 |
+ |
2137 |
+#ifndef FD_CLOEXEC |
2138 |
+# define FD_CLOEXEC 1 |
2139 |
+#endif |
2140 |
+ |
2141 |
+/* Fix up the supported F_* macros. Intentionally leave other F_* |
2142 |
+ macros undefined. Only known to be missing on mingw. */ |
2143 |
+ |
2144 |
+#ifndef F_DUPFD_CLOEXEC |
2145 |
+# define F_DUPFD_CLOEXEC 0x40000000 |
2146 |
+/* Witness variable: 1 if gnulib defined F_DUPFD_CLOEXEC, 0 otherwise. */ |
2147 |
+# define GNULIB_defined_F_DUPFD_CLOEXEC 1 |
2148 |
+#else |
2149 |
+# define GNULIB_defined_F_DUPFD_CLOEXEC 0 |
2150 |
+#endif |
2151 |
+ |
2152 |
+#ifndef F_DUPFD |
2153 |
+# define F_DUPFD 1 |
2154 |
+#endif |
2155 |
+ |
2156 |
+#ifndef F_GETFD |
2157 |
+# define F_GETFD 2 |
2158 |
+#endif |
2159 |
+ |
2160 |
+/* Fix up the O_* macros. */ |
2161 |
+ |
2162 |
+/* AIX 7.1 with XL C 12.1 defines O_CLOEXEC, O_NOFOLLOW, and O_TTY_INIT |
2163 |
+ to values outside 'int' range, so omit these misdefinitions. |
2164 |
+ But avoid namespace pollution on non-AIX systems. */ |
2165 |
+#ifdef _AIX |
2166 |
+# include <limits.h> |
2167 |
+# if defined O_CLOEXEC && ! (INT_MIN <= O_CLOEXEC && O_CLOEXEC <= INT_MAX) |
2168 |
+# undef O_CLOEXEC |
2169 |
+# endif |
2170 |
+# if defined O_NOFOLLOW && ! (INT_MIN <= O_NOFOLLOW && O_NOFOLLOW <= INT_MAX) |
2171 |
+# undef O_NOFOLLOW |
2172 |
+# endif |
2173 |
+# if defined O_TTY_INIT && ! (INT_MIN <= O_TTY_INIT && O_TTY_INIT <= INT_MAX) |
2174 |
+# undef O_TTY_INIT |
2175 |
+# endif |
2176 |
+#endif |
2177 |
+ |
2178 |
+#if !defined O_DIRECT && defined O_DIRECTIO |
2179 |
+/* Tru64 spells it 'O_DIRECTIO'. */ |
2180 |
+# define O_DIRECT O_DIRECTIO |
2181 |
+#endif |
2182 |
+ |
2183 |
+#if !defined O_CLOEXEC && defined O_NOINHERIT |
2184 |
+/* Mingw spells it 'O_NOINHERIT'. */ |
2185 |
+# define O_CLOEXEC O_NOINHERIT |
2186 |
+#endif |
2187 |
+ |
2188 |
+#ifndef O_CLOEXEC |
2189 |
+# define O_CLOEXEC 0x40000000 /* Try to not collide with system O_* flags. */ |
2190 |
+# define GNULIB_defined_O_CLOEXEC 1 |
2191 |
+#else |
2192 |
+# define GNULIB_defined_O_CLOEXEC 0 |
2193 |
+#endif |
2194 |
+ |
2195 |
+#ifndef O_DIRECT |
2196 |
+# define O_DIRECT 0 |
2197 |
+#endif |
2198 |
+ |
2199 |
+#ifndef O_DIRECTORY |
2200 |
+# define O_DIRECTORY 0 |
2201 |
+#endif |
2202 |
+ |
2203 |
+#ifndef O_DSYNC |
2204 |
+# define O_DSYNC 0 |
2205 |
+#endif |
2206 |
+ |
2207 |
+#ifndef O_EXEC |
2208 |
+# define O_EXEC O_RDONLY /* This is often close enough in older systems. */ |
2209 |
+#endif |
2210 |
+ |
2211 |
+#ifndef O_IGNORE_CTTY |
2212 |
+# define O_IGNORE_CTTY 0 |
2213 |
+#endif |
2214 |
+ |
2215 |
+#ifndef O_NDELAY |
2216 |
+# define O_NDELAY 0 |
2217 |
+#endif |
2218 |
+ |
2219 |
+#ifndef O_NOATIME |
2220 |
+# define O_NOATIME 0 |
2221 |
+#endif |
2222 |
+ |
2223 |
+#ifndef O_NONBLOCK |
2224 |
+# define O_NONBLOCK O_NDELAY |
2225 |
+#endif |
2226 |
+ |
2227 |
+/* If the gnulib module 'nonblocking' is in use, guarantee a working non-zero |
2228 |
+ value of O_NONBLOCK. Otherwise, O_NONBLOCK is defined (above) to O_NDELAY |
2229 |
+ or to 0 as fallback. */ |
2230 |
+#if 0 |
2231 |
+# if O_NONBLOCK |
2232 |
+# define GNULIB_defined_O_NONBLOCK 0 |
2233 |
+# else |
2234 |
+# define GNULIB_defined_O_NONBLOCK 1 |
2235 |
+# undef O_NONBLOCK |
2236 |
+# define O_NONBLOCK 0x40000000 |
2237 |
+# endif |
2238 |
+#endif |
2239 |
+ |
2240 |
+#ifndef O_NOCTTY |
2241 |
+# define O_NOCTTY 0 |
2242 |
+#endif |
2243 |
+ |
2244 |
+#ifndef O_NOFOLLOW |
2245 |
+# define O_NOFOLLOW 0 |
2246 |
+#endif |
2247 |
+ |
2248 |
+#ifndef O_NOLINK |
2249 |
+# define O_NOLINK 0 |
2250 |
+#endif |
2251 |
+ |
2252 |
+#ifndef O_NOLINKS |
2253 |
+# define O_NOLINKS 0 |
2254 |
+#endif |
2255 |
+ |
2256 |
+#ifndef O_NOTRANS |
2257 |
+# define O_NOTRANS 0 |
2258 |
+#endif |
2259 |
+ |
2260 |
+#ifndef O_RSYNC |
2261 |
+# define O_RSYNC 0 |
2262 |
+#endif |
2263 |
+ |
2264 |
+#ifndef O_SEARCH |
2265 |
+# define O_SEARCH O_RDONLY /* This is often close enough in older systems. */ |
2266 |
+#endif |
2267 |
+ |
2268 |
+#ifndef O_SYNC |
2269 |
+# define O_SYNC 0 |
2270 |
+#endif |
2271 |
+ |
2272 |
+#ifndef O_TTY_INIT |
2273 |
+# define O_TTY_INIT 0 |
2274 |
+#endif |
2275 |
+ |
2276 |
+#if ~O_ACCMODE & (O_RDONLY | O_WRONLY | O_RDWR | O_EXEC | O_SEARCH) |
2277 |
+# undef O_ACCMODE |
2278 |
+# define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR | O_EXEC | O_SEARCH) |
2279 |
+#endif |
2280 |
+ |
2281 |
+/* For systems that distinguish between text and binary I/O. |
2282 |
+ O_BINARY is usually declared in fcntl.h */ |
2283 |
+#if !defined O_BINARY && defined _O_BINARY |
2284 |
+ /* For MSC-compatible compilers. */ |
2285 |
+# define O_BINARY _O_BINARY |
2286 |
+# define O_TEXT _O_TEXT |
2287 |
+#endif |
2288 |
+ |
2289 |
+#if defined __BEOS__ || defined __HAIKU__ |
2290 |
+ /* BeOS 5 and Haiku have O_BINARY and O_TEXT, but they have no effect. */ |
2291 |
+# undef O_BINARY |
2292 |
+# undef O_TEXT |
2293 |
+#endif |
2294 |
+ |
2295 |
+#ifndef O_BINARY |
2296 |
+# define O_BINARY 0 |
2297 |
+# define O_TEXT 0 |
2298 |
+#endif |
2299 |
+ |
2300 |
+/* Fix up the AT_* macros. */ |
2301 |
+ |
2302 |
+/* Work around a bug in Solaris 9 and 10: AT_FDCWD is positive. Its |
2303 |
+ value exceeds INT_MAX, so its use as an int doesn't conform to the |
2304 |
+ C standard, and GCC and Sun C complain in some cases. If the bug |
2305 |
+ is present, undef AT_FDCWD here, so it can be redefined below. */ |
2306 |
+#if 0 < AT_FDCWD && AT_FDCWD == 0xffd19553 |
2307 |
+# undef AT_FDCWD |
2308 |
+#endif |
2309 |
+ |
2310 |
+/* Use the same bit pattern as Solaris 9, but with the proper |
2311 |
+ signedness. The bit pattern is important, in case this actually is |
2312 |
+ Solaris with the above workaround. */ |
2313 |
+#ifndef AT_FDCWD |
2314 |
+# define AT_FDCWD (-3041965) |
2315 |
+#endif |
2316 |
+ |
2317 |
+/* Use the same values as Solaris 9. This shouldn't matter, but |
2318 |
+ there's no real reason to differ. */ |
2319 |
+#ifndef AT_SYMLINK_NOFOLLOW |
2320 |
+# define AT_SYMLINK_NOFOLLOW 4096 |
2321 |
+#endif |
2322 |
+ |
2323 |
+#ifndef AT_REMOVEDIR |
2324 |
+# define AT_REMOVEDIR 1 |
2325 |
+#endif |
2326 |
+ |
2327 |
+/* Solaris 9 lacks these two, so just pick unique values. */ |
2328 |
+#ifndef AT_SYMLINK_FOLLOW |
2329 |
+# define AT_SYMLINK_FOLLOW 2 |
2330 |
+#endif |
2331 |
+ |
2332 |
+#ifndef AT_EACCESS |
2333 |
+# define AT_EACCESS 4 |
2334 |
+#endif |
2335 |
+ |
2336 |
+/* Ignore this flag if not supported. */ |
2337 |
+#ifndef AT_NO_AUTOMOUNT |
2338 |
+# define AT_NO_AUTOMOUNT 0 |
2339 |
+#endif |
2340 |
+ |
2341 |
+#endif /* _GL_FCNTL_H */ |
2342 |
+#endif /* _GL_FCNTL_H */ |
2343 |
+#endif |
2344 |
|
2345 |
diff --git a/autotools/gnulib/fcntl.in.h b/autotools/gnulib/fcntl.in.h |
2346 |
index 3e0c302..9270ced 100644 |
2347 |
--- a/autotools/gnulib/fcntl.in.h |
2348 |
+++ b/autotools/gnulib/fcntl.in.h |
2349 |
@@ -435,6 +435,10 @@ _GL_WARN_ON_USE (openat, "openat is not portable - " |
2350 |
# define AT_EACCESS 4 |
2351 |
#endif |
2352 |
|
2353 |
+/* Ignore this flag if not supported. */ |
2354 |
+#ifndef AT_NO_AUTOMOUNT |
2355 |
+# define AT_NO_AUTOMOUNT 0 |
2356 |
+#endif |
2357 |
|
2358 |
#endif /* _@GUARD_PREFIX@_FCNTL_H */ |
2359 |
#endif /* _@GUARD_PREFIX@_FCNTL_H */ |
2360 |
|
2361 |
diff --git a/autotools/gnulib/inttypes.h b/autotools/gnulib/inttypes.h |
2362 |
new file mode 100644 |
2363 |
index 0000000..dcd3d4f |
2364 |
--- /dev/null |
2365 |
+++ b/autotools/gnulib/inttypes.h |
2366 |
@@ -0,0 +1,1509 @@ |
2367 |
+/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ |
2368 |
+/* Copyright (C) 2006-2022 Free Software Foundation, Inc. |
2369 |
+ Written by Paul Eggert, Bruno Haible, Derek Price. |
2370 |
+ This file is part of gnulib. |
2371 |
+ |
2372 |
+ This file is free software: you can redistribute it and/or modify |
2373 |
+ it under the terms of the GNU Lesser General Public License as |
2374 |
+ published by the Free Software Foundation; either version 2.1 of the |
2375 |
+ License, or (at your option) any later version. |
2376 |
+ |
2377 |
+ This file is distributed in the hope that it will be useful, |
2378 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
2379 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2380 |
+ GNU Lesser General Public License for more details. |
2381 |
+ |
2382 |
+ You should have received a copy of the GNU Lesser General Public License |
2383 |
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
2384 |
+ |
2385 |
+/* |
2386 |
+ * ISO C 99 <inttypes.h> for platforms that lack it. |
2387 |
+ * <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/inttypes.h.html> |
2388 |
+ */ |
2389 |
+ |
2390 |
+#if __GNUC__ >= 3 |
2391 |
+#pragma GCC system_header |
2392 |
+#endif |
2393 |
+ |
2394 |
+ |
2395 |
+/* Include the original <inttypes.h> if it exists, and if this file |
2396 |
+ has not been included yet or if this file includes gnulib stdint.h |
2397 |
+ which in turn includes this file. |
2398 |
+ The include_next requires a split double-inclusion guard. */ |
2399 |
+#if ! defined INTTYPES_H || defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H |
2400 |
+# if 1 |
2401 |
+ |
2402 |
+ /* Some pre-C++11 <stdint.h> implementations need this. */ |
2403 |
+# if defined __cplusplus && ! defined __STDC_FORMAT_MACROS |
2404 |
+# define __STDC_FORMAT_MACROS 1 |
2405 |
+# endif |
2406 |
+ |
2407 |
+# include_next <inttypes.h> |
2408 |
+ |
2409 |
+# define _GL_FINISHED_INCLUDING_SYSTEM_INTTYPES_H |
2410 |
+# endif |
2411 |
+#endif |
2412 |
+ |
2413 |
+#if ! defined INTTYPES_H && ! defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H |
2414 |
+#define INTTYPES_H |
2415 |
+ |
2416 |
+/* Include <stdint.h> or the gnulib replacement. |
2417 |
+ But avoid namespace pollution on glibc systems. */ |
2418 |
+#ifndef __GLIBC__ |
2419 |
+# include <stdint.h> |
2420 |
+#endif |
2421 |
+/* Get CHAR_BIT, INT_MAX, LONG_MAX, etc. */ |
2422 |
+#include <limits.h> |
2423 |
+/* On mingw, __USE_MINGW_ANSI_STDIO only works if <stdio.h> is also included */ |
2424 |
+#if defined _WIN32 && ! defined __CYGWIN__ |
2425 |
+# include <stdio.h> |
2426 |
+#endif |
2427 |
+ |
2428 |
+#if !(INT_MAX == 0x7fffffff && INT_MIN + INT_MAX == -1) |
2429 |
+# error "This file assumes that 'int' is 32-bit two's complement. Please report your platform and compiler to <bug-gnulib@×××.org>." |
2430 |
+#endif |
2431 |
+ |
2432 |
+/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ |
2433 |
+/* C++ compatible function declaration macros. |
2434 |
+ Copyright (C) 2010-2022 Free Software Foundation, Inc. |
2435 |
+ |
2436 |
+ This program is free software: you can redistribute it and/or modify it |
2437 |
+ under the terms of the GNU Lesser General Public License as published |
2438 |
+ by the Free Software Foundation; either version 2 of the License, or |
2439 |
+ (at your option) any later version. |
2440 |
+ |
2441 |
+ This program is distributed in the hope that it will be useful, |
2442 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
2443 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
2444 |
+ Lesser General Public License for more details. |
2445 |
+ |
2446 |
+ You should have received a copy of the GNU Lesser General Public License |
2447 |
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
2448 |
+ |
2449 |
+#ifndef _GL_CXXDEFS_H |
2450 |
+#define _GL_CXXDEFS_H |
2451 |
+ |
2452 |
+/* Begin/end the GNULIB_NAMESPACE namespace. */ |
2453 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
2454 |
+# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { |
2455 |
+# define _GL_END_NAMESPACE } |
2456 |
+#else |
2457 |
+# define _GL_BEGIN_NAMESPACE |
2458 |
+# define _GL_END_NAMESPACE |
2459 |
+#endif |
2460 |
+ |
2461 |
+/* The three most frequent use cases of these macros are: |
2462 |
+ |
2463 |
+ * For providing a substitute for a function that is missing on some |
2464 |
+ platforms, but is declared and works fine on the platforms on which |
2465 |
+ it exists: |
2466 |
+ |
2467 |
+ #if @GNULIB_FOO@ |
2468 |
+ # if !@HAVE_FOO@ |
2469 |
+ _GL_FUNCDECL_SYS (foo, ...); |
2470 |
+ # endif |
2471 |
+ _GL_CXXALIAS_SYS (foo, ...); |
2472 |
+ _GL_CXXALIASWARN (foo); |
2473 |
+ #elif defined GNULIB_POSIXCHECK |
2474 |
+ ... |
2475 |
+ #endif |
2476 |
+ |
2477 |
+ * For providing a replacement for a function that exists on all platforms, |
2478 |
+ but is broken/insufficient and needs to be replaced on some platforms: |
2479 |
+ |
2480 |
+ #if @GNULIB_FOO@ |
2481 |
+ # if @REPLACE_FOO@ |
2482 |
+ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
2483 |
+ # undef foo |
2484 |
+ # define foo rpl_foo |
2485 |
+ # endif |
2486 |
+ _GL_FUNCDECL_RPL (foo, ...); |
2487 |
+ _GL_CXXALIAS_RPL (foo, ...); |
2488 |
+ # else |
2489 |
+ _GL_CXXALIAS_SYS (foo, ...); |
2490 |
+ # endif |
2491 |
+ _GL_CXXALIASWARN (foo); |
2492 |
+ #elif defined GNULIB_POSIXCHECK |
2493 |
+ ... |
2494 |
+ #endif |
2495 |
+ |
2496 |
+ * For providing a replacement for a function that exists on some platforms |
2497 |
+ but is broken/insufficient and needs to be replaced on some of them and |
2498 |
+ is additionally either missing or undeclared on some other platforms: |
2499 |
+ |
2500 |
+ #if @GNULIB_FOO@ |
2501 |
+ # if @REPLACE_FOO@ |
2502 |
+ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
2503 |
+ # undef foo |
2504 |
+ # define foo rpl_foo |
2505 |
+ # endif |
2506 |
+ _GL_FUNCDECL_RPL (foo, ...); |
2507 |
+ _GL_CXXALIAS_RPL (foo, ...); |
2508 |
+ # else |
2509 |
+ # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ |
2510 |
+ _GL_FUNCDECL_SYS (foo, ...); |
2511 |
+ # endif |
2512 |
+ _GL_CXXALIAS_SYS (foo, ...); |
2513 |
+ # endif |
2514 |
+ _GL_CXXALIASWARN (foo); |
2515 |
+ #elif defined GNULIB_POSIXCHECK |
2516 |
+ ... |
2517 |
+ #endif |
2518 |
+*/ |
2519 |
+ |
2520 |
+/* _GL_EXTERN_C declaration; |
2521 |
+ performs the declaration with C linkage. */ |
2522 |
+#if defined __cplusplus |
2523 |
+# define _GL_EXTERN_C extern "C" |
2524 |
+#else |
2525 |
+# define _GL_EXTERN_C extern |
2526 |
+#endif |
2527 |
+ |
2528 |
+/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); |
2529 |
+ declares a replacement function, named rpl_func, with the given prototype, |
2530 |
+ consisting of return type, parameters, and attributes. |
2531 |
+ Example: |
2532 |
+ _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) |
2533 |
+ _GL_ARG_NONNULL ((1))); |
2534 |
+ */ |
2535 |
+#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ |
2536 |
+ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) |
2537 |
+#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ |
2538 |
+ _GL_EXTERN_C rettype rpl_func parameters_and_attributes |
2539 |
+ |
2540 |
+/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); |
2541 |
+ declares the system function, named func, with the given prototype, |
2542 |
+ consisting of return type, parameters, and attributes. |
2543 |
+ Example: |
2544 |
+ _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) |
2545 |
+ _GL_ARG_NONNULL ((1))); |
2546 |
+ */ |
2547 |
+#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ |
2548 |
+ _GL_EXTERN_C rettype func parameters_and_attributes |
2549 |
+ |
2550 |
+/* _GL_CXXALIAS_RPL (func, rettype, parameters); |
2551 |
+ declares a C++ alias called GNULIB_NAMESPACE::func |
2552 |
+ that redirects to rpl_func, if GNULIB_NAMESPACE is defined. |
2553 |
+ Example: |
2554 |
+ _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); |
2555 |
+ |
2556 |
+ Wrapping rpl_func in an object with an inline conversion operator |
2557 |
+ avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is |
2558 |
+ actually used in the program. */ |
2559 |
+#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ |
2560 |
+ _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) |
2561 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
2562 |
+# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ |
2563 |
+ namespace GNULIB_NAMESPACE \ |
2564 |
+ { \ |
2565 |
+ static const struct _gl_ ## func ## _wrapper \ |
2566 |
+ { \ |
2567 |
+ typedef rettype (*type) parameters; \ |
2568 |
+ \ |
2569 |
+ inline operator type () const \ |
2570 |
+ { \ |
2571 |
+ return ::rpl_func; \ |
2572 |
+ } \ |
2573 |
+ } func = {}; \ |
2574 |
+ } \ |
2575 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
2576 |
+#else |
2577 |
+# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ |
2578 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
2579 |
+#endif |
2580 |
+ |
2581 |
+/* _GL_CXXALIAS_MDA (func, rettype, parameters); |
2582 |
+ is to be used when func is a Microsoft deprecated alias, on native Windows. |
2583 |
+ It declares a C++ alias called GNULIB_NAMESPACE::func |
2584 |
+ that redirects to _func, if GNULIB_NAMESPACE is defined. |
2585 |
+ Example: |
2586 |
+ _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); |
2587 |
+ */ |
2588 |
+#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ |
2589 |
+ _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) |
2590 |
+ |
2591 |
+/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); |
2592 |
+ is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); |
2593 |
+ except that the C function rpl_func may have a slightly different |
2594 |
+ declaration. A cast is used to silence the "invalid conversion" error |
2595 |
+ that would otherwise occur. */ |
2596 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
2597 |
+# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ |
2598 |
+ namespace GNULIB_NAMESPACE \ |
2599 |
+ { \ |
2600 |
+ static const struct _gl_ ## func ## _wrapper \ |
2601 |
+ { \ |
2602 |
+ typedef rettype (*type) parameters; \ |
2603 |
+ \ |
2604 |
+ inline operator type () const \ |
2605 |
+ { \ |
2606 |
+ return reinterpret_cast<type>(::rpl_func); \ |
2607 |
+ } \ |
2608 |
+ } func = {}; \ |
2609 |
+ } \ |
2610 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
2611 |
+#else |
2612 |
+# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ |
2613 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
2614 |
+#endif |
2615 |
+ |
2616 |
+/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); |
2617 |
+ is like _GL_CXXALIAS_MDA (func, rettype, parameters); |
2618 |
+ except that the C function func may have a slightly different declaration. |
2619 |
+ A cast is used to silence the "invalid conversion" error that would |
2620 |
+ otherwise occur. */ |
2621 |
+#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ |
2622 |
+ _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) |
2623 |
+ |
2624 |
+/* _GL_CXXALIAS_SYS (func, rettype, parameters); |
2625 |
+ declares a C++ alias called GNULIB_NAMESPACE::func |
2626 |
+ that redirects to the system provided function func, if GNULIB_NAMESPACE |
2627 |
+ is defined. |
2628 |
+ Example: |
2629 |
+ _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); |
2630 |
+ |
2631 |
+ Wrapping func in an object with an inline conversion operator |
2632 |
+ avoids a reference to func unless GNULIB_NAMESPACE::func is |
2633 |
+ actually used in the program. */ |
2634 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
2635 |
+# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ |
2636 |
+ namespace GNULIB_NAMESPACE \ |
2637 |
+ { \ |
2638 |
+ static const struct _gl_ ## func ## _wrapper \ |
2639 |
+ { \ |
2640 |
+ typedef rettype (*type) parameters; \ |
2641 |
+ \ |
2642 |
+ inline operator type () const \ |
2643 |
+ { \ |
2644 |
+ return ::func; \ |
2645 |
+ } \ |
2646 |
+ } func = {}; \ |
2647 |
+ } \ |
2648 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
2649 |
+#else |
2650 |
+# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ |
2651 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
2652 |
+#endif |
2653 |
+ |
2654 |
+/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); |
2655 |
+ is like _GL_CXXALIAS_SYS (func, rettype, parameters); |
2656 |
+ except that the C function func may have a slightly different declaration. |
2657 |
+ A cast is used to silence the "invalid conversion" error that would |
2658 |
+ otherwise occur. */ |
2659 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
2660 |
+# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ |
2661 |
+ namespace GNULIB_NAMESPACE \ |
2662 |
+ { \ |
2663 |
+ static const struct _gl_ ## func ## _wrapper \ |
2664 |
+ { \ |
2665 |
+ typedef rettype (*type) parameters; \ |
2666 |
+ \ |
2667 |
+ inline operator type () const \ |
2668 |
+ { \ |
2669 |
+ return reinterpret_cast<type>(::func); \ |
2670 |
+ } \ |
2671 |
+ } func = {}; \ |
2672 |
+ } \ |
2673 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
2674 |
+#else |
2675 |
+# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ |
2676 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
2677 |
+#endif |
2678 |
+ |
2679 |
+/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); |
2680 |
+ is like _GL_CXXALIAS_SYS (func, rettype, parameters); |
2681 |
+ except that the C function is picked among a set of overloaded functions, |
2682 |
+ namely the one with rettype2 and parameters2. Two consecutive casts |
2683 |
+ are used to silence the "cannot find a match" and "invalid conversion" |
2684 |
+ errors that would otherwise occur. */ |
2685 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
2686 |
+ /* The outer cast must be a reinterpret_cast. |
2687 |
+ The inner cast: When the function is defined as a set of overloaded |
2688 |
+ functions, it works as a static_cast<>, choosing the designated variant. |
2689 |
+ When the function is defined as a single variant, it works as a |
2690 |
+ reinterpret_cast<>. The parenthesized cast syntax works both ways. */ |
2691 |
+# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ |
2692 |
+ namespace GNULIB_NAMESPACE \ |
2693 |
+ { \ |
2694 |
+ static const struct _gl_ ## func ## _wrapper \ |
2695 |
+ { \ |
2696 |
+ typedef rettype (*type) parameters; \ |
2697 |
+ \ |
2698 |
+ inline operator type () const \ |
2699 |
+ { \ |
2700 |
+ return reinterpret_cast<type>((rettype2 (*) parameters2)(::func)); \ |
2701 |
+ } \ |
2702 |
+ } func = {}; \ |
2703 |
+ } \ |
2704 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
2705 |
+#else |
2706 |
+# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ |
2707 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
2708 |
+#endif |
2709 |
+ |
2710 |
+/* _GL_CXXALIASWARN (func); |
2711 |
+ causes a warning to be emitted when ::func is used but not when |
2712 |
+ GNULIB_NAMESPACE::func is used. func must be defined without overloaded |
2713 |
+ variants. */ |
2714 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
2715 |
+# define _GL_CXXALIASWARN(func) \ |
2716 |
+ _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) |
2717 |
+# define _GL_CXXALIASWARN_1(func,namespace) \ |
2718 |
+ _GL_CXXALIASWARN_2 (func, namespace) |
2719 |
+/* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>, |
2720 |
+ we enable the warning only when not optimizing. */ |
2721 |
+# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) |
2722 |
+# define _GL_CXXALIASWARN_2(func,namespace) \ |
2723 |
+ _GL_WARN_ON_USE (func, \ |
2724 |
+ "The symbol ::" #func " refers to the system function. " \ |
2725 |
+ "Use " #namespace "::" #func " instead.") |
2726 |
+# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING |
2727 |
+# define _GL_CXXALIASWARN_2(func,namespace) \ |
2728 |
+ extern __typeof__ (func) func |
2729 |
+# else |
2730 |
+# define _GL_CXXALIASWARN_2(func,namespace) \ |
2731 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
2732 |
+# endif |
2733 |
+#else |
2734 |
+# define _GL_CXXALIASWARN(func) \ |
2735 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
2736 |
+#endif |
2737 |
+ |
2738 |
+/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); |
2739 |
+ causes a warning to be emitted when the given overloaded variant of ::func |
2740 |
+ is used but not when GNULIB_NAMESPACE::func is used. */ |
2741 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
2742 |
+# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ |
2743 |
+ _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ |
2744 |
+ GNULIB_NAMESPACE) |
2745 |
+# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ |
2746 |
+ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) |
2747 |
+/* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>, |
2748 |
+ we enable the warning only when not optimizing. */ |
2749 |
+# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) |
2750 |
+# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ |
2751 |
+ _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ |
2752 |
+ "The symbol ::" #func " refers to the system function. " \ |
2753 |
+ "Use " #namespace "::" #func " instead.") |
2754 |
+# else |
2755 |
+# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ |
2756 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
2757 |
+# endif |
2758 |
+#else |
2759 |
+# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ |
2760 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
2761 |
+#endif |
2762 |
+ |
2763 |
+#endif /* _GL_CXXDEFS_H */ |
2764 |
+ |
2765 |
+/* The definition of _GL_ARG_NONNULL is copied here. */ |
2766 |
+/* A C macro for declaring that specific arguments must not be NULL. |
2767 |
+ Copyright (C) 2009-2022 Free Software Foundation, Inc. |
2768 |
+ |
2769 |
+ This program is free software: you can redistribute it and/or modify it |
2770 |
+ under the terms of the GNU Lesser General Public License as published |
2771 |
+ by the Free Software Foundation; either version 2 of the License, or |
2772 |
+ (at your option) any later version. |
2773 |
+ |
2774 |
+ This program is distributed in the hope that it will be useful, |
2775 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
2776 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
2777 |
+ Lesser General Public License for more details. |
2778 |
+ |
2779 |
+ You should have received a copy of the GNU Lesser General Public License |
2780 |
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
2781 |
+ |
2782 |
+/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools |
2783 |
+ that the values passed as arguments n, ..., m must be non-NULL pointers. |
2784 |
+ n = 1 stands for the first argument, n = 2 for the second argument etc. */ |
2785 |
+#ifndef _GL_ARG_NONNULL |
2786 |
+# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ |
2787 |
+# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) |
2788 |
+# else |
2789 |
+# define _GL_ARG_NONNULL(params) |
2790 |
+# endif |
2791 |
+#endif |
2792 |
+ |
2793 |
+/* The definition of _GL_WARN_ON_USE is copied here. */ |
2794 |
+/* A C macro for emitting warnings if a function is used. |
2795 |
+ Copyright (C) 2010-2022 Free Software Foundation, Inc. |
2796 |
+ |
2797 |
+ This program is free software: you can redistribute it and/or modify it |
2798 |
+ under the terms of the GNU Lesser General Public License as published |
2799 |
+ by the Free Software Foundation; either version 2 of the License, or |
2800 |
+ (at your option) any later version. |
2801 |
+ |
2802 |
+ This program is distributed in the hope that it will be useful, |
2803 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
2804 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
2805 |
+ Lesser General Public License for more details. |
2806 |
+ |
2807 |
+ You should have received a copy of the GNU Lesser General Public License |
2808 |
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
2809 |
+ |
2810 |
+/* _GL_WARN_ON_USE (function, "literal string") issues a declaration |
2811 |
+ for FUNCTION which will then trigger a compiler warning containing |
2812 |
+ the text of "literal string" anywhere that function is called, if |
2813 |
+ supported by the compiler. If the compiler does not support this |
2814 |
+ feature, the macro expands to an unused extern declaration. |
2815 |
+ |
2816 |
+ _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the |
2817 |
+ attribute used in _GL_WARN_ON_USE. If the compiler does not support |
2818 |
+ this feature, it expands to empty. |
2819 |
+ |
2820 |
+ These macros are useful for marking a function as a potential |
2821 |
+ portability trap, with the intent that "literal string" include |
2822 |
+ instructions on the replacement function that should be used |
2823 |
+ instead. |
2824 |
+ _GL_WARN_ON_USE is for functions with 'extern' linkage. |
2825 |
+ _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline' |
2826 |
+ linkage. |
2827 |
+ |
2828 |
+ However, one of the reasons that a function is a portability trap is |
2829 |
+ if it has the wrong signature. Declaring FUNCTION with a different |
2830 |
+ signature in C is a compilation error, so this macro must use the |
2831 |
+ same type as any existing declaration so that programs that avoid |
2832 |
+ the problematic FUNCTION do not fail to compile merely because they |
2833 |
+ included a header that poisoned the function. But this implies that |
2834 |
+ _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already |
2835 |
+ have a declaration. Use of this macro implies that there must not |
2836 |
+ be any other macro hiding the declaration of FUNCTION; but |
2837 |
+ undefining FUNCTION first is part of the poisoning process anyway |
2838 |
+ (although for symbols that are provided only via a macro, the result |
2839 |
+ is a compilation error rather than a warning containing |
2840 |
+ "literal string"). Also note that in C++, it is only safe to use if |
2841 |
+ FUNCTION has no overloads. |
2842 |
+ |
2843 |
+ For an example, it is possible to poison 'getline' by: |
2844 |
+ - adding a call to gl_WARN_ON_USE_PREPARE([[#include <stdio.h>]], |
2845 |
+ [getline]) in configure.ac, which potentially defines |
2846 |
+ HAVE_RAW_DECL_GETLINE |
2847 |
+ - adding this code to a header that wraps the system <stdio.h>: |
2848 |
+ #undef getline |
2849 |
+ #if HAVE_RAW_DECL_GETLINE |
2850 |
+ _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" |
2851 |
+ "not universally present; use the gnulib module getline"); |
2852 |
+ #endif |
2853 |
+ |
2854 |
+ It is not possible to directly poison global variables. But it is |
2855 |
+ possible to write a wrapper accessor function, and poison that |
2856 |
+ (less common usage, like &environ, will cause a compilation error |
2857 |
+ rather than issue the nice warning, but the end result of informing |
2858 |
+ the developer about their portability problem is still achieved): |
2859 |
+ #if HAVE_RAW_DECL_ENVIRON |
2860 |
+ static char *** |
2861 |
+ rpl_environ (void) { return &environ; } |
2862 |
+ _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); |
2863 |
+ # undef environ |
2864 |
+ # define environ (*rpl_environ ()) |
2865 |
+ #endif |
2866 |
+ or better (avoiding contradictory use of 'static' and 'extern'): |
2867 |
+ #if HAVE_RAW_DECL_ENVIRON |
2868 |
+ static char *** |
2869 |
+ _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared") |
2870 |
+ rpl_environ (void) { return &environ; } |
2871 |
+ # undef environ |
2872 |
+ # define environ (*rpl_environ ()) |
2873 |
+ #endif |
2874 |
+ */ |
2875 |
+#ifndef _GL_WARN_ON_USE |
2876 |
+ |
2877 |
+# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) |
2878 |
+/* A compiler attribute is available in gcc versions 4.3.0 and later. */ |
2879 |
+# define _GL_WARN_ON_USE(function, message) \ |
2880 |
+_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) |
2881 |
+# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ |
2882 |
+ __attribute__ ((__warning__ (message))) |
2883 |
+# elif __clang_major__ >= 4 |
2884 |
+/* Another compiler attribute is available in clang. */ |
2885 |
+# define _GL_WARN_ON_USE(function, message) \ |
2886 |
+_GL_WARN_EXTERN_C __typeof__ (function) function \ |
2887 |
+ __attribute__ ((__diagnose_if__ (1, message, "warning"))) |
2888 |
+# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ |
2889 |
+ __attribute__ ((__diagnose_if__ (1, message, "warning"))) |
2890 |
+# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING |
2891 |
+/* Verify the existence of the function. */ |
2892 |
+# define _GL_WARN_ON_USE(function, message) \ |
2893 |
+_GL_WARN_EXTERN_C __typeof__ (function) function |
2894 |
+# define _GL_WARN_ON_USE_ATTRIBUTE(message) |
2895 |
+# else /* Unsupported. */ |
2896 |
+# define _GL_WARN_ON_USE(function, message) \ |
2897 |
+_GL_WARN_EXTERN_C int _gl_warn_on_use |
2898 |
+# define _GL_WARN_ON_USE_ATTRIBUTE(message) |
2899 |
+# endif |
2900 |
+#endif |
2901 |
+ |
2902 |
+/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") |
2903 |
+ is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the |
2904 |
+ function is declared with the given prototype, consisting of return type, |
2905 |
+ parameters, and attributes. |
2906 |
+ This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does |
2907 |
+ not work in this case. */ |
2908 |
+#ifndef _GL_WARN_ON_USE_CXX |
2909 |
+# if !defined __cplusplus |
2910 |
+# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ |
2911 |
+ _GL_WARN_ON_USE (function, msg) |
2912 |
+# else |
2913 |
+# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) |
2914 |
+/* A compiler attribute is available in gcc versions 4.3.0 and later. */ |
2915 |
+# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ |
2916 |
+extern rettype_gcc function parameters_and_attributes \ |
2917 |
+ __attribute__ ((__warning__ (msg))) |
2918 |
+# elif __clang_major__ >= 4 |
2919 |
+/* Another compiler attribute is available in clang. */ |
2920 |
+# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ |
2921 |
+extern rettype_clang function parameters_and_attributes \ |
2922 |
+ __attribute__ ((__diagnose_if__ (1, msg, "warning"))) |
2923 |
+# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING |
2924 |
+/* Verify the existence of the function. */ |
2925 |
+# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ |
2926 |
+extern rettype_gcc function parameters_and_attributes |
2927 |
+# else /* Unsupported. */ |
2928 |
+# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ |
2929 |
+_GL_WARN_EXTERN_C int _gl_warn_on_use |
2930 |
+# endif |
2931 |
+# endif |
2932 |
+#endif |
2933 |
+ |
2934 |
+/* _GL_WARN_EXTERN_C declaration; |
2935 |
+ performs the declaration with C linkage. */ |
2936 |
+#ifndef _GL_WARN_EXTERN_C |
2937 |
+# if defined __cplusplus |
2938 |
+# define _GL_WARN_EXTERN_C extern "C" |
2939 |
+# else |
2940 |
+# define _GL_WARN_EXTERN_C extern |
2941 |
+# endif |
2942 |
+#endif |
2943 |
+ |
2944 |
+/* 7.8.1 Macros for format specifiers */ |
2945 |
+ |
2946 |
+#if defined _TNS_R_TARGET |
2947 |
+ /* Tandem NonStop R series and compatible platforms released before |
2948 |
+ July 2005 support %Ld but not %lld. */ |
2949 |
+# define _LONG_LONG_FORMAT_PREFIX "L" |
2950 |
+#else |
2951 |
+# define _LONG_LONG_FORMAT_PREFIX "ll" |
2952 |
+#endif |
2953 |
+ |
2954 |
+#if !defined PRId8 |
2955 |
+# ifdef INT8_MAX |
2956 |
+# define PRId8 "d" |
2957 |
+# endif |
2958 |
+#endif |
2959 |
+#if !defined PRIi8 |
2960 |
+# ifdef INT8_MAX |
2961 |
+# define PRIi8 "i" |
2962 |
+# endif |
2963 |
+#endif |
2964 |
+#if !defined PRIo8 |
2965 |
+# ifdef UINT8_MAX |
2966 |
+# define PRIo8 "o" |
2967 |
+# endif |
2968 |
+#endif |
2969 |
+#if !defined PRIu8 |
2970 |
+# ifdef UINT8_MAX |
2971 |
+# define PRIu8 "u" |
2972 |
+# endif |
2973 |
+#endif |
2974 |
+#if !defined PRIx8 |
2975 |
+# ifdef UINT8_MAX |
2976 |
+# define PRIx8 "x" |
2977 |
+# endif |
2978 |
+#endif |
2979 |
+#if !defined PRIX8 |
2980 |
+# ifdef UINT8_MAX |
2981 |
+# define PRIX8 "X" |
2982 |
+# endif |
2983 |
+#endif |
2984 |
+#if !defined PRId16 |
2985 |
+# ifdef INT16_MAX |
2986 |
+# define PRId16 "d" |
2987 |
+# endif |
2988 |
+#endif |
2989 |
+#if !defined PRIi16 |
2990 |
+# ifdef INT16_MAX |
2991 |
+# define PRIi16 "i" |
2992 |
+# endif |
2993 |
+#endif |
2994 |
+#if !defined PRIo16 |
2995 |
+# ifdef UINT16_MAX |
2996 |
+# define PRIo16 "o" |
2997 |
+# endif |
2998 |
+#endif |
2999 |
+#if !defined PRIu16 |
3000 |
+# ifdef UINT16_MAX |
3001 |
+# define PRIu16 "u" |
3002 |
+# endif |
3003 |
+#endif |
3004 |
+#if !defined PRIx16 |
3005 |
+# ifdef UINT16_MAX |
3006 |
+# define PRIx16 "x" |
3007 |
+# endif |
3008 |
+#endif |
3009 |
+#if !defined PRIX16 |
3010 |
+# ifdef UINT16_MAX |
3011 |
+# define PRIX16 "X" |
3012 |
+# endif |
3013 |
+#endif |
3014 |
+#if !defined PRId32 |
3015 |
+# ifdef INT32_MAX |
3016 |
+# define PRId32 "d" |
3017 |
+# endif |
3018 |
+#endif |
3019 |
+#if !defined PRIi32 |
3020 |
+# ifdef INT32_MAX |
3021 |
+# define PRIi32 "i" |
3022 |
+# endif |
3023 |
+#endif |
3024 |
+#if !defined PRIo32 |
3025 |
+# ifdef UINT32_MAX |
3026 |
+# define PRIo32 "o" |
3027 |
+# endif |
3028 |
+#endif |
3029 |
+#if !defined PRIu32 |
3030 |
+# ifdef UINT32_MAX |
3031 |
+# define PRIu32 "u" |
3032 |
+# endif |
3033 |
+#endif |
3034 |
+#if !defined PRIx32 |
3035 |
+# ifdef UINT32_MAX |
3036 |
+# define PRIx32 "x" |
3037 |
+# endif |
3038 |
+#endif |
3039 |
+#if !defined PRIX32 |
3040 |
+# ifdef UINT32_MAX |
3041 |
+# define PRIX32 "X" |
3042 |
+# endif |
3043 |
+#endif |
3044 |
+#ifdef INT64_MAX |
3045 |
+# if (0 ? defined _LP64 : 1) |
3046 |
+# define _PRI64_PREFIX "l" |
3047 |
+# elif defined _MSC_VER || defined __MINGW32__ |
3048 |
+# define _PRI64_PREFIX "I64" |
3049 |
+# elif LONG_MAX >> 30 == 1 |
3050 |
+# define _PRI64_PREFIX _LONG_LONG_FORMAT_PREFIX |
3051 |
+# endif |
3052 |
+# if !defined PRId64 |
3053 |
+# define PRId64 _PRI64_PREFIX "d" |
3054 |
+# endif |
3055 |
+# if !defined PRIi64 |
3056 |
+# define PRIi64 _PRI64_PREFIX "i" |
3057 |
+# endif |
3058 |
+#endif |
3059 |
+#ifdef UINT64_MAX |
3060 |
+# if (0 ? defined _LP64 : 1) |
3061 |
+# define _PRIu64_PREFIX "l" |
3062 |
+# elif defined _MSC_VER || defined __MINGW32__ |
3063 |
+# define _PRIu64_PREFIX "I64" |
3064 |
+# elif ULONG_MAX >> 31 == 1 |
3065 |
+# define _PRIu64_PREFIX _LONG_LONG_FORMAT_PREFIX |
3066 |
+# endif |
3067 |
+# if !defined PRIo64 |
3068 |
+# define PRIo64 _PRIu64_PREFIX "o" |
3069 |
+# endif |
3070 |
+# if !defined PRIu64 |
3071 |
+# define PRIu64 _PRIu64_PREFIX "u" |
3072 |
+# endif |
3073 |
+# if !defined PRIx64 |
3074 |
+# define PRIx64 _PRIu64_PREFIX "x" |
3075 |
+# endif |
3076 |
+# if !defined PRIX64 |
3077 |
+# define PRIX64 _PRIu64_PREFIX "X" |
3078 |
+# endif |
3079 |
+#endif |
3080 |
+ |
3081 |
+#if !defined PRIdLEAST8 |
3082 |
+# define PRIdLEAST8 "d" |
3083 |
+#endif |
3084 |
+#if !defined PRIiLEAST8 |
3085 |
+# define PRIiLEAST8 "i" |
3086 |
+#endif |
3087 |
+#if !defined PRIoLEAST8 |
3088 |
+# define PRIoLEAST8 "o" |
3089 |
+#endif |
3090 |
+#if !defined PRIuLEAST8 |
3091 |
+# define PRIuLEAST8 "u" |
3092 |
+#endif |
3093 |
+#if !defined PRIxLEAST8 |
3094 |
+# define PRIxLEAST8 "x" |
3095 |
+#endif |
3096 |
+#if !defined PRIXLEAST8 |
3097 |
+# define PRIXLEAST8 "X" |
3098 |
+#endif |
3099 |
+#if !defined PRIdLEAST16 |
3100 |
+# define PRIdLEAST16 "d" |
3101 |
+#endif |
3102 |
+#if !defined PRIiLEAST16 |
3103 |
+# define PRIiLEAST16 "i" |
3104 |
+#endif |
3105 |
+#if !defined PRIoLEAST16 |
3106 |
+# define PRIoLEAST16 "o" |
3107 |
+#endif |
3108 |
+#if !defined PRIuLEAST16 |
3109 |
+# define PRIuLEAST16 "u" |
3110 |
+#endif |
3111 |
+#if !defined PRIxLEAST16 |
3112 |
+# define PRIxLEAST16 "x" |
3113 |
+#endif |
3114 |
+#if !defined PRIXLEAST16 |
3115 |
+# define PRIXLEAST16 "X" |
3116 |
+#endif |
3117 |
+#if !defined PRIdLEAST32 |
3118 |
+# define PRIdLEAST32 "d" |
3119 |
+#endif |
3120 |
+#if !defined PRIiLEAST32 |
3121 |
+# define PRIiLEAST32 "i" |
3122 |
+#endif |
3123 |
+#if !defined PRIoLEAST32 |
3124 |
+# define PRIoLEAST32 "o" |
3125 |
+#endif |
3126 |
+#if !defined PRIuLEAST32 |
3127 |
+# define PRIuLEAST32 "u" |
3128 |
+#endif |
3129 |
+#if !defined PRIxLEAST32 |
3130 |
+# define PRIxLEAST32 "x" |
3131 |
+#endif |
3132 |
+#if !defined PRIXLEAST32 |
3133 |
+# define PRIXLEAST32 "X" |
3134 |
+#endif |
3135 |
+#ifdef INT64_MAX |
3136 |
+# if !defined PRIdLEAST64 |
3137 |
+# define PRIdLEAST64 PRId64 |
3138 |
+# endif |
3139 |
+# if !defined PRIiLEAST64 |
3140 |
+# define PRIiLEAST64 PRIi64 |
3141 |
+# endif |
3142 |
+#endif |
3143 |
+#ifdef UINT64_MAX |
3144 |
+# if !defined PRIoLEAST64 |
3145 |
+# define PRIoLEAST64 PRIo64 |
3146 |
+# endif |
3147 |
+# if !defined PRIuLEAST64 |
3148 |
+# define PRIuLEAST64 PRIu64 |
3149 |
+# endif |
3150 |
+# if !defined PRIxLEAST64 |
3151 |
+# define PRIxLEAST64 PRIx64 |
3152 |
+# endif |
3153 |
+# if !defined PRIXLEAST64 |
3154 |
+# define PRIXLEAST64 PRIX64 |
3155 |
+# endif |
3156 |
+#endif |
3157 |
+ |
3158 |
+#if !defined PRIdFAST8 |
3159 |
+# if INT_FAST8_MAX > INT32_MAX |
3160 |
+# define PRIdFAST8 PRId64 |
3161 |
+# else |
3162 |
+# define PRIdFAST8 "d" |
3163 |
+# endif |
3164 |
+#endif |
3165 |
+#if !defined PRIiFAST8 |
3166 |
+# if INT_FAST8_MAX > INT32_MAX |
3167 |
+# define PRIiFAST8 PRIi64 |
3168 |
+# else |
3169 |
+# define PRIiFAST8 "i" |
3170 |
+# endif |
3171 |
+#endif |
3172 |
+#if !defined PRIoFAST8 |
3173 |
+# if UINT_FAST8_MAX > UINT32_MAX |
3174 |
+# define PRIoFAST8 PRIo64 |
3175 |
+# else |
3176 |
+# define PRIoFAST8 "o" |
3177 |
+# endif |
3178 |
+#endif |
3179 |
+#if !defined PRIuFAST8 |
3180 |
+# if UINT_FAST8_MAX > UINT32_MAX |
3181 |
+# define PRIuFAST8 PRIu64 |
3182 |
+# else |
3183 |
+# define PRIuFAST8 "u" |
3184 |
+# endif |
3185 |
+#endif |
3186 |
+#if !defined PRIxFAST8 |
3187 |
+# if UINT_FAST8_MAX > UINT32_MAX |
3188 |
+# define PRIxFAST8 PRIx64 |
3189 |
+# else |
3190 |
+# define PRIxFAST8 "x" |
3191 |
+# endif |
3192 |
+#endif |
3193 |
+#if !defined PRIXFAST8 |
3194 |
+# if UINT_FAST8_MAX > UINT32_MAX |
3195 |
+# define PRIXFAST8 PRIX64 |
3196 |
+# else |
3197 |
+# define PRIXFAST8 "X" |
3198 |
+# endif |
3199 |
+#endif |
3200 |
+#if !defined PRIdFAST16 |
3201 |
+# if INT_FAST16_MAX > INT32_MAX |
3202 |
+# define PRIdFAST16 PRId64 |
3203 |
+# else |
3204 |
+# define PRIdFAST16 "d" |
3205 |
+# endif |
3206 |
+#endif |
3207 |
+#if !defined PRIiFAST16 |
3208 |
+# if INT_FAST16_MAX > INT32_MAX |
3209 |
+# define PRIiFAST16 PRIi64 |
3210 |
+# else |
3211 |
+# define PRIiFAST16 "i" |
3212 |
+# endif |
3213 |
+#endif |
3214 |
+#if !defined PRIoFAST16 |
3215 |
+# if UINT_FAST16_MAX > UINT32_MAX |
3216 |
+# define PRIoFAST16 PRIo64 |
3217 |
+# else |
3218 |
+# define PRIoFAST16 "o" |
3219 |
+# endif |
3220 |
+#endif |
3221 |
+#if !defined PRIuFAST16 |
3222 |
+# if UINT_FAST16_MAX > UINT32_MAX |
3223 |
+# define PRIuFAST16 PRIu64 |
3224 |
+# else |
3225 |
+# define PRIuFAST16 "u" |
3226 |
+# endif |
3227 |
+#endif |
3228 |
+#if !defined PRIxFAST16 |
3229 |
+# if UINT_FAST16_MAX > UINT32_MAX |
3230 |
+# define PRIxFAST16 PRIx64 |
3231 |
+# else |
3232 |
+# define PRIxFAST16 "x" |
3233 |
+# endif |
3234 |
+#endif |
3235 |
+#if !defined PRIXFAST16 |
3236 |
+# if UINT_FAST16_MAX > UINT32_MAX |
3237 |
+# define PRIXFAST16 PRIX64 |
3238 |
+# else |
3239 |
+# define PRIXFAST16 "X" |
3240 |
+# endif |
3241 |
+#endif |
3242 |
+#if !defined PRIdFAST32 |
3243 |
+# if INT_FAST32_MAX > INT32_MAX |
3244 |
+# define PRIdFAST32 PRId64 |
3245 |
+# else |
3246 |
+# define PRIdFAST32 "d" |
3247 |
+# endif |
3248 |
+#endif |
3249 |
+#if !defined PRIiFAST32 |
3250 |
+# if INT_FAST32_MAX > INT32_MAX |
3251 |
+# define PRIiFAST32 PRIi64 |
3252 |
+# else |
3253 |
+# define PRIiFAST32 "i" |
3254 |
+# endif |
3255 |
+#endif |
3256 |
+#if !defined PRIoFAST32 |
3257 |
+# if UINT_FAST32_MAX > UINT32_MAX |
3258 |
+# define PRIoFAST32 PRIo64 |
3259 |
+# else |
3260 |
+# define PRIoFAST32 "o" |
3261 |
+# endif |
3262 |
+#endif |
3263 |
+#if !defined PRIuFAST32 |
3264 |
+# if UINT_FAST32_MAX > UINT32_MAX |
3265 |
+# define PRIuFAST32 PRIu64 |
3266 |
+# else |
3267 |
+# define PRIuFAST32 "u" |
3268 |
+# endif |
3269 |
+#endif |
3270 |
+#if !defined PRIxFAST32 |
3271 |
+# if UINT_FAST32_MAX > UINT32_MAX |
3272 |
+# define PRIxFAST32 PRIx64 |
3273 |
+# else |
3274 |
+# define PRIxFAST32 "x" |
3275 |
+# endif |
3276 |
+#endif |
3277 |
+#if !defined PRIXFAST32 |
3278 |
+# if UINT_FAST32_MAX > UINT32_MAX |
3279 |
+# define PRIXFAST32 PRIX64 |
3280 |
+# else |
3281 |
+# define PRIXFAST32 "X" |
3282 |
+# endif |
3283 |
+#endif |
3284 |
+#ifdef INT64_MAX |
3285 |
+# if !defined PRIdFAST64 |
3286 |
+# define PRIdFAST64 PRId64 |
3287 |
+# endif |
3288 |
+# if !defined PRIiFAST64 |
3289 |
+# define PRIiFAST64 PRIi64 |
3290 |
+# endif |
3291 |
+#endif |
3292 |
+#ifdef UINT64_MAX |
3293 |
+# if !defined PRIoFAST64 |
3294 |
+# define PRIoFAST64 PRIo64 |
3295 |
+# endif |
3296 |
+# if !defined PRIuFAST64 |
3297 |
+# define PRIuFAST64 PRIu64 |
3298 |
+# endif |
3299 |
+# if !defined PRIxFAST64 |
3300 |
+# define PRIxFAST64 PRIx64 |
3301 |
+# endif |
3302 |
+# if !defined PRIXFAST64 |
3303 |
+# define PRIXFAST64 PRIX64 |
3304 |
+# endif |
3305 |
+#endif |
3306 |
+ |
3307 |
+#if !defined PRIdMAX |
3308 |
+# if 1 |
3309 |
+# define PRIdMAX PRId64 |
3310 |
+# else |
3311 |
+# define PRIdMAX "ld" |
3312 |
+# endif |
3313 |
+#endif |
3314 |
+#if !defined PRIiMAX |
3315 |
+# if 1 |
3316 |
+# define PRIiMAX PRIi64 |
3317 |
+# else |
3318 |
+# define PRIiMAX "li" |
3319 |
+# endif |
3320 |
+#endif |
3321 |
+#if !defined PRIoMAX |
3322 |
+# if 1 |
3323 |
+# define PRIoMAX PRIo64 |
3324 |
+# else |
3325 |
+# define PRIoMAX "lo" |
3326 |
+# endif |
3327 |
+#endif |
3328 |
+#if !defined PRIuMAX |
3329 |
+# if 1 |
3330 |
+# define PRIuMAX PRIu64 |
3331 |
+# else |
3332 |
+# define PRIuMAX "lu" |
3333 |
+# endif |
3334 |
+#endif |
3335 |
+#if !defined PRIxMAX |
3336 |
+# if 1 |
3337 |
+# define PRIxMAX PRIx64 |
3338 |
+# else |
3339 |
+# define PRIxMAX "lx" |
3340 |
+# endif |
3341 |
+#endif |
3342 |
+#if !defined PRIXMAX |
3343 |
+# if 1 |
3344 |
+# define PRIXMAX PRIX64 |
3345 |
+# else |
3346 |
+# define PRIXMAX "lX" |
3347 |
+# endif |
3348 |
+#endif |
3349 |
+ |
3350 |
+#if !defined PRIdPTR |
3351 |
+# ifdef INTPTR_MAX |
3352 |
+# define PRIdPTR "l" "d" |
3353 |
+# endif |
3354 |
+#endif |
3355 |
+#if !defined PRIiPTR |
3356 |
+# ifdef INTPTR_MAX |
3357 |
+# define PRIiPTR "l" "i" |
3358 |
+# endif |
3359 |
+#endif |
3360 |
+#if !defined PRIoPTR |
3361 |
+# ifdef UINTPTR_MAX |
3362 |
+# define PRIoPTR "l" "o" |
3363 |
+# endif |
3364 |
+#endif |
3365 |
+#if !defined PRIuPTR |
3366 |
+# ifdef UINTPTR_MAX |
3367 |
+# define PRIuPTR "l" "u" |
3368 |
+# endif |
3369 |
+#endif |
3370 |
+#if !defined PRIxPTR |
3371 |
+# ifdef UINTPTR_MAX |
3372 |
+# define PRIxPTR "l" "x" |
3373 |
+# endif |
3374 |
+#endif |
3375 |
+#if !defined PRIXPTR |
3376 |
+# ifdef UINTPTR_MAX |
3377 |
+# define PRIXPTR "l" "X" |
3378 |
+# endif |
3379 |
+#endif |
3380 |
+ |
3381 |
+#if !defined SCNd8 |
3382 |
+# ifdef INT8_MAX |
3383 |
+# define SCNd8 "hhd" |
3384 |
+# endif |
3385 |
+#endif |
3386 |
+#if !defined SCNi8 |
3387 |
+# ifdef INT8_MAX |
3388 |
+# define SCNi8 "hhi" |
3389 |
+# endif |
3390 |
+#endif |
3391 |
+#if !defined SCNo8 |
3392 |
+# ifdef UINT8_MAX |
3393 |
+# define SCNo8 "hho" |
3394 |
+# endif |
3395 |
+#endif |
3396 |
+#if !defined SCNu8 |
3397 |
+# ifdef UINT8_MAX |
3398 |
+# define SCNu8 "hhu" |
3399 |
+# endif |
3400 |
+#endif |
3401 |
+#if !defined SCNx8 |
3402 |
+# ifdef UINT8_MAX |
3403 |
+# define SCNx8 "hhx" |
3404 |
+# endif |
3405 |
+#endif |
3406 |
+#if !defined SCNd16 |
3407 |
+# ifdef INT16_MAX |
3408 |
+# define SCNd16 "hd" |
3409 |
+# endif |
3410 |
+#endif |
3411 |
+#if !defined SCNi16 |
3412 |
+# ifdef INT16_MAX |
3413 |
+# define SCNi16 "hi" |
3414 |
+# endif |
3415 |
+#endif |
3416 |
+#if !defined SCNo16 |
3417 |
+# ifdef UINT16_MAX |
3418 |
+# define SCNo16 "ho" |
3419 |
+# endif |
3420 |
+#endif |
3421 |
+#if !defined SCNu16 |
3422 |
+# ifdef UINT16_MAX |
3423 |
+# define SCNu16 "hu" |
3424 |
+# endif |
3425 |
+#endif |
3426 |
+#if !defined SCNx16 |
3427 |
+# ifdef UINT16_MAX |
3428 |
+# define SCNx16 "hx" |
3429 |
+# endif |
3430 |
+#endif |
3431 |
+#if !defined SCNd32 |
3432 |
+# ifdef INT32_MAX |
3433 |
+# define SCNd32 "d" |
3434 |
+# endif |
3435 |
+#endif |
3436 |
+#if !defined SCNi32 |
3437 |
+# ifdef INT32_MAX |
3438 |
+# define SCNi32 "i" |
3439 |
+# endif |
3440 |
+#endif |
3441 |
+#if !defined SCNo32 |
3442 |
+# ifdef UINT32_MAX |
3443 |
+# define SCNo32 "o" |
3444 |
+# endif |
3445 |
+#endif |
3446 |
+#if !defined SCNu32 |
3447 |
+# ifdef UINT32_MAX |
3448 |
+# define SCNu32 "u" |
3449 |
+# endif |
3450 |
+#endif |
3451 |
+#if !defined SCNx32 |
3452 |
+# ifdef UINT32_MAX |
3453 |
+# define SCNx32 "x" |
3454 |
+# endif |
3455 |
+#endif |
3456 |
+#ifdef INT64_MAX |
3457 |
+# if (0 ? defined _LP64 : 1) |
3458 |
+# define _SCN64_PREFIX "l" |
3459 |
+# elif defined _MSC_VER || defined __MINGW32__ |
3460 |
+# define _SCN64_PREFIX "I64" |
3461 |
+# elif LONG_MAX >> 30 == 1 |
3462 |
+# define _SCN64_PREFIX _LONG_LONG_FORMAT_PREFIX |
3463 |
+# endif |
3464 |
+# if !defined SCNd64 |
3465 |
+# define SCNd64 _SCN64_PREFIX "d" |
3466 |
+# endif |
3467 |
+# if !defined SCNi64 |
3468 |
+# define SCNi64 _SCN64_PREFIX "i" |
3469 |
+# endif |
3470 |
+#endif |
3471 |
+#ifdef UINT64_MAX |
3472 |
+# if (0 ? defined _LP64 : 1) |
3473 |
+# define _SCNu64_PREFIX "l" |
3474 |
+# elif defined _MSC_VER || defined __MINGW32__ |
3475 |
+# define _SCNu64_PREFIX "I64" |
3476 |
+# elif ULONG_MAX >> 31 == 1 |
3477 |
+# define _SCNu64_PREFIX _LONG_LONG_FORMAT_PREFIX |
3478 |
+# endif |
3479 |
+# if !defined SCNo64 |
3480 |
+# define SCNo64 _SCNu64_PREFIX "o" |
3481 |
+# endif |
3482 |
+# if !defined SCNu64 |
3483 |
+# define SCNu64 _SCNu64_PREFIX "u" |
3484 |
+# endif |
3485 |
+# if !defined SCNx64 |
3486 |
+# define SCNx64 _SCNu64_PREFIX "x" |
3487 |
+# endif |
3488 |
+#endif |
3489 |
+ |
3490 |
+#if !defined SCNdLEAST8 |
3491 |
+# define SCNdLEAST8 "hhd" |
3492 |
+#endif |
3493 |
+#if !defined SCNiLEAST8 |
3494 |
+# define SCNiLEAST8 "hhi" |
3495 |
+#endif |
3496 |
+#if !defined SCNoLEAST8 |
3497 |
+# define SCNoLEAST8 "hho" |
3498 |
+#endif |
3499 |
+#if !defined SCNuLEAST8 |
3500 |
+# define SCNuLEAST8 "hhu" |
3501 |
+#endif |
3502 |
+#if !defined SCNxLEAST8 |
3503 |
+# define SCNxLEAST8 "hhx" |
3504 |
+#endif |
3505 |
+#if !defined SCNdLEAST16 |
3506 |
+# define SCNdLEAST16 "hd" |
3507 |
+#endif |
3508 |
+#if !defined SCNiLEAST16 |
3509 |
+# define SCNiLEAST16 "hi" |
3510 |
+#endif |
3511 |
+#if !defined SCNoLEAST16 |
3512 |
+# define SCNoLEAST16 "ho" |
3513 |
+#endif |
3514 |
+#if !defined SCNuLEAST16 |
3515 |
+# define SCNuLEAST16 "hu" |
3516 |
+#endif |
3517 |
+#if !defined SCNxLEAST16 |
3518 |
+# define SCNxLEAST16 "hx" |
3519 |
+#endif |
3520 |
+#if !defined SCNdLEAST32 |
3521 |
+# define SCNdLEAST32 "d" |
3522 |
+#endif |
3523 |
+#if !defined SCNiLEAST32 |
3524 |
+# define SCNiLEAST32 "i" |
3525 |
+#endif |
3526 |
+#if !defined SCNoLEAST32 |
3527 |
+# define SCNoLEAST32 "o" |
3528 |
+#endif |
3529 |
+#if !defined SCNuLEAST32 |
3530 |
+# define SCNuLEAST32 "u" |
3531 |
+#endif |
3532 |
+#if !defined SCNxLEAST32 |
3533 |
+# define SCNxLEAST32 "x" |
3534 |
+#endif |
3535 |
+#ifdef INT64_MAX |
3536 |
+# if !defined SCNdLEAST64 |
3537 |
+# define SCNdLEAST64 SCNd64 |
3538 |
+# endif |
3539 |
+# if !defined SCNiLEAST64 |
3540 |
+# define SCNiLEAST64 SCNi64 |
3541 |
+# endif |
3542 |
+#endif |
3543 |
+#ifdef UINT64_MAX |
3544 |
+# if !defined SCNoLEAST64 |
3545 |
+# define SCNoLEAST64 SCNo64 |
3546 |
+# endif |
3547 |
+# if !defined SCNuLEAST64 |
3548 |
+# define SCNuLEAST64 SCNu64 |
3549 |
+# endif |
3550 |
+# if !defined SCNxLEAST64 |
3551 |
+# define SCNxLEAST64 SCNx64 |
3552 |
+# endif |
3553 |
+#endif |
3554 |
+ |
3555 |
+#if !defined SCNdFAST8 |
3556 |
+# if INT_FAST8_MAX > INT32_MAX |
3557 |
+# define SCNdFAST8 SCNd64 |
3558 |
+# elif INT_FAST8_MAX == 0x7fff |
3559 |
+# define SCNdFAST8 "hd" |
3560 |
+# elif INT_FAST8_MAX == 0x7f |
3561 |
+# define SCNdFAST8 "hhd" |
3562 |
+# else |
3563 |
+# define SCNdFAST8 "d" |
3564 |
+# endif |
3565 |
+#endif |
3566 |
+#if !defined SCNiFAST8 |
3567 |
+# if INT_FAST8_MAX > INT32_MAX |
3568 |
+# define SCNiFAST8 SCNi64 |
3569 |
+# elif INT_FAST8_MAX == 0x7fff |
3570 |
+# define SCNiFAST8 "hi" |
3571 |
+# elif INT_FAST8_MAX == 0x7f |
3572 |
+# define SCNiFAST8 "hhi" |
3573 |
+# else |
3574 |
+# define SCNiFAST8 "i" |
3575 |
+# endif |
3576 |
+#endif |
3577 |
+#if !defined SCNoFAST8 |
3578 |
+# if UINT_FAST8_MAX > UINT32_MAX |
3579 |
+# define SCNoFAST8 SCNo64 |
3580 |
+# elif UINT_FAST8_MAX == 0xffff |
3581 |
+# define SCNoFAST8 "ho" |
3582 |
+# elif UINT_FAST8_MAX == 0xff |
3583 |
+# define SCNoFAST8 "hho" |
3584 |
+# else |
3585 |
+# define SCNoFAST8 "o" |
3586 |
+# endif |
3587 |
+#endif |
3588 |
+#if !defined SCNuFAST8 |
3589 |
+# if UINT_FAST8_MAX > UINT32_MAX |
3590 |
+# define SCNuFAST8 SCNu64 |
3591 |
+# elif UINT_FAST8_MAX == 0xffff |
3592 |
+# define SCNuFAST8 "hu" |
3593 |
+# elif UINT_FAST8_MAX == 0xff |
3594 |
+# define SCNuFAST8 "hhu" |
3595 |
+# else |
3596 |
+# define SCNuFAST8 "u" |
3597 |
+# endif |
3598 |
+#endif |
3599 |
+#if !defined SCNxFAST8 |
3600 |
+# if UINT_FAST8_MAX > UINT32_MAX |
3601 |
+# define SCNxFAST8 SCNx64 |
3602 |
+# elif UINT_FAST8_MAX == 0xffff |
3603 |
+# define SCNxFAST8 "hx" |
3604 |
+# elif UINT_FAST8_MAX == 0xff |
3605 |
+# define SCNxFAST8 "hhx" |
3606 |
+# else |
3607 |
+# define SCNxFAST8 "x" |
3608 |
+# endif |
3609 |
+#endif |
3610 |
+#if !defined SCNdFAST16 |
3611 |
+# if INT_FAST16_MAX > INT32_MAX |
3612 |
+# define SCNdFAST16 SCNd64 |
3613 |
+# elif INT_FAST16_MAX == 0x7fff |
3614 |
+# define SCNdFAST16 "hd" |
3615 |
+# else |
3616 |
+# define SCNdFAST16 "d" |
3617 |
+# endif |
3618 |
+#endif |
3619 |
+#if !defined SCNiFAST16 |
3620 |
+# if INT_FAST16_MAX > INT32_MAX |
3621 |
+# define SCNiFAST16 SCNi64 |
3622 |
+# elif INT_FAST16_MAX == 0x7fff |
3623 |
+# define SCNiFAST16 "hi" |
3624 |
+# else |
3625 |
+# define SCNiFAST16 "i" |
3626 |
+# endif |
3627 |
+#endif |
3628 |
+#if !defined SCNoFAST16 |
3629 |
+# if UINT_FAST16_MAX > UINT32_MAX |
3630 |
+# define SCNoFAST16 SCNo64 |
3631 |
+# elif UINT_FAST16_MAX == 0xffff |
3632 |
+# define SCNoFAST16 "ho" |
3633 |
+# else |
3634 |
+# define SCNoFAST16 "o" |
3635 |
+# endif |
3636 |
+#endif |
3637 |
+#if !defined SCNuFAST16 |
3638 |
+# if UINT_FAST16_MAX > UINT32_MAX |
3639 |
+# define SCNuFAST16 SCNu64 |
3640 |
+# elif UINT_FAST16_MAX == 0xffff |
3641 |
+# define SCNuFAST16 "hu" |
3642 |
+# else |
3643 |
+# define SCNuFAST16 "u" |
3644 |
+# endif |
3645 |
+#endif |
3646 |
+#if !defined SCNxFAST16 |
3647 |
+# if UINT_FAST16_MAX > UINT32_MAX |
3648 |
+# define SCNxFAST16 SCNx64 |
3649 |
+# elif UINT_FAST16_MAX == 0xffff |
3650 |
+# define SCNxFAST16 "hx" |
3651 |
+# else |
3652 |
+# define SCNxFAST16 "x" |
3653 |
+# endif |
3654 |
+#endif |
3655 |
+#if !defined SCNdFAST32 |
3656 |
+# if INT_FAST32_MAX > INT32_MAX |
3657 |
+# define SCNdFAST32 SCNd64 |
3658 |
+# else |
3659 |
+# define SCNdFAST32 "d" |
3660 |
+# endif |
3661 |
+#endif |
3662 |
+#if !defined SCNiFAST32 |
3663 |
+# if INT_FAST32_MAX > INT32_MAX |
3664 |
+# define SCNiFAST32 SCNi64 |
3665 |
+# else |
3666 |
+# define SCNiFAST32 "i" |
3667 |
+# endif |
3668 |
+#endif |
3669 |
+#if !defined SCNoFAST32 |
3670 |
+# if UINT_FAST32_MAX > UINT32_MAX |
3671 |
+# define SCNoFAST32 SCNo64 |
3672 |
+# else |
3673 |
+# define SCNoFAST32 "o" |
3674 |
+# endif |
3675 |
+#endif |
3676 |
+#if !defined SCNuFAST32 |
3677 |
+# if UINT_FAST32_MAX > UINT32_MAX |
3678 |
+# define SCNuFAST32 SCNu64 |
3679 |
+# else |
3680 |
+# define SCNuFAST32 "u" |
3681 |
+# endif |
3682 |
+#endif |
3683 |
+#if !defined SCNxFAST32 |
3684 |
+# if UINT_FAST32_MAX > UINT32_MAX |
3685 |
+# define SCNxFAST32 SCNx64 |
3686 |
+# else |
3687 |
+# define SCNxFAST32 "x" |
3688 |
+# endif |
3689 |
+#endif |
3690 |
+#ifdef INT64_MAX |
3691 |
+# if !defined SCNdFAST64 |
3692 |
+# define SCNdFAST64 SCNd64 |
3693 |
+# endif |
3694 |
+# if !defined SCNiFAST64 |
3695 |
+# define SCNiFAST64 SCNi64 |
3696 |
+# endif |
3697 |
+#endif |
3698 |
+#ifdef UINT64_MAX |
3699 |
+# if !defined SCNoFAST64 |
3700 |
+# define SCNoFAST64 SCNo64 |
3701 |
+# endif |
3702 |
+# if !defined SCNuFAST64 |
3703 |
+# define SCNuFAST64 SCNu64 |
3704 |
+# endif |
3705 |
+# if !defined SCNxFAST64 |
3706 |
+# define SCNxFAST64 SCNx64 |
3707 |
+# endif |
3708 |
+#endif |
3709 |
+ |
3710 |
+#if !defined SCNdMAX |
3711 |
+# if 1 |
3712 |
+# define SCNdMAX SCNd64 |
3713 |
+# else |
3714 |
+# define SCNdMAX "ld" |
3715 |
+# endif |
3716 |
+#endif |
3717 |
+#if !defined SCNiMAX |
3718 |
+# if 1 |
3719 |
+# define SCNiMAX SCNi64 |
3720 |
+# else |
3721 |
+# define SCNiMAX "li" |
3722 |
+# endif |
3723 |
+#endif |
3724 |
+#if !defined SCNoMAX |
3725 |
+# if 1 |
3726 |
+# define SCNoMAX SCNo64 |
3727 |
+# else |
3728 |
+# define SCNoMAX "lo" |
3729 |
+# endif |
3730 |
+#endif |
3731 |
+#if !defined SCNuMAX |
3732 |
+# if 1 |
3733 |
+# define SCNuMAX SCNu64 |
3734 |
+# else |
3735 |
+# define SCNuMAX "lu" |
3736 |
+# endif |
3737 |
+#endif |
3738 |
+#if !defined SCNxMAX |
3739 |
+# if 1 |
3740 |
+# define SCNxMAX SCNx64 |
3741 |
+# else |
3742 |
+# define SCNxMAX "lx" |
3743 |
+# endif |
3744 |
+#endif |
3745 |
+ |
3746 |
+#if !defined SCNdPTR |
3747 |
+# ifdef INTPTR_MAX |
3748 |
+# define SCNdPTR "l" "d" |
3749 |
+# endif |
3750 |
+#endif |
3751 |
+#if !defined SCNiPTR |
3752 |
+# ifdef INTPTR_MAX |
3753 |
+# define SCNiPTR "l" "i" |
3754 |
+# endif |
3755 |
+#endif |
3756 |
+#if !defined SCNoPTR |
3757 |
+# ifdef UINTPTR_MAX |
3758 |
+# define SCNoPTR "l" "o" |
3759 |
+# endif |
3760 |
+#endif |
3761 |
+#if !defined SCNuPTR |
3762 |
+# ifdef UINTPTR_MAX |
3763 |
+# define SCNuPTR "l" "u" |
3764 |
+# endif |
3765 |
+#endif |
3766 |
+#if !defined SCNxPTR |
3767 |
+# ifdef UINTPTR_MAX |
3768 |
+# define SCNxPTR "l" "x" |
3769 |
+# endif |
3770 |
+#endif |
3771 |
+ |
3772 |
+/* 7.8.2 Functions for greatest-width integer types */ |
3773 |
+ |
3774 |
+#ifdef __cplusplus |
3775 |
+extern "C" { |
3776 |
+#endif |
3777 |
+ |
3778 |
+#if 0 |
3779 |
+# if !1 |
3780 |
+extern intmax_t imaxabs (intmax_t); |
3781 |
+# endif |
3782 |
+#elif defined GNULIB_POSIXCHECK |
3783 |
+# undef imaxabs |
3784 |
+# if HAVE_RAW_DECL_IMAXABS |
3785 |
+_GL_WARN_ON_USE (imaxabs, "imaxabs is unportable - " |
3786 |
+ "use gnulib module imaxabs for portability"); |
3787 |
+# endif |
3788 |
+#endif |
3789 |
+ |
3790 |
+#if 0 |
3791 |
+# if !1 |
3792 |
+# if !GNULIB_defined_imaxdiv_t |
3793 |
+typedef struct { intmax_t quot; intmax_t rem; } imaxdiv_t; |
3794 |
+# define GNULIB_defined_imaxdiv_t 1 |
3795 |
+# endif |
3796 |
+# endif |
3797 |
+# if !1 |
3798 |
+extern imaxdiv_t imaxdiv (intmax_t, intmax_t); |
3799 |
+# endif |
3800 |
+#elif defined GNULIB_POSIXCHECK |
3801 |
+# undef imaxdiv |
3802 |
+# if HAVE_RAW_DECL_IMAXDIV |
3803 |
+_GL_WARN_ON_USE (imaxdiv, "imaxdiv is unportable - " |
3804 |
+ "use gnulib module imaxdiv for portability"); |
3805 |
+# endif |
3806 |
+#endif |
3807 |
+ |
3808 |
+#if 0 |
3809 |
+# if 0 |
3810 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
3811 |
+# undef strtoimax |
3812 |
+# define strtoimax rpl_strtoimax |
3813 |
+# endif |
3814 |
+_GL_FUNCDECL_RPL (strtoimax, intmax_t, |
3815 |
+ (const char *restrict, char **restrict, int) |
3816 |
+ _GL_ARG_NONNULL ((1))); |
3817 |
+_GL_CXXALIAS_RPL (strtoimax, intmax_t, |
3818 |
+ (const char *restrict, char **restrict, int)); |
3819 |
+# else |
3820 |
+# if !1 |
3821 |
+# undef strtoimax |
3822 |
+_GL_FUNCDECL_SYS (strtoimax, intmax_t, |
3823 |
+ (const char *restrict, char **restrict, int) |
3824 |
+ _GL_ARG_NONNULL ((1))); |
3825 |
+# endif |
3826 |
+_GL_CXXALIAS_SYS (strtoimax, intmax_t, |
3827 |
+ (const char *restrict, char **restrict, int)); |
3828 |
+# endif |
3829 |
+_GL_CXXALIASWARN (strtoimax); |
3830 |
+#elif defined GNULIB_POSIXCHECK |
3831 |
+# undef strtoimax |
3832 |
+# if HAVE_RAW_DECL_STRTOIMAX |
3833 |
+_GL_WARN_ON_USE (strtoimax, "strtoimax is unportable - " |
3834 |
+ "use gnulib module strtoimax for portability"); |
3835 |
+# endif |
3836 |
+#endif |
3837 |
+ |
3838 |
+#if 0 |
3839 |
+# if 0 |
3840 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
3841 |
+# undef strtoumax |
3842 |
+# define strtoumax rpl_strtoumax |
3843 |
+# endif |
3844 |
+_GL_FUNCDECL_RPL (strtoumax, uintmax_t, |
3845 |
+ (const char *restrict, char **restrict, int) |
3846 |
+ _GL_ARG_NONNULL ((1))); |
3847 |
+_GL_CXXALIAS_RPL (strtoumax, uintmax_t, |
3848 |
+ (const char *restrict, char **restrict, int)); |
3849 |
+# else |
3850 |
+# if !1 |
3851 |
+# undef strtoumax |
3852 |
+_GL_FUNCDECL_SYS (strtoumax, uintmax_t, |
3853 |
+ (const char *restrict, char **restrict, int) |
3854 |
+ _GL_ARG_NONNULL ((1))); |
3855 |
+# endif |
3856 |
+_GL_CXXALIAS_SYS (strtoumax, uintmax_t, |
3857 |
+ (const char *restrict, char **restrict, int)); |
3858 |
+# endif |
3859 |
+_GL_CXXALIASWARN (strtoumax); |
3860 |
+#elif defined GNULIB_POSIXCHECK |
3861 |
+# undef strtoumax |
3862 |
+# if HAVE_RAW_DECL_STRTOUMAX |
3863 |
+_GL_WARN_ON_USE (strtoumax, "strtoumax is unportable - " |
3864 |
+ "use gnulib module strtoumax for portability"); |
3865 |
+# endif |
3866 |
+#endif |
3867 |
+ |
3868 |
+/* Don't bother defining or declaring wcstoimax and wcstoumax, since |
3869 |
+ wide-character functions like this are hardly ever useful. */ |
3870 |
+ |
3871 |
+#ifdef __cplusplus |
3872 |
+} |
3873 |
+#endif |
3874 |
+ |
3875 |
+#endif /* !defined INTTYPES_H && !defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H */ |
3876 |
|
3877 |
diff --git a/autotools/gnulib/libc-config.h b/autotools/gnulib/libc-config.h |
3878 |
index 8fec489..a56665b 100644 |
3879 |
--- a/autotools/gnulib/libc-config.h |
3880 |
+++ b/autotools/gnulib/libc-config.h |
3881 |
@@ -121,6 +121,7 @@ |
3882 |
# undef __attr_dealloc |
3883 |
# undef __attr_dealloc_free |
3884 |
# undef __attribute__ |
3885 |
+# undef __attribute_alloc_align__ |
3886 |
# undef __attribute_alloc_size__ |
3887 |
# undef __attribute_artificial__ |
3888 |
# undef __attribute_const__ |
3889 |
@@ -129,6 +130,7 @@ |
3890 |
# undef __attribute_format_arg__ |
3891 |
# undef __attribute_format_strfmon__ |
3892 |
# undef __attribute_malloc__ |
3893 |
+# undef __attribute_maybe_unused__ |
3894 |
# undef __attribute_noinline__ |
3895 |
# undef __attribute_nonstring__ |
3896 |
# undef __attribute_pure__ |
3897 |
@@ -142,16 +144,24 @@ |
3898 |
# undef __extern_always_inline |
3899 |
# undef __extern_inline |
3900 |
# undef __flexarr |
3901 |
+# undef __fortified_attr_access |
3902 |
# undef __fortify_function |
3903 |
# undef __glibc_c99_flexarr_available |
3904 |
+# undef __glibc_fortify |
3905 |
+# undef __glibc_fortify_n |
3906 |
# undef __glibc_has_attribute |
3907 |
# undef __glibc_has_builtin |
3908 |
# undef __glibc_has_extension |
3909 |
+# undef __glibc_likely |
3910 |
# undef __glibc_macro_warning |
3911 |
# undef __glibc_macro_warning1 |
3912 |
# undef __glibc_objsize |
3913 |
# undef __glibc_objsize0 |
3914 |
+# undef __glibc_safe_len_cond |
3915 |
+# undef __glibc_safe_or_unknown_len |
3916 |
# undef __glibc_unlikely |
3917 |
+# undef __glibc_unsafe_len |
3918 |
+# undef __glibc_unsigned_or_positive |
3919 |
# undef __inline |
3920 |
# undef __ptr_t |
3921 |
# undef __restrict |
3922 |
@@ -159,6 +169,7 @@ |
3923 |
# undef __va_arg_pack |
3924 |
# undef __va_arg_pack_len |
3925 |
# undef __warnattr |
3926 |
+# undef __wur |
3927 |
|
3928 |
/* Include our copy of glibc <sys/cdefs.h>. */ |
3929 |
# include <cdefs.h> |
3930 |
|
3931 |
diff --git a/autotools/gnulib/limits.h b/autotools/gnulib/limits.h |
3932 |
new file mode 100644 |
3933 |
index 0000000..4f37f3c |
3934 |
--- /dev/null |
3935 |
+++ b/autotools/gnulib/limits.h |
3936 |
@@ -0,0 +1,132 @@ |
3937 |
+/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ |
3938 |
+/* A GNU-like <limits.h>. |
3939 |
+ |
3940 |
+ Copyright 2016-2022 Free Software Foundation, Inc. |
3941 |
+ |
3942 |
+ This file is free software: you can redistribute it and/or modify |
3943 |
+ it under the terms of the GNU Lesser General Public License as |
3944 |
+ published by the Free Software Foundation; either version 2.1 of the |
3945 |
+ License, or (at your option) any later version. |
3946 |
+ |
3947 |
+ This file is distributed in the hope that it will be useful, |
3948 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
3949 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3950 |
+ GNU Lesser General Public License for more details. |
3951 |
+ |
3952 |
+ You should have received a copy of the GNU Lesser General Public License |
3953 |
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
3954 |
+ |
3955 |
+#if __GNUC__ >= 3 |
3956 |
+#pragma GCC system_header |
3957 |
+#endif |
3958 |
+ |
3959 |
+ |
3960 |
+#if defined _GL_ALREADY_INCLUDING_LIMITS_H |
3961 |
+/* Special invocation convention: |
3962 |
+ On Haiku/x86_64, we have a sequence of nested includes |
3963 |
+ <limits.h> -> <syslimits.h> -> <limits.h>. |
3964 |
+ In this situation, LONG_MAX and INT_MAX are not yet defined, |
3965 |
+ therefore we should not attempt to define LONG_BIT. */ |
3966 |
+ |
3967 |
+#include_next <limits.h> |
3968 |
+ |
3969 |
+#else |
3970 |
+/* Normal invocation convention. */ |
3971 |
+ |
3972 |
+#ifndef _GL_LIMITS_H |
3973 |
+ |
3974 |
+# define _GL_ALREADY_INCLUDING_LIMITS_H |
3975 |
+ |
3976 |
+/* The include_next requires a split double-inclusion guard. */ |
3977 |
+# include_next <limits.h> |
3978 |
+ |
3979 |
+# undef _GL_ALREADY_INCLUDING_LIMITS_H |
3980 |
+ |
3981 |
+#ifndef _GL_LIMITS_H |
3982 |
+#define _GL_LIMITS_H |
3983 |
+ |
3984 |
+#ifndef LLONG_MIN |
3985 |
+# if defined LONG_LONG_MIN /* HP-UX 11.31 */ |
3986 |
+# define LLONG_MIN LONG_LONG_MIN |
3987 |
+# elif defined LONGLONG_MIN /* IRIX 6.5 */ |
3988 |
+# define LLONG_MIN LONGLONG_MIN |
3989 |
+# elif defined __GNUC__ |
3990 |
+# define LLONG_MIN (- __LONG_LONG_MAX__ - 1LL) |
3991 |
+# endif |
3992 |
+#endif |
3993 |
+#ifndef LLONG_MAX |
3994 |
+# if defined LONG_LONG_MAX /* HP-UX 11.31 */ |
3995 |
+# define LLONG_MAX LONG_LONG_MAX |
3996 |
+# elif defined LONGLONG_MAX /* IRIX 6.5 */ |
3997 |
+# define LLONG_MAX LONGLONG_MAX |
3998 |
+# elif defined __GNUC__ |
3999 |
+# define LLONG_MAX __LONG_LONG_MAX__ |
4000 |
+# endif |
4001 |
+#endif |
4002 |
+#ifndef ULLONG_MAX |
4003 |
+# if defined ULONG_LONG_MAX /* HP-UX 11.31 */ |
4004 |
+# define ULLONG_MAX ULONG_LONG_MAX |
4005 |
+# elif defined ULONGLONG_MAX /* IRIX 6.5 */ |
4006 |
+# define ULLONG_MAX ULONGLONG_MAX |
4007 |
+# elif defined __GNUC__ |
4008 |
+# define ULLONG_MAX (__LONG_LONG_MAX__ * 2ULL + 1ULL) |
4009 |
+# endif |
4010 |
+#endif |
4011 |
+ |
4012 |
+/* The number of usable bits in an unsigned or signed integer type |
4013 |
+ with minimum value MIN and maximum value MAX, as an int expression |
4014 |
+ suitable in #if. Cover all known practical hosts. This |
4015 |
+ implementation exploits the fact that MAX is 1 less than a power of |
4016 |
+ 2, and merely counts the number of 1 bits in MAX; "COBn" means |
4017 |
+ "count the number of 1 bits in the low-order n bits"). */ |
4018 |
+#define _GL_INTEGER_WIDTH(min, max) (((min) < 0) + _GL_COB128 (max)) |
4019 |
+#define _GL_COB128(n) (_GL_COB64 ((n) >> 31 >> 31 >> 2) + _GL_COB64 (n)) |
4020 |
+#define _GL_COB64(n) (_GL_COB32 ((n) >> 31 >> 1) + _GL_COB32 (n)) |
4021 |
+#define _GL_COB32(n) (_GL_COB16 ((n) >> 16) + _GL_COB16 (n)) |
4022 |
+#define _GL_COB16(n) (_GL_COB8 ((n) >> 8) + _GL_COB8 (n)) |
4023 |
+#define _GL_COB8(n) (_GL_COB4 ((n) >> 4) + _GL_COB4 (n)) |
4024 |
+#define _GL_COB4(n) (!!((n) & 8) + !!((n) & 4) + !!((n) & 2) + !!((n) & 1)) |
4025 |
+ |
4026 |
+#ifndef WORD_BIT |
4027 |
+/* Assume 'int' is 32 bits wide. */ |
4028 |
+# define WORD_BIT 32 |
4029 |
+#endif |
4030 |
+#ifndef LONG_BIT |
4031 |
+/* Assume 'long' is 32 or 64 bits wide. */ |
4032 |
+# if LONG_MAX == INT_MAX |
4033 |
+# define LONG_BIT 32 |
4034 |
+# else |
4035 |
+# define LONG_BIT 64 |
4036 |
+# endif |
4037 |
+#endif |
4038 |
+ |
4039 |
+/* Macros specified by C2x and by ISO/IEC TS 18661-1:2014. */ |
4040 |
+ |
4041 |
+#if (! defined ULLONG_WIDTH \ |
4042 |
+ && (defined _GNU_SOURCE || defined __STDC_WANT_IEC_60559_BFP_EXT__ \ |
4043 |
+ || (defined __STDC_VERSION__ && 201710 < __STDC_VERSION__))) |
4044 |
+# define CHAR_WIDTH _GL_INTEGER_WIDTH (CHAR_MIN, CHAR_MAX) |
4045 |
+# define SCHAR_WIDTH _GL_INTEGER_WIDTH (SCHAR_MIN, SCHAR_MAX) |
4046 |
+# define UCHAR_WIDTH _GL_INTEGER_WIDTH (0, UCHAR_MAX) |
4047 |
+# define SHRT_WIDTH _GL_INTEGER_WIDTH (SHRT_MIN, SHRT_MAX) |
4048 |
+# define USHRT_WIDTH _GL_INTEGER_WIDTH (0, USHRT_MAX) |
4049 |
+# define INT_WIDTH _GL_INTEGER_WIDTH (INT_MIN, INT_MAX) |
4050 |
+# define UINT_WIDTH _GL_INTEGER_WIDTH (0, UINT_MAX) |
4051 |
+# define LONG_WIDTH _GL_INTEGER_WIDTH (LONG_MIN, LONG_MAX) |
4052 |
+# define ULONG_WIDTH _GL_INTEGER_WIDTH (0, ULONG_MAX) |
4053 |
+# define LLONG_WIDTH _GL_INTEGER_WIDTH (LLONG_MIN, LLONG_MAX) |
4054 |
+# define ULLONG_WIDTH _GL_INTEGER_WIDTH (0, ULLONG_MAX) |
4055 |
+#endif |
4056 |
+ |
4057 |
+/* Macros specified by C2x. */ |
4058 |
+ |
4059 |
+#if (! defined BOOL_WIDTH \ |
4060 |
+ && (defined _GNU_SOURCE \ |
4061 |
+ || (defined __STDC_VERSION__ && 201710 < __STDC_VERSION__))) |
4062 |
+# define BOOL_MAX 1 |
4063 |
+# define BOOL_WIDTH 1 |
4064 |
+#endif |
4065 |
+ |
4066 |
+#endif /* _GL_LIMITS_H */ |
4067 |
+#endif /* _GL_LIMITS_H */ |
4068 |
+#endif |
4069 |
|
4070 |
diff --git a/autotools/gnulib/malloc/.dirstamp b/autotools/gnulib/malloc/.dirstamp |
4071 |
new file mode 100644 |
4072 |
index 0000000..e69de29 |
4073 |
|
4074 |
diff --git a/autotools/gnulib/malloc/scratch_buffer.gl.h b/autotools/gnulib/malloc/scratch_buffer.gl.h |
4075 |
new file mode 100644 |
4076 |
index 0000000..3de567c |
4077 |
--- /dev/null |
4078 |
+++ b/autotools/gnulib/malloc/scratch_buffer.gl.h |
4079 |
@@ -0,0 +1,148 @@ |
4080 |
+/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ |
4081 |
+/* Variable-sized buffer with on-stack default allocation. |
4082 |
+ Copyright (C) 2015-2022 Free Software Foundation, Inc. |
4083 |
+ This file is part of the GNU C Library. |
4084 |
+ |
4085 |
+ The GNU C Library is free software; you can redistribute it and/or |
4086 |
+ modify it under the terms of the GNU Lesser General Public |
4087 |
+ License as published by the Free Software Foundation; either |
4088 |
+ version 2.1 of the License, or (at your option) any later version. |
4089 |
+ |
4090 |
+ The GNU C Library is distributed in the hope that it will be useful, |
4091 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
4092 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
4093 |
+ Lesser General Public License for more details. |
4094 |
+ |
4095 |
+ You should have received a copy of the GNU Lesser General Public |
4096 |
+ License along with the GNU C Library; if not, see |
4097 |
+ <https://www.gnu.org/licenses/>. */ |
4098 |
+ |
4099 |
+#ifndef _SCRATCH_BUFFER_H |
4100 |
+#define _SCRATCH_BUFFER_H |
4101 |
+ |
4102 |
+/* Scratch buffers with a default stack allocation and fallback to |
4103 |
+ heap allocation. It is expected that this function is used in this |
4104 |
+ way: |
4105 |
+ |
4106 |
+ struct scratch_buffer tmpbuf; |
4107 |
+ scratch_buffer_init (&tmpbuf); |
4108 |
+ |
4109 |
+ while (!function_that_uses_buffer (tmpbuf.data, tmpbuf.length)) |
4110 |
+ if (!scratch_buffer_grow (&tmpbuf)) |
4111 |
+ return -1; |
4112 |
+ |
4113 |
+ scratch_buffer_free (&tmpbuf); |
4114 |
+ return 0; |
4115 |
+ |
4116 |
+ The allocation functions (scratch_buffer_grow, |
4117 |
+ scratch_buffer_grow_preserve, scratch_buffer_set_array_size) make |
4118 |
+ sure that the heap allocation, if any, is freed, so that the code |
4119 |
+ above does not have a memory leak. The buffer still remains in a |
4120 |
+ state that can be deallocated using scratch_buffer_free, so a loop |
4121 |
+ like this is valid as well: |
4122 |
+ |
4123 |
+ struct scratch_buffer tmpbuf; |
4124 |
+ scratch_buffer_init (&tmpbuf); |
4125 |
+ |
4126 |
+ while (!function_that_uses_buffer (tmpbuf.data, tmpbuf.length)) |
4127 |
+ if (!scratch_buffer_grow (&tmpbuf)) |
4128 |
+ break; |
4129 |
+ |
4130 |
+ scratch_buffer_free (&tmpbuf); |
4131 |
+ |
4132 |
+ scratch_buffer_grow and scratch_buffer_grow_preserve are guaranteed |
4133 |
+ to grow the buffer by at least 512 bytes. This means that when |
4134 |
+ using the scratch buffer as a backing store for a non-character |
4135 |
+ array whose element size, in bytes, is 512 or smaller, the scratch |
4136 |
+ buffer only has to grow once to make room for at least one more |
4137 |
+ element. |
4138 |
+*/ |
4139 |
+ |
4140 |
+#include <stdbool.h> |
4141 |
+#include <stddef.h> |
4142 |
+#include <stdlib.h> |
4143 |
+ |
4144 |
+/* Scratch buffer. Must be initialized with scratch_buffer_init |
4145 |
+ before its use. */ |
4146 |
+struct scratch_buffer { |
4147 |
+ void *data; /* Pointer to the beginning of the scratch area. */ |
4148 |
+ size_t length; /* Allocated space at the data pointer, in bytes. */ |
4149 |
+ union { max_align_t __align; char __c[1024]; } __space; |
4150 |
+}; |
4151 |
+ |
4152 |
+/* Initializes *BUFFER so that BUFFER->data points to BUFFER->__space |
4153 |
+ and BUFFER->length reflects the available space. */ |
4154 |
+static inline void |
4155 |
+scratch_buffer_init (struct scratch_buffer *buffer) |
4156 |
+{ |
4157 |
+ buffer->data = buffer->__space.__c; |
4158 |
+ buffer->length = sizeof (buffer->__space); |
4159 |
+} |
4160 |
+ |
4161 |
+/* Deallocates *BUFFER (if it was heap-allocated). */ |
4162 |
+static inline void |
4163 |
+scratch_buffer_free (struct scratch_buffer *buffer) |
4164 |
+{ |
4165 |
+ if (buffer->data != buffer->__space.__c) |
4166 |
+ free (buffer->data); |
4167 |
+} |
4168 |
+ |
4169 |
+/* Grow *BUFFER by some arbitrary amount. The buffer contents is NOT |
4170 |
+ preserved. Return true on success, false on allocation failure (in |
4171 |
+ which case the old buffer is freed). On success, the new buffer is |
4172 |
+ larger than the previous size. On failure, *BUFFER is deallocated, |
4173 |
+ but remains in a free-able state, and errno is set. */ |
4174 |
+bool __libc_scratch_buffer_grow (struct scratch_buffer *buffer); |
4175 |
+ |
4176 |
+/* Alias for __libc_scratch_buffer_grow. */ |
4177 |
+static inline _GL_ATTRIBUTE_ALWAYS_INLINE bool |
4178 |
+scratch_buffer_grow (struct scratch_buffer *buffer) |
4179 |
+{ |
4180 |
+ return _GL_LIKELY (__libc_scratch_buffer_grow (buffer)); |
4181 |
+} |
4182 |
+ |
4183 |
+/* Like __libc_scratch_buffer_grow, but preserve the old buffer |
4184 |
+ contents on success, as a prefix of the new buffer. */ |
4185 |
+bool __libc_scratch_buffer_grow_preserve (struct scratch_buffer *buffer); |
4186 |
+ |
4187 |
+/* Alias for __libc_scratch_buffer_grow_preserve. */ |
4188 |
+static inline _GL_ATTRIBUTE_ALWAYS_INLINE bool |
4189 |
+scratch_buffer_grow_preserve (struct scratch_buffer *buffer) |
4190 |
+{ |
4191 |
+ return _GL_LIKELY (__libc_scratch_buffer_grow_preserve (buffer)); |
4192 |
+} |
4193 |
+ |
4194 |
+/* Grow *BUFFER so that it can store at least NELEM elements of SIZE |
4195 |
+ bytes. The buffer contents are NOT preserved. Both NELEM and SIZE |
4196 |
+ can be zero. Return true on success, false on allocation failure |
4197 |
+ (in which case the old buffer is freed, but *BUFFER remains in a |
4198 |
+ free-able state, and errno is set). It is unspecified whether this |
4199 |
+ function can reduce the array size. */ |
4200 |
+bool __libc_scratch_buffer_set_array_size (struct scratch_buffer *buffer, |
4201 |
+ size_t nelem, size_t size); |
4202 |
+ |
4203 |
+/* Alias for __libc_scratch_set_array_size. */ |
4204 |
+static inline _GL_ATTRIBUTE_ALWAYS_INLINE bool |
4205 |
+scratch_buffer_set_array_size (struct scratch_buffer *buffer, |
4206 |
+ size_t nelem, size_t size) |
4207 |
+{ |
4208 |
+ return _GL_LIKELY (__libc_scratch_buffer_set_array_size |
4209 |
+ (buffer, nelem, size)); |
4210 |
+} |
4211 |
+ |
4212 |
+/* Return a copy of *BUFFER's first SIZE bytes as a heap-allocated block, |
4213 |
+ deallocating *BUFFER if it was heap-allocated. SIZE must be at |
4214 |
+ most *BUFFER's size. Return NULL (setting errno) on memory |
4215 |
+ exhaustion. */ |
4216 |
+void *__libc_scratch_buffer_dupfree (struct scratch_buffer *buffer, |
4217 |
+ size_t size); |
4218 |
+ |
4219 |
+/* Alias for __libc_scratch_dupfree. */ |
4220 |
+static inline _GL_ATTRIBUTE_ALWAYS_INLINE void * |
4221 |
+scratch_buffer_dupfree (struct scratch_buffer *buffer, size_t size) |
4222 |
+{ |
4223 |
+ void *r = __libc_scratch_buffer_dupfree (buffer, size); |
4224 |
+ return _GL_LIKELY (r != NULL) ? r : NULL; |
4225 |
+} |
4226 |
+ |
4227 |
+#endif /* _SCRATCH_BUFFER_H */ |
4228 |
|
4229 |
diff --git a/autotools/gnulib/math.in.h b/autotools/gnulib/math.h |
4230 |
similarity index 73% |
4231 |
copy from autotools/gnulib/math.in.h |
4232 |
copy to autotools/gnulib/math.h |
4233 |
index ccc3584..74ad932 100644 |
4234 |
--- a/autotools/gnulib/math.in.h |
4235 |
+++ b/autotools/gnulib/math.h |
4236 |
@@ -1,3 +1,4 @@ |
4237 |
+/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ |
4238 |
/* A GNU-like <math.h>. |
4239 |
|
4240 |
Copyright (C) 2002-2003, 2007-2022 Free Software Foundation, Inc. |
4241 |
@@ -15,12 +16,12 @@ |
4242 |
You should have received a copy of the GNU Lesser General Public License |
4243 |
along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
4244 |
|
4245 |
-#ifndef _@GUARD_PREFIX@_MATH_H |
4246 |
+#ifndef _GL_MATH_H |
4247 |
|
4248 |
#if __GNUC__ >= 3 |
4249 |
-@PRAGMA_SYSTEM_HEADER@ |
4250 |
+#pragma GCC system_header |
4251 |
#endif |
4252 |
-@PRAGMA_COLUMNS@ |
4253 |
+ |
4254 |
|
4255 |
#if defined _GL_INCLUDING_MATH_H |
4256 |
/* Special invocation convention: |
4257 |
@@ -30,18 +31,18 @@ |
4258 |
In this situation, the functions are not yet declared, therefore we cannot |
4259 |
provide the C++ aliases. */ |
4260 |
|
4261 |
-#@INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ @NEXT_AS_FIRST_DIRECTIVE_MATH_H@ |
4262 |
+#include_next <math.h> |
4263 |
|
4264 |
#else |
4265 |
/* Normal invocation convention. */ |
4266 |
|
4267 |
/* The include_next requires a split double-inclusion guard. */ |
4268 |
#define _GL_INCLUDING_MATH_H |
4269 |
-#@INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ @NEXT_AS_FIRST_DIRECTIVE_MATH_H@ |
4270 |
+#include_next <math.h> |
4271 |
#undef _GL_INCLUDING_MATH_H |
4272 |
|
4273 |
-#ifndef _@GUARD_PREFIX@_MATH_H |
4274 |
-#define _@GUARD_PREFIX@_MATH_H |
4275 |
+#ifndef _GL_MATH_H |
4276 |
+#define _GL_MATH_H |
4277 |
|
4278 |
/* On OpenVMS, NAN, INFINITY, and HUGEVAL macros are defined in <fp.h>. */ |
4279 |
#if defined __VMS && ! defined NAN |
4280 |
@@ -67,10 +68,516 @@ _GL_INLINE_HEADER_BEGIN |
4281 |
#endif |
4282 |
|
4283 |
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ |
4284 |
+/* C++ compatible function declaration macros. |
4285 |
+ Copyright (C) 2010-2022 Free Software Foundation, Inc. |
4286 |
+ |
4287 |
+ This program is free software: you can redistribute it and/or modify it |
4288 |
+ under the terms of the GNU Lesser General Public License as published |
4289 |
+ by the Free Software Foundation; either version 2 of the License, or |
4290 |
+ (at your option) any later version. |
4291 |
+ |
4292 |
+ This program is distributed in the hope that it will be useful, |
4293 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
4294 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
4295 |
+ Lesser General Public License for more details. |
4296 |
+ |
4297 |
+ You should have received a copy of the GNU Lesser General Public License |
4298 |
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
4299 |
+ |
4300 |
+#ifndef _GL_CXXDEFS_H |
4301 |
+#define _GL_CXXDEFS_H |
4302 |
+ |
4303 |
+/* Begin/end the GNULIB_NAMESPACE namespace. */ |
4304 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
4305 |
+# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { |
4306 |
+# define _GL_END_NAMESPACE } |
4307 |
+#else |
4308 |
+# define _GL_BEGIN_NAMESPACE |
4309 |
+# define _GL_END_NAMESPACE |
4310 |
+#endif |
4311 |
+ |
4312 |
+/* The three most frequent use cases of these macros are: |
4313 |
+ |
4314 |
+ * For providing a substitute for a function that is missing on some |
4315 |
+ platforms, but is declared and works fine on the platforms on which |
4316 |
+ it exists: |
4317 |
+ |
4318 |
+ #if @GNULIB_FOO@ |
4319 |
+ # if !@HAVE_FOO@ |
4320 |
+ _GL_FUNCDECL_SYS (foo, ...); |
4321 |
+ # endif |
4322 |
+ _GL_CXXALIAS_SYS (foo, ...); |
4323 |
+ _GL_CXXALIASWARN (foo); |
4324 |
+ #elif defined GNULIB_POSIXCHECK |
4325 |
+ ... |
4326 |
+ #endif |
4327 |
+ |
4328 |
+ * For providing a replacement for a function that exists on all platforms, |
4329 |
+ but is broken/insufficient and needs to be replaced on some platforms: |
4330 |
+ |
4331 |
+ #if @GNULIB_FOO@ |
4332 |
+ # if @REPLACE_FOO@ |
4333 |
+ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
4334 |
+ # undef foo |
4335 |
+ # define foo rpl_foo |
4336 |
+ # endif |
4337 |
+ _GL_FUNCDECL_RPL (foo, ...); |
4338 |
+ _GL_CXXALIAS_RPL (foo, ...); |
4339 |
+ # else |
4340 |
+ _GL_CXXALIAS_SYS (foo, ...); |
4341 |
+ # endif |
4342 |
+ _GL_CXXALIASWARN (foo); |
4343 |
+ #elif defined GNULIB_POSIXCHECK |
4344 |
+ ... |
4345 |
+ #endif |
4346 |
+ |
4347 |
+ * For providing a replacement for a function that exists on some platforms |
4348 |
+ but is broken/insufficient and needs to be replaced on some of them and |
4349 |
+ is additionally either missing or undeclared on some other platforms: |
4350 |
+ |
4351 |
+ #if @GNULIB_FOO@ |
4352 |
+ # if @REPLACE_FOO@ |
4353 |
+ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
4354 |
+ # undef foo |
4355 |
+ # define foo rpl_foo |
4356 |
+ # endif |
4357 |
+ _GL_FUNCDECL_RPL (foo, ...); |
4358 |
+ _GL_CXXALIAS_RPL (foo, ...); |
4359 |
+ # else |
4360 |
+ # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ |
4361 |
+ _GL_FUNCDECL_SYS (foo, ...); |
4362 |
+ # endif |
4363 |
+ _GL_CXXALIAS_SYS (foo, ...); |
4364 |
+ # endif |
4365 |
+ _GL_CXXALIASWARN (foo); |
4366 |
+ #elif defined GNULIB_POSIXCHECK |
4367 |
+ ... |
4368 |
+ #endif |
4369 |
+*/ |
4370 |
+ |
4371 |
+/* _GL_EXTERN_C declaration; |
4372 |
+ performs the declaration with C linkage. */ |
4373 |
+#if defined __cplusplus |
4374 |
+# define _GL_EXTERN_C extern "C" |
4375 |
+#else |
4376 |
+# define _GL_EXTERN_C extern |
4377 |
+#endif |
4378 |
+ |
4379 |
+/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); |
4380 |
+ declares a replacement function, named rpl_func, with the given prototype, |
4381 |
+ consisting of return type, parameters, and attributes. |
4382 |
+ Example: |
4383 |
+ _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) |
4384 |
+ _GL_ARG_NONNULL ((1))); |
4385 |
+ */ |
4386 |
+#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ |
4387 |
+ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) |
4388 |
+#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ |
4389 |
+ _GL_EXTERN_C rettype rpl_func parameters_and_attributes |
4390 |
+ |
4391 |
+/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); |
4392 |
+ declares the system function, named func, with the given prototype, |
4393 |
+ consisting of return type, parameters, and attributes. |
4394 |
+ Example: |
4395 |
+ _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) |
4396 |
+ _GL_ARG_NONNULL ((1))); |
4397 |
+ */ |
4398 |
+#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ |
4399 |
+ _GL_EXTERN_C rettype func parameters_and_attributes |
4400 |
+ |
4401 |
+/* _GL_CXXALIAS_RPL (func, rettype, parameters); |
4402 |
+ declares a C++ alias called GNULIB_NAMESPACE::func |
4403 |
+ that redirects to rpl_func, if GNULIB_NAMESPACE is defined. |
4404 |
+ Example: |
4405 |
+ _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); |
4406 |
+ |
4407 |
+ Wrapping rpl_func in an object with an inline conversion operator |
4408 |
+ avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is |
4409 |
+ actually used in the program. */ |
4410 |
+#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ |
4411 |
+ _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) |
4412 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
4413 |
+# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ |
4414 |
+ namespace GNULIB_NAMESPACE \ |
4415 |
+ { \ |
4416 |
+ static const struct _gl_ ## func ## _wrapper \ |
4417 |
+ { \ |
4418 |
+ typedef rettype (*type) parameters; \ |
4419 |
+ \ |
4420 |
+ inline operator type () const \ |
4421 |
+ { \ |
4422 |
+ return ::rpl_func; \ |
4423 |
+ } \ |
4424 |
+ } func = {}; \ |
4425 |
+ } \ |
4426 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
4427 |
+#else |
4428 |
+# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ |
4429 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
4430 |
+#endif |
4431 |
+ |
4432 |
+/* _GL_CXXALIAS_MDA (func, rettype, parameters); |
4433 |
+ is to be used when func is a Microsoft deprecated alias, on native Windows. |
4434 |
+ It declares a C++ alias called GNULIB_NAMESPACE::func |
4435 |
+ that redirects to _func, if GNULIB_NAMESPACE is defined. |
4436 |
+ Example: |
4437 |
+ _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); |
4438 |
+ */ |
4439 |
+#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ |
4440 |
+ _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) |
4441 |
+ |
4442 |
+/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); |
4443 |
+ is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); |
4444 |
+ except that the C function rpl_func may have a slightly different |
4445 |
+ declaration. A cast is used to silence the "invalid conversion" error |
4446 |
+ that would otherwise occur. */ |
4447 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
4448 |
+# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ |
4449 |
+ namespace GNULIB_NAMESPACE \ |
4450 |
+ { \ |
4451 |
+ static const struct _gl_ ## func ## _wrapper \ |
4452 |
+ { \ |
4453 |
+ typedef rettype (*type) parameters; \ |
4454 |
+ \ |
4455 |
+ inline operator type () const \ |
4456 |
+ { \ |
4457 |
+ return reinterpret_cast<type>(::rpl_func); \ |
4458 |
+ } \ |
4459 |
+ } func = {}; \ |
4460 |
+ } \ |
4461 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
4462 |
+#else |
4463 |
+# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ |
4464 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
4465 |
+#endif |
4466 |
+ |
4467 |
+/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); |
4468 |
+ is like _GL_CXXALIAS_MDA (func, rettype, parameters); |
4469 |
+ except that the C function func may have a slightly different declaration. |
4470 |
+ A cast is used to silence the "invalid conversion" error that would |
4471 |
+ otherwise occur. */ |
4472 |
+#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ |
4473 |
+ _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) |
4474 |
+ |
4475 |
+/* _GL_CXXALIAS_SYS (func, rettype, parameters); |
4476 |
+ declares a C++ alias called GNULIB_NAMESPACE::func |
4477 |
+ that redirects to the system provided function func, if GNULIB_NAMESPACE |
4478 |
+ is defined. |
4479 |
+ Example: |
4480 |
+ _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); |
4481 |
+ |
4482 |
+ Wrapping func in an object with an inline conversion operator |
4483 |
+ avoids a reference to func unless GNULIB_NAMESPACE::func is |
4484 |
+ actually used in the program. */ |
4485 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
4486 |
+# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ |
4487 |
+ namespace GNULIB_NAMESPACE \ |
4488 |
+ { \ |
4489 |
+ static const struct _gl_ ## func ## _wrapper \ |
4490 |
+ { \ |
4491 |
+ typedef rettype (*type) parameters; \ |
4492 |
+ \ |
4493 |
+ inline operator type () const \ |
4494 |
+ { \ |
4495 |
+ return ::func; \ |
4496 |
+ } \ |
4497 |
+ } func = {}; \ |
4498 |
+ } \ |
4499 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
4500 |
+#else |
4501 |
+# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ |
4502 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
4503 |
+#endif |
4504 |
+ |
4505 |
+/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); |
4506 |
+ is like _GL_CXXALIAS_SYS (func, rettype, parameters); |
4507 |
+ except that the C function func may have a slightly different declaration. |
4508 |
+ A cast is used to silence the "invalid conversion" error that would |
4509 |
+ otherwise occur. */ |
4510 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
4511 |
+# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ |
4512 |
+ namespace GNULIB_NAMESPACE \ |
4513 |
+ { \ |
4514 |
+ static const struct _gl_ ## func ## _wrapper \ |
4515 |
+ { \ |
4516 |
+ typedef rettype (*type) parameters; \ |
4517 |
+ \ |
4518 |
+ inline operator type () const \ |
4519 |
+ { \ |
4520 |
+ return reinterpret_cast<type>(::func); \ |
4521 |
+ } \ |
4522 |
+ } func = {}; \ |
4523 |
+ } \ |
4524 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
4525 |
+#else |
4526 |
+# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ |
4527 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
4528 |
+#endif |
4529 |
+ |
4530 |
+/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); |
4531 |
+ is like _GL_CXXALIAS_SYS (func, rettype, parameters); |
4532 |
+ except that the C function is picked among a set of overloaded functions, |
4533 |
+ namely the one with rettype2 and parameters2. Two consecutive casts |
4534 |
+ are used to silence the "cannot find a match" and "invalid conversion" |
4535 |
+ errors that would otherwise occur. */ |
4536 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
4537 |
+ /* The outer cast must be a reinterpret_cast. |
4538 |
+ The inner cast: When the function is defined as a set of overloaded |
4539 |
+ functions, it works as a static_cast<>, choosing the designated variant. |
4540 |
+ When the function is defined as a single variant, it works as a |
4541 |
+ reinterpret_cast<>. The parenthesized cast syntax works both ways. */ |
4542 |
+# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ |
4543 |
+ namespace GNULIB_NAMESPACE \ |
4544 |
+ { \ |
4545 |
+ static const struct _gl_ ## func ## _wrapper \ |
4546 |
+ { \ |
4547 |
+ typedef rettype (*type) parameters; \ |
4548 |
+ \ |
4549 |
+ inline operator type () const \ |
4550 |
+ { \ |
4551 |
+ return reinterpret_cast<type>((rettype2 (*) parameters2)(::func)); \ |
4552 |
+ } \ |
4553 |
+ } func = {}; \ |
4554 |
+ } \ |
4555 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
4556 |
+#else |
4557 |
+# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ |
4558 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
4559 |
+#endif |
4560 |
+ |
4561 |
+/* _GL_CXXALIASWARN (func); |
4562 |
+ causes a warning to be emitted when ::func is used but not when |
4563 |
+ GNULIB_NAMESPACE::func is used. func must be defined without overloaded |
4564 |
+ variants. */ |
4565 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
4566 |
+# define _GL_CXXALIASWARN(func) \ |
4567 |
+ _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) |
4568 |
+# define _GL_CXXALIASWARN_1(func,namespace) \ |
4569 |
+ _GL_CXXALIASWARN_2 (func, namespace) |
4570 |
+/* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>, |
4571 |
+ we enable the warning only when not optimizing. */ |
4572 |
+# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) |
4573 |
+# define _GL_CXXALIASWARN_2(func,namespace) \ |
4574 |
+ _GL_WARN_ON_USE (func, \ |
4575 |
+ "The symbol ::" #func " refers to the system function. " \ |
4576 |
+ "Use " #namespace "::" #func " instead.") |
4577 |
+# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING |
4578 |
+# define _GL_CXXALIASWARN_2(func,namespace) \ |
4579 |
+ extern __typeof__ (func) func |
4580 |
+# else |
4581 |
+# define _GL_CXXALIASWARN_2(func,namespace) \ |
4582 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
4583 |
+# endif |
4584 |
+#else |
4585 |
+# define _GL_CXXALIASWARN(func) \ |
4586 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
4587 |
+#endif |
4588 |
+ |
4589 |
+/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); |
4590 |
+ causes a warning to be emitted when the given overloaded variant of ::func |
4591 |
+ is used but not when GNULIB_NAMESPACE::func is used. */ |
4592 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
4593 |
+# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ |
4594 |
+ _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ |
4595 |
+ GNULIB_NAMESPACE) |
4596 |
+# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ |
4597 |
+ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) |
4598 |
+/* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>, |
4599 |
+ we enable the warning only when not optimizing. */ |
4600 |
+# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) |
4601 |
+# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ |
4602 |
+ _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ |
4603 |
+ "The symbol ::" #func " refers to the system function. " \ |
4604 |
+ "Use " #namespace "::" #func " instead.") |
4605 |
+# else |
4606 |
+# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ |
4607 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
4608 |
+# endif |
4609 |
+#else |
4610 |
+# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ |
4611 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
4612 |
+#endif |
4613 |
+ |
4614 |
+#endif /* _GL_CXXDEFS_H */ |
4615 |
|
4616 |
/* The definition of _GL_ARG_NONNULL is copied here. */ |
4617 |
+/* A C macro for declaring that specific arguments must not be NULL. |
4618 |
+ Copyright (C) 2009-2022 Free Software Foundation, Inc. |
4619 |
+ |
4620 |
+ This program is free software: you can redistribute it and/or modify it |
4621 |
+ under the terms of the GNU Lesser General Public License as published |
4622 |
+ by the Free Software Foundation; either version 2 of the License, or |
4623 |
+ (at your option) any later version. |
4624 |
+ |
4625 |
+ This program is distributed in the hope that it will be useful, |
4626 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
4627 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
4628 |
+ Lesser General Public License for more details. |
4629 |
+ |
4630 |
+ You should have received a copy of the GNU Lesser General Public License |
4631 |
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
4632 |
+ |
4633 |
+/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools |
4634 |
+ that the values passed as arguments n, ..., m must be non-NULL pointers. |
4635 |
+ n = 1 stands for the first argument, n = 2 for the second argument etc. */ |
4636 |
+#ifndef _GL_ARG_NONNULL |
4637 |
+# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ |
4638 |
+# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) |
4639 |
+# else |
4640 |
+# define _GL_ARG_NONNULL(params) |
4641 |
+# endif |
4642 |
+#endif |
4643 |
|
4644 |
/* The definition of _GL_WARN_ON_USE is copied here. */ |
4645 |
+/* A C macro for emitting warnings if a function is used. |
4646 |
+ Copyright (C) 2010-2022 Free Software Foundation, Inc. |
4647 |
+ |
4648 |
+ This program is free software: you can redistribute it and/or modify it |
4649 |
+ under the terms of the GNU Lesser General Public License as published |
4650 |
+ by the Free Software Foundation; either version 2 of the License, or |
4651 |
+ (at your option) any later version. |
4652 |
+ |
4653 |
+ This program is distributed in the hope that it will be useful, |
4654 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
4655 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
4656 |
+ Lesser General Public License for more details. |
4657 |
+ |
4658 |
+ You should have received a copy of the GNU Lesser General Public License |
4659 |
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
4660 |
+ |
4661 |
+/* _GL_WARN_ON_USE (function, "literal string") issues a declaration |
4662 |
+ for FUNCTION which will then trigger a compiler warning containing |
4663 |
+ the text of "literal string" anywhere that function is called, if |
4664 |
+ supported by the compiler. If the compiler does not support this |
4665 |
+ feature, the macro expands to an unused extern declaration. |
4666 |
+ |
4667 |
+ _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the |
4668 |
+ attribute used in _GL_WARN_ON_USE. If the compiler does not support |
4669 |
+ this feature, it expands to empty. |
4670 |
+ |
4671 |
+ These macros are useful for marking a function as a potential |
4672 |
+ portability trap, with the intent that "literal string" include |
4673 |
+ instructions on the replacement function that should be used |
4674 |
+ instead. |
4675 |
+ _GL_WARN_ON_USE is for functions with 'extern' linkage. |
4676 |
+ _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline' |
4677 |
+ linkage. |
4678 |
+ |
4679 |
+ However, one of the reasons that a function is a portability trap is |
4680 |
+ if it has the wrong signature. Declaring FUNCTION with a different |
4681 |
+ signature in C is a compilation error, so this macro must use the |
4682 |
+ same type as any existing declaration so that programs that avoid |
4683 |
+ the problematic FUNCTION do not fail to compile merely because they |
4684 |
+ included a header that poisoned the function. But this implies that |
4685 |
+ _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already |
4686 |
+ have a declaration. Use of this macro implies that there must not |
4687 |
+ be any other macro hiding the declaration of FUNCTION; but |
4688 |
+ undefining FUNCTION first is part of the poisoning process anyway |
4689 |
+ (although for symbols that are provided only via a macro, the result |
4690 |
+ is a compilation error rather than a warning containing |
4691 |
+ "literal string"). Also note that in C++, it is only safe to use if |
4692 |
+ FUNCTION has no overloads. |
4693 |
+ |
4694 |
+ For an example, it is possible to poison 'getline' by: |
4695 |
+ - adding a call to gl_WARN_ON_USE_PREPARE([[#include <stdio.h>]], |
4696 |
+ [getline]) in configure.ac, which potentially defines |
4697 |
+ HAVE_RAW_DECL_GETLINE |
4698 |
+ - adding this code to a header that wraps the system <stdio.h>: |
4699 |
+ #undef getline |
4700 |
+ #if HAVE_RAW_DECL_GETLINE |
4701 |
+ _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" |
4702 |
+ "not universally present; use the gnulib module getline"); |
4703 |
+ #endif |
4704 |
+ |
4705 |
+ It is not possible to directly poison global variables. But it is |
4706 |
+ possible to write a wrapper accessor function, and poison that |
4707 |
+ (less common usage, like &environ, will cause a compilation error |
4708 |
+ rather than issue the nice warning, but the end result of informing |
4709 |
+ the developer about their portability problem is still achieved): |
4710 |
+ #if HAVE_RAW_DECL_ENVIRON |
4711 |
+ static char *** |
4712 |
+ rpl_environ (void) { return &environ; } |
4713 |
+ _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); |
4714 |
+ # undef environ |
4715 |
+ # define environ (*rpl_environ ()) |
4716 |
+ #endif |
4717 |
+ or better (avoiding contradictory use of 'static' and 'extern'): |
4718 |
+ #if HAVE_RAW_DECL_ENVIRON |
4719 |
+ static char *** |
4720 |
+ _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared") |
4721 |
+ rpl_environ (void) { return &environ; } |
4722 |
+ # undef environ |
4723 |
+ # define environ (*rpl_environ ()) |
4724 |
+ #endif |
4725 |
+ */ |
4726 |
+#ifndef _GL_WARN_ON_USE |
4727 |
+ |
4728 |
+# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) |
4729 |
+/* A compiler attribute is available in gcc versions 4.3.0 and later. */ |
4730 |
+# define _GL_WARN_ON_USE(function, message) \ |
4731 |
+_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) |
4732 |
+# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ |
4733 |
+ __attribute__ ((__warning__ (message))) |
4734 |
+# elif __clang_major__ >= 4 |
4735 |
+/* Another compiler attribute is available in clang. */ |
4736 |
+# define _GL_WARN_ON_USE(function, message) \ |
4737 |
+_GL_WARN_EXTERN_C __typeof__ (function) function \ |
4738 |
+ __attribute__ ((__diagnose_if__ (1, message, "warning"))) |
4739 |
+# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ |
4740 |
+ __attribute__ ((__diagnose_if__ (1, message, "warning"))) |
4741 |
+# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING |
4742 |
+/* Verify the existence of the function. */ |
4743 |
+# define _GL_WARN_ON_USE(function, message) \ |
4744 |
+_GL_WARN_EXTERN_C __typeof__ (function) function |
4745 |
+# define _GL_WARN_ON_USE_ATTRIBUTE(message) |
4746 |
+# else /* Unsupported. */ |
4747 |
+# define _GL_WARN_ON_USE(function, message) \ |
4748 |
+_GL_WARN_EXTERN_C int _gl_warn_on_use |
4749 |
+# define _GL_WARN_ON_USE_ATTRIBUTE(message) |
4750 |
+# endif |
4751 |
+#endif |
4752 |
+ |
4753 |
+/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") |
4754 |
+ is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the |
4755 |
+ function is declared with the given prototype, consisting of return type, |
4756 |
+ parameters, and attributes. |
4757 |
+ This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does |
4758 |
+ not work in this case. */ |
4759 |
+#ifndef _GL_WARN_ON_USE_CXX |
4760 |
+# if !defined __cplusplus |
4761 |
+# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ |
4762 |
+ _GL_WARN_ON_USE (function, msg) |
4763 |
+# else |
4764 |
+# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) |
4765 |
+/* A compiler attribute is available in gcc versions 4.3.0 and later. */ |
4766 |
+# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ |
4767 |
+extern rettype_gcc function parameters_and_attributes \ |
4768 |
+ __attribute__ ((__warning__ (msg))) |
4769 |
+# elif __clang_major__ >= 4 |
4770 |
+/* Another compiler attribute is available in clang. */ |
4771 |
+# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ |
4772 |
+extern rettype_clang function parameters_and_attributes \ |
4773 |
+ __attribute__ ((__diagnose_if__ (1, msg, "warning"))) |
4774 |
+# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING |
4775 |
+/* Verify the existence of the function. */ |
4776 |
+# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ |
4777 |
+extern rettype_gcc function parameters_and_attributes |
4778 |
+# else /* Unsupported. */ |
4779 |
+# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ |
4780 |
+_GL_WARN_EXTERN_C int _gl_warn_on_use |
4781 |
+# endif |
4782 |
+# endif |
4783 |
+#endif |
4784 |
+ |
4785 |
+/* _GL_WARN_EXTERN_C declaration; |
4786 |
+ performs the declaration with C linkage. */ |
4787 |
+#ifndef _GL_WARN_EXTERN_C |
4788 |
+# if defined __cplusplus |
4789 |
+# define _GL_WARN_EXTERN_C extern "C" |
4790 |
+# else |
4791 |
+# define _GL_WARN_EXTERN_C extern |
4792 |
+# endif |
4793 |
+#endif |
4794 |
|
4795 |
#ifdef __cplusplus |
4796 |
/* Helper macros to define type-generic function FUNC as overloaded functions, |
4797 |
@@ -144,7 +651,7 @@ rpl_ ## func ## l (long double l) \ |
4798 |
: rpl_ ## func ## l (value)) |
4799 |
|
4800 |
|
4801 |
-#if @REPLACE_ITOLD@ |
4802 |
+#if 0 |
4803 |
/* Pull in a function that fixes the 'int' to 'long double' conversion |
4804 |
of glibc 2.7. */ |
4805 |
_GL_EXTERN_C void _Qp_itoq (long double *, int); |
4806 |
@@ -157,7 +664,7 @@ static void (*_gl_math_fix_itold) (long double *, int) = _Qp_itoq; |
4807 |
IEEE NaN, so we define this unconditionally. We also must define |
4808 |
it on platforms like Solaris 10, where NAN is present but defined |
4809 |
as a function pointer rather than a floating point constant. */ |
4810 |
-#if !defined NAN || @REPLACE_NAN@ |
4811 |
+#if !defined NAN || 0 |
4812 |
# if !GNULIB_defined_NAN |
4813 |
# undef NAN |
4814 |
/* The Compaq (ex-DEC) C 6.4 compiler and the Microsoft MSVC 9 compiler |
4815 |
@@ -179,7 +686,7 @@ _NaN () |
4816 |
|
4817 |
/* Solaris 10 defines HUGE_VAL, but as a function pointer rather |
4818 |
than a floating point constant. */ |
4819 |
-#if @REPLACE_HUGE_VAL@ |
4820 |
+#if 0 |
4821 |
# undef HUGE_VALF |
4822 |
# define HUGE_VALF (1.0f / 0.0f) |
4823 |
# undef HUGE_VAL |
4824 |
@@ -250,8 +757,8 @@ _NaN () |
4825 |
#endif |
4826 |
|
4827 |
|
4828 |
-#if @GNULIB_ACOSF@ |
4829 |
-# if @REPLACE_ACOSF@ |
4830 |
+#if 0 |
4831 |
+# if 0 |
4832 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
4833 |
# undef acosf |
4834 |
# define acosf rpl_acosf |
4835 |
@@ -259,7 +766,7 @@ _NaN () |
4836 |
_GL_FUNCDECL_RPL (acosf, float, (float x)); |
4837 |
_GL_CXXALIAS_RPL (acosf, float, (float x)); |
4838 |
# else |
4839 |
-# if !@HAVE_ACOSF@ |
4840 |
+# if !1 |
4841 |
# undef acosf |
4842 |
_GL_FUNCDECL_SYS (acosf, float, (float x)); |
4843 |
# endif |
4844 |
@@ -274,8 +781,8 @@ _GL_WARN_ON_USE (acosf, "acosf is unportable - " |
4845 |
# endif |
4846 |
#endif |
4847 |
|
4848 |
-#if @GNULIB_ACOSL@ |
4849 |
-# if !@HAVE_ACOSL@ || !@HAVE_DECL_ACOSL@ |
4850 |
+#if 0 |
4851 |
+# if !1 || !1 |
4852 |
# undef acosl |
4853 |
_GL_FUNCDECL_SYS (acosl, long double, (long double x)); |
4854 |
# endif |
4855 |
@@ -292,8 +799,8 @@ _GL_WARN_ON_USE (acosl, "acosl is unportable - " |
4856 |
#endif |
4857 |
|
4858 |
|
4859 |
-#if @GNULIB_ASINF@ |
4860 |
-# if @REPLACE_ASINF@ |
4861 |
+#if 0 |
4862 |
+# if 0 |
4863 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
4864 |
# undef asinf |
4865 |
# define asinf rpl_asinf |
4866 |
@@ -301,7 +808,7 @@ _GL_WARN_ON_USE (acosl, "acosl is unportable - " |
4867 |
_GL_FUNCDECL_RPL (asinf, float, (float x)); |
4868 |
_GL_CXXALIAS_RPL (asinf, float, (float x)); |
4869 |
# else |
4870 |
-# if !@HAVE_ASINF@ |
4871 |
+# if !1 |
4872 |
# undef asinf |
4873 |
_GL_FUNCDECL_SYS (asinf, float, (float x)); |
4874 |
# endif |
4875 |
@@ -316,8 +823,8 @@ _GL_WARN_ON_USE (asinf, "asinf is unportable - " |
4876 |
# endif |
4877 |
#endif |
4878 |
|
4879 |
-#if @GNULIB_ASINL@ |
4880 |
-# if !@HAVE_ASINL@ || !@HAVE_DECL_ASINL@ |
4881 |
+#if 0 |
4882 |
+# if !1 || !1 |
4883 |
# undef asinl |
4884 |
_GL_FUNCDECL_SYS (asinl, long double, (long double x)); |
4885 |
# endif |
4886 |
@@ -334,8 +841,8 @@ _GL_WARN_ON_USE (asinl, "asinl is unportable - " |
4887 |
#endif |
4888 |
|
4889 |
|
4890 |
-#if @GNULIB_ATANF@ |
4891 |
-# if @REPLACE_ATANF@ |
4892 |
+#if 0 |
4893 |
+# if 0 |
4894 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
4895 |
# undef atanf |
4896 |
# define atanf rpl_atanf |
4897 |
@@ -343,7 +850,7 @@ _GL_WARN_ON_USE (asinl, "asinl is unportable - " |
4898 |
_GL_FUNCDECL_RPL (atanf, float, (float x)); |
4899 |
_GL_CXXALIAS_RPL (atanf, float, (float x)); |
4900 |
# else |
4901 |
-# if !@HAVE_ATANF@ |
4902 |
+# if !1 |
4903 |
# undef atanf |
4904 |
_GL_FUNCDECL_SYS (atanf, float, (float x)); |
4905 |
# endif |
4906 |
@@ -358,8 +865,8 @@ _GL_WARN_ON_USE (atanf, "atanf is unportable - " |
4907 |
# endif |
4908 |
#endif |
4909 |
|
4910 |
-#if @GNULIB_ATANL@ |
4911 |
-# if !@HAVE_ATANL@ || !@HAVE_DECL_ATANL@ |
4912 |
+#if 0 |
4913 |
+# if !1 || !1 |
4914 |
# undef atanl |
4915 |
_GL_FUNCDECL_SYS (atanl, long double, (long double x)); |
4916 |
# endif |
4917 |
@@ -376,8 +883,8 @@ _GL_WARN_ON_USE (atanl, "atanl is unportable - " |
4918 |
#endif |
4919 |
|
4920 |
|
4921 |
-#if @GNULIB_ATAN2F@ |
4922 |
-# if @REPLACE_ATAN2F@ |
4923 |
+#if 0 |
4924 |
+# if 0 |
4925 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
4926 |
# undef atan2f |
4927 |
# define atan2f rpl_atan2f |
4928 |
@@ -385,7 +892,7 @@ _GL_WARN_ON_USE (atanl, "atanl is unportable - " |
4929 |
_GL_FUNCDECL_RPL (atan2f, float, (float y, float x)); |
4930 |
_GL_CXXALIAS_RPL (atan2f, float, (float y, float x)); |
4931 |
# else |
4932 |
-# if !@HAVE_ATAN2F@ |
4933 |
+# if !1 |
4934 |
# undef atan2f |
4935 |
_GL_FUNCDECL_SYS (atan2f, float, (float y, float x)); |
4936 |
# endif |
4937 |
@@ -401,8 +908,8 @@ _GL_WARN_ON_USE (atan2f, "atan2f is unportable - " |
4938 |
#endif |
4939 |
|
4940 |
|
4941 |
-#if @GNULIB_CBRTF@ |
4942 |
-# if @REPLACE_CBRTF@ |
4943 |
+#if 0 |
4944 |
+# if 0 |
4945 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
4946 |
# undef cbrtf |
4947 |
# define cbrtf rpl_cbrtf |
4948 |
@@ -410,7 +917,7 @@ _GL_WARN_ON_USE (atan2f, "atan2f is unportable - " |
4949 |
_GL_FUNCDECL_RPL (cbrtf, float, (float x)); |
4950 |
_GL_CXXALIAS_RPL (cbrtf, float, (float x)); |
4951 |
# else |
4952 |
-# if !@HAVE_DECL_CBRTF@ |
4953 |
+# if !1 |
4954 |
_GL_FUNCDECL_SYS (cbrtf, float, (float x)); |
4955 |
# endif |
4956 |
_GL_CXXALIAS_SYS (cbrtf, float, (float x)); |
4957 |
@@ -424,8 +931,8 @@ _GL_WARN_ON_USE (cbrtf, "cbrtf is unportable - " |
4958 |
# endif |
4959 |
#endif |
4960 |
|
4961 |
-#if @GNULIB_CBRT@ |
4962 |
-# if !@HAVE_CBRT@ |
4963 |
+#if 0 |
4964 |
+# if !1 |
4965 |
_GL_FUNCDECL_SYS (cbrt, double, (double x)); |
4966 |
# endif |
4967 |
_GL_CXXALIAS_SYS (cbrt, double, (double x)); |
4968 |
@@ -440,8 +947,8 @@ _GL_WARN_ON_USE (cbrt, "cbrt is unportable - " |
4969 |
# endif |
4970 |
#endif |
4971 |
|
4972 |
-#if @GNULIB_CBRTL@ |
4973 |
-# if @REPLACE_CBRTL@ |
4974 |
+#if 0 |
4975 |
+# if 0 |
4976 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
4977 |
# undef cbrtl |
4978 |
# define cbrtl rpl_cbrtl |
4979 |
@@ -449,7 +956,7 @@ _GL_WARN_ON_USE (cbrt, "cbrt is unportable - " |
4980 |
_GL_FUNCDECL_RPL (cbrtl, long double, (long double x)); |
4981 |
_GL_CXXALIAS_RPL (cbrtl, long double, (long double x)); |
4982 |
# else |
4983 |
-# if !@HAVE_DECL_CBRTL@ |
4984 |
+# if !1 |
4985 |
_GL_FUNCDECL_SYS (cbrtl, long double, (long double x)); |
4986 |
# endif |
4987 |
_GL_CXXALIAS_SYS (cbrtl, long double, (long double x)); |
4988 |
@@ -464,8 +971,8 @@ _GL_WARN_ON_USE (cbrtl, "cbrtl is unportable - " |
4989 |
#endif |
4990 |
|
4991 |
|
4992 |
-#if @GNULIB_CEILF@ |
4993 |
-# if @REPLACE_CEILF@ |
4994 |
+#if 0 |
4995 |
+# if 0 |
4996 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
4997 |
# undef ceilf |
4998 |
# define ceilf rpl_ceilf |
4999 |
@@ -473,7 +980,7 @@ _GL_WARN_ON_USE (cbrtl, "cbrtl is unportable - " |
5000 |
_GL_FUNCDECL_RPL (ceilf, float, (float x)); |
5001 |
_GL_CXXALIAS_RPL (ceilf, float, (float x)); |
5002 |
# else |
5003 |
-# if !@HAVE_DECL_CEILF@ |
5004 |
+# if !1 |
5005 |
# undef ceilf |
5006 |
_GL_FUNCDECL_SYS (ceilf, float, (float x)); |
5007 |
# endif |
5008 |
@@ -488,8 +995,8 @@ _GL_WARN_ON_USE (ceilf, "ceilf is unportable - " |
5009 |
# endif |
5010 |
#endif |
5011 |
|
5012 |
-#if @GNULIB_CEIL@ |
5013 |
-# if @REPLACE_CEIL@ |
5014 |
+#if 0 |
5015 |
+# if 0 |
5016 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
5017 |
# undef ceil |
5018 |
# define ceil rpl_ceil |
5019 |
@@ -504,8 +1011,8 @@ _GL_CXXALIASWARN1 (ceil, double, (double x)); |
5020 |
# endif |
5021 |
#endif |
5022 |
|
5023 |
-#if @GNULIB_CEILL@ |
5024 |
-# if @REPLACE_CEILL@ |
5025 |
+#if 0 |
5026 |
+# if 0 |
5027 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
5028 |
# undef ceill |
5029 |
# define ceill rpl_ceill |
5030 |
@@ -513,7 +1020,7 @@ _GL_CXXALIASWARN1 (ceil, double, (double x)); |
5031 |
_GL_FUNCDECL_RPL (ceill, long double, (long double x)); |
5032 |
_GL_CXXALIAS_RPL (ceill, long double, (long double x)); |
5033 |
# else |
5034 |
-# if !@HAVE_DECL_CEILL@ |
5035 |
+# if !1 |
5036 |
# undef ceill |
5037 |
_GL_FUNCDECL_SYS (ceill, long double, (long double x)); |
5038 |
# endif |
5039 |
@@ -531,8 +1038,8 @@ _GL_WARN_ON_USE (ceill, "ceill is unportable - " |
5040 |
#endif |
5041 |
|
5042 |
|
5043 |
-#if @GNULIB_COPYSIGNF@ |
5044 |
-# if !@HAVE_DECL_COPYSIGNF@ |
5045 |
+#if 0 |
5046 |
+# if !1 |
5047 |
# undef copysignf |
5048 |
_GL_FUNCDECL_SYS (copysignf, float, (float x, float y)); |
5049 |
# endif |
5050 |
@@ -546,8 +1053,8 @@ _GL_WARN_ON_USE (copysignf, "copysignf is unportable - " |
5051 |
# endif |
5052 |
#endif |
5053 |
|
5054 |
-#if @GNULIB_COPYSIGN@ |
5055 |
-# if !@HAVE_COPYSIGN@ |
5056 |
+#if 0 |
5057 |
+# if !1 |
5058 |
_GL_FUNCDECL_SYS (copysign, double, (double x, double y)); |
5059 |
# endif |
5060 |
_GL_CXXALIAS_SYS (copysign, double, (double x, double y)); |
5061 |
@@ -562,8 +1069,8 @@ _GL_WARN_ON_USE (copysign, "copysign is unportable - " |
5062 |
# endif |
5063 |
#endif |
5064 |
|
5065 |
-#if @GNULIB_COPYSIGNL@ |
5066 |
-# if !@HAVE_COPYSIGNL@ |
5067 |
+#if 0 |
5068 |
+# if !1 |
5069 |
_GL_FUNCDECL_SYS (copysignl, long double, (long double x, long double y)); |
5070 |
# endif |
5071 |
_GL_CXXALIAS_SYS (copysignl, long double, (long double x, long double y)); |
5072 |
@@ -577,8 +1084,8 @@ _GL_WARN_ON_USE (copysign, "copysignl is unportable - " |
5073 |
#endif |
5074 |
|
5075 |
|
5076 |
-#if @GNULIB_COSF@ |
5077 |
-# if @REPLACE_COSF@ |
5078 |
+#if 0 |
5079 |
+# if 0 |
5080 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
5081 |
# undef cosf |
5082 |
# define cosf rpl_cosf |
5083 |
@@ -586,7 +1093,7 @@ _GL_WARN_ON_USE (copysign, "copysignl is unportable - " |
5084 |
_GL_FUNCDECL_RPL (cosf, float, (float x)); |
5085 |
_GL_CXXALIAS_RPL (cosf, float, (float x)); |
5086 |
# else |
5087 |
-# if !@HAVE_COSF@ |
5088 |
+# if !1 |
5089 |
# undef cosf |
5090 |
_GL_FUNCDECL_SYS (cosf, float, (float x)); |
5091 |
# endif |
5092 |
@@ -601,8 +1108,8 @@ _GL_WARN_ON_USE (cosf, "cosf is unportable - " |
5093 |
# endif |
5094 |
#endif |
5095 |
|
5096 |
-#if @GNULIB_COSL@ |
5097 |
-# if !@HAVE_COSL@ || !@HAVE_DECL_COSL@ |
5098 |
+#if 0 |
5099 |
+# if !1 || !1 |
5100 |
# undef cosl |
5101 |
_GL_FUNCDECL_SYS (cosl, long double, (long double x)); |
5102 |
# endif |
5103 |
@@ -619,8 +1126,8 @@ _GL_WARN_ON_USE (cosl, "cosl is unportable - " |
5104 |
#endif |
5105 |
|
5106 |
|
5107 |
-#if @GNULIB_COSHF@ |
5108 |
-# if @REPLACE_COSHF@ |
5109 |
+#if 0 |
5110 |
+# if 0 |
5111 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
5112 |
# undef coshf |
5113 |
# define coshf rpl_coshf |
5114 |
@@ -628,7 +1135,7 @@ _GL_WARN_ON_USE (cosl, "cosl is unportable - " |
5115 |
_GL_FUNCDECL_RPL (coshf, float, (float x)); |
5116 |
_GL_CXXALIAS_RPL (coshf, float, (float x)); |
5117 |
# else |
5118 |
-# if !@HAVE_COSHF@ |
5119 |
+# if !1 |
5120 |
# undef coshf |
5121 |
_GL_FUNCDECL_SYS (coshf, float, (float x)); |
5122 |
# endif |
5123 |
@@ -644,8 +1151,8 @@ _GL_WARN_ON_USE (coshf, "coshf is unportable - " |
5124 |
#endif |
5125 |
|
5126 |
|
5127 |
-#if @GNULIB_EXPF@ |
5128 |
-# if @REPLACE_EXPF@ |
5129 |
+#if 0 |
5130 |
+# if 0 |
5131 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
5132 |
# undef expf |
5133 |
# define expf rpl_expf |
5134 |
@@ -653,7 +1160,7 @@ _GL_WARN_ON_USE (coshf, "coshf is unportable - " |
5135 |
_GL_FUNCDECL_RPL (expf, float, (float x)); |
5136 |
_GL_CXXALIAS_RPL (expf, float, (float x)); |
5137 |
# else |
5138 |
-# if !@HAVE_EXPF@ |
5139 |
+# if !1 |
5140 |
# undef expf |
5141 |
_GL_FUNCDECL_SYS (expf, float, (float x)); |
5142 |
# endif |
5143 |
@@ -668,8 +1175,8 @@ _GL_WARN_ON_USE (expf, "expf is unportable - " |
5144 |
# endif |
5145 |
#endif |
5146 |
|
5147 |
-#if @GNULIB_EXPL@ |
5148 |
-# if @REPLACE_EXPL@ |
5149 |
+#if 0 |
5150 |
+# if 0 |
5151 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
5152 |
# undef expl |
5153 |
# define expl rpl_expl |
5154 |
@@ -677,7 +1184,7 @@ _GL_WARN_ON_USE (expf, "expf is unportable - " |
5155 |
_GL_FUNCDECL_RPL (expl, long double, (long double x)); |
5156 |
_GL_CXXALIAS_RPL (expl, long double, (long double x)); |
5157 |
# else |
5158 |
-# if !@HAVE_EXPL@ || !@HAVE_DECL_EXPL@ |
5159 |
+# if !1 || !1 |
5160 |
# undef expl |
5161 |
_GL_FUNCDECL_SYS (expl, long double, (long double x)); |
5162 |
# endif |
5163 |
@@ -695,8 +1202,8 @@ _GL_WARN_ON_USE (expl, "expl is unportable - " |
5164 |
#endif |
5165 |
|
5166 |
|
5167 |
-#if @GNULIB_EXP2F@ |
5168 |
-# if !@HAVE_DECL_EXP2F@ |
5169 |
+#if 0 |
5170 |
+# if !1 |
5171 |
_GL_FUNCDECL_SYS (exp2f, float, (float x)); |
5172 |
# endif |
5173 |
_GL_CXXALIAS_SYS (exp2f, float, (float x)); |
5174 |
@@ -709,8 +1216,8 @@ _GL_WARN_ON_USE (exp2f, "exp2f is unportable - " |
5175 |
# endif |
5176 |
#endif |
5177 |
|
5178 |
-#if @GNULIB_EXP2@ |
5179 |
-# if @REPLACE_EXP2@ |
5180 |
+#if 0 |
5181 |
+# if 0 |
5182 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
5183 |
# undef exp2 |
5184 |
# define exp2 rpl_exp2 |
5185 |
@@ -718,7 +1225,7 @@ _GL_WARN_ON_USE (exp2f, "exp2f is unportable - " |
5186 |
_GL_FUNCDECL_RPL (exp2, double, (double x)); |
5187 |
_GL_CXXALIAS_RPL (exp2, double, (double x)); |
5188 |
# else |
5189 |
-# if !@HAVE_DECL_EXP2@ |
5190 |
+# if !1 |
5191 |
_GL_FUNCDECL_SYS (exp2, double, (double x)); |
5192 |
# endif |
5193 |
_GL_CXXALIAS_SYS (exp2, double, (double x)); |
5194 |
@@ -734,8 +1241,8 @@ _GL_WARN_ON_USE (exp2, "exp2 is unportable - " |
5195 |
# endif |
5196 |
#endif |
5197 |
|
5198 |
-#if @GNULIB_EXP2L@ |
5199 |
-# if @REPLACE_EXP2L@ |
5200 |
+#if 0 |
5201 |
+# if 0 |
5202 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
5203 |
# undef exp2l |
5204 |
# define exp2l rpl_exp2l |
5205 |
@@ -743,7 +1250,7 @@ _GL_WARN_ON_USE (exp2, "exp2 is unportable - " |
5206 |
_GL_FUNCDECL_RPL (exp2l, long double, (long double x)); |
5207 |
_GL_CXXALIAS_RPL (exp2l, long double, (long double x)); |
5208 |
# else |
5209 |
-# if !@HAVE_DECL_EXP2L@ |
5210 |
+# if !1 |
5211 |
# undef exp2l |
5212 |
_GL_FUNCDECL_SYS (exp2l, long double, (long double x)); |
5213 |
# endif |
5214 |
@@ -759,8 +1266,8 @@ _GL_WARN_ON_USE (exp2l, "exp2l is unportable - " |
5215 |
#endif |
5216 |
|
5217 |
|
5218 |
-#if @GNULIB_EXPM1F@ |
5219 |
-# if @REPLACE_EXPM1F@ |
5220 |
+#if 0 |
5221 |
+# if 0 |
5222 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
5223 |
# undef expm1f |
5224 |
# define expm1f rpl_expm1f |
5225 |
@@ -768,7 +1275,7 @@ _GL_WARN_ON_USE (exp2l, "exp2l is unportable - " |
5226 |
_GL_FUNCDECL_RPL (expm1f, float, (float x)); |
5227 |
_GL_CXXALIAS_RPL (expm1f, float, (float x)); |
5228 |
# else |
5229 |
-# if !@HAVE_EXPM1F@ |
5230 |
+# if !1 |
5231 |
_GL_FUNCDECL_SYS (expm1f, float, (float x)); |
5232 |
# endif |
5233 |
_GL_CXXALIAS_SYS (expm1f, float, (float x)); |
5234 |
@@ -782,8 +1289,8 @@ _GL_WARN_ON_USE (expm1f, "expm1f is unportable - " |
5235 |
# endif |
5236 |
#endif |
5237 |
|
5238 |
-#if @GNULIB_EXPM1@ |
5239 |
-# if @REPLACE_EXPM1@ |
5240 |
+#if 0 |
5241 |
+# if 0 |
5242 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
5243 |
# undef expm1 |
5244 |
# define expm1 rpl_expm1 |
5245 |
@@ -791,7 +1298,7 @@ _GL_WARN_ON_USE (expm1f, "expm1f is unportable - " |
5246 |
_GL_FUNCDECL_RPL (expm1, double, (double x)); |
5247 |
_GL_CXXALIAS_RPL (expm1, double, (double x)); |
5248 |
# else |
5249 |
-# if !@HAVE_EXPM1@ |
5250 |
+# if !1 |
5251 |
_GL_FUNCDECL_SYS (expm1, double, (double x)); |
5252 |
# endif |
5253 |
_GL_CXXALIAS_SYS (expm1, double, (double x)); |
5254 |
@@ -807,8 +1314,8 @@ _GL_WARN_ON_USE (expm1, "expm1 is unportable - " |
5255 |
# endif |
5256 |
#endif |
5257 |
|
5258 |
-#if @GNULIB_EXPM1L@ |
5259 |
-# if @REPLACE_EXPM1L@ |
5260 |
+#if 0 |
5261 |
+# if 0 |
5262 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
5263 |
# undef expm1l |
5264 |
# define expm1l rpl_expm1l |
5265 |
@@ -816,7 +1323,7 @@ _GL_WARN_ON_USE (expm1, "expm1 is unportable - " |
5266 |
_GL_FUNCDECL_RPL (expm1l, long double, (long double x)); |
5267 |
_GL_CXXALIAS_RPL (expm1l, long double, (long double x)); |
5268 |
# else |
5269 |
-# if !@HAVE_DECL_EXPM1L@ |
5270 |
+# if !1 |
5271 |
# undef expm1l |
5272 |
# if !(defined __cplusplus && defined _AIX) |
5273 |
_GL_FUNCDECL_SYS (expm1l, long double, (long double x)); |
5274 |
@@ -834,8 +1341,8 @@ _GL_WARN_ON_USE (expm1l, "expm1l is unportable - " |
5275 |
#endif |
5276 |
|
5277 |
|
5278 |
-#if @GNULIB_FABSF@ |
5279 |
-# if !@HAVE_FABSF@ |
5280 |
+#if 0 |
5281 |
+# if !1 |
5282 |
# undef fabsf |
5283 |
_GL_FUNCDECL_SYS (fabsf, float, (float x)); |
5284 |
# endif |
5285 |
@@ -851,8 +1358,8 @@ _GL_WARN_ON_USE (fabsf, "fabsf is unportable - " |
5286 |
# endif |
5287 |
#endif |
5288 |
|
5289 |
-#if @GNULIB_FABSL@ |
5290 |
-# if @REPLACE_FABSL@ |
5291 |
+#if 0 |
5292 |
+# if 0 |
5293 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
5294 |
# undef fabsl |
5295 |
# define fabsl rpl_fabsl |
5296 |
@@ -860,7 +1367,7 @@ _GL_WARN_ON_USE (fabsf, "fabsf is unportable - " |
5297 |
_GL_FUNCDECL_RPL (fabsl, long double, (long double x)); |
5298 |
_GL_CXXALIAS_RPL (fabsl, long double, (long double x)); |
5299 |
# else |
5300 |
-# if !@HAVE_FABSL@ |
5301 |
+# if !1 |
5302 |
# undef fabsl |
5303 |
_GL_FUNCDECL_SYS (fabsl, long double, (long double x)); |
5304 |
# endif |
5305 |
@@ -878,8 +1385,8 @@ _GL_WARN_ON_USE (fabsl, "fabsl is unportable - " |
5306 |
#endif |
5307 |
|
5308 |
|
5309 |
-#if @GNULIB_FLOORF@ |
5310 |
-# if @REPLACE_FLOORF@ |
5311 |
+#if 0 |
5312 |
+# if 0 |
5313 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
5314 |
# undef floorf |
5315 |
# define floorf rpl_floorf |
5316 |
@@ -887,7 +1394,7 @@ _GL_WARN_ON_USE (fabsl, "fabsl is unportable - " |
5317 |
_GL_FUNCDECL_RPL (floorf, float, (float x)); |
5318 |
_GL_CXXALIAS_RPL (floorf, float, (float x)); |
5319 |
# else |
5320 |
-# if !@HAVE_DECL_FLOORF@ |
5321 |
+# if !1 |
5322 |
# undef floorf |
5323 |
_GL_FUNCDECL_SYS (floorf, float, (float x)); |
5324 |
# endif |
5325 |
@@ -902,8 +1409,8 @@ _GL_WARN_ON_USE (floorf, "floorf is unportable - " |
5326 |
# endif |
5327 |
#endif |
5328 |
|
5329 |
-#if @GNULIB_FLOOR@ |
5330 |
-# if @REPLACE_FLOOR@ |
5331 |
+#if 0 |
5332 |
+# if 0 |
5333 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
5334 |
# undef floor |
5335 |
# define floor rpl_floor |
5336 |
@@ -918,8 +1425,8 @@ _GL_CXXALIASWARN1 (floor, double, (double x)); |
5337 |
# endif |
5338 |
#endif |
5339 |
|
5340 |
-#if @GNULIB_FLOORL@ |
5341 |
-# if @REPLACE_FLOORL@ |
5342 |
+#if 0 |
5343 |
+# if 0 |
5344 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
5345 |
# undef floorl |
5346 |
# define floorl rpl_floorl |
5347 |
@@ -927,7 +1434,7 @@ _GL_CXXALIASWARN1 (floor, double, (double x)); |
5348 |
_GL_FUNCDECL_RPL (floorl, long double, (long double x)); |
5349 |
_GL_CXXALIAS_RPL (floorl, long double, (long double x)); |
5350 |
# else |
5351 |
-# if !@HAVE_DECL_FLOORL@ |
5352 |
+# if !1 |
5353 |
# undef floorl |
5354 |
_GL_FUNCDECL_SYS (floorl, long double, (long double x)); |
5355 |
# endif |
5356 |
@@ -945,8 +1452,8 @@ _GL_WARN_ON_USE (floorl, "floorl is unportable - " |
5357 |
#endif |
5358 |
|
5359 |
|
5360 |
-#if @GNULIB_FMAF@ |
5361 |
-# if @REPLACE_FMAF@ |
5362 |
+#if 0 |
5363 |
+# if 0 |
5364 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
5365 |
# undef fmaf |
5366 |
# define fmaf rpl_fmaf |
5367 |
@@ -954,7 +1461,7 @@ _GL_WARN_ON_USE (floorl, "floorl is unportable - " |
5368 |
_GL_FUNCDECL_RPL (fmaf, float, (float x, float y, float z)); |
5369 |
_GL_CXXALIAS_RPL (fmaf, float, (float x, float y, float z)); |
5370 |
# else |
5371 |
-# if !@HAVE_FMAF@ |
5372 |
+# if !1 |
5373 |
# undef fmaf |
5374 |
_GL_FUNCDECL_SYS (fmaf, float, (float x, float y, float z)); |
5375 |
# endif |
5376 |
@@ -969,8 +1476,8 @@ _GL_WARN_ON_USE (fmaf, "fmaf is unportable - " |
5377 |
# endif |
5378 |
#endif |
5379 |
|
5380 |
-#if @GNULIB_FMA@ |
5381 |
-# if @REPLACE_FMA@ |
5382 |
+#if 0 |
5383 |
+# if 0 |
5384 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
5385 |
# undef fma |
5386 |
# define fma rpl_fma |
5387 |
@@ -978,7 +1485,7 @@ _GL_WARN_ON_USE (fmaf, "fmaf is unportable - " |
5388 |
_GL_FUNCDECL_RPL (fma, double, (double x, double y, double z)); |
5389 |
_GL_CXXALIAS_RPL (fma, double, (double x, double y, double z)); |
5390 |
# else |
5391 |
-# if !@HAVE_FMA@ |
5392 |
+# if !1 |
5393 |
# undef fma |
5394 |
_GL_FUNCDECL_SYS (fma, double, (double x, double y, double z)); |
5395 |
# endif |
5396 |
@@ -995,8 +1502,8 @@ _GL_WARN_ON_USE (fma, "fma is unportable - " |
5397 |
# endif |
5398 |
#endif |
5399 |
|
5400 |
-#if @GNULIB_FMAL@ |
5401 |
-# if @REPLACE_FMAL@ |
5402 |
+#if 0 |
5403 |
+# if 0 |
5404 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
5405 |
# undef fmal |
5406 |
# define fmal rpl_fmal |
5407 |
@@ -1006,7 +1513,7 @@ _GL_FUNCDECL_RPL (fmal, long double, |
5408 |
_GL_CXXALIAS_RPL (fmal, long double, |
5409 |
(long double x, long double y, long double z)); |
5410 |
# else |
5411 |
-# if !@HAVE_FMAL@ |
5412 |
+# if !1 |
5413 |
# undef fmal |
5414 |
# if !(defined __cplusplus && defined _AIX) |
5415 |
_GL_FUNCDECL_SYS (fmal, long double, |
5416 |
@@ -1026,8 +1533,8 @@ _GL_WARN_ON_USE (fmal, "fmal is unportable - " |
5417 |
#endif |
5418 |
|
5419 |
|
5420 |
-#if @GNULIB_FMODF@ |
5421 |
-# if @REPLACE_FMODF@ |
5422 |
+#if 0 |
5423 |
+# if 0 |
5424 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
5425 |
# undef fmodf |
5426 |
# define fmodf rpl_fmodf |
5427 |
@@ -1035,7 +1542,7 @@ _GL_WARN_ON_USE (fmal, "fmal is unportable - " |
5428 |
_GL_FUNCDECL_RPL (fmodf, float, (float x, float y)); |
5429 |
_GL_CXXALIAS_RPL (fmodf, float, (float x, float y)); |
5430 |
# else |
5431 |
-# if !@HAVE_FMODF@ |
5432 |
+# if !1 |
5433 |
# undef fmodf |
5434 |
_GL_FUNCDECL_SYS (fmodf, float, (float x, float y)); |
5435 |
# endif |
5436 |
@@ -1050,8 +1557,8 @@ _GL_WARN_ON_USE (fmodf, "fmodf is unportable - " |
5437 |
# endif |
5438 |
#endif |
5439 |
|
5440 |
-#if @GNULIB_FMOD@ |
5441 |
-# if @REPLACE_FMOD@ |
5442 |
+#if 0 |
5443 |
+# if 0 |
5444 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
5445 |
# undef fmod |
5446 |
# define fmod rpl_fmod |
5447 |
@@ -1072,8 +1579,8 @@ _GL_WARN_ON_USE (fmod, "fmod has portability problems - " |
5448 |
# endif |
5449 |
#endif |
5450 |
|
5451 |
-#if @GNULIB_FMODL@ |
5452 |
-# if @REPLACE_FMODL@ |
5453 |
+#if 0 |
5454 |
+# if 0 |
5455 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
5456 |
# undef fmodl |
5457 |
# define fmodl rpl_fmodl |
5458 |
@@ -1081,7 +1588,7 @@ _GL_WARN_ON_USE (fmod, "fmod has portability problems - " |
5459 |
_GL_FUNCDECL_RPL (fmodl, long double, (long double x, long double y)); |
5460 |
_GL_CXXALIAS_RPL (fmodl, long double, (long double x, long double y)); |
5461 |
# else |
5462 |
-# if !@HAVE_FMODL@ |
5463 |
+# if !1 |
5464 |
# undef fmodl |
5465 |
_GL_FUNCDECL_SYS (fmodl, long double, (long double x, long double y)); |
5466 |
# endif |
5467 |
@@ -1106,8 +1613,8 @@ _GL_WARN_ON_USE (fmodl, "fmodl is unportable - " |
5468 |
If x is zero: mantissa = x, exp = 0. |
5469 |
If x is infinite or NaN: mantissa = x, exp unspecified. |
5470 |
Store exp in *EXPPTR and return mantissa. */ |
5471 |
-#if @GNULIB_FREXPF@ |
5472 |
-# if @REPLACE_FREXPF@ |
5473 |
+#if 0 |
5474 |
+# if 0 |
5475 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
5476 |
# undef frexpf |
5477 |
# define frexpf rpl_frexpf |
5478 |
@@ -1115,7 +1622,7 @@ _GL_WARN_ON_USE (fmodl, "fmodl is unportable - " |
5479 |
_GL_FUNCDECL_RPL (frexpf, float, (float x, int *expptr) _GL_ARG_NONNULL ((2))); |
5480 |
_GL_CXXALIAS_RPL (frexpf, float, (float x, int *expptr)); |
5481 |
# else |
5482 |
-# if !@HAVE_FREXPF@ |
5483 |
+# if !1 |
5484 |
# undef frexpf |
5485 |
_GL_FUNCDECL_SYS (frexpf, float, (float x, int *expptr) _GL_ARG_NONNULL ((2))); |
5486 |
# endif |
5487 |
@@ -1139,8 +1646,8 @@ _GL_WARN_ON_USE (frexpf, "frexpf is unportable - " |
5488 |
If x is zero: mantissa = x, exp = 0. |
5489 |
If x is infinite or NaN: mantissa = x, exp unspecified. |
5490 |
Store exp in *EXPPTR and return mantissa. */ |
5491 |
-#if @GNULIB_FREXP@ |
5492 |
-# if @REPLACE_FREXP@ |
5493 |
+#if 1 |
5494 |
+# if 0 |
5495 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
5496 |
# undef frexp |
5497 |
# define frexp rpl_frexp |
5498 |
@@ -1167,7 +1674,7 @@ _GL_WARN_ON_USE (frexp, "frexp is unportable - " |
5499 |
If x is zero: mantissa = x, exp = 0. |
5500 |
If x is infinite or NaN: mantissa = x, exp unspecified. |
5501 |
Store exp in *EXPPTR and return mantissa. */ |
5502 |
-#if @GNULIB_FREXPL@ && @REPLACE_FREXPL@ |
5503 |
+#if 1 && 1 |
5504 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
5505 |
# undef frexpl |
5506 |
# define frexpl rpl_frexpl |
5507 |
@@ -1176,20 +1683,20 @@ _GL_FUNCDECL_RPL (frexpl, long double, |
5508 |
(long double x, int *expptr) _GL_ARG_NONNULL ((2))); |
5509 |
_GL_CXXALIAS_RPL (frexpl, long double, (long double x, int *expptr)); |
5510 |
#else |
5511 |
-# if !@HAVE_DECL_FREXPL@ |
5512 |
+# if !1 |
5513 |
_GL_FUNCDECL_SYS (frexpl, long double, |
5514 |
(long double x, int *expptr) _GL_ARG_NONNULL ((2))); |
5515 |
# endif |
5516 |
-# if @GNULIB_FREXPL@ |
5517 |
+# if 1 |
5518 |
_GL_CXXALIAS_SYS (frexpl, long double, (long double x, int *expptr)); |
5519 |
# endif |
5520 |
#endif |
5521 |
-#if @GNULIB_FREXPL@ && !(@REPLACE_FREXPL@ && !@HAVE_DECL_FREXPL@) |
5522 |
+#if 1 && !(1 && !1) |
5523 |
# if __GLIBC__ >= 2 |
5524 |
_GL_CXXALIASWARN (frexpl); |
5525 |
# endif |
5526 |
#endif |
5527 |
-#if !@GNULIB_FREXPL@ && defined GNULIB_POSIXCHECK |
5528 |
+#if !1 && defined GNULIB_POSIXCHECK |
5529 |
# undef frexpl |
5530 |
# if HAVE_RAW_DECL_FREXPL |
5531 |
_GL_WARN_ON_USE (frexpl, "frexpl is unportable - " |
5532 |
@@ -1199,8 +1706,8 @@ _GL_WARN_ON_USE (frexpl, "frexpl is unportable - " |
5533 |
|
5534 |
|
5535 |
/* Return sqrt(x^2+y^2). */ |
5536 |
-#if @GNULIB_HYPOTF@ |
5537 |
-# if @REPLACE_HYPOTF@ |
5538 |
+#if 0 |
5539 |
+# if 0 |
5540 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
5541 |
# undef hypotf |
5542 |
# define hypotf rpl_hypotf |
5543 |
@@ -1208,7 +1715,7 @@ _GL_WARN_ON_USE (frexpl, "frexpl is unportable - " |
5544 |
_GL_FUNCDECL_RPL (hypotf, float, (float x, float y)); |
5545 |
_GL_CXXALIAS_RPL (hypotf, float, (float x, float y)); |
5546 |
# else |
5547 |
-# if !@HAVE_HYPOTF@ |
5548 |
+# if !1 |
5549 |
_GL_FUNCDECL_SYS (hypotf, float, (float x, float y)); |
5550 |
# endif |
5551 |
_GL_CXXALIAS_SYS (hypotf, float, (float x, float y)); |
5552 |
@@ -1225,8 +1732,8 @@ _GL_WARN_ON_USE (hypotf, "hypotf is unportable - " |
5553 |
#endif |
5554 |
|
5555 |
/* Return sqrt(x^2+y^2). */ |
5556 |
-#if @GNULIB_HYPOT@ |
5557 |
-# if @REPLACE_HYPOT@ |
5558 |
+#if 0 |
5559 |
+# if 0 |
5560 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
5561 |
# undef hypot |
5562 |
# define hypot rpl_hypot |
5563 |
@@ -1248,8 +1755,8 @@ _GL_WARN_ON_USE (hypotf, "hypot has portability problems - " |
5564 |
#endif |
5565 |
|
5566 |
/* Return sqrt(x^2+y^2). */ |
5567 |
-#if @GNULIB_HYPOTL@ |
5568 |
-# if @REPLACE_HYPOTL@ |
5569 |
+#if 0 |
5570 |
+# if 0 |
5571 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
5572 |
# undef hypotl |
5573 |
# define hypotl rpl_hypotl |
5574 |
@@ -1257,7 +1764,7 @@ _GL_WARN_ON_USE (hypotf, "hypot has portability problems - " |
5575 |
_GL_FUNCDECL_RPL (hypotl, long double, (long double x, long double y)); |
5576 |
_GL_CXXALIAS_RPL (hypotl, long double, (long double x, long double y)); |
5577 |
# else |
5578 |
-# if !@HAVE_HYPOTL@ |
5579 |
+# if !1 |
5580 |
_GL_FUNCDECL_SYS (hypotl, long double, (long double x, long double y)); |
5581 |
# endif |
5582 |
_GL_CXXALIAS_SYS (hypotl, long double, (long double x, long double y)); |
5583 |
@@ -1274,8 +1781,8 @@ _GL_WARN_ON_USE (hypotl, "hypotl is unportable - " |
5584 |
#endif |
5585 |
|
5586 |
|
5587 |
-#if @GNULIB_ILOGBF@ |
5588 |
-# if @REPLACE_ILOGBF@ |
5589 |
+#if 0 |
5590 |
+# if 0 |
5591 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
5592 |
# undef ilogbf |
5593 |
# define ilogbf rpl_ilogbf |
5594 |
@@ -1283,7 +1790,7 @@ _GL_WARN_ON_USE (hypotl, "hypotl is unportable - " |
5595 |
_GL_FUNCDECL_RPL (ilogbf, int, (float x)); |
5596 |
_GL_CXXALIAS_RPL (ilogbf, int, (float x)); |
5597 |
# else |
5598 |
-# if !@HAVE_ILOGBF@ |
5599 |
+# if !1 |
5600 |
_GL_FUNCDECL_SYS (ilogbf, int, (float x)); |
5601 |
# endif |
5602 |
_GL_CXXALIAS_SYS (ilogbf, int, (float x)); |
5603 |
@@ -1297,8 +1804,8 @@ _GL_WARN_ON_USE (ilogbf, "ilogbf is unportable - " |
5604 |
# endif |
5605 |
#endif |
5606 |
|
5607 |
-#if @GNULIB_ILOGB@ |
5608 |
-# if @REPLACE_ILOGB@ |
5609 |
+#if 0 |
5610 |
+# if 0 |
5611 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
5612 |
# undef ilogb |
5613 |
# define ilogb rpl_ilogb |
5614 |
@@ -1306,7 +1813,7 @@ _GL_WARN_ON_USE (ilogbf, "ilogbf is unportable - " |
5615 |
_GL_FUNCDECL_RPL (ilogb, int, (double x)); |
5616 |
_GL_CXXALIAS_RPL (ilogb, int, (double x)); |
5617 |
# else |
5618 |
-# if !@HAVE_ILOGB@ |
5619 |
+# if !1 |
5620 |
_GL_FUNCDECL_SYS (ilogb, int, (double x)); |
5621 |
# endif |
5622 |
_GL_CXXALIAS_SYS (ilogb, int, (double x)); |
5623 |
@@ -1322,8 +1829,8 @@ _GL_WARN_ON_USE (ilogb, "ilogb is unportable - " |
5624 |
# endif |
5625 |
#endif |
5626 |
|
5627 |
-#if @GNULIB_ILOGBL@ |
5628 |
-# if @REPLACE_ILOGBL@ |
5629 |
+#if 0 |
5630 |
+# if 0 |
5631 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
5632 |
# undef ilogbl |
5633 |
# define ilogbl rpl_ilogbl |
5634 |
@@ -1331,7 +1838,7 @@ _GL_WARN_ON_USE (ilogb, "ilogb is unportable - " |
5635 |
_GL_FUNCDECL_RPL (ilogbl, int, (long double x)); |
5636 |
_GL_CXXALIAS_RPL (ilogbl, int, (long double x)); |
5637 |
# else |
5638 |
-# if !@HAVE_ILOGBL@ |
5639 |
+# if !1 |
5640 |
# undef ilogbl |
5641 |
_GL_FUNCDECL_SYS (ilogbl, int, (long double x)); |
5642 |
# endif |
5643 |
@@ -1347,7 +1854,7 @@ _GL_WARN_ON_USE (ilogbl, "ilogbl is unportable - " |
5644 |
#endif |
5645 |
|
5646 |
|
5647 |
-#if @GNULIB_MDA_J0@ |
5648 |
+#if 1 |
5649 |
/* On native Windows, map 'j0' to '_j0', so that -loldnames is not |
5650 |
required. In C++ with GNULIB_NAMESPACE, avoid differences between |
5651 |
platforms by defining GNULIB_NAMESPACE::j0 always. */ |
5652 |
@@ -1363,7 +1870,7 @@ _GL_CXXALIAS_SYS (j0, double, (double x)); |
5653 |
_GL_CXXALIASWARN (j0); |
5654 |
#endif |
5655 |
|
5656 |
-#if @GNULIB_MDA_J1@ |
5657 |
+#if 1 |
5658 |
/* On native Windows, map 'j1' to '_j1', so that -loldnames is not |
5659 |
required. In C++ with GNULIB_NAMESPACE, avoid differences between |
5660 |
platforms by defining GNULIB_NAMESPACE::j1 always. */ |
5661 |
@@ -1379,7 +1886,7 @@ _GL_CXXALIAS_SYS (j1, double, (double x)); |
5662 |
_GL_CXXALIASWARN (j1); |
5663 |
#endif |
5664 |
|
5665 |
-#if @GNULIB_MDA_JN@ |
5666 |
+#if 1 |
5667 |
/* On native Windows, map 'jn' to '_jn', so that -loldnames is not |
5668 |
required. In C++ with GNULIB_NAMESPACE, avoid differences between |
5669 |
platforms by defining GNULIB_NAMESPACE::jn always. */ |
5670 |
@@ -1397,8 +1904,8 @@ _GL_CXXALIASWARN (jn); |
5671 |
|
5672 |
|
5673 |
/* Return x * 2^exp. */ |
5674 |
-#if @GNULIB_LDEXPF@ |
5675 |
-# if !@HAVE_LDEXPF@ |
5676 |
+#if 0 |
5677 |
+# if !1 |
5678 |
# undef ldexpf |
5679 |
_GL_FUNCDECL_SYS (ldexpf, float, (float x, int exp)); |
5680 |
# endif |
5681 |
@@ -1415,7 +1922,7 @@ _GL_WARN_ON_USE (ldexpf, "ldexpf is unportable - " |
5682 |
#endif |
5683 |
|
5684 |
/* Return x * 2^exp. */ |
5685 |
-#if @GNULIB_LDEXPL@ && @REPLACE_LDEXPL@ |
5686 |
+#if 0 && 0 |
5687 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
5688 |
# undef ldexpl |
5689 |
# define ldexpl rpl_ldexpl |
5690 |
@@ -1423,19 +1930,19 @@ _GL_WARN_ON_USE (ldexpf, "ldexpf is unportable - " |
5691 |
_GL_FUNCDECL_RPL (ldexpl, long double, (long double x, int exp)); |
5692 |
_GL_CXXALIAS_RPL (ldexpl, long double, (long double x, int exp)); |
5693 |
#else |
5694 |
-# if !@HAVE_DECL_LDEXPL@ |
5695 |
+# if !1 |
5696 |
_GL_FUNCDECL_SYS (ldexpl, long double, (long double x, int exp)); |
5697 |
# endif |
5698 |
-# if @GNULIB_LDEXPL@ |
5699 |
+# if 0 |
5700 |
_GL_CXXALIAS_SYS (ldexpl, long double, (long double x, int exp)); |
5701 |
# endif |
5702 |
#endif |
5703 |
-#if @GNULIB_LDEXPL@ |
5704 |
+#if 0 |
5705 |
# if __GLIBC__ >= 2 |
5706 |
_GL_CXXALIASWARN (ldexpl); |
5707 |
# endif |
5708 |
#endif |
5709 |
-#if !@GNULIB_LDEXPL@ && defined GNULIB_POSIXCHECK |
5710 |
+#if !0 && defined GNULIB_POSIXCHECK |
5711 |
# undef ldexpl |
5712 |
# if HAVE_RAW_DECL_LDEXPL |
5713 |
_GL_WARN_ON_USE (ldexpl, "ldexpl is unportable - " |
5714 |
@@ -1444,8 +1951,8 @@ _GL_WARN_ON_USE (ldexpl, "ldexpl is unportable - " |
5715 |
#endif |
5716 |
|
5717 |
|
5718 |
-#if @GNULIB_LOGF@ |
5719 |
-# if @REPLACE_LOGF@ |
5720 |
+#if 0 |
5721 |
+# if 0 |
5722 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
5723 |
# undef logf |
5724 |
# define logf rpl_logf |
5725 |
@@ -1453,7 +1960,7 @@ _GL_WARN_ON_USE (ldexpl, "ldexpl is unportable - " |
5726 |
_GL_FUNCDECL_RPL (logf, float, (float x)); |
5727 |
_GL_CXXALIAS_RPL (logf, float, (float x)); |
5728 |
# else |
5729 |
-# if !@HAVE_LOGF@ |
5730 |
+# if !1 |
5731 |
# undef logf |
5732 |
_GL_FUNCDECL_SYS (logf, float, (float x)); |
5733 |
# endif |
5734 |
@@ -1468,8 +1975,8 @@ _GL_WARN_ON_USE (logf, "logf is unportable - " |
5735 |
# endif |
5736 |
#endif |
5737 |
|
5738 |
-#if @GNULIB_LOG@ |
5739 |
-# if @REPLACE_LOG@ |
5740 |
+#if 0 |
5741 |
+# if 0 |
5742 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
5743 |
# undef log |
5744 |
# define log rpl_log |
5745 |
@@ -1490,8 +1997,8 @@ _GL_WARN_ON_USE (log, "log has portability problems - " |
5746 |
# endif |
5747 |
#endif |
5748 |
|
5749 |
-#if @GNULIB_LOGL@ |
5750 |
-# if @REPLACE_LOGL@ |
5751 |
+#if 0 |
5752 |
+# if 0 |
5753 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
5754 |
# undef logl |
5755 |
# define logl rpl_logl |
5756 |
@@ -1499,7 +2006,7 @@ _GL_WARN_ON_USE (log, "log has portability problems - " |
5757 |
_GL_FUNCDECL_RPL (logl, long double, (long double x)); |
5758 |
_GL_CXXALIAS_RPL (logl, long double, (long double x)); |
5759 |
# else |
5760 |
-# if !@HAVE_LOGL@ || !@HAVE_DECL_LOGL@ |
5761 |
+# if !1 || !1 |
5762 |
# undef logl |
5763 |
_GL_FUNCDECL_SYS (logl, long double, (long double x)); |
5764 |
# endif |
5765 |
@@ -1517,8 +2024,8 @@ _GL_WARN_ON_USE (logl, "logl is unportable - " |
5766 |
#endif |
5767 |
|
5768 |
|
5769 |
-#if @GNULIB_LOG10F@ |
5770 |
-# if @REPLACE_LOG10F@ |
5771 |
+#if 0 |
5772 |
+# if 0 |
5773 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
5774 |
# undef log10f |
5775 |
# define log10f rpl_log10f |
5776 |
@@ -1526,7 +2033,7 @@ _GL_WARN_ON_USE (logl, "logl is unportable - " |
5777 |
_GL_FUNCDECL_RPL (log10f, float, (float x)); |
5778 |
_GL_CXXALIAS_RPL (log10f, float, (float x)); |
5779 |
# else |
5780 |
-# if !@HAVE_LOG10F@ |
5781 |
+# if !1 |
5782 |
# undef log10f |
5783 |
_GL_FUNCDECL_SYS (log10f, float, (float x)); |
5784 |
# endif |
5785 |
@@ -1541,8 +2048,8 @@ _GL_WARN_ON_USE (log10f, "log10f is unportable - " |
5786 |
# endif |
5787 |
#endif |
5788 |
|
5789 |
-#if @GNULIB_LOG10@ |
5790 |
-# if @REPLACE_LOG10@ |
5791 |
+#if 0 |
5792 |
+# if 0 |
5793 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
5794 |
# undef log10 |
5795 |
# define log10 rpl_log10 |
5796 |
@@ -1563,8 +2070,8 @@ _GL_WARN_ON_USE (log10, "log10 has portability problems - " |
5797 |
# endif |
5798 |
#endif |
5799 |
|
5800 |
-#if @GNULIB_LOG10L@ |
5801 |
-# if @REPLACE_LOG10L@ |
5802 |
+#if 0 |
5803 |
+# if 0 |
5804 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
5805 |
# undef log10l |
5806 |
# define log10l rpl_log10l |
5807 |
@@ -1572,7 +2079,7 @@ _GL_WARN_ON_USE (log10, "log10 has portability problems - " |
5808 |
_GL_FUNCDECL_RPL (log10l, long double, (long double x)); |
5809 |
_GL_CXXALIAS_RPL (log10l, long double, (long double x)); |
5810 |
# else |
5811 |
-# if !@HAVE_LOG10L@ || !@HAVE_DECL_LOG10L@ |
5812 |
+# if !1 || !1 |
5813 |
# undef log10l |
5814 |
_GL_FUNCDECL_SYS (log10l, long double, (long double x)); |
5815 |
# endif |
5816 |
@@ -1590,8 +2097,8 @@ _GL_WARN_ON_USE (log10l, "log10l is unportable - " |
5817 |
#endif |
5818 |
|
5819 |
|
5820 |
-#if @GNULIB_LOG1PF@ |
5821 |
-# if @REPLACE_LOG1PF@ |
5822 |
+#if 0 |
5823 |
+# if 0 |
5824 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
5825 |
# undef log1pf |
5826 |
# define log1pf rpl_log1pf |
5827 |
@@ -1599,7 +2106,7 @@ _GL_WARN_ON_USE (log10l, "log10l is unportable - " |
5828 |
_GL_FUNCDECL_RPL (log1pf, float, (float x)); |
5829 |
_GL_CXXALIAS_RPL (log1pf, float, (float x)); |
5830 |
# else |
5831 |
-# if !@HAVE_LOG1PF@ |
5832 |
+# if !1 |
5833 |
_GL_FUNCDECL_SYS (log1pf, float, (float x)); |
5834 |
# endif |
5835 |
_GL_CXXALIAS_SYS (log1pf, float, (float x)); |
5836 |
@@ -1613,8 +2120,8 @@ _GL_WARN_ON_USE (log1pf, "log1pf is unportable - " |
5837 |
# endif |
5838 |
#endif |
5839 |
|
5840 |
-#if @GNULIB_LOG1P@ |
5841 |
-# if @REPLACE_LOG1P@ |
5842 |
+#if 0 |
5843 |
+# if 0 |
5844 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
5845 |
# undef log1p |
5846 |
# define log1p rpl_log1p |
5847 |
@@ -1622,7 +2129,7 @@ _GL_WARN_ON_USE (log1pf, "log1pf is unportable - " |
5848 |
_GL_FUNCDECL_RPL (log1p, double, (double x)); |
5849 |
_GL_CXXALIAS_RPL (log1p, double, (double x)); |
5850 |
# else |
5851 |
-# if !@HAVE_LOG1P@ |
5852 |
+# if !1 |
5853 |
_GL_FUNCDECL_SYS (log1p, double, (double x)); |
5854 |
# endif |
5855 |
_GL_CXXALIAS_SYS (log1p, double, (double x)); |
5856 |
@@ -1638,8 +2145,8 @@ _GL_WARN_ON_USE (log1p, "log1p has portability problems - " |
5857 |
# endif |
5858 |
#endif |
5859 |
|
5860 |
-#if @GNULIB_LOG1PL@ |
5861 |
-# if @REPLACE_LOG1PL@ |
5862 |
+#if 0 |
5863 |
+# if 0 |
5864 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
5865 |
# undef log1pl |
5866 |
# define log1pl rpl_log1pl |
5867 |
@@ -1647,7 +2154,7 @@ _GL_WARN_ON_USE (log1p, "log1p has portability problems - " |
5868 |
_GL_FUNCDECL_RPL (log1pl, long double, (long double x)); |
5869 |
_GL_CXXALIAS_RPL (log1pl, long double, (long double x)); |
5870 |
# else |
5871 |
-# if !@HAVE_LOG1PL@ |
5872 |
+# if !1 |
5873 |
_GL_FUNCDECL_SYS (log1pl, long double, (long double x)); |
5874 |
# endif |
5875 |
_GL_CXXALIAS_SYS (log1pl, long double, (long double x)); |
5876 |
@@ -1662,8 +2169,8 @@ _GL_WARN_ON_USE (log1pl, "log1pl has portability problems - " |
5877 |
#endif |
5878 |
|
5879 |
|
5880 |
-#if @GNULIB_LOG2F@ |
5881 |
-# if @REPLACE_LOG2F@ |
5882 |
+#if 0 |
5883 |
+# if 0 |
5884 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
5885 |
# undef log2f |
5886 |
# define log2f rpl_log2f |
5887 |
@@ -1671,7 +2178,7 @@ _GL_WARN_ON_USE (log1pl, "log1pl has portability problems - " |
5888 |
_GL_FUNCDECL_RPL (log2f, float, (float x)); |
5889 |
_GL_CXXALIAS_RPL (log2f, float, (float x)); |
5890 |
# else |
5891 |
-# if !@HAVE_DECL_LOG2F@ |
5892 |
+# if !1 |
5893 |
# undef log2f |
5894 |
_GL_FUNCDECL_SYS (log2f, float, (float x)); |
5895 |
# endif |
5896 |
@@ -1686,8 +2193,8 @@ _GL_WARN_ON_USE (log2f, "log2f is unportable - " |
5897 |
# endif |
5898 |
#endif |
5899 |
|
5900 |
-#if @GNULIB_LOG2@ |
5901 |
-# if @REPLACE_LOG2@ |
5902 |
+#if 0 |
5903 |
+# if 0 |
5904 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
5905 |
# undef log2 |
5906 |
# define log2 rpl_log2 |
5907 |
@@ -1695,7 +2202,7 @@ _GL_WARN_ON_USE (log2f, "log2f is unportable - " |
5908 |
_GL_FUNCDECL_RPL (log2, double, (double x)); |
5909 |
_GL_CXXALIAS_RPL (log2, double, (double x)); |
5910 |
# else |
5911 |
-# if !@HAVE_DECL_LOG2@ |
5912 |
+# if !1 |
5913 |
# undef log2 |
5914 |
_GL_FUNCDECL_SYS (log2, double, (double x)); |
5915 |
# endif |
5916 |
@@ -1712,8 +2219,8 @@ _GL_WARN_ON_USE (log2, "log2 is unportable - " |
5917 |
# endif |
5918 |
#endif |
5919 |
|
5920 |
-#if @GNULIB_LOG2L@ |
5921 |
-# if @REPLACE_LOG2L@ |
5922 |
+#if 0 |
5923 |
+# if 0 |
5924 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
5925 |
# undef log2l |
5926 |
# define log2l rpl_log2l |
5927 |
@@ -1721,7 +2228,7 @@ _GL_WARN_ON_USE (log2, "log2 is unportable - " |
5928 |
_GL_FUNCDECL_RPL (log2l, long double, (long double x)); |
5929 |
_GL_CXXALIAS_RPL (log2l, long double, (long double x)); |
5930 |
# else |
5931 |
-# if !@HAVE_DECL_LOG2L@ |
5932 |
+# if !1 |
5933 |
_GL_FUNCDECL_SYS (log2l, long double, (long double x)); |
5934 |
# endif |
5935 |
_GL_CXXALIAS_SYS (log2l, long double, (long double x)); |
5936 |
@@ -1736,8 +2243,8 @@ _GL_WARN_ON_USE (log2l, "log2l is unportable - " |
5937 |
#endif |
5938 |
|
5939 |
|
5940 |
-#if @GNULIB_LOGBF@ |
5941 |
-# if @REPLACE_LOGBF@ |
5942 |
+#if 0 |
5943 |
+# if 0 |
5944 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
5945 |
# undef logbf |
5946 |
# define logbf rpl_logbf |
5947 |
@@ -1745,7 +2252,7 @@ _GL_WARN_ON_USE (log2l, "log2l is unportable - " |
5948 |
_GL_FUNCDECL_RPL (logbf, float, (float x)); |
5949 |
_GL_CXXALIAS_RPL (logbf, float, (float x)); |
5950 |
# else |
5951 |
-# if !@HAVE_LOGBF@ |
5952 |
+# if !1 |
5953 |
_GL_FUNCDECL_SYS (logbf, float, (float x)); |
5954 |
# endif |
5955 |
_GL_CXXALIAS_SYS (logbf, float, (float x)); |
5956 |
@@ -1759,8 +2266,8 @@ _GL_WARN_ON_USE (logbf, "logbf is unportable - " |
5957 |
# endif |
5958 |
#endif |
5959 |
|
5960 |
-#if @GNULIB_LOGB@ |
5961 |
-# if @REPLACE_LOGB@ |
5962 |
+#if 0 |
5963 |
+# if 0 |
5964 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
5965 |
# undef logb |
5966 |
# define logb rpl_logb |
5967 |
@@ -1768,7 +2275,7 @@ _GL_WARN_ON_USE (logbf, "logbf is unportable - " |
5968 |
_GL_FUNCDECL_RPL (logb, double, (double x)); |
5969 |
_GL_CXXALIAS_RPL (logb, double, (double x)); |
5970 |
# else |
5971 |
-# if !@HAVE_DECL_LOGB@ |
5972 |
+# if !1 |
5973 |
_GL_FUNCDECL_SYS (logb, double, (double x)); |
5974 |
# endif |
5975 |
_GL_CXXALIAS_SYS (logb, double, (double x)); |
5976 |
@@ -1784,8 +2291,8 @@ _GL_WARN_ON_USE (logb, "logb is unportable - " |
5977 |
# endif |
5978 |
#endif |
5979 |
|
5980 |
-#if @GNULIB_LOGBL@ |
5981 |
-# if @REPLACE_LOGBL@ |
5982 |
+#if 0 |
5983 |
+# if 0 |
5984 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
5985 |
# undef logbl |
5986 |
# define logbl rpl_logbl |
5987 |
@@ -1793,7 +2300,7 @@ _GL_WARN_ON_USE (logb, "logb is unportable - " |
5988 |
_GL_FUNCDECL_RPL (logbl, long double, (long double x)); |
5989 |
_GL_CXXALIAS_RPL (logbl, long double, (long double x)); |
5990 |
# else |
5991 |
-# if !@HAVE_LOGBL@ |
5992 |
+# if !1 |
5993 |
_GL_FUNCDECL_SYS (logbl, long double, (long double x)); |
5994 |
# endif |
5995 |
_GL_CXXALIAS_SYS (logbl, long double, (long double x)); |
5996 |
@@ -1808,8 +2315,8 @@ _GL_WARN_ON_USE (logbl, "logbl is unportable - " |
5997 |
#endif |
5998 |
|
5999 |
|
6000 |
-#if @GNULIB_MODFF@ |
6001 |
-# if @REPLACE_MODFF@ |
6002 |
+#if 0 |
6003 |
+# if 0 |
6004 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
6005 |
# undef modff |
6006 |
# define modff rpl_modff |
6007 |
@@ -1817,7 +2324,7 @@ _GL_WARN_ON_USE (logbl, "logbl is unportable - " |
6008 |
_GL_FUNCDECL_RPL (modff, float, (float x, float *iptr) _GL_ARG_NONNULL ((2))); |
6009 |
_GL_CXXALIAS_RPL (modff, float, (float x, float *iptr)); |
6010 |
# else |
6011 |
-# if !@HAVE_MODFF@ |
6012 |
+# if !1 |
6013 |
# undef modff |
6014 |
_GL_FUNCDECL_SYS (modff, float, (float x, float *iptr) _GL_ARG_NONNULL ((2))); |
6015 |
# endif |
6016 |
@@ -1832,8 +2339,8 @@ _GL_WARN_ON_USE (modff, "modff is unportable - " |
6017 |
# endif |
6018 |
#endif |
6019 |
|
6020 |
-#if @GNULIB_MODF@ |
6021 |
-# if @REPLACE_MODF@ |
6022 |
+#if 0 |
6023 |
+# if 0 |
6024 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
6025 |
# undef modf |
6026 |
# define modf rpl_modf |
6027 |
@@ -1854,8 +2361,8 @@ _GL_WARN_ON_USE (modf, "modf has portability problems - " |
6028 |
# endif |
6029 |
#endif |
6030 |
|
6031 |
-#if @GNULIB_MODFL@ |
6032 |
-# if @REPLACE_MODFL@ |
6033 |
+#if 0 |
6034 |
+# if 0 |
6035 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
6036 |
# undef modfl |
6037 |
# define modfl rpl_modfl |
6038 |
@@ -1864,7 +2371,7 @@ _GL_FUNCDECL_RPL (modfl, long double, (long double x, long double *iptr) |
6039 |
_GL_ARG_NONNULL ((2))); |
6040 |
_GL_CXXALIAS_RPL (modfl, long double, (long double x, long double *iptr)); |
6041 |
# else |
6042 |
-# if !@HAVE_MODFL@ |
6043 |
+# if !1 |
6044 |
# undef modfl |
6045 |
_GL_FUNCDECL_SYS (modfl, long double, (long double x, long double *iptr) |
6046 |
_GL_ARG_NONNULL ((2))); |
6047 |
@@ -1883,8 +2390,8 @@ _GL_WARN_ON_USE (modfl, "modfl is unportable - " |
6048 |
#endif |
6049 |
|
6050 |
|
6051 |
-#if @GNULIB_POWF@ |
6052 |
-# if !@HAVE_POWF@ |
6053 |
+#if 0 |
6054 |
+# if !1 |
6055 |
# undef powf |
6056 |
_GL_FUNCDECL_SYS (powf, float, (float x, float y)); |
6057 |
# endif |
6058 |
@@ -1899,8 +2406,8 @@ _GL_WARN_ON_USE (powf, "powf is unportable - " |
6059 |
#endif |
6060 |
|
6061 |
|
6062 |
-#if @GNULIB_REMAINDERF@ |
6063 |
-# if @REPLACE_REMAINDERF@ |
6064 |
+#if 0 |
6065 |
+# if 0 |
6066 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
6067 |
# undef remainderf |
6068 |
# define remainderf rpl_remainderf |
6069 |
@@ -1908,7 +2415,7 @@ _GL_WARN_ON_USE (powf, "powf is unportable - " |
6070 |
_GL_FUNCDECL_RPL (remainderf, float, (float x, float y)); |
6071 |
_GL_CXXALIAS_RPL (remainderf, float, (float x, float y)); |
6072 |
# else |
6073 |
-# if !@HAVE_REMAINDERF@ |
6074 |
+# if !1 |
6075 |
_GL_FUNCDECL_SYS (remainderf, float, (float x, float y)); |
6076 |
# endif |
6077 |
_GL_CXXALIAS_SYS (remainderf, float, (float x, float y)); |
6078 |
@@ -1922,8 +2429,8 @@ _GL_WARN_ON_USE (remainderf, "remainderf is unportable - " |
6079 |
# endif |
6080 |
#endif |
6081 |
|
6082 |
-#if @GNULIB_REMAINDER@ |
6083 |
-# if @REPLACE_REMAINDER@ |
6084 |
+#if 0 |
6085 |
+# if 0 |
6086 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
6087 |
# undef remainder |
6088 |
# define remainder rpl_remainder |
6089 |
@@ -1931,7 +2438,7 @@ _GL_WARN_ON_USE (remainderf, "remainderf is unportable - " |
6090 |
_GL_FUNCDECL_RPL (remainder, double, (double x, double y)); |
6091 |
_GL_CXXALIAS_RPL (remainder, double, (double x, double y)); |
6092 |
# else |
6093 |
-# if !@HAVE_REMAINDER@ || !@HAVE_DECL_REMAINDER@ |
6094 |
+# if !1 || !1 |
6095 |
_GL_FUNCDECL_SYS (remainder, double, (double x, double y)); |
6096 |
# endif |
6097 |
_GL_CXXALIAS_SYS (remainder, double, (double x, double y)); |
6098 |
@@ -1947,8 +2454,8 @@ _GL_WARN_ON_USE (remainder, "remainder is unportable - " |
6099 |
# endif |
6100 |
#endif |
6101 |
|
6102 |
-#if @GNULIB_REMAINDERL@ |
6103 |
-# if @REPLACE_REMAINDERL@ |
6104 |
+#if 0 |
6105 |
+# if 0 |
6106 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
6107 |
# undef remainderl |
6108 |
# define remainderl rpl_remainderl |
6109 |
@@ -1956,7 +2463,7 @@ _GL_WARN_ON_USE (remainder, "remainder is unportable - " |
6110 |
_GL_FUNCDECL_RPL (remainderl, long double, (long double x, long double y)); |
6111 |
_GL_CXXALIAS_RPL (remainderl, long double, (long double x, long double y)); |
6112 |
# else |
6113 |
-# if !@HAVE_DECL_REMAINDERL@ |
6114 |
+# if !1 |
6115 |
# undef remainderl |
6116 |
# if !(defined __cplusplus && defined _AIX) |
6117 |
_GL_FUNCDECL_SYS (remainderl, long double, (long double x, long double y)); |
6118 |
@@ -1974,8 +2481,8 @@ _GL_WARN_ON_USE (remainderl, "remainderl is unportable - " |
6119 |
#endif |
6120 |
|
6121 |
|
6122 |
-#if @GNULIB_RINTF@ |
6123 |
-# if !@HAVE_DECL_RINTF@ |
6124 |
+#if 0 |
6125 |
+# if !1 |
6126 |
_GL_FUNCDECL_SYS (rintf, float, (float x)); |
6127 |
# endif |
6128 |
_GL_CXXALIAS_SYS (rintf, float, (float x)); |
6129 |
@@ -1988,8 +2495,8 @@ _GL_WARN_ON_USE (rintf, "rintf is unportable - " |
6130 |
# endif |
6131 |
#endif |
6132 |
|
6133 |
-#if @GNULIB_RINT@ |
6134 |
-# if !@HAVE_RINT@ |
6135 |
+#if 0 |
6136 |
+# if !1 |
6137 |
_GL_FUNCDECL_SYS (rint, double, (double x)); |
6138 |
# endif |
6139 |
_GL_CXXALIAS_SYS (rint, double, (double x)); |
6140 |
@@ -2004,8 +2511,8 @@ _GL_WARN_ON_USE (rint, "rint is unportable - " |
6141 |
# endif |
6142 |
#endif |
6143 |
|
6144 |
-#if @GNULIB_RINTL@ |
6145 |
-# if @REPLACE_RINTL@ |
6146 |
+#if 0 |
6147 |
+# if 0 |
6148 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
6149 |
# undef rintl |
6150 |
# define rintl rpl_rintl |
6151 |
@@ -2013,7 +2520,7 @@ _GL_WARN_ON_USE (rint, "rint is unportable - " |
6152 |
_GL_FUNCDECL_RPL (rintl, long double, (long double x)); |
6153 |
_GL_CXXALIAS_RPL (rintl, long double, (long double x)); |
6154 |
# else |
6155 |
-# if !@HAVE_RINTL@ |
6156 |
+# if !1 |
6157 |
_GL_FUNCDECL_SYS (rintl, long double, (long double x)); |
6158 |
# endif |
6159 |
_GL_CXXALIAS_SYS (rintl, long double, (long double x)); |
6160 |
@@ -2028,8 +2535,8 @@ _GL_WARN_ON_USE (rintl, "rintl is unportable - " |
6161 |
#endif |
6162 |
|
6163 |
|
6164 |
-#if @GNULIB_ROUNDF@ |
6165 |
-# if @REPLACE_ROUNDF@ |
6166 |
+#if 0 |
6167 |
+# if 0 |
6168 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
6169 |
# undef roundf |
6170 |
# define roundf rpl_roundf |
6171 |
@@ -2037,7 +2544,7 @@ _GL_WARN_ON_USE (rintl, "rintl is unportable - " |
6172 |
_GL_FUNCDECL_RPL (roundf, float, (float x)); |
6173 |
_GL_CXXALIAS_RPL (roundf, float, (float x)); |
6174 |
# else |
6175 |
-# if !@HAVE_DECL_ROUNDF@ |
6176 |
+# if !1 |
6177 |
_GL_FUNCDECL_SYS (roundf, float, (float x)); |
6178 |
# endif |
6179 |
_GL_CXXALIAS_SYS (roundf, float, (float x)); |
6180 |
@@ -2051,8 +2558,8 @@ _GL_WARN_ON_USE (roundf, "roundf is unportable - " |
6181 |
# endif |
6182 |
#endif |
6183 |
|
6184 |
-#if @GNULIB_ROUND@ |
6185 |
-# if @REPLACE_ROUND@ |
6186 |
+#if 0 |
6187 |
+# if 0 |
6188 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
6189 |
# undef round |
6190 |
# define round rpl_round |
6191 |
@@ -2060,7 +2567,7 @@ _GL_WARN_ON_USE (roundf, "roundf is unportable - " |
6192 |
_GL_FUNCDECL_RPL (round, double, (double x)); |
6193 |
_GL_CXXALIAS_RPL (round, double, (double x)); |
6194 |
# else |
6195 |
-# if !@HAVE_DECL_ROUND@ |
6196 |
+# if !1 |
6197 |
_GL_FUNCDECL_SYS (round, double, (double x)); |
6198 |
# endif |
6199 |
_GL_CXXALIAS_SYS (round, double, (double x)); |
6200 |
@@ -2076,8 +2583,8 @@ _GL_WARN_ON_USE (round, "round is unportable - " |
6201 |
# endif |
6202 |
#endif |
6203 |
|
6204 |
-#if @GNULIB_ROUNDL@ |
6205 |
-# if @REPLACE_ROUNDL@ |
6206 |
+#if 0 |
6207 |
+# if 0 |
6208 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
6209 |
# undef roundl |
6210 |
# define roundl rpl_roundl |
6211 |
@@ -2085,7 +2592,7 @@ _GL_WARN_ON_USE (round, "round is unportable - " |
6212 |
_GL_FUNCDECL_RPL (roundl, long double, (long double x)); |
6213 |
_GL_CXXALIAS_RPL (roundl, long double, (long double x)); |
6214 |
# else |
6215 |
-# if !@HAVE_DECL_ROUNDL@ |
6216 |
+# if !1 |
6217 |
# undef roundl |
6218 |
# if !(defined __cplusplus && defined _AIX) |
6219 |
_GL_FUNCDECL_SYS (roundl, long double, (long double x)); |
6220 |
@@ -2103,8 +2610,8 @@ _GL_WARN_ON_USE (roundl, "roundl is unportable - " |
6221 |
#endif |
6222 |
|
6223 |
|
6224 |
-#if @GNULIB_SINF@ |
6225 |
-# if @REPLACE_SINF@ |
6226 |
+#if 0 |
6227 |
+# if 0 |
6228 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
6229 |
# undef sinf |
6230 |
# define sinf rpl_sinf |
6231 |
@@ -2112,7 +2619,7 @@ _GL_WARN_ON_USE (roundl, "roundl is unportable - " |
6232 |
_GL_FUNCDECL_RPL (sinf, float, (float x)); |
6233 |
_GL_CXXALIAS_RPL (sinf, float, (float x)); |
6234 |
# else |
6235 |
-# if !@HAVE_SINF@ |
6236 |
+# if !1 |
6237 |
# undef sinf |
6238 |
_GL_FUNCDECL_SYS (sinf, float, (float x)); |
6239 |
# endif |
6240 |
@@ -2127,8 +2634,8 @@ _GL_WARN_ON_USE (sinf, "sinf is unportable - " |
6241 |
# endif |
6242 |
#endif |
6243 |
|
6244 |
-#if @GNULIB_SINL@ |
6245 |
-# if !@HAVE_SINL@ || !@HAVE_DECL_SINL@ |
6246 |
+#if 0 |
6247 |
+# if !1 || !1 |
6248 |
# undef sinl |
6249 |
_GL_FUNCDECL_SYS (sinl, long double, (long double x)); |
6250 |
# endif |
6251 |
@@ -2145,8 +2652,8 @@ _GL_WARN_ON_USE (sinl, "sinl is unportable - " |
6252 |
#endif |
6253 |
|
6254 |
|
6255 |
-#if @GNULIB_SINHF@ |
6256 |
-# if @REPLACE_SINHF@ |
6257 |
+#if 0 |
6258 |
+# if 0 |
6259 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
6260 |
# undef sinhf |
6261 |
# define sinhf rpl_sinhf |
6262 |
@@ -2154,7 +2661,7 @@ _GL_WARN_ON_USE (sinl, "sinl is unportable - " |
6263 |
_GL_FUNCDECL_RPL (sinhf, float, (float x)); |
6264 |
_GL_CXXALIAS_RPL (sinhf, float, (float x)); |
6265 |
# else |
6266 |
-# if !@HAVE_SINHF@ |
6267 |
+# if !1 |
6268 |
# undef sinhf |
6269 |
_GL_FUNCDECL_SYS (sinhf, float, (float x)); |
6270 |
# endif |
6271 |
@@ -2170,8 +2677,8 @@ _GL_WARN_ON_USE (sinhf, "sinhf is unportable - " |
6272 |
#endif |
6273 |
|
6274 |
|
6275 |
-#if @GNULIB_SQRTF@ |
6276 |
-# if @REPLACE_SQRTF@ |
6277 |
+#if 0 |
6278 |
+# if 0 |
6279 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
6280 |
# undef sqrtf |
6281 |
# define sqrtf rpl_sqrtf |
6282 |
@@ -2179,7 +2686,7 @@ _GL_WARN_ON_USE (sinhf, "sinhf is unportable - " |
6283 |
_GL_FUNCDECL_RPL (sqrtf, float, (float x)); |
6284 |
_GL_CXXALIAS_RPL (sqrtf, float, (float x)); |
6285 |
# else |
6286 |
-# if !@HAVE_SQRTF@ |
6287 |
+# if !1 |
6288 |
# undef sqrtf |
6289 |
_GL_FUNCDECL_SYS (sqrtf, float, (float x)); |
6290 |
# endif |
6291 |
@@ -2194,8 +2701,8 @@ _GL_WARN_ON_USE (sqrtf, "sqrtf is unportable - " |
6292 |
# endif |
6293 |
#endif |
6294 |
|
6295 |
-#if @GNULIB_SQRTL@ |
6296 |
-# if @REPLACE_SQRTL@ |
6297 |
+#if 0 |
6298 |
+# if 0 |
6299 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
6300 |
# undef sqrtl |
6301 |
# define sqrtl rpl_sqrtl |
6302 |
@@ -2203,7 +2710,7 @@ _GL_WARN_ON_USE (sqrtf, "sqrtf is unportable - " |
6303 |
_GL_FUNCDECL_RPL (sqrtl, long double, (long double x)); |
6304 |
_GL_CXXALIAS_RPL (sqrtl, long double, (long double x)); |
6305 |
# else |
6306 |
-# if !@HAVE_SQRTL@ || !@HAVE_DECL_SQRTL@ |
6307 |
+# if !1 || !1 |
6308 |
# undef sqrtl |
6309 |
_GL_FUNCDECL_SYS (sqrtl, long double, (long double x)); |
6310 |
# endif |
6311 |
@@ -2221,8 +2728,8 @@ _GL_WARN_ON_USE (sqrtl, "sqrtl is unportable - " |
6312 |
#endif |
6313 |
|
6314 |
|
6315 |
-#if @GNULIB_TANF@ |
6316 |
-# if @REPLACE_TANF@ |
6317 |
+#if 0 |
6318 |
+# if 0 |
6319 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
6320 |
# undef tanf |
6321 |
# define tanf rpl_tanf |
6322 |
@@ -2230,7 +2737,7 @@ _GL_WARN_ON_USE (sqrtl, "sqrtl is unportable - " |
6323 |
_GL_FUNCDECL_RPL (tanf, float, (float x)); |
6324 |
_GL_CXXALIAS_RPL (tanf, float, (float x)); |
6325 |
# else |
6326 |
-# if !@HAVE_TANF@ |
6327 |
+# if !1 |
6328 |
# undef tanf |
6329 |
_GL_FUNCDECL_SYS (tanf, float, (float x)); |
6330 |
# endif |
6331 |
@@ -2245,8 +2752,8 @@ _GL_WARN_ON_USE (tanf, "tanf is unportable - " |
6332 |
# endif |
6333 |
#endif |
6334 |
|
6335 |
-#if @GNULIB_TANL@ |
6336 |
-# if !@HAVE_TANL@ || !@HAVE_DECL_TANL@ |
6337 |
+#if 0 |
6338 |
+# if !1 || !1 |
6339 |
# undef tanl |
6340 |
_GL_FUNCDECL_SYS (tanl, long double, (long double x)); |
6341 |
# endif |
6342 |
@@ -2263,8 +2770,8 @@ _GL_WARN_ON_USE (tanl, "tanl is unportable - " |
6343 |
#endif |
6344 |
|
6345 |
|
6346 |
-#if @GNULIB_TANHF@ |
6347 |
-# if @REPLACE_TANHF@ |
6348 |
+#if 0 |
6349 |
+# if 0 |
6350 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
6351 |
# undef tanhf |
6352 |
# define tanhf rpl_tanhf |
6353 |
@@ -2272,7 +2779,7 @@ _GL_WARN_ON_USE (tanl, "tanl is unportable - " |
6354 |
_GL_FUNCDECL_RPL (tanhf, float, (float x)); |
6355 |
_GL_CXXALIAS_RPL (tanhf, float, (float x)); |
6356 |
# else |
6357 |
-# if !@HAVE_TANHF@ |
6358 |
+# if !1 |
6359 |
# undef tanhf |
6360 |
_GL_FUNCDECL_SYS (tanhf, float, (float x)); |
6361 |
# endif |
6362 |
@@ -2288,8 +2795,8 @@ _GL_WARN_ON_USE (tanhf, "tanhf is unportable - " |
6363 |
#endif |
6364 |
|
6365 |
|
6366 |
-#if @GNULIB_TRUNCF@ |
6367 |
-# if @REPLACE_TRUNCF@ |
6368 |
+#if 0 |
6369 |
+# if 0 |
6370 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
6371 |
# undef truncf |
6372 |
# define truncf rpl_truncf |
6373 |
@@ -2297,7 +2804,7 @@ _GL_WARN_ON_USE (tanhf, "tanhf is unportable - " |
6374 |
_GL_FUNCDECL_RPL (truncf, float, (float x)); |
6375 |
_GL_CXXALIAS_RPL (truncf, float, (float x)); |
6376 |
# else |
6377 |
-# if !@HAVE_DECL_TRUNCF@ |
6378 |
+# if !1 |
6379 |
_GL_FUNCDECL_SYS (truncf, float, (float x)); |
6380 |
# endif |
6381 |
_GL_CXXALIAS_SYS (truncf, float, (float x)); |
6382 |
@@ -2311,8 +2818,8 @@ _GL_WARN_ON_USE (truncf, "truncf is unportable - " |
6383 |
# endif |
6384 |
#endif |
6385 |
|
6386 |
-#if @GNULIB_TRUNC@ |
6387 |
-# if @REPLACE_TRUNC@ |
6388 |
+#if 0 |
6389 |
+# if 0 |
6390 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
6391 |
# undef trunc |
6392 |
# define trunc rpl_trunc |
6393 |
@@ -2320,7 +2827,7 @@ _GL_WARN_ON_USE (truncf, "truncf is unportable - " |
6394 |
_GL_FUNCDECL_RPL (trunc, double, (double x)); |
6395 |
_GL_CXXALIAS_RPL (trunc, double, (double x)); |
6396 |
# else |
6397 |
-# if !@HAVE_DECL_TRUNC@ |
6398 |
+# if !1 |
6399 |
_GL_FUNCDECL_SYS (trunc, double, (double x)); |
6400 |
# endif |
6401 |
_GL_CXXALIAS_SYS (trunc, double, (double x)); |
6402 |
@@ -2336,8 +2843,8 @@ _GL_WARN_ON_USE (trunc, "trunc is unportable - " |
6403 |
# endif |
6404 |
#endif |
6405 |
|
6406 |
-#if @GNULIB_TRUNCL@ |
6407 |
-# if @REPLACE_TRUNCL@ |
6408 |
+#if 0 |
6409 |
+# if 0 |
6410 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
6411 |
# undef truncl |
6412 |
# define truncl rpl_truncl |
6413 |
@@ -2345,7 +2852,7 @@ _GL_WARN_ON_USE (trunc, "trunc is unportable - " |
6414 |
_GL_FUNCDECL_RPL (truncl, long double, (long double x)); |
6415 |
_GL_CXXALIAS_RPL (truncl, long double, (long double x)); |
6416 |
# else |
6417 |
-# if !@HAVE_DECL_TRUNCL@ |
6418 |
+# if !1 |
6419 |
_GL_FUNCDECL_SYS (truncl, long double, (long double x)); |
6420 |
# endif |
6421 |
_GL_CXXALIAS_SYS (truncl, long double, (long double x)); |
6422 |
@@ -2360,7 +2867,7 @@ _GL_WARN_ON_USE (truncl, "truncl is unportable - " |
6423 |
#endif |
6424 |
|
6425 |
|
6426 |
-#if @GNULIB_MDA_Y0@ |
6427 |
+#if 1 |
6428 |
/* On native Windows, map 'y0' to '_y0', so that -loldnames is not |
6429 |
required. In C++ with GNULIB_NAMESPACE, avoid differences between |
6430 |
platforms by defining GNULIB_NAMESPACE::y0 always. */ |
6431 |
@@ -2376,7 +2883,7 @@ _GL_CXXALIAS_SYS (y0, double, (double x)); |
6432 |
_GL_CXXALIASWARN (y0); |
6433 |
#endif |
6434 |
|
6435 |
-#if @GNULIB_MDA_Y1@ |
6436 |
+#if 1 |
6437 |
/* On native Windows, map 'y1' to '_y1', so that -loldnames is not |
6438 |
required. In C++ with GNULIB_NAMESPACE, avoid differences between |
6439 |
platforms by defining GNULIB_NAMESPACE::y1 always. */ |
6440 |
@@ -2392,7 +2899,7 @@ _GL_CXXALIAS_SYS (y1, double, (double x)); |
6441 |
_GL_CXXALIASWARN (y1); |
6442 |
#endif |
6443 |
|
6444 |
-#if @GNULIB_MDA_YN@ |
6445 |
+#if 1 |
6446 |
/* On native Windows, map 'yn' to '_yn', so that -loldnames is not |
6447 |
required. In C++ with GNULIB_NAMESPACE, avoid differences between |
6448 |
platforms by defining GNULIB_NAMESPACE::yn always. */ |
6449 |
@@ -2413,8 +2920,8 @@ _GL_CXXALIASWARN (yn); |
6450 |
declarations. */ |
6451 |
|
6452 |
|
6453 |
-#if @GNULIB_ISFINITE@ |
6454 |
-# if @REPLACE_ISFINITE@ |
6455 |
+#if 0 |
6456 |
+# if 0 |
6457 |
_GL_EXTERN_C int gl_isfinitef (float x); |
6458 |
_GL_EXTERN_C int gl_isfinited (double x); |
6459 |
_GL_EXTERN_C int gl_isfinitel (long double x); |
6460 |
@@ -2433,6 +2940,7 @@ _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isfinite) |
6461 |
functions. */ |
6462 |
_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite, rpl_isfinite, bool) |
6463 |
# define isfinite rpl_isfinite |
6464 |
+# define GNULIB_NAMESPACE_LACKS_ISFINITE 1 |
6465 |
# else |
6466 |
_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite, isfinite, bool) |
6467 |
# endif |
6468 |
@@ -2447,8 +2955,8 @@ _GL_WARN_REAL_FLOATING_DECL (isfinite); |
6469 |
#endif |
6470 |
|
6471 |
|
6472 |
-#if @GNULIB_ISINF@ |
6473 |
-# if @REPLACE_ISINF@ |
6474 |
+#if 0 |
6475 |
+# if 0 |
6476 |
_GL_EXTERN_C int gl_isinff (float x); |
6477 |
_GL_EXTERN_C int gl_isinfd (double x); |
6478 |
_GL_EXTERN_C int gl_isinfl (long double x); |
6479 |
@@ -2467,6 +2975,7 @@ _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isinf) |
6480 |
functions. */ |
6481 |
_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf, rpl_isinf, bool) |
6482 |
# define isinf rpl_isinf |
6483 |
+# define GNULIB_NAMESPACE_LACKS_ISINF 1 |
6484 |
# else |
6485 |
_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf, isinf, bool) |
6486 |
# endif |
6487 |
@@ -2481,9 +2990,9 @@ _GL_WARN_REAL_FLOATING_DECL (isinf); |
6488 |
#endif |
6489 |
|
6490 |
|
6491 |
-#if @GNULIB_ISNANF@ |
6492 |
+#if 0 |
6493 |
/* Test for NaN for 'float' numbers. */ |
6494 |
-# if @HAVE_ISNANF@ |
6495 |
+# if 1 |
6496 |
/* The original <math.h> included above provides a declaration of isnan macro |
6497 |
or (older) isnanf function. */ |
6498 |
# if (__GNUC__ >= 4) || (__clang_major__ >= 4) |
6499 |
@@ -2503,11 +3012,11 @@ _GL_EXTERN_C int isnanf (float x); |
6500 |
# endif |
6501 |
#endif |
6502 |
|
6503 |
-#if @GNULIB_ISNAND@ |
6504 |
+#if 0 |
6505 |
/* Test for NaN for 'double' numbers. |
6506 |
This function is a gnulib extension, unlike isnan() which applied only |
6507 |
to 'double' numbers earlier but now is a type-generic macro. */ |
6508 |
-# if @HAVE_ISNAND@ |
6509 |
+# if 1 |
6510 |
/* The original <math.h> included above provides a declaration of isnan |
6511 |
macro. */ |
6512 |
# if (__GNUC__ >= 4) || (__clang_major__ >= 4) |
6513 |
@@ -2526,9 +3035,9 @@ _GL_EXTERN_C int isnand (double x); |
6514 |
# endif |
6515 |
#endif |
6516 |
|
6517 |
-#if @GNULIB_ISNANL@ |
6518 |
+#if 0 |
6519 |
/* Test for NaN for 'long double' numbers. */ |
6520 |
-# if @HAVE_ISNANL@ |
6521 |
+# if 1 |
6522 |
/* The original <math.h> included above provides a declaration of isnan |
6523 |
macro or (older) isnanl function. */ |
6524 |
# if (__GNUC__ >= 4) || (__clang_major__ >= 4) |
6525 |
@@ -2549,25 +3058,25 @@ _GL_EXTERN_C int isnanl (long double x) _GL_ATTRIBUTE_CONST; |
6526 |
#endif |
6527 |
|
6528 |
/* This must come *after* the snippets for GNULIB_ISNANF and GNULIB_ISNANL! */ |
6529 |
-#if @GNULIB_ISNAN@ |
6530 |
-# if @REPLACE_ISNAN@ |
6531 |
+#if 0 |
6532 |
+# if 0 |
6533 |
/* We can't just use the isnanf macro (e.g.) as exposed by |
6534 |
isnanf.h (e.g.) here, because those may end up being macros |
6535 |
that recursively expand back to isnan. So use the gnulib |
6536 |
replacements for them directly. */ |
6537 |
-# if @HAVE_ISNANF@ && (__GNUC__ >= 4) || (__clang_major__ >= 4) |
6538 |
+# if 1 && (__GNUC__ >= 4) || (__clang_major__ >= 4) |
6539 |
# define gl_isnan_f(x) __builtin_isnan ((float)(x)) |
6540 |
# else |
6541 |
_GL_EXTERN_C int rpl_isnanf (float x); |
6542 |
# define gl_isnan_f(x) rpl_isnanf (x) |
6543 |
# endif |
6544 |
-# if @HAVE_ISNAND@ && (__GNUC__ >= 4) || (__clang_major__ >= 4) |
6545 |
+# if 1 && (__GNUC__ >= 4) || (__clang_major__ >= 4) |
6546 |
# define gl_isnan_d(x) __builtin_isnan ((double)(x)) |
6547 |
# else |
6548 |
_GL_EXTERN_C int rpl_isnand (double x); |
6549 |
# define gl_isnan_d(x) rpl_isnand (x) |
6550 |
# endif |
6551 |
-# if @HAVE_ISNANL@ && (__GNUC__ >= 4) || (__clang_major__ >= 4) |
6552 |
+# if 1 && (__GNUC__ >= 4) || (__clang_major__ >= 4) |
6553 |
# define gl_isnan_l(x) __builtin_isnan ((long double)(x)) |
6554 |
# else |
6555 |
_GL_EXTERN_C int rpl_isnanl (long double x) _GL_ATTRIBUTE_CONST; |
6556 |
@@ -2594,6 +3103,7 @@ _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isnan) |
6557 |
functions. */ |
6558 |
_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan, rpl_isnan, bool) |
6559 |
# define isnan rpl_isnan |
6560 |
+# define GNULIB_NAMESPACE_LACKS_ISNAN 1 |
6561 |
# else |
6562 |
_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan, isnan, bool) |
6563 |
# endif |
6564 |
@@ -2613,8 +3123,8 @@ _GL_WARN_REAL_FLOATING_DECL (isnan); |
6565 |
#endif |
6566 |
|
6567 |
|
6568 |
-#if @GNULIB_SIGNBIT@ |
6569 |
-# if (@REPLACE_SIGNBIT_USING_BUILTINS@ \ |
6570 |
+#if 1 |
6571 |
+# if (1 \ |
6572 |
&& (!defined __cplusplus || __cplusplus < 201103)) |
6573 |
# undef signbit |
6574 |
/* GCC >= 4.0 and clang provide three built-ins for signbit. */ |
6575 |
@@ -2623,7 +3133,7 @@ _GL_WARN_REAL_FLOATING_DECL (isnan); |
6576 |
sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \ |
6577 |
__builtin_signbitf (x)) |
6578 |
# endif |
6579 |
-# if @REPLACE_SIGNBIT@ && !GNULIB_defined_signbit |
6580 |
+# if 1 && !GNULIB_defined_signbit |
6581 |
# undef signbit |
6582 |
_GL_EXTERN_C int gl_signbitf (float arg); |
6583 |
_GL_EXTERN_C int gl_signbitd (double arg); |
6584 |
@@ -2677,6 +3187,7 @@ _GL_MATH_CXX_REAL_FLOATING_DECL_1 (signbit) |
6585 |
functions. */ |
6586 |
_GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit, rpl_signbit, bool) |
6587 |
# define signbit rpl_signbit |
6588 |
+# define GNULIB_NAMESPACE_LACKS_SIGNBIT 1 |
6589 |
# else |
6590 |
_GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit, signbit, bool) |
6591 |
# endif |
6592 |
@@ -2692,6 +3203,6 @@ _GL_WARN_REAL_FLOATING_DECL (signbit); |
6593 |
|
6594 |
_GL_INLINE_HEADER_END |
6595 |
|
6596 |
-#endif /* _@GUARD_PREFIX@_MATH_H */ |
6597 |
+#endif /* _GL_MATH_H */ |
6598 |
#endif /* _GL_INCLUDING_MATH_H */ |
6599 |
-#endif /* _@GUARD_PREFIX@_MATH_H */ |
6600 |
+#endif /* _GL_MATH_H */ |
6601 |
|
6602 |
diff --git a/autotools/gnulib/math.in.h b/autotools/gnulib/math.in.h |
6603 |
index ccc3584..a74a95d 100644 |
6604 |
--- a/autotools/gnulib/math.in.h |
6605 |
+++ b/autotools/gnulib/math.in.h |
6606 |
@@ -2433,6 +2433,7 @@ _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isfinite) |
6607 |
functions. */ |
6608 |
_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite, rpl_isfinite, bool) |
6609 |
# define isfinite rpl_isfinite |
6610 |
+# define GNULIB_NAMESPACE_LACKS_ISFINITE 1 |
6611 |
# else |
6612 |
_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite, isfinite, bool) |
6613 |
# endif |
6614 |
@@ -2467,6 +2468,7 @@ _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isinf) |
6615 |
functions. */ |
6616 |
_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf, rpl_isinf, bool) |
6617 |
# define isinf rpl_isinf |
6618 |
+# define GNULIB_NAMESPACE_LACKS_ISINF 1 |
6619 |
# else |
6620 |
_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf, isinf, bool) |
6621 |
# endif |
6622 |
@@ -2594,6 +2596,7 @@ _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isnan) |
6623 |
functions. */ |
6624 |
_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan, rpl_isnan, bool) |
6625 |
# define isnan rpl_isnan |
6626 |
+# define GNULIB_NAMESPACE_LACKS_ISNAN 1 |
6627 |
# else |
6628 |
_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan, isnan, bool) |
6629 |
# endif |
6630 |
@@ -2677,6 +2680,7 @@ _GL_MATH_CXX_REAL_FLOATING_DECL_1 (signbit) |
6631 |
functions. */ |
6632 |
_GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit, rpl_signbit, bool) |
6633 |
# define signbit rpl_signbit |
6634 |
+# define GNULIB_NAMESPACE_LACKS_SIGNBIT 1 |
6635 |
# else |
6636 |
_GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit, signbit, bool) |
6637 |
# endif |
6638 |
|
6639 |
diff --git a/autotools/gnulib/openat.h b/autotools/gnulib/openat.h |
6640 |
index 5c8ff90..56919ef 100644 |
6641 |
--- a/autotools/gnulib/openat.h |
6642 |
+++ b/autotools/gnulib/openat.h |
6643 |
@@ -98,12 +98,14 @@ lchmodat (int fd, char const *file, mode_t mode) |
6644 |
# define STATAT_INLINE _GL_INLINE |
6645 |
# endif |
6646 |
|
6647 |
+_GL_ATTRIBUTE_DEPRECATED |
6648 |
STATAT_INLINE int |
6649 |
statat (int fd, char const *name, struct stat *st) |
6650 |
{ |
6651 |
return fstatat (fd, name, st, 0); |
6652 |
} |
6653 |
|
6654 |
+_GL_ATTRIBUTE_DEPRECATED |
6655 |
STATAT_INLINE int |
6656 |
lstatat (int fd, char const *name, struct stat *st) |
6657 |
{ |
6658 |
|
6659 |
diff --git a/autotools/gnulib/renameatu.c b/autotools/gnulib/renameatu.c |
6660 |
index 0eb33ab..b4e317d 100644 |
6661 |
--- a/autotools/gnulib/renameatu.c |
6662 |
+++ b/autotools/gnulib/renameatu.c |
6663 |
@@ -133,12 +133,13 @@ renameatu (int fd1, char const *src, int fd2, char const *dst, |
6664 |
break; |
6665 |
|
6666 |
case RENAME_NOREPLACE: |
6667 |
- /* This has a race between the call to lstatat and the calls to |
6668 |
- renameat below. This lstatat is needed even if RENAME_EXCL |
6669 |
+ /* This has a race between the call to fstatat and the calls to |
6670 |
+ renameat below. This fstatat is needed even if RENAME_EXCL |
6671 |
is defined, because RENAME_EXCL is buggy on macOS 11.2: |
6672 |
renameatx_np (fd, "X", fd, "X", RENAME_EXCL) incorrectly |
6673 |
succeeds when X exists. */ |
6674 |
- if (lstatat (fd2, dst, &dst_st) == 0 || errno == EOVERFLOW) |
6675 |
+ if (fstatat (fd2, dst, &dst_st, AT_SYMLINK_NOFOLLOW) == 0 |
6676 |
+ || errno == EOVERFLOW) |
6677 |
return errno_fail (EEXIST); |
6678 |
if (errno != ENOENT) |
6679 |
return -1; |
6680 |
@@ -164,14 +165,14 @@ renameatu (int fd1, char const *src, int fd2, char const *dst, |
6681 |
the source does not exist, or if the destination cannot be turned |
6682 |
into a directory, give up now. Otherwise, strip trailing slashes |
6683 |
before calling rename. */ |
6684 |
- if (lstatat (fd1, src, &src_st)) |
6685 |
+ if (fstatat (fd1, src, &src_st, AT_SYMLINK_NOFOLLOW)) |
6686 |
return -1; |
6687 |
if (dst_found_nonexistent) |
6688 |
{ |
6689 |
if (!S_ISDIR (src_st.st_mode)) |
6690 |
return errno_fail (ENOENT); |
6691 |
} |
6692 |
- else if (lstatat (fd2, dst, &dst_st)) |
6693 |
+ else if (fstatat (fd2, dst, &dst_st, AT_SYMLINK_NOFOLLOW)) |
6694 |
{ |
6695 |
if (errno != ENOENT || !S_ISDIR (src_st.st_mode)) |
6696 |
return -1; |
6697 |
@@ -196,7 +197,7 @@ renameatu (int fd1, char const *src, int fd2, char const *dst, |
6698 |
goto out; |
6699 |
} |
6700 |
strip_trailing_slashes (src_temp); |
6701 |
- if (lstatat (fd1, src_temp, &src_st)) |
6702 |
+ if (fstatat (fd1, src_temp, &src_st, AT_SYMLINK_NOFOLLOW)) |
6703 |
{ |
6704 |
rename_errno = errno; |
6705 |
goto out; |
6706 |
@@ -213,7 +214,7 @@ renameatu (int fd1, char const *src, int fd2, char const *dst, |
6707 |
goto out; |
6708 |
} |
6709 |
strip_trailing_slashes (dst_temp); |
6710 |
- if (lstatat (fd2, dst_temp, &dst_st)) |
6711 |
+ if (fstatat (fd2, dst_temp, &dst_st, AT_SYMLINK_NOFOLLOW)) |
6712 |
{ |
6713 |
if (errno != ENOENT) |
6714 |
{ |
6715 |
|
6716 |
diff --git a/autotools/gnulib/statat.c b/autotools/gnulib/statat.c |
6717 |
deleted file mode 100644 |
6718 |
index bf96d3b..0000000 |
6719 |
--- a/autotools/gnulib/statat.c |
6720 |
+++ /dev/null |
6721 |
@@ -1,21 +0,0 @@ |
6722 |
-/* Return info about a file at a directory. |
6723 |
- |
6724 |
- Copyright (C) 2012-2022 Free Software Foundation, Inc. |
6725 |
- |
6726 |
- This file is free software: you can redistribute it and/or modify |
6727 |
- it under the terms of the GNU General Public License as published |
6728 |
- by the Free Software Foundation, either version 3 of the License, |
6729 |
- or (at your option) any later version. |
6730 |
- |
6731 |
- This file is distributed in the hope that it will be useful, |
6732 |
- but WITHOUT ANY WARRANTY; without even the implied warranty of |
6733 |
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
6734 |
- GNU General Public License for more details. |
6735 |
- |
6736 |
- You should have received a copy of the GNU General Public License |
6737 |
- along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
6738 |
- |
6739 |
-#include <config.h> |
6740 |
- |
6741 |
-#define STATAT_INLINE _GL_EXTERN_INLINE |
6742 |
-#include "openat.h" |
6743 |
|
6744 |
diff --git a/autotools/gnulib/stdint.h b/autotools/gnulib/stdint.h |
6745 |
new file mode 100644 |
6746 |
index 0000000..1d0abb2 |
6747 |
--- /dev/null |
6748 |
+++ b/autotools/gnulib/stdint.h |
6749 |
@@ -0,0 +1,741 @@ |
6750 |
+/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ |
6751 |
+/* Copyright (C) 2001-2002, 2004-2022 Free Software Foundation, Inc. |
6752 |
+ Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood. |
6753 |
+ This file is part of gnulib. |
6754 |
+ |
6755 |
+ This file is free software: you can redistribute it and/or modify |
6756 |
+ it under the terms of the GNU Lesser General Public License as |
6757 |
+ published by the Free Software Foundation; either version 2.1 of the |
6758 |
+ License, or (at your option) any later version. |
6759 |
+ |
6760 |
+ This file is distributed in the hope that it will be useful, |
6761 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
6762 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
6763 |
+ GNU Lesser General Public License for more details. |
6764 |
+ |
6765 |
+ You should have received a copy of the GNU Lesser General Public License |
6766 |
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
6767 |
+ |
6768 |
+/* |
6769 |
+ * ISO C 99 <stdint.h> for platforms that lack it. |
6770 |
+ * <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/stdint.h.html> |
6771 |
+ */ |
6772 |
+ |
6773 |
+#ifndef _GL_STDINT_H |
6774 |
+ |
6775 |
+#if __GNUC__ >= 3 |
6776 |
+#pragma GCC system_header |
6777 |
+#endif |
6778 |
+ |
6779 |
+ |
6780 |
+/* When including a system file that in turn includes <inttypes.h>, |
6781 |
+ use the system <inttypes.h>, not our substitute. This avoids |
6782 |
+ problems with (for example) VMS, whose <sys/bitypes.h> includes |
6783 |
+ <inttypes.h>. */ |
6784 |
+#define _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H |
6785 |
+ |
6786 |
+/* On Android (Bionic libc), <sys/types.h> includes this file before |
6787 |
+ having defined 'time_t'. Therefore in this case avoid including |
6788 |
+ other system header files; just include the system's <stdint.h>. |
6789 |
+ Ideally we should test __BIONIC__ here, but it is only defined after |
6790 |
+ <sys/cdefs.h> has been included; hence test __ANDROID__ instead. */ |
6791 |
+#if defined __ANDROID__ && defined _GL_INCLUDING_SYS_TYPES_H |
6792 |
+# include_next <stdint.h> |
6793 |
+#else |
6794 |
+ |
6795 |
+/* Get those types that are already defined in other system include |
6796 |
+ files, so that we can "#define int8_t signed char" below without |
6797 |
+ worrying about a later system include file containing a "typedef |
6798 |
+ signed char int8_t;" that will get messed up by our macro. Our |
6799 |
+ macros should all be consistent with the system versions, except |
6800 |
+ for the "fast" types and macros, which we recommend against using |
6801 |
+ in public interfaces due to compiler differences. */ |
6802 |
+ |
6803 |
+#if 1 |
6804 |
+# if defined __sgi && ! defined __c99 |
6805 |
+ /* Bypass IRIX's <stdint.h> if in C89 mode, since it merely annoys users |
6806 |
+ with "This header file is to be used only for c99 mode compilations" |
6807 |
+ diagnostics. */ |
6808 |
+# define __STDINT_H__ |
6809 |
+# endif |
6810 |
+ |
6811 |
+ /* Some pre-C++11 <stdint.h> implementations need this. */ |
6812 |
+# ifdef __cplusplus |
6813 |
+# ifndef __STDC_CONSTANT_MACROS |
6814 |
+# define __STDC_CONSTANT_MACROS 1 |
6815 |
+# endif |
6816 |
+# ifndef __STDC_LIMIT_MACROS |
6817 |
+# define __STDC_LIMIT_MACROS 1 |
6818 |
+# endif |
6819 |
+# endif |
6820 |
+ |
6821 |
+ /* Other systems may have an incomplete or buggy <stdint.h>. |
6822 |
+ Include it before <inttypes.h>, since any "#include <stdint.h>" |
6823 |
+ in <inttypes.h> would reinclude us, skipping our contents because |
6824 |
+ _GL_STDINT_H is defined. |
6825 |
+ The include_next requires a split double-inclusion guard. */ |
6826 |
+# include_next <stdint.h> |
6827 |
+#endif |
6828 |
+ |
6829 |
+#if ! defined _GL_STDINT_H && ! defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H |
6830 |
+#define _GL_STDINT_H |
6831 |
+ |
6832 |
+/* Get SCHAR_MIN, SCHAR_MAX, UCHAR_MAX, INT_MIN, INT_MAX, |
6833 |
+ LONG_MIN, LONG_MAX, ULONG_MAX, _GL_INTEGER_WIDTH. */ |
6834 |
+#include <limits.h> |
6835 |
+ |
6836 |
+/* Override WINT_MIN and WINT_MAX if gnulib's <wchar.h> or <wctype.h> overrides |
6837 |
+ wint_t. */ |
6838 |
+#if 0 |
6839 |
+# undef WINT_MIN |
6840 |
+# undef WINT_MAX |
6841 |
+# define WINT_MIN 0x0U |
6842 |
+# define WINT_MAX 0xffffffffU |
6843 |
+#endif |
6844 |
+ |
6845 |
+#if ! 1 |
6846 |
+ |
6847 |
+/* <sys/types.h> defines some of the stdint.h types as well, on glibc, |
6848 |
+ IRIX 6.5, and OpenBSD 3.8 (via <machine/types.h>). |
6849 |
+ AIX 5.2 <sys/types.h> isn't needed and causes troubles. |
6850 |
+ Mac OS X 10.4.6 <sys/types.h> includes <stdint.h> (which is us), but |
6851 |
+ relies on the system <stdint.h> definitions, so include |
6852 |
+ <sys/types.h> after <stdint.h>. */ |
6853 |
+# if 1 && ! defined _AIX |
6854 |
+# include <sys/types.h> |
6855 |
+# endif |
6856 |
+ |
6857 |
+# if 1 |
6858 |
+ /* In OpenBSD 3.8, <inttypes.h> includes <machine/types.h>, which defines |
6859 |
+ int{8,16,32,64}_t, uint{8,16,32,64}_t and __BIT_TYPES_DEFINED__. |
6860 |
+ <inttypes.h> also defines intptr_t and uintptr_t. */ |
6861 |
+# include <inttypes.h> |
6862 |
+# elif 0 |
6863 |
+ /* Solaris 7 <sys/inttypes.h> has the types except the *_fast*_t types, and |
6864 |
+ the macros except for *_FAST*_*, INTPTR_MIN, PTRDIFF_MIN, PTRDIFF_MAX. */ |
6865 |
+# include <sys/inttypes.h> |
6866 |
+# endif |
6867 |
+ |
6868 |
+# if 0 && ! defined __BIT_TYPES_DEFINED__ |
6869 |
+ /* Linux libc4 >= 4.6.7 and libc5 have a <sys/bitypes.h> that defines |
6870 |
+ int{8,16,32,64}_t and __BIT_TYPES_DEFINED__. In libc5 >= 5.2.2 it is |
6871 |
+ included by <sys/types.h>. */ |
6872 |
+# include <sys/bitypes.h> |
6873 |
+# endif |
6874 |
+ |
6875 |
+# undef _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H |
6876 |
+ |
6877 |
+/* Minimum and maximum values for an integer type under the usual assumption. |
6878 |
+ Return an unspecified value if BITS == 0, adding a check to pacify |
6879 |
+ picky compilers. */ |
6880 |
+ |
6881 |
+/* These are separate macros, because if you try to merge these macros into |
6882 |
+ a single one, HP-UX cc rejects the resulting expression in constant |
6883 |
+ expressions. */ |
6884 |
+# define _STDINT_UNSIGNED_MIN(bits, zero) \ |
6885 |
+ (zero) |
6886 |
+# define _STDINT_SIGNED_MIN(bits, zero) \ |
6887 |
+ (~ _STDINT_MAX (1, bits, zero)) |
6888 |
+ |
6889 |
+# define _STDINT_MAX(signed, bits, zero) \ |
6890 |
+ (((((zero) + 1) << ((bits) ? (bits) - 1 - (signed) : 0)) - 1) * 2 + 1) |
6891 |
+ |
6892 |
+#if !GNULIB_defined_stdint_types |
6893 |
+ |
6894 |
+/* 7.18.1.1. Exact-width integer types */ |
6895 |
+ |
6896 |
+/* Here we assume a standard architecture where the hardware integer |
6897 |
+ types have 8, 16, 32, optionally 64 bits. */ |
6898 |
+ |
6899 |
+# undef int8_t |
6900 |
+# undef uint8_t |
6901 |
+typedef signed char gl_int8_t; |
6902 |
+typedef unsigned char gl_uint8_t; |
6903 |
+# define int8_t gl_int8_t |
6904 |
+# define uint8_t gl_uint8_t |
6905 |
+ |
6906 |
+# undef int16_t |
6907 |
+# undef uint16_t |
6908 |
+typedef short int gl_int16_t; |
6909 |
+typedef unsigned short int gl_uint16_t; |
6910 |
+# define int16_t gl_int16_t |
6911 |
+# define uint16_t gl_uint16_t |
6912 |
+ |
6913 |
+# undef int32_t |
6914 |
+# undef uint32_t |
6915 |
+typedef int gl_int32_t; |
6916 |
+typedef unsigned int gl_uint32_t; |
6917 |
+# define int32_t gl_int32_t |
6918 |
+# define uint32_t gl_uint32_t |
6919 |
+ |
6920 |
+/* If the system defines INT64_MAX, assume int64_t works. That way, |
6921 |
+ if the underlying platform defines int64_t to be a 64-bit long long |
6922 |
+ int, the code below won't mistakenly define it to be a 64-bit long |
6923 |
+ int, which would mess up C++ name mangling. We must use #ifdef |
6924 |
+ rather than #if, to avoid an error with HP-UX 10.20 cc. */ |
6925 |
+ |
6926 |
+# ifdef INT64_MAX |
6927 |
+# define GL_INT64_T |
6928 |
+# else |
6929 |
+/* Do not undefine int64_t if gnulib is not being used with 64-bit |
6930 |
+ types, since otherwise it breaks platforms like Tandem/NSK. */ |
6931 |
+# if LONG_MAX >> 31 >> 31 == 1 |
6932 |
+# undef int64_t |
6933 |
+typedef long int gl_int64_t; |
6934 |
+# define int64_t gl_int64_t |
6935 |
+# define GL_INT64_T |
6936 |
+# elif defined _MSC_VER |
6937 |
+# undef int64_t |
6938 |
+typedef __int64 gl_int64_t; |
6939 |
+# define int64_t gl_int64_t |
6940 |
+# define GL_INT64_T |
6941 |
+# else |
6942 |
+# undef int64_t |
6943 |
+typedef long long int gl_int64_t; |
6944 |
+# define int64_t gl_int64_t |
6945 |
+# define GL_INT64_T |
6946 |
+# endif |
6947 |
+# endif |
6948 |
+ |
6949 |
+# ifdef UINT64_MAX |
6950 |
+# define GL_UINT64_T |
6951 |
+# else |
6952 |
+# if ULONG_MAX >> 31 >> 31 >> 1 == 1 |
6953 |
+# undef uint64_t |
6954 |
+typedef unsigned long int gl_uint64_t; |
6955 |
+# define uint64_t gl_uint64_t |
6956 |
+# define GL_UINT64_T |
6957 |
+# elif defined _MSC_VER |
6958 |
+# undef uint64_t |
6959 |
+typedef unsigned __int64 gl_uint64_t; |
6960 |
+# define uint64_t gl_uint64_t |
6961 |
+# define GL_UINT64_T |
6962 |
+# else |
6963 |
+# undef uint64_t |
6964 |
+typedef unsigned long long int gl_uint64_t; |
6965 |
+# define uint64_t gl_uint64_t |
6966 |
+# define GL_UINT64_T |
6967 |
+# endif |
6968 |
+# endif |
6969 |
+ |
6970 |
+/* Avoid collision with Solaris 2.5.1 <pthread.h> etc. */ |
6971 |
+# define _UINT8_T |
6972 |
+# define _UINT32_T |
6973 |
+# define _UINT64_T |
6974 |
+ |
6975 |
+ |
6976 |
+/* 7.18.1.2. Minimum-width integer types */ |
6977 |
+ |
6978 |
+/* Here we assume a standard architecture where the hardware integer |
6979 |
+ types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types |
6980 |
+ are the same as the corresponding N_t types. */ |
6981 |
+ |
6982 |
+# undef int_least8_t |
6983 |
+# undef uint_least8_t |
6984 |
+# undef int_least16_t |
6985 |
+# undef uint_least16_t |
6986 |
+# undef int_least32_t |
6987 |
+# undef uint_least32_t |
6988 |
+# undef int_least64_t |
6989 |
+# undef uint_least64_t |
6990 |
+# define int_least8_t int8_t |
6991 |
+# define uint_least8_t uint8_t |
6992 |
+# define int_least16_t int16_t |
6993 |
+# define uint_least16_t uint16_t |
6994 |
+# define int_least32_t int32_t |
6995 |
+# define uint_least32_t uint32_t |
6996 |
+# ifdef GL_INT64_T |
6997 |
+# define int_least64_t int64_t |
6998 |
+# endif |
6999 |
+# ifdef GL_UINT64_T |
7000 |
+# define uint_least64_t uint64_t |
7001 |
+# endif |
7002 |
+ |
7003 |
+/* 7.18.1.3. Fastest minimum-width integer types */ |
7004 |
+ |
7005 |
+/* Note: Other <stdint.h> substitutes may define these types differently. |
7006 |
+ It is not recommended to use these types in public header files. */ |
7007 |
+ |
7008 |
+/* Here we assume a standard architecture where the hardware integer |
7009 |
+ types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types |
7010 |
+ are taken from the same list of types. The following code normally |
7011 |
+ uses types consistent with glibc, as that lessens the chance of |
7012 |
+ incompatibility with older GNU hosts. */ |
7013 |
+ |
7014 |
+# undef int_fast8_t |
7015 |
+# undef uint_fast8_t |
7016 |
+# undef int_fast16_t |
7017 |
+# undef uint_fast16_t |
7018 |
+# undef int_fast32_t |
7019 |
+# undef uint_fast32_t |
7020 |
+# undef int_fast64_t |
7021 |
+# undef uint_fast64_t |
7022 |
+typedef signed char gl_int_fast8_t; |
7023 |
+typedef unsigned char gl_uint_fast8_t; |
7024 |
+ |
7025 |
+# ifdef __sun |
7026 |
+/* Define types compatible with SunOS 5.10, so that code compiled under |
7027 |
+ earlier SunOS versions works with code compiled under SunOS 5.10. */ |
7028 |
+typedef int gl_int_fast32_t; |
7029 |
+typedef unsigned int gl_uint_fast32_t; |
7030 |
+# else |
7031 |
+typedef long int gl_int_fast32_t; |
7032 |
+typedef unsigned long int gl_uint_fast32_t; |
7033 |
+# endif |
7034 |
+typedef gl_int_fast32_t gl_int_fast16_t; |
7035 |
+typedef gl_uint_fast32_t gl_uint_fast16_t; |
7036 |
+ |
7037 |
+# define int_fast8_t gl_int_fast8_t |
7038 |
+# define uint_fast8_t gl_uint_fast8_t |
7039 |
+# define int_fast16_t gl_int_fast16_t |
7040 |
+# define uint_fast16_t gl_uint_fast16_t |
7041 |
+# define int_fast32_t gl_int_fast32_t |
7042 |
+# define uint_fast32_t gl_uint_fast32_t |
7043 |
+# ifdef GL_INT64_T |
7044 |
+# define int_fast64_t int64_t |
7045 |
+# endif |
7046 |
+# ifdef GL_UINT64_T |
7047 |
+# define uint_fast64_t uint64_t |
7048 |
+# endif |
7049 |
+ |
7050 |
+/* 7.18.1.4. Integer types capable of holding object pointers */ |
7051 |
+ |
7052 |
+/* kLIBC's <stdint.h> defines _INTPTR_T_DECLARED and needs its own |
7053 |
+ definitions of intptr_t and uintptr_t (which use int and unsigned) |
7054 |
+ to avoid clashes with declarations of system functions like sbrk. |
7055 |
+ Similarly, MinGW WSL-5.4.1 <stdint.h> needs its own intptr_t and |
7056 |
+ uintptr_t to avoid conflicting declarations of system functions like |
7057 |
+ _findclose in <io.h>. */ |
7058 |
+# if !((defined __KLIBC__ && defined _INTPTR_T_DECLARED) \ |
7059 |
+ || defined __MINGW32__) |
7060 |
+# undef intptr_t |
7061 |
+# undef uintptr_t |
7062 |
+# ifdef _WIN64 |
7063 |
+typedef long long int gl_intptr_t; |
7064 |
+typedef unsigned long long int gl_uintptr_t; |
7065 |
+# else |
7066 |
+typedef long int gl_intptr_t; |
7067 |
+typedef unsigned long int gl_uintptr_t; |
7068 |
+# endif |
7069 |
+# define intptr_t gl_intptr_t |
7070 |
+# define uintptr_t gl_uintptr_t |
7071 |
+# endif |
7072 |
+ |
7073 |
+/* 7.18.1.5. Greatest-width integer types */ |
7074 |
+ |
7075 |
+/* Note: These types are compiler dependent. It may be unwise to use them in |
7076 |
+ public header files. */ |
7077 |
+ |
7078 |
+/* If the system defines INTMAX_MAX, assume that intmax_t works, and |
7079 |
+ similarly for UINTMAX_MAX and uintmax_t. This avoids problems with |
7080 |
+ assuming one type where another is used by the system. */ |
7081 |
+ |
7082 |
+# ifndef INTMAX_MAX |
7083 |
+# undef INTMAX_C |
7084 |
+# undef intmax_t |
7085 |
+# if LONG_MAX >> 30 == 1 |
7086 |
+typedef long long int gl_intmax_t; |
7087 |
+# define intmax_t gl_intmax_t |
7088 |
+# elif defined GL_INT64_T |
7089 |
+# define intmax_t int64_t |
7090 |
+# else |
7091 |
+typedef long int gl_intmax_t; |
7092 |
+# define intmax_t gl_intmax_t |
7093 |
+# endif |
7094 |
+# endif |
7095 |
+ |
7096 |
+# ifndef UINTMAX_MAX |
7097 |
+# undef UINTMAX_C |
7098 |
+# undef uintmax_t |
7099 |
+# if ULONG_MAX >> 31 == 1 |
7100 |
+typedef unsigned long long int gl_uintmax_t; |
7101 |
+# define uintmax_t gl_uintmax_t |
7102 |
+# elif defined GL_UINT64_T |
7103 |
+# define uintmax_t uint64_t |
7104 |
+# else |
7105 |
+typedef unsigned long int gl_uintmax_t; |
7106 |
+# define uintmax_t gl_uintmax_t |
7107 |
+# endif |
7108 |
+# endif |
7109 |
+ |
7110 |
+/* Verify that intmax_t and uintmax_t have the same size. Too much code |
7111 |
+ breaks if this is not the case. If this check fails, the reason is likely |
7112 |
+ to be found in the autoconf macros. */ |
7113 |
+typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t) |
7114 |
+ ? 1 : -1]; |
7115 |
+ |
7116 |
+# define GNULIB_defined_stdint_types 1 |
7117 |
+# endif /* !GNULIB_defined_stdint_types */ |
7118 |
+ |
7119 |
+/* 7.18.2. Limits of specified-width integer types */ |
7120 |
+ |
7121 |
+/* 7.18.2.1. Limits of exact-width integer types */ |
7122 |
+ |
7123 |
+/* Here we assume a standard architecture where the hardware integer |
7124 |
+ types have 8, 16, 32, optionally 64 bits. */ |
7125 |
+ |
7126 |
+# undef INT8_MIN |
7127 |
+# undef INT8_MAX |
7128 |
+# undef UINT8_MAX |
7129 |
+# define INT8_MIN (~ INT8_MAX) |
7130 |
+# define INT8_MAX 127 |
7131 |
+# define UINT8_MAX 255 |
7132 |
+ |
7133 |
+# undef INT16_MIN |
7134 |
+# undef INT16_MAX |
7135 |
+# undef UINT16_MAX |
7136 |
+# define INT16_MIN (~ INT16_MAX) |
7137 |
+# define INT16_MAX 32767 |
7138 |
+# define UINT16_MAX 65535 |
7139 |
+ |
7140 |
+# undef INT32_MIN |
7141 |
+# undef INT32_MAX |
7142 |
+# undef UINT32_MAX |
7143 |
+# define INT32_MIN (~ INT32_MAX) |
7144 |
+# define INT32_MAX 2147483647 |
7145 |
+# define UINT32_MAX 4294967295U |
7146 |
+ |
7147 |
+# if defined GL_INT64_T && ! defined INT64_MAX |
7148 |
+/* Prefer (- INTMAX_C (1) << 63) over (~ INT64_MAX) because SunPRO C 5.0 |
7149 |
+ evaluates the latter incorrectly in preprocessor expressions. */ |
7150 |
+# define INT64_MIN (- INTMAX_C (1) << 63) |
7151 |
+# define INT64_MAX INTMAX_C (9223372036854775807) |
7152 |
+# endif |
7153 |
+ |
7154 |
+# if defined GL_UINT64_T && ! defined UINT64_MAX |
7155 |
+# define UINT64_MAX UINTMAX_C (18446744073709551615) |
7156 |
+# endif |
7157 |
+ |
7158 |
+/* 7.18.2.2. Limits of minimum-width integer types */ |
7159 |
+ |
7160 |
+/* Here we assume a standard architecture where the hardware integer |
7161 |
+ types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types |
7162 |
+ are the same as the corresponding N_t types. */ |
7163 |
+ |
7164 |
+# undef INT_LEAST8_MIN |
7165 |
+# undef INT_LEAST8_MAX |
7166 |
+# undef UINT_LEAST8_MAX |
7167 |
+# define INT_LEAST8_MIN INT8_MIN |
7168 |
+# define INT_LEAST8_MAX INT8_MAX |
7169 |
+# define UINT_LEAST8_MAX UINT8_MAX |
7170 |
+ |
7171 |
+# undef INT_LEAST16_MIN |
7172 |
+# undef INT_LEAST16_MAX |
7173 |
+# undef UINT_LEAST16_MAX |
7174 |
+# define INT_LEAST16_MIN INT16_MIN |
7175 |
+# define INT_LEAST16_MAX INT16_MAX |
7176 |
+# define UINT_LEAST16_MAX UINT16_MAX |
7177 |
+ |
7178 |
+# undef INT_LEAST32_MIN |
7179 |
+# undef INT_LEAST32_MAX |
7180 |
+# undef UINT_LEAST32_MAX |
7181 |
+# define INT_LEAST32_MIN INT32_MIN |
7182 |
+# define INT_LEAST32_MAX INT32_MAX |
7183 |
+# define UINT_LEAST32_MAX UINT32_MAX |
7184 |
+ |
7185 |
+# undef INT_LEAST64_MIN |
7186 |
+# undef INT_LEAST64_MAX |
7187 |
+# ifdef GL_INT64_T |
7188 |
+# define INT_LEAST64_MIN INT64_MIN |
7189 |
+# define INT_LEAST64_MAX INT64_MAX |
7190 |
+# endif |
7191 |
+ |
7192 |
+# undef UINT_LEAST64_MAX |
7193 |
+# ifdef GL_UINT64_T |
7194 |
+# define UINT_LEAST64_MAX UINT64_MAX |
7195 |
+# endif |
7196 |
+ |
7197 |
+/* 7.18.2.3. Limits of fastest minimum-width integer types */ |
7198 |
+ |
7199 |
+/* Here we assume a standard architecture where the hardware integer |
7200 |
+ types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types |
7201 |
+ are taken from the same list of types. */ |
7202 |
+ |
7203 |
+# undef INT_FAST8_MIN |
7204 |
+# undef INT_FAST8_MAX |
7205 |
+# undef UINT_FAST8_MAX |
7206 |
+# define INT_FAST8_MIN SCHAR_MIN |
7207 |
+# define INT_FAST8_MAX SCHAR_MAX |
7208 |
+# define UINT_FAST8_MAX UCHAR_MAX |
7209 |
+ |
7210 |
+# undef INT_FAST16_MIN |
7211 |
+# undef INT_FAST16_MAX |
7212 |
+# undef UINT_FAST16_MAX |
7213 |
+# define INT_FAST16_MIN INT_FAST32_MIN |
7214 |
+# define INT_FAST16_MAX INT_FAST32_MAX |
7215 |
+# define UINT_FAST16_MAX UINT_FAST32_MAX |
7216 |
+ |
7217 |
+# undef INT_FAST32_MIN |
7218 |
+# undef INT_FAST32_MAX |
7219 |
+# undef UINT_FAST32_MAX |
7220 |
+# ifdef __sun |
7221 |
+# define INT_FAST32_MIN INT_MIN |
7222 |
+# define INT_FAST32_MAX INT_MAX |
7223 |
+# define UINT_FAST32_MAX UINT_MAX |
7224 |
+# else |
7225 |
+# define INT_FAST32_MIN LONG_MIN |
7226 |
+# define INT_FAST32_MAX LONG_MAX |
7227 |
+# define UINT_FAST32_MAX ULONG_MAX |
7228 |
+# endif |
7229 |
+ |
7230 |
+# undef INT_FAST64_MIN |
7231 |
+# undef INT_FAST64_MAX |
7232 |
+# ifdef GL_INT64_T |
7233 |
+# define INT_FAST64_MIN INT64_MIN |
7234 |
+# define INT_FAST64_MAX INT64_MAX |
7235 |
+# endif |
7236 |
+ |
7237 |
+# undef UINT_FAST64_MAX |
7238 |
+# ifdef GL_UINT64_T |
7239 |
+# define UINT_FAST64_MAX UINT64_MAX |
7240 |
+# endif |
7241 |
+ |
7242 |
+/* 7.18.2.4. Limits of integer types capable of holding object pointers */ |
7243 |
+ |
7244 |
+# undef INTPTR_MIN |
7245 |
+# undef INTPTR_MAX |
7246 |
+# undef UINTPTR_MAX |
7247 |
+# ifdef _WIN64 |
7248 |
+# define INTPTR_MIN LLONG_MIN |
7249 |
+# define INTPTR_MAX LLONG_MAX |
7250 |
+# define UINTPTR_MAX ULLONG_MAX |
7251 |
+# else |
7252 |
+# define INTPTR_MIN LONG_MIN |
7253 |
+# define INTPTR_MAX LONG_MAX |
7254 |
+# define UINTPTR_MAX ULONG_MAX |
7255 |
+# endif |
7256 |
+ |
7257 |
+/* 7.18.2.5. Limits of greatest-width integer types */ |
7258 |
+ |
7259 |
+# ifndef INTMAX_MAX |
7260 |
+# undef INTMAX_MIN |
7261 |
+# ifdef INT64_MAX |
7262 |
+# define INTMAX_MIN INT64_MIN |
7263 |
+# define INTMAX_MAX INT64_MAX |
7264 |
+# else |
7265 |
+# define INTMAX_MIN INT32_MIN |
7266 |
+# define INTMAX_MAX INT32_MAX |
7267 |
+# endif |
7268 |
+# endif |
7269 |
+ |
7270 |
+# ifndef UINTMAX_MAX |
7271 |
+# ifdef UINT64_MAX |
7272 |
+# define UINTMAX_MAX UINT64_MAX |
7273 |
+# else |
7274 |
+# define UINTMAX_MAX UINT32_MAX |
7275 |
+# endif |
7276 |
+# endif |
7277 |
+ |
7278 |
+/* 7.18.3. Limits of other integer types */ |
7279 |
+ |
7280 |
+/* ptrdiff_t limits */ |
7281 |
+# undef PTRDIFF_MIN |
7282 |
+# undef PTRDIFF_MAX |
7283 |
+# if 0 |
7284 |
+# ifdef _LP64 |
7285 |
+# define PTRDIFF_MIN _STDINT_SIGNED_MIN (64, 0l) |
7286 |
+# define PTRDIFF_MAX _STDINT_MAX (1, 64, 0l) |
7287 |
+# else |
7288 |
+# define PTRDIFF_MIN _STDINT_SIGNED_MIN (32, 0) |
7289 |
+# define PTRDIFF_MAX _STDINT_MAX (1, 32, 0) |
7290 |
+# endif |
7291 |
+# else |
7292 |
+# define PTRDIFF_MIN \ |
7293 |
+ _STDINT_SIGNED_MIN (, 0) |
7294 |
+# define PTRDIFF_MAX \ |
7295 |
+ _STDINT_MAX (1, , 0) |
7296 |
+# endif |
7297 |
+ |
7298 |
+/* sig_atomic_t limits */ |
7299 |
+# undef SIG_ATOMIC_MIN |
7300 |
+# undef SIG_ATOMIC_MAX |
7301 |
+# if |
7302 |
+# define SIG_ATOMIC_MIN \ |
7303 |
+ _STDINT_SIGNED_MIN (, 0) |
7304 |
+# else |
7305 |
+# define SIG_ATOMIC_MIN \ |
7306 |
+ _STDINT_UNSIGNED_MIN (, 0) |
7307 |
+# endif |
7308 |
+# define SIG_ATOMIC_MAX \ |
7309 |
+ _STDINT_MAX (, , \ |
7310 |
+ 0) |
7311 |
+ |
7312 |
+ |
7313 |
+/* size_t limit */ |
7314 |
+# undef SIZE_MAX |
7315 |
+# if 0 |
7316 |
+# ifdef _LP64 |
7317 |
+# define SIZE_MAX _STDINT_MAX (0, 64, 0ul) |
7318 |
+# else |
7319 |
+# define SIZE_MAX _STDINT_MAX (0, 32, 0ul) |
7320 |
+# endif |
7321 |
+# else |
7322 |
+# define SIZE_MAX _STDINT_MAX (0, , 0) |
7323 |
+# endif |
7324 |
+ |
7325 |
+/* wchar_t limits */ |
7326 |
+/* Get WCHAR_MIN, WCHAR_MAX. |
7327 |
+ This include is not on the top, above, because on OSF/1 4.0 we have a |
7328 |
+ sequence of nested includes |
7329 |
+ <wchar.h> -> <stdio.h> -> <getopt.h> -> <stdlib.h>, and the latter includes |
7330 |
+ <stdint.h> and assumes its types are already defined. */ |
7331 |
+# if 1 && ! (defined WCHAR_MIN && defined WCHAR_MAX) |
7332 |
+# define _GL_JUST_INCLUDE_SYSTEM_WCHAR_H |
7333 |
+# include <wchar.h> |
7334 |
+# undef _GL_JUST_INCLUDE_SYSTEM_WCHAR_H |
7335 |
+# endif |
7336 |
+# undef WCHAR_MIN |
7337 |
+# undef WCHAR_MAX |
7338 |
+# if |
7339 |
+# define WCHAR_MIN \ |
7340 |
+ _STDINT_SIGNED_MIN (, 0) |
7341 |
+# else |
7342 |
+# define WCHAR_MIN \ |
7343 |
+ _STDINT_UNSIGNED_MIN (, 0) |
7344 |
+# endif |
7345 |
+# define WCHAR_MAX \ |
7346 |
+ _STDINT_MAX (, , 0) |
7347 |
+ |
7348 |
+/* wint_t limits */ |
7349 |
+/* If gnulib's <wchar.h> or <wctype.h> overrides wint_t, is not |
7350 |
+ accurate, therefore use the definitions from above. */ |
7351 |
+# if !0 |
7352 |
+# undef WINT_MIN |
7353 |
+# undef WINT_MAX |
7354 |
+# if |
7355 |
+# define WINT_MIN \ |
7356 |
+ _STDINT_SIGNED_MIN (, 0) |
7357 |
+# else |
7358 |
+# define WINT_MIN \ |
7359 |
+ _STDINT_UNSIGNED_MIN (, 0) |
7360 |
+# endif |
7361 |
+# define WINT_MAX \ |
7362 |
+ _STDINT_MAX (, , 0) |
7363 |
+# endif |
7364 |
+ |
7365 |
+/* 7.18.4. Macros for integer constants */ |
7366 |
+ |
7367 |
+/* 7.18.4.1. Macros for minimum-width integer constants */ |
7368 |
+/* According to ISO C 99 Technical Corrigendum 1 */ |
7369 |
+ |
7370 |
+/* Here we assume a standard architecture where the hardware integer |
7371 |
+ types have 8, 16, 32, optionally 64 bits, and int is 32 bits. */ |
7372 |
+ |
7373 |
+# undef INT8_C |
7374 |
+# undef UINT8_C |
7375 |
+# define INT8_C(x) x |
7376 |
+# define UINT8_C(x) x |
7377 |
+ |
7378 |
+# undef INT16_C |
7379 |
+# undef UINT16_C |
7380 |
+# define INT16_C(x) x |
7381 |
+# define UINT16_C(x) x |
7382 |
+ |
7383 |
+# undef INT32_C |
7384 |
+# undef UINT32_C |
7385 |
+# define INT32_C(x) x |
7386 |
+# define UINT32_C(x) x ## U |
7387 |
+ |
7388 |
+# undef INT64_C |
7389 |
+# undef UINT64_C |
7390 |
+# if LONG_MAX >> 31 >> 31 == 1 |
7391 |
+# define INT64_C(x) x##L |
7392 |
+# elif defined _MSC_VER |
7393 |
+# define INT64_C(x) x##i64 |
7394 |
+# else |
7395 |
+# define INT64_C(x) x##LL |
7396 |
+# endif |
7397 |
+# if ULONG_MAX >> 31 >> 31 >> 1 == 1 |
7398 |
+# define UINT64_C(x) x##UL |
7399 |
+# elif defined _MSC_VER |
7400 |
+# define UINT64_C(x) x##ui64 |
7401 |
+# else |
7402 |
+# define UINT64_C(x) x##ULL |
7403 |
+# endif |
7404 |
+ |
7405 |
+/* 7.18.4.2. Macros for greatest-width integer constants */ |
7406 |
+ |
7407 |
+# ifndef INTMAX_C |
7408 |
+# if LONG_MAX >> 30 == 1 |
7409 |
+# define INTMAX_C(x) x##LL |
7410 |
+# elif defined GL_INT64_T |
7411 |
+# define INTMAX_C(x) INT64_C(x) |
7412 |
+# else |
7413 |
+# define INTMAX_C(x) x##L |
7414 |
+# endif |
7415 |
+# endif |
7416 |
+ |
7417 |
+# ifndef UINTMAX_C |
7418 |
+# if ULONG_MAX >> 31 == 1 |
7419 |
+# define UINTMAX_C(x) x##ULL |
7420 |
+# elif defined GL_UINT64_T |
7421 |
+# define UINTMAX_C(x) UINT64_C(x) |
7422 |
+# else |
7423 |
+# define UINTMAX_C(x) x##UL |
7424 |
+# endif |
7425 |
+# endif |
7426 |
+ |
7427 |
+#endif /* !1 */ |
7428 |
+ |
7429 |
+/* Macros specified by ISO/IEC TS 18661-1:2014. */ |
7430 |
+ |
7431 |
+#if (!defined UINTMAX_WIDTH \ |
7432 |
+ && (defined _GNU_SOURCE || defined __STDC_WANT_IEC_60559_BFP_EXT__)) |
7433 |
+# ifdef INT8_MAX |
7434 |
+# define INT8_WIDTH _GL_INTEGER_WIDTH (INT8_MIN, INT8_MAX) |
7435 |
+# endif |
7436 |
+# ifdef UINT8_MAX |
7437 |
+# define UINT8_WIDTH _GL_INTEGER_WIDTH (0, UINT8_MAX) |
7438 |
+# endif |
7439 |
+# ifdef INT16_MAX |
7440 |
+# define INT16_WIDTH _GL_INTEGER_WIDTH (INT16_MIN, INT16_MAX) |
7441 |
+# endif |
7442 |
+# ifdef UINT16_MAX |
7443 |
+# define UINT16_WIDTH _GL_INTEGER_WIDTH (0, UINT16_MAX) |
7444 |
+# endif |
7445 |
+# ifdef INT32_MAX |
7446 |
+# define INT32_WIDTH _GL_INTEGER_WIDTH (INT32_MIN, INT32_MAX) |
7447 |
+# endif |
7448 |
+# ifdef UINT32_MAX |
7449 |
+# define UINT32_WIDTH _GL_INTEGER_WIDTH (0, UINT32_MAX) |
7450 |
+# endif |
7451 |
+# ifdef INT64_MAX |
7452 |
+# define INT64_WIDTH _GL_INTEGER_WIDTH (INT64_MIN, INT64_MAX) |
7453 |
+# endif |
7454 |
+# ifdef UINT64_MAX |
7455 |
+# define UINT64_WIDTH _GL_INTEGER_WIDTH (0, UINT64_MAX) |
7456 |
+# endif |
7457 |
+# define INT_LEAST8_WIDTH _GL_INTEGER_WIDTH (INT_LEAST8_MIN, INT_LEAST8_MAX) |
7458 |
+# define UINT_LEAST8_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST8_MAX) |
7459 |
+# define INT_LEAST16_WIDTH _GL_INTEGER_WIDTH (INT_LEAST16_MIN, INT_LEAST16_MAX) |
7460 |
+# define UINT_LEAST16_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST16_MAX) |
7461 |
+# define INT_LEAST32_WIDTH _GL_INTEGER_WIDTH (INT_LEAST32_MIN, INT_LEAST32_MAX) |
7462 |
+# define UINT_LEAST32_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST32_MAX) |
7463 |
+# define INT_LEAST64_WIDTH _GL_INTEGER_WIDTH (INT_LEAST64_MIN, INT_LEAST64_MAX) |
7464 |
+# define UINT_LEAST64_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST64_MAX) |
7465 |
+# define INT_FAST8_WIDTH _GL_INTEGER_WIDTH (INT_FAST8_MIN, INT_FAST8_MAX) |
7466 |
+# define UINT_FAST8_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST8_MAX) |
7467 |
+# define INT_FAST16_WIDTH _GL_INTEGER_WIDTH (INT_FAST16_MIN, INT_FAST16_MAX) |
7468 |
+# define UINT_FAST16_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST16_MAX) |
7469 |
+# define INT_FAST32_WIDTH _GL_INTEGER_WIDTH (INT_FAST32_MIN, INT_FAST32_MAX) |
7470 |
+# define UINT_FAST32_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST32_MAX) |
7471 |
+# define INT_FAST64_WIDTH _GL_INTEGER_WIDTH (INT_FAST64_MIN, INT_FAST64_MAX) |
7472 |
+# define UINT_FAST64_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST64_MAX) |
7473 |
+# define INTPTR_WIDTH _GL_INTEGER_WIDTH (INTPTR_MIN, INTPTR_MAX) |
7474 |
+# define UINTPTR_WIDTH _GL_INTEGER_WIDTH (0, UINTPTR_MAX) |
7475 |
+# define INTMAX_WIDTH _GL_INTEGER_WIDTH (INTMAX_MIN, INTMAX_MAX) |
7476 |
+# define UINTMAX_WIDTH _GL_INTEGER_WIDTH (0, UINTMAX_MAX) |
7477 |
+# define PTRDIFF_WIDTH _GL_INTEGER_WIDTH (PTRDIFF_MIN, PTRDIFF_MAX) |
7478 |
+# define SIZE_WIDTH _GL_INTEGER_WIDTH (0, SIZE_MAX) |
7479 |
+# define WCHAR_WIDTH _GL_INTEGER_WIDTH (WCHAR_MIN, WCHAR_MAX) |
7480 |
+# ifdef WINT_MAX |
7481 |
+# define WINT_WIDTH _GL_INTEGER_WIDTH (WINT_MIN, WINT_MAX) |
7482 |
+# endif |
7483 |
+# ifdef SIG_ATOMIC_MAX |
7484 |
+# define SIG_ATOMIC_WIDTH _GL_INTEGER_WIDTH (SIG_ATOMIC_MIN, SIG_ATOMIC_MAX) |
7485 |
+# endif |
7486 |
+#endif /* !WINT_WIDTH && (_GNU_SOURCE || __STDC_WANT_IEC_60559_BFP_EXT__) */ |
7487 |
+ |
7488 |
+#endif /* _GL_STDINT_H */ |
7489 |
+#endif /* !(defined __ANDROID__ && ...) */ |
7490 |
+#endif /* !defined _GL_STDINT_H && !defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H */ |
7491 |
|
7492 |
diff --git a/autotools/gnulib/stdio.h b/autotools/gnulib/stdio.h |
7493 |
new file mode 100644 |
7494 |
index 0000000..9490892 |
7495 |
--- /dev/null |
7496 |
+++ b/autotools/gnulib/stdio.h |
7497 |
@@ -0,0 +1,2218 @@ |
7498 |
+/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ |
7499 |
+/* A GNU-like <stdio.h>. |
7500 |
+ |
7501 |
+ Copyright (C) 2004, 2007-2022 Free Software Foundation, Inc. |
7502 |
+ |
7503 |
+ This file is free software: you can redistribute it and/or modify |
7504 |
+ it under the terms of the GNU Lesser General Public License as |
7505 |
+ published by the Free Software Foundation; either version 2.1 of the |
7506 |
+ License, or (at your option) any later version. |
7507 |
+ |
7508 |
+ This file is distributed in the hope that it will be useful, |
7509 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
7510 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
7511 |
+ GNU Lesser General Public License for more details. |
7512 |
+ |
7513 |
+ You should have received a copy of the GNU Lesser General Public License |
7514 |
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
7515 |
+ |
7516 |
+#if __GNUC__ >= 3 |
7517 |
+#pragma GCC system_header |
7518 |
+#endif |
7519 |
+ |
7520 |
+ |
7521 |
+#if defined __need_FILE || defined __need___FILE || defined _GL_ALREADY_INCLUDING_STDIO_H |
7522 |
+/* Special invocation convention: |
7523 |
+ - Inside glibc header files. |
7524 |
+ - On OSF/1 5.1 we have a sequence of nested includes |
7525 |
+ <stdio.h> -> <getopt.h> -> <ctype.h> -> <sys/localedef.h> -> |
7526 |
+ <sys/lc_core.h> -> <nl_types.h> -> <mesg.h> -> <stdio.h>. |
7527 |
+ In this situation, the functions are not yet declared, therefore we cannot |
7528 |
+ provide the C++ aliases. */ |
7529 |
+ |
7530 |
+#include_next <stdio.h> |
7531 |
+ |
7532 |
+#else |
7533 |
+/* Normal invocation convention. */ |
7534 |
+ |
7535 |
+#ifndef _GL_STDIO_H |
7536 |
+ |
7537 |
+#define _GL_ALREADY_INCLUDING_STDIO_H |
7538 |
+ |
7539 |
+/* The include_next requires a split double-inclusion guard. */ |
7540 |
+#include_next <stdio.h> |
7541 |
+ |
7542 |
+#undef _GL_ALREADY_INCLUDING_STDIO_H |
7543 |
+ |
7544 |
+#ifndef _GL_STDIO_H |
7545 |
+#define _GL_STDIO_H |
7546 |
+ |
7547 |
+/* Get va_list. Needed on many systems, including glibc 2.8. */ |
7548 |
+#include <stdarg.h> |
7549 |
+ |
7550 |
+#include <stddef.h> |
7551 |
+ |
7552 |
+/* Get off_t and ssize_t. Needed on many systems, including glibc 2.8 |
7553 |
+ and eglibc 2.11.2. |
7554 |
+ May also define off_t to a 64-bit type on native Windows. */ |
7555 |
+#include <sys/types.h> |
7556 |
+ |
7557 |
+/* Solaris 10 and NetBSD 7.0 declare renameat in <unistd.h>, not in <stdio.h>. */ |
7558 |
+/* But in any case avoid namespace pollution on glibc systems. */ |
7559 |
+#if (1 || defined GNULIB_POSIXCHECK) && (defined __sun || defined __NetBSD__) \ |
7560 |
+ && ! defined __GLIBC__ |
7561 |
+# include <unistd.h> |
7562 |
+#endif |
7563 |
+ |
7564 |
+/* Android 4.3 declares renameat in <sys/stat.h>, not in <stdio.h>. */ |
7565 |
+/* But in any case avoid namespace pollution on glibc systems. */ |
7566 |
+#if (1 || defined GNULIB_POSIXCHECK) && defined __ANDROID__ \ |
7567 |
+ && ! defined __GLIBC__ |
7568 |
+# include <sys/stat.h> |
7569 |
+#endif |
7570 |
+ |
7571 |
+/* MSVC declares 'perror' in <stdlib.h>, not in <stdio.h>. We must include |
7572 |
+ it before we #define perror rpl_perror. */ |
7573 |
+/* But in any case avoid namespace pollution on glibc systems. */ |
7574 |
+#if (0 || defined GNULIB_POSIXCHECK) \ |
7575 |
+ && (defined _WIN32 && ! defined __CYGWIN__) \ |
7576 |
+ && ! defined __GLIBC__ |
7577 |
+# include <stdlib.h> |
7578 |
+#endif |
7579 |
+ |
7580 |
+/* MSVC declares 'remove' in <io.h>, not in <stdio.h>. We must include |
7581 |
+ it before we #define remove rpl_remove. */ |
7582 |
+/* MSVC declares 'rename' in <io.h>, not in <stdio.h>. We must include |
7583 |
+ it before we #define rename rpl_rename. */ |
7584 |
+/* But in any case avoid namespace pollution on glibc systems. */ |
7585 |
+#if (0 || 1 || defined GNULIB_POSIXCHECK) \ |
7586 |
+ && (defined _WIN32 && ! defined __CYGWIN__) \ |
7587 |
+ && ! defined __GLIBC__ |
7588 |
+# include <io.h> |
7589 |
+#endif |
7590 |
+ |
7591 |
+ |
7592 |
+/* _GL_ATTRIBUTE_DEALLOC (F, I) declares that the function returns pointers |
7593 |
+ that can be freed by passing them as the Ith argument to the |
7594 |
+ function F. */ |
7595 |
+#ifndef _GL_ATTRIBUTE_DEALLOC |
7596 |
+# if __GNUC__ >= 11 |
7597 |
+# define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i))) |
7598 |
+# else |
7599 |
+# define _GL_ATTRIBUTE_DEALLOC(f, i) |
7600 |
+# endif |
7601 |
+#endif |
7602 |
+ |
7603 |
+/* The __attribute__ feature is available in gcc versions 2.5 and later. |
7604 |
+ The __-protected variants of the attributes 'format' and 'printf' are |
7605 |
+ accepted by gcc versions 2.6.4 (effectively 2.7) and later. |
7606 |
+ We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because |
7607 |
+ gnulib and libintl do '#define printf __printf__' when they override |
7608 |
+ the 'printf' function. */ |
7609 |
+#ifndef _GL_ATTRIBUTE_FORMAT |
7610 |
+# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) || defined __clang__ |
7611 |
+# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) |
7612 |
+# else |
7613 |
+# define _GL_ATTRIBUTE_FORMAT(spec) /* empty */ |
7614 |
+# endif |
7615 |
+#endif |
7616 |
+ |
7617 |
+/* An __attribute__ __format__ specifier for a function that takes a format |
7618 |
+ string and arguments, where the format string directives are the ones |
7619 |
+ standardized by ISO C99 and POSIX. |
7620 |
+ _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD */ |
7621 |
+/* __gnu_printf__ is supported in GCC >= 4.4. */ |
7622 |
+#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) |
7623 |
+# define _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD __gnu_printf__ |
7624 |
+#else |
7625 |
+# define _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD __printf__ |
7626 |
+#endif |
7627 |
+ |
7628 |
+/* An __attribute__ __format__ specifier for a function that takes a format |
7629 |
+ string and arguments, where the format string directives are the ones of the |
7630 |
+ system printf(), rather than the ones standardized by ISO C99 and POSIX. |
7631 |
+ _GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM */ |
7632 |
+/* On mingw, Gnulib sets __USE_MINGW_ANSI_STDIO in order to get closer to |
7633 |
+ the standards. The macro GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU indicates |
7634 |
+ whether this change is effective. On older mingw, it is not. */ |
7635 |
+#if GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU |
7636 |
+# define _GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD |
7637 |
+#else |
7638 |
+# define _GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM __printf__ |
7639 |
+#endif |
7640 |
+ |
7641 |
+/* _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD |
7642 |
+ indicates to GCC that the function takes a format string and arguments, |
7643 |
+ where the format string directives are the ones standardized by ISO C99 |
7644 |
+ and POSIX. */ |
7645 |
+#define _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD(formatstring_parameter, first_argument) \ |
7646 |
+ _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_STANDARD, formatstring_parameter, first_argument)) |
7647 |
+ |
7648 |
+/* _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM is like _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD, |
7649 |
+ except that it indicates to GCC that the supported format string directives |
7650 |
+ are the ones of the system printf(), rather than the ones standardized by |
7651 |
+ ISO C99 and POSIX. */ |
7652 |
+#define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \ |
7653 |
+ _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM, formatstring_parameter, first_argument)) |
7654 |
+ |
7655 |
+/* _GL_ATTRIBUTE_FORMAT_SCANF |
7656 |
+ indicates to GCC that the function takes a format string and arguments, |
7657 |
+ where the format string directives are the ones standardized by ISO C99 |
7658 |
+ and POSIX. */ |
7659 |
+#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) |
7660 |
+# define _GL_ATTRIBUTE_FORMAT_SCANF(formatstring_parameter, first_argument) \ |
7661 |
+ _GL_ATTRIBUTE_FORMAT ((__gnu_scanf__, formatstring_parameter, first_argument)) |
7662 |
+#else |
7663 |
+# define _GL_ATTRIBUTE_FORMAT_SCANF(formatstring_parameter, first_argument) \ |
7664 |
+ _GL_ATTRIBUTE_FORMAT ((__scanf__, formatstring_parameter, first_argument)) |
7665 |
+#endif |
7666 |
+ |
7667 |
+/* _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM is like _GL_ATTRIBUTE_FORMAT_SCANF, |
7668 |
+ except that it indicates to GCC that the supported format string directives |
7669 |
+ are the ones of the system scanf(), rather than the ones standardized by |
7670 |
+ ISO C99 and POSIX. */ |
7671 |
+#define _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM(formatstring_parameter, first_argument) \ |
7672 |
+ _GL_ATTRIBUTE_FORMAT ((__scanf__, formatstring_parameter, first_argument)) |
7673 |
+ |
7674 |
+/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ |
7675 |
+/* C++ compatible function declaration macros. |
7676 |
+ Copyright (C) 2010-2022 Free Software Foundation, Inc. |
7677 |
+ |
7678 |
+ This program is free software: you can redistribute it and/or modify it |
7679 |
+ under the terms of the GNU Lesser General Public License as published |
7680 |
+ by the Free Software Foundation; either version 2 of the License, or |
7681 |
+ (at your option) any later version. |
7682 |
+ |
7683 |
+ This program is distributed in the hope that it will be useful, |
7684 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
7685 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
7686 |
+ Lesser General Public License for more details. |
7687 |
+ |
7688 |
+ You should have received a copy of the GNU Lesser General Public License |
7689 |
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
7690 |
+ |
7691 |
+#ifndef _GL_CXXDEFS_H |
7692 |
+#define _GL_CXXDEFS_H |
7693 |
+ |
7694 |
+/* Begin/end the GNULIB_NAMESPACE namespace. */ |
7695 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
7696 |
+# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { |
7697 |
+# define _GL_END_NAMESPACE } |
7698 |
+#else |
7699 |
+# define _GL_BEGIN_NAMESPACE |
7700 |
+# define _GL_END_NAMESPACE |
7701 |
+#endif |
7702 |
+ |
7703 |
+/* The three most frequent use cases of these macros are: |
7704 |
+ |
7705 |
+ * For providing a substitute for a function that is missing on some |
7706 |
+ platforms, but is declared and works fine on the platforms on which |
7707 |
+ it exists: |
7708 |
+ |
7709 |
+ #if @GNULIB_FOO@ |
7710 |
+ # if !@HAVE_FOO@ |
7711 |
+ _GL_FUNCDECL_SYS (foo, ...); |
7712 |
+ # endif |
7713 |
+ _GL_CXXALIAS_SYS (foo, ...); |
7714 |
+ _GL_CXXALIASWARN (foo); |
7715 |
+ #elif defined GNULIB_POSIXCHECK |
7716 |
+ ... |
7717 |
+ #endif |
7718 |
+ |
7719 |
+ * For providing a replacement for a function that exists on all platforms, |
7720 |
+ but is broken/insufficient and needs to be replaced on some platforms: |
7721 |
+ |
7722 |
+ #if @GNULIB_FOO@ |
7723 |
+ # if @REPLACE_FOO@ |
7724 |
+ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
7725 |
+ # undef foo |
7726 |
+ # define foo rpl_foo |
7727 |
+ # endif |
7728 |
+ _GL_FUNCDECL_RPL (foo, ...); |
7729 |
+ _GL_CXXALIAS_RPL (foo, ...); |
7730 |
+ # else |
7731 |
+ _GL_CXXALIAS_SYS (foo, ...); |
7732 |
+ # endif |
7733 |
+ _GL_CXXALIASWARN (foo); |
7734 |
+ #elif defined GNULIB_POSIXCHECK |
7735 |
+ ... |
7736 |
+ #endif |
7737 |
+ |
7738 |
+ * For providing a replacement for a function that exists on some platforms |
7739 |
+ but is broken/insufficient and needs to be replaced on some of them and |
7740 |
+ is additionally either missing or undeclared on some other platforms: |
7741 |
+ |
7742 |
+ #if @GNULIB_FOO@ |
7743 |
+ # if @REPLACE_FOO@ |
7744 |
+ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
7745 |
+ # undef foo |
7746 |
+ # define foo rpl_foo |
7747 |
+ # endif |
7748 |
+ _GL_FUNCDECL_RPL (foo, ...); |
7749 |
+ _GL_CXXALIAS_RPL (foo, ...); |
7750 |
+ # else |
7751 |
+ # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ |
7752 |
+ _GL_FUNCDECL_SYS (foo, ...); |
7753 |
+ # endif |
7754 |
+ _GL_CXXALIAS_SYS (foo, ...); |
7755 |
+ # endif |
7756 |
+ _GL_CXXALIASWARN (foo); |
7757 |
+ #elif defined GNULIB_POSIXCHECK |
7758 |
+ ... |
7759 |
+ #endif |
7760 |
+*/ |
7761 |
+ |
7762 |
+/* _GL_EXTERN_C declaration; |
7763 |
+ performs the declaration with C linkage. */ |
7764 |
+#if defined __cplusplus |
7765 |
+# define _GL_EXTERN_C extern "C" |
7766 |
+#else |
7767 |
+# define _GL_EXTERN_C extern |
7768 |
+#endif |
7769 |
+ |
7770 |
+/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); |
7771 |
+ declares a replacement function, named rpl_func, with the given prototype, |
7772 |
+ consisting of return type, parameters, and attributes. |
7773 |
+ Example: |
7774 |
+ _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) |
7775 |
+ _GL_ARG_NONNULL ((1))); |
7776 |
+ */ |
7777 |
+#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ |
7778 |
+ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) |
7779 |
+#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ |
7780 |
+ _GL_EXTERN_C rettype rpl_func parameters_and_attributes |
7781 |
+ |
7782 |
+/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); |
7783 |
+ declares the system function, named func, with the given prototype, |
7784 |
+ consisting of return type, parameters, and attributes. |
7785 |
+ Example: |
7786 |
+ _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) |
7787 |
+ _GL_ARG_NONNULL ((1))); |
7788 |
+ */ |
7789 |
+#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ |
7790 |
+ _GL_EXTERN_C rettype func parameters_and_attributes |
7791 |
+ |
7792 |
+/* _GL_CXXALIAS_RPL (func, rettype, parameters); |
7793 |
+ declares a C++ alias called GNULIB_NAMESPACE::func |
7794 |
+ that redirects to rpl_func, if GNULIB_NAMESPACE is defined. |
7795 |
+ Example: |
7796 |
+ _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); |
7797 |
+ |
7798 |
+ Wrapping rpl_func in an object with an inline conversion operator |
7799 |
+ avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is |
7800 |
+ actually used in the program. */ |
7801 |
+#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ |
7802 |
+ _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) |
7803 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
7804 |
+# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ |
7805 |
+ namespace GNULIB_NAMESPACE \ |
7806 |
+ { \ |
7807 |
+ static const struct _gl_ ## func ## _wrapper \ |
7808 |
+ { \ |
7809 |
+ typedef rettype (*type) parameters; \ |
7810 |
+ \ |
7811 |
+ inline operator type () const \ |
7812 |
+ { \ |
7813 |
+ return ::rpl_func; \ |
7814 |
+ } \ |
7815 |
+ } func = {}; \ |
7816 |
+ } \ |
7817 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
7818 |
+#else |
7819 |
+# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ |
7820 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
7821 |
+#endif |
7822 |
+ |
7823 |
+/* _GL_CXXALIAS_MDA (func, rettype, parameters); |
7824 |
+ is to be used when func is a Microsoft deprecated alias, on native Windows. |
7825 |
+ It declares a C++ alias called GNULIB_NAMESPACE::func |
7826 |
+ that redirects to _func, if GNULIB_NAMESPACE is defined. |
7827 |
+ Example: |
7828 |
+ _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); |
7829 |
+ */ |
7830 |
+#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ |
7831 |
+ _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) |
7832 |
+ |
7833 |
+/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); |
7834 |
+ is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); |
7835 |
+ except that the C function rpl_func may have a slightly different |
7836 |
+ declaration. A cast is used to silence the "invalid conversion" error |
7837 |
+ that would otherwise occur. */ |
7838 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
7839 |
+# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ |
7840 |
+ namespace GNULIB_NAMESPACE \ |
7841 |
+ { \ |
7842 |
+ static const struct _gl_ ## func ## _wrapper \ |
7843 |
+ { \ |
7844 |
+ typedef rettype (*type) parameters; \ |
7845 |
+ \ |
7846 |
+ inline operator type () const \ |
7847 |
+ { \ |
7848 |
+ return reinterpret_cast<type>(::rpl_func); \ |
7849 |
+ } \ |
7850 |
+ } func = {}; \ |
7851 |
+ } \ |
7852 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
7853 |
+#else |
7854 |
+# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ |
7855 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
7856 |
+#endif |
7857 |
+ |
7858 |
+/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); |
7859 |
+ is like _GL_CXXALIAS_MDA (func, rettype, parameters); |
7860 |
+ except that the C function func may have a slightly different declaration. |
7861 |
+ A cast is used to silence the "invalid conversion" error that would |
7862 |
+ otherwise occur. */ |
7863 |
+#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ |
7864 |
+ _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) |
7865 |
+ |
7866 |
+/* _GL_CXXALIAS_SYS (func, rettype, parameters); |
7867 |
+ declares a C++ alias called GNULIB_NAMESPACE::func |
7868 |
+ that redirects to the system provided function func, if GNULIB_NAMESPACE |
7869 |
+ is defined. |
7870 |
+ Example: |
7871 |
+ _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); |
7872 |
+ |
7873 |
+ Wrapping func in an object with an inline conversion operator |
7874 |
+ avoids a reference to func unless GNULIB_NAMESPACE::func is |
7875 |
+ actually used in the program. */ |
7876 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
7877 |
+# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ |
7878 |
+ namespace GNULIB_NAMESPACE \ |
7879 |
+ { \ |
7880 |
+ static const struct _gl_ ## func ## _wrapper \ |
7881 |
+ { \ |
7882 |
+ typedef rettype (*type) parameters; \ |
7883 |
+ \ |
7884 |
+ inline operator type () const \ |
7885 |
+ { \ |
7886 |
+ return ::func; \ |
7887 |
+ } \ |
7888 |
+ } func = {}; \ |
7889 |
+ } \ |
7890 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
7891 |
+#else |
7892 |
+# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ |
7893 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
7894 |
+#endif |
7895 |
+ |
7896 |
+/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); |
7897 |
+ is like _GL_CXXALIAS_SYS (func, rettype, parameters); |
7898 |
+ except that the C function func may have a slightly different declaration. |
7899 |
+ A cast is used to silence the "invalid conversion" error that would |
7900 |
+ otherwise occur. */ |
7901 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
7902 |
+# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ |
7903 |
+ namespace GNULIB_NAMESPACE \ |
7904 |
+ { \ |
7905 |
+ static const struct _gl_ ## func ## _wrapper \ |
7906 |
+ { \ |
7907 |
+ typedef rettype (*type) parameters; \ |
7908 |
+ \ |
7909 |
+ inline operator type () const \ |
7910 |
+ { \ |
7911 |
+ return reinterpret_cast<type>(::func); \ |
7912 |
+ } \ |
7913 |
+ } func = {}; \ |
7914 |
+ } \ |
7915 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
7916 |
+#else |
7917 |
+# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ |
7918 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
7919 |
+#endif |
7920 |
+ |
7921 |
+/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); |
7922 |
+ is like _GL_CXXALIAS_SYS (func, rettype, parameters); |
7923 |
+ except that the C function is picked among a set of overloaded functions, |
7924 |
+ namely the one with rettype2 and parameters2. Two consecutive casts |
7925 |
+ are used to silence the "cannot find a match" and "invalid conversion" |
7926 |
+ errors that would otherwise occur. */ |
7927 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
7928 |
+ /* The outer cast must be a reinterpret_cast. |
7929 |
+ The inner cast: When the function is defined as a set of overloaded |
7930 |
+ functions, it works as a static_cast<>, choosing the designated variant. |
7931 |
+ When the function is defined as a single variant, it works as a |
7932 |
+ reinterpret_cast<>. The parenthesized cast syntax works both ways. */ |
7933 |
+# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ |
7934 |
+ namespace GNULIB_NAMESPACE \ |
7935 |
+ { \ |
7936 |
+ static const struct _gl_ ## func ## _wrapper \ |
7937 |
+ { \ |
7938 |
+ typedef rettype (*type) parameters; \ |
7939 |
+ \ |
7940 |
+ inline operator type () const \ |
7941 |
+ { \ |
7942 |
+ return reinterpret_cast<type>((rettype2 (*) parameters2)(::func)); \ |
7943 |
+ } \ |
7944 |
+ } func = {}; \ |
7945 |
+ } \ |
7946 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
7947 |
+#else |
7948 |
+# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ |
7949 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
7950 |
+#endif |
7951 |
+ |
7952 |
+/* _GL_CXXALIASWARN (func); |
7953 |
+ causes a warning to be emitted when ::func is used but not when |
7954 |
+ GNULIB_NAMESPACE::func is used. func must be defined without overloaded |
7955 |
+ variants. */ |
7956 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
7957 |
+# define _GL_CXXALIASWARN(func) \ |
7958 |
+ _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) |
7959 |
+# define _GL_CXXALIASWARN_1(func,namespace) \ |
7960 |
+ _GL_CXXALIASWARN_2 (func, namespace) |
7961 |
+/* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>, |
7962 |
+ we enable the warning only when not optimizing. */ |
7963 |
+# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) |
7964 |
+# define _GL_CXXALIASWARN_2(func,namespace) \ |
7965 |
+ _GL_WARN_ON_USE (func, \ |
7966 |
+ "The symbol ::" #func " refers to the system function. " \ |
7967 |
+ "Use " #namespace "::" #func " instead.") |
7968 |
+# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING |
7969 |
+# define _GL_CXXALIASWARN_2(func,namespace) \ |
7970 |
+ extern __typeof__ (func) func |
7971 |
+# else |
7972 |
+# define _GL_CXXALIASWARN_2(func,namespace) \ |
7973 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
7974 |
+# endif |
7975 |
+#else |
7976 |
+# define _GL_CXXALIASWARN(func) \ |
7977 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
7978 |
+#endif |
7979 |
+ |
7980 |
+/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); |
7981 |
+ causes a warning to be emitted when the given overloaded variant of ::func |
7982 |
+ is used but not when GNULIB_NAMESPACE::func is used. */ |
7983 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
7984 |
+# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ |
7985 |
+ _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ |
7986 |
+ GNULIB_NAMESPACE) |
7987 |
+# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ |
7988 |
+ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) |
7989 |
+/* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>, |
7990 |
+ we enable the warning only when not optimizing. */ |
7991 |
+# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) |
7992 |
+# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ |
7993 |
+ _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ |
7994 |
+ "The symbol ::" #func " refers to the system function. " \ |
7995 |
+ "Use " #namespace "::" #func " instead.") |
7996 |
+# else |
7997 |
+# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ |
7998 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
7999 |
+# endif |
8000 |
+#else |
8001 |
+# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ |
8002 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
8003 |
+#endif |
8004 |
+ |
8005 |
+#endif /* _GL_CXXDEFS_H */ |
8006 |
+ |
8007 |
+/* The definition of _GL_ARG_NONNULL is copied here. */ |
8008 |
+/* A C macro for declaring that specific arguments must not be NULL. |
8009 |
+ Copyright (C) 2009-2022 Free Software Foundation, Inc. |
8010 |
+ |
8011 |
+ This program is free software: you can redistribute it and/or modify it |
8012 |
+ under the terms of the GNU Lesser General Public License as published |
8013 |
+ by the Free Software Foundation; either version 2 of the License, or |
8014 |
+ (at your option) any later version. |
8015 |
+ |
8016 |
+ This program is distributed in the hope that it will be useful, |
8017 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
8018 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
8019 |
+ Lesser General Public License for more details. |
8020 |
+ |
8021 |
+ You should have received a copy of the GNU Lesser General Public License |
8022 |
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
8023 |
+ |
8024 |
+/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools |
8025 |
+ that the values passed as arguments n, ..., m must be non-NULL pointers. |
8026 |
+ n = 1 stands for the first argument, n = 2 for the second argument etc. */ |
8027 |
+#ifndef _GL_ARG_NONNULL |
8028 |
+# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ |
8029 |
+# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) |
8030 |
+# else |
8031 |
+# define _GL_ARG_NONNULL(params) |
8032 |
+# endif |
8033 |
+#endif |
8034 |
+ |
8035 |
+/* The definition of _GL_WARN_ON_USE is copied here. */ |
8036 |
+/* A C macro for emitting warnings if a function is used. |
8037 |
+ Copyright (C) 2010-2022 Free Software Foundation, Inc. |
8038 |
+ |
8039 |
+ This program is free software: you can redistribute it and/or modify it |
8040 |
+ under the terms of the GNU Lesser General Public License as published |
8041 |
+ by the Free Software Foundation; either version 2 of the License, or |
8042 |
+ (at your option) any later version. |
8043 |
+ |
8044 |
+ This program is distributed in the hope that it will be useful, |
8045 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
8046 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
8047 |
+ Lesser General Public License for more details. |
8048 |
+ |
8049 |
+ You should have received a copy of the GNU Lesser General Public License |
8050 |
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
8051 |
+ |
8052 |
+/* _GL_WARN_ON_USE (function, "literal string") issues a declaration |
8053 |
+ for FUNCTION which will then trigger a compiler warning containing |
8054 |
+ the text of "literal string" anywhere that function is called, if |
8055 |
+ supported by the compiler. If the compiler does not support this |
8056 |
+ feature, the macro expands to an unused extern declaration. |
8057 |
+ |
8058 |
+ _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the |
8059 |
+ attribute used in _GL_WARN_ON_USE. If the compiler does not support |
8060 |
+ this feature, it expands to empty. |
8061 |
+ |
8062 |
+ These macros are useful for marking a function as a potential |
8063 |
+ portability trap, with the intent that "literal string" include |
8064 |
+ instructions on the replacement function that should be used |
8065 |
+ instead. |
8066 |
+ _GL_WARN_ON_USE is for functions with 'extern' linkage. |
8067 |
+ _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline' |
8068 |
+ linkage. |
8069 |
+ |
8070 |
+ However, one of the reasons that a function is a portability trap is |
8071 |
+ if it has the wrong signature. Declaring FUNCTION with a different |
8072 |
+ signature in C is a compilation error, so this macro must use the |
8073 |
+ same type as any existing declaration so that programs that avoid |
8074 |
+ the problematic FUNCTION do not fail to compile merely because they |
8075 |
+ included a header that poisoned the function. But this implies that |
8076 |
+ _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already |
8077 |
+ have a declaration. Use of this macro implies that there must not |
8078 |
+ be any other macro hiding the declaration of FUNCTION; but |
8079 |
+ undefining FUNCTION first is part of the poisoning process anyway |
8080 |
+ (although for symbols that are provided only via a macro, the result |
8081 |
+ is a compilation error rather than a warning containing |
8082 |
+ "literal string"). Also note that in C++, it is only safe to use if |
8083 |
+ FUNCTION has no overloads. |
8084 |
+ |
8085 |
+ For an example, it is possible to poison 'getline' by: |
8086 |
+ - adding a call to gl_WARN_ON_USE_PREPARE([[#include <stdio.h>]], |
8087 |
+ [getline]) in configure.ac, which potentially defines |
8088 |
+ HAVE_RAW_DECL_GETLINE |
8089 |
+ - adding this code to a header that wraps the system <stdio.h>: |
8090 |
+ #undef getline |
8091 |
+ #if HAVE_RAW_DECL_GETLINE |
8092 |
+ _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" |
8093 |
+ "not universally present; use the gnulib module getline"); |
8094 |
+ #endif |
8095 |
+ |
8096 |
+ It is not possible to directly poison global variables. But it is |
8097 |
+ possible to write a wrapper accessor function, and poison that |
8098 |
+ (less common usage, like &environ, will cause a compilation error |
8099 |
+ rather than issue the nice warning, but the end result of informing |
8100 |
+ the developer about their portability problem is still achieved): |
8101 |
+ #if HAVE_RAW_DECL_ENVIRON |
8102 |
+ static char *** |
8103 |
+ rpl_environ (void) { return &environ; } |
8104 |
+ _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); |
8105 |
+ # undef environ |
8106 |
+ # define environ (*rpl_environ ()) |
8107 |
+ #endif |
8108 |
+ or better (avoiding contradictory use of 'static' and 'extern'): |
8109 |
+ #if HAVE_RAW_DECL_ENVIRON |
8110 |
+ static char *** |
8111 |
+ _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared") |
8112 |
+ rpl_environ (void) { return &environ; } |
8113 |
+ # undef environ |
8114 |
+ # define environ (*rpl_environ ()) |
8115 |
+ #endif |
8116 |
+ */ |
8117 |
+#ifndef _GL_WARN_ON_USE |
8118 |
+ |
8119 |
+# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) |
8120 |
+/* A compiler attribute is available in gcc versions 4.3.0 and later. */ |
8121 |
+# define _GL_WARN_ON_USE(function, message) \ |
8122 |
+_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) |
8123 |
+# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ |
8124 |
+ __attribute__ ((__warning__ (message))) |
8125 |
+# elif __clang_major__ >= 4 |
8126 |
+/* Another compiler attribute is available in clang. */ |
8127 |
+# define _GL_WARN_ON_USE(function, message) \ |
8128 |
+_GL_WARN_EXTERN_C __typeof__ (function) function \ |
8129 |
+ __attribute__ ((__diagnose_if__ (1, message, "warning"))) |
8130 |
+# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ |
8131 |
+ __attribute__ ((__diagnose_if__ (1, message, "warning"))) |
8132 |
+# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING |
8133 |
+/* Verify the existence of the function. */ |
8134 |
+# define _GL_WARN_ON_USE(function, message) \ |
8135 |
+_GL_WARN_EXTERN_C __typeof__ (function) function |
8136 |
+# define _GL_WARN_ON_USE_ATTRIBUTE(message) |
8137 |
+# else /* Unsupported. */ |
8138 |
+# define _GL_WARN_ON_USE(function, message) \ |
8139 |
+_GL_WARN_EXTERN_C int _gl_warn_on_use |
8140 |
+# define _GL_WARN_ON_USE_ATTRIBUTE(message) |
8141 |
+# endif |
8142 |
+#endif |
8143 |
+ |
8144 |
+/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") |
8145 |
+ is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the |
8146 |
+ function is declared with the given prototype, consisting of return type, |
8147 |
+ parameters, and attributes. |
8148 |
+ This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does |
8149 |
+ not work in this case. */ |
8150 |
+#ifndef _GL_WARN_ON_USE_CXX |
8151 |
+# if !defined __cplusplus |
8152 |
+# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ |
8153 |
+ _GL_WARN_ON_USE (function, msg) |
8154 |
+# else |
8155 |
+# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) |
8156 |
+/* A compiler attribute is available in gcc versions 4.3.0 and later. */ |
8157 |
+# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ |
8158 |
+extern rettype_gcc function parameters_and_attributes \ |
8159 |
+ __attribute__ ((__warning__ (msg))) |
8160 |
+# elif __clang_major__ >= 4 |
8161 |
+/* Another compiler attribute is available in clang. */ |
8162 |
+# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ |
8163 |
+extern rettype_clang function parameters_and_attributes \ |
8164 |
+ __attribute__ ((__diagnose_if__ (1, msg, "warning"))) |
8165 |
+# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING |
8166 |
+/* Verify the existence of the function. */ |
8167 |
+# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ |
8168 |
+extern rettype_gcc function parameters_and_attributes |
8169 |
+# else /* Unsupported. */ |
8170 |
+# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ |
8171 |
+_GL_WARN_EXTERN_C int _gl_warn_on_use |
8172 |
+# endif |
8173 |
+# endif |
8174 |
+#endif |
8175 |
+ |
8176 |
+/* _GL_WARN_EXTERN_C declaration; |
8177 |
+ performs the declaration with C linkage. */ |
8178 |
+#ifndef _GL_WARN_EXTERN_C |
8179 |
+# if defined __cplusplus |
8180 |
+# define _GL_WARN_EXTERN_C extern "C" |
8181 |
+# else |
8182 |
+# define _GL_WARN_EXTERN_C extern |
8183 |
+# endif |
8184 |
+#endif |
8185 |
+ |
8186 |
+/* Macros for stringification. */ |
8187 |
+#define _GL_STDIO_STRINGIZE(token) #token |
8188 |
+#define _GL_STDIO_MACROEXPAND_AND_STRINGIZE(token) _GL_STDIO_STRINGIZE(token) |
8189 |
+ |
8190 |
+/* When also using extern inline, suppress the use of static inline in |
8191 |
+ standard headers of problematic Apple configurations, as Libc at |
8192 |
+ least through Libc-825.26 (2013-04-09) mishandles it; see, e.g., |
8193 |
+ <https://lists.gnu.org/r/bug-gnulib/2012-12/msg00023.html>. |
8194 |
+ Perhaps Apple will fix this some day. */ |
8195 |
+#if (defined _GL_EXTERN_INLINE_IN_USE && defined __APPLE__ \ |
8196 |
+ && defined __GNUC__ && defined __STDC__) |
8197 |
+# undef putc_unlocked |
8198 |
+#endif |
8199 |
+ |
8200 |
+#if 0 |
8201 |
+# if 0 |
8202 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
8203 |
+# define dprintf rpl_dprintf |
8204 |
+# endif |
8205 |
+_GL_FUNCDECL_RPL (dprintf, int, (int fd, const char *restrict format, ...) |
8206 |
+ _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3) |
8207 |
+ _GL_ARG_NONNULL ((2))); |
8208 |
+_GL_CXXALIAS_RPL (dprintf, int, (int fd, const char *restrict format, ...)); |
8209 |
+# else |
8210 |
+# if !1 |
8211 |
+_GL_FUNCDECL_SYS (dprintf, int, (int fd, const char *restrict format, ...) |
8212 |
+ _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3) |
8213 |
+ _GL_ARG_NONNULL ((2))); |
8214 |
+# endif |
8215 |
+_GL_CXXALIAS_SYS (dprintf, int, (int fd, const char *restrict format, ...)); |
8216 |
+# endif |
8217 |
+_GL_CXXALIASWARN (dprintf); |
8218 |
+#elif defined GNULIB_POSIXCHECK |
8219 |
+# undef dprintf |
8220 |
+# if HAVE_RAW_DECL_DPRINTF |
8221 |
+_GL_WARN_ON_USE (dprintf, "dprintf is unportable - " |
8222 |
+ "use gnulib module dprintf for portability"); |
8223 |
+# endif |
8224 |
+#endif |
8225 |
+ |
8226 |
+#if 0 |
8227 |
+/* Close STREAM and its underlying file descriptor. */ |
8228 |
+# if 0 |
8229 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
8230 |
+# define fclose rpl_fclose |
8231 |
+# endif |
8232 |
+_GL_FUNCDECL_RPL (fclose, int, (FILE *stream) _GL_ARG_NONNULL ((1))); |
8233 |
+_GL_CXXALIAS_RPL (fclose, int, (FILE *stream)); |
8234 |
+# else |
8235 |
+_GL_CXXALIAS_SYS (fclose, int, (FILE *stream)); |
8236 |
+# endif |
8237 |
+# if __GLIBC__ >= 2 |
8238 |
+_GL_CXXALIASWARN (fclose); |
8239 |
+# endif |
8240 |
+#elif defined GNULIB_POSIXCHECK |
8241 |
+# undef fclose |
8242 |
+/* Assume fclose is always declared. */ |
8243 |
+_GL_WARN_ON_USE (fclose, "fclose is not always POSIX compliant - " |
8244 |
+ "use gnulib module fclose for portable POSIX compliance"); |
8245 |
+#endif |
8246 |
+ |
8247 |
+#if 1 |
8248 |
+/* On native Windows, map 'fcloseall' to '_fcloseall', so that -loldnames is |
8249 |
+ not required. In C++ with GNULIB_NAMESPACE, avoid differences between |
8250 |
+ platforms by defining GNULIB_NAMESPACE::fcloseall on all platforms that have |
8251 |
+ it. */ |
8252 |
+# if defined _WIN32 && !defined __CYGWIN__ |
8253 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
8254 |
+# undef fcloseall |
8255 |
+# define fcloseall _fcloseall |
8256 |
+# endif |
8257 |
+_GL_CXXALIAS_MDA (fcloseall, int, (void)); |
8258 |
+# else |
8259 |
+# if 1 |
8260 |
+# if defined __FreeBSD__ || defined __DragonFly__ |
8261 |
+_GL_CXXALIAS_SYS (fcloseall, void, (void)); |
8262 |
+# else |
8263 |
+_GL_CXXALIAS_SYS (fcloseall, int, (void)); |
8264 |
+# endif |
8265 |
+# endif |
8266 |
+# endif |
8267 |
+# if (defined _WIN32 && !defined __CYGWIN__) || 1 |
8268 |
+_GL_CXXALIASWARN (fcloseall); |
8269 |
+# endif |
8270 |
+#endif |
8271 |
+ |
8272 |
+#if 0 |
8273 |
+# if 0 |
8274 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
8275 |
+# undef fdopen |
8276 |
+# define fdopen rpl_fdopen |
8277 |
+# endif |
8278 |
+_GL_FUNCDECL_RPL (fdopen, FILE *, |
8279 |
+ (int fd, const char *mode) |
8280 |
+ _GL_ARG_NONNULL ((2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1)); |
8281 |
+_GL_CXXALIAS_RPL (fdopen, FILE *, (int fd, const char *mode)); |
8282 |
+# elif defined _WIN32 && !defined __CYGWIN__ |
8283 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
8284 |
+# undef fdopen |
8285 |
+# define fdopen _fdopen |
8286 |
+# endif |
8287 |
+_GL_CXXALIAS_MDA (fdopen, FILE *, (int fd, const char *mode)); |
8288 |
+# else |
8289 |
+# if __GNUC__ >= 11 |
8290 |
+/* For -Wmismatched-dealloc: Associate fdopen with fclose or rpl_fclose. */ |
8291 |
+_GL_FUNCDECL_SYS (fdopen, FILE *, |
8292 |
+ (int fd, const char *mode) |
8293 |
+ _GL_ARG_NONNULL ((2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1)); |
8294 |
+# endif |
8295 |
+_GL_CXXALIAS_SYS (fdopen, FILE *, (int fd, const char *mode)); |
8296 |
+# endif |
8297 |
+_GL_CXXALIASWARN (fdopen); |
8298 |
+#else |
8299 |
+# if 0 && __GNUC__ >= 11 && !defined fdopen |
8300 |
+/* For -Wmismatched-dealloc: Associate fdopen with fclose or rpl_fclose. */ |
8301 |
+_GL_FUNCDECL_SYS (fdopen, FILE *, |
8302 |
+ (int fd, const char *mode) |
8303 |
+ _GL_ARG_NONNULL ((2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1)); |
8304 |
+# endif |
8305 |
+# if defined GNULIB_POSIXCHECK |
8306 |
+# undef fdopen |
8307 |
+/* Assume fdopen is always declared. */ |
8308 |
+_GL_WARN_ON_USE (fdopen, "fdopen on native Windows platforms is not POSIX compliant - " |
8309 |
+ "use gnulib module fdopen for portability"); |
8310 |
+# elif 1 |
8311 |
+/* On native Windows, map 'fdopen' to '_fdopen', so that -loldnames is not |
8312 |
+ required. In C++ with GNULIB_NAMESPACE, avoid differences between |
8313 |
+ platforms by defining GNULIB_NAMESPACE::fdopen always. */ |
8314 |
+# if defined _WIN32 && !defined __CYGWIN__ |
8315 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
8316 |
+# undef fdopen |
8317 |
+# define fdopen _fdopen |
8318 |
+# endif |
8319 |
+_GL_CXXALIAS_MDA (fdopen, FILE *, (int fd, const char *mode)); |
8320 |
+# else |
8321 |
+_GL_CXXALIAS_SYS (fdopen, FILE *, (int fd, const char *mode)); |
8322 |
+# endif |
8323 |
+_GL_CXXALIASWARN (fdopen); |
8324 |
+# endif |
8325 |
+#endif |
8326 |
+ |
8327 |
+#if 0 |
8328 |
+/* Flush all pending data on STREAM according to POSIX rules. Both |
8329 |
+ output and seekable input streams are supported. |
8330 |
+ Note! LOSS OF DATA can occur if fflush is applied on an input stream |
8331 |
+ that is _not_seekable_ or on an update stream that is _not_seekable_ |
8332 |
+ and in which the most recent operation was input. Seekability can |
8333 |
+ be tested with lseek(fileno(fp),0,SEEK_CUR). */ |
8334 |
+# if 0 |
8335 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
8336 |
+# define fflush rpl_fflush |
8337 |
+# endif |
8338 |
+_GL_FUNCDECL_RPL (fflush, int, (FILE *gl_stream)); |
8339 |
+_GL_CXXALIAS_RPL (fflush, int, (FILE *gl_stream)); |
8340 |
+# else |
8341 |
+_GL_CXXALIAS_SYS (fflush, int, (FILE *gl_stream)); |
8342 |
+# endif |
8343 |
+# if __GLIBC__ >= 2 |
8344 |
+_GL_CXXALIASWARN (fflush); |
8345 |
+# endif |
8346 |
+#elif defined GNULIB_POSIXCHECK |
8347 |
+# undef fflush |
8348 |
+/* Assume fflush is always declared. */ |
8349 |
+_GL_WARN_ON_USE (fflush, "fflush is not always POSIX compliant - " |
8350 |
+ "use gnulib module fflush for portable POSIX compliance"); |
8351 |
+#endif |
8352 |
+ |
8353 |
+#if 1 |
8354 |
+# if 0 && 0 |
8355 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
8356 |
+# undef fgetc |
8357 |
+# define fgetc rpl_fgetc |
8358 |
+# endif |
8359 |
+_GL_FUNCDECL_RPL (fgetc, int, (FILE *stream) _GL_ARG_NONNULL ((1))); |
8360 |
+_GL_CXXALIAS_RPL (fgetc, int, (FILE *stream)); |
8361 |
+# else |
8362 |
+_GL_CXXALIAS_SYS (fgetc, int, (FILE *stream)); |
8363 |
+# endif |
8364 |
+# if __GLIBC__ >= 2 |
8365 |
+_GL_CXXALIASWARN (fgetc); |
8366 |
+# endif |
8367 |
+#endif |
8368 |
+ |
8369 |
+#if 1 |
8370 |
+# if 0 && 0 |
8371 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
8372 |
+# undef fgets |
8373 |
+# define fgets rpl_fgets |
8374 |
+# endif |
8375 |
+_GL_FUNCDECL_RPL (fgets, char *, |
8376 |
+ (char *restrict s, int n, FILE *restrict stream) |
8377 |
+ _GL_ARG_NONNULL ((1, 3))); |
8378 |
+_GL_CXXALIAS_RPL (fgets, char *, |
8379 |
+ (char *restrict s, int n, FILE *restrict stream)); |
8380 |
+# else |
8381 |
+_GL_CXXALIAS_SYS (fgets, char *, |
8382 |
+ (char *restrict s, int n, FILE *restrict stream)); |
8383 |
+# endif |
8384 |
+# if __GLIBC__ >= 2 |
8385 |
+_GL_CXXALIASWARN (fgets); |
8386 |
+# endif |
8387 |
+#endif |
8388 |
+ |
8389 |
+#if 1 |
8390 |
+/* On native Windows, map 'fileno' to '_fileno', so that -loldnames is not |
8391 |
+ required. In C++ with GNULIB_NAMESPACE, avoid differences between |
8392 |
+ platforms by defining GNULIB_NAMESPACE::fileno always. */ |
8393 |
+# if defined _WIN32 && !defined __CYGWIN__ |
8394 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
8395 |
+# undef fileno |
8396 |
+# define fileno _fileno |
8397 |
+# endif |
8398 |
+_GL_CXXALIAS_MDA (fileno, int, (FILE *restrict stream)); |
8399 |
+# else |
8400 |
+_GL_CXXALIAS_SYS (fileno, int, (FILE *restrict stream)); |
8401 |
+# endif |
8402 |
+_GL_CXXALIASWARN (fileno); |
8403 |
+#endif |
8404 |
+ |
8405 |
+#if 0 |
8406 |
+# if (0 && 0) \ |
8407 |
+ || (0 && 0) |
8408 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
8409 |
+# undef fopen |
8410 |
+# define fopen rpl_fopen |
8411 |
+# endif |
8412 |
+_GL_FUNCDECL_RPL (fopen, FILE *, |
8413 |
+ (const char *restrict filename, const char *restrict mode) |
8414 |
+ _GL_ARG_NONNULL ((1, 2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1)); |
8415 |
+_GL_CXXALIAS_RPL (fopen, FILE *, |
8416 |
+ (const char *restrict filename, const char *restrict mode)); |
8417 |
+# else |
8418 |
+# if __GNUC__ >= 11 |
8419 |
+/* For -Wmismatched-dealloc: Associate fopen with fclose or rpl_fclose. */ |
8420 |
+_GL_FUNCDECL_SYS (fopen, FILE *, |
8421 |
+ (const char *restrict filename, const char *restrict mode) |
8422 |
+ _GL_ARG_NONNULL ((1, 2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1)); |
8423 |
+# endif |
8424 |
+_GL_CXXALIAS_SYS (fopen, FILE *, |
8425 |
+ (const char *restrict filename, const char *restrict mode)); |
8426 |
+# endif |
8427 |
+# if __GLIBC__ >= 2 |
8428 |
+_GL_CXXALIASWARN (fopen); |
8429 |
+# endif |
8430 |
+#else |
8431 |
+# if 0 && __GNUC__ >= 11 && !defined fopen |
8432 |
+/* For -Wmismatched-dealloc: Associate fopen with fclose or rpl_fclose. */ |
8433 |
+_GL_FUNCDECL_SYS (fopen, FILE *, |
8434 |
+ (const char *restrict filename, const char *restrict mode) |
8435 |
+ _GL_ARG_NONNULL ((1, 2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1)); |
8436 |
+# endif |
8437 |
+# if defined GNULIB_POSIXCHECK |
8438 |
+# undef fopen |
8439 |
+/* Assume fopen is always declared. */ |
8440 |
+_GL_WARN_ON_USE (fopen, "fopen on native Windows platforms is not POSIX compliant - " |
8441 |
+ "use gnulib module fopen for portability"); |
8442 |
+# endif |
8443 |
+#endif |
8444 |
+ |
8445 |
+#if 0 || 1 |
8446 |
+# if (0 && 0) \ |
8447 |
+ || (1 && 0 && (0 || 0)) |
8448 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
8449 |
+# define fprintf rpl_fprintf |
8450 |
+# endif |
8451 |
+# define GNULIB_overrides_fprintf 1 |
8452 |
+# if 0 || 0 |
8453 |
+_GL_FUNCDECL_RPL (fprintf, int, |
8454 |
+ (FILE *restrict fp, const char *restrict format, ...) |
8455 |
+ _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3) |
8456 |
+ _GL_ARG_NONNULL ((1, 2))); |
8457 |
+# else |
8458 |
+_GL_FUNCDECL_RPL (fprintf, int, |
8459 |
+ (FILE *restrict fp, const char *restrict format, ...) |
8460 |
+ _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (2, 3) |
8461 |
+ _GL_ARG_NONNULL ((1, 2))); |
8462 |
+# endif |
8463 |
+_GL_CXXALIAS_RPL (fprintf, int, |
8464 |
+ (FILE *restrict fp, const char *restrict format, ...)); |
8465 |
+# else |
8466 |
+_GL_CXXALIAS_SYS (fprintf, int, |
8467 |
+ (FILE *restrict fp, const char *restrict format, ...)); |
8468 |
+# endif |
8469 |
+# if __GLIBC__ >= 2 |
8470 |
+_GL_CXXALIASWARN (fprintf); |
8471 |
+# endif |
8472 |
+#endif |
8473 |
+#if !0 && defined GNULIB_POSIXCHECK |
8474 |
+# if !GNULIB_overrides_fprintf |
8475 |
+# undef fprintf |
8476 |
+# endif |
8477 |
+/* Assume fprintf is always declared. */ |
8478 |
+_GL_WARN_ON_USE (fprintf, "fprintf is not always POSIX compliant - " |
8479 |
+ "use gnulib module fprintf-posix for portable " |
8480 |
+ "POSIX compliance"); |
8481 |
+#endif |
8482 |
+ |
8483 |
+#if 0 |
8484 |
+/* Discard all pending buffered I/O data on STREAM. |
8485 |
+ STREAM must not be wide-character oriented. |
8486 |
+ When discarding pending output, the file position is set back to where it |
8487 |
+ was before the write calls. When discarding pending input, the file |
8488 |
+ position is advanced to match the end of the previously read input. |
8489 |
+ Return 0 if successful. Upon error, return -1 and set errno. */ |
8490 |
+# if 0 |
8491 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
8492 |
+# define fpurge rpl_fpurge |
8493 |
+# endif |
8494 |
+_GL_FUNCDECL_RPL (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1))); |
8495 |
+_GL_CXXALIAS_RPL (fpurge, int, (FILE *gl_stream)); |
8496 |
+# else |
8497 |
+# if !1 |
8498 |
+_GL_FUNCDECL_SYS (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1))); |
8499 |
+# endif |
8500 |
+_GL_CXXALIAS_SYS (fpurge, int, (FILE *gl_stream)); |
8501 |
+# endif |
8502 |
+_GL_CXXALIASWARN (fpurge); |
8503 |
+#elif defined GNULIB_POSIXCHECK |
8504 |
+# undef fpurge |
8505 |
+# if HAVE_RAW_DECL_FPURGE |
8506 |
+_GL_WARN_ON_USE (fpurge, "fpurge is not always present - " |
8507 |
+ "use gnulib module fpurge for portability"); |
8508 |
+# endif |
8509 |
+#endif |
8510 |
+ |
8511 |
+#if 1 |
8512 |
+# if 0 && (0 || 0) |
8513 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
8514 |
+# undef fputc |
8515 |
+# define fputc rpl_fputc |
8516 |
+# endif |
8517 |
+_GL_FUNCDECL_RPL (fputc, int, (int c, FILE *stream) _GL_ARG_NONNULL ((2))); |
8518 |
+_GL_CXXALIAS_RPL (fputc, int, (int c, FILE *stream)); |
8519 |
+# else |
8520 |
+_GL_CXXALIAS_SYS (fputc, int, (int c, FILE *stream)); |
8521 |
+# endif |
8522 |
+# if __GLIBC__ >= 2 |
8523 |
+_GL_CXXALIASWARN (fputc); |
8524 |
+# endif |
8525 |
+#endif |
8526 |
+ |
8527 |
+#if 1 |
8528 |
+# if 0 && (0 || 0) |
8529 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
8530 |
+# undef fputs |
8531 |
+# define fputs rpl_fputs |
8532 |
+# endif |
8533 |
+_GL_FUNCDECL_RPL (fputs, int, |
8534 |
+ (const char *restrict string, FILE *restrict stream) |
8535 |
+ _GL_ARG_NONNULL ((1, 2))); |
8536 |
+_GL_CXXALIAS_RPL (fputs, int, |
8537 |
+ (const char *restrict string, FILE *restrict stream)); |
8538 |
+# else |
8539 |
+_GL_CXXALIAS_SYS (fputs, int, |
8540 |
+ (const char *restrict string, FILE *restrict stream)); |
8541 |
+# endif |
8542 |
+# if __GLIBC__ >= 2 |
8543 |
+_GL_CXXALIASWARN (fputs); |
8544 |
+# endif |
8545 |
+#endif |
8546 |
+ |
8547 |
+#if 1 |
8548 |
+# if 0 && 0 |
8549 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
8550 |
+# undef fread |
8551 |
+# define fread rpl_fread |
8552 |
+# endif |
8553 |
+_GL_FUNCDECL_RPL (fread, size_t, |
8554 |
+ (void *restrict ptr, size_t s, size_t n, |
8555 |
+ FILE *restrict stream) |
8556 |
+ _GL_ARG_NONNULL ((4))); |
8557 |
+_GL_CXXALIAS_RPL (fread, size_t, |
8558 |
+ (void *restrict ptr, size_t s, size_t n, |
8559 |
+ FILE *restrict stream)); |
8560 |
+# else |
8561 |
+_GL_CXXALIAS_SYS (fread, size_t, |
8562 |
+ (void *restrict ptr, size_t s, size_t n, |
8563 |
+ FILE *restrict stream)); |
8564 |
+# endif |
8565 |
+# if __GLIBC__ >= 2 |
8566 |
+_GL_CXXALIASWARN (fread); |
8567 |
+# endif |
8568 |
+#endif |
8569 |
+ |
8570 |
+#if 0 |
8571 |
+# if 0 |
8572 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
8573 |
+# undef freopen |
8574 |
+# define freopen rpl_freopen |
8575 |
+# endif |
8576 |
+_GL_FUNCDECL_RPL (freopen, FILE *, |
8577 |
+ (const char *restrict filename, const char *restrict mode, |
8578 |
+ FILE *restrict stream) |
8579 |
+ _GL_ARG_NONNULL ((2, 3))); |
8580 |
+_GL_CXXALIAS_RPL (freopen, FILE *, |
8581 |
+ (const char *restrict filename, const char *restrict mode, |
8582 |
+ FILE *restrict stream)); |
8583 |
+# else |
8584 |
+_GL_CXXALIAS_SYS (freopen, FILE *, |
8585 |
+ (const char *restrict filename, const char *restrict mode, |
8586 |
+ FILE *restrict stream)); |
8587 |
+# endif |
8588 |
+# if __GLIBC__ >= 2 |
8589 |
+_GL_CXXALIASWARN (freopen); |
8590 |
+# endif |
8591 |
+#elif defined GNULIB_POSIXCHECK |
8592 |
+# undef freopen |
8593 |
+/* Assume freopen is always declared. */ |
8594 |
+_GL_WARN_ON_USE (freopen, |
8595 |
+ "freopen on native Windows platforms is not POSIX compliant - " |
8596 |
+ "use gnulib module freopen for portability"); |
8597 |
+#endif |
8598 |
+ |
8599 |
+#if 1 |
8600 |
+# if 0 && 0 |
8601 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
8602 |
+# undef fscanf |
8603 |
+# define fscanf rpl_fscanf |
8604 |
+# endif |
8605 |
+_GL_FUNCDECL_RPL (fscanf, int, |
8606 |
+ (FILE *restrict stream, const char *restrict format, ...) |
8607 |
+ _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (2, 3) |
8608 |
+ _GL_ARG_NONNULL ((1, 2))); |
8609 |
+_GL_CXXALIAS_RPL (fscanf, int, |
8610 |
+ (FILE *restrict stream, const char *restrict format, ...)); |
8611 |
+# else |
8612 |
+_GL_CXXALIAS_SYS (fscanf, int, |
8613 |
+ (FILE *restrict stream, const char *restrict format, ...)); |
8614 |
+# endif |
8615 |
+# if __GLIBC__ >= 2 |
8616 |
+_GL_CXXALIASWARN (fscanf); |
8617 |
+# endif |
8618 |
+#endif |
8619 |
+ |
8620 |
+ |
8621 |
+/* Set up the following warnings, based on which modules are in use. |
8622 |
+ GNU Coding Standards discourage the use of fseek, since it imposes |
8623 |
+ an arbitrary limitation on some 32-bit hosts. Remember that the |
8624 |
+ fseek module depends on the fseeko module, so we only have three |
8625 |
+ cases to consider: |
8626 |
+ |
8627 |
+ 1. The developer is not using either module. Issue a warning under |
8628 |
+ GNULIB_POSIXCHECK for both functions, to remind them that both |
8629 |
+ functions have bugs on some systems. _GL_NO_LARGE_FILES has no |
8630 |
+ impact on this warning. |
8631 |
+ |
8632 |
+ 2. The developer is using both modules. They may be unaware of the |
8633 |
+ arbitrary limitations of fseek, so issue a warning under |
8634 |
+ GNULIB_POSIXCHECK. On the other hand, they may be using both |
8635 |
+ modules intentionally, so the developer can define |
8636 |
+ _GL_NO_LARGE_FILES in the compilation units where the use of fseek |
8637 |
+ is safe, to silence the warning. |
8638 |
+ |
8639 |
+ 3. The developer is using the fseeko module, but not fseek. Gnulib |
8640 |
+ guarantees that fseek will still work around platform bugs in that |
8641 |
+ case, but we presume that the developer is aware of the pitfalls of |
8642 |
+ fseek and was trying to avoid it, so issue a warning even when |
8643 |
+ GNULIB_POSIXCHECK is undefined. Again, _GL_NO_LARGE_FILES can be |
8644 |
+ defined to silence the warning in particular compilation units. |
8645 |
+ In C++ compilations with GNULIB_NAMESPACE, in order to avoid that |
8646 |
+ fseek gets defined as a macro, it is recommended that the developer |
8647 |
+ uses the fseek module, even if he is not calling the fseek function. |
8648 |
+ |
8649 |
+ Most gnulib clients that perform stream operations should fall into |
8650 |
+ category 3. */ |
8651 |
+ |
8652 |
+#if 0 |
8653 |
+# if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES |
8654 |
+# define _GL_FSEEK_WARN /* Category 2, above. */ |
8655 |
+# undef fseek |
8656 |
+# endif |
8657 |
+# if 0 |
8658 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
8659 |
+# undef fseek |
8660 |
+# define fseek rpl_fseek |
8661 |
+# endif |
8662 |
+_GL_FUNCDECL_RPL (fseek, int, (FILE *fp, long offset, int whence) |
8663 |
+ _GL_ARG_NONNULL ((1))); |
8664 |
+_GL_CXXALIAS_RPL (fseek, int, (FILE *fp, long offset, int whence)); |
8665 |
+# else |
8666 |
+_GL_CXXALIAS_SYS (fseek, int, (FILE *fp, long offset, int whence)); |
8667 |
+# endif |
8668 |
+# if __GLIBC__ >= 2 |
8669 |
+_GL_CXXALIASWARN (fseek); |
8670 |
+# endif |
8671 |
+#endif |
8672 |
+ |
8673 |
+#if 0 |
8674 |
+# if !0 && !defined _GL_NO_LARGE_FILES |
8675 |
+# define _GL_FSEEK_WARN /* Category 3, above. */ |
8676 |
+# undef fseek |
8677 |
+# endif |
8678 |
+# if 0 |
8679 |
+/* Provide an fseeko function that is aware of a preceding fflush(), and which |
8680 |
+ detects pipes. */ |
8681 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
8682 |
+# undef fseeko |
8683 |
+# define fseeko rpl_fseeko |
8684 |
+# endif |
8685 |
+_GL_FUNCDECL_RPL (fseeko, int, (FILE *fp, off_t offset, int whence) |
8686 |
+ _GL_ARG_NONNULL ((1))); |
8687 |
+_GL_CXXALIAS_RPL (fseeko, int, (FILE *fp, off_t offset, int whence)); |
8688 |
+# else |
8689 |
+# if ! 1 |
8690 |
+_GL_FUNCDECL_SYS (fseeko, int, (FILE *fp, off_t offset, int whence) |
8691 |
+ _GL_ARG_NONNULL ((1))); |
8692 |
+# endif |
8693 |
+_GL_CXXALIAS_SYS (fseeko, int, (FILE *fp, off_t offset, int whence)); |
8694 |
+# endif |
8695 |
+_GL_CXXALIASWARN (fseeko); |
8696 |
+#elif defined GNULIB_POSIXCHECK |
8697 |
+# define _GL_FSEEK_WARN /* Category 1, above. */ |
8698 |
+# undef fseek |
8699 |
+# undef fseeko |
8700 |
+# if HAVE_RAW_DECL_FSEEKO |
8701 |
+_GL_WARN_ON_USE (fseeko, "fseeko is unportable - " |
8702 |
+ "use gnulib module fseeko for portability"); |
8703 |
+# endif |
8704 |
+#endif |
8705 |
+ |
8706 |
+#ifdef _GL_FSEEK_WARN |
8707 |
+# undef _GL_FSEEK_WARN |
8708 |
+/* Here, either fseek is undefined (but C89 guarantees that it is |
8709 |
+ declared), or it is defined as rpl_fseek (declared above). */ |
8710 |
+_GL_WARN_ON_USE (fseek, "fseek cannot handle files larger than 4 GB " |
8711 |
+ "on 32-bit platforms - " |
8712 |
+ "use fseeko function for handling of large files"); |
8713 |
+#endif |
8714 |
+ |
8715 |
+ |
8716 |
+/* ftell, ftello. See the comments on fseek/fseeko. */ |
8717 |
+ |
8718 |
+#if 0 |
8719 |
+# if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES |
8720 |
+# define _GL_FTELL_WARN /* Category 2, above. */ |
8721 |
+# undef ftell |
8722 |
+# endif |
8723 |
+# if 0 |
8724 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
8725 |
+# undef ftell |
8726 |
+# define ftell rpl_ftell |
8727 |
+# endif |
8728 |
+_GL_FUNCDECL_RPL (ftell, long, (FILE *fp) _GL_ARG_NONNULL ((1))); |
8729 |
+_GL_CXXALIAS_RPL (ftell, long, (FILE *fp)); |
8730 |
+# else |
8731 |
+_GL_CXXALIAS_SYS (ftell, long, (FILE *fp)); |
8732 |
+# endif |
8733 |
+# if __GLIBC__ >= 2 |
8734 |
+_GL_CXXALIASWARN (ftell); |
8735 |
+# endif |
8736 |
+#endif |
8737 |
+ |
8738 |
+#if 0 |
8739 |
+# if !0 && !defined _GL_NO_LARGE_FILES |
8740 |
+# define _GL_FTELL_WARN /* Category 3, above. */ |
8741 |
+# undef ftell |
8742 |
+# endif |
8743 |
+# if 0 |
8744 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
8745 |
+# undef ftello |
8746 |
+# define ftello rpl_ftello |
8747 |
+# endif |
8748 |
+_GL_FUNCDECL_RPL (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1))); |
8749 |
+_GL_CXXALIAS_RPL (ftello, off_t, (FILE *fp)); |
8750 |
+# else |
8751 |
+# if ! 1 |
8752 |
+_GL_FUNCDECL_SYS (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1))); |
8753 |
+# endif |
8754 |
+_GL_CXXALIAS_SYS (ftello, off_t, (FILE *fp)); |
8755 |
+# endif |
8756 |
+_GL_CXXALIASWARN (ftello); |
8757 |
+#elif defined GNULIB_POSIXCHECK |
8758 |
+# define _GL_FTELL_WARN /* Category 1, above. */ |
8759 |
+# undef ftell |
8760 |
+# undef ftello |
8761 |
+# if HAVE_RAW_DECL_FTELLO |
8762 |
+_GL_WARN_ON_USE (ftello, "ftello is unportable - " |
8763 |
+ "use gnulib module ftello for portability"); |
8764 |
+# endif |
8765 |
+#endif |
8766 |
+ |
8767 |
+#ifdef _GL_FTELL_WARN |
8768 |
+# undef _GL_FTELL_WARN |
8769 |
+/* Here, either ftell is undefined (but C89 guarantees that it is |
8770 |
+ declared), or it is defined as rpl_ftell (declared above). */ |
8771 |
+_GL_WARN_ON_USE (ftell, "ftell cannot handle files larger than 4 GB " |
8772 |
+ "on 32-bit platforms - " |
8773 |
+ "use ftello function for handling of large files"); |
8774 |
+#endif |
8775 |
+ |
8776 |
+ |
8777 |
+#if 1 |
8778 |
+# if 0 && (0 || 0) |
8779 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
8780 |
+# undef fwrite |
8781 |
+# define fwrite rpl_fwrite |
8782 |
+# endif |
8783 |
+_GL_FUNCDECL_RPL (fwrite, size_t, |
8784 |
+ (const void *restrict ptr, size_t s, size_t n, |
8785 |
+ FILE *restrict stream) |
8786 |
+ _GL_ARG_NONNULL ((1, 4))); |
8787 |
+_GL_CXXALIAS_RPL (fwrite, size_t, |
8788 |
+ (const void *restrict ptr, size_t s, size_t n, |
8789 |
+ FILE *restrict stream)); |
8790 |
+# else |
8791 |
+_GL_CXXALIAS_SYS (fwrite, size_t, |
8792 |
+ (const void *restrict ptr, size_t s, size_t n, |
8793 |
+ FILE *restrict stream)); |
8794 |
+ |
8795 |
+/* Work around bug 11959 when fortifying glibc 2.4 through 2.15 |
8796 |
+ <https://sourceware.org/bugzilla/show_bug.cgi?id=11959>, |
8797 |
+ which sometimes causes an unwanted diagnostic for fwrite calls. |
8798 |
+ This affects only function declaration attributes under certain |
8799 |
+ versions of gcc and clang, and is not needed for C++. */ |
8800 |
+# if (0 < __USE_FORTIFY_LEVEL \ |
8801 |
+ && __GLIBC__ == 2 && 4 <= __GLIBC_MINOR__ && __GLIBC_MINOR__ <= 15 \ |
8802 |
+ && 3 < __GNUC__ + (4 <= __GNUC_MINOR__) \ |
8803 |
+ && !defined __cplusplus) |
8804 |
+# undef fwrite |
8805 |
+# undef fwrite_unlocked |
8806 |
+extern size_t __REDIRECT (rpl_fwrite, |
8807 |
+ (const void *__restrict, size_t, size_t, |
8808 |
+ FILE *__restrict), |
8809 |
+ fwrite); |
8810 |
+extern size_t __REDIRECT (rpl_fwrite_unlocked, |
8811 |
+ (const void *__restrict, size_t, size_t, |
8812 |
+ FILE *__restrict), |
8813 |
+ fwrite_unlocked); |
8814 |
+# define fwrite rpl_fwrite |
8815 |
+# define fwrite_unlocked rpl_fwrite_unlocked |
8816 |
+# endif |
8817 |
+# endif |
8818 |
+# if __GLIBC__ >= 2 |
8819 |
+_GL_CXXALIASWARN (fwrite); |
8820 |
+# endif |
8821 |
+#endif |
8822 |
+ |
8823 |
+#if 1 |
8824 |
+# if 0 && 0 |
8825 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
8826 |
+# undef getc |
8827 |
+# define getc rpl_fgetc |
8828 |
+# endif |
8829 |
+_GL_FUNCDECL_RPL (fgetc, int, (FILE *stream) _GL_ARG_NONNULL ((1))); |
8830 |
+_GL_CXXALIAS_RPL_1 (getc, rpl_fgetc, int, (FILE *stream)); |
8831 |
+# else |
8832 |
+_GL_CXXALIAS_SYS (getc, int, (FILE *stream)); |
8833 |
+# endif |
8834 |
+# if __GLIBC__ >= 2 |
8835 |
+_GL_CXXALIASWARN (getc); |
8836 |
+# endif |
8837 |
+#endif |
8838 |
+ |
8839 |
+#if 1 |
8840 |
+# if 0 && 0 |
8841 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
8842 |
+# undef getchar |
8843 |
+# define getchar rpl_getchar |
8844 |
+# endif |
8845 |
+_GL_FUNCDECL_RPL (getchar, int, (void)); |
8846 |
+_GL_CXXALIAS_RPL (getchar, int, (void)); |
8847 |
+# else |
8848 |
+_GL_CXXALIAS_SYS (getchar, int, (void)); |
8849 |
+# endif |
8850 |
+# if __GLIBC__ >= 2 |
8851 |
+_GL_CXXALIASWARN (getchar); |
8852 |
+# endif |
8853 |
+#endif |
8854 |
+ |
8855 |
+#if 1 |
8856 |
+/* Read input, up to (and including) the next occurrence of DELIMITER, from |
8857 |
+ STREAM, store it in *LINEPTR (and NUL-terminate it). |
8858 |
+ *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE |
8859 |
+ bytes of space. It is realloc'd as necessary. |
8860 |
+ Return the number of bytes read and stored at *LINEPTR (not including the |
8861 |
+ NUL terminator), or -1 on error or EOF. */ |
8862 |
+# if 0 |
8863 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
8864 |
+# undef getdelim |
8865 |
+# define getdelim rpl_getdelim |
8866 |
+# endif |
8867 |
+_GL_FUNCDECL_RPL (getdelim, ssize_t, |
8868 |
+ (char **restrict lineptr, size_t *restrict linesize, |
8869 |
+ int delimiter, |
8870 |
+ FILE *restrict stream) |
8871 |
+ _GL_ARG_NONNULL ((1, 2, 4))); |
8872 |
+_GL_CXXALIAS_RPL (getdelim, ssize_t, |
8873 |
+ (char **restrict lineptr, size_t *restrict linesize, |
8874 |
+ int delimiter, |
8875 |
+ FILE *restrict stream)); |
8876 |
+# else |
8877 |
+# if !1 |
8878 |
+_GL_FUNCDECL_SYS (getdelim, ssize_t, |
8879 |
+ (char **restrict lineptr, size_t *restrict linesize, |
8880 |
+ int delimiter, |
8881 |
+ FILE *restrict stream) |
8882 |
+ _GL_ARG_NONNULL ((1, 2, 4))); |
8883 |
+# endif |
8884 |
+_GL_CXXALIAS_SYS (getdelim, ssize_t, |
8885 |
+ (char **restrict lineptr, size_t *restrict linesize, |
8886 |
+ int delimiter, |
8887 |
+ FILE *restrict stream)); |
8888 |
+# endif |
8889 |
+_GL_CXXALIASWARN (getdelim); |
8890 |
+#elif defined GNULIB_POSIXCHECK |
8891 |
+# undef getdelim |
8892 |
+# if HAVE_RAW_DECL_GETDELIM |
8893 |
+_GL_WARN_ON_USE (getdelim, "getdelim is unportable - " |
8894 |
+ "use gnulib module getdelim for portability"); |
8895 |
+# endif |
8896 |
+#endif |
8897 |
+ |
8898 |
+#if 1 |
8899 |
+/* Read a line, up to (and including) the next newline, from STREAM, store it |
8900 |
+ in *LINEPTR (and NUL-terminate it). |
8901 |
+ *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE |
8902 |
+ bytes of space. It is realloc'd as necessary. |
8903 |
+ Return the number of bytes read and stored at *LINEPTR (not including the |
8904 |
+ NUL terminator), or -1 on error or EOF. */ |
8905 |
+# if 0 |
8906 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
8907 |
+# undef getline |
8908 |
+# define getline rpl_getline |
8909 |
+# endif |
8910 |
+_GL_FUNCDECL_RPL (getline, ssize_t, |
8911 |
+ (char **restrict lineptr, size_t *restrict linesize, |
8912 |
+ FILE *restrict stream) |
8913 |
+ _GL_ARG_NONNULL ((1, 2, 3))); |
8914 |
+_GL_CXXALIAS_RPL (getline, ssize_t, |
8915 |
+ (char **restrict lineptr, size_t *restrict linesize, |
8916 |
+ FILE *restrict stream)); |
8917 |
+# else |
8918 |
+# if !1 |
8919 |
+_GL_FUNCDECL_SYS (getline, ssize_t, |
8920 |
+ (char **restrict lineptr, size_t *restrict linesize, |
8921 |
+ FILE *restrict stream) |
8922 |
+ _GL_ARG_NONNULL ((1, 2, 3))); |
8923 |
+# endif |
8924 |
+_GL_CXXALIAS_SYS (getline, ssize_t, |
8925 |
+ (char **restrict lineptr, size_t *restrict linesize, |
8926 |
+ FILE *restrict stream)); |
8927 |
+# endif |
8928 |
+# if 1 |
8929 |
+_GL_CXXALIASWARN (getline); |
8930 |
+# endif |
8931 |
+#elif defined GNULIB_POSIXCHECK |
8932 |
+# undef getline |
8933 |
+# if HAVE_RAW_DECL_GETLINE |
8934 |
+_GL_WARN_ON_USE (getline, "getline is unportable - " |
8935 |
+ "use gnulib module getline for portability"); |
8936 |
+# endif |
8937 |
+#endif |
8938 |
+ |
8939 |
+/* It is very rare that the developer ever has full control of stdin, |
8940 |
+ so any use of gets warrants an unconditional warning; besides, C11 |
8941 |
+ removed it. */ |
8942 |
+#undef gets |
8943 |
+#if HAVE_RAW_DECL_GETS && !defined __cplusplus |
8944 |
+_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); |
8945 |
+#endif |
8946 |
+ |
8947 |
+#if 1 |
8948 |
+/* On native Windows, map 'getw' to '_getw', so that -loldnames is not |
8949 |
+ required. In C++ with GNULIB_NAMESPACE, avoid differences between |
8950 |
+ platforms by defining GNULIB_NAMESPACE::getw always. */ |
8951 |
+# if defined _WIN32 && !defined __CYGWIN__ |
8952 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
8953 |
+# undef getw |
8954 |
+# define getw _getw |
8955 |
+# endif |
8956 |
+_GL_CXXALIAS_MDA (getw, int, (FILE *restrict stream)); |
8957 |
+# else |
8958 |
+_GL_CXXALIAS_SYS (getw, int, (FILE *restrict stream)); |
8959 |
+# endif |
8960 |
+_GL_CXXALIASWARN (getw); |
8961 |
+#endif |
8962 |
+ |
8963 |
+#if 0 || 0 |
8964 |
+struct obstack; |
8965 |
+/* Grow an obstack with formatted output. Return the number of |
8966 |
+ bytes added to OBS. No trailing nul byte is added, and the |
8967 |
+ object should be closed with obstack_finish before use. Upon |
8968 |
+ memory allocation error, call obstack_alloc_failed_handler. Upon |
8969 |
+ other error, return -1. */ |
8970 |
+# if 0 |
8971 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
8972 |
+# define obstack_printf rpl_obstack_printf |
8973 |
+# endif |
8974 |
+_GL_FUNCDECL_RPL (obstack_printf, int, |
8975 |
+ (struct obstack *obs, const char *format, ...) |
8976 |
+ _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3) |
8977 |
+ _GL_ARG_NONNULL ((1, 2))); |
8978 |
+_GL_CXXALIAS_RPL (obstack_printf, int, |
8979 |
+ (struct obstack *obs, const char *format, ...)); |
8980 |
+# else |
8981 |
+# if !1 |
8982 |
+_GL_FUNCDECL_SYS (obstack_printf, int, |
8983 |
+ (struct obstack *obs, const char *format, ...) |
8984 |
+ _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3) |
8985 |
+ _GL_ARG_NONNULL ((1, 2))); |
8986 |
+# endif |
8987 |
+_GL_CXXALIAS_SYS (obstack_printf, int, |
8988 |
+ (struct obstack *obs, const char *format, ...)); |
8989 |
+# endif |
8990 |
+_GL_CXXALIASWARN (obstack_printf); |
8991 |
+# if 0 |
8992 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
8993 |
+# define obstack_vprintf rpl_obstack_vprintf |
8994 |
+# endif |
8995 |
+_GL_FUNCDECL_RPL (obstack_vprintf, int, |
8996 |
+ (struct obstack *obs, const char *format, va_list args) |
8997 |
+ _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0) |
8998 |
+ _GL_ARG_NONNULL ((1, 2))); |
8999 |
+_GL_CXXALIAS_RPL (obstack_vprintf, int, |
9000 |
+ (struct obstack *obs, const char *format, va_list args)); |
9001 |
+# else |
9002 |
+# if !1 |
9003 |
+_GL_FUNCDECL_SYS (obstack_vprintf, int, |
9004 |
+ (struct obstack *obs, const char *format, va_list args) |
9005 |
+ _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0) |
9006 |
+ _GL_ARG_NONNULL ((1, 2))); |
9007 |
+# endif |
9008 |
+_GL_CXXALIAS_SYS (obstack_vprintf, int, |
9009 |
+ (struct obstack *obs, const char *format, va_list args)); |
9010 |
+# endif |
9011 |
+_GL_CXXALIASWARN (obstack_vprintf); |
9012 |
+#endif |
9013 |
+ |
9014 |
+#if 0 |
9015 |
+# if !1 |
9016 |
+_GL_FUNCDECL_SYS (pclose, int, (FILE *stream) _GL_ARG_NONNULL ((1))); |
9017 |
+# endif |
9018 |
+_GL_CXXALIAS_SYS (pclose, int, (FILE *stream)); |
9019 |
+_GL_CXXALIASWARN (pclose); |
9020 |
+#elif defined GNULIB_POSIXCHECK |
9021 |
+# undef pclose |
9022 |
+# if HAVE_RAW_DECL_PCLOSE |
9023 |
+_GL_WARN_ON_USE (pclose, "pclose is unportable - " |
9024 |
+ "use gnulib module pclose for more portability"); |
9025 |
+# endif |
9026 |
+#endif |
9027 |
+ |
9028 |
+#if 0 |
9029 |
+/* Print a message to standard error, describing the value of ERRNO, |
9030 |
+ (if STRING is not NULL and not empty) prefixed with STRING and ": ", |
9031 |
+ and terminated with a newline. */ |
9032 |
+# if 0 |
9033 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
9034 |
+# define perror rpl_perror |
9035 |
+# endif |
9036 |
+_GL_FUNCDECL_RPL (perror, void, (const char *string)); |
9037 |
+_GL_CXXALIAS_RPL (perror, void, (const char *string)); |
9038 |
+# else |
9039 |
+_GL_CXXALIAS_SYS (perror, void, (const char *string)); |
9040 |
+# endif |
9041 |
+# if __GLIBC__ >= 2 |
9042 |
+_GL_CXXALIASWARN (perror); |
9043 |
+# endif |
9044 |
+#elif defined GNULIB_POSIXCHECK |
9045 |
+# undef perror |
9046 |
+/* Assume perror is always declared. */ |
9047 |
+_GL_WARN_ON_USE (perror, "perror is not always POSIX compliant - " |
9048 |
+ "use gnulib module perror for portability"); |
9049 |
+#endif |
9050 |
+ |
9051 |
+#if 0 |
9052 |
+# if 0 |
9053 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
9054 |
+# undef popen |
9055 |
+# define popen rpl_popen |
9056 |
+# endif |
9057 |
+_GL_FUNCDECL_RPL (popen, FILE *, |
9058 |
+ (const char *cmd, const char *mode) |
9059 |
+ _GL_ARG_NONNULL ((1, 2)) _GL_ATTRIBUTE_DEALLOC (pclose, 1)); |
9060 |
+_GL_CXXALIAS_RPL (popen, FILE *, (const char *cmd, const char *mode)); |
9061 |
+# else |
9062 |
+# if !1 || __GNUC__ >= 11 |
9063 |
+_GL_FUNCDECL_SYS (popen, FILE *, |
9064 |
+ (const char *cmd, const char *mode) |
9065 |
+ _GL_ARG_NONNULL ((1, 2)) _GL_ATTRIBUTE_DEALLOC (pclose, 1)); |
9066 |
+# endif |
9067 |
+_GL_CXXALIAS_SYS (popen, FILE *, (const char *cmd, const char *mode)); |
9068 |
+# endif |
9069 |
+_GL_CXXALIASWARN (popen); |
9070 |
+#else |
9071 |
+# if 0 && __GNUC__ >= 11 && !defined popen |
9072 |
+/* For -Wmismatched-dealloc: Associate popen with pclose or rpl_pclose. */ |
9073 |
+_GL_FUNCDECL_SYS (popen, FILE *, |
9074 |
+ (const char *cmd, const char *mode) |
9075 |
+ _GL_ARG_NONNULL ((1, 2)) _GL_ATTRIBUTE_DEALLOC (pclose, 1)); |
9076 |
+# endif |
9077 |
+# if defined GNULIB_POSIXCHECK |
9078 |
+# undef popen |
9079 |
+# if HAVE_RAW_DECL_POPEN |
9080 |
+_GL_WARN_ON_USE (popen, "popen is buggy on some platforms - " |
9081 |
+ "use gnulib module popen or pipe for more portability"); |
9082 |
+# endif |
9083 |
+# endif |
9084 |
+#endif |
9085 |
+ |
9086 |
+#if 0 || 1 |
9087 |
+# if (0 && 0) \ |
9088 |
+ || (1 && 0 && (0 || 0)) |
9089 |
+# if defined __GNUC__ || defined __clang__ |
9090 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
9091 |
+/* Don't break __attribute__((format(printf,M,N))). */ |
9092 |
+# define printf __printf__ |
9093 |
+# endif |
9094 |
+# if 0 || 0 |
9095 |
+_GL_FUNCDECL_RPL_1 (__printf__, int, |
9096 |
+ (const char *restrict format, ...) |
9097 |
+ __asm__ ( |
9098 |
+ _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf)) |
9099 |
+ _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (1, 2) |
9100 |
+ _GL_ARG_NONNULL ((1))); |
9101 |
+# else |
9102 |
+_GL_FUNCDECL_RPL_1 (__printf__, int, |
9103 |
+ (const char *restrict format, ...) |
9104 |
+ __asm__ ( |
9105 |
+ _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf)) |
9106 |
+ _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (1, 2) |
9107 |
+ _GL_ARG_NONNULL ((1))); |
9108 |
+# endif |
9109 |
+_GL_CXXALIAS_RPL_1 (printf, __printf__, int, (const char *format, ...)); |
9110 |
+# else |
9111 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
9112 |
+# define printf rpl_printf |
9113 |
+# endif |
9114 |
+_GL_FUNCDECL_RPL (printf, int, |
9115 |
+ (const char *restrict format, ...) |
9116 |
+ _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (1, 2) |
9117 |
+ _GL_ARG_NONNULL ((1))); |
9118 |
+_GL_CXXALIAS_RPL (printf, int, (const char *restrict format, ...)); |
9119 |
+# endif |
9120 |
+# define GNULIB_overrides_printf 1 |
9121 |
+# else |
9122 |
+_GL_CXXALIAS_SYS (printf, int, (const char *restrict format, ...)); |
9123 |
+# endif |
9124 |
+# if __GLIBC__ >= 2 |
9125 |
+_GL_CXXALIASWARN (printf); |
9126 |
+# endif |
9127 |
+#endif |
9128 |
+#if !0 && defined GNULIB_POSIXCHECK |
9129 |
+# if !GNULIB_overrides_printf |
9130 |
+# undef printf |
9131 |
+# endif |
9132 |
+/* Assume printf is always declared. */ |
9133 |
+_GL_WARN_ON_USE (printf, "printf is not always POSIX compliant - " |
9134 |
+ "use gnulib module printf-posix for portable " |
9135 |
+ "POSIX compliance"); |
9136 |
+#endif |
9137 |
+ |
9138 |
+#if 1 |
9139 |
+# if 0 && (0 || 0) |
9140 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
9141 |
+# undef putc |
9142 |
+# define putc rpl_fputc |
9143 |
+# endif |
9144 |
+_GL_FUNCDECL_RPL (fputc, int, (int c, FILE *stream) _GL_ARG_NONNULL ((2))); |
9145 |
+_GL_CXXALIAS_RPL_1 (putc, rpl_fputc, int, (int c, FILE *stream)); |
9146 |
+# else |
9147 |
+_GL_CXXALIAS_SYS (putc, int, (int c, FILE *stream)); |
9148 |
+# endif |
9149 |
+# if __GLIBC__ >= 2 |
9150 |
+_GL_CXXALIASWARN (putc); |
9151 |
+# endif |
9152 |
+#endif |
9153 |
+ |
9154 |
+#if 1 |
9155 |
+# if 0 && (0 || 0) |
9156 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
9157 |
+# undef putchar |
9158 |
+# define putchar rpl_putchar |
9159 |
+# endif |
9160 |
+_GL_FUNCDECL_RPL (putchar, int, (int c)); |
9161 |
+_GL_CXXALIAS_RPL (putchar, int, (int c)); |
9162 |
+# else |
9163 |
+_GL_CXXALIAS_SYS (putchar, int, (int c)); |
9164 |
+# endif |
9165 |
+# if __GLIBC__ >= 2 |
9166 |
+_GL_CXXALIASWARN (putchar); |
9167 |
+# endif |
9168 |
+#endif |
9169 |
+ |
9170 |
+#if 1 |
9171 |
+# if 0 && (0 || 0) |
9172 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
9173 |
+# undef puts |
9174 |
+# define puts rpl_puts |
9175 |
+# endif |
9176 |
+_GL_FUNCDECL_RPL (puts, int, (const char *string) _GL_ARG_NONNULL ((1))); |
9177 |
+_GL_CXXALIAS_RPL (puts, int, (const char *string)); |
9178 |
+# else |
9179 |
+_GL_CXXALIAS_SYS (puts, int, (const char *string)); |
9180 |
+# endif |
9181 |
+# if __GLIBC__ >= 2 |
9182 |
+_GL_CXXALIASWARN (puts); |
9183 |
+# endif |
9184 |
+#endif |
9185 |
+ |
9186 |
+#if 1 |
9187 |
+/* On native Windows, map 'putw' to '_putw', so that -loldnames is not |
9188 |
+ required. In C++ with GNULIB_NAMESPACE, avoid differences between |
9189 |
+ platforms by defining GNULIB_NAMESPACE::putw always. */ |
9190 |
+# if defined _WIN32 && !defined __CYGWIN__ |
9191 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
9192 |
+# undef putw |
9193 |
+# define putw _putw |
9194 |
+# endif |
9195 |
+_GL_CXXALIAS_MDA (putw, int, (int w, FILE *restrict stream)); |
9196 |
+# else |
9197 |
+_GL_CXXALIAS_SYS (putw, int, (int w, FILE *restrict stream)); |
9198 |
+# endif |
9199 |
+_GL_CXXALIASWARN (putw); |
9200 |
+#endif |
9201 |
+ |
9202 |
+#if 0 |
9203 |
+# if 0 |
9204 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
9205 |
+# undef remove |
9206 |
+# define remove rpl_remove |
9207 |
+# endif |
9208 |
+_GL_FUNCDECL_RPL (remove, int, (const char *name) _GL_ARG_NONNULL ((1))); |
9209 |
+_GL_CXXALIAS_RPL (remove, int, (const char *name)); |
9210 |
+# else |
9211 |
+_GL_CXXALIAS_SYS (remove, int, (const char *name)); |
9212 |
+# endif |
9213 |
+# if __GLIBC__ >= 2 |
9214 |
+_GL_CXXALIASWARN (remove); |
9215 |
+# endif |
9216 |
+#elif defined GNULIB_POSIXCHECK |
9217 |
+# undef remove |
9218 |
+/* Assume remove is always declared. */ |
9219 |
+_GL_WARN_ON_USE (remove, "remove cannot handle directories on some platforms - " |
9220 |
+ "use gnulib module remove for more portability"); |
9221 |
+#endif |
9222 |
+ |
9223 |
+#if 1 |
9224 |
+# if 1 |
9225 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
9226 |
+# undef rename |
9227 |
+# define rename rpl_rename |
9228 |
+# endif |
9229 |
+_GL_FUNCDECL_RPL (rename, int, |
9230 |
+ (const char *old_filename, const char *new_filename) |
9231 |
+ _GL_ARG_NONNULL ((1, 2))); |
9232 |
+_GL_CXXALIAS_RPL (rename, int, |
9233 |
+ (const char *old_filename, const char *new_filename)); |
9234 |
+# else |
9235 |
+_GL_CXXALIAS_SYS (rename, int, |
9236 |
+ (const char *old_filename, const char *new_filename)); |
9237 |
+# endif |
9238 |
+# if __GLIBC__ >= 2 |
9239 |
+_GL_CXXALIASWARN (rename); |
9240 |
+# endif |
9241 |
+#elif defined GNULIB_POSIXCHECK |
9242 |
+# undef rename |
9243 |
+/* Assume rename is always declared. */ |
9244 |
+_GL_WARN_ON_USE (rename, "rename is buggy on some platforms - " |
9245 |
+ "use gnulib module rename for more portability"); |
9246 |
+#endif |
9247 |
+ |
9248 |
+#if 1 |
9249 |
+# if 1 |
9250 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
9251 |
+# undef renameat |
9252 |
+# define renameat rpl_renameat |
9253 |
+# endif |
9254 |
+_GL_FUNCDECL_RPL (renameat, int, |
9255 |
+ (int fd1, char const *file1, int fd2, char const *file2) |
9256 |
+ _GL_ARG_NONNULL ((2, 4))); |
9257 |
+_GL_CXXALIAS_RPL (renameat, int, |
9258 |
+ (int fd1, char const *file1, int fd2, char const *file2)); |
9259 |
+# else |
9260 |
+# if !1 |
9261 |
+_GL_FUNCDECL_SYS (renameat, int, |
9262 |
+ (int fd1, char const *file1, int fd2, char const *file2) |
9263 |
+ _GL_ARG_NONNULL ((2, 4))); |
9264 |
+# endif |
9265 |
+_GL_CXXALIAS_SYS (renameat, int, |
9266 |
+ (int fd1, char const *file1, int fd2, char const *file2)); |
9267 |
+# endif |
9268 |
+_GL_CXXALIASWARN (renameat); |
9269 |
+#elif defined GNULIB_POSIXCHECK |
9270 |
+# undef renameat |
9271 |
+# if HAVE_RAW_DECL_RENAMEAT |
9272 |
+_GL_WARN_ON_USE (renameat, "renameat is not portable - " |
9273 |
+ "use gnulib module renameat for portability"); |
9274 |
+# endif |
9275 |
+#endif |
9276 |
+ |
9277 |
+#if 1 |
9278 |
+# if 0 && 0 |
9279 |
+# if defined __GNUC__ || defined __clang__ |
9280 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
9281 |
+# undef scanf |
9282 |
+/* Don't break __attribute__((format(scanf,M,N))). */ |
9283 |
+# define scanf __scanf__ |
9284 |
+# endif |
9285 |
+_GL_FUNCDECL_RPL_1 (__scanf__, int, |
9286 |
+ (const char *restrict format, ...) |
9287 |
+ __asm__ ( |
9288 |
+ _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_scanf)) |
9289 |
+ _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 2) |
9290 |
+ _GL_ARG_NONNULL ((1))); |
9291 |
+_GL_CXXALIAS_RPL_1 (scanf, __scanf__, int, (const char *restrict format, ...)); |
9292 |
+# else |
9293 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
9294 |
+# undef scanf |
9295 |
+# define scanf rpl_scanf |
9296 |
+# endif |
9297 |
+_GL_FUNCDECL_RPL (scanf, int, (const char *restrict format, ...) |
9298 |
+ _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 2) |
9299 |
+ _GL_ARG_NONNULL ((1))); |
9300 |
+_GL_CXXALIAS_RPL (scanf, int, (const char *restrict format, ...)); |
9301 |
+# endif |
9302 |
+# else |
9303 |
+_GL_CXXALIAS_SYS (scanf, int, (const char *restrict format, ...)); |
9304 |
+# endif |
9305 |
+# if __GLIBC__ >= 2 |
9306 |
+_GL_CXXALIASWARN (scanf); |
9307 |
+# endif |
9308 |
+#endif |
9309 |
+ |
9310 |
+#if 0 |
9311 |
+# if 0 |
9312 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
9313 |
+# define snprintf rpl_snprintf |
9314 |
+# endif |
9315 |
+# define GNULIB_overrides_snprintf 1 |
9316 |
+_GL_FUNCDECL_RPL (snprintf, int, |
9317 |
+ (char *restrict str, size_t size, |
9318 |
+ const char *restrict format, ...) |
9319 |
+ _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (3, 4) |
9320 |
+ _GL_ARG_NONNULL ((3))); |
9321 |
+_GL_CXXALIAS_RPL (snprintf, int, |
9322 |
+ (char *restrict str, size_t size, |
9323 |
+ const char *restrict format, ...)); |
9324 |
+# else |
9325 |
+# if !1 |
9326 |
+_GL_FUNCDECL_SYS (snprintf, int, |
9327 |
+ (char *restrict str, size_t size, |
9328 |
+ const char *restrict format, ...) |
9329 |
+ _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (3, 4) |
9330 |
+ _GL_ARG_NONNULL ((3))); |
9331 |
+# endif |
9332 |
+_GL_CXXALIAS_SYS (snprintf, int, |
9333 |
+ (char *restrict str, size_t size, |
9334 |
+ const char *restrict format, ...)); |
9335 |
+# endif |
9336 |
+# if __GLIBC__ >= 2 |
9337 |
+_GL_CXXALIASWARN (snprintf); |
9338 |
+# endif |
9339 |
+#elif defined GNULIB_POSIXCHECK |
9340 |
+# undef snprintf |
9341 |
+# if HAVE_RAW_DECL_SNPRINTF |
9342 |
+_GL_WARN_ON_USE (snprintf, "snprintf is unportable - " |
9343 |
+ "use gnulib module snprintf for portability"); |
9344 |
+# endif |
9345 |
+#endif |
9346 |
+ |
9347 |
+/* Some people would argue that all sprintf uses should be warned about |
9348 |
+ (for example, OpenBSD issues a link warning for it), |
9349 |
+ since it can cause security holes due to buffer overruns. |
9350 |
+ However, we believe that sprintf can be used safely, and is more |
9351 |
+ efficient than snprintf in those safe cases; and as proof of our |
9352 |
+ belief, we use sprintf in several gnulib modules. So this header |
9353 |
+ intentionally avoids adding a warning to sprintf except when |
9354 |
+ GNULIB_POSIXCHECK is defined. */ |
9355 |
+ |
9356 |
+#if 0 |
9357 |
+# if 0 |
9358 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
9359 |
+# define sprintf rpl_sprintf |
9360 |
+# endif |
9361 |
+# define GNULIB_overrides_sprintf 1 |
9362 |
+_GL_FUNCDECL_RPL (sprintf, int, |
9363 |
+ (char *restrict str, const char *restrict format, ...) |
9364 |
+ _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3) |
9365 |
+ _GL_ARG_NONNULL ((1, 2))); |
9366 |
+_GL_CXXALIAS_RPL (sprintf, int, |
9367 |
+ (char *restrict str, const char *restrict format, ...)); |
9368 |
+# else |
9369 |
+_GL_CXXALIAS_SYS (sprintf, int, |
9370 |
+ (char *restrict str, const char *restrict format, ...)); |
9371 |
+# endif |
9372 |
+# if __GLIBC__ >= 2 |
9373 |
+_GL_CXXALIASWARN (sprintf); |
9374 |
+# endif |
9375 |
+#elif defined GNULIB_POSIXCHECK |
9376 |
+# undef sprintf |
9377 |
+/* Assume sprintf is always declared. */ |
9378 |
+_GL_WARN_ON_USE (sprintf, "sprintf is not always POSIX compliant - " |
9379 |
+ "use gnulib module sprintf-posix for portable " |
9380 |
+ "POSIX compliance"); |
9381 |
+#endif |
9382 |
+ |
9383 |
+#if 1 |
9384 |
+/* On native Windows, map 'tempnam' to '_tempnam', so that -loldnames is not |
9385 |
+ required. In C++ with GNULIB_NAMESPACE, avoid differences between |
9386 |
+ platforms by defining GNULIB_NAMESPACE::tempnam always. */ |
9387 |
+# if defined _WIN32 && !defined __CYGWIN__ |
9388 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
9389 |
+# undef tempnam |
9390 |
+# define tempnam _tempnam |
9391 |
+# endif |
9392 |
+_GL_CXXALIAS_MDA (tempnam, char *, (const char *dir, const char *prefix)); |
9393 |
+# else |
9394 |
+_GL_CXXALIAS_SYS (tempnam, char *, (const char *dir, const char *prefix)); |
9395 |
+# endif |
9396 |
+_GL_CXXALIASWARN (tempnam); |
9397 |
+#endif |
9398 |
+ |
9399 |
+#if 0 |
9400 |
+# if 0 |
9401 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
9402 |
+# define tmpfile rpl_tmpfile |
9403 |
+# endif |
9404 |
+_GL_FUNCDECL_RPL (tmpfile, FILE *, (void) |
9405 |
+ _GL_ATTRIBUTE_DEALLOC (fclose, 1)); |
9406 |
+_GL_CXXALIAS_RPL (tmpfile, FILE *, (void)); |
9407 |
+# else |
9408 |
+# if __GNUC__ >= 11 |
9409 |
+/* For -Wmismatched-dealloc: Associate tmpfile with fclose or rpl_fclose. */ |
9410 |
+_GL_FUNCDECL_SYS (tmpfile, FILE *, (void) |
9411 |
+ _GL_ATTRIBUTE_DEALLOC (fclose, 1)); |
9412 |
+# endif |
9413 |
+_GL_CXXALIAS_SYS (tmpfile, FILE *, (void)); |
9414 |
+# endif |
9415 |
+# if __GLIBC__ >= 2 |
9416 |
+_GL_CXXALIASWARN (tmpfile); |
9417 |
+# endif |
9418 |
+#else |
9419 |
+# if 0 && __GNUC__ >= 11 && !defined tmpfile |
9420 |
+/* For -Wmismatched-dealloc: Associate tmpfile with fclose or rpl_fclose. */ |
9421 |
+_GL_FUNCDECL_SYS (tmpfile, FILE *, (void) |
9422 |
+ _GL_ATTRIBUTE_DEALLOC (fclose, 1)); |
9423 |
+# endif |
9424 |
+# if defined GNULIB_POSIXCHECK |
9425 |
+# undef tmpfile |
9426 |
+# if HAVE_RAW_DECL_TMPFILE |
9427 |
+_GL_WARN_ON_USE (tmpfile, "tmpfile is not usable on mingw - " |
9428 |
+ "use gnulib module tmpfile for portability"); |
9429 |
+# endif |
9430 |
+# endif |
9431 |
+#endif |
9432 |
+ |
9433 |
+#if 1 |
9434 |
+/* Write formatted output to a string dynamically allocated with malloc(). |
9435 |
+ If the memory allocation succeeds, store the address of the string in |
9436 |
+ *RESULT and return the number of resulting bytes, excluding the trailing |
9437 |
+ NUL. Upon memory allocation error, or some other error, return -1. */ |
9438 |
+# if 1 |
9439 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
9440 |
+# define asprintf rpl_asprintf |
9441 |
+# endif |
9442 |
+# define GNULIB_overrides_asprintf |
9443 |
+_GL_FUNCDECL_RPL (asprintf, int, |
9444 |
+ (char **result, const char *format, ...) |
9445 |
+ _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3) |
9446 |
+ _GL_ARG_NONNULL ((1, 2))); |
9447 |
+_GL_CXXALIAS_RPL (asprintf, int, |
9448 |
+ (char **result, const char *format, ...)); |
9449 |
+# else |
9450 |
+# if !1 |
9451 |
+_GL_FUNCDECL_SYS (asprintf, int, |
9452 |
+ (char **result, const char *format, ...) |
9453 |
+ _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3) |
9454 |
+ _GL_ARG_NONNULL ((1, 2))); |
9455 |
+# endif |
9456 |
+_GL_CXXALIAS_SYS (asprintf, int, |
9457 |
+ (char **result, const char *format, ...)); |
9458 |
+# endif |
9459 |
+_GL_CXXALIASWARN (asprintf); |
9460 |
+# if 1 |
9461 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
9462 |
+# define vasprintf rpl_vasprintf |
9463 |
+# endif |
9464 |
+# define GNULIB_overrides_vasprintf 1 |
9465 |
+_GL_FUNCDECL_RPL (vasprintf, int, |
9466 |
+ (char **result, const char *format, va_list args) |
9467 |
+ _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0) |
9468 |
+ _GL_ARG_NONNULL ((1, 2))); |
9469 |
+_GL_CXXALIAS_RPL (vasprintf, int, |
9470 |
+ (char **result, const char *format, va_list args)); |
9471 |
+# else |
9472 |
+# if !1 |
9473 |
+_GL_FUNCDECL_SYS (vasprintf, int, |
9474 |
+ (char **result, const char *format, va_list args) |
9475 |
+ _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0) |
9476 |
+ _GL_ARG_NONNULL ((1, 2))); |
9477 |
+# endif |
9478 |
+_GL_CXXALIAS_SYS (vasprintf, int, |
9479 |
+ (char **result, const char *format, va_list args)); |
9480 |
+# endif |
9481 |
+_GL_CXXALIASWARN (vasprintf); |
9482 |
+#endif |
9483 |
+ |
9484 |
+#if 0 |
9485 |
+# if 0 |
9486 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
9487 |
+# define vdprintf rpl_vdprintf |
9488 |
+# endif |
9489 |
+_GL_FUNCDECL_RPL (vdprintf, int, |
9490 |
+ (int fd, const char *restrict format, va_list args) |
9491 |
+ _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0) |
9492 |
+ _GL_ARG_NONNULL ((2))); |
9493 |
+_GL_CXXALIAS_RPL (vdprintf, int, |
9494 |
+ (int fd, const char *restrict format, va_list args)); |
9495 |
+# else |
9496 |
+# if !1 |
9497 |
+_GL_FUNCDECL_SYS (vdprintf, int, |
9498 |
+ (int fd, const char *restrict format, va_list args) |
9499 |
+ _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0) |
9500 |
+ _GL_ARG_NONNULL ((2))); |
9501 |
+# endif |
9502 |
+/* Need to cast, because on Solaris, the third parameter will likely be |
9503 |
+ __va_list args. */ |
9504 |
+_GL_CXXALIAS_SYS_CAST (vdprintf, int, |
9505 |
+ (int fd, const char *restrict format, va_list args)); |
9506 |
+# endif |
9507 |
+# if __GLIBC__ >= 2 |
9508 |
+_GL_CXXALIASWARN (vdprintf); |
9509 |
+# endif |
9510 |
+#elif defined GNULIB_POSIXCHECK |
9511 |
+# undef vdprintf |
9512 |
+# if HAVE_RAW_DECL_VDPRINTF |
9513 |
+_GL_WARN_ON_USE (vdprintf, "vdprintf is unportable - " |
9514 |
+ "use gnulib module vdprintf for portability"); |
9515 |
+# endif |
9516 |
+#endif |
9517 |
+ |
9518 |
+#if 0 || 1 |
9519 |
+# if (0 && 0) \ |
9520 |
+ || (1 && 0 && (0 || 0)) |
9521 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
9522 |
+# define vfprintf rpl_vfprintf |
9523 |
+# endif |
9524 |
+# define GNULIB_overrides_vfprintf 1 |
9525 |
+# if 0 |
9526 |
+_GL_FUNCDECL_RPL (vfprintf, int, |
9527 |
+ (FILE *restrict fp, |
9528 |
+ const char *restrict format, va_list args) |
9529 |
+ _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0) |
9530 |
+ _GL_ARG_NONNULL ((1, 2))); |
9531 |
+# else |
9532 |
+_GL_FUNCDECL_RPL (vfprintf, int, |
9533 |
+ (FILE *restrict fp, |
9534 |
+ const char *restrict format, va_list args) |
9535 |
+ _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (2, 0) |
9536 |
+ _GL_ARG_NONNULL ((1, 2))); |
9537 |
+# endif |
9538 |
+_GL_CXXALIAS_RPL (vfprintf, int, |
9539 |
+ (FILE *restrict fp, |
9540 |
+ const char *restrict format, va_list args)); |
9541 |
+# else |
9542 |
+/* Need to cast, because on Solaris, the third parameter is |
9543 |
+ __va_list args |
9544 |
+ and GCC's fixincludes did not change this to __gnuc_va_list. */ |
9545 |
+_GL_CXXALIAS_SYS_CAST (vfprintf, int, |
9546 |
+ (FILE *restrict fp, |
9547 |
+ const char *restrict format, va_list args)); |
9548 |
+# endif |
9549 |
+# if __GLIBC__ >= 2 |
9550 |
+_GL_CXXALIASWARN (vfprintf); |
9551 |
+# endif |
9552 |
+#endif |
9553 |
+#if !0 && defined GNULIB_POSIXCHECK |
9554 |
+# if !GNULIB_overrides_vfprintf |
9555 |
+# undef vfprintf |
9556 |
+# endif |
9557 |
+/* Assume vfprintf is always declared. */ |
9558 |
+_GL_WARN_ON_USE (vfprintf, "vfprintf is not always POSIX compliant - " |
9559 |
+ "use gnulib module vfprintf-posix for portable " |
9560 |
+ "POSIX compliance"); |
9561 |
+#endif |
9562 |
+ |
9563 |
+#if 0 |
9564 |
+# if 0 && 0 |
9565 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
9566 |
+# undef vfscanf |
9567 |
+# define vfscanf rpl_vfscanf |
9568 |
+# endif |
9569 |
+_GL_FUNCDECL_RPL (vfscanf, int, |
9570 |
+ (FILE *restrict stream, |
9571 |
+ const char *restrict format, va_list args) |
9572 |
+ _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (2, 0) |
9573 |
+ _GL_ARG_NONNULL ((1, 2))); |
9574 |
+_GL_CXXALIAS_RPL (vfscanf, int, |
9575 |
+ (FILE *restrict stream, |
9576 |
+ const char *restrict format, va_list args)); |
9577 |
+# else |
9578 |
+_GL_CXXALIAS_SYS (vfscanf, int, |
9579 |
+ (FILE *restrict stream, |
9580 |
+ const char *restrict format, va_list args)); |
9581 |
+# endif |
9582 |
+# if __GLIBC__ >= 2 |
9583 |
+_GL_CXXALIASWARN (vfscanf); |
9584 |
+# endif |
9585 |
+#endif |
9586 |
+ |
9587 |
+#if 0 || 1 |
9588 |
+# if (0 && 0) \ |
9589 |
+ || (1 && 0 && (0 || 0)) |
9590 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
9591 |
+# define vprintf rpl_vprintf |
9592 |
+# endif |
9593 |
+# define GNULIB_overrides_vprintf 1 |
9594 |
+# if 0 || 0 |
9595 |
+_GL_FUNCDECL_RPL (vprintf, int, (const char *restrict format, va_list args) |
9596 |
+ _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (1, 0) |
9597 |
+ _GL_ARG_NONNULL ((1))); |
9598 |
+# else |
9599 |
+_GL_FUNCDECL_RPL (vprintf, int, (const char *restrict format, va_list args) |
9600 |
+ _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (1, 0) |
9601 |
+ _GL_ARG_NONNULL ((1))); |
9602 |
+# endif |
9603 |
+_GL_CXXALIAS_RPL (vprintf, int, (const char *restrict format, va_list args)); |
9604 |
+# else |
9605 |
+/* Need to cast, because on Solaris, the second parameter is |
9606 |
+ __va_list args |
9607 |
+ and GCC's fixincludes did not change this to __gnuc_va_list. */ |
9608 |
+_GL_CXXALIAS_SYS_CAST (vprintf, int, |
9609 |
+ (const char *restrict format, va_list args)); |
9610 |
+# endif |
9611 |
+# if __GLIBC__ >= 2 |
9612 |
+_GL_CXXALIASWARN (vprintf); |
9613 |
+# endif |
9614 |
+#endif |
9615 |
+#if !0 && defined GNULIB_POSIXCHECK |
9616 |
+# if !GNULIB_overrides_vprintf |
9617 |
+# undef vprintf |
9618 |
+# endif |
9619 |
+/* Assume vprintf is always declared. */ |
9620 |
+_GL_WARN_ON_USE (vprintf, "vprintf is not always POSIX compliant - " |
9621 |
+ "use gnulib module vprintf-posix for portable " |
9622 |
+ "POSIX compliance"); |
9623 |
+#endif |
9624 |
+ |
9625 |
+#if 0 |
9626 |
+# if 0 && 0 |
9627 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
9628 |
+# undef vscanf |
9629 |
+# define vscanf rpl_vscanf |
9630 |
+# endif |
9631 |
+_GL_FUNCDECL_RPL (vscanf, int, (const char *restrict format, va_list args) |
9632 |
+ _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 0) |
9633 |
+ _GL_ARG_NONNULL ((1))); |
9634 |
+_GL_CXXALIAS_RPL (vscanf, int, (const char *restrict format, va_list args)); |
9635 |
+# else |
9636 |
+_GL_CXXALIAS_SYS (vscanf, int, (const char *restrict format, va_list args)); |
9637 |
+# endif |
9638 |
+# if __GLIBC__ >= 2 |
9639 |
+_GL_CXXALIASWARN (vscanf); |
9640 |
+# endif |
9641 |
+#endif |
9642 |
+ |
9643 |
+#if 0 |
9644 |
+# if 0 |
9645 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
9646 |
+# define vsnprintf rpl_vsnprintf |
9647 |
+# endif |
9648 |
+# define GNULIB_overrides_vsnprintf 1 |
9649 |
+_GL_FUNCDECL_RPL (vsnprintf, int, |
9650 |
+ (char *restrict str, size_t size, |
9651 |
+ const char *restrict format, va_list args) |
9652 |
+ _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (3, 0) |
9653 |
+ _GL_ARG_NONNULL ((3))); |
9654 |
+_GL_CXXALIAS_RPL (vsnprintf, int, |
9655 |
+ (char *restrict str, size_t size, |
9656 |
+ const char *restrict format, va_list args)); |
9657 |
+# else |
9658 |
+# if !1 |
9659 |
+_GL_FUNCDECL_SYS (vsnprintf, int, |
9660 |
+ (char *restrict str, size_t size, |
9661 |
+ const char *restrict format, va_list args) |
9662 |
+ _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (3, 0) |
9663 |
+ _GL_ARG_NONNULL ((3))); |
9664 |
+# endif |
9665 |
+_GL_CXXALIAS_SYS (vsnprintf, int, |
9666 |
+ (char *restrict str, size_t size, |
9667 |
+ const char *restrict format, va_list args)); |
9668 |
+# endif |
9669 |
+# if __GLIBC__ >= 2 |
9670 |
+_GL_CXXALIASWARN (vsnprintf); |
9671 |
+# endif |
9672 |
+#elif defined GNULIB_POSIXCHECK |
9673 |
+# undef vsnprintf |
9674 |
+# if HAVE_RAW_DECL_VSNPRINTF |
9675 |
+_GL_WARN_ON_USE (vsnprintf, "vsnprintf is unportable - " |
9676 |
+ "use gnulib module vsnprintf for portability"); |
9677 |
+# endif |
9678 |
+#endif |
9679 |
+ |
9680 |
+#if 0 |
9681 |
+# if 0 |
9682 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
9683 |
+# define vsprintf rpl_vsprintf |
9684 |
+# endif |
9685 |
+# define GNULIB_overrides_vsprintf 1 |
9686 |
+_GL_FUNCDECL_RPL (vsprintf, int, |
9687 |
+ (char *restrict str, |
9688 |
+ const char *restrict format, va_list args) |
9689 |
+ _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0) |
9690 |
+ _GL_ARG_NONNULL ((1, 2))); |
9691 |
+_GL_CXXALIAS_RPL (vsprintf, int, |
9692 |
+ (char *restrict str, |
9693 |
+ const char *restrict format, va_list args)); |
9694 |
+# else |
9695 |
+/* Need to cast, because on Solaris, the third parameter is |
9696 |
+ __va_list args |
9697 |
+ and GCC's fixincludes did not change this to __gnuc_va_list. */ |
9698 |
+_GL_CXXALIAS_SYS_CAST (vsprintf, int, |
9699 |
+ (char *restrict str, |
9700 |
+ const char *restrict format, va_list args)); |
9701 |
+# endif |
9702 |
+# if __GLIBC__ >= 2 |
9703 |
+_GL_CXXALIASWARN (vsprintf); |
9704 |
+# endif |
9705 |
+#elif defined GNULIB_POSIXCHECK |
9706 |
+# undef vsprintf |
9707 |
+/* Assume vsprintf is always declared. */ |
9708 |
+_GL_WARN_ON_USE (vsprintf, "vsprintf is not always POSIX compliant - " |
9709 |
+ "use gnulib module vsprintf-posix for portable " |
9710 |
+ "POSIX compliance"); |
9711 |
+#endif |
9712 |
+ |
9713 |
+#endif /* _GL_STDIO_H */ |
9714 |
+#endif /* _GL_STDIO_H */ |
9715 |
+#endif |
9716 |
|
9717 |
diff --git a/autotools/gnulib/stdlib.in.h b/autotools/gnulib/stdlib.h |
9718 |
similarity index 64% |
9719 |
copy from autotools/gnulib/stdlib.in.h |
9720 |
copy to autotools/gnulib/stdlib.h |
9721 |
index d52c2f7..11c15a3 100644 |
9722 |
--- a/autotools/gnulib/stdlib.in.h |
9723 |
+++ b/autotools/gnulib/stdlib.h |
9724 |
@@ -1,3 +1,4 @@ |
9725 |
+/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ |
9726 |
/* A GNU-like <stdlib.h>. |
9727 |
|
9728 |
Copyright (C) 1995, 2001-2004, 2006-2022 Free Software Foundation, Inc. |
9729 |
@@ -16,37 +17,37 @@ |
9730 |
along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
9731 |
|
9732 |
#if __GNUC__ >= 3 |
9733 |
-@PRAGMA_SYSTEM_HEADER@ |
9734 |
+#pragma GCC system_header |
9735 |
#endif |
9736 |
-@PRAGMA_COLUMNS@ |
9737 |
+ |
9738 |
|
9739 |
#if defined __need_system_stdlib_h || defined __need_malloc_and_calloc |
9740 |
/* Special invocation conventions inside some gnulib header files, |
9741 |
and inside some glibc header files, respectively. */ |
9742 |
|
9743 |
-#@INCLUDE_NEXT@ @NEXT_STDLIB_H@ |
9744 |
+#include_next <stdlib.h> |
9745 |
|
9746 |
#else |
9747 |
/* Normal invocation convention. */ |
9748 |
|
9749 |
-#ifndef _@GUARD_PREFIX@_STDLIB_H |
9750 |
+#ifndef _GL_STDLIB_H |
9751 |
|
9752 |
/* The include_next requires a split double-inclusion guard. */ |
9753 |
-#@INCLUDE_NEXT@ @NEXT_STDLIB_H@ |
9754 |
+#include_next <stdlib.h> |
9755 |
|
9756 |
-#ifndef _@GUARD_PREFIX@_STDLIB_H |
9757 |
-#define _@GUARD_PREFIX@_STDLIB_H |
9758 |
+#ifndef _GL_STDLIB_H |
9759 |
+#define _GL_STDLIB_H |
9760 |
|
9761 |
/* NetBSD 5.0 mis-defines NULL. */ |
9762 |
#include <stddef.h> |
9763 |
|
9764 |
/* MirBSD 10 defines WEXITSTATUS in <sys/wait.h>, not in <stdlib.h>. */ |
9765 |
-#if @GNULIB_SYSTEM_POSIX@ && !defined WEXITSTATUS |
9766 |
+#if 0 && !defined WEXITSTATUS |
9767 |
# include <sys/wait.h> |
9768 |
#endif |
9769 |
|
9770 |
/* Solaris declares getloadavg() in <sys/loadavg.h>. */ |
9771 |
-#if (@GNULIB_GETLOADAVG@ || defined GNULIB_POSIXCHECK) && @HAVE_SYS_LOADAVG_H@ |
9772 |
+#if (0 || defined GNULIB_POSIXCHECK) && 0 |
9773 |
/* OpenIndiana has a bug: <sys/time.h> must be included before |
9774 |
<sys/loadavg.h>. */ |
9775 |
# include <sys/time.h> |
9776 |
@@ -58,20 +59,20 @@ |
9777 |
# include <io.h> |
9778 |
#endif |
9779 |
|
9780 |
-#if @GNULIB_RANDOM_R@ |
9781 |
+#if 0 |
9782 |
|
9783 |
/* OSF/1 5.1 declares 'struct random_data' in <random.h>, which is included |
9784 |
from <stdlib.h> if _REENTRANT is defined. Include it whenever we need |
9785 |
'struct random_data'. */ |
9786 |
-# if @HAVE_RANDOM_H@ |
9787 |
+# if 1 |
9788 |
# include <random.h> |
9789 |
# endif |
9790 |
|
9791 |
-# if !@HAVE_STRUCT_RANDOM_DATA@ || @REPLACE_RANDOM_R@ || !@HAVE_RANDOM_R@ |
9792 |
+# if !1 || 0 || !1 |
9793 |
# include <stdint.h> |
9794 |
# endif |
9795 |
|
9796 |
-# if !@HAVE_STRUCT_RANDOM_DATA@ |
9797 |
+# if !1 |
9798 |
/* Define 'struct random_data'. |
9799 |
But allow multiple gnulib generated <stdlib.h> replacements to coexist. */ |
9800 |
# if !GNULIB_defined_struct_random_data |
9801 |
@@ -90,7 +91,7 @@ struct random_data |
9802 |
# endif |
9803 |
#endif |
9804 |
|
9805 |
-#if (@GNULIB_MKSTEMP@ || @GNULIB_MKSTEMPS@ || @GNULIB_MKOSTEMP@ || @GNULIB_MKOSTEMPS@ || @GNULIB_GETSUBOPT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__ && !(defined _WIN32 && ! defined __CYGWIN__) |
9806 |
+#if (0 || 0 || 0 || 0 || 0 || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__ && !(defined _WIN32 && ! defined __CYGWIN__) |
9807 |
/* On Mac OS X 10.3, only <unistd.h> declares mkstemp. */ |
9808 |
/* On Mac OS X 10.5, only <unistd.h> declares mkstemps. */ |
9809 |
/* On Mac OS X 10.13, only <unistd.h> declares mkostemp and mkostemps. */ |
9810 |
@@ -139,12 +140,563 @@ struct random_data |
9811 |
#endif |
9812 |
|
9813 |
/* The definition of _Noreturn is copied here. */ |
9814 |
+/* A C macro for declaring that a function does not return. |
9815 |
+ Copyright (C) 2011-2022 Free Software Foundation, Inc. |
9816 |
+ |
9817 |
+ This program is free software: you can redistribute it and/or modify it |
9818 |
+ under the terms of the GNU Lesser General Public License as published |
9819 |
+ by the Free Software Foundation; either version 2 of the License, or |
9820 |
+ (at your option) any later version. |
9821 |
+ |
9822 |
+ This program is distributed in the hope that it will be useful, |
9823 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
9824 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
9825 |
+ Lesser General Public License for more details. |
9826 |
+ |
9827 |
+ You should have received a copy of the GNU Lesser General Public License |
9828 |
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
9829 |
+ |
9830 |
+#ifndef _Noreturn |
9831 |
+# if (defined __cplusplus \ |
9832 |
+ && ((201103 <= __cplusplus && !(__GNUC__ == 4 && __GNUC_MINOR__ == 7)) \ |
9833 |
+ || (defined _MSC_VER && 1900 <= _MSC_VER)) \ |
9834 |
+ && 0) |
9835 |
+ /* [[noreturn]] is not practically usable, because with it the syntax |
9836 |
+ extern _Noreturn void func (...); |
9837 |
+ would not be valid; such a declaration would only be valid with 'extern' |
9838 |
+ and '_Noreturn' swapped, or without the 'extern' keyword. However, some |
9839 |
+ AIX system header files and several gnulib header files use precisely |
9840 |
+ this syntax with 'extern'. */ |
9841 |
+# define _Noreturn [[noreturn]] |
9842 |
+# elif ((!defined __cplusplus || defined __clang__) \ |
9843 |
+ && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \ |
9844 |
+ || (!defined __STRICT_ANSI__ \ |
9845 |
+ && (4 < __GNUC__ + (7 <= __GNUC_MINOR__) \ |
9846 |
+ || (defined __apple_build_version__ \ |
9847 |
+ ? 6000000 <= __apple_build_version__ \ |
9848 |
+ : 3 < __clang_major__ + (5 <= __clang_minor__)))))) |
9849 |
+ /* _Noreturn works as-is. */ |
9850 |
+# elif (2 < __GNUC__ + (8 <= __GNUC_MINOR__) || defined __clang__ \ |
9851 |
+ || 0x5110 <= __SUNPRO_C) |
9852 |
+# define _Noreturn __attribute__ ((__noreturn__)) |
9853 |
+# elif 1200 <= (defined _MSC_VER ? _MSC_VER : 0) |
9854 |
+# define _Noreturn __declspec (noreturn) |
9855 |
+# else |
9856 |
+# define _Noreturn |
9857 |
+# endif |
9858 |
+#endif |
9859 |
|
9860 |
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ |
9861 |
+/* C++ compatible function declaration macros. |
9862 |
+ Copyright (C) 2010-2022 Free Software Foundation, Inc. |
9863 |
+ |
9864 |
+ This program is free software: you can redistribute it and/or modify it |
9865 |
+ under the terms of the GNU Lesser General Public License as published |
9866 |
+ by the Free Software Foundation; either version 2 of the License, or |
9867 |
+ (at your option) any later version. |
9868 |
+ |
9869 |
+ This program is distributed in the hope that it will be useful, |
9870 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
9871 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
9872 |
+ Lesser General Public License for more details. |
9873 |
+ |
9874 |
+ You should have received a copy of the GNU Lesser General Public License |
9875 |
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
9876 |
+ |
9877 |
+#ifndef _GL_CXXDEFS_H |
9878 |
+#define _GL_CXXDEFS_H |
9879 |
+ |
9880 |
+/* Begin/end the GNULIB_NAMESPACE namespace. */ |
9881 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
9882 |
+# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { |
9883 |
+# define _GL_END_NAMESPACE } |
9884 |
+#else |
9885 |
+# define _GL_BEGIN_NAMESPACE |
9886 |
+# define _GL_END_NAMESPACE |
9887 |
+#endif |
9888 |
+ |
9889 |
+/* The three most frequent use cases of these macros are: |
9890 |
+ |
9891 |
+ * For providing a substitute for a function that is missing on some |
9892 |
+ platforms, but is declared and works fine on the platforms on which |
9893 |
+ it exists: |
9894 |
+ |
9895 |
+ #if @GNULIB_FOO@ |
9896 |
+ # if !@HAVE_FOO@ |
9897 |
+ _GL_FUNCDECL_SYS (foo, ...); |
9898 |
+ # endif |
9899 |
+ _GL_CXXALIAS_SYS (foo, ...); |
9900 |
+ _GL_CXXALIASWARN (foo); |
9901 |
+ #elif defined GNULIB_POSIXCHECK |
9902 |
+ ... |
9903 |
+ #endif |
9904 |
+ |
9905 |
+ * For providing a replacement for a function that exists on all platforms, |
9906 |
+ but is broken/insufficient and needs to be replaced on some platforms: |
9907 |
+ |
9908 |
+ #if @GNULIB_FOO@ |
9909 |
+ # if @REPLACE_FOO@ |
9910 |
+ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
9911 |
+ # undef foo |
9912 |
+ # define foo rpl_foo |
9913 |
+ # endif |
9914 |
+ _GL_FUNCDECL_RPL (foo, ...); |
9915 |
+ _GL_CXXALIAS_RPL (foo, ...); |
9916 |
+ # else |
9917 |
+ _GL_CXXALIAS_SYS (foo, ...); |
9918 |
+ # endif |
9919 |
+ _GL_CXXALIASWARN (foo); |
9920 |
+ #elif defined GNULIB_POSIXCHECK |
9921 |
+ ... |
9922 |
+ #endif |
9923 |
+ |
9924 |
+ * For providing a replacement for a function that exists on some platforms |
9925 |
+ but is broken/insufficient and needs to be replaced on some of them and |
9926 |
+ is additionally either missing or undeclared on some other platforms: |
9927 |
+ |
9928 |
+ #if @GNULIB_FOO@ |
9929 |
+ # if @REPLACE_FOO@ |
9930 |
+ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
9931 |
+ # undef foo |
9932 |
+ # define foo rpl_foo |
9933 |
+ # endif |
9934 |
+ _GL_FUNCDECL_RPL (foo, ...); |
9935 |
+ _GL_CXXALIAS_RPL (foo, ...); |
9936 |
+ # else |
9937 |
+ # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ |
9938 |
+ _GL_FUNCDECL_SYS (foo, ...); |
9939 |
+ # endif |
9940 |
+ _GL_CXXALIAS_SYS (foo, ...); |
9941 |
+ # endif |
9942 |
+ _GL_CXXALIASWARN (foo); |
9943 |
+ #elif defined GNULIB_POSIXCHECK |
9944 |
+ ... |
9945 |
+ #endif |
9946 |
+*/ |
9947 |
+ |
9948 |
+/* _GL_EXTERN_C declaration; |
9949 |
+ performs the declaration with C linkage. */ |
9950 |
+#if defined __cplusplus |
9951 |
+# define _GL_EXTERN_C extern "C" |
9952 |
+#else |
9953 |
+# define _GL_EXTERN_C extern |
9954 |
+#endif |
9955 |
+ |
9956 |
+/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); |
9957 |
+ declares a replacement function, named rpl_func, with the given prototype, |
9958 |
+ consisting of return type, parameters, and attributes. |
9959 |
+ Example: |
9960 |
+ _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) |
9961 |
+ _GL_ARG_NONNULL ((1))); |
9962 |
+ */ |
9963 |
+#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ |
9964 |
+ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) |
9965 |
+#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ |
9966 |
+ _GL_EXTERN_C rettype rpl_func parameters_and_attributes |
9967 |
+ |
9968 |
+/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); |
9969 |
+ declares the system function, named func, with the given prototype, |
9970 |
+ consisting of return type, parameters, and attributes. |
9971 |
+ Example: |
9972 |
+ _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) |
9973 |
+ _GL_ARG_NONNULL ((1))); |
9974 |
+ */ |
9975 |
+#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ |
9976 |
+ _GL_EXTERN_C rettype func parameters_and_attributes |
9977 |
+ |
9978 |
+/* _GL_CXXALIAS_RPL (func, rettype, parameters); |
9979 |
+ declares a C++ alias called GNULIB_NAMESPACE::func |
9980 |
+ that redirects to rpl_func, if GNULIB_NAMESPACE is defined. |
9981 |
+ Example: |
9982 |
+ _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); |
9983 |
+ |
9984 |
+ Wrapping rpl_func in an object with an inline conversion operator |
9985 |
+ avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is |
9986 |
+ actually used in the program. */ |
9987 |
+#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ |
9988 |
+ _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) |
9989 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
9990 |
+# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ |
9991 |
+ namespace GNULIB_NAMESPACE \ |
9992 |
+ { \ |
9993 |
+ static const struct _gl_ ## func ## _wrapper \ |
9994 |
+ { \ |
9995 |
+ typedef rettype (*type) parameters; \ |
9996 |
+ \ |
9997 |
+ inline operator type () const \ |
9998 |
+ { \ |
9999 |
+ return ::rpl_func; \ |
10000 |
+ } \ |
10001 |
+ } func = {}; \ |
10002 |
+ } \ |
10003 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
10004 |
+#else |
10005 |
+# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ |
10006 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
10007 |
+#endif |
10008 |
+ |
10009 |
+/* _GL_CXXALIAS_MDA (func, rettype, parameters); |
10010 |
+ is to be used when func is a Microsoft deprecated alias, on native Windows. |
10011 |
+ It declares a C++ alias called GNULIB_NAMESPACE::func |
10012 |
+ that redirects to _func, if GNULIB_NAMESPACE is defined. |
10013 |
+ Example: |
10014 |
+ _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); |
10015 |
+ */ |
10016 |
+#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ |
10017 |
+ _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) |
10018 |
+ |
10019 |
+/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); |
10020 |
+ is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); |
10021 |
+ except that the C function rpl_func may have a slightly different |
10022 |
+ declaration. A cast is used to silence the "invalid conversion" error |
10023 |
+ that would otherwise occur. */ |
10024 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
10025 |
+# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ |
10026 |
+ namespace GNULIB_NAMESPACE \ |
10027 |
+ { \ |
10028 |
+ static const struct _gl_ ## func ## _wrapper \ |
10029 |
+ { \ |
10030 |
+ typedef rettype (*type) parameters; \ |
10031 |
+ \ |
10032 |
+ inline operator type () const \ |
10033 |
+ { \ |
10034 |
+ return reinterpret_cast<type>(::rpl_func); \ |
10035 |
+ } \ |
10036 |
+ } func = {}; \ |
10037 |
+ } \ |
10038 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
10039 |
+#else |
10040 |
+# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ |
10041 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
10042 |
+#endif |
10043 |
+ |
10044 |
+/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); |
10045 |
+ is like _GL_CXXALIAS_MDA (func, rettype, parameters); |
10046 |
+ except that the C function func may have a slightly different declaration. |
10047 |
+ A cast is used to silence the "invalid conversion" error that would |
10048 |
+ otherwise occur. */ |
10049 |
+#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ |
10050 |
+ _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) |
10051 |
+ |
10052 |
+/* _GL_CXXALIAS_SYS (func, rettype, parameters); |
10053 |
+ declares a C++ alias called GNULIB_NAMESPACE::func |
10054 |
+ that redirects to the system provided function func, if GNULIB_NAMESPACE |
10055 |
+ is defined. |
10056 |
+ Example: |
10057 |
+ _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); |
10058 |
+ |
10059 |
+ Wrapping func in an object with an inline conversion operator |
10060 |
+ avoids a reference to func unless GNULIB_NAMESPACE::func is |
10061 |
+ actually used in the program. */ |
10062 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
10063 |
+# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ |
10064 |
+ namespace GNULIB_NAMESPACE \ |
10065 |
+ { \ |
10066 |
+ static const struct _gl_ ## func ## _wrapper \ |
10067 |
+ { \ |
10068 |
+ typedef rettype (*type) parameters; \ |
10069 |
+ \ |
10070 |
+ inline operator type () const \ |
10071 |
+ { \ |
10072 |
+ return ::func; \ |
10073 |
+ } \ |
10074 |
+ } func = {}; \ |
10075 |
+ } \ |
10076 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
10077 |
+#else |
10078 |
+# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ |
10079 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
10080 |
+#endif |
10081 |
+ |
10082 |
+/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); |
10083 |
+ is like _GL_CXXALIAS_SYS (func, rettype, parameters); |
10084 |
+ except that the C function func may have a slightly different declaration. |
10085 |
+ A cast is used to silence the "invalid conversion" error that would |
10086 |
+ otherwise occur. */ |
10087 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
10088 |
+# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ |
10089 |
+ namespace GNULIB_NAMESPACE \ |
10090 |
+ { \ |
10091 |
+ static const struct _gl_ ## func ## _wrapper \ |
10092 |
+ { \ |
10093 |
+ typedef rettype (*type) parameters; \ |
10094 |
+ \ |
10095 |
+ inline operator type () const \ |
10096 |
+ { \ |
10097 |
+ return reinterpret_cast<type>(::func); \ |
10098 |
+ } \ |
10099 |
+ } func = {}; \ |
10100 |
+ } \ |
10101 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
10102 |
+#else |
10103 |
+# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ |
10104 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
10105 |
+#endif |
10106 |
+ |
10107 |
+/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); |
10108 |
+ is like _GL_CXXALIAS_SYS (func, rettype, parameters); |
10109 |
+ except that the C function is picked among a set of overloaded functions, |
10110 |
+ namely the one with rettype2 and parameters2. Two consecutive casts |
10111 |
+ are used to silence the "cannot find a match" and "invalid conversion" |
10112 |
+ errors that would otherwise occur. */ |
10113 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
10114 |
+ /* The outer cast must be a reinterpret_cast. |
10115 |
+ The inner cast: When the function is defined as a set of overloaded |
10116 |
+ functions, it works as a static_cast<>, choosing the designated variant. |
10117 |
+ When the function is defined as a single variant, it works as a |
10118 |
+ reinterpret_cast<>. The parenthesized cast syntax works both ways. */ |
10119 |
+# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ |
10120 |
+ namespace GNULIB_NAMESPACE \ |
10121 |
+ { \ |
10122 |
+ static const struct _gl_ ## func ## _wrapper \ |
10123 |
+ { \ |
10124 |
+ typedef rettype (*type) parameters; \ |
10125 |
+ \ |
10126 |
+ inline operator type () const \ |
10127 |
+ { \ |
10128 |
+ return reinterpret_cast<type>((rettype2 (*) parameters2)(::func)); \ |
10129 |
+ } \ |
10130 |
+ } func = {}; \ |
10131 |
+ } \ |
10132 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
10133 |
+#else |
10134 |
+# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ |
10135 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
10136 |
+#endif |
10137 |
+ |
10138 |
+/* _GL_CXXALIASWARN (func); |
10139 |
+ causes a warning to be emitted when ::func is used but not when |
10140 |
+ GNULIB_NAMESPACE::func is used. func must be defined without overloaded |
10141 |
+ variants. */ |
10142 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
10143 |
+# define _GL_CXXALIASWARN(func) \ |
10144 |
+ _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) |
10145 |
+# define _GL_CXXALIASWARN_1(func,namespace) \ |
10146 |
+ _GL_CXXALIASWARN_2 (func, namespace) |
10147 |
+/* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>, |
10148 |
+ we enable the warning only when not optimizing. */ |
10149 |
+# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) |
10150 |
+# define _GL_CXXALIASWARN_2(func,namespace) \ |
10151 |
+ _GL_WARN_ON_USE (func, \ |
10152 |
+ "The symbol ::" #func " refers to the system function. " \ |
10153 |
+ "Use " #namespace "::" #func " instead.") |
10154 |
+# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING |
10155 |
+# define _GL_CXXALIASWARN_2(func,namespace) \ |
10156 |
+ extern __typeof__ (func) func |
10157 |
+# else |
10158 |
+# define _GL_CXXALIASWARN_2(func,namespace) \ |
10159 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
10160 |
+# endif |
10161 |
+#else |
10162 |
+# define _GL_CXXALIASWARN(func) \ |
10163 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
10164 |
+#endif |
10165 |
+ |
10166 |
+/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); |
10167 |
+ causes a warning to be emitted when the given overloaded variant of ::func |
10168 |
+ is used but not when GNULIB_NAMESPACE::func is used. */ |
10169 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
10170 |
+# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ |
10171 |
+ _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ |
10172 |
+ GNULIB_NAMESPACE) |
10173 |
+# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ |
10174 |
+ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) |
10175 |
+/* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>, |
10176 |
+ we enable the warning only when not optimizing. */ |
10177 |
+# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) |
10178 |
+# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ |
10179 |
+ _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ |
10180 |
+ "The symbol ::" #func " refers to the system function. " \ |
10181 |
+ "Use " #namespace "::" #func " instead.") |
10182 |
+# else |
10183 |
+# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ |
10184 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
10185 |
+# endif |
10186 |
+#else |
10187 |
+# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ |
10188 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
10189 |
+#endif |
10190 |
+ |
10191 |
+#endif /* _GL_CXXDEFS_H */ |
10192 |
|
10193 |
/* The definition of _GL_ARG_NONNULL is copied here. */ |
10194 |
+/* A C macro for declaring that specific arguments must not be NULL. |
10195 |
+ Copyright (C) 2009-2022 Free Software Foundation, Inc. |
10196 |
+ |
10197 |
+ This program is free software: you can redistribute it and/or modify it |
10198 |
+ under the terms of the GNU Lesser General Public License as published |
10199 |
+ by the Free Software Foundation; either version 2 of the License, or |
10200 |
+ (at your option) any later version. |
10201 |
+ |
10202 |
+ This program is distributed in the hope that it will be useful, |
10203 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
10204 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
10205 |
+ Lesser General Public License for more details. |
10206 |
+ |
10207 |
+ You should have received a copy of the GNU Lesser General Public License |
10208 |
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
10209 |
+ |
10210 |
+/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools |
10211 |
+ that the values passed as arguments n, ..., m must be non-NULL pointers. |
10212 |
+ n = 1 stands for the first argument, n = 2 for the second argument etc. */ |
10213 |
+#ifndef _GL_ARG_NONNULL |
10214 |
+# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ |
10215 |
+# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) |
10216 |
+# else |
10217 |
+# define _GL_ARG_NONNULL(params) |
10218 |
+# endif |
10219 |
+#endif |
10220 |
|
10221 |
/* The definition of _GL_WARN_ON_USE is copied here. */ |
10222 |
+/* A C macro for emitting warnings if a function is used. |
10223 |
+ Copyright (C) 2010-2022 Free Software Foundation, Inc. |
10224 |
+ |
10225 |
+ This program is free software: you can redistribute it and/or modify it |
10226 |
+ under the terms of the GNU Lesser General Public License as published |
10227 |
+ by the Free Software Foundation; either version 2 of the License, or |
10228 |
+ (at your option) any later version. |
10229 |
+ |
10230 |
+ This program is distributed in the hope that it will be useful, |
10231 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
10232 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
10233 |
+ Lesser General Public License for more details. |
10234 |
+ |
10235 |
+ You should have received a copy of the GNU Lesser General Public License |
10236 |
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
10237 |
+ |
10238 |
+/* _GL_WARN_ON_USE (function, "literal string") issues a declaration |
10239 |
+ for FUNCTION which will then trigger a compiler warning containing |
10240 |
+ the text of "literal string" anywhere that function is called, if |
10241 |
+ supported by the compiler. If the compiler does not support this |
10242 |
+ feature, the macro expands to an unused extern declaration. |
10243 |
+ |
10244 |
+ _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the |
10245 |
+ attribute used in _GL_WARN_ON_USE. If the compiler does not support |
10246 |
+ this feature, it expands to empty. |
10247 |
+ |
10248 |
+ These macros are useful for marking a function as a potential |
10249 |
+ portability trap, with the intent that "literal string" include |
10250 |
+ instructions on the replacement function that should be used |
10251 |
+ instead. |
10252 |
+ _GL_WARN_ON_USE is for functions with 'extern' linkage. |
10253 |
+ _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline' |
10254 |
+ linkage. |
10255 |
+ |
10256 |
+ However, one of the reasons that a function is a portability trap is |
10257 |
+ if it has the wrong signature. Declaring FUNCTION with a different |
10258 |
+ signature in C is a compilation error, so this macro must use the |
10259 |
+ same type as any existing declaration so that programs that avoid |
10260 |
+ the problematic FUNCTION do not fail to compile merely because they |
10261 |
+ included a header that poisoned the function. But this implies that |
10262 |
+ _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already |
10263 |
+ have a declaration. Use of this macro implies that there must not |
10264 |
+ be any other macro hiding the declaration of FUNCTION; but |
10265 |
+ undefining FUNCTION first is part of the poisoning process anyway |
10266 |
+ (although for symbols that are provided only via a macro, the result |
10267 |
+ is a compilation error rather than a warning containing |
10268 |
+ "literal string"). Also note that in C++, it is only safe to use if |
10269 |
+ FUNCTION has no overloads. |
10270 |
+ |
10271 |
+ For an example, it is possible to poison 'getline' by: |
10272 |
+ - adding a call to gl_WARN_ON_USE_PREPARE([[#include <stdio.h>]], |
10273 |
+ [getline]) in configure.ac, which potentially defines |
10274 |
+ HAVE_RAW_DECL_GETLINE |
10275 |
+ - adding this code to a header that wraps the system <stdio.h>: |
10276 |
+ #undef getline |
10277 |
+ #if HAVE_RAW_DECL_GETLINE |
10278 |
+ _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" |
10279 |
+ "not universally present; use the gnulib module getline"); |
10280 |
+ #endif |
10281 |
+ |
10282 |
+ It is not possible to directly poison global variables. But it is |
10283 |
+ possible to write a wrapper accessor function, and poison that |
10284 |
+ (less common usage, like &environ, will cause a compilation error |
10285 |
+ rather than issue the nice warning, but the end result of informing |
10286 |
+ the developer about their portability problem is still achieved): |
10287 |
+ #if HAVE_RAW_DECL_ENVIRON |
10288 |
+ static char *** |
10289 |
+ rpl_environ (void) { return &environ; } |
10290 |
+ _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); |
10291 |
+ # undef environ |
10292 |
+ # define environ (*rpl_environ ()) |
10293 |
+ #endif |
10294 |
+ or better (avoiding contradictory use of 'static' and 'extern'): |
10295 |
+ #if HAVE_RAW_DECL_ENVIRON |
10296 |
+ static char *** |
10297 |
+ _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared") |
10298 |
+ rpl_environ (void) { return &environ; } |
10299 |
+ # undef environ |
10300 |
+ # define environ (*rpl_environ ()) |
10301 |
+ #endif |
10302 |
+ */ |
10303 |
+#ifndef _GL_WARN_ON_USE |
10304 |
+ |
10305 |
+# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) |
10306 |
+/* A compiler attribute is available in gcc versions 4.3.0 and later. */ |
10307 |
+# define _GL_WARN_ON_USE(function, message) \ |
10308 |
+_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) |
10309 |
+# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ |
10310 |
+ __attribute__ ((__warning__ (message))) |
10311 |
+# elif __clang_major__ >= 4 |
10312 |
+/* Another compiler attribute is available in clang. */ |
10313 |
+# define _GL_WARN_ON_USE(function, message) \ |
10314 |
+_GL_WARN_EXTERN_C __typeof__ (function) function \ |
10315 |
+ __attribute__ ((__diagnose_if__ (1, message, "warning"))) |
10316 |
+# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ |
10317 |
+ __attribute__ ((__diagnose_if__ (1, message, "warning"))) |
10318 |
+# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING |
10319 |
+/* Verify the existence of the function. */ |
10320 |
+# define _GL_WARN_ON_USE(function, message) \ |
10321 |
+_GL_WARN_EXTERN_C __typeof__ (function) function |
10322 |
+# define _GL_WARN_ON_USE_ATTRIBUTE(message) |
10323 |
+# else /* Unsupported. */ |
10324 |
+# define _GL_WARN_ON_USE(function, message) \ |
10325 |
+_GL_WARN_EXTERN_C int _gl_warn_on_use |
10326 |
+# define _GL_WARN_ON_USE_ATTRIBUTE(message) |
10327 |
+# endif |
10328 |
+#endif |
10329 |
+ |
10330 |
+/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") |
10331 |
+ is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the |
10332 |
+ function is declared with the given prototype, consisting of return type, |
10333 |
+ parameters, and attributes. |
10334 |
+ This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does |
10335 |
+ not work in this case. */ |
10336 |
+#ifndef _GL_WARN_ON_USE_CXX |
10337 |
+# if !defined __cplusplus |
10338 |
+# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ |
10339 |
+ _GL_WARN_ON_USE (function, msg) |
10340 |
+# else |
10341 |
+# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) |
10342 |
+/* A compiler attribute is available in gcc versions 4.3.0 and later. */ |
10343 |
+# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ |
10344 |
+extern rettype_gcc function parameters_and_attributes \ |
10345 |
+ __attribute__ ((__warning__ (msg))) |
10346 |
+# elif __clang_major__ >= 4 |
10347 |
+/* Another compiler attribute is available in clang. */ |
10348 |
+# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ |
10349 |
+extern rettype_clang function parameters_and_attributes \ |
10350 |
+ __attribute__ ((__diagnose_if__ (1, msg, "warning"))) |
10351 |
+# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING |
10352 |
+/* Verify the existence of the function. */ |
10353 |
+# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ |
10354 |
+extern rettype_gcc function parameters_and_attributes |
10355 |
+# else /* Unsupported. */ |
10356 |
+# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ |
10357 |
+_GL_WARN_EXTERN_C int _gl_warn_on_use |
10358 |
+# endif |
10359 |
+# endif |
10360 |
+#endif |
10361 |
+ |
10362 |
+/* _GL_WARN_EXTERN_C declaration; |
10363 |
+ performs the declaration with C linkage. */ |
10364 |
+#ifndef _GL_WARN_EXTERN_C |
10365 |
+# if defined __cplusplus |
10366 |
+# define _GL_WARN_EXTERN_C extern "C" |
10367 |
+# else |
10368 |
+# define _GL_WARN_EXTERN_C extern |
10369 |
+# endif |
10370 |
+#endif |
10371 |
|
10372 |
|
10373 |
/* Some systems do not define EXIT_*, despite otherwise supporting C89. */ |
10374 |
@@ -161,10 +713,10 @@ struct random_data |
10375 |
#endif |
10376 |
|
10377 |
|
10378 |
-#if @GNULIB__EXIT@ |
10379 |
+#if 0 |
10380 |
/* Terminate the current process with the given return code, without running |
10381 |
the 'atexit' handlers. */ |
10382 |
-# if !@HAVE__EXIT@ |
10383 |
+# if !1 |
10384 |
_GL_FUNCDECL_SYS (_Exit, _Noreturn void, (int status)); |
10385 |
# endif |
10386 |
_GL_CXXALIAS_SYS (_Exit, void, (int status)); |
10387 |
@@ -178,13 +730,17 @@ _GL_WARN_ON_USE (_Exit, "_Exit is unportable - " |
10388 |
#endif |
10389 |
|
10390 |
|
10391 |
-#if @GNULIB_FREE_POSIX@ |
10392 |
-# if @REPLACE_FREE@ |
10393 |
+#if 1 |
10394 |
+# if 0 |
10395 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
10396 |
# undef free |
10397 |
# define free rpl_free |
10398 |
# endif |
10399 |
+# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) |
10400 |
+_GL_FUNCDECL_RPL (free, void, (void *ptr) throw ()); |
10401 |
+# else |
10402 |
_GL_FUNCDECL_RPL (free, void, (void *ptr)); |
10403 |
+# endif |
10404 |
_GL_CXXALIAS_RPL (free, void, (void *ptr)); |
10405 |
# else |
10406 |
_GL_CXXALIAS_SYS (free, void, (void *ptr)); |
10407 |
@@ -201,8 +757,8 @@ _GL_WARN_ON_USE (free, "free is not future POSIX compliant everywhere - " |
10408 |
|
10409 |
|
10410 |
/* Allocate memory with indefinite extent and specified alignment. */ |
10411 |
-#if @GNULIB_ALIGNED_ALLOC@ |
10412 |
-# if @REPLACE_ALIGNED_ALLOC@ |
10413 |
+#if 0 |
10414 |
+# if 0 |
10415 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
10416 |
# undef aligned_alloc |
10417 |
# define aligned_alloc rpl_aligned_alloc |
10418 |
@@ -212,7 +768,7 @@ _GL_FUNCDECL_RPL (aligned_alloc, void *, |
10419 |
_GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); |
10420 |
_GL_CXXALIAS_RPL (aligned_alloc, void *, (size_t alignment, size_t size)); |
10421 |
# else |
10422 |
-# if @HAVE_ALIGNED_ALLOC@ |
10423 |
+# if 1 |
10424 |
# if __GNUC__ >= 11 |
10425 |
/* For -Wmismatched-dealloc: Associate aligned_alloc with free or rpl_free. */ |
10426 |
_GL_FUNCDECL_SYS (aligned_alloc, void *, |
10427 |
@@ -222,11 +778,11 @@ _GL_FUNCDECL_SYS (aligned_alloc, void *, |
10428 |
_GL_CXXALIAS_SYS (aligned_alloc, void *, (size_t alignment, size_t size)); |
10429 |
# endif |
10430 |
# endif |
10431 |
-# if @HAVE_ALIGNED_ALLOC@ |
10432 |
+# if 1 |
10433 |
_GL_CXXALIASWARN (aligned_alloc); |
10434 |
# endif |
10435 |
#else |
10436 |
-# if @GNULIB_FREE_POSIX@ && __GNUC__ >= 11 && !defined aligned_alloc |
10437 |
+# if 1 && __GNUC__ >= 11 && !defined aligned_alloc |
10438 |
/* For -Wmismatched-dealloc: Associate aligned_alloc with free or rpl_free. */ |
10439 |
_GL_FUNCDECL_SYS (aligned_alloc, void *, |
10440 |
(size_t alignment, size_t size) |
10441 |
@@ -241,10 +797,10 @@ _GL_WARN_ON_USE (aligned_alloc, "aligned_alloc is not portable - " |
10442 |
# endif |
10443 |
#endif |
10444 |
|
10445 |
-#if @GNULIB_ATOLL@ |
10446 |
+#if 0 |
10447 |
/* Parse a signed decimal integer. |
10448 |
Returns the value of the integer. Errors are not detected. */ |
10449 |
-# if !@HAVE_ATOLL@ |
10450 |
+# if !1 |
10451 |
_GL_FUNCDECL_SYS (atoll, long long, (const char *string) |
10452 |
_GL_ATTRIBUTE_PURE |
10453 |
_GL_ARG_NONNULL ((1))); |
10454 |
@@ -259,9 +815,9 @@ _GL_WARN_ON_USE (atoll, "atoll is unportable - " |
10455 |
# endif |
10456 |
#endif |
10457 |
|
10458 |
-#if @GNULIB_CALLOC_POSIX@ |
10459 |
-# if (@GNULIB_CALLOC_POSIX@ && @REPLACE_CALLOC_FOR_CALLOC_POSIX@) \ |
10460 |
- || (@GNULIB_CALLOC_GNU@ && @REPLACE_CALLOC_FOR_CALLOC_GNU@) |
10461 |
+#if 1 |
10462 |
+# if (1 && 1) \ |
10463 |
+ || (1 && 1) |
10464 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
10465 |
# undef calloc |
10466 |
# define calloc rpl_calloc |
10467 |
@@ -283,7 +839,7 @@ _GL_CXXALIAS_SYS (calloc, void *, (size_t nmemb, size_t size)); |
10468 |
_GL_CXXALIASWARN (calloc); |
10469 |
# endif |
10470 |
#else |
10471 |
-# if @GNULIB_FREE_POSIX@ && __GNUC__ >= 11 && !defined calloc |
10472 |
+# if 1 && __GNUC__ >= 11 && !defined calloc |
10473 |
/* For -Wmismatched-dealloc: Associate calloc with free or rpl_free. */ |
10474 |
_GL_FUNCDECL_SYS (calloc, void *, |
10475 |
(size_t nmemb, size_t size) |
10476 |
@@ -297,8 +853,8 @@ _GL_WARN_ON_USE (calloc, "calloc is not POSIX compliant everywhere - " |
10477 |
# endif |
10478 |
#endif |
10479 |
|
10480 |
-#if @GNULIB_CANONICALIZE_FILE_NAME@ |
10481 |
-# if @REPLACE_CANONICALIZE_FILE_NAME@ |
10482 |
+#if 1 |
10483 |
+# if 0 |
10484 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
10485 |
# define canonicalize_file_name rpl_canonicalize_file_name |
10486 |
# endif |
10487 |
@@ -308,7 +864,7 @@ _GL_FUNCDECL_RPL (canonicalize_file_name, char *, |
10488 |
_GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); |
10489 |
_GL_CXXALIAS_RPL (canonicalize_file_name, char *, (const char *name)); |
10490 |
# else |
10491 |
-# if !@HAVE_CANONICALIZE_FILE_NAME@ || __GNUC__ >= 11 |
10492 |
+# if !1 || __GNUC__ >= 11 |
10493 |
_GL_FUNCDECL_SYS (canonicalize_file_name, char *, |
10494 |
(const char *name) |
10495 |
_GL_ARG_NONNULL ((1)) |
10496 |
@@ -318,11 +874,11 @@ _GL_CXXALIAS_SYS (canonicalize_file_name, char *, (const char *name)); |
10497 |
# endif |
10498 |
# ifndef GNULIB_defined_canonicalize_file_name |
10499 |
# define GNULIB_defined_canonicalize_file_name \ |
10500 |
- (!@HAVE_CANONICALIZE_FILE_NAME@ || @REPLACE_CANONICALIZE_FILE_NAME@) |
10501 |
+ (!1 || 0) |
10502 |
# endif |
10503 |
_GL_CXXALIASWARN (canonicalize_file_name); |
10504 |
#else |
10505 |
-# if @GNULIB_FREE_POSIX@ && __GNUC__ >= 11 && !defined canonicalize_file_name |
10506 |
+# if 1 && __GNUC__ >= 11 && !defined canonicalize_file_name |
10507 |
/* For -Wmismatched-dealloc: Associate canonicalize_file_name with free or |
10508 |
rpl_free. */ |
10509 |
_GL_FUNCDECL_SYS (canonicalize_file_name, char *, |
10510 |
@@ -340,7 +896,7 @@ _GL_WARN_ON_USE (canonicalize_file_name, |
10511 |
# endif |
10512 |
#endif |
10513 |
|
10514 |
-#if @GNULIB_MDA_ECVT@ |
10515 |
+#if 1 |
10516 |
/* On native Windows, map 'ecvt' to '_ecvt', so that -loldnames is not |
10517 |
required. In C++ with GNULIB_NAMESPACE, avoid differences between |
10518 |
platforms by defining GNULIB_NAMESPACE::ecvt on all platforms that have |
10519 |
@@ -353,17 +909,17 @@ _GL_WARN_ON_USE (canonicalize_file_name, |
10520 |
_GL_CXXALIAS_MDA (ecvt, char *, |
10521 |
(double number, int ndigits, int *decptp, int *signp)); |
10522 |
# else |
10523 |
-# if @HAVE_DECL_ECVT@ |
10524 |
+# if 1 |
10525 |
_GL_CXXALIAS_SYS (ecvt, char *, |
10526 |
(double number, int ndigits, int *decptp, int *signp)); |
10527 |
# endif |
10528 |
# endif |
10529 |
-# if (defined _WIN32 && !defined __CYGWIN__) || @HAVE_DECL_ECVT@ |
10530 |
+# if (defined _WIN32 && !defined __CYGWIN__) || 1 |
10531 |
_GL_CXXALIASWARN (ecvt); |
10532 |
# endif |
10533 |
#endif |
10534 |
|
10535 |
-#if @GNULIB_MDA_FCVT@ |
10536 |
+#if 1 |
10537 |
/* On native Windows, map 'fcvt' to '_fcvt', so that -loldnames is not |
10538 |
required. In C++ with GNULIB_NAMESPACE, avoid differences between |
10539 |
platforms by defining GNULIB_NAMESPACE::fcvt on all platforms that have |
10540 |
@@ -376,17 +932,17 @@ _GL_CXXALIASWARN (ecvt); |
10541 |
_GL_CXXALIAS_MDA (fcvt, char *, |
10542 |
(double number, int ndigits, int *decptp, int *signp)); |
10543 |
# else |
10544 |
-# if @HAVE_DECL_FCVT@ |
10545 |
+# if 1 |
10546 |
_GL_CXXALIAS_SYS (fcvt, char *, |
10547 |
(double number, int ndigits, int *decptp, int *signp)); |
10548 |
# endif |
10549 |
# endif |
10550 |
-# if (defined _WIN32 && !defined __CYGWIN__) || @HAVE_DECL_FCVT@ |
10551 |
+# if (defined _WIN32 && !defined __CYGWIN__) || 1 |
10552 |
_GL_CXXALIASWARN (fcvt); |
10553 |
# endif |
10554 |
#endif |
10555 |
|
10556 |
-#if @GNULIB_MDA_GCVT@ |
10557 |
+#if 1 |
10558 |
/* On native Windows, map 'gcvt' to '_gcvt', so that -loldnames is not |
10559 |
required. In C++ with GNULIB_NAMESPACE, avoid differences between |
10560 |
platforms by defining GNULIB_NAMESPACE::gcvt on all platforms that have |
10561 |
@@ -398,21 +954,21 @@ _GL_CXXALIASWARN (fcvt); |
10562 |
# endif |
10563 |
_GL_CXXALIAS_MDA (gcvt, char *, (double number, int ndigits, char *buf)); |
10564 |
# else |
10565 |
-# if @HAVE_DECL_GCVT@ |
10566 |
+# if 1 |
10567 |
_GL_CXXALIAS_SYS (gcvt, char *, (double number, int ndigits, char *buf)); |
10568 |
# endif |
10569 |
# endif |
10570 |
-# if (defined _WIN32 && !defined __CYGWIN__) || @HAVE_DECL_GCVT@ |
10571 |
+# if (defined _WIN32 && !defined __CYGWIN__) || 1 |
10572 |
_GL_CXXALIASWARN (gcvt); |
10573 |
# endif |
10574 |
#endif |
10575 |
|
10576 |
-#if @GNULIB_GETLOADAVG@ |
10577 |
+#if 0 |
10578 |
/* Store max(NELEM,3) load average numbers in LOADAVG[]. |
10579 |
The three numbers are the load average of the last 1 minute, the last 5 |
10580 |
minutes, and the last 15 minutes, respectively. |
10581 |
LOADAVG is an array of NELEM numbers. */ |
10582 |
-# if !@HAVE_DECL_GETLOADAVG@ |
10583 |
+# if !1 |
10584 |
_GL_FUNCDECL_SYS (getloadavg, int, (double loadavg[], int nelem) |
10585 |
_GL_ARG_NONNULL ((1))); |
10586 |
# endif |
10587 |
@@ -426,7 +982,7 @@ _GL_WARN_ON_USE (getloadavg, "getloadavg is not portable - " |
10588 |
# endif |
10589 |
#endif |
10590 |
|
10591 |
-#if @GNULIB_GETSUBOPT@ |
10592 |
+#if 0 |
10593 |
/* Assuming *OPTIONP is a comma separated list of elements of the form |
10594 |
"token" or "token=value", getsubopt parses the first of these elements. |
10595 |
If the first element refers to a "token" that is member of the given |
10596 |
@@ -438,7 +994,7 @@ _GL_WARN_ON_USE (getloadavg, "getloadavg is not portable - " |
10597 |
Otherwise it returns -1, and *OPTIONP and *VALUEP are undefined. |
10598 |
For more details see the POSIX specification. |
10599 |
https://pubs.opengroup.org/onlinepubs/9699919799/functions/getsubopt.html */ |
10600 |
-# if !@HAVE_GETSUBOPT@ |
10601 |
+# if !1 |
10602 |
_GL_FUNCDECL_SYS (getsubopt, int, |
10603 |
(char **optionp, char *const *tokens, char **valuep) |
10604 |
_GL_ARG_NONNULL ((1, 2, 3))); |
10605 |
@@ -454,10 +1010,10 @@ _GL_WARN_ON_USE (getsubopt, "getsubopt is unportable - " |
10606 |
# endif |
10607 |
#endif |
10608 |
|
10609 |
-#if @GNULIB_GRANTPT@ |
10610 |
+#if 0 |
10611 |
/* Change the ownership and access permission of the slave side of the |
10612 |
pseudo-terminal whose master side is specified by FD. */ |
10613 |
-# if !@HAVE_GRANTPT@ |
10614 |
+# if !1 |
10615 |
_GL_FUNCDECL_SYS (grantpt, int, (int fd)); |
10616 |
# endif |
10617 |
_GL_CXXALIAS_SYS (grantpt, int, (int fd)); |
10618 |
@@ -474,9 +1030,9 @@ _GL_WARN_ON_USE (grantpt, "grantpt is not portable - " |
10619 |
rely on GNU or POSIX semantics for malloc and realloc (for example, |
10620 |
by never specifying a zero size), so it does not need malloc or |
10621 |
realloc to be redefined. */ |
10622 |
-#if @GNULIB_MALLOC_POSIX@ |
10623 |
-# if (@GNULIB_MALLOC_POSIX@ && @REPLACE_MALLOC_FOR_MALLOC_POSIX@) \ |
10624 |
- || (@GNULIB_MALLOC_GNU@ && @REPLACE_MALLOC_FOR_MALLOC_GNU@) |
10625 |
+#if 1 |
10626 |
+# if (1 && 1) \ |
10627 |
+ || (1 && 1) |
10628 |
# if !((defined __cplusplus && defined GNULIB_NAMESPACE) \ |
10629 |
|| _GL_USE_STDLIB_ALLOC) |
10630 |
# undef malloc |
10631 |
@@ -499,7 +1055,7 @@ _GL_CXXALIAS_SYS (malloc, void *, (size_t size)); |
10632 |
_GL_CXXALIASWARN (malloc); |
10633 |
# endif |
10634 |
#else |
10635 |
-# if @GNULIB_FREE_POSIX@ && __GNUC__ >= 11 && !defined malloc |
10636 |
+# if 1 && __GNUC__ >= 11 && !defined malloc |
10637 |
/* For -Wmismatched-dealloc: Associate malloc with free or rpl_free. */ |
10638 |
_GL_FUNCDECL_SYS (malloc, void *, |
10639 |
(size_t size) |
10640 |
@@ -514,8 +1070,8 @@ _GL_WARN_ON_USE (malloc, "malloc is not POSIX compliant everywhere - " |
10641 |
#endif |
10642 |
|
10643 |
/* Convert a multibyte character to a wide character. */ |
10644 |
-#if @GNULIB_MBTOWC@ |
10645 |
-# if @REPLACE_MBTOWC@ |
10646 |
+#if 0 |
10647 |
+# if 0 |
10648 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
10649 |
# undef mbtowc |
10650 |
# define mbtowc rpl_mbtowc |
10651 |
@@ -525,7 +1081,7 @@ _GL_FUNCDECL_RPL (mbtowc, int, |
10652 |
_GL_CXXALIAS_RPL (mbtowc, int, |
10653 |
(wchar_t *restrict pwc, const char *restrict s, size_t n)); |
10654 |
# else |
10655 |
-# if !@HAVE_MBTOWC@ |
10656 |
+# if !1 |
10657 |
_GL_FUNCDECL_SYS (mbtowc, int, |
10658 |
(wchar_t *restrict pwc, const char *restrict s, size_t n)); |
10659 |
# endif |
10660 |
@@ -543,13 +1099,13 @@ _GL_WARN_ON_USE (mbtowc, "mbtowc is not portable - " |
10661 |
# endif |
10662 |
#endif |
10663 |
|
10664 |
-#if @GNULIB_MKDTEMP@ |
10665 |
+#if 0 |
10666 |
/* Create a unique temporary directory from TEMPLATE. |
10667 |
The last six characters of TEMPLATE must be "XXXXXX"; |
10668 |
they are replaced with a string that makes the directory name unique. |
10669 |
Returns TEMPLATE, or a null pointer if it cannot get a unique name. |
10670 |
The directory is created mode 700. */ |
10671 |
-# if !@HAVE_MKDTEMP@ |
10672 |
+# if !1 |
10673 |
_GL_FUNCDECL_SYS (mkdtemp, char *, (char * /*template*/) _GL_ARG_NONNULL ((1))); |
10674 |
# endif |
10675 |
_GL_CXXALIAS_SYS (mkdtemp, char *, (char * /*template*/)); |
10676 |
@@ -562,7 +1118,7 @@ _GL_WARN_ON_USE (mkdtemp, "mkdtemp is unportable - " |
10677 |
# endif |
10678 |
#endif |
10679 |
|
10680 |
-#if @GNULIB_MKOSTEMP@ |
10681 |
+#if 0 |
10682 |
/* Create a unique temporary file from TEMPLATE. |
10683 |
The last six characters of TEMPLATE must be "XXXXXX"; |
10684 |
they are replaced with a string that makes the file name unique. |
10685 |
@@ -575,7 +1131,7 @@ _GL_WARN_ON_USE (mkdtemp, "mkdtemp is unportable - " |
10686 |
implementation. |
10687 |
Returns the open file descriptor if successful, otherwise -1 and errno |
10688 |
set. */ |
10689 |
-# if !@HAVE_MKOSTEMP@ |
10690 |
+# if !1 |
10691 |
_GL_FUNCDECL_SYS (mkostemp, int, (char * /*template*/, int /*flags*/) |
10692 |
_GL_ARG_NONNULL ((1))); |
10693 |
# endif |
10694 |
@@ -589,7 +1145,7 @@ _GL_WARN_ON_USE (mkostemp, "mkostemp is unportable - " |
10695 |
# endif |
10696 |
#endif |
10697 |
|
10698 |
-#if @GNULIB_MKOSTEMPS@ |
10699 |
+#if 0 |
10700 |
/* Create a unique temporary file from TEMPLATE. |
10701 |
The last six characters of TEMPLATE before a suffix of length |
10702 |
SUFFIXLEN must be "XXXXXX"; |
10703 |
@@ -603,7 +1159,7 @@ _GL_WARN_ON_USE (mkostemp, "mkostemp is unportable - " |
10704 |
implementation. |
10705 |
Returns the open file descriptor if successful, otherwise -1 and errno |
10706 |
set. */ |
10707 |
-# if !@HAVE_MKOSTEMPS@ |
10708 |
+# if !1 |
10709 |
_GL_FUNCDECL_SYS (mkostemps, int, |
10710 |
(char * /*template*/, int /*suffixlen*/, int /*flags*/) |
10711 |
_GL_ARG_NONNULL ((1))); |
10712 |
@@ -619,7 +1175,7 @@ _GL_WARN_ON_USE (mkostemps, "mkostemps is unportable - " |
10713 |
# endif |
10714 |
#endif |
10715 |
|
10716 |
-#if @GNULIB_MKSTEMP@ |
10717 |
+#if 0 |
10718 |
/* Create a unique temporary file from TEMPLATE. |
10719 |
The last six characters of TEMPLATE must be "XXXXXX"; |
10720 |
they are replaced with a string that makes the file name unique. |
10721 |
@@ -629,14 +1185,14 @@ _GL_WARN_ON_USE (mkostemps, "mkostemps is unportable - " |
10722 |
implementation. |
10723 |
Returns the open file descriptor if successful, otherwise -1 and errno |
10724 |
set. */ |
10725 |
-# if @REPLACE_MKSTEMP@ |
10726 |
+# if 0 |
10727 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
10728 |
# define mkstemp rpl_mkstemp |
10729 |
# endif |
10730 |
_GL_FUNCDECL_RPL (mkstemp, int, (char * /*template*/) _GL_ARG_NONNULL ((1))); |
10731 |
_GL_CXXALIAS_RPL (mkstemp, int, (char * /*template*/)); |
10732 |
# else |
10733 |
-# if ! @HAVE_MKSTEMP@ |
10734 |
+# if ! 1 |
10735 |
_GL_FUNCDECL_SYS (mkstemp, int, (char * /*template*/) _GL_ARG_NONNULL ((1))); |
10736 |
# endif |
10737 |
_GL_CXXALIAS_SYS (mkstemp, int, (char * /*template*/)); |
10738 |
@@ -650,7 +1206,7 @@ _GL_WARN_ON_USE (mkstemp, "mkstemp is unportable - " |
10739 |
# endif |
10740 |
#endif |
10741 |
|
10742 |
-#if @GNULIB_MKSTEMPS@ |
10743 |
+#if 0 |
10744 |
/* Create a unique temporary file from TEMPLATE. |
10745 |
The last six characters of TEMPLATE prior to a suffix of length |
10746 |
SUFFIXLEN must be "XXXXXX"; |
10747 |
@@ -661,7 +1217,7 @@ _GL_WARN_ON_USE (mkstemp, "mkstemp is unportable - " |
10748 |
implementation. |
10749 |
Returns the open file descriptor if successful, otherwise -1 and errno |
10750 |
set. */ |
10751 |
-# if !@HAVE_MKSTEMPS@ |
10752 |
+# if !1 |
10753 |
_GL_FUNCDECL_SYS (mkstemps, int, (char * /*template*/, int /*suffixlen*/) |
10754 |
_GL_ARG_NONNULL ((1))); |
10755 |
# endif |
10756 |
@@ -675,7 +1231,7 @@ _GL_WARN_ON_USE (mkstemps, "mkstemps is unportable - " |
10757 |
# endif |
10758 |
#endif |
10759 |
|
10760 |
-#if @GNULIB_MDA_MKTEMP@ |
10761 |
+#if 1 |
10762 |
/* On native Windows, map 'mktemp' to '_mktemp', so that -loldnames is not |
10763 |
required. In C++ with GNULIB_NAMESPACE, avoid differences between |
10764 |
platforms by defining GNULIB_NAMESPACE::mktemp always. */ |
10765 |
@@ -692,8 +1248,8 @@ _GL_CXXALIASWARN (mktemp); |
10766 |
#endif |
10767 |
|
10768 |
/* Allocate memory with indefinite extent and specified alignment. */ |
10769 |
-#if @GNULIB_POSIX_MEMALIGN@ |
10770 |
-# if @REPLACE_POSIX_MEMALIGN@ |
10771 |
+#if 0 |
10772 |
+# if 0 |
10773 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
10774 |
# undef posix_memalign |
10775 |
# define posix_memalign rpl_posix_memalign |
10776 |
@@ -704,12 +1260,12 @@ _GL_FUNCDECL_RPL (posix_memalign, int, |
10777 |
_GL_CXXALIAS_RPL (posix_memalign, int, |
10778 |
(void **memptr, size_t alignment, size_t size)); |
10779 |
# else |
10780 |
-# if @HAVE_POSIX_MEMALIGN@ |
10781 |
+# if 1 |
10782 |
_GL_CXXALIAS_SYS (posix_memalign, int, |
10783 |
(void **memptr, size_t alignment, size_t size)); |
10784 |
# endif |
10785 |
# endif |
10786 |
-# if @HAVE_POSIX_MEMALIGN@ |
10787 |
+# if 1 |
10788 |
_GL_CXXALIASWARN (posix_memalign); |
10789 |
# endif |
10790 |
#elif defined GNULIB_POSIXCHECK |
10791 |
@@ -720,10 +1276,10 @@ _GL_WARN_ON_USE (posix_memalign, "posix_memalign is not portable - " |
10792 |
# endif |
10793 |
#endif |
10794 |
|
10795 |
-#if @GNULIB_POSIX_OPENPT@ |
10796 |
+#if 0 |
10797 |
/* Return an FD open to the master side of a pseudo-terminal. Flags should |
10798 |
include O_RDWR, and may also include O_NOCTTY. */ |
10799 |
-# if !@HAVE_POSIX_OPENPT@ |
10800 |
+# if !1 |
10801 |
_GL_FUNCDECL_SYS (posix_openpt, int, (int flags)); |
10802 |
# endif |
10803 |
_GL_CXXALIAS_SYS (posix_openpt, int, (int flags)); |
10804 |
@@ -736,10 +1292,10 @@ _GL_WARN_ON_USE (posix_openpt, "posix_openpt is not portable - " |
10805 |
# endif |
10806 |
#endif |
10807 |
|
10808 |
-#if @GNULIB_PTSNAME@ |
10809 |
+#if 0 |
10810 |
/* Return the pathname of the pseudo-terminal slave associated with |
10811 |
the master FD is open on, or NULL on errors. */ |
10812 |
-# if @REPLACE_PTSNAME@ |
10813 |
+# if 0 |
10814 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
10815 |
# undef ptsname |
10816 |
# define ptsname rpl_ptsname |
10817 |
@@ -747,7 +1303,7 @@ _GL_WARN_ON_USE (posix_openpt, "posix_openpt is not portable - " |
10818 |
_GL_FUNCDECL_RPL (ptsname, char *, (int fd)); |
10819 |
_GL_CXXALIAS_RPL (ptsname, char *, (int fd)); |
10820 |
# else |
10821 |
-# if !@HAVE_PTSNAME@ |
10822 |
+# if !1 |
10823 |
_GL_FUNCDECL_SYS (ptsname, char *, (int fd)); |
10824 |
# endif |
10825 |
_GL_CXXALIAS_SYS (ptsname, char *, (int fd)); |
10826 |
@@ -761,11 +1317,11 @@ _GL_WARN_ON_USE (ptsname, "ptsname is not portable - " |
10827 |
# endif |
10828 |
#endif |
10829 |
|
10830 |
-#if @GNULIB_PTSNAME_R@ |
10831 |
+#if 0 |
10832 |
/* Set the pathname of the pseudo-terminal slave associated with |
10833 |
the master FD is open on and return 0, or set errno and return |
10834 |
non-zero on errors. */ |
10835 |
-# if @REPLACE_PTSNAME_R@ |
10836 |
+# if 0 |
10837 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
10838 |
# undef ptsname_r |
10839 |
# define ptsname_r rpl_ptsname_r |
10840 |
@@ -773,13 +1329,13 @@ _GL_WARN_ON_USE (ptsname, "ptsname is not portable - " |
10841 |
_GL_FUNCDECL_RPL (ptsname_r, int, (int fd, char *buf, size_t len)); |
10842 |
_GL_CXXALIAS_RPL (ptsname_r, int, (int fd, char *buf, size_t len)); |
10843 |
# else |
10844 |
-# if !@HAVE_PTSNAME_R@ |
10845 |
+# if !1 |
10846 |
_GL_FUNCDECL_SYS (ptsname_r, int, (int fd, char *buf, size_t len)); |
10847 |
# endif |
10848 |
_GL_CXXALIAS_SYS (ptsname_r, int, (int fd, char *buf, size_t len)); |
10849 |
# endif |
10850 |
# ifndef GNULIB_defined_ptsname_r |
10851 |
-# define GNULIB_defined_ptsname_r (!@HAVE_PTSNAME_R@ || @REPLACE_PTSNAME_R@) |
10852 |
+# define GNULIB_defined_ptsname_r (!1 || 0) |
10853 |
# endif |
10854 |
_GL_CXXALIASWARN (ptsname_r); |
10855 |
#elif defined GNULIB_POSIXCHECK |
10856 |
@@ -790,8 +1346,8 @@ _GL_WARN_ON_USE (ptsname_r, "ptsname_r is not portable - " |
10857 |
# endif |
10858 |
#endif |
10859 |
|
10860 |
-#if @GNULIB_PUTENV@ |
10861 |
-# if @REPLACE_PUTENV@ |
10862 |
+#if 0 |
10863 |
+# if 0 |
10864 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
10865 |
# undef putenv |
10866 |
# define putenv rpl_putenv |
10867 |
@@ -808,7 +1364,7 @@ _GL_CXXALIAS_MDA (putenv, int, (char *string)); |
10868 |
_GL_CXXALIAS_SYS (putenv, int, (char *string)); |
10869 |
# endif |
10870 |
_GL_CXXALIASWARN (putenv); |
10871 |
-#elif @GNULIB_MDA_PUTENV@ |
10872 |
+#elif 1 |
10873 |
/* On native Windows, map 'putenv' to '_putenv', so that -loldnames is not |
10874 |
required. In C++ with GNULIB_NAMESPACE, avoid differences between |
10875 |
platforms by defining GNULIB_NAMESPACE::putenv always. */ |
10876 |
@@ -826,7 +1382,7 @@ _GL_CXXALIAS_SYS (putenv, int, (char *string)); |
10877 |
_GL_CXXALIASWARN (putenv); |
10878 |
#endif |
10879 |
|
10880 |
-#if @GNULIB_QSORT_R@ |
10881 |
+#if 0 |
10882 |
/* Sort an array of NMEMB elements, starting at address BASE, each element |
10883 |
occupying SIZE bytes, in ascending order according to the comparison |
10884 |
function COMPARE. */ |
10885 |
@@ -840,7 +1396,7 @@ typedef int (*_gl_qsort_r_compar_fn) (void const *, void const *, void *); |
10886 |
# ifdef __cplusplus |
10887 |
} |
10888 |
# endif |
10889 |
-# if @REPLACE_QSORT_R@ |
10890 |
+# if 0 |
10891 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
10892 |
# undef qsort_r |
10893 |
# define qsort_r rpl_qsort_r |
10894 |
@@ -852,7 +1408,7 @@ _GL_CXXALIAS_RPL (qsort_r, void, (void *base, size_t nmemb, size_t size, |
10895 |
_gl_qsort_r_compar_fn compare, |
10896 |
void *arg)); |
10897 |
# else |
10898 |
-# if !@HAVE_QSORT_R@ |
10899 |
+# if !1 |
10900 |
_GL_FUNCDECL_SYS (qsort_r, void, (void *base, size_t nmemb, size_t size, |
10901 |
_gl_qsort_r_compar_fn compare, |
10902 |
void *arg) _GL_ARG_NONNULL ((1, 4))); |
10903 |
@@ -871,8 +1427,8 @@ _GL_WARN_ON_USE (qsort_r, "qsort_r is not portable - " |
10904 |
#endif |
10905 |
|
10906 |
|
10907 |
-#if @GNULIB_RANDOM_R@ |
10908 |
-# if !@HAVE_RANDOM_R@ |
10909 |
+#if 0 |
10910 |
+# if !1 |
10911 |
# ifndef RAND_MAX |
10912 |
# define RAND_MAX 2147483647 |
10913 |
# endif |
10914 |
@@ -880,8 +1436,8 @@ _GL_WARN_ON_USE (qsort_r, "qsort_r is not portable - " |
10915 |
#endif |
10916 |
|
10917 |
|
10918 |
-#if @GNULIB_RANDOM@ |
10919 |
-# if @REPLACE_RANDOM@ |
10920 |
+#if 0 |
10921 |
+# if 0 |
10922 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
10923 |
# undef random |
10924 |
# define random rpl_random |
10925 |
@@ -889,7 +1445,7 @@ _GL_WARN_ON_USE (qsort_r, "qsort_r is not portable - " |
10926 |
_GL_FUNCDECL_RPL (random, long, (void)); |
10927 |
_GL_CXXALIAS_RPL (random, long, (void)); |
10928 |
# else |
10929 |
-# if !@HAVE_RANDOM@ |
10930 |
+# if !1 |
10931 |
_GL_FUNCDECL_SYS (random, long, (void)); |
10932 |
# endif |
10933 |
/* Need to cast, because on Haiku, the return type is |
10934 |
@@ -905,8 +1461,8 @@ _GL_WARN_ON_USE (random, "random is unportable - " |
10935 |
# endif |
10936 |
#endif |
10937 |
|
10938 |
-#if @GNULIB_RANDOM@ |
10939 |
-# if @REPLACE_RANDOM@ |
10940 |
+#if 0 |
10941 |
+# if 0 |
10942 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
10943 |
# undef srandom |
10944 |
# define srandom rpl_srandom |
10945 |
@@ -914,7 +1470,7 @@ _GL_WARN_ON_USE (random, "random is unportable - " |
10946 |
_GL_FUNCDECL_RPL (srandom, void, (unsigned int seed)); |
10947 |
_GL_CXXALIAS_RPL (srandom, void, (unsigned int seed)); |
10948 |
# else |
10949 |
-# if !@HAVE_RANDOM@ |
10950 |
+# if !1 |
10951 |
_GL_FUNCDECL_SYS (srandom, void, (unsigned int seed)); |
10952 |
# endif |
10953 |
/* Need to cast, because on FreeBSD, the first parameter is |
10954 |
@@ -930,8 +1486,8 @@ _GL_WARN_ON_USE (srandom, "srandom is unportable - " |
10955 |
# endif |
10956 |
#endif |
10957 |
|
10958 |
-#if @GNULIB_RANDOM@ |
10959 |
-# if @REPLACE_INITSTATE@ |
10960 |
+#if 0 |
10961 |
+# if 0 |
10962 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
10963 |
# undef initstate |
10964 |
# define initstate rpl_initstate |
10965 |
@@ -942,7 +1498,7 @@ _GL_FUNCDECL_RPL (initstate, char *, |
10966 |
_GL_CXXALIAS_RPL (initstate, char *, |
10967 |
(unsigned int seed, char *buf, size_t buf_size)); |
10968 |
# else |
10969 |
-# if !@HAVE_INITSTATE@ || !@HAVE_DECL_INITSTATE@ |
10970 |
+# if !1 || !1 |
10971 |
_GL_FUNCDECL_SYS (initstate, char *, |
10972 |
(unsigned int seed, char *buf, size_t buf_size) |
10973 |
_GL_ARG_NONNULL ((2))); |
10974 |
@@ -961,8 +1517,8 @@ _GL_WARN_ON_USE (initstate, "initstate is unportable - " |
10975 |
# endif |
10976 |
#endif |
10977 |
|
10978 |
-#if @GNULIB_RANDOM@ |
10979 |
-# if @REPLACE_SETSTATE@ |
10980 |
+#if 0 |
10981 |
+# if 0 |
10982 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
10983 |
# undef setstate |
10984 |
# define setstate rpl_setstate |
10985 |
@@ -970,7 +1526,7 @@ _GL_WARN_ON_USE (initstate, "initstate is unportable - " |
10986 |
_GL_FUNCDECL_RPL (setstate, char *, (char *arg_state) _GL_ARG_NONNULL ((1))); |
10987 |
_GL_CXXALIAS_RPL (setstate, char *, (char *arg_state)); |
10988 |
# else |
10989 |
-# if !@HAVE_SETSTATE@ || !@HAVE_DECL_SETSTATE@ |
10990 |
+# if !1 || !1 |
10991 |
_GL_FUNCDECL_SYS (setstate, char *, (char *arg_state) _GL_ARG_NONNULL ((1))); |
10992 |
# endif |
10993 |
/* Need to cast, because on Mac OS X 10.13, HP-UX, Solaris the first parameter |
10994 |
@@ -987,8 +1543,8 @@ _GL_WARN_ON_USE (setstate, "setstate is unportable - " |
10995 |
#endif |
10996 |
|
10997 |
|
10998 |
-#if @GNULIB_RANDOM_R@ |
10999 |
-# if @REPLACE_RANDOM_R@ |
11000 |
+#if 0 |
11001 |
+# if 0 |
11002 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
11003 |
# undef random_r |
11004 |
# define random_r rpl_random_r |
11005 |
@@ -997,7 +1553,7 @@ _GL_FUNCDECL_RPL (random_r, int, (struct random_data *buf, int32_t *result) |
11006 |
_GL_ARG_NONNULL ((1, 2))); |
11007 |
_GL_CXXALIAS_RPL (random_r, int, (struct random_data *buf, int32_t *result)); |
11008 |
# else |
11009 |
-# if !@HAVE_RANDOM_R@ |
11010 |
+# if !1 |
11011 |
_GL_FUNCDECL_SYS (random_r, int, (struct random_data *buf, int32_t *result) |
11012 |
_GL_ARG_NONNULL ((1, 2))); |
11013 |
# endif |
11014 |
@@ -1012,8 +1568,8 @@ _GL_WARN_ON_USE (random_r, "random_r is unportable - " |
11015 |
# endif |
11016 |
#endif |
11017 |
|
11018 |
-#if @GNULIB_RANDOM_R@ |
11019 |
-# if @REPLACE_RANDOM_R@ |
11020 |
+#if 0 |
11021 |
+# if 0 |
11022 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
11023 |
# undef srandom_r |
11024 |
# define srandom_r rpl_srandom_r |
11025 |
@@ -1024,7 +1580,7 @@ _GL_FUNCDECL_RPL (srandom_r, int, |
11026 |
_GL_CXXALIAS_RPL (srandom_r, int, |
11027 |
(unsigned int seed, struct random_data *rand_state)); |
11028 |
# else |
11029 |
-# if !@HAVE_RANDOM_R@ |
11030 |
+# if !1 |
11031 |
_GL_FUNCDECL_SYS (srandom_r, int, |
11032 |
(unsigned int seed, struct random_data *rand_state) |
11033 |
_GL_ARG_NONNULL ((2))); |
11034 |
@@ -1041,8 +1597,8 @@ _GL_WARN_ON_USE (srandom_r, "srandom_r is unportable - " |
11035 |
# endif |
11036 |
#endif |
11037 |
|
11038 |
-#if @GNULIB_RANDOM_R@ |
11039 |
-# if @REPLACE_RANDOM_R@ |
11040 |
+#if 0 |
11041 |
+# if 0 |
11042 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
11043 |
# undef initstate_r |
11044 |
# define initstate_r rpl_initstate_r |
11045 |
@@ -1055,7 +1611,7 @@ _GL_CXXALIAS_RPL (initstate_r, int, |
11046 |
(unsigned int seed, char *buf, size_t buf_size, |
11047 |
struct random_data *rand_state)); |
11048 |
# else |
11049 |
-# if !@HAVE_RANDOM_R@ |
11050 |
+# if !1 |
11051 |
_GL_FUNCDECL_SYS (initstate_r, int, |
11052 |
(unsigned int seed, char *buf, size_t buf_size, |
11053 |
struct random_data *rand_state) |
11054 |
@@ -1076,8 +1632,8 @@ _GL_WARN_ON_USE (initstate_r, "initstate_r is unportable - " |
11055 |
# endif |
11056 |
#endif |
11057 |
|
11058 |
-#if @GNULIB_RANDOM_R@ |
11059 |
-# if @REPLACE_RANDOM_R@ |
11060 |
+#if 0 |
11061 |
+# if 0 |
11062 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
11063 |
# undef setstate_r |
11064 |
# define setstate_r rpl_setstate_r |
11065 |
@@ -1088,7 +1644,7 @@ _GL_FUNCDECL_RPL (setstate_r, int, |
11066 |
_GL_CXXALIAS_RPL (setstate_r, int, |
11067 |
(char *arg_state, struct random_data *rand_state)); |
11068 |
# else |
11069 |
-# if !@HAVE_RANDOM_R@ |
11070 |
+# if !1 |
11071 |
_GL_FUNCDECL_SYS (setstate_r, int, |
11072 |
(char *arg_state, struct random_data *rand_state) |
11073 |
_GL_ARG_NONNULL ((1, 2))); |
11074 |
@@ -1108,9 +1664,9 @@ _GL_WARN_ON_USE (setstate_r, "setstate_r is unportable - " |
11075 |
#endif |
11076 |
|
11077 |
|
11078 |
-#if @GNULIB_REALLOC_POSIX@ |
11079 |
-# if (@GNULIB_REALLOC_POSIX@ && @REPLACE_REALLOC_FOR_REALLOC_POSIX@) \ |
11080 |
- || (@GNULIB_REALLOC_GNU@ && @REPLACE_REALLOC_FOR_REALLOC_GNU@) |
11081 |
+#if 1 |
11082 |
+# if (1 && 1) \ |
11083 |
+ || (1 && 0) |
11084 |
# if !((defined __cplusplus && defined GNULIB_NAMESPACE) \ |
11085 |
|| _GL_USE_STDLIB_ALLOC) |
11086 |
# undef realloc |
11087 |
@@ -1131,7 +1687,7 @@ _GL_CXXALIAS_SYS (realloc, void *, (void *ptr, size_t size)); |
11088 |
_GL_CXXALIASWARN (realloc); |
11089 |
# endif |
11090 |
#else |
11091 |
-# if @GNULIB_FREE_POSIX@ && __GNUC__ >= 11 && !defined realloc |
11092 |
+# if 1 && __GNUC__ >= 11 && !defined realloc |
11093 |
/* For -Wmismatched-dealloc: Associate realloc with free or rpl_free. */ |
11094 |
_GL_FUNCDECL_SYS (realloc, void *, (void *ptr, size_t size) |
11095 |
_GL_ATTRIBUTE_DEALLOC_FREE); |
11096 |
@@ -1145,8 +1701,8 @@ _GL_WARN_ON_USE (realloc, "realloc is not POSIX compliant everywhere - " |
11097 |
#endif |
11098 |
|
11099 |
|
11100 |
-#if @GNULIB_REALLOCARRAY@ |
11101 |
-# if @REPLACE_REALLOCARRAY@ |
11102 |
+#if 1 |
11103 |
+# if 0 |
11104 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
11105 |
# undef reallocarray |
11106 |
# define reallocarray rpl_reallocarray |
11107 |
@@ -1156,7 +1712,7 @@ _GL_FUNCDECL_RPL (reallocarray, void *, |
11108 |
_GL_CXXALIAS_RPL (reallocarray, void *, |
11109 |
(void *ptr, size_t nmemb, size_t size)); |
11110 |
# else |
11111 |
-# if ! @HAVE_REALLOCARRAY@ |
11112 |
+# if ! 1 |
11113 |
_GL_FUNCDECL_SYS (reallocarray, void *, |
11114 |
(void *ptr, size_t nmemb, size_t size)); |
11115 |
# endif |
11116 |
@@ -1172,8 +1728,8 @@ _GL_WARN_ON_USE (reallocarray, "reallocarray is not portable - " |
11117 |
# endif |
11118 |
#endif |
11119 |
|
11120 |
-#if @GNULIB_REALPATH@ |
11121 |
-# if @REPLACE_REALPATH@ |
11122 |
+#if 1 |
11123 |
+# if 0 |
11124 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
11125 |
# define realpath rpl_realpath |
11126 |
# endif |
11127 |
@@ -1183,7 +1739,7 @@ _GL_FUNCDECL_RPL (realpath, char *, |
11128 |
_GL_CXXALIAS_RPL (realpath, char *, |
11129 |
(const char *restrict name, char *restrict resolved)); |
11130 |
# else |
11131 |
-# if !@HAVE_REALPATH@ |
11132 |
+# if !1 |
11133 |
_GL_FUNCDECL_SYS (realpath, char *, |
11134 |
(const char *restrict name, char *restrict resolved) |
11135 |
_GL_ARG_NONNULL ((1))); |
11136 |
@@ -1200,10 +1756,10 @@ _GL_WARN_ON_USE (realpath, "realpath is unportable - use gnulib module " |
11137 |
# endif |
11138 |
#endif |
11139 |
|
11140 |
-#if @GNULIB_RPMATCH@ |
11141 |
+#if 0 |
11142 |
/* Test a user response to a question. |
11143 |
Return 1 if it is affirmative, 0 if it is negative, or -1 if not clear. */ |
11144 |
-# if !@HAVE_RPMATCH@ |
11145 |
+# if !1 |
11146 |
_GL_FUNCDECL_SYS (rpmatch, int, (const char *response) _GL_ARG_NONNULL ((1))); |
11147 |
# endif |
11148 |
_GL_CXXALIAS_SYS (rpmatch, int, (const char *response)); |
11149 |
@@ -1216,9 +1772,9 @@ _GL_WARN_ON_USE (rpmatch, "rpmatch is unportable - " |
11150 |
# endif |
11151 |
#endif |
11152 |
|
11153 |
-#if @GNULIB_SECURE_GETENV@ |
11154 |
+#if 0 |
11155 |
/* Look up NAME in the environment, returning 0 in insecure situations. */ |
11156 |
-# if !@HAVE_SECURE_GETENV@ |
11157 |
+# if !1 |
11158 |
_GL_FUNCDECL_SYS (secure_getenv, char *, |
11159 |
(char const *name) _GL_ARG_NONNULL ((1))); |
11160 |
# endif |
11161 |
@@ -1232,10 +1788,10 @@ _GL_WARN_ON_USE (secure_getenv, "secure_getenv is unportable - " |
11162 |
# endif |
11163 |
#endif |
11164 |
|
11165 |
-#if @GNULIB_SETENV@ |
11166 |
+#if 0 |
11167 |
/* Set NAME to VALUE in the environment. |
11168 |
If REPLACE is nonzero, overwrite an existing value. */ |
11169 |
-# if @REPLACE_SETENV@ |
11170 |
+# if 0 |
11171 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
11172 |
# undef setenv |
11173 |
# define setenv rpl_setenv |
11174 |
@@ -1246,7 +1802,7 @@ _GL_FUNCDECL_RPL (setenv, int, |
11175 |
_GL_CXXALIAS_RPL (setenv, int, |
11176 |
(const char *name, const char *value, int replace)); |
11177 |
# else |
11178 |
-# if !@HAVE_DECL_SETENV@ |
11179 |
+# if !1 |
11180 |
_GL_FUNCDECL_SYS (setenv, int, |
11181 |
(const char *name, const char *value, int replace) |
11182 |
_GL_ARG_NONNULL ((1))); |
11183 |
@@ -1254,7 +1810,7 @@ _GL_FUNCDECL_SYS (setenv, int, |
11184 |
_GL_CXXALIAS_SYS (setenv, int, |
11185 |
(const char *name, const char *value, int replace)); |
11186 |
# endif |
11187 |
-# if !(@REPLACE_SETENV@ && !@HAVE_DECL_SETENV@) |
11188 |
+# if !(0 && !1) |
11189 |
_GL_CXXALIASWARN (setenv); |
11190 |
# endif |
11191 |
#elif defined GNULIB_POSIXCHECK |
11192 |
@@ -1265,9 +1821,9 @@ _GL_WARN_ON_USE (setenv, "setenv is unportable - " |
11193 |
# endif |
11194 |
#endif |
11195 |
|
11196 |
-#if @GNULIB_STRTOD@ |
11197 |
+#if 0 |
11198 |
/* Parse a double from STRING, updating ENDP if appropriate. */ |
11199 |
-# if @REPLACE_STRTOD@ |
11200 |
+# if 0 |
11201 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
11202 |
# define strtod rpl_strtod |
11203 |
# endif |
11204 |
@@ -1278,7 +1834,7 @@ _GL_FUNCDECL_RPL (strtod, double, |
11205 |
_GL_CXXALIAS_RPL (strtod, double, |
11206 |
(const char *restrict str, char **restrict endp)); |
11207 |
# else |
11208 |
-# if !@HAVE_STRTOD@ |
11209 |
+# if !1 |
11210 |
_GL_FUNCDECL_SYS (strtod, double, |
11211 |
(const char *restrict str, char **restrict endp) |
11212 |
_GL_ARG_NONNULL ((1))); |
11213 |
@@ -1297,9 +1853,9 @@ _GL_WARN_ON_USE (strtod, "strtod is unportable - " |
11214 |
# endif |
11215 |
#endif |
11216 |
|
11217 |
-#if @GNULIB_STRTOLD@ |
11218 |
+#if 0 |
11219 |
/* Parse a 'long double' from STRING, updating ENDP if appropriate. */ |
11220 |
-# if @REPLACE_STRTOLD@ |
11221 |
+# if 0 |
11222 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
11223 |
# define strtold rpl_strtold |
11224 |
# endif |
11225 |
@@ -1310,7 +1866,7 @@ _GL_FUNCDECL_RPL (strtold, long double, |
11226 |
_GL_CXXALIAS_RPL (strtold, long double, |
11227 |
(const char *restrict str, char **restrict endp)); |
11228 |
# else |
11229 |
-# if !@HAVE_STRTOLD@ |
11230 |
+# if !1 |
11231 |
_GL_FUNCDECL_SYS (strtold, long double, |
11232 |
(const char *restrict str, char **restrict endp) |
11233 |
_GL_ARG_NONNULL ((1))); |
11234 |
@@ -1327,7 +1883,7 @@ _GL_WARN_ON_USE (strtold, "strtold is unportable - " |
11235 |
# endif |
11236 |
#endif |
11237 |
|
11238 |
-#if @GNULIB_STRTOL@ |
11239 |
+#if 0 |
11240 |
/* Parse a signed integer whose textual representation starts at STRING. |
11241 |
The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0, |
11242 |
it may be decimal or octal (with prefix "0") or hexadecimal (with prefix |
11243 |
@@ -1336,7 +1892,7 @@ _GL_WARN_ON_USE (strtold, "strtold is unportable - " |
11244 |
stored in *ENDPTR. |
11245 |
Upon overflow, the return value is LONG_MAX or LONG_MIN, and errno is set |
11246 |
to ERANGE. */ |
11247 |
-# if @REPLACE_STRTOL@ |
11248 |
+# if 0 |
11249 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
11250 |
# define strtol rpl_strtol |
11251 |
# endif |
11252 |
@@ -1349,7 +1905,7 @@ _GL_CXXALIAS_RPL (strtol, long, |
11253 |
(const char *restrict string, char **restrict endptr, |
11254 |
int base)); |
11255 |
# else |
11256 |
-# if !@HAVE_STRTOL@ |
11257 |
+# if !1 |
11258 |
_GL_FUNCDECL_SYS (strtol, long, |
11259 |
(const char *restrict string, char **restrict endptr, |
11260 |
int base) |
11261 |
@@ -1368,7 +1924,7 @@ _GL_WARN_ON_USE (strtol, "strtol is unportable - " |
11262 |
# endif |
11263 |
#endif |
11264 |
|
11265 |
-#if @GNULIB_STRTOLL@ |
11266 |
+#if 1 |
11267 |
/* Parse a signed integer whose textual representation starts at STRING. |
11268 |
The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0, |
11269 |
it may be decimal or octal (with prefix "0") or hexadecimal (with prefix |
11270 |
@@ -1377,7 +1933,7 @@ _GL_WARN_ON_USE (strtol, "strtol is unportable - " |
11271 |
stored in *ENDPTR. |
11272 |
Upon overflow, the return value is LLONG_MAX or LLONG_MIN, and errno is set |
11273 |
to ERANGE. */ |
11274 |
-# if @REPLACE_STRTOLL@ |
11275 |
+# if 0 |
11276 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
11277 |
# define strtoll rpl_strtoll |
11278 |
# endif |
11279 |
@@ -1390,7 +1946,7 @@ _GL_CXXALIAS_RPL (strtoll, long long, |
11280 |
(const char *restrict string, char **restrict endptr, |
11281 |
int base)); |
11282 |
# else |
11283 |
-# if !@HAVE_STRTOLL@ |
11284 |
+# if !1 |
11285 |
_GL_FUNCDECL_SYS (strtoll, long long, |
11286 |
(const char *restrict string, char **restrict endptr, |
11287 |
int base) |
11288 |
@@ -1409,7 +1965,7 @@ _GL_WARN_ON_USE (strtoll, "strtoll is unportable - " |
11289 |
# endif |
11290 |
#endif |
11291 |
|
11292 |
-#if @GNULIB_STRTOUL@ |
11293 |
+#if 0 |
11294 |
/* Parse an unsigned integer whose textual representation starts at STRING. |
11295 |
The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0, |
11296 |
it may be decimal or octal (with prefix "0") or hexadecimal (with prefix |
11297 |
@@ -1417,7 +1973,7 @@ _GL_WARN_ON_USE (strtoll, "strtoll is unportable - " |
11298 |
If ENDPTR is not NULL, the address of the first byte after the integer is |
11299 |
stored in *ENDPTR. |
11300 |
Upon overflow, the return value is ULONG_MAX, and errno is set to ERANGE. */ |
11301 |
-# if @REPLACE_STRTOUL@ |
11302 |
+# if 0 |
11303 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
11304 |
# define strtoul rpl_strtoul |
11305 |
# endif |
11306 |
@@ -1430,7 +1986,7 @@ _GL_CXXALIAS_RPL (strtoul, unsigned long, |
11307 |
(const char *restrict string, char **restrict endptr, |
11308 |
int base)); |
11309 |
# else |
11310 |
-# if !@HAVE_STRTOUL@ |
11311 |
+# if !1 |
11312 |
_GL_FUNCDECL_SYS (strtoul, unsigned long, |
11313 |
(const char *restrict string, char **restrict endptr, |
11314 |
int base) |
11315 |
@@ -1449,7 +2005,7 @@ _GL_WARN_ON_USE (strtoul, "strtoul is unportable - " |
11316 |
# endif |
11317 |
#endif |
11318 |
|
11319 |
-#if @GNULIB_STRTOULL@ |
11320 |
+#if 0 |
11321 |
/* Parse an unsigned integer whose textual representation starts at STRING. |
11322 |
The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0, |
11323 |
it may be decimal or octal (with prefix "0") or hexadecimal (with prefix |
11324 |
@@ -1458,7 +2014,7 @@ _GL_WARN_ON_USE (strtoul, "strtoul is unportable - " |
11325 |
stored in *ENDPTR. |
11326 |
Upon overflow, the return value is ULLONG_MAX, and errno is set to |
11327 |
ERANGE. */ |
11328 |
-# if @REPLACE_STRTOULL@ |
11329 |
+# if 0 |
11330 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
11331 |
# define strtoull rpl_strtoull |
11332 |
# endif |
11333 |
@@ -1471,7 +2027,7 @@ _GL_CXXALIAS_RPL (strtoull, unsigned long long, |
11334 |
(const char *restrict string, char **restrict endptr, |
11335 |
int base)); |
11336 |
# else |
11337 |
-# if !@HAVE_STRTOULL@ |
11338 |
+# if !1 |
11339 |
_GL_FUNCDECL_SYS (strtoull, unsigned long long, |
11340 |
(const char *restrict string, char **restrict endptr, |
11341 |
int base) |
11342 |
@@ -1490,10 +2046,10 @@ _GL_WARN_ON_USE (strtoull, "strtoull is unportable - " |
11343 |
# endif |
11344 |
#endif |
11345 |
|
11346 |
-#if @GNULIB_UNLOCKPT@ |
11347 |
+#if 0 |
11348 |
/* Unlock the slave side of the pseudo-terminal whose master side is specified |
11349 |
by FD, so that it can be opened. */ |
11350 |
-# if !@HAVE_UNLOCKPT@ |
11351 |
+# if !1 |
11352 |
_GL_FUNCDECL_SYS (unlockpt, int, (int fd)); |
11353 |
# endif |
11354 |
_GL_CXXALIAS_SYS (unlockpt, int, (int fd)); |
11355 |
@@ -1506,9 +2062,9 @@ _GL_WARN_ON_USE (unlockpt, "unlockpt is not portable - " |
11356 |
# endif |
11357 |
#endif |
11358 |
|
11359 |
-#if @GNULIB_UNSETENV@ |
11360 |
+#if 0 |
11361 |
/* Remove the variable NAME from the environment. */ |
11362 |
-# if @REPLACE_UNSETENV@ |
11363 |
+# if 0 |
11364 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
11365 |
# undef unsetenv |
11366 |
# define unsetenv rpl_unsetenv |
11367 |
@@ -1516,12 +2072,12 @@ _GL_WARN_ON_USE (unlockpt, "unlockpt is not portable - " |
11368 |
_GL_FUNCDECL_RPL (unsetenv, int, (const char *name) _GL_ARG_NONNULL ((1))); |
11369 |
_GL_CXXALIAS_RPL (unsetenv, int, (const char *name)); |
11370 |
# else |
11371 |
-# if !@HAVE_DECL_UNSETENV@ |
11372 |
+# if !1 |
11373 |
_GL_FUNCDECL_SYS (unsetenv, int, (const char *name) _GL_ARG_NONNULL ((1))); |
11374 |
# endif |
11375 |
_GL_CXXALIAS_SYS (unsetenv, int, (const char *name)); |
11376 |
# endif |
11377 |
-# if !(@REPLACE_UNSETENV@ && !@HAVE_DECL_UNSETENV@) |
11378 |
+# if !(0 && !1) |
11379 |
_GL_CXXALIASWARN (unsetenv); |
11380 |
# endif |
11381 |
#elif defined GNULIB_POSIXCHECK |
11382 |
@@ -1533,8 +2089,8 @@ _GL_WARN_ON_USE (unsetenv, "unsetenv is unportable - " |
11383 |
#endif |
11384 |
|
11385 |
/* Convert a wide character to a multibyte character. */ |
11386 |
-#if @GNULIB_WCTOMB@ |
11387 |
-# if @REPLACE_WCTOMB@ |
11388 |
+#if 0 |
11389 |
+# if 0 |
11390 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
11391 |
# undef wctomb |
11392 |
# define wctomb rpl_wctomb |
11393 |
@@ -1550,6 +2106,6 @@ _GL_CXXALIASWARN (wctomb); |
11394 |
#endif |
11395 |
|
11396 |
|
11397 |
-#endif /* _@GUARD_PREFIX@_STDLIB_H */ |
11398 |
-#endif /* _@GUARD_PREFIX@_STDLIB_H */ |
11399 |
+#endif /* _GL_STDLIB_H */ |
11400 |
+#endif /* _GL_STDLIB_H */ |
11401 |
#endif |
11402 |
|
11403 |
diff --git a/autotools/gnulib/stdlib.in.h b/autotools/gnulib/stdlib.in.h |
11404 |
index d52c2f7..a86643c 100644 |
11405 |
--- a/autotools/gnulib/stdlib.in.h |
11406 |
+++ b/autotools/gnulib/stdlib.in.h |
11407 |
@@ -184,7 +184,11 @@ _GL_WARN_ON_USE (_Exit, "_Exit is unportable - " |
11408 |
# undef free |
11409 |
# define free rpl_free |
11410 |
# endif |
11411 |
+# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) |
11412 |
+_GL_FUNCDECL_RPL (free, void, (void *ptr) throw ()); |
11413 |
+# else |
11414 |
_GL_FUNCDECL_RPL (free, void, (void *ptr)); |
11415 |
+# endif |
11416 |
_GL_CXXALIAS_RPL (free, void, (void *ptr)); |
11417 |
# else |
11418 |
_GL_CXXALIAS_SYS (free, void, (void *ptr)); |
11419 |
|
11420 |
diff --git a/autotools/gnulib/str-two-way.h b/autotools/gnulib/str-two-way.h |
11421 |
index 7ee344a..b00017c 100644 |
11422 |
--- a/autotools/gnulib/str-two-way.h |
11423 |
+++ b/autotools/gnulib/str-two-way.h |
11424 |
@@ -231,7 +231,7 @@ critical_factorization (const unsigned char *needle, size_t needle_len, |
11425 |
most 2 * HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching. |
11426 |
If AVAILABLE modifies HAYSTACK_LEN (as in strstr), then at most 3 * |
11427 |
HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching. */ |
11428 |
-static RETURN_TYPE |
11429 |
+static RETURN_TYPE _GL_ATTRIBUTE_PURE |
11430 |
two_way_short_needle (const unsigned char *haystack, size_t haystack_len, |
11431 |
const unsigned char *needle, size_t needle_len) |
11432 |
{ |
11433 |
@@ -325,7 +325,7 @@ two_way_short_needle (const unsigned char *haystack, size_t haystack_len, |
11434 |
If AVAILABLE modifies HAYSTACK_LEN (as in strstr), then at most 3 * |
11435 |
HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching, and |
11436 |
sublinear performance is not possible. */ |
11437 |
-static RETURN_TYPE |
11438 |
+static RETURN_TYPE _GL_ATTRIBUTE_PURE |
11439 |
two_way_long_needle (const unsigned char *haystack, size_t haystack_len, |
11440 |
const unsigned char *needle, size_t needle_len) |
11441 |
{ |
11442 |
|
11443 |
diff --git a/autotools/gnulib/string.in.h b/autotools/gnulib/string.h |
11444 |
similarity index 62% |
11445 |
copy from autotools/gnulib/string.in.h |
11446 |
copy to autotools/gnulib/string.h |
11447 |
index c943294..70da2c5 100644 |
11448 |
--- a/autotools/gnulib/string.in.h |
11449 |
+++ b/autotools/gnulib/string.h |
11450 |
@@ -1,3 +1,4 @@ |
11451 |
+/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ |
11452 |
/* A GNU-like <string.h>. |
11453 |
|
11454 |
Copyright (C) 1995-1996, 2001-2022 Free Software Foundation, Inc. |
11455 |
@@ -16,9 +17,9 @@ |
11456 |
along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
11457 |
|
11458 |
#if __GNUC__ >= 3 |
11459 |
-@PRAGMA_SYSTEM_HEADER@ |
11460 |
+#pragma GCC system_header |
11461 |
#endif |
11462 |
-@PRAGMA_COLUMNS@ |
11463 |
+ |
11464 |
|
11465 |
#if defined _GL_ALREADY_INCLUDING_STRING_H |
11466 |
/* Special invocation convention: |
11467 |
@@ -27,41 +28,41 @@ |
11468 |
In this situation system _chk variants due to -D_FORTIFY_SOURCE |
11469 |
might be used after any replacements defined here. */ |
11470 |
|
11471 |
-#@INCLUDE_NEXT@ @NEXT_STRING_H@ |
11472 |
+#include_next <string.h> |
11473 |
|
11474 |
#else |
11475 |
/* Normal invocation convention. */ |
11476 |
|
11477 |
-#ifndef _@GUARD_PREFIX@_STRING_H |
11478 |
+#ifndef _GL_STRING_H |
11479 |
|
11480 |
#define _GL_ALREADY_INCLUDING_STRING_H |
11481 |
|
11482 |
/* The include_next requires a split double-inclusion guard. */ |
11483 |
-#@INCLUDE_NEXT@ @NEXT_STRING_H@ |
11484 |
+#include_next <string.h> |
11485 |
|
11486 |
#undef _GL_ALREADY_INCLUDING_STRING_H |
11487 |
|
11488 |
-#ifndef _@GUARD_PREFIX@_STRING_H |
11489 |
-#define _@GUARD_PREFIX@_STRING_H |
11490 |
+#ifndef _GL_STRING_H |
11491 |
+#define _GL_STRING_H |
11492 |
|
11493 |
/* NetBSD 5.0 mis-defines NULL. */ |
11494 |
#include <stddef.h> |
11495 |
|
11496 |
/* MirBSD defines mbslen as a macro. */ |
11497 |
-#if @GNULIB_MBSLEN@ && defined __MirBSD__ |
11498 |
+#if 0 && defined __MirBSD__ |
11499 |
# include <wchar.h> |
11500 |
#endif |
11501 |
|
11502 |
/* NetBSD 5.0 declares strsignal in <unistd.h>, not in <string.h>. */ |
11503 |
/* But in any case avoid namespace pollution on glibc systems. */ |
11504 |
-#if (@GNULIB_STRSIGNAL@ || defined GNULIB_POSIXCHECK) && defined __NetBSD__ \ |
11505 |
+#if (0 || defined GNULIB_POSIXCHECK) && defined __NetBSD__ \ |
11506 |
&& ! defined __GLIBC__ |
11507 |
# include <unistd.h> |
11508 |
#endif |
11509 |
|
11510 |
/* AIX 7.2 declares ffsl and ffsll in <strings.h>, not in <string.h>. */ |
11511 |
/* But in any case avoid namespace pollution on glibc systems. */ |
11512 |
-#if ((@GNULIB_FFSL@ || @GNULIB_FFSLL@ || defined GNULIB_POSIXCHECK) \ |
11513 |
+#if ((0 || 0 || defined GNULIB_POSIXCHECK) \ |
11514 |
&& defined _AIX) \ |
11515 |
&& ! defined __GLIBC__ |
11516 |
# include <strings.h> |
11517 |
@@ -107,39 +108,561 @@ |
11518 |
#endif |
11519 |
|
11520 |
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ |
11521 |
+/* C++ compatible function declaration macros. |
11522 |
+ Copyright (C) 2010-2022 Free Software Foundation, Inc. |
11523 |
+ |
11524 |
+ This program is free software: you can redistribute it and/or modify it |
11525 |
+ under the terms of the GNU Lesser General Public License as published |
11526 |
+ by the Free Software Foundation; either version 2 of the License, or |
11527 |
+ (at your option) any later version. |
11528 |
+ |
11529 |
+ This program is distributed in the hope that it will be useful, |
11530 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
11531 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
11532 |
+ Lesser General Public License for more details. |
11533 |
+ |
11534 |
+ You should have received a copy of the GNU Lesser General Public License |
11535 |
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
11536 |
+ |
11537 |
+#ifndef _GL_CXXDEFS_H |
11538 |
+#define _GL_CXXDEFS_H |
11539 |
+ |
11540 |
+/* Begin/end the GNULIB_NAMESPACE namespace. */ |
11541 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
11542 |
+# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { |
11543 |
+# define _GL_END_NAMESPACE } |
11544 |
+#else |
11545 |
+# define _GL_BEGIN_NAMESPACE |
11546 |
+# define _GL_END_NAMESPACE |
11547 |
+#endif |
11548 |
+ |
11549 |
+/* The three most frequent use cases of these macros are: |
11550 |
+ |
11551 |
+ * For providing a substitute for a function that is missing on some |
11552 |
+ platforms, but is declared and works fine on the platforms on which |
11553 |
+ it exists: |
11554 |
+ |
11555 |
+ #if @GNULIB_FOO@ |
11556 |
+ # if !@HAVE_FOO@ |
11557 |
+ _GL_FUNCDECL_SYS (foo, ...); |
11558 |
+ # endif |
11559 |
+ _GL_CXXALIAS_SYS (foo, ...); |
11560 |
+ _GL_CXXALIASWARN (foo); |
11561 |
+ #elif defined GNULIB_POSIXCHECK |
11562 |
+ ... |
11563 |
+ #endif |
11564 |
+ |
11565 |
+ * For providing a replacement for a function that exists on all platforms, |
11566 |
+ but is broken/insufficient and needs to be replaced on some platforms: |
11567 |
+ |
11568 |
+ #if @GNULIB_FOO@ |
11569 |
+ # if @REPLACE_FOO@ |
11570 |
+ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
11571 |
+ # undef foo |
11572 |
+ # define foo rpl_foo |
11573 |
+ # endif |
11574 |
+ _GL_FUNCDECL_RPL (foo, ...); |
11575 |
+ _GL_CXXALIAS_RPL (foo, ...); |
11576 |
+ # else |
11577 |
+ _GL_CXXALIAS_SYS (foo, ...); |
11578 |
+ # endif |
11579 |
+ _GL_CXXALIASWARN (foo); |
11580 |
+ #elif defined GNULIB_POSIXCHECK |
11581 |
+ ... |
11582 |
+ #endif |
11583 |
+ |
11584 |
+ * For providing a replacement for a function that exists on some platforms |
11585 |
+ but is broken/insufficient and needs to be replaced on some of them and |
11586 |
+ is additionally either missing or undeclared on some other platforms: |
11587 |
+ |
11588 |
+ #if @GNULIB_FOO@ |
11589 |
+ # if @REPLACE_FOO@ |
11590 |
+ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
11591 |
+ # undef foo |
11592 |
+ # define foo rpl_foo |
11593 |
+ # endif |
11594 |
+ _GL_FUNCDECL_RPL (foo, ...); |
11595 |
+ _GL_CXXALIAS_RPL (foo, ...); |
11596 |
+ # else |
11597 |
+ # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ |
11598 |
+ _GL_FUNCDECL_SYS (foo, ...); |
11599 |
+ # endif |
11600 |
+ _GL_CXXALIAS_SYS (foo, ...); |
11601 |
+ # endif |
11602 |
+ _GL_CXXALIASWARN (foo); |
11603 |
+ #elif defined GNULIB_POSIXCHECK |
11604 |
+ ... |
11605 |
+ #endif |
11606 |
+*/ |
11607 |
+ |
11608 |
+/* _GL_EXTERN_C declaration; |
11609 |
+ performs the declaration with C linkage. */ |
11610 |
+#if defined __cplusplus |
11611 |
+# define _GL_EXTERN_C extern "C" |
11612 |
+#else |
11613 |
+# define _GL_EXTERN_C extern |
11614 |
+#endif |
11615 |
+ |
11616 |
+/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); |
11617 |
+ declares a replacement function, named rpl_func, with the given prototype, |
11618 |
+ consisting of return type, parameters, and attributes. |
11619 |
+ Example: |
11620 |
+ _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) |
11621 |
+ _GL_ARG_NONNULL ((1))); |
11622 |
+ */ |
11623 |
+#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ |
11624 |
+ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) |
11625 |
+#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ |
11626 |
+ _GL_EXTERN_C rettype rpl_func parameters_and_attributes |
11627 |
+ |
11628 |
+/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); |
11629 |
+ declares the system function, named func, with the given prototype, |
11630 |
+ consisting of return type, parameters, and attributes. |
11631 |
+ Example: |
11632 |
+ _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) |
11633 |
+ _GL_ARG_NONNULL ((1))); |
11634 |
+ */ |
11635 |
+#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ |
11636 |
+ _GL_EXTERN_C rettype func parameters_and_attributes |
11637 |
+ |
11638 |
+/* _GL_CXXALIAS_RPL (func, rettype, parameters); |
11639 |
+ declares a C++ alias called GNULIB_NAMESPACE::func |
11640 |
+ that redirects to rpl_func, if GNULIB_NAMESPACE is defined. |
11641 |
+ Example: |
11642 |
+ _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); |
11643 |
+ |
11644 |
+ Wrapping rpl_func in an object with an inline conversion operator |
11645 |
+ avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is |
11646 |
+ actually used in the program. */ |
11647 |
+#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ |
11648 |
+ _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) |
11649 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
11650 |
+# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ |
11651 |
+ namespace GNULIB_NAMESPACE \ |
11652 |
+ { \ |
11653 |
+ static const struct _gl_ ## func ## _wrapper \ |
11654 |
+ { \ |
11655 |
+ typedef rettype (*type) parameters; \ |
11656 |
+ \ |
11657 |
+ inline operator type () const \ |
11658 |
+ { \ |
11659 |
+ return ::rpl_func; \ |
11660 |
+ } \ |
11661 |
+ } func = {}; \ |
11662 |
+ } \ |
11663 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
11664 |
+#else |
11665 |
+# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ |
11666 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
11667 |
+#endif |
11668 |
+ |
11669 |
+/* _GL_CXXALIAS_MDA (func, rettype, parameters); |
11670 |
+ is to be used when func is a Microsoft deprecated alias, on native Windows. |
11671 |
+ It declares a C++ alias called GNULIB_NAMESPACE::func |
11672 |
+ that redirects to _func, if GNULIB_NAMESPACE is defined. |
11673 |
+ Example: |
11674 |
+ _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); |
11675 |
+ */ |
11676 |
+#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ |
11677 |
+ _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) |
11678 |
+ |
11679 |
+/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); |
11680 |
+ is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); |
11681 |
+ except that the C function rpl_func may have a slightly different |
11682 |
+ declaration. A cast is used to silence the "invalid conversion" error |
11683 |
+ that would otherwise occur. */ |
11684 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
11685 |
+# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ |
11686 |
+ namespace GNULIB_NAMESPACE \ |
11687 |
+ { \ |
11688 |
+ static const struct _gl_ ## func ## _wrapper \ |
11689 |
+ { \ |
11690 |
+ typedef rettype (*type) parameters; \ |
11691 |
+ \ |
11692 |
+ inline operator type () const \ |
11693 |
+ { \ |
11694 |
+ return reinterpret_cast<type>(::rpl_func); \ |
11695 |
+ } \ |
11696 |
+ } func = {}; \ |
11697 |
+ } \ |
11698 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
11699 |
+#else |
11700 |
+# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ |
11701 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
11702 |
+#endif |
11703 |
+ |
11704 |
+/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); |
11705 |
+ is like _GL_CXXALIAS_MDA (func, rettype, parameters); |
11706 |
+ except that the C function func may have a slightly different declaration. |
11707 |
+ A cast is used to silence the "invalid conversion" error that would |
11708 |
+ otherwise occur. */ |
11709 |
+#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ |
11710 |
+ _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) |
11711 |
+ |
11712 |
+/* _GL_CXXALIAS_SYS (func, rettype, parameters); |
11713 |
+ declares a C++ alias called GNULIB_NAMESPACE::func |
11714 |
+ that redirects to the system provided function func, if GNULIB_NAMESPACE |
11715 |
+ is defined. |
11716 |
+ Example: |
11717 |
+ _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); |
11718 |
+ |
11719 |
+ Wrapping func in an object with an inline conversion operator |
11720 |
+ avoids a reference to func unless GNULIB_NAMESPACE::func is |
11721 |
+ actually used in the program. */ |
11722 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
11723 |
+# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ |
11724 |
+ namespace GNULIB_NAMESPACE \ |
11725 |
+ { \ |
11726 |
+ static const struct _gl_ ## func ## _wrapper \ |
11727 |
+ { \ |
11728 |
+ typedef rettype (*type) parameters; \ |
11729 |
+ \ |
11730 |
+ inline operator type () const \ |
11731 |
+ { \ |
11732 |
+ return ::func; \ |
11733 |
+ } \ |
11734 |
+ } func = {}; \ |
11735 |
+ } \ |
11736 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
11737 |
+#else |
11738 |
+# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ |
11739 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
11740 |
+#endif |
11741 |
+ |
11742 |
+/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); |
11743 |
+ is like _GL_CXXALIAS_SYS (func, rettype, parameters); |
11744 |
+ except that the C function func may have a slightly different declaration. |
11745 |
+ A cast is used to silence the "invalid conversion" error that would |
11746 |
+ otherwise occur. */ |
11747 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
11748 |
+# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ |
11749 |
+ namespace GNULIB_NAMESPACE \ |
11750 |
+ { \ |
11751 |
+ static const struct _gl_ ## func ## _wrapper \ |
11752 |
+ { \ |
11753 |
+ typedef rettype (*type) parameters; \ |
11754 |
+ \ |
11755 |
+ inline operator type () const \ |
11756 |
+ { \ |
11757 |
+ return reinterpret_cast<type>(::func); \ |
11758 |
+ } \ |
11759 |
+ } func = {}; \ |
11760 |
+ } \ |
11761 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
11762 |
+#else |
11763 |
+# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ |
11764 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
11765 |
+#endif |
11766 |
+ |
11767 |
+/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); |
11768 |
+ is like _GL_CXXALIAS_SYS (func, rettype, parameters); |
11769 |
+ except that the C function is picked among a set of overloaded functions, |
11770 |
+ namely the one with rettype2 and parameters2. Two consecutive casts |
11771 |
+ are used to silence the "cannot find a match" and "invalid conversion" |
11772 |
+ errors that would otherwise occur. */ |
11773 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
11774 |
+ /* The outer cast must be a reinterpret_cast. |
11775 |
+ The inner cast: When the function is defined as a set of overloaded |
11776 |
+ functions, it works as a static_cast<>, choosing the designated variant. |
11777 |
+ When the function is defined as a single variant, it works as a |
11778 |
+ reinterpret_cast<>. The parenthesized cast syntax works both ways. */ |
11779 |
+# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ |
11780 |
+ namespace GNULIB_NAMESPACE \ |
11781 |
+ { \ |
11782 |
+ static const struct _gl_ ## func ## _wrapper \ |
11783 |
+ { \ |
11784 |
+ typedef rettype (*type) parameters; \ |
11785 |
+ \ |
11786 |
+ inline operator type () const \ |
11787 |
+ { \ |
11788 |
+ return reinterpret_cast<type>((rettype2 (*) parameters2)(::func)); \ |
11789 |
+ } \ |
11790 |
+ } func = {}; \ |
11791 |
+ } \ |
11792 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
11793 |
+#else |
11794 |
+# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ |
11795 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
11796 |
+#endif |
11797 |
+ |
11798 |
+/* _GL_CXXALIASWARN (func); |
11799 |
+ causes a warning to be emitted when ::func is used but not when |
11800 |
+ GNULIB_NAMESPACE::func is used. func must be defined without overloaded |
11801 |
+ variants. */ |
11802 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
11803 |
+# define _GL_CXXALIASWARN(func) \ |
11804 |
+ _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) |
11805 |
+# define _GL_CXXALIASWARN_1(func,namespace) \ |
11806 |
+ _GL_CXXALIASWARN_2 (func, namespace) |
11807 |
+/* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>, |
11808 |
+ we enable the warning only when not optimizing. */ |
11809 |
+# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) |
11810 |
+# define _GL_CXXALIASWARN_2(func,namespace) \ |
11811 |
+ _GL_WARN_ON_USE (func, \ |
11812 |
+ "The symbol ::" #func " refers to the system function. " \ |
11813 |
+ "Use " #namespace "::" #func " instead.") |
11814 |
+# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING |
11815 |
+# define _GL_CXXALIASWARN_2(func,namespace) \ |
11816 |
+ extern __typeof__ (func) func |
11817 |
+# else |
11818 |
+# define _GL_CXXALIASWARN_2(func,namespace) \ |
11819 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
11820 |
+# endif |
11821 |
+#else |
11822 |
+# define _GL_CXXALIASWARN(func) \ |
11823 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
11824 |
+#endif |
11825 |
+ |
11826 |
+/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); |
11827 |
+ causes a warning to be emitted when the given overloaded variant of ::func |
11828 |
+ is used but not when GNULIB_NAMESPACE::func is used. */ |
11829 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
11830 |
+# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ |
11831 |
+ _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ |
11832 |
+ GNULIB_NAMESPACE) |
11833 |
+# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ |
11834 |
+ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) |
11835 |
+/* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>, |
11836 |
+ we enable the warning only when not optimizing. */ |
11837 |
+# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) |
11838 |
+# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ |
11839 |
+ _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ |
11840 |
+ "The symbol ::" #func " refers to the system function. " \ |
11841 |
+ "Use " #namespace "::" #func " instead.") |
11842 |
+# else |
11843 |
+# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ |
11844 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
11845 |
+# endif |
11846 |
+#else |
11847 |
+# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ |
11848 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
11849 |
+#endif |
11850 |
+ |
11851 |
+#endif /* _GL_CXXDEFS_H */ |
11852 |
|
11853 |
/* The definition of _GL_ARG_NONNULL is copied here. */ |
11854 |
+/* A C macro for declaring that specific arguments must not be NULL. |
11855 |
+ Copyright (C) 2009-2022 Free Software Foundation, Inc. |
11856 |
+ |
11857 |
+ This program is free software: you can redistribute it and/or modify it |
11858 |
+ under the terms of the GNU Lesser General Public License as published |
11859 |
+ by the Free Software Foundation; either version 2 of the License, or |
11860 |
+ (at your option) any later version. |
11861 |
+ |
11862 |
+ This program is distributed in the hope that it will be useful, |
11863 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
11864 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
11865 |
+ Lesser General Public License for more details. |
11866 |
+ |
11867 |
+ You should have received a copy of the GNU Lesser General Public License |
11868 |
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
11869 |
+ |
11870 |
+/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools |
11871 |
+ that the values passed as arguments n, ..., m must be non-NULL pointers. |
11872 |
+ n = 1 stands for the first argument, n = 2 for the second argument etc. */ |
11873 |
+#ifndef _GL_ARG_NONNULL |
11874 |
+# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ |
11875 |
+# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) |
11876 |
+# else |
11877 |
+# define _GL_ARG_NONNULL(params) |
11878 |
+# endif |
11879 |
+#endif |
11880 |
|
11881 |
/* The definition of _GL_WARN_ON_USE is copied here. */ |
11882 |
+/* A C macro for emitting warnings if a function is used. |
11883 |
+ Copyright (C) 2010-2022 Free Software Foundation, Inc. |
11884 |
+ |
11885 |
+ This program is free software: you can redistribute it and/or modify it |
11886 |
+ under the terms of the GNU Lesser General Public License as published |
11887 |
+ by the Free Software Foundation; either version 2 of the License, or |
11888 |
+ (at your option) any later version. |
11889 |
+ |
11890 |
+ This program is distributed in the hope that it will be useful, |
11891 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
11892 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
11893 |
+ Lesser General Public License for more details. |
11894 |
+ |
11895 |
+ You should have received a copy of the GNU Lesser General Public License |
11896 |
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
11897 |
+ |
11898 |
+/* _GL_WARN_ON_USE (function, "literal string") issues a declaration |
11899 |
+ for FUNCTION which will then trigger a compiler warning containing |
11900 |
+ the text of "literal string" anywhere that function is called, if |
11901 |
+ supported by the compiler. If the compiler does not support this |
11902 |
+ feature, the macro expands to an unused extern declaration. |
11903 |
+ |
11904 |
+ _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the |
11905 |
+ attribute used in _GL_WARN_ON_USE. If the compiler does not support |
11906 |
+ this feature, it expands to empty. |
11907 |
+ |
11908 |
+ These macros are useful for marking a function as a potential |
11909 |
+ portability trap, with the intent that "literal string" include |
11910 |
+ instructions on the replacement function that should be used |
11911 |
+ instead. |
11912 |
+ _GL_WARN_ON_USE is for functions with 'extern' linkage. |
11913 |
+ _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline' |
11914 |
+ linkage. |
11915 |
+ |
11916 |
+ However, one of the reasons that a function is a portability trap is |
11917 |
+ if it has the wrong signature. Declaring FUNCTION with a different |
11918 |
+ signature in C is a compilation error, so this macro must use the |
11919 |
+ same type as any existing declaration so that programs that avoid |
11920 |
+ the problematic FUNCTION do not fail to compile merely because they |
11921 |
+ included a header that poisoned the function. But this implies that |
11922 |
+ _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already |
11923 |
+ have a declaration. Use of this macro implies that there must not |
11924 |
+ be any other macro hiding the declaration of FUNCTION; but |
11925 |
+ undefining FUNCTION first is part of the poisoning process anyway |
11926 |
+ (although for symbols that are provided only via a macro, the result |
11927 |
+ is a compilation error rather than a warning containing |
11928 |
+ "literal string"). Also note that in C++, it is only safe to use if |
11929 |
+ FUNCTION has no overloads. |
11930 |
+ |
11931 |
+ For an example, it is possible to poison 'getline' by: |
11932 |
+ - adding a call to gl_WARN_ON_USE_PREPARE([[#include <stdio.h>]], |
11933 |
+ [getline]) in configure.ac, which potentially defines |
11934 |
+ HAVE_RAW_DECL_GETLINE |
11935 |
+ - adding this code to a header that wraps the system <stdio.h>: |
11936 |
+ #undef getline |
11937 |
+ #if HAVE_RAW_DECL_GETLINE |
11938 |
+ _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" |
11939 |
+ "not universally present; use the gnulib module getline"); |
11940 |
+ #endif |
11941 |
+ |
11942 |
+ It is not possible to directly poison global variables. But it is |
11943 |
+ possible to write a wrapper accessor function, and poison that |
11944 |
+ (less common usage, like &environ, will cause a compilation error |
11945 |
+ rather than issue the nice warning, but the end result of informing |
11946 |
+ the developer about their portability problem is still achieved): |
11947 |
+ #if HAVE_RAW_DECL_ENVIRON |
11948 |
+ static char *** |
11949 |
+ rpl_environ (void) { return &environ; } |
11950 |
+ _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); |
11951 |
+ # undef environ |
11952 |
+ # define environ (*rpl_environ ()) |
11953 |
+ #endif |
11954 |
+ or better (avoiding contradictory use of 'static' and 'extern'): |
11955 |
+ #if HAVE_RAW_DECL_ENVIRON |
11956 |
+ static char *** |
11957 |
+ _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared") |
11958 |
+ rpl_environ (void) { return &environ; } |
11959 |
+ # undef environ |
11960 |
+ # define environ (*rpl_environ ()) |
11961 |
+ #endif |
11962 |
+ */ |
11963 |
+#ifndef _GL_WARN_ON_USE |
11964 |
+ |
11965 |
+# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) |
11966 |
+/* A compiler attribute is available in gcc versions 4.3.0 and later. */ |
11967 |
+# define _GL_WARN_ON_USE(function, message) \ |
11968 |
+_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) |
11969 |
+# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ |
11970 |
+ __attribute__ ((__warning__ (message))) |
11971 |
+# elif __clang_major__ >= 4 |
11972 |
+/* Another compiler attribute is available in clang. */ |
11973 |
+# define _GL_WARN_ON_USE(function, message) \ |
11974 |
+_GL_WARN_EXTERN_C __typeof__ (function) function \ |
11975 |
+ __attribute__ ((__diagnose_if__ (1, message, "warning"))) |
11976 |
+# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ |
11977 |
+ __attribute__ ((__diagnose_if__ (1, message, "warning"))) |
11978 |
+# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING |
11979 |
+/* Verify the existence of the function. */ |
11980 |
+# define _GL_WARN_ON_USE(function, message) \ |
11981 |
+_GL_WARN_EXTERN_C __typeof__ (function) function |
11982 |
+# define _GL_WARN_ON_USE_ATTRIBUTE(message) |
11983 |
+# else /* Unsupported. */ |
11984 |
+# define _GL_WARN_ON_USE(function, message) \ |
11985 |
+_GL_WARN_EXTERN_C int _gl_warn_on_use |
11986 |
+# define _GL_WARN_ON_USE_ATTRIBUTE(message) |
11987 |
+# endif |
11988 |
+#endif |
11989 |
+ |
11990 |
+/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") |
11991 |
+ is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the |
11992 |
+ function is declared with the given prototype, consisting of return type, |
11993 |
+ parameters, and attributes. |
11994 |
+ This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does |
11995 |
+ not work in this case. */ |
11996 |
+#ifndef _GL_WARN_ON_USE_CXX |
11997 |
+# if !defined __cplusplus |
11998 |
+# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ |
11999 |
+ _GL_WARN_ON_USE (function, msg) |
12000 |
+# else |
12001 |
+# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) |
12002 |
+/* A compiler attribute is available in gcc versions 4.3.0 and later. */ |
12003 |
+# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ |
12004 |
+extern rettype_gcc function parameters_and_attributes \ |
12005 |
+ __attribute__ ((__warning__ (msg))) |
12006 |
+# elif __clang_major__ >= 4 |
12007 |
+/* Another compiler attribute is available in clang. */ |
12008 |
+# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ |
12009 |
+extern rettype_clang function parameters_and_attributes \ |
12010 |
+ __attribute__ ((__diagnose_if__ (1, msg, "warning"))) |
12011 |
+# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING |
12012 |
+/* Verify the existence of the function. */ |
12013 |
+# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ |
12014 |
+extern rettype_gcc function parameters_and_attributes |
12015 |
+# else /* Unsupported. */ |
12016 |
+# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ |
12017 |
+_GL_WARN_EXTERN_C int _gl_warn_on_use |
12018 |
+# endif |
12019 |
+# endif |
12020 |
+#endif |
12021 |
+ |
12022 |
+/* _GL_WARN_EXTERN_C declaration; |
12023 |
+ performs the declaration with C linkage. */ |
12024 |
+#ifndef _GL_WARN_EXTERN_C |
12025 |
+# if defined __cplusplus |
12026 |
+# define _GL_WARN_EXTERN_C extern "C" |
12027 |
+# else |
12028 |
+# define _GL_WARN_EXTERN_C extern |
12029 |
+# endif |
12030 |
+#endif |
12031 |
|
12032 |
/* Make _GL_ATTRIBUTE_DEALLOC_FREE work, even though <stdlib.h> may not have |
12033 |
been included yet. */ |
12034 |
-#if @GNULIB_FREE_POSIX@ |
12035 |
-# if (@REPLACE_FREE@ && !defined free \ |
12036 |
+#if 1 |
12037 |
+# if (0 && !defined free \ |
12038 |
&& !(defined __cplusplus && defined GNULIB_NAMESPACE)) |
12039 |
/* We can't do '#define free rpl_free' here. */ |
12040 |
_GL_EXTERN_C void rpl_free (void *); |
12041 |
# undef _GL_ATTRIBUTE_DEALLOC_FREE |
12042 |
# define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (rpl_free, 1) |
12043 |
# else |
12044 |
-# if defined _MSC_VER |
12045 |
-_GL_EXTERN_C void __cdecl free (void *); |
12046 |
+# if defined _MSC_VER && !defined free |
12047 |
+_GL_EXTERN_C |
12048 |
+# if defined _DLL |
12049 |
+ __declspec (dllimport) |
12050 |
+# endif |
12051 |
+ void __cdecl free (void *); |
12052 |
# else |
12053 |
+# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) |
12054 |
+_GL_EXTERN_C void free (void *) throw (); |
12055 |
+# else |
12056 |
_GL_EXTERN_C void free (void *); |
12057 |
+# endif |
12058 |
# endif |
12059 |
# endif |
12060 |
#else |
12061 |
-# if defined _MSC_VER |
12062 |
-_GL_EXTERN_C void __cdecl free (void *); |
12063 |
+# if defined _MSC_VER && !defined free |
12064 |
+_GL_EXTERN_C |
12065 |
+# if defined _DLL |
12066 |
+ __declspec (dllimport) |
12067 |
+# endif |
12068 |
+ void __cdecl free (void *); |
12069 |
# else |
12070 |
+# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) |
12071 |
+_GL_EXTERN_C void free (void *) throw (); |
12072 |
+# else |
12073 |
_GL_EXTERN_C void free (void *); |
12074 |
+# endif |
12075 |
# endif |
12076 |
#endif |
12077 |
|
12078 |
/* Clear a block of memory. The compiler will not delete a call to |
12079 |
this function, even if the block is dead after the call. */ |
12080 |
-#if @GNULIB_EXPLICIT_BZERO@ |
12081 |
-# if ! @HAVE_EXPLICIT_BZERO@ |
12082 |
+#if 0 |
12083 |
+# if ! 1 |
12084 |
_GL_FUNCDECL_SYS (explicit_bzero, void, |
12085 |
(void *__dest, size_t __n) _GL_ARG_NONNULL ((1))); |
12086 |
# endif |
12087 |
@@ -154,8 +677,8 @@ _GL_WARN_ON_USE (explicit_bzero, "explicit_bzero is unportable - " |
12088 |
#endif |
12089 |
|
12090 |
/* Find the index of the least-significant set bit. */ |
12091 |
-#if @GNULIB_FFSL@ |
12092 |
-# if !@HAVE_FFSL@ |
12093 |
+#if 0 |
12094 |
+# if !1 |
12095 |
_GL_FUNCDECL_SYS (ffsl, int, (long int i)); |
12096 |
# endif |
12097 |
_GL_CXXALIAS_SYS (ffsl, int, (long int i)); |
12098 |
@@ -169,15 +692,15 @@ _GL_WARN_ON_USE (ffsl, "ffsl is not portable - use the ffsl module"); |
12099 |
|
12100 |
|
12101 |
/* Find the index of the least-significant set bit. */ |
12102 |
-#if @GNULIB_FFSLL@ |
12103 |
-# if @REPLACE_FFSLL@ |
12104 |
+#if 0 |
12105 |
+# if 0 |
12106 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
12107 |
# define ffsll rpl_ffsll |
12108 |
# endif |
12109 |
_GL_FUNCDECL_RPL (ffsll, int, (long long int i)); |
12110 |
_GL_CXXALIAS_RPL (ffsll, int, (long long int i)); |
12111 |
# else |
12112 |
-# if !@HAVE_FFSLL@ |
12113 |
+# if !1 |
12114 |
_GL_FUNCDECL_SYS (ffsll, int, (long long int i)); |
12115 |
# endif |
12116 |
_GL_CXXALIAS_SYS (ffsll, int, (long long int i)); |
12117 |
@@ -191,7 +714,7 @@ _GL_WARN_ON_USE (ffsll, "ffsll is not portable - use the ffsll module"); |
12118 |
#endif |
12119 |
|
12120 |
|
12121 |
-#if @GNULIB_MDA_MEMCCPY@ |
12122 |
+#if 1 |
12123 |
/* On native Windows, map 'memccpy' to '_memccpy', so that -loldnames is not |
12124 |
required. In C++ with GNULIB_NAMESPACE, avoid differences between |
12125 |
platforms by defining GNULIB_NAMESPACE::memccpy always. */ |
12126 |
@@ -211,8 +734,8 @@ _GL_CXXALIASWARN (memccpy); |
12127 |
|
12128 |
|
12129 |
/* Return the first instance of C within N bytes of S, or NULL. */ |
12130 |
-#if @GNULIB_MEMCHR@ |
12131 |
-# if @REPLACE_MEMCHR@ |
12132 |
+#if 1 |
12133 |
+# if 0 |
12134 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
12135 |
# undef memchr |
12136 |
# define memchr rpl_memchr |
12137 |
@@ -230,10 +753,11 @@ _GL_CXXALIAS_SYS_CAST2 (memchr, |
12138 |
void const *, (void const *__s, int __c, size_t __n)); |
12139 |
# endif |
12140 |
# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ |
12141 |
- && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) |
12142 |
-_GL_CXXALIASWARN1 (memchr, void *, (void *__s, int __c, size_t __n)); |
12143 |
+ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ |
12144 |
+ || defined __clang__) |
12145 |
+_GL_CXXALIASWARN1 (memchr, void *, (void *__s, int __c, size_t __n) throw ()); |
12146 |
_GL_CXXALIASWARN1 (memchr, void const *, |
12147 |
- (void const *__s, int __c, size_t __n)); |
12148 |
+ (void const *__s, int __c, size_t __n) throw ()); |
12149 |
# elif __GLIBC__ >= 2 |
12150 |
_GL_CXXALIASWARN (memchr); |
12151 |
# endif |
12152 |
@@ -245,8 +769,8 @@ _GL_WARN_ON_USE (memchr, "memchr has platform-specific bugs - " |
12153 |
#endif |
12154 |
|
12155 |
/* Return the first occurrence of NEEDLE in HAYSTACK. */ |
12156 |
-#if @GNULIB_MEMMEM@ |
12157 |
-# if @REPLACE_MEMMEM@ |
12158 |
+#if 0 |
12159 |
+# if 0 |
12160 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
12161 |
# define memmem rpl_memmem |
12162 |
# endif |
12163 |
@@ -259,7 +783,7 @@ _GL_CXXALIAS_RPL (memmem, void *, |
12164 |
(void const *__haystack, size_t __haystack_len, |
12165 |
void const *__needle, size_t __needle_len)); |
12166 |
# else |
12167 |
-# if ! @HAVE_DECL_MEMMEM@ |
12168 |
+# if ! 1 |
12169 |
_GL_FUNCDECL_SYS (memmem, void *, |
12170 |
(void const *__haystack, size_t __haystack_len, |
12171 |
void const *__needle, size_t __needle_len) |
12172 |
@@ -282,8 +806,8 @@ _GL_WARN_ON_USE (memmem, "memmem is unportable and often quadratic - " |
12173 |
|
12174 |
/* Copy N bytes of SRC to DEST, return pointer to bytes after the |
12175 |
last written byte. */ |
12176 |
-#if @GNULIB_MEMPCPY@ |
12177 |
-# if ! @HAVE_MEMPCPY@ |
12178 |
+#if 1 |
12179 |
+# if ! 0 |
12180 |
_GL_FUNCDECL_SYS (mempcpy, void *, |
12181 |
(void *restrict __dest, void const *restrict __src, |
12182 |
size_t __n) |
12183 |
@@ -302,8 +826,8 @@ _GL_WARN_ON_USE (mempcpy, "mempcpy is unportable - " |
12184 |
#endif |
12185 |
|
12186 |
/* Search backwards through a block for a byte (specified as an int). */ |
12187 |
-#if @GNULIB_MEMRCHR@ |
12188 |
-# if ! @HAVE_DECL_MEMRCHR@ |
12189 |
+#if 1 |
12190 |
+# if ! 1 |
12191 |
_GL_FUNCDECL_SYS (memrchr, void *, (void const *, int, size_t) |
12192 |
_GL_ATTRIBUTE_PURE |
12193 |
_GL_ARG_NONNULL ((1))); |
12194 |
@@ -315,9 +839,10 @@ _GL_CXXALIAS_SYS_CAST2 (memrchr, |
12195 |
void *, (void const *, int, size_t), |
12196 |
void const *, (void const *, int, size_t)); |
12197 |
# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ |
12198 |
- && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) |
12199 |
-_GL_CXXALIASWARN1 (memrchr, void *, (void *, int, size_t)); |
12200 |
-_GL_CXXALIASWARN1 (memrchr, void const *, (void const *, int, size_t)); |
12201 |
+ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ |
12202 |
+ || defined __clang__) |
12203 |
+_GL_CXXALIASWARN1 (memrchr, void *, (void *, int, size_t) throw ()); |
12204 |
+_GL_CXXALIASWARN1 (memrchr, void const *, (void const *, int, size_t) throw ()); |
12205 |
# else |
12206 |
_GL_CXXALIASWARN (memrchr); |
12207 |
# endif |
12208 |
@@ -332,8 +857,8 @@ _GL_WARN_ON_USE (memrchr, "memrchr is unportable - " |
12209 |
/* Find the first occurrence of C in S. More efficient than |
12210 |
memchr(S,C,N), at the expense of undefined behavior if C does not |
12211 |
occur within N bytes. */ |
12212 |
-#if @GNULIB_RAWMEMCHR@ |
12213 |
-# if ! @HAVE_RAWMEMCHR@ |
12214 |
+#if 1 |
12215 |
+# if ! 0 |
12216 |
_GL_FUNCDECL_SYS (rawmemchr, void *, (void const *__s, int __c_in) |
12217 |
_GL_ATTRIBUTE_PURE |
12218 |
_GL_ARG_NONNULL ((1))); |
12219 |
@@ -345,9 +870,11 @@ _GL_CXXALIAS_SYS_CAST2 (rawmemchr, |
12220 |
void *, (void const *__s, int __c_in), |
12221 |
void const *, (void const *__s, int __c_in)); |
12222 |
# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ |
12223 |
- && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) |
12224 |
-_GL_CXXALIASWARN1 (rawmemchr, void *, (void *__s, int __c_in)); |
12225 |
-_GL_CXXALIASWARN1 (rawmemchr, void const *, (void const *__s, int __c_in)); |
12226 |
+ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ |
12227 |
+ || defined __clang__) |
12228 |
+_GL_CXXALIASWARN1 (rawmemchr, void *, (void *__s, int __c_in) throw ()); |
12229 |
+_GL_CXXALIASWARN1 (rawmemchr, void const *, |
12230 |
+ (void const *__s, int __c_in) throw ()); |
12231 |
# else |
12232 |
_GL_CXXALIASWARN (rawmemchr); |
12233 |
# endif |
12234 |
@@ -360,8 +887,8 @@ _GL_WARN_ON_USE (rawmemchr, "rawmemchr is unportable - " |
12235 |
#endif |
12236 |
|
12237 |
/* Copy SRC to DST, returning the address of the terminating '\0' in DST. */ |
12238 |
-#if @GNULIB_STPCPY@ |
12239 |
-# if ! @HAVE_STPCPY@ |
12240 |
+#if 0 |
12241 |
+# if ! 1 |
12242 |
_GL_FUNCDECL_SYS (stpcpy, char *, |
12243 |
(char *restrict __dst, char const *restrict __src) |
12244 |
_GL_ARG_NONNULL ((1, 2))); |
12245 |
@@ -379,8 +906,8 @@ _GL_WARN_ON_USE (stpcpy, "stpcpy is unportable - " |
12246 |
|
12247 |
/* Copy no more than N bytes of SRC to DST, returning a pointer past the |
12248 |
last non-NUL byte written into DST. */ |
12249 |
-#if @GNULIB_STPNCPY@ |
12250 |
-# if @REPLACE_STPNCPY@ |
12251 |
+#if 0 |
12252 |
+# if 0 |
12253 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
12254 |
# undef stpncpy |
12255 |
# define stpncpy rpl_stpncpy |
12256 |
@@ -393,7 +920,7 @@ _GL_CXXALIAS_RPL (stpncpy, char *, |
12257 |
(char *restrict __dst, char const *restrict __src, |
12258 |
size_t __n)); |
12259 |
# else |
12260 |
-# if ! @HAVE_STPNCPY@ |
12261 |
+# if ! 1 |
12262 |
_GL_FUNCDECL_SYS (stpncpy, char *, |
12263 |
(char *restrict __dst, char const *restrict __src, |
12264 |
size_t __n) |
12265 |
@@ -425,8 +952,8 @@ _GL_WARN_ON_USE_CXX (strchr, |
12266 |
#endif |
12267 |
|
12268 |
/* Find the first occurrence of C in S or the final NUL byte. */ |
12269 |
-#if @GNULIB_STRCHRNUL@ |
12270 |
-# if @REPLACE_STRCHRNUL@ |
12271 |
+#if 0 |
12272 |
+# if 0 |
12273 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
12274 |
# define strchrnul rpl_strchrnul |
12275 |
# endif |
12276 |
@@ -436,7 +963,7 @@ _GL_FUNCDECL_RPL (strchrnul, char *, (const char *__s, int __c_in) |
12277 |
_GL_CXXALIAS_RPL (strchrnul, char *, |
12278 |
(const char *str, int ch)); |
12279 |
# else |
12280 |
-# if ! @HAVE_STRCHRNUL@ |
12281 |
+# if ! 1 |
12282 |
_GL_FUNCDECL_SYS (strchrnul, char *, (char const *__s, int __c_in) |
12283 |
_GL_ATTRIBUTE_PURE |
12284 |
_GL_ARG_NONNULL ((1))); |
12285 |
@@ -449,9 +976,11 @@ _GL_CXXALIAS_SYS_CAST2 (strchrnul, |
12286 |
char const *, (char const *__s, int __c_in)); |
12287 |
# endif |
12288 |
# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ |
12289 |
- && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) |
12290 |
-_GL_CXXALIASWARN1 (strchrnul, char *, (char *__s, int __c_in)); |
12291 |
-_GL_CXXALIASWARN1 (strchrnul, char const *, (char const *__s, int __c_in)); |
12292 |
+ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ |
12293 |
+ || defined __clang__) |
12294 |
+_GL_CXXALIASWARN1 (strchrnul, char *, (char *__s, int __c_in) throw ()); |
12295 |
+_GL_CXXALIASWARN1 (strchrnul, char const *, |
12296 |
+ (char const *__s, int __c_in) throw ()); |
12297 |
# else |
12298 |
_GL_CXXALIASWARN (strchrnul); |
12299 |
# endif |
12300 |
@@ -464,8 +993,8 @@ _GL_WARN_ON_USE (strchrnul, "strchrnul is unportable - " |
12301 |
#endif |
12302 |
|
12303 |
/* Duplicate S, returning an identical malloc'd string. */ |
12304 |
-#if @GNULIB_STRDUP@ |
12305 |
-# if @REPLACE_STRDUP@ |
12306 |
+#if 1 |
12307 |
+# if 1 |
12308 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
12309 |
# undef strdup |
12310 |
# define strdup rpl_strdup |
12311 |
@@ -486,7 +1015,7 @@ _GL_CXXALIAS_MDA (strdup, char *, (char const *__s)); |
12312 |
/* strdup exists as a function and as a macro. Get rid of the macro. */ |
12313 |
# undef strdup |
12314 |
# endif |
12315 |
-# if (!@HAVE_DECL_STRDUP@ || __GNUC__ >= 11) && !defined strdup |
12316 |
+# if (!1 || __GNUC__ >= 11) && !defined strdup |
12317 |
_GL_FUNCDECL_SYS (strdup, char *, |
12318 |
(char const *__s) |
12319 |
_GL_ARG_NONNULL ((1)) |
12320 |
@@ -509,7 +1038,7 @@ _GL_FUNCDECL_SYS (strdup, char *, |
12321 |
_GL_WARN_ON_USE (strdup, "strdup is unportable - " |
12322 |
"use gnulib module strdup for portability"); |
12323 |
# endif |
12324 |
-# elif @GNULIB_MDA_STRDUP@ |
12325 |
+# elif 1 |
12326 |
/* On native Windows, map 'creat' to '_creat', so that -loldnames is not |
12327 |
required. In C++ with GNULIB_NAMESPACE, avoid differences between |
12328 |
platforms by defining GNULIB_NAMESPACE::strdup always. */ |
12329 |
@@ -530,8 +1059,8 @@ _GL_CXXALIASWARN (strdup); |
12330 |
#endif |
12331 |
|
12332 |
/* Append no more than N characters from SRC onto DEST. */ |
12333 |
-#if @GNULIB_STRNCAT@ |
12334 |
-# if @REPLACE_STRNCAT@ |
12335 |
+#if 1 |
12336 |
+# if 0 |
12337 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
12338 |
# undef strncat |
12339 |
# define strncat rpl_strncat |
12340 |
@@ -557,8 +1086,8 @@ _GL_WARN_ON_USE (strncat, "strncat is unportable - " |
12341 |
#endif |
12342 |
|
12343 |
/* Return a newly allocated copy of at most N bytes of STRING. */ |
12344 |
-#if @GNULIB_STRNDUP@ |
12345 |
-# if @REPLACE_STRNDUP@ |
12346 |
+#if 0 |
12347 |
+# if 0 |
12348 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
12349 |
# undef strndup |
12350 |
# define strndup rpl_strndup |
12351 |
@@ -569,7 +1098,7 @@ _GL_FUNCDECL_RPL (strndup, char *, |
12352 |
_GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); |
12353 |
_GL_CXXALIAS_RPL (strndup, char *, (char const *__s, size_t __n)); |
12354 |
# else |
12355 |
-# if !@HAVE_DECL_STRNDUP@ || __GNUC__ >= 11 |
12356 |
+# if !1 || (__GNUC__ >= 11 && !defined strndup) |
12357 |
_GL_FUNCDECL_SYS (strndup, char *, |
12358 |
(char const *__s, size_t __n) |
12359 |
_GL_ARG_NONNULL ((1)) |
12360 |
@@ -579,7 +1108,7 @@ _GL_CXXALIAS_SYS (strndup, char *, (char const *__s, size_t __n)); |
12361 |
# endif |
12362 |
_GL_CXXALIASWARN (strndup); |
12363 |
#else |
12364 |
-# if __GNUC__ >= 11 |
12365 |
+# if __GNUC__ >= 11 && !defined strndup |
12366 |
/* For -Wmismatched-dealloc: Associate strndup with free or rpl_free. */ |
12367 |
_GL_FUNCDECL_SYS (strndup, char *, |
12368 |
(char const *__s, size_t __n) |
12369 |
@@ -598,8 +1127,8 @@ _GL_WARN_ON_USE (strndup, "strndup is unportable - " |
12370 |
/* Find the length (number of bytes) of STRING, but scan at most |
12371 |
MAXLEN bytes. If no '\0' terminator is found in that many bytes, |
12372 |
return MAXLEN. */ |
12373 |
-#if @GNULIB_STRNLEN@ |
12374 |
-# if @REPLACE_STRNLEN@ |
12375 |
+#if 0 |
12376 |
+# if 0 |
12377 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
12378 |
# undef strnlen |
12379 |
# define strnlen rpl_strnlen |
12380 |
@@ -609,7 +1138,7 @@ _GL_FUNCDECL_RPL (strnlen, size_t, (char const *__s, size_t __maxlen) |
12381 |
_GL_ARG_NONNULL ((1))); |
12382 |
_GL_CXXALIAS_RPL (strnlen, size_t, (char const *__s, size_t __maxlen)); |
12383 |
# else |
12384 |
-# if ! @HAVE_DECL_STRNLEN@ |
12385 |
+# if ! 1 |
12386 |
_GL_FUNCDECL_SYS (strnlen, size_t, (char const *__s, size_t __maxlen) |
12387 |
_GL_ATTRIBUTE_PURE |
12388 |
_GL_ARG_NONNULL ((1))); |
12389 |
@@ -638,8 +1167,8 @@ _GL_WARN_ON_USE (strcspn, "strcspn cannot work correctly on character strings " |
12390 |
#endif |
12391 |
|
12392 |
/* Find the first occurrence in S of any character in ACCEPT. */ |
12393 |
-#if @GNULIB_STRPBRK@ |
12394 |
-# if ! @HAVE_STRPBRK@ |
12395 |
+#if 0 |
12396 |
+# if ! 1 |
12397 |
_GL_FUNCDECL_SYS (strpbrk, char *, (char const *__s, char const *__accept) |
12398 |
_GL_ATTRIBUTE_PURE |
12399 |
_GL_ARG_NONNULL ((1, 2))); |
12400 |
@@ -651,10 +1180,11 @@ _GL_CXXALIAS_SYS_CAST2 (strpbrk, |
12401 |
char *, (char const *__s, char const *__accept), |
12402 |
const char *, (char const *__s, char const *__accept)); |
12403 |
# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ |
12404 |
- && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) |
12405 |
-_GL_CXXALIASWARN1 (strpbrk, char *, (char *__s, char const *__accept)); |
12406 |
+ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ |
12407 |
+ || defined __clang__) |
12408 |
+_GL_CXXALIASWARN1 (strpbrk, char *, (char *__s, char const *__accept) throw ()); |
12409 |
_GL_CXXALIASWARN1 (strpbrk, char const *, |
12410 |
- (char const *__s, char const *__accept)); |
12411 |
+ (char const *__s, char const *__accept) throw ()); |
12412 |
# elif __GLIBC__ >= 2 |
12413 |
_GL_CXXALIASWARN (strpbrk); |
12414 |
# endif |
12415 |
@@ -718,8 +1248,8 @@ _GL_WARN_ON_USE_CXX (strrchr, |
12416 |
characters are ASCII characters < 0x30. |
12417 |
|
12418 |
See also strtok_r(). */ |
12419 |
-#if @GNULIB_STRSEP@ |
12420 |
-# if ! @HAVE_STRSEP@ |
12421 |
+#if 0 |
12422 |
+# if ! 1 |
12423 |
_GL_FUNCDECL_SYS (strsep, char *, |
12424 |
(char **restrict __stringp, char const *restrict __delim) |
12425 |
_GL_ARG_NONNULL ((1, 2))); |
12426 |
@@ -741,8 +1271,8 @@ _GL_WARN_ON_USE (strsep, "strsep is unportable - " |
12427 |
# endif |
12428 |
#endif |
12429 |
|
12430 |
-#if @GNULIB_STRSTR@ |
12431 |
-# if @REPLACE_STRSTR@ |
12432 |
+#if 0 |
12433 |
+# if 0 |
12434 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
12435 |
# define strstr rpl_strstr |
12436 |
# endif |
12437 |
@@ -759,10 +1289,12 @@ _GL_CXXALIAS_SYS_CAST2 (strstr, |
12438 |
const char *, (const char *haystack, const char *needle)); |
12439 |
# endif |
12440 |
# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ |
12441 |
- && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) |
12442 |
-_GL_CXXALIASWARN1 (strstr, char *, (char *haystack, const char *needle)); |
12443 |
+ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ |
12444 |
+ || defined __clang__) |
12445 |
+_GL_CXXALIASWARN1 (strstr, char *, |
12446 |
+ (char *haystack, const char *needle) throw ()); |
12447 |
_GL_CXXALIASWARN1 (strstr, const char *, |
12448 |
- (const char *haystack, const char *needle)); |
12449 |
+ (const char *haystack, const char *needle) throw ()); |
12450 |
# elif __GLIBC__ >= 2 |
12451 |
_GL_CXXALIASWARN (strstr); |
12452 |
# endif |
12453 |
@@ -782,8 +1314,8 @@ _GL_WARN_ON_USE (strstr, "strstr is quadratic on many systems, and cannot " |
12454 |
|
12455 |
/* Find the first occurrence of NEEDLE in HAYSTACK, using case-insensitive |
12456 |
comparison. */ |
12457 |
-#if @GNULIB_STRCASESTR@ |
12458 |
-# if @REPLACE_STRCASESTR@ |
12459 |
+#if 1 |
12460 |
+# if 0 |
12461 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
12462 |
# define strcasestr rpl_strcasestr |
12463 |
# endif |
12464 |
@@ -794,7 +1326,7 @@ _GL_FUNCDECL_RPL (strcasestr, char *, |
12465 |
_GL_CXXALIAS_RPL (strcasestr, char *, |
12466 |
(const char *haystack, const char *needle)); |
12467 |
# else |
12468 |
-# if ! @HAVE_STRCASESTR@ |
12469 |
+# if ! 1 |
12470 |
_GL_FUNCDECL_SYS (strcasestr, char *, |
12471 |
(const char *haystack, const char *needle) |
12472 |
_GL_ATTRIBUTE_PURE |
12473 |
@@ -808,10 +1340,12 @@ _GL_CXXALIAS_SYS_CAST2 (strcasestr, |
12474 |
const char *, (const char *haystack, const char *needle)); |
12475 |
# endif |
12476 |
# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ |
12477 |
- && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) |
12478 |
-_GL_CXXALIASWARN1 (strcasestr, char *, (char *haystack, const char *needle)); |
12479 |
+ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ |
12480 |
+ || defined __clang__) |
12481 |
+_GL_CXXALIASWARN1 (strcasestr, char *, |
12482 |
+ (char *haystack, const char *needle) throw ()); |
12483 |
_GL_CXXALIASWARN1 (strcasestr, const char *, |
12484 |
- (const char *haystack, const char *needle)); |
12485 |
+ (const char *haystack, const char *needle) throw ()); |
12486 |
# else |
12487 |
_GL_CXXALIASWARN (strcasestr); |
12488 |
# endif |
12489 |
@@ -851,8 +1385,8 @@ _GL_WARN_ON_USE (strcasestr, "strcasestr does work correctly on character " |
12490 |
characters are ASCII characters < 0x30. |
12491 |
|
12492 |
See also strsep(). */ |
12493 |
-#if @GNULIB_STRTOK_R@ |
12494 |
-# if @REPLACE_STRTOK_R@ |
12495 |
+#if 0 |
12496 |
+# if 0 |
12497 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
12498 |
# undef strtok_r |
12499 |
# define strtok_r rpl_strtok_r |
12500 |
@@ -865,10 +1399,10 @@ _GL_CXXALIAS_RPL (strtok_r, char *, |
12501 |
(char *restrict s, char const *restrict delim, |
12502 |
char **restrict save_ptr)); |
12503 |
# else |
12504 |
-# if @UNDEFINE_STRTOK_R@ || defined GNULIB_POSIXCHECK |
12505 |
+# if 0 || defined GNULIB_POSIXCHECK |
12506 |
# undef strtok_r |
12507 |
# endif |
12508 |
-# if ! @HAVE_DECL_STRTOK_R@ |
12509 |
+# if ! 1 |
12510 |
_GL_FUNCDECL_SYS (strtok_r, char *, |
12511 |
(char *restrict s, char const *restrict delim, |
12512 |
char **restrict save_ptr) |
12513 |
@@ -896,13 +1430,13 @@ _GL_WARN_ON_USE (strtok_r, "strtok_r is unportable - " |
12514 |
/* The following functions are not specified by POSIX. They are gnulib |
12515 |
extensions. */ |
12516 |
|
12517 |
-#if @GNULIB_MBSLEN@ |
12518 |
+#if 0 |
12519 |
/* Return the number of multibyte characters in the character string STRING. |
12520 |
This considers multibyte characters, unlike strlen, which counts bytes. */ |
12521 |
# ifdef __MirBSD__ /* MirBSD defines mbslen as a macro. Override it. */ |
12522 |
# undef mbslen |
12523 |
# endif |
12524 |
-# if @HAVE_MBSLEN@ /* AIX, OSF/1, MirBSD define mbslen already in libc. */ |
12525 |
+# if 0 /* AIX, OSF/1, MirBSD define mbslen already in libc. */ |
12526 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
12527 |
# define mbslen rpl_mbslen |
12528 |
# endif |
12529 |
@@ -919,7 +1453,7 @@ _GL_CXXALIAS_SYS (mbslen, size_t, (const char *string)); |
12530 |
_GL_CXXALIASWARN (mbslen); |
12531 |
#endif |
12532 |
|
12533 |
-#if @GNULIB_MBSNLEN@ |
12534 |
+#if 0 |
12535 |
/* Return the number of multibyte characters in the character string starting |
12536 |
at STRING and ending at STRING + LEN. */ |
12537 |
_GL_EXTERN_C size_t mbsnlen (const char *string, size_t len) |
12538 |
@@ -927,7 +1461,7 @@ _GL_EXTERN_C size_t mbsnlen (const char *string, size_t len) |
12539 |
_GL_ARG_NONNULL ((1)); |
12540 |
#endif |
12541 |
|
12542 |
-#if @GNULIB_MBSCHR@ |
12543 |
+#if 0 |
12544 |
/* Locate the first single-byte character C in the character string STRING, |
12545 |
and return a pointer to it. Return NULL if C is not found in STRING. |
12546 |
Unlike strchr(), this function works correctly in multibyte locales with |
12547 |
@@ -949,7 +1483,7 @@ _GL_CXXALIAS_SYS (mbschr, char *, (const char *string, int c)); |
12548 |
_GL_CXXALIASWARN (mbschr); |
12549 |
#endif |
12550 |
|
12551 |
-#if @GNULIB_MBSRCHR@ |
12552 |
+#if 0 |
12553 |
/* Locate the last single-byte character C in the character string STRING, |
12554 |
and return a pointer to it. Return NULL if C is not found in STRING. |
12555 |
Unlike strrchr(), this function works correctly in multibyte locales with |
12556 |
@@ -971,7 +1505,7 @@ _GL_CXXALIAS_SYS (mbsrchr, char *, (const char *string, int c)); |
12557 |
_GL_CXXALIASWARN (mbsrchr); |
12558 |
#endif |
12559 |
|
12560 |
-#if @GNULIB_MBSSTR@ |
12561 |
+#if 0 |
12562 |
/* Find the first occurrence of the character string NEEDLE in the character |
12563 |
string HAYSTACK. Return NULL if NEEDLE is not found in HAYSTACK. |
12564 |
Unlike strstr(), this function works correctly in multibyte locales with |
12565 |
@@ -981,7 +1515,7 @@ _GL_EXTERN_C char * mbsstr (const char *haystack, const char *needle) |
12566 |
_GL_ARG_NONNULL ((1, 2)); |
12567 |
#endif |
12568 |
|
12569 |
-#if @GNULIB_MBSCASECMP@ |
12570 |
+#if 0 |
12571 |
/* Compare the character strings S1 and S2, ignoring case, returning less than, |
12572 |
equal to or greater than zero if S1 is lexicographically less than, equal to |
12573 |
or greater than S2. |
12574 |
@@ -993,7 +1527,7 @@ _GL_EXTERN_C int mbscasecmp (const char *s1, const char *s2) |
12575 |
_GL_ARG_NONNULL ((1, 2)); |
12576 |
#endif |
12577 |
|
12578 |
-#if @GNULIB_MBSNCASECMP@ |
12579 |
+#if 0 |
12580 |
/* Compare the initial segment of the character string S1 consisting of at most |
12581 |
N characters with the initial segment of the character string S2 consisting |
12582 |
of at most N characters, ignoring case, returning less than, equal to or |
12583 |
@@ -1008,7 +1542,7 @@ _GL_EXTERN_C int mbsncasecmp (const char *s1, const char *s2, size_t n) |
12584 |
_GL_ARG_NONNULL ((1, 2)); |
12585 |
#endif |
12586 |
|
12587 |
-#if @GNULIB_MBSPCASECMP@ |
12588 |
+#if 0 |
12589 |
/* Compare the initial segment of the character string STRING consisting of |
12590 |
at most mbslen (PREFIX) characters with the character string PREFIX, |
12591 |
ignoring case. If the two match, return a pointer to the first byte |
12592 |
@@ -1022,7 +1556,7 @@ _GL_EXTERN_C char * mbspcasecmp (const char *string, const char *prefix) |
12593 |
_GL_ARG_NONNULL ((1, 2)); |
12594 |
#endif |
12595 |
|
12596 |
-#if @GNULIB_MBSCASESTR@ |
12597 |
+#if 0 |
12598 |
/* Find the first occurrence of the character string NEEDLE in the character |
12599 |
string HAYSTACK, using case-insensitive comparison. |
12600 |
Note: This function may, in multibyte locales, return success even if |
12601 |
@@ -1033,7 +1567,7 @@ _GL_EXTERN_C char * mbscasestr (const char *haystack, const char *needle) |
12602 |
_GL_ARG_NONNULL ((1, 2)); |
12603 |
#endif |
12604 |
|
12605 |
-#if @GNULIB_MBSCSPN@ |
12606 |
+#if 0 |
12607 |
/* Find the first occurrence in the character string STRING of any character |
12608 |
in the character string ACCEPT. Return the number of bytes from the |
12609 |
beginning of the string to this occurrence, or to the end of the string |
12610 |
@@ -1044,7 +1578,7 @@ _GL_EXTERN_C size_t mbscspn (const char *string, const char *accept) |
12611 |
_GL_ARG_NONNULL ((1, 2)); |
12612 |
#endif |
12613 |
|
12614 |
-#if @GNULIB_MBSPBRK@ |
12615 |
+#if 0 |
12616 |
/* Find the first occurrence in the character string STRING of any character |
12617 |
in the character string ACCEPT. Return the pointer to it, or NULL if none |
12618 |
exists. |
12619 |
@@ -1066,7 +1600,7 @@ _GL_CXXALIAS_SYS (mbspbrk, char *, (const char *string, const char *accept)); |
12620 |
_GL_CXXALIASWARN (mbspbrk); |
12621 |
#endif |
12622 |
|
12623 |
-#if @GNULIB_MBSSPN@ |
12624 |
+#if 0 |
12625 |
/* Find the first occurrence in the character string STRING of any character |
12626 |
not in the character string REJECT. Return the number of bytes from the |
12627 |
beginning of the string to this occurrence, or to the end of the string |
12628 |
@@ -1077,7 +1611,7 @@ _GL_EXTERN_C size_t mbsspn (const char *string, const char *reject) |
12629 |
_GL_ARG_NONNULL ((1, 2)); |
12630 |
#endif |
12631 |
|
12632 |
-#if @GNULIB_MBSSEP@ |
12633 |
+#if 0 |
12634 |
/* Search the next delimiter (multibyte character listed in the character |
12635 |
string DELIM) starting at the character string *STRINGP. |
12636 |
If one is found, overwrite it with a NUL, and advance *STRINGP to point |
12637 |
@@ -1096,7 +1630,7 @@ _GL_EXTERN_C char * mbssep (char **stringp, const char *delim) |
12638 |
_GL_ARG_NONNULL ((1, 2)); |
12639 |
#endif |
12640 |
|
12641 |
-#if @GNULIB_MBSTOK_R@ |
12642 |
+#if 0 |
12643 |
/* Parse the character string STRING into tokens separated by characters in |
12644 |
the character string DELIM. |
12645 |
If STRING is NULL, the saved pointer in SAVE_PTR is used as |
12646 |
@@ -1119,8 +1653,8 @@ _GL_EXTERN_C char * mbstok_r (char *restrict string, const char *delim, |
12647 |
#endif |
12648 |
|
12649 |
/* Map any int, typically from errno, into an error message. */ |
12650 |
-#if @GNULIB_STRERROR@ |
12651 |
-# if @REPLACE_STRERROR@ |
12652 |
+#if 1 |
12653 |
+# if 0 |
12654 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
12655 |
# undef strerror |
12656 |
# define strerror rpl_strerror |
12657 |
@@ -1142,8 +1676,8 @@ _GL_WARN_ON_USE (strerror, "strerror is unportable - " |
12658 |
|
12659 |
/* Map any int, typically from errno, into an error message. Multithread-safe. |
12660 |
Uses the POSIX declaration, not the glibc declaration. */ |
12661 |
-#if @GNULIB_STRERROR_R@ |
12662 |
-# if @REPLACE_STRERROR_R@ |
12663 |
+#if 0 |
12664 |
+# if 0 |
12665 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
12666 |
# undef strerror_r |
12667 |
# define strerror_r rpl_strerror_r |
12668 |
@@ -1152,13 +1686,13 @@ _GL_FUNCDECL_RPL (strerror_r, int, (int errnum, char *buf, size_t buflen) |
12669 |
_GL_ARG_NONNULL ((2))); |
12670 |
_GL_CXXALIAS_RPL (strerror_r, int, (int errnum, char *buf, size_t buflen)); |
12671 |
# else |
12672 |
-# if !@HAVE_DECL_STRERROR_R@ |
12673 |
+# if !1 |
12674 |
_GL_FUNCDECL_SYS (strerror_r, int, (int errnum, char *buf, size_t buflen) |
12675 |
_GL_ARG_NONNULL ((2))); |
12676 |
# endif |
12677 |
_GL_CXXALIAS_SYS (strerror_r, int, (int errnum, char *buf, size_t buflen)); |
12678 |
# endif |
12679 |
-# if @HAVE_DECL_STRERROR_R@ |
12680 |
+# if 1 |
12681 |
_GL_CXXALIASWARN (strerror_r); |
12682 |
# endif |
12683 |
#elif defined GNULIB_POSIXCHECK |
12684 |
@@ -1170,8 +1704,8 @@ _GL_WARN_ON_USE (strerror_r, "strerror_r is unportable - " |
12685 |
#endif |
12686 |
|
12687 |
/* Return the name of the system error code ERRNUM. */ |
12688 |
-#if @GNULIB_STRERRORNAME_NP@ |
12689 |
-# if @REPLACE_STRERRORNAME_NP@ |
12690 |
+#if 0 |
12691 |
+# if 0 |
12692 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
12693 |
# undef strerrorname_np |
12694 |
# define strerrorname_np rpl_strerrorname_np |
12695 |
@@ -1179,7 +1713,7 @@ _GL_WARN_ON_USE (strerror_r, "strerror_r is unportable - " |
12696 |
_GL_FUNCDECL_RPL (strerrorname_np, const char *, (int errnum)); |
12697 |
_GL_CXXALIAS_RPL (strerrorname_np, const char *, (int errnum)); |
12698 |
# else |
12699 |
-# if !@HAVE_STRERRORNAME_NP@ |
12700 |
+# if !1 |
12701 |
_GL_FUNCDECL_SYS (strerrorname_np, const char *, (int errnum)); |
12702 |
# endif |
12703 |
_GL_CXXALIAS_SYS (strerrorname_np, const char *, (int errnum)); |
12704 |
@@ -1194,8 +1728,8 @@ _GL_WARN_ON_USE (strerrorname_np, "strerrorname_np is unportable - " |
12705 |
#endif |
12706 |
|
12707 |
/* Return an abbreviation string for the signal number SIG. */ |
12708 |
-#if @GNULIB_SIGABBREV_NP@ |
12709 |
-# if ! @HAVE_SIGABBREV_NP@ |
12710 |
+#if 0 |
12711 |
+# if ! 1 |
12712 |
_GL_FUNCDECL_SYS (sigabbrev_np, const char *, (int sig)); |
12713 |
# endif |
12714 |
_GL_CXXALIAS_SYS (sigabbrev_np, const char *, (int sig)); |
12715 |
@@ -1209,8 +1743,8 @@ _GL_WARN_ON_USE (sigabbrev_np, "sigabbrev_np is unportable - " |
12716 |
#endif |
12717 |
|
12718 |
/* Return an English description string for the signal number SIG. */ |
12719 |
-#if @GNULIB_SIGDESCR_NP@ |
12720 |
-# if ! @HAVE_SIGDESCR_NP@ |
12721 |
+#if 0 |
12722 |
+# if ! 1 |
12723 |
_GL_FUNCDECL_SYS (sigdescr_np, const char *, (int sig)); |
12724 |
# endif |
12725 |
_GL_CXXALIAS_SYS (sigdescr_np, const char *, (int sig)); |
12726 |
@@ -1223,15 +1757,15 @@ _GL_WARN_ON_USE (sigdescr_np, "sigdescr_np is unportable - " |
12727 |
# endif |
12728 |
#endif |
12729 |
|
12730 |
-#if @GNULIB_STRSIGNAL@ |
12731 |
-# if @REPLACE_STRSIGNAL@ |
12732 |
+#if 0 |
12733 |
+# if 0 |
12734 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
12735 |
# define strsignal rpl_strsignal |
12736 |
# endif |
12737 |
_GL_FUNCDECL_RPL (strsignal, char *, (int __sig)); |
12738 |
_GL_CXXALIAS_RPL (strsignal, char *, (int __sig)); |
12739 |
# else |
12740 |
-# if ! @HAVE_DECL_STRSIGNAL@ |
12741 |
+# if ! 1 |
12742 |
_GL_FUNCDECL_SYS (strsignal, char *, (int __sig)); |
12743 |
# endif |
12744 |
/* Need to cast, because on Cygwin 1.5.x systems, the return type is |
12745 |
@@ -1247,8 +1781,8 @@ _GL_WARN_ON_USE (strsignal, "strsignal is unportable - " |
12746 |
# endif |
12747 |
#endif |
12748 |
|
12749 |
-#if @GNULIB_STRVERSCMP@ |
12750 |
-# if !@HAVE_STRVERSCMP@ |
12751 |
+#if 0 |
12752 |
+# if !1 |
12753 |
_GL_FUNCDECL_SYS (strverscmp, int, (const char *, const char *) |
12754 |
_GL_ATTRIBUTE_PURE |
12755 |
_GL_ARG_NONNULL ((1, 2))); |
12756 |
@@ -1264,6 +1798,6 @@ _GL_WARN_ON_USE (strverscmp, "strverscmp is unportable - " |
12757 |
#endif |
12758 |
|
12759 |
|
12760 |
-#endif /* _@GUARD_PREFIX@_STRING_H */ |
12761 |
-#endif /* _@GUARD_PREFIX@_STRING_H */ |
12762 |
+#endif /* _GL_STRING_H */ |
12763 |
+#endif /* _GL_STRING_H */ |
12764 |
#endif |
12765 |
|
12766 |
diff --git a/autotools/gnulib/string.in.h b/autotools/gnulib/string.in.h |
12767 |
index c943294..3996da9 100644 |
12768 |
--- a/autotools/gnulib/string.in.h |
12769 |
+++ b/autotools/gnulib/string.in.h |
12770 |
@@ -122,17 +122,33 @@ _GL_EXTERN_C void rpl_free (void *); |
12771 |
# undef _GL_ATTRIBUTE_DEALLOC_FREE |
12772 |
# define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (rpl_free, 1) |
12773 |
# else |
12774 |
-# if defined _MSC_VER |
12775 |
-_GL_EXTERN_C void __cdecl free (void *); |
12776 |
+# if defined _MSC_VER && !defined free |
12777 |
+_GL_EXTERN_C |
12778 |
+# if defined _DLL |
12779 |
+ __declspec (dllimport) |
12780 |
+# endif |
12781 |
+ void __cdecl free (void *); |
12782 |
# else |
12783 |
+# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) |
12784 |
+_GL_EXTERN_C void free (void *) throw (); |
12785 |
+# else |
12786 |
_GL_EXTERN_C void free (void *); |
12787 |
+# endif |
12788 |
# endif |
12789 |
# endif |
12790 |
#else |
12791 |
-# if defined _MSC_VER |
12792 |
-_GL_EXTERN_C void __cdecl free (void *); |
12793 |
+# if defined _MSC_VER && !defined free |
12794 |
+_GL_EXTERN_C |
12795 |
+# if defined _DLL |
12796 |
+ __declspec (dllimport) |
12797 |
+# endif |
12798 |
+ void __cdecl free (void *); |
12799 |
# else |
12800 |
+# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) |
12801 |
+_GL_EXTERN_C void free (void *) throw (); |
12802 |
+# else |
12803 |
_GL_EXTERN_C void free (void *); |
12804 |
+# endif |
12805 |
# endif |
12806 |
#endif |
12807 |
|
12808 |
@@ -230,10 +246,11 @@ _GL_CXXALIAS_SYS_CAST2 (memchr, |
12809 |
void const *, (void const *__s, int __c, size_t __n)); |
12810 |
# endif |
12811 |
# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ |
12812 |
- && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) |
12813 |
-_GL_CXXALIASWARN1 (memchr, void *, (void *__s, int __c, size_t __n)); |
12814 |
+ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ |
12815 |
+ || defined __clang__) |
12816 |
+_GL_CXXALIASWARN1 (memchr, void *, (void *__s, int __c, size_t __n) throw ()); |
12817 |
_GL_CXXALIASWARN1 (memchr, void const *, |
12818 |
- (void const *__s, int __c, size_t __n)); |
12819 |
+ (void const *__s, int __c, size_t __n) throw ()); |
12820 |
# elif __GLIBC__ >= 2 |
12821 |
_GL_CXXALIASWARN (memchr); |
12822 |
# endif |
12823 |
@@ -315,9 +332,10 @@ _GL_CXXALIAS_SYS_CAST2 (memrchr, |
12824 |
void *, (void const *, int, size_t), |
12825 |
void const *, (void const *, int, size_t)); |
12826 |
# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ |
12827 |
- && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) |
12828 |
-_GL_CXXALIASWARN1 (memrchr, void *, (void *, int, size_t)); |
12829 |
-_GL_CXXALIASWARN1 (memrchr, void const *, (void const *, int, size_t)); |
12830 |
+ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ |
12831 |
+ || defined __clang__) |
12832 |
+_GL_CXXALIASWARN1 (memrchr, void *, (void *, int, size_t) throw ()); |
12833 |
+_GL_CXXALIASWARN1 (memrchr, void const *, (void const *, int, size_t) throw ()); |
12834 |
# else |
12835 |
_GL_CXXALIASWARN (memrchr); |
12836 |
# endif |
12837 |
@@ -345,9 +363,11 @@ _GL_CXXALIAS_SYS_CAST2 (rawmemchr, |
12838 |
void *, (void const *__s, int __c_in), |
12839 |
void const *, (void const *__s, int __c_in)); |
12840 |
# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ |
12841 |
- && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) |
12842 |
-_GL_CXXALIASWARN1 (rawmemchr, void *, (void *__s, int __c_in)); |
12843 |
-_GL_CXXALIASWARN1 (rawmemchr, void const *, (void const *__s, int __c_in)); |
12844 |
+ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ |
12845 |
+ || defined __clang__) |
12846 |
+_GL_CXXALIASWARN1 (rawmemchr, void *, (void *__s, int __c_in) throw ()); |
12847 |
+_GL_CXXALIASWARN1 (rawmemchr, void const *, |
12848 |
+ (void const *__s, int __c_in) throw ()); |
12849 |
# else |
12850 |
_GL_CXXALIASWARN (rawmemchr); |
12851 |
# endif |
12852 |
@@ -449,9 +469,11 @@ _GL_CXXALIAS_SYS_CAST2 (strchrnul, |
12853 |
char const *, (char const *__s, int __c_in)); |
12854 |
# endif |
12855 |
# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ |
12856 |
- && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) |
12857 |
-_GL_CXXALIASWARN1 (strchrnul, char *, (char *__s, int __c_in)); |
12858 |
-_GL_CXXALIASWARN1 (strchrnul, char const *, (char const *__s, int __c_in)); |
12859 |
+ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ |
12860 |
+ || defined __clang__) |
12861 |
+_GL_CXXALIASWARN1 (strchrnul, char *, (char *__s, int __c_in) throw ()); |
12862 |
+_GL_CXXALIASWARN1 (strchrnul, char const *, |
12863 |
+ (char const *__s, int __c_in) throw ()); |
12864 |
# else |
12865 |
_GL_CXXALIASWARN (strchrnul); |
12866 |
# endif |
12867 |
@@ -569,7 +591,7 @@ _GL_FUNCDECL_RPL (strndup, char *, |
12868 |
_GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); |
12869 |
_GL_CXXALIAS_RPL (strndup, char *, (char const *__s, size_t __n)); |
12870 |
# else |
12871 |
-# if !@HAVE_DECL_STRNDUP@ || __GNUC__ >= 11 |
12872 |
+# if !@HAVE_DECL_STRNDUP@ || (__GNUC__ >= 11 && !defined strndup) |
12873 |
_GL_FUNCDECL_SYS (strndup, char *, |
12874 |
(char const *__s, size_t __n) |
12875 |
_GL_ARG_NONNULL ((1)) |
12876 |
@@ -579,7 +601,7 @@ _GL_CXXALIAS_SYS (strndup, char *, (char const *__s, size_t __n)); |
12877 |
# endif |
12878 |
_GL_CXXALIASWARN (strndup); |
12879 |
#else |
12880 |
-# if __GNUC__ >= 11 |
12881 |
+# if __GNUC__ >= 11 && !defined strndup |
12882 |
/* For -Wmismatched-dealloc: Associate strndup with free or rpl_free. */ |
12883 |
_GL_FUNCDECL_SYS (strndup, char *, |
12884 |
(char const *__s, size_t __n) |
12885 |
@@ -651,10 +673,11 @@ _GL_CXXALIAS_SYS_CAST2 (strpbrk, |
12886 |
char *, (char const *__s, char const *__accept), |
12887 |
const char *, (char const *__s, char const *__accept)); |
12888 |
# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ |
12889 |
- && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) |
12890 |
-_GL_CXXALIASWARN1 (strpbrk, char *, (char *__s, char const *__accept)); |
12891 |
+ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ |
12892 |
+ || defined __clang__) |
12893 |
+_GL_CXXALIASWARN1 (strpbrk, char *, (char *__s, char const *__accept) throw ()); |
12894 |
_GL_CXXALIASWARN1 (strpbrk, char const *, |
12895 |
- (char const *__s, char const *__accept)); |
12896 |
+ (char const *__s, char const *__accept) throw ()); |
12897 |
# elif __GLIBC__ >= 2 |
12898 |
_GL_CXXALIASWARN (strpbrk); |
12899 |
# endif |
12900 |
@@ -759,10 +782,12 @@ _GL_CXXALIAS_SYS_CAST2 (strstr, |
12901 |
const char *, (const char *haystack, const char *needle)); |
12902 |
# endif |
12903 |
# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ |
12904 |
- && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) |
12905 |
-_GL_CXXALIASWARN1 (strstr, char *, (char *haystack, const char *needle)); |
12906 |
+ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ |
12907 |
+ || defined __clang__) |
12908 |
+_GL_CXXALIASWARN1 (strstr, char *, |
12909 |
+ (char *haystack, const char *needle) throw ()); |
12910 |
_GL_CXXALIASWARN1 (strstr, const char *, |
12911 |
- (const char *haystack, const char *needle)); |
12912 |
+ (const char *haystack, const char *needle) throw ()); |
12913 |
# elif __GLIBC__ >= 2 |
12914 |
_GL_CXXALIASWARN (strstr); |
12915 |
# endif |
12916 |
@@ -808,10 +833,12 @@ _GL_CXXALIAS_SYS_CAST2 (strcasestr, |
12917 |
const char *, (const char *haystack, const char *needle)); |
12918 |
# endif |
12919 |
# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ |
12920 |
- && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) |
12921 |
-_GL_CXXALIASWARN1 (strcasestr, char *, (char *haystack, const char *needle)); |
12922 |
+ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ |
12923 |
+ || defined __clang__) |
12924 |
+_GL_CXXALIASWARN1 (strcasestr, char *, |
12925 |
+ (char *haystack, const char *needle) throw ()); |
12926 |
_GL_CXXALIASWARN1 (strcasestr, const char *, |
12927 |
- (const char *haystack, const char *needle)); |
12928 |
+ (const char *haystack, const char *needle) throw ()); |
12929 |
# else |
12930 |
_GL_CXXALIASWARN (strcasestr); |
12931 |
# endif |
12932 |
|
12933 |
diff --git a/autotools/gnulib/strings.h b/autotools/gnulib/strings.h |
12934 |
new file mode 100644 |
12935 |
index 0000000..c708df4 |
12936 |
--- /dev/null |
12937 |
+++ b/autotools/gnulib/strings.h |
12938 |
@@ -0,0 +1,629 @@ |
12939 |
+/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ |
12940 |
+/* A substitute <strings.h>. |
12941 |
+ |
12942 |
+ Copyright (C) 2007-2022 Free Software Foundation, Inc. |
12943 |
+ |
12944 |
+ This file is free software: you can redistribute it and/or modify |
12945 |
+ it under the terms of the GNU Lesser General Public License as |
12946 |
+ published by the Free Software Foundation; either version 2.1 of the |
12947 |
+ License, or (at your option) any later version. |
12948 |
+ |
12949 |
+ This file is distributed in the hope that it will be useful, |
12950 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
12951 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12952 |
+ GNU Lesser General Public License for more details. |
12953 |
+ |
12954 |
+ You should have received a copy of the GNU Lesser General Public License |
12955 |
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
12956 |
+ |
12957 |
+#ifndef _GL_STRINGS_H |
12958 |
+ |
12959 |
+#if __GNUC__ >= 3 |
12960 |
+#pragma GCC system_header |
12961 |
+#endif |
12962 |
+ |
12963 |
+ |
12964 |
+/* Minix 3.1.8 has a bug: <sys/types.h> must be included before <strings.h>. |
12965 |
+ But avoid namespace pollution on glibc systems. */ |
12966 |
+#if defined __minix && !defined __GLIBC__ |
12967 |
+# include <sys/types.h> |
12968 |
+#endif |
12969 |
+ |
12970 |
+/* The include_next requires a split double-inclusion guard. */ |
12971 |
+#if 1 |
12972 |
+# include_next <strings.h> |
12973 |
+#endif |
12974 |
+ |
12975 |
+#ifndef _GL_STRINGS_H |
12976 |
+#define _GL_STRINGS_H |
12977 |
+ |
12978 |
+#if ! 1 |
12979 |
+/* Get size_t. */ |
12980 |
+# include <stddef.h> |
12981 |
+#endif |
12982 |
+ |
12983 |
+ |
12984 |
+/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ |
12985 |
+/* C++ compatible function declaration macros. |
12986 |
+ Copyright (C) 2010-2022 Free Software Foundation, Inc. |
12987 |
+ |
12988 |
+ This program is free software: you can redistribute it and/or modify it |
12989 |
+ under the terms of the GNU Lesser General Public License as published |
12990 |
+ by the Free Software Foundation; either version 2 of the License, or |
12991 |
+ (at your option) any later version. |
12992 |
+ |
12993 |
+ This program is distributed in the hope that it will be useful, |
12994 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
12995 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
12996 |
+ Lesser General Public License for more details. |
12997 |
+ |
12998 |
+ You should have received a copy of the GNU Lesser General Public License |
12999 |
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
13000 |
+ |
13001 |
+#ifndef _GL_CXXDEFS_H |
13002 |
+#define _GL_CXXDEFS_H |
13003 |
+ |
13004 |
+/* Begin/end the GNULIB_NAMESPACE namespace. */ |
13005 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
13006 |
+# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { |
13007 |
+# define _GL_END_NAMESPACE } |
13008 |
+#else |
13009 |
+# define _GL_BEGIN_NAMESPACE |
13010 |
+# define _GL_END_NAMESPACE |
13011 |
+#endif |
13012 |
+ |
13013 |
+/* The three most frequent use cases of these macros are: |
13014 |
+ |
13015 |
+ * For providing a substitute for a function that is missing on some |
13016 |
+ platforms, but is declared and works fine on the platforms on which |
13017 |
+ it exists: |
13018 |
+ |
13019 |
+ #if @GNULIB_FOO@ |
13020 |
+ # if !@HAVE_FOO@ |
13021 |
+ _GL_FUNCDECL_SYS (foo, ...); |
13022 |
+ # endif |
13023 |
+ _GL_CXXALIAS_SYS (foo, ...); |
13024 |
+ _GL_CXXALIASWARN (foo); |
13025 |
+ #elif defined GNULIB_POSIXCHECK |
13026 |
+ ... |
13027 |
+ #endif |
13028 |
+ |
13029 |
+ * For providing a replacement for a function that exists on all platforms, |
13030 |
+ but is broken/insufficient and needs to be replaced on some platforms: |
13031 |
+ |
13032 |
+ #if @GNULIB_FOO@ |
13033 |
+ # if @REPLACE_FOO@ |
13034 |
+ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
13035 |
+ # undef foo |
13036 |
+ # define foo rpl_foo |
13037 |
+ # endif |
13038 |
+ _GL_FUNCDECL_RPL (foo, ...); |
13039 |
+ _GL_CXXALIAS_RPL (foo, ...); |
13040 |
+ # else |
13041 |
+ _GL_CXXALIAS_SYS (foo, ...); |
13042 |
+ # endif |
13043 |
+ _GL_CXXALIASWARN (foo); |
13044 |
+ #elif defined GNULIB_POSIXCHECK |
13045 |
+ ... |
13046 |
+ #endif |
13047 |
+ |
13048 |
+ * For providing a replacement for a function that exists on some platforms |
13049 |
+ but is broken/insufficient and needs to be replaced on some of them and |
13050 |
+ is additionally either missing or undeclared on some other platforms: |
13051 |
+ |
13052 |
+ #if @GNULIB_FOO@ |
13053 |
+ # if @REPLACE_FOO@ |
13054 |
+ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
13055 |
+ # undef foo |
13056 |
+ # define foo rpl_foo |
13057 |
+ # endif |
13058 |
+ _GL_FUNCDECL_RPL (foo, ...); |
13059 |
+ _GL_CXXALIAS_RPL (foo, ...); |
13060 |
+ # else |
13061 |
+ # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ |
13062 |
+ _GL_FUNCDECL_SYS (foo, ...); |
13063 |
+ # endif |
13064 |
+ _GL_CXXALIAS_SYS (foo, ...); |
13065 |
+ # endif |
13066 |
+ _GL_CXXALIASWARN (foo); |
13067 |
+ #elif defined GNULIB_POSIXCHECK |
13068 |
+ ... |
13069 |
+ #endif |
13070 |
+*/ |
13071 |
+ |
13072 |
+/* _GL_EXTERN_C declaration; |
13073 |
+ performs the declaration with C linkage. */ |
13074 |
+#if defined __cplusplus |
13075 |
+# define _GL_EXTERN_C extern "C" |
13076 |
+#else |
13077 |
+# define _GL_EXTERN_C extern |
13078 |
+#endif |
13079 |
+ |
13080 |
+/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); |
13081 |
+ declares a replacement function, named rpl_func, with the given prototype, |
13082 |
+ consisting of return type, parameters, and attributes. |
13083 |
+ Example: |
13084 |
+ _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) |
13085 |
+ _GL_ARG_NONNULL ((1))); |
13086 |
+ */ |
13087 |
+#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ |
13088 |
+ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) |
13089 |
+#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ |
13090 |
+ _GL_EXTERN_C rettype rpl_func parameters_and_attributes |
13091 |
+ |
13092 |
+/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); |
13093 |
+ declares the system function, named func, with the given prototype, |
13094 |
+ consisting of return type, parameters, and attributes. |
13095 |
+ Example: |
13096 |
+ _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) |
13097 |
+ _GL_ARG_NONNULL ((1))); |
13098 |
+ */ |
13099 |
+#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ |
13100 |
+ _GL_EXTERN_C rettype func parameters_and_attributes |
13101 |
+ |
13102 |
+/* _GL_CXXALIAS_RPL (func, rettype, parameters); |
13103 |
+ declares a C++ alias called GNULIB_NAMESPACE::func |
13104 |
+ that redirects to rpl_func, if GNULIB_NAMESPACE is defined. |
13105 |
+ Example: |
13106 |
+ _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); |
13107 |
+ |
13108 |
+ Wrapping rpl_func in an object with an inline conversion operator |
13109 |
+ avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is |
13110 |
+ actually used in the program. */ |
13111 |
+#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ |
13112 |
+ _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) |
13113 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
13114 |
+# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ |
13115 |
+ namespace GNULIB_NAMESPACE \ |
13116 |
+ { \ |
13117 |
+ static const struct _gl_ ## func ## _wrapper \ |
13118 |
+ { \ |
13119 |
+ typedef rettype (*type) parameters; \ |
13120 |
+ \ |
13121 |
+ inline operator type () const \ |
13122 |
+ { \ |
13123 |
+ return ::rpl_func; \ |
13124 |
+ } \ |
13125 |
+ } func = {}; \ |
13126 |
+ } \ |
13127 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
13128 |
+#else |
13129 |
+# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ |
13130 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
13131 |
+#endif |
13132 |
+ |
13133 |
+/* _GL_CXXALIAS_MDA (func, rettype, parameters); |
13134 |
+ is to be used when func is a Microsoft deprecated alias, on native Windows. |
13135 |
+ It declares a C++ alias called GNULIB_NAMESPACE::func |
13136 |
+ that redirects to _func, if GNULIB_NAMESPACE is defined. |
13137 |
+ Example: |
13138 |
+ _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); |
13139 |
+ */ |
13140 |
+#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ |
13141 |
+ _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) |
13142 |
+ |
13143 |
+/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); |
13144 |
+ is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); |
13145 |
+ except that the C function rpl_func may have a slightly different |
13146 |
+ declaration. A cast is used to silence the "invalid conversion" error |
13147 |
+ that would otherwise occur. */ |
13148 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
13149 |
+# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ |
13150 |
+ namespace GNULIB_NAMESPACE \ |
13151 |
+ { \ |
13152 |
+ static const struct _gl_ ## func ## _wrapper \ |
13153 |
+ { \ |
13154 |
+ typedef rettype (*type) parameters; \ |
13155 |
+ \ |
13156 |
+ inline operator type () const \ |
13157 |
+ { \ |
13158 |
+ return reinterpret_cast<type>(::rpl_func); \ |
13159 |
+ } \ |
13160 |
+ } func = {}; \ |
13161 |
+ } \ |
13162 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
13163 |
+#else |
13164 |
+# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ |
13165 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
13166 |
+#endif |
13167 |
+ |
13168 |
+/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); |
13169 |
+ is like _GL_CXXALIAS_MDA (func, rettype, parameters); |
13170 |
+ except that the C function func may have a slightly different declaration. |
13171 |
+ A cast is used to silence the "invalid conversion" error that would |
13172 |
+ otherwise occur. */ |
13173 |
+#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ |
13174 |
+ _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) |
13175 |
+ |
13176 |
+/* _GL_CXXALIAS_SYS (func, rettype, parameters); |
13177 |
+ declares a C++ alias called GNULIB_NAMESPACE::func |
13178 |
+ that redirects to the system provided function func, if GNULIB_NAMESPACE |
13179 |
+ is defined. |
13180 |
+ Example: |
13181 |
+ _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); |
13182 |
+ |
13183 |
+ Wrapping func in an object with an inline conversion operator |
13184 |
+ avoids a reference to func unless GNULIB_NAMESPACE::func is |
13185 |
+ actually used in the program. */ |
13186 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
13187 |
+# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ |
13188 |
+ namespace GNULIB_NAMESPACE \ |
13189 |
+ { \ |
13190 |
+ static const struct _gl_ ## func ## _wrapper \ |
13191 |
+ { \ |
13192 |
+ typedef rettype (*type) parameters; \ |
13193 |
+ \ |
13194 |
+ inline operator type () const \ |
13195 |
+ { \ |
13196 |
+ return ::func; \ |
13197 |
+ } \ |
13198 |
+ } func = {}; \ |
13199 |
+ } \ |
13200 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
13201 |
+#else |
13202 |
+# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ |
13203 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
13204 |
+#endif |
13205 |
+ |
13206 |
+/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); |
13207 |
+ is like _GL_CXXALIAS_SYS (func, rettype, parameters); |
13208 |
+ except that the C function func may have a slightly different declaration. |
13209 |
+ A cast is used to silence the "invalid conversion" error that would |
13210 |
+ otherwise occur. */ |
13211 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
13212 |
+# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ |
13213 |
+ namespace GNULIB_NAMESPACE \ |
13214 |
+ { \ |
13215 |
+ static const struct _gl_ ## func ## _wrapper \ |
13216 |
+ { \ |
13217 |
+ typedef rettype (*type) parameters; \ |
13218 |
+ \ |
13219 |
+ inline operator type () const \ |
13220 |
+ { \ |
13221 |
+ return reinterpret_cast<type>(::func); \ |
13222 |
+ } \ |
13223 |
+ } func = {}; \ |
13224 |
+ } \ |
13225 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
13226 |
+#else |
13227 |
+# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ |
13228 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
13229 |
+#endif |
13230 |
+ |
13231 |
+/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); |
13232 |
+ is like _GL_CXXALIAS_SYS (func, rettype, parameters); |
13233 |
+ except that the C function is picked among a set of overloaded functions, |
13234 |
+ namely the one with rettype2 and parameters2. Two consecutive casts |
13235 |
+ are used to silence the "cannot find a match" and "invalid conversion" |
13236 |
+ errors that would otherwise occur. */ |
13237 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
13238 |
+ /* The outer cast must be a reinterpret_cast. |
13239 |
+ The inner cast: When the function is defined as a set of overloaded |
13240 |
+ functions, it works as a static_cast<>, choosing the designated variant. |
13241 |
+ When the function is defined as a single variant, it works as a |
13242 |
+ reinterpret_cast<>. The parenthesized cast syntax works both ways. */ |
13243 |
+# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ |
13244 |
+ namespace GNULIB_NAMESPACE \ |
13245 |
+ { \ |
13246 |
+ static const struct _gl_ ## func ## _wrapper \ |
13247 |
+ { \ |
13248 |
+ typedef rettype (*type) parameters; \ |
13249 |
+ \ |
13250 |
+ inline operator type () const \ |
13251 |
+ { \ |
13252 |
+ return reinterpret_cast<type>((rettype2 (*) parameters2)(::func)); \ |
13253 |
+ } \ |
13254 |
+ } func = {}; \ |
13255 |
+ } \ |
13256 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
13257 |
+#else |
13258 |
+# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ |
13259 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
13260 |
+#endif |
13261 |
+ |
13262 |
+/* _GL_CXXALIASWARN (func); |
13263 |
+ causes a warning to be emitted when ::func is used but not when |
13264 |
+ GNULIB_NAMESPACE::func is used. func must be defined without overloaded |
13265 |
+ variants. */ |
13266 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
13267 |
+# define _GL_CXXALIASWARN(func) \ |
13268 |
+ _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) |
13269 |
+# define _GL_CXXALIASWARN_1(func,namespace) \ |
13270 |
+ _GL_CXXALIASWARN_2 (func, namespace) |
13271 |
+/* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>, |
13272 |
+ we enable the warning only when not optimizing. */ |
13273 |
+# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) |
13274 |
+# define _GL_CXXALIASWARN_2(func,namespace) \ |
13275 |
+ _GL_WARN_ON_USE (func, \ |
13276 |
+ "The symbol ::" #func " refers to the system function. " \ |
13277 |
+ "Use " #namespace "::" #func " instead.") |
13278 |
+# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING |
13279 |
+# define _GL_CXXALIASWARN_2(func,namespace) \ |
13280 |
+ extern __typeof__ (func) func |
13281 |
+# else |
13282 |
+# define _GL_CXXALIASWARN_2(func,namespace) \ |
13283 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
13284 |
+# endif |
13285 |
+#else |
13286 |
+# define _GL_CXXALIASWARN(func) \ |
13287 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
13288 |
+#endif |
13289 |
+ |
13290 |
+/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); |
13291 |
+ causes a warning to be emitted when the given overloaded variant of ::func |
13292 |
+ is used but not when GNULIB_NAMESPACE::func is used. */ |
13293 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
13294 |
+# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ |
13295 |
+ _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ |
13296 |
+ GNULIB_NAMESPACE) |
13297 |
+# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ |
13298 |
+ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) |
13299 |
+/* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>, |
13300 |
+ we enable the warning only when not optimizing. */ |
13301 |
+# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) |
13302 |
+# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ |
13303 |
+ _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ |
13304 |
+ "The symbol ::" #func " refers to the system function. " \ |
13305 |
+ "Use " #namespace "::" #func " instead.") |
13306 |
+# else |
13307 |
+# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ |
13308 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
13309 |
+# endif |
13310 |
+#else |
13311 |
+# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ |
13312 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
13313 |
+#endif |
13314 |
+ |
13315 |
+#endif /* _GL_CXXDEFS_H */ |
13316 |
+ |
13317 |
+/* The definition of _GL_ARG_NONNULL is copied here. */ |
13318 |
+/* A C macro for declaring that specific arguments must not be NULL. |
13319 |
+ Copyright (C) 2009-2022 Free Software Foundation, Inc. |
13320 |
+ |
13321 |
+ This program is free software: you can redistribute it and/or modify it |
13322 |
+ under the terms of the GNU Lesser General Public License as published |
13323 |
+ by the Free Software Foundation; either version 2 of the License, or |
13324 |
+ (at your option) any later version. |
13325 |
+ |
13326 |
+ This program is distributed in the hope that it will be useful, |
13327 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
13328 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13329 |
+ Lesser General Public License for more details. |
13330 |
+ |
13331 |
+ You should have received a copy of the GNU Lesser General Public License |
13332 |
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
13333 |
+ |
13334 |
+/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools |
13335 |
+ that the values passed as arguments n, ..., m must be non-NULL pointers. |
13336 |
+ n = 1 stands for the first argument, n = 2 for the second argument etc. */ |
13337 |
+#ifndef _GL_ARG_NONNULL |
13338 |
+# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ |
13339 |
+# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) |
13340 |
+# else |
13341 |
+# define _GL_ARG_NONNULL(params) |
13342 |
+# endif |
13343 |
+#endif |
13344 |
+ |
13345 |
+/* The definition of _GL_WARN_ON_USE is copied here. */ |
13346 |
+/* A C macro for emitting warnings if a function is used. |
13347 |
+ Copyright (C) 2010-2022 Free Software Foundation, Inc. |
13348 |
+ |
13349 |
+ This program is free software: you can redistribute it and/or modify it |
13350 |
+ under the terms of the GNU Lesser General Public License as published |
13351 |
+ by the Free Software Foundation; either version 2 of the License, or |
13352 |
+ (at your option) any later version. |
13353 |
+ |
13354 |
+ This program is distributed in the hope that it will be useful, |
13355 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
13356 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13357 |
+ Lesser General Public License for more details. |
13358 |
+ |
13359 |
+ You should have received a copy of the GNU Lesser General Public License |
13360 |
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
13361 |
+ |
13362 |
+/* _GL_WARN_ON_USE (function, "literal string") issues a declaration |
13363 |
+ for FUNCTION which will then trigger a compiler warning containing |
13364 |
+ the text of "literal string" anywhere that function is called, if |
13365 |
+ supported by the compiler. If the compiler does not support this |
13366 |
+ feature, the macro expands to an unused extern declaration. |
13367 |
+ |
13368 |
+ _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the |
13369 |
+ attribute used in _GL_WARN_ON_USE. If the compiler does not support |
13370 |
+ this feature, it expands to empty. |
13371 |
+ |
13372 |
+ These macros are useful for marking a function as a potential |
13373 |
+ portability trap, with the intent that "literal string" include |
13374 |
+ instructions on the replacement function that should be used |
13375 |
+ instead. |
13376 |
+ _GL_WARN_ON_USE is for functions with 'extern' linkage. |
13377 |
+ _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline' |
13378 |
+ linkage. |
13379 |
+ |
13380 |
+ However, one of the reasons that a function is a portability trap is |
13381 |
+ if it has the wrong signature. Declaring FUNCTION with a different |
13382 |
+ signature in C is a compilation error, so this macro must use the |
13383 |
+ same type as any existing declaration so that programs that avoid |
13384 |
+ the problematic FUNCTION do not fail to compile merely because they |
13385 |
+ included a header that poisoned the function. But this implies that |
13386 |
+ _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already |
13387 |
+ have a declaration. Use of this macro implies that there must not |
13388 |
+ be any other macro hiding the declaration of FUNCTION; but |
13389 |
+ undefining FUNCTION first is part of the poisoning process anyway |
13390 |
+ (although for symbols that are provided only via a macro, the result |
13391 |
+ is a compilation error rather than a warning containing |
13392 |
+ "literal string"). Also note that in C++, it is only safe to use if |
13393 |
+ FUNCTION has no overloads. |
13394 |
+ |
13395 |
+ For an example, it is possible to poison 'getline' by: |
13396 |
+ - adding a call to gl_WARN_ON_USE_PREPARE([[#include <stdio.h>]], |
13397 |
+ [getline]) in configure.ac, which potentially defines |
13398 |
+ HAVE_RAW_DECL_GETLINE |
13399 |
+ - adding this code to a header that wraps the system <stdio.h>: |
13400 |
+ #undef getline |
13401 |
+ #if HAVE_RAW_DECL_GETLINE |
13402 |
+ _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" |
13403 |
+ "not universally present; use the gnulib module getline"); |
13404 |
+ #endif |
13405 |
+ |
13406 |
+ It is not possible to directly poison global variables. But it is |
13407 |
+ possible to write a wrapper accessor function, and poison that |
13408 |
+ (less common usage, like &environ, will cause a compilation error |
13409 |
+ rather than issue the nice warning, but the end result of informing |
13410 |
+ the developer about their portability problem is still achieved): |
13411 |
+ #if HAVE_RAW_DECL_ENVIRON |
13412 |
+ static char *** |
13413 |
+ rpl_environ (void) { return &environ; } |
13414 |
+ _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); |
13415 |
+ # undef environ |
13416 |
+ # define environ (*rpl_environ ()) |
13417 |
+ #endif |
13418 |
+ or better (avoiding contradictory use of 'static' and 'extern'): |
13419 |
+ #if HAVE_RAW_DECL_ENVIRON |
13420 |
+ static char *** |
13421 |
+ _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared") |
13422 |
+ rpl_environ (void) { return &environ; } |
13423 |
+ # undef environ |
13424 |
+ # define environ (*rpl_environ ()) |
13425 |
+ #endif |
13426 |
+ */ |
13427 |
+#ifndef _GL_WARN_ON_USE |
13428 |
+ |
13429 |
+# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) |
13430 |
+/* A compiler attribute is available in gcc versions 4.3.0 and later. */ |
13431 |
+# define _GL_WARN_ON_USE(function, message) \ |
13432 |
+_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) |
13433 |
+# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ |
13434 |
+ __attribute__ ((__warning__ (message))) |
13435 |
+# elif __clang_major__ >= 4 |
13436 |
+/* Another compiler attribute is available in clang. */ |
13437 |
+# define _GL_WARN_ON_USE(function, message) \ |
13438 |
+_GL_WARN_EXTERN_C __typeof__ (function) function \ |
13439 |
+ __attribute__ ((__diagnose_if__ (1, message, "warning"))) |
13440 |
+# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ |
13441 |
+ __attribute__ ((__diagnose_if__ (1, message, "warning"))) |
13442 |
+# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING |
13443 |
+/* Verify the existence of the function. */ |
13444 |
+# define _GL_WARN_ON_USE(function, message) \ |
13445 |
+_GL_WARN_EXTERN_C __typeof__ (function) function |
13446 |
+# define _GL_WARN_ON_USE_ATTRIBUTE(message) |
13447 |
+# else /* Unsupported. */ |
13448 |
+# define _GL_WARN_ON_USE(function, message) \ |
13449 |
+_GL_WARN_EXTERN_C int _gl_warn_on_use |
13450 |
+# define _GL_WARN_ON_USE_ATTRIBUTE(message) |
13451 |
+# endif |
13452 |
+#endif |
13453 |
+ |
13454 |
+/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") |
13455 |
+ is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the |
13456 |
+ function is declared with the given prototype, consisting of return type, |
13457 |
+ parameters, and attributes. |
13458 |
+ This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does |
13459 |
+ not work in this case. */ |
13460 |
+#ifndef _GL_WARN_ON_USE_CXX |
13461 |
+# if !defined __cplusplus |
13462 |
+# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ |
13463 |
+ _GL_WARN_ON_USE (function, msg) |
13464 |
+# else |
13465 |
+# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) |
13466 |
+/* A compiler attribute is available in gcc versions 4.3.0 and later. */ |
13467 |
+# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ |
13468 |
+extern rettype_gcc function parameters_and_attributes \ |
13469 |
+ __attribute__ ((__warning__ (msg))) |
13470 |
+# elif __clang_major__ >= 4 |
13471 |
+/* Another compiler attribute is available in clang. */ |
13472 |
+# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ |
13473 |
+extern rettype_clang function parameters_and_attributes \ |
13474 |
+ __attribute__ ((__diagnose_if__ (1, msg, "warning"))) |
13475 |
+# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING |
13476 |
+/* Verify the existence of the function. */ |
13477 |
+# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ |
13478 |
+extern rettype_gcc function parameters_and_attributes |
13479 |
+# else /* Unsupported. */ |
13480 |
+# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ |
13481 |
+_GL_WARN_EXTERN_C int _gl_warn_on_use |
13482 |
+# endif |
13483 |
+# endif |
13484 |
+#endif |
13485 |
+ |
13486 |
+/* _GL_WARN_EXTERN_C declaration; |
13487 |
+ performs the declaration with C linkage. */ |
13488 |
+#ifndef _GL_WARN_EXTERN_C |
13489 |
+# if defined __cplusplus |
13490 |
+# define _GL_WARN_EXTERN_C extern "C" |
13491 |
+# else |
13492 |
+# define _GL_WARN_EXTERN_C extern |
13493 |
+# endif |
13494 |
+#endif |
13495 |
+ |
13496 |
+#ifdef __cplusplus |
13497 |
+extern "C" { |
13498 |
+#endif |
13499 |
+ |
13500 |
+ |
13501 |
+ /* Find the index of the least-significant set bit. */ |
13502 |
+#if 0 |
13503 |
+# if !1 |
13504 |
+_GL_FUNCDECL_SYS (ffs, int, (int i)); |
13505 |
+# endif |
13506 |
+_GL_CXXALIAS_SYS (ffs, int, (int i)); |
13507 |
+_GL_CXXALIASWARN (ffs); |
13508 |
+#elif defined GNULIB_POSIXCHECK |
13509 |
+# undef ffs |
13510 |
+# if HAVE_RAW_DECL_FFS |
13511 |
+_GL_WARN_ON_USE (ffs, "ffs is not portable - use the ffs module"); |
13512 |
+# endif |
13513 |
+#endif |
13514 |
+ |
13515 |
+/* Compare strings S1 and S2, ignoring case, returning less than, equal to or |
13516 |
+ greater than zero if S1 is lexicographically less than, equal to or greater |
13517 |
+ than S2. |
13518 |
+ Note: This function does not work in multibyte locales. */ |
13519 |
+#if ! 1 |
13520 |
+extern int strcasecmp (char const *s1, char const *s2) |
13521 |
+ _GL_ARG_NONNULL ((1, 2)); |
13522 |
+#endif |
13523 |
+#if defined GNULIB_POSIXCHECK |
13524 |
+/* strcasecmp() does not work with multibyte strings: |
13525 |
+ POSIX says that it operates on "strings", and "string" in POSIX is defined |
13526 |
+ as a sequence of bytes, not of characters. */ |
13527 |
+# undef strcasecmp |
13528 |
+# if HAVE_RAW_DECL_STRCASECMP |
13529 |
+_GL_WARN_ON_USE (strcasecmp, "strcasecmp cannot work correctly on character " |
13530 |
+ "strings in multibyte locales - " |
13531 |
+ "use mbscasecmp if you care about " |
13532 |
+ "internationalization, or use c_strcasecmp , " |
13533 |
+ "gnulib module c-strcase) if you want a locale " |
13534 |
+ "independent function"); |
13535 |
+# endif |
13536 |
+#endif |
13537 |
+ |
13538 |
+/* Compare no more than N bytes of strings S1 and S2, ignoring case, |
13539 |
+ returning less than, equal to or greater than zero if S1 is |
13540 |
+ lexicographically less than, equal to or greater than S2. |
13541 |
+ Note: This function cannot work correctly in multibyte locales. */ |
13542 |
+#if ! 1 |
13543 |
+extern int strncasecmp (char const *s1, char const *s2, size_t n) |
13544 |
+ _GL_ARG_NONNULL ((1, 2)); |
13545 |
+#endif |
13546 |
+#if defined GNULIB_POSIXCHECK |
13547 |
+/* strncasecmp() does not work with multibyte strings: |
13548 |
+ POSIX says that it operates on "strings", and "string" in POSIX is defined |
13549 |
+ as a sequence of bytes, not of characters. */ |
13550 |
+# undef strncasecmp |
13551 |
+# if HAVE_RAW_DECL_STRNCASECMP |
13552 |
+_GL_WARN_ON_USE (strncasecmp, "strncasecmp cannot work correctly on character " |
13553 |
+ "strings in multibyte locales - " |
13554 |
+ "use mbsncasecmp or mbspcasecmp if you care about " |
13555 |
+ "internationalization, or use c_strncasecmp , " |
13556 |
+ "gnulib module c-strcase) if you want a locale " |
13557 |
+ "independent function"); |
13558 |
+# endif |
13559 |
+#endif |
13560 |
+ |
13561 |
+ |
13562 |
+#ifdef __cplusplus |
13563 |
+} |
13564 |
+#endif |
13565 |
+ |
13566 |
+#endif /* _GL_STRING_H */ |
13567 |
+#endif /* _GL_STRING_H */ |
13568 |
|
13569 |
diff --git a/autotools/gnulib/strtol.c b/autotools/gnulib/strtol.c |
13570 |
new file mode 100644 |
13571 |
index 0000000..6c2e933 |
13572 |
--- /dev/null |
13573 |
+++ b/autotools/gnulib/strtol.c |
13574 |
@@ -0,0 +1,408 @@ |
13575 |
+/* Convert string representation of a number into an integer value. |
13576 |
+ |
13577 |
+ Copyright (C) 1991-1992, 1994-1999, 2003, 2005-2007, 2009-2022 Free Software |
13578 |
+ Foundation, Inc. |
13579 |
+ |
13580 |
+ NOTE: The canonical source of this file is maintained with the GNU C |
13581 |
+ Library. Bugs can be reported to bug-glibc@×××.org. |
13582 |
+ |
13583 |
+ This file is free software: you can redistribute it and/or modify |
13584 |
+ it under the terms of the GNU Lesser General Public License as |
13585 |
+ published by the Free Software Foundation, either version 3 of the |
13586 |
+ License, or (at your option) any later version. |
13587 |
+ |
13588 |
+ This file is distributed in the hope that it will be useful, |
13589 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
13590 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13591 |
+ GNU Lesser General Public License for more details. |
13592 |
+ |
13593 |
+ You should have received a copy of the GNU Lesser General Public License |
13594 |
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
13595 |
+ |
13596 |
+#ifdef _LIBC |
13597 |
+# define USE_NUMBER_GROUPING |
13598 |
+#else |
13599 |
+# include <config.h> |
13600 |
+#endif |
13601 |
+ |
13602 |
+#include <ctype.h> |
13603 |
+#include <errno.h> |
13604 |
+#ifndef __set_errno |
13605 |
+# define __set_errno(Val) errno = (Val) |
13606 |
+#endif |
13607 |
+ |
13608 |
+#include <limits.h> |
13609 |
+#include <stddef.h> |
13610 |
+#include <stdlib.h> |
13611 |
+#include <string.h> |
13612 |
+ |
13613 |
+#ifdef USE_NUMBER_GROUPING |
13614 |
+# include "../locale/localeinfo.h" |
13615 |
+#endif |
13616 |
+ |
13617 |
+/* Nonzero if we are defining 'strtoul' or 'strtoull', operating on |
13618 |
+ unsigned integers. */ |
13619 |
+#ifndef UNSIGNED |
13620 |
+# define UNSIGNED 0 |
13621 |
+# define INT LONG int |
13622 |
+#else |
13623 |
+# define INT unsigned LONG int |
13624 |
+#endif |
13625 |
+ |
13626 |
+/* Determine the name. */ |
13627 |
+#ifdef USE_IN_EXTENDED_LOCALE_MODEL |
13628 |
+# undef strtol |
13629 |
+# if UNSIGNED |
13630 |
+# ifdef USE_WIDE_CHAR |
13631 |
+# ifdef QUAD |
13632 |
+# define strtol __wcstoull_l |
13633 |
+# else |
13634 |
+# define strtol __wcstoul_l |
13635 |
+# endif |
13636 |
+# else |
13637 |
+# ifdef QUAD |
13638 |
+# define strtol __strtoull_l |
13639 |
+# else |
13640 |
+# define strtol __strtoul_l |
13641 |
+# endif |
13642 |
+# endif |
13643 |
+# else |
13644 |
+# ifdef USE_WIDE_CHAR |
13645 |
+# ifdef QUAD |
13646 |
+# define strtol __wcstoll_l |
13647 |
+# else |
13648 |
+# define strtol __wcstol_l |
13649 |
+# endif |
13650 |
+# else |
13651 |
+# ifdef QUAD |
13652 |
+# define strtol __strtoll_l |
13653 |
+# else |
13654 |
+# define strtol __strtol_l |
13655 |
+# endif |
13656 |
+# endif |
13657 |
+# endif |
13658 |
+#else |
13659 |
+# if UNSIGNED |
13660 |
+# undef strtol |
13661 |
+# ifdef USE_WIDE_CHAR |
13662 |
+# ifdef QUAD |
13663 |
+# define strtol wcstoull |
13664 |
+# else |
13665 |
+# define strtol wcstoul |
13666 |
+# endif |
13667 |
+# else |
13668 |
+# ifdef QUAD |
13669 |
+# define strtol strtoull |
13670 |
+# else |
13671 |
+# define strtol strtoul |
13672 |
+# endif |
13673 |
+# endif |
13674 |
+# else |
13675 |
+# ifdef USE_WIDE_CHAR |
13676 |
+# undef strtol |
13677 |
+# ifdef QUAD |
13678 |
+# define strtol wcstoll |
13679 |
+# else |
13680 |
+# define strtol wcstol |
13681 |
+# endif |
13682 |
+# else |
13683 |
+# ifdef QUAD |
13684 |
+# undef strtol |
13685 |
+# define strtol strtoll |
13686 |
+# endif |
13687 |
+# endif |
13688 |
+# endif |
13689 |
+#endif |
13690 |
+ |
13691 |
+/* If QUAD is defined, we are defining 'strtoll' or 'strtoull', |
13692 |
+ operating on 'long long int's. */ |
13693 |
+#ifdef QUAD |
13694 |
+# define LONG long long |
13695 |
+# define STRTOL_LONG_MIN LLONG_MIN |
13696 |
+# define STRTOL_LONG_MAX LLONG_MAX |
13697 |
+# define STRTOL_ULONG_MAX ULLONG_MAX |
13698 |
+# if __GNUC__ == 2 && __GNUC_MINOR__ < 7 |
13699 |
+ /* Work around gcc bug with using this constant. */ |
13700 |
+ static const unsigned long long int maxquad = ULLONG_MAX; |
13701 |
+# undef STRTOL_ULONG_MAX |
13702 |
+# define STRTOL_ULONG_MAX maxquad |
13703 |
+# endif |
13704 |
+#else |
13705 |
+# define LONG long |
13706 |
+# define STRTOL_LONG_MIN LONG_MIN |
13707 |
+# define STRTOL_LONG_MAX LONG_MAX |
13708 |
+# define STRTOL_ULONG_MAX ULONG_MAX |
13709 |
+#endif |
13710 |
+ |
13711 |
+ |
13712 |
+#ifdef USE_NUMBER_GROUPING |
13713 |
+# define GROUP_PARAM_PROTO , int group |
13714 |
+#else |
13715 |
+# define GROUP_PARAM_PROTO |
13716 |
+#endif |
13717 |
+ |
13718 |
+/* We use this code also for the extended locale handling where the |
13719 |
+ function gets as an additional argument the locale which has to be |
13720 |
+ used. To access the values we have to redefine the _NL_CURRENT |
13721 |
+ macro. */ |
13722 |
+#ifdef USE_IN_EXTENDED_LOCALE_MODEL |
13723 |
+# undef _NL_CURRENT |
13724 |
+# define _NL_CURRENT(category, item) \ |
13725 |
+ (current->values[_NL_ITEM_INDEX (item)].string) |
13726 |
+# define LOCALE_PARAM , loc |
13727 |
+# define LOCALE_PARAM_PROTO , __locale_t loc |
13728 |
+#else |
13729 |
+# define LOCALE_PARAM |
13730 |
+# define LOCALE_PARAM_PROTO |
13731 |
+#endif |
13732 |
+ |
13733 |
+#ifdef USE_WIDE_CHAR |
13734 |
+# include <wchar.h> |
13735 |
+# include <wctype.h> |
13736 |
+# define L_(Ch) L##Ch |
13737 |
+# define UCHAR_TYPE wint_t |
13738 |
+# define STRING_TYPE wchar_t |
13739 |
+# ifdef USE_IN_EXTENDED_LOCALE_MODEL |
13740 |
+# define ISSPACE(Ch) __iswspace_l ((Ch), loc) |
13741 |
+# define ISALPHA(Ch) __iswalpha_l ((Ch), loc) |
13742 |
+# define TOUPPER(Ch) __towupper_l ((Ch), loc) |
13743 |
+# else |
13744 |
+# define ISSPACE(Ch) iswspace (Ch) |
13745 |
+# define ISALPHA(Ch) iswalpha (Ch) |
13746 |
+# define TOUPPER(Ch) towupper (Ch) |
13747 |
+# endif |
13748 |
+#else |
13749 |
+# define L_(Ch) Ch |
13750 |
+# define UCHAR_TYPE unsigned char |
13751 |
+# define STRING_TYPE char |
13752 |
+# ifdef USE_IN_EXTENDED_LOCALE_MODEL |
13753 |
+# define ISSPACE(Ch) __isspace_l ((unsigned char) (Ch), loc) |
13754 |
+# define ISALPHA(Ch) __isalpha_l ((unsigned char) (Ch), loc) |
13755 |
+# define TOUPPER(Ch) __toupper_l ((unsigned char) (Ch), loc) |
13756 |
+# else |
13757 |
+# define ISSPACE(Ch) isspace ((unsigned char) (Ch)) |
13758 |
+# define ISALPHA(Ch) isalpha ((unsigned char) (Ch)) |
13759 |
+# define TOUPPER(Ch) toupper ((unsigned char) (Ch)) |
13760 |
+# endif |
13761 |
+#endif |
13762 |
+ |
13763 |
+#ifdef USE_NUMBER_GROUPING |
13764 |
+# define INTERNAL(X) INTERNAL1(X) |
13765 |
+# define INTERNAL1(X) __##X##_internal |
13766 |
+# define WEAKNAME(X) WEAKNAME1(X) |
13767 |
+#else |
13768 |
+# define INTERNAL(X) X |
13769 |
+#endif |
13770 |
+ |
13771 |
+#ifdef USE_NUMBER_GROUPING |
13772 |
+/* This file defines a function to check for correct grouping. */ |
13773 |
+# include "grouping.h" |
13774 |
+#endif |
13775 |
+ |
13776 |
+ |
13777 |
+ |
13778 |
+/* Convert NPTR to an 'unsigned long int' or 'long int' in base BASE. |
13779 |
+ If BASE is 0 the base is determined by the presence of a leading |
13780 |
+ zero, indicating octal or a leading "0x" or "0X", indicating hexadecimal. |
13781 |
+ If BASE is < 2 or > 36, it is reset to 10. |
13782 |
+ If ENDPTR is not NULL, a pointer to the character after the last |
13783 |
+ one converted is stored in *ENDPTR. */ |
13784 |
+ |
13785 |
+INT |
13786 |
+INTERNAL (strtol) (const STRING_TYPE *nptr, STRING_TYPE **endptr, |
13787 |
+ int base GROUP_PARAM_PROTO LOCALE_PARAM_PROTO) |
13788 |
+{ |
13789 |
+ int negative; |
13790 |
+ register unsigned LONG int cutoff; |
13791 |
+ register unsigned int cutlim; |
13792 |
+ register unsigned LONG int i; |
13793 |
+ register const STRING_TYPE *s; |
13794 |
+ register UCHAR_TYPE c; |
13795 |
+ const STRING_TYPE *save, *end; |
13796 |
+ int overflow; |
13797 |
+ |
13798 |
+#ifdef USE_NUMBER_GROUPING |
13799 |
+# ifdef USE_IN_EXTENDED_LOCALE_MODEL |
13800 |
+ struct locale_data *current = loc->__locales[LC_NUMERIC]; |
13801 |
+# endif |
13802 |
+ /* The thousands character of the current locale. */ |
13803 |
+ wchar_t thousands = L'\0'; |
13804 |
+ /* The numeric grouping specification of the current locale, |
13805 |
+ in the format described in <locale.h>. */ |
13806 |
+ const char *grouping; |
13807 |
+ |
13808 |
+ if (group) |
13809 |
+ { |
13810 |
+ grouping = _NL_CURRENT (LC_NUMERIC, GROUPING); |
13811 |
+ if (*grouping <= 0 || *grouping == CHAR_MAX) |
13812 |
+ grouping = NULL; |
13813 |
+ else |
13814 |
+ { |
13815 |
+ /* Figure out the thousands separator character. */ |
13816 |
+# if defined _LIBC || defined _HAVE_BTOWC |
13817 |
+ thousands = __btowc (*_NL_CURRENT (LC_NUMERIC, THOUSANDS_SEP)); |
13818 |
+ if (thousands == WEOF) |
13819 |
+ thousands = L'\0'; |
13820 |
+# endif |
13821 |
+ if (thousands == L'\0') |
13822 |
+ grouping = NULL; |
13823 |
+ } |
13824 |
+ } |
13825 |
+ else |
13826 |
+ grouping = NULL; |
13827 |
+#endif |
13828 |
+ |
13829 |
+ if (base < 0 || base == 1 || base > 36) |
13830 |
+ { |
13831 |
+ __set_errno (EINVAL); |
13832 |
+ return 0; |
13833 |
+ } |
13834 |
+ |
13835 |
+ save = s = nptr; |
13836 |
+ |
13837 |
+ /* Skip white space. */ |
13838 |
+ while (ISSPACE (*s)) |
13839 |
+ ++s; |
13840 |
+ if (*s == L_('\0')) |
13841 |
+ goto noconv; |
13842 |
+ |
13843 |
+ /* Check for a sign. */ |
13844 |
+ if (*s == L_('-')) |
13845 |
+ { |
13846 |
+ negative = 1; |
13847 |
+ ++s; |
13848 |
+ } |
13849 |
+ else if (*s == L_('+')) |
13850 |
+ { |
13851 |
+ negative = 0; |
13852 |
+ ++s; |
13853 |
+ } |
13854 |
+ else |
13855 |
+ negative = 0; |
13856 |
+ |
13857 |
+ /* Recognize number prefix and if BASE is zero, figure it out ourselves. */ |
13858 |
+ if (*s == L_('0')) |
13859 |
+ { |
13860 |
+ if ((base == 0 || base == 16) && TOUPPER (s[1]) == L_('X')) |
13861 |
+ { |
13862 |
+ s += 2; |
13863 |
+ base = 16; |
13864 |
+ } |
13865 |
+ else if (base == 0) |
13866 |
+ base = 8; |
13867 |
+ } |
13868 |
+ else if (base == 0) |
13869 |
+ base = 10; |
13870 |
+ |
13871 |
+ /* Save the pointer so we can check later if anything happened. */ |
13872 |
+ save = s; |
13873 |
+ |
13874 |
+#ifdef USE_NUMBER_GROUPING |
13875 |
+ if (group) |
13876 |
+ { |
13877 |
+ /* Find the end of the digit string and check its grouping. */ |
13878 |
+ end = s; |
13879 |
+ for (c = *end; c != L_('\0'); c = *++end) |
13880 |
+ if ((wchar_t) c != thousands |
13881 |
+ && ((wchar_t) c < L_('0') || (wchar_t) c > L_('9')) |
13882 |
+ && (!ISALPHA (c) || (int) (TOUPPER (c) - L_('A') + 10) >= base)) |
13883 |
+ break; |
13884 |
+ if (*s == thousands) |
13885 |
+ end = s; |
13886 |
+ else |
13887 |
+ end = correctly_grouped_prefix (s, end, thousands, grouping); |
13888 |
+ } |
13889 |
+ else |
13890 |
+#endif |
13891 |
+ end = NULL; |
13892 |
+ |
13893 |
+ cutoff = STRTOL_ULONG_MAX / (unsigned LONG int) base; |
13894 |
+ cutlim = STRTOL_ULONG_MAX % (unsigned LONG int) base; |
13895 |
+ |
13896 |
+ overflow = 0; |
13897 |
+ i = 0; |
13898 |
+ for (c = *s; c != L_('\0'); c = *++s) |
13899 |
+ { |
13900 |
+ if (s == end) |
13901 |
+ break; |
13902 |
+ if (c >= L_('0') && c <= L_('9')) |
13903 |
+ c -= L_('0'); |
13904 |
+ else if (ISALPHA (c)) |
13905 |
+ c = TOUPPER (c) - L_('A') + 10; |
13906 |
+ else |
13907 |
+ break; |
13908 |
+ if ((int) c >= base) |
13909 |
+ break; |
13910 |
+ /* Check for overflow. */ |
13911 |
+ if (i > cutoff || (i == cutoff && c > cutlim)) |
13912 |
+ overflow = 1; |
13913 |
+ else |
13914 |
+ { |
13915 |
+ i *= (unsigned LONG int) base; |
13916 |
+ i += c; |
13917 |
+ } |
13918 |
+ } |
13919 |
+ |
13920 |
+ /* Check if anything actually happened. */ |
13921 |
+ if (s == save) |
13922 |
+ goto noconv; |
13923 |
+ |
13924 |
+ /* Store in ENDPTR the address of one character |
13925 |
+ past the last character we converted. */ |
13926 |
+ if (endptr != NULL) |
13927 |
+ *endptr = (STRING_TYPE *) s; |
13928 |
+ |
13929 |
+#if !UNSIGNED |
13930 |
+ /* Check for a value that is within the range of |
13931 |
+ 'unsigned LONG int', but outside the range of 'LONG int'. */ |
13932 |
+ if (overflow == 0 |
13933 |
+ && i > (negative |
13934 |
+ ? -((unsigned LONG int) (STRTOL_LONG_MIN + 1)) + 1 |
13935 |
+ : (unsigned LONG int) STRTOL_LONG_MAX)) |
13936 |
+ overflow = 1; |
13937 |
+#endif |
13938 |
+ |
13939 |
+ if (overflow) |
13940 |
+ { |
13941 |
+ __set_errno (ERANGE); |
13942 |
+#if UNSIGNED |
13943 |
+ return STRTOL_ULONG_MAX; |
13944 |
+#else |
13945 |
+ return negative ? STRTOL_LONG_MIN : STRTOL_LONG_MAX; |
13946 |
+#endif |
13947 |
+ } |
13948 |
+ |
13949 |
+ /* Return the result of the appropriate sign. */ |
13950 |
+ return negative ? -i : i; |
13951 |
+ |
13952 |
+noconv: |
13953 |
+ /* We must handle a special case here: the base is 0 or 16 and the |
13954 |
+ first two characters are '0' and 'x', but the rest are no |
13955 |
+ hexadecimal digits. This is no error case. We return 0 and |
13956 |
+ ENDPTR points to the 'x'. */ |
13957 |
+ if (endptr != NULL) |
13958 |
+ { |
13959 |
+ if (save - nptr >= 2 && TOUPPER (save[-1]) == L_('X') |
13960 |
+ && save[-2] == L_('0')) |
13961 |
+ *endptr = (STRING_TYPE *) &save[-1]; |
13962 |
+ else |
13963 |
+ /* There was no number to convert. */ |
13964 |
+ *endptr = (STRING_TYPE *) nptr; |
13965 |
+ } |
13966 |
+ |
13967 |
+ return 0L; |
13968 |
+} |
13969 |
+ |
13970 |
+#ifdef USE_NUMBER_GROUPING |
13971 |
+/* External user entry point. */ |
13972 |
+ |
13973 |
+INT |
13974 |
+# ifdef weak_function |
13975 |
+weak_function |
13976 |
+# endif |
13977 |
+strtol (const STRING_TYPE *nptr, STRING_TYPE **endptr, |
13978 |
+ int base LOCALE_PARAM_PROTO) |
13979 |
+{ |
13980 |
+ return INTERNAL (strtol) (nptr, endptr, base, 0 LOCALE_PARAM); |
13981 |
+} |
13982 |
+#endif |
13983 |
|
13984 |
diff --git a/autotools/gnulib/strtoll.c b/autotools/gnulib/strtoll.c |
13985 |
new file mode 100644 |
13986 |
index 0000000..acea42e |
13987 |
--- /dev/null |
13988 |
+++ b/autotools/gnulib/strtoll.c |
13989 |
@@ -0,0 +1,33 @@ |
13990 |
+/* Function to parse a 'long long int' from text. |
13991 |
+ Copyright (C) 1995-1997, 1999, 2001, 2009-2022 Free Software Foundation, |
13992 |
+ Inc. |
13993 |
+ This file is part of the GNU C Library. |
13994 |
+ |
13995 |
+ This file is free software: you can redistribute it and/or modify |
13996 |
+ it under the terms of the GNU Lesser General Public License as |
13997 |
+ published by the Free Software Foundation, either version 3 of the |
13998 |
+ License, or (at your option) any later version. |
13999 |
+ |
14000 |
+ This file is distributed in the hope that it will be useful, |
14001 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
14002 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14003 |
+ GNU Lesser General Public License for more details. |
14004 |
+ |
14005 |
+ You should have received a copy of the GNU Lesser General Public License |
14006 |
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
14007 |
+ |
14008 |
+#define QUAD 1 |
14009 |
+ |
14010 |
+#include <strtol.c> |
14011 |
+ |
14012 |
+#ifdef _LIBC |
14013 |
+# ifdef SHARED |
14014 |
+# include <shlib-compat.h> |
14015 |
+ |
14016 |
+# if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_2) |
14017 |
+compat_symbol (libc, __strtoll_internal, __strtoq_internal, GLIBC_2_0); |
14018 |
+# endif |
14019 |
+ |
14020 |
+# endif |
14021 |
+weak_alias (strtoll, strtoq) |
14022 |
+#endif |
14023 |
|
14024 |
diff --git a/autotools/gnulib/sys/stat.h b/autotools/gnulib/sys/stat.h |
14025 |
new file mode 100644 |
14026 |
index 0000000..d603f14 |
14027 |
--- /dev/null |
14028 |
+++ b/autotools/gnulib/sys/stat.h |
14029 |
@@ -0,0 +1,1435 @@ |
14030 |
+/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ |
14031 |
+/* Provide a more complete sys/stat.h header file. |
14032 |
+ Copyright (C) 2005-2022 Free Software Foundation, Inc. |
14033 |
+ |
14034 |
+ This file is free software: you can redistribute it and/or modify |
14035 |
+ it under the terms of the GNU Lesser General Public License as |
14036 |
+ published by the Free Software Foundation; either version 2.1 of the |
14037 |
+ License, or (at your option) any later version. |
14038 |
+ |
14039 |
+ This file is distributed in the hope that it will be useful, |
14040 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
14041 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14042 |
+ GNU Lesser General Public License for more details. |
14043 |
+ |
14044 |
+ You should have received a copy of the GNU Lesser General Public License |
14045 |
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
14046 |
+ |
14047 |
+/* Written by Eric Blake, Paul Eggert, and Jim Meyering. */ |
14048 |
+ |
14049 |
+/* This file is supposed to be used on platforms where <sys/stat.h> is |
14050 |
+ incomplete. It is intended to provide definitions and prototypes |
14051 |
+ needed by an application. Start with what the system provides. */ |
14052 |
+ |
14053 |
+#if __GNUC__ >= 3 |
14054 |
+#pragma GCC system_header |
14055 |
+#endif |
14056 |
+ |
14057 |
+ |
14058 |
+#if defined __need_system_sys_stat_h |
14059 |
+/* Special invocation convention. */ |
14060 |
+ |
14061 |
+#include_next <sys/stat.h> |
14062 |
+ |
14063 |
+#else |
14064 |
+/* Normal invocation convention. */ |
14065 |
+ |
14066 |
+#ifndef _GL_SYS_STAT_H |
14067 |
+ |
14068 |
+/* Get nlink_t. |
14069 |
+ May also define off_t to a 64-bit type on native Windows. */ |
14070 |
+#include <sys/types.h> |
14071 |
+ |
14072 |
+/* Get struct timespec. */ |
14073 |
+#include <time.h> |
14074 |
+ |
14075 |
+/* The include_next requires a split double-inclusion guard. */ |
14076 |
+#include_next <sys/stat.h> |
14077 |
+ |
14078 |
+#ifndef _GL_SYS_STAT_H |
14079 |
+#define _GL_SYS_STAT_H |
14080 |
+ |
14081 |
+/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ |
14082 |
+/* C++ compatible function declaration macros. |
14083 |
+ Copyright (C) 2010-2022 Free Software Foundation, Inc. |
14084 |
+ |
14085 |
+ This program is free software: you can redistribute it and/or modify it |
14086 |
+ under the terms of the GNU Lesser General Public License as published |
14087 |
+ by the Free Software Foundation; either version 2 of the License, or |
14088 |
+ (at your option) any later version. |
14089 |
+ |
14090 |
+ This program is distributed in the hope that it will be useful, |
14091 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
14092 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
14093 |
+ Lesser General Public License for more details. |
14094 |
+ |
14095 |
+ You should have received a copy of the GNU Lesser General Public License |
14096 |
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
14097 |
+ |
14098 |
+#ifndef _GL_CXXDEFS_H |
14099 |
+#define _GL_CXXDEFS_H |
14100 |
+ |
14101 |
+/* Begin/end the GNULIB_NAMESPACE namespace. */ |
14102 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
14103 |
+# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { |
14104 |
+# define _GL_END_NAMESPACE } |
14105 |
+#else |
14106 |
+# define _GL_BEGIN_NAMESPACE |
14107 |
+# define _GL_END_NAMESPACE |
14108 |
+#endif |
14109 |
+ |
14110 |
+/* The three most frequent use cases of these macros are: |
14111 |
+ |
14112 |
+ * For providing a substitute for a function that is missing on some |
14113 |
+ platforms, but is declared and works fine on the platforms on which |
14114 |
+ it exists: |
14115 |
+ |
14116 |
+ #if @GNULIB_FOO@ |
14117 |
+ # if !@HAVE_FOO@ |
14118 |
+ _GL_FUNCDECL_SYS (foo, ...); |
14119 |
+ # endif |
14120 |
+ _GL_CXXALIAS_SYS (foo, ...); |
14121 |
+ _GL_CXXALIASWARN (foo); |
14122 |
+ #elif defined GNULIB_POSIXCHECK |
14123 |
+ ... |
14124 |
+ #endif |
14125 |
+ |
14126 |
+ * For providing a replacement for a function that exists on all platforms, |
14127 |
+ but is broken/insufficient and needs to be replaced on some platforms: |
14128 |
+ |
14129 |
+ #if @GNULIB_FOO@ |
14130 |
+ # if @REPLACE_FOO@ |
14131 |
+ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
14132 |
+ # undef foo |
14133 |
+ # define foo rpl_foo |
14134 |
+ # endif |
14135 |
+ _GL_FUNCDECL_RPL (foo, ...); |
14136 |
+ _GL_CXXALIAS_RPL (foo, ...); |
14137 |
+ # else |
14138 |
+ _GL_CXXALIAS_SYS (foo, ...); |
14139 |
+ # endif |
14140 |
+ _GL_CXXALIASWARN (foo); |
14141 |
+ #elif defined GNULIB_POSIXCHECK |
14142 |
+ ... |
14143 |
+ #endif |
14144 |
+ |
14145 |
+ * For providing a replacement for a function that exists on some platforms |
14146 |
+ but is broken/insufficient and needs to be replaced on some of them and |
14147 |
+ is additionally either missing or undeclared on some other platforms: |
14148 |
+ |
14149 |
+ #if @GNULIB_FOO@ |
14150 |
+ # if @REPLACE_FOO@ |
14151 |
+ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
14152 |
+ # undef foo |
14153 |
+ # define foo rpl_foo |
14154 |
+ # endif |
14155 |
+ _GL_FUNCDECL_RPL (foo, ...); |
14156 |
+ _GL_CXXALIAS_RPL (foo, ...); |
14157 |
+ # else |
14158 |
+ # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ |
14159 |
+ _GL_FUNCDECL_SYS (foo, ...); |
14160 |
+ # endif |
14161 |
+ _GL_CXXALIAS_SYS (foo, ...); |
14162 |
+ # endif |
14163 |
+ _GL_CXXALIASWARN (foo); |
14164 |
+ #elif defined GNULIB_POSIXCHECK |
14165 |
+ ... |
14166 |
+ #endif |
14167 |
+*/ |
14168 |
+ |
14169 |
+/* _GL_EXTERN_C declaration; |
14170 |
+ performs the declaration with C linkage. */ |
14171 |
+#if defined __cplusplus |
14172 |
+# define _GL_EXTERN_C extern "C" |
14173 |
+#else |
14174 |
+# define _GL_EXTERN_C extern |
14175 |
+#endif |
14176 |
+ |
14177 |
+/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); |
14178 |
+ declares a replacement function, named rpl_func, with the given prototype, |
14179 |
+ consisting of return type, parameters, and attributes. |
14180 |
+ Example: |
14181 |
+ _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) |
14182 |
+ _GL_ARG_NONNULL ((1))); |
14183 |
+ */ |
14184 |
+#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ |
14185 |
+ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) |
14186 |
+#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ |
14187 |
+ _GL_EXTERN_C rettype rpl_func parameters_and_attributes |
14188 |
+ |
14189 |
+/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); |
14190 |
+ declares the system function, named func, with the given prototype, |
14191 |
+ consisting of return type, parameters, and attributes. |
14192 |
+ Example: |
14193 |
+ _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) |
14194 |
+ _GL_ARG_NONNULL ((1))); |
14195 |
+ */ |
14196 |
+#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ |
14197 |
+ _GL_EXTERN_C rettype func parameters_and_attributes |
14198 |
+ |
14199 |
+/* _GL_CXXALIAS_RPL (func, rettype, parameters); |
14200 |
+ declares a C++ alias called GNULIB_NAMESPACE::func |
14201 |
+ that redirects to rpl_func, if GNULIB_NAMESPACE is defined. |
14202 |
+ Example: |
14203 |
+ _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); |
14204 |
+ |
14205 |
+ Wrapping rpl_func in an object with an inline conversion operator |
14206 |
+ avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is |
14207 |
+ actually used in the program. */ |
14208 |
+#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ |
14209 |
+ _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) |
14210 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
14211 |
+# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ |
14212 |
+ namespace GNULIB_NAMESPACE \ |
14213 |
+ { \ |
14214 |
+ static const struct _gl_ ## func ## _wrapper \ |
14215 |
+ { \ |
14216 |
+ typedef rettype (*type) parameters; \ |
14217 |
+ \ |
14218 |
+ inline operator type () const \ |
14219 |
+ { \ |
14220 |
+ return ::rpl_func; \ |
14221 |
+ } \ |
14222 |
+ } func = {}; \ |
14223 |
+ } \ |
14224 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
14225 |
+#else |
14226 |
+# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ |
14227 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
14228 |
+#endif |
14229 |
+ |
14230 |
+/* _GL_CXXALIAS_MDA (func, rettype, parameters); |
14231 |
+ is to be used when func is a Microsoft deprecated alias, on native Windows. |
14232 |
+ It declares a C++ alias called GNULIB_NAMESPACE::func |
14233 |
+ that redirects to _func, if GNULIB_NAMESPACE is defined. |
14234 |
+ Example: |
14235 |
+ _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); |
14236 |
+ */ |
14237 |
+#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ |
14238 |
+ _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) |
14239 |
+ |
14240 |
+/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); |
14241 |
+ is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); |
14242 |
+ except that the C function rpl_func may have a slightly different |
14243 |
+ declaration. A cast is used to silence the "invalid conversion" error |
14244 |
+ that would otherwise occur. */ |
14245 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
14246 |
+# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ |
14247 |
+ namespace GNULIB_NAMESPACE \ |
14248 |
+ { \ |
14249 |
+ static const struct _gl_ ## func ## _wrapper \ |
14250 |
+ { \ |
14251 |
+ typedef rettype (*type) parameters; \ |
14252 |
+ \ |
14253 |
+ inline operator type () const \ |
14254 |
+ { \ |
14255 |
+ return reinterpret_cast<type>(::rpl_func); \ |
14256 |
+ } \ |
14257 |
+ } func = {}; \ |
14258 |
+ } \ |
14259 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
14260 |
+#else |
14261 |
+# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ |
14262 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
14263 |
+#endif |
14264 |
+ |
14265 |
+/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); |
14266 |
+ is like _GL_CXXALIAS_MDA (func, rettype, parameters); |
14267 |
+ except that the C function func may have a slightly different declaration. |
14268 |
+ A cast is used to silence the "invalid conversion" error that would |
14269 |
+ otherwise occur. */ |
14270 |
+#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ |
14271 |
+ _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) |
14272 |
+ |
14273 |
+/* _GL_CXXALIAS_SYS (func, rettype, parameters); |
14274 |
+ declares a C++ alias called GNULIB_NAMESPACE::func |
14275 |
+ that redirects to the system provided function func, if GNULIB_NAMESPACE |
14276 |
+ is defined. |
14277 |
+ Example: |
14278 |
+ _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); |
14279 |
+ |
14280 |
+ Wrapping func in an object with an inline conversion operator |
14281 |
+ avoids a reference to func unless GNULIB_NAMESPACE::func is |
14282 |
+ actually used in the program. */ |
14283 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
14284 |
+# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ |
14285 |
+ namespace GNULIB_NAMESPACE \ |
14286 |
+ { \ |
14287 |
+ static const struct _gl_ ## func ## _wrapper \ |
14288 |
+ { \ |
14289 |
+ typedef rettype (*type) parameters; \ |
14290 |
+ \ |
14291 |
+ inline operator type () const \ |
14292 |
+ { \ |
14293 |
+ return ::func; \ |
14294 |
+ } \ |
14295 |
+ } func = {}; \ |
14296 |
+ } \ |
14297 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
14298 |
+#else |
14299 |
+# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ |
14300 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
14301 |
+#endif |
14302 |
+ |
14303 |
+/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); |
14304 |
+ is like _GL_CXXALIAS_SYS (func, rettype, parameters); |
14305 |
+ except that the C function func may have a slightly different declaration. |
14306 |
+ A cast is used to silence the "invalid conversion" error that would |
14307 |
+ otherwise occur. */ |
14308 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
14309 |
+# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ |
14310 |
+ namespace GNULIB_NAMESPACE \ |
14311 |
+ { \ |
14312 |
+ static const struct _gl_ ## func ## _wrapper \ |
14313 |
+ { \ |
14314 |
+ typedef rettype (*type) parameters; \ |
14315 |
+ \ |
14316 |
+ inline operator type () const \ |
14317 |
+ { \ |
14318 |
+ return reinterpret_cast<type>(::func); \ |
14319 |
+ } \ |
14320 |
+ } func = {}; \ |
14321 |
+ } \ |
14322 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
14323 |
+#else |
14324 |
+# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ |
14325 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
14326 |
+#endif |
14327 |
+ |
14328 |
+/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); |
14329 |
+ is like _GL_CXXALIAS_SYS (func, rettype, parameters); |
14330 |
+ except that the C function is picked among a set of overloaded functions, |
14331 |
+ namely the one with rettype2 and parameters2. Two consecutive casts |
14332 |
+ are used to silence the "cannot find a match" and "invalid conversion" |
14333 |
+ errors that would otherwise occur. */ |
14334 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
14335 |
+ /* The outer cast must be a reinterpret_cast. |
14336 |
+ The inner cast: When the function is defined as a set of overloaded |
14337 |
+ functions, it works as a static_cast<>, choosing the designated variant. |
14338 |
+ When the function is defined as a single variant, it works as a |
14339 |
+ reinterpret_cast<>. The parenthesized cast syntax works both ways. */ |
14340 |
+# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ |
14341 |
+ namespace GNULIB_NAMESPACE \ |
14342 |
+ { \ |
14343 |
+ static const struct _gl_ ## func ## _wrapper \ |
14344 |
+ { \ |
14345 |
+ typedef rettype (*type) parameters; \ |
14346 |
+ \ |
14347 |
+ inline operator type () const \ |
14348 |
+ { \ |
14349 |
+ return reinterpret_cast<type>((rettype2 (*) parameters2)(::func)); \ |
14350 |
+ } \ |
14351 |
+ } func = {}; \ |
14352 |
+ } \ |
14353 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
14354 |
+#else |
14355 |
+# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ |
14356 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
14357 |
+#endif |
14358 |
+ |
14359 |
+/* _GL_CXXALIASWARN (func); |
14360 |
+ causes a warning to be emitted when ::func is used but not when |
14361 |
+ GNULIB_NAMESPACE::func is used. func must be defined without overloaded |
14362 |
+ variants. */ |
14363 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
14364 |
+# define _GL_CXXALIASWARN(func) \ |
14365 |
+ _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) |
14366 |
+# define _GL_CXXALIASWARN_1(func,namespace) \ |
14367 |
+ _GL_CXXALIASWARN_2 (func, namespace) |
14368 |
+/* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>, |
14369 |
+ we enable the warning only when not optimizing. */ |
14370 |
+# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) |
14371 |
+# define _GL_CXXALIASWARN_2(func,namespace) \ |
14372 |
+ _GL_WARN_ON_USE (func, \ |
14373 |
+ "The symbol ::" #func " refers to the system function. " \ |
14374 |
+ "Use " #namespace "::" #func " instead.") |
14375 |
+# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING |
14376 |
+# define _GL_CXXALIASWARN_2(func,namespace) \ |
14377 |
+ extern __typeof__ (func) func |
14378 |
+# else |
14379 |
+# define _GL_CXXALIASWARN_2(func,namespace) \ |
14380 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
14381 |
+# endif |
14382 |
+#else |
14383 |
+# define _GL_CXXALIASWARN(func) \ |
14384 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
14385 |
+#endif |
14386 |
+ |
14387 |
+/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); |
14388 |
+ causes a warning to be emitted when the given overloaded variant of ::func |
14389 |
+ is used but not when GNULIB_NAMESPACE::func is used. */ |
14390 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
14391 |
+# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ |
14392 |
+ _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ |
14393 |
+ GNULIB_NAMESPACE) |
14394 |
+# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ |
14395 |
+ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) |
14396 |
+/* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>, |
14397 |
+ we enable the warning only when not optimizing. */ |
14398 |
+# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) |
14399 |
+# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ |
14400 |
+ _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ |
14401 |
+ "The symbol ::" #func " refers to the system function. " \ |
14402 |
+ "Use " #namespace "::" #func " instead.") |
14403 |
+# else |
14404 |
+# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ |
14405 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
14406 |
+# endif |
14407 |
+#else |
14408 |
+# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ |
14409 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
14410 |
+#endif |
14411 |
+ |
14412 |
+#endif /* _GL_CXXDEFS_H */ |
14413 |
+ |
14414 |
+/* The definition of _GL_ARG_NONNULL is copied here. */ |
14415 |
+/* A C macro for declaring that specific arguments must not be NULL. |
14416 |
+ Copyright (C) 2009-2022 Free Software Foundation, Inc. |
14417 |
+ |
14418 |
+ This program is free software: you can redistribute it and/or modify it |
14419 |
+ under the terms of the GNU Lesser General Public License as published |
14420 |
+ by the Free Software Foundation; either version 2 of the License, or |
14421 |
+ (at your option) any later version. |
14422 |
+ |
14423 |
+ This program is distributed in the hope that it will be useful, |
14424 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
14425 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
14426 |
+ Lesser General Public License for more details. |
14427 |
+ |
14428 |
+ You should have received a copy of the GNU Lesser General Public License |
14429 |
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
14430 |
+ |
14431 |
+/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools |
14432 |
+ that the values passed as arguments n, ..., m must be non-NULL pointers. |
14433 |
+ n = 1 stands for the first argument, n = 2 for the second argument etc. */ |
14434 |
+#ifndef _GL_ARG_NONNULL |
14435 |
+# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ |
14436 |
+# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) |
14437 |
+# else |
14438 |
+# define _GL_ARG_NONNULL(params) |
14439 |
+# endif |
14440 |
+#endif |
14441 |
+ |
14442 |
+/* The definition of _GL_WARN_ON_USE is copied here. */ |
14443 |
+/* A C macro for emitting warnings if a function is used. |
14444 |
+ Copyright (C) 2010-2022 Free Software Foundation, Inc. |
14445 |
+ |
14446 |
+ This program is free software: you can redistribute it and/or modify it |
14447 |
+ under the terms of the GNU Lesser General Public License as published |
14448 |
+ by the Free Software Foundation; either version 2 of the License, or |
14449 |
+ (at your option) any later version. |
14450 |
+ |
14451 |
+ This program is distributed in the hope that it will be useful, |
14452 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
14453 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
14454 |
+ Lesser General Public License for more details. |
14455 |
+ |
14456 |
+ You should have received a copy of the GNU Lesser General Public License |
14457 |
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
14458 |
+ |
14459 |
+/* _GL_WARN_ON_USE (function, "literal string") issues a declaration |
14460 |
+ for FUNCTION which will then trigger a compiler warning containing |
14461 |
+ the text of "literal string" anywhere that function is called, if |
14462 |
+ supported by the compiler. If the compiler does not support this |
14463 |
+ feature, the macro expands to an unused extern declaration. |
14464 |
+ |
14465 |
+ _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the |
14466 |
+ attribute used in _GL_WARN_ON_USE. If the compiler does not support |
14467 |
+ this feature, it expands to empty. |
14468 |
+ |
14469 |
+ These macros are useful for marking a function as a potential |
14470 |
+ portability trap, with the intent that "literal string" include |
14471 |
+ instructions on the replacement function that should be used |
14472 |
+ instead. |
14473 |
+ _GL_WARN_ON_USE is for functions with 'extern' linkage. |
14474 |
+ _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline' |
14475 |
+ linkage. |
14476 |
+ |
14477 |
+ However, one of the reasons that a function is a portability trap is |
14478 |
+ if it has the wrong signature. Declaring FUNCTION with a different |
14479 |
+ signature in C is a compilation error, so this macro must use the |
14480 |
+ same type as any existing declaration so that programs that avoid |
14481 |
+ the problematic FUNCTION do not fail to compile merely because they |
14482 |
+ included a header that poisoned the function. But this implies that |
14483 |
+ _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already |
14484 |
+ have a declaration. Use of this macro implies that there must not |
14485 |
+ be any other macro hiding the declaration of FUNCTION; but |
14486 |
+ undefining FUNCTION first is part of the poisoning process anyway |
14487 |
+ (although for symbols that are provided only via a macro, the result |
14488 |
+ is a compilation error rather than a warning containing |
14489 |
+ "literal string"). Also note that in C++, it is only safe to use if |
14490 |
+ FUNCTION has no overloads. |
14491 |
+ |
14492 |
+ For an example, it is possible to poison 'getline' by: |
14493 |
+ - adding a call to gl_WARN_ON_USE_PREPARE([[#include <stdio.h>]], |
14494 |
+ [getline]) in configure.ac, which potentially defines |
14495 |
+ HAVE_RAW_DECL_GETLINE |
14496 |
+ - adding this code to a header that wraps the system <stdio.h>: |
14497 |
+ #undef getline |
14498 |
+ #if HAVE_RAW_DECL_GETLINE |
14499 |
+ _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" |
14500 |
+ "not universally present; use the gnulib module getline"); |
14501 |
+ #endif |
14502 |
+ |
14503 |
+ It is not possible to directly poison global variables. But it is |
14504 |
+ possible to write a wrapper accessor function, and poison that |
14505 |
+ (less common usage, like &environ, will cause a compilation error |
14506 |
+ rather than issue the nice warning, but the end result of informing |
14507 |
+ the developer about their portability problem is still achieved): |
14508 |
+ #if HAVE_RAW_DECL_ENVIRON |
14509 |
+ static char *** |
14510 |
+ rpl_environ (void) { return &environ; } |
14511 |
+ _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); |
14512 |
+ # undef environ |
14513 |
+ # define environ (*rpl_environ ()) |
14514 |
+ #endif |
14515 |
+ or better (avoiding contradictory use of 'static' and 'extern'): |
14516 |
+ #if HAVE_RAW_DECL_ENVIRON |
14517 |
+ static char *** |
14518 |
+ _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared") |
14519 |
+ rpl_environ (void) { return &environ; } |
14520 |
+ # undef environ |
14521 |
+ # define environ (*rpl_environ ()) |
14522 |
+ #endif |
14523 |
+ */ |
14524 |
+#ifndef _GL_WARN_ON_USE |
14525 |
+ |
14526 |
+# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) |
14527 |
+/* A compiler attribute is available in gcc versions 4.3.0 and later. */ |
14528 |
+# define _GL_WARN_ON_USE(function, message) \ |
14529 |
+_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) |
14530 |
+# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ |
14531 |
+ __attribute__ ((__warning__ (message))) |
14532 |
+# elif __clang_major__ >= 4 |
14533 |
+/* Another compiler attribute is available in clang. */ |
14534 |
+# define _GL_WARN_ON_USE(function, message) \ |
14535 |
+_GL_WARN_EXTERN_C __typeof__ (function) function \ |
14536 |
+ __attribute__ ((__diagnose_if__ (1, message, "warning"))) |
14537 |
+# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ |
14538 |
+ __attribute__ ((__diagnose_if__ (1, message, "warning"))) |
14539 |
+# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING |
14540 |
+/* Verify the existence of the function. */ |
14541 |
+# define _GL_WARN_ON_USE(function, message) \ |
14542 |
+_GL_WARN_EXTERN_C __typeof__ (function) function |
14543 |
+# define _GL_WARN_ON_USE_ATTRIBUTE(message) |
14544 |
+# else /* Unsupported. */ |
14545 |
+# define _GL_WARN_ON_USE(function, message) \ |
14546 |
+_GL_WARN_EXTERN_C int _gl_warn_on_use |
14547 |
+# define _GL_WARN_ON_USE_ATTRIBUTE(message) |
14548 |
+# endif |
14549 |
+#endif |
14550 |
+ |
14551 |
+/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") |
14552 |
+ is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the |
14553 |
+ function is declared with the given prototype, consisting of return type, |
14554 |
+ parameters, and attributes. |
14555 |
+ This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does |
14556 |
+ not work in this case. */ |
14557 |
+#ifndef _GL_WARN_ON_USE_CXX |
14558 |
+# if !defined __cplusplus |
14559 |
+# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ |
14560 |
+ _GL_WARN_ON_USE (function, msg) |
14561 |
+# else |
14562 |
+# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) |
14563 |
+/* A compiler attribute is available in gcc versions 4.3.0 and later. */ |
14564 |
+# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ |
14565 |
+extern rettype_gcc function parameters_and_attributes \ |
14566 |
+ __attribute__ ((__warning__ (msg))) |
14567 |
+# elif __clang_major__ >= 4 |
14568 |
+/* Another compiler attribute is available in clang. */ |
14569 |
+# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ |
14570 |
+extern rettype_clang function parameters_and_attributes \ |
14571 |
+ __attribute__ ((__diagnose_if__ (1, msg, "warning"))) |
14572 |
+# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING |
14573 |
+/* Verify the existence of the function. */ |
14574 |
+# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ |
14575 |
+extern rettype_gcc function parameters_and_attributes |
14576 |
+# else /* Unsupported. */ |
14577 |
+# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ |
14578 |
+_GL_WARN_EXTERN_C int _gl_warn_on_use |
14579 |
+# endif |
14580 |
+# endif |
14581 |
+#endif |
14582 |
+ |
14583 |
+/* _GL_WARN_EXTERN_C declaration; |
14584 |
+ performs the declaration with C linkage. */ |
14585 |
+#ifndef _GL_WARN_EXTERN_C |
14586 |
+# if defined __cplusplus |
14587 |
+# define _GL_WARN_EXTERN_C extern "C" |
14588 |
+# else |
14589 |
+# define _GL_WARN_EXTERN_C extern |
14590 |
+# endif |
14591 |
+#endif |
14592 |
+ |
14593 |
+/* Before doing "#define mknod rpl_mknod" below, we need to include all |
14594 |
+ headers that may declare mknod(). OS/2 kLIBC declares mknod() in |
14595 |
+ <unistd.h>, not in <sys/stat.h>. */ |
14596 |
+#ifdef __KLIBC__ |
14597 |
+# include <unistd.h> |
14598 |
+#endif |
14599 |
+ |
14600 |
+/* Before doing "#define mkdir rpl_mkdir" below, we need to include all |
14601 |
+ headers that may declare mkdir(). Native Windows platforms declare mkdir |
14602 |
+ in <io.h> and/or <direct.h>, not in <sys/stat.h>. */ |
14603 |
+#if defined _WIN32 && ! defined __CYGWIN__ |
14604 |
+# include <io.h> /* mingw32, mingw64 */ |
14605 |
+# include <direct.h> /* mingw64, MSVC 9 */ |
14606 |
+#endif |
14607 |
+ |
14608 |
+/* Native Windows platforms declare umask() in <io.h>. */ |
14609 |
+#if 0 && (defined _WIN32 && ! defined __CYGWIN__) |
14610 |
+# include <io.h> |
14611 |
+#endif |
14612 |
+ |
14613 |
+/* Large File Support on native Windows. */ |
14614 |
+#if 0 |
14615 |
+# define stat _stati64 |
14616 |
+#endif |
14617 |
+ |
14618 |
+/* Optionally, override 'struct stat' on native Windows. */ |
14619 |
+#if 0 |
14620 |
+ |
14621 |
+# undef stat |
14622 |
+# if 1 |
14623 |
+# define stat rpl_stat |
14624 |
+# else |
14625 |
+ /* Provoke a clear link error if stat() is used as a function and |
14626 |
+ module 'stat' is not in use. */ |
14627 |
+# define stat stat_used_without_requesting_gnulib_module_stat |
14628 |
+# endif |
14629 |
+ |
14630 |
+# if !GNULIB_defined_struct_stat |
14631 |
+struct stat |
14632 |
+{ |
14633 |
+ dev_t st_dev; |
14634 |
+ ino_t st_ino; |
14635 |
+ mode_t st_mode; |
14636 |
+ nlink_t st_nlink; |
14637 |
+# if 0 |
14638 |
+ uid_t st_uid; |
14639 |
+# else /* uid_t is not defined by default on native Windows. */ |
14640 |
+ short st_uid; |
14641 |
+# endif |
14642 |
+# if 0 |
14643 |
+ gid_t st_gid; |
14644 |
+# else /* gid_t is not defined by default on native Windows. */ |
14645 |
+ short st_gid; |
14646 |
+# endif |
14647 |
+ dev_t st_rdev; |
14648 |
+ off_t st_size; |
14649 |
+# if 0 |
14650 |
+ blksize_t st_blksize; |
14651 |
+ blkcnt_t st_blocks; |
14652 |
+# endif |
14653 |
+ |
14654 |
+# if 0 |
14655 |
+ struct timespec st_atim; |
14656 |
+ struct timespec st_mtim; |
14657 |
+ struct timespec st_ctim; |
14658 |
+# else |
14659 |
+ time_t st_atime; |
14660 |
+ time_t st_mtime; |
14661 |
+ time_t st_ctime; |
14662 |
+# endif |
14663 |
+}; |
14664 |
+# if 0 |
14665 |
+# define st_atime st_atim.tv_sec |
14666 |
+# define st_mtime st_mtim.tv_sec |
14667 |
+# define st_ctime st_ctim.tv_sec |
14668 |
+ /* Indicator, for gnulib internal purposes. */ |
14669 |
+# define _GL_WINDOWS_STAT_TIMESPEC 1 |
14670 |
+# endif |
14671 |
+# define GNULIB_defined_struct_stat 1 |
14672 |
+# endif |
14673 |
+ |
14674 |
+/* Other possible values of st_mode. */ |
14675 |
+# if 0 |
14676 |
+# define _S_IFBLK 0x6000 |
14677 |
+# endif |
14678 |
+# if 0 |
14679 |
+# define _S_IFLNK 0xA000 |
14680 |
+# endif |
14681 |
+# if 0 |
14682 |
+# define _S_IFSOCK 0xC000 |
14683 |
+# endif |
14684 |
+ |
14685 |
+#endif |
14686 |
+ |
14687 |
+#ifndef S_IFIFO |
14688 |
+# ifdef _S_IFIFO |
14689 |
+# define S_IFIFO _S_IFIFO |
14690 |
+# endif |
14691 |
+#endif |
14692 |
+ |
14693 |
+#ifndef S_IFMT |
14694 |
+# define S_IFMT 0170000 |
14695 |
+#endif |
14696 |
+ |
14697 |
+#if STAT_MACROS_BROKEN |
14698 |
+# undef S_ISBLK |
14699 |
+# undef S_ISCHR |
14700 |
+# undef S_ISDIR |
14701 |
+# undef S_ISFIFO |
14702 |
+# undef S_ISLNK |
14703 |
+# undef S_ISNAM |
14704 |
+# undef S_ISMPB |
14705 |
+# undef S_ISMPC |
14706 |
+# undef S_ISNWK |
14707 |
+# undef S_ISREG |
14708 |
+# undef S_ISSOCK |
14709 |
+#endif |
14710 |
+ |
14711 |
+#ifndef S_ISBLK |
14712 |
+# ifdef S_IFBLK |
14713 |
+# define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK) |
14714 |
+# else |
14715 |
+# define S_ISBLK(m) 0 |
14716 |
+# endif |
14717 |
+#endif |
14718 |
+ |
14719 |
+#ifndef S_ISCHR |
14720 |
+# ifdef S_IFCHR |
14721 |
+# define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR) |
14722 |
+# else |
14723 |
+# define S_ISCHR(m) 0 |
14724 |
+# endif |
14725 |
+#endif |
14726 |
+ |
14727 |
+#ifndef S_ISDIR |
14728 |
+# ifdef S_IFDIR |
14729 |
+# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) |
14730 |
+# else |
14731 |
+# define S_ISDIR(m) 0 |
14732 |
+# endif |
14733 |
+#endif |
14734 |
+ |
14735 |
+#ifndef S_ISDOOR /* Solaris 2.5 and up */ |
14736 |
+# define S_ISDOOR(m) 0 |
14737 |
+#endif |
14738 |
+ |
14739 |
+#ifndef S_ISFIFO |
14740 |
+# ifdef S_IFIFO |
14741 |
+# define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO) |
14742 |
+# else |
14743 |
+# define S_ISFIFO(m) 0 |
14744 |
+# endif |
14745 |
+#endif |
14746 |
+ |
14747 |
+#ifndef S_ISLNK |
14748 |
+# ifdef S_IFLNK |
14749 |
+# define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) |
14750 |
+# else |
14751 |
+# define S_ISLNK(m) 0 |
14752 |
+# endif |
14753 |
+#endif |
14754 |
+ |
14755 |
+#ifndef S_ISMPB /* V7 */ |
14756 |
+# ifdef S_IFMPB |
14757 |
+# define S_ISMPB(m) (((m) & S_IFMT) == S_IFMPB) |
14758 |
+# define S_ISMPC(m) (((m) & S_IFMT) == S_IFMPC) |
14759 |
+# else |
14760 |
+# define S_ISMPB(m) 0 |
14761 |
+# define S_ISMPC(m) 0 |
14762 |
+# endif |
14763 |
+#endif |
14764 |
+ |
14765 |
+#ifndef S_ISMPX /* AIX */ |
14766 |
+# define S_ISMPX(m) 0 |
14767 |
+#endif |
14768 |
+ |
14769 |
+#ifndef S_ISNAM /* Xenix */ |
14770 |
+# ifdef S_IFNAM |
14771 |
+# define S_ISNAM(m) (((m) & S_IFMT) == S_IFNAM) |
14772 |
+# else |
14773 |
+# define S_ISNAM(m) 0 |
14774 |
+# endif |
14775 |
+#endif |
14776 |
+ |
14777 |
+#ifndef S_ISNWK /* HP/UX */ |
14778 |
+# ifdef S_IFNWK |
14779 |
+# define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK) |
14780 |
+# else |
14781 |
+# define S_ISNWK(m) 0 |
14782 |
+# endif |
14783 |
+#endif |
14784 |
+ |
14785 |
+#ifndef S_ISPORT /* Solaris 10 and up */ |
14786 |
+# define S_ISPORT(m) 0 |
14787 |
+#endif |
14788 |
+ |
14789 |
+#ifndef S_ISREG |
14790 |
+# ifdef S_IFREG |
14791 |
+# define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) |
14792 |
+# else |
14793 |
+# define S_ISREG(m) 0 |
14794 |
+# endif |
14795 |
+#endif |
14796 |
+ |
14797 |
+#ifndef S_ISSOCK |
14798 |
+# ifdef S_IFSOCK |
14799 |
+# define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK) |
14800 |
+# else |
14801 |
+# define S_ISSOCK(m) 0 |
14802 |
+# endif |
14803 |
+#endif |
14804 |
+ |
14805 |
+ |
14806 |
+#ifndef S_TYPEISMQ |
14807 |
+# define S_TYPEISMQ(p) 0 |
14808 |
+#endif |
14809 |
+ |
14810 |
+#ifndef S_TYPEISTMO |
14811 |
+# define S_TYPEISTMO(p) 0 |
14812 |
+#endif |
14813 |
+ |
14814 |
+ |
14815 |
+#ifndef S_TYPEISSEM |
14816 |
+# ifdef S_INSEM |
14817 |
+# define S_TYPEISSEM(p) (S_ISNAM ((p)->st_mode) && (p)->st_rdev == S_INSEM) |
14818 |
+# else |
14819 |
+# define S_TYPEISSEM(p) 0 |
14820 |
+# endif |
14821 |
+#endif |
14822 |
+ |
14823 |
+#ifndef S_TYPEISSHM |
14824 |
+# ifdef S_INSHD |
14825 |
+# define S_TYPEISSHM(p) (S_ISNAM ((p)->st_mode) && (p)->st_rdev == S_INSHD) |
14826 |
+# else |
14827 |
+# define S_TYPEISSHM(p) 0 |
14828 |
+# endif |
14829 |
+#endif |
14830 |
+ |
14831 |
+/* high performance ("contiguous data") */ |
14832 |
+#ifndef S_ISCTG |
14833 |
+# define S_ISCTG(p) 0 |
14834 |
+#endif |
14835 |
+ |
14836 |
+/* Cray DMF (data migration facility): off line, with data */ |
14837 |
+#ifndef S_ISOFD |
14838 |
+# define S_ISOFD(p) 0 |
14839 |
+#endif |
14840 |
+ |
14841 |
+/* Cray DMF (data migration facility): off line, with no data */ |
14842 |
+#ifndef S_ISOFL |
14843 |
+# define S_ISOFL(p) 0 |
14844 |
+#endif |
14845 |
+ |
14846 |
+/* 4.4BSD whiteout */ |
14847 |
+#ifndef S_ISWHT |
14848 |
+# define S_ISWHT(m) 0 |
14849 |
+#endif |
14850 |
+ |
14851 |
+/* If any of the following are undefined, |
14852 |
+ define them to their de facto standard values. */ |
14853 |
+#if !S_ISUID |
14854 |
+# define S_ISUID 04000 |
14855 |
+#endif |
14856 |
+#if !S_ISGID |
14857 |
+# define S_ISGID 02000 |
14858 |
+#endif |
14859 |
+ |
14860 |
+/* S_ISVTX is a common extension to POSIX. */ |
14861 |
+#ifndef S_ISVTX |
14862 |
+# define S_ISVTX 01000 |
14863 |
+#endif |
14864 |
+ |
14865 |
+#if !S_IRUSR && S_IREAD |
14866 |
+# define S_IRUSR S_IREAD |
14867 |
+#endif |
14868 |
+#if !S_IRUSR |
14869 |
+# define S_IRUSR 00400 |
14870 |
+#endif |
14871 |
+#if !S_IRGRP |
14872 |
+# define S_IRGRP (S_IRUSR >> 3) |
14873 |
+#endif |
14874 |
+#if !S_IROTH |
14875 |
+# define S_IROTH (S_IRUSR >> 6) |
14876 |
+#endif |
14877 |
+ |
14878 |
+#if !S_IWUSR && S_IWRITE |
14879 |
+# define S_IWUSR S_IWRITE |
14880 |
+#endif |
14881 |
+#if !S_IWUSR |
14882 |
+# define S_IWUSR 00200 |
14883 |
+#endif |
14884 |
+#if !S_IWGRP |
14885 |
+# define S_IWGRP (S_IWUSR >> 3) |
14886 |
+#endif |
14887 |
+#if !S_IWOTH |
14888 |
+# define S_IWOTH (S_IWUSR >> 6) |
14889 |
+#endif |
14890 |
+ |
14891 |
+#if !S_IXUSR && S_IEXEC |
14892 |
+# define S_IXUSR S_IEXEC |
14893 |
+#endif |
14894 |
+#if !S_IXUSR |
14895 |
+# define S_IXUSR 00100 |
14896 |
+#endif |
14897 |
+#if !S_IXGRP |
14898 |
+# define S_IXGRP (S_IXUSR >> 3) |
14899 |
+#endif |
14900 |
+#if !S_IXOTH |
14901 |
+# define S_IXOTH (S_IXUSR >> 6) |
14902 |
+#endif |
14903 |
+ |
14904 |
+#if !S_IRWXU |
14905 |
+# define S_IRWXU (S_IRUSR | S_IWUSR | S_IXUSR) |
14906 |
+#endif |
14907 |
+#if !S_IRWXG |
14908 |
+# define S_IRWXG (S_IRGRP | S_IWGRP | S_IXGRP) |
14909 |
+#endif |
14910 |
+#if !S_IRWXO |
14911 |
+# define S_IRWXO (S_IROTH | S_IWOTH | S_IXOTH) |
14912 |
+#endif |
14913 |
+ |
14914 |
+/* Although S_IXUGO and S_IRWXUGO are not specified by POSIX and are |
14915 |
+ not implemented in GNU/Linux, some Gnulib-using apps use the macros. */ |
14916 |
+#if !S_IXUGO |
14917 |
+# define S_IXUGO (S_IXUSR | S_IXGRP | S_IXOTH) |
14918 |
+#endif |
14919 |
+#ifndef S_IRWXUGO |
14920 |
+# define S_IRWXUGO (S_IRWXU | S_IRWXG | S_IRWXO) |
14921 |
+#endif |
14922 |
+ |
14923 |
+/* Macros for futimens and utimensat. */ |
14924 |
+#ifndef UTIME_NOW |
14925 |
+# define UTIME_NOW (-1) |
14926 |
+# define UTIME_OMIT (-2) |
14927 |
+#endif |
14928 |
+ |
14929 |
+ |
14930 |
+#if 1 |
14931 |
+/* On native Windows, map 'chmod' to '_chmod', so that -loldnames is not |
14932 |
+ required. In C++ with GNULIB_NAMESPACE, avoid differences between |
14933 |
+ platforms by defining GNULIB_NAMESPACE::chmod always. */ |
14934 |
+# if defined _WIN32 && !defined __CYGWIN__ |
14935 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
14936 |
+# undef chmod |
14937 |
+# define chmod _chmod |
14938 |
+# endif |
14939 |
+/* Need to cast, because in mingw the last argument is 'int mode'. */ |
14940 |
+_GL_CXXALIAS_MDA_CAST (chmod, int, (const char *filename, mode_t mode)); |
14941 |
+# else |
14942 |
+_GL_CXXALIAS_SYS (chmod, int, (const char *filename, mode_t mode)); |
14943 |
+# endif |
14944 |
+_GL_CXXALIASWARN (chmod); |
14945 |
+#endif |
14946 |
+ |
14947 |
+ |
14948 |
+#if 0 |
14949 |
+# if 0 |
14950 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
14951 |
+# undef fchmodat |
14952 |
+# define fchmodat rpl_fchmodat |
14953 |
+# endif |
14954 |
+_GL_FUNCDECL_RPL (fchmodat, int, |
14955 |
+ (int fd, char const *file, mode_t mode, int flag) |
14956 |
+ _GL_ARG_NONNULL ((2))); |
14957 |
+_GL_CXXALIAS_RPL (fchmodat, int, |
14958 |
+ (int fd, char const *file, mode_t mode, int flag)); |
14959 |
+# else |
14960 |
+# if !1 |
14961 |
+_GL_FUNCDECL_SYS (fchmodat, int, |
14962 |
+ (int fd, char const *file, mode_t mode, int flag) |
14963 |
+ _GL_ARG_NONNULL ((2))); |
14964 |
+# endif |
14965 |
+_GL_CXXALIAS_SYS (fchmodat, int, |
14966 |
+ (int fd, char const *file, mode_t mode, int flag)); |
14967 |
+# endif |
14968 |
+_GL_CXXALIASWARN (fchmodat); |
14969 |
+#elif defined GNULIB_POSIXCHECK |
14970 |
+# undef fchmodat |
14971 |
+# if HAVE_RAW_DECL_FCHMODAT |
14972 |
+_GL_WARN_ON_USE (fchmodat, "fchmodat is not portable - " |
14973 |
+ "use gnulib module openat for portability"); |
14974 |
+# endif |
14975 |
+#endif |
14976 |
+ |
14977 |
+ |
14978 |
+#if 1 |
14979 |
+# if 1 |
14980 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
14981 |
+# undef fstat |
14982 |
+# define fstat rpl_fstat |
14983 |
+# endif |
14984 |
+_GL_FUNCDECL_RPL (fstat, int, (int fd, struct stat *buf) _GL_ARG_NONNULL ((2))); |
14985 |
+_GL_CXXALIAS_RPL (fstat, int, (int fd, struct stat *buf)); |
14986 |
+# else |
14987 |
+_GL_CXXALIAS_SYS (fstat, int, (int fd, struct stat *buf)); |
14988 |
+# endif |
14989 |
+# if __GLIBC__ >= 2 |
14990 |
+_GL_CXXALIASWARN (fstat); |
14991 |
+# endif |
14992 |
+#elif 0 |
14993 |
+# undef fstat |
14994 |
+# define fstat fstat_used_without_requesting_gnulib_module_fstat |
14995 |
+#elif 0 |
14996 |
+/* Above, we define stat to _stati64. */ |
14997 |
+# define fstat _fstati64 |
14998 |
+#elif defined GNULIB_POSIXCHECK |
14999 |
+# undef fstat |
15000 |
+# if HAVE_RAW_DECL_FSTAT |
15001 |
+_GL_WARN_ON_USE (fstat, "fstat has portability problems - " |
15002 |
+ "use gnulib module fstat for portability"); |
15003 |
+# endif |
15004 |
+#endif |
15005 |
+ |
15006 |
+ |
15007 |
+#if 1 |
15008 |
+# if 1 |
15009 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
15010 |
+# undef fstatat |
15011 |
+# define fstatat rpl_fstatat |
15012 |
+# endif |
15013 |
+_GL_FUNCDECL_RPL (fstatat, int, |
15014 |
+ (int fd, char const *restrict name, struct stat *restrict st, |
15015 |
+ int flags) |
15016 |
+ _GL_ARG_NONNULL ((2, 3))); |
15017 |
+_GL_CXXALIAS_RPL (fstatat, int, |
15018 |
+ (int fd, char const *restrict name, struct stat *restrict st, |
15019 |
+ int flags)); |
15020 |
+# else |
15021 |
+# if !1 |
15022 |
+_GL_FUNCDECL_SYS (fstatat, int, |
15023 |
+ (int fd, char const *restrict name, struct stat *restrict st, |
15024 |
+ int flags) |
15025 |
+ _GL_ARG_NONNULL ((2, 3))); |
15026 |
+# endif |
15027 |
+_GL_CXXALIAS_SYS (fstatat, int, |
15028 |
+ (int fd, char const *restrict name, struct stat *restrict st, |
15029 |
+ int flags)); |
15030 |
+# endif |
15031 |
+_GL_CXXALIASWARN (fstatat); |
15032 |
+#elif 0 |
15033 |
+# undef fstatat |
15034 |
+# define fstatat fstatat_used_without_requesting_gnulib_module_fstatat |
15035 |
+#elif defined GNULIB_POSIXCHECK |
15036 |
+# undef fstatat |
15037 |
+# if HAVE_RAW_DECL_FSTATAT |
15038 |
+_GL_WARN_ON_USE (fstatat, "fstatat is not portable - " |
15039 |
+ "use gnulib module openat for portability"); |
15040 |
+# endif |
15041 |
+#endif |
15042 |
+ |
15043 |
+ |
15044 |
+#if 1 |
15045 |
+/* Use the rpl_ prefix also on Solaris <= 9, because on Solaris 9 our futimens |
15046 |
+ implementation relies on futimesat, which on Solaris 10 makes an invocation |
15047 |
+ to futimens that is meant to invoke the libc's futimens(), not gnulib's |
15048 |
+ futimens(). */ |
15049 |
+# if 1 || (!1 && defined __sun) |
15050 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
15051 |
+# undef futimens |
15052 |
+# define futimens rpl_futimens |
15053 |
+# endif |
15054 |
+_GL_FUNCDECL_RPL (futimens, int, (int fd, struct timespec const times[2])); |
15055 |
+_GL_CXXALIAS_RPL (futimens, int, (int fd, struct timespec const times[2])); |
15056 |
+# else |
15057 |
+# if !1 |
15058 |
+_GL_FUNCDECL_SYS (futimens, int, (int fd, struct timespec const times[2])); |
15059 |
+# endif |
15060 |
+_GL_CXXALIAS_SYS (futimens, int, (int fd, struct timespec const times[2])); |
15061 |
+# endif |
15062 |
+# if 1 |
15063 |
+_GL_CXXALIASWARN (futimens); |
15064 |
+# endif |
15065 |
+#elif defined GNULIB_POSIXCHECK |
15066 |
+# undef futimens |
15067 |
+# if HAVE_RAW_DECL_FUTIMENS |
15068 |
+_GL_WARN_ON_USE (futimens, "futimens is not portable - " |
15069 |
+ "use gnulib module futimens for portability"); |
15070 |
+# endif |
15071 |
+#endif |
15072 |
+ |
15073 |
+ |
15074 |
+#if 0 |
15075 |
+# if !1 |
15076 |
+_GL_FUNCDECL_SYS (getumask, mode_t, (void)); |
15077 |
+# endif |
15078 |
+_GL_CXXALIAS_SYS (getumask, mode_t, (void)); |
15079 |
+# if 1 |
15080 |
+_GL_CXXALIASWARN (getumask); |
15081 |
+# endif |
15082 |
+#elif defined GNULIB_POSIXCHECK |
15083 |
+# undef getumask |
15084 |
+# if HAVE_RAW_DECL_GETUMASK |
15085 |
+_GL_WARN_ON_USE (getumask, "getumask is not portable - " |
15086 |
+ "use gnulib module getumask for portability"); |
15087 |
+# endif |
15088 |
+#endif |
15089 |
+ |
15090 |
+ |
15091 |
+#if 0 |
15092 |
+/* Change the mode of FILENAME to MODE, without dereferencing it if FILENAME |
15093 |
+ denotes a symbolic link. */ |
15094 |
+# if !1 || defined __hpux |
15095 |
+_GL_FUNCDECL_SYS (lchmod, int, (const char *filename, mode_t mode) |
15096 |
+ _GL_ARG_NONNULL ((1))); |
15097 |
+# endif |
15098 |
+_GL_CXXALIAS_SYS (lchmod, int, (const char *filename, mode_t mode)); |
15099 |
+_GL_CXXALIASWARN (lchmod); |
15100 |
+#elif defined GNULIB_POSIXCHECK |
15101 |
+# undef lchmod |
15102 |
+# if HAVE_RAW_DECL_LCHMOD |
15103 |
+_GL_WARN_ON_USE (lchmod, "lchmod is unportable - " |
15104 |
+ "use gnulib module lchmod for portability"); |
15105 |
+# endif |
15106 |
+#endif |
15107 |
+ |
15108 |
+ |
15109 |
+#if 1 |
15110 |
+# if ! 1 |
15111 |
+/* mingw does not support symlinks, therefore it does not have lstat. But |
15112 |
+ without links, stat does just fine. */ |
15113 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
15114 |
+# define lstat stat |
15115 |
+# endif |
15116 |
+_GL_CXXALIAS_RPL_1 (lstat, stat, int, |
15117 |
+ (const char *restrict name, struct stat *restrict buf)); |
15118 |
+# elif 1 |
15119 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
15120 |
+# undef lstat |
15121 |
+# define lstat rpl_lstat |
15122 |
+# endif |
15123 |
+_GL_FUNCDECL_RPL (lstat, int, |
15124 |
+ (const char *restrict name, struct stat *restrict buf) |
15125 |
+ _GL_ARG_NONNULL ((1, 2))); |
15126 |
+_GL_CXXALIAS_RPL (lstat, int, |
15127 |
+ (const char *restrict name, struct stat *restrict buf)); |
15128 |
+# else |
15129 |
+_GL_CXXALIAS_SYS (lstat, int, |
15130 |
+ (const char *restrict name, struct stat *restrict buf)); |
15131 |
+# endif |
15132 |
+# if 1 |
15133 |
+_GL_CXXALIASWARN (lstat); |
15134 |
+# endif |
15135 |
+#elif 0 |
15136 |
+# undef lstat |
15137 |
+# define lstat lstat_used_without_requesting_gnulib_module_lstat |
15138 |
+#elif defined GNULIB_POSIXCHECK |
15139 |
+# undef lstat |
15140 |
+# if HAVE_RAW_DECL_LSTAT |
15141 |
+_GL_WARN_ON_USE (lstat, "lstat is unportable - " |
15142 |
+ "use gnulib module lstat for portability"); |
15143 |
+# endif |
15144 |
+#endif |
15145 |
+ |
15146 |
+ |
15147 |
+#if 1 |
15148 |
+# if 0 |
15149 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
15150 |
+# undef mkdir |
15151 |
+# define mkdir rpl_mkdir |
15152 |
+# endif |
15153 |
+_GL_FUNCDECL_RPL (mkdir, int, (char const *name, mode_t mode) |
15154 |
+ _GL_ARG_NONNULL ((1))); |
15155 |
+_GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode)); |
15156 |
+# elif defined _WIN32 && !defined __CYGWIN__ |
15157 |
+/* mingw's _mkdir() function has 1 argument, but we pass 2 arguments. |
15158 |
+ Additionally, it declares _mkdir (and depending on compile flags, an |
15159 |
+ alias mkdir), only in the nonstandard includes <direct.h> and <io.h>, |
15160 |
+ which are included above. */ |
15161 |
+# if !GNULIB_defined_rpl_mkdir |
15162 |
+static int |
15163 |
+rpl_mkdir (char const *name, mode_t mode) |
15164 |
+{ |
15165 |
+ return _mkdir (name); |
15166 |
+} |
15167 |
+# define GNULIB_defined_rpl_mkdir 1 |
15168 |
+# endif |
15169 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
15170 |
+# undef mkdir |
15171 |
+# define mkdir rpl_mkdir |
15172 |
+# endif |
15173 |
+_GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode)); |
15174 |
+# else |
15175 |
+_GL_CXXALIAS_SYS (mkdir, int, (char const *name, mode_t mode)); |
15176 |
+# endif |
15177 |
+_GL_CXXALIASWARN (mkdir); |
15178 |
+#elif defined GNULIB_POSIXCHECK |
15179 |
+# undef mkdir |
15180 |
+# if HAVE_RAW_DECL_MKDIR |
15181 |
+_GL_WARN_ON_USE (mkdir, "mkdir does not always support two parameters - " |
15182 |
+ "use gnulib module mkdir for portability"); |
15183 |
+# endif |
15184 |
+#elif 1 |
15185 |
+/* On native Windows, map 'mkdir' to '_mkdir', so that -loldnames is not |
15186 |
+ required. In C++ with GNULIB_NAMESPACE, avoid differences between |
15187 |
+ platforms by defining GNULIB_NAMESPACE::mkdir always. */ |
15188 |
+# if defined _WIN32 && !defined __CYGWIN__ |
15189 |
+# if !GNULIB_defined_rpl_mkdir |
15190 |
+static int |
15191 |
+rpl_mkdir (char const *name, mode_t mode) |
15192 |
+{ |
15193 |
+ return _mkdir (name); |
15194 |
+} |
15195 |
+# define GNULIB_defined_rpl_mkdir 1 |
15196 |
+# endif |
15197 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
15198 |
+# undef mkdir |
15199 |
+# define mkdir rpl_mkdir |
15200 |
+# endif |
15201 |
+_GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode)); |
15202 |
+# else |
15203 |
+_GL_CXXALIAS_SYS (mkdir, int, (char const *name, mode_t mode)); |
15204 |
+# endif |
15205 |
+_GL_CXXALIASWARN (mkdir); |
15206 |
+#endif |
15207 |
+ |
15208 |
+ |
15209 |
+#if 1 |
15210 |
+# if !1 |
15211 |
+_GL_FUNCDECL_SYS (mkdirat, int, (int fd, char const *file, mode_t mode) |
15212 |
+ _GL_ARG_NONNULL ((2))); |
15213 |
+# endif |
15214 |
+_GL_CXXALIAS_SYS (mkdirat, int, (int fd, char const *file, mode_t mode)); |
15215 |
+_GL_CXXALIASWARN (mkdirat); |
15216 |
+#elif defined GNULIB_POSIXCHECK |
15217 |
+# undef mkdirat |
15218 |
+# if HAVE_RAW_DECL_MKDIRAT |
15219 |
+_GL_WARN_ON_USE (mkdirat, "mkdirat is not portable - " |
15220 |
+ "use gnulib module openat for portability"); |
15221 |
+# endif |
15222 |
+#endif |
15223 |
+ |
15224 |
+ |
15225 |
+#if 0 |
15226 |
+# if 0 |
15227 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
15228 |
+# undef mkfifo |
15229 |
+# define mkfifo rpl_mkfifo |
15230 |
+# endif |
15231 |
+_GL_FUNCDECL_RPL (mkfifo, int, (char const *file, mode_t mode) |
15232 |
+ _GL_ARG_NONNULL ((1))); |
15233 |
+_GL_CXXALIAS_RPL (mkfifo, int, (char const *file, mode_t mode)); |
15234 |
+# else |
15235 |
+# if !1 |
15236 |
+_GL_FUNCDECL_SYS (mkfifo, int, (char const *file, mode_t mode) |
15237 |
+ _GL_ARG_NONNULL ((1))); |
15238 |
+# endif |
15239 |
+_GL_CXXALIAS_SYS (mkfifo, int, (char const *file, mode_t mode)); |
15240 |
+# endif |
15241 |
+_GL_CXXALIASWARN (mkfifo); |
15242 |
+#elif defined GNULIB_POSIXCHECK |
15243 |
+# undef mkfifo |
15244 |
+# if HAVE_RAW_DECL_MKFIFO |
15245 |
+_GL_WARN_ON_USE (mkfifo, "mkfifo is not portable - " |
15246 |
+ "use gnulib module mkfifo for portability"); |
15247 |
+# endif |
15248 |
+#endif |
15249 |
+ |
15250 |
+ |
15251 |
+#if 0 |
15252 |
+# if 0 |
15253 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
15254 |
+# undef mkfifoat |
15255 |
+# define mkfifoat rpl_mkfifoat |
15256 |
+# endif |
15257 |
+_GL_FUNCDECL_RPL (mkfifoat, int, (int fd, char const *file, mode_t mode) |
15258 |
+ _GL_ARG_NONNULL ((2))); |
15259 |
+_GL_CXXALIAS_RPL (mkfifoat, int, (int fd, char const *file, mode_t mode)); |
15260 |
+# else |
15261 |
+# if !1 |
15262 |
+_GL_FUNCDECL_SYS (mkfifoat, int, (int fd, char const *file, mode_t mode) |
15263 |
+ _GL_ARG_NONNULL ((2))); |
15264 |
+# endif |
15265 |
+_GL_CXXALIAS_SYS (mkfifoat, int, (int fd, char const *file, mode_t mode)); |
15266 |
+# endif |
15267 |
+_GL_CXXALIASWARN (mkfifoat); |
15268 |
+#elif defined GNULIB_POSIXCHECK |
15269 |
+# undef mkfifoat |
15270 |
+# if HAVE_RAW_DECL_MKFIFOAT |
15271 |
+_GL_WARN_ON_USE (mkfifoat, "mkfifoat is not portable - " |
15272 |
+ "use gnulib module mkfifoat for portability"); |
15273 |
+# endif |
15274 |
+#endif |
15275 |
+ |
15276 |
+ |
15277 |
+#if 0 |
15278 |
+# if 0 |
15279 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
15280 |
+# undef mknod |
15281 |
+# define mknod rpl_mknod |
15282 |
+# endif |
15283 |
+_GL_FUNCDECL_RPL (mknod, int, (char const *file, mode_t mode, dev_t dev) |
15284 |
+ _GL_ARG_NONNULL ((1))); |
15285 |
+_GL_CXXALIAS_RPL (mknod, int, (char const *file, mode_t mode, dev_t dev)); |
15286 |
+# else |
15287 |
+# if !1 |
15288 |
+_GL_FUNCDECL_SYS (mknod, int, (char const *file, mode_t mode, dev_t dev) |
15289 |
+ _GL_ARG_NONNULL ((1))); |
15290 |
+# endif |
15291 |
+/* Need to cast, because on OSF/1 5.1, the third parameter is '...'. */ |
15292 |
+_GL_CXXALIAS_SYS_CAST (mknod, int, (char const *file, mode_t mode, dev_t dev)); |
15293 |
+# endif |
15294 |
+_GL_CXXALIASWARN (mknod); |
15295 |
+#elif defined GNULIB_POSIXCHECK |
15296 |
+# undef mknod |
15297 |
+# if HAVE_RAW_DECL_MKNOD |
15298 |
+_GL_WARN_ON_USE (mknod, "mknod is not portable - " |
15299 |
+ "use gnulib module mknod for portability"); |
15300 |
+# endif |
15301 |
+#endif |
15302 |
+ |
15303 |
+ |
15304 |
+#if 0 |
15305 |
+# if 0 |
15306 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
15307 |
+# undef mknodat |
15308 |
+# define mknodat rpl_mknodat |
15309 |
+# endif |
15310 |
+_GL_FUNCDECL_RPL (mknodat, int, |
15311 |
+ (int fd, char const *file, mode_t mode, dev_t dev) |
15312 |
+ _GL_ARG_NONNULL ((2))); |
15313 |
+_GL_CXXALIAS_RPL (mknodat, int, |
15314 |
+ (int fd, char const *file, mode_t mode, dev_t dev)); |
15315 |
+# else |
15316 |
+# if !1 |
15317 |
+_GL_FUNCDECL_SYS (mknodat, int, |
15318 |
+ (int fd, char const *file, mode_t mode, dev_t dev) |
15319 |
+ _GL_ARG_NONNULL ((2))); |
15320 |
+# endif |
15321 |
+_GL_CXXALIAS_SYS (mknodat, int, |
15322 |
+ (int fd, char const *file, mode_t mode, dev_t dev)); |
15323 |
+# endif |
15324 |
+_GL_CXXALIASWARN (mknodat); |
15325 |
+#elif defined GNULIB_POSIXCHECK |
15326 |
+# undef mknodat |
15327 |
+# if HAVE_RAW_DECL_MKNODAT |
15328 |
+_GL_WARN_ON_USE (mknodat, "mknodat is not portable - " |
15329 |
+ "use gnulib module mkfifoat for portability"); |
15330 |
+# endif |
15331 |
+#endif |
15332 |
+ |
15333 |
+ |
15334 |
+#if 1 |
15335 |
+# if 0 |
15336 |
+# if !0 |
15337 |
+ /* We can't use the object-like #define stat rpl_stat, because of |
15338 |
+ struct stat. This means that rpl_stat will not be used if the user |
15339 |
+ does (stat)(a,b). Oh well. */ |
15340 |
+# if defined _AIX && defined stat && defined _LARGE_FILES |
15341 |
+ /* With _LARGE_FILES defined, AIX (only) defines stat to stat64, |
15342 |
+ so we have to replace stat64() instead of stat(). */ |
15343 |
+# undef stat64 |
15344 |
+# define stat64(name, st) rpl_stat (name, st) |
15345 |
+# elif 0 |
15346 |
+ /* Above, we define stat to _stati64. */ |
15347 |
+# if defined __MINGW32__ && defined _stati64 |
15348 |
+# ifndef _USE_32BIT_TIME_T |
15349 |
+ /* The system headers define _stati64 to _stat64. */ |
15350 |
+# undef _stat64 |
15351 |
+# define _stat64(name, st) rpl_stat (name, st) |
15352 |
+# endif |
15353 |
+# elif defined _MSC_VER && defined _stati64 |
15354 |
+# ifdef _USE_32BIT_TIME_T |
15355 |
+ /* The system headers define _stati64 to _stat32i64. */ |
15356 |
+# undef _stat32i64 |
15357 |
+# define _stat32i64(name, st) rpl_stat (name, st) |
15358 |
+# else |
15359 |
+ /* The system headers define _stati64 to _stat64. */ |
15360 |
+# undef _stat64 |
15361 |
+# define _stat64(name, st) rpl_stat (name, st) |
15362 |
+# endif |
15363 |
+# else |
15364 |
+# undef _stati64 |
15365 |
+# define _stati64(name, st) rpl_stat (name, st) |
15366 |
+# endif |
15367 |
+# elif defined __MINGW32__ && defined stat |
15368 |
+# ifdef _USE_32BIT_TIME_T |
15369 |
+ /* The system headers define stat to _stat32i64. */ |
15370 |
+# undef _stat32i64 |
15371 |
+# define _stat32i64(name, st) rpl_stat (name, st) |
15372 |
+# else |
15373 |
+ /* The system headers define stat to _stat64. */ |
15374 |
+# undef _stat64 |
15375 |
+# define _stat64(name, st) rpl_stat (name, st) |
15376 |
+# endif |
15377 |
+# elif defined _MSC_VER && defined stat |
15378 |
+# ifdef _USE_32BIT_TIME_T |
15379 |
+ /* The system headers define stat to _stat32. */ |
15380 |
+# undef _stat32 |
15381 |
+# define _stat32(name, st) rpl_stat (name, st) |
15382 |
+# else |
15383 |
+ /* The system headers define stat to _stat64i32. */ |
15384 |
+# undef _stat64i32 |
15385 |
+# define _stat64i32(name, st) rpl_stat (name, st) |
15386 |
+# endif |
15387 |
+# else /* !(_AIX || __MINGW32__ || _MSC_VER) */ |
15388 |
+# undef stat |
15389 |
+# define stat(name, st) rpl_stat (name, st) |
15390 |
+# endif /* !_LARGE_FILES */ |
15391 |
+# endif /* !0 */ |
15392 |
+_GL_EXTERN_C int stat (const char *restrict name, struct stat *restrict buf) |
15393 |
+ _GL_ARG_NONNULL ((1, 2)); |
15394 |
+# endif |
15395 |
+#elif 0 |
15396 |
+/* see above: |
15397 |
+ #define stat stat_used_without_requesting_gnulib_module_stat |
15398 |
+ */ |
15399 |
+#elif defined GNULIB_POSIXCHECK |
15400 |
+# undef stat |
15401 |
+# if HAVE_RAW_DECL_STAT |
15402 |
+_GL_WARN_ON_USE (stat, "stat is unportable - " |
15403 |
+ "use gnulib module stat for portability"); |
15404 |
+# endif |
15405 |
+#endif |
15406 |
+ |
15407 |
+ |
15408 |
+#if 1 |
15409 |
+/* On native Windows, map 'umask' to '_umask', so that -loldnames is not |
15410 |
+ required. In C++ with GNULIB_NAMESPACE, avoid differences between |
15411 |
+ platforms by defining GNULIB_NAMESPACE::umask always. */ |
15412 |
+# if defined _WIN32 && !defined __CYGWIN__ |
15413 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
15414 |
+# undef umask |
15415 |
+# define umask _umask |
15416 |
+# endif |
15417 |
+/* Need to cast, because in mingw the last argument is 'int mode'. */ |
15418 |
+_GL_CXXALIAS_MDA_CAST (umask, mode_t, (mode_t mask)); |
15419 |
+# else |
15420 |
+_GL_CXXALIAS_SYS (umask, mode_t, (mode_t mask)); |
15421 |
+# endif |
15422 |
+_GL_CXXALIASWARN (umask); |
15423 |
+#endif |
15424 |
+ |
15425 |
+ |
15426 |
+#if 1 |
15427 |
+/* Use the rpl_ prefix also on Solaris <= 9, because on Solaris 9 our utimensat |
15428 |
+ implementation relies on futimesat, which on Solaris 10 makes an invocation |
15429 |
+ to utimensat that is meant to invoke the libc's utimensat(), not gnulib's |
15430 |
+ utimensat(). */ |
15431 |
+# if 0 || (!1 && defined __sun) |
15432 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
15433 |
+# undef utimensat |
15434 |
+# define utimensat rpl_utimensat |
15435 |
+# endif |
15436 |
+_GL_FUNCDECL_RPL (utimensat, int, (int fd, char const *name, |
15437 |
+ struct timespec const times[2], int flag) |
15438 |
+ _GL_ARG_NONNULL ((2))); |
15439 |
+_GL_CXXALIAS_RPL (utimensat, int, (int fd, char const *name, |
15440 |
+ struct timespec const times[2], int flag)); |
15441 |
+# else |
15442 |
+# if !1 |
15443 |
+_GL_FUNCDECL_SYS (utimensat, int, (int fd, char const *name, |
15444 |
+ struct timespec const times[2], int flag) |
15445 |
+ _GL_ARG_NONNULL ((2))); |
15446 |
+# endif |
15447 |
+_GL_CXXALIAS_SYS (utimensat, int, (int fd, char const *name, |
15448 |
+ struct timespec const times[2], int flag)); |
15449 |
+# endif |
15450 |
+# if 1 |
15451 |
+_GL_CXXALIASWARN (utimensat); |
15452 |
+# endif |
15453 |
+#elif defined GNULIB_POSIXCHECK |
15454 |
+# undef utimensat |
15455 |
+# if HAVE_RAW_DECL_UTIMENSAT |
15456 |
+_GL_WARN_ON_USE (utimensat, "utimensat is not portable - " |
15457 |
+ "use gnulib module utimensat for portability"); |
15458 |
+# endif |
15459 |
+#endif |
15460 |
+ |
15461 |
+ |
15462 |
+#endif /* _GL_SYS_STAT_H */ |
15463 |
+#endif /* _GL_SYS_STAT_H */ |
15464 |
+#endif |
15465 |
|
15466 |
diff --git a/autotools/gnulib/sys/time.h b/autotools/gnulib/sys/time.h |
15467 |
new file mode 100644 |
15468 |
index 0000000..4699065 |
15469 |
--- /dev/null |
15470 |
+++ b/autotools/gnulib/sys/time.h |
15471 |
@@ -0,0 +1,731 @@ |
15472 |
+/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ |
15473 |
+/* Provide a more complete sys/time.h. |
15474 |
+ |
15475 |
+ Copyright (C) 2007-2022 Free Software Foundation, Inc. |
15476 |
+ |
15477 |
+ This file is free software: you can redistribute it and/or modify |
15478 |
+ it under the terms of the GNU Lesser General Public License as |
15479 |
+ published by the Free Software Foundation; either version 2.1 of the |
15480 |
+ License, or (at your option) any later version. |
15481 |
+ |
15482 |
+ This file is distributed in the hope that it will be useful, |
15483 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
15484 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15485 |
+ GNU Lesser General Public License for more details. |
15486 |
+ |
15487 |
+ You should have received a copy of the GNU Lesser General Public License |
15488 |
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
15489 |
+ |
15490 |
+/* Written by Paul Eggert. */ |
15491 |
+ |
15492 |
+#ifndef _GL_SYS_TIME_H |
15493 |
+ |
15494 |
+#if __GNUC__ >= 3 |
15495 |
+#pragma GCC system_header |
15496 |
+#endif |
15497 |
+ |
15498 |
+ |
15499 |
+/* On Cygwin and on many BSDish systems, <sys/time.h> includes itself |
15500 |
+ recursively via <sys/select.h>. |
15501 |
+ Simply delegate to the system's header in this case; it is a no-op. |
15502 |
+ Without this extra ifdef, the C++ gettimeofday declaration below |
15503 |
+ would be a forward declaration in gnulib's nested <sys/time.h>. */ |
15504 |
+#if defined _CYGWIN_SYS_TIME_H || defined _SYS_TIME_H || defined _SYS_TIME_H_ |
15505 |
+# include_next <sys/time.h> |
15506 |
+#else |
15507 |
+ |
15508 |
+/* The include_next requires a split double-inclusion guard. */ |
15509 |
+#if 1 |
15510 |
+# include_next <sys/time.h> |
15511 |
+#endif |
15512 |
+ |
15513 |
+#ifndef _GL_SYS_TIME_H |
15514 |
+#define _GL_SYS_TIME_H |
15515 |
+ |
15516 |
+#if ! 1 |
15517 |
+# include <time.h> |
15518 |
+#endif |
15519 |
+ |
15520 |
+/* On native Windows with MSVC, get the 'struct timeval' type. |
15521 |
+ Also, on native Windows with a 64-bit time_t, where we are overriding the |
15522 |
+ 'struct timeval' type, get all declarations of system functions whose |
15523 |
+ signature contains 'struct timeval'. */ |
15524 |
+#if (defined _MSC_VER || 0) && 0 && !defined _GL_INCLUDING_WINSOCK2_H |
15525 |
+# define _GL_INCLUDING_WINSOCK2_H |
15526 |
+# include <winsock2.h> |
15527 |
+# undef _GL_INCLUDING_WINSOCK2_H |
15528 |
+#endif |
15529 |
+ |
15530 |
+/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ |
15531 |
+/* C++ compatible function declaration macros. |
15532 |
+ Copyright (C) 2010-2022 Free Software Foundation, Inc. |
15533 |
+ |
15534 |
+ This program is free software: you can redistribute it and/or modify it |
15535 |
+ under the terms of the GNU Lesser General Public License as published |
15536 |
+ by the Free Software Foundation; either version 2 of the License, or |
15537 |
+ (at your option) any later version. |
15538 |
+ |
15539 |
+ This program is distributed in the hope that it will be useful, |
15540 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
15541 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
15542 |
+ Lesser General Public License for more details. |
15543 |
+ |
15544 |
+ You should have received a copy of the GNU Lesser General Public License |
15545 |
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
15546 |
+ |
15547 |
+#ifndef _GL_CXXDEFS_H |
15548 |
+#define _GL_CXXDEFS_H |
15549 |
+ |
15550 |
+/* Begin/end the GNULIB_NAMESPACE namespace. */ |
15551 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
15552 |
+# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { |
15553 |
+# define _GL_END_NAMESPACE } |
15554 |
+#else |
15555 |
+# define _GL_BEGIN_NAMESPACE |
15556 |
+# define _GL_END_NAMESPACE |
15557 |
+#endif |
15558 |
+ |
15559 |
+/* The three most frequent use cases of these macros are: |
15560 |
+ |
15561 |
+ * For providing a substitute for a function that is missing on some |
15562 |
+ platforms, but is declared and works fine on the platforms on which |
15563 |
+ it exists: |
15564 |
+ |
15565 |
+ #if @GNULIB_FOO@ |
15566 |
+ # if !@HAVE_FOO@ |
15567 |
+ _GL_FUNCDECL_SYS (foo, ...); |
15568 |
+ # endif |
15569 |
+ _GL_CXXALIAS_SYS (foo, ...); |
15570 |
+ _GL_CXXALIASWARN (foo); |
15571 |
+ #elif defined GNULIB_POSIXCHECK |
15572 |
+ ... |
15573 |
+ #endif |
15574 |
+ |
15575 |
+ * For providing a replacement for a function that exists on all platforms, |
15576 |
+ but is broken/insufficient and needs to be replaced on some platforms: |
15577 |
+ |
15578 |
+ #if @GNULIB_FOO@ |
15579 |
+ # if @REPLACE_FOO@ |
15580 |
+ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
15581 |
+ # undef foo |
15582 |
+ # define foo rpl_foo |
15583 |
+ # endif |
15584 |
+ _GL_FUNCDECL_RPL (foo, ...); |
15585 |
+ _GL_CXXALIAS_RPL (foo, ...); |
15586 |
+ # else |
15587 |
+ _GL_CXXALIAS_SYS (foo, ...); |
15588 |
+ # endif |
15589 |
+ _GL_CXXALIASWARN (foo); |
15590 |
+ #elif defined GNULIB_POSIXCHECK |
15591 |
+ ... |
15592 |
+ #endif |
15593 |
+ |
15594 |
+ * For providing a replacement for a function that exists on some platforms |
15595 |
+ but is broken/insufficient and needs to be replaced on some of them and |
15596 |
+ is additionally either missing or undeclared on some other platforms: |
15597 |
+ |
15598 |
+ #if @GNULIB_FOO@ |
15599 |
+ # if @REPLACE_FOO@ |
15600 |
+ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
15601 |
+ # undef foo |
15602 |
+ # define foo rpl_foo |
15603 |
+ # endif |
15604 |
+ _GL_FUNCDECL_RPL (foo, ...); |
15605 |
+ _GL_CXXALIAS_RPL (foo, ...); |
15606 |
+ # else |
15607 |
+ # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ |
15608 |
+ _GL_FUNCDECL_SYS (foo, ...); |
15609 |
+ # endif |
15610 |
+ _GL_CXXALIAS_SYS (foo, ...); |
15611 |
+ # endif |
15612 |
+ _GL_CXXALIASWARN (foo); |
15613 |
+ #elif defined GNULIB_POSIXCHECK |
15614 |
+ ... |
15615 |
+ #endif |
15616 |
+*/ |
15617 |
+ |
15618 |
+/* _GL_EXTERN_C declaration; |
15619 |
+ performs the declaration with C linkage. */ |
15620 |
+#if defined __cplusplus |
15621 |
+# define _GL_EXTERN_C extern "C" |
15622 |
+#else |
15623 |
+# define _GL_EXTERN_C extern |
15624 |
+#endif |
15625 |
+ |
15626 |
+/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); |
15627 |
+ declares a replacement function, named rpl_func, with the given prototype, |
15628 |
+ consisting of return type, parameters, and attributes. |
15629 |
+ Example: |
15630 |
+ _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) |
15631 |
+ _GL_ARG_NONNULL ((1))); |
15632 |
+ */ |
15633 |
+#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ |
15634 |
+ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) |
15635 |
+#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ |
15636 |
+ _GL_EXTERN_C rettype rpl_func parameters_and_attributes |
15637 |
+ |
15638 |
+/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); |
15639 |
+ declares the system function, named func, with the given prototype, |
15640 |
+ consisting of return type, parameters, and attributes. |
15641 |
+ Example: |
15642 |
+ _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) |
15643 |
+ _GL_ARG_NONNULL ((1))); |
15644 |
+ */ |
15645 |
+#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ |
15646 |
+ _GL_EXTERN_C rettype func parameters_and_attributes |
15647 |
+ |
15648 |
+/* _GL_CXXALIAS_RPL (func, rettype, parameters); |
15649 |
+ declares a C++ alias called GNULIB_NAMESPACE::func |
15650 |
+ that redirects to rpl_func, if GNULIB_NAMESPACE is defined. |
15651 |
+ Example: |
15652 |
+ _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); |
15653 |
+ |
15654 |
+ Wrapping rpl_func in an object with an inline conversion operator |
15655 |
+ avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is |
15656 |
+ actually used in the program. */ |
15657 |
+#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ |
15658 |
+ _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) |
15659 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
15660 |
+# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ |
15661 |
+ namespace GNULIB_NAMESPACE \ |
15662 |
+ { \ |
15663 |
+ static const struct _gl_ ## func ## _wrapper \ |
15664 |
+ { \ |
15665 |
+ typedef rettype (*type) parameters; \ |
15666 |
+ \ |
15667 |
+ inline operator type () const \ |
15668 |
+ { \ |
15669 |
+ return ::rpl_func; \ |
15670 |
+ } \ |
15671 |
+ } func = {}; \ |
15672 |
+ } \ |
15673 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
15674 |
+#else |
15675 |
+# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ |
15676 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
15677 |
+#endif |
15678 |
+ |
15679 |
+/* _GL_CXXALIAS_MDA (func, rettype, parameters); |
15680 |
+ is to be used when func is a Microsoft deprecated alias, on native Windows. |
15681 |
+ It declares a C++ alias called GNULIB_NAMESPACE::func |
15682 |
+ that redirects to _func, if GNULIB_NAMESPACE is defined. |
15683 |
+ Example: |
15684 |
+ _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); |
15685 |
+ */ |
15686 |
+#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ |
15687 |
+ _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) |
15688 |
+ |
15689 |
+/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); |
15690 |
+ is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); |
15691 |
+ except that the C function rpl_func may have a slightly different |
15692 |
+ declaration. A cast is used to silence the "invalid conversion" error |
15693 |
+ that would otherwise occur. */ |
15694 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
15695 |
+# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ |
15696 |
+ namespace GNULIB_NAMESPACE \ |
15697 |
+ { \ |
15698 |
+ static const struct _gl_ ## func ## _wrapper \ |
15699 |
+ { \ |
15700 |
+ typedef rettype (*type) parameters; \ |
15701 |
+ \ |
15702 |
+ inline operator type () const \ |
15703 |
+ { \ |
15704 |
+ return reinterpret_cast<type>(::rpl_func); \ |
15705 |
+ } \ |
15706 |
+ } func = {}; \ |
15707 |
+ } \ |
15708 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
15709 |
+#else |
15710 |
+# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ |
15711 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
15712 |
+#endif |
15713 |
+ |
15714 |
+/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); |
15715 |
+ is like _GL_CXXALIAS_MDA (func, rettype, parameters); |
15716 |
+ except that the C function func may have a slightly different declaration. |
15717 |
+ A cast is used to silence the "invalid conversion" error that would |
15718 |
+ otherwise occur. */ |
15719 |
+#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ |
15720 |
+ _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) |
15721 |
+ |
15722 |
+/* _GL_CXXALIAS_SYS (func, rettype, parameters); |
15723 |
+ declares a C++ alias called GNULIB_NAMESPACE::func |
15724 |
+ that redirects to the system provided function func, if GNULIB_NAMESPACE |
15725 |
+ is defined. |
15726 |
+ Example: |
15727 |
+ _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); |
15728 |
+ |
15729 |
+ Wrapping func in an object with an inline conversion operator |
15730 |
+ avoids a reference to func unless GNULIB_NAMESPACE::func is |
15731 |
+ actually used in the program. */ |
15732 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
15733 |
+# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ |
15734 |
+ namespace GNULIB_NAMESPACE \ |
15735 |
+ { \ |
15736 |
+ static const struct _gl_ ## func ## _wrapper \ |
15737 |
+ { \ |
15738 |
+ typedef rettype (*type) parameters; \ |
15739 |
+ \ |
15740 |
+ inline operator type () const \ |
15741 |
+ { \ |
15742 |
+ return ::func; \ |
15743 |
+ } \ |
15744 |
+ } func = {}; \ |
15745 |
+ } \ |
15746 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
15747 |
+#else |
15748 |
+# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ |
15749 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
15750 |
+#endif |
15751 |
+ |
15752 |
+/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); |
15753 |
+ is like _GL_CXXALIAS_SYS (func, rettype, parameters); |
15754 |
+ except that the C function func may have a slightly different declaration. |
15755 |
+ A cast is used to silence the "invalid conversion" error that would |
15756 |
+ otherwise occur. */ |
15757 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
15758 |
+# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ |
15759 |
+ namespace GNULIB_NAMESPACE \ |
15760 |
+ { \ |
15761 |
+ static const struct _gl_ ## func ## _wrapper \ |
15762 |
+ { \ |
15763 |
+ typedef rettype (*type) parameters; \ |
15764 |
+ \ |
15765 |
+ inline operator type () const \ |
15766 |
+ { \ |
15767 |
+ return reinterpret_cast<type>(::func); \ |
15768 |
+ } \ |
15769 |
+ } func = {}; \ |
15770 |
+ } \ |
15771 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
15772 |
+#else |
15773 |
+# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ |
15774 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
15775 |
+#endif |
15776 |
+ |
15777 |
+/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); |
15778 |
+ is like _GL_CXXALIAS_SYS (func, rettype, parameters); |
15779 |
+ except that the C function is picked among a set of overloaded functions, |
15780 |
+ namely the one with rettype2 and parameters2. Two consecutive casts |
15781 |
+ are used to silence the "cannot find a match" and "invalid conversion" |
15782 |
+ errors that would otherwise occur. */ |
15783 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
15784 |
+ /* The outer cast must be a reinterpret_cast. |
15785 |
+ The inner cast: When the function is defined as a set of overloaded |
15786 |
+ functions, it works as a static_cast<>, choosing the designated variant. |
15787 |
+ When the function is defined as a single variant, it works as a |
15788 |
+ reinterpret_cast<>. The parenthesized cast syntax works both ways. */ |
15789 |
+# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ |
15790 |
+ namespace GNULIB_NAMESPACE \ |
15791 |
+ { \ |
15792 |
+ static const struct _gl_ ## func ## _wrapper \ |
15793 |
+ { \ |
15794 |
+ typedef rettype (*type) parameters; \ |
15795 |
+ \ |
15796 |
+ inline operator type () const \ |
15797 |
+ { \ |
15798 |
+ return reinterpret_cast<type>((rettype2 (*) parameters2)(::func)); \ |
15799 |
+ } \ |
15800 |
+ } func = {}; \ |
15801 |
+ } \ |
15802 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
15803 |
+#else |
15804 |
+# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ |
15805 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
15806 |
+#endif |
15807 |
+ |
15808 |
+/* _GL_CXXALIASWARN (func); |
15809 |
+ causes a warning to be emitted when ::func is used but not when |
15810 |
+ GNULIB_NAMESPACE::func is used. func must be defined without overloaded |
15811 |
+ variants. */ |
15812 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
15813 |
+# define _GL_CXXALIASWARN(func) \ |
15814 |
+ _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) |
15815 |
+# define _GL_CXXALIASWARN_1(func,namespace) \ |
15816 |
+ _GL_CXXALIASWARN_2 (func, namespace) |
15817 |
+/* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>, |
15818 |
+ we enable the warning only when not optimizing. */ |
15819 |
+# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) |
15820 |
+# define _GL_CXXALIASWARN_2(func,namespace) \ |
15821 |
+ _GL_WARN_ON_USE (func, \ |
15822 |
+ "The symbol ::" #func " refers to the system function. " \ |
15823 |
+ "Use " #namespace "::" #func " instead.") |
15824 |
+# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING |
15825 |
+# define _GL_CXXALIASWARN_2(func,namespace) \ |
15826 |
+ extern __typeof__ (func) func |
15827 |
+# else |
15828 |
+# define _GL_CXXALIASWARN_2(func,namespace) \ |
15829 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
15830 |
+# endif |
15831 |
+#else |
15832 |
+# define _GL_CXXALIASWARN(func) \ |
15833 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
15834 |
+#endif |
15835 |
+ |
15836 |
+/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); |
15837 |
+ causes a warning to be emitted when the given overloaded variant of ::func |
15838 |
+ is used but not when GNULIB_NAMESPACE::func is used. */ |
15839 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
15840 |
+# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ |
15841 |
+ _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ |
15842 |
+ GNULIB_NAMESPACE) |
15843 |
+# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ |
15844 |
+ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) |
15845 |
+/* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>, |
15846 |
+ we enable the warning only when not optimizing. */ |
15847 |
+# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) |
15848 |
+# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ |
15849 |
+ _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ |
15850 |
+ "The symbol ::" #func " refers to the system function. " \ |
15851 |
+ "Use " #namespace "::" #func " instead.") |
15852 |
+# else |
15853 |
+# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ |
15854 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
15855 |
+# endif |
15856 |
+#else |
15857 |
+# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ |
15858 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
15859 |
+#endif |
15860 |
+ |
15861 |
+#endif /* _GL_CXXDEFS_H */ |
15862 |
+ |
15863 |
+/* The definition of _GL_ARG_NONNULL is copied here. */ |
15864 |
+/* A C macro for declaring that specific arguments must not be NULL. |
15865 |
+ Copyright (C) 2009-2022 Free Software Foundation, Inc. |
15866 |
+ |
15867 |
+ This program is free software: you can redistribute it and/or modify it |
15868 |
+ under the terms of the GNU Lesser General Public License as published |
15869 |
+ by the Free Software Foundation; either version 2 of the License, or |
15870 |
+ (at your option) any later version. |
15871 |
+ |
15872 |
+ This program is distributed in the hope that it will be useful, |
15873 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
15874 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
15875 |
+ Lesser General Public License for more details. |
15876 |
+ |
15877 |
+ You should have received a copy of the GNU Lesser General Public License |
15878 |
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
15879 |
+ |
15880 |
+/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools |
15881 |
+ that the values passed as arguments n, ..., m must be non-NULL pointers. |
15882 |
+ n = 1 stands for the first argument, n = 2 for the second argument etc. */ |
15883 |
+#ifndef _GL_ARG_NONNULL |
15884 |
+# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ |
15885 |
+# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) |
15886 |
+# else |
15887 |
+# define _GL_ARG_NONNULL(params) |
15888 |
+# endif |
15889 |
+#endif |
15890 |
+ |
15891 |
+/* The definition of _GL_WARN_ON_USE is copied here. */ |
15892 |
+/* A C macro for emitting warnings if a function is used. |
15893 |
+ Copyright (C) 2010-2022 Free Software Foundation, Inc. |
15894 |
+ |
15895 |
+ This program is free software: you can redistribute it and/or modify it |
15896 |
+ under the terms of the GNU Lesser General Public License as published |
15897 |
+ by the Free Software Foundation; either version 2 of the License, or |
15898 |
+ (at your option) any later version. |
15899 |
+ |
15900 |
+ This program is distributed in the hope that it will be useful, |
15901 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
15902 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
15903 |
+ Lesser General Public License for more details. |
15904 |
+ |
15905 |
+ You should have received a copy of the GNU Lesser General Public License |
15906 |
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
15907 |
+ |
15908 |
+/* _GL_WARN_ON_USE (function, "literal string") issues a declaration |
15909 |
+ for FUNCTION which will then trigger a compiler warning containing |
15910 |
+ the text of "literal string" anywhere that function is called, if |
15911 |
+ supported by the compiler. If the compiler does not support this |
15912 |
+ feature, the macro expands to an unused extern declaration. |
15913 |
+ |
15914 |
+ _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the |
15915 |
+ attribute used in _GL_WARN_ON_USE. If the compiler does not support |
15916 |
+ this feature, it expands to empty. |
15917 |
+ |
15918 |
+ These macros are useful for marking a function as a potential |
15919 |
+ portability trap, with the intent that "literal string" include |
15920 |
+ instructions on the replacement function that should be used |
15921 |
+ instead. |
15922 |
+ _GL_WARN_ON_USE is for functions with 'extern' linkage. |
15923 |
+ _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline' |
15924 |
+ linkage. |
15925 |
+ |
15926 |
+ However, one of the reasons that a function is a portability trap is |
15927 |
+ if it has the wrong signature. Declaring FUNCTION with a different |
15928 |
+ signature in C is a compilation error, so this macro must use the |
15929 |
+ same type as any existing declaration so that programs that avoid |
15930 |
+ the problematic FUNCTION do not fail to compile merely because they |
15931 |
+ included a header that poisoned the function. But this implies that |
15932 |
+ _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already |
15933 |
+ have a declaration. Use of this macro implies that there must not |
15934 |
+ be any other macro hiding the declaration of FUNCTION; but |
15935 |
+ undefining FUNCTION first is part of the poisoning process anyway |
15936 |
+ (although for symbols that are provided only via a macro, the result |
15937 |
+ is a compilation error rather than a warning containing |
15938 |
+ "literal string"). Also note that in C++, it is only safe to use if |
15939 |
+ FUNCTION has no overloads. |
15940 |
+ |
15941 |
+ For an example, it is possible to poison 'getline' by: |
15942 |
+ - adding a call to gl_WARN_ON_USE_PREPARE([[#include <stdio.h>]], |
15943 |
+ [getline]) in configure.ac, which potentially defines |
15944 |
+ HAVE_RAW_DECL_GETLINE |
15945 |
+ - adding this code to a header that wraps the system <stdio.h>: |
15946 |
+ #undef getline |
15947 |
+ #if HAVE_RAW_DECL_GETLINE |
15948 |
+ _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" |
15949 |
+ "not universally present; use the gnulib module getline"); |
15950 |
+ #endif |
15951 |
+ |
15952 |
+ It is not possible to directly poison global variables. But it is |
15953 |
+ possible to write a wrapper accessor function, and poison that |
15954 |
+ (less common usage, like &environ, will cause a compilation error |
15955 |
+ rather than issue the nice warning, but the end result of informing |
15956 |
+ the developer about their portability problem is still achieved): |
15957 |
+ #if HAVE_RAW_DECL_ENVIRON |
15958 |
+ static char *** |
15959 |
+ rpl_environ (void) { return &environ; } |
15960 |
+ _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); |
15961 |
+ # undef environ |
15962 |
+ # define environ (*rpl_environ ()) |
15963 |
+ #endif |
15964 |
+ or better (avoiding contradictory use of 'static' and 'extern'): |
15965 |
+ #if HAVE_RAW_DECL_ENVIRON |
15966 |
+ static char *** |
15967 |
+ _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared") |
15968 |
+ rpl_environ (void) { return &environ; } |
15969 |
+ # undef environ |
15970 |
+ # define environ (*rpl_environ ()) |
15971 |
+ #endif |
15972 |
+ */ |
15973 |
+#ifndef _GL_WARN_ON_USE |
15974 |
+ |
15975 |
+# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) |
15976 |
+/* A compiler attribute is available in gcc versions 4.3.0 and later. */ |
15977 |
+# define _GL_WARN_ON_USE(function, message) \ |
15978 |
+_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) |
15979 |
+# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ |
15980 |
+ __attribute__ ((__warning__ (message))) |
15981 |
+# elif __clang_major__ >= 4 |
15982 |
+/* Another compiler attribute is available in clang. */ |
15983 |
+# define _GL_WARN_ON_USE(function, message) \ |
15984 |
+_GL_WARN_EXTERN_C __typeof__ (function) function \ |
15985 |
+ __attribute__ ((__diagnose_if__ (1, message, "warning"))) |
15986 |
+# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ |
15987 |
+ __attribute__ ((__diagnose_if__ (1, message, "warning"))) |
15988 |
+# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING |
15989 |
+/* Verify the existence of the function. */ |
15990 |
+# define _GL_WARN_ON_USE(function, message) \ |
15991 |
+_GL_WARN_EXTERN_C __typeof__ (function) function |
15992 |
+# define _GL_WARN_ON_USE_ATTRIBUTE(message) |
15993 |
+# else /* Unsupported. */ |
15994 |
+# define _GL_WARN_ON_USE(function, message) \ |
15995 |
+_GL_WARN_EXTERN_C int _gl_warn_on_use |
15996 |
+# define _GL_WARN_ON_USE_ATTRIBUTE(message) |
15997 |
+# endif |
15998 |
+#endif |
15999 |
+ |
16000 |
+/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") |
16001 |
+ is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the |
16002 |
+ function is declared with the given prototype, consisting of return type, |
16003 |
+ parameters, and attributes. |
16004 |
+ This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does |
16005 |
+ not work in this case. */ |
16006 |
+#ifndef _GL_WARN_ON_USE_CXX |
16007 |
+# if !defined __cplusplus |
16008 |
+# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ |
16009 |
+ _GL_WARN_ON_USE (function, msg) |
16010 |
+# else |
16011 |
+# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) |
16012 |
+/* A compiler attribute is available in gcc versions 4.3.0 and later. */ |
16013 |
+# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ |
16014 |
+extern rettype_gcc function parameters_and_attributes \ |
16015 |
+ __attribute__ ((__warning__ (msg))) |
16016 |
+# elif __clang_major__ >= 4 |
16017 |
+/* Another compiler attribute is available in clang. */ |
16018 |
+# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ |
16019 |
+extern rettype_clang function parameters_and_attributes \ |
16020 |
+ __attribute__ ((__diagnose_if__ (1, msg, "warning"))) |
16021 |
+# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING |
16022 |
+/* Verify the existence of the function. */ |
16023 |
+# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ |
16024 |
+extern rettype_gcc function parameters_and_attributes |
16025 |
+# else /* Unsupported. */ |
16026 |
+# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ |
16027 |
+_GL_WARN_EXTERN_C int _gl_warn_on_use |
16028 |
+# endif |
16029 |
+# endif |
16030 |
+#endif |
16031 |
+ |
16032 |
+/* _GL_WARN_EXTERN_C declaration; |
16033 |
+ performs the declaration with C linkage. */ |
16034 |
+#ifndef _GL_WARN_EXTERN_C |
16035 |
+# if defined __cplusplus |
16036 |
+# define _GL_WARN_EXTERN_C extern "C" |
16037 |
+# else |
16038 |
+# define _GL_WARN_EXTERN_C extern |
16039 |
+# endif |
16040 |
+#endif |
16041 |
+ |
16042 |
+#ifdef __cplusplus |
16043 |
+extern "C" { |
16044 |
+#endif |
16045 |
+ |
16046 |
+#if !1 || 0 |
16047 |
+ |
16048 |
+# if 0 |
16049 |
+# define timeval rpl_timeval |
16050 |
+# endif |
16051 |
+ |
16052 |
+# if !GNULIB_defined_struct_timeval |
16053 |
+struct timeval |
16054 |
+{ |
16055 |
+ time_t tv_sec; |
16056 |
+ long int tv_usec; |
16057 |
+}; |
16058 |
+# define GNULIB_defined_struct_timeval 1 |
16059 |
+# endif |
16060 |
+ |
16061 |
+#endif |
16062 |
+ |
16063 |
+#ifdef __cplusplus |
16064 |
+} |
16065 |
+#endif |
16066 |
+ |
16067 |
+#if 1 |
16068 |
+# if 0 |
16069 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
16070 |
+# undef gettimeofday |
16071 |
+# define gettimeofday rpl_gettimeofday |
16072 |
+# endif |
16073 |
+_GL_FUNCDECL_RPL (gettimeofday, int, |
16074 |
+ (struct timeval *restrict, void *restrict) |
16075 |
+ _GL_ARG_NONNULL ((1))); |
16076 |
+_GL_CXXALIAS_RPL (gettimeofday, int, |
16077 |
+ (struct timeval *restrict, void *restrict)); |
16078 |
+# else |
16079 |
+# if !1 |
16080 |
+_GL_FUNCDECL_SYS (gettimeofday, int, |
16081 |
+ (struct timeval *restrict, void *restrict) |
16082 |
+ _GL_ARG_NONNULL ((1))); |
16083 |
+# endif |
16084 |
+/* Need to cast, because on glibc systems, by default, the second argument is |
16085 |
+ struct timezone *. */ |
16086 |
+_GL_CXXALIAS_SYS_CAST (gettimeofday, int, |
16087 |
+ (struct timeval *restrict, void *restrict)); |
16088 |
+# endif |
16089 |
+_GL_CXXALIASWARN (gettimeofday); |
16090 |
+# if defined __cplusplus && defined GNULIB_NAMESPACE |
16091 |
+namespace GNULIB_NAMESPACE { |
16092 |
+ typedef ::timeval |
16093 |
+# undef timeval |
16094 |
+ timeval; |
16095 |
+# if 0 |
16096 |
+# define timeval rpl_timeval |
16097 |
+ typedef ::timeval timeval; |
16098 |
+# endif |
16099 |
+} |
16100 |
+# endif |
16101 |
+#elif defined GNULIB_POSIXCHECK |
16102 |
+# undef gettimeofday |
16103 |
+# if HAVE_RAW_DECL_GETTIMEOFDAY |
16104 |
+_GL_WARN_ON_USE (gettimeofday, "gettimeofday is unportable - " |
16105 |
+ "use gnulib module gettimeofday for portability"); |
16106 |
+# endif |
16107 |
+#endif |
16108 |
+ |
16109 |
+/* Hide some function declarations from <winsock2.h>. */ |
16110 |
+ |
16111 |
+#if defined _MSC_VER && 0 |
16112 |
+# if !defined _GL_UNISTD_H |
16113 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
16114 |
+# undef close |
16115 |
+# define close close_used_without_including_unistd_h |
16116 |
+# elif !defined __clang__ |
16117 |
+ _GL_WARN_ON_USE (close, |
16118 |
+ "close() used without including <unistd.h>"); |
16119 |
+# endif |
16120 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
16121 |
+# undef gethostname |
16122 |
+# define gethostname gethostname_used_without_including_unistd_h |
16123 |
+# else |
16124 |
+ _GL_WARN_ON_USE (gethostname, |
16125 |
+ "gethostname() used without including <unistd.h>"); |
16126 |
+# endif |
16127 |
+# endif |
16128 |
+# if !defined _GL_SYS_SOCKET_H |
16129 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
16130 |
+# undef socket |
16131 |
+# define socket socket_used_without_including_sys_socket_h |
16132 |
+# undef connect |
16133 |
+# define connect connect_used_without_including_sys_socket_h |
16134 |
+# undef accept |
16135 |
+# define accept accept_used_without_including_sys_socket_h |
16136 |
+# undef bind |
16137 |
+# define bind bind_used_without_including_sys_socket_h |
16138 |
+# undef getpeername |
16139 |
+# define getpeername getpeername_used_without_including_sys_socket_h |
16140 |
+# undef getsockname |
16141 |
+# define getsockname getsockname_used_without_including_sys_socket_h |
16142 |
+# undef getsockopt |
16143 |
+# define getsockopt getsockopt_used_without_including_sys_socket_h |
16144 |
+# undef listen |
16145 |
+# define listen listen_used_without_including_sys_socket_h |
16146 |
+# undef recv |
16147 |
+# define recv recv_used_without_including_sys_socket_h |
16148 |
+# undef send |
16149 |
+# define send send_used_without_including_sys_socket_h |
16150 |
+# undef recvfrom |
16151 |
+# define recvfrom recvfrom_used_without_including_sys_socket_h |
16152 |
+# undef sendto |
16153 |
+# define sendto sendto_used_without_including_sys_socket_h |
16154 |
+# undef setsockopt |
16155 |
+# define setsockopt setsockopt_used_without_including_sys_socket_h |
16156 |
+# undef shutdown |
16157 |
+# define shutdown shutdown_used_without_including_sys_socket_h |
16158 |
+# else |
16159 |
+ _GL_WARN_ON_USE (socket, |
16160 |
+ "socket() used without including <sys/socket.h>"); |
16161 |
+ _GL_WARN_ON_USE (connect, |
16162 |
+ "connect() used without including <sys/socket.h>"); |
16163 |
+ _GL_WARN_ON_USE (accept, |
16164 |
+ "accept() used without including <sys/socket.h>"); |
16165 |
+ _GL_WARN_ON_USE (bind, |
16166 |
+ "bind() used without including <sys/socket.h>"); |
16167 |
+ _GL_WARN_ON_USE (getpeername, |
16168 |
+ "getpeername() used without including <sys/socket.h>"); |
16169 |
+ _GL_WARN_ON_USE (getsockname, |
16170 |
+ "getsockname() used without including <sys/socket.h>"); |
16171 |
+ _GL_WARN_ON_USE (getsockopt, |
16172 |
+ "getsockopt() used without including <sys/socket.h>"); |
16173 |
+ _GL_WARN_ON_USE (listen, |
16174 |
+ "listen() used without including <sys/socket.h>"); |
16175 |
+ _GL_WARN_ON_USE (recv, |
16176 |
+ "recv() used without including <sys/socket.h>"); |
16177 |
+ _GL_WARN_ON_USE (send, |
16178 |
+ "send() used without including <sys/socket.h>"); |
16179 |
+ _GL_WARN_ON_USE (recvfrom, |
16180 |
+ "recvfrom() used without including <sys/socket.h>"); |
16181 |
+ _GL_WARN_ON_USE (sendto, |
16182 |
+ "sendto() used without including <sys/socket.h>"); |
16183 |
+ _GL_WARN_ON_USE (setsockopt, |
16184 |
+ "setsockopt() used without including <sys/socket.h>"); |
16185 |
+ _GL_WARN_ON_USE (shutdown, |
16186 |
+ "shutdown() used without including <sys/socket.h>"); |
16187 |
+# endif |
16188 |
+# endif |
16189 |
+# if !defined _GL_SYS_SELECT_H |
16190 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
16191 |
+# undef select |
16192 |
+# define select select_used_without_including_sys_select_h |
16193 |
+# else |
16194 |
+ _GL_WARN_ON_USE (select, |
16195 |
+ "select() used without including <sys/select.h>"); |
16196 |
+# endif |
16197 |
+# endif |
16198 |
+#endif |
16199 |
+ |
16200 |
+#endif /* _GL_SYS_TIME_H */ |
16201 |
+#endif /* _CYGWIN_SYS_TIME_H */ |
16202 |
+#endif /* _GL_SYS_TIME_H */ |
16203 |
|
16204 |
diff --git a/autotools/gnulib/sys/types.h b/autotools/gnulib/sys/types.h |
16205 |
new file mode 100644 |
16206 |
index 0000000..d720b9d |
16207 |
--- /dev/null |
16208 |
+++ b/autotools/gnulib/sys/types.h |
16209 |
@@ -0,0 +1,107 @@ |
16210 |
+/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ |
16211 |
+/* Provide a more complete sys/types.h. |
16212 |
+ |
16213 |
+ Copyright (C) 2011-2022 Free Software Foundation, Inc. |
16214 |
+ |
16215 |
+ This file is free software: you can redistribute it and/or modify |
16216 |
+ it under the terms of the GNU Lesser General Public License as |
16217 |
+ published by the Free Software Foundation; either version 2.1 of the |
16218 |
+ License, or (at your option) any later version. |
16219 |
+ |
16220 |
+ This file is distributed in the hope that it will be useful, |
16221 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
16222 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16223 |
+ GNU Lesser General Public License for more details. |
16224 |
+ |
16225 |
+ You should have received a copy of the GNU Lesser General Public License |
16226 |
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
16227 |
+ |
16228 |
+#if __GNUC__ >= 3 |
16229 |
+#pragma GCC system_header |
16230 |
+#endif |
16231 |
+ |
16232 |
+ |
16233 |
+#if defined _WIN32 && !defined __CYGWIN__ \ |
16234 |
+ && (defined __need_off_t || defined __need___off64_t \ |
16235 |
+ || defined __need_ssize_t || defined __need_time_t) |
16236 |
+ |
16237 |
+/* Special invocation convention inside mingw header files. */ |
16238 |
+ |
16239 |
+#include_next <sys/types.h> |
16240 |
+ |
16241 |
+#else |
16242 |
+/* Normal invocation convention. */ |
16243 |
+ |
16244 |
+#ifndef _GL_SYS_TYPES_H |
16245 |
+ |
16246 |
+/* The include_next requires a split double-inclusion guard. */ |
16247 |
+# define _GL_INCLUDING_SYS_TYPES_H |
16248 |
+#include_next <sys/types.h> |
16249 |
+# undef _GL_INCLUDING_SYS_TYPES_H |
16250 |
+ |
16251 |
+#ifndef _GL_SYS_TYPES_H |
16252 |
+#define _GL_SYS_TYPES_H |
16253 |
+ |
16254 |
+/* Override off_t if Large File Support is requested on native Windows. */ |
16255 |
+#if 0 |
16256 |
+/* Same as int64_t in <stdint.h>. */ |
16257 |
+# if defined _MSC_VER |
16258 |
+# define off_t __int64 |
16259 |
+# else |
16260 |
+# define off_t long long int |
16261 |
+# endif |
16262 |
+/* Indicator, for gnulib internal purposes. */ |
16263 |
+# define _GL_WINDOWS_64_BIT_OFF_T 1 |
16264 |
+#endif |
16265 |
+ |
16266 |
+/* Override dev_t and ino_t if distinguishable inodes support is requested |
16267 |
+ on native Windows. */ |
16268 |
+#if 0 |
16269 |
+ |
16270 |
+# if 0 == 2 |
16271 |
+/* Experimental, not useful in Windows 10. */ |
16272 |
+ |
16273 |
+/* Define dev_t to a 64-bit type. */ |
16274 |
+# if !defined GNULIB_defined_dev_t |
16275 |
+typedef unsigned long long int rpl_dev_t; |
16276 |
+# undef dev_t |
16277 |
+# define dev_t rpl_dev_t |
16278 |
+# define GNULIB_defined_dev_t 1 |
16279 |
+# endif |
16280 |
+ |
16281 |
+/* Define ino_t to a 128-bit type. */ |
16282 |
+# if !defined GNULIB_defined_ino_t |
16283 |
+/* MSVC does not have a 128-bit integer type. |
16284 |
+ GCC has a 128-bit integer type __int128, but only on 64-bit targets. */ |
16285 |
+typedef struct { unsigned long long int _gl_ino[2]; } rpl_ino_t; |
16286 |
+# undef ino_t |
16287 |
+# define ino_t rpl_ino_t |
16288 |
+# define GNULIB_defined_ino_t 1 |
16289 |
+# endif |
16290 |
+ |
16291 |
+# else /* 0 == 1 */ |
16292 |
+ |
16293 |
+/* Define ino_t to a 64-bit type. */ |
16294 |
+# if !defined GNULIB_defined_ino_t |
16295 |
+typedef unsigned long long int rpl_ino_t; |
16296 |
+# undef ino_t |
16297 |
+# define ino_t rpl_ino_t |
16298 |
+# define GNULIB_defined_ino_t 1 |
16299 |
+# endif |
16300 |
+ |
16301 |
+# endif |
16302 |
+ |
16303 |
+/* Indicator, for gnulib internal purposes. */ |
16304 |
+# define _GL_WINDOWS_STAT_INODES 0 |
16305 |
+ |
16306 |
+#endif |
16307 |
+ |
16308 |
+/* MSVC 9 defines size_t in <stddef.h>, not in <sys/types.h>. */ |
16309 |
+/* But avoid namespace pollution on glibc systems. */ |
16310 |
+#if (defined _WIN32 && ! defined __CYGWIN__) && ! defined __GLIBC__ |
16311 |
+# include <stddef.h> |
16312 |
+#endif |
16313 |
+ |
16314 |
+#endif /* _GL_SYS_TYPES_H */ |
16315 |
+#endif /* _GL_SYS_TYPES_H */ |
16316 |
+#endif /* __need_XXX */ |
16317 |
|
16318 |
diff --git a/autotools/gnulib/time.h b/autotools/gnulib/time.h |
16319 |
new file mode 100644 |
16320 |
index 0000000..0aaffb5 |
16321 |
--- /dev/null |
16322 |
+++ b/autotools/gnulib/time.h |
16323 |
@@ -0,0 +1,959 @@ |
16324 |
+/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ |
16325 |
+/* A more-standard <time.h>. |
16326 |
+ |
16327 |
+ Copyright (C) 2007-2022 Free Software Foundation, Inc. |
16328 |
+ |
16329 |
+ This file is free software: you can redistribute it and/or modify |
16330 |
+ it under the terms of the GNU Lesser General Public License as |
16331 |
+ published by the Free Software Foundation; either version 2.1 of the |
16332 |
+ License, or (at your option) any later version. |
16333 |
+ |
16334 |
+ This file is distributed in the hope that it will be useful, |
16335 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
16336 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16337 |
+ GNU Lesser General Public License for more details. |
16338 |
+ |
16339 |
+ You should have received a copy of the GNU Lesser General Public License |
16340 |
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
16341 |
+ |
16342 |
+#if __GNUC__ >= 3 |
16343 |
+#pragma GCC system_header |
16344 |
+#endif |
16345 |
+ |
16346 |
+ |
16347 |
+/* Don't get in the way of glibc when it includes time.h merely to |
16348 |
+ declare a few standard symbols, rather than to declare all the |
16349 |
+ symbols. (However, skip this for MinGW as it treats __need_time_t |
16350 |
+ incompatibly.) Also, Solaris 8 <time.h> eventually includes itself |
16351 |
+ recursively; if that is happening, just include the system <time.h> |
16352 |
+ without adding our own declarations. */ |
16353 |
+#if (((defined __need_time_t || defined __need_clock_t \ |
16354 |
+ || defined __need_timespec) \ |
16355 |
+ && !defined __MINGW32__) \ |
16356 |
+ || defined _GL_TIME_H) |
16357 |
+ |
16358 |
+# include_next <time.h> |
16359 |
+ |
16360 |
+#else |
16361 |
+ |
16362 |
+# define _GL_TIME_H |
16363 |
+ |
16364 |
+/* mingw's <time.h> provides the functions asctime_r, ctime_r, gmtime_r, |
16365 |
+ localtime_r only if <unistd.h> or <pthread.h> has been included before. */ |
16366 |
+# if defined __MINGW32__ |
16367 |
+# include <unistd.h> |
16368 |
+# endif |
16369 |
+ |
16370 |
+# include_next <time.h> |
16371 |
+ |
16372 |
+/* NetBSD 5.0 mis-defines NULL. */ |
16373 |
+# include <stddef.h> |
16374 |
+ |
16375 |
+/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ |
16376 |
+/* C++ compatible function declaration macros. |
16377 |
+ Copyright (C) 2010-2022 Free Software Foundation, Inc. |
16378 |
+ |
16379 |
+ This program is free software: you can redistribute it and/or modify it |
16380 |
+ under the terms of the GNU Lesser General Public License as published |
16381 |
+ by the Free Software Foundation; either version 2 of the License, or |
16382 |
+ (at your option) any later version. |
16383 |
+ |
16384 |
+ This program is distributed in the hope that it will be useful, |
16385 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
16386 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
16387 |
+ Lesser General Public License for more details. |
16388 |
+ |
16389 |
+ You should have received a copy of the GNU Lesser General Public License |
16390 |
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
16391 |
+ |
16392 |
+#ifndef _GL_CXXDEFS_H |
16393 |
+#define _GL_CXXDEFS_H |
16394 |
+ |
16395 |
+/* Begin/end the GNULIB_NAMESPACE namespace. */ |
16396 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
16397 |
+# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { |
16398 |
+# define _GL_END_NAMESPACE } |
16399 |
+#else |
16400 |
+# define _GL_BEGIN_NAMESPACE |
16401 |
+# define _GL_END_NAMESPACE |
16402 |
+#endif |
16403 |
+ |
16404 |
+/* The three most frequent use cases of these macros are: |
16405 |
+ |
16406 |
+ * For providing a substitute for a function that is missing on some |
16407 |
+ platforms, but is declared and works fine on the platforms on which |
16408 |
+ it exists: |
16409 |
+ |
16410 |
+ #if @GNULIB_FOO@ |
16411 |
+ # if !@HAVE_FOO@ |
16412 |
+ _GL_FUNCDECL_SYS (foo, ...); |
16413 |
+ # endif |
16414 |
+ _GL_CXXALIAS_SYS (foo, ...); |
16415 |
+ _GL_CXXALIASWARN (foo); |
16416 |
+ #elif defined GNULIB_POSIXCHECK |
16417 |
+ ... |
16418 |
+ #endif |
16419 |
+ |
16420 |
+ * For providing a replacement for a function that exists on all platforms, |
16421 |
+ but is broken/insufficient and needs to be replaced on some platforms: |
16422 |
+ |
16423 |
+ #if @GNULIB_FOO@ |
16424 |
+ # if @REPLACE_FOO@ |
16425 |
+ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
16426 |
+ # undef foo |
16427 |
+ # define foo rpl_foo |
16428 |
+ # endif |
16429 |
+ _GL_FUNCDECL_RPL (foo, ...); |
16430 |
+ _GL_CXXALIAS_RPL (foo, ...); |
16431 |
+ # else |
16432 |
+ _GL_CXXALIAS_SYS (foo, ...); |
16433 |
+ # endif |
16434 |
+ _GL_CXXALIASWARN (foo); |
16435 |
+ #elif defined GNULIB_POSIXCHECK |
16436 |
+ ... |
16437 |
+ #endif |
16438 |
+ |
16439 |
+ * For providing a replacement for a function that exists on some platforms |
16440 |
+ but is broken/insufficient and needs to be replaced on some of them and |
16441 |
+ is additionally either missing or undeclared on some other platforms: |
16442 |
+ |
16443 |
+ #if @GNULIB_FOO@ |
16444 |
+ # if @REPLACE_FOO@ |
16445 |
+ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
16446 |
+ # undef foo |
16447 |
+ # define foo rpl_foo |
16448 |
+ # endif |
16449 |
+ _GL_FUNCDECL_RPL (foo, ...); |
16450 |
+ _GL_CXXALIAS_RPL (foo, ...); |
16451 |
+ # else |
16452 |
+ # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ |
16453 |
+ _GL_FUNCDECL_SYS (foo, ...); |
16454 |
+ # endif |
16455 |
+ _GL_CXXALIAS_SYS (foo, ...); |
16456 |
+ # endif |
16457 |
+ _GL_CXXALIASWARN (foo); |
16458 |
+ #elif defined GNULIB_POSIXCHECK |
16459 |
+ ... |
16460 |
+ #endif |
16461 |
+*/ |
16462 |
+ |
16463 |
+/* _GL_EXTERN_C declaration; |
16464 |
+ performs the declaration with C linkage. */ |
16465 |
+#if defined __cplusplus |
16466 |
+# define _GL_EXTERN_C extern "C" |
16467 |
+#else |
16468 |
+# define _GL_EXTERN_C extern |
16469 |
+#endif |
16470 |
+ |
16471 |
+/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); |
16472 |
+ declares a replacement function, named rpl_func, with the given prototype, |
16473 |
+ consisting of return type, parameters, and attributes. |
16474 |
+ Example: |
16475 |
+ _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) |
16476 |
+ _GL_ARG_NONNULL ((1))); |
16477 |
+ */ |
16478 |
+#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ |
16479 |
+ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) |
16480 |
+#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ |
16481 |
+ _GL_EXTERN_C rettype rpl_func parameters_and_attributes |
16482 |
+ |
16483 |
+/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); |
16484 |
+ declares the system function, named func, with the given prototype, |
16485 |
+ consisting of return type, parameters, and attributes. |
16486 |
+ Example: |
16487 |
+ _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) |
16488 |
+ _GL_ARG_NONNULL ((1))); |
16489 |
+ */ |
16490 |
+#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ |
16491 |
+ _GL_EXTERN_C rettype func parameters_and_attributes |
16492 |
+ |
16493 |
+/* _GL_CXXALIAS_RPL (func, rettype, parameters); |
16494 |
+ declares a C++ alias called GNULIB_NAMESPACE::func |
16495 |
+ that redirects to rpl_func, if GNULIB_NAMESPACE is defined. |
16496 |
+ Example: |
16497 |
+ _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); |
16498 |
+ |
16499 |
+ Wrapping rpl_func in an object with an inline conversion operator |
16500 |
+ avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is |
16501 |
+ actually used in the program. */ |
16502 |
+#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ |
16503 |
+ _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) |
16504 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
16505 |
+# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ |
16506 |
+ namespace GNULIB_NAMESPACE \ |
16507 |
+ { \ |
16508 |
+ static const struct _gl_ ## func ## _wrapper \ |
16509 |
+ { \ |
16510 |
+ typedef rettype (*type) parameters; \ |
16511 |
+ \ |
16512 |
+ inline operator type () const \ |
16513 |
+ { \ |
16514 |
+ return ::rpl_func; \ |
16515 |
+ } \ |
16516 |
+ } func = {}; \ |
16517 |
+ } \ |
16518 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
16519 |
+#else |
16520 |
+# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ |
16521 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
16522 |
+#endif |
16523 |
+ |
16524 |
+/* _GL_CXXALIAS_MDA (func, rettype, parameters); |
16525 |
+ is to be used when func is a Microsoft deprecated alias, on native Windows. |
16526 |
+ It declares a C++ alias called GNULIB_NAMESPACE::func |
16527 |
+ that redirects to _func, if GNULIB_NAMESPACE is defined. |
16528 |
+ Example: |
16529 |
+ _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); |
16530 |
+ */ |
16531 |
+#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ |
16532 |
+ _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) |
16533 |
+ |
16534 |
+/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); |
16535 |
+ is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); |
16536 |
+ except that the C function rpl_func may have a slightly different |
16537 |
+ declaration. A cast is used to silence the "invalid conversion" error |
16538 |
+ that would otherwise occur. */ |
16539 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
16540 |
+# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ |
16541 |
+ namespace GNULIB_NAMESPACE \ |
16542 |
+ { \ |
16543 |
+ static const struct _gl_ ## func ## _wrapper \ |
16544 |
+ { \ |
16545 |
+ typedef rettype (*type) parameters; \ |
16546 |
+ \ |
16547 |
+ inline operator type () const \ |
16548 |
+ { \ |
16549 |
+ return reinterpret_cast<type>(::rpl_func); \ |
16550 |
+ } \ |
16551 |
+ } func = {}; \ |
16552 |
+ } \ |
16553 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
16554 |
+#else |
16555 |
+# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ |
16556 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
16557 |
+#endif |
16558 |
+ |
16559 |
+/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); |
16560 |
+ is like _GL_CXXALIAS_MDA (func, rettype, parameters); |
16561 |
+ except that the C function func may have a slightly different declaration. |
16562 |
+ A cast is used to silence the "invalid conversion" error that would |
16563 |
+ otherwise occur. */ |
16564 |
+#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ |
16565 |
+ _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) |
16566 |
+ |
16567 |
+/* _GL_CXXALIAS_SYS (func, rettype, parameters); |
16568 |
+ declares a C++ alias called GNULIB_NAMESPACE::func |
16569 |
+ that redirects to the system provided function func, if GNULIB_NAMESPACE |
16570 |
+ is defined. |
16571 |
+ Example: |
16572 |
+ _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); |
16573 |
+ |
16574 |
+ Wrapping func in an object with an inline conversion operator |
16575 |
+ avoids a reference to func unless GNULIB_NAMESPACE::func is |
16576 |
+ actually used in the program. */ |
16577 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
16578 |
+# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ |
16579 |
+ namespace GNULIB_NAMESPACE \ |
16580 |
+ { \ |
16581 |
+ static const struct _gl_ ## func ## _wrapper \ |
16582 |
+ { \ |
16583 |
+ typedef rettype (*type) parameters; \ |
16584 |
+ \ |
16585 |
+ inline operator type () const \ |
16586 |
+ { \ |
16587 |
+ return ::func; \ |
16588 |
+ } \ |
16589 |
+ } func = {}; \ |
16590 |
+ } \ |
16591 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
16592 |
+#else |
16593 |
+# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ |
16594 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
16595 |
+#endif |
16596 |
+ |
16597 |
+/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); |
16598 |
+ is like _GL_CXXALIAS_SYS (func, rettype, parameters); |
16599 |
+ except that the C function func may have a slightly different declaration. |
16600 |
+ A cast is used to silence the "invalid conversion" error that would |
16601 |
+ otherwise occur. */ |
16602 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
16603 |
+# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ |
16604 |
+ namespace GNULIB_NAMESPACE \ |
16605 |
+ { \ |
16606 |
+ static const struct _gl_ ## func ## _wrapper \ |
16607 |
+ { \ |
16608 |
+ typedef rettype (*type) parameters; \ |
16609 |
+ \ |
16610 |
+ inline operator type () const \ |
16611 |
+ { \ |
16612 |
+ return reinterpret_cast<type>(::func); \ |
16613 |
+ } \ |
16614 |
+ } func = {}; \ |
16615 |
+ } \ |
16616 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
16617 |
+#else |
16618 |
+# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ |
16619 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
16620 |
+#endif |
16621 |
+ |
16622 |
+/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); |
16623 |
+ is like _GL_CXXALIAS_SYS (func, rettype, parameters); |
16624 |
+ except that the C function is picked among a set of overloaded functions, |
16625 |
+ namely the one with rettype2 and parameters2. Two consecutive casts |
16626 |
+ are used to silence the "cannot find a match" and "invalid conversion" |
16627 |
+ errors that would otherwise occur. */ |
16628 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
16629 |
+ /* The outer cast must be a reinterpret_cast. |
16630 |
+ The inner cast: When the function is defined as a set of overloaded |
16631 |
+ functions, it works as a static_cast<>, choosing the designated variant. |
16632 |
+ When the function is defined as a single variant, it works as a |
16633 |
+ reinterpret_cast<>. The parenthesized cast syntax works both ways. */ |
16634 |
+# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ |
16635 |
+ namespace GNULIB_NAMESPACE \ |
16636 |
+ { \ |
16637 |
+ static const struct _gl_ ## func ## _wrapper \ |
16638 |
+ { \ |
16639 |
+ typedef rettype (*type) parameters; \ |
16640 |
+ \ |
16641 |
+ inline operator type () const \ |
16642 |
+ { \ |
16643 |
+ return reinterpret_cast<type>((rettype2 (*) parameters2)(::func)); \ |
16644 |
+ } \ |
16645 |
+ } func = {}; \ |
16646 |
+ } \ |
16647 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
16648 |
+#else |
16649 |
+# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ |
16650 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
16651 |
+#endif |
16652 |
+ |
16653 |
+/* _GL_CXXALIASWARN (func); |
16654 |
+ causes a warning to be emitted when ::func is used but not when |
16655 |
+ GNULIB_NAMESPACE::func is used. func must be defined without overloaded |
16656 |
+ variants. */ |
16657 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
16658 |
+# define _GL_CXXALIASWARN(func) \ |
16659 |
+ _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) |
16660 |
+# define _GL_CXXALIASWARN_1(func,namespace) \ |
16661 |
+ _GL_CXXALIASWARN_2 (func, namespace) |
16662 |
+/* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>, |
16663 |
+ we enable the warning only when not optimizing. */ |
16664 |
+# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) |
16665 |
+# define _GL_CXXALIASWARN_2(func,namespace) \ |
16666 |
+ _GL_WARN_ON_USE (func, \ |
16667 |
+ "The symbol ::" #func " refers to the system function. " \ |
16668 |
+ "Use " #namespace "::" #func " instead.") |
16669 |
+# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING |
16670 |
+# define _GL_CXXALIASWARN_2(func,namespace) \ |
16671 |
+ extern __typeof__ (func) func |
16672 |
+# else |
16673 |
+# define _GL_CXXALIASWARN_2(func,namespace) \ |
16674 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
16675 |
+# endif |
16676 |
+#else |
16677 |
+# define _GL_CXXALIASWARN(func) \ |
16678 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
16679 |
+#endif |
16680 |
+ |
16681 |
+/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); |
16682 |
+ causes a warning to be emitted when the given overloaded variant of ::func |
16683 |
+ is used but not when GNULIB_NAMESPACE::func is used. */ |
16684 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
16685 |
+# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ |
16686 |
+ _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ |
16687 |
+ GNULIB_NAMESPACE) |
16688 |
+# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ |
16689 |
+ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) |
16690 |
+/* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>, |
16691 |
+ we enable the warning only when not optimizing. */ |
16692 |
+# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) |
16693 |
+# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ |
16694 |
+ _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ |
16695 |
+ "The symbol ::" #func " refers to the system function. " \ |
16696 |
+ "Use " #namespace "::" #func " instead.") |
16697 |
+# else |
16698 |
+# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ |
16699 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
16700 |
+# endif |
16701 |
+#else |
16702 |
+# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ |
16703 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
16704 |
+#endif |
16705 |
+ |
16706 |
+#endif /* _GL_CXXDEFS_H */ |
16707 |
+ |
16708 |
+/* The definition of _GL_ARG_NONNULL is copied here. */ |
16709 |
+/* A C macro for declaring that specific arguments must not be NULL. |
16710 |
+ Copyright (C) 2009-2022 Free Software Foundation, Inc. |
16711 |
+ |
16712 |
+ This program is free software: you can redistribute it and/or modify it |
16713 |
+ under the terms of the GNU Lesser General Public License as published |
16714 |
+ by the Free Software Foundation; either version 2 of the License, or |
16715 |
+ (at your option) any later version. |
16716 |
+ |
16717 |
+ This program is distributed in the hope that it will be useful, |
16718 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
16719 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
16720 |
+ Lesser General Public License for more details. |
16721 |
+ |
16722 |
+ You should have received a copy of the GNU Lesser General Public License |
16723 |
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
16724 |
+ |
16725 |
+/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools |
16726 |
+ that the values passed as arguments n, ..., m must be non-NULL pointers. |
16727 |
+ n = 1 stands for the first argument, n = 2 for the second argument etc. */ |
16728 |
+#ifndef _GL_ARG_NONNULL |
16729 |
+# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ |
16730 |
+# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) |
16731 |
+# else |
16732 |
+# define _GL_ARG_NONNULL(params) |
16733 |
+# endif |
16734 |
+#endif |
16735 |
+ |
16736 |
+/* The definition of _GL_WARN_ON_USE is copied here. */ |
16737 |
+/* A C macro for emitting warnings if a function is used. |
16738 |
+ Copyright (C) 2010-2022 Free Software Foundation, Inc. |
16739 |
+ |
16740 |
+ This program is free software: you can redistribute it and/or modify it |
16741 |
+ under the terms of the GNU Lesser General Public License as published |
16742 |
+ by the Free Software Foundation; either version 2 of the License, or |
16743 |
+ (at your option) any later version. |
16744 |
+ |
16745 |
+ This program is distributed in the hope that it will be useful, |
16746 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
16747 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
16748 |
+ Lesser General Public License for more details. |
16749 |
+ |
16750 |
+ You should have received a copy of the GNU Lesser General Public License |
16751 |
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
16752 |
+ |
16753 |
+/* _GL_WARN_ON_USE (function, "literal string") issues a declaration |
16754 |
+ for FUNCTION which will then trigger a compiler warning containing |
16755 |
+ the text of "literal string" anywhere that function is called, if |
16756 |
+ supported by the compiler. If the compiler does not support this |
16757 |
+ feature, the macro expands to an unused extern declaration. |
16758 |
+ |
16759 |
+ _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the |
16760 |
+ attribute used in _GL_WARN_ON_USE. If the compiler does not support |
16761 |
+ this feature, it expands to empty. |
16762 |
+ |
16763 |
+ These macros are useful for marking a function as a potential |
16764 |
+ portability trap, with the intent that "literal string" include |
16765 |
+ instructions on the replacement function that should be used |
16766 |
+ instead. |
16767 |
+ _GL_WARN_ON_USE is for functions with 'extern' linkage. |
16768 |
+ _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline' |
16769 |
+ linkage. |
16770 |
+ |
16771 |
+ However, one of the reasons that a function is a portability trap is |
16772 |
+ if it has the wrong signature. Declaring FUNCTION with a different |
16773 |
+ signature in C is a compilation error, so this macro must use the |
16774 |
+ same type as any existing declaration so that programs that avoid |
16775 |
+ the problematic FUNCTION do not fail to compile merely because they |
16776 |
+ included a header that poisoned the function. But this implies that |
16777 |
+ _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already |
16778 |
+ have a declaration. Use of this macro implies that there must not |
16779 |
+ be any other macro hiding the declaration of FUNCTION; but |
16780 |
+ undefining FUNCTION first is part of the poisoning process anyway |
16781 |
+ (although for symbols that are provided only via a macro, the result |
16782 |
+ is a compilation error rather than a warning containing |
16783 |
+ "literal string"). Also note that in C++, it is only safe to use if |
16784 |
+ FUNCTION has no overloads. |
16785 |
+ |
16786 |
+ For an example, it is possible to poison 'getline' by: |
16787 |
+ - adding a call to gl_WARN_ON_USE_PREPARE([[#include <stdio.h>]], |
16788 |
+ [getline]) in configure.ac, which potentially defines |
16789 |
+ HAVE_RAW_DECL_GETLINE |
16790 |
+ - adding this code to a header that wraps the system <stdio.h>: |
16791 |
+ #undef getline |
16792 |
+ #if HAVE_RAW_DECL_GETLINE |
16793 |
+ _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" |
16794 |
+ "not universally present; use the gnulib module getline"); |
16795 |
+ #endif |
16796 |
+ |
16797 |
+ It is not possible to directly poison global variables. But it is |
16798 |
+ possible to write a wrapper accessor function, and poison that |
16799 |
+ (less common usage, like &environ, will cause a compilation error |
16800 |
+ rather than issue the nice warning, but the end result of informing |
16801 |
+ the developer about their portability problem is still achieved): |
16802 |
+ #if HAVE_RAW_DECL_ENVIRON |
16803 |
+ static char *** |
16804 |
+ rpl_environ (void) { return &environ; } |
16805 |
+ _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); |
16806 |
+ # undef environ |
16807 |
+ # define environ (*rpl_environ ()) |
16808 |
+ #endif |
16809 |
+ or better (avoiding contradictory use of 'static' and 'extern'): |
16810 |
+ #if HAVE_RAW_DECL_ENVIRON |
16811 |
+ static char *** |
16812 |
+ _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared") |
16813 |
+ rpl_environ (void) { return &environ; } |
16814 |
+ # undef environ |
16815 |
+ # define environ (*rpl_environ ()) |
16816 |
+ #endif |
16817 |
+ */ |
16818 |
+#ifndef _GL_WARN_ON_USE |
16819 |
+ |
16820 |
+# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) |
16821 |
+/* A compiler attribute is available in gcc versions 4.3.0 and later. */ |
16822 |
+# define _GL_WARN_ON_USE(function, message) \ |
16823 |
+_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) |
16824 |
+# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ |
16825 |
+ __attribute__ ((__warning__ (message))) |
16826 |
+# elif __clang_major__ >= 4 |
16827 |
+/* Another compiler attribute is available in clang. */ |
16828 |
+# define _GL_WARN_ON_USE(function, message) \ |
16829 |
+_GL_WARN_EXTERN_C __typeof__ (function) function \ |
16830 |
+ __attribute__ ((__diagnose_if__ (1, message, "warning"))) |
16831 |
+# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ |
16832 |
+ __attribute__ ((__diagnose_if__ (1, message, "warning"))) |
16833 |
+# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING |
16834 |
+/* Verify the existence of the function. */ |
16835 |
+# define _GL_WARN_ON_USE(function, message) \ |
16836 |
+_GL_WARN_EXTERN_C __typeof__ (function) function |
16837 |
+# define _GL_WARN_ON_USE_ATTRIBUTE(message) |
16838 |
+# else /* Unsupported. */ |
16839 |
+# define _GL_WARN_ON_USE(function, message) \ |
16840 |
+_GL_WARN_EXTERN_C int _gl_warn_on_use |
16841 |
+# define _GL_WARN_ON_USE_ATTRIBUTE(message) |
16842 |
+# endif |
16843 |
+#endif |
16844 |
+ |
16845 |
+/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") |
16846 |
+ is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the |
16847 |
+ function is declared with the given prototype, consisting of return type, |
16848 |
+ parameters, and attributes. |
16849 |
+ This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does |
16850 |
+ not work in this case. */ |
16851 |
+#ifndef _GL_WARN_ON_USE_CXX |
16852 |
+# if !defined __cplusplus |
16853 |
+# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ |
16854 |
+ _GL_WARN_ON_USE (function, msg) |
16855 |
+# else |
16856 |
+# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) |
16857 |
+/* A compiler attribute is available in gcc versions 4.3.0 and later. */ |
16858 |
+# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ |
16859 |
+extern rettype_gcc function parameters_and_attributes \ |
16860 |
+ __attribute__ ((__warning__ (msg))) |
16861 |
+# elif __clang_major__ >= 4 |
16862 |
+/* Another compiler attribute is available in clang. */ |
16863 |
+# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ |
16864 |
+extern rettype_clang function parameters_and_attributes \ |
16865 |
+ __attribute__ ((__diagnose_if__ (1, msg, "warning"))) |
16866 |
+# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING |
16867 |
+/* Verify the existence of the function. */ |
16868 |
+# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ |
16869 |
+extern rettype_gcc function parameters_and_attributes |
16870 |
+# else /* Unsupported. */ |
16871 |
+# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ |
16872 |
+_GL_WARN_EXTERN_C int _gl_warn_on_use |
16873 |
+# endif |
16874 |
+# endif |
16875 |
+#endif |
16876 |
+ |
16877 |
+/* _GL_WARN_EXTERN_C declaration; |
16878 |
+ performs the declaration with C linkage. */ |
16879 |
+#ifndef _GL_WARN_EXTERN_C |
16880 |
+# if defined __cplusplus |
16881 |
+# define _GL_WARN_EXTERN_C extern "C" |
16882 |
+# else |
16883 |
+# define _GL_WARN_EXTERN_C extern |
16884 |
+# endif |
16885 |
+#endif |
16886 |
+ |
16887 |
+/* Some systems don't define struct timespec (e.g., AIX 4.1). |
16888 |
+ Or they define it with the wrong member names or define it in <sys/time.h> |
16889 |
+ (e.g., FreeBSD circa 1997). Stock Mingw prior to 3.0 does not define it, |
16890 |
+ but the pthreads-win32 library defines it in <pthread.h>. */ |
16891 |
+# if ! 1 |
16892 |
+# if 0 |
16893 |
+# include <sys/time.h> |
16894 |
+# elif 0 |
16895 |
+# include <pthread.h> |
16896 |
+# elif 0 |
16897 |
+# include <unistd.h> |
16898 |
+# else |
16899 |
+ |
16900 |
+# ifdef __cplusplus |
16901 |
+extern "C" { |
16902 |
+# endif |
16903 |
+ |
16904 |
+# if !GNULIB_defined_struct_timespec |
16905 |
+# undef timespec |
16906 |
+# define timespec rpl_timespec |
16907 |
+struct timespec |
16908 |
+{ |
16909 |
+ time_t tv_sec; |
16910 |
+ long int tv_nsec; |
16911 |
+}; |
16912 |
+# define GNULIB_defined_struct_timespec 1 |
16913 |
+# endif |
16914 |
+ |
16915 |
+# ifdef __cplusplus |
16916 |
+} |
16917 |
+# endif |
16918 |
+ |
16919 |
+# endif |
16920 |
+# endif |
16921 |
+ |
16922 |
+# if !GNULIB_defined_struct_time_t_must_be_integral |
16923 |
+/* https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_types.h.html |
16924 |
+ requires time_t to be an integer type, even though C99 permits floating |
16925 |
+ point. We don't know of any implementation that uses floating |
16926 |
+ point, and it is much easier to write code that doesn't have to |
16927 |
+ worry about that corner case, so we force the issue. */ |
16928 |
+struct __time_t_must_be_integral { |
16929 |
+ unsigned int __floating_time_t_unsupported : (time_t) 1; |
16930 |
+}; |
16931 |
+# define GNULIB_defined_struct_time_t_must_be_integral 1 |
16932 |
+# endif |
16933 |
+ |
16934 |
+/* Define TIME_UTC, a positive integer constant used for timespec_get(). */ |
16935 |
+# if ! 1 |
16936 |
+# if !GNULIB_defined_TIME_UTC |
16937 |
+# define TIME_UTC 1 |
16938 |
+# define GNULIB_defined_TIME_UTC 1 |
16939 |
+# endif |
16940 |
+# endif |
16941 |
+ |
16942 |
+/* Set *TS to the current time, and return BASE. |
16943 |
+ Upon failure, return 0. */ |
16944 |
+# if 0 |
16945 |
+# if ! 1 |
16946 |
+_GL_FUNCDECL_SYS (timespec_get, int, (struct timespec *ts, int base) |
16947 |
+ _GL_ARG_NONNULL ((1))); |
16948 |
+# endif |
16949 |
+_GL_CXXALIAS_SYS (timespec_get, int, (struct timespec *ts, int base)); |
16950 |
+_GL_CXXALIASWARN (timespec_get); |
16951 |
+# endif |
16952 |
+ |
16953 |
+/* Set *TS to the current time resolution, and return BASE. |
16954 |
+ Upon failure, return 0. */ |
16955 |
+# if 0 |
16956 |
+# if ! 1 |
16957 |
+_GL_FUNCDECL_SYS (timespec_getres, int, (struct timespec *ts, int base) |
16958 |
+ _GL_ARG_NONNULL ((1))); |
16959 |
+# endif |
16960 |
+_GL_CXXALIAS_SYS (timespec_getres, int, (struct timespec *ts, int base)); |
16961 |
+_GL_CXXALIASWARN (timespec_getres); |
16962 |
+# endif |
16963 |
+ |
16964 |
+/* Sleep for at least RQTP seconds unless interrupted, If interrupted, |
16965 |
+ return -1 and store the remaining time into RMTP. See |
16966 |
+ <https://pubs.opengroup.org/onlinepubs/9699919799/functions/nanosleep.html>. */ |
16967 |
+# if 0 |
16968 |
+# if GNULIB_PORTCHECK |
16969 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
16970 |
+# define nanosleep rpl_nanosleep |
16971 |
+# endif |
16972 |
+_GL_FUNCDECL_RPL (nanosleep, int, |
16973 |
+ (struct timespec const *__rqtp, struct timespec *__rmtp) |
16974 |
+ _GL_ARG_NONNULL ((1))); |
16975 |
+_GL_CXXALIAS_RPL (nanosleep, int, |
16976 |
+ (struct timespec const *__rqtp, struct timespec *__rmtp)); |
16977 |
+# else |
16978 |
+# if ! 1 |
16979 |
+_GL_FUNCDECL_SYS (nanosleep, int, |
16980 |
+ (struct timespec const *__rqtp, struct timespec *__rmtp) |
16981 |
+ _GL_ARG_NONNULL ((1))); |
16982 |
+# endif |
16983 |
+_GL_CXXALIAS_SYS (nanosleep, int, |
16984 |
+ (struct timespec const *__rqtp, struct timespec *__rmtp)); |
16985 |
+# endif |
16986 |
+_GL_CXXALIASWARN (nanosleep); |
16987 |
+# endif |
16988 |
+ |
16989 |
+/* Initialize time conversion information. */ |
16990 |
+# if 0 |
16991 |
+# if GNULIB_PORTCHECK |
16992 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
16993 |
+# undef tzset |
16994 |
+# define tzset rpl_tzset |
16995 |
+# endif |
16996 |
+_GL_FUNCDECL_RPL (tzset, void, (void)); |
16997 |
+_GL_CXXALIAS_RPL (tzset, void, (void)); |
16998 |
+# elif defined _WIN32 && !defined __CYGWIN__ |
16999 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
17000 |
+# undef tzset |
17001 |
+# define tzset _tzset |
17002 |
+# endif |
17003 |
+_GL_CXXALIAS_MDA (tzset, void, (void)); |
17004 |
+# else |
17005 |
+_GL_CXXALIAS_SYS (tzset, void, (void)); |
17006 |
+# endif |
17007 |
+_GL_CXXALIASWARN (tzset); |
17008 |
+# elif 1 |
17009 |
+/* On native Windows, map 'tzset' to '_tzset', so that -loldnames is not |
17010 |
+ required. In C++ with GNULIB_NAMESPACE, avoid differences between |
17011 |
+ platforms by defining GNULIB_NAMESPACE::tzset always. */ |
17012 |
+# if defined _WIN32 && !defined __CYGWIN__ |
17013 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
17014 |
+# undef tzset |
17015 |
+# define tzset _tzset |
17016 |
+# endif |
17017 |
+_GL_CXXALIAS_MDA (tzset, void, (void)); |
17018 |
+# else |
17019 |
+_GL_CXXALIAS_SYS (tzset, void, (void)); |
17020 |
+# endif |
17021 |
+_GL_CXXALIASWARN (tzset); |
17022 |
+# endif |
17023 |
+ |
17024 |
+/* Return the 'time_t' representation of TP and normalize TP. */ |
17025 |
+# if 0 |
17026 |
+# if GNULIB_PORTCHECK |
17027 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
17028 |
+# define mktime rpl_mktime |
17029 |
+# endif |
17030 |
+_GL_FUNCDECL_RPL (mktime, time_t, (struct tm *__tp) _GL_ARG_NONNULL ((1))); |
17031 |
+_GL_CXXALIAS_RPL (mktime, time_t, (struct tm *__tp)); |
17032 |
+# else |
17033 |
+_GL_CXXALIAS_SYS (mktime, time_t, (struct tm *__tp)); |
17034 |
+# endif |
17035 |
+# if __GLIBC__ >= 2 |
17036 |
+_GL_CXXALIASWARN (mktime); |
17037 |
+# endif |
17038 |
+# endif |
17039 |
+ |
17040 |
+/* Convert TIMER to RESULT, assuming local time and UTC respectively. See |
17041 |
+ <https://pubs.opengroup.org/onlinepubs/9699919799/functions/localtime_r.html> and |
17042 |
+ <https://pubs.opengroup.org/onlinepubs/9699919799/functions/gmtime_r.html>. */ |
17043 |
+# if 0 |
17044 |
+# if GNULIB_PORTCHECK |
17045 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
17046 |
+# undef localtime_r |
17047 |
+# define localtime_r rpl_localtime_r |
17048 |
+# endif |
17049 |
+_GL_FUNCDECL_RPL (localtime_r, struct tm *, (time_t const *restrict __timer, |
17050 |
+ struct tm *restrict __result) |
17051 |
+ _GL_ARG_NONNULL ((1, 2))); |
17052 |
+_GL_CXXALIAS_RPL (localtime_r, struct tm *, (time_t const *restrict __timer, |
17053 |
+ struct tm *restrict __result)); |
17054 |
+# else |
17055 |
+# if ! 1 |
17056 |
+_GL_FUNCDECL_SYS (localtime_r, struct tm *, (time_t const *restrict __timer, |
17057 |
+ struct tm *restrict __result) |
17058 |
+ _GL_ARG_NONNULL ((1, 2))); |
17059 |
+# endif |
17060 |
+_GL_CXXALIAS_SYS (localtime_r, struct tm *, (time_t const *restrict __timer, |
17061 |
+ struct tm *restrict __result)); |
17062 |
+# endif |
17063 |
+# if 1 |
17064 |
+_GL_CXXALIASWARN (localtime_r); |
17065 |
+# endif |
17066 |
+# if GNULIB_PORTCHECK |
17067 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
17068 |
+# undef gmtime_r |
17069 |
+# define gmtime_r rpl_gmtime_r |
17070 |
+# endif |
17071 |
+_GL_FUNCDECL_RPL (gmtime_r, struct tm *, (time_t const *restrict __timer, |
17072 |
+ struct tm *restrict __result) |
17073 |
+ _GL_ARG_NONNULL ((1, 2))); |
17074 |
+_GL_CXXALIAS_RPL (gmtime_r, struct tm *, (time_t const *restrict __timer, |
17075 |
+ struct tm *restrict __result)); |
17076 |
+# else |
17077 |
+# if ! 1 |
17078 |
+_GL_FUNCDECL_SYS (gmtime_r, struct tm *, (time_t const *restrict __timer, |
17079 |
+ struct tm *restrict __result) |
17080 |
+ _GL_ARG_NONNULL ((1, 2))); |
17081 |
+# endif |
17082 |
+_GL_CXXALIAS_SYS (gmtime_r, struct tm *, (time_t const *restrict __timer, |
17083 |
+ struct tm *restrict __result)); |
17084 |
+# endif |
17085 |
+# if 1 |
17086 |
+_GL_CXXALIASWARN (gmtime_r); |
17087 |
+# endif |
17088 |
+# endif |
17089 |
+ |
17090 |
+/* Convert TIMER to RESULT, assuming local time and UTC respectively. See |
17091 |
+ <https://pubs.opengroup.org/onlinepubs/9699919799/functions/localtime.html> and |
17092 |
+ <https://pubs.opengroup.org/onlinepubs/9699919799/functions/gmtime.html>. */ |
17093 |
+# if 0 || 0 |
17094 |
+# if 0 |
17095 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
17096 |
+# undef localtime |
17097 |
+# define localtime rpl_localtime |
17098 |
+# endif |
17099 |
+_GL_FUNCDECL_RPL (localtime, struct tm *, (time_t const *__timer) |
17100 |
+ _GL_ARG_NONNULL ((1))); |
17101 |
+_GL_CXXALIAS_RPL (localtime, struct tm *, (time_t const *__timer)); |
17102 |
+# else |
17103 |
+_GL_CXXALIAS_SYS (localtime, struct tm *, (time_t const *__timer)); |
17104 |
+# endif |
17105 |
+# if __GLIBC__ >= 2 |
17106 |
+_GL_CXXALIASWARN (localtime); |
17107 |
+# endif |
17108 |
+# endif |
17109 |
+ |
17110 |
+# if 0 || 0 |
17111 |
+# if 0 |
17112 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
17113 |
+# undef gmtime |
17114 |
+# define gmtime rpl_gmtime |
17115 |
+# endif |
17116 |
+_GL_FUNCDECL_RPL (gmtime, struct tm *, (time_t const *__timer) |
17117 |
+ _GL_ARG_NONNULL ((1))); |
17118 |
+_GL_CXXALIAS_RPL (gmtime, struct tm *, (time_t const *__timer)); |
17119 |
+# else |
17120 |
+_GL_CXXALIAS_SYS (gmtime, struct tm *, (time_t const *__timer)); |
17121 |
+# endif |
17122 |
+_GL_CXXALIASWARN (gmtime); |
17123 |
+# endif |
17124 |
+ |
17125 |
+/* Parse BUF as a timestamp, assuming FORMAT specifies its layout, and store |
17126 |
+ the resulting broken-down time into TM. See |
17127 |
+ <https://pubs.opengroup.org/onlinepubs/9699919799/functions/strptime.html>. */ |
17128 |
+# if 0 |
17129 |
+# if ! 1 |
17130 |
+_GL_FUNCDECL_SYS (strptime, char *, (char const *restrict __buf, |
17131 |
+ char const *restrict __format, |
17132 |
+ struct tm *restrict __tm) |
17133 |
+ _GL_ARG_NONNULL ((1, 2, 3))); |
17134 |
+# endif |
17135 |
+_GL_CXXALIAS_SYS (strptime, char *, (char const *restrict __buf, |
17136 |
+ char const *restrict __format, |
17137 |
+ struct tm *restrict __tm)); |
17138 |
+_GL_CXXALIASWARN (strptime); |
17139 |
+# endif |
17140 |
+ |
17141 |
+/* Convert *TP to a date and time string. See |
17142 |
+ <https://pubs.opengroup.org/onlinepubs/9699919799/functions/ctime.html>. */ |
17143 |
+# if 0 |
17144 |
+# if GNULIB_PORTCHECK |
17145 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
17146 |
+# define ctime rpl_ctime |
17147 |
+# endif |
17148 |
+_GL_FUNCDECL_RPL (ctime, char *, (time_t const *__tp) |
17149 |
+ _GL_ARG_NONNULL ((1))); |
17150 |
+_GL_CXXALIAS_RPL (ctime, char *, (time_t const *__tp)); |
17151 |
+# else |
17152 |
+_GL_CXXALIAS_SYS (ctime, char *, (time_t const *__tp)); |
17153 |
+# endif |
17154 |
+# if __GLIBC__ >= 2 |
17155 |
+_GL_CXXALIASWARN (ctime); |
17156 |
+# endif |
17157 |
+# endif |
17158 |
+ |
17159 |
+/* Convert *TP to a date and time string. See |
17160 |
+ <https://pubs.opengroup.org/onlinepubs/9699919799/functions/strftime.html>. */ |
17161 |
+# if 0 |
17162 |
+# if GNULIB_PORTCHECK |
17163 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
17164 |
+# define strftime rpl_strftime |
17165 |
+# endif |
17166 |
+_GL_FUNCDECL_RPL (strftime, size_t, |
17167 |
+ (char *restrict __buf, size_t __bufsize, |
17168 |
+ const char *restrict __fmt, const struct tm *restrict __tp) |
17169 |
+ _GL_ARG_NONNULL ((1, 3, 4))); |
17170 |
+_GL_CXXALIAS_RPL (strftime, size_t, |
17171 |
+ (char *restrict __buf, size_t __bufsize, |
17172 |
+ const char *restrict __fmt, const struct tm *restrict __tp)); |
17173 |
+# else |
17174 |
+_GL_CXXALIAS_SYS (strftime, size_t, |
17175 |
+ (char *restrict __buf, size_t __bufsize, |
17176 |
+ const char *restrict __fmt, const struct tm *restrict __tp)); |
17177 |
+# endif |
17178 |
+# if __GLIBC__ >= 2 |
17179 |
+_GL_CXXALIASWARN (strftime); |
17180 |
+# endif |
17181 |
+# endif |
17182 |
+ |
17183 |
+# if defined _GNU_SOURCE && 0 && ! 0 |
17184 |
+/* Functions that use a first-class time zone data type, instead of |
17185 |
+ relying on an implicit global time zone. |
17186 |
+ Inspired by NetBSD. */ |
17187 |
+ |
17188 |
+/* Represents a time zone. |
17189 |
+ (timezone_t) NULL stands for UTC. */ |
17190 |
+typedef struct tm_zone *timezone_t; |
17191 |
+ |
17192 |
+/* tzalloc (name) |
17193 |
+ Returns a time zone object for the given time zone NAME. This object |
17194 |
+ represents the time zone that other functions would use it the TZ |
17195 |
+ environment variable was set to NAME. |
17196 |
+ If NAME is NULL, the result represents the time zone that other functions |
17197 |
+ would use it the TZ environment variable was unset. |
17198 |
+ May return NULL if NAME is invalid (this is platform dependent) or |
17199 |
+ upon memory allocation failure. */ |
17200 |
+_GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); |
17201 |
+_GL_CXXALIAS_SYS (tzalloc, timezone_t, (char const *__name)); |
17202 |
+ |
17203 |
+/* tzfree (tz) |
17204 |
+ Frees a time zone object. |
17205 |
+ The argument must have been returned by tzalloc(). */ |
17206 |
+_GL_FUNCDECL_SYS (tzfree, void, (timezone_t __tz)); |
17207 |
+_GL_CXXALIAS_SYS (tzfree, void, (timezone_t __tz)); |
17208 |
+ |
17209 |
+/* localtime_rz (tz, &t, &result) |
17210 |
+ Converts an absolute time T to a broken-down time RESULT, assuming the |
17211 |
+ time zone TZ. |
17212 |
+ This function is like 'localtime_r', but relies on the argument TZ instead |
17213 |
+ of an implicit global time zone. */ |
17214 |
+_GL_FUNCDECL_SYS (localtime_rz, struct tm *, |
17215 |
+ (timezone_t __tz, time_t const *restrict __timer, |
17216 |
+ struct tm *restrict __result) _GL_ARG_NONNULL ((2, 3))); |
17217 |
+_GL_CXXALIAS_SYS (localtime_rz, struct tm *, |
17218 |
+ (timezone_t __tz, time_t const *restrict __timer, |
17219 |
+ struct tm *restrict __result)); |
17220 |
+ |
17221 |
+/* mktime_z (tz, &tm) |
17222 |
+ Normalizes the broken-down time TM and converts it to an absolute time, |
17223 |
+ assuming the time zone TZ. Returns the absolute time. |
17224 |
+ This function is like 'mktime', but relies on the argument TZ instead |
17225 |
+ of an implicit global time zone. */ |
17226 |
+_GL_FUNCDECL_SYS (mktime_z, time_t, |
17227 |
+ (timezone_t __tz, struct tm *restrict __tm) |
17228 |
+ _GL_ARG_NONNULL ((2))); |
17229 |
+_GL_CXXALIAS_SYS (mktime_z, time_t, |
17230 |
+ (timezone_t __tz, struct tm *restrict __tm)); |
17231 |
+ |
17232 |
+/* Time zone abbreviation strings (returned by 'localtime_rz' or 'mktime_z' |
17233 |
+ in the 'tm_zone' member of 'struct tm') are valid as long as |
17234 |
+ - the 'struct tm' argument is not destroyed or overwritten, |
17235 |
+ and |
17236 |
+ - the 'timezone_t' argument is not freed through tzfree(). */ |
17237 |
+ |
17238 |
+# endif |
17239 |
+ |
17240 |
+/* Convert TM to a time_t value, assuming UTC. */ |
17241 |
+# if 0 |
17242 |
+# if GNULIB_PORTCHECK |
17243 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
17244 |
+# undef timegm |
17245 |
+# define timegm rpl_timegm |
17246 |
+# endif |
17247 |
+_GL_FUNCDECL_RPL (timegm, time_t, (struct tm *__tm) _GL_ARG_NONNULL ((1))); |
17248 |
+_GL_CXXALIAS_RPL (timegm, time_t, (struct tm *__tm)); |
17249 |
+# else |
17250 |
+# if ! 1 |
17251 |
+_GL_FUNCDECL_SYS (timegm, time_t, (struct tm *__tm) _GL_ARG_NONNULL ((1))); |
17252 |
+# endif |
17253 |
+_GL_CXXALIAS_SYS (timegm, time_t, (struct tm *__tm)); |
17254 |
+# endif |
17255 |
+_GL_CXXALIASWARN (timegm); |
17256 |
+# endif |
17257 |
+ |
17258 |
+/* Encourage applications to avoid unsafe functions that can overrun |
17259 |
+ buffers when given outlandish struct tm values. Portable |
17260 |
+ applications should use strftime (or even sprintf) instead. */ |
17261 |
+# if defined GNULIB_POSIXCHECK |
17262 |
+# undef asctime |
17263 |
+_GL_WARN_ON_USE (asctime, "asctime can overrun buffers in some cases - " |
17264 |
+ "better use strftime (or even sprintf) instead"); |
17265 |
+# endif |
17266 |
+# if defined GNULIB_POSIXCHECK |
17267 |
+# undef asctime_r |
17268 |
+_GL_WARN_ON_USE (asctime_r, "asctime_r can overrun buffers in some cases - " |
17269 |
+ "better use strftime (or even sprintf) instead"); |
17270 |
+# endif |
17271 |
+# if defined GNULIB_POSIXCHECK |
17272 |
+# undef ctime |
17273 |
+_GL_WARN_ON_USE (ctime, "ctime can overrun buffers in some cases - " |
17274 |
+ "better use strftime (or even sprintf) instead"); |
17275 |
+# endif |
17276 |
+# if defined GNULIB_POSIXCHECK |
17277 |
+# undef ctime_r |
17278 |
+_GL_WARN_ON_USE (ctime_r, "ctime_r can overrun buffers in some cases - " |
17279 |
+ "better use strftime (or even sprintf) instead"); |
17280 |
+# endif |
17281 |
+ |
17282 |
+#endif |
17283 |
|
17284 |
diff --git a/autotools/gnulib/unistd.h b/autotools/gnulib/unistd.h |
17285 |
new file mode 100644 |
17286 |
index 0000000..1abdddc |
17287 |
--- /dev/null |
17288 |
+++ b/autotools/gnulib/unistd.h |
17289 |
@@ -0,0 +1,2834 @@ |
17290 |
+/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ |
17291 |
+/* Substitute for and wrapper around <unistd.h>. |
17292 |
+ Copyright (C) 2003-2022 Free Software Foundation, Inc. |
17293 |
+ |
17294 |
+ This file is free software: you can redistribute it and/or modify |
17295 |
+ it under the terms of the GNU Lesser General Public License as |
17296 |
+ published by the Free Software Foundation; either version 2.1 of the |
17297 |
+ License, or (at your option) any later version. |
17298 |
+ |
17299 |
+ This file is distributed in the hope that it will be useful, |
17300 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
17301 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
17302 |
+ GNU Lesser General Public License for more details. |
17303 |
+ |
17304 |
+ You should have received a copy of the GNU Lesser General Public License |
17305 |
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
17306 |
+ |
17307 |
+#ifndef _GL_UNISTD_H |
17308 |
+ |
17309 |
+#if __GNUC__ >= 3 |
17310 |
+#pragma GCC system_header |
17311 |
+#endif |
17312 |
+ |
17313 |
+ |
17314 |
+#if 1 && defined _GL_INCLUDING_UNISTD_H |
17315 |
+/* Special invocation convention: |
17316 |
+ - On Mac OS X 10.3.9 we have a sequence of nested includes |
17317 |
+ <unistd.h> -> <signal.h> -> <pthread.h> -> <unistd.h> |
17318 |
+ In this situation, the functions are not yet declared, therefore we cannot |
17319 |
+ provide the C++ aliases. */ |
17320 |
+ |
17321 |
+#include_next <unistd.h> |
17322 |
+ |
17323 |
+#else |
17324 |
+/* Normal invocation convention. */ |
17325 |
+ |
17326 |
+/* The include_next requires a split double-inclusion guard. */ |
17327 |
+#if 1 |
17328 |
+# define _GL_INCLUDING_UNISTD_H |
17329 |
+# include_next <unistd.h> |
17330 |
+# undef _GL_INCLUDING_UNISTD_H |
17331 |
+#endif |
17332 |
+ |
17333 |
+/* Get all possible declarations of gethostname(). */ |
17334 |
+#if 0 && 0 \ |
17335 |
+ && !defined _GL_INCLUDING_WINSOCK2_H |
17336 |
+# define _GL_INCLUDING_WINSOCK2_H |
17337 |
+# include <winsock2.h> |
17338 |
+# undef _GL_INCLUDING_WINSOCK2_H |
17339 |
+#endif |
17340 |
+ |
17341 |
+#if !defined _GL_UNISTD_H && !defined _GL_INCLUDING_WINSOCK2_H |
17342 |
+#define _GL_UNISTD_H |
17343 |
+ |
17344 |
+/* NetBSD 5.0 mis-defines NULL. Also get size_t. */ |
17345 |
+/* But avoid namespace pollution on glibc systems. */ |
17346 |
+#ifndef __GLIBC__ |
17347 |
+# include <stddef.h> |
17348 |
+#endif |
17349 |
+ |
17350 |
+/* mingw doesn't define the SEEK_* or *_FILENO macros in <unistd.h>. */ |
17351 |
+/* MSVC declares 'unlink' in <stdio.h>, not in <unistd.h>. We must include |
17352 |
+ it before we #define unlink rpl_unlink. */ |
17353 |
+/* Cygwin 1.7.1 declares symlinkat in <stdio.h>, not in <unistd.h>. */ |
17354 |
+/* But avoid namespace pollution on glibc systems. */ |
17355 |
+#if (!(defined SEEK_CUR && defined SEEK_END && defined SEEK_SET) \ |
17356 |
+ || ((1 || defined GNULIB_POSIXCHECK) \ |
17357 |
+ && (defined _WIN32 && ! defined __CYGWIN__)) \ |
17358 |
+ || ((1 || defined GNULIB_POSIXCHECK) \ |
17359 |
+ && defined __CYGWIN__)) \ |
17360 |
+ && ! defined __GLIBC__ |
17361 |
+# include <stdio.h> |
17362 |
+#endif |
17363 |
+ |
17364 |
+/* Cygwin 1.7.1 and Android 4.3 declare unlinkat in <fcntl.h>, not in |
17365 |
+ <unistd.h>. */ |
17366 |
+/* But avoid namespace pollution on glibc systems. */ |
17367 |
+#if (1 || defined GNULIB_POSIXCHECK) \ |
17368 |
+ && (defined __CYGWIN__ || defined __ANDROID__) \ |
17369 |
+ && ! defined __GLIBC__ |
17370 |
+# include <fcntl.h> |
17371 |
+#endif |
17372 |
+ |
17373 |
+/* mingw fails to declare _exit in <unistd.h>. */ |
17374 |
+/* mingw, MSVC, BeOS, Haiku declare environ in <stdlib.h>, not in |
17375 |
+ <unistd.h>. */ |
17376 |
+/* Solaris declares getcwd not only in <unistd.h> but also in <stdlib.h>. */ |
17377 |
+/* OSF Tru64 Unix cannot see gnulib rpl_strtod when system <stdlib.h> is |
17378 |
+ included here. */ |
17379 |
+/* But avoid namespace pollution on glibc systems. */ |
17380 |
+#if !defined __GLIBC__ && !defined __osf__ |
17381 |
+# define __need_system_stdlib_h |
17382 |
+# include <stdlib.h> |
17383 |
+# undef __need_system_stdlib_h |
17384 |
+#endif |
17385 |
+ |
17386 |
+/* Native Windows platforms declare _chdir, _getcwd, _rmdir in |
17387 |
+ <io.h> and/or <direct.h>, not in <unistd.h>. |
17388 |
+ They also declare _access(), _chmod(), _close(), _dup(), _dup2(), _isatty(), |
17389 |
+ _lseek(), _read(), _unlink(), _write() in <io.h>. */ |
17390 |
+#if defined _WIN32 && !defined __CYGWIN__ |
17391 |
+# include <io.h> |
17392 |
+# include <direct.h> |
17393 |
+#endif |
17394 |
+ |
17395 |
+/* Native Windows platforms declare _execl*, _execv* in <process.h>. */ |
17396 |
+#if defined _WIN32 && !defined __CYGWIN__ |
17397 |
+# include <process.h> |
17398 |
+#endif |
17399 |
+ |
17400 |
+/* AIX and OSF/1 5.1 declare getdomainname in <netdb.h>, not in <unistd.h>. |
17401 |
+ NonStop Kernel declares gethostname in <netdb.h>, not in <unistd.h>. */ |
17402 |
+/* But avoid namespace pollution on glibc systems. */ |
17403 |
+#if ((0 && (defined _AIX || defined __osf__)) \ |
17404 |
+ || (0 && defined __TANDEM)) \ |
17405 |
+ && !defined __GLIBC__ |
17406 |
+# include <netdb.h> |
17407 |
+#endif |
17408 |
+ |
17409 |
+/* Mac OS X 10.13, Solaris 11.4, and Android 9.0 declare getentropy in |
17410 |
+ <sys/random.h>, not in <unistd.h>. */ |
17411 |
+/* But avoid namespace pollution on glibc systems. */ |
17412 |
+#if (0 || defined GNULIB_POSIXCHECK) \ |
17413 |
+ && ((defined __APPLE__ && defined __MACH__) || defined __sun \ |
17414 |
+ || defined __ANDROID__) \ |
17415 |
+ && 0 \ |
17416 |
+ && !defined __GLIBC__ |
17417 |
+# include <sys/random.h> |
17418 |
+#endif |
17419 |
+ |
17420 |
+/* Android 4.3 declares fchownat in <sys/stat.h>, not in <unistd.h>. */ |
17421 |
+/* But avoid namespace pollution on glibc systems. */ |
17422 |
+#if (0 || defined GNULIB_POSIXCHECK) && defined __ANDROID__ \ |
17423 |
+ && !defined __GLIBC__ |
17424 |
+# include <sys/stat.h> |
17425 |
+#endif |
17426 |
+ |
17427 |
+/* MSVC defines off_t in <sys/types.h>. |
17428 |
+ May also define off_t to a 64-bit type on native Windows. */ |
17429 |
+/* Get off_t, ssize_t, mode_t. */ |
17430 |
+#include <sys/types.h> |
17431 |
+ |
17432 |
+/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ |
17433 |
+/* C++ compatible function declaration macros. |
17434 |
+ Copyright (C) 2010-2022 Free Software Foundation, Inc. |
17435 |
+ |
17436 |
+ This program is free software: you can redistribute it and/or modify it |
17437 |
+ under the terms of the GNU Lesser General Public License as published |
17438 |
+ by the Free Software Foundation; either version 2 of the License, or |
17439 |
+ (at your option) any later version. |
17440 |
+ |
17441 |
+ This program is distributed in the hope that it will be useful, |
17442 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
17443 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
17444 |
+ Lesser General Public License for more details. |
17445 |
+ |
17446 |
+ You should have received a copy of the GNU Lesser General Public License |
17447 |
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
17448 |
+ |
17449 |
+#ifndef _GL_CXXDEFS_H |
17450 |
+#define _GL_CXXDEFS_H |
17451 |
+ |
17452 |
+/* Begin/end the GNULIB_NAMESPACE namespace. */ |
17453 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
17454 |
+# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { |
17455 |
+# define _GL_END_NAMESPACE } |
17456 |
+#else |
17457 |
+# define _GL_BEGIN_NAMESPACE |
17458 |
+# define _GL_END_NAMESPACE |
17459 |
+#endif |
17460 |
+ |
17461 |
+/* The three most frequent use cases of these macros are: |
17462 |
+ |
17463 |
+ * For providing a substitute for a function that is missing on some |
17464 |
+ platforms, but is declared and works fine on the platforms on which |
17465 |
+ it exists: |
17466 |
+ |
17467 |
+ #if @GNULIB_FOO@ |
17468 |
+ # if !@HAVE_FOO@ |
17469 |
+ _GL_FUNCDECL_SYS (foo, ...); |
17470 |
+ # endif |
17471 |
+ _GL_CXXALIAS_SYS (foo, ...); |
17472 |
+ _GL_CXXALIASWARN (foo); |
17473 |
+ #elif defined GNULIB_POSIXCHECK |
17474 |
+ ... |
17475 |
+ #endif |
17476 |
+ |
17477 |
+ * For providing a replacement for a function that exists on all platforms, |
17478 |
+ but is broken/insufficient and needs to be replaced on some platforms: |
17479 |
+ |
17480 |
+ #if @GNULIB_FOO@ |
17481 |
+ # if @REPLACE_FOO@ |
17482 |
+ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
17483 |
+ # undef foo |
17484 |
+ # define foo rpl_foo |
17485 |
+ # endif |
17486 |
+ _GL_FUNCDECL_RPL (foo, ...); |
17487 |
+ _GL_CXXALIAS_RPL (foo, ...); |
17488 |
+ # else |
17489 |
+ _GL_CXXALIAS_SYS (foo, ...); |
17490 |
+ # endif |
17491 |
+ _GL_CXXALIASWARN (foo); |
17492 |
+ #elif defined GNULIB_POSIXCHECK |
17493 |
+ ... |
17494 |
+ #endif |
17495 |
+ |
17496 |
+ * For providing a replacement for a function that exists on some platforms |
17497 |
+ but is broken/insufficient and needs to be replaced on some of them and |
17498 |
+ is additionally either missing or undeclared on some other platforms: |
17499 |
+ |
17500 |
+ #if @GNULIB_FOO@ |
17501 |
+ # if @REPLACE_FOO@ |
17502 |
+ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
17503 |
+ # undef foo |
17504 |
+ # define foo rpl_foo |
17505 |
+ # endif |
17506 |
+ _GL_FUNCDECL_RPL (foo, ...); |
17507 |
+ _GL_CXXALIAS_RPL (foo, ...); |
17508 |
+ # else |
17509 |
+ # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ |
17510 |
+ _GL_FUNCDECL_SYS (foo, ...); |
17511 |
+ # endif |
17512 |
+ _GL_CXXALIAS_SYS (foo, ...); |
17513 |
+ # endif |
17514 |
+ _GL_CXXALIASWARN (foo); |
17515 |
+ #elif defined GNULIB_POSIXCHECK |
17516 |
+ ... |
17517 |
+ #endif |
17518 |
+*/ |
17519 |
+ |
17520 |
+/* _GL_EXTERN_C declaration; |
17521 |
+ performs the declaration with C linkage. */ |
17522 |
+#if defined __cplusplus |
17523 |
+# define _GL_EXTERN_C extern "C" |
17524 |
+#else |
17525 |
+# define _GL_EXTERN_C extern |
17526 |
+#endif |
17527 |
+ |
17528 |
+/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); |
17529 |
+ declares a replacement function, named rpl_func, with the given prototype, |
17530 |
+ consisting of return type, parameters, and attributes. |
17531 |
+ Example: |
17532 |
+ _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) |
17533 |
+ _GL_ARG_NONNULL ((1))); |
17534 |
+ */ |
17535 |
+#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ |
17536 |
+ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) |
17537 |
+#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ |
17538 |
+ _GL_EXTERN_C rettype rpl_func parameters_and_attributes |
17539 |
+ |
17540 |
+/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); |
17541 |
+ declares the system function, named func, with the given prototype, |
17542 |
+ consisting of return type, parameters, and attributes. |
17543 |
+ Example: |
17544 |
+ _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) |
17545 |
+ _GL_ARG_NONNULL ((1))); |
17546 |
+ */ |
17547 |
+#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ |
17548 |
+ _GL_EXTERN_C rettype func parameters_and_attributes |
17549 |
+ |
17550 |
+/* _GL_CXXALIAS_RPL (func, rettype, parameters); |
17551 |
+ declares a C++ alias called GNULIB_NAMESPACE::func |
17552 |
+ that redirects to rpl_func, if GNULIB_NAMESPACE is defined. |
17553 |
+ Example: |
17554 |
+ _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); |
17555 |
+ |
17556 |
+ Wrapping rpl_func in an object with an inline conversion operator |
17557 |
+ avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is |
17558 |
+ actually used in the program. */ |
17559 |
+#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ |
17560 |
+ _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) |
17561 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
17562 |
+# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ |
17563 |
+ namespace GNULIB_NAMESPACE \ |
17564 |
+ { \ |
17565 |
+ static const struct _gl_ ## func ## _wrapper \ |
17566 |
+ { \ |
17567 |
+ typedef rettype (*type) parameters; \ |
17568 |
+ \ |
17569 |
+ inline operator type () const \ |
17570 |
+ { \ |
17571 |
+ return ::rpl_func; \ |
17572 |
+ } \ |
17573 |
+ } func = {}; \ |
17574 |
+ } \ |
17575 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
17576 |
+#else |
17577 |
+# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ |
17578 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
17579 |
+#endif |
17580 |
+ |
17581 |
+/* _GL_CXXALIAS_MDA (func, rettype, parameters); |
17582 |
+ is to be used when func is a Microsoft deprecated alias, on native Windows. |
17583 |
+ It declares a C++ alias called GNULIB_NAMESPACE::func |
17584 |
+ that redirects to _func, if GNULIB_NAMESPACE is defined. |
17585 |
+ Example: |
17586 |
+ _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); |
17587 |
+ */ |
17588 |
+#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ |
17589 |
+ _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) |
17590 |
+ |
17591 |
+/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); |
17592 |
+ is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); |
17593 |
+ except that the C function rpl_func may have a slightly different |
17594 |
+ declaration. A cast is used to silence the "invalid conversion" error |
17595 |
+ that would otherwise occur. */ |
17596 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
17597 |
+# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ |
17598 |
+ namespace GNULIB_NAMESPACE \ |
17599 |
+ { \ |
17600 |
+ static const struct _gl_ ## func ## _wrapper \ |
17601 |
+ { \ |
17602 |
+ typedef rettype (*type) parameters; \ |
17603 |
+ \ |
17604 |
+ inline operator type () const \ |
17605 |
+ { \ |
17606 |
+ return reinterpret_cast<type>(::rpl_func); \ |
17607 |
+ } \ |
17608 |
+ } func = {}; \ |
17609 |
+ } \ |
17610 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
17611 |
+#else |
17612 |
+# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ |
17613 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
17614 |
+#endif |
17615 |
+ |
17616 |
+/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); |
17617 |
+ is like _GL_CXXALIAS_MDA (func, rettype, parameters); |
17618 |
+ except that the C function func may have a slightly different declaration. |
17619 |
+ A cast is used to silence the "invalid conversion" error that would |
17620 |
+ otherwise occur. */ |
17621 |
+#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ |
17622 |
+ _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) |
17623 |
+ |
17624 |
+/* _GL_CXXALIAS_SYS (func, rettype, parameters); |
17625 |
+ declares a C++ alias called GNULIB_NAMESPACE::func |
17626 |
+ that redirects to the system provided function func, if GNULIB_NAMESPACE |
17627 |
+ is defined. |
17628 |
+ Example: |
17629 |
+ _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); |
17630 |
+ |
17631 |
+ Wrapping func in an object with an inline conversion operator |
17632 |
+ avoids a reference to func unless GNULIB_NAMESPACE::func is |
17633 |
+ actually used in the program. */ |
17634 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
17635 |
+# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ |
17636 |
+ namespace GNULIB_NAMESPACE \ |
17637 |
+ { \ |
17638 |
+ static const struct _gl_ ## func ## _wrapper \ |
17639 |
+ { \ |
17640 |
+ typedef rettype (*type) parameters; \ |
17641 |
+ \ |
17642 |
+ inline operator type () const \ |
17643 |
+ { \ |
17644 |
+ return ::func; \ |
17645 |
+ } \ |
17646 |
+ } func = {}; \ |
17647 |
+ } \ |
17648 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
17649 |
+#else |
17650 |
+# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ |
17651 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
17652 |
+#endif |
17653 |
+ |
17654 |
+/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); |
17655 |
+ is like _GL_CXXALIAS_SYS (func, rettype, parameters); |
17656 |
+ except that the C function func may have a slightly different declaration. |
17657 |
+ A cast is used to silence the "invalid conversion" error that would |
17658 |
+ otherwise occur. */ |
17659 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
17660 |
+# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ |
17661 |
+ namespace GNULIB_NAMESPACE \ |
17662 |
+ { \ |
17663 |
+ static const struct _gl_ ## func ## _wrapper \ |
17664 |
+ { \ |
17665 |
+ typedef rettype (*type) parameters; \ |
17666 |
+ \ |
17667 |
+ inline operator type () const \ |
17668 |
+ { \ |
17669 |
+ return reinterpret_cast<type>(::func); \ |
17670 |
+ } \ |
17671 |
+ } func = {}; \ |
17672 |
+ } \ |
17673 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
17674 |
+#else |
17675 |
+# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ |
17676 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
17677 |
+#endif |
17678 |
+ |
17679 |
+/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); |
17680 |
+ is like _GL_CXXALIAS_SYS (func, rettype, parameters); |
17681 |
+ except that the C function is picked among a set of overloaded functions, |
17682 |
+ namely the one with rettype2 and parameters2. Two consecutive casts |
17683 |
+ are used to silence the "cannot find a match" and "invalid conversion" |
17684 |
+ errors that would otherwise occur. */ |
17685 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
17686 |
+ /* The outer cast must be a reinterpret_cast. |
17687 |
+ The inner cast: When the function is defined as a set of overloaded |
17688 |
+ functions, it works as a static_cast<>, choosing the designated variant. |
17689 |
+ When the function is defined as a single variant, it works as a |
17690 |
+ reinterpret_cast<>. The parenthesized cast syntax works both ways. */ |
17691 |
+# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ |
17692 |
+ namespace GNULIB_NAMESPACE \ |
17693 |
+ { \ |
17694 |
+ static const struct _gl_ ## func ## _wrapper \ |
17695 |
+ { \ |
17696 |
+ typedef rettype (*type) parameters; \ |
17697 |
+ \ |
17698 |
+ inline operator type () const \ |
17699 |
+ { \ |
17700 |
+ return reinterpret_cast<type>((rettype2 (*) parameters2)(::func)); \ |
17701 |
+ } \ |
17702 |
+ } func = {}; \ |
17703 |
+ } \ |
17704 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
17705 |
+#else |
17706 |
+# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ |
17707 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
17708 |
+#endif |
17709 |
+ |
17710 |
+/* _GL_CXXALIASWARN (func); |
17711 |
+ causes a warning to be emitted when ::func is used but not when |
17712 |
+ GNULIB_NAMESPACE::func is used. func must be defined without overloaded |
17713 |
+ variants. */ |
17714 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
17715 |
+# define _GL_CXXALIASWARN(func) \ |
17716 |
+ _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) |
17717 |
+# define _GL_CXXALIASWARN_1(func,namespace) \ |
17718 |
+ _GL_CXXALIASWARN_2 (func, namespace) |
17719 |
+/* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>, |
17720 |
+ we enable the warning only when not optimizing. */ |
17721 |
+# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) |
17722 |
+# define _GL_CXXALIASWARN_2(func,namespace) \ |
17723 |
+ _GL_WARN_ON_USE (func, \ |
17724 |
+ "The symbol ::" #func " refers to the system function. " \ |
17725 |
+ "Use " #namespace "::" #func " instead.") |
17726 |
+# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING |
17727 |
+# define _GL_CXXALIASWARN_2(func,namespace) \ |
17728 |
+ extern __typeof__ (func) func |
17729 |
+# else |
17730 |
+# define _GL_CXXALIASWARN_2(func,namespace) \ |
17731 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
17732 |
+# endif |
17733 |
+#else |
17734 |
+# define _GL_CXXALIASWARN(func) \ |
17735 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
17736 |
+#endif |
17737 |
+ |
17738 |
+/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); |
17739 |
+ causes a warning to be emitted when the given overloaded variant of ::func |
17740 |
+ is used but not when GNULIB_NAMESPACE::func is used. */ |
17741 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
17742 |
+# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ |
17743 |
+ _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ |
17744 |
+ GNULIB_NAMESPACE) |
17745 |
+# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ |
17746 |
+ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) |
17747 |
+/* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>, |
17748 |
+ we enable the warning only when not optimizing. */ |
17749 |
+# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) |
17750 |
+# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ |
17751 |
+ _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ |
17752 |
+ "The symbol ::" #func " refers to the system function. " \ |
17753 |
+ "Use " #namespace "::" #func " instead.") |
17754 |
+# else |
17755 |
+# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ |
17756 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
17757 |
+# endif |
17758 |
+#else |
17759 |
+# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ |
17760 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
17761 |
+#endif |
17762 |
+ |
17763 |
+#endif /* _GL_CXXDEFS_H */ |
17764 |
+ |
17765 |
+/* The definition of _GL_ARG_NONNULL is copied here. */ |
17766 |
+/* A C macro for declaring that specific arguments must not be NULL. |
17767 |
+ Copyright (C) 2009-2022 Free Software Foundation, Inc. |
17768 |
+ |
17769 |
+ This program is free software: you can redistribute it and/or modify it |
17770 |
+ under the terms of the GNU Lesser General Public License as published |
17771 |
+ by the Free Software Foundation; either version 2 of the License, or |
17772 |
+ (at your option) any later version. |
17773 |
+ |
17774 |
+ This program is distributed in the hope that it will be useful, |
17775 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
17776 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
17777 |
+ Lesser General Public License for more details. |
17778 |
+ |
17779 |
+ You should have received a copy of the GNU Lesser General Public License |
17780 |
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
17781 |
+ |
17782 |
+/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools |
17783 |
+ that the values passed as arguments n, ..., m must be non-NULL pointers. |
17784 |
+ n = 1 stands for the first argument, n = 2 for the second argument etc. */ |
17785 |
+#ifndef _GL_ARG_NONNULL |
17786 |
+# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ |
17787 |
+# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) |
17788 |
+# else |
17789 |
+# define _GL_ARG_NONNULL(params) |
17790 |
+# endif |
17791 |
+#endif |
17792 |
+ |
17793 |
+/* The definition of _GL_WARN_ON_USE is copied here. */ |
17794 |
+/* A C macro for emitting warnings if a function is used. |
17795 |
+ Copyright (C) 2010-2022 Free Software Foundation, Inc. |
17796 |
+ |
17797 |
+ This program is free software: you can redistribute it and/or modify it |
17798 |
+ under the terms of the GNU Lesser General Public License as published |
17799 |
+ by the Free Software Foundation; either version 2 of the License, or |
17800 |
+ (at your option) any later version. |
17801 |
+ |
17802 |
+ This program is distributed in the hope that it will be useful, |
17803 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
17804 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
17805 |
+ Lesser General Public License for more details. |
17806 |
+ |
17807 |
+ You should have received a copy of the GNU Lesser General Public License |
17808 |
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
17809 |
+ |
17810 |
+/* _GL_WARN_ON_USE (function, "literal string") issues a declaration |
17811 |
+ for FUNCTION which will then trigger a compiler warning containing |
17812 |
+ the text of "literal string" anywhere that function is called, if |
17813 |
+ supported by the compiler. If the compiler does not support this |
17814 |
+ feature, the macro expands to an unused extern declaration. |
17815 |
+ |
17816 |
+ _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the |
17817 |
+ attribute used in _GL_WARN_ON_USE. If the compiler does not support |
17818 |
+ this feature, it expands to empty. |
17819 |
+ |
17820 |
+ These macros are useful for marking a function as a potential |
17821 |
+ portability trap, with the intent that "literal string" include |
17822 |
+ instructions on the replacement function that should be used |
17823 |
+ instead. |
17824 |
+ _GL_WARN_ON_USE is for functions with 'extern' linkage. |
17825 |
+ _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline' |
17826 |
+ linkage. |
17827 |
+ |
17828 |
+ However, one of the reasons that a function is a portability trap is |
17829 |
+ if it has the wrong signature. Declaring FUNCTION with a different |
17830 |
+ signature in C is a compilation error, so this macro must use the |
17831 |
+ same type as any existing declaration so that programs that avoid |
17832 |
+ the problematic FUNCTION do not fail to compile merely because they |
17833 |
+ included a header that poisoned the function. But this implies that |
17834 |
+ _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already |
17835 |
+ have a declaration. Use of this macro implies that there must not |
17836 |
+ be any other macro hiding the declaration of FUNCTION; but |
17837 |
+ undefining FUNCTION first is part of the poisoning process anyway |
17838 |
+ (although for symbols that are provided only via a macro, the result |
17839 |
+ is a compilation error rather than a warning containing |
17840 |
+ "literal string"). Also note that in C++, it is only safe to use if |
17841 |
+ FUNCTION has no overloads. |
17842 |
+ |
17843 |
+ For an example, it is possible to poison 'getline' by: |
17844 |
+ - adding a call to gl_WARN_ON_USE_PREPARE([[#include <stdio.h>]], |
17845 |
+ [getline]) in configure.ac, which potentially defines |
17846 |
+ HAVE_RAW_DECL_GETLINE |
17847 |
+ - adding this code to a header that wraps the system <stdio.h>: |
17848 |
+ #undef getline |
17849 |
+ #if HAVE_RAW_DECL_GETLINE |
17850 |
+ _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" |
17851 |
+ "not universally present; use the gnulib module getline"); |
17852 |
+ #endif |
17853 |
+ |
17854 |
+ It is not possible to directly poison global variables. But it is |
17855 |
+ possible to write a wrapper accessor function, and poison that |
17856 |
+ (less common usage, like &environ, will cause a compilation error |
17857 |
+ rather than issue the nice warning, but the end result of informing |
17858 |
+ the developer about their portability problem is still achieved): |
17859 |
+ #if HAVE_RAW_DECL_ENVIRON |
17860 |
+ static char *** |
17861 |
+ rpl_environ (void) { return &environ; } |
17862 |
+ _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); |
17863 |
+ # undef environ |
17864 |
+ # define environ (*rpl_environ ()) |
17865 |
+ #endif |
17866 |
+ or better (avoiding contradictory use of 'static' and 'extern'): |
17867 |
+ #if HAVE_RAW_DECL_ENVIRON |
17868 |
+ static char *** |
17869 |
+ _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared") |
17870 |
+ rpl_environ (void) { return &environ; } |
17871 |
+ # undef environ |
17872 |
+ # define environ (*rpl_environ ()) |
17873 |
+ #endif |
17874 |
+ */ |
17875 |
+#ifndef _GL_WARN_ON_USE |
17876 |
+ |
17877 |
+# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) |
17878 |
+/* A compiler attribute is available in gcc versions 4.3.0 and later. */ |
17879 |
+# define _GL_WARN_ON_USE(function, message) \ |
17880 |
+_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) |
17881 |
+# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ |
17882 |
+ __attribute__ ((__warning__ (message))) |
17883 |
+# elif __clang_major__ >= 4 |
17884 |
+/* Another compiler attribute is available in clang. */ |
17885 |
+# define _GL_WARN_ON_USE(function, message) \ |
17886 |
+_GL_WARN_EXTERN_C __typeof__ (function) function \ |
17887 |
+ __attribute__ ((__diagnose_if__ (1, message, "warning"))) |
17888 |
+# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ |
17889 |
+ __attribute__ ((__diagnose_if__ (1, message, "warning"))) |
17890 |
+# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING |
17891 |
+/* Verify the existence of the function. */ |
17892 |
+# define _GL_WARN_ON_USE(function, message) \ |
17893 |
+_GL_WARN_EXTERN_C __typeof__ (function) function |
17894 |
+# define _GL_WARN_ON_USE_ATTRIBUTE(message) |
17895 |
+# else /* Unsupported. */ |
17896 |
+# define _GL_WARN_ON_USE(function, message) \ |
17897 |
+_GL_WARN_EXTERN_C int _gl_warn_on_use |
17898 |
+# define _GL_WARN_ON_USE_ATTRIBUTE(message) |
17899 |
+# endif |
17900 |
+#endif |
17901 |
+ |
17902 |
+/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") |
17903 |
+ is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the |
17904 |
+ function is declared with the given prototype, consisting of return type, |
17905 |
+ parameters, and attributes. |
17906 |
+ This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does |
17907 |
+ not work in this case. */ |
17908 |
+#ifndef _GL_WARN_ON_USE_CXX |
17909 |
+# if !defined __cplusplus |
17910 |
+# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ |
17911 |
+ _GL_WARN_ON_USE (function, msg) |
17912 |
+# else |
17913 |
+# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) |
17914 |
+/* A compiler attribute is available in gcc versions 4.3.0 and later. */ |
17915 |
+# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ |
17916 |
+extern rettype_gcc function parameters_and_attributes \ |
17917 |
+ __attribute__ ((__warning__ (msg))) |
17918 |
+# elif __clang_major__ >= 4 |
17919 |
+/* Another compiler attribute is available in clang. */ |
17920 |
+# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ |
17921 |
+extern rettype_clang function parameters_and_attributes \ |
17922 |
+ __attribute__ ((__diagnose_if__ (1, msg, "warning"))) |
17923 |
+# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING |
17924 |
+/* Verify the existence of the function. */ |
17925 |
+# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ |
17926 |
+extern rettype_gcc function parameters_and_attributes |
17927 |
+# else /* Unsupported. */ |
17928 |
+# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ |
17929 |
+_GL_WARN_EXTERN_C int _gl_warn_on_use |
17930 |
+# endif |
17931 |
+# endif |
17932 |
+#endif |
17933 |
+ |
17934 |
+/* _GL_WARN_EXTERN_C declaration; |
17935 |
+ performs the declaration with C linkage. */ |
17936 |
+#ifndef _GL_WARN_EXTERN_C |
17937 |
+# if defined __cplusplus |
17938 |
+# define _GL_WARN_EXTERN_C extern "C" |
17939 |
+# else |
17940 |
+# define _GL_WARN_EXTERN_C extern |
17941 |
+# endif |
17942 |
+#endif |
17943 |
+ |
17944 |
+ |
17945 |
+/* Get getopt(), optarg, optind, opterr, optopt. */ |
17946 |
+#if 1 && 00 && !defined _GL_SYSTEM_GETOPT |
17947 |
+# include <getopt-cdefs.h> |
17948 |
+# include <getopt-pfx-core.h> |
17949 |
+#endif |
17950 |
+ |
17951 |
+#ifndef _GL_INLINE_HEADER_BEGIN |
17952 |
+ #error "Please include config.h first." |
17953 |
+#endif |
17954 |
+_GL_INLINE_HEADER_BEGIN |
17955 |
+#ifndef _GL_UNISTD_INLINE |
17956 |
+# define _GL_UNISTD_INLINE _GL_INLINE |
17957 |
+#endif |
17958 |
+ |
17959 |
+/* Hide some function declarations from <winsock2.h>. */ |
17960 |
+ |
17961 |
+#if 0 && 0 |
17962 |
+# if !defined _GL_SYS_SOCKET_H |
17963 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
17964 |
+# undef socket |
17965 |
+# define socket socket_used_without_including_sys_socket_h |
17966 |
+# undef connect |
17967 |
+# define connect connect_used_without_including_sys_socket_h |
17968 |
+# undef accept |
17969 |
+# define accept accept_used_without_including_sys_socket_h |
17970 |
+# undef bind |
17971 |
+# define bind bind_used_without_including_sys_socket_h |
17972 |
+# undef getpeername |
17973 |
+# define getpeername getpeername_used_without_including_sys_socket_h |
17974 |
+# undef getsockname |
17975 |
+# define getsockname getsockname_used_without_including_sys_socket_h |
17976 |
+# undef getsockopt |
17977 |
+# define getsockopt getsockopt_used_without_including_sys_socket_h |
17978 |
+# undef listen |
17979 |
+# define listen listen_used_without_including_sys_socket_h |
17980 |
+# undef recv |
17981 |
+# define recv recv_used_without_including_sys_socket_h |
17982 |
+# undef send |
17983 |
+# define send send_used_without_including_sys_socket_h |
17984 |
+# undef recvfrom |
17985 |
+# define recvfrom recvfrom_used_without_including_sys_socket_h |
17986 |
+# undef sendto |
17987 |
+# define sendto sendto_used_without_including_sys_socket_h |
17988 |
+# undef setsockopt |
17989 |
+# define setsockopt setsockopt_used_without_including_sys_socket_h |
17990 |
+# undef shutdown |
17991 |
+# define shutdown shutdown_used_without_including_sys_socket_h |
17992 |
+# else |
17993 |
+ _GL_WARN_ON_USE (socket, |
17994 |
+ "socket() used without including <sys/socket.h>"); |
17995 |
+ _GL_WARN_ON_USE (connect, |
17996 |
+ "connect() used without including <sys/socket.h>"); |
17997 |
+ _GL_WARN_ON_USE (accept, |
17998 |
+ "accept() used without including <sys/socket.h>"); |
17999 |
+ _GL_WARN_ON_USE (bind, |
18000 |
+ "bind() used without including <sys/socket.h>"); |
18001 |
+ _GL_WARN_ON_USE (getpeername, |
18002 |
+ "getpeername() used without including <sys/socket.h>"); |
18003 |
+ _GL_WARN_ON_USE (getsockname, |
18004 |
+ "getsockname() used without including <sys/socket.h>"); |
18005 |
+ _GL_WARN_ON_USE (getsockopt, |
18006 |
+ "getsockopt() used without including <sys/socket.h>"); |
18007 |
+ _GL_WARN_ON_USE (listen, |
18008 |
+ "listen() used without including <sys/socket.h>"); |
18009 |
+ _GL_WARN_ON_USE (recv, |
18010 |
+ "recv() used without including <sys/socket.h>"); |
18011 |
+ _GL_WARN_ON_USE (send, |
18012 |
+ "send() used without including <sys/socket.h>"); |
18013 |
+ _GL_WARN_ON_USE (recvfrom, |
18014 |
+ "recvfrom() used without including <sys/socket.h>"); |
18015 |
+ _GL_WARN_ON_USE (sendto, |
18016 |
+ "sendto() used without including <sys/socket.h>"); |
18017 |
+ _GL_WARN_ON_USE (setsockopt, |
18018 |
+ "setsockopt() used without including <sys/socket.h>"); |
18019 |
+ _GL_WARN_ON_USE (shutdown, |
18020 |
+ "shutdown() used without including <sys/socket.h>"); |
18021 |
+# endif |
18022 |
+# endif |
18023 |
+# if !defined _GL_SYS_SELECT_H |
18024 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
18025 |
+# undef select |
18026 |
+# define select select_used_without_including_sys_select_h |
18027 |
+# else |
18028 |
+ _GL_WARN_ON_USE (select, |
18029 |
+ "select() used without including <sys/select.h>"); |
18030 |
+# endif |
18031 |
+# endif |
18032 |
+#endif |
18033 |
+ |
18034 |
+ |
18035 |
+/* OS/2 EMX lacks these macros. */ |
18036 |
+#ifndef STDIN_FILENO |
18037 |
+# define STDIN_FILENO 0 |
18038 |
+#endif |
18039 |
+#ifndef STDOUT_FILENO |
18040 |
+# define STDOUT_FILENO 1 |
18041 |
+#endif |
18042 |
+#ifndef STDERR_FILENO |
18043 |
+# define STDERR_FILENO 2 |
18044 |
+#endif |
18045 |
+ |
18046 |
+/* Ensure *_OK macros exist. */ |
18047 |
+#ifndef F_OK |
18048 |
+# define F_OK 0 |
18049 |
+# define X_OK 1 |
18050 |
+# define W_OK 2 |
18051 |
+# define R_OK 4 |
18052 |
+#endif |
18053 |
+ |
18054 |
+ |
18055 |
+/* Declare overridden functions. */ |
18056 |
+ |
18057 |
+ |
18058 |
+#if 0 |
18059 |
+# if 0 |
18060 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
18061 |
+# undef access |
18062 |
+# define access rpl_access |
18063 |
+# endif |
18064 |
+_GL_FUNCDECL_RPL (access, int, (const char *file, int mode) |
18065 |
+ _GL_ARG_NONNULL ((1))); |
18066 |
+_GL_CXXALIAS_RPL (access, int, (const char *file, int mode)); |
18067 |
+# elif defined _WIN32 && !defined __CYGWIN__ |
18068 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
18069 |
+# undef access |
18070 |
+# define access _access |
18071 |
+# endif |
18072 |
+_GL_CXXALIAS_MDA (access, int, (const char *file, int mode)); |
18073 |
+# else |
18074 |
+_GL_CXXALIAS_SYS (access, int, (const char *file, int mode)); |
18075 |
+# endif |
18076 |
+_GL_CXXALIASWARN (access); |
18077 |
+#elif defined GNULIB_POSIXCHECK |
18078 |
+# undef access |
18079 |
+# if HAVE_RAW_DECL_ACCESS |
18080 |
+/* The access() function is a security risk. */ |
18081 |
+_GL_WARN_ON_USE (access, "access does not always support X_OK - " |
18082 |
+ "use gnulib module access for portability; " |
18083 |
+ "also, this function is a security risk - " |
18084 |
+ "use the gnulib module faccessat instead"); |
18085 |
+# endif |
18086 |
+#elif 1 |
18087 |
+/* On native Windows, map 'access' to '_access', so that -loldnames is not |
18088 |
+ required. In C++ with GNULIB_NAMESPACE, avoid differences between |
18089 |
+ platforms by defining GNULIB_NAMESPACE::access always. */ |
18090 |
+# if defined _WIN32 && !defined __CYGWIN__ |
18091 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
18092 |
+# undef access |
18093 |
+# define access _access |
18094 |
+# endif |
18095 |
+_GL_CXXALIAS_MDA (access, int, (const char *file, int mode)); |
18096 |
+# else |
18097 |
+_GL_CXXALIAS_SYS (access, int, (const char *file, int mode)); |
18098 |
+# endif |
18099 |
+_GL_CXXALIASWARN (access); |
18100 |
+#endif |
18101 |
+ |
18102 |
+ |
18103 |
+#if 1 |
18104 |
+# if defined _WIN32 && !defined __CYGWIN__ |
18105 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
18106 |
+# undef chdir |
18107 |
+# define chdir _chdir |
18108 |
+# endif |
18109 |
+_GL_CXXALIAS_MDA (chdir, int, (const char *file)); |
18110 |
+# else |
18111 |
+_GL_CXXALIAS_SYS (chdir, int, (const char *file) _GL_ARG_NONNULL ((1))); |
18112 |
+# endif |
18113 |
+_GL_CXXALIASWARN (chdir); |
18114 |
+#elif defined GNULIB_POSIXCHECK |
18115 |
+# undef chdir |
18116 |
+# if HAVE_RAW_DECL_CHDIR |
18117 |
+_GL_WARN_ON_USE (chown, "chdir is not always in <unistd.h> - " |
18118 |
+ "use gnulib module chdir for portability"); |
18119 |
+# endif |
18120 |
+#elif 1 |
18121 |
+/* On native Windows, map 'chdir' to '_chdir', so that -loldnames is not |
18122 |
+ required. In C++ with GNULIB_NAMESPACE, avoid differences between |
18123 |
+ platforms by defining GNULIB_NAMESPACE::chdir always. */ |
18124 |
+# if defined _WIN32 && !defined __CYGWIN__ |
18125 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
18126 |
+# undef chdir |
18127 |
+# define chdir _chdir |
18128 |
+# endif |
18129 |
+_GL_CXXALIAS_MDA (chdir, int, (const char *file)); |
18130 |
+# else |
18131 |
+_GL_CXXALIAS_SYS (chdir, int, (const char *file) _GL_ARG_NONNULL ((1))); |
18132 |
+# endif |
18133 |
+_GL_CXXALIASWARN (chdir); |
18134 |
+#endif |
18135 |
+ |
18136 |
+ |
18137 |
+#if 0 |
18138 |
+/* Change the owner of FILE to UID (if UID is not -1) and the group of FILE |
18139 |
+ to GID (if GID is not -1). Follow symbolic links. |
18140 |
+ Return 0 if successful, otherwise -1 and errno set. |
18141 |
+ See the POSIX:2008 specification |
18142 |
+ <https://pubs.opengroup.org/onlinepubs/9699919799/functions/chown.html. */ |
18143 |
+# if 0 |
18144 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
18145 |
+# undef chown |
18146 |
+# define chown rpl_chown |
18147 |
+# endif |
18148 |
+_GL_FUNCDECL_RPL (chown, int, (const char *file, uid_t uid, gid_t gid) |
18149 |
+ _GL_ARG_NONNULL ((1))); |
18150 |
+_GL_CXXALIAS_RPL (chown, int, (const char *file, uid_t uid, gid_t gid)); |
18151 |
+# else |
18152 |
+# if !1 |
18153 |
+_GL_FUNCDECL_SYS (chown, int, (const char *file, uid_t uid, gid_t gid) |
18154 |
+ _GL_ARG_NONNULL ((1))); |
18155 |
+# endif |
18156 |
+_GL_CXXALIAS_SYS (chown, int, (const char *file, uid_t uid, gid_t gid)); |
18157 |
+# endif |
18158 |
+_GL_CXXALIASWARN (chown); |
18159 |
+#elif defined GNULIB_POSIXCHECK |
18160 |
+# undef chown |
18161 |
+# if HAVE_RAW_DECL_CHOWN |
18162 |
+_GL_WARN_ON_USE (chown, "chown fails to follow symlinks on some systems and " |
18163 |
+ "doesn't treat a uid or gid of -1 on some systems - " |
18164 |
+ "use gnulib module chown for portability"); |
18165 |
+# endif |
18166 |
+#endif |
18167 |
+ |
18168 |
+ |
18169 |
+#if 1 |
18170 |
+# if 0 |
18171 |
+/* Automatically included by modules that need a replacement for close. */ |
18172 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
18173 |
+# undef close |
18174 |
+# define close rpl_close |
18175 |
+# endif |
18176 |
+_GL_FUNCDECL_RPL (close, int, (int fd)); |
18177 |
+_GL_CXXALIAS_RPL (close, int, (int fd)); |
18178 |
+# elif defined _WIN32 && !defined __CYGWIN__ |
18179 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
18180 |
+# undef close |
18181 |
+# define close _close |
18182 |
+# endif |
18183 |
+_GL_CXXALIAS_MDA (close, int, (int fd)); |
18184 |
+# else |
18185 |
+_GL_CXXALIAS_SYS (close, int, (int fd)); |
18186 |
+# endif |
18187 |
+_GL_CXXALIASWARN (close); |
18188 |
+#elif 0 |
18189 |
+# undef close |
18190 |
+# define close close_used_without_requesting_gnulib_module_close |
18191 |
+#elif defined GNULIB_POSIXCHECK |
18192 |
+# undef close |
18193 |
+/* Assume close is always declared. */ |
18194 |
+_GL_WARN_ON_USE (close, "close does not portably work on sockets - " |
18195 |
+ "use gnulib module close for portability"); |
18196 |
+#elif 1 |
18197 |
+/* On native Windows, map 'close' to '_close', so that -loldnames is not |
18198 |
+ required. In C++ with GNULIB_NAMESPACE, avoid differences between |
18199 |
+ platforms by defining GNULIB_NAMESPACE::close always. */ |
18200 |
+# if defined _WIN32 && !defined __CYGWIN__ |
18201 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
18202 |
+# undef close |
18203 |
+# define close _close |
18204 |
+# endif |
18205 |
+_GL_CXXALIAS_MDA (close, int, (int fd)); |
18206 |
+# else |
18207 |
+_GL_CXXALIAS_SYS (close, int, (int fd)); |
18208 |
+# endif |
18209 |
+_GL_CXXALIASWARN (close); |
18210 |
+#endif |
18211 |
+ |
18212 |
+ |
18213 |
+#if 0 |
18214 |
+# if 0 |
18215 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
18216 |
+# undef copy_file_range |
18217 |
+# define copy_file_range rpl_copy_file_range |
18218 |
+# endif |
18219 |
+_GL_FUNCDECL_RPL (copy_file_range, ssize_t, (int ifd, off_t *ipos, |
18220 |
+ int ofd, off_t *opos, |
18221 |
+ size_t len, unsigned flags)); |
18222 |
+_GL_CXXALIAS_RPL (copy_file_range, ssize_t, (int ifd, off_t *ipos, |
18223 |
+ int ofd, off_t *opos, |
18224 |
+ size_t len, unsigned flags)); |
18225 |
+# else |
18226 |
+# if !1 |
18227 |
+_GL_FUNCDECL_SYS (copy_file_range, ssize_t, (int ifd, off_t *ipos, |
18228 |
+ int ofd, off_t *opos, |
18229 |
+ size_t len, unsigned flags)); |
18230 |
+# endif |
18231 |
+_GL_CXXALIAS_SYS (copy_file_range, ssize_t, (int ifd, off_t *ipos, |
18232 |
+ int ofd, off_t *opos, |
18233 |
+ size_t len, unsigned flags)); |
18234 |
+# endif |
18235 |
+_GL_CXXALIASWARN (copy_file_range); |
18236 |
+#elif defined GNULIB_POSIXCHECK |
18237 |
+# undef copy_file_range |
18238 |
+# if HAVE_RAW_DECL_COPY_FILE_RANGE |
18239 |
+_GL_WARN_ON_USE (copy_file_range, |
18240 |
+ "copy_file_range is unportable - " |
18241 |
+ "use gnulib module copy_file_range for portability"); |
18242 |
+# endif |
18243 |
+#endif |
18244 |
+ |
18245 |
+ |
18246 |
+#if 1 |
18247 |
+# if 0 |
18248 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
18249 |
+# define dup rpl_dup |
18250 |
+# endif |
18251 |
+_GL_FUNCDECL_RPL (dup, int, (int oldfd)); |
18252 |
+_GL_CXXALIAS_RPL (dup, int, (int oldfd)); |
18253 |
+# elif defined _WIN32 && !defined __CYGWIN__ |
18254 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
18255 |
+# undef dup |
18256 |
+# define dup _dup |
18257 |
+# endif |
18258 |
+_GL_CXXALIAS_MDA (dup, int, (int oldfd)); |
18259 |
+# else |
18260 |
+_GL_CXXALIAS_SYS (dup, int, (int oldfd)); |
18261 |
+# endif |
18262 |
+_GL_CXXALIASWARN (dup); |
18263 |
+#elif defined GNULIB_POSIXCHECK |
18264 |
+# undef dup |
18265 |
+# if HAVE_RAW_DECL_DUP |
18266 |
+_GL_WARN_ON_USE (dup, "dup is unportable - " |
18267 |
+ "use gnulib module dup for portability"); |
18268 |
+# endif |
18269 |
+#elif 1 |
18270 |
+/* On native Windows, map 'dup' to '_dup', so that -loldnames is not |
18271 |
+ required. In C++ with GNULIB_NAMESPACE, avoid differences between |
18272 |
+ platforms by defining GNULIB_NAMESPACE::dup always. */ |
18273 |
+# if defined _WIN32 && !defined __CYGWIN__ |
18274 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
18275 |
+# undef dup |
18276 |
+# define dup _dup |
18277 |
+# endif |
18278 |
+_GL_CXXALIAS_MDA (dup, int, (int oldfd)); |
18279 |
+# else |
18280 |
+_GL_CXXALIAS_SYS (dup, int, (int oldfd)); |
18281 |
+# endif |
18282 |
+_GL_CXXALIASWARN (dup); |
18283 |
+#endif |
18284 |
+ |
18285 |
+ |
18286 |
+#if 1 |
18287 |
+/* Copy the file descriptor OLDFD into file descriptor NEWFD. Do nothing if |
18288 |
+ NEWFD = OLDFD, otherwise close NEWFD first if it is open. |
18289 |
+ Return newfd if successful, otherwise -1 and errno set. |
18290 |
+ See the POSIX:2008 specification |
18291 |
+ <https://pubs.opengroup.org/onlinepubs/9699919799/functions/dup2.html>. */ |
18292 |
+# if 0 |
18293 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
18294 |
+# define dup2 rpl_dup2 |
18295 |
+# endif |
18296 |
+_GL_FUNCDECL_RPL (dup2, int, (int oldfd, int newfd)); |
18297 |
+_GL_CXXALIAS_RPL (dup2, int, (int oldfd, int newfd)); |
18298 |
+# elif defined _WIN32 && !defined __CYGWIN__ |
18299 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
18300 |
+# undef dup2 |
18301 |
+# define dup2 _dup2 |
18302 |
+# endif |
18303 |
+_GL_CXXALIAS_MDA (dup2, int, (int oldfd, int newfd)); |
18304 |
+# else |
18305 |
+_GL_CXXALIAS_SYS (dup2, int, (int oldfd, int newfd)); |
18306 |
+# endif |
18307 |
+_GL_CXXALIASWARN (dup2); |
18308 |
+#elif defined GNULIB_POSIXCHECK |
18309 |
+# undef dup2 |
18310 |
+# if HAVE_RAW_DECL_DUP2 |
18311 |
+_GL_WARN_ON_USE (dup2, "dup2 is unportable - " |
18312 |
+ "use gnulib module dup2 for portability"); |
18313 |
+# endif |
18314 |
+#elif 1 |
18315 |
+/* On native Windows, map 'dup2' to '_dup2', so that -loldnames is not |
18316 |
+ required. In C++ with GNULIB_NAMESPACE, avoid differences between |
18317 |
+ platforms by defining GNULIB_NAMESPACE::dup2 always. */ |
18318 |
+# if defined _WIN32 && !defined __CYGWIN__ |
18319 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
18320 |
+# undef dup2 |
18321 |
+# define dup2 _dup2 |
18322 |
+# endif |
18323 |
+_GL_CXXALIAS_MDA (dup2, int, (int oldfd, int newfd)); |
18324 |
+# else |
18325 |
+_GL_CXXALIAS_SYS (dup2, int, (int oldfd, int newfd)); |
18326 |
+# endif |
18327 |
+_GL_CXXALIASWARN (dup2); |
18328 |
+#endif |
18329 |
+ |
18330 |
+ |
18331 |
+#if 0 |
18332 |
+/* Copy the file descriptor OLDFD into file descriptor NEWFD, with the |
18333 |
+ specified flags. |
18334 |
+ The flags are a bitmask, possibly including O_CLOEXEC (defined in <fcntl.h>) |
18335 |
+ and O_TEXT, O_BINARY (defined in "binary-io.h"). |
18336 |
+ Close NEWFD first if it is open. |
18337 |
+ Return newfd if successful, otherwise -1 and errno set. |
18338 |
+ See the Linux man page at |
18339 |
+ <https://www.kernel.org/doc/man-pages/online/pages/man2/dup3.2.html>. */ |
18340 |
+# if 1 |
18341 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
18342 |
+# define dup3 rpl_dup3 |
18343 |
+# endif |
18344 |
+_GL_FUNCDECL_RPL (dup3, int, (int oldfd, int newfd, int flags)); |
18345 |
+_GL_CXXALIAS_RPL (dup3, int, (int oldfd, int newfd, int flags)); |
18346 |
+# else |
18347 |
+_GL_FUNCDECL_SYS (dup3, int, (int oldfd, int newfd, int flags)); |
18348 |
+_GL_CXXALIAS_SYS (dup3, int, (int oldfd, int newfd, int flags)); |
18349 |
+# endif |
18350 |
+_GL_CXXALIASWARN (dup3); |
18351 |
+#elif defined GNULIB_POSIXCHECK |
18352 |
+# undef dup3 |
18353 |
+# if HAVE_RAW_DECL_DUP3 |
18354 |
+_GL_WARN_ON_USE (dup3, "dup3 is unportable - " |
18355 |
+ "use gnulib module dup3 for portability"); |
18356 |
+# endif |
18357 |
+#endif |
18358 |
+ |
18359 |
+ |
18360 |
+#if 0 |
18361 |
+# if defined __CYGWIN__ && !defined __i386__ |
18362 |
+/* The 'environ' variable is defined in a DLL. Therefore its declaration needs |
18363 |
+ the '__declspec(dllimport)' attribute, but the system's <unistd.h> lacks it. |
18364 |
+ This leads to a link error on 64-bit Cygwin when the option |
18365 |
+ -Wl,--disable-auto-import is in use. */ |
18366 |
+_GL_EXTERN_C __declspec(dllimport) char **environ; |
18367 |
+# endif |
18368 |
+# if !1 |
18369 |
+/* Set of environment variables and values. An array of strings of the form |
18370 |
+ "VARIABLE=VALUE", terminated with a NULL. */ |
18371 |
+# if defined __APPLE__ && defined __MACH__ |
18372 |
+# include <TargetConditionals.h> |
18373 |
+# if !TARGET_OS_IPHONE && !TARGET_IPHONE_SIMULATOR |
18374 |
+# define _GL_USE_CRT_EXTERNS |
18375 |
+# endif |
18376 |
+# endif |
18377 |
+# ifdef _GL_USE_CRT_EXTERNS |
18378 |
+# include <crt_externs.h> |
18379 |
+# define environ (*_NSGetEnviron ()) |
18380 |
+# else |
18381 |
+# ifdef __cplusplus |
18382 |
+extern "C" { |
18383 |
+# endif |
18384 |
+extern char **environ; |
18385 |
+# ifdef __cplusplus |
18386 |
+} |
18387 |
+# endif |
18388 |
+# endif |
18389 |
+# endif |
18390 |
+#elif defined GNULIB_POSIXCHECK |
18391 |
+# if HAVE_RAW_DECL_ENVIRON |
18392 |
+_GL_UNISTD_INLINE char *** |
18393 |
+_GL_WARN_ON_USE_ATTRIBUTE ("environ is unportable - " |
18394 |
+ "use gnulib module environ for portability") |
18395 |
+rpl_environ (void) |
18396 |
+{ |
18397 |
+ return &environ; |
18398 |
+} |
18399 |
+# undef environ |
18400 |
+# define environ (*rpl_environ ()) |
18401 |
+# endif |
18402 |
+#endif |
18403 |
+ |
18404 |
+ |
18405 |
+#if 1 |
18406 |
+/* Like access(), except that it uses the effective user id and group id of |
18407 |
+ the current process. */ |
18408 |
+# if !0 |
18409 |
+_GL_FUNCDECL_SYS (euidaccess, int, (const char *filename, int mode) |
18410 |
+ _GL_ARG_NONNULL ((1))); |
18411 |
+# endif |
18412 |
+_GL_CXXALIAS_SYS (euidaccess, int, (const char *filename, int mode)); |
18413 |
+_GL_CXXALIASWARN (euidaccess); |
18414 |
+# if defined GNULIB_POSIXCHECK |
18415 |
+/* Like access(), this function is a security risk. */ |
18416 |
+_GL_WARN_ON_USE (euidaccess, "the euidaccess function is a security risk - " |
18417 |
+ "use the gnulib module faccessat instead"); |
18418 |
+# endif |
18419 |
+#elif defined GNULIB_POSIXCHECK |
18420 |
+# undef euidaccess |
18421 |
+# if HAVE_RAW_DECL_EUIDACCESS |
18422 |
+_GL_WARN_ON_USE (euidaccess, "euidaccess is unportable - " |
18423 |
+ "use gnulib module euidaccess for portability"); |
18424 |
+# endif |
18425 |
+#endif |
18426 |
+ |
18427 |
+ |
18428 |
+#if 0 |
18429 |
+# if 0 |
18430 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
18431 |
+# undef execl |
18432 |
+# define execl rpl_execl |
18433 |
+# endif |
18434 |
+_GL_FUNCDECL_RPL (execl, int, (const char *program, const char *arg, ...) |
18435 |
+ _GL_ARG_NONNULL ((1))); |
18436 |
+_GL_CXXALIAS_RPL (execl, int, (const char *program, const char *arg, ...)); |
18437 |
+# else |
18438 |
+_GL_CXXALIAS_SYS (execl, int, (const char *program, const char *arg, ...)); |
18439 |
+# endif |
18440 |
+_GL_CXXALIASWARN (execl); |
18441 |
+#elif defined GNULIB_POSIXCHECK |
18442 |
+# undef execl |
18443 |
+# if HAVE_RAW_DECL_EXECL |
18444 |
+_GL_WARN_ON_USE (execl, "execl behaves very differently on mingw - " |
18445 |
+ "use gnulib module execl for portability"); |
18446 |
+# endif |
18447 |
+#elif 1 |
18448 |
+/* On native Windows, map 'execl' to '_execl', so that -loldnames is not |
18449 |
+ required. In C++ with GNULIB_NAMESPACE, avoid differences between |
18450 |
+ platforms by defining GNULIB_NAMESPACE::execl always. */ |
18451 |
+# if defined _WIN32 && !defined __CYGWIN__ |
18452 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
18453 |
+# undef execl |
18454 |
+# define execl _execl |
18455 |
+# endif |
18456 |
+_GL_CXXALIAS_MDA (execl, intptr_t, (const char *program, const char *arg, ...)); |
18457 |
+# else |
18458 |
+_GL_CXXALIAS_SYS (execl, int, (const char *program, const char *arg, ...)); |
18459 |
+# endif |
18460 |
+_GL_CXXALIASWARN (execl); |
18461 |
+#endif |
18462 |
+ |
18463 |
+#if 0 |
18464 |
+# if 0 |
18465 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
18466 |
+# undef execle |
18467 |
+# define execle rpl_execle |
18468 |
+# endif |
18469 |
+_GL_FUNCDECL_RPL (execle, int, (const char *program, const char *arg, ...) |
18470 |
+ _GL_ARG_NONNULL ((1))); |
18471 |
+_GL_CXXALIAS_RPL (execle, int, (const char *program, const char *arg, ...)); |
18472 |
+# else |
18473 |
+_GL_CXXALIAS_SYS (execle, int, (const char *program, const char *arg, ...)); |
18474 |
+# endif |
18475 |
+_GL_CXXALIASWARN (execle); |
18476 |
+#elif defined GNULIB_POSIXCHECK |
18477 |
+# undef execle |
18478 |
+# if HAVE_RAW_DECL_EXECLE |
18479 |
+_GL_WARN_ON_USE (execle, "execle behaves very differently on mingw - " |
18480 |
+ "use gnulib module execle for portability"); |
18481 |
+# endif |
18482 |
+#elif 1 |
18483 |
+/* On native Windows, map 'execle' to '_execle', so that -loldnames is not |
18484 |
+ required. In C++ with GNULIB_NAMESPACE, avoid differences between |
18485 |
+ platforms by defining GNULIB_NAMESPACE::execle always. */ |
18486 |
+# if defined _WIN32 && !defined __CYGWIN__ |
18487 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
18488 |
+# undef execle |
18489 |
+# define execle _execle |
18490 |
+# endif |
18491 |
+_GL_CXXALIAS_MDA (execle, intptr_t, |
18492 |
+ (const char *program, const char *arg, ...)); |
18493 |
+# else |
18494 |
+_GL_CXXALIAS_SYS (execle, int, (const char *program, const char *arg, ...)); |
18495 |
+# endif |
18496 |
+_GL_CXXALIASWARN (execle); |
18497 |
+#endif |
18498 |
+ |
18499 |
+#if 0 |
18500 |
+# if 0 |
18501 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
18502 |
+# undef execlp |
18503 |
+# define execlp rpl_execlp |
18504 |
+# endif |
18505 |
+_GL_FUNCDECL_RPL (execlp, int, (const char *program, const char *arg, ...) |
18506 |
+ _GL_ARG_NONNULL ((1))); |
18507 |
+_GL_CXXALIAS_RPL (execlp, int, (const char *program, const char *arg, ...)); |
18508 |
+# else |
18509 |
+_GL_CXXALIAS_SYS (execlp, int, (const char *program, const char *arg, ...)); |
18510 |
+# endif |
18511 |
+_GL_CXXALIASWARN (execlp); |
18512 |
+#elif defined GNULIB_POSIXCHECK |
18513 |
+# undef execlp |
18514 |
+# if HAVE_RAW_DECL_EXECLP |
18515 |
+_GL_WARN_ON_USE (execlp, "execlp behaves very differently on mingw - " |
18516 |
+ "use gnulib module execlp for portability"); |
18517 |
+# endif |
18518 |
+#elif 1 |
18519 |
+/* On native Windows, map 'execlp' to '_execlp', so that -loldnames is not |
18520 |
+ required. In C++ with GNULIB_NAMESPACE, avoid differences between |
18521 |
+ platforms by defining GNULIB_NAMESPACE::execlp always. */ |
18522 |
+# if defined _WIN32 && !defined __CYGWIN__ |
18523 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
18524 |
+# undef execlp |
18525 |
+# define execlp _execlp |
18526 |
+# endif |
18527 |
+_GL_CXXALIAS_MDA (execlp, intptr_t, |
18528 |
+ (const char *program, const char *arg, ...)); |
18529 |
+# else |
18530 |
+_GL_CXXALIAS_SYS (execlp, int, (const char *program, const char *arg, ...)); |
18531 |
+# endif |
18532 |
+_GL_CXXALIASWARN (execlp); |
18533 |
+#endif |
18534 |
+ |
18535 |
+ |
18536 |
+#if 0 |
18537 |
+# if 0 |
18538 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
18539 |
+# undef execv |
18540 |
+# define execv rpl_execv |
18541 |
+# endif |
18542 |
+_GL_FUNCDECL_RPL (execv, int, (const char *program, char * const *argv) |
18543 |
+ _GL_ARG_NONNULL ((1, 2))); |
18544 |
+_GL_CXXALIAS_RPL (execv, int, (const char *program, char * const *argv)); |
18545 |
+# else |
18546 |
+_GL_CXXALIAS_SYS (execv, int, (const char *program, char * const *argv)); |
18547 |
+# endif |
18548 |
+_GL_CXXALIASWARN (execv); |
18549 |
+#elif defined GNULIB_POSIXCHECK |
18550 |
+# undef execv |
18551 |
+# if HAVE_RAW_DECL_EXECV |
18552 |
+_GL_WARN_ON_USE (execv, "execv behaves very differently on mingw - " |
18553 |
+ "use gnulib module execv for portability"); |
18554 |
+# endif |
18555 |
+#elif 1 |
18556 |
+/* On native Windows, map 'execv' to '_execv', so that -loldnames is not |
18557 |
+ required. In C++ with GNULIB_NAMESPACE, avoid differences between |
18558 |
+ platforms by defining GNULIB_NAMESPACE::execv always. */ |
18559 |
+# if defined _WIN32 && !defined __CYGWIN__ |
18560 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
18561 |
+# undef execv |
18562 |
+# define execv _execv |
18563 |
+# endif |
18564 |
+_GL_CXXALIAS_MDA_CAST (execv, intptr_t, |
18565 |
+ (const char *program, char * const *argv)); |
18566 |
+# else |
18567 |
+_GL_CXXALIAS_SYS (execv, int, (const char *program, char * const *argv)); |
18568 |
+# endif |
18569 |
+_GL_CXXALIASWARN (execv); |
18570 |
+#endif |
18571 |
+ |
18572 |
+#if 0 |
18573 |
+# if 0 |
18574 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
18575 |
+# undef execve |
18576 |
+# define execve rpl_execve |
18577 |
+# endif |
18578 |
+_GL_FUNCDECL_RPL (execve, int, |
18579 |
+ (const char *program, char * const *argv, char * const *env) |
18580 |
+ _GL_ARG_NONNULL ((1, 2))); |
18581 |
+_GL_CXXALIAS_RPL (execve, int, |
18582 |
+ (const char *program, char * const *argv, char * const *env)); |
18583 |
+# else |
18584 |
+_GL_CXXALIAS_SYS (execve, int, |
18585 |
+ (const char *program, char * const *argv, char * const *env)); |
18586 |
+# endif |
18587 |
+_GL_CXXALIASWARN (execve); |
18588 |
+#elif defined GNULIB_POSIXCHECK |
18589 |
+# undef execve |
18590 |
+# if HAVE_RAW_DECL_EXECVE |
18591 |
+_GL_WARN_ON_USE (execve, "execve behaves very differently on mingw - " |
18592 |
+ "use gnulib module execve for portability"); |
18593 |
+# endif |
18594 |
+#elif 1 |
18595 |
+/* On native Windows, map 'execve' to '_execve', so that -loldnames is not |
18596 |
+ required. In C++ with GNULIB_NAMESPACE, avoid differences between |
18597 |
+ platforms by defining GNULIB_NAMESPACE::execve always. */ |
18598 |
+# if defined _WIN32 && !defined __CYGWIN__ |
18599 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
18600 |
+# undef execve |
18601 |
+# define execve _execve |
18602 |
+# endif |
18603 |
+_GL_CXXALIAS_MDA_CAST (execve, intptr_t, |
18604 |
+ (const char *program, char * const *argv, |
18605 |
+ char * const *env)); |
18606 |
+# else |
18607 |
+_GL_CXXALIAS_SYS (execve, int, |
18608 |
+ (const char *program, char * const *argv, char * const *env)); |
18609 |
+# endif |
18610 |
+_GL_CXXALIASWARN (execve); |
18611 |
+#endif |
18612 |
+ |
18613 |
+#if 0 |
18614 |
+# if 0 |
18615 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
18616 |
+# undef execvp |
18617 |
+# define execvp rpl_execvp |
18618 |
+# endif |
18619 |
+_GL_FUNCDECL_RPL (execvp, int, (const char *program, char * const *argv) |
18620 |
+ _GL_ARG_NONNULL ((1, 2))); |
18621 |
+_GL_CXXALIAS_RPL (execvp, int, (const char *program, char * const *argv)); |
18622 |
+# else |
18623 |
+_GL_CXXALIAS_SYS (execvp, int, (const char *program, char * const *argv)); |
18624 |
+# endif |
18625 |
+_GL_CXXALIASWARN (execvp); |
18626 |
+#elif defined GNULIB_POSIXCHECK |
18627 |
+# undef execvp |
18628 |
+# if HAVE_RAW_DECL_EXECVP |
18629 |
+_GL_WARN_ON_USE (execvp, "execvp behaves very differently on mingw - " |
18630 |
+ "use gnulib module execvp for portability"); |
18631 |
+# endif |
18632 |
+#elif 1 |
18633 |
+/* On native Windows, map 'execvp' to '_execvp', so that -loldnames is not |
18634 |
+ required. In C++ with GNULIB_NAMESPACE, avoid differences between |
18635 |
+ platforms by defining GNULIB_NAMESPACE::execvp always. */ |
18636 |
+# if defined _WIN32 && !defined __CYGWIN__ |
18637 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
18638 |
+# undef execvp |
18639 |
+# define execvp _execvp |
18640 |
+# endif |
18641 |
+_GL_CXXALIAS_MDA_CAST (execvp, intptr_t, |
18642 |
+ (const char *program, char * const *argv)); |
18643 |
+# else |
18644 |
+_GL_CXXALIAS_SYS (execvp, int, (const char *program, char * const *argv)); |
18645 |
+# endif |
18646 |
+_GL_CXXALIASWARN (execvp); |
18647 |
+#endif |
18648 |
+ |
18649 |
+#if 0 |
18650 |
+# if 0 |
18651 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
18652 |
+# undef execvpe |
18653 |
+# define execvpe rpl_execvpe |
18654 |
+# endif |
18655 |
+_GL_FUNCDECL_RPL (execvpe, int, |
18656 |
+ (const char *program, char * const *argv, char * const *env) |
18657 |
+ _GL_ARG_NONNULL ((1, 2))); |
18658 |
+_GL_CXXALIAS_RPL (execvpe, int, |
18659 |
+ (const char *program, char * const *argv, char * const *env)); |
18660 |
+# else |
18661 |
+# if !0 |
18662 |
+_GL_FUNCDECL_SYS (execvpe, int, |
18663 |
+ (const char *program, char * const *argv, char * const *env) |
18664 |
+ _GL_ARG_NONNULL ((1, 2))); |
18665 |
+# endif |
18666 |
+_GL_CXXALIAS_SYS (execvpe, int, |
18667 |
+ (const char *program, char * const *argv, char * const *env)); |
18668 |
+# endif |
18669 |
+_GL_CXXALIASWARN (execvpe); |
18670 |
+#elif defined GNULIB_POSIXCHECK |
18671 |
+# undef execvpe |
18672 |
+# if HAVE_RAW_DECL_EXECVPE |
18673 |
+_GL_WARN_ON_USE (execvpe, "execvpe behaves very differently on mingw - " |
18674 |
+ "use gnulib module execvpe for portability"); |
18675 |
+# endif |
18676 |
+#elif 1 |
18677 |
+/* On native Windows, map 'execvpe' to '_execvpe', so that -loldnames is not |
18678 |
+ required. In C++ with GNULIB_NAMESPACE, avoid differences between |
18679 |
+ platforms by defining GNULIB_NAMESPACE::execvpe on all platforms that have |
18680 |
+ it. */ |
18681 |
+# if defined _WIN32 && !defined __CYGWIN__ |
18682 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
18683 |
+# undef execvpe |
18684 |
+# define execvpe _execvpe |
18685 |
+# endif |
18686 |
+_GL_CXXALIAS_MDA_CAST (execvpe, intptr_t, |
18687 |
+ (const char *program, char * const *argv, |
18688 |
+ char * const *env)); |
18689 |
+# elif 1 |
18690 |
+# if !0 |
18691 |
+_GL_FUNCDECL_SYS (execvpe, int, |
18692 |
+ (const char *program, char * const *argv, char * const *env) |
18693 |
+ _GL_ARG_NONNULL ((1, 2))); |
18694 |
+# endif |
18695 |
+_GL_CXXALIAS_SYS (execvpe, int, |
18696 |
+ (const char *program, char * const *argv, char * const *env)); |
18697 |
+# endif |
18698 |
+# if (defined _WIN32 && !defined __CYGWIN__) || 1 |
18699 |
+_GL_CXXALIASWARN (execvpe); |
18700 |
+# endif |
18701 |
+#endif |
18702 |
+ |
18703 |
+ |
18704 |
+#if 1 |
18705 |
+# if 0 |
18706 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
18707 |
+# undef faccessat |
18708 |
+# define faccessat rpl_faccessat |
18709 |
+# endif |
18710 |
+_GL_FUNCDECL_RPL (faccessat, int, |
18711 |
+ (int fd, char const *name, int mode, int flag) |
18712 |
+ _GL_ARG_NONNULL ((2))); |
18713 |
+_GL_CXXALIAS_RPL (faccessat, int, |
18714 |
+ (int fd, char const *name, int mode, int flag)); |
18715 |
+# else |
18716 |
+# if !1 |
18717 |
+_GL_FUNCDECL_SYS (faccessat, int, |
18718 |
+ (int fd, char const *file, int mode, int flag) |
18719 |
+ _GL_ARG_NONNULL ((2))); |
18720 |
+# endif |
18721 |
+_GL_CXXALIAS_SYS (faccessat, int, |
18722 |
+ (int fd, char const *file, int mode, int flag)); |
18723 |
+# endif |
18724 |
+_GL_CXXALIASWARN (faccessat); |
18725 |
+#elif defined GNULIB_POSIXCHECK |
18726 |
+# undef faccessat |
18727 |
+# if HAVE_RAW_DECL_FACCESSAT |
18728 |
+_GL_WARN_ON_USE (faccessat, "faccessat is not portable - " |
18729 |
+ "use gnulib module faccessat for portability"); |
18730 |
+# endif |
18731 |
+#endif |
18732 |
+ |
18733 |
+ |
18734 |
+#if 1 |
18735 |
+/* Change the process' current working directory to the directory on which |
18736 |
+ the given file descriptor is open. |
18737 |
+ Return 0 if successful, otherwise -1 and errno set. |
18738 |
+ See the POSIX:2008 specification |
18739 |
+ <https://pubs.opengroup.org/onlinepubs/9699919799/functions/fchdir.html>. */ |
18740 |
+# if ! 1 |
18741 |
+_GL_FUNCDECL_SYS (fchdir, int, (int /*fd*/)); |
18742 |
+ |
18743 |
+/* Gnulib internal hooks needed to maintain the fchdir metadata. */ |
18744 |
+_GL_EXTERN_C int _gl_register_fd (int fd, const char *filename) |
18745 |
+ _GL_ARG_NONNULL ((2)); |
18746 |
+_GL_EXTERN_C void _gl_unregister_fd (int fd); |
18747 |
+_GL_EXTERN_C int _gl_register_dup (int oldfd, int newfd); |
18748 |
+_GL_EXTERN_C const char *_gl_directory_name (int fd); |
18749 |
+ |
18750 |
+# else |
18751 |
+# if !1 |
18752 |
+_GL_FUNCDECL_SYS (fchdir, int, (int /*fd*/)); |
18753 |
+# endif |
18754 |
+# endif |
18755 |
+_GL_CXXALIAS_SYS (fchdir, int, (int /*fd*/)); |
18756 |
+_GL_CXXALIASWARN (fchdir); |
18757 |
+#elif defined GNULIB_POSIXCHECK |
18758 |
+# undef fchdir |
18759 |
+# if HAVE_RAW_DECL_FCHDIR |
18760 |
+_GL_WARN_ON_USE (fchdir, "fchdir is unportable - " |
18761 |
+ "use gnulib module fchdir for portability"); |
18762 |
+# endif |
18763 |
+#endif |
18764 |
+ |
18765 |
+ |
18766 |
+#if 0 |
18767 |
+# if 0 |
18768 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
18769 |
+# undef fchownat |
18770 |
+# define fchownat rpl_fchownat |
18771 |
+# endif |
18772 |
+_GL_FUNCDECL_RPL (fchownat, int, (int fd, char const *file, |
18773 |
+ uid_t owner, gid_t group, int flag) |
18774 |
+ _GL_ARG_NONNULL ((2))); |
18775 |
+_GL_CXXALIAS_RPL (fchownat, int, (int fd, char const *file, |
18776 |
+ uid_t owner, gid_t group, int flag)); |
18777 |
+# else |
18778 |
+# if !1 |
18779 |
+_GL_FUNCDECL_SYS (fchownat, int, (int fd, char const *file, |
18780 |
+ uid_t owner, gid_t group, int flag) |
18781 |
+ _GL_ARG_NONNULL ((2))); |
18782 |
+# endif |
18783 |
+_GL_CXXALIAS_SYS (fchownat, int, (int fd, char const *file, |
18784 |
+ uid_t owner, gid_t group, int flag)); |
18785 |
+# endif |
18786 |
+_GL_CXXALIASWARN (fchownat); |
18787 |
+#elif defined GNULIB_POSIXCHECK |
18788 |
+# undef fchownat |
18789 |
+# if HAVE_RAW_DECL_FCHOWNAT |
18790 |
+_GL_WARN_ON_USE (fchownat, "fchownat is not portable - " |
18791 |
+ "use gnulib module fchownat for portability"); |
18792 |
+# endif |
18793 |
+#endif |
18794 |
+ |
18795 |
+ |
18796 |
+#if 0 |
18797 |
+/* Synchronize changes to a file. |
18798 |
+ Return 0 if successful, otherwise -1 and errno set. |
18799 |
+ See POSIX:2008 specification |
18800 |
+ <https://pubs.opengroup.org/onlinepubs/9699919799/functions/fdatasync.html>. */ |
18801 |
+# if !1 || !1 |
18802 |
+_GL_FUNCDECL_SYS (fdatasync, int, (int fd)); |
18803 |
+# endif |
18804 |
+_GL_CXXALIAS_SYS (fdatasync, int, (int fd)); |
18805 |
+_GL_CXXALIASWARN (fdatasync); |
18806 |
+#elif defined GNULIB_POSIXCHECK |
18807 |
+# undef fdatasync |
18808 |
+# if HAVE_RAW_DECL_FDATASYNC |
18809 |
+_GL_WARN_ON_USE (fdatasync, "fdatasync is unportable - " |
18810 |
+ "use gnulib module fdatasync for portability"); |
18811 |
+# endif |
18812 |
+#endif |
18813 |
+ |
18814 |
+ |
18815 |
+#if 0 |
18816 |
+/* Synchronize changes, including metadata, to a file. |
18817 |
+ Return 0 if successful, otherwise -1 and errno set. |
18818 |
+ See POSIX:2008 specification |
18819 |
+ <https://pubs.opengroup.org/onlinepubs/9699919799/functions/fsync.html>. */ |
18820 |
+# if !1 |
18821 |
+_GL_FUNCDECL_SYS (fsync, int, (int fd)); |
18822 |
+# endif |
18823 |
+_GL_CXXALIAS_SYS (fsync, int, (int fd)); |
18824 |
+_GL_CXXALIASWARN (fsync); |
18825 |
+#elif defined GNULIB_POSIXCHECK |
18826 |
+# undef fsync |
18827 |
+# if HAVE_RAW_DECL_FSYNC |
18828 |
+_GL_WARN_ON_USE (fsync, "fsync is unportable - " |
18829 |
+ "use gnulib module fsync for portability"); |
18830 |
+# endif |
18831 |
+#endif |
18832 |
+ |
18833 |
+ |
18834 |
+#if 0 |
18835 |
+/* Change the size of the file to which FD is opened to become equal to LENGTH. |
18836 |
+ Return 0 if successful, otherwise -1 and errno set. |
18837 |
+ See the POSIX:2008 specification |
18838 |
+ <https://pubs.opengroup.org/onlinepubs/9699919799/functions/ftruncate.html>. */ |
18839 |
+# if 0 |
18840 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
18841 |
+# undef ftruncate |
18842 |
+# define ftruncate rpl_ftruncate |
18843 |
+# endif |
18844 |
+_GL_FUNCDECL_RPL (ftruncate, int, (int fd, off_t length)); |
18845 |
+_GL_CXXALIAS_RPL (ftruncate, int, (int fd, off_t length)); |
18846 |
+# else |
18847 |
+# if !1 |
18848 |
+_GL_FUNCDECL_SYS (ftruncate, int, (int fd, off_t length)); |
18849 |
+# endif |
18850 |
+_GL_CXXALIAS_SYS (ftruncate, int, (int fd, off_t length)); |
18851 |
+# endif |
18852 |
+_GL_CXXALIASWARN (ftruncate); |
18853 |
+#elif defined GNULIB_POSIXCHECK |
18854 |
+# undef ftruncate |
18855 |
+# if HAVE_RAW_DECL_FTRUNCATE |
18856 |
+_GL_WARN_ON_USE (ftruncate, "ftruncate is unportable - " |
18857 |
+ "use gnulib module ftruncate for portability"); |
18858 |
+# endif |
18859 |
+#endif |
18860 |
+ |
18861 |
+ |
18862 |
+#if 1 |
18863 |
+/* Get the name of the current working directory, and put it in SIZE bytes |
18864 |
+ of BUF. |
18865 |
+ Return BUF if successful, or NULL if the directory couldn't be determined |
18866 |
+ or SIZE was too small. |
18867 |
+ See the POSIX:2008 specification |
18868 |
+ <https://pubs.opengroup.org/onlinepubs/9699919799/functions/getcwd.html>. |
18869 |
+ Additionally, the gnulib module 'getcwd' guarantees the following GNU |
18870 |
+ extension: If BUF is NULL, an array is allocated with 'malloc'; the array |
18871 |
+ is SIZE bytes long, unless SIZE == 0, in which case it is as big as |
18872 |
+ necessary. */ |
18873 |
+# if 0 |
18874 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
18875 |
+# define getcwd rpl_getcwd |
18876 |
+# endif |
18877 |
+_GL_FUNCDECL_RPL (getcwd, char *, (char *buf, size_t size)); |
18878 |
+_GL_CXXALIAS_RPL (getcwd, char *, (char *buf, size_t size)); |
18879 |
+# elif defined _WIN32 && !defined __CYGWIN__ |
18880 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
18881 |
+# undef getcwd |
18882 |
+# define getcwd _getcwd |
18883 |
+# endif |
18884 |
+_GL_CXXALIAS_MDA (getcwd, char *, (char *buf, size_t size)); |
18885 |
+# else |
18886 |
+/* Need to cast, because on mingw, the second parameter is |
18887 |
+ int size. */ |
18888 |
+_GL_CXXALIAS_SYS_CAST (getcwd, char *, (char *buf, size_t size)); |
18889 |
+# endif |
18890 |
+_GL_CXXALIASWARN (getcwd); |
18891 |
+#elif defined GNULIB_POSIXCHECK |
18892 |
+# undef getcwd |
18893 |
+# if HAVE_RAW_DECL_GETCWD |
18894 |
+_GL_WARN_ON_USE (getcwd, "getcwd is unportable - " |
18895 |
+ "use gnulib module getcwd for portability"); |
18896 |
+# endif |
18897 |
+#elif 1 |
18898 |
+/* On native Windows, map 'getcwd' to '_getcwd', so that -loldnames is not |
18899 |
+ required. In C++ with GNULIB_NAMESPACE, avoid differences between |
18900 |
+ platforms by defining GNULIB_NAMESPACE::getcwd always. */ |
18901 |
+# if defined _WIN32 && !defined __CYGWIN__ |
18902 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
18903 |
+# undef getcwd |
18904 |
+# define getcwd _getcwd |
18905 |
+# endif |
18906 |
+/* Need to cast, because on mingw, the second parameter is either |
18907 |
+ 'int size' or 'size_t size'. */ |
18908 |
+_GL_CXXALIAS_MDA_CAST (getcwd, char *, (char *buf, size_t size)); |
18909 |
+# else |
18910 |
+_GL_CXXALIAS_SYS_CAST (getcwd, char *, (char *buf, size_t size)); |
18911 |
+# endif |
18912 |
+_GL_CXXALIASWARN (getcwd); |
18913 |
+#endif |
18914 |
+ |
18915 |
+ |
18916 |
+#if 0 |
18917 |
+/* Return the NIS domain name of the machine. |
18918 |
+ WARNING! The NIS domain name is unrelated to the fully qualified host name |
18919 |
+ of the machine. It is also unrelated to email addresses. |
18920 |
+ WARNING! The NIS domain name is usually the empty string or "(none)" when |
18921 |
+ not using NIS. |
18922 |
+ |
18923 |
+ Put up to LEN bytes of the NIS domain name into NAME. |
18924 |
+ Null terminate it if the name is shorter than LEN. |
18925 |
+ If the NIS domain name is longer than LEN, set errno = EINVAL and return -1. |
18926 |
+ Return 0 if successful, otherwise set errno and return -1. */ |
18927 |
+# if 0 |
18928 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
18929 |
+# undef getdomainname |
18930 |
+# define getdomainname rpl_getdomainname |
18931 |
+# endif |
18932 |
+_GL_FUNCDECL_RPL (getdomainname, int, (char *name, size_t len) |
18933 |
+ _GL_ARG_NONNULL ((1))); |
18934 |
+_GL_CXXALIAS_RPL (getdomainname, int, (char *name, size_t len)); |
18935 |
+# else |
18936 |
+# if !1 |
18937 |
+_GL_FUNCDECL_SYS (getdomainname, int, (char *name, size_t len) |
18938 |
+ _GL_ARG_NONNULL ((1))); |
18939 |
+# endif |
18940 |
+_GL_CXXALIAS_SYS (getdomainname, int, (char *name, size_t len)); |
18941 |
+# endif |
18942 |
+_GL_CXXALIASWARN (getdomainname); |
18943 |
+#elif defined GNULIB_POSIXCHECK |
18944 |
+# undef getdomainname |
18945 |
+# if HAVE_RAW_DECL_GETDOMAINNAME |
18946 |
+_GL_WARN_ON_USE (getdomainname, "getdomainname is unportable - " |
18947 |
+ "use gnulib module getdomainname for portability"); |
18948 |
+# endif |
18949 |
+#endif |
18950 |
+ |
18951 |
+ |
18952 |
+#if 1 |
18953 |
+/* Return the maximum number of file descriptors in the current process. |
18954 |
+ In POSIX, this is same as sysconf (_SC_OPEN_MAX). */ |
18955 |
+# if 0 |
18956 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
18957 |
+# undef getdtablesize |
18958 |
+# define getdtablesize rpl_getdtablesize |
18959 |
+# endif |
18960 |
+_GL_FUNCDECL_RPL (getdtablesize, int, (void)); |
18961 |
+_GL_CXXALIAS_RPL (getdtablesize, int, (void)); |
18962 |
+# else |
18963 |
+# if !1 |
18964 |
+_GL_FUNCDECL_SYS (getdtablesize, int, (void)); |
18965 |
+# endif |
18966 |
+/* Need to cast, because on AIX, the parameter list is |
18967 |
+ (...). */ |
18968 |
+_GL_CXXALIAS_SYS_CAST (getdtablesize, int, (void)); |
18969 |
+# endif |
18970 |
+_GL_CXXALIASWARN (getdtablesize); |
18971 |
+#elif defined GNULIB_POSIXCHECK |
18972 |
+# undef getdtablesize |
18973 |
+# if HAVE_RAW_DECL_GETDTABLESIZE |
18974 |
+_GL_WARN_ON_USE (getdtablesize, "getdtablesize is unportable - " |
18975 |
+ "use gnulib module getdtablesize for portability"); |
18976 |
+# endif |
18977 |
+#endif |
18978 |
+ |
18979 |
+ |
18980 |
+#if 0 |
18981 |
+/* Fill a buffer with random bytes. */ |
18982 |
+# if !1 |
18983 |
+_GL_FUNCDECL_SYS (getentropy, int, (void *buffer, size_t length)); |
18984 |
+# endif |
18985 |
+_GL_CXXALIAS_SYS (getentropy, int, (void *buffer, size_t length)); |
18986 |
+_GL_CXXALIASWARN (getentropy); |
18987 |
+#elif defined GNULIB_POSIXCHECK |
18988 |
+# undef getentropy |
18989 |
+# if HAVE_RAW_DECL_GETENTROPY |
18990 |
+_GL_WARN_ON_USE (getentropy, "getentropy is unportable - " |
18991 |
+ "use gnulib module getentropy for portability"); |
18992 |
+# endif |
18993 |
+#endif |
18994 |
+ |
18995 |
+ |
18996 |
+#if 1 |
18997 |
+/* Return the supplemental groups that the current process belongs to. |
18998 |
+ It is unspecified whether the effective group id is in the list. |
18999 |
+ If N is 0, return the group count; otherwise, N describes how many |
19000 |
+ entries are available in GROUPS. Return -1 and set errno if N is |
19001 |
+ not 0 and not large enough. Fails with ENOSYS on some systems. */ |
19002 |
+# if 0 |
19003 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
19004 |
+# undef getgroups |
19005 |
+# define getgroups rpl_getgroups |
19006 |
+# endif |
19007 |
+_GL_FUNCDECL_RPL (getgroups, int, (int n, gid_t *groups)); |
19008 |
+_GL_CXXALIAS_RPL (getgroups, int, (int n, gid_t *groups)); |
19009 |
+# else |
19010 |
+# if !1 |
19011 |
+_GL_FUNCDECL_SYS (getgroups, int, (int n, gid_t *groups)); |
19012 |
+# endif |
19013 |
+_GL_CXXALIAS_SYS (getgroups, int, (int n, gid_t *groups)); |
19014 |
+# endif |
19015 |
+_GL_CXXALIASWARN (getgroups); |
19016 |
+#elif defined GNULIB_POSIXCHECK |
19017 |
+# undef getgroups |
19018 |
+# if HAVE_RAW_DECL_GETGROUPS |
19019 |
+_GL_WARN_ON_USE (getgroups, "getgroups is unportable - " |
19020 |
+ "use gnulib module getgroups for portability"); |
19021 |
+# endif |
19022 |
+#endif |
19023 |
+ |
19024 |
+ |
19025 |
+#if 0 |
19026 |
+/* Return the standard host name of the machine. |
19027 |
+ WARNING! The host name may or may not be fully qualified. |
19028 |
+ |
19029 |
+ Put up to LEN bytes of the host name into NAME. |
19030 |
+ Null terminate it if the name is shorter than LEN. |
19031 |
+ If the host name is longer than LEN, set errno = EINVAL and return -1. |
19032 |
+ Return 0 if successful, otherwise set errno and return -1. */ |
19033 |
+# if 0 |
19034 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
19035 |
+# undef gethostname |
19036 |
+# define gethostname rpl_gethostname |
19037 |
+# endif |
19038 |
+_GL_FUNCDECL_RPL (gethostname, int, (char *name, size_t len) |
19039 |
+ _GL_ARG_NONNULL ((1))); |
19040 |
+_GL_CXXALIAS_RPL (gethostname, int, (char *name, size_t len)); |
19041 |
+# else |
19042 |
+# if !1 |
19043 |
+_GL_FUNCDECL_SYS (gethostname, int, (char *name, size_t len) |
19044 |
+ _GL_ARG_NONNULL ((1))); |
19045 |
+# endif |
19046 |
+/* Need to cast, because on Solaris 10 and OSF/1 5.1 systems, the second |
19047 |
+ parameter is |
19048 |
+ int len. */ |
19049 |
+_GL_CXXALIAS_SYS_CAST (gethostname, int, (char *name, size_t len)); |
19050 |
+# endif |
19051 |
+_GL_CXXALIASWARN (gethostname); |
19052 |
+#elif 0 |
19053 |
+# undef gethostname |
19054 |
+# define gethostname gethostname_used_without_requesting_gnulib_module_gethostname |
19055 |
+#elif defined GNULIB_POSIXCHECK |
19056 |
+# undef gethostname |
19057 |
+# if HAVE_RAW_DECL_GETHOSTNAME |
19058 |
+_GL_WARN_ON_USE (gethostname, "gethostname is unportable - " |
19059 |
+ "use gnulib module gethostname for portability"); |
19060 |
+# endif |
19061 |
+#endif |
19062 |
+ |
19063 |
+ |
19064 |
+#if 0 |
19065 |
+/* Returns the user's login name, or NULL if it cannot be found. Upon error, |
19066 |
+ returns NULL with errno set. |
19067 |
+ |
19068 |
+ See <https://pubs.opengroup.org/onlinepubs/9699919799/functions/getlogin.html>. |
19069 |
+ |
19070 |
+ Most programs don't need to use this function, because the information is |
19071 |
+ available through environment variables: |
19072 |
+ ${LOGNAME-$USER} on Unix platforms, |
19073 |
+ $USERNAME on native Windows platforms. |
19074 |
+ */ |
19075 |
+# if !1 |
19076 |
+_GL_FUNCDECL_SYS (getlogin, char *, (void)); |
19077 |
+# endif |
19078 |
+_GL_CXXALIAS_SYS (getlogin, char *, (void)); |
19079 |
+_GL_CXXALIASWARN (getlogin); |
19080 |
+#elif defined GNULIB_POSIXCHECK |
19081 |
+# undef getlogin |
19082 |
+# if HAVE_RAW_DECL_GETLOGIN |
19083 |
+_GL_WARN_ON_USE (getlogin, "getlogin is unportable - " |
19084 |
+ "use gnulib module getlogin for portability"); |
19085 |
+# endif |
19086 |
+#endif |
19087 |
+ |
19088 |
+ |
19089 |
+#if 0 |
19090 |
+/* Copies the user's login name to NAME. |
19091 |
+ The array pointed to by NAME has room for SIZE bytes. |
19092 |
+ |
19093 |
+ Returns 0 if successful. Upon error, an error number is returned, or -1 in |
19094 |
+ the case that the login name cannot be found but no specific error is |
19095 |
+ provided (this case is hopefully rare but is left open by the POSIX spec). |
19096 |
+ |
19097 |
+ See <https://pubs.opengroup.org/onlinepubs/9699919799/functions/getlogin.html>. |
19098 |
+ |
19099 |
+ Most programs don't need to use this function, because the information is |
19100 |
+ available through environment variables: |
19101 |
+ ${LOGNAME-$USER} on Unix platforms, |
19102 |
+ $USERNAME on native Windows platforms. |
19103 |
+ */ |
19104 |
+# if 0 |
19105 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
19106 |
+# define getlogin_r rpl_getlogin_r |
19107 |
+# endif |
19108 |
+_GL_FUNCDECL_RPL (getlogin_r, int, (char *name, size_t size) |
19109 |
+ _GL_ARG_NONNULL ((1))); |
19110 |
+_GL_CXXALIAS_RPL (getlogin_r, int, (char *name, size_t size)); |
19111 |
+# else |
19112 |
+# if !1 |
19113 |
+_GL_FUNCDECL_SYS (getlogin_r, int, (char *name, size_t size) |
19114 |
+ _GL_ARG_NONNULL ((1))); |
19115 |
+# endif |
19116 |
+/* Need to cast, because on Solaris 10 systems, the second argument is |
19117 |
+ int size. */ |
19118 |
+_GL_CXXALIAS_SYS_CAST (getlogin_r, int, (char *name, size_t size)); |
19119 |
+# endif |
19120 |
+_GL_CXXALIASWARN (getlogin_r); |
19121 |
+#elif defined GNULIB_POSIXCHECK |
19122 |
+# undef getlogin_r |
19123 |
+# if HAVE_RAW_DECL_GETLOGIN_R |
19124 |
+_GL_WARN_ON_USE (getlogin_r, "getlogin_r is unportable - " |
19125 |
+ "use gnulib module getlogin_r for portability"); |
19126 |
+# endif |
19127 |
+#endif |
19128 |
+ |
19129 |
+ |
19130 |
+#if 0 |
19131 |
+# if 0 |
19132 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
19133 |
+# define getpagesize rpl_getpagesize |
19134 |
+# endif |
19135 |
+_GL_FUNCDECL_RPL (getpagesize, int, (void)); |
19136 |
+_GL_CXXALIAS_RPL (getpagesize, int, (void)); |
19137 |
+# else |
19138 |
+/* On HP-UX, getpagesize exists, but it is not declared in <unistd.h> even if |
19139 |
+ the compiler options -D_HPUX_SOURCE -D_XOPEN_SOURCE=600 are used. */ |
19140 |
+# if defined __hpux |
19141 |
+_GL_FUNCDECL_SYS (getpagesize, int, (void)); |
19142 |
+# endif |
19143 |
+# if !1 |
19144 |
+# if !defined getpagesize |
19145 |
+/* This is for POSIX systems. */ |
19146 |
+# if !defined _gl_getpagesize && defined _SC_PAGESIZE |
19147 |
+# if ! (defined __VMS && __VMS_VER < 70000000) |
19148 |
+# define _gl_getpagesize() sysconf (_SC_PAGESIZE) |
19149 |
+# endif |
19150 |
+# endif |
19151 |
+/* This is for older VMS. */ |
19152 |
+# if !defined _gl_getpagesize && defined __VMS |
19153 |
+# ifdef __ALPHA |
19154 |
+# define _gl_getpagesize() 8192 |
19155 |
+# else |
19156 |
+# define _gl_getpagesize() 512 |
19157 |
+# endif |
19158 |
+# endif |
19159 |
+/* This is for BeOS. */ |
19160 |
+# if !defined _gl_getpagesize && 0 |
19161 |
+# include <OS.h> |
19162 |
+# if defined B_PAGE_SIZE |
19163 |
+# define _gl_getpagesize() B_PAGE_SIZE |
19164 |
+# endif |
19165 |
+# endif |
19166 |
+/* This is for AmigaOS4.0. */ |
19167 |
+# if !defined _gl_getpagesize && defined __amigaos4__ |
19168 |
+# define _gl_getpagesize() 2048 |
19169 |
+# endif |
19170 |
+/* This is for older Unix systems. */ |
19171 |
+# if !defined _gl_getpagesize && 0 |
19172 |
+# include <sys/param.h> |
19173 |
+# ifdef EXEC_PAGESIZE |
19174 |
+# define _gl_getpagesize() EXEC_PAGESIZE |
19175 |
+# else |
19176 |
+# ifdef NBPG |
19177 |
+# ifndef CLSIZE |
19178 |
+# define CLSIZE 1 |
19179 |
+# endif |
19180 |
+# define _gl_getpagesize() (NBPG * CLSIZE) |
19181 |
+# else |
19182 |
+# ifdef NBPC |
19183 |
+# define _gl_getpagesize() NBPC |
19184 |
+# endif |
19185 |
+# endif |
19186 |
+# endif |
19187 |
+# endif |
19188 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
19189 |
+# define getpagesize() _gl_getpagesize () |
19190 |
+# else |
19191 |
+# if !GNULIB_defined_getpagesize_function |
19192 |
+_GL_UNISTD_INLINE int |
19193 |
+getpagesize () |
19194 |
+{ |
19195 |
+ return _gl_getpagesize (); |
19196 |
+} |
19197 |
+# define GNULIB_defined_getpagesize_function 1 |
19198 |
+# endif |
19199 |
+# endif |
19200 |
+# endif |
19201 |
+# endif |
19202 |
+/* Need to cast, because on Cygwin 1.5.x systems, the return type is size_t. */ |
19203 |
+_GL_CXXALIAS_SYS_CAST (getpagesize, int, (void)); |
19204 |
+# endif |
19205 |
+# if 1 |
19206 |
+_GL_CXXALIASWARN (getpagesize); |
19207 |
+# endif |
19208 |
+#elif defined GNULIB_POSIXCHECK |
19209 |
+# undef getpagesize |
19210 |
+# if HAVE_RAW_DECL_GETPAGESIZE |
19211 |
+_GL_WARN_ON_USE (getpagesize, "getpagesize is unportable - " |
19212 |
+ "use gnulib module getpagesize for portability"); |
19213 |
+# endif |
19214 |
+#endif |
19215 |
+ |
19216 |
+ |
19217 |
+#if 0 |
19218 |
+/* Function getpass() from module 'getpass': |
19219 |
+ Read a password from /dev/tty or stdin. |
19220 |
+ Function getpass() from module 'getpass-gnu': |
19221 |
+ Read a password of arbitrary length from /dev/tty or stdin. */ |
19222 |
+# if (0 && 0) \ |
19223 |
+ || (0 && 0) |
19224 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
19225 |
+# undef getpass |
19226 |
+# define getpass rpl_getpass |
19227 |
+# endif |
19228 |
+_GL_FUNCDECL_RPL (getpass, char *, (const char *prompt) |
19229 |
+ _GL_ARG_NONNULL ((1))); |
19230 |
+_GL_CXXALIAS_RPL (getpass, char *, (const char *prompt)); |
19231 |
+# else |
19232 |
+# if !1 |
19233 |
+_GL_FUNCDECL_SYS (getpass, char *, (const char *prompt) |
19234 |
+ _GL_ARG_NONNULL ((1))); |
19235 |
+# endif |
19236 |
+_GL_CXXALIAS_SYS (getpass, char *, (const char *prompt)); |
19237 |
+# endif |
19238 |
+_GL_CXXALIASWARN (getpass); |
19239 |
+#elif defined GNULIB_POSIXCHECK |
19240 |
+# undef getpass |
19241 |
+# if HAVE_RAW_DECL_GETPASS |
19242 |
+_GL_WARN_ON_USE (getpass, "getpass is unportable - " |
19243 |
+ "use gnulib module getpass or getpass-gnu for portability"); |
19244 |
+# endif |
19245 |
+#endif |
19246 |
+ |
19247 |
+ |
19248 |
+#if 1 |
19249 |
+/* On native Windows, map 'getpid' to '_getpid', so that -loldnames is not |
19250 |
+ required. In C++ with GNULIB_NAMESPACE, avoid differences between |
19251 |
+ platforms by defining GNULIB_NAMESPACE::getpid always. */ |
19252 |
+# if defined _WIN32 && !defined __CYGWIN__ |
19253 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
19254 |
+# undef getpid |
19255 |
+# define getpid _getpid |
19256 |
+# endif |
19257 |
+_GL_CXXALIAS_MDA (getpid, int, (void)); |
19258 |
+# else |
19259 |
+_GL_CXXALIAS_SYS (getpid, pid_t, (void)); |
19260 |
+# endif |
19261 |
+_GL_CXXALIASWARN (getpid); |
19262 |
+#endif |
19263 |
+ |
19264 |
+ |
19265 |
+#if 0 |
19266 |
+/* Return the next valid login shell on the system, or NULL when the end of |
19267 |
+ the list has been reached. */ |
19268 |
+# if !1 |
19269 |
+_GL_FUNCDECL_SYS (getusershell, char *, (void)); |
19270 |
+# endif |
19271 |
+_GL_CXXALIAS_SYS (getusershell, char *, (void)); |
19272 |
+_GL_CXXALIASWARN (getusershell); |
19273 |
+#elif defined GNULIB_POSIXCHECK |
19274 |
+# undef getusershell |
19275 |
+# if HAVE_RAW_DECL_GETUSERSHELL |
19276 |
+_GL_WARN_ON_USE (getusershell, "getusershell is unportable - " |
19277 |
+ "use gnulib module getusershell for portability"); |
19278 |
+# endif |
19279 |
+#endif |
19280 |
+ |
19281 |
+#if 0 |
19282 |
+/* Rewind to pointer that is advanced at each getusershell() call. */ |
19283 |
+# if !1 |
19284 |
+_GL_FUNCDECL_SYS (setusershell, void, (void)); |
19285 |
+# endif |
19286 |
+_GL_CXXALIAS_SYS (setusershell, void, (void)); |
19287 |
+_GL_CXXALIASWARN (setusershell); |
19288 |
+#elif defined GNULIB_POSIXCHECK |
19289 |
+# undef setusershell |
19290 |
+# if HAVE_RAW_DECL_SETUSERSHELL |
19291 |
+_GL_WARN_ON_USE (setusershell, "setusershell is unportable - " |
19292 |
+ "use gnulib module getusershell for portability"); |
19293 |
+# endif |
19294 |
+#endif |
19295 |
+ |
19296 |
+#if 0 |
19297 |
+/* Free the pointer that is advanced at each getusershell() call and |
19298 |
+ associated resources. */ |
19299 |
+# if !1 |
19300 |
+_GL_FUNCDECL_SYS (endusershell, void, (void)); |
19301 |
+# endif |
19302 |
+_GL_CXXALIAS_SYS (endusershell, void, (void)); |
19303 |
+_GL_CXXALIASWARN (endusershell); |
19304 |
+#elif defined GNULIB_POSIXCHECK |
19305 |
+# undef endusershell |
19306 |
+# if HAVE_RAW_DECL_ENDUSERSHELL |
19307 |
+_GL_WARN_ON_USE (endusershell, "endusershell is unportable - " |
19308 |
+ "use gnulib module getusershell for portability"); |
19309 |
+# endif |
19310 |
+#endif |
19311 |
+ |
19312 |
+ |
19313 |
+#if 1 |
19314 |
+/* Determine whether group id is in calling user's group list. */ |
19315 |
+# if !0 |
19316 |
+_GL_FUNCDECL_SYS (group_member, int, (gid_t gid)); |
19317 |
+# endif |
19318 |
+_GL_CXXALIAS_SYS (group_member, int, (gid_t gid)); |
19319 |
+_GL_CXXALIASWARN (group_member); |
19320 |
+#elif defined GNULIB_POSIXCHECK |
19321 |
+# undef group_member |
19322 |
+# if HAVE_RAW_DECL_GROUP_MEMBER |
19323 |
+_GL_WARN_ON_USE (group_member, "group_member is unportable - " |
19324 |
+ "use gnulib module group-member for portability"); |
19325 |
+# endif |
19326 |
+#endif |
19327 |
+ |
19328 |
+ |
19329 |
+#if 0 |
19330 |
+# if 0 |
19331 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
19332 |
+# undef isatty |
19333 |
+# define isatty rpl_isatty |
19334 |
+# endif |
19335 |
+# define GNULIB_defined_isatty 1 |
19336 |
+_GL_FUNCDECL_RPL (isatty, int, (int fd)); |
19337 |
+_GL_CXXALIAS_RPL (isatty, int, (int fd)); |
19338 |
+# elif defined _WIN32 && !defined __CYGWIN__ |
19339 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
19340 |
+# undef isatty |
19341 |
+# define isatty _isatty |
19342 |
+# endif |
19343 |
+_GL_CXXALIAS_MDA (isatty, int, (int fd)); |
19344 |
+# else |
19345 |
+_GL_CXXALIAS_SYS (isatty, int, (int fd)); |
19346 |
+# endif |
19347 |
+_GL_CXXALIASWARN (isatty); |
19348 |
+#elif defined GNULIB_POSIXCHECK |
19349 |
+# undef isatty |
19350 |
+# if HAVE_RAW_DECL_ISATTY |
19351 |
+_GL_WARN_ON_USE (isatty, "isatty has portability problems on native Windows - " |
19352 |
+ "use gnulib module isatty for portability"); |
19353 |
+# endif |
19354 |
+#elif 1 |
19355 |
+/* On native Windows, map 'isatty' to '_isatty', so that -loldnames is not |
19356 |
+ required. In C++ with GNULIB_NAMESPACE, avoid differences between |
19357 |
+ platforms by defining GNULIB_NAMESPACE::isatty always. */ |
19358 |
+# if defined _WIN32 && !defined __CYGWIN__ |
19359 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
19360 |
+# undef isatty |
19361 |
+# define isatty _isatty |
19362 |
+# endif |
19363 |
+_GL_CXXALIAS_MDA (isatty, int, (int fd)); |
19364 |
+# else |
19365 |
+_GL_CXXALIAS_SYS (isatty, int, (int fd)); |
19366 |
+# endif |
19367 |
+_GL_CXXALIASWARN (isatty); |
19368 |
+#endif |
19369 |
+ |
19370 |
+ |
19371 |
+#if 0 |
19372 |
+/* Change the owner of FILE to UID (if UID is not -1) and the group of FILE |
19373 |
+ to GID (if GID is not -1). Do not follow symbolic links. |
19374 |
+ Return 0 if successful, otherwise -1 and errno set. |
19375 |
+ See the POSIX:2008 specification |
19376 |
+ <https://pubs.opengroup.org/onlinepubs/9699919799/functions/lchown.html>. */ |
19377 |
+# if 0 |
19378 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
19379 |
+# undef lchown |
19380 |
+# define lchown rpl_lchown |
19381 |
+# endif |
19382 |
+_GL_FUNCDECL_RPL (lchown, int, (char const *file, uid_t owner, gid_t group) |
19383 |
+ _GL_ARG_NONNULL ((1))); |
19384 |
+_GL_CXXALIAS_RPL (lchown, int, (char const *file, uid_t owner, gid_t group)); |
19385 |
+# else |
19386 |
+# if !1 |
19387 |
+_GL_FUNCDECL_SYS (lchown, int, (char const *file, uid_t owner, gid_t group) |
19388 |
+ _GL_ARG_NONNULL ((1))); |
19389 |
+# endif |
19390 |
+_GL_CXXALIAS_SYS (lchown, int, (char const *file, uid_t owner, gid_t group)); |
19391 |
+# endif |
19392 |
+_GL_CXXALIASWARN (lchown); |
19393 |
+#elif defined GNULIB_POSIXCHECK |
19394 |
+# undef lchown |
19395 |
+# if HAVE_RAW_DECL_LCHOWN |
19396 |
+_GL_WARN_ON_USE (lchown, "lchown is unportable to pre-POSIX.1-2001 systems - " |
19397 |
+ "use gnulib module lchown for portability"); |
19398 |
+# endif |
19399 |
+#endif |
19400 |
+ |
19401 |
+ |
19402 |
+#if 0 |
19403 |
+/* Create a new hard link for an existing file. |
19404 |
+ Return 0 if successful, otherwise -1 and errno set. |
19405 |
+ See POSIX:2008 specification |
19406 |
+ <https://pubs.opengroup.org/onlinepubs/9699919799/functions/link.html>. */ |
19407 |
+# if 0 |
19408 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
19409 |
+# define link rpl_link |
19410 |
+# endif |
19411 |
+_GL_FUNCDECL_RPL (link, int, (const char *path1, const char *path2) |
19412 |
+ _GL_ARG_NONNULL ((1, 2))); |
19413 |
+_GL_CXXALIAS_RPL (link, int, (const char *path1, const char *path2)); |
19414 |
+# else |
19415 |
+# if !1 |
19416 |
+_GL_FUNCDECL_SYS (link, int, (const char *path1, const char *path2) |
19417 |
+ _GL_ARG_NONNULL ((1, 2))); |
19418 |
+# endif |
19419 |
+_GL_CXXALIAS_SYS (link, int, (const char *path1, const char *path2)); |
19420 |
+# endif |
19421 |
+_GL_CXXALIASWARN (link); |
19422 |
+#elif defined GNULIB_POSIXCHECK |
19423 |
+# undef link |
19424 |
+# if HAVE_RAW_DECL_LINK |
19425 |
+_GL_WARN_ON_USE (link, "link is unportable - " |
19426 |
+ "use gnulib module link for portability"); |
19427 |
+# endif |
19428 |
+#endif |
19429 |
+ |
19430 |
+ |
19431 |
+#if 0 |
19432 |
+/* Create a new hard link for an existing file, relative to two |
19433 |
+ directories. FLAG controls whether symlinks are followed. |
19434 |
+ Return 0 if successful, otherwise -1 and errno set. */ |
19435 |
+# if 0 |
19436 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
19437 |
+# undef linkat |
19438 |
+# define linkat rpl_linkat |
19439 |
+# endif |
19440 |
+_GL_FUNCDECL_RPL (linkat, int, |
19441 |
+ (int fd1, const char *path1, int fd2, const char *path2, |
19442 |
+ int flag) |
19443 |
+ _GL_ARG_NONNULL ((2, 4))); |
19444 |
+_GL_CXXALIAS_RPL (linkat, int, |
19445 |
+ (int fd1, const char *path1, int fd2, const char *path2, |
19446 |
+ int flag)); |
19447 |
+# else |
19448 |
+# if !1 |
19449 |
+_GL_FUNCDECL_SYS (linkat, int, |
19450 |
+ (int fd1, const char *path1, int fd2, const char *path2, |
19451 |
+ int flag) |
19452 |
+ _GL_ARG_NONNULL ((2, 4))); |
19453 |
+# endif |
19454 |
+_GL_CXXALIAS_SYS (linkat, int, |
19455 |
+ (int fd1, const char *path1, int fd2, const char *path2, |
19456 |
+ int flag)); |
19457 |
+# endif |
19458 |
+_GL_CXXALIASWARN (linkat); |
19459 |
+#elif defined GNULIB_POSIXCHECK |
19460 |
+# undef linkat |
19461 |
+# if HAVE_RAW_DECL_LINKAT |
19462 |
+_GL_WARN_ON_USE (linkat, "linkat is unportable - " |
19463 |
+ "use gnulib module linkat for portability"); |
19464 |
+# endif |
19465 |
+#endif |
19466 |
+ |
19467 |
+ |
19468 |
+#if 0 |
19469 |
+/* Set the offset of FD relative to SEEK_SET, SEEK_CUR, or SEEK_END. |
19470 |
+ Return the new offset if successful, otherwise -1 and errno set. |
19471 |
+ See the POSIX:2008 specification |
19472 |
+ <https://pubs.opengroup.org/onlinepubs/9699919799/functions/lseek.html>. */ |
19473 |
+# if 0 |
19474 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
19475 |
+# define lseek rpl_lseek |
19476 |
+# endif |
19477 |
+_GL_FUNCDECL_RPL (lseek, off_t, (int fd, off_t offset, int whence)); |
19478 |
+_GL_CXXALIAS_RPL (lseek, off_t, (int fd, off_t offset, int whence)); |
19479 |
+# elif defined _WIN32 && !defined __CYGWIN__ |
19480 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
19481 |
+# undef lseek |
19482 |
+# define lseek _lseek |
19483 |
+# endif |
19484 |
+_GL_CXXALIAS_MDA (lseek, off_t, (int fd, off_t offset, int whence)); |
19485 |
+# else |
19486 |
+_GL_CXXALIAS_SYS (lseek, off_t, (int fd, off_t offset, int whence)); |
19487 |
+# endif |
19488 |
+_GL_CXXALIASWARN (lseek); |
19489 |
+#elif defined GNULIB_POSIXCHECK |
19490 |
+# undef lseek |
19491 |
+# if HAVE_RAW_DECL_LSEEK |
19492 |
+_GL_WARN_ON_USE (lseek, "lseek does not fail with ESPIPE on pipes on some " |
19493 |
+ "systems - use gnulib module lseek for portability"); |
19494 |
+# endif |
19495 |
+#elif 1 |
19496 |
+/* On native Windows, map 'lseek' to '_lseek', so that -loldnames is not |
19497 |
+ required. In C++ with GNULIB_NAMESPACE, avoid differences between |
19498 |
+ platforms by defining GNULIB_NAMESPACE::lseek always. */ |
19499 |
+# if defined _WIN32 && !defined __CYGWIN__ |
19500 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
19501 |
+# undef lseek |
19502 |
+# define lseek _lseek |
19503 |
+# endif |
19504 |
+_GL_CXXALIAS_MDA (lseek, long, (int fd, long offset, int whence)); |
19505 |
+# else |
19506 |
+_GL_CXXALIAS_SYS (lseek, off_t, (int fd, off_t offset, int whence)); |
19507 |
+# endif |
19508 |
+_GL_CXXALIASWARN (lseek); |
19509 |
+#endif |
19510 |
+ |
19511 |
+ |
19512 |
+#if 1 |
19513 |
+/* Create a pipe, defaulting to O_BINARY mode. |
19514 |
+ Store the read-end as fd[0] and the write-end as fd[1]. |
19515 |
+ Return 0 upon success, or -1 with errno set upon failure. */ |
19516 |
+# if !1 |
19517 |
+_GL_FUNCDECL_SYS (pipe, int, (int fd[2]) _GL_ARG_NONNULL ((1))); |
19518 |
+# endif |
19519 |
+_GL_CXXALIAS_SYS (pipe, int, (int fd[2])); |
19520 |
+_GL_CXXALIASWARN (pipe); |
19521 |
+#elif defined GNULIB_POSIXCHECK |
19522 |
+# undef pipe |
19523 |
+# if HAVE_RAW_DECL_PIPE |
19524 |
+_GL_WARN_ON_USE (pipe, "pipe is unportable - " |
19525 |
+ "use gnulib module pipe-posix for portability"); |
19526 |
+# endif |
19527 |
+#endif |
19528 |
+ |
19529 |
+ |
19530 |
+#if 0 |
19531 |
+/* Create a pipe, applying the given flags when opening the read-end of the |
19532 |
+ pipe and the write-end of the pipe. |
19533 |
+ The flags are a bitmask, possibly including O_CLOEXEC (defined in <fcntl.h>) |
19534 |
+ and O_TEXT, O_BINARY (defined in "binary-io.h"). |
19535 |
+ Store the read-end as fd[0] and the write-end as fd[1]. |
19536 |
+ Return 0 upon success, or -1 with errno set upon failure. |
19537 |
+ See also the Linux man page at |
19538 |
+ <https://www.kernel.org/doc/man-pages/online/pages/man2/pipe2.2.html>. */ |
19539 |
+# if 1 |
19540 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
19541 |
+# define pipe2 rpl_pipe2 |
19542 |
+# endif |
19543 |
+_GL_FUNCDECL_RPL (pipe2, int, (int fd[2], int flags) _GL_ARG_NONNULL ((1))); |
19544 |
+_GL_CXXALIAS_RPL (pipe2, int, (int fd[2], int flags)); |
19545 |
+# else |
19546 |
+_GL_FUNCDECL_SYS (pipe2, int, (int fd[2], int flags) _GL_ARG_NONNULL ((1))); |
19547 |
+_GL_CXXALIAS_SYS (pipe2, int, (int fd[2], int flags)); |
19548 |
+# endif |
19549 |
+_GL_CXXALIASWARN (pipe2); |
19550 |
+#elif defined GNULIB_POSIXCHECK |
19551 |
+# undef pipe2 |
19552 |
+# if HAVE_RAW_DECL_PIPE2 |
19553 |
+_GL_WARN_ON_USE (pipe2, "pipe2 is unportable - " |
19554 |
+ "use gnulib module pipe2 for portability"); |
19555 |
+# endif |
19556 |
+#endif |
19557 |
+ |
19558 |
+ |
19559 |
+#if 0 |
19560 |
+/* Read at most BUFSIZE bytes from FD into BUF, starting at OFFSET. |
19561 |
+ Return the number of bytes placed into BUF if successful, otherwise |
19562 |
+ set errno and return -1. 0 indicates EOF. |
19563 |
+ See the POSIX:2008 specification |
19564 |
+ <https://pubs.opengroup.org/onlinepubs/9699919799/functions/pread.html>. */ |
19565 |
+# if 0 |
19566 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
19567 |
+# undef pread |
19568 |
+# define pread rpl_pread |
19569 |
+# endif |
19570 |
+_GL_FUNCDECL_RPL (pread, ssize_t, |
19571 |
+ (int fd, void *buf, size_t bufsize, off_t offset) |
19572 |
+ _GL_ARG_NONNULL ((2))); |
19573 |
+_GL_CXXALIAS_RPL (pread, ssize_t, |
19574 |
+ (int fd, void *buf, size_t bufsize, off_t offset)); |
19575 |
+# else |
19576 |
+# if !1 |
19577 |
+_GL_FUNCDECL_SYS (pread, ssize_t, |
19578 |
+ (int fd, void *buf, size_t bufsize, off_t offset) |
19579 |
+ _GL_ARG_NONNULL ((2))); |
19580 |
+# endif |
19581 |
+_GL_CXXALIAS_SYS (pread, ssize_t, |
19582 |
+ (int fd, void *buf, size_t bufsize, off_t offset)); |
19583 |
+# endif |
19584 |
+_GL_CXXALIASWARN (pread); |
19585 |
+#elif defined GNULIB_POSIXCHECK |
19586 |
+# undef pread |
19587 |
+# if HAVE_RAW_DECL_PREAD |
19588 |
+_GL_WARN_ON_USE (pread, "pread is unportable - " |
19589 |
+ "use gnulib module pread for portability"); |
19590 |
+# endif |
19591 |
+#endif |
19592 |
+ |
19593 |
+ |
19594 |
+#if 0 |
19595 |
+/* Write at most BUFSIZE bytes from BUF into FD, starting at OFFSET. |
19596 |
+ Return the number of bytes written if successful, otherwise |
19597 |
+ set errno and return -1. 0 indicates nothing written. See the |
19598 |
+ POSIX:2008 specification |
19599 |
+ <https://pubs.opengroup.org/onlinepubs/9699919799/functions/pwrite.html>. */ |
19600 |
+# if 0 |
19601 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
19602 |
+# undef pwrite |
19603 |
+# define pwrite rpl_pwrite |
19604 |
+# endif |
19605 |
+_GL_FUNCDECL_RPL (pwrite, ssize_t, |
19606 |
+ (int fd, const void *buf, size_t bufsize, off_t offset) |
19607 |
+ _GL_ARG_NONNULL ((2))); |
19608 |
+_GL_CXXALIAS_RPL (pwrite, ssize_t, |
19609 |
+ (int fd, const void *buf, size_t bufsize, off_t offset)); |
19610 |
+# else |
19611 |
+# if !1 |
19612 |
+_GL_FUNCDECL_SYS (pwrite, ssize_t, |
19613 |
+ (int fd, const void *buf, size_t bufsize, off_t offset) |
19614 |
+ _GL_ARG_NONNULL ((2))); |
19615 |
+# endif |
19616 |
+_GL_CXXALIAS_SYS (pwrite, ssize_t, |
19617 |
+ (int fd, const void *buf, size_t bufsize, off_t offset)); |
19618 |
+# endif |
19619 |
+_GL_CXXALIASWARN (pwrite); |
19620 |
+#elif defined GNULIB_POSIXCHECK |
19621 |
+# undef pwrite |
19622 |
+# if HAVE_RAW_DECL_PWRITE |
19623 |
+_GL_WARN_ON_USE (pwrite, "pwrite is unportable - " |
19624 |
+ "use gnulib module pwrite for portability"); |
19625 |
+# endif |
19626 |
+#endif |
19627 |
+ |
19628 |
+ |
19629 |
+#if 0 |
19630 |
+/* Read up to COUNT bytes from file descriptor FD into the buffer starting |
19631 |
+ at BUF. See the POSIX:2008 specification |
19632 |
+ <https://pubs.opengroup.org/onlinepubs/9699919799/functions/read.html>. */ |
19633 |
+# if 0 |
19634 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
19635 |
+# undef read |
19636 |
+# define read rpl_read |
19637 |
+# endif |
19638 |
+_GL_FUNCDECL_RPL (read, ssize_t, (int fd, void *buf, size_t count) |
19639 |
+ _GL_ARG_NONNULL ((2))); |
19640 |
+_GL_CXXALIAS_RPL (read, ssize_t, (int fd, void *buf, size_t count)); |
19641 |
+# elif defined _WIN32 && !defined __CYGWIN__ |
19642 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
19643 |
+# undef read |
19644 |
+# define read _read |
19645 |
+# endif |
19646 |
+_GL_CXXALIAS_MDA (read, ssize_t, (int fd, void *buf, size_t count)); |
19647 |
+# else |
19648 |
+_GL_CXXALIAS_SYS (read, ssize_t, (int fd, void *buf, size_t count)); |
19649 |
+# endif |
19650 |
+_GL_CXXALIASWARN (read); |
19651 |
+#elif 1 |
19652 |
+/* On native Windows, map 'read' to '_read', so that -loldnames is not |
19653 |
+ required. In C++ with GNULIB_NAMESPACE, avoid differences between |
19654 |
+ platforms by defining GNULIB_NAMESPACE::read always. */ |
19655 |
+# if defined _WIN32 && !defined __CYGWIN__ |
19656 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
19657 |
+# undef read |
19658 |
+# define read _read |
19659 |
+# endif |
19660 |
+# ifdef __MINGW32__ |
19661 |
+_GL_CXXALIAS_MDA (read, int, (int fd, void *buf, unsigned int count)); |
19662 |
+# else |
19663 |
+_GL_CXXALIAS_MDA (read, ssize_t, (int fd, void *buf, unsigned int count)); |
19664 |
+# endif |
19665 |
+# else |
19666 |
+_GL_CXXALIAS_SYS (read, ssize_t, (int fd, void *buf, size_t count)); |
19667 |
+# endif |
19668 |
+_GL_CXXALIASWARN (read); |
19669 |
+#endif |
19670 |
+ |
19671 |
+ |
19672 |
+#if 1 |
19673 |
+/* Read the contents of the symbolic link FILE and place the first BUFSIZE |
19674 |
+ bytes of it into BUF. Return the number of bytes placed into BUF if |
19675 |
+ successful, otherwise -1 and errno set. |
19676 |
+ See the POSIX:2008 specification |
19677 |
+ <https://pubs.opengroup.org/onlinepubs/9699919799/functions/readlink.html>. */ |
19678 |
+# if 0 |
19679 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
19680 |
+# define readlink rpl_readlink |
19681 |
+# endif |
19682 |
+_GL_FUNCDECL_RPL (readlink, ssize_t, |
19683 |
+ (const char *restrict file, |
19684 |
+ char *restrict buf, size_t bufsize) |
19685 |
+ _GL_ARG_NONNULL ((1, 2))); |
19686 |
+_GL_CXXALIAS_RPL (readlink, ssize_t, |
19687 |
+ (const char *restrict file, |
19688 |
+ char *restrict buf, size_t bufsize)); |
19689 |
+# else |
19690 |
+# if !1 |
19691 |
+_GL_FUNCDECL_SYS (readlink, ssize_t, |
19692 |
+ (const char *restrict file, |
19693 |
+ char *restrict buf, size_t bufsize) |
19694 |
+ _GL_ARG_NONNULL ((1, 2))); |
19695 |
+# endif |
19696 |
+_GL_CXXALIAS_SYS (readlink, ssize_t, |
19697 |
+ (const char *restrict file, |
19698 |
+ char *restrict buf, size_t bufsize)); |
19699 |
+# endif |
19700 |
+_GL_CXXALIASWARN (readlink); |
19701 |
+#elif defined GNULIB_POSIXCHECK |
19702 |
+# undef readlink |
19703 |
+# if HAVE_RAW_DECL_READLINK |
19704 |
+_GL_WARN_ON_USE (readlink, "readlink is unportable - " |
19705 |
+ "use gnulib module readlink for portability"); |
19706 |
+# endif |
19707 |
+#endif |
19708 |
+ |
19709 |
+ |
19710 |
+#if 1 |
19711 |
+# if 0 |
19712 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
19713 |
+# define readlinkat rpl_readlinkat |
19714 |
+# endif |
19715 |
+_GL_FUNCDECL_RPL (readlinkat, ssize_t, |
19716 |
+ (int fd, char const *restrict file, |
19717 |
+ char *restrict buf, size_t len) |
19718 |
+ _GL_ARG_NONNULL ((2, 3))); |
19719 |
+_GL_CXXALIAS_RPL (readlinkat, ssize_t, |
19720 |
+ (int fd, char const *restrict file, |
19721 |
+ char *restrict buf, size_t len)); |
19722 |
+# else |
19723 |
+# if !1 |
19724 |
+_GL_FUNCDECL_SYS (readlinkat, ssize_t, |
19725 |
+ (int fd, char const *restrict file, |
19726 |
+ char *restrict buf, size_t len) |
19727 |
+ _GL_ARG_NONNULL ((2, 3))); |
19728 |
+# endif |
19729 |
+_GL_CXXALIAS_SYS (readlinkat, ssize_t, |
19730 |
+ (int fd, char const *restrict file, |
19731 |
+ char *restrict buf, size_t len)); |
19732 |
+# endif |
19733 |
+_GL_CXXALIASWARN (readlinkat); |
19734 |
+#elif defined GNULIB_POSIXCHECK |
19735 |
+# undef readlinkat |
19736 |
+# if HAVE_RAW_DECL_READLINKAT |
19737 |
+_GL_WARN_ON_USE (readlinkat, "readlinkat is not portable - " |
19738 |
+ "use gnulib module readlinkat for portability"); |
19739 |
+# endif |
19740 |
+#endif |
19741 |
+ |
19742 |
+ |
19743 |
+#if 1 |
19744 |
+/* Remove the directory DIR. */ |
19745 |
+# if 0 |
19746 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
19747 |
+# define rmdir rpl_rmdir |
19748 |
+# endif |
19749 |
+_GL_FUNCDECL_RPL (rmdir, int, (char const *name) _GL_ARG_NONNULL ((1))); |
19750 |
+_GL_CXXALIAS_RPL (rmdir, int, (char const *name)); |
19751 |
+# elif defined _WIN32 && !defined __CYGWIN__ |
19752 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
19753 |
+# undef rmdir |
19754 |
+# define rmdir _rmdir |
19755 |
+# endif |
19756 |
+_GL_CXXALIAS_MDA (rmdir, int, (char const *name)); |
19757 |
+# else |
19758 |
+_GL_CXXALIAS_SYS (rmdir, int, (char const *name)); |
19759 |
+# endif |
19760 |
+_GL_CXXALIASWARN (rmdir); |
19761 |
+#elif defined GNULIB_POSIXCHECK |
19762 |
+# undef rmdir |
19763 |
+# if HAVE_RAW_DECL_RMDIR |
19764 |
+_GL_WARN_ON_USE (rmdir, "rmdir is unportable - " |
19765 |
+ "use gnulib module rmdir for portability"); |
19766 |
+# endif |
19767 |
+#elif 1 |
19768 |
+/* On native Windows, map 'rmdir' to '_rmdir', so that -loldnames is not |
19769 |
+ required. In C++ with GNULIB_NAMESPACE, avoid differences between |
19770 |
+ platforms by defining GNULIB_NAMESPACE::rmdir always. */ |
19771 |
+# if defined _WIN32 && !defined __CYGWIN__ |
19772 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
19773 |
+# undef rmdir |
19774 |
+# define rmdir _rmdir |
19775 |
+# endif |
19776 |
+_GL_CXXALIAS_MDA (rmdir, int, (char const *name)); |
19777 |
+# else |
19778 |
+_GL_CXXALIAS_SYS (rmdir, int, (char const *name)); |
19779 |
+# endif |
19780 |
+_GL_CXXALIASWARN (rmdir); |
19781 |
+#endif |
19782 |
+ |
19783 |
+ |
19784 |
+#if 0 |
19785 |
+/* Set the host name of the machine. |
19786 |
+ The host name may or may not be fully qualified. |
19787 |
+ |
19788 |
+ Put LEN bytes of NAME into the host name. |
19789 |
+ Return 0 if successful, otherwise, set errno and return -1. |
19790 |
+ |
19791 |
+ Platforms with no ability to set the hostname return -1 and set |
19792 |
+ errno = ENOSYS. */ |
19793 |
+# if !1 || !1 |
19794 |
+_GL_FUNCDECL_SYS (sethostname, int, (const char *name, size_t len) |
19795 |
+ _GL_ARG_NONNULL ((1))); |
19796 |
+# endif |
19797 |
+/* Need to cast, because on Solaris 11 2011-10, Mac OS X 10.5, IRIX 6.5 |
19798 |
+ and FreeBSD 6.4 the second parameter is int. On Solaris 11 |
19799 |
+ 2011-10, the first parameter is not const. */ |
19800 |
+_GL_CXXALIAS_SYS_CAST (sethostname, int, (const char *name, size_t len)); |
19801 |
+_GL_CXXALIASWARN (sethostname); |
19802 |
+#elif defined GNULIB_POSIXCHECK |
19803 |
+# undef sethostname |
19804 |
+# if HAVE_RAW_DECL_SETHOSTNAME |
19805 |
+_GL_WARN_ON_USE (sethostname, "sethostname is unportable - " |
19806 |
+ "use gnulib module sethostname for portability"); |
19807 |
+# endif |
19808 |
+#endif |
19809 |
+ |
19810 |
+ |
19811 |
+#if 0 |
19812 |
+/* Pause the execution of the current thread for N seconds. |
19813 |
+ Returns the number of seconds left to sleep. |
19814 |
+ See the POSIX:2008 specification |
19815 |
+ <https://pubs.opengroup.org/onlinepubs/9699919799/functions/sleep.html>. */ |
19816 |
+# if 0 |
19817 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
19818 |
+# undef sleep |
19819 |
+# define sleep rpl_sleep |
19820 |
+# endif |
19821 |
+_GL_FUNCDECL_RPL (sleep, unsigned int, (unsigned int n)); |
19822 |
+_GL_CXXALIAS_RPL (sleep, unsigned int, (unsigned int n)); |
19823 |
+# else |
19824 |
+# if !1 |
19825 |
+_GL_FUNCDECL_SYS (sleep, unsigned int, (unsigned int n)); |
19826 |
+# endif |
19827 |
+_GL_CXXALIAS_SYS (sleep, unsigned int, (unsigned int n)); |
19828 |
+# endif |
19829 |
+_GL_CXXALIASWARN (sleep); |
19830 |
+#elif defined GNULIB_POSIXCHECK |
19831 |
+# undef sleep |
19832 |
+# if HAVE_RAW_DECL_SLEEP |
19833 |
+_GL_WARN_ON_USE (sleep, "sleep is unportable - " |
19834 |
+ "use gnulib module sleep for portability"); |
19835 |
+# endif |
19836 |
+#endif |
19837 |
+ |
19838 |
+ |
19839 |
+#if 1 |
19840 |
+/* On native Windows, map 'swab' to '_swab', so that -loldnames is not |
19841 |
+ required. In C++ with GNULIB_NAMESPACE, avoid differences between |
19842 |
+ platforms by defining GNULIB_NAMESPACE::swab always. */ |
19843 |
+# if defined _WIN32 && !defined __CYGWIN__ |
19844 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
19845 |
+# undef swab |
19846 |
+# define swab _swab |
19847 |
+# endif |
19848 |
+/* Need to cast, because in old mingw the arguments are |
19849 |
+ (const char *from, char *to, size_t n). */ |
19850 |
+_GL_CXXALIAS_MDA_CAST (swab, void, (char *from, char *to, int n)); |
19851 |
+# else |
19852 |
+# if defined __hpux /* HP-UX */ |
19853 |
+_GL_CXXALIAS_SYS (swab, void, (const char *from, char *to, int n)); |
19854 |
+# elif defined __sun && !defined _XPG4 /* Solaris */ |
19855 |
+_GL_CXXALIAS_SYS (swab, void, (const char *from, char *to, ssize_t n)); |
19856 |
+# else |
19857 |
+_GL_CXXALIAS_SYS (swab, void, (const void *from, void *to, ssize_t n)); |
19858 |
+# endif |
19859 |
+# endif |
19860 |
+_GL_CXXALIASWARN (swab); |
19861 |
+#endif |
19862 |
+ |
19863 |
+ |
19864 |
+#if 1 |
19865 |
+# if 0 |
19866 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
19867 |
+# undef symlink |
19868 |
+# define symlink rpl_symlink |
19869 |
+# endif |
19870 |
+_GL_FUNCDECL_RPL (symlink, int, (char const *contents, char const *file) |
19871 |
+ _GL_ARG_NONNULL ((1, 2))); |
19872 |
+_GL_CXXALIAS_RPL (symlink, int, (char const *contents, char const *file)); |
19873 |
+# else |
19874 |
+# if !1 |
19875 |
+_GL_FUNCDECL_SYS (symlink, int, (char const *contents, char const *file) |
19876 |
+ _GL_ARG_NONNULL ((1, 2))); |
19877 |
+# endif |
19878 |
+_GL_CXXALIAS_SYS (symlink, int, (char const *contents, char const *file)); |
19879 |
+# endif |
19880 |
+_GL_CXXALIASWARN (symlink); |
19881 |
+#elif defined GNULIB_POSIXCHECK |
19882 |
+# undef symlink |
19883 |
+# if HAVE_RAW_DECL_SYMLINK |
19884 |
+_GL_WARN_ON_USE (symlink, "symlink is not portable - " |
19885 |
+ "use gnulib module symlink for portability"); |
19886 |
+# endif |
19887 |
+#endif |
19888 |
+ |
19889 |
+ |
19890 |
+#if 1 |
19891 |
+# if 0 |
19892 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
19893 |
+# undef symlinkat |
19894 |
+# define symlinkat rpl_symlinkat |
19895 |
+# endif |
19896 |
+_GL_FUNCDECL_RPL (symlinkat, int, |
19897 |
+ (char const *contents, int fd, char const *file) |
19898 |
+ _GL_ARG_NONNULL ((1, 3))); |
19899 |
+_GL_CXXALIAS_RPL (symlinkat, int, |
19900 |
+ (char const *contents, int fd, char const *file)); |
19901 |
+# else |
19902 |
+# if !1 |
19903 |
+_GL_FUNCDECL_SYS (symlinkat, int, |
19904 |
+ (char const *contents, int fd, char const *file) |
19905 |
+ _GL_ARG_NONNULL ((1, 3))); |
19906 |
+# endif |
19907 |
+_GL_CXXALIAS_SYS (symlinkat, int, |
19908 |
+ (char const *contents, int fd, char const *file)); |
19909 |
+# endif |
19910 |
+_GL_CXXALIASWARN (symlinkat); |
19911 |
+#elif defined GNULIB_POSIXCHECK |
19912 |
+# undef symlinkat |
19913 |
+# if HAVE_RAW_DECL_SYMLINKAT |
19914 |
+_GL_WARN_ON_USE (symlinkat, "symlinkat is not portable - " |
19915 |
+ "use gnulib module symlinkat for portability"); |
19916 |
+# endif |
19917 |
+#endif |
19918 |
+ |
19919 |
+ |
19920 |
+#if 0 |
19921 |
+/* Change the size of the file designated by FILENAME to become equal to LENGTH. |
19922 |
+ Return 0 if successful, otherwise -1 and errno set. |
19923 |
+ See the POSIX:2008 specification |
19924 |
+ <https://pubs.opengroup.org/onlinepubs/9699919799/functions/truncate.html>. */ |
19925 |
+# if 0 |
19926 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
19927 |
+# undef truncate |
19928 |
+# define truncate rpl_truncate |
19929 |
+# endif |
19930 |
+_GL_FUNCDECL_RPL (truncate, int, (const char *filename, off_t length) |
19931 |
+ _GL_ARG_NONNULL ((1))); |
19932 |
+_GL_CXXALIAS_RPL (truncate, int, (const char *filename, off_t length)); |
19933 |
+# else |
19934 |
+# if !1 |
19935 |
+_GL_FUNCDECL_SYS (truncate, int, (const char *filename, off_t length) |
19936 |
+ _GL_ARG_NONNULL ((1))); |
19937 |
+# endif |
19938 |
+_GL_CXXALIAS_SYS (truncate, int, (const char *filename, off_t length)); |
19939 |
+# endif |
19940 |
+_GL_CXXALIASWARN (truncate); |
19941 |
+#elif defined GNULIB_POSIXCHECK |
19942 |
+# undef truncate |
19943 |
+# if HAVE_RAW_DECL_TRUNCATE |
19944 |
+_GL_WARN_ON_USE (truncate, "truncate is unportable - " |
19945 |
+ "use gnulib module truncate for portability"); |
19946 |
+# endif |
19947 |
+#endif |
19948 |
+ |
19949 |
+ |
19950 |
+#if 0 |
19951 |
+/* Store at most BUFLEN characters of the pathname of the terminal FD is |
19952 |
+ open on in BUF. Return 0 on success, otherwise an error number. */ |
19953 |
+# if 0 |
19954 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
19955 |
+# undef ttyname_r |
19956 |
+# define ttyname_r rpl_ttyname_r |
19957 |
+# endif |
19958 |
+_GL_FUNCDECL_RPL (ttyname_r, int, |
19959 |
+ (int fd, char *buf, size_t buflen) _GL_ARG_NONNULL ((2))); |
19960 |
+_GL_CXXALIAS_RPL (ttyname_r, int, |
19961 |
+ (int fd, char *buf, size_t buflen)); |
19962 |
+# else |
19963 |
+# if !1 |
19964 |
+_GL_FUNCDECL_SYS (ttyname_r, int, |
19965 |
+ (int fd, char *buf, size_t buflen) _GL_ARG_NONNULL ((2))); |
19966 |
+# endif |
19967 |
+_GL_CXXALIAS_SYS (ttyname_r, int, |
19968 |
+ (int fd, char *buf, size_t buflen)); |
19969 |
+# endif |
19970 |
+_GL_CXXALIASWARN (ttyname_r); |
19971 |
+#elif defined GNULIB_POSIXCHECK |
19972 |
+# undef ttyname_r |
19973 |
+# if HAVE_RAW_DECL_TTYNAME_R |
19974 |
+_GL_WARN_ON_USE (ttyname_r, "ttyname_r is not portable - " |
19975 |
+ "use gnulib module ttyname_r for portability"); |
19976 |
+# endif |
19977 |
+#endif |
19978 |
+ |
19979 |
+ |
19980 |
+#if 1 |
19981 |
+# if 0 |
19982 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
19983 |
+# undef unlink |
19984 |
+# define unlink rpl_unlink |
19985 |
+# endif |
19986 |
+_GL_FUNCDECL_RPL (unlink, int, (char const *file) _GL_ARG_NONNULL ((1))); |
19987 |
+_GL_CXXALIAS_RPL (unlink, int, (char const *file)); |
19988 |
+# elif defined _WIN32 && !defined __CYGWIN__ |
19989 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
19990 |
+# undef unlink |
19991 |
+# define unlink _unlink |
19992 |
+# endif |
19993 |
+_GL_CXXALIAS_MDA (unlink, int, (char const *file)); |
19994 |
+# else |
19995 |
+_GL_CXXALIAS_SYS (unlink, int, (char const *file)); |
19996 |
+# endif |
19997 |
+_GL_CXXALIASWARN (unlink); |
19998 |
+#elif defined GNULIB_POSIXCHECK |
19999 |
+# undef unlink |
20000 |
+# if HAVE_RAW_DECL_UNLINK |
20001 |
+_GL_WARN_ON_USE (unlink, "unlink is not portable - " |
20002 |
+ "use gnulib module unlink for portability"); |
20003 |
+# endif |
20004 |
+#elif 1 |
20005 |
+/* On native Windows, map 'unlink' to '_unlink', so that -loldnames is not |
20006 |
+ required. In C++ with GNULIB_NAMESPACE, avoid differences between |
20007 |
+ platforms by defining GNULIB_NAMESPACE::unlink always. */ |
20008 |
+# if defined _WIN32 && !defined __CYGWIN__ |
20009 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
20010 |
+# undef unlink |
20011 |
+# define unlink _unlink |
20012 |
+# endif |
20013 |
+_GL_CXXALIAS_MDA (unlink, int, (char const *file)); |
20014 |
+# else |
20015 |
+_GL_CXXALIAS_SYS (unlink, int, (char const *file)); |
20016 |
+# endif |
20017 |
+_GL_CXXALIASWARN (unlink); |
20018 |
+#endif |
20019 |
+ |
20020 |
+ |
20021 |
+#if 1 |
20022 |
+# if 0 |
20023 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
20024 |
+# undef unlinkat |
20025 |
+# define unlinkat rpl_unlinkat |
20026 |
+# endif |
20027 |
+_GL_FUNCDECL_RPL (unlinkat, int, (int fd, char const *file, int flag) |
20028 |
+ _GL_ARG_NONNULL ((2))); |
20029 |
+_GL_CXXALIAS_RPL (unlinkat, int, (int fd, char const *file, int flag)); |
20030 |
+# else |
20031 |
+# if !1 |
20032 |
+_GL_FUNCDECL_SYS (unlinkat, int, (int fd, char const *file, int flag) |
20033 |
+ _GL_ARG_NONNULL ((2))); |
20034 |
+# endif |
20035 |
+_GL_CXXALIAS_SYS (unlinkat, int, (int fd, char const *file, int flag)); |
20036 |
+# endif |
20037 |
+_GL_CXXALIASWARN (unlinkat); |
20038 |
+#elif defined GNULIB_POSIXCHECK |
20039 |
+# undef unlinkat |
20040 |
+# if HAVE_RAW_DECL_UNLINKAT |
20041 |
+_GL_WARN_ON_USE (unlinkat, "unlinkat is not portable - " |
20042 |
+ "use gnulib module unlinkat for portability"); |
20043 |
+# endif |
20044 |
+#endif |
20045 |
+ |
20046 |
+ |
20047 |
+#if 0 |
20048 |
+/* Pause the execution of the current thread for N microseconds. |
20049 |
+ Returns 0 on completion, or -1 on range error. |
20050 |
+ See the POSIX:2001 specification |
20051 |
+ <https://pubs.opengroup.org/onlinepubs/009695399/functions/usleep.html>. */ |
20052 |
+# if 0 |
20053 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
20054 |
+# undef usleep |
20055 |
+# define usleep rpl_usleep |
20056 |
+# endif |
20057 |
+_GL_FUNCDECL_RPL (usleep, int, (useconds_t n)); |
20058 |
+_GL_CXXALIAS_RPL (usleep, int, (useconds_t n)); |
20059 |
+# else |
20060 |
+# if !1 |
20061 |
+_GL_FUNCDECL_SYS (usleep, int, (useconds_t n)); |
20062 |
+# endif |
20063 |
+/* Need to cast, because on Haiku, the first parameter is |
20064 |
+ unsigned int n. */ |
20065 |
+_GL_CXXALIAS_SYS_CAST (usleep, int, (useconds_t n)); |
20066 |
+# endif |
20067 |
+_GL_CXXALIASWARN (usleep); |
20068 |
+#elif defined GNULIB_POSIXCHECK |
20069 |
+# undef usleep |
20070 |
+# if HAVE_RAW_DECL_USLEEP |
20071 |
+_GL_WARN_ON_USE (usleep, "usleep is unportable - " |
20072 |
+ "use gnulib module usleep for portability"); |
20073 |
+# endif |
20074 |
+#endif |
20075 |
+ |
20076 |
+ |
20077 |
+#if 0 |
20078 |
+/* Write up to COUNT bytes starting at BUF to file descriptor FD. |
20079 |
+ See the POSIX:2008 specification |
20080 |
+ <https://pubs.opengroup.org/onlinepubs/9699919799/functions/write.html>. */ |
20081 |
+# if 0 |
20082 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
20083 |
+# undef write |
20084 |
+# define write rpl_write |
20085 |
+# endif |
20086 |
+_GL_FUNCDECL_RPL (write, ssize_t, (int fd, const void *buf, size_t count) |
20087 |
+ _GL_ARG_NONNULL ((2))); |
20088 |
+_GL_CXXALIAS_RPL (write, ssize_t, (int fd, const void *buf, size_t count)); |
20089 |
+# elif defined _WIN32 && !defined __CYGWIN__ |
20090 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
20091 |
+# undef write |
20092 |
+# define write _write |
20093 |
+# endif |
20094 |
+_GL_CXXALIAS_MDA (write, ssize_t, (int fd, const void *buf, size_t count)); |
20095 |
+# else |
20096 |
+_GL_CXXALIAS_SYS (write, ssize_t, (int fd, const void *buf, size_t count)); |
20097 |
+# endif |
20098 |
+_GL_CXXALIASWARN (write); |
20099 |
+#elif 1 |
20100 |
+/* On native Windows, map 'write' to '_write', so that -loldnames is not |
20101 |
+ required. In C++ with GNULIB_NAMESPACE, avoid differences between |
20102 |
+ platforms by defining GNULIB_NAMESPACE::write always. */ |
20103 |
+# if defined _WIN32 && !defined __CYGWIN__ |
20104 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
20105 |
+# undef write |
20106 |
+# define write _write |
20107 |
+# endif |
20108 |
+# ifdef __MINGW32__ |
20109 |
+_GL_CXXALIAS_MDA (write, int, (int fd, const void *buf, unsigned int count)); |
20110 |
+# else |
20111 |
+_GL_CXXALIAS_MDA (write, ssize_t, (int fd, const void *buf, unsigned int count)); |
20112 |
+# endif |
20113 |
+# else |
20114 |
+_GL_CXXALIAS_SYS (write, ssize_t, (int fd, const void *buf, size_t count)); |
20115 |
+# endif |
20116 |
+_GL_CXXALIASWARN (write); |
20117 |
+#endif |
20118 |
+ |
20119 |
+_GL_INLINE_HEADER_END |
20120 |
+ |
20121 |
+#endif /* _GL_UNISTD_H */ |
20122 |
+#endif /* _GL_INCLUDING_UNISTD_H */ |
20123 |
+#endif /* _GL_UNISTD_H */ |
20124 |
|
20125 |
diff --git a/autotools/gnulib/unlinkat.c b/autotools/gnulib/unlinkat.c |
20126 |
index eae6007..c9ff3ab 100644 |
20127 |
--- a/autotools/gnulib/unlinkat.c |
20128 |
+++ b/autotools/gnulib/unlinkat.c |
20129 |
@@ -58,7 +58,7 @@ rpl_unlinkat (int fd, char const *name, int flag) |
20130 |
rule of letting unlink("link-to-dir/") attempt to unlink a |
20131 |
directory. */ |
20132 |
struct stat st; |
20133 |
- result = lstatat (fd, name, &st); |
20134 |
+ result = fstatat (fd, name, &st, AT_SYMLINK_NOFOLLOW); |
20135 |
if (result == 0 || errno == EOVERFLOW) |
20136 |
{ |
20137 |
/* Trailing NUL will overwrite the trailing slash. */ |
20138 |
@@ -71,7 +71,8 @@ rpl_unlinkat (int fd, char const *name, int flag) |
20139 |
memcpy (short_name, name, len); |
20140 |
while (len && ISSLASH (short_name[len - 1])) |
20141 |
short_name[--len] = '\0'; |
20142 |
- if (len && (lstatat (fd, short_name, &st) || S_ISLNK (st.st_mode))) |
20143 |
+ if (len && (fstatat (fd, short_name, &st, AT_SYMLINK_NOFOLLOW) |
20144 |
+ || S_ISLNK (st.st_mode))) |
20145 |
{ |
20146 |
free (short_name); |
20147 |
errno = EPERM; |
20148 |
|
20149 |
diff --git a/autotools/gnulib/utime.h b/autotools/gnulib/utime.h |
20150 |
new file mode 100644 |
20151 |
index 0000000..7a5b8fa |
20152 |
--- /dev/null |
20153 |
+++ b/autotools/gnulib/utime.h |
20154 |
@@ -0,0 +1,619 @@ |
20155 |
+/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ |
20156 |
+/* Substitute for and wrapper around <utime.h>. |
20157 |
+ Copyright (C) 2017-2022 Free Software Foundation, Inc. |
20158 |
+ |
20159 |
+ This file is free software: you can redistribute it and/or modify |
20160 |
+ it under the terms of the GNU Lesser General Public License as |
20161 |
+ published by the Free Software Foundation; either version 2.1 of the |
20162 |
+ License, or (at your option) any later version. |
20163 |
+ |
20164 |
+ This file is distributed in the hope that it will be useful, |
20165 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
20166 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
20167 |
+ GNU Lesser General Public License for more details. |
20168 |
+ |
20169 |
+ You should have received a copy of the GNU Lesser General Public License |
20170 |
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
20171 |
+ |
20172 |
+#ifndef _GL_UTIME_H |
20173 |
+ |
20174 |
+#if __GNUC__ >= 3 |
20175 |
+#pragma GCC system_header |
20176 |
+#endif |
20177 |
+ |
20178 |
+ |
20179 |
+/* The include_next requires a split double-inclusion guard. */ |
20180 |
+#if 1 |
20181 |
+# include_next <utime.h> |
20182 |
+#endif |
20183 |
+ |
20184 |
+#ifndef _GL_UTIME_H |
20185 |
+#define _GL_UTIME_H |
20186 |
+ |
20187 |
+#if !1 |
20188 |
+# include <sys/utime.h> |
20189 |
+#endif |
20190 |
+ |
20191 |
+#if 1 |
20192 |
+/* Get struct timespec. */ |
20193 |
+# include <time.h> |
20194 |
+#endif |
20195 |
+ |
20196 |
+/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ |
20197 |
+/* C++ compatible function declaration macros. |
20198 |
+ Copyright (C) 2010-2022 Free Software Foundation, Inc. |
20199 |
+ |
20200 |
+ This program is free software: you can redistribute it and/or modify it |
20201 |
+ under the terms of the GNU Lesser General Public License as published |
20202 |
+ by the Free Software Foundation; either version 2 of the License, or |
20203 |
+ (at your option) any later version. |
20204 |
+ |
20205 |
+ This program is distributed in the hope that it will be useful, |
20206 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
20207 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
20208 |
+ Lesser General Public License for more details. |
20209 |
+ |
20210 |
+ You should have received a copy of the GNU Lesser General Public License |
20211 |
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
20212 |
+ |
20213 |
+#ifndef _GL_CXXDEFS_H |
20214 |
+#define _GL_CXXDEFS_H |
20215 |
+ |
20216 |
+/* Begin/end the GNULIB_NAMESPACE namespace. */ |
20217 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
20218 |
+# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { |
20219 |
+# define _GL_END_NAMESPACE } |
20220 |
+#else |
20221 |
+# define _GL_BEGIN_NAMESPACE |
20222 |
+# define _GL_END_NAMESPACE |
20223 |
+#endif |
20224 |
+ |
20225 |
+/* The three most frequent use cases of these macros are: |
20226 |
+ |
20227 |
+ * For providing a substitute for a function that is missing on some |
20228 |
+ platforms, but is declared and works fine on the platforms on which |
20229 |
+ it exists: |
20230 |
+ |
20231 |
+ #if @GNULIB_FOO@ |
20232 |
+ # if !@HAVE_FOO@ |
20233 |
+ _GL_FUNCDECL_SYS (foo, ...); |
20234 |
+ # endif |
20235 |
+ _GL_CXXALIAS_SYS (foo, ...); |
20236 |
+ _GL_CXXALIASWARN (foo); |
20237 |
+ #elif defined GNULIB_POSIXCHECK |
20238 |
+ ... |
20239 |
+ #endif |
20240 |
+ |
20241 |
+ * For providing a replacement for a function that exists on all platforms, |
20242 |
+ but is broken/insufficient and needs to be replaced on some platforms: |
20243 |
+ |
20244 |
+ #if @GNULIB_FOO@ |
20245 |
+ # if @REPLACE_FOO@ |
20246 |
+ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
20247 |
+ # undef foo |
20248 |
+ # define foo rpl_foo |
20249 |
+ # endif |
20250 |
+ _GL_FUNCDECL_RPL (foo, ...); |
20251 |
+ _GL_CXXALIAS_RPL (foo, ...); |
20252 |
+ # else |
20253 |
+ _GL_CXXALIAS_SYS (foo, ...); |
20254 |
+ # endif |
20255 |
+ _GL_CXXALIASWARN (foo); |
20256 |
+ #elif defined GNULIB_POSIXCHECK |
20257 |
+ ... |
20258 |
+ #endif |
20259 |
+ |
20260 |
+ * For providing a replacement for a function that exists on some platforms |
20261 |
+ but is broken/insufficient and needs to be replaced on some of them and |
20262 |
+ is additionally either missing or undeclared on some other platforms: |
20263 |
+ |
20264 |
+ #if @GNULIB_FOO@ |
20265 |
+ # if @REPLACE_FOO@ |
20266 |
+ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
20267 |
+ # undef foo |
20268 |
+ # define foo rpl_foo |
20269 |
+ # endif |
20270 |
+ _GL_FUNCDECL_RPL (foo, ...); |
20271 |
+ _GL_CXXALIAS_RPL (foo, ...); |
20272 |
+ # else |
20273 |
+ # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ |
20274 |
+ _GL_FUNCDECL_SYS (foo, ...); |
20275 |
+ # endif |
20276 |
+ _GL_CXXALIAS_SYS (foo, ...); |
20277 |
+ # endif |
20278 |
+ _GL_CXXALIASWARN (foo); |
20279 |
+ #elif defined GNULIB_POSIXCHECK |
20280 |
+ ... |
20281 |
+ #endif |
20282 |
+*/ |
20283 |
+ |
20284 |
+/* _GL_EXTERN_C declaration; |
20285 |
+ performs the declaration with C linkage. */ |
20286 |
+#if defined __cplusplus |
20287 |
+# define _GL_EXTERN_C extern "C" |
20288 |
+#else |
20289 |
+# define _GL_EXTERN_C extern |
20290 |
+#endif |
20291 |
+ |
20292 |
+/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); |
20293 |
+ declares a replacement function, named rpl_func, with the given prototype, |
20294 |
+ consisting of return type, parameters, and attributes. |
20295 |
+ Example: |
20296 |
+ _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) |
20297 |
+ _GL_ARG_NONNULL ((1))); |
20298 |
+ */ |
20299 |
+#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ |
20300 |
+ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) |
20301 |
+#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ |
20302 |
+ _GL_EXTERN_C rettype rpl_func parameters_and_attributes |
20303 |
+ |
20304 |
+/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); |
20305 |
+ declares the system function, named func, with the given prototype, |
20306 |
+ consisting of return type, parameters, and attributes. |
20307 |
+ Example: |
20308 |
+ _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) |
20309 |
+ _GL_ARG_NONNULL ((1))); |
20310 |
+ */ |
20311 |
+#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ |
20312 |
+ _GL_EXTERN_C rettype func parameters_and_attributes |
20313 |
+ |
20314 |
+/* _GL_CXXALIAS_RPL (func, rettype, parameters); |
20315 |
+ declares a C++ alias called GNULIB_NAMESPACE::func |
20316 |
+ that redirects to rpl_func, if GNULIB_NAMESPACE is defined. |
20317 |
+ Example: |
20318 |
+ _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); |
20319 |
+ |
20320 |
+ Wrapping rpl_func in an object with an inline conversion operator |
20321 |
+ avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is |
20322 |
+ actually used in the program. */ |
20323 |
+#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ |
20324 |
+ _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) |
20325 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
20326 |
+# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ |
20327 |
+ namespace GNULIB_NAMESPACE \ |
20328 |
+ { \ |
20329 |
+ static const struct _gl_ ## func ## _wrapper \ |
20330 |
+ { \ |
20331 |
+ typedef rettype (*type) parameters; \ |
20332 |
+ \ |
20333 |
+ inline operator type () const \ |
20334 |
+ { \ |
20335 |
+ return ::rpl_func; \ |
20336 |
+ } \ |
20337 |
+ } func = {}; \ |
20338 |
+ } \ |
20339 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
20340 |
+#else |
20341 |
+# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ |
20342 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
20343 |
+#endif |
20344 |
+ |
20345 |
+/* _GL_CXXALIAS_MDA (func, rettype, parameters); |
20346 |
+ is to be used when func is a Microsoft deprecated alias, on native Windows. |
20347 |
+ It declares a C++ alias called GNULIB_NAMESPACE::func |
20348 |
+ that redirects to _func, if GNULIB_NAMESPACE is defined. |
20349 |
+ Example: |
20350 |
+ _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); |
20351 |
+ */ |
20352 |
+#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ |
20353 |
+ _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) |
20354 |
+ |
20355 |
+/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); |
20356 |
+ is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); |
20357 |
+ except that the C function rpl_func may have a slightly different |
20358 |
+ declaration. A cast is used to silence the "invalid conversion" error |
20359 |
+ that would otherwise occur. */ |
20360 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
20361 |
+# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ |
20362 |
+ namespace GNULIB_NAMESPACE \ |
20363 |
+ { \ |
20364 |
+ static const struct _gl_ ## func ## _wrapper \ |
20365 |
+ { \ |
20366 |
+ typedef rettype (*type) parameters; \ |
20367 |
+ \ |
20368 |
+ inline operator type () const \ |
20369 |
+ { \ |
20370 |
+ return reinterpret_cast<type>(::rpl_func); \ |
20371 |
+ } \ |
20372 |
+ } func = {}; \ |
20373 |
+ } \ |
20374 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
20375 |
+#else |
20376 |
+# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ |
20377 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
20378 |
+#endif |
20379 |
+ |
20380 |
+/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); |
20381 |
+ is like _GL_CXXALIAS_MDA (func, rettype, parameters); |
20382 |
+ except that the C function func may have a slightly different declaration. |
20383 |
+ A cast is used to silence the "invalid conversion" error that would |
20384 |
+ otherwise occur. */ |
20385 |
+#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ |
20386 |
+ _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) |
20387 |
+ |
20388 |
+/* _GL_CXXALIAS_SYS (func, rettype, parameters); |
20389 |
+ declares a C++ alias called GNULIB_NAMESPACE::func |
20390 |
+ that redirects to the system provided function func, if GNULIB_NAMESPACE |
20391 |
+ is defined. |
20392 |
+ Example: |
20393 |
+ _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); |
20394 |
+ |
20395 |
+ Wrapping func in an object with an inline conversion operator |
20396 |
+ avoids a reference to func unless GNULIB_NAMESPACE::func is |
20397 |
+ actually used in the program. */ |
20398 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
20399 |
+# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ |
20400 |
+ namespace GNULIB_NAMESPACE \ |
20401 |
+ { \ |
20402 |
+ static const struct _gl_ ## func ## _wrapper \ |
20403 |
+ { \ |
20404 |
+ typedef rettype (*type) parameters; \ |
20405 |
+ \ |
20406 |
+ inline operator type () const \ |
20407 |
+ { \ |
20408 |
+ return ::func; \ |
20409 |
+ } \ |
20410 |
+ } func = {}; \ |
20411 |
+ } \ |
20412 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
20413 |
+#else |
20414 |
+# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ |
20415 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
20416 |
+#endif |
20417 |
+ |
20418 |
+/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); |
20419 |
+ is like _GL_CXXALIAS_SYS (func, rettype, parameters); |
20420 |
+ except that the C function func may have a slightly different declaration. |
20421 |
+ A cast is used to silence the "invalid conversion" error that would |
20422 |
+ otherwise occur. */ |
20423 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
20424 |
+# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ |
20425 |
+ namespace GNULIB_NAMESPACE \ |
20426 |
+ { \ |
20427 |
+ static const struct _gl_ ## func ## _wrapper \ |
20428 |
+ { \ |
20429 |
+ typedef rettype (*type) parameters; \ |
20430 |
+ \ |
20431 |
+ inline operator type () const \ |
20432 |
+ { \ |
20433 |
+ return reinterpret_cast<type>(::func); \ |
20434 |
+ } \ |
20435 |
+ } func = {}; \ |
20436 |
+ } \ |
20437 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
20438 |
+#else |
20439 |
+# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ |
20440 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
20441 |
+#endif |
20442 |
+ |
20443 |
+/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); |
20444 |
+ is like _GL_CXXALIAS_SYS (func, rettype, parameters); |
20445 |
+ except that the C function is picked among a set of overloaded functions, |
20446 |
+ namely the one with rettype2 and parameters2. Two consecutive casts |
20447 |
+ are used to silence the "cannot find a match" and "invalid conversion" |
20448 |
+ errors that would otherwise occur. */ |
20449 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
20450 |
+ /* The outer cast must be a reinterpret_cast. |
20451 |
+ The inner cast: When the function is defined as a set of overloaded |
20452 |
+ functions, it works as a static_cast<>, choosing the designated variant. |
20453 |
+ When the function is defined as a single variant, it works as a |
20454 |
+ reinterpret_cast<>. The parenthesized cast syntax works both ways. */ |
20455 |
+# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ |
20456 |
+ namespace GNULIB_NAMESPACE \ |
20457 |
+ { \ |
20458 |
+ static const struct _gl_ ## func ## _wrapper \ |
20459 |
+ { \ |
20460 |
+ typedef rettype (*type) parameters; \ |
20461 |
+ \ |
20462 |
+ inline operator type () const \ |
20463 |
+ { \ |
20464 |
+ return reinterpret_cast<type>((rettype2 (*) parameters2)(::func)); \ |
20465 |
+ } \ |
20466 |
+ } func = {}; \ |
20467 |
+ } \ |
20468 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
20469 |
+#else |
20470 |
+# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ |
20471 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
20472 |
+#endif |
20473 |
+ |
20474 |
+/* _GL_CXXALIASWARN (func); |
20475 |
+ causes a warning to be emitted when ::func is used but not when |
20476 |
+ GNULIB_NAMESPACE::func is used. func must be defined without overloaded |
20477 |
+ variants. */ |
20478 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
20479 |
+# define _GL_CXXALIASWARN(func) \ |
20480 |
+ _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) |
20481 |
+# define _GL_CXXALIASWARN_1(func,namespace) \ |
20482 |
+ _GL_CXXALIASWARN_2 (func, namespace) |
20483 |
+/* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>, |
20484 |
+ we enable the warning only when not optimizing. */ |
20485 |
+# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) |
20486 |
+# define _GL_CXXALIASWARN_2(func,namespace) \ |
20487 |
+ _GL_WARN_ON_USE (func, \ |
20488 |
+ "The symbol ::" #func " refers to the system function. " \ |
20489 |
+ "Use " #namespace "::" #func " instead.") |
20490 |
+# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING |
20491 |
+# define _GL_CXXALIASWARN_2(func,namespace) \ |
20492 |
+ extern __typeof__ (func) func |
20493 |
+# else |
20494 |
+# define _GL_CXXALIASWARN_2(func,namespace) \ |
20495 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
20496 |
+# endif |
20497 |
+#else |
20498 |
+# define _GL_CXXALIASWARN(func) \ |
20499 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
20500 |
+#endif |
20501 |
+ |
20502 |
+/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); |
20503 |
+ causes a warning to be emitted when the given overloaded variant of ::func |
20504 |
+ is used but not when GNULIB_NAMESPACE::func is used. */ |
20505 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
20506 |
+# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ |
20507 |
+ _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ |
20508 |
+ GNULIB_NAMESPACE) |
20509 |
+# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ |
20510 |
+ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) |
20511 |
+/* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>, |
20512 |
+ we enable the warning only when not optimizing. */ |
20513 |
+# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) |
20514 |
+# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ |
20515 |
+ _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ |
20516 |
+ "The symbol ::" #func " refers to the system function. " \ |
20517 |
+ "Use " #namespace "::" #func " instead.") |
20518 |
+# else |
20519 |
+# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ |
20520 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
20521 |
+# endif |
20522 |
+#else |
20523 |
+# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ |
20524 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
20525 |
+#endif |
20526 |
+ |
20527 |
+#endif /* _GL_CXXDEFS_H */ |
20528 |
+ |
20529 |
+/* The definition of _GL_ARG_NONNULL is copied here. */ |
20530 |
+/* A C macro for declaring that specific arguments must not be NULL. |
20531 |
+ Copyright (C) 2009-2022 Free Software Foundation, Inc. |
20532 |
+ |
20533 |
+ This program is free software: you can redistribute it and/or modify it |
20534 |
+ under the terms of the GNU Lesser General Public License as published |
20535 |
+ by the Free Software Foundation; either version 2 of the License, or |
20536 |
+ (at your option) any later version. |
20537 |
+ |
20538 |
+ This program is distributed in the hope that it will be useful, |
20539 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
20540 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
20541 |
+ Lesser General Public License for more details. |
20542 |
+ |
20543 |
+ You should have received a copy of the GNU Lesser General Public License |
20544 |
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
20545 |
+ |
20546 |
+/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools |
20547 |
+ that the values passed as arguments n, ..., m must be non-NULL pointers. |
20548 |
+ n = 1 stands for the first argument, n = 2 for the second argument etc. */ |
20549 |
+#ifndef _GL_ARG_NONNULL |
20550 |
+# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ |
20551 |
+# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) |
20552 |
+# else |
20553 |
+# define _GL_ARG_NONNULL(params) |
20554 |
+# endif |
20555 |
+#endif |
20556 |
+ |
20557 |
+/* The definition of _GL_WARN_ON_USE is copied here. */ |
20558 |
+/* A C macro for emitting warnings if a function is used. |
20559 |
+ Copyright (C) 2010-2022 Free Software Foundation, Inc. |
20560 |
+ |
20561 |
+ This program is free software: you can redistribute it and/or modify it |
20562 |
+ under the terms of the GNU Lesser General Public License as published |
20563 |
+ by the Free Software Foundation; either version 2 of the License, or |
20564 |
+ (at your option) any later version. |
20565 |
+ |
20566 |
+ This program is distributed in the hope that it will be useful, |
20567 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
20568 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
20569 |
+ Lesser General Public License for more details. |
20570 |
+ |
20571 |
+ You should have received a copy of the GNU Lesser General Public License |
20572 |
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
20573 |
+ |
20574 |
+/* _GL_WARN_ON_USE (function, "literal string") issues a declaration |
20575 |
+ for FUNCTION which will then trigger a compiler warning containing |
20576 |
+ the text of "literal string" anywhere that function is called, if |
20577 |
+ supported by the compiler. If the compiler does not support this |
20578 |
+ feature, the macro expands to an unused extern declaration. |
20579 |
+ |
20580 |
+ _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the |
20581 |
+ attribute used in _GL_WARN_ON_USE. If the compiler does not support |
20582 |
+ this feature, it expands to empty. |
20583 |
+ |
20584 |
+ These macros are useful for marking a function as a potential |
20585 |
+ portability trap, with the intent that "literal string" include |
20586 |
+ instructions on the replacement function that should be used |
20587 |
+ instead. |
20588 |
+ _GL_WARN_ON_USE is for functions with 'extern' linkage. |
20589 |
+ _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline' |
20590 |
+ linkage. |
20591 |
+ |
20592 |
+ However, one of the reasons that a function is a portability trap is |
20593 |
+ if it has the wrong signature. Declaring FUNCTION with a different |
20594 |
+ signature in C is a compilation error, so this macro must use the |
20595 |
+ same type as any existing declaration so that programs that avoid |
20596 |
+ the problematic FUNCTION do not fail to compile merely because they |
20597 |
+ included a header that poisoned the function. But this implies that |
20598 |
+ _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already |
20599 |
+ have a declaration. Use of this macro implies that there must not |
20600 |
+ be any other macro hiding the declaration of FUNCTION; but |
20601 |
+ undefining FUNCTION first is part of the poisoning process anyway |
20602 |
+ (although for symbols that are provided only via a macro, the result |
20603 |
+ is a compilation error rather than a warning containing |
20604 |
+ "literal string"). Also note that in C++, it is only safe to use if |
20605 |
+ FUNCTION has no overloads. |
20606 |
+ |
20607 |
+ For an example, it is possible to poison 'getline' by: |
20608 |
+ - adding a call to gl_WARN_ON_USE_PREPARE([[#include <stdio.h>]], |
20609 |
+ [getline]) in configure.ac, which potentially defines |
20610 |
+ HAVE_RAW_DECL_GETLINE |
20611 |
+ - adding this code to a header that wraps the system <stdio.h>: |
20612 |
+ #undef getline |
20613 |
+ #if HAVE_RAW_DECL_GETLINE |
20614 |
+ _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" |
20615 |
+ "not universally present; use the gnulib module getline"); |
20616 |
+ #endif |
20617 |
+ |
20618 |
+ It is not possible to directly poison global variables. But it is |
20619 |
+ possible to write a wrapper accessor function, and poison that |
20620 |
+ (less common usage, like &environ, will cause a compilation error |
20621 |
+ rather than issue the nice warning, but the end result of informing |
20622 |
+ the developer about their portability problem is still achieved): |
20623 |
+ #if HAVE_RAW_DECL_ENVIRON |
20624 |
+ static char *** |
20625 |
+ rpl_environ (void) { return &environ; } |
20626 |
+ _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); |
20627 |
+ # undef environ |
20628 |
+ # define environ (*rpl_environ ()) |
20629 |
+ #endif |
20630 |
+ or better (avoiding contradictory use of 'static' and 'extern'): |
20631 |
+ #if HAVE_RAW_DECL_ENVIRON |
20632 |
+ static char *** |
20633 |
+ _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared") |
20634 |
+ rpl_environ (void) { return &environ; } |
20635 |
+ # undef environ |
20636 |
+ # define environ (*rpl_environ ()) |
20637 |
+ #endif |
20638 |
+ */ |
20639 |
+#ifndef _GL_WARN_ON_USE |
20640 |
+ |
20641 |
+# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) |
20642 |
+/* A compiler attribute is available in gcc versions 4.3.0 and later. */ |
20643 |
+# define _GL_WARN_ON_USE(function, message) \ |
20644 |
+_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) |
20645 |
+# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ |
20646 |
+ __attribute__ ((__warning__ (message))) |
20647 |
+# elif __clang_major__ >= 4 |
20648 |
+/* Another compiler attribute is available in clang. */ |
20649 |
+# define _GL_WARN_ON_USE(function, message) \ |
20650 |
+_GL_WARN_EXTERN_C __typeof__ (function) function \ |
20651 |
+ __attribute__ ((__diagnose_if__ (1, message, "warning"))) |
20652 |
+# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ |
20653 |
+ __attribute__ ((__diagnose_if__ (1, message, "warning"))) |
20654 |
+# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING |
20655 |
+/* Verify the existence of the function. */ |
20656 |
+# define _GL_WARN_ON_USE(function, message) \ |
20657 |
+_GL_WARN_EXTERN_C __typeof__ (function) function |
20658 |
+# define _GL_WARN_ON_USE_ATTRIBUTE(message) |
20659 |
+# else /* Unsupported. */ |
20660 |
+# define _GL_WARN_ON_USE(function, message) \ |
20661 |
+_GL_WARN_EXTERN_C int _gl_warn_on_use |
20662 |
+# define _GL_WARN_ON_USE_ATTRIBUTE(message) |
20663 |
+# endif |
20664 |
+#endif |
20665 |
+ |
20666 |
+/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") |
20667 |
+ is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the |
20668 |
+ function is declared with the given prototype, consisting of return type, |
20669 |
+ parameters, and attributes. |
20670 |
+ This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does |
20671 |
+ not work in this case. */ |
20672 |
+#ifndef _GL_WARN_ON_USE_CXX |
20673 |
+# if !defined __cplusplus |
20674 |
+# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ |
20675 |
+ _GL_WARN_ON_USE (function, msg) |
20676 |
+# else |
20677 |
+# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) |
20678 |
+/* A compiler attribute is available in gcc versions 4.3.0 and later. */ |
20679 |
+# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ |
20680 |
+extern rettype_gcc function parameters_and_attributes \ |
20681 |
+ __attribute__ ((__warning__ (msg))) |
20682 |
+# elif __clang_major__ >= 4 |
20683 |
+/* Another compiler attribute is available in clang. */ |
20684 |
+# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ |
20685 |
+extern rettype_clang function parameters_and_attributes \ |
20686 |
+ __attribute__ ((__diagnose_if__ (1, msg, "warning"))) |
20687 |
+# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING |
20688 |
+/* Verify the existence of the function. */ |
20689 |
+# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ |
20690 |
+extern rettype_gcc function parameters_and_attributes |
20691 |
+# else /* Unsupported. */ |
20692 |
+# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ |
20693 |
+_GL_WARN_EXTERN_C int _gl_warn_on_use |
20694 |
+# endif |
20695 |
+# endif |
20696 |
+#endif |
20697 |
+ |
20698 |
+/* _GL_WARN_EXTERN_C declaration; |
20699 |
+ performs the declaration with C linkage. */ |
20700 |
+#ifndef _GL_WARN_EXTERN_C |
20701 |
+# if defined __cplusplus |
20702 |
+# define _GL_WARN_EXTERN_C extern "C" |
20703 |
+# else |
20704 |
+# define _GL_WARN_EXTERN_C extern |
20705 |
+# endif |
20706 |
+#endif |
20707 |
+ |
20708 |
+ |
20709 |
+#if defined _WIN32 && ! defined __CYGWIN__ |
20710 |
+ |
20711 |
+/* Define 'struct utimbuf' as an alias of 'struct _utimbuf' |
20712 |
+ (or possibly, if present, 'struct __utimbuf64'). */ |
20713 |
+# define utimbuf _utimbuf |
20714 |
+ |
20715 |
+#endif |
20716 |
+ |
20717 |
+ |
20718 |
+#if 1 |
20719 |
+# if 0 |
20720 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
20721 |
+# define utime rpl_utime |
20722 |
+# endif |
20723 |
+_GL_FUNCDECL_RPL (utime, int, (const char *filename, const struct utimbuf *ts) |
20724 |
+ _GL_ARG_NONNULL ((1))); |
20725 |
+_GL_CXXALIAS_RPL (utime, int, (const char *filename, const struct utimbuf *ts)); |
20726 |
+# elif defined _WIN32 && !defined __CYGWIN__ |
20727 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
20728 |
+# undef utime |
20729 |
+# define utime _utime |
20730 |
+# endif |
20731 |
+_GL_CXXALIAS_MDA (utime, int, (const char *filename, const struct utimbuf *ts)); |
20732 |
+# else |
20733 |
+# if !1 |
20734 |
+_GL_FUNCDECL_SYS (utime, int, (const char *filename, const struct utimbuf *ts) |
20735 |
+ _GL_ARG_NONNULL ((1))); |
20736 |
+# endif |
20737 |
+_GL_CXXALIAS_SYS (utime, int, (const char *filename, const struct utimbuf *ts)); |
20738 |
+# endif |
20739 |
+# if __GLIBC__ >= 2 |
20740 |
+_GL_CXXALIASWARN (utime); |
20741 |
+# endif |
20742 |
+#elif defined GNULIB_POSIXCHECK |
20743 |
+# undef utime |
20744 |
+# if HAVE_RAW_DECL_UTIME |
20745 |
+_GL_WARN_ON_USE (utime, |
20746 |
+ "utime is unportable - " |
20747 |
+ "use gnulib module canonicalize-lgpl for portability"); |
20748 |
+# endif |
20749 |
+#elif 1 |
20750 |
+/* On native Windows, map 'utime' to '_utime', so that -loldnames is not |
20751 |
+ required. In C++ with GNULIB_NAMESPACE, avoid differences between |
20752 |
+ platforms by defining GNULIB_NAMESPACE::utime always. */ |
20753 |
+# if defined _WIN32 && !defined __CYGWIN__ |
20754 |
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
20755 |
+# undef utime |
20756 |
+# define utime _utime |
20757 |
+# endif |
20758 |
+_GL_CXXALIAS_MDA (utime, int, (const char *filename, const struct utimbuf *ts)); |
20759 |
+# else |
20760 |
+_GL_CXXALIAS_SYS (utime, int, (const char *filename, const struct utimbuf *ts)); |
20761 |
+# endif |
20762 |
+# if __GLIBC__ >= 2 |
20763 |
+_GL_CXXALIASWARN (utime); |
20764 |
+# endif |
20765 |
+#endif |
20766 |
+ |
20767 |
+#if 1 |
20768 |
+extern int _gl_utimens_windows (const char *filename, struct timespec ts[2]); |
20769 |
+#endif |
20770 |
+ |
20771 |
+ |
20772 |
+#endif /* _GL_UTIME_H */ |
20773 |
+#endif /* _GL_UTIME_H */ |
20774 |
|
20775 |
diff --git a/autotools/gnulib/vasnprintf.c b/autotools/gnulib/vasnprintf.c |
20776 |
index 4857452..285c674 100644 |
20777 |
--- a/autotools/gnulib/vasnprintf.c |
20778 |
+++ b/autotools/gnulib/vasnprintf.c |
20779 |
@@ -915,8 +915,7 @@ divide (mpn_t a, mpn_t b, mpn_t *q) |
20780 |
q_ptr[q_len++] = 1; |
20781 |
} |
20782 |
keep_q: |
20783 |
- if (tmp_roomptr != NULL) |
20784 |
- free (tmp_roomptr); |
20785 |
+ free (tmp_roomptr); |
20786 |
q->limbs = q_ptr; |
20787 |
q->nlimbs = q_len; |
20788 |
return roomptr; |
20789 |
@@ -1873,11 +1872,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, |
20790 |
free (a.arg); |
20791 |
|
20792 |
if (PRINTF_FETCHARGS (args, &a) < 0) |
20793 |
- { |
20794 |
- CLEANUP (); |
20795 |
- errno = EINVAL; |
20796 |
- return NULL; |
20797 |
- } |
20798 |
+ goto fail_1_with_EINVAL; |
20799 |
|
20800 |
{ |
20801 |
size_t buf_neededlength; |
20802 |
@@ -1913,19 +1908,12 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, |
20803 |
buf_malloced = buf; |
20804 |
} |
20805 |
|
20806 |
- if (resultbuf != NULL) |
20807 |
- { |
20808 |
- result = resultbuf; |
20809 |
- allocated = *lengthp; |
20810 |
- } |
20811 |
- else |
20812 |
- { |
20813 |
- result = NULL; |
20814 |
- allocated = 0; |
20815 |
- } |
20816 |
+ result = resultbuf; |
20817 |
+ allocated = (resultbuf != NULL ? *lengthp : 0); |
20818 |
length = 0; |
20819 |
/* Invariants: |
20820 |
- result is either == resultbuf or == NULL or malloc-allocated. |
20821 |
+ result is either == resultbuf or malloc-allocated. |
20822 |
+ If result == NULL, resultbuf is == NULL as well. |
20823 |
If length > 0, then result != NULL. */ |
20824 |
|
20825 |
/* Ensures that allocated >= needed. Aborts through a jump to |
20826 |
@@ -1942,7 +1930,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, |
20827 |
memory_size = xtimes (allocated, sizeof (DCHAR_T)); \ |
20828 |
if (size_overflow_p (memory_size)) \ |
20829 |
oom_statement \ |
20830 |
- if (result == resultbuf || result == NULL) \ |
20831 |
+ if (result == resultbuf) \ |
20832 |
memory = (DCHAR_T *) malloc (memory_size); \ |
20833 |
else \ |
20834 |
memory = (DCHAR_T *) realloc (result, memory_size); \ |
20835 |
@@ -2112,15 +2100,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, |
20836 |
if (count == 0) |
20837 |
break; |
20838 |
if (count < 0) |
20839 |
- { |
20840 |
- if (!(result == resultbuf || result == NULL)) |
20841 |
- free (result); |
20842 |
- if (buf_malloced != NULL) |
20843 |
- free (buf_malloced); |
20844 |
- CLEANUP (); |
20845 |
- errno = EILSEQ; |
20846 |
- return NULL; |
20847 |
- } |
20848 |
+ goto fail_with_EILSEQ; |
20849 |
arg_end += count; |
20850 |
characters++; |
20851 |
} |
20852 |
@@ -2137,15 +2117,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, |
20853 |
if (count == 0) |
20854 |
break; |
20855 |
if (count < 0) |
20856 |
- { |
20857 |
- if (!(result == resultbuf || result == NULL)) |
20858 |
- free (result); |
20859 |
- if (buf_malloced != NULL) |
20860 |
- free (buf_malloced); |
20861 |
- CLEANUP (); |
20862 |
- errno = EILSEQ; |
20863 |
- return NULL; |
20864 |
- } |
20865 |
+ goto fail_with_EILSEQ; |
20866 |
arg_end += count; |
20867 |
characters++; |
20868 |
} |
20869 |
@@ -2191,14 +2163,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, |
20870 |
converted, &converted_len); |
20871 |
# endif |
20872 |
if (converted == NULL) |
20873 |
- { |
20874 |
- if (!(result == resultbuf || result == NULL)) |
20875 |
- free (result); |
20876 |
- if (buf_malloced != NULL) |
20877 |
- free (buf_malloced); |
20878 |
- CLEANUP (); |
20879 |
- return NULL; |
20880 |
- } |
20881 |
+ goto fail_with_errno; |
20882 |
if (converted != result + length) |
20883 |
{ |
20884 |
ENSURE_ALLOCATION_ELSE (xsum (length, converted_len), |
20885 |
@@ -2237,15 +2202,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, |
20886 |
if (count == 0) |
20887 |
break; |
20888 |
if (count < 0) |
20889 |
- { |
20890 |
- if (!(result == resultbuf || result == NULL)) |
20891 |
- free (result); |
20892 |
- if (buf_malloced != NULL) |
20893 |
- free (buf_malloced); |
20894 |
- CLEANUP (); |
20895 |
- errno = EILSEQ; |
20896 |
- return NULL; |
20897 |
- } |
20898 |
+ goto fail_with_EILSEQ; |
20899 |
arg_end += count; |
20900 |
characters++; |
20901 |
} |
20902 |
@@ -2262,15 +2219,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, |
20903 |
if (count == 0) |
20904 |
break; |
20905 |
if (count < 0) |
20906 |
- { |
20907 |
- if (!(result == resultbuf || result == NULL)) |
20908 |
- free (result); |
20909 |
- if (buf_malloced != NULL) |
20910 |
- free (buf_malloced); |
20911 |
- CLEANUP (); |
20912 |
- errno = EILSEQ; |
20913 |
- return NULL; |
20914 |
- } |
20915 |
+ goto fail_with_EILSEQ; |
20916 |
arg_end += count; |
20917 |
characters++; |
20918 |
} |
20919 |
@@ -2316,14 +2265,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, |
20920 |
converted, &converted_len); |
20921 |
# endif |
20922 |
if (converted == NULL) |
20923 |
- { |
20924 |
- if (!(result == resultbuf || result == NULL)) |
20925 |
- free (result); |
20926 |
- if (buf_malloced != NULL) |
20927 |
- free (buf_malloced); |
20928 |
- CLEANUP (); |
20929 |
- return NULL; |
20930 |
- } |
20931 |
+ goto fail_with_errno; |
20932 |
if (converted != result + length) |
20933 |
{ |
20934 |
ENSURE_ALLOCATION_ELSE (xsum (length, converted_len), |
20935 |
@@ -2362,15 +2304,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, |
20936 |
if (count == 0) |
20937 |
break; |
20938 |
if (count < 0) |
20939 |
- { |
20940 |
- if (!(result == resultbuf || result == NULL)) |
20941 |
- free (result); |
20942 |
- if (buf_malloced != NULL) |
20943 |
- free (buf_malloced); |
20944 |
- CLEANUP (); |
20945 |
- errno = EILSEQ; |
20946 |
- return NULL; |
20947 |
- } |
20948 |
+ goto fail_with_EILSEQ; |
20949 |
arg_end += count; |
20950 |
characters++; |
20951 |
} |
20952 |
@@ -2387,15 +2321,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, |
20953 |
if (count == 0) |
20954 |
break; |
20955 |
if (count < 0) |
20956 |
- { |
20957 |
- if (!(result == resultbuf || result == NULL)) |
20958 |
- free (result); |
20959 |
- if (buf_malloced != NULL) |
20960 |
- free (buf_malloced); |
20961 |
- CLEANUP (); |
20962 |
- errno = EILSEQ; |
20963 |
- return NULL; |
20964 |
- } |
20965 |
+ goto fail_with_EILSEQ; |
20966 |
arg_end += count; |
20967 |
characters++; |
20968 |
} |
20969 |
@@ -2441,14 +2367,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, |
20970 |
converted, &converted_len); |
20971 |
# endif |
20972 |
if (converted == NULL) |
20973 |
- { |
20974 |
- if (!(result == resultbuf || result == NULL)) |
20975 |
- free (result); |
20976 |
- if (buf_malloced != NULL) |
20977 |
- free (buf_malloced); |
20978 |
- CLEANUP (); |
20979 |
- return NULL; |
20980 |
- } |
20981 |
+ goto fail_with_errno; |
20982 |
if (converted != result + length) |
20983 |
{ |
20984 |
ENSURE_ALLOCATION_ELSE (xsum (length, converted_len), |
20985 |
@@ -2590,16 +2509,8 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, |
20986 |
/* Found the terminating NUL. */ |
20987 |
break; |
20988 |
if (count < 0) |
20989 |
- { |
20990 |
- /* Invalid or incomplete multibyte character. */ |
20991 |
- if (!(result == resultbuf || result == NULL)) |
20992 |
- free (result); |
20993 |
- if (buf_malloced != NULL) |
20994 |
- free (buf_malloced); |
20995 |
- CLEANUP (); |
20996 |
- errno = EILSEQ; |
20997 |
- return NULL; |
20998 |
- } |
20999 |
+ /* Invalid or incomplete multibyte character. */ |
21000 |
+ goto fail_with_EILSEQ; |
21001 |
arg_end += count; |
21002 |
characters++; |
21003 |
} |
21004 |
@@ -2626,16 +2537,8 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, |
21005 |
/* Found the terminating NUL. */ |
21006 |
break; |
21007 |
if (count < 0) |
21008 |
- { |
21009 |
- /* Invalid or incomplete multibyte character. */ |
21010 |
- if (!(result == resultbuf || result == NULL)) |
21011 |
- free (result); |
21012 |
- if (buf_malloced != NULL) |
21013 |
- free (buf_malloced); |
21014 |
- CLEANUP (); |
21015 |
- errno = EILSEQ; |
21016 |
- return NULL; |
21017 |
- } |
21018 |
+ /* Invalid or incomplete multibyte character. */ |
21019 |
+ goto fail_with_EILSEQ; |
21020 |
arg_end += count; |
21021 |
characters++; |
21022 |
} |
21023 |
@@ -2752,16 +2655,8 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, |
21024 |
break; |
21025 |
count = local_wcrtomb (cbuf, *arg_end, &state); |
21026 |
if (count < 0) |
21027 |
- { |
21028 |
- /* Cannot convert. */ |
21029 |
- if (!(result == resultbuf || result == NULL)) |
21030 |
- free (result); |
21031 |
- if (buf_malloced != NULL) |
21032 |
- free (buf_malloced); |
21033 |
- CLEANUP (); |
21034 |
- errno = EILSEQ; |
21035 |
- return NULL; |
21036 |
- } |
21037 |
+ /* Cannot convert. */ |
21038 |
+ goto fail_with_EILSEQ; |
21039 |
if (precision < (unsigned int) count) |
21040 |
break; |
21041 |
arg_end++; |
21042 |
@@ -2793,16 +2688,8 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, |
21043 |
break; |
21044 |
count = local_wcrtomb (cbuf, *arg_end, &state); |
21045 |
if (count < 0) |
21046 |
- { |
21047 |
- /* Cannot convert. */ |
21048 |
- if (!(result == resultbuf || result == NULL)) |
21049 |
- free (result); |
21050 |
- if (buf_malloced != NULL) |
21051 |
- free (buf_malloced); |
21052 |
- CLEANUP (); |
21053 |
- errno = EILSEQ; |
21054 |
- return NULL; |
21055 |
- } |
21056 |
+ /* Cannot convert. */ |
21057 |
+ goto fail_with_EILSEQ; |
21058 |
arg_end++; |
21059 |
characters += count; |
21060 |
} |
21061 |
@@ -2859,12 +2746,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, |
21062 |
if (tmpdst == NULL) |
21063 |
{ |
21064 |
free (tmpsrc); |
21065 |
- if (!(result == resultbuf || result == NULL)) |
21066 |
- free (result); |
21067 |
- if (buf_malloced != NULL) |
21068 |
- free (buf_malloced); |
21069 |
- CLEANUP (); |
21070 |
- return NULL; |
21071 |
+ goto fail_with_errno; |
21072 |
} |
21073 |
free (tmpsrc); |
21074 |
# endif |
21075 |
@@ -2938,16 +2820,8 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, |
21076 |
abort (); |
21077 |
count = local_wcrtomb (cbuf, *arg, &state); |
21078 |
if (count <= 0) |
21079 |
- { |
21080 |
- /* Cannot convert. */ |
21081 |
- if (!(result == resultbuf || result == NULL)) |
21082 |
- free (result); |
21083 |
- if (buf_malloced != NULL) |
21084 |
- free (buf_malloced); |
21085 |
- CLEANUP (); |
21086 |
- errno = EILSEQ; |
21087 |
- return NULL; |
21088 |
- } |
21089 |
+ /* Cannot convert. */ |
21090 |
+ goto fail_with_EILSEQ; |
21091 |
ENSURE_ALLOCATION (xsum (length, count)); |
21092 |
memcpy (result + length, cbuf, count); |
21093 |
length += count; |
21094 |
@@ -3083,14 +2957,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, |
21095 |
NULL, |
21096 |
NULL, &tmpdst_len); |
21097 |
if (tmpdst == NULL) |
21098 |
- { |
21099 |
- if (!(result == resultbuf || result == NULL)) |
21100 |
- free (result); |
21101 |
- if (buf_malloced != NULL) |
21102 |
- free (buf_malloced); |
21103 |
- CLEANUP (); |
21104 |
- return NULL; |
21105 |
- } |
21106 |
+ goto fail_with_errno; |
21107 |
# endif |
21108 |
|
21109 |
if (has_width) |
21110 |
@@ -5463,13 +5330,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, |
21111 |
errno = EINVAL; |
21112 |
} |
21113 |
|
21114 |
- if (!(result == resultbuf || result == NULL)) |
21115 |
- free (result); |
21116 |
- if (buf_malloced != NULL) |
21117 |
- free (buf_malloced); |
21118 |
- CLEANUP (); |
21119 |
- |
21120 |
- return NULL; |
21121 |
+ goto fail_with_errno; |
21122 |
} |
21123 |
|
21124 |
#if USE_SNPRINTF |
21125 |
@@ -5603,14 +5464,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, |
21126 |
NULL, |
21127 |
NULL, &tmpdst_len); |
21128 |
if (tmpdst == NULL) |
21129 |
- { |
21130 |
- if (!(result == resultbuf || result == NULL)) |
21131 |
- free (result); |
21132 |
- if (buf_malloced != NULL) |
21133 |
- free (buf_malloced); |
21134 |
- CLEANUP (); |
21135 |
- return NULL; |
21136 |
- } |
21137 |
+ goto fail_with_errno; |
21138 |
ENSURE_ALLOCATION_ELSE (xsum (length, tmpdst_len), |
21139 |
{ free (tmpdst); goto out_of_memory; }); |
21140 |
DCHAR_CPY (result + length, tmpdst, tmpdst_len); |
21141 |
@@ -5835,25 +5689,40 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, |
21142 |
|
21143 |
#if USE_SNPRINTF |
21144 |
overflow: |
21145 |
- if (!(result == resultbuf || result == NULL)) |
21146 |
- free (result); |
21147 |
- if (buf_malloced != NULL) |
21148 |
- free (buf_malloced); |
21149 |
- CLEANUP (); |
21150 |
errno = EOVERFLOW; |
21151 |
- return NULL; |
21152 |
+ goto fail_with_errno; |
21153 |
#endif |
21154 |
|
21155 |
out_of_memory: |
21156 |
- if (!(result == resultbuf || result == NULL)) |
21157 |
+ errno = ENOMEM; |
21158 |
+ goto fail_with_errno; |
21159 |
+ |
21160 |
+#if ENABLE_UNISTDIO || ((!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || (NEED_PRINTF_DIRECTIVE_LS && !defined IN_LIBINTL) || ENABLE_WCHAR_FALLBACK) && HAVE_WCHAR_T) |
21161 |
+ fail_with_EILSEQ: |
21162 |
+ errno = EILSEQ; |
21163 |
+ goto fail_with_errno; |
21164 |
+#endif |
21165 |
+ |
21166 |
+ fail_with_errno: |
21167 |
+ if (result != resultbuf) |
21168 |
free (result); |
21169 |
if (buf_malloced != NULL) |
21170 |
free (buf_malloced); |
21171 |
- out_of_memory_1: |
21172 |
CLEANUP (); |
21173 |
- errno = ENOMEM; |
21174 |
return NULL; |
21175 |
} |
21176 |
+ |
21177 |
+ out_of_memory_1: |
21178 |
+ errno = ENOMEM; |
21179 |
+ goto fail_1_with_errno; |
21180 |
+ |
21181 |
+ fail_1_with_EINVAL: |
21182 |
+ errno = EINVAL; |
21183 |
+ goto fail_1_with_errno; |
21184 |
+ |
21185 |
+ fail_1_with_errno: |
21186 |
+ CLEANUP (); |
21187 |
+ return NULL; |
21188 |
} |
21189 |
|
21190 |
#undef MAX_ROOM_NEEDED |
21191 |
|
21192 |
diff --git a/autotools/gnulib/verify.h b/autotools/gnulib/verify.h |
21193 |
index 07b2f48..c5c63ae 100644 |
21194 |
--- a/autotools/gnulib/verify.h |
21195 |
+++ b/autotools/gnulib/verify.h |
21196 |
@@ -34,7 +34,7 @@ |
21197 |
#ifndef __cplusplus |
21198 |
# if (201112L <= __STDC_VERSION__ \ |
21199 |
|| (!defined __STRICT_ANSI__ \ |
21200 |
- && (4 < __GNUC__ + (6 <= __GNUC_MINOR__) || 4 <= __clang_major__))) |
21201 |
+ && (4 < __GNUC__ + (6 <= __GNUC_MINOR__) || 5 <= __clang_major__))) |
21202 |
# define _GL_HAVE__STATIC_ASSERT 1 |
21203 |
# endif |
21204 |
# if (202000L <= __STDC_VERSION__ \ |
21205 |
@@ -215,6 +215,9 @@ template <int w> |
21206 |
# define _GL_VERIFY(R, DIAGNOSTIC, ...) \ |
21207 |
extern int (*_GL_GENSYM (_gl_verify_function) (void)) \ |
21208 |
[_GL_VERIFY_TRUE (R, DIAGNOSTIC)] |
21209 |
+# if 4 < __GNUC__ + (6 <= __GNUC_MINOR__) |
21210 |
+# pragma GCC diagnostic ignored "-Wnested-externs" |
21211 |
+# endif |
21212 |
#endif |
21213 |
|
21214 |
/* _GL_STATIC_ASSERT_H is defined if this code is copied into assert.h. */ |
21215 |
|
21216 |
diff --git a/autotools/gnulib/wchar.in.h b/autotools/gnulib/wchar.h |
21217 |
similarity index 61% |
21218 |
copy from autotools/gnulib/wchar.in.h |
21219 |
copy to autotools/gnulib/wchar.h |
21220 |
index d7792e5..194ed8b 100644 |
21221 |
--- a/autotools/gnulib/wchar.in.h |
21222 |
+++ b/autotools/gnulib/wchar.h |
21223 |
@@ -1,3 +1,4 @@ |
21224 |
+/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ |
21225 |
/* A substitute for ISO C99 <wchar.h>, for platforms that have issues. |
21226 |
|
21227 |
Copyright (C) 2007-2022 Free Software Foundation, Inc. |
21228 |
@@ -26,9 +27,9 @@ |
21229 |
*/ |
21230 |
|
21231 |
#if __GNUC__ >= 3 |
21232 |
-@PRAGMA_SYSTEM_HEADER@ |
21233 |
+#pragma GCC system_header |
21234 |
#endif |
21235 |
-@PRAGMA_COLUMNS@ |
21236 |
+ |
21237 |
|
21238 |
#if (((defined __need_mbstate_t || defined __need_wint_t) \ |
21239 |
&& !defined __MINGW32__) \ |
21240 |
@@ -52,16 +53,16 @@ |
21241 |
the latter includes <wchar.h>. But here, we have no way to detect whether |
21242 |
<wctype.h> is completely included or is still being included. */ |
21243 |
|
21244 |
-#@INCLUDE_NEXT@ @NEXT_WCHAR_H@ |
21245 |
+#include_next <wchar.h> |
21246 |
|
21247 |
#else |
21248 |
/* Normal invocation convention. */ |
21249 |
|
21250 |
-#ifndef _@GUARD_PREFIX@_WCHAR_H |
21251 |
+#ifndef _GL_WCHAR_H |
21252 |
|
21253 |
#define _GL_ALREADY_INCLUDING_WCHAR_H |
21254 |
|
21255 |
-#if @HAVE_FEATURES_H@ |
21256 |
+#if 0 |
21257 |
# include <features.h> /* for __GLIBC__ */ |
21258 |
#endif |
21259 |
|
21260 |
@@ -75,14 +76,14 @@ |
21261 |
/* Include the original <wchar.h> if it exists. |
21262 |
Some builds of uClibc lack it. */ |
21263 |
/* The include_next requires a split double-inclusion guard. */ |
21264 |
-#if @HAVE_WCHAR_H@ |
21265 |
-# @INCLUDE_NEXT@ @NEXT_WCHAR_H@ |
21266 |
+#if 1 |
21267 |
+# include_next <wchar.h> |
21268 |
#endif |
21269 |
|
21270 |
#undef _GL_ALREADY_INCLUDING_WCHAR_H |
21271 |
|
21272 |
-#ifndef _@GUARD_PREFIX@_WCHAR_H |
21273 |
-#define _@GUARD_PREFIX@_WCHAR_H |
21274 |
+#ifndef _GL_WCHAR_H |
21275 |
+#define _GL_WCHAR_H |
21276 |
|
21277 |
/* _GL_ATTRIBUTE_DEALLOC (F, I) declares that the function returns pointers |
21278 |
that can be freed by passing them as the Ith argument to the |
21279 |
@@ -124,14 +125,520 @@ |
21280 |
#endif |
21281 |
|
21282 |
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ |
21283 |
+/* C++ compatible function declaration macros. |
21284 |
+ Copyright (C) 2010-2022 Free Software Foundation, Inc. |
21285 |
+ |
21286 |
+ This program is free software: you can redistribute it and/or modify it |
21287 |
+ under the terms of the GNU Lesser General Public License as published |
21288 |
+ by the Free Software Foundation; either version 2 of the License, or |
21289 |
+ (at your option) any later version. |
21290 |
+ |
21291 |
+ This program is distributed in the hope that it will be useful, |
21292 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
21293 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
21294 |
+ Lesser General Public License for more details. |
21295 |
+ |
21296 |
+ You should have received a copy of the GNU Lesser General Public License |
21297 |
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
21298 |
+ |
21299 |
+#ifndef _GL_CXXDEFS_H |
21300 |
+#define _GL_CXXDEFS_H |
21301 |
+ |
21302 |
+/* Begin/end the GNULIB_NAMESPACE namespace. */ |
21303 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
21304 |
+# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { |
21305 |
+# define _GL_END_NAMESPACE } |
21306 |
+#else |
21307 |
+# define _GL_BEGIN_NAMESPACE |
21308 |
+# define _GL_END_NAMESPACE |
21309 |
+#endif |
21310 |
+ |
21311 |
+/* The three most frequent use cases of these macros are: |
21312 |
+ |
21313 |
+ * For providing a substitute for a function that is missing on some |
21314 |
+ platforms, but is declared and works fine on the platforms on which |
21315 |
+ it exists: |
21316 |
+ |
21317 |
+ #if @GNULIB_FOO@ |
21318 |
+ # if !@HAVE_FOO@ |
21319 |
+ _GL_FUNCDECL_SYS (foo, ...); |
21320 |
+ # endif |
21321 |
+ _GL_CXXALIAS_SYS (foo, ...); |
21322 |
+ _GL_CXXALIASWARN (foo); |
21323 |
+ #elif defined GNULIB_POSIXCHECK |
21324 |
+ ... |
21325 |
+ #endif |
21326 |
+ |
21327 |
+ * For providing a replacement for a function that exists on all platforms, |
21328 |
+ but is broken/insufficient and needs to be replaced on some platforms: |
21329 |
+ |
21330 |
+ #if @GNULIB_FOO@ |
21331 |
+ # if @REPLACE_FOO@ |
21332 |
+ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
21333 |
+ # undef foo |
21334 |
+ # define foo rpl_foo |
21335 |
+ # endif |
21336 |
+ _GL_FUNCDECL_RPL (foo, ...); |
21337 |
+ _GL_CXXALIAS_RPL (foo, ...); |
21338 |
+ # else |
21339 |
+ _GL_CXXALIAS_SYS (foo, ...); |
21340 |
+ # endif |
21341 |
+ _GL_CXXALIASWARN (foo); |
21342 |
+ #elif defined GNULIB_POSIXCHECK |
21343 |
+ ... |
21344 |
+ #endif |
21345 |
+ |
21346 |
+ * For providing a replacement for a function that exists on some platforms |
21347 |
+ but is broken/insufficient and needs to be replaced on some of them and |
21348 |
+ is additionally either missing or undeclared on some other platforms: |
21349 |
+ |
21350 |
+ #if @GNULIB_FOO@ |
21351 |
+ # if @REPLACE_FOO@ |
21352 |
+ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
21353 |
+ # undef foo |
21354 |
+ # define foo rpl_foo |
21355 |
+ # endif |
21356 |
+ _GL_FUNCDECL_RPL (foo, ...); |
21357 |
+ _GL_CXXALIAS_RPL (foo, ...); |
21358 |
+ # else |
21359 |
+ # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ |
21360 |
+ _GL_FUNCDECL_SYS (foo, ...); |
21361 |
+ # endif |
21362 |
+ _GL_CXXALIAS_SYS (foo, ...); |
21363 |
+ # endif |
21364 |
+ _GL_CXXALIASWARN (foo); |
21365 |
+ #elif defined GNULIB_POSIXCHECK |
21366 |
+ ... |
21367 |
+ #endif |
21368 |
+*/ |
21369 |
+ |
21370 |
+/* _GL_EXTERN_C declaration; |
21371 |
+ performs the declaration with C linkage. */ |
21372 |
+#if defined __cplusplus |
21373 |
+# define _GL_EXTERN_C extern "C" |
21374 |
+#else |
21375 |
+# define _GL_EXTERN_C extern |
21376 |
+#endif |
21377 |
+ |
21378 |
+/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); |
21379 |
+ declares a replacement function, named rpl_func, with the given prototype, |
21380 |
+ consisting of return type, parameters, and attributes. |
21381 |
+ Example: |
21382 |
+ _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) |
21383 |
+ _GL_ARG_NONNULL ((1))); |
21384 |
+ */ |
21385 |
+#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ |
21386 |
+ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) |
21387 |
+#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ |
21388 |
+ _GL_EXTERN_C rettype rpl_func parameters_and_attributes |
21389 |
+ |
21390 |
+/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); |
21391 |
+ declares the system function, named func, with the given prototype, |
21392 |
+ consisting of return type, parameters, and attributes. |
21393 |
+ Example: |
21394 |
+ _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) |
21395 |
+ _GL_ARG_NONNULL ((1))); |
21396 |
+ */ |
21397 |
+#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ |
21398 |
+ _GL_EXTERN_C rettype func parameters_and_attributes |
21399 |
+ |
21400 |
+/* _GL_CXXALIAS_RPL (func, rettype, parameters); |
21401 |
+ declares a C++ alias called GNULIB_NAMESPACE::func |
21402 |
+ that redirects to rpl_func, if GNULIB_NAMESPACE is defined. |
21403 |
+ Example: |
21404 |
+ _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); |
21405 |
+ |
21406 |
+ Wrapping rpl_func in an object with an inline conversion operator |
21407 |
+ avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is |
21408 |
+ actually used in the program. */ |
21409 |
+#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ |
21410 |
+ _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) |
21411 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
21412 |
+# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ |
21413 |
+ namespace GNULIB_NAMESPACE \ |
21414 |
+ { \ |
21415 |
+ static const struct _gl_ ## func ## _wrapper \ |
21416 |
+ { \ |
21417 |
+ typedef rettype (*type) parameters; \ |
21418 |
+ \ |
21419 |
+ inline operator type () const \ |
21420 |
+ { \ |
21421 |
+ return ::rpl_func; \ |
21422 |
+ } \ |
21423 |
+ } func = {}; \ |
21424 |
+ } \ |
21425 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
21426 |
+#else |
21427 |
+# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ |
21428 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
21429 |
+#endif |
21430 |
+ |
21431 |
+/* _GL_CXXALIAS_MDA (func, rettype, parameters); |
21432 |
+ is to be used when func is a Microsoft deprecated alias, on native Windows. |
21433 |
+ It declares a C++ alias called GNULIB_NAMESPACE::func |
21434 |
+ that redirects to _func, if GNULIB_NAMESPACE is defined. |
21435 |
+ Example: |
21436 |
+ _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); |
21437 |
+ */ |
21438 |
+#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ |
21439 |
+ _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) |
21440 |
+ |
21441 |
+/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); |
21442 |
+ is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); |
21443 |
+ except that the C function rpl_func may have a slightly different |
21444 |
+ declaration. A cast is used to silence the "invalid conversion" error |
21445 |
+ that would otherwise occur. */ |
21446 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
21447 |
+# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ |
21448 |
+ namespace GNULIB_NAMESPACE \ |
21449 |
+ { \ |
21450 |
+ static const struct _gl_ ## func ## _wrapper \ |
21451 |
+ { \ |
21452 |
+ typedef rettype (*type) parameters; \ |
21453 |
+ \ |
21454 |
+ inline operator type () const \ |
21455 |
+ { \ |
21456 |
+ return reinterpret_cast<type>(::rpl_func); \ |
21457 |
+ } \ |
21458 |
+ } func = {}; \ |
21459 |
+ } \ |
21460 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
21461 |
+#else |
21462 |
+# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ |
21463 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
21464 |
+#endif |
21465 |
+ |
21466 |
+/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); |
21467 |
+ is like _GL_CXXALIAS_MDA (func, rettype, parameters); |
21468 |
+ except that the C function func may have a slightly different declaration. |
21469 |
+ A cast is used to silence the "invalid conversion" error that would |
21470 |
+ otherwise occur. */ |
21471 |
+#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ |
21472 |
+ _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) |
21473 |
+ |
21474 |
+/* _GL_CXXALIAS_SYS (func, rettype, parameters); |
21475 |
+ declares a C++ alias called GNULIB_NAMESPACE::func |
21476 |
+ that redirects to the system provided function func, if GNULIB_NAMESPACE |
21477 |
+ is defined. |
21478 |
+ Example: |
21479 |
+ _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); |
21480 |
+ |
21481 |
+ Wrapping func in an object with an inline conversion operator |
21482 |
+ avoids a reference to func unless GNULIB_NAMESPACE::func is |
21483 |
+ actually used in the program. */ |
21484 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
21485 |
+# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ |
21486 |
+ namespace GNULIB_NAMESPACE \ |
21487 |
+ { \ |
21488 |
+ static const struct _gl_ ## func ## _wrapper \ |
21489 |
+ { \ |
21490 |
+ typedef rettype (*type) parameters; \ |
21491 |
+ \ |
21492 |
+ inline operator type () const \ |
21493 |
+ { \ |
21494 |
+ return ::func; \ |
21495 |
+ } \ |
21496 |
+ } func = {}; \ |
21497 |
+ } \ |
21498 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
21499 |
+#else |
21500 |
+# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ |
21501 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
21502 |
+#endif |
21503 |
+ |
21504 |
+/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); |
21505 |
+ is like _GL_CXXALIAS_SYS (func, rettype, parameters); |
21506 |
+ except that the C function func may have a slightly different declaration. |
21507 |
+ A cast is used to silence the "invalid conversion" error that would |
21508 |
+ otherwise occur. */ |
21509 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
21510 |
+# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ |
21511 |
+ namespace GNULIB_NAMESPACE \ |
21512 |
+ { \ |
21513 |
+ static const struct _gl_ ## func ## _wrapper \ |
21514 |
+ { \ |
21515 |
+ typedef rettype (*type) parameters; \ |
21516 |
+ \ |
21517 |
+ inline operator type () const \ |
21518 |
+ { \ |
21519 |
+ return reinterpret_cast<type>(::func); \ |
21520 |
+ } \ |
21521 |
+ } func = {}; \ |
21522 |
+ } \ |
21523 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
21524 |
+#else |
21525 |
+# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ |
21526 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
21527 |
+#endif |
21528 |
+ |
21529 |
+/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); |
21530 |
+ is like _GL_CXXALIAS_SYS (func, rettype, parameters); |
21531 |
+ except that the C function is picked among a set of overloaded functions, |
21532 |
+ namely the one with rettype2 and parameters2. Two consecutive casts |
21533 |
+ are used to silence the "cannot find a match" and "invalid conversion" |
21534 |
+ errors that would otherwise occur. */ |
21535 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
21536 |
+ /* The outer cast must be a reinterpret_cast. |
21537 |
+ The inner cast: When the function is defined as a set of overloaded |
21538 |
+ functions, it works as a static_cast<>, choosing the designated variant. |
21539 |
+ When the function is defined as a single variant, it works as a |
21540 |
+ reinterpret_cast<>. The parenthesized cast syntax works both ways. */ |
21541 |
+# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ |
21542 |
+ namespace GNULIB_NAMESPACE \ |
21543 |
+ { \ |
21544 |
+ static const struct _gl_ ## func ## _wrapper \ |
21545 |
+ { \ |
21546 |
+ typedef rettype (*type) parameters; \ |
21547 |
+ \ |
21548 |
+ inline operator type () const \ |
21549 |
+ { \ |
21550 |
+ return reinterpret_cast<type>((rettype2 (*) parameters2)(::func)); \ |
21551 |
+ } \ |
21552 |
+ } func = {}; \ |
21553 |
+ } \ |
21554 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
21555 |
+#else |
21556 |
+# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ |
21557 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
21558 |
+#endif |
21559 |
+ |
21560 |
+/* _GL_CXXALIASWARN (func); |
21561 |
+ causes a warning to be emitted when ::func is used but not when |
21562 |
+ GNULIB_NAMESPACE::func is used. func must be defined without overloaded |
21563 |
+ variants. */ |
21564 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
21565 |
+# define _GL_CXXALIASWARN(func) \ |
21566 |
+ _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) |
21567 |
+# define _GL_CXXALIASWARN_1(func,namespace) \ |
21568 |
+ _GL_CXXALIASWARN_2 (func, namespace) |
21569 |
+/* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>, |
21570 |
+ we enable the warning only when not optimizing. */ |
21571 |
+# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) |
21572 |
+# define _GL_CXXALIASWARN_2(func,namespace) \ |
21573 |
+ _GL_WARN_ON_USE (func, \ |
21574 |
+ "The symbol ::" #func " refers to the system function. " \ |
21575 |
+ "Use " #namespace "::" #func " instead.") |
21576 |
+# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING |
21577 |
+# define _GL_CXXALIASWARN_2(func,namespace) \ |
21578 |
+ extern __typeof__ (func) func |
21579 |
+# else |
21580 |
+# define _GL_CXXALIASWARN_2(func,namespace) \ |
21581 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
21582 |
+# endif |
21583 |
+#else |
21584 |
+# define _GL_CXXALIASWARN(func) \ |
21585 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
21586 |
+#endif |
21587 |
+ |
21588 |
+/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); |
21589 |
+ causes a warning to be emitted when the given overloaded variant of ::func |
21590 |
+ is used but not when GNULIB_NAMESPACE::func is used. */ |
21591 |
+#if defined __cplusplus && defined GNULIB_NAMESPACE |
21592 |
+# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ |
21593 |
+ _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ |
21594 |
+ GNULIB_NAMESPACE) |
21595 |
+# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ |
21596 |
+ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) |
21597 |
+/* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>, |
21598 |
+ we enable the warning only when not optimizing. */ |
21599 |
+# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) |
21600 |
+# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ |
21601 |
+ _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ |
21602 |
+ "The symbol ::" #func " refers to the system function. " \ |
21603 |
+ "Use " #namespace "::" #func " instead.") |
21604 |
+# else |
21605 |
+# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ |
21606 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
21607 |
+# endif |
21608 |
+#else |
21609 |
+# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ |
21610 |
+ _GL_EXTERN_C int _gl_cxxalias_dummy |
21611 |
+#endif |
21612 |
+ |
21613 |
+#endif /* _GL_CXXDEFS_H */ |
21614 |
|
21615 |
/* The definition of _GL_ARG_NONNULL is copied here. */ |
21616 |
+/* A C macro for declaring that specific arguments must not be NULL. |
21617 |
+ Copyright (C) 2009-2022 Free Software Foundation, Inc. |
21618 |
+ |
21619 |
+ This program is free software: you can redistribute it and/or modify it |
21620 |
+ under the terms of the GNU Lesser General Public License as published |
21621 |
+ by the Free Software Foundation; either version 2 of the License, or |
21622 |
+ (at your option) any later version. |
21623 |
+ |
21624 |
+ This program is distributed in the hope that it will be useful, |
21625 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
21626 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
21627 |
+ Lesser General Public License for more details. |
21628 |
+ |
21629 |
+ You should have received a copy of the GNU Lesser General Public License |
21630 |
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
21631 |
+ |
21632 |
+/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools |
21633 |
+ that the values passed as arguments n, ..., m must be non-NULL pointers. |
21634 |
+ n = 1 stands for the first argument, n = 2 for the second argument etc. */ |
21635 |
+#ifndef _GL_ARG_NONNULL |
21636 |
+# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ |
21637 |
+# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) |
21638 |
+# else |
21639 |
+# define _GL_ARG_NONNULL(params) |
21640 |
+# endif |
21641 |
+#endif |
21642 |
|
21643 |
/* The definition of _GL_WARN_ON_USE is copied here. */ |
21644 |
+/* A C macro for emitting warnings if a function is used. |
21645 |
+ Copyright (C) 2010-2022 Free Software Foundation, Inc. |
21646 |
+ |
21647 |
+ This program is free software: you can redistribute it and/or modify it |
21648 |
+ under the terms of the GNU Lesser General Public License as published |
21649 |
+ by the Free Software Foundation; either version 2 of the License, or |
21650 |
+ (at your option) any later version. |
21651 |
+ |
21652 |
+ This program is distributed in the hope that it will be useful, |
21653 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
21654 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
21655 |
+ Lesser General Public License for more details. |
21656 |
+ |
21657 |
+ You should have received a copy of the GNU Lesser General Public License |
21658 |
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
21659 |
+ |
21660 |
+/* _GL_WARN_ON_USE (function, "literal string") issues a declaration |
21661 |
+ for FUNCTION which will then trigger a compiler warning containing |
21662 |
+ the text of "literal string" anywhere that function is called, if |
21663 |
+ supported by the compiler. If the compiler does not support this |
21664 |
+ feature, the macro expands to an unused extern declaration. |
21665 |
+ |
21666 |
+ _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the |
21667 |
+ attribute used in _GL_WARN_ON_USE. If the compiler does not support |
21668 |
+ this feature, it expands to empty. |
21669 |
+ |
21670 |
+ These macros are useful for marking a function as a potential |
21671 |
+ portability trap, with the intent that "literal string" include |
21672 |
+ instructions on the replacement function that should be used |
21673 |
+ instead. |
21674 |
+ _GL_WARN_ON_USE is for functions with 'extern' linkage. |
21675 |
+ _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline' |
21676 |
+ linkage. |
21677 |
+ |
21678 |
+ However, one of the reasons that a function is a portability trap is |
21679 |
+ if it has the wrong signature. Declaring FUNCTION with a different |
21680 |
+ signature in C is a compilation error, so this macro must use the |
21681 |
+ same type as any existing declaration so that programs that avoid |
21682 |
+ the problematic FUNCTION do not fail to compile merely because they |
21683 |
+ included a header that poisoned the function. But this implies that |
21684 |
+ _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already |
21685 |
+ have a declaration. Use of this macro implies that there must not |
21686 |
+ be any other macro hiding the declaration of FUNCTION; but |
21687 |
+ undefining FUNCTION first is part of the poisoning process anyway |
21688 |
+ (although for symbols that are provided only via a macro, the result |
21689 |
+ is a compilation error rather than a warning containing |
21690 |
+ "literal string"). Also note that in C++, it is only safe to use if |
21691 |
+ FUNCTION has no overloads. |
21692 |
+ |
21693 |
+ For an example, it is possible to poison 'getline' by: |
21694 |
+ - adding a call to gl_WARN_ON_USE_PREPARE([[#include <stdio.h>]], |
21695 |
+ [getline]) in configure.ac, which potentially defines |
21696 |
+ HAVE_RAW_DECL_GETLINE |
21697 |
+ - adding this code to a header that wraps the system <stdio.h>: |
21698 |
+ #undef getline |
21699 |
+ #if HAVE_RAW_DECL_GETLINE |
21700 |
+ _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" |
21701 |
+ "not universally present; use the gnulib module getline"); |
21702 |
+ #endif |
21703 |
+ |
21704 |
+ It is not possible to directly poison global variables. But it is |
21705 |
+ possible to write a wrapper accessor function, and poison that |
21706 |
+ (less common usage, like &environ, will cause a compilation error |
21707 |
+ rather than issue the nice warning, but the end result of informing |
21708 |
+ the developer about their portability problem is still achieved): |
21709 |
+ #if HAVE_RAW_DECL_ENVIRON |
21710 |
+ static char *** |
21711 |
+ rpl_environ (void) { return &environ; } |
21712 |
+ _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); |
21713 |
+ # undef environ |
21714 |
+ # define environ (*rpl_environ ()) |
21715 |
+ #endif |
21716 |
+ or better (avoiding contradictory use of 'static' and 'extern'): |
21717 |
+ #if HAVE_RAW_DECL_ENVIRON |
21718 |
+ static char *** |
21719 |
+ _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared") |
21720 |
+ rpl_environ (void) { return &environ; } |
21721 |
+ # undef environ |
21722 |
+ # define environ (*rpl_environ ()) |
21723 |
+ #endif |
21724 |
+ */ |
21725 |
+#ifndef _GL_WARN_ON_USE |
21726 |
+ |
21727 |
+# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) |
21728 |
+/* A compiler attribute is available in gcc versions 4.3.0 and later. */ |
21729 |
+# define _GL_WARN_ON_USE(function, message) \ |
21730 |
+_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) |
21731 |
+# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ |
21732 |
+ __attribute__ ((__warning__ (message))) |
21733 |
+# elif __clang_major__ >= 4 |
21734 |
+/* Another compiler attribute is available in clang. */ |
21735 |
+# define _GL_WARN_ON_USE(function, message) \ |
21736 |
+_GL_WARN_EXTERN_C __typeof__ (function) function \ |
21737 |
+ __attribute__ ((__diagnose_if__ (1, message, "warning"))) |
21738 |
+# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ |
21739 |
+ __attribute__ ((__diagnose_if__ (1, message, "warning"))) |
21740 |
+# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING |
21741 |
+/* Verify the existence of the function. */ |
21742 |
+# define _GL_WARN_ON_USE(function, message) \ |
21743 |
+_GL_WARN_EXTERN_C __typeof__ (function) function |
21744 |
+# define _GL_WARN_ON_USE_ATTRIBUTE(message) |
21745 |
+# else /* Unsupported. */ |
21746 |
+# define _GL_WARN_ON_USE(function, message) \ |
21747 |
+_GL_WARN_EXTERN_C int _gl_warn_on_use |
21748 |
+# define _GL_WARN_ON_USE_ATTRIBUTE(message) |
21749 |
+# endif |
21750 |
+#endif |
21751 |
+ |
21752 |
+/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") |
21753 |
+ is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the |
21754 |
+ function is declared with the given prototype, consisting of return type, |
21755 |
+ parameters, and attributes. |
21756 |
+ This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does |
21757 |
+ not work in this case. */ |
21758 |
+#ifndef _GL_WARN_ON_USE_CXX |
21759 |
+# if !defined __cplusplus |
21760 |
+# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ |
21761 |
+ _GL_WARN_ON_USE (function, msg) |
21762 |
+# else |
21763 |
+# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) |
21764 |
+/* A compiler attribute is available in gcc versions 4.3.0 and later. */ |
21765 |
+# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ |
21766 |
+extern rettype_gcc function parameters_and_attributes \ |
21767 |
+ __attribute__ ((__warning__ (msg))) |
21768 |
+# elif __clang_major__ >= 4 |
21769 |
+/* Another compiler attribute is available in clang. */ |
21770 |
+# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ |
21771 |
+extern rettype_clang function parameters_and_attributes \ |
21772 |
+ __attribute__ ((__diagnose_if__ (1, msg, "warning"))) |
21773 |
+# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING |
21774 |
+/* Verify the existence of the function. */ |
21775 |
+# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ |
21776 |
+extern rettype_gcc function parameters_and_attributes |
21777 |
+# else /* Unsupported. */ |
21778 |
+# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ |
21779 |
+_GL_WARN_EXTERN_C int _gl_warn_on_use |
21780 |
+# endif |
21781 |
+# endif |
21782 |
+#endif |
21783 |
+ |
21784 |
+/* _GL_WARN_EXTERN_C declaration; |
21785 |
+ performs the declaration with C linkage. */ |
21786 |
+#ifndef _GL_WARN_EXTERN_C |
21787 |
+# if defined __cplusplus |
21788 |
+# define _GL_WARN_EXTERN_C extern "C" |
21789 |
+# else |
21790 |
+# define _GL_WARN_EXTERN_C extern |
21791 |
+# endif |
21792 |
+#endif |
21793 |
|
21794 |
|
21795 |
/* Define wint_t and WEOF. (Also done in wctype.in.h.) */ |
21796 |
-#if !@HAVE_WINT_T@ && !defined wint_t |
21797 |
+#if !1 && !defined wint_t |
21798 |
# define wint_t int |
21799 |
# ifndef WEOF |
21800 |
# define WEOF -1 |
21801 |
@@ -140,9 +647,9 @@ |
21802 |
/* mingw and MSVC define wint_t as 'unsigned short' in <crtdefs.h> or |
21803 |
<stddef.h>. This is too small: ISO C 99 section 7.24.1.(2) says that |
21804 |
wint_t must be "unchanged by default argument promotions". Override it. */ |
21805 |
-# if @GNULIBHEADERS_OVERRIDE_WINT_T@ |
21806 |
+# if 0 |
21807 |
# if !GNULIB_defined_wint_t |
21808 |
-# if @HAVE_CRTDEFS_H@ |
21809 |
+# if 0 |
21810 |
# include <crtdefs.h> |
21811 |
# else |
21812 |
# include <stddef.h> |
21813 |
@@ -164,7 +671,7 @@ typedef unsigned int rpl_wint_t; |
21814 |
implementing mbrtowc for encodings like UTF-8. |
21815 |
On AIX and MSVC, mbrtowc needs to be overridden, but mbstate_t exists and is |
21816 |
large enough and overriding it would cause problems in C++ mode. */ |
21817 |
-#if !(((defined _WIN32 && !defined __CYGWIN__) || @HAVE_MBSINIT@) && @HAVE_MBRTOWC@) || @REPLACE_MBSTATE_T@ |
21818 |
+#if !(((defined _WIN32 && !defined __CYGWIN__) || 1) && 1) || 0 |
21819 |
# if !GNULIB_defined_mbstate_t |
21820 |
# if !(defined _AIX || defined _MSC_VER) |
21821 |
typedef int rpl_mbstate_t; |
21822 |
@@ -177,31 +684,47 @@ typedef int rpl_mbstate_t; |
21823 |
|
21824 |
/* Make _GL_ATTRIBUTE_DEALLOC_FREE work, even though <stdlib.h> may not have |
21825 |
been included yet. */ |
21826 |
-#if @GNULIB_FREE_POSIX@ |
21827 |
-# if (@REPLACE_FREE@ && !defined free \ |
21828 |
+#if 1 |
21829 |
+# if (0 && !defined free \ |
21830 |
&& !(defined __cplusplus && defined GNULIB_NAMESPACE)) |
21831 |
/* We can't do '#define free rpl_free' here. */ |
21832 |
_GL_EXTERN_C void rpl_free (void *); |
21833 |
# undef _GL_ATTRIBUTE_DEALLOC_FREE |
21834 |
# define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (rpl_free, 1) |
21835 |
# else |
21836 |
-# if defined _MSC_VER |
21837 |
-_GL_EXTERN_C void __cdecl free (void *); |
21838 |
+# if defined _MSC_VER && !defined free |
21839 |
+_GL_EXTERN_C |
21840 |
+# if defined _DLL |
21841 |
+ __declspec (dllimport) |
21842 |
+# endif |
21843 |
+ void __cdecl free (void *); |
21844 |
# else |
21845 |
+# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) |
21846 |
+_GL_EXTERN_C void free (void *) throw (); |
21847 |
+# else |
21848 |
_GL_EXTERN_C void free (void *); |
21849 |
+# endif |
21850 |
# endif |
21851 |
# endif |
21852 |
#else |
21853 |
-# if defined _MSC_VER |
21854 |
-_GL_EXTERN_C void __cdecl free (void *); |
21855 |
+# if defined _MSC_VER && !defined free |
21856 |
+_GL_EXTERN_C |
21857 |
+# if defined _DLL |
21858 |
+ __declspec (dllimport) |
21859 |
+# endif |
21860 |
+ void __cdecl free (void *); |
21861 |
# else |
21862 |
+# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) |
21863 |
+_GL_EXTERN_C void free (void *) throw (); |
21864 |
+# else |
21865 |
_GL_EXTERN_C void free (void *); |
21866 |
+# endif |
21867 |
# endif |
21868 |
#endif |
21869 |
|
21870 |
/* Convert a single-byte character to a wide character. */ |
21871 |
-#if @GNULIB_BTOWC@ |
21872 |
-# if @REPLACE_BTOWC@ |
21873 |
+#if 0 |
21874 |
+# if 0 |
21875 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
21876 |
# undef btowc |
21877 |
# define btowc rpl_btowc |
21878 |
@@ -209,7 +732,7 @@ _GL_EXTERN_C void free (void *); |
21879 |
_GL_FUNCDECL_RPL (btowc, wint_t, (int c) _GL_ATTRIBUTE_PURE); |
21880 |
_GL_CXXALIAS_RPL (btowc, wint_t, (int c)); |
21881 |
# else |
21882 |
-# if !@HAVE_BTOWC@ |
21883 |
+# if !1 |
21884 |
_GL_FUNCDECL_SYS (btowc, wint_t, (int c) _GL_ATTRIBUTE_PURE); |
21885 |
# endif |
21886 |
/* Need to cast, because on mingw, the return type is 'unsigned short'. */ |
21887 |
@@ -228,8 +751,8 @@ _GL_WARN_ON_USE (btowc, "btowc is unportable - " |
21888 |
|
21889 |
|
21890 |
/* Convert a wide character to a single-byte character. */ |
21891 |
-#if @GNULIB_WCTOB@ |
21892 |
-# if @REPLACE_WCTOB@ |
21893 |
+#if 0 |
21894 |
+# if 0 |
21895 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
21896 |
# undef wctob |
21897 |
# define wctob rpl_wctob |
21898 |
@@ -237,7 +760,7 @@ _GL_WARN_ON_USE (btowc, "btowc is unportable - " |
21899 |
_GL_FUNCDECL_RPL (wctob, int, (wint_t wc) _GL_ATTRIBUTE_PURE); |
21900 |
_GL_CXXALIAS_RPL (wctob, int, (wint_t wc)); |
21901 |
# else |
21902 |
-# if !defined wctob && !@HAVE_DECL_WCTOB@ |
21903 |
+# if !defined wctob && !1 |
21904 |
/* wctob is provided by gnulib, or wctob exists but is not declared. */ |
21905 |
_GL_FUNCDECL_SYS (wctob, int, (wint_t wc) _GL_ATTRIBUTE_PURE); |
21906 |
# endif |
21907 |
@@ -256,8 +779,8 @@ _GL_WARN_ON_USE (wctob, "wctob is unportable - " |
21908 |
|
21909 |
|
21910 |
/* Test whether *PS is in the initial state. */ |
21911 |
-#if @GNULIB_MBSINIT@ |
21912 |
-# if @REPLACE_MBSINIT@ |
21913 |
+#if 0 |
21914 |
+# if 0 |
21915 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
21916 |
# undef mbsinit |
21917 |
# define mbsinit rpl_mbsinit |
21918 |
@@ -265,7 +788,7 @@ _GL_WARN_ON_USE (wctob, "wctob is unportable - " |
21919 |
_GL_FUNCDECL_RPL (mbsinit, int, (const mbstate_t *ps)); |
21920 |
_GL_CXXALIAS_RPL (mbsinit, int, (const mbstate_t *ps)); |
21921 |
# else |
21922 |
-# if !@HAVE_MBSINIT@ |
21923 |
+# if !1 |
21924 |
_GL_FUNCDECL_SYS (mbsinit, int, (const mbstate_t *ps)); |
21925 |
# endif |
21926 |
_GL_CXXALIAS_SYS (mbsinit, int, (const mbstate_t *ps)); |
21927 |
@@ -283,8 +806,8 @@ _GL_WARN_ON_USE (mbsinit, "mbsinit is unportable - " |
21928 |
|
21929 |
|
21930 |
/* Convert a multibyte character to a wide character. */ |
21931 |
-#if @GNULIB_MBRTOWC@ |
21932 |
-# if @REPLACE_MBRTOWC@ |
21933 |
+#if 0 |
21934 |
+# if 0 |
21935 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
21936 |
# undef mbrtowc |
21937 |
# define mbrtowc rpl_mbrtowc |
21938 |
@@ -296,7 +819,7 @@ _GL_CXXALIAS_RPL (mbrtowc, size_t, |
21939 |
(wchar_t *restrict pwc, const char *restrict s, size_t n, |
21940 |
mbstate_t *restrict ps)); |
21941 |
# else |
21942 |
-# if !@HAVE_MBRTOWC@ |
21943 |
+# if !1 |
21944 |
_GL_FUNCDECL_SYS (mbrtowc, size_t, |
21945 |
(wchar_t *restrict pwc, const char *restrict s, size_t n, |
21946 |
mbstate_t *restrict ps)); |
21947 |
@@ -318,8 +841,8 @@ _GL_WARN_ON_USE (mbrtowc, "mbrtowc is unportable - " |
21948 |
|
21949 |
|
21950 |
/* Recognize a multibyte character. */ |
21951 |
-#if @GNULIB_MBRLEN@ |
21952 |
-# if @REPLACE_MBRLEN@ |
21953 |
+#if 0 |
21954 |
+# if 0 |
21955 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
21956 |
# undef mbrlen |
21957 |
# define mbrlen rpl_mbrlen |
21958 |
@@ -329,7 +852,7 @@ _GL_FUNCDECL_RPL (mbrlen, size_t, |
21959 |
_GL_CXXALIAS_RPL (mbrlen, size_t, |
21960 |
(const char *restrict s, size_t n, mbstate_t *restrict ps)); |
21961 |
# else |
21962 |
-# if !@HAVE_MBRLEN@ |
21963 |
+# if !1 |
21964 |
_GL_FUNCDECL_SYS (mbrlen, size_t, |
21965 |
(const char *restrict s, size_t n, mbstate_t *restrict ps)); |
21966 |
# endif |
21967 |
@@ -349,8 +872,8 @@ _GL_WARN_ON_USE (mbrlen, "mbrlen is unportable - " |
21968 |
|
21969 |
|
21970 |
/* Convert a string to a wide string. */ |
21971 |
-#if @GNULIB_MBSRTOWCS@ |
21972 |
-# if @REPLACE_MBSRTOWCS@ |
21973 |
+#if 0 |
21974 |
+# if 0 |
21975 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
21976 |
# undef mbsrtowcs |
21977 |
# define mbsrtowcs rpl_mbsrtowcs |
21978 |
@@ -365,7 +888,7 @@ _GL_CXXALIAS_RPL (mbsrtowcs, size_t, |
21979 |
const char **restrict srcp, size_t len, |
21980 |
mbstate_t *restrict ps)); |
21981 |
# else |
21982 |
-# if !@HAVE_MBSRTOWCS@ |
21983 |
+# if !1 |
21984 |
_GL_FUNCDECL_SYS (mbsrtowcs, size_t, |
21985 |
(wchar_t *restrict dest, |
21986 |
const char **restrict srcp, size_t len, |
21987 |
@@ -390,8 +913,8 @@ _GL_WARN_ON_USE (mbsrtowcs, "mbsrtowcs is unportable - " |
21988 |
|
21989 |
|
21990 |
/* Convert a string to a wide string. */ |
21991 |
-#if @GNULIB_MBSNRTOWCS@ |
21992 |
-# if @REPLACE_MBSNRTOWCS@ |
21993 |
+#if 0 |
21994 |
+# if 0 |
21995 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
21996 |
# undef mbsnrtowcs |
21997 |
# define mbsnrtowcs rpl_mbsnrtowcs |
21998 |
@@ -406,7 +929,7 @@ _GL_CXXALIAS_RPL (mbsnrtowcs, size_t, |
21999 |
const char **restrict srcp, size_t srclen, size_t len, |
22000 |
mbstate_t *restrict ps)); |
22001 |
# else |
22002 |
-# if !@HAVE_MBSNRTOWCS@ |
22003 |
+# if !1 |
22004 |
_GL_FUNCDECL_SYS (mbsnrtowcs, size_t, |
22005 |
(wchar_t *restrict dest, |
22006 |
const char **restrict srcp, size_t srclen, size_t len, |
22007 |
@@ -429,8 +952,8 @@ _GL_WARN_ON_USE (mbsnrtowcs, "mbsnrtowcs is unportable - " |
22008 |
|
22009 |
|
22010 |
/* Convert a wide character to a multibyte character. */ |
22011 |
-#if @GNULIB_WCRTOMB@ |
22012 |
-# if @REPLACE_WCRTOMB@ |
22013 |
+#if 0 |
22014 |
+# if 0 |
22015 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
22016 |
# undef wcrtomb |
22017 |
# define wcrtomb rpl_wcrtomb |
22018 |
@@ -440,7 +963,7 @@ _GL_FUNCDECL_RPL (wcrtomb, size_t, |
22019 |
_GL_CXXALIAS_RPL (wcrtomb, size_t, |
22020 |
(char *restrict s, wchar_t wc, mbstate_t *restrict ps)); |
22021 |
# else |
22022 |
-# if !@HAVE_WCRTOMB@ |
22023 |
+# if !1 |
22024 |
_GL_FUNCDECL_SYS (wcrtomb, size_t, |
22025 |
(char *restrict s, wchar_t wc, mbstate_t *restrict ps)); |
22026 |
# endif |
22027 |
@@ -460,8 +983,8 @@ _GL_WARN_ON_USE (wcrtomb, "wcrtomb is unportable - " |
22028 |
|
22029 |
|
22030 |
/* Convert a wide string to a string. */ |
22031 |
-#if @GNULIB_WCSRTOMBS@ |
22032 |
-# if @REPLACE_WCSRTOMBS@ |
22033 |
+#if 0 |
22034 |
+# if 0 |
22035 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
22036 |
# undef wcsrtombs |
22037 |
# define wcsrtombs rpl_wcsrtombs |
22038 |
@@ -476,7 +999,7 @@ _GL_CXXALIAS_RPL (wcsrtombs, size_t, |
22039 |
size_t len, |
22040 |
mbstate_t *restrict ps)); |
22041 |
# else |
22042 |
-# if !@HAVE_WCSRTOMBS@ |
22043 |
+# if !1 |
22044 |
_GL_FUNCDECL_SYS (wcsrtombs, size_t, |
22045 |
(char *restrict dest, const wchar_t **restrict srcp, |
22046 |
size_t len, |
22047 |
@@ -501,8 +1024,8 @@ _GL_WARN_ON_USE (wcsrtombs, "wcsrtombs is unportable - " |
22048 |
|
22049 |
|
22050 |
/* Convert a wide string to a string. */ |
22051 |
-#if @GNULIB_WCSNRTOMBS@ |
22052 |
-# if @REPLACE_WCSNRTOMBS@ |
22053 |
+#if 0 |
22054 |
+# if 0 |
22055 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
22056 |
# undef wcsnrtombs |
22057 |
# define wcsnrtombs rpl_wcsnrtombs |
22058 |
@@ -519,7 +1042,7 @@ _GL_CXXALIAS_RPL (wcsnrtombs, size_t, |
22059 |
size_t len, |
22060 |
mbstate_t *restrict ps)); |
22061 |
# else |
22062 |
-# if !@HAVE_WCSNRTOMBS@ || (defined __cplusplus && defined __sun) |
22063 |
+# if !1 || (defined __cplusplus && defined __sun) |
22064 |
_GL_FUNCDECL_SYS (wcsnrtombs, size_t, |
22065 |
(char *restrict dest, |
22066 |
const wchar_t **restrict srcp, size_t srclen, |
22067 |
@@ -546,8 +1069,8 @@ _GL_WARN_ON_USE (wcsnrtombs, "wcsnrtombs is unportable - " |
22068 |
|
22069 |
|
22070 |
/* Return the number of screen columns needed for WC. */ |
22071 |
-#if @GNULIB_WCWIDTH@ |
22072 |
-# if @REPLACE_WCWIDTH@ |
22073 |
+#if 0 |
22074 |
+# if 0 |
22075 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
22076 |
# undef wcwidth |
22077 |
# define wcwidth rpl_wcwidth |
22078 |
@@ -555,7 +1078,7 @@ _GL_WARN_ON_USE (wcsnrtombs, "wcsnrtombs is unportable - " |
22079 |
_GL_FUNCDECL_RPL (wcwidth, int, (wchar_t) _GL_ATTRIBUTE_PURE); |
22080 |
_GL_CXXALIAS_RPL (wcwidth, int, (wchar_t)); |
22081 |
# else |
22082 |
-# if !@HAVE_DECL_WCWIDTH@ |
22083 |
+# if !1 |
22084 |
/* wcwidth exists but is not declared. */ |
22085 |
_GL_FUNCDECL_SYS (wcwidth, int, (wchar_t) _GL_ATTRIBUTE_PURE); |
22086 |
# endif |
22087 |
@@ -574,8 +1097,8 @@ _GL_WARN_ON_USE (wcwidth, "wcwidth is unportable - " |
22088 |
|
22089 |
|
22090 |
/* Search N wide characters of S for C. */ |
22091 |
-#if @GNULIB_WMEMCHR@ |
22092 |
-# if !@HAVE_WMEMCHR@ |
22093 |
+#if 0 |
22094 |
+# if !1 |
22095 |
_GL_FUNCDECL_SYS (wmemchr, wchar_t *, (const wchar_t *s, wchar_t c, size_t n) |
22096 |
_GL_ATTRIBUTE_PURE); |
22097 |
# endif |
22098 |
@@ -605,8 +1128,8 @@ _GL_WARN_ON_USE (wmemchr, "wmemchr is unportable - " |
22099 |
|
22100 |
|
22101 |
/* Compare N wide characters of S1 and S2. */ |
22102 |
-#if @GNULIB_WMEMCMP@ |
22103 |
-# if !@HAVE_WMEMCMP@ |
22104 |
+#if 0 |
22105 |
+# if !1 |
22106 |
_GL_FUNCDECL_SYS (wmemcmp, int, |
22107 |
(const wchar_t *s1, const wchar_t *s2, size_t n) |
22108 |
_GL_ATTRIBUTE_PURE); |
22109 |
@@ -626,8 +1149,8 @@ _GL_WARN_ON_USE (wmemcmp, "wmemcmp is unportable - " |
22110 |
|
22111 |
|
22112 |
/* Copy N wide characters of SRC to DEST. */ |
22113 |
-#if @GNULIB_WMEMCPY@ |
22114 |
-# if !@HAVE_WMEMCPY@ |
22115 |
+#if 0 |
22116 |
+# if !1 |
22117 |
_GL_FUNCDECL_SYS (wmemcpy, wchar_t *, |
22118 |
(wchar_t *restrict dest, |
22119 |
const wchar_t *restrict src, size_t n)); |
22120 |
@@ -649,8 +1172,8 @@ _GL_WARN_ON_USE (wmemcpy, "wmemcpy is unportable - " |
22121 |
|
22122 |
/* Copy N wide characters of SRC to DEST, guaranteeing correct behavior for |
22123 |
overlapping memory areas. */ |
22124 |
-#if @GNULIB_WMEMMOVE@ |
22125 |
-# if !@HAVE_WMEMMOVE@ |
22126 |
+#if 0 |
22127 |
+# if !1 |
22128 |
_GL_FUNCDECL_SYS (wmemmove, wchar_t *, |
22129 |
(wchar_t *dest, const wchar_t *src, size_t n)); |
22130 |
# endif |
22131 |
@@ -670,8 +1193,8 @@ _GL_WARN_ON_USE (wmemmove, "wmemmove is unportable - " |
22132 |
|
22133 |
/* Copy N wide characters of SRC to DEST. |
22134 |
Return pointer to wide characters after the last written wide character. */ |
22135 |
-#if @GNULIB_WMEMPCPY@ |
22136 |
-# if !@HAVE_WMEMPCPY@ |
22137 |
+#if 0 |
22138 |
+# if !1 |
22139 |
_GL_FUNCDECL_SYS (wmempcpy, wchar_t *, |
22140 |
(wchar_t *restrict dest, |
22141 |
const wchar_t *restrict src, size_t n)); |
22142 |
@@ -692,8 +1215,8 @@ _GL_WARN_ON_USE (wmempcpy, "wmempcpy is unportable - " |
22143 |
|
22144 |
|
22145 |
/* Set N wide characters of S to C. */ |
22146 |
-#if @GNULIB_WMEMSET@ |
22147 |
-# if !@HAVE_WMEMSET@ |
22148 |
+#if 0 |
22149 |
+# if !1 |
22150 |
_GL_FUNCDECL_SYS (wmemset, wchar_t *, (wchar_t *s, wchar_t c, size_t n)); |
22151 |
# endif |
22152 |
_GL_CXXALIAS_SYS (wmemset, wchar_t *, (wchar_t *s, wchar_t c, size_t n)); |
22153 |
@@ -710,8 +1233,8 @@ _GL_WARN_ON_USE (wmemset, "wmemset is unportable - " |
22154 |
|
22155 |
|
22156 |
/* Return the number of wide characters in S. */ |
22157 |
-#if @GNULIB_WCSLEN@ |
22158 |
-# if !@HAVE_WCSLEN@ |
22159 |
+#if 0 |
22160 |
+# if !1 |
22161 |
_GL_FUNCDECL_SYS (wcslen, size_t, (const wchar_t *s) _GL_ATTRIBUTE_PURE); |
22162 |
# endif |
22163 |
_GL_CXXALIAS_SYS (wcslen, size_t, (const wchar_t *s)); |
22164 |
@@ -728,8 +1251,8 @@ _GL_WARN_ON_USE (wcslen, "wcslen is unportable - " |
22165 |
|
22166 |
|
22167 |
/* Return the number of wide characters in S, but at most MAXLEN. */ |
22168 |
-#if @GNULIB_WCSNLEN@ |
22169 |
-# if !@HAVE_WCSNLEN@ |
22170 |
+#if 0 |
22171 |
+# if !1 |
22172 |
_GL_FUNCDECL_SYS (wcsnlen, size_t, (const wchar_t *s, size_t maxlen) |
22173 |
_GL_ATTRIBUTE_PURE); |
22174 |
# endif |
22175 |
@@ -745,8 +1268,8 @@ _GL_WARN_ON_USE (wcsnlen, "wcsnlen is unportable - " |
22176 |
|
22177 |
|
22178 |
/* Copy SRC to DEST. */ |
22179 |
-#if @GNULIB_WCSCPY@ |
22180 |
-# if !@HAVE_WCSCPY@ |
22181 |
+#if 0 |
22182 |
+# if !1 |
22183 |
_GL_FUNCDECL_SYS (wcscpy, wchar_t *, |
22184 |
(wchar_t *restrict dest, const wchar_t *restrict src)); |
22185 |
# endif |
22186 |
@@ -765,8 +1288,8 @@ _GL_WARN_ON_USE (wcscpy, "wcscpy is unportable - " |
22187 |
|
22188 |
|
22189 |
/* Copy SRC to DEST, returning the address of the terminating L'\0' in DEST. */ |
22190 |
-#if @GNULIB_WCPCPY@ |
22191 |
-# if !@HAVE_WCPCPY@ |
22192 |
+#if 0 |
22193 |
+# if !1 |
22194 |
_GL_FUNCDECL_SYS (wcpcpy, wchar_t *, |
22195 |
(wchar_t *restrict dest, const wchar_t *restrict src)); |
22196 |
# endif |
22197 |
@@ -783,8 +1306,8 @@ _GL_WARN_ON_USE (wcpcpy, "wcpcpy is unportable - " |
22198 |
|
22199 |
|
22200 |
/* Copy no more than N wide characters of SRC to DEST. */ |
22201 |
-#if @GNULIB_WCSNCPY@ |
22202 |
-# if !@HAVE_WCSNCPY@ |
22203 |
+#if 0 |
22204 |
+# if !1 |
22205 |
_GL_FUNCDECL_SYS (wcsncpy, wchar_t *, |
22206 |
(wchar_t *restrict dest, |
22207 |
const wchar_t *restrict src, size_t n)); |
22208 |
@@ -806,8 +1329,8 @@ _GL_WARN_ON_USE (wcsncpy, "wcsncpy is unportable - " |
22209 |
|
22210 |
/* Copy no more than N characters of SRC to DEST, returning the address of |
22211 |
the last character written into DEST. */ |
22212 |
-#if @GNULIB_WCPNCPY@ |
22213 |
-# if !@HAVE_WCPNCPY@ |
22214 |
+#if 0 |
22215 |
+# if !1 |
22216 |
_GL_FUNCDECL_SYS (wcpncpy, wchar_t *, |
22217 |
(wchar_t *restrict dest, |
22218 |
const wchar_t *restrict src, size_t n)); |
22219 |
@@ -826,8 +1349,8 @@ _GL_WARN_ON_USE (wcpncpy, "wcpncpy is unportable - " |
22220 |
|
22221 |
|
22222 |
/* Append SRC onto DEST. */ |
22223 |
-#if @GNULIB_WCSCAT@ |
22224 |
-# if !@HAVE_WCSCAT@ |
22225 |
+#if 0 |
22226 |
+# if !1 |
22227 |
_GL_FUNCDECL_SYS (wcscat, wchar_t *, |
22228 |
(wchar_t *restrict dest, const wchar_t *restrict src)); |
22229 |
# endif |
22230 |
@@ -846,8 +1369,8 @@ _GL_WARN_ON_USE (wcscat, "wcscat is unportable - " |
22231 |
|
22232 |
|
22233 |
/* Append no more than N wide characters of SRC onto DEST. */ |
22234 |
-#if @GNULIB_WCSNCAT@ |
22235 |
-# if !@HAVE_WCSNCAT@ |
22236 |
+#if 0 |
22237 |
+# if !1 |
22238 |
_GL_FUNCDECL_SYS (wcsncat, wchar_t *, |
22239 |
(wchar_t *restrict dest, const wchar_t *restrict src, |
22240 |
size_t n)); |
22241 |
@@ -868,8 +1391,8 @@ _GL_WARN_ON_USE (wcsncat, "wcsncat is unportable - " |
22242 |
|
22243 |
|
22244 |
/* Compare S1 and S2. */ |
22245 |
-#if @GNULIB_WCSCMP@ |
22246 |
-# if !@HAVE_WCSCMP@ |
22247 |
+#if 0 |
22248 |
+# if !1 |
22249 |
_GL_FUNCDECL_SYS (wcscmp, int, (const wchar_t *s1, const wchar_t *s2) |
22250 |
_GL_ATTRIBUTE_PURE); |
22251 |
# endif |
22252 |
@@ -887,8 +1410,8 @@ _GL_WARN_ON_USE (wcscmp, "wcscmp is unportable - " |
22253 |
|
22254 |
|
22255 |
/* Compare no more than N wide characters of S1 and S2. */ |
22256 |
-#if @GNULIB_WCSNCMP@ |
22257 |
-# if !@HAVE_WCSNCMP@ |
22258 |
+#if 0 |
22259 |
+# if !1 |
22260 |
_GL_FUNCDECL_SYS (wcsncmp, int, |
22261 |
(const wchar_t *s1, const wchar_t *s2, size_t n) |
22262 |
_GL_ATTRIBUTE_PURE); |
22263 |
@@ -908,8 +1431,8 @@ _GL_WARN_ON_USE (wcsncmp, "wcsncmp is unportable - " |
22264 |
|
22265 |
|
22266 |
/* Compare S1 and S2, ignoring case. */ |
22267 |
-#if @GNULIB_WCSCASECMP@ |
22268 |
-# if !@HAVE_WCSCASECMP@ |
22269 |
+#if 0 |
22270 |
+# if !1 |
22271 |
_GL_FUNCDECL_SYS (wcscasecmp, int, (const wchar_t *s1, const wchar_t *s2) |
22272 |
_GL_ATTRIBUTE_PURE); |
22273 |
# endif |
22274 |
@@ -925,8 +1448,8 @@ _GL_WARN_ON_USE (wcscasecmp, "wcscasecmp is unportable - " |
22275 |
|
22276 |
|
22277 |
/* Compare no more than N chars of S1 and S2, ignoring case. */ |
22278 |
-#if @GNULIB_WCSNCASECMP@ |
22279 |
-# if !@HAVE_WCSNCASECMP@ |
22280 |
+#if 0 |
22281 |
+# if !1 |
22282 |
_GL_FUNCDECL_SYS (wcsncasecmp, int, |
22283 |
(const wchar_t *s1, const wchar_t *s2, size_t n) |
22284 |
_GL_ATTRIBUTE_PURE); |
22285 |
@@ -945,8 +1468,8 @@ _GL_WARN_ON_USE (wcsncasecmp, "wcsncasecmp is unportable - " |
22286 |
|
22287 |
/* Compare S1 and S2, both interpreted as appropriate to the LC_COLLATE |
22288 |
category of the current locale. */ |
22289 |
-#if @GNULIB_WCSCOLL@ |
22290 |
-# if !@HAVE_WCSCOLL@ |
22291 |
+#if 0 |
22292 |
+# if !1 |
22293 |
_GL_FUNCDECL_SYS (wcscoll, int, (const wchar_t *s1, const wchar_t *s2)); |
22294 |
# endif |
22295 |
_GL_CXXALIAS_SYS (wcscoll, int, (const wchar_t *s1, const wchar_t *s2)); |
22296 |
@@ -965,8 +1488,8 @@ _GL_WARN_ON_USE (wcscoll, "wcscoll is unportable - " |
22297 |
/* Transform S2 into array pointed to by S1 such that if wcscmp is applied |
22298 |
to two transformed strings the result is the as applying 'wcscoll' to the |
22299 |
original strings. */ |
22300 |
-#if @GNULIB_WCSXFRM@ |
22301 |
-# if !@HAVE_WCSXFRM@ |
22302 |
+#if 0 |
22303 |
+# if !1 |
22304 |
_GL_FUNCDECL_SYS (wcsxfrm, size_t, |
22305 |
(wchar_t *restrict s1, const wchar_t *restrict s2, size_t n)); |
22306 |
# endif |
22307 |
@@ -985,7 +1508,7 @@ _GL_WARN_ON_USE (wcsxfrm, "wcsxfrm is unportable - " |
22308 |
|
22309 |
|
22310 |
/* Duplicate S, returning an identical malloc'd string. */ |
22311 |
-#if @GNULIB_WCSDUP@ |
22312 |
+#if 0 |
22313 |
# if defined _WIN32 && !defined __CYGWIN__ |
22314 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
22315 |
# undef wcsdup |
22316 |
@@ -993,7 +1516,7 @@ _GL_WARN_ON_USE (wcsxfrm, "wcsxfrm is unportable - " |
22317 |
# endif |
22318 |
_GL_CXXALIAS_MDA (wcsdup, wchar_t *, (const wchar_t *s)); |
22319 |
# else |
22320 |
-# if !@HAVE_WCSDUP@ || __GNUC__ >= 11 |
22321 |
+# if !1 || __GNUC__ >= 11 |
22322 |
_GL_FUNCDECL_SYS (wcsdup, wchar_t *, |
22323 |
(const wchar_t *s) |
22324 |
_GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); |
22325 |
@@ -1014,7 +1537,7 @@ _GL_FUNCDECL_SYS (wcsdup, wchar_t *, |
22326 |
_GL_WARN_ON_USE (wcsdup, "wcsdup is unportable - " |
22327 |
"use gnulib module wcsdup for portability"); |
22328 |
# endif |
22329 |
-# elif @GNULIB_MDA_WCSDUP@ |
22330 |
+# elif 1 |
22331 |
/* On native Windows, map 'wcsdup' to '_wcsdup', so that -loldnames is not |
22332 |
required. In C++ with GNULIB_NAMESPACE, avoid differences between |
22333 |
platforms by defining GNULIB_NAMESPACE::wcsdup always. */ |
22334 |
@@ -1028,11 +1551,11 @@ _GL_CXXALIAS_MDA (wcsdup, wchar_t *, (const wchar_t *s)); |
22335 |
_GL_FUNCDECL_SYS (wcsdup, wchar_t *, |
22336 |
(const wchar_t *s) |
22337 |
_GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); |
22338 |
-# if @HAVE_DECL_WCSDUP@ |
22339 |
+# if 1 |
22340 |
_GL_CXXALIAS_SYS (wcsdup, wchar_t *, (const wchar_t *s)); |
22341 |
# endif |
22342 |
# endif |
22343 |
-# if (defined _WIN32 && !defined __CYGWIN__) || @HAVE_DECL_WCSDUP@ |
22344 |
+# if (defined _WIN32 && !defined __CYGWIN__) || 1 |
22345 |
_GL_CXXALIASWARN (wcsdup); |
22346 |
# endif |
22347 |
# endif |
22348 |
@@ -1040,8 +1563,8 @@ _GL_CXXALIASWARN (wcsdup); |
22349 |
|
22350 |
|
22351 |
/* Find the first occurrence of WC in WCS. */ |
22352 |
-#if @GNULIB_WCSCHR@ |
22353 |
-# if !@HAVE_WCSCHR@ |
22354 |
+#if 0 |
22355 |
+# if !1 |
22356 |
_GL_FUNCDECL_SYS (wcschr, wchar_t *, (const wchar_t *wcs, wchar_t wc) |
22357 |
_GL_ATTRIBUTE_PURE); |
22358 |
# endif |
22359 |
@@ -1070,8 +1593,8 @@ _GL_WARN_ON_USE (wcschr, "wcschr is unportable - " |
22360 |
|
22361 |
|
22362 |
/* Find the last occurrence of WC in WCS. */ |
22363 |
-#if @GNULIB_WCSRCHR@ |
22364 |
-# if !@HAVE_WCSRCHR@ |
22365 |
+#if 0 |
22366 |
+# if !1 |
22367 |
_GL_FUNCDECL_SYS (wcsrchr, wchar_t *, (const wchar_t *wcs, wchar_t wc) |
22368 |
_GL_ATTRIBUTE_PURE); |
22369 |
# endif |
22370 |
@@ -1101,8 +1624,8 @@ _GL_WARN_ON_USE (wcsrchr, "wcsrchr is unportable - " |
22371 |
|
22372 |
/* Return the length of the initial segmet of WCS which consists entirely |
22373 |
of wide characters not in REJECT. */ |
22374 |
-#if @GNULIB_WCSCSPN@ |
22375 |
-# if !@HAVE_WCSCSPN@ |
22376 |
+#if 0 |
22377 |
+# if !1 |
22378 |
_GL_FUNCDECL_SYS (wcscspn, size_t, (const wchar_t *wcs, const wchar_t *reject) |
22379 |
_GL_ATTRIBUTE_PURE); |
22380 |
# endif |
22381 |
@@ -1121,8 +1644,8 @@ _GL_WARN_ON_USE (wcscspn, "wcscspn is unportable - " |
22382 |
|
22383 |
/* Return the length of the initial segmet of WCS which consists entirely |
22384 |
of wide characters in ACCEPT. */ |
22385 |
-#if @GNULIB_WCSSPN@ |
22386 |
-# if !@HAVE_WCSSPN@ |
22387 |
+#if 0 |
22388 |
+# if !1 |
22389 |
_GL_FUNCDECL_SYS (wcsspn, size_t, (const wchar_t *wcs, const wchar_t *accept) |
22390 |
_GL_ATTRIBUTE_PURE); |
22391 |
# endif |
22392 |
@@ -1140,8 +1663,8 @@ _GL_WARN_ON_USE (wcsspn, "wcsspn is unportable - " |
22393 |
|
22394 |
|
22395 |
/* Find the first occurrence in WCS of any character in ACCEPT. */ |
22396 |
-#if @GNULIB_WCSPBRK@ |
22397 |
-# if !@HAVE_WCSPBRK@ |
22398 |
+#if 0 |
22399 |
+# if !1 |
22400 |
_GL_FUNCDECL_SYS (wcspbrk, wchar_t *, |
22401 |
(const wchar_t *wcs, const wchar_t *accept) |
22402 |
_GL_ATTRIBUTE_PURE); |
22403 |
@@ -1173,8 +1696,8 @@ _GL_WARN_ON_USE (wcspbrk, "wcspbrk is unportable - " |
22404 |
|
22405 |
|
22406 |
/* Find the first occurrence of NEEDLE in HAYSTACK. */ |
22407 |
-#if @GNULIB_WCSSTR@ |
22408 |
-# if !@HAVE_WCSSTR@ |
22409 |
+#if 0 |
22410 |
+# if !1 |
22411 |
_GL_FUNCDECL_SYS (wcsstr, wchar_t *, |
22412 |
(const wchar_t *restrict haystack, |
22413 |
const wchar_t *restrict needle) |
22414 |
@@ -1211,8 +1734,8 @@ _GL_WARN_ON_USE (wcsstr, "wcsstr is unportable - " |
22415 |
|
22416 |
|
22417 |
/* Divide WCS into tokens separated by characters in DELIM. */ |
22418 |
-#if @GNULIB_WCSTOK@ |
22419 |
-# if @REPLACE_WCSTOK@ |
22420 |
+#if 0 |
22421 |
+# if 0 |
22422 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
22423 |
# undef wcstok |
22424 |
# define wcstok rpl_wcstok |
22425 |
@@ -1224,7 +1747,7 @@ _GL_CXXALIAS_RPL (wcstok, wchar_t *, |
22426 |
(wchar_t *restrict wcs, const wchar_t *restrict delim, |
22427 |
wchar_t **restrict ptr)); |
22428 |
# else |
22429 |
-# if !@HAVE_WCSTOK@ |
22430 |
+# if !1 |
22431 |
_GL_FUNCDECL_SYS (wcstok, wchar_t *, |
22432 |
(wchar_t *restrict wcs, const wchar_t *restrict delim, |
22433 |
wchar_t **restrict ptr)); |
22434 |
@@ -1247,8 +1770,8 @@ _GL_WARN_ON_USE (wcstok, "wcstok is unportable - " |
22435 |
|
22436 |
/* Determine number of column positions required for first N wide |
22437 |
characters (or fewer if S ends before this) in S. */ |
22438 |
-#if @GNULIB_WCSWIDTH@ |
22439 |
-# if @REPLACE_WCSWIDTH@ |
22440 |
+#if 0 |
22441 |
+# if 0 |
22442 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
22443 |
# undef wcswidth |
22444 |
# define wcswidth rpl_wcswidth |
22445 |
@@ -1257,7 +1780,7 @@ _GL_FUNCDECL_RPL (wcswidth, int, (const wchar_t *s, size_t n) |
22446 |
_GL_ATTRIBUTE_PURE); |
22447 |
_GL_CXXALIAS_RPL (wcswidth, int, (const wchar_t *s, size_t n)); |
22448 |
# else |
22449 |
-# if !@HAVE_WCSWIDTH@ |
22450 |
+# if !1 |
22451 |
_GL_FUNCDECL_SYS (wcswidth, int, (const wchar_t *s, size_t n) |
22452 |
_GL_ATTRIBUTE_PURE); |
22453 |
# endif |
22454 |
@@ -1277,8 +1800,8 @@ _GL_WARN_ON_USE (wcswidth, "wcswidth is unportable - " |
22455 |
|
22456 |
/* Convert *TP to a date and time wide string. See |
22457 |
<https://pubs.opengroup.org/onlinepubs/9699919799/functions/wcsftime.html>. */ |
22458 |
-#if @GNULIB_WCSFTIME@ |
22459 |
-# if @REPLACE_WCSFTIME@ |
22460 |
+#if 0 |
22461 |
+# if 0 |
22462 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
22463 |
# undef wcsftime |
22464 |
# define wcsftime rpl_wcsftime |
22465 |
@@ -1293,7 +1816,7 @@ _GL_CXXALIAS_RPL (wcsftime, size_t, |
22466 |
const wchar_t *restrict __fmt, |
22467 |
const struct tm *restrict __tp)); |
22468 |
# else |
22469 |
-# if !@HAVE_WCSFTIME@ |
22470 |
+# if !1 |
22471 |
_GL_FUNCDECL_SYS (wcsftime, size_t, |
22472 |
(wchar_t *restrict __buf, size_t __bufsize, |
22473 |
const wchar_t *restrict __fmt, |
22474 |
@@ -1317,6 +1840,6 @@ _GL_WARN_ON_USE (wcsftime, "wcsftime is unportable - " |
22475 |
#endif |
22476 |
|
22477 |
|
22478 |
-#endif /* _@GUARD_PREFIX@_WCHAR_H */ |
22479 |
-#endif /* _@GUARD_PREFIX@_WCHAR_H */ |
22480 |
+#endif /* _GL_WCHAR_H */ |
22481 |
+#endif /* _GL_WCHAR_H */ |
22482 |
#endif |
22483 |
|
22484 |
diff --git a/autotools/gnulib/wchar.in.h b/autotools/gnulib/wchar.in.h |
22485 |
index d7792e5..835ddbe 100644 |
22486 |
--- a/autotools/gnulib/wchar.in.h |
22487 |
+++ b/autotools/gnulib/wchar.in.h |
22488 |
@@ -185,17 +185,33 @@ _GL_EXTERN_C void rpl_free (void *); |
22489 |
# undef _GL_ATTRIBUTE_DEALLOC_FREE |
22490 |
# define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (rpl_free, 1) |
22491 |
# else |
22492 |
-# if defined _MSC_VER |
22493 |
-_GL_EXTERN_C void __cdecl free (void *); |
22494 |
+# if defined _MSC_VER && !defined free |
22495 |
+_GL_EXTERN_C |
22496 |
+# if defined _DLL |
22497 |
+ __declspec (dllimport) |
22498 |
+# endif |
22499 |
+ void __cdecl free (void *); |
22500 |
# else |
22501 |
+# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) |
22502 |
+_GL_EXTERN_C void free (void *) throw (); |
22503 |
+# else |
22504 |
_GL_EXTERN_C void free (void *); |
22505 |
+# endif |
22506 |
# endif |
22507 |
# endif |
22508 |
#else |
22509 |
-# if defined _MSC_VER |
22510 |
-_GL_EXTERN_C void __cdecl free (void *); |
22511 |
+# if defined _MSC_VER && !defined free |
22512 |
+_GL_EXTERN_C |
22513 |
+# if defined _DLL |
22514 |
+ __declspec (dllimport) |
22515 |
+# endif |
22516 |
+ void __cdecl free (void *); |
22517 |
# else |
22518 |
+# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) |
22519 |
+_GL_EXTERN_C void free (void *) throw (); |
22520 |
+# else |
22521 |
_GL_EXTERN_C void free (void *); |
22522 |
+# endif |
22523 |
# endif |
22524 |
#endif |
22525 |
|
22526 |
|
22527 |
diff --git a/autotools/m4/gnulib-cache.m4 b/autotools/m4/gnulib-cache.m4 |
22528 |
index fed003e..80378b9 100644 |
22529 |
--- a/autotools/m4/gnulib-cache.m4 |
22530 |
+++ b/autotools/m4/gnulib-cache.m4 |
22531 |
@@ -53,6 +53,7 @@ |
22532 |
# stat-time \ |
22533 |
# strcasestr-simple \ |
22534 |
# strncat \ |
22535 |
+# strtoll \ |
22536 |
# symlinkat \ |
22537 |
# sys_stat \ |
22538 |
# unlinkat \ |
22539 |
@@ -78,6 +79,7 @@ gl_MODULES([ |
22540 |
stat-time |
22541 |
strcasestr-simple |
22542 |
strncat |
22543 |
+ strtoll |
22544 |
symlinkat |
22545 |
sys_stat |
22546 |
unlinkat |
22547 |
|
22548 |
diff --git a/autotools/m4/gnulib-common.m4 b/autotools/m4/gnulib-common.m4 |
22549 |
index dbc4079..30911d1 100644 |
22550 |
--- a/autotools/m4/gnulib-common.m4 |
22551 |
+++ b/autotools/m4/gnulib-common.m4 |
22552 |
@@ -1,4 +1,4 @@ |
22553 |
-# gnulib-common.m4 serial 72 |
22554 |
+# gnulib-common.m4 serial 73 |
22555 |
dnl Copyright (C) 2007-2022 Free Software Foundation, Inc. |
22556 |
dnl This file is free software; the Free Software Foundation |
22557 |
dnl gives unlimited permission to copy and/or distribute it, |
22558 |
@@ -69,7 +69,9 @@ AC_DEFUN([gl_COMMON_BODY], [ |
22559 |
[/* Attributes. */ |
22560 |
#if (defined __has_attribute \ |
22561 |
&& (!defined __clang_minor__ \ |
22562 |
- || 3 < __clang_major__ + (5 <= __clang_minor__))) |
22563 |
+ || (defined __apple_build_version__ \ |
22564 |
+ ? 6000000 <= __apple_build_version__ \ |
22565 |
+ : 3 < __clang_major__ + (5 <= __clang_minor__)))) |
22566 |
# define _GL_HAS_ATTRIBUTE(attr) __has_attribute (__##attr##__) |
22567 |
#else |
22568 |
# define _GL_HAS_ATTRIBUTE(attr) _GL_ATTR_##attr |
22569 |
@@ -104,6 +106,10 @@ AC_DEFUN([gl_COMMON_BODY], [ |
22570 |
#endif |
22571 |
|
22572 |
#ifdef __has_c_attribute |
22573 |
+# if ((defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) <= 201710 \ |
22574 |
+ && _GL_GNUC_PREREQ (4, 6)) |
22575 |
+# pragma GCC diagnostic ignored "-Wpedantic" |
22576 |
+# endif |
22577 |
# define _GL_HAS_C_ATTRIBUTE(attr) __has_c_attribute (__##attr##__) |
22578 |
#else |
22579 |
# define _GL_HAS_C_ATTRIBUTE(attr) 0 |
22580 |
|
22581 |
diff --git a/autotools/m4/gnulib-comp.m4 b/autotools/m4/gnulib-comp.m4 |
22582 |
index 33e6417..3e37436 100644 |
22583 |
--- a/autotools/m4/gnulib-comp.m4 |
22584 |
+++ b/autotools/m4/gnulib-comp.m4 |
22585 |
@@ -42,7 +42,6 @@ AC_DEFUN([gl_EARLY], |
22586 |
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) |
22587 |
AC_REQUIRE([gl_PROG_AR_RANLIB]) |
22588 |
|
22589 |
- AC_REQUIRE([AM_PROG_CC_C_O]) |
22590 |
# Code from module absolute-header: |
22591 |
# Code from module alloca-opt: |
22592 |
# Code from module assure: |
22593 |
@@ -166,7 +165,6 @@ AC_DEFUN([gl_EARLY], |
22594 |
# Code from module ssize_t: |
22595 |
# Code from module stat: |
22596 |
# Code from module stat-time: |
22597 |
- # Code from module statat: |
22598 |
# Code from module std-gnu11: |
22599 |
# Code from module stdalign: |
22600 |
# Code from module stdbool: |
22601 |
@@ -182,6 +180,7 @@ AC_DEFUN([gl_EARLY], |
22602 |
# Code from module string: |
22603 |
# Code from module strings: |
22604 |
# Code from module strncat: |
22605 |
+ # Code from module strtoll: |
22606 |
# Code from module symlink: |
22607 |
# Code from module symlinkat: |
22608 |
# Code from module sys_stat: |
22609 |
@@ -606,7 +605,6 @@ AC_DEFUN([gl_INIT], |
22610 |
gl_SYS_STAT_MODULE_INDICATOR([stat]) |
22611 |
gl_STAT_TIME |
22612 |
gl_STAT_BIRTHTIME |
22613 |
- gl_MODULE_INDICATOR([statat]) dnl for lib/openat.h |
22614 |
gl_STDALIGN_H |
22615 |
gl_CONDITIONAL_HEADER([stdalign.h]) |
22616 |
AC_PROG_MKDIR_P |
22617 |
@@ -697,6 +695,13 @@ AC_DEFUN([gl_INIT], |
22618 |
gl_PREREQ_STRNCAT |
22619 |
]) |
22620 |
gl_STRING_MODULE_INDICATOR([strncat]) |
22621 |
+ gl_FUNC_STRTOLL |
22622 |
+ gl_CONDITIONAL([GL_COND_OBJ_STRTOLL], |
22623 |
+ [test $HAVE_STRTOLL = 0 || test $REPLACE_STRTOLL = 1]) |
22624 |
+ AM_COND_IF([GL_COND_OBJ_STRTOLL], [ |
22625 |
+ gl_PREREQ_STRTOLL |
22626 |
+ ]) |
22627 |
+ gl_STDLIB_MODULE_INDICATOR([strtoll]) |
22628 |
gl_FUNC_SYMLINK |
22629 |
gl_CONDITIONAL([GL_COND_OBJ_SYMLINK], |
22630 |
[test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1]) |
22631 |
@@ -1091,7 +1096,6 @@ AC_DEFUN([gl_FILE_LIST], [ |
22632 |
lib/stat-w32.c |
22633 |
lib/stat-w32.h |
22634 |
lib/stat.c |
22635 |
- lib/statat.c |
22636 |
lib/stdalign.in.h |
22637 |
lib/stdbool.in.h |
22638 |
lib/stddef.in.h |
22639 |
@@ -1112,6 +1116,8 @@ AC_DEFUN([gl_FILE_LIST], [ |
22640 |
lib/stripslash.c |
22641 |
lib/strncasecmp.c |
22642 |
lib/strncat.c |
22643 |
+ lib/strtol.c |
22644 |
+ lib/strtoll.c |
22645 |
lib/symlink.c |
22646 |
lib/symlinkat.c |
22647 |
lib/sys_stat.in.h |
22648 |
@@ -1261,6 +1267,7 @@ AC_DEFUN([gl_FILE_LIST], [ |
22649 |
m4/string_h.m4 |
22650 |
m4/strings_h.m4 |
22651 |
m4/strncat.m4 |
22652 |
+ m4/strtoll.m4 |
22653 |
m4/symlink.m4 |
22654 |
m4/symlinkat.m4 |
22655 |
m4/sys_socket_h.m4 |
22656 |
|
22657 |
diff --git a/autotools/m4/strtoll.m4 b/autotools/m4/strtoll.m4 |
22658 |
new file mode 100644 |
22659 |
index 0000000..dc37d99 |
22660 |
--- /dev/null |
22661 |
+++ b/autotools/m4/strtoll.m4 |
22662 |
@@ -0,0 +1,51 @@ |
22663 |
+# strtoll.m4 serial 9 |
22664 |
+dnl Copyright (C) 2002, 2004, 2006, 2008-2022 Free Software Foundation, Inc. |
22665 |
+dnl This file is free software; the Free Software Foundation |
22666 |
+dnl gives unlimited permission to copy and/or distribute it, |
22667 |
+dnl with or without modifications, as long as this notice is preserved. |
22668 |
+ |
22669 |
+AC_DEFUN([gl_FUNC_STRTOLL], |
22670 |
+[ |
22671 |
+ AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) |
22672 |
+ AC_REQUIRE([AC_CANONICAL_HOST]) |
22673 |
+ AC_CHECK_FUNCS([strtoll]) |
22674 |
+ if test $ac_cv_func_strtoll = yes; then |
22675 |
+ AC_CACHE_CHECK([whether strtoll works], |
22676 |
+ [gl_cv_func_strtoll_works], |
22677 |
+ [AC_RUN_IFELSE( |
22678 |
+ [AC_LANG_PROGRAM( |
22679 |
+ [[#include <stdlib.h>]], |
22680 |
+ [[int result = 0; |
22681 |
+ char *term; |
22682 |
+ /* This test fails on Minix and native Windows. */ |
22683 |
+ { |
22684 |
+ const char input[] = "0x"; |
22685 |
+ (void) strtoll (input, &term, 16); |
22686 |
+ if (term != input + 1) |
22687 |
+ result |= 1; |
22688 |
+ } |
22689 |
+ return result; |
22690 |
+ ]]) |
22691 |
+ ], |
22692 |
+ [gl_cv_func_strtoll_works=yes], |
22693 |
+ [gl_cv_func_strtoll_works=no], |
22694 |
+ [case "$host_os" in |
22695 |
+ # Guess no on native Windows. |
22696 |
+ mingw*) gl_cv_func_strtoll_works="guessing no" ;; |
22697 |
+ *) gl_cv_func_strtoll_works="$gl_cross_guess_normal" ;; |
22698 |
+ esac |
22699 |
+ ]) |
22700 |
+ ]) |
22701 |
+ case "$gl_cv_func_strtoll_works" in |
22702 |
+ *yes) ;; |
22703 |
+ *) REPLACE_STRTOLL=1 ;; |
22704 |
+ esac |
22705 |
+ else |
22706 |
+ HAVE_STRTOLL=0 |
22707 |
+ fi |
22708 |
+]) |
22709 |
+ |
22710 |
+# Prerequisites of lib/strtoll.c. |
22711 |
+AC_DEFUN([gl_PREREQ_STRTOLL], [ |
22712 |
+ : |
22713 |
+]) |
22714 |
|
22715 |
diff --git a/config.guess b/config.guess |
22716 |
index f772702..160ecf0 100755 |
22717 |
--- a/config.guess |
22718 |
+++ b/config.guess |
22719 |
@@ -1,12 +1,14 @@ |
22720 |
#! /bin/sh |
22721 |
# Attempt to guess a canonical system name. |
22722 |
-# Copyright 1992-2021 Free Software Foundation, Inc. |
22723 |
+# Copyright 1992-2022 Free Software Foundation, Inc. |
22724 |
|
22725 |
-timestamp='2021-01-01' |
22726 |
+# shellcheck disable=SC2006,SC2268 # see below for rationale |
22727 |
+ |
22728 |
+timestamp='2022-05-08' |
22729 |
|
22730 |
# This file is free software; you can redistribute it and/or modify it |
22731 |
# under the terms of the GNU General Public License as published by |
22732 |
-# the Free Software Foundation; either version 3 of the License, or |
22733 |
+# the Free Software Foundation, either version 3 of the License, or |
22734 |
# (at your option) any later version. |
22735 |
# |
22736 |
# This program is distributed in the hope that it will be useful, but |
22737 |
@@ -32,7 +34,15 @@ timestamp='2021-01-01' |
22738 |
# Please send patches to <config-patches@×××.org>. |
22739 |
|
22740 |
|
22741 |
-me=$(echo "$0" | sed -e 's,.*/,,') |
22742 |
+# The "shellcheck disable" line above the timestamp inhibits complaints |
22743 |
+# about features and limitations of the classic Bourne shell that were |
22744 |
+# superseded or lifted in POSIX. However, this script identifies a wide |
22745 |
+# variety of pre-POSIX systems that do not have POSIX shells at all, and |
22746 |
+# even some reasonably current systems (Solaris 10 as case-in-point) still |
22747 |
+# have a pre-POSIX /bin/sh. |
22748 |
+ |
22749 |
+ |
22750 |
+me=`echo "$0" | sed -e 's,.*/,,'` |
22751 |
|
22752 |
usage="\ |
22753 |
Usage: $0 [OPTION] |
22754 |
@@ -50,7 +60,7 @@ version="\ |
22755 |
GNU config.guess ($timestamp) |
22756 |
|
22757 |
Originally written by Per Bothner. |
22758 |
-Copyright 1992-2021 Free Software Foundation, Inc. |
22759 |
+Copyright 1992-2022 Free Software Foundation, Inc. |
22760 |
|
22761 |
This is free software; see the source for copying conditions. There is NO |
22762 |
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." |
22763 |
@@ -84,6 +94,9 @@ if test $# != 0; then |
22764 |
exit 1 |
22765 |
fi |
22766 |
|
22767 |
+# Just in case it came from the environment. |
22768 |
+GUESS= |
22769 |
+ |
22770 |
# CC_FOR_BUILD -- compiler used by this script. Note that the use of a |
22771 |
# compiler to aid in system detection is discouraged as it requires |
22772 |
# temporary files to be created and, as you can see below, it is a |
22773 |
@@ -102,8 +115,8 @@ set_cc_for_build() { |
22774 |
# prevent multiple calls if $tmp is already set |
22775 |
test "$tmp" && return 0 |
22776 |
: "${TMPDIR=/tmp}" |
22777 |
- # shellcheck disable=SC2039 |
22778 |
- { tmp=$( (umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null) && test -n "$tmp" && test -d "$tmp" ; } || |
22779 |
+ # shellcheck disable=SC2039,SC3028 |
22780 |
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || |
22781 |
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || |
22782 |
{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || |
22783 |
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } |
22784 |
@@ -112,7 +125,7 @@ set_cc_for_build() { |
22785 |
,,) echo "int x;" > "$dummy.c" |
22786 |
for driver in cc gcc c89 c99 ; do |
22787 |
if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then |
22788 |
- CC_FOR_BUILD="$driver" |
22789 |
+ CC_FOR_BUILD=$driver |
22790 |
break |
22791 |
fi |
22792 |
done |
22793 |
@@ -131,12 +144,12 @@ if test -f /.attbin/uname ; then |
22794 |
PATH=$PATH:/.attbin ; export PATH |
22795 |
fi |
22796 |
|
22797 |
-UNAME_MACHINE=$( (uname -m) 2>/dev/null) || UNAME_MACHINE=unknown |
22798 |
-UNAME_RELEASE=$( (uname -r) 2>/dev/null) || UNAME_RELEASE=unknown |
22799 |
-UNAME_SYSTEM=$( (uname -s) 2>/dev/null) || UNAME_SYSTEM=unknown |
22800 |
-UNAME_VERSION=$( (uname -v) 2>/dev/null) || UNAME_VERSION=unknown |
22801 |
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown |
22802 |
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown |
22803 |
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown |
22804 |
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown |
22805 |
|
22806 |
-case "$UNAME_SYSTEM" in |
22807 |
+case $UNAME_SYSTEM in |
22808 |
Linux|GNU|GNU/*) |
22809 |
LIBC=unknown |
22810 |
|
22811 |
@@ -157,7 +170,8 @@ Linux|GNU|GNU/*) |
22812 |
#endif |
22813 |
#endif |
22814 |
EOF |
22815 |
- eval "$($CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g')" |
22816 |
+ cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` |
22817 |
+ eval "$cc_set_libc" |
22818 |
|
22819 |
# Second heuristic to detect musl libc. |
22820 |
if [ "$LIBC" = unknown ] && |
22821 |
@@ -176,7 +190,7 @@ esac |
22822 |
|
22823 |
# Note: order is significant - the case branches are not exclusive. |
22824 |
|
22825 |
-case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in |
22826 |
+case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in |
22827 |
*:NetBSD:*:*) |
22828 |
# NetBSD (nbsd) targets should (where applicable) match one or |
22829 |
# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, |
22830 |
@@ -188,12 +202,11 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in |
22831 |
# |
22832 |
# Note: NetBSD doesn't particularly care about the vendor |
22833 |
# portion of the name. We always set it to "unknown". |
22834 |
- sysctl="sysctl -n hw.machine_arch" |
22835 |
- UNAME_MACHINE_ARCH=$( (uname -p 2>/dev/null || \ |
22836 |
- "/sbin/$sysctl" 2>/dev/null || \ |
22837 |
- "/usr/sbin/$sysctl" 2>/dev/null || \ |
22838 |
- echo unknown)) |
22839 |
- case "$UNAME_MACHINE_ARCH" in |
22840 |
+ UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ |
22841 |
+ /sbin/sysctl -n hw.machine_arch 2>/dev/null || \ |
22842 |
+ /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \ |
22843 |
+ echo unknown)` |
22844 |
+ case $UNAME_MACHINE_ARCH in |
22845 |
aarch64eb) machine=aarch64_be-unknown ;; |
22846 |
armeb) machine=armeb-unknown ;; |
22847 |
arm*) machine=arm-unknown ;; |
22848 |
@@ -201,15 +214,15 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in |
22849 |
sh3eb) machine=sh-unknown ;; |
22850 |
sh5el) machine=sh5le-unknown ;; |
22851 |
earmv*) |
22852 |
- arch=$(echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,') |
22853 |
- endian=$(echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p') |
22854 |
- machine="${arch}${endian}"-unknown |
22855 |
+ arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` |
22856 |
+ endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` |
22857 |
+ machine=${arch}${endian}-unknown |
22858 |
;; |
22859 |
- *) machine="$UNAME_MACHINE_ARCH"-unknown ;; |
22860 |
+ *) machine=$UNAME_MACHINE_ARCH-unknown ;; |
22861 |
esac |
22862 |
# The Operating System including object format, if it has switched |
22863 |
# to ELF recently (or will in the future) and ABI. |
22864 |
- case "$UNAME_MACHINE_ARCH" in |
22865 |
+ case $UNAME_MACHINE_ARCH in |
22866 |
earm*) |
22867 |
os=netbsdelf |
22868 |
;; |
22869 |
@@ -230,10 +243,10 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in |
22870 |
;; |
22871 |
esac |
22872 |
# Determine ABI tags. |
22873 |
- case "$UNAME_MACHINE_ARCH" in |
22874 |
+ case $UNAME_MACHINE_ARCH in |
22875 |
earm*) |
22876 |
expr='s/^earmv[0-9]/-eabi/;s/eb$//' |
22877 |
- abi=$(echo "$UNAME_MACHINE_ARCH" | sed -e "$expr") |
22878 |
+ abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` |
22879 |
;; |
22880 |
esac |
22881 |
# The OS release |
22882 |
@@ -241,76 +254,82 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in |
22883 |
# thus, need a distinct triplet. However, they do not need |
22884 |
# kernel version information, so it can be replaced with a |
22885 |
# suitable tag, in the style of linux-gnu. |
22886 |
- case "$UNAME_VERSION" in |
22887 |
+ case $UNAME_VERSION in |
22888 |
Debian*) |
22889 |
release='-gnu' |
22890 |
;; |
22891 |
*) |
22892 |
- release=$(echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2) |
22893 |
+ release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2` |
22894 |
;; |
22895 |
esac |
22896 |
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: |
22897 |
# contains redundant information, the shorter form: |
22898 |
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. |
22899 |
- echo "$machine-${os}${release}${abi-}" |
22900 |
- exit ;; |
22901 |
+ GUESS=$machine-${os}${release}${abi-} |
22902 |
+ ;; |
22903 |
*:Bitrig:*:*) |
22904 |
- UNAME_MACHINE_ARCH=$(arch | sed 's/Bitrig.//') |
22905 |
- echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" |
22906 |
- exit ;; |
22907 |
+ UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` |
22908 |
+ GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE |
22909 |
+ ;; |
22910 |
*:OpenBSD:*:*) |
22911 |
- UNAME_MACHINE_ARCH=$(arch | sed 's/OpenBSD.//') |
22912 |
- echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" |
22913 |
- exit ;; |
22914 |
+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` |
22915 |
+ GUESS=$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE |
22916 |
+ ;; |
22917 |
+ *:SecBSD:*:*) |
22918 |
+ UNAME_MACHINE_ARCH=`arch | sed 's/SecBSD.//'` |
22919 |
+ GUESS=$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE |
22920 |
+ ;; |
22921 |
*:LibertyBSD:*:*) |
22922 |
- UNAME_MACHINE_ARCH=$(arch | sed 's/^.*BSD\.//') |
22923 |
- echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" |
22924 |
- exit ;; |
22925 |
+ UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` |
22926 |
+ GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE |
22927 |
+ ;; |
22928 |
*:MidnightBSD:*:*) |
22929 |
- echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" |
22930 |
- exit ;; |
22931 |
+ GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE |
22932 |
+ ;; |
22933 |
*:ekkoBSD:*:*) |
22934 |
- echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" |
22935 |
- exit ;; |
22936 |
+ GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE |
22937 |
+ ;; |
22938 |
*:SolidBSD:*:*) |
22939 |
- echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" |
22940 |
- exit ;; |
22941 |
+ GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE |
22942 |
+ ;; |
22943 |
*:OS108:*:*) |
22944 |
- echo "$UNAME_MACHINE"-unknown-os108_"$UNAME_RELEASE" |
22945 |
- exit ;; |
22946 |
+ GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE |
22947 |
+ ;; |
22948 |
macppc:MirBSD:*:*) |
22949 |
- echo powerpc-unknown-mirbsd"$UNAME_RELEASE" |
22950 |
- exit ;; |
22951 |
+ GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE |
22952 |
+ ;; |
22953 |
*:MirBSD:*:*) |
22954 |
- echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" |
22955 |
- exit ;; |
22956 |
+ GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE |
22957 |
+ ;; |
22958 |
*:Sortix:*:*) |
22959 |
- echo "$UNAME_MACHINE"-unknown-sortix |
22960 |
- exit ;; |
22961 |
+ GUESS=$UNAME_MACHINE-unknown-sortix |
22962 |
+ ;; |
22963 |
*:Twizzler:*:*) |
22964 |
- echo "$UNAME_MACHINE"-unknown-twizzler |
22965 |
- exit ;; |
22966 |
+ GUESS=$UNAME_MACHINE-unknown-twizzler |
22967 |
+ ;; |
22968 |
*:Redox:*:*) |
22969 |
- echo "$UNAME_MACHINE"-unknown-redox |
22970 |
- exit ;; |
22971 |
+ GUESS=$UNAME_MACHINE-unknown-redox |
22972 |
+ ;; |
22973 |
mips:OSF1:*.*) |
22974 |
- echo mips-dec-osf1 |
22975 |
- exit ;; |
22976 |
+ GUESS=mips-dec-osf1 |
22977 |
+ ;; |
22978 |
alpha:OSF1:*:*) |
22979 |
+ # Reset EXIT trap before exiting to avoid spurious non-zero exit code. |
22980 |
+ trap '' 0 |
22981 |
case $UNAME_RELEASE in |
22982 |
*4.0) |
22983 |
- UNAME_RELEASE=$(/usr/sbin/sizer -v | awk '{print $3}') |
22984 |
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` |
22985 |
;; |
22986 |
*5.*) |
22987 |
- UNAME_RELEASE=$(/usr/sbin/sizer -v | awk '{print $4}') |
22988 |
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` |
22989 |
;; |
22990 |
esac |
22991 |
# According to Compaq, /usr/sbin/psrinfo has been available on |
22992 |
# OSF/1 and Tru64 systems produced since 1995. I hope that |
22993 |
# covers most systems running today. This code pipes the CPU |
22994 |
# types through head -n 1, so we only detect the type of CPU 0. |
22995 |
- ALPHA_CPU_TYPE=$(/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1) |
22996 |
- case "$ALPHA_CPU_TYPE" in |
22997 |
+ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` |
22998 |
+ case $ALPHA_CPU_TYPE in |
22999 |
"EV4 (21064)") |
23000 |
UNAME_MACHINE=alpha ;; |
23001 |
"EV4.5 (21064)") |
23002 |
@@ -347,68 +366,69 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in |
23003 |
# A Tn.n version is a released field test version. |
23004 |
# A Xn.n version is an unreleased experimental baselevel. |
23005 |
# 1.2 uses "1.2" for uname -r. |
23006 |
- echo "$UNAME_MACHINE"-dec-osf"$(echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz)" |
23007 |
- # Reset EXIT trap before exiting to avoid spurious non-zero exit code. |
23008 |
- exitcode=$? |
23009 |
- trap '' 0 |
23010 |
- exit $exitcode ;; |
23011 |
+ OSF_REL=`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` |
23012 |
+ GUESS=$UNAME_MACHINE-dec-osf$OSF_REL |
23013 |
+ ;; |
23014 |
Amiga*:UNIX_System_V:4.0:*) |
23015 |
- echo m68k-unknown-sysv4 |
23016 |
- exit ;; |
23017 |
+ GUESS=m68k-unknown-sysv4 |
23018 |
+ ;; |
23019 |
*:[Aa]miga[Oo][Ss]:*:*) |
23020 |
- echo "$UNAME_MACHINE"-unknown-amigaos |
23021 |
- exit ;; |
23022 |
+ GUESS=$UNAME_MACHINE-unknown-amigaos |
23023 |
+ ;; |
23024 |
*:[Mm]orph[Oo][Ss]:*:*) |
23025 |
- echo "$UNAME_MACHINE"-unknown-morphos |
23026 |
- exit ;; |
23027 |
+ GUESS=$UNAME_MACHINE-unknown-morphos |
23028 |
+ ;; |
23029 |
*:OS/390:*:*) |
23030 |
- echo i370-ibm-openedition |
23031 |
- exit ;; |
23032 |
+ GUESS=i370-ibm-openedition |
23033 |
+ ;; |
23034 |
*:z/VM:*:*) |
23035 |
- echo s390-ibm-zvmoe |
23036 |
- exit ;; |
23037 |
+ GUESS=s390-ibm-zvmoe |
23038 |
+ ;; |
23039 |
*:OS400:*:*) |
23040 |
- echo powerpc-ibm-os400 |
23041 |
- exit ;; |
23042 |
+ GUESS=powerpc-ibm-os400 |
23043 |
+ ;; |
23044 |
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) |
23045 |
- echo arm-acorn-riscix"$UNAME_RELEASE" |
23046 |
- exit ;; |
23047 |
+ GUESS=arm-acorn-riscix$UNAME_RELEASE |
23048 |
+ ;; |
23049 |
arm*:riscos:*:*|arm*:RISCOS:*:*) |
23050 |
- echo arm-unknown-riscos |
23051 |
- exit ;; |
23052 |
+ GUESS=arm-unknown-riscos |
23053 |
+ ;; |
23054 |
SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) |
23055 |
- echo hppa1.1-hitachi-hiuxmpp |
23056 |
- exit ;; |
23057 |
+ GUESS=hppa1.1-hitachi-hiuxmpp |
23058 |
+ ;; |
23059 |
Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) |
23060 |
# akee@××××××××××××××××.mil (Earle F. Ake) contributed MIS and NILE. |
23061 |
- if test "$( (/bin/universe) 2>/dev/null)" = att ; then |
23062 |
- echo pyramid-pyramid-sysv3 |
23063 |
- else |
23064 |
- echo pyramid-pyramid-bsd |
23065 |
- fi |
23066 |
- exit ;; |
23067 |
+ case `(/bin/universe) 2>/dev/null` in |
23068 |
+ att) GUESS=pyramid-pyramid-sysv3 ;; |
23069 |
+ *) GUESS=pyramid-pyramid-bsd ;; |
23070 |
+ esac |
23071 |
+ ;; |
23072 |
NILE*:*:*:dcosx) |
23073 |
- echo pyramid-pyramid-svr4 |
23074 |
- exit ;; |
23075 |
+ GUESS=pyramid-pyramid-svr4 |
23076 |
+ ;; |
23077 |
DRS?6000:unix:4.0:6*) |
23078 |
- echo sparc-icl-nx6 |
23079 |
- exit ;; |
23080 |
+ GUESS=sparc-icl-nx6 |
23081 |
+ ;; |
23082 |
DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) |
23083 |
- case $(/usr/bin/uname -p) in |
23084 |
- sparc) echo sparc-icl-nx7; exit ;; |
23085 |
- esac ;; |
23086 |
+ case `/usr/bin/uname -p` in |
23087 |
+ sparc) GUESS=sparc-icl-nx7 ;; |
23088 |
+ esac |
23089 |
+ ;; |
23090 |
s390x:SunOS:*:*) |
23091 |
- echo "$UNAME_MACHINE"-ibm-solaris2"$(echo "$UNAME_RELEASE" | sed -e 's/[^.]*//')" |
23092 |
- exit ;; |
23093 |
+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` |
23094 |
+ GUESS=$UNAME_MACHINE-ibm-solaris2$SUN_REL |
23095 |
+ ;; |
23096 |
sun4H:SunOS:5.*:*) |
23097 |
- echo sparc-hal-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')" |
23098 |
- exit ;; |
23099 |
+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` |
23100 |
+ GUESS=sparc-hal-solaris2$SUN_REL |
23101 |
+ ;; |
23102 |
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) |
23103 |
- echo sparc-sun-solaris2"$(echo "$UNAME_RELEASE" | sed -e 's/[^.]*//')" |
23104 |
- exit ;; |
23105 |
+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` |
23106 |
+ GUESS=sparc-sun-solaris2$SUN_REL |
23107 |
+ ;; |
23108 |
i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) |
23109 |
- echo i386-pc-auroraux"$UNAME_RELEASE" |
23110 |
- exit ;; |
23111 |
+ GUESS=i386-pc-auroraux$UNAME_RELEASE |
23112 |
+ ;; |
23113 |
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) |
23114 |
set_cc_for_build |
23115 |
SUN_ARCH=i386 |
23116 |
@@ -417,47 +437,50 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in |
23117 |
# This test works for both compilers. |
23118 |
if test "$CC_FOR_BUILD" != no_compiler_found; then |
23119 |
if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ |
23120 |
- (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ |
23121 |
+ (CCOPTS="" $CC_FOR_BUILD -m64 -E - 2>/dev/null) | \ |
23122 |
grep IS_64BIT_ARCH >/dev/null |
23123 |
then |
23124 |
SUN_ARCH=x86_64 |
23125 |
fi |
23126 |
fi |
23127 |
- echo "$SUN_ARCH"-pc-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')" |
23128 |
- exit ;; |
23129 |
+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` |
23130 |
+ GUESS=$SUN_ARCH-pc-solaris2$SUN_REL |
23131 |
+ ;; |
23132 |
sun4*:SunOS:6*:*) |
23133 |
# According to config.sub, this is the proper way to canonicalize |
23134 |
# SunOS6. Hard to guess exactly what SunOS6 will be like, but |
23135 |
# it's likely to be more like Solaris than SunOS4. |
23136 |
- echo sparc-sun-solaris3"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')" |
23137 |
- exit ;; |
23138 |
+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` |
23139 |
+ GUESS=sparc-sun-solaris3$SUN_REL |
23140 |
+ ;; |
23141 |
sun4*:SunOS:*:*) |
23142 |
- case "$(/usr/bin/arch -k)" in |
23143 |
+ case `/usr/bin/arch -k` in |
23144 |
Series*|S4*) |
23145 |
- UNAME_RELEASE=$(uname -v) |
23146 |
+ UNAME_RELEASE=`uname -v` |
23147 |
;; |
23148 |
esac |
23149 |
# Japanese Language versions have a version number like `4.1.3-JL'. |
23150 |
- echo sparc-sun-sunos"$(echo "$UNAME_RELEASE"|sed -e 's/-/_/')" |
23151 |
- exit ;; |
23152 |
+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'` |
23153 |
+ GUESS=sparc-sun-sunos$SUN_REL |
23154 |
+ ;; |
23155 |
sun3*:SunOS:*:*) |
23156 |
- echo m68k-sun-sunos"$UNAME_RELEASE" |
23157 |
- exit ;; |
23158 |
+ GUESS=m68k-sun-sunos$UNAME_RELEASE |
23159 |
+ ;; |
23160 |
sun*:*:4.2BSD:*) |
23161 |
- UNAME_RELEASE=$( (sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null) |
23162 |
+ UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` |
23163 |
test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 |
23164 |
- case "$(/bin/arch)" in |
23165 |
+ case `/bin/arch` in |
23166 |
sun3) |
23167 |
- echo m68k-sun-sunos"$UNAME_RELEASE" |
23168 |
+ GUESS=m68k-sun-sunos$UNAME_RELEASE |
23169 |
;; |
23170 |
sun4) |
23171 |
- echo sparc-sun-sunos"$UNAME_RELEASE" |
23172 |
+ GUESS=sparc-sun-sunos$UNAME_RELEASE |
23173 |
;; |
23174 |
esac |
23175 |
- exit ;; |
23176 |
+ ;; |
23177 |
aushp:SunOS:*:*) |
23178 |
- echo sparc-auspex-sunos"$UNAME_RELEASE" |
23179 |
- exit ;; |
23180 |
+ GUESS=sparc-auspex-sunos$UNAME_RELEASE |
23181 |
+ ;; |
23182 |
# The situation for MiNT is a little confusing. The machine name |
23183 |
# can be virtually everything (everything which is not |
23184 |
# "atarist" or "atariste" at least should have a processor |
23185 |
@@ -467,41 +490,41 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in |
23186 |
# MiNT. But MiNT is downward compatible to TOS, so this should |
23187 |
# be no problem. |
23188 |
atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) |
23189 |
- echo m68k-atari-mint"$UNAME_RELEASE" |
23190 |
- exit ;; |
23191 |
+ GUESS=m68k-atari-mint$UNAME_RELEASE |
23192 |
+ ;; |
23193 |
atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) |
23194 |
- echo m68k-atari-mint"$UNAME_RELEASE" |
23195 |
- exit ;; |
23196 |
+ GUESS=m68k-atari-mint$UNAME_RELEASE |
23197 |
+ ;; |
23198 |
*falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) |
23199 |
- echo m68k-atari-mint"$UNAME_RELEASE" |
23200 |
- exit ;; |
23201 |
+ GUESS=m68k-atari-mint$UNAME_RELEASE |
23202 |
+ ;; |
23203 |
milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) |
23204 |
- echo m68k-milan-mint"$UNAME_RELEASE" |
23205 |
- exit ;; |
23206 |
+ GUESS=m68k-milan-mint$UNAME_RELEASE |
23207 |
+ ;; |
23208 |
hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) |
23209 |
- echo m68k-hades-mint"$UNAME_RELEASE" |
23210 |
- exit ;; |
23211 |
+ GUESS=m68k-hades-mint$UNAME_RELEASE |
23212 |
+ ;; |
23213 |
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) |
23214 |
- echo m68k-unknown-mint"$UNAME_RELEASE" |
23215 |
- exit ;; |
23216 |
+ GUESS=m68k-unknown-mint$UNAME_RELEASE |
23217 |
+ ;; |
23218 |
m68k:machten:*:*) |
23219 |
- echo m68k-apple-machten"$UNAME_RELEASE" |
23220 |
- exit ;; |
23221 |
+ GUESS=m68k-apple-machten$UNAME_RELEASE |
23222 |
+ ;; |
23223 |
powerpc:machten:*:*) |
23224 |
- echo powerpc-apple-machten"$UNAME_RELEASE" |
23225 |
- exit ;; |
23226 |
+ GUESS=powerpc-apple-machten$UNAME_RELEASE |
23227 |
+ ;; |
23228 |
RISC*:Mach:*:*) |
23229 |
- echo mips-dec-mach_bsd4.3 |
23230 |
- exit ;; |
23231 |
+ GUESS=mips-dec-mach_bsd4.3 |
23232 |
+ ;; |
23233 |
RISC*:ULTRIX:*:*) |
23234 |
- echo mips-dec-ultrix"$UNAME_RELEASE" |
23235 |
- exit ;; |
23236 |
+ GUESS=mips-dec-ultrix$UNAME_RELEASE |
23237 |
+ ;; |
23238 |
VAX*:ULTRIX*:*:*) |
23239 |
- echo vax-dec-ultrix"$UNAME_RELEASE" |
23240 |
- exit ;; |
23241 |
+ GUESS=vax-dec-ultrix$UNAME_RELEASE |
23242 |
+ ;; |
23243 |
2020:CLIX:*:* | 2430:CLIX:*:*) |
23244 |
- echo clipper-intergraph-clix"$UNAME_RELEASE" |
23245 |
- exit ;; |
23246 |
+ GUESS=clipper-intergraph-clix$UNAME_RELEASE |
23247 |
+ ;; |
23248 |
mips:*:*:UMIPS | mips:*:*:RISCos) |
23249 |
set_cc_for_build |
23250 |
sed 's/^ //' << EOF > "$dummy.c" |
23251 |
@@ -526,78 +549,79 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in |
23252 |
} |
23253 |
EOF |
23254 |
$CC_FOR_BUILD -o "$dummy" "$dummy.c" && |
23255 |
- dummyarg=$(echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p') && |
23256 |
- SYSTEM_NAME=$("$dummy" "$dummyarg") && |
23257 |
+ dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && |
23258 |
+ SYSTEM_NAME=`"$dummy" "$dummyarg"` && |
23259 |
{ echo "$SYSTEM_NAME"; exit; } |
23260 |
- echo mips-mips-riscos"$UNAME_RELEASE" |
23261 |
- exit ;; |
23262 |
+ GUESS=mips-mips-riscos$UNAME_RELEASE |
23263 |
+ ;; |
23264 |
Motorola:PowerMAX_OS:*:*) |
23265 |
- echo powerpc-motorola-powermax |
23266 |
- exit ;; |
23267 |
+ GUESS=powerpc-motorola-powermax |
23268 |
+ ;; |
23269 |
Motorola:*:4.3:PL8-*) |
23270 |
- echo powerpc-harris-powermax |
23271 |
- exit ;; |
23272 |
+ GUESS=powerpc-harris-powermax |
23273 |
+ ;; |
23274 |
Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) |
23275 |
- echo powerpc-harris-powermax |
23276 |
- exit ;; |
23277 |
+ GUESS=powerpc-harris-powermax |
23278 |
+ ;; |
23279 |
Night_Hawk:Power_UNIX:*:*) |
23280 |
- echo powerpc-harris-powerunix |
23281 |
- exit ;; |
23282 |
+ GUESS=powerpc-harris-powerunix |
23283 |
+ ;; |
23284 |
m88k:CX/UX:7*:*) |
23285 |
- echo m88k-harris-cxux7 |
23286 |
- exit ;; |
23287 |
+ GUESS=m88k-harris-cxux7 |
23288 |
+ ;; |
23289 |
m88k:*:4*:R4*) |
23290 |
- echo m88k-motorola-sysv4 |
23291 |
- exit ;; |
23292 |
+ GUESS=m88k-motorola-sysv4 |
23293 |
+ ;; |
23294 |
m88k:*:3*:R3*) |
23295 |
- echo m88k-motorola-sysv3 |
23296 |
- exit ;; |
23297 |
+ GUESS=m88k-motorola-sysv3 |
23298 |
+ ;; |
23299 |
AViiON:dgux:*:*) |
23300 |
# DG/UX returns AViiON for all architectures |
23301 |
- UNAME_PROCESSOR=$(/usr/bin/uname -p) |
23302 |
+ UNAME_PROCESSOR=`/usr/bin/uname -p` |
23303 |
if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110 |
23304 |
then |
23305 |
if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \ |
23306 |
test "$TARGET_BINARY_INTERFACE"x = x |
23307 |
then |
23308 |
- echo m88k-dg-dgux"$UNAME_RELEASE" |
23309 |
+ GUESS=m88k-dg-dgux$UNAME_RELEASE |
23310 |
else |
23311 |
- echo m88k-dg-dguxbcs"$UNAME_RELEASE" |
23312 |
+ GUESS=m88k-dg-dguxbcs$UNAME_RELEASE |
23313 |
fi |
23314 |
else |
23315 |
- echo i586-dg-dgux"$UNAME_RELEASE" |
23316 |
+ GUESS=i586-dg-dgux$UNAME_RELEASE |
23317 |
fi |
23318 |
- exit ;; |
23319 |
+ ;; |
23320 |
M88*:DolphinOS:*:*) # DolphinOS (SVR3) |
23321 |
- echo m88k-dolphin-sysv3 |
23322 |
- exit ;; |
23323 |
+ GUESS=m88k-dolphin-sysv3 |
23324 |
+ ;; |
23325 |
M88*:*:R3*:*) |
23326 |
# Delta 88k system running SVR3 |
23327 |
- echo m88k-motorola-sysv3 |
23328 |
- exit ;; |
23329 |
+ GUESS=m88k-motorola-sysv3 |
23330 |
+ ;; |
23331 |
XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) |
23332 |
- echo m88k-tektronix-sysv3 |
23333 |
- exit ;; |
23334 |
+ GUESS=m88k-tektronix-sysv3 |
23335 |
+ ;; |
23336 |
Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) |
23337 |
- echo m68k-tektronix-bsd |
23338 |
- exit ;; |
23339 |
+ GUESS=m68k-tektronix-bsd |
23340 |
+ ;; |
23341 |
*:IRIX*:*:*) |
23342 |
- echo mips-sgi-irix"$(echo "$UNAME_RELEASE"|sed -e 's/-/_/g')" |
23343 |
- exit ;; |
23344 |
+ IRIX_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/g'` |
23345 |
+ GUESS=mips-sgi-irix$IRIX_REL |
23346 |
+ ;; |
23347 |
????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. |
23348 |
- echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id |
23349 |
- exit ;; # Note that: echo "'$(uname -s)'" gives 'AIX ' |
23350 |
+ GUESS=romp-ibm-aix # uname -m gives an 8 hex-code CPU id |
23351 |
+ ;; # Note that: echo "'`uname -s`'" gives 'AIX ' |
23352 |
i*86:AIX:*:*) |
23353 |
- echo i386-ibm-aix |
23354 |
- exit ;; |
23355 |
+ GUESS=i386-ibm-aix |
23356 |
+ ;; |
23357 |
ia64:AIX:*:*) |
23358 |
if test -x /usr/bin/oslevel ; then |
23359 |
- IBM_REV=$(/usr/bin/oslevel) |
23360 |
+ IBM_REV=`/usr/bin/oslevel` |
23361 |
else |
23362 |
- IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" |
23363 |
+ IBM_REV=$UNAME_VERSION.$UNAME_RELEASE |
23364 |
fi |
23365 |
- echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV" |
23366 |
- exit ;; |
23367 |
+ GUESS=$UNAME_MACHINE-ibm-aix$IBM_REV |
23368 |
+ ;; |
23369 |
*:AIX:2:3) |
23370 |
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then |
23371 |
set_cc_for_build |
23372 |
@@ -612,68 +636,68 @@ EOF |
23373 |
exit(0); |
23374 |
} |
23375 |
EOF |
23376 |
- if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=$("$dummy") |
23377 |
+ if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` |
23378 |
then |
23379 |
- echo "$SYSTEM_NAME" |
23380 |
+ GUESS=$SYSTEM_NAME |
23381 |
else |
23382 |
- echo rs6000-ibm-aix3.2.5 |
23383 |
+ GUESS=rs6000-ibm-aix3.2.5 |
23384 |
fi |
23385 |
elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then |
23386 |
- echo rs6000-ibm-aix3.2.4 |
23387 |
+ GUESS=rs6000-ibm-aix3.2.4 |
23388 |
else |
23389 |
- echo rs6000-ibm-aix3.2 |
23390 |
+ GUESS=rs6000-ibm-aix3.2 |
23391 |
fi |
23392 |
- exit ;; |
23393 |
+ ;; |
23394 |
*:AIX:*:[4567]) |
23395 |
- IBM_CPU_ID=$(/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }') |
23396 |
+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` |
23397 |
if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then |
23398 |
IBM_ARCH=rs6000 |
23399 |
else |
23400 |
IBM_ARCH=powerpc |
23401 |
fi |
23402 |
if test -x /usr/bin/lslpp ; then |
23403 |
- IBM_REV=$(/usr/bin/lslpp -Lqc bos.rte.libc | |
23404 |
- awk -F: '{ print $3 }' | sed s/[0-9]*$/0/) |
23405 |
+ IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | \ |
23406 |
+ awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` |
23407 |
else |
23408 |
- IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" |
23409 |
+ IBM_REV=$UNAME_VERSION.$UNAME_RELEASE |
23410 |
fi |
23411 |
- echo "$IBM_ARCH"-ibm-aix"$IBM_REV" |
23412 |
- exit ;; |
23413 |
+ GUESS=$IBM_ARCH-ibm-aix$IBM_REV |
23414 |
+ ;; |
23415 |
*:AIX:*:*) |
23416 |
- echo rs6000-ibm-aix |
23417 |
- exit ;; |
23418 |
+ GUESS=rs6000-ibm-aix |
23419 |
+ ;; |
23420 |
ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) |
23421 |
- echo romp-ibm-bsd4.4 |
23422 |
- exit ;; |
23423 |
+ GUESS=romp-ibm-bsd4.4 |
23424 |
+ ;; |
23425 |
ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and |
23426 |
- echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to |
23427 |
- exit ;; # report: romp-ibm BSD 4.3 |
23428 |
+ GUESS=romp-ibm-bsd$UNAME_RELEASE # 4.3 with uname added to |
23429 |
+ ;; # report: romp-ibm BSD 4.3 |
23430 |
*:BOSX:*:*) |
23431 |
- echo rs6000-bull-bosx |
23432 |
- exit ;; |
23433 |
+ GUESS=rs6000-bull-bosx |
23434 |
+ ;; |
23435 |
DPX/2?00:B.O.S.:*:*) |
23436 |
- echo m68k-bull-sysv3 |
23437 |
- exit ;; |
23438 |
+ GUESS=m68k-bull-sysv3 |
23439 |
+ ;; |
23440 |
9000/[34]??:4.3bsd:1.*:*) |
23441 |
- echo m68k-hp-bsd |
23442 |
- exit ;; |
23443 |
+ GUESS=m68k-hp-bsd |
23444 |
+ ;; |
23445 |
hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) |
23446 |
- echo m68k-hp-bsd4.4 |
23447 |
- exit ;; |
23448 |
+ GUESS=m68k-hp-bsd4.4 |
23449 |
+ ;; |
23450 |
9000/[34678]??:HP-UX:*:*) |
23451 |
- HPUX_REV=$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//') |
23452 |
- case "$UNAME_MACHINE" in |
23453 |
+ HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` |
23454 |
+ case $UNAME_MACHINE in |
23455 |
9000/31?) HP_ARCH=m68000 ;; |
23456 |
9000/[34]??) HP_ARCH=m68k ;; |
23457 |
9000/[678][0-9][0-9]) |
23458 |
if test -x /usr/bin/getconf; then |
23459 |
- sc_cpu_version=$(/usr/bin/getconf SC_CPU_VERSION 2>/dev/null) |
23460 |
- sc_kernel_bits=$(/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null) |
23461 |
- case "$sc_cpu_version" in |
23462 |
+ sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` |
23463 |
+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` |
23464 |
+ case $sc_cpu_version in |
23465 |
523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 |
23466 |
528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 |
23467 |
532) # CPU_PA_RISC2_0 |
23468 |
- case "$sc_kernel_bits" in |
23469 |
+ case $sc_kernel_bits in |
23470 |
32) HP_ARCH=hppa2.0n ;; |
23471 |
64) HP_ARCH=hppa2.0w ;; |
23472 |
'') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 |
23473 |
@@ -715,7 +739,7 @@ EOF |
23474 |
exit (0); |
23475 |
} |
23476 |
EOF |
23477 |
- (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=$("$dummy") |
23478 |
+ (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"` |
23479 |
test -z "$HP_ARCH" && HP_ARCH=hppa |
23480 |
fi ;; |
23481 |
esac |
23482 |
@@ -740,12 +764,12 @@ EOF |
23483 |
HP_ARCH=hppa64 |
23484 |
fi |
23485 |
fi |
23486 |
- echo "$HP_ARCH"-hp-hpux"$HPUX_REV" |
23487 |
- exit ;; |
23488 |
+ GUESS=$HP_ARCH-hp-hpux$HPUX_REV |
23489 |
+ ;; |
23490 |
ia64:HP-UX:*:*) |
23491 |
- HPUX_REV=$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//') |
23492 |
- echo ia64-hp-hpux"$HPUX_REV" |
23493 |
- exit ;; |
23494 |
+ HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` |
23495 |
+ GUESS=ia64-hp-hpux$HPUX_REV |
23496 |
+ ;; |
23497 |
3050*:HI-UX:*:*) |
23498 |
set_cc_for_build |
23499 |
sed 's/^ //' << EOF > "$dummy.c" |
23500 |
@@ -773,38 +797,38 @@ EOF |
23501 |
exit (0); |
23502 |
} |
23503 |
EOF |
23504 |
- $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=$("$dummy") && |
23505 |
+ $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && |
23506 |
{ echo "$SYSTEM_NAME"; exit; } |
23507 |
- echo unknown-hitachi-hiuxwe2 |
23508 |
- exit ;; |
23509 |
+ GUESS=unknown-hitachi-hiuxwe2 |
23510 |
+ ;; |
23511 |
9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) |
23512 |
- echo hppa1.1-hp-bsd |
23513 |
- exit ;; |
23514 |
+ GUESS=hppa1.1-hp-bsd |
23515 |
+ ;; |
23516 |
9000/8??:4.3bsd:*:*) |
23517 |
- echo hppa1.0-hp-bsd |
23518 |
- exit ;; |
23519 |
+ GUESS=hppa1.0-hp-bsd |
23520 |
+ ;; |
23521 |
*9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) |
23522 |
- echo hppa1.0-hp-mpeix |
23523 |
- exit ;; |
23524 |
+ GUESS=hppa1.0-hp-mpeix |
23525 |
+ ;; |
23526 |
hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) |
23527 |
- echo hppa1.1-hp-osf |
23528 |
- exit ;; |
23529 |
+ GUESS=hppa1.1-hp-osf |
23530 |
+ ;; |
23531 |
hp8??:OSF1:*:*) |
23532 |
- echo hppa1.0-hp-osf |
23533 |
- exit ;; |
23534 |
+ GUESS=hppa1.0-hp-osf |
23535 |
+ ;; |
23536 |
i*86:OSF1:*:*) |
23537 |
if test -x /usr/sbin/sysversion ; then |
23538 |
- echo "$UNAME_MACHINE"-unknown-osf1mk |
23539 |
+ GUESS=$UNAME_MACHINE-unknown-osf1mk |
23540 |
else |
23541 |
- echo "$UNAME_MACHINE"-unknown-osf1 |
23542 |
+ GUESS=$UNAME_MACHINE-unknown-osf1 |
23543 |
fi |
23544 |
- exit ;; |
23545 |
+ ;; |
23546 |
parisc*:Lites*:*:*) |
23547 |
- echo hppa1.1-hp-lites |
23548 |
- exit ;; |
23549 |
+ GUESS=hppa1.1-hp-lites |
23550 |
+ ;; |
23551 |
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) |
23552 |
- echo c1-convex-bsd |
23553 |
- exit ;; |
23554 |
+ GUESS=c1-convex-bsd |
23555 |
+ ;; |
23556 |
C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) |
23557 |
if getsysinfo -f scalar_acc |
23558 |
then echo c32-convex-bsd |
23559 |
@@ -812,17 +836,18 @@ EOF |
23560 |
fi |
23561 |
exit ;; |
23562 |
C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) |
23563 |
- echo c34-convex-bsd |
23564 |
- exit ;; |
23565 |
+ GUESS=c34-convex-bsd |
23566 |
+ ;; |
23567 |
C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) |
23568 |
- echo c38-convex-bsd |
23569 |
- exit ;; |
23570 |
+ GUESS=c38-convex-bsd |
23571 |
+ ;; |
23572 |
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) |
23573 |
- echo c4-convex-bsd |
23574 |
- exit ;; |
23575 |
+ GUESS=c4-convex-bsd |
23576 |
+ ;; |
23577 |
CRAY*Y-MP:*:*:*) |
23578 |
- echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' |
23579 |
- exit ;; |
23580 |
+ CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` |
23581 |
+ GUESS=ymp-cray-unicos$CRAY_REL |
23582 |
+ ;; |
23583 |
CRAY*[A-Z]90:*:*:*) |
23584 |
echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ |
23585 |
| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ |
23586 |
@@ -830,114 +855,129 @@ EOF |
23587 |
-e 's/\.[^.]*$/.X/' |
23588 |
exit ;; |
23589 |
CRAY*TS:*:*:*) |
23590 |
- echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' |
23591 |
- exit ;; |
23592 |
+ CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` |
23593 |
+ GUESS=t90-cray-unicos$CRAY_REL |
23594 |
+ ;; |
23595 |
CRAY*T3E:*:*:*) |
23596 |
- echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' |
23597 |
- exit ;; |
23598 |
+ CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` |
23599 |
+ GUESS=alphaev5-cray-unicosmk$CRAY_REL |
23600 |
+ ;; |
23601 |
CRAY*SV1:*:*:*) |
23602 |
- echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' |
23603 |
- exit ;; |
23604 |
+ CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` |
23605 |
+ GUESS=sv1-cray-unicos$CRAY_REL |
23606 |
+ ;; |
23607 |
*:UNICOS/mp:*:*) |
23608 |
- echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' |
23609 |
- exit ;; |
23610 |
+ CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` |
23611 |
+ GUESS=craynv-cray-unicosmp$CRAY_REL |
23612 |
+ ;; |
23613 |
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) |
23614 |
- FUJITSU_PROC=$(uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz) |
23615 |
- FUJITSU_SYS=$(uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///') |
23616 |
- FUJITSU_REL=$(echo "$UNAME_RELEASE" | sed -e 's/ /_/') |
23617 |
- echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" |
23618 |
- exit ;; |
23619 |
+ FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` |
23620 |
+ FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` |
23621 |
+ FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` |
23622 |
+ GUESS=${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} |
23623 |
+ ;; |
23624 |
5000:UNIX_System_V:4.*:*) |
23625 |
- FUJITSU_SYS=$(uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///') |
23626 |
- FUJITSU_REL=$(echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/') |
23627 |
- echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" |
23628 |
- exit ;; |
23629 |
+ FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` |
23630 |
+ FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` |
23631 |
+ GUESS=sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} |
23632 |
+ ;; |
23633 |
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) |
23634 |
- echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" |
23635 |
- exit ;; |
23636 |
+ GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE |
23637 |
+ ;; |
23638 |
sparc*:BSD/OS:*:*) |
23639 |
- echo sparc-unknown-bsdi"$UNAME_RELEASE" |
23640 |
- exit ;; |
23641 |
+ GUESS=sparc-unknown-bsdi$UNAME_RELEASE |
23642 |
+ ;; |
23643 |
*:BSD/OS:*:*) |
23644 |
- echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" |
23645 |
- exit ;; |
23646 |
+ GUESS=$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE |
23647 |
+ ;; |
23648 |
arm:FreeBSD:*:*) |
23649 |
- UNAME_PROCESSOR=$(uname -p) |
23650 |
+ UNAME_PROCESSOR=`uname -p` |
23651 |
set_cc_for_build |
23652 |
if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ |
23653 |
| grep -q __ARM_PCS_VFP |
23654 |
then |
23655 |
- echo "${UNAME_PROCESSOR}"-unknown-freebsd"$(echo ${UNAME_RELEASE}|sed -e 's/[-(].*//')"-gnueabi |
23656 |
+ FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` |
23657 |
+ GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi |
23658 |
else |
23659 |
- echo "${UNAME_PROCESSOR}"-unknown-freebsd"$(echo ${UNAME_RELEASE}|sed -e 's/[-(].*//')"-gnueabihf |
23660 |
+ FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` |
23661 |
+ GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf |
23662 |
fi |
23663 |
- exit ;; |
23664 |
+ ;; |
23665 |
*:FreeBSD:*:*) |
23666 |
- UNAME_PROCESSOR=$(/usr/bin/uname -p) |
23667 |
- case "$UNAME_PROCESSOR" in |
23668 |
+ UNAME_PROCESSOR=`/usr/bin/uname -p` |
23669 |
+ case $UNAME_PROCESSOR in |
23670 |
amd64) |
23671 |
UNAME_PROCESSOR=x86_64 ;; |
23672 |
i386) |
23673 |
UNAME_PROCESSOR=i586 ;; |
23674 |
esac |
23675 |
- echo "$UNAME_PROCESSOR"-unknown-freebsd"$(echo "$UNAME_RELEASE"|sed -e 's/[-(].*//')" |
23676 |
- exit ;; |
23677 |
+ FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` |
23678 |
+ GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL |
23679 |
+ ;; |
23680 |
i*:CYGWIN*:*) |
23681 |
- echo "$UNAME_MACHINE"-pc-cygwin |
23682 |
- exit ;; |
23683 |
+ GUESS=$UNAME_MACHINE-pc-cygwin |
23684 |
+ ;; |
23685 |
*:MINGW64*:*) |
23686 |
- echo "$UNAME_MACHINE"-pc-mingw64 |
23687 |
- exit ;; |
23688 |
+ GUESS=$UNAME_MACHINE-pc-mingw64 |
23689 |
+ ;; |
23690 |
*:MINGW*:*) |
23691 |
- echo "$UNAME_MACHINE"-pc-mingw32 |
23692 |
- exit ;; |
23693 |
+ GUESS=$UNAME_MACHINE-pc-mingw32 |
23694 |
+ ;; |
23695 |
*:MSYS*:*) |
23696 |
- echo "$UNAME_MACHINE"-pc-msys |
23697 |
- exit ;; |
23698 |
+ GUESS=$UNAME_MACHINE-pc-msys |
23699 |
+ ;; |
23700 |
i*:PW*:*) |
23701 |
- echo "$UNAME_MACHINE"-pc-pw32 |
23702 |
- exit ;; |
23703 |
+ GUESS=$UNAME_MACHINE-pc-pw32 |
23704 |
+ ;; |
23705 |
+ *:SerenityOS:*:*) |
23706 |
+ GUESS=$UNAME_MACHINE-pc-serenity |
23707 |
+ ;; |
23708 |
*:Interix*:*) |
23709 |
- case "$UNAME_MACHINE" in |
23710 |
+ case $UNAME_MACHINE in |
23711 |
x86) |
23712 |
- echo i586-pc-interix"$UNAME_RELEASE" |
23713 |
- exit ;; |
23714 |
+ GUESS=i586-pc-interix$UNAME_RELEASE |
23715 |
+ ;; |
23716 |
authenticamd | genuineintel | EM64T) |
23717 |
- echo x86_64-unknown-interix"$UNAME_RELEASE" |
23718 |
- exit ;; |
23719 |
+ GUESS=x86_64-unknown-interix$UNAME_RELEASE |
23720 |
+ ;; |
23721 |
IA64) |
23722 |
- echo ia64-unknown-interix"$UNAME_RELEASE" |
23723 |
- exit ;; |
23724 |
+ GUESS=ia64-unknown-interix$UNAME_RELEASE |
23725 |
+ ;; |
23726 |
esac ;; |
23727 |
i*:UWIN*:*) |
23728 |
- echo "$UNAME_MACHINE"-pc-uwin |
23729 |
- exit ;; |
23730 |
+ GUESS=$UNAME_MACHINE-pc-uwin |
23731 |
+ ;; |
23732 |
amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) |
23733 |
- echo x86_64-pc-cygwin |
23734 |
- exit ;; |
23735 |
+ GUESS=x86_64-pc-cygwin |
23736 |
+ ;; |
23737 |
prep*:SunOS:5.*:*) |
23738 |
- echo powerpcle-unknown-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')" |
23739 |
- exit ;; |
23740 |
+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` |
23741 |
+ GUESS=powerpcle-unknown-solaris2$SUN_REL |
23742 |
+ ;; |
23743 |
*:GNU:*:*) |
23744 |
# the GNU system |
23745 |
- echo "$(echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,')-unknown-$LIBC$(echo "$UNAME_RELEASE"|sed -e 's,/.*$,,')" |
23746 |
- exit ;; |
23747 |
+ GNU_ARCH=`echo "$UNAME_MACHINE" | sed -e 's,[-/].*$,,'` |
23748 |
+ GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's,/.*$,,'` |
23749 |
+ GUESS=$GNU_ARCH-unknown-$LIBC$GNU_REL |
23750 |
+ ;; |
23751 |
*:GNU/*:*:*) |
23752 |
# other systems with GNU libc and userland |
23753 |
- echo "$UNAME_MACHINE-unknown-$(echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]")$(echo "$UNAME_RELEASE"|sed -e 's/[-(].*//')-$LIBC" |
23754 |
- exit ;; |
23755 |
+ GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"` |
23756 |
+ GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` |
23757 |
+ GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC |
23758 |
+ ;; |
23759 |
*:Minix:*:*) |
23760 |
- echo "$UNAME_MACHINE"-unknown-minix |
23761 |
- exit ;; |
23762 |
+ GUESS=$UNAME_MACHINE-unknown-minix |
23763 |
+ ;; |
23764 |
aarch64:Linux:*:*) |
23765 |
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" |
23766 |
- exit ;; |
23767 |
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
23768 |
+ ;; |
23769 |
aarch64_be:Linux:*:*) |
23770 |
UNAME_MACHINE=aarch64_be |
23771 |
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" |
23772 |
- exit ;; |
23773 |
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
23774 |
+ ;; |
23775 |
alpha:Linux:*:*) |
23776 |
- case $(sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null) in |
23777 |
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in |
23778 |
EV5) UNAME_MACHINE=alphaev5 ;; |
23779 |
EV56) UNAME_MACHINE=alphaev56 ;; |
23780 |
PCA56) UNAME_MACHINE=alphapca56 ;; |
23781 |
@@ -948,63 +988,63 @@ EOF |
23782 |
esac |
23783 |
objdump --private-headers /bin/sh | grep -q ld.so.1 |
23784 |
if test "$?" = 0 ; then LIBC=gnulibc1 ; fi |
23785 |
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" |
23786 |
- exit ;; |
23787 |
- arc:Linux:*:* | arceb:Linux:*:*) |
23788 |
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" |
23789 |
- exit ;; |
23790 |
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
23791 |
+ ;; |
23792 |
+ arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*) |
23793 |
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
23794 |
+ ;; |
23795 |
arm*:Linux:*:*) |
23796 |
set_cc_for_build |
23797 |
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ |
23798 |
| grep -q __ARM_EABI__ |
23799 |
then |
23800 |
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" |
23801 |
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
23802 |
else |
23803 |
if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ |
23804 |
| grep -q __ARM_PCS_VFP |
23805 |
then |
23806 |
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi |
23807 |
+ GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi |
23808 |
else |
23809 |
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf |
23810 |
+ GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf |
23811 |
fi |
23812 |
fi |
23813 |
- exit ;; |
23814 |
+ ;; |
23815 |
avr32*:Linux:*:*) |
23816 |
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" |
23817 |
- exit ;; |
23818 |
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
23819 |
+ ;; |
23820 |
cris:Linux:*:*) |
23821 |
- echo "$UNAME_MACHINE"-axis-linux-"$LIBC" |
23822 |
- exit ;; |
23823 |
+ GUESS=$UNAME_MACHINE-axis-linux-$LIBC |
23824 |
+ ;; |
23825 |
crisv32:Linux:*:*) |
23826 |
- echo "$UNAME_MACHINE"-axis-linux-"$LIBC" |
23827 |
- exit ;; |
23828 |
+ GUESS=$UNAME_MACHINE-axis-linux-$LIBC |
23829 |
+ ;; |
23830 |
e2k:Linux:*:*) |
23831 |
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" |
23832 |
- exit ;; |
23833 |
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
23834 |
+ ;; |
23835 |
frv:Linux:*:*) |
23836 |
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" |
23837 |
- exit ;; |
23838 |
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
23839 |
+ ;; |
23840 |
hexagon:Linux:*:*) |
23841 |
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" |
23842 |
- exit ;; |
23843 |
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
23844 |
+ ;; |
23845 |
i*86:Linux:*:*) |
23846 |
- echo "$UNAME_MACHINE"-pc-linux-"$LIBC" |
23847 |
- exit ;; |
23848 |
+ GUESS=$UNAME_MACHINE-pc-linux-$LIBC |
23849 |
+ ;; |
23850 |
ia64:Linux:*:*) |
23851 |
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" |
23852 |
- exit ;; |
23853 |
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
23854 |
+ ;; |
23855 |
k1om:Linux:*:*) |
23856 |
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" |
23857 |
- exit ;; |
23858 |
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
23859 |
+ ;; |
23860 |
loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*) |
23861 |
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" |
23862 |
- exit ;; |
23863 |
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
23864 |
+ ;; |
23865 |
m32r*:Linux:*:*) |
23866 |
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" |
23867 |
- exit ;; |
23868 |
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
23869 |
+ ;; |
23870 |
m68*:Linux:*:*) |
23871 |
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" |
23872 |
- exit ;; |
23873 |
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
23874 |
+ ;; |
23875 |
mips:Linux:*:* | mips64:Linux:*:*) |
23876 |
set_cc_for_build |
23877 |
IS_GLIBC=0 |
23878 |
@@ -1049,138 +1089,150 @@ EOF |
23879 |
#endif |
23880 |
#endif |
23881 |
EOF |
23882 |
- eval "$($CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI')" |
23883 |
+ cc_set_vars=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'` |
23884 |
+ eval "$cc_set_vars" |
23885 |
test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; } |
23886 |
;; |
23887 |
mips64el:Linux:*:*) |
23888 |
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" |
23889 |
- exit ;; |
23890 |
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
23891 |
+ ;; |
23892 |
openrisc*:Linux:*:*) |
23893 |
- echo or1k-unknown-linux-"$LIBC" |
23894 |
- exit ;; |
23895 |
+ GUESS=or1k-unknown-linux-$LIBC |
23896 |
+ ;; |
23897 |
or32:Linux:*:* | or1k*:Linux:*:*) |
23898 |
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" |
23899 |
- exit ;; |
23900 |
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
23901 |
+ ;; |
23902 |
padre:Linux:*:*) |
23903 |
- echo sparc-unknown-linux-"$LIBC" |
23904 |
- exit ;; |
23905 |
+ GUESS=sparc-unknown-linux-$LIBC |
23906 |
+ ;; |
23907 |
parisc64:Linux:*:* | hppa64:Linux:*:*) |
23908 |
- echo hppa64-unknown-linux-"$LIBC" |
23909 |
- exit ;; |
23910 |
+ GUESS=hppa64-unknown-linux-$LIBC |
23911 |
+ ;; |
23912 |
parisc:Linux:*:* | hppa:Linux:*:*) |
23913 |
# Look for CPU level |
23914 |
- case $(grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2) in |
23915 |
- PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;; |
23916 |
- PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; |
23917 |
- *) echo hppa-unknown-linux-"$LIBC" ;; |
23918 |
+ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in |
23919 |
+ PA7*) GUESS=hppa1.1-unknown-linux-$LIBC ;; |
23920 |
+ PA8*) GUESS=hppa2.0-unknown-linux-$LIBC ;; |
23921 |
+ *) GUESS=hppa-unknown-linux-$LIBC ;; |
23922 |
esac |
23923 |
- exit ;; |
23924 |
+ ;; |
23925 |
ppc64:Linux:*:*) |
23926 |
- echo powerpc64-unknown-linux-"$LIBC" |
23927 |
- exit ;; |
23928 |
+ GUESS=powerpc64-unknown-linux-$LIBC |
23929 |
+ ;; |
23930 |
ppc:Linux:*:*) |
23931 |
- echo powerpc-unknown-linux-"$LIBC" |
23932 |
- exit ;; |
23933 |
+ GUESS=powerpc-unknown-linux-$LIBC |
23934 |
+ ;; |
23935 |
ppc64le:Linux:*:*) |
23936 |
- echo powerpc64le-unknown-linux-"$LIBC" |
23937 |
- exit ;; |
23938 |
+ GUESS=powerpc64le-unknown-linux-$LIBC |
23939 |
+ ;; |
23940 |
ppcle:Linux:*:*) |
23941 |
- echo powerpcle-unknown-linux-"$LIBC" |
23942 |
- exit ;; |
23943 |
+ GUESS=powerpcle-unknown-linux-$LIBC |
23944 |
+ ;; |
23945 |
riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*) |
23946 |
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" |
23947 |
- exit ;; |
23948 |
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
23949 |
+ ;; |
23950 |
s390:Linux:*:* | s390x:Linux:*:*) |
23951 |
- echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" |
23952 |
- exit ;; |
23953 |
+ GUESS=$UNAME_MACHINE-ibm-linux-$LIBC |
23954 |
+ ;; |
23955 |
sh64*:Linux:*:*) |
23956 |
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" |
23957 |
- exit ;; |
23958 |
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
23959 |
+ ;; |
23960 |
sh*:Linux:*:*) |
23961 |
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" |
23962 |
- exit ;; |
23963 |
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
23964 |
+ ;; |
23965 |
sparc:Linux:*:* | sparc64:Linux:*:*) |
23966 |
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" |
23967 |
- exit ;; |
23968 |
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
23969 |
+ ;; |
23970 |
tile*:Linux:*:*) |
23971 |
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" |
23972 |
- exit ;; |
23973 |
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
23974 |
+ ;; |
23975 |
vax:Linux:*:*) |
23976 |
- echo "$UNAME_MACHINE"-dec-linux-"$LIBC" |
23977 |
- exit ;; |
23978 |
+ GUESS=$UNAME_MACHINE-dec-linux-$LIBC |
23979 |
+ ;; |
23980 |
x86_64:Linux:*:*) |
23981 |
set_cc_for_build |
23982 |
+ CPU=$UNAME_MACHINE |
23983 |
LIBCABI=$LIBC |
23984 |
if test "$CC_FOR_BUILD" != no_compiler_found; then |
23985 |
- if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \ |
23986 |
- (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ |
23987 |
- grep IS_X32 >/dev/null |
23988 |
- then |
23989 |
- LIBCABI="$LIBC"x32 |
23990 |
- fi |
23991 |
+ ABI=64 |
23992 |
+ sed 's/^ //' << EOF > "$dummy.c" |
23993 |
+ #ifdef __i386__ |
23994 |
+ ABI=x86 |
23995 |
+ #else |
23996 |
+ #ifdef __ILP32__ |
23997 |
+ ABI=x32 |
23998 |
+ #endif |
23999 |
+ #endif |
24000 |
+EOF |
24001 |
+ cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'` |
24002 |
+ eval "$cc_set_abi" |
24003 |
+ case $ABI in |
24004 |
+ x86) CPU=i686 ;; |
24005 |
+ x32) LIBCABI=${LIBC}x32 ;; |
24006 |
+ esac |
24007 |
fi |
24008 |
- echo "$UNAME_MACHINE"-pc-linux-"$LIBCABI" |
24009 |
- exit ;; |
24010 |
+ GUESS=$CPU-pc-linux-$LIBCABI |
24011 |
+ ;; |
24012 |
xtensa*:Linux:*:*) |
24013 |
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" |
24014 |
- exit ;; |
24015 |
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
24016 |
+ ;; |
24017 |
i*86:DYNIX/ptx:4*:*) |
24018 |
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. |
24019 |
# earlier versions are messed up and put the nodename in both |
24020 |
# sysname and nodename. |
24021 |
- echo i386-sequent-sysv4 |
24022 |
- exit ;; |
24023 |
+ GUESS=i386-sequent-sysv4 |
24024 |
+ ;; |
24025 |
i*86:UNIX_SV:4.2MP:2.*) |
24026 |
# Unixware is an offshoot of SVR4, but it has its own version |
24027 |
# number series starting with 2... |
24028 |
# I am not positive that other SVR4 systems won't match this, |
24029 |
# I just have to hope. -- rms. |
24030 |
# Use sysv4.2uw... so that sysv4* matches it. |
24031 |
- echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION" |
24032 |
- exit ;; |
24033 |
+ GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION |
24034 |
+ ;; |
24035 |
i*86:OS/2:*:*) |
24036 |
# If we were able to find `uname', then EMX Unix compatibility |
24037 |
# is probably installed. |
24038 |
- echo "$UNAME_MACHINE"-pc-os2-emx |
24039 |
- exit ;; |
24040 |
+ GUESS=$UNAME_MACHINE-pc-os2-emx |
24041 |
+ ;; |
24042 |
i*86:XTS-300:*:STOP) |
24043 |
- echo "$UNAME_MACHINE"-unknown-stop |
24044 |
- exit ;; |
24045 |
+ GUESS=$UNAME_MACHINE-unknown-stop |
24046 |
+ ;; |
24047 |
i*86:atheos:*:*) |
24048 |
- echo "$UNAME_MACHINE"-unknown-atheos |
24049 |
- exit ;; |
24050 |
+ GUESS=$UNAME_MACHINE-unknown-atheos |
24051 |
+ ;; |
24052 |
i*86:syllable:*:*) |
24053 |
- echo "$UNAME_MACHINE"-pc-syllable |
24054 |
- exit ;; |
24055 |
+ GUESS=$UNAME_MACHINE-pc-syllable |
24056 |
+ ;; |
24057 |
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) |
24058 |
- echo i386-unknown-lynxos"$UNAME_RELEASE" |
24059 |
- exit ;; |
24060 |
+ GUESS=i386-unknown-lynxos$UNAME_RELEASE |
24061 |
+ ;; |
24062 |
i*86:*DOS:*:*) |
24063 |
- echo "$UNAME_MACHINE"-pc-msdosdjgpp |
24064 |
- exit ;; |
24065 |
+ GUESS=$UNAME_MACHINE-pc-msdosdjgpp |
24066 |
+ ;; |
24067 |
i*86:*:4.*:*) |
24068 |
- UNAME_REL=$(echo "$UNAME_RELEASE" | sed 's/\/MP$//') |
24069 |
+ UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` |
24070 |
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then |
24071 |
- echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" |
24072 |
+ GUESS=$UNAME_MACHINE-univel-sysv$UNAME_REL |
24073 |
else |
24074 |
- echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL" |
24075 |
+ GUESS=$UNAME_MACHINE-pc-sysv$UNAME_REL |
24076 |
fi |
24077 |
- exit ;; |
24078 |
+ ;; |
24079 |
i*86:*:5:[678]*) |
24080 |
# UnixWare 7.x, OpenUNIX and OpenServer 6. |
24081 |
- case $(/bin/uname -X | grep "^Machine") in |
24082 |
+ case `/bin/uname -X | grep "^Machine"` in |
24083 |
*486*) UNAME_MACHINE=i486 ;; |
24084 |
*Pentium) UNAME_MACHINE=i586 ;; |
24085 |
*Pent*|*Celeron) UNAME_MACHINE=i686 ;; |
24086 |
esac |
24087 |
- echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}" |
24088 |
- exit ;; |
24089 |
+ GUESS=$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} |
24090 |
+ ;; |
24091 |
i*86:*:3.2:*) |
24092 |
if test -f /usr/options/cb.name; then |
24093 |
- UNAME_REL=$(sed -n 's/.*Version //p' </usr/options/cb.name) |
24094 |
- echo "$UNAME_MACHINE"-pc-isc"$UNAME_REL" |
24095 |
+ UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` |
24096 |
+ GUESS=$UNAME_MACHINE-pc-isc$UNAME_REL |
24097 |
elif /bin/uname -X 2>/dev/null >/dev/null ; then |
24098 |
- UNAME_REL=$( (/bin/uname -X|grep Release|sed -e 's/.*= //')) |
24099 |
+ UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` |
24100 |
(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 |
24101 |
(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ |
24102 |
&& UNAME_MACHINE=i586 |
24103 |
@@ -1188,11 +1240,11 @@ EOF |
24104 |
&& UNAME_MACHINE=i686 |
24105 |
(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ |
24106 |
&& UNAME_MACHINE=i686 |
24107 |
- echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL" |
24108 |
+ GUESS=$UNAME_MACHINE-pc-sco$UNAME_REL |
24109 |
else |
24110 |
- echo "$UNAME_MACHINE"-pc-sysv32 |
24111 |
+ GUESS=$UNAME_MACHINE-pc-sysv32 |
24112 |
fi |
24113 |
- exit ;; |
24114 |
+ ;; |
24115 |
pc:*:*:*) |
24116 |
# Left here for compatibility: |
24117 |
# uname -m prints for DJGPP always 'pc', but it prints nothing about |
24118 |
@@ -1200,37 +1252,37 @@ EOF |
24119 |
# Note: whatever this is, it MUST be the same as what config.sub |
24120 |
# prints for the "djgpp" host, or else GDB configure will decide that |
24121 |
# this is a cross-build. |
24122 |
- echo i586-pc-msdosdjgpp |
24123 |
- exit ;; |
24124 |
+ GUESS=i586-pc-msdosdjgpp |
24125 |
+ ;; |
24126 |
Intel:Mach:3*:*) |
24127 |
- echo i386-pc-mach3 |
24128 |
- exit ;; |
24129 |
+ GUESS=i386-pc-mach3 |
24130 |
+ ;; |
24131 |
paragon:*:*:*) |
24132 |
- echo i860-intel-osf1 |
24133 |
- exit ;; |
24134 |
+ GUESS=i860-intel-osf1 |
24135 |
+ ;; |
24136 |
i860:*:4.*:*) # i860-SVR4 |
24137 |
if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then |
24138 |
- echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4 |
24139 |
+ GUESS=i860-stardent-sysv$UNAME_RELEASE # Stardent Vistra i860-SVR4 |
24140 |
else # Add other i860-SVR4 vendors below as they are discovered. |
24141 |
- echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4 |
24142 |
+ GUESS=i860-unknown-sysv$UNAME_RELEASE # Unknown i860-SVR4 |
24143 |
fi |
24144 |
- exit ;; |
24145 |
+ ;; |
24146 |
mini*:CTIX:SYS*5:*) |
24147 |
# "miniframe" |
24148 |
- echo m68010-convergent-sysv |
24149 |
- exit ;; |
24150 |
+ GUESS=m68010-convergent-sysv |
24151 |
+ ;; |
24152 |
mc68k:UNIX:SYSTEM5:3.51m) |
24153 |
- echo m68k-convergent-sysv |
24154 |
- exit ;; |
24155 |
+ GUESS=m68k-convergent-sysv |
24156 |
+ ;; |
24157 |
M680?0:D-NIX:5.3:*) |
24158 |
- echo m68k-diab-dnix |
24159 |
- exit ;; |
24160 |
+ GUESS=m68k-diab-dnix |
24161 |
+ ;; |
24162 |
M68*:*:R3V[5678]*:*) |
24163 |
test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; |
24164 |
3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) |
24165 |
OS_REL='' |
24166 |
test -r /etc/.relid \ |
24167 |
- && OS_REL=.$(sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid) |
24168 |
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` |
24169 |
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \ |
24170 |
&& { echo i486-ncr-sysv4.3"$OS_REL"; exit; } |
24171 |
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ |
24172 |
@@ -1241,7 +1293,7 @@ EOF |
24173 |
NCR*:*:4.2:* | MPRAS*:*:4.2:*) |
24174 |
OS_REL='.3' |
24175 |
test -r /etc/.relid \ |
24176 |
- && OS_REL=.$(sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid) |
24177 |
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` |
24178 |
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \ |
24179 |
&& { echo i486-ncr-sysv4.3"$OS_REL"; exit; } |
24180 |
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ |
24181 |
@@ -1249,118 +1301,118 @@ EOF |
24182 |
/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ |
24183 |
&& { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; |
24184 |
m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) |
24185 |
- echo m68k-unknown-lynxos"$UNAME_RELEASE" |
24186 |
- exit ;; |
24187 |
+ GUESS=m68k-unknown-lynxos$UNAME_RELEASE |
24188 |
+ ;; |
24189 |
mc68030:UNIX_System_V:4.*:*) |
24190 |
- echo m68k-atari-sysv4 |
24191 |
- exit ;; |
24192 |
+ GUESS=m68k-atari-sysv4 |
24193 |
+ ;; |
24194 |
TSUNAMI:LynxOS:2.*:*) |
24195 |
- echo sparc-unknown-lynxos"$UNAME_RELEASE" |
24196 |
- exit ;; |
24197 |
+ GUESS=sparc-unknown-lynxos$UNAME_RELEASE |
24198 |
+ ;; |
24199 |
rs6000:LynxOS:2.*:*) |
24200 |
- echo rs6000-unknown-lynxos"$UNAME_RELEASE" |
24201 |
- exit ;; |
24202 |
+ GUESS=rs6000-unknown-lynxos$UNAME_RELEASE |
24203 |
+ ;; |
24204 |
PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) |
24205 |
- echo powerpc-unknown-lynxos"$UNAME_RELEASE" |
24206 |
- exit ;; |
24207 |
+ GUESS=powerpc-unknown-lynxos$UNAME_RELEASE |
24208 |
+ ;; |
24209 |
SM[BE]S:UNIX_SV:*:*) |
24210 |
- echo mips-dde-sysv"$UNAME_RELEASE" |
24211 |
- exit ;; |
24212 |
+ GUESS=mips-dde-sysv$UNAME_RELEASE |
24213 |
+ ;; |
24214 |
RM*:ReliantUNIX-*:*:*) |
24215 |
- echo mips-sni-sysv4 |
24216 |
- exit ;; |
24217 |
+ GUESS=mips-sni-sysv4 |
24218 |
+ ;; |
24219 |
RM*:SINIX-*:*:*) |
24220 |
- echo mips-sni-sysv4 |
24221 |
- exit ;; |
24222 |
+ GUESS=mips-sni-sysv4 |
24223 |
+ ;; |
24224 |
*:SINIX-*:*:*) |
24225 |
if uname -p 2>/dev/null >/dev/null ; then |
24226 |
- UNAME_MACHINE=$( (uname -p) 2>/dev/null) |
24227 |
- echo "$UNAME_MACHINE"-sni-sysv4 |
24228 |
+ UNAME_MACHINE=`(uname -p) 2>/dev/null` |
24229 |
+ GUESS=$UNAME_MACHINE-sni-sysv4 |
24230 |
else |
24231 |
- echo ns32k-sni-sysv |
24232 |
+ GUESS=ns32k-sni-sysv |
24233 |
fi |
24234 |
- exit ;; |
24235 |
+ ;; |
24236 |
PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort |
24237 |
# says <Richard.M.Bartel@×××××××××××××.GOV> |
24238 |
- echo i586-unisys-sysv4 |
24239 |
- exit ;; |
24240 |
+ GUESS=i586-unisys-sysv4 |
24241 |
+ ;; |
24242 |
*:UNIX_System_V:4*:FTX*) |
24243 |
# From Gerald Hewes <hewes@××××××××××.com>. |
24244 |
# How about differentiating between stratus architectures? -djm |
24245 |
- echo hppa1.1-stratus-sysv4 |
24246 |
- exit ;; |
24247 |
+ GUESS=hppa1.1-stratus-sysv4 |
24248 |
+ ;; |
24249 |
*:*:*:FTX*) |
24250 |
# From seanf@××××××××××××.com. |
24251 |
- echo i860-stratus-sysv4 |
24252 |
- exit ;; |
24253 |
+ GUESS=i860-stratus-sysv4 |
24254 |
+ ;; |
24255 |
i*86:VOS:*:*) |
24256 |
# From Paul.Green@×××××××.com. |
24257 |
- echo "$UNAME_MACHINE"-stratus-vos |
24258 |
- exit ;; |
24259 |
+ GUESS=$UNAME_MACHINE-stratus-vos |
24260 |
+ ;; |
24261 |
*:VOS:*:*) |
24262 |
# From Paul.Green@×××××××.com. |
24263 |
- echo hppa1.1-stratus-vos |
24264 |
- exit ;; |
24265 |
+ GUESS=hppa1.1-stratus-vos |
24266 |
+ ;; |
24267 |
mc68*:A/UX:*:*) |
24268 |
- echo m68k-apple-aux"$UNAME_RELEASE" |
24269 |
- exit ;; |
24270 |
+ GUESS=m68k-apple-aux$UNAME_RELEASE |
24271 |
+ ;; |
24272 |
news*:NEWS-OS:6*:*) |
24273 |
- echo mips-sony-newsos6 |
24274 |
- exit ;; |
24275 |
+ GUESS=mips-sony-newsos6 |
24276 |
+ ;; |
24277 |
R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) |
24278 |
if test -d /usr/nec; then |
24279 |
- echo mips-nec-sysv"$UNAME_RELEASE" |
24280 |
+ GUESS=mips-nec-sysv$UNAME_RELEASE |
24281 |
else |
24282 |
- echo mips-unknown-sysv"$UNAME_RELEASE" |
24283 |
+ GUESS=mips-unknown-sysv$UNAME_RELEASE |
24284 |
fi |
24285 |
- exit ;; |
24286 |
+ ;; |
24287 |
BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. |
24288 |
- echo powerpc-be-beos |
24289 |
- exit ;; |
24290 |
+ GUESS=powerpc-be-beos |
24291 |
+ ;; |
24292 |
BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. |
24293 |
- echo powerpc-apple-beos |
24294 |
- exit ;; |
24295 |
+ GUESS=powerpc-apple-beos |
24296 |
+ ;; |
24297 |
BePC:BeOS:*:*) # BeOS running on Intel PC compatible. |
24298 |
- echo i586-pc-beos |
24299 |
- exit ;; |
24300 |
+ GUESS=i586-pc-beos |
24301 |
+ ;; |
24302 |
BePC:Haiku:*:*) # Haiku running on Intel PC compatible. |
24303 |
- echo i586-pc-haiku |
24304 |
- exit ;; |
24305 |
+ GUESS=i586-pc-haiku |
24306 |
+ ;; |
24307 |
x86_64:Haiku:*:*) |
24308 |
- echo x86_64-unknown-haiku |
24309 |
- exit ;; |
24310 |
+ GUESS=x86_64-unknown-haiku |
24311 |
+ ;; |
24312 |
SX-4:SUPER-UX:*:*) |
24313 |
- echo sx4-nec-superux"$UNAME_RELEASE" |
24314 |
- exit ;; |
24315 |
+ GUESS=sx4-nec-superux$UNAME_RELEASE |
24316 |
+ ;; |
24317 |
SX-5:SUPER-UX:*:*) |
24318 |
- echo sx5-nec-superux"$UNAME_RELEASE" |
24319 |
- exit ;; |
24320 |
+ GUESS=sx5-nec-superux$UNAME_RELEASE |
24321 |
+ ;; |
24322 |
SX-6:SUPER-UX:*:*) |
24323 |
- echo sx6-nec-superux"$UNAME_RELEASE" |
24324 |
- exit ;; |
24325 |
+ GUESS=sx6-nec-superux$UNAME_RELEASE |
24326 |
+ ;; |
24327 |
SX-7:SUPER-UX:*:*) |
24328 |
- echo sx7-nec-superux"$UNAME_RELEASE" |
24329 |
- exit ;; |
24330 |
+ GUESS=sx7-nec-superux$UNAME_RELEASE |
24331 |
+ ;; |
24332 |
SX-8:SUPER-UX:*:*) |
24333 |
- echo sx8-nec-superux"$UNAME_RELEASE" |
24334 |
- exit ;; |
24335 |
+ GUESS=sx8-nec-superux$UNAME_RELEASE |
24336 |
+ ;; |
24337 |
SX-8R:SUPER-UX:*:*) |
24338 |
- echo sx8r-nec-superux"$UNAME_RELEASE" |
24339 |
- exit ;; |
24340 |
+ GUESS=sx8r-nec-superux$UNAME_RELEASE |
24341 |
+ ;; |
24342 |
SX-ACE:SUPER-UX:*:*) |
24343 |
- echo sxace-nec-superux"$UNAME_RELEASE" |
24344 |
- exit ;; |
24345 |
+ GUESS=sxace-nec-superux$UNAME_RELEASE |
24346 |
+ ;; |
24347 |
Power*:Rhapsody:*:*) |
24348 |
- echo powerpc-apple-rhapsody"$UNAME_RELEASE" |
24349 |
- exit ;; |
24350 |
+ GUESS=powerpc-apple-rhapsody$UNAME_RELEASE |
24351 |
+ ;; |
24352 |
*:Rhapsody:*:*) |
24353 |
- echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" |
24354 |
- exit ;; |
24355 |
+ GUESS=$UNAME_MACHINE-apple-rhapsody$UNAME_RELEASE |
24356 |
+ ;; |
24357 |
arm64:Darwin:*:*) |
24358 |
- echo aarch64-apple-darwin"$UNAME_RELEASE" |
24359 |
- exit ;; |
24360 |
+ GUESS=aarch64-apple-darwin$UNAME_RELEASE |
24361 |
+ ;; |
24362 |
*:Darwin:*:*) |
24363 |
- UNAME_PROCESSOR=$(uname -p) |
24364 |
+ UNAME_PROCESSOR=`uname -p` |
24365 |
case $UNAME_PROCESSOR in |
24366 |
unknown) UNAME_PROCESSOR=powerpc ;; |
24367 |
esac |
24368 |
@@ -1394,109 +1446,119 @@ EOF |
24369 |
# uname -m returns i386 or x86_64 |
24370 |
UNAME_PROCESSOR=$UNAME_MACHINE |
24371 |
fi |
24372 |
- echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" |
24373 |
- exit ;; |
24374 |
+ GUESS=$UNAME_PROCESSOR-apple-darwin$UNAME_RELEASE |
24375 |
+ ;; |
24376 |
*:procnto*:*:* | *:QNX:[0123456789]*:*) |
24377 |
- UNAME_PROCESSOR=$(uname -p) |
24378 |
+ UNAME_PROCESSOR=`uname -p` |
24379 |
if test "$UNAME_PROCESSOR" = x86; then |
24380 |
UNAME_PROCESSOR=i386 |
24381 |
UNAME_MACHINE=pc |
24382 |
fi |
24383 |
- echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE" |
24384 |
- exit ;; |
24385 |
+ GUESS=$UNAME_PROCESSOR-$UNAME_MACHINE-nto-qnx$UNAME_RELEASE |
24386 |
+ ;; |
24387 |
*:QNX:*:4*) |
24388 |
- echo i386-pc-qnx |
24389 |
- exit ;; |
24390 |
+ GUESS=i386-pc-qnx |
24391 |
+ ;; |
24392 |
NEO-*:NONSTOP_KERNEL:*:*) |
24393 |
- echo neo-tandem-nsk"$UNAME_RELEASE" |
24394 |
- exit ;; |
24395 |
+ GUESS=neo-tandem-nsk$UNAME_RELEASE |
24396 |
+ ;; |
24397 |
NSE-*:NONSTOP_KERNEL:*:*) |
24398 |
- echo nse-tandem-nsk"$UNAME_RELEASE" |
24399 |
- exit ;; |
24400 |
+ GUESS=nse-tandem-nsk$UNAME_RELEASE |
24401 |
+ ;; |
24402 |
NSR-*:NONSTOP_KERNEL:*:*) |
24403 |
- echo nsr-tandem-nsk"$UNAME_RELEASE" |
24404 |
- exit ;; |
24405 |
+ GUESS=nsr-tandem-nsk$UNAME_RELEASE |
24406 |
+ ;; |
24407 |
NSV-*:NONSTOP_KERNEL:*:*) |
24408 |
- echo nsv-tandem-nsk"$UNAME_RELEASE" |
24409 |
- exit ;; |
24410 |
+ GUESS=nsv-tandem-nsk$UNAME_RELEASE |
24411 |
+ ;; |
24412 |
NSX-*:NONSTOP_KERNEL:*:*) |
24413 |
- echo nsx-tandem-nsk"$UNAME_RELEASE" |
24414 |
- exit ;; |
24415 |
+ GUESS=nsx-tandem-nsk$UNAME_RELEASE |
24416 |
+ ;; |
24417 |
*:NonStop-UX:*:*) |
24418 |
- echo mips-compaq-nonstopux |
24419 |
- exit ;; |
24420 |
+ GUESS=mips-compaq-nonstopux |
24421 |
+ ;; |
24422 |
BS2000:POSIX*:*:*) |
24423 |
- echo bs2000-siemens-sysv |
24424 |
- exit ;; |
24425 |
+ GUESS=bs2000-siemens-sysv |
24426 |
+ ;; |
24427 |
DS/*:UNIX_System_V:*:*) |
24428 |
- echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE" |
24429 |
- exit ;; |
24430 |
+ GUESS=$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE |
24431 |
+ ;; |
24432 |
*:Plan9:*:*) |
24433 |
# "uname -m" is not consistent, so use $cputype instead. 386 |
24434 |
# is converted to i386 for consistency with other x86 |
24435 |
# operating systems. |
24436 |
- # shellcheck disable=SC2154 |
24437 |
- if test "$cputype" = 386; then |
24438 |
+ if test "${cputype-}" = 386; then |
24439 |
UNAME_MACHINE=i386 |
24440 |
- else |
24441 |
- UNAME_MACHINE="$cputype" |
24442 |
+ elif test "x${cputype-}" != x; then |
24443 |
+ UNAME_MACHINE=$cputype |
24444 |
fi |
24445 |
- echo "$UNAME_MACHINE"-unknown-plan9 |
24446 |
- exit ;; |
24447 |
+ GUESS=$UNAME_MACHINE-unknown-plan9 |
24448 |
+ ;; |
24449 |
*:TOPS-10:*:*) |
24450 |
- echo pdp10-unknown-tops10 |
24451 |
- exit ;; |
24452 |
+ GUESS=pdp10-unknown-tops10 |
24453 |
+ ;; |
24454 |
*:TENEX:*:*) |
24455 |
- echo pdp10-unknown-tenex |
24456 |
- exit ;; |
24457 |
+ GUESS=pdp10-unknown-tenex |
24458 |
+ ;; |
24459 |
KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) |
24460 |
- echo pdp10-dec-tops20 |
24461 |
- exit ;; |
24462 |
+ GUESS=pdp10-dec-tops20 |
24463 |
+ ;; |
24464 |
XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) |
24465 |
- echo pdp10-xkl-tops20 |
24466 |
- exit ;; |
24467 |
+ GUESS=pdp10-xkl-tops20 |
24468 |
+ ;; |
24469 |
*:TOPS-20:*:*) |
24470 |
- echo pdp10-unknown-tops20 |
24471 |
- exit ;; |
24472 |
+ GUESS=pdp10-unknown-tops20 |
24473 |
+ ;; |
24474 |
*:ITS:*:*) |
24475 |
- echo pdp10-unknown-its |
24476 |
- exit ;; |
24477 |
+ GUESS=pdp10-unknown-its |
24478 |
+ ;; |
24479 |
SEI:*:*:SEIUX) |
24480 |
- echo mips-sei-seiux"$UNAME_RELEASE" |
24481 |
- exit ;; |
24482 |
+ GUESS=mips-sei-seiux$UNAME_RELEASE |
24483 |
+ ;; |
24484 |
*:DragonFly:*:*) |
24485 |
- echo "$UNAME_MACHINE"-unknown-dragonfly"$(echo "$UNAME_RELEASE"|sed -e 's/[-(].*//')" |
24486 |
- exit ;; |
24487 |
+ DRAGONFLY_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` |
24488 |
+ GUESS=$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL |
24489 |
+ ;; |
24490 |
*:*VMS:*:*) |
24491 |
- UNAME_MACHINE=$( (uname -p) 2>/dev/null) |
24492 |
- case "$UNAME_MACHINE" in |
24493 |
- A*) echo alpha-dec-vms ; exit ;; |
24494 |
- I*) echo ia64-dec-vms ; exit ;; |
24495 |
- V*) echo vax-dec-vms ; exit ;; |
24496 |
+ UNAME_MACHINE=`(uname -p) 2>/dev/null` |
24497 |
+ case $UNAME_MACHINE in |
24498 |
+ A*) GUESS=alpha-dec-vms ;; |
24499 |
+ I*) GUESS=ia64-dec-vms ;; |
24500 |
+ V*) GUESS=vax-dec-vms ;; |
24501 |
esac ;; |
24502 |
*:XENIX:*:SysV) |
24503 |
- echo i386-pc-xenix |
24504 |
- exit ;; |
24505 |
+ GUESS=i386-pc-xenix |
24506 |
+ ;; |
24507 |
i*86:skyos:*:*) |
24508 |
- echo "$UNAME_MACHINE"-pc-skyos"$(echo "$UNAME_RELEASE" | sed -e 's/ .*$//')" |
24509 |
- exit ;; |
24510 |
+ SKYOS_REL=`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'` |
24511 |
+ GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL |
24512 |
+ ;; |
24513 |
i*86:rdos:*:*) |
24514 |
- echo "$UNAME_MACHINE"-pc-rdos |
24515 |
- exit ;; |
24516 |
- i*86:AROS:*:*) |
24517 |
- echo "$UNAME_MACHINE"-pc-aros |
24518 |
- exit ;; |
24519 |
+ GUESS=$UNAME_MACHINE-pc-rdos |
24520 |
+ ;; |
24521 |
+ i*86:Fiwix:*:*) |
24522 |
+ GUESS=$UNAME_MACHINE-pc-fiwix |
24523 |
+ ;; |
24524 |
+ *:AROS:*:*) |
24525 |
+ GUESS=$UNAME_MACHINE-unknown-aros |
24526 |
+ ;; |
24527 |
x86_64:VMkernel:*:*) |
24528 |
- echo "$UNAME_MACHINE"-unknown-esx |
24529 |
- exit ;; |
24530 |
+ GUESS=$UNAME_MACHINE-unknown-esx |
24531 |
+ ;; |
24532 |
amd64:Isilon\ OneFS:*:*) |
24533 |
- echo x86_64-unknown-onefs |
24534 |
- exit ;; |
24535 |
+ GUESS=x86_64-unknown-onefs |
24536 |
+ ;; |
24537 |
*:Unleashed:*:*) |
24538 |
- echo "$UNAME_MACHINE"-unknown-unleashed"$UNAME_RELEASE" |
24539 |
- exit ;; |
24540 |
+ GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE |
24541 |
+ ;; |
24542 |
esac |
24543 |
|
24544 |
+# Do we have a guess based on uname results? |
24545 |
+if test "x$GUESS" != x; then |
24546 |
+ echo "$GUESS" |
24547 |
+ exit |
24548 |
+fi |
24549 |
+ |
24550 |
# No uname command or uname output not recognized. |
24551 |
set_cc_for_build |
24552 |
cat > "$dummy.c" <<EOF |
24553 |
@@ -1536,7 +1598,7 @@ main () |
24554 |
#define __ARCHITECTURE__ "m68k" |
24555 |
#endif |
24556 |
int version; |
24557 |
- version=$( (hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null); |
24558 |
+ version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; |
24559 |
if (version < 4) |
24560 |
printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); |
24561 |
else |
24562 |
@@ -1628,7 +1690,7 @@ main () |
24563 |
} |
24564 |
EOF |
24565 |
|
24566 |
-$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=$($dummy) && |
24567 |
+$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`"$dummy"` && |
24568 |
{ echo "$SYSTEM_NAME"; exit; } |
24569 |
|
24570 |
# Apollos put the system type in the environment. |
24571 |
@@ -1636,7 +1698,7 @@ test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; } |
24572 |
|
24573 |
echo "$0: unable to guess system type" >&2 |
24574 |
|
24575 |
-case "$UNAME_MACHINE:$UNAME_SYSTEM" in |
24576 |
+case $UNAME_MACHINE:$UNAME_SYSTEM in |
24577 |
mips:Linux | mips64:Linux) |
24578 |
# If we got here on MIPS GNU/Linux, output extra information. |
24579 |
cat >&2 <<EOF |
24580 |
@@ -1658,9 +1720,11 @@ and |
24581 |
https://git.savannah.gnu.org/cgit/config.git/plain/config.sub |
24582 |
EOF |
24583 |
|
24584 |
-year=$(echo $timestamp | sed 's,-.*,,') |
24585 |
+our_year=`echo $timestamp | sed 's,-.*,,'` |
24586 |
+thisyear=`date +%Y` |
24587 |
# shellcheck disable=SC2003 |
24588 |
-if test "$(expr "$(date +%Y)" - "$year")" -lt 3 ; then |
24589 |
+script_age=`expr "$thisyear" - "$our_year"` |
24590 |
+if test "$script_age" -lt 3 ; then |
24591 |
cat >&2 <<EOF |
24592 |
|
24593 |
If $0 has already been updated, send the following data and any |
24594 |
@@ -1669,20 +1733,20 @@ provide the necessary information to handle your system. |
24595 |
|
24596 |
config.guess timestamp = $timestamp |
24597 |
|
24598 |
-uname -m = $( (uname -m) 2>/dev/null || echo unknown) |
24599 |
-uname -r = $( (uname -r) 2>/dev/null || echo unknown) |
24600 |
-uname -s = $( (uname -s) 2>/dev/null || echo unknown) |
24601 |
-uname -v = $( (uname -v) 2>/dev/null || echo unknown) |
24602 |
+uname -m = `(uname -m) 2>/dev/null || echo unknown` |
24603 |
+uname -r = `(uname -r) 2>/dev/null || echo unknown` |
24604 |
+uname -s = `(uname -s) 2>/dev/null || echo unknown` |
24605 |
+uname -v = `(uname -v) 2>/dev/null || echo unknown` |
24606 |
|
24607 |
-/usr/bin/uname -p = $( (/usr/bin/uname -p) 2>/dev/null) |
24608 |
-/bin/uname -X = $( (/bin/uname -X) 2>/dev/null) |
24609 |
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` |
24610 |
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null` |
24611 |
|
24612 |
-hostinfo = $( (hostinfo) 2>/dev/null) |
24613 |
-/bin/universe = $( (/bin/universe) 2>/dev/null) |
24614 |
-/usr/bin/arch -k = $( (/usr/bin/arch -k) 2>/dev/null) |
24615 |
-/bin/arch = $( (/bin/arch) 2>/dev/null) |
24616 |
-/usr/bin/oslevel = $( (/usr/bin/oslevel) 2>/dev/null) |
24617 |
-/usr/convex/getsysinfo = $( (/usr/convex/getsysinfo) 2>/dev/null) |
24618 |
+hostinfo = `(hostinfo) 2>/dev/null` |
24619 |
+/bin/universe = `(/bin/universe) 2>/dev/null` |
24620 |
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` |
24621 |
+/bin/arch = `(/bin/arch) 2>/dev/null` |
24622 |
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` |
24623 |
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` |
24624 |
|
24625 |
UNAME_MACHINE = "$UNAME_MACHINE" |
24626 |
UNAME_RELEASE = "$UNAME_RELEASE" |
24627 |
|
24628 |
diff --git a/config.h.in b/config.h.in |
24629 |
index 8f5dc91..02e613a 100644 |
24630 |
--- a/config.h.in |
24631 |
+++ b/config.h.in |
24632 |
@@ -143,10 +143,6 @@ |
24633 |
whether the gnulib module scanf shall be considered present. */ |
24634 |
#undef GNULIB_SCANF |
24635 |
|
24636 |
-/* Define to a C preprocessor expression that evaluates to 1 or 0, depending |
24637 |
- whether the gnulib module statat shall be considered present. */ |
24638 |
-#undef GNULIB_STATAT |
24639 |
- |
24640 |
/* Define to a C preprocessor expression that evaluates to 1 or 0, depending |
24641 |
whether the gnulib module strerror shall be considered present. */ |
24642 |
#undef GNULIB_STRERROR |
24643 |
@@ -368,6 +364,9 @@ |
24644 |
/* Define to 1 when the gnulib module strncat should be tested. */ |
24645 |
#undef GNULIB_TEST_STRNCAT |
24646 |
|
24647 |
+/* Define to 1 when the gnulib module strtoll should be tested. */ |
24648 |
+#undef GNULIB_TEST_STRTOLL |
24649 |
+ |
24650 |
/* Define to 1 when the gnulib module symlink should be tested. */ |
24651 |
#undef GNULIB_TEST_SYMLINK |
24652 |
|
24653 |
@@ -853,6 +852,9 @@ |
24654 |
/* Define to 1 if you have the `strnlen' function. */ |
24655 |
#undef HAVE_STRNLEN |
24656 |
|
24657 |
+/* Define to 1 if you have the `strtoll' function. */ |
24658 |
+#undef HAVE_STRTOLL |
24659 |
+ |
24660 |
/* Define to 1 if `st_atimensec' is a member of `struct stat'. */ |
24661 |
#undef HAVE_STRUCT_STAT_ST_ATIMENSEC |
24662 |
|
24663 |
@@ -1517,7 +1519,9 @@ |
24664 |
/* Attributes. */ |
24665 |
#if (defined __has_attribute \ |
24666 |
&& (!defined __clang_minor__ \ |
24667 |
- || 3 < __clang_major__ + (5 <= __clang_minor__))) |
24668 |
+ || (defined __apple_build_version__ \ |
24669 |
+ ? 6000000 <= __apple_build_version__ \ |
24670 |
+ : 3 < __clang_major__ + (5 <= __clang_minor__)))) |
24671 |
# define _GL_HAS_ATTRIBUTE(attr) __has_attribute (__##attr##__) |
24672 |
#else |
24673 |
# define _GL_HAS_ATTRIBUTE(attr) _GL_ATTR_##attr |
24674 |
@@ -1552,6 +1556,10 @@ |
24675 |
#endif |
24676 |
|
24677 |
#ifdef __has_c_attribute |
24678 |
+# if ((defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) <= 201710 \ |
24679 |
+ && _GL_GNUC_PREREQ (4, 6)) |
24680 |
+# pragma GCC diagnostic ignored "-Wpedantic" |
24681 |
+# endif |
24682 |
# define _GL_HAS_C_ATTRIBUTE(attr) __has_c_attribute (__##attr##__) |
24683 |
#else |
24684 |
# define _GL_HAS_C_ATTRIBUTE(attr) 0 |
24685 |
|
24686 |
diff --git a/config.sub b/config.sub |
24687 |
index 4d89efe..a31fff3 100755 |
24688 |
--- a/config.sub |
24689 |
+++ b/config.sub |
24690 |
@@ -1,12 +1,14 @@ |
24691 |
#! /bin/sh |
24692 |
# Configuration validation subroutine script. |
24693 |
-# Copyright 1992-2021 Free Software Foundation, Inc. |
24694 |
+# Copyright 1992-2022 Free Software Foundation, Inc. |
24695 |
|
24696 |
-timestamp='2021-01-07' |
24697 |
+# shellcheck disable=SC2006,SC2268 # see below for rationale |
24698 |
+ |
24699 |
+timestamp='2022-01-03' |
24700 |
|
24701 |
# This file is free software; you can redistribute it and/or modify it |
24702 |
# under the terms of the GNU General Public License as published by |
24703 |
-# the Free Software Foundation; either version 3 of the License, or |
24704 |
+# the Free Software Foundation, either version 3 of the License, or |
24705 |
# (at your option) any later version. |
24706 |
# |
24707 |
# This program is distributed in the hope that it will be useful, but |
24708 |
@@ -50,7 +52,14 @@ timestamp='2021-01-07' |
24709 |
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM |
24710 |
# It is wrong to echo any other type of specification. |
24711 |
|
24712 |
-me=$(echo "$0" | sed -e 's,.*/,,') |
24713 |
+# The "shellcheck disable" line above the timestamp inhibits complaints |
24714 |
+# about features and limitations of the classic Bourne shell that were |
24715 |
+# superseded or lifted in POSIX. However, this script identifies a wide |
24716 |
+# variety of pre-POSIX systems that do not have POSIX shells at all, and |
24717 |
+# even some reasonably current systems (Solaris 10 as case-in-point) still |
24718 |
+# have a pre-POSIX /bin/sh. |
24719 |
+ |
24720 |
+me=`echo "$0" | sed -e 's,.*/,,'` |
24721 |
|
24722 |
usage="\ |
24723 |
Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS |
24724 |
@@ -67,7 +76,7 @@ Report bugs and patches to <config-patches@×××.org>." |
24725 |
version="\ |
24726 |
GNU config.sub ($timestamp) |
24727 |
|
24728 |
-Copyright 1992-2021 Free Software Foundation, Inc. |
24729 |
+Copyright 1992-2022 Free Software Foundation, Inc. |
24730 |
|
24731 |
This is free software; see the source for copying conditions. There is NO |
24732 |
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." |
24733 |
@@ -112,9 +121,11 @@ esac |
24734 |
|
24735 |
# Split fields of configuration type |
24736 |
# shellcheck disable=SC2162 |
24737 |
+saved_IFS=$IFS |
24738 |
IFS="-" read field1 field2 field3 field4 <<EOF |
24739 |
$1 |
24740 |
EOF |
24741 |
+IFS=$saved_IFS |
24742 |
|
24743 |
# Separate into logical components for further validation |
24744 |
case $1 in |
24745 |
@@ -163,6 +174,10 @@ case $1 in |
24746 |
basic_machine=$field1 |
24747 |
basic_os=$field2 |
24748 |
;; |
24749 |
+ zephyr*) |
24750 |
+ basic_machine=$field1-unknown |
24751 |
+ basic_os=$field2 |
24752 |
+ ;; |
24753 |
# Manufacturers |
24754 |
dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \ |
24755 |
| att* | 7300* | 3300* | delta* | motorola* | sun[234]* \ |
24756 |
@@ -769,22 +784,22 @@ case $basic_machine in |
24757 |
vendor=hp |
24758 |
;; |
24759 |
i*86v32) |
24760 |
- cpu=$(echo "$1" | sed -e 's/86.*/86/') |
24761 |
+ cpu=`echo "$1" | sed -e 's/86.*/86/'` |
24762 |
vendor=pc |
24763 |
basic_os=sysv32 |
24764 |
;; |
24765 |
i*86v4*) |
24766 |
- cpu=$(echo "$1" | sed -e 's/86.*/86/') |
24767 |
+ cpu=`echo "$1" | sed -e 's/86.*/86/'` |
24768 |
vendor=pc |
24769 |
basic_os=sysv4 |
24770 |
;; |
24771 |
i*86v) |
24772 |
- cpu=$(echo "$1" | sed -e 's/86.*/86/') |
24773 |
+ cpu=`echo "$1" | sed -e 's/86.*/86/'` |
24774 |
vendor=pc |
24775 |
basic_os=sysv |
24776 |
;; |
24777 |
i*86sol2) |
24778 |
- cpu=$(echo "$1" | sed -e 's/86.*/86/') |
24779 |
+ cpu=`echo "$1" | sed -e 's/86.*/86/'` |
24780 |
vendor=pc |
24781 |
basic_os=solaris2 |
24782 |
;; |
24783 |
@@ -938,14 +953,16 @@ case $basic_machine in |
24784 |
;; |
24785 |
leon-*|leon[3-9]-*) |
24786 |
cpu=sparc |
24787 |
- vendor=$(echo "$basic_machine" | sed 's/-.*//') |
24788 |
+ vendor=`echo "$basic_machine" | sed 's/-.*//'` |
24789 |
;; |
24790 |
|
24791 |
*-*) |
24792 |
# shellcheck disable=SC2162 |
24793 |
+ saved_IFS=$IFS |
24794 |
IFS="-" read cpu vendor <<EOF |
24795 |
$basic_machine |
24796 |
EOF |
24797 |
+ IFS=$saved_IFS |
24798 |
;; |
24799 |
# We use `pc' rather than `unknown' |
24800 |
# because (1) that's what they normally are, and |
24801 |
@@ -1024,6 +1041,11 @@ case $cpu-$vendor in |
24802 |
;; |
24803 |
|
24804 |
# Here we normalize CPU types with a missing or matching vendor |
24805 |
+ armh-unknown | armh-alt) |
24806 |
+ cpu=armv7l |
24807 |
+ vendor=alt |
24808 |
+ basic_os=${basic_os:-linux-gnueabihf} |
24809 |
+ ;; |
24810 |
dpx20-unknown | dpx20-bull) |
24811 |
cpu=rs6000 |
24812 |
vendor=bull |
24813 |
@@ -1105,7 +1127,7 @@ case $cpu-$vendor in |
24814 |
cpu=mipsisa64sb1el |
24815 |
;; |
24816 |
sh5e[lb]-*) |
24817 |
- cpu=$(echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/') |
24818 |
+ cpu=`echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/'` |
24819 |
;; |
24820 |
spur-*) |
24821 |
cpu=spur |
24822 |
@@ -1123,9 +1145,9 @@ case $cpu-$vendor in |
24823 |
cpu=x86_64 |
24824 |
;; |
24825 |
xscale-* | xscalee[bl]-*) |
24826 |
- cpu=$(echo "$cpu" | sed 's/^xscale/arm/') |
24827 |
+ cpu=`echo "$cpu" | sed 's/^xscale/arm/'` |
24828 |
;; |
24829 |
- arm64-*) |
24830 |
+ arm64-* | aarch64le-*) |
24831 |
cpu=aarch64 |
24832 |
;; |
24833 |
|
24834 |
@@ -1186,7 +1208,7 @@ case $cpu-$vendor in |
24835 |
| alphapca5[67] | alpha64pca5[67] \ |
24836 |
| am33_2.0 \ |
24837 |
| amdgcn \ |
24838 |
- | arc | arceb \ |
24839 |
+ | arc | arceb | arc32 | arc64 \ |
24840 |
| arm | arm[lb]e | arme[lb] | armv* \ |
24841 |
| avr | avr32 \ |
24842 |
| asmjs \ |
24843 |
@@ -1225,9 +1247,13 @@ case $cpu-$vendor in |
24844 |
| mips64vr5900 | mips64vr5900el \ |
24845 |
| mipsisa32 | mipsisa32el \ |
24846 |
| mipsisa32r2 | mipsisa32r2el \ |
24847 |
+ | mipsisa32r3 | mipsisa32r3el \ |
24848 |
+ | mipsisa32r5 | mipsisa32r5el \ |
24849 |
| mipsisa32r6 | mipsisa32r6el \ |
24850 |
| mipsisa64 | mipsisa64el \ |
24851 |
| mipsisa64r2 | mipsisa64r2el \ |
24852 |
+ | mipsisa64r3 | mipsisa64r3el \ |
24853 |
+ | mipsisa64r5 | mipsisa64r5el \ |
24854 |
| mipsisa64r6 | mipsisa64r6el \ |
24855 |
| mipsisa64sb1 | mipsisa64sb1el \ |
24856 |
| mipsisa64sr71k | mipsisa64sr71kel \ |
24857 |
@@ -1304,35 +1330,37 @@ esac |
24858 |
if test x$basic_os != x |
24859 |
then |
24860 |
|
24861 |
-# First recognize some ad-hoc caes, or perhaps split kernel-os, or else just |
24862 |
+# First recognize some ad-hoc cases, or perhaps split kernel-os, or else just |
24863 |
# set os. |
24864 |
case $basic_os in |
24865 |
gnu/linux*) |
24866 |
kernel=linux |
24867 |
- os=$(echo $basic_os | sed -e 's|gnu/linux|gnu|') |
24868 |
+ os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'` |
24869 |
;; |
24870 |
os2-emx) |
24871 |
kernel=os2 |
24872 |
- os=$(echo $basic_os | sed -e 's|os2-emx|emx|') |
24873 |
+ os=`echo "$basic_os" | sed -e 's|os2-emx|emx|'` |
24874 |
;; |
24875 |
nto-qnx*) |
24876 |
kernel=nto |
24877 |
- os=$(echo $basic_os | sed -e 's|nto-qnx|qnx|') |
24878 |
+ os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'` |
24879 |
;; |
24880 |
*-*) |
24881 |
# shellcheck disable=SC2162 |
24882 |
+ saved_IFS=$IFS |
24883 |
IFS="-" read kernel os <<EOF |
24884 |
$basic_os |
24885 |
EOF |
24886 |
+ IFS=$saved_IFS |
24887 |
;; |
24888 |
# Default OS when just kernel was specified |
24889 |
nto*) |
24890 |
kernel=nto |
24891 |
- os=$(echo $basic_os | sed -e 's|nto|qnx|') |
24892 |
+ os=`echo "$basic_os" | sed -e 's|nto|qnx|'` |
24893 |
;; |
24894 |
linux*) |
24895 |
kernel=linux |
24896 |
- os=$(echo $basic_os | sed -e 's|linux|gnu|') |
24897 |
+ os=`echo "$basic_os" | sed -e 's|linux|gnu|'` |
24898 |
;; |
24899 |
*) |
24900 |
kernel= |
24901 |
@@ -1353,7 +1381,7 @@ case $os in |
24902 |
os=cnk |
24903 |
;; |
24904 |
solaris1 | solaris1.*) |
24905 |
- os=$(echo $os | sed -e 's|solaris1|sunos4|') |
24906 |
+ os=`echo "$os" | sed -e 's|solaris1|sunos4|'` |
24907 |
;; |
24908 |
solaris) |
24909 |
os=solaris2 |
24910 |
@@ -1382,7 +1410,7 @@ case $os in |
24911 |
os=sco3.2v4 |
24912 |
;; |
24913 |
sco3.2.[4-9]*) |
24914 |
- os=$(echo $os | sed -e 's/sco3.2./sco3.2v/') |
24915 |
+ os=`echo "$os" | sed -e 's/sco3.2./sco3.2v/'` |
24916 |
;; |
24917 |
sco*v* | scout) |
24918 |
# Don't match below |
24919 |
@@ -1412,7 +1440,7 @@ case $os in |
24920 |
os=lynxos |
24921 |
;; |
24922 |
mac[0-9]*) |
24923 |
- os=$(echo "$os" | sed -e 's|mac|macos|') |
24924 |
+ os=`echo "$os" | sed -e 's|mac|macos|'` |
24925 |
;; |
24926 |
opened*) |
24927 |
os=openedition |
24928 |
@@ -1421,10 +1449,10 @@ case $os in |
24929 |
os=os400 |
24930 |
;; |
24931 |
sunos5*) |
24932 |
- os=$(echo "$os" | sed -e 's|sunos5|solaris2|') |
24933 |
+ os=`echo "$os" | sed -e 's|sunos5|solaris2|'` |
24934 |
;; |
24935 |
sunos6*) |
24936 |
- os=$(echo "$os" | sed -e 's|sunos6|solaris3|') |
24937 |
+ os=`echo "$os" | sed -e 's|sunos6|solaris3|'` |
24938 |
;; |
24939 |
wince*) |
24940 |
os=wince |
24941 |
@@ -1458,7 +1486,7 @@ case $os in |
24942 |
;; |
24943 |
# Preserve the version number of sinix5. |
24944 |
sinix5.*) |
24945 |
- os=$(echo $os | sed -e 's|sinix|sysv|') |
24946 |
+ os=`echo "$os" | sed -e 's|sinix|sysv|'` |
24947 |
;; |
24948 |
sinix*) |
24949 |
os=sysv4 |
24950 |
@@ -1704,12 +1732,15 @@ fi |
24951 |
|
24952 |
# Now, validate our (potentially fixed-up) OS. |
24953 |
case $os in |
24954 |
- # Sometimes we do "kernel-abi", so those need to count as OSes. |
24955 |
- musl* | newlib* | uclibc*) |
24956 |
+ # Sometimes we do "kernel-libc", so those need to count as OSes. |
24957 |
+ musl* | newlib* | relibc* | uclibc*) |
24958 |
;; |
24959 |
- # Likewise for "kernel-libc" |
24960 |
+ # Likewise for "kernel-abi" |
24961 |
eabi* | gnueabi*) |
24962 |
;; |
24963 |
+ # VxWorks passes extra cpu info in the 4th filed. |
24964 |
+ simlinux | simwindows | spe) |
24965 |
+ ;; |
24966 |
# Now accept the basic system types. |
24967 |
# The portable systems comes first. |
24968 |
# Each alternative MUST end in a * to match a version number. |
24969 |
@@ -1725,12 +1756,12 @@ case $os in |
24970 |
| nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \ |
24971 |
| clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \ |
24972 |
| mirbsd* | netbsd* | dicos* | openedition* | ose* \ |
24973 |
- | bitrig* | openbsd* | solidbsd* | libertybsd* | os108* \ |
24974 |
+ | bitrig* | openbsd* | secbsd* | solidbsd* | libertybsd* | os108* \ |
24975 |
| ekkobsd* | freebsd* | riscix* | lynxos* | os400* \ |
24976 |
| bosx* | nextstep* | cxux* | aout* | elf* | oabi* \ |
24977 |
| ptx* | coff* | ecoff* | winnt* | domain* | vsta* \ |
24978 |
| udi* | lites* | ieee* | go32* | aux* | hcos* \ |
24979 |
- | chorusrdb* | cegcc* | glidix* \ |
24980 |
+ | chorusrdb* | cegcc* | glidix* | serenity* \ |
24981 |
| cygwin* | msys* | pe* | moss* | proelf* | rtems* \ |
24982 |
| midipix* | mingw32* | mingw64* | mint* \ |
24983 |
| uxpv* | beos* | mpeix* | udk* | moxiebox* \ |
24984 |
@@ -1743,7 +1774,8 @@ case $os in |
24985 |
| skyos* | haiku* | rdos* | toppers* | drops* | es* \ |
24986 |
| onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ |
24987 |
| midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \ |
24988 |
- | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx*) |
24989 |
+ | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \ |
24990 |
+ | fiwix* ) |
24991 |
;; |
24992 |
# This one is extra strict with allowed versions |
24993 |
sco3.2v2 | sco3.2v[4-9]* | sco5v6*) |
24994 |
@@ -1760,11 +1792,12 @@ esac |
24995 |
# As a final step for OS-related things, validate the OS-kernel combination |
24996 |
# (given a valid OS), if there is a kernel. |
24997 |
case $kernel-$os in |
24998 |
- linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* | linux-musl* | linux-uclibc* ) |
24999 |
+ linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \ |
25000 |
+ | linux-musl* | linux-relibc* | linux-uclibc* ) |
25001 |
;; |
25002 |
uclinux-uclibc* ) |
25003 |
;; |
25004 |
- -dietlibc* | -newlib* | -musl* | -uclibc* ) |
25005 |
+ -dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* ) |
25006 |
# These are just libc implementations, not actual OSes, and thus |
25007 |
# require a kernel. |
25008 |
echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2 |
25009 |
@@ -1772,6 +1805,8 @@ case $kernel-$os in |
25010 |
;; |
25011 |
kfreebsd*-gnu* | kopensolaris*-gnu*) |
25012 |
;; |
25013 |
+ vxworks-simlinux | vxworks-simwindows | vxworks-spe) |
25014 |
+ ;; |
25015 |
nto-qnx*) |
25016 |
;; |
25017 |
os2-emx) |
25018 |
|
25019 |
diff --git a/configure b/configure |
25020 |
index 6f71fd9..8049cab 100755 |
25021 |
--- a/configure |
25022 |
+++ b/configure |
25023 |
@@ -870,6 +870,8 @@ GL_COND_OBJ_SYMLINKAT_FALSE |
25024 |
GL_COND_OBJ_SYMLINKAT_TRUE |
25025 |
GL_COND_OBJ_SYMLINK_FALSE |
25026 |
GL_COND_OBJ_SYMLINK_TRUE |
25027 |
+GL_COND_OBJ_STRTOLL_FALSE |
25028 |
+GL_COND_OBJ_STRTOLL_TRUE |
25029 |
GL_COND_OBJ_STRNCAT_FALSE |
25030 |
GL_COND_OBJ_STRNCAT_TRUE |
25031 |
GL_GNULIB_FFS |
25032 |
@@ -7767,7 +7769,6 @@ printf "%s\n" "#define __MINGW_USE_VC2005_COMPAT 1" >>confdefs.h |
25033 |
|
25034 |
|
25035 |
|
25036 |
- |
25037 |
# Code from module absolute-header: |
25038 |
# Code from module alloca-opt: |
25039 |
# Code from module assure: |
25040 |
@@ -7891,7 +7892,6 @@ printf "%s\n" "#define __MINGW_USE_VC2005_COMPAT 1" >>confdefs.h |
25041 |
# Code from module ssize_t: |
25042 |
# Code from module stat: |
25043 |
# Code from module stat-time: |
25044 |
- # Code from module statat: |
25045 |
# Code from module std-gnu11: |
25046 |
# Code from module stdalign: |
25047 |
# Code from module stdbool: |
25048 |
@@ -7907,6 +7907,7 @@ printf "%s\n" "#define __MINGW_USE_VC2005_COMPAT 1" >>confdefs.h |
25049 |
# Code from module string: |
25050 |
# Code from module strings: |
25051 |
# Code from module strncat: |
25052 |
+ # Code from module strtoll: |
25053 |
# Code from module symlink: |
25054 |
# Code from module symlinkat: |
25055 |
# Code from module sys_stat: |
25056 |
@@ -29119,10 +29120,6 @@ fi |
25057 |
|
25058 |
|
25059 |
|
25060 |
- |
25061 |
-printf "%s\n" "#define GNULIB_STATAT 1" >>confdefs.h |
25062 |
- |
25063 |
- |
25064 |
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5 |
25065 |
printf %s "checking for working stdalign.h... " >&6; } |
25066 |
if test ${gl_cv_header_working_stdalign_h+y} |
25067 |
@@ -30257,6 +30254,116 @@ printf "%s\n" "#define GNULIB_TEST_STRNCAT 1" >>confdefs.h |
25068 |
|
25069 |
|
25070 |
|
25071 |
+ ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll" |
25072 |
+if test "x$ac_cv_func_strtoll" = xyes |
25073 |
+then : |
25074 |
+ printf "%s\n" "#define HAVE_STRTOLL 1" >>confdefs.h |
25075 |
+ |
25076 |
+fi |
25077 |
+ |
25078 |
+ if test $ac_cv_func_strtoll = yes; then |
25079 |
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strtoll works" >&5 |
25080 |
+printf %s "checking whether strtoll works... " >&6; } |
25081 |
+if test ${gl_cv_func_strtoll_works+y} |
25082 |
+then : |
25083 |
+ printf %s "(cached) " >&6 |
25084 |
+else $as_nop |
25085 |
+ if test "$cross_compiling" = yes |
25086 |
+then : |
25087 |
+ case "$host_os" in |
25088 |
+ # Guess no on native Windows. |
25089 |
+ mingw*) gl_cv_func_strtoll_works="guessing no" ;; |
25090 |
+ *) gl_cv_func_strtoll_works="$gl_cross_guess_normal" ;; |
25091 |
+ esac |
25092 |
+ |
25093 |
+else $as_nop |
25094 |
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
25095 |
+/* end confdefs.h. */ |
25096 |
+#include <stdlib.h> |
25097 |
+int |
25098 |
+main (void) |
25099 |
+{ |
25100 |
+int result = 0; |
25101 |
+ char *term; |
25102 |
+ /* This test fails on Minix and native Windows. */ |
25103 |
+ { |
25104 |
+ const char input[] = "0x"; |
25105 |
+ (void) strtoll (input, &term, 16); |
25106 |
+ if (term != input + 1) |
25107 |
+ result |= 1; |
25108 |
+ } |
25109 |
+ return result; |
25110 |
+ |
25111 |
+ ; |
25112 |
+ return 0; |
25113 |
+} |
25114 |
+ |
25115 |
+_ACEOF |
25116 |
+if ac_fn_c_try_run "$LINENO" |
25117 |
+then : |
25118 |
+ gl_cv_func_strtoll_works=yes |
25119 |
+else $as_nop |
25120 |
+ gl_cv_func_strtoll_works=no |
25121 |
+fi |
25122 |
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
25123 |
+ conftest.$ac_objext conftest.beam conftest.$ac_ext |
25124 |
+fi |
25125 |
+ |
25126 |
+ |
25127 |
+fi |
25128 |
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtoll_works" >&5 |
25129 |
+printf "%s\n" "$gl_cv_func_strtoll_works" >&6; } |
25130 |
+ case "$gl_cv_func_strtoll_works" in |
25131 |
+ *yes) ;; |
25132 |
+ *) REPLACE_STRTOLL=1 ;; |
25133 |
+ esac |
25134 |
+ else |
25135 |
+ HAVE_STRTOLL=0 |
25136 |
+ fi |
25137 |
+ |
25138 |
+ |
25139 |
+ if test $HAVE_STRTOLL = 0 || test $REPLACE_STRTOLL = 1; then |
25140 |
+ GL_COND_OBJ_STRTOLL_TRUE= |
25141 |
+ GL_COND_OBJ_STRTOLL_FALSE='#' |
25142 |
+else |
25143 |
+ GL_COND_OBJ_STRTOLL_TRUE='#' |
25144 |
+ GL_COND_OBJ_STRTOLL_FALSE= |
25145 |
+fi |
25146 |
+: |
25147 |
+ if test -z "${GL_COND_OBJ_STRTOLL_TRUE}" && test -z "${GL_COND_OBJ_STRTOLL_FALSE}"; then |
25148 |
+ GL_COND_OBJ_STRTOLL_TRUE='#' |
25149 |
+ GL_COND_OBJ_STRTOLL_FALSE='#' |
25150 |
+ fi |
25151 |
+ |
25152 |
+ if test -z "$GL_COND_OBJ_STRTOLL_TRUE"; then : |
25153 |
+ |
25154 |
+ |
25155 |
+ : |
25156 |
+ |
25157 |
+ |
25158 |
+fi |
25159 |
+ |
25160 |
+ |
25161 |
+ |
25162 |
+ |
25163 |
+ |
25164 |
+ |
25165 |
+ |
25166 |
+ |
25167 |
+ |
25168 |
+ GL_GNULIB_STRTOLL=1 |
25169 |
+ |
25170 |
+ |
25171 |
+ |
25172 |
+ |
25173 |
+ |
25174 |
+printf "%s\n" "#define GNULIB_TEST_STRTOLL 1" >>confdefs.h |
25175 |
+ |
25176 |
+ |
25177 |
+ |
25178 |
+ |
25179 |
+ |
25180 |
+ |
25181 |
if test $ac_cv_func_symlink = no; then |
25182 |
HAVE_SYMLINK=0 |
25183 |
else |
25184 |
|
25185 |
diff --git a/libq/Makefile.in b/libq/Makefile.in |
25186 |
index 37a89fe..306a7f0 100644 |
25187 |
--- a/libq/Makefile.in |
25188 |
+++ b/libq/Makefile.in |
25189 |
@@ -214,6 +214,7 @@ am__aclocal_m4_deps = $(top_srcdir)/autotools/m4/00gnulib.m4 \ |
25190 |
$(top_srcdir)/autotools/m4/string_h.m4 \ |
25191 |
$(top_srcdir)/autotools/m4/strings_h.m4 \ |
25192 |
$(top_srcdir)/autotools/m4/strncat.m4 \ |
25193 |
+ $(top_srcdir)/autotools/m4/strtoll.m4 \ |
25194 |
$(top_srcdir)/autotools/m4/symlink.m4 \ |
25195 |
$(top_srcdir)/autotools/m4/symlinkat.m4 \ |
25196 |
$(top_srcdir)/autotools/m4/sys_socket_h.m4 \ |
25197 |
|
25198 |
diff --git a/tests/Makefile.in b/tests/Makefile.in |
25199 |
index 4bd79bf..f4ae0f0 100644 |
25200 |
--- a/tests/Makefile.in |
25201 |
+++ b/tests/Makefile.in |
25202 |
@@ -213,6 +213,7 @@ am__aclocal_m4_deps = $(top_srcdir)/autotools/m4/00gnulib.m4 \ |
25203 |
$(top_srcdir)/autotools/m4/string_h.m4 \ |
25204 |
$(top_srcdir)/autotools/m4/strings_h.m4 \ |
25205 |
$(top_srcdir)/autotools/m4/strncat.m4 \ |
25206 |
+ $(top_srcdir)/autotools/m4/strtoll.m4 \ |
25207 |
$(top_srcdir)/autotools/m4/symlink.m4 \ |
25208 |
$(top_srcdir)/autotools/m4/symlinkat.m4 \ |
25209 |
$(top_srcdir)/autotools/m4/sys_socket_h.m4 \ |
25210 |
|
25211 |
diff --git a/tests/atom_compare/Makefile.in b/tests/atom_compare/Makefile.in |
25212 |
index d6f3db4..24bb0e2 100644 |
25213 |
--- a/tests/atom_compare/Makefile.in |
25214 |
+++ b/tests/atom_compare/Makefile.in |
25215 |
@@ -212,6 +212,7 @@ am__aclocal_m4_deps = $(top_srcdir)/autotools/m4/00gnulib.m4 \ |
25216 |
$(top_srcdir)/autotools/m4/string_h.m4 \ |
25217 |
$(top_srcdir)/autotools/m4/strings_h.m4 \ |
25218 |
$(top_srcdir)/autotools/m4/strncat.m4 \ |
25219 |
+ $(top_srcdir)/autotools/m4/strtoll.m4 \ |
25220 |
$(top_srcdir)/autotools/m4/symlink.m4 \ |
25221 |
$(top_srcdir)/autotools/m4/symlinkat.m4 \ |
25222 |
$(top_srcdir)/autotools/m4/sys_socket_h.m4 \ |
25223 |
|
25224 |
diff --git a/tests/atom_explode/Makefile.in b/tests/atom_explode/Makefile.in |
25225 |
index 3dd8883..446645c 100644 |
25226 |
--- a/tests/atom_explode/Makefile.in |
25227 |
+++ b/tests/atom_explode/Makefile.in |
25228 |
@@ -213,6 +213,7 @@ am__aclocal_m4_deps = $(top_srcdir)/autotools/m4/00gnulib.m4 \ |
25229 |
$(top_srcdir)/autotools/m4/string_h.m4 \ |
25230 |
$(top_srcdir)/autotools/m4/strings_h.m4 \ |
25231 |
$(top_srcdir)/autotools/m4/strncat.m4 \ |
25232 |
+ $(top_srcdir)/autotools/m4/strtoll.m4 \ |
25233 |
$(top_srcdir)/autotools/m4/symlink.m4 \ |
25234 |
$(top_srcdir)/autotools/m4/symlinkat.m4 \ |
25235 |
$(top_srcdir)/autotools/m4/sys_socket_h.m4 \ |
25236 |
|
25237 |
diff --git a/tests/copy_file/Makefile.in b/tests/copy_file/Makefile.in |
25238 |
index 2f151e9..a6718dc 100644 |
25239 |
--- a/tests/copy_file/Makefile.in |
25240 |
+++ b/tests/copy_file/Makefile.in |
25241 |
@@ -213,6 +213,7 @@ am__aclocal_m4_deps = $(top_srcdir)/autotools/m4/00gnulib.m4 \ |
25242 |
$(top_srcdir)/autotools/m4/string_h.m4 \ |
25243 |
$(top_srcdir)/autotools/m4/strings_h.m4 \ |
25244 |
$(top_srcdir)/autotools/m4/strncat.m4 \ |
25245 |
+ $(top_srcdir)/autotools/m4/strtoll.m4 \ |
25246 |
$(top_srcdir)/autotools/m4/symlink.m4 \ |
25247 |
$(top_srcdir)/autotools/m4/symlinkat.m4 \ |
25248 |
$(top_srcdir)/autotools/m4/sys_socket_h.m4 \ |
25249 |
|
25250 |
diff --git a/tests/install/Makefile.in b/tests/install/Makefile.in |
25251 |
index 50b6f26..b8bcbf4 100644 |
25252 |
--- a/tests/install/Makefile.in |
25253 |
+++ b/tests/install/Makefile.in |
25254 |
@@ -212,6 +212,7 @@ am__aclocal_m4_deps = $(top_srcdir)/autotools/m4/00gnulib.m4 \ |
25255 |
$(top_srcdir)/autotools/m4/string_h.m4 \ |
25256 |
$(top_srcdir)/autotools/m4/strings_h.m4 \ |
25257 |
$(top_srcdir)/autotools/m4/strncat.m4 \ |
25258 |
+ $(top_srcdir)/autotools/m4/strtoll.m4 \ |
25259 |
$(top_srcdir)/autotools/m4/symlink.m4 \ |
25260 |
$(top_srcdir)/autotools/m4/symlinkat.m4 \ |
25261 |
$(top_srcdir)/autotools/m4/sys_socket_h.m4 \ |
25262 |
|
25263 |
diff --git a/tests/mkdir/Makefile.in b/tests/mkdir/Makefile.in |
25264 |
index e4e8fd6..5b5664f 100644 |
25265 |
--- a/tests/mkdir/Makefile.in |
25266 |
+++ b/tests/mkdir/Makefile.in |
25267 |
@@ -213,6 +213,7 @@ am__aclocal_m4_deps = $(top_srcdir)/autotools/m4/00gnulib.m4 \ |
25268 |
$(top_srcdir)/autotools/m4/string_h.m4 \ |
25269 |
$(top_srcdir)/autotools/m4/strings_h.m4 \ |
25270 |
$(top_srcdir)/autotools/m4/strncat.m4 \ |
25271 |
+ $(top_srcdir)/autotools/m4/strtoll.m4 \ |
25272 |
$(top_srcdir)/autotools/m4/symlink.m4 \ |
25273 |
$(top_srcdir)/autotools/m4/symlinkat.m4 \ |
25274 |
$(top_srcdir)/autotools/m4/sys_socket_h.m4 \ |
25275 |
|
25276 |
diff --git a/tests/profile/Makefile.in b/tests/profile/Makefile.in |
25277 |
index e2a1bff..7e53e99 100644 |
25278 |
--- a/tests/profile/Makefile.in |
25279 |
+++ b/tests/profile/Makefile.in |
25280 |
@@ -212,6 +212,7 @@ am__aclocal_m4_deps = $(top_srcdir)/autotools/m4/00gnulib.m4 \ |
25281 |
$(top_srcdir)/autotools/m4/string_h.m4 \ |
25282 |
$(top_srcdir)/autotools/m4/strings_h.m4 \ |
25283 |
$(top_srcdir)/autotools/m4/strncat.m4 \ |
25284 |
+ $(top_srcdir)/autotools/m4/strtoll.m4 \ |
25285 |
$(top_srcdir)/autotools/m4/symlink.m4 \ |
25286 |
$(top_srcdir)/autotools/m4/symlinkat.m4 \ |
25287 |
$(top_srcdir)/autotools/m4/sys_socket_h.m4 \ |
25288 |
|
25289 |
diff --git a/tests/qatom/Makefile.in b/tests/qatom/Makefile.in |
25290 |
index b702538..47b55ce 100644 |
25291 |
--- a/tests/qatom/Makefile.in |
25292 |
+++ b/tests/qatom/Makefile.in |
25293 |
@@ -212,6 +212,7 @@ am__aclocal_m4_deps = $(top_srcdir)/autotools/m4/00gnulib.m4 \ |
25294 |
$(top_srcdir)/autotools/m4/string_h.m4 \ |
25295 |
$(top_srcdir)/autotools/m4/strings_h.m4 \ |
25296 |
$(top_srcdir)/autotools/m4/strncat.m4 \ |
25297 |
+ $(top_srcdir)/autotools/m4/strtoll.m4 \ |
25298 |
$(top_srcdir)/autotools/m4/symlink.m4 \ |
25299 |
$(top_srcdir)/autotools/m4/symlinkat.m4 \ |
25300 |
$(top_srcdir)/autotools/m4/sys_socket_h.m4 \ |
25301 |
|
25302 |
diff --git a/tests/qcheck/Makefile.in b/tests/qcheck/Makefile.in |
25303 |
index 3dfa2cb..f1fdf93 100644 |
25304 |
--- a/tests/qcheck/Makefile.in |
25305 |
+++ b/tests/qcheck/Makefile.in |
25306 |
@@ -212,6 +212,7 @@ am__aclocal_m4_deps = $(top_srcdir)/autotools/m4/00gnulib.m4 \ |
25307 |
$(top_srcdir)/autotools/m4/string_h.m4 \ |
25308 |
$(top_srcdir)/autotools/m4/strings_h.m4 \ |
25309 |
$(top_srcdir)/autotools/m4/strncat.m4 \ |
25310 |
+ $(top_srcdir)/autotools/m4/strtoll.m4 \ |
25311 |
$(top_srcdir)/autotools/m4/symlink.m4 \ |
25312 |
$(top_srcdir)/autotools/m4/symlinkat.m4 \ |
25313 |
$(top_srcdir)/autotools/m4/sys_socket_h.m4 \ |
25314 |
|
25315 |
diff --git a/tests/qdepends/Makefile.in b/tests/qdepends/Makefile.in |
25316 |
index b8d3bec..14f8f6a 100644 |
25317 |
--- a/tests/qdepends/Makefile.in |
25318 |
+++ b/tests/qdepends/Makefile.in |
25319 |
@@ -212,6 +212,7 @@ am__aclocal_m4_deps = $(top_srcdir)/autotools/m4/00gnulib.m4 \ |
25320 |
$(top_srcdir)/autotools/m4/string_h.m4 \ |
25321 |
$(top_srcdir)/autotools/m4/strings_h.m4 \ |
25322 |
$(top_srcdir)/autotools/m4/strncat.m4 \ |
25323 |
+ $(top_srcdir)/autotools/m4/strtoll.m4 \ |
25324 |
$(top_srcdir)/autotools/m4/symlink.m4 \ |
25325 |
$(top_srcdir)/autotools/m4/symlinkat.m4 \ |
25326 |
$(top_srcdir)/autotools/m4/sys_socket_h.m4 \ |
25327 |
|
25328 |
diff --git a/tests/qfile/Makefile.in b/tests/qfile/Makefile.in |
25329 |
index a0471c0..090c4b3 100644 |
25330 |
--- a/tests/qfile/Makefile.in |
25331 |
+++ b/tests/qfile/Makefile.in |
25332 |
@@ -212,6 +212,7 @@ am__aclocal_m4_deps = $(top_srcdir)/autotools/m4/00gnulib.m4 \ |
25333 |
$(top_srcdir)/autotools/m4/string_h.m4 \ |
25334 |
$(top_srcdir)/autotools/m4/strings_h.m4 \ |
25335 |
$(top_srcdir)/autotools/m4/strncat.m4 \ |
25336 |
+ $(top_srcdir)/autotools/m4/strtoll.m4 \ |
25337 |
$(top_srcdir)/autotools/m4/symlink.m4 \ |
25338 |
$(top_srcdir)/autotools/m4/symlinkat.m4 \ |
25339 |
$(top_srcdir)/autotools/m4/sys_socket_h.m4 \ |
25340 |
|
25341 |
diff --git a/tests/qlist/Makefile.in b/tests/qlist/Makefile.in |
25342 |
index d3953c2..a28c10e 100644 |
25343 |
--- a/tests/qlist/Makefile.in |
25344 |
+++ b/tests/qlist/Makefile.in |
25345 |
@@ -212,6 +212,7 @@ am__aclocal_m4_deps = $(top_srcdir)/autotools/m4/00gnulib.m4 \ |
25346 |
$(top_srcdir)/autotools/m4/string_h.m4 \ |
25347 |
$(top_srcdir)/autotools/m4/strings_h.m4 \ |
25348 |
$(top_srcdir)/autotools/m4/strncat.m4 \ |
25349 |
+ $(top_srcdir)/autotools/m4/strtoll.m4 \ |
25350 |
$(top_srcdir)/autotools/m4/symlink.m4 \ |
25351 |
$(top_srcdir)/autotools/m4/symlinkat.m4 \ |
25352 |
$(top_srcdir)/autotools/m4/sys_socket_h.m4 \ |
25353 |
|
25354 |
diff --git a/tests/qlop/Makefile.in b/tests/qlop/Makefile.in |
25355 |
index 7ebec3e..6ef4d6c 100644 |
25356 |
--- a/tests/qlop/Makefile.in |
25357 |
+++ b/tests/qlop/Makefile.in |
25358 |
@@ -212,6 +212,7 @@ am__aclocal_m4_deps = $(top_srcdir)/autotools/m4/00gnulib.m4 \ |
25359 |
$(top_srcdir)/autotools/m4/string_h.m4 \ |
25360 |
$(top_srcdir)/autotools/m4/strings_h.m4 \ |
25361 |
$(top_srcdir)/autotools/m4/strncat.m4 \ |
25362 |
+ $(top_srcdir)/autotools/m4/strtoll.m4 \ |
25363 |
$(top_srcdir)/autotools/m4/symlink.m4 \ |
25364 |
$(top_srcdir)/autotools/m4/symlinkat.m4 \ |
25365 |
$(top_srcdir)/autotools/m4/sys_socket_h.m4 \ |
25366 |
|
25367 |
diff --git a/tests/qmanifest/Makefile.in b/tests/qmanifest/Makefile.in |
25368 |
index a7e7178..94bc917 100644 |
25369 |
--- a/tests/qmanifest/Makefile.in |
25370 |
+++ b/tests/qmanifest/Makefile.in |
25371 |
@@ -212,6 +212,7 @@ am__aclocal_m4_deps = $(top_srcdir)/autotools/m4/00gnulib.m4 \ |
25372 |
$(top_srcdir)/autotools/m4/string_h.m4 \ |
25373 |
$(top_srcdir)/autotools/m4/strings_h.m4 \ |
25374 |
$(top_srcdir)/autotools/m4/strncat.m4 \ |
25375 |
+ $(top_srcdir)/autotools/m4/strtoll.m4 \ |
25376 |
$(top_srcdir)/autotools/m4/symlink.m4 \ |
25377 |
$(top_srcdir)/autotools/m4/symlinkat.m4 \ |
25378 |
$(top_srcdir)/autotools/m4/sys_socket_h.m4 \ |
25379 |
|
25380 |
diff --git a/tests/qmerge/Makefile.in b/tests/qmerge/Makefile.in |
25381 |
index a8700b4..64b7f8c 100644 |
25382 |
--- a/tests/qmerge/Makefile.in |
25383 |
+++ b/tests/qmerge/Makefile.in |
25384 |
@@ -212,6 +212,7 @@ am__aclocal_m4_deps = $(top_srcdir)/autotools/m4/00gnulib.m4 \ |
25385 |
$(top_srcdir)/autotools/m4/string_h.m4 \ |
25386 |
$(top_srcdir)/autotools/m4/strings_h.m4 \ |
25387 |
$(top_srcdir)/autotools/m4/strncat.m4 \ |
25388 |
+ $(top_srcdir)/autotools/m4/strtoll.m4 \ |
25389 |
$(top_srcdir)/autotools/m4/symlink.m4 \ |
25390 |
$(top_srcdir)/autotools/m4/symlinkat.m4 \ |
25391 |
$(top_srcdir)/autotools/m4/sys_socket_h.m4 \ |
25392 |
|
25393 |
diff --git a/tests/qtbz2/Makefile.in b/tests/qtbz2/Makefile.in |
25394 |
index 22de314..1cc9da9 100644 |
25395 |
--- a/tests/qtbz2/Makefile.in |
25396 |
+++ b/tests/qtbz2/Makefile.in |
25397 |
@@ -212,6 +212,7 @@ am__aclocal_m4_deps = $(top_srcdir)/autotools/m4/00gnulib.m4 \ |
25398 |
$(top_srcdir)/autotools/m4/string_h.m4 \ |
25399 |
$(top_srcdir)/autotools/m4/strings_h.m4 \ |
25400 |
$(top_srcdir)/autotools/m4/strncat.m4 \ |
25401 |
+ $(top_srcdir)/autotools/m4/strtoll.m4 \ |
25402 |
$(top_srcdir)/autotools/m4/symlink.m4 \ |
25403 |
$(top_srcdir)/autotools/m4/symlinkat.m4 \ |
25404 |
$(top_srcdir)/autotools/m4/sys_socket_h.m4 \ |
25405 |
|
25406 |
diff --git a/tests/quse/Makefile.in b/tests/quse/Makefile.in |
25407 |
index d8d188b..74c4585 100644 |
25408 |
--- a/tests/quse/Makefile.in |
25409 |
+++ b/tests/quse/Makefile.in |
25410 |
@@ -212,6 +212,7 @@ am__aclocal_m4_deps = $(top_srcdir)/autotools/m4/00gnulib.m4 \ |
25411 |
$(top_srcdir)/autotools/m4/string_h.m4 \ |
25412 |
$(top_srcdir)/autotools/m4/strings_h.m4 \ |
25413 |
$(top_srcdir)/autotools/m4/strncat.m4 \ |
25414 |
+ $(top_srcdir)/autotools/m4/strtoll.m4 \ |
25415 |
$(top_srcdir)/autotools/m4/symlink.m4 \ |
25416 |
$(top_srcdir)/autotools/m4/symlinkat.m4 \ |
25417 |
$(top_srcdir)/autotools/m4/sys_socket_h.m4 \ |
25418 |
|
25419 |
diff --git a/tests/qxpak/Makefile.in b/tests/qxpak/Makefile.in |
25420 |
index a3e9a27..f287551 100644 |
25421 |
--- a/tests/qxpak/Makefile.in |
25422 |
+++ b/tests/qxpak/Makefile.in |
25423 |
@@ -212,6 +212,7 @@ am__aclocal_m4_deps = $(top_srcdir)/autotools/m4/00gnulib.m4 \ |
25424 |
$(top_srcdir)/autotools/m4/string_h.m4 \ |
25425 |
$(top_srcdir)/autotools/m4/strings_h.m4 \ |
25426 |
$(top_srcdir)/autotools/m4/strncat.m4 \ |
25427 |
+ $(top_srcdir)/autotools/m4/strtoll.m4 \ |
25428 |
$(top_srcdir)/autotools/m4/symlink.m4 \ |
25429 |
$(top_srcdir)/autotools/m4/symlinkat.m4 \ |
25430 |
$(top_srcdir)/autotools/m4/sys_socket_h.m4 \ |
25431 |
|
25432 |
diff --git a/tests/rmspace/Makefile.in b/tests/rmspace/Makefile.in |
25433 |
index a881b96..899ae9a 100644 |
25434 |
--- a/tests/rmspace/Makefile.in |
25435 |
+++ b/tests/rmspace/Makefile.in |
25436 |
@@ -213,6 +213,7 @@ am__aclocal_m4_deps = $(top_srcdir)/autotools/m4/00gnulib.m4 \ |
25437 |
$(top_srcdir)/autotools/m4/string_h.m4 \ |
25438 |
$(top_srcdir)/autotools/m4/strings_h.m4 \ |
25439 |
$(top_srcdir)/autotools/m4/strncat.m4 \ |
25440 |
+ $(top_srcdir)/autotools/m4/strtoll.m4 \ |
25441 |
$(top_srcdir)/autotools/m4/symlink.m4 \ |
25442 |
$(top_srcdir)/autotools/m4/symlinkat.m4 \ |
25443 |
$(top_srcdir)/autotools/m4/sys_socket_h.m4 \ |
25444 |
|
25445 |
diff --git a/tests/source/Makefile.in b/tests/source/Makefile.in |
25446 |
index fe82743..8ec93fb 100644 |
25447 |
--- a/tests/source/Makefile.in |
25448 |
+++ b/tests/source/Makefile.in |
25449 |
@@ -212,6 +212,7 @@ am__aclocal_m4_deps = $(top_srcdir)/autotools/m4/00gnulib.m4 \ |
25450 |
$(top_srcdir)/autotools/m4/string_h.m4 \ |
25451 |
$(top_srcdir)/autotools/m4/strings_h.m4 \ |
25452 |
$(top_srcdir)/autotools/m4/strncat.m4 \ |
25453 |
+ $(top_srcdir)/autotools/m4/strtoll.m4 \ |
25454 |
$(top_srcdir)/autotools/m4/symlink.m4 \ |
25455 |
$(top_srcdir)/autotools/m4/symlinkat.m4 \ |
25456 |
$(top_srcdir)/autotools/m4/sys_socket_h.m4 \ |