X-Git-Url: http://git.hcoop.net/bpt/emacs.git/blobdiff_plain/eef5ce6ecc1207beb0fcd6c87647249e354831c4..a6fc3b5c539c0a35e4447a12cc395294952d7561:/src/s/ms-w32.h diff --git a/src/s/ms-w32.h b/src/s/ms-w32.h index 8b189baea4..519f6e7bc6 100644 --- a/src/s/ms-w32.h +++ b/src/s/ms-w32.h @@ -86,6 +86,12 @@ along with GNU Emacs. If not, see . */ #define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_) || IS_DEVICE_SEP (_c_)) #include + +#ifdef _MSC_VER +typedef unsigned long sigset_t; +typedef int ssize_t; +#endif + struct sigaction { int sa_flags; void (*sa_handler)(int); @@ -111,11 +117,7 @@ struct sigaction { #undef HAVE_UTIME_H #undef HAVE_LINUX_VERSION_H #undef HAVE_SYS_SYSTEMINFO_H -#define HAVE_LIMITS_H 1 -#define HAVE_STRING_H 1 -#define HAVE_STDLIB_H 1 #define HAVE_PWD_H 1 -#define STDC_HEADERS 1 #define TIME_WITH_SYS_TIME 1 #define HAVE_GETTIMEOFDAY 1 @@ -185,6 +187,12 @@ struct sigaction { #ifdef emacs +#ifdef _MSC_VER +#include +#include +#include +#endif + /* Calls that are emulated or shadowed. */ #undef access #define access sys_access @@ -204,6 +212,7 @@ struct sigaction { #define dup2 sys_dup2 #define fopen sys_fopen #define link sys_link +#define localtime sys_localtime #define mkdir sys_mkdir #undef mktemp #define mktemp sys_mktemp @@ -273,6 +282,15 @@ typedef int pid_t; #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__ @@ -320,13 +338,17 @@ extern char *get_emacs_configuration_options (void); #define _WINSOCK_H /* Defines size_t and alloca (). */ -#ifdef USE_CRT_DLL +#if (defined(_MSC_VER) && defined(emacs)) || defined(USE_CRT_DLL) #define malloc e_malloc #define free e_free #define realloc e_realloc #define calloc e_calloc #endif +#ifdef _MSC_VER +#define alloca _alloca +#else #include +#endif #include @@ -385,4 +407,3 @@ extern void _DebPrint (const char *fmt, ...); /* ============================================================ */ -