Re: Move OpenSSL random under USE_OPENSSL_RANDOM - Mailing list pgsql-hackers

From Magnus Hagander
Subject Re: Move OpenSSL random under USE_OPENSSL_RANDOM
Date
Msg-id CABUevEyG_+1OGM8Jegdw0ZZz5ZEV=qJ-pCZZOT6meD8UCt5KWA@mail.gmail.com
Whole thread Raw
In response to Re: Move OpenSSL random under USE_OPENSSL_RANDOM  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Move OpenSSL random under USE_OPENSSL_RANDOM  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
On Thu, Nov 19, 2020 at 12:04 PM Michael Paquier <michael@paquier.xyz> wrote:
>
> On Thu, Nov 19, 2020 at 11:00:40AM +0100, Magnus Hagander wrote:
> > I'm thinking the code might get a lot cleaner if we just make a single
> > set of ifdefs, even if that means repeating the function header. In
> > theory we could put them in different *.c files as well, but that
> > seems overkill given how tiny they are.
>
> If you reorganize the code this way, I think that make coverage
> (genhtml mainly) would complain because the same function is defined
> multiple times.  I have fallen in this trap recently, with 2771fcee.

Ugh, that's pretty terrible.

I guess the only way around that is then to split it up into separate
files. And while I think this way makes the code a lot easier to read,
and thereby safer, I'm not sure it's worth quite *that*.

Or do you know of some other way to get around that?

-- 
 Magnus Hagander
 Me: https://www.hagander.net/
 Work: https://www.redpill-linpro.com/



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Issue with server side statement-level rollback
Next
From: Simon Riggs
Date:
Subject: Re: VACUUM (DISABLE_PAGE_SKIPPING on)