# HG changeset patch # User Jan D. # Date 1295505784 -3600 # Node ID 5bc690b4522fb3d31fcec3c5b3b6c34a9e989ebf # Parent f5af01a132486f6a7e19d0f3696fad5a07c74208 * src/unexmacosx.c: Add comment about include order. diff -r f5af01a13248 -r 5bc690b4522f src/ChangeLog --- a/src/ChangeLog Wed Jan 19 22:40:36 2011 -0800 +++ b/src/ChangeLog Thu Jan 20 07:43:04 2011 +0100 @@ -1,3 +1,7 @@ +2011-01-20 Jan Djärv + + * unexmacosx.c: Add comment about include order. + 2011-01-20 Glenn Morris * minibuf.c (syms_of_minibuf) : diff -r f5af01a13248 -r 5bc690b4522f src/unexmacosx.c --- a/src/unexmacosx.c Wed Jan 19 22:40:36 2011 -0800 +++ b/src/unexmacosx.c Thu Jan 20 07:43:04 2011 +0100 @@ -86,15 +86,20 @@ be changed accordingly. */ -#include +/* 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. */ + #include -#include -#include -#include #include #undef malloc #undef realloc #undef free +#include +#include +#include +#include #include #include #include