develooper Front page | perl.perl5.porters | Postings from May 2002

[PATCH perl@16923] archname glitch on HP-UX/IA64

Thread Next
From:
Colin Watson
Date:
May 31, 2002 09:48
Subject:
[PATCH perl@16923] archname glitch on HP-UX/IA64
Message ID:
20020531163406.GA10401@zeus.com
Hi,

On an HP-UX B.11.20 IA64 box, 'perl -V:archname' prints the following:

  archname='IA64.ARCHREV_0	';

(That's a tab.)

hints/hpux.sh uses \t inside a sed bracket expression, which doesn't
appear to be portable. This is the line from <sys/unistd.h> that it's
looking at.

#  define CPU_IA64_ARCHREV_0	0x300 /* IA-64 archrev 0 */

This patch against bleadperl alters hints/hpux.sh to use [[:space:]]
instead, which works on all the HP-UX 10 and 11 machines to which I have
access.

--- hints/hpux.sh.orig	Mon May 27 18:41:50 2002
+++ hints/hpux.sh	Fri May 31 16:39:32 2002
@@ -18,8 +18,8 @@
     # up to date with new CPU/OS releases.
     xxcpu=`getconf CPU_VERSION`; # Get the number.
     xxcpu=`printf '0x%x' $xxcpu`; # convert to hex
-    archname=`sed -n -e "s/^#[ \t]*define[ \t]*CPU_//p" /usr/include/sys/unistd.h |
-	sed -n -e "s/[ \t]*$xxcpu[ \t].*//p" |
+    archname=`sed -n -e "s/^#[[:space:]]*define[[:space:]]*CPU_//p" /usr/include/sys/unistd.h |
+	sed -n -e "s/[[:space:]]*$xxcpu[[:space:]].*//p" |
 	sed -e s/_RISC/-RISC/ -e s/HP_// -e s/_/./ -e "s/[[:space:]]*//g"`;
 else
     # This system is running <= 9.x

Thanks,

-- 
Colin Watson, <colinw@zeus.com>                      Zeus Technology Ltd
Software Engineer                            Universally Serving the Net
Tel:+44(0)1223 525000  Fax:+44(0)1223 525100        http://www.zeus.com/
Zeus House, Cowley Road, Cambridge, CB4 0ZT, ENGLAND

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About