1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-27 12:41:57 +03:00

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.
This commit is contained in:
Tom Lane
2000-05-29 05:45:56 +00:00
parent 18952f6744
commit 091126fa28
91 changed files with 195 additions and 401 deletions

View File

@ -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:
.DEFAULT:
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:
for dir in *; do \
if [ -e $$dir/Makefile ]; then \
$(MAKE) -C $$dir $@ ; \
fi; \
done || exit 0
done

View File

@ -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

View File

@ -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

View File

@ -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);

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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)
{

View File

@ -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)
{

View File

@ -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

View File

@ -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

View File

@ -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);

View File

@ -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

View File

@ -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);
}

View File

@ -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

View File

@ -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 */
#include "postgres.h" /* for char16, etc. */
#include "utils/palloc.h" /* for palloc */
/* 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;

View File

@ -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

View File

@ -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

View File

@ -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')

View File

@ -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

View File

@ -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)