From e885315dd05a005596d4f0585748d25dadff8901 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20Dj=C3=A4rv?= Date: Thu, 20 Jan 2011 07:43:04 +0100 Subject: [PATCH] * src/unexmacosx.c: Add comment about include order. --- src/ChangeLog | 4 ++++ src/unexmacosx.c | 13 +++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 8c6e8e8b99..44fbcc4cf7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -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 --git a/src/unexmacosx.c b/src/unexmacosx.c index d3cf74eb33..28e04979a4 100644 --- a/src/unexmacosx.c +++ b/src/unexmacosx.c @@ -86,15 +86,20 @@ along with GNU Emacs. If not, see . */ 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 -- 2.20.1