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 <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 7f04bb065d)
This commit is contained in:
Richard Levitte 2024-04-10 10:18:46 +02:00
parent 2fd6c12e85
commit 491bbb444c
4 changed files with 1 additions and 7 deletions

View 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}."\"\"\"" : ();

View 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"

View 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>

View 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"