comparison src/s/cygwin32.h @ 265:8efd647ea9ca r20-5b31

Import from CVS: tag r20-5b31
author cvs
date Mon, 13 Aug 2007 10:25:37 +0200
parents 727739f917cb
children 966663fcf606
comparison
equal deleted inserted replaced
264:682d2a9d41a5 265:8efd647ea9ca
76 #else 76 #else
77 #define BROKEN_CYGWIN 77 #define BROKEN_CYGWIN
78 #endif 78 #endif
79 extern void cygwin32_win32_to_posix_path_list(const char*, char*); 79 extern void cygwin32_win32_to_posix_path_list(const char*, char*);
80 extern int cygwin32_win32_to_posix_path_list_buf_size(const char*); 80 extern int cygwin32_win32_to_posix_path_list_buf_size(const char*);
81 extern void cygwin32_posix_to_win32_path_list(const char*, char*);
82 extern int cygwin32_posix_to_win32_path_list_buf_size(const char*);
81 struct timeval; 83 struct timeval;
82 struct timezone; 84 struct timezone;
83 extern int gettimeofday(struct timeval *tp, struct timezone *tzp); 85 extern int gettimeofday(struct timeval *tp, struct timezone *tzp);
84 extern int gethostname (char* name, int namelen); 86 extern int gethostname (char* name, int namelen);
85 extern char* mktemp(char *); 87 extern char* mktemp(char *);
95 97
96 #ifndef ORDINARY_LINK 98 #ifndef ORDINARY_LINK
97 #define ORDINARY_LINK 99 #define ORDINARY_LINK
98 #endif 100 #endif
99 101
100 #define C_SWITCH_SYSTEM -Wno-sign-compare -Wno-implicit 102 #define C_SWITCH_SYSTEM -Wno-sign-compare -Wno-implicit -fno-caller-saves
101 #undef MOD_ALT 103 #define LIBS_SYSTEM -lwinmm
102 #undef MOD_CONTROL
103 #undef MOD_SHIFT
104 104
105 #define SIF_TRACKPOS 0x0010 105 #define SIF_TRACKPOS 0x0010
106 #define FW_BLACK FW_HEAVY 106 #define FW_BLACK FW_HEAVY
107 #define FW_ULTRABOLD FW_EXTRABOLD 107 #define FW_ULTRABOLD FW_EXTRABOLD
108 #define FW_ULTRALIGHT FW_EXTRALIGHT 108 #define FW_ULTRALIGHT FW_EXTRALIGHT
112 #define CBF_SKIP_ALLNOTIFICATIONS 0x3C0000 112 #define CBF_SKIP_ALLNOTIFICATIONS 0x3C0000
113 #define CBF_FAIL_ADVISES 0x4000 113 #define CBF_FAIL_ADVISES 0x4000
114 #define CBF_FAIL_POKES 0x10000 114 #define CBF_FAIL_POKES 0x10000
115 #define CBF_FAIL_REQUESTS 0x20000 115 #define CBF_FAIL_REQUESTS 0x20000
116 #define SZDDESYS_TOPIC "System" 116 #define SZDDESYS_TOPIC "System"
117 #define SND_ASYNC 1
118 #define SND_NODEFAULT 2
119 #define SND_MEMORY 4
120 #define SND_FILENAME 0x2000L
117 121
118 #define TEXT_START -1 122 #define TEXT_START -1
119 #define TEXT_END -1 123 #define TEXT_END -1
120 #define DATA_END -1 124 #define DATA_END -1
121 #define HEAP_IN_DATA 125 #define HEAP_IN_DATA
124 #define PROCESS_IO_BLOCKING 128 #define PROCESS_IO_BLOCKING
125 #define strnicmp strncasecmp 129 #define strnicmp strncasecmp
126 #ifndef HAVE_SOCKETS 130 #ifndef HAVE_SOCKETS
127 #define HAVE_SOCKETS 131 #define HAVE_SOCKETS
128 #endif 132 #endif
133 #define OBJECTS_SYSTEM ntplay.o
134 #define HAVE_NATIVE_SOUND
129 135
130 #ifndef CYGWIN_B19 136 #ifndef CYGWIN_B19
131 #define TMPF_FIXED_PITCH 0x01 137 #define TMPF_FIXED_PITCH 0x01
132 #define SIGPROF 0 138 #define SIGPROF 0
133 #define SIGWINCH 0 139 #define SIGWINCH 0
219 #define DEVICE_SEP ':' 225 #define DEVICE_SEP ':'
220 226
221 /* We'll support either convention on NT. */ 227 /* We'll support either convention on NT. */
222 #define IS_DIRECTORY_SEP(_c_) ((_c_) == '/' || (_c_) == '\\') 228 #define IS_DIRECTORY_SEP(_c_) ((_c_) == '/' || (_c_) == '\\')
223 #define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_) || IS_DEVICE_SEP (_c_)) 229 #define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_) || IS_DEVICE_SEP (_c_))
224
225 /* The null device on Windows NT. */
226 #define EXEC_SUFFIXES ".exe:.com:.bat:.cmd:" 230 #define EXEC_SUFFIXES ".exe:.com:.bat:.cmd:"
227
228 #define MODE_LINE_BINARY_TEXT(_b_) (NILP ((_b_)->buffer_file_type) ? "T" : "B")
229 231
230 /* We need a little extra space, see ../../lisp/loadup.el */ 232 /* We need a little extra space, see ../../lisp/loadup.el */
231 #define SYSTEM_PURESIZE_EXTRA 15000 233 #define SYSTEM_PURESIZE_EXTRA 15000
232 234
233 #define CYGWIN_CONV_PATH(src, dst) \ 235 #define CYGWIN_CONV_PATH(src, dst) \
234 dst = alloca (cygwin32_win32_to_posix_path_list_buf_size(src)); \ 236 dst = alloca (cygwin32_win32_to_posix_path_list_buf_size(src)); \
235 cygwin32_win32_to_posix_path_list(src, dst) 237 cygwin32_win32_to_posix_path_list(src, dst)
238 #define CYGWIN_WIN32_PATH(src, dst) \
239 dst = alloca (cygwin32_posix_to_win32_path_list_buf_size(src)); \
240 cygwin32_posix_to_win32_path_list(src, dst)
236 241
237 /* 242 /*
238 * stolen from usg. 243 * stolen from usg.
239 */ 244 */
240 #define HAVE_PTYS 245 #define HAVE_PTYS
256 #define PTY_OPEN \ 261 #define PTY_OPEN \
257 fd = open (pty_name, O_RDWR | O_NONBLOCK | OPEN_BINARY, 0) 262 fd = open (pty_name, O_RDWR | O_NONBLOCK | OPEN_BINARY, 0)
258 263
259 #define PTY_TTY_NAME_SPRINTF \ 264 #define PTY_TTY_NAME_SPRINTF \
260 { \ 265 { \
266 extern char* ptsname(int); \
261 char *ptyname; \ 267 char *ptyname; \
262 \ 268 \
263 if (!(ptyname = ptsname (fd))) \ 269 if (!(ptyname = ptsname (fd))) \
264 { close (fd); return -1; } \ 270 { close (fd); return -1; } \
265 strncpy (pty_name, ptyname, sizeof (pty_name)); \ 271 strncpy (pty_name, ptyname, sizeof (pty_name)); \