From 6525cfd39ef8305acdd8462cf850ecfa01b0be32 Mon Sep 17 00:00:00 2001 From: Ykkrosh Date: Thu, 16 Jul 2009 16:57:59 +0000 Subject: [PATCH] Patch from #259: [FreeBSD compat] portability fixes This was SVN commit r7002. --- build/premake/src/Src/os.h | 2 +- build/workspaces/update-workspaces.sh | 4 ++-- source/ps/DllLoader.cpp | 2 +- source/tools/atlas/AtlasScript/ScriptInterface.cpp | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/build/premake/src/Src/os.h b/build/premake/src/Src/os.h index f122f9a504..a5bd4f4bf9 100644 --- a/build/premake/src/Src/os.h +++ b/build/premake/src/Src/os.h @@ -19,7 +19,7 @@ * but since it is the most command I use is as the default */ #if defined(__linux__) #define PLATFORM_POSIX 1 -#elif defined(__FreeBSD) || defined(__NetBSD__) || defined(__OpenBSD__) +#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) #define PLATFORM_POSIX 1 #elif defined(__APPLE__) && defined(__MACH__) #define PLATFORM_POSIX 1 diff --git a/build/workspaces/update-workspaces.sh b/build/workspaces/update-workspaces.sh index 2b9d8852b1..0f021ff219 100755 --- a/build/workspaces/update-workspaces.sh +++ b/build/workspaces/update-workspaces.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # build/workspaces/ @@ -12,7 +12,7 @@ cd $premake_dir # build/premake/ make -C src -HOSTTYPE=$HOSTTYPE ./premake --outpath $workspace_dir --atlas --collada $* --target gnu +HOSTTYPE=$HOSTTYPE ./premake --outpath $workspace_dir --atlas --collada "$@" --target gnu # These files need to be linked; premake makefiles assume that the # lua file is accessible from the makefile directory diff --git a/source/ps/DllLoader.cpp b/source/ps/DllLoader.cpp index 1ea284e7dc..96084ea26a 100644 --- a/source/ps/DllLoader.cpp +++ b/source/ps/DllLoader.cpp @@ -84,7 +84,7 @@ bool DllLoader::LoadDLL() // open failed (mostly likely SO not found) if (! m_Handle) { - char* error = dlerror(); + const char* error = dlerror(); if (error) LOG(CLogger::Error, "", "dlopen error: %s", error); m_Handle = HANDLE_UNAVAILABLE; diff --git a/source/tools/atlas/AtlasScript/ScriptInterface.cpp b/source/tools/atlas/AtlasScript/ScriptInterface.cpp index bfeabd72b4..f72b87b40f 100644 --- a/source/tools/atlas/AtlasScript/ScriptInterface.cpp +++ b/source/tools/atlas/AtlasScript/ScriptInterface.cpp @@ -48,7 +48,7 @@ #include #include -#ifndef _WIN32 +#if defined(__linux__) || (defined(__APPLE__) && defined(__MACH__)) # include #endif @@ -513,7 +513,7 @@ namespace wxLogWarning(_T("%s"), logMessage.c_str()); else wxLogError(_T("%s"), logMessage.c_str()); -#ifndef _WIN32 +#if defined(__linux__) || (defined(__APPLE__) && defined(__MACH__)) // When running under Valgrind, print more information in the error message VALGRIND_PRINTF_BACKTRACE("->"); #endif