Skip to content

Commit 091126f

Browse files
committed
Generated header files parse.h and fmgroids.h are now copied into
the src/include tree, so that -I backend is no longer necessary anywhere. Also, clean up some bit rot in contrib tree.
1 parent 18952f6 commit 091126f

File tree

91 files changed

+193
-399
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+193
-399
lines changed

contrib/Makefile

Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -11,42 +11,18 @@
1111
# The following subdirs give make errors:
1212
#
1313
# earthdistance
14-
# findoidjoins
15-
# isbn_issn
1614
# os2client
17-
# pginterface
1815

19-
all:
20-
for dir in *; do \
21-
if [ -e $$dir/Makefile ]; then \
22-
$(MAKE) -C $$dir; \
23-
fi; \
24-
done
25-
26-
install:
16+
all:
2717
for dir in *; do \
2818
if [ -e $$dir/Makefile ]; then \
2919
$(MAKE) -C $$dir $@ ; \
3020
fi; \
3121
done
3222

33-
install-doc:
34-
for dir in *; do \
35-
if [ -e $$dir/Makefile ]; then \
36-
$(MAKE) -C $$dir $@ ; \
37-
fi; \
38-
done || exit 0
39-
40-
clean:
41-
for dir in *; do \
42-
if [ -e $$dir/Makefile ]; then \
43-
$(MAKE) -C $$dir $@ ; \
44-
fi; \
45-
done || exit 0
46-
47-
distclean:
23+
.DEFAULT:
4824
for dir in *; do \
4925
if [ -e $$dir/Makefile ]; then \
5026
$(MAKE) -C $$dir $@ ; \
5127
fi; \
52-
done || exit 0
28+
done

contrib/array/Makefile

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,7 @@ SRCDIR = $(PGDIR)/src
1111

1212
include $(SRCDIR)/Makefile.global
1313

14-
INCLUDE_OPT = -I./ \
15-
-I$(SRCDIR)/ \
16-
-I$(SRCDIR)/include \
17-
-I$(SRCDIR)/port/$(PORTNAME)
18-
19-
CFLAGS += $(INCLUDE_OPT) $(CFLAGS_SL)
14+
CFLAGS += -I. $(CFLAGS_SL)
2015

2116
MODNAME = array_iterator
2217

@@ -61,7 +56,7 @@ $(SQLDIR):
6156
$(CC) $(CFLAGS) -shared -o $@ $<
6257

6358
depend dep:
64-
$(CC) -MM $(INCLUDE_OPT) *.c >depend
59+
$(CC) -MM $(CFLAGS) *.c >depend
6560

6661
clean:
6762
rm -f *~ $(MODULE) $(MODNAME).sql

contrib/datetime/Makefile

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,7 @@ SRCDIR = $(PGDIR)/src
1111

1212
include $(SRCDIR)/Makefile.global
1313

14-
INCLUDE_OPT = -I./ \
15-
-I$(SRCDIR)/ \
16-
-I$(SRCDIR)/include \
17-
-I$(SRCDIR)/port/$(PORTNAME)
18-
19-
CFLAGS += $(INCLUDE_OPT) $(CFLAGS_SL)
14+
CFLAGS += -I. $(CFLAGS_SL)
2015

2116
MODNAME = datetime_functions
2217

@@ -61,7 +56,7 @@ $(SQLDIR):
6156
$(CC) $(CFLAGS) -shared -o $@ $<
6257

6358
depend dep:
64-
$(CC) -MM $(INCLUDE_OPT) *.c >depend
59+
$(CC) -MM $(CFLAGS) *.c >depend
6560

6661
clean:
6762
rm -f *~ $(MODULE) $(MODNAME).sql

contrib/datetime/datetime_functions.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ hhmm_in(char *str)
9696
*tm = &tt;
9797

9898
if (!PointerIsValid(str))
99-
elog(ERROR, "Bad (null) time external representation", NULL);
99+
elog(ERROR, "Bad (null) time external representation");
100100

101101
if (decode_24h_time(str, tm, &fsec) != 0)
102102
elog(ERROR, "Bad time external representation '%s'", str);

