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