freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: christos AT zoulas.com (Christos Zoulas)
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] Using freetds in Windows
- Date: Mon, 11 Jan 2010 23:05:51 -0500
On Jan 11, 9:56pm, jklowden AT freetds.org ("James K. Lowden") wrote:
-- Subject: Re: [freetds] Using freetds in Windows
| Christos Zoulas wrote:
| > I think Win32 strerror(3) is threadsafe.
| >
| > Even when doing i18n?
|
| AFAIK. I don't see any technical reason why not.
Well, to be thread-safe it needs to use per-thread local storage
for the returned string since it cannot know what the string will
contain. It is easier to punt and do the simple:
char *
strerror(int num)
{
static char buf[NL_TEXTMAX];
int error = strerror_r(num, buf, sizeof(buf));
if (error)
errno = error;
return buf;
}
This is why one should be using strerror_r() if it exists, or protect
strerror() with a mutex if it does not.
christos
-
Re: [freetds] Using freetds in Windows
, (continued)
-
Re: [freetds] Using freetds in Windows,
Andrew H. Wakefield, 01/08/2010
-
Re: [freetds] Using freetds in Windows,
James K. Lowden, 01/09/2010
-
Re: [freetds] Using freetds in Windows,
James K. Lowden, 01/09/2010
- Re: [freetds] Using freetds in Windows, Frediano Ziglio, 01/10/2010
- Re: [freetds] Using freetds in Windows, Andrew H. Wakefield, 01/10/2010
- Re: [freetds] Using freetds in Windows, James K. Lowden, 01/11/2010
- Re: [freetds] Using freetds in Windows, Andrew H. Wakefield, 01/13/2010
-
Re: [freetds] Using freetds in Windows,
James K. Lowden, 01/09/2010
- Re: [freetds] Using freetds in Windows, jklowden, 01/11/2010
- Re: [freetds] Using freetds in Windows, Christos Zoulas, 01/11/2010
- Re: [freetds] Using freetds in Windows, James K. Lowden, 01/11/2010
- Re: [freetds] Using freetds in Windows, Christos Zoulas, 01/11/2010
-
Re: [freetds] Using freetds in Windows,
James K. Lowden, 01/09/2010
-
Re: [freetds] Using freetds in Windows,
Andrew H. Wakefield, 01/08/2010
- Re: [freetds] Using freetds in Windows, Frediano Ziglio, 01/11/2010
- Re: [freetds] Using freetds in Windows, James K. Lowden, 01/11/2010
- Re: [freetds] Using freetds in Windows, Frediano Ziglio, 01/12/2010
Archive powered by MHonArc 2.6.24.