mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r26517) -Fix: Windows 9x (or rather non-unicode) compile failures
This commit is contained in:
parent
5ef2042819
commit
5ebf72d126
|
@ -89,6 +89,8 @@ bool IniFile::SaveToDisk(const char *filename)
|
|||
#endif
|
||||
|
||||
#if defined(WIN32) || defined(WIN64)
|
||||
/* _tcsncpy = strcpy is TCHAR is char, but isn't when TCHAR is wchar. */
|
||||
#undef strncpy
|
||||
/* Allocate space for one more \0 character. */
|
||||
TCHAR tfilename[MAX_PATH + 1], tfile_new[MAX_PATH + 1];
|
||||
_tcsncpy(tfilename, OTTD2FS(filename), MAX_PATH);
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue