changeset 109663:a4c55c0d8da2

* src/sysdep.c: Move include term.h last of includes (Bug#6812).
author Jan D <jan.h.d@swipnet.se>
date Fri, 06 Aug 2010 19:38:01 +0200
parents bac133026fa9
children b6bdd59e60ff
files src/ChangeLog src/sysdep.c
diffstat 2 files changed, 10 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Fri Aug 06 18:53:11 2010 +0300
+++ b/src/ChangeLog	Fri Aug 06 19:38:01 2010 +0200
@@ -1,3 +1,7 @@
+2010-08-06  Jan Djärv  <jan.h.d@swipnet.se>
+
+	* sysdep.c: Move include term.h last of includes (Bug#6812).
+
 2010-08-06  Eli Zaretskii  <eliz@gnu.org>
 
 	* dispnew.c (realloc_glyph_pool): Zero out newly allocated glyphs.
--- a/src/sysdep.c	Fri Aug 06 18:53:11 2010 +0300
+++ b/src/sysdep.c	Fri Aug 06 19:38:01 2010 +0200
@@ -33,9 +33,6 @@
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#ifdef HAVE_TERM_H
-#include <term.h>
-#endif
 
 #include "lisp.h"
 /* Including stdlib.h isn't necessarily enough to get srandom
@@ -110,6 +107,12 @@
 #include "dispextern.h"
 #include "process.h"
 #include "cm.h"  /* for reset_sys_modes */
+#ifdef HAVE_TERM_H
+/* Include this last.  If it is ncurses header file, it adds a lot of
+   defines that interfere with stuff in other headers.  Someone responsible
+   for ncurses messed up bigtime.  See bug#6812.  */
+#include <term.h>
+#endif
 
 /* For serial_configure and serial_open.  */
 extern Lisp_Object QCport, QCspeed, QCprocess;