freebsd)
xxx="-Wl,-R$shrpdir"
;;
- linux|irix*)
+ linux|irix*|dec_osf)
xxx="-Wl,-rpath,$shrpdir"
;;
*)
esac
case "$xxx" in
'') ;;
- *) ccdlflags="$ccdlflags $xxx"
- cat <<EOM >&4
+ *)
+ # Only add $xxx if it isn't already in ccdlflags.
+ case " $ccdlflags " in
+ *" $xxx "*) ;;
+ *) ccdlflags="$ccdlflags $xxx"
+ cat <<EOM >&4
Adding $xxx to the flags
passed to $ld so that the perl executable will find the
installed shared $libperl.
EOM
+ ;;
+ esac
;;
esac
fi
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='?'
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 " "
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
DESCRIPTION
- Prerequisites
- Starting Perl programs under AmigaOS
+ - Shortcomings of Perl under AmigaOS
INSTALLATION
Accessing documentation
- Manpages
necessary, F<perl> 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
make test
-Some tests will fail. Here is which, and why:
-
-=over 8
-
-=item F<io/fs.t>, F<op/stat.t>, F<lib/*dbm.t>, F<lib/db-*.t>
-
-Check I<file system> operations. Failures result from the inability to
-emulate some Unixisms with the standard Amiga filesystem.
-
-=item F<io/pipe.t>, F<op/fork.t>, F<lib/filehand.t>, F<lib/open2.t>,
- F<lib/open3.t>, F<lib/io_pipe.t>, F<lib/io_sock.t>
+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<op/magic.t>
-
-The ixemul.library doesn't set the expected values for $0 and $^X.
-
-=back
+F<io/pipe.t>, F<op/fork.t>, F<lib/filehand.t>, F<lib/open2.t>, F<lib/open3.t>,
+F<lib/io_pipe.t>, F<lib/io_sock.t>
=head2 Installing the built perl
--- /dev/null
+# Spider Boardman <spider@Orb.Nashua.NH.US>
+$self->{LIBS} = [''];
# 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 <spider@Orb.Nashua.NH.US>
+# Fri Feb 21 14:50:31 EST 1997
+$self->{LIBS} = ['-ldbm'];
# 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'
# 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":
# 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
# 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 <math.h>
# 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
# 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
;;
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
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.
+# <spider@Orb.Nashua.NH.US>
+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. <jhi@iki.fi>
+
-# 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
#
#
unset _DEC_cc_style
+unset _DEC_uname_r
#
# History:
#
+# perl5.003_28:
+#
+# 22-Feb-1997 Jarkko Hietaniemi <jhi@iki.fi>
+#
+# * 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 <spider@Orb.Nashua.NH.US>
+#
+# * -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 <jhi@iki.fi>
&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;
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, '.');
$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";
}
}
+# 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";
#define PATCHLEVEL 3
-#define SUBVERSION 28
+#define SUBVERSION 90
/*
local_patches -- list of locally applied less-than-subversion patches.
-p9pvers = 5.003_08
+p9pvers = 5.003_90
=item Documentation Changes
-L<perldelta>, L<perllocale>, L<perltoot>, L<perlapio>, L<perldebug>,
-L<perlsec>
+L<perlbug>, L<perldelta>, L<perllocale>, L<perltoot>, L<perlapio>,
+L<perldebug>, L<perlsec>
=item New Diagnostics
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
=item Laundering and Detecting Tainted Data
+=item Switches On the "#!" Line
+
=item Cleaning Up Your Path
=item Security Bugs
=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
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";}
($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";}
unlink <Op.dbmx*>;
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) {
}
($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++;
}
($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++;
($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++;
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 ;
}
($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++;
}
}
($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++;
}
}
($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++;
}
}
($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++;
}
#!./perl
-# $RCSfile: magic.t,v $$Revision: 4.1 $$Date: 92/08/07 18:28:05 $
-
BEGIN {
$^W = 1;
$| = 1;
ok 18, $$ > 0, $$;
# $^X and $0
-if ($^O eq 'qnx') {
+if ($^O eq 'qnx' || $^O eq 'amigaos') {
chomp($wd = `pwd`);
}
else {
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`;
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 {
{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)