8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 224501e commit 91d381eCopy full SHA for 91d381e
src/interfaces/libpq/fe-misc.c
@@ -25,7 +25,7 @@
25
*
26
27
* IDENTIFICATION
28
- * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-misc.c,v 1.65 2001/12/03 00:28:24 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-misc.c,v 1.65.2.1 2005/07/08 15:25:46 tgl Exp $
29
30
*-------------------------------------------------------------------------
31
*/
@@ -844,8 +844,16 @@ libpq_gettext(const char *msgid)
844
845
if (!already_bound)
846
{
847
+ /* dgettext() preserves errno, but bindtextdomain() doesn't */
848
+ int save_errno = errno;
849
+
850
already_bound = 1;
851
bindtextdomain("libpq", LOCALEDIR);
852
+#ifdef WIN32
853
+ SetLastError(save_errno);
854
+#else
855
+ errno = save_errno;
856
+#endif
857
}
858
859
return dgettext("libpq", msgid);
0 commit comments