Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit70f7da3

Browse files
committed
Make libpq_gettext save and restore errno in a Windows-compatible way.
Also, back-patch fix into back branches.
1 parent85f9793 commit70f7da3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

‎src/interfaces/libpq/fe-misc.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
* Portions Copyright (c) 1994, Regents of the University of California
2424
*
2525
* IDENTIFICATION
26-
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-misc.c,v 1.115 2005/07/06 16:25:59 tgl Exp $
26+
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-misc.c,v 1.116 2005/07/08 15:24:41 tgl Exp $
2727
*
2828
*-------------------------------------------------------------------------
2929
*/
@@ -1142,7 +1142,11 @@ libpq_gettext(const char *msgid)
11421142
if (!ldir)
11431143
ldir=LOCALEDIR;
11441144
bindtextdomain("libpq",ldir);
1145+
#ifdefWIN32
1146+
SetLastError(save_errno);
1147+
#else
11451148
errno=save_errno;
1149+
#endif
11461150
}
11471151

11481152
returndgettext("libpq",msgid);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp