aboutsummaryrefslogtreecommitdiffstats
path: root/src/s
diff options
context:
space:
mode:
authorEli Zaretskii <[email protected]>2011-11-05 18:30:13 +0200
committerEli Zaretskii <[email protected]>2011-11-05 18:30:13 +0200
commit3ad924ba1e1c949affba4c5832072e4c5c194202 (patch)
tree3a368eb232639819169998b9cb261685df4eb7fb /src/s
parenta06776b28ce0669aff5178c5950e134f6a5ed5bb (diff)
Fix MSVC build in lib-src.
src/s/ms-w32.h (fstat, stat, utime): Move redirections to "emacs"-only part. Fixes: debbugs:99690
Diffstat (limited to 'src/s')
-rw-r--r--src/s/ms-w32.h15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/s/ms-w32.h b/src/s/ms-w32.h
index 519f6e7bc6..fb0882860d 100644
--- a/src/s/ms-w32.h
+++ b/src/s/ms-w32.h
@@ -191,6 +191,11 @@ struct sigaction {
#include <sys/timeb.h>
#include <sys/stat.h>
#include <signal.h>
+
+/* MSVC gets link-time errors without these redirections. */
+#define fstat(a, b) sys_fstat(a, b)
+#define stat(a, b) sys_stat(a, b)
+#define utime sys_utime
#endif
/* Calls that are emulated or shadowed. */
@@ -279,18 +284,10 @@ typedef int pid_t;
#if !defined (_MSC_VER) || (_MSC_VER < 1400)
#define tzname _tzname
+#undef utime
#define utime _utime
#endif
-#ifdef _MSC_VER
-/* MSVC gets link-time errors without these redirections. */
-#define fstat(a, b) sys_fstat(a, b)
-#define stat(a, b) sys_stat(a, b)
-#if _MSC_VER >= 1400
-#define utime sys_utime
-#endif
-#endif
-
/* This is hacky, but is necessary to avoid warnings about macro
redefinitions using the SDK compilers. */
#ifndef __STDC__