Blame lib/sys_stat.in.h

Packit Service fdd496
/* Provide a more complete sys/stat.h header file.
Packit Service fdd496
   Copyright (C) 2005-2017 Free Software Foundation, Inc.
Packit Service fdd496
Packit Service fdd496
   This program is free software; you can redistribute it and/or modify
Packit Service fdd496
   it under the terms of the GNU General Public License as published by
Packit Service fdd496
   the Free Software Foundation; either version 3, or (at your option)
Packit Service fdd496
   any later version.
Packit Service fdd496
Packit Service fdd496
   This program is distributed in the hope that it will be useful,
Packit Service fdd496
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service fdd496
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit Service fdd496
   GNU General Public License for more details.
Packit Service fdd496
Packit Service fdd496
   You should have received a copy of the GNU General Public License
Packit Service fdd496
   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
Packit Service fdd496
Packit Service fdd496
/* Written by Eric Blake, Paul Eggert, and Jim Meyering.  */
Packit Service fdd496
Packit Service fdd496
/* This file is supposed to be used on platforms where <sys/stat.h> is
Packit Service fdd496
   incomplete.  It is intended to provide definitions and prototypes
Packit Service fdd496
   needed by an application.  Start with what the system provides.  */
Packit Service fdd496
Packit Service fdd496
#if __GNUC__ >= 3
Packit Service fdd496
@PRAGMA_SYSTEM_HEADER@
Packit Service fdd496
#endif
Packit Service fdd496
@PRAGMA_COLUMNS@
Packit Service fdd496
Packit Service fdd496
#if defined __need_system_sys_stat_h
Packit Service fdd496
/* Special invocation convention.  */
Packit Service fdd496
Packit Service fdd496
#@INCLUDE_NEXT@ @NEXT_SYS_STAT_H@
Packit Service fdd496
Packit Service fdd496
#else
Packit Service fdd496
/* Normal invocation convention.  */
Packit Service fdd496
Packit Service fdd496
#ifndef _@GUARD_PREFIX@_SYS_STAT_H
Packit Service fdd496
Packit Service fdd496
/* Get nlink_t.
Packit Service fdd496
   May also define off_t to a 64-bit type on native Windows.  */
Packit Service fdd496
#include <sys/types.h>
Packit Service fdd496
Packit Service fdd496
/* Get struct timespec.  */
Packit Service fdd496
#include <time.h>
Packit Service fdd496
Packit Service fdd496
/* The include_next requires a split double-inclusion guard.  */
Packit Service fdd496
#@INCLUDE_NEXT@ @NEXT_SYS_STAT_H@
Packit Service fdd496
Packit Service fdd496
#ifndef _@GUARD_PREFIX@_SYS_STAT_H
Packit Service fdd496
#define _@GUARD_PREFIX@_SYS_STAT_H
Packit Service fdd496
Packit Service fdd496
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
Packit Service fdd496
Packit Service fdd496
/* The definition of _GL_ARG_NONNULL is copied here.  */
Packit Service fdd496
Packit Service fdd496
/* The definition of _GL_WARN_ON_USE is copied here.  */
Packit Service fdd496
Packit Service fdd496
/* Before doing "#define mkdir rpl_mkdir" below, we need to include all
Packit Service fdd496
   headers that may declare mkdir().  Native Windows platforms declare mkdir
Packit Service fdd496
   in <io.h> and/or <direct.h>, not in <unistd.h>.  */
Packit Service fdd496
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
Packit Service fdd496
# include <io.h>     /* mingw32, mingw64 */
Packit Service fdd496
# include <direct.h> /* mingw64, MSVC 9 */
Packit Service fdd496
#endif
Packit Service fdd496
Packit Service fdd496
/* Native Windows platforms declare umask() in <io.h>.  */
Packit Service fdd496
#if 0 && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
Packit Service fdd496
# include <io.h>
Packit Service fdd496
#endif
Packit Service fdd496
Packit Service fdd496
/* Large File Support on native Windows.  */
Packit Service fdd496
#if @WINDOWS_64_BIT_ST_SIZE@
Packit Service fdd496
# define stat _stati64
Packit Service fdd496
#endif
Packit Service fdd496
Packit Service fdd496
/* Optionally, override 'struct stat' on native Windows.  */
Packit Service fdd496
#if @GNULIB_OVERRIDES_STRUCT_STAT@
Packit Service fdd496
Packit Service fdd496
# undef stat
Packit Service fdd496
# if @GNULIB_STAT@
Packit Service fdd496
#  define stat rpl_stat
Packit Service fdd496
# else
Packit Service fdd496
   /* Provoke a clear link error if stat() is used as a function and
Packit Service fdd496
      module 'stat' is not in use.  */
Packit Service fdd496
#  define stat stat_used_without_requesting_gnulib_module_stat
Packit Service fdd496
# endif
Packit Service fdd496
Packit Service fdd496
# if !GNULIB_defined_struct_stat
Packit Service fdd496
struct stat
Packit Service fdd496
{
Packit Service fdd496
  dev_t st_dev;
Packit Service fdd496
  ino_t st_ino;
Packit Service fdd496
  mode_t st_mode;
Packit Service fdd496
  nlink_t st_nlink;
Packit Service fdd496
#  if 0
Packit Service fdd496
  uid_t st_uid;
Packit Service fdd496
#  else /* uid_t is not defined by default on native Windows.  */
Packit Service fdd496
  short st_uid;
Packit Service fdd496
#  endif
Packit Service fdd496
#  if 0
Packit Service fdd496
  gid_t st_gid;
Packit Service fdd496
#  else /* gid_t is not defined by default on native Windows.  */
Packit Service fdd496
  short st_gid;
Packit Service fdd496
#  endif
Packit Service fdd496
  dev_t st_rdev;
Packit Service fdd496
  off_t st_size;
Packit Service fdd496
#  if 0
Packit Service fdd496
  blksize_t st_blksize;
Packit Service fdd496
  blkcnt_t st_blocks;
Packit Service fdd496
#  endif
Packit Service fdd496
Packit Service fdd496
#  if @WINDOWS_STAT_TIMESPEC@
Packit Service fdd496
  struct timespec st_atim;
Packit Service fdd496
  struct timespec st_mtim;
Packit Service fdd496
  struct timespec st_ctim;
Packit Service fdd496
#  else
Packit Service fdd496
  time_t st_atime;
Packit Service fdd496
  time_t st_mtime;
Packit Service fdd496
  time_t st_ctime;
Packit Service fdd496
#  endif
Packit Service fdd496
};
Packit Service fdd496
#  if @WINDOWS_STAT_TIMESPEC@
Packit Service fdd496
#   define st_atime st_atim.tv_sec
Packit Service fdd496
#   define st_mtime st_mtim.tv_sec
Packit Service fdd496
#   define st_ctime st_ctim.tv_sec
Packit Service fdd496
    /* Indicator, for gnulib internal purposes.  */
