aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuanma Barranquero2008-06-26 22:33:33 +0000
committerJuanma Barranquero2008-06-26 22:33:33 +0000
commit43db14bbd823795adfc6f37efcc74abccb77fdd7 (patch)
tree097aaca5c26f98406d1d80c13c9b48212edc5392
parent6e73a6a2c1fd9b97a4ed23747897349bd7ffc2f0 (diff)
downloademacs-43db14bbd823795adfc6f37efcc74abccb77fdd7.tar.gz
emacs-43db14bbd823795adfc6f37efcc74abccb77fdd7.zip
Remove unneeded -Defines in the compiler command line (MinGW and MSVC).
* nt/nmake.defs: * nt/gmake.defs (FONT_CFLAGS): Remove. (EMACS_EXTRA_C_FLAGS): Don't include FONT_CFLAGS. (CFLAGS): Don't include WIN32_LEAN_AND_MEAN, _WIN32_WINNT, -D$(ARCH) and _CRTAPI1. (ARCH_FLAGS): Don't include _X86_. * nt/config.nt (_WIN32_WINNT, WIN32_LEAN_AND_MEAN): Define. * src/makefile.w32-in (LOCAL_FLAGS): Don't include WINDOWSNT, DOS_NT and _UCHAR_T. * src/sysdep.c (_spawnlp, _getpid): Declare with explicit _cdecl instead of _CRTAPI1. * src/editfns.c (Fget_internal_run_time): Check for WINDOWSNT with #ifdef, not #if.
-rw-r--r--nt/ChangeLog12
-rw-r--r--nt/config.nt7
-rw-r--r--nt/gmake.defs16
-rw-r--r--nt/nmake.defs15
-rw-r--r--src/ChangeLog38
-rw-r--r--src/editfns.c2
-rw-r--r--src/makefile.w32-in2
-rw-r--r--src/sysdep.c4
8 files changed, 56 insertions, 40 deletions
diff --git a/nt/ChangeLog b/nt/ChangeLog
index 6c06e571ade..e574b0e2778 100644
--- a/nt/ChangeLog
+++ b/nt/ChangeLog
@@ -1,3 +1,15 @@
12008-06-26 Juanma Barranquero <lekktu@gmail.com>
2 Eli Zaretskii <eliz@gnu.org>
3
4 * nmake.defs:
5 * gmake.defs (FONT_CFLAGS): Remove.
6 (EMACS_EXTRA_C_FLAGS): Don't include FONT_CFLAGS.
7 (CFLAGS): Don't include WIN32_LEAN_AND_MEAN, _WIN32_WINNT, -D$(ARCH)
8 and _CRTAPI1.
9 (ARCH_FLAGS): Don't include _X86_.
10
11 * config.nt (_WIN32_WINNT, WIN32_LEAN_AND_MEAN): Define.
12
12008-06-26 Dan Nicolaescu <dann@ics.uci.edu> 132008-06-26 Dan Nicolaescu <dann@ics.uci.edu>
2 14
3 * config.nt: Remove reference to UNEXEC_SRC. 15 * config.nt: Remove reference to UNEXEC_SRC.
diff --git a/nt/config.nt b/nt/config.nt
index 8deebdf6aec..a7b9334a0a0 100644
--- a/nt/config.nt
+++ b/nt/config.nt
@@ -477,5 +477,12 @@ void w32_abort (void) NO_RETURN;
477#endif 477#endif
478#endif 478#endif
479 479
480/* Prevent accidental use of features unavailable in
481 older Windows versions we still support. */
482#define _WIN32_WINNT 0x0400
483
484/* Make a leaner executable. */
485#define WIN32_LEAN_AND_MEAN 1
486
480/* arch-tag: df720992-aa5a-499a-882d-958dc5eeb5e9 487/* arch-tag: df720992-aa5a-499a-882d-958dc5eeb5e9
481 (do not change this comment) */ 488 (do not change this comment) */
diff --git a/nt/gmake.defs b/nt/gmake.defs
index 7afbf099622..24c08595547 100644
--- a/nt/gmake.defs
+++ b/nt/gmake.defs
@@ -192,21 +192,13 @@ WINSPOOL = -lwinspool
192OLE32 = -lole32 192OLE32 = -lole32
193UNISCRIBE = -lusp10 193UNISCRIBE = -lusp10
194 194
195ifdef USE_FONTBACKEND
196FONT_CFLAGS = -DUSE_FONT_BACKEND=1
197else
198FONT_CFLAGS =
199endif
200
201ifdef NOOPT 195ifdef NOOPT
202DEBUG_CFLAGS = -DEMACSDEBUG 196DEBUG_CFLAGS = -DEMACSDEBUG
203else 197else
204DEBUG_CFLAGS = 198DEBUG_CFLAGS =
205endif 199endif
206CFLAGS = -I. -DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=0x0400 \ 200CFLAGS = -I. $(ARCH_CFLAGS) $(DEBUG_CFLAGS) $(USER_CFLAGS) $(LOCAL_FLAGS)
207 $(ARCH_CFLAGS) -D$(ARCH) -D_CRTAPI1=_cdecl \ 201EMACS_EXTRA_C_FLAGS = -DUSE_CRT_DLL=1
208 $(DEBUG_CFLAGS) $(USER_CFLAGS) $(LOCAL_FLAGS)
209EMACS_EXTRA_C_FLAGS = -DUSE_CRT_DLL=1 $(FONT_CFLAGS)
210 202
211# see comments in allocate_heap in w32heap.c before changing any of the 203# see comments in allocate_heap in w32heap.c before changing any of the
212# -stack, -heap, or -image-base settings. 204# -stack, -heap, or -image-base settings.
@@ -272,9 +264,9 @@ endif
272 264
273ifeq "$(ARCH)" "i386" 265ifeq "$(ARCH)" "i386"
274ifdef NOOPT 266ifdef NOOPT
275ARCH_CFLAGS = -D_X86_=1 -c $(DEBUG_FLAG) $(NOCYGWIN) 267ARCH_CFLAGS = -c $(DEBUG_FLAG) $(NOCYGWIN)
276else 268else
277ARCH_CFLAGS = -D_X86_=1 -c $(DEBUG_FLAG) $(NOCYGWIN) $(MCPU_FLAG) -O2 \ 269ARCH_CFLAGS = -c $(DEBUG_FLAG) $(NOCYGWIN) $(MCPU_FLAG) -O2 \
278 # -fbuiltin \ 270 # -fbuiltin \
279 # -finline-functions \ 271 # -finline-functions \
280 # -fomit-frame-pointer 272 # -fomit-frame-pointer
diff --git a/nt/nmake.defs b/nt/nmake.defs
index 7c6a518ee35..130344585eb 100644
--- a/nt/nmake.defs
+++ b/nt/nmake.defs
@@ -130,21 +130,14 @@ WINSPOOL = winspool.lib
130OLE32 = ole32.lib 130OLE32 = ole32.lib
131UNISCRIBE = usp10.lib 131UNISCRIBE = usp10.lib
132 132
133!ifdef USE_FONTBACKEND
134FONT_CFLAGS = -DUSE_FONT_BACKEND=1
135!else
136FONT_CFLAGS =
137!endif
138
139!ifdef NOOPT 133!ifdef NOOPT
140DEBUG_CFLAGS = -DEMACSDEBUG 134DEBUG_CFLAGS = -DEMACSDEBUG
141!else 135!else
142DEBUG_CFLAGS = 136DEBUG_CFLAGS =
143!endif 137!endif
144CFLAGS = -I. -DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=0x0400 \ 138CFLAGS = -I. $(ARCH_CFLAGS) \
145 $(ARCH_CFLAGS) -D$(ARCH) -D_CRTAPI1=_cdecl \
146 $(DEBUG_CFLAGS) $(USER_CFLAGS) $(LOCAL_FLAGS) 139 $(DEBUG_CFLAGS) $(USER_CFLAGS) $(LOCAL_FLAGS)
147EMACS_EXTRA_C_FLAGS = $(FONT_CFLAGS) 140EMACS_EXTRA_C_FLAGS =
148 141
149SYS_LDFLAGS = -nologo -release -incremental:no -version:3.10 -swaprun:cd -swaprun:net setargv.obj 142SYS_LDFLAGS = -nologo -release -incremental:no -version:3.10 -swaprun:cd -swaprun:net setargv.obj
150 143
@@ -189,9 +182,9 @@ DEBUG_LINK = -debug:full
189 182
190!if "$(ARCH)" == "i386" 183!if "$(ARCH)" == "i386"
191!ifdef NOOPT 184!ifdef NOOPT
192ARCH_CFLAGS = -nologo -D_X86_=1 -c -Zel -W2 -H63 -Od -G3d -Zp8 $(DEBUG_FLAG) 185ARCH_CFLAGS = -nologo -c -Zel -W2 -H63 -Od -G3d -Zp8 $(DEBUG_FLAG)
193!else 186!else
194ARCH_CFLAGS = -nologo -D_X86_=1 -c -Zel -W2 -H63 -Oxsb2 -Oy- -G6dF -Zp8 $(DEBUG_FLAG) 187ARCH_CFLAGS = -nologo -c -Zel -W2 -H63 -Oxsb2 -Oy- -G6dF -Zp8 $(DEBUG_FLAG)
195!endif 188!endif
196ARCH_LDFLAGS = $(SYS_LDFLAGS) 189ARCH_LDFLAGS = $(SYS_LDFLAGS)
197 190
diff --git a/src/ChangeLog b/src/ChangeLog
index 83b6881b424..867b0fb1cbc 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,19 +1,31 @@
12008-06-26 Juanma Barranquero <lekktu@gmail.com>
2 Eli Zaretskii <eliz@gnu.org>
3
4 * makefile.w32-in (LOCAL_FLAGS):
5 Don't include WINDOWSNT, DOS_NT and _UCHAR_T.
6
7 * sysdep.c (_spawnlp, _getpid):
8 Declare with explicit _cdecl instead of _CRTAPI1.
9
10 * editfns.c (Fget_internal_run_time):
11 Check for WINDOWSNT with #ifdef, not #if.
12
12008-06-26 Jason Rumney <jasonr@gnu.org> 132008-06-26 Jason Rumney <jasonr@gnu.org>
2 14
3 * w32font.h (FONT_HANDLE, FONT_TEXTMETRIC): New macros. 15 * w32font.h (FONT_HANDLE, FONT_TEXTMETRIC): New macros.
4 16
5 * w32term.c (x_draw_glyph_string_foreground): 17 * w32term.c (x_draw_glyph_string_foreground):
6 (x_draw_composite_glyph_string_foreground): Sync with xterm.c. 18 (x_draw_composite_glyph_string_foreground): Sync with xterm.c.
7 Use FONT_HANDLE macro. 19 Use FONT_HANDLE macro.
8 (x_draw_glyph_string): Use FONT_TEXTMETRIC macro. 20 (x_draw_glyph_string): Use FONT_TEXTMETRIC macro.
9 21
10 * w32uniscribe.c (uniscribe_otf_capability, uniscribe_shape): 22 * w32uniscribe.c (uniscribe_otf_capability, uniscribe_shape):
11 (uniscribe_encode_char): Use FONT_HANDLE macro. 23 (uniscribe_encode_char): Use FONT_HANDLE macro.
12 24
13 * w32font.c (Fx_select_font): Use FONT_HANDLE macro. 25 * w32font.c (Fx_select_font): Use FONT_HANDLE macro.
14 (w32font_text_extents): Use precast w32_font. 26 (w32font_text_extents): Use precast w32_font.
15 (w32font_close): Free cached metrics. 27 (w32font_close): Free cached metrics.
16 (w32font_open_internal): Allocate space for name on stack. 28 (w32font_open_internal): Allocate space for name on stack.
17 29
182008-06-26 Chong Yidong <cyd@stupidchicken.com> 302008-06-26 Chong Yidong <cyd@stupidchicken.com>
19 31
@@ -21,8 +33,8 @@
21 33
222008-06-26 Jason Rumney <jasonr@gnu.org> 342008-06-26 Jason Rumney <jasonr@gnu.org>
23 35
24 * w32term.h (FONT_AVG_WIDTH): Remove obsolete macro. 36 * w32term.h (FONT_AVG_WIDTH): Remove obsolete macro.
25 (CP_8BIT, CP_UNICODE, CP_UNKNOWN): Remove obsolete constants. 37 (CP_8BIT, CP_UNICODE, CP_UNKNOWN): Remove obsolete constants.
26 38
272008-06-26 Juanma Barranquero <lekktu@gmail.com> 392008-06-26 Juanma Barranquero <lekktu@gmail.com>
28 40
diff --git a/src/editfns.c b/src/editfns.c
index 192277e4295..0487ecf4707 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -1485,7 +1485,7 @@ on systems that do not provide resolution finer than a second. */)
1485 make_number ((secs >> 0) & 0xffff), 1485 make_number ((secs >> 0) & 0xffff),
1486 make_number (usecs)); 1486 make_number (usecs));
1487#else /* ! HAVE_GETRUSAGE */ 1487#else /* ! HAVE_GETRUSAGE */
1488#if WINDOWSNT 1488#ifdef WINDOWSNT
1489 return w32_get_internal_run_time (); 1489 return w32_get_internal_run_time ();
1490#else /* ! WINDOWSNT */ 1490#else /* ! WINDOWSNT */
1491 return Fcurrent_time (); 1491 return Fcurrent_time ();
diff --git a/src/makefile.w32-in b/src/makefile.w32-in
index 116aea2d56d..872c3320746 100644
--- a/src/makefile.w32-in
+++ b/src/makefile.w32-in
@@ -29,7 +29,7 @@ EMACSLOADPATH=$(CURDIR)/../lisp
29# HAVE_CONFIG_H is required by some generic gnu sources stuck into 29# HAVE_CONFIG_H is required by some generic gnu sources stuck into
30# the emacs source tree. 30# the emacs source tree.
31# 31#
32LOCAL_FLAGS = -Demacs=1 -DWINDOWSNT -DDOS_NT -DHAVE_CONFIG_H -I../nt/inc -D_UCHAR_T -DHAVE_NTGUI=1 $(EMACS_EXTRA_C_FLAGS) 32LOCAL_FLAGS = -Demacs=1 -DHAVE_CONFIG_H -I../nt/inc -DHAVE_NTGUI=1 $(EMACS_EXTRA_C_FLAGS)
33 33
34EMACS = $(BLD)/emacs.exe 34EMACS = $(BLD)/emacs.exe
35TEMACS = $(BLD)/temacs.exe 35TEMACS = $(BLD)/temacs.exe
diff --git a/src/sysdep.c b/src/sysdep.c
index 0023ea06bde..61a91e01878 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -175,8 +175,8 @@ extern Lisp_Object QCflowcontrol, Qhw, Qsw, QCsummary;
175#include <direct.h> 175#include <direct.h>
176/* In process.h which conflicts with the local copy. */ 176/* In process.h which conflicts with the local copy. */
177#define _P_WAIT 0 177#define _P_WAIT 0
178int _CRTAPI1 _spawnlp (int, const char *, const char *, ...); 178int _cdecl _spawnlp (int, const char *, const char *, ...);
179int _CRTAPI1 _getpid (void); 179int _cdecl _getpid (void);
180extern char *getwd (char *); 180extern char *getwd (char *);
181#endif 181#endif
182 182