diff options
author | Thomas Guyot-Sionnest <dermoth@users.sourceforge.net> | 2008-03-14 10:17:24 +0000 |
---|---|---|
committer | Thomas Guyot-Sionnest <dermoth@users.sourceforge.net> | 2008-03-14 10:17:24 +0000 |
commit | 2f4d1e04488c6ae6342c38f2080a726f28d43b47 (patch) | |
tree | 171dbb160586268e80fc3817c86193c386e6a429 | |
parent | 2b61c82169f76c05703e194604e332c2e40b9ee2 (diff) | |
download | monitoring-plugins-2f4d1e04488c6ae6342c38f2080a726f28d43b47.tar.gz |
These files are generated automatically during the make process, and removed by make clean.
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1940 f882894a-f735-0410-b71e-b25c423dba1c
-rw-r--r-- | gl/charset.alias | 5 | ||||
-rw-r--r-- | gl/configmake.h | 25 | ||||
-rw-r--r-- | gl/math.h | 442 | ||||
-rw-r--r-- | gl/ref-add.sed | 10 | ||||
-rw-r--r-- | gl/ref-del.sed | 5 | ||||
-rw-r--r-- | gl/stdio.h | 411 | ||||
-rw-r--r-- | gl/stdlib.h | 237 | ||||
-rw-r--r-- | gl/string.h | 598 | ||||
-rw-r--r-- | gl/unistd.h | 321 |
9 files changed, 0 insertions, 2054 deletions
diff --git a/gl/charset.alias b/gl/charset.alias deleted file mode 100644 index d9501e2b..00000000 --- a/gl/charset.alias +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | # This file contains a table of character encoding aliases, | ||
2 | # suitable for operating system 'linux-gnu'. | ||
3 | # It was automatically generated from config.charset. | ||
4 | # Packages using this file: | ||
5 | ISO_646.IRV:1983 ASCII | ||
diff --git a/gl/configmake.h b/gl/configmake.h deleted file mode 100644 index f73bc381..00000000 --- a/gl/configmake.h +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ | ||
2 | #define PREFIX "/usr/local/nagios" | ||
3 | #define EXEC_PREFIX "/usr/local/nagios" | ||
4 | #define BINDIR "/usr/local/nagios/bin" | ||
5 | #define SBINDIR "/usr/local/nagios/sbin" | ||
6 | #define LIBEXECDIR "/usr/local/nagios/libexec" | ||
7 | #define DATAROOTDIR "/usr/local/nagios/share" | ||
8 | #define DATADIR "/usr/local/nagios/share" | ||
9 | #define SYSCONFDIR "/usr/local/nagios/etc" | ||
10 | #define SHAREDSTATEDIR "/usr/local/nagios/com" | ||
11 | #define LOCALSTATEDIR "/usr/local/nagios/var" | ||
12 | #define INCLUDEDIR "/usr/local/nagios/include" | ||
13 | #define OLDINCLUDEDIR "/usr/include" | ||
14 | #define DOCDIR "/usr/local/nagios/share/doc/nagios-plugins" | ||
15 | #define INFODIR "/usr/local/nagios/share/info" | ||
16 | #define HTMLDIR "/usr/local/nagios/share/doc/nagios-plugins" | ||
17 | #define DVIDIR "/usr/local/nagios/share/doc/nagios-plugins" | ||
18 | #define PDFDIR "/usr/local/nagios/share/doc/nagios-plugins" | ||
19 | #define PSDIR "/usr/local/nagios/share/doc/nagios-plugins" | ||
20 | #define LIBDIR "/usr/local/nagios/lib" | ||
21 | #define LOCALEDIR "/usr/local/nagios/share/locale" | ||
22 | #define MANDIR "/usr/local/nagios/share/man" | ||
23 | #define PKGDATADIR "/usr/local/nagios/share/nagios-plugins" | ||
24 | #define PKGINCLUDEDIR "/usr/local/nagios/include/nagios-plugins" | ||
25 | #define PKGLIBDIR "/usr/local/nagios/lib/nagios-plugins" | ||
diff --git a/gl/math.h b/gl/math.h deleted file mode 100644 index 9db986e0..00000000 --- a/gl/math.h +++ /dev/null | |||
@@ -1,442 +0,0 @@ | |||
1 | /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ | ||
2 | /* A GNU-like <math.h>. | ||
3 | |||
4 | Copyright (C) 2002-2003, 2007 Free Software Foundation, Inc. | ||
5 | |||
6 | This program is free software: you can redistribute it and/or modify | ||
7 | it under the terms of the GNU General Public License as published by | ||
8 | the Free Software Foundation; either version 3 of the License, or | ||
9 | (at your option) any later version. | ||
10 | |||
11 | This program is distributed in the hope that it will be useful, | ||
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | GNU General Public License for more details. | ||
15 | |||
16 | You should have received a copy of the GNU General Public License | ||
17 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ | ||
18 | |||
19 | #ifndef _GL_MATH_H | ||
20 | |||
21 | /* The include_next requires a split double-inclusion guard. */ | ||
22 | #include_next <math.h> | ||
23 | |||
24 | #ifndef _GL_MATH_H | ||
25 | #define _GL_MATH_H | ||
26 | |||
27 | |||
28 | /* The definition of GL_LINK_WARNING is copied here. */ | ||
29 | /* GL_LINK_WARNING("literal string") arranges to emit the literal string as | ||
30 | a linker warning on most glibc systems. | ||
31 | We use a linker warning rather than a preprocessor warning, because | ||
32 | #warning cannot be used inside macros. */ | ||
33 | #ifndef GL_LINK_WARNING | ||
34 | /* This works on platforms with GNU ld and ELF object format. | ||
35 | Testing __GLIBC__ is sufficient for asserting that GNU ld is in use. | ||
36 | Testing __ELF__ guarantees the ELF object format. | ||
37 | Testing __GNUC__ is necessary for the compound expression syntax. */ | ||
38 | # if defined __GLIBC__ && defined __ELF__ && defined __GNUC__ | ||
39 | # define GL_LINK_WARNING(message) \ | ||
40 | GL_LINK_WARNING1 (__FILE__, __LINE__, message) | ||
41 | # define GL_LINK_WARNING1(file, line, message) \ | ||
42 | GL_LINK_WARNING2 (file, line, message) /* macroexpand file and line */ | ||
43 | # define GL_LINK_WARNING2(file, line, message) \ | ||
44 | GL_LINK_WARNING3 (file ":" #line ": warning: " message) | ||
45 | # define GL_LINK_WARNING3(message) \ | ||
46 | ({ static const char warning[sizeof (message)] \ | ||
47 | __attribute__ ((__unused__, \ | ||
48 | __section__ (".gnu.warning"), \ | ||
49 | __aligned__ (1))) \ | ||
50 | = message "\n"; \ | ||
51 | (void)0; \ | ||
52 | }) | ||
53 | # else | ||
54 | # define GL_LINK_WARNING(message) ((void) 0) | ||
55 | # endif | ||
56 | #endif | ||
57 | |||
58 | |||
59 | #ifdef __cplusplus | ||
60 | extern "C" { | ||
61 | #endif | ||
62 | |||
63 | |||
64 | /* Write x as | ||
65 | x = mantissa * 2^exp | ||
66 | where | ||
67 | If x finite and nonzero: 0.5 <= |mantissa| < 1.0. | ||
68 | If x is zero: mantissa = x, exp = 0. | ||
69 | If x is infinite or NaN: mantissa = x, exp unspecified. | ||
70 | Store exp in *EXPPTR and return mantissa. */ | ||
71 | #if 0 | ||
72 | # if 0 | ||
73 | # define frexp rpl_frexp | ||
74 | extern double frexp (double x, int *expptr); | ||
75 | # endif | ||
76 | #elif defined GNULIB_POSIXCHECK | ||
77 | # undef frexp | ||
78 | # define frexp(x,e) \ | ||
79 | (GL_LINK_WARNING ("frexp is unportable - " \ | ||
80 | "use gnulib module frexp for portability"), \ | ||
81 | frexp (x, e)) | ||
82 | #endif | ||
83 | |||
84 | |||
85 | #if 0 || !1 | ||
86 | extern long double acosl (long double x); | ||
87 | #endif | ||
88 | #if !0 && defined GNULIB_POSIXCHECK | ||
89 | # undef acosl | ||
90 | # define acosl(x) \ | ||
91 | (GL_LINK_WARNING ("acosl is unportable - " \ | ||
92 | "use gnulib module mathl for portability"), \ | ||
93 | acosl (x)) | ||
94 | #endif | ||
95 | |||
96 | |||
97 | #if 0 || !1 | ||
98 | extern long double asinl (long double x); | ||
99 | #endif | ||
100 | #if !0 && defined GNULIB_POSIXCHECK | ||
101 | # undef asinl | ||
102 | # define asinl(x) \ | ||
103 | (GL_LINK_WARNING ("asinl is unportable - " \ | ||
104 | "use gnulib module mathl for portability"), \ | ||
105 | asinl (x)) | ||
106 | #endif | ||
107 | |||
108 | |||
109 | #if 0 || !1 | ||
110 | extern long double atanl (long double x); | ||
111 | #endif | ||
112 | #if !0 && defined GNULIB_POSIXCHECK | ||
113 | # undef atanl | ||
114 | # define atanl(x) \ | ||
115 | (GL_LINK_WARNING ("atanl is unportable - " \ | ||
116 | "use gnulib module mathl for portability"), \ | ||
117 | atanl (x)) | ||
118 | #endif | ||
119 | |||
120 | |||
121 | #if 0 | ||
122 | # if 0 | ||
123 | # define ceilf rpl_ceilf | ||
124 | extern float ceilf (float x); | ||
125 | # endif | ||
126 | #elif defined GNULIB_POSIXCHECK | ||
127 | # undef ceilf | ||
128 | # define ceilf(x) \ | ||
129 | (GL_LINK_WARNING ("ceilf is unportable - " \ | ||
130 | "use gnulib module ceilf for portability"), \ | ||
131 | ceilf (x)) | ||
132 | #endif | ||
133 | |||
134 | #if 0 | ||
135 | # if 0 | ||
136 | # define ceill rpl_ceill | ||
137 | extern long double ceill (long double x); | ||
138 | # endif | ||
139 | #elif defined GNULIB_POSIXCHECK | ||
140 | # undef ceill | ||
141 | # define ceill(x) \ | ||
142 | (GL_LINK_WARNING ("ceill is unportable - " \ | ||
143 | "use gnulib module ceill for portability"), \ | ||
144 | ceill (x)) | ||
145 | #endif | ||
146 | |||
147 | |||
148 | #if 0 || !1 | ||
149 | extern long double cosl (long double x); | ||
150 | #endif | ||
151 | #if !0 && defined GNULIB_POSIXCHECK | ||
152 | # undef cosl | ||
153 | # define cosl(x) \ | ||
154 | (GL_LINK_WARNING ("cosl is unportable - " \ | ||
155 | "use gnulib module mathl for portability"), \ | ||
156 | cosl (x)) | ||
157 | #endif | ||
158 | |||
159 | |||
160 | #if 0 || !1 | ||
161 | extern long double expl (long double x); | ||
162 | #endif | ||
163 | #if !0 && defined GNULIB_POSIXCHECK | ||
164 | # undef expl | ||
165 | # define expl(x) \ | ||
166 | (GL_LINK_WARNING ("expl is unportable - " \ | ||
167 | "use gnulib module mathl for portability"), \ | ||
168 | expl (x)) | ||
169 | #endif | ||
170 | |||
171 | |||
172 | #if 1 | ||
173 | # if 0 | ||
174 | # define floorf rpl_floorf | ||
175 | extern float floorf (float x); | ||
176 | # endif | ||
177 | #elif defined GNULIB_POSIXCHECK | ||
178 | # undef floorf | ||
179 | # define floorf(x) \ | ||
180 | (GL_LINK_WARNING ("floorf is unportable - " \ | ||
181 | "use gnulib module floorf for portability"), \ | ||
182 | floorf (x)) | ||
183 | #endif | ||
184 | |||
185 | #if 0 | ||
186 | # if 0 | ||
187 | # define floorl rpl_floorl | ||
188 | extern long double floorl (long double x); | ||
189 | # endif | ||
190 | #elif defined GNULIB_POSIXCHECK | ||
191 | # undef floorl | ||
192 | # define floorl(x) \ | ||
193 | (GL_LINK_WARNING ("floorl is unportable - " \ | ||
194 | "use gnulib module floorl for portability"), \ | ||
195 | floorl (x)) | ||
196 | #endif | ||
197 | |||
198 | |||
199 | /* Write x as | ||
200 | x = mantissa * 2^exp | ||
201 | where | ||
202 | If x finite and nonzero: 0.5 <= |mantissa| < 1.0. | ||
203 | If x is zero: mantissa = x, exp = 0. | ||
204 | If x is infinite or NaN: mantissa = x, exp unspecified. | ||
205 | Store exp in *EXPPTR and return mantissa. */ | ||
206 | #if 0 && 0 | ||
207 | # define frexpl rpl_frexpl | ||
208 | #endif | ||
209 | #if (0 && 0) || !1 | ||
210 | extern long double frexpl (long double x, int *expptr); | ||
211 | #endif | ||
212 | #if !0 && defined GNULIB_POSIXCHECK | ||
213 | # undef frexpl | ||
214 | # define frexpl(x,e) \ | ||
215 | (GL_LINK_WARNING ("frexpl is unportable - " \ | ||
216 | "use gnulib module frexpl for portability"), \ | ||
217 | frexpl (x, e)) | ||
218 | #endif | ||
219 | |||
220 | |||
221 | /* Return x * 2^exp. */ | ||
222 | #if 0 && 0 | ||
223 | # define ldexpl rpl_ldexpl | ||
224 | #endif | ||
225 | #if (0 && 0) || !1 | ||
226 | extern long double ldexpl (long double x, int exp); | ||
227 | #endif | ||
228 | #if !0 && defined GNULIB_POSIXCHECK | ||
229 | # undef ldexpl | ||
230 | # define ldexpl(x,e) \ | ||
231 | (GL_LINK_WARNING ("ldexpl is unportable - " \ | ||
232 | "use gnulib module ldexpl for portability"), \ | ||
233 | ldexpl (x, e)) | ||
234 | #endif | ||
235 | |||
236 | |||
237 | #if 0 || !1 | ||
238 | extern long double logl (long double x); | ||
239 | #endif | ||
240 | #if !0 && defined GNULIB_POSIXCHECK | ||
241 | # undef logl | ||
242 | # define logl(x) \ | ||
243 | (GL_LINK_WARNING ("logl is unportable - " \ | ||
244 | "use gnulib module mathl for portability"), \ | ||
245 | logl (x)) | ||
246 | #endif | ||
247 | |||
248 | |||
249 | #if 0 | ||
250 | # if 0 | ||
251 | # undef roundf | ||
252 | # define roundf rpl_roundf | ||
253 | extern float roundf (float x); | ||
254 | # endif | ||
255 | #elif defined GNULIB_POSIXCHECK | ||
256 | # undef roundf | ||
257 | # define roundf(x) \ | ||
258 | (GL_LINK_WARNING ("roundf is unportable - " \ | ||
259 | "use gnulib module roundf for portability"), \ | ||
260 | roundf (x)) | ||
261 | #endif | ||
262 | |||
263 | #if 0 | ||
264 | # if 0 | ||
265 | # undef round | ||
266 | # define round rpl_round | ||
267 | extern double round (double x); | ||
268 | # endif | ||
269 | #elif defined GNULIB_POSIXCHECK | ||
270 | # undef round | ||
271 | # define round(x) \ | ||
272 | (GL_LINK_WARNING ("round is unportable - " \ | ||
273 | "use gnulib module round for portability"), \ | ||
274 | round (x)) | ||
275 | #endif | ||
276 | |||
277 | #if 0 | ||
278 | # if 0 | ||
279 | # undef roundl | ||
280 | # define roundl rpl_roundl | ||
281 | extern long double roundl (long double x); | ||
282 | # endif | ||
283 | #elif defined GNULIB_POSIXCHECK | ||
284 | # undef roundl | ||
285 | # define roundl(x) \ | ||
286 | (GL_LINK_WARNING ("roundl is unportable - " \ | ||
287 | "use gnulib module roundl for portability"), \ | ||
288 | roundl (x)) | ||
289 | #endif | ||
290 | |||
291 | |||
292 | #if 0 || !1 | ||
293 | extern long double sinl (long double x); | ||
294 | #endif | ||
295 | #if !0 && defined GNULIB_POSIXCHECK | ||
296 | # undef sinl | ||
297 | # define sinl(x) \ | ||
298 | (GL_LINK_WARNING ("sinl is unportable - " \ | ||
299 | "use gnulib module mathl for portability"), \ | ||
300 | sinl (x)) | ||
301 | #endif | ||
302 | |||
303 | |||
304 | #if 0 || !1 | ||
305 | extern long double sqrtl (long double x); | ||
306 | #endif | ||
307 | #if !0 && defined GNULIB_POSIXCHECK | ||
308 | # undef sqrtl | ||
309 | # define sqrtl(x) \ | ||
310 | (GL_LINK_WARNING ("sqrtl is unportable - " \ | ||
311 | "use gnulib module mathl for portability"), \ | ||
312 | sqrtl (x)) | ||
313 | #endif | ||
314 | |||
315 | |||
316 | #if 0 || !1 | ||
317 | extern long double tanl (long double x); | ||
318 | #endif | ||
319 | #if !0 && defined GNULIB_POSIXCHECK | ||
320 | # undef tanl | ||
321 | # define tanl(x) \ | ||
322 | (GL_LINK_WARNING ("tanl is unportable - " \ | ||
323 | "use gnulib module mathl for portability"), \ | ||
324 | tanl (x)) | ||
325 | #endif | ||
326 | |||
327 | |||
328 | #if 0 | ||
329 | # if !1 | ||
330 | # define truncf rpl_truncf | ||
331 | extern float truncf (float x); | ||
332 | # endif | ||
333 | #elif defined GNULIB_POSIXCHECK | ||
334 | # undef truncf | ||
335 | # define truncf(x) \ | ||
336 | (GL_LINK_WARNING ("truncf is unportable - " \ | ||
337 | "use gnulib module truncf for portability"), \ | ||
338 | truncf (x)) | ||
339 | #endif | ||
340 | |||
341 | #if 0 | ||
342 | # if !1 | ||
343 | # define trunc rpl_trunc | ||
344 | extern double trunc (double x); | ||
345 | # endif | ||
346 | #elif defined GNULIB_POSIXCHECK | ||
347 | # undef trunc | ||
348 | # define trunc(x) \ | ||
349 | (GL_LINK_WARNING ("trunc is unportable - " \ | ||
350 | "use gnulib module trunc for portability"), \ | ||
351 | trunc (x)) | ||
352 | #endif | ||
353 | |||
354 | #if 0 | ||
355 | # if !1 | ||
356 | # define truncl rpl_truncl | ||
357 | extern long double truncl (long double x); | ||
358 | # endif | ||
359 | #elif defined GNULIB_POSIXCHECK | ||
360 | # undef truncl | ||
361 | # define truncl(x) \ | ||
362 | (GL_LINK_WARNING ("truncl is unportable - " \ | ||
363 | "use gnulib module truncl for portability"), \ | ||
364 | truncl (x)) | ||
365 | #endif | ||
366 | |||
367 | |||
368 | #if 0 | ||
369 | # if 0 | ||
370 | extern int gl_isfinitef (float x); | ||
371 | extern int gl_isfinited (double x); | ||
372 | extern int gl_isfinitel (long double x); | ||
373 | # undef isfinite | ||
374 | # define isfinite(x) \ | ||
375 | (sizeof (x) == sizeof (long double) ? gl_isfinitel (x) : \ | ||
376 | sizeof (x) == sizeof (double) ? gl_isfinited (x) : \ | ||
377 | gl_isfinitef (x)) | ||
378 | # endif | ||
379 | #elif defined GNULIB_POSIXCHECK | ||
380 | /* How to override a macro? */ | ||
381 | #endif | ||
382 | |||
383 | |||
384 | #if 0 | ||
385 | # if 0 | ||
386 | # undef signbit | ||
387 | /* GCC 4.0 and newer provides three built-ins for signbit. */ | ||
388 | # define signbit(x) \ | ||
389 | (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \ | ||
390 | sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \ | ||
391 | __builtin_signbitf (x)) | ||
392 | # endif | ||
393 | # if 0 | ||
394 | # undef signbit | ||
395 | extern int gl_signbitf (float arg); | ||
396 | extern int gl_signbitd (double arg); | ||
397 | extern int gl_signbitl (long double arg); | ||
398 | # if __GNUC__ >= 2 && !__STRICT_ANSI__ | ||
399 | # if defined FLT_SIGNBIT_WORD && defined FLT_SIGNBIT_BIT | ||
400 | # define gl_signbitf(arg) \ | ||
401 | ({ union { float _value; \ | ||
402 | unsigned int _word[(sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int)]; \ | ||
403 | } _m; \ | ||
404 | _m._value = (arg); \ | ||
405 | (_m._word[FLT_SIGNBIT_WORD] >> FLT_SIGNBIT_BIT) & 1; \ | ||
406 | }) | ||
407 | # endif | ||
408 | # if defined DBL_SIGNBIT_WORD && defined DBL_SIGNBIT_BIT | ||
409 | # define gl_signbitd(arg) \ | ||
410 | ({ union { double _value; \ | ||
411 | unsigned int _word[(sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)]; \ | ||
412 | } _m; \ | ||
413 | _m._value = (arg); \ | ||
414 | (_m._word[DBL_SIGNBIT_WORD] >> DBL_SIGNBIT_BIT) & 1; \ | ||
415 | }) | ||
416 | # endif | ||
417 | # if defined LDBL_SIGNBIT_WORD && defined LDBL_SIGNBIT_BIT | ||
418 | # define gl_signbitl(arg) \ | ||
419 | ({ union { long double _value; \ | ||
420 | unsigned int _word[(sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)]; \ | ||
421 | } _m; \ | ||
422 | _m._value = (arg); \ | ||
423 | (_m._word[LDBL_SIGNBIT_WORD] >> LDBL_SIGNBIT_BIT) & 1; \ | ||
424 | }) | ||
425 | # endif | ||
426 | # endif | ||
427 | # define signbit(x) \ | ||
428 | (sizeof (x) == sizeof (long double) ? gl_signbitl (x) : \ | ||
429 | sizeof (x) == sizeof (double) ? gl_signbitd (x) : \ | ||
430 | gl_signbitf (x)) | ||
431 | # endif | ||
432 | #elif defined GNULIB_POSIXCHECK | ||
433 | /* How to override a macro? */ | ||
434 | #endif | ||
435 | |||
436 | |||
437 | #ifdef __cplusplus | ||
438 | } | ||
439 | #endif | ||
440 | |||
441 | #endif /* _GL_MATH_H */ | ||
442 | #endif /* _GL_MATH_H */ | ||
diff --git a/gl/ref-add.sed b/gl/ref-add.sed deleted file mode 100644 index 3ac991fe..00000000 --- a/gl/ref-add.sed +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | /^# Packages using this file: / { | ||
2 | s/# Packages using this file:// | ||
3 | ta | ||
4 | :a | ||
5 | s/ nagios-plugins / nagios-plugins / | ||
6 | tb | ||
7 | s/ $/ nagios-plugins / | ||
8 | :b | ||
9 | s/^/# Packages using this file:/ | ||
10 | } | ||
diff --git a/gl/ref-del.sed b/gl/ref-del.sed deleted file mode 100644 index a48fdb77..00000000 --- a/gl/ref-del.sed +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | /^# Packages using this file: / { | ||
2 | s/# Packages using this file:// | ||
3 | s/ nagios-plugins / / | ||
4 | s/^/# Packages using this file:/ | ||
5 | } | ||
diff --git a/gl/stdio.h b/gl/stdio.h deleted file mode 100644 index f09ee831..00000000 --- a/gl/stdio.h +++ /dev/null | |||
@@ -1,411 +0,0 @@ | |||
1 | /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ | ||
2 | /* A GNU-like <stdio.h>. | ||
3 | |||
4 | Copyright (C) 2004, 2007-2008 Free Software Foundation, Inc. | ||
5 | |||
6 | This program is free software; you can redistribute it and/or modify | ||
7 | it under the terms of the GNU General Public License as published by | ||
8 | the Free Software Foundation; either version 3, or (at your option) | ||
9 | any later version. | ||
10 | |||
11 | This program is distributed in the hope that it will be useful, | ||
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | GNU General Public License for more details. | ||
15 | |||
16 | You should have received a copy of the GNU General Public License | ||
17 | along with this program; if not, write to the Free Software Foundation, | ||
18 | Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ | ||
19 | |||
20 | #if defined __need_FILE || defined __need___FILE | ||
21 | /* Special invocation convention inside glibc header files. */ | ||
22 | |||
23 | #include_next <stdio.h> | ||
24 | |||
25 | #else | ||
26 | /* Normal invocation convention. */ | ||
27 | |||
28 | #ifndef _GL_STDIO_H | ||
29 | |||
30 | /* The include_next requires a split double-inclusion guard. */ | ||
31 | #include_next <stdio.h> | ||
32 | |||
33 | #ifndef _GL_STDIO_H | ||
34 | #define _GL_STDIO_H | ||
35 | |||
36 | #include <stdarg.h> | ||
37 | #include <stddef.h> | ||
38 | |||
39 | #if (0 && 0) \ | ||
40 | || (0 && 0) \ | ||
41 | || (0 && !1) \ | ||
42 | || (0 && (!1 || 0)) | ||
43 | /* Get off_t and ssize_t. */ | ||
44 | # include <sys/types.h> | ||
45 | #endif | ||
46 | |||
47 | #ifndef __attribute__ | ||
48 | /* This feature is available in gcc versions 2.5 and later. */ | ||
49 | # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) | ||
50 | # define __attribute__(Spec) /* empty */ | ||
51 | # endif | ||
52 | /* The __-protected variants of `format' and `printf' attributes | ||
53 | are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */ | ||
54 | # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) | ||
55 | # define __format__ format | ||
56 | # define __printf__ printf | ||
57 | # endif | ||
58 | #endif | ||
59 | |||
60 | |||
61 | /* The definition of GL_LINK_WARNING is copied here. */ | ||
62 | /* GL_LINK_WARNING("literal string") arranges to emit the literal string as | ||
63 | a linker warning on most glibc systems. | ||
64 | We use a linker warning rather than a preprocessor warning, because | ||
65 | #warning cannot be used inside macros. */ | ||
66 | #ifndef GL_LINK_WARNING | ||
67 | /* This works on platforms with GNU ld and ELF object format. | ||
68 | Testing __GLIBC__ is sufficient for asserting that GNU ld is in use. | ||
69 | Testing __ELF__ guarantees the ELF object format. | ||
70 | Testing __GNUC__ is necessary for the compound expression syntax. */ | ||
71 | # if defined __GLIBC__ && defined __ELF__ && defined __GNUC__ | ||
72 | # define GL_LINK_WARNING(message) \ | ||
73 | GL_LINK_WARNING1 (__FILE__, __LINE__, message) | ||
74 | # define GL_LINK_WARNING1(file, line, message) \ | ||
75 | GL_LINK_WARNING2 (file, line, message) /* macroexpand file and line */ | ||
76 | # define GL_LINK_WARNING2(file, line, message) \ | ||
77 | GL_LINK_WARNING3 (file ":" #line ": warning: " message) | ||
78 | # define GL_LINK_WARNING3(message) \ | ||
79 | ({ static const char warning[sizeof (message)] \ | ||
80 | __attribute__ ((__unused__, \ | ||
81 | __section__ (".gnu.warning"), \ | ||
82 | __aligned__ (1))) \ | ||
83 | = message "\n"; \ | ||
84 | (void)0; \ | ||
85 | }) | ||
86 | # else | ||
87 | # define GL_LINK_WARNING(message) ((void) 0) | ||
88 | # endif | ||
89 | #endif | ||
90 | |||
91 | |||
92 | #ifdef __cplusplus | ||
93 | extern "C" { | ||
94 | #endif | ||
95 | |||
96 | |||
97 | #if 0 | ||
98 | # if 0 | ||
99 | # define fprintf rpl_fprintf | ||
100 | extern int fprintf (FILE *fp, const char *format, ...) | ||
101 | __attribute__ ((__format__ (__printf__, 2, 3))); | ||
102 | # endif | ||
103 | #elif defined GNULIB_POSIXCHECK | ||
104 | # undef fprintf | ||
105 | # define fprintf \ | ||
106 | (GL_LINK_WARNING ("fprintf is not always POSIX compliant - " \ | ||
107 | "use gnulib module fprintf-posix for portable " \ | ||
108 | "POSIX compliance"), \ | ||
109 | fprintf) | ||
110 | #endif | ||
111 | |||
112 | #if 0 | ||
113 | # if 0 | ||
114 | # define vfprintf rpl_vfprintf | ||
115 | extern int vfprintf (FILE *fp, const char *format, va_list args) | ||
116 | __attribute__ ((__format__ (__printf__, 2, 0))); | ||
117 | # endif | ||
118 | #elif defined GNULIB_POSIXCHECK | ||
119 | # undef vfprintf | ||
120 | # define vfprintf(s,f,a) \ | ||
121 | (GL_LINK_WARNING ("vfprintf is not always POSIX compliant - " \ | ||
122 | "use gnulib module vfprintf-posix for portable " \ | ||
123 | "POSIX compliance"), \ | ||
124 | vfprintf (s, f, a)) | ||
125 | #endif | ||
126 | |||
127 | #if 0 | ||
128 | # if 0 | ||
129 | /* Don't break __attribute__((format(printf,M,N))). */ | ||
130 | # define printf __printf__ | ||
131 | extern int printf (const char *format, ...) | ||
132 | __attribute__ ((__format__ (__printf__, 1, 2))); | ||
133 | # endif | ||
134 | #elif defined GNULIB_POSIXCHECK | ||
135 | # undef printf | ||
136 | # define printf \ | ||
137 | (GL_LINK_WARNING ("printf is not always POSIX compliant - " \ | ||
138 | "use gnulib module printf-posix for portable " \ | ||
139 | "POSIX compliance"), \ | ||
140 | printf) | ||
141 | /* Don't break __attribute__((format(printf,M,N))). */ | ||
142 | # define format(kind,m,n) format (__##kind##__, m, n) | ||
143 | # define __format__(kind,m,n) __format__ (__##kind##__, m, n) | ||
144 | # define ____printf____ __printf__ | ||
145 | # define ____scanf____ __scanf__ | ||
146 | # define ____strftime____ __strftime__ | ||
147 | # define ____strfmon____ __strfmon__ | ||
148 | #endif | ||
149 | |||
150 | #if 0 | ||
151 | # if 0 | ||
152 | # define vprintf rpl_vprintf | ||
153 | extern int vprintf (const char *format, va_list args) | ||
154 | __attribute__ ((__format__ (__printf__, 1, 0))); | ||
155 | # endif | ||
156 | #elif defined GNULIB_POSIXCHECK | ||
157 | # undef vprintf | ||
158 | # define vprintf(f,a) \ | ||
159 | (GL_LINK_WARNING ("vprintf is not always POSIX compliant - " \ | ||
160 | "use gnulib module vprintf-posix for portable " \ | ||
161 | "POSIX compliance"), \ | ||
162 | vprintf (f, a)) | ||
163 | #endif | ||
164 | |||
165 | #if 1 | ||
166 | # if 0 | ||
167 | # define snprintf rpl_snprintf | ||
168 | # endif | ||
169 | # if 0 || !1 | ||
170 | extern int snprintf (char *str, size_t size, const char *format, ...) | ||
171 | __attribute__ ((__format__ (__printf__, 3, 4))); | ||
172 | # endif | ||
173 | #elif defined GNULIB_POSIXCHECK | ||
174 | # undef snprintf | ||
175 | # define snprintf \ | ||
176 | (GL_LINK_WARNING ("snprintf is unportable - " \ | ||
177 | "use gnulib module snprintf for portability"), \ | ||
178 | snprintf) | ||
179 | #endif | ||
180 | |||
181 | #if 1 | ||
182 | # if 0 | ||
183 | # define vsnprintf rpl_vsnprintf | ||
184 | # endif | ||
185 | # if 0 || !1 | ||
186 | extern int vsnprintf (char *str, size_t size, const char *format, va_list args) | ||
187 | __attribute__ ((__format__ (__printf__, 3, 0))); | ||
188 | # endif | ||
189 | #elif defined GNULIB_POSIXCHECK | ||
190 | # undef vsnprintf | ||
191 | # define vsnprintf(b,s,f,a) \ | ||
192 | (GL_LINK_WARNING ("vsnprintf is unportable - " \ | ||
193 | "use gnulib module vsnprintf for portability"), \ | ||
194 | vsnprintf (b, s, f, a)) | ||
195 | #endif | ||
196 | |||
197 | #if 0 | ||
198 | # if 0 | ||
199 | # define sprintf rpl_sprintf | ||
200 | extern int sprintf (char *str, const char *format, ...) | ||
201 | __attribute__ ((__format__ (__printf__, 2, 3))); | ||
202 | # endif | ||
203 | #elif defined GNULIB_POSIXCHECK | ||
204 | # undef sprintf | ||
205 | # define sprintf \ | ||
206 | (GL_LINK_WARNING ("sprintf is not always POSIX compliant - " \ | ||
207 | "use gnulib module sprintf-posix for portable " \ | ||
208 | "POSIX compliance"), \ | ||
209 | sprintf) | ||
210 | #endif | ||
211 | |||
212 | #if 0 | ||
213 | # if 0 | ||
214 | # define vsprintf rpl_vsprintf | ||
215 | extern int vsprintf (char *str, const char *format, va_list args) | ||
216 | __attribute__ ((__format__ (__printf__, 2, 0))); | ||
217 | # endif | ||
218 | #elif defined GNULIB_POSIXCHECK | ||
219 | # undef vsprintf | ||
220 | # define vsprintf(b,f,a) \ | ||
221 | (GL_LINK_WARNING ("vsprintf is not always POSIX compliant - " \ | ||
222 | "use gnulib module vsprintf-posix for portable " \ | ||
223 | "POSIX compliance"), \ | ||
224 | vsprintf (b, f, a)) | ||
225 | #endif | ||
226 | |||
227 | #if 1 | ||
228 | # if 0 | ||
229 | # define asprintf rpl_asprintf | ||
230 | # define vasprintf rpl_vasprintf | ||
231 | # endif | ||
232 | # if 0 || !1 | ||
233 | /* Write formatted output to a string dynamically allocated with malloc(). | ||
234 | If the memory allocation succeeds, store the address of the string in | ||
235 | *RESULT and return the number of resulting bytes, excluding the trailing | ||
236 | NUL. Upon memory allocation error, or some other error, return -1. */ | ||
237 | extern int asprintf (char **result, const char *format, ...) | ||
238 | __attribute__ ((__format__ (__printf__, 2, 3))); | ||
239 | extern int vasprintf (char **result, const char *format, va_list args) | ||
240 | __attribute__ ((__format__ (__printf__, 2, 0))); | ||
241 | # endif | ||
242 | #endif | ||
243 | |||
244 | #if 0 | ||
245 | # if 0 | ||
246 | # define fopen rpl_fopen | ||
247 | extern FILE * fopen (const char *filename, const char *mode); | ||
248 | # endif | ||
249 | #elif defined GNULIB_POSIXCHECK | ||
250 | # undef fopen | ||
251 | # define fopen(f,m) \ | ||
252 | (GL_LINK_WARNING ("fopen on Win32 platforms is not POSIX compatible - " \ | ||
253 | "use gnulib module fopen for portability"), \ | ||
254 | fopen (f, m)) | ||
255 | #endif | ||
256 | |||
257 | #if 0 | ||
258 | # if 0 | ||
259 | # define freopen rpl_freopen | ||
260 | extern FILE * freopen (const char *filename, const char *mode, FILE *stream); | ||
261 | # endif | ||
262 | #elif defined GNULIB_POSIXCHECK | ||
263 | # undef freopen | ||
264 | # define freopen(f,m,s) \ | ||
265 | (GL_LINK_WARNING ("freopen on Win32 platforms is not POSIX compatible - " \ | ||
266 | "use gnulib module freopen for portability"), \ | ||
267 | freopen (f, m, s)) | ||
268 | #endif | ||
269 | |||
270 | #if 0 | ||
271 | # if 0 | ||
272 | /* Provide fseek, fseeko functions that are aware of a preceding | ||
273 | fflush(), and which detect pipes. */ | ||
274 | # define fseeko rpl_fseeko | ||
275 | extern int fseeko (FILE *fp, off_t offset, int whence); | ||
276 | # define fseek(fp, offset, whence) fseeko (fp, (off_t)(offset), whence) | ||
277 | # endif | ||
278 | #elif defined GNULIB_POSIXCHECK | ||
279 | # undef fseeko | ||
280 | # define fseeko(f,o,w) \ | ||
281 | (GL_LINK_WARNING ("fseeko is unportable - " \ | ||
282 | "use gnulib module fseeko for portability"), \ | ||
283 | fseeko (f, o, w)) | ||
284 | #endif | ||
285 | |||
286 | #if 0 && 0 | ||
287 | extern int rpl_fseek (FILE *fp, long offset, int whence); | ||
288 | # undef fseek | ||
289 | # if defined GNULIB_POSIXCHECK | ||
290 | # define fseek(f,o,w) \ | ||
291 | (GL_LINK_WARNING ("fseek cannot handle files larger than 4 GB " \ | ||
292 | "on 32-bit platforms - " \ | ||
293 | "use fseeko function for handling of large files"), \ | ||
294 | rpl_fseek (f, o, w)) | ||
295 | # else | ||
296 | # define fseek rpl_fseek | ||
297 | # endif | ||
298 | #elif defined GNULIB_POSIXCHECK | ||
299 | # ifndef fseek | ||
300 | # define fseek(f,o,w) \ | ||
301 | (GL_LINK_WARNING ("fseek cannot handle files larger than 4 GB " \ | ||
302 | "on 32-bit platforms - " \ | ||
303 | "use fseeko function for handling of large files"), \ | ||
304 | fseek (f, o, w)) | ||
305 | # endif | ||
306 | #endif | ||
307 | |||
308 | #if 0 | ||
309 | # if 0 | ||
310 | # define ftello rpl_ftello | ||
311 | extern off_t ftello (FILE *fp); | ||
312 | # define ftell(fp) ftello (fp) | ||
313 | # endif | ||
314 | #elif defined GNULIB_POSIXCHECK | ||
315 | # undef ftello | ||
316 | # define ftello(f) \ | ||
317 | (GL_LINK_WARNING ("ftello is unportable - " \ | ||
318 | "use gnulib module ftello for portability"), \ | ||
319 | ftello (f)) | ||
320 | #endif | ||
321 | |||
322 | #if 0 && 0 | ||
323 | extern long rpl_ftell (FILE *fp); | ||
324 | # undef ftell | ||
325 | # if GNULIB_POSIXCHECK | ||
326 | # define ftell(f) \ | ||
327 | (GL_LINK_WARNING ("ftell cannot handle files larger than 4 GB " \ | ||
328 | "on 32-bit platforms - " \ | ||
329 | "use ftello function for handling of large files"), \ | ||
330 | rpl_ftell (f)) | ||
331 | # else | ||
332 | # define ftell rpl_ftell | ||
333 | # endif | ||
334 | #elif defined GNULIB_POSIXCHECK | ||
335 | # ifndef ftell | ||
336 | # define ftell(f) \ | ||
337 | (GL_LINK_WARNING ("ftell cannot handle files larger than 4 GB " \ | ||
338 | "on 32-bit platforms - " \ | ||
339 | "use ftello function for handling of large files"), \ | ||
340 | ftell (f)) | ||
341 | # endif | ||
342 | #endif | ||
343 | |||
344 | #if 0 | ||
345 | # if 0 | ||
346 | # define fflush rpl_fflush | ||
347 | /* Flush all pending data on STREAM according to POSIX rules. Both | ||
348 | output and seekable input streams are supported. | ||
349 | Note! LOSS OF DATA can occur if fflush is applied on an input stream | ||
350 | that is _not_seekable_ or on an update stream that is _not_seekable_ | ||
351 | and in which the most recent operation was input. Seekability can | ||
352 | be tested with lseek(fileno(fp),0,SEEK_CUR). */ | ||
353 | extern int fflush (FILE *gl_stream); | ||
354 | # endif | ||
355 | #elif defined GNULIB_POSIXCHECK | ||
356 | # undef fflush | ||
357 | # define fflush(f) \ | ||
358 | (GL_LINK_WARNING ("fflush is not always POSIX compliant - " \ | ||
359 | "use gnulib module fflush for portable " \ | ||
360 | "POSIX compliance"), \ | ||
361 | fflush (f)) | ||
362 | #endif | ||
363 | |||
364 | #if 0 | ||
365 | # if !1 | ||
366 | /* Read input, up to (and including) the next occurrence of DELIMITER, from | ||
367 | STREAM, store it in *LINEPTR (and NUL-terminate it). | ||
368 | *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE | ||
369 | bytes of space. It is realloc'd as necessary. | ||
370 | Return the number of bytes read and stored at *LINEPTR (not including the | ||
371 | NUL terminator), or -1 on error or EOF. */ | ||
372 | extern ssize_t getdelim (char **lineptr, size_t *linesize, int delimiter, | ||
373 | FILE *stream); | ||
374 | # endif | ||
375 | #elif defined GNULIB_POSIXCHECK | ||
376 | # undef getdelim | ||
377 | # define getdelim(l, s, d, f) \ | ||
378 | (GL_LINK_WARNING ("getdelim is unportable - " \ | ||
379 | "use gnulib module getdelim for portability"), \ | ||
380 | getdelim (l, s, d, f)) | ||
381 | #endif | ||
382 | |||
383 | #if 0 | ||
384 | # if 0 | ||
385 | # undef getline | ||
386 | # define getline rpl_getline | ||
387 | # endif | ||
388 | # if !1 || 0 | ||
389 | /* Read a line, up to (and including) the next newline, from STREAM, store it | ||
390 | in *LINEPTR (and NUL-terminate it). | ||
391 | *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE | ||
392 | bytes of space. It is realloc'd as necessary. | ||
393 | Return the number of bytes read and stored at *LINEPTR (not including the | ||
394 | NUL terminator), or -1 on error or EOF. */ | ||
395 | extern ssize_t getline (char **lineptr, size_t *linesize, FILE *stream); | ||
396 | # endif | ||
397 | #elif defined GNULIB_POSIXCHECK | ||
398 | # undef getline | ||
399 | # define getline(l, s, f) \ | ||
400 | (GL_LINK_WARNING ("getline is unportable - " \ | ||
401 | "use gnulib module getline for portability"), \ | ||
402 | getline (l, s, f)) | ||
403 | #endif | ||
404 | |||
405 | #ifdef __cplusplus | ||
406 | } | ||
407 | #endif | ||
408 | |||
409 | #endif /* _GL_STDIO_H */ | ||
410 | #endif /* _GL_STDIO_H */ | ||
411 | #endif | ||
diff --git a/gl/stdlib.h b/gl/stdlib.h deleted file mode 100644 index 86da899f..00000000 --- a/gl/stdlib.h +++ /dev/null | |||
@@ -1,237 +0,0 @@ | |||
1 | /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ | ||
2 | /* A GNU-like <stdlib.h>. | ||
3 | |||
4 | Copyright (C) 1995, 2001-2004, 2006-2007 Free Software Foundation, Inc. | ||
5 | |||
6 | This program is free software: you can redistribute it and/or modify | ||
7 | it under the terms of the GNU General Public License as published by | ||
8 | the Free Software Foundation; either version 3 of the License, or | ||
9 | (at your option) any later version. | ||
10 | |||
11 | This program is distributed in the hope that it will be useful, | ||
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | GNU General Public License for more details. | ||
15 | |||
16 | You should have received a copy of the GNU General Public License | ||
17 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ | ||
18 | |||
19 | #if defined __need_malloc_and_calloc | ||
20 | /* Special invocation convention inside glibc header files. */ | ||
21 | |||
22 | #include_next <stdlib.h> | ||
23 | |||
24 | #else | ||
25 | /* Normal invocation convention. */ | ||
26 | |||
27 | #ifndef _GL_STDLIB_H | ||
28 | |||
29 | /* The include_next requires a split double-inclusion guard. */ | ||
30 | #include_next <stdlib.h> | ||
31 | |||
32 | #ifndef _GL_STDLIB_H | ||
33 | #define _GL_STDLIB_H | ||
34 | |||
35 | |||
36 | /* The definition of GL_LINK_WARNING is copied here. */ | ||
37 | /* GL_LINK_WARNING("literal string") arranges to emit the literal string as | ||
38 | a linker warning on most glibc systems. | ||
39 | We use a linker warning rather than a preprocessor warning, because | ||
40 | #warning cannot be used inside macros. */ | ||
41 | #ifndef GL_LINK_WARNING | ||
42 | /* This works on platforms with GNU ld and ELF object format. | ||
43 | Testing __GLIBC__ is sufficient for asserting that GNU ld is in use. | ||
44 | Testing __ELF__ guarantees the ELF object format. | ||
45 | Testing __GNUC__ is necessary for the compound expression syntax. */ | ||
46 | # if defined __GLIBC__ && defined __ELF__ && defined __GNUC__ | ||
47 | # define GL_LINK_WARNING(message) \ | ||
48 | GL_LINK_WARNING1 (__FILE__, __LINE__, message) | ||
49 | # define GL_LINK_WARNING1(file, line, message) \ | ||
50 | GL_LINK_WARNING2 (file, line, message) /* macroexpand file and line */ | ||
51 | # define GL_LINK_WARNING2(file, line, message) \ | ||
52 | GL_LINK_WARNING3 (file ":" #line ": warning: " message) | ||
53 | # define GL_LINK_WARNING3(message) \ | ||
54 | ({ static const char warning[sizeof (message)] \ | ||
55 | __attribute__ ((__unused__, \ | ||
56 | __section__ (".gnu.warning"), \ | ||
57 | __aligned__ (1))) \ | ||
58 | = message "\n"; \ | ||
59 | (void)0; \ | ||
60 | }) | ||
61 | # else | ||
62 | # define GL_LINK_WARNING(message) ((void) 0) | ||
63 | # endif | ||
64 | #endif | ||
65 | |||
66 | |||
67 | /* Some systems do not define EXIT_*, despite otherwise supporting C89. */ | ||
68 | #ifndef EXIT_SUCCESS | ||
69 | # define EXIT_SUCCESS 0 | ||
70 | #endif | ||
71 | /* Tandem/NSK and other platforms that define EXIT_FAILURE as -1 interfere | ||
72 | with proper operation of xargs. */ | ||
73 | #ifndef EXIT_FAILURE | ||
74 | # define EXIT_FAILURE 1 | ||
75 | #elif EXIT_FAILURE != 1 | ||
76 | # undef EXIT_FAILURE | ||
77 | # define EXIT_FAILURE 1 | ||
78 | #endif | ||
79 | |||
80 | |||
81 | #ifdef __cplusplus | ||
82 | extern "C" { | ||
83 | #endif | ||
84 | |||
85 | |||
86 | #if 1 | ||
87 | # if !1 | ||
88 | # undef malloc | ||
89 | # define malloc rpl_malloc | ||
90 | extern void * malloc (size_t size); | ||
91 | # endif | ||
92 | #elif defined GNULIB_POSIXCHECK | ||
93 | # undef malloc | ||
94 | # define malloc(s) \ | ||
95 | (GL_LINK_WARNING ("malloc is not POSIX compliant everywhere - " \ | ||
96 | "use gnulib module malloc-posix for portability"), \ | ||
97 | malloc (s)) | ||
98 | #endif | ||
99 | |||
100 | |||
101 | #if 0 | ||
102 | # if !1 | ||
103 | # undef realloc | ||
104 | # define realloc rpl_realloc | ||
105 | extern void * realloc (void *ptr, size_t size); | ||
106 | # endif | ||
107 | #elif defined GNULIB_POSIXCHECK | ||
108 | # undef realloc | ||
109 | # define realloc(p,s) \ | ||
110 | (GL_LINK_WARNING ("realloc is not POSIX compliant everywhere - " \ | ||
111 | "use gnulib module realloc-posix for portability"), \ | ||
112 | realloc (p, s)) | ||
113 | #endif | ||
114 | |||
115 | |||
116 | #if 0 | ||
117 | # if !1 | ||
118 | # undef calloc | ||
119 | # define calloc rpl_calloc | ||
120 | extern void * calloc (size_t nmemb, size_t size); | ||
121 | # endif | ||
122 | #elif defined GNULIB_POSIXCHECK | ||
123 | # undef calloc | ||
124 | # define calloc(n,s) \ | ||
125 | (GL_LINK_WARNING ("calloc is not POSIX compliant everywhere - " \ | ||
126 | "use gnulib module calloc-posix for portability"), \ | ||
127 | calloc (n, s)) | ||
128 | #endif | ||
129 | |||
130 | |||
131 | #if 0 | ||
132 | /* Assuming *OPTIONP is a comma separated list of elements of the form | ||
133 | "token" or "token=value", getsubopt parses the first of these elements. | ||
134 | If the first element refers to a "token" that is member of the given | ||
135 | NULL-terminated array of tokens: | ||
136 | - It replaces the comma with a NUL byte, updates *OPTIONP to point past | ||
137 | the first option and the comma, sets *VALUEP to the value of the | ||
138 | element (or NULL if it doesn't contain an "=" sign), | ||
139 | - It returns the index of the "token" in the given array of tokens. | ||
140 | Otherwise it returns -1, and *OPTIONP and *VALUEP are undefined. | ||
141 | For more details see the POSIX:2001 specification. | ||
142 | http://www.opengroup.org/susv3xsh/getsubopt.html */ | ||
143 | # if !1 | ||
144 | extern int getsubopt (char **optionp, char *const *tokens, char **valuep); | ||
145 | # endif | ||
146 | #elif defined GNULIB_POSIXCHECK | ||
147 | # undef getsubopt | ||
148 | # define getsubopt(o,t,v) \ | ||
149 | (GL_LINK_WARNING ("getsubopt is unportable - " \ | ||
150 | "use gnulib module getsubopt for portability"), \ | ||
151 | getsubopt (o, t, v)) | ||
152 | #endif | ||
153 | |||
154 | |||
155 | #if 0 | ||
156 | # if !1 | ||
157 | /* Create a unique temporary directory from TEMPLATE. | ||
158 | The last six characters of TEMPLATE must be "XXXXXX"; | ||
159 | they are replaced with a string that makes the directory name unique. | ||
160 | Returns TEMPLATE, or a null pointer if it cannot get a unique name. | ||
161 | The directory is created mode 700. */ | ||
162 | extern char * mkdtemp (char * /*template*/); | ||
163 | # endif | ||
164 | #elif defined GNULIB_POSIXCHECK | ||
165 | # undef mkdtemp | ||
166 | # define mkdtemp(t) \ | ||
167 | (GL_LINK_WARNING ("mkdtemp is unportable - " \ | ||
168 | "use gnulib module mkdtemp for portability"), \ | ||
169 | mkdtemp (t)) | ||
170 | #endif | ||
171 | |||
172 | |||
173 | #if 0 | ||
174 | # if 0 | ||
175 | /* Create a unique temporary file from TEMPLATE. | ||
176 | The last six characters of TEMPLATE must be "XXXXXX"; | ||
177 | they are replaced with a string that makes the file name unique. | ||
178 | The file is then created, ensuring it didn't exist before. | ||
179 | The file is created read-write (mask at least 0600 & ~umask), but it may be | ||
180 | world-readable and world-writable (mask 0666 & ~umask), depending on the | ||
181 | implementation. | ||
182 | Returns the open file descriptor if successful, otherwise -1 and errno | ||
183 | set. */ | ||
184 | # define mkstemp rpl_mkstemp | ||
185 | extern int mkstemp (char * /*template*/); | ||
186 | # else | ||
187 | /* On MacOS X 10.3, only <unistd.h> declares mkstemp. */ | ||
188 | # include <unistd.h> | ||
189 | # endif | ||
190 | #elif defined GNULIB_POSIXCHECK | ||
191 | # undef mkstemp | ||
192 | # define mkstemp(t) \ | ||
193 | (GL_LINK_WARNING ("mkstemp is unportable - " \ | ||
194 | "use gnulib module mkstemp for portability"), \ | ||
195 | mkstemp (t)) | ||
196 | #endif | ||
197 | |||
198 | |||
199 | #if 0 | ||
200 | # if 0 | ||
201 | # undef putenv | ||
202 | # define putenv rpl_putenv | ||
203 | extern int putenv (char *string); | ||
204 | # endif | ||
205 | #endif | ||
206 | |||
207 | |||
208 | #if 0 | ||
209 | # if !1 | ||
210 | /* Set NAME to VALUE in the environment. | ||
211 | If REPLACE is nonzero, overwrite an existing value. */ | ||
212 | extern int setenv (const char *name, const char *value, int replace); | ||
213 | # endif | ||
214 | #endif | ||
215 | |||
216 | |||
217 | #if 0 | ||
218 | # if 1 | ||
219 | # if 0 | ||
220 | /* On some systems, unsetenv() returns void. | ||
221 | This is the case for MacOS X 10.3, FreeBSD 4.8, NetBSD 1.6, OpenBSD 3.4. */ | ||
222 | # define unsetenv(name) ((unsetenv)(name), 0) | ||
223 | # endif | ||
224 | # else | ||
225 | /* Remove the variable NAME from the environment. */ | ||
226 | extern int unsetenv (const char *name); | ||
227 | # endif | ||
228 | #endif | ||
229 | |||
230 | |||
231 | #ifdef __cplusplus | ||
232 | } | ||
233 | #endif | ||
234 | |||
235 | #endif /* _GL_STDLIB_H */ | ||
236 | #endif /* _GL_STDLIB_H */ | ||
237 | #endif | ||
diff --git a/gl/string.h b/gl/string.h deleted file mode 100644 index e5bcef55..00000000 --- a/gl/string.h +++ /dev/null | |||
@@ -1,598 +0,0 @@ | |||
1 | /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ | ||
2 | /* A GNU-like <string.h>. | ||
3 | |||
4 | Copyright (C) 1995-1996, 2001-2008 Free Software Foundation, Inc. | ||
5 | |||
6 | This program is free software; you can redistribute it and/or modify | ||
7 | it under the terms of the GNU General Public License as published by | ||
8 | the Free Software Foundation; either version 3, or (at your option) | ||
9 | any later version. | ||
10 | |||
11 | This program is distributed in the hope that it will be useful, | ||
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | GNU General Public License for more details. | ||
15 | |||
16 | You should have received a copy of the GNU General Public License | ||
17 | along with this program; if not, write to the Free Software Foundation, | ||
18 | Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ | ||
19 | |||
20 | #ifndef _GL_STRING_H | ||
21 | |||
22 | /* The include_next requires a split double-inclusion guard. */ | ||
23 | #include_next <string.h> | ||
24 | |||
25 | #ifndef _GL_STRING_H | ||
26 | #define _GL_STRING_H | ||
27 | |||
28 | |||
29 | #ifndef __attribute__ | ||
30 | /* This feature is available in gcc versions 2.5 and later. */ | ||
31 | # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) | ||
32 | # define __attribute__(Spec) /* empty */ | ||
33 | # endif | ||
34 | /* The attribute __pure__ was added in gcc 2.96. */ | ||
35 | # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 96) | ||
36 | # define __pure__ /* empty */ | ||
37 | # endif | ||
38 | #endif | ||
39 | |||
40 | |||
41 | /* The definition of GL_LINK_WARNING is copied here. */ | ||
42 | /* GL_LINK_WARNING("literal string") arranges to emit the literal string as | ||
43 | a linker warning on most glibc systems. | ||
44 | We use a linker warning rather than a preprocessor warning, because | ||
45 | #warning cannot be used inside macros. */ | ||
46 | #ifndef GL_LINK_WARNING | ||
47 | /* This works on platforms with GNU ld and ELF object format. | ||
48 | Testing __GLIBC__ is sufficient for asserting that GNU ld is in use. | ||
49 | Testing __ELF__ guarantees the ELF object format. | ||
50 | Testing __GNUC__ is necessary for the compound expression syntax. */ | ||
51 | # if defined __GLIBC__ && defined __ELF__ && defined __GNUC__ | ||
52 | # define GL_LINK_WARNING(message) \ | ||
53 | GL_LINK_WARNING1 (__FILE__, __LINE__, message) | ||
54 | # define GL_LINK_WARNING1(file, line, message) \ | ||
55 | GL_LINK_WARNING2 (file, line, message) /* macroexpand file and line */ | ||
56 | # define GL_LINK_WARNING2(file, line, message) \ | ||
57 | GL_LINK_WARNING3 (file ":" #line ": warning: " message) | ||
58 | # define GL_LINK_WARNING3(message) \ | ||
59 | ({ static const char warning[sizeof (message)] \ | ||
60 | __attribute__ ((__unused__, \ | ||
61 | __section__ (".gnu.warning"), \ | ||
62 | __aligned__ (1))) \ | ||
63 | = message "\n"; \ | ||
64 | (void)0; \ | ||
65 | }) | ||
66 | # else | ||
67 | # define GL_LINK_WARNING(message) ((void) 0) | ||
68 | # endif | ||
69 | #endif | ||
70 | |||
71 | |||
72 | #ifdef __cplusplus | ||
73 | extern "C" { | ||
74 | #endif | ||
75 | |||
76 | |||
77 | /* Return the first occurrence of NEEDLE in HAYSTACK. */ | ||
78 | #if 0 | ||
79 | # if 0 | ||
80 | # define memmem rpl_memmem | ||
81 | # endif | ||
82 | # if ! 1 || 0 | ||
83 | extern void *memmem (void const *__haystack, size_t __haystack_len, | ||
84 | void const *__needle, size_t __needle_len) | ||
85 | __attribute__ ((__pure__)); | ||
86 | # endif | ||
87 | #elif defined GNULIB_POSIXCHECK | ||
88 | # undef memmem | ||
89 | # define memmem(a,al,b,bl) \ | ||
90 | (GL_LINK_WARNING ("memmem is unportable and often quadratic - " \ | ||
91 | "use gnulib module memmem-simple for portability, " \ | ||
92 | "and module memmem for speed" ), \ | ||
93 | memmem (a, al, b, bl)) | ||
94 | #endif | ||
95 | |||
96 | /* Copy N bytes of SRC to DEST, return pointer to bytes after the | ||
97 | last written byte. */ | ||
98 | #if 0 | ||
99 | # if ! 1 | ||
100 | extern void *mempcpy (void *restrict __dest, void const *restrict __src, | ||
101 | size_t __n); | ||
102 | # endif | ||
103 | #elif defined GNULIB_POSIXCHECK | ||
104 | # undef mempcpy | ||
105 | # define mempcpy(a,b,n) \ | ||
106 | (GL_LINK_WARNING ("mempcpy is unportable - " \ | ||
107 | "use gnulib module mempcpy for portability"), \ | ||
108 | mempcpy (a, b, n)) | ||
109 | #endif | ||
110 | |||
111 | /* Search backwards through a block for a byte (specified as an int). */ | ||
112 | #if 0 | ||
113 | # if ! 1 | ||
114 | extern void *memrchr (void const *, int, size_t) | ||
115 | __attribute__ ((__pure__)); | ||
116 | # endif | ||
117 | #elif defined GNULIB_POSIXCHECK | ||
118 | # undef memrchr | ||
119 | # define memrchr(a,b,c) \ | ||
120 | (GL_LINK_WARNING ("memrchr is unportable - " \ | ||
121 | "use gnulib module memrchr for portability"), \ | ||
122 | memrchr (a, b, c)) | ||
123 | #endif | ||
124 | |||
125 | /* Copy SRC to DST, returning the address of the terminating '\0' in DST. */ | ||
126 | #if 0 | ||
127 | # if ! 1 | ||
128 | extern char *stpcpy (char *restrict __dst, char const *restrict __src); | ||
129 | # endif | ||
130 | #elif defined GNULIB_POSIXCHECK | ||
131 | # undef stpcpy | ||
132 | # define stpcpy(a,b) \ | ||
133 | (GL_LINK_WARNING ("stpcpy is unportable - " \ | ||
134 | "use gnulib module stpcpy for portability"), \ | ||
135 | stpcpy (a, b)) | ||
136 | #endif | ||
137 | |||
138 | /* Copy no more than N bytes of SRC to DST, returning a pointer past the | ||
139 | last non-NUL byte written into DST. */ | ||
140 | #if 0 | ||
141 | # if ! 1 | ||
142 | # define stpncpy gnu_stpncpy | ||
143 | extern char *stpncpy (char *restrict __dst, char const *restrict __src, | ||
144 | size_t __n); | ||
145 | # endif | ||
146 | #elif defined GNULIB_POSIXCHECK | ||
147 | # undef stpncpy | ||
148 | # define stpncpy(a,b,n) \ | ||
149 | (GL_LINK_WARNING ("stpncpy is unportable - " \ | ||
150 | "use gnulib module stpncpy for portability"), \ | ||
151 | stpncpy (a, b, n)) | ||
152 | #endif | ||
153 | |||
154 | #if defined GNULIB_POSIXCHECK | ||
155 | /* strchr() does not work with multibyte strings if the locale encoding is | ||
156 | GB18030 and the character to be searched is a digit. */ | ||
157 | # undef strchr | ||
158 | # define strchr(s,c) \ | ||
159 | (GL_LINK_WARNING ("strchr cannot work correctly on character strings " \ | ||
160 | "in some multibyte locales - " \ | ||
161 | "use mbschr if you care about internationalization"), \ | ||
162 | strchr (s, c)) | ||
163 | #endif | ||
164 | |||
165 | /* Find the first occurrence of C in S or the final NUL byte. */ | ||
166 | #if 0 | ||
167 | # if ! 1 | ||
168 | extern char *strchrnul (char const *__s, int __c_in) | ||
169 | __attribute__ ((__pure__)); | ||
170 | # endif | ||
171 | #elif defined GNULIB_POSIXCHECK | ||
172 | # undef strchrnul | ||
173 | # define strchrnul(a,b) \ | ||
174 | (GL_LINK_WARNING ("strchrnul is unportable - " \ | ||
175 | "use gnulib module strchrnul for portability"), \ | ||
176 | strchrnul (a, b)) | ||
177 | #endif | ||
178 | |||
179 | /* Duplicate S, returning an identical malloc'd string. */ | ||
180 | #if 1 | ||
181 | # if ! 1 && ! defined strdup | ||
182 | extern char *strdup (char const *__s); | ||
183 | # endif | ||
184 | #elif defined GNULIB_POSIXCHECK | ||
185 | # undef strdup | ||
186 | # define strdup(a) \ | ||
187 | (GL_LINK_WARNING ("strdup is unportable - " \ | ||
188 | "use gnulib module strdup for portability"), \ | ||
189 | strdup (a)) | ||
190 | #endif | ||
191 | |||
192 | /* Return a newly allocated copy of at most N bytes of STRING. */ | ||
193 | #if 1 | ||
194 | # if ! 1 | ||
195 | # undef strndup | ||
196 | # define strndup rpl_strndup | ||
197 | # endif | ||
198 | # if ! 1 || ! 1 | ||
199 | extern char *strndup (char const *__string, size_t __n); | ||
200 | # endif | ||
201 | #elif defined GNULIB_POSIXCHECK | ||
202 | # undef strndup | ||
203 | # define strndup(a,n) \ | ||
204 | (GL_LINK_WARNING ("strndup is unportable - " \ | ||
205 | "use gnulib module strndup for portability"), \ | ||
206 | strndup (a, n)) | ||
207 | #endif | ||
208 | |||
209 | /* Find the length (number of bytes) of STRING, but scan at most | ||
210 | MAXLEN bytes. If no '\0' terminator is found in that many bytes, | ||
211 | return MAXLEN. */ | ||
212 | #if 1 | ||
213 | # if ! 1 | ||
214 | extern size_t strnlen (char const *__string, size_t __maxlen) | ||
215 | __attribute__ ((__pure__)); | ||
216 | # endif | ||
217 | #elif defined GNULIB_POSIXCHECK | ||
218 | # undef strnlen | ||
219 | # define strnlen(a,n) \ | ||
220 | (GL_LINK_WARNING ("strnlen is unportable - " \ | ||
221 | "use gnulib module strnlen for portability"), \ | ||
222 | strnlen (a, n)) | ||
223 | #endif | ||
224 | |||
225 | #if defined GNULIB_POSIXCHECK | ||
226 | /* strcspn() assumes the second argument is a list of single-byte characters. | ||
227 | Even in this simple case, it does not work with multibyte strings if the | ||
228 | locale encoding is GB18030 and one of the characters to be searched is a | ||
229 | digit. */ | ||
230 | # undef strcspn | ||
231 | # define strcspn(s,a) \ | ||
232 | (GL_LINK_WARNING ("strcspn cannot work correctly on character strings " \ | ||
233 | "in multibyte locales - " \ | ||
234 | "use mbscspn if you care about internationalization"), \ | ||
235 | strcspn (s, a)) | ||
236 | #endif | ||
237 | |||
238 | /* Find the first occurrence in S of any character in ACCEPT. */ | ||
239 | #if 0 | ||
240 | # if ! 1 | ||
241 | extern char *strpbrk (char const *__s, char const *__accept) | ||
242 | __attribute__ ((__pure__)); | ||
243 | # endif | ||
244 | # if defined GNULIB_POSIXCHECK | ||
245 | /* strpbrk() assumes the second argument is a list of single-byte characters. | ||
246 | Even in this simple case, it does not work with multibyte strings if the | ||
247 | locale encoding is GB18030 and one of the characters to be searched is a | ||
248 | digit. */ | ||
249 | # undef strpbrk | ||
250 | # define strpbrk(s,a) \ | ||
251 | (GL_LINK_WARNING ("strpbrk cannot work correctly on character strings " \ | ||
252 | "in multibyte locales - " \ | ||
253 | "use mbspbrk if you care about internationalization"), \ | ||
254 | strpbrk (s, a)) | ||
255 | # endif | ||
256 | #elif defined GNULIB_POSIXCHECK | ||
257 | # undef strpbrk | ||
258 | # define strpbrk(s,a) \ | ||
259 | (GL_LINK_WARNING ("strpbrk is unportable - " \ | ||
260 | "use gnulib module strpbrk for portability"), \ | ||
261 | strpbrk (s, a)) | ||
262 | #endif | ||
263 | |||
264 | #if defined GNULIB_POSIXCHECK | ||
265 | /* strspn() assumes the second argument is a list of single-byte characters. | ||
266 | Even in this simple case, it cannot work with multibyte strings. */ | ||
267 | # undef strspn | ||
268 | # define strspn(s,a) \ | ||
269 | (GL_LINK_WARNING ("strspn cannot work correctly on character strings " \ | ||
270 | "in multibyte locales - " \ | ||
271 | "use mbsspn if you care about internationalization"), \ | ||
272 | strspn (s, a)) | ||
273 | #endif | ||
274 | |||
275 | #if defined GNULIB_POSIXCHECK | ||
276 | /* strrchr() does not work with multibyte strings if the locale encoding is | ||
277 | GB18030 and the character to be searched is a digit. */ | ||
278 | # undef strrchr | ||
279 | # define strrchr(s,c) \ | ||
280 | (GL_LINK_WARNING ("strrchr cannot work correctly on character strings " \ | ||
281 | "in some multibyte locales - " \ | ||
282 | "use mbsrchr if you care about internationalization"), \ | ||
283 | strrchr (s, c)) | ||
284 | #endif | ||
285 | |||
286 | /* Search the next delimiter (char listed in DELIM) starting at *STRINGP. | ||
287 | If one is found, overwrite it with a NUL, and advance *STRINGP | ||
288 | to point to the next char after it. Otherwise, set *STRINGP to NULL. | ||
289 | If *STRINGP was already NULL, nothing happens. | ||
290 | Return the old value of *STRINGP. | ||
291 | |||
292 | This is a variant of strtok() that is multithread-safe and supports | ||
293 | empty fields. | ||
294 | |||
295 | Caveat: It modifies the original string. | ||
296 | Caveat: These functions cannot be used on constant strings. | ||
297 | Caveat: The identity of the delimiting character is lost. | ||
298 | Caveat: It doesn't work with multibyte strings unless all of the delimiter | ||
299 | characters are ASCII characters < 0x30. | ||
300 | |||
301 | See also strtok_r(). */ | ||
302 | #if 0 | ||
303 | # if ! 1 | ||
304 | extern char *strsep (char **restrict __stringp, char const *restrict __delim); | ||
305 | # endif | ||
306 | # if defined GNULIB_POSIXCHECK | ||
307 | # undef strsep | ||
308 | # define strsep(s,d) \ | ||
309 | (GL_LINK_WARNING ("strsep cannot work correctly on character strings " \ | ||
310 | "in multibyte locales - " \ | ||
311 | "use mbssep if you care about internationalization"), \ | ||
312 | strsep (s, d)) | ||
313 | # endif | ||
314 | #elif defined GNULIB_POSIXCHECK | ||
315 | # undef strsep | ||
316 | # define strsep(s,d) \ | ||
317 | (GL_LINK_WARNING ("strsep is unportable - " \ | ||
318 | "use gnulib module strsep for portability"), \ | ||
319 | strsep (s, d)) | ||
320 | #endif | ||
321 | |||
322 | #if 0 | ||
323 | # if 0 | ||
324 | # define strstr rpl_strstr | ||
325 | char *strstr (const char *haystack, const char *needle) | ||
326 | __attribute__ ((__pure__)); | ||
327 | # endif | ||
328 | #elif defined GNULIB_POSIXCHECK | ||
329 | /* strstr() does not work with multibyte strings if the locale encoding is | ||
330 | different from UTF-8: | ||
331 | POSIX says that it operates on "strings", and "string" in POSIX is defined | ||
332 | as a sequence of bytes, not of characters. */ | ||
333 | # undef strstr | ||
334 | # define strstr(a,b) \ | ||
335 | (GL_LINK_WARNING ("strstr is quadratic on many systems, and cannot " \ | ||
336 | "work correctly on character strings in most " \ | ||
337 | "multibyte locales - " \ | ||
338 | "use mbsstr if you care about internationalization, " \ | ||
339 | "or use strstr if you care about speed"), \ | ||
340 | strstr (a, b)) | ||
341 | #endif | ||
342 | |||
343 | /* Find the first occurrence of NEEDLE in HAYSTACK, using case-insensitive | ||
344 | comparison. */ | ||
345 | #if 0 | ||
346 | # if 0 | ||
347 | # define strcasestr rpl_strcasestr | ||
348 | # endif | ||
349 | # if ! 1 || 0 | ||
350 | extern char *strcasestr (const char *haystack, const char *needle) | ||
351 | __attribute__ ((__pure__)); | ||
352 | # endif | ||
353 | #elif defined GNULIB_POSIXCHECK | ||
354 | /* strcasestr() does not work with multibyte strings: | ||
355 | It is a glibc extension, and glibc implements it only for unibyte | ||
356 | locales. */ | ||
357 | # undef strcasestr | ||
358 | # define strcasestr(a,b) \ | ||
359 | (GL_LINK_WARNING ("strcasestr does work correctly on character strings " \ | ||
360 | "in multibyte locales - " \ | ||
361 | "use mbscasestr if you care about " \ | ||
362 | "internationalization, or use c-strcasestr if you want " \ | ||
363 | "a locale independent function"), \ | ||
364 | strcasestr (a, b)) | ||
365 | #endif | ||
366 | |||
367 | /* Parse S into tokens separated by characters in DELIM. | ||
368 | If S is NULL, the saved pointer in SAVE_PTR is used as | ||
369 | the next starting point. For example: | ||
370 | char s[] = "-abc-=-def"; | ||
371 | char *sp; | ||
372 | x = strtok_r(s, "-", &sp); // x = "abc", sp = "=-def" | ||
373 | x = strtok_r(NULL, "-=", &sp); // x = "def", sp = NULL | ||
374 | x = strtok_r(NULL, "=", &sp); // x = NULL | ||
375 | // s = "abc\0-def\0" | ||
376 | |||
377 | This is a variant of strtok() that is multithread-safe. | ||
378 | |||
379 | For the POSIX documentation for this function, see: | ||
380 | http://www.opengroup.org/susv3xsh/strtok.html | ||
381 | |||
382 | Caveat: It modifies the original string. | ||
383 | Caveat: These functions cannot be used on constant strings. | ||
384 | Caveat: The identity of the delimiting character is lost. | ||
385 | Caveat: It doesn't work with multibyte strings unless all of the delimiter | ||
386 | characters are ASCII characters < 0x30. | ||
387 | |||
388 | See also strsep(). */ | ||
389 | #if 0 | ||
390 | # if ! 1 | ||
391 | extern char *strtok_r (char *restrict s, char const *restrict delim, | ||
392 | char **restrict save_ptr); | ||
393 | # endif | ||
394 | # if defined GNULIB_POSIXCHECK | ||
395 | # undef strtok_r | ||
396 | # define strtok_r(s,d,p) \ | ||
397 | (GL_LINK_WARNING ("strtok_r cannot work correctly on character strings " \ | ||
398 | "in multibyte locales - " \ | ||
399 | "use mbstok_r if you care about internationalization"), \ | ||
400 | strtok_r (s, d, p)) | ||
401 | # endif | ||
402 | #elif defined GNULIB_POSIXCHECK | ||
403 | # undef strtok_r | ||
404 | # define strtok_r(s,d,p) \ | ||
405 | (GL_LINK_WARNING ("strtok_r is unportable - " \ | ||
406 | "use gnulib module strtok_r for portability"), \ | ||
407 | strtok_r (s, d, p)) | ||
408 | #endif | ||
409 | |||
410 | |||
411 | /* The following functions are not specified by POSIX. They are gnulib | ||
412 | extensions. */ | ||
413 | |||
414 | #if 0 | ||
415 | /* Return the number of multibyte characters in the character string STRING. | ||
416 | This considers multibyte characters, unlike strlen, which counts bytes. */ | ||
417 | extern size_t mbslen (const char *string); | ||
418 | #endif | ||
419 | |||
420 | #if 0 | ||
421 | /* Return the number of multibyte characters in the character string starting | ||
422 | at STRING and ending at STRING + LEN. */ | ||
423 | extern size_t mbsnlen (const char *string, size_t len); | ||
424 | #endif | ||
425 | |||
426 | #if 0 | ||
427 | /* Locate the first single-byte character C in the character string STRING, | ||
428 | and return a pointer to it. Return NULL if C is not found in STRING. | ||
429 | Unlike strchr(), this function works correctly in multibyte locales with | ||
430 | encodings such as GB18030. */ | ||
431 | # define mbschr rpl_mbschr /* avoid collision with HP-UX function */ | ||
432 | extern char * mbschr (const char *string, int c); | ||
433 | #endif | ||
434 | |||
435 | #if 0 | ||
436 | /* Locate the last single-byte character C in the character string STRING, | ||
437 | and return a pointer to it. Return NULL if C is not found in STRING. | ||
438 | Unlike strrchr(), this function works correctly in multibyte locales with | ||
439 | encodings such as GB18030. */ | ||
440 | # define mbsrchr rpl_mbsrchr /* avoid collision with HP-UX function */ | ||
441 | extern char * mbsrchr (const char *string, int c); | ||
442 | #endif | ||
443 | |||
444 | #if 0 | ||
445 | /* Find the first occurrence of the character string NEEDLE in the character | ||
446 | string HAYSTACK. Return NULL if NEEDLE is not found in HAYSTACK. | ||
447 | Unlike strstr(), this function works correctly in multibyte locales with | ||
448 | encodings different from UTF-8. */ | ||
449 | extern char * mbsstr (const char *haystack, const char *needle); | ||
450 | #endif | ||
451 | |||
452 | #if 0 | ||
453 | /* Compare the character strings S1 and S2, ignoring case, returning less than, | ||
454 | equal to or greater than zero if S1 is lexicographically less than, equal to | ||
455 | or greater than S2. | ||
456 | Note: This function may, in multibyte locales, return 0 for strings of | ||
457 | different lengths! | ||
458 | Unlike strcasecmp(), this function works correctly in multibyte locales. */ | ||
459 | extern int mbscasecmp (const char *s1, const char *s2); | ||
460 | #endif | ||
461 | |||
462 | #if 0 | ||
463 | /* Compare the initial segment of the character string S1 consisting of at most | ||
464 | N characters with the initial segment of the character string S2 consisting | ||
465 | of at most N characters, ignoring case, returning less than, equal to or | ||
466 | greater than zero if the initial segment of S1 is lexicographically less | ||
467 | than, equal to or greater than the initial segment of S2. | ||
468 | Note: This function may, in multibyte locales, return 0 for initial segments | ||
469 | of different lengths! | ||
470 | Unlike strncasecmp(), this function works correctly in multibyte locales. | ||
471 | But beware that N is not a byte count but a character count! */ | ||
472 | extern int mbsncasecmp (const char *s1, const char *s2, size_t n); | ||
473 | #endif | ||
474 | |||
475 | #if 0 | ||
476 | /* Compare the initial segment of the character string STRING consisting of | ||
477 | at most mbslen (PREFIX) characters with the character string PREFIX, | ||
478 | ignoring case, returning less than, equal to or greater than zero if this | ||
479 | initial segment is lexicographically less than, equal to or greater than | ||
480 | PREFIX. | ||
481 | Note: This function may, in multibyte locales, return 0 if STRING is of | ||
482 | smaller length than PREFIX! | ||
483 | Unlike strncasecmp(), this function works correctly in multibyte | ||
484 | locales. */ | ||
485 | extern char * mbspcasecmp (const char *string, const char *prefix); | ||
486 | #endif | ||
487 | |||
488 | #if 0 | ||
489 | /* Find the first occurrence of the character string NEEDLE in the character | ||
490 | string HAYSTACK, using case-insensitive comparison. | ||
491 | Note: This function may, in multibyte locales, return success even if | ||
492 | strlen (haystack) < strlen (needle) ! | ||
493 | Unlike strcasestr(), this function works correctly in multibyte locales. */ | ||
494 | extern char * mbscasestr (const char *haystack, const char *needle); | ||
495 | #endif | ||
496 | |||
497 | #if 0 | ||
498 | /* Find the first occurrence in the character string STRING of any character | ||
499 | in the character string ACCEPT. Return the number of bytes from the | ||
500 | beginning of the string to this occurrence, or to the end of the string | ||
501 | if none exists. | ||
502 | Unlike strcspn(), this function works correctly in multibyte locales. */ | ||
503 | extern size_t mbscspn (const char *string, const char *accept); | ||
504 | #endif | ||
505 | |||
506 | #if 0 | ||
507 | /* Find the first occurrence in the character string STRING of any character | ||
508 | in the character string ACCEPT. Return the pointer to it, or NULL if none | ||
509 | exists. | ||
510 | Unlike strpbrk(), this function works correctly in multibyte locales. */ | ||
511 | # define mbspbrk rpl_mbspbrk /* avoid collision with HP-UX function */ | ||
512 | extern char * mbspbrk (const char *string, const char *accept); | ||
513 | #endif | ||
514 | |||
515 | #if 0 | ||
516 | /* Find the first occurrence in the character string STRING of any character | ||
517 | not in the character string REJECT. Return the number of bytes from the | ||
518 | beginning of the string to this occurrence, or to the end of the string | ||
519 | if none exists. | ||
520 | Unlike strspn(), this function works correctly in multibyte locales. */ | ||
521 | extern size_t mbsspn (const char *string, const char *reject); | ||
522 | #endif | ||
523 | |||
524 | #if 0 | ||
525 | /* Search the next delimiter (multibyte character listed in the character | ||
526 | string DELIM) starting at the character string *STRINGP. | ||
527 | If one is found, overwrite it with a NUL, and advance *STRINGP to point | ||
528 | to the next multibyte character after it. Otherwise, set *STRINGP to NULL. | ||
529 | If *STRINGP was already NULL, nothing happens. | ||
530 | Return the old value of *STRINGP. | ||
531 | |||
532 | This is a variant of mbstok_r() that supports empty fields. | ||
533 | |||
534 | Caveat: It modifies the original string. | ||
535 | Caveat: These functions cannot be used on constant strings. | ||
536 | Caveat: The identity of the delimiting character is lost. | ||
537 | |||
538 | See also mbstok_r(). */ | ||
539 | extern char * mbssep (char **stringp, const char *delim); | ||
540 | #endif | ||
541 | |||
542 | #if 0 | ||
543 | /* Parse the character string STRING into tokens separated by characters in | ||
544 | the character string DELIM. | ||
545 | If STRING is NULL, the saved pointer in SAVE_PTR is used as | ||
546 | the next starting point. For example: | ||
547 | char s[] = "-abc-=-def"; | ||
548 | char *sp; | ||
549 | x = mbstok_r(s, "-", &sp); // x = "abc", sp = "=-def" | ||
550 | x = mbstok_r(NULL, "-=", &sp); // x = "def", sp = NULL | ||
551 | x = mbstok_r(NULL, "=", &sp); // x = NULL | ||
552 | // s = "abc\0-def\0" | ||
553 | |||
554 | Caveat: It modifies the original string. | ||
555 | Caveat: These functions cannot be used on constant strings. | ||
556 | Caveat: The identity of the delimiting character is lost. | ||
557 | |||
558 | See also mbssep(). */ | ||
559 | extern char * mbstok_r (char *string, const char *delim, char **save_ptr); | ||
560 | #endif | ||
561 | |||
562 | /* Map any int, typically from errno, into an error message. */ | ||
563 | #if 1 | ||
564 | # if 0 | ||
565 | # undef strerror | ||
566 | # define strerror rpl_strerror | ||
567 | extern char *strerror (int); | ||
568 | # endif | ||
569 | #elif defined GNULIB_POSIXCHECK | ||
570 | # undef strerror | ||
571 | # define strerror(e) \ | ||
572 | (GL_LINK_WARNING ("strerror is unportable - " \ | ||
573 | "use gnulib module strerror to guarantee non-NULL result"), \ | ||
574 | strerror (e)) | ||
575 | #endif | ||
576 | |||
577 | #if 0 | ||
578 | # if 0 | ||
579 | # define strsignal rpl_strsignal | ||
580 | # endif | ||
581 | # if ! 1 || 0 | ||
582 | extern char *strsignal (int __sig); | ||
583 | # endif | ||
584 | #elif defined GNULIB_POSIXCHECK | ||
585 | # undef strsignal | ||
586 | # define strsignal(a) \ | ||
587 | (GL_LINK_WARNING ("strsignal is unportable - " \ | ||
588 | "use gnulib module strsignal for portability"), \ | ||
589 | strsignal (a)) | ||
590 | #endif | ||
591 | |||
592 | |||
593 | #ifdef __cplusplus | ||
594 | } | ||
595 | #endif | ||
596 | |||
597 | #endif /* _GL_STRING_H */ | ||
598 | #endif /* _GL_STRING_H */ | ||
diff --git a/gl/unistd.h b/gl/unistd.h deleted file mode 100644 index e72a5d9a..00000000 --- a/gl/unistd.h +++ /dev/null | |||
@@ -1,321 +0,0 @@ | |||
1 | /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ | ||
2 | /* Substitute for and wrapper around <unistd.h>. | ||
3 | Copyright (C) 2004-2007 Free Software Foundation, Inc. | ||
4 | |||
5 | This program is free software; you can redistribute it and/or modify | ||
6 | it under the terms of the GNU General Public License as published by | ||
7 | the Free Software Foundation; either version 3, or (at your option) | ||
8 | any later version. | ||
9 | |||
10 | This program is distributed in the hope that it will be useful, | ||
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | GNU General Public License for more details. | ||
14 | |||
15 | You should have received a copy of the GNU General Public License | ||
16 | along with this program; if not, write to the Free Software Foundation, | ||
17 | Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ | ||
18 | |||
19 | #ifndef _GL_UNISTD_H | ||
20 | |||
21 | /* The include_next requires a split double-inclusion guard. */ | ||
22 | #if 1 | ||
23 | # include_next <unistd.h> | ||
24 | #endif | ||
25 | |||
26 | #ifndef _GL_UNISTD_H | ||
27 | #define _GL_UNISTD_H | ||
28 | |||
29 | /* mingw doesn't define the SEEK_* macros in <unistd.h>. */ | ||
30 | #if !(defined SEEK_CUR && defined SEEK_END && defined SEEK_SET) | ||
31 | # include <stdio.h> | ||
32 | #endif | ||
33 | |||
34 | /* mingw fails to declare _exit in <unistd.h>. */ | ||
35 | #include <stdlib.h> | ||
36 | |||
37 | /* The definition of GL_LINK_WARNING is copied here. */ | ||
38 | |||
39 | |||
40 | /* Declare overridden functions. */ | ||
41 | |||
42 | #ifdef __cplusplus | ||
43 | extern "C" { | ||
44 | #endif | ||
45 | |||
46 | |||
47 | #if 0 | ||
48 | # if 0 | ||
49 | # ifndef REPLACE_CHOWN | ||
50 | # define REPLACE_CHOWN 1 | ||
51 | # endif | ||
52 | # if REPLACE_CHOWN | ||
53 | /* Change the owner of FILE to UID (if UID is not -1) and the group of FILE | ||
54 | to GID (if GID is not -1). Follow symbolic links. | ||
55 | Return 0 if successful, otherwise -1 and errno set. | ||
56 | See the POSIX:2001 specification | ||
57 | <http://www.opengroup.org/susv3xsh/chown.html>. */ | ||
58 | # define chown rpl_chown | ||
59 | extern int chown (const char *file, uid_t uid, gid_t gid); | ||
60 | # endif | ||
61 | # endif | ||
62 | #elif defined GNULIB_POSIXCHECK | ||
63 | # undef chown | ||
64 | # define chown(f,u,g) \ | ||
65 | (GL_LINK_WARNING ("chown fails to follow symlinks on some systems and " \ | ||
66 | "doesn't treat a uid or gid of -1 on some systems - " \ | ||
67 | "use gnulib module chown for portability"), \ | ||
68 | chown (f, u, g)) | ||
69 | #endif | ||
70 | |||
71 | |||
72 | #if 0 | ||
73 | # if !1 | ||
74 | /* Copy the file descriptor OLDFD into file descriptor NEWFD. Do nothing if | ||
75 | NEWFD = OLDFD, otherwise close NEWFD first if it is open. | ||
76 | Return 0 if successful, otherwise -1 and errno set. | ||
77 | See the POSIX:2001 specification | ||
78 | <http://www.opengroup.org/susv3xsh/dup2.html>. */ | ||
79 | extern int dup2 (int oldfd, int newfd); | ||
80 | # endif | ||
81 | #elif defined GNULIB_POSIXCHECK | ||
82 | # undef dup2 | ||
83 | # define dup2(o,n) \ | ||
84 | (GL_LINK_WARNING ("dup2 is unportable - " \ | ||
85 | "use gnulib module dup2 for portability"), \ | ||
86 | dup2 (o, n)) | ||
87 | #endif | ||
88 | |||
89 | |||
90 | #if 0 | ||
91 | # if 0 | ||
92 | |||
93 | /* Change the process' current working directory to the directory on which | ||
94 | the given file descriptor is open. | ||
95 | Return 0 if successful, otherwise -1 and errno set. | ||
96 | See the POSIX:2001 specification | ||
97 | <http://www.opengroup.org/susv3xsh/fchdir.html>. */ | ||
98 | extern int fchdir (int /*fd*/); | ||
99 | |||
100 | # define close rpl_close | ||
101 | extern int close (int); | ||
102 | # define dup rpl_dup | ||
103 | extern int dup (int); | ||
104 | # define dup2 rpl_dup2 | ||
105 | extern int dup2 (int, int); | ||
106 | |||
107 | # endif | ||
108 | #elif defined GNULIB_POSIXCHECK | ||
109 | # undef fchdir | ||
110 | # define fchdir(f) \ | ||
111 | (GL_LINK_WARNING ("fchdir is unportable - " \ | ||
112 | "use gnulib module fchdir for portability"), \ | ||
113 | fchdir (f)) | ||
114 | #endif | ||
115 | |||
116 | |||
117 | #if 0 | ||
118 | # if !1 | ||
119 | /* Change the size of the file to which FD is opened to become equal to LENGTH. | ||
120 | Return 0 if successful, otherwise -1 and errno set. | ||
121 | See the POSIX:2001 specification | ||
122 | <http://www.opengroup.org/susv3xsh/ftruncate.html>. */ | ||
123 | extern int ftruncate (int fd, off_t length); | ||
124 | # endif | ||
125 | #elif defined GNULIB_POSIXCHECK | ||
126 | # undef ftruncate | ||
127 | # define ftruncate(f,l) \ | ||
128 | (GL_LINK_WARNING ("ftruncate is unportable - " \ | ||
129 | "use gnulib module ftruncate for portability"), \ | ||
130 | ftruncate (f, l)) | ||
131 | #endif | ||
132 | |||
133 | |||
134 | #if 0 | ||
135 | /* Include the headers that might declare getcwd so that they will not | ||
136 | cause confusion if included after this file. */ | ||
137 | # include <stdlib.h> | ||
138 | # if 0 | ||
139 | /* Get the name of the current working directory, and put it in SIZE bytes | ||
140 | of BUF. | ||
141 | Return BUF if successful, or NULL if the directory couldn't be determined | ||
142 | or SIZE was too small. | ||
143 | See the POSIX:2001 specification | ||
144 | <http://www.opengroup.org/susv3xsh/getcwd.html>. | ||
145 | Additionally, the gnulib module 'getcwd' guarantees the following GNU | ||
146 | extension: If BUF is NULL, an array is allocated with 'malloc'; the array | ||
147 | is SIZE bytes long, unless SIZE == 0, in which case it is as big as | ||
148 | necessary. */ | ||
149 | # define getcwd rpl_getcwd | ||
150 | extern char * getcwd (char *buf, size_t size); | ||
151 | # endif | ||
152 | #elif defined GNULIB_POSIXCHECK | ||
153 | # undef getcwd | ||
154 | # define getcwd(b,s) \ | ||
155 | (GL_LINK_WARNING ("getcwd is unportable - " \ | ||
156 | "use gnulib module getcwd for portability"), \ | ||
157 | getcwd (b, s)) | ||
158 | #endif | ||
159 | |||
160 | |||
161 | #if 0 | ||
162 | /* Copies the user's login name to NAME. | ||
163 | The array pointed to by NAME has room for SIZE bytes. | ||
164 | |||
165 | Returns 0 if successful. Upon error, an error number is returned, or -1 in | ||
166 | the case that the login name cannot be found but no specific error is | ||
167 | provided (this case is hopefully rare but is left open by the POSIX spec). | ||
168 | |||
169 | See <http://www.opengroup.org/susv3xsh/getlogin.html>. | ||
170 | */ | ||
171 | # if !1 | ||
172 | # include <stddef.h> | ||
173 | extern int getlogin_r (char *name, size_t size); | ||
174 | # endif | ||
175 | #elif defined GNULIB_POSIXCHECK | ||
176 | # undef getlogin_r | ||
177 | # define getlogin_r(n,s) \ | ||
178 | (GL_LINK_WARNING ("getlogin_r is unportable - " \ | ||
179 | "use gnulib module getlogin_r for portability"), \ | ||
180 | getlogin_r (n, s)) | ||
181 | #endif | ||
182 | |||
183 | |||
184 | #if 0 | ||
185 | # if 0 | ||
186 | # define getpagesize rpl_getpagesize | ||
187 | extern int getpagesize (void); | ||
188 | # elif !1 | ||
189 | /* This is for POSIX systems. */ | ||
190 | # if !defined getpagesize && defined _SC_PAGESIZE | ||
191 | # if ! (defined __VMS && __VMS_VER < 70000000) | ||
192 | # define getpagesize() sysconf (_SC_PAGESIZE) | ||
193 | # endif | ||
194 | # endif | ||
195 | /* This is for older VMS. */ | ||
196 | # if !defined getpagesize && defined __VMS | ||
197 | # ifdef __ALPHA | ||
198 | # define getpagesize() 8192 | ||
199 | # else | ||
200 | # define getpagesize() 512 | ||
201 | # endif | ||
202 | # endif | ||
203 | /* This is for BeOS. */ | ||
204 | # if !defined getpagesize && 0 | ||
205 | # include <OS.h> | ||
206 | # if defined B_PAGE_SIZE | ||
207 | # define getpagesize() B_PAGE_SIZE | ||
208 | # endif | ||
209 | # endif | ||
210 | /* This is for AmigaOS4.0. */ | ||
211 | # if !defined getpagesize && defined __amigaos4__ | ||
212 | # define getpagesize() 2048 | ||
213 | # endif | ||
214 | /* This is for older Unix systems. */ | ||
215 | # if !defined getpagesize && 0 | ||
216 | # include <sys/param.h> | ||
217 | # ifdef EXEC_PAGESIZE | ||
218 | # define getpagesize() EXEC_PAGESIZE | ||
219 | # else | ||
220 | # ifdef NBPG | ||
221 | # ifndef CLSIZE | ||
222 | # define CLSIZE 1 | ||
223 | # endif | ||
224 | # define getpagesize() (NBPG * CLSIZE) | ||
225 | # else | ||
226 | # ifdef NBPC | ||
227 | # define getpagesize() NBPC | ||
228 | # endif | ||
229 | # endif | ||
230 | # endif | ||
231 | # endif | ||
232 | # endif | ||
233 | #elif defined GNULIB_POSIXCHECK | ||
234 | # undef getpagesize | ||
235 | # define getpagesize() \ | ||
236 | (GL_LINK_WARNING ("getpagesize is unportable - " \ | ||
237 | "use gnulib module getpagesize for portability"), \ | ||
238 | getpagesize ()) | ||
239 | #endif | ||
240 | |||
241 | |||
242 | #if 0 | ||
243 | # if 0 | ||
244 | /* Change the owner of FILE to UID (if UID is not -1) and the group of FILE | ||
245 | to GID (if GID is not -1). Do not follow symbolic links. | ||
246 | Return 0 if successful, otherwise -1 and errno set. | ||
247 | See the POSIX:2001 specification | ||
248 | <http://www.opengroup.org/susv3xsh/lchown.html>. */ | ||
249 | # define lchown rpl_lchown | ||
250 | extern int lchown (char const *file, uid_t owner, gid_t group); | ||
251 | # endif | ||
252 | #elif defined GNULIB_POSIXCHECK | ||
253 | # undef lchown | ||
254 | # define lchown(f,u,g) \ | ||
255 | (GL_LINK_WARNING ("lchown is unportable to pre-POSIX.1-2001 " \ | ||
256 | "systems - use gnulib module lchown for portability"), \ | ||
257 | lchown (f, u, g)) | ||
258 | #endif | ||
259 | |||
260 | |||
261 | #if 0 | ||
262 | # if 0 | ||
263 | /* Set the offset of FD relative to SEEK_SET, SEEK_CUR, or SEEK_END. | ||
264 | Return the new offset if successful, otherwise -1 and errno set. | ||
265 | See the POSIX:2001 specification | ||
266 | <http://www.opengroup.org/susv3xsh/lseek.html>. */ | ||
267 | # define lseek rpl_lseek | ||
268 | extern off_t lseek (int fd, off_t offset, int whence); | ||
269 | # endif | ||
270 | #elif defined GNULIB_POSIXCHECK | ||
271 | # undef lseek | ||
272 | # define lseek(f,o,w) \ | ||
273 | (GL_LINK_WARNING ("lseek does not fail with ESPIPE on pipes on some " \ | ||
274 | "systems - use gnulib module lseek for portability"), \ | ||
275 | lseek (f, o, w)) | ||
276 | #endif | ||
277 | |||
278 | |||
279 | #if 0 | ||
280 | /* Read the contents of the symbolic link FILE and place the first BUFSIZE | ||
281 | bytes of it into BUF. Return the number of bytes placed into BUF if | ||
282 | successful, otherwise -1 and errno set. | ||
283 | See the POSIX:2001 specification | ||
284 | <http://www.opengroup.org/susv3xsh/readlink.html>. */ | ||
285 | # if !1 | ||
286 | # include <stddef.h> | ||
287 | extern int readlink (const char *file, char *buf, size_t bufsize); | ||
288 | # endif | ||
289 | #elif defined GNULIB_POSIXCHECK | ||
290 | # undef readlink | ||
291 | # define readlink(f,b,s) \ | ||
292 | (GL_LINK_WARNING ("readlink is unportable - " \ | ||
293 | "use gnulib module readlink for portability"), \ | ||
294 | readlink (f, b, s)) | ||
295 | #endif | ||
296 | |||
297 | |||
298 | #if 0 | ||
299 | /* Pause the execution of the current thread for N seconds. | ||
300 | Returns the number of seconds left to sleep. | ||
301 | See the POSIX:2001 specification | ||
302 | <http://www.opengroup.org/susv3xsh/sleep.html>. */ | ||
303 | # if !1 | ||
304 | extern unsigned int sleep (unsigned int n); | ||
305 | # endif | ||
306 | #elif defined GNULIB_POSIXCHECK | ||
307 | # undef sleep | ||
308 | # define sleep(n) \ | ||
309 | (GL_LINK_WARNING ("sleep is unportable - " \ | ||
310 | "use gnulib module sleep for portability"), \ | ||
311 | sleep (n)) | ||
312 | #endif | ||
313 | |||
314 | |||
315 | #ifdef __cplusplus | ||
316 | } | ||
317 | #endif | ||
318 | |||
319 | |||
320 | #endif /* _GL_UNISTD_H */ | ||
321 | #endif /* _GL_UNISTD_H */ | ||