Unwind #if spaghetti in hmac_openssl.c a bit.
Tom Lane <tgl@sss.pgh.pa.us>
Unwind #if spaghetti in hmac_openssl.c a bit. Make this code a little less confusing by defining a separate macro that controls whether we'll use ResourceOwner facilities to track the existence of a pg_hmac_ctx context. The proximate reason to touch this is that since b8bff07da, we got "unused function" warnings if building with older OpenSSL, because the #if guards around the ResourceOwner wrapper function definitions were different from those around the calls of those functions. Pulling the ResourceOwner machinations outside of the #ifdef HAVE_xxx guards fixes that and makes the code clearer too. Discussion: https://postgr.es/m/1394271.1712016101@sss.pgh.pa.us
Files
| Path | Change | +/− |
|---|---|---|
| src/common/hmac_openssl.c | modified | +18 −14 |
Discussion
- Confusing #if nesting in hmac_openssl.c 5 messages · 2024-04-02 → 2024-04-03