Some minor preprocessor nitpicks.

This commit is contained in:
Ryan C. Gordon 2017-07-24 02:36:58 -04:00
parent 8c13bd27d6
commit a5461ddcd9
2 changed files with 7 additions and 7 deletions

View File

@ -35,7 +35,7 @@
#include <malloc.h> #include <malloc.h>
#endif #endif
#if PHYSFS_PLATFORM_SOLARIS #ifdef PHYSFS_PLATFORM_SOLARIS
#include <alloca.h> #include <alloca.h>
#endif #endif
@ -58,7 +58,7 @@ extern "C" {
# define inline __inline # define inline __inline
#endif #endif
#if PHYSFS_PLATFORM_LINUX && !defined(_FILE_OFFSET_BITS) #if defined(PHYSFS_PLATFORM_LINUX) && !defined(_FILE_OFFSET_BITS)
#define _FILE_OFFSET_BITS 64 #define _FILE_OFFSET_BITS 64
#endif #endif
@ -405,7 +405,7 @@ void __PHYSFS_DirTreeDeinit(__PHYSFS_DirTree *dt);
* Obviously, this isn't a function. If you need more than one char for this, * Obviously, this isn't a function. If you need more than one char for this,
* you'll need to pull some old pieces of PhysicsFS out of revision control. * you'll need to pull some old pieces of PhysicsFS out of revision control.
*/ */
#if PHYSFS_PLATFORM_WINDOWS || PHYSFS_PLATFORM_OS2 #if defined(PHYSFS_PLATFORM_WINDOWS) || defined(PHYSFS_PLATFORM_OS2)
#define __PHYSFS_platformDirSeparator '\\' #define __PHYSFS_platformDirSeparator '\\'
#else #else
#define __PHYSFS_platformDirSeparator '/' #define __PHYSFS_platformDirSeparator '/'

View File

@ -53,7 +53,7 @@
#include <sys/mnttab.h> #include <sys/mnttab.h>
#endif #endif
#if PHYSFS_PLATFORM_FREEBSD #ifdef PHYSFS_PLATFORM_FREEBSD
#include <sys/sysctl.h> #include <sys/sysctl.h>
#endif #endif
@ -254,8 +254,8 @@ char *__PHYSFS_platformCalcBaseDir(const char *argv0)
const char *envr = NULL; const char *envr = NULL;
/* Try to avoid using argv0 unless forced to. Try system-specific stuff. */ /* Try to avoid using argv0 unless forced to. Try system-specific stuff. */
#if PHYSFS_PLATFORM_FREEBSD #if defined(PHYSFS_PLATFORM_FREEBSD)
{ {
char fullpath[PATH_MAX]; char fullpath[PATH_MAX];
size_t buflen = sizeof (fullpath); size_t buflen = sizeof (fullpath);
@ -263,7 +263,7 @@ char *__PHYSFS_platformCalcBaseDir(const char *argv0)
if (sysctl(mib, 4, fullpath, &buflen, NULL, 0) != -1) if (sysctl(mib, 4, fullpath, &buflen, NULL, 0) != -1)
retval = __PHYSFS_strdup(fullpath); retval = __PHYSFS_strdup(fullpath);
} }
#elif PHYSFS_PLATFORM_SOLARIS #elif defined(PHYSFS_PLATFORM_SOLARIS)
{ {
const char *path = getexecname(); const char *path = getexecname();
if ((path != NULL) && (path[0] == '/')) /* must be absolute path... */ if ((path != NULL) && (path[0] == '/')) /* must be absolute path... */