diff options
author | Bruce Momjian <bruce@momjian.us> | 2005-08-23 21:02:05 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2005-08-23 21:02:05 +0000 |
commit | 43bf3a6bc658d634e073dcb4ea3580dd9053a3b1 (patch) | |
tree | 40d357f8408e146b23f3e005798677a2340ba331 /src/interfaces/libpq/fe-misc.c | |
parent | f2cec8760581aa9d036c659ecf9ad74907709cc1 (diff) | |
download | postgresql-43bf3a6bc658d634e073dcb4ea3580dd9053a3b1.tar.gz postgresql-43bf3a6bc658d634e073dcb4ea3580dd9053a3b1.zip |
The attached patch updates the thread test program to run stand-alone on
Windows. The test itself is bypassed in configure as discussed, and
libpq has been updated appropriately to allow it to build in thread-safe
mode.
Dave Page
Diffstat (limited to 'src/interfaces/libpq/fe-misc.c')
-rw-r--r-- | src/interfaces/libpq/fe-misc.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/interfaces/libpq/fe-misc.c b/src/interfaces/libpq/fe-misc.c index f4ae2ca2d93..b31c3a9613d 100644 --- a/src/interfaces/libpq/fe-misc.c +++ b/src/interfaces/libpq/fe-misc.c @@ -23,7 +23,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $PostgreSQL: pgsql/src/interfaces/libpq/fe-misc.c,v 1.118 2005/08/23 20:48:47 momjian Exp $ + * $PostgreSQL: pgsql/src/interfaces/libpq/fe-misc.c,v 1.119 2005/08/23 21:02:03 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -1133,7 +1133,11 @@ libpq_gettext(const char *msgid) if (!already_bound) { /* dgettext() preserves errno, but bindtextdomain() doesn't */ - int save_errno = errno; +#ifdef WIN32 + int save_errno = GetLastError(); +#else + int save_errno = errno; +#endif const char *ldir; already_bound = true; |