Maelstrom: Updated Linux build

https://github.com/libsdl-org/Maelstrom/commit/aa0f8923af908db45faed771aa1610b5a8bd2315

From aa0f8923af908db45faed771aa1610b5a8bd2315 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Fri, 5 Oct 2012 01:48:03 -0700
Subject: [PATCH] Updated Linux build

---
 VisualC/Maelstrom_VS2008.vcproj               | 16 ++++++++--------
 Xcode-iOS/Maelstrom.xcodeproj/project.pbxproj | 12 ++++++------
 Xcode/Maelstrom.xcodeproj/project.pbxproj     | 12 ++++++------
 game/Makefile.am                              |  4 ++--
 game/init.cpp                                 |  2 +-
 game/main.cpp                                 |  2 +-
 utils/rapidxml.h                              |  1 +
 7 files changed, 25 insertions(+), 24 deletions(-)

diff --git a/VisualC/Maelstrom_VS2008.vcproj b/VisualC/Maelstrom_VS2008.vcproj
index ef7e3d24..df05af96 100644
--- a/VisualC/Maelstrom_VS2008.vcproj
+++ b/VisualC/Maelstrom_VS2008.vcproj
@@ -223,14 +223,6 @@
 					RelativePath="..\game\fastrand.h"
 					>
 				</File>
-				<File
-					RelativePath="..\game\features.cpp"
-					>
-				</File>
-				<File
-					RelativePath="..\game\features.h"
-					>
-				</File>
 				<File
 					RelativePath="..\game\game.cpp"
 					>
@@ -295,6 +287,14 @@
 					RelativePath="..\game\Maelstrom_Globals.h"
 					>
 				</File>
+				<File
+					RelativePath="..\game\MaelstromFeatures.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\game\MaelstromFeatures.h"
+					>
+				</File>
 				<File
 					RelativePath="..\game\MaelstromUI.cpp"
 					>
diff --git a/Xcode-iOS/Maelstrom.xcodeproj/project.pbxproj b/Xcode-iOS/Maelstrom.xcodeproj/project.pbxproj
index 942522ee..8bdd6f9c 100644
--- a/Xcode-iOS/Maelstrom.xcodeproj/project.pbxproj
+++ b/Xcode-iOS/Maelstrom.xcodeproj/project.pbxproj
@@ -30,6 +30,7 @@
 		AA439071161EBE1800FE5F41 /* platform_posix.c in Sources */ = {isa = PBXBuildFile; fileRef = AA439064161EBE1800FE5F41 /* platform_posix.c */; };
 		AA439072161EBE1800FE5F41 /* platform_unix.c in Sources */ = {isa = PBXBuildFile; fileRef = AA439065161EBE1800FE5F41 /* platform_unix.c */; };
 		AA439073161EBE1800FE5F41 /* platform_windows.c in Sources */ = {isa = PBXBuildFile; fileRef = AA439066161EBE1800FE5F41 /* platform_windows.c */; };
+		AA43907B161ED5CB00FE5F41 /* MaelstromFeatures.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA439079161ED5CB00FE5F41 /* MaelstromFeatures.cpp */; };
 		AA579DCD161BFFCA005F809B /* app-icon57px.png in Resources */ = {isa = PBXBuildFile; fileRef = AA579DCC161BFFCA005F809B /* app-icon57px.png */; };
 		AA579DCF161BFFE4005F809B /* app-icon72px.png in Resources */ = {isa = PBXBuildFile; fileRef = AA579DCE161BFFE4005F809B /* app-icon72px.png */; };
 		AA579DD3161C0065005F809B /* app-icon144px.png in Resources */ = {isa = PBXBuildFile; fileRef = AA579DD2161C0065005F809B /* app-icon144px.png */; };
@@ -79,7 +80,6 @@
 		AA9781BA1576A03700472542 /* scores.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA9781A21576A03700472542 /* scores.cpp */; };
 		AA9781BC1576A14D00472542 /* Maelstrom_Data.zip in Resources */ = {isa = PBXBuildFile; fileRef = AA9781BB1576A14D00472542 /* Maelstrom_Data.zip */; };
 		AABDBE1F15C8A6B200C3E936 /* continue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AABDBE1B15C8A6B200C3E936 /* continue.cpp */; };
-		AABDBE2015C8A6B200C3E936 /* features.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AABDBE1D15C8A6B200C3E936 /* features.cpp */; };
 		AABDBE2615C8A6F300C3E936 /* loadxml.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AABDBE2415C8A6F300C3E936 /* loadxml.cpp */; };
 		AAC0415B160E811F00E22BC5 /* libSDL2_image.a in Frameworks */ = {isa = PBXBuildFile; fileRef = AAC0415A160E809F00E22BC5 /* libSDL2_image.a */; };
 		AAC04173160E837E00E22BC5 /* ImageIO.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AAC04172160E837E00E22BC5 /* ImageIO.framework */; };
@@ -239,6 +239,8 @@
 		AA439064161EBE1800FE5F41 /* platform_posix.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = platform_posix.c; sourceTree = "<group>"; };
 		AA439065161EBE1800FE5F41 /* platform_unix.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = platform_unix.c; sourceTree = "<group>"; };
 		AA439066161EBE1800FE5F41 /* platform_windows.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = platform_windows.c; sourceTree = "<group>"; };
+		AA439079161ED5CB00FE5F41 /* MaelstromFeatures.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MaelstromFeatures.cpp; sourceTree = "<group>"; };
+		AA43907A161ED5CB00FE5F41 /* MaelstromFeatures.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MaelstromFeatures.h; sourceTree = "<group>"; };
 		AA579DCC161BFFCA005F809B /* app-icon57px.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "app-icon57px.png"; path = "Xcode-iOS/app-icon57px.png"; sourceTree = "<group>"; };
 		AA579DCE161BFFE4005F809B /* app-icon72px.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "app-icon72px.png"; path = "Xcode-iOS/app-icon72px.png"; sourceTree = "<group>"; };
 		AA579DD2161C0065005F809B /* app-icon144px.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "app-icon144px.png"; path = "Xcode-iOS/app-icon144px.png"; sourceTree = "<group>"; };
@@ -346,8 +348,6 @@
 		AA9781BF1576A3BD00472542 /* physfs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = physfs.h; sourceTree = "<group>"; };
 		AABDBE1B15C8A6B200C3E936 /* continue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = continue.cpp; sourceTree = "<group>"; };
 		AABDBE1C15C8A6B200C3E936 /* continue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = continue.h; sourceTree = "<group>"; };
-		AABDBE1D15C8A6B200C3E936 /* features.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = features.cpp; sourceTree = "<group>"; };
-		AABDBE1E15C8A6B200C3E936 /* features.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = features.h; sourceTree = "<group>"; };
 		AABDBE2415C8A6F300C3E936 /* loadxml.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = loadxml.cpp; sourceTree = "<group>"; };
 		AABDBE2515C8A6F300C3E936 /* loadxml.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = loadxml.h; sourceTree = "<group>"; };
 		AAC04154160E808500E22BC5 /* SDL_image.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_image.h; sourceTree = "<group>"; };
@@ -632,8 +632,6 @@
 				AA9781791576A03700472542 /* controls.h */,
 				AA97817A1576A03700472542 /* fastrand.cpp */,
 				AA97817B1576A03700472542 /* fastrand.h */,
-				AABDBE1D15C8A6B200C3E936 /* features.cpp */,
-				AABDBE1E15C8A6B200C3E936 /* features.h */,
 				AA97817C1576A03700472542 /* game.cpp */,
 				AA97817D1576A03700472542 /* game.h */,
 				AA97817E1576A03700472542 /* gameinfo.cpp */,
@@ -650,6 +648,8 @@
 				AA9781871576A03700472542 /* MacDialog.h */,
 				AA9781881576A03700472542 /* Maelstrom.h */,
 				AA9781891576A03700472542 /* Maelstrom_Globals.h */,
+				AA439079161ED5CB00FE5F41 /* MaelstromFeatures.cpp */,
+				AA43907A161ED5CB00FE5F41 /* MaelstromFeatures.h */,
 				AA97818A1576A03700472542 /* MaelstromUI.cpp */,
 				AA97818B1576A03700472542 /* MaelstromUI.h */,
 				AA97818C1576A03700472542 /* main.cpp */,
@@ -975,7 +975,6 @@
 				AA7557AB1595062C00BBD41B /* Maelstrom_GameKit.mm in Sources */,
 				AACF51001598BC2C00585701 /* gameover.cpp in Sources */,
 				AABDBE1F15C8A6B200C3E936 /* continue.cpp in Sources */,
