delorie.com/archives/browse.cgi | search |
Date: | Fri, 01 Sep 2000 09:20:48 +0200 |
From: | "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il> |
Sender: | halo1 AT zahav DOT net DOT il |
To: | mail AT jgreen4 DOT fsnet DOT co DOT uk |
Message-Id: | <2561-Fri01Sep2000092048+0300-eliz@is.elta.co.il> |
X-Mailer: | Emacs 20.6 (via feedmail 8.2.emacs20_6 I) and Blat ver 1.8.5b |
CC: | lauras AT softhome DOT net, djgpp-workers AT delorie DOT com |
In-reply-to: | <4j7tqskrvkecn18jfdi9vtpbo5skmm82ke@4ax.com> (message from Jason |
Green on Thu, 31 Aug 2000 19:12:54 +0100) | |
Subject: | Re: Symify fixes |
References: | <3b5rqskv9adg5lcc3p4nhg2doib859r3n8 AT 4ax DOT com> <Pine DOT SUN DOT 3 DOT 91 DOT 1000831074644 DOT 20860E-100000 AT is> <4j7tqskrvkecn18jfdi9vtpbo5skmm82ke AT 4ax DOT com> |
Reply-To: | djgpp-workers AT delorie DOT com |
Errors-To: | nobody AT delorie DOT com |
X-Mailing-List: | djgpp-workers AT delorie DOT com |
X-Unsubscribes-To: | listserv AT delorie DOT com |
> From: Jason Green <mail AT jgreen4 DOT fsnet DOT co DOT uk> > Date: Thu, 31 Aug 2000 19:12:54 +0100 > > > The portable way to check for errno is to set it to zero before the > > call to a function, then see if it is still zero after the function > > returns. > > Actually no, a system call can legally set errno even if no error > occured. I think ANSI specifically disallows this: if no error occured, errno should be left alone. In fact, the DJGPP library goes to great lengths to not set errno to bogus values, for example if you hit the end of directory during findnext. In any case, errno should be tested only if you have some other indication of a failure. But then `bail' is already called only under these circumstances.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |