diff --git a/bzip2/CMakeLists.txt b/bzip2/CMakeLists.txt
index 54b3849b..e819f4cd 100644
--- a/bzip2/CMakeLists.txt
+++ b/bzip2/CMakeLists.txt
@@ -5,7 +5,7 @@ if( CMAKE_COMPILER_IS_GNUC )
endif( CMAKE_COMPILER_IS_GNUC )
add_definitions( -DBZ_NO_STDIO )
-add_library( bzip2
+add_library( bz2
blocksort.c
bzlib.c
compress.c
@@ -13,4 +13,4 @@ add_library( bzip2
decompress.c
huffman.c
randtable.c )
-target_link_libraries( bzip2 )
+target_link_libraries( bz2 )
diff --git a/dumb/include/internal/it.h b/dumb/include/internal/it.h
index 6de15ccb..e248ade7 100644
--- a/dumb/include/internal/it.h
+++ b/dumb/include/internal/it.h
@@ -666,8 +666,8 @@ struct DUMB_IT_SIGRENDERER
unsigned char globalvolume;
signed char globalvolslide;
- unsigned char tempo;
signed char temposlide;
+ unsigned short tempo;
IT_CHANNEL channel[DUMB_IT_N_CHANNELS];
diff --git a/dumb/vc6/dumb_static/dumb_static.vcproj b/dumb/vc6/dumb_static/dumb_static.vcproj
index c838d8e4..128b3b9d 100644
--- a/dumb/vc6/dumb_static/dumb_static.vcproj
+++ b/dumb/vc6/dumb_static/dumb_static.vcproj
@@ -1970,6 +1970,10 @@
+
+
diff --git a/game-music-emu/CMakeLists.txt b/game-music-emu/CMakeLists.txt
index 673db544..0f135533 100644
--- a/game-music-emu/CMakeLists.txt
+++ b/game-music-emu/CMakeLists.txt
@@ -2,7 +2,9 @@ cmake_minimum_required( VERSION 2.4 )
include( CheckCXXCompilerFlag )
# I don't plan on debugging this, so make it a release build.
-set( CMAKE_BUILD_TYPE "RelWithDebInfo" )
+if( NOT CMAKE_BUILD_TYPE MATCHES "Release" )
+ set( CMAKE_BUILD_TYPE "RelWithDebInfo" )
+endif( NOT CMAKE_BUILD_TYPE MATCHES "Release" )
if( CMAKE_COMPILER_IS_GNUCXX )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall" )
diff --git a/lzma/C/CpuArch.h b/lzma/C/CpuArch.h
index 006361f2..db441641 100644
--- a/lzma/C/CpuArch.h
+++ b/lzma/C/CpuArch.h
@@ -47,6 +47,8 @@ about these properties of platform.
#if defined(LITTLE_ENDIAN_UNALIGN) && defined(_WIN64) && (_MSC_VER >= 1300)
+unsigned long _byteswap_ulong(unsigned long);
+unsigned __int64 _byteswap_uint64(unsigned __int64);
#pragma intrinsic(_byteswap_ulong)
#pragma intrinsic(_byteswap_uint64)
#define GetBe32(p) _byteswap_ulong(*(const UInt32 *)(const Byte *)(p))
diff --git a/lzma/C/Types.h b/lzma/C/Types.h
index 818d92d5..958b2af2 100644
--- a/lzma/C/Types.h
+++ b/lzma/C/Types.h
@@ -34,6 +34,10 @@ typedef int SRes;
#define RINOK(x) { int __result__ = (x); if (__result__ != 0) return __result__; }
#endif
+#if defined(__APPLE__) && !__LP64__
+#define _LZMA_UINT32_IS_ULONG
+#endif
+
#ifndef ZCONF_H
typedef unsigned char Byte;
#endif
diff --git a/tools/updaterevision/updaterevision.c b/tools/updaterevision/updaterevision.c
index 3f0dce4e..55e81bc4 100644
--- a/tools/updaterevision/updaterevision.c
+++ b/tools/updaterevision/updaterevision.c
@@ -30,15 +30,21 @@ int main(int argc, char **argv)
// Use svnversion to get the revision number. If that fails, pretend it's
// revision 0. Note that this requires you have the command-line svn tools installed.
sprintf (run, "svnversion -cn %s", argv[1]);
- if ((name = tempnam(NULL, "svnout")) != NULL &&
- (stream = freopen(name, "w+b", stdout)) != NULL &&
- system(run) == 0 &&
- errno == 0 &&
- fseek(stream, 0, SEEK_SET) == 0 &&
- fgets(currev, sizeof currev, stream) == currev &&
- (isdigit(currev[0]) || (currev[0] == '-' && currev[1] == '1')))
+ if ((name = tempnam(NULL, "svnout")) != NULL)
{
- gotrev = 1;
+#ifdef __APPLE__
+ // tempnam will return errno of 2 even though it is successful for our purposes.
+ errno = 0;
+#endif
+ if((stream = freopen(name, "w+b", stdout)) != NULL &&
+ system(run) == 0 &&
+ errno == 0 &&
+ fseek(stream, 0, SEEK_SET) == 0 &&
+ fgets(currev, sizeof currev, stream) == currev &&
+ (isdigit(currev[0]) || (currev[0] == '-' && currev[1] == '1')))
+ {
+ gotrev = 1;
+ }
}
if (stream != NULL)
{