postgresql/contrib/hstore_plperl
Tom Lane 032627ee78 Clean up PL/Perl's handling of the _() macro.
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().
2019-06-02 12:23:39 -04:00
..
expected Fix contrib/hstore_plperl to look through scalar refs. 2018-06-18 15:55:06 -04:00
sql Fix contrib/hstore_plperl to look through scalar refs. 2018-06-18 15:55:06 -04:00
.gitignore Add transforms feature 2015-04-26 10:33:14 -04:00
Makefile Still further rethinking of build changes for macOS Mojave. 2018-10-18 14:55:23 -04:00
hstore_plperl--1.0.sql Avoid direct cross-module links in hstore_plperl and ltree_plpython, too. 2016-10-04 17:49:07 -04:00
hstore_plperl.c Clean up PL/Perl's handling of the _() macro. 2019-06-02 12:23:39 -04:00
hstore_plperl.control Add transforms feature 2015-04-26 10:33:14 -04:00
hstore_plperlu--1.0.sql Avoid direct cross-module links in hstore_plperl and ltree_plpython, too. 2016-10-04 17:49:07 -04:00
hstore_plperlu.control Add transforms feature 2015-04-26 10:33:14 -04:00