From a5461ddcd9ba46ea2b8afb8ef02160017ced2daf Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Mon, 24 Jul 2017 02:36:58 -0400 Subject: [PATCH] Some minor preprocessor nitpicks. --- src/physfs_internal.h | 6 +++--- src/physfs_platform_unix.c | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/physfs_internal.h b/src/physfs_internal.h index 342e36af..c39c4039 100644 --- a/src/physfs_internal.h +++ b/src/physfs_internal.h @@ -35,7 +35,7 @@ #include #endif -#if PHYSFS_PLATFORM_SOLARIS +#ifdef PHYSFS_PLATFORM_SOLARIS #include #endif @@ -58,7 +58,7 @@ extern "C" { # define inline __inline #endif -#if PHYSFS_PLATFORM_LINUX && !defined(_FILE_OFFSET_BITS) +#if defined(PHYSFS_PLATFORM_LINUX) && !defined(_FILE_OFFSET_BITS) #define _FILE_OFFSET_BITS 64 #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, * 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 '\\' #else #define __PHYSFS_platformDirSeparator '/' diff --git a/src/physfs_platform_unix.c b/src/physfs_platform_unix.c index 905600f6..a27b14a6 100644 --- a/src/physfs_platform_unix.c +++ b/src/physfs_platform_unix.c @@ -53,7 +53,7 @@ #include #endif -#if PHYSFS_PLATFORM_FREEBSD +#ifdef PHYSFS_PLATFORM_FREEBSD #include #endif @@ -254,8 +254,8 @@ char *__PHYSFS_platformCalcBaseDir(const char *argv0) const char *envr = NULL; /* 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]; size_t buflen = sizeof (fullpath); @@ -263,7 +263,7 @@ char *__PHYSFS_platformCalcBaseDir(const char *argv0) if (sysctl(mib, 4, fullpath, &buflen, NULL, 0) != -1) retval = __PHYSFS_strdup(fullpath); } - #elif PHYSFS_PLATFORM_SOLARIS + #elif defined(PHYSFS_PLATFORM_SOLARIS) { const char *path = getexecname(); if ((path != NULL) && (path[0] == '/')) /* must be absolute path... */