Skip to content

Commit

Permalink
include: Simplify preprocessor logic
Browse files Browse the repository at this point in the history
No semantic change.
  • Loading branch information
real-or-random committed Aug 24, 2024
1 parent 5eb211a commit 6346acf
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions include/secp256k1.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6346acf

Please sign in to comment.