1 /* Handcrafted s-mac.h file for building GNU Emacs on Mac OS 9.
2 Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004,
3 2005, 2006, 2007 Free Software Foundation, Inc.
5 This file is part of GNU Emacs.
7 GNU Emacs is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2, or (at your option)
12 GNU Emacs is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with GNU Emacs; see the file COPYING. If not, write to
19 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 Boston, MA 02110-1301, USA. */
22 /* Contributed by Andrew Choi (akochoi@mac.com). */
25 * Define symbols to identify the version of Unix this is.
26 * Define all the symbols that apply correctly.
37 /* #define BSD_SYSTEM */
40 /* SYSTEM_TYPE should indicate the kind of system you are using.
41 It sets the Lisp variable system-type. */
43 #define SYSTEM_TYPE "macos"
45 /* NOMULTIPLEJOBS should be defined if your system's shell
46 does not have "job control" (the ability to stop a program,
47 run some other program, then continue the first one). */
49 #define NOMULTIPLEJOBS
51 /* Emacs can read input using SIGIO and buffering characters itself,
52 or using CBREAK mode and making C-g cause SIGINT.
53 The choice is controlled by the variable interrupt_input.
55 Define INTERRUPT_INPUT to make interrupt_input = 1 the default (use SIGIO)
57 Emacs uses the presence or absence of the SIGIO and BROKEN_SIGIO macros
58 to indicate whether or not signal-driven I/O is possible. It uses
59 INTERRUPT_INPUT to decide whether to use it by default.
61 SIGIO can be used only on systems that implement it (4.2 and 4.3).
62 CBREAK mode has two disadvantages
63 1) At least in 4.2, it is impossible to handle the Meta key properly.
64 I hear that in system V this problem does not exist.
65 2) Control-G causes output to be discarded.
66 I do not know whether this can be fixed in system V.
68 Another method of doing input is planned but not implemented.
69 It would have Emacs fork off a separate process
70 to read the input and send it to the true Emacs process
73 /* #define INTERRUPT_INPUT */
75 /* Letter to use in finding device name of first pty,
76 if system supports pty's. 'a' means it is /dev/ptya0 */
78 /* #define FIRST_PTY_LETTER 'a' */
81 * Define HAVE_TERMIOS if the system provides POSIX-style
82 * functions and macros for terminal control.
84 * Define HAVE_TERMIO if the system provides sysV-style ioctls
85 * for terminal control.
87 * Do not define both. HAVE_TERMIOS is preferred, if it is
88 * supported on your system.
91 /* #define HAVE_TERMIOS */
95 * Define HAVE_PTYS if the system supports pty devices.
98 /* #define HAVE_PTYS */
101 * Define NONSYSTEM_DIR_LIBRARY to make Emacs emulate
102 * The 4.2 opendir, etc., library functions.
105 /* #define NONSYSTEM_DIR_LIBRARY */
107 /* Define this symbol if your system has the functions bcopy, etc. */
109 /* #define BSTRING */
111 /* subprocesses should be defined if you want to
112 have code for asynchronous subprocesses
113 (as used in M-x compile and M-x shell).
114 This is generally OS dependent, and not supported
115 under most USG systems. */
117 /* #define subprocesses */
119 /* If your system uses COFF (Common Object File Format) then define the
120 preprocessor symbol "COFF". */
124 /* define MAIL_USE_FLOCK if the mailer uses flock
125 to interlock access to /usr/spool/mail/$USER.
126 The alternative is that a lock file named
127 /usr/spool/mail/$USER.lock. */
129 /* #define MAIL_USE_FLOCK */
131 /* Define CLASH_DETECTION if you want lock files to be written
132 so that Emacs can tell instantly when you try to modify
133 a file that someone else has modified in his Emacs. */
135 /* #define CLASH_DETECTION */
137 /* Define this if your operating system declares signal handlers to
138 have a type other than the usual. `The usual' is `void' for ANSI C
139 systems (i.e. when the __STDC__ macro is defined), and `int' for
140 pre-ANSI systems. If you're using GCC on an older system, __STDC__
141 will be defined, but the system's include files will still say that
142 signal returns int or whatever; in situations like that, define
143 this to be what the system's include files want. */
144 /* #define SIGTYPE int */
146 /* If the character used to separate elements of the executable path
147 is not ':', #define this to be the appropriate character constant. */
148 /* #define SEPCHAR ':' */
150 /* Define this if the system can use mmap for buffer text allocation. */
151 /* #define USE_MMAP_FOR_BUFFERS 1 */
153 /* ============================================================ */
155 /* Here, add any special hacks needed
156 to make Emacs work on this system. For example,
157 you might define certain system call names that don't
158 exist on your system, or that do different things on
159 your system and must be used only through an encapsulation
160 (Which you should place, by convention, in sysdep.c). */
162 /* Some compilers tend to put everything declared static
163 into the initialized data area, which becomes pure after dumping Emacs.
164 On these systems, you must #define static as nothing to foil this.
165 Note that emacs carefully avoids static vars inside functions. */
169 /* If the system's imake configuration file defines `NeedWidePrototypes'
170 as `NO', we must define NARROWPROTO manually. Such a define is
171 generated in the Makefile generated by `xmkmf'. If we don't
172 define NARROWPROTO, we will see the wrong function prototypes
173 for X functions taking float or double parameters. */
175 /* #define NARROWPROTO 1 */
177 /* ============================================================ */
179 /* After adding support for a new system, modify the large case
180 statement in the `configure' script to recognize reasonable
181 configuration names, and add a description of the system to
184 If you've just fixed a problem in an existing configuration file,
185 you should also check `etc/MACHINES' to make sure its descriptions
186 of known problems in that configuration should be updated. */
189 /* MrC predefines signal numbers as powers of 2. */
190 #define sigmask(no) (((no) & (no) - 1) ? 1L << ((no) - 1) : (no))
191 #define __signal_max 8 /* There's enough room for the following
192 signals between 8 and 16, and the
193 maximum predefined one (32) is less
194 than 8th power of 2. */
197 #define SIGHUP (__signal_max+1)
198 #define SIGQUIT (__signal_max+2)
199 #define SIGTRAP (__signal_max+3)
200 #define SIGKILL (__signal_max+4)
201 #define SIGALRM (__signal_max+5)
202 #define SIGPIPE (__signal_max+6)
205 #define NSIG SIGTERM /* largest one in signal.h */
207 #define NSIG (__signal_max+6)
211 #define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_ptr - (FILE)->_base)
213 #define PENDING_OUTPUT_COUNT(FILE) ((FILE)->buffer_ptr - (FILE)->buffer)
244 #define SYSTEM_PURESIZE_EXTRA (200*1024)
246 /* don't know what this will do, but sysdep.c needs it */
249 /* Limited by CW's 32K limit on local data! */
250 #define READ_BUF_SIZE (8 << 10)
254 #define SYSV_SYSTEM_DIR
256 #define SYSTEM_MALLOC
258 #define _setjmp setjmp
259 #define _longjmp longjmp
263 #define main emacs_main
265 /* Include this here so it won't be include again when #include in emacs
266 sources. Then undefine the macro definitions in it for unlink, read,
267 write, access, and rmdir. */
277 #define unlink sys_unlink
279 #define read sys_read
281 #define write sys_write
283 #define access sys_access
285 #define rmdir sys_rmdir
287 #define open sys_open
288 #define creat sys_creat
290 #define rename sys_rename
291 #define fopen sys_fopen
292 #define signal sys_signal
294 #define gmtime sys_gmtime
295 #define localtime sys_localtime
296 #define ctime sys_ctime
297 #define time sys_time
300 #define rindex strrchr
302 #define PTR POINTER_TYPE * /* For strftime.c. */
304 #define SYMS_SYSTEM syms_of_mac()
308 #define DECL_ALIGN(type, var) type var
312 /* Use the GC_MAKE_GCPROS_NOOPS (see lisp.h) method for marking the
314 #define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS
316 /* arch-tag: 6a941c4b-a419-4d25-80ac-9335053e58b2
317 (do not change this comment) */