Mercurial > emacs
comparison src/s/darwin.h @ 88155:d7ddb3e565de
sync with trunk
author | Henrik Enberg <henrik.enberg@telia.com> |
---|---|
date | Mon, 16 Jan 2006 00:03:54 +0000 |
parents | 23a1cea22d13 |
children |
comparison
equal
deleted
inserted
replaced
88154:8ce476d3ba36 | 88155:d7ddb3e565de |
---|---|
1 /* System description header file for Darwin (Mac OS X). | 1 /* System description header file for Darwin (Mac OS X). |
2 Copyright (C) 2001, 2002 Free Software Foundation, Inc. | 2 Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. |
3 | 3 |
4 This file is part of GNU Emacs. | 4 This file is part of GNU Emacs. |
5 | 5 |
6 GNU Emacs is free software; you can redistribute it and/or modify | 6 GNU Emacs is free software; you can redistribute it and/or modify |
7 it under the terms of the GNU General Public License as published by | 7 it under the terms of the GNU General Public License as published by |
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 GNU General Public License for more details. | 14 GNU General Public License for more details. |
15 | 15 |
16 You should have received a copy of the GNU General Public License | 16 You should have received a copy of the GNU General Public License |
17 along with GNU Emacs; see the file COPYING. If not, write to | 17 along with GNU Emacs; see the file COPYING. If not, write to |
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 18 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
19 Boston, MA 02111-1307, USA. */ | 19 Boston, MA 02110-1301, USA. */ |
20 | 20 |
21 | 21 |
22 /* | 22 /* |
23 * Define symbols to identify the version of Unix this is. | 23 * Define symbols to identify the version of Unix this is. |
24 * Define all the symbols that apply correctly. | 24 * Define all the symbols that apply correctly. |
35 /* #define BSD4_3 */ | 35 /* #define BSD4_3 */ |
36 /* #define BSD4_4 */ | 36 /* #define BSD4_4 */ |
37 #define BSD_SYSTEM | 37 #define BSD_SYSTEM |
38 /* #define VMS */ | 38 /* #define VMS */ |
39 | 39 |
40 #if 0 /* Don't define DARWIN on Mac OS X because CoreFoundation.h uses | |
41 it to distinguish Mac OS X from bare Darwin. */ | |
42 #ifndef DARWIN | |
43 #define DARWIN 1 | |
44 #endif | |
45 #endif | |
46 | |
40 /* MAC_OS is used to conditionally compile code common to both MAC_OS8 | 47 /* MAC_OS is used to conditionally compile code common to both MAC_OS8 |
41 and MAC_OSX. */ | 48 and MAC_OSX. */ |
42 #ifdef MAC_OSX | 49 #ifdef MAC_OSX |
43 #ifdef HAVE_CARBON | 50 #ifdef HAVE_CARBON |
44 #define MAC_OS | 51 #define MAC_OS |
101 | 108 |
102 #define NO_TERMIO | 109 #define NO_TERMIO |
103 | 110 |
104 /* | 111 /* |
105 * Define HAVE_PTYS if the system supports pty devices. | 112 * Define HAVE_PTYS if the system supports pty devices. |
113 * Note: PTYs are broken on darwin <6. Use at your own risk. | |
106 */ | 114 */ |
107 | 115 |
108 #define HAVE_PTYS | 116 #define HAVE_PTYS |
117 | |
118 /** | |
119 * PTYs only work correctly on Darwin 7 or higher. So make the | |
120 * default for process-connection-type dependent on the kernel | |
121 * version. | |
122 */ | |
123 #define MIN_PTY_KERNEL_VERSION '7' | |
109 | 124 |
110 /* | 125 /* |
111 * Define NONSYSTEM_DIR_LIBRARY to make Emacs emulate | 126 * Define NONSYSTEM_DIR_LIBRARY to make Emacs emulate |
112 * The 4.2 opendir, etc., library functions. | 127 * The 4.2 opendir, etc., library functions. |
113 */ | 128 */ |
201 #define init_process emacs_init_process | 216 #define init_process emacs_init_process |
202 | 217 |
203 /* Fix compilation problem for regex.c. */ | 218 /* Fix compilation problem for regex.c. */ |
204 #define __restrict | 219 #define __restrict |
205 | 220 |
206 /* Fix compilation problem for md5.c. */ | |
207 #define __attribute__(x) | |
208 | |
209 /* Used in dispnew.c. Copied from freebsd.h. */ | 221 /* Used in dispnew.c. Copied from freebsd.h. */ |
210 #define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base) | 222 #define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base) |
211 | 223 |
212 /* System uses OXTABS instead of the expected TAB3. (Copied from | 224 /* System uses OXTABS instead of the expected TAB3. (Copied from |
213 bsd386.h.) */ | 225 bsd386.h.) */ |
218 #define SYSTEM_MALLOC | 230 #define SYSTEM_MALLOC |
219 | 231 |
220 /* Define HAVE_SOCKETS if system supports 4.2-compatible sockets. */ | 232 /* Define HAVE_SOCKETS if system supports 4.2-compatible sockets. */ |
221 #define HAVE_SOCKETS | 233 #define HAVE_SOCKETS |
222 | 234 |
235 /* In Carbon, asynchronous I/O (using SIGIO) can't be used for window | |
236 events because they don't come from sockets, even though it works | |
237 fine on tty's. */ | |
238 #ifdef HAVE_CARBON | |
239 #define NO_SOCK_SIGIO | |
240 #endif | |
241 | |
223 /* Extra initialization calls in main for Mac OS X system type. */ | 242 /* Extra initialization calls in main for Mac OS X system type. */ |
224 #ifdef HAVE_CARBON | 243 #ifdef HAVE_CARBON |
225 #define SYMS_SYSTEM syms_of_mac() | 244 #define SYMS_SYSTEM syms_of_mac() |
226 #endif | 245 #endif |
227 | 246 |
242 | 261 |
243 /* Definitions for how to compile & link. */ | 262 /* Definitions for how to compile & link. */ |
244 | 263 |
245 /* Indicate that we are compiling for Mac OS X and where to find Mac | 264 /* Indicate that we are compiling for Mac OS X and where to find Mac |
246 specific headers. */ | 265 specific headers. */ |
247 #define C_SWITCH_SYSTEM -fpascal-strings -fno-common -DMAC_OSX -I../mac/src | 266 #define C_SWITCH_SYSTEM -fpascal-strings -DMAC_OSX -I../mac/src |
248 | 267 |
249 /* Link in the Carbon lib. The -headerpad option tells ld (see man | 268 /* Link in the Carbon lib. */ |
250 page) to leave room at the end of the header for adding load | 269 #ifdef HAVE_CARBON |
251 commands. Needed for dumping. 0x690 is the total size of 30 | 270 #define LIBS_CARBON -framework Carbon -framework QuickTime |
252 segment load commands (at 56 each). */ | 271 #else |
253 #define LD_SWITCH_SYSTEM_TEMACS -prebind -framework Carbon -lstdc++ -Xlinker -headerpad -Xlinker 690 | 272 #define LIBS_CARBON |
273 #endif | |
274 | |
275 /* The -headerpad option tells ld (see man page) to leave room at the | |
276 end of the header for adding load commands. Needed for dumping. | |
277 0x690 is the total size of 30 segment load commands (at 56 | |
278 each). */ | |
279 #define LD_SWITCH_SYSTEM_TEMACS -prebind LIBS_CARBON -Xlinker -headerpad -Xlinker 690 | |
254 | 280 |
255 #define C_SWITCH_SYSTEM_TEMACS -Dtemacs | 281 #define C_SWITCH_SYSTEM_TEMACS -Dtemacs |
256 | 282 |
257 /* The ncurses library has been moved out of the System framework in | 283 /* The ncurses library has been moved out of the System framework in |
258 Mac OS X 10.2. So if ./configure detects it, set the command-line | 284 Mac OS X 10.2. So if ./configure detects it, set the command-line |
300 /* The following solves the problem that Emacs hangs when evaluating | 326 /* The following solves the problem that Emacs hangs when evaluating |
301 (make-comint "test0" "/nodir/nofile" nil "") when /nodir/nofile | 327 (make-comint "test0" "/nodir/nofile" nil "") when /nodir/nofile |
302 does not exist. */ | 328 does not exist. */ |
303 #undef HAVE_WORKING_VFORK | 329 #undef HAVE_WORKING_VFORK |
304 #define vfork fork | 330 #define vfork fork |
331 | |
332 /* Don't close pty in process.c to make it as controlling terminal. | |
333 It is already a controlling terminal of subprocess, because we did | |
334 ioctl TIOCSCTTY. */ | |
305 #define DONT_REOPEN_PTY | 335 #define DONT_REOPEN_PTY |
306 | 336 |
307 #ifdef temacs | 337 #ifdef temacs |
308 #define malloc unexec_malloc | 338 #define malloc unexec_malloc |
309 #define realloc unexec_realloc | 339 #define realloc unexec_realloc |
310 #define free unexec_free | 340 #define free unexec_free |
311 #endif | 341 #endif |
342 | |
343 /* This makes create_process in process.c save and restore signal | |
344 handlers correctly. Suggested by Nozomu Ando.*/ | |
345 #define POSIX_SIGNALS | |
312 | 346 |
313 /* Reroute calls to SELECT to the version defined in mac.c to fix the | 347 /* Reroute calls to SELECT to the version defined in mac.c to fix the |
314 problem of Emacs requiring an extra return to be typed to start | 348 problem of Emacs requiring an extra return to be typed to start |
315 working when started from the command line. */ | 349 working when started from the command line. */ |
316 #if defined (HAVE_CARBON) && (defined (emacs) || defined (temacs)) | 350 #if defined (HAVE_CARBON) && (defined (emacs) || defined (temacs)) |
317 #define select sys_select | 351 #define select sys_select |
318 #endif | 352 #endif |
353 | |
354 /* Use the GC_MAKE_GCPROS_NOOPS (see lisp.h) method for marking the | |
355 stack. */ | |
356 #define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS | |
357 | |
358 /* arch-tag: 481d443d-4f89-43ea-b5fb-49706d95fa41 | |
359 (do not change this comment) */ |