]> git.cworth.org Git - tar/blob - gnu/sys_stat.in.h
Imported Upstream version 1.24
[tar] / gnu / sys_stat.in.h
1 /* -*- buffer-read-only: t -*- vi: set ro: */
2 /* DO NOT EDIT! GENERATED AUTOMATICALLY! */
3 /* Provide a more complete sys/stat header file.
4    Copyright (C) 2005-2010 Free Software Foundation, Inc.
5
6    This program is free software; you can redistribute it and/or modify
7    it under the terms of the GNU General Public License as published by
8    the Free Software Foundation; either version 3, or (at your option)
9    any later version.
10
11    This program is distributed in the hope that it will be useful,
12    but WITHOUT ANY WARRANTY; without even the implied warranty of
13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14    GNU General Public License for more details.
15
16    You should have received a copy of the GNU General Public License
17    along with this program; if not, write to the Free Software Foundation,
18    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
19
20 /* Written by Eric Blake, Paul Eggert, and Jim Meyering.  */
21
22 /* This file is supposed to be used on platforms where <sys/stat.h> is
23    incomplete.  It is intended to provide definitions and prototypes
24    needed by an application.  Start with what the system provides.  */
25
26 #if __GNUC__ >= 3
27 @PRAGMA_SYSTEM_HEADER@
28 #endif
29 @PRAGMA_COLUMNS@
30
31 #if defined __need_system_sys_stat_h
32 /* Special invocation convention.  */
33
34 #@INCLUDE_NEXT@ @NEXT_SYS_STAT_H@
35
36 #else
37 /* Normal invocation convention.  */
38
39 #ifndef _GL_SYS_STAT_H
40
41 /* Get nlink_t.  */
42 #include <sys/types.h>
43
44 /* Get struct timespec.  */
45 #include <time.h>
46
47 /* The include_next requires a split double-inclusion guard.  */
48 #@INCLUDE_NEXT@ @NEXT_SYS_STAT_H@
49
50 #ifndef _GL_SYS_STAT_H
51 #define _GL_SYS_STAT_H
52
53 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
54
55 /* The definition of _GL_ARG_NONNULL is copied here.  */
56
57 /* The definition of _GL_WARN_ON_USE is copied here.  */
58
59 /* Before doing "#define mkdir rpl_mkdir" below, we need to include all
60    headers that may declare mkdir().  */
61 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
62 # include <io.h>     /* mingw32, mingw64 */
63 # include <direct.h> /* mingw64 */
64 #endif
65
66 #ifndef S_IFMT
67 # define S_IFMT 0170000
68 #endif
69
70 #if STAT_MACROS_BROKEN
71 # undef S_ISBLK
72 # undef S_ISCHR
73 # undef S_ISDIR
74 # undef S_ISFIFO
75 # undef S_ISLNK
76 # undef S_ISNAM
77 # undef S_ISMPB
78 # undef S_ISMPC
79 # undef S_ISNWK
80 # undef S_ISREG
81 # undef S_ISSOCK
82 #endif
83
84 #ifndef S_ISBLK
85 # ifdef S_IFBLK
86 #  define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
87 # else
88 #  define S_ISBLK(m) 0
89 # endif
90 #endif
91
92 #ifndef S_ISCHR
93 # ifdef S_IFCHR
94 #  define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
95 # else
96 #  define S_ISCHR(m) 0
97 # endif
98 #endif
99
100 #ifndef S_ISDIR
101 # ifdef S_IFDIR
102 #  define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
103 # else
104 #  define S_ISDIR(m) 0
105 # endif
106 #endif
107
108 #ifndef S_ISDOOR /* Solaris 2.5 and up */
109 # define S_ISDOOR(m) 0
110 #endif
111
112 #ifndef S_ISFIFO
113 # ifdef S_IFIFO
114 #  define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
115 # else
116 #  define S_ISFIFO(m) 0
117 # endif
118 #endif
119
120 #ifndef S_ISLNK
121 # ifdef S_IFLNK
122 #  define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
123 # else
124 #  define S_ISLNK(m) 0
125 # endif
126 #endif
127
128 #ifndef S_ISMPB /* V7 */
129 # ifdef S_IFMPB
130 #  define S_ISMPB(m) (((m) & S_IFMT) == S_IFMPB)
131 #  define S_ISMPC(m) (((m) & S_IFMT) == S_IFMPC)
132 # else
133 #  define S_ISMPB(m) 0
134 #  define S_ISMPC(m) 0
135 # endif
136 #endif
137
138 #ifndef S_ISNAM /* Xenix */
139 # ifdef S_IFNAM
140 #  define S_ISNAM(m) (((m) & S_IFMT) == S_IFNAM)
141 # else
142 #  define S_ISNAM(m) 0
143 # endif
144 #endif
145
146 #ifndef S_ISNWK /* HP/UX */
147 # ifdef S_IFNWK
148 #  define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK)
149 # else
150 #  define S_ISNWK(m) 0
151 # endif
152 #endif
153
154 #ifndef S_ISPORT /* Solaris 10 and up */
155 # define S_ISPORT(m) 0
156 #endif
157
158 #ifndef S_ISREG
159 # ifdef S_IFREG
160 #  define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
161 # else
162 #  define S_ISREG(m) 0
163 # endif
164 #endif
165
166 #ifndef S_ISSOCK
167 # ifdef S_IFSOCK
168 #  define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
169 # else
170 #  define S_ISSOCK(m) 0
171 # endif
172 #endif
173
174
175 #ifndef S_TYPEISMQ
176 # define S_TYPEISMQ(p) 0
177 #endif
178
179 #ifndef S_TYPEISTMO
180 # define S_TYPEISTMO(p) 0
181 #endif
182
183
184 #ifndef S_TYPEISSEM
185 # ifdef S_INSEM
186 #  define S_TYPEISSEM(p) (S_ISNAM ((p)->st_mode) && (p)->st_rdev == S_INSEM)
187 # else
188 #  define S_TYPEISSEM(p) 0
189 # endif
190 #endif
191
192 #ifndef S_TYPEISSHM
193 # ifdef S_INSHD
194 #  define S_TYPEISSHM(p) (S_ISNAM ((p)->st_mode) && (p)->st_rdev == S_INSHD)
195 # else
196 #  define S_TYPEISSHM(p) 0
197 # endif
198 #endif
199
200 /* high performance ("contiguous data") */
201 #ifndef S_ISCTG
202 # define S_ISCTG(p) 0
203 #endif
204
205 /* Cray DMF (data migration facility): off line, with data  */
206 #ifndef S_ISOFD
207 # define S_ISOFD(p) 0
208 #endif
209
210 /* Cray DMF (data migration facility): off line, with no data  */
211 #ifndef S_ISOFL
212 # define S_ISOFL(p) 0
213 #endif
214
215 /* 4.4BSD whiteout */
216 #ifndef S_ISWHT
217 # define S_ISWHT(m) 0
218 #endif
219
220 /* If any of the following are undefined,
221    define them to their de facto standard values.  */
222 #if !S_ISUID
223 # define S_ISUID 04000
224 #endif
225 #if !S_ISGID
226 # define S_ISGID 02000
227 #endif
228
229 /* S_ISVTX is a common extension to POSIX.  */
230 #ifndef S_ISVTX
231 # define S_ISVTX 01000
232 #endif
233
234 #if !S_IRUSR && S_IREAD
235 # define S_IRUSR S_IREAD
236 #endif
237 #if !S_IRUSR
238 # define S_IRUSR 00400
239 #endif
240 #if !S_IRGRP
241 # define S_IRGRP (S_IRUSR >> 3)
242 #endif
243 #if !S_IROTH
244 # define S_IROTH (S_IRUSR >> 6)
245 #endif
246
247 #if !S_IWUSR && S_IWRITE
248 # define S_IWUSR S_IWRITE
249 #endif
250 #if !S_IWUSR
251 # define S_IWUSR 00200
252 #endif
253 #if !S_IWGRP
254 # define S_IWGRP (S_IWUSR >> 3)
255 #endif
256 #if !S_IWOTH
257 # define S_IWOTH (S_IWUSR >> 6)
258 #endif
259
260 #if !S_IXUSR && S_IEXEC
261 # define S_IXUSR S_IEXEC
262 #endif
263 #if !S_IXUSR
264 # define S_IXUSR 00100
265 #endif
266 #if !S_IXGRP
267 # define S_IXGRP (S_IXUSR >> 3)
268 #endif
269 #if !S_IXOTH
270 # define S_IXOTH (S_IXUSR >> 6)
271 #endif
272
273 #if !S_IRWXU
274 # define S_IRWXU (S_IRUSR | S_IWUSR | S_IXUSR)
275 #endif
276 #if !S_IRWXG
277 # define S_IRWXG (S_IRGRP | S_IWGRP | S_IXGRP)
278 #endif
279 #if !S_IRWXO
280 # define S_IRWXO (S_IROTH | S_IWOTH | S_IXOTH)
281 #endif
282
283 /* S_IXUGO is a common extension to POSIX.  */
284 #if !S_IXUGO
285 # define S_IXUGO (S_IXUSR | S_IXGRP | S_IXOTH)
286 #endif
287
288 #ifndef S_IRWXUGO
289 # define S_IRWXUGO (S_IRWXU | S_IRWXG | S_IRWXO)
290 #endif
291
292 /* Macros for futimens and utimensat.  */
293 #ifndef UTIME_NOW
294 # define UTIME_NOW (-1)
295 # define UTIME_OMIT (-2)
296 #endif
297
298
299 #if @GNULIB_FCHMODAT@
300 # if !@HAVE_FCHMODAT@
301 _GL_FUNCDECL_SYS (fchmodat, int,
302                   (int fd, char const *file, mode_t mode, int flag)
303                   _GL_ARG_NONNULL ((2)));
304 # endif
305 _GL_CXXALIAS_SYS (fchmodat, int,
306                   (int fd, char const *file, mode_t mode, int flag));
307 _GL_CXXALIASWARN (fchmodat);
308 #elif defined GNULIB_POSIXCHECK
309 # undef fchmodat
310 # if HAVE_RAW_DECL_FCHMODAT
311 _GL_WARN_ON_USE (fchmodat, "fchmodat is not portable - "
312                  "use gnulib module openat for portability");
313 # endif
314 #endif
315
316
317 #if @REPLACE_FSTAT@
318 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
319 #  define fstat rpl_fstat
320 # endif
321 _GL_FUNCDECL_RPL (fstat, int, (int fd, struct stat *buf) _GL_ARG_NONNULL ((2)));
322 _GL_CXXALIAS_RPL (fstat, int, (int fd, struct stat *buf));
323 #else
324 _GL_CXXALIAS_SYS (fstat, int, (int fd, struct stat *buf));
325 #endif
326 _GL_CXXALIASWARN (fstat);
327
328
329 #if @GNULIB_FSTATAT@
330 # if @REPLACE_FSTATAT@
331 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
332 #   undef fstatat
333 #   define fstatat rpl_fstatat
334 #  endif
335 _GL_FUNCDECL_RPL (fstatat, int,
336                   (int fd, char const *name, struct stat *st, int flags)
337                   _GL_ARG_NONNULL ((2, 3)));
338 _GL_CXXALIAS_RPL (fstatat, int,
339                   (int fd, char const *name, struct stat *st, int flags));
340 # else
341 #  if !@HAVE_FSTATAT@
342 _GL_FUNCDECL_SYS (fstatat, int,
343                   (int fd, char const *name, struct stat *st, int flags)
344                   _GL_ARG_NONNULL ((2, 3)));
345 #  endif
346 _GL_CXXALIAS_SYS (fstatat, int,
347                   (int fd, char const *name, struct stat *st, int flags));
348 # endif
349 _GL_CXXALIASWARN (fstatat);
350 #elif defined GNULIB_POSIXCHECK
351 # undef fstatat
352 # if HAVE_RAW_DECL_FSTATAT
353 _GL_WARN_ON_USE (fstatat, "fstatat is not portable - "
354                  "use gnulib module openat for portability");
355 # endif
356 #endif
357
358
359 #if @GNULIB_FUTIMENS@
360 # if @REPLACE_FUTIMENS@
361 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
362 #   undef futimens
363 #   define futimens rpl_futimens
364 #  endif
365 _GL_FUNCDECL_RPL (futimens, int, (int fd, struct timespec const times[2]));
366 _GL_CXXALIAS_RPL (futimens, int, (int fd, struct timespec const times[2]));
367 # else
368 #  if !@HAVE_FUTIMENS@
369 _GL_FUNCDECL_SYS (futimens, int, (int fd, struct timespec const times[2]));
370 #  endif
371 _GL_CXXALIAS_SYS (futimens, int, (int fd, struct timespec const times[2]));
372 # endif
373 _GL_CXXALIASWARN (futimens);
374 #elif defined GNULIB_POSIXCHECK
375 # undef futimens
376 # if HAVE_RAW_DECL_FUTIMENS
377 _GL_WARN_ON_USE (futimens, "futimens is not portable - "
378                  "use gnulib module futimens for portability");
379 # endif
380 #endif
381
382
383 #if @GNULIB_LCHMOD@
384 /* Change the mode of FILENAME to MODE, without dereferencing it if FILENAME
385    denotes a symbolic link.  */
386 # if !@HAVE_LCHMOD@
387 /* The lchmod replacement follows symbolic links.  Callers should take
388    this into account; lchmod should be applied only to arguments that
389    are known to not be symbolic links.  On hosts that lack lchmod,
390    this can lead to race conditions between the check and the
391    invocation of lchmod, but we know of no workarounds that are
392    reliable in general.  You might try requesting support for lchmod
393    from your operating system supplier.  */
394 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
395 #   define lchmod chmod
396 #  endif
397 /* Need to cast, because on mingw, the second parameter of chmod is
398                                                 int mode.  */
399 _GL_CXXALIAS_RPL_CAST_1 (lchmod, chmod, int,
400                          (const char *filename, mode_t mode));
401 # else
402 #  if 0 /* assume already declared */
403 _GL_FUNCDECL_SYS (lchmod, int, (const char *filename, mode_t mode)
404                                _GL_ARG_NONNULL ((1)));
405 #  endif
406 _GL_CXXALIAS_SYS (lchmod, int, (const char *filename, mode_t mode));
407 # endif
408 # if @HAVE_LCHMOD@
409 _GL_CXXALIASWARN (lchmod);
410 # endif
411 #elif defined GNULIB_POSIXCHECK
412 # undef lchmod
413 # if HAVE_RAW_DECL_LCHMOD
414 _GL_WARN_ON_USE (lchmod, "lchmod is unportable - "
415                  "use gnulib module lchmod for portability");
416 # endif
417 #endif
418
419
420 #if @GNULIB_LSTAT@
421 # if ! @HAVE_LSTAT@
422 /* mingw does not support symlinks, therefore it does not have lstat.  But
423    without links, stat does just fine.  */
424 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
425 #   define lstat stat
426 #  endif
427 _GL_CXXALIAS_RPL_1 (lstat, stat, int, (const char *name, struct stat *buf));
428 # elif @REPLACE_LSTAT@
429 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
430 #   undef lstat
431 #   define lstat rpl_lstat
432 #  endif
433 _GL_FUNCDECL_RPL (lstat, int, (const char *name, struct stat *buf)
434                               _GL_ARG_NONNULL ((1, 2)));
435 _GL_CXXALIAS_RPL (lstat, int, (const char *name, struct stat *buf));
436 # else
437 _GL_CXXALIAS_SYS (lstat, int, (const char *name, struct stat *buf));
438 # endif
439 # if @HAVE_LSTAT@
440 _GL_CXXALIASWARN (lstat);
441 # endif
442 #elif defined GNULIB_POSIXCHECK
443 # undef lstat
444 # if HAVE_RAW_DECL_LSTAT
445 _GL_WARN_ON_USE (lstat, "lstat is unportable - "
446                  "use gnulib module lstat for portability");
447 # endif
448 #endif
449
450
451 #if @REPLACE_MKDIR@
452 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
453 #  undef mkdir
454 #  define mkdir rpl_mkdir
455 # endif
456 _GL_FUNCDECL_RPL (mkdir, int, (char const *name, mode_t mode)
457                               _GL_ARG_NONNULL ((1)));
458 _GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode));
459 #else
460 /* mingw's _mkdir() function has 1 argument, but we pass 2 arguments.
461    Additionally, it declares _mkdir (and depending on compile flags, an
462    alias mkdir), only in the nonstandard includes <direct.h> and <io.h>,
463    which are included above.  */
464 # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
465
466 static inline int
467 rpl_mkdir (char const *name, mode_t mode)
468 {
469   return _mkdir (name);
470 }
471
472 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
473 #   define mkdir rpl_mkdir
474 #  endif
475 _GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode));
476 # else
477 _GL_CXXALIAS_SYS (mkdir, int, (char const *name, mode_t mode));
478 # endif
479 #endif
480 _GL_CXXALIASWARN (mkdir);
481
482
483 #if @GNULIB_MKDIRAT@
484 # if !@HAVE_MKDIRAT@
485 _GL_FUNCDECL_SYS (mkdirat, int, (int fd, char const *file, mode_t mode)
486                                 _GL_ARG_NONNULL ((2)));
487 # endif
488 _GL_CXXALIAS_SYS (mkdirat, int, (int fd, char const *file, mode_t mode));
489 _GL_CXXALIASWARN (mkdirat);
490 #elif defined GNULIB_POSIXCHECK
491 # undef mkdirat
492 # if HAVE_RAW_DECL_MKDIRAT
493 _GL_WARN_ON_USE (mkdirat, "mkdirat is not portable - "
494                  "use gnulib module openat for portability");
495 # endif
496 #endif
497
498
499 #if @GNULIB_MKFIFO@
500 # if @REPLACE_MKFIFO@
501 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
502 #   undef mkfifo
503 #   define mkfifo rpl_mkfifo
504 #  endif
505 _GL_FUNCDECL_RPL (mkfifo, int, (char const *file, mode_t mode)
506                                _GL_ARG_NONNULL ((1)));
507 _GL_CXXALIAS_RPL (mkfifo, int, (char const *file, mode_t mode));
508 # else
509 #  if !@HAVE_MKFIFO@
510 _GL_FUNCDECL_SYS (mkfifo, int, (char const *file, mode_t mode)
511                                _GL_ARG_NONNULL ((1)));
512 #  endif
513 _GL_CXXALIAS_SYS (mkfifo, int, (char const *file, mode_t mode));
514 # endif
515 _GL_CXXALIASWARN (mkfifo);
516 #elif defined GNULIB_POSIXCHECK
517 # undef mkfifo
518 # if HAVE_RAW_DECL_MKFIFO
519 _GL_WARN_ON_USE (mkfifo, "mkfifo is not portable - "
520                  "use gnulib module mkfifo for portability");
521 # endif
522 #endif
523
524
525 #if @GNULIB_MKFIFOAT@
526 # if !@HAVE_MKFIFOAT@
527 _GL_FUNCDECL_SYS (mkfifoat, int, (int fd, char const *file, mode_t mode)
528                                  _GL_ARG_NONNULL ((2)));
529 # endif
530 _GL_CXXALIAS_SYS (mkfifoat, int, (int fd, char const *file, mode_t mode));
531 _GL_CXXALIASWARN (mkfifoat);
532 #elif defined GNULIB_POSIXCHECK
533 # undef mkfifoat
534 # if HAVE_RAW_DECL_MKFIFOAT
535 _GL_WARN_ON_USE (mkfifoat, "mkfifoat is not portable - "
536                  "use gnulib module mkfifoat for portability");
537 # endif
538 #endif
539
540
541 #if @GNULIB_MKNOD@
542 # if @REPLACE_MKNOD@
543 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
544 #   undef mknod
545 #   define mknod rpl_mknod
546 #  endif
547 _GL_FUNCDECL_RPL (mknod, int, (char const *file, mode_t mode, dev_t dev)
548                               _GL_ARG_NONNULL ((1)));
549 _GL_CXXALIAS_RPL (mknod, int, (char const *file, mode_t mode, dev_t dev));
550 # else
551 #  if !@HAVE_MKNOD@
552 _GL_FUNCDECL_SYS (mknod, int, (char const *file, mode_t mode, dev_t dev)
553                               _GL_ARG_NONNULL ((1)));
554 #  endif
555 _GL_CXXALIAS_SYS (mknod, int, (char const *file, mode_t mode, dev_t dev));
556 # endif
557 _GL_CXXALIASWARN (mknod);
558 #elif defined GNULIB_POSIXCHECK
559 # undef mknod
560 # if HAVE_RAW_DECL_MKNOD
561 _GL_WARN_ON_USE (mknod, "mknod is not portable - "
562                  "use gnulib module mknod for portability");
563 # endif
564 #endif
565
566
567 #if @GNULIB_MKNODAT@
568 # if !@HAVE_MKNODAT@
569 _GL_FUNCDECL_SYS (mknodat, int,
570                   (int fd, char const *file, mode_t mode, dev_t dev)
571                   _GL_ARG_NONNULL ((2)));
572 # endif
573 _GL_CXXALIAS_SYS (mknodat, int,
574                   (int fd, char const *file, mode_t mode, dev_t dev));
575 _GL_CXXALIASWARN (mknodat);
576 #elif defined GNULIB_POSIXCHECK
577 # undef mknodat
578 # if HAVE_RAW_DECL_MKNODAT
579 _GL_WARN_ON_USE (mknodat, "mknodat is not portable - "
580                  "use gnulib module mkfifoat for portability");
581 # endif
582 #endif
583
584
585 #if @GNULIB_STAT@
586 # if @REPLACE_STAT@
587 /* We can't use the object-like #define stat rpl_stat, because of
588    struct stat.  This means that rpl_stat will not be used if the user
589    does (stat)(a,b).  Oh well.  */
590 #  undef stat
591 #  ifdef _LARGE_FILES
592     /* With _LARGE_FILES defined, AIX (only) defines stat to stat64,
593        so we have to replace stat64() instead of stat(). */
594 #   define stat stat64
595 #   undef stat64
596 #   define stat64(name, st) rpl_stat (name, st)
597 #  else /* !_LARGE_FILES */
598 #   define stat(name, st) rpl_stat (name, st)
599 #  endif /* !_LARGE_FILES */
600 _GL_EXTERN_C int stat (const char *name, struct stat *buf)
601                       _GL_ARG_NONNULL ((1, 2));
602 # endif
603 #elif defined GNULIB_POSIXCHECK
604 # undef stat
605 # if HAVE_RAW_DECL_STAT
606 _GL_WARN_ON_USE (stat, "stat is unportable - "
607                  "use gnulib module stat for portability");
608 # endif
609 #endif
610
611
612 #if @GNULIB_UTIMENSAT@
613 # if @REPLACE_UTIMENSAT@
614 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
615 #   undef utimensat
616 #   define utimensat rpl_utimensat
617 #  endif
618 _GL_FUNCDECL_RPL (utimensat, int, (int fd, char const *name,
619                                    struct timespec const times[2], int flag)
620                                   _GL_ARG_NONNULL ((2)));
621 _GL_CXXALIAS_RPL (utimensat, int, (int fd, char const *name,
622                                    struct timespec const times[2], int flag));
623 # else
624 #  if !@HAVE_UTIMENSAT@
625 _GL_FUNCDECL_SYS (utimensat, int, (int fd, char const *name,
626                                    struct timespec const times[2], int flag)
627                                   _GL_ARG_NONNULL ((2)));
628 #  endif
629 _GL_CXXALIAS_SYS (utimensat, int, (int fd, char const *name,
630                                    struct timespec const times[2], int flag));
631 # endif
632 _GL_CXXALIASWARN (utimensat);
633 #elif defined GNULIB_POSIXCHECK
634 # undef utimensat
635 # if HAVE_RAW_DECL_UTIMENSAT
636 _GL_WARN_ON_USE (utimensat, "utimensat is not portable - "
637                  "use gnulib module utimensat for portability");
638 # endif
639 #endif
640
641
642 #endif /* _GL_SYS_STAT_H */
643 #endif /* _GL_SYS_STAT_H */
644 #endif