From: | "Tristan Partin" <tristan(at)partin(dot)io> |
---|---|
To: | "Thomas Munro" <thomas(dot)munro(at)gmail(dot)com>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | "pgsql-hackers" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: On non-Windows, hard depend on uselocale(3) |
Date: | 2024-08-13 23:17:31 |
Message-ID: | D3F61A59ARFJ.12K4NG1DEJ6DE@partin.io |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hey Thomas,
Thanks for picking this up. I think your patch looks really good. Are
you familiar with gcc's function poisoning?
#include <stdio.h>
#pragma GCC poison puts
int main(){
#pragma GCC bless begin puts
puts("a");
#pragma GCC bless end puts
}
I wonder if we could use function poisoning to our advantage. For
instance in ecpg, it looks like you got all of the strtod() invocations
and replaced them with strtod_l(). Here is a patch with an example of
what I'm talking about.
--
Tristan Partin
Neon (https://neon.tech)
Attachment | Content-Type | Size |
---|---|---|
v1-0001-Poison-strtod-in-ecpg.patch | text/x-patch | 2.5 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Sami Imseih | 2024-08-13 23:18:22 | Re: Restart pg_usleep when interrupted |
Previous Message | Tristan Partin | 2024-08-13 22:33:42 | Re: Subscription to Postgres Releases via ICS |