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.
@@ -151,8 +157,10 @@ typedef int (*secp256k1_nonce_function)(
151
157
#endif
152
158
#ifndef SECP256K1_API
153
159
# if defined(__GNUC__ ) && (__GNUC__ >= 4 ) && defined(SECP256K1_BUILD )
160
+ /* Building libsecp256k1 on non-Windows using GCC or compatible. */
154
161
# define SECP256K1_API extern __attribute__ ((visibility ("default")))
155
162
# else
163
+ /* All cases not captured above. */
156
164
# define SECP256K1_API extern
157
165
# endif
158
166
#endif
You can’t perform that action at this time.
0 commit comments