diff options
| author | tb <> | 2023-02-16 08:38:17 +0000 |
|---|---|---|
| committer | tb <> | 2023-02-16 08:38:17 +0000 |
| commit | 24a27fd0d17d515b00097199de60fa85a76a95df (patch) | |
| tree | 689defafde66dbfa38a7854af566bd9a05f191b7 /src/lib/libssl | |
| parent | 3170d87c6599656e7568dca509714cf70723f0d2 (diff) | |
| download | openbsd-24a27fd0d17d515b00097199de60fa85a76a95df.tar.gz openbsd-24a27fd0d17d515b00097199de60fa85a76a95df.tar.bz2 openbsd-24a27fd0d17d515b00097199de60fa85a76a95df.zip | |
libressl *_namespace.h: adjust *_ALIAS() to require a semicolon
LCRYPTO_ALIAS() and LSSL_ALIAS() contained a trailing semicolon.
This does not conform to style(9), breaks editors and ctags and
(most importantly) my workflow. Fix this by neutering them with
asm("") so that -Wpedantic doesn't complain. There's precedent
in libc's namespace.h
fix suggested by & ok jsing
Diffstat (limited to 'src/lib/libssl')
| -rw-r--r-- | src/lib/libssl/bio_ssl.c | 8 | ||||
| -rw-r--r-- | src/lib/libssl/hidden/ssl_namespace.h | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/libssl/bio_ssl.c b/src/lib/libssl/bio_ssl.c index 98a730d110..1a8cda84d6 100644 --- a/src/lib/libssl/bio_ssl.c +++ b/src/lib/libssl/bio_ssl.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: bio_ssl.c,v 1.37 2022/11/26 16:08:55 tb Exp $ */ | 1 | /* $OpenBSD: bio_ssl.c,v 1.38 2023/02/16 08:38:17 tb Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -103,7 +103,7 @@ BIO_f_ssl(void) | |||
| 103 | { | 103 | { |
| 104 | return (&methods_sslp); | 104 | return (&methods_sslp); |
| 105 | } | 105 | } |
| 106 | LSSL_ALIAS(BIO_f_ssl) | 106 | LSSL_ALIAS(BIO_f_ssl); |
| 107 | 107 | ||
| 108 | static int | 108 | static int |
| 109 | ssl_new(BIO *bi) | 109 | ssl_new(BIO *bi) |
| @@ -533,7 +533,7 @@ BIO_new_ssl_connect(SSL_CTX *ctx) | |||
| 533 | BIO_free(ssl); | 533 | BIO_free(ssl); |
| 534 | return (NULL); | 534 | return (NULL); |
| 535 | } | 535 | } |
| 536 | LSSL_ALIAS(BIO_new_ssl_connect) | 536 | LSSL_ALIAS(BIO_new_ssl_connect); |
| 537 | 537 | ||
| 538 | BIO * | 538 | BIO * |
| 539 | BIO_new_ssl(SSL_CTX *ctx, int client) | 539 | BIO_new_ssl(SSL_CTX *ctx, int client) |
| @@ -558,7 +558,7 @@ BIO_new_ssl(SSL_CTX *ctx, int client) | |||
| 558 | BIO_free(ret); | 558 | BIO_free(ret); |
| 559 | return (NULL); | 559 | return (NULL); |
| 560 | } | 560 | } |
| 561 | LSSL_ALIAS(BIO_new_ssl) | 561 | LSSL_ALIAS(BIO_new_ssl); |
| 562 | 562 | ||
| 563 | int | 563 | int |
| 564 | BIO_ssl_copy_session_id(BIO *t, BIO *f) | 564 | BIO_ssl_copy_session_id(BIO *t, BIO *f) |
diff --git a/src/lib/libssl/hidden/ssl_namespace.h b/src/lib/libssl/hidden/ssl_namespace.h index 803f3e66be..7a941a0e10 100644 --- a/src/lib/libssl/hidden/ssl_namespace.h +++ b/src/lib/libssl/hidden/ssl_namespace.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ssl_namespace.h,v 1.1 2022/11/11 11:25:18 beck Exp $ */ | 1 | /* $OpenBSD: ssl_namespace.h,v 1.2 2023/02/16 08:38:17 tb Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2016 Philip Guenther <guenther@openbsd.org> | 3 | * Copyright (c) 2016 Philip Guenther <guenther@openbsd.org> |
| 4 | * | 4 | * |
| @@ -27,11 +27,11 @@ | |||
| 27 | #define LSSL_UNUSED(x) typeof(x) x __attribute__((deprecated)) | 27 | #define LSSL_UNUSED(x) typeof(x) x __attribute__((deprecated)) |
| 28 | #define LSSL_USED(x) __attribute__((visibility("hidden"))) \ | 28 | #define LSSL_USED(x) __attribute__((visibility("hidden"))) \ |
| 29 | typeof(x) x asm("_lssl_"#x) | 29 | typeof(x) x asm("_lssl_"#x) |
| 30 | #define LSSL_ALIAS(x) asm(".global "#x"; "#x" = _lssl_"#x); | 30 | #define LSSL_ALIAS(x) asm(".global "#x"; "#x" = _lssl_"#x) |
| 31 | #else | 31 | #else |
| 32 | #define LSSL_UNUSED(x) | 32 | #define LSSL_UNUSED(x) |
| 33 | #define LSSL_USED(x) | 33 | #define LSSL_USED(x) |
| 34 | #define LSSL_ALIAS(x) | 34 | #define LSSL_ALIAS(x) asm("") |
| 35 | #endif | 35 | #endif |
| 36 | 36 | ||
| 37 | #endif /* _LIBSSL_SSL_NAMESPACE_H_ */ | 37 | #endif /* _LIBSSL_SSL_NAMESPACE_H_ */ |
