mirror of
https://github.com/openssl/openssl.git
synced 2025-04-06 20:20:50 +08:00
crypto: windows: use LPCTSTR for the temp registry buffer
mingw-w64 only defines LPCTCH when UNICODE isn't defined crypto/defaults.c: In function 'get_windows_regdirs': crypto/defaults.c:72:5: error: unknown type name 'LPCTCH'; did you mean 'LPTCH'? 72 | LPCTCH tempstr = NULL; | ^~~~~~ | LPTCH Reviewed-by: Neil Horman <nhorman@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/26566)
This commit is contained in:
parent
ed3876adb1
commit
0e38f78dca
@ -69,7 +69,7 @@ static char *get_windows_regdirs(char *dst, LPCTSTR valuename)
|
||||
HKEY hkey;
|
||||
LSTATUS ret;
|
||||
DWORD index = 0;
|
||||
LPCTCH tempstr = NULL;
|
||||
LPCTSTR tempstr = NULL;
|
||||
|
||||
ret = RegOpenKeyEx(HKEY_LOCAL_MACHINE,
|
||||
TEXT(REGISTRY_KEY), KEY_WOW64_32KEY,
|
||||
@ -93,7 +93,7 @@ static char *get_windows_regdirs(char *dst, LPCTSTR valuename)
|
||||
goto out;
|
||||
|
||||
if (RegQueryValueEx(hkey, valuename,
|
||||
NULL, &ktype, tempstr, &keysize) != ERROR_SUCCESS)
|
||||
NULL, &ktype, (LPBYTE)tempstr, &keysize) != ERROR_SUCCESS)
|
||||
goto out;
|
||||
|
||||
if (!WideCharToMultiByte(CP_UTF8, 0, tempstr, -1, dst, keysize,
|
||||
|
Loading…
x
Reference in New Issue
Block a user