]> git.eshelyaron.com Git - emacs.git/commitdiff
* sysdep.c (frame) [__FreeBSD__]: #define to freebsd_frame
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 22 Jul 2013 15:30:54 +0000 (16:30 +0100)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 22 Jul 2013 15:30:54 +0000 (16:30 +0100)
when including <sys/user.h>, to prevent Sparc/ARM machine/frame.h
from messing up Emacs's 'struct frame'.

Fixes: debbugs:14923
src/ChangeLog
src/sysdep.c

index d3c5ffaff587168df3325a186032456e1647e743..1ad809dffab89199f7e0018f919ebfb3f4e82a53 100644 (file)
@@ -1,3 +1,9 @@
+2013-07-22  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * sysdep.c (frame) [__FreeBSD__]: #define to freebsd_frame
+       when including <sys/user.h>, to prevent Sparc/ARM machine/frame.h
+       from messing up Emacs's 'struct frame' (Bug#14923).
+
 2013-07-21  Paul Eggert  <eggert@cs.ucla.edu>
 
        * alloc.c (make_save_ptr_ptr): Define this function.
index 2739583456a6eb0c3db383394598aaa11b0380c8..11a6f4a76ce9c0bf3ee61b38186643f7acf490a2 100644 (file)
@@ -42,9 +42,14 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #endif
 
 #ifdef __FreeBSD__
-#include <sys/user.h>
-#include <sys/resource.h>
-#include <math.h>
+/* Sparc/ARM machine/frame.h has 'struct frame' which conflicts with Emacs's
+   'struct frame', so rename it.  */
+# define frame freebsd_frame
+# include <sys/user.h>
+# undef frame
+
+# include <sys/resource.h>
+# include <math.h>
 #endif
 
 #ifdef WINDOWSNT