From c02738ce19ec578d148c5092c87c2b231d3f659f Mon Sep 17 00:00:00 2001 From: Jens Ayton Date: Sat, 15 Jan 2011 18:08:49 +0000 Subject: [PATCH] Linux fixes. git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4075 127b21dd-08f5-0310-b4b7-95ae10353056 --- GNUmakefile | 2 +- src/Core/Scripting/OOJSEngineDebuggerHelpers.m | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index 9a75f51a..a0eb7529 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -70,7 +70,7 @@ else endif JS_IMPORT_LIBRARY = libjs.a endif - ADDITIONAL_INCLUDE_DIRS = -I$(LIBJS_SRC_DIR) -I$(LIBJS_BIN_DIR) -Isrc/SDL -Isrc/Core -Isrc/BSDCompat -Isrc/Core/Scripting -Isrc/Core/Materials -Isrc/Core/Entities -Isrc/Core/OXPVerifier -Isrc/Core/Debug + ADDITIONAL_INCLUDE_DIRS = -I$(LIBJS_SRC_DIR) -I$(LIBJS_BIN_DIR) -Isrc/SDL -Isrc/Core -Isrc/BSDCompat -Isrc/Core/Scripting -Isrc/Core/Materials -Isrc/Core/Entities -Isrc/Core/OXPVerifier -Isrc/Core/Debug -Isrc/Core/Tables ADDITIONAL_OBJC_LIBS = $(LIBJS_BIN_DIR)/$(JS_IMPORT_LIBRARY) -lGLU -lGL -lX11 ADDITIONAL_CFLAGS = -Wall -DLINUX -DNEED_STRLCPY `sdl-config --cflags` ADDITIONAL_OBJCFLAGS = -Wall -std=c99 -DLOADSAVEGUI -DLINUX -DXP_UNIX -Wno-import `sdl-config --cflags` diff --git a/src/Core/Scripting/OOJSEngineDebuggerHelpers.m b/src/Core/Scripting/OOJSEngineDebuggerHelpers.m index 9faaad8f..0606bd4f 100644 --- a/src/Core/Scripting/OOJSEngineDebuggerHelpers.m +++ b/src/Core/Scripting/OOJSEngineDebuggerHelpers.m @@ -197,6 +197,7 @@ const char *JSStringToStrSafeDbg(JSString *str) } +#if OO_NEW_JS const char *JSIDToStrSafeDbg(jsid anID) { NSString *formatted = nil; @@ -213,7 +214,7 @@ const char *JSIDToStrSafeDbg(jsid anID) const jschar *chars = NULL; size_t length = JS_GetStringLength(string); -#if OO_NEW_JS && OOJS_FF4B9 +#if OOJS_FF4B9 if (JS_StringHasBeenInterned(string)) { chars = JS_GetInternedStringChars(string); @@ -235,5 +236,6 @@ const char *JSIDToStrSafeDbg(jsid anID) return [formatted UTF8String]; } +#endif #endif