Skip site navigation (1) Skip section navigation (2)

Re: ecpg doesn't compile (datetime.h/dtime_t)

From: Patrick Welche <prlw1(at)newn(dot)cam(dot)ac(dot)uk>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: ecpg doesn't compile (datetime.h/dtime_t)
Date: 2003-10-03 14:00:36
Message-ID: 20031003150036.C8350@quartz.newn.cam.ac.uk (view raw or flat)
Thread:
Lists: pgsql-hackers
On Fri, Oct 03, 2003 at 12:59:19PM +0200, Michael Meskes wrote:
> On Mon, Sep 29, 2003 at 06:41:48PM +0100, Patrick Welche wrote:
> > Today's cvs doesn't compile. I think it is due to
> > cvs diff -r1.7 -r1.8 src/interfaces/ecpg/include/datetime.h
> > I have dtime_t defined in my sys/types.h. The old version of datetime.h used
> 
> I tried too hide these type definitions from our build process. It
> should compile now.

Now I get:

gcc -O2 -pipe -g -Wall -Wmissing-prototypes -Wmissing-declarations -fpic -DPIC -I../../../../src/interfaces/ecpg/include -I../../../../src/include/utils -I../../../../src/include   -g  -c -o timestamp.o timestamp.c
In file included from ../../../../src/interfaces/ecpg/include/compatlib.h:7,
                 from ../../../../src/interfaces/ecpg/include/datetime.h:4,
                 from timestamp.c:14:
../../../../src/interfaces/ecpg/include/ecpglib.h:9:22: libpq-fe.h: No such file or directory
In file included from ../../../../src/interfaces/ecpg/include/compatlib.h:7,
                 from ../../../../src/interfaces/ecpg/include/datetime.h:4,
                 from timestamp.c:14:
../../../../src/interfaces/ecpg/include/ecpglib.h:75: error: parse error before "PGresult"
../../../../src/interfaces/ecpg/include/ecpglib.h:79: warning: `enum ECPGttype' declared inside parameter list
../../../../src/interfaces/ecpg/include/ecpglib.h:79: warning: its scope is only this definition or declaration, which is probably not what you want
../../../../src/interfaces/ecpg/include/ecpglib.h:79: warning: parameter has incomplete type
../../../../src/interfaces/ecpg/include/ecpglib.h:80: warning: `enum ECPGttype' declared inside parameter list
../../../../src/interfaces/ecpg/include/ecpglib.h:80: warning: parameter has incomplete type
In file included from timestamp.c:14:
../../../../src/interfaces/ecpg/include/datetime.h:6: error: conflicting types for `dtime_t'
/usr/include/sys/types.h:184: error: previous declaration of `dtime_t'
gmake[4]: *** [timestamp.o] Error 1
gmake[4]: Leaving directory `/usr/src/local/pgsql/src/interfaces/ecpg/pgtypeslib


I did do a gmake distclean beforehand..

% cd src/interfaces/ecpg/include
% more datetime.h
#ifndef _ECPG_DATETIME_H
#define _ECPG_DATETIME_H

#include <compatlib.h>

typedef timestamp dtime_t;
typedef interval intrvl_t;

#endif /* ndef _ECPG_DATETIME_H */
% 

Cheers,

Patrick

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2003-10-03 14:43:36
Subject: Re: HeapTuple->t_tableOid==0 after SPI_exec
Previous:From: Tom LaneDate: 2003-10-03 13:59:34
Subject: Re: Quick question

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group