Index: src/backend/bootstrap/Makefile =================================================================== RCS file: /projects/cvsroot/pgsql-server/src/backend/bootstrap/Makefile,v retrieving revision 1.30 diff -c -r1.30 Makefile *** src/backend/bootstrap/Makefile 2002/01/09 00:06:42 1.30 --- src/backend/bootstrap/Makefile 2002/10/16 15:23:00 *************** *** 14,22 **** # qnx4's wlink currently crashes with bootstrap.o ifneq ($(PORTNAME), qnx4) ! OBJS= bootparse.o bootscanner.o bootstrap.o else ! OBJS= bootparse.o bootscanner.o endif --- 14,22 ---- # qnx4's wlink currently crashes with bootstrap.o ifneq ($(PORTNAME), qnx4) ! OBJS= bootparse.o bootstrap.o else ! OBJS= bootparse.o endif *************** *** 51,56 **** --- 51,59 ---- @$(missing) bison $< $@ endif + + bootparse.o: bootscanner.c + $(srcdir)/bootscanner.c: bootscanner.l Makefile ifdef FLEX $(FLEX) $(FLEXFLAGS) $< *************** *** 60,76 **** @$(missing) flex $< $@ endif clean: rm -f SUBSYS.o $(OBJS) bootstrap.o # And the garbage that might have been left behind by partial build: @rm -f y.tab.h y.tab.c y.output lex.yy.c - - - # This is unusual: We actually have to build some of the parts before - # we know what the header file dependencies are. - dep depend: bootparse.c bootscanner.c bootstrap_tokens.h - $(CC) -MM $(CFLAGS) *.c >depend - - ifeq (depend,$(wildcard depend)) - include depend - endif --- 63,70 ---- @$(missing) flex $< $@ endif + clean: rm -f SUBSYS.o $(OBJS) bootstrap.o # And the garbage that might have been left behind by partial build: @rm -f y.tab.h y.tab.c y.output lex.yy.c Index: src/backend/bootstrap/bootparse.y =================================================================== RCS file: /projects/cvsroot/pgsql-server/src/backend/bootstrap/bootparse.y,v retrieving revision 1.52 diff -c -r1.52 bootparse.y *** src/backend/bootstrap/bootparse.y 2002/09/02 01:05:03 1.52 --- src/backend/bootstrap/bootparse.y 2002/10/16 15:23:01 *************** *** 335,337 **** --- 335,340 ---- ID { $$=yylval.ival; } ; %% + + /* must be included in some other file so postgres.h inclusion comes first */ + #include "bootscanner.c" Index: src/backend/parser/Makefile =================================================================== RCS file: /projects/cvsroot/pgsql-server/src/backend/parser/Makefile,v retrieving revision 1.37 diff -c -r1.37 Makefile *** src/backend/parser/Makefile 2002/04/20 21:56:14 1.37 --- src/backend/parser/Makefile 2002/10/16 15:23:05 *************** *** 12,18 **** OBJS= analyze.o gram.o keywords.o parser.o parse_agg.o parse_clause.o \ parse_expr.o parse_func.o parse_node.o parse_oper.o parse_relation.o \ ! parse_type.o parse_coerce.o parse_target.o scan.o scansup.o FLEXFLAGS = -CF --- 12,18 ---- OBJS= analyze.o gram.o keywords.o parser.o parse_agg.o parse_clause.o \ parse_expr.o parse_func.o parse_node.o parse_oper.o parse_relation.o \ ! parse_type.o parse_coerce.o parse_target.o scansup.o FLEXFLAGS = -CF *************** *** 41,46 **** --- 41,48 ---- @$(missing) bison $< $@ endif + + gram.o: scan.c $(srcdir)/scan.c: scan.l ifdef FLEX Index: src/backend/parser/gram.y =================================================================== RCS file: /projects/cvsroot/pgsql-server/src/backend/parser/gram.y,v retrieving revision 2.370 diff -c -r2.370 gram.y *** src/backend/parser/gram.y 2002/09/22 21:44:43 2.370 --- src/backend/parser/gram.y 2002/10/16 15:23:34 *************** *** 7777,7779 **** --- 7777,7783 ---- v->val.str = newval; } } + + + /* must be included in some other file so postgres.h inclusion comes first */ + #include "scan.c" Index: src/backend/utils/misc/Makefile =================================================================== RCS file: /projects/cvsroot/pgsql-server/src/backend/utils/misc/Makefile,v retrieving revision 1.19 diff -c -r1.19 Makefile *** src/backend/utils/misc/Makefile 2000/10/20 21:03:55 1.19 --- src/backend/utils/misc/Makefile 2002/10/16 15:23:41 *************** *** 4,10 **** top_builddir = ../../../.. include $(top_builddir)/src/Makefile.global ! OBJS = database.o superuser.o guc.o guc-file.o ps_status.o # This location might depend on the installation directories. Therefore # we can't subsitute it into config.h. --- 4,10 ---- top_builddir = ../../../.. include $(top_builddir)/src/Makefile.global ! OBJS = database.o superuser.o guc.o ps_status.o # This location might depend on the installation directories. Therefore # we can't subsitute it into config.h. *************** *** 18,23 **** --- 18,25 ---- SUBSYS.o: $(OBJS) $(LD) $(LDREL) $(LDOUT) SUBSYS.o $(OBJS) + guc.o: guc-file.c + $(srcdir)/guc-file.c: guc-file.l ifdef FLEX $(FLEX) $(FLEXFLAGS) $< *************** *** 32,41 **** clean: rm -f SUBSYS.o $(OBJS) @rm -f lex.yy.c - - depend dep: - $(CC) -MM $(CFLAGS) *.c >depend - - ifeq (depend,$(wildcard depend)) - include depend - endif --- 34,36 ---- Index: src/backend/utils/misc/guc.c =================================================================== RCS file: /projects/cvsroot/pgsql-server/src/backend/utils/misc/guc.c,v retrieving revision 1.97 diff -c -r1.97 guc.c *** src/backend/utils/misc/guc.c 2002/10/02 16:27:57 1.97 --- src/backend/utils/misc/guc.c 2002/10/16 15:23:58 *************** *** 3015,3017 **** --- 3015,3021 ---- return NULL; /* fail */ return newval; /* OK */ } + + + /* must be included in some other file so postgres.h inclusion comes first */ + #include "guc-file.c" Index: src/interfaces/ecpg/include/ecpglib.h =================================================================== RCS file: /projects/cvsroot/pgsql-server/src/interfaces/ecpg/include/ecpglib.h,v retrieving revision 1.43 diff -c -r1.43 ecpglib.h *** src/interfaces/ecpg/include/ecpglib.h 2002/09/04 20:31:46 1.43 --- src/interfaces/ecpg/include/ecpglib.h 2002/10/16 15:24:11 *************** *** 3,8 **** --- 3,11 ---- * definitions into ecpg programs */ + #ifndef _ECPGLIB_H + #define _ECPGLIB_H + #include #ifndef __BEOS__ *************** *** 74,76 **** --- 77,81 ---- } #endif + + #endif /* _ECPGLIB_H */ Index: src/interfaces/ecpg/include/ecpgtype.h =================================================================== RCS file: /projects/cvsroot/pgsql-server/src/interfaces/ecpg/include/ecpgtype.h,v retrieving revision 1.25 diff -c -r1.25 ecpgtype.h *** src/interfaces/ecpg/include/ecpgtype.h 2002/09/04 20:31:46 1.25 --- src/interfaces/ecpg/include/ecpgtype.h 2002/10/16 15:24:11 *************** *** 27,32 **** --- 27,36 ---- * This is a typically recursive definition. A structure of typed list elements * would probably work fine: */ + + #ifndef _ECPGTYPE_H + #define _ECPGTYPE_H + #ifdef __cplusplus extern "C" { *************** *** 76,80 **** #ifdef __cplusplus } - #endif --- 80,85 ---- #ifdef __cplusplus } #endif + + #endif /* _ECPGTYPE_H */ Index: src/interfaces/ecpg/lib/extern.h =================================================================== RCS file: /projects/cvsroot/pgsql-server/src/interfaces/ecpg/lib/extern.h,v retrieving revision 1.13 diff -c -r1.13 extern.h *** src/interfaces/ecpg/lib/extern.h 2002/09/04 20:31:46 1.13 --- src/interfaces/ecpg/lib/extern.h 2002/10/16 15:24:11 *************** *** 1,3 **** --- 1,6 ---- + #ifndef _ECPG_LIB_EXTERN_H + #define _ECPG_LIB_EXTERN_H + #include "postgres_fe.h" #include "libpq-fe.h" *************** *** 87,89 **** --- 90,94 ---- bool ECPGstore_result(const PGresult *results, int act_field, const struct statement * stmt, struct variable * var); + + #endif /* _ECPG_LIB_EXTERN_H */ Index: src/interfaces/ecpg/preproc/Makefile =================================================================== RCS file: /projects/cvsroot/pgsql-server/src/interfaces/ecpg/preproc/Makefile,v retrieving revision 1.85 diff -c -r1.85 Makefile *** src/interfaces/ecpg/preproc/Makefile 2002/07/27 20:10:05 1.85 --- src/interfaces/ecpg/preproc/Makefile 2002/10/16 15:24:11 *************** *** 17,23 **** override CFLAGS += -Wno-error endif ! OBJS=preproc.o pgc.o type.o ecpg.o ecpg_keywords.o output.o\ keywords.o c_keywords.o ../lib/typename.o descriptor.o variable.o all: submake-libpgport ecpg --- 17,23 ---- override CFLAGS += -Wno-error endif ! OBJS=preproc.o type.o ecpg.o ecpg_keywords.o output.o\ keywords.o c_keywords.o ../lib/typename.o descriptor.o variable.o all: submake-libpgport ecpg *************** *** 25,30 **** --- 25,31 ---- ecpg: $(OBJS) $(CC) $(CFLAGS) $(LDFLAGS) $^ $(LIBS) -o $@ + $(srcdir)/preproc.c: $(srcdir)/preproc.h ; $(srcdir)/preproc.h: preproc.y *************** *** 36,49 **** @$(missing) bison $< $@ endif $(srcdir)/pgc.c: pgc.l ifdef FLEX $(FLEX) $(FLEXFLAGS) -o'$@' $< else @$(missing) flex $< $@ endif - - c_keywords.o ecpg_keywords.o keywords.o pgc.o: preproc.h distprep: $(srcdir)/preproc.c $(srcdir)/preproc.h $(srcdir)/pgc.c --- 37,53 ---- @$(missing) bison $< $@ endif + c_keywords.o ecpg_keywords.o keywords.o pgc.o: preproc.h + + + preproc.o: pgc.c + $(srcdir)/pgc.c: pgc.l ifdef FLEX $(FLEX) $(FLEXFLAGS) -o'$@' $< else @$(missing) flex $< $@ endif distprep: $(srcdir)/preproc.c $(srcdir)/preproc.h $(srcdir)/pgc.c Index: src/interfaces/ecpg/preproc/extern.h =================================================================== RCS file: /projects/cvsroot/pgsql-server/src/interfaces/ecpg/preproc/extern.h,v retrieving revision 1.47 diff -c -r1.47 extern.h *** src/interfaces/ecpg/preproc/extern.h 2002/09/04 20:31:46 1.47 --- src/interfaces/ecpg/preproc/extern.h 2002/10/16 15:24:12 *************** *** 1,3 **** --- 1,6 ---- + #ifndef _ECPG_PREPROC_EXTERN_H + #define _ECPG_PREPROC_EXTERN_H + #include "type.h" #include *************** *** 89,91 **** --- 92,97 ---- #define OUT_OF_MEMORY 5 #define INDICATOR_NOT_STRUCT 6 #define INDICATOR_NOT_SIMPLE 7 + + #endif /* _ECPG_PREPROC_EXTERN_H */ + Index: src/interfaces/ecpg/preproc/preproc.y =================================================================== RCS file: /projects/cvsroot/pgsql-server/src/interfaces/ecpg/preproc/preproc.y,v retrieving revision 1.198 diff -c -r1.198 preproc.y *** src/interfaces/ecpg/preproc/preproc.y 2002/09/22 21:54:31 1.198 --- src/interfaces/ecpg/preproc/preproc.y 2002/10/16 15:24:36 *************** *** 5324,5326 **** --- 5324,5330 ---- buf[sizeof(buf)-1]=0; mmerror(PARSE_ERROR, ET_ERROR, buf); } + + + /* must be included in some other file so postgres_fe.h inclusion comes first */ + #include "pgc.c" Index: src/interfaces/ecpg/preproc/type.h =================================================================== RCS file: /projects/cvsroot/pgsql-server/src/interfaces/ecpg/preproc/type.h,v retrieving revision 1.34 diff -c -r1.34 type.h *** src/interfaces/ecpg/preproc/type.h 2002/09/04 20:31:46 1.34 --- src/interfaces/ecpg/preproc/type.h 2002/10/16 15:24:36 *************** *** 1,3 **** --- 1,6 ---- + #ifndef _ECPG_PREPROC_TYPE_H + #define _ECPG_PREPROC_TYPE_H + #include "ecpgtype.h" struct ECPGtype; *************** *** 172,174 **** --- 175,179 ---- char *name; int value; } ScanKeyword; + + #endif /* _ECPG_PREPROC_TYPE_H */ Index: src/pl/plpgsql/src/Makefile =================================================================== RCS file: /projects/cvsroot/pgsql-server/src/pl/plpgsql/src/Makefile,v retrieving revision 1.22 diff -c -r1.22 Makefile *** src/pl/plpgsql/src/Makefile 2002/09/05 18:28:46 1.22 --- src/pl/plpgsql/src/Makefile 2002/10/16 15:24:42 *************** *** 23,29 **** SHLIB_LINK = $(BE_DLLLIBS) rpath := ! OBJS = pl_gram.o pl_scan.o pl_handler.o pl_comp.o pl_exec.o pl_funcs.o ifneq ($(PORTNAME), qnx4) all: all-lib --- 23,29 ---- SHLIB_LINK = $(BE_DLLLIBS) rpath := ! OBJS = pl_gram.o pl_handler.o pl_comp.o pl_exec.o pl_funcs.o ifneq ($(PORTNAME), qnx4) all: all-lib *************** *** 75,80 **** --- 75,82 ---- else @$(missing) bison $< $@ endif + + pl_gram.o: pl_scan.c $(srcdir)/pl_scan.c: scan.l ifdef FLEX Index: src/pl/plpgsql/src/gram.y =================================================================== RCS file: /projects/cvsroot/pgsql-server/src/pl/plpgsql/src/gram.y,v retrieving revision 1.38 diff -c -r1.38 gram.y *** src/pl/plpgsql/src/gram.y 2002/09/22 21:56:47 1.38 --- src/pl/plpgsql/src/gram.y 2002/10/16 15:24:49 *************** *** 1997,1999 **** --- 1997,2003 ---- break; } } + + + /* must be included in some other file so postgres.h inclusion comes first */ + #include "pl_scan.c"