Packit Service fdd496
#   define _GL_WINDOWS_STAT_TIMESPEC 1
Packit Service fdd496
#  endif
Packit Service fdd496
#  define GNULIB_defined_struct_stat 1
Packit Service fdd496
# endif
Packit Service fdd496
Packit Service fdd496
/* Other possible values of st_mode.  */
Packit Service fdd496
# if 0
Packit Service fdd496
#  define _S_IFBLK  0x6000
Packit Service fdd496
# endif
Packit Service fdd496
# if 0
Packit Service fdd496
#  define _S_IFLNK  0xA000
Packit Service fdd496
# endif
Packit Service fdd496
# if 0
Packit Service fdd496
#  define _S_IFSOCK 0xC000
Packit Service fdd496
# endif
Packit Service fdd496
Packit Service fdd496
#endif
Packit Service fdd496
Packit Service fdd496
#ifndef S_IFIFO
Packit Service fdd496
# ifdef _S_IFIFO
Packit Service fdd496
#  define S_IFIFO _S_IFIFO
Packit Service fdd496
# endif
Packit Service fdd496
#endif
Packit Service fdd496
Packit Service fdd496
#ifndef S_IFMT
Packit Service fdd496
# define S_IFMT 0170000
Packit Service fdd496
#endif
Packit Service fdd496
Packit Service fdd496
#if STAT_MACROS_BROKEN
Packit Service fdd496
# undef S_ISBLK
Packit Service fdd496
# undef S_ISCHR
Packit Service fdd496
# undef S_ISDIR
Packit Service fdd496
# undef S_ISFIFO
Packit Service fdd496
# undef S_ISLNK
Packit Service fdd496
# undef S_ISNAM
Packit Service fdd496
# undef S_ISMPB
Packit Service fdd496
# undef S_ISMPC
Packit Service fdd496
# undef S_ISNWK
Packit Service fdd496
# undef S_ISREG
Packit Service fdd496
# undef S_ISSOCK
Packit Service fdd496
#endif
Packit Service fdd496
Packit Service fdd496
#ifndef S_ISBLK
Packit Service fdd496
# ifdef S_IFBLK
Packit Service fdd496
#  define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
Packit Service fdd496
# else
Packit Service fdd496
#  define S_ISBLK(m) 0
Packit Service fdd496
# endif
Packit Service fdd496
#endif
Packit Service fdd496
Packit Service fdd496
#ifndef S_ISCHR
Packit Service fdd496
# ifdef S_IFCHR
Packit Service fdd496
#  define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
Packit Service fdd496
# else
Packit Service fdd496
#  define S_ISCHR(m) 0
Packit Service fdd496
# endif
Packit Service fdd496
#endif
Packit Service fdd496
Packit Service fdd496
#ifndef S_ISDIR
Packit Service fdd496
# ifdef S_IFDIR
Packit Service fdd496
#  define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
Packit Service fdd496
# else
Packit Service fdd496
#  define S_ISDIR(m) 0
Packit Service fdd496
# endif
Packit Service fdd496
#endif
Packit Service fdd496
Packit Service fdd496
#ifndef S_ISDOOR /* Solaris 2.5 and up */
Packit Service fdd496
# define S_ISDOOR(m) 0
Packit Service fdd496
#endif
Packit Service fdd496
Packit Service fdd496
#ifndef S_ISFIFO
Packit Service fdd496
# ifdef S_IFIFO
Packit Service fdd496
#  define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
Packit Service fdd496
# else
Packit Service fdd496
#  define S_ISFIFO(m) 0
Packit Service fdd496
# endif
Packit Service fdd496
#endif
Packit Service fdd496
Packit Service fdd496
#ifndef S_ISLNK
Packit Service fdd496
# ifdef S_IFLNK
Packit Service fdd496
#  define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
Packit Service fdd496
# else
Packit Service fdd496
#  define S_ISLNK(m) 0
Packit Service fdd496
# endif
Packit Service fdd496
#endif
Packit Service fdd496
Packit Service fdd496
#ifndef S_ISMPB /* V7 */
Packit Service fdd496
# ifdef S_IFMPB
Packit Service fdd496
#  define S_ISMPB(m) (((m) & S_IFMT) == S_IFMPB)
Packit Service fdd496
#  define S_ISMPC(m) (((m) & S_IFMT) == S_IFMPC)
Packit Service fdd496
# else
Packit Service fdd496
#  define S_ISMPB(m) 0
Packit Service fdd496
#  define S_ISMPC(m) 0
Packit Service fdd496
# endif
Packit Service fdd496
#endif
Packit Service fdd496
Packit Service fdd496
#ifndef S_ISMPX /* AIX */
Packit Service fdd496
# define S_ISMPX(m) 0
Packit Service fdd496
#endif
Packit Service fdd496
Packit Service fdd496
#ifndef S_ISNAM /* Xenix */
Packit Service fdd496
# ifdef S_IFNAM
Packit Service fdd496
#  define S_ISNAM(m) (((m) & S_IFMT) == S_IFNAM)
Packit Service fdd496
# else
Packit Service fdd496
#  define S_ISNAM(m) 0
Packit Service fdd496
# endif
Packit Service fdd496
#endif
Packit Service fdd496
Packit Service fdd496
#ifndef S_ISNWK /* HP/UX */
Packit Service fdd496
# ifdef S_IFNWK
Packit Service fdd496
#  define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK)
Packit Service fdd496
# else
Packit Service fdd496
#  define S_ISNWK(m) 0
Packit Service fdd496
# endif
Packit Service fdd496
#endif
Packit Service fdd496
Packit Service fdd496
#ifndef S_ISPORT /* Solaris 10 and up */
Packit Service fdd496
# define S_ISPORT(m) 0
Packit Service fdd496
#endif
Packit Service fdd496
Packit Service fdd496
#ifndef S_ISREG
Packit Service fdd496
# ifdef S_IFREG
Packit Service fdd496
#  define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
Packit Service fdd496
# else
Packit Service fdd496
#  define S_ISREG(m) 0
Packit Service fdd496
# endif
Packit Service fdd496
#endif
Packit Service fdd496
Packit Service fdd496
#ifndef S_ISSOCK
Packit Service fdd496
# ifdef S_IFSOCK
Packit Service fdd496
#  define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
Packit Service fdd496
# else
Packit Service fdd496
#  define S_ISSOCK(m) 0
Packit Service fdd496
# endif
Packit Service fdd496
#endif
Packit Service fdd496
Packit Service fdd496
Packit Service fdd496
#ifndef S_TYPEISMQ
Packit Service fdd496
# define S_TYPEISMQ(p) 0
Packit Service fdd496
#endif
Packit Service fdd496
Packit Service fdd496
#ifndef S_TYPEISTMO
Packit Service fdd496
# define S_TYPEISTMO(p) 0
Packit Service fdd496
#endif
Packit Service fdd496
Packit Service fdd496
Packit Service fdd496
#ifndef S_TYPEISSEM
Packit Service fdd496
# ifdef S_INSEM
Packit Service fdd496
#  define S_TYPEISSEM(p) (S_ISNAM ((p)->st_mode) && (p)->st_rdev == S_INSEM)
Packit Service fdd496
# else
Packit Service fdd496
#  define S_TYPEISSEM(p) 0
Packit Service fdd496
# endif
Packit Service fdd496
#endif
Packit Service fdd496
Packit Service fdd496
#ifndef S_TYPEISSHM
Packit Service fdd496
# ifdef S_INSHD
Packit Service fdd496
#  define S_TYPEISSHM(p) (S_ISNAM ((p)->st_mode) && (p)->st_rdev == S_INSHD)
Packit Service fdd496
# else
Packit Service fdd496
#  define S_TYPEISSHM(p) 0
Packit Service fdd496
# endif
Packit Service fdd496
#endif
Packit Service fdd496
Packit Service fdd496
/* high performance ("contiguous data") */
Packit Service fdd496
#ifndef S_ISCTG
Packit Service fdd496
# define S_ISCTG(p) 0
Packit Service fdd496
#endif
Packit Service fdd496
Packit Service fdd496
/* Cray DMF (data migration facility): off line, with data  */
Packit Service fdd496
#ifndef S_ISOFD
Packit Service fdd496
# define S_ISOFD(p) 0
Packit Service fdd496
#endif
Packit Service fdd496
Packit Service fdd496
/* Cray DMF (data migration facility): off line, with no data  */
Packit Service fdd496
#ifndef S_ISOFL
Packit Service fdd496
# define S_ISOFL(p) 0
Packit Service fdd496
#endif
Packit Service fdd496
Packit Service fdd496
/* 4.4BSD whiteout */
Packit Service fdd496
#ifndef S_ISWHT
Packit Service fdd496
# define S_ISWHT(m) 0
Packit Service fdd496
#endif
Packit Service fdd496
Packit Service fdd496
/* If any of the following are undefined,
Packit Service fdd496
   define them to their de facto standard values.  */
