delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2009/09/13/15:40:40

X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f
X-Recipient: djgpp-workers AT delorie DOT com
Date: Sun, 13 Sep 2009 22:40:38 +0300
From: Eli Zaretskii <eliz AT gnu DOT org>
Subject: Re: [PATCH 2/4] DJGPP fix: do not try to source /dev/null as cache or site file.
In-reply-to: <20090913191508.GC29257@gmx.de>
X-012-Sender: halo1 AT inter DOT net DOT il
To: Ralf Wildenhues <Ralf DOT Wildenhues AT gmx DOT de>
Cc: autoconf-patches AT gnu DOT org, rugxulo AT gmail DOT com, rrt AT sc3d DOT org,
djgpp-workers AT delorie DOT com
Message-id: <83eiqazl8p.fsf@gnu.org>
References: <20090913191226 DOT GA29257 AT gmx DOT de> <20090913191508 DOT GC29257 AT gmx DOT de>
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

> Date: Sun, 13 Sep 2009 21:15:10 +0200
> From: Ralf Wildenhues <Ralf DOT Wildenhues AT gmx DOT de>
> 
> * lib/autoconf/general.m4 (AC_SITE_LOAD, AC_CACHE_LOAD): Do not
> load the cache or site file if it is `/dev/null', as DJGPP treats
> it as a regular file, but the shell then warns about it later.
> Fixes several test suite failures on DJGPP.
> ---
> 
> * Ralf Wildenhues wrote on Sun, Sep 13, 2009 at 09:12:28PM CEST:
> > -- 'test -f /dev/null && test -r /dev/null' returns true, but
> > '. /dev/null' does not work.  Worked around with patch.
> > 
> > Test failures: 14 31 259-261 270-271 284-287
> 
> 
>  lib/autoconf/general.m4 |    8 ++++----
>  1 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4
> index b82999a..fd40c43 100644
> --- a/lib/autoconf/general.m4
> +++ b/lib/autoconf/general.m4
> @@ -1875,7 +1875,7 @@ fi
>  for ac_site_file in "$ac_site_file1" "$ac_site_file2"
>  do
>    test "x$ac_site_file" = xNONE && continue
> -  if test -r "$ac_site_file"; then
> +  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
>      AC_MSG_NOTICE([loading site script $ac_site_file])
>      sed 's/^/| /' "$ac_site_file" >&AS_MESSAGE_LOG_FD
>      . "$ac_site_file"
> @@ -1888,9 +1888,9 @@ done
>  # -------------
>  m4_define([AC_CACHE_LOAD],
>  [if test -r "$cache_file"; then
> -  # Some versions of bash will fail to source /dev/null (special
> -  # files actually), so we avoid doing that.
> -  if test -f "$cache_file"; then
> +  # Some versions of bash will fail to source /dev/null (special files
> +  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
> +  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
>      AC_MSG_NOTICE([loading cache $cache_file])
>      case $cache_file in
>        [[\\/]]* | ?:[[\\/]]* ) . "$cache_file";;
> -- 
> 1.6.3.3.345.gb7132

Thanks.

- Raw text -


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