bug-libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Libtool Bourne shell portability bug


From: Michael Sokolov
Subject: Libtool Bourne shell portability bug
Date: Thu, 25 Jan 01 20:31:14 PST

Hi there,

The current multi-language libtool has a Bourne shell portability bug, i.e., it
doesn't work with the original Bourne shell. The bug is in the code that
handles --add-tag, so one won't hit it until he/she tries to build a non-C
library (I hit it on libstdc++-v3).

Specifically, the check for tagname containing only valid characters uses the
[!...] construct, which is not in Steve Bourne's original V7/Bourne shell,
hitting folks like me who use the original UNIX and accept no replacements.

Is this check really necessary? I couldn't think of a way to rewrite it
portably. How about removing it with the patch below?

-- 
Michael Sokolov
Public Service Agent
International Engineering and Science Task Force

1351 VINE AVE APT 27            Phone: +1-714-738-5409
FULLERTON CA 92833-4291 USA     (home office)

E-mail: address@hidden (ARPA TCP/SMTP)

P.S. I don't subscribe to the libtool lists (only the Sourceware and GCC ones),
so please Cc: me.

2001-01-25  Michael Sokolov  <address@hidden>

        * ltconfig.in: Remove the check for tagname containing only valid
        characters, it's non-portable.

Index: ltconfig.in
===================================================================
RCS file: /home/cvs/libtool/Attic/ltconfig.in,v
retrieving revision 1.246.2.40
diff -p -r1.246.2.40 ltconfig.in
*** ltconfig.in 2000/12/16 13:50:25     1.246.2.40
--- ltconfig.in 2001/01/26 04:02:28
*************** if test ! -f "$ltmain"; then
*** 421,434 ****
  fi
  
  if test -n "$tagname"; then
-   # Check whether tagname contains only valid characters
-   case "$tagname" in
-   *[!-_A-Za-z0-9,/]*)
-     echo "$progname: invalid tag name: $tagname" 1>&2
-     exit 1
-     ;;
-   esac
- 
    if grep "^### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$ofile" > /dev/null; 
then
      echo "$progname: tag name $tagname already exists" 1>&2
      exit 1
--- 421,426 ----



reply via email to

[Prev in Thread] Current Thread [Next in Thread]