From b98f989e0c741d7534a58ba3fb22f5af0f016ca4 Mon Sep 17 00:00:00 2001 From: Tomas Mraz Date: Wed, 4 May 2022 16:58:06 +0200 Subject: 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 Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/18282) --- test/localetest.c | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) (limited to 'test/localetest.c') diff --git a/test/localetest.c b/test/localetest.c index 270236a72d..9f13d38550 100644 --- a/test/localetest.c +++ b/test/localetest.c @@ -1,3 +1,11 @@ +/* + * Copyright 2022 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the Apache License 2.0 (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ #include #include @@ -6,12 +14,12 @@ #include "testutil/output.h" #include -#include -#ifdef OPENSSL_SYS_WINDOWS -# define strcasecmp _stricmp -#else -# include -#endif +#include "internal/e_os.h" +#ifndef OPENSSL_NO_LOCALE +# include +# ifdef OPENSSL_SYS_MACOSX +# include +# endif int setup_tests(void) { @@ -117,7 +125,12 @@ int setup_tests(void) X509_free(cert); return 1; } - +#else +int setup_tests(void) +{ + return TEST_skip("Locale support not available"); +} +#endif /* OPENSSL_NO_LOCALE */ void cleanup_tests(void) { } -- cgit v1.2.1