1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-29 19:30:36 +02:00

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.
This commit is contained in:
Andy Wingo 2008-05-20 11:46:52 +02:00
parent d79d908ef0
commit 13c4775352
15 changed files with 31 additions and 11 deletions

View file

@ -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

View file

@ -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"

View file

@ -43,7 +43,6 @@
#define _SCM_ENVS_H_
#include <libguile.h>
#include "config.h"
extern scm_t_bits scm_tc16_env;

View file

@ -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"

View file

@ -43,7 +43,6 @@
#define _SCM_FRAMES_H_
#include <libguile.h>
#include "config.h"
#include "programs.h"

View file

@ -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

View file

@ -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"

View file

@ -43,7 +43,6 @@
#define _SCM_INSTRUCTIONS_H_
#include <libguile.h>
#include "config.h"
enum scm_opcode {
#define VM_INSTRUCTION_TO_OPCODE 1

View file

@ -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>

View file

@ -43,7 +43,6 @@
#define _SCM_OBJCODES_H_
#include <libguile.h>
#include "config.h"
struct scm_objcode {
size_t size; /* objcode size */

View file

@ -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"

View file

@ -43,7 +43,6 @@
#define _SCM_PROGRAMS_H_
#include <libguile.h>
#include "config.h"
/*
* Programs

View file

@ -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"

View file

@ -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

View file

@ -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