> Date: Sun, 13 Sep 2009 21:15:10 +0200 > From: Ralf Wildenhues <[email protected]> > > * 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.
