Diverse small VMS build fixups

Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/24008)

(cherry picked from commit 1a4b029af5)
This commit is contained in:
Richard Levitte 2024-03-30 12:52:50 +01:00 committed by Tomas Mraz
parent 089271601a
commit a19553cd87
7 changed files with 30 additions and 5 deletions

View File

@ -239,7 +239,7 @@
# from these directories.
push @{$unified_info{includes_extra}->{$obj}}, qw(./quic);
}
foreach (grep /\[\.ssl\.(?:quic|record|statem)\].*?\.o$/, keys %{$unified_info{sources}}) {
foreach (grep /\[\.ssl\.(?:quic|record|statem|rio)\].*?\.o$/, keys %{$unified_info{sources}}) {
my $obj = platform->obj($_);
# Most of the files in [.ssl.record] and [.ssl.statem] include
# "../ssl_local.h", which includes things like "record/record.h".

View File

@ -200,7 +200,7 @@ BIO *http_server_init(const char *prog, const char *port, int verb)
int port_num;
char name[40];
snprintf(name, sizeof(name), "*:%s", port); /* port may be "0" */
BIO_snprintf(name, sizeof(name), "*:%s", port); /* port may be "0" */
if (verb >= 0 && !log_set_verbosity(prog, verb))
return NULL;
bufbio = BIO_new(BIO_f_buffer());

View File

@ -14,6 +14,8 @@
* generalTime GeneralizedTime }
*/
#define _XOPEN_SOURCE /* To get a definition of timezone */
#include <stdio.h>
#include <time.h>
#include "crypto/asn1.h"

View File

@ -7,6 +7,8 @@
* 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,6 +7,8 @@
* 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"

View File

@ -9,6 +9,7 @@
#include "internal/json_enc.h"
#include "internal/nelem.h"
#include "internal/numbers.h"
#include <string.h>
#include <math.h>
@ -602,10 +603,19 @@ void ossl_json_f64(OSSL_JSON_ENC *json, double value)
if (!json_pre_item(json))
return;
if (isnan(value) || isinf(value)) {
json_raise_error(json);
return;
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
{
int checks = isnan(value);
# if !defined(OPENSSL_SYS_VMS)
checks |= isinf(value);
# endif
if (checks) {
json_raise_error(json);
return;
}
}
#endif
BIO_snprintf(buf, sizeof(buf), "%1.17g", value);
json_write_str(json, buf);

View File

@ -144,6 +144,15 @@ typedef void (*fp_pz_type)(OSSL_JSON_ENC *, const void *, size_t);
return &script_info; \
}
#ifdef OPENSSL_SYS_VMS
/*
* The VMS C compiler recognises \u in strings, and emits a warning, which
* stops the build. Because we think we know what we're doing, we change that
* particular message to be merely informational.
*/
# pragma message informational UCNNOMAP
#endif
#define END_SCRIPT_EXPECTING_S(s) END_SCRIPT_EXPECTING(s, SIZE_MAX)
#define END_SCRIPT_EXPECTING_Q(s) END_SCRIPT_EXPECTING(#s, sizeof(#s) - 1)