-/* $OpenBSD: crypto_namespace.h,v 1.2 2023/02/16 08:38:17 tb Exp $ */
+/* $OpenBSD: crypto_namespace.h,v 1.3 2024/03/30 10:09:43 tb Exp $ */
/*
* Copyright (c) 2016 Philip Guenther <guenther@openbsd.org>
*
*/
#ifdef LIBRESSL_NAMESPACE
-# define LCRYPTO_UNUSED(x) typeof(x) x __attribute__((deprecated))
#ifdef LIBRESSL_CRYPTO_NAMESPACE
-# define LCRYPTO_USED(x) __attribute__((visibility("hidden"))) \
+# define LCRYPTO_UNUSED(x) __attribute__((deprecated)) \
+ __attribute__((visibility("hidden"))) \
+ typeof(x) x asm("_lcry_"#x)
+# define LCRYPTO_USED(x) __attribute__((visibility("hidden"))) \
typeof(x) x asm("_lcry_"#x)
# define LCRYPTO_ALIAS1(pre,x) asm(".global "#pre#x"; "#pre#x" = _lcry_"#x)
# define LCRYPTO_ALIAS(x) LCRYPTO_ALIAS1(,x); LCRYPTO_ALIAS1(_libre_,x)
#else
-# define LCRYPTO_USED(x) typeof(x) x asm("_libre_"#x)
+# define LCRYPTO_UNUSED(x) typeof(x) x __attribute__((deprecated))
+# define LCRYPTO_USED(x) typeof(x) x asm("_libre_"#x)
#endif
#else
# define LCRYPTO_UNUSED(x)