Be more careful to avoid including system headers after perl.h
John Naylor <john.naylor@postgresql.org>
Be more careful to avoid including system headers after perl.h Commit 121d2d3d70 included simd.h into pg_wchar.h. This caused a problem on Windows, since Perl has "#define free" (referring to globals), which breaks the Windows' header. To fix, move the static inline function definitions from plperl_helpers.h, into plperl.h, where we already document the necessary inclusion order. Since those functions were the only reason for the existence of plperl_helpers.h, remove it. First reported by Justin Pryzby Diagnosis and review by Andres Freund, patch by myself per suggestion from Tom Lane Discussion: https://www.postgresql.org/message-id/20220826115546.GE2342%40telsasoft.com
Files
| Path | Change | +/− |
|---|---|---|
| contrib/hstore_plperl/hstore_plperl.c | modified | +0 −1 |
| contrib/jsonb_plperl/jsonb_plperl.c | modified | +0 −1 |
| src/pl/plperl/GNUmakefile | modified | +2 −2 |
| src/pl/plperl/plperl.c | modified | +0 −2 |
| src/pl/plperl/plperl.h | modified | +169 −1 |
| src/pl/plperl/plperl_helpers.h | deleted | +0 −171 |
| src/pl/plperl/SPI.xs | modified | +0 −1 |
| src/pl/plperl/Util.xs | modified | +0 −1 |
Discussion
- windows cfbot failing: my_perl 17 messages · 2022-08-26 → 2022-08-27