(root)/
glibc-2.38/
include/
sys/
stat.h
       1  #ifndef _SYS_STAT_H
       2  #include <io/sys/stat.h>
       3  
       4  #ifndef _ISOMAC
       5  # include <xstatver.h>
       6  # include <struct___timespec64.h>
       7  # include <struct_stat_time64.h>
       8  # include <stdbool.h>
       9  
      10  static inline bool
      11  in_ino_t_range (__ino64_t v)
      12  {
      13    __ino_t s = v;
      14    return s == v;
      15  }
      16  
      17  static inline bool
      18  in_off_t_range (__off64_t v)
      19  {
      20    __off_t s = v;
      21    return s == v;
      22  }
      23  
      24  static inline bool
      25  in_blkcnt_t_range (__blkcnt64_t v)
      26  {
      27    __blkcnt_t s = v;
      28    return s == v;
      29  }
      30  
      31  /* Now define the internal interfaces. */
      32  extern int __stat (const char *__file, struct stat *__buf);
      33  extern int __stat64 (const char *__file, struct stat64 *__buf);
      34  extern int __fstat (int __fd, struct stat *__buf);
      35  extern int __fstat64 (int __fd, struct stat64 *__buf);
      36  extern int __lstat (const char *__file, struct stat *__buf);
      37  extern int __lstat64 (const char *__file, struct stat64 *__buf);
      38  extern int __fstatat (int dirfd, const char *pathname, struct stat *buf,
      39  		      int flags);
      40  extern int __fstatat64 (int dirfd, const char *pathname, struct stat64 *buf,
      41  			int flags);
      42  # if IS_IN (libc) || (IS_IN (rtld) && !defined NO_RTLD_HIDDEN)
      43  hidden_proto (__stat64)
      44  hidden_proto (__fstat64)
      45  hidden_proto (__lstat64)
      46  hidden_proto (__fstatat64)
      47  # endif
      48  
      49  # if __TIMESIZE == 64 || defined NO_RTLD_HIDDEN
      50  #  define __stat64_time64  __stat64
      51  #  define __fstat64_time64  __fstat64
      52  #  define __lstat64_time64  __lstat64
      53  #  define __fstatat64_time64  __fstatat64
      54  # else
      55  extern int __stat64_time64 (const char *file, struct __stat64_t64 *buf);
      56  hidden_proto (__stat64_time64);
      57  extern int __lstat64_time64 (const char *file, struct __stat64_t64 *buf);
      58  hidden_proto (__lstat64_time64);
      59  extern int __fstat64_time64 (int fd, struct __stat64_t64 *buf);
      60  hidden_proto (__fstat64_time64);
      61  extern int __fstatat64_time64 (int dirfd, const char *pathname,
      62  			       struct __stat64_t64 *buf, int flags);
      63  hidden_proto (__fstatat64_time64);
      64  # endif
      65  
      66  extern int __chmod (const char *__file, __mode_t __mode);
      67  libc_hidden_proto (__chmod)
      68  extern int __fchmod (int __fd, __mode_t __mode);
      69  extern int __fchmodat (int __fd, const char *__file, mode_t __mode, int __flag);
      70  libc_hidden_proto (fchmodat)
      71  extern __mode_t __umask (__mode_t __mask);
      72  extern int __mkdir (const char *__path, __mode_t __mode);
      73  libc_hidden_proto (__mkdir)
      74  extern int __mkdirat (int __fd, const char *__path, mode_t __mode);
      75  
      76  extern int __mknodat (int fd, const char *path, mode_t mode, dev_t dev);
      77  libc_hidden_proto (__mknodat);
      78  extern int __mknod (const char *__path,
      79  		    __mode_t __mode, __dev_t __dev);
      80  libc_hidden_proto (__mknod);
      81  
      82  extern int __xmknod (int __ver, const char *__path, __mode_t __mode,
      83  		     __dev_t *__dev);
      84  extern int __xmknodat (int __ver, int __fd, const char *__path,
      85  		       __mode_t __mode, __dev_t *__dev);
      86  
      87  int __fxstat (int __ver, int __fildes, struct stat *__stat_buf);
      88  int __xstat (int __ver, const char *__filename,
      89  	     struct stat *__stat_buf);
      90  int __lxstat (int __ver, const char *__filename, struct stat *__stat_buf);
      91  int __fxstatat (int __ver, int __fildes, const char *__filename,
      92  		struct stat *__stat_buf, int __flag);
      93  int __fxstat64 (int ver, int __fildes, struct stat64 *__stat_buf);
      94  int __xstat64 (int ver, const char *__filename, struct stat64 *__stat_buf);
      95  int __lxstat64 (int ver, const char *__filename, struct stat64 *__stat_buf);
      96  int __fxstatat64 (int ver, int __fildes, const char *__filename,
      97  		  struct stat64 *__stat_buf, int __flag);
      98  
      99  #endif
     100  #endif