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:
parent
d79d908ef0
commit
13c4775352
15 changed files with 31 additions and 11 deletions
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -43,7 +43,6 @@
|
|||
#define _SCM_ENVS_H_
|
||||
|
||||
#include <libguile.h>
|
||||
#include "config.h"
|
||||
|
||||
extern scm_t_bits scm_tc16_env;
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -43,7 +43,6 @@
|
|||
#define _SCM_FRAMES_H_
|
||||
|
||||
#include <libguile.h>
|
||||
#include "config.h"
|
||||
#include "programs.h"
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -43,7 +43,6 @@
|
|||
#define _SCM_INSTRUCTIONS_H_
|
||||
|
||||
#include <libguile.h>
|
||||
#include "config.h"
|
||||
|
||||
enum scm_opcode {
|
||||
#define VM_INSTRUCTION_TO_OPCODE 1
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -43,7 +43,6 @@
|
|||
#define _SCM_OBJCODES_H_
|
||||
|
||||
#include <libguile.h>
|
||||
#include "config.h"
|
||||
|
||||
struct scm_objcode {
|
||||
size_t size; /* objcode size */
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -43,7 +43,6 @@
|
|||
#define _SCM_PROGRAMS_H_
|
||||
|
||||
#include <libguile.h>
|
||||
#include "config.h"
|
||||
|
||||
/*
|
||||
* Programs
|
||||
|
|
4
src/vm.c
4
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"
|
||||
|
|
1
src/vm.h
1
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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue