delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/08/31/03:41:54

Message-ID: <39AE0E92.C8E0A73B@softhome.net>
Date: Thu, 31 Aug 2000 09:51:46 +0200
From: Laurynas Biveinis <lauras AT softhome DOT net>
X-Mailer: Mozilla 4.74 [en] (Win98; U)
X-Accept-Language: lt,en
MIME-Version: 1.0
To: Jason Green <mail AT jgreen4 DOT fsnet DOT co DOT uk>
CC: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>, djgpp-workers AT delorie DOT com
Subject: Re: Symify fixes
References: <226lqssqgqp6i9nk82rvrqhl9aaia029e9 AT 4ax DOT com> <7458-Mon28Aug2000203504+0300-eliz AT is DOT elta DOT co DOT il> <ltflqs8ouggncaukmesirq7rsbsi4umrj5 AT 4ax DOT com> <8011-Mon28Aug2000234727+0300-eliz AT is DOT elta DOT co DOT il> <ttvnqs0p0rib0eja7eiijst64vbgp9tl1b AT 4ax DOT com> <39AD1BF3 DOT 139CB5DB AT softhome DOT net> <9003-Wed30Aug2000195653+0300-eliz AT is DOT elta DOT co DOT il> <3b5rqskv9adg5lcc3p4nhg2doib859r3n8 AT 4ax DOT com>
Reply-To: djgpp-workers AT delorie DOT com

Jason Green wrote:
> I did actually think about this.  fseek() and fread() are not listed
> (in the POSIX P.G.) as setting errno.  To know that these functions
> will set errno requires inside knowledge of libc, so I played it safe.

In DJGPP, errno might be set by any failing function. (It used to be
set even by startup code)

> It's not sufficient to simply test errno to see if an error occured,
> because it only has meaningful value if tested after a system call
> that has returned some failure indication.

And if I have not missing anything, this is the only way bail() will be 
used - right after failed syscall.

> So, IMHO, it's not appropriate to use errno in this case.  But I can
> modify the code to do that if you wish.

If you don't change your mind about errno, then I'll commit current bail()
version. It's code of yours, after all.

> There is some generic
> code by Richard Stevens which takes printf style arguments to provide
> better context to the error reporting, I can dig this out if you like.

Yes, I'm curious.

Laurynas

- Raw text -


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