aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2013-03-30 15:25:48 +0300
committerEli Zaretskii2013-03-30 15:25:48 +0300
commitfff1aa4e84d0568c0295711f58fa18028d100744 (patch)
tree8250209f86564f308efb6e8c1c6b0341e5196bac
parent8934438ad1d95a47ed772fae3261d64805c47289 (diff)
downloademacs-fff1aa4e84d0568c0295711f58fa18028d100744.tar.gz
emacs-fff1aa4e84d0568c0295711f58fa18028d100744.zip
Fixed compilation problems in lib/.
-rw-r--r--nt/inc/ms-w32.h21
-rw-r--r--nt/inc/sys/stat.h3
-rw-r--r--src/w32.c4
3 files changed, 19 insertions, 9 deletions
diff --git a/nt/inc/ms-w32.h b/nt/inc/ms-w32.h
index 39820bf2f08..9817cd78cad 100644
--- a/nt/inc/ms-w32.h
+++ b/nt/inc/ms-w32.h
@@ -133,6 +133,20 @@ typedef unsigned short mode_t;
133extern char *getenv (); 133extern char *getenv ();
134#endif 134#endif
135 135
136#ifdef __MINGW32__
137/* A kludge to avoid including header files in lib/. They cannot be
138 configured-out, and their stuff interferes with what we have
139 defined in this header and in other headers in nt/inc. Yuck! */
140#define __need_system_fcntl_h
141#define _GL_FCNTL_H
142#define _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
143#define _GL_ALREADY_INCLUDING_SIGNAL_H
144#define _GL_ALREADY_INCLUDING_STDIO_H
145#define __need_system_stdlib_h
146#define _GL_TIME_H
147#define __need_system_sys_stat_h
148#endif
149
136/* Prevent accidental use of features unavailable in older Windows 150/* Prevent accidental use of features unavailable in older Windows
137 versions we still support. MinGW64 defines this to a higher value 151 versions we still support. MinGW64 defines this to a higher value
138 in its system headers, and is not really compatible with values 152 in its system headers, and is not really compatible with values
@@ -276,9 +290,6 @@ typedef int pid_t;
276#define popen _popen 290#define popen _popen
277#define pclose _pclose 291#define pclose _pclose
278#define umask _umask 292#define umask _umask
279#ifndef _MSC_VER
280#define utimbuf _utimbuf
281#endif
282#define strdup _strdup 293#define strdup _strdup
283#define strupr _strupr 294#define strupr _strupr
284#define strnicmp _strnicmp 295#define strnicmp _strnicmp
@@ -295,10 +306,6 @@ int _getpid (void);
295 array, and triggers an error message. */ 306 array, and triggers an error message. */
296#include <time.h> 307#include <time.h>
297#define tzname _tzname 308#define tzname _tzname
298#if !defined (_MSC_VER) || (_MSC_VER < 1400)
299#undef utime
300#define utime _utime
301#endif
302 309
303/* 'struct timespec' is used by time-related functions in lib/ and 310/* 'struct timespec' is used by time-related functions in lib/ and
304 elsewhere, but we don't use lib/time.h where the structure is 311 elsewhere, but we don't use lib/time.h where the structure is
diff --git a/nt/inc/sys/stat.h b/nt/inc/sys/stat.h
index f6785c56477..857acce1815 100644
--- a/nt/inc/sys/stat.h
+++ b/nt/inc/sys/stat.h
@@ -83,6 +83,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
83#define S_TYPEISSHM(p) 0 83#define S_TYPEISSHM(p) 0
84#define S_TYPEISTMO(p) 0 84#define S_TYPEISTMO(p) 0
85 85
86#define UTIME_NOW (-1)
87#define UTIME_OMIT (-2)
88
86struct stat { 89struct stat {
87 unsigned __int64 st_ino; /* ino_t in sys/types.h is too narrow */ 90 unsigned __int64 st_ino; /* ino_t in sys/types.h is too narrow */
88 dev_t st_dev; 91 dev_t st_dev;
diff --git a/src/w32.c b/src/w32.c
index 0fa5970124a..fb069c36673 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;