1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-30 11:03:19 +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

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