Skip to content

Commit

Permalink
more win32 -> _win32
Browse files Browse the repository at this point in the history
  • Loading branch information
HifiExperiments committed Jan 20, 2025
1 parent 6ff5e17 commit 223fa4a
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 16 deletions.
10 changes: 5 additions & 5 deletions assignment-client/src/AssignmentClientApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion interface/src/Application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions libraries/audio-client/src/AudioClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include <CoreAudio/AudioHardware.h>
#endif

#ifdef WIN32
#ifdef _WIN32
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN 1
#endif
Expand Down Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion libraries/networking/src/Assignment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ Assignment::Assignment(ReceivedMessage& message) :
packetStream >> *this;
}

#ifdef WIN32
#ifdef _WIN32
#pragma warning(default:4351)
#endif

Expand Down
6 changes: 3 additions & 3 deletions libraries/networking/src/udt/Socket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

using namespace udt;

#ifdef WIN32
#ifdef _WIN32
#include <winsock2.h>
#include <WS2tcpip.h>
#else
Expand Down Expand Up @@ -260,7 +260,7 @@ qint64 Socket::writeDatagram(const QByteArray& datagram, const SockAddr& sockAdd
if (bytesWritten < 0 || pending) {
int wsaError = 0;
static std::atomic<int> previousWsaError (0);
#ifdef WIN32
#ifdef _WIN32
wsaError = WSAGetLastError();
#endif
QString errorString;
Expand Down Expand Up @@ -554,7 +554,7 @@ std::vector<SockAddr> Socket::getConnectionSockAddrs() {
void Socket::handleSocketError(SocketType socketType, QAbstractSocket::SocketError socketError) {
int wsaError = 0;
static std::atomic<int> previousWsaError(0);
#ifdef WIN32
#ifdef _WIN32
wsaError = WSAGetLastError();
#endif
int pending = _networkSocket.bytesToWrite(socketType);
Expand Down
2 changes: 1 addition & 1 deletion libraries/shared/src/SharedUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions libraries/shared/src/windowshacks.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#ifndef hifi_windowshacks_h
#define hifi_windowshacks_h

#ifdef WIN32
#ifdef _WIN32

#include <cmath>
inline double roundf(double value) {
Expand Down Expand Up @@ -57,10 +57,10 @@ inline int c99_snprintf(char* str, size_t size, const char* format, ...) {
#include <winsock2.h>
#include <WS2tcpip.h>

#else // WIN32
#else // _WIN32

#include <netinet/in.h>

#endif // WIN32
#endif // _WIN32

#endif // hifi_windowshacks_h

0 comments on commit 223fa4a

Please sign in to comment.