From 86842873606d8c66103faac86778c92856731cec Mon Sep 17 00:00:00 2001 From: Ykkrosh Date: Thu, 15 Jul 2004 19:59:27 +0000 Subject: [PATCH] Linux fixes This was SVN commit r763. --- source/lib/res/unifont.cpp | 4 ++-- source/lib/sysdep/sysdep.cpp | 3 ++- source/lib/sysdep/unix/unix.cpp | 8 ++++++++ source/ps/Errors.h | 2 +- source/scripting/ScriptingHost.h | 4 +++- 5 files changed, 16 insertions(+), 5 deletions(-) diff --git a/source/lib/res/unifont.cpp b/source/lib/res/unifont.cpp index 4d4a0d18b9..9a616b092e 100755 --- a/source/lib/res/unifont.cpp +++ b/source/lib/res/unifont.cpp @@ -1,5 +1,5 @@ /* -$Id: unifont.cpp,v 1.8 2004/07/13 22:47:20 philip Exp $ +$Id: unifont.cpp,v 1.9 2004/07/15 19:58:12 philip Exp $ Unicode OpenGL texture font @@ -229,4 +229,4 @@ int unifont_stringsize(const Handle h, const char* text, int& width, int& height } return 0; -} \ No newline at end of file +} diff --git a/source/lib/sysdep/sysdep.cpp b/source/lib/sysdep/sysdep.cpp index 32818566ad..19d90b8077 100755 --- a/source/lib/sysdep/sysdep.cpp +++ b/source/lib/sysdep/sysdep.cpp @@ -1,6 +1,7 @@ #include "precompiled.h" #include "sysdep.h" +#include // portable debug output routines. Win32 offers better versions, which // override these. @@ -68,7 +69,7 @@ void debug_microlog(const wchar_t *fmt, ...) int count = 0; va_start(argp, fmt); - vsnwprintf(buffer, sizeof(buffer), fmt, argp); + vswprintf(buffer, sizeof(buffer), fmt, argp); va_end(argp); wcscat(buffer, L"\r\n"); diff --git a/source/lib/sysdep/unix/unix.cpp b/source/lib/sysdep/unix/unix.cpp index 94414be5cf..40c499ddf1 100755 --- a/source/lib/sysdep/unix/unix.cpp +++ b/source/lib/sysdep/unix/unix.cpp @@ -96,3 +96,11 @@ int debug_assert_failed(const char *file, int line, const char *expr) } } while (false); } + +int debug_write_crashlog(const char* file, wchar_t* header, void* context) +{ + // TODO: Do this properly. (I don't know what I'm doing; I just + // know that this function is required in order to compile...) + + abort(); +} diff --git a/source/ps/Errors.h b/source/ps/Errors.h index 6ba321817b..65cbfec1ee 100755 --- a/source/ps/Errors.h +++ b/source/ps/Errors.h @@ -15,4 +15,4 @@ public: const wchar_t* GetErrorString(int code); -#endif \ No newline at end of file +#endif diff --git a/source/scripting/ScriptingHost.h b/source/scripting/ScriptingHost.h index 97270623d2..3772a0e634 100755 --- a/source/scripting/ScriptingHost.h +++ b/source/scripting/ScriptingHost.h @@ -7,7 +7,9 @@ #endif #ifdef OS_UNIX -# define XP_UNIX +# ifndef XP_UNIX +# define XP_UNIX +# endif #endif #include