| From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> | 
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> | 
| Cc: | Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, Hackers <pgsql-hackers(at)postgresql(dot)org> | 
| Subject: | Re: The dbase conrtib doesn't compile | 
| Date: | 2001-12-21 04:28:40 | 
| Message-ID: | 200112210428.fBL4SeE26781@candle.pha.pa.us | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
> "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au> writes:
> > In HEAD contrib/dbase:
> > gcc -pipe -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -I../../src/
> > interf
> > aces/libpq -I. -I../../src/include   -c -o dbf2pg.o dbf2pg.c
> > dbf2pg.c:19: iconv.h: No such file or directory
> 
> Looks like someone took a shortcut in dealing with <iconv.h>.
> What the heck is that, anyway, and do we need the ifdef'd code at all?
> 
> (FWIW, the code compiles fine if you do have <iconv.h>)
I see that now too.  Seems we need to test for libiconv and set
HAVE_ICONV_H accordingly, and the link line too.  If I comment out the
define, it does not compile so the conditionals in the code are not
correct anyway.
The following patch does allow it to compile with HAVE_ICONV_H not
defined;  clearly a step in the right direction.  Of course, you will
still need to remove the -liconv from the link line.
I wonder if the best solution is to not assume libiconv exists.
-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
| Attachment | Content-Type | Size | 
|---|---|---|
| unknown_filename | text/plain | 1.9 KB | 
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2001-12-21 04:29:16 | Re: contrib idea | 
| Previous Message | Tom Lane | 2001-12-21 04:19:14 | Re: The dbase conrtib doesn't compile |