Skip to content

Commit

Permalink
Cleaned up some header inclusion politics.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Aug 17, 2017
1 parent e19422c commit 7607eee
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 16 deletions.
8 changes: 3 additions & 5 deletions src/physfs_platform_apple.m
Expand Up @@ -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. */
Expand Down
2 changes: 1 addition & 1 deletion src/physfs_platform_unix.c
Expand Up @@ -57,6 +57,7 @@
#include <sys/sysctl.h>
#endif


#include "physfs_internal.h"

int __PHYSFS_platformInit(void)
Expand All @@ -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)
Expand Down
8 changes: 3 additions & 5 deletions src/physfs_platform_windows.c
Expand Up @@ -7,7 +7,7 @@
*/

#define __PHYSICSFS_INTERNAL__
#include "physfs_internal.h"
#include "physfs_platforms.h"

#ifdef PHYSFS_PLATFORM_WINDOWS

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

Expand All @@ -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
Expand Down
7 changes: 2 additions & 5 deletions src/physfs_platform_winrt.cpp
Expand Up @@ -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();
Expand Down

0 comments on commit 7607eee

Please sign in to comment.