diff options
author | Tomas Mraz <tomas@openssl.org> | 2022-05-04 16:58:06 +0200 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2022-05-13 08:33:39 +0200 |
commit | 48d2eca1c5abe085425e63a09b63e82408c985ce (patch) | |
tree | fec519b963cca92e76b84d5a24fc03c452f6dfbe /e_os.h | |
parent | 86290ec1f7ba99f7f454c2541b69082a785b5166 (diff) |
Fix build on OPENSSL_SYS_TANDEM and older POSIXes
It also allows for passing -DOPENSSL_NO_LOCALE as a workaround
to ./Configure command.
Fixes #18233
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18293)
Diffstat (limited to 'e_os.h')
-rw-r--r-- | e_os.h | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -409,4 +409,23 @@ inline int nssgetpid(); # endif # endif +/* + * str[n]casecmp_l is defined in POSIX 2008-01. Value is taken accordingly + * https://www.gnu.org/software/libc/manual/html_node/Feature-Test-Macros.html + * There are also equivalent functions on Windows. + * There is no locale_t on NONSTOP. + */ +# if defined(OPENSSL_SYS_WINDOWS) +# define locale_t _locale_t +# define freelocale _free_locale +# define strcasecmp_l _stricmp_l +# define strncasecmp_l _strnicmp_l +# define strcasecmp _stricmp +# elif !defined(_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 200809L \ + || defined(OPENSSL_SYS_TANDEM) +# ifndef OPENSSL_NO_LOCALE +# define OPENSSL_NO_LOCALE +# endif +# endif + #endif |