]> sourceware.org Git - glibc.git/blob - sysdeps/unix/sysv/linux/mips/bits/stat.h
Update.
[glibc.git] / sysdeps / unix / sysv / linux / mips / bits / stat.h
1 /* Copyright (C) 1992, 1995, 1996, 1997 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public License as
6 published by the Free Software Foundation; either version 2 of the
7 License, or (at your option) any later version.
8
9 The GNU C Library 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 GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public
15 License along with the GNU C Library; see the file COPYING.LIB. If not,
16 write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 Boston, MA 02111-1307, USA. */
18
19 /*
20 * Never include this file directly; use <sys/stat.h> instead.
21 */
22
23 #ifndef _BITS_STAT_H
24 #define _BITS_STAT_H 1
25
26 /* Versions of the `struct stat' data structure. */
27 #define _STAT_VER_LINUX_OLD 1
28 #define _STAT_VER_SVR4 2
29 #define _STAT_VER_LINUX 3
30 #define _STAT_VER _STAT_VER_LINUX /* The one defined below. */
31
32 /* Versions of the `xmknod' interface. */
33 #define _MKNOD_VER_LINUX 1
34 #define _MKNOD_VER_SVR4 2
35 #define _MKNOD_VER _MKNOD_VER_LINUX /* The bits defined below. */
36
37 /* Structure describing file characteristics. */
38 struct stat
39 {
40 unsigned long int st_dev;
41 long int st_pad1[3];
42 __ino_t st_ino; /* File serial number. */
43 __mode_t st_mode; /* File mode. */
44 __nlink_t st_nlink; /* Link count. */
45 __uid_t st_uid; /* User ID of the file's owner. */
46 __gid_t st_gid; /* Group ID of the file's group.*/
47 unsigned long int st_rdev; /* Device number, if device. */
48 long int st_pad2[2];
49 __off_t st_size; /* Size of file, in bytes. */
50 /* SVR4 added this extra long to allow for expansion of off_t. */
51 long int st_pad3;
52 /*
53 * Actually this should be timestruc_t st_atime, st_mtime and
54 * st_ctime but we don't have it under Linux.
55 */
56 __time_t st_atime; /* Time of last access. */
57 long int __reserved0;
58 __time_t st_mtime; /* Time of last modification. */
59 long int __reserved1;
60 __time_t st_ctime; /* Time of last status change. */
61 long int __reserved2;
62 long int st_blksize; /* Optimal block size for I/O. */
63 #define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */
64 long int st_blocks; /* Number of 512-byte blocks allocated. */
65 char st_fstype[16]; /* Filesystem type name */
66 long int st_pad4[8];
67 /* Linux specific fields */
68 unsigned int st_flags;
69 unsigned int st_gen;
70 };
71
72
73 /* Encoding of the file mode. */
74
75 #define __S_IFMT 0170000 /* These bits determine file type. */
76
77 /* File types. */
78 #define __S_IFDIR 0040000 /* Directory. */
79 #define __S_IFCHR 0020000 /* Character device. */
80 #define __S_IFBLK 0060000 /* Block device. */
81 #define __S_IFREG 0100000 /* Regular file. */
82 #define __S_IFIFO 0010000 /* FIFO. */
83
84 /* These don't actually exist on System V, but having them doesn't hurt. */
85 #define __S_IFLNK 0120000 /* Symbolic link. */
86 #define __S_IFSOCK 0140000 /* Socket. */
87
88 /* Protection bits. */
89
90 #define __S_ISUID 04000 /* Set user ID on execution. */
91 #define __S_ISGID 02000 /* Set group ID on execution. */
92 #define __S_ISVTX 01000 /* Save swapped text after use (sticky). */
93 #define __S_IREAD 0400 /* Read by owner. */
94 #define __S_IWRITE 0200 /* Write by owner. */
95 #define __S_IEXEC 0100 /* Execute by owner. */
96
97 #endif /* bits/stat.h */
This page took 0.047721 seconds and 6 git commands to generate.