Commit f810cfb2 authored by Bruce Momjian's avatar Bruce Momjian

Disable strtoul() ERANGE check on Win32, because it isn't thread safe,

and it isn't really required.
parent 27639809
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-exec.c,v 1.170 2005/07/02 17:01:54 momjian Exp $ * $PostgreSQL: pgsql/src/interfaces/libpq/fe-exec.c,v 1.171 2005/08/13 01:34:30 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -2166,7 +2166,15 @@ PQoidValue(const PGresult *res) ...@@ -2166,7 +2166,15 @@ PQoidValue(const PGresult *res)
#endif #endif
result = strtoul(res->cmdStatus + 7, &endptr, 10); result = strtoul(res->cmdStatus + 7, &endptr, 10);
if (!endptr || (*endptr != ' ' && *endptr != '\0') || errno == ERANGE) if (!endptr || (*endptr != ' ' && *endptr != '\0')
#ifndef WIN32
/*
* On WIN32, errno is not thread-safe and GetLastError() isn't set by
* strtoul(), so we can't check on this platform.
*/
|| errno == ERANGE
#endif
)
return InvalidOid; return InvalidOid;
else else
return (Oid) result; return (Oid) result;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment