diff options
-rw-r--r-- | configure.ac | 6 | ||||
-rw-r--r-- | nt/inc/ms-w32.h | 9 | ||||
-rw-r--r-- | nt/inc/sys/stat.h | 33 | ||||
-rw-r--r-- | src/Makefile.in | 5 | ||||
-rw-r--r-- | src/w32.c | 4 |
5 files changed, 47 insertions, 10 deletions
diff --git a/configure.ac b/configure.ac index 75ecb7bbc96..a46f89ad550 100644 --- a/configure.ac +++ b/configure.ac @@ -1578,6 +1578,7 @@ fi FIRSTFILE_OBJ= NTDIR= +CM_OBJ="cm.o" if test "${HAVE_W32}" = "yes"; then AC_DEFINE(HAVE_NTGUI, 1, [Define to use native MS Windows GUI.]) AC_CHECK_TOOL(WINDRES, [windres], @@ -1597,12 +1598,14 @@ if test "${HAVE_W32}" = "yes"; then W32_RES_LINK="-Wl,-bpe-i386 -Wl,emacs.res" else W32_OBJ="$W32_OBJ w32.o w32console.o w32heap.o w32inevt.o w32proc.o" + W32_OBJ="$W32_OBJ w32notify.o" W32_LIBS="$W32_LIBS -lwinmm -lgdi32 -lcomdlg32" - W32_LIBS="$W32_LIBS -lmpr -lwinspool -lole32 -lcomctl32 -lusp10" + W32_LIBS="$W32_LIBS -lmpr -lwinspool -lole32 -lusp10" CLIENTRES="emacsclient.res" CLIENTW="emacsclientw\$(EXEEXT)" FIRSTFILE_OBJ=firstfile.o NTDIR=nt + CM_OBJ= fi fi AC_SUBST(W32_OBJ) @@ -1614,6 +1617,7 @@ AC_SUBST(CLIENTW) AC_SUBST(W32_RES_LINK) AC_SUBST(FIRSTFILE_OBJ) AC_SUBST(NTDIR) +AC_SUBST(CM_OBJ) if test "${HAVE_W32}" = "yes"; then window_system=w32 diff --git a/nt/inc/ms-w32.h b/nt/inc/ms-w32.h index 6fca448db07..65540f238e5 100644 --- a/nt/inc/ms-w32.h +++ b/nt/inc/ms-w32.h @@ -144,9 +144,6 @@ extern char *getenv (); /* Make a leaner executable. */ #define WIN32_LEAN_AND_MEAN 1 -#ifdef HAVE_STRINGS_H -#include "strings.h" -#endif #include <sys/types.h> #ifndef MAXPATHLEN @@ -258,9 +255,6 @@ extern int sys_unlink (const char *); #define execvp _execvp #define fdatasync _commit #define fdopen _fdopen -#ifndef fileno -#define fileno _fileno -#endif #define fsync _commit #define ftruncate _chsize #define getpid _getpid @@ -330,6 +324,9 @@ extern struct tm *localtime_r (time_t const * restrict, struct tm * restrict); #include <io.h> #include <stdio.h> #endif /* !_MSC_VER */ +#ifndef fileno +#define fileno _fileno +#endif /* Defines that we need that aren't in the standard signal.h. */ #define SIGHUP 1 /* Hang up */ diff --git a/nt/inc/sys/stat.h b/nt/inc/sys/stat.h index 857acce1815..f1d8341141e 100644 --- a/nt/inc/sys/stat.h +++ b/nt/inc/sys/stat.h @@ -102,6 +102,39 @@ struct stat { char st_gname[260]; }; +/* These are here to avoid compiler warnings when using wchar.h. */ +struct _stat +{ + _dev_t st_dev; /* Equivalent to drive number 0=A 1=B ... */ + _ino_t st_ino; /* Always zero ? */ + _mode_t st_mode; /* See above constants */ + short st_nlink; /* Number of links. */ + short st_uid; /* User: Maybe significant on NT ? */ + short st_gid; /* Group: Ditto */ + _dev_t st_rdev; /* Seems useless (not even filled in) */ + _off_t st_size; /* File size in bytes */ + time_t st_atime; /* Accessed date (always 00:00 hrs local + * on FAT) */ + time_t st_mtime; /* Modified time */ + time_t st_ctime; /* Creation time */ +}; + +#if defined (__MSVCRT__) +struct _stati64 { + _dev_t st_dev; + _ino_t st_ino; + _mode_t st_mode; + short st_nlink; + short st_uid; + short st_gid; + _dev_t st_rdev; + __int64 st_size; + time_t st_atime; + time_t st_mtime; + time_t st_ctime; +}; +#endif + /* Internal variable for asking 'stat'/'lstat' to produce accurate info about owner and group of files. */ extern int w32_stat_get_owner_group; diff --git a/src/Makefile.in b/src/Makefile.in index 62c1e51e298..283396acc89 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -274,6 +274,9 @@ W32_RES_LINK=@W32_RES_LINK@ ## else xfont.o FONT_OBJ=@FONT_OBJ@ +## Empty for MinGW, cm.o for the rest. +CM_OBJ=@CM_OBJ@ + LIBGPM = @LIBGPM@ ## -lresolv, or empty. @@ -344,7 +347,7 @@ ALL_OBJC_CFLAGS=$(ALL_CFLAGS) $(GNU_OBJC_CFLAGS) ## be dumped as pure by dump-emacs. base_obj = dispnew.o frame.o scroll.o xdisp.o menu.o $(XMENU_OBJ) window.o \ charset.o coding.o category.o ccl.o character.o chartab.o bidi.o \ - cm.o term.o terminal.o xfaces.o $(XOBJ) $(GTK_OBJ) $(DBUS_OBJ) \ + $(CM_OBJ) term.o terminal.o xfaces.o $(XOBJ) $(GTK_OBJ) $(DBUS_OBJ) \ emacs.o keyboard.o macros.o keymap.o sysdep.o \ buffer.o filelock.o insdel.o marker.o \ minibuf.o fileio.o dired.o \ diff --git a/src/w32.c b/src/w32.c index fb069c36673..0fa5970124a 100644 --- a/src/w32.c +++ b/src/w32.c @@ -4430,9 +4430,9 @@ fstat (int desc, struct stat * buf) } int -utime (const char *name, struct _utimbuf *times) +utime (const char *name, struct utimbuf *times) { - struct _utimbuf deftime; + struct utimbuf deftime; HANDLE fh; FILETIME mtime; FILETIME atime; |