postgresql/src
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
..
backend Fix double-phrase typo in message 2019-05-31 10:08:37 -04:00
bin Fix assorted header files that failed to compile standalone. 2019-05-31 11:45:33 -04:00
common Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
fe_utils Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
include Fix incorrect parameter name in comment 2019-05-31 13:30:05 -04:00
interfaces Un-break ecpg tests for Windows. 2019-06-02 11:07:54 -04:00
makefiles Define WIN32_STACK_RLIMIT throughout win32 and cygwin builds. 2019-04-09 08:25:39 -07:00
pl Clean up PL/Perl's handling of the _() macro. 2019-06-02 12:23:39 -04:00
port Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
template Yet further rethinking of build changes for macOS Mojave. 2018-11-02 18:54:00 -04:00
test worker_spi needs a .gitignore file now. 2019-06-02 11:13:23 -04:00
timezone Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
tools Un-break ecpg tests for Windows. 2019-06-02 11:07:54 -04:00
tutorial Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
DEVELOPERS Replace a couple of references to files that no longer exist in the source 2009-05-04 08:08:47 +00:00
Makefile Fix partial-build problems introduced by having more generated headers. 2018-04-09 16:42:10 -04:00
Makefile.global.in Consistently test for in-use shared memory. 2019-04-12 22:36:38 -07:00
Makefile.shlib Ensure static libraries have correct mod time even if ranlib messes it up. 2018-11-29 15:53:44 -05:00
nls-global.mk Move logging.h and logging.c from src/fe_utils/ to src/common/. 2019-05-14 14:20:10 -04:00