aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2011-02-21 22:00:19 +0200
committerEli Zaretskii2011-02-21 22:00:19 +0200
commit25c51af3a920a21ddfc08e6551690c18b679751f (patch)
treecfcc9362678ab1ab8dface02dfe1222fe0bfe050
parentc63090455fe67ba5788aa23a5223655c2cbe9351 (diff)
downloademacs-25c51af3a920a21ddfc08e6551690c18b679751f.tar.gz
emacs-25c51af3a920a21ddfc08e6551690c18b679751f.zip
Adapt MS-Windows build to import of filemode.c from gnulib.
nt/inc/sys/stat.h (S_ISUID, S_ISGID, S_ISVTX, S_IRGRP, S_IROTH) (S_IWGRP, S_IWOTH, S_IXGRP, S_IXOTH, S_ISSOCK, S_ISLNK, S_ISCTG) (S_ISDOOR, S_ISMPB, S_ISMPC, S_ISNWK, S_ISPORT, S_ISWHT) (S_TYPEISMQ, S_TYPEISSEM, S_TYPEISSHM, S_TYPEISTMO): Define. (lstat): Define to stat. lib/makefile.w32-in ($(BLD)/filemode.$(O)): Move from src/makefile.w32-in and adapt. Depend on stamp_BLD. (GNULIBOBJS): Add $(BLD)/filemode.$(O). src/makefile.w32-in ($(BLD)/filemode.$(O)): Move recipe to lib/makefilw.w32-in. ($(BLD)/dired.$(O)): Depend on $(EMACS_ROOT)/lib/filemode.h. (GLOBAL_SOURCES): Remove filemode.c. (OBJ1): Remove $(BLD)/filemode.$(O). lib-src/makefile.w32-in ($(BLD)/ctags.$(O), $(BLD)/emacsclient.$(O)) ($(BLD)/etags.$(O), $(BLD)/movemail.$(O), $(BLD)/ntlib.$(O)): Depend on $(EMACS_ROOT)/nt/inc/sys/stat.h.
-rw-r--r--ChangeLog6
-rw-r--r--lib-src/ChangeLog6
-rw-r--r--lib-src/makefile.w32-in5
-rw-r--r--lib/makefile.w32-in18
-rw-r--r--nt/ChangeLog8
-rw-r--r--nt/inc/sys/stat.h28
-rw-r--r--src/ChangeLog8
-rw-r--r--src/makefile.w32-in8
8 files changed, 77 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index db173ddd9a1..2b18f8177dd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
12011-02-21 Eli Zaretskii <eliz@gnu.org>
2
3 * lib/makefile.w32-in ($(BLD)/filemode.$(O)): Move from
4 src/makefile.w32-in and adapt. Depend on stamp_BLD.
5 (GNULIBOBJS): Add $(BLD)/filemode.$(O).
6
12011-02-20 Paul Eggert <eggert@cs.ucla.edu> 72011-02-20 Paul Eggert <eggert@cs.ucla.edu>
2 8
3 Import filemode module from gnulib. 9 Import filemode module from gnulib.
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog
index ad8ffa8b754..01352adf4e3 100644
--- a/lib-src/ChangeLog
+++ b/lib-src/ChangeLog
@@ -1,3 +1,9 @@
12011-02-21 Eli Zaretskii <eliz@gnu.org>
2
3 * makefile.w32-in ($(BLD)/ctags.$(O), $(BLD)/emacsclient.$(O))
4 ($(BLD)/etags.$(O), $(BLD)/movemail.$(O), $(BLD)/ntlib.$(O)):
5 Depend on $(EMACS_ROOT)/nt/inc/sys/stat.h.
6
12011-02-21 Ben Key <bkey76@gmail.com> (tiny change) 72011-02-21 Ben Key <bkey76@gmail.com> (tiny change)
2 8
3 * make-docfile.c (scan_c_file): Adapt DEFVAR_PER_BUFFER case to 9 * make-docfile.c (scan_c_file): Adapt DEFVAR_PER_BUFFER case to
diff --git a/lib-src/makefile.w32-in b/lib-src/makefile.w32-in
index 77931c1a36b..bc7b1b27baf 100644
--- a/lib-src/makefile.w32-in
+++ b/lib-src/makefile.w32-in
@@ -374,6 +374,7 @@ $(BLD)/alloca.$(O) : \
374$(BLD)/ctags.$(O) : \ 374$(BLD)/ctags.$(O) : \
375 $(SRC)/ctags.c \ 375 $(SRC)/ctags.c \
376 $(EMACS_ROOT)/nt/inc/sys/param.h \ 376 $(EMACS_ROOT)/nt/inc/sys/param.h \
377 $(EMACS_ROOT)/nt/inc/sys/stat.h \
377 $(EMACS_ROOT)/src/s/ms-w32.h \ 378 $(EMACS_ROOT)/src/s/ms-w32.h \
378 $(EMACS_ROOT)/src/m/intel386.h \ 379 $(EMACS_ROOT)/src/m/intel386.h \
379 $(EMACS_ROOT)/lib-src/../src/config.h \ 380 $(EMACS_ROOT)/lib-src/../src/config.h \
@@ -382,6 +383,7 @@ $(BLD)/ctags.$(O) : \
382 383
383$(BLD)/emacsclient.$(O) : \ 384$(BLD)/emacsclient.$(O) : \
384 $(SRC)/emacsclient.c \ 385 $(SRC)/emacsclient.c \
386 $(EMACS_ROOT)/nt/inc/sys/stat.h \
385 $(EMACS_ROOT)/src/s/ms-w32.h \ 387 $(EMACS_ROOT)/src/s/ms-w32.h \
386 $(EMACS_ROOT)/src/m/intel386.h \ 388 $(EMACS_ROOT)/src/m/intel386.h \
387 $(EMACS_ROOT)/lib-src/../src/config.h 389 $(EMACS_ROOT)/lib-src/../src/config.h
@@ -389,6 +391,7 @@ $(BLD)/emacsclient.$(O) : \
389$(BLD)/etags.$(O) : \ 391$(BLD)/etags.$(O) : \
390 $(SRC)/etags.c \ 392 $(SRC)/etags.c \
391 $(EMACS_ROOT)/nt/inc/sys/param.h \ 393 $(EMACS_ROOT)/nt/inc/sys/param.h \
394 $(EMACS_ROOT)/nt/inc/sys/stat.h \
392 $(EMACS_ROOT)/src/s/ms-w32.h \ 395 $(EMACS_ROOT)/src/s/ms-w32.h \
393 $(EMACS_ROOT)/src/m/intel386.h \ 396 $(EMACS_ROOT)/src/m/intel386.h \
394 $(EMACS_ROOT)/lib-src/../src/config.h \ 397 $(EMACS_ROOT)/lib-src/../src/config.h \
@@ -429,6 +432,7 @@ $(BLD)/movemail.$(O) : \
429 $(EMACS_ROOT)/src/m/intel386.h \ 432 $(EMACS_ROOT)/src/m/intel386.h \
430 $(EMACS_ROOT)/lib-src/../src/config.h \ 433 $(EMACS_ROOT)/lib-src/../src/config.h \
431 $(EMACS_ROOT)/nt/inc/sys/file.h \ 434 $(EMACS_ROOT)/nt/inc/sys/file.h \
435 $(EMACS_ROOT)/nt/inc/sys/stat.h \
432 $(EMACS_ROOT)/lib-src/../src/syswait.h \ 436 $(EMACS_ROOT)/lib-src/../src/syswait.h \
433 $(EMACS_ROOT)/nt/inc/pwd.h \ 437 $(EMACS_ROOT)/nt/inc/pwd.h \
434 $(SRC)/ntlib.h 438 $(SRC)/ntlib.h
@@ -437,6 +441,7 @@ $(BLD)/movemail.$(O) : \
437$(BLD)/ntlib.$(O) : \ 441$(BLD)/ntlib.$(O) : \
438 $(SRC)/ntlib.c \ 442 $(SRC)/ntlib.c \
439 $(SRC)/ntlib.h \ 443 $(SRC)/ntlib.h \
444 $(EMACS_ROOT)/nt/inc/sys/stat.h \
440 $(EMACS_ROOT)/nt/inc/pwd.h 445 $(EMACS_ROOT)/nt/inc/pwd.h
441 446
442$(BLD)/pop.$(O) : \ 447$(BLD)/pop.$(O) : \
diff --git a/lib/makefile.w32-in b/lib/makefile.w32-in
index 02953c9863a..f1071c9dbfd 100644
--- a/lib/makefile.w32-in
+++ b/lib/makefile.w32-in
@@ -28,7 +28,8 @@ GNULIBOBJS = $(BLD)/dtoastr.$(O) \
28 $(BLD)/getopt1.$(O) \ 28 $(BLD)/getopt1.$(O) \
29 $(BLD)/strftime.$(O) \ 29 $(BLD)/strftime.$(O) \
30 $(BLD)/time_r.$(O) \ 30 $(BLD)/time_r.$(O) \
31 $(BLD)/md5.$(O) 31 $(BLD)/md5.$(O) \
32 $(BLD)/filemode.$(O)
32 33
33# 34#
34# Build the library 35# Build the library
@@ -95,17 +96,26 @@ $(BLD)/time_r.$(O) : \
95 $(EMACS_ROOT)/src/config.h 96 $(EMACS_ROOT)/src/config.h
96 97
97$(BLD)/md5.$(O) : \ 98$(BLD)/md5.$(O) : \
98 $(EMACS_ROOT)/lib/md5.c \ 99 $(SRC)/md5.c \
100 $(SRC)/md5.h \
99 $(EMACS_ROOT)/src/s/ms-w32.h \ 101 $(EMACS_ROOT)/src/s/ms-w32.h \
100 $(EMACS_ROOT)/src/m/intel386.h \ 102 $(EMACS_ROOT)/src/m/intel386.h \
101 $(EMACS_ROOT)/src/config.h \ 103 $(EMACS_ROOT)/src/config.h
102 $(EMACS_ROOT)/lib/md5.h 104
105$(BLD)/filemode.$(O) : \
106 $(SRC)/filemode.c \
107 $(SRC)/filemode.h \
108 $(EMACS_ROOT)/nt/inc/sys/stat.h \
109 $(EMACS_ROOT)/src/s/ms-w32.h \
110 $(EMACS_ROOT)/src/m/intel386.h \
111 $(EMACS_ROOT)/src/config.h
103 112
104# The following dependencies are for supporting parallel builds, where 113# The following dependencies are for supporting parallel builds, where
105# we must make sure $(BLD) exists before any compilation starts. 114# we must make sure $(BLD) exists before any compilation starts.
106# 115#
107$(BLD)/dtoastr.$(O) $(BLD)/getopt.$(O) $(BLD)/getopt1.$(O): stamp_BLD 116$(BLD)/dtoastr.$(O) $(BLD)/getopt.$(O) $(BLD)/getopt1.$(O): stamp_BLD
108$(BLD)/strftime.$(O) $(BLD)/time_r.$(O) $(BLD)/md5.$(O): stamp_BLD 117$(BLD)/strftime.$(O) $(BLD)/time_r.$(O) $(BLD)/md5.$(O): stamp_BLD
118$(BLD)/filemode.$(O): stamp_BLD
109 119
110# 120#
111# Headers we would preprocess if we could. 121# Headers we would preprocess if we could.
diff --git a/nt/ChangeLog b/nt/ChangeLog
index 41273114429..b89e33074f3 100644
--- a/nt/ChangeLog
+++ b/nt/ChangeLog
@@ -1,3 +1,11 @@
12011-02-21 Eli Zaretskii <eliz@gnu.org>
2
3 * inc/sys/stat.h (S_ISUID, S_ISGID, S_ISVTX, S_IRGRP, S_IROTH)
4 (S_IWGRP, S_IWOTH, S_IXGRP, S_IXOTH, S_ISSOCK, S_ISLNK, S_ISCTG)
5 (S_ISDOOR, S_ISMPB, S_ISMPC, S_ISNWK, S_ISPORT, S_ISWHT)
6 (S_TYPEISMQ, S_TYPEISSEM, S_TYPEISSHM, S_TYPEISTMO): Define.
7 (lstat): Define to stat.
8
12011-02-09 Eli Zaretskii <eliz@gnu.org> 92011-02-09 Eli Zaretskii <eliz@gnu.org>
2 10
3 * makefile.w32-in (bootstrap-nmake, bootstrap-gmake): Make the 11 * makefile.w32-in (bootstrap-nmake, bootstrap-gmake): Make the
diff --git a/nt/inc/sys/stat.h b/nt/inc/sys/stat.h
index a217dea9d47..7f0bbeccb17 100644
--- a/nt/inc/sys/stat.h
+++ b/nt/inc/sys/stat.h
@@ -56,6 +56,31 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
56#define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR) 56#define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
57#define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO) 57#define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
58 58
59/* These don't exist on Windows, but lib/filemode.c wants them. */
60#define S_ISUID 0
61#define S_ISGID 0
62#define S_ISVTX 0
63#define S_IRGRP (S_IRUSR >> 3)
64#define S_IROTH (S_IRUSR >> 6)
65#define S_IWGRP (S_IWUSR >> 3)
66#define S_IWOTH (S_IWUSR >> 6)
67#define S_IXGRP (S_IXUSR >> 3)
68#define S_IXOTH (S_IXUSR >> 6)
69
70#define S_ISSOCK(m) 0
71#define S_ISLNK(m) 0
72#define S_ISCTG(p) 0
73#define S_ISDOOR(m) 0
74#define S_ISMPB(m) 0
75#define S_ISMPC(m) 0
76#define S_ISNWK(m) 0
77#define S_ISPORT(m) 0
78#define S_ISWHT(m) 0
79#define S_TYPEISMQ(p) 0
80#define S_TYPEISSEM(p) 0
81#define S_TYPEISSHM(p) 0
82#define S_TYPEISTMO(p) 0
83
59struct stat { 84struct stat {
60 unsigned __int64 st_ino; /* ino_t in sys/types.h is too narrow */ 85 unsigned __int64 st_ino; /* ino_t in sys/types.h is too narrow */
61 dev_t st_dev; 86 dev_t st_dev;
@@ -76,5 +101,8 @@ _CRTIMP int __cdecl __MINGW_NOTHROW fstat (int, struct stat*);
76_CRTIMP int __cdecl __MINGW_NOTHROW chmod (const char*, int); 101_CRTIMP int __cdecl __MINGW_NOTHROW chmod (const char*, int);
77_CRTIMP int __cdecl __MINGW_NOTHROW stat (const char*, struct stat*); 102_CRTIMP int __cdecl __MINGW_NOTHROW stat (const char*, struct stat*);
78 103
104/* fileio.c and dired.c want lstat. */
105#define lstat stat
106
79#endif /* INC_SYS_STAT_H_ */ 107#endif /* INC_SYS_STAT_H_ */
80 108
diff --git a/src/ChangeLog b/src/ChangeLog
index d95ebb32dee..9713a4a6ed5 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,11 @@
12011-02-21 Eli Zaretskii <eliz@gnu.org>
2
3 * makefile.w32-in ($(BLD)/filemode.$(O)): Move recipe to
4 lib/makefilw.w32-in.
5 ($(BLD)/dired.$(O)): Depend on $(EMACS_ROOT)/lib/filemode.h.
6 (GLOBAL_SOURCES): Remove filemode.c.
7 (OBJ1): Remove $(BLD)/filemode.$(O).
8
12011-02-21 Paul Eggert <eggert@cs.ucla.edu> 92011-02-21 Paul Eggert <eggert@cs.ucla.edu>
2 10
3 Import filemode module from gnulib. 11 Import filemode module from gnulib.
diff --git a/src/makefile.w32-in b/src/makefile.w32-in
index ca7fdcac029..7a702fd45bf 100644
--- a/src/makefile.w32-in
+++ b/src/makefile.w32-in
@@ -72,7 +72,6 @@ OBJ1 = $(BLD)/alloc.$(O) \
72 $(BLD)/eval.$(O) \ 72 $(BLD)/eval.$(O) \
73 $(BLD)/fileio.$(O) \ 73 $(BLD)/fileio.$(O) \
74 $(BLD)/filelock.$(O) \ 74 $(BLD)/filelock.$(O) \
75 $(BLD)/filemode.$(O) \
76 $(BLD)/fns.$(O) \ 75 $(BLD)/fns.$(O) \
77 $(BLD)/indent.$(O) \ 76 $(BLD)/indent.$(O) \
78 $(BLD)/insdel.$(O) \ 77 $(BLD)/insdel.$(O) \
@@ -213,7 +212,7 @@ GLOBAL_SOURCES = dosfns.c msdos.c \
213 cm.c term.c terminal.c xfaces.c \ 212 cm.c term.c terminal.c xfaces.c \
214 emacs.c keyboard.c macros.c keymap.c sysdep.c \ 213 emacs.c keyboard.c macros.c keymap.c sysdep.c \
215 buffer.c filelock.c insdel.c marker.c \ 214 buffer.c filelock.c insdel.c marker.c \
216 minibuf.c fileio.c dired.c filemode.c \ 215 minibuf.c fileio.c dired.c \
217 cmds.c casetab.c casefiddle.c indent.c search.c regex.c undo.c \ 216 cmds.c casetab.c casefiddle.c indent.c search.c regex.c undo.c \
218 alloc.c data.c doc.c editfns.c callint.c \ 217 alloc.c data.c doc.c editfns.c callint.c \
219 eval.c floatfns.c fns.c print.c lread.c \ 218 eval.c floatfns.c fns.c print.c lread.c \
@@ -663,6 +662,7 @@ $(BLD)/dired.$(O) : \
663 $(SRC)/coding.h \ 662 $(SRC)/coding.h \
664 $(SRC)/commands.h \ 663 $(SRC)/commands.h \
665 $(SRC)/composite.h \ 664 $(SRC)/composite.h \
665 $(EMACS_ROOT)/lib/filemode.h \
666 $(SRC)/ndir.h \ 666 $(SRC)/ndir.h \
667 $(SRC)/regex.h \ 667 $(SRC)/regex.h \
668 $(SRC)/systime.h 668 $(SRC)/systime.h
@@ -821,10 +821,6 @@ $(BLD)/filelock.$(O) : \
821 $(SRC)/composite.h \ 821 $(SRC)/composite.h \
822 $(SRC)/systime.h 822 $(SRC)/systime.h
823 823
824$(BLD)/filemode.$(O) : \
825 $(SRC)/filemode.c \
826 $(CONFIG_H)
827
828$(BLD)/firstfile.$(O) : \ 824$(BLD)/firstfile.$(O) : \
829 $(SRC)/firstfile.c \ 825 $(SRC)/firstfile.c \
830 $(CONFIG_H) 826 $(CONFIG_H)