annotate src/s/windowsnt.h @ 446:1ccc32a20af4 r21-2-38

Import from CVS: tag r21-2-38
author cvs
date Mon, 13 Aug 2007 11:37:21 +0200
parents abe6d1db359e
children 223736d75acb
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1 /* System description file for Windows 9x and NT.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2 Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
3
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
4 This file is part of GNU Emacs.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
5
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
6 GNU Emacs is free software; you can redistribute it and/or modify
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
7 it under the terms of the GNU General Public License as published by
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
8 the Free Software Foundation; either version 2, or (at your option)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
9 any later version.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
10
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
11 GNU Emacs is distributed in the hope that it will be useful,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
14 GNU General Public License for more details.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
15
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
16 You should have received a copy of the GNU General Public License
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
17 along with XEmacs; see the file COPYING. If not, write to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
19 Boston, MA 02111-1307, USA. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
20
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
21 /* Synched up with: FSF 19.31. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
22
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
23 /* Capsule summary of different preprocessor flags:
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
24
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
25 1. Keep in mind that there are two possible OS environments we are dealing
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
26 with -- Cygwin and Native Windows. Cygwin provides a POSIX emulation
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
27 layer on top of MS Windows -- in particular, providing the file-system,
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
28 process, tty, and signal semantics that are part of a modern, standard
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
29 Unix operating system. MS Windows also provides these services, but
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
30 through their own API, called Win32. When compiling in a Cygwin
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
31 environment, the Win32 API's are also available, and in fact are used
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
32 to do native GUI programming.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
33
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
34 2. There are two windowing environments we can target XEmacs for when
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
35 running under MS Windows -- Windows native, and X. (It may seem strange
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
36 to write an X application under Windows, but there are in fact many X
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
37 servers out there running on Windows, and as far as I know there is no
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
38 real (or at least, that works well) networking Window-system extension
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
39 under MS Windows. Furthermore, if you're porting a Unix application to
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
40 Windows and use Cygwin to assist you, it might seem natural to use an
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
41 X server to avoid having to port all the code to Windows.) For XEmacs,
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
42 there are various reasons people could come up with for why we would
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
43 want to keep maintaining X Windows under MS Windows support.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
44
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
45 That gives us four possible build environments. I (Ben) build
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
46 regularly on fully-native-everything, Andy builds on Cygwin + MS
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
47 Windows + X Windows for windowing.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
48
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
49 The build flags used for these divisions are:
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
50
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
51 CYGWIN -- for Cygwin-only stuff.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
52 WIN32_NATIVE -- Win32 native OS-level stuff (files, process, etc.).
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
53 HAVE_X_WINDOWS -- for X Windows (regardless of whether under MS Win)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
54 HAVE_MS_WINDOWS -- MS Windows native windowing system (anything related to
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
55 the appearance of the graphical screen).
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
56
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
57 Finally, there's also the MINGW build environment, which uses GCC
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
58 \(similar to Cygwin), but native MS Windows libraries rather than a
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
59 POSIX emulation layer (the Cygwin approach). This environment defines
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
60 WIN32_NATIVE, but also defines MINGW, which is used mostly because
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
61 uses its own include files (related to Cygwin), which have a few
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
62 things messed up.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
63
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
64
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
65 Formerly, we had a whole host of flags. Here's the conversion, for porting
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
66 code from GNU Emacs and such:
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
67
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
68
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
69 WINDOWSNT -> WIN32_NATIVE
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
70 WIN32 -> WIN32_NATIVE
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
71 _WIN32 -> WIN32_NATIVE
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
72 HAVE_WIN32 -> WIN32_NATIVE
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
73 DOS_NT -> WIN32_NATIVE
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
74 HAVE_NTGUI -> WIN32_NATIVE, unless it ends up already bracketed by this
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
75 HAVE_FACES -> always true
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
76 MSDOS -> determine whether this code is really specific to MS-DOS (and not
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
77 Windows -- e.g. DJGPP code); if so, delete the code; otherwise,
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
78 convert to WIN32_NATIVE (we do not support MS-DOS w/DOS Extender
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
79 under XEmacs)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
80
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
81 __CYGWIN__ -> CYGWIN
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
82 __CYGWIN32__ -> CYGWIN
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
83 __MINGW32__ -> MINGW
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
84
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
85 */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
86
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
87 /* Identify ourselves */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
88 #ifndef WIN32_NATIVE
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
89 #define WIN32_NATIVE
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
90 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
91
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
92 /* In case non-Microsoft compiler is used, we fake _MSC_VER */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
93 #ifndef _MSC_VER
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
94 #define _MSC_VER 1
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
95 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
96
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
97 typedef unsigned short mode_t;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
98 /* typedef long ptrdiff_t; -kkm */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
99 typedef int pid_t;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
100
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
101 #include <stddef.h>
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
102
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
103 /* If you are compiling with a non-C calling convention but need to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
104 declare vararg routines differently, put it here */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
105 #define _VARARGS_ __cdecl
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
106
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
107 /* If you are providing a function to something that will call the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
108 function back (like a signal handler and signal, or main) its calling
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
109 convention must be whatever standard the libraries expect */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
110 #define _CALLBACK_ __cdecl
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
111
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
112 /* SYSTEM_TYPE should indicate the kind of system you are using.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
113 It sets the Lisp variable system-type. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
114
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
115 #define SYSTEM_TYPE "windows-nt"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
116
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
117 #define NO_MATHERR
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
118
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
119 #define SIZEOF_SHORT 2
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
120 #define SIZEOF_INT 4
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
121 #define SIZEOF_LONG 4
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
122 #define SIZEOF_LONG_LONG 0
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
123 #define SIZEOF_VOID_P 4
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
124
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
125 /* NOMULTIPLEJOBS should be defined if your system's shell
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
126 does not have "job control" (the ability to stop a program,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
127 run some other program, then continue the first one). */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
128
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
129 /* #define NOMULTIPLEJOBS */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
130
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
131 /* Letter to use in finding device name of first pty,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
132 if system supports pty's. 'a' means it is /dev/ptya0 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
133
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
134 #define FIRST_PTY_LETTER 'a'
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
135
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
136 /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
137 * Define HAVE_TIMEVAL if the system supports the BSD style clock values.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
138 * Look in <sys/time.h> for a timeval structure.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
139 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
140
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
141 #define HAVE_TIMEVAL
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
142
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
143 /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
144 * Define HAVE_SELECT if the system supports the `select' system call.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
145 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
146
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
147 /* #define HAVE_SELECT */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
148
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
149 /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
150 * Define HAVE_PTYS if the system supports pty devices.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
151 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
152
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
153 /* #define HAVE_PTYS */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
154
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
155 /* If your system uses COFF (Common Object File Format) then define the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
156 preprocessor symbol "COFF". */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
157
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
158 #define COFF
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
159
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
160 /* NT supports Winsock which is close enough (with some hacks) */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
161
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
162 #define HAVE_SOCKETS
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
163
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
164 /* define MAIL_USE_FLOCK if the mailer uses flock
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
165 to interlock access to /usr/spool/mail/$USER.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
166 The alternative is that a lock file named
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
167 /usr/spool/mail/$USER.lock. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
168
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
169 #define MAIL_USE_POP
438
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
170 #define HAVE_LOCKING
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
171 #define MAIL_USE_LOCKING
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
172
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
173 /* If the character used to separate elements of the executable path
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
174 is not ':', #define this to be the appropriate character constant. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
175 #define SEPCHAR ';'
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
176
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
177 /* ============================================================ */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
178
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
179 /* Here, add any special hacks needed
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
180 to make Emacs work on this system. For example,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
181 you might define certain system call names that don't
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
182 exist on your system, or that do different things on
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
183 your system and must be used only through an encapsulation
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
184 (Which you should place, by convention, in sysdep.c). */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
185
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
186 /* XEmacs file I/O for DOS text files requires FILE_CODING */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
187 #define FILE_CODING
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
188
434
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 432
diff changeset
189 #define DIRECTORY_SEP ((char)XCHAR(Vdirectory_sep_char))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
190
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
191 /* Define this to be the separator between devices and paths */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
192 #define DEVICE_SEP ':'
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
193
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
194 /* We'll support either convention on NT. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
195 #define IS_DIRECTORY_SEP(_c_) ((_c_) == '/' || (_c_) == '\\')
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
196 #define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_) || IS_DEVICE_SEP (_c_))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
197
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
198 /* The null device on Windows NT. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
199 #define NULL_DEVICE "NUL:"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
200 #define EXEC_SUFFIXES ".exe:.com:.bat:.cmd:"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
201
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
202 #ifndef MAXPATHLEN
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
203 #define MAXPATHLEN _MAX_PATH
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
204 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
205
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
206 #define LISP_FLOAT_TYPE
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
207
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
208 #define HAVE_GETTIMEOFDAY
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
209 #define HAVE_GETHOSTNAME
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
210 #define HAVE_DUP2
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
211 #define HAVE_RENAME
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
212 #define HAVE_CLOSEDIR
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
213
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
214 #define HAVE_TZNAME
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
215
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
216 #define HAVE_LONG_FILE_NAMES
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
217
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
218 #define HAVE_MKDIR
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
219 #define HAVE_RMDIR
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
220 #define HAVE_RANDOM
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
221 #define HAVE_LOGB
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
222 #define HAVE_FREXP
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
223 #define HAVE_FMOD
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
224 #define HAVE_FTIME
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
225 #define HAVE_MKTIME
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
226
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
227 #define HAVE_MOUSE
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
228 #define HAVE_H_ERRNO
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
229 #define HAVE_STRUCT_UTIMBUF
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
230
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
231 /* Compatibility macros. Some used to be routines in nt.c */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
232 #define strcasecmp(x,y) _stricmp(x,y)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
233 #define random() (rand() << 15 | rand())
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
234 #define srandom(seed) (srand(seed))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
235 #define setpgrp(pid,gid)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
236
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
237 #define MODE_LINE_BINARY_TEXT(_b_) (NILP ((_b_)->buffer_file_type) ? "T" : "B")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
238
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
239
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
240 #include <stdio.h>
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
241
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
242 /* subprocess calls that are emulated */
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
243 #ifndef DONT_ENCAPSULATE
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
244 #define spawnve sys_spawnve
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
245 int spawnve (int mode, const char *cmdname,
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
246 const char * const *argv, const char *const *envp);
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
247 #endif
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
248
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
249 /* IO calls that are emulated or shadowed */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
250 #define pipe sys_pipe
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
251 int sys_pipe (int * phandles);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
252
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
253 #ifndef HAVE_X_WINDOWS
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
254 #define sleep sys_sleep
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
255 void sleep (int seconds);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
256 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
257
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
258 #define wait sys_wait
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
259 int wait (int *status);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
260
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
261 #define kill sys_kill
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
262 int kill (int pid, int sig);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
263
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
264 /* map to MSVC names */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
265 #define popen _popen
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
266 #define pclose _pclose
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
267
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
268 typedef int uid_t;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
269 typedef int gid_t;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
270 typedef int pid_t;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
271 typedef int ssize_t;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
272
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
273 /* Encapsulation of system calls */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
274 #ifndef DONT_ENCAPSULATE
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
275 #define getpid sys_getpid
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
276 pid_t getpid (void);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
277 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
278
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
279 /* Random global functions called everywhere. Implemented in nt.c */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
280 /* #### Most of these are FSFisms and must be avoided */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
281 /* #### All of these are FSFisms and must be avoided */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
282 void dostounix_filename (char *p);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
283 void unixtodos_filename (char *p);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
284 int crlf_to_lf (int n, unsigned char *buf, unsigned int *lf_count);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
285
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
286 char *getwd (char *dir);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
287
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
288 void *sbrk (unsigned long increment);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
289
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
290 struct passwd;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
291 struct passwd *getpwuid (uid_t uid);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
292 struct passwd *getpwnam (const char *name);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
293 uid_t getuid (void);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
294 uid_t geteuid (void);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
295 gid_t getgid (void);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
296 gid_t getegid (void);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
297
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
298 /* Setitimer is emulated */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
299 #define HAVE_SETITIMER
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
300
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
301 /* We now have emulation for some signals */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
302 #define HAVE_SIGHOLD
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
303 #define sigset(s,h) mswindows_sigset(s,h)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
304 #define sighold(s) mswindows_sighold(s)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
305 #define sigrelse(s) mswindows_sigrelse(s)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
306 #define sigpause(s) mswindows_sigpause(s)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
307
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
308 /* Defines that we need that aren't in the standard signal.h */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
309 #define SIGHUP 1 /* Hang up */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
310 #define SIGQUIT 3 /* Quit process */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
311 #define SIGKILL 9 /* Die, die die */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
312 #define SIGALRM 14 /* Alarm */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
313 #define SIGPROF 29 /* Profiling timer exp */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
314
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
315 /* Defines size_t and alloca (). */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
316 #include <malloc.h>
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
317
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
318 #include <sys/stat.h>
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
319
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
320 /* Define for those source files that do not include enough NT
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
321 system files. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
322 #ifndef NULL
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
323 #ifdef __cplusplus
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
324 #define NULL 0
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
325 #else
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
326 #define NULL ((void *)0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
327 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
328 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
329
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
330 /* For proper declaration of environ. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
331 #include <stdlib.h>
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
332 #include <string.h>
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
333
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
334 /* Define process implementation */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
335 #define HAVE_WIN32_PROCESSES
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
336
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
337 /* We need a little extra space, see ../../lisp/loadup.el */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
338 #define SYSTEM_PURESIZE_EXTRA 15000
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
339
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
340 /* ============================================================ */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
341
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
342 /* See unexnt.c */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
343 #if (_MSC_VER >= 1100)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
344 #define DUMP_SEPARATE_SECTION
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
345 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
346 #ifdef DUMP_SEPARATE_SECTION
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
347 #pragma data_seg("xdata")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
348 #pragma bss_seg("xdata")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
349 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
350
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
351 #ifdef HAVE_SCROLLBARS
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
352 /* Ensure the NT 4 mouse definitions in winuser.h are available */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
353 #ifndef _WIN32_WINNT
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
354 #define _WIN32_WINNT 0x0400
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
355 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
356 #endif
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
357
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
358 /* Force the various NT 4 structures and constants to be included; we're
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
359 careful not to call (or even link with) functions not in NT 3.51 when
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
360 running on 3.51, but when running on NT 4 or Win9x, we use the later
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
361 functions, and need their headers. */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
362 /* The VC++ (5.0, at least) headers treat WINVER non-existent as 0x0400 */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
363 #if defined (WINVER) && WINVER < 0x0400
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
364 # undef WINVER
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
365 # define WINVER 0x0400
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
366 #endif
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
367
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
368 /* MSVC 6.0 has a mechanism to declare functions which never return */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
369 #if (_MSC_VER >= 1200)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
370 #define DOESNT_RETURN __declspec(noreturn) void
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
371 #define DECLARE_DOESNT_RETURN(decl) __declspec(noreturn) extern void decl
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
372 #define DECLARE_DOESNT_RETURN_GCC_ATTRIBUTE_SYNTAX_SUCKS(decl,str,idx) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
373 __declspec(noreturn) extern void decl PRINTF_ARGS(str,idx)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
374 #endif /* MSVC 6.0 */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
375
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
376 #define CORRECT_DIR_SEPS(s) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
377 do { if ('/' == DIRECTORY_SEP) dostounix_filename (s); \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
378 else unixtodos_filename (s); \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
379 } while (0)