stddef include in gmp.h

Marc Glisse marc.glisse at
Tue Oct 8 11:00:38 CEST 2013

On Mon, 7 Oct 2013, Clemens wrote:

> Hi GMP developers,
> on Mac OS X 10.9 the build of GMP 5.1.2 failed, because ptrdiff_t was not exported from stddef.h.
> In you define __need_size_t.
> Could you please either also #define __need_ptrdiff_t or remove the __need_size_t definition?
> Or would adding it create problems on other systems?

We currently have:

#define __need_size_t  /* tell gcc stddef.h we only want size_t */
#if defined (__cplusplus)
#include <cstddef>     /* for size_t */
#include <stddef.h>    /* for size_t */
#undef __need_size_t

We should at least move the __need_size_t stuff so it only applies to 
stddef.h (not cstddef), or preferably remove it completely, it isn't worth 
the trouble. I am quite sure we already discussed that, but didn't get 
around to it yet.

Marc Glisse

More information about the gmp-discuss mailing list