From 25c51af3a920a21ddfc08e6551690c18b679751f Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 21 Feb 2011 22:00:19 +0200 Subject: 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. --- nt/inc/sys/stat.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'nt/inc/sys/stat.h') 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 . */ #define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR) #define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO) +/* These don't exist on Windows, but lib/filemode.c wants them. */ +#define S_ISUID 0 +#define S_ISGID 0 +#define S_ISVTX 0 +#define S_IRGRP (S_IRUSR >> 3) +#define S_IROTH (S_IRUSR >> 6) +#define S_IWGRP (S_IWUSR >> 3) +#define S_IWOTH (S_IWUSR >> 6) +#define S_IXGRP (S_IXUSR >> 3) +#define S_IXOTH (S_IXUSR >> 6) + +#define S_ISSOCK(m) 0 +#define S_ISLNK(m) 0 +#define S_ISCTG(p) 0 +#define S_ISDOOR(m) 0 +#define S_ISMPB(m) 0 +#define S_ISMPC(m) 0 +#define S_ISNWK(m) 0 +#define S_ISPORT(m) 0 +#define S_ISWHT(m) 0 +#define S_TYPEISMQ(p) 0 +#define S_TYPEISSEM(p) 0 +#define S_TYPEISSHM(p) 0 +#define S_TYPEISTMO(p) 0 + struct stat { unsigned __int64 st_ino; /* ino_t in sys/types.h is too narrow */ dev_t st_dev; @@ -76,5 +101,8 @@ _CRTIMP int __cdecl __MINGW_NOTHROW fstat (int, struct stat*); _CRTIMP int __cdecl __MINGW_NOTHROW chmod (const char*, int); _CRTIMP int __cdecl __MINGW_NOTHROW stat (const char*, struct stat*); +/* fileio.c and dired.c want lstat. */ +#define lstat stat + #endif /* INC_SYS_STAT_H_ */ -- cgit v1.2.3