www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/02/02/15:16:54

Date: Tue, 2 Feb 1999 11:23:16 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Paul Derbyshire <pderbysh AT usa DOT net>
cc: djgpp AT delorie DOT com
Subject: Re: Clarification of some errno values.
In-Reply-To: <199902020334.WAA06724@envy.delorie.com>
Message-ID: <Pine.SUN.3.91.990202112217.13819R-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com

On Mon, 1 Feb 1999, DJ Delorie wrote:

> >    EINTR      'Interrupted system call'  -- ???
> 
> Hit Ctrl-C during, say, seek().  If there's a signal handler and it
> returns, this is the error code returned by the interrupted function.

It should also be put in errno when a child program is interrupted by
a Ctrl-C or Ctrl-BREAK.  Unfortunately, it doesn't always work, due to
the half-hearted way many DOS/Windows environments handle Ctrl-C and
Ctrl-BREAK.  But if it does work, the machinery is there to support
it.

> >    EISDIR     'Is a directory'           -- file opening related?
> 
> Yup.  Can't open() a directory.

Actually, the only library function that sets EISDIR is `rename'.  The
reason is that DOS doesn't return a distinct error code when you try
e.g. to open a directory.  All you get is the ubiquitous "Access
denied", which is converted by libc into EACCES.  So if you want
EISDIR, you need to write special code to check for this.

DJGPP attempts to set errno to an appropriate value by mapping error
codes returned by DOS into the possible errno values listed in
<errno.h>.  But the problem with DOS is that, although it defines an
enormously large list of possible error codes, the range of codes it
actually returns is very small.  Most of the ``interesting'' errors
just return "Access denied".

> >    ENOSYS     'Function not implemented' -- ???
> 
> Like fork(), which exists for compatibility, but always returns an
> error because DJGPP isn't able to do that.

Also, any LFN-specific function, like _get_volume_info, when LFN is
disabled (LFN=n) or unavailable (DOS).

- Raw text -


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