Re: The dbase conrtib doesn't compile - Mailing list pgsql-hackers
From | Bruce Momjian |
---|---|
Subject | Re: The dbase conrtib doesn't compile |
Date | |
Msg-id | 200112210529.fBL5TZt02127@candle.pha.pa.us Whole thread Raw |
In response to | Re: The dbase conrtib doesn't compile (Tom Lane <tgl@sss.pgh.pa.us>) |
Responses |
Re: The dbase conrtib doesn't compile
|
List | pgsql-hackers |
> Bruce Momjian <pgman@candle.pha.pa.us> writes: > > Yes, glad you pointed it out. I think the best solution is to remove > > #define HAVE_ICONV_H and -liconv so it will work fine on all platforms. > > If someone wants the iconv conversions, they can add the needed #define > > and link library, OK? > > That seems like a plan. Perhaps add some commented-out macro > definitions to the makefile to make it a simple addition. Something > like > > # Uncomment this to provide charset translation > # CFLAGS += -DHAVE_ICONV_H > # You might need to uncomment this too, if libiconv is a separate > # library on your platform > # LIBS += -liconv > > Untested but you get the idea ... OK, patch attached and applied. I tested with and without the Makefile defines. iconv defaults to off, mentioned in README. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026 Index: contrib/dbase/Makefile =================================================================== RCS file: /cvsroot/pgsql/contrib/dbase/Makefile,v retrieving revision 1.3 diff -c -r1.3 Makefile *** contrib/dbase/Makefile 2001/12/21 04:13:12 1.3 --- contrib/dbase/Makefile 2001/12/21 05:27:58 *************** *** 7,13 **** PROGRAM = dbf2pg OBJS = dbf.o dbf2pg.o endian.o PG_CPPFLAGS = -I$(libpq_srcdir) ! PG_LIBS = $(libpq) -liconv DOCS = README.dbf2pg MAN = dbf2pg.1 # XXX not implemented --- 7,19 ---- PROGRAM = dbf2pg OBJS = dbf.o dbf2pg.o endian.o PG_CPPFLAGS = -I$(libpq_srcdir) ! PG_LIBS = $(libpq) ! ! # Uncomment this to provide charset translation ! #PG_CPPFLAGS += -DHAVE_ICONV_H ! # You might need to uncomment this too, if libiconv is a separate ! # library on your platform ! #PG_LIBS += -liconv DOCS = README.dbf2pg MAN = dbf2pg.1 # XXX not implemented Index: contrib/dbase/README.dbf2pg =================================================================== RCS file: /cvsroot/pgsql/contrib/dbase/README.dbf2pg,v retrieving revision 1.2 diff -c -r1.2 README.dbf2pg *** contrib/dbase/README.dbf2pg 2001/12/21 04:13:12 1.2 --- contrib/dbase/README.dbf2pg 2001/12/21 05:27:58 *************** *** 97,113 **** fied charset. Example: -F IBM437 Consult your system documentation to see the con- ! vertions available. -T charset_to Together with -F charset_from , it converts the data to the specified charset. Default is ! "ISO-8859-1". ENVIRONMENT This program is affected by the environment-variables as used by "PostgresSQL." See the documentation of Post- ! gresSQL for more info. This program requires libiconv. BUGS Fields larger than 8192 characters are not supported and --- 97,116 ---- fied charset. Example: -F IBM437 Consult your system documentation to see the con- ! versions available. This requires iconv to be enabled ! in the compile. -T charset_to Together with -F charset_from , it converts the data to the specified charset. Default is ! "ISO-8859-1". This requires iconv to be enabled ! in the compile. ENVIRONMENT This program is affected by the environment-variables as used by "PostgresSQL." See the documentation of Post- ! gresSQL for more info. This program can optionally use iconv ! character set conversion routines. BUGS Fields larger than 8192 characters are not supported and Index: contrib/dbase/dbf2pg.c =================================================================== RCS file: /cvsroot/pgsql/contrib/dbase/dbf2pg.c,v retrieving revision 1.5 diff -c -r1.5 dbf2pg.c *** contrib/dbase/dbf2pg.c 2001/12/21 04:30:59 1.5 --- contrib/dbase/dbf2pg.c 2001/12/21 05:27:59 *************** *** 7,14 **** */ #include "postgres_fe.h" - #define HAVE_ICONV_H /* should be somewhere else */ - #include <fcntl.h> #include <unistd.h> #include <ctype.h> --- 7,12 ----
pgsql-hackers by date: