Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Diverse small VMS build fixups #24008

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion Configurations/descrip.mms.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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".
Expand Down
2 changes: 1 addition & 1 deletion apps/lib/http_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
2 changes: 2 additions & 0 deletions crypto/asn1/a_time.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 2 additions & 0 deletions crypto/conf/conf_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 2 additions & 0 deletions crypto/conf/conf_sap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
16 changes: 13 additions & 3 deletions ssl/quic/json_enc.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

#include "internal/json_enc.h"
#include "internal/nelem.h"
#include "internal/numbers.h"
#include <string.h>
#include <math.h>

Expand Down Expand Up @@ -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
nhorman marked this conversation as resolved.
Show resolved Hide resolved
{
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);
Expand Down
9 changes: 9 additions & 0 deletions test/json_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down