Cleaned up some header inclusion politics.

This commit is contained in:
Ryan C. Gordon 2017-08-16 20:03:24 -04:00
parent e19422cc06
commit 7607eeeb00
4 changed files with 9 additions and 16 deletions

View File

@ -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. */

View File

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

View File

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

View File

@ -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();