[PATCH 11/20] Convert the mpf subdirectory to __GMP_*_DEFINE and include changes

Richard Henderson rth at twiddle.net
Mon Mar 4 19:41:41 CET 2013


---
 mpf/abs.c          |  2 +-
 mpf/add.c          |  2 +-
 mpf/add_ui.c       |  2 +-
 mpf/ceilfloor.c    |  3 ++-
 mpf/clear.c        |  2 +-
 mpf/clears.c       | 11 +----------
 mpf/cmp.c          |  2 +-
 mpf/cmp_d.c        |  8 +-------
 mpf/cmp_si.c       |  2 +-
 mpf/cmp_ui.c       |  2 +-
 mpf/div.c          |  2 +-
 mpf/div_2exp.c     |  2 +-
 mpf/div_ui.c       |  3 +--
 mpf/dump.c         |  4 +---
 mpf/eq.c           |  3 +--
 mpf/fits_s.h       |  2 +-
 mpf/fits_u.h       |  2 +-
 mpf/get_d.c        |  2 +-
 mpf/get_d_2exp.c   |  3 +--
 mpf/get_dfl_prec.c |  2 +-
 mpf/get_prc.c      |  2 +-
 mpf/get_si.c       |  2 +-
 mpf/get_str.c      |  4 +---
 mpf/get_ui.c       |  2 +-
 mpf/init.c         |  2 +-
 mpf/init2.c        |  2 +-
 mpf/inits.c        | 11 +----------
 mpf/inp_str.c      |  4 +---
 mpf/int_p.c        |  2 +-
 mpf/iset.c         |  2 +-
 mpf/iset_d.c       |  2 +-
 mpf/iset_si.c      |  2 +-
 mpf/iset_str.c     |  2 +-
 mpf/iset_ui.c      |  2 +-
 mpf/mul.c          |  2 +-
 mpf/mul_2exp.c     |  2 +-
 mpf/mul_ui.c       |  3 +--
 mpf/neg.c          |  2 +-
 mpf/out_str.c      | 12 ++----------
 mpf/pow_ui.c       |  2 +-
 mpf/random2.c      |  2 +-
 mpf/reldiff.c      |  2 +-
 mpf/set.c          |  2 +-
 mpf/set_d.c        |  8 +-------
 mpf/set_dfl_prec.c |  3 ++-
 mpf/set_prc.c      |  2 +-
 mpf/set_prc_raw.c  |  2 +-
 mpf/set_q.c        |  4 +---
 mpf/set_si.c       |  2 +-
 mpf/set_str.c      | 13 ++-----------
 mpf/set_ui.c       |  2 +-
 mpf/set_z.c        |  2 +-
 mpf/size.c         |  2 +-
 mpf/sqrt.c         |  3 +--
 mpf/sqrt_ui.c      |  3 +--
 mpf/sub.c          |  2 +-
 mpf/sub_ui.c       |  2 +-
 mpf/swap.c         |  2 +-
 mpf/trunc.c        |  2 +-
 mpf/ui_div.c       |  4 +---
 mpf/ui_sub.c       |  2 +-
 mpf/urandomb.c     |  2 +-
 62 files changed, 66 insertions(+), 127 deletions(-)

diff --git a/mpf/abs.c b/mpf/abs.c
index 4f8a76e..5104fcb 100644
--- a/mpf/abs.c
+++ b/mpf/abs.c
@@ -17,7 +17,6 @@ License for more details.
 You should have received a copy of the GNU Lesser General Public License
 along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
 
-#include "gmp.h"
 #include "gmp-impl.h"
 
 void
@@ -46,3 +45,4 @@ mpf_abs (mpf_ptr r, mpf_srcptr u)
     }
   r->_mp_size = size;
 }
+__GMP_PUBLIC_DEFINE (mpf_abs)
diff --git a/mpf/add.c b/mpf/add.c
index 48f73e9..ccd2b58 100644
--- a/mpf/add.c
+++ b/mpf/add.c
@@ -17,7 +17,6 @@ License for more details.
 You should have received a copy of the GNU Lesser General Public License
 along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
 
-#include "gmp.h"
 #include "gmp-impl.h"
 
 void
@@ -171,3 +170,4 @@ mpf_add (mpf_ptr r, mpf_srcptr u, mpf_srcptr v)
   r->_mp_exp = uexp;
   TMP_FREE;
 }
+__GMP_PUBLIC_DEFINE (mpf_add)
diff --git a/mpf/add_ui.c b/mpf/add_ui.c
index 549ca99..897dad5 100644
--- a/mpf/add_ui.c
+++ b/mpf/add_ui.c
@@ -17,7 +17,6 @@ License for more details.
 You should have received a copy of the GNU Lesser General Public License
 along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
 
-#include "gmp.h"
 #include "gmp-impl.h"
 
 void
@@ -140,3 +139,4 @@ mpf_add_ui (mpf_ptr sum, mpf_srcptr u, unsigned long int v)
 	}
     }
 }
+__GMP_PUBLIC_DEFINE (mpf_add_ui)
diff --git a/mpf/ceilfloor.c b/mpf/ceilfloor.c
index 3a34c1b..31f66a3 100644
--- a/mpf/ceilfloor.c
+++ b/mpf/ceilfloor.c
@@ -17,7 +17,6 @@ License for more details.
 You should have received a copy of the GNU Lesser General Public License
 along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
 
-#include "gmp.h"
 #include "gmp-impl.h"
 
 
@@ -107,9 +106,11 @@ mpf_ceil (mpf_ptr r, mpf_srcptr u)
 {
   mpf_ceil_or_floor (r, u, 1);
 }
+__GMP_PUBLIC_DEFINE (mpf_ceil)
 
 void
 mpf_floor (mpf_ptr r, mpf_srcptr u)
 {
   mpf_ceil_or_floor (r, u, -1);
 }
