diff --git a/linux_sdk/Makefile b/linux_sdk/Makefile index 30c14ab6..88fcd42c 100644 --- a/linux_sdk/Makefile +++ b/linux_sdk/Makefile @@ -32,9 +32,9 @@ CPLUS = /usr/bin/clang++ CLINK = /usr/bin/clang CPP_LIB = else -CC = /usr/bin/gcc -CPLUS = /usr/bin/g++ -CLINK = /usr/bin/gcc +CC = /usr/bin/clang +CPLUS = /usr/bin/clang++ +CLINK = /usr/bin/clang CPP_LIB = $(SRCDS_DIR)/bin/libstdc++.so.6 endif @@ -96,7 +96,7 @@ DEFINES +=-DGNUC -DPOSIX -D_POSIX -DVPROF_LEVEL=1 -DSWDS -D_finite=finite -Dstri UNDEF = -Usprintf -Ustrncpy -UPROTECTED_THINGS_ENABLE BASE_CFLAGS = -fno-strict-aliasing -Wall -Wsign-compare -Werror -Wno-conversion -Wno-overloaded-virtual -Wno-non-virtual-dtor -Wno-invalid-offsetof \ - -Wno-delete-non-virtual-dtor + -Wno-delete-non-virtual-dtor -Wno-deprecated-register SHLIBCFLAGS = -fPIC # Flags passed to the c compiler diff --git a/public/tier0/threadtools.h b/public/tier0/threadtools.h index 3b0e4710..442459b5 100644 --- a/public/tier0/threadtools.h +++ b/public/tier0/threadtools.h @@ -983,7 +983,12 @@ private: class TFRWL_ALIGN TT_CLASS CThreadSpinRWLock { public: - CThreadSpinRWLock() { COMPILE_TIME_ASSERT( sizeof( LockInfo_t ) == sizeof( int64 ) ); Assert( (int)this % 8 == 0 ); memset( this, 0, sizeof( *this ) ); } + CThreadSpinRWLock() { + COMPILE_TIME_ASSERT( sizeof( LockInfo_t ) == sizeof( int64 ) ); + Assert( (intp)this % 8 == 0 ); + m_lockInfo.m_writerId = 0; + m_lockInfo.m_nReaders = 0; + } bool TryLockForWrite(); bool TryLockForRead(); diff --git a/public/tier1/utlmemory.h b/public/tier1/utlmemory.h index 5b0c8ffb..6ccc775f 100644 --- a/public/tier1/utlmemory.h +++ b/public/tier1/utlmemory.h @@ -1,4 +1,4 @@ -//===== Copyright © 1996-2005, Valve Corporation, All rights reserved. ======// +//===== Copyright � 1996-2005, Valve Corporation, All rights reserved. ======// // // Purpose: // @@ -17,6 +17,7 @@ #include "tier0/dbg.h" #include #include "tier0/platform.h" +#include "mathlib/mathlib.h" #include "tier0/memalloc.h" #include "tier0/memdbgon.h" diff --git a/tier1/bitbuf.cpp b/tier1/bitbuf.cpp index f49f5ea0..fbaf4e86 100644 --- a/tier1/bitbuf.cpp +++ b/tier1/bitbuf.cpp @@ -867,7 +867,9 @@ int old_bf_read::ReadSBitLong( int numbits ) } const byte g_BitMask[8] = {0x1, 0x2, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80}; +#if FAST_BIT_SCAN const byte g_TrailingMask[8] = {0xff, 0xfe, 0xfc, 0xf8, 0xf0, 0xe0, 0xc0, 0x80}; +#endif inline int old_bf_read::CountRunOfZeros() {