Re: do {} while (0) nitpick

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com>
Cc: David Steele <david(at)pgmasters(dot)net>, Bruce Momjian <bruce(at)momjian(dot)us>, John Naylor <john(dot)naylor(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: do {} while (0) nitpick
Date: 2020-05-06 19:24:40
Message-ID: 23470.1588793080@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com> writes:
> I tried this out with ppport.h from perl 5.30.2 which is what's on my
> Fedora 31 workstation. It compiled fine, no warnings and the tests all
> ran fine.
> So we could update it. I'm just not sure there would be any great
> benefit from doing so until we want to use some piece of perl API that
> postdates 5.11.2, which is where our current file comes from.

Yeah, perhaps not. Given our general desire not to break old toolchains,
it might be a long time before we want to require any new Perl APIs.

> I couldn't actually find an instance of the offending pattern in either
> version of pport.h. What am I overlooking?

My script was looking for any macro ending with ';', so it found these:

#define START_MY_CXT static my_cxt_t my_cxt;

# define XCPT_TRY_END JMPENV_POP;

# define XCPT_TRY_END Copy(oldTOP, top_env, 1, Sigjmp_buf);

Those don't seem like things we'd use directly, so it's mostly moot.

BTW, I looked around and could not find a package-provided ppport.h
at all on my Red Hat systems. What package is it in?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Chapman Flack 2020-05-06 20:01:44 Re: PG 13 release notes, first draft
Previous Message Peter Geoghegan 2020-05-06 19:04:49 Re: xid wraparound danger due to INDEX_CLEANUP false