+__GMP_PUBLIC_DEFINE (mpf_floor)
diff --git a/mpf/clear.c b/mpf/clear.c
index 78fc138..b5ecf9c 100644
--- a/mpf/clear.c
+++ b/mpf/clear.c
@@ -18,7 +18,6 @@ License for more details.
 You should have received a copy of the GNU Lesser General Public License
 along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
 
-#include "gmp.h"
 #include "gmp-impl.h"
 
 void
@@ -26,3 +25,4 @@ mpf_clear (mpf_ptr m)
 {
   (*__gmp_free_func) (m->_mp_d, (m->_mp_prec + 1) * BYTES_PER_MP_LIMB);
 }
+__GMP_PUBLIC_DEFINE (mpf_clear)
diff --git a/mpf/clears.c b/mpf/clears.c
index 8d43006..deea432 100644
--- a/mpf/clears.c
+++ b/mpf/clears.c
@@ -17,16 +17,6 @@ License for more details.
 You should have received a copy of the GNU Lesser General Public License
 along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
 
-#include "config.h"
-
-#if HAVE_STDARG
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-
-#include <stdio.h>		/* for NULL */
-#include "gmp.h"
 #include "gmp-impl.h"
 
 void
@@ -54,3 +44,4 @@ mpf_clears (va_alist)
     }
   va_end (ap);
 }
+__GMP_PUBLIC_DEFINE (mpf_clears)
diff --git a/mpf/cmp.c b/mpf/cmp.c
index 9a3c7ae..bc0d894 100644
--- a/mpf/cmp.c
+++ b/mpf/cmp.c
@@ -17,7 +17,6 @@ License for more details.
 You should have received a copy of the GNU Lesser General Public License
 along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
 
-#include "gmp.h"
 #include "gmp-impl.h"
 
 int
@@ -104,3 +103,4 @@ mpf_cmp (mpf_srcptr u, mpf_srcptr v) __GMP_NOTHROW
     }
   return cmp > 0 ? usign : -usign;
 }
+__GMP_PUBLIC_DEFINE (mpf_cmp)
diff --git a/mpf/cmp_d.c b/mpf/cmp_d.c
index 09f1b65..fc30718 100644
--- a/mpf/cmp_d.c
+++ b/mpf/cmp_d.c
@@ -17,13 +17,6 @@ License for more details.
 You should have received a copy of the GNU Lesser General Public License
 along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
 
-#include "config.h"
-
-#if HAVE_FLOAT_H
-#include <float.h>  /* for DBL_MAX */
-#endif
-
-#include "gmp.h"
 #include "gmp-impl.h"
 
 int
@@ -47,3 +40,4 @@ mpf_cmp_d (mpf_srcptr f, double d)
 
   return mpf_cmp (f, df);
 }
+__GMP_PUBLIC_DEFINE (mpf_cmp_d)
diff --git a/mpf/cmp_si.c b/mpf/cmp_si.c
index e1af23c..685402f 100644
--- a/mpf/cmp_si.c
+++ b/mpf/cmp_si.c
@@ -18,7 +18,6 @@ License for more details.
 You should have received a copy of the GNU Lesser General Public License
 along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
 
-#include "gmp.h"
 #include "gmp-impl.h"
 
 int
@@ -106,3 +105,4 @@ mpf_cmp_si (mpf_srcptr u, long int vval) __GMP_NOTHROW
   /* Wow, we got zero even if we tried hard to avoid it.  */
   return 0;
 }
+__GMP_PUBLIC_DEFINE (mpf_cmp_si)
diff --git a/mpf/cmp_ui.c b/mpf/cmp_ui.c
index 5e5ed00..b458cfd 100644
--- a/mpf/cmp_ui.c
+++ b/mpf/cmp_ui.c
@@ -17,7 +17,6 @@ License for more details.
 You should have received a copy of the GNU Lesser General Public License
 along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
 
-#include "gmp.h"
 #include "gmp-impl.h"
 
 int
@@ -87,3 +86,4 @@ mpf_cmp_ui (mpf_srcptr u, unsigned long int vval) __GMP_NOTHROW
   /* Wow, we got zero even if we tried hard to avoid it.  */
   return 0;
 }
+__GMP_PUBLIC_DEFINE (mpf_cmp_ui)
diff --git a/mpf/div.c b/mpf/div.c
index ea3297c..a7730e4 100644
--- a/mpf/div.c
+++ b/mpf/div.c
@@ -18,7 +18,6 @@ License for more details.
 You should have received a copy of the GNU Lesser General Public License
 along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
 
-#include "gmp.h"
 #include "gmp-impl.h"
 
 
@@ -125,3 +124,4 @@ mpf_div (mpf_ptr r, mpf_srcptr u, mpf_srcptr v)
   EXP(r) = rexp;
   TMP_FREE;
 }
+__GMP_PUBLIC_DEFINE (mpf_div)
diff --git a/mpf/div_2exp.c b/mpf/div_2exp.c
index f74cd8b..f984e18 100644
--- a/mpf/div_2exp.c
+++ b/mpf/div_2exp.c
@@ -18,7 +18,6 @@ License for more details.
 You should have received a copy of the GNU Lesser General Public License
 along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
 
-#include "gmp.h"
 #include "gmp-impl.h"
 
 
@@ -127,3 +126,4 @@ mpf_div_2exp (mpf_ptr r, mpf_srcptr u, mp_bitcnt_t exp)
     }
   r->_mp_size = usize >= 0 ? abs_usize : -abs_usize;
 }
+__GMP_PUBLIC_DEFINE (mpf_div_2exp)
diff --git a/mpf/div_ui.c b/mpf/div_ui.c
index 5ccc00e..b2f29db 100644
--- a/mpf/div_ui.c
+++ b/mpf/div_ui.c
@@ -18,9 +18,7 @@ License for more details.
 You should have received a copy of the GNU Lesser General Public License
 along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
 
