diff options
Diffstat (limited to 'gl/sys/stat.h')
-rw-r--r-- | gl/sys/stat.h | 1461 |
1 files changed, 1461 insertions, 0 deletions
diff --git a/gl/sys/stat.h b/gl/sys/stat.h new file mode 100644 index 0000000..8120383 --- /dev/null +++ b/gl/sys/stat.h | |||
@@ -0,0 +1,1461 @@ | |||
1 | /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ | ||
2 | /* Provide a more complete sys/stat.h header file. | ||
3 | Copyright (C) 2005-2022 Free Software Foundation, Inc. | ||
4 | |||
5 | This file is free software: you can redistribute it and/or modify | ||
6 | it under the terms of the GNU Lesser General Public License as | ||
7 | published by the Free Software Foundation; either version 2.1 of the | ||
8 | License, or (at your option) any later version. | ||
9 | |||
10 | This file is distributed in the hope that it will be useful, | ||
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | GNU Lesser General Public License for more details. | ||
14 | |||
15 | You should have received a copy of the GNU Lesser General Public License | ||
16 | along with this program. If not, see <https://www.gnu.org/licenses/>. */ | ||
17 | |||
18 | /* Written by Eric Blake, Paul Eggert, and Jim Meyering. */ | ||
19 | |||
20 | /* This file is supposed to be used on platforms where <sys/stat.h> is | ||
21 | incomplete. It is intended to provide definitions and prototypes | ||
22 | needed by an application. Start with what the system provides. */ | ||
23 | |||
24 | #if __GNUC__ >= 3 | ||
25 | #pragma GCC system_header | ||
26 | #endif | ||
27 | |||
28 | |||
29 | #if defined __need_system_sys_stat_h | ||
30 | /* Special invocation convention. */ | ||
31 | |||
32 | #include_next <sys/stat.h> | ||
33 | |||
34 | #else | ||
35 | /* Normal invocation convention. */ | ||
36 | |||
37 | #ifndef _GL_SYS_STAT_H | ||
38 | |||
39 | /* Get nlink_t. | ||
40 | May also define off_t to a 64-bit type on native Windows. */ | ||
41 | #include <sys/types.h> | ||
42 | |||
43 | /* Get struct timespec. */ | ||
44 | #include <time.h> | ||
45 | |||
46 | /* The include_next requires a split double-inclusion guard. */ | ||
47 | #include_next <sys/stat.h> | ||
48 | |||
49 | #ifndef _GL_SYS_STAT_H | ||
50 | #define _GL_SYS_STAT_H | ||
51 | |||
52 | /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ | ||
53 | /* C++ compatible function declaration macros. | ||
54 | Copyright (C) 2010-2022 Free Software Foundation, Inc. | ||
55 | |||
56 | This program is free software: you can redistribute it and/or modify it | ||
57 | under the terms of the GNU Lesser General Public License as published | ||
58 | by the Free Software Foundation; either version 2 of the License, or | ||
59 | (at your option) any later version. | ||
60 | |||
61 | This program is distributed in the hope that it will be useful, | ||
62 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
63 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
64 | Lesser General Public License for more details. | ||
65 | |||
66 | You should have received a copy of the GNU Lesser General Public License | ||
67 | along with this program. If not, see <https://www.gnu.org/licenses/>. */ | ||
68 | |||
69 | #ifndef _GL_CXXDEFS_H | ||
70 | #define _GL_CXXDEFS_H | ||
71 | |||
72 | /* Begin/end the GNULIB_NAMESPACE namespace. */ | ||
73 | #if defined __cplusplus && defined GNULIB_NAMESPACE | ||
74 | # define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { | ||
75 | # define _GL_END_NAMESPACE } | ||
76 | #else | ||
77 | # define _GL_BEGIN_NAMESPACE | ||
78 | # define _GL_END_NAMESPACE | ||
79 | #endif | ||
80 | |||
81 | /* The three most frequent use cases of these macros are: | ||
82 | |||
83 | * For providing a substitute for a function that is missing on some | ||
84 | platforms, but is declared and works fine on the platforms on which | ||
85 | it exists: | ||
86 | |||
87 | #if @GNULIB_FOO@ | ||
88 | # if !@HAVE_FOO@ | ||
89 | _GL_FUNCDECL_SYS (foo, ...); | ||
90 | # endif | ||
91 | _GL_CXXALIAS_SYS (foo, ...); | ||
92 | _GL_CXXALIASWARN (foo); | ||
93 | #elif defined GNULIB_POSIXCHECK | ||
94 | ... | ||
95 | #endif | ||
96 | |||
97 | * For providing a replacement for a function that exists on all platforms, | ||
98 | but is broken/insufficient and needs to be replaced on some platforms: | ||
99 | |||
100 | #if @GNULIB_FOO@ | ||
101 | # if @REPLACE_FOO@ | ||
102 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
103 | # undef foo | ||
104 | # define foo rpl_foo | ||
105 | # endif | ||
106 | _GL_FUNCDECL_RPL (foo, ...); | ||
107 | _GL_CXXALIAS_RPL (foo, ...); | ||
108 | # else | ||
109 | _GL_CXXALIAS_SYS (foo, ...); | ||
110 | # endif | ||
111 | _GL_CXXALIASWARN (foo); | ||
112 | #elif defined GNULIB_POSIXCHECK | ||
113 | ... | ||
114 | #endif | ||
115 | |||
116 | * For providing a replacement for a function that exists on some platforms | ||
117 | but is broken/insufficient and needs to be replaced on some of them and | ||
118 | is additionally either missing or undeclared on some other platforms: | ||
119 | |||
120 | #if @GNULIB_FOO@ | ||
121 | # if @REPLACE_FOO@ | ||
122 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
123 | # undef foo | ||
124 | # define foo rpl_foo | ||
125 | # endif | ||
126 | _GL_FUNCDECL_RPL (foo, ...); | ||
127 | _GL_CXXALIAS_RPL (foo, ...); | ||
128 | # else | ||
129 | # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ | ||
130 | _GL_FUNCDECL_SYS (foo, ...); | ||
131 | # endif | ||
132 | _GL_CXXALIAS_SYS (foo, ...); | ||
133 | # endif | ||
134 | _GL_CXXALIASWARN (foo); | ||
135 | #elif defined GNULIB_POSIXCHECK | ||
136 | ... | ||
137 | #endif | ||
138 | */ | ||
139 | |||
140 | /* _GL_EXTERN_C declaration; | ||
141 | performs the declaration with C linkage. */ | ||
142 | #if defined __cplusplus | ||
143 | # define _GL_EXTERN_C extern "C" | ||
144 | #else | ||
145 | # define _GL_EXTERN_C extern | ||
146 | #endif | ||
147 | |||
148 | /* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); | ||
149 | declares a replacement function, named rpl_func, with the given prototype, | ||
150 | consisting of return type, parameters, and attributes. | ||
151 | Example: | ||
152 | _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) | ||
153 | _GL_ARG_NONNULL ((1))); | ||
154 | */ | ||
155 | #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ | ||
156 | _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) | ||
157 | #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ | ||
158 | _GL_EXTERN_C rettype rpl_func parameters_and_attributes | ||
159 | |||
160 | /* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); | ||
161 | declares the system function, named func, with the given prototype, | ||
162 | consisting of return type, parameters, and attributes. | ||
163 | Example: | ||
164 | _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) | ||
165 | _GL_ARG_NONNULL ((1))); | ||
166 | */ | ||
167 | #define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ | ||
168 | _GL_EXTERN_C rettype func parameters_and_attributes | ||
169 | |||
170 | /* _GL_CXXALIAS_RPL (func, rettype, parameters); | ||
171 | declares a C++ alias called GNULIB_NAMESPACE::func | ||
172 | that redirects to rpl_func, if GNULIB_NAMESPACE is defined. | ||
173 | Example: | ||
174 | _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); | ||
175 | |||
176 | Wrapping rpl_func in an object with an inline conversion operator | ||
177 | avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is | ||
178 | actually used in the program. */ | ||
179 | #define _GL_CXXALIAS_RPL(func,rettype,parameters) \ | ||
180 | _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) | ||
181 | #if defined __cplusplus && defined GNULIB_NAMESPACE | ||
182 | # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ | ||
183 | namespace GNULIB_NAMESPACE \ | ||
184 | { \ | ||
185 | static const struct _gl_ ## func ## _wrapper \ | ||
186 | { \ | ||
187 | typedef rettype (*type) parameters; \ | ||
188 | \ | ||
189 | inline operator type () const \ | ||
190 | { \ | ||
191 | return ::rpl_func; \ | ||
192 | } \ | ||
193 | } func = {}; \ | ||
194 | } \ | ||
195 | _GL_EXTERN_C int _gl_cxxalias_dummy | ||
196 | #else | ||
197 | # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ | ||
198 | _GL_EXTERN_C int _gl_cxxalias_dummy | ||
199 | #endif | ||
200 | |||
201 | /* _GL_CXXALIAS_MDA (func, rettype, parameters); | ||
202 | is to be used when func is a Microsoft deprecated alias, on native Windows. | ||
203 | It declares a C++ alias called GNULIB_NAMESPACE::func | ||
204 | that redirects to _func, if GNULIB_NAMESPACE is defined. | ||
205 | Example: | ||
206 | _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); | ||
207 | */ | ||
208 | #define _GL_CXXALIAS_MDA(func,rettype,parameters) \ | ||
209 | _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) | ||
210 | |||
211 | /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); | ||
212 | is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); | ||
213 | except that the C function rpl_func may have a slightly different | ||
214 | declaration. A cast is used to silence the "invalid conversion" error | ||
215 | that would otherwise occur. */ | ||
216 | #if defined __cplusplus && defined GNULIB_NAMESPACE | ||
217 | # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ | ||
218 | namespace GNULIB_NAMESPACE \ | ||
219 | { \ | ||
220 | static const struct _gl_ ## func ## _wrapper \ | ||
221 | { \ | ||
222 | typedef rettype (*type) parameters; \ | ||
223 | \ | ||
224 | inline operator type () const \ | ||
225 | { \ | ||
226 | return reinterpret_cast<type>(::rpl_func); \ | ||
227 | } \ | ||
228 | } func = {}; \ | ||
229 | } \ | ||
230 | _GL_EXTERN_C int _gl_cxxalias_dummy | ||
231 | #else | ||
232 | # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ | ||
233 | _GL_EXTERN_C int _gl_cxxalias_dummy | ||
234 | #endif | ||
235 | |||
236 | /* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); | ||
237 | is like _GL_CXXALIAS_MDA (func, rettype, parameters); | ||
238 | except that the C function func may have a slightly different declaration. | ||
239 | A cast is used to silence the "invalid conversion" error that would | ||
240 | otherwise occur. */ | ||
241 | #define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ | ||
242 | _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) | ||
243 | |||
244 | /* _GL_CXXALIAS_SYS (func, rettype, parameters); | ||
245 | declares a C++ alias called GNULIB_NAMESPACE::func | ||
246 | that redirects to the system provided function func, if GNULIB_NAMESPACE | ||
247 | is defined. | ||
248 | Example: | ||
249 | _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); | ||
250 | |||
251 | Wrapping func in an object with an inline conversion operator | ||
252 | avoids a reference to func unless GNULIB_NAMESPACE::func is | ||
253 | actually used in the program. */ | ||
254 | #if defined __cplusplus && defined GNULIB_NAMESPACE | ||
255 | # define _GL_CXXALIAS_SYS(func,rettype,parameters) \ | ||
256 | namespace GNULIB_NAMESPACE \ | ||
257 | { \ | ||
258 | static const struct _gl_ ## func ## _wrapper \ | ||
259 | { \ | ||
260 | typedef rettype (*type) parameters; \ | ||
261 | \ | ||
262 | inline operator type () const \ | ||
263 | { \ | ||
264 | return ::func; \ | ||
265 | } \ | ||
266 | } func = {}; \ | ||
267 | } \ | ||
268 | _GL_EXTERN_C int _gl_cxxalias_dummy | ||
269 | #else | ||
270 | # define _GL_CXXALIAS_SYS(func,rettype,parameters) \ | ||
271 | _GL_EXTERN_C int _gl_cxxalias_dummy | ||
272 | #endif | ||
273 | |||
274 | /* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); | ||
275 | is like _GL_CXXALIAS_SYS (func, rettype, parameters); | ||
276 | except that the C function func may have a slightly different declaration. | ||
277 | A cast is used to silence the "invalid conversion" error that would | ||
278 | otherwise occur. */ | ||
279 | #if defined __cplusplus && defined GNULIB_NAMESPACE | ||
280 | # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ | ||
281 | namespace GNULIB_NAMESPACE \ | ||
282 | { \ | ||
283 | static const struct _gl_ ## func ## _wrapper \ | ||
284 | { \ | ||
285 | typedef rettype (*type) parameters; \ | ||
286 | \ | ||
287 | inline operator type () const \ | ||
288 | { \ | ||
289 | return reinterpret_cast<type>(::func); \ | ||
290 | } \ | ||
291 | } func = {}; \ | ||
292 | } \ | ||
293 | _GL_EXTERN_C int _gl_cxxalias_dummy | ||
294 | #else | ||
295 | # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ | ||
296 | _GL_EXTERN_C int _gl_cxxalias_dummy | ||
297 | #endif | ||
298 | |||
299 | /* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); | ||
300 | is like _GL_CXXALIAS_SYS (func, rettype, parameters); | ||
301 | except that the C function is picked among a set of overloaded functions, | ||
302 | namely the one with rettype2 and parameters2. Two consecutive casts | ||
303 | are used to silence the "cannot find a match" and "invalid conversion" | ||
304 | errors that would otherwise occur. */ | ||
305 | #if defined __cplusplus && defined GNULIB_NAMESPACE | ||
306 | /* The outer cast must be a reinterpret_cast. | ||
307 | The inner cast: When the function is defined as a set of overloaded | ||
308 | functions, it works as a static_cast<>, choosing the designated variant. | ||
309 | When the function is defined as a single variant, it works as a | ||
310 | reinterpret_cast<>. The parenthesized cast syntax works both ways. */ | ||
311 | # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ | ||
312 | namespace GNULIB_NAMESPACE \ | ||
313 | { \ | ||
314 | static const struct _gl_ ## func ## _wrapper \ | ||
315 | { \ | ||
316 | typedef rettype (*type) parameters; \ | ||
317 | \ | ||
318 | inline operator type () const \ | ||
319 | { \ | ||
320 | return reinterpret_cast<type>((rettype2 (*) parameters2)(::func)); \ | ||
321 | } \ | ||
322 | } func = {}; \ | ||
323 | } \ | ||
324 | _GL_EXTERN_C int _gl_cxxalias_dummy | ||
325 | #else | ||
326 | # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ | ||
327 | _GL_EXTERN_C int _gl_cxxalias_dummy | ||
328 | #endif | ||
329 | |||
330 | /* _GL_CXXALIASWARN (func); | ||
331 | causes a warning to be emitted when ::func is used but not when | ||
332 | GNULIB_NAMESPACE::func is used. func must be defined without overloaded | ||
333 | variants. */ | ||
334 | #if defined __cplusplus && defined GNULIB_NAMESPACE | ||
335 | # define _GL_CXXALIASWARN(func) \ | ||
336 | _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) | ||
337 | # define _GL_CXXALIASWARN_1(func,namespace) \ | ||
338 | _GL_CXXALIASWARN_2 (func, namespace) | ||
339 | /* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>, | ||
340 | we enable the warning only when not optimizing. */ | ||
341 | # if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) | ||
342 | # define _GL_CXXALIASWARN_2(func,namespace) \ | ||
343 | _GL_WARN_ON_USE (func, \ | ||
344 | "The symbol ::" #func " refers to the system function. " \ | ||
345 | "Use " #namespace "::" #func " instead.") | ||
346 | # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING | ||
347 | # define _GL_CXXALIASWARN_2(func,namespace) \ | ||
348 | extern __typeof__ (func) func | ||
349 | # else | ||
350 | # define _GL_CXXALIASWARN_2(func,namespace) \ | ||
351 | _GL_EXTERN_C int _gl_cxxalias_dummy | ||
352 | # endif | ||
353 | #else | ||
354 | # define _GL_CXXALIASWARN(func) \ | ||
355 | _GL_EXTERN_C int _gl_cxxalias_dummy | ||
356 | #endif | ||
357 | |||
358 | /* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); | ||
359 | causes a warning to be emitted when the given overloaded variant of ::func | ||
360 | is used but not when GNULIB_NAMESPACE::func is used. */ | ||
361 | #if defined __cplusplus && defined GNULIB_NAMESPACE | ||
362 | # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ | ||
363 | _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ | ||
364 | GNULIB_NAMESPACE) | ||
365 | # define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ | ||
366 | _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) | ||
367 | /* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>, | ||
368 | we enable the warning only when not optimizing. */ | ||
369 | # if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) | ||
370 | # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ | ||
371 | _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ | ||
372 | "The symbol ::" #func " refers to the system function. " \ | ||
373 | "Use " #namespace "::" #func " instead.") | ||
374 | # else | ||
375 | # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ | ||
376 | _GL_EXTERN_C int _gl_cxxalias_dummy | ||
377 | # endif | ||
378 | #else | ||
379 | # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ | ||
380 | _GL_EXTERN_C int _gl_cxxalias_dummy | ||
381 | #endif | ||
382 | |||
383 | #endif /* _GL_CXXDEFS_H */ | ||
384 | |||
385 | /* The definition of _GL_ARG_NONNULL is copied here. */ | ||
386 | /* A C macro for declaring that specific arguments must not be NULL. | ||
387 | Copyright (C) 2009-2022 Free Software Foundation, Inc. | ||
388 | |||
389 | This program is free software: you can redistribute it and/or modify it | ||
390 | under the terms of the GNU Lesser General Public License as published | ||
391 | by the Free Software Foundation; either version 2 of the License, or | ||
392 | (at your option) any later version. | ||
393 | |||
394 | This program is distributed in the hope that it will be useful, | ||
395 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
396 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
397 | Lesser General Public License for more details. | ||
398 | |||
399 | You should have received a copy of the GNU Lesser General Public License | ||
400 | along with this program. If not, see <https://www.gnu.org/licenses/>. */ | ||
401 | |||
402 | /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools | ||
403 | that the values passed as arguments n, ..., m must be non-NULL pointers. | ||
404 | n = 1 stands for the first argument, n = 2 for the second argument etc. */ | ||
405 | #ifndef _GL_ARG_NONNULL | ||
406 | # if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ | ||
407 | # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) | ||
408 | # else | ||
409 | # define _GL_ARG_NONNULL(params) | ||
410 | # endif | ||
411 | #endif | ||
412 | |||
413 | /* The definition of _GL_WARN_ON_USE is copied here. */ | ||
414 | /* A C macro for emitting warnings if a function is used. | ||
415 | Copyright (C) 2010-2022 Free Software Foundation, Inc. | ||
416 | |||
417 | This program is free software: you can redistribute it and/or modify it | ||
418 | under the terms of the GNU Lesser General Public License as published | ||
419 | by the Free Software Foundation; either version 2 of the License, or | ||
420 | (at your option) any later version. | ||
421 | |||
422 | This program is distributed in the hope that it will be useful, | ||
423 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
424 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
425 | Lesser General Public License for more details. | ||
426 | |||
427 | You should have received a copy of the GNU Lesser General Public License | ||
428 | along with this program. If not, see <https://www.gnu.org/licenses/>. */ | ||
429 | |||
430 | /* _GL_WARN_ON_USE (function, "literal string") issues a declaration | ||
431 | for FUNCTION which will then trigger a compiler warning containing | ||
432 | the text of "literal string" anywhere that function is called, if | ||
433 | supported by the compiler. If the compiler does not support this | ||
434 | feature, the macro expands to an unused extern declaration. | ||
435 | |||
436 | _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the | ||
437 | attribute used in _GL_WARN_ON_USE. If the compiler does not support | ||
438 | this feature, it expands to empty. | ||
439 | |||
440 | These macros are useful for marking a function as a potential | ||
441 | portability trap, with the intent that "literal string" include | ||
442 | instructions on the replacement function that should be used | ||
443 | instead. | ||
444 | _GL_WARN_ON_USE is for functions with 'extern' linkage. | ||
445 | _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline' | ||
446 | linkage. | ||
447 | |||
448 | However, one of the reasons that a function is a portability trap is | ||
449 | if it has the wrong signature. Declaring FUNCTION with a different | ||
450 | signature in C is a compilation error, so this macro must use the | ||
451 | same type as any existing declaration so that programs that avoid | ||
452 | the problematic FUNCTION do not fail to compile merely because they | ||
453 | included a header that poisoned the function. But this implies that | ||
454 | _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already | ||
455 | have a declaration. Use of this macro implies that there must not | ||
456 | be any other macro hiding the declaration of FUNCTION; but | ||
457 | undefining FUNCTION first is part of the poisoning process anyway | ||
458 | (although for symbols that are provided only via a macro, the result | ||
459 | is a compilation error rather than a warning containing | ||
460 | "literal string"). Also note that in C++, it is only safe to use if | ||
461 | FUNCTION has no overloads. | ||
462 | |||
463 | For an example, it is possible to poison 'getline' by: | ||
464 | - adding a call to gl_WARN_ON_USE_PREPARE([[#include <stdio.h>]], | ||
465 | [getline]) in configure.ac, which potentially defines | ||
466 | HAVE_RAW_DECL_GETLINE | ||
467 | - adding this code to a header that wraps the system <stdio.h>: | ||
468 | #undef getline | ||
469 | #if HAVE_RAW_DECL_GETLINE | ||
470 | _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" | ||
471 | "not universally present; use the gnulib module getline"); | ||
472 | #endif | ||
473 | |||
474 | It is not possible to directly poison global variables. But it is | ||
475 | possible to write a wrapper accessor function, and poison that | ||
476 | (less common usage, like &environ, will cause a compilation error | ||
477 | rather than issue the nice warning, but the end result of informing | ||
478 | the developer about their portability problem is still achieved): | ||
479 | #if HAVE_RAW_DECL_ENVIRON | ||
480 | static char *** | ||
481 | rpl_environ (void) { return &environ; } | ||
482 | _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); | ||
483 | # undef environ | ||
484 | # define environ (*rpl_environ ()) | ||
485 | #endif | ||
486 | or better (avoiding contradictory use of 'static' and 'extern'): | ||
487 | #if HAVE_RAW_DECL_ENVIRON | ||
488 | static char *** | ||
489 | _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared") | ||
490 | rpl_environ (void) { return &environ; } | ||
491 | # undef environ | ||
492 | # define environ (*rpl_environ ()) | ||
493 | #endif | ||
494 | */ | ||
495 | #ifndef _GL_WARN_ON_USE | ||
496 | |||
497 | # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) | ||
498 | /* A compiler attribute is available in gcc versions 4.3.0 and later. */ | ||
499 | # define _GL_WARN_ON_USE(function, message) \ | ||
500 | _GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) | ||
501 | # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ | ||
502 | __attribute__ ((__warning__ (message))) | ||
503 | # elif __clang_major__ >= 4 | ||
504 | /* Another compiler attribute is available in clang. */ | ||
505 | # define _GL_WARN_ON_USE(function, message) \ | ||
506 | _GL_WARN_EXTERN_C __typeof__ (function) function \ | ||
507 | __attribute__ ((__diagnose_if__ (1, message, "warning"))) | ||
508 | # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ | ||
509 | __attribute__ ((__diagnose_if__ (1, message, "warning"))) | ||
510 | # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING | ||
511 | /* Verify the existence of the function. */ | ||
512 | # define _GL_WARN_ON_USE(function, message) \ | ||
513 | _GL_WARN_EXTERN_C __typeof__ (function) function | ||
514 | # define _GL_WARN_ON_USE_ATTRIBUTE(message) | ||
515 | # else /* Unsupported. */ | ||
516 | # define _GL_WARN_ON_USE(function, message) \ | ||
517 | _GL_WARN_EXTERN_C int _gl_warn_on_use | ||
518 | # define _GL_WARN_ON_USE_ATTRIBUTE(message) | ||
519 | # endif | ||
520 | #endif | ||
521 | |||
522 | /* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") | ||
523 | is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the | ||
524 | function is declared with the given prototype, consisting of return type, | ||
525 | parameters, and attributes. | ||
526 | This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does | ||
527 | not work in this case. */ | ||
528 | #ifndef _GL_WARN_ON_USE_CXX | ||
529 | # if !defined __cplusplus | ||
530 | # define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ | ||
531 | _GL_WARN_ON_USE (function, msg) | ||
532 | # else | ||
533 | # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) | ||
534 | /* A compiler attribute is available in gcc versions 4.3.0 and later. */ | ||
535 | # define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ | ||
536 | extern rettype_gcc function parameters_and_attributes \ | ||
537 | __attribute__ ((__warning__ (msg))) | ||
538 | # elif __clang_major__ >= 4 | ||
539 | /* Another compiler attribute is available in clang. */ | ||
540 | # define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ | ||
541 | extern rettype_clang function parameters_and_attributes \ | ||
542 | __attribute__ ((__diagnose_if__ (1, msg, "warning"))) | ||
543 | # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING | ||
544 | /* Verify the existence of the function. */ | ||
545 | # define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ | ||
546 | extern rettype_gcc function parameters_and_attributes | ||
547 | # else /* Unsupported. */ | ||
548 | # define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ | ||
549 | _GL_WARN_EXTERN_C int _gl_warn_on_use | ||
550 | # endif | ||
551 | # endif | ||
552 | #endif | ||
553 | |||
554 | /* _GL_WARN_EXTERN_C declaration; | ||
555 | performs the declaration with C linkage. */ | ||
556 | #ifndef _GL_WARN_EXTERN_C | ||
557 | # if defined __cplusplus | ||
558 | # define _GL_WARN_EXTERN_C extern "C" | ||
559 | # else | ||
560 | # define _GL_WARN_EXTERN_C extern | ||
561 | # endif | ||
562 | #endif | ||
563 | |||
564 | /* Before doing "#define mknod rpl_mknod" below, we need to include all | ||
565 | headers that may declare mknod(). OS/2 kLIBC declares mknod() in | ||
566 | <unistd.h>, not in <sys/stat.h>. */ | ||
567 | #ifdef __KLIBC__ | ||
568 | # include <unistd.h> | ||
569 | #endif | ||
570 | |||
571 | /* Before doing "#define mkdir rpl_mkdir" below, we need to include all | ||
572 | headers that may declare mkdir(). Native Windows platforms declare mkdir | ||
573 | in <io.h> and/or <direct.h>, not in <sys/stat.h>. */ | ||
574 | #if defined _WIN32 && ! defined __CYGWIN__ | ||
575 | # include <io.h> /* mingw32, mingw64 */ | ||
576 | # include <direct.h> /* mingw64, MSVC 9 */ | ||
577 | #endif | ||
578 | |||
579 | /* Native Windows platforms declare umask() in <io.h>. */ | ||
580 | #if 0 && (defined _WIN32 && ! defined __CYGWIN__) | ||
581 | # include <io.h> | ||
582 | #endif | ||
583 | |||
584 | /* Large File Support on native Windows. */ | ||
585 | #if 0 | ||
586 | # define stat _stati64 | ||
587 | #endif | ||
588 | |||
589 | /* Optionally, override 'struct stat' on native Windows. */ | ||
590 | #if 0 | ||
591 | |||
592 | # undef stat | ||
593 | # if 1 | ||
594 | # define stat rpl_stat | ||
595 | # else | ||
596 | /* Provoke a clear link error if stat() is used as a function and | ||
597 | module 'stat' is not in use. */ | ||
598 | # define stat stat_used_without_requesting_gnulib_module_stat | ||
599 | # endif | ||
600 | |||
601 | # if !GNULIB_defined_struct_stat | ||
602 | struct stat | ||
603 | { | ||
604 | dev_t st_dev; | ||
605 | ino_t st_ino; | ||
606 | mode_t st_mode; | ||
607 | nlink_t st_nlink; | ||
608 | # if 0 | ||
609 | uid_t st_uid; | ||
610 | # else /* uid_t is not defined by default on native Windows. */ | ||
611 | short st_uid; | ||
612 | # endif | ||
613 | # if 0 | ||
614 | gid_t st_gid; | ||
615 | # else /* gid_t is not defined by default on native Windows. */ | ||
616 | short st_gid; | ||
617 | # endif | ||
618 | dev_t st_rdev; | ||
619 | off_t st_size; | ||
620 | # if 0 | ||
621 | blksize_t st_blksize; | ||
622 | blkcnt_t st_blocks; | ||
623 | # endif | ||
624 | |||
625 | # if 0 | ||
626 | struct timespec st_atim; | ||
627 | struct timespec st_mtim; | ||
628 | struct timespec st_ctim; | ||
629 | # else | ||
630 | time_t st_atime; | ||
631 | time_t st_mtime; | ||
632 | time_t st_ctime; | ||
633 | # endif | ||
634 | }; | ||
635 | # if 0 | ||
636 | # define st_atime st_atim.tv_sec | ||
637 | # define st_mtime st_mtim.tv_sec | ||
638 | # define st_ctime st_ctim.tv_sec | ||
639 | /* Indicator, for gnulib internal purposes. */ | ||
640 | # define _GL_WINDOWS_STAT_TIMESPEC 1 | ||
641 | # endif | ||
642 | # define GNULIB_defined_struct_stat 1 | ||
643 | # endif | ||
644 | |||
645 | /* Other possible values of st_mode. */ | ||
646 | # if 0 | ||
647 | # define _S_IFBLK 0x6000 | ||
648 | # endif | ||
649 | # if 0 | ||
650 | # define _S_IFLNK 0xA000 | ||
651 | # endif | ||
652 | # if 0 | ||
653 | # define _S_IFSOCK 0xC000 | ||
654 | # endif | ||
655 | |||
656 | #endif | ||
657 | |||
658 | #ifndef S_IFIFO | ||
659 | # ifdef _S_IFIFO | ||
660 | # define S_IFIFO _S_IFIFO | ||
661 | # endif | ||
662 | #endif | ||
663 | |||
664 | #ifndef S_IFMT | ||
665 | # define S_IFMT 0170000 | ||
666 | #endif | ||
667 | |||
668 | #if STAT_MACROS_BROKEN | ||
669 | # undef S_ISBLK | ||
670 | # undef S_ISCHR | ||
671 | # undef S_ISDIR | ||
672 | # undef S_ISFIFO | ||
673 | # undef S_ISLNK | ||
674 | # undef S_ISNAM | ||
675 | # undef S_ISMPB | ||
676 | # undef S_ISMPC | ||
677 | # undef S_ISNWK | ||
678 | # undef S_ISREG | ||
679 | # undef S_ISSOCK | ||
680 | #endif | ||
681 | |||
682 | #ifndef S_ISBLK | ||
683 | # ifdef S_IFBLK | ||
684 | # define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK) | ||
685 | # else | ||
686 | # define S_ISBLK(m) 0 | ||
687 | # endif | ||
688 | #endif | ||
689 | |||
690 | #ifndef S_ISCHR | ||
691 | # ifdef S_IFCHR | ||
692 | # define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR) | ||
693 | # else | ||
694 | # define S_ISCHR(m) 0 | ||
695 | # endif | ||
696 | #endif | ||
697 | |||
698 | #ifndef S_ISDIR | ||
699 | # ifdef S_IFDIR | ||
700 | # define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) | ||
701 | # else | ||
702 | # define S_ISDIR(m) 0 | ||
703 | # endif | ||
704 | #endif | ||
705 | |||
706 | #ifndef S_ISDOOR /* Solaris 2.5 and up */ | ||
707 | # define S_ISDOOR(m) 0 | ||
708 | #endif | ||
709 | |||
710 | #ifndef S_ISFIFO | ||
711 | # ifdef S_IFIFO | ||
712 | # define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO) | ||
713 | # else | ||
714 | # define S_ISFIFO(m) 0 | ||
715 | # endif | ||
716 | #endif | ||
717 | |||
718 | #ifndef S_ISLNK | ||
719 | # ifdef S_IFLNK | ||
720 | # define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) | ||
721 | # else | ||
722 | # define S_ISLNK(m) 0 | ||
723 | # endif | ||
724 | #endif | ||
725 | |||
726 | #ifndef S_ISMPB /* V7 */ | ||
727 | # ifdef S_IFMPB | ||
728 | # define S_ISMPB(m) (((m) & S_IFMT) == S_IFMPB) | ||
729 | # define S_ISMPC(m) (((m) & S_IFMT) == S_IFMPC) | ||
730 | # else | ||
731 | # define S_ISMPB(m) 0 | ||
732 | # define S_ISMPC(m) 0 | ||
733 | # endif | ||
734 | #endif | ||
735 | |||
736 | #ifndef S_ISMPX /* AIX */ | ||
737 | # define S_ISMPX(m) 0 | ||
738 | #endif | ||
739 | |||
740 | #ifndef S_ISNAM /* Xenix */ | ||
741 | # ifdef S_IFNAM | ||
742 | # define S_ISNAM(m) (((m) & S_IFMT) == S_IFNAM) | ||
743 | # else | ||
744 | # define S_ISNAM(m) 0 | ||
745 | # endif | ||
746 | #endif | ||
747 | |||
748 | #ifndef S_ISNWK /* HP/UX */ | ||
749 | # ifdef S_IFNWK | ||
750 | # define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK) | ||
751 | # else | ||
752 | # define S_ISNWK(m) 0 | ||
753 | # endif | ||
754 | #endif | ||
755 | |||
756 | #ifndef S_ISPORT /* Solaris 10 and up */ | ||
757 | # define S_ISPORT(m) 0 | ||
758 | #endif | ||
759 | |||
760 | #ifndef S_ISREG | ||
761 | # ifdef S_IFREG | ||
762 | # define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) | ||
763 | # else | ||
764 | # define S_ISREG(m) 0 | ||
765 | # endif | ||
766 | #endif | ||
767 | |||
768 | #ifndef S_ISSOCK | ||
769 | # ifdef S_IFSOCK | ||
770 | # define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK) | ||
771 | # else | ||
772 | # define S_ISSOCK(m) 0 | ||
773 | # endif | ||
774 | #endif | ||
775 | |||
776 | |||
777 | #ifndef S_TYPEISMQ | ||
778 | # define S_TYPEISMQ(p) 0 | ||
779 | #endif | ||
780 | |||
781 | #ifndef S_TYPEISTMO | ||
782 | # define S_TYPEISTMO(p) 0 | ||
783 | #endif | ||
784 | |||
785 | |||
786 | #ifndef S_TYPEISSEM | ||
787 | # ifdef S_INSEM | ||
788 | # define S_TYPEISSEM(p) (S_ISNAM ((p)->st_mode) && (p)->st_rdev == S_INSEM) | ||
789 | # else | ||
790 | # define S_TYPEISSEM(p) 0 | ||
791 | # endif | ||
792 | #endif | ||
793 | |||
794 | #ifndef S_TYPEISSHM | ||
795 | # ifdef S_INSHD | ||
796 | # define S_TYPEISSHM(p) (S_ISNAM ((p)->st_mode) && (p)->st_rdev == S_INSHD) | ||
797 | # else | ||
798 | # define S_TYPEISSHM(p) 0 | ||
799 | # endif | ||
800 | #endif | ||
801 | |||
802 | /* high performance ("contiguous data") */ | ||
803 | #ifndef S_ISCTG | ||
804 | # define S_ISCTG(p) 0 | ||
805 | #endif | ||
806 | |||
807 | /* Cray DMF (data migration facility): off line, with data */ | ||
808 | #ifndef S_ISOFD | ||
809 | # define S_ISOFD(p) 0 | ||
810 | #endif | ||
811 | |||
812 | /* Cray DMF (data migration facility): off line, with no data */ | ||
813 | #ifndef S_ISOFL | ||
814 | # define S_ISOFL(p) 0 | ||
815 | #endif | ||
816 | |||
817 | /* 4.4BSD whiteout */ | ||
818 | #ifndef S_ISWHT | ||
819 | # define S_ISWHT(m) 0 | ||
820 | #endif | ||
821 | |||
822 | /* If any of the following are undefined, | ||
823 | define them to their de facto standard values. */ | ||
824 | #if !S_ISUID | ||
825 | # define S_ISUID 04000 | ||
826 | #endif | ||
827 | #if !S_ISGID | ||
828 | # define S_ISGID 02000 | ||
829 | #endif | ||
830 | |||
831 | /* S_ISVTX is a common extension to POSIX. */ | ||
832 | #ifndef S_ISVTX | ||
833 | # define S_ISVTX 01000 | ||
834 | #endif | ||
835 | |||
836 | #if !S_IRUSR && S_IREAD | ||
837 | # define S_IRUSR S_IREAD | ||
838 | #endif | ||
839 | #if !S_IRUSR | ||
840 | # define S_IRUSR 00400 | ||
841 | #endif | ||
842 | #if !S_IRGRP | ||
843 | # define S_IRGRP (S_IRUSR >> 3) | ||
844 | #endif | ||
845 | #if !S_IROTH | ||
846 | # define S_IROTH (S_IRUSR >> 6) | ||
847 | #endif | ||
848 | |||
849 | #if !S_IWUSR && S_IWRITE | ||
850 | # define S_IWUSR S_IWRITE | ||
851 | #endif | ||
852 | #if !S_IWUSR | ||
853 | # define S_IWUSR 00200 | ||
854 | #endif | ||
855 | #if !S_IWGRP | ||
856 | # define S_IWGRP (S_IWUSR >> 3) | ||
857 | #endif | ||
858 | #if !S_IWOTH | ||
859 | # define S_IWOTH (S_IWUSR >> 6) | ||
860 | #endif | ||
861 | |||
862 | #if !S_IXUSR && S_IEXEC | ||
863 | # define S_IXUSR S_IEXEC | ||
864 | #endif | ||
865 | #if !S_IXUSR | ||
866 | # define S_IXUSR 00100 | ||
867 | #endif | ||
868 | #if !S_IXGRP | ||
869 | # define S_IXGRP (S_IXUSR >> 3) | ||
870 | #endif | ||
871 | #if !S_IXOTH | ||
872 | # define S_IXOTH (S_IXUSR >> 6) | ||
873 | #endif | ||
874 | |||
875 | #if !S_IRWXU | ||
876 | # define S_IRWXU (S_IRUSR | S_IWUSR | S_IXUSR) | ||
877 | #endif | ||
878 | #if !S_IRWXG | ||
879 | # define S_IRWXG (S_IRGRP | S_IWGRP | S_IXGRP) | ||
880 | #endif | ||
881 | #if !S_IRWXO | ||
882 | # define S_IRWXO (S_IROTH | S_IWOTH | S_IXOTH) | ||
883 | #endif | ||
884 | |||
885 | /* Although S_IXUGO and S_IRWXUGO are not specified by POSIX and are | ||
886 | not implemented in GNU/Linux, some Gnulib-using apps use the macros. */ | ||
887 | #if !S_IXUGO | ||
888 | # define S_IXUGO (S_IXUSR | S_IXGRP | S_IXOTH) | ||
889 | #endif | ||
890 | #ifndef S_IRWXUGO | ||
891 | # define S_IRWXUGO (S_IRWXU | S_IRWXG | S_IRWXO) | ||
892 | #endif | ||
893 | |||
894 | /* Macros for futimens and utimensat. */ | ||
895 | #ifndef UTIME_NOW | ||
896 | # define UTIME_NOW (-1) | ||
897 | # define UTIME_OMIT (-2) | ||
898 | #endif | ||
899 | |||
900 | |||
901 | #if 0 | ||
902 | # if 0 | ||
903 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
904 | # undef chmod | ||
905 | # define chmod rpl_chmod | ||
906 | # endif | ||
907 | _GL_FUNCDECL_RPL (chmod, int, (const char *filename, mode_t mode) | ||
908 | _GL_ARG_NONNULL ((1))); | ||
909 | _GL_CXXALIAS_RPL (chmod, int, (const char *filename, mode_t mode)); | ||
910 | # elif defined _WIN32 && !defined __CYGWIN__ | ||
911 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
912 | # undef chmod | ||
913 | # define chmod _chmod | ||
914 | # endif | ||
915 | /* Need to cast, because in mingw the last argument is 'int mode'. */ | ||
916 | _GL_CXXALIAS_MDA_CAST (chmod, int, (const char *filename, mode_t mode)); | ||
917 | # else | ||
918 | _GL_CXXALIAS_SYS (chmod, int, (const char *filename, mode_t mode)); | ||
919 | # endif | ||
920 | _GL_CXXALIASWARN (chmod); | ||
921 | #elif defined GNULIB_POSIXCHECK | ||
922 | # undef chmod | ||
923 | # if HAVE_RAW_DECL_CHMOD | ||
924 | _GL_WARN_ON_USE (chmod, "chmod has portability problems - " | ||
925 | "use gnulib module chmod for portability"); | ||
926 | # endif | ||
927 | #elif 1 | ||
928 | /* On native Windows, map 'chmod' to '_chmod', so that -loldnames is not | ||
929 | required. In C++ with GNULIB_NAMESPACE, avoid differences between | ||
930 | platforms by defining GNULIB_NAMESPACE::chmod always. */ | ||
931 | # if defined _WIN32 && !defined __CYGWIN__ | ||
932 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
933 | # undef chmod | ||
934 | # define chmod _chmod | ||
935 | # endif | ||
936 | /* Need to cast, because in mingw the last argument is 'int mode'. */ | ||
937 | _GL_CXXALIAS_MDA_CAST (chmod, int, (const char *filename, mode_t mode)); | ||
938 | # else | ||
939 | _GL_CXXALIAS_SYS (chmod, int, (const char *filename, mode_t mode)); | ||
940 | # endif | ||
941 | _GL_CXXALIASWARN (chmod); | ||
942 | #endif | ||
943 | |||
944 | |||
945 | #if 0 | ||
946 | # if 0 | ||
947 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
948 | # undef fchmodat | ||
949 | # define fchmodat rpl_fchmodat | ||
950 | # endif | ||
951 | _GL_FUNCDECL_RPL (fchmodat, int, | ||
952 | (int fd, char const *file, mode_t mode, int flag) | ||
953 | _GL_ARG_NONNULL ((2))); | ||
954 | _GL_CXXALIAS_RPL (fchmodat, int, | ||
955 | (int fd, char const *file, mode_t mode, int flag)); | ||
956 | # else | ||
957 | # if !1 | ||
958 | _GL_FUNCDECL_SYS (fchmodat, int, | ||
959 | (int fd, char const *file, mode_t mode, int flag) | ||
960 | _GL_ARG_NONNULL ((2))); | ||
961 | # endif | ||
962 | _GL_CXXALIAS_SYS (fchmodat, int, | ||
963 | (int fd, char const *file, mode_t mode, int flag)); | ||
964 | # endif | ||
965 | _GL_CXXALIASWARN (fchmodat); | ||
966 | #elif defined GNULIB_POSIXCHECK | ||
967 | # undef fchmodat | ||
968 | # if HAVE_RAW_DECL_FCHMODAT | ||
969 | _GL_WARN_ON_USE (fchmodat, "fchmodat is not portable - " | ||
970 | "use gnulib module openat for portability"); | ||
971 | # endif | ||
972 | #endif | ||
973 | |||
974 | |||
975 | #if 1 | ||
976 | # if 0 | ||
977 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
978 | # undef fstat | ||
979 | # define fstat rpl_fstat | ||
980 | # endif | ||
981 | _GL_FUNCDECL_RPL (fstat, int, (int fd, struct stat *buf) _GL_ARG_NONNULL ((2))); | ||
982 | _GL_CXXALIAS_RPL (fstat, int, (int fd, struct stat *buf)); | ||
983 | # else | ||
984 | _GL_CXXALIAS_SYS (fstat, int, (int fd, struct stat *buf)); | ||
985 | # endif | ||
986 | # if __GLIBC__ >= 2 | ||
987 | _GL_CXXALIASWARN (fstat); | ||
988 | # endif | ||
989 | #elif 0 | ||
990 | # undef fstat | ||
991 | # define fstat fstat_used_without_requesting_gnulib_module_fstat | ||
992 | #elif 0 | ||
993 | /* Above, we define stat to _stati64. */ | ||
994 | # define fstat _fstati64 | ||
995 | #elif defined GNULIB_POSIXCHECK | ||
996 | # undef fstat | ||
997 | # if HAVE_RAW_DECL_FSTAT | ||
998 | _GL_WARN_ON_USE (fstat, "fstat has portability problems - " | ||
999 | "use gnulib module fstat for portability"); | ||
1000 | # endif | ||
1001 | #endif | ||
1002 | |||
1003 | |||
1004 | #if 0 | ||
1005 | # if 0 | ||
1006 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
1007 | # undef fstatat | ||
1008 | # define fstatat rpl_fstatat | ||
1009 | # endif | ||
1010 | _GL_FUNCDECL_RPL (fstatat, int, | ||
1011 | (int fd, char const *restrict name, struct stat *restrict st, | ||
1012 | int flags) | ||
1013 | _GL_ARG_NONNULL ((2, 3))); | ||
1014 | _GL_CXXALIAS_RPL (fstatat, int, | ||
1015 | (int fd, char const *restrict name, struct stat *restrict st, | ||
1016 | int flags)); | ||
1017 | # else | ||
1018 | # if !1 | ||
1019 | _GL_FUNCDECL_SYS (fstatat, int, | ||
1020 | (int fd, char const *restrict name, struct stat *restrict st, | ||
1021 | int flags) | ||
1022 | _GL_ARG_NONNULL ((2, 3))); | ||
1023 | # endif | ||
1024 | _GL_CXXALIAS_SYS (fstatat, int, | ||
1025 | (int fd, char const *restrict name, struct stat *restrict st, | ||
1026 | int flags)); | ||
1027 | # endif | ||
1028 | _GL_CXXALIASWARN (fstatat); | ||
1029 | #elif 0 | ||
1030 | # undef fstatat | ||
1031 | # define fstatat fstatat_used_without_requesting_gnulib_module_fstatat | ||
1032 | #elif defined GNULIB_POSIXCHECK | ||
1033 | # undef fstatat | ||
1034 | # if HAVE_RAW_DECL_FSTATAT | ||
1035 | _GL_WARN_ON_USE (fstatat, "fstatat is not portable - " | ||
1036 | "use gnulib module openat for portability"); | ||
1037 | # endif | ||
1038 | #endif | ||
1039 | |||
1040 | |||
1041 | #if 0 | ||
1042 | /* Use the rpl_ prefix also on Solaris <= 9, because on Solaris 9 our futimens | ||
1043 | implementation relies on futimesat, which on Solaris 10 makes an invocation | ||
1044 | to futimens that is meant to invoke the libc's futimens(), not gnulib's | ||
1045 | futimens(). */ | ||
1046 | # if 0 || (!1 && defined __sun) | ||
1047 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
1048 | # undef futimens | ||
1049 | # define futimens rpl_futimens | ||
1050 | # endif | ||
1051 | _GL_FUNCDECL_RPL (futimens, int, (int fd, struct timespec const times[2])); | ||
1052 | _GL_CXXALIAS_RPL (futimens, int, (int fd, struct timespec const times[2])); | ||
1053 | # else | ||
1054 | # if !1 | ||
1055 | _GL_FUNCDECL_SYS (futimens, int, (int fd, struct timespec const times[2])); | ||
1056 | # endif | ||
1057 | _GL_CXXALIAS_SYS (futimens, int, (int fd, struct timespec const times[2])); | ||
1058 | # endif | ||
1059 | # if 1 | ||
1060 | _GL_CXXALIASWARN (futimens); | ||
1061 | # endif | ||
1062 | #elif defined GNULIB_POSIXCHECK | ||
1063 | # undef futimens | ||
1064 | # if HAVE_RAW_DECL_FUTIMENS | ||
1065 | _GL_WARN_ON_USE (futimens, "futimens is not portable - " | ||
1066 | "use gnulib module futimens for portability"); | ||
1067 | # endif | ||
1068 | #endif | ||
1069 | |||
1070 | |||
1071 | #if 0 | ||
1072 | # if !1 | ||
1073 | _GL_FUNCDECL_SYS (getumask, mode_t, (void)); | ||
1074 | # endif | ||
1075 | _GL_CXXALIAS_SYS (getumask, mode_t, (void)); | ||
1076 | # if 1 | ||
1077 | _GL_CXXALIASWARN (getumask); | ||
1078 | # endif | ||
1079 | #elif defined GNULIB_POSIXCHECK | ||
1080 | # undef getumask | ||
1081 | # if HAVE_RAW_DECL_GETUMASK | ||
1082 | _GL_WARN_ON_USE (getumask, "getumask is not portable - " | ||
1083 | "use gnulib module getumask for portability"); | ||
1084 | # endif | ||
1085 | #endif | ||
1086 | |||
1087 | |||
1088 | #if 0 | ||
1089 | /* Change the mode of FILENAME to MODE, without dereferencing it if FILENAME | ||
1090 | denotes a symbolic link. */ | ||
1091 | # if !1 || defined __hpux | ||
1092 | _GL_FUNCDECL_SYS (lchmod, int, (const char *filename, mode_t mode) | ||
1093 | _GL_ARG_NONNULL ((1))); | ||
1094 | # endif | ||
1095 | _GL_CXXALIAS_SYS (lchmod, int, (const char *filename, mode_t mode)); | ||
1096 | _GL_CXXALIASWARN (lchmod); | ||
1097 | #elif defined GNULIB_POSIXCHECK | ||
1098 | # undef lchmod | ||
1099 | # if HAVE_RAW_DECL_LCHMOD | ||
1100 | _GL_WARN_ON_USE (lchmod, "lchmod is unportable - " | ||
1101 | "use gnulib module lchmod for portability"); | ||
1102 | # endif | ||
1103 | #endif | ||
1104 | |||
1105 | |||
1106 | #if 0 | ||
1107 | # if ! 1 | ||
1108 | /* mingw does not support symlinks, therefore it does not have lstat. But | ||
1109 | without links, stat does just fine. */ | ||
1110 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
1111 | # define lstat stat | ||
1112 | # endif | ||
1113 | _GL_CXXALIAS_RPL_1 (lstat, stat, int, | ||
1114 | (const char *restrict name, struct stat *restrict buf)); | ||
1115 | # elif 0 | ||
1116 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
1117 | # undef lstat | ||
1118 | # define lstat rpl_lstat | ||
1119 | # endif | ||
1120 | _GL_FUNCDECL_RPL (lstat, int, | ||
1121 | (const char *restrict name, struct stat *restrict buf) | ||
1122 | _GL_ARG_NONNULL ((1, 2))); | ||
1123 | _GL_CXXALIAS_RPL (lstat, int, | ||
1124 | (const char *restrict name, struct stat *restrict buf)); | ||
1125 | # else | ||
1126 | _GL_CXXALIAS_SYS (lstat, int, | ||
1127 | (const char *restrict name, struct stat *restrict buf)); | ||
1128 | # endif | ||
1129 | # if 1 | ||
1130 | _GL_CXXALIASWARN (lstat); | ||
1131 | # endif | ||
1132 | #elif 0 | ||
1133 | # undef lstat | ||
1134 | # define lstat lstat_used_without_requesting_gnulib_module_lstat | ||
1135 | #elif defined GNULIB_POSIXCHECK | ||
1136 | # undef lstat | ||
1137 | # if HAVE_RAW_DECL_LSTAT | ||
1138 | _GL_WARN_ON_USE (lstat, "lstat is unportable - " | ||
1139 | "use gnulib module lstat for portability"); | ||
1140 | # endif | ||
1141 | #endif | ||
1142 | |||
1143 | |||
1144 | #if 0 | ||
1145 | # if 0 | ||
1146 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
1147 | # undef mkdir | ||
1148 | # define mkdir rpl_mkdir | ||
1149 | # endif | ||
1150 | _GL_FUNCDECL_RPL (mkdir, int, (char const *name, mode_t mode) | ||
1151 | _GL_ARG_NONNULL ((1))); | ||
1152 | _GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode)); | ||
1153 | # elif defined _WIN32 && !defined __CYGWIN__ | ||
1154 | /* mingw's _mkdir() function has 1 argument, but we pass 2 arguments. | ||
1155 | Additionally, it declares _mkdir (and depending on compile flags, an | ||
1156 | alias mkdir), only in the nonstandard includes <direct.h> and <io.h>, | ||
1157 | which are included above. */ | ||
1158 | # if !GNULIB_defined_rpl_mkdir | ||
1159 | static int | ||
1160 | rpl_mkdir (char const *name, mode_t mode) | ||
1161 | { | ||
1162 | return _mkdir (name); | ||
1163 | } | ||
1164 | # define GNULIB_defined_rpl_mkdir 1 | ||
1165 | # endif | ||
1166 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
1167 | # undef mkdir | ||
1168 | # define mkdir rpl_mkdir | ||
1169 | # endif | ||
1170 | _GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode)); | ||
1171 | # else | ||
1172 | _GL_CXXALIAS_SYS (mkdir, int, (char const *name, mode_t mode)); | ||
1173 | # endif | ||
1174 | _GL_CXXALIASWARN (mkdir); | ||
1175 | #elif defined GNULIB_POSIXCHECK | ||
1176 | # undef mkdir | ||
1177 | # if HAVE_RAW_DECL_MKDIR | ||
1178 | _GL_WARN_ON_USE (mkdir, "mkdir does not always support two parameters - " | ||
1179 | "use gnulib module mkdir for portability"); | ||
1180 | # endif | ||
1181 | #elif 1 | ||
1182 | /* On native Windows, map 'mkdir' to '_mkdir', so that -loldnames is not | ||
1183 | required. In C++ with GNULIB_NAMESPACE, avoid differences between | ||
1184 | platforms by defining GNULIB_NAMESPACE::mkdir always. */ | ||
1185 | # if defined _WIN32 && !defined __CYGWIN__ | ||
1186 | # if !GNULIB_defined_rpl_mkdir | ||
1187 | static int | ||
1188 | rpl_mkdir (char const *name, mode_t mode) | ||
1189 | { | ||
1190 | return _mkdir (name); | ||
1191 | } | ||
1192 | # define GNULIB_defined_rpl_mkdir 1 | ||
1193 | # endif | ||
1194 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
1195 | # undef mkdir | ||
1196 | # define mkdir rpl_mkdir | ||
1197 | # endif | ||
1198 | _GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode)); | ||
1199 | # else | ||
1200 | _GL_CXXALIAS_SYS (mkdir, int, (char const *name, mode_t mode)); | ||
1201 | # endif | ||
1202 | _GL_CXXALIASWARN (mkdir); | ||
1203 | #endif | ||
1204 | |||
1205 | |||
1206 | #if 0 | ||
1207 | # if !1 | ||
1208 | _GL_FUNCDECL_SYS (mkdirat, int, (int fd, char const *file, mode_t mode) | ||
1209 | _GL_ARG_NONNULL ((2))); | ||
1210 | # endif | ||
1211 | _GL_CXXALIAS_SYS (mkdirat, int, (int fd, char const *file, mode_t mode)); | ||
1212 | _GL_CXXALIASWARN (mkdirat); | ||
1213 | #elif defined GNULIB_POSIXCHECK | ||
1214 | # undef mkdirat | ||
1215 | # if HAVE_RAW_DECL_MKDIRAT | ||
1216 | _GL_WARN_ON_USE (mkdirat, "mkdirat is not portable - " | ||
1217 | "use gnulib module openat for portability"); | ||
1218 | # endif | ||
1219 | #endif | ||
1220 | |||
1221 | |||
1222 | #if 0 | ||
1223 | # if 0 | ||
1224 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
1225 | # undef mkfifo | ||
1226 | # define mkfifo rpl_mkfifo | ||
1227 | # endif | ||
1228 | _GL_FUNCDECL_RPL (mkfifo, int, (char const *file, mode_t mode) | ||
1229 | _GL_ARG_NONNULL ((1))); | ||
1230 | _GL_CXXALIAS_RPL (mkfifo, int, (char const *file, mode_t mode)); | ||
1231 | # else | ||
1232 | # if !1 | ||
1233 | _GL_FUNCDECL_SYS (mkfifo, int, (char const *file, mode_t mode) | ||
1234 | _GL_ARG_NONNULL ((1))); | ||
1235 | # endif | ||
1236 | _GL_CXXALIAS_SYS (mkfifo, int, (char const *file, mode_t mode)); | ||
1237 | # endif | ||
1238 | _GL_CXXALIASWARN (mkfifo); | ||
1239 | #elif defined GNULIB_POSIXCHECK | ||
1240 | # undef mkfifo | ||
1241 | # if HAVE_RAW_DECL_MKFIFO | ||
1242 | _GL_WARN_ON_USE (mkfifo, "mkfifo is not portable - " | ||
1243 | "use gnulib module mkfifo for portability"); | ||
1244 | # endif | ||
1245 | #endif | ||
1246 | |||
1247 | |||
1248 | #if 0 | ||
1249 | # if 0 | ||
1250 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
1251 | # undef mkfifoat | ||
1252 | # define mkfifoat rpl_mkfifoat | ||
1253 | # endif | ||
1254 | _GL_FUNCDECL_RPL (mkfifoat, int, (int fd, char const *file, mode_t mode) | ||
1255 | _GL_ARG_NONNULL ((2))); | ||
1256 | _GL_CXXALIAS_RPL (mkfifoat, int, (int fd, char const *file, mode_t mode)); | ||
1257 | # else | ||
1258 | # if !1 | ||
1259 | _GL_FUNCDECL_SYS (mkfifoat, int, (int fd, char const *file, mode_t mode) | ||
1260 | _GL_ARG_NONNULL ((2))); | ||
1261 | # endif | ||
1262 | _GL_CXXALIAS_SYS (mkfifoat, int, (int fd, char const *file, mode_t mode)); | ||
1263 | # endif | ||
1264 | _GL_CXXALIASWARN (mkfifoat); | ||
1265 | #elif defined GNULIB_POSIXCHECK | ||
1266 | # undef mkfifoat | ||
1267 | # if HAVE_RAW_DECL_MKFIFOAT | ||
1268 | _GL_WARN_ON_USE (mkfifoat, "mkfifoat is not portable - " | ||
1269 | "use gnulib module mkfifoat for portability"); | ||
1270 | # endif | ||
1271 | #endif | ||
1272 | |||
1273 | |||
1274 | #if 0 | ||
1275 | # if 0 | ||
1276 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
1277 | # undef mknod | ||
1278 | # define mknod rpl_mknod | ||
1279 | # endif | ||
1280 | _GL_FUNCDECL_RPL (mknod, int, (char const *file, mode_t mode, dev_t dev) | ||
1281 | _GL_ARG_NONNULL ((1))); | ||
1282 | _GL_CXXALIAS_RPL (mknod, int, (char const *file, mode_t mode, dev_t dev)); | ||
1283 | # else | ||
1284 | # if !1 | ||
1285 | _GL_FUNCDECL_SYS (mknod, int, (char const *file, mode_t mode, dev_t dev) | ||
1286 | _GL_ARG_NONNULL ((1))); | ||
1287 | # endif | ||
1288 | /* Need to cast, because on OSF/1 5.1, the third parameter is '...'. */ | ||
1289 | _GL_CXXALIAS_SYS_CAST (mknod, int, (char const *file, mode_t mode, dev_t dev)); | ||
1290 | # endif | ||
1291 | _GL_CXXALIASWARN (mknod); | ||
1292 | #elif defined GNULIB_POSIXCHECK | ||
1293 | # undef mknod | ||
1294 | # if HAVE_RAW_DECL_MKNOD | ||
1295 | _GL_WARN_ON_USE (mknod, "mknod is not portable - " | ||
1296 | "use gnulib module mknod for portability"); | ||
1297 | # endif | ||
1298 | #endif | ||
1299 | |||
1300 | |||
1301 | #if 0 | ||
1302 | # if 0 | ||
1303 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
1304 | # undef mknodat | ||
1305 | # define mknodat rpl_mknodat | ||
1306 | # endif | ||
1307 | _GL_FUNCDECL_RPL (mknodat, int, | ||
1308 | (int fd, char const *file, mode_t mode, dev_t dev) | ||
1309 | _GL_ARG_NONNULL ((2))); | ||
1310 | _GL_CXXALIAS_RPL (mknodat, int, | ||
1311 | (int fd, char const *file, mode_t mode, dev_t dev)); | ||
1312 | # else | ||
1313 | # if !1 | ||
1314 | _GL_FUNCDECL_SYS (mknodat, int, | ||
1315 | (int fd, char const *file, mode_t mode, dev_t dev) | ||
1316 | _GL_ARG_NONNULL ((2))); | ||
1317 | # endif | ||
1318 | _GL_CXXALIAS_SYS (mknodat, int, | ||
1319 | (int fd, char const *file, mode_t mode, dev_t dev)); | ||
1320 | # endif | ||
1321 | _GL_CXXALIASWARN (mknodat); | ||
1322 | #elif defined GNULIB_POSIXCHECK | ||
1323 | # undef mknodat | ||
1324 | # if HAVE_RAW_DECL_MKNODAT | ||
1325 | _GL_WARN_ON_USE (mknodat, "mknodat is not portable - " | ||
1326 | "use gnulib module mkfifoat for portability"); | ||
1327 | # endif | ||
1328 | #endif | ||
1329 | |||
1330 | |||
1331 | #if 1 | ||
1332 | # if 0 | ||
1333 | # if !0 | ||
1334 | /* We can't use the object-like #define stat rpl_stat, because of | ||
1335 | struct stat. This means that rpl_stat will not be used if the user | ||
1336 | does (stat)(a,b). Oh well. */ | ||
1337 | # if defined _AIX && defined stat && defined _LARGE_FILES | ||
1338 | /* With _LARGE_FILES defined, AIX (only) defines stat to stat64, | ||
1339 | so we have to replace stat64() instead of stat(). */ | ||
1340 | # undef stat64 | ||
1341 | # define stat64(name, st) rpl_stat (name, st) | ||
1342 | # elif 0 | ||
1343 | /* Above, we define stat to _stati64. */ | ||
1344 | # if defined __MINGW32__ && defined _stati64 | ||
1345 | # ifndef _USE_32BIT_TIME_T | ||
1346 | /* The system headers define _stati64 to _stat64. */ | ||
1347 | # undef _stat64 | ||
1348 | # define _stat64(name, st) rpl_stat (name, st) | ||
1349 | # endif | ||
1350 | # elif defined _MSC_VER && defined _stati64 | ||
1351 | # ifdef _USE_32BIT_TIME_T | ||
1352 | /* The system headers define _stati64 to _stat32i64. */ | ||
1353 | # undef _stat32i64 | ||
1354 | # define _stat32i64(name, st) rpl_stat (name, st) | ||
1355 | # else | ||
1356 | /* The system headers define _stati64 to _stat64. */ | ||
1357 | # undef _stat64 | ||
1358 | # define _stat64(name, st) rpl_stat (name, st) | ||
1359 | # endif | ||
1360 | # else | ||
1361 | # undef _stati64 | ||
1362 | # define _stati64(name, st) rpl_stat (name, st) | ||
1363 | # endif | ||
1364 | # elif defined __MINGW32__ && defined stat | ||
1365 | # ifdef _USE_32BIT_TIME_T | ||
1366 | /* The system headers define stat to _stat32i64. */ | ||
1367 | # undef _stat32i64 | ||
1368 | # define _stat32i64(name, st) rpl_stat (name, st) | ||
1369 | # else | ||
1370 | /* The system headers define stat to _stat64. */ | ||
1371 | # undef _stat64 | ||
1372 | # define _stat64(name, st) rpl_stat (name, st) | ||
1373 | # endif | ||
1374 | # elif defined _MSC_VER && defined stat | ||
1375 | # ifdef _USE_32BIT_TIME_T | ||
1376 | /* The system headers define stat to _stat32. */ | ||
1377 | # undef _stat32 | ||
1378 | # define _stat32(name, st) rpl_stat (name, st) | ||
1379 | # else | ||
1380 | /* The system headers define stat to _stat64i32. */ | ||
1381 | # undef _stat64i32 | ||
1382 | # define _stat64i32(name, st) rpl_stat (name, st) | ||
1383 | # endif | ||
1384 | # else /* !(_AIX || __MINGW32__ || _MSC_VER) */ | ||
1385 | # undef stat | ||
1386 | # define stat(name, st) rpl_stat (name, st) | ||
1387 | # endif /* !_LARGE_FILES */ | ||
1388 | # endif /* !0 */ | ||
1389 | _GL_EXTERN_C int stat (const char *restrict name, struct stat *restrict buf) | ||
1390 | _GL_ARG_NONNULL ((1, 2)); | ||
1391 | # endif | ||
1392 | #elif 0 | ||
1393 | /* see above: | ||
1394 | #define stat stat_used_without_requesting_gnulib_module_stat | ||
1395 | */ | ||
1396 | #elif defined GNULIB_POSIXCHECK | ||
1397 | # undef stat | ||
1398 | # if HAVE_RAW_DECL_STAT | ||
1399 | _GL_WARN_ON_USE (stat, "stat is unportable - " | ||
1400 | "use gnulib module stat for portability"); | ||
1401 | # endif | ||
1402 | #endif | ||
1403 | |||
1404 | |||
1405 | #if 1 | ||
1406 | /* On native Windows, map 'umask' to '_umask', so that -loldnames is not | ||
1407 | required. In C++ with GNULIB_NAMESPACE, avoid differences between | ||
1408 | platforms by defining GNULIB_NAMESPACE::umask always. */ | ||
1409 | # if defined _WIN32 && !defined __CYGWIN__ | ||
1410 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
1411 | # undef umask | ||
1412 | # define umask _umask | ||
1413 | # endif | ||
1414 | /* Need to cast, because in mingw the last argument is 'int mode'. */ | ||
1415 | _GL_CXXALIAS_MDA_CAST (umask, mode_t, (mode_t mask)); | ||
1416 | # else | ||
1417 | _GL_CXXALIAS_SYS (umask, mode_t, (mode_t mask)); | ||
1418 | # endif | ||
1419 | _GL_CXXALIASWARN (umask); | ||
1420 | #endif | ||
1421 | |||
1422 | |||
1423 | #if 0 | ||
1424 | /* Use the rpl_ prefix also on Solaris <= 9, because on Solaris 9 our utimensat | ||
1425 | implementation relies on futimesat, which on Solaris 10 makes an invocation | ||
1426 | to utimensat that is meant to invoke the libc's utimensat(), not gnulib's | ||
1427 | utimensat(). */ | ||
1428 | # if 0 || (!1 && defined __sun) | ||
1429 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
1430 | # undef utimensat | ||
1431 | # define utimensat rpl_utimensat | ||
1432 | # endif | ||
1433 | _GL_FUNCDECL_RPL (utimensat, int, (int fd, char const *name, | ||
1434 | struct timespec const times[2], int flag) | ||
1435 | _GL_ARG_NONNULL ((2))); | ||
1436 | _GL_CXXALIAS_RPL (utimensat, int, (int fd, char const *name, | ||
1437 | struct timespec const times[2], int flag)); | ||
1438 | # else | ||
1439 | # if !1 | ||
1440 | _GL_FUNCDECL_SYS (utimensat, int, (int fd, char const *name, | ||
1441 | struct timespec const times[2], int flag) | ||
1442 | _GL_ARG_NONNULL ((2))); | ||
1443 | # endif | ||
1444 | _GL_CXXALIAS_SYS (utimensat, int, (int fd, char const *name, | ||
1445 | struct timespec const times[2], int flag)); | ||
1446 | # endif | ||
1447 | # if 1 | ||
1448 | _GL_CXXALIASWARN (utimensat); | ||
1449 | # endif | ||
1450 | #elif defined GNULIB_POSIXCHECK | ||
1451 | # undef utimensat | ||
1452 | # if HAVE_RAW_DECL_UTIMENSAT | ||
1453 | _GL_WARN_ON_USE (utimensat, "utimensat is not portable - " | ||
1454 | "use gnulib module utimensat for portability"); | ||
1455 | # endif | ||
1456 | #endif | ||
1457 | |||
1458 | |||
1459 | #endif /* _GL_SYS_STAT_H */ | ||
1460 | #endif /* _GL_SYS_STAT_H */ | ||
1461 | #endif | ||