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                                [EMAIL PROTECTED]
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 


---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
      joining column's datatypes do not match

Reply via email to