From: jjf@bcs.org.uk (J. J. Farrell)
Subject: Re: setting errno
20 Jan 1999 08:24:17 -0800
Message-ID: <199901200233.SAA26740.cygnus.gnu-win32@aleph.ssd.hal.com>
References: <3.0.5.32.19990119122347.0a413ec0@linus.mitre.org>
Content-Type: text
To: ttaylor@mitre.org (Tim Taylor)
Cc: gnu-win32@cygnus.com

> From: Tim Taylor <ttaylor@mitre.org>
> 
> I'm porting a program that sets errno if an operation fails.  However, in
> the B20.1 errno is a macro that dereferences the pointer returned by a
> function #define errno (*__errno())
> 
> What is the proper way to set errno in cygwin?

The same as with any other Standard C conformant definition of errno -
something like
                   errno = whatever;

> Based on comments I've read in the headers, it appears that the following
> will work:
> 
> _REENT->_errno = xxx
> 
> Is this correct, or is there a more compatible or preferred way of doing this?

Is there some problem with doing it the normal way?

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".
