From: DJ Delorie <dj@delorie.com>
Subject: Re: setting errno
19 Jan 1999 19:01:52 -0500
Message-ID: <36A51CF0.93AC983D@delorie.com>
References: <3.0.5.32.19990119122347.0a413ec0.cygnus.gnu-win32@linus.mitre.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.5 [en] (X11; I; Linux 2.1.126 i586)
X-Accept-Language: en

Tim Taylor wrote:
> 
> 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 correct way is, always was, and always will be, like thus:

	#include <errno.h>

	errno = N;

The ANSI spec requires it to be so.
