diff --git a/assignment-client/src/AssignmentClientApp.cpp b/assignment-client/src/AssignmentClientApp.cpp index fef2a3139d..4acb52f2f2 100644 --- a/assignment-client/src/AssignmentClientApp.cpp +++ b/assignment-client/src/AssignmentClientApp.cpp @@ -34,16 +34,16 @@ AssignmentClientApp::AssignmentClientApp(int argc, char* argv[]) : QCoreApplication(argc, argv) { -# ifndef WIN32 +#ifndef _WIN32 setvbuf(stdout, NULL, _IOLBF, 0); -# endif +#endif // setup a shutdown event listener to handle SIGTERM or WM_CLOSE for us -# ifdef _WIN32 +#ifdef _WIN32 installNativeEventFilter(&ShutdownEventListener::getInstance()); -# else +#else ShutdownEventListener::getInstance(); -# endif +#endif // parse command-line QCommandLineParser parser; diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index c5951a2aff..ae4944b4ac 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -7345,7 +7345,7 @@ void Application::updateWindowTitle() const { QString title = currentPlaceName + connectionStatus + metaverseDetails + domainDetails + buildVersion; -#ifndef WIN32 +#ifndef _WIN32 // crashes with vs2013/win32 qCDebug(interfaceapp, "Application title set to: %s", title.toStdString().c_str()); #endif diff --git a/libraries/audio-client/src/AudioClient.cpp b/libraries/audio-client/src/AudioClient.cpp index 16b217bc53..41b7350c2a 100644 --- a/libraries/audio-client/src/AudioClient.cpp +++ b/libraries/audio-client/src/AudioClient.cpp @@ -26,7 +26,7 @@ #include #endif -#ifdef WIN32 +#ifdef _WIN32 #ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN 1 #endif @@ -573,7 +573,7 @@ QString defaultAudioDeviceName(QAudio::Mode mode) { } } #endif -#ifdef WIN32 +#ifdef _WIN32 //Check for Windows Vista or higher, IMMDeviceEnumerator doesn't work below that. if (!IsWindowsVistaOrGreater()) { // lower then vista if (mode == QAudio::AudioInput) { diff --git a/libraries/networking/src/Assignment.cpp b/libraries/networking/src/Assignment.cpp index 2d1dedc003..43468c36dc 100644 --- a/libraries/networking/src/Assignment.cpp +++ b/libraries/networking/src/Assignment.cpp @@ -96,7 +96,7 @@ Assignment::Assignment(ReceivedMessage& message) : packetStream >> *this; } -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(default:4351) #endif diff --git a/libraries/networking/src/udt/Socket.cpp b/libraries/networking/src/udt/Socket.cpp index eeed277875..214ed38379 100644 --- a/libraries/networking/src/udt/Socket.cpp +++ b/libraries/networking/src/udt/Socket.cpp @@ -32,7 +32,7 @@ using namespace udt; -#ifdef WIN32 +#ifdef _WIN32 #include #include #else @@ -260,7 +260,7 @@ qint64 Socket::writeDatagram(const QByteArray& datagram, const SockAddr& sockAdd if (bytesWritten < 0 || pending) { int wsaError = 0; static std::atomic previousWsaError (0); -#ifdef WIN32 +#ifdef _WIN32 wsaError = WSAGetLastError(); #endif QString errorString; @@ -554,7 +554,7 @@ std::vector Socket::getConnectionSockAddrs() { void Socket::handleSocketError(SocketType socketType, QAbstractSocket::SocketError socketError) { int wsaError = 0; static std::atomic previousWsaError(0); -#ifdef WIN32 +#ifdef _WIN32 wsaError = WSAGetLastError(); #endif int pending = _networkSocket.bytesToWrite(socketType); diff --git a/libraries/shared/src/SharedUtil.cpp b/libraries/shared/src/SharedUtil.cpp index 045f0a68c8..2ad32d7028 100644 --- a/libraries/shared/src/SharedUtil.cpp +++ b/libraries/shared/src/SharedUtil.cpp @@ -1150,7 +1150,7 @@ void setupHifiApplication(QString applicationName) { // You can find more details as to why this is important in the SharedUtil.h/cpp files setupGlobalInstances(); -#ifndef WIN32 +#ifndef _WIN32 // Windows tends to hold onto log lines until it has a sizeable buffer // This makes the log feel unresponsive and trap useful log data in the log buffer // when a crash occurs. diff --git a/libraries/shared/src/windowshacks.h b/libraries/shared/src/windowshacks.h index e85a6f1237..3e297f230f 100644 --- a/libraries/shared/src/windowshacks.h +++ b/libraries/shared/src/windowshacks.h @@ -14,7 +14,7 @@ #ifndef hifi_windowshacks_h #define hifi_windowshacks_h -#ifdef WIN32 +#ifdef _WIN32 #include inline double roundf(double value) { @@ -57,10 +57,10 @@ inline int c99_snprintf(char* str, size_t size, const char* format, ...) { #include #include -#else // WIN32 +#else // _WIN32 #include -#endif // WIN32 +#endif // _WIN32 #endif // hifi_windowshacks_h