diff --git a/Core/GameEngine/Include/GameNetwork/udp.h b/Core/GameEngine/Include/GameNetwork/udp.h index fa97d0e130..38ae9d3d1f 100644 --- a/Core/GameEngine/Include/GameNetwork/udp.h +++ b/Core/GameEngine/Include/GameNetwork/udp.h @@ -28,7 +28,7 @@ #include #endif -#ifdef _WINDOWS +#ifdef _WIN32 #include #include //#define close _close diff --git a/Core/GameEngine/Source/GameNetwork/udp.cpp b/Core/GameEngine/Source/GameNetwork/udp.cpp index e7d8c3744f..fd21c6e066 100644 --- a/Core/GameEngine/Source/GameNetwork/udp.cpp +++ b/Core/GameEngine/Source/GameNetwork/udp.cpp @@ -154,7 +154,7 @@ Int UDP::Bind(UnsignedInt IP,UnsignedShort Port) addr.sin_port=Port; addr.sin_addr.s_addr=IP; fd=socket(AF_INET,SOCK_DGRAM,DEFAULT_PROTOCOL); - #ifdef _WINDOWS + #ifdef _WIN32 if (fd==SOCKET_ERROR) fd=-1; #endif @@ -163,7 +163,7 @@ Int UDP::Bind(UnsignedInt IP,UnsignedShort Port) retval=bind(fd,(struct sockaddr *)&addr,sizeof(addr)); - #ifdef _WINDOWS + #ifdef _WIN32 if (retval==SOCKET_ERROR) { retval=-1; @@ -201,7 +201,7 @@ Int UDP::getLocalAddr(UnsignedInt &ip, UnsignedShort &port) // private function Int UDP::SetBlocking(Int block) { - #ifdef _WINDOWS + #ifdef _WIN32 unsigned long flag=1; if (block) flag=0; @@ -244,7 +244,7 @@ Int UDP::Write(const unsigned char *msg,UnsignedInt len,UnsignedInt IP,UnsignedS ClearStatus(); retval=sendto(fd,(const char *)msg,len,0,(struct sockaddr *)&to,sizeof(to)); - #ifdef _WINDOWS + #ifdef _WIN32 if (retval==SOCKET_ERROR) { retval=-1; @@ -267,7 +267,7 @@ Int UDP::Read(unsigned char *msg,UnsignedInt len,sockaddr_in *from) if (from!=NULL) { retval=recvfrom(fd,(char *)msg,len,0,(struct sockaddr *)from,&alen); - #ifdef _WINDOWS + #ifdef _WIN32 if (retval == SOCKET_ERROR) { if (WSAGetLastError() != WSAEWOULDBLOCK) @@ -288,7 +288,7 @@ Int UDP::Read(unsigned char *msg,UnsignedInt len,sockaddr_in *from) else { retval=recvfrom(fd,(char *)msg,len,0,NULL,NULL); - #ifdef _WINDOWS + #ifdef _WIN32 if (retval==SOCKET_ERROR) { if (WSAGetLastError() != WSAEWOULDBLOCK) @@ -312,7 +312,7 @@ Int UDP::Read(unsigned char *msg,UnsignedInt len,sockaddr_in *from) void UDP::ClearStatus(void) { - #ifndef _WINDOWS + #ifndef _WIN32 errno=0; #endif @@ -322,7 +322,7 @@ void UDP::ClearStatus(void) UDP::sockStat UDP::GetStatus(void) { Int status = m_lastError; - #ifdef _WINDOWS + #ifdef _WIN32 //int status=WSAGetLastError(); switch (status) { case NO_ERROR: diff --git a/Core/Libraries/Source/WWVegas/WWLib/ini.cpp b/Core/Libraries/Source/WWVegas/WWLib/ini.cpp index db08a4d6c4..fa264d0782 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/ini.cpp +++ b/Core/Libraries/Source/WWVegas/WWLib/ini.cpp @@ -2285,7 +2285,7 @@ void INIClass::DuplicateCRCError(const char *message, const char *section, const assert(0); #ifdef RTS_RELEASE -#ifdef _WINDOWS +#ifdef _WIN32 MessageBox(0, buffer, "Duplicate CRC in INI file.", MB_ICONSTOP | MB_OK); #endif #endif diff --git a/Core/Tools/WW3D/pluglib/win.h b/Core/Tools/WW3D/pluglib/win.h index 009b4e7412..ecd1c7a64d 100644 --- a/Core/Tools/WW3D/pluglib/win.h +++ b/Core/Tools/WW3D/pluglib/win.h @@ -65,7 +65,7 @@ #pragma warning(pop) #endif -#ifdef _WINDOWS +#ifdef _WIN32 extern HINSTANCE ProgramInstance; extern HWND MainWindow; extern bool GameInFocus; @@ -80,6 +80,6 @@ void __cdecl Print_Win32Error(unsigned long win32Error); #endif // RTS_DEBUG -#else // _WINDOWS +#else // _WIN32 #include -#endif // _WINDOWS +#endif // _WIN32 diff --git a/Core/Tools/mangler/crc.cpp b/Core/Tools/mangler/crc.cpp index 1a447ba5e2..c5e03e9115 100644 --- a/Core/Tools/mangler/crc.cpp +++ b/Core/Tools/mangler/crc.cpp @@ -18,7 +18,7 @@ #include -#ifdef _WINDOWS +#ifdef _WIN32 #include // *MUST* be included before ANY Wnet/Wlib headers if _REENTRANT is defined #endif diff --git a/Core/Tools/mangler/mangler.cpp b/Core/Tools/mangler/mangler.cpp index 13efa1998e..5f758520f2 100644 --- a/Core/Tools/mangler/mangler.cpp +++ b/Core/Tools/mangler/mangler.cpp @@ -20,7 +20,7 @@ #include #include -#ifdef _WINDOWS +#ifdef _WIN32 #include // *MUST* be included before ANY Wnet/Wlib headers if _REENTRANT is defined #endif @@ -97,7 +97,7 @@ int main(int argc, char **argv) // ----- Initialize Winsock ----- -#ifdef _WINDOWS +#ifdef _WIN32 WORD verReq = MAKEWORD(2, 2); WSADATA wsadata; diff --git a/Core/Tools/mangler/manglertest.cpp b/Core/Tools/mangler/manglertest.cpp index 49eb731686..033359a3d1 100644 --- a/Core/Tools/mangler/manglertest.cpp +++ b/Core/Tools/mangler/manglertest.cpp @@ -20,7 +20,7 @@ #include #include -#ifdef _WINDOWS +#ifdef _WIN32 #include // *MUST* be included before ANY Wnet/Wlib headers if _REENTRANT is defined #endif @@ -128,7 +128,7 @@ int main(int argc, char **argv) // ----- Initialize Winsock ----- -#ifdef _WINDOWS +#ifdef _WIN32 WORD verReq = MAKEWORD(2, 2); WSADATA wsadata; diff --git a/Core/Tools/mangler/wlib/sem4.cpp b/Core/Tools/mangler/wlib/sem4.cpp index 1f954cb7d0..e11b95a362 100644 --- a/Core/Tools/mangler/wlib/sem4.cpp +++ b/Core/Tools/mangler/wlib/sem4.cpp @@ -31,7 +31,7 @@ This is useful because the constructor will automatically call sem_init Sem4::Sem4() { -#ifndef _WINDOWS +#ifndef _WIN32 sem_init(&sem,1,1); #else sem = CreateSemaphore(NULL, 1, 1, NULL); @@ -40,7 +40,7 @@ Sem4::Sem4() Sem4::Sem4(uint32 value) { -#ifndef _WINDOWS +#ifndef _WIN32 sem_init(&sem,1,value); #else sem = CreateSemaphore(NULL, value, value, NULL); @@ -49,7 +49,7 @@ Sem4::Sem4(uint32 value) Sem4::~Sem4() { -#ifndef _WINDOWS +#ifndef _WIN32 sem_destroy(&sem); #else if (sem) CloseHandle(sem); @@ -58,7 +58,7 @@ Sem4::~Sem4() sint32 Sem4::Wait(void) const { -#ifndef _WINDOWS +#ifndef _WIN32 return(sem_wait((sem_t *)&sem)); #else if (!sem) @@ -79,7 +79,7 @@ sint32 Sem4::Wait(void) const sint32 Sem4::Post(void) const { -#ifndef _WINDOWS +#ifndef _WIN32 return(sem_post((sem_t *)&sem)); #else if (!sem) @@ -92,7 +92,7 @@ sint32 Sem4::Post(void) const sint32 Sem4::TryWait(void) const { -#ifndef _WINDOWS +#ifndef _WIN32 return(sem_trywait((sem_t *)&sem)); #else if (!sem) @@ -112,7 +112,7 @@ sint32 Sem4::TryWait(void) const sint32 Sem4::GetValue(int *sval) const { -#ifndef _WINDOWS +#ifndef _WIN32 return(sem_getvalue((sem_t *)&sem,sval)); #else if (!sem) @@ -128,7 +128,7 @@ sint32 Sem4::GetValue(int *sval) const sint32 Sem4::Destroy(void) { -#ifndef _WINDOWS +#ifndef _WIN32 return(sem_destroy(&sem)); #else return CloseHandle(sem); diff --git a/Core/Tools/mangler/wlib/sem4.h b/Core/Tools/mangler/wlib/sem4.h index 175663dea1..303fb1e238 100644 --- a/Core/Tools/mangler/wlib/sem4.h +++ b/Core/Tools/mangler/wlib/sem4.h @@ -19,17 +19,17 @@ #pragma once #include -#ifndef _WINDOWS +#ifndef _WIN32 #include #endif #include "wstypes.h" #ifdef _REENTRANT -#ifndef _WINDOWS +#ifndef _WIN32 #include #else #include -#endif // _WINDOWS +#endif // _WIN32 #endif // _REENTRANT // Windows headers have a tendency to redefine IN @@ -42,7 +42,7 @@ class Sem4 { private: #ifdef _REENTRANT -#ifndef _WINDOWS +#ifndef _WIN32 sem_t sem; #else HANDLE sem; diff --git a/Core/Tools/mangler/wlib/syslogd.cpp b/Core/Tools/mangler/wlib/syslogd.cpp index aca18655b2..4107335c7e 100644 --- a/Core/Tools/mangler/wlib/syslogd.cpp +++ b/Core/Tools/mangler/wlib/syslogd.cpp @@ -20,7 +20,7 @@ SyslogD::SyslogD(char *ident,int logopt,int facility,int _priority) { -#ifndef _WINDOWS +#ifndef _WIN32 openlog(ident,logopt,facility); priority=_priority; #endif @@ -28,7 +28,7 @@ SyslogD::SyslogD(char *ident,int logopt,int facility,int _priority) int SyslogD::print(const char *str, int len) { -#ifndef _WINDOWS +#ifndef _WIN32 char *temp_str=new char[len+1]; memset(temp_str,0,len+1); strncpy(temp_str,str,len); diff --git a/Core/Tools/mangler/wlib/syslogd.h b/Core/Tools/mangler/wlib/syslogd.h index 5cf2c7bf0a..74b25d313f 100644 --- a/Core/Tools/mangler/wlib/syslogd.h +++ b/Core/Tools/mangler/wlib/syslogd.h @@ -20,7 +20,7 @@ #include #include -#ifndef _WINDOWS +#ifndef _WIN32 #include #endif #include diff --git a/Core/Tools/mangler/wlib/timezone.cpp b/Core/Tools/mangler/wlib/timezone.cpp index 34f558b072..b43235f475 100644 --- a/Core/Tools/mangler/wlib/timezone.cpp +++ b/Core/Tools/mangler/wlib/timezone.cpp @@ -22,7 +22,7 @@ void GetTimezoneInfo(const char * &timezone_str, int &timezone_offset) { timezone_str = "Unknown Timezone"; timezone_offset = 0; -#ifdef _WINDOWS +#ifdef _WIN32 struct _timeb wintime; _ftime(&wintime); @@ -37,7 +37,7 @@ void GetTimezoneInfo(const char * &timezone_str, int &timezone_offset) { timezone_offset = wintime.timezone * 60; // its in minutes... #endif -#ifndef _WINDOWS +#ifndef _WIN32 struct timeval unixtime; struct timezone unixtzone; gettimeofday(&unixtime,&unixtzone); diff --git a/Core/Tools/mangler/wlib/wdebug.h b/Core/Tools/mangler/wlib/wdebug.h index ef7e6e922d..e16319f4da 100644 --- a/Core/Tools/mangler/wlib/wdebug.h +++ b/Core/Tools/mangler/wlib/wdebug.h @@ -59,7 +59,7 @@ will you be ready to leave grasshopper. #include #include -#if !defined(_WINDOWS) +#if !defined(_WIN32) // Windows headers have a tendency to redefine IN #ifdef IN #undef IN @@ -183,7 +183,7 @@ extern CritSec DebugLibSemaphore; #define DBG(X) X // In Windows, send a copy to the debugger window -#ifdef _WINDOWS +#ifdef _WIN32 // Print a variable #define PVAR(v) \ @@ -239,7 +239,7 @@ extern CritSec DebugLibSemaphore; DEBUGUNLOCK; \ } -#else // _WINDOWS +#else // _WIN32 // Print a variable #define PVAR(v) \ @@ -279,7 +279,7 @@ extern CritSec DebugLibSemaphore; "]: " << ##X << endl; X \ DEBUGUNLOCK; \ } -#endif // _WINDOWS +#endif // _WIN32 #endif // DEBUG diff --git a/Core/Tools/mangler/wlib/wstypes.h b/Core/Tools/mangler/wlib/wstypes.h index 8ac37ead63..c13ef1fa3c 100644 --- a/Core/Tools/mangler/wlib/wstypes.h +++ b/Core/Tools/mangler/wlib/wstypes.h @@ -35,7 +35,7 @@ Standard type definitions for the sake of portability and readability. // threadsafe.h otherwise they won't compile #include -#ifndef _WINDOWS +#ifndef _WIN32 #define _POSIX_C_SOURCE 199506L #define _POSIX_PTHREAD_SEMANTICS #define __EXTENSIONS__ @@ -43,7 +43,7 @@ Standard type definitions for the sake of portability and readability. #include #include #include -#ifndef _WINDOWS +#ifndef _WIN32 #include #include #include @@ -109,7 +109,7 @@ typedef double float64; #define MAX_SINT16 0x7FFF #define MAX_SINT8 0x7F -#ifdef _WINDOWS +#ifdef _WIN32 #define strncasecmp _strnicmp #define strcasecmp _stricmp #endif diff --git a/Core/Tools/mangler/wlib/wtime.cpp b/Core/Tools/mangler/wlib/wtime.cpp index 9351d3c0cf..3a3e84ea2f 100644 --- a/Core/Tools/mangler/wlib/wtime.cpp +++ b/Core/Tools/mangler/wlib/wtime.cpp @@ -35,7 +35,7 @@ static const char *FULLMONTHS[]={"January","February","March","April","May","Jun "July","August","September","October","November","December"}; // MDC: Windows doesn't provide a localtime_r, so make our own... -#ifdef _WINDOWS +#ifdef _WIN32 #ifdef _REENTRANT #include "critsec.h" static CritSec localtime_critsec; @@ -54,7 +54,7 @@ static struct tm *localtime_r(const time_t *clockval, struct tm *res) { #endif return res; } -#endif // _WINDOWS +#endif // _WIN32 Wtime::Wtime(void) { @@ -82,13 +82,13 @@ Wtime::~Wtime() void Wtime::Update(void) { sign=POSITIVE; - #ifdef _WINDOWS + #ifdef _WIN32 struct _timeb wintime; _ftime(&wintime); sec=wintime.time; usec=(wintime.millitm)*1000; #endif - #ifndef _WINDOWS + #ifndef _WIN32 struct timeval unixtime; struct timezone unixtzone; gettimeofday(&unixtime,&unixtzone); diff --git a/Core/Tools/mangler/wlib/wtime.h b/Core/Tools/mangler/wlib/wtime.h index d76259ce68..e969217da0 100644 --- a/Core/Tools/mangler/wlib/wtime.h +++ b/Core/Tools/mangler/wlib/wtime.h @@ -28,7 +28,7 @@ wtime Neal Kettler #include #include -#ifndef _WINDOWS +#ifndef _WIN32 #include #include #include diff --git a/Core/Tools/mangler/wlib/xtime.cpp b/Core/Tools/mangler/wlib/xtime.cpp index 00bc596899..08b05653b2 100644 --- a/Core/Tools/mangler/wlib/xtime.cpp +++ b/Core/Tools/mangler/wlib/xtime.cpp @@ -29,7 +29,7 @@ long long after you'll be dead. #include #include -#ifndef _WINDOWS +#ifndef _WIN32 #include #endif #include "xtime.h" @@ -286,13 +286,13 @@ void Xtime::update(void) day_=719528; // day_s from year 0 to Jan1, 1970 msec_=0; - #ifdef _WINDOWS + #ifdef _WIN32 struct _timeb wintime; _ftime(&wintime); addSeconds(wintime.time); msec_+=wintime.millitm; #endif - #ifndef _WINDOWS + #ifndef _WIN32 struct timeval unixtime; struct timezone unixtzone; gettimeofday(&unixtime,&unixtzone); diff --git a/Core/Tools/mangler/wlib/xtime.h b/Core/Tools/mangler/wlib/xtime.h index 8c66f80b0f..c79e4c9f43 100644 --- a/Core/Tools/mangler/wlib/xtime.h +++ b/Core/Tools/mangler/wlib/xtime.h @@ -36,7 +36,7 @@ function :-) #include #include -#ifndef _WINDOWS +#ifndef _WIN32 #include #include #include diff --git a/Core/Tools/mangler/wnet/field.cpp b/Core/Tools/mangler/wnet/field.cpp index c80f4f029d..699b52507c 100644 --- a/Core/Tools/mangler/wnet/field.cpp +++ b/Core/Tools/mangler/wnet/field.cpp @@ -34,7 +34,7 @@ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include #include -#ifndef _WINDOWS +#ifndef _WIN32 #include #else #define Win32_Winsock diff --git a/Core/Tools/mangler/wnet/packet.cpp b/Core/Tools/mangler/wnet/packet.cpp index bc3ef2d8e8..8cda4f64b0 100644 --- a/Core/Tools/mangler/wnet/packet.cpp +++ b/Core/Tools/mangler/wnet/packet.cpp @@ -39,7 +39,7 @@ #include #include #include -#ifndef _WINDOWS +#ifndef _WIN32 #include #else #define Win32_Winsock diff --git a/Core/Tools/mangler/wnet/tcp.cpp b/Core/Tools/mangler/wnet/tcp.cpp index 9dd0b93bd9..66ea079c7a 100644 --- a/Core/Tools/mangler/wnet/tcp.cpp +++ b/Core/Tools/mangler/wnet/tcp.cpp @@ -99,7 +99,7 @@ while (1) #include "tcp.h" #include -#ifndef _WINDOWS +#ifndef _WIN32 #include #define closesocket close #endif @@ -170,7 +170,7 @@ sint32 TCP::SetBlocking(bit8 block,sint32 whichFD) if (whichFD==0) whichFD=fd; - #ifdef _WINDOWS + #ifdef _WIN32 unsigned long flag=1; if (block) flag=0; @@ -219,7 +219,7 @@ sint32 TCP::Write(const uint8 *msg,uint32 len,sint32 whichFD) } SetBlocking(TRUE,whichFD); retval=send(whichFD,(const char *)msg,len,0); - #ifdef _WINDOWS + #ifdef _WIN32 if (retval==SOCKET_ERROR) retval=-1; #endif @@ -241,7 +241,7 @@ sint32 TCP::WriteNB(uint8 *msg,uint32 len,sint32 whichFD) whichFD=fd; } retval=send(whichFD,(const char *)msg,len,0); - #ifdef _WINDOWS + #ifdef _WIN32 if (retval==SOCKET_ERROR) retval=-1; #endif @@ -942,7 +942,7 @@ bit8 TCP::Bind(uint32 IP,uint16 Port,bit8 reuseAddr) } retval=bind(fd,(struct sockaddr *)&addr,sizeof(addr)); - #ifdef _WINDOWS + #ifdef _WIN32 if (retval==SOCKET_ERROR) retval=-1; #endif @@ -1013,7 +1013,7 @@ bit8 TCP::Connect(uint32 IP,uint16 Port) result = connect(fd,(struct sockaddr *)&serverAddr, sizeof(serverAddr)); status=GetStatus(); - #ifdef _WINDOWS + #ifdef _WIN32 if (result==SOCKET_ERROR) result=-1; #endif @@ -1107,7 +1107,7 @@ bit8 TCP::ConnectAsync(uint32 IP,uint16 Port) connectErrno=errno; status=GetStatus(); - #ifdef _WINDOWS + #ifdef _WIN32 if (result==SOCKET_ERROR) { DBGMSG("Socket error 1 " << status); @@ -1124,7 +1124,7 @@ bit8 TCP::ConnectAsync(uint32 IP,uint16 Port) ClearStatus(); result = connect(fd,(struct sockaddr *)&serverAddr, sizeof(serverAddr)); status=GetStatus(); - #ifdef _WINDOWS + #ifdef _WIN32 if (result==SOCKET_ERROR) { DBGMSG("Socket error 2 " << status); @@ -1159,14 +1159,14 @@ bit8 TCP::ConnectAsync(uint32 IP,uint16 Port) void TCP::ClearStatus(void) { - #ifndef _WINDOWS + #ifndef _WIN32 errno=0; #endif } int TCP::GetStatus(void) { - #ifdef _WINDOWS + #ifdef _WIN32 int status=WSAGetLastError(); if (status==0) return(OK); else if (status==WSAEINTR) return(INTR); diff --git a/Core/Tools/mangler/wnet/tcp.h b/Core/Tools/mangler/wnet/tcp.h index e414cf0865..3e76c99ead 100644 --- a/Core/Tools/mangler/wnet/tcp.h +++ b/Core/Tools/mangler/wnet/tcp.h @@ -30,7 +30,7 @@ TCP Neal Kettler neal@westwood.com #include #include -#ifdef _WINDOWS +#ifdef _WIN32 #include #include diff --git a/Core/Tools/mangler/wnet/udp.cpp b/Core/Tools/mangler/wnet/udp.cpp index d15cc98823..bba9479b65 100644 --- a/Core/Tools/mangler/wnet/udp.cpp +++ b/Core/Tools/mangler/wnet/udp.cpp @@ -60,7 +60,7 @@ sint32 UDP::Bind(uint32 IP,uint16 Port) addr.sin_port=Port; addr.sin_addr.s_addr=IP; fd=socket(AF_INET,SOCK_DGRAM,DEFAULT_PROTOCOL); - #ifdef _WINDOWS + #ifdef _WIN32 if (fd==SOCKET_ERROR) fd=-1; #endif @@ -69,7 +69,7 @@ sint32 UDP::Bind(uint32 IP,uint16 Port) retval=bind(fd,(struct sockaddr *)&addr,sizeof(addr)); - #ifdef _WINDOWS + #ifdef _WIN32 if (retval==SOCKET_ERROR) retval=-1; #endif @@ -104,7 +104,7 @@ bit8 UDP::getLocalAddr(uint32 &ip, uint16 &port) // private function sint32 UDP::SetBlocking(bit8 block) { - #ifdef _WINDOWS + #ifdef _WIN32 unsigned long flag=1; if (block) flag=0; @@ -145,7 +145,7 @@ sint32 UDP::Write(uint8 *msg,uint32 len,uint32 IP,uint16 port) ClearStatus(); retval=sendto(fd,(char *)msg,len,0,(struct sockaddr *)&to,sizeof(to)); - #ifdef _WINDOWS + #ifdef _WIN32 if (retval==SOCKET_ERROR) retval=-1; #endif @@ -161,7 +161,7 @@ sint32 UDP::Read(uint8 *msg,uint32 len,sockaddr_in *from) if (from!=NULL) { retval=recvfrom(fd,(char *)msg,len,0,(struct sockaddr *)from,&alen); - #ifdef _WINDOWS + #ifdef _WIN32 if (retval==SOCKET_ERROR) retval=-1; #endif @@ -169,7 +169,7 @@ sint32 UDP::Read(uint8 *msg,uint32 len,sockaddr_in *from) else { retval=recvfrom(fd,(char *)msg,len,0,NULL,NULL); - #ifdef _WINDOWS + #ifdef _WIN32 if (retval==SOCKET_ERROR) retval=-1; #endif @@ -180,14 +180,14 @@ sint32 UDP::Read(uint8 *msg,uint32 len,sockaddr_in *from) void UDP::ClearStatus(void) { - #ifndef _WINDOWS + #ifndef _WIN32 errno=0; #endif } UDP::sockStat UDP::GetStatus(void) { - #ifdef _WINDOWS + #ifdef _WIN32 int status=WSAGetLastError(); if (status==0) return(OK); else if (status==WSAEINTR) return(INTR); @@ -310,7 +310,7 @@ int UDP::Wait(sint32 sec,sint32 usec,fd_set &givenSet,fd_set &returnSet) bit8 UDP::SetInputBuffer(uint32 bytes) { - #ifndef _WINDOWS + #ifndef _WIN32 int retval,arg=bytes; retval=setsockopt(fd,SOL_SOCKET,SO_RCVBUF, @@ -328,7 +328,7 @@ bit8 UDP::SetInputBuffer(uint32 bytes) bit8 UDP::SetOutputBuffer(uint32 bytes) { - #ifndef _WINDOWS + #ifndef _WIN32 int retval,arg=bytes; retval=setsockopt(fd,SOL_SOCKET,SO_SNDBUF, @@ -346,7 +346,7 @@ bit8 UDP::SetOutputBuffer(uint32 bytes) int UDP::GetInputBuffer(void) { - #ifndef _WINDOWS + #ifndef _WIN32 int retval,arg=0,len=sizeof(int); retval=getsockopt(fd,SOL_SOCKET,SO_RCVBUF, @@ -360,7 +360,7 @@ int UDP::GetInputBuffer(void) int UDP::GetOutputBuffer(void) { - #ifndef _WINDOWS + #ifndef _WIN32 int retval,arg=0,len=sizeof(int); retval=getsockopt(fd,SOL_SOCKET,SO_SNDBUF, diff --git a/Core/Tools/mangler/wnet/udp.h b/Core/Tools/mangler/wnet/udp.h index b409398132..7f40086058 100644 --- a/Core/Tools/mangler/wnet/udp.h +++ b/Core/Tools/mangler/wnet/udp.h @@ -24,7 +24,7 @@ #include #include -#ifdef _WINDOWS +#ifdef _WIN32 #include #include #define close _close diff --git a/Core/Tools/matchbot/debug.cpp b/Core/Tools/matchbot/debug.cpp index fa10a02bd0..2da4663134 100644 --- a/Core/Tools/matchbot/debug.cpp +++ b/Core/Tools/matchbot/debug.cpp @@ -30,7 +30,7 @@ extern "C" { #endif -#ifdef _WINDOWS +#ifdef _WIN32 #include void DebugCrash( const char *fmt, ... ) {} diff --git a/Core/Tools/matchbot/main.cpp b/Core/Tools/matchbot/main.cpp index 2155fbc4e7..8b0a78fb57 100644 --- a/Core/Tools/matchbot/main.cpp +++ b/Core/Tools/matchbot/main.cpp @@ -183,7 +183,7 @@ int main(int argc, char ** argv) Setup_Signals(); -#ifdef _WINDOWS +#ifdef _WIN32 // ----- Initialize Winsock ----- WORD verReq = MAKEWORD(2, 2); WSADATA wsadata; @@ -320,7 +320,7 @@ void rotateOutput(void) sprintf(filenamebuf, "%s/%02d%02d%04d_%02d%02d%02d_log", logpath.get(), xtime.getMonth(), xtime.getMDay(), xtime.getYear(), xtime.getHour(), xtime.getMinute(), xtime.getSecond()); -#ifdef _WINDOWS +#ifdef _WIN32 mkdir(logpath.get()); #else mkdir(logpath.get(), 00666); @@ -396,7 +396,7 @@ void rotateParanoid(void) sprintf(filenamebuf, "%s/%02d%02d%04d_%02d%02d%02d_log", logpath.get(), xtime.getMonth(), xtime.getMDay(), xtime.getYear(), xtime.getHour(), xtime.getMinute(), xtime.getSecond()); -#ifdef _WINDOWS +#ifdef _WIN32 mkdir(logpath.get()); #else mkdir(logpath.get(), 00666); diff --git a/Core/Tools/matchbot/matcher.cpp b/Core/Tools/matchbot/matcher.cpp index a6426d6282..53f4c95a56 100644 --- a/Core/Tools/matchbot/matcher.cpp +++ b/Core/Tools/matchbot/matcher.cpp @@ -22,7 +22,7 @@ #include "timezone.h" #include "debug.h" -#ifdef _WINDOWS +#ifdef _WIN32 #define usleep(x) Sleep((x)/100000) #endif diff --git a/Core/Tools/matchbot/wlib/sem4.cpp b/Core/Tools/matchbot/wlib/sem4.cpp index 1f954cb7d0..e11b95a362 100644 --- a/Core/Tools/matchbot/wlib/sem4.cpp +++ b/Core/Tools/matchbot/wlib/sem4.cpp @@ -31,7 +31,7 @@ This is useful because the constructor will automatically call sem_init Sem4::Sem4() { -#ifndef _WINDOWS +#ifndef _WIN32 sem_init(&sem,1,1); #else sem = CreateSemaphore(NULL, 1, 1, NULL); @@ -40,7 +40,7 @@ Sem4::Sem4() Sem4::Sem4(uint32 value) { -#ifndef _WINDOWS +#ifndef _WIN32 sem_init(&sem,1,value); #else sem = CreateSemaphore(NULL, value, value, NULL); @@ -49,7 +49,7 @@ Sem4::Sem4(uint32 value) Sem4::~Sem4() { -#ifndef _WINDOWS +#ifndef _WIN32 sem_destroy(&sem); #else if (sem) CloseHandle(sem); @@ -58,7 +58,7 @@ Sem4::~Sem4() sint32 Sem4::Wait(void) const { -#ifndef _WINDOWS +#ifndef _WIN32 return(sem_wait((sem_t *)&sem)); #else if (!sem) @@ -79,7 +79,7 @@ sint32 Sem4::Wait(void) const sint32 Sem4::Post(void) const { -#ifndef _WINDOWS +#ifndef _WIN32 return(sem_post((sem_t *)&sem)); #else if (!sem) @@ -92,7 +92,7 @@ sint32 Sem4::Post(void) const sint32 Sem4::TryWait(void) const { -#ifndef _WINDOWS +#ifndef _WIN32 return(sem_trywait((sem_t *)&sem)); #else if (!sem) @@ -112,7 +112,7 @@ sint32 Sem4::TryWait(void) const sint32 Sem4::GetValue(int *sval) const { -#ifndef _WINDOWS +#ifndef _WIN32 return(sem_getvalue((sem_t *)&sem,sval)); #else if (!sem) @@ -128,7 +128,7 @@ sint32 Sem4::GetValue(int *sval) const sint32 Sem4::Destroy(void) { -#ifndef _WINDOWS +#ifndef _WIN32 return(sem_destroy(&sem)); #else return CloseHandle(sem); diff --git a/Core/Tools/matchbot/wlib/sem4.h b/Core/Tools/matchbot/wlib/sem4.h index 175663dea1..303fb1e238 100644 --- a/Core/Tools/matchbot/wlib/sem4.h +++ b/Core/Tools/matchbot/wlib/sem4.h @@ -19,17 +19,17 @@ #pragma once #include -#ifndef _WINDOWS +#ifndef _WIN32 #include #endif #include "wstypes.h" #ifdef _REENTRANT -#ifndef _WINDOWS +#ifndef _WIN32 #include #else #include -#endif // _WINDOWS +#endif // _WIN32 #endif // _REENTRANT // Windows headers have a tendency to redefine IN @@ -42,7 +42,7 @@ class Sem4 { private: #ifdef _REENTRANT -#ifndef _WINDOWS +#ifndef _WIN32 sem_t sem; #else HANDLE sem; diff --git a/Core/Tools/matchbot/wlib/syslogd.cpp b/Core/Tools/matchbot/wlib/syslogd.cpp index aca18655b2..4107335c7e 100644 --- a/Core/Tools/matchbot/wlib/syslogd.cpp +++ b/Core/Tools/matchbot/wlib/syslogd.cpp @@ -20,7 +20,7 @@ SyslogD::SyslogD(char *ident,int logopt,int facility,int _priority) { -#ifndef _WINDOWS +#ifndef _WIN32 openlog(ident,logopt,facility); priority=_priority; #endif @@ -28,7 +28,7 @@ SyslogD::SyslogD(char *ident,int logopt,int facility,int _priority) int SyslogD::print(const char *str, int len) { -#ifndef _WINDOWS +#ifndef _WIN32 char *temp_str=new char[len+1]; memset(temp_str,0,len+1); strncpy(temp_str,str,len); diff --git a/Core/Tools/matchbot/wlib/syslogd.h b/Core/Tools/matchbot/wlib/syslogd.h index 5cf2c7bf0a..74b25d313f 100644 --- a/Core/Tools/matchbot/wlib/syslogd.h +++ b/Core/Tools/matchbot/wlib/syslogd.h @@ -20,7 +20,7 @@ #include #include -#ifndef _WINDOWS +#ifndef _WIN32 #include #endif #include diff --git a/Core/Tools/matchbot/wlib/timezone.cpp b/Core/Tools/matchbot/wlib/timezone.cpp index 34f558b072..b43235f475 100644 --- a/Core/Tools/matchbot/wlib/timezone.cpp +++ b/Core/Tools/matchbot/wlib/timezone.cpp @@ -22,7 +22,7 @@ void GetTimezoneInfo(const char * &timezone_str, int &timezone_offset) { timezone_str = "Unknown Timezone"; timezone_offset = 0; -#ifdef _WINDOWS +#ifdef _WIN32 struct _timeb wintime; _ftime(&wintime); @@ -37,7 +37,7 @@ void GetTimezoneInfo(const char * &timezone_str, int &timezone_offset) { timezone_offset = wintime.timezone * 60; // its in minutes... #endif -#ifndef _WINDOWS +#ifndef _WIN32 struct timeval unixtime; struct timezone unixtzone; gettimeofday(&unixtime,&unixtzone); diff --git a/Core/Tools/matchbot/wlib/wdebug.h b/Core/Tools/matchbot/wlib/wdebug.h index 1a363ccca9..4b5a8568d1 100644 --- a/Core/Tools/matchbot/wlib/wdebug.h +++ b/Core/Tools/matchbot/wlib/wdebug.h @@ -59,7 +59,7 @@ will you be ready to leave grasshopper. #include #include -#if !defined(_WINDOWS) +#if !defined(_WIN32) // Windows headers have a tendency to redefine IN #ifdef IN #undef IN @@ -183,7 +183,7 @@ extern CritSec DebugLibSemaphore; #define DBG(X) X // In Windows, send a copy to the debugger window -#ifdef _WINDOWS +#ifdef _WIN32 // Print a variable #define PVAR(v) \ @@ -243,7 +243,7 @@ extern CritSec DebugLibSemaphore; DEBUGUNLOCK; \ } -#else // _WINDOWS +#else // _WIN32 // Print a variable #define PVAR(v) \ @@ -283,7 +283,7 @@ extern CritSec DebugLibSemaphore; "]: " << ##X << endl; X \ DEBUGUNLOCK; \ } -#endif // _WINDOWS +#endif // _WIN32 #endif // DEBUG diff --git a/Core/Tools/matchbot/wlib/wstypes.h b/Core/Tools/matchbot/wlib/wstypes.h index 8ac37ead63..c13ef1fa3c 100644 --- a/Core/Tools/matchbot/wlib/wstypes.h +++ b/Core/Tools/matchbot/wlib/wstypes.h @@ -35,7 +35,7 @@ Standard type definitions for the sake of portability and readability. // threadsafe.h otherwise they won't compile #include -#ifndef _WINDOWS +#ifndef _WIN32 #define _POSIX_C_SOURCE 199506L #define _POSIX_PTHREAD_SEMANTICS #define __EXTENSIONS__ @@ -43,7 +43,7 @@ Standard type definitions for the sake of portability and readability. #include #include #include -#ifndef _WINDOWS +#ifndef _WIN32 #include #include #include @@ -109,7 +109,7 @@ typedef double float64; #define MAX_SINT16 0x7FFF #define MAX_SINT8 0x7F -#ifdef _WINDOWS +#ifdef _WIN32 #define strncasecmp _strnicmp #define strcasecmp _stricmp #endif diff --git a/Core/Tools/matchbot/wlib/wtime.cpp b/Core/Tools/matchbot/wlib/wtime.cpp index 4e7fe87df0..6ff6a0ce37 100644 --- a/Core/Tools/matchbot/wlib/wtime.cpp +++ b/Core/Tools/matchbot/wlib/wtime.cpp @@ -35,7 +35,7 @@ static const char *FULLMONTHS[]={"January","February","March","April","May","Jun "July","August","September","October","November","December"}; // MDC: Windows doesn't provide a localtime_r, so make our own... -#ifdef _WINDOWS +#ifdef _WIN32 #ifdef _REENTRANT #include "critsec.h" static CritSec localtime_critsec; @@ -54,7 +54,7 @@ static struct tm *localtime_r(const time_t *clockval, struct tm *res) { #endif return res; } -#endif // _WINDOWS +#endif // _WIN32 Wtime::Wtime(void) { @@ -82,13 +82,13 @@ Wtime::~Wtime() void Wtime::Update(void) { sign=POSITIVE; - #ifdef _WINDOWS + #ifdef _WIN32 struct _timeb wintime; _ftime(&wintime); sec=wintime.time; usec=(wintime.millitm)*1000; #endif - #ifndef _WINDOWS + #ifndef _WIN32 struct timeval unixtime; struct timezone unixtzone; gettimeofday(&unixtime,&unixtzone); diff --git a/Core/Tools/matchbot/wlib/wtime.h b/Core/Tools/matchbot/wlib/wtime.h index d76259ce68..e969217da0 100644 --- a/Core/Tools/matchbot/wlib/wtime.h +++ b/Core/Tools/matchbot/wlib/wtime.h @@ -28,7 +28,7 @@ wtime Neal Kettler #include #include -#ifndef _WINDOWS +#ifndef _WIN32 #include #include #include diff --git a/Core/Tools/matchbot/wlib/xtime.cpp b/Core/Tools/matchbot/wlib/xtime.cpp index 00bc596899..08b05653b2 100644 --- a/Core/Tools/matchbot/wlib/xtime.cpp +++ b/Core/Tools/matchbot/wlib/xtime.cpp @@ -29,7 +29,7 @@ long long after you'll be dead. #include #include -#ifndef _WINDOWS +#ifndef _WIN32 #include #endif #include "xtime.h" @@ -286,13 +286,13 @@ void Xtime::update(void) day_=719528; // day_s from year 0 to Jan1, 1970 msec_=0; - #ifdef _WINDOWS + #ifdef _WIN32 struct _timeb wintime; _ftime(&wintime); addSeconds(wintime.time); msec_+=wintime.millitm; #endif - #ifndef _WINDOWS + #ifndef _WIN32 struct timeval unixtime; struct timezone unixtzone; gettimeofday(&unixtime,&unixtzone); diff --git a/Core/Tools/matchbot/wlib/xtime.h b/Core/Tools/matchbot/wlib/xtime.h index 8c66f80b0f..c79e4c9f43 100644 --- a/Core/Tools/matchbot/wlib/xtime.h +++ b/Core/Tools/matchbot/wlib/xtime.h @@ -36,7 +36,7 @@ function :-) #include #include -#ifndef _WINDOWS +#ifndef _WIN32 #include #include #include diff --git a/Core/Tools/matchbot/wnet/field.cpp b/Core/Tools/matchbot/wnet/field.cpp index c80f4f029d..699b52507c 100644 --- a/Core/Tools/matchbot/wnet/field.cpp +++ b/Core/Tools/matchbot/wnet/field.cpp @@ -34,7 +34,7 @@ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include #include -#ifndef _WINDOWS +#ifndef _WIN32 #include #else #define Win32_Winsock diff --git a/Core/Tools/matchbot/wnet/packet.cpp b/Core/Tools/matchbot/wnet/packet.cpp index bc3ef2d8e8..8cda4f64b0 100644 --- a/Core/Tools/matchbot/wnet/packet.cpp +++ b/Core/Tools/matchbot/wnet/packet.cpp @@ -39,7 +39,7 @@ #include #include #include -#ifndef _WINDOWS +#ifndef _WIN32 #include #else #define Win32_Winsock diff --git a/Core/Tools/matchbot/wnet/tcp.cpp b/Core/Tools/matchbot/wnet/tcp.cpp index 9dd0b93bd9..66ea079c7a 100644 --- a/Core/Tools/matchbot/wnet/tcp.cpp +++ b/Core/Tools/matchbot/wnet/tcp.cpp @@ -99,7 +99,7 @@ while (1) #include "tcp.h" #include -#ifndef _WINDOWS +#ifndef _WIN32 #include #define closesocket close #endif @@ -170,7 +170,7 @@ sint32 TCP::SetBlocking(bit8 block,sint32 whichFD) if (whichFD==0) whichFD=fd; - #ifdef _WINDOWS + #ifdef _WIN32 unsigned long flag=1; if (block) flag=0; @@ -219,7 +219,7 @@ sint32 TCP::Write(const uint8 *msg,uint32 len,sint32 whichFD) } SetBlocking(TRUE,whichFD); retval=send(whichFD,(const char *)msg,len,0); - #ifdef _WINDOWS + #ifdef _WIN32 if (retval==SOCKET_ERROR) retval=-1; #endif @@ -241,7 +241,7 @@ sint32 TCP::WriteNB(uint8 *msg,uint32 len,sint32 whichFD) whichFD=fd; } retval=send(whichFD,(const char *)msg,len,0); - #ifdef _WINDOWS + #ifdef _WIN32 if (retval==SOCKET_ERROR) retval=-1; #endif @@ -942,7 +942,7 @@ bit8 TCP::Bind(uint32 IP,uint16 Port,bit8 reuseAddr) } retval=bind(fd,(struct sockaddr *)&addr,sizeof(addr)); - #ifdef _WINDOWS + #ifdef _WIN32 if (retval==SOCKET_ERROR) retval=-1; #endif @@ -1013,7 +1013,7 @@ bit8 TCP::Connect(uint32 IP,uint16 Port) result = connect(fd,(struct sockaddr *)&serverAddr, sizeof(serverAddr)); status=GetStatus(); - #ifdef _WINDOWS + #ifdef _WIN32 if (result==SOCKET_ERROR) result=-1; #endif @@ -1107,7 +1107,7 @@ bit8 TCP::ConnectAsync(uint32 IP,uint16 Port) connectErrno=errno; status=GetStatus(); - #ifdef _WINDOWS + #ifdef _WIN32 if (result==SOCKET_ERROR) { DBGMSG("Socket error 1 " << status); @@ -1124,7 +1124,7 @@ bit8 TCP::ConnectAsync(uint32 IP,uint16 Port) ClearStatus(); result = connect(fd,(struct sockaddr *)&serverAddr, sizeof(serverAddr)); status=GetStatus(); - #ifdef _WINDOWS + #ifdef _WIN32 if (result==SOCKET_ERROR) { DBGMSG("Socket error 2 " << status); @@ -1159,14 +1159,14 @@ bit8 TCP::ConnectAsync(uint32 IP,uint16 Port) void TCP::ClearStatus(void) { - #ifndef _WINDOWS + #ifndef _WIN32 errno=0; #endif } int TCP::GetStatus(void) { - #ifdef _WINDOWS + #ifdef _WIN32 int status=WSAGetLastError(); if (status==0) return(OK); else if (status==WSAEINTR) return(INTR); diff --git a/Core/Tools/matchbot/wnet/tcp.h b/Core/Tools/matchbot/wnet/tcp.h index e414cf0865..3e76c99ead 100644 --- a/Core/Tools/matchbot/wnet/tcp.h +++ b/Core/Tools/matchbot/wnet/tcp.h @@ -30,7 +30,7 @@ TCP Neal Kettler neal@westwood.com #include #include -#ifdef _WINDOWS +#ifdef _WIN32 #include #include diff --git a/Core/Tools/matchbot/wnet/udp.cpp b/Core/Tools/matchbot/wnet/udp.cpp index d15cc98823..bba9479b65 100644 --- a/Core/Tools/matchbot/wnet/udp.cpp +++ b/Core/Tools/matchbot/wnet/udp.cpp @@ -60,7 +60,7 @@ sint32 UDP::Bind(uint32 IP,uint16 Port) addr.sin_port=Port; addr.sin_addr.s_addr=IP; fd=socket(AF_INET,SOCK_DGRAM,DEFAULT_PROTOCOL); - #ifdef _WINDOWS + #ifdef _WIN32 if (fd==SOCKET_ERROR) fd=-1; #endif @@ -69,7 +69,7 @@ sint32 UDP::Bind(uint32 IP,uint16 Port) retval=bind(fd,(struct sockaddr *)&addr,sizeof(addr)); - #ifdef _WINDOWS + #ifdef _WIN32 if (retval==SOCKET_ERROR) retval=-1; #endif @@ -104,7 +104,7 @@ bit8 UDP::getLocalAddr(uint32 &ip, uint16 &port) // private function sint32 UDP::SetBlocking(bit8 block) { - #ifdef _WINDOWS + #ifdef _WIN32 unsigned long flag=1; if (block) flag=0; @@ -145,7 +145,7 @@ sint32 UDP::Write(uint8 *msg,uint32 len,uint32 IP,uint16 port) ClearStatus(); retval=sendto(fd,(char *)msg,len,0,(struct sockaddr *)&to,sizeof(to)); - #ifdef _WINDOWS + #ifdef _WIN32 if (retval==SOCKET_ERROR) retval=-1; #endif @@ -161,7 +161,7 @@ sint32 UDP::Read(uint8 *msg,uint32 len,sockaddr_in *from) if (from!=NULL) { retval=recvfrom(fd,(char *)msg,len,0,(struct sockaddr *)from,&alen); - #ifdef _WINDOWS + #ifdef _WIN32 if (retval==SOCKET_ERROR) retval=-1; #endif @@ -169,7 +169,7 @@ sint32 UDP::Read(uint8 *msg,uint32 len,sockaddr_in *from) else { retval=recvfrom(fd,(char *)msg,len,0,NULL,NULL); - #ifdef _WINDOWS + #ifdef _WIN32 if (retval==SOCKET_ERROR) retval=-1; #endif @@ -180,14 +180,14 @@ sint32 UDP::Read(uint8 *msg,uint32 len,sockaddr_in *from) void UDP::ClearStatus(void) { - #ifndef _WINDOWS + #ifndef _WIN32 errno=0; #endif } UDP::sockStat UDP::GetStatus(void) { - #ifdef _WINDOWS + #ifdef _WIN32 int status=WSAGetLastError(); if (status==0) return(OK); else if (status==WSAEINTR) return(INTR); @@ -310,7 +310,7 @@ int UDP::Wait(sint32 sec,sint32 usec,fd_set &givenSet,fd_set &returnSet) bit8 UDP::SetInputBuffer(uint32 bytes) { - #ifndef _WINDOWS + #ifndef _WIN32 int retval,arg=bytes; retval=setsockopt(fd,SOL_SOCKET,SO_RCVBUF, @@ -328,7 +328,7 @@ bit8 UDP::SetInputBuffer(uint32 bytes) bit8 UDP::SetOutputBuffer(uint32 bytes) { - #ifndef _WINDOWS + #ifndef _WIN32 int retval,arg=bytes; retval=setsockopt(fd,SOL_SOCKET,SO_SNDBUF, @@ -346,7 +346,7 @@ bit8 UDP::SetOutputBuffer(uint32 bytes) int UDP::GetInputBuffer(void) { - #ifndef _WINDOWS + #ifndef _WIN32 int retval,arg=0,len=sizeof(int); retval=getsockopt(fd,SOL_SOCKET,SO_RCVBUF, @@ -360,7 +360,7 @@ int UDP::GetInputBuffer(void) int UDP::GetOutputBuffer(void) { - #ifndef _WINDOWS + #ifndef _WIN32 int retval,arg=0,len=sizeof(int); retval=getsockopt(fd,SOL_SOCKET,SO_SNDBUF, diff --git a/Core/Tools/matchbot/wnet/udp.h b/Core/Tools/matchbot/wnet/udp.h index b409398132..7f40086058 100644 --- a/Core/Tools/matchbot/wnet/udp.h +++ b/Core/Tools/matchbot/wnet/udp.h @@ -24,7 +24,7 @@ #include #include -#ifdef _WINDOWS +#ifdef _WIN32 #include #include #define close _close diff --git a/Generals/Code/Libraries/Source/WWVegas/WW3D2/dx8wrapper.cpp b/Generals/Code/Libraries/Source/WWVegas/WW3D2/dx8wrapper.cpp index 83e99638ea..07aee2d9a0 100644 --- a/Generals/Code/Libraries/Source/WWVegas/WW3D2/dx8wrapper.cpp +++ b/Generals/Code/Libraries/Source/WWVegas/WW3D2/dx8wrapper.cpp @@ -920,7 +920,7 @@ bool DX8Wrapper::Set_Render_Device(int dev, int width, int height, int bits, int _RenderDeviceNameTable[CurRenderDevice].str(),_RenderDeviceDescriptionTable[CurRenderDevice].Get_Driver_Name(), _RenderDeviceDescriptionTable[CurRenderDevice].Get_Driver_Version(),ResolutionWidth,ResolutionHeight,(IsWindowed ? 1 : 0))); -#ifdef _WINDOWS +#ifdef _WIN32 // PWG 4/13/2000 - changed so that if you say to resize the window it resizes // regardless of whether its windowed or not as OpenGL resizes its self around // the caption and edges of the window type you provide, so its important to diff --git a/Generals/Code/Libraries/Source/WWVegas/WW3D2/ww3d.cpp b/Generals/Code/Libraries/Source/WWVegas/WW3D2/ww3d.cpp index fbdcd9c347..dac6fcc1ae 100644 --- a/Generals/Code/Libraries/Source/WWVegas/WW3D2/ww3d.cpp +++ b/Generals/Code/Libraries/Source/WWVegas/WW3D2/ww3d.cpp @@ -1499,7 +1499,7 @@ void WW3D::Make_Screen_Shot( const char * filename_base , const float gamma, con *=============================================================================================*/ void WW3D::Start_Movie_Capture( const char * filename_base, float frame_rate ) { -#ifdef _WINDOWS +#ifdef _WIN32 if (IsCapturing) { Stop_Movie_Capture(); } @@ -1542,7 +1542,7 @@ void WW3D::Start_Movie_Capture( const char * filename_base, float frame_rate ) *=============================================================================================*/ void WW3D::Stop_Movie_Capture( void ) { -#ifdef _WINDOWS +#ifdef _WIN32 if (IsCapturing) { IsCapturing = false; WWDEBUG_SAY(( "Stoping Movie" )); @@ -1700,7 +1700,7 @@ bool WW3D::Is_Movie_Ready() *=============================================================================================*/ void WW3D::Update_Movie_Capture( void ) { -#ifdef _WINDOWS +#ifdef _WIN32 WWASSERT( IsCapturing); WWPROFILE("WW3D::Update_Movie_Capture"); WWDEBUG_SAY(( "Updating")); @@ -1777,7 +1777,7 @@ void WW3D::Update_Movie_Capture( void ) *=============================================================================================*/ float WW3D::Get_Movie_Capture_Frame_Rate( void ) { -#ifdef _WINDOWS +#ifdef _WIN32 if (IsCapturing) { return Movie->GetFrameRate(); } diff --git a/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/dx8wrapper.cpp b/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/dx8wrapper.cpp index f4f96dcaa6..9fa4fa0686 100644 --- a/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/dx8wrapper.cpp +++ b/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/dx8wrapper.cpp @@ -1009,7 +1009,7 @@ bool DX8Wrapper::Set_Render_Device(int dev, int width, int height, int bits, int _RenderDeviceNameTable[CurRenderDevice].str(),_RenderDeviceDescriptionTable[CurRenderDevice].Get_Driver_Name(), _RenderDeviceDescriptionTable[CurRenderDevice].Get_Driver_Version(),ResolutionWidth,ResolutionHeight,(IsWindowed ? 1 : 0))); -#ifdef _WINDOWS +#ifdef _WIN32 // PWG 4/13/2000 - changed so that if you say to resize the window it resizes // regardless of whether its windowed or not as OpenGL resizes its self around // the caption and edges of the window type you provide, so its important to diff --git a/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/ww3d.cpp b/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/ww3d.cpp index 32ffd19632..1201a349a8 100644 --- a/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/ww3d.cpp +++ b/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/ww3d.cpp @@ -1494,7 +1494,7 @@ void WW3D::Make_Screen_Shot( const char * filename_base , const float gamma, con *=============================================================================================*/ void WW3D::Start_Movie_Capture( const char * filename_base, float frame_rate ) { -#ifdef _WINDOWS +#ifdef _WIN32 if (IsCapturing) { Stop_Movie_Capture(); } @@ -1537,7 +1537,7 @@ void WW3D::Start_Movie_Capture( const char * filename_base, float frame_rate ) *=============================================================================================*/ void WW3D::Stop_Movie_Capture( void ) { -#ifdef _WINDOWS +#ifdef _WIN32 if (IsCapturing) { IsCapturing = false; WWDEBUG_SAY(( "Stoping Movie" )); @@ -1695,7 +1695,7 @@ bool WW3D::Is_Movie_Ready() *=============================================================================================*/ void WW3D::Update_Movie_Capture( void ) { -#ifdef _WINDOWS +#ifdef _WIN32 WWASSERT( IsCapturing); WWPROFILE("WW3D::Update_Movie_Capture"); WWDEBUG_SAY(( "Updating")); @@ -1772,7 +1772,7 @@ void WW3D::Update_Movie_Capture( void ) *=============================================================================================*/ float WW3D::Get_Movie_Capture_Frame_Rate( void ) { -#ifdef _WINDOWS +#ifdef _WIN32 if (IsCapturing) { return Movie->GetFrameRate(); }