Skip to content

Commit f4dc174

Browse files
committed
Fix [perl #116523] Configure is confused by '=' in output from uname -a
Previously, Configure used to try to post-process the output of uname -a. This was to support Xenix, which gave output like this: sysname=XENIX nodename=whatever release=2.3.2 .. etc... Configure attempted to parse that output and build up a $myuname variable that resembled those generated on traditional Unix systems. More recently, a user reported uname -a output on a CVS checkout of NetBSD that also included information such as root=username@hostname:/dirname module=src branch=HEAD The Configure code misparsed that and ended up throwing most of it away. This patch takes the simplest approach and just skips the attempt to process the Xenix output. This is based on commit 05a827803ab3908a795df94f6ed3890e24a6df2 in the metaconfig repository.
1 parent 5567318 commit f4dc174

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Configure

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3101,9 +3101,13 @@ case "$config_sh" in
31013101
'')
31023102
myuname=`$uname -a 2>/dev/null`
31033103
$test -z "$myuname" && myuname=`hostname 2>/dev/null`
3104+
# Downcase everything to avoid ambiguity.
3105+
# Remove slashes and single quotes so we can use parts of this in
3106+
# directory and file names.
3107+
# Remove newlines so myuname is sane to use elsewhere.
31043108
# tr '[A-Z]' '[a-z]' would not work in EBCDIC
31053109
# because the A-Z/a-z are not consecutive.
3106-
myuname=`echo $myuname | $sed -e 's/^[^=]*=//' -e "s,['/],,g" | \
3110+
myuname=`echo $myuname | $sed -e "s,['/],,g" | \
31073111
./tr '[A-Z]' '[a-z]' | $tr $trnl ' '`
31083112
newmyuname="$myuname"
31093113
dflt=n

0 commit comments

Comments
 (0)