vcpkg/ports/flint/fix-static.patch

35 lines
1.3 KiB
Diff

diff --git a/src/mpoly.h b/src/mpoly.h
index b50f27332..5e6307b89 100644
--- a/src/mpoly.h
+++ b/src/mpoly.h
@@ -33,12 +33,14 @@ slong mpoly_divide_threads(slong n, double la, double lb);
#else
# define DECLSPEC_IMPORT
#endif
+#ifndef __GMP_H__
DECLSPEC_IMPORT ulong __gmpn_add_n(nn_ptr, nn_srcptr, nn_srcptr, long int);
DECLSPEC_IMPORT ulong __gmpn_sub_n(nn_ptr, nn_srcptr, nn_srcptr, long int);
DECLSPEC_IMPORT ulong __gmpn_addmul_1(nn_ptr, nn_srcptr, long int, ulong);
DECLSPEC_IMPORT ulong __gmpn_submul_1(nn_ptr, nn_srcptr, long int, ulong);
DECLSPEC_IMPORT ulong __gmpn_rshift(nn_ptr, nn_srcptr, long int, unsigned int);
DECLSPEC_IMPORT ulong __gmpn_mul_1(nn_ptr, nn_srcptr, long int, ulong);
+#endif
#undef DECLSPEC_IMPORT
/* context *******************************************************************/
diff --git a/src/ulong_extras.h b/src/ulong_extras.h
index 808a9e3c1..aaf4916cc 100644
--- a/src/ulong_extras.h
+++ b/src/ulong_extras.h
@@ -91,8 +91,10 @@ ulong n_clog_2exp(ulong n, ulong b);
#else
# define DECLSPEC_IMPORT
#endif
+#ifndef __GMP_H__
DECLSPEC_IMPORT ulong __gmpn_gcd_11(ulong, ulong);
DECLSPEC_IMPORT ulong __gmpn_gcd_1(nn_srcptr, long int, ulong);
+#endif
#undef DECLSPEC_IMPORT
ULONG_EXTRAS_INLINE