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: "Craig A. Berry" <craigberry AT mac.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] errno and threads
  • Date: Mon, 4 Aug 2003 23:31:25 -0500

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.
--
________________________________________
Craig A. Berry
mailto:craigberry AT mac.com

"... getting out of a sonnet is much more
difficult than getting in."
Brad Leithauser




Archive powered by MHonArc 2.6.24.

Top of Page