Skip to Content.
Sympa Menu

freetds - Re: [freetds] errno and threads

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Frediano Ziglio <freddyz77 AT tin.it>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] errno and threads
  • Date: Tue, 05 Aug 2003 06:00:36 -0000

Il mar, 2003-08-05 alle 06:31, Craig A. Berry ha scritto:
> At 11:57 PM -0400 8/4/03, James K. Lowden wrote:
> > On some multithreaded platforms, errno is
> >actually a macro to a function call (which prevents assignment, but allows
> >typical use).
>
> C99 requires errno to be a "modifiable lvalue," but it also says in a
> footnote, "The macro errno need not be the identifier of an object.
> It might expand to a modifiable lvalue resulting from a function call
> (for example, *errno())."
>
> So I think everything about your statement is correct except
> "prevents assignment"; a decent implementation is going to call a
> function that implements an assignable errno on a per-thread basis.

IMHO if errno is not thread-safe iconv is not too...
I think our tds_iconv should return error instead of leave caller check
errno.

Another issue about iconv. I'm going to change iconv stuff using an
abstract interface...

freddy77






Archive powered by MHonArc 2.6.24.

Top of Page