diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2000-03-22 21:37:03 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2000-03-22 21:37:03 +0000 |
commit | 0ffd25120eb79d9ca68376effe8727ca2f7b14aa (patch) | |
tree | 53a1bf6ac234d2386582b2dcbda541642e0dd39c | |
parent | fd63c35147e5b7f0287c214827e89f6b7dbfe164 (diff) | |
parent | c6c38f617234af7b4d0af7bcc5a40ca341bd2234 (diff) | |
download | perl-0ffd25120eb79d9ca68376effe8727ca2f7b14aa.tar.gz |
Integrate with Sarathy.
p4raw-id: //depot/cfgperl@5894
-rw-r--r-- | MAINTAIN | 1 | ||||
-rw-r--r-- | MANIFEST | 1 | ||||
-rw-r--r-- | README.machten | 110 | ||||
-rw-r--r-- | README.win32 | 15 | ||||
-rw-r--r-- | ext/DynaLoader/dlutils.c | 4 | ||||
-rw-r--r-- | ext/IO/lib/IO/File.pm | 3 | ||||
-rw-r--r-- | hints/machten.sh | 24 | ||||
-rw-r--r-- | pod/perl.pod | 1 | ||||
-rw-r--r-- | pod/perldelta.pod | 20 | ||||
-rw-r--r-- | pod/perlsyn.pod | 8 | ||||
-rwxr-xr-x | t/io/fs.t | 3 | ||||
-rw-r--r-- | win32/Makefile | 9 | ||||
-rw-r--r-- | win32/makefile.mk | 13 |
13 files changed, 194 insertions, 18 deletions
@@ -55,6 +55,7 @@ README.cygwin cygwin README.dos dos README.hpux hpux README.lexwarn lexwarn +README.machten machten README.mpeix mpeix README.os2 os2 README.os390 mvs @@ -40,6 +40,7 @@ README.dos Notes about dos/djgpp port README.epoc Notes about EPOC port README.hpux Notes about HP-UX port README.hurd Notes about GNU/Hurd port +README.machten Notes about Power MachTen port README.mint Notes about Atari MiNT port README.mpeix Notes about MPE/iX port README.os2 Notes about OS/2 port diff --git a/README.machten b/README.machten new file mode 100644 index 0000000000..99339df7f2 --- /dev/null +++ b/README.machten @@ -0,0 +1,110 @@ +If you read this file _as_is_, just ignore the funny characters you +see. It is written in the POD format (see pod/perlpod.pod) which is +specially designed to be readable as is. + +=head1 NAME + +README.machten - Perl version 5 on Power MachTen systems + +=head1 DESCRIPTION + +This document describes how to build Perl 5 on Power MachTen systems, +and discusses a few wrinkles in the implementation. + +=head2 Compiling Perl 5 on MachTen + +To compile perl under MachTen 4.1.4 (and probably earlier versions): + + ./Configure -de + make + make test + make install + +This builds and installs a statically-linked perl; MachTen's dynamic +linking facilities are not adequate to support Perl's use of +dynamically linked libraries. (See F<hints/machten.sh> for more +information.) + +You should have at least 32 megabytes of free memory on your +system before running the C<make> command. + +For much more information on building perl -- for example, on how to +change the default installation directory -- see F<INSTALL>. + +=head2 Failures during C<make test> + +=over 4 + +=item op/lexassign.t + +This test may fail when first run after building perl. It does not +fail subsequently. The cause is unknown. + +=item op/taint.t + +This test emits various complaints such as "Operation not permitted", +but passes. The cause is an incomplete implementation of System V +inter-process communication in MachTen 4.1.4. In versions prior to +4.1.4, the implementation was so incomplete that the hints file +disables its incorporation into perl; in 4.1.4, the facilities are +useable with care. + +=item pragma/warnings.t + +Test 257 fails due to a failure to warn about attempts to read from a +filehandle which is a duplicate of stdout when stdout is attached to a +pipe. The output of the test contains a block comment which discusses +a different failure, not applicable to MachTen. + +The root of the problem is that Machten does not assign a file type to +either end of a pipe (see L<stat>), resulting, among other things +in Perl's C<-p> test failing on file descriptors belonging to pipes. +As a result, perl becomes confused, and the test for reading from a +write-only file fails. I am reluctant to patch perl to get around +this, as it's clearly an OS bug (about which Tenon has been informed), +and limited in its effect on practical Perl programs. + +=back + +=head2 Using external modules + +If warnings are enabled with Perl's C<-w> command-line flag, you are +likely to see warnings when using external modules containing XS +(compiled) code: + + Subroutine DynaLoader::dl_error redefined at /usr/local/lib/perl5/5.6.0/powerpc-machten/DynaLoader.pm line 93. + +This is a harmless consequence of the static linking used for MachTen +perl. You can suppress the warnings by using the more modern +C<-Mwarnings> instead of the traditional C<-w>. (See L<perllexwarn>.) + +=head2 Building external modules + +To add an external module to perl, build in the normal way, which +is documented in L<ExtUtils::MakeMaker>, or which can be driven +automatically by the CPAN module (see L<CPAN>), which is part of the +standard distribution. If wou want to install a +module contains XS code (C or C++ source which compiles to object code +for linking with perl), you will have to replace your perl binary with +a new version containing the new statically-linked object module. The +build process tells you how to do this. + +There is a gotcha, however, which users usually encounter immediately +they respond to CPAN's invitation to C<install Bundle::CPAN>. When +installing a I<bundle> -- a group of modules which together achieve +some particular purpose, the installation process for later modules in +the bundle tends to assume that earlier modules have been fully +installed and are available for use. This is not true on a +statically-linked system for earlier modules which contain XS code. +As a result the installation of the bundle fails. The work-around is +not to install the bundle as a one-shot operation, but instead to see +what modules it contains, and install these one-at-a-time by hand in +the order given. + +=head1 AUTHOR + +Dominic Dunlop <domo@computer.org> + +=head1 DATE + +Version 1.0 2000-03-22 diff --git a/README.win32 b/README.win32 index bca4921c2f..ce798f95ab 100644 --- a/README.win32 +++ b/README.win32 @@ -191,12 +191,15 @@ sure you have done the previous steps correctly. =head2 Testing Type "dmake test" (or "nmake test"). This will run most of the tests from -the testsuite (many tests will be skipped, but no tests should typically -fail). +the testsuite (many tests will be skipped). -If some tests do fail, it may be because you are using a different command -shell than the native "cmd.exe", or because you are building from a path -that contains spaces. So don't do that. +No tests should typically fail when running Windows NT 4.0. Under Windows +2000, test 22 in lib/open3.t is known to fail (cause still unknown). Many +tests will fail under Windows 9x due to the inferior command shell. + +Some test failures may occur if you use a command shell other than the +native "cmd.exe", or if you are building from a path that contains +spaces. So don't do that. If you are running the tests from a emacs shell window, you may see failures in op/stat.t. Run "dmake test-notty" in that case. @@ -628,6 +631,6 @@ Support for fork() emulation was added in 5.6 (ActiveState Tool Corp). Win9x support was added in 5.6 (Benjamin Stuhl). -Last updated: 13 March 2000 +Last updated: 22 March 2000 =cut diff --git a/ext/DynaLoader/dlutils.c b/ext/DynaLoader/dlutils.c index 5c6bbea1ac..9d88f5fdad 100644 --- a/ext/DynaLoader/dlutils.c +++ b/ext/DynaLoader/dlutils.c @@ -21,7 +21,7 @@ static HV *dl_loaded_files = Nullhv; /* only needed on a few systems */ #ifdef DEBUGGING -static int dl_debug = 0; /* value copied from $DynaLoader::dl_error */ +static int dl_debug = 0; /* value copied from $DynaLoader::dl_debug */ #define DLDEBUG(level,code) if (dl_debug>=level) { code; } #else #define DLDEBUG(level,code) @@ -69,7 +69,9 @@ dl_generic_private_init(pTHXo) /* called by dl_*.xs dl_private_init() */ if (!dl_loaded_files) dl_loaded_files = newHV(); /* provide cache for dl_*.xs if needed */ #endif +#ifdef DL_UNLOAD_ALL_AT_EXIT call_atexit(&dl_unload_all_files, (void*)0); +#endif } diff --git a/ext/IO/lib/IO/File.pm b/ext/IO/lib/IO/File.pm index 819b4b18e8..569c2800f8 100644 --- a/ext/IO/lib/IO/File.pm +++ b/ext/IO/lib/IO/File.pm @@ -113,9 +113,8 @@ use IO::Seekable; use File::Spec; require Exporter; -require DynaLoader; -@ISA = qw(IO::Handle IO::Seekable Exporter DynaLoader); +@ISA = qw(IO::Handle IO::Seekable Exporter); $VERSION = "1.08"; diff --git a/hints/machten.sh b/hints/machten.sh index 5ad4dba557..b4409c1bf0 100644 --- a/hints/machten.sh +++ b/hints/machten.sh @@ -176,6 +176,30 @@ d_sem=${d_sem:-undef} d_shm=${d_shm:-undef} fi + +# As of MachTen 4.1.4 the msg* and shm* are in libc but unimplemented +# (an attempt to use them causes a runtime error) +# XXX Configure probe for really functional msg*() is needed XXX +# XXX Configure probe for really functional shm*() is needed XXX +if test "$d_msg" = ""; then + d_msgget=${d_msgget:-undef} + d_msgctl=${d_msgctl:-undef} + d_msgsnd=${d_msgsnd:-undef} + d_msgrcv=${d_msgrcv:-undef} + case "$d_msgget$d_msgsnd$d_msgctl$d_msgrcv" in + *"undef"*) d_msg="$undef" ;; + esac +fi +if test "$d_shm" = ""; then + d_shmat=${d_shmat:-undef} + d_shmdt=${d_shmdt:-undef} + d_shmget=${d_shmget:-undef} + d_shmctl=${d_shmctl:-undef} + case "$d_shmat$d_shmctl$d_shmdt$d_shmget" in + *"undef"*) d_shm="$undef" ;; + esac +fi + # Get rid of some extra libs which it takes Configure a tediously # long time never to find on MachTen, or which break perl set `echo X "$libswanted "|sed -e 's/ net / /' -e 's/ socket / /' \ diff --git a/pod/perl.pod b/pod/perl.pod index 221f7f4c23..59ca0e0368 100644 --- a/pod/perl.pod +++ b/pod/perl.pod @@ -85,6 +85,7 @@ sections: perlcygwin Perl notes for Cygwin perldos Perl notes for DOS perlhpux Perl notes for HP-UX + perlmachten Perl notes for Power MachTen perlos2 Perl notes for OS/2 perlos390 Perl notes for OS/390 perlvms Perl notes for VMS diff --git a/pod/perldelta.pod b/pod/perldelta.pod index df1e68d56e..400697b535 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -1484,6 +1484,16 @@ L<Devel::DProf> and L<dprofpp>. The Dumpvalue module provides screen dumps of Perl data. +=item DynaLoader + +DynaLoader now supports a dl_unload_file() function on platforms that +support unloading shared objects using dlclose(). + +Perl can also optionally arrange to unload all extension shared objects +loaded by Perl. To enable this, build Perl with the Configure option +C<-Accflags=-DDL_UNLOAD_ALL_AT_EXIT>. (This maybe useful if you are +using Apache with mod_perl.) + =item Benchmark Overall, Benchmark results exhibit lower average error and better timing @@ -1852,6 +1862,11 @@ pathname for FILENAME in scalar context. In list context it returns a two-element list containing the fully qualified directory name and the filename. See L<Win32>. +=item XSLoader + +The XSLoader extension is a simpler alternative to DynaLoader. +See L<XSLoader>. + =item DBM Filters A new feature called "DBM Filters" has been added to all the @@ -2721,6 +2736,11 @@ operation must be considered erroneous. For example: These expressions will get run-time errors in some future release of Perl. +=head2 Windows 2000 + +Windows 2000 is known to fail test 22 in lib/open3.t (cause unknown at +this time). That test passes under Windows NT. + =head2 Experimental features As discussed above, many features are still experimental. Interfaces and diff --git a/pod/perlsyn.pod b/pod/perlsyn.pod index 484af52121..724ba12ac0 100644 --- a/pod/perlsyn.pod +++ b/pod/perlsyn.pod @@ -324,7 +324,7 @@ Examples: for (@ary) { s/foo/bar/ } - foreach my $elem (@elements) { + for my $elem (@elements) { $elem *= 2; } @@ -353,8 +353,8 @@ Here's how a C programmer might code up a particular algorithm in Perl: Whereas here's how a Perl programmer more comfortable with the idiom might do it: - OUTER: foreach my $wid (@ary1) { - INNER: foreach my $jet (@ary2) { + OUTER: for my $wid (@ary1) { + INNER: for my $jet (@ary2) { next OUTER if $wid > $jet; $wid += $jet; } @@ -525,7 +525,7 @@ The C<goto>-EXPR form expects a label name, whose scope will be resolved dynamically. This allows for computed C<goto>s per FORTRAN, but isn't necessarily recommended if you're optimizing for maintainability: - goto ("FOO", "BAR", "GLARCH")[$i]; + goto(("FOO", "BAR", "GLARCH")[$i]); The C<goto>-&NAME form is highly magical, and substitutes a call to the named subroutine for the currently running subroutine. This is used by @@ -21,7 +21,7 @@ print "1..29\n"; $wd = (($^O eq 'MSWin32') ? `cd` : `pwd`); chop($wd); -if ($^O eq 'MSWin32') { `del tmp 2>nul`; `mkdir tmp`; } +if ($^O eq 'MSWin32') { `rmdir /s /q tmp 2>nul`; `mkdir tmp`; } else { `rm -f tmp 2>/dev/null; mkdir tmp 2>/dev/null`; } chdir './tmp'; `/bin/rm -rf a b c x` if -x '/bin/rm'; @@ -104,6 +104,7 @@ if (rename('a','b')) {print "ok 14\n";} else {print "not ok 14\n";} $blksize,$blocks) = stat('a'); if ($ino == 0) {print "ok 15\n";} else {print "not ok 15\n";} $delta = $Is_Dosish ? 2 : 1; # Granularity of time on the filesystem +chmod 0777, 'b'; $foo = (utime 500000000,500000000 + $delta,'b'); 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, diff --git a/win32/Makefile b/win32/Makefile index 82896e9781..f1aea7564b 100644 --- a/win32/Makefile +++ b/win32/Makefile @@ -2,7 +2,7 @@ # Makefile to build perl on Windows NT using Microsoft NMAKE. # # This is set up to build a perl.exe that runs off a shared library -# (perl.dll). Also makes individual DLLs for the XS extensions. +# (perl56.dll). Also makes individual DLLs for the XS extensions. # ## @@ -963,6 +963,13 @@ utils: $(PERLEXE) $(X2P) cd ..\utils $(MAKE) PERL=$(MINIPERL) cd ..\pod + copy ..\README.amiga .\perlamiga.pod + copy ..\README.cygwin .\perlcygwin.pod + copy ..\README.dos .\perldos.pod + copy ..\README.hpux .\perlhpux.pod + copy ..\README.machten .\perlmachten.pod + copy ..\README.os2 .\perlos2.pod + copy ..\vms\perlvms.pod .\perlvms.pod copy ..\README.win32 .\perlwin32.pod $(MAKE) -f ..\win32\pod.mak converters cd ..\win32 diff --git a/win32/makefile.mk b/win32/makefile.mk index e9565884e8..fdaeba39e5 100644 --- a/win32/makefile.mk +++ b/win32/makefile.mk @@ -6,7 +6,7 @@ # Mingw32 with gcc-2.95.2 or better **experimental** # # This is set up to build a perl.exe that runs off a shared library -# (perl.dll). Also makes individual DLLs for the XS extensions. +# (perl56.dll). Also makes individual DLLs for the XS extensions. # ## @@ -804,7 +804,7 @@ POD2TEXT = $(PODDIR)\pod2text # -- BKS 10-17-1999 CFG_VARS = \ INST_DRV=$(INST_DRV) ~ \ - INST_TOP=$(INST_TOP) ~ \ + INST_TOP=$(INST_TOP:s/\/\\/) ~ \ INST_VER=$(INST_VER:s/\/\\/) ~ \ INST_ARCH=$(INST_ARCH) ~ \ archname=$(ARCHNAME) ~ \ @@ -1182,7 +1182,14 @@ doc: $(PERLEXE) utils: $(PERLEXE) $(X2P) cd ..\utils && $(MAKE) PERL=$(MINIPERL) - copy ..\README.win32 ..\pod\perlwin32.pod + copy ..\README.amiga ..\pod\perlamiga.pod + copy ..\README.cygwin ..\pod\perlcygwin.pod + copy ..\README.dos ..\pod\perldos.pod + copy ..\README.hpux ..\pod\perlhpux.pod + copy ..\README.machten ..\pod\perlmachten.pod + copy ..\README.os2 ..\pod\perlos2.pod + copy ..\README.os2 ..\pod\perlos2.pod + copy ..\vms\perlvms.pod ..\pod\perlvms.pod cd ..\pod && $(MAKE) -f ..\win32\pod.mak converters $(PERLEXE) $(PL2BAT) $(UTILS) |