annotate src/s/darwin.h @ 109071:8c3d79992849

Fix some compilation errors in nsfns.c * nsfns.m: extern declare Vmenu_bar_mode, Vtool_bar_mode. (ns_get_screen): Don't assign integer to f. (Fx_display_color_cells): Declarations before statements.
author Jan D <jan.h.d@swipnet.se>
date Tue, 29 Jun 2010 11:49:20 +0200
parents d86e65007470
children 6799ec1a7188
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
44890
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
1 /* System description header file for Darwin (Mac OS X).
108379
203aa49071bf Move MAIL_USE_FLOCK, MAIL_USE_LOCKF, BLESSMAIL_TARGET from cpp to configure.
Glenn Morris <rgm@gnu.org>
parents: 108310
diff changeset
2
203aa49071bf Move MAIL_USE_FLOCK, MAIL_USE_LOCKF, BLESSMAIL_TARGET from cpp to configure.
Glenn Morris <rgm@gnu.org>
parents: 108310
diff changeset
3 Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
203aa49071bf Move MAIL_USE_FLOCK, MAIL_USE_LOCKF, BLESSMAIL_TARGET from cpp to configure.
Glenn Morris <rgm@gnu.org>
parents: 108310
diff changeset
4 2010 Free Software Foundation, Inc.
44890
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
5
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
6 This file is part of GNU Emacs.
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
7
94715
1f134b61867c Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 94615
diff changeset
8 GNU Emacs is free software: you can redistribute it and/or modify
44890
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
9 it under the terms of the GNU General Public License as published by
94715
1f134b61867c Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 94615
diff changeset
10 the Free Software Foundation, either version 3 of the License, or
1f134b61867c Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 94615
diff changeset
11 (at your option) any later version.
44890
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
12
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
13 GNU Emacs is distributed in the hope that it will be useful,
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
16 GNU General Public License for more details.
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
17
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
18 You should have received a copy of the GNU General Public License
94715
1f134b61867c Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 94615
diff changeset
19 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
44890
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
20
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
21
108511
f8e62c2bf3e9 Reformat some comments in src/s/*.h.
Glenn Morris <rgm@gnu.org>
parents: 108379
diff changeset
22 /* Define symbols to identify the version of Unix this is.
f8e62c2bf3e9 Reformat some comments in src/s/*.h.
Glenn Morris <rgm@gnu.org>
parents: 108379
diff changeset
23 Define all the symbols that apply correctly. */
44890
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
24 #define BSD4_2
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
25 /* BSD4_3 and BSD4_4 are already defined in sys/param.h */
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
26 #define BSD_SYSTEM
59689
007a1a6d92de * s/darwin.h: Removed PTY_ITERATION from here.
Steven Tamm <steventamm@mac.com>
parents: 59658
diff changeset
27
97266
80acedef7417 cleanup in s/darwin.h, define DARWIN_OS and use it instead of DARWIN and/or MAC_OSX; also, nsterm.m: small unrelated cleanups
Adrian Robert <Adrian.B.Robert@gmail.com>
parents: 97043
diff changeset
28 /* More specific than the above two. We cannot use __APPLE__ as this
80acedef7417 cleanup in s/darwin.h, define DARWIN_OS and use it instead of DARWIN and/or MAC_OSX; also, nsterm.m: small unrelated cleanups
Adrian Robert <Adrian.B.Robert@gmail.com>
parents: 97043
diff changeset
29 may not be defined on non-OSX Darwin, and we cannot define DARWIN
80acedef7417 cleanup in s/darwin.h, define DARWIN_OS and use it instead of DARWIN and/or MAC_OSX; also, nsterm.m: small unrelated cleanups
Adrian Robert <Adrian.B.Robert@gmail.com>
parents: 97043
diff changeset
30 here because Panther and lower CoreFoundation.h uses DARWIN to
108511
f8e62c2bf3e9 Reformat some comments in src/s/*.h.
Glenn Morris <rgm@gnu.org>
parents: 108379
diff changeset
31 distinguish OS X from pure Darwin. */
97266
80acedef7417 cleanup in s/darwin.h, define DARWIN_OS and use it instead of DARWIN and/or MAC_OSX; also, nsterm.m: small unrelated cleanups
Adrian Robert <Adrian.B.Robert@gmail.com>
parents: 97043
diff changeset
32 #define DARWIN_OS
80acedef7417 cleanup in s/darwin.h, define DARWIN_OS and use it instead of DARWIN and/or MAC_OSX; also, nsterm.m: small unrelated cleanups
Adrian Robert <Adrian.B.Robert@gmail.com>
parents: 97043
diff changeset
33
80acedef7417 cleanup in s/darwin.h, define DARWIN_OS and use it instead of DARWIN and/or MAC_OSX; also, nsterm.m: small unrelated cleanups
Adrian Robert <Adrian.B.Robert@gmail.com>
parents: 97043
diff changeset
34
44890
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
35 /* SYSTEM_TYPE should indicate the kind of system you are using.
108511
f8e62c2bf3e9 Reformat some comments in src/s/*.h.
Glenn Morris <rgm@gnu.org>
parents: 108379
diff changeset
36 It sets the Lisp variable system-type. */
44890
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
37 #define SYSTEM_TYPE "darwin"
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
38
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
39 /* Emacs can read input using SIGIO and buffering characters itself,
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
40 or using CBREAK mode and making C-g cause SIGINT.
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
41 The choice is controlled by the variable interrupt_input.
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
42
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
43 Define INTERRUPT_INPUT to make interrupt_input = 1 the default (use SIGIO)
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
44
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
45 Emacs uses the presence or absence of the SIGIO and BROKEN_SIGIO macros
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
46 to indicate whether or not signal-driven I/O is possible. It uses
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
47 INTERRUPT_INPUT to decide whether to use it by default.
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
48
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
49 SIGIO can be used only on systems that implement it (4.2 and 4.3).
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
50 CBREAK mode has two disadvantages
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
51 1) At least in 4.2, it is impossible to handle the Meta key properly.
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
52 I hear that in system V this problem does not exist.
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
53 2) Control-G causes output to be discarded.
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
54 I do not know whether this can be fixed in system V.
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
55
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
56 Another method of doing input is planned but not implemented.
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
57 It would have Emacs fork off a separate process
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
58 to read the input and send it to the true Emacs process
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
59 through a pipe. */
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
60 #define INTERRUPT_INPUT
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
61
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
62 /* Letter to use in finding device name of first pty,
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
63 if system supports pty's. 'a' means it is /dev/ptya0 */
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
64 #define FIRST_PTY_LETTER 'p'
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
65
108511
f8e62c2bf3e9 Reformat some comments in src/s/*.h.
Glenn Morris <rgm@gnu.org>
parents: 108379
diff changeset
66 /* Define HAVE_TERMIOS if the system provides POSIX-style
f8e62c2bf3e9 Reformat some comments in src/s/*.h.
Glenn Morris <rgm@gnu.org>
parents: 108379
diff changeset
67 functions and macros for terminal control.
f8e62c2bf3e9 Reformat some comments in src/s/*.h.
Glenn Morris <rgm@gnu.org>
parents: 108379
diff changeset
68
f8e62c2bf3e9 Reformat some comments in src/s/*.h.
Glenn Morris <rgm@gnu.org>
parents: 108379
diff changeset
69 Define HAVE_TERMIO if the system provides sysV-style ioctls
f8e62c2bf3e9 Reformat some comments in src/s/*.h.
Glenn Morris <rgm@gnu.org>
parents: 108379
diff changeset
70 for terminal control.
f8e62c2bf3e9 Reformat some comments in src/s/*.h.
Glenn Morris <rgm@gnu.org>
parents: 108379
diff changeset
71
f8e62c2bf3e9 Reformat some comments in src/s/*.h.
Glenn Morris <rgm@gnu.org>
parents: 108379
diff changeset
72 Do not define both. HAVE_TERMIOS is preferred, if it is supported
f8e62c2bf3e9 Reformat some comments in src/s/*.h.
Glenn Morris <rgm@gnu.org>
parents: 108379
diff changeset
73 on your system. */
44890
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
74 #define HAVE_TERMIOS
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
75 #define NO_TERMIO
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
76
108511
f8e62c2bf3e9 Reformat some comments in src/s/*.h.
Glenn Morris <rgm@gnu.org>
parents: 108379
diff changeset
77 /* Define HAVE_PTYS if the system supports pty devices.
f8e62c2bf3e9 Reformat some comments in src/s/*.h.
Glenn Morris <rgm@gnu.org>
parents: 108379
diff changeset
78 Note: PTYs are broken on darwin <6. Use at your own risk. */
44890
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
79 #define HAVE_PTYS
108511
f8e62c2bf3e9 Reformat some comments in src/s/*.h.
Glenn Morris <rgm@gnu.org>
parents: 108379
diff changeset
80 /* Run only once. We need a `for'-loop because the code uses `continue'. */
107932
9b8dfcd5e0b0 Use openpty for allocating pty on Darwin. Fix Bug#726 and Bug#5819.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 106815
diff changeset
81 #define PTY_ITERATION for (i = 0; i < 1; i++)
9b8dfcd5e0b0 Use openpty for allocating pty on Darwin. Fix Bug#726 and Bug#5819.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 106815
diff changeset
82 #define PTY_NAME_SPRINTF /* none */
9b8dfcd5e0b0 Use openpty for allocating pty on Darwin. Fix Bug#726 and Bug#5819.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 106815
diff changeset
83 #define PTY_TTY_NAME_SPRINTF /* none */
9b8dfcd5e0b0 Use openpty for allocating pty on Darwin. Fix Bug#726 and Bug#5819.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 106815
diff changeset
84 /* Note that openpty may fork via grantpt on Mac OS X 10.4/Darwin 8.
9b8dfcd5e0b0 Use openpty for allocating pty on Darwin. Fix Bug#726 and Bug#5819.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 106815
diff changeset
85 But we don't have to block SIGCHLD because it is blocked in the
9b8dfcd5e0b0 Use openpty for allocating pty on Darwin. Fix Bug#726 and Bug#5819.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 106815
diff changeset
86 implementation of grantpt. */
9b8dfcd5e0b0 Use openpty for allocating pty on Darwin. Fix Bug#726 and Bug#5819.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 106815
diff changeset
87 #define PTY_OPEN \
9b8dfcd5e0b0 Use openpty for allocating pty on Darwin. Fix Bug#726 and Bug#5819.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 106815
diff changeset
88 do \
9b8dfcd5e0b0 Use openpty for allocating pty on Darwin. Fix Bug#726 and Bug#5819.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 106815
diff changeset
89 { \
9b8dfcd5e0b0 Use openpty for allocating pty on Darwin. Fix Bug#726 and Bug#5819.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 106815
diff changeset
90 int slave; \
9b8dfcd5e0b0 Use openpty for allocating pty on Darwin. Fix Bug#726 and Bug#5819.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 106815
diff changeset
91 if (openpty (&fd, &slave, pty_name, NULL, NULL) == -1) \
9b8dfcd5e0b0 Use openpty for allocating pty on Darwin. Fix Bug#726 and Bug#5819.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 106815
diff changeset
92 fd = -1; \
9b8dfcd5e0b0 Use openpty for allocating pty on Darwin. Fix Bug#726 and Bug#5819.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 106815
diff changeset
93 else \
9b8dfcd5e0b0 Use openpty for allocating pty on Darwin. Fix Bug#726 and Bug#5819.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 106815
diff changeset
94 emacs_close (slave); \
9b8dfcd5e0b0 Use openpty for allocating pty on Darwin. Fix Bug#726 and Bug#5819.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 106815
diff changeset
95 } \
9b8dfcd5e0b0 Use openpty for allocating pty on Darwin. Fix Bug#726 and Bug#5819.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 106815
diff changeset
96 while (0)
44890
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
97
108511
f8e62c2bf3e9 Reformat some comments in src/s/*.h.
Glenn Morris <rgm@gnu.org>
parents: 108379
diff changeset
98 /* PTYs only work correctly on Darwin 7 or higher. So make the default
f8e62c2bf3e9 Reformat some comments in src/s/*.h.
Glenn Morris <rgm@gnu.org>
parents: 108379
diff changeset
99 for process-connection-type dependent on the kernel version. */
77078
29afb1b6d0f6 (__restrict, struct kboard): Remove outdated workarounds.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 75348
diff changeset
100 #define MIN_PTY_KERNEL_VERSION '7'
59658
45074d913d23 * editfns.c (Voperating_system_release): Added.
Steven Tamm <steventamm@mac.com>
parents: 58634
diff changeset
101
44890
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
102 /* Define CLASH_DETECTION if you want lock files to be written
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
103 so that Emacs can tell instantly when you try to modify
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
104 a file that someone else has modified in his Emacs. */
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
105 #define CLASH_DETECTION
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
106
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
107 /* Avoid the use of the name init_process (process.c) because it is
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
108 also the name of a Mach system call. */
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
109 #define init_process emacs_init_process
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
110
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
111 /* Used in dispnew.c. Copied from freebsd.h. */
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
112 #define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base)
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
113
108511
f8e62c2bf3e9 Reformat some comments in src/s/*.h.
Glenn Morris <rgm@gnu.org>
parents: 108379
diff changeset
114 /* System uses OXTABS instead of the expected TAB3. (Copied from bsd386.h.) */
44890
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
115 #define TAB3 OXTABS
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
116
108511
f8e62c2bf3e9 Reformat some comments in src/s/*.h.
Glenn Morris <rgm@gnu.org>
parents: 108379
diff changeset
117 /* Darwin ld insists on the use of malloc routines in the System framework. */
44890
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
118 #define SYSTEM_MALLOC
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
119
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
120 /* Define HAVE_SOCKETS if system supports 4.2-compatible sockets. */
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
121 #define HAVE_SOCKETS
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
122
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
123 /* start_of_text isn't actually used, so make it compile without error. */
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
124 #define TEXT_START (0)
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
125
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
126 /* Definitions for how to compile & link. */
96675
d45acf0c8d23 merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents: 96583
diff changeset
127 #ifdef HAVE_NS
d45acf0c8d23 merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents: 96583
diff changeset
128 #define SYSTEM_PURESIZE_EXTRA 200000
108228
385494b60342 Move LD_SWITCH_SYSTEM_TEMACS from cpp to autoconf.
Glenn Morris <rgm@gnu.org>
parents: 108119
diff changeset
129 #endif
56892
02d9436a8b32 (LIBS_CARBON): New define to specify libraries for
Steven Tamm <steventamm@mac.com>
parents: 54150
diff changeset
130
97451
8662a1d13e79 Undefine HAVE_RES_INIT, which appears to be harmful on OS X.
Chong Yidong <cyd@stupidchicken.com>
parents: 97354
diff changeset
131 /* On Darwin, res_init appears not to be useful: see bug#562 and
8662a1d13e79 Undefine HAVE_RES_INIT, which appears to be harmful on OS X.
Chong Yidong <cyd@stupidchicken.com>
parents: 97354
diff changeset
132 http://lists.gnu.org/archive/html/emacs-devel/2007-11/msg01467.html */
8662a1d13e79 Undefine HAVE_RES_INIT, which appears to be harmful on OS X.
Chong Yidong <cyd@stupidchicken.com>
parents: 97354
diff changeset
133 #undef HAVE_RES_INIT
8662a1d13e79 Undefine HAVE_RES_INIT, which appears to be harmful on OS X.
Chong Yidong <cyd@stupidchicken.com>
parents: 97354
diff changeset
134 #undef HAVE_LIBRESOLV
8662a1d13e79 Undefine HAVE_RES_INIT, which appears to be harmful on OS X.
Chong Yidong <cyd@stupidchicken.com>
parents: 97354
diff changeset
135
107831
92451fdcc718 Remove C_SWITCH_SYSTEM_TEMACS.
Dan Nicolaescu <dann@ics.uci.edu>
parents: 107575
diff changeset
136 #ifdef emacs
97266
80acedef7417 cleanup in s/darwin.h, define DARWIN_OS and use it instead of DARWIN and/or MAC_OSX; also, nsterm.m: small unrelated cleanups
Adrian Robert <Adrian.B.Robert@gmail.com>
parents: 97043
diff changeset
137 #define malloc unexec_malloc
80acedef7417 cleanup in s/darwin.h, define DARWIN_OS and use it instead of DARWIN and/or MAC_OSX; also, nsterm.m: small unrelated cleanups
Adrian Robert <Adrian.B.Robert@gmail.com>
parents: 97043
diff changeset
138 #define realloc unexec_realloc
80acedef7417 cleanup in s/darwin.h, define DARWIN_OS and use it instead of DARWIN and/or MAC_OSX; also, nsterm.m: small unrelated cleanups
Adrian Robert <Adrian.B.Robert@gmail.com>
parents: 97043
diff changeset
139 #define free unexec_free
108511
f8e62c2bf3e9 Reformat some comments in src/s/*.h.
Glenn Morris <rgm@gnu.org>
parents: 108379
diff changeset
140 /* Don't use posix_memalign because it is not compatible with unexmacosx.c. */
104687
ae73d4e03997 [temacs] Undef HAVE_POSIX_MEMALIGN.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 101797
diff changeset
141 #undef HAVE_POSIX_MEMALIGN
97266
80acedef7417 cleanup in s/darwin.h, define DARWIN_OS and use it instead of DARWIN and/or MAC_OSX; also, nsterm.m: small unrelated cleanups
Adrian Robert <Adrian.B.Robert@gmail.com>
parents: 97043
diff changeset
142 #endif
80acedef7417 cleanup in s/darwin.h, define DARWIN_OS and use it instead of DARWIN and/or MAC_OSX; also, nsterm.m: small unrelated cleanups
Adrian Robert <Adrian.B.Robert@gmail.com>
parents: 97043
diff changeset
143
44890
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
144 /* Define the following so emacs symbols will not conflict with those
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
145 in the System framework. Otherwise -prebind will not work. */
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
146
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
147 /* Do not define abort in emacs.c. */
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
148 #define NO_ABORT
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
149
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
150 /* Do not define matherr in floatfns.c. */
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
151 #define NO_MATHERR
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
152
47031
56242900e171 2002-08-25 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents: 46856
diff changeset
153 /* The following solves the problem that Emacs hangs when evaluating
56242900e171 2002-08-25 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents: 46856
diff changeset
154 (make-comint "test0" "/nodir/nofile" nil "") when /nodir/nofile
80611
ab61e807a6da Mention setsid after vfork.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80549
diff changeset
155 does not exist. Also, setsid is not allowed in the vfork child's
ab61e807a6da Mention setsid after vfork.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80549
diff changeset
156 context as of Darwin 9/Mac OS X 10.5. */
47031
56242900e171 2002-08-25 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents: 46856
diff changeset
157 #undef HAVE_WORKING_VFORK
56242900e171 2002-08-25 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents: 46856
diff changeset
158 #define vfork fork
66765
9651981950f5 (C_SWITCH_SYSTEM): Remove -fno-common.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 64769
diff changeset
159
9651981950f5 (C_SWITCH_SYSTEM): Remove -fno-common.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 64769
diff changeset
160 /* Don't close pty in process.c to make it as controlling terminal.
9651981950f5 (C_SWITCH_SYSTEM): Remove -fno-common.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 64769
diff changeset
161 It is already a controlling terminal of subprocess, because we did
9651981950f5 (C_SWITCH_SYSTEM): Remove -fno-common.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 64769
diff changeset
162 ioctl TIOCSCTTY. */
47033
f6d6e1b3e7b7 2002-08-25 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents: 47032
diff changeset
163 #define DONT_REOPEN_PTY
46125
474a28fb856c 2002-07-01 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents: 45848
diff changeset
164
108511
f8e62c2bf3e9 Reformat some comments in src/s/*.h.
Glenn Morris <rgm@gnu.org>
parents: 108379
diff changeset
165 /* Use the GC_MAKE_GCPROS_NOOPS (see lisp.h) method for marking the stack. */
52826
99773e17bcaf s/darwin.h (GC_MARK_STACK): Define.
Andrew Choi <akochoi@shaw.ca>
parents: 52401
diff changeset
166 #define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS
99773e17bcaf s/darwin.h (GC_MARK_STACK): Define.
Andrew Choi <akochoi@shaw.ca>
parents: 52401
diff changeset
167
52401
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 49600
diff changeset
168 /* arch-tag: 481d443d-4f89-43ea-b5fb-49706d95fa41
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 49600
diff changeset
169 (do not change this comment) */