stddef include in gmp.h
clemensgru at gmail.com
Mon Oct 7 23:16:26 CEST 2013
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 http://gmplib.org:8000/gmp/file/fff25440e878/gmp-h.in#l49 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?
Here is an excerpt from a failed build process: http://pastebin.com/91vZbH3y
I am not sure why the cpp error "no member named 'ptrdiff_t' in the global namespace” occurs, but “error: unknown type name ‘ptrdiff_t’” would be fixed with adding #define __need_ptrdiff_t, right?
What do you think? Is this a problem in GMP or is this an error in Apple’s distribution of llvm-gcc ?
On current OS X 10.9, Apple uses llvm with either clang or llvm-gcc. Should GMP be compilable by both compiler frontends ?
More information about the gmp-discuss