From 287e2c88053373dacf92784a2c753b133f7e79d7 Mon Sep 17 00:00:00 2001 From: sam Date: Sat, 6 Sep 2003 11:25:29 +0000 Subject: [PATCH] * scheme.h and kernel.h no longer include config.h * Hence included config.h in all C files. * Added site.h which will replace config.h for installed headers. git-svn-id: svn://svn.zoy.org/elk/trunk@103 55e467fa-43c5-0310-a8a2-de718669efc6 --- include/Makefile.am | 5 +++++ include/kernel.h | 1 - include/scheme.h | 1 - include/site.h.in | 33 +++++++++++++++++++++++++++++++++ lib/misc/bitstring.c | 2 ++ lib/misc/debug.c | 2 ++ lib/misc/elk-eval.c | 2 ++ lib/misc/gdbm.c | 5 ++++- lib/misc/hack.c | 2 ++ lib/misc/monitor.c | 5 +++-- lib/misc/record.c | 2 ++ lib/misc/regexp.c | 4 +++- lib/misc/struct.c | 2 ++ lib/unix/unix.h | 4 +++- lib/xlib/xlib.h | 2 ++ src/autoload.c | 2 ++ src/bignum.c | 2 ++ src/bool.c | 4 +++- src/char.c | 2 ++ src/cont.c | 4 +++- src/cstring.c | 4 +++- src/debug.c | 2 ++ src/dump.c | 4 +++- src/env.c | 2 ++ src/error.c | 2 ++ src/exception.c | 4 +++- src/feature.c | 4 +++- src/heap.c | 2 ++ src/io.c | 4 +++- src/libelk.c | 4 +++- src/list.c | 2 ++ src/load.c | 2 ++ src/main.c | 2 ++ src/malloc.c | 4 +++- src/math.c | 2 ++ src/onfork.c | 2 ++ src/prim.c | 2 ++ src/print.c | 4 +++- src/proc.c | 2 ++ src/promise.c | 2 ++ src/read.c | 4 +++- src/special.c | 2 ++ src/stab.c | 4 +++- src/stkmem.c | 2 ++ src/string.c | 2 ++ src/symbol.c | 2 ++ src/terminate.c | 2 ++ src/type.c | 4 +++- src/vector.c | 4 +++- 49 files changed, 147 insertions(+), 21 deletions(-) create mode 100644 include/site.h.in diff --git a/include/Makefile.am b/include/Makefile.am index 57834d3..9d812f0 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -1,4 +1,5 @@ NULL = + pkginclude_HEADERS = \ compat.h \ cstring.h \ @@ -15,3 +16,7 @@ pkginclude_HEADERS = \ stkmem.h \ type.h \ $(NULL) + +nodist_pkginclude_HEADERS = site.h +EXTRA_DIST = site.h.in + diff --git a/include/kernel.h b/include/kernel.h index 9227bbc..462a380 100644 --- a/include/kernel.h +++ b/include/kernel.h @@ -34,7 +34,6 @@ #include #include -#include "config.h" #include "funcproto.h" #include "param.h" #include "object.h" diff --git a/include/scheme.h b/include/scheme.h index 512f31a..4dc9b05 100644 --- a/include/scheme.h +++ b/include/scheme.h @@ -34,7 +34,6 @@ #include #include -#include "config.h" #include "funcproto.h" #include "param.h" #include "object.h" diff --git a/include/site.h.in b/include/site.h.in new file mode 100644 index 0000000..4bf49d5 --- /dev/null +++ b/include/site.h.in @@ -0,0 +1,33 @@ +/* site.h.in: Site-local settings. + * + * $Id$ + * + * Copyright 1990, 1991, 1992, 1993, 1994, 1995, Oliver Laumann, Berlin + * Copyright 2002, 2003 Sam Hocevar , Paris + * + * This software was derived from Elk 1.2, which was Copyright 1987, 1988, + * 1989, Nixdorf Computer AG and TELES GmbH, Berlin (Elk 1.2 has been written + * by Oliver Laumann for TELES Telematic Services, Berlin, in a joint project + * between TELES and Nixdorf Microprocessor Engineering, Berlin). + * + * Oliver Laumann, TELES GmbH, Nixdorf Computer AG and Sam Hocevar, as co- + * owners or individual owners of copyright in this software, grant to any + * person or company a worldwide, royalty free, license to + * + * i) copy this software, + * ii) prepare derivative works based on this software, + * iii) distribute copies of this software or derivative works, + * iv) perform this software, or + * v) display this software, + * + * provided that this notice is not removed and that neither Oliver Laumann + * nor Teles nor Nixdorf are deemed to have made any representations as to + * the suitability of this software for any purpose nor are held responsible + * for any defects of this software. + * + * THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. + */ + +/* The C99 integers header */ +#include <@STDINT_HEADER@> + diff --git a/lib/misc/bitstring.c b/lib/misc/bitstring.c index d1ff0fd..7982369 100644 --- a/lib/misc/bitstring.c +++ b/lib/misc/bitstring.c @@ -28,6 +28,8 @@ * THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. */ +#include "config.h" + #include #include diff --git a/lib/misc/debug.c b/lib/misc/debug.c index b003695..3479d8d 100644 --- a/lib/misc/debug.c +++ b/lib/misc/debug.c @@ -28,6 +28,8 @@ * THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. */ +#include "config.h" + #include "scheme.h" static Object P_Debug (Object on) { diff --git a/lib/misc/elk-eval.c b/lib/misc/elk-eval.c index bea635c..f3d0e8a 100644 --- a/lib/misc/elk-eval.c +++ b/lib/misc/elk-eval.c @@ -42,6 +42,8 @@ * arguments. */ +#include "config.h" + #include #include "scheme.h" diff --git a/lib/misc/gdbm.c b/lib/misc/gdbm.c index eee0d39..006a66a 100644 --- a/lib/misc/gdbm.c +++ b/lib/misc/gdbm.c @@ -93,11 +93,14 @@ */ -#include "scheme.h" +#include "config.h" + #include #include #include +#include "scheme.h" + extern gdbm_error gdbm_errno; extern int errno; static char *gdbm_error_message = ""; diff --git a/lib/misc/hack.c b/lib/misc/hack.c index 5998867..55e401f 100644 --- a/lib/misc/hack.c +++ b/lib/misc/hack.c @@ -28,6 +28,8 @@ * THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. */ +#include "config.h" + #include "scheme.h" static Object P_Hack_Procedure_Environment (Object p, Object e) { diff --git a/lib/misc/monitor.c b/lib/misc/monitor.c index c005ea1..e860987 100644 --- a/lib/misc/monitor.c +++ b/lib/misc/monitor.c @@ -50,11 +50,12 @@ * hacking by editing mon.o with emacs. */ - -#include "scheme.h" +#include "config.h" #include +#include "scheme.h" + #define MONSTART 2 static int monitoring; diff --git a/lib/misc/record.c b/lib/misc/record.c index 89d9397..6a5fb86 100644 --- a/lib/misc/record.c +++ b/lib/misc/record.c @@ -28,6 +28,8 @@ * THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. */ +#include "config.h" + #include "scheme.h" #define RTD(x) ((struct S_Rtd *)POINTER(x)) diff --git a/lib/misc/regexp.c b/lib/misc/regexp.c index 3aabb45..97f5e26 100644 --- a/lib/misc/regexp.c +++ b/lib/misc/regexp.c @@ -32,7 +32,7 @@ * THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. */ -#include "scheme.h" +#include "config.h" #include @@ -41,6 +41,8 @@ #include #include +#include "scheme.h" + #define REGEXP(x) ((struct S_Regexp *)POINTER(x)) #define MATCH(x) ((struct S_Match *)POINTER(x)) diff --git a/lib/misc/struct.c b/lib/misc/struct.c index 1ad570f..2aa013d 100644 --- a/lib/misc/struct.c +++ b/lib/misc/struct.c @@ -30,6 +30,8 @@ * THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. */ +#include "config.h" + #include "scheme.h" #define STRUCT(x) ((struct S_Struct *)POINTER(x)) diff --git a/lib/unix/unix.h b/lib/unix/unix.h index 5381ea3..c8f08cf 100644 --- a/lib/unix/unix.h +++ b/lib/unix/unix.h @@ -28,7 +28,7 @@ * THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. */ -#include "scheme.h" +#include "config.h" #include #include @@ -42,6 +42,8 @@ # include #endif +#include "scheme.h" + extern int errno; extern char *index(); diff --git a/lib/xlib/xlib.h b/lib/xlib/xlib.h index 9474bcb..c18de3c 100644 --- a/lib/xlib/xlib.h +++ b/lib/xlib/xlib.h @@ -28,6 +28,8 @@ * THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. */ +#include "config.h" + #include #include #include diff --git a/src/autoload.c b/src/autoload.c index 699711b..3211c37 100644 --- a/src/autoload.c +++ b/src/autoload.c @@ -28,6 +28,8 @@ * THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. */ +#include "config.h" + #include "kernel.h" Object V_Autoload_Notifyp; diff --git a/src/bignum.c b/src/bignum.c index df59d6e..de7f24e 100644 --- a/src/bignum.c +++ b/src/bignum.c @@ -28,6 +28,8 @@ * THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. */ +#include "config.h" + #include #include #include diff --git a/src/bool.c b/src/bool.c index cdeafee..916dc2e 100644 --- a/src/bool.c +++ b/src/bool.c @@ -28,10 +28,12 @@ * THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. */ -#include "kernel.h" +#include "config.h" #include +#include "kernel.h" + extern int Generic_Equal (Object, Object); Object P_Booleanp (Object x) { diff --git a/src/char.c b/src/char.c index 6bddc6f..c567a26 100644 --- a/src/char.c +++ b/src/char.c @@ -28,6 +28,8 @@ * THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. */ +#include "config.h" + #include #include "kernel.h" diff --git a/src/cont.c b/src/cont.c index 7188dab..ecebe48 100644 --- a/src/cont.c +++ b/src/cont.c @@ -28,10 +28,12 @@ * THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. */ -#include "kernel.h" +#include "config.h" #include +#include "kernel.h" + extern void Switch_Environment (Object); void Jump_Cont (struct S_Control *, Object); diff --git a/src/cstring.c b/src/cstring.c index b53f896..4960cb7 100644 --- a/src/cstring.c +++ b/src/cstring.c @@ -36,10 +36,12 @@ * THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. */ -#include "kernel.h" +#include "config.h" #include +#include "kernel.h" + static char *heapstr[NUMSTRBUFS]; static int heaplen[NUMSTRBUFS]; static int nextstr; diff --git a/src/debug.c b/src/debug.c index 031b59d..82ace07 100644 --- a/src/debug.c +++ b/src/debug.c @@ -28,6 +28,8 @@ * THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. */ +#include "config.h" + #include "kernel.h" Object P_Backtrace_List (int argc, Object *argv) { diff --git a/src/dump.c b/src/dump.c index 104db60..9538c1f 100644 --- a/src/dump.c +++ b/src/dump.c @@ -28,7 +28,7 @@ * THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. */ -#include "kernel.h" +#include "config.h" #ifdef CAN_DUMP @@ -37,6 +37,8 @@ #include #include +#include "kernel.h" + #ifndef O_BINARY # define O_BINARY 0 #endif diff --git a/src/env.c b/src/env.c index d9251ce..23b4ab5 100644 --- a/src/env.c +++ b/src/env.c @@ -28,6 +28,8 @@ * THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. */ +#include "config.h" + #include "kernel.h" void Set_Name (Object, Object); diff --git a/src/error.c b/src/error.c index 6eabdf9..0174e93 100644 --- a/src/error.c +++ b/src/error.c @@ -28,6 +28,8 @@ * THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. */ +#include "config.h" + #include #include #include diff --git a/src/exception.c b/src/exception.c index 8990d67..30b25c7 100644 --- a/src/exception.c +++ b/src/exception.c @@ -28,10 +28,12 @@ * THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. */ -#include "kernel.h" +#include "config.h" #include +#include "kernel.h" + #ifdef HAVE_ATTRIBUTE_NORETURN extern void Reset () __attribute__ ((__noreturn__)); #else diff --git a/src/feature.c b/src/feature.c index 25db7ac..78b10ff 100644 --- a/src/feature.c +++ b/src/feature.c @@ -28,10 +28,12 @@ * THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. */ -#include "kernel.h" +#include "config.h" #include +#include "kernel.h" + static Object Features; void Init_Features () { diff --git a/src/heap.c b/src/heap.c index a682f0c..e97302d 100644 --- a/src/heap.c +++ b/src/heap.c @@ -28,6 +28,8 @@ * THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. */ +#include "config.h" + #include "kernel.h" int GC_In_Progress; diff --git a/src/io.c b/src/io.c index 9a8b8ac..df9786e 100644 --- a/src/io.c +++ b/src/io.c @@ -28,7 +28,7 @@ * THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. */ -#include "kernel.h" +#include "config.h" #include #include @@ -42,6 +42,8 @@ # include #endif +#include "kernel.h" + extern void Flush_Output (Object); extern int errno; diff --git a/src/libelk.c b/src/libelk.c index 81c8afd..41c1f85 100644 --- a/src/libelk.c +++ b/src/libelk.c @@ -28,7 +28,7 @@ * THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. */ -#include "kernel.h" +#include "config.h" #include #include @@ -51,6 +51,8 @@ # endif #endif +#include "kernel.h" + extern void Call_Initializers (SYMTAB *, char *, int); extern void Load_Source (Object); extern void Call_Finalizers (); diff --git a/src/list.c b/src/list.c index e85fb54..51dfe47 100644 --- a/src/list.c +++ b/src/list.c @@ -28,6 +28,8 @@ * THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. */ +#include "config.h" + #include "kernel.h" extern unsigned int Stack_Size (); diff --git a/src/load.c b/src/load.c index f54806d..fcc82d3 100644 --- a/src/load.c +++ b/src/load.c @@ -28,6 +28,8 @@ * THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. */ +#include "config.h" + #include "kernel.h" Object V_Load_Path, V_Load_Noisilyp, V_Load_Libraries; diff --git a/src/main.c b/src/main.c index 2dbfa6c..3515639 100644 --- a/src/main.c +++ b/src/main.c @@ -28,6 +28,8 @@ * THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. */ +#include "config.h" + #include int main(int ac, char **av) { diff --git a/src/malloc.c b/src/malloc.c index af740ec..d0d0a3b 100644 --- a/src/malloc.c +++ b/src/malloc.c @@ -28,10 +28,12 @@ * THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. */ -#include "kernel.h" +#include "config.h" #include +#include "kernel.h" + char *Safe_Malloc (unsigned int size) { char *ret; diff --git a/src/math.c b/src/math.c index 74e7c46..eeeb03e 100644 --- a/src/math.c +++ b/src/math.c @@ -28,6 +28,8 @@ * THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. */ +#include "config.h" + #include #include #include diff --git a/src/onfork.c b/src/onfork.c index d4eddd5..c423ff7 100644 --- a/src/onfork.c +++ b/src/onfork.c @@ -37,6 +37,8 @@ * THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. */ +#include "config.h" + #include "kernel.h" static FUNCT *Onfork_Funcs; diff --git a/src/prim.c b/src/prim.c index dd159ac..86e5cba 100644 --- a/src/prim.c +++ b/src/prim.c @@ -28,6 +28,8 @@ * THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. */ +#include "config.h" + #include "kernel.h" extern void Memoize_Frame (Object); diff --git a/src/print.c b/src/print.c index 3e93ac7..a57e341 100644 --- a/src/print.c +++ b/src/print.c @@ -28,7 +28,7 @@ * THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. */ -#include "kernel.h" +#include "config.h" #include #include @@ -43,6 +43,8 @@ #endif #endif +#include "kernel.h" + extern void Print_Bignum (Object, Object); extern int errno; diff --git a/src/proc.c b/src/proc.c index 1c4f444..3e1e8aa 100644 --- a/src/proc.c +++ b/src/proc.c @@ -29,6 +29,8 @@ * THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. */ +#include "config.h" + #include "kernel.h" #ifdef USE_ALLOCA diff --git a/src/promise.c b/src/promise.c index 72e9a8b..31d6d1d 100644 --- a/src/promise.c +++ b/src/promise.c @@ -28,6 +28,8 @@ * THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. */ +#include "config.h" + #include "kernel.h" Object P_Promisep (Object x) { diff --git a/src/read.c b/src/read.c index 0f617d5..c404b76 100644 --- a/src/read.c +++ b/src/read.c @@ -28,7 +28,7 @@ * THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. */ -#include "kernel.h" +#include "config.h" #include #include @@ -46,6 +46,8 @@ # include FIONREAD_H #endif +#include "kernel.h" + extern void Flush_Output (Object); extern char *index(); diff --git a/src/special.c b/src/special.c index e59b864..df6387a 100644 --- a/src/special.c +++ b/src/special.c @@ -28,6 +28,8 @@ * THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. */ +#include "config.h" + #include "kernel.h" extern void Do_Wind (Object); diff --git a/src/stab.c b/src/stab.c index 287b46d..d48c841 100644 --- a/src/stab.c +++ b/src/stab.c @@ -28,11 +28,13 @@ * THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. */ -#include "kernel.h" +#include "config.h" #include #include +#include "kernel.h" + void Free_Symbols (SYMTAB *); #if defined(CAN_LOAD_OBJ) || defined (INIT_OBJECTS) diff --git a/src/stkmem.c b/src/stkmem.c index aa0d8d8..4e49765 100644 --- a/src/stkmem.c +++ b/src/stkmem.c @@ -28,6 +28,8 @@ * THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. */ +#include "config.h" + #include "kernel.h" #ifndef USE_ALLOCA diff --git a/src/string.c b/src/string.c index 0e7c804..33d4507 100644 --- a/src/string.c +++ b/src/string.c @@ -28,6 +28,8 @@ * THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. */ +#include "config.h" + #include #include diff --git a/src/symbol.c b/src/symbol.c index 6836f35..9a7cec1 100644 --- a/src/symbol.c +++ b/src/symbol.c @@ -28,6 +28,8 @@ * THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. */ +#include "config.h" + #include #include diff --git a/src/terminate.c b/src/terminate.c index 533d52a..cc8e2ba 100644 --- a/src/terminate.c +++ b/src/terminate.c @@ -28,6 +28,8 @@ * THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. */ +#include "config.h" + #include #include diff --git a/src/type.c b/src/type.c index 213f1cb..01bd7f8 100644 --- a/src/type.c +++ b/src/type.c @@ -28,10 +28,12 @@ * THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. */ -#include "kernel.h" +#include "config.h" #include +#include "kernel.h" + #define TYPE_GROW 10 TYPEDESCR *Types; diff --git a/src/vector.c b/src/vector.c index 2bd5745..2de04e0 100644 --- a/src/vector.c +++ b/src/vector.c @@ -28,10 +28,12 @@ * THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. */ -#include "kernel.h" +#include "config.h" #include +#include "kernel.h" + extern int Get_Index (Object, Object); Object General_Make_Vector (int len, Object fill, int konst) {