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