From: Eli Zaretskii Date: Mon, 31 Jan 2011 19:36:08 +0000 (+0200) Subject: Fix the MS-Windows build broken by 2011-01-30T23:34:18Z!eggert@cs.ucla.edu and 2011... X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~1048^2~50 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=70b0d280eb5cfdf103603fb289064710ae7cd680;p=emacs.git Fix the MS-Windows build broken by 2011-01-30T23:34:18Z!eggert@cs.ucla.edu and 2011-01-31T08:15:13Z!eggert@cs.ucla.edu. lib/makefile.w32-in (GNULIBOBJS): Add $(BLD)/strftime.$(O) and $(BLD)/time_r.$(O). ($(BLD)/dtoastr.$(O)): Depend on $(EMACS_ROOT)/src/s/ms-w32.h and $(EMACS_ROOT)/src/m/intel386.h. ($(BLD)/strftime.$(O)): ($(BLD)/time_r.$(O)): Define prerequisites. src/makefile.w32-in (OBJ2): Remove strftime.$(O). ($(BLD)/strftime.$(O)): Remove prerequisites. lib-src/makefile.w32-in (VERSION): Don't define, defined on nt/config.nt. (ECLIENT_CFLAGS): Remove -DVERSION. ($(BLD)/emacsclient.$(O)): Don't depend on makefile.w32-in. nt/config.nt (VERSION): Uncomment definition. (restrict): Define. nt/inc/stdbool.h: New file. admin/admin.el (set-version): Remove lib-src/makefile.w32-in. Add nt/config.nt. --- diff --git a/ChangeLog b/ChangeLog index 20d9e4dbc57..df753d1f005 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2011-01-31 Eli Zaretskii + + * lib/makefile.w32-in (GNULIBOBJS): Add $(BLD)/strftime.$(O) and + $(BLD)/time_r.$(O). + ($(BLD)/dtoastr.$(O)): Depend on $(EMACS_ROOT)/src/s/ms-w32.h and + $(EMACS_ROOT)/src/m/intel386.h. + ($(BLD)/strftime.$(O)): + ($(BLD)/time_r.$(O)): Define prerequisites. + 2011-01-31 Paul Eggert src/emacs.c now gets version number from configure.in diff --git a/admin/ChangeLog b/admin/ChangeLog index 6f2ac5d67d5..f7d60b08e4c 100644 --- a/admin/ChangeLog +++ b/admin/ChangeLog @@ -1,3 +1,8 @@ +2011-01-31 Eli Zaretskii + + * admin.el (set-version): Remove lib-src/makefile.w32-in. Add + nt/config.nt. + 2011-01-31 Paul Eggert src/emacs.c now gets version number from configure.in diff --git a/admin/admin.el b/admin/admin.el index 739c769b352..9f87e9b2590 100644 --- a/admin/admin.el +++ b/admin/admin.el @@ -73,8 +73,9 @@ Root must be the root of an Emacs source tree." (rx (and ".TH EMACS" (1+ not-newline) "GNU Emacs" (1+ space) (submatch (1+ (in "0-9.")))))) - (set-version-in-file root "lib-src/makefile.w32-in" version - (rx (and "VERSION" (0+ space) "=" (0+ space) + (set-version-in-file root "nt/config.nt" version + (rx (and bol "#" (0+ blank) "define" (1+ blank) + "VERSION" (1+ blank) (submatch (1+ (in "0-9.")))))) (set-version-in-file root "nt/makefile.w32-in" version (rx (and "VERSION" (0+ space) "=" (0+ space) diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 3f7a17e2db6..2f56eb8d87a 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,9 @@ +2011-01-31 Eli Zaretskii + + * makefile.w32-in (VERSION): Don't define, defined on nt/config.nt. + (ECLIENT_CFLAGS): Remove -DVERSION. + ($(BLD)/emacsclient.$(O)): Don't depend on makefile.w32-in. + 2011-01-31 Paul Eggert src/emacs.c now gets version number from configure.in diff --git a/lib-src/makefile.w32-in b/lib-src/makefile.w32-in index 3685d0e71be..50a29a86042 100644 --- a/lib-src/makefile.w32-in +++ b/lib-src/makefile.w32-in @@ -21,8 +21,6 @@ ALL = make-docfile hexl ctags etags movemail ebrowse emacsclient .PHONY: $(ALL) -VERSION = 24.0.50 - LOCAL_FLAGS = -DWINDOWSNT -DDOS_NT -DSTDC_HEADERS=1 -DNO_LDAV=1 \ -DNO_ARCHIVES=1 -DHAVE_CONFIG_H=1 -I../lib \ -I../nt/inc -I../src @@ -59,7 +57,7 @@ $(BLD)/movemail.exe: $(MOVEMAILOBJS) ../lib/getopt.h # put wsock32.lib before $(LIBS) to ensure we don't link to ws2_32.lib $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $(MOVEMAILOBJS) $(WSOCK32) $(LIBS) -ECLIENT_CFLAGS = -DHAVE_GETCWD -DHAVE_STRERROR -DVERSION="\"$(VERSION)\"" +ECLIENT_CFLAGS = -DHAVE_GETCWD -DHAVE_STRERROR ECLIENTOBJS = $(BLD)/emacsclient.$(O) \ $(BLD)/ntlib.$(O) \ ../lib/$(BLD)/libgnu.$(A) @@ -77,9 +75,7 @@ $(BLD)/emacsclientw.exe: $(ECLIENTOBJS) $(CLIENTRES) # put wsock32.lib before $(LIBS) to ensure we don't link to ws2_32.lib $(LINK) $(LINK_OUT)$@ $(CLIENTRES) -mwindows $(LINK_FLAGS) $(ECLIENTOBJS) $(WSOCK32) $(USER32) $(COMCTL32) $(LIBS) -# emacsclient.$(O) depends on makefile.w32-in because makefile.w32-in -# can be edited to define VERSION string, which is part of ECLIENT_CFLAGS. -$(BLD)/emacsclient.$(O): emacsclient.c makefile.w32-in +$(BLD)/emacsclient.$(O): emacsclient.c $(CC) $(CFLAGS) $(ECLIENT_CFLAGS) $(CC_OUT)$@ emacsclient.c ETAGSOBJ = $(BLD)/etags.$(O) \ diff --git a/lib/makefile.w32-in b/lib/makefile.w32-in index cf74288e2cf..cdf44f614b6 100644 --- a/lib/makefile.w32-in +++ b/lib/makefile.w32-in @@ -23,7 +23,11 @@ ALL = gnulib LOCAL_FLAGS = -DHAVE_CONFIG_H=1 -I. -I../nt/inc -I../src LIBS = -GNULIBOBJS = $(BLD)/dtoastr.$(O) $(BLD)/getopt.$(O) $(BLD)/getopt1.$(O) +GNULIBOBJS = $(BLD)/dtoastr.$(O) \ + $(BLD)/getopt.$(O) \ + $(BLD)/getopt1.$(O) \ + $(BLD)/strftime.$(O) \ + $(BLD)/time_r.$(O) # # Build the library @@ -54,6 +58,8 @@ $(BLD)/dtoastr.$(O) : \ $(SRC)/ftoastr.c \ $(SRC)/ftoastr.h \ $(SRC)/intprops.h \ + $(EMACS_ROOT)/src/s/ms-w32.h \ + $(EMACS_ROOT)/src/m/intel386.h \ $(EMACS_ROOT)/src/config.h $(BLD)/getopt.$(O) : \ @@ -72,10 +78,26 @@ $(BLD)/getopt1.$(O) : \ $(EMACS_ROOT)/src/m/intel386.h \ $(EMACS_ROOT)/src/config.h +$(BLD)/strftime.$(O) : \ + $(SRC)/strftime.c \ + $(SRC)/strftime.h \ + $(EMACS_ROOT)/nt/inc/stdbool.h \ + $(EMACS_ROOT)/src/s/ms-w32.h \ + $(EMACS_ROOT)/src/m/intel386.h \ + $(EMACS_ROOT)/src/config.h + +$(BLD)/time_r.$(O) : \ + $(SRC)/time_r.c \ + $(EMACS_ROOT)/nt/inc/stdbool.h \ + $(EMACS_ROOT)/src/s/ms-w32.h \ + $(EMACS_ROOT)/src/m/intel386.h \ + $(EMACS_ROOT)/src/config.h + # The following dependencies are for supporting parallel builds, where # we must make sure $(BLD) exists before any compilation starts. # $(BLD)/dtoastr.$(O) $(BLD)/getopt.$(O) $(BLD)/getopt1.$(O): stamp_BLD +$(BLD)/strftime.$(O) $(BLD)/time_r.$(O): stamp_BLD # # Headers we would preprocess if we could. diff --git a/nt/ChangeLog b/nt/ChangeLog index 355c7e83dab..db73491718f 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog @@ -1,3 +1,7 @@ +2011-01-31 Eli Zaretskii + + * inc/stdbool.h: New file. + 2011-01-29 Eli Zaretskii * makefile.w32-in (all-other-dirs-nmake, all-other-dirs-gmake) diff --git a/nt/config.nt b/nt/config.nt index 53d89701c69..d612a417f4d 100644 --- a/nt/config.nt +++ b/nt/config.nt @@ -305,13 +305,8 @@ along with GNU Emacs. If not, see . */ /* Name of package */ #define PACKAGE "emacs" -/* FIXME: This is defined by the various makefile.w32-in files for - now. Revisit if/when VERSION from config.h is used by any - Makefile.in files. */ -#if 0 /* Version number of package */ #define VERSION "24.0.50" -#endif /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ @@ -319,6 +314,15 @@ along with GNU Emacs. If not, see . */ #undef inline #endif +/* Define to the equivalent of the C99 'restrict' keyword, or to + nothing if this is not supported. Do not define if restrict is + supported directly. */ +#ifdef __GNUC__ +# define restrict __restrict__ +#else +# define restrict +#endif + /* Define as a marker that can be attached to declarations that might not be used. This helps to reduce warnings, such as from GCC -Wunused-parameter. */ diff --git a/nt/inc/stdbool.h b/nt/inc/stdbool.h new file mode 100644 index 00000000000..521291fdd03 --- /dev/null +++ b/nt/inc/stdbool.h @@ -0,0 +1,16 @@ +#ifndef _NT_STDBOOL_H_ +#define _NT_STDBOOL_H_ +/* + * stdbool.h exists in GCC, but not in MSVC. + */ + +#ifdef __GNUC__ +# include_next +#else +# define _Bool signed char +# define bool _Bool +# define false 0 +# define true 1 +#endif + +#endif /* _NT_STDBOOL_H_ */ diff --git a/src/ChangeLog b/src/ChangeLog index f96fe5eb2f8..072e74b77f7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2011-01-31 Eli Zaretskii + + * makefile.w32-in (OBJ2): Remove strftime.$(O). + ($(BLD)/strftime.$(O)): Remove prerequisites. + 2011-01-31 Paul Eggert src/emacs.c now gets version number from configure.in diff --git a/src/makefile.w32-in b/src/makefile.w32-in index ad21419ca7f..4f7bbebf6cb 100644 --- a/src/makefile.w32-in +++ b/src/makefile.w32-in @@ -113,7 +113,6 @@ OBJ2 = $(BLD)/sysdep.$(O) \ $(BLD)/textprop.$(O) \ $(BLD)/vm-limit.$(O) \ $(BLD)/region-cache.$(O) \ - $(BLD)/strftime.$(O) \ $(BLD)/bidi.$(O) \ $(BLD)/charset.$(O) \ $(BLD)/character.$(O) \ @@ -1363,11 +1362,6 @@ $(BLD)/sound.$(O) : \ $(SRC)/systime.h \ $(SRC)/w32gui.h -$(BLD)/strftime.$(O) : \ - $(SRC)/strftime.c \ - $(CONFIG_H) \ - $(EMACS_ROOT)/nt/inc/sys/time.h - $(BLD)/syntax.$(O) : \ $(SRC)/syntax.c \ $(CONFIG_H) \