From: Richard Levitte Date: Wed, 10 Apr 2024 08:18:46 +0000 (+0200) Subject: VMS: Move defining _XOPEN_SOURCE and _XOPEN_SOURCE_EXTENDED to config target X-Git-Tag: openssl-3.4.0-alpha1~709 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=491bbb444c4b654de14adc7031eb44e88a101edb;p=thirdparty%2Fopenssl.git VMS: Move defining _XOPEN_SOURCE and _XOPEN_SOURCE_EXTENDED to config target For all other platforms that need these macros defined, that's how it's done, so we have VMS follow suit. That avoids a crash between in source definitions and command line definitions on some other platforms. Fixes #24075 Reviewed-by: Tom Cosgrove Reviewed-by: Tomas Mraz Reviewed-by: Neil Horman (Merged from https://github.com/openssl/openssl/pull/24083) (cherry picked from commit 7f04bb065d9d948d049ef1ef1bd4062cb7831392) --- diff --git a/Configurations/10-main.conf b/Configurations/10-main.conf index c9db9aac28e..ac30adc2c9f 100644 --- a/Configurations/10-main.conf +++ b/Configurations/10-main.conf @@ -2054,7 +2054,7 @@ my %targets = ( ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : (); }), cflag_incfirst => '/FIRST_INCLUDE=', lib_defines => - add("OPENSSL_USE_NODELETE", + add("OPENSSL_USE_NODELETE", "_XOPEN_SOURCE", "_XOPEN_SOURCE_EXTENDED", sub { return vms_info()->{def_zlib} ? "LIBZ=\"\"\"".vms_info()->{def_zlib}."\"\"\"" : (); diff --git a/crypto/asn1/a_time.c b/crypto/asn1/a_time.c index 49548235ada..96ee63d3104 100644 --- a/crypto/asn1/a_time.c +++ b/crypto/asn1/a_time.c @@ -14,8 +14,6 @@ * generalTime GeneralizedTime } */ -#define _XOPEN_SOURCE /* To get a definition of timezone */ - #include #include #include "crypto/asn1.h" diff --git a/crypto/conf/conf_lib.c b/crypto/conf/conf_lib.c index 13e2723f800..99e9f8c987b 100644 --- a/crypto/conf/conf_lib.c +++ b/crypto/conf/conf_lib.c @@ -7,8 +7,6 @@ * https://www.openssl.org/source/license.html */ -#define _XOPEN_SOURCE_EXTENDED /* To get a definition of strdup() */ - #include "internal/e_os.h" #include #include diff --git a/crypto/conf/conf_sap.c b/crypto/conf/conf_sap.c index 9c78f465814..3019bcf31af 100644 --- a/crypto/conf/conf_sap.c +++ b/crypto/conf/conf_sap.c @@ -7,8 +7,6 @@ * https://www.openssl.org/source/license.html */ -#define _XOPEN_SOURCE_EXTENDED /* To get a definition of strdup() */ - #include #include #include "internal/cryptlib.h"