From c2da907f349ec5decf6fb3e641b0bcb72a82fb78 Mon Sep 17 00:00:00 2001 From: Don Ho Date: Mon, 1 Jul 2024 23:47:02 +0200 Subject: [PATCH] Fix comiling error in msys2 Close #15388 --- PowerEditor/src/MISC/sha1/sha1.h | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/PowerEditor/src/MISC/sha1/sha1.h b/PowerEditor/src/MISC/sha1/sha1.h index 718bbc2a59a1..bd33c1b13133 100644 --- a/PowerEditor/src/MISC/sha1/sha1.h +++ b/PowerEditor/src/MISC/sha1/sha1.h @@ -102,8 +102,7 @@ C4609560 A108A0C6 26AA7F2B 38A65566 739353C5 */ -#ifndef SHA1_H_A545E61D43E9404E8D736869AB3CBFE7 -#define SHA1_H_A545E61D43E9404E8D736869AB3CBFE7 +#pragma once #if !defined(SHA1_UTILITY_FUNCTIONS) && !defined(SHA1_NO_UTILITY_FUNCTIONS) #define SHA1_UTILITY_FUNCTIONS @@ -154,22 +153,20 @@ #include #else #ifndef TCHAR -#define TCHAR char -#endif -#ifndef _T -#define _T(__x) (__x) -#define _tmain main -#define _tprintf printf -#define _getts gets -#define _tcslen strlen -#define _tfopen fopen -#define _tcscpy strcpy -#define _tcscat strcat -#define _sntprintf snprintf +#define TCHAR wchar_t #endif +#define _tmain wmain +#define _tprintf wprintf +#define _getts getws +#define _tcslen wcslen +#define _tfopen _wfopen +#define _tcscpy wcscpy +#define _tcscat wcscat +#define _sntprintf snwprintf #endif #endif + /////////////////////////////////////////////////////////////////////////// // Define variable types @@ -279,4 +276,3 @@ class CSHA1 SHA1_WORKSPACE_BLOCK* m_block; // SHA1 pointer to the byte array above }; -#endif // SHA1_H_A545E61D43E9404E8D736869AB3CBFE7