freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "James K. Lowden" <jklowden AT schemamania.org>
- To: TDS Development Group <freetds AT lists.ibiblio.org>
- Subject: [freetds] errno and threads
- Date: Mon, 4 Aug 2003 23:57:10 -0400
Investigating what seems like a silly warning[1] in read.c, I came across
this comment:
if (-1 == tds_iconv(tds, tds->iconv_info, to_client,
&ptemp, &templeft, outbuf, outbytesleft)) {
/* FIXME do not use errno, thread problems */
if (errno != EINVAL)
break;
}
AFAIK, there's no fix. GNU iconv at least is documented as returning
information through errno. On some multithreaded platforms, errno is
actually a macro to a function call (which prevents assignment, but allows
typical use).
I think the above code is right, and the comment is not. If there is an
accepted alternative, would someone please point the way? Else I'm going
to remove the comment.
--jkl
1. "src/tds/read.c:613: warning: statement with no effect"
I think the compiler doesn't notice that outbytesleft may be modified by
tds_iconv().
-
[freetds] errno and threads,
James K. Lowden, 08/04/2003
-
Re: [freetds] errno and threads,
Craig A. Berry, 08/05/2003
- Re: [freetds] errno and threads, Frediano Ziglio, 08/05/2003
- <Possible follow-up(s)>
- RE: [freetds] errno and threads, Lowden, James K, 08/05/2003
- RE: [freetds] errno and threads, ZIGLIO Frediano, 08/05/2003
-
RE: [freetds] errno and threads,
Lowden, James K, 08/05/2003
- RE: [freetds] errno and threads, Frediano Ziglio, 08/05/2003
-
RE: [freetds] errno and threads,
Lowden, James K, 08/05/2003
-
RE: [freetds] errno and threads,
Frediano Ziglio, 08/06/2003
- Re: [freetds] errno and threads, James K. Lowden, 08/07/2003
-
RE: [freetds] errno and threads,
Frediano Ziglio, 08/06/2003
- RE: [freetds] errno and threads, ZIGLIO Frediano, 08/08/2003
-
Re: [freetds] errno and threads,
Craig A. Berry, 08/05/2003
Archive powered by MHonArc 2.6.24.