Subject: Re: setting errno
From: DJ Delorie <[email-masked]>

19 Jan 1999 19:01:52 -0500
Message-ID: <[email-masked]>
References: <[email-masked]>
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.