Adding support for the MUSL C library

Josh Conner joshconner at google.com
Tue Dec 6 00:07:42 UTC 2016


When trying to configure GMP for use with the MUSL libc, it failed to
detect that FILE is defined. Below is a diff that fixes this - I
thought I would pass it along so it might be incorporated. Is there
anything I can do to help get this committed?

Thanks!

- Josh

diff -rdcp gmp-5.1.3/gmp-h.in gmp-5.1.3-fuchsia/gmp-h.in
*** gmp-5.1.3/gmp-h.in 2013-09-30 03:18:28.000000000 -0700
--- gmp-5.1.3-fuchsia/gmp-h.in 2016-11-02 15:00:44.702141626 -0700
*************** typedef __mpq_struct *mpq_ptr;
*** 264,270 ****
    || defined (_MSL_STDIO_H)           /* Metrowerks */          \
    || defined (_STDIO_H_INCLUDED)      /* QNX4 */ \
    || defined (_ISO_STDIO_ISO_H)       /* Sun C++ */ \
!   || defined (__STDIO_LOADED)         /* VMS */
  #define _GMP_H_HAVE_FILE 1
  #endif

--- 264,271 ----
    || defined (_MSL_STDIO_H)           /* Metrowerks */          \
    || defined (_STDIO_H_INCLUDED)      /* QNX4 */ \
    || defined (_ISO_STDIO_ISO_H)       /* Sun C++ */ \
!   || defined (__STDIO_LOADED)         /* VMS */ \
!   || defined (__DEFINED_FILE)         /* musl */
  #define _GMP_H_HAVE_FILE 1
  #endif


More information about the gmp-devel mailing list