~ubuntu-branches/ubuntu/precise/eglibc/precise-201308281639

« back to all changes in this revision

Viewing changes to ports/sysdeps/unix/sysv/aix/bits/stat.h

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2012-02-08 01:58:09 UTC
  • mfrom: (1.5.3) (288.1.12 precise)
  • Revision ID: package-import@ubuntu.com-20120208015809-ulscst7uteq3e22z
Tags: 2.15~pre6-0ubuntu10
Merge from Debian (r5151, 2.13-26).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright (C) 1999, 2000 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 Lesser General Public
6
 
   License as published by the Free Software Foundation; either
7
 
   version 2.1 of the 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
 
   Lesser General Public License for more details.
13
 
 
14
 
   You should have received a copy of the GNU Lesser General Public
15
 
   License along with the GNU C Library; if not, write to the Free
16
 
   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
17
 
   02111-1307 USA.  */
18
 
 
19
 
#ifndef _SYS_STAT_H
20
 
# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
21
 
#endif
22
 
 
23
 
struct stat
24
 
  {
25
 
    __dev_t st_dev;                     /* Device.  */
26
 
    __ino_t st_ino;                     /* File serial number.  */
27
 
    __mode_t st_mode;                   /* File mode.  */
28
 
    __nlink_t st_nlink;                 /* Link count.  */
29
 
    unsigned short int st_flag;         /* Flag word.  */
30
 
    __uid_t st_uid;                     /* User ID of the file's owner. */
31
 
    __gid_t st_gid;                     /* Group ID of the file's group.*/
32
 
    __dev_t st_rdev;                    /* Device number, if device.  */
33
 
#ifndef __USE_FILE_OFFSET64
34
 
    __off_t st_size;                    /* Size of file, in bytes.  */
35
 
#else
36
 
    int st_ssize;                       /* Size of file, in bytes.  */
37
 
#endif
38
 
    __time_t st_atime;                  /* Time of last access.  */
39
 
    unsigned long int __unused1;
40
 
    __time_t st_mtime;                  /* Time of last modification.  */
41
 
    unsigned long int __unused2;
42
 
    __time_t st_ctime;                  /* Time of last status change.  */
43
 
    unsigned long int __unused3;
44
 
    __blksize_t st_blksize;             /* Optimal block size for I/O.  */
45
 
    __blkcnt_t st_blocks;               /* Number 512-byte blocks allocated. */
46
 
    int st_vfstype;                     /* Type of the filesystem.  */
47
 
    unsigned int st_vfs;                /* Vfs number.  */
48
 
    unsigned int st_type;               /* Vnode type.  */
49
 
    unsigned int st_gen;                /* Inode generation number.  */
50
 
 
51
 
#define _STATBUF_RESERVED_SPACE 9
52
 
    unsigned int st_reserved[_STATBUF_RESERVED_SPACE];
53
 
 
54
 
#ifdef __USE_FILE_OFFSET64
55
 
    unsigned int st_padto_ll;
56
 
    __off64_t st_size;                  /* 64 bit file size in bytes.  */
57
 
#endif
58
 
  };
59
 
 
60
 
#ifdef __USE_LARGEFILE64
61
 
struct stat64
62
 
  {
63
 
    __dev_t st_dev;                     /* Device.  */
64
 
    __ino_t st_ino;                     /* File serial number.  */
65
 
    __mode_t st_mode;                   /* File mode.  */
66
 
    __nlink_t st_nlink;                 /* Link count.  */
67
 
    unsigned short int st_flag;         /* Flag word.  */
68
 
    __uid_t st_uid;                     /* User ID of the file's owner. */
69
 
    __gid_t st_gid;                     /* Group ID of the file's group.*/
70
 
    __dev_t st_rdev;                    /* Device number, if device.  */
71
 
    int st_ssize;                       /* Size of file, in bytes.  */
72
 
    __time_t st_atime;                  /* Time of last access.  */
73
 
    unsigned long int __unused1;
74
 
    __time_t st_mtime;                  /* Time of last modification.  */
75
 
    unsigned long int __unused2;
76
 
    __time_t st_ctime;                  /* Time of last status change.  */
77
 
    unsigned long int __unused3;
78
 
    __blksize_t st_blksize;             /* Optimal block size for I/O.  */
79
 
    __blkcnt_t st_blocks;               /* Number 512-byte blocks allocated. */
80
 
    int st_vfstype;                     /* Type of the filesystem.  */
81
 
    unsigned int st_vfs;                /* Vfs number.  */
82
 
    unsigned int st_type;               /* Vnode type.  */
83
 
    unsigned int st_gen;                /* Inode generation number.  */
84
 
    unsigned int st_reserved[_STATBUF_RESERVED_SPACE];
85
 
    unsigned int st_padto_ll;
86
 
    __off64_t st_size;                  /* 64 bit file size in bytes.  */
87
 
  };
88
 
#endif
89
 
 
90
 
/* Tell code we have these members.  */
91
 
#define _STATBUF_ST_BLKSIZE
92
 
#define _STATBUF_ST_RDEV
93
 
 
94
 
/* Encoding of the file mode.  */
95
 
 
96
 
#define __S_IFMT        0170000 /* These bits determine file type.  */
97
 
 
98
 
/* File types.  */
99
 
#define __S_IFDIR       0040000 /* Directory.  */
100
 
#define __S_IFCHR       0020000 /* Character device.  */
101
 
#define __S_IFBLK       0060000 /* Block device.  */
102
 
#define __S_IFREG       0100000 /* Regular file.  */
103
 
#define __S_IFIFO       0010000 /* FIFO.  */
104
 
#define __S_IFLNK       0120000 /* Symbolic link.  */
105
 
#define __S_IFSOCK      0140000 /* Socket.  */
106
 
 
107
 
/* POSIX.1b objects.  */
108
 
#define __S_TYPEISMQ(buf) (0)
109
 
#define __S_TYPEISSEM(buf) (0)
110
 
#define __S_TYPEISSHM(buf) (0)
111
 
 
112
 
/* Protection bits.  */
113
 
 
114
 
#define __S_ISUID       04000   /* Set user ID on execution.  */
115
 
#define __S_ISGID       02000   /* Set group ID on execution.  */
116
 
#define __S_ISVTX       01000   /* Save swapped text after use (sticky).  */
117
 
#define __S_IREAD       0400    /* Read by owner.  */
118
 
#define __S_IWRITE      0200    /* Write by owner.  */
119
 
#define __S_IEXEC       0100    /* Execute by owner.  */