From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: IWYU widely useful pragmas
Date: Wed, 15 Jan 2025 18:37:20 +0000
Message-ID: <E1tY8GW-001llv-75@gemulon.postgresql.org> (raw)
IWYU widely useful pragmas
Add various widely useful "IWYU pragma" annotations, such as
- Common header files such as c.h, postgres.h should be "always_keep".
- System headers included in c.h, postgres.h etc. should be considered
"export".
- Some portability headers such as getopt_long.h should be
"always_keep", so they are not considered superfluous on some
platforms.
- Certain system headers included from portability headers should be
considered "export" because the purpose of the portability header is
to wrap them.
- Superfluous includes marked as "for backward compatibility" get a
formal IWYU annotation.
- Generated header included in utils/syscache.h is marked exported.
This is a very commonly used include and this avoids lots of
complaints.
Discussion: https://www.postgresql.org/message-id/flat/9395d484-eff4-47c2-b276-8e228526c8ae@eisentraut.org
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/74938d132093bc0ad99a5420da2e99edaa3734f9
Modified Files
--------------
src/include/c.h | 5 +++++
src/include/getopt_long.h | 3 ++-
src/include/pg_getopt.h | 5 +++--
src/include/pg_trace.h | 2 +-
src/include/pgstat.h | 6 +++---
src/include/port/pg_iovec.h | 2 +-
src/include/port/pg_pthread.h | 2 +-
src/include/postgres.h | 5 +++++
src/include/postgres_ext.h | 1 +
src/include/postgres_fe.h | 5 +++++
src/include/utils/syscache.h | 2 +-
src/interfaces/libpq/libpq-int.h | 2 ++
12 files changed, 30 insertions(+), 10 deletions(-)
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: pgsql-committers@postgresql.org
Cc: peter@eisentraut.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: IWYU widely useful pragmas
In-Reply-To: <E1tY8GW-001llv-75@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox