Move declaration of ecpg_gettext() to a saner place.
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 7 Nov 2019 19:21:52 +0000 (14:21 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 7 Nov 2019 19:21:52 +0000 (14:21 -0500)
commitb20233aac74302d20f9ea6fae9b3b90155f7a373
tree246e2b125991cb04c2207cc7338915acdcd0cea8
parent8d380864a523362777d325872997ae706d1d34e1
Move declaration of ecpg_gettext() to a saner place.

Declaring this in the client-visible header ecpglib.h was a pretty
poor decision.  It's not meant to be application-callable (and if
it was, putting it outside the extern "C" { ... } wrapper means
that C++ clients would fail to call it).  And the declaration would
not even compile for a client, anyway, since it would not have the
macro pg_attribute_format_arg().  Fortunately, it seems that no
clients have tried to include this header with ENABLE_NLS defined,
or we'd have gotten complaints about that.  But we have no business
putting such a restriction on client code.

Move the declaration to ecpglib_extern.h, since in fact nothing
outside src/interfaces/ecpg/ecpglib/ needs to call it.

The practical effect of this is just that clients can now safely
#include ecpglib.h while having ENABLE_NLS defined, but that seems
like enough of a reason to back-patch it.

Discussion: http://postgr.es/m/20590.1573069709@sss.pgh.pa.us
src/interfaces/ecpg/ecpglib/extern.h
src/interfaces/ecpg/include/ecpglib.h