diff options
| author | Eli Zaretskii | 2011-02-21 22:00:19 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2011-02-21 22:00:19 +0200 |
| commit | 25c51af3a920a21ddfc08e6551690c18b679751f (patch) | |
| tree | cfcc9362678ab1ab8dface02dfe1222fe0bfe050 /nt | |
| parent | c63090455fe67ba5788aa23a5223655c2cbe9351 (diff) | |
| download | emacs-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.
Diffstat (limited to 'nt')
| -rw-r--r-- | nt/ChangeLog | 8 | ||||
| -rw-r--r-- | nt/inc/sys/stat.h | 28 |
2 files changed, 36 insertions, 0 deletions
diff --git a/nt/ChangeLog b/nt/ChangeLog index 41273114429..b89e33074f3 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2011-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 | |||
| 1 | 2011-02-09 Eli Zaretskii <eliz@gnu.org> | 9 | 2011-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 | |||
| 59 | struct stat { | 84 | struct 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 | ||