summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2013-07-05 09:58:01 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2013-07-05 09:58:01 -0700
commit47ba6d4383a3f5a590ccee6c456b41e721a2274c (patch)
treea2deb488c6c3318732a75bc608f4ceca8fcddbef
parentf114e6c3ca0d5402e8996fc02977d9166b898e4d (diff)
Remove duplicate #include directives.
* alloc.c [GC_MARK_STACK == GC_USE_GCPROS_CHECK_ZOMBIES]: * xfaces.c: Don't include stdio.h twice. * buffer.c [USE_MMAP_FOR_BUFFERS]: Don't include sys/types.h or stdio.h twice. * fileio.c [WINDOWSNT | MSDOS]: Don't include fcntl.h twice. * lread.c: Don't include coding.h twice. * nsfont.m: Don't include frame.h twice. * process.c [HAVE_RES_INIT]: Don't include <netinet/in.h> twice. * ralloc.c: Don't include <unistd.h> twice. * xdisp.c: Don't include font.h twice. * xterm.c: Don't include fontset.h twice. * xterm.h [USE_X_TOOLKIT]: Don't include X11/StringDefs.h twice.
-rw-r--r--src/ChangeLog17
-rw-r--r--src/alloc.c4
-rw-r--r--src/buffer.c3
-rw-r--r--src/fileio.c2
-rw-r--r--src/lread.c1
-rw-r--r--src/nsfont.m1
-rw-r--r--src/process.c1
-rw-r--r--src/ralloc.c2
-rw-r--r--src/xdisp.c2
-rw-r--r--src/xfaces.c1
-rw-r--r--src/xterm.c1
-rw-r--r--src/xterm.h2
12 files changed, 17 insertions, 20 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 478e2bdf37..d42f5733ce 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,20 @@
+2013-07-05 Paul Eggert <eggert@cs.ucla.edu>
+
+ Remove duplicate #include directives.
+ * alloc.c [GC_MARK_STACK == GC_USE_GCPROS_CHECK_ZOMBIES]:
+ * xfaces.c:
+ Don't include stdio.h twice.
+ * buffer.c [USE_MMAP_FOR_BUFFERS]:
+ Don't include sys/types.h or stdio.h twice.
+ * fileio.c [WINDOWSNT | MSDOS]: Don't include fcntl.h twice.
+ * lread.c: Don't include coding.h twice.
+ * nsfont.m: Don't include frame.h twice.
+ * process.c [HAVE_RES_INIT]: Don't include <netinet/in.h> twice.
+ * ralloc.c: Don't include <unistd.h> twice.
+ * xdisp.c: Don't include font.h twice.
+ * xterm.c: Don't include fontset.h twice.
+ * xterm.h [USE_X_TOOLKIT]: Don't include X11/StringDefs.h twice.
+
2013-07-04 Paul Eggert <eggert@cs.ucla.edu>
Scale ImageMagick images more carefully.
diff --git a/src/alloc.c b/src/alloc.c
index b625e1f27e..a31a176caa 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -247,10 +247,6 @@ enum mem_type
#if GC_MARK_STACK || defined GC_MALLOC_CHECK
-#if GC_MARK_STACK == GC_USE_GCPROS_CHECK_ZOMBIES
-#include <stdio.h> /* For fprintf. */
-#endif
-
/* A unique object in pure space used to make some Lisp objects
on free lists recognizable in O(1). */
diff --git a/src/buffer.c b/src/buffer.c
index ad670e0a12..64b1bce9b0 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -4603,7 +4603,6 @@ evaporate_overlays (ptrdiff_t pos)
#ifdef USE_MMAP_FOR_BUFFERS
-#include <sys/types.h>
#include <sys/mman.h>
#ifndef MAP_ANON
@@ -4618,8 +4617,6 @@ evaporate_overlays (ptrdiff_t pos)
#define MAP_FAILED ((void *) -1)
#endif
-#include <stdio.h>
-
#if MAP_ANON == 0
#include <fcntl.h>
#endif
diff --git a/src/fileio.c b/src/fileio.c
index 3bfea20888..0ba7f85da2 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -55,7 +55,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#ifdef WINDOWSNT
#define NOMINMAX 1
#include <windows.h>
-#include <fcntl.h>
#include <sys/file.h>
#include "w32.h"
#endif /* not WINDOWSNT */
@@ -63,7 +62,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#ifdef MSDOS
#include "msdos.h"
#include <sys/param.h>
-#include <fcntl.h>
#endif
#ifdef DOS_NT
diff --git a/src/lread.c b/src/lread.c
index b57665e365..5f7b2cbdbe 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -38,7 +38,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include "keyboard.h"
#include "frame.h"
#include "termhooks.h"
-#include "coding.h"
#include "blockinput.h"
#ifdef MSDOS
diff --git a/src/nsfont.m b/src/nsfont.m
index 49ede8f483..a657d01dbe 100644
--- a/src/nsfont.m
+++ b/src/nsfont.m
@@ -33,7 +33,6 @@ Author: Adrian Robert (arobert@cogsci.ucsd.edu)
#include "window.h"
#include "fontset.h"
#include "nsterm.h"
-#include "frame.h"
#include "character.h"
#include "font.h"
#include "termchar.h"
diff --git a/src/process.c b/src/process.c
index 9961697e67..b77fb97168 100644
--- a/src/process.c
+++ b/src/process.c
@@ -78,7 +78,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#endif
#ifdef HAVE_RES_INIT
-#include <netinet/in.h>
#include <arpa/nameser.h>
#include <resolv.h>
#endif
diff --git a/src/ralloc.c b/src/ralloc.c
index 13fd65cbb0..5f25ef2c32 100644
--- a/src/ralloc.c
+++ b/src/ralloc.c
@@ -43,8 +43,6 @@ extern size_t __malloc_extra_blocks;
#else /* not emacs */
#include <stddef.h>
-
-#include <unistd.h>
#include <malloc.h>
#endif /* not emacs */
diff --git a/src/xdisp.c b/src/xdisp.c
index b61b976a40..ec1dbc454f 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -313,8 +313,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include "gtkutil.h"
#endif
-#include "font.h"
-
#ifndef FRAME_X_OUTPUT
#define FRAME_X_OUTPUT(f) ((f)->output_data.x)
#endif
diff --git a/src/xfaces.c b/src/xfaces.c
index b2ace1be14..0c627d7f9e 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -203,7 +203,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
-#include <stdio.h> /* This needs to be before termchar.h */
#include "lisp.h"
#include "character.h"
diff --git a/src/xterm.c b/src/xterm.c
index 9c868aec39..f0b95d585e 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -69,7 +69,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include "atimer.h"
#include "keymap.h"
#include "font.h"
-#include "fontset.h"
#include "xsettings.h"
#include "xgselect.h"
#include "sysselect.h"
diff --git a/src/xterm.h b/src/xterm.h
index 4a5ebc6637..5415a77cf5 100644
--- a/src/xterm.h
+++ b/src/xterm.h
@@ -38,8 +38,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <X11/CoreP.h> /* foul, but we need this to use our own
window inside a widget instead of one
that Xt creates... */
-#include <X11/StringDefs.h>
-
typedef Widget xt_or_gtk_widget;
#endif