delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/01/20/05:53:42

From: khan AT xraylith DOT wisc DOT edu (Mumit Khan)
Subject: Re: setting errno
20 Jan 1999 05:53:42 -0800 :
Message-ID: <199901200125.TAA23275.cygnus.gnu-win32@modi.xraylith.wisc.edu>
References: <3 DOT 0 DOT 5 DOT 32 DOT 19990119122347 DOT 0a413ec0 AT linus DOT mitre DOT org>
To: Tim Taylor <ttaylor AT mitre DOT org>
Cc: gnu-win32 AT cygnus DOT com

Tim Taylor <ttaylor AT mitre DOT org> writes:
> 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?

As you would expect; eg.,

  #include <errno.h>

  /* .... */
  
  errno = ENOENT;

will do the right thing.

Regards,
Mumit

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019