diff options
| author | Theo Buehler <tb@openbsd.org> | 2025-08-18 12:52:28 +0200 |
|---|---|---|
| committer | Theo Buehler <tb@openbsd.org> | 2025-08-18 12:52:28 +0200 |
| commit | f30ace5a6bdae4a37b8a7475e420e6dcb9f5d344 (patch) | |
| tree | 8611be9e8800584ffbe872fce95bd2b14d619c25 | |
| parent | b96c2ff27fbc8495f408104520fff36bb9f37e1b (diff) | |
| parent | 8c76c282b3130f4967854686d3eaff0c15758d7c (diff) | |
| download | portable-f30ace5a6bdae4a37b8a7475e420e6dcb9f5d344.tar.gz portable-f30ace5a6bdae4a37b8a7475e420e6dcb9f5d344.tar.bz2 portable-f30ace5a6bdae4a37b8a7475e420e6dcb9f5d344.zip | |
Land #1194 - Improve *_namespace.h patches
| -rw-r--r-- | patches/crypto_namespace.h.patch | 23 | ||||
| -rw-r--r-- | patches/ssl_namespace.h.patch | 22 |
2 files changed, 26 insertions, 19 deletions
diff --git a/patches/crypto_namespace.h.patch b/patches/crypto_namespace.h.patch index 400030f..f45a121 100644 --- a/patches/crypto_namespace.h.patch +++ b/patches/crypto_namespace.h.patch | |||
| @@ -1,22 +1,25 @@ | |||
| 1 | --- crypto/hidden/crypto_namespace.h.orig Fri Aug 2 23:52:55 2024 | 1 | --- crypto/hidden/crypto_namespace.h.orig Sun Aug 17 13:14:19 2025 |
| 2 | +++ crypto/hidden/crypto_namespace.h Fri Aug 2 23:53:17 2024 | 2 | +++ crypto/hidden/crypto_namespace.h Mon Aug 18 04:10:42 2025 |
| 3 | @@ -24,6 +24,12 @@ | 3 | @@ -24,6 +24,10 @@ |
| 4 | * external calls use the latter name. | 4 | * external calls use the latter name. |
| 5 | */ | 5 | */ |
| 6 | 6 | ||
| 7 | +#ifdef _MSC_VER | 7 | +#ifdef _MSC_VER |
| 8 | +# define LCRYPTO_UNUSED(x) | 8 | +#undef LIBRESSL_NAMESPACE |
| 9 | +# define LCRYPTO_USED(x) | 9 | +#endif |
| 10 | +# define LCRYPTO_ALIAS1(pre, x) | 10 | + |
| 11 | +# define LCRYPTO_ALIAS(x) | ||
| 12 | +#else | ||
| 13 | #ifdef LIBRESSL_NAMESPACE | 11 | #ifdef LIBRESSL_NAMESPACE |
| 14 | #ifdef LIBRESSL_CRYPTO_NAMESPACE | 12 | #ifdef LIBRESSL_CRYPTO_NAMESPACE |
| 15 | # define LCRYPTO_UNUSED(x) __attribute__((deprecated)) \ | 13 | # define LCRYPTO_UNUSED(x) __attribute__((deprecated)) \ |
| 16 | @@ -47,5 +53,6 @@ | 14 | @@ -45,7 +49,11 @@ |
| 15 | # define LCRYPTO_UNUSED(x) | ||
| 16 | # define LCRYPTO_USED(x) | ||
| 17 | # define LCRYPTO_ALIAS1(pre,x) | 17 | # define LCRYPTO_ALIAS1(pre,x) |
| 18 | +#ifdef _MSC_VER | ||
| 19 | +# define LCRYPTO_ALIAS(x) | ||
| 20 | +#else | ||
| 18 | # define LCRYPTO_ALIAS(x) asm("") | 21 | # define LCRYPTO_ALIAS(x) asm("") |
| 19 | #endif | ||
| 20 | +#endif /* _MSC_VER */ | 22 | +#endif /* _MSC_VER */ |
| 23 | #endif | ||
| 21 | 24 | ||
| 22 | #endif /* _LIBCRYPTO_CRYPTO_NAMESPACE_H_ */ | 25 | #endif /* _LIBCRYPTO_CRYPTO_NAMESPACE_H_ */ |
diff --git a/patches/ssl_namespace.h.patch b/patches/ssl_namespace.h.patch index eb9c7a2..d7b924a 100644 --- a/patches/ssl_namespace.h.patch +++ b/patches/ssl_namespace.h.patch | |||
| @@ -1,21 +1,25 @@ | |||
| 1 | --- ssl/hidden/ssl_namespace.h.orig Fri Aug 2 23:52:55 2024 | 1 | --- ssl/hidden/ssl_namespace.h.orig Sun Aug 17 13:14:19 2025 |
| 2 | +++ ssl/hidden/ssl_namespace.h Fri Aug 2 23:53:17 2024 | 2 | +++ ssl/hidden/ssl_namespace.h Mon Aug 18 04:11:53 2025 |
| 3 | @@ -23,6 +23,11 @@ | 3 | @@ -23,6 +23,10 @@ |
| 4 | * and we alias that to the normal name. | 4 | * and we alias that to the normal name. |
| 5 | */ | 5 | */ |
| 6 | 6 | ||
| 7 | +#ifdef _MSC_VER | 7 | +#ifdef _MSC_VER |
| 8 | +#define LSSL_UNUSED(x) | 8 | +#undef LIBRESSL_NAMESPACE |
| 9 | +#define LSSL_USED(x) | 9 | +#endif |
| 10 | +#define LSSL_ALIAS(x) | 10 | + |
| 11 | +#else | ||
| 12 | #ifdef LIBRESSL_NAMESPACE | 11 | #ifdef LIBRESSL_NAMESPACE |
| 13 | #define LSSL_UNUSED(x) typeof(x) x __attribute__((deprecated)) | 12 | #define LSSL_UNUSED(x) typeof(x) x __attribute__((deprecated)) |
| 14 | #define LSSL_USED(x) __attribute__((visibility("hidden"))) \ | 13 | #define LSSL_USED(x) __attribute__((visibility("hidden"))) \ |
| 15 | @@ -37,5 +42,6 @@ | 14 | @@ -35,7 +39,11 @@ |
| 15 | #else | ||
| 16 | #define LSSL_UNUSED(x) | ||
| 16 | #define LSSL_USED(x) | 17 | #define LSSL_USED(x) |
| 18 | +#ifdef _MSC_VER | ||
| 19 | +#define LSSL_ALIAS(x) | ||
| 20 | +#else | ||
| 17 | #define LSSL_ALIAS(x) asm("") | 21 | #define LSSL_ALIAS(x) asm("") |
| 18 | #endif | ||
| 19 | +#endif /* _MSC_VER */ | 22 | +#endif /* _MSC_VER */ |
| 23 | #endif | ||
| 20 | 24 | ||
| 21 | #endif /* _LIBSSL_SSL_NAMESPACE_H_ */ | 25 | #endif /* _LIBSSL_SSL_NAMESPACE_H_ */ |
