mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-08-28 15:57:19 +02:00
Perl likes to redefine the _() macro: #ifdef CAN_PROTOTYPE #define _(args) args #else ... There was lots not to like about the way we dealt with this before: 1. Instead of taking care of the conflict centrally in plperl.h, we expected every one of its ever-growing number of includers to do so. This is duplicative and error-prone in itself, plus it means that plperl.h fails to meet the expectation of being compilable standalone, resulting in macro-redefinition warnings in cpluspluscheck. 2. We left _() with its Perl definition, meaning that if someone tried to use it in any Perl-related extension, it would silently fail to provide run-time translation. I don't see any live bugs of this ilk, but it's clearly a hard-to-notice bug waiting to happen. So fix that by centralizing the cleanup logic, making it match what we're already doing for other macro conflicts with Perl. Since we only expect plperl.h to be included by extensions not core code, we should redefine _() as dgettext() not gettext(). |
||
---|---|---|
.. | ||
expected | ||
sql | ||
.gitignore | ||
hstore_plperl--1.0.sql | ||
hstore_plperl.c | ||
hstore_plperl.control | ||
hstore_plperlu--1.0.sql | ||
hstore_plperlu.control | ||
Makefile |