Packit Service fdd496
#if !S_ISUID
Packit Service fdd496
# define S_ISUID 04000
Packit Service fdd496
#endif
Packit Service fdd496
#if !S_ISGID
Packit Service fdd496
# define S_ISGID 02000
Packit Service fdd496
#endif
Packit Service fdd496
Packit Service fdd496
/* S_ISVTX is a common extension to POSIX.  */
Packit Service fdd496
#ifndef S_ISVTX
Packit Service fdd496
# define S_ISVTX 01000
Packit Service fdd496
#endif
Packit Service fdd496
Packit Service fdd496
#if !S_IRUSR && S_IREAD
Packit Service fdd496
# define S_IRUSR S_IREAD
Packit Service fdd496
#endif
Packit Service fdd496
#if !S_IRUSR
Packit Service fdd496
# define S_IRUSR 00400
Packit Service fdd496
#endif
Packit Service fdd496
#if !S_IRGRP
Packit Service fdd496
# define S_IRGRP (S_IRUSR >> 3)
Packit Service fdd496
#endif
Packit Service fdd496
#if !S_IROTH
Packit Service fdd496
# define S_IROTH (S_IRUSR >> 6)
Packit Service fdd496
#endif
Packit Service fdd496
Packit Service fdd496
#if !S_IWUSR && S_IWRITE
Packit Service fdd496
# define S_IWUSR S_IWRITE
Packit Service fdd496
#endif
Packit Service fdd496
#if !S_IWUSR
Packit Service fdd496
# define S_IWUSR 00200
Packit Service fdd496
#endif
Packit Service fdd496
#if !S_IWGRP
Packit Service fdd496
# define S_IWGRP (S_IWUSR >> 3)
Packit Service fdd496
#endif
Packit Service fdd496
#if !S_IWOTH
Packit Service fdd496
# define S_IWOTH (S_IWUSR >> 6)
Packit Service fdd496
#endif
Packit Service fdd496
Packit Service fdd496
#if !S_IXUSR && S_IEXEC
Packit Service fdd496
# define S_IXUSR S_IEXEC
Packit Service fdd496
#endif
Packit Service fdd496
#if !S_IXUSR
Packit Service fdd496
# define S_IXUSR 00100
Packit Service fdd496
#endif
Packit Service fdd496
#if !S_IXGRP
Packit Service fdd496
# define S_IXGRP (S_IXUSR >> 3)
Packit Service fdd496
#endif
Packit Service fdd496
#if !S_IXOTH
Packit Service fdd496
# define S_IXOTH (S_IXUSR >> 6)
Packit Service fdd496
#endif
Packit Service fdd496
Packit Service fdd496
#if !S_IRWXU
Packit Service fdd496
# define S_IRWXU (S_IRUSR | S_IWUSR | S_IXUSR)
Packit Service fdd496
#endif
Packit Service fdd496
#if !S_IRWXG
Packit Service fdd496
# define S_IRWXG (S_IRGRP | S_IWGRP | S_IXGRP)
Packit Service fdd496
#endif
Packit Service fdd496
#if !S_IRWXO
Packit Service fdd496
# define S_IRWXO (S_IROTH | S_IWOTH | S_IXOTH)
Packit Service fdd496
#endif
Packit Service fdd496
Packit Service fdd496
/* S_IXUGO is a common extension to POSIX.  */
Packit Service fdd496
#if !S_IXUGO
Packit Service fdd496
# define S_IXUGO (S_IXUSR | S_IXGRP | S_IXOTH)
Packit Service fdd496
#endif
Packit Service fdd496
Packit Service fdd496
#ifndef S_IRWXUGO
Packit Service fdd496
# define S_IRWXUGO (S_IRWXU | S_IRWXG | S_IRWXO)
Packit Service fdd496
#endif
Packit Service fdd496
Packit Service fdd496
/* Macros for futimens and utimensat.  */
Packit Service fdd496
#ifndef UTIME_NOW
Packit Service fdd496
# define UTIME_NOW (-1)
Packit Service fdd496
# define UTIME_OMIT (-2)
Packit Service fdd496
#endif
Packit Service fdd496
Packit Service fdd496
Packit Service fdd496
#if @GNULIB_FCHMODAT@
Packit Service fdd496
# if !@HAVE_FCHMODAT@
Packit Service fdd496
_GL_FUNCDECL_SYS (fchmodat, int,
Packit Service fdd496
                  (int fd, char const *file, mode_t mode, int flag)
Packit Service fdd496
                  _GL_ARG_NONNULL ((2)));
Packit Service fdd496
# endif
Packit Service fdd496
_GL_CXXALIAS_SYS (fchmodat, int,
Packit Service fdd496
                  (int fd, char const *file, mode_t mode, int flag));
Packit Service fdd496
_GL_CXXALIASWARN (fchmodat);
Packit Service fdd496
#elif defined GNULIB_POSIXCHECK
Packit Service fdd496
# undef fchmodat
Packit Service fdd496
# if HAVE_RAW_DECL_FCHMODAT
Packit Service fdd496
_GL_WARN_ON_USE (fchmodat, "fchmodat is not portable - "
Packit Service fdd496
                 "use gnulib module openat for portability");
Packit Service fdd496
# endif
Packit Service fdd496
#endif
Packit Service fdd496
Packit Service fdd496
Packit Service fdd496
#if @GNULIB_FSTAT@
Packit Service fdd496
# if @REPLACE_FSTAT@
Packit Service fdd496
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service fdd496
#   undef fstat
Packit Service fdd496
#   define fstat rpl_fstat
Packit Service fdd496
#  endif
Packit Service fdd496
_GL_FUNCDECL_RPL (fstat, int, (int fd, struct stat *buf) _GL_ARG_NONNULL ((2)));
Packit Service fdd496
_GL_CXXALIAS_RPL (fstat, int, (int fd, struct stat *buf));
Packit Service fdd496
# else
Packit Service fdd496
_GL_CXXALIAS_SYS (fstat, int, (int fd, struct stat *buf));
Packit Service fdd496
# endif
Packit Service fdd496
_GL_CXXALIASWARN (fstat);
Packit Service fdd496
#elif @GNULIB_OVERRIDES_STRUCT_STAT@
Packit Service fdd496
# undef fstat
Packit Service fdd496
# define fstat fstat_used_without_requesting_gnulib_module_fstat
Packit Service fdd496
#elif @WINDOWS_64_BIT_ST_SIZE@
Packit Service fdd496
/* Above, we define stat to _stati64.  */
Packit Service fdd496
# define fstat _fstati64
Packit Service fdd496
#elif defined GNULIB_POSIXCHECK
Packit Service fdd496
# undef fstat
Packit Service fdd496
# if HAVE_RAW_DECL_FSTAT
Packit Service fdd496
_GL_WARN_ON_USE (fstat, "fstat has portability problems - "
Packit Service fdd496
                 "use gnulib module fstat for portability");
Packit Service fdd496
# endif
Packit Service fdd496
#endif
Packit Service fdd496
Packit Service fdd496
Packit Service fdd496
#if @GNULIB_FSTATAT@
Packit Service fdd496
# if @REPLACE_FSTATAT@
Packit Service fdd496
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service fdd496
#   undef fstatat
Packit Service fdd496
#   define fstatat rpl_fstatat
Packit Service fdd496
#  endif
Packit Service fdd496
_GL_FUNCDECL_RPL (fstatat, int,
Packit Service fdd496
                  (int fd, char const *name, struct stat *st, int flags)
Packit Service fdd496
                  _GL_ARG_NONNULL ((2, 3)));
Packit Service fdd496
_GL_CXXALIAS_RPL (fstatat, int,
Packit Service fdd496
                  (int fd, char const *name, struct stat *st, int flags));
Packit Service fdd496
# else
Packit Service fdd496
#  if !@HAVE_FSTATAT@
Packit Service fdd496
_GL_FUNCDECL_SYS (fstatat, int,
Packit Service fdd496
                  (int fd, char const *name, struct stat *st, int flags)
Packit Service fdd496
                  _GL_ARG_NONNULL ((2, 3)));
