Index: Imakefile =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/Imakefile,v retrieving revision 1.21 diff -u -r1.21 Imakefile --- Imakefile 10 Nov 2004 01:46:23 -0000 1.21 +++ Imakefile 10 Nov 2004 11:33:57 -0000 @@ -1016,7 +1016,15 @@ XWINOBJS = $(XWINDDXDIR)/stubs.o $(XWINDDXDIR)/XWin.res XWINLIBS = PreFbLibs $(XWINLIB) FbPostFbLibs $(XWINLIB) $(XWINLAYERLIB) \ $(SHADOW) $(XWINPARSERLIB) $(ROOTLESSLIB) -XWINSYSLIBS = $(FONTLIBS) $(LDPRELIBS) $(XONLYLIB) $(SYSLIBS) -lgdi32 +#if BuildXWinMultiWindow || BuildXWinClipboard +XWINX11 = $(XONLYLIB) +#endif +#if defined(Win32Architecture) +XWINW32 = -lgdi32 -lwsock32 -lmsvcr70 +#else +XWINW32 = -lgdi32 +#endif +XWINSYSLIBS = $(FONTLIBS) $(LDPRELIBS) $(XWINX11) $(SYSLIBS) $(XWINW32) EXTRA_LDOPTIONS = -e _mainCRTStartup Index: os/access.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/os/access.c,v retrieving revision 1.6 diff -u -r1.6 access.c --- os/access.c 17 Oct 2004 10:46:14 -0000 1.6 +++ os/access.c 10 Nov 2004 11:33:58 -0000 @@ -531,7 +531,14 @@ int family; register HOST *host; +#ifndef WIN32 struct utsname name; +#else + struct { + char nodename[512]; + } name; +#endif + register struct hostent *hp; union { @@ -555,8 +562,12 @@ * see), whereas gethostname() kindly truncates it for me. */ #ifndef QNX4 +#ifndef WIN32 uname(&name); #else + gethostname(name.nodename, sizeof(name.nodename)); +#endif +#else /* QNX4's uname returns node number in name.nodename, not the hostname have to overwrite it */ char hname[1024]; Index: os/connection.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/os/connection.c,v retrieving revision 1.3 diff -u -r1.3 connection.c --- os/connection.c 17 Oct 2004 10:46:14 -0000 1.3 +++ os/connection.c 10 Nov 2004 11:33:58 -0000 @@ -202,6 +202,10 @@ * This is clearly boggus and another form of storage which doesn't use the fd * as a direct index should really be implemented for NT. */ +#undef MAXSOCKS +#define MAXSOCKS 500 +#undef MAXSELECT +#define MAXSELECT 500 #define MAXFD 500 #endif Index: os/log.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/os/log.c,v retrieving revision 1.3 diff -u -r1.3 log.c --- os/log.c 13 Aug 2004 19:51:34 -0000 1.3 +++ os/log.c 10 Nov 2004 11:33:58 -0000 @@ -89,6 +89,11 @@ #include "site.h" #include "opaque.h" +#ifdef WIN32 +#include +#define getpid(x) _getpid(x) +#endif + #ifdef DDXOSVERRORF void (*OsVendorVErrorFProc)(const char *, va_list args) = NULL; @@ -191,7 +196,9 @@ if (saveBuffer && bufferSize > 0) { fwrite(saveBuffer, bufferPos, 1, logFile); fflush(logFile); +#ifndef WIN32 fsync(fileno(logFile)); +#endif } } @@ -263,8 +270,10 @@ fwrite(tmpBuffer, len, 1, logFile); if (logFlush) { fflush(logFile); +#ifndef WIN32 if (logSync) fsync(fileno(logFile)); +#endif } } else if (needBuffer) { /* Index: os/osdep.h =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/os/osdep.h,v retrieving revision 1.2 diff -u -r1.2 osdep.h --- os/osdep.h 23 Apr 2004 19:54:28 -0000 1.2 +++ os/osdep.h 10 Nov 2004 11:33:58 -0000 @@ -260,6 +260,9 @@ extern WorkQueuePtr workQueue; /* added by raphael */ +#ifdef WIN32 +typedef long int fd_mask; +#endif #define ffs mffs extern int mffs(fd_mask); Index: os/utils.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/os/utils.c,v retrieving revision 1.9 diff -u -r1.9 utils.c --- os/utils.c 29 Sep 2004 04:17:44 -0000 1.9 +++ os/utils.c 10 Nov 2004 11:33:58 -0000 @@ -81,7 +81,9 @@ #undef _POSIX_SOURCE #endif #endif +#ifndef WIN32 #include +#endif #if !defined(SYSV) && !defined(WIN32) && !defined(Lynx) && !defined(QNX4) #include #endif @@ -1974,7 +1976,11 @@ /* Check args and env only if running setuid (euid == 0 && euid != uid) ? */ #ifndef CHECK_EUID +#ifndef WIN32 #define CHECK_EUID 1 +#else +#define CHECK_EUID 0 +#endif #endif /* Index: os/xdmcp.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/os/xdmcp.c,v retrieving revision 1.3 diff -u -r1.3 xdmcp.c --- os/xdmcp.c 20 Jul 2004 15:15:13 -0000 1.3 +++ os/xdmcp.c 10 Nov 2004 11:33:58 -0000 @@ -17,17 +17,7 @@ /* $XFree86: xc/programs/Xserver/os/xdmcp.c,v 3.31 2003/12/30 21:24:32 herrb Exp $ */ #ifdef WIN32 -/* avoid conflicting definitions */ -#define BOOL wBOOL -#define ATOM wATOM -#define FreeResource wFreeResource -#include -#undef BOOL -#undef ATOM -#undef FreeResource -#undef CreateWindowA -#undef RT_FONT -#undef RT_CURSOR +#include #endif #include "Xos.h" @@ -1548,7 +1538,9 @@ #ifdef XTHREADS_NEEDS_BYNAMEPARAMS _Xgethostbynameparams hparams; #endif - +#if defined(WIN32) && (defined(TCPCONN) || defined(DNETCONN)) + _XSERVTransWSAStartup(); +#endif if (!(hep = _XGethostbyname(namestr, hparams))) { FatalError("Xserver: %s unknown host: %s\n", argtype, namestr); Index: render/picture.h =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/render/picture.h,v retrieving revision 1.4 diff -u -r1.4 picture.h --- render/picture.h 6 Aug 2004 23:42:10 -0000 1.4 +++ render/picture.h 10 Nov 2004 11:33:58 -0000 @@ -165,7 +165,7 @@ /* Fixed point updates from Carl Worth, USC, Information Sciences Institute */ -#ifdef WIN32 +#if defined(WIN32) && !defined(__GNUC__) typedef __int64 xFixed_32_32; #else # if defined (_LP64) || \