contrib/datetime/datetime_functions.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ int4 date_month(DateADT val);
1515
int4 date_year(DateADT val);
1616
TimeADT *currenttime(void);
1717
DateADT currentdate(void);
18+
int4 date2mjd(DateADT val);
1819

1920
#endif
2021

contrib/fulltextindex/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ include $(SRCDIR)/Makefile.global
44

55
CONTRIBDIR=$(LIBDIR)/contrib
66

7-
CFLAGS+= $(CFLAGS_SL) -I$(SRCDIR)/include
7+
CFLAGS+= $(CFLAGS_SL)
88

99
TARGETS= fti$(DLSUFFIX)
1010
CLEANFILES+= $(TARGETS)

contrib/isbn_issn/Makefile

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,18 @@
11
#
22
# PostgreSQL types for ISBN and ISSN identifiers.
33
#
4-
# $Id: Makefile,v 1.1 1998/08/17 03:35:04 scrappy Exp $
4+
# $Id: Makefile,v 1.2 2000/05/29 05:44:26 tgl Exp $
55

6-
all: isbn.so issn.so
6+
SRCDIR= ../../src
77

8-
isbn.so: isbn.o
9-
ld -Bshareable -o isbn.so isbn.o
8+
include $(SRCDIR)/Makefile.global
109

11-
isbn.o: isbn.c
12-
cc -g -O -fPIC -I/usr/local/pgsql/include -c isbn.c
10+
CFLAGS+= $(CFLAGS_SL)
1311

14-
issn.so: issn.o
15-
ld -Bshareable -o issn.so issn.o
12+
all: isbn$(DLSUFFIX) issn$(DLSUFFIX)
1613

17-
issn.o: issn.c
18-
cc -g -O -fPIC -I/usr/local/pgsql/include -c issn.c
14+
install: isbn$(DLSUFFIX) issn$(DLSUFFIX)
15+
install -c isbn$(DLSUFFIX) issn$(DLSUFFIX) /usr/local/pgsql/modules
1916

20-
install: isbn.so issn.so
21-
install -c isbn.so issn.so /usr/local/pgsql/modules
22-
23-
#
24-
# eof
25-
#
17+
clean:
18+
rm -f isbn$(DLSUFFIX) issn$(DLSUFFIX) *.o

contrib/isbn_issn/isbn.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* PostgreSQL type definitions for ISBNs.
33
*
4-
* $Id: isbn.c,v 1.2 1999/05/25 16:05:40 momjian Exp $
4+
* $Id: isbn.c,v 1.3 2000/05/29 05:44:26 tgl Exp $
55
*/
66

77
#include <stdio.h>
@@ -47,8 +47,6 @@ isbn *
4747
isbn_in(char *str)
4848
{
4949
isbn *result;
50-
char *cp;
51-
int count;
5250

5351
if (strlen(str) != 13)
5452
{

contrib/isbn_issn/issn.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* PostgreSQL type definitions for ISSNs.
33
*
4-
* $Id: issn.c,v 1.2 1999/05/25 16:05:42 momjian Exp $
4+
* $Id: issn.c,v 1.3 2000/05/29 05:44:26 tgl Exp $
55
*/
66

77
#include <stdio.h>
@@ -47,8 +47,6 @@ issn *
4747
issn_in(char *str)
4848
{
4949
issn *result;
50-
char *cp;
51-
int count;
5250

5351
if (strlen(str) != 9)
5452
{

contrib/lo/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
#
44
# Makefile pinched from the ip-mac contrib package
55
#
6-
# $Id: Makefile,v 1.1 1998/06/16 07:07:11 momjian Exp $
6+
# $Id: Makefile,v 1.2 2000/05/29 05:44:27 tgl Exp $
77

88
SRCDIR= ../../src
99

1010
include $(SRCDIR)/Makefile.global
1111

1212
CONTRIBDIR=$(LIBDIR)/modules
1313

14-
CFLAGS+= $(CFLAGS_SL) -I$(SRCDIR)/include
14+
CFLAGS+= $(CFLAGS_SL)
1515

1616
ifdef REFINT_VERBOSE
1717
CFLAGS+= -DREFINT_VERBOSE

contrib/miscutil/Makefile

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,7 @@ SRCDIR = $(PGDIR)/src
1111

1212
include $(SRCDIR)/Makefile.global
1313

14-
INCLUDE_OPT = -I./ \
15-
-I$(SRCDIR)/ \
16-
-I$(SRCDIR)/include \
17-
-I$(SRCDIR)/port/$(PORTNAME)
18-
19-
CFLAGS += $(INCLUDE_OPT) $(CFLAGS_SL)
14+
CFLAGS += -I. $(CFLAGS_SL)
2015

2116
MODNAME = misc_utils
2217

@@ -61,7 +56,7 @@ $(SQLDIR):
6156
$(CC) $(CFLAGS) -shared -o $@ $<
6257

6358
depend dep:
64-
$(CC) -MM $(INCLUDE_OPT) *.c >depend
59+
$(CC) -MM $(CFLAGS) *.c >depend
6560

6661
clean:
6762
rm -f *~ $(MODULE) $(MODNAME).sql

contrib/miscutil/misc_utils.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,24 @@
1515
#include <errno.h>
1616

1717
#include "postgres.h"
18+
1819
#include "access/heapam.h"
1920
#include "access/htup.h"
2021
#include "access/relscan.h"
2122
#include "access/skey.h"
2223
#include "access/tupdesc.h"
2324
#include "catalog/catname.h"
2425
#include "catalog/pg_listener.h"
26+
#include "fmgr.h"
2527
#include "storage/lmgr.h"
26-
#include "utils/fmgr.h"
28+
#include "utils/fmgroids.h"
2729
#include "utils/palloc.h"
2830
#include "utils/rel.h"
2931
#include "utils/tqual.h"
3032

3133
#include "misc_utils.h"
3234

35+
#undef MIN
3336
#define MIN(x,y) ((x)<=(y) ? (x) : (y))
3437

3538
extern int ExecutorLimit(int limit);

contrib/odbc/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ifndef PGLIB
99
PGLIB= .
1010
endif
1111

12-
CFLAGS+= $(CFLAGS_SL) -I$(SRCDIR)/include
12+
CFLAGS+= $(CFLAGS_SL)
1313

1414
TARGETS_7= odbc.sql
1515
TARGETS_PRE7= odbc$(DLSUFFIX) odbc-pre7.sql

contrib/pgbench/pgbench.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* $Header: /cvsroot/pgsql/contrib/pgbench/pgbench.c,v 1.3 2000/04/12 17:14:27 momjian Exp $
2+
* $Header: /cvsroot/pgsql/contrib/pgbench/pgbench.c,v 1.4 2000/05/29 05:44:29 tgl Exp $
33
*
44
* pgbench: a simple TPC-B like benchmark program for PostgreSQL
55
* written by Tatsuo Ishii
@@ -591,7 +591,7 @@ main(int argc, char **argv)
591591
}
592592
if (rlim.rlim_cur <= (nclients + 2))
593593
{
594-
fprintf(stderr, "You need at least %d open files resource but you are only allowed to use %ld.\n", nclients + 2, rlim.rlim_cur);
594+
fprintf(stderr, "You need at least %d open files resource but you are only allowed to use %ld.\n", nclients + 2, (long) rlim.rlim_cur);
595595
fprintf(stderr, "Use limit/ulimt to increase the limit before using pgbench.\n");
596596
exit(1);
597597
}

contrib/soundex/Makefile

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,7 @@ SRCDIR = $(PGDIR)/src
1010

1111
include $(SRCDIR)/Makefile.global
1212

13-
INCLUDE_OPT = -I ./ \
14-
-I $(SRCDIR)/ \
15-
-I $(SRCDIR)/include \
16-
-I $(SRCDIR)/interfaces/libpq \
17-
-I $(SRCDIR)/port/$(PORTNAME)
18-
19-
CFLAGS += $(INCLUDE_OPT)
20-
21-
ifeq ($(PORTNAME), linux)
22-
ifdef LINUX_ELF
23-
ifeq ($(CC), gcc)
24-
CFLAGS += -fPIC
25-
endif
26-
endif
27-
endif
28-
29-
ifeq ($(PORTNAME), i386_solaris)
30-
CFLAGS+= -fPIC
31-
endif
13+
CFLAGS += -I. $(CFLAGS_SL)
3214

3315
MODNAME = soundex
3416

@@ -53,7 +35,7 @@ install: $(MODULE)
5335
$(CC) $(CFLAGS) -shared -o $@ $<
5436

5537
depend dep:
56-
$(CC) -MM $(INCLUDE_OPT) *.c >depend
38+
$(CC) -MM $(CFLAGS) *.c >depend
5739

5840
clean:
5941
rm -f $(MODULE) $(MODNAME).sql

contrib/soundex/soundex.c

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,21 @@
22
/* soundex.c */
33
/*****************************************************************************/
44

5+
#include <ctype.h>
56
#include <string.h>
67
#include <stdio.h>
8+
79
#include "postgres.h" /* for char16, etc. */
10+
811
#include "utils/palloc.h" /* for palloc */
9-
#include "libpq-fe.h" /* for TUPLE */
10-
#include <stdio.h>
11-
#include <ctype.h>
1212

13-
/* prototype for soundex function */
13+
/* prototypes for soundex functions */
14+
text *text_soundex(text *t);
1415
char *soundex(char *instr, char *outstr);
1516

1617
text *
1718
text_soundex(text *t)
1819
{
19-
/* ABCDEFGHIJKLMNOPQRSTUVWXYZ */
20-
char *table = "01230120022455012623010202";
21-
int count = 0;
2220
text *new_t;
2321

2422
char outstr[6 + 1]; /* max length of soundex is 6 */
@@ -49,7 +47,8 @@ text_soundex(text *t)
4947

5048
char *
5149
soundex(char *instr, char *outstr)
52-
{ /* ABCDEFGHIJKLMNOPQRSTUVWXYZ */
50+
{
51+
/* ABCDEFGHIJKLMNOPQRSTUVWXYZ */
5352
char *table = "01230120022455012623010202";
5453
int count = 0;
5554

contrib/spi/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ SRCDIR= ../../src
33

44
include $(SRCDIR)/Makefile.global
55

6-
CFLAGS+= $(CFLAGS_SL) -I$(SRCDIR)/include
6+
CFLAGS+= $(CFLAGS_SL)
77

88
ifdef REFINT_VERBOSE
99
CFLAGS+= -DREFINT_VERBOSE

contrib/string/Makefile

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,7 @@ SRCDIR = $(PGDIR)/src
1111

1212
include $(SRCDIR)/Makefile.global
1313

14-
INCLUDE_OPT = -I./ \
15-
-I$(SRCDIR)/ \
16-
-I$(SRCDIR)/include \
17-
-I$(SRCDIR)/port/$(PORTNAME)
18-
19-
CFLAGS += $(INCLUDE_OPT) $(CFLAGS_SL)
14+
CFLAGS += -I. $(CFLAGS_SL)
2015

2116
MODNAME = string_io
2217

@@ -61,7 +56,7 @@ $(SQLDIR):
6156
$(CC) $(CFLAGS) -shared -o $@ $<
6257

6358
depend dep:
64-
$(CC) -MM $(INCLUDE_OPT) *.c >depend
59+
$(CC) -MM $(CFLAGS) *.c >depend
6560

6661
clean:
6762
rm -f *~ $(MODULE) $(MODNAME).sql

contrib/string/string_io.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
/* define this if you want to see iso-8859 characters */
2323
#define ISO8859
2424

25+
#undef MIN
2526
#define MIN(x, y) ((x) < (y) ? (x) : (y))
2627
#define VALUE(char) ((char) - '0')
2728
#define DIGIT(val) ((val) + '0')

0 commit comments

Comments
 (0)