diff -burN a/HLLib/get_version.awk b/HLLib/get_version.awk --- a/HLLib/get_version.awk 1969-12-31 16:00:00.000000000 -0800 +++ b/HLLib/get_version.awk 2010-02-13 00:35:36.320728204 -0800 @@ -0,0 +1,19 @@ +#!/usr/bin/awk -f + +# This script is called by the Makefile +# its job is to find and print the version +# of HLLib (from stdafx.h) + +BEGIN { + RVAL=1 +} + +$0 ~ /HL_VERSION_STRING/ && NF == 3 && RVAL == 1 { + gsub("\"", "", $3) + print $3 + RVAL=0 +} + +END { + exit RVAL +} diff -burN a/HLLib/Makefile b/HLLib/Makefile --- a/HLLib/Makefile 2008-11-23 16:46:16.000000000 -0800 +++ b/HLLib/Makefile 2010-02-13 00:36:49.090725525 -0800 @@ -1,8 +1,8 @@ CXX = g++ -HLLIB_VERS = 2.0.10 +HLLIB_VERS = $(shell awk -f get_version.awk < stdafx.h) LDFLAGS = -shared -Wl,-soname,libhl.so.2 -CXXFLAGS = -O2 -g -fpic -funroll-loops -fvisibility=hidden -PREFIX = /usr/local +CXXFLAGS += -fpic -funroll-loops -fvisibility=hidden +PREFIX = /usr sources = BSPFile.cpp Checksum.cpp DebugMemory.cpp DirectoryFile.cpp \ DirectoryFolder.cpp DirectoryItem.cpp Error.cpp FileMapping.cpp \ FileStream.cpp GCFFile.cpp GCFStream.cpp HLLib.cpp \ diff -burN a/HLLib/stdafx.h b/HLLib/stdafx.h --- a/HLLib/stdafx.h 2009-12-12 13:54:56.000000000 -0800 +++ b/HLLib/stdafx.h 2010-02-13 00:35:36.320728204 -0800 @@ -47,7 +47,9 @@ typedef unsigned __int32 hlUInt32; typedef unsigned __int64 hlUInt64; #else +# include # include +# include typedef uint8_t hlUInt8; typedef uint16_t hlUInt16; diff -burN a/HLLib/XZPFile.cpp b/HLLib/XZPFile.cpp --- a/HLLib/XZPFile.cpp 2009-06-27 08:45:54.000000000 -0700 +++ b/HLLib/XZPFile.cpp 2010-02-13 00:26:25.211570882 -0800 @@ -197,7 +197,7 @@ for(hlUInt i = 0; i < this->pHeader->uiDirectoryEntryCount; i++) { hlChar lpTemp[16] = ""; - hlChar *lpLookup[] = { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f" }; + const hlChar *lpLookup[] = { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f" }; for(hlByte *lpCRC = (hlByte *)&this->lpDirectoryEntries[i].uiFileNameCRC; lpCRC < (hlByte *)&this->lpDirectoryEntries[i].uiFileNameCRC + sizeof(hlUInt); lpCRC++) { strcat(lpTemp, lpLookup[(hlByte)(*lpCRC >> 4)]);