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