Introduce SECP256K1_LOCAL_VAR macro
This change makes the `-fvisibility=hidden` compiler option unnecessary.
This commit is contained in:
12
src/util_local_visibility.h
Normal file
12
src/util_local_visibility.h
Normal file
@@ -0,0 +1,12 @@
|
||||
#ifndef SECP256K1_LOCAL_VISIBILITY_H
|
||||
#define SECP256K1_LOCAL_VISIBILITY_H
|
||||
|
||||
/* Global variable visibility */
|
||||
/* See: https://github.com/bitcoin-core/secp256k1/issues/1181 */
|
||||
#if !defined(_WIN32) && defined(__GNUC__) && (__GNUC__ >= 4)
|
||||
# define SECP256K1_LOCAL_VAR extern __attribute__ ((visibility ("hidden")))
|
||||
#else
|
||||
# define SECP256K1_LOCAL_VAR extern
|
||||
#endif
|
||||
|
||||
#endif /* SECP256K1_LOCAL_VISIBILITY_H */
|
||||
Reference in New Issue
Block a user