diff options
| author | Joakim Verona | 2011-11-07 10:03:00 +0100 |
|---|---|---|
| committer | Joakim Verona | 2011-11-07 10:03:00 +0100 |
| commit | c649990b73768c7a024e111d8c63246030647b53 (patch) | |
| tree | e5b47169dfc679b53fed30bbd66e2df98de2f02c /src/s | |
| parent | c823c667cd00b9d8036ce06b943f58f3f4efd7d9 (diff) | |
| parent | ca78dc431fff3bc2a4f33f2a0fc1449608568d23 (diff) | |
| download | emacs-c649990b73768c7a024e111d8c63246030647b53.tar.gz emacs-c649990b73768c7a024e111d8c63246030647b53.zip | |
upstream
Diffstat (limited to 'src/s')
| -rw-r--r-- | src/s/ms-w32.h | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/src/s/ms-w32.h b/src/s/ms-w32.h index 813c3cef115..fb0882860d1 100644 --- a/src/s/ms-w32.h +++ b/src/s/ms-w32.h | |||
| @@ -86,6 +86,12 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 86 | #define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_) || IS_DEVICE_SEP (_c_)) | 86 | #define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_) || IS_DEVICE_SEP (_c_)) |
| 87 | 87 | ||
| 88 | #include <sys/types.h> | 88 | #include <sys/types.h> |
| 89 | |||
| 90 | #ifdef _MSC_VER | ||
| 91 | typedef unsigned long sigset_t; | ||
| 92 | typedef int ssize_t; | ||
| 93 | #endif | ||
| 94 | |||
| 89 | struct sigaction { | 95 | struct sigaction { |
| 90 | int sa_flags; | 96 | int sa_flags; |
| 91 | void (*sa_handler)(int); | 97 | void (*sa_handler)(int); |
| @@ -181,6 +187,17 @@ struct sigaction { | |||
| 181 | 187 | ||
| 182 | #ifdef emacs | 188 | #ifdef emacs |
| 183 | 189 | ||
| 190 | #ifdef _MSC_VER | ||
| 191 | #include <sys/timeb.h> | ||
| 192 | #include <sys/stat.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 | ||
| 199 | #endif | ||
| 200 | |||
| 184 | /* Calls that are emulated or shadowed. */ | 201 | /* Calls that are emulated or shadowed. */ |
| 185 | #undef access | 202 | #undef access |
| 186 | #define access sys_access | 203 | #define access sys_access |
| @@ -267,6 +284,7 @@ typedef int pid_t; | |||
| 267 | 284 | ||
| 268 | #if !defined (_MSC_VER) || (_MSC_VER < 1400) | 285 | #if !defined (_MSC_VER) || (_MSC_VER < 1400) |
| 269 | #define tzname _tzname | 286 | #define tzname _tzname |
| 287 | #undef utime | ||
| 270 | #define utime _utime | 288 | #define utime _utime |
| 271 | #endif | 289 | #endif |
| 272 | 290 | ||
| @@ -317,13 +335,17 @@ extern char *get_emacs_configuration_options (void); | |||
| 317 | #define _WINSOCK_H | 335 | #define _WINSOCK_H |
| 318 | 336 | ||
| 319 | /* Defines size_t and alloca (). */ | 337 | /* Defines size_t and alloca (). */ |
| 320 | #ifdef USE_CRT_DLL | 338 | #if (defined(_MSC_VER) && defined(emacs)) || defined(USE_CRT_DLL) |
| 321 | #define malloc e_malloc | 339 | #define malloc e_malloc |
| 322 | #define free e_free | 340 | #define free e_free |
| 323 | #define realloc e_realloc | 341 | #define realloc e_realloc |
| 324 | #define calloc e_calloc | 342 | #define calloc e_calloc |
| 325 | #endif | 343 | #endif |
| 344 | #ifdef _MSC_VER | ||
| 345 | #define alloca _alloca | ||
| 346 | #else | ||
| 326 | #include <malloc.h> | 347 | #include <malloc.h> |
| 348 | #endif | ||
| 327 | 349 | ||
| 328 | #include <sys/stat.h> | 350 | #include <sys/stat.h> |
| 329 | 351 | ||