diff options
| author | Eli Zaretskii | 2011-11-05 18:30:13 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2011-11-05 18:30:13 +0200 |
| commit | 3ad924ba1e1c949affba4c5832072e4c5c194202 (patch) | |
| tree | 3a368eb232639819169998b9cb261685df4eb7fb /src/s | |
| parent | a06776b28ce0669aff5178c5950e134f6a5ed5bb (diff) | |
| download | emacs-3ad924ba1e1c949affba4c5832072e4c5c194202.tar.gz emacs-3ad924ba1e1c949affba4c5832072e4c5c194202.zip | |
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.h | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/s/ms-w32.h b/src/s/ms-w32.h index 519f6e7bc63..fb0882860d1 100644 --- a/src/s/ms-w32.h +++ b/src/s/ms-w32.h | |||
| @@ -191,6 +191,11 @@ struct sigaction { | |||
| 191 | #include <sys/timeb.h> | 191 | #include <sys/timeb.h> |
| 192 | #include <sys/stat.h> | 192 | #include <sys/stat.h> |
| 193 | #include <signal.h> | 193 | #include <signal.h> |
| 194 | |||
| 195 | /* MSVC gets link-time errors without these redirections. */ | ||
| 196 | #define fstat(a, b) sys_fstat(a, b) | ||
| 197 | #define stat(a, b) sys_stat(a, b) | ||
| 198 | #define utime sys_utime | ||
| 194 | #endif | 199 | #endif |
| 195 | 200 | ||
| 196 | /* Calls that are emulated or shadowed. */ | 201 | /* Calls that are emulated or shadowed. */ |
| @@ -279,18 +284,10 @@ typedef int pid_t; | |||
| 279 | 284 | ||
| 280 | #if !defined (_MSC_VER) || (_MSC_VER < 1400) | 285 | #if !defined (_MSC_VER) || (_MSC_VER < 1400) |
| 281 | #define tzname _tzname | 286 | #define tzname _tzname |
| 287 | #undef utime | ||
| 282 | #define utime _utime | 288 | #define utime _utime |
| 283 | #endif | 289 | #endif |
| 284 | 290 | ||
| 285 | #ifdef _MSC_VER | ||
| 286 | /* MSVC gets link-time errors without these redirections. */ | ||
| 287 | #define fstat(a, b) sys_fstat(a, b) | ||
| 288 | #define stat(a, b) sys_stat(a, b) | ||
| 289 | #if _MSC_VER >= 1400 | ||
| 290 | #define utime sys_utime | ||
| 291 | #endif | ||
| 292 | #endif | ||
| 293 | |||
| 294 | /* This is hacky, but is necessary to avoid warnings about macro | 291 | /* This is hacky, but is necessary to avoid warnings about macro |
| 295 | redefinitions using the SDK compilers. */ | 292 | redefinitions using the SDK compilers. */ |
| 296 | #ifndef __STDC__ | 293 | #ifndef __STDC__ |