]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
VMS: Move defining _XOPEN_SOURCE and _XOPEN_SOURCE_EXTENDED to config target
authorRichard Levitte <levitte@openssl.org>
Wed, 10 Apr 2024 08:18:46 +0000 (10:18 +0200)
committerRichard Levitte <levitte@openssl.org>
Thu, 11 Apr 2024 11:06:49 +0000 (13:06 +0200)
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 <tom.cosgrove@arm.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/24083)

(cherry picked from commit 7f04bb065d9d948d049ef1ef1bd4062cb7831392)

Configurations/10-main.conf
crypto/asn1/a_time.c
crypto/conf/conf_lib.c
crypto/conf/conf_sap.c

index c9db9aac28ebdaebeb8ad77768db1ac10a7245c6..ac30adc2c9ffe431a0387d56721b49a03fbaf9e4 100644 (file)
@@ -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}."\"\"\"" : ();
index 49548235adaddeb62fd8faccce988816ee252b74..96ee63d3104cec62368f8ae73f81937b13caad3d 100644 (file)
@@ -14,8 +14,6 @@
  *      generalTime    GeneralizedTime }
  */
 
-#define _XOPEN_SOURCE            /* To get a definition of timezone */
-
 #include <stdio.h>
 #include <time.h>
 #include "crypto/asn1.h"
index 13e2723f8009f5e4e6513267ed3f0ed312f95d7b..99e9f8c987b3471b4e6470425846b96dc4be8f49 100644 (file)
@@ -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 <stdio.h>
 #include <string.h>
index 9c78f465814894556e1e8d112d883af402c88193..3019bcf31af81abf116cc6bae319b3d9cb094fd3 100644 (file)
@@ -7,8 +7,6 @@
  * https://www.openssl.org/source/license.html
  */
 
-#define _XOPEN_SOURCE_EXTENDED   /* To get a definition of strdup() */
-
 #include <stdio.h>
 #include <openssl/crypto.h>
 #include "internal/cryptlib.h"