Back to index

nagios-plugins  1.4.16
sys_stat.in.h
Go to the documentation of this file.
00001 /* Provide a more complete sys/stat header file.
00002    Copyright (C) 2005-2010 Free Software Foundation, Inc.
00003 
00004    This program is free software; you can redistribute it and/or modify
00005    it under the terms of the GNU General Public License as published by
00006    the Free Software Foundation; either version 3, or (at your option)
00007    any later version.
00008 
00009    This program is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012    GNU General Public License for more details.
00013 
00014    You should have received a copy of the GNU General Public License
00015    along with this program; if not, write to the Free Software Foundation,
00016    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
00017 
00018 /* Written by Eric Blake, Paul Eggert, and Jim Meyering.  */
00019 
00020 /* This file is supposed to be used on platforms where <sys/stat.h> is
00021    incomplete.  It is intended to provide definitions and prototypes
00022    needed by an application.  Start with what the system provides.  */
00023 
00024 #if __GNUC__ >= 3
00025 @PRAGMA_SYSTEM_HEADER@
00026 #endif
00027 
00028 #if defined __need_system_sys_stat_h
00029 /* Special invocation convention.  */
00030 
00031 #@INCLUDE_NEXT@ @NEXT_SYS_STAT_H@
00032 
00033 #else
00034 /* Normal invocation convention.  */
00035 
00036 #ifndef _GL_SYS_STAT_H
00037 
00038 /* Get nlink_t.  */
00039 #include <sys/types.h>
00040 
00041 /* Get struct timespec.  */
00042 #include <time.h>
00043 
00044 /* The include_next requires a split double-inclusion guard.  */
00045 #@INCLUDE_NEXT@ @NEXT_SYS_STAT_H@
00046 
00047 #ifndef _GL_SYS_STAT_H
00048 #define _GL_SYS_STAT_H
00049 
00050 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
00051 
00052 /* The definition of _GL_ARG_NONNULL is copied here.  */
00053 
00054 /* The definition of _GL_WARN_ON_USE is copied here.  */
00055 
00056 /* Before doing "#define mkdir rpl_mkdir" below, we need to include all
00057    headers that may declare mkdir().  */
00058 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
00059 # include <io.h>     /* mingw32, mingw64 */
00060 # include <direct.h> /* mingw64 */
00061 #endif
00062 
00063 #ifndef S_IFMT
00064 # define S_IFMT 0170000
00065 #endif
00066 
00067 #if STAT_MACROS_BROKEN
00068 # undef S_ISBLK
00069 # undef S_ISCHR
00070 # undef S_ISDIR
00071 # undef S_ISFIFO
00072 # undef S_ISLNK
00073 # undef S_ISNAM
00074 # undef S_ISMPB
00075 # undef S_ISMPC
00076 # undef S_ISNWK
00077 # undef S_ISREG
00078 # undef S_ISSOCK
00079 #endif
00080 
00081 #ifndef S_ISBLK
00082 # ifdef S_IFBLK
00083 #  define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
00084 # else
00085 #  define S_ISBLK(m) 0
00086 # endif
00087 #endif
00088 
00089 #ifndef S_ISCHR
00090 # ifdef S_IFCHR
00091 #  define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
00092 # else
00093 #  define S_ISCHR(m) 0
00094 # endif
00095 #endif
00096 
00097 #ifndef S_ISDIR
00098 # ifdef S_IFDIR
00099 #  define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
00100 # else
00101 #  define S_ISDIR(m) 0
00102 # endif
00103 #endif
00104 
00105 #ifndef S_ISDOOR /* Solaris 2.5 and up */
00106 # define S_ISDOOR(m) 0
00107 #endif
00108 
00109 #ifndef S_ISFIFO
00110 # ifdef S_IFIFO
00111 #  define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
00112 # else
00113 #  define S_ISFIFO(m) 0
00114 # endif
00115 #endif
00116 
00117 #ifndef S_ISLNK
00118 # ifdef S_IFLNK
00119 #  define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
00120 # else
00121 #  define S_ISLNK(m) 0
00122 # endif
00123 #endif
00124 
00125 #ifndef S_ISMPB /* V7 */
00126 # ifdef S_IFMPB
00127 #  define S_ISMPB(m) (((m) & S_IFMT) == S_IFMPB)
00128 #  define S_ISMPC(m) (((m) & S_IFMT) == S_IFMPC)
00129 # else
00130 #  define S_ISMPB(m) 0
00131 #  define S_ISMPC(m) 0
00132 # endif
00133 #endif
00134 
00135 #ifndef S_ISNAM /* Xenix */
00136 # ifdef S_IFNAM
00137 #  define S_ISNAM(m) (((m) & S_IFMT) == S_IFNAM)
00138 # else
00139 #  define S_ISNAM(m) 0
00140 # endif
00141 #endif
00142 
00143 #ifndef S_ISNWK /* HP/UX */
00144 # ifdef S_IFNWK
00145 #  define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK)
00146 # else
00147 #  define S_ISNWK(m) 0
00148 # endif
00149 #endif
00150 
00151 #ifndef S_ISPORT /* Solaris 10 and up */
00152 # define S_ISPORT(m) 0
00153 #endif
00154 
00155 #ifndef S_ISREG
00156 # ifdef S_IFREG
00157 #  define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
00158 # else
00159 #  define S_ISREG(m) 0
00160 # endif
00161 #endif
00162 
00163 #ifndef S_ISSOCK
00164 # ifdef S_IFSOCK
00165 #  define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
00166 # else
00167 #  define S_ISSOCK(m) 0
00168 # endif
00169 #endif
00170 
00171 
00172 #ifndef S_TYPEISMQ
00173 # define S_TYPEISMQ(p) 0
00174 #endif
00175 
00176 #ifndef S_TYPEISTMO
00177 # define S_TYPEISTMO(p) 0
00178 #endif
00179 
00180 
00181 #ifndef S_TYPEISSEM
00182 # ifdef S_INSEM
00183 #  define S_TYPEISSEM(p) (S_ISNAM ((p)->st_mode) && (p)->st_rdev == S_INSEM)
00184 # else
00185 #  define S_TYPEISSEM(p) 0
00186 # endif
00187 #endif
00188 
00189 #ifndef S_TYPEISSHM
00190 # ifdef S_INSHD
00191 #  define S_TYPEISSHM(p) (S_ISNAM ((p)->st_mode) && (p)->st_rdev == S_INSHD)
00192 # else
00193 #  define S_TYPEISSHM(p) 0
00194 # endif
00195 #endif
00196 
00197 /* high performance ("contiguous data") */
00198 #ifndef S_ISCTG
00199 # define S_ISCTG(p) 0
00200 #endif
00201 
00202 /* Cray DMF (data migration facility): off line, with data  */
00203 #ifndef S_ISOFD
00204 # define S_ISOFD(p) 0
00205 #endif
00206 
00207 /* Cray DMF (data migration facility): off line, with no data  */
00208 #ifndef S_ISOFL
00209 # define S_ISOFL(p) 0
00210 #endif
00211 
00212 /* 4.4BSD whiteout */
00213 #ifndef S_ISWHT
00214 # define S_ISWHT(m) 0
00215 #endif
00216 
00217 /* If any of the following are undefined,
00218    define them to their de facto standard values.  */
00219 #if !S_ISUID
00220 # define S_ISUID 04000
00221 #endif
00222 #if !S_ISGID
00223 # define S_ISGID 02000
00224 #endif
00225 
00226 /* S_ISVTX is a common extension to POSIX.  */
00227 #ifndef S_ISVTX
00228 # define S_ISVTX 01000
00229 #endif
00230 
00231 #if !S_IRUSR && S_IREAD
00232 # define S_IRUSR S_IREAD
00233 #endif
00234 #if !S_IRUSR
00235 # define S_IRUSR 00400
00236 #endif
00237 #if !S_IRGRP
00238 # define S_IRGRP (S_IRUSR >> 3)
00239 #endif
00240 #if !S_IROTH
00241 # define S_IROTH (S_IRUSR >> 6)
00242 #endif
00243 
00244 #if !S_IWUSR && S_IWRITE
00245 # define S_IWUSR S_IWRITE
00246 #endif
00247 #if !S_IWUSR
00248 # define S_IWUSR 00200
00249 #endif
00250 #if !S_IWGRP
00251 # define S_IWGRP (S_IWUSR >> 3)
00252 #endif
00253 #if !S_IWOTH
00254 # define S_IWOTH (S_IWUSR >> 6)
00255 #endif
00256 
00257 #if !S_IXUSR && S_IEXEC
00258 # define S_IXUSR S_IEXEC
00259 #endif
00260 #if !S_IXUSR
00261 # define S_IXUSR 00100
00262 #endif
00263 #if !S_IXGRP
00264 # define S_IXGRP (S_IXUSR >> 3)
00265 #endif
00266 #if !S_IXOTH
00267 # define S_IXOTH (S_IXUSR >> 6)
00268 #endif
00269 
00270 #if !S_IRWXU
00271 # define S_IRWXU (S_IRUSR | S_IWUSR | S_IXUSR)
00272 #endif
00273 #if !S_IRWXG
00274 # define S_IRWXG (S_IRGRP | S_IWGRP | S_IXGRP)
00275 #endif
00276 #if !S_IRWXO
00277 # define S_IRWXO (S_IROTH | S_IWOTH | S_IXOTH)
00278 #endif
00279 
00280 /* S_IXUGO is a common extension to POSIX.  */
00281 #if !S_IXUGO
00282 # define S_IXUGO (S_IXUSR | S_IXGRP | S_IXOTH)
00283 #endif
00284 
00285 #ifndef S_IRWXUGO
00286 # define S_IRWXUGO (S_IRWXU | S_IRWXG | S_IRWXO)
00287 #endif
00288 
00289 /* Macros for futimens and utimensat.  */
00290 #ifndef UTIME_NOW
00291 # define UTIME_NOW (-1)
00292 # define UTIME_OMIT (-2)
00293 #endif
00294 
00295 
00296 #if @GNULIB_FCHMODAT@
00297 # if !@HAVE_FCHMODAT@
00298 _GL_FUNCDECL_SYS (fchmodat, int,
00299                   (int fd, char const *file, mode_t mode, int flag)
00300                   _GL_ARG_NONNULL ((2)));
00301 # endif
00302 _GL_CXXALIAS_SYS (fchmodat, int,
00303                   (int fd, char const *file, mode_t mode, int flag));
00304 _GL_CXXALIASWARN (fchmodat);
00305 #elif defined GNULIB_POSIXCHECK
00306 # undef fchmodat
00307 # if HAVE_RAW_DECL_FCHMODAT
00308 _GL_WARN_ON_USE (fchmodat, "fchmodat is not portable - "
00309                  "use gnulib module openat for portability");
00310 # endif
00311 #endif
00312 
00313 
00314 #if @REPLACE_FSTAT@
00315 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00316 #  define fstat rpl_fstat
00317 # endif
00318 _GL_FUNCDECL_RPL (fstat, int, (int fd, struct stat *buf) _GL_ARG_NONNULL ((2)));
00319 _GL_CXXALIAS_RPL (fstat, int, (int fd, struct stat *buf));
00320 #else
00321 _GL_CXXALIAS_SYS (fstat, int, (int fd, struct stat *buf));
00322 #endif
00323 _GL_CXXALIASWARN (fstat);
00324 
00325 
00326 #if @GNULIB_FSTATAT@
00327 # if @REPLACE_FSTATAT@
00328 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00329 #   undef fstatat
00330 #   define fstatat rpl_fstatat
00331 #  endif
00332 _GL_FUNCDECL_RPL (fstatat, int,
00333                   (int fd, char const *name, struct stat *st, int flags)
00334                   _GL_ARG_NONNULL ((2, 3)));
00335 _GL_CXXALIAS_RPL (fstatat, int,
00336                   (int fd, char const *name, struct stat *st, int flags));
00337 # else
00338 #  if !@HAVE_FSTATAT@
00339 _GL_FUNCDECL_SYS (fstatat, int,
00340                   (int fd, char const *name, struct stat *st, int flags)
00341                   _GL_ARG_NONNULL ((2, 3)));
00342 #  endif
00343 _GL_CXXALIAS_SYS (fstatat, int,
00344                   (int fd, char const *name, struct stat *st, int flags));
00345 # endif
00346 _GL_CXXALIASWARN (fstatat);
00347 #elif defined GNULIB_POSIXCHECK
00348 # undef fstatat
00349 # if HAVE_RAW_DECL_FSTATAT
00350 _GL_WARN_ON_USE (fstatat, "fstatat is not portable - "
00351                  "use gnulib module openat for portability");
00352 # endif
00353 #endif
00354 
00355 
00356 #if @GNULIB_FUTIMENS@
00357 # if @REPLACE_FUTIMENS@
00358 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00359 #   undef futimens
00360 #   define futimens rpl_futimens
00361 #  endif
00362 _GL_FUNCDECL_RPL (futimens, int, (int fd, struct timespec const times[2]));
00363 _GL_CXXALIAS_RPL (futimens, int, (int fd, struct timespec const times[2]));
00364 # else
00365 #  if !@HAVE_FUTIMENS@
00366 _GL_FUNCDECL_SYS (futimens, int, (int fd, struct timespec const times[2]));
00367 #  endif
00368 _GL_CXXALIAS_SYS (futimens, int, (int fd, struct timespec const times[2]));
00369 # endif
00370 _GL_CXXALIASWARN (futimens);
00371 #elif defined GNULIB_POSIXCHECK
00372 # undef futimens
00373 # if HAVE_RAW_DECL_FUTIMENS
00374 _GL_WARN_ON_USE (futimens, "futimens is not portable - "
00375                  "use gnulib module futimens for portability");
00376 # endif
00377 #endif
00378 
00379 
00380 #if @GNULIB_LCHMOD@
00381 /* Change the mode of FILENAME to MODE, without dereferencing it if FILENAME
00382    denotes a symbolic link.  */
00383 # if !@HAVE_LCHMOD@
00384 /* The lchmod replacement follows symbolic links.  Callers should take
00385    this into account; lchmod should be applied only to arguments that
00386    are known to not be symbolic links.  On hosts that lack lchmod,
00387    this can lead to race conditions between the check and the
00388    invocation of lchmod, but we know of no workarounds that are
00389    reliable in general.  You might try requesting support for lchmod
00390    from your operating system supplier.  */
00391 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00392 #   define lchmod chmod
00393 #  endif
00394 /* Need to cast, because on mingw, the second parameter of chmod is
00395                                                 int mode.  */
00396 _GL_CXXALIAS_RPL_CAST_1 (lchmod, chmod, int,
00397                          (const char *filename, mode_t mode));
00398 # else
00399 #  if 0 /* assume already declared */
00400 _GL_FUNCDECL_SYS (lchmod, int, (const char *filename, mode_t mode)
00401                                _GL_ARG_NONNULL ((1)));
00402 #  endif
00403 _GL_CXXALIAS_SYS (lchmod, int, (const char *filename, mode_t mode));
00404 # endif
00405 # if @HAVE_LCHMOD@
00406 _GL_CXXALIASWARN (lchmod);
00407 # endif
00408 #elif defined GNULIB_POSIXCHECK
00409 # undef lchmod
00410 # if HAVE_RAW_DECL_LCHMOD
00411 _GL_WARN_ON_USE (lchmod, "lchmod is unportable - "
00412                  "use gnulib module lchmod for portability");
00413 # endif
00414 #endif
00415 
00416 
00417 #if @GNULIB_LSTAT@
00418 # if ! @HAVE_LSTAT@
00419 /* mingw does not support symlinks, therefore it does not have lstat.  But
00420    without links, stat does just fine.  */
00421 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00422 #   define lstat stat
00423 #  endif
00424 _GL_CXXALIAS_RPL_1 (lstat, stat, int, (const char *name, struct stat *buf));
00425 # elif @REPLACE_LSTAT@
00426 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00427 #   undef lstat
00428 #   define lstat rpl_lstat
00429 #  endif
00430 _GL_FUNCDECL_RPL (lstat, int, (const char *name, struct stat *buf)
00431                               _GL_ARG_NONNULL ((1, 2)));
00432 _GL_CXXALIAS_RPL (lstat, int, (const char *name, struct stat *buf));
00433 # else
00434 _GL_CXXALIAS_SYS (lstat, int, (const char *name, struct stat *buf));
00435 # endif
00436 # if @HAVE_LSTAT@
00437 _GL_CXXALIASWARN (lstat);
00438 # endif
00439 #elif defined GNULIB_POSIXCHECK
00440 # undef lstat
00441 # if HAVE_RAW_DECL_LSTAT
00442 _GL_WARN_ON_USE (lstat, "lstat is unportable - "
00443                  "use gnulib module lstat for portability");
00444 # endif
00445 #endif
00446 
00447 
00448 #if @REPLACE_MKDIR@
00449 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00450 #  undef mkdir
00451 #  define mkdir rpl_mkdir
00452 # endif
00453 _GL_FUNCDECL_RPL (mkdir, int, (char const *name, mode_t mode)
00454                               _GL_ARG_NONNULL ((1)));
00455 _GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode));
00456 #else
00457 /* mingw's _mkdir() function has 1 argument, but we pass 2 arguments.
00458    Additionally, it declares _mkdir (and depending on compile flags, an
00459    alias mkdir), only in the nonstandard includes <direct.h> and <io.h>,
00460    which are included above.  */
00461 # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
00462 
00463 static inline int
00464 rpl_mkdir (char const *name, mode_t mode)
00465 {
00466   return _mkdir (name);
00467 }
00468 
00469 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00470 #   define mkdir rpl_mkdir
00471 #  endif
00472 _GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode));
00473 # else
00474 _GL_CXXALIAS_SYS (mkdir, int, (char const *name, mode_t mode));
00475 # endif
00476 #endif
00477 _GL_CXXALIASWARN (mkdir);
00478 
00479 
00480 #if @GNULIB_MKDIRAT@
00481 # if !@HAVE_MKDIRAT@
00482 _GL_FUNCDECL_SYS (mkdirat, int, (int fd, char const *file, mode_t mode)
00483                                 _GL_ARG_NONNULL ((2)));
00484 # endif
00485 _GL_CXXALIAS_SYS (mkdirat, int, (int fd, char const *file, mode_t mode));
00486 _GL_CXXALIASWARN (mkdirat);
00487 #elif defined GNULIB_POSIXCHECK
00488 # undef mkdirat
00489 # if HAVE_RAW_DECL_MKDIRAT
00490 _GL_WARN_ON_USE (mkdirat, "mkdirat is not portable - "
00491                  "use gnulib module openat for portability");
00492 # endif
00493 #endif
00494 
00495 
00496 #if @GNULIB_MKFIFO@
00497 # if @REPLACE_MKFIFO@
00498 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00499 #   undef mkfifo
00500 #   define mkfifo rpl_mkfifo
00501 #  endif
00502 _GL_FUNCDECL_RPL (mkfifo, int, (char const *file, mode_t mode)
00503                                _GL_ARG_NONNULL ((1)));
00504 _GL_CXXALIAS_RPL (mkfifo, int, (char const *file, mode_t mode));
00505 # else
00506 #  if !@HAVE_MKFIFO@
00507 _GL_FUNCDECL_SYS (mkfifo, int, (char const *file, mode_t mode)
00508                                _GL_ARG_NONNULL ((1)));
00509 #  endif
00510 _GL_CXXALIAS_SYS (mkfifo, int, (char const *file, mode_t mode));
00511 # endif
00512 _GL_CXXALIASWARN (mkfifo);
00513 #elif defined GNULIB_POSIXCHECK
00514 # undef mkfifo
00515 # if HAVE_RAW_DECL_MKFIFO
00516 _GL_WARN_ON_USE (mkfifo, "mkfifo is not portable - "
00517                  "use gnulib module mkfifo for portability");
00518 # endif
00519 #endif
00520 
00521 
00522 #if @GNULIB_MKFIFOAT@
00523 # if !@HAVE_MKFIFOAT@
00524 _GL_FUNCDECL_SYS (mkfifoat, int, (int fd, char const *file, mode_t mode)
00525                                  _GL_ARG_NONNULL ((2)));
00526 # endif
00527 _GL_CXXALIAS_SYS (mkfifoat, int, (int fd, char const *file, mode_t mode));
00528 _GL_CXXALIASWARN (mkfifoat);
00529 #elif defined GNULIB_POSIXCHECK
00530 # undef mkfifoat
00531 # if HAVE_RAW_DECL_MKFIFOAT
00532 _GL_WARN_ON_USE (mkfifoat, "mkfifoat is not portable - "
00533                  "use gnulib module mkfifoat for portability");
00534 # endif
00535 #endif
00536 
00537 
00538 #if @GNULIB_MKNOD@
00539 # if @REPLACE_MKNOD@
00540 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00541 #   undef mknod
00542 #   define mknod rpl_mknod
00543 #  endif
00544 _GL_FUNCDECL_RPL (mknod, int, (char const *file, mode_t mode, dev_t dev)
00545                               _GL_ARG_NONNULL ((1)));
00546 _GL_CXXALIAS_RPL (mknod, int, (char const *file, mode_t mode, dev_t dev));
00547 # else
00548 #  if !@HAVE_MKNOD@
00549 _GL_FUNCDECL_SYS (mknod, int, (char const *file, mode_t mode, dev_t dev)
00550                               _GL_ARG_NONNULL ((1)));
00551 #  endif
00552 _GL_CXXALIAS_SYS (mknod, int, (char const *file, mode_t mode, dev_t dev));
00553 # endif
00554 _GL_CXXALIASWARN (mknod);
00555 #elif defined GNULIB_POSIXCHECK
00556 # undef mknod
00557 # if HAVE_RAW_DECL_MKNOD
00558 _GL_WARN_ON_USE (mknod, "mknod is not portable - "
00559                  "use gnulib module mknod for portability");
00560 # endif
00561 #endif
00562 
00563 
00564 #if @GNULIB_MKNODAT@
00565 # if !@HAVE_MKNODAT@
00566 _GL_FUNCDECL_SYS (mknodat, int,
00567                   (int fd, char const *file, mode_t mode, dev_t dev)
00568                   _GL_ARG_NONNULL ((2)));
00569 # endif
00570 _GL_CXXALIAS_SYS (mknodat, int,
00571                   (int fd, char const *file, mode_t mode, dev_t dev));
00572 _GL_CXXALIASWARN (mknodat);
00573 #elif defined GNULIB_POSIXCHECK
00574 # undef mknodat
00575 # if HAVE_RAW_DECL_MKNODAT
00576 _GL_WARN_ON_USE (mknodat, "mknodat is not portable - "
00577                  "use gnulib module mkfifoat for portability");
00578 # endif
00579 #endif
00580 
00581 
00582 #if @GNULIB_STAT@
00583 # if @REPLACE_STAT@
00584 /* We can't use the object-like #define stat rpl_stat, because of
00585    struct stat.  This means that rpl_stat will not be used if the user
00586    does (stat)(a,b).  Oh well.  */
00587 #  undef stat
00588 #  ifdef _LARGE_FILES
00589     /* With _LARGE_FILES defined, AIX (only) defines stat to stat64,
00590        so we have to replace stat64() instead of stat(). */
00591 #   define stat stat64
00592 #   undef stat64
00593 #   define stat64(name, st) rpl_stat (name, st)
00594 #  else /* !_LARGE_FILES */
00595 #   define stat(name, st) rpl_stat (name, st)
00596 #  endif /* !_LARGE_FILES */
00597 _GL_EXTERN_C int stat (const char *name, struct stat *buf) _GL_ARG_NONNULL ((1, 2));
00598 # endif
00599 #elif defined GNULIB_POSIXCHECK
00600 # undef stat
00601 # if HAVE_RAW_DECL_STAT
00602 _GL_WARN_ON_USE (stat, "stat is unportable - "
00603                  "use gnulib module stat for portability");
00604 # endif
00605 #endif
00606 
00607 
00608 #if @GNULIB_UTIMENSAT@
00609 # if @REPLACE_UTIMENSAT@
00610 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00611 #   undef utimensat
00612 #   define utimensat rpl_utimensat
00613 #  endif
00614 _GL_FUNCDECL_RPL (utimensat, int, (int fd, char const *name,
00615                                    struct timespec const times[2], int flag)
00616                                   _GL_ARG_NONNULL ((2)));
00617 _GL_CXXALIAS_RPL (utimensat, int, (int fd, char const *name,
00618                                    struct timespec const times[2], int flag));
00619 # else
00620 #  if !@HAVE_UTIMENSAT@
00621 _GL_FUNCDECL_SYS (utimensat, int, (int fd, char const *name,
00622                                    struct timespec const times[2], int flag)
00623                                   _GL_ARG_NONNULL ((2)));
00624 #  endif
00625 _GL_CXXALIAS_SYS (utimensat, int, (int fd, char const *name,
00626                                    struct timespec const times[2], int flag));
00627 # endif
00628 _GL_CXXALIASWARN (utimensat);
00629 #elif defined GNULIB_POSIXCHECK
00630 # undef utimensat
00631 # if HAVE_RAW_DECL_UTIMENSAT
00632 _GL_WARN_ON_USE (utimensat, "utimensat is not portable - "
00633                  "use gnulib module utimensat for portability");
00634 # endif
00635 #endif
00636 
00637 
00638 #endif /* _GL_SYS_STAT_H */
00639 #endif /* _GL_SYS_STAT_H */
00640 #endif