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