From 2afe5ca95e3f24b4dd6dfba0ce460d89cc197b6e Mon Sep 17 00:00:00 2001 From: anders_k Date: Sun, 26 Oct 2014 23:22:27 +0000 Subject: [PATCH] Fake the LPTSTR type if necessary for MakeNSIS on POSIX git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6567 212acab6-be3b-0410-9dea-997c60f758d6 --- Source/exehead/api.h | 3 +++ Source/exehead/util.c | 2 +- Source/exehead/util.h | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Source/exehead/api.h b/Source/exehead/api.h index 5c225441..55c49839 100644 --- a/Source/exehead/api.h +++ b/Source/exehead/api.h @@ -60,6 +60,9 @@ typedef struct #ifndef NSISCALL # define NSISCALL __stdcall #endif +#if !defined(_WIN32) && !defined(LPTSTR) +# define LPTSTR TCHAR* +#endif typedef struct { exec_flags_t *exec_flags; diff --git a/Source/exehead/util.c b/Source/exehead/util.c index ec5d94c5..01b16955 100644 --- a/Source/exehead/util.c +++ b/Source/exehead/util.c @@ -855,7 +855,7 @@ TCHAR * NSISCALL GetNSISString(TCHAR *outbuf, int strtab) return ps_tmpbuf; } -void NSISCALL validate_filename(LPTSTR in) { +void NSISCALL validate_filename(TCHAR *in) { TCHAR *nono = _T("*?|<>/\":"); TCHAR *out; TCHAR *out_save; diff --git a/Source/exehead/util.h b/Source/exehead/util.h index f7817b25..7578bfb1 100644 --- a/Source/exehead/util.h +++ b/Source/exehead/util.h @@ -98,7 +98,7 @@ TCHAR * NSISCALL findchar(TCHAR *str, TCHAR c); TCHAR * NSISCALL trimslashtoend(TCHAR *buf); TCHAR * NSISCALL skip_root(TCHAR *path); int NSISCALL is_valid_instpath(TCHAR *s); -void NSISCALL validate_filename(LPTSTR fn); +void NSISCALL validate_filename(TCHAR *fn); /** * MoveFileOnReboot tries to move a file by the name of pszExisting to the