2 * $Id: e_mac.h 443 2006-05-30 04:37:13Z darren $
4 * Copyright (c) 2001, Maarten L. Hekkelman
6 * Author: Maarten L. Hekkelman <maarten@hekkelman.com>
7 * http://www.hekkelman.com
9 * This source code is released for free distribution under the terms of the
10 * GNU General Public License. It is provided on an as-is basis and no
11 * responsibility is accepted for its failure to perform as expected.
13 * Configures ctags for Macintosh environment.
18 #define BUILD_MPW_TOOL 1
20 #define MACROS_USE_PATTERNS 1
21 #define DEFAULT_FILE_FORMAT 2
22 #define INTERNAL_SORT 1
24 #define NEED_PROTO_TRUNCATE 1
25 #define STDC_HEADERS 1
27 #define HAVE_FGETPOS 1
28 #define HAVE_OPENDIR 1
31 #define HAVE_STRERROR 1
33 #define HAVE_FCNTL_H 1
34 #define HAVE_STDLIB_H 1
35 #define HAVE_STRING_H 1
36 #define HAVE_SYS_DIR_H 1
37 #define HAVE_SYS_TIMES_H 1
39 #define HAVE_TYPES_H 1
40 #define HAVE_STDLIB_H 1
53 The following defines are collected from various header files from some
57 typedef unsigned long mode_t
;
58 typedef unsigned long ino_t
;
59 typedef unsigned long dev_t
;
60 typedef short nlink_t
;
61 typedef unsigned long uid_t
;
62 typedef unsigned long gid_t
;
64 /* Encoding of the file mode. */
65 #define S_IFMT 0170000 /* These bits determine file type. */
68 #define S_IFDIR 0040000 /* Directory. */
69 #define S_IFCHR 0020000 /* Character device. */
70 #define S_IFBLK 0060000 /* Block device. */
71 #define S_IFREG 0100000 /* Regular file. */
73 #define S_ISTYPE(mode, mask) (((mode) & S_IFMT) == (mask))
75 #define S_ISDIR(mode) S_ISTYPE((mode), S_IFDIR)
76 #define S_ISCHR(mode) S_ISTYPE((mode), S_IFCHR)
77 #define S_ISBLK(mode) S_ISTYPE((mode), S_IFBLK)
78 #define S_ISREG(mode) S_ISTYPE((mode), S_IFREG)
81 dev_t st_dev
; /* Device. */
82 unsigned short int __pad1
;
83 ino_t st_ino
; /* File serial number. */
84 mode_t st_mode
; /* File mode. */
85 nlink_t st_nlink
; /* Link count. */
86 uid_t st_uid
; /* User ID of the file's owner. */
87 gid_t st_gid
; /* Group ID of the file's group.*/
88 off_t st_size
; /* Size of file, in bytes. */
89 unsigned long int st_blksize
; /* Optimal block size for I/O. */
90 long st_blocks
; /* Number 512-byte blocks allocated. */
91 time_t st_atime
; /* Time of last access. */
92 time_t st_mtime
; /* Time of last modification. */
93 time_t st_ctime
; /* Time of last status change. */
96 int fstat(int fildes
, struct stat
*buf
);
100 #include <stat.mac.h>
104 #define PATH_MAX 1024
108 Our own stat, accepts unix like paths.
110 int mstat(const char *path
, struct stat
*buf
);
122 extern DIR* opendir(const char *dirname
);
123 extern struct dirent
* readdir(DIR* dirp
);
124 extern int closedir(DIR* dirp
);
125 extern void rewinddir(DIR* dirp
);
126 extern char* getcwd(char*, int);
129 Our own fopen, accepts unix like paths.
131 extern FILE* mfopen(const char* file
, const char* mode
);
134 Dirty, define the standard functions fopen, stat and lstat to map to our
138 #define stat(a,b) mstat(a,b)
139 #define lstat(a,b) mstat(a,b)
143 /* vi:set tabstop=4 shiftwidth=4: */