ftp.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2002/10/16/08:11:47

Date: Wed, 16 Oct 2002 13:20:08 +0100
From: "Richard Dawe" <rich AT phekda DOT freeserve DOT co DOT uk>
Sender: rich AT phekda DOT freeserve DOT co DOT uk
To: djgpp-workers AT delorie DOT com
X-Mailer: Emacs 21.3.50 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.6
Subject: RESEND: Problems with handling of %ENV in Perl
Message-Id: <E181mag-0000tl-00@phekda.freeserve.co.uk>
Reply-To: djgpp-workers AT delorie DOT com

Hello.

I've just been looking at porting the latest versions of autoconf,
automake and libtool to DJGPP. autoconf uses a lot of perl. I've hit
a problem with the treatment of environment variable names.

The DJGPP port of perl seems to captilise all environment variable names.
Unfortunately all accesses to the environment via %ENV are not treated
the same way. This causes problems for autoconf 2.54's autom4te script,
which uses an environment variable called autom4te_perllibdir.
Why does the DJGPP port capitalise all variable names?
I thought DOS has case-sensitive environment variable names?

Fortunately the perl sources already have a mechanism for coping
with case-insensitive environments. Win32 is considered to be
a case-insensitive environment by the perl sources. Below is a patch
to dosish.h, which enables case-insensitive handling
of environment variable names.

Below are also some diffs to allow perl 5.6.1 to be built
from perl561s.zip on Simtel.NET. I had to modify makedepend.SH to cope
with gcc 3.x's dependency information. I needed to change djgppsed.sh,
so that it does not update config_h.SH to use the djgpp_pathexp
mechanism - this should only be used for DJGPP 2.x, where x < 3.
djgppsed.sh should really check the DJGPP version, before doing
the substitution.

Bye, Rich =]

*** gnu/perl.561/dosish.h.orig  Wed Oct 16 13:02:28 2002
--- gnu/perl.561/dosish.h       Wed Oct 16 13:03:02 2002
***************
*** 33,38 ****
--- 33,40 ----
  #define PERL_SYS_TERM() OP_REFCNT_TERM; MALLOC_TERM
  #define dXSUB_SYS
  
+ #define ENV_IS_CASELESS 1
+ 
  /*
   * 5.003_07 and earlier keyed on #ifdef MSDOS for determining if we were 
   * running on DOS, *and* if we had to cope with 16 bit memory addressing 
*** gnu/perl.561/makedepend.SH.orig     Wed Oct 16 12:52:08 2002
--- gnu/perl.561/makedepend.SH  Wed Oct 16 12:50:52 2002
*************** for file in `$cat _clist`; do
*** 138,144 ****
          if [ "$file" = perly.c ]; then
              $echo '#endif' >>UU/$file'_c'
          fi
!         $cppstdin $finc -I. $cppflags $cppminus <UU/$file'_c' |
          $sed \
            -e '/^#.*<stdin>/d' \
            -e '/^#.*"-"/d' \
--- 138,145 ----
          if [ "$file" = perly.c ]; then
              $echo '#endif' >>UU/$file'_c'
          fi
!         $cppstdin $finc -I. $cppflags $cppminus <UU/$file'_c' | \
!       grep -v '<built-in>' | grep -v '<command line>' | \
          $sed \
            -e '/^#.*<stdin>/d' \
            -e '/^#.*"-"/d' \
*************** for file in `$cat _clist`; do
*** 151,157 ****
            -e 's|\.c_c|.c|' $uwinfix | \
          $uniq | $sort | $uniq >> _deptmp
      else
!         $cppstdin $finc -I. $cppflags $cppminus <UU/$file'_c' |
          $sed \
            -e '1d' \
            -e '/^#.*<stdin>/d' \
--- 152,159 ----
            -e 's|\.c_c|.c|' $uwinfix | \
          $uniq | $sort | $uniq >> _deptmp
      else
!         $cppstdin $finc -I. $cppflags $cppminus <UU/$file'_c' | \
!       grep -v '<built-in>' | grep -v '<command line>' | \
          $sed \
            -e '1d' \
            -e '/^#.*<stdin>/d' \
*** gnu/perl.561/djgpp/djgppsed.sh.orig Wed Oct 16 12:49:56 2002
--- gnu/perl.561/djgpp/djgppsed.sh      Wed Oct 16 12:34:08 2002
*************** sed -e $SDBMX -e $SDBHASH t/lib/gdbm.t >
*** 41,47 ****
  sed -e $SDBMX -e $SDBHASH t/lib/sdbm.t >s; mv -f s t/lib/sdbm.t
  sed -e $SSTAT -e $STMP2 t/op/stat.t >s; mv -f s t/op/stat.t
  sed -e $SLIST x2p/Makefile.SH |tr -d '\r' >s; mv -f s x2p/Makefile.SH
! sed -e 's=^#define.\([A-Z]\+\)_EXP.*$=#define \1_EXP djgpp_pathexp("\1")=g' config_h.SH >s; mv -f s config_h.SH
  sed -e 's=:^/:={^([a-z]:)?[\\\\/]}=g' lib/termcap.pl >s; mv -f s lib/termcap.pl
  sed -e $SPACKLIST installman >s; mv -f s installman
  sed -e $SPACKLIST lib/ExtUtils/Installed.pm >s; mv -f s lib/ExtUtils/Installed.pm
--- 41,47 ----
  sed -e $SDBMX -e $SDBHASH t/lib/sdbm.t >s; mv -f s t/lib/sdbm.t
  sed -e $SSTAT -e $STMP2 t/op/stat.t >s; mv -f s t/op/stat.t
  sed -e $SLIST x2p/Makefile.SH |tr -d '\r' >s; mv -f s x2p/Makefile.SH
! #sed -e 's=^#define.\([A-Z]\+\)_EXP.*$=#define \1_EXP djgpp_pathexp("\1")=g' config_h.SH >s; mv -f s config_h.SH
  sed -e 's=:^/:={^([a-z]:)?[\\\\/]}=g' lib/termcap.pl >s; mv -f s lib/termcap.pl
  sed -e $SPACKLIST installman >s; mv -f s installman
  sed -e $SPACKLIST lib/ExtUtils/Installed.pm >s; mv -f s lib/ExtUtils/Installed.pm

- Raw text -


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