public inbox for [email protected]  
help / color / mirror / Atom feed
From: Peter Eisentraut <[email protected]>
To: pgsql-hackers <[email protected]>
Subject: Re: headerscheck: Avoid mutual inclusion of pg_config.h and c.h
Date: Mon, 30 Mar 2026 10:19:01 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>

On 23.03.26 09:50, Peter Eisentraut wrote:
> Headers that c.h includes early should not have another header included 
> before them in the headerscheck test file, especially not c.h.
> 
> A particular instance of a problem is that pg_config.h defines some 
> symbols that c.h later undefines in some cases, such as in the code 
> added by commit cd083b54bd67, but there were also some before that. This 
> only works correctly if pg_config.h is included first.
> 
> This problem can currently be observed on CI.
> 
> pg_config_manual.h and pg_config_os.h are closely related to pg_config.h 
> and should be treated the same way.
> 
> postgres_ext.h is meant to be usable standalone, so testing it with c.h 
> included first defeats the point.
> 
> c.h also includes port.h, but this patch leaves that alone, since port.h 
> does need some of c.h to be processed first.  (But because of header 
> guards, testing port.h separately is probably ineffective.)

This has been committed.






reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected]
  Subject: Re: headerscheck: Avoid mutual inclusion of pg_config.h and c.h
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox