ECPG interface: 7.4beta3 compile failure; CVS tip compile failure

From: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>
To: PostgreSQL hackers list <pgsql-hackers(at)postgresql(dot)org>
Subject: ECPG interface: 7.4beta3 compile failure; CVS tip compile failure
Date: 2003-09-18 17:53:00
Message-ID: 1063907580.18550.57.camel@linda.lfix.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

System: i386 (Athlon) - Debian GNU/Linux unstable

PostgreSQL 7.4beta3 fails to compile:

i386-linux-gcc -O2 -g -Wall -Wmissing-prototypes -Wmissing-declarations -pipe -fPIC -I../../../../src/interfaces/ecpg/include -I../../../../src/include/utils -I../../../../src/include -I/usr/include/tcl8.4 -I/usr/lib/R/include -g -c -o timestamp.o timestamp.c
timestamp.c: In function `tm2timestamp':
timestamp.c:71: error: syntax error before numeric constant
timestamp.c:73: error: syntax error before "long"
timestamp.c:76: error: syntax error before '>=' token
timestamp.c:76: error: syntax error before '<' token
make[5]: *** [timestamp.o] Error 1
make[5]: Leaving directory
`/usr/src/mypackages/postgresql/postgresql-7.3.99.7.4beta3/build-tree/postgresql-7.4beta3/src/interfaces/ecpg/pgtypeslib'

This error is fixed in CVS tip by Tom Lane's patch of 2 days ago.
However CVS tip still fails to compile:

make[4]: Entering directory
`/home/olly/pgsql.cvs/pgsql/src/interfaces/ecpg/compatlib'
i386-linux-gcc -O2 -g -Wall -Wmissing-prototypes -Wmissing-declarations -D_GNU_SOURCE -fpic -I../../../../src/interfaces/ecpg/include -I../../../../src/interfaces/libpq -I../../../../src/include/utils -I../../../../src/include -I/usr/include/tcl8.4 -I/usr/lib/R/include -c -o informix.o informix.c
informix.c:138: error: syntax error before "__extension__"
informix.c:138: error: syntax error before "len"
informix.c:138: error: syntax error before "if"
...etc....

Line 138 begins the definition of strndup(). However, strndup() is also
declared in string.h, which is included by this file. If I rename this
function to estrndup() (and also where it is called, further down) the
compilation succeeds.

--
Oliver Elphick Oliver(dot)Elphick(at)lfix(dot)co(dot)uk
Isle of Wight, UK http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C
========================================
"Give, and it shall be given unto you; good measure,
pressed down, and shaken together, and running over,
shall men pour into your lap. For by your standard of
measure it will be measured to you in return."
Luke 6:38

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Paulo Scardine 2003-09-18 18:04:32 Killing the backend to cancel a long waiting query
Previous Message luke 2003-09-18 16:54:12 authentication packet