diff options
author | Jon Turney <jon.turney@dronecode.org.uk> | 2016-02-03 23:40:07 +0000 |
---|---|---|
committer | Jon Turney <jon.turney@dronecode.org.uk> | 2016-02-18 14:29:05 +0000 |
commit | efd9f2c5a6899d2fdec2de76a2f56eacd54f6d4f (patch) | |
tree | b7d54db8e6e9c8e096ce4eb26e0dfd471c57c555 | |
parent | f7696d429d2d010015c174c9fe2d400b216566ca (diff) |
Ensure WIN32 check triggers on MinGW only and not Cygwin.
Since the current Cygwin w32api headers define WIN32, make sure we only use
WIN32 guarded code when not compiling for Cygwin.
fd_mask doesn't get defined as a type which conflicts with select.h's definition
of it.
XXX: should do a full audit of uses of WIN32 and make sure they are correct.
XXX: perhaps test should be in a positive form, e.g. __MINGW__ || _MSC_VER
rather than WIN32 && !__CYGWIN__
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
-rw-r--r-- | os/osdep.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/os/osdep.h b/os/osdep.h index 86263a53e..ff609436e 100644 --- a/os/osdep.h +++ b/os/osdep.h @@ -72,7 +72,7 @@ SOFTWARE. #if defined(NOFILE) && !defined(NOFILES_MAX) #define OPEN_MAX NOFILE #else -#if !defined(WIN32) +#if !defined(WIN32) || defined(__CYGWIN__) #define OPEN_MAX NOFILES_MAX #else #define OPEN_MAX 512 @@ -171,7 +171,7 @@ extern fd_set ClientsWriteBlocked; extern fd_set OutputPending; extern fd_set IgnoredClientsWithInput; -#ifndef WIN32 +#if !defined(WIN32) || defined(__CYGWIN__) extern int *ConnectionTranslation; #else extern int GetConnectionTranslation(int conn); @@ -185,7 +185,7 @@ extern Bool AnyClientsWriteBlocked; extern WorkQueuePtr workQueue; /* in WaitFor.c */ -#ifdef WIN32 +#if defined(WIN32) && !defined(__CYGWIN__) typedef long int fd_mask; #endif #define ffs mffs |