Paul Eggert skrev 2011-01-20 08:51:
On 01/19/2011 10:45 PM, Jan Djärv wrote:
/* config.h #define:s malloc/realloc/free and then includes stdlib.h.
We want the undefined versions, but if config.h includes stdlib.h
with the #define:s in place, the prototypes will be wrong and we get
warnings. To prevent that, include stdlib.h before config.h. */
OK, I see. There's a better way, one that doesn't potentially mess up
the ABI. Namely, Emacs can supply a stdlib.h wrapper that #defines
malloc/realloc/free the way we like. gnulib already does
that, but Emacs doesn't use gnulib's stdlib.h wrapper.
At some point, perhaps Emacs will, and then we can look into
this issue again.
It is just for unexmacosx.c we want undefined malloc/free/realloc.
For other files we wan't the defined ones.
We can tweek the m/darwin.h file instead where these defines are.
Jan D.