From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@postgresql.org
Subject: pgsql: Move the extern declaration for ExceptionalCondition into c.h.
Date: Thu, 15 Feb 2018 00:43:54 +0000
Message-ID: <E1em7eU-0005h4-6r@gemulon.postgresql.org> (raw)
Move the extern declaration for ExceptionalCondition into c.h.
This is the logical conclusion of our decision to support Assert()
in both frontend and backend code: it should be possible to use that
after including just c.h. But as things were arranged before, if
you wanted to use Assert() in code that might be compiled for either
environment, you had to include postgres.h for the backend case.
Let's simplify that.
Per buildfarm, some of whose members started throwing warnings after
commit 0c62356cc added an Assert in src/port/snprintf.c.
It's possible that some other src/port files that use the stanza
#ifndef FRONTEND
#include "postgres.h"
#else
#include "postgres_fe.h"
#endif
could now be simplified to just say '#include "c.h"'. I have not
tested for that, though, and it'd be unlikely to apply for more
than a small number of them.
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/03c5a00ea3867f5736da6cedce73b1eea88a98af
Modified Files
--------------
src/include/c.h | 19 ++++++++++++++++---
src/include/postgres.h | 16 ----------------
2 files changed, 16 insertions(+), 19 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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us
Subject: Re: pgsql: Move the extern declaration for ExceptionalCondition into c.h.
In-Reply-To: <E1em7eU-0005h4-6r@gemulon.postgresql.org>
References: <E1em7eU-0005h4-6r@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