aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'contrib')
-rw-r--r--contrib/Makefile30
-rw-r--r--contrib/array/Makefile9
-rw-r--r--contrib/datetime/Makefile9
-rw-r--r--contrib/datetime/datetime_functions.c2
-rw-r--r--contrib/datetime/datetime_functions.h1
-rw-r--r--contrib/fulltextindex/Makefile2
-rw-r--r--contrib/isbn_issn/Makefile25
-rw-r--r--contrib/isbn_issn/isbn.c4
-rw-r--r--contrib/isbn_issn/issn.c4
-rw-r--r--contrib/lo/Makefile4
-rw-r--r--contrib/miscutil/Makefile9
-rw-r--r--contrib/miscutil/misc_utils.c5
-rw-r--r--contrib/odbc/Makefile2
-rw-r--r--contrib/pgbench/pgbench.c4
-rw-r--r--contrib/soundex/Makefile22
-rw-r--r--contrib/soundex/soundex.c15
-rw-r--r--contrib/spi/Makefile2
-rw-r--r--contrib/string/Makefile9
-rw-r--r--contrib/string/string_io.c1
-rw-r--r--contrib/userlock/Makefile9
-rw-r--r--contrib/vacuumlo/Makefile4
21 files changed, 49 insertions, 123 deletions
diff --git a/contrib/Makefile b/contrib/Makefile
index 7485110ed5f..0dc68e48549 100644
--- a/contrib/Makefile
+++ b/contrib/Makefile
@@ -11,42 +11,18 @@
# The following subdirs give make errors:
#
# earthdistance
-# findoidjoins
-# isbn_issn
# os2client
-# pginterface
-all:
- for dir in *; do \
- if [ -e $$dir/Makefile ]; then \
- $(MAKE) -C $$dir; \
- fi; \
- done
-
-install:
+all:
for dir in *; do \
if [ -e $$dir/Makefile ]; then \
$(MAKE) -C $$dir $@ ; \
fi; \
done
-install-doc:
- for dir in *; do \
- if [ -e $$dir/Makefile ]; then \
- $(MAKE) -C $$dir $@ ; \
- fi; \
- done || exit 0
-
-clean:
- for dir in *; do \
- if [ -e $$dir/Makefile ]; then \
- $(MAKE) -C $$dir $@ ; \
- fi; \
- done || exit 0
-
-distclean:
+.DEFAULT:
for dir in *; do \
if [ -e $$dir/Makefile ]; then \
$(MAKE) -C $$dir $@ ; \
fi; \
- done || exit 0
+ done
diff --git a/contrib/array/Makefile b/contrib/array/Makefile
index 951250a29dd..c29569d76f5 100644
--- a/contrib/array/Makefile
+++ b/contrib/array/Makefile
@@ -11,12 +11,7 @@ SRCDIR = $(PGDIR)/src
include $(SRCDIR)/Makefile.global
-INCLUDE_OPT = -I./ \
- -I$(SRCDIR)/ \
- -I$(SRCDIR)/include \
- -I$(SRCDIR)/port/$(PORTNAME)
-
-CFLAGS += $(INCLUDE_OPT) $(CFLAGS_SL)
+CFLAGS += -I. $(CFLAGS_SL)
MODNAME = array_iterator
@@ -61,7 +56,7 @@ $(SQLDIR):
$(CC) $(CFLAGS) -shared -o $@ $<
depend dep:
- $(CC) -MM $(INCLUDE_OPT) *.c >depend
+ $(CC) -MM $(CFLAGS) *.c >depend
clean:
rm -f *~ $(MODULE) $(MODNAME).sql
diff --git a/contrib/datetime/Makefile b/contrib/datetime/Makefile
index 195c0f8d689..8f43ff83b7b 100644
--- a/contrib/datetime/Makefile
+++ b/contrib/datetime/Makefile
@@ -11,12 +11,7 @@ SRCDIR = $(PGDIR)/src
include $(SRCDIR)/Makefile.global
-INCLUDE_OPT = -I./ \
- -I$(SRCDIR)/ \
- -I$(SRCDIR)/include \
- -I$(SRCDIR)/port/$(PORTNAME)
-
-CFLAGS += $(INCLUDE_OPT) $(CFLAGS_SL)
+CFLAGS += -I. $(CFLAGS_SL)
MODNAME = datetime_functions
@@ -61,7 +56,7 @@ $(SQLDIR):
$(CC) $(CFLAGS) -shared -o $@ $<
depend dep:
- $(CC) -MM $(INCLUDE_OPT) *.c >depend
+ $(CC) -MM $(CFLAGS) *.c >depend
clean:
rm -f *~ $(MODULE) $(MODNAME).sql
diff --git a/contrib/datetime/datetime_functions.c b/contrib/datetime/datetime_functions.c
index 47991a8646d..ca9c8afe35e 100644
--- a/contrib/datetime/datetime_functions.c
+++ b/contrib/datetime/datetime_functions.c
@@ -96,7 +96,7 @@ hhmm_in(char *str)
*tm = &tt;
if (!PointerIsValid(str))
- elog(ERROR, "Bad (null) time external representation", NULL);
+ elog(ERROR, "Bad (null) time external representation");
if (decode_24h_time(str, tm, &fsec) != 0)
elog(ERROR, "Bad time external representation '%s'", str);
diff --git a/contrib/datetime/datetime_functions.h b/contrib/datetime/datetime_functions.h
index c345f2852b8..4b0eb499884 100644
--- a/contrib/datetime/datetime_functions.h
+++ b/contrib/datetime/datetime_functions.h
@@ -15,6 +15,7 @@ int4 date_month(DateADT val);
int4 date_year(DateADT val);
TimeADT *currenttime(void);
DateADT currentdate(void);
+int4 date2mjd(DateADT val);
#endif
diff --git a/contrib/fulltextindex/Makefile b/contrib/fulltextindex/Makefile
index c5986b02f76..bf1d02d227c 100644
--- a/contrib/fulltextindex/Makefile
+++ b/contrib/fulltextindex/Makefile
@@ -4,7 +4,7 @@ include $(SRCDIR)/Makefile.global
CONTRIBDIR=$(LIBDIR)/contrib
-CFLAGS+= $(CFLAGS_SL) -I$(SRCDIR)/include
+CFLAGS+= $(CFLAGS_SL)
TARGETS= fti$(DLSUFFIX)
CLEANFILES+= $(TARGETS)
diff --git a/contrib/isbn_issn/Makefile b/contrib/isbn_issn/Makefile
index baccaf28e6c..bd3c4325cd2 100644
--- a/contrib/isbn_issn/Makefile
+++ b/contrib/isbn_issn/Makefile
@@ -1,25 +1,18 @@
#
# PostgreSQL types for ISBN and ISSN identifiers.
#
-# $Id: Makefile,v 1.1 1998/08/17 03:35:04 scrappy Exp $
+# $Id: Makefile,v 1.2 2000/05/29 05:44:26 tgl Exp $
-all: isbn.so issn.so
+SRCDIR= ../../src
-isbn.so: isbn.o
- ld -Bshareable -o isbn.so isbn.o
+include $(SRCDIR)/Makefile.global
-isbn.o: isbn.c
- cc -g -O -fPIC -I/usr/local/pgsql/include -c isbn.c
+CFLAGS+= $(CFLAGS_SL)
-issn.so: issn.o
- ld -Bshareable -o issn.so issn.o
+all: isbn$(DLSUFFIX) issn$(DLSUFFIX)
-issn.o: issn.c
- cc -g -O -fPIC -I/usr/local/pgsql/include -c issn.c
+install: isbn$(DLSUFFIX) issn$(DLSUFFIX)
+ install -c isbn$(DLSUFFIX) issn$(DLSUFFIX) /usr/local/pgsql/modules
-install: isbn.so issn.so
- install -c isbn.so issn.so /usr/local/pgsql/modules
-
-#
-# eof
-#
+clean:
+ rm -f isbn$(DLSUFFIX) issn$(DLSUFFIX) *.o
diff --git a/contrib/isbn_issn/isbn.c b/contrib/isbn_issn/isbn.c
index 5f4ac889051..ff63381255c 100644
--- a/contrib/isbn_issn/isbn.c
+++ b/contrib/isbn_issn/isbn.c
@@ -1,7 +1,7 @@
/*
* PostgreSQL type definitions for ISBNs.
*
- * $Id: isbn.c,v 1.2 1999/05/25 16:05:40 momjian Exp $
+ * $Id: isbn.c,v 1.3 2000/05/29 05:44:26 tgl Exp $
*/
#include <stdio.h>
@@ -47,8 +47,6 @@ isbn *
isbn_in(char *str)
{
isbn *result;
- char *cp;
- int count;
if (strlen(str) != 13)
{
diff --git a/contrib/isbn_issn/issn.c b/contrib/isbn_issn/issn.c
index ccb264ac8f7..145f4e38f44 100644
--- a/contrib/isbn_issn/issn.c
+++ b/contrib/isbn_issn/issn.c
@@ -1,7 +1,7 @@
/*
* PostgreSQL type definitions for ISSNs.
*
- * $Id: issn.c,v 1.2 1999/05/25 16:05:42 momjian Exp $
+ * $Id: issn.c,v 1.3 2000/05/29 05:44:26 tgl Exp $
*/
#include <stdio.h>
@@ -47,8 +47,6 @@ issn *
issn_in(char *str)
{
issn *result;
- char *cp;
- int count;
if (strlen(str) != 9)
{
diff --git a/contrib/lo/Makefile b/contrib/lo/Makefile
index 8bd08a3350c..e091049293b 100644
--- a/contrib/lo/Makefile
+++ b/contrib/lo/Makefile
@@ -3,7 +3,7 @@
#
# Makefile pinched from the ip-mac contrib package
#
-# $Id: Makefile,v 1.1 1998/06/16 07:07:11 momjian Exp $
+# $Id: Makefile,v 1.2 2000/05/29 05:44:27 tgl Exp $
SRCDIR= ../../src
@@ -11,7 +11,7 @@ include $(SRCDIR)/Makefile.global
CONTRIBDIR=$(LIBDIR)/modules
-CFLAGS+= $(CFLAGS_SL) -I$(SRCDIR)/include
+CFLAGS+= $(CFLAGS_SL)
ifdef REFINT_VERBOSE
CFLAGS+= -DREFINT_VERBOSE
diff --git a/contrib/miscutil/Makefile b/contrib/miscutil/Makefile
index fd0065b86ef..742db0334f5 100644
--- a/contrib/miscutil/Makefile
+++ b/contrib/miscutil/Makefile
@@ -11,12 +11,7 @@ SRCDIR = $(PGDIR)/src
include $(SRCDIR)/Makefile.global
-INCLUDE_OPT = -I./ \
- -I$(SRCDIR)/ \
- -I$(SRCDIR)/include \
- -I$(SRCDIR)/port/$(PORTNAME)
-
-CFLAGS += $(INCLUDE_OPT) $(CFLAGS_SL)
+CFLAGS += -I. $(CFLAGS_SL)
MODNAME = misc_utils
@@ -61,7 +56,7 @@ $(SQLDIR):
$(CC) $(CFLAGS) -shared -o $@ $<
depend dep:
- $(CC) -MM $(INCLUDE_OPT) *.c >depend
+ $(CC) -MM $(CFLAGS) *.c >depend
clean:
rm -f *~ $(MODULE) $(MODNAME).sql
diff --git a/contrib/miscutil/misc_utils.c b/contrib/miscutil/misc_utils.c
index 302118689dc..f5a98683280 100644
--- a/contrib/miscutil/misc_utils.c
+++ b/contrib/miscutil/misc_utils.c
@@ -15,6 +15,7 @@
#include <errno.h>
#include "postgres.h"
+
#include "access/heapam.h"
#include "access/htup.h"
#include "access/relscan.h"
@@ -22,14 +23,16 @@
#include "access/tupdesc.h"
#include "catalog/catname.h"
#include "catalog/pg_listener.h"
+#include "fmgr.h"
#include "storage/lmgr.h"
-#include "utils/fmgr.h"
+#include "utils/fmgroids.h"
#include "utils/palloc.h"
#include "utils/rel.h"
#include "utils/tqual.h"
#include "misc_utils.h"
+#undef MIN
#define MIN(x,y) ((x)<=(y) ? (x) : (y))
extern int ExecutorLimit(int limit);
diff --git a/contrib/odbc/Makefile b/contrib/odbc/Makefile
index 34138c1f321..8fe1959c58d 100644
--- a/contrib/odbc/Makefile
+++ b/contrib/odbc/Makefile
@@ -9,7 +9,7 @@ ifndef PGLIB
PGLIB= .
endif
-CFLAGS+= $(CFLAGS_SL) -I$(SRCDIR)/include
+CFLAGS+= $(CFLAGS_SL)
TARGETS_7= odbc.sql
TARGETS_PRE7= odbc$(DLSUFFIX) odbc-pre7.sql
diff --git a/contrib/pgbench/pgbench.c b/contrib/pgbench/pgbench.c
index c2b027c9ecc..76ac80d68f4 100644
--- a/contrib/pgbench/pgbench.c
+++ b/contrib/pgbench/pgbench.c
@@ -1,5 +1,5 @@
/*
- * $Header: /cvsroot/pgsql/contrib/pgbench/pgbench.c,v 1.3 2000/04/12 17:14:27 momjian Exp $
+ * $Header: /cvsroot/pgsql/contrib/pgbench/pgbench.c,v 1.4 2000/05/29 05:44:29 tgl Exp $
*
* pgbench: a simple TPC-B like benchmark program for PostgreSQL
* written by Tatsuo Ishii
@@ -591,7 +591,7 @@ main(int argc, char **argv)
}
if (rlim.rlim_cur <= (nclients + 2))
{
- fprintf(stderr, "You need at least %d open files resource but you are only allowed to use %ld.\n", nclients + 2, rlim.rlim_cur);
+ 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);
fprintf(stderr, "Use limit/ulimt to increase the limit before using pgbench.\n");
exit(1);
}
diff --git a/contrib/soundex/Makefile b/contrib/soundex/Makefile
index d95549dc01f..059fd6d4ee4 100644
--- a/contrib/soundex/Makefile
+++ b/contrib/soundex/Makefile
@@ -10,25 +10,7 @@ SRCDIR = $(PGDIR)/src
include $(SRCDIR)/Makefile.global
-INCLUDE_OPT = -I ./ \
- -I $(SRCDIR)/ \
- -I $(SRCDIR)/include \
- -I $(SRCDIR)/interfaces/libpq \
- -I $(SRCDIR)/port/$(PORTNAME)
-
-CFLAGS += $(INCLUDE_OPT)
-
-ifeq ($(PORTNAME), linux)
- ifdef LINUX_ELF
- ifeq ($(CC), gcc)
- CFLAGS += -fPIC
- endif
- endif
-endif
-
-ifeq ($(PORTNAME), i386_solaris)
- CFLAGS+= -fPIC
-endif
+CFLAGS += -I. $(CFLAGS_SL)
MODNAME = soundex
@@ -53,7 +35,7 @@ install: $(MODULE)
$(CC) $(CFLAGS) -shared -o $@ $<
depend dep:
- $(CC) -MM $(INCLUDE_OPT) *.c >depend
+ $(CC) -MM $(CFLAGS) *.c >depend
clean:
rm -f $(MODULE) $(MODNAME).sql
diff --git a/contrib/soundex/soundex.c b/contrib/soundex/soundex.c
index df0c8366b95..8fe73054caf 100644
--- a/contrib/soundex/soundex.c
+++ b/contrib/soundex/soundex.c
@@ -2,23 +2,21 @@
/* soundex.c */
/*****************************************************************************/
+#include <ctype.h>
#include <string.h>
#include <stdio.h>
+
#include "postgres.h" /* for char16, etc. */
+
#include "utils/palloc.h" /* for palloc */
-#include "libpq-fe.h" /* for TUPLE */
-#include <stdio.h>
-#include <ctype.h>
-/* prototype for soundex function */
+/* prototypes for soundex functions */
+text *text_soundex(text *t);
char *soundex(char *instr, char *outstr);
text *
text_soundex(text *t)
{
- /* ABCDEFGHIJKLMNOPQRSTUVWXYZ */
- char *table = "01230120022455012623010202";
- int count = 0;
text *new_t;
char outstr[6 + 1]; /* max length of soundex is 6 */
@@ -49,7 +47,8 @@ text_soundex(text *t)
char *
soundex(char *instr, char *outstr)
-{ /* ABCDEFGHIJKLMNOPQRSTUVWXYZ */
+{
+ /* ABCDEFGHIJKLMNOPQRSTUVWXYZ */
char *table = "01230120022455012623010202";
int count = 0;
diff --git a/contrib/spi/Makefile b/contrib/spi/Makefile
index e4deb393d43..639a6247dae 100644
--- a/contrib/spi/Makefile
+++ b/contrib/spi/Makefile
@@ -3,7 +3,7 @@ SRCDIR= ../../src
include $(SRCDIR)/Makefile.global
-CFLAGS+= $(CFLAGS_SL) -I$(SRCDIR)/include
+CFLAGS+= $(CFLAGS_SL)
ifdef REFINT_VERBOSE
CFLAGS+= -DREFINT_VERBOSE
diff --git a/contrib/string/Makefile b/contrib/string/Makefile
index dd8f0e6f2a6..d372aa08457 100644
--- a/contrib/string/Makefile
+++ b/contrib/string/Makefile
@@ -11,12 +11,7 @@ SRCDIR = $(PGDIR)/src
include $(SRCDIR)/Makefile.global
-INCLUDE_OPT = -I./ \
- -I$(SRCDIR)/ \
- -I$(SRCDIR)/include \
- -I$(SRCDIR)/port/$(PORTNAME)
-
-CFLAGS += $(INCLUDE_OPT) $(CFLAGS_SL)
+CFLAGS += -I. $(CFLAGS_SL)
MODNAME = string_io
@@ -61,7 +56,7 @@ $(SQLDIR):
$(CC) $(CFLAGS) -shared -o $@ $<
depend dep:
- $(CC) -MM $(INCLUDE_OPT) *.c >depend
+ $(CC) -MM $(CFLAGS) *.c >depend
clean:
rm -f *~ $(MODULE) $(MODNAME).sql
diff --git a/contrib/string/string_io.c b/contrib/string/string_io.c
index cb8323d9c9b..c329fec1e9e 100644
--- a/contrib/string/string_io.c
+++ b/contrib/string/string_io.c
@@ -22,6 +22,7 @@
/* define this if you want to see iso-8859 characters */
#define ISO8859
+#undef MIN
#define MIN(x, y) ((x) < (y) ? (x) : (y))
#define VALUE(char) ((char) - '0')
#define DIGIT(val) ((val) + '0')
diff --git a/contrib/userlock/Makefile b/contrib/userlock/Makefile
index 23975185b2a..983f20a547c 100644
--- a/contrib/userlock/Makefile
+++ b/contrib/userlock/Makefile
@@ -11,12 +11,7 @@ SRCDIR = $(PGDIR)/src
include $(SRCDIR)/Makefile.global
-INCLUDE_OPT = -I./ \
- -I$(SRCDIR)/ \
- -I$(SRCDIR)/include \
- -I$(SRCDIR)/port/$(PORTNAME)
-
-CFLAGS += $(INCLUDE_OPT) $(CFLAGS_SL)
+CFLAGS += -I. $(CFLAGS_SL)
MODNAME = user_locks
@@ -61,7 +56,7 @@ $(SQLDIR):
$(CC) $(CFLAGS) -shared -o $@ $<
depend dep:
- $(CC) -MM $(INCLUDE_OPT) *.c >depend
+ $(CC) -MM $(CFLAGS) *.c >depend
clean:
rm -f *~ $(MODULE) $(MODNAME).sql
diff --git a/contrib/vacuumlo/Makefile b/contrib/vacuumlo/Makefile
index 95214acb982..c9484024b58 100644
--- a/contrib/vacuumlo/Makefile
+++ b/contrib/vacuumlo/Makefile
@@ -1,4 +1,4 @@
-# $Header: /cvsroot/pgsql/contrib/vacuumlo/Makefile,v 1.1 1999/04/10 16:48:04 peter Exp $
+# $Header: /cvsroot/pgsql/contrib/vacuumlo/Makefile,v 1.2 2000/05/29 05:44:32 tgl Exp $
SRCDIR= ../../src
@@ -6,7 +6,7 @@ include $(SRCDIR)/Makefile.global
CONTRIBDIR=$(LIBDIR)/contrib
-CFLAGS+= -I$(HEADERDIR)
+CFLAGS+= -I$(LIBPQDIR)
TARGETS= vacuumlo
CLEANFILES+= $(TARGETS)