Packit Service fdd496
#  endif
Packit Service fdd496
_GL_CXXALIAS_SYS (fstatat, int,
Packit Service fdd496
                  (int fd, char const *name, struct stat *st, int flags));
Packit Service fdd496
# endif
Packit Service fdd496
_GL_CXXALIASWARN (fstatat);
Packit Service fdd496
#elif @GNULIB_OVERRIDES_STRUCT_STAT@
Packit Service fdd496
# undef fstatat
Packit Service fdd496
# define fstatat fstatat_used_without_requesting_gnulib_module_fstatat
Packit Service fdd496
#elif defined GNULIB_POSIXCHECK
Packit Service fdd496
# undef fstatat
Packit Service fdd496
# if HAVE_RAW_DECL_FSTATAT
Packit Service fdd496
_GL_WARN_ON_USE (fstatat, "fstatat is not portable - "
Packit Service fdd496
                 "use gnulib module openat for portability");
Packit Service fdd496
# endif
Packit Service fdd496
#endif
Packit Service fdd496
Packit Service fdd496
Packit Service fdd496
#if @GNULIB_FUTIMENS@
Packit Service fdd496
/* Use the rpl_ prefix also on Solaris <= 9, because on Solaris 9 our futimens
Packit Service fdd496
   implementation relies on futimesat, which on Solaris 10 makes an invocation
Packit Service fdd496
   to futimens that is meant to invoke the libc's futimens(), not gnulib's
Packit Service fdd496
   futimens().  */
Packit Service fdd496
# if @REPLACE_FUTIMENS@ || (!@HAVE_FUTIMENS@ && defined __sun)
Packit Service fdd496
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service fdd496
#   undef futimens
Packit Service fdd496
#   define futimens rpl_futimens
Packit Service fdd496
#  endif
Packit Service fdd496
_GL_FUNCDECL_RPL (futimens, int, (int fd, struct timespec const times[2]));
Packit Service fdd496
_GL_CXXALIAS_RPL (futimens, int, (int fd, struct timespec const times[2]));
Packit Service fdd496
# else
Packit Service fdd496
#  if !@HAVE_FUTIMENS@
Packit Service fdd496
_GL_FUNCDECL_SYS (futimens, int, (int fd, struct timespec const times[2]));
Packit Service fdd496
#  endif
Packit Service fdd496
_GL_CXXALIAS_SYS (futimens, int, (int fd, struct timespec const times[2]));
Packit Service fdd496
# endif
Packit Service fdd496
# if @HAVE_FUTIMENS@
Packit Service fdd496
_GL_CXXALIASWARN (futimens);
Packit Service fdd496
# endif
Packit Service fdd496
#elif defined GNULIB_POSIXCHECK
Packit Service fdd496
# undef futimens
Packit Service fdd496
# if HAVE_RAW_DECL_FUTIMENS
Packit Service fdd496
_GL_WARN_ON_USE (futimens, "futimens is not portable - "
Packit Service fdd496
                 "use gnulib module futimens for portability");
Packit Service fdd496
# endif
Packit Service fdd496
#endif
Packit Service fdd496
Packit Service fdd496
Packit Service fdd496
#if @GNULIB_LCHMOD@
Packit Service fdd496
/* Change the mode of FILENAME to MODE, without dereferencing it if FILENAME
Packit Service fdd496
   denotes a symbolic link.  */
Packit Service fdd496
# if !@HAVE_LCHMOD@
Packit Service fdd496
/* The lchmod replacement follows symbolic links.  Callers should take
Packit Service fdd496
   this into account; lchmod should be applied only to arguments that
Packit Service fdd496
   are known to not be symbolic links.  On hosts that lack lchmod,
Packit Service fdd496
   this can lead to race conditions between the check and the
Packit Service fdd496
   invocation of lchmod, but we know of no workarounds that are
Packit Service fdd496
   reliable in general.  You might try requesting support for lchmod
Packit Service fdd496
   from your operating system supplier.  */
Packit Service fdd496
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service fdd496
#   define lchmod chmod
Packit Service fdd496
#  endif
Packit Service fdd496
/* Need to cast, because on mingw, the second parameter of chmod is
Packit Service fdd496
                                                int mode.  */
Packit Service fdd496
_GL_CXXALIAS_RPL_CAST_1 (lchmod, chmod, int,
Packit Service fdd496
                         (const char *filename, mode_t mode));
Packit Service fdd496
# else
Packit Service fdd496
#  if 0 /* assume already declared */
Packit Service fdd496
_GL_FUNCDECL_SYS (lchmod, int, (const char *filename, mode_t mode)
Packit Service fdd496
                               _GL_ARG_NONNULL ((1)));
Packit Service fdd496
#  endif
Packit Service fdd496
_GL_CXXALIAS_SYS (lchmod, int, (const char *filename, mode_t mode));
Packit Service fdd496
# endif
Packit Service fdd496
# if @HAVE_LCHMOD@
Packit Service fdd496
_GL_CXXALIASWARN (lchmod);
Packit Service fdd496
# endif
Packit Service fdd496
#elif defined GNULIB_POSIXCHECK
Packit Service fdd496
# undef lchmod
Packit Service fdd496
# if HAVE_RAW_DECL_LCHMOD
Packit Service fdd496
_GL_WARN_ON_USE (lchmod, "lchmod is unportable - "
Packit Service fdd496
                 "use gnulib module lchmod for portability");
Packit Service fdd496
# endif
Packit Service fdd496
#endif
Packit Service fdd496
Packit Service fdd496
Packit Service fdd496
#if @GNULIB_LSTAT@
Packit Service fdd496
# if ! @HAVE_LSTAT@
Packit Service fdd496
/* mingw does not support symlinks, therefore it does not have lstat.  But
Packit Service fdd496
   without links, stat does just fine.  */
