diff options
Diffstat (limited to 'X11/xtrans')
-rw-r--r-- | X11/xtrans/Xtrans.c | 10 | ||||
-rw-r--r-- | X11/xtrans/Xtranssock.c | 4 | ||||
-rw-r--r-- | X11/xtrans/Xtransutil.c | 4 |
3 files changed, 13 insertions, 5 deletions
diff --git a/X11/xtrans/Xtrans.c b/X11/xtrans/Xtrans.c index 278651a26..fbe7494f5 100644 --- a/X11/xtrans/Xtrans.c +++ b/X11/xtrans/Xtrans.c @@ -49,6 +49,9 @@ from The Open Group. #include <ctype.h> +#ifdef _MSC_VER +#include <X11\Xwinsock.h> +#endif /* * The transport table contains a definition for every transport (protocol) * family. All operations that can be made on the transport go through this @@ -115,9 +118,10 @@ Xtransport_table Xtransports[] = { { &TRANS(SCOFuncs), TRANS_LOCAL_SCO_INDEX }, #endif /* sun */ #endif /* LOCALCONN */ + { NULL, 0} }; -#define NUMTRANS (sizeof(Xtransports)/sizeof(Xtransport_table)) +#define NUMTRANS (sizeof(Xtransports)/sizeof(Xtransport_table)-1) #ifdef WIN32 @@ -728,7 +732,7 @@ TRANS(SetOption) (XtransConnInfo ciptr, int option, int arg) #if defined(WIN32) { #ifdef WIN32 - u_long arg; + unsigned long arg; #else int arg; #endif @@ -953,7 +957,7 @@ int TRANS(IsLocal) (XtransConnInfo ciptr) { - return (ciptr->family == AF_UNIX); + return (ciptr->family == AF_UNIX); } diff --git a/X11/xtrans/Xtranssock.c b/X11/xtrans/Xtranssock.c index ad3e11605..1d11ab011 100644 --- a/X11/xtrans/Xtranssock.c +++ b/X11/xtrans/Xtranssock.c @@ -221,7 +221,11 @@ static int TRANS(SocketINETClose) (XtransConnInfo ciptr); #endif #if defined HAVE_SOCKLEN_T || (defined(IPv6) && defined(AF_INET6)) +#ifdef _MSC_VER +# define SOCKLEN_T int +#else # define SOCKLEN_T socklen_t +#endif #elif defined(SVR4) || defined(__SCO__) # define SOCKLEN_T size_t #else diff --git a/X11/xtrans/Xtransutil.c b/X11/xtrans/Xtransutil.c index 0f7c7b2a5..a0c45dc89 100644 --- a/X11/xtrans/Xtransutil.c +++ b/X11/xtrans/Xtransutil.c @@ -484,7 +484,7 @@ trans_mkdir(char *path, int mode) } /* Dir doesn't exist. Try to create it */ -#ifndef WIN32 +#if !defined(WIN32) && !defined(__CYGWIN__) /* * 'sticky' bit requested: assume application makes * certain security implications. If effective user ID @@ -609,7 +609,7 @@ trans_mkdir(char *path, int mode) return -1; } #endif -#ifndef __APPLE_CC__ +#if !defined(__APPLE_CC__) && !defined(__CYGWIN__) PRMSG(1, "mkdir: Owner of %s should be set to root\n", path, 0, 0); #endif |