|
8 | 8 | *
|
9 | 9 | *
|
10 | 10 | * IDENTIFICATION
|
11 |
| - * $PostgreSQL: pgsql/src/interfaces/libpq/fe-exec.c,v 1.170 2005/07/02 17:01:54 momjian Exp $ |
| 11 | + * $PostgreSQL: pgsql/src/interfaces/libpq/fe-exec.c,v 1.171 2005/08/1301:34:30 momjian Exp $ |
12 | 12 | *
|
13 | 13 | *-------------------------------------------------------------------------
|
14 | 14 | */
|
@@ -2166,7 +2166,15 @@ PQoidValue(const PGresult *res)
|
2166 | 2166 | #endif
|
2167 | 2167 | result=strtoul(res->cmdStatus+7,&endptr,10);
|
2168 | 2168 |
|
2169 |
| -if (!endptr|| (*endptr!=' '&&*endptr!='\0')||errno==ERANGE) |
| 2169 | +if (!endptr|| (*endptr!=' '&&*endptr!='\0') |
| 2170 | +#ifndefWIN32 |
| 2171 | +/* |
| 2172 | + *On WIN32, errno is not thread-safe and GetLastError() isn't set by |
| 2173 | + *strtoul(), so we can't check on this platform. |
| 2174 | + */ |
| 2175 | +||errno==ERANGE |
| 2176 | +#endif |
| 2177 | +) |
2170 | 2178 | returnInvalidOid;
|
2171 | 2179 | else
|
2172 | 2180 | return (Oid)result;
|
|