aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Robert2008-08-04 14:39:27 +0000
committerAdrian Robert2008-08-04 14:39:27 +0000
commit14145fa3d03d61fec15d5939b5c4417c9d6472d9 (patch)
tree3720d80ab307127573cb2f685536a2e1c570198e
parentd7982012851b8772c623287a11aa497e15ac6c3d (diff)
downloademacs-14145fa3d03d61fec15d5939b5c4417c9d6472d9.tar.gz
emacs-14145fa3d03d61fec15d5939b5c4417c9d6472d9.zip
cleanup in s/darwin.h, define DARWIN_OS and use it instead of DARWIN and/or MAC_OSX; also, nsterm.m: small unrelated cleanups
-rw-r--r--admin/CPP-DEFINES5
-rw-r--r--admin/ChangeLog4
-rw-r--r--src/ChangeLog23
-rw-r--r--src/emacs.c3
-rw-r--r--src/keyboard.h2
-rw-r--r--src/m/intel386.h2
-rw-r--r--src/nsterm.m13
-rw-r--r--src/process.c2
-rw-r--r--src/s/darwin.h38
-rw-r--r--src/sysselect.h4
10 files changed, 56 insertions, 40 deletions
diff --git a/admin/CPP-DEFINES b/admin/CPP-DEFINES
index 564c48e3f42..39243d7ccef 100644
--- a/admin/CPP-DEFINES
+++ b/admin/CPP-DEFINES
@@ -14,12 +14,12 @@ DOS_NT Compiling for either the MS-DOS or native MS-Windows port.
14WINDOWSNT Compiling the native MS-Windows (W32) port. 14WINDOWSNT Compiling the native MS-Windows (W32) port.
15__MINGW32__ Compiling the W32 port with the MinGW port of GCC. 15__MINGW32__ Compiling the W32 port with the MinGW port of GCC.
16_MSC_VER Compiling the W32 port with the Microsoft C compiler. 16_MSC_VER Compiling the W32 port with the Microsoft C compiler.
17USE_LISP_UNION_TYPE Define it in lisp.h to make Lisp_Object be a union type instead of the default int. 17DARWIN_OS Compiling on Mac OS X or pure Darwin (and using s/darwin.h).
18 18
19** Distinguishing GUIs ** 19** Distinguishing GUIs **
20 20
21HAVE_NTGUI Use the native W32 GUI for windows, frames, menus&scrollbars. 21HAVE_NTGUI Use the native W32 GUI for windows, frames, menus&scrollbars.
22HAVE_NS Use the NeXT/OpenStep/Cocoa UI under Mac OS X or GNUstep. 22HAVE_NS Use the NeXT/OpenStep/Cocoa UI under Mac OS X or GNUstep.
23NS_IMPL_GNUSTEP Compile support for GNUSTEP implementation of NS GUI API. 23NS_IMPL_GNUSTEP Compile support for GNUSTEP implementation of NS GUI API.
24NS_IMPL_COCOA Compile support for Cocoa (Apple) implementation of NS GUI API. 24NS_IMPL_COCOA Compile support for Cocoa (Apple) implementation of NS GUI API.
25HAVE_X11 Compile support for the X11 GUI. 25HAVE_X11 Compile support for the X11 GUI.
@@ -48,6 +48,7 @@ PROCATTR A function that returns attributes of a process.
48REL_ALLOC Compile in the relocatable memory allocator ralloc.c. 48REL_ALLOC Compile in the relocatable memory allocator ralloc.c.
49SYSTEM_MALLOC Use the system library's malloc. 49SYSTEM_MALLOC Use the system library's malloc.
50subprocesses System can use subprocesses (for M-x shell for example). Defined by default, only MSDOS undefines it. 50subprocesses System can use subprocesses (for M-x shell for example). Defined by default, only MSDOS undefines it.
51USE_LISP_UNION_TYPE Define it in lisp.h to make Lisp_Object be a union type instead of the default int.
51 52
52** Replace, the definition is trivial: SWITCH_ENUM_CAST 53** Replace, the definition is trivial: SWITCH_ENUM_CAST
53 54
diff --git a/admin/ChangeLog b/admin/ChangeLog
index 3507b4ecf76..ce1a7f8bee0 100644
--- a/admin/ChangeLog
+++ b/admin/ChangeLog
@@ -1,3 +1,7 @@
12008-08-04 Adrian Robert <Adrian.B.Robert@gmail.com>
2
3 * CPP_DEFINES: Add DARWIN_OS. Move USE_LISP_UNION_TYPE away from OS's.
4
12008-08-02 Eli Zaretskii <eliz@gnu.org> 52008-08-02 Eli Zaretskii <eliz@gnu.org>
2 6
3 * CPP-DEFINES: Add defines for accessing system processes. 7 * CPP-DEFINES: Add defines for accessing system processes.
diff --git a/src/ChangeLog b/src/ChangeLog
index 5504b4423c7..b6ef8670e75 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,6 +1,27 @@
12008-08-04 Adrian Robert <Adrian.B.Robert@gmail.com>
2
3 * emacs.c (main: unexec_init_emacs_zone): Call if on DARWIN_OS.
4
5 * keyboard.h: Comment an #endif.
6
7 * nsterm.m (EmacsView -converstationIdentifier): Use NSInteger
8 version for GNUstep (handled by conditional typedef in nsterm.m).
9 (ns_get_color): Remove special-casing for "darkblue", "dark blue" (now
10 in rgb.txt).
11
12 * process.c (init_process): Use DARWIN_OS, not DARWIN.
13
14 * sysselect.h: Conditionalize init_process undef on DARWIN_OS.
15
16 * m/inter386.h: Change DARWIN to DARWIN_OS.
17
18 * s/darwin.h: Add #define DARWIN_OS. Get rid of C_SWITCH_SYSTEM def.
19 Change LIBS_MACGUI to LIBS_NSGUI. Move temacs-conditionalized defs
20 closer to C_SWITCH_SYSTEM_TEMACS so usage is understood.
21
12008-08-03 Chong Yidong <cyd@stupidchicken.com> 222008-08-03 Chong Yidong <cyd@stupidchicken.com>
2 23
3 * nsterm.m (windowDidResize): Remove stopModel call. 24 * nsterm.m (windowDidResize): Remove stopModal call.
4 25
52008-08-03 Andreas Schwab <schwab@suse.de> 262008-08-03 Andreas Schwab <schwab@suse.de>
6 27
diff --git a/src/emacs.c b/src/emacs.c
index ece0e41487d..1174f18f449 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -812,7 +812,8 @@ main (int argc, char **argv)
812 run_time_remap (argv[0]); 812 run_time_remap (argv[0]);
813#endif 813#endif
814 814
815#if defined (NS_IMPL_COCOA) 815/* If using unexmacosx.c (set by s/darwin.h), we must do this. */
816#ifdef DARWIN_OS
816 if (!initialized) 817 if (!initialized)
817 unexec_init_emacs_zone (); 818 unexec_init_emacs_zone ();
818#endif 819#endif
diff --git a/src/keyboard.h b/src/keyboard.h
index 165901bea5f..efc05461926 100644
--- a/src/keyboard.h
+++ b/src/keyboard.h
@@ -368,7 +368,7 @@ typedef struct _widget_value
368 368
369extern widget_value *xmalloc_widget_value P_ ((void)); 369extern widget_value *xmalloc_widget_value P_ ((void));
370extern widget_value *digest_single_submenu P_ ((int, int, int)); 370extern widget_value *digest_single_submenu P_ ((int, int, int));
371#endif 371#endif /* HAVE_NS || HAVE_NTGUI */
372 372
373 373
374/* Macros for dealing with lispy events. */ 374/* Macros for dealing with lispy events. */
diff --git a/src/m/intel386.h b/src/m/intel386.h
index a897184b35f..e09d84238e5 100644
--- a/src/m/intel386.h
+++ b/src/m/intel386.h
@@ -103,7 +103,7 @@ NOTE-END */
103#define SEGMENT_MASK ((SEGMENT_SIZE)-1) 103#define SEGMENT_MASK ((SEGMENT_SIZE)-1)
104#endif 104#endif
105 105
106#if defined (DARWIN) 106#if defined (DARWIN_OS)
107#ifdef _LP64 107#ifdef _LP64
108/* For Intel Mac, with CC='gcc -arch x86_64'. */ 108/* For Intel Mac, with CC='gcc -arch x86_64'. */
109#define NO_ARG_ARRAY 109#define NO_ARG_ARRAY
diff --git a/src/nsterm.m b/src/nsterm.m
index f8000b96b3d..fd3757be557 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -1458,17 +1458,13 @@ ns_get_color (const char *name, NSColor **col)
1458 NSEnumerator *lenum, *cenum; 1458 NSEnumerator *lenum, *cenum;
1459 NSString *name; 1459 NSString *name;
1460 NSColorList *clist; 1460 NSColorList *clist;
1461
1461#ifdef NS_IMPL_GNUSTEP 1462#ifdef NS_IMPL_GNUSTEP
1462 /* XXX: who is wrong, the requestor or the implementation? */ 1463 /* XXX: who is wrong, the requestor or the implementation? */
1463 if ([nsname compare: @"Highlight" options: NSCaseInsensitiveSearch] 1464 if ([nsname compare: @"Highlight" options: NSCaseInsensitiveSearch]
1464 == NSOrderedSame) 1465 == NSOrderedSame)
1465 nsname = @"highlightColor"; 1466 nsname = @"highlightColor";
1466#endif 1467#endif
1467 if ([nsname compare: @"dark blue" options: NSCaseInsensitiveSearch]
1468 == NSOrderedSame
1469 || [nsname compare: @"darkblue" options: NSCaseInsensitiveSearch]
1470 == NSOrderedSame)
1471 nsname = @"navy blue";
1472 1468
1473 lenum = [[NSColorList availableColorLists] objectEnumerator]; 1469 lenum = [[NSColorList availableColorLists] objectEnumerator];
1474 while ( (clist = [lenum nextObject]) && new == nil) 1470 while ( (clist = [lenum nextObject]) && new == nil)
@@ -4645,17 +4641,10 @@ if (NS_KEYLOG) NSLog (@"firstRectForCharRange request");
4645 return rect; 4641 return rect;
4646} 4642}
4647 4643
4648#ifdef NS_IMPL_GNUSTEP
4649- (long)conversationIdentifier
4650{
4651 return (long)self;
4652}
4653#else
4654- (NSInteger)conversationIdentifier 4644- (NSInteger)conversationIdentifier
4655{ 4645{
4656 return (NSInteger)self; 4646 return (NSInteger)self;
4657} 4647}
4658#endif
4659 4648
4660/* TODO: below here not yet implemented correctly, but may not be needed */ 4649/* TODO: below here not yet implemented correctly, but may not be needed */
4661 4650
diff --git a/src/process.c b/src/process.c
index cb7d2c237c0..b82fb9fc615 100644
--- a/src/process.c
+++ b/src/process.c
@@ -7611,7 +7611,7 @@ init_process ()
7611 } 7611 }
7612#endif /* HAVE_SOCKETS */ 7612#endif /* HAVE_SOCKETS */
7613 7613
7614#if defined (DARWIN) 7614#if defined (DARWIN_OS)
7615 /* PTYs are broken on Darwin < 6, but are sometimes useful for interactive 7615 /* PTYs are broken on Darwin < 6, but are sometimes useful for interactive
7616 processes. As such, we only change the default value. */ 7616 processes. As such, we only change the default value. */
7617 if (initialized) 7617 if (initialized)
diff --git a/src/s/darwin.h b/src/s/darwin.h
index 42406a4d559..e71eb15ff03 100644
--- a/src/s/darwin.h
+++ b/src/s/darwin.h
@@ -27,6 +27,14 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
27/* BSD4_3 and BSD4_4 are already defined in sys/param.h */ 27/* BSD4_3 and BSD4_4 are already defined in sys/param.h */
28#define BSD_SYSTEM 28#define BSD_SYSTEM
29 29
30/* More specific than the above two. We cannot use __APPLE__ as this
31 may not be defined on non-OSX Darwin, and we cannot define DARWIN
32 here because Panther and lower CoreFoundation.h uses DARWIN to
33 distinguish OS X from pure Darwin. */
34
35#define DARWIN_OS
36
37
30/* SYSTEM_TYPE should indicate the kind of system you are using. 38/* SYSTEM_TYPE should indicate the kind of system you are using.
31 It sets the Lisp variable system-type. */ 39 It sets the Lisp variable system-type. */
32 40
@@ -127,7 +135,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
127 135
128/* This seems to help in Ctrl-G detection under Cocoa, however at the cost 136/* This seems to help in Ctrl-G detection under Cocoa, however at the cost
129 of some quirks that may or may not bother a given user. */ 137 of some quirks that may or may not bother a given user. */
130#if defined (COCOA_EXPERIMENTAL_CTRL_G) 138#ifdef COCOA_EXPERIMENTAL_CTRL_G
131#define NO_SOCK_SIGIO 139#define NO_SOCK_SIGIO
132#endif 140#endif
133 141
@@ -142,35 +150,33 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
142 150
143/* Definitions for how to compile & link. */ 151/* Definitions for how to compile & link. */
144 152
145/* Link in the AppKit lib. */
146#ifdef HAVE_NS 153#ifdef HAVE_NS
147/* PENDING: can this target be specified in a clearer way? */
148#define OTHER_FILES ns-app 154#define OTHER_FILES ns-app
149/* XXX: lresolv is here because configure when testing #undefs res_init, 155/* XXX: lresolv is here because configure when testing #undefs res_init,
150 a macro in /usr/include/resolv.h for res_9_init, not in stdc lib. */ 156 a macro in /usr/include/resolv.h for res_9_init, not in stdc lib. */
151#define LIBS_MACGUI -framework AppKit -lresolv 157#define LIBS_NSGUI -framework AppKit -lresolv
152#define SYSTEM_PURESIZE_EXTRA 200000 158#define SYSTEM_PURESIZE_EXTRA 200000
153#define HEADERPAD_EXTRA 6C8 159#define HEADERPAD_EXTRA 6C8
160
154#else /* !HAVE_NS */ 161#else /* !HAVE_NS */
162#define LIBS_NSGUI
155#define HEADERPAD_EXTRA 690 163#define HEADERPAD_EXTRA 690
156
157/* FIXME: Is this needed?
158 This is for the Carbon port. Under the NeXTstep port, this is still picked
159 up during preprocessing, but is undone in config.in. */
160#define C_SWITCH_SYSTEM -fpascal-strings -DMAC_OSX
161
162#define LIBS_MACGUI
163
164#endif /* !HAVE_NS */ 164#endif /* !HAVE_NS */
165 165
166/* The -headerpad option tells ld (see man page) to leave room at the 166/* The -headerpad option tells ld (see man page) to leave room at the
167 end of the header for adding load commands. Needed for dumping. 167 end of the header for adding load commands. Needed for dumping.
168 0x690 is the total size of 30 segment load commands (at 56 168 0x690 is the total size of 30 segment load commands (at 56
169 each); under Cocoa 31 commands are required. */ 169 each); under Cocoa 31 commands are required. */
170#define LD_SWITCH_SYSTEM_TEMACS -prebind LIBS_MACGUI -Xlinker -headerpad -Xlinker HEADERPAD_EXTRA 170#define LD_SWITCH_SYSTEM_TEMACS -prebind LIBS_NSGUI -Xlinker -headerpad -Xlinker HEADERPAD_EXTRA
171 171
172#define C_SWITCH_SYSTEM_TEMACS -Dtemacs 172#define C_SWITCH_SYSTEM_TEMACS -Dtemacs
173 173
174#ifdef temacs
175#define malloc unexec_malloc
176#define realloc unexec_realloc
177#define free unexec_free
178#endif
179
174/* The ncurses library has been moved out of the System framework in 180/* The ncurses library has been moved out of the System framework in
175 Mac OS X 10.2. So if ./configure detects it, set the command-line 181 Mac OS X 10.2. So if ./configure detects it, set the command-line
176 option to use it. */ 182 option to use it. */
@@ -211,12 +217,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
211 ioctl TIOCSCTTY. */ 217 ioctl TIOCSCTTY. */
212#define DONT_REOPEN_PTY 218#define DONT_REOPEN_PTY
213 219
214#ifdef temacs
215#define malloc unexec_malloc
216#define realloc unexec_realloc
217#define free unexec_free
218#endif
219
220/* This makes create_process in process.c save and restore signal 220/* This makes create_process in process.c save and restore signal
221 handlers correctly. Suggested by Nozomu Ando.*/ 221 handlers correctly. Suggested by Nozomu Ando.*/
222#define POSIX_SIGNALS 222#define POSIX_SIGNALS
diff --git a/src/sysselect.h b/src/sysselect.h
index 7a8a185e49c..c6d483b6f37 100644
--- a/src/sysselect.h
+++ b/src/sysselect.h
@@ -18,11 +18,11 @@ You should have received a copy of the GNU General Public License
18along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ 18along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
19 19
20#ifdef HAVE_SYS_SELECT_H 20#ifdef HAVE_SYS_SELECT_H
21#if defined (DARWIN) || defined (NS_IMPL_COCOA) 21#if defined (DARWIN_OS)
22#undef init_process 22#undef init_process
23#endif 23#endif
24#include <sys/select.h> 24#include <sys/select.h>
25#if defined (DARWIN) || defined (NS_IMPL_COCOA) 25#if defined (DARWIN_OS)
26#define init_process emacs_init_process 26#define init_process emacs_init_process
27#endif 27#endif
28#endif 28#endif