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

Commitf810cfb

Browse files
committed
Disable strtoul() ERANGE check on Win32, because it isn't thread safe,
and it isn't really required.
1 parent2763980 commitf810cfb

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

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

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* 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 $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -2166,7 +2166,15 @@ PQoidValue(const PGresult *res)
21662166
#endif
21672167
result=strtoul(res->cmdStatus+7,&endptr,10);
21682168

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+
)
21702178
returnInvalidOid;
21712179
else
21722180
return (Oid)result;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp