Просмотр исходного кода

Cleaned up some header inclusion politics.

Ryan C. Gordon 8 лет назад
Родитель
Сommit
7607eeeb00

+ 3 - 5
src/physfs_platform_apple.m

@@ -7,16 +7,14 @@
  */
 
 #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 "physfs_internal.h"
+
 int __PHYSFS_platformInit(void)
 {
     return 1;  /* success. */

+ 1 - 1
src/physfs_platform_unix.c

@@ -57,6 +57,7 @@
 #include <sys/sysctl.h>
 #endif
 
+
 #include "physfs_internal.h"
 
 int __PHYSFS_platformInit(void)
@@ -71,7 +72,6 @@ void __PHYSFS_platformDeinit(void)
 } /* __PHYSFS_platformDeinit */
 
 
-/* Stub version for platforms without CD-ROM support. */
 void __PHYSFS_platformDetectAvailableCDs(PHYSFS_StringCallback cb, void *data)
 {
 #if (defined PHYSFS_NO_CDROM_SUPPORT)

+ 3 - 5
src/physfs_platform_windows.c

@@ -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

+ 2 - 5
src/physfs_platform_winrt.cpp

@@ -17,13 +17,10 @@
 
 #ifdef PHYSFS_PLATFORM_WINRT
 
-#include "physfs_internal.h"
-
-/* !!! FIXME: maybe clean out the "allocator" macro, eventually. */
-#undef allocator  /* apparently Windows 10 SDK conflicts here. */
-
 #include <windows.h>
 
+#include "physfs_internal.h"
+
 const void *__PHYSFS_winrtCalcBaseDir(void)
 {
     return Windows::ApplicationModel::Package::Current->InstalledLocation->Path->Data();