Packit Service fdd496
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service fdd496
#   define lstat stat
Packit Service fdd496
#  endif
Packit Service fdd496
_GL_CXXALIAS_RPL_1 (lstat, stat, int, (const char *name, struct stat *buf));
Packit Service fdd496
# elif @REPLACE_LSTAT@
Packit Service fdd496
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service fdd496
#   undef lstat
Packit Service fdd496
#   define lstat rpl_lstat
Packit Service fdd496
#  endif
Packit Service fdd496
_GL_FUNCDECL_RPL (lstat, int, (const char *name, struct stat *buf)
Packit Service fdd496
                              _GL_ARG_NONNULL ((1, 2)));
Packit Service fdd496
_GL_CXXALIAS_RPL (lstat, int, (const char *name, struct stat *buf));
Packit Service fdd496
# else
Packit Service fdd496
_GL_CXXALIAS_SYS (lstat, int, (const char *name, struct stat *buf));
Packit Service fdd496
# endif
Packit Service fdd496
# if @HAVE_LSTAT@
Packit Service fdd496
_GL_CXXALIASWARN (lstat);
Packit Service fdd496
# endif
Packit Service fdd496
#elif @GNULIB_OVERRIDES_STRUCT_STAT@
Packit Service fdd496
# undef lstat
Packit Service fdd496
# define lstat lstat_used_without_requesting_gnulib_module_lstat
Packit Service fdd496
#elif defined GNULIB_POSIXCHECK
Packit Service fdd496
# undef lstat
Packit Service fdd496
# if HAVE_RAW_DECL_LSTAT
Packit Service fdd496
_GL_WARN_ON_USE (lstat, "lstat is unportable - "
Packit Service fdd496
                 "use gnulib module lstat for portability");
Packit Service fdd496
# endif
Packit Service fdd496
#endif
Packit Service fdd496
Packit Service fdd496
Packit Service fdd496
#if @REPLACE_MKDIR@
Packit Service fdd496
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service fdd496
#  undef mkdir
Packit Service fdd496
#  define mkdir rpl_mkdir
Packit Service fdd496
# endif
Packit Service fdd496
_GL_FUNCDECL_RPL (mkdir, int, (char const *name, mode_t mode)
Packit Service fdd496
                              _GL_ARG_NONNULL ((1)));
Packit Service fdd496
_GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode));
Packit Service fdd496
#else
Packit Service fdd496
/* mingw's _mkdir() function has 1 argument, but we pass 2 arguments.
Packit Service fdd496
   Additionally, it declares _mkdir (and depending on compile flags, an
Packit Service fdd496
   alias mkdir), only in the nonstandard includes <direct.h> and <io.h>,
Packit Service fdd496
   which are included above.  */
Packit Service fdd496
# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
Packit Service fdd496
Packit Service fdd496
#  if !GNULIB_defined_rpl_mkdir
Packit Service fdd496
static int
Packit Service fdd496
rpl_mkdir (char const *name, mode_t mode)
Packit Service fdd496
{
Packit Service fdd496
  return _mkdir (name);
Packit Service fdd496
}
Packit Service fdd496
#   define GNULIB_defined_rpl_mkdir 1
Packit Service fdd496
#  endif
Packit Service fdd496
Packit Service fdd496
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service fdd496
#   define mkdir rpl_mkdir
Packit Service fdd496
#  endif
Packit Service fdd496
_GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode));
Packit Service fdd496
# else
Packit Service fdd496
_GL_CXXALIAS_SYS (mkdir, int, (char const *name, mode_t mode));
Packit Service fdd496
# endif
Packit Service fdd496
#endif
Packit Service fdd496
_GL_CXXALIASWARN (mkdir);
Packit Service fdd496
Packit Service fdd496
Packit Service fdd496
#if @GNULIB_MKDIRAT@
Packit Service fdd496
# if !@HAVE_MKDIRAT@
Packit Service fdd496
_GL_FUNCDECL_SYS (mkdirat, int, (int fd, char const *file, mode_t mode)
Packit Service fdd496
                                _GL_ARG_NONNULL ((2)));
Packit Service fdd496
# endif
Packit Service fdd496
_GL_CXXALIAS_SYS (mkdirat, int, (int fd, char const *file, mode_t mode));
Packit Service fdd496
_GL_CXXALIASWARN (mkdirat);
Packit Service fdd496
#elif defined GNULIB_POSIXCHECK
Packit Service fdd496
# undef mkdirat
Packit Service fdd496
# if HAVE_RAW_DECL_MKDIRAT
Packit Service fdd496
_GL_WARN_ON_USE (mkdirat, "mkdirat is not portable - "
Packit Service fdd496
                 "use gnulib module openat for portability");
Packit Service fdd496
# endif
Packit Service fdd496
#endif
Packit Service fdd496
Packit Service fdd496
Packit Service fdd496
#if @GNULIB_MKFIFO@
Packit Service fdd496
# if @REPLACE_MKFIFO@
Packit Service fdd496
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service fdd496
#   undef mkfifo
Packit Service fdd496
#   define mkfifo rpl_mkfifo
Packit Service fdd496
#  endif
Packit Service fdd496
_GL_FUNCDECL_RPL (mkfifo, int, (char const *file, mode_t mode)
Packit Service fdd496
                               _GL_ARG_NONNULL ((1)));
Packit Service fdd496
_GL_CXXALIAS_RPL (mkfifo, int, (char const *file, mode_t mode));
Packit Service fdd496
# else
Packit Service fdd496
#  if !@HAVE_MKFIFO@
Packit Service fdd496
_GL_FUNCDECL_SYS (mkfifo, int, (char const *file, mode_t mode)
Packit Service fdd496
                               _GL_ARG_NONNULL ((1)));
Packit Service fdd496
#  endif
Packit Service fdd496
_GL_CXXALIAS_SYS (mkfifo, int, (char const *file, mode_t mode));
Packit Service fdd496
# endif
Packit Service fdd496
_GL_CXXALIASWARN (mkfifo);
Packit Service fdd496
#elif defined GNULIB_POSIXCHECK
Packit Service fdd496
# undef mkfifo
Packit Service fdd496
# if HAVE_RAW_DECL_MKFIFO
Packit Service fdd496
_GL_WARN_ON_USE (mkfifo, "mkfifo is not portable - "
Packit Service fdd496
                 "use gnulib module mkfifo for portability");
