]>
git.ipfire.org Git - thirdparty/glibc.git/blob - sysdeps/unix/sysv/linux/m68k/bits/struct_stat.h
1 /* Definition for struct stat.
2 Copyright (C) 2020-2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library. If not, see
17 <https://www.gnu.org/licenses/>. */
19 #if !defined _SYS_STAT_H && !defined _FCNTL_H
20 # error "Never include <bits/struct_stat.h> directly; use <sys/stat.h> instead."
23 #ifndef _BITS_STRUCT_STAT_H
24 #define _BITS_STRUCT_STAT_H 1
28 __dev_t st_dev
; /* Device. */
29 unsigned short int __pad1
;
30 #ifndef __USE_FILE_OFFSET64
31 __ino_t st_ino
; /* File serial number. */
33 __ino_t __st_ino
; /* 32bit file serial number. */
35 __mode_t st_mode
; /* File mode. */
36 __nlink_t st_nlink
; /* Link count. */
37 __uid_t st_uid
; /* User ID of the file's owner. */
38 __gid_t st_gid
; /* Group ID of the file's group.*/
39 __dev_t st_rdev
; /* Device number, if device. */
40 unsigned short int __pad2
;
41 #ifndef __USE_FILE_OFFSET64
42 __off_t st_size
; /* Size of file, in bytes. */
44 __off64_t st_size
; /* Size of file, in bytes. */
46 __blksize_t st_blksize
; /* Optimal block size for I/O. */
48 #ifndef __USE_FILE_OFFSET64
49 __blkcnt_t st_blocks
; /* Number 512-byte blocks allocated. */
51 __blkcnt64_t st_blocks
; /* Number 512-byte blocks allocated. */
54 /* Nanosecond resolution timestamps are stored in a format
55 equivalent to 'struct timespec'. This is the type used
56 whenever possible but the Unix namespace rules do not allow the
57 identifier 'timespec' to appear in the <sys/stat.h> header.
58 Therefore we have to handle the use of this header in strictly
59 standard-compliant sources special. */
60 struct timespec st_atim
; /* Time of last access. */
61 struct timespec st_mtim
; /* Time of last modification. */
62 struct timespec st_ctim
; /* Time of last status change. */
63 # define st_atime st_atim.tv_sec /* Backward compatibility. */
64 # define st_mtime st_mtim.tv_sec
65 # define st_ctime st_ctim.tv_sec
67 __time_t st_atime
; /* Time of last access. */
68 unsigned long int st_atimensec
; /* Nscecs of last access. */
69 __time_t st_mtime
; /* Time of last modification. */
70 unsigned long int st_mtimensec
; /* Nsecs of last modification. */
71 __time_t st_ctime
; /* Time of last status change. */
72 unsigned long int st_ctimensec
; /* Nsecs of last status change. */
74 #ifndef __USE_FILE_OFFSET64
75 unsigned long int __glibc_reserved4
;
76 unsigned long int __glibc_reserved5
;
78 __ino64_t st_ino
; /* File serial number. */
82 #ifdef __USE_LARGEFILE64
85 __dev_t st_dev
; /* Device. */
86 unsigned short int __pad1
;
88 __ino_t __st_ino
; /* 32bit file serial number. */
89 __mode_t st_mode
; /* File mode. */
90 __nlink_t st_nlink
; /* Link count. */
91 __uid_t st_uid
; /* User ID of the file's owner. */
92 __gid_t st_gid
; /* Group ID of the file's group.*/
93 __dev_t st_rdev
; /* Device number, if device. */
94 unsigned short int __pad2
;
95 __off64_t st_size
; /* Size of file, in bytes. */
96 __blksize_t st_blksize
; /* Optimal block size for I/O. */
98 __blkcnt64_t st_blocks
; /* Number 512-byte blocks allocated. */
99 # ifdef __USE_XOPEN2K8
100 /* Nanosecond resolution timestamps are stored in a format
101 equivalent to 'struct timespec'. This is the type used
102 whenever possible but the Unix namespace rules do not allow the
103 identifier 'timespec' to appear in the <sys/stat.h> header.
104 Therefore we have to handle the use of this header in strictly
105 standard-compliant sources special. */
106 struct timespec st_atim
; /* Time of last access. */
107 struct timespec st_mtim
; /* Time of last modification. */
108 struct timespec st_ctim
; /* Time of last status change. */
110 __time_t st_atime
; /* Time of last access. */
111 unsigned long int st_atimensec
; /* Nscecs of last access. */
112 __time_t st_mtime
; /* Time of last modification. */
113 unsigned long int st_mtimensec
; /* Nsecs of last modification. */
114 __time_t st_ctime
; /* Time of last status change. */
115 unsigned long int st_ctimensec
; /* Nsecs of last status change. */
117 __ino64_t st_ino
; /* File serial number. */
121 /* Tell code we have these members. */
122 #define _STATBUF_ST_BLKSIZE
123 #define _STATBUF_ST_RDEV
124 /* Nanosecond resolution time values are supported. */
125 #define _STATBUF_ST_NSEC
127 #endif /* _BITS_STRUCT_STAT_H */