Fix automake warnings.

pull/1/head
Darrell Anderson 12 years ago
parent 2c67f751ab
commit 84889ea4c0

@ -40,7 +40,7 @@
#define CS_TRACK_OWNER 1 #define CS_TRACK_OWNER 1
#endif // _DEBUG #endif // _DEBUG
#if CS_TRACK_OWNER #ifdef CS_TRACK_OWNER
#define TRACK_OWNER(x) x #define TRACK_OWNER(x) x
#else // !CS_TRACK_OWNER #else // !CS_TRACK_OWNER
#define TRACK_OWNER(x) #define TRACK_OWNER(x)
@ -68,7 +68,7 @@ public:
LeaveCriticalSection(&crit_); LeaveCriticalSection(&crit_);
} }
#if CS_TRACK_OWNER #ifdef CS_TRACK_OWNER
bool CurrentThreadIsOwner() const { return thread_ == GetCurrentThreadId(); } bool CurrentThreadIsOwner() const { return thread_ == GetCurrentThreadId(); }
#endif // CS_TRACK_OWNER #endif // CS_TRACK_OWNER

@ -246,14 +246,14 @@ uint32 SocketAddress::StringToIP(const std::string& hostname, bool use_dns) {
LOG(INFO) << "=== DNS RESOLUTION (" << hostname << ") ==="; LOG(INFO) << "=== DNS RESOLUTION (" << hostname << ") ===";
#if DISABLE_DNS #if DISABLE_DNS
LOG(WARNING) << "*** DNS DISABLED ***"; LOG(WARNING) << "*** DNS DISABLED ***";
#if WIN32 #ifdef WIN32
WSASetLastError(WSAHOST_NOT_FOUND); WSASetLastError(WSAHOST_NOT_FOUND);
#endif // WIN32 #endif // WIN32
#endif // DISABLE_DNS #endif // DISABLE_DNS
if (hostent * pHost = gethostbyname(hostname.c_str())) { if (hostent * pHost = gethostbyname(hostname.c_str())) {
ip = NetworkToHost32(*reinterpret_cast<uint32 *>(pHost->h_addr_list[0])); ip = NetworkToHost32(*reinterpret_cast<uint32 *>(pHost->h_addr_list[0]));
} else { } else {
#if WIN32 #ifdef WIN32
LOG(LS_ERROR) << "gethostbyname error: " << WSAGetLastError(); LOG(LS_ERROR) << "gethostbyname error: " << WSAGetLastError();
#else #else
LOG(LS_ERROR) << "gethostbyname error: " << strerror(h_errno); LOG(LS_ERROR) << "gethostbyname error: " << strerror(h_errno);

@ -30,7 +30,7 @@
#ifdef WIN32 #ifdef WIN32
#if _MSC_VER > 1000 #if defined(_MSC_VER) && _MSC_VER > 1000
#pragma once #pragma once
#endif // _MSC_VER > 1000 #endif // _MSC_VER > 1000

@ -196,7 +196,7 @@ class StunAddressAttribute : public StunAttribute {
public: public:
StunAddressAttribute(uint16 type); StunAddressAttribute(uint16 type);
#if (_MSC_VER < 1300) #if defined(_MSC_VER) && _MSC_VER < 1300
enum { SIZE = 8 }; enum { SIZE = 8 };
#else #else
static const uint16 SIZE = 8; static const uint16 SIZE = 8;
@ -224,7 +224,7 @@ class StunUInt32Attribute : public StunAttribute {
public: public:
StunUInt32Attribute(uint16 type); StunUInt32Attribute(uint16 type);
#if (_MSC_VER < 1300) #if defined(_MSC_VER) && _MSC_VER < 1300
enum { SIZE = 4 }; enum { SIZE = 4 };
#else #else
static const uint16 SIZE = 4; static const uint16 SIZE = 4;
@ -273,7 +273,7 @@ public:
StunErrorCodeAttribute(uint16 type, uint16 length); StunErrorCodeAttribute(uint16 type, uint16 length);
~StunErrorCodeAttribute(); ~StunErrorCodeAttribute();
#if (_MSC_VER < 1300) #if defined(_MSC_VER) && _MSC_VER < 1300
enum { MIN_SIZE = 4 }; enum { MIN_SIZE = 4 };
#else #else
static const uint16 MIN_SIZE = 4; static const uint16 MIN_SIZE = 4;
@ -323,7 +323,7 @@ public:
StunTransportPrefsAttribute(uint16 type, uint16 length); StunTransportPrefsAttribute(uint16 type, uint16 length);
~StunTransportPrefsAttribute(); ~StunTransportPrefsAttribute();
#if (_MSC_VER < 1300) #if defined(_MSC_VER) && _MSC_VER < 1300
enum { SIZE1 = 4, SIZE2 = 12 }; enum { SIZE1 = 4, SIZE2 = 12 };
#else #else
static const uint16 SIZE1 = 4; static const uint16 SIZE1 = 4;

Loading…
Cancel
Save