From 17220ef828fdd128ba0849571e6db67159df385f Mon Sep 17 00:00:00 2001 From: Tim Ruffing Date: Sat, 24 Aug 2024 23:32:39 +0200 Subject: [PATCH] include: Simplify preprocessor logic No semantic change. --- include/secp256k1.h | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/include/secp256k1.h b/include/secp256k1.h index a7f1b5d97f..39ed3fde51 100644 --- a/include/secp256k1.h +++ b/include/secp256k1.h @@ -161,15 +161,12 @@ typedef int (*secp256k1_nonce_function)( /* Consuming libsecp256k1 as a DLL. */ # define SECP256K1_API extern __declspec (dllimport) # endif -#endif -#ifndef SECP256K1_API -# if defined(__GNUC__) && (__GNUC__ >= 4) && defined(SECP256K1_BUILD) - /* Building libsecp256k1 on non-Windows using GCC or compatible. */ -# define SECP256K1_API extern __attribute__ ((visibility ("default"))) -# else - /* All cases not captured above. */ -# define SECP256K1_API extern -# endif +#elif defined(__GNUC__) && (__GNUC__ >= 4) && defined(SECP256K1_BUILD) + /* Building libsecp256k1 on non-Windows using GCC or compatible. */ +# define SECP256K1_API extern __attribute__ ((visibility ("default"))) +#else + /* All cases not captured above. */ +# define SECP256K1_API extern #endif /* Warning attributes