projects
/
users
/
bernd
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a8e1ee0
)
Disable strtoul() ERANGE check on Win32, because it isn't thread safe,
author
Bruce Momjian
<
[email protected]
>
Sat, 13 Aug 2005 01:34:30 +0000
(
01:34
+0000)
committer
Bruce Momjian
<
[email protected]
>
Sat, 13 Aug 2005 01:34:30 +0000
(
01:34
+0000)
and it isn't really required.
src/interfaces/libpq/fe-exec.c
patch
|
blob
|
blame
|
history
diff --git
a/src/interfaces/libpq/fe-exec.c
b/src/interfaces/libpq/fe-exec.c
index fb3266037104ec9b4600b23d1b56bc670d6ab72a..370fee06f78f9206ca89f608c491b694c8b27b9a 100644
(file)
--- a/
src/interfaces/libpq/fe-exec.c
+++ b/
src/interfaces/libpq/fe-exec.c
@@
-2166,7
+2166,15
@@
PQoidValue(const PGresult *res)
#endif
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;
else
return (Oid) result;