Re: Problem with server/utils/snapmgr.h

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Chris Browne <cbbrowne(at)acm(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Problem with server/utils/snapmgr.h
Date: 2008-04-21 22:31:00
Message-ID: 20080421223100.GD16040@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Chris Browne wrote:

> If I use:
> AC_CHECK_HEADER(utils/snapmgr.h, HAVE_SNAPMGR=1)
>
> this turns out to fail. Apparently autoconf wants to compile the
> #include file to validate that it's an OK #include file.
>
> GCC barfs on it, thus:
>
> cbbrowne(at)dba2:~/Slony-I/CMD/slony1-HEAD> gcc -I/opt/OXRS/dbs/pgsql84-beta/include/server /opt/OXRS/dbs/pgsql84-beta/include/server/utils/snapmgr.h
> In file included from /opt/OXRS/dbs/pgsql84-beta/include/server/storage/itemptr.h:17,
> from /opt/OXRS/dbs/pgsql84-beta/include/server/access/htup.h:17,
> from /opt/OXRS/dbs/pgsql84-beta/include/server/utils/snapshot.h:16,
> from /opt/OXRS/dbs/pgsql84-beta/include/server/utils/tqual.h:18,
> from /opt/OXRS/dbs/pgsql84-beta/include/server/utils/snapmgr.h:16:

Hmm. It works for me if I forcefully include postgres.h:

gcc -I/pgsql/install/00head/include/server -include postgres.h /pgsql/install/00head/include/server/utils/snapmgr.h

Our header file rule says that a header must include any header it needs
to compile, but never include postgres.h, which must be the first
include in all the .c files.

So I'm not sure the fix for this.

What does Slony-I need snapmgr.h for, anyway? This code is in a state
of a flux right now -- there are pending patches which are likely to
change the horizon a bit. Perhaps it does not make sense for Slony to
adjust to a state that's expected to be short-lived.

--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2008-04-21 23:24:15 Re: MERGE Specification
Previous Message Tino Wildenhain 2008-04-21 21:01:43 Re: TODO, FAQs to Wiki?