Mercurial > hg > xemacs-beta
comparison src/sysfile.h @ 251:677f6a0ee643 r20-5b24
Import from CVS: tag r20-5b24
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:19:59 +0200 |
parents | 41ff10fd062f |
children | c5d627a313b1 |
comparison
equal
deleted
inserted
replaced
250:f385a461c9aa | 251:677f6a0ee643 |
---|---|
33 #endif | 33 #endif |
34 #include <sys/file.h> | 34 #include <sys/file.h> |
35 #include <sys/stat.h> | 35 #include <sys/stat.h> |
36 #include <sys/param.h> | 36 #include <sys/param.h> |
37 | 37 |
38 #if NeXT | 38 #if defined (NeXT) || defined(__CYGWIN32__) |
39 /* what is needed from here? Do others need it too? */ | 39 /* what is needed from here? Do others need it too? |
40 O_BINARY is in here under cygwin. */ | |
40 # include <sys/fcntl.h> | 41 # include <sys/fcntl.h> |
41 #endif /* NeXT */ | 42 #endif /* NeXT */ |
42 | 43 |
43 #ifdef WINDOWSNT | 44 #ifdef WINDOWSNT |
44 #include <io.h> | 45 #include <io.h> |
67 #define O_WRONLY 1 | 68 #define O_WRONLY 1 |
68 #endif | 69 #endif |
69 | 70 |
70 #ifndef O_RDWR | 71 #ifndef O_RDWR |
71 #define O_RDWR 2 | 72 #define O_RDWR 2 |
73 #endif | |
74 | |
75 /* file opening defaults */ | |
76 #ifndef OPEN_BINARY | |
77 #ifdef O_BINARY | |
78 #define OPEN_BINARY O_BINARY | |
79 #else | |
80 #define OPEN_BINARY (0) | |
81 #endif | |
82 #endif | |
83 | |
84 #ifndef OPEN_TEXT | |
85 #ifdef O_TEXT | |
86 #define OPEN_TEXT O_TEXT | |
87 #else | |
88 #define OPEN_TEXT (0) | |
89 #endif | |
90 #endif | |
91 | |
92 #ifndef CREAT_MODE | |
93 #ifdef WINDOWSNT | |
94 #define CREAT_MODE (S_IREAD | S_IWRITE) | |
95 #else | |
96 #define CREAT_MODE (0666) | |
97 #endif | |
98 #endif | |
99 | |
100 #ifndef READ_TEXT | |
101 #ifdef O_TEXT | |
102 #define READ_TEXT "rt" | |
103 #else | |
104 #define READ_TEXT "r" | |
105 #endif | |
106 #endif | |
107 | |
108 #ifndef READ_BINARY | |
109 #ifdef O_BINARY | |
110 #define READ_BINARY "rb" | |
111 #else | |
112 #define READ_BINARY "r" | |
113 #endif | |
114 #endif | |
115 | |
116 #ifndef WRITE_BINARY | |
117 #ifdef O_BINARY | |
118 #define WRITE_BINARY "wb" | |
119 #else | |
120 #define WRITE_BINARY "w" | |
121 #endif | |
72 #endif | 122 #endif |
73 | 123 |
74 /* if system does not have symbolic links, it does not have lstat. | 124 /* if system does not have symbolic links, it does not have lstat. |
75 In that case, use ordinary stat instead. */ | 125 In that case, use ordinary stat instead. */ |
76 | 126 |