-#include "gmp.h"
 #include "gmp-impl.h"
-#include "longlong.h"
 
 void
 mpf_div_ui (mpf_ptr r, mpf_srcptr u, unsigned long int v)
@@ -98,3 +96,4 @@ mpf_div_ui (mpf_ptr r, mpf_srcptr u, unsigned long int v)
   r->_mp_exp = rexp;
   TMP_FREE;
 }
+__GMP_PUBLIC_DEFINE (mpf_div_ui)
diff --git a/mpf/dump.c b/mpf/dump.c
index ded3606..6f57efe 100644
--- a/mpf/dump.c
+++ b/mpf/dump.c
@@ -22,9 +22,6 @@ License for more details.
 You should have received a copy of the GNU Lesser General Public License
 along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
 
-#include <stdio.h>
-#include <string.h> /* for strlen */
-#include "gmp.h"
 #include "gmp-impl.h"
 
 void
@@ -40,3 +37,4 @@ mpf_dump (mpf_srcptr u)
     printf ("0.%se%ld\n", str, exp);
   (*__gmp_free_func) (str, strlen (str) + 1);
 }
+__GMP_PUBLIC_DEFINE (mpf_dump)
diff --git a/mpf/eq.c b/mpf/eq.c
index 9efa212..e10b7eb 100644
--- a/mpf/eq.c
+++ b/mpf/eq.c
@@ -18,9 +18,7 @@ License for more details.
 You should have received a copy of the GNU Lesser General Public License
 along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
 
-#include "gmp.h"
 #include "gmp-impl.h"
-#include "longlong.h"
 
 int
 mpf_eq (mpf_srcptr u, mpf_srcptr v, mp_bitcnt_t n_bits)
@@ -137,3 +135,4 @@ mpf_eq (mpf_srcptr u, mpf_srcptr v, mp_bitcnt_t n_bits)
 
   return diff == 0;
 }
+__GMP_PUBLIC_DEFINE (mpf_eq)
diff --git a/mpf/fits_s.h b/mpf/fits_s.h
index f10f2c7..2958814 100644
--- a/mpf/fits_s.h
+++ b/mpf/fits_s.h
@@ -17,7 +17,6 @@ License for more details.
 You should have received a copy of the GNU Lesser General Public License
 along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
 
-#include "gmp.h"
 #include "gmp-impl.h"
 
 
@@ -62,3 +61,4 @@ FUNCTION (mpf_srcptr f) __GMP_NOTHROW
 
   return fl <= (fs >= 0 ? (mp_limb_t) MAXIMUM : - (mp_limb_t) MINIMUM);
 }
+__GMP_PUBLIC_DEFINE (FUNCTION)
diff --git a/mpf/fits_u.h b/mpf/fits_u.h
index 4503f03..4cde97f 100644
--- a/mpf/fits_u.h
+++ b/mpf/fits_u.h
@@ -17,7 +17,6 @@ License for more details.
 You should have received a copy of the GNU Lesser General Public License
 along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
 
-#include "gmp.h"
 #include "gmp-impl.h"
 
 
@@ -61,3 +60,4 @@ FUNCTION (mpf_srcptr f) __GMP_NOTHROW
 
   return fl <= MAXIMUM;
 }
+__GMP_PUBLIC_DEFINE (FUNCTION)
diff --git a/mpf/get_d.c b/mpf/get_d.c
index 7be1c6b..614f1cc 100644
--- a/mpf/get_d.c
+++ b/mpf/get_d.c
@@ -17,7 +17,6 @@ License for more details.
 You should have received a copy of the GNU Lesser General Public License
 along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
 
-#include "gmp.h"
 #include "gmp-impl.h"
 
 double
@@ -34,3 +33,4 @@ mpf_get_d (mpf_srcptr src)
   exp = (EXP (src) - abs_size) * GMP_NUMB_BITS;
   return mpn_get_d (PTR (src), abs_size, size, exp);
 }
+__GMP_PUBLIC_DEFINE (mpf_get_d)
diff --git a/mpf/get_d_2exp.c b/mpf/get_d_2exp.c
index a097ab6..0559247 100644
--- a/mpf/get_d_2exp.c
+++ b/mpf/get_d_2exp.c
@@ -17,9 +17,7 @@ License for more details.
 You should have received a copy of the GNU Lesser General Public License
 along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
 
-#include "gmp.h"
 #include "gmp-impl.h"
-#include "longlong.h"
 
 
 double
@@ -48,3 +46,4 @@ mpf_get_d_2exp (signed long int *exp2, mpf_srcptr src)
   return mpn_get_d (ptr, abs_size, (mp_size_t) 0,
                     (long) - (abs_size * GMP_NUMB_BITS - cnt));
 }
+__GMP_PUBLIC_DEFINE (mpf_get_d_2exp)
diff --git a/mpf/get_dfl_prec.c b/mpf/get_dfl_prec.c
index 14606f0..db2219d 100644
--- a/mpf/get_dfl_prec.c
+++ b/mpf/get_dfl_prec.c
@@ -17,7 +17,6 @@ License for more details.
 You should have received a copy of the GNU Lesser General Public License
 along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
 
-#include "gmp.h"
 #include "gmp-impl.h"
 
 
@@ -26,3 +25,4 @@ mpf_get_default_prec (void) __GMP_NOTHROW
 {
   return __GMPF_PREC_TO_BITS (__gmp_default_fp_limb_precision);
 }
+__GMP_PUBLIC_DEFINE (mpf_get_default_prec)
diff --git a/mpf/get_prc.c b/mpf/get_prc.c
index ca7a056..1dbd7c1 100644
--- a/mpf/get_prc.c
+++ b/mpf/get_prc.c
@@ -17,7 +17,6 @@ License for more details.
 You should have received a copy of the GNU Lesser General Public License
 along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
 
-#include "gmp.h"
 #include "gmp-impl.h"
 
 mp_bitcnt_t
