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 /src/unexmacosx.c | |
parent | c11136ec3e0fe7167c3cfcaa25ddac47693d3e88 (diff) | |
download | emacs-e885315dd05a005596d4f0585748d25dadff8901.tar.gz emacs-e885315dd05a005596d4f0585748d25dadff8901.tar.bz2 emacs-e885315dd05a005596d4f0585748d25dadff8901.zip |
* src/unexmacosx.c: Add comment about include order.
Diffstat (limited to 'src/unexmacosx.c')
-rw-r--r-- | src/unexmacosx.c | 13 |
1 files changed, 9 insertions, 4 deletions
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> |