mirror of
https://github.com/openssl/openssl.git
synced 2025-04-06 20:20:50 +08:00
crypto: fix preprocessor concatenation
String litteral don't need the '##' operator, which causes build failures: crypto/defaults.c:kepi:23: error: pasting ""SOFTWARE\\WOW6432Node\\OpenSSL"" and ""-"" does not give a valid preprocessing token 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
50316c18a0
commit
ed3876adb1
@ -72,7 +72,7 @@ DEFINE_RUN_ONCE_STATIC(version_strings_setup)
|
||||
}
|
||||
|
||||
# define TOSTR(x) #x
|
||||
# define OSSL_WINCTX_STRING "OSSL_WINCTX: \"" ## TOSTR(OSSL_WINCTX) ## "\""
|
||||
# define OSSL_WINCTX_STRING "OSSL_WINCTX: \"" TOSTR(OSSL_WINCTX) "\""
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
# define MAKESTR(x) TOSTR(x)
|
||||
# define NOQUOTE(x) x
|
||||
# if defined(OSSL_WINCTX)
|
||||
# define REGISTRY_KEY "SOFTWARE\\WOW6432Node\\OpenSSL" ##"-"## MAKESTR(OPENSSL_VERSION_MAJOR) ##"."## MAKESTR(OPENSSL_VERSION_MINOR) ##"-"## MAKESTR(OSSL_WINCTX)
|
||||
# define REGISTRY_KEY "SOFTWARE\\WOW6432Node\\OpenSSL" "-" MAKESTR(OPENSSL_VERSION_MAJOR) "." MAKESTR(OPENSSL_VERSION_MINOR) "-" MAKESTR(OSSL_WINCTX)
|
||||
# endif
|
||||
|
||||
/**
|
||||
@ -70,7 +70,7 @@ static char *get_windows_regdirs(char *dst, LPCTSTR valuename)
|
||||
LSTATUS ret;
|
||||
DWORD index = 0;
|
||||
LPCTCH tempstr = NULL;
|
||||
|
||||
|
||||
ret = RegOpenKeyEx(HKEY_LOCAL_MACHINE,
|
||||
TEXT(REGISTRY_KEY), KEY_WOW64_32KEY,
|
||||
KEY_QUERY_VALUE, &hkey);
|
||||
@ -97,7 +97,7 @@ static char *get_windows_regdirs(char *dst, LPCTSTR valuename)
|
||||
goto out;
|
||||
|
||||
if (!WideCharToMultiByte(CP_UTF8, 0, tempstr, -1, dst, keysize,
|
||||
NULL, NULL))
|
||||
NULL, NULL))
|
||||
goto out;
|
||||
|
||||
retval = dst;
|
||||
|
Loading…
x
Reference in New Issue
Block a user