File tree 1 file changed +9
-1
lines changed 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -133,8 +133,14 @@ typedef int (*secp256k1_nonce_function)(
133
133
# define SECP256K1_NO_BUILD
134
134
#endif
135
135
136
- /* Symbol visibility. See https://gcc.gnu.org/wiki/Visibility */
136
+ /* Symbol visibility. */
137
137
#if defined(_WIN32 )
138
+ /* GCC for Windows (e.g., MinGW) accepts the __declspec syntax
139
+ * for MSVC compatibility. A __declspec declaration implies (but is not
140
+ * exactly equivalent to) __attribute__ ((visibility("default"))), and so we
141
+ * actually want __declspec even on GCC, see "Microsoft Windows Function
142
+ * Attributes" in the GCC manual and the recommendations in
143
+ * https://gcc.gnu.org/wiki/Visibility. */
138
144
# if defined(SECP256K1_BUILD )
139
145
# if defined(DLL_EXPORT ) || defined(SECP256k1_DLL_EXPORT )
140
146
/* Building libsecp256k1 as a DLL.
@@ -154,8 +160,10 @@ typedef int (*secp256k1_nonce_function)(
154
160
#endif
155
161
#ifndef SECP256K1_API
156
162
# if defined(__GNUC__ ) && (__GNUC__ >= 4 ) && defined(SECP256K1_BUILD )
163
+ /* Building libsecp256k1 on non-Windows using GCC or compatible. */
157
164
# define SECP256K1_API __attribute__ ((visibility ("default")))
158
165
# else
166
+ /* All cases not captured above. */
159
167
# define SECP256K1_API
160
168
# endif
161
169
#endif
You can’t perform that action at this time.
0 commit comments