aboutsummaryrefslogtreecommitdiffstats
path: root/nt
diff options
context:
space:
mode:
authorJuanma Barranquero2008-06-26 22:33:33 +0000
committerJuanma Barranquero2008-06-26 22:33:33 +0000
commit43db14bbd823795adfc6f37efcc74abccb77fdd7 (patch)
tree097aaca5c26f98406d1d80c13c9b48212edc5392 /nt
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.
Diffstat (limited to 'nt')
-rw-r--r--nt/ChangeLog12
-rw-r--r--nt/config.nt7
-rw-r--r--nt/gmake.defs16
-rw-r--r--nt/nmake.defs15
4 files changed, 27 insertions, 23 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