@@ -25,3 +24,4 @@ mpf_get_prec (mpf_srcptr x) __GMP_NOTHROW
 {
   return __GMPF_PREC_TO_BITS (x->_mp_prec);
 }
+__GMP_PUBLIC_DEFINE (mpf_get_prec)
diff --git a/mpf/get_si.c b/mpf/get_si.c
index e3d18e8..e655cad 100644
--- a/mpf/get_si.c
+++ b/mpf/get_si.c
@@ -17,7 +17,6 @@ License for more details.
 You should have received a copy of the GNU Lesser General Public License
 along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
 
-#include "gmp.h"
 #include "gmp-impl.h"
 
 
@@ -74,3 +73,4 @@ mpf_get_si (mpf_srcptr f) __GMP_NOTHROW
     /* this form necessary to correctly handle -0x80..00 */
     return -1 - (long) ((fl - 1) & LONG_MAX);
 }
+__GMP_PUBLIC_DEFINE (mpf_get_si)
diff --git a/mpf/get_str.c b/mpf/get_str.c
index d0cba59..1c999d1 100644
--- a/mpf/get_str.c
+++ b/mpf/get_str.c
@@ -22,10 +22,7 @@ License for more details.
 You should have received a copy of the GNU Lesser General Public License
 along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
 
-#include <stdlib.h>		/* for NULL */
-#include "gmp.h"
 #include "gmp-impl.h"
-#include "longlong.h"		/* for count_leading_zeros */
 
 /* Could use some more work.
 
@@ -318,3 +315,4 @@ mpf_get_str (char *dbuf, mp_exp_t *exp, int base, size_t n_digits, mpf_srcptr u)
 
   return dbuf;
 }
+__GMP_PUBLIC_DEFINE (mpf_get_str)
diff --git a/mpf/get_ui.c b/mpf/get_ui.c
index 0d909d4..fc3266b 100644
--- a/mpf/get_ui.c
+++ b/mpf/get_ui.c
@@ -17,7 +17,6 @@ License for more details.
 You should have received a copy of the GNU Lesser General Public License
 along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
 
-#include "gmp.h"
 #include "gmp-impl.h"
 
 
@@ -89,3 +88,4 @@ mpf_get_ui (mpf_srcptr f) __GMP_NOTHROW
 
   return (unsigned long) fl;
 }
+__GMP_PUBLIC_DEFINE (mpf_get_ui)
diff --git a/mpf/init.c b/mpf/init.c
index fae6f19..a5cddf1 100644
--- a/mpf/init.c
+++ b/mpf/init.c
@@ -17,7 +17,6 @@ License for more details.
 You should have received a copy of the GNU Lesser General Public License
 along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
 
-#include "gmp.h"
 #include "gmp-impl.h"
 
 void
@@ -29,3 +28,4 @@ mpf_init (mpf_ptr r)
   r->_mp_prec = prec;
   r->_mp_d = (mp_ptr) (*__gmp_allocate_func) ((prec + 1) * BYTES_PER_MP_LIMB);
 }
+__GMP_PUBLIC_DEFINE (mpf_init)
diff --git a/mpf/init2.c b/mpf/init2.c
index 8298a6b..02cdb03 100644
--- a/mpf/init2.c
+++ b/mpf/init2.c
@@ -17,7 +17,6 @@ License for more details.
 You should have received a copy of the GNU Lesser General Public License
 along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
 
-#include "gmp.h"
 #include "gmp-impl.h"
 
 void
@@ -31,3 +30,4 @@ mpf_init2 (mpf_ptr r, mp_bitcnt_t prec_in_bits)
   r->_mp_prec = prec;
   r->_mp_d = (mp_ptr) (*__gmp_allocate_func) ((prec + 1) * BYTES_PER_MP_LIMB);
 }
+__GMP_PUBLIC_DEFINE (mpf_init2)
diff --git a/mpf/inits.c b/mpf/inits.c
index 33471f6..97b94be 100644
--- a/mpf/inits.c
+++ b/mpf/inits.c
@@ -17,16 +17,6 @@ License for more details.
 You should have received a copy of the GNU Lesser General Public License
 along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
 
-#include "config.h"
-
-#if HAVE_STDARG
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-
-#include <stdio.h>		/* for NULL */
-#include "gmp.h"
 #include "gmp-impl.h"
 
 void
@@ -54,3 +44,4 @@ mpf_inits (va_alist)
     }
   va_end (ap);
 }
+__GMP_PUBLIC_DEFINE (mpf_inits)
diff --git a/mpf/inp_str.c b/mpf/inp_str.c
index 042a20d..801c8d0 100644
--- a/mpf/inp_str.c
+++ b/mpf/inp_str.c
@@ -18,9 +18,6 @@ License for more details.
 You should have received a copy of the GNU Lesser General Public License
 along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
 
-#include <stdio.h>
-#include <ctype.h>
-#include "gmp.h"
 #include "gmp-impl.h"
 
 size_t
@@ -80,3 +77,4 @@ mpf_inp_str (mpf_ptr rop, FILE *stream, int base)
 
   return str_size + nread;
 }
+__GMP_PUBLIC_DEFINE (mpf_inp_str)
diff --git a/mpf/int_p.c b/mpf/int_p.c
index 3168314..db115a0 100644
--- a/mpf/int_p.c
+++ b/mpf/int_p.c
@@ -18,7 +18,6 @@ License for more details.
 You should have received a copy of the GNU Lesser General Public License
 along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
 
-#include "gmp.h"
 #include "gmp-impl.h"
 
 
@@ -46,3 +45,4 @@ mpf_integer_p (mpf_srcptr f) __GMP_NOTHROW
 
   return 1;
 }
