dhcpd-pools  3.0
ISC dhcpd lease usage analyser
stat.h
Go to the documentation of this file.
1 /* DO NOT EDIT! GENERATED AUTOMATICALLY! */
2 /* Provide a more complete sys/stat.h header file.
3  Copyright (C) 2005-2017 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, 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-2017 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 General Public License as published
58  by the Free Software Foundation; either version 3 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  General Public License for more details.
65 
66  You should have received a copy of the GNU 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_RPL_CAST_1 (func, rpl_func, rettype, parameters);
202  is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters);
203  except that the C function rpl_func may have a slightly different
204  declaration. A cast is used to silence the "invalid conversion" error
205  that would otherwise occur. */
206 #if defined __cplusplus && defined GNULIB_NAMESPACE
207 # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
208  namespace GNULIB_NAMESPACE \
209  { \
210  static const struct _gl_ ## func ## _wrapper \
211  { \
212  typedef rettype (*type) parameters; \
213  \
214  inline operator type () const \
215  { \
216  return reinterpret_cast<type>(::rpl_func); \
217  } \
218  } func = {}; \
219  } \
220  _GL_EXTERN_C int _gl_cxxalias_dummy
221 #else
222 # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
223  _GL_EXTERN_C int _gl_cxxalias_dummy
224 #endif
225 
226 /* _GL_CXXALIAS_SYS (func, rettype, parameters);
227  declares a C++ alias called GNULIB_NAMESPACE::func
228  that redirects to the system provided function func, if GNULIB_NAMESPACE
229  is defined.
230  Example:
231  _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...));
232 
233  Wrapping func in an object with an inline conversion operator
234  avoids a reference to func unless GNULIB_NAMESPACE::func is
235  actually used in the program. */
236 #if defined __cplusplus && defined GNULIB_NAMESPACE
237 # define _GL_CXXALIAS_SYS(func,rettype,parameters) \
238  namespace GNULIB_NAMESPACE \
239  { \
240  static const struct _gl_ ## func ## _wrapper \
241  { \
242  typedef rettype (*type) parameters; \
243  \
244  inline operator type () const \
245  { \
246  return ::func; \
247  } \
248  } func = {}; \
249  } \
250  _GL_EXTERN_C int _gl_cxxalias_dummy
251 #else
252 # define _GL_CXXALIAS_SYS(func,rettype,parameters) \
253  _GL_EXTERN_C int _gl_cxxalias_dummy
254 #endif
255 
256 /* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters);
257  is like _GL_CXXALIAS_SYS (func, rettype, parameters);
258  except that the C function func may have a slightly different declaration.
259  A cast is used to silence the "invalid conversion" error that would
260  otherwise occur. */
261 #if defined __cplusplus && defined GNULIB_NAMESPACE
262 # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
263  namespace GNULIB_NAMESPACE \
264  { \
265  static const struct _gl_ ## func ## _wrapper \
266  { \
267  typedef rettype (*type) parameters; \
268  \
269  inline operator type () const \
270  { \
271  return reinterpret_cast<type>(::func); \
272  } \
273  } func = {}; \
274  } \
275  _GL_EXTERN_C int _gl_cxxalias_dummy
276 #else
277 # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
278  _GL_EXTERN_C int _gl_cxxalias_dummy
279 #endif
280 
281 /* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2);
282  is like _GL_CXXALIAS_SYS (func, rettype, parameters);
283  except that the C function is picked among a set of overloaded functions,
284  namely the one with rettype2 and parameters2. Two consecutive casts
285  are used to silence the "cannot find a match" and "invalid conversion"
286  errors that would otherwise occur. */
287 #if defined __cplusplus && defined GNULIB_NAMESPACE
288  /* The outer cast must be a reinterpret_cast.
289  The inner cast: When the function is defined as a set of overloaded
290  functions, it works as a static_cast<>, choosing the designated variant.
291  When the function is defined as a single variant, it works as a
292  reinterpret_cast<>. The parenthesized cast syntax works both ways. */
293 # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
294  namespace GNULIB_NAMESPACE \
295  { \
296  static const struct _gl_ ## func ## _wrapper \
297  { \
298  typedef rettype (*type) parameters; \
299  \
300  inline operator type () const \
301  { \
302  return reinterpret_cast<type>((rettype2 (*) parameters2)(::func)); \
303  } \
304  } func = {}; \
305  } \
306  _GL_EXTERN_C int _gl_cxxalias_dummy
307 #else
308 # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
309  _GL_EXTERN_C int _gl_cxxalias_dummy
310 #endif
311 
312 /* _GL_CXXALIASWARN (func);
313  causes a warning to be emitted when ::func is used but not when
314  GNULIB_NAMESPACE::func is used. func must be defined without overloaded
315  variants. */
316 #if defined __cplusplus && defined GNULIB_NAMESPACE
317 # define _GL_CXXALIASWARN(func) \
318  _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE)
319 # define _GL_CXXALIASWARN_1(func,namespace) \
320  _GL_CXXALIASWARN_2 (func, namespace)
321 /* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
322  we enable the warning only when not optimizing. */
323 # if !__OPTIMIZE__
324 # define _GL_CXXALIASWARN_2(func,namespace) \
325  _GL_WARN_ON_USE (func, \
326  "The symbol ::" #func " refers to the system function. " \
327  "Use " #namespace "::" #func " instead.")
328 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
329 # define _GL_CXXALIASWARN_2(func,namespace) \
330  extern __typeof__ (func) func
331 # else
332 # define _GL_CXXALIASWARN_2(func,namespace) \
333  _GL_EXTERN_C int _gl_cxxalias_dummy
334 # endif
335 #else
336 # define _GL_CXXALIASWARN(func) \
337  _GL_EXTERN_C int _gl_cxxalias_dummy
338 #endif
339 
340 /* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes);
341  causes a warning to be emitted when the given overloaded variant of ::func
342  is used but not when GNULIB_NAMESPACE::func is used. */
343 #if defined __cplusplus && defined GNULIB_NAMESPACE
344 # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
345  _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \
346  GNULIB_NAMESPACE)
347 # define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \
348  _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace)
349 /* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
350  we enable the warning only when not optimizing. */
351 # if !__OPTIMIZE__
352 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
353  _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \
354  "The symbol ::" #func " refers to the system function. " \
355  "Use " #namespace "::" #func " instead.")
356 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
357 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
358  extern __typeof__ (func) func
359 # else
360 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
361  _GL_EXTERN_C int _gl_cxxalias_dummy
362 # endif
363 #else
364 # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
365  _GL_EXTERN_C int _gl_cxxalias_dummy
366 #endif
367 
368 #endif /* _GL_CXXDEFS_H */
369 
370 /* The definition of _GL_ARG_NONNULL is copied here. */
371 /* A C macro for declaring that specific arguments must not be NULL.
372  Copyright (C) 2009-2017 Free Software Foundation, Inc.
373 
374  This program is free software: you can redistribute it and/or modify it
375  under the terms of the GNU General Public License as published
376  by the Free Software Foundation; either version 3 of the License, or
377  (at your option) any later version.
378 
379  This program is distributed in the hope that it will be useful,
380  but WITHOUT ANY WARRANTY; without even the implied warranty of
381  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
382  General Public License for more details.
383 
384  You should have received a copy of the GNU General Public License
385  along with this program. If not, see <https://www.gnu.org/licenses/>. */
386 
387 /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools
388  that the values passed as arguments n, ..., m must be non-NULL pointers.
389  n = 1 stands for the first argument, n = 2 for the second argument etc. */
390 #ifndef _GL_ARG_NONNULL
391 # if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3
392 # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params))
393 # else
394 # define _GL_ARG_NONNULL(params)
395 # endif
396 #endif
397 
398 /* The definition of _GL_WARN_ON_USE is copied here. */
399 /* A C macro for emitting warnings if a function is used.
400  Copyright (C) 2010-2017 Free Software Foundation, Inc.
401 
402  This program is free software: you can redistribute it and/or modify it
403  under the terms of the GNU General Public License as published
404  by the Free Software Foundation; either version 3 of the License, or
405  (at your option) any later version.
406 
407  This program is distributed in the hope that it will be useful,
408  but WITHOUT ANY WARRANTY; without even the implied warranty of
409  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
410  General Public License for more details.
411 
412  You should have received a copy of the GNU General Public License
413  along with this program. If not, see <https://www.gnu.org/licenses/>. */
414 
415 /* _GL_WARN_ON_USE (function, "literal string") issues a declaration
416  for FUNCTION which will then trigger a compiler warning containing
417  the text of "literal string" anywhere that function is called, if
418  supported by the compiler. If the compiler does not support this
419  feature, the macro expands to an unused extern declaration.
420 
421  This macro is useful for marking a function as a potential
422  portability trap, with the intent that "literal string" include
423  instructions on the replacement function that should be used
424  instead. However, one of the reasons that a function is a
425  portability trap is if it has the wrong signature. Declaring
426  FUNCTION with a different signature in C is a compilation error, so
427  this macro must use the same type as any existing declaration so
428  that programs that avoid the problematic FUNCTION do not fail to
429  compile merely because they included a header that poisoned the
430  function. But this implies that _GL_WARN_ON_USE is only safe to
431  use if FUNCTION is known to already have a declaration. Use of
432  this macro implies that there must not be any other macro hiding
433  the declaration of FUNCTION; but undefining FUNCTION first is part
434  of the poisoning process anyway (although for symbols that are
435  provided only via a macro, the result is a compilation error rather
436  than a warning containing "literal string"). Also note that in
437  C++, it is only safe to use if FUNCTION has no overloads.
438 
439  For an example, it is possible to poison 'getline' by:
440  - adding a call to gl_WARN_ON_USE_PREPARE([[#include <stdio.h>]],
441  [getline]) in configure.ac, which potentially defines
442  HAVE_RAW_DECL_GETLINE
443  - adding this code to a header that wraps the system <stdio.h>:
444  #undef getline
445  #if HAVE_RAW_DECL_GETLINE
446  _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but"
447  "not universally present; use the gnulib module getline");
448  #endif
449 
450  It is not possible to directly poison global variables. But it is
451  possible to write a wrapper accessor function, and poison that
452  (less common usage, like &environ, will cause a compilation error
453  rather than issue the nice warning, but the end result of informing
454  the developer about their portability problem is still achieved):
455  #if HAVE_RAW_DECL_ENVIRON
456  static char ***rpl_environ (void) { return &environ; }
457  _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared");
458  # undef environ
459  # define environ (*rpl_environ ())
460  #endif
461  */
462 #ifndef _GL_WARN_ON_USE
463 
464 # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
465 /* A compiler attribute is available in gcc versions 4.3.0 and later. */
466 # define _GL_WARN_ON_USE(function, message) \
467 extern __typeof__ (function) function __attribute__ ((__warning__ (message)))
468 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
469 /* Verify the existence of the function. */
470 # define _GL_WARN_ON_USE(function, message) \
471 extern __typeof__ (function) function
472 # else /* Unsupported. */
473 # define _GL_WARN_ON_USE(function, message) \
474 _GL_WARN_EXTERN_C int _gl_warn_on_use
475 # endif
476 #endif
477 
478 /* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string")
479  is like _GL_WARN_ON_USE (function, "string"), except that the function is
480  declared with the given prototype, consisting of return type, parameters,
481  and attributes.
482  This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does
483  not work in this case. */
484 #ifndef _GL_WARN_ON_USE_CXX
485 # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
486 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
487 extern rettype function parameters_and_attributes \
488  __attribute__ ((__warning__ (msg)))
489 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
490 /* Verify the existence of the function. */
491 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
492 extern rettype function parameters_and_attributes
493 # else /* Unsupported. */
494 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
495 _GL_WARN_EXTERN_C int _gl_warn_on_use
496 # endif
497 #endif
498 
499 /* _GL_WARN_EXTERN_C declaration;
500  performs the declaration with C linkage. */
501 #ifndef _GL_WARN_EXTERN_C
502 # if defined __cplusplus
503 # define _GL_WARN_EXTERN_C extern "C"
504 # else
505 # define _GL_WARN_EXTERN_C extern
506 # endif
507 #endif
508 
509 /* Before doing "#define mkdir rpl_mkdir" below, we need to include all
510  headers that may declare mkdir(). Native Windows platforms declare mkdir
511  in <io.h> and/or <direct.h>, not in <unistd.h>. */
512 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
513 # include <io.h> /* mingw32, mingw64 */
514 # include <direct.h> /* mingw64, MSVC 9 */
515 #endif
516 
517 /* Native Windows platforms declare umask() in <io.h>. */
518 #if 0 && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
519 # include <io.h>
520 #endif
521 
522 /* Large File Support on native Windows. */
523 #if 0
524 # define stat _stati64
525 #endif
526 
527 /* Optionally, override 'struct stat' on native Windows. */
528 #if 0
529 
530 # undef stat
531 # if 1
532 # define stat rpl_stat
533 # else
534  /* Provoke a clear link error if stat() is used as a function and
535  module 'stat' is not in use. */
536 # define stat stat_used_without_requesting_gnulib_module_stat
537 # endif
538 
539 # if !GNULIB_defined_struct_stat
540 struct stat
541 {
542  dev_t st_dev;
543  ino_t st_ino;
544  mode_t st_mode;
545  nlink_t st_nlink;
546 # if 0
547  uid_t st_uid;
548 # else /* uid_t is not defined by default on native Windows. */
549  short st_uid;
550 # endif
551 # if 0
552  gid_t st_gid;
553 # else /* gid_t is not defined by default on native Windows. */
554  short st_gid;
555 # endif
556  dev_t st_rdev;
557  off_t st_size;
558 # if 0
559  blksize_t st_blksize;
560  blkcnt_t st_blocks;
561 # endif
562 
563 # if 0
564  struct timespec st_atim;
565  struct timespec st_mtim;
566  struct timespec st_ctim;
567 # else
568  time_t st_atime;
569  time_t st_mtime;
570  time_t st_ctime;
571 # endif
572 };
573 # if 0
574 # define st_atime st_atim.tv_sec
575 # define st_mtime st_mtim.tv_sec
576 # define st_ctime st_ctim.tv_sec
577  /* Indicator, for gnulib internal purposes. */
578 # define _GL_WINDOWS_STAT_TIMESPEC 1
579 # endif
580 # define GNULIB_defined_struct_stat 1
581 # endif
582 
583 /* Other possible values of st_mode. */
584 # if 0
585 # define _S_IFBLK 0x6000
586 # endif
587 # if 0
588 # define _S_IFLNK 0xA000
589 # endif
590 # if 0
591 # define _S_IFSOCK 0xC000
592 # endif
593 
594 #endif
595 
596 #ifndef S_IFIFO
597 # ifdef _S_IFIFO
598 # define S_IFIFO _S_IFIFO
599 # endif
600 #endif
601 
602 #ifndef S_IFMT
603 # define S_IFMT 0170000
604 #endif
605 
606 #if STAT_MACROS_BROKEN
607 # undef S_ISBLK
608 # undef S_ISCHR
609 # undef S_ISDIR
610 # undef S_ISFIFO
611 # undef S_ISLNK
612 # undef S_ISNAM
613 # undef S_ISMPB
614 # undef S_ISMPC
615 # undef S_ISNWK
616 # undef S_ISREG
617 # undef S_ISSOCK
618 #endif
619 
620 #ifndef S_ISBLK
621 # ifdef S_IFBLK
622 # define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
623 # else
624 # define S_ISBLK(m) 0
625 # endif
626 #endif
627 
628 #ifndef S_ISCHR
629 # ifdef S_IFCHR
630 # define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
631 # else
632 # define S_ISCHR(m) 0
633 # endif
634 #endif
635 
636 #ifndef S_ISDIR
637 # ifdef S_IFDIR
638 # define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
639 # else
640 # define S_ISDIR(m) 0
641 # endif
642 #endif
643 
644 #ifndef S_ISDOOR /* Solaris 2.5 and up */
645 # define S_ISDOOR(m) 0
646 #endif
647 
648 #ifndef S_ISFIFO
649 # ifdef S_IFIFO
650 # define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
651 # else
652 # define S_ISFIFO(m) 0
653 # endif
654 #endif
655 
656 #ifndef S_ISLNK
657 # ifdef S_IFLNK
658 # define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
659 # else
660 # define S_ISLNK(m) 0
661 # endif
662 #endif
663 
664 #ifndef S_ISMPB /* V7 */
665 # ifdef S_IFMPB
666 # define S_ISMPB(m) (((m) & S_IFMT) == S_IFMPB)
667 # define S_ISMPC(m) (((m) & S_IFMT) == S_IFMPC)
668 # else
669 # define S_ISMPB(m) 0
670 # define S_ISMPC(m) 0
671 # endif
672 #endif
673 
674 #ifndef S_ISMPX /* AIX */
675 # define S_ISMPX(m) 0
676 #endif
677 
678 #ifndef S_ISNAM /* Xenix */
679 # ifdef S_IFNAM
680 # define S_ISNAM(m) (((m) & S_IFMT) == S_IFNAM)
681 # else
682 # define S_ISNAM(m) 0
683 # endif
684 #endif
685 
686 #ifndef S_ISNWK /* HP/UX */
687 # ifdef S_IFNWK
688 # define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK)
689 # else
690 # define S_ISNWK(m) 0
691 # endif
692 #endif
693 
694 #ifndef S_ISPORT /* Solaris 10 and up */
695 # define S_ISPORT(m) 0
696 #endif
697 
698 #ifndef S_ISREG
699 # ifdef S_IFREG
700 # define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
701 # else
702 # define S_ISREG(m) 0
703 # endif
704 #endif
705 
706 #ifndef S_ISSOCK
707 # ifdef S_IFSOCK
708 # define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
709 # else
710 # define S_ISSOCK(m) 0
711 # endif
712 #endif
713 
714 
715 #ifndef S_TYPEISMQ
716 # define S_TYPEISMQ(p) 0
717 #endif
718 
719 #ifndef S_TYPEISTMO
720 # define S_TYPEISTMO(p) 0
721 #endif
722 
723 
724 #ifndef S_TYPEISSEM
725 # ifdef S_INSEM
726 # define S_TYPEISSEM(p) (S_ISNAM ((p)->st_mode) && (p)->st_rdev == S_INSEM)
727 # else
728 # define S_TYPEISSEM(p) 0
729 # endif
730 #endif
731 
732 #ifndef S_TYPEISSHM
733 # ifdef S_INSHD
734 # define S_TYPEISSHM(p) (S_ISNAM ((p)->st_mode) && (p)->st_rdev == S_INSHD)
735 # else
736 # define S_TYPEISSHM(p) 0
737 # endif
738 #endif
739 
740 /* high performance ("contiguous data") */
741 #ifndef S_ISCTG
742 # define S_ISCTG(p) 0
743 #endif
744 
745 /* Cray DMF (data migration facility): off line, with data */
746 #ifndef S_ISOFD
747 # define S_ISOFD(p) 0
748 #endif
749 
750 /* Cray DMF (data migration facility): off line, with no data */
751 #ifndef S_ISOFL
752 # define S_ISOFL(p) 0
753 #endif
754 
755 /* 4.4BSD whiteout */
756 #ifndef S_ISWHT
757 # define S_ISWHT(m) 0
758 #endif
759 
760 /* If any of the following are undefined,
761  define them to their de facto standard values. */
762 #if !S_ISUID
763 # define S_ISUID 04000
764 #endif
765 #if !S_ISGID
766 # define S_ISGID 02000
767 #endif
768 
769 /* S_ISVTX is a common extension to POSIX. */
770 #ifndef S_ISVTX
771 # define S_ISVTX 01000
772 #endif
773 
774 #if !S_IRUSR && S_IREAD
775 # define S_IRUSR S_IREAD
776 #endif
777 #if !S_IRUSR
778 # define S_IRUSR 00400
779 #endif
780 #if !S_IRGRP
781 # define S_IRGRP (S_IRUSR >> 3)
782 #endif
783 #if !S_IROTH
784 # define S_IROTH (S_IRUSR >> 6)
785 #endif
786 
787 #if !S_IWUSR && S_IWRITE
788 # define S_IWUSR S_IWRITE
789 #endif
790 #if !S_IWUSR
791 # define S_IWUSR 00200
792 #endif
793 #if !S_IWGRP
794 # define S_IWGRP (S_IWUSR >> 3)
795 #endif
796 #if !S_IWOTH
797 # define S_IWOTH (S_IWUSR >> 6)
798 #endif
799 
800 #if !S_IXUSR && S_IEXEC
801 # define S_IXUSR S_IEXEC
802 #endif
803 #if !S_IXUSR
804 # define S_IXUSR 00100
805 #endif
806 #if !S_IXGRP
807 # define S_IXGRP (S_IXUSR >> 3)
808 #endif
809 #if !S_IXOTH
810 # define S_IXOTH (S_IXUSR >> 6)
811 #endif
812 
813 #if !S_IRWXU
814 # define S_IRWXU (S_IRUSR | S_IWUSR | S_IXUSR)
815 #endif
816 #if !S_IRWXG
817 # define S_IRWXG (S_IRGRP | S_IWGRP | S_IXGRP)
818 #endif
819 #if !S_IRWXO
820 # define S_IRWXO (S_IROTH | S_IWOTH | S_IXOTH)
821 #endif
822 
823 /* S_IXUGO is a common extension to POSIX. */
824 #if !S_IXUGO
825 # define S_IXUGO (S_IXUSR | S_IXGRP | S_IXOTH)
826 #endif
827 
828 #ifndef S_IRWXUGO
829 # define S_IRWXUGO (S_IRWXU | S_IRWXG | S_IRWXO)
830 #endif
831 
832 /* Macros for futimens and utimensat. */
833 #ifndef UTIME_NOW
834 # define UTIME_NOW (-1)
835 # define UTIME_OMIT (-2)
836 #endif
837 
838 
839 #if 0
840 # if !1
841 _GL_FUNCDECL_SYS (fchmodat, int,
842  (int fd, char const *file, mode_t mode, int flag)
843  _GL_ARG_NONNULL ((2)));
844 # endif
845 _GL_CXXALIAS_SYS (fchmodat, int,
846  (int fd, char const *file, mode_t mode, int flag));
847 _GL_CXXALIASWARN (fchmodat);
848 #elif defined GNULIB_POSIXCHECK
849 # undef fchmodat
850 # if HAVE_RAW_DECL_FCHMODAT
851 _GL_WARN_ON_USE (fchmodat, "fchmodat is not portable - "
852  "use gnulib module openat for portability");
853 # endif
854 #endif
855 
856 
857 #if 1
858 # if 0
859 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
860 # undef fstat
861 # define fstat rpl_fstat
862 # endif
863 _GL_FUNCDECL_RPL (fstat, int, (int fd, struct stat *buf) _GL_ARG_NONNULL ((2)));
864 _GL_CXXALIAS_RPL (fstat, int, (int fd, struct stat *buf));
865 # else
866 _GL_CXXALIAS_SYS (fstat, int, (int fd, struct stat *buf));
867 # endif
868 _GL_CXXALIASWARN (fstat);
869 #elif 0
870 # undef fstat
871 # define fstat fstat_used_without_requesting_gnulib_module_fstat
872 #elif 0
873 /* Above, we define stat to _stati64. */
874 # define fstat _fstati64
875 #elif defined GNULIB_POSIXCHECK
876 # undef fstat
877 # if HAVE_RAW_DECL_FSTAT
878 _GL_WARN_ON_USE (fstat, "fstat has portability problems - "
879  "use gnulib module fstat for portability");
880 # endif
881 #endif
882 
883 
884 #if 0
885 # if 0
886 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
887 # undef fstatat
888 # define fstatat rpl_fstatat
889 # endif
890 _GL_FUNCDECL_RPL (fstatat, int,
891  (int fd, char const *name, struct stat *st, int flags)
892  _GL_ARG_NONNULL ((2, 3)));
893 _GL_CXXALIAS_RPL (fstatat, int,
894  (int fd, char const *name, struct stat *st, int flags));
895 # else
896 # if !1
897 _GL_FUNCDECL_SYS (fstatat, int,
898  (int fd, char const *name, struct stat *st, int flags)
899  _GL_ARG_NONNULL ((2, 3)));
900 # endif
901 _GL_CXXALIAS_SYS (fstatat, int,
902  (int fd, char const *name, struct stat *st, int flags));
903 # endif
904 _GL_CXXALIASWARN (fstatat);
905 #elif 0
906 # undef fstatat
907 # define fstatat fstatat_used_without_requesting_gnulib_module_fstatat
908 #elif defined GNULIB_POSIXCHECK
909 # undef fstatat
910 # if HAVE_RAW_DECL_FSTATAT
911 _GL_WARN_ON_USE (fstatat, "fstatat is not portable - "
912  "use gnulib module openat for portability");
913 # endif
914 #endif
915 
916 
917 #if 0
918 /* Use the rpl_ prefix also on Solaris <= 9, because on Solaris 9 our futimens
919  implementation relies on futimesat, which on Solaris 10 makes an invocation
920  to futimens that is meant to invoke the libc's futimens(), not gnulib's
921  futimens(). */
922 # if 0 || (!1 && defined __sun)
923 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
924 # undef futimens
925 # define futimens rpl_futimens
926 # endif
927 _GL_FUNCDECL_RPL (futimens, int, (int fd, struct timespec const times[2]));
928 _GL_CXXALIAS_RPL (futimens, int, (int fd, struct timespec const times[2]));
929 # else
930 # if !1
931 _GL_FUNCDECL_SYS (futimens, int, (int fd, struct timespec const times[2]));
932 # endif
933 _GL_CXXALIAS_SYS (futimens, int, (int fd, struct timespec const times[2]));
934 # endif
935 # if 1
936 _GL_CXXALIASWARN (futimens);
937 # endif
938 #elif defined GNULIB_POSIXCHECK
939 # undef futimens
940 # if HAVE_RAW_DECL_FUTIMENS
941 _GL_WARN_ON_USE (futimens, "futimens is not portable - "
942  "use gnulib module futimens for portability");
943 # endif
944 #endif
945 
946 
947 #if 0
948 /* Change the mode of FILENAME to MODE, without dereferencing it if FILENAME
949  denotes a symbolic link. */
950 # if !1
951 /* The lchmod replacement follows symbolic links. Callers should take
952  this into account; lchmod should be applied only to arguments that
953  are known to not be symbolic links. On hosts that lack lchmod,
954  this can lead to race conditions between the check and the
955  invocation of lchmod, but we know of no workarounds that are
956  reliable in general. You might try requesting support for lchmod
957  from your operating system supplier. */
958 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
959 # define lchmod chmod
960 # endif
961 /* Need to cast, because on mingw, the second parameter of chmod is
962  int mode. */
963 _GL_CXXALIAS_RPL_CAST_1 (lchmod, chmod, int,
964  (const char *filename, mode_t mode));
965 # else
966 # if 0 /* assume already declared */
967 _GL_FUNCDECL_SYS (lchmod, int, (const char *filename, mode_t mode)
968  _GL_ARG_NONNULL ((1)));
969 # endif
970 _GL_CXXALIAS_SYS (lchmod, int, (const char *filename, mode_t mode));
971 # endif
972 # if 1
973 _GL_CXXALIASWARN (lchmod);
974 # endif
975 #elif defined GNULIB_POSIXCHECK
976 # undef lchmod
977 # if HAVE_RAW_DECL_LCHMOD
978 _GL_WARN_ON_USE (lchmod, "lchmod is unportable - "
979  "use gnulib module lchmod for portability");
980 # endif
981 #endif
982 
983 
984 #if 0
985 # if ! 1
986 /* mingw does not support symlinks, therefore it does not have lstat. But
987  without links, stat does just fine. */
988 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
989 # define lstat stat
990 # endif
991 _GL_CXXALIAS_RPL_1 (lstat, stat, int, (const char *name, struct stat *buf));
992 # elif 0
993 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
994 # undef lstat
995 # define lstat rpl_lstat
996 # endif
997 _GL_FUNCDECL_RPL (lstat, int, (const char *name, struct stat *buf)
998  _GL_ARG_NONNULL ((1, 2)));
999 _GL_CXXALIAS_RPL (lstat, int, (const char *name, struct stat *buf));
1000 # else
1001 _GL_CXXALIAS_SYS (lstat, int, (const char *name, struct stat *buf));
1002 # endif
1003 # if 1
1004 _GL_CXXALIASWARN (lstat);
1005 # endif
1006 #elif 0
1007 # undef lstat
1008 # define lstat lstat_used_without_requesting_gnulib_module_lstat
1009 #elif defined GNULIB_POSIXCHECK
1010 # undef lstat
1011 # if HAVE_RAW_DECL_LSTAT
1012 _GL_WARN_ON_USE (lstat, "lstat is unportable - "
1013  "use gnulib module lstat for portability");
1014 # endif
1015 #endif
1016 
1017 
1018 #if 0
1019 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1020 # undef mkdir
1021 # define mkdir rpl_mkdir
1022 # endif
1023 _GL_FUNCDECL_RPL (mkdir, int, (char const *name, mode_t mode)
1024  _GL_ARG_NONNULL ((1)));
1025 _GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode));
1026 #else
1027 /* mingw's _mkdir() function has 1 argument, but we pass 2 arguments.
1028  Additionally, it declares _mkdir (and depending on compile flags, an
1029  alias mkdir), only in the nonstandard includes <direct.h> and <io.h>,
1030  which are included above. */
1031 # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
1032 
1033 # if !GNULIB_defined_rpl_mkdir
1034 static int
1035 rpl_mkdir (char const *name, mode_t mode)
1036 {
1037  return _mkdir (name);
1038 }
1039 # define GNULIB_defined_rpl_mkdir 1
1040 # endif
1041 
1042 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1043 # define mkdir rpl_mkdir
1044 # endif
1045 _GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode));
1046 # else
1047 _GL_CXXALIAS_SYS (mkdir, int, (char const *name, mode_t mode));
1048 # endif
1049 #endif
1050 _GL_CXXALIASWARN (mkdir);
1051 
1052 
1053 #if 0
1054 # if !1
1055 _GL_FUNCDECL_SYS (mkdirat, int, (int fd, char const *file, mode_t mode)
1056  _GL_ARG_NONNULL ((2)));
1057 # endif
1058 _GL_CXXALIAS_SYS (mkdirat, int, (int fd, char const *file, mode_t mode));
1059 _GL_CXXALIASWARN (mkdirat);
1060 #elif defined GNULIB_POSIXCHECK
1061 # undef mkdirat
1062 # if HAVE_RAW_DECL_MKDIRAT
1063 _GL_WARN_ON_USE (mkdirat, "mkdirat is not portable - "
1064  "use gnulib module openat for portability");
1065 # endif
1066 #endif
1067 
1068 
1069 #if 0
1070 # if 0
1071 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1072 # undef mkfifo
1073 # define mkfifo rpl_mkfifo
1074 # endif
1075 _GL_FUNCDECL_RPL (mkfifo, int, (char const *file, mode_t mode)
1076  _GL_ARG_NONNULL ((1)));
1077 _GL_CXXALIAS_RPL (mkfifo, int, (char const *file, mode_t mode));
1078 # else
1079 # if !1
1080 _GL_FUNCDECL_SYS (mkfifo, int, (char const *file, mode_t mode)
1081  _GL_ARG_NONNULL ((1)));
1082 # endif
1083 _GL_CXXALIAS_SYS (mkfifo, int, (char const *file, mode_t mode));
1084 # endif
1085 _GL_CXXALIASWARN (mkfifo);
1086 #elif defined GNULIB_POSIXCHECK
1087 # undef mkfifo
1088 # if HAVE_RAW_DECL_MKFIFO
1089 _GL_WARN_ON_USE (mkfifo, "mkfifo is not portable - "
1090  "use gnulib module mkfifo for portability");
1091 # endif
1092 #endif
1093 
1094 
1095 #if 0
1096 # if !1
1097 _GL_FUNCDECL_SYS (mkfifoat, int, (int fd, char const *file, mode_t mode)
1098  _GL_ARG_NONNULL ((2)));
1099 # endif
1100 _GL_CXXALIAS_SYS (mkfifoat, int, (int fd, char const *file, mode_t mode));
1101 _GL_CXXALIASWARN (mkfifoat);
1102 #elif defined GNULIB_POSIXCHECK
1103 # undef mkfifoat
1104 # if HAVE_RAW_DECL_MKFIFOAT
1105 _GL_WARN_ON_USE (mkfifoat, "mkfifoat is not portable - "
1106  "use gnulib module mkfifoat for portability");
1107 # endif
1108 #endif
1109 
1110 
1111 #if 0
1112 # if 0
1113 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1114 # undef mknod
1115 # define mknod rpl_mknod
1116 # endif
1117 _GL_FUNCDECL_RPL (mknod, int, (char const *file, mode_t mode, dev_t dev)
1118  _GL_ARG_NONNULL ((1)));
1119 _GL_CXXALIAS_RPL (mknod, int, (char const *file, mode_t mode, dev_t dev));
1120 # else
1121 # if !1
1122 _GL_FUNCDECL_SYS (mknod, int, (char const *file, mode_t mode, dev_t dev)
1123  _GL_ARG_NONNULL ((1)));
1124 # endif
1125 /* Need to cast, because on OSF/1 5.1, the third parameter is '...'. */
1126 _GL_CXXALIAS_SYS_CAST (mknod, int, (char const *file, mode_t mode, dev_t dev));
1127 # endif
1128 _GL_CXXALIASWARN (mknod);
1129 #elif defined GNULIB_POSIXCHECK
1130 # undef mknod
1131 # if HAVE_RAW_DECL_MKNOD
1132 _GL_WARN_ON_USE (mknod, "mknod is not portable - "
1133  "use gnulib module mknod for portability");
1134 # endif
1135 #endif
1136 
1137 
1138 #if 0
1139 # if !1
1140 _GL_FUNCDECL_SYS (mknodat, int,
1141  (int fd, char const *file, mode_t mode, dev_t dev)
1142  _GL_ARG_NONNULL ((2)));
1143 # endif
1144 _GL_CXXALIAS_SYS (mknodat, int,
1145  (int fd, char const *file, mode_t mode, dev_t dev));
1146 _GL_CXXALIASWARN (mknodat);
1147 #elif defined GNULIB_POSIXCHECK
1148 # undef mknodat
1149 # if HAVE_RAW_DECL_MKNODAT
1150 _GL_WARN_ON_USE (mknodat, "mknodat is not portable - "
1151  "use gnulib module mkfifoat for portability");
1152 # endif
1153 #endif
1154 
1155 
1156 #if 1
1157 # if 0
1158 # if !0
1159  /* We can't use the object-like #define stat rpl_stat, because of
1160  struct stat. This means that rpl_stat will not be used if the user
1161  does (stat)(a,b). Oh well. */
1162 # if defined _AIX && defined stat && defined _LARGE_FILES
1163  /* With _LARGE_FILES defined, AIX (only) defines stat to stat64,
1164  so we have to replace stat64() instead of stat(). */
1165 # undef stat64
1166 # define stat64(name, st) rpl_stat (name, st)
1167 # elif 0
1168  /* Above, we define stat to _stati64. */
1169 # if defined __MINGW32__ && defined _stati64
1170 # ifndef _USE_32BIT_TIME_T
1171  /* The system headers define _stati64 to _stat64. */
1172 # undef _stat64
1173 # define _stat64(name, st) rpl_stat (name, st)
1174 # endif
1175 # elif defined _MSC_VER && defined _stati64
1176 # ifdef _USE_32BIT_TIME_T
1177  /* The system headers define _stati64 to _stat32i64. */
1178 # undef _stat32i64
1179 # define _stat32i64(name, st) rpl_stat (name, st)
1180 # else
1181  /* The system headers define _stati64 to _stat64. */
1182 # undef _stat64
1183 # define _stat64(name, st) rpl_stat (name, st)
1184 # endif
1185 # else
1186 # undef _stati64
1187 # define _stati64(name, st) rpl_stat (name, st)
1188 # endif
1189 # elif defined __MINGW32__ && defined stat
1190 # ifdef _USE_32BIT_TIME_T
1191  /* The system headers define stat to _stat32i64. */
1192 # undef _stat32i64
1193 # define _stat32i64(name, st) rpl_stat (name, st)
1194 # else
1195  /* The system headers define stat to _stat64. */
1196 # undef _stat64
1197 # define _stat64(name, st) rpl_stat (name, st)
1198 # endif
1199 # elif defined _MSC_VER && defined stat
1200 # ifdef _USE_32BIT_TIME_T
1201  /* The system headers define stat to _stat32. */
1202 # undef _stat32
1203 # define _stat32(name, st) rpl_stat (name, st)
1204 # else
1205  /* The system headers define stat to _stat64i32. */
1206 # undef _stat64i32
1207 # define _stat64i32(name, st) rpl_stat (name, st)
1208 # endif
1209 # else /* !(_AIX || __MINGW32__ || _MSC_VER) */
1210 # undef stat
1211 # define stat(name, st) rpl_stat (name, st)
1212 # endif /* !_LARGE_FILES */
1213 # endif /* !0 */
1214 _GL_EXTERN_C int stat (const char *name, struct stat *buf)
1215  _GL_ARG_NONNULL ((1, 2));
1216 # endif
1217 #elif 0
1218 /* see above:
1219  #define stat stat_used_without_requesting_gnulib_module_stat
1220  */
1221 #elif defined GNULIB_POSIXCHECK
1222 # undef stat
1223 # if HAVE_RAW_DECL_STAT
1224 _GL_WARN_ON_USE (stat, "stat is unportable - "
1225  "use gnulib module stat for portability");
1226 # endif
1227 #endif
1228 
1229 
1230 #if 0
1231 /* Use the rpl_ prefix also on Solaris <= 9, because on Solaris 9 our utimensat
1232  implementation relies on futimesat, which on Solaris 10 makes an invocation
1233  to utimensat that is meant to invoke the libc's utimensat(), not gnulib's
1234  utimensat(). */
1235 # if 0 || (!1 && defined __sun)
1236 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1237 # undef utimensat
1238 # define utimensat rpl_utimensat
1239 # endif
1240 _GL_FUNCDECL_RPL (utimensat, int, (int fd, char const *name,
1241  struct timespec const times[2], int flag)
1242  _GL_ARG_NONNULL ((2)));
1243 _GL_CXXALIAS_RPL (utimensat, int, (int fd, char const *name,
1244  struct timespec const times[2], int flag));
1245 # else
1246 # if !1
1247 _GL_FUNCDECL_SYS (utimensat, int, (int fd, char const *name,
1248  struct timespec const times[2], int flag)
1249  _GL_ARG_NONNULL ((2)));
1250 # endif
1251 _GL_CXXALIAS_SYS (utimensat, int, (int fd, char const *name,
1252  struct timespec const times[2], int flag));
1253 # endif
1254 # if 1
1255 _GL_CXXALIASWARN (utimensat);
1256 # endif
1257 #elif defined GNULIB_POSIXCHECK
1258 # undef utimensat
1259 # if HAVE_RAW_DECL_UTIMENSAT
1260 _GL_WARN_ON_USE (utimensat, "utimensat is not portable - "
1261  "use gnulib module utimensat for portability");
1262 # endif
1263 #endif
1264 
1265 
1266 #endif /* _GL_SYS_STAT_H */
1267 #endif /* _GL_SYS_STAT_H */
1268 #endif
#define _GL_CXXALIAS_RPL(func, rettype, parameters)
Definition: stat.h:179
#define _GL_WARN_ON_USE(function, message)
Definition: stat.h:473
#define _GL_ARG_NONNULL(params)
Definition: stat.h:394
#define _GL_CXXALIAS_SYS_CAST(func, rettype, parameters)
Definition: stat.h:277
#define _GL_FUNCDECL_SYS(func, rettype, parameters_and_attributes)
Definition: stat.h:167
#define _GL_CXXALIAS_SYS(func, rettype, parameters)
Definition: stat.h:252
#define _GL_EXTERN_C
Definition: stat.h:145
#define _GL_CXXALIAS_RPL_1(func, rpl_func, rettype, parameters)
Definition: stat.h:197
#define _GL_CXXALIAS_RPL_CAST_1(func, rpl_func, rettype, parameters)
Definition: stat.h:222
Definition: time.in.h:71
#define _GL_CXXALIASWARN(func)
Definition: stat.h:336
#define _GL_FUNCDECL_RPL(func, rettype, parameters_and_attributes)
Definition: stat.h:155