README.beos Notes about BeOS port
README.cygwin32 Notes about Cygwin32 port
README.dos Notes about dos/djgpp port
-README.hpux Notes about HP/UX port
+README.hpux Notes about HP-UX port
README.lexwarn Notes about lexical warnings
README.mint Notes about Atari MiNT port
README.mpeix Notes about MPE/iX port
=head1 NAME
-perlhpux - Perl version 5 on Hewlett-Packard Unix (HP-UX) systems
+README.hpux - Perl version 5 on Hewlett-Packard Unix (HP-UX) systems
=head1 DESCRIPTION
The most recent upgrade to the PA-RISC design, it added support for 64-bit
integer data.
-The following systems contain PA-RISC 2.0 chips:
+The following systems contain PA-RISC 2.0 chips (this is very likely to be
+out of date):
D270, D280, D370, D380, K250, K260, K370, K380, K450, K460, K570, K580,
T600, V2200
+A complete list of models at the time the OS was built is in the file
+/opt/langtools/lib/sched.models.
+The first column corresponds to the output of the "uname -m" command
+(without the leading "9000/").
+The second column is the PA-RISC version
+and the third column is the exact chip type used.
+
=head2 Portability Between PA-RISC Versions
An executable compiled on a PA-RISC 2.0 platform will not execute on a
PA-RISC 1.1 platform, even if they are running the same version of HP-UX.
If you are building Perl on a PA-RISC 2.0 platform and want that Perl to
-to also run on a PA-RISC 1.1, the compiler flag +DAportable should be used.
+to also run on a PA-RISC 1.1, the compiler flags +DAportable and +DS32
+should be used.
It is no longer possible to compile PA-RISC 1.0 executables on either the
-PA-RISC 1.1 and 2.0 platforms.
+PA-RISC 1.1 or 2.0 platforms.
=head2 Building Dynamic Extensions on HP-UX
=head2 Using Large Files with Perl
-Beginning with HP-UX version 10.10, files larger than 2GB (2^31) may be
+Beginning with HP-UX version 10.20, files larger than 2GB (2^31) may be
created and manipulated.
Three separate methods of doing this are available.
-The best method is to compile Perl using the -D_FILE_OFFSET_BITS=64
+Of these methods,
+the best method for Perl is to compile using the -D_FILE_OFFSET_BITS=64
compiler flag.
This causes Perl to be compiled using structures and functions in which
these are 64 bits wide, rather than 32 bits wide.
the first is that the seek and tell functions (both the builtin version
and the POSIX module's version) will not correctly
function for these large files
-(POSIX declared the offset arguments in seek and tell as being of type long).
+(the offset arguments in seek and tell are implemented as type long).
The second is that any extension which calls any file-manipulating C function
-will need to be recompiled.
+will need to be recompiled using the above-mentioned -D_FILE_OFFSET_BITS=64
+flag.
+The list of functions that will need to recompiled is:
+creat, fgetpos, fopen,
+freopen, fsetpos, fstat,
+fstatvfs, fstatvfsdev, ftruncate,
+ftw, lockf, lseek,
+lstat, mmap, nftw,
+open, prealloc, stat,
+statvfs, statvfsdev, tmpfile,
+truncate, getrlimit, setrlimit
=head2 Threaded Perl
On the brighter side, the large file problem goes away, as longs are now
64 bits wide.
+=head2 GDBM and Threads
+
+If you attempt to compile Perl with threads on an 11.X system and also link
+in the GDBM library, then Perl will immediately core dump when it starts up.
+The only workaround at this point is to relink the GDBM library under 11.X,
+then relink it into Perl.
+
+=head2 NFS filesystems and utime(2)
+
+If you are compiling Perl on a remotely-mounted NFS filesystem, the test
+io/fs.t may fail on test #18.
+This appears to be a bug in HP-UX and no fix is currently available.
+
=head1 AUTHOR
Jeff Okamoto <okamoto@corp.hp.com>
=head1 DATE
-Version 0.1: 1999/2/22
+Version 0.2: 1999/03/01
=cut
unless(@_ == 2 || @_ == 3);
my ($from,$to,$size) = @_;
- my $text_mode = defined($size) && $size < 0;
+ my $text_mode = defined($size) && (ref($size) eq 'CODE' || $size < 0);
my ($fromsize,$closefrom,$closeto);
local (*FROM, *TO);
local $/ = "\n";
my ($fline,$tline);
while (defined($fline = <FROM>)) {
- unless (defined($tline = <TO>) && $fline eq $tline) {
- goto fail_inner;
+ goto fail_inner unless defined($tline = <TO>);
+ if (ref $size) {
+ # $size contains ref to comparison function
+ goto fail_inner if &$size($fline, $tline);
+ } else {
+ goto fail_inner if $fline ne $tline;
}
}
goto fail_inner if defined($tline = <TO>);
*cmp = \&compare;
-# Using a negative buffer size puts compare into text_mode
-sub compare_text { compare(@_[0..1], -1) }
+sub compare_text {
+ my ($from,$to,$cmp) = @_;
+ croak("Usage: compare_text( file1, file2 [, cmp-function])")
+ unless @_ == 2 || @_ == 3;
+ croak("Third arg to compare_text() function must be a code reference")
+ if @_ == 3 && ref($cmp) ne 'CODE';
+
+ # Using a negative buffer size puts compare into text_mode too
+ $cmp = -1 unless defined $cmp;
+ compare($from, $to, $cmp);
+}
1;
exported from File::Compare only by request.
File::Compare::compare_text does a line by line comparison of the two
-files. It stops as soon as a difference is detected.
+files. It stops as soon as a difference is detected. compare_text()
+accepts an optional third argument: This must be a CODE reference to
+a line comparison function, which returns 0 when both lines are considered
+equal. For example:
+
+ compare_text($file1, $file2)
+
+is basically equivalent to
+
+ compare_text($file1, $file2, sub {$_[0] ne $_[1]} )
=head1 RETURN
prefer not to modify /usr/bin for some reason or another but harmful
because many scripts assume to find Perl in /usr/bin/perl.
-=head1 Configuration Changes
-
-You can use "Configure -Uinstallusrbinperl" which causes installperl
-to skip installing perl also as /usr/bin/perl. This is useful if you
-prefer not to modify /usr/bin for some reason or another but harmful
-because many scripts assume to find Perl in /usr/bin/perl.
-
=head1 BUGS
If you find what you think is a bug, you might check the headers of
$begun = "";
-# Unrolling [^-=A-Z>]|[A-Z](?!<)|[-=][\x00-\xFF] gives: // MRE pp 165.
-my $nonest = '(?:[^-=A-Z>]*(?:(?:[-=][\x00-\xFF]|[A-Z](?!<))[^-=A-Z>]*)*)';
+# Unrolling [^-=A-Z>]|[A-Z](?!<)|[-=](?![A-Z]<)[\x00-\xFF] gives: // MRE pp 165.
+my $nonest = '(?x) # Turn on /x mode.
+ (?: # Group
+ [^-=A-Z>]* # Anything that isn't a dash, equal sign or
+ # closing hook isn't special. Eat as much as
+ # we can.
+ (?: # Group.
+ (?: # Group.
+ [-=] # We want to recognize -> and =>.
+ (?![A-Z]<) # So, as long as it isn't followed by markup
+ [\x00-\xFF] # anything may follow - and =
+ |
+ [A-Z] # Capitals are fine too,
+ (?!<) # But not if they start markup.
+ ) # End of special sequences.
+ [^-=A-Z>]* # Followed by zero or more non-special chars.
+ )* # And we can repeat this as often as we can.
+ )'; # That's all folks.
while (<>) {
if ($cutting) {
$Math::BigFloat::div_scale = 40
&fsqrt
+0:0
--1:/^(?i:0|NaNQ?)$
--2:/^(?i:0|NaNQ?)$
--16:/^(?i:0|NaNQ?)$
--123.456:/^(?i:0|NaNQ?)$
+-1:/^(?i:0|\?|NaNQ?)$
+-2:/^(?i:0|\?|NaNQ?)$
+-16:/^(?i:0|\?|NaNQ?)$
+-123.456:/^(?i:0|\?|NaNQ?)$
+1:1.
+1.44:1.2
+2:1.41421356237309504880168872420969807857
if($pid = fork()) {
- $sock = $listen->accept();
+ $sock = $listen->accept() or die "accept failed: $!";
print "ok 2\n";
$sock->autoflush(1);