diff options
Diffstat (limited to 'cpp/src')
61 files changed, 130 insertions, 130 deletions
diff --git a/cpp/src/Freeze/DBI.cpp b/cpp/src/Freeze/DBI.cpp index 952195a6b59..5f3c983e249 100644 --- a/cpp/src/Freeze/DBI.cpp +++ b/cpp/src/Freeze/DBI.cpp @@ -19,7 +19,7 @@ using namespace std; using namespace Ice; using namespace Freeze; -#ifdef WIN32 +#ifdef _WIN32 # define FREEZE_DB_MODE 0 #else # define FREEZE_DB_MODE (S_IRUSR | S_IWUSR) diff --git a/cpp/src/Glacier/GlacierI.cpp b/cpp/src/Glacier/GlacierI.cpp index e81be0dd70b..b7f6984f5e9 100644 --- a/cpp/src/Glacier/GlacierI.cpp +++ b/cpp/src/Glacier/GlacierI.cpp @@ -8,7 +8,7 @@ // // ********************************************************************** -#ifdef WIN32 +#ifdef _WIN32 # error Sorry, the Glacier Starter is not yet supported on WIN32. #endif diff --git a/cpp/src/Glacier/GlacierRouter.cpp b/cpp/src/Glacier/GlacierRouter.cpp index 7caff20ff3e..d00fc62cebb 100644 --- a/cpp/src/Glacier/GlacierRouter.cpp +++ b/cpp/src/Glacier/GlacierRouter.cpp @@ -226,7 +226,7 @@ Glacier::Router::run(int argc, char* argv[]) routerAdapter->add(router, stringToIdentity(routerIdentity)); routerAdapter->activate(); -#ifndef WIN32 +#ifndef _WIN32 // // Print the stringified router proxy on a filedescriptor // specified in the properties, if so requested. diff --git a/cpp/src/Glacier/GlacierStarter.cpp b/cpp/src/Glacier/GlacierStarter.cpp index dd6ffaca69c..1e8c3002079 100644 --- a/cpp/src/Glacier/GlacierStarter.cpp +++ b/cpp/src/Glacier/GlacierStarter.cpp @@ -8,7 +8,7 @@ // // ********************************************************************** -#ifdef WIN32 +#ifdef _WIN32 # error Sorry, the Glacier Starter is not yet supported on WIN32. #endif diff --git a/cpp/src/Ice/Acceptor.h b/cpp/src/Ice/Acceptor.h index 8833be76af1..b76aa498b17 100644 --- a/cpp/src/Ice/Acceptor.h +++ b/cpp/src/Ice/Acceptor.h @@ -15,7 +15,7 @@ #include <Ice/AcceptorF.h> #include <Ice/TransceiverF.h> -#ifndef WIN32 +#ifndef _WIN32 # define SOCKET int #endif diff --git a/cpp/src/Ice/Application.cpp b/cpp/src/Ice/Application.cpp index 36a8668df7d..21c04187193 100644 --- a/cpp/src/Ice/Application.cpp +++ b/cpp/src/Ice/Application.cpp @@ -9,7 +9,7 @@ // ********************************************************************** #include <Ice/Application.h> -#ifndef WIN32 +#ifndef _WIN32 # include <csignal> #endif @@ -98,7 +98,7 @@ Ice::Application::communicator() return _communicator; } -#ifdef WIN32 +#ifdef _WIN32 static BOOL WINAPI interruptHandler(DWORD) diff --git a/cpp/src/Ice/CertificateDesc.cpp b/cpp/src/Ice/CertificateDesc.cpp index 89882e807f5..eef53fb0af9 100644 --- a/cpp/src/Ice/CertificateDesc.cpp +++ b/cpp/src/Ice/CertificateDesc.cpp @@ -13,7 +13,7 @@ // This is due to STL template identifiers expansion. // The MSDN Library recommends that you put this pragma directive // in place to avoid the warnings. -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(disable:4786) #endif diff --git a/cpp/src/Ice/CertificateDesc.h b/cpp/src/Ice/CertificateDesc.h index abb406ee1ea..5b92a0fbc51 100644 --- a/cpp/src/Ice/CertificateDesc.h +++ b/cpp/src/Ice/CertificateDesc.h @@ -7,7 +7,7 @@ // All Rights Reserved // // ********************************************************************** -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(disable:4786) #endif diff --git a/cpp/src/Ice/ConfigParser.cpp b/cpp/src/Ice/ConfigParser.cpp index f2bd2df16fb..f1696295ec8 100644 --- a/cpp/src/Ice/ConfigParser.cpp +++ b/cpp/src/Ice/ConfigParser.cpp @@ -13,7 +13,7 @@ // This is due to STL template identifiers expansion. // The MSDN Library recommends that you put this pragma directive // in place to avoid the warnings. -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(disable:4786) #endif diff --git a/cpp/src/Ice/DynamicLibrary.cpp b/cpp/src/Ice/DynamicLibrary.cpp index d62154f43ec..c0b197dcfdb 100644 --- a/cpp/src/Ice/DynamicLibrary.cpp +++ b/cpp/src/Ice/DynamicLibrary.cpp @@ -10,7 +10,7 @@ #include <Ice/DynamicLibrary.h> -#ifndef WIN32 +#ifndef _WIN32 # include <dlfcn.h> #endif @@ -30,7 +30,7 @@ IceInternal::DynamicLibrary::~DynamicLibrary() { if(_hnd != 0) { -#ifdef WIN32 +#ifdef _WIN32 FreeLibrary(_hnd); #else dlclose(_hnd); @@ -41,7 +41,7 @@ IceInternal::DynamicLibrary::~DynamicLibrary() bool IceInternal::DynamicLibrary::load(const string& lib) { -#ifdef WIN32 +#ifdef _WIN32 _hnd = LoadLibrary(lib.c_str()); #else _hnd = dlopen(lib.c_str(), RTLD_NOW); @@ -64,7 +64,7 @@ IceInternal::DynamicLibrary::symbol_type IceInternal::DynamicLibrary::getSymbol(const string& name) { assert(_hnd != 0); -#ifdef WIN32 +#ifdef _WIN32 return GetProcAddress(_hnd, name.c_str()); #else symbol_type result = dlsym(_hnd, name.c_str()); diff --git a/cpp/src/Ice/GeneralConfig.cpp b/cpp/src/Ice/GeneralConfig.cpp index 9eabc98d548..fc55d48df58 100644 --- a/cpp/src/Ice/GeneralConfig.cpp +++ b/cpp/src/Ice/GeneralConfig.cpp @@ -13,7 +13,7 @@ // This is due to STL template identifiers expansion. // The MSDN Library recommends that you put this pragma directive // in place to avoid the warnings. -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(disable:4786) #endif diff --git a/cpp/src/Ice/Instance.cpp b/cpp/src/Ice/Instance.cpp index 4d4e4957cb2..199e5e1b4da 100644 --- a/cpp/src/Ice/Instance.cpp +++ b/cpp/src/Ice/Instance.cpp @@ -25,11 +25,11 @@ #include <Ice/SystemInternal.h> #include <Ice/SslFactory.h> -#ifndef WIN32 +#ifndef _WIN32 # include <Ice/SysLoggerI.h> #endif -#ifndef WIN32 +#ifndef _WIN32 # include <csignal> # include <syslog.h> # include <sys/time.h> @@ -43,7 +43,7 @@ using namespace IceInternal; int Instance::_globalStateCounter = 0; IceUtil::Mutex* Instance::_globalStateMutex = new IceUtil::Mutex; -#ifndef WIN32 +#ifndef _WIN32 string Instance::_identForOpenlog; #endif @@ -190,14 +190,14 @@ IceInternal::Instance::Instance(const CommunicatorPtr& communicator, const Prope // Must be done before "Ice.Daemon" is checked if (atoi(_properties->getProperty("Ice.PrintProcessId").c_str()) > 0) { -#ifdef WIN32 +#ifdef _WIN32 cout << _getpid() << endl; #else cout << getpid() << endl; #endif } -#ifndef WIN32 +#ifndef _WIN32 if (atoi(_properties->getProperty("Ice.Daemon").c_str()) > 0) { int noclose = atoi(_properties->getProperty("Ice.DaemonNoClose").c_str()); @@ -214,7 +214,7 @@ IceInternal::Instance::Instance(const CommunicatorPtr& communicator, const Prope } #endif -#ifndef WIN32 +#ifndef _WIN32 if (atoi(_properties->getProperty("Ice.UseSyslog").c_str()) > 0) { _identForOpenlog = _properties->getProperty("Ice.ProgramName"); @@ -226,7 +226,7 @@ IceInternal::Instance::Instance(const CommunicatorPtr& communicator, const Prope } #endif -#ifdef WIN32 +#ifdef _WIN32 WORD version = MAKEWORD(1, 1); WSADATA data; if (WSAStartup(version, &data) != 0) @@ -238,7 +238,7 @@ IceInternal::Instance::Instance(const CommunicatorPtr& communicator, const Prope } #endif -#ifndef WIN32 +#ifndef _WIN32 struct sigaction action; action.sa_handler = SIG_IGN; sigemptyset(&action.sa_mask); @@ -246,7 +246,7 @@ IceInternal::Instance::Instance(const CommunicatorPtr& communicator, const Prope sigaction(SIGPIPE, &action, 0); #endif -#ifdef WIN32 +#ifdef _WIN32 struct _timeb tb; _ftime(&tb); srand(tb.millitm); @@ -263,7 +263,7 @@ IceInternal::Instance::Instance(const CommunicatorPtr& communicator, const Prope try { __setNoDelete(true); -#ifndef WIN32 +#ifndef _WIN32 if (atoi(_properties->getProperty("Ice.UseSyslog").c_str()) > 0) { _logger = new SysLoggerI; @@ -324,11 +324,11 @@ IceInternal::Instance::~Instance() assert(_globalStateCounter > 0); if (--_globalStateCounter == 0) // Only on last call { -#ifdef WIN32 +#ifdef _WIN32 WSACleanup(); #endif -#ifndef WIN32 +#ifndef _WIN32 struct sigaction action; action.sa_handler = SIG_DFL; sigemptyset(&action.sa_mask); @@ -336,7 +336,7 @@ IceInternal::Instance::~Instance() sigaction(SIGPIPE, &action, 0); #endif -#ifndef WIN32 +#ifndef _WIN32 if (!_identForOpenlog.empty()) { closelog(); diff --git a/cpp/src/Ice/Instance.h b/cpp/src/Ice/Instance.h index 573b306222c..baf800e648f 100644 --- a/cpp/src/Ice/Instance.h +++ b/cpp/src/Ice/Instance.h @@ -90,7 +90,7 @@ private: friend class GlobalStateMutexDestroyer; static int _globalStateCounter; static ::IceUtil::Mutex* _globalStateMutex; -#ifndef WIN32 +#ifndef _WIN32 static std::string _identForOpenlog; #endif }; diff --git a/cpp/src/Ice/Network.cpp b/cpp/src/Ice/Network.cpp index dbb2fe871cb..f774fa8b8f5 100644 --- a/cpp/src/Ice/Network.cpp +++ b/cpp/src/Ice/Network.cpp @@ -20,7 +20,7 @@ using namespace IceInternal; bool IceInternal::interrupted() { -#ifdef WIN32 +#ifdef _WIN32 int error = WSAGetLastError(); if (error == WSAEINTR) { @@ -45,7 +45,7 @@ IceInternal::acceptInterrupted() if (interrupted()) return true; -#ifdef WIN32 +#ifdef _WIN32 int error = WSAGetLastError(); if (error == WSAECONNABORTED || error == WSAECONNRESET || @@ -70,7 +70,7 @@ IceInternal::acceptInterrupted() bool IceInternal::noBuffers() { -#ifdef WIN32 +#ifdef _WIN32 int error = WSAGetLastError(); if (error == WSAENOBUFS || error == WSAEFAULT) @@ -92,7 +92,7 @@ IceInternal::noBuffers() bool IceInternal::wouldBlock() { -#ifdef WIN32 +#ifdef _WIN32 int error = WSAGetLastError(); if (error == WSAEWOULDBLOCK) { @@ -114,7 +114,7 @@ IceInternal::wouldBlock() bool IceInternal::connectFailed() { -#ifdef WIN32 +#ifdef _WIN32 int error = WSAGetLastError(); if (error == WSAECONNREFUSED || error == WSAETIMEDOUT || @@ -145,7 +145,7 @@ IceInternal::connectFailed() bool IceInternal::connectInProgress() { -#ifdef WIN32 +#ifdef _WIN32 int error = WSAGetLastError(); if (error == WSAEWOULDBLOCK) { @@ -166,7 +166,7 @@ IceInternal::connectInProgress() bool IceInternal::connectionLost() { -#ifdef WIN32 +#ifdef _WIN32 int error = WSAGetLastError(); if (error == WSAECONNRESET || error == WSAESHUTDOWN || @@ -191,7 +191,7 @@ IceInternal::connectionLost() bool IceInternal::notConnected() { -#ifdef WIN32 +#ifdef _WIN32 int error = WSAGetLastError(); if (error == WSAENOTCONN) { @@ -244,7 +244,7 @@ IceInternal::createSocket(bool udp) void IceInternal::closeSocket(SOCKET fd) { -#ifdef WIN32 +#ifdef _WIN32 int error = WSAGetLastError(); closesocket(fd); WSASetLastError(error); @@ -260,7 +260,7 @@ IceInternal::setBlock(SOCKET fd, bool block) { if (block) { -#ifdef WIN32 +#ifdef _WIN32 unsigned long arg = 0; ioctlsocket(fd, FIONBIO, &arg); #else @@ -271,7 +271,7 @@ IceInternal::setBlock(SOCKET fd, bool block) } else { -#ifdef WIN32 +#ifdef _WIN32 unsigned long arg = 1; ioctlsocket(fd, FIONBIO, &arg); #else @@ -323,7 +323,7 @@ IceInternal::setSendBufferSize(SOCKET fd, int sz) void IceInternal::doBind(SOCKET fd, struct sockaddr_in& addr) { -#ifndef WIN32 +#ifndef _WIN32 int flag = 1; if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (char*)&flag, sizeof(int)) == SOCKET_ERROR) { @@ -372,7 +372,7 @@ repeatListen: void IceInternal::doConnect(SOCKET fd, struct sockaddr_in& addr, int timeout) { -#ifdef WIN32 +#ifdef _WIN32 // // Set larger send buffer size to avoid performance problems on // WIN32 @@ -395,7 +395,7 @@ repeatConnect: fd_set wFdSet; FD_ZERO(&wFdSet); FD_SET(fd, &wFdSet); -#ifdef WIN32 +#ifdef _WIN32 // // WIN32 notifies about connection failures // through the exception filedescriptors @@ -409,7 +409,7 @@ repeatConnect: struct timeval tv; tv.tv_sec = timeout / 1000; tv.tv_usec = (timeout - tv.tv_sec * 1000) * 1000; -#ifdef WIN32 +#ifdef _WIN32 ret = ::select(fd + 1, 0, &wFdSet, &xFdSet, &tv); #else ret = ::select(fd + 1, 0, &wFdSet, 0, &tv); @@ -417,7 +417,7 @@ repeatConnect: } else { -#ifdef WIN32 +#ifdef _WIN32 ret = ::select(fd + 1, 0, &wFdSet, &xFdSet, 0); #else ret = ::select(fd + 1, 0, &wFdSet, 0, 0); @@ -441,7 +441,7 @@ repeatConnect: throw ex; } -#ifdef WIN32 +#ifdef _WIN32 // // Strange windows bug: The following call to Sleep() is // necessary, otherwise no error is reported through @@ -462,7 +462,7 @@ repeatConnect: if (val > 0) { closeSocket(fd); -#ifdef WIN32 +#ifdef _WIN32 WSASetLastError(val); #else errno = val; @@ -561,7 +561,7 @@ repeatAccept: setTcpNoDelay(ret); setKeepAlive(ret); -#ifdef WIN32 +#ifdef _WIN32 // // Set larger send buffer size to avoid performance problems on // WIN32 @@ -593,7 +593,7 @@ IceInternal::getAddress(const string& host, int port, struct sockaddr_in& addr) { entry = gethostbyname(host.c_str()); } -#ifdef WIN32 +#ifdef _WIN32 while (!entry && WSAGetLastError() == WSATRY_AGAIN && --retry >= 0); #else while (!entry && h_errno == TRY_AGAIN && --retry >= 0); @@ -621,7 +621,7 @@ IceInternal::compareAddress(const struct sockaddr_in& addr1, const struct sockad void IceInternal::createPipe(SOCKET fds[2]) { -#ifdef WIN32 +#ifdef _WIN32 SOCKET fd = createSocket(false); @@ -670,7 +670,7 @@ IceInternal::createPipe(SOCKET fds[2]) #endif } -#ifdef WIN32 +#ifdef _WIN32 string IceInternal::errorToString(int error) @@ -897,7 +897,7 @@ IceInternal::errorToStringDNS(int error) string IceInternal::lastErrorToString() { -#ifdef WIN32 +#ifdef _WIN32 return errorToString(WSAGetLastError()); #else return errorToString(errno); @@ -907,7 +907,7 @@ IceInternal::lastErrorToString() string IceInternal::lastErrorToStringDNS() { -#ifdef WIN32 +#ifdef _WIN32 return errorToStringDNS(WSAGetLastError()); #else return errorToStringDNS(h_errno); diff --git a/cpp/src/Ice/Network.h b/cpp/src/Ice/Network.h index 84b63a9f4bd..f4526776a46 100644 --- a/cpp/src/Ice/Network.h +++ b/cpp/src/Ice/Network.h @@ -13,7 +13,7 @@ #include <Ice/Config.h> -#ifdef WIN32 +#ifdef _WIN32 # include <winsock.h> #else # include <unistd.h> @@ -26,11 +26,11 @@ # include <netdb.h> #endif -#ifdef WIN32 +#ifdef _WIN32 typedef int socklen_t; #endif -#ifndef WIN32 +#ifndef _WIN32 # define SOCKET int # define SOCKET_ERROR -1 # define INVALID_SOCKET -1 diff --git a/cpp/src/Ice/ObjectAdapterI.cpp b/cpp/src/Ice/ObjectAdapterI.cpp index 841a8a9f8cf..0ec2ddfe363 100644 --- a/cpp/src/Ice/ObjectAdapterI.cpp +++ b/cpp/src/Ice/ObjectAdapterI.cpp @@ -22,7 +22,7 @@ #include <Ice/Properties.h> #include <Ice/Functional.h> -#ifdef WIN32 +#ifdef _WIN32 # include <sys/timeb.h> #else # include <sys/time.h> diff --git a/cpp/src/Ice/SslAcceptor.cpp b/cpp/src/Ice/SslAcceptor.cpp index cf346576354..15c28498d75 100644 --- a/cpp/src/Ice/SslAcceptor.cpp +++ b/cpp/src/Ice/SslAcceptor.cpp @@ -13,7 +13,7 @@ // This is due to STL template identifiers expansion. // The MSDN Library recommends that you put this pragma directive // in place to avoid the warnings. -#ifdef WIN32 +#ifdef _WIN32 # pragma warning(disable:4786) #endif diff --git a/cpp/src/Ice/SslAcceptor.h b/cpp/src/Ice/SslAcceptor.h index 5192052674b..b0596b46dd1 100644 --- a/cpp/src/Ice/SslAcceptor.h +++ b/cpp/src/Ice/SslAcceptor.h @@ -17,7 +17,7 @@ #include <Ice/LoggerF.h> #include <Ice/Acceptor.h> -#ifndef WIN32 +#ifndef _WIN32 # include <netinet/in.h> // For struct sockaddr_in #endif diff --git a/cpp/src/Ice/SslConnectionOpenSSL.cpp b/cpp/src/Ice/SslConnectionOpenSSL.cpp index 7bc74e0559d..a0116fdf1c1 100644 --- a/cpp/src/Ice/SslConnectionOpenSSL.cpp +++ b/cpp/src/Ice/SslConnectionOpenSSL.cpp @@ -13,7 +13,7 @@ // This is due to STL template identifiers expansion. // The MSDN Library recommends that you put this pragma directive // in place to avoid the warnings. -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(disable:4786) #endif diff --git a/cpp/src/Ice/SslConnectionOpenSSLClient.cpp b/cpp/src/Ice/SslConnectionOpenSSLClient.cpp index 9519309ece5..ecb01cfd07a 100644 --- a/cpp/src/Ice/SslConnectionOpenSSLClient.cpp +++ b/cpp/src/Ice/SslConnectionOpenSSLClient.cpp @@ -226,7 +226,7 @@ IceSSL::OpenSSL::ClientConnection::write(Buffer& buf, int timeout) int packetSize = buf.b.end() - buf.i; -#ifdef WIN32 +#ifdef _WIN32 // // Limit packet size to avoid performance problems on WIN32. // (blatantly ripped off from Marc Laukien) diff --git a/cpp/src/Ice/SslConnectionOpenSSLServer.cpp b/cpp/src/Ice/SslConnectionOpenSSLServer.cpp index 86f169fd3c7..81792b6ddc6 100644 --- a/cpp/src/Ice/SslConnectionOpenSSLServer.cpp +++ b/cpp/src/Ice/SslConnectionOpenSSLServer.cpp @@ -238,7 +238,7 @@ IceSSL::OpenSSL::ServerConnection::write(Buffer& buf, int timeout) int packetSize = buf.b.end() - buf.i; -#ifdef WIN32 +#ifdef _WIN32 // // Limit packet size to avoid performance problems on WIN32. // diff --git a/cpp/src/Ice/SslConnector.cpp b/cpp/src/Ice/SslConnector.cpp index 67aa125928e..fa14f529dbc 100644 --- a/cpp/src/Ice/SslConnector.cpp +++ b/cpp/src/Ice/SslConnector.cpp @@ -13,7 +13,7 @@ // This is due to STL template identifiers expansion. // The MSDN Library recommends that you put this pragma directive // in place to avoid the warnings. -#ifdef WIN32 +#ifdef _WIN32 # pragma warning(disable:4786) #endif diff --git a/cpp/src/Ice/SslConnector.h b/cpp/src/Ice/SslConnector.h index a82fdfef5e0..533d3be2018 100644 --- a/cpp/src/Ice/SslConnector.h +++ b/cpp/src/Ice/SslConnector.h @@ -17,7 +17,7 @@ #include <Ice/LoggerF.h> #include <Ice/Connector.h> -#ifndef WIN32 +#ifndef _WIN32 # include <netinet/in.h> // For struct sockaddr_in #endif diff --git a/cpp/src/Ice/SslException2.cpp b/cpp/src/Ice/SslException2.cpp index a6f297b61a6..866fe875d82 100644 --- a/cpp/src/Ice/SslException2.cpp +++ b/cpp/src/Ice/SslException2.cpp @@ -13,7 +13,7 @@ // This is due to STL template identifiers expansion. // The MSDN Library recommends that you put this pragma directive // in place to avoid the warnings. -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(disable:4786) #endif diff --git a/cpp/src/Ice/SslFactory.cpp b/cpp/src/Ice/SslFactory.cpp index 791cce078aa..4c1f7fde446 100644 --- a/cpp/src/Ice/SslFactory.cpp +++ b/cpp/src/Ice/SslFactory.cpp @@ -13,7 +13,7 @@ // This is due to STL template identifiers expansion. // The MSDN Library recommends that you put this pragma directive // in place to avoid the warnings. -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(disable:4786) #endif diff --git a/cpp/src/Ice/SystemOpenSSL.cpp b/cpp/src/Ice/SystemOpenSSL.cpp index f24c2567a92..f14dc4f8981 100644 --- a/cpp/src/Ice/SystemOpenSSL.cpp +++ b/cpp/src/Ice/SystemOpenSSL.cpp @@ -13,7 +13,7 @@ // This is due to STL template identifiers expansion. // The MSDN Library recommends that you put this pragma directive // in place to avoid the warnings. -#ifdef WIN32 +#ifdef _WIN32 # pragma warning(disable:4786) #endif diff --git a/cpp/src/Ice/TcpAcceptor.h b/cpp/src/Ice/TcpAcceptor.h index c0d773c48f8..e98a222f401 100644 --- a/cpp/src/Ice/TcpAcceptor.h +++ b/cpp/src/Ice/TcpAcceptor.h @@ -17,7 +17,7 @@ #include <Ice/LoggerF.h> #include <Ice/Acceptor.h> -#ifndef WIN32 +#ifndef _WIN32 # include <netinet/in.h> // For struct sockaddr_in #endif diff --git a/cpp/src/Ice/TcpConnector.h b/cpp/src/Ice/TcpConnector.h index adcf43ec4c7..e554d7210b5 100644 --- a/cpp/src/Ice/TcpConnector.h +++ b/cpp/src/Ice/TcpConnector.h @@ -17,7 +17,7 @@ #include <Ice/LoggerF.h> #include <Ice/Connector.h> -#ifndef WIN32 +#ifndef _WIN32 # include <netinet/in.h> // For struct sockaddr_in #endif diff --git a/cpp/src/Ice/TcpTransceiver.cpp b/cpp/src/Ice/TcpTransceiver.cpp index 7c368929d45..30ff76394d3 100644 --- a/cpp/src/Ice/TcpTransceiver.cpp +++ b/cpp/src/Ice/TcpTransceiver.cpp @@ -58,7 +58,7 @@ IceInternal::TcpTransceiver::write(Buffer& buf, int timeout) { int packetSize = buf.b.end() - buf.i; -#ifdef WIN32 +#ifdef _WIN32 // // Limit packet size to avoid performance problems on WIN32 // diff --git a/cpp/src/Ice/ThreadPool.cpp b/cpp/src/Ice/ThreadPool.cpp index 382fb0dae24..6632fc6b578 100644 --- a/cpp/src/Ice/ThreadPool.cpp +++ b/cpp/src/Ice/ThreadPool.cpp @@ -56,7 +56,7 @@ void IceInternal::ThreadPool::initiateServerShutdown() { char c = 1; -#ifdef WIN32 +#ifdef _WIN32 ::send(_fdIntrWrite, &c, 1, 0); #else ::write(_fdIntrWrite, &c, 1); @@ -205,7 +205,7 @@ IceInternal::ThreadPool::clearInterrupt() { bool shutdown = false; char c; -#ifdef WIN32 +#ifdef _WIN32 while (::recv(_fdIntrRead, &c, 1, 0) == 1) #else while (::read(_fdIntrRead, &c, 1) == 1) @@ -224,7 +224,7 @@ void IceInternal::ThreadPool::setInterrupt() { char c = 0; -#ifdef WIN32 +#ifdef _WIN32 ::send(_fdIntrWrite, &c, 1, 0); #else ::write(_fdIntrWrite, &c, 1); @@ -336,7 +336,7 @@ IceInternal::ThreadPool::run() // Optimization for WIN32 specific version of fd_set. Looping with a // FD_ISSET test like for Unix is very unefficient for WIN32. // -#ifdef WIN32 +#ifdef _WIN32 // // Round robin for the filedescriptors. // diff --git a/cpp/src/Ice/ThreadPool.h b/cpp/src/Ice/ThreadPool.h index dd19af17cf1..90674028b28 100644 --- a/cpp/src/Ice/ThreadPool.h +++ b/cpp/src/Ice/ThreadPool.h @@ -23,7 +23,7 @@ #include <Ice/EventHandlerF.h> #include <deque> -#ifndef WIN32 +#ifndef _WIN32 # define SOCKET int #endif diff --git a/cpp/src/Ice/Transceiver.h b/cpp/src/Ice/Transceiver.h index 1e555cda850..9a979f4b527 100644 --- a/cpp/src/Ice/Transceiver.h +++ b/cpp/src/Ice/Transceiver.h @@ -14,7 +14,7 @@ #include <IceUtil/Shared.h> #include <Ice/TransceiverF.h> -#ifndef WIN32 +#ifndef _WIN32 # define SOCKET int #endif diff --git a/cpp/src/Ice/UdpTransceiver.h b/cpp/src/Ice/UdpTransceiver.h index 9cfa267d9d8..1b552f7e937 100644 --- a/cpp/src/Ice/UdpTransceiver.h +++ b/cpp/src/Ice/UdpTransceiver.h @@ -16,7 +16,7 @@ #include <Ice/LoggerF.h> #include <Ice/Transceiver.h> -#ifndef WIN32 +#ifndef _WIN32 # include <netinet/in.h> // For struct sockaddr_in #endif diff --git a/cpp/src/IcePack/Activator.cpp b/cpp/src/IcePack/Activator.cpp index c3890c7239e..821755e3821 100644 --- a/cpp/src/IcePack/Activator.cpp +++ b/cpp/src/IcePack/Activator.cpp @@ -8,7 +8,7 @@ // // ********************************************************************** -#ifdef WIN32 +#ifdef _WIN32 # error Sorry, the IcePack Activator is not yet supported on WIN32. #endif diff --git a/cpp/src/IcePack/Client.cpp b/cpp/src/IcePack/Client.cpp index 8603fb574ef..7a611c15a3f 100644 --- a/cpp/src/IcePack/Client.cpp +++ b/cpp/src/IcePack/Client.cpp @@ -189,7 +189,7 @@ Client::run(int argc, char* argv[]) test.close(); string cmd = cpp + " " + argv[idx]; -#ifdef WIN32 +#ifdef _WIN32 FILE* cppHandle = _popen(cmd.c_str(), "r"); #else FILE* cppHandle = popen(cmd.c_str(), "r"); @@ -202,7 +202,7 @@ Client::run(int argc, char* argv[]) int parseStatus = parser->parse(cppHandle, debug); -#ifdef WIN32 +#ifdef _WIN32 _pclose(cppHandle); #else pclose(cppHandle); diff --git a/cpp/src/IcePack/Forward.cpp b/cpp/src/IcePack/Forward.cpp index 027f61eb1c0..8e643f9aa61 100644 --- a/cpp/src/IcePack/Forward.cpp +++ b/cpp/src/IcePack/Forward.cpp @@ -20,7 +20,7 @@ IcePack::Forward::Forward(const CommunicatorPtr& communicator, const AdminPtr& a _communicator(communicator), _admin(admin) { -#ifndef WIN32 +#ifndef _WIN32 _activator = new Activator(_communicator); _activator->start(); @@ -54,7 +54,7 @@ IcePack::Forward::locate(const ObjectAdapterPtr& adapter, const Current& current return 0; } -#ifndef WIN32 +#ifndef _WIN32 assert(_activator); @@ -156,7 +156,7 @@ IcePack::Forward::finished(const ObjectAdapterPtr&, const Current&, const Object void IcePack::Forward::deactivate() { -#ifndef WIN32 +#ifndef _WIN32 _activator->destroy(); _activator->getThreadControl().join(); _activator = 0; diff --git a/cpp/src/IcePack/Forward.h b/cpp/src/IcePack/Forward.h index 5eec443f30b..ac2f2646238 100644 --- a/cpp/src/IcePack/Forward.h +++ b/cpp/src/IcePack/Forward.h @@ -12,7 +12,7 @@ #define ICE_PACK_FORWARD_H #include <IcePack/AdminF.h> -#ifndef WIN32 +#ifndef _WIN32 # include <IcePack/Activator.h> #endif @@ -35,7 +35,7 @@ private: Ice::CommunicatorPtr _communicator; AdminPtr _admin; -#ifndef WIN32 +#ifndef _WIN32 ActivatorPtr _activator; int _waitTime; #endif diff --git a/cpp/src/IcePack/Grammar.y b/cpp/src/IcePack/Grammar.y index 5b1ba26f137..51e02179c67 100644 --- a/cpp/src/IcePack/Grammar.y +++ b/cpp/src/IcePack/Grammar.y @@ -13,7 +13,7 @@ #include <Ice/Ice.h> #include <IcePack/Parser.h> -#ifdef WIN32 +#ifdef _WIN32 // I get this warning from some bison version: // warning C4102: 'yyoverflowlab' : unreferenced label # pragma warning( disable : 4102 ) diff --git a/cpp/src/IcePack/Parser.h b/cpp/src/IcePack/Parser.h index 2d891c2086c..cbb3fb058d0 100644 --- a/cpp/src/IcePack/Parser.h +++ b/cpp/src/IcePack/Parser.h @@ -15,7 +15,7 @@ #include <IcePack/Admin.h> #include <list> -#ifdef WIN32 +#ifdef _WIN32 # include <io.h> # define isatty _isatty # define fileno _fileno diff --git a/cpp/src/IcePack/Server.cpp b/cpp/src/IcePack/Server.cpp index cf0ae1db96e..703138f8dd8 100644 --- a/cpp/src/IcePack/Server.cpp +++ b/cpp/src/IcePack/Server.cpp @@ -11,7 +11,7 @@ #include <Ice/Application.h> #include <IcePack/AdminI.h> #include <IcePack/Forward.h> -#ifndef WIN32 +#ifndef _WIN32 # include <signal.h> # include <sys/wait.h> #endif @@ -28,7 +28,7 @@ public: virtual int run(int, char*[]); }; -#ifndef WIN32 +#ifndef _WIN32 static void childHandler(int) { @@ -39,7 +39,7 @@ childHandler(int) int main(int argc, char* argv[]) { -#ifndef WIN32 +#ifndef _WIN32 // // This application forks, so we need a signal handler for child // termination. diff --git a/cpp/src/IcePatch/Util.cpp b/cpp/src/IcePatch/Util.cpp index 76b9c004fa0..e6b46ad3bd6 100644 --- a/cpp/src/IcePatch/Util.cpp +++ b/cpp/src/IcePatch/Util.cpp @@ -16,7 +16,7 @@ #include <openssl/md5.h> #include <bzlib.h> -#ifndef WIN32 +#ifndef _WIN32 # include <unistd.h> # include <dirent.h> #else @@ -175,7 +175,7 @@ IcePatch::removeRecursive(const string& path) void IcePatch::changeDirectory(const string& path) { -#ifdef WIN32 +#ifdef _WIN32 if (_chdir(path.c_str()) == -1) #else if (chdir(path.c_str()) == -1) @@ -190,7 +190,7 @@ IcePatch::changeDirectory(const string& path) StringSeq IcePatch::readDirectory(const string& path) { -#ifdef WIN32 +#ifdef _WIN32 struct _finddata_t data; long h = _findfirst((path + "/*").c_str(), &data); @@ -265,7 +265,7 @@ IcePatch::readDirectory(const string& path) void IcePatch::createDirectory(const string& path) { -#ifdef WIN32 +#ifdef _WIN32 if (::_mkdir(path.c_str()) == -1) #else if (::mkdir(path.c_str(), 00777) == -1) diff --git a/cpp/src/IceStorm/Admin.cpp b/cpp/src/IceStorm/Admin.cpp index 527564fc749..bcf7e9f51a7 100644 --- a/cpp/src/IceStorm/Admin.cpp +++ b/cpp/src/IceStorm/Admin.cpp @@ -206,7 +206,7 @@ Client::run(int argc, char* argv[]) test.close(); string cmd = cpp + " " + argv[idx]; -#ifdef WIN32 +#ifdef _WIN32 FILE* cppHandle = _popen(cmd.c_str(), "r"); #else FILE* cppHandle = popen(cmd.c_str(), "r"); @@ -219,7 +219,7 @@ Client::run(int argc, char* argv[]) int parseStatus = parser->parse(cppHandle, debug); -#ifdef WIN32 +#ifdef _WIN32 _pclose(cppHandle); #else pclose(cppHandle); diff --git a/cpp/src/IceStorm/Grammar.y b/cpp/src/IceStorm/Grammar.y index ea0de4a56e2..1af6f9bc745 100644 --- a/cpp/src/IceStorm/Grammar.y +++ b/cpp/src/IceStorm/Grammar.y @@ -13,7 +13,7 @@ #include <Ice/Ice.h> #include <IceStorm/Parser.h> -#ifdef WIN32 +#ifdef _WIN32 // I get this warning from some bison version: // warning C4102: 'yyoverflowlab' : unreferenced label # pragma warning( disable : 4102 ) diff --git a/cpp/src/IceStorm/Parser.h b/cpp/src/IceStorm/Parser.h index 3b8a4936fe7..a60d2866f58 100644 --- a/cpp/src/IceStorm/Parser.h +++ b/cpp/src/IceStorm/Parser.h @@ -15,7 +15,7 @@ #include <IceStorm/IceStorm.h> #include <list> -#ifdef WIN32 +#ifdef _WIN32 # include <io.h> # define isatty _isatty # define fileno _fileno diff --git a/cpp/src/IceStorm/WeightedGraph.cpp b/cpp/src/IceStorm/WeightedGraph.cpp index ba86a8a34e6..a00d0a4666e 100644 --- a/cpp/src/IceStorm/WeightedGraph.cpp +++ b/cpp/src/IceStorm/WeightedGraph.cpp @@ -65,7 +65,7 @@ public: } }; -#ifdef WIN32 +#ifdef _WIN32 # pragma warning(disable:4786) #endif diff --git a/cpp/src/IceUtil/Cond.cpp b/cpp/src/IceUtil/Cond.cpp index 807295d2441..476e936295e 100644 --- a/cpp/src/IceUtil/Cond.cpp +++ b/cpp/src/IceUtil/Cond.cpp @@ -10,11 +10,11 @@ #include <IceUtil/Cond.h> -#ifndef WIN32 +#ifndef _WIN32 # include <sys/time.h> #endif -#ifdef WIN32 +#ifdef _WIN32 IceUtil::Semaphore::Semaphore(long initial) { diff --git a/cpp/src/IceUtil/Exception.cpp b/cpp/src/IceUtil/Exception.cpp index 0c43d6e09f3..38afb2406ef 100644 --- a/cpp/src/IceUtil/Exception.cpp +++ b/cpp/src/IceUtil/Exception.cpp @@ -132,7 +132,7 @@ IceUtil::SyscallException::ice_throw() const throw *this; } -#ifdef WIN32 +#ifdef _WIN32 string IceUtil::SyscallException::errorToString(DWORD error) { diff --git a/cpp/src/IceUtil/RecMutex.cpp b/cpp/src/IceUtil/RecMutex.cpp index 98775a5cc86..9a876fb2ccd 100644 --- a/cpp/src/IceUtil/RecMutex.cpp +++ b/cpp/src/IceUtil/RecMutex.cpp @@ -13,7 +13,7 @@ using namespace std; -#ifdef WIN32 +#ifdef _WIN32 IceUtil::RecMutex::RecMutex() : _count(0) diff --git a/cpp/src/IceUtil/Thread.cpp b/cpp/src/IceUtil/Thread.cpp index f2121a1e45c..717ccb66622 100644 --- a/cpp/src/IceUtil/Thread.cpp +++ b/cpp/src/IceUtil/Thread.cpp @@ -13,7 +13,7 @@ using namespace std; -#ifdef WIN32 +#ifdef _WIN32 IceUtil::ThreadControl::ThreadControl() : _handle(new HandleWrapper(0)), diff --git a/cpp/src/IceUtil/UUID.cpp b/cpp/src/IceUtil/UUID.cpp index 9befbbfbb4a..61c2f24f9b5 100644 --- a/cpp/src/IceUtil/UUID.cpp +++ b/cpp/src/IceUtil/UUID.cpp @@ -10,7 +10,7 @@ #include <IceUtil/UUID.h> -#ifdef WIN32 +#ifdef _WIN32 # include <rpc.h> #else extern "C" // uuid/uuid.h seems to miss extern "C" declarations. @@ -24,7 +24,7 @@ using namespace std; string IceUtil::generateUUID() { -#ifdef WIN32 +#ifdef _WIN32 UUID uuid; UuidCreate(&uuid); diff --git a/cpp/src/Slice/CPlusPlusUtil.cpp b/cpp/src/Slice/CPlusPlusUtil.cpp index da0c7a37fe9..27e31914a31 100644 --- a/cpp/src/Slice/CPlusPlusUtil.cpp +++ b/cpp/src/Slice/CPlusPlusUtil.cpp @@ -89,7 +89,7 @@ Slice::printDllExportStuff(Output& out, const string& dllExport) if (dllExport.size()) { out << sp; - out << "\n#ifdef WIN32"; + out << "\n#ifdef _WIN32"; out << "\n# ifdef " << dllExport << "_EXPORTS"; out << "\n# define " << dllExport << " __declspec(dllexport)"; out << "\n# else"; diff --git a/cpp/src/Slice/Grammar.y b/cpp/src/Slice/Grammar.y index 78f3a118e8f..58abb4fc474 100644 --- a/cpp/src/Slice/Grammar.y +++ b/cpp/src/Slice/Grammar.y @@ -12,7 +12,7 @@ #include <Slice/GrammarUtil.h> -#ifdef WIN32 +#ifdef _WIN32 // I get this warning from some bison version: // warning C4102: 'yyoverflowlab' : unreferenced label # pragma warning( disable : 4102 ) diff --git a/cpp/src/Slice/JavaUtil.cpp b/cpp/src/Slice/JavaUtil.cpp index 57f5a1c6b4c..dfca45db6ae 100644 --- a/cpp/src/Slice/JavaUtil.cpp +++ b/cpp/src/Slice/JavaUtil.cpp @@ -15,11 +15,11 @@ #include <sys/types.h> #include <sys/stat.h> -#ifdef WIN32 +#ifdef _WIN32 #include <direct.h> #endif -#ifndef WIN32 +#ifndef _WIN32 #include <unistd.h> #endif @@ -84,7 +84,7 @@ Slice::JavaGenerator::open(const string& absolute) { continue; } -#ifdef WIN32 +#ifdef _WIN32 result = _mkdir(path.c_str()); #else result = mkdir(path.c_str(), S_IRWXU | S_IRWXG | S_IRWXO); diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index 4f14a7bd3c3..d4904cd6ba1 100644 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -646,7 +646,7 @@ Slice::Gen::TypesVisitor::visitSequence(const SequencePtr& p) C << nl << "while (sz--)"; C << sb; C.zeroIndent(); - C << nl << "#ifdef WIN32"; // STLBUG + C << nl << "#ifdef _WIN32"; // STLBUG C.restoreIndent(); C << nl << "v.push_back(" << typeToString(type) << "());"; C.zeroIndent(); @@ -680,7 +680,7 @@ Slice::Gen::TypesVisitor::visitSequence(const SequencePtr& p) C << nl << "while (sz--)"; C << sb; C.zeroIndent(); - C << nl << "#ifdef WIN32"; // STLBUG + C << nl << "#ifdef _WIN32"; // STLBUG C.restoreIndent(); C << nl << "v.push_back(" << typeToString(type) << "());"; C.zeroIndent(); @@ -944,7 +944,7 @@ Slice::Gen::TypesVisitor::emitExceptionBase(const ExceptionPtr& base, const std: if (base) { C.zeroIndent(); - C << nl << "#ifdef WIN32"; // COMPILERBUG + C << nl << "#ifdef _WIN32"; // COMPILERBUG C.restoreIndent(); C << nl << base->name() << "::" << call << ";"; C.zeroIndent(); @@ -2329,7 +2329,7 @@ Slice::Gen::ObjectVisitor::emitClassBase(const ClassDefPtr& base, const std::str if (base) { C.zeroIndent(); - C << nl << "#ifdef WIN32"; // COMPILERBUG + C << nl << "#ifdef _WIN32"; // COMPILERBUG C.restoreIndent(); C << nl << base->name() << "::" << call << ";"; C.zeroIndent(); @@ -2343,7 +2343,7 @@ Slice::Gen::ObjectVisitor::emitClassBase(const ClassDefPtr& base, const std::str else { C.zeroIndent(); - C << nl << "#ifdef WIN32"; // COMPILERBUG + C << nl << "#ifdef _WIN32"; // COMPILERBUG C.restoreIndent(); C << nl << "Object::" << call << ";"; C.zeroIndent(); diff --git a/cpp/src/slice2cpp/Main.cpp b/cpp/src/slice2cpp/Main.cpp index d8a9ea8d2a1..8d8c02dee57 100644 --- a/cpp/src/slice2cpp/Main.cpp +++ b/cpp/src/slice2cpp/Main.cpp @@ -199,7 +199,7 @@ main(int argc, char* argv[]) test.close(); string cmd = cpp + " " + argv[idx]; -#ifdef WIN32 +#ifdef _WIN32 FILE* cppHandle = _popen(cmd.c_str(), "r"); #else FILE* cppHandle = popen(cmd.c_str(), "r"); @@ -213,7 +213,7 @@ main(int argc, char* argv[]) UnitPtr unit = Unit::createUnit(false, false); int parseStatus = unit->parse(cppHandle, debug); -#ifdef WIN32 +#ifdef _WIN32 _pclose(cppHandle); #else pclose(cppHandle); diff --git a/cpp/src/slice2docbook/Main.cpp b/cpp/src/slice2docbook/Main.cpp index 840271593ee..9fc7c400144 100644 --- a/cpp/src/slice2docbook/Main.cpp +++ b/cpp/src/slice2docbook/Main.cpp @@ -186,7 +186,7 @@ main(int argc, char* argv[]) test.close(); string cmd = cpp + " " + argv[idx]; -#ifdef WIN32 +#ifdef _WIN32 FILE* cppHandle = _popen(cmd.c_str(), "r"); #else FILE* cppHandle = popen(cmd.c_str(), "r"); @@ -200,7 +200,7 @@ main(int argc, char* argv[]) status = unit->parse(cppHandle, debug); -#ifdef WIN32 +#ifdef _WIN32 _pclose(cppHandle); #else pclose(cppHandle); diff --git a/cpp/src/slice2freeze/Main.cpp b/cpp/src/slice2freeze/Main.cpp index ef34ac40ed1..cb2aaf11a88 100644 --- a/cpp/src/slice2freeze/Main.cpp +++ b/cpp/src/slice2freeze/Main.cpp @@ -426,7 +426,7 @@ main(int argc, char* argv[]) test.close(); string cmd = cpp + " " + argv[idx]; -#ifdef WIN32 +#ifdef _WIN32 FILE* cppHandle = _popen(cmd.c_str(), "r"); #else FILE* cppHandle = popen(cmd.c_str(), "r"); @@ -440,7 +440,7 @@ main(int argc, char* argv[]) status = unit->parse(cppHandle, debug); -#ifdef WIN32 +#ifdef _WIN32 _pclose(cppHandle); #else pclose(cppHandle); diff --git a/cpp/src/slice2freezej/Main.cpp b/cpp/src/slice2freezej/Main.cpp index 88bf0661753..3db69abe047 100644 --- a/cpp/src/slice2freezej/Main.cpp +++ b/cpp/src/slice2freezej/Main.cpp @@ -512,7 +512,7 @@ main(int argc, char* argv[]) test.close(); string cmd = cpp + " " + argv[idx]; -#ifdef WIN32 +#ifdef _WIN32 FILE* cppHandle = _popen(cmd.c_str(), "r"); #else FILE* cppHandle = popen(cmd.c_str(), "r"); @@ -526,7 +526,7 @@ main(int argc, char* argv[]) status = unit->parse(cppHandle, debug); -#ifdef WIN32 +#ifdef _WIN32 _pclose(cppHandle); #else pclose(cppHandle); diff --git a/cpp/src/slice2java/Main.cpp b/cpp/src/slice2java/Main.cpp index 22d0cd8c592..4e76f0351d1 100644 --- a/cpp/src/slice2java/Main.cpp +++ b/cpp/src/slice2java/Main.cpp @@ -218,7 +218,7 @@ main(int argc, char* argv[]) test.close(); string cmd = cpp + " " + argv[idx]; -#ifdef WIN32 +#ifdef _WIN32 FILE* cppHandle = _popen(cmd.c_str(), "r"); #else FILE* cppHandle = popen(cmd.c_str(), "r"); @@ -233,7 +233,7 @@ main(int argc, char* argv[]) UnitPtr unit = Unit::createUnit(false, false); int parseStatus = unit->parse(cppHandle, debug); -#ifdef WIN32 +#ifdef _WIN32 _pclose(cppHandle); #else pclose(cppHandle); diff --git a/cpp/src/slice2wsdl/Main.cpp b/cpp/src/slice2wsdl/Main.cpp index e1d77cb24f6..a814b6e514d 100644 --- a/cpp/src/slice2wsdl/Main.cpp +++ b/cpp/src/slice2wsdl/Main.cpp @@ -168,7 +168,7 @@ main(int argc, char* argv[]) test.close(); string cmd = cpp + " " + sourceFile; -#ifdef WIN32 +#ifdef _WIN32 FILE* cppHandle = _popen(cmd.c_str(), "r"); #else FILE* cppHandle = popen(cmd.c_str(), "r"); @@ -183,7 +183,7 @@ main(int argc, char* argv[]) UnitPtr unit = Unit::createUnit(false, false); int parseStatus = unit->parse(cppHandle, debug); -#ifdef WIN32 +#ifdef _WIN32 _pclose(cppHandle); #else pclose(cppHandle); diff --git a/cpp/src/slice2xsd/Main.cpp b/cpp/src/slice2xsd/Main.cpp index 43f041d7302..ce97a00c8a7 100644 --- a/cpp/src/slice2xsd/Main.cpp +++ b/cpp/src/slice2xsd/Main.cpp @@ -169,7 +169,7 @@ main(int argc, char* argv[]) test.close(); string cmd = cpp + " " + argv[idx]; -#ifdef WIN32 +#ifdef _WIN32 FILE* cppHandle = _popen(cmd.c_str(), "r"); #else FILE* cppHandle = popen(cmd.c_str(), "r"); @@ -184,7 +184,7 @@ main(int argc, char* argv[]) UnitPtr unit = Unit::createUnit(false, false); int parseStatus = unit->parse(cppHandle, debug); -#ifdef WIN32 +#ifdef _WIN32 _pclose(cppHandle); #else pclose(cppHandle); |