Re: FRONTEND in ecpg

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Magnus Hagander <mha(at)sollentuna(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: FRONTEND in ecpg
Date: 2004-04-13 19:09:02
Message-ID: 200404131909.i3DJ92N09319@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Magnus Hagander wrote:
> Hi!
>
> Is there any reason why FRONTEND is not specified in the ecpg build
> (specifically the pgtypeslib)? I'm running into build problems because
> it pulls backend-specific stuff from port.h in
> (postgres_fe.h->c.h->port.h) when tweaking the timezone code.
>
> Or should FRONTEND perhaps even be explicitly #defined in postgres_fe.h?
>
> Or am I misunderstanding what FRONTEND is for?

Looking now, it is a chicken and egg thing. Some port/src C files need
to know which file to include:

#ifndef FRONTEND
#include "postgres.h"
#else
#include "postgres_fe.h"
#endif

so it looks like we have to a keep adding to Makefiles. Sorry.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2004-04-13 19:18:42 Re: query slows down with more accurate stats
Previous Message Bruce Momjian 2004-04-13 18:50:11 Re: FRONTEND in ecpg