+__GMP_PUBLIC_DEFINE (mpf_integer_p)
diff --git a/mpf/iset.c b/mpf/iset.c
index 60ccebc..c3cc0a2 100644
--- a/mpf/iset.c
+++ b/mpf/iset.c
@@ -17,7 +17,6 @@ License for more details.
 You should have received a copy of the GNU Lesser General Public License
 along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
 
-#include "gmp.h"
 #include "gmp-impl.h"
 
 void
@@ -49,3 +48,4 @@ mpf_init_set (mpf_ptr r, mpf_srcptr s)
 
   MPN_COPY (rp, sp, size);
 }
+__GMP_PUBLIC_DEFINE (mpf_init_set)
diff --git a/mpf/iset_d.c b/mpf/iset_d.c
index e0ac141..22007ec 100644
--- a/mpf/iset_d.c
+++ b/mpf/iset_d.c
@@ -17,7 +17,6 @@ License for more details.
 You should have received a copy of the GNU Lesser General Public License
 along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
 
-#include "gmp.h"
 #include "gmp-impl.h"
 
 void
@@ -29,3 +28,4 @@ mpf_init_set_d (mpf_ptr r, double val)
 
   mpf_set_d (r, val);
 }
+__GMP_PUBLIC_DEFINE (mpf_init_set_d)
diff --git a/mpf/iset_si.c b/mpf/iset_si.c
index 7eaf08c..02642e7 100644
--- a/mpf/iset_si.c
+++ b/mpf/iset_si.c
@@ -18,7 +18,6 @@ License for more details.
 You should have received a copy of the GNU Lesser General Public License
 along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
 
-#include "gmp.h"
 #include "gmp-impl.h"
 
 void
@@ -45,3 +44,4 @@ mpf_init_set_si (mpf_ptr r, long int val)
   r->_mp_exp = size;
   r->_mp_size = val >= 0 ? size : -size;
 }
+__GMP_PUBLIC_DEFINE (mpf_init_set_si)
diff --git a/mpf/iset_str.c b/mpf/iset_str.c
index 82a6f2e..3bdc183 100644
--- a/mpf/iset_str.c
+++ b/mpf/iset_str.c
@@ -17,7 +17,6 @@ License for more details.
 You should have received a copy of the GNU Lesser General Public License
 along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
 
-#include "gmp.h"
 #include "gmp-impl.h"
 
 int
@@ -31,3 +30,4 @@ mpf_init_set_str (mpf_ptr r, const char *s, int base)
 
   return mpf_set_str (r, s, base);
 }
+__GMP_PUBLIC_DEFINE (mpf_init_set_str)
diff --git a/mpf/iset_ui.c b/mpf/iset_ui.c
index 4ac1771..5119fea 100644
--- a/mpf/iset_ui.c
+++ b/mpf/iset_ui.c
@@ -18,7 +18,6 @@ License for more details.
 You should have received a copy of the GNU Lesser General Public License
 along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
 
-#include "gmp.h"
 #include "gmp-impl.h"
 
 void
@@ -41,3 +40,4 @@ mpf_init_set_ui (mpf_ptr r, unsigned long int val)
   r->_mp_size = size;
   r->_mp_exp = size;
 }
+__GMP_PUBLIC_DEFINE (mpf_init_set_ui)
diff --git a/mpf/mul.c b/mpf/mul.c
index 0082aa4..f5a5c24 100644
--- a/mpf/mul.c
+++ b/mpf/mul.c
@@ -17,7 +17,6 @@ License for more details.
 You should have received a copy of the GNU Lesser General Public License
 along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
 
-#include "gmp.h"
 #include "gmp-impl.h"
 
 void
@@ -83,3 +82,4 @@ mpf_mul (mpf_ptr r, mpf_srcptr u, mpf_srcptr v)
     }
   TMP_FREE;
 }
+__GMP_PUBLIC_DEFINE (mpf_mul)
diff --git a/mpf/mul_2exp.c b/mpf/mul_2exp.c
index 5ec70e4..a3b2891 100644
--- a/mpf/mul_2exp.c
+++ b/mpf/mul_2exp.c
@@ -18,7 +18,6 @@ License for more details.
 You should have received a copy of the GNU Lesser General Public License
 along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
 
-#include "gmp.h"
 #include "gmp-impl.h"
 
 
@@ -121,3 +120,4 @@ mpf_mul_2exp (mpf_ptr r, mpf_srcptr u, mp_bitcnt_t exp)
     }
   r->_mp_size = usize >= 0 ? abs_usize : -abs_usize;
 }
+__GMP_PUBLIC_DEFINE (mpf_mul_2exp)
diff --git a/mpf/mul_ui.c b/mpf/mul_ui.c
index 96e8012..31de7bf 100644
--- a/mpf/mul_ui.c
+++ b/mpf/mul_ui.c
@@ -17,9 +17,7 @@ License for more details.
 You should have received a copy of the GNU Lesser General Public License
 along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
 
-#include "gmp.h"
 #include "gmp-impl.h"
-#include "longlong.h"
 
 
 /* The core operation is a multiply of PREC(r) limbs from u by v, producing
@@ -169,3 +167,4 @@ mpf_mul_ui (mpf_ptr r, mpf_srcptr u, unsigned long int v)
   size += cy_limb;
   r->_mp_size = usize >= 0 ? size : -size;
 }
+__GMP_PUBLIC_DEFINE (mpf_mul_ui)
diff --git a/mpf/neg.c b/mpf/neg.c
index c7d7d47..b187897 100644
--- a/mpf/neg.c
+++ b/mpf/neg.c
@@ -17,7 +17,6 @@ License for more details.
 You should have received a copy of the GNU Lesser General Public License
 along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
 
-#include "gmp.h"
 #include "gmp-impl.h"
 
 void
@@ -49,3 +48,4 @@ mpf_neg (mpf_ptr r, mpf_srcptr u)
     }
   r->_mp_size = size;
 }
+__GMP_PUBLIC_DEFINE (mpf_neg)
diff --git a/mpf/out_str.c b/mpf/out_str.c
index 3e34a53..3122495 100644
--- a/mpf/out_str.c
+++ b/mpf/out_str.c
@@ -19,12 +19,7 @@ License for more details.
 You should have received a copy of the GNU Lesser General Public License
 along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
 
-#define _GNU_SOURCE    /* for DECIMAL_POINT in langinfo.h */
-
-#include "config.h"
-
-#include <stdio.h>
-#include <string.h>
+#include "gmp-impl.h"
 
 #if HAVE_LANGINFO_H
 #include <langinfo.h>  /* for nl_langinfo */
@@ -34,10 +29,6 @@ along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
 #include <locale.h>    /* for localeconv */
 #endif
 
-#include "gmp.h"
-#include "gmp-impl.h"
-#include "longlong.h"
-
 
 size_t
 mpf_out_str (FILE *stream, int base, size_t n_digits, mpf_srcptr op)
@@ -104,3 +95,4 @@ mpf_out_str (FILE *stream, int base, size_t n_digits, mpf_srcptr op)
   TMP_FREE;
   return ferror (stream) ? 0 : written;
 }
+__GMP_PUBLIC_DEFINE (mpf_out_str)
diff --git a/mpf/pow_ui.c b/mpf/pow_ui.c
index 589bbee..10c44de 100644
--- a/mpf/pow_ui.c
+++ b/mpf/pow_ui.c
@@ -17,7 +17,6 @@ License for more details.
 You should have received a copy of the GNU Lesser General Public License
 along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
 
-#include "gmp.h"
 #include "gmp-impl.h"
 
 void
@@ -41,3 +40,4 @@ mpf_pow_ui (mpf_ptr r, mpf_srcptr b, unsigned long int e)
 
   mpf_clear (b2);
 }
+__GMP_PUBLIC_DEFINE (mpf_pow_ui)
diff --git a/mpf/random2.c b/mpf/random2.c
index d1bef10..2d4569c 100644
--- a/mpf/random2.c
+++ b/mpf/random2.c
@@ -19,7 +19,6 @@ License for more details.
 You should have received a copy of the GNU Lesser General Public License
 along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
 
-#include "gmp.h"
 #include "gmp-impl.h"
 
 
@@ -54,3 +53,4 @@ mpf_random2 (mpf_ptr x, mp_size_t xs, mp_exp_t exp)
   EXP(x) = exp;
   SIZ(x) = xs < 0 ? -xn : xn;
 }
+__GMP_PUBLIC_DEFINE (mpf_random2)
diff --git a/mpf/reldiff.c b/mpf/reldiff.c
index 6a941b8..a344c9e 100644
--- a/mpf/reldiff.c
+++ b/mpf/reldiff.c
@@ -17,7 +17,6 @@ License for more details.
 You should have received a copy of the GNU Lesser General Public License
 along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
 
-#include "gmp.h"
 #include "gmp-impl.h"
 
 
@@ -52,3 +51,4 @@ mpf_reldiff (mpf_t rdiff, mpf_srcptr x, mpf_srcptr y)
       TMP_FREE;
     }
 }
+__GMP_PUBLIC_DEFINE (mpf_reldiff)
diff --git a/mpf/set.c b/mpf/set.c
index 115ab71..46d794f 100644
--- a/mpf/set.c
+++ b/mpf/set.c
@@ -17,7 +17,6 @@ License for more details.
 You should have received a copy of the GNU Lesser General Public License
 along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
 
-#include "gmp.h"
 #include "gmp-impl.h"
 
 void
@@ -43,3 +42,4 @@ mpf_set (mpf_ptr r, mpf_srcptr u)
   r->_mp_size = size >= 0 ? asize : -asize;
   MPN_COPY_INCR (rp, up, asize);
 }
+__GMP_PUBLIC_DEFINE (mpf_set)
diff --git a/mpf/set_d.c b/mpf/set_d.c
index d72865d..bed84fe 100644
--- a/mpf/set_d.c
+++ b/mpf/set_d.c
@@ -18,13 +18,6 @@ License for more details.
 You should have received a copy of the GNU Lesser General Public License
 along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
 
-#include "config.h"
-
-#if HAVE_FLOAT_H
-#include <float.h>  /* for DBL_MAX */
-#endif
-
-#include "gmp.h"
 #include "gmp-impl.h"
 
 void
@@ -48,3 +41,4 @@ mpf_set_d (mpf_ptr r, double d)
   SIZ(r) = negative ? -LIMBS_PER_DOUBLE : LIMBS_PER_DOUBLE;
   EXP(r) = __gmp_extract_double (PTR(r), d);
 }
+__GMP_PUBLIC_DEFINE (mpf_set_d)
diff --git a/mpf/set_dfl_prec.c b/mpf/set_dfl_prec.c
index c209dd9..46e0052 100644
--- a/mpf/set_dfl_prec.c
+++ b/mpf/set_dfl_prec.c
@@ -17,13 +17,14 @@ License for more details.
 You should have received a copy of the GNU Lesser General Public License
 along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
 
-#include "gmp.h"
 #include "gmp-impl.h"
 
 mp_size_t __gmp_default_fp_limb_precision = __GMPF_BITS_TO_PREC (53);
+__GMP_INTERN_DEFINE (__gmp_default_fp_limb_precision)
 
 void
 mpf_set_default_prec (mp_bitcnt_t prec_in_bits) __GMP_NOTHROW
 {
   __gmp_default_fp_limb_precision = __GMPF_BITS_TO_PREC (prec_in_bits);
 }
+__GMP_PUBLIC_DEFINE (mpf_set_default_prec)
diff --git a/mpf/set_prc.c b/mpf/set_prc.c
index 873b12e..3c3a26f 100644
--- a/mpf/set_prc.c
+++ b/mpf/set_prc.c
@@ -17,7 +17,6 @@ License for more details.
 You should have received a copy of the GNU Lesser General Public License
 along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
 
