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