diff options
Diffstat (limited to 'cpp')
97 files changed, 196 insertions, 196 deletions
diff --git a/cpp/demo/Freeze/bench/Client.cpp b/cpp/demo/Freeze/bench/Client.cpp index d54ee1a167a..d347584c542 100644 --- a/cpp/demo/Freeze/bench/Client.cpp +++ b/cpp/demo/Freeze/bench/Client.cpp @@ -10,7 +10,7 @@ #include <Freeze/Application.h> -#ifdef WIN32 +#ifdef _WIN32 # include <sys/timeb.h> #else # include <sys/time.h> @@ -78,7 +78,7 @@ private: void getTime(timeval& tv) { -#ifdef WIN32 +#ifdef _WIN32 struct _timeb tb1; _ftime(&tb1); tv.tv_sec = tb1.time; diff --git a/cpp/demo/Freeze/library/Grammar.y b/cpp/demo/Freeze/library/Grammar.y index 034ffaa53bd..54726d25168 100644 --- a/cpp/demo/Freeze/library/Grammar.y +++ b/cpp/demo/Freeze/library/Grammar.y @@ -13,7 +13,7 @@ #include <Ice/Ice.h> #include <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/demo/Freeze/library/Parser.h b/cpp/demo/Freeze/library/Parser.h index 01757b87a04..fa074055cd1 100644 --- a/cpp/demo/Freeze/library/Parser.h +++ b/cpp/demo/Freeze/library/Parser.h @@ -16,7 +16,7 @@ #include <Library.h> #include <list> -#ifdef WIN32 +#ifdef _WIN32 # include <io.h> # define isatty _isatty # define fileno _fileno diff --git a/cpp/demo/Freeze/phonebook/Grammar.y b/cpp/demo/Freeze/phonebook/Grammar.y index 77587254ee9..1d3c36ec136 100644 --- a/cpp/demo/Freeze/phonebook/Grammar.y +++ b/cpp/demo/Freeze/phonebook/Grammar.y @@ -13,7 +13,7 @@ #include <Ice/Ice.h> #include <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/demo/Freeze/phonebook/Parser.h b/cpp/demo/Freeze/phonebook/Parser.h index f7ecbb92e4a..56fbc5b7456 100644 --- a/cpp/demo/Freeze/phonebook/Parser.h +++ b/cpp/demo/Freeze/phonebook/Parser.h @@ -16,7 +16,7 @@ #include <PhoneBook.h> #include <list> -#ifdef WIN32 +#ifdef _WIN32 # include <io.h> # define isatty _isatty # define fileno _fileno diff --git a/cpp/demo/Freeze/phonebook/PhoneBookI.cpp b/cpp/demo/Freeze/phonebook/PhoneBookI.cpp index 7521cfd5b65..1e472fa0c99 100644 --- a/cpp/demo/Freeze/phonebook/PhoneBookI.cpp +++ b/cpp/demo/Freeze/phonebook/PhoneBookI.cpp @@ -315,7 +315,7 @@ PhoneBookI::getNewIdentity() { ids = p->second; assert(ids.size() == 1); -#ifdef WIN32 +#ifdef _WIN32 n = _atoi64(ids.front().name.c_str()) + 1; #else n = atoll(ids.front().name.c_str()) + 1; @@ -323,7 +323,7 @@ PhoneBookI::getNewIdentity() } char s[20]; -#ifdef WIN32 +#ifdef _WIN32 sprintf(s, "%I64d", n); #else sprintf(s, "%lld", n); diff --git a/cpp/demo/Ice/latency/Client.cpp b/cpp/demo/Ice/latency/Client.cpp index 4939147f3ad..ed2206c6982 100644 --- a/cpp/demo/Ice/latency/Client.cpp +++ b/cpp/demo/Ice/latency/Client.cpp @@ -10,7 +10,7 @@ #include <Ice/Ice.h> #include <Latency.h> -#ifdef WIN32 +#ifdef _WIN32 # include <sys/timeb.h> #else # include <sys/time.h> @@ -42,7 +42,7 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) ping->ice_ping(); timeval tv1; -#ifdef WIN32 +#ifdef _WIN32 struct _timeb tb1; _ftime(&tb1); tv1.tv_sec = tb1.time; @@ -59,7 +59,7 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) } timeval tv2; -#ifdef WIN32 +#ifdef _WIN32 struct _timeb tb2; _ftime(&tb2); tv2.tv_sec = tb2.time; diff --git a/cpp/include/Freeze/Application.h b/cpp/include/Freeze/Application.h index 0f706b79497..5050a360be8 100644 --- a/cpp/include/Freeze/Application.h +++ b/cpp/include/Freeze/Application.h @@ -11,7 +11,7 @@ #ifndef FREEZE_APPLICATION_H #define FREEZE_APPLICATION_H -#ifdef WIN32 +#ifdef _WIN32 # ifdef FREEZE_API_EXPORTS # define FREEZE_API __declspec(dllexport) # else diff --git a/cpp/include/Freeze/Initialize.h b/cpp/include/Freeze/Initialize.h index 588a9ff2d0b..b68647805f0 100644 --- a/cpp/include/Freeze/Initialize.h +++ b/cpp/include/Freeze/Initialize.h @@ -14,7 +14,7 @@ #include <Ice/Ice.h> #include <Freeze/DBF.h> -#ifdef WIN32 +#ifdef _WIN32 # ifdef FREEZE_API_EXPORTS # define FREEZE_API __declspec(dllexport) # else diff --git a/cpp/include/Ice/CertificateVerifierOpenSSL.h b/cpp/include/Ice/CertificateVerifierOpenSSL.h index d873e4ed1a1..06b203275e5 100644 --- a/cpp/include/Ice/CertificateVerifierOpenSSL.h +++ b/cpp/include/Ice/CertificateVerifierOpenSSL.h @@ -14,7 +14,7 @@ #include <Ice/CertificateVerifier.h> #include <openssl/ssl.h> -#ifdef WIN32 +#ifdef _WIN32 # ifdef ICE_API_EXPORTS # define ICE_API __declspec(dllexport) # else diff --git a/cpp/include/Ice/Config.h b/cpp/include/Ice/Config.h index f92b4726dee..3977875c877 100644 --- a/cpp/include/Ice/Config.h +++ b/cpp/include/Ice/Config.h @@ -38,7 +38,7 @@ namespace IceInternal { } -#if defined(WIN32) +#if defined(_WIN32) # ifdef ICE_API_EXPORTS # define ICE_API __declspec(dllexport) diff --git a/cpp/include/Ice/DynamicLibrary.h b/cpp/include/Ice/DynamicLibrary.h index a8f3f3f38ed..af3ec47bfe9 100644 --- a/cpp/include/Ice/DynamicLibrary.h +++ b/cpp/include/Ice/DynamicLibrary.h @@ -26,7 +26,7 @@ public: bool load(const std::string&); -#ifdef WIN32 +#ifdef _WIN32 typedef FARPROC symbol_type; #else typedef void* symbol_type; @@ -38,7 +38,7 @@ public: private: -#ifdef WIN32 +#ifdef _WIN32 HINSTANCE _hnd; #else void* _hnd; diff --git a/cpp/include/Ice/Handle.h b/cpp/include/Ice/Handle.h index 83f72cb77bc..5672c0527d2 100644 --- a/cpp/include/Ice/Handle.h +++ b/cpp/include/Ice/Handle.h @@ -66,7 +66,7 @@ public: } } -#ifdef WIN32 // COMPILERBUG: Is VC++ or GNU C++ right here??? +#ifdef _WIN32 // COMPILERBUG: Is VC++ or GNU C++ right here??? template<> Handle(const Handle<T>& r) #else @@ -148,7 +148,7 @@ public: return *this; } -#ifdef WIN32 // COMPILERBUG: Is VC++ or GNU C++ right here??? +#ifdef _WIN32 // COMPILERBUG: Is VC++ or GNU C++ right here??? template<> Handle& operator=(const Handle<T>& r) #else diff --git a/cpp/include/Ice/ProxyHandle.h b/cpp/include/Ice/ProxyHandle.h index 5b529ab6d56..842cd09d313 100644 --- a/cpp/include/Ice/ProxyHandle.h +++ b/cpp/include/Ice/ProxyHandle.h @@ -59,7 +59,7 @@ public: } } -#ifdef WIN32 // COMPILERBUG: Is VC++ or GNU C++ right here??? +#ifdef _WIN32 // COMPILERBUG: Is VC++ or GNU C++ right here??? template<> ProxyHandle(const ProxyHandle<T>& r) #else @@ -141,7 +141,7 @@ public: return *this; } -#ifdef WIN32 // COMPILERBUG: Is VC++ or GNU C++ right here??? +#ifdef _WIN32 // COMPILERBUG: Is VC++ or GNU C++ right here??? template<> ProxyHandle& operator=(const ProxyHandle<T>& r) #else diff --git a/cpp/include/Ice/RSACertificateGen.h b/cpp/include/Ice/RSACertificateGen.h index 06499b20ed1..5345711f3a6 100644 --- a/cpp/include/Ice/RSACertificateGen.h +++ b/cpp/include/Ice/RSACertificateGen.h @@ -15,7 +15,7 @@ #include <string> #include <Ice/RSAKeyPairF.h> -#ifdef WIN32 +#ifdef _WIN32 # ifdef ICE_API_EXPORTS # define ICE_API __declspec(dllexport) # else diff --git a/cpp/include/Ice/RSAKeyPair.h b/cpp/include/Ice/RSAKeyPair.h index 6445514e357..fcc9a657e3c 100644 --- a/cpp/include/Ice/RSAKeyPair.h +++ b/cpp/include/Ice/RSAKeyPair.h @@ -22,7 +22,7 @@ #include <Ice/RSAPrivateKeyF.h> #include <Ice/RSAPublicKeyF.h> -#ifdef WIN32 +#ifdef _WIN32 # ifdef ICE_API_EXPORTS # define ICE_API __declspec(dllexport) # else diff --git a/cpp/include/Ice/RSAKeyPairF.h b/cpp/include/Ice/RSAKeyPairF.h index fcdee3a06d2..5caf160596d 100644 --- a/cpp/include/Ice/RSAKeyPairF.h +++ b/cpp/include/Ice/RSAKeyPairF.h @@ -13,7 +13,7 @@ #include <Ice/Handle.h> -#ifdef WIN32 +#ifdef _WIN32 # ifdef ICE_API_EXPORTS # define ICE_API __declspec(dllexport) # else diff --git a/cpp/include/Ice/RSAPrivateKey.h b/cpp/include/Ice/RSAPrivateKey.h index 5720d14eb4f..808183adaaa 100644 --- a/cpp/include/Ice/RSAPrivateKey.h +++ b/cpp/include/Ice/RSAPrivateKey.h @@ -19,7 +19,7 @@ #include <Ice/BuiltinSequences.h> #include <Ice/RSAPrivateKeyF.h> -#ifdef WIN32 +#ifdef _WIN32 # ifdef ICE_API_EXPORTS # define ICE_API __declspec(dllexport) # else diff --git a/cpp/include/Ice/RSAPublicKey.h b/cpp/include/Ice/RSAPublicKey.h index cb903a9f0fe..785369ff595 100644 --- a/cpp/include/Ice/RSAPublicKey.h +++ b/cpp/include/Ice/RSAPublicKey.h @@ -19,7 +19,7 @@ #include <Ice/BuiltinSequences.h> #include <Ice/RSAPublicKeyF.h> -#ifdef WIN32 +#ifdef _WIN32 # ifdef ICE_API_EXPORTS # define ICE_API __declspec(dllexport) # else diff --git a/cpp/include/IceUtil/Cond.h b/cpp/include/IceUtil/Cond.h index 6d3fabfdcff..9574d39cd83 100644 --- a/cpp/include/IceUtil/Cond.h +++ b/cpp/include/IceUtil/Cond.h @@ -14,7 +14,7 @@ #include <IceUtil/Config.h> #include <IceUtil/Exception.h> -#ifdef WIN32 +#ifdef _WIN32 // // Needed for implementation under WIN32. // @@ -35,7 +35,7 @@ template <class T> class Monitor; class RecMutex; class Mutex; -#ifdef WIN32 +#ifdef _WIN32 // // Needed for implementation. // @@ -122,7 +122,7 @@ private: // // The Monitor implementation uses waitImpl & timedwaitImpl. // -#ifdef WIN32 +#ifdef _WIN32 // // For some reason under WIN32 with VC6 using a member-template @@ -276,7 +276,7 @@ private: #endif -#ifdef WIN32 +#ifdef _WIN32 void wake(bool); void preWait() const; void postWait(bool) const; @@ -294,7 +294,7 @@ private: }; -#ifndef WIN32 +#ifndef _WIN32 template <typename M> inline void Cond::waitImpl(const M& mutex) const { diff --git a/cpp/include/IceUtil/Config.h b/cpp/include/IceUtil/Config.h index a9fb48327bc..c35fc59a6b5 100644 --- a/cpp/include/IceUtil/Config.h +++ b/cpp/include/IceUtil/Config.h @@ -11,13 +11,13 @@ #ifndef ICE_UTIL_CONFIG_H #define ICE_UTIL_CONFIG_H -#if defined(WIN32) +#if defined(_WIN32) // Necessary for TryEnterCriticalSection # define _WIN32_WINNT 0x0400 # if !defined(_UNICODE) -# error "Only UNICODE libraries can be used with Ice!" +# error "Only unicode libraries can be used with Ice!" # endif # if !defined(_DLL) || !defined(_MT) @@ -68,12 +68,12 @@ #include <iostream> #include <sstream> -#ifndef WIN32 -# ifndef _REENTRANT -# define _REENTRANT 1 -# endif -# include <pthread.h> -# include <errno.h> +#ifndef _WIN32 +# ifndef _REENTRANT +# define _REENTRANT 1 +# endif +# include <pthread.h> +# include <errno.h> #endif // diff --git a/cpp/include/IceUtil/Exception.h b/cpp/include/IceUtil/Exception.h index f130dbb2ff1..2993d866a9b 100644 --- a/cpp/include/IceUtil/Exception.h +++ b/cpp/include/IceUtil/Exception.h @@ -58,7 +58,7 @@ public: virtual Exception* ice_clone() const; virtual void ice_throw() const; -#ifdef WIN32 +#ifdef _WIN32 // // IceInternal::errorToString does the same thing... refactor? // diff --git a/cpp/include/IceUtil/Handle.h b/cpp/include/IceUtil/Handle.h index 19b04b5bd1f..9fb85388e4f 100644 --- a/cpp/include/IceUtil/Handle.h +++ b/cpp/include/IceUtil/Handle.h @@ -127,7 +127,7 @@ public: } } -#ifdef WIN32 // COMPILERBUG: Is VC++ or GNU C++ right here??? +#ifdef _WIN32 // COMPILERBUG: Is VC++ or GNU C++ right here??? template<> Handle(const Handle<T>& r) #else @@ -189,7 +189,7 @@ public: return *this; } -#ifdef WIN32 // COMPILERBUG: Is VC++ or GNU C++ right here??? +#ifdef _WIN32 // COMPILERBUG: Is VC++ or GNU C++ right here??? template<> Handle& operator=(const Handle<T>& r) #else diff --git a/cpp/include/IceUtil/Mutex.h b/cpp/include/IceUtil/Mutex.h index 79a1df8e40f..3d49537fe40 100644 --- a/cpp/include/IceUtil/Mutex.h +++ b/cpp/include/IceUtil/Mutex.h @@ -87,7 +87,7 @@ private: // LockState and the lock/unlock variations are for use by the // Condition variable implementation. // -#ifdef WIN32 +#ifdef _WIN32 struct LockState { }; @@ -103,7 +103,7 @@ private: friend class Cond; -#ifdef WIN32 +#ifdef _WIN32 mutable CRITICAL_SECTION _mutex; #else mutable pthread_mutex_t _mutex; @@ -114,7 +114,7 @@ private: // For performance reasons the following functions are inlined. // -#ifdef WIN32 +#ifdef _WIN32 inline Mutex::Mutex() diff --git a/cpp/include/IceUtil/RecMutex.h b/cpp/include/IceUtil/RecMutex.h index 9f0e3b51319..b5373bbff4f 100644 --- a/cpp/include/IceUtil/RecMutex.h +++ b/cpp/include/IceUtil/RecMutex.h @@ -79,7 +79,7 @@ private: // LockState and the lock/unlock variations are for use by the // Condition variable implementation. // -#ifdef WIN32 +#ifdef _WIN32 struct LockState { int count; @@ -97,7 +97,7 @@ private: friend class Cond; -#ifdef WIN32 +#ifdef _WIN32 mutable CRITICAL_SECTION _mutex; #else mutable pthread_mutex_t _mutex; diff --git a/cpp/include/IceUtil/Shared.h b/cpp/include/IceUtil/Shared.h index bea78d1df93..1e16944c112 100644 --- a/cpp/include/IceUtil/Shared.h +++ b/cpp/include/IceUtil/Shared.h @@ -16,7 +16,7 @@ // // The inline assembler causes problems with shared libraries. // -#if defined(__ICC) && !defined(WIN32) +#if defined(__ICC) && !defined(_WIN32) # define ICE_USE_MUTEX_SHARED #endif @@ -24,7 +24,7 @@ # include <IceUtil/Mutex.h> #endif -#if !defined(WIN32) && !defined(ICE_USE_MUTEX_SHARED) +#if !defined(_WIN32) && !defined(ICE_USE_MUTEX_SHARED) // // Linux only. Unfortunately, asm/atomic.h builds non-SMP safe code @@ -201,7 +201,7 @@ private: #ifdef ICE_USE_MUTEX_SHARED int _ref; Mutex _mutex; -#elif defined(WIN32) +#elif defined(_WIN32) LONG _ref; #else ice_atomic_t _ref; @@ -271,7 +271,7 @@ Shared::__setNoDelete(bool b) _mutex.unlock(); } -#elif defined(WIN32) +#elif defined(_WIN32) inline Shared::Shared() : diff --git a/cpp/include/IceUtil/Thread.h b/cpp/include/IceUtil/Thread.h index 8d21d2a281e..606b356b6cd 100644 --- a/cpp/include/IceUtil/Thread.h +++ b/cpp/include/IceUtil/Thread.h @@ -17,7 +17,7 @@ namespace IceUtil { -#ifdef WIN32 +#ifdef _WIN32 struct HandleWrapper : public Shared { // Inline for performance reasons. @@ -50,7 +50,7 @@ public: ThreadControl(); -#ifdef WIN32 +#ifdef _WIN32 ThreadControl(const HandleWrapperPtr&, unsigned); #else ThreadControl(pthread_t); @@ -82,7 +82,7 @@ public: private: -#ifdef WIN32 +#ifdef _WIN32 HandleWrapperPtr _handle; unsigned _id; #else @@ -109,7 +109,7 @@ public: private: -#ifdef WIN32 +#ifdef _WIN32 unsigned _id; HandleWrapperPtr _handle; #else diff --git a/cpp/include/IceXML/StreamI.h b/cpp/include/IceXML/StreamI.h index b17dfe51c46..57bdf4aebeb 100644 --- a/cpp/include/IceXML/StreamI.h +++ b/cpp/include/IceXML/StreamI.h @@ -17,7 +17,7 @@ #include <map> -#ifdef WIN32 +#ifdef _WIN32 # ifdef ICE_XML_API_EXPORTS # define ICE_XML_API __declspec(dllexport) # else diff --git a/cpp/include/Slice/Parser.h b/cpp/include/Slice/Parser.h index 908181b50fa..1c001ac9870 100644 --- a/cpp/include/Slice/Parser.h +++ b/cpp/include/Slice/Parser.h @@ -20,7 +20,7 @@ #include <map> #include <set> -#ifdef WIN32 +#ifdef _WIN32 # ifdef SLICE_API_EXPORTS # define SLICE_API __declspec(dllexport) # else 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); diff --git a/cpp/test/Freeze/complex/Grammar.y b/cpp/test/Freeze/complex/Grammar.y index dae0459701d..5aaeaab6c38 100644 --- a/cpp/test/Freeze/complex/Grammar.y +++ b/cpp/test/Freeze/complex/Grammar.y @@ -13,7 +13,7 @@ #include <NodeI.h> #include <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/test/Freeze/complex/Parser.h b/cpp/test/Freeze/complex/Parser.h index a763938a0e9..53898734009 100644 --- a/cpp/test/Freeze/complex/Parser.h +++ b/cpp/test/Freeze/complex/Parser.h @@ -13,7 +13,7 @@ #include <Complex.h> -#ifdef WIN32 +#ifdef _WIN32 # include <io.h> # define isatty _isatty # define fileno _fileno diff --git a/cpp/test/Ice/faultTolerance/TestI.cpp b/cpp/test/Ice/faultTolerance/TestI.cpp index 656c4b3fb63..29a1a75bec0 100644 --- a/cpp/test/Ice/faultTolerance/TestI.cpp +++ b/cpp/test/Ice/faultTolerance/TestI.cpp @@ -37,7 +37,7 @@ TestI::nonmutatingAbort(const Ice::Current&) Ice::Int TestI::pid(const Ice::Current&) { -#ifdef WIN32 +#ifdef _WIN32 return _getpid(); #else return getpid(); diff --git a/cpp/test/Ice/operations/Twoways.cpp b/cpp/test/Ice/operations/Twoways.cpp index 8035b2e5659..5d3f9ee2f1e 100644 --- a/cpp/test/Ice/operations/Twoways.cpp +++ b/cpp/test/Ice/operations/Twoways.cpp @@ -145,7 +145,7 @@ twoways(const Test::MyClassPrx& p) test(r == p); r->opVoid(); // TODO: For some reasons this test sometimes doesn't work on linux -#ifdef WIN32 +#ifdef _WIN32 try { c1->opVoid(); diff --git a/cpp/test/IceStorm/federation/Publisher.cpp b/cpp/test/IceStorm/federation/Publisher.cpp index cf09d742f9f..3743baa8288 100644 --- a/cpp/test/IceStorm/federation/Publisher.cpp +++ b/cpp/test/IceStorm/federation/Publisher.cpp @@ -125,7 +125,7 @@ run(int argc, char* argv[], const CommunicatorPtr& communicator) // // Sleep for 4 seconds before shutting down. // -#ifdef WIN32 +#ifdef _WIN32 Sleep(4*1000); #else sleep(4); diff --git a/cpp/test/IceStorm/federation/Subscriber.cpp b/cpp/test/IceStorm/federation/Subscriber.cpp index b3f6253c8e9..0572cabb16f 100644 --- a/cpp/test/IceStorm/federation/Subscriber.cpp +++ b/cpp/test/IceStorm/federation/Subscriber.cpp @@ -15,7 +15,7 @@ #include <TestCommon.h> -#ifdef WIN32 +#ifdef _WIN32 # include <io.h> #endif @@ -62,7 +62,7 @@ createLock(const string& name) void deleteLock(const string& name) { -#ifdef WIN32 +#ifdef _WIN32 _unlink(name.c_str()); #else unlink(name.c_str()); diff --git a/cpp/test/IceStorm/single/Subscriber.cpp b/cpp/test/IceStorm/single/Subscriber.cpp index 55117d99ec0..cd95d6a8b9a 100644 --- a/cpp/test/IceStorm/single/Subscriber.cpp +++ b/cpp/test/IceStorm/single/Subscriber.cpp @@ -13,7 +13,7 @@ #include <Single.h> #include <fstream> -#ifdef WIN32 +#ifdef _WIN32 # include <io.h> #endif @@ -55,7 +55,7 @@ createLock(const string& name) void deleteLock(const string& name) { -#ifdef WIN32 +#ifdef _WIN32 _unlink(name.c_str()); #else unlink(name.c_str()); |