Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use _WIN32 instead of WIN32 to check for Windows #128

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion prop_sheets/debug-2012.props
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<ItemDefinitionGroup>
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PreprocessorDefinitions>_DEBUG;WIN32;ENABLE_I18N;ENABLE_SRP=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_DEBUG;ENABLE_I18N;ENABLE_SRP=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>false</ExceptionHandling>
<StringPooling>false</StringPooling>
<EnableParallelCodeGeneration>false</EnableParallelCodeGeneration>
Expand Down
2 changes: 1 addition & 1 deletion prop_sheets/release-2012.props
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<CallingConvention>StdCall</CallingConvention>
<CompileAs>Default</CompileAs>
<CompileAsManaged>false</CompileAsManaged>
<PreprocessorDefinitions>NDEBUG;WIN32;ENABLE_I18N;ENABLE_SRP=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>NDEBUG;ENABLE_I18N;ENABLE_SRP=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<PrecompiledHeaderOutputFile>c:\temp\$(ProjectName)-$(ConfigurationName)-$(PlatformName)-master.pch</PrecompiledHeaderOutputFile>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
Expand Down
2 changes: 1 addition & 1 deletion utp_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ enum bandwidth_type_t {
header_overhead, retransmit_overhead
};

#ifdef WIN32
#ifdef _WIN32
#ifdef _MSC_VER
#include "libutp_inet_ntop.h"
#endif
Expand Down
4 changes: 2 additions & 2 deletions utp_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

// hash.cpp needs socket definitions, which is why this networking specific
// code is inclued in utypes.h
#ifdef WIN32
#ifdef _WIN32
#define _CRT_SECURE_NO_DEPRECATE
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
Expand Down Expand Up @@ -76,7 +76,7 @@
typedef struct sockaddr_storage SOCKADDR_STORAGE;
#endif

#ifdef WIN32
#ifdef _WIN32
#define I64u "%I64u"
#else
#define I64u "%Lu"
Expand Down
10 changes: 5 additions & 5 deletions utp_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@
#include "utp.h"
#include "utp_types.h"

#ifdef WIN32
#ifdef _WIN32
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <winsock2.h>
#include <ws2tcpip.h>
#else //!WIN32
#else //!_WIN32
#include <time.h>
#include <sys/time.h> // Linux needs both time.h and sys/time.h
#endif
Expand All @@ -41,7 +41,7 @@

#include "utp_utils.h"

#ifdef WIN32
#ifdef _WIN32

typedef ULONGLONG (WINAPI GetTickCount64Proc)(void);
static GetTickCount64Proc *pt2GetTickCount64;
Expand Down Expand Up @@ -113,7 +113,7 @@ static inline uint64 UTP_GetMilliseconds()
return GetTickCount();
}

#else //!WIN32
#else //!_WIN32

static inline uint64 UTP_GetMicroseconds(void);
static inline uint64 UTP_GetMilliseconds()
Expand Down Expand Up @@ -182,7 +182,7 @@ static uint64_t __GetMicroseconds()

#endif //!__APPLE__

#endif //!WIN32
#endif //!_WIN32

/*
* Whew. Okay. After that #ifdef maze above, we now know we have a working
Expand Down