Cleaned up some header inclusion politics.
authorRyan C. Gordon <icculus@icculus.org>
Wed, 16 Aug 2017 20:03:24 -0400
changeset 1589 e4f75163b60d
parent 1588 59a7ec36bd8c
child 1590 5aa450209e6a
Cleaned up some header inclusion politics.
src/physfs_platform_apple.m
src/physfs_platform_unix.c
src/physfs_platform_windows.c
src/physfs_platform_winrt.cpp
--- a/src/physfs_platform_apple.m	Wed Aug 16 20:02:54 2017 -0400
+++ b/src/physfs_platform_apple.m	Wed Aug 16 20:03:24 2017 -0400
@@ -7,15 +7,13 @@
  */
 
 #define __PHYSICSFS_INTERNAL__
-#include "physfs_internal.h"
+#include "physfs_platforms.h"
 
 #ifdef PHYSFS_PLATFORM_APPLE
 
-/* Foundation.h steps on these. :( */
-#undef malloc
-#undef free
+#include <Foundation/Foundation.h>
 
-#include <Foundation/Foundation.h>
+#include "physfs_internal.h"
 
 int __PHYSFS_platformInit(void)
 {
--- a/src/physfs_platform_unix.c	Wed Aug 16 20:02:54 2017 -0400
+++ b/src/physfs_platform_unix.c	Wed Aug 16 20:03:24 2017 -0400
@@ -57,6 +57,7 @@
 #include <sys/sysctl.h>
 #endif
 
+
 #include "physfs_internal.h"
 
 int __PHYSFS_platformInit(void)
@@ -71,7 +72,6 @@
 } /* __PHYSFS_platformDeinit */
 
 
-/* Stub version for platforms without CD-ROM support. */
 void __PHYSFS_platformDetectAvailableCDs(PHYSFS_StringCallback cb, void *data)
 {
 #if (defined PHYSFS_NO_CDROM_SUPPORT)
--- a/src/physfs_platform_windows.c	Wed Aug 16 20:02:54 2017 -0400
+++ b/src/physfs_platform_windows.c	Wed Aug 16 20:03:24 2017 -0400
@@ -7,7 +7,7 @@
  */
 
 #define __PHYSICSFS_INTERNAL__
-#include "physfs_internal.h"
+#include "physfs_platforms.h"
 
 #ifdef PHYSFS_PLATFORM_WINDOWS
 
@@ -16,9 +16,6 @@
 #undef UNICODE
 #endif
 
-/* !!! FIXME: maybe clean out the "allocator" macro, eventually. */
-#undef allocator  /* apparently Windows 10 SDK conflicts here. */
-
 #define WIN32_LEAN_AND_MEAN 1
 #include <windows.h>
 
@@ -38,7 +35,8 @@
 #ifdef allocator  /* apparently Windows 10 SDK conflicts here. */
 #undef allocator
 #endif
-#define allocator __PHYSFS_AllocatorHooks
+
+#include "physfs_internal.h"
 
 /*
  * Users without the platform SDK don't have this defined.  The original docs
--- a/src/physfs_platform_winrt.cpp	Wed Aug 16 20:02:54 2017 -0400
+++ b/src/physfs_platform_winrt.cpp	Wed Aug 16 20:03:24 2017 -0400
@@ -17,13 +17,10 @@
 
 #ifdef PHYSFS_PLATFORM_WINRT
 
+#include <windows.h>
+
 #include "physfs_internal.h"
 
-/* !!! FIXME: maybe clean out the "allocator" macro, eventually. */
-#undef allocator  /* apparently Windows 10 SDK conflicts here. */
-
-#include <windows.h>
-
 const void *__PHYSFS_winrtCalcBaseDir(void)
 {
     return Windows::ApplicationModel::Package::Current->InstalledLocation->Path->Data();