-				AABDBE2015C8A6B200C3E936 /* features.cpp in Sources */,
 				AABDBE2615C8A6F300C3E936 /* loadxml.cpp in Sources */,
 				AA439029161EBAA800FE5F41 /* UITexture.cpp in Sources */,
 				AA439067161EBE1800FE5F41 /* archiver_dir.c in Sources */,
@@ -988,6 +987,7 @@
 				AA439071161EBE1800FE5F41 /* platform_posix.c in Sources */,
 				AA439072161EBE1800FE5F41 /* platform_unix.c in Sources */,
 				AA439073161EBE1800FE5F41 /* platform_windows.c in Sources */,
+				AA43907B161ED5CB00FE5F41 /* MaelstromFeatures.cpp in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
diff --git a/Xcode/Maelstrom.xcodeproj/project.pbxproj b/Xcode/Maelstrom.xcodeproj/project.pbxproj
index 6cfa7377..48505f50 100644
--- a/Xcode/Maelstrom.xcodeproj/project.pbxproj
+++ b/Xcode/Maelstrom.xcodeproj/project.pbxproj
@@ -66,9 +66,9 @@
 		AA439052161EBDCA00FE5F41 /* platform_unix.c in Sources */ = {isa = PBXBuildFile; fileRef = AA439045161EBDCA00FE5F41 /* platform_unix.c */; };
 		AA439053161EBDCA00FE5F41 /* platform_windows.c in Sources */ = {isa = PBXBuildFile; fileRef = AA439046161EBDCA00FE5F41 /* platform_windows.c */; };
 		AA439075161EC0A100FE5F41 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AA439074161EC0A100FE5F41 /* CoreFoundation.framework */; };
+		AA439078161ED5AC00FE5F41 /* MaelstromFeatures.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA439076161ED5AC00FE5F41 /* MaelstromFeatures.cpp */; };
 		AA8B18F2161C0B59005318A4 /* SDL2_image.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AA8B18F1161C0B59005318A4 /* SDL2_image.framework */; };
 		AA8B1900161C1134005318A4 /* continue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA8B18FA161C1134005318A4 /* continue.cpp */; };
-		AA8B1901161C1134005318A4 /* features.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA8B18FC161C1134005318A4 /* features.cpp */; };
 		AA8B1902161C1134005318A4 /* gameover.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA8B18FE161C1134005318A4 /* gameover.cpp */; };
 		AA8B1905161C1188005318A4 /* loadxml.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA8B1903161C1188005318A4 /* loadxml.cpp */; };
 /* End PBXBuildFile section */
@@ -219,11 +219,11 @@
 		AA439045161EBDCA00FE5F41 /* platform_unix.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = platform_unix.c; sourceTree = "<group>"; };
 		AA439046161EBDCA00FE5F41 /* platform_windows.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = platform_windows.c; sourceTree = "<group>"; };
 		AA439074161EC0A100FE5F41 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = System/Library/Frameworks/CoreFoundation.framework; sourceTree = SDKROOT; };
+		AA439076161ED5AC00FE5F41 /* MaelstromFeatures.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MaelstromFeatures.cpp; sourceTree = "<group>"; };
+		AA439077161ED5AC00FE5F41 /* MaelstromFeatures.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MaelstromFeatures.h; sourceTree = "<group>"; };
 		AA8B18F1161C0B59005318A4 /* SDL2_image.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SDL2_image.framework; path = /Library/Frameworks/SDL2_image.framework; sourceTree = "<absolute>"; };
 		AA8B18FA161C1134005318A4 /* continue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = continue.cpp; sourceTree = "<group>"; };
 		AA8B18FB161C1134005318A4 /* continue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = continue.h; sourceTree = "<group>"; };
-		AA8B18FC161C1134005318A4 /* features.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = features.cpp; sourceTree = "<group>"; };
-		AA8B18FD161C1134005318A4 /* features.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = features.h; sourceTree = "<group>"; };
 		AA8B18FE161C1134005318A4 /* gameover.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = gameover.cpp; sourceTree = "<group>"; };
 		AA8B18FF161C1134005318A4 /* gameover.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gameover.h; sourceTree = "<group>"; };
 		AA8B1903161C1188005318A4 /* loadxml.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = loadxml.cpp; sourceTree = "<group>"; };
@@ -319,8 +319,6 @@
 				AA4087C014D493A800EB2196 /* controls.h */,
 				AA4087C114D493A800EB2196 /* fastrand.cpp */,
 				AA4087C214D493A800EB2196 /* fastrand.h */,
