From 6346acf7a9ab3c004dd829b53b980905f5d4fc3b 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 b0a03043bf..ddb0f14750 100644 --- a/include/secp256k1.h +++ b/include/secp256k1.h @@ -162,15 +162,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