diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libssl/hidden/ssl_namespace.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/lib/libssl/hidden/ssl_namespace.h b/src/lib/libssl/hidden/ssl_namespace.h new file mode 100644 index 0000000000..803f3e66be --- /dev/null +++ b/src/lib/libssl/hidden/ssl_namespace.h | |||
| @@ -0,0 +1,37 @@ | |||
| 1 | /* $OpenBSD: ssl_namespace.h,v 1.1 2022/11/11 11:25:18 beck Exp $ */ | ||
| 2 | /* | ||
| 3 | * Copyright (c) 2016 Philip Guenther <guenther@openbsd.org> | ||
| 4 | * | ||
| 5 | * Permission to use, copy, modify, and distribute this software for any | ||
| 6 | * purpose with or without fee is hereby granted, provided that the above | ||
| 7 | * copyright notice and this permission notice appear in all copies. | ||
| 8 | * | ||
| 9 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| 10 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| 11 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| 12 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| 13 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| 14 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| 15 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 16 | */ | ||
| 17 | |||
| 18 | #ifndef _LIBSSL_SSL_NAMESPACE_H_ | ||
| 19 | #define _LIBSSL_SSL_NAMESPACE_H_ | ||
| 20 | |||
| 21 | /* | ||
| 22 | * If marked as 'used', then internal calls use the name with prefix "_lssl_" | ||
| 23 | * and we alias that to the normal name. | ||
| 24 | */ | ||
| 25 | |||
| 26 | #ifdef LIBRESSL_NAMESPACE | ||
| 27 | #define LSSL_UNUSED(x) typeof(x) x __attribute__((deprecated)) | ||
| 28 | #define LSSL_USED(x) __attribute__((visibility("hidden"))) \ | ||
| 29 | typeof(x) x asm("_lssl_"#x) | ||
| 30 | #define LSSL_ALIAS(x) asm(".global "#x"; "#x" = _lssl_"#x); | ||
| 31 | #else | ||
| 32 | #define LSSL_UNUSED(x) | ||
| 33 | #define LSSL_USED(x) | ||
| 34 | #define LSSL_ALIAS(x) | ||
| 35 | #endif | ||
| 36 | |||
| 37 | #endif /* _LIBSSL_SSL_NAMESPACE_H_ */ | ||
