From: Perl 5 Porters Date: Fri, 21 Feb 1997 14:41:53 +0000 (+1200) Subject: [inseparable changes from match from perl5.003_28 to perl-5.003_90] X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b971f6e4f6780f32fa16abecd87989a37436a193;p=p5sagit%2Fp5-mst-13.2.git [inseparable changes from match from perl5.003_28 to perl-5.003_90] BUILD PROCESS Subject: Re: ccdlflags don't quite work Date: Mon, 24 Feb 1997 16:07:07 -0500 (EST) From: Andy Dougherty Files: Configure Msg-ID: Files: Configure Subject: 'installperl -v' doesn't do enough Date: Mon, 24 Feb 1997 08:42:59 -0500 From: Spider Boardman Files: installperl Msg-ID: <199702241342.IAA25945@Orb.Nashua.NH.US> (applied based on p5p patch as commit 7287d43f85a3731984c0e0ef1f20e1515b4140f2) Subject: installperl breaks running system (for a while) Date: Mon, 24 Feb 1997 09:12:11 -0500 From: Spider Boardman Files: installperl Msg-ID: <199702241412.JAA11829@Orb.Nashua.NH.US> (applied based on p5p patch as commit ec2a3d87ba26a9586ad981051a949403027c147a) CORE PORTABILITY Subject: Digital UNIX and 3_28 Date: Sun, 23 Feb 1997 16:27:19 +0200 (EET) From: Jarkko Hietaniemi Files: Configure MANIFEST ext/NDBM_File/hints/dec_osf.pl ext/ODBM_File/hints/dec_osf.pl hints/dec_osf.sh Msg-ID: <199702231427.QAA13807@alpha.hut.fi> (applied based on p5p patch as commit 58c0852f6968d0b4520a03e22a56226185ab78c6) Subject: AmigaOS patches to 5.003_28 Date: Sat, 22 Feb 1997 18:08:02 +0100 From: "Norbert Pueschel" Files: README.amiga hints/amigaos.sh t/io/fs.t t/lib/anydbm.t t/lib/db-btree.t t/lib/db-hash.t t/lib/db-recno.t t/lib/gdbm.t t/lib/ndbm.t t/lib/odbm.t t/lib/sdbm.t t/op/magic.t t/op/stat.t Msg-ID: <77724759@Armageddon.meb.uni-bonn.de> (applied based on p5p patch as commit b8e6d11c134e93a7795379ceb62b7f950607c667) TESTS Subject: Don't use <*> where readdir() will do From: Chip Salzenberg Files: t/op/stat.t Subject: Allow for $^X to be 'miniperl' Date: Sun, 23 Feb 1997 16:22:45 +0100 From: Dominic Dunlop Files: t/op/magic.t private-msgid: --- diff --git a/Configure b/Configure index 72c1a39..a6e202c 100755 --- a/Configure +++ b/Configure @@ -4718,7 +4718,7 @@ if "$useshrplib"; then freebsd) xxx="-Wl,-R$shrpdir" ;; - linux|irix*) + linux|irix*|dec_osf) xxx="-Wl,-rpath,$shrpdir" ;; *) @@ -4727,14 +4727,20 @@ if "$useshrplib"; then esac case "$xxx" in '') ;; - *) ccdlflags="$ccdlflags $xxx" - cat <&4 + *) + # Only add $xxx if it isn't already in ccdlflags. + case " $ccdlflags " in + *" $xxx "*) ;; + *) ccdlflags="$ccdlflags $xxx" + cat <&4 Adding $xxx to the flags passed to $ld so that the perl executable will find the installed shared $libperl. EOM + ;; + esac ;; esac fi @@ -8569,7 +8575,7 @@ main() printf("%d\n",i); } EOCP - if $cc try.c -o try >/dev/null 2>&1 ; then + if $cc $ccflags $ldflags -o try try.c $libs >/dev/null 2>&1 ; then dflt=`try` else dflt='?' @@ -8583,7 +8589,7 @@ esac rp='How many bits does your rand() function produce?' . ./myread randbits="$ans" -$rm -f try.c try +$rm -f try.c try.o try : see if ar generates random libraries by itself echo " " diff --git a/MANIFEST b/MANIFEST index 7a79d90..29657cb 100644 --- a/MANIFEST +++ b/MANIFEST @@ -120,6 +120,7 @@ ext/IO/lib/IO/Socket.pm IO::Socket extension Perl module ext/NDBM_File/Makefile.PL NDBM extension makefile writer ext/NDBM_File/NDBM_File.pm NDBM extension Perl module ext/NDBM_File/NDBM_File.xs NDBM extension external subroutines +ext/NDBM_File/hints/dec_osf.pl Hint for NDBM_File for named architecture ext/NDBM_File/hints/dynixptx.pl Hint for NDBM_File for named architecture ext/NDBM_File/hints/solaris.pl Hint for NDBM_File for named architecture ext/NDBM_File/hints/svr4.pl Hint for NDBM_File for named architecture diff --git a/README.amiga b/README.amiga index 110f9cf..e4d4071 100644 --- a/README.amiga +++ b/README.amiga @@ -27,6 +27,7 @@ Contents DESCRIPTION - Prerequisites - Starting Perl programs under AmigaOS + - Shortcomings of Perl under AmigaOS INSTALLATION Accessing documentation - Manpages @@ -94,6 +95,24 @@ of your scripts. Then you can invoke your scripts like under UNIX with necessary, F would be enough, but having full path would make it easier to use your script under *nix.) +=head2 Shortcomings of Perl under AmigaOS + +Perl under AmigaOS lacks some features of perl under UNIX because of +deficiencies in the UNIX-emulation, most notably: + +=over 6 + +=item fork() + +=item some features of the UNIX filesystem regarding link count and file dates + +=item inplace operation (the -i switch) without backup file + +=item umask() works, but the correct permissions are only set when the file is + finally close()d + +=back + =head1 INSTALLATION Change to the installation directory (most probably ADE:), and @@ -199,26 +218,10 @@ Now run make test -Some tests will fail. Here is which, and why: - -=over 8 - -=item F, F, F, F - -Check I operations. Failures result from the inability to -emulate some Unixisms with the standard Amiga filesystem. - -=item F, F, F, F, - F, F, F +Some tests will be skipped because they need the fork() function: -These tests will be skipped because they use the fork() function, which is not -supported under AmigaOS. - -=item F - -The ixemul.library doesn't set the expected values for $0 and $^X. - -=back +F, F, F, F, F, +F, F =head2 Installing the built perl diff --git a/ext/NDBM_File/hints/dec_osf.pl b/ext/NDBM_File/hints/dec_osf.pl new file mode 100644 index 0000000..e96d907 --- /dev/null +++ b/ext/NDBM_File/hints/dec_osf.pl @@ -0,0 +1,2 @@ +# Spider Boardman +$self->{LIBS} = ['']; diff --git a/ext/ODBM_File/hints/dec_osf.pl b/ext/ODBM_File/hints/dec_osf.pl index f041bf9..febb7cd 100644 --- a/ext/ODBM_File/hints/dec_osf.pl +++ b/ext/ODBM_File/hints/dec_osf.pl @@ -3,3 +3,7 @@ # Sat Jan 13 16:29:52 EST 1996 $self->{LDDLFLAGS} = $Config{lddlflags}; $self->{LDDLFLAGS} =~ s/-hidden//; +# As long as we're hinting, note the known location of the dbm routines. +# Spider Boardman +# Fri Feb 21 14:50:31 EST 1997 +$self->{LIBS} = ['-ldbm']; diff --git a/hints/amigaos.sh b/hints/amigaos.sh index 5f10e11..57c7b62 100644 --- a/hints/amigaos.sh +++ b/hints/amigaos.sh @@ -49,6 +49,17 @@ optimize='-O2 -fomit-frame-pointer' # ccdlflags='none' # lddlflags='-oformat a.out-amiga -r' +# When AmigaOS runs a script with "#!", it sets argv[0] to the script name. +toke_cflags='ccflags="$ccflags -DARG_ZERO_IS_SCRIPT"' + # Avoid telldir prototype conflict in pp_sys.c (AmigaOS uses const DIR *) # Configure should test for this. Volunteers? pp_sys_cflags='ccflags="$ccflags -DHAS_TELLDIR_PROTOTYPE"' + +# AmigaOS always reports only two links to directories, even if they +# contain subdirectories. Consequently, we use this variable to stop +# File::Find using the link count to determine whether there are +# subdirectories to be searched. This will generate a harmless message: +# Hmm...You had some extra variables I don't know about...I'll try to keep 'em. +# Propagating recommended variable dont_use_nlink +dont_use_nlink='define' diff --git a/hints/dec_osf.sh b/hints/dec_osf.sh index 6bde1b4..d50c4c6 100644 --- a/hints/dec_osf.sh +++ b/hints/dec_osf.sh @@ -1,9 +1,6 @@ # hints/dec_osf.sh -# -# How to make a DEBUGGING VERSION of perl for DECs cc compiler -# -# If you want to debug perl or want to send a +# * If you want to debug perl or want to send a # stack trace for inclusion into an bug report, call # Configure with the additional argument -Doptimize=-g2 # or uncomment this assignment to "optimize": @@ -13,19 +10,19 @@ # If you want both to optimise and debug with the DEC cc # you must have -g3, e.g. "-O4 -g3", and (re)run Configure. # -# Note 1: gcc can always have both -g and optimisation on. +# * gcc can always have both -g and optimisation on. # -# Note 2: debugging optimised code, no matter what compiler +# * debugging optimised code, no matter what compiler # one is using, can be surprising and confusing because of # the optimisation tricks like code motion, code removal, # loop unrolling, and inlining. The source code and the # executable code simply do not agree any more while in # mid-execution, the optimiser only cares about the results. # -# Note 3: Configure will automatically add the often quoted +# * Configure will automatically add the often quoted # -DDEBUGGING for you if the -g is specified. # -# Note 4: There is even more optimisation available in the new +# * There is even more optimisation available in the new # (GEM) DEC cc: -O5 and -fast. "man cc" will tell more about them. # The jury is still out whether either or neither help for Perl # and how much. Based on very quick testing, -fast boosts @@ -34,7 +31,7 @@ # hand searching things (index, m//, s///), seems to get slower. # Your mileage will vary. # -# Note 5: The -std is needed because the following compiled +# * The -std is needed because the following compiled # without the -std and linked with -lm # # #include @@ -45,6 +42,14 @@ # UNIX 4.0{,a} dump core: Floating point exception in the printf(), # the y has become a signaling NaN. # +# * Compilation warnings like: +# +# "Undefined the ANSI standard macro ..." +# +# can be ignored, at least while compiling the POSIX extension +# and especially if using the sfio (the latter is not a standard +# part of Perl, never mind if it says little to you). +# # If using the DEC compiler we must find out the DEC compiler style: # the style changed between Digital UNIX (aka DEC OSF/1) 3 and @@ -53,8 +58,13 @@ # and it is called GEM. Many of the options we are going to use depend # on the compiler style. -# do NOT, I repeat, *NOT* take away that leading tab +# do NOT, I repeat, *NOT* take away those leading tabs + # reset + _DEC_uname_r= _DEC_cc_style= + # set + _DEC_uname_r=`uname -r` + # _DEC_cc_style set soon below # Configure Black Magic (TM) case "$cc" in @@ -74,6 +84,17 @@ case "$cc" in ;; esac +# be nauseatingly ANSI +case "$cc" in +gcc) ccflags="$ccflags -ansi" + ;; +*) ccflags="$ccflags -std" + ;; +esac + +# for gcc the Configure knows about the -fpic: +# position-independent code for dynamic loading + # we want optimisation case "$optimize" in @@ -84,48 +105,60 @@ case "$optimize" in new) optimize='-O4' ;; old) optimize='-O2 -Olimit 3200' ;; esac + ccflags="$ccflags -D_INTRINSICS" ;; esac ;; esac -# all compilers are ANSI -ccflags="$ccflags -DSTANDARD_C" - -# be nauseatingly ANSI -case "$cc" in -gcc) ccflags="$ccflags -ansi" - ;; -*) ccflags="$ccflags -std" - ;; -esac - # dlopen() is in libc libswanted="`echo $libswanted | sed -e 's/ dl / /'`" -# PW contains nothing useful for perl +# libPW contains nothing useful for perl libswanted="`echo $libswanted | sed -e 's/ PW / /'`" -# bsd contains nothing used by perl that is not already in libc +# libbsd contains nothing used by perl that is not already in libc libswanted="`echo $libswanted | sed -e 's/ bsd / /'`" -# c need not be separately listed +# libc need not be separately listed libswanted="`echo $libswanted | sed -e 's/ c / /'`" -# dbm is already in libc (as is ndbm) -libswanted="`echo $libswanted | sed -e 's/ dbm / /'`" +# ndbm is already in libc +libswanted="`echo $libswanted | sed -e 's/ ndbm / /'`" # the basic lddlflags used always lddlflags='-shared -expect_unresolved "*"' -# Check if it's a CMW version of OSF1, -# if so, do not hide the symbols. -test `uname -s` = "MLS+" || lddlflags="$lddlflags -hidden" +# Fancy compiler suites use optimising linker as well as compiler. +# +case "$_DEC_uname_r" in +*[123].*) # old loader + lddlflags="$lddlflags -O3" + ;; +*) lddlflags="$lddlflags $optimize -msym" + # -msym: If using a sufficiently recent /sbin/loader, + # keep the module symbols with the modules. + ;; +esac +# Yes, the above loses if gcc does not use the system linker. +# If that happens, let me know about it. + -# If debugging (-g) do not strip the objects, otherwise, strip. +# If debugging or (old systems and doing shared) +# then do not strip the lib, otherwise, strip. +# As noted above the -DDEBUGGING is added automagically by Configure if -g. case "$optimize" in *-g*) ;; # left intentionally blank +*) case "$_DEC_uname_r" in + *[123].*) + case "$useshrplib" in + false|undef|'') lddlflags="$lddlflags -s" ;; + esac + ;; *) lddlflags="$lddlflags -s" + ;; + esac + ;; esac # @@ -133,10 +166,37 @@ esac # unset _DEC_cc_style +unset _DEC_uname_r # # History: # +# perl5.003_28: +# +# 22-Feb-1997 Jarkko Hietaniemi +# +# * Restructuring Spider's suggestions. +# +# * Older Digital UNIXes cannot handle -Olimit ... for $lddlflags. +# +# * ld -s cannot be used in older Digital UNIXes when doing shared. +# +# +# 21-Feb-1997 Spider Boardman +# +# * -hidden removed. +# +# * -DSTANDARD_C removed. +# +# * -D_INTRINSICS added. (that -fast does not seem to buy much confirmed) +# +# * odbm not in libc, only ndbm. Therefore dbm back to $libswanted. +# +# * -msym for the newer runtime loaders. +# +# * $optimize also in $lddflags. +# +# # perl5.003_27: # # 18-Feb-1997 Jarkko Hietaniemi diff --git a/installperl b/installperl index d4cb711..1267f49 100755 --- a/installperl +++ b/installperl @@ -90,54 +90,6 @@ if ($d_dosuid) { &chmod(04711, "$installbin/sperl$ver$exe_ext"); } -exit 0 if $versiononly; - -# Make links to ordinary names if installbin directory isn't current directory. - -if (! &samepath($installbin, '.')) { - &safe_unlink("$installbin/perl$exe_ext", "$installbin/suidperl$exe_ext"); - &link("$installbin/perl$ver$exe_ext", "$installbin/perl$exe_ext"); - &link("$installbin/sperl$ver$exe_ext", "$installbin/suidperl$exe_ext") - if $d_dosuid; -} - -if (! &samepath($installbin, 'x2p')) { - &safe_unlink("$installbin/a2p$exe_ext"); - &cmd("cp x2p/a2p$exe_ext $installbin/a2p$exe_ext"); - &chmod(0755, "$installbin/a2p$exe_ext"); -} - -# cppstdin is just a script, but it is architecture-dependent, so -# it can't safely be shared. Place it in $installbin. -# Note that Configure doesn't build cppstin if it isn't needed, so -# we skip this if cppstdin doesn't exist. -if ((-f cppstdin) && (! &samepath($installbin, '.'))) { - &safe_unlink("$installbin/cppstdin"); - &cmd("cp cppstdin $installbin/cppstdin"); - &chmod(0755, "$installbin/cppstdin"); -} - -# Install scripts. - -mkpath($installscript, 1, 0777); - -for (@scripts) { - &cmd("cp $_ $installscript"); - s#.*/##; &chmod(0755, "$installscript/$_"); -} - -# pstruct should be a link to c2ph - -&safe_unlink("$installscript/pstruct"); -&link("$installscript/c2ph","$installscript/pstruct"); - -# Install pod pages. Where? I guess in $installprivlib/pod. -mkpath("${installprivlib}/pod", 1, 0777); -foreach $file (@pods) { - # $file is a name like pod/perl.pod - cp_if_diff($file, "${installprivlib}/${file}"); -} - # Install library files. $do_installarchlib = $do_installprivlib = 0; @@ -150,6 +102,7 @@ mkpath($installsitearch, 1, 0777) if ($installsitearch); if (chdir "lib") { $do_installarchlib = ! &samepath($installarchlib, '.'); $do_installprivlib = ! &samepath($installprivlib, '.'); + $do_installprivlib = 0 if $versiononly && !($installprivlib =~ m/\Q$]/); if ($do_installarchlib || $do_installprivlib) { find(\&installlib, '.'); @@ -179,7 +132,7 @@ foreach $file (@corefiles) { $mainperl_is_instperl = 0; -if (!$nonono && -t STDIN && -t STDERR +if (!$versiononly && !$nonono && -t STDIN && -t STDERR && -w $mainperldir && ! &samepath($mainperldir, $installbin)) { local($usrbinperl) = "$mainperldir/perl$exe_ext"; local($instperl) = "$installbin/perl$exe_ext"; @@ -210,32 +163,89 @@ if (!$nonono && -t STDIN && -t STDERR } } +# Make links to ordinary names if installbin directory isn't current directory. + +if (! $versiononly && ! &samepath($installbin, '.')) { + &safe_unlink("$installbin/perl$exe_ext", "$installbin/suidperl$exe_ext"); + &link("$installbin/perl$ver$exe_ext", "$installbin/perl$exe_ext"); + &link("$installbin/sperl$ver$exe_ext", "$installbin/suidperl$exe_ext") + if $d_dosuid; +} + +if (!$versiononly && ! &samepath($installbin, 'x2p')) { + &safe_unlink("$installbin/a2p$exe_ext"); + &cmd("cp x2p/a2p$exe_ext $installbin/a2p$exe_ext"); + &chmod(0755, "$installbin/a2p$exe_ext"); +} + +# cppstdin is just a script, but it is architecture-dependent, so +# it can't safely be shared. Place it in $installbin. +# Note that Configure doesn't build cppstin if it isn't needed, so +# we skip this if cppstdin doesn't exist. +if (! $versiononly && (-f cppstdin) && (! &samepath($installbin, '.'))) { + &safe_unlink("$installbin/cppstdin"); + &cmd("cp cppstdin $installbin/cppstdin"); + &chmod(0755, "$installbin/cppstdin"); +} + +# Install scripts. + +mkpath($installscript, 1, 0777); + +if (! $versiononly) { + for (@scripts) { + &cmd("cp $_ $installscript"); + s#.*/##; &chmod(0755, "$installscript/$_"); + } +} + +# pstruct should be a link to c2ph + +if (! $versiononly) { + &safe_unlink("$installscript/pstruct"); + &link("$installscript/c2ph","$installscript/pstruct"); +} + +# Install pod pages. Where? I guess in $installprivlib/pod. + +if (! $versiononly && !($installprivlib =~ m/\Q$]/)) { + mkpath("${installprivlib}/pod", 1, 0777); + foreach $file (@pods) { + # $file is a name like pod/perl.pod + cp_if_diff($file, "${installprivlib}/${file}"); + } +} + # Check to make sure there aren't other perls around in installer's # path. This is probably UNIX-specific. Check all absolute directories # in the path except for where public executables are supposed to live. # Also skip $mainperl if the user opted to have it be a link to the # installed perl. -$dirsep = ($^O eq 'os2') ? ';' : ':' ; -($path = $ENV{"PATH"}) =~ s:\\:/:g ; -@path = split(/$dirsep/, $path); -@otherperls = (); -for (@path) { - next unless m,^/,; - next if ($_ eq $binexp); - # Use &samepath here because some systems have other dirs linked - # to $mainperldir (like SunOS) - next if ($mainperl_is_instperl && &samepath($_, $mainperldir)); - push(@otherperls, "$_/perl$exe_ext") - if (-x "$_/perl$exe_ext" && ! -d "$_/perl$exe_ext"); -} -if (@otherperls) { - print STDERR "\nWarning: perl appears in your path in the following " . - "locations beyond where\nwe just installed it:\n"; - for (@otherperls) { - print STDERR " ", $_, "\n"; +if (!$versiononly) { + + $dirsep = ($^O eq 'os2') ? ';' : ':' ; + ($path = $ENV{"PATH"}) =~ s:\\:/:g ; + @path = split(/$dirsep/, $path); + @otherperls = (); + for (@path) { + next unless m,^/,; + # Use &samepath here because some systems have other dirs linked + # to $mainperldir (like SunOS) + next if &samepath($_, $binexp); + next if ($mainperl_is_instperl && &samepath($_, $mainperldir)); + push(@otherperls, "$_/perl$exe_ext") + if (-x "$_/perl$exe_ext" && ! -d "$_/perl$exe_ext"); + } + if (@otherperls) { + print STDERR "\nWarning: perl appears in your path in the following " . + "locations beyond where\nwe just installed it:\n"; + for (@otherperls) { + print STDERR " ", $_, "\n"; + } + print STDERR "\n"; } - print STDERR "\n"; + } print STDERR " Installation complete\n"; diff --git a/patchlevel.h b/patchlevel.h index 0314619..47ca5dd 100644 --- a/patchlevel.h +++ b/patchlevel.h @@ -1,5 +1,5 @@ #define PATCHLEVEL 3 -#define SUBVERSION 28 +#define SUBVERSION 90 /* local_patches -- list of locally applied less-than-subversion patches. diff --git a/plan9/buildinfo b/plan9/buildinfo index 4fcbae6..4d4407e 100644 --- a/plan9/buildinfo +++ b/plan9/buildinfo @@ -1 +1 @@ -p9pvers = 5.003_08 +p9pvers = 5.003_90 diff --git a/pod/perltoc.pod b/pod/perltoc.pod index 992cd2c..01a03f3 100644 --- a/pod/perltoc.pod +++ b/pod/perltoc.pod @@ -130,8 +130,8 @@ C and C =item Documentation Changes -L, L, L, L, L, -L +L, L, L, L, L, +L, L =item New Diagnostics @@ -400,19 +400,20 @@ SOCKET1,SOCKET2,DOMAIN,TYPE,PROTOCOL, sort SUBNAME LIST, sort BLOCK LIST, sort LIST, splice ARRAY,OFFSET,LENGTH,LIST, splice ARRAY,OFFSET,LENGTH, splice ARRAY,OFFSET, split /PATTERN/,EXPR,LIMIT, split /PATTERN/,EXPR, split /PATTERN/, split, sprintf FORMAT, LIST, sqrt EXPR, sqrt, srand EXPR, -stat FILEHANDLE, stat EXPR, stat, study SCALAR, study, sub BLOCK, sub NAME, -sub NAME BLOCK, substr EXPR,OFFSET,LEN, substr EXPR,OFFSET, symlink -OLDFILE,NEWFILE, syscall LIST, sysopen FILEHANDLE,FILENAME,MODE, sysopen -FILEHANDLE,FILENAME,MODE,PERMS, sysread FILEHANDLE,SCALAR,LENGTH,OFFSET, -sysread FILEHANDLE,SCALAR,LENGTH, system LIST, syswrite -FILEHANDLE,SCALAR,LENGTH,OFFSET, syswrite FILEHANDLE,SCALAR,LENGTH, tell -FILEHANDLE, tell, telldir DIRHANDLE, tie VARIABLE,CLASSNAME,LIST, tied -VARIABLE, time, times, tr///, truncate FILEHANDLE,LENGTH, truncate -EXPR,LENGTH, uc EXPR, uc, ucfirst EXPR, ucfirst, umask EXPR, umask, undef -EXPR, undef, unlink LIST, unlink, unpack TEMPLATE,EXPR, untie VARIABLE, -unshift ARRAY,LIST, use Module LIST, use Module, use Module VERSION LIST, -use VERSION, utime LIST, values HASH, vec EXPR,OFFSET,BITS, wait, waitpid -PID,FLAGS, wantarray, warn LIST, write FILEHANDLE, write EXPR, write, y/// +srand, stat FILEHANDLE, stat EXPR, stat, study SCALAR, study, sub BLOCK, +sub NAME, sub NAME BLOCK, substr EXPR,OFFSET,LEN, substr EXPR,OFFSET, +symlink OLDFILE,NEWFILE, syscall LIST, sysopen FILEHANDLE,FILENAME,MODE, +sysopen FILEHANDLE,FILENAME,MODE,PERMS, sysread +FILEHANDLE,SCALAR,LENGTH,OFFSET, sysread FILEHANDLE,SCALAR,LENGTH, system +LIST, syswrite FILEHANDLE,SCALAR,LENGTH,OFFSET, syswrite +FILEHANDLE,SCALAR,LENGTH, tell FILEHANDLE, tell, telldir DIRHANDLE, tie +VARIABLE,CLASSNAME,LIST, tied VARIABLE, time, times, tr///, truncate +FILEHANDLE,LENGTH, truncate EXPR,LENGTH, uc EXPR, uc, ucfirst EXPR, +ucfirst, umask EXPR, umask, undef EXPR, undef, unlink LIST, unlink, unpack +TEMPLATE,EXPR, untie VARIABLE, unshift ARRAY,LIST, use Module LIST, use +Module, use Module VERSION LIST, use VERSION, utime LIST, values HASH, vec +EXPR,OFFSET,BITS, wait, waitpid PID,FLAGS, wantarray, warn LIST, write +FILEHANDLE, write EXPR, write, y/// =back @@ -1098,6 +1099,8 @@ Prompt, Multi-line commands, Stack backtrace, Listing, Frame listing =item Laundering and Detecting Tainted Data +=item Switches On the "#!" Line + =item Cleaning Up Your Path =item Security Bugs @@ -1163,7 +1166,8 @@ Regular Expression =item Subroutine, Signal, Sorting Traps -(Signals), (Sort Subroutine), warn() won't let you specify a filehandle +Subroutine calls provide lvalue context to arguments, (Signals), (Sort +Subroutine), warn() won't let you specify a filehandle =item OS Traps diff --git a/t/io/fs.t b/t/io/fs.t index ce4e56b..80575b1 100755 --- a/t/io/fs.t +++ b/t/io/fs.t @@ -36,7 +36,8 @@ if (eval {link('b','c')}) {print "ok 3\n";} else {print "not ok 3\n";} if ($Config{dont_use_nlink} || $nlink == 3) {print "ok 4\n";} else {print "not ok 4\n";} -if (($mode & 0777) == 0666) {print "ok 5\n";} else {print "not ok 5\n";} +if (($mode & 0777) == 0666 || $^O eq 'amigaos') + {print "ok 5\n";} else {print "not ok 5\n";} if ((chmod 0777,'a') == 1) {print "ok 6\n";} else {print "not ok 6\n";} @@ -70,7 +71,8 @@ if ($foo == 1) {print "ok 16\n";} else {print "not ok 16 $foo\n";} ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime, $blksize,$blocks) = stat('b'); if ($ino) {print "ok 17\n";} else {print "not ok 17\n";} -if (($atime == 500000000 && $mtime == 500000001) || $wd =~ m#/afs/#) +if (($atime == 500000000 && $mtime == 500000001) + || $wd =~ m#/afs/# || $^O eq 'amigaos') {print "ok 18\n";} else {print "not ok 18 $atime $mtime\n";} diff --git a/t/lib/anydbm.t b/t/lib/anydbm.t index 52ab22b..eeec2ca 100755 --- a/t/lib/anydbm.t +++ b/t/lib/anydbm.t @@ -15,7 +15,8 @@ print "1..12\n"; unlink ; umask(0); -print (tie(%h,AnyDBM_File,'Op.dbmx', O_RDWR|O_CREAT, 0640) ? "ok 1\n" : "not ok 1\n"); +print (tie(%h,AnyDBM_File,'Op.dbmx', O_RDWR|O_CREAT, 0640) + ? "ok 1\n" : "not ok 1\n"); $Dfile = "Op.dbmx.pag"; if (! -e $Dfile) { @@ -23,7 +24,8 @@ if (! -e $Dfile) { } ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime, $blksize,$blocks) = stat($Dfile); -print (($mode & 0777) == ($^O eq 'os2' ? 0666 : 0640) ? "ok 2\n" : "not ok 2\n"); +print (($mode & 0777) == ($^O eq 'os2' ? 0666 : 0640) || $^O eq 'amigaos' + ? "ok 2\n" : "not ok 2\n"); while (($key,$value) = each(%h)) { $i++; } diff --git a/t/lib/db-btree.t b/t/lib/db-btree.t index 0e2a7c3..10f5853 100755 --- a/t/lib/db-btree.t +++ b/t/lib/db-btree.t @@ -94,7 +94,7 @@ ok(19, $X = tie(%h, 'DB_File',$Dfile, O_RDWR|O_CREAT, 0640, $DB_BTREE )) ; ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime, $blksize,$blocks) = stat($Dfile); -ok(20, ($mode & 0777) == ($^O eq 'os2' ? 0666 : 0640) ); +ok(20, ($mode & 0777) == ($^O eq 'os2' ? 0666 : 0640) || $^O eq 'amigaos'); while (($key,$value) = each(%h)) { $i++; diff --git a/t/lib/db-hash.t b/t/lib/db-hash.t index 09c0ee2..9ebd060 100755 --- a/t/lib/db-hash.t +++ b/t/lib/db-hash.t @@ -72,7 +72,7 @@ ok(15, $X = tie(%h, 'DB_File',$Dfile, O_RDWR|O_CREAT, 0640, $DB_HASH ) ); ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime, $blksize,$blocks) = stat($Dfile); -ok(16, ($mode & 0777) == ($^O eq 'os2' ? 0666 : 0640) ); +ok(16, ($mode & 0777) == ($^O eq 'os2' ? 0666 : 0640) || $^O eq 'amigaos'); while (($key,$value) = each(%h)) { $i++; diff --git a/t/lib/db-recno.t b/t/lib/db-recno.t index 045ddd9..b5b4f94 100755 --- a/t/lib/db-recno.t +++ b/t/lib/db-recno.t @@ -93,7 +93,8 @@ my $X ; my @h ; ok(17, $X = tie @h, 'DB_File', $Dfile, O_RDWR|O_CREAT, 0640, $DB_RECNO ) ; -ok(18, ( (stat($Dfile))[2] & 0777) == ($^O eq 'os2' ? 0666 : 0640)) ; +ok(18, ((stat($Dfile))[2] & 0777) == ($^O eq 'os2' ? 0666 : 0640) + || $^O eq 'amigaos') ; #my $l = @h ; my $l = $X->length ; diff --git a/t/lib/gdbm.t b/t/lib/gdbm.t index 62bb936..6a2d5fa 100755 --- a/t/lib/gdbm.t +++ b/t/lib/gdbm.t @@ -26,7 +26,8 @@ if (! -e $Dfile) { } ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime, $blksize,$blocks) = stat($Dfile); -print (($mode & 0777) == ($^O eq 'os2' ? 0666 : 0640) ? "ok 2\n" : "not ok 2\n"); +print (($mode & 0777) == ($^O eq 'os2' ? 0666 : 0640) || $^O eq 'amigaos' + ? "ok 2\n" : "not ok 2\n"); while (($key,$value) = each(%h)) { $i++; } diff --git a/t/lib/ndbm.t b/t/lib/ndbm.t index 8e2ba81..48f64fe 100755 --- a/t/lib/ndbm.t +++ b/t/lib/ndbm.t @@ -29,7 +29,8 @@ if (! -e $Dfile) { } ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime, $blksize,$blocks) = stat($Dfile); -print (($mode & 0777) == ($^O eq 'os2' ? 0666 : 0640) ? "ok 2\n" : "not ok 2\n"); +print (($mode & 0777) == ($^O eq 'os2' ? 0666 : 0640) || $^O eq 'amigaos' + ? "ok 2\n" : "not ok 2\n"); while (($key,$value) = each(%h)) { $i++; } diff --git a/t/lib/odbm.t b/t/lib/odbm.t index 0c530d2..e83d0f9 100755 --- a/t/lib/odbm.t +++ b/t/lib/odbm.t @@ -29,7 +29,8 @@ if (! -e $Dfile) { } ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime, $blksize,$blocks) = stat($Dfile); -print (($mode & 0777) == ($^O eq 'os2' ? 0666 : 0640) ? "ok 2\n" : "not ok 2\n"); +print (($mode & 0777) == ($^O eq 'os2' ? 0666 : 0640) || $^O eq 'amigaos' + ? "ok 2\n" : "not ok 2\n"); while (($key,$value) = each(%h)) { $i++; } diff --git a/t/lib/sdbm.t b/t/lib/sdbm.t index 65419f9..b8e02ec 100755 --- a/t/lib/sdbm.t +++ b/t/lib/sdbm.t @@ -28,7 +28,8 @@ if (! -e $Dfile) { } ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime, $blksize,$blocks) = stat($Dfile); -print (($mode & 0777) == ($^O eq 'os2' ? 0666 : 0640) ? "ok 2\n" : "not ok 2\n"); +print (($mode & 0777) == ($^O eq 'os2' ? 0666 : 0640) || $^O eq 'amigaos' + ? "ok 2\n" : "not ok 2\n"); while (($key,$value) = each(%h)) { $i++; } diff --git a/t/op/magic.t b/t/op/magic.t index f3e6ba3..70f2bec 100755 --- a/t/op/magic.t +++ b/t/op/magic.t @@ -1,7 +1,5 @@ #!./perl -# $RCSfile: magic.t,v $$Revision: 4.1 $$Date: 92/08/07 18:28:05 $ - BEGIN { $^W = 1; $| = 1; @@ -97,7 +95,7 @@ ok 17, $@ eq "foo\n", $@; ok 18, $$ > 0, $$; # $^X and $0 -if ($^O eq 'qnx') { +if ($^O eq 'qnx' || $^O eq 'amigaos') { chomp($wd = `pwd`); } else { @@ -118,6 +116,7 @@ EOF ok 21, close(SCRIPT), $!; ok 22, chmod(0755, $script), $!; $_ = `$script`; +s{\bminiperl\b}{perl}; # so that test doesn't fail with miniperl s{is perl}{is $wd/perl}; # for systems where $^X is only a basename ok 23, $_ eq $s2, ":$_:!=:$s2:"; $_ = `$wd/perl $script`; diff --git a/t/op/stat.t b/t/op/stat.t index 0c9c025..f0fd9a0 100755 --- a/t/op/stat.t +++ b/t/op/stat.t @@ -40,7 +40,7 @@ sleep 2; if ($Config{dont_use_nlink} || $nlink == 2) {print "ok 3\n";} else {print "not ok 3\n";} -if (($mtime && $mtime != $ctime) || $cwd =~ m#/afs/#) { +if (($mtime && $mtime != $ctime) || $cwd =~ m#/afs/# || $^O eq 'amigaos') { print "ok 4\n"; } else { @@ -123,18 +123,21 @@ else {print "not ok 33\n";} if (! -b '.') {print "ok 34\n";} else {print "not ok 34\n";} +if ($^O eq 'amigaos') {print "ok 35\n"; goto tty_test;} + $cnt = $uid = 0; die "Can't run op/stat.t test 35 without pwd working" unless $cwd; ($bin) = grep {-d} qw(/bin /usr/bin) or print ("not ok 35\n"), goto tty_test; -chdir $bin || die "Can't cd to $bin: $!"; -while (defined($_ = <*>)) { +opendir BIN, $bin or die "Can't opendir $bin: $!"; +while (defined($_ = readdir BIN)) { + $_ = "$bin/$_"; $cnt++; $uid++ if -u; last if $uid && $uid < $cnt; } -chdir $cwd || die "Can't cd back to $cwd"; +closedir BIN; # I suppose this is going to fail somewhere... if ($uid > 0 && $uid < $cnt)