aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2013-04-01 19:28:53 +0300
committerEli Zaretskii2013-04-01 19:28:53 +0300
commit86e9346005b957ddadb73586c9641e68ea12a79d (patch)
tree683c40f6e61d57905d7b7807ef42e8f1ae4038ea
parentcbbb6bfd46dbab26a570b853959da6ecaada4a93 (diff)
downloademacs-86e9346005b957ddadb73586c9641e68ea12a79d.tar.gz
emacs-86e9346005b957ddadb73586c9641e68ea12a79d.zip
Fixed misc compilation warnings and errors. Dumping errors out.
-rw-r--r--configure.ac6
-rw-r--r--nt/inc/ms-w32.h9
-rw-r--r--nt/inc/sys/stat.h33
-rw-r--r--src/Makefile.in5
-rw-r--r--src/w32.c4
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
1578 1578
1579FIRSTFILE_OBJ= 1579FIRSTFILE_OBJ=
1580NTDIR= 1580NTDIR=
1581CM_OBJ="cm.o"
1581if test "${HAVE_W32}" = "yes"; then 1582if test "${HAVE_W32}" = "yes"; then
1582 AC_DEFINE(HAVE_NTGUI, 1, [Define to use native MS Windows GUI.]) 1583 AC_DEFINE(HAVE_NTGUI, 1, [Define to use native MS Windows GUI.])
1583 AC_CHECK_TOOL(WINDRES, [windres], 1584 AC_CHECK_TOOL(WINDRES, [windres],
@@ -1597,12 +1598,14 @@ if test "${HAVE_W32}" = "yes"; then
1597 W32_RES_LINK="-Wl,-bpe-i386 -Wl,emacs.res" 1598 W32_RES_LINK="-Wl,-bpe-i386 -Wl,emacs.res"
1598 else 1599 else
1599 W32_OBJ="$W32_OBJ w32.o w32console.o w32heap.o w32inevt.o w32proc.o" 1600 W32_OBJ="$W32_OBJ w32.o w32console.o w32heap.o w32inevt.o w32proc.o"
1601 W32_OBJ="$W32_OBJ w32notify.o"
1600 W32_LIBS="$W32_LIBS -lwinmm -lgdi32 -lcomdlg32" 1602 W32_LIBS="$W32_LIBS -lwinmm -lgdi32 -lcomdlg32"
1601 W32_LIBS="$W32_LIBS -lmpr -lwinspool -lole32 -lcomctl32 -lusp10" 1603 W32_LIBS="$W32_LIBS -lmpr -lwinspool -lole32 -lusp10"
1602 CLIENTRES="emacsclient.res" 1604 CLIENTRES="emacsclient.res"
1603 CLIENTW="emacsclientw\$(EXEEXT)" 1605 CLIENTW="emacsclientw\$(EXEEXT)"
1604 FIRSTFILE_OBJ=firstfile.o 1606 FIRSTFILE_OBJ=firstfile.o
1605 NTDIR=nt 1607 NTDIR=nt
1608 CM_OBJ=
1606 fi 1609 fi
1607fi 1610fi
1608AC_SUBST(W32_OBJ) 1611AC_SUBST(W32_OBJ)
@@ -1614,6 +1617,7 @@ AC_SUBST(CLIENTW)
1614AC_SUBST(W32_RES_LINK) 1617AC_SUBST(W32_RES_LINK)
1615AC_SUBST(FIRSTFILE_OBJ) 1618AC_SUBST(FIRSTFILE_OBJ)
1616AC_SUBST(NTDIR) 1619AC_SUBST(NTDIR)
1620AC_SUBST(CM_OBJ)
1617 1621
1618if test "${HAVE_W32}" = "yes"; then 1622if test "${HAVE_W32}" = "yes"; then
1619 window_system=w32 1623 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 ();
144/* Make a leaner executable. */ 144/* Make a leaner executable. */
145#define WIN32_LEAN_AND_MEAN 1 145#define WIN32_LEAN_AND_MEAN 1
146 146
147#ifdef HAVE_STRINGS_H
148#include "strings.h"
149#endif
150#include <sys/types.h> 147#include <sys/types.h>
151 148
152#ifndef MAXPATHLEN 149#ifndef MAXPATHLEN
@@ -258,9 +255,6 @@ extern int sys_unlink (const char *);
258#define execvp _execvp 255#define execvp _execvp
259#define fdatasync _commit 256#define fdatasync _commit
260#define fdopen _fdopen 257#define fdopen _fdopen
261#ifndef fileno
262#define fileno _fileno
263#endif
264#define fsync _commit 258#define fsync _commit
265#define ftruncate _chsize 259#define ftruncate _chsize
266#define getpid _getpid 260#define getpid _getpid
@@ -330,6 +324,9 @@ extern struct tm *localtime_r (time_t const * restrict, struct tm * restrict);
330#include <io.h> 324#include <io.h>
331#include <stdio.h> 325#include <stdio.h>
332#endif /* !_MSC_VER */ 326#endif /* !_MSC_VER */
327#ifndef fileno
328#define fileno _fileno
329#endif
333 330
334/* Defines that we need that aren't in the standard signal.h. */ 331/* Defines that we need that aren't in the standard signal.h. */
335#define SIGHUP 1 /* Hang up */ 332#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 {
102 char st_gname[260]; 102 char st_gname[260];
103}; 103};
104 104
105/* These are here to avoid compiler warnings when using wchar.h. */
106struct _stat
107{
108 _dev_t st_dev; /* Equivalent to drive number 0=A 1=B ... */
109 _ino_t st_ino; /* Always zero ? */
110 _mode_t st_mode; /* See above constants */
111 short st_nlink; /* Number of links. */
112 short st_uid; /* User: Maybe significant on NT ? */
113 short st_gid; /* Group: Ditto */
114 _dev_t st_rdev; /* Seems useless (not even filled in) */
115 _off_t st_size; /* File size in bytes */
116 time_t st_atime; /* Accessed date (always 00:00 hrs local
117 * on FAT) */
118 time_t st_mtime; /* Modified time */
119 time_t st_ctime; /* Creation time */
120};
121
122#if defined (__MSVCRT__)
123struct _stati64 {
124 _dev_t st_dev;
125 _ino_t st_ino;
126 _mode_t st_mode;
127 short st_nlink;
128 short st_uid;
129 short st_gid;
130 _dev_t st_rdev;
131 __int64 st_size;
132 time_t st_atime;
133 time_t st_mtime;
134 time_t st_ctime;
135};
136#endif
137
105/* Internal variable for asking 'stat'/'lstat' to produce accurate 138/* Internal variable for asking 'stat'/'lstat' to produce accurate
106 info about owner and group of files. */ 139 info about owner and group of files. */
107extern int w32_stat_get_owner_group; 140extern 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@
274## else xfont.o 274## else xfont.o
275FONT_OBJ=@FONT_OBJ@ 275FONT_OBJ=@FONT_OBJ@
276 276
277## Empty for MinGW, cm.o for the rest.
278CM_OBJ=@CM_OBJ@
279
277LIBGPM = @LIBGPM@ 280LIBGPM = @LIBGPM@
278 281
279## -lresolv, or empty. 282## -lresolv, or empty.
@@ -344,7 +347,7 @@ ALL_OBJC_CFLAGS=$(ALL_CFLAGS) $(GNU_OBJC_CFLAGS)
344## be dumped as pure by dump-emacs. 347## be dumped as pure by dump-emacs.
345base_obj = dispnew.o frame.o scroll.o xdisp.o menu.o $(XMENU_OBJ) window.o \ 348base_obj = dispnew.o frame.o scroll.o xdisp.o menu.o $(XMENU_OBJ) window.o \
346 charset.o coding.o category.o ccl.o character.o chartab.o bidi.o \ 349 charset.o coding.o category.o ccl.o character.o chartab.o bidi.o \
347 cm.o term.o terminal.o xfaces.o $(XOBJ) $(GTK_OBJ) $(DBUS_OBJ) \ 350 $(CM_OBJ) term.o terminal.o xfaces.o $(XOBJ) $(GTK_OBJ) $(DBUS_OBJ) \
348 emacs.o keyboard.o macros.o keymap.o sysdep.o \ 351 emacs.o keyboard.o macros.o keymap.o sysdep.o \
349 buffer.o filelock.o insdel.o marker.o \ 352 buffer.o filelock.o insdel.o marker.o \
350 minibuf.o fileio.o dired.o \ 353 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)
4430} 4430}
4431 4431
4432int 4432int
4433utime (const char *name, struct _utimbuf *times) 4433utime (const char *name, struct utimbuf *times)
4434{ 4434{
4435 struct _utimbuf deftime; 4435 struct utimbuf deftime;
4436 HANDLE fh; 4436 HANDLE fh;
4437 FILETIME mtime; 4437 FILETIME mtime;
4438 FILETIME atime; 4438 FILETIME atime;