-#include "gmp.h"
 #include "gmp-impl.h"
 
 
@@ -56,3 +55,4 @@ mpf_set_prec (mpf_ptr x, mp_bitcnt_t new_prec_in_bits)
 
   PTR(x) = __GMP_REALLOCATE_FUNC_LIMBS (xp, old_prec+1, new_prec_plus1);
 }
+__GMP_PUBLIC_DEFINE (mpf_set_prec)
diff --git a/mpf/set_prc_raw.c b/mpf/set_prc_raw.c
index 0473b5d..0a0c5a6 100644
--- a/mpf/set_prc_raw.c
+++ b/mpf/set_prc_raw.c
@@ -19,7 +19,6 @@ License for more details.
 You should have received a copy of the GNU Lesser General Public License
 along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
 
-#include "gmp.h"
 #include "gmp-impl.h"
 
 void
@@ -27,3 +26,4 @@ mpf_set_prec_raw (mpf_ptr x, mp_bitcnt_t prec_in_bits) __GMP_NOTHROW
 {
   x->_mp_prec = __GMPF_BITS_TO_PREC (prec_in_bits);
 }
+__GMP_PUBLIC_DEFINE (mpf_set_prec_raw)
diff --git a/mpf/set_q.c b/mpf/set_q.c
index a54aa3b..082843a 100644
--- a/mpf/set_q.c
+++ b/mpf/set_q.c
@@ -17,10 +17,7 @@ License for more details.
 You should have received a copy of the GNU Lesser General Public License
 along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
 
-#include <stdio.h>  /* for NULL */
-#include "gmp.h"
 #include "gmp-impl.h"
-#include "longlong.h"
 
 
 /* As usual the aim is to produce PREC(r) limbs, with the high non-zero.
@@ -142,3 +139,4 @@ mpf_set_q (mpf_t r, mpq_srcptr q)
 
   TMP_FREE;
 }
+__GMP_PUBLIC_DEFINE (mpf_set_q)
diff --git a/mpf/set_si.c b/mpf/set_si.c
index b9dfae3..7e7acfe 100644
--- a/mpf/set_si.c
+++ b/mpf/set_si.c
@@ -18,7 +18,6 @@ License for more details.
 You should have received a copy of the GNU Lesser General Public License
 along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
 
-#include "gmp.h"
 #include "gmp-impl.h"
 
 void
@@ -41,3 +40,4 @@ mpf_set_si (mpf_ptr dest, long val)
   dest->_mp_exp = size;
   dest->_mp_size = val >= 0 ? size : -size;
 }
+__GMP_PUBLIC_DEFINE (mpf_set_si)
diff --git a/mpf/set_str.c b/mpf/set_str.c
index be70c6f..a5f69ea 100644
--- a/mpf/set_str.c
+++ b/mpf/set_str.c
@@ -27,13 +27,7 @@ along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
   3. Use mpn_div_q instead of mpn_lshift+mpn_divrem.
 */
 
-#define _GNU_SOURCE    /* for DECIMAL_POINT in langinfo.h */
-
-#include "config.h"
-
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
+#include "gmp-impl.h"
 
 #if HAVE_LANGINFO_H
 #include <langinfo.h>  /* for nl_langinfo */
@@ -43,10 +37,6 @@ along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
 #include <locale.h>    /* for localeconv */
 #endif
 
-#include "gmp.h"
-#include "gmp-impl.h"
-#include "longlong.h"
-
 
 #define digit_value_tab __gmp_digit_value_tab
 
@@ -389,3 +379,4 @@ mpf_set_str (mpf_ptr x, const char *str, int base)
     return 0;
   }
 }
+__GMP_PUBLIC_DEFINE (mpf_set_str)
diff --git a/mpf/set_ui.c b/mpf/set_ui.c
index 3a793c8..da82b75 100644
--- a/mpf/set_ui.c
+++ b/mpf/set_ui.c
@@ -17,7 +17,6 @@ License for more details.
 You should have received a copy of the GNU Lesser General Public License
 along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
 
-#include "gmp.h"
 #include "gmp-impl.h"
 
 void
@@ -36,3 +35,4 @@ mpf_set_ui (mpf_ptr f, unsigned long val)
 
   f->_mp_exp = f->_mp_size = size;
 }
+__GMP_PUBLIC_DEFINE (mpf_set_ui)
diff --git a/mpf/set_z.c b/mpf/set_z.c
index 4b0f01b..9d80848 100644
--- a/mpf/set_z.c
+++ b/mpf/set_z.c
@@ -17,7 +17,6 @@ License for more details.
 You should have received a copy of the GNU Lesser General Public License
 along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
 
-#include "gmp.h"
 #include "gmp-impl.h"
 
 void
@@ -44,3 +43,4 @@ mpf_set_z (mpf_ptr r, mpz_srcptr u)
   SIZ (r) = size >= 0 ? asize : -asize;
   MPN_COPY (rp, up, asize);
 }
+__GMP_PUBLIC_DEFINE (mpf_set_z)
diff --git a/mpf/size.c b/mpf/size.c
index 34dfa5f..355b528 100644
--- a/mpf/size.c
+++ b/mpf/size.c
@@ -18,7 +18,6 @@ License for more details.
 You should have received a copy of the GNU Lesser General Public License
 along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
 
-#include "gmp.h"
 #include "gmp-impl.h"
 
 size_t
@@ -26,3 +25,4 @@ mpf_size (mpf_srcptr f) __GMP_NOTHROW
 {
   return __GMP_ABS (f->_mp_size);
 }
+__GMP_PUBLIC_DEFINE (mpf_size)
diff --git a/mpf/sqrt.c b/mpf/sqrt.c
index bdd7935..cf3a67a 100644
--- a/mpf/sqrt.c
+++ b/mpf/sqrt.c
@@ -18,8 +18,6 @@ License for more details.
 You should have received a copy of the GNU Lesser General Public License
 along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
 
-#include <stdio.h> /* for NULL */
-#include "gmp.h"
 #include "gmp-impl.h"
 
 
@@ -100,3 +98,4 @@ mpf_sqrt (mpf_ptr r, mpf_srcptr u)
 
   TMP_FREE;
 }
+__GMP_PUBLIC_DEFINE (mpf_sqrt)
diff --git a/mpf/sqrt_ui.c b/mpf/sqrt_ui.c
index c322255..d7873a8 100644
--- a/mpf/sqrt_ui.c
+++ b/mpf/sqrt_ui.c
@@ -18,8 +18,6 @@ License for more details.
 You should have received a copy of the GNU Lesser General Public License
 along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
 
-#include <stdio.h> /* for NULL */
-#include "gmp.h"
 #include "gmp-impl.h"
 
 
@@ -96,3 +94,4 @@ mpf_sqrt_ui (mpf_ptr r, unsigned long int u)
   r->_mp_exp = 1;
   TMP_FREE;
 }
+__GMP_PUBLIC_DEFINE (mpf_sqrt_ui)
diff --git a/mpf/sub.c b/mpf/sub.c
index 575b412..be47c9e 100644
--- a/mpf/sub.c
+++ b/mpf/sub.c
@@ -18,7 +18,6 @@ License for more details.
 You should have received a copy of the GNU Lesser General Public License
 along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
 
-#include "gmp.h"
 #include "gmp-impl.h"
 
 void
@@ -407,3 +406,4 @@ general_case:
   r->_mp_exp = exp;
   TMP_FREE;
 }
+__GMP_PUBLIC_DEFINE (mpf_sub)
diff --git a/mpf/sub_ui.c b/mpf/sub_ui.c
index 4ce7595..10b0d02 100644
--- a/mpf/sub_ui.c
+++ b/mpf/sub_ui.c
@@ -17,7 +17,6 @@ License for more details.
 You should have received a copy of the GNU Lesser General Public License
 along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
 
-#include "gmp.h"
 #include "gmp-impl.h"
 
 void
@@ -38,3 +37,4 @@ mpf_sub_ui (mpf_ptr sum, mpf_srcptr u, unsigned long int v)
   vv._mp_exp = 1;
   mpf_sub (sum, u, &vv);
 }
+__GMP_PUBLIC_DEFINE (mpf_sub_ui)
diff --git a/mpf/swap.c b/mpf/swap.c
index 26934f6..945f385 100644
--- a/mpf/swap.c
+++ b/mpf/swap.c
@@ -17,7 +17,6 @@ License for more details.
 You should have received a copy of the GNU Lesser General Public License
 along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
 
-#include "gmp.h"
 #include "gmp-impl.h"
 
 void
@@ -48,3 +47,4 @@ mpf_swap (mpf_ptr u, mpf_ptr v) __GMP_NOTHROW
   v->_mp_d = up;
   u->_mp_d = vp;
 }
+__GMP_PUBLIC_DEFINE (mpf_swap)
diff --git a/mpf/trunc.c b/mpf/trunc.c
index d329bc1..95a123c 100644
--- a/mpf/trunc.c
+++ b/mpf/trunc.c
@@ -17,7 +17,6 @@ License for more details.
 You should have received a copy of the GNU Lesser General Public License
 along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
 
-#include "gmp.h"
 #include "gmp-impl.h"
 
 
@@ -62,3 +61,4 @@ mpf_trunc (mpf_ptr r, mpf_srcptr u)
   if (rp != up)
     MPN_COPY_INCR (rp, up, asize);
 }
+__GMP_PUBLIC_DEFINE (mpf_trunc)
diff --git a/mpf/ui_div.c b/mpf/ui_div.c
index 3ca717e..3e2e249 100644
--- a/mpf/ui_div.c
+++ b/mpf/ui_div.c
@@ -18,10 +18,7 @@ License for more details.
 You should have received a copy of the GNU Lesser General Public License
 along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
 
-#include <stdio.h>  /* for NULL */
-#include "gmp.h"
 #include "gmp-impl.h"
-#include "longlong.h"
 
 
 void
@@ -116,3 +113,4 @@ mpf_ui_div (mpf_ptr r, unsigned long int u, mpf_srcptr v)
   r->_mp_exp = rexp;
   TMP_FREE;
 }
+__GMP_PUBLIC_DEFINE (mpf_ui_div)
diff --git a/mpf/ui_sub.c b/mpf/ui_sub.c
index 081ca34..ae3984c 100644
--- a/mpf/ui_sub.c
+++ b/mpf/ui_sub.c
@@ -18,7 +18,6 @@ License for more details.
 You should have received a copy of the GNU Lesser General Public License
 along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
 
-#include "gmp.h"
 #include "gmp-impl.h"
 
 void
@@ -324,3 +323,4 @@ mpf_ui_sub (mpf_ptr r, unsigned long int u, mpf_srcptr v)
   r->_mp_exp = uexp;
   TMP_FREE;
 }
+__GMP_PUBLIC_DEFINE (mpf_ui_sub)
diff --git a/mpf/urandomb.c b/mpf/urandomb.c
index 02307e0..3b74702 100644
--- a/mpf/urandomb.c
+++ b/mpf/urandomb.c
@@ -20,7 +20,6 @@ License for more details.
 You should have received a copy of the GNU Lesser General Public License
 along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
 
-#include "gmp.h"
 #include "gmp-impl.h"
 
 void
@@ -56,3 +55,4 @@ mpf_urandomb (mpf_t rop, gmp_randstate_t rstate, mp_bitcnt_t nbits)
   EXP (rop) = exp;
   SIZ (rop) = nlimbs;
 }
+__GMP_PUBLIC_DEFINE (mpf_urandomb)
-- 
1.8.1.2



More information about the gmp-devel mailing list