]>
code.delx.au - gnu-emacs/blob - mac/inc/sys/stat.h
1 /* Replacement sys/stat.h file for building GNU Emacs on the Macintosh.
2 Copyright (C) 1999, 2000, 2002, 2003, 2004,
3 2005 Free Software Foundation, Inc.
5 This file is part of GNU Emacs.
7 GNU Emacs is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2, or (at your option)
12 GNU Emacs is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with GNU Emacs; see the file COPYING. If not, write to
19 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 Boston, MA 02110-1301, USA. */
22 /* Contributed by Andrew Choi (akochoi@mac.com). */
46 #endif /* __MWERKS__ */
48 /* Need to redefine these for CW, filemode.c assumes Unix definitions which are
49 inconsistent with CW definitions because CW uses bits 8-12 for S_IFMT info.
50 Bit 8 is used by S_IRUSR on Unix! */
51 #define S_IFMT 0170000 /* type of file */
52 #define S_IFBLK 0060000 /* block special */
53 #define S_IFCHR 0020000 /* character special */
54 #define S_IFIFO 0010000 /* FIFO special */
55 #define S_IFREG 0100000 /* regular */
56 #define S_IFDIR 0040000 /* directory */
57 #define S_IFLNK 0030000 /* symbolic link */
60 #define S_IWRITE 00200
63 /* Need to redefine these for because mode_string in filemode.c assumes Unix
64 values in the lower 9 bits which are different from CW values. */
65 #define S_IRUSR S_IREAD
66 #define S_IWUSR S_IWRITE
67 #define S_IXUSR S_IEXEC
70 typedef unsigned long dev_t
;
73 dev_t st_dev
; /* ID of device containing file */
74 int st_ino
; /* file serial number */
75 unsigned short st_mode
; /* mode of file */
76 int st_nlink
; /* number of links to the file */
77 int st_uid
; /* user ID of file */
78 int st_gid
; /* group ID of file */
79 int st_rdev
; /* device ID (if file is character or block special) */
80 int st_size
; /* file size in bytes (if file is a regular file) */
81 int st_atime
; /* time of last access */
82 int st_mtime
; /* time of last data modification */
83 int st_ctime
; /* time of last status change */
87 #endif /* _SYS_STAT_H */
89 /* arch-tag: b7da83f5-3d3f-4b19-9cd2-790dd87145e4
90 (do not change this comment) */