Packit Service fdd496
# endif
Packit Service fdd496
#endif
Packit Service fdd496
Packit Service fdd496
Packit Service fdd496
#if @GNULIB_MKFIFOAT@
Packit Service fdd496
# if !@HAVE_MKFIFOAT@
Packit Service fdd496
_GL_FUNCDECL_SYS (mkfifoat, int, (int fd, char const *file, mode_t mode)
Packit Service fdd496
                                 _GL_ARG_NONNULL ((2)));
Packit Service fdd496
# endif
Packit Service fdd496
_GL_CXXALIAS_SYS (mkfifoat, int, (int fd, char const *file, mode_t mode));
Packit Service fdd496
_GL_CXXALIASWARN (mkfifoat);
Packit Service fdd496
#elif defined GNULIB_POSIXCHECK
Packit Service fdd496
# undef mkfifoat
Packit Service fdd496
# if HAVE_RAW_DECL_MKFIFOAT
Packit Service fdd496
_GL_WARN_ON_USE (mkfifoat, "mkfifoat is not portable - "
Packit Service fdd496
                 "use gnulib module mkfifoat for portability");
Packit Service fdd496
# endif
Packit Service fdd496
#endif
Packit Service fdd496
Packit Service fdd496
Packit Service fdd496
#if @GNULIB_MKNOD@
Packit Service fdd496
# if @REPLACE_MKNOD@
Packit Service fdd496
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service fdd496
#   undef mknod
Packit Service fdd496
#   define mknod rpl_mknod
Packit Service fdd496
#  endif
Packit Service fdd496
_GL_FUNCDECL_RPL (mknod, int, (char const *file, mode_t mode, dev_t dev)
Packit Service fdd496
                              _GL_ARG_NONNULL ((1)));
Packit Service fdd496
_GL_CXXALIAS_RPL (mknod, int, (char const *file, mode_t mode, dev_t dev));
Packit Service fdd496
# else
Packit Service fdd496
#  if !@HAVE_MKNOD@
Packit Service fdd496
_GL_FUNCDECL_SYS (mknod, int, (char const *file, mode_t mode, dev_t dev)
Packit Service fdd496
                              _GL_ARG_NONNULL ((1)));
Packit Service fdd496
#  endif
Packit Service fdd496
/* Need to cast, because on OSF/1 5.1, the third parameter is '...'.  */
Packit Service fdd496
_GL_CXXALIAS_SYS_CAST (mknod, int, (char const *file, mode_t mode, dev_t dev));
Packit Service fdd496
# endif
Packit Service fdd496
_GL_CXXALIASWARN (mknod);
Packit Service fdd496
#elif defined GNULIB_POSIXCHECK
Packit Service fdd496
# undef mknod
Packit Service fdd496
# if HAVE_RAW_DECL_MKNOD
Packit Service fdd496
_GL_WARN_ON_USE (mknod, "mknod is not portable - "
Packit Service fdd496
                 "use gnulib module mknod for portability");
Packit Service fdd496
# endif
Packit Service fdd496
#endif
Packit Service fdd496
Packit Service fdd496
Packit Service fdd496
#if @GNULIB_MKNODAT@
Packit Service fdd496
# if !@HAVE_MKNODAT@
Packit Service fdd496
_GL_FUNCDECL_SYS (mknodat, int,
Packit Service fdd496
                  (int fd, char const *file, mode_t mode, dev_t dev)
Packit Service fdd496
                  _GL_ARG_NONNULL ((2)));
Packit Service fdd496
# endif
Packit Service fdd496
_GL_CXXALIAS_SYS (mknodat, int,
Packit Service fdd496
                  (int fd, char const *file, mode_t mode, dev_t dev));
Packit Service fdd496
_GL_CXXALIASWARN (mknodat);
Packit Service fdd496
#elif defined GNULIB_POSIXCHECK
Packit Service fdd496
# undef mknodat
Packit Service fdd496
# if HAVE_RAW_DECL_MKNODAT
Packit Service fdd496
_GL_WARN_ON_USE (mknodat, "mknodat is not portable - "
Packit Service fdd496
                 "use gnulib module mkfifoat for portability");
Packit Service fdd496
# endif
Packit Service fdd496
#endif
Packit Service fdd496
Packit Service fdd496
Packit Service fdd496
#if @GNULIB_STAT@
Packit Service fdd496
# if @REPLACE_STAT@
Packit Service fdd496
#  if !@GNULIB_OVERRIDES_STRUCT_STAT@
Packit Service fdd496
    /* We can't use the object-like #define stat rpl_stat, because of
Packit Service fdd496
       struct stat.  This means that rpl_stat will not be used if the user
Packit Service fdd496
       does (stat)(a,b).  Oh well.  */
Packit Service fdd496
#   if defined _AIX && defined stat && defined _LARGE_FILES
Packit Service fdd496
     /* With _LARGE_FILES defined, AIX (only) defines stat to stat64,
Packit Service fdd496
        so we have to replace stat64() instead of stat(). */
Packit Service fdd496
#    undef stat64
Packit Service fdd496
#    define stat64(name, st) rpl_stat (name, st)
Packit Service fdd496
#   elif @WINDOWS_64_BIT_ST_SIZE@
Packit Service fdd496
     /* Above, we define stat to _stati64.  */
Packit Service fdd496
#    if defined __MINGW32__ && defined _stati64
Packit Service fdd496
#     ifndef _USE_32BIT_TIME_T
Packit Service fdd496
       /* The system headers define _stati64 to _stat64.  */
Packit Service fdd496
#      undef _stat64
Packit Service fdd496
#      define _stat64(name, st) rpl_stat (name, st)
Packit Service fdd496
#     endif
Packit Service fdd496
#    elif defined _MSC_VER && defined _stati64
Packit Service fdd496
#     ifdef _USE_32BIT_TIME_T
Packit Service fdd496
       /* The system headers define _stati64 to _stat32i64.  */
