[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r102914: * src/unexmacosx.c: Add comm
From: |
Jan D. |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r102914: * src/unexmacosx.c: Add comment about include order. |
Date: |
Thu, 20 Jan 2011 07:43:04 +0100 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 102914
committer: Jan D. <address@hidden>
branch nick: trunk
timestamp: Thu 2011-01-20 07:43:04 +0100
message:
* src/unexmacosx.c: Add comment about include order.
modified:
src/ChangeLog
src/unexmacosx.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2011-01-20 06:40:36 +0000
+++ b/src/ChangeLog 2011-01-20 06:43:04 +0000
@@ -1,3 +1,7 @@
+2011-01-20 Jan Djärv <address@hidden>
+
+ * unexmacosx.c: Add comment about include order.
+
2011-01-20 Glenn Morris <address@hidden>
* minibuf.c (syms_of_minibuf) <read-expression-history>:
=== modified file 'src/unexmacosx.c'
--- a/src/unexmacosx.c 2011-01-19 22:13:54 +0000
+++ b/src/unexmacosx.c 2011-01-20 06:43:04 +0000
@@ -86,15 +86,20 @@
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>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r102914: * src/unexmacosx.c: Add comment about include order.,
Jan D. <=