American English spelling fix.
[bpt/emacs.git] / src / s / msdos.h
1 /* System description file for MS-DOS
2
3 Copyright (C) 1993, 1996, 1997, 2001, 2002, 2003, 2004, 2005, 2006,
4 2007, 2008 Free Software Foundation, Inc.
5
6 This file is part of GNU Emacs.
7
8 GNU Emacs is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version.
12
13 GNU Emacs is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
20
21 /* Note: lots of stuff here was taken from s-msdos.h in demacs. */
22
23
24 /*
25 * Define symbols to identify the version of Unix this is.
26 * Define all the symbols that apply correctly.
27 */
28
29 #ifndef MSDOS
30 #define MSDOS
31 #endif
32
33 #ifdef __GO32__
34 #ifndef __DJGPP__
35 #define __DJGPP__ 1 /* V2 defines __DJGPP__ == 2 */
36 #endif
37 #else
38 You lose; /* Emacs for DOS must be compiled with DJGPP */
39 #endif
40
41 #define DOS_NT /* MSDOS or WINDOWSNT */
42 #undef BSD_SYSTEM
43 #undef VMS
44
45 /* SYSTEM_TYPE should indicate the kind of system you are using.
46 It sets the Lisp variable system-type. */
47
48 #define SYSTEM_TYPE "ms-dos"
49
50 #define SYMS_SYSTEM syms_of_dosfns();syms_of_msdos();syms_of_win16select()
51
52 /* NOMULTIPLEJOBS should be defined if your system's shell
53 does not have "job control" (the ability to stop a program,
54 run some other program, then continue the first one). */
55
56 #define NOMULTIPLEJOBS
57
58 /* Emacs can read input using SIGIO and buffering characters itself,
59 or using CBREAK mode and making C-g cause SIGINT.
60 The choice is controlled by the variable interrupt_input.
61 Define INTERRUPT_INPUT to make interrupt_input = 1 the default (use SIGIO)
62
63 SIGIO can be used only on systems that implement it (4.2 and 4.3).
64 CBREAK mode has two disadvantages
65 1) At least in 4.2, it is impossible to handle the Meta key properly.
66 I hear that in system V this problem does not exist.
67 2) Control-G causes output to be discarded.
68 I do not know whether this can be fixed in system V.
69
70 Another method of doing input is planned but not implemented.
71 It would have Emacs fork off a separate process
72 to read the input and send it to the true Emacs process
73 through a pipe.
74 */
75
76 /* #define INTERRUPT_INPUT */
77
78 /* Letter to use in finding device name of first pty,
79 if system supports pty's. 'a' means it is /dev/ptya0 */
80
81 /* #define FIRST_PTY_LETTER 'a' */
82
83 /*
84 * Define HAVE_PTYS if the system supports pty devices.
85 */
86
87 /* #define HAVE_PTYS */
88
89 /*
90 * Define NONSYSTEM_DIR_LIBRARY to make Emacs emulate
91 * The 4.2 opendir, etc., library functions.
92 */
93
94 /* #define NONSYSTEM_DIR_LIBRARY */
95
96 #define SYSV_SYSTEM_DIR
97
98 /* Define this symbol if your system has the functions bcopy, etc. */
99
100 #define BSTRING
101
102 /* Define this is the compiler understands `volatile'. */
103 #define HAVE_VOLATILE
104
105
106 /* subprocesses should be defined if you want to
107 have code for asynchronous subprocesses
108 (as used in M-x compile and M-x shell).
109 This is generally OS dependent, and not supported
110 under most USG systems. */
111
112 #undef subprocesses
113
114 /* If your system uses COFF (Common Object File Format) then define the
115 preprocessor symbol "COFF". */
116
117 #define COFF
118
119 /* define MAIL_USE_FLOCK if the mailer uses flock
120 to interlock access to /usr/spool/mail/$USER.
121 The alternative is that a lock file named
122 /usr/spool/mail/$USER.lock. */
123
124 /* #define MAIL_USE_FLOCK */
125
126 /* Define CLASH_DETECTION if you want lock files to be written
127 so that Emacs can tell instantly when you try to modify
128 a file that someone else has modified in his Emacs. */
129
130 /* #define CLASH_DETECTION */
131
132 /* Here, on a separate page, add any special hacks needed
133 to make Emacs work on this system. For example,
134 you might define certain system call names that don't
135 exist on your system, or that do different things on
136 your system and must be used only through an encapsulation
137 (Which you should place, by convention, in sysdep.c). */
138 \f
139 /* Avoid incompatibilities between gmalloc.c and system header files
140 in how to declare valloc. */
141 #define GMALLOC_INHIBIT_VALLOC
142
143 /* setjmp and longjmp can safely replace _setjmp and _longjmp,
144 but they will run slower. */
145
146 #define _setjmp setjmp
147 #define _longjmp longjmp
148
149 #if __DJGPP__ < 2
150
151 /* New chdir () routine.
152 DJGPP v2.0 and later doesn't need it because its chdir() does
153 set the drive itself. */
154 #ifdef chdir
155 #undef chdir
156 #endif
157 #define chdir sys_chdir
158
159 #define LIBS_SYSTEM -lpc /* isn't required in DJGPP v2.0, either */
160
161 #endif /* __DJGPP__ < 2 */
162
163 #if __DJGPP__ > 1
164
165 #define DATA_START (&etext + 1)
166 #define TEXT_START &start
167 #define TEXT_END &etext
168
169 #define _NAIVE_DOS_REGS
170
171 #else /* not __DJGPP__ > 1 */
172
173 /* This somehow needs to be defined even though we use COFF. */
174 #define TEXT_START -1
175
176 #endif /* not __DJGPP__ > 1 */
177
178 #define ORDINARY_LINK
179
180 /* command.com does not understand `...` so we define this. */
181 #define LIB_GCC -Lgcc
182 #define SEPCHAR ';'
183
184 #define NULL_DEVICE "nul"
185
186 #if __DJGPP__ < 2
187 #define O_RDONLY 0x0001
188 #define O_WRONLY 0x0002
189 #define O_RDWR 0x0004
190 #define O_CREAT 0x0100
191 #define O_TRUNC 0x0200
192 #define O_EXCL 0x0400
193 #define O_APPEND 0x0800
194 #define O_TEXT 0x4000
195 #define O_BINARY 0x8000
196 #define NO_MATHERR
197 #endif
198
199 #define HAVE_INVERSE_HYPERBOLIC
200 #define FLOAT_CHECK_DOMAIN
201
202 /* When $TERM is "internal" then this is substituted: */
203 #define INTERNAL_TERMINAL "pc|bios|IBM PC with color display:\
204 :co#80:li#25:Co#16:pa#256:km:ms:cm=<CM>:cl=<CL>:ce=<CE>:\
205 :se=</SO>:so=<SO>:us=<UL>:ue=</UL>:md=<BD>:mh=<DIM>:mb=<BL>:mr=<RV>:me=<NV>:\
206 :AB=<BG %d>:AF=<FG %d>:op=<DefC>:"
207
208 /* Define this to a function (Fdowncase, Fupcase) if your file system
209 likes that */
210 #define FILE_SYSTEM_CASE Fmsdos_downcase_filename
211
212 /* Define this to be the separator between devices and paths */
213 #define DEVICE_SEP ':'
214
215 /* We'll support either convention on MSDOG. */
216 #define IS_DIRECTORY_SEP(_c_) ((_c_) == '/' || (_c_) == '\\')
217 #define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_) || IS_DEVICE_SEP (_c_))
218
219 /* Call init_gettimeofday when TZ changes. */
220 #if __DJGPP__ < 2
221 #define LOCALTIME_CACHE
222 #define tzset init_gettimeofday
223 #endif
224
225 /* bcopy under djgpp is quite safe */
226 #define GAP_USE_BCOPY
227 #define BCOPY_UPWARD_SAFE 1
228 #define BCOPY_DOWNWARD_SAFE 1
229
230 /* Mode line description of a buffer's type. */
231 #define MODE_LINE_BINARY_TEXT(buf) (NILP(buf->buffer_file_type) ? "T" : "B")
232
233 /* Do we have POSIX signals? */
234 #if __DJGPP__ > 1
235 #define POSIX_SIGNALS
236 #endif
237
238 /* We have (the code to control) a mouse. */
239 #define HAVE_MOUSE
240
241 /* We canuse mouse menus. */
242 #define HAVE_MENUS
243
244 /* We have support for faces. */
245 #define HAVE_FACES
246
247 /* Define one of these for easier conditionals. */
248 #ifdef HAVE_X_WINDOWS
249 /* We need a little extra space, see ../../lisp/loadup.el */
250 #define SYSTEM_PURESIZE_EXTRA 15000
251 #define LIBX11_SYSTEM -lxext -lsys
252 #else
253 /* We need a little extra space, see ../../lisp/loadup.el */
254 #define SYSTEM_PURESIZE_EXTRA 50000
255 #endif
256
257 /* Tell the garbage collector that setjmp is known to save all
258 registers relevant for conservative garbage collection in the
259 jmp_buf. */
260
261 #define GC_SETJMP_WORKS 1
262 #define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS
263
264 /* arch-tag: d184f860-815d-4ff4-8187-d05c0f3c37d0
265 (do not change this comment) */