summaryrefslogtreecommitdiff
path: root/src/os
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2014-04-26 07:30:15 +0000
committerrubidium <rubidium@openttd.org>2014-04-26 07:30:15 +0000
commit5ebf72d1260fbe38e1a3ee118ac4b692041c9885 (patch)
tree27233294d8b8663b7bd41c01dfaaa9e2c809482d /src/os
parent5ef2042819ea612a50b6ba01411cc9b083e34096 (diff)
downloadopenttd-5ebf72d1260fbe38e1a3ee118ac4b692041c9885.tar.xz
(svn r26517) -Fix: Windows 9x (or rather non-unicode) compile failures
Diffstat (limited to 'src/os')
-rw-r--r--src/os/windows/crashlog_win.cpp4
-rw-r--r--src/os/windows/win32.cpp3
2 files changed, 7 insertions, 0 deletions
diff --git a/src/os/windows/crashlog_win.cpp b/src/os/windows/crashlog_win.cpp
index 9704403c8..39f100601 100644
--- a/src/os/windows/crashlog_win.cpp
+++ b/src/os/windows/crashlog_win.cpp
@@ -613,6 +613,10 @@ static void SetWndSize(HWND wnd, int mode)
}
}
+/* When TCHAR is char, then _sntprintf becomes snprintf. When TCHAR is wchar it doesn't. Likewise for strcat. */
+#undef snprintf
+#undef strcat
+
static INT_PTR CALLBACK CrashDialogFunc(HWND wnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
switch (msg) {
diff --git a/src/os/windows/win32.cpp b/src/os/windows/win32.cpp
index bac1416e4..0867adb99 100644
--- a/src/os/windows/win32.cpp
+++ b/src/os/windows/win32.cpp
@@ -29,7 +29,10 @@
#include <errno.h>
#include <sys/stat.h>
+/* Due to TCHAR, strncat and strncpy have to remain (for a while). */
#include "../../safeguards.h"
+#undef strncat
+#undef strncpy
static bool _has_console;
static bool _cursor_disable = true;