Re: more buildfarm breakage - Mailing list pgsql-hackers

From Tom Lane
Subject Re: more buildfarm breakage
Date
Msg-id 11850.1296842649@sss.pgh.pa.us
Whole thread Raw
In response to more buildfarm breakage  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: more buildfarm breakage  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> mingw is unhappy with my latest stab at fixing the mess created by the
> errcodes patch last night.  It appears that there are several files in
> src/port that include "postgres.h" even when FRONTEND is defined.  For
> example, chklocale.c does this, which looks good:

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

> But dirent.c, pipe.c, and win32error.c just do this, which seems ungood:

> #include "postgres.h"

I agree, that is not cool.

> Can we get away with using the former incantation for these files, or
> do they really need to include the backend version of that file even
> when compiled with -DFRONTEND?  If so, I can fix it by adding some
> more dependencies, but I thought I'd ask first.

If the #ifndef FRONTEND incantation doesn't work, then either the file
isn't meant to be built for frontend at all (src/port does have some
like that IIRC), or we need to fix the code.

BTW, I noted here that errcodes.h doesn't seem to get built till after
src/port/ is built.  That seems wrong --- there is definitely code in
there that needs to throw errors.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Itagaki Takahiro
Date:
Subject: Re: multiset patch review
Next
From: "Kevin Grittner"
Date:
Subject: Re: SSI performance