diff options
author | Jan Djärv <jan.h.d@swipnet.se> | 2011-01-20 07:43:04 +0100 |
---|---|---|
committer | Jan Djärv <jan.h.d@swipnet.se> | 2011-01-20 07:43:04 +0100 |
commit | e885315dd05a005596d4f0585748d25dadff8901 (patch) | |
tree | 1e94f86cc7a5792eed8ea77a48d30945ab1f7d3a | |
parent | c11136ec3e0fe7167c3cfcaa25ddac47693d3e88 (diff) | |
download | emacs-e885315dd05a005596d4f0585748d25dadff8901.tar.gz emacs-e885315dd05a005596d4f0585748d25dadff8901.tar.bz2 emacs-e885315dd05a005596d4f0585748d25dadff8901.zip |
* src/unexmacosx.c: Add comment about include order.
-rw-r--r-- | src/ChangeLog | 4 | ||||
-rw-r--r-- | src/unexmacosx.c | 13 |
2 files changed, 13 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 8c6e8e8b99a..44fbcc4cf7d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2011-01-20 Jan Djärv <jan.h.d@swipnet.se> + + * unexmacosx.c: Add comment about include order. + 2011-01-20 Glenn Morris <rgm@gnu.org> * minibuf.c (syms_of_minibuf) <read-expression-history>: diff --git a/src/unexmacosx.c b/src/unexmacosx.c index d3cf74eb33c..28e04979a4c 100644 --- a/src/unexmacosx.c +++ b/src/unexmacosx.c @@ -86,15 +86,20 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ be changed accordingly. */ -#include <stdio.h> +/* 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 <stdlib.h> -#include <fcntl.h> -#include <stdarg.h> -#include <sys/types.h> #include <config.h> #undef malloc #undef realloc #undef free +#include <stdio.h> +#include <fcntl.h> +#include <stdarg.h> +#include <sys/types.h> #include <unistd.h> #include <mach/mach.h> #include <mach-o/loader.h> |