delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/10/06/07:30:06

Date: Tue, 6 Oct 1998 14:30:10 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: M DOT A DOT Bukin AT inp DOT nsk DOT su
cc: djgpp AT delorie DOT com
Subject: Re: /dev/null problems with bash when rebuild from sources
In-Reply-To: <20u31k5tgb.fsf@Sky.inp.nsk.su>
Message-ID: <Pine.SUN.3.91.981006142949.17118T-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com

On 4 Oct 1998 M DOT A DOT Bukin AT inp DOT nsk DOT su wrote:

> djgpp 20:29:42> /bin/echo test
> bash: /bin/echo: No such file or directory (ENOENT)

This is expected (and correct) behavior: Bash is not supposed to
pretend that /bin/echo exists if it doesn't.  The "/bin/sh" as the
first line of a shell script and in Makefiles is supported *only* when
you run the script or the Makefile.

> djgpp 20:30:51> SYSROOT=$DJDIR
>  20:31:01> echo $SYSROOT
> d:/comp/djgpp
>  20:31:07> echo test > /dev/null
> bash: /dev/null: No such file or directory (ENOENT)

You are NOT supposed to set SYSROOT to anything but a root of a
certain drive.  That is, SYSROOT=c: is okay (and /dev/null will work
then).  DJGPP only supports /dev/null if /dev is at the top level,
either as /dev/null or X:/dev/null (where X: is any drive letter).  In
the case above, the library sees d:/comp/djgpp/dev/null, since Bash
prepends $SYSROOT before it calls any library functions, and that name
does not get mapped into NUL.

I don't think it is right for the library to handle such cases, since
that would make `dev' special and will essentially preclude any
directory to have such name.  Right now, you can have `dev' anywhere
but at the top level, which is already bad enough, IMHO (several
people got burnt by that, and it is now in the FAQ).

- Raw text -


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