]> git.eshelyaron.com Git - emacs.git/commitdiff
Remove unneeded -Defines in the compiler command line (MinGW and MSVC).
authorJuanma Barranquero <lekktu@gmail.com>
Thu, 26 Jun 2008 22:33:33 +0000 (22:33 +0000)
committerJuanma Barranquero <lekktu@gmail.com>
Thu, 26 Jun 2008 22:33:33 +0000 (22:33 +0000)
* 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.

nt/ChangeLog
nt/config.nt
nt/gmake.defs
nt/nmake.defs
src/ChangeLog
src/editfns.c
src/makefile.w32-in
src/sysdep.c

index 6c06e571adef846c64a171e508483dbb5fedfce8..e574b0e2778276a87146fb4bf22cadcafcdacb44 100644 (file)
@@ -1,3 +1,15 @@
+2008-06-26  Juanma Barranquero  <lekktu@gmail.com>
+           Eli Zaretskii  <eliz@gnu.org>
+
+       * nmake.defs:
+       * 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_.
+
+       * config.nt (_WIN32_WINNT, WIN32_LEAN_AND_MEAN): Define.
+
 2008-06-26  Dan Nicolaescu  <dann@ics.uci.edu>
 
        * config.nt: Remove reference to UNEXEC_SRC.
index 8deebdf6aecc9b1046fd512d27d529b5a66405fa..a7b9334a0a0917f38f6aafb444a2d4a1ae9590f3 100644 (file)
@@ -477,5 +477,12 @@ void w32_abort (void) NO_RETURN;
 #endif
 #endif
 
+/* Prevent accidental use of features unavailable in
+   older Windows versions we still support.  */
+#define _WIN32_WINNT 0x0400
+
+/* Make a leaner executable.  */
+#define WIN32_LEAN_AND_MEAN 1
+
 /* arch-tag: df720992-aa5a-499a-882d-958dc5eeb5e9
    (do not change this comment) */
index 7afbf09962274ced246d8aec352438189f1314d5..24c08595547d064503179b0ac97db3e59b3348d7 100644 (file)
@@ -192,21 +192,13 @@ WINSPOOL  = -lwinspool
 OLE32          = -lole32
 UNISCRIBE      = -lusp10
 
-ifdef USE_FONTBACKEND
-FONT_CFLAGS    = -DUSE_FONT_BACKEND=1
-else
-FONT_CFLAGS    =
-endif
-
 ifdef NOOPT
 DEBUG_CFLAGS   = -DEMACSDEBUG
 else
 DEBUG_CFLAGS   =
 endif
-CFLAGS          = -I. -DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=0x0400 \
-                 $(ARCH_CFLAGS) -D$(ARCH) -D_CRTAPI1=_cdecl \
-                 $(DEBUG_CFLAGS) $(USER_CFLAGS) $(LOCAL_FLAGS)
-EMACS_EXTRA_C_FLAGS = -DUSE_CRT_DLL=1 $(FONT_CFLAGS)
+CFLAGS          = -I. $(ARCH_CFLAGS) $(DEBUG_CFLAGS) $(USER_CFLAGS) $(LOCAL_FLAGS)
+EMACS_EXTRA_C_FLAGS = -DUSE_CRT_DLL=1
 
 # see comments in allocate_heap in w32heap.c before changing any of the
 # -stack, -heap, or -image-base settings.
@@ -272,9 +264,9 @@ endif
 
 ifeq "$(ARCH)" "i386"
 ifdef NOOPT
-ARCH_CFLAGS     = -D_X86_=1 -c $(DEBUG_FLAG) $(NOCYGWIN)
+ARCH_CFLAGS     = -c $(DEBUG_FLAG) $(NOCYGWIN)
 else
-ARCH_CFLAGS     = -D_X86_=1 -c $(DEBUG_FLAG) $(NOCYGWIN) $(MCPU_FLAG) -O2 \
+ARCH_CFLAGS     = -c $(DEBUG_FLAG) $(NOCYGWIN) $(MCPU_FLAG) -O2 \
                  # -fbuiltin \
                  # -finline-functions \
                  # -fomit-frame-pointer
index 7c6a518ee3593484fa5aef92c2a72a244983a9a3..130344585eb24a8e47ce6846c63876c736c6e79a 100644 (file)
@@ -130,21 +130,14 @@ WINSPOOL  = winspool.lib
 OLE32          = ole32.lib\r
 UNISCRIBE      = usp10.lib\r
 \r
-!ifdef USE_FONTBACKEND\r
-FONT_CFLAGS    = -DUSE_FONT_BACKEND=1\r
-!else\r
-FONT_CFLAGS    =\r
-!endif\r
-\r
 !ifdef NOOPT\r
 DEBUG_CFLAGS   = -DEMACSDEBUG\r
 !else\r
 DEBUG_CFLAGS   =\r
 !endif\r
-CFLAGS          = -I. -DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=0x0400 \\r
-                 $(ARCH_CFLAGS) -D$(ARCH) -D_CRTAPI1=_cdecl \\r
+CFLAGS          = -I. $(ARCH_CFLAGS) \\r
                  $(DEBUG_CFLAGS) $(USER_CFLAGS) $(LOCAL_FLAGS)\r
-EMACS_EXTRA_C_FLAGS = $(FONT_CFLAGS)\r
+EMACS_EXTRA_C_FLAGS =\r
 \r
 SYS_LDFLAGS    = -nologo -release -incremental:no -version:3.10 -swaprun:cd -swaprun:net setargv.obj\r
 \r
@@ -189,9 +182,9 @@ DEBUG_LINK = -debug:full
 \r
 !if "$(ARCH)" == "i386"\r
 !ifdef NOOPT\r
-ARCH_CFLAGS     = -nologo -D_X86_=1 -c -Zel -W2 -H63 -Od -G3d -Zp8 $(DEBUG_FLAG)\r
+ARCH_CFLAGS     = -nologo -c -Zel -W2 -H63 -Od -G3d -Zp8 $(DEBUG_FLAG)\r
 !else\r
-ARCH_CFLAGS     = -nologo -D_X86_=1 -c -Zel -W2 -H63 -Oxsb2 -Oy- -G6dF -Zp8 $(DEBUG_FLAG)\r
+ARCH_CFLAGS     = -nologo -c -Zel -W2 -H63 -Oxsb2 -Oy- -G6dF -Zp8 $(DEBUG_FLAG)\r
 !endif\r
 ARCH_LDFLAGS   = $(SYS_LDFLAGS)\r
 \r
index 83b6881b424c55db8be5bcd497c45b6700588ee2..867b0fb1cbcadd14720a77f2159ea3009b83d569 100644 (file)
@@ -1,19 +1,31 @@
+2008-06-26  Juanma Barranquero  <lekktu@gmail.com>
+           Eli Zaretskii  <eliz@gnu.org>
+
+       * makefile.w32-in (LOCAL_FLAGS):
+       Don't include WINDOWSNT, DOS_NT and _UCHAR_T.
+
+       * sysdep.c (_spawnlp, _getpid):
+       Declare with explicit _cdecl instead of _CRTAPI1.
+
+       * editfns.c (Fget_internal_run_time):
+       Check for WINDOWSNT with #ifdef, not #if.
+
 2008-06-26  Jason Rumney  <jasonr@gnu.org>
 
-        * w32font.h (FONT_HANDLE, FONT_TEXTMETRIC): New macros.
+       * w32font.h (FONT_HANDLE, FONT_TEXTMETRIC): New macros.
 
-        * w32term.c (x_draw_glyph_string_foreground):
-        (x_draw_composite_glyph_string_foreground): Sync with xterm.c.
-        Use FONT_HANDLE macro.
-        (x_draw_glyph_string): Use FONT_TEXTMETRIC macro.
+       * w32term.c (x_draw_glyph_string_foreground):
+       (x_draw_composite_glyph_string_foreground): Sync with xterm.c.
+       Use FONT_HANDLE macro.
+       (x_draw_glyph_string): Use FONT_TEXTMETRIC macro.
 
-        * w32uniscribe.c (uniscribe_otf_capability, uniscribe_shape):
-        (uniscribe_encode_char): Use FONT_HANDLE macro.
+       * w32uniscribe.c (uniscribe_otf_capability, uniscribe_shape):
+       (uniscribe_encode_char): Use FONT_HANDLE macro.
 
-        * w32font.c (Fx_select_font): Use FONT_HANDLE macro.
-        (w32font_text_extents): Use precast w32_font.
-        (w32font_close): Free cached metrics.
-        (w32font_open_internal): Allocate space for name on stack.
+       * w32font.c (Fx_select_font): Use FONT_HANDLE macro.
+       (w32font_text_extents): Use precast w32_font.
+       (w32font_close): Free cached metrics.
+       (w32font_open_internal): Allocate space for name on stack.
 
 2008-06-26  Chong Yidong  <cyd@stupidchicken.com>
 
@@ -21,8 +33,8 @@
 
 2008-06-26  Jason Rumney  <jasonr@gnu.org>
 
-        * w32term.h (FONT_AVG_WIDTH): Remove obsolete macro.
-        (CP_8BIT, CP_UNICODE, CP_UNKNOWN): Remove obsolete constants.
+       * w32term.h (FONT_AVG_WIDTH): Remove obsolete macro.
+       (CP_8BIT, CP_UNICODE, CP_UNKNOWN): Remove obsolete constants.
 
 2008-06-26  Juanma Barranquero  <lekktu@gmail.com>
 
index 192277e429576512445c5bfe7cf2005c6bfb44a8..0487ecf47074575091adc1c40763f9a230ee354f 100644 (file)
@@ -1485,7 +1485,7 @@ on systems that do not provide resolution finer than a second.  */)
                make_number ((secs >> 0)  & 0xffff),
                make_number (usecs));
 #else /* ! HAVE_GETRUSAGE  */
-#if WINDOWSNT
+#ifdef WINDOWSNT
   return w32_get_internal_run_time ();
 #else /* ! WINDOWSNT  */
   return Fcurrent_time ();
index 116aea2d56d7b828ff2b8f8f7a39f31bd0abe2b2..872c33207462c9b511e4496a51016b68002fb41f 100644 (file)
@@ -29,7 +29,7 @@ EMACSLOADPATH=$(CURDIR)/../lisp
 # HAVE_CONFIG_H is required by some generic gnu sources stuck into
 # the emacs source tree.
 #
-LOCAL_FLAGS     = -Demacs=1 -DWINDOWSNT -DDOS_NT -DHAVE_CONFIG_H -I../nt/inc -D_UCHAR_T -DHAVE_NTGUI=1 $(EMACS_EXTRA_C_FLAGS)
+LOCAL_FLAGS     = -Demacs=1 -DHAVE_CONFIG_H -I../nt/inc -DHAVE_NTGUI=1 $(EMACS_EXTRA_C_FLAGS)
 
 EMACS           = $(BLD)/emacs.exe
 TEMACS          = $(BLD)/temacs.exe
index 0023ea06bdee9775517ce319c53f9936bc78f222..61a91e01878e93527e7e9793cf04ab48fc2c8d03 100644 (file)
@@ -175,8 +175,8 @@ extern Lisp_Object QCflowcontrol, Qhw, Qsw, QCsummary;
 #include <direct.h>
 /* In process.h which conflicts with the local copy.  */
 #define _P_WAIT 0
-int _CRTAPI1 _spawnlp (int, const char *, const char *, ...);
-int _CRTAPI1 _getpid (void);
+int _cdecl _spawnlp (int, const char *, const char *, ...);
+int _cdecl _getpid (void);
 extern char *getwd (char *);
 #endif