diff options
author | Damien Miller <djm@mindrot.org> | 2000-06-18 15:43:25 +1000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2000-06-18 15:43:25 +1000 |
commit | 0f91b4e3a1aebff24bd25d402fa597e2f36db6ae (patch) | |
tree | ddf2568920e624aace5b31aa51887f821d8ae4b0 /defines.h | |
parent | f6d9e2218998559cb67aad55d3f4a0bf53600c41 (diff) |
- (djm) Started merge of Ben Lindstrom's <mouring@pconline.com> NeXT support
Diffstat (limited to 'defines.h')
-rw-r--r-- | defines.h | 47 |
1 files changed, 46 insertions, 1 deletions
@@ -30,6 +30,11 @@ | |||
30 | #ifdef HAVE_SYS_SYSMACROS_H | 30 | #ifdef HAVE_SYS_SYSMACROS_H |
31 | # include <sys/sysmacros.h> /* For MIN, MAX, etc */ | 31 | # include <sys/sysmacros.h> /* For MIN, MAX, etc */ |
32 | #endif | 32 | #endif |
33 | #ifdef HAVE_SYS_STAT_H | ||
34 | # include <sys/stat.h> /* For S_* constants and macros */ | ||
35 | #endif | ||
36 | |||
37 | #include <unistd.h> /* For STDIN_FILENO, etc */ | ||
33 | 38 | ||
34 | /* Constants */ | 39 | /* Constants */ |
35 | 40 | ||
@@ -61,6 +66,37 @@ enum | |||
61 | # endif /* PATH_MAX */ | 66 | # endif /* PATH_MAX */ |
62 | #endif /* MAXPATHLEN */ | 67 | #endif /* MAXPATHLEN */ |
63 | 68 | ||
69 | #ifndef STDIN_FILENO | ||
70 | # define STDIN_FILENO 0 | ||
71 | #endif | ||
72 | #ifndef STDOUT_FILENO | ||
73 | # define STDOUT_FILENO 1 | ||
74 | #endif | ||
75 | #ifndef STDERR_FILENO | ||
76 | # define STDERR_FILENO 2 | ||
77 | #endif | ||
78 | |||
79 | #ifndef S_ISREG | ||
80 | # define S_ISDIR(mode) (((mode) & (_S_IFMT)) == (_S_IFDIR)) | ||
81 | # define S_ISREG(mode) (((mode) & (_S_IFMT)) == (_S_IFREG)) | ||
82 | #endif /* S_ISREG */ | ||
83 | |||
84 | #ifndef S_IXUSR | ||
85 | # define S_IXUSR 0000100 /* execute/search permission, */ | ||
86 | # define S_IXGRP 0000010 /* execute/search permission, */ | ||
87 | # define S_IXOTH 0000001 /* execute/search permission, */ | ||
88 | # define _S_IWUSR 0000200 /* write permission, */ | ||
89 | # define S_IWUSR _S_IWUSR /* write permission, owner */ | ||
90 | # define S_IWGRP 0000020 /* write permission, group */ | ||
91 | # define S_IWOTH 0000002 /* write permission, other */ | ||
92 | # define S_IRUSR 0000400 /* read permission, owner */ | ||
93 | # define S_IRGRP 0000040 /* read permission, group */ | ||
94 | # define S_IROTH 0000004 /* read permission, other */ | ||
95 | # define S_IRWXU 0000700 /* read, write, execute */ | ||
96 | # define S_IRWXG 0000070 /* read, write, execute */ | ||
97 | # define S_IRWXO 0000007 /* read, write, execute */ | ||
98 | #endif /* S_IXUSR */ | ||
99 | |||
64 | /* Types */ | 100 | /* Types */ |
65 | 101 | ||
66 | /* If sys/types.h does not supply intXX_t, supply them ourselves */ | 102 | /* If sys/types.h does not supply intXX_t, supply them ourselves */ |
@@ -151,6 +187,16 @@ typedef int ssize_t; | |||
151 | # define HAVE_SSIZE_T | 187 | # define HAVE_SSIZE_T |
152 | #endif /* HAVE_SSIZE_T */ | 188 | #endif /* HAVE_SSIZE_T */ |
153 | 189 | ||
190 | #ifndef HAVE_PID_T | ||
191 | typedef int pid_t; | ||
192 | # define HAVE_PID_T | ||
193 | #endif /* HAVE_PID_T */ | ||
194 | |||
195 | #ifndef HAVE_MODE_T | ||
196 | typedef int mode_t; | ||
197 | # define HAVE_MODE_T | ||
198 | #endif /* HAVE_MODE_T */ | ||
199 | |||
154 | #if !defined(HAVE_SS_FAMILY_IN_SS) && defined(HAVE___SS_FAMILY_IN_SS) | 200 | #if !defined(HAVE_SS_FAMILY_IN_SS) && defined(HAVE___SS_FAMILY_IN_SS) |
155 | # define ss_family __ss_family | 201 | # define ss_family __ss_family |
156 | #endif /* !defined(HAVE_SS_FAMILY_IN_SS) && defined(HAVE_SA_FAMILY_IN_SS) */ | 202 | #endif /* !defined(HAVE_SS_FAMILY_IN_SS) && defined(HAVE_SA_FAMILY_IN_SS) */ |
@@ -327,5 +373,4 @@ typedef int ssize_t; | |||
327 | 373 | ||
328 | /** end of login recorder definitions */ | 374 | /** end of login recorder definitions */ |
329 | 375 | ||
330 | |||
331 | #endif /* _DEFINES_H */ | 376 | #endif /* _DEFINES_H */ |