-				AA8B18FC161C1134005318A4 /* features.cpp */,
-				AA8B18FD161C1134005318A4 /* features.h */,
 				AA4087C314D493A800EB2196 /* game.cpp */,
 				AA4087C414D493A800EB2196 /* game.h */,
 				AA4087C514D493A800EB2196 /* gameinfo.cpp */,
@@ -337,6 +335,8 @@
 				AA4087CE14D493A800EB2196 /* MacDialog.h */,
 				AA4087CF14D493A800EB2196 /* Maelstrom.h */,
 				AA4087D014D493A800EB2196 /* Maelstrom_Globals.h */,
+				AA439076161ED5AC00FE5F41 /* MaelstromFeatures.cpp */,
+				AA439077161ED5AC00FE5F41 /* MaelstromFeatures.h */,
 				AA4087D114D493A800EB2196 /* MaelstromUI.cpp */,
 				AA4087D214D493A800EB2196 /* MaelstromUI.h */,
 				AA4087D314D493A800EB2196 /* main.cpp */,
@@ -620,7 +620,6 @@
 				AA40885F14D493A800EB2196 /* physfsrwops.c in Sources */,
 				AA40886014D493A800EB2196 /* prefs.cpp in Sources */,
 				AA8B1900161C1134005318A4 /* continue.cpp in Sources */,
-				AA8B1901161C1134005318A4 /* features.cpp in Sources */,
 				AA8B1902161C1134005318A4 /* gameover.cpp in Sources */,
 				AA8B1905161C1188005318A4 /* loadxml.cpp in Sources */,
 				AA439032161EBB5800FE5F41 /* UITexture.cpp in Sources */,
@@ -634,6 +633,7 @@
 				AA439051161EBDCA00FE5F41 /* platform_posix.c in Sources */,
 				AA439052161EBDCA00FE5F41 /* platform_unix.c in Sources */,
 				AA439053161EBDCA00FE5F41 /* platform_windows.c in Sources */,
+				AA439078161ED5AC00FE5F41 /* MaelstromFeatures.cpp in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
diff --git a/game/Makefile.am b/game/Makefile.am
index 2fd6ee95..8984c5fb 100644
--- a/game/Makefile.am
+++ b/game/Makefile.am
@@ -5,6 +5,8 @@ libgame_a_SOURCES =		\
 	MacDialog.cpp		\
 	MacDialog.h		\
 	Maelstrom.h		\
+	MaelstromFeatures.cpp	\
+	MaelstromFeatures.h	\
 	MaelstromUI.cpp		\
 	MaelstromUI.h		\
 	Maelstrom_Globals.h	\
@@ -17,8 +19,6 @@ libgame_a_SOURCES =		\
 	controls.h		\
 	fastrand.cpp		\
 	fastrand.h		\
-	features.cpp		\
-	features.h		\
 	game.cpp		\
 	game.h			\
 	gameinfo.cpp		\
diff --git a/game/init.cpp b/game/init.cpp
index 04cab169..f8b35aaf 100644
--- a/game/init.cpp
+++ b/game/init.cpp
@@ -27,13 +27,13 @@
 #include <stdlib.h>
 
 #include "Maelstrom_Globals.h"
+#include "MaelstromFeatures.h"
 #include "load.h"
 #include "init.h"
 #include "game.h"
 #include "player.h"
 #include "colortable.h"
 #include "fastrand.h"
-#include "features.h"
 #include "MaelstromUI.h"
 #include "../screenlib/UIElement.h"
 
diff --git a/game/main.cpp b/game/main.cpp
index 1b2dd207..5b95bcd2 100644
--- a/game/main.cpp
+++ b/game/main.cpp
@@ -33,13 +33,13 @@
 /* ------------------------------------------------------------- */
 
 #include "Maelstrom_Globals.h"
+#include "MaelstromFeatures.h"
 #include "load.h"
 #include "init.h"
 #include "fastrand.h"
 #include "about.h"
 #include "game.h"
 #include "netplay.h"
-#include "features.h"
 #include "main.h"
 
 #include "../screenlib/UIDialog.h"
diff --git a/utils/rapidxml.h b/utils/rapidxml.h
index f89c5a3d..6255ebb0 100644
--- a/utils/rapidxml.h
+++ b/utils/rapidxml.h
@@ -23,6 +23,7 @@
 #define RAPIDXML_NO_STDLIB
 
 #include <assert.h>
+#include <sys/types.h>
 
 namespace std
 {