summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2008-05-20 11:46:52 +0200
committerAndy Wingo <wingo@pobox.com>2008-05-20 11:46:52 +0200
commit13c47753528ca790fa4a2d1f019150f9b8e898c1 (patch)
tree871e665ef7bf00a05a0a86607a476780519f2bbc
parentd79d908ef0c421798b79bd72403b2a8fd196173c (diff)
properly include config.h in source files, not headers
* src/Makefile.am: Add $(DEFAULT_INCLUDES) to a couple of our custom rules so we pick up the -I for config.h. * src/*.[ch]: Include the config.h in the C files, not in the headers.
-rw-r--r--src/Makefile.am6
-rw-r--r--src/envs.c4
-rw-r--r--src/envs.h1
-rw-r--r--src/frames.c4
-rw-r--r--src/frames.h1
-rw-r--r--src/guile-vm.c4
-rw-r--r--src/instructions.c4
-rw-r--r--src/instructions.h1
-rw-r--r--src/objcodes.c4
-rw-r--r--src/objcodes.h1
-rw-r--r--src/programs.c4
-rw-r--r--src/programs.h1
-rw-r--r--src/vm.c4
-rw-r--r--src/vm.h1
-rw-r--r--src/vm_expand.h2
15 files changed, 31 insertions, 11 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index cec2029fc..57c77369c 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -33,17 +33,17 @@ SUFFIXES = .i .x
grep '^VM_DEFINE' $< > $@
.c.x:
- $(SNARF) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $< > $@ \
+ $(SNARF) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $< > $@ \
|| { rm $@; false; }
# Extra rules for debugging purposes.
%.I: %.c
- $(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) $< > $@
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(CPPFLAGS) $< > $@
%.s: %.c
- $(CC) -S -dA $(DEFS) $(INCLUDES) $(CFLAGS) $(CPPFLAGS) -o $@ $<
+ $(CC) -S -dA $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(CFLAGS) $(CPPFLAGS) -o $@ $<
%: %.in
diff --git a/src/envs.c b/src/envs.c
index c6ace0300..434b98fab 100644
--- a/src/envs.c
+++ b/src/envs.c
@@ -39,6 +39,10 @@
* whether to permit this exception to apply to your modifications.
* If you do not wish that, delete this exception notice. */
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
#include <string.h>
#include "envs.h"
diff --git a/src/envs.h b/src/envs.h
index 455cd1daa..04e204fac 100644
--- a/src/envs.h
+++ b/src/envs.h
@@ -43,7 +43,6 @@
#define _SCM_ENVS_H_
#include <libguile.h>
-#include "config.h"
extern scm_t_bits scm_tc16_env;
diff --git a/src/frames.c b/src/frames.c
index ab6cb0a61..c25c9f677 100644
--- a/src/frames.c
+++ b/src/frames.c
@@ -39,6 +39,10 @@
* whether to permit this exception to apply to your modifications.
* If you do not wish that, delete this exception notice. */
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
#include <string.h>
#include "frames.h"
diff --git a/src/frames.h b/src/frames.h
index a2e04c121..3803ffdc2 100644
--- a/src/frames.h
+++ b/src/frames.h
@@ -43,7 +43,6 @@
#define _SCM_FRAMES_H_
#include <libguile.h>
-#include "config.h"
#include "programs.h"
diff --git a/src/guile-vm.c b/src/guile-vm.c
index 1096b8abd..342fc4659 100644
--- a/src/guile-vm.c
+++ b/src/guile-vm.c
@@ -39,6 +39,10 @@
* whether to permit this exception to apply to your modifications.
* If you do not wish that, delete this exception notice. */
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
#include <libguile.h>
int
diff --git a/src/instructions.c b/src/instructions.c
index f2a2b1ec9..2ed70f381 100644
--- a/src/instructions.c
+++ b/src/instructions.c
@@ -39,6 +39,10 @@
* whether to permit this exception to apply to your modifications.
* If you do not wish that, delete this exception notice. */
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
#include <string.h>
#include "instructions.h"
diff --git a/src/instructions.h b/src/instructions.h
index 6f1a146cf..71b3f511f 100644
--- a/src/instructions.h
+++ b/src/instructions.h
@@ -43,7 +43,6 @@
#define _SCM_INSTRUCTIONS_H_
#include <libguile.h>
-#include "config.h"
enum scm_opcode {
#define VM_INSTRUCTION_TO_OPCODE 1
diff --git a/src/objcodes.c b/src/objcodes.c
index b97e851c4..4306d3f47 100644
--- a/src/objcodes.c
+++ b/src/objcodes.c
@@ -39,6 +39,10 @@
* whether to permit this exception to apply to your modifications.
* If you do not wish that, delete this exception notice. */
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
#include <string.h>
#include <fcntl.h>
#include <unistd.h>
diff --git a/src/objcodes.h b/src/objcodes.h
index ab165f664..ee3b0956e 100644
--- a/src/objcodes.h
+++ b/src/objcodes.h
@@ -43,7 +43,6 @@
#define _SCM_OBJCODES_H_
#include <libguile.h>
-#include "config.h"
struct scm_objcode {
size_t size; /* objcode size */
diff --git a/src/programs.c b/src/programs.c
index 6a5c4f390..388b8cad6 100644
--- a/src/programs.c
+++ b/src/programs.c
@@ -39,6 +39,10 @@
* whether to permit this exception to apply to your modifications.
* If you do not wish that, delete this exception notice. */
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
#include <string.h>
#include "instructions.h"
#include "programs.h"
diff --git a/src/programs.h b/src/programs.h
index 70ab54b66..238fae939 100644
--- a/src/programs.h
+++ b/src/programs.h
@@ -43,7 +43,6 @@
#define _SCM_PROGRAMS_H_
#include <libguile.h>
-#include "config.h"
/*
* Programs
diff --git a/src/vm.c b/src/vm.c
index af1b02655..53fcdb8b3 100644
--- a/src/vm.c
+++ b/src/vm.c
@@ -39,6 +39,10 @@
* whether to permit this exception to apply to your modifications.
* If you do not wish that, delete this exception notice. */
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
#include <string.h>
#include "envs.h"
#include "frames.h"
diff --git a/src/vm.h b/src/vm.h
index 917c553b6..e3cdc25ef 100644
--- a/src/vm.h
+++ b/src/vm.h
@@ -43,7 +43,6 @@
#define _SCM_VM_H_
#include <libguile.h>
-#include "config.h"
#define SCM_VM_BOOT_HOOK 0
#define SCM_VM_HALT_HOOK 1
diff --git a/src/vm_expand.h b/src/vm_expand.h
index 8124c0539..cccb56b9f 100644
--- a/src/vm_expand.h
+++ b/src/vm_expand.h
@@ -39,8 +39,6 @@
* whether to permit this exception to apply to your modifications.
* If you do not wish that, delete this exception notice. */
-#include "config.h"
-
#ifndef VM_LABEL
#define VM_LABEL(tag) l_##tag
#define VM_OPCODE(tag) scm_op_##tag