@@ -122,6 +122,34 @@ typedef int (*secp256k1_nonce_function)(
122
122
# endif
123
123
# endif
124
124
125
+ /* SECP_HAVE_X is 1 iff standard library header X is available.
126
+ *
127
+ * We guess the values of HAVE_X here for various X. You can always override our
128
+ * guess by providing a definition of the respective macro.
129
+ *
130
+ * Note to developers of the library: All SECP256K1_HAVE_X macros will always be
131
+ * defined after this section, so use #if instead #ifdef to check them. */
132
+ #if !defined(SECP256K1_HAVE_STDIO_H )
133
+ # if defined(__has_include )
134
+ # define SECP256K1_HAVE_STDIO_H (__has_include(<stdio.h>))
135
+ # elif defined(__STDC_HOSTED__ )
136
+ # define SECP256K1_HAVE_STDIO_H __STDC_HOSTED__
137
+ # else
138
+ /* Unreachable with a confirming compiler. Guess "yes" as a last resort. */
139
+ # define SECP256K1_HAVE_STDIO_H 1
140
+ # endif
141
+ #endif
142
+ #if !defined(SECP256K1_HAVE_STDLIB_H )
143
+ # if defined(__has_include )
144
+ # define SECP256K1_HAVE_STDLIB_H (__has_include(<stdlib.h>))
145
+ # elif defined(__STDC_HOSTED__ )
146
+ # define SECP256K1_HAVE_STDLIB_H __STDC_HOSTED__
147
+ # else
148
+ /* Unreachable with a confirming compiler. Guess "yes" as a last resort. */
149
+ # define SECP256K1_HAVE_STDLIB_H 1
150
+ # endif
151
+ #endif
152
+
125
153
/* When this header is used at build-time the SECP256K1_BUILD define needs to be set
126
154
* to correctly setup export attributes and nullness checks. This is normally done
127
155
* by secp256k1.c but to guard against this header being included before secp256k1.c
0 commit comments