Skip to content

Commit

Permalink
Some minor preprocessor nitpicks.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Jul 24, 2017
1 parent 8c13bd2 commit a5461dd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/physfs_internal.h
Expand Up @@ -35,7 +35,7 @@
#include <malloc.h>
#endif

#if PHYSFS_PLATFORM_SOLARIS
#ifdef PHYSFS_PLATFORM_SOLARIS
#include <alloca.h>
#endif

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

Expand Down Expand Up @@ -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 '/'
Expand Down
8 changes: 4 additions & 4 deletions src/physfs_platform_unix.c
Expand Up @@ -53,7 +53,7 @@
#include <sys/mnttab.h>
#endif

#if PHYSFS_PLATFORM_FREEBSD
#ifdef PHYSFS_PLATFORM_FREEBSD
#include <sys/sysctl.h>
#endif

Expand Down Expand Up @@ -254,16 +254,16 @@ 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);
int mib[4] = { CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 };
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... */
Expand Down

0 comments on commit a5461dd

Please sign in to comment.