Packit Service fdd496
#      undef _stat32i64
Packit Service fdd496
#      define _stat32i64(name, st) rpl_stat (name, st)
Packit Service fdd496
#     else
Packit Service fdd496
       /* The system headers define _stati64 to _stat64.  */
Packit Service fdd496
#      undef _stat64
Packit Service fdd496
#      define _stat64(name, st) rpl_stat (name, st)
Packit Service fdd496
#     endif
Packit Service fdd496
#    else
Packit Service fdd496
#     undef _stati64
Packit Service fdd496
#     define _stati64(name, st) rpl_stat (name, st)
Packit Service fdd496
#    endif
Packit Service fdd496
#   elif defined __MINGW32__ && defined stat
Packit Service fdd496
#    ifdef _USE_32BIT_TIME_T
Packit Service fdd496
      /* The system headers define stat to _stat32i64.  */
Packit Service fdd496
#     undef _stat32i64
Packit Service fdd496
#     define _stat32i64(name, st) rpl_stat (name, st)
Packit Service fdd496
#    else
Packit Service fdd496
      /* The system headers define stat to _stat64.  */
Packit Service fdd496
#     undef _stat64
Packit Service fdd496
#     define _stat64(name, st) rpl_stat (name, st)
Packit Service fdd496
#    endif
Packit Service fdd496
#   elif defined _MSC_VER && defined stat
Packit Service fdd496
#    ifdef _USE_32BIT_TIME_T
Packit Service fdd496
      /* The system headers define stat to _stat32.  */
Packit Service fdd496
#     undef _stat32
Packit Service fdd496
#     define _stat32(name, st) rpl_stat (name, st)
Packit Service fdd496
#    else
Packit Service fdd496
      /* The system headers define stat to _stat64i32.  */
Packit Service fdd496
#     undef _stat64i32
Packit Service fdd496
#     define _stat64i32(name, st) rpl_stat (name, st)
Packit Service fdd496
#    endif
Packit Service fdd496
#   else /* !(_AIX || __MINGW32__ || _MSC_VER) */
Packit Service fdd496
#    undef stat
Packit Service fdd496
#    define stat(name, st) rpl_stat (name, st)
Packit Service fdd496
#   endif /* !_LARGE_FILES */
Packit Service fdd496
#  endif /* !@GNULIB_OVERRIDES_STRUCT_STAT@ */
Packit Service fdd496
_GL_EXTERN_C int stat (const char *name, struct stat *buf)
Packit Service fdd496
                      _GL_ARG_NONNULL ((1, 2));
Packit Service fdd496
# endif
Packit Service fdd496
#elif @GNULIB_OVERRIDES_STRUCT_STAT@
Packit Service fdd496
/* see above:
Packit Service fdd496
  #define stat stat_used_without_requesting_gnulib_module_stat
Packit Service fdd496
 */
Packit Service fdd496
#elif defined GNULIB_POSIXCHECK
Packit Service fdd496
# undef stat
Packit Service fdd496
# if HAVE_RAW_DECL_STAT
Packit Service fdd496
_GL_WARN_ON_USE (stat, "stat is unportable - "
Packit Service fdd496
                 "use gnulib module stat for portability");
Packit Service fdd496
# endif
Packit Service fdd496
#endif
Packit Service fdd496
Packit Service fdd496
Packit Service fdd496
#if @GNULIB_UTIMENSAT@
Packit Service fdd496
/* Use the rpl_ prefix also on Solaris <= 9, because on Solaris 9 our utimensat
Packit Service fdd496
   implementation relies on futimesat, which on Solaris 10 makes an invocation
Packit Service fdd496
   to utimensat that is meant to invoke the libc's utimensat(), not gnulib's
Packit Service fdd496
   utimensat().  */
Packit Service fdd496
# if @REPLACE_UTIMENSAT@ || (!@HAVE_UTIMENSAT@ && defined __sun)
Packit Service fdd496
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service fdd496
#   undef utimensat
Packit Service fdd496
#   define utimensat rpl_utimensat
Packit Service fdd496
#  endif
Packit Service fdd496
_GL_FUNCDECL_RPL (utimensat, int, (int fd, char const *name,
Packit Service fdd496
                                   struct timespec const times[2], int flag)
Packit Service fdd496
                                  _GL_ARG_NONNULL ((2)));
Packit Service fdd496
_GL_CXXALIAS_RPL (utimensat, int, (int fd, char const *name,
Packit Service fdd496
                                   struct timespec const times[2], int flag));
Packit Service fdd496
# else
Packit Service fdd496
#  if !@HAVE_UTIMENSAT@
Packit Service fdd496
_GL_FUNCDECL_SYS (utimensat, int, (int fd, char const *name,
Packit Service fdd496
                                   struct timespec const times[2], int flag)
Packit Service fdd496
                                  _GL_ARG_NONNULL ((2)));
Packit Service fdd496
#  endif
Packit Service fdd496
_GL_CXXALIAS_SYS (utimensat, int, (int fd, char const *name,
Packit Service fdd496
                                   struct timespec const times[2], int flag));
Packit Service fdd496
# endif
Packit Service fdd496
# if @HAVE_UTIMENSAT@
Packit Service fdd496
_GL_CXXALIASWARN (utimensat);
Packit Service fdd496
# endif
Packit Service fdd496
#elif defined GNULIB_POSIXCHECK
Packit Service fdd496
# undef utimensat
Packit Service fdd496
# if HAVE_RAW_DECL_UTIMENSAT
Packit Service fdd496
_GL_WARN_ON_USE (utimensat, "utimensat is not portable - "
Packit Service fdd496
                 "use gnulib module utimensat for portability");
Packit Service fdd496
# endif
Packit Service fdd496
#endif
Packit Service fdd496
Packit Service fdd496
Packit Service fdd496
#endif /* _@GUARD_PREFIX@_SYS_STAT_H */
Packit Service fdd496
#endif /* _@GUARD_PREFIX@_SYS_STAT_H */
Packit Service fdd496
#endif