summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gnu/usr.bin/perl/Changes5.00416073
-rw-r--r--gnu/usr.bin/perl/Copying6
-rw-r--r--gnu/usr.bin/perl/Policy_sh.SH153
-rw-r--r--gnu/usr.bin/perl/Porting/Contract108
-rw-r--r--gnu/usr.bin/perl/Porting/config.sh585
-rw-r--r--gnu/usr.bin/perl/Porting/config_H2103
-rw-r--r--gnu/usr.bin/perl/Porting/findvars373
-rw-r--r--gnu/usr.bin/perl/Porting/fixCORE68
-rw-r--r--gnu/usr.bin/perl/Porting/fixvars69
-rw-r--r--gnu/usr.bin/perl/Porting/genlog118
-rw-r--r--gnu/usr.bin/perl/Porting/p4d2p84
-rw-r--r--gnu/usr.bin/perl/Porting/patching.pod325
-rw-r--r--gnu/usr.bin/perl/README.apollo11
-rw-r--r--gnu/usr.bin/perl/README.beos43
-rw-r--r--gnu/usr.bin/perl/README.dos276
-rw-r--r--gnu/usr.bin/perl/README.hpux226
-rw-r--r--gnu/usr.bin/perl/README.hurd40
-rw-r--r--gnu/usr.bin/perl/README.mint222
-rw-r--r--gnu/usr.bin/perl/README.mpeix260
-rw-r--r--gnu/usr.bin/perl/README.os390158
-rw-r--r--gnu/usr.bin/perl/README.threads289
-rw-r--r--gnu/usr.bin/perl/README.vos139
-rw-r--r--gnu/usr.bin/perl/Todo-5.00561
-rw-r--r--gnu/usr.bin/perl/XSlock.h38
-rw-r--r--gnu/usr.bin/perl/apollo/netinet/in.h8
-rw-r--r--gnu/usr.bin/perl/beos/nm.c53
-rw-r--r--gnu/usr.bin/perl/bytecode.h161
-rw-r--r--gnu/usr.bin/perl/bytecode.pl388
-rw-r--r--gnu/usr.bin/perl/byterun.c867
-rw-r--r--gnu/usr.bin/perl/byterun.h184
-rw-r--r--gnu/usr.bin/perl/cc_runtime.h71
-rw-r--r--gnu/usr.bin/perl/configure.com2033
-rw-r--r--gnu/usr.bin/perl/djgpp/config.over39
-rw-r--r--gnu/usr.bin/perl/djgpp/configure.bat37
-rw-r--r--gnu/usr.bin/perl/djgpp/djgpp.c436
-rw-r--r--gnu/usr.bin/perl/djgpp/djgppsed.sh49
-rw-r--r--gnu/usr.bin/perl/djgpp/fixpmain31
-rw-r--r--gnu/usr.bin/perl/ebcdic.c32
-rw-r--r--gnu/usr.bin/perl/eg/cgi/caution.xbm12
-rw-r--r--gnu/usr.bin/perl/eg/cgi/dna.small.gif.uu63
-rw-r--r--gnu/usr.bin/perl/eg/cgi/nph-multipart.cgi10
-rw-r--r--gnu/usr.bin/perl/emacs/ptags158
-rw-r--r--gnu/usr.bin/perl/embedvar.h895
-rw-r--r--gnu/usr.bin/perl/ext/B/B.pm831
-rw-r--r--gnu/usr.bin/perl/ext/B/B.xs1219
-rw-r--r--gnu/usr.bin/perl/ext/B/B/Asmdata.pm170
-rw-r--r--gnu/usr.bin/perl/ext/B/B/Assembler.pm229
-rw-r--r--gnu/usr.bin/perl/ext/B/B/Bblock.pm162
-rw-r--r--gnu/usr.bin/perl/ext/B/B/Bytecode.pm908
-rw-r--r--gnu/usr.bin/perl/ext/B/B/C.pm1378
-rw-r--r--gnu/usr.bin/perl/ext/B/B/CC.pm1749
-rw-r--r--gnu/usr.bin/perl/ext/B/B/Debug.pm283
-rw-r--r--gnu/usr.bin/perl/ext/B/B/Deparse.pm2670
-rw-r--r--gnu/usr.bin/perl/ext/B/B/Disassembler.pm164
-rw-r--r--gnu/usr.bin/perl/ext/B/B/Lint.pm367
-rw-r--r--gnu/usr.bin/perl/ext/B/B/Showlex.pm80
-rw-r--r--gnu/usr.bin/perl/ext/B/B/Stackobj.pm301
-rw-r--r--gnu/usr.bin/perl/ext/B/B/Terse.pm152
-rw-r--r--gnu/usr.bin/perl/ext/B/B/Xref.pm392
-rw-r--r--gnu/usr.bin/perl/ext/B/B/assemble30
-rw-r--r--gnu/usr.bin/perl/ext/B/B/cc_harness12
-rw-r--r--gnu/usr.bin/perl/ext/B/B/disassemble22
-rw-r--r--gnu/usr.bin/perl/ext/B/B/makeliblinks54
-rw-r--r--gnu/usr.bin/perl/ext/B/Makefile.PL46
-rw-r--r--gnu/usr.bin/perl/ext/B/NOTES168
-rw-r--r--gnu/usr.bin/perl/ext/B/O.pm85
-rw-r--r--gnu/usr.bin/perl/ext/B/README325
-rw-r--r--gnu/usr.bin/perl/ext/B/TESTS78
-rw-r--r--gnu/usr.bin/perl/ext/B/Todo37
-rw-r--r--gnu/usr.bin/perl/ext/B/byteperl.c110
-rw-r--r--gnu/usr.bin/perl/ext/B/ramblings/cc.notes32
-rw-r--r--gnu/usr.bin/perl/ext/B/ramblings/curcop.runtime39
-rw-r--r--gnu/usr.bin/perl/ext/B/ramblings/flip-flop51
-rw-r--r--gnu/usr.bin/perl/ext/B/ramblings/magic93
-rw-r--r--gnu/usr.bin/perl/ext/B/ramblings/reg.alloc32
-rw-r--r--gnu/usr.bin/perl/ext/B/ramblings/runtime.porting350
-rw-r--r--gnu/usr.bin/perl/ext/B/typemap69
-rw-r--r--gnu/usr.bin/perl/ext/DB_File/Changes234
-rw-r--r--gnu/usr.bin/perl/ext/DB_File/dbinfo96
-rw-r--r--gnu/usr.bin/perl/ext/DB_File/hints/dynixptx.pl3
-rw-r--r--gnu/usr.bin/perl/ext/Data/Dumper/Changes178
-rw-r--r--gnu/usr.bin/perl/ext/Data/Dumper/Dumper.pm1000
-rw-r--r--gnu/usr.bin/perl/ext/Data/Dumper/Dumper.xs861
-rw-r--r--gnu/usr.bin/perl/ext/Data/Dumper/Makefile.PL11
-rw-r--r--gnu/usr.bin/perl/ext/Data/Dumper/Todo34
-rw-r--r--gnu/usr.bin/perl/ext/DynaLoader/DynaLoader_pm.PL730
-rw-r--r--gnu/usr.bin/perl/ext/DynaLoader/dl_beos.xs115
-rw-r--r--gnu/usr.bin/perl/ext/DynaLoader/dl_mpeix.xs129
-rw-r--r--gnu/usr.bin/perl/ext/Errno/ChangeLog50
-rw-r--r--gnu/usr.bin/perl/ext/Errno/Errno_pm.PL316
-rw-r--r--gnu/usr.bin/perl/ext/Errno/Makefile.PL30
-rw-r--r--gnu/usr.bin/perl/ext/Fcntl/Makefile.PL2
-rw-r--r--gnu/usr.bin/perl/ext/GDBM_File/GDBM_File.xs7
-rw-r--r--gnu/usr.bin/perl/ext/GDBM_File/Makefile.PL2
-rw-r--r--gnu/usr.bin/perl/ext/GDBM_File/hints/sco.pl2
-rw-r--r--gnu/usr.bin/perl/ext/IPC/SysV/ChangeLog28
-rw-r--r--gnu/usr.bin/perl/ext/IPC/SysV/MANIFEST10
-rw-r--r--gnu/usr.bin/perl/ext/IPC/SysV/Makefile.PL37
-rw-r--r--gnu/usr.bin/perl/ext/IPC/SysV/Msg.pm223
-rw-r--r--gnu/usr.bin/perl/ext/IPC/SysV/README20
-rw-r--r--gnu/usr.bin/perl/ext/IPC/SysV/Semaphore.pm297
-rw-r--r--gnu/usr.bin/perl/ext/IPC/SysV/SysV.pm98
-rw-r--r--gnu/usr.bin/perl/ext/IPC/SysV/SysV.xs443
-rw-r--r--gnu/usr.bin/perl/ext/IPC/SysV/t/msg.t41
-rw-r--r--gnu/usr.bin/perl/ext/IPC/SysV/t/sem.t51
-rw-r--r--gnu/usr.bin/perl/ext/ODBM_File/Makefile.PL2
-rw-r--r--gnu/usr.bin/perl/ext/ODBM_File/typemap4
-rw-r--r--gnu/usr.bin/perl/ext/POSIX/Makefile.PL4
-rw-r--r--gnu/usr.bin/perl/ext/POSIX/hints/bsdos.pl3
-rw-r--r--gnu/usr.bin/perl/ext/POSIX/hints/dynixptx.pl4
-rw-r--r--gnu/usr.bin/perl/ext/POSIX/hints/freebsd.pl3
-rw-r--r--gnu/usr.bin/perl/ext/POSIX/hints/linux.pl5
-rw-r--r--gnu/usr.bin/perl/ext/POSIX/hints/mint.pl2
-rw-r--r--gnu/usr.bin/perl/ext/POSIX/hints/netbsd.pl3
-rw-r--r--gnu/usr.bin/perl/ext/POSIX/hints/openbsd.pl3
-rw-r--r--gnu/usr.bin/perl/ext/POSIX/hints/sunos_4.pl10
-rw-r--r--gnu/usr.bin/perl/ext/POSIX/typemap1
-rw-r--r--gnu/usr.bin/perl/ext/SDBM_File/sdbm/dba.c1
-rw-r--r--gnu/usr.bin/perl/ext/SDBM_File/sdbm/dbd.c1
-rw-r--r--gnu/usr.bin/perl/ext/SDBM_File/sdbm/dbu.c1
-rw-r--r--gnu/usr.bin/perl/ext/SDBM_File/sdbm/hash.c5
-rw-r--r--gnu/usr.bin/perl/ext/SDBM_File/sdbm/util.c7
-rw-r--r--gnu/usr.bin/perl/ext/Socket/Makefile.PL2
-rw-r--r--gnu/usr.bin/perl/ext/Thread/Makefile.PL7
-rw-r--r--gnu/usr.bin/perl/ext/Thread/Notes13
-rw-r--r--gnu/usr.bin/perl/ext/Thread/README20
-rw-r--r--gnu/usr.bin/perl/ext/Thread/Thread.pm185
-rw-r--r--gnu/usr.bin/perl/ext/Thread/Thread.xs662
-rw-r--r--gnu/usr.bin/perl/ext/Thread/Thread/Queue.pm99
-rw-r--r--gnu/usr.bin/perl/ext/Thread/Thread/Semaphore.pm87
-rw-r--r--gnu/usr.bin/perl/ext/Thread/Thread/Signal.pm50
-rw-r--r--gnu/usr.bin/perl/ext/Thread/Thread/Specific.pm29
-rw-r--r--gnu/usr.bin/perl/ext/Thread/create.t26
-rw-r--r--gnu/usr.bin/perl/ext/Thread/die.t16
-rw-r--r--gnu/usr.bin/perl/ext/Thread/die2.t16
-rw-r--r--gnu/usr.bin/perl/ext/Thread/io.t39
-rw-r--r--gnu/usr.bin/perl/ext/Thread/join.t11
-rw-r--r--gnu/usr.bin/perl/ext/Thread/join2.t12
-rw-r--r--gnu/usr.bin/perl/ext/Thread/list.t30
-rw-r--r--gnu/usr.bin/perl/ext/Thread/lock.t27
-rw-r--r--gnu/usr.bin/perl/ext/Thread/queue.t36
-rw-r--r--gnu/usr.bin/perl/ext/Thread/specific.t17
-rw-r--r--gnu/usr.bin/perl/ext/Thread/sync.t61
-rw-r--r--gnu/usr.bin/perl/ext/Thread/sync2.t69
-rw-r--r--gnu/usr.bin/perl/ext/Thread/typemap24
-rw-r--r--gnu/usr.bin/perl/ext/Thread/unsync.t37
-rw-r--r--gnu/usr.bin/perl/ext/Thread/unsync2.t36
-rw-r--r--gnu/usr.bin/perl/ext/Thread/unsync3.t50
-rw-r--r--gnu/usr.bin/perl/ext/Thread/unsync4.t38
-rw-r--r--gnu/usr.bin/perl/ext/attrs/Makefile.PL7
-rw-r--r--gnu/usr.bin/perl/ext/attrs/attrs.pm55
-rw-r--r--gnu/usr.bin/perl/ext/attrs/attrs.xs61
-rw-r--r--gnu/usr.bin/perl/ext/re/Makefile.PL41
-rw-r--r--gnu/usr.bin/perl/ext/re/hints/mpeix.pl3
-rw-r--r--gnu/usr.bin/perl/ext/re/re.pm131
-rw-r--r--gnu/usr.bin/perl/ext/re/re.xs46
-rw-r--r--gnu/usr.bin/perl/fakethr.h56
-rw-r--r--gnu/usr.bin/perl/globals.c1469
-rw-r--r--gnu/usr.bin/perl/hints/beos.sh53
-rw-r--r--gnu/usr.bin/perl/hints/dos_djgpp.sh65
-rw-r--r--gnu/usr.bin/perl/hints/gnu.sh33
-rw-r--r--gnu/usr.bin/perl/hints/isc_2.sh3
-rw-r--r--gnu/usr.bin/perl/hints/mint.sh94
-rw-r--r--gnu/usr.bin/perl/hints/openbsd.sh61
-rw-r--r--gnu/usr.bin/perl/hints/uwin.sh36
-rw-r--r--gnu/usr.bin/perl/intrpvar.h219
-rw-r--r--gnu/usr.bin/perl/iperlsys.h931
-rw-r--r--gnu/usr.bin/perl/lib/CGI/Cookie.pm419
-rw-r--r--gnu/usr.bin/perl/lib/Dumpvalue.pm600
-rw-r--r--gnu/usr.bin/perl/lib/ExtUtils/Installed.pm272
-rw-r--r--gnu/usr.bin/perl/lib/ExtUtils/Packlist.pm288
-rw-r--r--gnu/usr.bin/perl/lib/ExtUtils/inst139
-rw-r--r--gnu/usr.bin/perl/lib/Fatal.pm159
-rw-r--r--gnu/usr.bin/perl/lib/File/Spec.pm116
-rw-r--r--gnu/usr.bin/perl/lib/File/Spec/Mac.pm230
-rw-r--r--gnu/usr.bin/perl/lib/File/Spec/OS2.pm51
-rw-r--r--gnu/usr.bin/perl/lib/File/Spec/Unix.pm197
-rw-r--r--gnu/usr.bin/perl/lib/File/Spec/VMS.pm148
-rw-r--r--gnu/usr.bin/perl/lib/File/Spec/Win32.pm104
-rw-r--r--gnu/usr.bin/perl/lib/Test.pm249
-rw-r--r--gnu/usr.bin/perl/lib/Tie/Array.pm262
-rw-r--r--gnu/usr.bin/perl/lib/Tie/Handle.pm161
-rw-r--r--gnu/usr.bin/perl/lib/fields.pm156
-rw-r--r--gnu/usr.bin/perl/lib/integer.pm13
-rw-r--r--gnu/usr.bin/perl/mint/Makefile15
-rw-r--r--gnu/usr.bin/perl/mint/README14
-rw-r--r--gnu/usr.bin/perl/mint/errno.h32
-rw-r--r--gnu/usr.bin/perl/mint/pwd.c43
-rw-r--r--gnu/usr.bin/perl/mint/stdio.h21
-rw-r--r--gnu/usr.bin/perl/mint/sys/time.h2
-rw-r--r--gnu/usr.bin/perl/mint/time.h22
-rw-r--r--gnu/usr.bin/perl/mpeix/mpeixish.h139
-rw-r--r--gnu/usr.bin/perl/mpeix/nm33
-rw-r--r--gnu/usr.bin/perl/mpeix/relink8
-rw-r--r--gnu/usr.bin/perl/objXSUB.h2065
-rw-r--r--gnu/usr.bin/perl/objpp.h1473
-rw-r--r--gnu/usr.bin/perl/os2/os2.sym30
-rw-r--r--gnu/usr.bin/perl/os2/os2thread.h16
-rw-r--r--gnu/usr.bin/perl/perlvars.h183
-rw-r--r--gnu/usr.bin/perl/perly_c.diff452
-rw-r--r--gnu/usr.bin/perl/pod/perl5004delta.pod1609
-rw-r--r--gnu/usr.bin/perl/pod/perlhist.pod537
-rw-r--r--gnu/usr.bin/perl/pod/perlmodinstall.pod430
-rw-r--r--gnu/usr.bin/perl/pod/perlopentut.pod862
-rw-r--r--gnu/usr.bin/perl/pod/perlport.pod1613
-rw-r--r--gnu/usr.bin/perl/pod/perlreftut.pod416
-rw-r--r--gnu/usr.bin/perl/pod/perlthrtut.pod1063
-rw-r--r--gnu/usr.bin/perl/pp_proto.h344
-rw-r--r--gnu/usr.bin/perl/regcomp.pl98
-rw-r--r--gnu/usr.bin/perl/regcomp.sym112
-rw-r--r--gnu/usr.bin/perl/regnodes.h254
-rw-r--r--gnu/usr.bin/perl/t/base/rs.t131
-rw-r--r--gnu/usr.bin/perl/t/comp/require.t52
-rw-r--r--gnu/usr.bin/perl/t/io/iprefix.t36
-rw-r--r--gnu/usr.bin/perl/t/lib/cgi-form.t81
-rw-r--r--gnu/usr.bin/perl/t/lib/cgi-function.t85
-rw-r--r--gnu/usr.bin/perl/t/lib/cgi-html.t69
-rw-r--r--gnu/usr.bin/perl/t/lib/cgi-request.t93
-rw-r--r--gnu/usr.bin/perl/t/lib/dumper-ovl.t30
-rw-r--r--gnu/usr.bin/perl/t/lib/dumper.t780
-rw-r--r--gnu/usr.bin/perl/t/lib/errno.t50
-rw-r--r--gnu/usr.bin/perl/t/lib/fatal.t27
-rw-r--r--gnu/usr.bin/perl/t/lib/fields.t112
-rw-r--r--gnu/usr.bin/perl/t/lib/filespec.t43
-rw-r--r--gnu/usr.bin/perl/t/lib/h2ph.h85
-rw-r--r--gnu/usr.bin/perl/t/lib/h2ph.pht71
-rw-r--r--gnu/usr.bin/perl/t/lib/h2ph.t34
-rw-r--r--gnu/usr.bin/perl/t/lib/ipc_sysv.t178
-rw-r--r--gnu/usr.bin/perl/t/lib/ph.t96
-rw-r--r--gnu/usr.bin/perl/t/lib/textfill.t96
-rw-r--r--gnu/usr.bin/perl/t/lib/thread.t73
-rw-r--r--gnu/usr.bin/perl/t/lib/tie-push.t24
-rw-r--r--gnu/usr.bin/perl/t/lib/tie-stdarray.t12
-rw-r--r--gnu/usr.bin/perl/t/lib/tie-stdpush.t10
-rw-r--r--gnu/usr.bin/perl/t/op/avhv.t110
-rw-r--r--gnu/usr.bin/perl/t/op/context.t18
-rw-r--r--gnu/usr.bin/perl/t/op/defins.t147
-rw-r--r--gnu/usr.bin/perl/t/op/die.t43
-rw-r--r--gnu/usr.bin/perl/t/op/die_exit.t53
-rw-r--r--gnu/usr.bin/perl/t/op/goto_xs.t98
-rw-r--r--gnu/usr.bin/perl/t/op/grep.t31
-rw-r--r--gnu/usr.bin/perl/t/op/hashwarn.t71
-rw-r--r--gnu/usr.bin/perl/t/op/nothread.t35
-rw-r--r--gnu/usr.bin/perl/t/op/pos.t16
-rw-r--r--gnu/usr.bin/perl/t/op/regexp_noamp.t10
-rw-r--r--gnu/usr.bin/perl/t/op/splice.t34
-rw-r--r--gnu/usr.bin/perl/t/op/tiearray.t210
-rw-r--r--gnu/usr.bin/perl/t/op/tiehandle.t151
-rw-r--r--gnu/usr.bin/perl/t/op/tr.t33
-rw-r--r--gnu/usr.bin/perl/t/op/wantarray.t16
-rw-r--r--gnu/usr.bin/perl/thrdvar.h192
-rw-r--r--gnu/usr.bin/perl/thread.h324
-rw-r--r--gnu/usr.bin/perl/thread.sym1
-rw-r--r--gnu/usr.bin/perl/utils/perlcc.PL945
-rw-r--r--gnu/usr.bin/perl/vms/descrip_mms.template1633
-rw-r--r--gnu/usr.bin/perl/vms/munchconfig.c366
-rw-r--r--gnu/usr.bin/perl/vms/subconfigure.com2628
-rw-r--r--gnu/usr.bin/perl/vos/Changes41
-rw-r--r--gnu/usr.bin/perl/vos/build.cm154
-rw-r--r--gnu/usr.bin/perl/vos/compile_perl.cm39
-rw-r--r--gnu/usr.bin/perl/vos/config.h2167
-rw-r--r--gnu/usr.bin/perl/vos/config_h.SH_orig2187
-rw-r--r--gnu/usr.bin/perl/vos/perl.bind37
-rw-r--r--gnu/usr.bin/perl/vos/test_vos_dummies.c43
-rw-r--r--gnu/usr.bin/perl/vos/vos_accept.c51
-rw-r--r--gnu/usr.bin/perl/vos/vos_dummies.c94
-rw-r--r--gnu/usr.bin/perl/vos/vosish.h132
-rw-r--r--gnu/usr.bin/perl/win32/GenCAPI.pl1616
-rw-r--r--gnu/usr.bin/perl/win32/bin/perlglob.pl53
-rw-r--r--gnu/usr.bin/perl/win32/config.gc563
-rw-r--r--gnu/usr.bin/perl/win32/config_H.gc2094
-rw-r--r--gnu/usr.bin/perl/win32/des_fcrypt.patch75
-rw-r--r--gnu/usr.bin/perl/win32/perlhost.h941
-rw-r--r--gnu/usr.bin/perl/win32/win32thread.c131
-rw-r--r--gnu/usr.bin/perl/win32/win32thread.h187
275 files changed, 85676 insertions, 25 deletions
diff --git a/gnu/usr.bin/perl/Changes5.004 b/gnu/usr.bin/perl/Changes5.004
new file mode 100644
index 00000000000..d0601663ecf
--- /dev/null
+++ b/gnu/usr.bin/perl/Changes5.004
@@ -0,0 +1,16073 @@
+Please note: This file provides a summary of significant changes
+between versions and sub-versions of Perl, not necessarily a complete
+list of each modification. If you'd like more detailed information,
+please consult the comments in the patches on which the relevant
+release of Perl is based. (Patches can be found on any CPAN
+site, in the .../src/5.0 directory for full version releases,
+or in the .../src/5/0/unsupported directory for sub-version
+releases.)
+
+
+ ---------------
+ CAST AND CREW
+ ---------------
+
+To give due honor to those who have made Perl 5.004 what is is today,
+here are some of the more common names in the Changes file, and their
+current addresses (as of March 1997):
+
+ Gisle Aas <gisle@aas.no>
+ Kenneth Albanowski <kjahds@kjahds.com>
+ Graham Barr <gbarr@ti.com>
+ Spider Boardman <spider@orb.nashua.nh.us>
+ Tom Christiansen <tchrist@perl.com>
+ Hallvard B Furuseth <h.b.furuseth@usit.uio.no>
+ M. J. T. Guy <mjtg@cus.cam.ac.uk>
+ Gurusamy Sarathy <gsar@engin.umich.edu>
+ Jarkko Hietaniemi <jhi@iki.fi>
+ Nick Ing-Simmons <nik@tiuk.ti.com>
+ Andreas Koenig <a.koenig@mind.de>
+ Doug MacEachern <dougm@opengroup.org>
+ Paul Marquess <pmarquess@bfsec.bt.co.uk>
+ Hans Mulder <hansm@euronet.nl>
+ Jeff Okamoto <okamoto@hpcc123.corp.hp.com>
+ Ulrich Pfeifer <pfeifer@charly.informatik.uni-dortmund.de>
+ Tom Phoenix <rootbeer@teleport.com>
+ Norbert Pueschel <pueschel@imsdd.meb.uni-bonn.de>
+ Dean Roehrich <roehrich@cray.com>
+ Roderick Schertler <roderick@argon.org>
+ Larry W. Virden <lvirden@cas.org>
+ Ilya Zakharevich <ilya@math.ohio-state.edu>
+
+And the Keepers of the Patch Pumpkin:
+
+ Charles Bailey <bailey@hmivax.humgen.upenn.edu>
+ Tim Bunce <Tim.Bunce@ig.co.uk>
+ Andy Dougherty <doughera@lafcol.lafayette.edu>
+ Chip Salzenberg <chip@perl.com>
+
+And, of course, the Author of Perl:
+
+ Larry Wall <larry@wall.org>
+
+----------------
+Version 5.004_05 Maintenance release 5 for 5.004
+----------------
+
+"I said to my soul, be still, and wait without hope
+ For hope would hope for the wrong thing; wait without love
+ For love would be love of the wrong thing; there is yet faith
+ But the faith and the love and the hope are all in the waiting.
+ Wait without thought, for you are not ready for thought:
+ So the darkness shall be light, and the stillness the dancing."
+ -- T.S.Eliot, East Coker
+
+
+ HEADLINES FOR THIS MAINTENANCE RELEASE
+
+ TBA
+
+
+Change 996 on 1998/05/15 by TimBunce@ig.co.uk
+
+ Title: "Negative array subscript unrecognized in regex"
+ From: Mark-Jason Dominus <mjd@plover.com>,
+ h.sanden@elsevier.nl (Hugo van der Sanden)
+ Msg-ID: <19980425040819.13828.qmail@plover.com>,
+ <199805151514.RAA04121@dorlas.elsevier.nl>
+ Files: t/base/lex.t toke.c
+
+ Title: "Remove e_fp from toke.c after change 955"
+ From: Tim Bunce
+ Files: toke.c
+
+Change 995 on 1998/05/15 by TimBunce@ig.co.uk
+
+ Title: "Fix -e security hole (no longer uses temp file)"
+ From: Tim Bunce
+ Files: embed.h perl.h perl.c
+
+Change 992 on 1998/05/15 by TimBunce@ig.co.uk
+
+ Title: "install non-backwards compatible .pm files into archlib"
+ From: Tim Bunce
+ Files: installperl
+
+ Title: "revert "Can't locate" message to original for maintenance"
+ From: Tim Bunce
+ Msg-ID: <199804240047.SAA24155@den-mdev1.co.csgsystems.com>
+ Files: pod/perldiag.pod pp_ctl.c
+
+Change 990 on 1998/05/15 by TimBunce@ig.co.uk
+
+ Title: "Add tests for die $ref"
+ From: Graham Barr <gbarr@ti.com>
+ Msg-ID: <355C6297.121B576B@ti.com>
+ Files: MANIFEST t/op/die.t
+
+Change 989 on 1998/05/15 by TimBunce@ig.co.uk
+
+ Title: "Fix t/op/ipcmsg.t for Digital UNIX"
+ From: Jarkko Hietaniemi <jhi@iki.fi>
+ Msg-ID: <199805151337.QAA01174@alpha.hut.fi>
+ Files: t/op/ipcmsg.t
+
+Change 986 on 1998/05/15 by TimBunce@ig.co.uk
+
+ Title: "Patches for BeOS port of Perl, courtesy of Tom Spindler"
+ From: Jarkko Hietaniemi <jhi@iki.fi>, Tom Spindler
+ Msg-ID: <199805042312.CAA09025@alpha.hut.fi>
+ Files: MANIFEST Configure config_h.SH hints/beos.sh pod/perlfunc.pod
+ Porting/Glossary README.beos beos/nm.c lib/Term/ReadLine.pm
+ plan9/config.plan9 pp_sys.c t/io/pipe.t vms/config.vms
+ win32/config.bc win32/config.vc win32/config_H.bc
+ win32/config_H.vc
+
+Change 985 on 1998/05/15 by TimBunce@ig.co.uk
+
+ Title: "allow die $ref"
+ From: Graham Barr <gbarr@ti.com>, Tim.Bunce@ig.co.uk (Tim Bunce)
+ Msg-ID: <199805151351.OAA01985@toad.ig.co.uk>, <355C3E67.AF25B9F7@ti.com>
+ Files: pp_ctl.c pp_sys.c util.c
+
+ Title: "ExtUtils::Manifest could truncate files during "make dist""
+ From: "James E Jurach Jr." <muaddib@arrakis.int.ein.cz>,
+ koenig@kulturbox.de (Andreas J. Koenig)
+ Msg-ID: <199805111048.MAA02573@arrakis.int.ein.cz>,
+ <sfc90o8bgie.fsf@dubravka.in-berlin.de>
+ Files: lib/ExtUtils/Manifest.pm
+
+ Title: "Autosplit doesn't like upper case letters in sub names on VMS"
+ From: Dan Sugalski <sugalskd@osshe.edu>
+ Msg-ID: <3.0.5.32.19980330152332.009cb130@osshe.edu>
+ Files: lib/AutoSplit.pm
+
+ Title: "AutoSplit/AutoLoaded subs: give useful line numbers in warnings etc"
+ From: "Jesse N. Glick" <jglick@sig.bsh.com>, koenig@anna.mind.de (Andreas
+ J. Koenig), larry@wall.org (Larry Wall)
+ Msg-ID: <199709292015.NAA09627@wall.org>, <342FCDDF.23534195@sig.bsh.com>,
+ <sfc202c9jsb.fsf@anna.in-berlin.de>,
+ <sfc3efg5rhg.fsf@dubravka.in-berlin.de>
+ Files: lib/AutoSplit.pm
+
+Change 984 on 1998/05/15 by TimBunce@ig.co.uk
+
+ ------ CORE LANGUAGE ------
+
+ Title: "Fix close pipe returning status from wrong child"
+ From: "M.J.T. Guy" <mjtg@cus.cam.ac.uk>, kstar@chapin.edu@ig.co.uk ()
+ Msg-ID: <199805142313.TAA02684@chapin.edu>,
+ <E0yZ8ah-0005d8-00@taurus.cus.cam.ac.uk>
+ Files: t/io/pipe.t util.c
+
+ Title: "Avoid English.pm triggering load of Errno.pm"
+ From: Tim Bunce
+ Files: gv.c lib/English.pm
+
+ ------ DOCUMENTATION ------
+
+ Title: "Document child exit cause a parent sleep to end early"
+ From: "M.J.T. Guy" <mjtg@cus.cam.ac.uk>
+ Msg-ID: <E0yZwMK-0000D9-00@taurus.cus.cam.ac.uk>
+ Files: pod/perlfunc.pod
+
+ ------ EXTENSIONS ------
+
+ Title: "BSD Platforms need STRUCT_TM_HASZONE for POSIX"
+ From: Andy Dougherty <doughera@lafcol.lafayette.edu>
+ Msg-ID: <Pine.SUN.3.96.980512095524.8158C-100000@newton.phys>
+ Files: MANIFEST ext/POSIX/hints/bsdos.pl ext/POSIX/hints/freebsd.pl
+ ext/POSIX/hints/netbsd.pl ext/POSIX/hints/openbsd.pl
+
+ Title: "MM_VMS.pm fixes for building external library"
+ From: Dan Sugalski <sugalskd@ous.edu>
+ Msg-ID: <3.0.5.32.19980511160542.009dd480@ous.edu>
+ Files: lib/ExtUtils/MM_VMS.pm
+
+ Title: "Appease picky DEC compiler in POSIX.xs"
+ From: Dan Sugalski <sugalskd@ous.edu>
+ Msg-ID: <3.0.5.32.19980511161434.009f8bb0@ous.edu>
+ Files: ext/POSIX/POSIX.xs
+
+ ------ TESTS ------
+
+ Title: "Fix constant detection in t/op/ipcsem.t for Digit UNIX"
+ From: Jarkko Hietaniemi <jhi@iki.fi>
+ Msg-ID: <199805121212.PAA15351@alpha.hut.fi>
+ Files: t/op/ipcsem.t
+
+ Title: "Fix doc bug for system() return value"
+ From: Daniel Grisinger <dgris@perrin.dimensional.com>
+ Msg-ID: <Pine.LNX.3.96.980514165608.4062A-100000@perrin.dimensional.com>
+ Files: pod/perlfunc.pod t/op/exec.t
+
+ ------ UTILITIES ------
+
+ Title: "Avoid possible constant autoload loop"
+ From: "M.J.T. Guy" <mjtg@cus.cam.ac.uk>, Graham Barr <gbarr@ti.com>, Ilya
+ Zakharevich <ilya@math.ohio-state.edu>
+ Msg-ID: <199805141910.PAA26994@monk.mps.ohio-state.edu>,
+ <355B475A.C5AD4B90@ti.com>,
+ <E0ya11X-0000hm-00@taurus.cus.cam.ac.uk>
+ Files: utils/h2xs.PL
+
+ Title: "Further improvements to h2ph.PL"
+ From: kstar@chapin.edu
+ Msg-ID: <199805130241.WAA25459@chapin.edu>
+ Files: utils/h2ph.PL
+
+Change 982 on 1998/05/15 by TimBunce@ig.co.uk
+
+ Title: "comment init_postdump_symbols issues"
+ From: Tim Bunce
+ Files: perl.c
+
+ Title: "Improve sort docs re SUBNAME"
+ From: circle@azstarnet.com
+ Msg-ID: <199804281828.LAA22737@andromeda.azstarnet.com>
+ Files: pod/perlfunc.pod
+
+Change 981 on 1998/05/15 by TimBunce@ig.co.uk
+
+ Title: "Add hook to tie %! to external Errno.pm module (not included)"
+ From: Graham Barr <gbarr@ti.com>
+ Msg-ID: <355080CD.1111BC81@ti.com>
+ Files: gv.c
+
+Change 971 on 1998/05/14 by TimBunce@ig.co.uk
+
+ Title: "fix C<print "foo ${\()}"> (pp_refgen fumbles when G_SCALAR, no args)"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199805070402.AAA02858@aatma.engin.umich.edu>
+ Files: pp.c
+
+Change 970 on 1998/05/14 by TimBunce@ig.co.uk
+
+ Title: "perlbug reformatted"
+ From: Dominic Dunlop <domo@vo.lu>, Hugo van der Sanden
+ <hv@crypt0.demon.co.uk>
+ Msg-ID: <199805110954.LAA20367@dorlas.elsevier.nl>,
+ <l03130300b17cebcb6d33@[194.222.64.89]>,
+ <v03110702b17ccbab6824@[195.95.102.67]>
+ Files: utils/perlbug.PL
+
+Change 965 on 1998/05/14 by TimBunce@ig.co.uk
+
+ Title: "Sub declaration cost reduced from ~500 to ~100 bytes"
+ From: Ilya Zakharevich <ilya@math.ohio-state.edu>
+ Msg-ID: <199805050607.CAA02050@monk.mps.ohio-state.edu>
+ Files: gv.h gv.c op.c
+
+Change 949 on 1998/05/14 by TimBunce@ig.co.uk
+
+ Title: "while($x=<>) no longer warns (implicit defined added)"
+ From: Nick Ing-Simmons <nik@tiuk.ti.com>
+ Msg-ID: <199805051035.LAA27365@pluto.tiuk.ti.com>
+ Files: MANIFEST op.c t/op/defins.t
+
+Change 946 on 1998/05/14 by TimBunce@ig.co.uk
+
+ Title: "Fix PERL_DESTRUCT_LEVEL core dumps"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199805062301.TAA24599@aatma.engin.umich.edu>
+ Files: perl.c sv.c t/op/misc.t
+
+Change 944 on 1998/05/14 by TimBunce@ig.co.uk
+
+ Title: "5.004_04-m2 Cleanup of test failures"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199805070416.AAA03082@aatma.engin.umich.edu>
+ Files: t/op/die_exit.t t/op/ipcmsg.t t/op/ipcsem.t t/op/taint.t
+ win32/config.bc win32/config.vc
+
+Change 922 on 1998/05/11 by TimBunce@ig.co.uk
+
+ Assorted patches:
+
+ ------ CORE LANGUAGE ------
+
+ Title: "incorrect return value for hv_iterinit"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199805031848.OAA20618@aatma.engin.umich.edu>
+ Files: pod/perlguts.pod hv.c
+
+ ------ DOCUMENTATION ------
+
+ Title: "perlvar.pod buglet E<EVMSERR>"
+ From: Achim Bohnet <ach@mpe.mpg.de>
+ Msg-ID: <9805041415.AA22185@o09.xray.mpe.mpg.de>
+ Files: pod/perlvar.pod
+
+ Title: "Improve docs for warning about code after an exec()"
+ From: "M.J.T. Guy" <mjtg@cus.cam.ac.uk>, Chaim Frenkel
+ <chaimf@concentric.net>
+ Msg-ID: <E0yYUit-0003yb-00@taurus.cus.cam.ac.uk>,
+ <m3ra22qn1z.fsf@chany-p100.emwp.com>
+ Files: pod/perlfunc.pod
+
+ Title: "Remove dead code from pod2man"
+ From: "M.J.T. Guy" <mjtg@cus.cam.ac.uk>
+ Msg-ID: <E0yXmuT-0006Ll-00@ursa.cus.cam.ac.uk>
+ Files: pod/pod2man.PL
+
+ Title: "tweak doc for C<do FILENAME>"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199805090017.UAA06888@aatma.engin.umich.edu>
+ Files: pod/perlfunc.pod
+
+ Title: "Document integer pragma effect on % operator"
+ From: Gisle Aas <gisle@aas.no>
+ Msg-ID: <m3yawjmzhx.fsf@furu.g.aas.no>
+ Files: pod/perlop.pod
+
+ Title: "Reduce rm command line length in pod/Makefile"
+ From: Hugo van der Sanden <h.sanden@elsevier.nl>
+ Msg-ID: <199805041423.QAA13199@dorlas.elsevier.nl>
+ Files: pod/Makefile
+
+ ------ EXTENSIONS ------
+
+ Title: "Clarify Termios usage in POSIX.pod"
+ From: Rocco Caputo <troc@netrus.net>
+ Msg-ID: <199805101952.PAA12738@ns.netrus.net>
+ Files: ext/POSIX/POSIX.pod
+
+ ------ LIBRARY ------
+
+ Title: "Fix File::Find::finddepth typo in trial 2 release"
+ From: koenig@kulturbox.de (Andreas J. Koenig)
+ Msg-ID: <sfcbttflsjz.fsf@dubravka.in-berlin.de>
+ Files: lib/File/Find.pm t/lib/filefind.t
+
+ ------ PORTABILITY - GENERAL ------
+
+ Title: "Add Porting/patching.pod document"
+ From: Daniel Grisinger <dgris@tdrenterprises.com>
+ Msg-ID: <199805030305.XAA16147@relay.pair.com>
+ Files: MANIFEST Porting/patching.pod
+
+ Title: "hints/machten.sh: disable semctl(), align with devel version"
+ From: Dominic Dunlop <domo@vo.lu>
+ Msg-ID: <v03110701b175fc029eb1@[195.95.102.115]>
+ Files: hints/machten.sh
+
+ Title: "Add VMS specifics to Porting/makerel"
+ From: Charles Bailey <BAILEY@newman.upenn.edu>
+ Msg-ID: <01IWDK1LONRQ0026P0@cor.newman.upenn.edu>,
+ <199804271732.SAA13762@toad.ig.co.uk>,
+ <9804250212.AA27695@forte.com>
+ Files: Porting/makerel
+
+Change 913 on 1998/05/01 by TimBunce@ig.co.uk
+
+ Update MANIFEST for trial 2.
+ (Porting/Contract lib/Tie/Handle.pm t/op/tiehandle.t)
+
+Change 912 on 1998/05/01 by TimBunce@ig.co.uk
+
+ Add t/op/tiehandle.t as xtext to repository (see change 911)
+
+Change 911 on 1998/05/01 by TimBunce@ig.co.uk
+
+ Title: "Add ERRSV, ERRHV, DEFSV and SAVE_DEFSV for XS 5.005 compatibility"
+ From: timbo@ig.co.uk (Tim Bunce)
+ Msg-ID: <199804200854.JAA01482@toad.ig.co.uk>
+ Files: perl.h
+
+ Title: "Add WRITE & CLOSE to TIEHANDLE"
+ From: Graham Barr <gbarr@pobox.com>
+ Msg-ID: <34F63DC8.CA95670F@pobox.com>
+ Files: pod/perltie.pod lib/Tie/Handle.pm pp_sys.c t/op/tiehandle.t
+
+Change 910 on 1998/05/01 by TimBunce@ig.co.uk
+
+ Title: "Add warning for Illegal hex digit"
+ From: Stephen P Potter <spp@spp.users.ds.net>, Stephen Potter
+ <spp@psasolar.colltech.com>, Tim.Bunce@ig.co.uk (Tim Bunce)
+ Msg-ID: <199804232219.SAA02267@spp.users.ds.net>,
+ <199804271409.PAA12819@toad.ig.co.uk>,
+ <199804280307.WAA12332@psasolar.psa.pencom.com>
+ Files: pod/perldiag.pod util.c
+
+ Title: "perl_call_method() bug fix (corrupt op pointer)"
+ From: "Alterman, Eugene" <Eugene.Alterman@bremer-inc.com>
+ Msg-ID: <510415F72ECFD111A31700A0C9B3CCDE3098@efx98digmasa.bremer-inc.com>
+ Files: perl.c
+
+ Title: "Fix printf segmentation fault"
+ From: Hugo van der Sanden <hv@crypt0.demon.co.uk>
+ Msg-ID: <l03130300b16bebdbc314@[194.222.64.89]>
+ Files: pp_hot.c
+
+ Title: "Document changed local($a[$i],$b{$j}) behaviour re delete/splice"
+ From: Charles Bailey <BAILEY@newman.upenn.edu>
+ Msg-ID: <01IVMVIHNZ36001NKH@cor.newman.upenn.edu>
+ Files: pod/perlsub.pod
+
+Change 909 on 1998/05/01 by TimBunce@ig.co.uk
+
+ Title: "Change Ilya's do_binmode to K&R prototype and move to doio.c"
+ Files: doio.c util.c
+
+Change 907 on 1998/05/01 by TimBunce@ig.co.uk
+
+ Title: "Runtime Carp verbosity without aliasing"
+ From: Joshua.Pritikin@NewYork2.dmg.deuba.com, Tim Bunce
+ Msg-ID: <H00000e50003936c@MHS>
+ Files: lib/Carp.pm
+
+ Title: "Fix File::Basename to not untaint results (using new //t flag)"
+ From: Eric Hammond <erich@finity.citysearch.com>, Tom Phoenix
+ <rootbeer@teleport.com>
+ Msg-ID: <199710070515.WAA00682@finity.citysearch.com>,
+ <Pine.GSO.3.96.971007074114.14211J-100000@usertest.teleport.com>
+ Files: lib/File/Basename.pm
+
+Change 906 on 1998/04/28 by TimBunce@ig.co.uk
+
+ ------ CORE LANGUAGE ------
+
+ Title: "5.004_04m5t1: Fix dangling references in LVs", "Fix dangling
+ references in LVs"
+ From: Spider Boardman <spider@orb.nashua.nh.us>
+ Msg-ID: <199804010541.AAA32615@Orb.Nashua.NH.US>,
+ <19980422164037.D29222@perl.org>
+ Files: embed.h keywords.h opcode.h perl.h proto.h doop.c global.sym mg.c
+ pp.c sv.c
+
+ Title: "Fix SvGMAGIC typo in change 904"
+ Files: doop.c
+
+Change 905 on 1998/04/28 by TimBunce@ig.co.uk
+
+ Regexp patches
+
+ Title: "New regex flag //t to leave $1 etc. tainted"
+ From: Chip Salzenberg <chip@pobox.com>, Tim Bunce <Tim.Bunce@ig.co.uk>
+ Msg-ID: <19980310192640.37826@cyprus>
+ Files: pod/perlop.pod pod/perlre.pod op.h dump.c mg.c pp_hot.c sv.c
+ t/op/taint.t toke.c
+
+ Title: "Don't accidentally untaint target of s///"
+ From: Chip Salzenberg <chip@pobox.com>
+ Msg-ID: <19980310151756.24767@cyprus>
+ Files: pp_ctl.c pp_hot.c t/op/taint.t
+
+ Title: "Allow but ignore embedded /...(?o).../ in regexp"
+ From: h.sanden@elsevier.nl (Hugo van der Sanden)
+ Msg-ID: <199804201243.OAA08244@dorlas.elsevier.nl>
+ Files: regcomp.c
+
+Change 904 on 1998/04/27 by TimBunce@ig.co.uk
+
+ Assorted patches:
+
+ ------ CORE LANGUAGE ------
+
+ Title: "Protect join() against double reads on undef and SvGMAGICALs"
+ From: Chip Salzenberg <chip@perlsupport.com>, Tim Bunce
+ <Tim.Bunce@ig.co.uk>
+ Msg-ID: <19980424080630.D13985@perl.org>
+ Files: doop.c
+
+ Title: "Better error message for require failure"
+ From: epeschko@den-mdev1 (Ed Peschko)
+ Msg-ID: <199804240047.SAA24155@den-mdev1.co.csgsystems.com>
+ Files: pod/perldiag.pod pp_ctl.c
+
+ Title: "fixes for various noises under PERL_DESTRUCT_LEVEL"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199804231926.PAA23969@aatma.engin.umich.edu>
+ Files: perl.c
+
+ Title: "Fix nice_chunk memory leak"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199804052347.TAA15699@aatma.engin.umich.edu>
+ Files: sv.c
+
+ Title: "-2.0 vs. -2 (was Number representations)"
+ From: Chip Salzenberg <chip@pobox.com>
+ Msg-ID: <19980309185652.11231@cyprus>
+ Files: op.c
+
+ Title: "perl.c fixes for -DUNEXEC"
+ From: Matt Wette <mwette@mr-ed.jpl.nasa.gov>, Matthew R Wette
+ <mwette@mr-ed.jpl.nasa.gov>
+ Msg-ID: <199710152146.OAA07283@mr-ed.jpl.nasa.gov>
+ Files: perl.c
+
+ ------ DOCUMENTATION ------
+
+ Title: "perlcall is Perl from C, not C from Perl"
+ From: Steve A Fink <sfink@cs.berkeley.edu>
+ Files: pod/perlembed.pod
+
+ Title: "Clarify require "Foo::Bar" non-bareword issue"
+ From: Dominique Dumont <domi@ss7serv.grenoble.hp.com>
+ Msg-ID: <199804231527.AA153445256@ss7serv.grenoble.hp.com>
+ Files: pod/perlfunc.pod
+
+ Title: "(repost) new text for perlsec", "new text for perlsec"
+ From: Tom Phoenix <rootbeer@teleport.com>
+ Msg-ID: <Pine.GSO.3.96.980423161605.5518N-100000@user2.teleport.com>
+ Files: pod/perlsec.pod
+
+ ------ EXTENSIONS ------
+
+ Title: "IO::Socket->socketpair broken (typo)"
+ From: Olaf Titz <olaf@bigred.inka.de>
+ Msg-ID: <19980425224535.2807.qmail@bigred.inka.de>
+ Files: ext/IO/lib/IO/Socket.pm
+
+ Title: "NDBM_File man page needs Fcntl"
+ From: "Danny R. Faught" <faught@mailhost.rsn.hp.com>
+ Msg-ID: <199707011500.IAA00601@palrel3.hp.com>
+ Files: ext/NDBM_File/NDBM_File.pm
+
+ ------ LIBRARY ------
+
+ Title: "Documentation discrepancy: pragmatic modules"
+ From: "M.J.T. Guy" <mjtg@cus.cam.ac.uk>, h.sanden@elsevier.nl (Hugo van der Sanden)
+ Msg-ID: <199804221525.RAA12695@dorlas.elsevier.nl>,
+ <E0ySPhk-00034f-00@taurus.cus.cam.ac.uk>
+ Files: lib/strict.pm lib/subs.pm lib/vars.pm
+
+ ------ PORTABILITY - GENERAL ------
+
+ Title: "Updated hints file for svr4"
+ From: Andy Dougherty <doughera@lafcol.lafayette.edu>
+ Msg-ID: <Pine.SUN.3.96.980423110522.26621A-100000@newton.phys>
+ Files: hints/svr4.sh
+
+ Title: "Pumpkin update -- shared libperl.so location"
+ From: Andy Dougherty <doughera@lafcol.lafayette.edu>
+ Msg-ID: <Pine.SUN.3.96.980424115837.6222A-100000@newton.phys>
+ Files: Porting/pumpkin.pod
+
+ Title: "perl compile fix for AIX 4.3"
+ From: Jens-Uwe Mager <jum@helios.de>
+ Msg-ID: <199804261611.SAA34728@ans.helios.de>
+ Files: ext/DynaLoader/dl_aix.xs
+
+ Title: "Dynaloader build on VMS",
+ From: pvhp@forte.com (Peter Prymmer), timbo@ig.co.uk (Tim Bunce)
+ Msg-ID: <199804271732.SAA13762@toad.ig.co.uk>, <9804250212.AA27695@forte.com>
+ Files: vms/descrip.mms
+
+ ------ UTILITIES ------
+
+ Title: "Major update to h2ph.PL"
+ From: Billy <wdconsta@cs.adelaide.edu.au>
+ Msg-ID: <Pine.SV4.3.93.980424031837.20782A-200000@ermintrude.teaching.cs.adelaide.edu.au>
+ Files: utils/h2ph.PL
+
+Change 897 on 1998/04/23 by TimBunce@ig.co.uk
+
+ Assorted patches:
+
+ ------ CORE LANGUAGE ------
+
+ Title: "fix for "Unbalanced string table refcount""
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199804042251.RAA25527@aatma.engin.umich.edu>
+ Files: sv.c
+
+ Title: "Allow more lenient switch processing"
+ From: "John L. Allen" <allen@grumman.com>
+ Msg-ID: <199803251638.LAA22664@gateway.grumman.com>
+ Files: perl.c
+
+ Title: "Add fourth arg to substr: substr EXPR,OFFSET,LEN,REPLACEMENT"
+ From: Gisle Aas <gisle@aas.no>
+ Msg-ID: <m3g1jglqtm.fsf@furu.g.aas.no>
+ Files: pod/perlfunc.pod Todo opcode.pl pp.c t/op/substr.t
+
+ Title: "Odd number of elements in hash list."
+ From: Tom Phoenix <rootbeer@teleport.com>
+ Msg-ID: <Pine.GSO.3.96.980328151929.29336D-100000@user2.teleport.com>
+ Files: MANIFEST pod/perldiag.pod pp.c pp_hot.c t/op/hashwarn.t
+
+ Title: "another destruct_level fix"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199804030105.UAA04400@aatma.engin.umich.edu>
+ Files: hv.c
+
+ Title: "bidirectional pipe warning blues"
+ From: pmarquess@bfsec.bt.co.uk (Paul Marquess)
+ Msg-ID: <9804082151.AA20399@claudius.bfsec.bt.co.uk>
+ Files: doio.c
+
+ Title: "stale pointers after realloc (MEXTEND in pp_print and pp_prtf)"
+ From: Malcolm Beattie <mbeattie@sable.ox.ac.uk>
+ Msg-ID: <199801191107.LAA17979@sable.ox.ac.uk>
+ Files: pp_hot.c pp_sys.c
+
+ Title: "unimplemented umask() should return undef not die"
+ From: kstar@chapin.edu (Kurt D. Starsinic)
+ Msg-ID: <199803120515.VAA08660@chapin.edu>
+ Files: pod/perlfunc.pod pp_sys.c
+
+ Title: "warning for: bless $foo, """
+ From: Joshua.Pritikin@NewYork2.dmg.deuba.com
+ Msg-ID: <H00000e5000378a0@MHS>
+ Files: pod/perldiag.pod pp.c
+
+ ------ DOCUMENTATION ------
+
+ Title: "Mention SWIG in perlxs.pod"
+ From: Steve A Fink <sfink@cs.berkeley.edu>
+ Msg-ID: <Pine.HPP.3.96.980408154956.20990K-100000@brooksie.CS.Berkeley.EDU>
+ Files: pod/perlxs.pod
+
+ Title: "fix-up of previous perlre.pod patch"
+ From: Ted Ashton <ashted@southern.edu>
+ Msg-ID: <199803031540.KAA09388@ns.southern.edu>
+ Files: pod/perlre.pod
+
+ Title: "long list of man page nitpicks"
+ From: Greg Bacon <gbacon@mickey.cs.uah.edu>, Tom Christiansen
+ <tchrist@jhereg.perl.com>
+ Msg-ID: <199804221844.NAA08338@pluto.cs.uah.edu>,
+ <199804222204.QAA20805@jhereg.perl.com>
+ Files: pod/perlapio.pod pod/perlcall.pod pod/perldebug.pod pod/perldelta.pod
+ pod/perldiag.pod pod/perlembed.pod pod/perlfaq2.pod
+ pod/perlfaq3.pod pod/perlfaq4.pod pod/perlfaq5.pod
+ pod/perlfaq7.pod pod/perlfaq8.pod pod/perlform.pod
+ pod/perlfunc.pod pod/perlguts.pod pod/perlipc.pod
+ pod/perllocale.pod pod/perlmodlib.pod pod/perlop.pod
+ pod/perlre.pod pod/perlref.pod pod/perlrun.pod
+ pod/perlstyle.pod pod/perlsub.pod pod/perlsyn.pod
+ pod/perltoot.pod pod/perlvar.pod pod/perlxs.pod
+ pod/pod2man.PL
+
+ Title: "document that system() does not set $! when it fails"
+ From: "Mark R. Levinson" <mrl@isc.upenn.edu>
+ Msg-ID: <199803011946.OAA31942@anaximander.dccs.upenn.edu>
+ Files: pod/perlfunc.pod
+
+ Title: "Fix pod/roffitall execute permission"
+ From: lvirden@cas.org
+ Msg-ID: <1997Nov17.132031.2589892@cor.newman>
+ Files: pod/roffitall
+
+ Title: "document when split ignores trailing empty fields"
+ From: Hugo van der Sanden <hv@crypt0.demon.co.uk>
+ Msg-ID: <l03130300b14fac832b77@[194.222.64.89]>
+ Files: pod/perlfunc.pod
+
+ ------ EXTENSIONS ------
+
+ Title: "Buglet in Opcode.pm documentation"
+ From: Horst von Brand <vonbrand@sleipnir.valparaiso.cl>
+ Msg-ID: <199804170349.XAA32445@sleipnir.valparaiso.cl>
+ Files: ext/Opcode/Opcode.pm
+
+ Title: "Failure to append to perllocal.pod should not be fatal"
+ From: koenig@kulturbox.de (Andreas J. Koenig)
+ Msg-ID: <sfciuogy67x.fsf@dubravka.in-berlin.de>
+ Files: lib/ExtUtils/MM_Unix.pm
+
+ Title: "Document that IO.pm does not load IO::Select etc"
+ From: Graham Barr <gbarr@ti.com>
+ Msg-ID: <353B48F1.64E35A63@ti.com>
+ Files: ext/IO/IO.pm
+
+ Title: "Install extensions with bootstrap (again) in $archlib"
+ From: Achim Bohnet <ach@mpe.mpg.de>, koenig@kulturbox.de (Andreas J.
+ Koenig)
+ Msg-ID: <9804061909.AA12675@o09.xray.mpe.mpg.de>,
+ <sfc90oxc0uj.fsf@dubravka.in-berlin.de>
+ Files: lib/ExtUtils/Install.pm
+
+ Title: "glibc2.0.6 missing MSG_* <sys/socket.h> defines."
+ From: Andy Dougherty <doughera@lafcol.lafayette.edu>
+ Msg-ID: <Pine.SUN.3.96.980406113950.3166L-100000@newton.phys>
+ Files: ext/Socket/Socket.xs
+
+ ------ LIBRARY ------
+
+ Title: "Benchmark.pm: add run-for-some-time mode"
+ From: Jarkko Hietaniemi <jhi@iki.fi>
+ Msg-ID: <199804080647.JAA15136@alpha.hut.fi>
+ Files: lib/Benchmark.pm
+
+ Title: "Comments added to Carp.pm"
+ From: Andy Wardley <abw@cre.canon.co.uk>, Chip Salzenberg
+ <chip@perlsupport.com>, Tom Christiansen
+ <tchrist@jhereg.perl.com>
+ Msg-ID: <19980422164242.E29222@perl.org>,
+ <199804222033.OAA17959@jhereg.perl.com>,
+ <980409182357.ZM21638@bandanna>
+ Files: lib/Carp.pm
+
+ Title: "chat2.pl fix"
+ From: Charles Bailey <BAILEY@newman.upenn.edu>
+ Msg-ID: <01IVMVF507PO001NKH@cor.newman.upenn.edu>
+ Files: lib/chat2.pl
+
+ Title: "lib/Pod/Html.pm"
+ From: d-lewart@uiuc.edu (Daniel S. Lewart)
+ Msg-ID: <199710170718.DAA25472@staff1.cso.uiuc.edu>,
+ <199710180417.AAA19778@staff2.cso.uiuc.edu>
+ Files: lib/Pod/Html.pm
+
+ Title: "ormaments method in Term/ReadLine.pm causes warning with string
+ arg."
+ From: hiroo.hayashi@computer.org
+ Msg-ID: <199804061519.AAA21907@mail.fb3.so-net.ne.jp>
+ Files: lib/Term/ReadLine.pm
+
+ ------ OTHER CHANGES ------
+
+ Title: "ptags broken"
+ From: Ilya Zakharevich <ilya@math.ohio-state.edu>
+ Msg-ID: <199804120208.WAA29264@monk.mps.ohio-state.edu>
+ Files: emacs/ptags
+
+ ------ PORTABILITY - WIN32 ------
+
+ Title: "win32 tweaks (signals and crypt support)"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199804170505.BAA06413@aatma.engin.umich.edu>
+ Files: perl.h win32/config.bc win32/config.vc win32/config_H.bc
+ win32/config_H.vc win32/win32.c
+
+ ------ PORTABILITY - GENERAL ------
+
+ Title: "Add Social Contract (2nd Draft) as Porting/Contract"
+ From: Russ Allbery <rra@stanford.edu>
+ Msg-ID: <m3btw66n8i.fsf@windlord.Stanford.EDU>
+ Files: Porting/Contract
+
+ Title: "Config: Irix 5 hints"
+ From: kstar@O2.chapin.edu
+ Msg-ID: <199804061712.NAA22823@O2.chapin.edu>
+ Files: hints/irix_5.sh
+
+ Title: "VMS patches to 5.004_03"
+ From: Charles Bailey <BAILEY@newman.upenn.edu>
+ Msg-ID: <01IVYJS0L8D200209B@cor.newman.upenn.edu>
+ Files: vms/vms.c
+
+ Title: "hints/netbsd.sh - enable vfork"
+ From: Andy Dougherty <doughera@lafcol.lafayette.edu>
+ Msg-ID: <Pine.SUN.3.96.980417110749.19327B-100000@newton.phys>
+ Files: hints/netbsd.sh
+
+ ------ UTILITIES ------
+
+ Title: "support find2perl -follow"
+ From: Billy <wdconsta@cs.adelaide.edu.au>
+ Msg-ID: <Pine.SV4.3.93.980408005903.24081A-100000@ermintrude.teaching.cs.adelaide.edu.au>
+ Files: x2p/find2perl.PL
+
+Change 896 on 1998/04/22 by TimBunce@ig.co.uk
+
+ Assorted patches:
+
+ ------ CORE LANGUAGE ------
+
+ Title: "Additional regex-cache patch"
+ From: Chip Salzenberg <chip@atlantic.net>
+ Msg-ID: <19980305104831.38100@cyprus>
+ Files: pp_ctl.c
+
+ Title: "Conservative C<*x = undef> patch"
+ From: Chip Salzenberg <chip@atlantic.net>
+ Msg-ID: <19980310163310.48509@cyprus>
+ Files: pod/perldiag.pod pod/perlfunc.pod pp.c sv.c t/op/gv.t
+
+ Title: "Consider @ARGV to be plain files if inplace (-i)"
+ From: Chip Salzenberg <salzench@nielsenmedia.com>
+ Msg-ID: <199802042106.QAA04082@nielsenmedia.com>
+ Files: doio.c
+
+ Title: "Fix semctl for Linux, Sun and SVR4"
+ From: Graham Barr <gbarr@ti.com>, lvirden@cas.org (Larry W. Virden, x2487)
+ Msg-ID: <3484247D.BB036D39@ti.com>, <9712021313.AA11495@cas.org>
+ Files: doio.c
+
+ Title: "C<dSP> entails using C<SP>, not C<sp>"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199803070149.UAA12217@aatma.engin.umich.edu>
+ Files: pod/perlcall.pod pod/perlembed.pod pod/perlguts.pod pod/perlxs.pod
+ doio.c doop.c ext/DB_File/DB_File.xs
+ ext/DynaLoader/dl_dld.xs ext/Opcode/Opcode.xs
+ ext/POSIX/POSIX.xs ext/Socket/Socket.xs gv.c
+ lib/ExtUtils/typemap mg.c os2/OS2/REXX/REXX.xs
+ win32/win32.c
+
+ Title: "Make autouse -w-safe"
+ From: Ilya Zakharevich <ilya@math.ohio-state.edu>
+ Msg-ID: <199803030236.VAA13244@monk.mps.ohio-state.edu>
+ Files: lib/autouse.pm op.c sv.c
+
+ Title: "Misleading error on close of unopened handle"
+ From: "M.J.T. Guy" <mjtg@cus.cam.ac.uk>
+ Msg-ID: <E0y4R07-0003PH-00@ursa.cus.cam.ac.uk>
+ Files: doio.c
+
+ Title: "Confusing error from perl -e "x'""
+ From: Hans Mulder <hansmu@xs4all.nl>
+ Msg-ID: <1998Mar25.174320.2866352@cor.newman.upenn.edu>
+ Files: toke.c
+
+ Title: "Add HAS_GNULIBC define"
+ From: Andy Dougherty <doughera@lafcol.lafayette.edu>
+ Msg-ID: <Pine.SUN.3.96.980305115202.9180K-100000@newton.phys>
+ Files: config_H config_h.SH
+
+ Title: "h_errno might not be an int"
+ From: Andy Dougherty <doughera@lafcol.lafayette.edu>
+ Msg-ID: <Pine.SUN.3.96.980325165059.22255D-100000@newton.phys>
+ Files: pp_sys.c
+
+ Title: "Revised taint hole closer", "Revised taint hole closer"
+ From: Chip Salzenberg <chip@atlantic.net>, Ilya Zakharevich
+ <ilya@math.ohio-state.edu>
+ Msg-ID: <19980310222127.09350@cyprus>,
+ <199803110554.AAA29157@monk.mps.ohio-state.edu>
+ Files: doio.c
+
+ Title: "SEGV compiling localised lexical in perl5.004_05t1"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>, h.sanden@elsevier.nl (Hugo
+ van der Sanden)
+ Msg-ID: <199803171530.QAA24053@dorlas.elsevier.nl>,
+ <199803171727.MAA05234@aatma.engin.umich.edu>
+ Files: op.c t/op/misc.t
+
+ Title: "Stale SP in pp_substr"
+ From: Stephen McCamant <alias@mcs.com>
+ Msg-ID: <m0yFsTS-000EZpC@alias-2.pr.mcs.net>
+ Files: pp.c
+
+ Title: "Statement unlikely to be reached warning"
+ From: Hans Mulder <hansm@icgned.nl>
+ Msg-ID: <1997Dec24.171511.2683516@cor.newman>
+ Files: op.c
+
+ Title: "Tainting propagates from nowhere"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199803140411.XAA09343@aatma.engin.umich.edu>
+ Files: pp.c
+
+ Title: "two trivial tweaks to 5.004m5t1"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199803060553.AAA28461@aatma.engin.umich.edu>
+ Files: proto.h win32/Makefile
+
+ Title: "unpacking negatives on Alpha"
+ From: Achim Bohnet <ach@mpe.mpg.de>
+ Msg-ID: <9710201503.AA24797@o09.xray.mpe.mpg.de>
+ Files: pp.c t/op/pack.t
+
+ ------ LIBRARY AND EXTENSIONS ------
+
+ Title: "Cwd.pm: abs_path() and fast_abs_path() plus code merge"
+ From: Graham Barr <gbarr@ti.com>
+ Msg-ID: <3482F365.4A0486BA@ti.com>
+ Files: lib/Cwd.pm
+
+ Title: "Math/BigInt.pm, fixed use of undefined value."
+ From: abigail@fnx.com
+ Msg-ID: <19980313052452.27365.qmail@betelgeuse.wayne.fnx.com>
+ Files: lib/Math/BigInt.pm
+
+ Title: "File::Find rewrite"
+ From: Ilya Zakharevich <ilya@math.ohio-state.edu>
+ Msg-ID: <199803052344.SAA01008@monk.mps.ohio-state.edu>
+ Files: lib/File/Find.pm
+
+ Title: "efficient version of strict.pm"
+ From: koenig@anna.mind.de (Andreas J. Koenig)
+ Msg-ID: <sfcpvonhdnc.fsf@anna.in-berlin.de>
+ Files: lib/strict.pm
+
+ Title: "Socket occasional SEGV in pack_sockaddr_un"
+ From: Trevor Blackwell <tlb@viaweb.com>
+ Msg-ID: <199710281804.NAA09632@wagg.viaweb.com>
+ Files: ext/Socket/Socket.xs
+
+ Title: "Warning on mis-use of 'use lib'"
+ From: "M.J.T. Guy" <mjtg@cus.cam.ac.uk>, Tom Phoenix
+ <rootbeer@teleport.com>, chip@atlantic.net
+ Msg-ID: <199801270435.XAA14147@cyprus.atlantic.net>,
+ <E0xx9x4-0006jc-00@ursa.cus.cam.ac.uk>,
+ <Pine.GSO.3.96.980126192445.22284N-100000@user2.teleport.com>
+ Files: lib/lib.pm
+
+ Title: "bug in Class::Struct"
+ From: Tom Christiansen <tchrist@toy.perl.com>
+ Msg-ID: <199803290814.KAA05699@toy.perl.com>
+ Files: lib/Class/Struct.pm
+
+ Title: "Allow POSIX to export nice()"
+ From: bkeelerx@iwa.dp.intel.com (Bruce J. Keeler)
+ Msg-ID: <eclg1kf5yf0.fsf@ws010.dp.intel.com>
+ Files: ext/POSIX/POSIX.pm
+
+ Title: "'use Env' on WinNT/95 fails"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199803280511.AAA15933@aatma.engin.umich.edu>
+ Files: lib/Env.pm
+
+ ------ OTHER CHANGES ------
+
+ Title: "mv-if-diff"
+ From: Robin Barker <rmb1@cise.npl.co.uk>
+ Msg-ID: <14572.9803271806@tempest.cise.npl.co.uk>
+ Files: mv-if-diff
+
+ ------ PORTABILITY - WIN32 ------
+
+ Title: "fix various problems with backticks on win32"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199803070705.CAA15945@aatma.engin.umich.edu>
+ Files: win32/config_h.PL win32/win32.c
+
+ ------ TESTS ------
+
+ Title: "Fix bug in locale.t"
+ From: Jarkko Hietaniemi <jhi@iki.fi>
+ Msg-ID: <199801042148.XAA08599@alpha.hut.fi>
+ Files: t/pragma/locale.t
+
+Change 887 on 1998/04/10 by TimBunce@ig.co.uk
+
+ Assorted patches:
+
+ ------ CORE LANGUAGE ------
+
+ Title: "Re: die exits with 0"
+ From: Robin Barker <rmb1@cise.npl.co.uk>
+ Files: perl.c t/op/die_exit.t
+
+ Title: "More toke.c commentary; fix oddity"
+ From: h.sanden@elsevier.nl (Hugo van der Sanden)
+ Msg-ID: <199803251022.LAA01308@dorlas.elsevier.nl>
+ Files: toke.c
+
+ Title: "for semctl on solaris"
+ From: Graham Barr <gbarr@ti.com>
+ Msg-ID: <34624B80.C014E841@ti.com>
+ Files: doio.c t/op/ipcmsg.t t/op/ipcsem.t
+
+ ------ DOCUMENTATION ------
+
+ Title: "Add more 'see also's to perlre.pod.", "Perl regexp /g modifier bug"
+ From: Ilya Zakharevich <ilya@math.ohio-state.edu>, epeschko@den-mdev1 (Ed
+ Peschko), pjr@watcher.telstra.com.au (Peter Richardson)
+ Msg-ID: <199803050000.LAA11476@watcher.telecom.com.au>,
+ <199803050231.VAA19128@monk.mps.ohio-state.edu>,
+ <199803050605.XAA09785@den-mdev1.co.csgsystems.com>
+ Files: pod/perlre.pod
+
+ ------ LIBRARY AND EXTENSIONS ------
+
+ Title: "BigFloat - small neagtive numbers cause panic"
+ From: Hugo van der Sanden <hv@crypt.compulink.co.uk>
+ Msg-ID: <199711201325.NAA09732@crypt.compulink.co.uk>
+ Files: lib/Math/BigFloat.pm
+
+ Title: "Update Getopt::Long to 2.16"
+ From: JVromans@Squirrel.nl (Johan Vromans), Johan Vromans
+ <jvromans@squirrel.nl>
+ Msg-ID: <13571.48089.726787.147769@plume.nl.compuware.com>,
+ <13572.6847.863219.973795@phoenix.squirrel.nl>
+ Files: lib/Getopt/Long.pm
+
+ Title: "New Text::ParseWords"
+ From: pomeranz@netcom.com (Hal Pomeranz)
+ Msg-ID: <199710162118.OAA06275@netcom7.netcom.com>
+ Files: lib/Text/ParseWords.pm t/lib/parsewords.t
+
+ Title: "Fixed Text/Wrap.pm bugs (2)"
+ From: Jacqui Caren <Jacqui.Caren@ig.co.uk>
+ Msg-ID: <199709291548.QAA08645@toad.ig.co.uk>
+ Files: lib/Text/Wrap.pm
+
+ Title: "Very *evil* File::CheckTree behavior! (now uses warn/die not
+ print/exit)"
+ From: Eryq <eryq@zeegee.com>, Randal Schwartz <merlyn@stonehenge.com>
+ Msg-ID: <34B542FD.190A@zeegee.com>, <8cen2i9k6f.fsf@gadget.cscaper.com>
+ Files: lib/File/CheckTree.pm
+
+ ------ OTHER CHANGES ------
+
+ Title: "Add ./emacs/ptags"
+ From: Ilya Zakharevich <ilya@math.ohio-state.edu>
+ Msg-ID: <199803150847.DAA08196@monk.mps.ohio-state.edu>
+ Files: emacs/ptags
+
+ ------ TESTS ------
+
+ Title: "Avoid stat test failure from build in /tmp (tmpfs)", "Build in /tmp"
+ From: Andy Dougherty <doughera@newton.phys.lafayette.edu>, Greg Bacon
+ <gbacon@adtran.com>, pudge@pobox.com (Chris Nandor)
+ Msg-ID: <199710171616.LAA13435@crp-201.adtran.com>,
+ <Pine.SUN.3.96.971017171023.2349A-100000@newton.phys>,
+ <v02130515b06be80f1486@[205.228.240.16]>
+ Files: t/op/stat.t
+
+ Title: "for failure with lib/timelocal"
+ From: "M.J.T. Guy" <mjtg@cus.cam.ac.uk>, jan.dubois@ibm.net (Jan Dubois)
+ Msg-ID: <34c78f61.2529827@smtp1.ibm.net>,
+ <E0xvdfI-00057d-00@ursa.cus.cam.ac.uk>
+ Files: t/lib/timelocal.t
+
+ Title: "Make "localhost" related failures more clear"
+ From: Paul Hoffman <phoffman@proper.com>
+ Msg-ID: <199801201859.KAA05686@mail.proper.com>
+ Files: t/lib/io_sock.t t/lib/io_udp.t
+
+ ------ UTILITIES ------
+
+ Title: "Let h2xs read multiple header files"
+ From: Andy Dougherty <doughera@lafcol.lafayette.edu>, Benjamin Sugars
+ <bsugars@canoe.ca>
+ Msg-ID: <Pine.SOL.3.95.980310091946.25236A-100000@interact>,
+ <Pine.SUN.3.96.980310145455.638A-100000@newton.phys>
+ Files: utils/h2xs.PL
+
+Change 886 on 1998/04/10 by TimBunce@ig.co.uk
+
+ Changes relating primarily to portability.
+
+ ------ CORE LANGUAGE ------
+
+ Title: "5.004_55: Another round of OS/2 patches"
+ From: Ilya Zakharevich <ilya@math.ohio-state.edu>
+ Msg-ID: <199803050945.EAA20153@monk.mps.ohio-state.edu>
+ Files: hints/os2.sh pod/perlguts.pod cop.h perl.h proto.h README.os2
+ global.sym lib/ExtUtils/MM_OS2.pm lib/File/Path.pm op.c
+ os2/Changes os2/Makefile.SHs os2/os2.c os2/perl2cmd.pl
+ perl.c pod/pod2man.PL pp_ctl.c pp_hot.c pp_sys.c
+ t/lib/filecopy.t util.c utils/perldoc.PL
+
+ Title: "VMS: chdir() with empty arg list"
+ From: lane@duphy4.drexel.edu (Charles Lane)
+ Msg-ID: <980317125556.222041c7@DUPHY4.Physics.Drexel.Edu>
+ Files: pp_sys.c
+
+ ------ LIBRARY AND EXTENSIONS ------
+
+ Title: "ExtUtils/MM_Unix.pm changed to use ld -rpath on IRIX"
+ From: "W. Phillip Moore" <wpm@ms.com>
+ Msg-ID: <199712011738.MAA21139@zappa.morgan.com>
+ Files: lib/ExtUtils/MM_Unix.pm
+
+ Title: "[Linux] POSIX::_[PS]C_.+ bug (add HINT_SC_EXIST)"
+ From: Yutaka OIWA <oiwa@is.s.u-tokyo.ac.jp>
+ Msg-ID: <199712251923.EAA08260@tjms1f.is.s.u-tokyo.ac.jp>
+ Files: ext/POSIX/hints/linux.pl ext/POSIX/POSIX.xs
+
+ Title: "5.004_04-m1] Use HAS_GNULIBC in POSIX.xs"
+ From: Andy Dougherty <doughera@lafcol.lafayette.edu>
+ Msg-ID: <Pine.SUN.3.96.980305115517.9180L-100000@newton.phys>
+ Files: ext/POSIX/POSIX.xs
+
+ Title: ""ODBM_File.c", line 275: NULL undefined"
+ From: pmarquess@bfsec.bt.co.uk (Paul Marquess)
+ Msg-ID: <9803091310.AA23264@claudius.bfsec.bt.co.uk>
+ Files: ext/ODBM_File/ODBM_File.xs
+
+ ------ PORTABILITY - GENERAL ------
+
+ Title: "5.004_04 QNX getcwd"
+ From: Norton Allen <allen@huarp.harvard.edu>
+ Msg-ID: <199802121838.NAA20452@dolores.harvard.edu>,
+ <199803061511.KAA22346@bottesini.harvard.edu>
+ Files: hints/qnx.sh lib/Cwd.pm t/op/magic.t
+
+ Title: "hints/netbsd.sh d_setrgid d_setruid"
+ From: Jarkko Hietaniemi <jhi@iki.fi>
+ Msg-ID: <199802281435.QAA10866@alpha.hut.fi>
+ Files: hints/netbsd.sh
+
+ Title: "osname=unixware, osvers=2.03, archname=i386-unixware
+ d_casti32=undef"
+ From: Tom Hughes <tom@compton.demon.co.uk>
+ Msg-ID: <465398da47%tom@compton.demon.co.uk>
+ Files: hints/svr4.sh
+
+ Title: "hints/bsdos.sh patch for BSDI 3.1"
+ From: Jan-Pieter Cornet <johnpc@xs4all.nl>
+ Msg-ID: <6fbip6$3cp$1@xs1.xs4all.nl>
+ Files: hints/bsdos.sh
+
+ Title: "Remove BIND_NOSTART from DynaLoader for HP"
+ From: Keong Lim <Keong.Lim@sr.com.au>
+ Msg-ID: <01BD1D03.53B65E90@sieplan2.sr.com.au>
+ Files: ext/DynaLoader/dl_hpux.xs
+
+ Title: "Building Perl on AIX 4+ with shared libraries and dynamic loading"
+ From: Juan Gallego <Little.Boss@physics.mcgill.ca>
+ Msg-ID: <Pine.SGI.3.91.971022084517.17052F-100000@nazgul.physics.mcgill.ca>
+ Files: hints/aix.sh
+
+ Title: "alpha-dec_osf 5.0"
+ From: Spider Boardman <spider@Orb.Nashua.NH.US>
+ Msg-ID: <199712232305.SAA08359@Orb.Nashua.NH.US>
+ Files: hints/dec_osf.sh
+
+ Title: "Off-by-one error with OS2::PrfDB"
+ From: Ilya Zakharevich <ilya@math.ohio-state.edu>
+ Msg-ID: <199710170920.FAA00390@monk.mps.ohio-state.edu>
+ Files: os2/OS2/PrfDB/PrfDB.xs
+
+ Title: "5.004_04-m1] Allow overrides in hints/openbsd.sh"
+ From: Andy Dougherty <doughera@lafcol.lafayette.edu>
+ Msg-ID: <Pine.SUN.3.96.980305115956.9180N-100000@newton.phys>
+ Files: hints/openbsd.sh
+
+ Title: "5.004_04-m1] Linux shouldn't use -lnet"
+ From: Andy Dougherty <doughera@lafcol.lafayette.edu>
+ Msg-ID: <Pine.SUN.3.96.980305115843.9180M-100000@newton.phys>
+ Files: hints/linux.sh
+
+ Title: "5.004_(04|63)] Close VMS security hole"
+ From: Charles Bailey <BAILEY@newman.upenn.edu>
+ Msg-ID: <01IV6LRJCSSC0009C4@cor.newman.upenn.edu>
+ Files: vms/vms.c
+
+ Title: "Re: Perl online documentation on OpenVMS"
+ From: pvhp@forte.com (Peter Prymmer)
+ Msg-ID: <9803192143.AA28120@forte.com>
+ Files: README.vms
+
+ Title: "Perl5.004_04m4t4 *almost* makes it for VMS", "Updated
+ vms/perly_c.vms and vms/perly_h.vms"
+ From: Andy Dougherty <doughera@newton.phys.lafayette.edu>, Dan Sugalski
+ <sugalskd@osshe.edu>, larry@wall.org (Larry Wall)
+ Msg-ID: <199710151650.JAA29185@wall.org>,
+ <3.0.3.32.19971014150404.02fdef78@osshe.edu>,
+ <Pine.SUN.3.96.971015121704.28456F-100000@newton.phys>
+ Files: vms/perly_c.vms
+
+ Title: "Updated, non-wordwrapped, patch to README.VMS"
+ From: Dan Sugalski <sugalskd@osshe.edu>
+ Msg-ID: <3.0.5.32.19980213133828.0092c870@osshe.edu>
+ Files: README.vms
+
+ Title: "VMS patches to 5.004_03 (excluding installperl and timelocal.t)"
+ From: Charles Bailey <BAILEY@newman.upenn.edu>
+ Msg-ID: <01INZT9G2LZS0006YW@cor.newman.upenn.edu>
+ Files: lib/File/Basename.pm lib/File/Path.pm vms/config.vms vms/descrip.mms
+ vms/genconfig.pl vms/test.com vms/vms.c vms/ext/Filespec.pm
+ vms/ext/filespec.t
+
+ Title: "Re: VMSperl crashes on -Mblib argument"
+ From: bailey@newman.upenn.edu (Charles Bailey)
+ Msg-ID: <1997Dec10.004439.2635060@cor.newman>
+ Files: lib/blib.pm vms/vms.c
+
+ Title: "hints/linux.sh (MkLinux / PPC)"
+ From: pudge@pobox.com (Chris Nandor)
+ Msg-ID: <v0213050cb06c19682a25@[205.228.240.28]>
+ Files: hints/linux.sh
+
+ Title: "hpux.sh hints file clarification suggestion"
+ From: root@qad.com
+ Msg-ID: <199802192351.QAA09096@jhereg.perl.com>
+ Files: hints/hpux.sh
+
+ Title: "new hints/solaris_2.sh"
+ From: "M.J.T. Guy" <mjtg@cus.cam.ac.uk>
+ Msg-ID: <E0xw80h-0005SV-00@ursa.cus.cam.ac.uk>
+ Files: hints/solaris_2.sh
+
+Change 873 on 1998/04/03 by TimBunce@ig.co.uk
+
+ Title: "FileHandle Documentation patch"
+ From: "Darren/Torin/Who Ever..." <torin@daft.com>
+ Msg-ID: <87emzqo49g.fsf@perv.daft.com>
+ Files: lib/FileHandle.pm
+
+Change 872 on 1998/04/03 by TimBunce@ig.co.uk
+
+ Documentation and documentation related patches:
+
+ ------ BUILD PROCESS ------
+
+ Title: "Docs re /usr/bin/perl quasi-standard location"
+ From: Tom Phoenix <rootbeer@teleport.com>
+ Msg-ID: <Pine.GSO.3.96.971117080737.12318C-100000@usertest.teleport.com>
+ Files: INSTALL pod/perlrun.pod
+
+ ------ DOCUMENTATION ------
+
+ Title: "/RFC|RFC-1305/ non-greedy"
+ From: Jan-Pieter Cornet <johnpc@xs4all.nl>
+ Msg-ID: <6epo02$c4r$1@xs1.xs4all.nl>
+ Files: pod/perlre.pod
+
+ Title: "5.004_04: perlhist.pod, buildtoc, perltoc.pod"
+ From: Jarkko Hietaniemi <jhi@iki.fi>
+ Msg-ID: <199802191543.RAA29231@alpha.hut.fi>
+ Files: pod/perl.pod pod/perlhist.pod pod/perltoc.pod pod/buildtoc
+
+ Title: "5.004_04: pod/perlfunc.pod: i18n example for localtime()"
+ From: Jarkko Hietaniemi <jhi@iki.fi>
+ Msg-ID: <199711141555.RAA18875@alpha.hut.fi>
+ Files: pod/perlfunc.pod
+
+ Title: "typo-fix and suggestion for perlguts.pod"
+ From: h.sanden@elsevier.nl (Hugo van der Sanden)
+ Msg-ID: <199803051543.QAA03097@dorlas.elsevier.nl>
+ Files: pod/perlguts.pod
+
+ Title: "perlfunc/syscall curiosity"
+ From: Roderick Schertler <roderick@argon.org>, Tkil
+ <tkil@reptile.scrye.com>
+ Msg-ID: <199711302259.PAA02134@reptile.scrye.com>,
+ <pziut8snva.fsf@eeyore.ibcinc.com>
+ Files: pod/perlfunc.pod
+
+ Title: "Document sprintf %#x behaviour for zero value"
+ From: ilya@math.ohio-state.edu (Ilya Zakharevich)
+ Msg-ID: <1997Nov5.185959.2539604@cor.newman>
+ Files: pod/perlfunc.pod
+
+ Title: "NUL termination (was Re: STOP THE PRESSES)"
+ From: "M.J.T. Guy" <mjtg@cus.cam.ac.uk>
+ Msg-ID: <E0xsn5M-0002gw-00@ursa.cus.cam.ac.uk>
+ Files: pod/perlguts.pod
+
+ Title: "Typo fix."
+ From: abigail@fnx.com
+ Msg-ID: <19971101120114.1030.qmail@betelgeuse.wayne.fnx.com>
+ Files: pod/perlop.pod pod/perlvar.pod
+
+ Title: "5.004_63 perlrun.pod: _DEBUG_MSTATS"
+ From: Achim Bohnet <ach@mpe.mpg.de>
+ Msg-ID: <9803181940.AA22587@o09.xray.mpe.mpg.de>
+ Files: pod/perlrun.pod
+
+ Title: "Re: Conservative C<*x = undef> patch"
+ From: "M.J.T. Guy" <mjtg@cus.cam.ac.uk>
+ Msg-ID: <E0yCjHT-0005Dt-00@ursa.cus.cam.ac.uk>
+ Files: pod/perltrap.pod
+
+ Title: "perlfunc.pod for flock()"
+ From: "Jeremy D. Zawodny" <jzawodn@wcnet.org>
+ Msg-ID: <3.0.5.32.19971118203119.00a723e0@woody.wcnet.org>
+ Files: pod/perlfunc.pod
+
+ Title: "buglet: 'perltoc' not mentioned in perl.pod"
+ From: Tkil <tkil@scrye.com>
+ Msg-ID: <19971127035036.17668.qmail@scrye.com>
+ Files: pod/perl.pod
+
+ Title: "for() and map() peculiarity"
+ From: "M.J.T. Guy" <mjtg@cus.cam.ac.uk>
+ Msg-ID: <E0y4YAa-0003Qu-00@ursa.cus.cam.ac.uk>
+ Files: pod/perlsyn.pod
+
+ Title: "Re: new text for perlsec"
+ From: Tom Phoenix <rootbeer@teleport.com>
+ Msg-ID: <Pine.GSO.3.96.980328100418.22321T-100000@user2.teleport.com>
+ Files: pod/perlsec.pod
+
+ Title: "perldsc's debugger x command"
+ From: Roderick Schertler <roderick@argon.org>
+ Msg-ID: <10669.878352893@eeyore.ibcinc.com>
+ Files: pod/perldsc.pod
+
+ Title: "perlre.pod"
+ From: Ted Ashton <ashted@southern.edu>
+ Msg-ID: <199802271501.KAA09279@ns.southern.edu>
+ Files: pod/perlre.pod
+
+ Title: "Re: printf and $\", "printf and $\"
+ From: Roderick Schertler <roderick@argon.org>, Tom Phoenix
+ <rootbeer@teleport.com>, nag <nick@flirble.org>
+ Msg-ID: <199711141918.TAA08096@flirble.org>,
+ <Pine.GSO.3.96.971117085421.12318J-100000@usertest.teleport
+ .com>, <pzyb2ncr42.fsf@eeyore.ibcinc.com>
+ Files: pod/perlfunc.pod
+
+ Title: "recv() typo"
+ From: Roderick Schertler <roderick@argon.org>
+ Msg-ID: <12064.877012073@eeyore.ibcinc.com>
+ Files: pod/perlfunc.pod
+
+ Title: "truncate return value"
+ From: Roderick Schertler <roderick@argon.org>
+ Msg-ID: <5490.878337883@eeyore.ibcinc.com>
+ Files: pod/perlfunc.pod
+
+ Title: "update to perlbook.pod"
+ From: "Nathan V. Patwardhan" <nvp@mediaone.net>, Randal Schwartz
+ <merlyn@stonehenge.com>, Stephen Potter
+ <spp@psasolar.colltech.com>, Tom Phoenix
+ <rootbeer@teleport.com>
+ Msg-ID: <199803241354.HAA23938@psasolar.psa.pencom.com>,
+ <199803241441.OAA01261@mediaone.net>,
+ <8clnu0i05k.fsf@gadget.cscaper.com>,
+ <Pine.GSO.3.96.980324111957.15753C-100000@user1.teleport.com>
+ Files: pod/perlbook.pod
+
+ Title: "utime documentation"
+ From: "Brandon S. Allbery KF8NH" <bsa@kf8nh.apk.net>, "M.J.T. Guy"
+ <mjtg@cus.cam.ac.uk>
+ Msg-ID: <199802180256.VAA11369@speaker.kf8nh.apk.net>,
+ <E0y4qd6-0000P6-00@ursa.cus.cam.ac.uk>
+ Files: pod/perlfunc.pod
+
+ Title: "(well, doc patch) use of // requires successful match"
+ From: Roderick Schertler <roderick@argon.org>
+ Msg-ID: <pz7mb4bips.fsf@eeyore.ibcinc.com>
+ Files: pod/perlop.pod
+
+ ------ LIBRARY AND EXTENSIONS ------
+
+ Title: "MakeMaker PM doc patch and a DIR buglet"
+ From: Achim Bohnet <ach@mpe.mpg.de>
+ Msg-ID: <9711101050.AA13868@o09.xray.mpe.mpg.de>
+ Files: lib/ExtUtils/MakeMaker.pm
+
+ Title: "bareword clarification for constant.pm"
+ From: Roderick Schertler <roderick@argon.org>
+ Msg-ID: <6460.878143077@eeyore.ibcinc.com>
+ Files: lib/constant.pm
+
+ Title: "integer rand - bug or feature?"
+ From: Roderick Schertler <roderick@argon.org>
+ Msg-ID: <pzhg8lvgta.fsf@eeyore.ibcinc.com>
+ Files: lib/integer.pm
+
+ ------ OTHER CHANGES ------
+
+ Title: "FileHandle Documentation patch"
+ From: "Darren/Torin/Who Ever..." <torin@daft.com>
+ Msg-ID: <87emzqo49g.fsf@perv.daft.com>
+
+ Title: "perl5.004_61 myconfig updates"
+ From: Andy Dougherty <doughera@lafcol.lafayette.edu>
+ Msg-ID: <Pine.SUN.3.96.980305150629.11530G-100000@newton.phys>
+ Files: myconfig
+
+ Title: "small fixups in pod2latex.PL"
+ From: "Darren/Torin/Who Ever..." <torin@daft.com>
+ Msg-ID: <873eg6o3v2.fsf@perv.daft.com>
+
+ ------ PORTABILITY - GENERAL ------
+
+ Title: "Misc doc fixes for README.VMS"
+ From: Dan Sugalski <sugalskd@osshe.edu>
+ Msg-ID: <3.0.5.32.19980121113134.00924a20@osshe.edu>
+ Files: README.vms
+
+ Title: "moved DynaLib"
+ From: John Tobey <jtobey@channel1.com>
+ Msg-ID: <199710182332.XAA21630@remote212>
+ Files: ext/DynaLoader/DynaLoader.pm.PL
+
+ ------ UTILITIES ------
+
+ Title: "Searching for FAQs (patch to perldoc)"
+ From: Piers Cawley <pdcawley@bofh.org.uk>, Russ Allbery <rra@stanford.edu>
+ Msg-ID: <m3d8gsb8uk.fsf@windlord.Stanford.EDU>,
+ <m3iuqkfmiq.fsf@tower.bofh.org.uk>
+ Files: utils/perldoc.PL
+
+ Title: "perldoc"
+ From: Ted Ashton <ashted@southern.edu>
+ Msg-ID: <199802271510.KAA10506@ns.southern.edu>
+ Files: utils/perldoc.PL
+
+ Title: "perldoc -f not using pod2man"
+ From: Russ Allbery <rra@stanford.edu>
+ Msg-ID: <m3hg4f9vyy.fsf@windlord.Stanford.EDU>
+ Files: utils/perldoc.PL
+
+ Title: "perldoc -m should not require pod"
+ From: Robin Houston <robin@nml.guardian.co.uk>
+ Msg-ID: <199803241319.NAA24777@stringfellow.guardian.co.uk>
+ Files: utils/perldoc.PL
+
+ Title: "small fix for perldoc in perl 5.004_04"
+ From: Julian Yip <julian@imoney.com>
+ Msg-ID: <Roam.SIMC.2.0.6.884805579.5280.julian@imoney.com>
+ Files: utils/perldoc.PL
+
+Change 764 on 1998/03/05 by TimBunce@ig.co.uk
+
+ APPLLIB_EXP now has arch and version dirs added to @INC
+
+Change 761 on 1998/03/05 by TimBunce@ig.co.uk
+
+ Title: "properly refcount localization, fix C<local $tied{foo}>"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199802191207.MAA10742@toad.ig.co.uk>
+ Files: av.c hv.c scope.c t/op/local.t
+
+Change 758 on 1998/03/04 by TimBunce@ig.co.uk
+
+ perldoc -f now uses pager if text is too long for screen
+
+Change 757 on 1998/03/04 by TimBunce@ig.co.uk
+
+ Added OpenBSD hint file from <Todd.Miller@courtesan.com>
+ Document 'warn with no args' behaviour, from <johnpc@xs4all.net>
+
+Change 756 on 1998/03/04 by TimBunce@ig.co.uk
+
+ Fix for new gnulibc stdio.h when using sfio+perlio
+
+Change 755 on 1998/03/04 by TimBunce@ig.co.uk
+
+ Fixed typo in vms/ext/Stdio/Stdio.pm AUTOLOAD
+ Added details of split in scalar context to perlfunc.pod
+
+Change 754 on 1998/03/04 by TimBunce@ig.co.uk
+
+ Updated perl -v info to include reference to docs and home page.
+
+Change 753 on 1998/03/04 by TimBunce@ig.co.uk
+
+ Updated hints/bsdos.sh for BSD/OS 3.1
+ Fixed typo in pod/perlsyn.pod
+ Added workaround for old gmake in ext/SDBM_File/sdbm/Makefile.PL
+ Fixed typo in ext/GDBM_File/GDBM_File.pm
+
+Change 752 on 1998/03/04 by TimBunce@ig.co.uk
+
+ Changed bug address in README to perlbug@perl.com
+ Changed Copyright in perl.c to 1998
+ Added op/pos.t test from Robin Houston <robin@oneworld.org>
+
+Change 751 on 1998/03/04 by TimBunce@ig.co.uk
+
+ Make t/comp/require.t and t/lib/ph.t executable in repository
+
+Change 750 on 1998/03/04 by TimBunce@ig.co.uk
+
+ Added dTHR definition to ease backwards compatibility for XS
+ source code from 5.005.
+
+Change 749 on 1998/03/04 by TimBunce@ig.co.uk
+
+ Title: "rename local 'op' variables to 'o'", #F114
+ From: Gurusamy Sarathy
+ Files: op.h opcode.h proto.h dump.c op.c opcode.pl pp_ctl.c run.c scope.c
+ toke.c
+
+Change 748 on 1998/03/04 by TimBunce@ig.co.uk
+
+ Title: "consolidated win32 patch", #F112
+ From: Gurusamy Sarathy
+ Files: MANIFEST pod/perlfaq2.pod pod/perlrun.pod win32/include/sys/socket.h
+ EXTERN.h INTERN.h dosish.h lib/ExtUtils/Command.pm
+ lib/ExtUtils/Liblist.pm lib/ExtUtils/MM_Win32.pm
+ lib/ExtUtils/Mksymlists.pm lib/File/DosGlob.pm t/TEST
+ t/harness win32/win32.h win32/win32iop.h README.win32
+ doio.c installhtml installperl pp_sys.c win32/Makefile
+ win32/config.bc win32/config.vc win32/config_H.bc
+ win32/config_H.vc win32/config_h.PL win32/config_sh.PL
+ win32/dl_win32.xs win32/makedef.pl win32/makefile.mk
+ win32/perllib.c win32/runperl.c win32/win32.c
+ win32/win32sck.c win32/bin/perlglob.pl x2p/a2p.h x2p/a2p.c
+ x2p/a2py.c
+
+Change 747 on 1998/03/04 by TimBunce@ig.co.uk
+
+ Title: "initialize @INC in ph.t, and fix up MANIFEST", #F111
+ From: Gurusamy Sarathy
+ Files: MANIFEST t/lib/ph.t
+
+Change 746 on 1998/03/04 by TimBunce@ig.co.uk
+
+ Title: "properly save STDOUT during system() in debugger", #F110
+ From: Jason Smith <smithj4@rpi.edu>
+ Files: lib/perl5db.pl
+
+Change 745 on 1998/03/04 by TimBunce@ig.co.uk
+
+ Title: "generate DynaLoader.pm at build time", #F109
+ From: Achim Bohnet <ach@mpe.mpg.de>
+ Msg-ID: <9802111938.AA26224@o09.xray.mpe.mpg.de>
+ Files: MANIFEST ext/DynaLoader/DynaLoader.pm.PL ext/DynaLoader/Makefile.PL
+
+Change 744 on 1998/03/04 by TimBunce@ig.co.uk
+
+ Title: "Install extensions with bootstrap in $archlib", #F108
+ From: koenig@anna.mind.de (Andreas J. Koenig), koenig@kulturbox.de (Andreas
+ J. Koenig)
+ Msg-ID: <sfcra9fqx0n.fsf@anna.in-berlin.de>
+ Files: lib/ExtUtils/Install.pm
+
+Change 743 on 1998/03/04 by TimBunce@ig.co.uk
+
+ Title: "Pod::Html trips over "C<0>"", #F107
+ From: Chip Salzenberg
+ Files: lib/Pod/Html.pm
+
+Change 742 on 1998/03/04 by TimBunce@ig.co.uk
+
+ Title: "5.004_58 | _04: pod2*,perlpod: L<show this|man/section>", #F106
+ From: Achim Bohnet <ach@mpe.mpg.de>
+ Msg-ID: <9802111629.AA00595@o09.xray.mpe.mpg.de>
+ Files: pod/perlpod.pod lib/Pod/Html.pm lib/Pod/Text.pm pod/pod2man.PL
+
+Change 741 on 1998/03/04 by TimBunce@ig.co.uk
+
+ Title: "New patch for $^E==GetLastError() under Win32", #F105
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>, Tye McQueen
+ <tye@metronet.com>, ilya@math.ohio-state.edu (Ilya
+ Zakharevich)
+ Msg-ID: <199801040630.AA29298@metronet.com>,
+ <199801041826.NAA11568@aatma.engin.umich.edu>,
+ <1998Jan4.130412.2719461@cor.newman>
+ Files: pod/perlfunc.pod pod/perlvar.pod doio.c lib/dumpvar.pl lib/perl5db.pl
+ win32/win32.h mg.c util.c win32/makedef.pl win32/win32.c
+
+Change 740 on 1998/03/04 by TimBunce@ig.co.uk
+
+ Title: "5.004_56: Patch to Tie::Hash and docs", #F104
+ From: Ilya Zakharevich <ilya@math.ohio-state.edu>
+ Msg-ID: <199801120134.UAA05437@monk.mps.ohio-state.edu>
+ Files: pod/perlfunc.pod lib/Tie/Hash.pm
+
+Change 739 on 1998/03/04 by TimBunce@ig.co.uk
+
+ Title: "more doc for perldoc", #F103
+ From: Gurusamy Sarathy
+ Files: utils/perldoc.PL
+
+Change 738 on 1998/03/04 by TimBunce@ig.co.uk
+
+ Title: "Make perldoc look for an index file ", #F102
+ From: Gisle Aas <gisle@aas.no>
+ Msg-ID: <199801221220.NAA22902@furu.g.aas.no>
+ Files: utils/perldoc.PL
+
+Change 737 on 1998/03/04 by TimBunce@ig.co.uk
+
+ Title: "perldoc -F filename", #F101
+ From: Ilya Zakharevich <ilya@math.ohio-state.edu>
+ Msg-ID: <199712120037.TAA00176@math.mps.ohio-state.edu>
+ Files: utils/perldoc.PL
+
+Change 736 on 1998/03/04 by TimBunce@ig.co.uk
+
+ Title: "sv_grow can fail for HAS_64K_LIMIT systems", #F100
+ From: Gisle Aas <gisle@aas.no>
+ Msg-ID: <m3iuqsl3oq.fsf@furu.g.aas.no>
+ Files: sv.c
+
+Change 735 on 1998/03/04 by TimBunce@ig.co.uk
+
+ Title: "Benchmark.pm: timethese corrupts $_", #F099
+ From: abigail@fnx.com
+ Msg-ID: <19980201114609.7779.qmail@betelgeuse.wayne.fnx.com>
+ Files: lib/Benchmark.pm
+
+Change 734 on 1998/03/04 by TimBunce@ig.co.uk
+
+ Title: "STRANGE_MALLOC should test failed alloc", #F098
+ From: Gisle Aas <gisle@aas.no>
+ Msg-ID: <199802021406.PAA03285@furu.g.aas.no>
+ Files: hv.c
+
+Change 733 on 1998/03/04 by TimBunce@ig.co.uk
+
+ Title: "support caseless %ENV", #F097
+ From: Gurusamy Sarathy
+ Files: hv.c t/op/magic.t win32/win32.h
+
+Change 732 on 1998/03/04 by TimBunce@ig.co.uk
+
+ Title: "newer cperl-mode.el (from 5.004_60)", #F096
+ From: Ilya Zakharevich
+ Files: emacs/cperl-mode.el
+
+Change 731 on 1998/03/04 by TimBunce@ig.co.uk
+
+ Title: "Handle set magic on xsub OUTPUT args, add API functions that handle
+ magic", #F095
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199801190409.XAA26710@aatma.engin.umich.edu>
+ Files: pod/perlguts.pod pod/perlxs.pod embed.h proto.h sv.h global.sym
+ lib/ExtUtils/xsubpp sv.c
+
+Change 730 on 1998/03/04 by TimBunce@ig.co.uk
+
+ Title: "Fix flawed cleanup when signal handlers are not defined", #F094
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199710290106.UAA11485@aatma.engin.umich.edu>
+ Files: mg.c
+
+Change 729 on 1998/03/04 by TimBunce@ig.co.uk
+
+ Title: "Tests for C<sort 'foo','bar'>", #F093
+ From: Hugo van der Sanden <hv@crypt.compulink.co.uk>
+ Msg-ID: <199711021247.MAA01743@crypt.compulink.co.uk>
+ Files: t/op/sort.t
+
+Change 728 on 1998/03/04 by TimBunce@ig.co.uk
+
+ Title: "Make search.pl work on win32", #F092
+ From: Gurusamy Sarathy
+ Files: win32/bin/search.pl
+
+Change 721 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "Fix spurious perldoc warnings on DOSISH platforms", #F091
+ From: Molnar Laszlo <molnarl@cdata.tvnet.hu>
+ Msg-ID: <34475659.1AA69855@cdata.tvnet.hu>
+ Files: utils/perldoc.PL
+
+Change 720 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "Make ExtUtils::MM_Unix::fixin() do something meaningful on win32",
+ #F090
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199801070016.TAA17766@aatma.engin.umich.edu>
+ Files: lib/ExtUtils/MM_Unix.pm
+
+Change 719 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "Fix inconsistent case $ENV{Path} (vs $ENV{PATH})", #F089
+ From: Gurusamy Sarathy
+ Files: lib/FindBin.pm
+
+Change 718 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "Fix File::Find's longstanding confusion about win32 being like VMS",
+ #F088
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199802020459.XAA04964@aatma.engin.umich.edu>
+ Files: lib/File/Find.pm
+
+Change 717 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "do_postponed breaks with multiple interpreters", #F087
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199710290316.WAA15888@aatma.engin.umich.edu>
+ Files: op.c
+
+Change 716 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "Make warning on C<Nosuch::> optional, add to perl{diag,delta}.pod",
+ #F086
+ From: Gurusamy Sarathy
+ Files: pod/perldelta.pod pod/perldiag.pod toke.c
+
+Change 715 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "Pod::Html bug and fix: missing </UL> in index", #F085
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199802192314.SAA23326@aatma.engin.umich.edu>
+ Files: lib/Pod/Html.pm
+
+Change 714 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "New pod: perlhist", #F084
+ From: Jarkko Hietaniemi <jhi@iki.fi>
+ Msg-ID: <199802191556.RAA09578@alpha.hut.fi>
+ Files: MANIFEST pod/perl.pod pod/perlhist.pod pod/perltoc.pod pod/buildtoc
+
+Change 713 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "Fix restoration of locals on scope unwinding", #F083
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199802110515.AAA23700@aatma.engin.umich.edu>
+ Files: pp_ctl.c t/op/local.t
+
+Change 712 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "after an eval-ed bad require, requiring a string ref SEGVs", #F082
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199802102349.SAA16001@aatma.engin.umich.edu>
+ Files: pp_ctl.c
+
+Change 711 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "Fix seg fault on eval/require and syntax errors", #F081
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199802102321.SAA15346@aatma.engin.umich.edu>
+ Files: MANIFEST scope.h op.c pp_ctl.c scope.c t/comp/require.t toke.c
+
+Change 710 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "5.004_58: the locale.t problem in IRIX", #F080
+ From: Jarkko Hietaniemi <jhi@iki.fi>
+ Msg-ID: <199802091747.TAA01735@alpha.hut.fi>
+ Files: t/pragma/locale.t
+
+Change 709 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "sv_setnv will upgrade SVt_NV to SVt_PVNV", #F079
+ From: Gisle Aas <gisle@aas.no>
+ Msg-ID: <m3g1lwl3bq.fsf@furu.g.aas.no>
+ Files: sv.c
+
+Change 708 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "Eliminate double warnings under C<package;>", #F077
+ From: "M.J.T. Guy" <mjtg@cus.cam.ac.uk>
+ Msg-ID: <E0y0paq-0000Ov-00@ursa.cus.cam.ac.uk>
+ Files: gv.c op.c toke.c
+
+Change 707 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "Fix infinite loop on unlink() failure in File::Path::rmtree()",
+ #F076
+ From: Murray Nesbitt <mjn@pathcom.com>, Tim Bunce <Tim.Bunce@ig.co.uk>
+ Msg-ID: <199802061100.LAA16423@toad.ig.co.uk>
+ Files: lib/File/Path.pm
+
+Change 706 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "Update of h2ph", #F075
+ From: kstar@www.chapin.edu (Kurt D. Starsinic)
+ Msg-ID: <199802051354.FAA11452@www.chapin.edu>
+ Files: t/lib/ph.t utils/h2ph.PL
+
+Change 705 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "Fix AutoLoader for deep packages", #F074
+ From: Zachary Miller <zcmiller@zappy.er.usgs.gov>
+ Msg-ID: <199710092348.SAA02108@zappy.er.usgs.gov>
+ Files: lib/AutoLoader.pm
+
+Change 704 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "Fix order of warnings for misplaced subscripts", #F073
+ From: Hugo van der Sanden <hv@crypt.compulink.co.uk>
+ Msg-ID: <199710131023.LAA16796@crypt.compulink.co.uk>
+ Files: op.c
+
+Change 703 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "Make recursive lexical analysis more robust", #F072
+ From: Ilya Zakharevich and Chip Salzenberg
+ Msg-ID: <199710160102.VAA28817@monk.mps.ohio-state.edu>
+ Files: toke.c
+
+Change 702 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "Fix random whitespace errors in docs", #F070
+ From: Roderick Schertler <roderick@argon.org>
+ Msg-ID: <12726.877706444@eeyore.ibcinc.com>
+ Files: pod/perlfunc.pod pod/checkpods.PL
+
+Change 701 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "Fix line numbers after here documents in eval STRING", #F069
+ From: Ilya Zakharevich <ilya@math.ohio-state.edu>
+ Msg-ID: <199710241745.NAA08166@monk.mps.ohio-state.edu>
+ Files: toke.c
+
+Change 700 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "Fix SEGV from combining caller and C<package;>", #F068
+ From: James Duncan <jduncan@epitome.hawk.igs.net>, Nicholas Clark
+ <nick@flirble.org>
+ Msg-ID: <199710241248.NAA00163@flirble.org>,
+ <Pine.LNX.3.96.971024135912.12197A-100000@epitome.hawk.igs.
+ net>
+ Files: pp_ctl.c sv.c
+
+Change 699 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "Don't fold string comparison under C<use locale>", #F067
+ From: Jarkko Hietaniemi <jhi@iki.fi>
+ Msg-ID: <199711151506.RAA26287@alpha.hut.fi>
+ Files: op.c
+
+Change 698 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "Fix SEGV on constant at end of sort block", #F066
+ From: Administration <fadmin@informatics.muni.cz>
+ Msg-ID: <199711170838.JAA26073@thetis.fi.muni.cz>
+ Files: op.c
+
+Change 697 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "Allow C<last()> to mean C<last>", #F065
+ From: Chip Salzenberg
+ Files: op.c
+
+Change 696 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "Fix extension version mismatch message", #F064
+ From: Chip Salzenberg
+ Files: XSUB.h
+
+Change 695 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "Better handle and test struct tm of Linux and SunOS", #F063
+ From: Andy Dougherty <doughera@newton.phys.lafayette.edu>
+ Msg-ID: <Pine.SUN.3.96.980205134340.15567B-100000@newton.phys>
+ Files: MANIFEST ext/POSIX/hints/linux.pl ext/POSIX/hints/sunos_4.pl
+ hints/linux.sh hints/sunos_4_1.sh t/lib/posix.t
+
+Change 694 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "Fix doc bug in getservbyname() examples", #F062
+ From: Tom Christiansen
+ Files: ext/Socket/Socket.pm
+
+Change 693 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "Kill warning about parameter type", #F061
+ From: Chip Salzenberg
+ Files: op.c
+
+Change 692 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "Socket occasional SEGV", #F060
+ From: Trevor Blackwell <tlb@viaweb.com>
+ Msg-ID: <199710281804.NAA09632@wagg.viaweb.com>
+ Files: ext/Socket/Socket.xs
+
+Change 691 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "Avoid SEGV from local($@)", #F059
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199710290251.VAA14362@aatma.engin.umich.edu>
+ Files: pp_ctl.c
+
+Change 690 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "Don't use broken pad_reset() (was Re: Perl bug in 5.004_03 )", #F058
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199710300036.TAA01004@aatma.engin.umich.edu>
+ Files: op.c
+
+Change 689 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "Use STMT_{START,END} in XSRETURN", #F057
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199710300245.VAA04244@aatma.engin.umich.edu>
+ Files: XSUB.h
+
+Change 688 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "Re: Sort grammar bug", #F056
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199711011946.OAA18882@aatma.engin.umich.edu>
+ Files: toke.c
+
+Change 687 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "Document indirect object cases for exec(), system()", #F055
+ From: Dominic Dunlop <domo@slipper.ip.lu>
+ Msg-ID: <v03110700b084e89234a7@[194.51.248.90]>
+ Files: pod/perlfunc.pod
+
+Change 686 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "Update docs on tr///", #F054
+ From: Tom Phoenix <rootbeer@teleport.com>
+ Msg-ID: <Pine.GSO.3.96.971103071602.10568C-100000@usertest.teleport.com>
+ Files: pod/perldelta.pod pod/perldiag.pod pod/perlfunc.pod
+ pod/perllocale.pod pod/perlmod.pod pod/perlop.pod
+ pod/perlstyle.pod toke.c
+
+Change 685 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "Re: perlop bitwise & | ^ documentation", #F053
+ From: Tom Phoenix <rootbeer@teleport.com>
+ Msg-ID: <Pine.GSO.3.96.971106073858.29771O-100000@usertest.teleport.com>
+ Files: pod/perlop.pod
+
+Change 684 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "Fix SEGV on C<*glob{'SCALAR','ARRAY'}>", #F052
+ From: "Joseph N. Hall" <joseph@cscaper.com>
+ Msg-ID: <199711110552.WAA12613@gadget.cscaper.com>
+ Files: perly.c perly.c.diff perly.y vms/perly_c.vms
+
+Change 683 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "for perlguts.pod: document sv_derived_from, sv_vcatpfn and
+ sv_vsetpfn", #F051
+ From: jan.dubois@ibm.net (Jan Dubois) and Chip Salzenberg
+ Msg-ID: <346ae970.7444534@smtp1.ibm.net>
+ Files: pod/perlguts.pod
+
+Change 682 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "5.004_04: locale startup failure (at last) documented", #F050
+ From: Jarkko Hietaniemi <jhi@iki.fi>
+ Msg-ID: <199711172054.WAA08261@alpha.hut.fi>
+ Files: INSTALL pod/perldiag.pod pod/perllocale.pod
+
+Change 681 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "Cope with lack of args in Fcntl::AUTOLOAD", #F049
+ From: Jerome Abela <abela@hsc.fr>
+ Msg-ID: <19971120183248.23588@coredump.hsc.fr>
+ Files: ext/Fcntl/Fcntl.pm
+
+Change 680 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "Commenting toke.c", #F048
+ From: gnat@frii.com
+ Msg-ID: <199801082138.OAA14186@prometheus.frii.com>
+ Files: toke.c
+
+Change 679 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "Re: 5.004_04 vec() fails with 32-bit values", #F047
+ From: "M.J.T. Guy" <mjtg@cus.cam.ac.uk>
+ Msg-ID: <E0xsnr8-0007SS-00@taurus.cus.cam.ac.uk>
+ Files: pod/perlguts.pod pp.c t/op/vec.t
+
+Change 678 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "A few perl5.004_03 bugs", #F046
+ From: Hugo van der Sanden <hv@crypt.compulink.co.uk>
+ Msg-ID: <199801221211.MAA05315@crypt.compulink.co.uk>
+ Files: mg.c t/op/magic.t
+
+Change 677 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "Faster, cleaner av_unshift() ", #F045
+ From: Gisle Aas <gisle@aas.no>
+ Msg-ID: <199801221850.TAA23111@furu.g.aas.no>
+ Files: av.c
+
+Change 676 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "New hints/solaris2.sh", #F044
+ From: Stephen Zander <srz@mckesson.com>
+ Msg-ID: <87oh12y458.fsf@wsuse5.mckesson.com>
+ Files: hints/solaris_2.sh
+
+Change 675 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "Refresh Complex.pm and test", #F043
+ From: Jarkko Hietaniemi <jhi@iki.fi>
+ Msg-ID: <199802051608.SAA20262@alpha.hut.fi>
+ Files: lib/Math/Complex.pm t/lib/complex.t
+
+Change 674 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "Fix (\@@) proto", #F042
+ From: "Joseph N. Hall" <joseph@cscaper.com>
+ Msg-ID: <199801240132.SAA25111@gadget.cscaper.com>
+ Files: op.c t/comp/proto.t
+
+Change 673 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "Allow empty BLOCK in code", #F041
+ From: Vladimir Alexiev <vladimir@cs.ualberta.ca>
+ Msg-ID: <19980129002112Z13378-6931+226@scapa.cs.ualberta.ca>
+ Files: toke.c
+
+Change 672 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "Fix name of $Foo::{'Bar::'}: '*Foo::Bar::'", #F040
+ From: Chip Salzenberg
+ Files: gv.c t/op/gv.t
+
+Change 671 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "Keep accurate reference count on globs' stashes", #F038
+ From: Gisle Aas <gisle@aas.no>
+ Msg-ID: <m3zpk7sd3n.fsf@furu.g.aas.no>
+ Files: gv.c sv.c
+
+Change 670 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "Avoid memory allocation in gv_fetchpv(), for speed", #F037
+ From: Chip Salzenberg
+ Files: gv.c
+
+Change 669 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "Make Configure less negative about PerlIO", #F036
+ From: chip@atlantic.net
+ Msg-ID: <199801312323.SAA15237@cyprus.atlantic.net>
+ Files: Configure
+
+Change 668 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "Fix (mostly) pseudo-same-REs due to embedded NULs", #F035
+ From: Martin Plechsmid <plechsmi@karlin.mff.cuni.cz>
+ Msg-ID: <199802021217.NAA05230@albert.karlin.mff.cuni.cz>
+ Files: pp_ctl.c
+
+Change 667 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "Make Getopt::Long avoid $&, $`, $'", #F034
+ From: Irving Reid <irving@tor.securecomputing.com>
+ Msg-ID: <98Feb3.005102est.11655@janus.tor.securecomputing.com>
+ Files: lib/Getopt/Long.pm
+
+Change 666 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "adding the newSVpvn API function", #F033
+ From: Matthias Ulrich Neeracher <neeri@iis.ee.ethz.ch>
+ Msg-ID: <199801310532.GAA23798@solar.ethz.ch>
+ Files: pod/perlguts.pod pod/perltoc.pod proto.h global.sym sv.c
+
+Change 665 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "Support C<Package::> as function-blind bearword", #F032
+ From: Chip Salzenberg
+ Files: toke.c
+
+Change 664 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "Re-optimize character classes", #F031
+ From: Chip Salzenberg
+ Files: regcomp.h regcomp.c regexec.c
+
+Change 663 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "Fix C<if (1) { local $x }> which needed ENTER/LEAVE", #F030
+ From: dfh@dwroll.lucent.com (D461-David_F_Haertig(Dave)83040)
+ Msg-ID: <EnKC0q.6qI@drnews.dr.lucent.com>
+ Files: op.c t/op/local.t
+
+Change 662 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "Dramatically improve performance of // with parens or $&", #F029
+ From: Chip Salzenberg
+ Files: cop.h perl.h proto.h regexp.h gv.c interp.sym perl.c pp.c pp_ctl.c
+ pp_hot.c regexec.c scope.c
+
+Change 661 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "Don't warn on $x{shift}, ne => 1, or -f => 1", #F028
+ From: Chip Salzenberg
+ Files: toke.c
+
+Change 660 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "Protect against weirdness with unreal @_ in C<local @_>", #F027
+ From: Chip Salzenberg
+ Files: scope.c
+
+Change 659 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "Fix C<printf "%.0d", 0>", #F026
+ From: Hugo van der Sanden <hv@crypt.compulink.co.uk>
+ Msg-ID: <199711021331.NAA01826@crypt.compulink.co.uk>
+ Files: sv.c t/op/sprintf.t
+
+Change 658 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "Tiny core patch for source filters", #F025
+ From: pmarquess@bfsec.bt.co.uk (Paul Marquess)
+ Msg-ID: <9711202312.AA02937@claudius.bfsec.bt.co.uk>
+ Files: toke.c
+
+Change 657 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "Here-doc in s///e (was: Bug)", #F024
+ From: Hugo van der Sanden <hv@crypt.compulink.co.uk>
+ Msg-ID: <199711221445.OAA14153@crypt.compulink.co.uk>
+ Files: t/base/lex.t toke.c
+
+Change 656 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "Fix duplicate warnings on C<-e undef>", #F023
+ From: Hugo van der Sanden <hv@crypt.compulink.co.uk>
+ Msg-ID: <199711221252.MAA14000@crypt.compulink.co.uk>
+ Files: doio.c t/pragma/warn-1global
+
+Change 655 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "Fix '*' prototype", #F022
+ From: Ilya Zakharevich <ilya@math.ohio-state.edu>
+ Msg-ID: <199711212225.RAA00755@monk.mps.ohio-state.edu>
+ Files: toke.c
+
+Change 654 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "File::Find bugs (and patches)", "File::Find bugs & patches", #F021
+ From: "Conrad E. Kimball" <cek@tblv021.ca.boeing.com>
+ Msg-ID: <199711260703.XAA21257@mailgate2.boeing.com>
+ Files: lib/File/Find.pm
+
+Change 653 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "Fix typo: FORM{,AT}LINE", #F020
+ From: Chip Salzenberg
+ Files: sv.c
+
+Change 652 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "Fix use of unref mem when blessed object goes out of scope", #F019
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199711282326.SAA15090@aatma.engin.umich.edu>
+ Files: scope.c
+
+Change 651 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "Fix C<my ($a, undef, $b) = @x>", #F018
+ From: Stephane Payrard <stef@francenet.fr>
+ Msg-ID: <199712040054.BAA04612@www.zweig.com>
+ Files: op.c t/op/my.t
+
+Change 650 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "enhanced "use strict" warning", #F017
+ From: Tkil <tkil@reptile.scrye.com>
+ Msg-ID: <199712040938.CAA07628@reptile.scrye.com>
+ Files: gv.c t/pragma/strict-subs t/pragma/strict-vars
+
+Change 649 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "eval of sub gives spurious "uninitialised" warning", #F016
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199712061025.FAA14396@aatma.engin.umich.edu>
+ Files: pod/perldelta.pod pod/perlfunc.pod op.c t/op/eval.t
+
+Change 648 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "[PERL] Assigning result of pop scrambles unrelated reference", #F015
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199712061100.GAA14864@aatma.engin.umich.edu>
+ Files: sv.c
+
+Change 647 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "[PERL] Filedescriptor leak in 5.004_55 (and earlier)", #F014
+ From: Ilya Zakharevich <ilya@math.ohio-state.edu>
+ Msg-ID: <199712151922.OAA06410@monk.mps.ohio-state.edu>
+ Files: os2/os2.c util.c
+
+Change 646 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "Fix fdopen() on STD{IN,OUT,ERR}", #F013
+ From: Roderick Schertler <roderick@argon.org>
+ Msg-ID: <pzg1npp6e3.fsf@eeyore.ibcinc.com>
+ Files: doio.c t/op/misc.t
+
+Change 645 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "Fix local $a[0] and local $h{a}", #F012
+ From: Stephen McCamant <alias@mcs.com>
+ Msg-ID: <m0xjWFq-000EZeC@alias-2.pr.mcs.net>
+ Files: embed.h scope.h global.sym pp.c pp_hot.c scope.c t/op/local.t
+
+Change 644 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "Eliminate redundant mg_get() in SvTRUE()", #F011
+ From: Spider Boardman <spider@orb.nashua.nh.us>
+ Msg-ID: <199712251839.NAA14800@Orb.Nashua.NH.US>
+ Files: sv.c
+
+Change 643 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "Don't force scalar context on C<my @x> or C<my %x>", #F010
+ From: Chip Salzenberg
+ Files: op.c t/op/my.t
+
+Change 642 on 1998/03/03 by TimBunce@ig.co.uk
+
+ Title: "Fix assignment to $_[0] in DESTROY", #F009
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199801010030.TAA14274@aatma.engin.umich.edu>
+ Files: pod/perlobj.pod sv.c t/op/ref.t
+
+Change 627 on 1998/03/02 by TimBunce@ig.co.uk
+
+ Title: "Fix inefficient checks for TIEHANDLE", #F008
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199801080106.UAA05048@aatma.engin.umich.edu>
+ Files: pp_hot.c pp_sys.c
+
+Change 626 on 1998/03/02 by TimBunce@ig.co.uk
+
+ This is the change description for change 625
+ Title: "Fix tr///s option", #F007
+ From: Inaba Hiroto <inaba@st.rim.or.jp>
+ Msg-ID: <19980110155333D.inaba@st.rim.or.jp>
+ Files: doop.c
+
+Change 623 on 1998/03/02 by TimBunce@ig.co.uk
+
+ Title: "Fix lexical lookup in eval-sub-eval", #F006
+ From: Chip Salzenberg
+ Files: pp_ctl.c
+
+Change 622 on 1998/03/02 by TimBunce@ig.co.uk
+
+ Title: "Don't upgrade target of assignment from LVALUE", #F005
+ From: Chip Salzenberg
+ Files: sv.c
+
+Change 621 on 1998/03/02 by TimBunce@ig.co.uk
+
+ Title: "Fix compile-time warning line in while ()", #F004
+ From: Chip Salzenberg
+ Files: op.c
+
+Change 620 on 1998/03/02 by TimBunce@ig.co.uk
+
+ Title: "STMT foreach LIST;", #F002
+ From: Chip Salzenberg
+ Files: pod/perlsyn.pod perly.c perly.c.diff perly.y t/cmd/mod.t toke.c
+ vms/perly_c.vms
+
+Change 619 on 1998/03/02 by TimBunce@ig.co.uk
+
+ Title: "Fix SIGSEGV on C<42 until forever>", #F001
+ From: Chip Salzenberg
+ Files: op.c
+
+----------------
+Version 5.004_04 Maintenance release 4 for 5.004
+----------------
+
+"1. Out of clutter, find simplicity.
+ 2. From discord, find harmony.
+ 3. In the middle of difficulty lies opportunity."
+ -- Albert Einstein, three rules of work
+
+
+ HEADLINES FOR THIS MAINTENANCE RELEASE
+
+ Fixed gaps in tainting (readdir, readlink, gecos, bit vector ops).
+ Fixed memory leak in splice(@_).
+ Fixed debugger core dumps.
+ IO::Socket now sets autoflush by default.
+ Several perldoc bugs fixed, now faster and more helpful.
+ Fixed Win32 handle leak.
+ Many other improvements to Win32 support.
+ Many many other bug fixes and enhancements.
+
+
+ ------ BUILD PROCESS ------
+
+ Title: "ExtUtils::Liblist prints diagnostics to STDOUT (vs. STDERR)"
+ From: Andy Dougherty <doughera@newton.phys.lafayette.edu>, jesse@ginger
+ (Jesse Glick)
+ Msg-ID: <199708290032.UAA15663@ginger>,
+ <Pine.SUN.3.96.970829132217.28552A-100000@newton.phys>
+ Files: MANIFEST lib/ExtUtils/Liblist.pm
+
+ Title: "Set LD_RUN_PATH when building suidperl"
+ From: Chip Salzenberg <chip@rio.atlantic.net>, Tony Sanders
+ <sanders@bsdi.com>
+ Msg-ID: <199708272226.QAA10206@austin.bsdi.com>
+ Files: Makefile.SH
+
+ Title: "INSTALL version 1.26"
+ From: Andy Dougherty <doughera@newton.phys.lafayette.edu>
+ Msg-ID: <Pine.SUN.3.96.970828143314.27416B-100000@newton.phys>
+ Files: INSTALL
+
+ Title: "Propagate MAKE=$(MAKE) through perl build"
+ From: Andy Dougherty <doughera@newton.phys.lafayette.edu>
+ Msg-ID: <Pine.SUN.3.96.970908143853.13750C-100000@newton.phys>
+ Files: Makefile.SH makedepend.SH x2p/Makefile.SH ext/util/make_ext
+
+ Title: "update to installperl for perl5.004_02 to skip CVS dir"
+ From: Tony Sanders <sanders@bsdi.com>
+ Msg-ID: <199708272307.RAA13451@austin.bsdi.com>
+ Files: installperl
+
+ Title: "makedepend loop on HP-UX 10.20"
+ Msg-ID: <1997Sep20.183731.2297443@cor.newman>
+ Files: Makefile.SH
+
+ Title: "Tiny Grammaro in INSTALL"
+ From: koenig@anna.mind.de (Andreas J. Koenig)
+ Msg-ID: <sfcwwkb2pc8.fsf@anna.in-berlin.de>
+ Files: INSTALL
+
+ Title: "Fix Configured osvers under Linux 1"
+ From: Andy Dougherty <doughera@newton.phys.lafayette.edu>, Hugo van der
+ Sanden <hv@crypt.compulink.co.uk>
+ Msg-ID: <199709241439.PAA17114@crypt.compulink.co.uk>,
+ <Pine.SUN.3.96.970924112654.5054D-100000@newton.phys>
+ Files: Configure
+
+ Title: "INSTALL-1.28"
+ From: Andy Dougherty <doughera@newton.phys.lafayette.edu>
+ Msg-ID: <Pine.SUN.3.96.971010131207.23751A-100000@newton.phys>
+ Files: INSTALL
+
+ Title: "makedepend.SH fix for UNICOS"
+ From: Jarkko Hietaniemi <jhi@iki.fi>
+ Msg-ID: <199710132039.XAA21459@alpha.hut.fi>
+ Files: makedepend.SH
+
+ ------ CORE LANGUAGE ------
+
+ Title: "Re: "perl -d" dumps core when loading syslog.ph"
+ From: Jochen Wiedmann <wiedmann@neckar-alb.de>, Stephen McCamant
+ <alias@mcs.com>, ilya@math.ohio-state.edu (Ilya
+ Zakharevich)
+ Msg-ID: <1997Aug30.034921.2297381@cor.newman.upenn.edu>,
+ <3407639E.FEBF20BA@neckar-alb.de>,
+ <m0x4ZGj-000EZYC@alias-2.pr.mcs.net>
+ Files: pp_ctl.c
+
+ Title: "Allow $obj->$coderef()"
+ From: Chip Salzenberg <salzench@nielsenmedia.com>
+ Msg-ID: <199708291649.MAA23276@nielsenmedia.com>
+ Files: pp_hot.c
+
+ Title: "Localize PV value in save_gp()", "typeglob differences in perl4 and
+ perl5"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>, Stephen McCamant
+ <alias@mcs.com>
+ Msg-ID: <199708272348.TAA03139@aatma.engin.umich.edu>,
+ <m0x4u2o-000EZkC@alias-2.pr.mcs.net>
+ Files: scope.c t/op/ref.t
+
+ Title: "Avoid assumption that STRLEN == I32"
+ From: Chip Salzenberg <chip@rio.atlantic.net>, Hallvard B Furuseth
+ <h.b.furuseth@usit.uio.no>
+ Msg-ID: <199708242310.BAA05497@bombur2.uio.no>
+ Files: hv.c
+
+ Title: "Fix memory leak in splice(@_)"
+ From: "Tuomas J. Lukka" <tjl@fkfuga.pc.helsinki.fi>, Chip Salzenberg
+ <chip@rio.atlantic.net>
+ Msg-ID: <m0x3iQE-000CBrC@lukka.student.harvard.edu>
+ Files: proto.h av.c global.sym pp.c
+
+ Title: "Fix line number of warnings in while() conditional", "misleading
+ uninit value warning"
+ From: Chip Salzenberg <chip@rio.atlantic.net>, Greg Bacon
+ <gbacon@crp-201.adtran.com>
+ Msg-ID: <199708271607.LAA01403@crp-201.adtran.com>
+ Files: proto.h op.c perly.c perly.y
+
+ Title: "-t and POSIX::isatty on IO::Handle objects", "Fix C<-t $handle>"
+ From: Chip Salzenberg <chip@rio.atlantic.net>, Greg Ward
+ <greg@bic.mni.mcgill.ca>
+ Msg-ID: <199708261754.NAA24826@bottom.bic.mni.mcgill.ca>
+ Files: pp_sys.c
+
+ Title: "Fix output of invalid printf formats"
+ From: Chip Salzenberg <chip@rio.atlantic.net>, Hugo van der Sanden
+ <hv@crypt.compulink.co.uk>
+ Msg-ID: <199708241529.QAA02457@crypt.compulink.co.uk>
+ Files: sv.c t/op/sprintf.t
+
+ Title: "regexec.c regcppartblow declaration missing an arg"
+ From: Hugo van der Sanden <hv@crypt.compulink.co.uk>
+ Msg-ID: <199708290059.BAA05808@crypt.compulink.co.uk>
+ Files: regexec.c
+
+ Title: "taint readlink, readdir, gecos"
+ From: Jarkko Hietaniemi <jhi@iki.fi>
+ Msg-ID: <199709131651.TAA13471@alpha.hut.fi>
+ Files: pod/perlfunc.pod pod/perlsec.pod pp_sys.c t/op/taint.t
+
+ Title: "clean up old style package' usage in op.c"
+ From: Stephen Potter <spp@psa.pencom.com>
+ Msg-ID: <199709151813.NAA14433@psisa.psa.pencom.com>
+ Files: op.c
+
+ Title: "beautifying usage() code in perl.c"
+ From: "John L. Allen" <"John L. Allen"<allen@gateway.grumman.com>>
+ Msg-ID: <Pine.SOL.3.91.970905091314.5991C-100000@gateway>
+ Files: perl.c
+
+ Title: "debugger to fix core dumps, adds $^S"
+ From: Ilya Zakharevich <ilya@math.ohio-state.edu>
+ Msg-ID: <199709170823.EAA21359@monk.mps.ohio-state.edu>
+ Files: pod/perlvar.pod perl.h gv.c lib/perl5db.pl mg.c perl.c toke.c
+
+ Title: "downgrade "my $foo masks earlier" from mandatory to "-w""
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>, Stephen Potter
+ <spp@psa.pencom.com>
+ Msg-ID: <199709091832.NAA14763@psisa.psa.pencom.com>,
+ <199709102019.QAA09591@aatma.engin.umich.edu>
+ Files: pod/perldelta.pod pod/perldiag.pod op.c
+
+ Title: "fix overridden glob() problems"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199709171645.MAA13988@aatma.engin.umich.edu>
+ Files: MANIFEST pod/perlsub.pod lib/File/DosGlob.pm op.c t/lib/dosglob.t
+ toke.c
+
+ Title: "Reverse previous "Fix C<qq #hi#>" patch"
+ From: Chip Salzenberg <chip@rio.atlantic.net>, Kenneth Albanowski
+ <kjahds@kjahds.com>, Tom Christiansen
+ <tchrist@jhereg.perl.com>
+ Msg-ID: <199707050155.VAA27394@rio.atlantic.net>,
+ <199708172326.RAA19344@jhereg.perl.com>,
+ <Pine.LNX.3.93.970817200236.170F-100000@kjahds.com>
+ Files: toke.c
+
+ Title: "printf type warning buglets in m3t2"
+ From: Hallvard B Furuseth <h.b.furuseth@usit.uio.no>
+ Msg-ID: <199708141017.MAA10225@bombur2.uio.no>
+ Files: regcomp.c regexec.c scope.c sv.c util.c x2p/util.c
+
+ Title: "Localize PV value in save_gp()", "typeglob differences in perl4 and
+ perl5"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>, Stephen McCamant
+ <alias@mcs.com>
+ Msg-ID: <199708272348.TAA03139@aatma.engin.umich.edu>,
+ <m0x4AUk-000EUJC@alias-2.pr.mcs.net>
+ Files: scope.c t/op/ref.t
+
+ Title: "unpack now allows commas but -w warns", "unpack() difference
+ 5.003->5.004"
+ From: "John L. Allen" <allen@gateway.grumman.com>, Chip Salzenberg
+ <chip@rio.atlantic.net>, Jarkko Hietaniemi <jhi@iki.fi>,
+ Jim Esten <jesten@wdynamic.com>, Jim Esten
+ <jesten@wepco.com>, timbo (Tim Bunce)
+ Msg-ID: <199709031632.LAA29584@wepco.com>,
+ <199709090257.WAA32670@rio.atlantic.net>,
+ <199709090917.MAA05602@alpha.hut.fi>,
+ <199709091000.LAA24094@toad.ig.co.uk>,
+ <341077FE.132F@wdynamic.com>,
+ <Pine.SOL.3.91.970905171243.14630A-100000@gateway>
+ Files: pod/perldiag.pod pp.c
+
+ Title: "5.004_04 trial 1 assorted minor details"
+ From: Hallvard B Furuseth <h.b.furuseth@usit.uio.no>
+ Msg-ID: <HBF.970921p5f6@bombur2.uio.no>
+ Files: Porting/pumpkin.pod hv.c op.c sv.c x2p/util.c
+
+ Title: "A couple of 4_04t1 problems"
+ From: pmarquess@bfsec.bt.co.uk (Paul Marquess)
+ Msg-ID: <9709210959.AA28772@claudius.bfsec.bt.co.uk>
+ Files: lib/Cwd.pm perl.c
+
+ Title: "Minor changes to ease port to MVS"
+ From: Len Johnson <lenjay@ibm.net>, SMTP%"BAHUFF@us.oracle.com" ,
+ SMTP%"pfuntner@vnet.ibm.com" , pvhp@forte.com (Peter
+ Prymmer)
+ Msg-ID: <199709162058.NAA00952@mailsun2.us.oracle.com>
+ Files: unixish.h miniperlmain.c
+
+ Title: "Truer version string and more robust perlbug"
+ From: "Michael A. Chase" <mchase@ix.netcom.com>, Hugo van der Sanden
+ <hv@crypt.compulink.co.uk>
+ Msg-ID: <199709201514.QAA21187@crypt.compulink.co.uk>,
+ <1997Sep22.090701.2297448@cor.newman>
+ Files: perl.c utils/perlbug.PL
+
+ Title: "Fix locale bug for constant (readonly) strings"
+ From: Jarkko Hietaniemi <jhi@iki.fi>
+ Msg-ID: <199709262125.AAA28292@alpha.hut.fi>
+ Files: sv.c t/pragma/locale.t
+
+ Title: "Enable truly global glob()"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199710080000.UAA18972@aatma.engin.umich.edu>
+ Files: op.c
+
+ Title: "Fix for $0 truncation"
+ From: Tim Bunce <Tim.Bunce@ig.co.uk>
+ Msg-ID: <199710081703.SAA02653@toad.ig.co.uk>
+ Files: mg.c
+
+ Title: "Fix for missing &import leaving stack untidy"
+ From: Chip Salzenberg <salzench@nielsenmedia.com>
+ Msg-ID: <199709282252.SAA22915@nielsenmedia.com>
+ Files: pp_hot.c
+
+ Title: "Larry's proto fix"
+ From: Chip Salzenberg <salzench@nielsenmedia.com>
+ Msg-ID: <199709290004.UAA07559@nielsenmedia.com>
+ Files: op.c t/comp/proto.t
+
+ Title: "Fix bugs with magical arrays and hashes (@ISA)"
+ From: Chip Salzenberg <chip@rio.atlantic.net>
+ Msg-ID: <199709232148.RAA29967@rio.atlantic.net>
+ Files: perl.h proto.h av.c global.sym gv.c mg.c pp.c pp_hot.c scope.c
+ t/op/method.t
+
+ Title: "Perl_debug_log stream used for all DEBUG_*(...) macro uses"
+ From: Nick Ing-Simmons <nik@tiuk.ti.com>, Tim Bunce
+ Msg-ID: <199709230820.JAA11945@tiuk.ti.com>
+ Files: perl.c taint.c util.c
+
+ Title: "Tainting bitwise vector ops"
+ From: Chip Salzenberg <chip@rio.atlantic.net>
+ Msg-ID: <199710061726.NAA16438@rio.atlantic.net>
+ Files: doop.c t/op/taint.t
+
+ Title: "Enhance $^E on OS/2"
+ From: Ilya Zakharevich <ilya@math.ohio-state.edu>
+ Msg-ID: <199709232236.SAA04463@monk.mps.ohio-state.edu>
+ Files: pod/perlvar.pod mg.c os2/Changes
+
+ Title: "option "!#... -- ..." in perl 5.004.03 seems not to work"
+ From: "John L. Allen" <allen@gateway.grumman.com>, Urs Thuermann
+ <urs@isnogud.escape.de>
+ Msg-ID: <199709232030.WAA30425@isnogud.escape.de>,
+ <Pine.SOL.3.91.970930105158.10789A-100000@gateway>
+ Files: perl.c
+
+ Title: "syswrite will again write a zero length buffer"
+ From: Cameron Simpson <cs@zip.com.au>, Jarkko Hietaniemi <jhi@iki.fi>,
+ aml@world.std.com (Andrew M. Langmead)
+ Msg-ID: <199710042107.AAA28561@alpha.hut.fi>,
+ <19971007104652-cameron-1-10391@sid.research.canon.com.au>
+ Files: pp_sys.c
+
+ Title: "make Odd number of elements in hash list warning non-mandatory"
+ From: Jason Varsoke {81530} <jjv@caesun10.msd.ray.com>
+ Msg-ID: <199710021651.MAA15690@caesun7.msd.ray.com>
+ Files: pp.c pp_hot.c
+
+ Title: "Fix defined() bug in m4t3 affecting LWP"
+ From: chip@atlantic.net@ig.co.uk ()
+ Msg-ID: <199710101822.OAA14249@cyprus.atlantic.net>
+ Files: pp.c
+
+ Title: "Include $archname in perl -v output"
+ From: Tim Bunce <Tim.Bunce@ig.co.uk>
+ Files: perl.c
+
+ Title: "-I flag can easily lead to whitespace in @INC"
+ From: Kenneth Stephen <y2kmvs@us.ibm.com>, Tim Bunce <Tim.Bunce@ig.co.uk>,
+ pvhp@forte.com (Peter Prymmer)
+ Msg-ID: <199710130922.KAA07780@toad.ig.co.uk>,
+ <5040400007001448000002L082*@MHS>,
+ <9710132015.AA12457@forte.com>
+ Files: perl.c
+
+ ------ DOCUMENTATION ------
+
+ Title: "perldiag.pod: gotcha in short pattern/char ops"
+ From: Jarkko Hietaniemi <jhi@iki.fi>
+ Msg-ID: <199709050718.KAA31405@alpha.hut.fi>
+ Files: pod/perldiag.pod
+
+ Title: "Documenting the perl-thanks address"
+ From: Tom Phoenix <rootbeer@teleport.com>
+ Msg-ID: <Pine.GSO.3.96.970913064628.12359F-100000@julie.teleport.com>
+ Files: pod/perl.pod
+
+ Title: "Missing section for @_ in perlvar."
+ From: abigail@fnx.com (Abigail)
+ Msg-ID: <199708142146.RAA13146@fnx.com>
+ Files: pod/perlvar.pod
+
+ Title: "Promised information about AvHASH in perguts is not delivered"
+ From: mjd@plover.com
+ Files: pod/perlguts.pod
+
+ Title: "perlfunc.doc - $_ aliasing in map, grep, foreach etc"
+ From: Ted Ashton <ashted@southern.edu>
+ Msg-ID: <199708181852.OAA15901@ns.southern.edu>
+ Files: pod/perlfunc.pod
+
+ Title: "-U Unsafe operations need -w to warn"
+ From: Tom Phoenix <rootbeer@teleport.com>
+ Msg-ID: <Pine.GSO.3.96.970826141343.13463h-100000@julie.teleport.com>
+ Files: pod/perlrun.pod
+
+ Title: "document the return value of syscall"
+ From: Hans Mulder <hansm@icgned.nl>
+ Msg-ID: <1997Sep7.160817.2297395@cor.newman>
+ Files: pod/perlfunc.pod
+
+ Title: "minor fix for perltrap.pod"
+ From: abigail@fnx.com (Abigail)
+ Msg-ID: <199709170500.BAA14805@fnx.com>
+ Files: pod/perltrap.pod
+
+ Title: "xsubpp: document advanced dynamic typemap usage"
+ From: "Rujith S. de Silva" <desilva@netbox.com>
+ Files: pod/perlxs.pod
+
+ Title: "Improved diagnostic docs for here-documents"
+ From: Tom Phoenix <rootbeer@teleport.com>
+ Msg-ID: <Pine.GSO.3.96.970921074004.21358G-100000@julie.teleport.com>
+ Files: pod/perldiag.pod
+
+ Title: "[POD patch] do-FILE forces scalar context."
+ From: Robin Houston <robin@oneworld.org>
+ Msg-ID: <199709221553.QAA28409@carryon.oneworld.org>
+ Files: pod/perlfunc.pod
+
+ Title: "perlop.pop. Behaviour of C<qq#hi#> vs C<qq #hi#>."
+ From: abigail@fnx.com (Abigail)
+ Msg-ID: <199709220107.VAA27064@fnx.com>
+ Files: pod/perlop.pod
+
+ Title: "Clarify exec docs in perlfunc.pod"
+ From: Hugo van der Sanden <hv@crypt.compulink.co.uk>
+ Msg-ID: <199710081353.OAA00834@crypt.compulink.co.uk>
+ Files: pod/perlfunc.pod
+
+ Title: "Documentation patch for perlguts.pod--document tainting routines"
+ From: Dan Sugalski <sugalskd@osshe.edu>
+ Msg-ID: <3.0.3.32.19971007165226.02fd2cd4@osshe.edu>
+ Files: pod/perlguts.pod
+
+ Title: "Man perlfunc: incorrect split example"
+ From: Joerg Porath <Joerg.Porath@informatik.tu-chemnitz.de>
+ Msg-ID: <199709240620.IAA30928@pandora.hrz.tu-chemnitz.de>
+ Files: pod/perlfunc.pod
+
+ Title: "Improve "Use of inherited AUTOLOAD for non-method" disgnostic"
+ From: rjray@uswest.com (Randy J. Ray)
+ Msg-ID: <199709231710.LAA08854@tremere.ecte.uswc.uswest.com>
+ Files: pod/perldiag.pod
+
+ Title: "Document split-with-limit on empty string perl4/perl5 change"
+ From: "M.J.T. Guy" <mjtg@cus.cam.ac.uk>, Gisle Aas <aas@bergen.sn.no>, Hugo
+ van der Sanden <hv@crypt.compulink.co.uk>
+ Msg-ID: <199709221419.PAA03987@crypt.compulink.co.uk>,
+ <hiuvttdkv.fsf@bergen.sn.no>
+ Files: pod/perlfunc.pod pod/perltrap.pod URI/URL/http.pm t/op/split.t
+
+ Title: "Clarify close() docs"
+ From: Ilya Zakharevich <ilya@math.ohio-state.edu>
+ Msg-ID: <199710081653.MAA20611@monk.mps.ohio-state.edu>
+ Files: pod/perlfunc.pod
+
+ Title: "perldiag log & sqrt - refer to Math::Complex package"
+ From: Jarkko Hietaniemi <jhi@cc.hut.fi>
+ Msg-ID: <199710042129.AAA20367@alpha.hut.fi>
+ Files: pod/perldiag.pod
+
+ Title: "perlfunc.pod: sysread, syswrite docs"
+ From: Jarkko Hietaniemi <jhi@cc.hut.fi>
+ Msg-ID: <199710061910.WAA15266@alpha.hut.fi>
+ Files: pod/perlfunc.pod
+
+ Title: "Document //gc"
+ From: abigail@fnx.com (Abigail)
+ Msg-ID: <199709232302.TAA27947@fnx.com>
+ Files: pod/perlop.pod
+
+ Title: "repeating #! switches"
+ From: Chip Salzenberg <chip@rio.atlantic.net>, Robin Barker
+ <rmb1@cise.npl.co.uk>
+ Msg-ID: <199709241736.NAA25855@rio.atlantic.net>,
+ <24778.9709241501@tempest.cise.npl.co.uk>
+ Files: pod/perlrun.pod
+
+ Title: "Re: taint documentation bug"
+ From: Ken Estes <estes@ms.com>, Tom Phoenix <rootbeer@teleport.com>
+ Msg-ID: <Pine.GSO.3.96.971006121349.10551X-100000@usertest.teleport.com>
+ Files: pod/perlsec.pod
+
+ ------ LIBRARY AND EXTENSIONS ------
+
+ Title: "FileHandle.pm fails if Exporter has not been loaded previously"
+ From: jan.dubois@ibm.net (Jan Dubois)
+ Msg-ID: <3445e05b.17874041@smtp2.ibm.net>
+ Files: lib/FileHandle.pm
+
+ Title: "Prefer startperl path over perlpath in MakeMaker"
+ From: Andreas Klussmann <andreas@infosys.heitec.de>
+ Msg-ID: <199709162017.WAA05043@troubadix.infosys.heitec.net>
+ Files: lib/ExtUtils/MM_Unix.pm
+
+ Title: "Sys::Hostname fails under Solaris 2.5 when setuid"
+ From: Patrick Hayes <Patrick.Hayes.CAP_SESA@renault.fr>
+ Msg-ID: <199708201240.OAA04243@goblin.renault.fr>
+ Files: lib/Sys/Hostname.pm
+
+ Title: "Cwd::getcwd cannot handle path contains '0' element"
+ From: Hironori Ikura <hikura@tcc.co.jp>, Hironori Ikura
+ <hikura@trans-nt.com>, Stephen Zander <srz@mckesson.com>
+ Msg-ID: <19970830060142J.hikura@matsu.tcc.co.jp>,
+ <m0x4TzI-0003F1C@wsuse5.mckesson.com>
+ Files: lib/Cwd.pm
+
+ Title: "Getopt::Long 2.11"
+ From: JVromans@squirrel.nl (Johan Vromans)
+ Msg-ID: <m0xBcdR-000RArC@plume.nl.compuware.com>
+ Files: lib/Getopt/Long.pm
+
+ Title: "IO::Socket autoflush by default, assume tcp and PeerAddr"
+ From: "M.J.T. Guy" <mjtg@cus.cam.ac.uk>, Andy Dougherty
+ <doughera@newton.phys.lafayette.edu>, Gisle Aas
+ <aas@bergen.sn.no>
+ Msg-ID: <E0x9WpH-0003HT-00@ursa.cus.cam.ac.uk>,
+ <Pine.SUN.3.96.970915115856.23236F-100000@newton.phys>,
+ <hvi07zvo9.fsf@bergen.sn.no>
+ Files: ext/IO/lib/IO/Socket.pm
+
+ Title: "Syslog.pm and missing _PATH_LOG"
+ From: Ulrich Pfeifer <upf@de.uu.net>
+ Msg-ID: <p5iuw1cris.fsf@knowway.de.uu.net>
+ Files: lib/Sys/Syslog.pm
+
+ Title: "Undocumented: $Test::Harness::switches"
+ From: Achim Bohnet <ach@mpe.mpg.de>
+ Msg-ID: <9708272110.AA26904@o09.xray.mpe.mpg.de>
+ Files: lib/Test/Harness.pm
+
+ Title: "Patches for lib/Math/Complex.pm and t/lib/complex.t"
+ From: Jarkko Hietaniemi <jhi@anna.in-berlin.de>
+ Msg-ID: <199709102009.WAA27428@anna.in-berlin.de>
+ Files: lib/Math/Complex.pm t/lib/complex.t
+
+ Title: "Win32: Install.pm not correctly comparing binary files."
+ From: Jeff Urlwin <jurlwin@access.digex.net>
+ Msg-ID: <01BCBFAA.E325C4A0.jurlwin@access.digex.net>
+ Files: lib/ExtUtils/Install.pm
+
+ Title: "Document that File::Find doesn't follow symlinks"
+ From: Greg Ward <greg@bic.mni.mcgill.ca>
+ Msg-ID: <199708191853.OAA07111@bottom.bic.mni.mcgill.ca>
+ Files: lib/File/Find.pm
+
+ Title: "fix subroutines called in a void context in perl5db.pl"
+ From: "M.J.T. Guy" <mjtg@cus.cam.ac.uk>
+ Msg-ID: <E0x6Gsa-0004VR-00@ursa.cus.cam.ac.uk>
+ Files: lib/perl5db.pl
+
+ Title: "xsubpp fix to allow #ifdef's around entire XSubs"
+ From: John Tobey <jtobey@user1.channel1.com>
+ Msg-ID: <199709070034.AAA16457@remote119>
+ Files: lib/ExtUtils/xsubpp
+
+ Title: "Banishing eval from getopt.pl and Getopt/Std.pm"
+ From: "John L. Allen" <allen@gateway.grumman.com>
+ Msg-ID: <Pine.SOL.3.91.970920154720.3683A@gateway>
+ Files: lib/getopt.pl lib/Getopt/Std.pm
+
+ Title: "further complex number patches"
+ From: Jarkko Hietaniemi <jhi@iki.fi>, d-lewart@uiuc.edu (Daniel S. Lewart)
+ Msg-ID: <199709221009.FAA21216@staff2.cso.uiuc.edu>,
+ <199709221216.PAA15130@alpha.hut.fi>
+ Files: lib/Math/Complex.pm t/lib/complex.t
+
+ Title: "Trap Time::Local infinite loop"
+ From: Hugo van der Sanden <hv@crypt.compulink.co.uk>
+ Msg-ID: <199710030030.BAA17372@crypt.compulink.co.uk>
+ Files: lib/Time/Local.pm
+
+ Title: "Cosmetic Test::Harness patch"
+ From: Ilya Zakharevich <ilya@math.ohio-state.edu>
+ Msg-ID: <199710032226.SAA15354@monk.mps.ohio-state.edu>
+ Files: lib/Test/Harness.pm
+
+ Title: "ExtUtil::Install sub my_cmp needs to binmode its files"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>, Stephen Potter
+ <spp@psa.pencom.com>
+ Msg-ID: <199710010617.BAA02037@psisa.psa.pencom.com>,
+ <199710011819.OAA03288@aatma.engin.umich.edu>
+ Files: lib/ExtUtils/Install.pm
+
+ Title: "Enable make test "TEST_FILES=t/*.t.were_failing""
+ From: Ilya Zakharevich <ilya@math.ohio-state.edu>
+ Msg-ID: <199710032231.SAA15364@monk.mps.ohio-state.edu>
+ Files: lib/ExtUtils/MM_Unix.pm
+
+ Title: "Fix for autouse.pm"
+ From: Ilya Zakharevich <ilya@math.ohio-state.edu>
+ Msg-ID: <199710071734.NAA19462@monk.mps.ohio-state.edu>
+ Files: lib/autouse.pm
+
+ Title: "Math::Complex fixes - fixes problems on m68-linux"
+ From: Jarkko Hietaniemi <jarkko.hietaniemi@research.nokia.com>
+ Msg-ID: <199709301422.HAA24368@koah.research.nokia.com>
+ Files: lib/Math/Complex.pm
+
+ Title: "Updated CPAN.pm for 5.004_04"
+ From: koenig@anna.mind.de (Andreas J. Koenig)
+ Msg-ID: <sfcpvpv8teo.fsf@anna.in-berlin.de>
+ Files: lib/CPAN.pm lib/CPAN/FirstTime.pm
+
+ Title: "debugger bug with 'c subname'"
+ From: Ilya Zakharevich <ilya@math.ohio-state.edu>
+ Msg-ID: <199709232331.TAA04546@monk.mps.ohio-state.edu>
+ Files: lib/perl5db.pl
+
+ Title: "Fix atan2 & restrict $t to (-pi,pi] instead of to [-pi,pi]"
+ From: Daniel S. Lewart, Jarkko Hietaniemi
+ <jarkko.hietaniemi@research.nokia.com>
+ Msg-ID: <199710010939.CAA00964@koah.research.nokia.com>
+ Files: lib/Math/Complex.pm
+
+ Title: "Cwd::fastcwd needs changes to work with tainting"
+ From: Hugo van der Sanden <hv@crypt.compulink.co.uk>, Ulrich Pfeifer
+ <pfeifer@wait.de>, Tim Bunce
+ Msg-ID: <yfmwwk6y0bc.ulp@gretchen.informatik.uni-dortmund.de>
+ Files: lib/Cwd.pm
+
+ Title: "use autouse: requires prototype now"
+ From: user@agate.berkeley.edu
+ Msg-ID: <9709220450.AA0380@tuzik.HIP.Berkeley.EDU>
+ Files: lib/autouse.pm
+
+ Title: ""use base qw(Foo Bar);" to set @ISA at compile time"
+ From: Gisle Aas <gisle@aas.no>, Graham Barr <gbarr@pobox.com>, Graham Barr
+ <gbarr@ti.com>, Tim Bunce <Tim.Bunce@ig.co.uk>,
+ jan.dubois@ibm.net (Jan Dubois), larry@wall.org (Larry
+ Wall)
+ Msg-ID: <199710022151.WAA21250@toad.ig.co.uk>,
+ <199710031613.JAA11286@wall.org>,
+ <199710040829.KAA16739@furu.g.aas.no>,
+ <3434E4C6.AE24135E@ti.com>, <343C2278.7DC1ADC6@pobox.com>,
+ <343ec306.50394803@smtp-gw01.ny.us.ibm.net>
+ Files: lib/base.pm
+
+ Title: "Further Math/Complex.pm enhancements"
+ From: Jarkko Hietaniemi <jhi@iki.fi>
+ Msg-ID: <199710132055.XAA02086@alpha.hut.fi>
+ Files: lib/Math/Complex.pm t/lib/complex.t
+
+ Title: "Further Math::Complex fixes"
+ From: Jarkko Hietaniemi <jhi@iki.fi>
+ Msg-ID: <199710120933.MAA01165@alpha.hut.fi>
+ Files: lib/Math/Complex.pm
+
+ ------ OTHER CHANGES ------
+
+ Title: "POD patches w.r.t. $^S"
+ From: Ilya Zakharevich <ilya@math.ohio-state.edu>
+ Msg-ID: <199710030001.UAA14241@monk.mps.ohio-state.edu>
+ Files: ../pod/perlfunc.pod ../pod/perlvar.pod
+
+ Title: "libperl.sl on HP-UX 10.20"
+ From: "Darren/Torin/Who Ever..." <torin@daft.com>, Hugo van der Sanden
+ <hv@crypt.compulink.co.uk>
+ Msg-ID: <199709250003.BAA18085@crypt.compulink.co.uk>,
+ <873emkbpit.fsf@perv.daft.com>
+ Files:
+
+ Title: "myconfig / perl -V: remove randbits and add prototype"
+ From: Tim Bunce <Tim.Bunce@ig.co.uk>
+ Msg-ID: <199709290857.JAA07706@toad.ig.co.uk>
+ Files: myconfig
+
+ Title: "Emacs CPerl update for 5.004_04"
+ From: Ilya Zakharevich <ilya@math.ohio-state.edu>
+ Msg-ID: <199710140835.EAA26825@monk.mps.ohio-state.edu>
+ Files: emacs/cperl-mode.el
+
+ Title: "Enhance perly.fixer to help porters."
+ From: Tim Bunce
+ Files: perly.fixer
+
+ ------ PORTABILITY - WIN32 ------
+
+ Title: "Fix win32/Makefile for perl95"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Files: win32/Makefile win32/makefile.mk
+
+ Title: "Win32 archnames"
+ From: Bill Middleton <wmiddlet@Adobe.COM>, Gurusamy Sarathy
+ <gsar@engin.umich.edu>, Peter Prymmer <pvhp@forte.com>, Tim
+ Bunce <Tim.Bunce@ig.co.uk>
+ Msg-ID: <199709111929.PAA22488@aatma.engin.umich.edu>,
+ <341719E4.4923@forte.com>,
+ <Pine.GSO.3.95.970905123145.12361B-100000@ducks>
+ Files: win32/config_H.bc win32/config_H.vc
+
+ Title: "pl2bat.bat -> pl2bat.pl change in win32/pod.mak"
+ From: jan.dubois@ibm.net (Jan Dubois)
+ Msg-ID: <3411ee6f.9143607@smtp-gw01.ny.us.ibm.net>
+ Files: win32/pod.mak
+
+ Title: "Add test-notty target to Win32 Makefile"
+ From: jan.dubois@ibm.net (Jan Dubois)
+ Msg-ID: <343f5106.12461608@smtp2.ibm.net>
+ Files: win32/Makefile
+
+ Title: "Bug in Win32::GetShortPathName"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199710092229.SAA21556@aatma.engin.umich.edu>
+ Files: win32/win32.c
+
+ Title: "Fix NT handles leak."
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199710111319.JAA10918@aatma.engin.umich.edu>
+ Files: win32/win32io.c win32/win32sck.c
+
+ Title: "fix socket init duality on win32"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199710111523.LAA12407@aatma.engin.umich.edu>
+ Files: win32/win32sck.c
+
+ ------ PORTABILITY - GENERAL ------
+
+ Title: "Tweak to hints/machten.sh: stop t/lib/complex.t from failing"
+ From: Dominic Dunlop <domo@tcp.ip.lu>
+ Msg-ID: <v03110700b06a30bdfc42@[194.51.248.80]>
+ Files: hints/machten.sh
+
+ Title: "Irix 6.2 build problem - so_locations"
+ From: "Billinghurst, David" <David.Billinghurst@riotinto.com.au>
+ Msg-ID: <D54B1932FFB4CF11B5C80000F8018BD2907E31@CRCMAIL>
+ Files: hints/irix_6.sh
+
+ Title: "Porting/pumpkin.pod version 1.13"
+ From: Andy Dougherty <doughera@newton.phys.lafayette.edu>
+ Msg-ID: <Pine.SUN.3.96.970828142011.27416A-100000@newton.phys>
+ Files: Porting/pumpkin.pod
+
+ Title: "lib/timelocal.t fails test 1 for VMS 7.1"
+ From: Dan Sugalski <sugalsd@lbcc.cc.or.us>
+ Msg-ID: <3.0.3.32.19970908112449.0087bc90@stargate.lbcc.cc.or.us>
+ Files: vms/vmsish.h vms/vms.c
+
+ Title: "Patches to updated README.VMS for Perl 5.004_04"
+ From: Dan Sugalski <sugalsd@stargate.lbcc.cc.or.us>
+ Msg-ID: <3.0.3.32.19970918100648.008b1c60@stargate.lbcc.cc.or.us>
+ Files: README.vms
+
+ Title: "Fix perl build on Digital UNIX after JDK installs libnet.so"
+ From: Spider Boardman <spider@orb.nashua.nh.us>
+ Msg-ID: <199709191826.OAA18040@Orb.Nashua.NH.US>
+ Files: hints/dec_osf.sh
+
+ Title: "Updated README.VMS for Perl 5.004_04"
+ From: Dan Sugalski <sugalsd@stargate.lbcc.cc.or.us>
+ Msg-ID: <3.0.3.32.19970912091524.008a3620@stargate.lbcc.cc.or.us>
+ Files: README.vms
+
+ Title: "Dynixptx hints"
+ From: bruce@aps.org ("Bruce P. Schuck")
+ Msg-ID: <Pine.PTX.3.95.971002104651.12112G-200000@lancelot.aps.org>
+ Files: hints/dynixptx.sh
+
+ Title: "Minor OS/2 patch for 4_03"
+ From: Ilya Zakharevich <ilya@math.ohio-state.edu>
+ Msg-ID: <199710032224.SAA15345@monk.mps.ohio-state.edu>
+ Files: os2/os2.c
+
+ Title: "OS2::REXX improvements"
+ From: Ilya Zakharevich <ilya@math.ohio-state.edu>
+ Msg-ID: <199709272214.SAA08638@monk.mps.ohio-state.edu>
+ Files: os2/Changes os2/OS2/REXX/Makefile.PL os2/OS2/REXX/REXX.pm
+
+ Title: "hints/qnx.sh update"
+ From: Norton Allen <allen@huarp.harvard.edu>
+ Msg-ID: <199709261508.LAA07889@dolores.harvard.edu>
+ Files: hints/qnx.sh
+
+ Title: "New hints file for IBM OS/390 OpenEdition (MVS)"
+ From: pvhp@forte.com (Peter Prymmer)
+ Msg-ID: <9709240106.AA26484@forte.com>
+ Files: hints/os390.sh
+
+ Title: "OS/2 Hints"
+ From: Ilya Zakharevich <ilya@math.ohio-state.edu>
+ Msg-ID: <199710130631.CAA25426@monk.mps.ohio-state.edu>
+ Files: hints/os2.sh
+
+ ------ TESTS ------
+
+ Title: "op/glob.t test failure under Win32 with CVS"
+ From: Warren Jones <wjones@tc.fluke.com>
+ Msg-ID: <97Aug26.091048pdt.35761-1@gateway.fluke.com>
+ Files: t/op/glob.t
+
+ Title: "tests fail if localhost/loopback address not defined"
+ From: David McLean <David McLean<davem@icc.gsfc.nasa.gov>>, David McLean
+ <davem@icc.gsfc.nasa.gov>
+ Msg-ID: <34048947.2944@icc.gsfc.nasa.gov>
+ Files: t/lib/io_sock.t t/lib/io_udp.t
+
+ Title: "Improve pragma/locale test 102 - and don't fail, just warn"
+ From: Jarkko Hietaniemi <jhi@anna.in-berlin.de>
+ Files: t/pragma/locale.t
+
+ Title: "Invalid test output in t/op/taint.t in trial 1"
+ From: Dan Sugalski <sugalsd@lbcc.cc.or.us>
+ Msg-ID: <3.0.3.32.19970919160918.00857a50@stargate.lbcc.cc.or.us>
+ Files: t/op/taint.t
+
+ Title: "Identify t/*/*.t test failing because of file permissions"
+ From: koenig@anna.mind.de (Andreas J. Koenig)
+ Msg-ID: <sfcraah0xvy.fsf@anna.in-berlin.de>
+ Files: t/TEST
+
+ Title: "fix poor t/op/runlevel.t test"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>, Hugo van der Sanden
+ <hv@crypt.compulink.co.uk>, Norton Allen
+ <allen@huarp.harvard.edu>
+ Msg-ID: <199709261458.KAA28611@dolores.harvard.edu>
+ Files: t/op/runlevel.t
+
+ ------ UTILITIES ------
+
+ Title: "Missing 'require' in auto-generated .pm by h2xs"
+ From: davidk@tor.securecomputing.com (David Kerry)
+ Msg-ID: <97Aug27.131618edt.11650@janus.tor.securecomputing.com>
+ Files: utils/h2xs.PL
+
+ Title: "Perldoc tiny patch to avoid $0"
+ From: Ilya Zakharevich <ilya@math.ohio-state.edu>
+ Msg-ID: <199709122141.RAA16846@monk.mps.ohio-state.edu>
+ Files: utils/perldoc.PL
+
+ Title: "h2ph broken in 5.004_02"
+ From: David Mazieres <dm@reeducation-labor.lcs.mit.edu>,
+ kstar@www.chapin.edu (Kurt D. Starsinic)
+ Msg-ID: <199708201454.KAA05122@reeducation-labor.lcs.mit.edu>,
+ <199708201700.KAA02621@www.chapin.edu>
+ Files: utils/h2ph.PL
+
+ Title: "add key_t caddr_t to h2ph", "eg/sysvipc/ipcsem bug", "update
+ hints/bsdos.sh"
+ From: Tony Sanders <sanders@bsdi.com>
+ Msg-ID: <199708272301.RAA12803@austin.bsdi.com>
+ Files: eg/sysvipc/ipcsem utils/h2ph.PL
+
+ Title: "perldoc search ., lib and blib/* if -f 'Makefile.PL'"
+ From: Tim Bunce
+ Msg-ID: <199708251732.KAA19299@gadget.cscaper.com>
+ Files: utils/perldoc.PL
+
+ Title: "5.004m4t1: perlbug: NIS domainname gets into wrong places"
+ From: koenig@anna.mind.de (Andreas J. Koenig)
+ Msg-ID: <sfcg1qy38as.fsf@anna.in-berlin.de>
+ Files: utils/perlbug.PL
+
+ Title: "add better local patch info to perlbug", "perlbug checks perl
+ build/run version changes"
+ From: Tim.Bunce@ig.co.uk
+ Files: utils/perlbug.PL
+
+ Title: "perldoc - suggest modules if requested module not found"
+ From: Anthony David <adavid@netinfo.com.au>
+ Msg-ID: <3439CD83.6969@netinfo.com.au>
+ Files: utils/perldoc.PL
+
+ Title: "perldoc mail::foo tries to read binary /usr/ucb/mail"
+ From: "Joseph Moof-in' Hall" <joseph@cscaper.com>, Tim Bunce
+ Msg-ID: <199710082014.NAA00808@gadget.cscaper.com>
+ Files: utils/perldoc.PL
+
+ Title: "perldoc -f setpwent (for example) returns no descriptive text"
+ From: Tim Bunce
+ Files: utils/perldoc.PL
+
+ Title: "perldoc diffs: don't search auto - much faster"
+ From: "Joseph N. Hall" <joseph@5sigma.com>
+ Msg-ID: <MailDrop1.2d7dPPC.971012211957@screechy.cscaper.com>
+ Files: utils/perldoc.PL
+
+
+
+----------------
+Version 5.004_03 Maintenance release 3 for 5.004
+----------------
+
+"To err is human, to forgive divine."
+ -- Alexander Pope
+
+
+ HEADLINES FOR THIS MAINTENANCE RELEASE
+
+ Fixed 5.004_02 compilation failure on VMS.
+ Fixed Configure (non)errors being displayed to user.
+ Better support for Windows 95.
+ Assorted documentation and hint file improvements.
+ perl --foo no longer silently ignored.
+
+
+ ------ BUILD PROCESS ------
+
+ Title: "Show Configure failure reason even with -s"
+ From: Andy Dougherty <doughera@newton.phys.lafayette.edu>
+ Msg-ID: <Pine.SUN.3.96.970812141623.14256K-100000@newton.phys>
+ Files: Configure
+
+ Title: "Configure can stop without fully explaining itself"
+ From: Jim Anderson <jander@ml.com>
+ Msg-ID: <199708111328.JAA28976@nsd15.ny-swaps-develop.ml.com>,
+ <199708111952.PAA29346@nsd15.ny-swaps-develop.ml.com>
+ Files: Configure
+
+ ------ CORE LANGUAGE ------
+
+ Title: "typos in perl -h output"
+ From: "Richard A. Wells" <Rwells@uhs.harvard.edu>
+ Msg-ID: <6D0BF914BC@gateuhs.harvard.edu>
+ Files: perl.c
+
+ Title: "Some perldb -> PERLDB_* macro changes were missed"
+ From: Ilya Zakharevich <ilya@math.ohio-state.edu>
+ Msg-ID: <199708100323.XAA27155@monk.mps.ohio-state.edu>
+ Files: pp_ctl.c
+
+ Title: "Further fix to lseek's in lockf_emulate_flock"
+ From: Hallvard B Furuseth <h.b.furuseth@usit.uio.no>
+ Msg-ID: <199708060031.CAA07387@bombur2.uio.no>,
+ <199708102225.AAA16970@bombur2.uio.no>
+ Files: pp_sys.c
+
+ Title: "GNU style perl --version (or any other --foo) ignored"
+ From: "M.J.T. Guy" <mjtg@cus.cam.ac.uk>, Kenneth Albanowski
+ <kjahds@kjahds.com>, Stephen McCamant <alias@mcs.com>
+ Msg-ID: <E0wx8MO-0007BS-00@ursa.cus.cam.ac.uk>,
+ <Pine.LNX.3.93.970813122557.9443C-100000@kjahds.com>,
+ <m0wy8nl-000EYgC@alias-2.pr.mcs.net>
+ Files: pod/perldiag.pod perl.c
+
+ Title: "seen_dot declaration in perl.c needed for VMS"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199708072033.QAA09167@aatma.engin.umich.edu>
+ Files: perl.c
+
+ ------ DOCUMENTATION ------
+
+ Title: "[PATCH] -D info in perlrun", "[PATCH] Re: -D info in perlrun"
+ From: Stephen McCamant <alias@mcs.com>, ilya@math.ohio-state.edu (Ilya
+ Zakharevich)
+ Msg-ID: <1997Aug10.195832.2224477@hmivax.humgen.upenn.edu>,
+ <m0wxNNL-000EYgC@alias-2.pr.mcs.net>,
+ <m0wxz6l-000EYgC@alias-2.pr.mcs.net>
+ Files: pod/perlrun.pod
+
+ Title: "perlop pod inconsistent in presentation of regexp options"
+ From: "M.J.T. Guy" <mjtg@cus.cam.ac.uk>, Hans Mulder <hansm@icgned.nl>,
+ jmr@whirlwind.fmr.com
+ Msg-ID: <199708061404.KAA06717@whirlwind.fmr.com>,
+ <199708081505.LAA09810@whirlwind.fmr.com>,
+ <1997Aug7.160530.2196011@hmivax.humgen.upenn.edu>,
+ <E0wwnqc-00057s-00@ursa.cus.cam.ac.uk>,
+ <E0wwswg-00017x-00@ursa.cus.cam.ac.uk>
+ Files: pod/perlop.pod
+
+ Title: "pod2man generated .IX lines upset whatis on Solaris"
+ From: "M.J.T. Guy" <mjtg@cus.cam.ac.uk>, jmr@whirlwind.fmr.com (John
+ Redford)
+ Msg-ID: <E0wxoUZ-0006Ee-00@ursa.cus.cam.ac.uk>
+ Files: pod/pod2man.PL
+
+ Title: "The description of the \Q metacharacter is confusing to novices"
+ From: aml@world.std.com (Andrew M. Langmead)
+ Msg-ID: <199708101946.AA06339@world.std.com>
+ Files: pod/perlre.pod
+
+ Title: "doc patch for pack("p",undef) packing a NULL pointer"
+ From: pmarquess@bfsec.bt.co.uk (Paul Marquess)
+ Msg-ID: <9708102159.AA11726@claudius.bfsec.bt.co.uk>
+ Files: pod/perldelta.pod pod/perlfunc.pod
+
+ Title: "perlfunc.pod error"
+ From: Tom Christiansen <tchrist@jhereg.perl.com>
+ Msg-ID: <199708102235.QAA18420@jhereg.perl.com>
+ Files: pod/perlfunc.pod
+
+ ------ LIBRARY AND EXTENSIONS ------
+
+ Title: "patch for documentation error in FileCache.pm"
+ From: Mike Stok <mike@stok.co.uk>, mikebo@tellabs.com
+ Msg-ID: <Pine.LNX.3.95.970810143321.437C-100000@stok.co.uk>
+ Files: lib/FileCache.pm
+
+ Title: "[PATCH] 5.004_02: Complex/Trig: update"
+ From: Jarkko Hietaniemi <jhi@iki.fi>
+ Msg-ID: <199708081842.VAA31214@alpha.hut.fi>
+ Files: lib/Math/Complex.pm lib/Math/Trig.pm t/lib/complex.t
+
+ Title: "CPAN Use of uninitialized value in newest perl"
+ From: tom@amber.ssd.hcsc.com (Tom Horsley)
+ Msg-ID: <9708091738.AA16435@amber.ssd.hcsc.com>
+ Files: lib/CPAN.pm
+
+ ------ PORTABILITY - WIN32 ------
+
+ Title: "[PATCH] /x is not a valid shell switch on Win95"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199708121720.NAA14760@aatma.engin.umich.edu>
+ Files: win32/win32.c
+
+ Title: "[PATCH] Win95-proofing pl2bat"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199708121733.NAA14888@aatma.engin.umich.edu>
+ Files: MANIFEST win32/Makefile win32/makefile.mk win32/bin/pl2bat.pl
+ win32/bin/runperl.pl win32/bin/search.pl
+ win32/bin/webget.pl
+
+ Title: "[PATCH] [OK] Perl5.004_02 on Alpha NT"
+ From: wmiddlet@adobe.com (William Middleton)
+ Msg-ID: <199708072100.OAA13141@ducks>
+ Files: win32/win32.c
+
+ ------ PORTABILITY - OTHER ------
+
+ Title: "Improve dual-universe comments in hints/sunos_4_1.sh"
+ From: Andy Dougherty <doughera@newton.phys.lafayette.edu>
+ Msg-ID: <Pine.SUN.3.96.970812170358.14488E-100000@newton.phys>
+ Files: hints/sunos_4_1.sh
+
+ Title: "Dynamic Loading on MkLinux (osname=linux,archname=ppc-linux)"
+ From: Chris Nandor <pudge@pobox.com>, Shimpei Yamashita
+ <shimpei@socrates.patnet.caltech.edu>
+ Msg-ID: <33EF1634.B36B6500@pobox.com>
+ Files: hints/linux.sh
+
+ Title: "5.004_02 Configure - worrying but normal errors displayed to user"
+ From: Paul Marquess <pmarquess@bfsec.bt.co.uk>, pmarquess@bfsec.bt.co.uk
+ (Paul Marquess)
+ Msg-ID: <01BCA3DE.E257BFC0.pmarquess@bfsec.bt.co.uk>,
+ <9708102159.AA11726@claudius.bfsec.bt.co.uk>
+ Files: Configure os2/diff.configure
+
+ Title: "Minor glitch with Perl 5.004_01 on SunOS 4.1.3 (groupstype)"
+ From: thad@thadlabs.com (Thad Floryan)
+ Msg-ID: <9708111415.AA03808@thadlabs.com>
+ Files: hints/sunos_4_1.sh
+
+ Title: "SCO Openserver 5.0.4 - add comment to hint file re compiler bug"
+ From: Bill Glicker <billg@burrelles.com>
+ Msg-ID: <Pine.SCO.3.96.970811153021.18457A-100000@laura.burrelles.com>
+ Files: hints/sco.sh
+
+ ------ UTILITIES ------
+
+ Title: "perlbug -d non-interactive (with patch)"
+ From: Ted Ashton <ashted@southern.edu>
+ Msg-ID: <199708071418.KAA15711@ns.southern.edu>
+ Files: utils/perlbug.PL
+
+
+
+----------------
+Version 5.004_02 Maintenance release 2 for 5.004
+----------------
+
+"When you work you are a flute through whose
+ heart the whispering of the hours turns to music."
+ -- from The Prophet by Kahlil Gibran
+
+
+ HEADLINES FOR THIS MAINTENANCE RELEASE
+
+ Major memory growth bug fixed.
+ Object destruction is more timely and orderly.
+ Further major enhancements to Win32 support, including:
+ Win32 binary compatibility between Visual C++ and Borland C++.
+ The -S option is now more useful on dos/Win32 (see perlrun).
+ Implicit -p print now checks for write errors.
+ DB_File now sub-classable (and other fixes).
+ Memory usage stats available with perl's malloc (see perldelta).
+ 'use UNIVERSAL;' deprecated (see perldelta).
+ Internal integer to string conversions are faster.
+ Carp can be forced to give stack traces (see perldoc Carp).
+ Many other bug fixes and enhancements.
+
+
+ ------ BUILD PROCESS ------
+
+ Title: "[PATCH] m2t3: Configure: cf_time always in C locale"
+ From: Jarkko Hietaniemi <jhi@iki.fi>
+ Msg-ID: <199708061827.VAA09623@alpha.hut.fi>
+ Files: Configure
+
+ Title: "Configure can't find open3 on NeXTstep"
+ From: Andy Dougherty <doughera@newton.phys.lafayette.edu>, hans@icgned.nl
+ (Hans Mulder)
+ Msg-ID: <9706271816.AA10551@ icgned.icgned.nl >
+ Files: Configure
+
+ Title: "Don't use undef value in Config::myconfig"
+ From: "Andreas J. Koenig" <k@sissy.in-berlin.de>, Chip Salzenberg
+ <salzench@nielsenmedia.com>
+ Msg-ID: <199706271525.RAA13517@sissy.in-berlin.de>
+ Files: configpm
+
+ Title: "make Configure recognize powerux hint (perl5.004_01)"
+ From: tom@amber.ssd.hcsc.com (Tom Horsley)
+ Msg-ID: <9707301938.AA08352@amber.ssd.hcsc.com>
+ Files: Configure
+
+ Title: "[PATCH]: HP-UX 10 w/o transition links"
+ From: Jeff Okamoto <okamoto@hpcc123.corp.hp.com>
+ Msg-ID: <199706181851.AA093329906@hpcc123.corp.hp.com>,
+ <199706231650.AA070364627@hpcc123.corp.hp.com>
+ Files: Configure
+
+ Title: "INSTALL updates for GNU ld and __inet_* errors"
+ From: Andy Dougherty <doughera@newton.phys.lafayette.edu>
+ Files: INSTALL
+
+ ------ CORE LANGUAGE ------
+
+ Title: "[PATCH] Additional patch for "Can't execute ...""
+ From: Ilya Zakharevich <ilya@math.ohio-state.edu>
+ Msg-ID: <199707191651.MAA04897@monk.mps.ohio-state.edu>
+ Files: pod/perldiag.pod perl.c
+
+ Title: "[PATCH] Band-aid fix for local([@%]$x)"
+ From: Stephen McCamant <alias@mcs.com>
+ Msg-ID: <m0wsb7J-000EYPC@alias-2.pr.mcs.net>
+ Files: pod/perldiag.pod op.c pp_hot.c t/op/local.t
+
+ Title: "[PATCH] Re: Bug in Regular Expressions when using colon as
+ delimiter"
+ From: "M.J.T. Guy" <mjtg@cus.cam.ac.uk>
+ Msg-ID: <E0wtbhv-0005Mm-00@ursa.cus.cam.ac.uk>
+ Files: pod/perldiag.pod regcomp.c t/op/re_tests t/op/regexp.t
+
+ Title: "[PATCH] Re: Can't pack literals as pointers"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199708012250.SAA20278@aatma.engin.umich.edu>
+ Files: pod/perldiag.pod pod/perlfunc.pod pp.c t/op/pack.t
+
+ Title: "[PATCH] Do not constant-fold ops that depend on locale if C<use
+ locale>"
+ From: Chip Salzenberg <salzench@nielsenmedia.com>
+ Msg-ID: <199707210519.BAA13785@nielsenmedia.com>
+ Files: op.c
+
+ Title: "Eval fails in certain situations (eval "{'...")"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199707211753.NAA14940@aatma.engin.umich.edu>
+ Files: t/comp/term.t toke.c
+
+ Title: "Fix memory leak on eval 'sub {}'"
+ From: Chip Salzenberg <chip@rio.atlantic.net>
+ Files: pp_ctl.c
+
+ Title: "stringify looses integerness"
+ From: Gisle Aas <aas@bergen.sn.no>
+ Msg-ID: <hbu4l96z2.fsf@bergen.sn.no>
+ Files: sv.c
+
+ Title: "Fix intolerance of a space between "print" and opening paren"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199707011421.KAA15836@aatma.engin.umich.edu>
+ Files: toke.c
+
+ Title: "[PATCH] Re: Calling Perl from within C from within Perl"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199706301842.OAA05569@aatma.engin.umich.edu>
+ Files: perl.c
+
+ Title: "UNIVERSAL.pm and import methods (tests)"
+ From: "M.J.T. Guy" <mjtg@cus.cam.ac.uk>
+ Msg-ID: <E0whfHh-0007bW-00@ursa.cus.cam.ac.uk>
+ Files: t/op/universal.t universal.c
+
+ Title: "Avoid core dump on some paren'd regexp matches", "One-liner regex
+ causes SEGV on 5.003 under HP-UX and Linux"
+ From: Hugo van der Sanden <hv@crypt.compulink.co.uk>
+ Msg-ID: <199706261236.NAA03472@crypt.compulink.co.uk>,
+ <199707061144.MAA04443@crypt.compulink.co.uk>
+ Files: regexec.c t/op/re_tests
+
+ Title: "Forbid negative splice offset beyond array start"
+ From: "John L. Allen" <allen@gateway.grumman.com>, Chip Salzenberg
+ <chip@rio.atlantic.net>
+ Msg-ID: <Pine.SOL.3.91.970625111744.19300A-100000@gateway>
+ Files: pp.c
+
+ Title: "Forbid "goto" into middle of foreach loop"
+ From: Chip Salzenberg <chip@rio.atlantic.net>
+ Files: pod/perldiag.pod pp_ctl.c
+
+ Title: "Fix C<qq #hi#>"
+ From: Chip Salzenberg <chip@rio.atlantic.net>
+ Files: toke.c
+
+ Title: "bless file handles as FileHandle if loaded else IO::Handle"
+ From: Gisle Aas <aas@bergen.sn.no>
+ Msg-ID: <hyb80drrz.fsf@bergen.sn.no>
+ Files: gv.c lib/FileHandle.pm
+
+ Title: "infinite recursion in malloc() with some compile flags"
+ From: Hans Mulder <hansmu@xs4all.nl>
+ Msg-ID: <199706240050.CAA10550@xs2.xs4all.nl>
+ Files: malloc.c
+
+ Title: "sv_vcatpvfn hogs memory [Patch included]"
+ From: Matthias Neeracher <neeri@iis.ee.ethz.ch>
+ Msg-ID: <199706211521.RAA12778@solar.ethz.ch>
+ Files: sv.c
+
+ Title: "Fix '-' flag on sprintf() of floats"
+ From: Chip Salzenberg <chip@rio.atlantic.net>, Jarkko Hietaniemi
+ <jhi@iki.fi>
+ Msg-ID: <199705270646.JAA02510@alpha.hut.fi>
+ Files: sv.c
+
+ Title: "Free temps before calling END blocks", "Too late destruction"
+ From: Chip Salzenberg <chip@rio.atlantic.net>
+ Msg-ID: <m33erfv5hx.fsf@chany-p100.emwp.com>
+ Files: perl.c
+
+ Title: "Fix C<print $foo x 2> parsing"
+ From: "Chuck D. Phillips (NON-HP Employee)" <cdp@hpescdp.fc.hp.com>, Chip
+ Salzenberg <chip@rio.atlantic.net>
+ Msg-ID: <199706121737.KAA00503@palrel3.hp.com>
+ Files: toke.c
+
+ Title: "Fix lockf_emulate_flock() positioning"
+ From: Chip Salzenberg <chip@rio.atlantic.net>, gen@atd.rdc.ricoh.co.jp
+ Msg-ID: <199706091132.UAA00895@wampa.atd.rdc.ricoh.co.jp>
+ Files: pp_sys.c
+
+ Title: "Don't use atol() for unsigned values", "signedness problem in
+ pack("N", "value");"
+ From: Chip Salzenberg <chip@rio.atlantic.net>, Roger Espel Llima
+ <espel@llaic.univ-bpclermont.fr>
+ Msg-ID: <19970531200007.40218@llaic.univ-bpclermont.fr>
+ Files: sv.c
+
+ Title: "Don't warn about "${foo}" in string, even if &foo exists"
+ From: Chip Salzenberg <chip@rio.atlantic.net>
+ Files: toke.c
+
+ Title: "[PATCH] -p does not check for failure of implicit print"
+ From: Dominic Dunlop <domo@slipper.ip.lu>
+ Msg-ID: <v0311070aafea3fa83061@[194.51.248.75]>
+ Files: pod/perldiag.pod pod/perlrun.pod toke.c
+
+ Title: "Fix double form() in XS version check"
+ From: Ilya Zakharevich <ilya@math.ohio-state.edu>
+ Msg-ID: <199707150010.UAA00816@monk.mps.ohio-state.edu>
+ Files: XSUB.h
+
+ Title: "Constant-fold sprintf()"
+ From: Chip Salzenberg <salzench@nielsenmedia.com>
+ Files: opcode.pl
+
+ Title: "[PATCH] Fix double form() in XS version check"
+ From: Chip Salzenberg <salzench@nielsenmedia.com>
+ Msg-ID: <199707210518.BAA13771@nielsenmedia.com>
+ Files: XSUB.h
+
+ Title: "[PATCH] Make DEBUGGING_MSTATS info consistent"
+ From: Andy Dougherty <doughera@newton.phys.lafayette.edu>
+ Msg-ID: <Pine.SUN.3.96.970731131529.3740A-100000@newton.phys>
+ Files: INSTALL pod/perldelta.pod perl.h
+
+ Title: "Minor Win32 glitch with -S flag"
+ From: Warren Jones <wjones@tc.fluke.com>
+ Msg-ID: <97Jun19.150511pdt.35717-2@gateway.fluke.com>
+ Files: perl.c
+
+ Title: "Slightly safer signals"
+ From: Ilya Zakharevich <ilya@math.ohio-state.edu>
+ Files: mg.c perl.c
+
+ Title: "Time::Local patch (plus perl.c and filehand.t)"
+ From: ilya@math.ohio-state.edu (Ilya Zakharevich)
+ Files: lib/Time/Local.pm perl.c t/lib/filehand.t
+
+ Title: "[PATCH] Weirdness in sv_peek()"
+ From: Stephen McCamant <alias@mcs.com>
+ Msg-ID: <m0wsEMU-000EYLC@alias-2.pr.mcs.net>,
+ <m0wsf7Y-000EYPC@alias-2.pr.mcs.net>
+ Files: sv.c
+
+ Title: "Win32 UNC path causes autoload to fail"
+ From: Warren Jones <wjones@tc.fluke.com>
+ Msg-ID: <97Jun18.163826pdt.35714-1@gateway.fluke.com>
+ Files: pp_ctl.c
+
+ Title: "[PATCH]: reduced malloc patch"
+ From: Ilya Zakharevich <ilya@math.ohio-state.edu>
+ Msg-ID: <199707150829.EAA01291@monk.mps.ohio-state.edu>
+ Files: av.c
+
+ Title: "[PATCH] $\1 and serious bug in evalling"
+ From: Ilya Zakharevich <ilya@math.ohio-state.edu>
+ Msg-ID: <199707262127.RAA12883@monk.mps.ohio-state.edu>
+ Files: pp_ctl.c
+
+ Title: "Faster int to string conversion", "[PATCH} Re: memory leak in buffer
+ safety code"
+ From: Chip Salzenberg <chip@rio.atlantic.net>, Hugo van der Sanden
+ <hv@crypt.compulink.co.uk>, Tim Bunce <Tim.Bunce@ig.co.uk>
+ Msg-ID: <199707140912.KAA09935@crypt.compulink.co.uk>,
+ <199707142050.QAA20976@rio.atlantic.net>,
+ <199707182035.VAA20990@crypt.compulink.co.uk>,
+ <9707151040.AA02883@toad.ig.co.uk>
+ Files: global.sym sv.c
+
+ Title: "object never destructs"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199707131955.PAA29655@aatma.engin.umich.edu>
+ Files: scope.c t/op/ref.t
+
+ Title: "[PATCH] -S flag fixes for DOSISH platforms", "[RESEND] [PATCH] -S
+ flag fixes for DOSISH platforms"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199707250043.UAA02385@aatma.engin.umich.edu>,
+ <199707301828.OAA19508@aatma.engin.umich.edu>
+ Files: pod/perldiag.pod pod/perlrun.pod perl.c
+
+ Title: "Perldb internal flag rehaul"
+ From: Ilya Zakharevich <ilya@math.ohio-state.edu>
+ Files: pod/perldebug.pod pod/perlvar.pod perl.h gv.c mg.c op.c perl.c
+ pp_ctl.c pp_hot.c pp_sys.c sv.c toke.c
+
+ Title: "[PATCH] Re: q and escaping paired delimiters"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>, Kenneth Albanowski
+ <kjahds@kjahds.com>
+ Msg-ID: <199707280516.BAA14055@aatma.engin.umich.edu>,
+ <Pine.LNX.3.93.970727172201.350K-100000@kjahds.com>,
+ <Pine.LNX.3.93.970728013540.350U-100000@kjahds.com>
+ Files: t/base/lex.t toke.c
+
+ Title: "Enable PERL_DEBUG_MSTATS without -DDEBUGGING_MSTATS"
+ From: Ilya Zakharevich <ilya@math.ohio-state.edu>
+ Msg-ID: <199707150829.EAA01291@monk.mps.ohio-state.edu>
+ Files: malloc.c perl.c
+
+ Title: "semctl broken under Linux"
+ From: Andreas Schwab <schwab@LS5.informatik.uni-dortmund.de>, Andreas
+ Schwab <schwab@issan.informatik.uni-dortmund.de>, Graham
+ Barr <gbarr@ti.com>, Tim Bunce <Tim.Bunce@ig.co.uk>
+ Msg-ID: <33C38291.2D9302DA@ti.com>,
+ <9707040912.AA03470@issan.informatik.uni-dortmund.de>,
+ <9707041538.AA08946@toad.ig.co.uk>,
+ <9707070924.AA11774@issan.informatik.uni-dortmund.de>,
+ <9707090933.AA19012@issan.informatik.uni-dortmund.de>
+ Files: doio.c
+
+ Title: "[PATCH] m2t2: problem in NetBSD 1.2D with sfio"
+ From: Jarkko Hietaniemi <jhi@iki.fi>
+ Files: perl.h
+
+ Title: "fix substr fix (tests 27 etc)", "perl5.004_02 trial 1 available
+ (with substr bug and still some"
+ From: "M.J.T. Guy" <mjtg@cus.cam.ac.uk>, Hugo van der Sanden
+ <hv@crypt.compulink.co.uk>, Jarkko Hietaniemi <jhi@iki.fi>
+ Msg-ID: <199707301759.SAA02899@crypt.compulink.co.uk>,
+ <199707302228.BAA18032@alpha.hut.fi>,
+ <199707310929.KAA06515@crypt.compulink.co.uk>,
+ <E0wtruH-0002JM-00@ursa.cus.cam.ac.uk>
+ Files: pp.c
+
+ Title: "Fwd: substr("foo", -1000)", "substr: warn if substring doesn't
+ intersect original at all"
+ From: "M.J.T. Guy" <mjtg@cus.cam.ac.uk>, Jarkko Hietaniemi <jhi@iki.fi>
+ Msg-ID: <199707100655.JAA14924@alpha.hut.fi>,
+ <E0wm1JG-0000UY-00@taurus.cus.cam.ac.uk>
+ Files: pod/perlfunc.pod pp.c t/op/substr.t
+
+ Title: "[PATCH] work around compiler bug on CX/UX (perl5.004_01)"
+ From: tom@amber.ssd.hcsc.com (Tom Horsley)
+ Msg-ID: <9707301934.AA18594@amber.ssd.hcsc.com>
+ Files: hints/cxux.sh pp.c
+
+ ------ DOCUMENTATION ------
+
+ Title: "Duplicates in perlguts.pod"
+ From: hans@icgned.nl (Hans Mulder)
+ Msg-ID: <9707082346.AA13231@ icgned.icgned.nl >
+ Files: pod/perlguts.pod
+
+ Title: "Better "Can't locate auto/%s.al in @INC" error documentation"
+ From: ilya@math.ohio-state.edu (Ilya Zakharevich)
+ Msg-ID: <1997Jun24.195847.2091744@hmivax.humgen.upenn.edu>
+ Files: pod/perldiag.pod
+
+ Title: "new perlembed.pod:match.c"
+ From: Doug MacEachern <dougm@opengroup.org>
+ Msg-ID: <199707170355.XAA21370@postman.opengroup.org>
+ Files: pod/perlembed.pod
+
+ Title: "Document bug fix in localization of $1 etc."
+ From: Chip Salzenberg <salzench@nielsenmedia.com>
+ Files: pod/perldelta.pod
+
+ Title: "[PATCH] Major goof in XS Tutorial regarding subdirs"
+ From: Ilya Zakharevich <ilya@math.ohio-state.edu>
+ Msg-ID: <199707260920.FAA12453@monk.mps.ohio-state.edu>
+ Files: pod/perlxstut.pod
+
+ Title: "[PATCH] Magic info in perlguts, take 2"
+ From: Stephen McCamant <alias@mcs.com>
+ Msg-ID: <m0wr6P8-000EYLC@alias-2.pr.mcs.net>
+ Files: pod/perlguts.pod
+
+ Title: "[BUG:PATCH] Missing semicolon message wrong in perldiag"
+ From: "M.J.T. Guy" <mjtg@cus.cam.ac.uk>
+ Msg-ID: <E0welEn-0002vT-00@taurus.cus.cam.ac.uk>,
+ <E0wfRJU-0006Aw-00@taurus.cus.cam.ac.uk>
+ Files: pod/perldiag.pod
+
+ Title: "[PATCH] Updates to perlguts (repost)"
+ From: Ilya Zakharevich <ilya@math.ohio-state.edu>
+ Msg-ID: <199707152223.SAA00776@monk.mps.ohio-state.edu>
+ Files: pod/perlguts.pod
+
+ Title: "[BUG:47:LOG] Dropped "and" in pod2man"
+ From: hans@icgned.nl (Hans Mulder)
+ Msg-ID: <9707082355.AA13254@ icgned.icgned.nl >
+ Files: pod/pod2man.PL
+
+ Title: "[BUG] perlembed.pod:power.c example"
+ From: Doug MacEachern <dougm@opengroup.org>
+ Msg-ID: <199707181344.JAA10565@postman.opengroup.org>
+ Files: pod/perlembed.pod
+
+ Title: "[PATCH] arguments swapped in perlapio.pod"
+ From: Hans Mulder <hansmu@xs4all.nl>
+ Msg-ID: <199706240049.CAA10534@xs2.xs4all.nl>
+ Files: pod/perlapio.pod
+
+ Title: "[PATCH] cool quote for perldebug"
+ From: Greg Bacon <gbacon@adtrn-srv4.adtran.com>
+ Msg-ID: <199707292140.QAA28579@adtrn-srv4.adtran.com>
+ Files: pod/perldebug.pod
+
+ Title: "[PATCH] multiline commands in qx//"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199707212350.TAA18496@aatma.engin.umich.edu>
+ Files: pod/perlfunc.pod pod/perlop.pod
+
+ Title: "patch to 5.004_01 perltrap.pod"
+ From: jmm@revenge.elegant.com (John Macdonald)
+ Msg-ID: <9706231525.AA22790@revenge.elegant.com>
+ Files: pod/perltrap.pod
+
+ Title: "perl4 to perl5.004 converion with debugger problem"
+ From: "M.J.T. Guy" <mjtg@cus.cam.ac.uk>
+ Msg-ID: <E0wdKJY-00010w-00@taurus.cus.cam.ac.uk>
+ Files: pod/perltrap.pod
+
+ Title: "done3/perlbook.pod"
+ From: Randal Schwartz <merlyn@gadget.cscaper.com>
+ Files: pod/perlbook.pod
+
+ Title: "[PATCH] readline and readpipe are undocumented"
+ From: Hans Mulder <hansmu@xs4all.nl>
+ Files: pod/perlfunc.pod
+
+ Title: "Document use of - in a regex char class."
+ From: Dominic Dunlop <domo@slipper.ip.lu>
+ Msg-ID: <v03102804afd578bcef2c@[194.51.248.88]>
+ Files: pod/perlre.pod
+
+ Title: "[PATCH] splitpod broken in 5.004_01"
+ From: Hans Mulder <hansmu@xs4all.nl>, Tim Bunce <Tim.Bunce@ig.co.uk>
+ Msg-ID: <199706240048.CAA10515@xs2.xs4all.nl>,
+ <9706241612.AA09119@toad.ig.co.uk>
+ Files: pod/splitpod
+
+ ------ LIBRARY AND EXTENSIONS ------
+
+ Title: "Carp::cluck() and -MCarp=verbose"
+ From: Tim.Bunce@ig.co.uk, epeschko@elmer.tci.com (Ed Peschko)
+ Msg-ID: <199708060607.AAA16681@den-mdev1.tci.com>,
+ <199708062105.PAA09878@den-mdev1.tci.com>
+ Files: lib/Carp.pm
+
+ Title: "Warning from calls using "use Shell""
+ From: Andrew Pimlott <pimlott@abel.math.harvard.edu>
+ Msg-ID: <Pine.SOL.3.91.970806173903.7320H-100000@abel>
+ Files: lib/Shell.pm
+
+ Title: "confessing a carp"
+ From: Chip Salzenberg <chip@rio.atlantic.net>, Hugo van der Sanden
+ <hv@crypt.compulink.co.uk>, Nick Ing-Simmons
+ <nick@ni-s.u-net.com>, Tim Bunce <Tim.Bunce@ig.co.uk>
+ Msg-ID: <199708052155.WAA25393@crypt.compulink.co.uk>,
+ <199708060721.IAA30894@crypt.compulink.co.uk>,
+ <199708061533.LAA01313@rio.atlantic.net>,
+ <33E79BE2.4E6F@ni-s.u-net.com>,
+ <33E8E3C5.62C@ni-s.u-net.com>,
+ <9708051619.AA13764@toad.ig.co.uk>
+ Files: lib/Carp.pm
+
+ Title: "[BUG:PATCH] dumpvar.pl parses some references incorrectly"
+ From: "M.J.T. Guy" <mjtg@cus.cam.ac.uk>
+ Msg-ID: <E0wwAjQ-0004l6-00@ursa.cus.cam.ac.uk>
+ Files: lib/dumpvar.pl
+
+ Title: "[PATCH] m2t3: minor doc patch (to obsolete I18N::Collate)"
+ From: Jarkko Hietaniemi <jhi@iki.fi>
+ Msg-ID: <199708060732.KAA02675@alpha.hut.fi>
+ Files: lib/I18N/Collate.pm
+
+ Title: "[PATCH] Binary installers for Perl modules"
+ From: Ilya Zakharevich <ilya@math.ohio-state.edu>
+ Msg-ID: <199707210006.UAA06165@monk.mps.ohio-state.edu>
+ Files: lib/ExtUtils/Install.pm
+
+ Title: "m2t2 broke CPAN.pm :-("
+ From: a.koenig@kulturbox.de (Andreas J. Koenig)
+ Files: lib/CPAN.pm lib/Bundle/CPAN.pm lib/CPAN/FirstTime.pm lib/CPAN/Nox.pm
+
+ Title: "[PATCH] CPAN.pm on OS/2"
+ From: "Andreas J. Koenig" <k@anna.in-berlin.de>, Ilya Zakharevich
+ <ilya@math.ohio-state.edu>
+ Msg-ID: <199707180415.AAA03180@monk.mps.ohio-state.edu>,
+ <199707181407.QAA12920@anna.in-berlin.de>
+ Files: lib/CPAN.pm
+
+ Title: "Docs of IO::Handle [PATCH]"
+ From: Ilya Zakharevich <ilya@math.ohio-state.edu>
+ Msg-ID: <199707222307.TAA08380@monk.mps.ohio-state.edu>
+ Files: ext/IO/lib/IO/Handle.pm
+
+ Title: "Exporter errors give wrong location"
+ From: "M.J.T. Guy" <mjtg@cus.cam.ac.uk>
+ Msg-ID: <E0wdJra-0000n8-00@taurus.cus.cam.ac.uk>
+ Files: lib/Exporter.pm
+
+ Title: "[PATCH] Exporter new export_to_level method"
+ From: epeschko@elmer.tci.com (Ed Peschko)
+ Files: lib/Exporter.pm
+
+ Title: "DB_File produces spurious output when trapping __DIE__"
+ From: pmarquess@bfsec.bt.co.uk (Paul Marquess)
+ Msg-ID: <9706302125.AA28254@claudius.bfsec.bt.co.uk>
+ Files: ext/DB_File/DB_File.pm
+
+ Title: "Remove 'use UNIVERSAL;', switch to UNIVERSAL::isa()"
+ From: "M.J.T. Guy" <mjtg@cus.cam.ac.uk>
+ Msg-ID: <E0whaZJ-0007BA-00@ursa.cus.cam.ac.uk>
+ Files: lib/Class/Struct.pm lib/File/Compare.pm lib/File/Copy.pm
+
+ Title: "perl5.004 Time::Local still broken"
+ From: Mathias Koerber <mathias@dnssec1.singnet.com.sg>
+ Msg-ID: <199706260452.MAA22647@dnssec1.singnet.com.sg>
+ Files: lib/Time/Local.pm
+
+ Title: "Sys::Hostname should localize $SIG{__DIE__}"
+ From: Ken Shan <ken@digitas.harvard.edu>
+ Msg-ID: <199707070357.XAA18065@digitas.harvard.edu>
+ Files: lib/Sys/Hostname.pm
+
+ Title: "xsubpp patch"
+ From: John Tobey <jtobey@user1.channel1.com>
+ Msg-ID: <199707010221.CAA01234@remote133>
+ Files: lib/ExtUtils/xsubpp
+
+ Title: "DB_File 1.15 patch"
+ From: pmarquess@bfsec.bt.co.uk (Paul Marquess)
+ Msg-ID: <9707192117.AA01973@claudius.bfsec.bt.co.uk>
+ Files: ext/DB_File/DB_File.pm ext/DB_File/DB_File.xs ext/DB_File/typemap
+ t/lib/db-btree.t t/lib/db-hash.t t/lib/db-recno.t
+
+ Title: "Problems with setvbuf"
+ From: Ilya Zakharevich <ilya@math.ohio-state.edu>
+ Msg-ID: <199707250040.UAA11000@monk.mps.ohio-state.edu>
+ Files: ext/IO/IO.xs
+
+ Title: "[PATCH] Repost of fork() debugger patch"
+ From: Ilya Zakharevich <ilya@math.ohio-state.edu>
+ Msg-ID: <199707252101.RAA11846@monk.mps.ohio-state.edu>
+ Files: lib/perl5db.pl lib/Term/ReadLine.pm
+
+ Title: "IO::File and DB_File pollutes namespace with Fcntl constants"
+ From: Gisle Aas <aas@bergen.sn.no>
+ Msg-ID: <h205qyijy.fsf@bergen.sn.no>
+ Files: ext/IO/lib/IO/File.pm
+
+ Title: "[MM] [PATCH] Re: Liblist problems for MSWin32"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199706182152.RAA20273@aatma.engin.umich.edu>
+ Files: lib/ExtUtils/Liblist.pm
+
+ Title: "Net::hostent documentation error"
+ From: gnat@frii.com
+ Msg-ID: <199707082222.QAA24728@elara.frii.com>
+ Files: lib/Net/hostent.pm
+
+ Title: "PATCH: make DBM*_File modules sub-classable"
+ From: pmarquess@bfsec.bt.co.uk (Paul Marquess)
+ Msg-ID: <9707121854.AA19472@claudius.bfsec.bt.co.uk>
+ Files: ext/GDBM_File/typemap ext/NDBM_File/typemap
+ ext/ODBM_File/ODBM_File.xs ext/SDBM_File/typemap
+ t/lib/gdbm.t t/lib/ndbm.t t/lib/odbm.t t/lib/sdbm.t
+
+ Title: "Sys::Syslog patch to allow unix domain sockets"
+ From: Sean Robinson <robinson_s@sc.maricopa.edu>
+ Msg-ID: <33B31342.7EB16A44@sc.maricopa.edu>
+ Files: lib/Sys/Syslog.pm
+
+ Title: "'use UNIVERSAL;' deprecated, do C<UNIVERSAL::isa()> instead",
+ "UNIVERSAL.pm and import methods"
+ From: "M.J.T. Guy" <mjtg@cus.cam.ac.uk>, Gisle Aas <aas@bergen.sn.no>,
+ Graham Barr <gbarr@ti.com>, Gurusamy Sarathy
+ <gsar@engin.umich.edu>, Hugo van der Sanden
+ <hv@crypt.compulink.co.uk>
+ Msg-ID: <199706271701.NAA25664@aatma.engin.umich.edu>,
+ <199706271904.UAA00120@crypt.compulink.co.uk>,
+ <199706272054.QAA28913@aatma.engin.umich.edu>,
+ <199706301554.LAA03763@aatma.engin.umich.edu>,
+ <33B22248.7D7C1985@ti.com>,
+ <E0wf5TN-0006ps-00@taurus.cus.cam.ac.uk>,
+ <E0wguTR-0005bs-00@ursa.cus.cam.ac.uk>,
+ <E0whaZJ-0007BA-00@ursa.cus.cam.ac.uk>,
+ <E0whfHh-0007bW-00@ursa.cus.cam.ac.uk>,
+ <E0wiyUG-00073j-00@taurus.cus.cam.ac.uk>,
+ <hiuyv6q9k.fsf@bergen.sn.no>
+ Files: lib/Class/Struct.pm lib/File/Compare.pm lib/File/Copy.pm
+ t/op/universal.t universal.c
+
+ Title: "[MM] Small patch to MakeMaker, new release"
+ From: "Andreas J. Koenig" <k@anna.in-berlin.de>
+ Msg-ID: <199706281603.SAA10869@anna.in-berlin.de>
+ Files: lib/ExtUtils/Command.pm lib/ExtUtils/Install.pm
+ lib/ExtUtils/Liblist.pm lib/ExtUtils/MM_Unix.pm
+ lib/ExtUtils/MakeMaker.pm lib/ExtUtils/Mksymlists.pm
+
+ Title: "ExtUtils-Embed upgrade"
+ From: Doug MacEachern <dougm@opengroup.org>
+ Files: lib/ExtUtils/Embed.pm
+
+ Title: "[PATCH] icmp tweak for IO::Socket"
+ From: Nick.Ing-Simmons@tiuk.ti.com
+ Msg-ID: <199707041240.NAA21484@pluto.tiuk.ti.com>
+ Files: ext/IO/lib/IO/Socket.pm
+
+ Title: "Allow concurrent mkdir in File::Path::mkpath"
+ From: schattev@imb-jena.de (Ruben Schattevoy)
+ Msg-ID: <199707300943.LAA21574@kant.imb-jena.de>
+ Files: lib/File/Path.pm
+
+ Title: "CPAN.pm, $VERSION and nested (bundled) modules."
+ From: a.koenig@kulturbox.de (Andreas J. Koenig)
+ Files: lib/ExtUtils/Install.pm lib/ExtUtils/Liblist.pm
+ lib/ExtUtils/MM_Unix.pm lib/ExtUtils/MakeMaker.pm
+ lib/ExtUtils/Mksymlists.pm
+
+ Title: "[PATCH] perl debugger, win32, and emacs"
+ From: Jay Rogers <jay@rgrs.com>
+ Msg-ID: <199707311759.NAA13276@crooked-i.mitre.org>
+ Files: lib/perl5db.pl
+
+ Title: "[PATCH] pod2html mangles C<&foo(42);>"
+ From: Hans Mulder <hansmu@xs4all.nl>
+ Msg-ID: <199706250057.CAA10162@xs1.xs4all.nl>
+ Files: lib/Pod/Html.pm
+
+ Title: "[PATCH] posix.xs broken on VMS 7.1"
+ From: Dan Sugalski <sugalsd@lbcc.cc.or.us>
+ Msg-ID: <3.0.2.32.19970718095755.00875ba0@stargate.lbcc.cc.or.us>
+ Files: ext/POSIX/POSIX.xs
+
+ Title: "MM_Unix.pm nits for Win32 DMAKE"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199708032051.QAA14248@aatma.engin.umich.edu>
+ Files: lib/ExtUtils/MM_Unix.pm
+
+ Title: "Sys::Hostname -w unclean in trial 2"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199708032055.QAA14278@aatma.engin.umich.edu>
+ Files: lib/Sys/Hostname.pm
+
+ Title: "(3) File::Find::find()/finddepth() bugs with toplevel paths"
+ From: "Conrad E. Kimball" <cek@tblv021.ca.boeing.com>
+ Msg-ID: <199707040045.RAA24459@mailgate2.boeing.com>
+ Files: lib/File/Find.pm
+
+ ------ OTHER CHANGES ------
+
+ Title: "EMERGENCY_SBRK or PERL_EMERGENCY_SBRK ?"
+ From: Andy Dougherty <doughera@newton.phys.lafayette.edu>,
+ ilya@math.ohio-state.edu (Ilya Zakharevich)
+ Msg-ID: <1997Aug1.191631.2167470@hmivax.humgen.upenn.edu>,
+ <Pine.SUN.3.96.970801134400.4393F-100000@newton.phys>
+ Files:
+ Files:
+
+ ------ PORTABILITY - WIN32 ------
+
+ Title: "[PATCH] Embedding threaded apps in perl.dll"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199707261518.LAA24346@aatma.engin.umich.edu>,
+ <199707301833.OAA19570@aatma.engin.umich.edu>
+ Files: win32/win32.c
+
+ Title: "Minor fix for pl2bat.bat", "[PATCH] Re: Minor fix for pl2bat.bat"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>, Warren Jones
+ <wjones@tc.fluke.com>
+ Msg-ID: <199707061843.OAA23874@aatma.engin.umich.edu>,
+ <97Jun24.115804pdt.35752-2@gateway.fluke.com>
+ Files: win32/bin/pl2bat.bat
+
+ Title: "WIN32 Build - pod2xxx.bat Missing?", "[PATCH] Re: WIN32 Build -
+ pod2xxx.bat Missing?"
+ From: Chris Williams <chrisw@netinfo.com.au>, Gurusamy Sarathy
+ <gsar@engin.umich.edu>
+ Msg-ID: <199707011423.KAA15855@aatma.engin.umich.edu>,
+ <33B8B962.D96FA1F5@netinfo.com.au>
+ Files: win32/Makefile win32/makefile.mk
+
+ Title: "[PATCH] Win32 sitelib intuition from DLL location"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199706231647.MAA23260@aatma.engin.umich.edu>
+ Files: win32/win32.h win32/config_h.PL win32/win32.c
+
+ Title: "[PATCH] binary coexistence on win32", "[RESEND] [PATCH] binary
+ coexistence on win32"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199707250109.VAA02666@aatma.engin.umich.edu>,
+ <199707301829.OAA19516@aatma.engin.umich.edu>
+ Files: lib/ExtUtils/Mksymlists.pm win32/win32.h win32/win32io.h
+ win32/win32iop.h win32/makedef.pl win32/win32.c
+ win32/win32io.c
+
+ Title: "[PATCH] docs for win32 utilities"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199707250045.UAA02510@aatma.engin.umich.edu>
+ Files: win32/bin/pl2bat.bat win32/bin/runperl.bat
+
+ Title: "[PATCH] exec() fixed on win32"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199706241525.LAA06554@aatma.engin.umich.edu>
+ Files: win32/win32.h win32/win32io.h win32/win32iop.h README.win32 doio.c
+ win32/config_H.bc win32/config_H.vc win32/makedef.pl
+ win32/win32.c win32/win32io.c
+
+ Title: "[PATCH] getenv() after my_setenv() gets old entry on Win32"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199706231700.NAA23400@aatma.engin.umich.edu>
+ Files: win32/win32.h win32/win32.c
+
+ Title: "[PATCH] getservby*() calls fail on Windows NT"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199706231654.MAA23276@aatma.engin.umich.edu>
+ Files: win32/win32sck.c
+
+ Title: "[PATCH] minor win32 scribbles"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>, Hugo van der Sanden
+ <hv@crypt.compulink.co.uk>
+ Msg-ID: <199707262307.TAA28410@aatma.engin.umich.edu>,
+ <199707270832.JAA19399@crypt.compulink.co.uk>
+ Files: pod/perldelta.pod README.win32 win32/Makefile win32/config.bc
+ win32/config.vc win32/makefile.mk
+
+ Title: "[PATCH] trial2: some batch files won't run"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199708040226.WAA17301@aatma.engin.umich.edu>
+ Files: win32/bin/pl2bat.bat win32/bin/runperl.bat
+
+ Title: "[PATCH] win32 docs and runperl.bat"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199707070446.AAA29560@aatma.engin.umich.edu>
+ Files: MANIFEST README.win32 win32/bin/pl2bat.bat win32/bin/runperl.bat
+
+ Title: "[PATCH] win32 extras and embedding"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199707250232.WAA03421@aatma.engin.umich.edu>,
+ <199707301831.OAA19528@aatma.engin.umich.edu>
+ Files: dosish.h win32/win32.h perl.c win32/config.bc win32/config_H.bc
+ win32/makedef.pl win32/perllib.c win32/win32.c
+
+ Title: "[PATCH] win32 tweaks"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199707042150.RAA01065@aatma.engin.umich.edu>
+ Files: win32/win32.h win32/win32.c
+
+ Title: "[PATCH] win32_stat() fixes (2nd try)"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199708040137.VAA16810@aatma.engin.umich.edu>
+ Files: t/op/stat.t win32/win32iop.h win32/win32.c
+
+ ------ PORTABILITY - OTHER ------
+
+ Title: "Additional OS/2 patches"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>, Ilya Zakharevich
+ <ilya@math.ohio-state.edu>
+ Msg-ID: <199708020823.EAA19521@monk.mps.ohio-state.edu>,
+ <199708021424.KAA28561@aatma.engin.umich.edu>,
+ <199708042108.RAA27671@aatma.engin.umich.edu>
+ Files: README.os2 os2/Changes perl.c
+
+ Title: "Additional patch is needed for os2/diff.configure"
+ From: Ilya Zakharevich <ilya@math.ohio-state.edu>
+ Msg-ID: <199708020745.DAA19483@monk.mps.ohio-state.edu>
+ Files: os2/diff.configure
+
+ Title: "Assorted OS/2 fixes"
+ From: ilya@math.ohio-state.edu (Ilya Zakharevich)
+ Msg-ID: <1997Jun16.163234.2091727@hmivax.humgen.upenn.edu>
+ Files: hints/os2.sh os2/diff.configure os2/os2ish.h README.os2 os2/Changes
+ os2/Makefile.SHs os2/os2.c util.c
+
+ Title: "[PATCH] Changes for VMS 7.1 support"
+ From: Charles Bailey <bailey@HMIVAX.HUMGEN.UPENN.EDU>, Dan Sugalski
+ <sugalsd@lbcc.cc.or.us>
+ Msg-ID: <01ILDXUH0J1W00026U@hmivax.humgen.upenn.edu>,
+ <3.0.2.32.19970718095935.0087a2d0@stargate.lbcc.cc.or.us>
+ Files: vms/sockadapt.h vms/config.vms vms/sockadapt.c
+
+ Title: "[PATCH] Easier TCP stack selection for VMS"
+ From: Dan Sugalski <sugalsd@lbcc.cc.or.us>
+ Msg-ID: <3.0.1.32.19970624151939.00994490@stargate.lbcc.cc.or.us>
+ Files: vms/descrip.mms
+
+ Title: "Minor VMS patches"
+ From: Charles Bailey <bailey@HMIVAX.HUMGEN.UPENN.EDU>
+ Msg-ID: <01ILCUO6XXTE000WFK@hmivax.humgen.upenn.edu>
+ Files: lib/ExtUtils/MM_VMS.pm vms/vmsish.h vms/descrip.mms vms/test.com
+ vms/vms.c vms/ext/filespec.t
+
+ Title: "[PATCH] Two un-disabled tests for VMS"
+ From: Dan Sugalski <sugalsd@lbcc.cc.or.us>
+ Msg-ID: <3.0.2.32.19970718095842.00879220@stargate.lbcc.cc.or.us>
+ Files: vms/test.com
+
+ Title: "fixes for hints/svr4 for UnixWare >= 2.1.1"
+ From: John Hughes <john@titanic.atlantech.com>
+ Msg-ID: <199707021230.OAA24230@titanic.AtlanTech.COM>
+ Files: hints/svr4.sh
+
+ Title: "make depend loop fix and minor OS/2 improvements to build process"
+ From: ilya@math.ohio-state.edu (Ilya Zakharevich)
+ Files: Makefile.SH hints/os2.sh os2/Makefile.SHs
+
+ ------ TESTS ------
+
+ Title: "Add xor tests to test suite"
+ From: Hugo van der Sanden <hv@crypt.compulink.co.uk>
+ Msg-ID: <199706250730.IAA06097@crypt.compulink.co.uk>
+ Files: t/comp/cmdopt.t
+
+ Title: "[PATCH] enable some tests on Win32"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199707250029.UAA02351@aatma.engin.umich.edu>
+ Files: t/op/magic.t
+
+ Title: "Fix up problems with *DBM tests"
+ From: Paul Marquess <pmarquess@bfsec.bt.co.uk>
+ Files: t/lib/gdbm.t t/lib/ndbm.t t/lib/odbm.t t/lib/sdbm.t
+
+ ------ UTILITIES ------
+
+ Title: "[PATCH] m2t3: utils/perlbug.PL: -ok report is not a bug"
+ From: Jarkko Hietaniemi <jhi@iki.fi>
+ Msg-ID: <199708071022.NAA13008@alpha.hut.fi>
+ Files: utils/perlbug.PL
+
+ Title: "perlbug - check sendmail and fix win32 tmp path"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199708060349.XAA15895@aatma.engin.umich.edu>
+ Files: utils/perlbug.PL
+
+ Title: "OK: perl <some_version> on <some_system> (corrected)", "enhancements
+ to perlbug -ok"
+ From: "M.J.T. Guy" <mjtg@cus.cam.ac.uk>, Stephen McCamant <alias@mcs.com>
+ Msg-ID: <E0wukVt-0006Da-00@ursa.cus.cam.ac.uk>,
+ <E0wvMQl-00055y-00@ursa.cus.cam.ac.uk>,
+ <m0wv81x-000EYPC@alias-2.pr.mcs.net>
+ Files: utils/Makefile utils/perlbug.PL
+
+ Title: "perlbug -ok [PATCH]"
+ From: "Charles F. Randall" <crandall@free.click-n-call.com>
+ Msg-ID: <199706181824.MAA04082@free.click-n-call.com>
+ Files: utils/perlbug.PL
+
+ Title: "perlbug broken"
+ From: Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+ Msg-ID: <9707040912.AA03466@issan.informatik.uni-dortmund.de>
+ Files: utils/perlbug.PL
+
+ Title: "[PATCH] perlbug under OS/2"
+ From: Ilya Zakharevich <ilya@math.ohio-state.edu>
+ Msg-ID: <199707180333.XAA03102@monk.mps.ohio-state.edu>
+ Files: utils/perlbug.PL
+
+ Title: "perldoc doesn't grok Win32 UNC paths"
+ From: Warren Jones <wjones@tc.fluke.com>
+ Msg-ID: <97Jun17.184420pdt.35728-1@gateway.fluke.com>,
+ <97Jun18.165618pdt.35713-1@gateway.fluke.com>
+ Files: utils/perldoc.PL
+
+ Title: "[PATCH] perldoc under OS/2"
+ From: Ilya Zakharevich <ilya@math.ohio-state.edu>
+ Msg-ID: <199707180340.XAA03114@monk.mps.ohio-state.edu>
+ Files: utils/perldoc.PL
+
+ Title: "h2ph corrections to avoid redefined sub warnings"
+ From: wdconsta <wdconsta@cs.adelaide.edu.au>
+ Msg-ID: <Pine.SV4.3.93.970708143446.23808A-100000@florence.teaching.cs.adelaide.edu.au>
+ Files: utils/h2ph.PL
+
+
+
+----------------
+Version 5.004_01 Maintenance release 1 for 5.004
+----------------
+
+"Practice random kindness and senseless acts of beauty"
+ -- Anne Herbert
+
+ HEADLINES FOR THIS MAINTENANCE RELEASE
+
+ (..., undef, ...) = split(...) bug fixed.
+ Win32 support greatly improved, now very strong.
+ Memory leak using Tied hashes and arrays fixed.
+ Documentation updates.
+ Many other bug fixes and enhancements.
+
+ CORE LANGUAGE
+
+ Title: "[PATCH] first true value returned by scalar C<...> is wrong"
+ From: hansm@euronet.nl
+ Files: pp_ctl.c t/op/flip.t
+
+ Title: "Regex Bug in 5.003_26 thru 003_99a"
+ From: Andreas Karrer <karrer@ife.ee.ethz.ch>, Chip Salzenberg
+ <chip@atlantic.net>
+ Msg-ID: <199705152303.BAA08890@kuru.ee.ethz.ch>,
+ <199705161915.PAA18721@rio.atlantic.net>
+ Files: regcomp.h regcomp.c regexec.c
+
+ Title: "[PATCH] -w interacts badly with -Dt"
+ From: Spider Boardman <spider@Orb.Nashua.NH.US>
+ Files: sv.c
+
+ Title: "No DESTROY on untie. Tie memory leak fixed."
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>, Jay Rogers <jay@rgrs.com>,
+ pmarquess@bfsec.bt.co.uk (Paul Marquess)
+ Msg-ID: <199705170235.WAA00267@fluffy.rgrs.com>,
+ <199705172156.RAA20561@aatma.engin.umich.edu>,
+ <9705171506.AA04491@claudius.bfsec.bt.co.uk>
+ Files: pp_hot.c
+
+ Title: "magic_clear_all_env proto should match svt_clear"
+ From: Nick Ing-Simmons <nik@tiuk.ti.com>
+ Files: proto.h mg.c
+
+ Title: "[PATCH] ENV leaks on win32 (was Re: Comments on ENV patch sought)",
+ "[PATCH] for NETaa13787: %ENV=(); doesn't clear the environment"
+ From: hansm@euronet.nl, pvhp@forte.com (Peter Prymmer)
+ Msg-ID: <199705292240.AAA01135@mail.euronet.nl>
+ Files: embed.h perl.h proto.h global.sym mg.c t/op/magic.t
+
+ Title: "Patch to show @INC when require dies"
+ From: avera@hal.com (Jim Avera)
+ Msg-ID: <9705230121.AA27872@membrane.hal.com>
+ Files: pp_ctl.c
+
+ Title: "[PATCH] bug with m// nested inside s///e"
+ From: hansm@euro.net
+ Files: op.c t/op/subst.t
+
+ DOCUMENTATION
+
+ Title: "[PATCH] perlembed Win32 update"
+ From: Doug MacEachern <dougm@opengroup.org>
+ Files: pod/perlembed.pod
+
+ Title: "perldiag.pod patch - "(W) substr outside string" is "(S)evere" if
+ used as lvalue."
+ From: John Hughes <john@AtlanTech.COM>
+ Files: pod/perldiag.pod
+
+ Title: "local(%ENV) looses magic - document behaviour"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Files: pod/perlsub.pod
+
+ Title: "[PATCH] perlguts caveats", "perlguts additions"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>, ilya@math.ohio-state.edu
+ (Ilya Zakharevich)
+ Msg-ID: <199705180052.UAA22066@aatma.engin.umich.edu>,
+ <199705180202.WAA22826@aatma.engin.umich.edu>,
+ <199705301341.JAA05204@aatma.engin.umich.edu>,
+ <1997May17.235722.2033087@hmivax.humgen.upenn.edu>
+ Files: pod/perlguts.pod
+
+ Title: "pod2man produces broken pages", "weird condition in perldelta breaks
+ nroff"
+ From: Davin Milun <milun@cs.Buffalo.EDU>, Hans Mulder <hansm@icgned.nl>
+ Msg-ID: <199705310447.AAA15721@obelix.cs.Buffalo.EDU>,
+ <1997May25.192350.2055977@hmivax.humgen.upenn.edu>
+ Files: pod/pod2man.PL
+
+ Title: "Perl 5 pod2man fix", "perlguts man page corrupted"
+ From: chen@adi.com (Franklin Chen), gnat@frii.com, lvirden@cas.org, tom
+ (Tom Dinger on Feste), tom@edc.com (Tom Dinger on Feste)
+ Msg-ID: <199705210013.UAA09599@menhaden.adi.com>,
+ <199706011305.JAA18271@cas.org>,
+ <199706012116.PAA14102@elara.frii.com>,
+ <9504250959.AA23419@feste.edc.com>,
+ <9504251700.AA23823@feste.edc.com>
+ Files: pod/pod2man.PL
+
+ Title: "[PATCH] reference form chomp to chop in perlfunc"
+ From: hansm@euronet.nl
+ Files: pod/perlfunc.pod
+
+ Title: "pod2man gags if "=pod" is before "=head1 NAME""
+ From: whyde@pezz.sps.mot.com (Warren Hyde)
+ Msg-ID: <9705212115.AA21730@pezz.sps.mot.com>
+ Files: pod/pod2man.PL
+
+ Title: "perlfunc.pod unclear about return value range of rand"
+ From: "Tuomas J. Lukka" <tjl@lukka.student.harvard.edu>
+ Msg-ID: <m0wSMiC-000C9xC@lukka.student.harvard.edu>
+ Files: pod/perlfunc.pod
+
+ Title: "Error in perllol manpage", "Error in perllol manpage (fwd)"
+ From: Chris Wick <cwick@lmc.com>
+ Files: pod/perllol.pod
+
+ Title: "5.004 removed deprecated %OVERLOAD support silently"
+ From: jon@sems.com (Jonathan Biggar)
+ Msg-ID: <199705232319.QAA28388@clamp.netlabs.com>
+ Files: pod/perldelta.pod
+
+ Title: "[PATCH] Documentation bugs"
+ From: Stephen Potter <spp@psa.pencom.com>
+ Files: pod/perldata.pod pod/perldiag.pod pod/perlfaq8.pod pod/perlfaq9.pod
+ pod/perlop.pod pod/perlsub.pod pod/perltoot.pod
+
+ Title: "5.004 POD stuff", "make html - any takers?", "make html --> unusable
+ xref links", "pod/*.html -- all hyperlinks are invalid"
+ From: "Darren/Torin/Who Ever..." <torin@daft.com>, "Paul D. Smith"
+ <psmith@BayNetworks.COM>, Gurusamy Sarathy
+ <gsar@engin.umich.edu>, Jarkko Hietaniemi <jhi@iki.fi>,
+ Michael R Cook <mcook@cognex.com>, avera@hal.com (Jim
+ Avera), lvirden@cas.org
+ Msg-ID: <199705162008.XAA06906@alpha.hut.fi>,
+ <199705171830.OAA15652@erawan.cognex.com>,
+ <199706081749.NAA04552@aatma.engin.umich.edu>,
+ <1997May16.191039.2033079@hmivax.humgen.upenn.edu>,
+ <87hgg2y1h4.fsf@perv.daft.com>,
+ <9705161931.AA01075@membrane.hal.com>,
+ <9705191839.AA28702@lemming.engeast>
+ Files: INSTALL pod/perldiag.pod installhtml
+
+ Title: "checkpods- forget blank line status when starting a new file"
+ From: Larry Parmelee <parmelee@CS.Cornell.EDU>
+ Files: pod/checkpods.PL
+
+ Title: "installhtml: Fix 'no title' & 'unexpected ...' warnings. Double speed."
+ From: Tim Bunce
+ Files: installhtml lib/Pod/Html.pm pod/splitpod
+
+ LIBRARY AND EXTENSIONS
+
+ Title: "sdbm can fail if a config.h exists in system directories"
+ From: Tim Bunce
+ Files: ext/SDBM_File/sdbm/Makefile.PL
+
+ Title: "LWP and SIG __DIE__ traps not playing well together!"
+ From: Gisle Aas <aas@bergen.sn.no>
+ Files: lib/AutoLoader.pm
+
+ Title: "Memory Consumption of autosplit_lib_modules/sv_gets (workaround)"
+ From: Matthias Neeracher <neeri@iis.ee.ethz.ch>
+ Files: lib/AutoSplit.pm
+
+ Title: "Comments of this Sys::Syslog patch", "Unusual Sys::Syslog behaviour
+ with FQDN ? [Even in 5.004 - a bug?]"
+ From: Jarkko Hietaniemi <jhi@iki.fi>, Russ Allbery <rra@stanford.edu>,
+ alansz@mellers1.psych.berkeley.edu (Alan Schwartz)
+ Msg-ID: <199705231621.TAA16790@alpha.hut.fi>, <5m4fjr$rhs@agate.berkeley.edu>
+ Files: lib/Sys/Syslog.pm
+
+ Title: "Patch to CPAN.pm (perl5.004) for ncftp"
+ From: "Richard L. Maus, Jr." <rmaus@monmouth.com>
+ Msg-ID: <337FBAC8.167EB0E7@monmouth.com>
+ Files: lib/CPAN.pm
+
+ Title: "[PATCH] Harness.pm bug w/perl5.004 & VMS"
+ From: Dan Sugalski <sugalsd@lbcc.cc.or.us>
+ Msg-ID: <3.0.1.32.19970530102300.008a2730@stargate.lbcc.cc.or.us>
+ Files: lib/Test/Harness.pm
+
+ Title: "more Fcntl constants [PATCH]"
+ From: Jarkko Hietaniemi <jhi@iki.fi>
+ Files: ext/Fcntl/Fcntl.pm ext/Fcntl/Fcntl.xs
+
+ Title: "5.004 breaks ftp.pl due to missing (although obsolete) chat2.pl"
+ From: Tim Bunce
+ Files: lib/chat2.pl
+
+ BUILD PROCESS
+
+ Title: "make test && ... doesn't work"
+ From: Tim Bunce
+ Files: Makefile.SH
+
+ Title: "[PATCH] INSTALL-1.18"
+ From: Andy Dougherty <doughera@fractal.phys.lafayette.edu>
+ Msg-ID: <Pine.SOL.3.95q.970529142739.662D-100000@fractal.lafayette.edu>
+ Files: INSTALL
+
+ Title: "improved gnuwin32 Configure support"
+ From: Chris Faylor <cgf@bbc.com>
+ Msg-ID: <199706070318.XAA09214@hardy.bbc.com>
+ Files: Configure
+
+ Title: "installhtml problems finding splitpod"
+ From: lvirden@cas.org
+ Files: installhtml INSTALL
+
+ Title: "perl 5.004 (and 01) man pages not generated and installed"
+ From: lvirden@cas.org (Larry W. Virden)
+ Files: installman
+
+ Title: "oddity in Configure"
+ From: Mike Stok <mike@stok.co.uk>
+ Files: Configure
+
+ Title: "perl5.004 on AIX: Patches", "perl5.004 on FreeBSD and AIX"
+ From: Peter van Heusden <pvh@junior.uwc.ac.za>
+ Msg-ID: <Pine.A32.3.93.970519142625.22442B-100000@junior.uwc.ac.za>,
+ <Pine.A32.3.93.970519163700.25188A-100000@junior.uwc.ac.za>
+ Files: Makefile.SH perl_exp.SH ext/DynaLoader/dl_aix.xs perlio.sym
+
+ Title: "Compiling perl5.004 on NEWS-OS 4.x"
+ From: Makoto MATSUSHITA (=?ISO-2022-JP?B?GyRCJF4kRCQ3JD8kXiQzJEgbKEI=?=)
+ <matusita@ics.es.osaka-u.ac.jp>
+ Msg-ID: <19970521132814F.matusita@ics.es.osaka-u.ac.jp>
+ Files: Configure hints/newsos4.sh
+
+ PORTABILITY
+
+ Title: "win32: additional default libraries"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199705291332.JAA21560@aatma.engin.umich.edu>
+ Files: lib/ExtUtils/MM_Win32.pm
+
+ Title: "[PATCH] win32 minor fixes"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Files: lib/ExtUtils/MM_Unix.pm lib/ExtUtils/MM_Win32.pm win32/config.bc
+
+ Title: "[PATCH] clean up perlocal.pod output on VMS"
+ From: pvhp@forte.com (Peter Prymmer)
+ Files: lib/ExtUtils/MM_VMS.pm
+
+ Title: "[PATCH] Re: Term::ReadKey on Win32: set console"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Files: lib/Term/ReadLine.pm
+
+ Title: "[PATCH] Pod::Text nit for Win32"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Files: lib/Pod/Text.pm
+
+ Title: "pathname bug in xsubpp on win32"
+ From: jon@sems.com (Jonathan Biggar)
+ Msg-ID: <199705230126.SAA23401@clamp.netlabs.com>
+ Files: lib/ExtUtils/xsubpp
+
+ Title: "MakeMaker stumbles on Win32 UNC paths"
+ From: Warren Jones <wjones@TC.FLUKE.COM>
+ Files: lib/ExtUtils/MM_Win32.pm
+
+ Title: "build problem on SGI R10000 PowerChallenge (IRIX 6.2) lseek proto"
+ From: Jarkko Hietaniemi <jhi@iki.fi>
+ Files: doio.c
+
+ Title: "Perl 5.004 + Linux 2.0.30 & semctl()"
+ From: Andy Dougherty <doughera@fractal.phys.lafayette.edu>, Jordan
+ Mendelson <jordy@snappy.wserv.com>
+ Files: doio.c
+
+ Title: "lib/io_udp.t fails on VMS"
+ From: Jonathan.Hudson@jrhudson.demon.co.uk
+ Msg-ID: <XFMail.970522181042.Jonathan.Hudson@jrhudson.demon.co.uk>
+ Files: pp_sys.c
+
+ Title: "Compilation of mg.c from perl5.004m1t2 fails on OpenVMS/AXP"
+ From: Henrik Tougaard <ht.000@foa.dk>
+ Files: mg.c t/op/taint.t
+
+ Title: "[PATCH] (NEXT|OPEN)STEP hints"
+ From: Gerd Knops <gerti@BITart.com>
+ Files: hints/next_3.sh hints/next_4.sh
+
+ Title: "win32: user defined shell"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199705291339.JAA21682@aatma.engin.umich.edu>
+ Files: pod/perlrun.pod win32/win32.c
+
+ Title: "misc perl5.004 doc fixes, especially vms"
+ From: lvirden@cas.org (Larry W. Virden)
+ Msg-ID: <199705160419.AAA16317@cas.org>
+ Files: pod/perlfaq4.pod vms/perlvms.pod lib/Pod/Html.pm pod/roffitall
+ vms/ext/DCLsym/DCLsym.pm vms/ext/Stdio/Stdio.pm
+
+ Title: "[PATCH] gen_shrfls.pl too picky for Dec C 5.6 preprocessor output"
+ From: Dan Sugalski <sugalsd@lbcc.cc.or.us>
+ Files: vms/gen_shrfls.pl
+
+ Title: "[PATCH] win32: Configure cf_email"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199705301335.JAA05079@aatma.engin.umich.edu>
+ Files: win32/Makefile win32/config.bc win32/config.vc win32/config_sh.PL
+ win32/makefile.mk
+
+ Title: "[PATCH] README.win32 nits"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Files: README.win32
+
+ Title: "Document cause and remedy for op/taint.t failure"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Files: README.win32
+
+ Title: "SVR4 hints for DDE SMES Supermax Enterprise Server"
+ From: Jarkko Hietaniemi <jhi@iki.fi>
+ Files: hints/svr4.sh
+
+ Title: "porting.help"
+ From: Tim Bunce
+ Files: Porting/pumpkin.pod Porting/preprel
+
+ Title: "Major 5.004 Win32 update (Borland win32 support, and other patches)",
+ "($a,undef,$b) = qw(a b c) and ties delaying DESTROY fixes"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Files: MANIFEST pod/perlguts.pod win32/include/sys/socket.h EXTERN.h
+ opcode.h perl.h regcomp.h ext/Fcntl/Fcntl.pm
+ ext/SDBM_File/Makefile.PL lib/ExtUtils/Install.pm
+ lib/ExtUtils/MM_Unix.pm lib/ExtUtils/MM_Win32.pm
+ lib/ExtUtils/MakeMaker.pm lib/ExtUtils/Mksymlists.pm
+ lib/File/DosGlob.pm t/op/mkdir.t t/op/stat.t win32/win32.h
+ win32/win32io.h win32/win32iop.h README.win32 doio.c gv.c
+ mg.c op.c perlio.c pp.c pp_ctl.c pp_hot.c pp_sys.c util.c
+ win32/Makefile win32/config.bc win32/config.vc
+ win32/config_H.bc win32/config_H.vc win32/makedef.pl
+ win32/makefile.mk win32/makeperldef.pl win32/perlglob.c
+ win32/perllib.c win32/win32.c win32/win32io.c
+ win32/win32sck.c
+
+ Title: "[PATCH] Re: Maintenance release (remove PERL_DUMMY_SIZE)"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Files: opcode.h perl.h regcomp.h win32/win32.h gv.c
+
+ Title: "[PATCH] ENV leaks on win32 (was Re: Comments on ENV patch sought)"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Files: win32/win32.h win32/win32io.h win32/win32iop.h global.sym mg.c perl.c
+ t/op/magic.t util.c win32/makedef.pl win32/win32.c
+ win32/win32io.c
+
+ Title: "[PATCH] win32: ExtUtils::Liblist support"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Files: lib/ExtUtils/Liblist.pm win32/Makefile win32/config.bc
+ win32/makefile.mk
+
+ Title: "[PATCH] Re: borland C++Perl embedding failures re __declspec()"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Files: win32/win32.c
+
+ Title: "No need to use `pwd` in t/op/magic.t test for amigaos"
+ From: Norbert Pueschel <pueschel@imsdd.meb.uni-bonn.de>
+ Files: t/op/magic.t
+
+ TESTS
+
+ Title: "Tests depend on locale"
+ From: "Jan D." <jan.djarv@mbox200.swipnet.se>, Jarkko Hietaniemi
+ <jhi@iki.fi>
+ Msg-ID: <199705191127.NAA08148@ostrich.gaia.swipnet.se>,
+ <199705191230.PAA21070@alpha.hut.fi>
+ Files: t/lib/safe2.t t/op/mkdir.t
+
+ Title: "op/groups test fails on Linux (groups in /bin)"
+ From: "Jan D." <jan.djarv@mbox200.swipnet.se>
+ Msg-ID: <199705191120.NAA08130@ostrich.gaia.swipnet.se>
+ Files: t/op/groups.t
+
+ Title: "More simple regexp tests and test docs"
+ From: Hans Mulder <hansm@euronet.nl>
+ Files: t/op/re_tests t/op/regexp.t
+
+ Title: "[PATCH] Re: Using undef to ignore values returned from split"
+ From: Hugo van der Sanden <hv@crypt.compulink.co.uk>
+ Files: t/op/split.t
+
+ UTILITIES
+
+ Title: "bad test of -A flag in h2xs"
+ From: "Jeffrey S. Haemer" <jsh@woodcock.boulder.qms.com>
+ Files: utils/h2xs.PL
+
+ Title: "[PATCH] h2xs missing from utils/Makefile"
+ From: hansm@euronet.nl
+ Files: utils/Makefile
+
+ Title: "PATCH: bug in perlbug w.r.t. environment variables", "bug in perlbug
+ w.r.t. environment variables"
+ From: "Jan D." <jan.djarv@mbox200.swipnet.se>, Jarkko Hietaniemi
+ <jhi@iki.fi>
+ Msg-ID: <199705191841.UAA00969@ostrich.gaia.swipnet.se>,
+ <199705191857.VAA09154@alpha.hut.fi>
+ Files: utils/perlbug.PL
+
+ Title: "[PATCH] final newline missing in MANIFEST generated by h2xs"
+ From: hansm@euronet.nl
+ Files: utils/h2xs.PL
+
+
+-------------
+Version 5.004
+-------------
+
+"Hey, Rocky! Watch me pull a release out of my hat!"
+"Aww, that trick never works..."
+
+ CORE LANGUAGE CHANGES
+
+ Title: "Make C<m//g> reset pos on failure; make C<m//gc> not reset"
+ From: Chip Salzenberg
+ Files: dump.c op.c op.h pod/perldelta.pod pod/perlfaq6.pod
+ pod/perlop.pod pod/perlre.pod pp_ctl.c pp_hot.c regcomp.c
+ t/op/pat.t toke.c
+
+ Title: "SECURITY: Forbid exec() if $ENV{BASH_ENV} is tainted"
+ From: Chip Salzenberg
+ Files: pod/perldelta.pod pod/perlrun.pod pod/perlsec.pod t/op/taint.t
+ taint.c
+
+ Title: "Allow exec() if $ENV{TERM} is tainted but innocuous"
+ From: Chip Salzenberg
+ Files: pod/perldelta.pod pod/perlrun.pod pod/perlsec.pod t/op/taint.t
+ taint.c
+
+ Title: "Allow globbing when tainted under VMS (no external program)"
+ From: Chip Salzenberg
+ Files: pp_sys.c t/op/taint.t
+
+ CORE PORTABILITY
+
+ Title: "Make Irix hints adapt when n32 libm.so is missing"
+ From: Chip Salzenberg
+ Files: hints/irix_6.sh
+
+ Title: "Fix default HP-UX installation path"
+ From: Jeff Okamoto
+ Msg-ID: <199705132228.AA227042483@hpcc123.corp.hp.com>
+ Date: Tue, 13 May 1997 15:28:04 -0700
+ Files: hints/hpux.sh
+
+ Title: "VMS update, including socket support (four patches)"
+ From: Jonathan Hudson <Jonathan.Hudson@jrhudson.demon.co.uk>,
+ Peter Prymmer <pvhp@forte.com>,
+ Dan Sugalski <sugalsd@lbcc.cc.or.us>
+ Files: vms/config.vms vms/descrip.mms vms/sockadapt.h vms/vms.c
+ vms/vmsish.h
+
+ Title: "Win32 update (three patches)"
+ From: Gurusamy Sarathy
+ Files: README.win32 perl.c win32/Makefile win32/config.H
+ win32/config_h.PL win32/config_sh.PL win32/makedef.pl
+ win32/win32.c win32/win32.h win32/win32io.c win32/win32io.h
+ win32/win32iop.h
+
+ Title: "Don't require executable bit on perl -S if DOSISH"
+ From: Danny Sadinoff <sadinoff@olf.com>
+ Msg-ID: <337351CE.79B28DE3@olf.com>
+ Date: Fri, 09 May 1997 12:33:18 -0400
+ Files: perl.c
+
+ OTHER CORE CHANGES
+
+ Title: "In C<eval &func>, always call &func in scalar context"
+ From: Chip Salzenberg
+ Files: op.c
+
+ Title: "Fix recursive substitution"
+ From: Chip Salzenberg; test from Tim Bunce
+ Files: cop.h global.sym pp_ctl.c proto.h scope.c t/op/subst.t
+
+ Title: "Make read with <> from a TTY notice EOF"
+ From: Jonathan I. Kamens <jik@kamens.brookline.ma.us>
+ Msg-ID: <199705121147.HAA03845@jik.saturn.net>
+ Date: Mon, 12 May 1997 07:47:13 -0400
+ Files: sv.c
+
+ Title: "Fix core dump from get*() functions returning no alias array"
+ From: Chip Salzenberg
+ Files: pp_sys.c
+
+ Title: "Fix typo"
+ From: Mark K Trettin <mkt@lucent.com>
+ Msg-ID: <199705102228.RAA11163@gv18c.ih.lucent.com>
+ Date: Sat, 10 May 1997 17:28:35 -0500
+ Files: pp_sys.c
+
+ BUILD PROCESS
+
+ Title: "Don't use 'unset' in Configure"
+ From: Chip Salzenberg
+ Files: Configure
+
+ Title: "Protect against having no such command as 'cc'"
+ From: Hans Mulder <hansm@icgned.nl>
+ Msg-ID: <1997May12.163534.2006434@hmivax.humgen.upenn.edu>
+ Date: Mon, 12 May 1997 16:35:34 -0400 (EDT)
+ Files: Configure
+
+ Title: "minor wording enhancement for Configure"
+ From: Jarkko Hietaniemi
+ Msg-ID: <199705101038.NAA00471@alpha.hut.fi>
+ Date: Sat, 10 May 1997 13:38:31 +0300 (EET DST)
+ Files: Configure
+
+ LIBRARY AND EXTENSIONS
+
+ Title: "Refresh CGI.pm to 2.36"
+ From: Lincoln Stein <lstein@genome.wi.mit.edu>
+ Files: eg/cgi/frameset.cgi eg/cgi/javascript.cgi lib/CGI.pm
+
+ Title: "In IO::File::open, prepend './' less often (for Win32 et al)"
+ From: Chip Salzenberg
+ Files: ext/IO/lib/IO/File.pm
+
+ Title: "Fix core dump on IO::Seekable::setpos($fh, undef)"
+ From: Chip Salzenberg
+ Files: ext/IO/IO.xs t/lib/io_xs.t
+
+ TESTS
+
+ Title: "Make rand.t vanishingly unlikely to give false failure"
+ From: Tom Phoenix
+ Msg-ID: <Pine.GSO.3.96.970510190846.23340K-100000@kelly.teleport.com>
+ Date: Sat, 10 May 1997 19:57:30 -0700 (PDT)
+ Files: t/op/rand.t
+
+ Title: "Fix sleep test: sleep(N) is defined to allow sleeping N-1"
+ From: Chuck D. Phillips <cdp@hpescdp.fc.hp.com>
+ Msg-ID: <199705151735.KAA01143@palrel1.hp.com>
+ Date: Thu, 15 May 1997 11:35:41 -0600
+ Files: t/op/sleep.t
+
+ UTILITIES
+
+ Title: "h2xs and @EXPORT_OK"
+ From: Jeff Okamoto
+ Msg-ID: <199705092348.AA057881699@hpcc123.corp.hp.com>
+ Date: Fri, 9 May 1997 16:48:20 -0700
+ Files: utils/h2xs.PL
+
+ DOCUMENTATION
+
+ Title: "Tweaks for perldelta"
+ From: hansm@euronet.nl
+ Msg-ID: <199705102346.BAA17300@mail.euronet.nl>
+ Date: Sun, 11 May 97 01:46:00 +0200
+ Files: pod/perldelta.pod
+
+ Title: "Mention perlfaq.pod and perlmodlib.pod in perldelta.pod"
+ From: Chip Salzenberg
+ Files: pod/perldelta.pod
+
+ Title: "Fix example of use of lexicals with formats"
+ From: Chip Salzenberg
+ Files: pod/perldelta.pod
+
+ Title: "Explain that destruction order is not defined"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199705150600.CAA13550@aatma.engin.umich.edu>
+ Date: Thu, 15 May 1997 02:00:23 -0400
+ Files: pod/perltoot.pod
+
+ Title: "Note that DATA filehandle is unavailable during BEGIN {}"
+ From: neilb@cre.canon.co.uk (Neil Bowers)
+ Msg-ID: <199705121227.NAA29718@tardis.cre.canon.co.uk>
+ Date: Mon, 12 May 1997 13:27:43 +0100
+ Files: pod/perldata.pod
+
+ Title: "More detailed IO::Socket documentation"
+ From: Tom Christiansen
+ Msg-ID: <199705141456.IAA19061@jhereg.perl.com>
+ Date: Wed, 14 May 1997 08:56:30 -0600
+ Files: pod/perlipc.pod
+
+
+-----------------
+Version 5.003_99a
+-----------------
+
+Herein we find the fruits of the gamma.
+
+ CORE LANGUAGE CHANGES
+
+ Title: "SECURITY: Forbid glob() when tainting (-T or setuid)"
+ From: Chip Salzenberg
+ Files: pod/perlrun.pod pod/perlsec.pod pp_sys.c
+
+ Title: "SECURITY: Forbid exec() if $ENV{TERM} or $ENV{ENV} is tainted"
+ From: Chip Salzenberg
+ Files: pod/perlrun.pod pod/perlsec.pod t/op/taint.t taint.c
+
+ CORE PORTABILITY
+
+ Title: "(NeXT|Open)Step update"
+ From: Gerd Knops <gerti@BITart.com>
+ Msg-ID: <9705072247.AA18882@BITart.com>
+ Date: Wed, 7 May 97 17:47:02 -0500
+ Files: Configure MANIFEST config_h.SH hints/next_3.sh hints/next_4.sh
+
+ Title: "NetBSD hint update"
+ From: Giles Lean <giles@nemeton.com.au>
+ Msg-ID: <199705051346.XAA13584@topaz.nemeton.com.au>
+ Date: Mon, 5 May 1997 23:46:37 +1000 (EST)
+ Files: hints/netbsd.sh
+
+ Title: "Irix hint update"
+ From: Scott Henry <scotth@sgi.com>
+ Msg-ID: <yd83es0fp57.fsf@hoshi.engr.sgi.com>
+ Date: 06 May 1997 11:09:56 -0700
+ Files: hints/irix_6.sh
+
+ Title: "HPUX: patch for ext/DynaLoader/dl_hpux.xs"
+ From: Chuck D. Phillips <cdp@hpescdp.fc.hp.com>
+ Msg-ID: <199705050548.WAA21260@palrel1.hp.com>
+ Date: Sun, 4 May 1997 23:48:39 -0600
+ Files: ext/DynaLoader/dl_hpux.xs
+
+ Title: "Win32 update (consolidated patch plus three followups)"
+ From: Gurusamy Sarathy
+ Files: EXTERN.h README.win32 lib/Sys/Hostname.pm pod/perldelta.pod
+ win32/config.H win32/config.w32 win32/config_sh.PL win32/perllib.c
+ win32/win32.c win32/win32.h win32/include/sys/socket.h
+
+ Title: "Win32 boot_DynaLoader problem in 99"
+ From: Gary Clark <GaryC@mail.jeld-wen.com>
+ Msg-ID: <1997May05.105000.1708.84476@mail.jeld-wen.com>
+ Date: Mon, 05 May 1997 10:49:03 -0700
+ Files: win32/makedef.pl
+
+ OTHER CORE CHANGES
+
+ Title: "Fix wantarray() in sort subs [fixes metaconfig]"
+ From: Chip Salzenberg
+ Files: pp_ctl.c
+
+ Title: "Fix for redefined sort subs nastiness"
+ From: Gurusamy Sarathy
+ Msg-ID: <199705090004.UAA15032@aatma.engin.umich.edu>
+ Date: Thu, 08 May 1997 20:04:18 -0400
+ Files: op.c pod/perldelta.pod pod/perldiag.pod sv.c t/op/sort.t
+
+ BUILD PROCESS
+
+ Title: "AFS patches"
+ From: Chip Salzenberg, Larry Schwimmer <rosebud@cyclone.Stanford.EDU>
+ Files: Configure installperl
+
+ LIBRARY AND EXTENSIONS
+
+ Title: "Another blank line patch to Pod::Text"
+ From: Russ Allbery <rra@stanford.edu>
+ Msg-ID: <m3afm5g6ar.fsf@windlord.Stanford.EDU>
+ Date: 08 May 1997 11:36:12 -0700
+ Files: lib/Pod/Text.pm
+
+ TESTS
+
+ (no other changes)
+
+ UTILITIES
+
+ Title: "Three bugs in pod2html"
+ From: hansm@euronet.nl
+ Msg-ID: <199705052228.AAA25351@mail.euronet.nl>
+ Date: Tue, 6 May 97 00:28:06 +0200
+ Files: lib/Pod/Html.pm
+
+ Title: "Trivial bugfix for pod of xsubpp"
+ From: Ralf S. Engelschall <rse@engelschall.com>
+ Msg-ID: <199705051447.QAA09995@en1.engelschall.com>
+ Date: Mon, 5 May 1997 16:47:03 +0200
+ Files: lib/ExtUtils/xsubpp
+
+ Title: "Newer CPerl mode"
+ From: Ilya Zakharevich
+ Msg-ID: <199705080032.UAA22532@monk.mps.ohio-state.edu>
+ Date: Wed, 7 May 1997 20:32:46 -0400 (EDT)
+ Files: emacs/cperl-mode.el
+
+ DOCUMENTATION
+
+ Title: "Updates to perldelta"
+ From: Chip Salzenberg and Dominic Dunlop
+ Files: pod/perldelta.pod
+
+ Title: "More explicit Solaris instructions"
+ From: Andy Dougherty
+ Msg-ID: <Pine.SOL.3.95q.970508171206.438A-100000@fractal.lafayette.ed
+ Date: Thu, 08 May 1997 17:14:54 -0400 (EDT)
+ Files: INSTALL hints/solaris_2.sh
+
+ Title: "Document 'Possible attempt to separate words with commas'"
+ From: Gisle Aas
+ Msg-ID: <hyb9snvdw.fsf@bergen.sn.no>
+ Date: 06 May 1997 23:27:55 +0200
+ Files: pod/perlop.pod
+
+ Title: "perlfaq9, hostname"
+ From: John D Groenveld <groenvel@cse.psu.edu>
+ Msg-ID: <199705061741.NAA22777@cse.psu.edu>
+ Date: Tue, 06 May 1997 13:41:12 EDT
+ Files: pod/perlfaq9.pod
+
+ Title: "Debugger docs patch"
+ From: Ilya Zakharevich
+ Msg-ID: <199705080107.VAA24317@monk.mps.ohio-state.edu>
+ Date: Wed, 7 May 1997 21:07:14 -0400 (EDT)
+ Files: pod/perldebug.pod
+
+ Title: "Document that C<m?x?> is just like C<?x?>"
+ From: Chip Salzenberg
+ Files: pod/perlop.pod
+
+ Title: "Refresh description of sprintf()"
+ From: Chip Salzenberg
+ Files: pod/perl.pod pod/perlfunc.pod
+
+ Title: "Mention the Regular Expressions book"
+ From: Stephen Potter <spp@psa.pencom.com>
+ Msg-ID: <199705071737.MAA18799@psa.pencom.com>
+ Date: Wed, 07 May 1997 12:37:37 -0500
+ Files: pod/perlbook.pod pod/perlre.pod
+
+ Title: "OS/2 doc patch for _99"
+ From: Ilya Zakharevich
+ Msg-ID: <199705080046.UAA23466@monk.mps.ohio-state.edu>
+ Date: Wed, 7 May 1997 20:46:45 -0400 (EDT)
+ Files: README.os2
+
+
+----------------
+Version 5.003_99
+----------------
+
+"Oops." Now this _has_ to be the gamma; we're out of numbers.
+
+ CORE LANGUAGE CHANGES
+
+ (no changes)
+
+ CORE PORTABILITY
+
+ Title: "NeXT hints update"
+ From: hansm@euronet.nl
+ Msg-ID: <199704302229.AAA02690@mail.euronet.nl>
+ Date: Thu, 1 May 97 00:28:41 +0200
+ Files: Configure Makefile.SH hints/next_4.sh
+
+ Title: "Support shared libperl on AIX"
+ From: Eric Bartley <bartley@icd.cc.purdue.edu>
+ Msg-ID: <199704270131.UAA51426@icd.cc.purdue.edu>
+ Date: Sat, 26 Apr 1997 20:31:37 -0500
+ Files: Configure Makefile.SH hints/aix.sh
+
+ OTHER CORE CHANGES
+
+ Title: "Fix NUL-termination bug in delimcpy()"
+ From: Chip Salzenberg
+ Files: util.c
+
+ Title: "Forget prototype of subroutine after C<undef &subr>"
+ From: Chip Salzenberg
+ Files: op.c
+
+ Title: "Handle tainted values in lists returned from subs, evals"
+ From: Chip Salzenberg
+ Files: pp_ctl.c pp_hot.c t/op/taint.t
+
+ Title: "Fix sysread() on tied handle"
+ From: Spider Boardman
+ Msg-ID: <199705010601.CAA04926@Orb.Nashua.NH.US>
+ Date: Thu, 1 May 1997 02:01:20 -0400
+ Files: pp_sys.c
+
+ Title: "Fix OS/2-specific buffer overflow"
+ From: Ilya Zakharevich
+ Msg-ID: <199704301920.PAA09681@monk.mps.ohio-state.edu>
+ Date: Wed, 30 Apr 1997 15:20:01 -0400 (EDT)
+ Files: os2/os2.c
+
+ BUILD PROCESS
+
+ Title: "Add new globals to perl.exp"
+ From: Chip Salzenberg
+ Files: perl_exp.SH
+
+ LIBRARY AND EXTENSIONS
+
+ Title: "Refresh DB_File to 1.14"
+ From: Paul Marquess
+ Msg-ID: <9704302045.AA05484@claudius.bfsec.bt.co.uk>
+ Date: Wed, 30 Apr 1997 21:45:09 +0100 (BST)
+ Files: ext/DB_File/DB_File.pm ext/DB_File/DB_File.xs t/lib/db-btree.t
+ t/lib/db-hash.t t/lib/db-recno.t
+
+ TESTS
+
+ Title: "Disable op/pipe.t test under Machten"
+ From: Dominic Dunlop <domo@slipper.ip.lu>
+ Msg-ID: <v03102801af8e160d3879@[194.51.248.68]>
+ Date: Thu, 1 May 1997 12:48:26 +0200
+ Files: t/io/pipe.t
+
+ UTILITIES
+
+ Title: "typo fixes to installhtml"
+ From: lvirden@cas.org (Larry W. Virden)
+ Msg-ID: <199705011114.HAA26968@cas.org>
+ Date: Thu, 1 May 1997 07:14:31 -0400
+ Files: installhtml
+
+ DOCUMENTATION
+
+ Title: "Fix description of av_undef() in perlguts"
+ From: Gisle Aas
+ Msg-ID: <199705011042.MAA09897@bergen.sn.no>
+ Date: Thu, 1 May 1997 12:42:46 +0200
+ Files: pod/perlguts.pod
+
+ Title: "Fix typo in perldelta"
+ From: Chip Salzenberg
+ Files: pod/perldelta.pod
+
+
+----------------
+Version 5.003_98
+----------------
+
+Here it is, the second public beta (a.k.a gamma).
+
+ CORE LANGUAGE CHANGES
+
+ Title: "Support C< $coderef->($x,$y) >"
+ From: Chip Salzenberg
+ Files: perly.c perly.c.diff perly.y pod/perldelta.pod pod/perldsc.pod
+ pod/perlref.pod t/op/ref.t vms/perly_c.vms
+
+ CORE PORTABILITY
+
+ (no changes)
+
+ OTHER CORE CHANGES
+
+ Title: "Fix C< hex('80') * 0x1000000 >"
+ From: Chip Salzenberg
+ Files: opcode.pl
+
+ Title: "Reset errno after failed piped close"
+ From: Roderick Schertler
+ Msg-ID: <28152.862264940@eeyore.ibcinc.com>
+ Date: Mon, 28 Apr 1997 18:02:20 -0400
+ Files: lib/Time/gmtime.pm lib/Time/localtime.pm pod/perlfunc.pod
+ t/io/pipe.t util.c
+
+ Title: "Fix warning wrt return value of PerlIO_getname()"
+ From: Spider Boardman
+ Msg-ID: <199704300448.AAA24174@Orb.Nashua.NH.US>
+ Date: Wed, 30 Apr 1997 00:48:13 -0400
+ Files: perlio.c
+
+ BUILD PROCESS
+
+ (no changes)
+
+ LIBRARY AND EXTENSIONS
+
+ (no changes)
+
+ TESTS
+
+ (no other changes)
+
+ UTILITIES
+
+ (no changes)
+
+ DOCUMENTATION
+
+ Title: "Describe Math::Trig in perlmodlib"
+ From: Chip Salzenberg
+ Files: pod/perlmodlib.pod
+
+ Title: "Add new diagnostics to perldelta"
+ From: Chip Salzenberg
+ Files: pod/perldelta.pod pod/perldiag.pod
+
+
+-----------------
+Version 5.003_97j
+-----------------
+
+This patch should be _98, unless it's egregiously broken somehow.
+
+ CORE LANGUAGE CHANGES
+
+ (no changes)
+
+ CORE PORTABILITY
+
+ Title: "Return to favoring memset(,0,) over bzero()"
+ From: Chip Salzenberg
+ Files: perl.h
+
+ Title: "NetBSD hint update"
+ From: matthew green <mrg@splode.eterna.com.au>
+ Msg-ID: <199704251021.EAA22570@jhereg.perl.com>
+ Date: Fri, 25 Apr 1997 20:18:02 +1000
+ Files: hints/netbsd.sh
+
+ Title: "HP-UX hint update"
+ From: Chuck D. Phillips <cdp@hpescdp.fc.hp.com>
+ Msg-ID: <199704280535.WAA22441@palrel1.hp.com>
+ Date: Sun, 27 Apr 1997 23:35:07 -0600
+ Files: hints/hpux.sh
+
+ Title: "Win32 update (three patches)"
+ From: Gurusamy Sarathy and Nick Ing-Simmons
+ Files: win32/makedef.pl win32/perllib.c win32/win32.c
+
+ OTHER CORE CHANGES
+
+ Title: "Update sprintf: '%hn'; '%s',NULL; panic on frexp() failure"
+ From: Chip Salzenberg
+ Files: perl.h pod/perldiag.pod sv.c
+
+ Title: "Fix lingering '%S' in XS_VERSION_BOOTCHECK"
+ From: Chip Salzenberg
+ Files: XSUB.h
+
+ Title: "Eliminate Alpha warnings"
+ From: Hallvard B Furuseth and Chip Salzenberg
+ Files: perlsdio.h pp_sys.c
+
+ Title: "Fix typo in NeXT dynaloader"
+ From: Chip Salzenberg
+ Files: ext/DynaLoader/dl_next.xs
+
+ Title: "Fix possible buffer overflow under VMS"
+ From: Chip Salzenberg
+ Files: taint.c
+
+ BUILD PROCESS
+
+ (no changes)
+
+ LIBRARY AND EXTENSIONS
+
+ Title: "Refresh CGI.pm to 2.35"
+ From: Lincoln Stein <lstein@genome.wi.mit.edu>
+ Files: lib/CGI.pm
+
+ Title: "Refresh DB_File to 1.13"
+ From: Paul Marquess
+ Msg-ID: <9704271413.AA08876@claudius.bfsec.bt.co.uk>
+ Date: Sun, 27 Apr 1997 15:12:59 +0100 (BST)
+ Files: ext/DB_File/DB_File.pm ext/DB_File/DB_File.xs
+
+ Title: "SelfLoader: fix prototype pattern, rename intrusive lexical"
+ From: Jesse Glick <jesse@ginger> and Chip Salzenberg
+ Files: lib/SelfLoader.pm
+
+ TESTS
+
+ (no changes)
+
+ UTILITIES
+
+ (no changes)
+
+ DOCUMENTATION
+
+ Title: "Split perlmod"
+ From: Tom Christiansen
+ Msg-ID: <199704260050.RAA02468@toy.perl.com>
+ Date: Fri, 25 Apr 1997 20:50:09 -0400
+ Files: MANIFEST pod/Makefile pod/buildtoc pod/perl.pod
+ pod/perldsc.pod pod/perlfaq3.pod pod/perlipc.pod
+ pod/perlmod.pod pod/perlmodlib.pod pod/perlobj.pod
+ pod/perltie.pod pod/roffitall
+
+ Title: "Describe __PACKAGE__ in perldelta"
+ From: Chip Salzenberg
+ Files: pod/perldelta.pod
+
+ Title: "Doc fix for close of pipe handle"
+ From: Chip Salzenberg
+ Files: pod/perlfunc.pod
+
+
+-----------------
+Version 5.003_97i
+-----------------
+
+This patch eliminates all known sources of buffer overflow! (And the
+crowd goes wild. (Yeah.)) Showstoppers only between here and _98.
+
+ CORE LANGUAGE CHANGES
+
+ (no changes)
+
+ CORE PORTABILITY
+
+ Title: "Provide memset() if it's missing"
+ From: Chip Salzenberg
+ Files: global.sym perl.h proto.h util.c
+
+ Title: "Don't tell GCC that warn(), croak(), and die() are printf-lik
+ From: Chip Salzenberg
+ Files: proto.h
+
+ OTHER CORE CHANGES
+
+ Title: "Misc. sv_vcatpvfn() fixes"
+ From: Hugo, Dale, Nick, Hallvard, Chip
+ Files: gv.c mg.c op.c perl.c pp.c pp_ctl.c sv.c toke.c util.c
+
+ Title: "Enforce order of sprintf() elements"
+ From: Chip Salzenberg
+ Files: sv.c
+
+ Title: "Guard against long numbers, <<LONG_DELIM, and <long glob>"
+ From: Chip Salzenberg
+ Files: global.sym mg.c perl.c pod/perldiag.pod proto.h toke.c util.c
+
+ Title: "Guard against C<goto> to deeply nested label"
+ From: Chip Salzenberg
+ Files: pod/perldiag.pod pp_ctl.c
+
+ Title: "Guard against overflow in dup2() emulation"
+ From: Chip Salzenberg
+ Files: util.c
+
+ Title: "Win32: Guard against long function names"
+ From: Chip Salzenberg
+ Files: win32/win32sck.c
+
+ Title: "Make mess() always work, by using a non-arena SV"
+ From: Chip Salzenberg, from idea by Gurusamy Sarathy
+ Files: perl.c util.c
+
+ Title: "Fix scalar leak in pp_prtf()"
+ From: Doug MacEachern
+ Msg-ID: <199704241706.NAA19140@postman.osf.org>
+ Date: Thu, 24 Apr 1997 13:06:21 -0400
+ Files: pp_sys.c
+
+ Title: "When copying a format line, take only its string value"
+ From: Chip Salzenberg
+ Files: sv.c
+
+ Title: "Undo private patch"
+ From: Chip Salzenberg
+ Files: installperl lib/ExtUtils/Install.pm
+
+ Title: "Fix LEAKTEST numbers"
+ From: Chip Salzenberg
+ Files: ext/DynaLoader/dl_vms.xs handy.h os2/os2.c util.c vms/vms.c
+ win32/win32.c win32/win32sck.c
+
+ BUILD PROCESS
+
+ Title: "Cope with a <db.h> that isn't related to DB"
+ From: Jarkko Hietaniemi
+ Msg-ID: <199704241728.UAA09951@alpha.hut.fi>
+ Date: Thu, 24 Apr 1997 20:28:39 +0300 (EET DST)
+ Files: Configure
+
+ LIBRARY AND EXTENSIONS
+
+ Title: "Always NUL-terminate opsets"
+ From: Chip Salzenberg
+ Files: ext/Opcode/Opcode.xs
+
+ Title: "Don't core dump if my_inet_aton() get a NULL"
+ From: Chip Salzenberg
+ Files: ext/Socket/Socket.xs
+
+ Title: "Handle symlinks, high permission bits in File::Path"
+ From: Chip Salzenberg
+ Files: lib/File/Path.pm
+
+ Title: "Math::{Complex,Trig} update"
+ From: Jarkko Hietaniemi
+ Msg-ID: <199704242221.BAA30363@alpha.hut.fi>
+ Date: Fri, 25 Apr 1997 01:21:44 +0300 (EET DST)
+ Files: lib/Math/Complex.pm lib/Math/Trig.pm pod/roffitall
+ t/lib/complex.t t/lib/trig.t
+
+ TESTS
+
+ (no other changes)
+
+ UTILITIES
+
+ Title: "Fix buffer overflow in a2p"
+ From: Chip Salzenberg
+ Files: x2p/a2py.c
+
+ DOCUMENTATION
+
+ Title: "FAQ udpate (24-apr-97)"
+ From: Nathan Torkington <gnat@prometheus.frii.com>
+ Msg-ID: <199704242247.QAA07010@prometheus.frii.com>
+ Date: Thu, 24 Apr 1997 16:47:23 -0600 (MDT)
+ Files: pod/perlfaq*.pod
+
+ Title: "Document new {,s}printf() behavior"
+ From: Chip Salzenberg
+ Files: pod/perldelta.pod pod/perlfunc.pod
+
+
+-----------------
+Version 5.003_97h
+-----------------
+
+This patch eliminates almost all possible sources of buffer overflow;
+in particular, there are no more sprintf() bugs. (!!) This patch
+also has a few other fixes. With these changes in place, I can sleep
+at night. (Because I've stopped hacking. :-))
+
+ CORE LANGUAGE CHANGES
+
+ Title: "Support PRINTF for tied handles"
+ From: Doug MacEachern
+ Msg-ID: <199704202226.SAA08032@postman.osf.org>
+ Date: Sun, 20 Apr 1997 18:26:13 -0400
+ Files: pod/perldelta.pod pod/perltie.pod pp_sys.c t/op/misc.t
+
+ CORE PORTABILITY
+
+ Title: "Fix bitwise shifts and pack('w') on Crays"
+ From: Chip Salzenberg
+ Files: pp.c
+
+ Title: "Win32 update (two patches)"
+ From: Gurusamy Sarathy
+ Files: lib/AutoSplit.pm lib/ExtUtils/MM_Unix.pm win32/config.w32
+ win32/makedef.pl
+
+ OTHER CORE CHANGES
+
+ Title: "Mondo Cool patch for buffer safety and convenience"
+ From: Chip Salzenberg
+ Files: XSUB.h doop.c dump.c ext/DynaLoader/dl_dlopen.xs
+ ext/DynaLoader/dl_hpux.xs ext/DynaLoader/dl_next.xs
+ ext/DynaLoader/dlutils.c ext/ODBM_File/ODBM_File.xs
+ global.sym gv.c interp.sym mg.c op.c perl.c perl.h
+ pod/perlguts.pod pp.c pp_ctl.c pp_hot.c pp_sys.c proto.h
+ regcomp.c regexec.c sv.c toke.c util.c
+
+ Title: "Problems with glob"
+ From: Ilya Zakharevich
+ Msg-ID: <1997Apr20.024432.1941365@hmivax.humgen.upenn.edu>
+ Date: Sun, 20 Apr 1997 02:44:32 -0400 (EDT)
+ Files: op.c
+
+ Title: "Fix scalar leak in closures"
+ From: Chip Salzenberg
+ Files: op.c scope.c
+
+ Title: "Refine error messages re: anon subs' prototypes"
+ From: Chip Salzenberg
+ Files: op.c
+
+ Title: "Outermost scope is void, not scalar"
+ From: Chip Salzenberg
+ Files: pp_ctl.c
+
+ BUILD PROCESS
+
+ Title: "Fix up Linux hints for tcsh, and Configure patch"
+ From: Andy Dougherty
+ Msg-ID: <Pine.SOL.3.95q.970422101051.2506C-100000@fractal.lafayette.e
+ Date: Tue, 22 Apr 1997 11:02:27 -0400 (EDT)
+ Files: Configure hints/linux.sh
+
+ Title: "There is no standard answer to 'Use suidperl?'"
+ From: Chip Salzenberg
+ Files: hints/bsdos.sh hints/freebsd.sh hints/linux.sh
+ hints/machten_2.sh
+
+ LIBRARY AND EXTENSIONS
+
+ Title: "Math::Complex update"
+ From: Jarkko Hietaniemi
+ Files: lib/Math/Complex.pm t/lib/complex.t
+
+ Title: "Croak on C<use autouse> without module name"
+ From: Chip Salzenberg
+ Files: lib/autouse.pm
+
+ Title: "Silence warnings on simple C<use ops>"
+ From: Roderick Schertler
+ Msg-ID: <pzybafum6k.fsf@eeyore.ibcinc.com>
+ Date: 19 Apr 1997 10:22:43 -0400
+ Files: ext/Opcode/ops.pm
+
+ TESTS
+
+ Title: "Don't put leading newline on numeric strings"
+ From: Andreas Koenig
+ Msg-ID: <199704230847.KAA22752@anna.in-berlin.de>
+ Date: Wed, 23 Apr 1997 10:47:00 +0200
+ Files: t/pragma/constant.t
+
+ UTILITIES
+
+ (no changes)
+
+ DOCUMENTATION
+
+ Title: "FAQ udpate (23-apr-97)"
+ From: Nathan Torkington <gnat@prometheus.frii.com>
+ Msg-ID: <199704231822.MAA05074@prometheus.frii.com>
+ Date: Wed, 23 Apr 1997 12:22:55 -0600 (MDT)
+ Files: pod/perlfaq*.pod
+
+ Title: "Two doublewords less"
+ From: Jarkko Hietaniemi
+ Msg-ID: <199704201938.WAA07722@alpha.hut.fi>
+ Date: Sun, 20 Apr 1997 22:38:13 +0300 (EET DST)
+ Files: pod/perlrun.pod vms/perlvms.pod
+
+
+-----------------
+Version 5.003_97g
+-----------------
+
+This one has two security bug fixes for buffer overflows. Perl has
+not yet been searched to see if more fixes are needed.
+
+ CORE LANGUAGE CHANGES
+
+ Title: "Improve sysseek(), remove systell(), fix Opcode"
+ From: Chip Salzenberg
+ Files: doio.c ext/Opcode/Makefile.PL ext/Opcode/Opcode.pm
+ ext/Opcode/Opcode.xs global.sym keywords.pl opcode.pl
+ pod/perldelta.pod pod/perldiag.pod pod/perlfunc.pod pp_sys.c
+ proto.h t/op/sysio.t toke.c
+
+ Title: "Fix (and test) spaces in {,un}pack()"
+ From: Chip Salzenberg
+ Files: pp.c t/op/pack.t
+
+ CORE PORTABILITY
+
+ Title: "Irix update"
+ From: Scott Henry <scotth@sgi.com>
+ Msg-ID: <yd8d8rsi0ln.fsf@hoshi.engr.sgi.com>
+ Date: 18 Apr 1997 12:37:24 -0700
+ Files: MANIFEST hints/irix_6.sh hints/irix_6_0.sh hints/irix_6_1.sh
+
+ Title: "ExtUtils/Miniperl.pm not built on Win32"
+ From: Nick Ing-Simmons
+ Msg-ID: <199704181742.SAA08407@ni-s.u-net.com>
+ Date: Fri, 18 Apr 1997 18:42:32 +0100
+ Files: win32/Makefile
+
+ OTHER CORE CHANGES
+
+ Title: "SECURITY FIX: 'Identifier too long'"
+ From: Chip Salzenberg
+ Files: pod/perldelta.pod pod/perldiag.pod toke.c
+
+ Title: "SECURITY FIX: Buffer overflow in gv_fetchfile()"
+ From: Chip Salzenberg
+ Files: gv.c
+
+ Title: "Remove pp_method() inefficiency from last patch"
+ From: Chip Salzenberg
+ Files: pp_hot.c
+
+ BUILD PROCESS
+
+ Title: "Fix unnecessary re-linking"
+ From: Chip Salzenberg
+ Files: lib/ExtUtils/MM_Unix.pm
+
+ Title: "Fix tcsh hack in Configure"
+ From: Chip Salzenberg
+ Files: Configure
+
+ Title: "Minor, optional patch to Makefile.SH"
+ From: "Randy J. Ray" <rjray@uswest.com>
+ Msg-ID: <rjray-9703180132.AA00374040@snakepit.ecte.uswc.uswest.com>
+ Date: Thu, 17 Apr 1997 19:32:17 -0600
+ Files: Makefile.SH
+
+ LIBRARY AND EXTENSIONS
+
+ Title: "Patch to Getopt::Long"
+ From: Johan Vromans <jvromans@squirrel.nl>
+ Msg-ID: <m0wIKCO-00081IC@phoenix.squirrel.nl>
+ Date: Fri, 18 Apr 97 22:24 MET DST
+ Files: lib/Getopt/Long.pm
+
+ Title: "Fix NAME in SDBM_File build"
+ From: Chip Salzenberg
+ Files: ext/SDBM_File/sdbm/Makefile.PL
+
+ TESTS
+
+ (no other changes)
+
+ UTILITIES
+
+ Title: "Make h2ph generate constant subs"
+ From: Roderick Schertler
+ Msg-ID: <pz2088w5ot.fsf@eeyore.ibcinc.com>
+ Date: 18 Apr 1997 14:23:46 -0400
+ Files: utils/h2ph.PL
+
+ DOCUMENTATION
+
+ Title: "Document {,un}pack changes"
+ From: Paul Marquess
+ Msg-ID: <9704181249.AA11733@claudius.bfsec.bt.co.uk>
+ Date: Fri, 18 Apr 97 13:49:39 BST
+ Files: pod/perldelta.pod pod/perldiag.pod
+
+
+-----------------
+Version 5.003_97f
+-----------------
+
+This is it before _98. No more last-minute features. Really, I mean
+it this time. No kidding.
+
+ CORE LANGUAGE CHANGES
+
+ Title: "New operator systell()"
+ From: Chip Salzenberg
+ Files: doio.c ext/Opcode/Opcode.pm keywords.pl opcode.pl
+ pod/perldelta.pod pod/perldiag.pod pod/perlfunc.pod pp_sys.c
+ t/op/sysio.t toke.c
+
+ Title: "Allow constant sub to be optimized when called with parens"
+ From: Chip Salzenberg
+ Files: toke.c
+
+ Title: "Make {,un}pack fail on invalid pack types"
+ From: Chip Salzenberg
+ Files: pod/perldiag.pod pp.c
+
+ CORE PORTABILITY
+
+ Title: "Fix bitwise ops and {,un}pack() on Cray CPUs"
+ From: Chip Salzenberg
+ Files: pp.c
+
+ Title: "VMS update"
+ From: Charles Bailey
+ Files: lib/Cwd.pm lib/File/Path.pm lib/FindBin.pm vms/perly_c.vms
+ vms/vms.c vms/writemain.pl
+
+ Title: "Win32 update (three patches)"
+ From: Gurusamy Sarathy and Nick Ing-Simmons
+ Files: lib/Cwd.pm lib/ExtUtils/MM_Unix.pm lib/ExtUtils/MM_Win32.pm
+ lib/File/Basename.pm win32/Makefile win32/makedef.pl
+ win32/perllib.c win32/win32.c win32/win32iop.h
+
+ OTHER CORE CHANGES
+
+ Title: "Fix error messages on method lookup failure"
+ From: Chip Salzenberg
+ Files: pp_hot.c
+
+ Title: "Fix use of var before init in util.c"
+ From: Gurusamy Sarathy
+ Msg-ID: <199704162342.TAA20773@aatma.engin.umich.edu>
+ Date: Wed, 16 Apr 1997 19:42:41 -0400
+ Files: util.c
+
+ BUILD PROCESS
+
+ Title: "Linux hints: Allow build w/o suidperl, prefer tcsh to csh"
+ From: Michael De La Rue <mikedlr@tardis.ed.ac.uk>
+ Files: Configure hints/linux.sh
+
+ LIBRARY AND EXTENSIONS
+
+ Title: "Fix bug in Opcode when (maxo & 15) > 8"
+ From: Chip Salzenberg
+ Files: ext/Opcode/Makefile.PL ext/Opcode/Opcode.pm
+ ext/Opcode/Opcode.xs
+
+ Title: "CGI.pm broke again"
+ From: Andreas Koenig
+ Msg-ID: <199704171136.NAA24859@anna.in-berlin.de>
+ Date: Thu, 17 Apr 1997 13:36:28 +0200
+ Files: lib/CGI.pm
+
+ Title: "Revise quotewords()"
+ From: Shishir Gundavaram <shishir@ruby.ora.com>
+ Files: lib/Text/ParseWords.pm
+
+ TESTS
+
+ (no other changes)
+
+ UTILITIES
+
+ (no changes)
+
+ DOCUMENTATION
+
+ Title: "Doc updates: INSTALL-1.13, pumpkin.pod-1.9"
+ From: Andy Dougherty
+ Files: INSTALL Porting/pumpkin.pod
+
+ Title: "Document size restrictions for packed integers"
+ From: Jarkko Hietaniemi
+ Files: pod/perlfunc.pod
+
+
+-----------------
+Version 5.003_97e
+-----------------
+
+Y'know, I've heard of this "beta" thing, but it's been so long since
+I've seen one, I'm not sure it really exists...
+
+ CORE LANGUAGE CHANGES
+
+ Title: "New operator: sysseek()"
+ From: Chip Salzenberg
+ Files: doio.c ext/Opcode/Makefile.PL ext/Opcode/Opcode.pm global.sym
+ keywords.pl opcode.pl pod/perldelta.pod pod/perlfunc.pod
+ pp_sys.c t/op/sysio.t toke.c
+
+ Title: "Allow recursive substitution again"
+ From: Chip Salzenberg
+ Files: pod/perldelta.pod pod/perldiag.pod pp_hot.c
+
+ CORE PORTABILITY
+
+ Title: "Use size_t for socket size parameters of GNU libc"
+ From: Chip Salzenberg
+ Files: doio.c pp_sys.c
+
+ Title: "Fix STMT_{START,END} under g++"
+ From: Steven Parkes <parkes@sierravista.com>
+ Msg-ID: <199704141935.MAA11240@monterey.sierravista.com>
+ Date: Mon, 14 Apr 1997 12:35:34 -0700
+ Files: perl.h
+
+ Title: "Win32 update (four patches)"
+ From: Gurusamy Sarathy and Nick Ing-Simmons
+ Files: MANIFEST README.win32 dosish.h ext/SDBM_File/Makefile.PL
+ ext/SDBM_File/sdbm/Makefile.PL ext/SDBM_File/sdbm/sdbm.c
+ ext/SDBM_File/sdbm/sdbm.h lib/ExtUtils/MM_Unix.pm perl.c
+ utils/perlbug.PL utils/perldoc.PL win32/Makefile win32/TEST
+ win32/config.H win32/config.w32 win32/config_h.PL
+ win32/config_sh.PL win32/perllib.c win32/runperl.c
+ win32/win32.c win32/win32io.c win32/win32sck.c
+
+ OTHER CORE CHANGES
+
+ Title: "New API function: perl_eval_pv()"
+ From: Doug MacEachern
+ Msg-ID: <199704142113.RAA06823@postman.osf.org>
+ Date: Mon, 14 Apr 1997 17:13:41 -0400
+ Files: perl.c pod/perlcall.pod pod/perldelta.pod pod/perlembed.pod
+ pod/perlguts.pod proto.h
+
+ Title: "Fix C< s//whatever/ >, which reuses old pattern"
+ From: Chip Salzenberg
+ Files: pp_hot.c regexec.c
+
+ Title: "Return a value from PerlIO_{,un}getc"
+ From: Hallvard B Furuseth
+ Msg-ID: <199704131228.OAA05695@bombur2.uio.no>
+ Date: Sun, 13 Apr 1997 14:28:14 +0200 (MET DST)
+ Files: perlio.c
+
+ Title: "Fix for environment leak"
+ From: skimo@breughel.ufsia.ac.be (Sven Verdoolaege)
+ Msg-ID: <19970415103246.NN46698@breughel.ufsia.ac.be>
+ Date: Tue, 15 Apr 1997 10:32:46 +0200
+ Files: util.c
+
+ Title: "Fix comments in seed()"
+ From: Hallvard B Furuseth
+ Msg-ID: <199704141758.TAA06895@bombur2.uio.no>
+ Date: Mon, 14 Apr 1997 19:58:38 +0200 (MET DST)
+ Files: pp.c
+
+ BUILD PROCESS
+
+ Title: "Put extensions' autoload files in $archlib"
+ From: Chip Salzenberg
+ Files: installperl
+
+ Title: "Use '-fPIC' for debugging compiles under Solaris with gcc"
+ From: Hallvard B Furuseth
+ Files: Configure
+
+ LIBRARY AND EXTENSIONS
+
+ Title: "Refresh CGI to 2.34"
+ From: Chip Salzenberg
+ Files: eg/cgi/customize.cgi eg/cgi/tryit.cgi lib/CGI.pm
+ lib/CGI/Apache.pm
+
+ Title: "Debugger update"
+ From: Ilya Zakharevich
+ Msg-ID: <199704142115.RAA09923@monk.mps.ohio-state.edu>
+ Date: Mon, 14 Apr 1997 17:15:27 -0400 (EDT)
+ Files: lib/perl5db.pl
+
+ Title: "diagnostics: $/ gotcha"
+ From: Andreas Koenig
+ Msg-ID: <199704151814.UAA03404@anna.in-berlin.de>
+ Date: Tue, 15 Apr 1997 20:14:01 +0200
+ Files: lib/diagnostics.pm
+
+ Title: "Update File::Path"
+ From: Andreas Koenig
+ Msg-ID: <199704151401.QAA02556@anna.in-berlin.de>
+ Date: Tue, 15 Apr 1997 16:01:07 +0200
+ Files: lib/File/Path.pm t/lib/filepath.t
+
+ Title: "User::pwent.pm: g{,e}cos"
+ From: Tom Christiansen
+ Msg-ID: <199704130135.TAA23274@jhereg.perl.com>
+ Date: Sat, 12 Apr 1997 19:35:54 -0600
+ Files: lib/User/pwent.pm
+
+ Title: "Sys::Syslog: hyphens in hostnames"
+ From: Jarkko Hietaniemi
+ Msg-ID: <199704151421.RAA19693@alpha.hut.fi>
+ Date: Tue, 15 Apr 1997 17:21:53 +0300 (EET DST)
+ Files: lib/Sys/Syslog.pm
+
+ Title: "Clean up format of dlopen() debug info"
+ From: Hallvard B Furuseth
+ Files: ext/DynaLoader/dl_dlopen.xs
+
+ TESTS
+
+ (no changes)
+
+ UTILITIES
+
+ Title: "xsubpp incorrectly handles 'class::newthing()'"
+ From: "John Q. Linux" <jql@jql.accessone.com>
+ Msg-ID: <199704122201.PAA01780@jql.accessone.com>
+ Date: Sat, 12 Apr 1997 15:01:33 -0700
+ Files: lib/ExtUtils/xsubpp
+
+ DOCUMENTATION
+
+ Title: "Add CGI to perldelta.pod and improve its description in MANIFEST"
+ From: Chip Salzenberg
+ Files: MANIFEST pod/perldelta.pod
+
+ Title: "Describe probs with majordomo 1.94.1"
+ From: Chip Salzenberg
+ Files: pod/perldelta.pod
+
+ Title: "Fix description of /\G/g"
+ From: Chip Salzenberg
+ Files: pod/perlop.pod
+
+ Title: "Mention '...' operator in precedence table"
+ From: Tom Christiansen
+ Msg-ID: <199704131724.LAA23120@jhereg.perl.com>
+ Date: Sun, 13 Apr 1997 11:24:16 -0600
+ Files: pod/perlop.pod
+
+
+-----------------
+Version 5.003_97d
+-----------------
+
+Any minute now... second public beta... no, really...
+
+ CORE LANGUAGE CHANGES
+
+ Title: "Fix for incorrect overloaded assignment"
+ From: Ilya Zakharevich
+ Msg-ID: <199704112225.SAA03482@monk.mps.ohio-state.edu>
+ Date: Fri, 11 Apr 1997 18:25:33 -0400 (EDT)
+ Files: gv.c
+
+ Title: "Fix C< $x=''; pos($x)=0; $x=~/\G$/ >"
+ From: Chip Salzenberg
+ Files: pp_hot.c
+
+ Title: "Fix label on C<for(;;)> statement"
+ From: Chip Salzenberg
+ Files: perly.c perly.y
+
+ CORE PORTABILITY
+
+ Title: "update to 5.003_97b/hint/irix_6_2.sh"
+ From: Scott Henry <scotth@sgi.com>
+ Msg-ID: <yd8hghdjbk0.fsf@hoshi.engr.sgi.com>
+ Date: 11 Apr 1997 18:05:03 -0700
+ Files: hints/irix_6_2.sh
+
+ OTHER CORE CHANGES
+
+ Title: "Before 'BEGIN not safe', explain why"
+ From: Chip Salzenberg
+ Files: op.c
+
+ Title: "New error msg for low-key failure of C<require>"
+ From: Chip Salzenberg
+ Files: pod/perldiag.pod pp_ctl.c t/pragma/strict-subs
+ t/pragma/strict-vars
+
+ Title: "Put "dXSUB_SYS" last in declarations"
+ From: Chip Salzenberg
+ Files: win32/perllib.c
+
+ Title: "Minor type cleanup"
+ From: Chip Salzenberg
+ Files: proto.h toke.c
+
+ BUILD PROCESS
+
+ (no changes)
+
+ LIBRARY AND EXTENSIONS
+
+ Title: "win32: perl5db patch"
+ From: Gurusamy Sarathy
+ Msg-ID: <199704102142.RAA27396@aatma.engin.umich.edu>
+ Date: Thu, 10 Apr 1997 17:42:13 -0400
+ Files: lib/perl5db.pl
+
+ Title: "Enhancements to debugger, Term::ReadLine, Term::Cap"
+ From: Ilya Zakharevich
+ Msg-ID: <199704101948.PAA01841@monk.mps.ohio-state.edu>
+ Date: Thu, 10 Apr 1997 15:48:07 -0400 (EDT)
+ Files: lib/Term/Cap.pm lib/Term/ReadLine.pm lib/perl5db.pl
+
+ Title: "MM_Unix patch for use under CVS"
+ From: Ulrich Pfeifer
+ Msg-ID: <yfmd8s1vhpn.fsf@ls6.informatik.uni-dortmund.de>
+ Date: 11 Apr 1997 14:59:00 +0200
+ Files: lib/ExtUtils/MM_Unix.pm
+
+ Title: "Complex update (five patches)"
+ From: Jarkko Hietaniemi
+ Files: lib/Math/Complex.pm t/lib/complex.t
+
+ Title: "Fix undef warning in Math::BigInt"
+ From: Chip Salzenberg
+ Files: lib/Math/BigInt.pm
+
+ TESTS
+
+ (no other changes)
+
+ UTILITIES
+
+ Title: "Add B<-o> option to a2p, for old awk; make new the default"
+ From: Chip Salzenberg
+ Files: x2p/a2p.h x2p/a2p.pod x2p/a2py.c x2p/walk.c
+
+ DOCUMENTATION
+
+ Title: "typo in lib/diagnostics.pm"
+ From: barnett@grymoire.crd.ge.com (Bruce Barnett)
+ Msg-ID: <199704111800.OAA27297@grymoire.crd.ge.com>
+ Date: Fri, 11 Apr 1997 14:00:54 -0400
+ Files: lib/diagnostics.pm
+
+ Title: "Use B<> for options in Class::Struct pod"
+ From: Hugo van der Sanden <hv@iii.co.uk>
+ Msg-ID: <334D2E7B.67F0@iii.co.uk>
+ Date: Thu, 10 Apr 1997 19:16:27 +0100
+ Files: lib/Class/Struct.pm
+
+ Title: "Explain //g and \G issues"
+ From: Gurusamy Sarathy
+ Msg-ID: <199704122048.QAA25060@aatma.engin.umich.edu>
+ Date: Sat, 12 Apr 1997 16:48:41 -0400
+ Files: pod/perldelta.pod pod/perlop.pod pod/perlre.pod
+
+ Title: "more (err, less) doubled words"
+ From: Jarkko Hietaniemi
+ Msg-ID: <199704111931.WAA24460@alpha.hut.fi>
+ Date: Fri, 11 Apr 1997 22:31:25 +0300 (EET DST)
+ Files: ext/DB_File/DB_File.pm ext/DynaLoader/DynaLoader.pm
+ ext/IO/lib/IO/Pipe.pm lib/CGI.pm lib/Exporter.pm
+ lib/ExtUtils/MakeMaker.pm lib/IPC/Open2.pm lib/IPC/Open3.pm
+ lib/vars.pm pod/perlcall.pod pod/perldiag.pod
+ pod/perlfaq1.pod pod/perlfaq3.pod pod/perlfaq5.pod
+ pod/perlfaq7.pod pod/perlfaq8.pod pod/perlipc.pod
+
+ Title: "Freudian slip error in perlsub.pod"
+ From: barnett@grymoire.crd.ge.com (Bruce Barnett)
+ Msg-ID: <199704111755.NAA27200@grymoire.crd.ge.com>
+ Date: Fri, 11 Apr 1997 13:55:07 -0400
+ Files: pod/perlsub.pod
+
+ Title: "Little patch for perl5.003_97c/pod/perlpod.pod"
+ From: rse@engelschall.com (Ralf S. Engelschall)
+ Msg-ID: <199704112048.WAA08733@en1.engelschall.com>
+ Date: Fri, 11 Apr 1997 22:48:37 +0200
+ Files: pod/perlpod.pod
+
+
+-----------------
+Version 5.003_97c
+-----------------
+
+That second public beta will be Real Soon Now...
+
+ CORE LANGUAGE CHANGES
+
+ Title: "Refine setgroups() behavior of C<$)>"
+ From: Chip Salzenberg
+ Files: mg.c pod/perldelta.pod pod/perlvar.pod
+
+ Title: "Forbid -[Mm] on #! line"
+ From: Chip Salzenberg
+ Files: pod/perldelta.pod pod/perldiag.pod toke.c
+
+ CORE PORTABILITY
+
+ Title: "Fix dynamic loading (and argv[0]) under AmigaOS"
+ From: Norbert Pueschel
+ Msg-ID: <77724842@Armageddon.meb.uni-bonn.de>
+ Date: Tue, 08 Apr 1997 22:01:45 +0200
+ Files: hints/amigaos.sh
+
+ Title: "Special mkdir() for VMS"
+ From: Charles Bailey
+ Msg-ID: <01IHGOXN6MZM0004K3@hmivax.humgen.upenn.edu>
+ Date: Tue, 08 Apr 1997 12:33:56 -0400 (EDT)
+ Files: dosish.h lib/ExtUtils/MM_Unix.pm lib/File/Path.pm os2/os2ish.h
+ plan9/plan9ish.h pp_sys.c unixish.h vms/vms.c vms/vmsish.h
+
+ OTHER CORE CHANGES
+
+ Title: "Fix assignment from magic SV that becomes a glob"
+ From: Chip Salzenberg
+ Files: sv.c
+
+ BUILD PROCESS
+
+ Title: "Fix syntax error in Configure comment(!)"
+ From: Chip Salzenberg
+ Files: Configure
+
+ Title: "For Solaris, if -DDEBUGGING, default to '-KPIC', not '-Kpic'"
+ From: Chip Salzenberg
+ Files: Configure
+
+ Title: "Fix usage of dXSUB_SYS, esp. in ExtUtils::Miniperl"
+ From: Chip Salzenberg
+ Files: dosish.h minimod.pl os2/os2ish.h plan9/plan9ish.h vms/vmsish.h
+
+ LIBRARY AND EXTENSIONS
+
+ Title: "Replace Class::Template with improved Class::Struct"
+ From: Jim Miner <jfm@winternet.com>
+ Files: MANIFEST lib/Class/Struct.pm lib/Class/Template.pm
+ lib/File/stat.pm lib/Net/hostent.pm lib/Net/netent.pm
+ lib/Net/protoent.pm lib/Net/servent.pm lib/Time/gmtime.pm
+ lib/Time/localtime.pm lib/Time/tm.pm lib/User/grent.pm
+ lib/User/pwent.pm pod/perldelta.pod pod/perlfaq7.pod
+ pod/perlmod.pod pod/perltoot.pod
+
+ Title: "MakeMaker pathname patch"
+ From: Nick Ing-Simmons
+ Msg-ID: <199704091908.UAA00877@ni-s.u-net.com>
+ Date: Wed, 9 Apr 1997 20:08:23 +0100
+ Files: lib/ExtUtils/MM_Unix.pm lib/ExtUtils/MakeMaker.pm
+
+ Title: "Fix configuration of new socket"
+ From: Chip Salzenberg
+ Files: ext/IO/lib/IO/Socket.pm
+
+ Title: "Improve IO::Handle docs; don't export _open_mode_string"
+ From: Chip Salzenberg
+ Files: ext/IO/lib/IO/File.pm ext/IO/lib/IO/Handle.pm
+
+ Title: "Complex.pm: 0**0 sanity"
+ From: Jarkko Hietaniemi
+ Msg-ID: <199704091804.VAA13930@alpha.hut.fi>
+ Date: Wed, 9 Apr 1997 21:04:23 +0300 (EET DST)
+ Files: lib/Math/Complex.pm
+
+ Title: "Fix typos in Math::Trig"
+ From: Jarkko Hietaniemi
+ Files: lib/Math/Trig.pm
+
+ TESTS
+
+ Title: "Accommodate CodeBuilder variant of Machten 4.0.3"
+ From: Dominic Dunlop <domo@slipper.ip.lu>
+ Msg-ID: <v03020902af704d320f27@[194.51.248.88]>
+ Date: Tue, 8 Apr 1997 22:15:15 +0200
+ Files: t/io/fs.t t/op/stat.t
+
+ UTILITIES
+
+ (no changes)
+
+ DOCUMENTATION
+
+ Title: "IO::Socket doc fix"
+ From: Roderick Schertler
+ Msg-ID: <28383.860527843@eeyore.ibcinc.com>
+ Date: Tue, 08 Apr 1997 15:30:43 -0400
+ Files: ext/IO/lib/IO/Socket.pm
+
+
+-----------------
+Version 5.003_97b
+-----------------
+
+Working on the second public beta...
+
+ CORE LANGUAGE CHANGES
+
+ Title: "Make assignment to C<$)> call setgroups()"
+ From: Chip Salzenberg
+ Files: Configure config_H config_h.SH mg.c plan9/config.plan9
+ pod/perldelta.pod vms/config.vms win32/config.H
+ win32/config.w32
+
+ Title: "Grandfather "$$<digit>" in strings"
+ From: Chip Salzenberg
+ Files: pod/perldiag.pod toke.c
+
+ Title: "Disconnect warn and die hooks _after_ object destruction"
+ From: Chip Salzenberg
+ Files: perl.c
+
+ Title: "Forbid recursive substitutions"
+ From: Chip Salzenberg
+ Files: cop.h pod/perldelta.pod pod/perldiag.pod pp_ctl.c pp_hot.c
+
+ CORE PORTABILITY
+
+ Title: "Use SSize_t for values of PerlIO_{read,write}"
+ From: Chip Salzenberg
+ Files: perlio.c perlio.h perlsdio.h pp_sys.c
+
+ Title: "perlwin-97a_4: win32 environ fix"
+ From: Gurusamy Sarathy
+ Msg-ID: <199704060431.XAA23400@aatma.engin.umich.edu>
+ Date: Sat, 05 Apr 1997 23:31:11 -0500
+ Files: win32/win32.c win32/win32io.c win32/win32io.h win32/win32iop.h
+
+ OTHER CORE CHANGES
+
+ Title: "length($') isn't"
+ From: Gurusamy Sarathy
+ Msg-ID: <199704070730.DAA07310@aatma.engin.umich.edu>
+ Date: Mon, 07 Apr 1997 03:30:44 -0400
+ Files: mg.c
+
+ Title: "Fix obscure regex bug related to leading C<.*>"
+ From: Chip Salzenberg
+ Files: toke.c
+
+ Title: "Add warning for glob failure"
+ From: Chip Salzenberg
+ Files: pod/perldelta.pod pod/perldiag.pod pp_hot.c
+
+ Title: "Fix C<perl -V> in presence of local patches"
+ From: Chip Salzenberg
+ Files: perl.c
+
+ BUILD PROCESS
+
+ Title: "Don't suggest 'Configure -der' in config.sh comments"
+ From: Chip Salzenberg
+ Files: Configure
+
+ LIBRARY AND EXTENSIONS
+
+ Title: "CGI->redirect patch"
+ From: Doug MacEachern
+ Msg-ID: <199704051527.KAA11280@postman.osf.org>
+ Date: Sat, 05 Apr 1997 10:27:52 -0500
+ Files: lib/CGI.pm
+
+ Title: "Updates to Math::Complex and Math::Trig"
+ From: Jarkko Hietaniemi
+ Files: lib/Math/Complex.pm lib/Math/Trig.pm pod/perldelta.pod
+ t/lib/complex.t
+
+ Title: "Fix FindBin under Win32, and document success"
+ From: Nick Ing-Simmons and Gurusamy Sarathy
+ Msg-ID: <199704051504.QAA09507@ni-s.u-net.com>
+ Date: Sat, 5 Apr 1997 16:04:52 +0100
+ Files: README.win32 lib/Cwd.pm lib/FindBin.pm
+
+ TESTS
+
+ (no other changes)
+
+ UTILITIES
+
+ Title: "Patch for 'perldoc -f'"
+ From: Gisle Aas
+ Msg-ID: <199704061732.TAA00353@bergen.sn.no>
+ Date: Sun, 6 Apr 1997 19:32:04 +0200
+ Files: utils/perldoc.PL
+
+ DOCUMENTATION
+
+ Title: "Document required module versions"
+ From: Chip Salzenberg
+ Files: pod/perldelta.pod
+
+ Title: "Document sample function perl_eval()"
+ From: Doug MacEachern
+ Msg-ID: <199704051524.KAA06090@postman.osf.org>
+ Date: Sat, 05 Apr 1997 10:24:43 -0500
+ Files: pod/perlcall.pod pod/perlembed.pod
+
+ Title: "Make L<perltrap> refer to L<perldelta>"
+ From: Chip Salzenberg
+ Files: pod/perltrap.pod
+
+
+-----------------
+Version 5.003_97a
+-----------------
+
+This release gets a letter instead of a full subversion because I'm
+planning on making 5.003_98 the second public beta.
+
+ CORE LANGUAGE CHANGES
+
+ Title: "Fix AUTOLOAD, or kill me"
+ From: Chip Salzenberg
+ Files: gv.c pp.c t/op/method.t
+
+ CORE PORTABILITY
+
+ Title: "Add support for Cygwin32 (GNU-Win32) -- very low impact"
+ From: John Cerney <j-cerney1@ti.com>
+ Msg-ID: <199704030821.JAA08762@pluto.tiuk.ti.com>
+ Date: Thu, 3 Apr 1997 09:21:17 +0100
+ Files: MANIFEST README.cygwin32 cygwin32/cw32imp.h cygwin32/gcc2
+ cygwin32/ld2 cygwin32/perlgcc cygwin32/perlld
+ ext/DynaLoader/dl_cygwin32.xs hints/cygwin32.sh perl.h
+ pp_sys.c
+
+ Title: "Win32 update (six patches)"
+ From: Gurusamy Sarathy
+ Files: MANIFEST README.win32 dosish.h t/io/fs.t t/io/tell.t
+ t/lib/io_tell.t t/op/magic.t t/op/mkdir.t t/op/runlevel.t
+ t/op/stat.t t/op/taint.t win32/Makefile win32/VC-2.0/pod.mak
+ win32/makedef.pl win32/pod.mak win32/win32.c win32/win32.h
+ win32/win32io.c win32/win32io.h win32/win32iop.h
+
+ Title: "AmigaOS update"
+ From: Norbert Pueschel
+ Msg-ID: <77724828@Armageddon.meb.uni-bonn.de>
+ Date: Thu, 03 Apr 1997 16:16:51 +0200
+ Files: README.amiga hints/amigaos.sh
+
+ OTHER CORE CHANGES
+
+ Title: "Fix const-sub-related panic on C<sub foo { my $x; 0 } foo>"
+ From: Chip Salzenberg
+ Files: op.c
+
+ Title: "Fix warning for useless C<1..2>"
+ From: Chip Salzenberg
+ Files: op.c
+
+ Title: "Minor cleanups"
+ From: Gurusamy Sarathy
+ Msg-ID: <199704040056.TAA22253@aatma.engin.umich.edu>
+ Date: Thu, 03 Apr 1997 19:56:57 -0500
+ Files: mg.c mg.h perl.c
+
+ Title: "Eliminate unreliable warning with %SIG and strict refs"
+ From: Chip Salzenberg
+ Files: mg.c
+
+ Title: "Fix impossible test in vivification"
+ From: Chip Salzenberg
+ Files: mg.c
+
+ Title: "runlevel is I32, not int"
+ From: Roderick Schertler
+ Msg-ID: <2848.860109823@eeyore.ibcinc.com>
+ Date: Thu, 03 Apr 1997 18:23:43 -0500
+ Files: pp_ctl.c util.c
+
+ BUILD PROCESS
+
+ Title: "Re: shared lib compilation problem with miniperl5.003_97"
+ From: Andy Dougherty
+ Msg-ID: <Pine.SOL.3.95q.970404124326.647K-100000@fractal.lafayette.ed
+ Date: Fri, 04 Apr 1997 13:02:23 -0500 (EST)
+ Files: Makefile.SH
+
+ LIBRARY AND EXTENSIONS
+
+ Title: "Math::Trig, based on (and from an author of) Math::Complex"
+ From: Chip Salzenberg
+ Files: MANIFEST lib/Math/Complex.pm lib/Math/Trig.pm
+ pod/perldelta.pod t/lib/complex.t t/lib/trig.t
+
+ Title: "Update AutoLoader and docs; support C<use AutoLoader 'AUTOLOAD'>"
+ From: Chip Salzenberg and Tim Bunce
+ Files: lib/AutoLoader.pm
+
+ Title: "CPAN & TRL-Gnu"
+ From: Achim Bohnet <ach@rosat.mpe-garching.mpg.de>
+ Msg-ID: <9704040809.AA26143@o09.rosat.mpe-garching.mpg.de>
+ Date: Fri, 04 Apr 1997 10:09:03 +0200
+ Files: lib/CPAN.pm
+
+ Title: "Limit @ISA to actual DBM in AnyDBM"
+ From: Chip Salzenberg
+ Files: lib/AnyDBM_File.pm
+
+ Title: "Don't use $4 when it might be undef"
+ From: Chip Salzenberg
+ Files: lib/bigfloat.pl
+
+ TESTS
+
+ Title: "Make *dbm tests work with Win32"
+ From: Chip Salzenberg
+ Files: t/lib/anydbm.t t/lib/gdbm.t t/lib/ndbm.t t/lib/odbm.t
+ t/lib/sdbm.t
+
+ UTILITIES
+
+ (no changes)
+
+ DOCUMENTATION
+
+ Title: "Update INSTALL"
+ From: Andy Dougherty
+ Files: INSTALL
+
+ Title: "Pod style"
+ From: Nathan Torkington <gnat@prometheus.frii.com>
+ Files: pod/perlcall.pod pod/perldata.pod pod/perldebug.pod
+ pod/perldiag.pod pod/perlform.pod pod/perlfunc.pod
+ pod/perlipc.pod pod/perllocale.pod pod/perlmod.pod
+ pod/perlop.pod pod/perlre.pod pod/perlrun.pod
+ pod/perlstyle.pod pod/perltoc.pod pod/perlvar.pod
+
+
+----------------
+Version 5.003_97
+----------------
+
+ CORE LANGUAGE CHANGES
+
+ Title: "Reenable but deprecate inherited AUTOLOAD for plain funcs"
+ From: Chip Salzenberg
+ Files: ext/DynaLoader/DynaLoader.pm gv.c lib/Text/ParseWords.pm
+ pod/perldelta.pod pod/perldiag.pod t/op/method.t
+
+ CORE PORTABILITY
+
+ Title: "Don't use setjmp() and longjmp() in complex exprs"
+ From: Chip Salzenberg
+ Files: perl.c pp_ctl.c scope.h
+
+ Title: "Improve definition of Sock_size_t"
+ From: Chip Salzenberg
+ Files: doio.c pp_sys.c
+
+ Title: "Don't use a completely empty macro parameter"
+ From: Chip Salzenberg
+ Files: sv.h
+
+ Title: "Win32 update"
+ From: Gurusamy Sarathy
+ Msg-ID: <199704020608.BAA29538@aatma.engin.umich.edu>
+ Date: Wed, 02 Apr 1997 01:08:09 -0500
+ Files: win32/VC-2.0/modules.mak win32/VC-2.0/perl.mak win32/VC-
+ 2.0/perldll.mak win32/perl.mak
+
+ OTHER CORE CHANGES
+
+ Title: "Introduce and use gv_fetchmethod_autoload()"
+ From: Chip Salzenberg
+ Files: global.sym gv.c pod/perlguts.pod proto.h universal.c
+
+ Title: "Reduce memory footprint of literal strings"
+ From: ilya@math.ohio-state.edu (Ilya Zakharevich)
+ Msg-ID: <1997Apr1.113438.1913905@hmivax.humgen.upenn.edu>
+ Date: Tue, 01 Apr 1997 11:34:37 -0500 (EST)
+ Files: toke.c
+
+ BUILD PROCESS
+
+ Title: "Remove target before link() of perldiag.pod"
+ From: Chip Salzenberg
+ Files: installperl
+
+ LIBRARY AND EXTENSIONS
+
+ Title: "Refresh CPAN to 1.24"
+ From: Andreas Koenig
+ Files: lib/CPAN.pm lib/CPAN/FirstTime.pm
+
+ Title: "Refresh ExtUtils::Manifest to 1.33"
+ From: Andreas Koenig
+ Files: lib/ExtUtils/Manifest.pm
+
+ Title: "Update $VERSION of ExtUtils::Embed to reflect reality"
+ From: Chip Salzenberg
+ Files: lib/ExtUtils/Embed.pm
+
+ Title: "Fix POSIX::raise()"
+ From: "Jens T. Berger Thielemann" <jensthi@ifi.uio.no>
+ Msg-ID: <Pine.SUN.3.91.970401153125.8053A-100000@holmenkollen.ifi.uio
+ Date: Tue, 1 Apr 1997 15:34:47 +0200 (MET DST)
+ Files: ext/POSIX/POSIX.pm
+
+ Title: "Eliminate warnings in File::Basename"
+ From: Robin Barker <rmb1@cise.npl.co.uk>
+ Msg-ID: <11173.9704011111@tempest.cise.npl.co.uk>
+ Date: Tue, 1 Apr 97 12:11:43 BST
+ Files: lib/File/Basename.pm t/lib/basename.t
+
+ Title: "Eliminate warning in CGI.pm"
+ From: Chip Salzenberg
+ Files: lib/CGI.pm
+
+ Title: "Tweaks to constant.pm"
+ From: Tom Phoenix
+ Msg-ID: <Pine.GSO.3.96.970331205519.16684I-100000@kelly.teleport.com>
+ Date: Mon, 31 Mar 1997 21:10:14 -0800 (PST)
+ Files: lib/constant.pm
+
+ Title: "Document eval vs. sub in Benchmark"
+ From: Hugo van der Sanden <hv@crypt.compulink.co.uk>
+ Msg-ID: <199704012231.XAA00225@crypt.compulink.co.uk>
+ Date: Tue, 01 Apr 1997 23:31:55 +0100
+ Files: lib/Benchmark.pm
+
+ TESTS
+
+ (no other changes)
+
+ UTILITIES
+
+ Title: "Improve heuristics for pod2man titles"
+ From: Roderick Schertler
+ Msg-ID: <pzn2ri9gto.fsf@eeyore.ibcinc.com>
+ Date: 01 Apr 1997 23:41:55 -0500
+ Files: pod/pod2man.PL
+
+ DOCUMENTATION
+
+ Title: "Clean up some poddities, and make C<make html> work again"
+ From: Chip Salzenberg
+ Files: pod/Makefile pod/perldelta.pod pod/perldiag.pod
+ pod/perlfaq8.pod pod/perlfunc.pod pod/perlop.pod
+ pod/perltrap.pod
+
+ Title: "Fix MM doc's use of "SUPER::""
+ From: avera@hal.com (Jim Avera)
+ Msg-ID: <9704012235.AA07841@membrane.hal.com>
+ Date: Tue, 1 Apr 1997 14:35:26 -0800 (PST)
+ Files: lib/ExtUtils/MakeMaker.pm
+
+ Title: "Eliminate pod warnings in libs"
+ From: Chip Salzenberg
+ Files: lib/CGI.pm lib/ExtUtils/Command.pm
+
+
+----------------
+Version 5.003_96
+----------------
+
+ CORE LANGUAGE CHANGES
+
+ Title: "Support $ENV{PERL5OPT}"
+ From: Chip Salzenberg
+ Files: perl.c pod/perldiag.pod pod/perldelta.pod pod/perlrun.pod
+
+ Title: "Implement void context, in which C<wantarray> is undef"
+ From: Chip Salzenberg
+ Files: cop.h doop.c dump.c global.sym gv.c op.c op.h perl.c
+ pod/perlcall.pod pod/perldelta.pod pod/perlfunc.pod
+ pod/perlguts.pod pod/perlsub.pod pp.c pp_ctl.c pp_hot.c
+ pp_sys.c proto.h
+
+ Title: "Don't look up &AUTOLOAD in @ISA when calling plain function"
+ From: Chip Salzenberg
+ Files: global.sym gv.c lib/Text/ParseWords.pm pod/perldelta.pod
+ pp_hot.c proto.h t/op/method.t
+
+ Title: "Allow closures to be constant subroutines"
+ From: Chip Salzenberg
+ Files: op.c
+
+ Title: "Make C<scalar(reverse)> mean C<scalar(reverse $_)>"
+ From: Chip Salzenberg
+ Files: pp.c
+
+ Title: "Fix lexical suicide from C<my $x = $x> in sub"
+ From: Chip Salzenberg
+ Files: op.c
+
+ Title: "Make "Unrecog. char." fatal, and update its doc"
+ From: Chip Salzenberg
+ Files: pod/perldiag.pod toke.c
+
+ Title: "Die on patterns that will match empty string forever"
+ From: Stephen Potter <spp@psa.pencom.com>
+ Msg-ID: <199703282138.PAA28311@psa.pencom.com>
+ Date: Fri, 28 Mar 1997 15:38:30 -0600
+ Files: regcomp.c
+
+ CORE PORTABILITY
+
+ Title: "safefree() mismatch"
+ From: Roderick Schertler
+ Msg-ID: <21338.859653381@eeyore.ibcinc.com>
+ Date: Sat, 29 Mar 1997 11:36:21 -0500
+ Files: util.c
+
+ Title: "FreeBSD update"
+ From: Slaven Rezic <eserte@cs.tu-berlin.de>
+ Msg-ID: <199703311417.QAA04162@cabulja.herceg.de>
+ Date: Mon, 31 Mar 1997 16:17:42 +0200 (MET DST)
+ Files: hints/freebsd.sh
+
+ Title: "Win32 update (seven patches)"
+ From: Gurusamy Sarathy and Nick Ing-Simmons
+ Files: EXTERN.h MANIFEST win32/Makefile win32/perl.mak
+ win32/perl.rc win32/perldll.mak win32/makedef.pl
+ win32/modules.mak win32/win32io.c win32/bin/pl2bat.bat
+
+ OTHER CORE CHANGES
+
+ Title: "Report PERL* environment variables in -V and perlbug"
+ From: Chip Salzenberg
+ Files: perl.c utils/perlbug.PL
+
+ Title: "Typo in perl.c: Printing NO_EMBED for perl -V"
+ From: Gisle Aas
+ Msg-ID: <199703301922.VAA13509@furubotn.sn.no>
+ Date: Sun, 30 Mar 1997 21:22:11 +0200
+ Files: perl.c
+
+ Title: "Don't let C<$var = $var> untaint $var"
+ From: Chip Salzenberg
+ Files: pp_hot.c pp_sys.c sv.h t/op/taint.t
+
+ Title: "Fix autoviv bug in C<my $x; ++$x->{KEY}>"
+ From: Chip Salzenberg
+ Files: pp_hot.c
+
+ Title: "Re: 5.004's new srand() default seed"
+ From: Hallvard B Furuseth
+ Msg-ID: <199703302219.AAA20998@bombur2.uio.no>
+ Date: Mon, 31 Mar 1997 00:19:13 +0200 (MET DST)
+ Files: pp.c
+
+ Title: "Re: embedded perl and top_env problem "
+ From: Gurusamy Sarathy
+ Msg-ID: <199703280031.TAA05711@aatma.engin.umich.edu>
+ Date: Thu, 27 Mar 1997 19:31:42 -0500
+ Files: gv.c interp.sym perl.c perl.h pp_ctl.c pp_sys.c scope.h util.c
+
+ Title: "Define and use new macro: boolSV()"
+ From: Tim Bunce
+ Files: gv.c lib/ExtUtils/typemap os2/os2.c pp.c pp_hot.c pp_sys.c
+ sv.c sv.h universal.c vms/vms.c
+
+ Title: "Re: strict @F"
+ From: Hallvard B Furuseth
+ Msg-ID: <199703252110.WAA16038@bombur2.uio.no>
+ Date: Tue, 25 Mar 1997 22:10:33 +0100 (MET)
+ Files: toke.c
+
+ Title: "Try harder to identify errors at EOF"
+ From: Chip Salzenberg
+ Files: toke.c
+
+ Title: "Minor string change in toke.c: 'bareword'"
+ From: lvirden@cas.org
+ Msg-ID: <1997Mar27.130247.1911552@hmivax.humgen.upenn.edu>
+ Date: Thu, 27 Mar 1997 13:02:46 -0500 (EST)
+ Files: toke.c
+
+ Title: "Improve diagnostic on \r in program text"
+ From: Chip Salzenberg
+ Files: pod/perldiag.pod toke.c
+
+ Title: "Make Sock_size_t typedef work right"
+ From: Chip Salzenberg
+ Files: perl.h pp_sys.c
+
+ Title: "Eliminate unused dummy variable"
+ From: Doug MacEachern
+ Msg-ID: <199703270123.UAA25454@postman.osf.org>
+ Date: Wed, 26 Mar 1997 20:23:14 -0500
+ Files: lib/ExtUtils/Embed.pm unixish.h writemain.SH
+
+ BUILD PROCESS
+
+ Title: "Allow for coexistence of various versions of perldiag.pod"
+ From: Chip Salzenberg
+ Files: installperl lib/diagnostics.pm
+
+ LIBRARY AND EXTENSIONS
+
+ Title: "New module constant.pm"
+ From: Tom Phoenix
+ Files: MANIFEST lib/constant.pm op.c pp.c t/pragma/constant.t
+
+ Title: "Remove chat2"
+ From: Chip Salzenberg
+ Files: MANIFEST lib/chat2.inter lib/chat2.pl
+
+ Title: "Include CGI.pm 2.32"
+ From: Chip Salzenberg
+ Files: MANIFEST eg/cgi/* lib/CGI.pm lib/CGI/Apache.pm
+ lib/CGI/Carp.pm lib/CGI/Fast.pm lib/CGI/Push.pm
+ lib/CGI/Switch.pm
+
+ Title: "Fix C<print $_> in debugger"
+ From: Ilya Zakharevich
+ Msg-ID: <199703312355.SAA01068@monk.mps.ohio-state.edu>
+ Date: Mon, 31 Mar 1997 18:55:55 -0500 (EST)
+ Files: lib/perl5db.pl
+
+ Title: "Re: Pod problems & fixes"
+ From: Hallvard B Furuseth
+ Msg-ID: <199703261829.TAA17015@bombur2.uio.no>
+ Date: Wed, 26 Mar 1997 19:29:14 +0100 (MET)
+ Files: lib/Pod/Text.pm
+
+ Title: "Re: $whoami calculation in Sys::Syslog.pm should not be greedy"
+ From: Roderick Schertler
+ Msg-ID: <pz4tdu7j57.fsf@eeyore.ibcinc.com>
+ Date: 29 Mar 1997 11:33:24 -0500
+ Files: lib/Sys/Syslog.pm
+
+ Title: "C<new SelectSaver $fh> doesn't always restore"
+ From: Spider Boardman
+ Msg-ID: <199703291906.OAA07232@Orb.Nashua.NH.US>
+ Date: Sat, 29 Mar 1997 14:06:37 -0500
+ Files: lib/SelectSaver.pm
+
+ Title: "Patch for Benchmark.pm"
+ From: Hugo van der Sanden <hv@crypt.compulink.co.uk> w/Tim Bunce
+ Msg-ID: <199703291504.PAA01596@crypt.compulink.co.uk>
+ Date: Sat, 29 Mar 1997 15:04:32 +0000
+ Files: lib/Benchmark.pm
+
+ Title: "Tiny doc fix for AutoSplit.pm"
+ From: "Randy J. Ray" <rjray@uswest.com>
+ Msg-ID: <rjray-9702272117.AA001223633@snakepit.ecte.uswc.uswest.com>
+ Date: Thu, 27 Mar 1997 14:17:38 -0700
+ Files: lib/AutoSplit.pm
+
+ TESTS
+
+ (no other changes)
+
+ UTILITIES
+
+ Title: "Tom C's Pod::Html and html tools, as of 30 March 97"
+ From: Chip Salzenberg
+ Files: MANIFEST installhtml lib/Pod/Html.pm pod/pod2html.PL
+
+ Title: "Fix path bugs in installhtml"
+ From: Robin Barker <rmb1@cise.npl.co.uk>
+ Msg-ID: <3180.9703270906@tempest.cise.npl.co.uk>
+ Date: Thu, 27 Mar 97 09:06:14 GMT
+ Files: installhtml
+
+ Title: "Make perlbug say that it's only for core Perl bugs"
+ From: Chip Salzenberg
+ Files: utils/perlbug.PL
+
+ DOCUMENTATION
+
+ Title: "INSTALL-1.11"
+ From: Andy Dougherty
+ Msg-ID: <Pine.SOL.3.95q.970326140905.10178A-100000@fractal.lafayette.
+ Date: Wed, 26 Mar 1997 14:27:52 -0500 (EST)
+ Files: INSTALL
+
+ Title: "Patch for perl.pod"
+ From: wmiddlet@Adobe.COM (William Middleton)
+ Msg-ID: <199703262305.PAA13121@ducks>
+ Date: Wed, 26 Mar 1997 15:05:39 -0800 (PST)
+ Files: pod/perl.pod
+
+ Title: "Document autouse and constant; update diagnostics"
+ From: Chip Salzenberg
+ Files: pod/perldelta.pod
+
+ Title: "Suggest to upgraders that they try '-w' again"
+ From: Hallvard B Furuseth
+ Msg-ID: <199703251901.UAA15982@bombur2.uio.no>
+ Date: Tue, 25 Mar 1997 20:01:26 +0100 (MET)
+ Files: pod/perldelta.pod
+
+ Title: "Improve and update documentation of constant subs"
+ From: Tom Phoenix
+ Msg-ID: <Pine.GSO.3.96.970331122546.14185C-100000@kelly.teleport.com>
+ Date: Mon, 31 Mar 1997 13:05:54 -0800 (PST)
+ Files: pod/perlsub.pod
+
+ Title: "Improve documentation of C<return>"
+ From: Chip Salzenberg
+ Files: pod/perlfunc.pod pod/perlsub.pod
+
+ Title: "perlfunc.pod patch"
+ From: Gisle Aas
+ Msg-ID: <199703262159.WAA17531@furubotn.sn.no>
+ Date: Wed, 26 Mar 1997 22:59:23 +0100
+ Files: pod/perlfunc.pod
+
+ Title: "Use 'while (defined($x = <>)) {}', per <gnat@frii.com>"
+ From: Chip Salzenberg
+ Files: configpm lib/Term/Cap.pm perlsh pod/perlipc.pod pod/perlop.pod
+ pod/perlsub.pod pod/perlsyn.pod pod/perltrap.pod
+ pod/perlvar.pod win32/bin/search.bat
+
+ Title: "Document and test C<%> behavior with negative operands"
+ From: Chip Salzenberg
+ Files: pod/perlop.pod t/op/arith.t
+
+ Title: "Update docs on $]"
+ From: Chip Salzenberg
+ Files: pod/perlvar.pod
+
+ Title: "perlvar.pod patch"
+ From: Gisle Aas
+ Msg-ID: <199703261254.NAA10237@bergen.sn.no>
+ Date: Wed, 26 Mar 1997 13:54:00 +0100
+ Files: pod/perlvar.pod
+
+ Title: "Fix example of C<or> vs. C<||>"
+ From: Chip Salzenberg
+ Files: pod/perlsyn.pod
+
+ Title: "Pod usage and spelling patch"
+ From: Larry W. Virden
+ Files: pod/*.pod
+
+ Title: "Pod updates"
+ From: "Cary D. Renzema" <caryr@mxim.com>
+ Msg-ID: <199703262353.PAA01819@macs.mxim.com>
+ Date: Wed, 26 Mar 1997 15:53:22 -0800 (PST)
+ Files: pod/*.pod
+
+
+----------------
+Version 5.003_95
+----------------
+
+ CORE LANGUAGE CHANGES
+
+ Title: "Don't compile scalar mods of aggregates, like C<@a =~ s/a/b/>"
+ From: Chip Salzenberg
+ Files: op.c t/op/misc.t
+
+ Title: "Automatically flush on C< $| = 1 >"
+ From: Chip Salzenberg
+ Files: mg.c
+
+ Title: "Refine modulus ("%") per suggestion of Tim Goodwin"
+ From: Chip Salzenberg
+ Files: pp.c
+
+ Title: "If C<perl -a>, do equivalent of C<use vars '@F'>"
+ From: Chip Salzenberg
+ Files: toke.c
+
+ Title: "Warn about undef magic values just like non-magic"
+ From: Chip Salzenberg
+ Files: ext/Opcode/Safe.pm sv.c t/lib/db-btree.t t/lib/db-hash.t
+ t/lib/db-recno.t t/pragma/locale.t
+
+ CORE PORTABILITY
+
+ Title: "Remove redundant patch to hints/bsdos.sh"
+ From: Shigeya Suzuki <shigeya@foretune.co.jp>
+ Msg-ID: <19970322222244K.shigeya@foretune.co.jp>
+ Date: Sat, 22 Mar 1997 22:22:44 +0900
+ Files: hints/bsdos.sh
+
+ Title: "Another MachTen Patch"
+ From: Tom Phoenix
+ Msg-ID: <Pine.GSO.3.96.970324152150.20610P-100000@kelly.teleport.com>
+ Date: Mon, 24 Mar 1997 15:26:48 -0800 (PST)
+ Files: hints/machten_2.sh
+
+ Title: "Win32 update (five patches)"
+ From: Gurusamy Sarathy and Nick Ing-Simmons
+ Files: MANIFEST README.win32 doio.c dosish.h pp_sys.c
+ lib/ExtUtils/Command.pm t/comp/multiline.t t/op/magic.t
+ t/op/mkdir.t t/op/runlevel.t t/op/stat.t t/op/write.t
+ win32/Makefile win32/config.H win32/config.w32 win32/win32.c
+ win32/win32.h win32/win32aux.c win32/*.mak win32/VC-2.0/*.mak
+
+ OTHER CORE CHANGES
+
+ Title: "Fix botch with G_NOARGS; PUSHMARK *is* required"
+ From: Chip Salzenberg
+ Files: perl.c
+
+ Title: "Improve 'prototype mismatch' warning"
+ From: Chip Salzenberg
+ Files: global.sym op.c pod/perldiag.pod proto.h sv.c t/comp/redef.t
+
+ Title: "In perlio, fix vprintf() definition and define vfprintf()"
+ From: Chip Salzenberg
+ Files: perlio.c
+
+ BUILD PROCESS
+
+ (no other changes)
+
+ LIBRARY AND EXTENSIONS
+
+ Title: "Fix C<require> in Getopt::Long to work with 5.003"
+ From: Chip Salzenberg
+ Files: lib/Getopt/Long.pm
+
+ Title: "Extraneous blank lines from Pod::Text"
+ From: Russ Allbery <rra@stanford.edu>
+ Msg-ID: <qumend4qq08.fsf@cyclone.stanford.edu>
+ Date: 25 Mar 1997 01:28:55 -0800
+ Files: lib/Pod/Text.pm
+
+ Title: "Exporting UNIVERSAL::can"
+ From: "M.J.T. Guy"
+ Msg-ID: <E0w9DwX-0000Zr-00@taurus.cus.cam.ac.uk>
+ Date: Mon, 24 Mar 1997 17:54:01 +0000
+ Files: lib/UNIVERSAL.pm
+
+ Title: "Term::Readline patch for AmigaOS"
+ From: Norbert Pueschel
+ Msg-ID: <77724797@Armageddon.meb.uni-bonn.de>
+ Date: Sun, 23 Mar 1997 18:57:22 +0100
+ Files: lib/Term/ReadLine.pm
+
+ TESTS
+
+ Title: "Reduce memory footprint of complex.t"
+ From: Dominic Dunlop <domo@slipper.ip.lu>
+ Msg-ID: <v03020902af5d8e03c5ab@[194.51.248.84]>
+ Date: Tue, 25 Mar 1997 15:39:26 +0100
+ Files: t/lib/complex.t
+
+ UTILITIES
+
+ Title: "Improve pod2man diagnostic when NAME is invalid"
+ From: Chip Salzenberg
+ Files: pod/pod2man.PL
+
+ DOCUMENTATION
+
+ Title: "INSTALL-1.8 to INSTALL-1.9 updates"
+ From: Andy Dougherty
+ Msg-ID: <Pine.SOL.3.95q.970325135138.3374A-100000@fractal.lafayette.e
+ Date: Tue, 25 Mar 1997 13:52:53 -0500 (EST)
+ Files: INSTALL
+
+ Title: "Document possible problems with -Mdiagnostics after upgrade"
+ From: Chip Salzenberg
+ Files: INSTALL
+
+ Title: "Mention perldelta in INSTALL"
+ From: Chip Salzenberg
+ Files: INSTALL
+
+ Title: "Describe pod format at top of INSTALL"
+ From: Chip Salzenberg
+ Files: INSTALL
+
+ Title: "Document C</a *b/x> fix"
+ From: Chip Salzenberg
+ Files: pod/perldelta.pod
+
+ Title: "pods for subroutine argument autovivication"
+ From: "M.J.T. Guy"
+ Msg-ID: <E0w9489-0005YT-00@ursa.cus.cam.ac.uk>
+ Date: Mon, 24 Mar 1997 07:25:21 +0000
+ Files: pod/perldelta.pod pod/perlsub.pod
+
+ Title: "Missing item in perldiag"
+ From: "M.J.T. Guy"
+ Msg-ID: <E0w8jVZ-0005va-00@ursa.cus.cam.ac.uk>
+ Date: Sun, 23 Mar 1997 09:24:09 +0000
+ Files: pod/perldiag.pod
+
+ Title: "Mention and discourage use of term 'soft reference'"
+ From: Chip Salzenberg
+ Files: pod/perlref.pod
+
+ Title: "Pod problems & fixes"
+ From: Hallvard B Furuseth
+ Msg-ID: <199703242031.VAA14997@bombur2.uio.no>
+ Date: Mon, 24 Mar 1997 21:31:51 +0100 (MET)
+ Files: INSTALL lib/Term/Complete.pm lib/subs.pm pod/perlcall.pod
+ pod/perldata.pod pod/perldiag.pod pod/perlembed.pod
+ pod/perlguts.pod pod/perlmod.pod pod/perlop.pod
+ pod/perlpod.pod pod/pod2html.PL
+
+ Title: "DB_File documentation fix"
+ From: Paul Marquess
+ Msg-ID: <9703240854.AA08401@claudius.bfsec.bt.co.uk>
+ Date: Mon, 24 Mar 97 08:54:16 GMT
+ Files: ext/DB_File/DB_File.pm
+
+ Title: "FAQ update"
+ From: Nathan Torkington <gnat@prometheus.frii.com>
+ Files: pod/perlfaq*.pod
+
+
+----------------
+Version 5.003_94
+----------------
+
+ CORE LANGUAGE CHANGES
+
+ Title: "Defer creation of array and hash elements as parameters"
+ From: Chip Salzenberg
+ Files: dump.c global.sym mg.c op.c op.h perl.h pp.c pp_hot.c proto.h
+ sv.c
+
+ Title: "New special literal: __PACKAGE__"
+ From: Chip Salzenberg
+ Files: keywords.pl pod/perldata.pod toke.c
+
+ Title: "Ignore whitespace before +*? in //x"
+ From: Chip Salzenberg
+ Files: regcomp.c
+
+ Title: "Abort compilation at C<BEGIN{}> or C<use> after errors"
+ From: Chip Salzenberg
+ Files: op.c pod/perldiag.pod t/pragma/subs.t
+
+ Title: "allow C<substr 'hello', -10>"
+ From: David Dyck <dcd@tc.fluke.com>
+ Msg-ID: <97Mar10.155517pst.35716-2@gateway.fluke.com>
+ Date: Mon, 10 Mar 1997 15:55:44 -0800
+ Files: pp.c
+
+ Title: "Regularize C<x % y>, esp. when y is negative"
+ From: Chip Salzenberg
+ Files: pp.c
+
+ Title: "Flush before C<flock(FOO, LOCK_UN)>"
+ From: Chip Salzenberg
+ Files: pod/perldelta.pod pod/perlfunc.pod pp_sys.c
+
+ Title: "Close loopholes in prototype mismatch warning"
+ From: Chip Salzenberg
+ Files: op.c sv.c toke.c
+
+ Title: "Warn on C<while ($x = each %y) {}>"
+ From: Chip Salzenberg
+ Files: op.c pod/perldiag.pod
+
+ Title: "Don't warn on C<print $fh func()>"
+ From: Chip Salzenberg
+ Files: toke.c
+
+ CORE PORTABILITY
+
+ Title: "Don't say 'static var = 1'"
+ From: Jarkko Hietaniemi
+ Msg-ID: <199703091319.PAA24714@alpha.hut.fi>
+ Date: Sun, 9 Mar 1997 15:19:57 +0200 (EET)
+ Files: malloc.c
+
+ Title: "BSD/OS 3.0 hints"
+ From: Christopher Davis <ckd@loiosh.kei.com>
+ Msg-ID: <w47mjakw5t.fsf@loiosh.kei.com>
+ Date: 14 Mar 1997 16:20:46 -0500
+ Files: hints/bsdos.sh
+
+ Title: "More MachTen hints"
+ From: Tom Phoenix
+ Msg-ID: <Pine.GSO.3.95q.970316133852.27997A-100000@kelly.teleport.com
+ Date: Sun, 16 Mar 1997 13:40:35 -0800 (PST)
+ Files: hints/machten_2.sh
+
+ Title: "HP/UX hint comments"
+ From: Andy Dougherty
+ Msg-ID: <Pine.SOL.3.95q.970321153918.28770B-100000@fractal.lafayette.
+ Date: Fri, 21 Mar 1997 15:43:07 -0500 (EST)
+ Files: hints/hpux.sh
+
+ Title: "VMS update"
+ From: Charles Bailey
+ Msg-ID: <1997Mar11.220056.1873182@hmivax.humgen.upenn.edu>
+ Date: Tue, 11 Mar 1997 22:00:55 -0500 (EST)
+ Files: lib/ExtUtils/MM_VMS.pm lib/Test/Harness.pm t/op/taint.t
+ utils/perlbug.PL vms/descrip.mms
+
+ Title: "vmsish.t and related patches"
+ From: Charles Bailey
+ Msg-ID: <01IGQW3IP1KK005VFB@hmivax.humgen.upenn.edu>
+ Date: Fri, 21 Mar 1997 01:32:47 -0500 (EST)
+ Files: MANIFEST perl.h vms/descrip.mms vms/ext/vmsish.t vms/vms.c
+
+ Title: "Win32 update (four patches)"
+ From: Gurusamy Sarathy and Nick Ing-Simmons
+ Files: MANIFEST README.win32 lib/AutoSplit.pm lib/Cwd.pm
+ lib/ExtUtils/Command.pm lib/ExtUtils/Install.pm
+ lib/ExtUtils/MM_OS2.pm lib/ExtUtils/MM_Unix.pm
+ lib/ExtUtils/MM_Win32.pm lib/ExtUtils/MakeMaker.pm
+ lib/ExtUtils/Mksymlists.pm lib/File/Basename.pm
+ lib/File/Path.pm mg.c t/comp/cpp.t t/comp/script.t t/harness
+ t/io/argv.t t/io/dup.t t/io/fs.t t/io/inplace.t
+ t/lib/filehand.t t/lib/io_dup.t t/lib/io_sel.t
+ t/lib/io_taint.t t/op/closure.t t/op/exec.t t/op/glob.t
+ t/op/goto.t t/op/magic.t t/op/misc.t t/op/rand.t
+ t/op/split.t t/op/stat.t t/op/sysio.t t/op/taint.t
+ t/pragma/strict.t t/pragma/subs.t t/pragma/warning.t util.c
+ win32/*
+
+ OTHER CORE CHANGES
+
+ Title: "Guard against buffer overflow in yyerror() and related funcs"
+ From: Chip Salzenberg
+ Files: toke.c
+
+ Title: "For bin compat, rename calllist() and he_{,delay}free"
+ From: Chip Salzenberg
+ Files: global.sym hv.c op.c perl.c pod/perlguts.pod proto.h
+
+ Title: "Fix C<print> on tied default handle"
+ From: Chip Salzenberg
+ Files: pp_hot.c
+
+ Title: "Fix C<local($a, undef, $b) = (1,2,3)>"
+ From: Chip Salzenberg
+ Files: op.c
+
+ Title: "Improve diagnostic on C<@a++>, C<--%a>, @a =~ s/a/b/"
+ From: Chip Salzenberg
+ Files: pp.c pp_hot.c
+
+ Title: "Don't warn on C<$x{y} .= "z"> when %x is tied"
+ From: Chip Salzenberg
+ Files: pp_hot.c
+
+ Title: "Eliminate 'unreachable code' warnings"
+ From: Chip Salzenberg
+ Files: ext/POSIX/POSIX.xs mg.c pp_ctl.c toke.c
+
+ Title: "printf format corrections for -DDEBUGGING"
+ From: Roderick Schertler
+ Msg-ID: <26592.858793370@eeyore.ibcinc.com>
+ Date: Wed, 19 Mar 1997 12:42:50 -0500
+ Files: doop.c malloc.c op.c pp_ctl.c regexec.c sv.c x2p/str.c
+ x2p/util.c
+
+ Title: "Warn about missing -DMULTIPLICITY if likely a problem"
+ From: Doug MacEachern
+ Msg-ID: <199703192345.SAA15070@postman.osf.org>
+ Date: Wed, 19 Mar 1997 18:45:53 -0500
+ Files: perl.c
+
+ BUILD PROCESS
+
+ Title: "Don't use $(LIBS) when creating shared libperl"
+ From: Chip Salzenberg
+ Files: Makefile.SH
+
+ Title: "Don't use db 2.x, we're not yet ready for it"
+ From: Paul Marquess and Andy Dougherty
+ Files: Configure
+
+ Title: "Warn if #! command is longer than 32 chars"
+ From: Chip Salzenberg
+ Files: Configure
+
+ Title: "patches re perl -wc install{perl,man}"
+ From: Robin Barker <rmb1@cise.npl.co.uk>
+ Msg-ID: <21544.9703111313@tempest.cise.npl.co.uk>
+ Date: Tue, 11 Mar 97 13:13:16 GMT
+ Files: installman installperl
+
+ Title: "3_93 doesn't install pods"
+ From: Spider Boardman
+ Msg-ID: <199703160721.CAA08339@Orb.Nashua.NH.US>
+ Date: Sun, 16 Mar 1997 02:21:35 -0500
+ Files: installperl
+
+ Title: "When installing, use File::Copy instead of `cp`"
+ From: Chip Salzenberg
+ Files: installperl
+
+ Title: "Make hint files' warnings more visible"
+ From: Hallvard B Furuseth
+ Msg-ID: <199703202218.XAA09041@bombur2.uio.no>
+ Date: Thu, 20 Mar 1997 23:18:03 +0100 (MET)
+ Files: hints/3b1.sh hints/apollo.sh hints/cxux.sh hints/dcosx.sh
+ hints/dgux.sh hints/esix4.sh hints/freebsd.sh hints/hpux.sh
+ hints/irix_4.sh hints/mips.sh hints/next_3_0.sh hints/os2.sh
+ hints/qnx.sh hints/sco_2_3_3.sh hints/sco_2_3_4.sh
+ hints/solaris_2.sh hints/ultrix_4.sh hints/utekv.sh
+
+ LIBRARY AND EXTENSIONS
+
+ Title: "New module: autouse.pm"
+ From: Ilya Zakharevich
+ Msg-ID: <199703210034.TAA13469@monk.mps.ohio-state.edu>
+ Date: Thu, 20 Mar 1997 19:34:30 -0500 (EST)
+ Files: MANIFEST lib/autouse.pm
+
+ Title: "Math::Complex update"
+ From: Jarkko Hietaniemi
+ Files: lib/Math/Complex.pm t/lib/complex.t
+
+ Title: "Refresh DB_File to 1.12"
+ From: Paul Marquess
+ Msg-ID: <9703121551.AA07435@claudius.bfsec.bt.co.uk>
+ Date: Wed, 12 Mar 97 15:51:14 GMT
+ Files: ext/DB_File/DB_File.pm ext/DB_File/DB_File.xs
+
+ Title: "New subroutine Symbol::qualify_to_ref()"
+ From: Roderick Schertler
+ Msg-ID: <pzlo7ut03b.fsf@eeyore.ibcinc.com>
+ Date: 11 Mar 1997 19:39:36 -0500
+ Files: lib/Symbol.pm
+
+ Title: "In debugger, don't reference %{$f{$g}} if $f{$g} doesn't exist"
+ From: Chip Salzenberg
+ Files: lib/perl5db.pl
+
+ Title: "In File::Path, some systems can't remove read-only files"
+ From: Chip Salzenberg
+ Files: lib/File/Path.pm
+
+ Title: "Fix typo in -l*perl* pattern"
+ From: Doug MacEachern
+ Msg-ID: <199703110414.XAA12884@berlin.atlantic.net>
+ Date: Mon, 10 Mar 1997 22:58:38 -0500
+ Files: lib/ExtUtils/Embed.pm
+
+ Title: "Fix bugs revealed by prototype warnings"
+ From: Chip Salzenberg
+ Files: ext/Opcode/Opcode.pm lib/ExtUtils/MakeMaker.pm
+ lib/Getopt/Long.pm
+
+ Title: "Problems with SKIP in makemaker"
+ From: Ilya Zakharevich
+ Msg-ID: <199703210413.XAA21601@monk.mps.ohio-state.edu>
+ Date: Thu, 20 Mar 1997 23:13:31 -0500 (EST)
+ Files: lib/ExtUtils/MM_Unix.pm
+
+ Title: "In Exporter, don't C<require Carp> at file scope"
+ From: Chip Salzenberg
+ Files: lib/Exporter.pm
+
+ Title: "fix for Exporter's $SIG{__WARN__} handler"
+ From: Roderick Schertler
+ Msg-ID: <2282.858296451@eeyore.ibcinc.com>
+ Date: Thu, 13 Mar 1997 18:40:51 -0500
+ Files: lib/Exporter.pm
+
+ Title: "Don't try to substr() refs in Carp"
+ From: Chip Salzenberg
+ Files: lib/Carp.pm
+
+ Title: "Re: NUL in die and other messages"
+ From: "M.J.T. Guy"
+ Msg-ID: <E0w815V-0005xs-00@ursa.cus.cam.ac.uk>
+ Date: Fri, 21 Mar 1997 09:58:17 +0000
+ Files: lib/Carp.pm
+
+ Title: "Add entry for prototype() in Pod::Functions"
+ From: Chip Salzenberg
+ Files: lib/Pod/Functions.pm
+
+ Title: "Fix typos in IO::Socket documentation"
+ From: "M.J.T. Guy"
+ Msg-ID: <E0w75po-0003yh-00@taurus.cus.cam.ac.uk>
+ Date: Tue, 18 Mar 1997 20:50:16 +0000
+ Files: ext/IO/lib/IO/Socket.pm
+
+ TESTS
+
+ (no other changes)
+
+ UTILITIES
+
+ Title: "Re: bug in pod2man (5.00326): section=3 for .pm modules"
+ From: Roderick Schertler
+ Msg-ID: <pzn2sat1hg.fsf@eeyore.ibcinc.com>
+ Date: 11 Mar 1997 19:09:31 -0500
+ Files: pod/pod2man.PL
+
+ DOCUMENTATION
+
+ Title: "perlfaq.pod"
+ From: Tom Christiansen
+ Msg-ID: <199703172301.QAA12566@jhereg.perl.com>
+ Date: Mon, 17 Mar 1997 16:01:40 -0700
+ Files: MANIFEST pod/Makefile pod/buildtoc pod/perl.pod
+ pod/perlfaq*.pod pod/roffitall
+
+ Title: "*.pod changes based on the FAQ"
+ From: gnat@frii.com
+ Msg-ID: <199703171650.JAA02655@elara.frii.com>
+ Date: Mon, 17 Mar 1997 09:50:14 -0700 (MST)
+ Files: pod/perldata.pod pod/perlfunc.pod pod/perlipc.pod
+ pod/perlop.pod pod/perlre.pod pod/perlrun.pod
+ pod/perlsec.pod pod/perlvar.pod
+
+ Title: "INSTALL: How to enable debugging"
+ From: Andy Dougherty
+ Msg-ID: <Pine.SOL.3.95q.970321112326.1414A-100000@fractal.lafayette.e
+ Date: Fri, 21 Mar 1997 11:25:32 -0500 (EST)
+ Files: INSTALL
+
+ Title: "Document that $. is not reset on implicit open"
+ From: Chip Salzenberg
+ Files: pod/perldelta.pod
+
+ Title: "Re: Embedding success with _93 "
+ From: Doug MacEachern
+ Msg-ID: <199703112255.RAA22775@postman.osf.org>
+ Date: Tue, 11 Mar 1997 17:55:05 -0500
+ Files: pod/perldelta.pod
+
+ Title: "Update site list"
+ From: lvirden@cas.org (Larry W. Virden, x2487)
+ Msg-ID: <9703111053.AA20051@cas.org>
+ Date: Tue, 11 Mar 1997 10:53:49 -0500
+ Files: pod/perlmod.pod
+
+ Title: "Patch to document illegal characters"
+ From: Tom Phoenix
+ Msg-ID: <Pine.GSO.3.96.970314090558.15346J-100000@kelly.teleport.com>
+ Date: Fri, 14 Mar 1997 09:08:10 -0800 (PST)
+ Files: pod/perldiag.pod pod/perltrap.pod
+
+ Title: "Document trap with //o and closures"
+ From: Charles Bailey
+ Msg-ID: <01IGCHWRNSEU00661G@hmivax.humgen.upenn.edu>
+ Date: Mon, 10 Mar 1997 18:08:08 -0500 (EST)
+ Files: pod/perltrap.pod
+
+ Title: "Re: Inline PI function"
+ From: Tom Phoenix
+ Msg-ID: <Pine.GSO.3.95q.970310143125.22489V-100000@kelly.teleport.com
+ Date: Mon, 10 Mar 1997 14:33:20 -0800 (PST)
+ Files: pod/perlsub.pod
+
+ Title: "Illegal character in input"
+ From: Tom Phoenix
+ Msg-ID: <Pine.GSO.3.95q.970310151512.22489a-100000@kelly.teleport.com
+ Date: Mon, 10 Mar 1997 15:21:21 -0800 (PST)
+ Files: pod/perldiag.pod
+
+ Title: "Patch for docs Re: Lost backslash"
+ From: Tom Phoenix
+ Msg-ID: <Pine.GSO.3.96.970319071438.24834G-100000@kelly.teleport.com>
+ Date: Wed, 19 Mar 1997 07:28:57 -0800 (PST)
+ Files: pod/perlop.pod
+
+ Title: "XSUB's doc fix"
+ From: Roderick Schertler
+ Msg-ID: <28804.858012126@eeyore.ibcinc.com>
+ Date: Mon, 10 Mar 1997 11:42:06 -0500
+ Files: pod/perlcall.pod pod/perlguts.pod pod/perlxstut.pod
+
+ Title: "Document return from do FILE"
+ From: "M.J.T. Guy"
+ Msg-ID: <E0w70DK-0001yJ-00@ursa.cus.cam.ac.uk>
+ Date: Tue, 18 Mar 1997 14:50:10 +0000
+ Files: pod/perlfunc.pod
+
+ Title: "Document $^M in perlvar"
+ From: Robin Barker <rmb1@cise.npl.co.uk>
+ Msg-ID: <6153.9703202108@tempest.cise.npl.co.uk>
+ Date: Thu, 20 Mar 97 21:08:33 GMT
+ Files: pod/perlvar.pod
+
+ Title: "typos in pods of 5.003_93"
+ From: Jim Meyering <meyering@asic.sc.ti.com>
+ Msg-ID: <wpgendbzvhx.fsf@asic.sc.ti.com>
+ Date: 19 Mar 1997 10:39:38 -0600
+ Files: pod/perlfunc.pod pod/perlguts.pod pod/perlre.pod
+ pod/perltoot.pod pod/perlxs.pod
+
+ Title: "Re: Updates to pod punctuations"
+ From: lvirden@cas.org (Larry W. Virden, x2487)
+ Msg-ID: <9703141700.AA22911@cas.org>
+ Date: Fri, 14 Mar 1997 17:00:12 -0500
+ Files: pod/*.pod
+
+ Title: "clarify example in perlfunc"
+ From: Jarkko Hietaniemi
+ Msg-ID: <199703201746.TAA25195@alpha.hut.fi>
+ Date: Thu, 20 Mar 1997 19:46:01 +0200 (EET)
+ Files: pod/perlfunc.pod
+
+ Title: "Regularize headings in DB_File documentation"
+ From: Chip Salzenberg
+ Files: ext/DB_File/DB_File.pm
+
+
+----------------
+Version 5.003_93
+----------------
+
+Me, last time:
+ "This release will be the public beta of 5.004,
+ or my name isn't Larson T. Pettifogger."
+Me, now:
+ "Gone like *that*, a fortune in letterhead."
+
+ CORE LANGUAGE CHANGES
+
+ Title: "Don't autovivify array and hash elements in sub parameters"
+ From: Gurusamy Sarathy
+ Msg-ID: <199703061912.OAA20606@aatma.engin.umich.edu>
+ Date: Thu, 06 Mar 1997 14:12:09 -0500
+ Files: op.c pod/perldelta.pod pod/perlsub.pod pod/perltrap.pod
+
+ Title: "Support READ and GETC for tied handles"
+ From: Doug MacEachern
+ Msg-ID: <199703090019.TAA32591@postman.osf.org>
+ Date: Sat, 08 Mar 1997 19:19:38 -0500
+ Files: pod/perldelta.pod pod/perltie.pod pp_sys.c t/op/misc.t
+
+ Title: "Warn on C<@x =~ /a/> and C<%x =~ s/a/b/>"
+ From: Chip Salzenberg
+ Files: op.c pod/perldiag.pod
+
+ Title: "Warn on %{+undef} and @{+undef}"
+ From: Chip Salzenberg
+ Files: pp.c pp_hot.c
+
+ CORE PORTABILITY
+
+ Title: "VMS update"
+ From: Charles Bailey
+ Msg-ID: <01IG8KN5R28M00661G@hmivax.humgen.upenn.edu>
+ Date: Fri, 07 Mar 1997 22:49:46 -0500 (EST)
+ Files: lib/ExtUtils/MM_VMS.pm vms/descrip.mms vms/gen_shrfls.pl
+ vms/sockadapt.h
+
+ Title: "AmigaOS hint patch"
+ From: Norbert Pueschel
+ Msg-ID: <77724767@Armageddon.meb.uni-bonn.de>
+ Date: Sat, 08 Mar 1997 12:50:15 +0100
+ Files: hints/amigaos.sh
+
+ OTHER CORE CHANGES
+
+ Title: "Make conversion of @_ to real array work right after C<shift>"
+ From: Chip Salzenberg
+ Files: av.c
+
+ Title: "Fix imbalanced ENTER/LEAVE from C<BEGIN{die}>"
+ From: Chip Salzenberg
+ Files: op.c perl.c proto.h
+
+ Title: "perl -P path patch"
+ From: Andy Dougherty
+ Msg-ID: <Pine.SOL.3.95q.970308120242.23766D-100000@fractal.lafayette.
+ Date: Sat, 08 Mar 1997 12:45:08 -0500 (EST)
+ Files: config_H config_h.SH perl.c plan9/config.plan9 t/comp/cpp.t
+ vms/config.vms win32/config.H
+
+ BUILD PROCESS
+
+ Title: "Fix for Unisys UNIX and libperl.so"
+ From: aburlison@cix.compulink.co.uk (Alan Burlison)
+ Msg-ID: <memo.147328@cix.compulink.co.uk>
+ Date: Thu, 6 Mar 97 16:28 GMT0
+ Files: Configure
+
+ Title: "Allow './Configure -Uoptimize'"
+ From: Andy Dougherty
+ Msg-ID: <Pine.SOL.3.95q.970306110532.11070A-100000@fractal.lafayette.
+ Date: Thu, 06 Mar 1997 11:15:47 -0500 (EST)
+ Files: Configure
+
+ Title: "Use 'test -f', not 'test -x'"
+ From: Spider Boardman
+ Msg-ID: <199703080053.TAA13943@web.zk3.dec.com>
+ Date: Fri, 7 Mar 1997 19:53:00 -0500
+ Files: Configure
+
+ Title: "Don't count on 'trap 0' inside () in shell script"
+ From: aburlison@cix.compulink.co.uk (Alan Burlison)
+ Msg-ID: <memo.147326@cix.compulink.co.uk>
+ Date: Thu, 6 Mar 97 16:28 GMT0
+ Files: perl_exp.SH
+
+ LIBRARY AND EXTENSIONS
+
+ Title: "Carp with multiple arguments"
+ From: "M.J.T. Guy"
+ Msg-ID: <E0w3STZ-0007RW-00@taurus.cus.cam.ac.uk>
+ Date: Sat, 8 Mar 1997 20:12:17 +0000
+ Files: lib/Carp.pm
+
+ Title: "@EXPORT_FAIL fix for Exporter.pm"
+ From: Roderick Schertler
+ Msg-ID: <24884.857841724@eeyore.ibcinc.com>
+ Date: Sat, 08 Mar 1997 12:22:04 -0500
+ Files: lib/Exporter.pm
+
+ Title: "Open[23] autoflush docs"
+ From: Roderick Schertler
+ Msg-ID: <7939.857693947@eeyore.ibcinc.com>
+ Date: Thu, 06 Mar 1997 19:19:07 -0500
+ Files: lib/IPC/Open2.pm lib/IPC/Open3.pm
+
+ TESTS
+
+ Title: "Fix counts in output of TEST"
+ From: Hugo van der Sanden <hv@iii.co.uk>
+ Msg-ID: <331F1507.4BE8@iii.co.uk>
+ Date: Thu, 06 Mar 1997 19:03:35 +0000
+ Files: t/TEST
+
+ Title: "Ignore backup files in strict.t and warning.t"
+ From: Chip Salzenberg
+ Files: t/pragma/strict.t t/pragma/warning.t
+
+ UTILITIES
+
+ Title: "Quote pathname before using as pattern"
+ From: Chip Salzenberg
+ Files: pod/pod2html.PL
+
+ DOCUMENTATION
+
+ Title: "Consolidated INSTALL updates since _92"
+ From: Andy Dougherty
+ Msg-ID: <Pine.SOL.3.95q.970308131806.23766F-100000@fractal.lafayette.
+ Date: Sat, 08 Mar 1997 13:21:22 -0500 (EST)
+
+ Title: "Fix more E-Mail addresses in pods"
+ From: Chip Salzenberg
+ Files: lib/ExtUtils/MakeMaker.pm lib/ExtUtils/Manifest.pm
+ lib/diagnostics.pm pod/buildtoc
+
+ Title: "Warn about '.' terminating E-Mail"
+ From: Chip Salzenberg
+ Files: pod/perlform.pod
+
+ Title: "OS/2 doc update"
+ From: Ilya Zakharevich
+ Msg-ID: <199703080537.AAA25157@monk.mps.ohio-state.edu>
+ Date: Sat, 8 Mar 1997 00:37:30 -0500 (EST)
+ Files: README.os2
+
+ Title: "PODs corrections"
+ From: Ilya Zakharevich
+ Msg-ID: <199703080253.VAA24975@monk.mps.ohio-state.edu>
+ Date: Fri, 7 Mar 1997 21:53:04 -0500 (EST)
+ Files: ext/DB_File/DB_File.pm ext/Socket/Socket.pm
+ lib/Class/Template.pm lib/ExtUtils/Embed.pm
+ lib/ExtUtils/MM_VMS.pm lib/ExtUtils/Mksymlists.pm
+ lib/File/Basename.pm lib/File/stat.pm lib/Time/gmtime.pm
+ lib/Time/localtime.pm lib/Time/tm.pm lib/User/grent.pm
+ lib/User/pwent.pm pod/perlcall.pod pod/perldebug.pod
+ pod/perlfunc.pod pod/perlguts.pod pod/perllocale.pod
+ pod/perlop.pod pod/perlsub.pod
+
+
+----------------
+Version 5.003_92
+----------------
+
+This release will be the public beta of 5.004, or my name isn't
+Larson T. Pettifogger.
+
+ CORE LANGUAGE CHANGES
+
+ Title: "Strictly follow lexical context of C<eval ''> and nested subs"
+ From: Chip Salzenberg
+ Files: op.c
+
+ Title: "Make ::SUPER and UNIVERSAL work together"
+ From: Chip Salzenberg
+ Files: gv.c pod/perlguts.pod
+
+ CORE PORTABILITY
+
+ Title: "HP-UX hint update"
+ From: Raphael Manfredi <Raphael_Manfredi@grenoble.hp.com>
+ Msg-ID: <1479.857653838@lyon.grenoble.hp.com>
+ Date: Thu, 06 Mar 97 14:10:38 +0100
+ Files: hints/hpux.sh
+
+ Title: "Re: The continuing MachTen saga"
+ From: Tom Phoenix
+ Msg-ID: <Pine.GSO.3.95q.970305091611.3572E-100000@kelly.teleport.com>
+ Date: Wed, 5 Mar 1997 09:47:22 -0800 (PST)
+ Files: hints/machten_2.sh
+
+ Title: "OS/2 patches"
+ From: Ilya Zakharevich
+ Msg-ID: <199703060308.WAA22211@monk.mps.ohio-state.edu>
+ Date: Wed, 5 Mar 1997 22:08:43 -0500 (EST)
+ Files: hints/os2.sh lib/ExtUtils/MakeMaker.pm t/op/taint.t
+
+ Title: "VMS patches"
+ From: Charles Bailey
+ Msg-ID: <01IG5SQE4A6U00661G@hmivax.humgen.upenn.edu>
+ Date: Wed, 05 Mar 1997 23:10:24 -0500 (EST)
+ Files: lib/ExtUtils/MM_VMS.pm lib/ExtUtils/Manifest.pm perlsdio.h
+ t/op/runlevel.t t/op/taint.t vms/descrip.mms vms/perly_c.vms
+ vms/sockadapt.c vms/sockadapt.h vms/vms_yfix.pl
+
+ OTHER CORE CHANGES
+
+ Title: "Make sure $^X is tainted when ARG_ZERO_IS_SCRIPT"
+ From: Chip Salzenberg
+ Files: toke.c
+
+ Title: "Clarify '-T too late' error"
+ From: Chip Salzenberg
+ Files: perl.c pod/perldiag.pod
+
+ Title: "Warn when redefining or undefining a constant sub"
+ From: Chip Salzenberg
+ Files: pod/perldiag.pod pp.c sv.c
+
+ Title: "Don't generate spurious 'not imported' warning"
+ From: Chip Salzenberg
+ Files: gv.c t/pragma/strict-vars pod/perldiag.pod
+
+ Title: "Clarify message re: @host in string"
+ From: Chip Salzenberg
+ Files: pod/perldiag.pod pod/perltrap.pod toke.c
+
+ Title: "Disconnect refs that are targets of pp_readline"
+ From: Chip Salzenberg
+ Files: pp_hot.c
+
+ Title: "Fix typo in test of HvFILL()"
+ From: Chip Salzenberg
+ Files: op.c
+
+ Title: "Allow for pad name array to be shorter than pad array"
+ From: Chip Salzenberg
+ Files: op.c
+
+ Title: "Eliminate format-string type warnings"
+ From: Hallvard B Furuseth
+ Msg-ID: <199703030915.KAA11634@bombur2.uio.no>
+ Date: Mon, 3 Mar 1997 10:15:11 +0100 (MET)
+ Files: doio.c ext/POSIX/POSIX.xs gv.c hints/dec_osf.sh pp.c pp_ctl.c
+ pp_hot.c run.c sv.c x2p/a2py.c
+
+ Title: "Update copyright dates"
+ From: Chip Salzenberg
+ Files: *.[hc] x2p/*.[hc] win32/EXTERN.h vms/vmsish.h vms/vms.c
+
+ BUILD PROCESS
+
+ Title: "near-harmless bug in _91's Configure"
+ From: Roderick Schertler
+ Msg-ID: <pzg1yfuiza.fsf@eeyore.ibcinc.com>
+ Date: 01 Mar 1997 21:26:49 -0500
+ Files: Configure
+
+ Title: "Change 'continuing anyway' to 'probably harmless'"
+ From: Chip Salzenberg
+ Files: INSTALL lib/ExtUtils/Liblist.pm
+
+ LIBRARY AND EXTENSIONS
+
+ Title: "Newer ReadLine"
+ From: Ilya Zakharevich
+ Msg-ID: <199703040634.BAA19919@monk.mps.ohio-state.edu>
+ Date: Tue, 4 Mar 1997 01:34:28 -0500 (EST)
+ Files: lib/Term/ReadLine.pm lib/perl5db.pl
+
+ Title: "Refresh Getopt::Long to 2.9"
+ From: Johan Vromans <jvromans@squirrel.nl>
+ Files: lib/Getopt/Long.pm
+
+ Title: "Benchmark: using code refs"
+ From: Hugo van der Sanden <hv@iii.co.uk>
+ Msg-ID: <199703041132.LAA07613@tyree.iii.co.uk>
+ Date: Tue, 04 Mar 1997 11:32:11 +0000
+ Files: lib/Benchmark.pm
+
+ Title: "Fix quotewords"
+ From: Hugo van der Sanden <hv@crypt.compulink.co.uk>
+ Msg-ID: <199703060755.HAA15060@crypt.compulink.co.uk>
+ Date: Thu, 06 Mar 1997 07:55:25 +0000
+ Files: lib/Text/ParseWords.pm
+
+ Title: "Use IV instead of double for tms structure members"
+ From: Chip Salzenberg
+ Files: ext/POSIX/POSIX.xs
+
+ Title: "Document IO::File::new_tmpfile"
+ From: Chip Salzenberg
+ Files: ext/IO/lib/IO/File.pm
+
+ TESTS
+
+ Title: "Make op/TEST silent under -w"
+ From: d-lewart@uiuc.edu (Daniel S. Lewart)
+ Msg-ID: <199703011821.NAA13037@sinistar.idle.com>
+ Date: Sat, 1 Mar 97 12:04:09 CST
+ Files: t/TEST
+
+ Title: "Smarter t/op/taint.t"
+ From: Tom Phoenix
+ Msg-ID: <Pine.GSO.3.95q.970303103047.24000A-100000@kelly.teleport.com
+ Date: Mon, 3 Mar 1997 10:31:54 -0800 (PST)
+ Files: t/op/taint.t
+
+ Title: "Fix taint test for systems without csh"
+ From: Chip Salzenberg
+ Files: t/op/taint.t
+
+ Title: "Don't test locales if there is no setlocale()"
+ From: Chip Salzenberg
+ Files: t/pragma/locale.t
+
+ UTILITIES
+
+ Title: "Update pod2html"
+ From: wmiddlet@Adobe.COM (William Middleton)
+ Msg-ID: <199703030025.QAA08106@ducks>
+ Date: Sun, 2 Mar 1997 16:25:03 -0800 (PST)
+ Files: pod/pod2html.PL
+
+ Title: "Support 'long long' in h2ph"
+ From: (name lost)
+ Files: utils/h2ph.PL
+
+ DOCUMENTATION
+
+ Title: "Add taint checks and srand to perldelta"
+ From: Tom Phoenix
+ Msg-ID: <Pine.GSO.3.95q.970302115355.23058D-100000@kelly.teleport.com
+ Date: Sun, 2 Mar 1997 11:56:08 -0800 (PST)
+ Files: pod/perldelta.pod
+
+ Title: "Don't call FileHandle 'deprecated'"
+ From: Chip Salzenberg
+ Files: pod/perldelta.pod
+
+ Title: "Improve sample module header"
+ From: Tom Christiansen and Graham Barr
+ Msg-ID: <199703011732.KAA14693@jhereg.perl.com>
+ Date: Sat, 01 Mar 1997 10:32:31 -0700
+ Files: pod/perlmod.pod
+
+ Title: "Clarify C<crypt> documentation"
+ From: Tom Phoenix
+ Msg-ID: <Pine.GSO.3.95q.970228131112.12357D-100000@kelly.teleport.com
+ Date: Fri, 28 Feb 1997 13:18:25 -0800 (PST)
+ Files: pod/perlfunc.pod
+
+ Title: "Update list of CPAN sites"
+ From: Jarkko Hietaniemi
+ Msg-ID: <199703021454.QAA07446@alpha.hut.fi>
+ Date: Sun, 2 Mar 1997 16:54:22 +0200 (EET)
+ Files: pod/perlmod.pod
+
+ Title: "Enhance description of 'server error'"
+ From: Jarkko Hietaniemi
+ Msg-ID: <199702041903.VAA16070@alpha.hut.fi>
+ Date: Tue, 4 Feb 1997 21:03:23 +0200 (EET)
+ Files: pod/perldiag.pod
+
+ Title: "Regularize format of E-Mail addresses in *.pod"
+ From: Chip Salzenberg
+ Files: pod/*.pod
+
+
+----------------
+Version 5.003_91
+----------------
+
+This is (should be? must be!) the public beta of 5.004.
+
+ CORE LANGUAGE CHANGES
+
+ Title: "Fix perl_call_*() when !G_EVAL"
+ From: Gurusamy Sarathy
+ Msg-ID: <199702250725.CAA09192@aatma.engin.umich.edu>,
+ <199702251925.OAA15498@aatma.engin.umich.edu>,
+ <199702252200.RAA16853@aatma.engin.umich.edu>
+ Date: Tue, 25 Feb 1997 02:25:56 -0500
+ Files: MANIFEST gv.c interp.sym perl.c perl.h pp_ctl.c pp_sys.c
+ t/op/runlevel.t
+
+ Title: "Fix taint tests for writeable dirs in $ENV{PATH}"
+ From: Chip Salzenberg
+ Files: mg.c mg.h pod/perlsec.pod taint.c
+
+ Title: "Forbid tainted parameters for truncate()"
+ From: Chip Salzenberg
+ Files: pp_sys.c
+
+ Title: "Don't taint magic hash keys unnecessarily"
+ From: Charles Bailey
+ Msg-ID: <01IFXL9TY74Y00661G@hmivax.humgen.upenn.edu>
+ Date: Fri, 28 Feb 1997 02:11:26 -0500 (EST)
+ Files: hv.c
+
+ CORE PORTABILITY
+
+ Title: "VMS patches post _90"
+ From: Charles Bailey
+ Msg-ID: <01IFYDE5ZT7O005A53@hmivax.humgen.upenn.edu>
+ Date: Fri, 28 Feb 1997 15:26:33 -0500 (EST)
+ Files: doio.c mg.c perl.h pp_hot.c t/op/rand.t t/op/taint.t taint.c
+ vms/descrip.mms vms/vms.c
+
+ Title: "Fix taint check in system() and exec() under VMS and OS/2"
+ From: Chip Salzenberg
+ Files: pp_sys.c
+
+ Title: "If _XOPEN_VERSION >= 4, socket length parameters are size_t"
+ From: Michael H. Moran <mhm@austin.ibm.com>
+ Files: perl.h pp_sys.c
+
+ Title: "Make dooneliner() compile again"
+ From: Chip Salzenberg
+ Files: pp_sys.c
+
+ OTHER CORE CHANGES
+
+ Title: "Short-circuit duplicate study() calls"
+ From: Chip Salzenberg
+ Files: pp.c
+
+ Title: "Call sv_set[iu]v() with [IU]V parameter, not [IU]32"
+ From: Chip Salzenberg
+ Files: perl.c pp.c pp_sys.c toke.c util.c
+
+ Title: "Clean up and document API for hashes"
+ From: Gurusamy Sarathy
+ Msg-ID: <199702251824.NAA14859@aatma.engin.umich.edu>
+ Date: Tue, 25 Feb 1997 13:24:02 -0500
+ Files: hv.c hv.h pod/perldelta.pod pod/perlguts.pod
+
+ Title: "pp_undef was not always freeing memory"
+ From: Ilya Zakharevich
+ Msg-ID: <199702270653.BAA13949@monk.mps.ohio-state.edu>
+ Date: Thu, 27 Feb 1997 01:53:51 -0500 (EST)
+ Files: pp.c
+
+ Title: "Fix SEGV when debugging with foreach() lvalue patch"
+ From: Ilya Zakharevich
+ Msg-ID: <199702271924.OAA14557@monk.mps.ohio-state.edu>
+ Date: Thu, 27 Feb 1997 14:24:36 -0500 (EST)
+ Files: sv.c
+
+ Title: "Don't examine rx->exec_tainted if pregexec() fails"
+ From: Chip Salzenberg
+ Files: pp_hot.c
+
+ Title: "Silence bogus typo warning on $DB::postponed"
+ From: Gurusamy Sarathy
+ Msg-ID: <199702271802.NAA12505@aatma.engin.umich.edu>
+ Date: Thu, 27 Feb 1997 13:02:30 -0500
+ Files: op.c
+
+ BUILD PROCESS
+
+ Title: "Sanity check linking with $libs"
+ From: Andy Dougherty
+ Msg-ID: <Pine.SOL.3.95q.970225221634.2486A-100000@fractal.lafayette.edu>
+ Date: Tue, 25 Feb 1997 14:13:45 -0500 (EST)
+ Files: Configure
+
+ Title: "Flush stdout when printing $randbits guess"
+ From: Chip Salzenberg
+ Files: Configure
+
+ Title: "Configure changes for Irix nm"
+ From: Helmut Jarausch and Fabien Tassin
+ Files: Configure
+
+ Title: "Update OS/2 Configure diff"
+ From: Ilya Zakharevich
+ Msg-ID: <199702251906.OAA10608@monk.mps.ohio-state.edu>
+ Date: Tue, 25 Feb 1997 14:06:23 -0500 (EST)
+ Files: os2/diff.configure
+
+ LIBRARY AND EXTENSIONS
+
+ Title: "Don't require() in a signal handler"
+ From: Chip Salzenberg
+ Files: lib/perl5db.pl
+
+ Title: "Make IPC::Open3 work without fork()"
+ From: Ilya Zakharevich
+ Msg-ID: <199702251937.OAA10718@monk.mps.ohio-state.edu>
+ Date: Tue, 25 Feb 1997 14:37:07 -0500 (EST)
+ Files: lib/IPC/Open3.pm
+
+ Title: "Follow up on elimination of $` $& $' in libraries"
+ From: "M.J.T. Guy"
+ Msg-ID: <E0w0Sqc-00046E-00@ursa.cus.cam.ac.uk>
+ Date: Fri, 28 Feb 1997 13:59:42 +0000
+ Files: lib/Getopt/Long.pm lib/diagnostics.pm
+
+ Title: "Don't warn on use of CCFLAGS"
+ From: Andreas Koenig
+ Msg-ID: <199702251038.LAA13123@anna.in-berlin.de>
+ Date: Tue, 25 Feb 1997 11:38:43 +0100
+ Files: lib/ExtUtils/MakeMaker.pm
+
+ Title: "Allow explicit '-lperl' in link arguments"
+ From: Doug MacEachern
+ Msg-ID: <199702271625.LAA25402@postman.osf.org>
+ Date: Thu, 27 Feb 1997 11:25:04 -0500
+ Files: lib/ExtUtils/Embed.pm
+
+ TESTS
+
+ Title: "New test op/taint.t"
+ From: Tom Phoenix
+ Msg-ID: <Pine.GSO.3.95q.970225101328.18288M-100000@kelly.teleport.com
+ Date: Tue, 25 Feb 1997 11:36:53 -0800 (PST)
+ Files: MANIFEST t/op/taint.t
+
+ Title: "Patch to t/op/rand.t"
+ From: Tom Phoenix
+ Msg-ID: <Pine.GSO.3.95q.970225181321.13796Q-100000@kelly.teleport.com
+ Date: Tue, 25 Feb 1997 18:19:34 -0800 (PST)
+ Files: t/op/rand.t
+
+ UTILITIES
+
+ Title: "Add --lax option to pod2man; use it in perldoc"
+ From: Nat <gnat@frii.com>, Chip Salzenberg
+ Files: pod/pod2man.PL utils/perldoc.PL
+
+ Title: "Eliminate dead code in pod2man"
+ From: Chip Salzenberg
+ Files: pod/pod2man.PL
+
+ DOCUMENTATION
+
+ Title: "Warn about intrusive sfio behavior"
+ From: Andy Dougherty
+ Msg-ID: <Pine.SOL.3.95q.970228112136.24038G-100000@fractal.lafayette.
+ Date: Fri, 28 Feb 1997 11:35:49 -0500 (EST)
+ Files: INSTALL
+
+ Title: "Updates to perlfunc.pod"
+ From: Tom Phoenix (with help from M.J.T. Guy and Tom C.)
+ Files: pod/perlfunc.pod
+
+ Title: "Move ENVIRONMENT from perl.pod to perlrun.pod"
+ From: Chip Salzenberg
+ Files: pod/perl.pod pod/perlrun.pod
+
+ Title: "Describe PERL_DEBUG_MSTATS in perlrun.pod"
+ From: Nat <gnat@frii.com>
+ Files: pod/perlrun.pod
+
+ Title: "Fix references to perlbug"
+ From: Chip Salzenberg
+ Files: pod/perl.pod pod/perldelta.pod pod/perllocale.pod
+ pod/perltoc.pod
+
+
+----------------
+Version 5.003_90
+----------------
+
+At last, a mil[le]stone: The first beta of Perl 5.004.
+
+ CORE LANGUAGE CHANGES
+
+ Title: "Automatically call srand() before rand() if user didn't"
+ From: Chip Salzenberg
+ Files: pod/perlfunc.pod pp.c
+
+ CORE PORTABILITY
+
+ Title: "Ultrix hints"
+ From: Spider Boardman
+ Msg-ID: <199702220951.EAA08156@Orb.Nashua.NH.US>
+ Date: Sat, 22 Feb 1997 04:51:48 -0500
+ Files: hints/ultrix_4.sh
+
+ Title: "Digital UNIX and 3_28"
+ From: Jarkko Hietaniemi
+ Msg-ID: <199702231427.QAA13807@alpha.hut.fi>
+ Date: Sun, 23 Feb 1997 16:27:19 +0200 (EET)
+ Files: Configure MANIFEST ext/NDBM_File/hints/dec_osf.pl
+ ext/ODBM_File/hints/dec_osf.pl hints/dec_osf.sh
+
+ Title: "AmigaOS patches to 5.003_28"
+ From: Norbert Pueschel
+ Msg-ID: <77724759@Armageddon.meb.uni-bonn.de>
+ Date: Sat, 22 Feb 1997 18:08:02 +0100
+ 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
+
+ Title: "Hints for DC/OSx"
+ From: Stephen Zander <srz@loopback>
+ Msg-ID: <199702242124.NAA03796@wsuse5.mckesson.com>
+ Date: Mon, 24 Feb 1997 13:24:54 -0800
+ Files: hints/dcosx.sh
+
+ Title: "Update VMS version"
+ From: Chip Salzenberg
+ Files: vms/config.vms vms/descrip.mms
+
+ OTHER CORE CHANGES
+
+ Title: "Don't assume that sizeof(int) >= sizeof(void*)"
+ From: Chip Salzenberg
+ Files: doio.c malloc.c regexec.c
+
+ BUILD PROCESS
+
+ Title: "Re: ccdlflags don't quite work"
+ From: Andy Dougherty
+ Msg-ID: <Pine.SOL.3.95q.970224160630.5700E-100000@fractal.lafayette.e
+ Date: Mon, 24 Feb 1997 16:07:07 -0500 (EST)
+ Files: Configure
+
+ Title: "Use $ccflags, $ldflags, $libs when determining $randbits"
+ From: Chip Salzenberg
+ Files: Configure
+
+ Title: "'installperl -v' doesn't do enough"
+ From: Spider Boardman
+ Msg-ID: <199702241342.IAA25945@Orb.Nashua.NH.US>
+ Date: Mon, 24 Feb 1997 08:42:59 -0500
+ Files: installperl
+
+ Title: "installperl breaks running system (for a while)"
+ From: Spider Boardman
+ Msg-ID: <199702241412.JAA11829@Orb.Nashua.NH.US>
+ Date: Mon, 24 Feb 1997 09:12:11 -0500
+ Files: installperl
+
+ LIBRARY AND EXTENSIONS
+
+ Title: "Don't clobber $1 et al in debugger's DB::sub()"
+ From: Ilya Zakharevich
+ Files: lib/perl5db.pl
+
+ Title: "Fix fd leak in IO::Pipe"
+ From: Roderick Schertler
+ Msg-ID: <pzn2sv722y.fsf@eeyore.ibcinc.com>
+ Date: 23 Feb 1997 14:29:57 -0500
+ Files: ext/IO/lib/IO/Pipe.pm
+
+ Title: "Pod::Text fixes"
+ From: Roderick Schertler
+ Msg-ID: <350.856634588@eeyore.ibcinc.com>
+ Date: Sat, 22 Feb 1997 13:03:08 -0500
+ Files: lib/Pod/Text.pm
+
+ Title: "Trivial patch to make ExtUtils::Install more -w clean"
+ From: Tim Bunce
+ Msg-ID: <9702241605.AA17436@toad.ig.co.uk>
+ Date: Mon, 24 Feb 1997 16:05:17 +0000
+ Files: lib/ExtUtils/Install.pm
+
+ Title: "C<use vars> didn't work until 5.002"
+ From: Chip Salzenberg
+ Files: lib/vars.pm
+
+ TESTS
+
+ Title: "More thoroughly test rand() and srand()"
+ From: Tom Phoenix
+ Files: t/op/rand.t
+
+ Title: "Don't use <*> where readdir() will do"
+ From: Chip Salzenberg
+ Files: t/op/stat.t
+
+ Title: "Allow for $^X to be 'miniperl'"
+ From: Dominic Dunlop <domo@slipper.ip.lu>
+ Msg-ID: <v03020903af360f31aced@[194.51.248.65]>
+ Date: Sun, 23 Feb 1997 16:22:45 +0100
+ Files: t/op/magic.t
+
+ UTILITIES
+
+ Title: "Post-28 INSTALL updates"
+ From: Andy Dougherty
+ Msg-ID: <Pine.SOL.3.95q.970224170713.5700H-100000@fractal.lafayette.e
+ Date: Mon, 24 Feb 1997 17:09:09 -0500 (EST)
+ Files: INSTALL
+
+ Title: "Re: Hash key created by subroutine call? (fwd) "
+ From: Gurusamy Sarathy
+ Msg-ID: <199702242229.RAA04395@aatma.engin.umich.edu>
+ Date: Mon, 24 Feb 1997 17:29:30 -0500
+ Files: pod/perlsub.pod pod/perltrap.pod
+
+ Title: "Add documentation and '-h' option to perlbug"
+ From: Gurusamy Sarathy
+ Msg-ID: <199702240854.DAA27128@aatma.engin.umich.edu>
+ and <199702242009.PAA02849@aatma.engin.umich.edu>
+ Date: Mon, 24 Feb 1997
+ Files: pod/perl.pod pod/perldelta.pod installman
+ utils/perlbug.PL
+
+ Title: "pumpkin-1.9.pod"
+ From: Andy Dougherty
+ Msg-ID: <Pine.SOL.3.95q.970224155702.5700D-100000@fractal.lafayette.e
+ Date: Mon, 24 Feb 1997 16:06:02 -0500 (EST)
+ Files: Porting/pumpkin.pod
+
+ DOCUMENTATION
+
+ Title: "Fix typo in 'Tolkien quotation typo' fix"
+ From: Jarkko Hietaniemi
+ Files: Changes
+
+ Title: "Document one-argument limitation with #! line"
+ From: Tom Phoenix
+ Msg-ID: <Pine.GSO.3.95q.970223182745.15989A-100000@kelly.teleport.com
+ Date: Sun, 23 Feb 1997 18:41:02 -0800 (PST)
+ Files: pod/perldiag.pod pod/perlsec.pod
+
+
+----------------
+Version 5.003_28
+----------------
+
+This release is beta candidate #6. If this isn't good enough to go beta,
+I'll eat a floppy disk. (Okay, it's a chocolate floppy, but still....)
+
+ CORE LANGUAGE CHANGES
+
+ Title: "Don't let C<sub foo;> undefine &foo"
+ From: Chip Salzenberg
+ Files: op.c
+
+ Title: "Make code, doc agree on $ENV{PATH} and `cmd`"
+ From: Chip Salzenberg
+ Files: pod/perlsec.pod pp_sys.c
+
+ Title: "Don't taint $x in C<$x = ($tainted =~ /(\w+)/)>"
+ From: Chip Salzenberg
+ Files: pp_ctl.c pp_hot.c
+
+ Title: "Turn off 'expression tainted' flag at end of runops()"
+ From: Chip Salzenberg
+ Files: run.c
+
+ Title: "When overloading, don't throw away nomethod's value"
+ From: Ilya Zakharevich
+ Files: gv.c
+
+ Title: "Optimize keys() and values() in void context"
+ From: Chip Salzenberg
+ Files: doop.c op.c
+
+ CORE PORTABILITY
+
+ Title: "New hints for Digital UNIX"
+ From: Jarkko Hietaniemi
+ Files: hints/dec_osf.sh
+
+ Title: "No version of AIX has working setre[ug]id()"
+ From: neufeld@fast.pvi.org (Keith Neufeld)
+ Files: hints/aix.sh
+
+ Title: "VMS patches post _27"
+ From: Charles Bailey
+ Msg-ID: <01IFMEMPN1IU0057E2@hmivax.humgen.upenn.edu>
+ Date: Thu, 20 Feb 1997 01:58:46 -0500 (EST)
+ Files: MANIFEST dosish.h hv.c lib/ExtUtils/MM_VMS.pm
+ lib/ExtUtils/xsubpp perl.c perlsdio.h pod/perldelta.pod
+ pod/perlvar.pod t/op/closure.t unixish.h vms/Makefile
+ vms/descrip.mms vms/ext/filespec.t vms/genconfig.pl
+ vms/vms.c vms/vmsish.h
+
+ Title: "Re: OS/2 patch for _27"
+ From: Ilya Zakharevich
+ Msg-ID: <199702210024.TAA03174@monk.mps.ohio-state.edu>
+ Date: Thu, 20 Feb 1997 19:24:16 -0500 (EST)
+ Files: INSTALL README.os2 lib/Test/Harness.pm os2/Changes
+ os2/OS2/PrfDB/t/os2_prfdb.t os2/os2.c os2/os2ish.h
+ os2/perl2cmd.pl perl.c pod/perldelta.pod t/TEST t/harness
+ t/op/magic.t
+
+ OTHER CORE CHANGES
+
+ Title: "Fix a typo"
+ From: Chip Salzenberg
+ Files: pp_sys.c
+
+ Title: "Undo signal patch -- it broke die() in signal"
+ From: Chip Salzenberg
+ Files: mg.c
+
+ Title: "Fix perl_call_sv(..., G_NOARGS)"
+ From: Chip Salzenberg
+ Files: perl.c
+
+ Title: "Fix SIGSEGV when cloning sub with complex expression"
+ From: Chip Salzenberg
+ Files: op.c
+
+ Title: "Minor update to malloc.c"
+ From: Ilya Zakharevich
+ Msg-ID: <199702210244.VAA03676@monk.mps.ohio-state.edu>
+ Date: Thu, 20 Feb 1997 21:44:13 -0500 (EST)
+ Files: malloc.c
+
+ Title: "Fix the Tolkien quotation"
+ From: Chip Salzenberg
+ Files: perly.y
+
+ BUILD PROCESS
+
+ (no changes)
+
+ LIBRARY AND EXTENSIONS
+
+ Title: "Debugger patch"
+ From: Ilya Zakharevich
+ Msg-ID: <199702210737.CAA03951@monk.mps.ohio-state.edu>
+ Date: Fri, 21 Feb 1997 02:37:59 -0500 (EST)
+ Files: lib/perl5db.pl
+
+ Title: "Avoid $` $& $' in libraries"
+ From: Ilya Zakharevich
+ Msg-ID: <199702210207.VAA03560@monk.mps.ohio-state.edu>
+ Date: Thu, 20 Feb 1997 21:07:30 -0500 (EST)
+ Files: lib/Getopt/Long.pm lib/Pod/Text.pm lib/diagnostics.pm
+ os2/OS2/REXX/REXX.pm
+
+ Title: "Remove redundant clearerr() from IO::Seekable"
+ From: Chip Salzenberg
+ Files: ext/IO/lib/IO/Handle.pm ext/IO/lib/IO/Seekable.pm
+
+ Title: "prototype error in File::stat"
+ From: Graham.Barr@tiuk.ti.com
+ Msg-ID: <199702180748.HAA14151@ultra-boy>
+ Date: Tue, 18 Feb 1997 07:48:40 GMT
+ Files: lib/File/stat.pm
+
+ TESTS
+
+ Title: "Include 'study' in regexp.t"
+ From: Chip Salzenberg
+ Files: t/op/regexp.t
+
+ Title: "Don't run locale test if -DNO_LOCALE"
+ From: Chip Salzenberg
+ Files: t/pragma/locale.t
+
+ Title: "Tweak tests to notice $dont_use_nlink"
+ From: Chip Salzenberg
+ Files: t/io/fs.t t/op/stat.t
+
+ Title: "Add test for grep() and wantarray"
+ From: Hugo van der Sanden <hv@iii.co.uk>
+ Msg-ID: <199702181105.LAA17895@tyree.iii.co.uk>
+ Date: Tue, 18 Feb 1997 11:05:59 +0000
+ Files: t/op/misc.t
+
+ UTILITIES
+
+ (no changes)
+
+ DOCUMENTATION
+
+ Title: "INSTALL updates since _26"
+ From: Andy Dougherty
+ Msg-ID: <Pine.SOL.3.95q.970218155815.2014F-100000@fractal.lafayette.e
+ Date: Tue, 18 Feb 1997 16:00:08 -0500 (EST)
+ Files: INSTALL
+
+ Title: "Document "$$0" change"
+ From: Chip Salzenberg
+ Files: pod/perldelta.pod
+
+ Title: "Don't recommend impossible //o for C<$x =~ $y>"
+ From: Chip Salzenberg
+ Files: pod/perlop.pod
+
+ Title: "Correct doc that claimed that <FH> was never false"
+ From: Chip Salzenberg
+ Files: pod/perldelta.pod pod/perlop.pod
+
+ Title: "Document C<$?> vs. $SIG{CHLD}"
+ From: Ulrich Pfeifer
+ Files: pod/perlvar.pod
+
+ Title: "Add pumpkin.pod"
+ From: Chip Salzenberg
+ Files: MANIFEST Porting/pumpkin.pod
+
+ Title: "Don't say "associat*ve arr*y""
+ From: Chip Salzenberg
+ Files: MANIFEST gv.h hv.c lib/Env.pm lib/overload.pm opcode.pl
+ pod/perl.pod pod/perldelta.pod pod/perldiag.pod
+ pod/perlfunc.pod pod/perlguts.pod pod/perlmod.pod
+ pod/perltie.pod pod/perltoc.pod pod/perltrap.pod x2p/a2p.pod
+
+
+----------------
+Version 5.003_27
+----------------
+
+This release is beta candidate #5: Our last, best hope for a beta.
+
+ CORE LANGUAGE CHANGES
+
+ Title: "Better looks_like_number() function [sv.c]"
+ From: Gisle Aas
+ Msg-ID: <199702141708.SAA17546@bergen.sn.no>
+ Date: Fri, 14 Feb 1997 18:08:52 +0100
+ Files: sv.c
+
+ Title: "Remove redundant functions UNIVERSAL::{class,is_instance}"
+ From: Gisle Aas
+ Msg-ID: <hwwsbpeq2.fsf@bergen.sn.no>
+ Date: 14 Feb 1997 15:52:21 +0000
+ Files: pod/perldelta.pod pod/perlobj.pod t/op/universal.t universal.c
+
+ Title: "Allow C<setpgrp $$>"
+ From: Roderick Schertler
+ Msg-ID: <pzraigyshr.fsf@eeyore.ibcinc.com>
+ Date: 16 Feb 1997 23:19:12 -0500
+ Files: pp_sys.c
+
+ Title: "Fix syntax error on C<&$1>"
+ From: Chip Salzenberg
+ Files: toke.c
+
+ Title: "Fix sub call through magic var (e.g. C<&$1>)"
+ From: Chip Salzenberg
+ Files: pp_hot.c
+
+ Title: "Fix grep() with refs in array context"
+ From: Chip Salzenberg
+ Files: pp.c
+
+ CORE PORTABILITY
+
+ Title: "Eliminate $^S; add C<use vmsish qw(status exit time)>"
+ From: Charles Bailey
+ Msg-ID: <01IFI9CFKL0S004R2V@hmivax.humgen.upenn.edu>
+ Date: Mon, 17 Feb 1997 02:45:26 -0500 (EST)
+ Files: MANIFEST gv.c lib/English.pm lib/ExtUtils/MM_VMS.pm
+ lib/ExtUtils/Mksymlists.pm lib/ExtUtils/xsubpp mg.c op.c
+ perl.c perl.h pod/perldelta.pod pod/perlmod.pod
+ pod/perlvar.pod pp_ctl.c pp_sys.c utils/perldoc.PL
+ vms/Makefile vms/config.vms vms/descrip.mms
+ vms/ext/Stdio/Stdio.pm vms/ext/Stdio/Stdio.xs
+ vms/ext/XSSymSet.pm vms/ext/vmsish.pm vms/vms.c vms/vmsish.h
+ win32/makedef.pl
+
+ Title: "Eliminate FP exceptions under SCO 5"
+ From: Chip Salzenberg
+ Files: hints/sco.sh unixish.h
+
+ Title: "Digital UNIX hints"
+ From: Jarkko Hietaniemi
+ Msg-ID: <199702151906.VAA22999@alpha.hut.fi>
+ Date: Sat, 15 Feb 1997 21:06:33 +0200 (EET)
+ Files: hints/dec_osf.sh
+
+ Title: "Irix6.4 (with 7.1 compilers)"
+ From: John Stoffel <jfs@fluent.com>
+ Msg-ID: <199702130238.VAA24468@jfs.Fluent.COM>
+ Date: Wed, 12 Feb 1997 21:38:51 -0500 (EST)
+ Files: hints/irix_6_2.sh hints/irix_6_4.sh
+
+ Title: "Update Plan 9, Win32, VMS configs with $shortsize and $longsize"
+ From: Chip Salzenberg
+ Files: plan9/config.plan9 plan9/genconfig.pl
+ vms/genconfig.pl win32/config.w32
+
+ OTHER CORE CHANGES
+
+ Title: "Fix core dump when embedding"
+ From: Chip Salzenberg
+ Files: perl.c
+
+ Title: "Re: Fragile signals"
+ From: Ilya Zakharevich
+ Msg-ID: <199702130644.BAA07572@monk.mps.ohio-state.edu>
+ Date: Thu, 13 Feb 1997 01:44:39 -0500 (EST)
+ Files: mg.c
+
+ Title: "Make format strings correspond exactly to parameters"
+ From: Roderick Schertler
+ Msg-ID: <pz7mkc1h0g.fsf@eeyore.ibcinc.com>
+ Date: 13 Feb 1997 17:24:31 -0500
+ Files: doio.c ext/DB_File/DB_File.xs ext/Opcode/Opcode.xs gv.c op.c
+ perl.c pp_ctl.c pp_sys.c regcomp.c toke.c
+
+ Title: "Don't try to attach 'o' magic to read-only values"
+ From: Chip Salzenberg
+ Files: sv.c
+
+ Title: "Fix carriage-return message"
+ From: Chip Salzenberg
+ Files: toke.c
+
+ Title: "In <=>, test for equality first"
+ From: Chip Salzenberg
+ Files: pp.c
+
+ Title: "Don't mark sv_{true,false} PADTMP"
+ From: Chip Salzenberg
+ Files: op.c
+
+ BUILD PROCESS
+
+ Title: "Fix eval "" in Configure"
+ From: allen@gateway.grumman.com (John L. Allen)
+ Msg-ID: <9702141809.AA17001@gateway.grumman.com>
+ Date: Fri, 14 Feb 1997 13:09:53 -0500
+ Files: Configure
+
+ Title: "Don't link with -lsfio if sfio is not requested"
+ From: Chip Salzenberg
+ Files: Configure
+
+ Title: "perl5.003_26 Configure change "win" for AIX 4"
+ From: Tim Mooney <mooney@dogbert.cc.ndsu.NoDak.edu>
+ Msg-ID: <Pine.OSF.3.95.970214135751.32654A-100000@dogbert.cc.ndsu.NoD
+ Date: Fri, 14 Feb 1997 13:59:02 -0600 (CST)
+ Files: Configure
+
+ Title: "Update os2/diff.configure"
+ From: Chip Salzenberg
+ Files: os2/diff.configure
+
+ LIBRARY AND EXTENSIONS
+
+ Title: "Remove Fatal.pm"
+ From: Chip Salzenberg
+ Files: MANIFEST lib/Fatal.pm pod/perldelta.pod pod/perlmod.pod
+ pod/roffitall t/lib/fatal.t
+
+ Title: "Refresh MakeMaker to 5.40"
+ From: Andy Dougherty, Andreas Koenig, Tim Bunce
+ Files: lib/ExtUtils/Liblist.pm lib/ExtUtils/MM_Unix.pm
+ lib/ExtUtils/MakeMaker.pm lib/ExtUtils/Mksymlists.pm
+
+ Title: "Refresh CPAN.pm to 1.21"
+ From: Andreas Koenig
+ Files: lib/CPAN.pm lib/CPAN/FirstTime.pm lib/CPAN/Nox.pm
+
+ Title: "Refresh Test::Harness to 1.15"
+ From: Andreas Koenig
+ Files: lib/Test/Harness.pm
+
+ TESTS
+
+ Title: "Remove non-portable locale tests"
+ From: Chip Salzenberg
+ Files: t/pragma/locale.t
+
+ UTILITIES
+
+ Title: "pod2man: missing '-' in name section shouldn't be fatal"
+ From: Ulrich Pfeifer
+ Msg-ID: <yfmzpxcimsa.fsf@ls6.informatik.uni-dortmund.de>
+ Date: 10 Feb 1997 18:38:45 +0100
+ Files: pod/pod2man.PL
+
+ DOCUMENTATION
+
+ Title: "Update To-Do list"
+ From: Tim Bunce
+ Msg-ID: <9702101900.AA25293@toad.ig.co.uk>
+ Date: Mon, 10 Feb 1997 19:00:59 +0000
+ Files: Todo
+
+ Title: "Fix formatting in perldiag"
+ From: Chip Salzenberg
+ Files: pod/perldiag.pod
+
+
+----------------
+Version 5.003_26
+----------------
+
+This release is beta candidate #4. "Once more, dear friends...."
+
+ CORE LANGUAGE CHANGES
+
+ Title: "Make \r in script an error (per Larry)"
+ From: Chip Salzenberg
+ Files: pod/perldiag.pod toke.c
+
+ Title: "Support '%i' format and 'h' modifier in s?printf"
+ From: Chip Salzenberg
+ Files: doop.c pod/perldelta.pod
+
+ CORE PORTABILITY
+
+ Title: "Fix value of system() and $? for DEC UNIX, VMS, others"
+ From: Chip Salzenberg
+ Files: mg.c perl.h pp_sys.c
+
+ Title: "VMS patches post _25"
+ From: Charles Bailey
+ Msg-ID: <01IF48W3P39W0050BD@hmivax.humgen.upenn.edu>
+ Date: Fri, 07 Feb 1997 01:56:12 -0500 (EST)
+ Files: Porting/Glossary lib/ExtUtils/Liblist.pm
+ lib/ExtUtils/MM_VMS.pm lib/ExtUtils/xsubpp perl.c
+ vms/Makefile vms/config.vms vms/descrip.mms vms/genconfig.pl
+ vms/perlvms.pod vms/vms.c vms/vmsish.h x2p/a2p.c
+
+ Title: "Hints for BSDOS"
+ From: Christopher Davis <ckd@loiosh.kei.com>
+ Msg-ID: <199702042011.PAA09206@loiosh.kei.com>
+ Date: Tue, 4 Feb 1997 15:11:13 -0500 (EST)
+ Files: hints/bsdos.sh
+
+ Title: "On C<sysopen(..., O_APPEND)>, call C<fopen(..., "a")>"
+ From: Chip Salzenberg
+ Files: doio.c
+
+ OTHER CORE CHANGES
+
+ Title: "Fix (yet another) Tk closure problem"
+ From: Chip Salzenberg
+ Files: op.c perl.c pp_ctl.c
+
+ Title: "Fix value of C<foreach>"
+ From: Chip Salzenberg
+ Files: cop.h pp_ctl.c
+
+ Title: "Regexp optimizations"
+ From: Ilya Zakharevich
+ Msg-ID: <199702041102.GAA24805@monk.mps.ohio-state.edu>
+ Date: Tue, 4 Feb 1997 06:02:10 -0500 (EST)
+ Files: regcomp.c regexec.c
+
+ Title: "Re: static buffer in not_a_number() [sv.c] might overflow"
+ From: Gisle Aas
+ Msg-ID: <hbu9uz1si.fsf@bergen.sn.no>
+ Date: 09 Feb 1997 11:55:41 +0100
+ Files: sv.c
+
+ Title: "Refine 'runaway string' heuristic"
+ From: Chip Salzenberg
+ Files: toke.c
+
+ Title: "Fix core dump on C<print "a", last> in eval"
+ From: Chip Salzenberg
+ Files: pp_ctl.c
+
+ Title: "Catch C<use integer; $x % 0>"
+ From: Chip Salzenberg
+ Files: pp.c
+
+ BUILD PROCESS
+
+ Title: "Fix usage message in configure.gnu"
+ From: Jarkko Hietaniemi
+ Files: configure.gnu
+
+ LIBRARY AND EXTENSIONS
+
+ Title: "DB_File 1.11 patch"
+ From: Paul Marquess
+ Msg-ID: <9702061553.AA18147@claudius.bfsec.bt.co.uk>
+ Date: Thu, 6 Feb 97 15:53:34 GMT
+ Files: ext/DB_File/DB_File.pm ext/DB_File/DB_File.xs
+
+ Title: "Faster File::Compare"
+ From: Gisle Aas
+ Msg-ID: <199702051342.OAA02753@bergen.sn.no>
+ Date: Wed, 5 Feb 1997 14:42:49 +0100
+ Files: lib/File/Compare.pm
+
+ Title: "Make diagnostics module strip formatting directives"
+ From: Chip Salzenberg
+ Files: lib/diagnostics.pm pod/perldiag.pod
+
+ Title: "Fix warning from missing POSIX::setvbuf()"
+ From: Chip Salzenberg
+ Files: ext/IO/IO.xs
+
+ TESTS
+
+ Title: "Fix closure.t for AmigaOS (again)"
+ From: Norbert Pueschel
+ Msg-ID: <77724742@Armageddon.meb.uni-bonn.de>
+ Date: Wed, 05 Feb 1997 18:56:45 +0100
+ Files: t/op/closure.t
+
+ UTILITIES
+
+ Title: "perldoc -f <perlfunc>"
+ From: Gisle Aas
+ Msg-ID: <199702051127.MAA02090@bergen.sn.no>
+ Date: Wed, 5 Feb 1997 12:27:36 +0100
+ Files: utils/perldoc.PL
+
+ Title: "Fix pod2man's handling of quotes in =items"
+ From: Jarkko Hietaniemi
+ Msg-ID: <199702042023.WAA13143@alpha.hut.fi>
+ Date: Tue, 4 Feb 1997 22:23:34 +0200 (EET)
+ Files: pod/pod2man.PL
+
+ DOCUMENTATION
+
+ Title: "return *FH pod patch"
+ From: allen@gateway.grumman.com (John L. Allen)
+ Msg-ID: <9702061507.AA04474@gateway.grumman.com>
+ Date: Thu, 6 Feb 1997 10:07:28 -0500
+ Files: pod/perldata.pod pod/perlsub.pod
+
+ Title: "Describe interation of untie and DESTROY"
+ From: Paul Marquess and Chip Salzenberg
+ Files: pod/perltie.pod
+
+
+----------------
+Version 5.003_25
+----------------
+
+This release is beta candidate #3. Here's hoping...
+
+ CORE LANGUAGE CHANGES
+
+ Title: "Make $] read-only"
+ From: Chip Salzenberg
+ Files: gv.c
+
+ Title: "New variable C<$^S> is a native version of C<$?>"
+ From: Chip Salzenberg
+ Files: doio.c global.sym gv.c interp.sym lib/English.pm mg.c perl.c
+ perl.h pod/perldelta.pod pod/perlfunc.pod pod/perlvar.pod
+ pp_ctl.c pp_sys.c proto.h util.c
+
+ Title: "Make $^T work with undump, and don't taint it"
+ From: Chip Salzenberg
+ Files: perl.c
+
+ CORE PORTABILITY
+
+ Title: "VMS patches for _24"
+ From: Charles Bailey
+ Msg-ID: <01IEUIFP5038004GQP@hmivax.humgen.upenn.edu>
+ Date: Fri, 31 Jan 1997 02:34:37 -0500 (EST)
+ Files: ext/DynaLoader/DynaLoader.pm ext/DynaLoader/dl_vms.xs
+ lib/AutoSplit.pm lib/ExtUtils/MM_VMS.pm
+ lib/ExtUtils/MakeMaker.pm perl.h pp_hot.c t/lib/filehand.t
+ t/op/closure.t vms/Makefile vms/config.vms vms/descrip.mms
+ vms/ext/filespec.t vms/vms.c vms/vmsish.h
+
+ Title: "hints/dec_osf.sh: polishing the comments"
+ From: Jarkko Hietaniemi
+ Msg-ID: <199701301958.VAA08992@alpha.hut.fi>
+ Date: Thu, 30 Jan 1997 21:58:10 +0200 (EET)
+ Files: hints/dec_osf.sh
+
+ Title: "amigaos.sh"
+ From: Norbert Pueschel
+ Msg-ID: <77724724@Armageddon.meb.uni-bonn.de>
+ Date: Wed, 29 Jan 1997 11:39:49 +0100
+ Files: hints/amigaos.sh
+
+ OTHER CORE CHANGES
+
+ Title: "Require '-T' in argv[], not just on #! line"
+ From: Chip Salzenberg
+ Files: perl.c pod/perldiag.pod
+
+ Title: "Fix C<return @_> and associated stack bugs"
+ From: Chip Salzenberg
+ Files: cop.h pp_ctl.c pp_hot.c t/op/misc.t
+
+ Title: "Fix never-closing handle after C<select>"
+ From: Chip Salzenberg
+ Files: pp_sys.c
+
+ Title: "Fix /\G/g with patterns that match empty string"
+ From: Ilya Zakharevich
+ Files: pp_hot.c
+
+ Title: "Fix scalar leak in av_unshift"
+ From: Chip Salzenberg
+ Files: av.c
+
+ Title: "Ignore refs to lexicals when making refs to lexicals"
+ From: Chip Salzenberg
+ Files: op.c
+
+ Title: "Don't create AV, HV, IO when assigning glob"
+ From: Chip Salzenberg
+ Files: mg.c
+
+ BUILD PROCESS
+
+ Title: "Configure updates for intsize and ssizetype"
+ From: Andy Dougherty
+ Files: Configure MANIFEST config_H config_h.SH handy.h
+
+ Title: "Ask about /usr/bin/perl iff STDIN and STDERR are terminals"
+ From: Chip Salzenberg
+ Files: installperl
+
+ LIBRARY AND EXTENSIONS
+
+ Title: "Refresh CPAN to 1.19"
+ From: Andreas Koenig
+ Files: lib/Bundle/CPAN.pm lib/CPAN.pm lib/CPAN/FirstTime.pm
+
+ Title: "Debugger update"
+ From: Ilya Zakharevich
+ Msg-ID: <199702030406.XAA23029@monk.mps.ohio-state.edu>
+ Date: Sun, 2 Feb 1997 23:06:34 -0500 (EST)
+ Files: lib/perl5db.pl
+
+ Title: "In Symbol::gensym, don't make glob fake by copying it"
+ From: John Hughes <john@AtlanTech.COM>
+ Files: lib/Symbol.pm
+
+ Title: "Make POSIX::is*() eight-bit-clean"
+ From: Chip Salzenberg
+ Files: ext/POSIX/POSIX.xs
+
+ Title: "Make IO::Handle::gets() an alias of getline"
+ From: Gisle Aas
+ Msg-ID: <199701301103.MAA11291@bergen.sn.no>
+ Date: Thu, 30 Jan 1997 12:03:15 +0100
+ Files: ext/IO/lib/IO/Handle.pm lib/IO/Handle.pm
+
+ TESTS
+
+ Title: "More Amiga test patches"
+ From: Norbert Pueschel
+ Msg-ID: <77724725@Armageddon.meb.uni-bonn.de>
+ Date: Wed, 29 Jan 1997 16:07:33 +0100
+ Files: README.amiga t/lib/safe2.t t/op/closure.t
+
+ UTILITIES
+
+ Title: "c2ph.PL fix"
+ From: lvirden@cas.org (Larry W. Virden)
+ Msg-ID: <199701301349.IAA16724@cas.org>
+ Date: Thu, 30 Jan 1997 08:49:19 -0500
+ Files: utils/c2ph.PL
+
+ Title: "Make pod2man a little laxer for perltoc.pod"
+ From: Chip Salzenberg
+ Files: pod/pod2man.PL
+
+ DOCUMENTATION
+
+ Title: "Update to perl INSTALL file"
+ From: lvirden@cas.org (Larry W. Virden)
+ Msg-ID: <199701301338.IAA15878@cas.org>
+ Date: Thu, 30 Jan 1997 08:38:23 -0500
+ Files: INSTALL
+
+ Title: "Update to perl.pod suggested"
+ From: lvirden@cas.org (Larry W. Virden)
+ Msg-ID: <199701301345.IAA16514@cas.org>
+ Date: Thu, 30 Jan 1997 08:45:59 -0500
+ Files: pod/perl.pod
+
+ Title: "Document how extension pms go in $archlib"
+ From: Chip Salzenberg
+ Files: pod/perldelta.pod
+
+ Title: "perlfunc.pod tweaks"
+ From: Roderick Schertler
+ Msg-ID: <20526.854659255@eeyore.ibcinc.com>
+ Date: Thu, 30 Jan 1997 16:20:55 -0500
+ Files: pod/perlfunc.pod
+
+ Title: "new (Feb 1) perlembed.pod"
+ From: Jon Orwant <orwant@media.mit.edu>
+ Msg-ID: <9702012334.AA15747@fahrenheit-451.media.mit.edu>
+ Date: Sat, 1 Feb 1997 18:34:59 -0500
+ Files: pod/perlembed.pod
+
+ Title: "Error lines must not have trialing periods"
+ From: Chip Salzenberg
+ Files: pod/perldiag.pod
+
+
+----------------
+Version 5.003_24
+----------------
+
+This release is the second candidate for a public beta test.
+It's, well, bunches better than _23.
+
+ CORE LANGUAGE CHANGES
+
+ Title: "glob defaults to $_"
+ From: Gurusamy Sarathy
+ Msg-ID: <199701270809.DAA00934@aatma.engin.umich.edu>
+ Date: Mon, 27 Jan 1997 03:09:13 -0500
+ Files: op.c opcode.pl pod/perlfunc.pod t/op/glob.t
+
+ Title: "Re: an overloading bug "
+ From: Gurusamy Sarathy
+ Msg-ID: <199701270007.TAA26525@aatma.engin.umich.edu>
+ Date: Sun, 26 Jan 1997 19:07:45 -0500
+ Files: pod/perldiag.pod pod/perlfunc.pod pp_ctl.c
+
+ Title: "Don't warn on C<$\ = undef>"
+ From: Chip Salzenberg
+ Files: mg.c
+
+ CORE PORTABILITY
+
+ Title: "Win32 port"
+ From: Gary Ng <71564.1743@compuserve.com>
+ Files: MANIFEST win32/*
+
+ Title: "Amiga files"
+ From: Norbert Pueschel
+ Msg-ID: <77724712@Armageddon.meb.uni-bonn.de>
+ Date: Sun, 26 Jan 1997 17:42:15 +0100
+ Files: MANIFEST README.amiga hints/amigaos.sh
+
+ Title: "New dec_osf hints"
+ From: Jarkko.Hietaniemi@cc.hut.fi
+ Msg-ID: <199701271233.OAA21548@alpha.hut.fi>
+ Date: Mon, 27 Jan 1997 14:33:01 +0200 (EET)
+ Files: hints/dec_osf.sh
+
+ OTHER CORE CHANGES
+
+ Title: "Prevent premature death of @_ during leavesub"
+ From: Chip Salzenberg
+ Files: pp_hot.c t/op/misc.t
+
+ Title: "Deref old stash when re-blessing"
+ From: Chip Salzenberg
+ Files: sv.c
+
+ Title: "Don't abort when RCHECK and DEBUGGING"
+ From: Tim Bunce
+ Msg-ID: <9701272339.AA16537@toad.ig.co.uk>
+ Date: Mon, 27 Jan 1997 23:39:48 +0000
+ Files: malloc.c
+
+ Title: "Fix overloading macro conflict with Digital 'cc -fast'"
+ From: Jarkko Hietaniemi
+ Msg-ID: <199701272216.AAA04557@alpha.hut.fi>
+ Date: Tue, 28 Jan 1997 00:16:49 +0200 (EET)
+ Files: perl.h
+
+ Title: "global.sym: typo?"
+ From: Jarkko Hietaniemi
+ Msg-ID: <199701261937.VAA07556@alpha.hut.fi>
+ Date: Sun, 26 Jan 1997 21:37:59 +0200 (EET)
+ Files: global.sym
+
+ BUILD PROCESS
+
+ Title: "Put all extensions' modules in $archlib"
+ From: Chip Salzenberg
+ Files: installperl
+
+ Title: "Configure fixes: set $archlib, omit _NO_PROTO"
+ From: Chip Salzenberg
+ Files: Configure
+
+ Title: "Make configure{,.gnu} ignore --cache-file option"
+ From: Norbert Pueschel
+ Files: configure configure.gnu
+
+ LIBRARY AND EXTENSIONS
+
+ Title: "Version checking in XS bootstrap is optional"
+ From: Chip Salzenberg
+ Files: XSUB.h
+
+ Title: "Update $VERSION of DynaLoader and POSIX"
+ From: Chip Salzenberg
+ Files: ext/DynaLoader/DynaLoader.pm ext/POSIX/POSIX.pm
+
+ Title: "Refresh Text::Wrap to 97.011701"
+ From: Chip Salzenberg
+ Files: lib/Text/Wrap.pm
+
+ Title: "Fcntl.xs: F_[GS]ETOWN were in wrong case branch"
+ From: Jarkko Hietaniemi
+ Msg-ID: <199701251510.RAA05142@alpha.hut.fi>
+ Date: Sat, 25 Jan 1997 17:10:20 +0200 (EET)
+ Files: ext/Fcntl/Fcntl.pm ext/Fcntl/Fcntl.xs
+
+ Title: "Fix $Is_VMS typo in Test::Harness"
+ From: Chip Salzenberg
+ Files: lib/Test/Harness.pm
+
+ Title: "Allow for really big keys in Tie::SubstrHash"
+ From: data-drift@so.uio.no
+ Msg-ID: <199701282014.VAA12645@selters.uio.no>
+ Date: Tue, 28 Jan 1997 21:14:34 +0100 (MET)
+ Files: lib/Tie/SubstrHash.pm
+
+ Title: "Avoid newRV_noinc() in IO, for compiling with old Perls"
+ From: Chip Salzenberg
+ Files: ext/IO/IO.xs
+
+ TESTS
+
+ Title: "New test op/closure.t"
+ From: Tom Phoenix, Ulrich Pfeifer
+ Files: MANIFEST t/op/closure.t
+
+ UTILITIES
+
+ Title: "xsubpp handing of void funcs breaks extensions using XST_m*()"
+ From: Tim Bunce
+ Msg-ID: <9701271659.AA15137@toad.ig.co.uk>
+ Date: Mon, 27 Jan 1997 16:59:06 +0000
+ Files: lib/ExtUtils/xsubpp
+
+ DOCUMENTATION
+
+ Title: "perldelta Fcntl enhancement"
+ From: Jarkko Hietaniemi
+ Msg-ID: <199701251505.RAA22159@alpha.hut.fi>
+ Date: Sat, 25 Jan 1997 17:05:34 +0200 (EET)
+ Files: pod/perldelta.pod
+
+ Title: "Updates to perldelta re: Fcntl, DB_File, Net::Ping"
+ From: Paul Marquess
+ Files: pod/perldelta.pod
+
+ Title: "Document restrictions on gv_fetchmethod() and perl_call_sv()"
+ From: Chip Salzenberg
+ Files: pod/perldelta.pod pod/perlguts.pod
+
+ Title: "perldiag.pod: No comma allowed after %s"
+ From: Jarkko.Hietaniemi@cc.hut.fi
+ Msg-ID: <199701251541.RAA04120@alpha.hut.fi>
+ Date: Sat, 25 Jan 1997 17:41:53 +0200 (EET)
+ Files: pod/perldiag.pod
+
+ Title: "perlfunc.pod: localtime"
+ From: Jarkko Hietaniemi
+ Msg-ID: <199701251629.SAA08114@alpha.hut.fi>
+ Date: Sat, 25 Jan 1997 18:29:37 +0200 (EET)
+ Files: pod/perlfunc.pod
+
+ Title: "perlfunc diff: gmtime"
+ From: Peter Haworth <pmh@edison.ioppublishing.com>
+ Msg-ID: <32EE1298.7B90@edison.ioppublishing.com>
+ Date: Tue, 28 Jan 1997 14:52:08 +0000
+ Files: pod/perlfunc.pod
+
+ Title: "Updates to guts"
+ From: Ilya Zakharevich
+ Msg-ID: <199701270034.TAA13177@monk.mps.ohio-state.edu>
+ Date: Sun, 26 Jan 1997 19:34:18 -0500 (EST)
+ Files: pod/perlguts.pod
+
+ Title: "perltoot fixes"
+ From: Tom Christiansen
+ Msg-ID: <6807.854214205@jinete>
+ Date: Sat, 25 Jan 1997 09:43:25 -0800
+ Files: pod/perltoot.pod
+
+ Title: "5.003_23: small typo in perlsyn.pod"
+ From: Gurusamy Sarathy
+ Msg-ID: <199701270824.DAA01169@aatma.engin.umich.edu>
+ Date: Mon, 27 Jan 1997 03:24:25 -0500
+ Files: pod/perlsyn.pod
+
+
+----------------
+Version 5.003_23
+----------------
+
+This release is our first candidate for a public beta test.
+
+ CORE LANGUAGE CHANGES
+
+ Title: "Disallow changing $_[0] in __DIE__ handlers"
+ From: Chip Salzenberg
+ Files: pod/perlfunc.pod util.c
+
+ Title: "Fix overloading with inheritance and AUTOLOAD"
+ From: Ilya Zakharevich
+ Msg-ID: <199701202226.RAA05072@monk.mps.ohio-state.edu>
+ Date: Mon, 20 Jan 1997 17:26:32 -0500 (EST)
+ Files: gv.c lib/diagnostics.pm lib/overload.pm pod/perldebug.pod
+ pod/perldiag.pod pod/perlfunc.pod pod/perlop.pod
+ pod/perlre.pod pod/perltoc.pod pod/perlxs.pod
+
+ Title: "Nested here-docs"
+ From: larry@wall.org (Larry Wall)
+ Msg-ID: <199701202313.PAA11693@wall.org>
+ Date: Mon, 20 Jan 1997 15:13:42 -0800
+ Files: toke.c
+
+ Title: "Revert $^X to old behavior (plus HP-UX bug fix)"
+ From: Chip Salzenberg
+ Files: hints/hpux.sh toke.c
+
+ Title: "Protect against '0' in 'stmt while <HANDLE>'"
+ From: Chip Salzenberg
+ Files: op.c
+
+ Title: "Don't warn when closure uses var at file scope"
+ From: Chip Salzenberg
+ Files: op.c
+
+ CORE PORTABILITY
+
+ Title: "VMS patches for _22"
+ From: Charles Bailey
+ Msg-ID: <01IEGBJ2TMYS003PCL@hmivax.humgen.upenn.edu>
+ Date: Mon, 20 Jan 1997 22:50:21 -0500 (EST)
+ Files: ext/POSIX/POSIX.xs lib/ExtUtils/MM_VMS.pm lib/ExtUtils/xsubpp
+ lib/Test/Harness.pm toke.c vms/Makefile vms/descrip.mms
+ vms/genconfig.pl vms/perly_c.vms vms/vmsish.h x2p/a2p.h
+ vms/Makefile vms/config.vms vms/descrip.mms vms/perly_c.vms
+
+ Title: "Re: Perl 5.003_21: OS/2 patches"
+ From: Ilya Zakharevich
+ Msg-ID: <199701170446.XAA28939@monk.mps.ohio-state.edu>
+ Date: Thu, 16 Jan 1997 23:46:40 -0500 (EST)
+ Files: os2/Changes os2/os2.c
+
+ Title: "Plan9 update"
+ From: lutherh@stratcom.com (Luther Huffman)
+ Files: plan9/config.plan9 plan9/mkfile
+
+ Title: "Bugfixes for AmigaOS"
+ From: Norbert Pueschel
+ Msg-ID: <77724691@Armageddon.meb.uni-bonn.de>
+ Date: Wed, 22 Jan 1997 00:13:54 +0100
+ Files: hints/amigaos.sh lib/File/Basename.pm
+
+ Title: "New dec_osf.sh hints file"
+ From: Achim Bohnet <ach@rosat.mpe-garching.mpg.de>
+ Msg-ID: <9701241058.AA29550@o09.rosat.mpe-garching.mpg.de>
+ Date: Fri, 24 Jan 1997 11:58:24 +0100
+ Files: hints/dec_osf.sh
+
+ Title: "on NeXT: gdbm problem fixed"
+ From: Andreas Koenig
+ Msg-ID: <199701210201.DAA17794@anna.in-berlin.de>
+ Date: Tue, 21 Jan 1997 03:01:32 +0100
+ Files: hints/next_3.sh hints/next_3_0.sh
+
+ Title: "patch for hints/powerux.sh"
+ From: tom@amber.ssd.hcsc.com (Tom Horsley)
+ Msg-ID: <9701181833.AA02602@amber.ssd.hcsc.com>
+ Date: Sat, 18 Jan 97 13:33:26 -0500
+ Files: hints/powerux.sh
+
+ Title: "hints & Configure changes to build perl on DC/OSx"
+ From: Stephen Zander <stephen.zander@interlock.mckesson.com>
+ Msg-ID: <199701170043.QAA25985@wsbip1.mckesson.com>
+ Date: Thu, 16 Jan 1997 16:43:52 -0800
+ Files: Configure MANIFEST hints/dcosx.sh
+
+ Title: "patch for hints/cxux.sh perl5.003_22"
+ From: tom@amber.ssd.hcsc.com (Tom Horsley)
+ Msg-ID: <9701192014.AA05722@amber.ssd.hcsc.com>
+ Date: Sun, 19 Jan 97 15:14:04 -0500
+ Files: hints/cxux.sh
+
+ OTHER CORE CHANGES
+
+ Title: "Make PERL5LIB and -I work like C<use lib>"
+ From: Tim Bunce
+ Msg-ID: <9701231523.AA26613@toad.ig.co.uk>
+ Date: Thu, 23 Jan 1997 15:23:27 +0000
+ Files: lib/lib.pm perl.c
+
+ Title: "Fix /\G.a/"
+ From: Chip Salzenberg
+ Files: regcomp.c regcomp.h regexec.c regexp.h toke.c
+
+ Title: "Extend stack in pp_undef (!)"
+ From: Chip Salzenberg
+ Files: pp.c
+
+ Title: "Allow for sub to be redefined while executing"
+ From: Chip Salzenberg
+ Files: cop.h pp_hot.c t/op/misc.t
+
+ Title: "Eliminate redundant flag CVf_FORMAT"
+ From: Chip Salzenberg
+ Files: cv.h op.c perl.c perly.c perly.y proto.h sv.c toke.c
+
+ Title: "Generate IVs when possible in abs() and int()"
+ From: Chip Salzenberg
+ Files: pp.c
+
+ Title: "Efficiency patchlet for pp_aassign()"
+ From: Ilya Zakharevich
+ Msg-ID: <199701210305.WAA05451@monk.mps.ohio-state.edu>
+ Date: Mon, 20 Jan 1997 22:05:39 -0500 (EST)
+ Files: pp_hot.c
+
+ Title: "When sorting, promote to PVNV only for built-in comparison"
+ From: Chip Salzenberg
+ Files: pp_ctl.c
+
+ Title: "Remove "suidperl security patch" message"
+ From: Chip Salzenberg
+ Files: perl.c
+
+ BUILD PROCESS
+
+ Title: "Make configure.gnu a copy of configure; make configure writea
+ From: Chip Salzenberg
+ Files: MANIFEST configure.gnu
+
+ Title: "Regen Configure with metaconfig: +ARCHNAME, -FILE_filbuf"
+ From: Chip Salzenberg and Charles Bailey
+ Files: Configure config_H config_h.SH hints/lynxos.sh
+ os2/diff.configure os2/os2ish.h plan9/config.plan9 sv.c
+ utils/perlbug.PL vms/config.vms vms/fndvers.com
+
+ Title: "Compile with optimization when testing memory functions"
+ From: Chip Salzenberg
+ Files: Configure
+
+ Title: "Minor patch for Debian installation"
+ From: Chip Salzenberg
+ Files: installperl
+
+ LIBRARY AND EXTENSIONS
+
+ Title: "Debugger update"
+ From: Ilya Zakharevich
+ Msg-ID: <199701190455.XAA02579@monk.mps.ohio-state.edu>
+ Date: Sat, 18 Jan 1997 23:54:59 -0500 (EST)
+ Files: lib/perl5db.pl
+
+ Title: "DynaLoader enhancement: support RTLD_GLOBAL"
+ From: Nick Ing-Simmons
+ Msg-ID: <199701240937.JAA11443@pluto.tiuk.ti.com>
+ Date: Fri, 24 Jan 1997 09:37:18 GMT
+ Files: ext/DynaLoader/DynaLoader.pm ext/DynaLoader/dl_aix.xs
+ ext/DynaLoader/dl_dld.xs ext/DynaLoader/dl_dlopen.xs
+ ext/DynaLoader/dl_hpux.xs ext/DynaLoader/dl_next.xs
+ ext/DynaLoader/dl_vms.xs
+
+ Title: "Fcntl: add more constants"
+ From: Jarkko.Hietaniemi@cc.hut.fi
+ Msg-ID: <199701191811.UAA16346@alpha.hut.fi>
+ Date: Sun, 19 Jan 1997 20:11:22 +0200 (EET)
+ Files: ext/Fcntl/Fcntl.pm ext/Fcntl/Fcntl.xs
+
+ Title: "Refresh IO to 1.15 (plus DESTROY and new_tmpfile fixes)"
+ From: Chip Salzenberg
+ Files: ext/IO/lib/IO/File.pm ext/IO/lib/IO/Handle.pm
+ ext/IO/lib/IO/Pipe.pm ext/IO/lib/IO/Seekable.pm
+ ext/IO/lib/IO/Socket.pm t/lib/io_pipe.t
+
+ Title: "Allow IO.xs to remain at 1.15 while $VERSION is 1.1501"
+ From: Chip Salzenberg
+ Files: XSUB.h ext/IO/Makefile.PL ext/IO/lib/IO/Handle.pm
+
+ Title: "Refresh CPAN to 1.15"
+ From: Andreas Koenig
+ Files: lib/CPAN.pm lib/CPAN/FirstTime.pm
+
+ Title: "Add E* and SA_* constants"
+ From: Roderick Schertler
+ Msg-ID: <23338.853986967@eeyore.ibcinc.com>
+ Date: Wed, 22 Jan 1997 21:36:07 -0500
+ Files: ext/POSIX/POSIX.pm ext/POSIX/POSIX.pod ext/POSIX/POSIX.xs
+
+ TESTS
+
+ Title: "Test nested here-docs"
+ From: hv@crypt.compulink.co.uk (Hugo van der Sanden)
+ Msg-ID: <199701210053.AAA02139@crypt.compulink.co.uk>
+ Date: Tue, 21 Jan 1997 00:53:44 +0000 (GMT)
+ Files: t/base/lex.t
+
+ Title: "Fix tests of $^X and $0 to work with QNX"
+ From: Chip Salzenberg
+ Files: t/lib/io_pipe.t t/lib/open2.t t/lib/open3.t t/op/magic.t
+
+ Title: "Patch tests for systems without fork()"
+ From: Norbert Pueschel
+ Msg-ID: <77724697@Armageddon.meb.uni-bonn.de>
+ Date: Thu, 23 Jan 1997 23:51:28 +0100
+ Files: t/io/pipe.t t/lib/filehand.t t/lib/io_pipe.t t/lib/io_sock.t
+ t/lib/open2.t t/lib/open3.t t/op/fork.t
+
+ Title: "Test patches for OS/2"
+ From: Ilya Zakharevich
+ Msg-ID: <199701170448.XAA28948@monk.mps.ohio-state.edu>
+ Date: Thu, 16 Jan 1997 23:48:18 -0500 (EST)
+ Files: os2/OS2/ExtAttr/t/os2_ea.t os2/OS2/PrfDB/t/os2_prfdb.t
+ os2/OS2/REXX/t/rx_cmprt.t os2/OS2/REXX/t/rx_dllld.t
+ os2/OS2/REXX/t/rx_objcall.t os2/OS2/REXX/t/rx_sql.test
+ os2/OS2/REXX/t/rx_tiesql.test os2/OS2/REXX/t/rx_tievar.t
+ os2/OS2/REXX/t/rx_tieydb.t os2/OS2/REXX/t/rx_varset.t
+ os2/OS2/REXX/t/rx_vrexx.t t/README t/cmd/while.t
+ t/comp/colon.t t/comp/multiline.t t/io/argv.t t/lib/anydbm.t
+ t/lib/gdbm.t t/lib/ndbm.t t/lib/odbm.t t/lib/sdbm.t
+ t/op/cmp.t t/op/magic.t
+
+ UTILITIES
+
+ Title: "Translate \200 to &#200; in pod2html"
+ From: Chip Salzenberg
+ Files: pod/pod2html.PL
+
+ Title: "VMS patches: '.com' extension on scripts"
+ From: Charles Bailey
+ Msg-ID: <01IELNPDLYJM003E7J@hmivax.humgen.upenn.edu>
+ Date: Fri, 24 Jan 1997 18:42:29 -0500 (EST)
+ Files: pod/checkpods.PL pod/pod2html.PL pod/pod2latex.PL
+ pod/pod2man.PL pod/pod2text.PL utils/c2ph.PL utils/h2ph.PL
+ utils/h2xs.PL utils/perlbug.PL utils/perldoc.PL
+ utils/pl2pm.PL utils/splain.PL vms/Makefile vms/descrip.mms
+ x2p/find2perl.PL x2p/s2p.PL
+
+ Title: "Allow MakeMaker 5.34 to use libraries containing '+' in name"
+ From: dennism@cyrix.com (Dennis Marsa)
+ Msg-ID: <9701172027.AA27861@orion.cyrix.com>
+ Date: Fri, 17 Jan 97 14:27:32 CST
+ Files: lib/ExtUtils/Liblist.pm
+
+ DOCUMENTATION
+
+ Title: "First cut at INSTALL edit"
+ From: Chip Salzenberg
+ Files: INSTALL
+
+ Title: "Additional docs for __DIE__ and __WARN__"
+ From: Gurusamy Sarathy
+ Files: pod/perlfunc.pod pod/perlrun.pod pod/perlvar.pod
+
+ Title: "Document #line directive"
+ From: Gurusamy Sarathy
+ Msg-ID: <199701240908.EAA23846@aatma.engin.umich.edu>
+ Date: Fri, 24 Jan 1997 04:08:44 -0500
+ Files: pod/perlsyn.pod pod/perltoc.pod
+
+ Title: "Perlguts version 30"
+ From: Jeff Okamoto
+ Msg-ID: <199701172117.AA116515863@hpcc123.corp.hp.com>
+ Date: Fri, 17 Jan 1997 13:17:43 -0800
+ Files: pod/perlguts.pod
+
+ Title: "delta for perldelta"
+ From: Tom Christiansen
+ Msg-ID: <804.854121463@jinete>
+ Date: Fri, 24 Jan 1997 07:57:43 -0800
+ Files: pod/perlnews.pod pod/perltoc.pod
+
+ Title: "Updates to perldelta"
+ From: Ilya Zakharevich
+ Msg-ID: <199701211610.LAA06227@monk.mps.ohio-state.edu>
+ Date: Mon, 20 Jan 1997 06:48:49 -0500 (EST)
+ Files: pod/perlnews.pod pod/perltoc.pod
+
+ Title: "perlnews.pod diff for the Fcntl"
+ From: Jarkko Hietaniemi
+ Msg-ID: <199701211600.SAA30117@alpha.hut.fi>
+ Date: Tue, 21 Jan 1997 18:00:56 +0200 (EET)
+ Files: pod/perlnews.pod
+
+ Title: "Rename perlnews -> perldelta per Tom's request"
+ From: Chip Salzenberg
+ Files: MANIFEST pod/Makefile pod/buildtoc pod/perl.pod
+ pod/perldelta.pod pod/perltoc.pod pod/roffitall
+
+ Title: "Remove bad advice from perllocale.pod"
+ From: Chip Salzenberg
+ Files: pod/perllocale.pod
+
+
+----------------
+Version 5.003_22
+----------------
+
+This release is primarily made up of bug fixes, the foremost among
+which repairs a showstopper memory corruption bug in formats.
+
+ CORE LANGUAGE CHANGES
+
+ Title: "Fix parsing of C< ${ xyz } >"
+ From: Chip Salzenberg
+ Files: toke.c
+
+ Title: "Don't parse method calls in strings"
+ From: Chip Salzenberg
+ Files: toke.c
+
+ Title: "Fix overly picky carping about leading '{' in regex"
+ From: Chip Salzenberg
+ Files: regcomp.c
+
+ OTHER CORE CHANGES
+
+ Title: "Fix memory corruption from formats"
+ From: Chip Salzenberg
+ Files: op.c perl.c perly.c perly.c.diff perly.y proto.h sv.c toke.c
+
+ BUILD PROCESS
+
+ Title: "Fix '_mopop' typo"
+ From: Chip Salzenberg
+ Files: Makefile.SH
+
+ LIBRARY AND EXTENSIONS
+
+ Title: "Gut IO::Handle::DESTROY"
+ From: Chip Salzenberg
+ Files: ext/IO/lib/IO/Handle.pm
+
+ Title: "RiscOS is case-insensitive"
+ From: Chip Salzenberg
+ Files: lib/File/Basename.pm
+
+ TESTS
+
+ Title: "Fix thinko in db-recno.t"
+ From: Chip Salzenberg
+ Files: t/lib/db-recno.t
+
+ UTILITIES
+
+ Title: "Make perlbug more cautionary and more verbose"
+ From: Kenneth Albanowski and Jarkko Hietaniemi
+ Files: utils/perlbug.PL
+
+ DOCUMENTATION
+
+ Title: "NEW roffitall + INSTALL fix"
+ From: Raphael Manfredi <Raphael_Manfredi@grenoble.hp.com>
+ Msg-ID: <6058.853410121@lyon.grenoble.hp.com>
+ Date: Thu, 16 Jan 97 11:22:01 +0100
+ Files: INSTALL pod/roffitall
+
+ Title: "srand() doc update"
+ From: Roderick Schertler
+ Msg-ID: <24195.853379065@eeyore.ibcinc.com>
+ Date: Wed, 15 Jan 1997 20:44:25 -0500
+ Files: pod/perlfunc.pod
+
+ Title: "documentation of configpm (perl5.003_20)"
+ From: win@in.rhein-main.de (Winfried Koenig)
+ Msg-ID: <m0vkU40-0004WAC@incom.rhein-main.de>
+ Date: Wed, 15 Jan 1997 14:03:27 +0200 (EET)
+ Files: configpm
+
+
+----------------
+Version 5.003_21
+----------------
+
+This release includes several important bug fixes, and a couple of
+minor but valuable language tweaks. Please read on for a list of the
+significant changes:
+
+ CORE LANGUAGE CHANGES
+
+ Title: "Fix overloading via inherited autoloaded functions"
+ From: Ilya Zakharevich
+ Msg-ID: <199701131022.FAA22830@monk.mps.ohio-state.edu>
+ Date: Mon, 13 Jan 1997 05:22:47 -0500 (EST)
+ Files: gv.c lib/overload.pm pod/perldiag.pod t/pragma/overload.t
+
+ Title: "Method call fixes: Don't cache in alias, don't skip undef"
+ From: Chip Salzenberg
+ Files: global.sym gv.c gv.h hv.c op.c pod/perlguts.pod
+ pod/perltoc.pod pp.c pp_ctl.c pp_hot.c proto.h scope.c sv.c
+ t/op/method.t
+
+ Title: "Formats can be closures"
+ From: Chip Salzenberg
+ Files: cv.h op.c perly.c perly.c.diff perly.y pp_sys.c sv.h
+
+ Title: "Quote 'foo' in C<$x{-foo}>"
+ From: Chip Salzenberg
+ Files: toke.c
+
+ Title: "Forbid C< x->{y} > and C< x->[0] > under C<strict refs>"
+ From: Chip Salzenberg
+ Files: op.c pod/perldiag.pod t/pragma/strict-refs
+
+ Title: "Allow <=> to return undef when operands are not ordered"
+ From: Chip Salzenberg and Andreas Koenig
+ Files: MANIFEST pp.c t/op/cmp.t
+
+ Title: "Fail regex that starts with '{'"
+ From: Chip Salzenberg
+ Files: regcomp.c
+
+ CORE PORTABILITY
+
+ Title: "Re: Perl 5.003_20: OS/2 patches"
+ From: Ilya Zakharevich
+ Msg-ID: <199701101102.GAA19051@monk.mps.ohio-state.edu>
+ Date: Fri, 10 Jan 1997 06:02:16 -0500 (EST)
+ Files: hints/os2.sh os2/Changes os2/os2.c os2/os2ish.h pp_sys.c
+
+ Title: "VMS patches for _20"
+ From: Charles Bailey
+ Msg-ID: <01IE7MGK7ULQ003K5M@hmivax.humgen.upenn.edu>
+ Date: Tue, 14 Jan 1997 17:34:43 -0500 (EST)
+ Files: configpm dosish.h os2/os2ish.h plan9/plan9ish.h proto.h
+ t/pragma/strict.t t/pragma/subs.t t/pragma/warning.t toke.c
+ unixish.h vms/Makefile vms/config.vms vms/descrip.mms
+ vms/genconfig.pl vms/perly_c.vms vms/test.com vms/vmsish.h
+ x2p/a2p.h x2p/str.c
+
+ Title: "Irix 6.3 & 6.4 and perl5.003_20"
+ From: John Stoffel <jfs@fluent.com>
+ Msg-ID: <199701132242.RAA14601@jfs.Fluent.COM>
+ Date: Mon, 13 Jan 1997 17:42:50 -0500 (EST)
+ Files: MANIFEST hints/irix_6_3.sh hints/irix_6_4.sh
+
+ Title: "Patch: MachTen hints, Configure"
+ From: Dominic Dunlop <domo@slipper.ip.lu>
+ Msg-ID: <v03010d00af0123a93670@[194.51.248.75]>
+ Date: Tue, 14 Jan 1997 13:43:13 +0100
+ Files: Configure hints/machten.sh
+
+ Title: "Rename aux.sh to aux_3.sh for MS-LOSS"
+ From: Chip Salzenberg
+ Files: MANIFEST hints/aux_3.sh
+
+ OTHER CORE CHANGES
+
+ Title: "Fix C< eval { my $x; eval '$x' } >"
+ From: Chip Salzenberg
+ Files: op.c t/op/misc.t
+
+ Title: "Don't warn if eval '' uses outer func's lexicals"
+ From: Chip Salzenberg
+ Files: op.c
+
+ Title: "Avoid memory wastage in wait(); make pidstatus global"
+ From: Chip Salzenberg
+ Files: global.sym interp.sym perl.c perl.h pp_sys.c
+
+ Title: "Forbid ++ and -- on readonly values"
+ From: "John Q. Linux" <jql@accessone.com>
+ Msg-ID: <Pine.LNX.3.95.970110193330.11249D-100000@jql.accessone.com>
+ Date: Fri, 10 Jan 1997 19:47:16 -0800 (PST)
+ Files: pp.c pp_hot.c
+
+ Title: "Keep array from dying during foreach(@array)"
+ From: Chip Salzenberg
+ Files: cop.h pp_ctl.c
+
+ Title: "Fix C< $a="simple"; split /($a)/o >"
+ From: Chip Salzenberg
+ Files: pp.c t/op/misc.t
+
+ Title: "Fix infinite loop for undef function in @SIG{__WARN__,__DIE__}"
+ From: Chip Salzenberg
+ Files: util.c
+
+ Title: "Fix for anon-lists with tied entries coredump"
+ From: Gurusamy Sarathy
+ Msg-ID: <199701100745.CAA13057@aatma.engin.umich.edu>
+ Date: Fri, 10 Jan 1997 02:45:11 -0500
+ Files: pp.c
+
+ Title: "Don't set SVf_PADBUSY on immortal SVs"
+ From: Chip Salzenberg
+ Files: op.c
+
+ Title: "Patch for Object subroutines"
+ From: Ilya Zakharevich
+ Msg-ID: <199701080156.UAA15366@monk.mps.ohio-state.edu>
+ Date: Tue, 7 Jan 1997 20:56:02 -0500 (EST)
+ Files: cop.h
+
+ Title: "Use an SVt_PVLV to hold stacked OP pointers when debugging"
+ From: Chip Salzenberg
+ Files: pp.c pp_hot.c
+
+ Title: "Undo change that freed large pad vars"
+ From: Chip Salzenberg
+ Files: scope.c
+
+ BUILD PROCESS
+
+ Title: "Make MachTen hints file warn about db-recno failures"
+ From: Dominic Dunlop <domo@slipper.ip.lu>
+ Msg-ID: <v03010d00aef92fba6aca@[194.51.248.78]>
+ Date: Wed, 8 Jan 1997 12:07:18 +0100
+ Files: hints/machten.sh
+
+ Title: "5.003_20, FreeBSD 3.0 and minor patch"
+ From: roberto@eurocontrol.fr (Ollivier Robert)
+ Msg-ID: <Mutt.19970108143747.roberto@caerdonn.eurocontrol.fr>
+ Date: Wed, 8 Jan 1997 14:37:47 +0100
+ Files: Configure
+
+ Title: "Make installperl quieter; only shared libraries need 0555"
+ From: Chip Salzenberg
+ Files: installperl
+
+ TESTS
+
+ Title: "Advice on TEST failure"
+ From: Dominic Dunlop <domo@slipper.ip.lu>
+ Msg-ID: <v03010d01aefbaefcf3bc@[194.51.248.78]>
+ Date: Fri, 10 Jan 1997 10:19:07 +0100
+ Files: t/TEST
+
+ Title: "UNIVERSAL tests"
+ From: Roderick Schertler
+ Files: MANIFEST t/op/universal.t
+
+ Title: "Test deletion of array during foreach"
+ From: Jarkko Hietaniemi
+ Files: t/op/misc.t
+
+ Title: "patch for db-recno.t"
+ From: Paul Marquess
+ Msg-ID: <9701121509.AA11147@claudius.bfsec.bt.co.uk>
+ Date: Sun, 12 Jan 1997 15:09:33 +0000 (GMT)
+ Files: t/lib/db-recno.t
+
+ LIBRARY AND EXTENSIONS
+
+ Title: "Localize info about filesystems being case-forgiving"
+ From: Chip Salzenberg
+ Files: lib/File/Basename.pm pod/checkpods.PL pod/pod2html.PL
+ pod/pod2latex.PL pod/pod2man.PL pod/pod2text.PL
+ utils/c2ph.PL utils/h2ph.PL utils/h2xs.PL utils/perlbug.PL
+ utils/perldoc.PL utils/pl2pm.PL utils/splain.PL
+ x2p/find2perl.PL x2p/s2p.PL
+
+ Title: "Fix for fd leak in IO::File::new_tmpfile"
+ From: Graham Barr and Chip Salzenberg
+ Files: ext/IO/IO.xs ext/IO/lib/IO/Handle.pm
+
+ Title: "Refresh Getopt::Long to 2.6"
+ From: Johan Vromans <jvromans@squirrel.nl>
+ Files: lib/Getopt/Long.pm
+
+ Title: "Refresh DB_File to 1.10"
+ From: Paul Marquess
+ Msg-ID: <9701141247.AA21242@claudius.bfsec.bt.co.uk>
+ Date: Tue, 14 Jan 97 12:47:40 GMT
+ Files: ext/DB_File/DB_File.pm ext/DB_File/DB_File.xs
+
+ Title: "Re: FileCache::cacheout clobbers $_"
+ From: Roderick Schertler
+ Msg-ID: <pz3ewb3189.fsf@eeyore.ibcinc.com>
+ Date: 08 Jan 1997 23:45:58 -0500
+ Files: lib/FileCache.pm lib/cacheout.pl
+
+ Title: "PATCH: AutoSplit"
+ From: Graham Barr
+ Msg-ID: <9603111010.AA29935@tiuk.ti.com>
+ Date: 11 Mar 1996 06:01:58 -0500
+ Files: lib/AutoSplit.pm
+
+ Title: "Re: Uninitialized value in Carp.pm ? "
+ From: Gurusamy Sarathy
+ Msg-ID: <199701141815.NAA07960@aatma.engin.umich.edu>
+ Date: Tue, 14 Jan 1997 13:15:25 -0500
+ Files: lib/Carp.pm
+
+ Title: "Avoid "uninitialized" warnings from POSIX::constant()"
+ From: Chip Salzenberg
+ Files: ext/POSIX/POSIX.pm
+
+ Title: "Eliminate warning from C<use overload>"
+ From: Chip Salzenberg
+ Files: lib/overload.pm
+
+ Title: "low priority patches"
+ From: Paul Marquess
+ Msg-ID: <9701081655.AA27349@claudius.bfsec.bt.co.uk>
+ Date: Wed, 8 Jan 97 16:55:02 GMT
+ Files: lib/Cwd.pm t/comp/redef.t t/lib/db-btree.t
+
+ UTILITIES
+
+ Title: "Re: xsubpp and Tk ==> segfault"
+ From: Ilya Zakharevich
+ Msg-ID: <199701080825.DAA15813@monk.mps.ohio-state.edu>
+ Date: Wed, 8 Jan 1997 03:25:47 -0500 (EST)
+ Files: lib/ExtUtils/xsubpp
+
+ Title: "Re: MakeMaker and 'make uninstall'"
+ From: Andreas Koenig
+ Msg-ID: <199701101243.NAA26400@anna.in-berlin.de>
+ Date: Fri, 10 Jan 1997 13:43:39 +0100
+ Files: lib/ExtUtils/MM_Unix.pm
+
+ Title: "Don't search for pod if path is already valid"
+ From: Wayne Scott <wscott@ichips.intel.com>
+ Msg-ID: <199701082325.PAA04521@pdxlx008.intel.com>
+ Date: Wed, 08 Jan 1997 15:25:19 -0800
+ Files: utils/perldoc.PL
+
+ Title: "Yet another perldoc option"
+ From: Gisle Aas
+ Msg-ID: <199610022200.AAA15334@furubotn.sn.no>
+ Date: Thu, 3 Oct 1996 00:00:35 +0200
+ Files: utils/perldoc.PL
+
+ Title: "Re: perldoc, temp files, async pagers"
+ From: Roderick Schertler
+ Msg-ID: <pzwwtoom8p.fsf@eeyore.ibcinc.com>
+ Date: 07 Jan 1997 22:54:14 -0500
+ Files: utils/perldoc.PL
+
+ DOCUMENTATION
+
+ Title: "Full documentation generation patch"
+ From: Raphael Manfredi <Raphael_Manfredi@grenoble.hp.com>
+ Msg-ID: <15309.853323388@lyon.grenoble.hp.com>
+ Date: Wed, 15 Jan 97 11:16:28 +0100
+ Files: MANIFEST pod/roffitall pod/rofftoc
+
+ Title: "Re: documentation correction (i.e. patch) for perlsyn.pod"
+ From: "M.J.T. Guy"
+ Msg-ID: <E0vilLh-0000M6-00@ursa.cus.cam.ac.uk>
+ Date: Fri, 10 Jan 1997 18:06:37 +0000
+ Files: pod/perlsyn.pod
+
+ Title: "Document use of pos() and /\G/"
+ From: Gurusamy Sarathy
+ Msg-ID: <199701132013.PAA26606@aatma.engin.umich.edu>
+ Date: Mon, 13 Jan 1997 15:13:12 -0500
+ Files: pod/perlfunc.pod pod/perlnews.pod pod/perlop.pod
+ pod/perlre.pod pod/perltoc.pod pod/perltrap.pod
+
+ Title: "Fix example #4 in perlXStut"
+ From: Ilya Zakharevich
+ Msg-ID: <199701050739.CAA11112@monk.mps.ohio-state.edu>
+ Date: Sun, 5 Jan 1997 02:39:45 -0500 (EST)
+ Files: pod/perlxstut.pod
+
+ Title: "Document new closure warnings"
+ From: Chip Salzenberg
+ Files: op.c pod/perldiag.pod
+
+ Title: "Misc. doc patches missing in _20"
+ From: Roderick Schertler
+ Msg-ID: <102.852695733@eeyore.ibcinc.com>
+ Date: Tue, 07 Jan 1997 22:55:33 -0500
+ Files: pod/perlsub.pod pod/perltoc.pod pod/perlvar.pod
+
+
+----------------
+Version 5.003_20
+----------------
+
+The only language change in this release is the recension of support
+for named closures: Now, no subroutine declared "sub foo {}" can be
+a closure. (This is a return to the behavior of 5.003.) In addition,
+there are new warnings triggered by any apparent attempt to use named
+functions as closures.
+
+And, as usual, there are the usual little fixes, documentation
+updates, and expanded tests. This is good stuff. "I love you, man!"
+
+ CORE LANGUAGE CHANGES
+
+ Title: "Rescind named closures"
+ From: Chip Salzenberg
+ Files: Makefile.SH op.c perly.c perly.c.diff perly.y pp_hot.c
+
+ Title: "Fix: empty @_ when calling empty-proto subs without parens"
+ From: Graham Barr
+ Msg-ID: <32CE30F0.7E8425A5@tiuk.ti.com>
+ Date: Sat, 04 Jan 1997 10:29:04 +0000
+ Files: perly.c perly.y
+
+ CORE PORTABILITY
+
+ Title: "Fix $^X on systems that set it to Perl's basename"
+ From: Chip Salzenberg
+ Files: hints/hpux.sh toke.c
+
+ Title: "Configure/perl5/Compartmented Mode Workstation (fwd)"
+ From: Andy Dougherty
+ Msg-ID: <Pine.SOL.3.95.970106131505.1662C-100000@fractal.lafayette.ed
+ Date: Mon, 06 Jan 1997 13:15:38 -0500 (EST)
+ Files: Configure hints/dec_osf.sh
+
+ Title: "Remove obsolete file "dl_os2.xs"."
+ From: Ilya Zakharevich
+ Files: MANIFEST
+
+ OTHER CORE CHANGES
+
+ Title: "Fix C< sub foo (&@); sub bar (&); foo {}, bar {}, bar {} >"
+ From: Chip Salzenberg
+ Files: perly.c perly.c.diff perly.y
+
+ Title: "plug for safe/opcode leaks"
+ From: Doug MacEachern
+ Msg-ID: <199701072220.RAA02117@postman.osf.org>
+ Date: Tue, 07 Jan 1997 17:20:46 -0500
+ Files: op.c
+
+ Title: "Finish OP= warnings: none on ^="
+ From: Chip Salzenberg
+ Files: doop.c pp.c t/op/assignwarn.t
+
+ Title: "Fix Dynaloader failures with DProf"
+ From: Gurusamy Sarathy
+ Msg-ID: <199701061718.MAA26909@aatma.engin.umich.edu>
+ Date: Mon, 06 Jan 1997 12:18:46 -0500
+ Files: pp_hot.c
+
+ BUILD PROCESS
+
+ Title: "Make Configure default to the first domain in /etc/resolv.conf"
+ From: Chip Salzenberg
+ Files: Configure
+
+ Title: "Start all helper scripts with $startsh"
+ From: Chip Salzenberg
+ Files: Configure
+
+ Title: "Support libperl.so under FreeBSD"
+ From: roberto@keltia.freenix.fr (Ollivier Robert)
+ Msg-ID: <Mutt.19970105224149.roberto@keltia.freenix.fr>
+ Date: Sun, 5 Jan 1997 22:41:49 +0100
+ Files: Configure Makefile.SH
+
+ TESTS
+
+ Title: "New test: comp/proto.t"
+ From: Graham Barr
+ Msg-ID: <32D0C21F.3FB28D51@tiuk.ti.com>
+ Date: Mon, 06 Jan 1997 09:13:03 +0000
+ Files: MANIFEST t/comp/proto.t
+
+ Title: "More magic variable tests"
+ From: Roderick Schertler
+ Msg-ID: <7043.852565192@eeyore.ibcinc.com>
+ Date: Mon, 06 Jan 1997 10:39:52 -0500
+ Files: t/harness t/op/magic.t
+
+ LIBRARY AND EXTENSIONS
+
+ Title: "File::Basename::dirname bugs"
+ From: Robin Barker <rmb@cise.npl.co.uk>
+ Msg-ID: <12393.9701071719@tempest.cise.npl.co.uk>
+ Date: Tue, 7 Jan 97 17:19:59 GMT
+ Files: lib/File/Basename.pm t/lib/basename.t
+
+ Title: "sigaction() problems"
+ From: Roderick Schertler
+ Msg-ID: <12808.852583324@eeyore.ibcinc.com>
+ Date: Mon, 06 Jan 1997 15:42:04 -0500
+ Files: ext/POSIX/POSIX.pm ext/POSIX/POSIX.pod
+
+ Title: "Fix importation of FileHandle methods; fix POSIX docs"
+ From: Chip Salzenberg
+ Files: ext/POSIX/POSIX.pm ext/POSIX/POSIX.pod lib/FileHandle.pm
+
+ Title: "Patch: make hints files warn about db-recno failures"
+ From: Dominic Dunlop <domo@slipper.ip.lu>
+ Msg-ID: <v03010d00aef53ac4d18a@[194.51.248.68]>
+ Date: Sun, 5 Jan 1997 12:34:25 +0100
+ Files: MANIFEST hints/aux.sh hints/broken-db.msg hints/freebsd.sh
+
+ UTILITIES
+
+ Title: "pod2html.PL patch (for 5.003-19)"
+ From: Fabien TASSIN <tassin@eerie.fr>
+ Msg-ID: <199701052347.AAA21297@solar5>
+ Date: Mon, 6 Jan 1997 00:47:01 +0100
+ Files: pod/pod2html.PL
+
+ DOCUMENTATION
+
+ Title: "tiny doc patches"
+ From: Roderick Schertler
+ Msg-ID: <23338.852394333@eeyore.ibcinc.com>
+ Date: Sat, 04 Jan 1997 11:12:13 -0500
+ Files: pod/perlapio.pod pod/perlnews.pod pod/perltoc.pod
+
+ Title: "doc patch for defined on perlfunc.pod"
+ From: Roderick Schertler
+ Msg-ID: <pz91686ek1.fsf@eeyore.ibcinc.com>
+ Date: 04 Jan 1997 21:28:30 -0500
+ Files: pod/perlfunc.pod
+
+ Title: "doc patch: perldsc"
+ From: Roderick Schertler
+ Msg-ID: <pzafqo6eo9.fsf@eeyore.ibcinc.com>
+ Date: 04 Jan 1997 21:25:58 -0500
+ Files: pod/perldsc.pod pod/perltoc.pod
+
+ Title: "Re: constant function inlining"
+ From: Roderick Schertler
+ Msg-ID: <pzk9pp1b95.fsf@eeyore.ibcinc.com>
+ Date: 07 Jan 1997 15:27:50 -0500
+ Files: pod/perldiag.pod pod/perlsub.pod
+
+ Title: "scalar caller doc fix"
+ From: Roderick Schertler
+ Msg-ID: <18245.852608060@eeyore.ibcinc.com>
+ Date: Mon, 06 Jan 1997 22:34:20 -0500
+ Files: pod/perlfunc.pod
+
+ Title: "perlpod.pod possible patches"
+ From: lvirden@cas.org (Larry W. Virden, x2487)
+ Msg-ID: <9701070756.AA1185@cas.org>
+ Date: Tue, 7 Jan 1997 07:56:30 -0500
+ Files: pod/perlpod.pod
+
+ Title: "Misc perlfunc updates"
+ From: Tom Christiansen
+ Files: pod/perlfunc.pod pod/perltoc.pod
+
+
+----------------
+Version 5.003_19
+----------------
+
+Lots of internal cleanup in this patch, especially plugged memory
+leaks when embedded Perl interpreters shut down and restart. The
+method cache is now invisible to user code. And there is a new test
+directory, "t/pragma".
+
+IMHO, this is Beta quality code.
+
+Here's a list of the more significant changes...
+
+ CORE LANGUAGE CHANGES
+
+ Title: "Make method cache invisible to user code"
+ From: Chip Salzenberg
+ Files: dump.c gv.c gv.h hv.c op.c perl.c pp_hot.c pp_sys.c sv.c
+ toke.c
+
+ Title: "Never parse "{m,s,y,tr,q{,q,w,x}}:{,:}" as package or label"
+ From: Chip Salzenberg
+ Files: toke.c
+
+ CORE PORTABILITY
+
+ Title: "Fix $^X under HP-UX"
+ From: Chip Salzenberg
+ Files: hints/hpux.sh toke.c
+
+ Title: "New hints/hpux.sh"
+ From: Jeff Okamoto
+ Msg-ID: <199612312309.AA283393772@hpcc123.corp.hp.com>
+ Date: Tue, 31 Dec 1996 15:09:32 -0800
+ Files: hints/hpux.sh
+
+ OTHER CORE CHANGES
+
+ Title: "Fix segv when calling named closures"
+ From: Chip Salzenberg
+ Files: pp_hot.c
+
+ Title: "Finish rationalizing "undef value" warnings"
+ From: Chip Salzenberg
+ Files: doop.c pp.c sv.c t/op/assignwarn.t
+
+ Title: "Arrange for all "_<file" entries to be in %main::"
+ From: Chip Salzenberg
+ Files: gv.c lib/perl5db.pl
+
+ Title: "Introduce CVf_NODEBUG flag"
+ From: Gurusamy Sarathy
+ Msg-ID: <199701012042.PAA25994@aatma.engin.umich.edu>
+ Date: Wed, 01 Jan 1997 15:42:05 -0500
+ Files: cv.h pp_hot.c
+
+ Title: "Reword 'may be "0"' warning per Larry; fix its line number"
+ From: Chip Salzenberg
+ Files: op.c pod/perldiag.pod
+
+ Title: "5.003_18: perl_{con,des}truct fixes"
+ From: Doug MacEachern
+ Msg-ID: <199701032042.PAA06766@postman.osf.org>
+ Date: Fri, 03 Jan 1997 15:42:04 -0500
+ Files: perl.c perl.h pod/perlembed.pod pod/perltoc.pod t/op/sysio.t
+
+ Title: "Fix lost value from READLINE after TIEHANDLE"
+ From: Gurusamy Sarathy
+ Files: pp_hot.c sv.h
+
+ Title: "Free memory of large lexical variables when leaving scope"
+ From: Chip Salzenberg
+ Files: scope.c
+
+ TESTS
+
+ Title: "Create t/pragma directory; populate with new and old"
+ From: Paul Marquess
+ Files: MANIFEST Makefile.SH t/TEST t/comp/use.t t/lib/locale.t
+ t/op/overload.t t/op/use.t t/pragma/locale.t t/pragma/overload.t
+ t/pragma/strict-refs t/pragma/strict-subs t/pragma/strict-vars
+ t/pragma/strict.t t/pragma/subs.t t/pragma/warn-global
+ t/pragma/warning.t
+
+ Title: "New tests: comp/colon.t and op/assignwarn.t"
+ From: Robin Barker <rmb@cise.npl.co.uk>
+ Files: MANIFEST t/comp/colon.t t/op/assignwarn.t
+
+ LIBRARY AND EXTENSIONS
+
+ Title: "Make libs clean under '-w'"
+ From: Jarkko Hietaniemi
+ Files: lib/AutoSplit.pm lib/Devel/SelfStubber.pm lib/Env.pm
+ lib/Math/Complex.pm lib/Pod/Functions.pm lib/Search/Dict.pm
+ lib/SelfLoader.pm lib/Term/Complete.pm lib/chat2.pl
+ lib/complete.pl lib/diagnostics.pm lib/ftp.pl lib/termcap.pl
+ lib/validate.pl
+
+ DOCUMENTATION
+
+ Title: "Perlguts, version 28"
+ From: Jeff Okamoto
+ Msg-ID: <199701032110.AA102535846@hpcc123.corp.hp.com>
+ Date: Fri, 3 Jan 1997 13:10:46 -0800
+ Files: pod/perlguts.pod
+
+ Title: "Re: perldelta, take 3"
+ From: Tim Bunce
+ Msg-ID: <9701031748.AA15335@toad.ig.co.uk>
+ Date: Fri, 3 Jan 1997 17:48:46 +0000
+ Files: pod/perlnews.pod
+
+ Title: "Miscellaneous pod patches"
+ From: Ralf S. Engelschall <rse@engelschall.com>
+ Files: pod/Makefile pod/perldebug.pod pod/perlfunc.pod
+ pod/perlguts.pod
+
+ Title: "expanded flock() docs"
+ From: Roderick Schertler
+ Msg-ID: <4481.852337871@eeyore.ibcinc.com>
+ Date: Fri, 03 Jan 1997 19:31:11 -0500
+ Files: pod/perlfunc.pod
+
+ Title: "Use Text::Wrap in buildtoc; run buildtoc"
+ From: Ulrich Pfeifer
+ Files: pod/buildtoc pod/perltoc.pod
+
+ Title: "Remove obsolete perlovl.pod"
+ From: Chip Salzenberg
+ Files: MANIFEST plan9/mkfile pod/perlovl.pod vms/Makefile
+ vms/descrip.mms
+
+
+----------------
+Version 5.003_18
+----------------
+
+Yet further down the road to 5.004....
+
+ CORE LANGUAGE CHANGES
+
+ Title: "Inherited overloading"
+ From: Ilya Zakharevich
+ Msg-ID: <199612291312.IAA02134@monk.mps.ohio-state.edu>
+ Date: Sun, 29 Dec 1996 08:12:54 -0500 (EST)
+ Files: gv.c lib/overload.pm perl.h sv.c sv.h t/op/overload.t
+
+ Title: "Hide lexicals from C<use>d or C<require>d module (!)"
+ From: Chip Salzenberg
+ Files: pp_ctl.c
+
+ Title: "Closures at file scope must be anonymous"
+ From: Chip Salzenberg
+ Files: op.c
+
+ Title: "Warn on '{if,while} ($x = X)' where X is glob, readdir, or <FH>"
+ From: Chip Salzenberg
+ Files: op.c pod/perldiag.pod
+
+ Title: "Warn on 'undef $x; $x OP 1' where OP is *=, /=, %=, or **="
+ From: Chip Salzenberg
+ Files: pp.c
+
+ CORE PORTABILITY
+
+ Title: "Ultrix setlocale() workaround"
+ From: Chip Salzenberg
+ Files: hints/ultrix_4.sh util.c
+
+ OTHER CORE CHANGES
+
+ Title: "Get rid of 'Leaked scalars'"
+ From: Chip Salzenberg
+ Files: cop.h gv.c op.c
+
+ Title: "Don't forget $c in C<(($a,$b,$c)=(1,2))=(3,4,5)>"
+ From: Chip Salzenberg
+ Files: pp_hot.c
+
+ Title: "Fix core dump on perl_construct()/perl_destruct() loop"
+ From: Chip Salzenberg
+ Files: perl.c
+
+ Title: "Add missing syms to global.sym; update magic doc"
+ From: Chip Salzenberg
+ Files: global.sym pod/perlguts.pod
+
+ TESTS
+
+ Title: "Expanded locale.t and misc.t"
+ From: Jarkko Hietaniemi
+ Files: t/lib/locale.t t/lib/misc.t
+
+ Title: "Expanded my.t"
+ From: Chip Salzenberg
+ Files: t/lib/my.t
+
+ Title: "test harness for C<use x.xxxx>"
+ From: Graham Barr
+ Msg-ID: <32C76882.3F3C7999@tiuk.ti.com>
+ Date: Mon, 30 Dec 1996 07:00:18 +0000
+ Files: MANIFEST t/op/use.t
+
+ Title: "More tests"
+ From: Tom Phoenix
+ Msg-ID: <Pine.GSO.3.95.961229170736.15213M-100000@solaris.teleport.co
+ Date: Sun, 29 Dec 1996 17:46:21 -0800 (PST)
+ Files: t/op/each.t t/op/oct.t t/op/quotemeta.t t/op/rand.t
+
+ LIBRARY AND EXTENSIONS
+
+ Title: "Improving Config.pm"
+ From: Tom Phoenix
+ Msg-ID: <Pine.GSO.3.95.961230091244.13467L-100000@solaris.teleport.co
+ Date: Mon, 30 Dec 1996 09:24:16 -0800 (PST)
+ Files: configpm
+
+ Title: "File::Copy under OS/2"
+ From: Ilya Zakharevich
+ Msg-ID: <199612280347.WAA00293@monk.mps.ohio-state.edu>
+ Date: Fri, 27 Dec 1996 22:47:24 -0500 (EST)
+ Files: lib/File/Copy.pm t/lib/filecopy.t
+
+ DOCUMENTATION
+
+ Title: "Updates to perllocale.pod"
+ From: Dominic Dunlop <domo@slipper.ip.lu>
+ Files: pod/perllocale.pod
+
+ Title: "Locale-related pod patches, take 2"
+ From: Dominic Dunlop <domo@slipper.ip.lu>
+ Msg-ID: <v03007800aeea9e488b36@[194.51.248.77]>
+ Date: Sat, 28 Dec 1996 10:56:41 +0100
+ Files: pod/perl.pod pod/perlform.pod pod/perlfunc.pod pod/perlop.pod
+ pod/perlre.pod pod/perlsec.pod
+
+ Title: "Re: perldiag.pod entry for "Scalar value @%s{%s} ...""
+ From: Roderick Schertler
+ Msg-ID: <2043.852051019@eeyore.ibcinc.com>
+ Date: Tue, 31 Dec 1996 11:50:19 -0500
+ Files: pod/perldiag.pod
+
+
+----------------
+Version 5.003_17
+----------------
+
+The rate of patches is slowing down.... I see 5.004 at the end of the
+tunnel! (Hey, what's that whistle?)
+
+ CORE LANGUAGE CHANGES
+
+ Title: "Support named closures"
+ From: Chip Salzenberg
+ Files: cv.h op.c perl.c pp.c pp_ctl.c pp_hot.c
+
+ CORE PORTABILITY
+
+ Title: "perl5.003_15 and Interactive Unix"
+ From: win@in.rhein-main.de (Winfried Koenig)
+ Msg-ID: <m0vd254-0004oKC@incom.rhein-main.de>
+ Date: Thu, 26 Dec 1996 00:45:45 +0200 (EET)
+ Files: hints/isc.sh pp_sys.c
+
+ Title: "Suggest "usemymalloc='n'" for FreeBSD 2.*"
+ From: rse@engelschall.com (Ralf S. Engelschall)
+ Files: hints/freebsd.sh
+
+ Title: "Minor OS/2 fixes"
+ From: Ilya Zakharevich
+ Msg-ID: <199612252105.QAA11890@monk.mps.ohio-state.edu>
+ Date: Wed, 25 Dec 1996 16:05:42 -0500 (EST)
+ Files: os2/os2ish.h pod/perlxstut.pod
+
+ OTHER CORE CHANGES
+
+ Title: "Fix {,un}tainting of $1 etc. when C<use locale>"
+ From: Chip Salzenberg
+ Files: mg.c sv.c
+
+ Title: "Limit effects of "=pod" to a single file"
+ From: Chip Salzenberg
+ Files: toke.c
+
+ TESTS
+
+ Title: "New tests: op/method.t and op/locale.t"
+ From: Ilya Zakharevich and Jarkko Hietaniemi
+ Files: MANIFEST t/lib/locale.t t/op/method.t
+
+ Title: "Test C< ()=() >"
+ From: Chip Salzenberg
+ Files: t/op/misc.t
+
+ LIBRARY AND EXTENSIONS
+
+ Title: "Refresh MakeMaker to 5.39"
+ From: Andreas Koenig
+ Files: lib/ExtUtils/Install.pm lib/ExtUtils/Liblist.pm
+ lib/ExtUtils/MM_Unix.pm lib/ExtUtils/MakeMaker.pm
+ lib/ExtUtils/Mksymlists.pm
+
+ Title: "Newer debugger"
+ From: Ilya Zakharevich
+ Msg-ID: <199612261954.OAA12999@monk.mps.ohio-state.edu>
+ Date: Thu, 26 Dec 1996 14:54:34 -0500 (EST)
+ Files: lib/perl5db.pl
+
+ DOCUMENTATION
+
+ Title: "Perlguts, version 27"
+ From: Jeff Okamoto
+ Msg-ID: <199612250144.AA059528263@hpcc123.corp.hp.com>
+ Date: Tue, 24 Dec 1996 17:44:23 -0800
+ Files: pod/perlguts.pod
+
+ Title: "perlpod.pod patch for _16"
+ From: Kenneth Albanowski
+ Msg-ID: <Pine.LNX.3.93.961224225906.337B-100000@kjahds.com>
+ Date: Tue, 24 Dec 1996 23:00:10 -0500 (EST)
+ Files: pod/perlpod.pod
+
+ Title: "tiny perllocale.pod diff for _16"
+ From: Jarkko Hietaniemi
+ Msg-ID: <199612261306.PAA21161@alpha.hut.fi>
+ Date: Thu, 26 Dec 1996 15:06:04 +0200 (EET)
+ Files: pod/perllocale.pod
+
+
+----------------
+Version 5.003_16
+----------------
+
+This patch is all bug fixes, library updates, and documentation
+updates. We'll get to 5.004 RSN, I promise. :-)
+
+ CORE LANGUAGE CHANGES
+
+ Title: "Fix closures that are not in subroutines"
+ From: Chip Salzenberg
+ Files: op.c
+
+ CORE PORTABILITY
+
+ Title: "_13: patches for unicos/unicosmk"
+ From: Dean Roehrich
+ Msg-ID: <199612202038.OAA22805@poplar.cray.com>
+ Date: Fri, 20 Dec 1996 14:38:50 -0600
+ Files: Configure MANIFEST hints/unicos.sh hints/unicosmk.sh
+
+ OTHER CORE CHANGES
+
+ Title: "Fix 'foreach(@ARGV) { while (<>) { push @p,$_ } }'"
+ From: Chip Salzenberg
+ Files: cop.h pp_hot.c scope.c
+
+ Title: "Eliminate warnings from C< undef $x; $x OP= "foo" >"
+ From: Chip Salzenberg
+ Files: doop.c pp.c pp.h pp_hot.c
+
+ Title: "Try again to improve method caching"
+ From: Ilya Zakharevich
+ Msg-ID: <199612240113.UAA09487@monk.mps.ohio-state.edu>
+ Date: Mon, 23 Dec 1996 20:13:56 -0500 (EST)
+ Files: gv.c sv.c
+
+ Title: "Be more careful about 'o' magic memory management"
+ From: Chip Salzenberg
+ Files: mg.c sv.c
+
+ Title: "Fix bad pointer refs when localized object loses magic"
+ From: Chip Salzenberg
+ Files: scope.c
+
+ LIBRARY AND EXTENSIONS
+
+ Title: "Refresh CPAN to 1.09"
+ From: Andreas Koenig
+ Files: lib/CPAN.pm
+
+ Title: "Refresh Net::Ping to 2.02"
+ From: Russell Mosemann <mose@ccsn.edu>
+ Files: lib/Net/Ping.pm
+
+ Title: "Refresh IO to 1.14"
+ From: Graham Barr
+ Files: MANIFEST ext/IO/IO.xs ext/IO/README ext/IO/lib/IO/File.pm
+ ext/IO/lib/IO/Handle.pm ext/IO/lib/IO/Pipe.pm
+ ext/IO/lib/IO/Seekable.pm ext/IO/lib/IO/Select.pm
+ ext/IO/lib/IO/Socket.pm t/lib/io_dup.t t/lib/io_pipe.t
+ t/lib/io_sel.t t/lib/io_sock.t t/lib/io_tell.t
+ t/lib/io_udp.t t/lib/io_xs.t
+
+ BUILD PROCESS AND UTILITIES
+
+ Title: "Don't recurse into subdirs twice on 'make realclean'"
+ From: Chip Salzenberg
+ Files: Makefile.SH
+
+ Title: "Use root EXTERN.h when compiling x2p/malloc.c."
+ From: Paul Marquess
+ Files: x2p/Makefile.SH
+
+ Title: "Fix compilation errors when malloc.c used for x2p"
+ From: Robin Barker <rmb@cise.npl.co.uk>
+ Files: malloc.c
+
+ DOCUMENTATION
+
+ Title: "Edit INSTALL to describe new binary compat setup"
+ From: Chip Salzenberg
+ Files: INSTALL
+
+ Title: "Update to perllocale.pod"
+ From: Jarkko Hietaniemi
+ Files: pod/perllocale.pod
+
+
+----------------
+Version 5.003_15
+----------------
+
+As soon as I posted 5.003_14, I found a fatal error in it. :-(
+
+This release is strictly a bug fix -- it removes some function caching
+changes that were supposed to be improvements, but weren't.
+
+
+----------------
+Version 5.003_14
+----------------
+
+We seem to have achieved "release candidate" status.
+
+ CORE LANGUAGE CHANGES
+
+ Title: "Eliminate support for {if,unless,while,until} BLOCK BLOCK"
+ From: Chip Salzenberg
+ Files: perly.c perly.c.diff perly.y toke.c
+
+ Title: "Taint $x after $x =~ s/pat/xyz/ if pat or xyz is tainted by locale"
+ From: Chip Salzenberg
+ Files: cop.h mg.c pp_ctl.c pp_hot.c
+
+ Title: "Complete support for modifying undefined array members in foreach"
+ From: Chip Salzenberg
+ Files: global.sym mg.c perl.h pp.c pp_hot.c proto.h sv.c
+
+ OTHER CORE CHANGES
+
+ Title: "patch for regex bug: (x|x){n}"
+ From: Gurusamy Sarathy
+ Msg-ID: <199612210259.VAA10170@aatma.engin.umich.edu>
+ Date: Fri, 20 Dec 1996 21:59:22 -0500
+ Files: regexec.c
+
+ Title: "Bug in debugger with import manipulations"
+ From: Ilya Zakharevich
+ Msg-ID: <199612231037.FAA08617@monk.mps.ohio-state.edu>
+ Date: Mon, 23 Dec 1996 05:37:48 -0500 (EST)
+ Files: pp_hot.c
+
+ Title: "Import and dynamic methods"
+ From: Ilya Zakharevich
+ Msg-ID: <199612230645.BAA08378@monk.mps.ohio-state.edu>
+ Date: Mon, 23 Dec 1996 01:45:37 -0500 (EST)
+ Files: gv.c hv.c sv.c
+
+ Title: "malloc.c patch"
+ From: Ilya Zakharevich
+ Msg-ID: <199612220748.CAA07164@monk.mps.ohio-state.edu>
+ Date: Sun, 22 Dec 1996 02:48:58 -0500 (EST)
+ Files: malloc.c
+
+ Title: "sv_gets patch"
+ From: Ilya Zakharevich
+ Msg-ID: <199612220824.DAA07235@monk.mps.ohio-state.edu>
+ Date: Sun, 22 Dec 1996 03:24:04 -0500 (EST)
+ Files: pp_hot.c
+
+ Title: "pos $str patch"
+ From: Ilya Zakharevich
+ Msg-ID: <199612220831.DAA07247@monk.mps.ohio-state.edu>
+ Date: Sun, 22 Dec 1996 03:31:21 -0500 (EST)
+ Files: mg.c pp_hot.c t/op/pat.t
+
+ Title: "Prevent warnings when STDCHAR is unsigned"
+ From: Chip Salzenberg
+ Files: perlio.c perlio.h
+
+ PORTABILITY
+
+ Title: "Fix bugs in bincompat3 usage"
+ From: Chip Salzenberg
+ Files: perl.h perl_exp.SH
+
+ Title: "Support shared libperl on SunOS"
+ From: Ulrich Pfeifer
+ Files: Makefile.SH
+
+ Title: "Configure on OS/2"
+ From: Ilya Zakharevich
+ Msg-ID: <199612202325.SAA05505@monk.mps.ohio-state.edu>
+ Date: Fri, 20 Dec 1996 18:25:30 -0500 (EST)
+ Files: Configure
+
+ Title: "Fixes for Interactive Unix"
+ From: win@in.rhein-main.de (Winfried Koenig)
+ Msg-ID: <m0vbeNO-00003WC@incom.rhein-main.de>
+ Date: Sun, 22 Dec 96 05:14 EET
+ Files: hints/isc.sh op.c pp_sys.c universal.c
+
+ Title: "Use "proto" instead of "_" in sdbm.h"
+ From: Chip Salzenberg
+ Files: ext/SDBM_File/sdbm/sdbm.h
+
+ Title: "VMS patches to 5.003_13"
+ From: Charles Bailey
+ Msg-ID: <01IDBYYFYPIS002ASE@hmivax.humgen.upenn.edu>
+ Date: Mon, 23 Dec 1996 01:26:47 -0500 (EST)
+ Files: deb.c ext/POSIX/POSIX.xs gv.c lib/File/Copy.pm mg.c perl.c
+ perl.h proto.h sv.c t/lib/filecopy.t taint.c toke.c util.c
+ vms/Makefile vms/config.vms vms/descrip.mms
+ vms/gen_shrfls.pl vms/genconfig.pl vms/genopt.com
+ vms/perly_c.vms vms/perly_h.vms vms/test.com vms/vms.c
+ vms/vms_yfix.pl
+
+ UTILITIES, LIBRARY, AND EXTENSIONS
+
+ Title: "Remove libnet"
+ From: Chip Salzenberg
+ Files: MANIFEST pod/perlmod.pod
+
+ Title: "Refresh CPAN module to 1.08"
+ From: Chip Salzenberg
+ Files: lib/CPAN.pm lib/CPAN/FirstTime.pm
+
+ Title: "Refresh ExtUtils::Manifest to version 1.28"
+ From: Andreas Koenig
+ Files: lib/ExtUtils/Manifest.pm
+
+ Title: "Update IO->VERSION() to 1.1201 for CPAN's sake"
+ From: Chip Salzenberg
+ Files: ext/IO/lib/IO/Handle.pm lib/IO/Handle.pm
+
+ Title: "Remodel File::Copy."
+ From: Chip Salzenberg
+ Files: lib/File/Copy.pm
+
+ Title: "dumb bug in User::pwent.pm"
+ From: Tom Christiansen
+ Msg-ID: <199612201145.EAA27860@mox.perl.com>
+ Date: Fri, 20 Dec 1996 04:45:37 -0700
+ Files: lib/User/pwent.pm
+
+ DOCUMENTATION
+
+ Title: "Better support for =for"
+ From: Kenneth Albanowski
+ Msg-ID: <Pine.LNX.3.93.961220163747.298T-100000@kjahds.com>
+ Date: Fri, 20 Dec 1996 16:43:35 -0500 (EST)
+ Files: lib/Pod/Text.pm pod/pod2latex.PL pod/pod2man.PL
+
+ Title: "perllocale.pod -- second draft"
+ From: Dominic Dunlop <domo@slipper.ip.lu>
+ Msg-ID: <v03007800aee1923e30a2@[194.51.248.68]>
+ Date: Sat, 21 Dec 1996 15:00:50 +0100
+ Files: pod/perllocale.pod
+
+ Title: "Perlguts, version 26"
+ From: Jeff Okamoto
+ Msg-ID: <199612201943.AA048111018@hpcc123.corp.hp.com>
+ Date: Fri, 20 Dec 1996 11:43:38 -0800
+ Files: pod/perlguts.pod
+
+ Title: "Update pod/Makefile; s/perli18n/perllocale/"
+ From: Chip Salzenberg
+ Files: ext/POSIX/POSIX.pod lib/I18N/Collate.pm pod/Makefile
+ pod/perl.pod pod/perlmod.pod pod/perlnews.pod pod/roffitall
+
+ Title: "obstruct pod2man doc tweaks"
+ From: Roderick Schertler
+ Msg-ID: <3923.851106237@eeyore.ibcinc.com>
+ Date: Fri, 20 Dec 1996 13:23:57 -0500
+ Files: lib/Class/Template.pm lib/Time/tm.pm
+
+
+----------------
+Version 5.003_13
+----------------
+
+The watchword here is "synchronization." There were a couple of
+show-stopper bugs in 5.003_12, so I'm issuing this patch to bring
+everyone up to a common working base.
+
+ CORE LANGUAGE CHANGES
+
+ Title: "Disallow labels named q, qq, qw, qx, s, y, and tr"
+ From: Chip Salzenberg
+ Files: toke.c
+
+ Title: "Make evals' lexicals visible to nested evals"
+ From: Chip Salzenberg
+ Files: pp_ctl.c
+
+ OTHER CORE CHANGES
+
+ Title: "Fix core dump bug with anoncode"
+ From: Chip Salzenberg
+ Files: op.c
+
+ Title: "Allow DESTROY to make refs to dying objects"
+ From: Chip Salzenberg
+ Files: sv.c
+
+ PORTABILITY
+
+ Title: "Add missing backslash in Configure"
+ From: Chip Salzenberg
+ Files: Configure
+
+ UTILITIES, LIBRARY, AND EXTENSIONS
+
+ Title: "Include libnet-1.01 instead of old Net::FTP"
+ From: Graham Barr
+ Files: MANIFEST lib/Net/Cmd.pm lib/Net/Domain.pm
+ lib/Net/DummyInetd.pm lib/Net/FTP.pm lib/Net/NNTP.pm
+ lib/Net/Netrc.pm lib/Net/POP3.pm lib/Net/SMTP.pm
+ lib/Net/SNPP.pm lib/Net/Socket.pm lib/Net/Telnet.pm
+ lib/Net/Time.pm pod/perlmod.pod
+
+ Title: "Use binmode when doing binary FTP"
+ From: Ilya Zakharevich
+ Files: lib/Net/FTP.pm
+
+ Title: "Re: Open3.pm tries to close unopened file handle"
+ From: Roderick Schertler
+ Msg-ID: <pzloavmd9h.fsf@eeyore.ibcinc.com>
+ Date: 18 Dec 1996 22:19:54 -0500
+ Files: MANIFEST lib/IPC/Open2.pm lib/IPC/Open3.pm lib/open2.pl
+ lib/open3.pl pod/perldiag.pod pod/perlfunc.pod t/lib/open2.t
+ t/lib/open3.t
+
+ Title: "Long-standing problem in Socket module"
+ From: Spider Boardman
+ Msg-ID: <199612190418.XAA07291@Orb.Nashua.NH.US>
+ Date: Wed, 18 Dec 1996 23:18:14 -0500
+ Files: Configure Porting/Glossary config_H config_h.SH
+ ext/Socket/Socket.pm ext/Socket/Socket.xs
+
+ Title: "flock() constants"
+ From: Roderick Schertler
+ Msg-ID: <26669.850977437@eeyore.ibcinc.com>
+ Date: Thu, 19 Dec 1996 01:37:17 -0500
+ Files: ext/Fcntl/Fcntl.pm ext/Fcntl/Fcntl.xs pod/perlfunc.pod
+
+ Title: "Re: find2perl . -xdev BROKEN still"
+ From: Roderick Schertler
+ Msg-ID: <pzvi9yig3h.fsf@eeyore.ibcinc.com>
+ Date: 19 Dec 1996 12:44:34 -0500
+ Files: lib/File/Find.pm lib/find.pl lib/finddepth.pl
+
+ DOCUMENTATION
+
+ Title: "small doc tweaks for _12"
+ From: Roderick Schertler
+ Msg-ID: <1826.851011557@eeyore.ibcinc.com>
+ Date: Thu, 19 Dec 1996 11:05:57 -0500
+ Files: lib/UNIVERSAL.pm pod/perldiag.pod pod/perltie.pod
+
+ Title: "Re: missing E<> POD directive in perlpod.pod"
+ From: Roderick Schertler
+ Msg-ID: <pzwwueimak.fsf@eeyore.ibcinc.com>
+ Date: 19 Dec 1996 10:30:43 -0500
+ Files: pod/perlpod.pod pod/pod2html.PL
+
+
+----------------
+Version 5.003_12
+----------------
+
+This patch is huge. A multitude of bug fixes, new modules (especially
+CPAN and Net::FTP), a couple of new Configure variables, updated
+docs... it's a long list. And speaking of lists, here's a list of
+the more significant changes in 5.003_12:
+
+ CORE LANGUAGE CHANGES
+
+ Title: "Support C<delete @hash{@keys}>"
+ From: Chip Salzenberg
+ Files: op.c op.h opcode.pl pod/perldiag.pod pod/perlfunc.pod pp.c
+ t/op/delete.t
+
+ Title: "Autovivify scalars"
+ From: Chip Salzenberg
+ Files: dump.c op.c op.h pp.c pp_hot.c
+
+ Title: "Allow any word, including keyword, as label"
+ From: Chip Salzenberg
+ Files: toke.c
+
+ OTHER CORE CHANGES
+
+ Title: "Allow assignment to empty array values during foreach()"
+ From: Chip Salzenberg
+ Files: cop.h global.sym mg.c op.c perl.h pp_hot.c proto.h sv.c
+
+ Title: "Fix nested closures"
+ From: Chip Salzenberg
+ Files: op.c opcode.pl pp.c pp_ctl.c pp_hot.c
+
+ Title: "Fix core dump on auto-vivification"
+ From: Chip Salzenberg
+ Files: pp_hot.c
+
+ Title: "Fix core dump on C<open $undef_var, "X">"
+ From: Chip Salzenberg
+ Files: pp_sys.c
+
+ Title: "Fix -T/-B on globs and globrefs"
+ From: Chip Salzenberg
+ Files: pp_sys.c
+
+ Title: "Fix memory management of $`, $&, and $'"
+ From: Chip Salzenberg
+ Files: pp_hot.c regexec.c
+
+ Title: "Fix paren matching during backtracking"
+ From: Chip Salzenberg
+ Files: regexec.c
+
+ Title: "Fix memory leak and std{in,out,err} death in perl_{con,de}str
+ From: Chip Salzenberg
+ Files: miniperlmain.c perl.c perl.h sv.c
+
+ Title: "Discard garbage bytes at end of prototype()"
+ From: Chip Salzenberg
+ Files: pp.c
+
+ Title: "Fix local($pack::{foo})"
+ From: Chip Salzenberg
+ Files: global.sym pp.c pp_hot.c proto.h scope.c
+
+ Title: "Fix for AmigaOS - inplace operation"
+ From: Norbert Pueschel
+ Msg-ID: <77724601@Armageddon.meb.uni-bonn.de>
+ Date: Sun, 08 Dec 1996 15:33:00 +0100
+ Files: doio.c
+
+ Title: "Disable warn, die, and parse hooks _before_ global destruction
+ From: Chip Salzenberg
+ Files: perl.c
+
+ Title: "Re: Bug in formline "
+ From: Gurusamy Sarathy
+ Msg-ID: <199612081958.OAA26025@aatma.engin.umich.edu>
+ Date: Sun, 08 Dec 1996 14:58:32 -0500
+ Files: pp_ctl.c
+
+ Title: "Fix C<@a = ($a,$b,$c,$d) = (1,2)>"
+ From: Chip Salzenberg
+ Files: pp_hot.c
+
+ Title: "Fix %ENV assignment when environment starts out empty"
+ From: Chip Salzenberg
+ Files: hv.c
+
+ Title: "Properly support and document newRV{,_inc,_noinc}"
+ From: Chip Salzenberg
+ Files: global.sym pod/perlguts.pod sv.c sv.h
+
+ Title: "Support SvREADONLY on arrays"
+ From: Chip Salzenberg
+ Files: av.c
+
+ Title: "Allow lvalue pos inside recursive function"
+ From: Chip Salzenberg
+ Files: op.c pp.c pp_ctl.c pp_hot.c
+
+ PORTABILITY
+
+ Title: "Eliminate PerlIO warnings when setting cnt to -1"
+ From: Chip Salzenberg
+ Files: perlio.c
+
+ Title: "Make $privlib contents compatible with 5.003"
+ From: Chip Salzenberg
+ Files: INSTALL ext/Opcode/Safe.pm installperl lib/FileHandle.pm
+ lib/Test/Harness.pm
+
+ Title: "Support $bincompat3 config variable; update metaconfig units"
+ From: Chip Salzenberg
+ Files: Configure MANIFEST compat3.sym config_h.SH embed.pl global.sym
+ old_embed.pl old_global.sym old_perl_exp.SH perl_exp.SH
+
+ Title: "Look for gettimeofday() in Configure"
+ From: John Hughes <john@AtlanTech.COM>
+ Msg-ID: <01BBE77A.F6F37F80@malvinas.AtlanTech.COM>
+ Date: Wed, 11 Dec 1996 15:49:57 +0100
+ Files: Configure config_H config_h.SH pp.c
+
+ Title: "Make $startperl a relative path if people want portable scrip
+ From: Chip Salzenberg
+ Files: Configure
+
+ Title: "Homogenize use of "eval exec" hack"
+ From: Chip Salzenberg
+ Files: Porting/Glossary eg/README eg/nih eg/sysvipc/ipcmsg
+ eg/sysvipc/ipcsem eg/sysvipc/ipcshm lib/diagnostics.pm
+ makeaperl.SH pod/checkpods.PL pod/perlrun.pod
+ pod/pod2html.PL pod/pod2latex.PL pod/pod2man.PL
+ pod/pod2text.PL utils/c2ph.PL utils/h2ph.PL utils/h2xs.PL
+ utils/perlbug.PL utils/perldoc.PL utils/pl2pm.PL x2p/a2py.c
+ x2p/find2perl.PL x2p/s2p.PL
+
+ Title: "LynxOS support"
+ From: seibert@Lynx.COM (Greg Seibert)
+ Msg-ID: <m0vYEsY-0000IZC@kzinti.lynx.com>
+ Date: Thu, 12 Dec 1996 09:25:00 PST
+ Files: Configure MANIFEST hints/lynxos.sh t/op/stat.t
+
+ Title: "In Linux hints, set suidsafe=no and dosuid=yes"
+ From: Chip Salzenberg
+ Files: hints/linux.sh
+
+ Title: "5.003_11 on UnixWare 2.1.1 - Only one small UnixWare buglet"
+ From: aburlison@cix.compulink.co.uk (Alan Burlison)
+ Msg-ID: <memo.453720@cix.compulink.co.uk>
+ Date: Wed, 11 Dec 96 18:34 GMT0
+ Files: hints/svr4.sh
+
+ Title: "Re: db-recno.t failures with _11 on Freebsd 2.1-stable"
+ From: Roderick Schertler
+ Msg-ID: <pzohg0r5tr.fsf@eeyore.ibcinc.com>
+ Date: 11 Dec 1996 18:58:56 -0500
+ Files: INSTALL hints/freebsd.sh
+
+ Title: "OS/2 updates from Ilya"
+ From: Ilya Zakharevich
+ Files: README.os2 os2/Changes os2/Makefile.SHs os2/os2.c os2/os2ish.h
+
+ Title: "VMS patches to 5.003_11"
+ From: Charles Bailey
+ Msg-ID: <01ICTR32LCZG001A1D@hmivax.humgen.upenn.edu>
+ Date: Mon, 09 Dec 1996 23:16:10 -0500 (EST)
+ Files: MANIFEST regexec.c t/lib/filehand.t util.c vms/*
+
+ TESTING
+
+ Title: "recurse recurse recurse ..."
+ From: Jarkko Hietaniemi
+ Msg-ID: <199612092144.XAA29025@alpha.hut.fi>
+ Date: Mon, 9 Dec 1996 23:44:27 +0200 (EET)
+ Files: MANIFEST t/op/recurse.t
+
+ UTILITIES, LIBRARY, AND EXTENSIONS
+
+ Title: "Add CPAN and Net::FTP"
+ From: Chip Salzenberg
+ Files: MANIFEST lib/CPAN.pm lib/CPAN/FirstTime.pm lib/CPAN/Nox.pm
+ lib/Net/FTP.pm lib/Net/Netrc.pm lib/Net/Socket.pm
+ pod/perlmod.pod
+
+ Title: "Please update Text::Wrap and Text::Tabs"
+ From: David Muir Sharnoff <muir@idiom.com>
+ Msg-ID: <199612180659.WAA24957@idiom.com>
+ Date: Tue, 17 Dec 1996 22:59:59 -0800 (PST)
+ Files: lib/Text/Tabs.pm lib/Text/Wrap.pm
+
+ Title: "Add File::Compare"
+ From: Nick Ing-Simmons
+ Msg-ID: <199612161844.SAA02152@pluto>
+ Date: Mon, 16 Dec 1996 18:44:59 GMT
+ Files: MANIFEST lib/File/Compare.pm pod/perlmod.pod
+
+ Title: "Add Tie::RefHash"
+ From: Gurusamy Sarathy
+ Msg-ID: <199612152358.SAA28665@aatma.engin.umich.edu>
+ Date: Sun, 15 Dec 1996 18:58:08 -0500
+ Files: MANIFEST lib/Tie/RefHash.pm pod/perlmod.pod
+
+ Title: "Put "splain" in utils."
+ From: Chip Salzenberg
+ Files: Makefile.SH installperl utils/Makefile utils/splain.PL
+
+ Title: "Some h2ph fixes"
+ From: Jeff Okamoto
+ Msg-ID: <199612131934.AA289845652@hpcc123.corp.hp.com>
+ Date: Fri, 13 Dec 1996 11:34:12 -0800
+ Files: utils/h2ph.PL
+
+ Title: "xsubpp patch to add #line"
+ From: Nick Ing-Simmons
+ Msg-ID: <199612162153.VAA03590@ni-s.u-net.com>
+ Date: Mon, 16 Dec 1996 21:53:56 GMT
+ Files: lib/ExtUtils/xsubpp
+
+ Title: "Re: Proposed addition to File::Copy: move"
+ From: Charles Bailey
+ Msg-ID: <01ICZBN0LRC8001A1D@hmivax.humgen.upenn.edu>
+ Date: Sat, 14 Dec 1996 00:27:29 -0500 (EST)
+ Files: lib/File/Copy.pm t/lib/filecopy.t
+
+ Title: "DB_File 1.09 patch"
+ From: Paul Marquess
+ Msg-ID: <9612181037.AA10123@claudius.bfsec.bt.co.uk>
+ Date: Wed, 18 Dec 96 10:37:58 GMT
+ Files: ext/DB_File/DB_File.pm ext/DB_File/DB_File.xs
+
+ Title: "Debugger update"
+ From: Ilya Zakharevich
+ Msg-ID: <199612111038.FAA24363@monk.mps.ohio-state.edu>
+ Date: Wed, 11 Dec 1996 05:38:28 -0500 (EST)
+ Files: lib/perl5db.pl
+
+ DOCUMENTATION
+
+ Title: "Update pods: perldelta -> perlnews, perli18n -> perllocale"
+ From: Tom Christiansen and Dominic Dunlop
+ Files: MANIFEST pod/perl.pod pod/perldelta.pod pod/perli18n.pod
+ pod/perlnews.pod
+
+ Title: "perltoot.pod"
+ From: Tom Christiansen
+ Msg-ID: <199612091444.HAA09947@toy.perl.com>
+ Date: Mon, 09 Dec 1996 07:44:10 -0700
+ Files: MANIFEST pod/perltoot.pod
+
+ Title: "Perlguts, version 25"
+ From: Jeff Okamoto
+ Msg-ID: <199612061940.AA055461228@hpcc123.corp.hp.com>
+ Date: Fri, 6 Dec 96 11:40:27 PST
+ Files: pod/perlguts.pod
+
+ Title: "pod/perlipc.pod patch"
+ From: d-lewart@uiuc.edu (Daniel S. Lewart)
+ Msg-ID: <199612090910.CAA20906@mox.perl.com>
+ Date: Mon, 9 Dec 96 3:10:02 CST
+ Files: pod/perlipc.pod
+
+ Title: "pod patches for English errors"
+ From: Steve Kelem <steve.kelem@xilinx.com>
+ Msg-ID: <24616.850167191@castor>
+ Date: Mon, 09 Dec 1996 13:33:11 -0800
+ Files: pod/*.pod
+
+ Title: "Misc doc updates"
+ From: Tom Christiansen
+ Msg-ID: <199612150156.SAA12506@mox.perl.com>
+ Date: Sat, 14 Dec 1996 18:56:33 -0700
+ Files: pod/*
+
+----------------
+Version 5.003_11
+----------------
+
+This patch is (still) closing in on 5.004. Nothing dramatic, lots of
+value.
+
+ CORE LANGUAGE CHANGES
+
+ Title: "Fix precedence problems with subs as uniops or listops"
+ From: Chip Salzenberg
+ Files: perly.c perly.c.diff perly.h perly.y
+
+ Title: "Don't reset $. on open()"
+ From: Chip Salzenberg
+ Files: pp_sys.c
+
+ Title: "Support *glob{IO} (eventually deprecate *glob{FILEHANDLE})"
+ From: Chip Salzenberg
+ Files: pod/perlref.pod pp_hot.c sv.c
+
+ Title: "Don't let expression context force return context"
+ From: Chip Salzenberg
+ Files: op.c
+
+ Title: "Properly convert "1E2" et al to IV/UV"
+ From: Chip Salzenberg
+ Files: doio.c sv.c
+
+ Title: "Fix modulo operator in UV realm"
+ From: Chip Salzenberg
+ Files: pp.c
+
+ Title: "Fix stat(_) after stat(HANDLE)"
+ From: Chip Salzenberg
+ Files: pp_sys.c
+
+ Title: "Fix: s/// and "$x =~ $y" under 'use locale'"
+ From: Chip Salzenberg
+ Files: op.c toke.c
+
+ OTHER CORE CHANGES
+
+ Title: "Eliminate spurious warning when splicing undefs"
+ From: Chip Salzenberg
+ Files: pp.c sv.h
+
+ Title: "Eliminate spurious warning from "x=" operator"
+ From: Chip Salzenberg
+ Files: op.c
+
+ Title: "Fix line numbers near control structures"
+ From: Chip Salzenberg
+ Files: op.c perly.c perly.c.diff perly.y proto.h
+
+ Title: "Don't let scalar unpack() underflow stack"
+ From: Chip Salzenberg
+ Files: pp.c
+
+ Title: "Fix core dump from precedence bug in "@foo" warning"
+ From: Chip Salzenberg
+ Files: toke.c
+
+ Title: "Move die() to utils.c; add varargs hack to croak()"
+ From: Chip Salzenberg
+ Files: pp_ctl.c util.c
+
+ Title: "Avoid memcmp() for magnitude test if it thinks char is signed"
+ From: Chip Salzenberg
+ Files: Configure config_H config_h.SH doop.c
+ ext/SDBM_File/sdbm/pair.c ext/SDBM_File/sdbm/sdbm.h handy.h
+ hv.c perl.h pp_hot.c proto.h regexec.c sv.c toke.c util.c
+
+ Title: "Less malloc in magic"
+ From: Chip Salzenberg
+ Files: mg.c
+
+ Title: "Re: 5.003_09: PADTMP fix"
+ From: Ilya Zakharevich
+ Msg-ID: <199611281150.GAA06884@monk.mps.ohio-state.edu>
+ Date: Thu, 28 Nov 1996 06:50:58 -0500 (EST)
+ Files: pod/perlguts.pod
+
+ Title: "Fully paramaterize locales; disable all if NO_LOCALE"
+ From: Chip Salzenberg
+ Files: ext/POSIX/POSIX.xs op.c perl.h pp.c pp_sys.c sv.c util.c
+
+ PORTABILITY AND TESTING
+
+ Title: "Bitwise op fix for Alpha"
+ From: Chip Salzenberg
+ Files: pp.c
+
+ Title: "hints/dgux.sh update"
+ From: Roderick Schertler
+ Msg-ID: <24178.849309616@eeyore.ibcinc.com>
+ Date: Fri, 29 Nov 1996 18:20:16 -0500
+ Files: hints/dgux.sh
+
+ Title: "BUG in hints/hpux.sh"
+ From: Jeff McDougal <jmcdo@cris.com>
+ Msg-ID: <32A42C11.7FA2@cris.com>
+ Date: Tue, 03 Dec 1996 08:33:05 -0500
+ Files: hints/hpux.sh
+
+ Title: "VMS patches for 5.003_10"
+ From: Charles Bailey
+ Msg-ID: <01ICMALO8NMS001A1D@hmivax.humgen.upenn.edu>
+ Date: Wed, 04 Dec 1996 16:40:12 -0500 (EST)
+ Files: EXTERN.h INTERN.h old_perl_exp.SH perl.c perl.h perl_exp.SH
+ pp.c pp_ctl.c pp_sys.c proto.h sv.c toke.c util.c
+ utils/perldoc.PL vms/config.vms vms/descrip.mms
+ vms/gen_shrfls.pl vms/genconfig.pl vms/vmsish.h
+
+ Title: "_10+ under OS/2"
+ From: Ilya Zakharevich
+ Msg-ID: <199612011107.GAA10805@monk.mps.ohio-state.edu>
+ Date: Sun, 1 Dec 1996 06:07:19 -0500 (EST)
+ Files: malloc.c os2/diff.configure
+
+ LIBRARY AND EXTENSIONS
+
+ Title: "{in,ob}structive pods"
+ From: Tom Christiansen
+ Msg-ID: <199611301652.JAA24201@toy.perl.com>
+ Date: Sat, 30 Nov 1996 09:52:57 -0700
+ Files: MANIFEST lib/Class/Template.pm lib/File/stat.pm
+ lib/Net/hostent.pm lib/Net/netent.pm lib/Net/protoent.pm
+ lib/Net/servent.pm lib/Time/gmtime.pm lib/Time/localtime.pm
+ lib/Time/tm.pm lib/User/grent.pm lib/User/pwent.pm
+
+ Title: "FileHandle that 'ISA' IO::File"
+ From: Nick Ing-Simmons
+ Msg-ID: <199612021718.RAA04416@pluto>
+ Date: Mon, 2 Dec 1996 17:18:02 GMT
+ Files: MANIFEST lib/FileHandle.pm
+
+ Title: "Make IO::File::import use its parameters"
+ From: Chip Salzenberg
+ Files: ext/IO/lib/IO/File.pm
+
+ Title: "10+ debugger patch"
+ From: Ilya Zakharevich
+ Msg-ID: <199612011137.GAA10864@monk.mps.ohio-state.edu>
+ Date: Sun, 1 Dec 1996 06:37:31 -0500 (EST)
+ Files: lib/perl5db.pl perl.c pod/perldebug.pod
+
+ Title: "Don't call CORE::close in file handle DESTROY method"
+ From: Chip Salzenberg
+ Files: ext/IO/lib/IO/Handle.pm
+
+ Title: "Re: Namespace cleanup: Does SDBM need binary compatibility?"
+ From: Hallvard B Furuseth
+ Msg-ID: <199612031445.PAA19056@bombur2.uio.no>
+ Date: Tue, 3 Dec 1996 15:45:27 +0100 (MET)
+ Files: ext/SDBM_File/sdbm/pair.h ext/SDBM_File/sdbm/sdbm.3
+
+ Title: "DB_File 1.07"
+ From: Paul Marquess
+ Files: ext/DB_File/DB_File.pm ext/DB_File/DB_File.xs t/lib/db-btree.t
+ t/lib/db-recno.t
+
+ Title: "DB_File 1.08"
+ From: Paul Marquess
+ Files: ext/DB_File/DB_File.pm ext/DB_File/DB_File.xs
+
+
+----------------
+Version 5.003_10
+----------------
+
+This patch is closing in on 5.004. It contains lots of small and
+valuable changes, but nothing dramatic.
+
+ CORE LANGUAGE CHANGES
+
+ Title: "Allow &{sub {...}} without warning"
+ From: Chip Salzenberg
+ Files: toke.c
+
+ Title: "Make parens optional on [gs]ethost and [gs]et{pw,gr} functions
+ From: John L. Allen <allen@gateway.grumman.com>
+ Files: toke.c
+
+ Title: "Fix syntax error with "$x [0]" and "$x {y}" and "@x {y}""
+ From: Chip Salzenberg
+ Files: toke.c
+
+ OTHER CORE CHANGES
+
+ Title: "Fix regex matching of chars with high bit set"
+ From: Chip Salzenberg
+ Files: regexec.c
+
+ Title: "Hash key memory corruption fix and naming cleanup"
+ From: Chip Salzenberg
+ Files: hv.c hv.h perl.h
+
+ Title: "Undo broken perf. patch (PADTMP stealing)"
+ From: Chip Salzenberg
+ Files: sv.c
+
+ Title: "Make SV unstudied in sv_gets()"
+ From: Chip Salzenberg
+ Files: sv.c
+
+ Title: "Better support for UVs"
+ From: Paul Marquess
+ Files: global.sym old_global.sym perl.h pp.c pp.h proto.h sv.c sv.h
+
+ Title: "Minor locale cleanups"
+ (Accept "POSIX" locale as standard like "C". Reset locale to
+ 'C' when testing strtod() in t/lib/posix.t.)
+ From: Chip Salzenberg
+ Files: t/lib/posix.t util.c
+
+ Title: "Always taint result of sprintf() on float"
+ From: Chip Salzenberg
+ Files: doop.c
+
+ Title: "Fix spurious warning from bitwise string ops"
+ From: Chip Salzenberg
+ Files: doop.c
+
+ Title: "Eliminate warning on {,sys}read(,$newvar,)"
+ From: Chip Salzenberg
+ Files: doop.c pp_sys.c
+
+ Title: "Don't call fcntl(fileno(rsfp)) if !rsfp"
+ From: Chip Salzenberg
+ Files: perl.c
+
+ Title: "Save message when calling __DIE__ hook"
+ From: Chip Salzenberg
+ Files: pp_ctl.c
+
+ Title: "Namespace cleanup"
+ From: Chip Salzenberg
+ Files: global.sym old_global.sym perl.h
+
+ Title: "Modify perl_exp.SH; create old_perl_exp.SH; document old_*"
+ From: Chip Salzenberg
+ Files: Configure INSTALL MANIFEST old_perl_exp.SH perl_exp.SH
+
+ PORTABILITY
+
+ Title: "Reliable signal patch"
+ From: Kenneth Albanowski
+ Msg-ID: <Pine.LNX.3.93.961126053209.294J-100000@kjahds.com>
+ Date: Tue, 26 Nov 1996 05:40:50 -0500 (EST)
+ Files: global.sym mg.c old_global.sym perl.h pp_sys.c proto.h util.c
+
+ Title: "Emulate missing flock() with either fcntl() or lockf()"
+ From: Chip Salzenberg
+ Files: pp_sys.c
+
+ Title: "3_09: minor patches for OS/2"
+ From: Ilya Zakharevich
+ Msg-ID: <199611270830.DAA04985@monk.mps.ohio-state.edu>
+ Date: Wed, 27 Nov 1996 03:30:05 -0500 (EST)
+ Files: doio.c global.sym malloc.c old_global.sym os2/Makefile.SHs
+ os2/OS2/ExtAttr/Makefile.PL os2/OS2/PrfDB/Makefile.PL
+ os2/OS2/Process/Makefile.PL os2/OS2/REXX/Makefile.PL
+ os2/os2.c os2/os2ish.h perl.h
+
+ Title: "Re: 5.003_09 and QNX"
+ From: nort@bottesini.harvard.edu (Norton Allen)
+ Msg-ID: <9611271836.AA14460@bottesini.harvard.edu>
+ Date: Wed, 27 Nov 96 13:36:06 est
+ Files: Configure MANIFEST README.qnx hints/qnx.sh qnx/ar qnx/cpp
+ t/TEST toke.c util.c x2p/proto.h
+
+ Title: "Re: updated patch on the sysread, syswrite for VMS"
+ From: Charles Bailey
+ Msg-ID: <01ICB648K2XG001A1D@hmivax.humgen.upenn.edu>
+ Date: Tue, 26 Nov 1996 17:28:23 -0500 (EST)
+ Files: t/op/sysio.t
+
+ LIBRARY AND EXTENSIONS
+
+ Title: "Minor patch to debugger"
+ From: Ilya Zakharevich
+ Msg-ID: <199611290533.AAA08053@monk.mps.ohio-state.edu>
+ Date: Fri, 29 Nov 1996 00:33:49 -0500 (EST)
+ Files: lib/perl5db.pl
+
+ Title: "AutoLoader::AUTOLOAD optimization"
+ From: Nick Ing-Simmons
+ Msg-ID: <199611231954.TAA09921@ni-s.u-net.com>
+ Date: Sat, 23 Nov 1996 19:54:52 GMT
+ Files: lib/AutoLoader.pm
+
+ Title: "Diagnostic cleanup"
+ From: Chip Salzenberg
+ Files: lib/diagnostics.pm pod/perldiag.pod
+
+ DOCUMENTATION
+
+ Title: "Improve documentation for sysread() and syswrite()"
+ From: Chip Salzenberg
+ Files: pod/perlfunc.pod
+
+ Title: "Document how to use $SIG{ALRM} and alarm()"
+ From: Roderick Schertler
+ Msg-ID: <5898.849026569@eeyore.ibcinc.com>
+ Date: Tue, 26 Nov 1996 11:42:49 -0500
+ Files: pod/perlfunc.pod
+
+
+----------------
+Version 5.003_09
+----------------
+
+This patch was a compendium of various fixes and enhancements from
+many people, including some serious improvement in lexical variable
+scoping and locale handling.
+
+ CORE LANGUAGE CHANGES
+
+ Title: "Lexical locales"
+ (make effectiveness of locales depend on C<use locale>)
+ From: Chip Salzenberg
+ Files: too many to list
+
+ Title: "Lexical scoping cleanup"
+ (tighten scoping of lexical variables, somewhat on the
+ new constructs and somewhat on the old)
+ From: Chip Salzenberg
+ Files: many... but mostly perly.y and toke.c
+
+ Title: "Re: memory corruption / security bug in sysread,syswrite + pa
+ From: Jarkko Hietaniemi
+ Msg-ID: <199611251946.VAA30459@alpha.hut.fi>
+ Date: Mon, 25 Nov 1996 21:46:31 +0200 (EET)
+ Files: MANIFEST pod/perldiag.pod pod/perlfunc.pod pp_sys.c
+ t/op/sysio.t
+
+ OTHER CORE CHANGES
+
+ Title: "Configure fix for handling DynaLoader"
+ From: Chip Salzenberg
+ Files: Configure
+
+ Title: "Properly prototype safe{malloc,calloc,realloc,free}."
+ From: Chip Salzenberg
+ Files: proto.h
+
+ Title: "UnixWare 2.1 fix for perl5.003_08 - cope with fp->_cnt < -1,
+ From: John Hughes <john@AtlanTech.COM>
+ Msg-ID: <01BBD6EE.E915C860@malvinas.AtlanTech.COM>
+ Date: Wed, 20 Nov 1996 14:27:06 +0100
+ Files: sv.c
+
+ Title: ""static" call to UNIVERSAL::can"
+ From: Nick Ing-Simmons
+ Msg-ID: <199611211547.PAA15878@pluto>
+ Date: Thu, 21 Nov 1996 15:47:46 GMT
+ Files: universal.c
+
+ Title: "die -> croak"
+ From: Gurusamy Sarathy
+ Msg-ID: <199611212111.QAA17070@aatma.engin.umich.edu>
+ Date: Thu, 21 Nov 1996 16:11:21 -0500
+ Files: pp_ctl.c
+
+ Title: "Patch for embed.pl when !EMBED && !MULTIPLICITY"
+ From: Chip Salzenberg
+ Files: embed.pl
+
+ Title: "Add new symbols to old_global.sym, too."
+ From: Chip Salzenberg
+ Files: global.sym old_global.sym
+
+ Title: "Cleanup of {,un}pack('w')."
+ From: Chip Salzenberg
+ Files: pp.c
+
+ Title: "Cleanups from Ilya."
+ From: Chip Salzenberg
+ Files: gv.c malloc.c pod/perlguts.pod pp_ctl.c
+
+ Title: "Fix for unpack('w') on 64-bit systems."
+ From: Chip Salzenberg
+ Files: pp.c
+
+ Title: "Re: LC_NUMERIC support is ready + performance"
+ From: Ilya Zakharevich
+ Msg-ID: <199611260308.WAA02677@monk.mps.ohio-state.edu>
+ Date: Mon, 25 Nov 1996 22:08:27 -0500 (EST)
+ Files: sv.c
+
+ Title: "Hash key sharing improvements from Ilya."
+ From: Chip Salzenberg
+ Files: hv.c hv.h proto.h
+
+ Title: "Mortal stack pre-allocation from Ilya."
+ From: Chip Salzenberg
+ Files: pp.c pp.h pp_ctl.c pp_hot.c pp_sys.c
+
+ PORTABILITY
+
+ Title: "VMS patches post-5.003_08"
+ From: Charles Bailey
+ Msg-ID: <1996Nov22.181631.1603238@hmivax.humgen.upenn.edu>
+ Date: Fri, 22 Nov 1996 18:16:31 -0500 (EST)
+ Files: lib/ExtUtils/MM_Unix.pm lib/ExtUtils/MM_VMS.pm
+ lib/ExtUtils/MakeMaker.pm lib/File/Path.pm mg.c pp_ctl.c
+ utils/h2xs.PL vms/config.vms vms/descrip.mms
+ vms/gen_shrfls.pl vms/genconfig.pl vms/perlvms.pod vms/vms.c
+ vms/vmsish.h
+
+ Title: "5.003_08: OS/2-specific bugs/enhancements"
+ From: Ilya Zakharevich
+ Msg-ID: <199611241147.GAA00490@monk.mps.ohio-state.edu>
+ Date: Sun, 24 Nov 1996 06:47:25 -0500 (EST)
+ Files: README.os2 hints/os2.sh os2/Changes os2/Makefile.SHs
+ os2/OS2/PrfDB/PrfDB.pm os2/os2.c
+
+ Title: "HP patches didn't make it into _08 (fwd)"
+ From: Jeff Okamoto
+ Msg-ID: <199611260215.AA100414526@hpcc123.corp.hp.com>
+ Date: Mon, 25 Nov 96 18:15:26 PST
+ Files: ext/DynaLoader/dl_hpux.xs
+
+ Title: "Another HP "patch" that didn't make it (new hints file)"
+ From: Jeff Okamoto
+ Msg-ID: <199611252116.AA245766577@hpcc123.corp.hp.com>
+ Date: Mon, 25 Nov 1996 13:16:17 -0800
+ Files: hints/hpux.sh
+
+ LIBRARY AND EXTENSIONS
+
+ Title: "Elide spurious space in db-hash.t"
+ From: Chip Salzenberg
+ Files: t/lib/db-hash.t
+
+ Title: "Update documentation and warning in I18N::Collate."
+ From: Chip Salzenberg
+ Files: lib/I18N/Collate.pm
+
+ Title: "Fix bitwise op test; clean up a couple of others"
+ From: Chip Salzenberg
+ Files: t/lib/bigintpm.t t/op/bop.t t/op/overload.t
+
+ Title: "minimal timelocal.pl for _09"
+ From: Achim Bohnet <ach@rosat.mpe-garching.mpg.de>
+ Msg-ID: <9611191854.AA19586@o09.rosat.mpe-garching.mpg.de>
+ Date: Tue, 19 Nov 1996 19:54:23 +0100
+ Files: lib/Time/Local.pm
+
+ Title: "Socket test improvement from Ilya."
+ From: Chip Salzenberg
+ Files: t/lib/io_sock.t
+
+ Title: "Re: blib"
+ From: Nick Ing-Simmons
+ Msg-ID: <199611230917.JAA00471@ni-s.u-net.com>
+ Date: Sat, 23 Nov 1996 09:17:40 GMT
+ Files: lib/blib.pm
+
+ DOCUMENTATION
+
+ Title: "perldiag documentation patch."
+ From: Paul Marquess
+ Msg-ID: <9611201607.AA12729@claudius.bfsec.bt.co.uk>
+ Date: Wed, 20 Nov 96 16:07:28 GMT
+ Files: pod/perldiag.pod
+
+ Title: "a missing perldiag entry"
+ From: Gurusamy Sarathy
+ Msg-ID: <199611212024.PAA15758@aatma.engin.umich.edu>
+ Date: Thu, 21 Nov 1996 15:24:02 -0500
+ Files: pod/perldiag.pod
+
+ Title: "perlfunc patch"
+ From: Paul Marquess
+ Msg-ID: <9611201404.AA12477@claudius.bfsec.bt.co.uk>
+ Date: Wed, 20 Nov 96 14:04:08 GMT
+ Files: pod/perlfunc.pod
+
+ Title: "Patch for pod/perlpod.pod"
+ From: "Joseph S. Myers" <jsm28@cam.ac.uk>
+ Msg-ID: <Pine.LNX.3.95.961120235016.6666A-100000@hammer.chu.cam.ac.uk
+ Date: Wed, 20 Nov 1996 23:54:41 +0000 (GMT)
+ Files: pod/perlpod.pod
+
+ Title: "Update locale documentation."
+ From: Chip Salzenberg
+ Files: pod/perli18n.pod
+
+ BUNDLED UTILITIES
+
+ Title: "Fix type mismatches in x2p's safe{alloc,realloc,free}."
+ From: Chip Salzenberg
+ Files: x2p/util.c
+
+
+----------------
+Version 5.003_08
+----------------
+
+This patch was a compendium of various fixes and enhancements from
+many people. Here are some of the more significant changes.
+
+
+ CORE LANGUAGE CHANGES
+
+ Title: "Make C<no FOO> fail if C<unimport FOO> fails"
+ From: Tim Bunce
+ Files: gv.c
+
+ Title: "Bitwise op sign rationalization"
+ (Make bitwise ops result in unsigned values, unless C<use
+ integer> is in effect. Includes initial support for UVs.)
+ From: Chip Salzenberg
+ Files: op.c opcode.pl pod/perlop.pod pod/perltoc.pod pp.c pp.h
+ pp_hot.c proto.h sv.c t/op/bop.t
+
+ Title: "Defined scoping for C<my> in control structures"
+ (Finally defines semantics of "my" in control expressions,
+ like the condition of "if" and "while". In all cases, scope
+ of a "my" var extends to the end of the entire control
+ structure. Also adds new construct "for my", which
+ automatically declares the control variable "my" and limits
+ its scope to the loop.)
+ From: Chip Salzenberg
+ Files: op.c perly.c perly.c.diff perly.h perly.y proto.h toke.c
+
+ Title: "Fix ++/-- after int conversion (e.g. 'printf "%d"')"
+ (This patch makes Perl correctly ignore SvIVX() if either
+ NOK or POK is true, since SvIVX() may be a truncated or
+ overflowed version of the real value.)
+ From: Chip Salzenberg
+ Files: pp.c pp_hot.c sv.c
+
+ Title: "Make code match Camel II re: functions that use $_"
+ From: Paul Marquess
+ Files: opcode.pl
+
+ Title: "Provide scalar context on left side of "->""
+ From: Chip Salzenberg
+ Files: perly.c perly.y
+
+ Title: "Quote bearword package/handle FOO in "funcname FOO => 'bar'""
+ From: Chip Salzenberg
+ Files: toke.c
+
+
+ OTHER CORE CHANGES
+
+ Title: "Warn on overflow of octal and hex integers"
+ From: Chip Salzenberg
+ Files: proto.h toke.c util.c
+
+ Title: "If -w active, warn for commas and hashes ('#') in qw()"
+ From: Chip Salzenberg
+ Files: toke.c
+
+ Title: "Fixes for pack('w')"
+ From: Ulrich Pfeifer
+ Files: pp.c t/op/pack.t
+
+ Title: "More complete output from sv_dump()"
+ From: Gurusamy Sarathy
+ Files: sv.c
+
+ Title: "Major '..' and debugger patches"
+ From: Ilya Zakharevich
+ Files: lib/perl5db.pl op.c pp_ctl.c scope.c scope.h
+
+ Title: "Fix for formline()"
+ From: Gurusamy Sarathy
+ Files: global.sym mg.c perl.h pod/perldiag.pod pp_ctl.c proto.h sv.c
+ t/op/write.t
+
+ Title: "Fix stack botch in untie and binmode"
+ From: Gurusamy Sarathy
+ Files: pp_sys.c
+
+ Title: "Complete EMBED, including symbols from interp.sym"
+ (New define EMBEDMYMALLOC makes embedding total by
+ avoiding "Mymalloc" etc.)
+ From: Chip Salzenberg
+ Files: MANIFEST embed.pl ext/DynaLoader/dlutils.c
+ ext/SDBM_File/sdbm/sdbm.h global.sym handy.h malloc.c
+ perl.h pp_sys.c proto.h regexec.c toke.c util.c
+ x2p/Makefile.SH x2p/a2p.h x2p/handy.h x2p/util.h
+
+ Title: "Support old embedding for people who want it"
+ From: Chip Salzenberg
+ Files: MANIFEST Makefile.SH old_embed.pl old_global.sym
+
+
+ PORTABILITY
+
+ Title: "Miscellaneous VMS fixes"
+ From: Charles Bailey
+ Files: lib/ExtUtils/Liblist.pm lib/ExtUtils/MM_VMS.pm
+ lib/Math/Complex.pm lib/Time/Local.pm lib/timelocal.pl
+ perl.h perl_exp.SH proto.h t/TEST t/io/read.t
+ t/lib/findbin.t t/lib/getopt.t util.c utils/h2xs.PL
+ vms/Makefile vms/config.vms vms/descrip.mms
+ vms/ext/Stdio/Stdio.pm vms/ext/Stdio/Stdio.xs
+ vms/perlvms.pod vms/test.com vms/vms.c
+
+ Title: "DJGPP patches (MS-DOS)"
+ From: "Douglas E. Wegscheid" <wegscd@whirlpool.com>
+ Files: doio.c dosish.h ext/SDBM_File/sdbm/sdbm.c handy.h
+ lib/AutoSplit.pm lib/Cwd.pm lib/File/Find.pm malloc.c perl.c
+ perl.h pp_sys.c proto.h sv.c util.c
+
+ Title: "Plan 9 update"
+ From: Luther Huffman <lutherh@infinet.com>
+ Files: plan9/buildinfo plan9/config.plan9 plan9/exclude
+ plan9/genconfig.pl plan9/mkfile plan9/setup.rc
+
+ Title: "Patch to make Perl work under AmigaOS"
+ From: Norbert Pueschel
+ Files: MANIFEST hints/amigaos.sh installman lib/File/Basename.pm
+ lib/File/Find.pm pod/pod2man.PL pp_sys.c util.c
+
+ LIBRARY AND EXTENSIONS
+
+ Title: "DB_File 1.05"
+ From: Paul Marquess
+ Files: ext/DB_File/DB_File.pm ext/DB_File/DB_File.xs t/lib/db-hash.t
+
+ Title: "Getopts::Std patch for hash support"
+ From: Stephen Zander <stephen.zander@interlock.mckesson.com>
+ Files: lib/Getopt/Std.pm
+
+ Title: "Kludge for bareword handles"
+ (Add 'require IO::Handle' at beginning of FileHandle.pm)
+ From: Chip Salzenberg
+ Files: ext/FileHandle/FileHandle.pm
+
+ Title: "Re: strtod / strtol patch for POSIX module"
+ From: hammen@gothamcity.jsc.nasa.gov (David Hammen)
+ Files: Configure config_h.SH ext/POSIX/POSIX.pm ext/POSIX/POSIX.pod
+ ext/POSIX/POSIX.xs t/lib/posix.t
+
+ BUNDLED UTILITIES
+
+ Title: "Fix a2p translation of '{print "a" "b" "c"}'"
+ From: Chip Salzenberg
+ Files: x2p/a2p.c x2p/a2p.y
+
+
+----------------
+Version 5.003_07
+----------------
+
+This patch was primarily to fix bugs or include little things I missed
+in 5.003_06. 5.003_07 is intended to be stable enough to merit serious
+testing with an eye towards eventual release as 5.004.
+
+If it doesn't work for you, try
+
+ LC_ALL=C; export LC_ALL
+
+for Bourne shell users, or
+
+ setenv LC_ALL C
+
+for C-shell users. Some versions of IRIX are reported to have
+problems with sort when the locale is other than C. This manifests
+as an infinite loop in the ./miniperl configpm step.
+
+The details are described below. A very brief summary is:
+
+o Visible Changes to Core Functionality
+
+ -Support for BER compressed integers. See perlfunc.pod for
+ documentation on the 'w' option.
+
+ -untaint support added to IO extension.
+
+o Changes in Core Internals
+
+ -Perl's realloc is once again called 'Myremalloc' (with -DHIDEMYMALLOC),
+ as it was pre-5.003_01. Again, this is for binary compatibility
+ with 5.003. (5.003_06 erroneously called it Myrealloc.)
+
+ -Getopt::Long updated to version 2.4.
+
+o Configure and build enhancements
+
+ -improved SCO hints. Actually these are unconfirmed guesses, but
+ they may be right.
+
+ -OS/2 and Plan9 updates.
+
+o Bug fixes
+
+ -print sort (4,1,3,2);
+
+ -group numbers are integers again.
+
+ -other things. See the specific changes for details.
+
+o Specific Changes
+
+Here are the specific file-by-file changes.
+
+Index: Changes
+
+ Updated for 5.003_07.
+
+ Fixed a spelling error.
+
+Index: Configure
+
+ Detect GNU libc (thanks, Skimo!) and avoid nm if we have GNU libc.
+ Since the GNU libc test requires compiling and linking a test
+ program, the dependencies have been altered and lots of pieces of
+ Configure have moved around unchanged. The patch is big but the
+ effect is little.
+
+ Allow for both <sys/select.h> and <time.h> in fd_set tests.
+ Systems which don't allow both (e.g. SCO) have to turn off one
+ or the other in the hints file for now.
+
+Index: INSTALL
+
+ Warn about re-using config.sh version-specific values.
+
+Index: MANIFEST
+
+ Date: Tue, 8 Oct 1996 22:24:48 -0400
+ From: "Randy J. Ray" <rjray@uswest.com>
+ Subject: PATCH: untaint method for IO::Handle, 5.003_06 version
+
+ This is a re-post of my patch to Graham's IO library to add a method in
+ IO::Handle called "untaint", that sets the IOf_UNTAINT flag on an object
+ that is of or inherits from IO::Handle. With this flag set, data read from
+ said handle is not tainted, whether running under -T, suid or sgid.
+
+ This patch adds the method to IO.xs, adds documentation and warning to the
+ pod of IO/Handle.pm, creates a new test in t/lib called io_taint.t, and
+ adds mention of the new file to MANIFEST.
+
+ Add mention of t/lib/io_taint.t
+
+ Date: Wed, 9 Oct 1996 22:29:44 -0400 (EDT)
+ From: Ilya Zakharevich
+
+ os2/Changes added.
+
+Index: Makefile.SH
+
+ Date: Wed, 9 Oct 1996 22:32:22 -0400 (EDT)
+ From: Ilya Zakharevich
+
+ All the executable targets are moved into the same chunk with
+ shared library target, which is delegated to
+ $osname/Makefile.SHs if found.
+ config.h should depend on config_h.SH.
+
+ Remove mkmanifest target, since it will generate incorrectly
+ sorted MANIFEST file, I would imagine (I haven't checked).
+
+Index: README.os2
+
+ New version.
+
+Index: config_H
+
+ Update SH_PATH comment.
+
+Index: config_h.SH
+
+ Update SH_PATH comment.
+
+Index: ext/IO/IO.xs
+
+ Date: Tue, 8 Oct 1996 22:24:48 -0400
+ From: "Randy J. Ray" <rjray@uswest.com>
+ Subject: PATCH: untaint method for IO::Handle, 5.003_06 version
+
+ This is a re-post of my patch to Graham's IO library to add a method in
+ IO::Handle called "untaint", that sets the IOf_UNTAINT flag on an object
+ that is of or inherits from IO::Handle. With this flag set, data read from
+ said handle is not tainted, whether running under -T, suid or sgid.
+
+ This patch adds the method to IO.xs, adds documentation and warning to the
+ pod of IO/Handle.pm, creates a new test in t/lib called io_taint.t, and
+ adds mention of the new file to MANIFEST.
+
+ Add method "untaint" into class IO::Handle
+
+Index: ext/IO/lib/IO/Handle.pm
+
+ Date: Tue, 8 Oct 1996 22:24:48 -0400
+ From: "Randy J. Ray" <rjray@uswest.com>
+ Subject: PATCH: untaint method for IO::Handle, 5.003_06 version
+
+ This is a re-post of my patch to Graham's IO library to add a method in
+ IO::Handle called "untaint", that sets the IOf_UNTAINT flag on an object
+ that is of or inherits from IO::Handle. With this flag set, data read from
+ said handle is not tainted, whether running under -T, suid or sgid.
+
+ This patch adds the method to IO.xs, adds documentation and warning to the
+ pod of IO/Handle.pm, creates a new test in t/lib called io_taint.t, and
+ adds mention of the new file to MANIFEST.
+
+ Document IO::Handle::untaint and give warning about the bad
+ things it can do.
+
+Index: ext/SDBM_File/sdbm/sdbm.h
+
+ Change Myrealloc to Myremalloc to conform to 5.003's version.
+ I left in the Mycalloc since malloc.c now includes a calloc,
+ and we might need to hide it.
+
+Index: gv.c
+
+ Date: Wed, 9 Oct 1996 22:32:22 -0400 (EDT)
+ From: Ilya Zakharevich
+
+ Better error message for overload.
+
+Index: hints/os2.sh
+
+ Date: Wed, 9 Oct 1996 22:29:44 -0400 (EDT)
+ From: Ilya Zakharevich
+
+ Some optimization (speedup in loading GNU utilities with some
+ memory present - 32M should be quite enough).
+ Test for revision of EMX, and setting fork()ing appropriately.
+ libc was in .../st/... instead of mt.
+ README.os2 is installed as pod/perlos2.pod.
+
+Index: hints/sco.sh
+
+ Don't include <sys/select.h> along with <time.h>.
+
+Index: installperl
+
+ Date: Wed, 9 Oct 1996 22:32:22 -0400 (EDT)
+ From: Ilya Zakharevich
+
+ Restore timestamps under OS/2 (needed for binary install).
+
+Index: lib/Cwd.pm
+
+ Date: Wed, 9 Oct 1996 22:32:22 -0400 (EDT)
+ From: Ilya Zakharevich
+
+ Use builtin methods if present under OS/2 (maybe should be
+ done outside of OS/2 too?).
+
+Index: lib/ExtUtils/MM_Unix.pm
+
+ Date: Wed, 9 Oct 1996 22:32:22 -0400 (EDT)
+ From: Ilya Zakharevich
+
+ Made `use strict'-clean even in parts shadowed by Autoloading.
+
+Index: lib/ExtUtils/typemap
+
+ Date: Wed, 9 Oct 1996 22:32:22 -0400 (EDT)
+ From: Ilya Zakharevich
+
+ `bool' entry added.
+
+Index: lib/ExtUtils/xsubpp
+
+ Date: Wed, 9 Oct 1996 22:32:22 -0400 (EDT)
+ From: Ilya Zakharevich
+
+ Logic for processing RETVAL documented (at last!).
+
+Index: lib/File/Copy.pm
+
+ Date: Thu, 10 Oct 1996 00:42:29 -0400 (EDT)
+ From: Ilya Zakharevich
+ Subject: Cleanup after new test
+
+ Below are patches for File::Copy (copying to filehandles was just
+ plain broken under OS/2 and VMS)
+
+Index: lib/FindBin.pm
+
+ Date: Fri, 20 Sep 1996 15:04:04 +0200
+ From: Gisle Aas
+ Subject: Documentation patch to the FindBin module
+
+Index: lib/Getopt/Long.pm
+
+ Update to version 2.4.
+
+Index: lib/lib.pm
+
+ Date: Thu, 10 Oct 1996 14:22:05 -0400
+ From: "Brent B. Powers" <powers@ml.com>
+ Subject: Re: patch for lib.pm
+
+ Ignore undefined entries.
+
+Index: lib/newgetopt.pl
+
+ Updated to version 2.4 to match Getopt::Long.
+
+Index: makedepend.SH
+
+ Date: Wed, 9 Oct 1996 22:32:22 -0400 (EDT)
+ From: Ilya Zakharevich
+
+ weed out perl_exp.SH, config_h.SH
+ (They have these funny names to avoid names like perl.exp.SH
+ with more than two '.' Such names are illegal on some systems.)
+
+Index: mg.c
+
+ Date: Thu, 10 Oct 1996 14:33:08 +0000 ()
+ From: Chip Salzenberg
+ Subject: Re: Group fix for 5.003_06
+
+ The group problems recently experienced are due to a small error
+ introduced in 5.003_06. This patch is required to fix the bug:
+
+Index: os2/Changes
+
+ Date: Wed, 9 Oct 1996 22:29:44 -0400 (EDT)
+ From: Ilya Zakharevich
+
+ sys/un.h is not very useful without Merlin toolkit.
+ updates for fork()ing.
+
+ Date: Wed, 9 Oct 1996 22:29:44 -0400 (EDT)
+ From: Ilya Zakharevich
+
+ added.
+
+Index: os2/Makefile.SHs
+
+ Date: Wed, 9 Oct 1996 22:29:44 -0400 (EDT)
+ From: Ilya Zakharevich
+
+ Convoluted process to create chimera executables added.
+ aout_clean is done automatically on clean.
+
+Index: os2/OS2/ExtAttr/t/os2_ea.t
+
+ Date: Wed, 9 Oct 1996 22:29:44 -0400 (EDT)
+ From: Ilya Zakharevich
+
+ Use `unlink' where appropriate.
+
+Index: os2/diff.configure
+
+ Updated.
+
+Index: os2/os2.c
+
+ Date: Wed, 9 Oct 1996 22:29:44 -0400 (EDT)
+ From: Ilya Zakharevich
+
+ /bin/sh is translated to the configured value of location of sh.exe.
+ popen() used even if we can fork (as we do now).
+ builtins added for the sake of path manipulation.
+
+Index: os2/os2ish.h
+
+ Date: Wed, 9 Oct 1996 22:29:44 -0400 (EDT)
+ From: Ilya Zakharevich
+
+ sys/un.h is not very useful without Merlin toolkit.
+ updates for fork()ing.
+
+Index: patchlevel.h
+
+ Change to subversion 7.
+
+Index: perl.c
+
+ Date: Wed, 9 Oct 1996 19:03:41 +0000
+ From: Tim Bunce
+ Subject: Infinte loop with perl_destruct_level and $SIG{__WARN__}
+
+ I've just started using purify on a perl with DBD::Oracle linked in
+ (the number of uninitialised memory reads in the Oracle libraries
+ is frightning!).
+
+ If perl_destruct_level and $SIG{__WARN__} are set then I see a range
+ of problems typified by this example and folowed by a core dump:
+
+ Date: Wed, 9 Oct 1996 22:32:22 -0400 (EDT)
+ From: Ilya Zakharevich
+
+ Copywrite of OS/2 port now has \n\n.
+ Now deletes -e file (again!) if compilation is interrupted.
+
+Index: perl.h
+
+ Change Myrealloc to Myremalloc to conform to 5.003's version.
+ I left in the Mycalloc since malloc.c now includes a calloc,
+ and we might need to hide it.
+
+Index: plan9/aperl
+
+ Updated for 5.003_07
+
+Index: plan9/arpa/inet.h
+
+ Updated for 5.003_07
+
+Index: plan9/buildinfo
+
+ Updated for 5.003_07
+
+Index: plan9/config.plan9
+
+ Updated for 5.003_07
+
+Index: plan9/exclude
+
+ Updated for 5.003_07
+
+Index: plan9/fndvers
+
+ Updated for 5.003_07
+
+Index: plan9/genconfig.pl
+
+ Updated for 5.003_07
+
+Index: plan9/mkfile
+
+ Updated for 5.003_07
+
+Index: plan9/myconfig.plan9
+
+ Updated for 5.003_07
+
+Index: plan9/perlplan9.doc
+
+ Updated for 5.003_07
+
+Index: plan9/perlplan9.pod
+
+ Updated for 5.003_07
+
+Index: plan9/plan9.c
+
+ Updated for 5.003_07
+
+Index: plan9/plan9ish.h
+
+ Updated for 5.003_07
+
+Index: plan9/setup.rc
+
+ Updated for 5.003_07
+
+Index: plan9/versnum
+
+ Updated for 5.003_07
+
+Index: pod/perldiag.pod
+
+ Date: Wed, 9 Oct 1996 22:30:38 -0400 (EDT)
+ From: Ilya Zakharevich
+
+ mention that malloc in berkeley DB is broken, and PERL_BADFREE.
+ OS/2-specific messages added.
+
+Index: pod/perlfunc.pod
+
+ Date: 20 Sep 1996 13:17:14 +0200
+ From: Ulrich Pfeifer
+ Subject: Re: Patch for ASN.1 compressed integer in pack/unpack
+
+Index: pod/perli18n.pod
+
+ Updated version with high bits intact.
+
+Index: pod/perlop.pod
+
+ Date: Wed, 9 Oct 1996 22:30:38 -0400 (EDT)
+ From: Ilya Zakharevich
+
+ Crossrefs corrected.
+
+Index: pod/perltrap.pod
+
+ Clarified that warn() _always_ printed to STDERR, both in perl4
+ and perl5.
+
+Index: pod/perlvar.pod
+
+ Date: Wed, 9 Oct 1996 22:30:38 -0400 (EDT)
+ From: Ilya Zakharevich
+
+ $^E under OS/2.
+
+Index: pp.c
+
+ Date: 20 Sep 1996 13:17:14 +0200
+ From: Ulrich Pfeifer
+ Subject: Re: Patch for ASN.1 compressed integer in pack/unpack
+
+Index: pp_sys.c
+
+ Date: Wed, 9 Oct 1996 19:07:24 GMT
+ From: Chris Faylor <cgf@bbc.com>
+
+ The problem is that SCO apparently needs to have a file opened
+ with write privileges for chsize to work correctly.
+
+Index: sv.c
+
+ Date: Tue, 08 Oct 1996 23:54:47 -0400
+ From: Gurusamy Sarathy
+ Subject: Re: Sorting lists of integers doesn't always work
+
+ >> > print sort (4,1,2,3);
+ >> >
+ >> > actually prints "4123", i.e. doesn't actually sort. Bug? Feature?
+
+ This broke between 5.001n and 5.002. There was a long winded thread
+ about sorting undefs in some order (rather than coredumping) around
+ the 5.002beta times (search for "bogorefs" in the subject-line on
+ p5p archive for details). Larry added in some code that presumes that
+ the private flags are set by the time qsort() is called:
+
+ Unfortunately, sv_2pv() does not set the POKp flag, so the above
+ code breaks! Here's a patch against 5.00306.
+
+Index: t/lib/anydbm.t
+
+ Date: Wed, 9 Oct 1996 22:30:38 -0400 (EDT)
+ From: Ilya Zakharevich
+
+ File mode under OS/2 is not what you expect. However, this has
+ nothing to do with databases, _and_ there is a test
+ for this in stat.t (which dutifully fails). There is
+ no point to consider this behaviour as a bug in
+ database code.
+ So OS/2 is special-cased in these tests.
+
+Index: t/lib/db-btree.t
+
+ Date: Wed, 9 Oct 1996 22:30:38 -0400 (EDT)
+ From: Ilya Zakharevich
+
+ File mode under OS/2 is not what you expect. However, this has
+ nothing to do with databases, _and_ there is a test
+ for this in stat.t (which dutifully fails). There is
+ no point to consider this behaviour as a bug in
+ database code.
+ So OS/2 is special-cased in these tests.
+
+Index: t/lib/db-hash.t
+
+ Date: Wed, 9 Oct 1996 22:30:38 -0400 (EDT)
+ From: Ilya Zakharevich
+
+ File mode under OS/2 is not what you expect. However, this has
+ nothing to do with databases, _and_ there is a test
+ for this in stat.t (which dutifully fails). There is
+ no point to consider this behaviour as a bug in
+ database code.
+ So OS/2 is special-cased in these tests.
+
+Index: t/lib/db-recno.t
+
+ Date: Wed, 9 Oct 1996 22:30:38 -0400 (EDT)
+ From: Ilya Zakharevich
+
+ File mode under OS/2 is not what you expect. However, this has
+ nothing to do with databases, _and_ there is a test
+ for this in stat.t (which dutifully fails). There is
+ no point to consider this behaviour as a bug in
+ database code.
+ So OS/2 is special-cased in these tests.
+
+Index: t/lib/gdbm.t
+
+ Date: Wed, 9 Oct 1996 22:30:38 -0400 (EDT)
+ From: Ilya Zakharevich
+
+ File mode under OS/2 is not what you expect. However, this has
+ nothing to do with databases, _and_ there is a test
+ for this in stat.t (which dutifully fails). There is
+ no point to consider this behaviour as a bug in
+ database code.
+ So OS/2 is special-cased in these tests.
+
+Index: t/lib/io_pipe.t
+
+ Date: Wed, 9 Oct 1996 22:30:38 -0400 (EDT)
+ From: Ilya Zakharevich
+
+ Better error message on dying.
+
+Index: t/lib/io_taint.t
+
+ Date: Tue, 8 Oct 1996 22:24:48 -0400
+ From: "Randy J. Ray" <rjray@uswest.com>
+ Subject: PATCH: untaint method for IO::Handle, 5.003_06 version
+
+ This is a re-post of my patch to Graham's IO library to add a method in
+ IO::Handle called "untaint", that sets the IOf_UNTAINT flag on an object
+ that is of or inherits from IO::Handle. With this flag set, data read from
+ said handle is not tainted, whether running under -T, suid or sgid.
+
+ This patch adds the method to IO.xs, adds documentation and warning to the
+ pod of IO/Handle.pm, creates a new test in t/lib called io_taint.t, and
+ adds mention of the new file to MANIFEST.
+
+ Test suite for the untaint method of class IO::Handle.
+
+Index: t/lib/ndbm.t
+
+ Date: Wed, 9 Oct 1996 22:30:38 -0400 (EDT)
+ From: Ilya Zakharevich
+
+ File mode under OS/2 is not what you expect. However, this has
+ nothing to do with databases, _and_ there is a test
+ for this in stat.t (which dutifully fails). There is
+ no point to consider this behaviour as a bug in
+ database code.
+ So OS/2 is special-cased in these tests.
+
+Index: t/lib/odbm.t
+
+ Date: Wed, 9 Oct 1996 22:30:38 -0400 (EDT)
+ From: Ilya Zakharevich
+
+ File mode under OS/2 is not what you expect. However, this has
+ nothing to do with databases, _and_ there is a test
+ for this in stat.t (which dutifully fails). There is
+ no point to consider this behaviour as a bug in
+ database code.
+ So OS/2 is special-cased in these tests.
+
+Index: t/lib/sdbm.t
+
+ Date: Wed, 9 Oct 1996 22:30:38 -0400 (EDT)
+ From: Ilya Zakharevich
+
+ File mode under OS/2 is not what you expect. However, this has
+ nothing to do with databases, _and_ there is a test
+ for this in stat.t (which dutifully fails). There is
+ no point to consider this behaviour as a bug in
+ database code.
+ So OS/2 is special-cased in these tests.
+
+Index: t/lib/socket.t
+
+ Date: Thu, 10 Oct 1996 01:09:59 -0400
+ From: Spider Boardman
+ Subject: Re: 5.003_06 is available (results on ULTRIX)
+
+ fix t/lib/socket.t to treat TCP like the stream protocol it is
+ rather than expecting it behave rationally in all cases.
+
+Index: t/op/pack.t
+
+ Date: 20 Sep 1996 13:17:14 +0200
+ From: Ulrich Pfeifer
+ Subject: Re: Patch for ASN.1 compressed integer in pack/unpack
+
+Index: t/op/sort.t
+
+ Date: Wed, 09 Oct 1996 00:41:27 -0400
+ From: Gurusamy Sarathy
+ Subject: more t/op/sort.t tests
+
+Index: util.c
+
+ Date: Wed, 9 Oct 1996 22:32:22 -0400 (EDT)
+ From: Ilya Zakharevich
+
+ uses my_syspopen, my_syspclose ifdef OS2. my_pclose is defined
+ as my_syspclose ifdef OS2 and can FORK (as OS2 does).
+
+Index: x2p/Makefile.SH
+
+ Date: Wed, 9 Oct 96 16:00:29 edt
+ From: Norton Allen <nort@bottesini.harvard.edu>
+ Subject: Re: sh Configure?
+
+ Extract x2p/Makefile.SH and x2p/cflags.SH correctly down
+ in the x2p directory, even if $0 isn't set to the full
+ pathname of the file being extracted.
+
+Index: x2p/cflags.SH
+
+ Date: Wed, 9 Oct 96 16:00:29 edt
+ From: Norton Allen <nort@bottesini.harvard.edu>
+ Subject: Re: sh Configure?
+
+ Extract x2p/Makefile.SH and x2p/cflags.SH correctly down
+ in the x2p directory, even if $0 isn't set to the full
+ pathname of the file being extracted.
+
+
+----------------
+Version 5.003_06
+----------------
+
+This patch was primarily to fix bugs, improve the documentation,
+and work towards restoring binary compatibility with 5.003.
+The details are described below. A very brief summary is:
+
+o Visible Changes to Core Functionality
+
+ -Significantly improved support _with documentation_ for
+ locales, including LC_COLLATE. See the new pod/perli18n.pod.
+ Thanks to Jarkko Hietaniemi.
+
+ -new version of Math::Complex, with test suite. Ought to be
+ backwards compatible, but check it out if you use Math::Complex.
+
+ -Pre-extending hashes now works. keys %hash = 5000 will pre-size
+ %hash.
+
+ -__DATA__ filehandle is untainted.
+
+o Changes in Core Internals
+
+ -gv_fullname and gv_efullname have reverted to their pre-5.003_03
+ versions for binary compatibility. Actually, they are implemented
+ as stubs pointing to the new 3-argument forms gv_fullname3 and
+ gv_efullname3.
+
+ -Perl's malloc is once again called 'Mymalloc' (with -DHIDEMYMALLOC),
+ as it was pre-5.003_01. Again, this is for binary compatibility
+ with 5.003.
+
+o Configure and build enhancements
+
+ -many new tests for the standard library.
+
+ -test suite now locale-friendly.
+
+ -a2p.man and s2p.man now made into pods.
+
+o Bug fixes
+
+ -whitespace lexer errors fixed.
+
+ -many, many other things. See details below.
+
+o Specific Changes
+
+Here are the specific file-by-file changes.
+
+# This is my patch perl5.003_06.pat to perl5.003_05
+# The full description is below.
+# Please execute the following commands before applying this patch.
+# (You can feed this patch to 'sh' to do so.)
+# -- Andy Dougherty
+
+# We'll create some new tests, but patch won't automatically make them
+# executable.
+for t in abbrev.t autoloader.t basename.t checktree.t complex.t \
+ env.t fatal.t filecache.t filecopy.t filefind.t filepath.t \
+ findbin.t getopt.t hostname.t parsewords.t searchdict.t \
+ selectsaver.t symbol.t texttabs.t textwrap.t timelocal.t
+do
+ touch t/lib/$t
+ chmod +x t/lib/$t
+done
+
+# The a2p.man and s2p.man pages have been changed into pods.
+rm -f x2p/a2p.man x2p/s2p.man
+
+exit 0
+
+
+This is patch perl5.003_06.pat to perl version 5.003_05.
+This takes you from 5.003_05 to 5.003_06.
+
+To apply this patch, run the above commands,
+cd to your perl source directory and then type
+
+ patch -p1 -N < perl5.003_06.pat
+
+The changes are described after each /^Index:/ line below. This is
+designed so you can examine each change with a command such as
+
+ csplit -k perl5.003_06.pat '/^Index:/' '{999}'
+
+(Of course, since there are more than 100 Index entries, your
+csplit may complain, since many csplit's have an arbitrary limit of 100
+files. Still, you can manually split the file or roll your own.)
+
+Index: Changes
+
+ Updated for 5.003_06.
+
+Index: Configure
+
+ Add -Wl,rpath option for irix* to find the installed shared
+ libperl.so
+
+ Add /shlib to libpth. It is used by Digital Unix 4.0.
+
+ Date: Mon, 30 Sep 1996 14:01:05 +0100
+ From: Sven Verdoolaege <skimo@breughel.ufsia.ac.be>
+
+ Detect Cygnus Win32, or at least don't let Configure get fooled
+ into thinking it's OS/2.
+
+Index: INSTALL
+
+ Date: Mon, 7 Oct 1996 22:03:00 +0300
+ From: Jarkko Hietaniemi
+ Subject: LC_COLLATE.
+
+ Big patch to add, document, and test LC_COLLATE support.
+
+ added LC_COLLATE doc.
+
+Index: MANIFEST
+
+ Date: Sun, 22 Sep 1996 00:59:56 +0200
+ From: Gisle Aas
+ Subject: More standard library test scripts
+
+ This is a collection of test scripts for the standard library modules.
+ Some of the tests does not pass unless some of the patches I have sent
+ out are applied.
+
+ Date: Sat, 28 Sep 1996 15:11:06 +0200
+ From: Andreas Koenig
+ Subject: Dale's posting as patch (Was: Perl 5.003_5 make fails on NS3.2 - CURED)
+
+ Handle NeXT, POSIX, and setpgid in pp_sys.c and POSIX.
+
+ Date: Mon, 7 Oct 1996 22:03:00 +0300
+ From: Jarkko Hietaniemi
+ Subject: LC_COLLATE.
+
+ Big patch to add, document, and test LC_COLLATE support.
+
+ added perli18n.pod.
+
+Index: README
+
+ Changed Larry's address to larry@wall.org.
+
+Index: configpm
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+Index: configure
+
+ Date: Mon, 30 Sep 1996 14:01:05 +0100
+ From: Sven Verdoolaege <skimo@breughel.ufsia.ac.be>
+
+ Warn the user of case-insensitive file systems that they may have
+ accidentally gotten 'configure' instead of 'Configure'.
+
+Index: doio.c
+
+ Date: Thu, 03 Oct 1996 16:31:46 -0400 (EDT)
+ From: Charles Bailey
+ Subject: VMS patches to 5.003_05
+
+Index: doop.c
+
+ Date: Mon, 30 Sep 1996 01:13:28 -0400
+ From: Spider Boardman
+ Subject: Re: pre extending hash? - need speed
+
+ The patch below (which is relative to perl5.001l) implements
+ "keys %hash = 50_000;" (or other integer-evaluable sizes) for
+ pre-sizing hashes. I've only moved the patch forward from
+ when I first did it. I'm sure the code in hv_ksplit could be
+ improved.
+
+Index: dump.c
+
+ Restore the 5.003 gv_fullname() and gv_efullname() functions.
+ Provide new 3-arg forms gv_fullname3() and gv_efullname3().
+
+Index: embed.h
+
+ Restore the 5.003 gv_fullname() and gv_efullname() functions.
+ Provide new 3-arg forms gv_fullname3() and gv_efullname3().
+
+Index: ext/DynaLoader/DynaLoader.pm
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+Index: ext/FileHandle/FileHandle.pm
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+Index: ext/IO/IO.pm
+
+ Updated to IO-1.12.
+
+Index: ext/IO/IO.xs
+
+ Updated to IO-1.12.
+
+Index: ext/IO/lib/IO/File.pm
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+ Updated to IO-1.12.
+
+Index: ext/IO/lib/IO/Handle.pm
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+ Updated to IO-1.12.
+
+Index: ext/IO/lib/IO/Pipe.pm
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+ Updated to IO-1.12.
+
+Index: ext/IO/lib/IO/Seekable.pm
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+ Updated to IO-1.12.
+
+Index: ext/IO/lib/IO/Select.pm
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+ Updated to IO-1.12.
+
+Index: ext/IO/lib/IO/Socket.pm
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+ Updated to IO-1.12.
+
+Index: ext/NDBM_File/hints/dynixptx.pl
+
+ Perl 5.003_05 compiles on DYNIX/ptx 4.0 (v4.1.3), and passes all tests.
+ The only change needed is in "ext/NDBM_File/Makefile.PL" - on this system,
+ ndbm is actually contained in the libc library, and must be linked against
+ -lc when compiling. (this is for dynamic ELF executables, I didn't compile
+ statically)
+
+Index: ext/Opcode/Opcode.pm
+
+ Date: Fri, 20 Sep 1996 12:59:21 +0200
+ From: Gisle Aas
+ Subject: Re: Symbol.pm clobbers $_ at startup
+
+ The same kind of problem seem to be present in Opcode.pm:
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+Index: ext/Opcode/Safe.pm
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+Index: ext/POSIX/POSIX.pod
+
+ Date: Mon, 7 Oct 1996 22:03:00 +0300
+ From: Jarkko Hietaniemi
+ Subject: LC_COLLATE.
+
+ Big patch to add, document, and test LC_COLLATE support.
+
+ enhanced setlocale() docs and introduced the one-argument variant doc.
+
+Index: ext/POSIX/POSIX.xs
+
+ Date: Mon, 7 Oct 1996 22:03:00 +0300
+ From: Jarkko Hietaniemi
+ Subject: LC_COLLATE.
+
+ Big patch to add, document, and test LC_COLLATE support.
+
+ setlocale() allowed one argument only,
+ call to perl_init_fold() (in util.c) if setlocale() succeeded.
+
+Index: ext/POSIX/hints/next_3.pl
+
+ Date: Sat, 28 Sep 1996 15:11:06 +0200
+ From: Andreas Koenig
+ Subject: Dale's posting as patch (Was: Perl 5.003_5 make fails on NS3.2 - CURED)
+
+ Handle NeXT, POSIX, and setpgid in pp_sys.c and POSIX.
+
+Index: ext/SDBM_File/sdbm/sdbm.h
+
+ Revert from Perl_malloc to Mymalloc for binary compatibility with
+ 5.003.
+
+Index: ext/Socket/Socket.pm
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+Index: global.sym
+
+ Restore the 5.003 gv_fullname() and gv_efullname() functions.
+ Provide new 3-arg forms gv_fullname3() and gv_efullname3().
+
+ Date: Mon, 30 Sep 1996 01:13:28 -0400
+ From: Spider Boardman
+ Subject: Re: pre extending hash? - need speed
+
+ The patch below (which is relative to perl5.001l) implements
+ "keys %hash = 50_000;" (or other integer-evaluable sizes) for
+ pre-sizing hashes. I've only moved the patch forward from
+ when I first did it. I'm sure the code in hv_ksplit could be
+ improved.
+
+ Date: Mon, 7 Oct 1996 22:03:00 +0300
+ From: Jarkko Hietaniemi
+ Subject: LC_COLLATE.
+
+ Big patch to add, document, and test LC_COLLATE support.
+
+ added var lc_collate_active and func mem_collxfrm.
+
+Index: gv.c
+
+ Restore the 5.003 gv_fullname() and gv_efullname() functions.
+ Provide new 3-arg forms gv_fullname3() and gv_efullname3().
+
+Index: handy.h
+
+ Date: Sat, 21 Sep 1996 21:33:15 -0400 (EDT)
+ From: Kenneth Albanowski
+ Subject: Full LONG_MAX & co. patch over 5.003_05
+
+ This patch contains the changes I've collected for the various _MAX issues
+ since 5.003_05. No patches issued between 5.003_05 and this one should be
+ applied, use this one instead.
+
+ The effect is to remove the CHAR_* and I8_* constants (which are
+ ambiguous) and to explicitly cast all of the constants.
+
+Index: hints/machten.sh
+
+ Add notes about MachTen 4.0.3 SYSV IPC.
+
+Index: hints/next_3.sh
+
+ Replace optimize="-g" by optimize="" since we're just trying to turn off
+ the optimizier.
+
+ Date: Sat, 28 Sep 1996 15:11:06 +0200
+ From: Andreas Koenig
+ Subject: Dale's posting as patch (Was: Perl 5.003_5 make fails on NS3.2 - CURED)
+
+ Handle NeXT, POSIX, and setpgid in pp_sys.c and POSIX.
+
+Index: hv.c
+
+ Date: Fri, 20 Sep 1996 15:38:57 -0400
+ From: Gurusamy Sarathy
+ Subject: Re: "Attempt to free non-existent shared string"? (with patch)
+
+ I found a subtle problem with the lazydelete mechanism (which is used
+ to postpone the delete of a entry that may be getting iterated over).
+ I was using the HeKLEN slot to hold the hint, but the real HeKLEN is
+ needed later to call unsharepvn(). This means that only magical
+ hash entries can use the HeKLEN slot to hold flags.
+
+ Here's a tested patch against 5.00305 that fixes the problem.
+ The patch simply moves the LAZYDEL hint to become a SV-level private
+ flag.
+
+ Date: Mon, 30 Sep 1996 01:13:28 -0400
+ From: Spider Boardman
+ Subject: Re: pre extending hash? - need speed
+
+ The patch below (which is relative to perl5.001l) implements
+ "keys %hash = 50_000;" (or other integer-evaluable sizes) for
+ pre-sizing hashes. I've only moved the patch forward from
+ when I first did it. I'm sure the code in hv_ksplit could be
+ improved.
+
+Index: hv.h
+
+ Date: Fri, 20 Sep 1996 15:38:57 -0400
+ From: Gurusamy Sarathy
+ Subject: Re: "Attempt to free non-existent shared string"? (with patch)
+
+ I found a subtle problem with the lazydelete mechanism (which is used
+ to postpone the delete of a entry that may be getting iterated over).
+ I was using the HeKLEN slot to hold the hint, but the real HeKLEN is
+ needed later to call unsharepvn(). This means that only magical
+ hash entries can use the HeKLEN slot to hold flags.
+
+ Here's a tested patch against 5.00305 that fixes the problem.
+ The patch simply moves the LAZYDEL hint to become a SV-level private
+ flag.
+
+Index: installman
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+Index: installperl
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+Index: lib/AutoLoader.pm
+
+ Date: Mon Sep 9 09:29:44 1996
+ From: Gisle Aas
+ Subject: Re: problem with 'die' and UserAgent
+
+ > This is a patch to the AutoLoader.pm (from 5.003) that fixes the problem:
+ This is a better patch (no need to test for /::DESTROY$/ twice):
+
+ Date: Mon, 30 Sep 1996 00:54:37 -0400
+ From: Spider Boardman
+
+ The test and patches for AutoLoader were also non-functional,
+ since the regexp context (curpm) was still being clobbered by the
+ filename manipulations:
+
+ Date: Sun, 06 Oct 1996 16:15:07 +0200
+ From: Gisle Aas
+ Subject: Re: Can't locate auto/U/autosplit.ix
+
+ It would IMHO be much better if the AutoLoader exported the AUTOLOAD()
+ function. With an exported AUTOLOAD() we would not have to inherit
+ from AutoLoader, and we would avoid these problems.
+
+ This patch tries to explain the behavior of AutoLoader instead by
+ updating its documentation.
+
+Index: lib/Benchmark.pm
+
+ Date: Sat, 28 Sep 1996 17:01:22 +0300 (EET DST)
+ From: Jarkko Hietaniemi
+ Subject: a really really tiny typo
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+Index: lib/Cwd.pm
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+Index: lib/Devel/SelfStubber.pm
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+Index: lib/Env.pm
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+Index: lib/Exporter.pm
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+Index: lib/ExtUtils/Embed.pm
+
+ Remove unwantd space after the I in -I$Config[archlib}
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+Index: lib/ExtUtils/Install.pm
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+Index: lib/ExtUtils/MM_Unix.pm
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+Index: lib/ExtUtils/MM_VMS.pm
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+ Date: Thu, 03 Oct 1996 16:31:46 -0400 (EDT)
+ From: Charles Bailey
+ Subject: VMS patches to 5.003_05
+
+Index: lib/ExtUtils/MakeMaker.pm
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+Index: lib/ExtUtils/Manifest.pm
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+ Date: Thu, 03 Oct 1996 16:31:46 -0400 (EDT)
+ From: Charles Bailey
+ Subject: VMS patches to 5.003_05
+
+Index: lib/ExtUtils/Mksymlists.pm
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+Index: lib/ExtUtils/xsubpp
+
+ Change a reference from perlapi(1) to perlxs(1).
+
+Index: lib/File/Basename.pm
+
+ Date: Fri, 20 Sep 1996 14:11:05 +0200
+ From: Gisle Aas
+ Subject: File::BaseName: "/" is legal path separator for MSDOS
+
+ The File::BaseName module should allow "/" as path separator when
+ fileparse_set_fstype("MSDOS") is in effect:
+
+ Date: Fri, 20 Sep 1996 13:58:52 +0200
+ From: Gisle Aas
+ Subject: File::Basename documentation patch
+
+ Date: Mon, 30 Sep 1996 00:54:37 -0400
+ From: Spider Boardman
+
+ For t/lib/basename.t, though, the associated patch for
+ File::Basename was also wrong:
+
+ Date: Thu, 03 Oct 1996 16:31:46 -0400 (EDT)
+ From: Charles Bailey
+ Subject: VMS patches to 5.003_05
+
+Index: lib/File/Copy.pm
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+Index: lib/File/Find.pm
+
+ Date: Sat, 7 Sep 1996 21:37:44 +0200
+ From: Michael De La Rue <mikedlr@it.com.pl>
+ Subject: File::Find assumes $_ remains unchanged; bug
+
+ The File::Find perl module assumes that the $_ variable remains unchanged
+ through the user defined function which is callbacked from find. It carries
+ out a stat operation
+
+ Simplest fix is merely to document this
+
+Index: lib/File/Path.pm
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+Index: lib/FindBin.pm
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+Index: lib/Getopt/Long.pm
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+Index: lib/I18N/Collate.pm
+
+ Date: Mon, 7 Oct 1996 22:03:00 +0300
+ From: Jarkko Hietaniemi
+ Subject: LC_COLLATE.
+
+ Big patch to add, document, and test LC_COLLATE support.
+
+ deprecated and trapped (will whine if called and tell to migrate away)
+
+Index: lib/IPC/Open2.pm
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+Index: lib/IPC/Open3.pm
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+Index: lib/Math/BigInt.pm
+
+ Date: Mon, 7 Oct 1996 22:03:00 +0300
+ From: Jarkko Hietaniemi
+ Subject: LC_COLLATE.
+
+ Big patch to add, document, and test LC_COLLATE support.
+
+ ord() is a dangerous thing.
+
+Index: lib/Math/Complex.pm
+
+ Date: Thu, 03 Oct 96 18:38:08 +0200
+ From: Raphael Manfredi <Raphael_Manfredi@grenoble.hp.com>
+ # Complex numbers and associated mathematical functions
+ # -- Raphael Manfredi, Sept 1996
+ # New version. Should be backwards compatible, but please
+ # check it out if you use it.
+
+Index: lib/Pod/Text.pm
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+Index: lib/Search/Dict.pm
+
+ Date: Sat, 21 Sep 1996 23:02:42 +0200
+ From: Gisle Aas
+ Subject: look() in Search::Dict should use lc() istead of tr/A-Z/a-z/
+
+ The Search::Dict look() function should use the lc() function instead
+ of tr/A-Z/a-z/. This will make folding of non-english letters work if
+ the locale is set up correctly.
+
+Index: lib/SelfLoader.pm
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+Index: lib/Symbol.pm
+
+ Date: Fri, 20 Sep 1996 12:38:14 +0200
+ From: Gisle Aas
+ Subject: Symbol.pm clobbers $_ at startup
+
+ perl -le 'BEGIN {$_="foo";} use Symbol; print qualify($_)'
+
+ I don't understand why the module want to initialize %global from
+ <DATA> in the first place. Perhaps we want to apply this patch
+ instead.
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+Index: lib/Sys/Hostname.pm
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+Index: lib/Term/Cap.pm
+
+ Date: 23 Sep 1996 14:11:38 +0200
+ From: Ulrich Pfeifer
+ Subject: Patch for Term::Cap
+
+ 'use Term::Cap' produces a warning when diagnosics are active. The
+ patch below avoids the warning.
+
+ [The $entry .= $_ usage is idiomatic enough that it ought to be
+ ok, I would think, but the patch certainly is ok too.]
+
+Index: lib/Term/Complete.pm
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+Index: lib/Term/ReadLine.pm
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+Index: lib/Test/Harness.pm
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+ Date: Thu, 03 Oct 1996 16:31:46 -0400 (EDT)
+ From: Charles Bailey
+ Subject: VMS patches to 5.003_05
+
+Index: lib/Text/Abbrev.pm
+
+ Date: 23 Sep 1996 11:33:01 +0200
+ From: Ulrich Pfeifer
+ Subject: Text::Abbrev (Re: More standard library test scripts)
+
+ This patch merges the Text::Abbrev related patches/tests from Gisle
+ and my previous patch (i.e. replaces both).
+
+Index: lib/Text/Tabs.pm
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+Index: lib/Text/Wrap.pm
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+Index: lib/Time/Local.pm
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+Index: lib/UNIVERSAL.pm
+
+ Add in stub file.
+
+Index: lib/bigint.pl
+
+ Date: Mon, 7 Oct 1996 22:03:00 +0300
+ From: Jarkko Hietaniemi
+ Subject: LC_COLLATE.
+
+ Big patch to add, document, and test LC_COLLATE support.
+
+ ord() is a dangerous thing.
+
+Index: lib/diagnostics.pm
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+Index: lib/overload.pm
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+Index: lib/perl5db.pl
+
+ Date: Mon, 30 Sep 1996 00:34:58 -0400 (EDT)
+ From: Ilya Zakharevich
+ Subject: Re: dereferencing a hash from the debugger won't work
+
+Index: lib/splain
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+Index: lib/strict.pm
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+Index: makedepend.SH
+
+ Add explicit $touch $firstmakefile for QNX which apparently
+ preserves modification times for a 'cp' command.
+ I worry, though, that touch might not be portable to OS/2.
+ If it is, then I'll remove the fancy case statement.
+
+Index: malloc.c
+
+ Not all sbrks return zeroed memory.
+
+Index: mg.c
+
+ Restore the 5.003 gv_fullname() and gv_efullname() functions.
+ Provide new 3-arg forms gv_fullname3() and gv_efullname3().
+
+ Date: Sun, 29 Sep 1996 22:18:19 -0400 (EDT)
+ From: Chip Salzenberg
+ Subject: 5.003_05: Fix numeric value of $!
+
+ This patch undoes a bit of over-zealous integerization in mg.c, related
+ to the numeric value of $!.
+
+ Date: Mon, 30 Sep 1996 01:13:28 -0400
+ From: Spider Boardman
+ Subject: Re: pre extending hash? - need speed
+
+ The patch below (which is relative to perl5.001l) implements
+ "keys %hash = 50_000;" (or other integer-evaluable sizes) for
+ pre-sizing hashes. I've only moved the patch forward from
+ when I first did it. I'm sure the code in hv_ksplit could be
+ improved.
+
+ Date: Thu, 03 Oct 1996 16:31:46 -0400 (EDT)
+ From: Charles Bailey
+ Subject: VMS patches to 5.003_05
+
+ Date: Fri, 4 Oct 1996 12:38:31 -0400 (EDT)
+ From: Chip Salzenberg
+ Subject: 5.003_05: Fix numeric $! and $^E
+
+ This patch undoes a bit of over-zealous integerization in mg.c,
+ related to the numeric values of $! and $^E. This patch *REPLACES*
+ the one I posted earlier, which was only effective for $!.
+
+ [Some of this is superceded by similar stuff in the VMS patches.]
+
+Index: op.c
+
+ Restore the 5.003 gv_fullname() and gv_efullname() functions.
+ Provide new 3-arg forms gv_fullname3() and gv_efullname3().
+
+ Date: Mon, 30 Sep 1996 01:13:28 -0400
+ From: Spider Boardman
+ Subject: Re: pre extending hash? - need speed
+
+ The patch below (which is relative to perl5.001l) implements
+ "keys %hash = 50_000;" (or other integer-evaluable sizes) for
+ pre-sizing hashes. I've only moved the patch forward from
+ when I first did it. I'm sure the code in hv_ksplit could be
+ improved.
+
+Index: opcode.h
+
+ Date: Mon, 16 Sep 1996 16:37:48 -0700
+ From: Jonathan Biggar <jon@sems.com>
+ Subject: Perl 5.003 bug when embedding in C++ program
+
+ The following patch is necessary in order to embed the Perl5.003 interpreter
+ into a C++ program without getting prototype mismatch errors from the
+ C++ compiler.
+
+Index: opcode.pl
+
+ Date: Mon, 16 Sep 1996 16:37:48 -0700
+ From: Jonathan Biggar <jon@sems.com>
+ Subject: Perl 5.003 bug when embedding in C++ program
+
+ The following patch is necessary in order to embed the Perl5.003 interpreter
+ into a C++ program without getting prototype mismatch errors from the
+ C++ compiler.
+
+Index: patchlevel.h
+
+ Change to subversion 6.
+
+Index: perl.c
+
+ From: Roderick Schertler
+ Subject: Re: -T flag and removal of `.' from @INC
+
+ support C<perl -e'attached code'>
+
+ Date: Tue, 01 Oct 1996 19:02:17 -0400
+ From: Gurusamy Sarathy
+ Subject: Re: 2 core dumps (patch)
+ Message-Id: <199610012302.TAA08395@aatma.engin.umich.edu>
+
+ The problem is an uninitialized SV slot in errgv. Here's a patch.
+
+ Date: Thu, 03 Oct 1996 16:31:46 -0400 (EDT)
+ From: Charles Bailey
+ Subject: VMS patches to 5.003_05
+
+Index: perl.h
+
+ Date: Sat, 21 Sep 1996 21:33:15 -0400 (EDT)
+ From: Kenneth Albanowski
+ Subject: Full LONG_MAX & co. patch over 5.003_05
+
+ This patch contains the changes I've collected for the various _MAX issues
+ since 5.003_05. No patches issued between 5.003_05 and this one should be
+ applied, use this one instead.
+
+ The effect is to remove the CHAR_* and I8_* constants (which are
+ ambiguous) and to explicitly cast all of the constants.
+
+ Date: Mon, 30 Sep 1996 01:13:28 -0400
+ From: Spider Boardman
+ Subject: Re: pre extending hash? - need speed
+
+ The patch below (which is relative to perl5.001l) implements
+ "keys %hash = 50_000;" (or other integer-evaluable sizes) for
+ pre-sizing hashes. I've only moved the patch forward from
+ when I first did it. I'm sure the code in hv_ksplit could be
+ improved.
+
+ Revert from Perl_malloc to Mymalloc for binary compatibility with
+ 5.003.
+
+ Date: Mon, 7 Oct 1996 22:03:00 +0300
+ From: Jarkko Hietaniemi
+ Subject: LC_COLLATE.
+
+ Big patch to add, document, and test LC_COLLATE support.
+
+Index: perl_exp.SH
+
+ Add new function perl_init_fold. (I'm not sure it goes here.)
+
+Index: perlio.c
+
+ Date: Thu, 12 Sep 96 15:58 PDT
+ From: Hunter Kelly <retnuh@zule.pixar.com>
+ Subject: Re: 5.003_05 is available.
+
+ Fix PerlIO_reopen parameters.
+
+Index: perlsdio.h
+
+ Date: Fri, 13 Sep 1996 17:24:01 -0400
+ From: John Stoffel <jfs@jfs.fluent.com>
+ Subject: Re: 5.003_05 is available.
+
+ Undef Irix getc_unlocked and putc_unlocked #defines.
+
+ Date: Thu, 03 Oct 1996 16:31:46 -0400 (EDT)
+ From: Charles Bailey
+ Subject: VMS patches to 5.003_05
+
+Index: pod/Makefile
+
+ Date: Mon, 7 Oct 1996 22:03:00 +0300
+ From: Jarkko Hietaniemi
+ Subject: LC_COLLATE.
+
+ Big patch to add, document, and test LC_COLLATE support.
+
+ perli18n.pod (and perlapio.pod, btw) added.
+
+Index: pod/buildtoc
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+Index: pod/perl.pod
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+ Changed Larry's address to larry@wall.org.
+
+ Date: Mon, 7 Oct 1996 22:03:00 +0300
+ From: Jarkko Hietaniemi
+ Subject: LC_COLLATE.
+
+ Big patch to add, document, and test LC_COLLATE support.
+
+ perli18n advertised.
+
+Index: pod/perlapio.pod
+
+ Date: Wed, 11 Sep 1996 11:55:18 -0500
+ From: "Daniel S. Lewart" <lewart@vadds.cvm.uiuc.edu>
+ Subject: POD spelling patches
+
+Index: pod/perlbook.pod
+
+ Updated for Second Edition.
+
+Index: pod/perlcall.pod
+
+ Date: Wed, 11 Sep 1996 11:55:18 -0500
+ From: "Daniel S. Lewart" <lewart@vadds.cvm.uiuc.edu>
+ Subject: POD spelling patches
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+Index: pod/perldata.pod
+
+ Date: Wed, 11 Sep 1996 11:55:18 -0500
+ From: "Daniel S. Lewart" <lewart@vadds.cvm.uiuc.edu>
+ Subject: POD spelling patches
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+Index: pod/perldebug.pod
+
+ Date: Wed, 11 Sep 1996 11:55:18 -0500
+ From: "Daniel S. Lewart" <lewart@vadds.cvm.uiuc.edu>
+ Subject: POD spelling patches
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+Index: pod/perldiag.pod
+
+ Date: Wed, 11 Sep 1996 11:55:18 -0500
+ From: "Daniel S. Lewart" <lewart@vadds.cvm.uiuc.edu>
+ Subject: POD spelling patches
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+ Date: Thu, 03 Oct 1996 16:31:46 -0400 (EDT)
+ From: Charles Bailey
+ Subject: VMS patches to 5.003_05
+
+Index: pod/perldsc.pod
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+Index: pod/perlembed.pod
+
+ Date: Wed, 11 Sep 1996 11:55:18 -0500
+ From: "Daniel S. Lewart" <lewart@vadds.cvm.uiuc.edu>
+ Subject: POD spelling patches
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+Index: pod/perlform.pod
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+Index: pod/perlfunc.pod
+
+ Date: Wed, 11 Sep 1996 11:55:18 -0500
+ From: "Daniel S. Lewart" <lewart@vadds.cvm.uiuc.edu>
+ Subject: POD spelling patches
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+Index: pod/perlguts.pod
+
+ Date: Wed, 11 Sep 1996 11:55:18 -0500
+ From: "Daniel S. Lewart" <lewart@vadds.cvm.uiuc.edu>
+ Subject: POD spelling patches
+ Date: Mon, 23 Sep 96 13:18:01 PDT
+ From: Jeff Okamoto
+ Subject: Re: perlguts API Listing patch
+
+ Here's the lastest complete version for inclusion into _06 or .004. This
+ incorporates and supersedes Dean's patch.
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+Index: pod/perli18n.pod
+
+ Date: Mon, 7 Oct 1996 22:03:00 +0300
+ From: Jarkko Hietaniemi
+ Subject: LC_COLLATE.
+
+ Big patch to add, document, and test LC_COLLATE support.
+
+ written.
+
+Index: pod/perlipc.pod
+
+ Date: Wed, 11 Sep 1996 11:55:18 -0500
+ From: "Daniel S. Lewart" <lewart@vadds.cvm.uiuc.edu>
+ Subject: POD spelling patches
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+Index: pod/perllol.pod
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+Index: pod/perlmod.pod
+
+ Date: Wed, 11 Sep 1996 11:55:18 -0500
+ From: "Daniel S. Lewart" <lewart@vadds.cvm.uiuc.edu>
+ Subject: POD spelling patches
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+ Date: Wed, 02 Oct 1996 16:52:08 -0400
+ From: Roderick Schertler
+ Subject: documentation for $? in END
+
+ Document the behavior with $? WRT END subroutines.
+
+Index: pod/perlobj.pod
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+Index: pod/perlop.pod
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+ Date: Fri, 4 Oct 1996 10:36:19 -0400 (EDT)
+ From: Kenneth Albanowski
+ Subject: Re: Suggestion for improving man page
+
+ Add alternative names for various escape sequences.
+
+Index: pod/perlpod.pod
+
+ Date: Wed, 11 Sep 1996 11:55:18 -0500
+ From: "Daniel S. Lewart" <lewart@vadds.cvm.uiuc.edu>
+ Subject: POD spelling patches
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+Index: pod/perlre.pod
+
+ Date: Wed, 11 Sep 1996 11:55:18 -0500
+ From: "Daniel S. Lewart" <lewart@vadds.cvm.uiuc.edu>
+ Subject: POD spelling patches
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+ Date: Fri, 4 Oct 1996 10:36:19 -0400 (EDT)
+ From: Kenneth Albanowski
+ Subject: Re: Suggestion for improving man page
+
+ Add alternative names for various escape sequences.
+
+Index: pod/perlref.pod
+
+ Date: Wed, 11 Sep 1996 11:55:18 -0500
+ From: "Daniel S. Lewart" <lewart@vadds.cvm.uiuc.edu>
+ Subject: POD spelling patches
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+Index: pod/perlrun.pod
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+Index: pod/perlsec.pod
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+Index: pod/perlstyle.pod
+
+ Date: Wed, 11 Sep 1996 11:55:18 -0500
+ From: "Daniel S. Lewart" <lewart@vadds.cvm.uiuc.edu>
+ Subject: POD spelling patches
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+Index: pod/perlsub.pod
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+Index: pod/perlsyn.pod
+
+ Date: Wed, 11 Sep 1996 11:55:18 -0500
+ From: "Daniel S. Lewart" <lewart@vadds.cvm.uiuc.edu>
+ Subject: POD spelling patches
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+Index: pod/perltie.pod
+
+ Date: Wed, 11 Sep 1996 11:55:18 -0500
+ From: "Daniel S. Lewart" <lewart@vadds.cvm.uiuc.edu>
+ Subject: POD spelling patches
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+Index: pod/perltoc.pod
+
+ Date: Wed, 11 Sep 1996 11:55:18 -0500
+ From: "Daniel S. Lewart" <lewart@vadds.cvm.uiuc.edu>
+ Subject: POD spelling patches
+
+ Changed Larry's address to larry@wall.org.
+
+Index: pod/perltrap.pod
+
+ Date: Wed, 11 Sep 1996 13:26:18 -0400
+ From: Gurusamy Sarathy
+ Subject: a perl425 trap
+
+ Here's an addition that should be self-explanatory.
+ [interpolation issues]
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+Index: pod/perlvar.pod
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+ Date: Wed, 02 Oct 1996 16:52:08 -0400
+ From: Roderick Schertler
+ Subject: documentation for $? in END
+
+ Document the behavior with $? WRT END subroutines.
+
+Index: pod/perlxstut.pod
+
+ Date: Wed, 11 Sep 1996 11:55:18 -0500
+ From: "Daniel S. Lewart" <lewart@vadds.cvm.uiuc.edu>
+ Subject: POD spelling patches
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+Index: pod/pod2man.PL
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+ Bugs found in pod2man
+
+ The following bugs were noticed, and some fixed:
+
+ 1. Where a L<> link extends over more than one line, pod2man does not
+ treat it as a link but displays it literally, and so these have been
+ rearranged to place the link on one line. This is the only bug worked
+ around. [Fixed; the rearrangements, which were done beforehand,
+ remain in some cases, but are no longer necessary, and pod paragraphs
+ can now be safely reformatted to whatever width is desired in the pod,
+ without breaking links.]
+
+ 2. It seems to swallow spaces after certain links: for example, part
+ of the "open" entry in the perlfunc manpage comes out as "the
+ \f(CWbinmode\fR entry elsewhere in this documentfor tips", the source
+ having been "L</binmode> for tips". [Fixed.]
+
+ 3. 'L</"Pass by Reference">', in perlsub.pod, comes out as '\fI/"Pass
+ by Reference\fR', that is, with an initial '/"'.
+
+ 4. If a pod line begins with ".", nothing is done to prevent [tng]roff
+ from treating it as a [tng]roff instruction.
+
+ 5. When the paragraph below =head1 NAME has more than one line, this
+ confuses pod2man: so in the case of Term::Readline, the manpage begins
+ with a stray line 'no real package is found, substitutes stubs instead
+ of basic functions."'.
+
+ Of course, it would be better to fix pod2man; I hope that the new Pod
+ modules, when ready, will not have these defects.
+
+Index: pp_ctl.c
+
+ Restore the 5.003 gv_fullname() and gv_efullname() functions.
+ Provide new 3-arg forms gv_fullname3() and gv_efullname3().
+
+ Date: Mon, 7 Oct 1996 22:03:00 +0300
+ From: Jarkko Hietaniemi
+ Subject: LC_COLLATE.
+
+ Big patch to add, document, and test LC_COLLATE support.
+
+ sortcmp() sprouted a LC_COLLATE branch.
+
+Index: pp_hot.c
+
+ Restore the 5.003 gv_fullname() and gv_efullname() functions.
+ Provide new 3-arg forms gv_fullname3() and gv_efullname3().
+
+ Date: Thu, 19 Sep 1996 11:58:22 -0400
+ From: "Randy J. Ray" <rjray@uswest.com>
+ Subject: Patch: Untaint FH flag and clean DATA handles
+
+ This patch adds a IOf_UNTAINT flag in sv.h, as one of the possibles
+ on an xpvio->xio_flags struct member. It is used to mark the given
+ file handle as a clean source, even when tainting is turned on.
+ There are also patches to pp_sys.c in pp_sysread to check this flag
+ before tainting data, and in pp_hot.c in do_readline for the same
+ reason. Lastly, it patches toke.c to automatically set this flag on
+ on a __DATA__ filehandle. The creation of the $pack::DATA
+ pseudo-filehandle is already checked against running under eval, so
+ this should not introduce any insecurity.
+
+ This patch *does not*:
+
+ * Add the "untaint" keyword.
+
+Index: pp_sys.c
+
+ Restore the 5.003 gv_fullname() and gv_efullname() functions.
+ Provide new 3-arg forms gv_fullname3() and gv_efullname3().
+
+ Date: Thu, 19 Sep 1996 11:58:22 -0400
+ From: "Randy J. Ray" <rjray@uswest.com>
+ Subject: Patch: Untaint FH flag and clean DATA handles
+
+ This patch adds a IOf_UNTAINT flag in sv.h, as one of the possibles
+ on an xpvio->xio_flags struct member. It is used to mark the given
+ file handle as a clean source, even when tainting is turned on.
+ There are also patches to pp_sys.c in pp_sysread to check this flag
+ before tainting data, and in pp_hot.c in do_readline for the same
+ reason. Lastly, it patches toke.c to automatically set this flag on
+ on a __DATA__ filehandle. The creation of the $pack::DATA
+ pseudo-filehandle is already checked against running under eval, so
+ this should not introduce any insecurity.
+
+ This patch *does not*:
+
+ * Add the "untaint" keyword.
+
+ Date: Sun, 22 Sep 1996 17:26:57 -0400
+ From: "Randy J. Ray" <rjray@uswest.com>
+ Subject: Patch to patch for untainting
+
+ The following patch ensures that a glob used as a filehandle that
+ has had the UNTAINT flag set will not carry that flag over on a
+ re-open. In a nutshell, a re-open of the DATA filehandle would be
+ considered untainted, and an object of class IO::Handle (or one of
+ its sub-classes) that is marked untainted with the untaint method,
+ then closed and re-opened, retained the untaintedness.
+
+ Date: Mon, 30 Sep 1996 00:54:37 -0400
+ From: Spider Boardman
+
+ First, with IO::untaint, the patches as posted resulted in a
+ miniperl which couldn't open files, so the autosplitting of the
+ library and the creation of Makefiles for the extensions didn't
+ work. Worse, it didn't just fail to open files, it dumped core.
+
+Index: proto.h
+
+ Restore the 5.003 gv_fullname() and gv_efullname() functions.
+ Provide new 3-arg forms gv_fullname3() and gv_efullname3().
+
+ Date: Mon, 30 Sep 1996 01:13:28 -0400
+ From: Spider Boardman
+ Subject: Re: pre extending hash? - need speed
+
+ The patch below (which is relative to perl5.001l) implements
+ "keys %hash = 50_000;" (or other integer-evaluable sizes) for
+ pre-sizing hashes. I've only moved the patch forward from
+ when I first did it. I'm sure the code in hv_ksplit could be
+ improved.
+
+ Date: Mon, 7 Oct 1996 22:03:00 +0300
+ From: Jarkko Hietaniemi
+ Subject: LC_COLLATE.
+
+ Big patch to add, document, and test LC_COLLATE support.
+
+ mem_collxfrm() and perl_init_fold() added.
+
+Index: run.c
+
+ Restore the 5.003 gv_fullname() and gv_efullname() functions.
+ Provide new 3-arg forms gv_fullname3() and gv_efullname3().
+
+Index: sv.c
+
+ Restore the 5.003 gv_fullname() and gv_efullname() functions.
+ Provide new 3-arg forms gv_fullname3() and gv_efullname3().
+
+ Date: Mon, 30 Sep 1996 01:13:28 -0400
+ From: Spider Boardman
+ Subject: Re: pre extending hash? - need speed
+
+ The patch below (which is relative to perl5.001l) implements
+ "keys %hash = 50_000;" (or other integer-evaluable sizes) for
+ pre-sizing hashes. I've only moved the patch forward from
+ when I first did it. I'm sure the code in hv_ksplit could be
+ improved.
+
+ Date: Thu, 03 Oct 1996 16:31:46 -0400 (EDT)
+ From: Charles Bailey
+ Subject: VMS patches to 5.003_05
+
+ I've added some DEBUG_Ps to sv.c which give a trace of the
+ fast I/O fiddling with stdio in sv_gets(). These were useful
+ to me in setting up the VMS fast I/O, and I left them in in
+ case they're useful to someone in the future. However, if you
+ think it overloads -DP too much, feel free to drop it. (-DP
+ already adds a profile of op usage to its advertised output.)
+
+ Date: Mon, 7 Oct 1996 22:03:00 +0300
+ From: Jarkko Hietaniemi
+ Subject: LC_COLLATE.
+
+ Big patch to add, document, and test LC_COLLATE support.
+
+ sv_cmp() sprouted a LC_COLLATE branch.
+
+Index: sv.h
+
+ Date: Thu, 19 Sep 1996 11:58:22 -0400
+ From: "Randy J. Ray" <rjray@uswest.com>
+ Subject: Patch: Untaint FH flag and clean DATA handles
+
+ This patch adds a IOf_UNTAINT flag in sv.h, as one of the possibles
+ on an xpvio->xio_flags struct member. It is used to mark the given
+ file handle as a clean source, even when tainting is turned on.
+ There are also patches to pp_sys.c in pp_sysread to check this flag
+ before tainting data, and in pp_hot.c in do_readline for the same
+ reason. Lastly, it patches toke.c to automatically set this flag on
+ on a __DATA__ filehandle. The creation of the $pack::DATA
+ pseudo-filehandle is already checked against running under eval, so
+ this should not introduce any insecurity.
+
+ This patch *does not*:
+
+ * Add the "untaint" keyword.
+
+ Date: Fri, 20 Sep 1996 15:38:57 -0400
+ From: Gurusamy Sarathy
+ Subject: Re: "Attempt to free non-existent shared string"? (with patch)
+
+ I found a subtle problem with the lazydelete mechanism (which is used
+ to postpone the delete of a entry that may be getting iterated over).
+ I was using the HeKLEN slot to hold the hint, but the real HeKLEN is
+ needed later to call unsharepvn(). This means that only magical
+ hash entries can use the HeKLEN slot to hold flags.
+
+ Here's a tested patch against 5.00305 that fixes the problem.
+ The patch simply moves the LAZYDEL hint to become a SV-level private
+ flag.
+
+Index: t/base/term.t
+
+ Date: Mon, 7 Oct 1996 22:03:00 +0300
+ From: Jarkko Hietaniemi
+ Subject: LC_COLLATE.
+
+ Big patch to add, document, and test LC_COLLATE support.
+
+ \n not necessarily lt ' '.
+
+Index: t/comp/package.t
+
+ Date: Mon, 7 Oct 1996 22:03:00 +0300
+ From: Jarkko Hietaniemi
+ Subject: LC_COLLATE.
+
+ Big patch to add, document, and test LC_COLLATE support.
+
+ XYZ not necessarily gt xyz.
+
+Index: t/lib/abbrev.t
+
+ Date: Sun, 22 Sep 1996 00:59:56 +0200
+ From: Gisle Aas
+ Subject: More standard library test scripts
+
+ This is a collection of test scripts for the standard library modules.
+ Some of the tests does not pass unless some of the patches I have sent
+ out are applied.
+
+ Date: 23 Sep 1996 11:33:01 +0200
+ From: Ulrich Pfeifer
+ Subject: Text::Abbrev (Re: More standard library test scripts)
+
+ This patch merges the Text::Abbrev related patches/tests from Gisle
+ and my previous patch (i.e. replaces both).
+
+Index: t/lib/anydbm.t
+
+ Date: Mon, 7 Oct 1996 22:03:00 +0300
+ From: Jarkko Hietaniemi
+ Subject: LC_COLLATE.
+
+ Big patch to add, document, and test LC_COLLATE support.
+
+ A not necessarily gt a.
+
+Index: t/lib/autoloader.t
+
+ Date: Sun, 22 Sep 1996 00:59:56 +0200
+ From: Gisle Aas
+ Subject: More standard library test scripts
+
+ This is a collection of test scripts for the standard library modules.
+ Some of the tests does not pass unless some of the patches I have sent
+ out are applied.
+
+ Date: Mon, 30 Sep 1996 00:54:37 -0400
+ From: Spider Boardman
+
+ The test and patches for AutoLoader were also non-functional,
+ since the regexp context (curpm) was still being clobbered by the
+ filename manipulations:
+
+Index: t/lib/basename.t
+
+ Date: Sun, 22 Sep 1996 00:59:56 +0200
+ From: Gisle Aas
+ Subject: More standard library test scripts
+
+ This is a collection of test scripts for the standard library modules.
+ Some of the tests does not pass unless some of the patches I have sent
+ out are applied.
+
+ Date: Mon, 30 Sep 1996 00:54:37 -0400
+ From: Spider Boardman
+
+ Fix the number of tests.
+
+ Date: Thu, 03 Oct 1996 16:31:46 -0400 (EDT)
+ From: Charles Bailey
+ Subject: VMS patches to 5.003_05
+
+ A different set of tests for File::Basename and friends.
+
+Index: t/lib/checktree.t
+
+ Date: Sun, 22 Sep 1996 00:59:56 +0200
+ From: Gisle Aas
+ Subject: More standard library test scripts
+
+ This is a collection of test scripts for the standard library modules.
+ Some of the tests does not pass unless some of the patches I have sent
+ out are applied.
+
+Index: t/lib/complex.t
+
+ Date: Thu, 03 Oct 96 18:38:08 +0200
+ From: Raphael Manfredi <Raphael_Manfredi@grenoble.hp.com>
+ # Complex numbers and associated mathematical functions
+ # -- Raphael Manfredi, Sept 1996
+
+ Tests for new version.
+
+Index: t/lib/db-btree.t
+
+ Date: Mon, 7 Oct 1996 22:03:00 +0300
+ From: Jarkko Hietaniemi
+ Subject: LC_COLLATE.
+
+ Big patch to add, document, and test LC_COLLATE support.
+
+ A not necessarily gt a.
+
+Index: t/lib/db-hash.t
+
+ Date: Mon, 7 Oct 1996 22:03:00 +0300
+ From: Jarkko Hietaniemi
+ Subject: LC_COLLATE.
+
+ Big patch to add, document, and test LC_COLLATE support.
+
+ A not necessarily gt a.
+
+Index: t/lib/env.t
+
+ Date: Sun, 22 Sep 1996 00:59:56 +0200
+ From: Gisle Aas
+ Subject: More standard library test scripts
+
+ This is a collection of test scripts for the standard library modules.
+ Some of the tests does not pass unless some of the patches I have sent
+ out are applied.
+
+Index: t/lib/fatal.t
+
+ Date: Sun, 22 Sep 1996 00:59:56 +0200
+ From: Gisle Aas
+ Subject: More standard library test scripts
+
+ This is a collection of test scripts for the standard library modules.
+ Some of the tests does not pass unless some of the patches I have sent
+ out are applied.
+
+Index: t/lib/filecache.t
+
+ Date: Sun, 22 Sep 1996 00:59:56 +0200
+ From: Gisle Aas
+ Subject: More standard library test scripts
+
+ This is a collection of test scripts for the standard library modules.
+ Some of the tests does not pass unless some of the patches I have sent
+ out are applied.
+
+Index: t/lib/filecopy.t
+
+ Date: Sun, 22 Sep 1996 00:59:56 +0200
+ From: Gisle Aas
+ Subject: More standard library test scripts
+
+ This is a collection of test scripts for the standard library modules.
+ Some of the tests does not pass unless some of the patches I have sent
+ out are applied.
+
+Index: t/lib/filefind.t
+
+ Date: Sun, 22 Sep 1996 00:59:56 +0200
+ From: Gisle Aas
+ Subject: More standard library test scripts
+
+ This is a collection of test scripts for the standard library modules.
+ Some of the tests does not pass unless some of the patches I have sent
+ out are applied.
+
+Index: t/lib/filepath.t
+
+ Date: Sun, 22 Sep 1996 00:59:56 +0200
+ From: Gisle Aas
+ Subject: More standard library test scripts
+
+ This is a collection of test scripts for the standard library modules.
+ Some of the tests does not pass unless some of the patches I have sent
+ out are applied.
+
+Index: t/lib/findbin.t
+
+ Date: Sun, 22 Sep 1996 00:59:56 +0200
+ From: Gisle Aas
+ Subject: More standard library test scripts
+
+ This is a collection of test scripts for the standard library modules.
+ Some of the tests does not pass unless some of the patches I have sent
+ out are applied.
+
+Index: t/lib/gdbm.t
+
+ Date: Mon, 7 Oct 1996 22:03:00 +0300
+ From: Jarkko Hietaniemi
+ Subject: LC_COLLATE.
+
+ Big patch to add, document, and test LC_COLLATE support.
+
+ A not necessarily gt a.
+
+Index: t/lib/getopt.t
+
+ Date: Sun, 22 Sep 1996 00:59:56 +0200
+ From: Gisle Aas
+ Subject: More standard library test scripts
+
+ This is a collection of test scripts for the standard library modules.
+ Some of the tests does not pass unless some of the patches I have sent
+ out are applied.
+
+Index: t/lib/hostname.t
+
+ Date: Sun, 22 Sep 1996 00:59:56 +0200
+ From: Gisle Aas
+ Subject: More standard library test scripts
+
+ This is a collection of test scripts for the standard library modules.
+ Some of the tests does not pass unless some of the patches I have sent
+ out are applied.
+
+Index: t/lib/ndbm.t
+
+ Date: Mon, 7 Oct 1996 22:03:00 +0300
+ From: Jarkko Hietaniemi
+ Subject: LC_COLLATE.
+
+ Big patch to add, document, and test LC_COLLATE support.
+
+ A not necessarily gt a.
+
+Index: t/lib/odbm.t
+
+ Date: Mon, 7 Oct 1996 22:03:00 +0300
+ From: Jarkko Hietaniemi
+ Subject: LC_COLLATE.
+
+ Big patch to add, document, and test LC_COLLATE support.
+
+ A not necessarily gt a.
+
+Index: t/lib/parsewords.t
+
+ Date: Sun, 22 Sep 1996 00:59:56 +0200
+ From: Gisle Aas
+ Subject: More standard library test scripts
+
+ This is a collection of test scripts for the standard library modules.
+ Some of the tests does not pass unless some of the patches I have sent
+ out are applied.
+
+Index: t/lib/sdbm.t
+
+ Date: Mon, 7 Oct 1996 22:03:00 +0300
+ From: Jarkko Hietaniemi
+ Subject: LC_COLLATE.
+
+ Big patch to add, document, and test LC_COLLATE support.
+
+ A not necessarily gt a.
+
+Index: t/lib/searchdict.t
+
+ Date: Sun, 22 Sep 1996 00:59:56 +0200
+ From: Gisle Aas
+ Subject: More standard library test scripts
+
+ This is a collection of test scripts for the standard library modules.
+ Some of the tests does not pass unless some of the patches I have sent
+ out are applied.
+
+Index: t/lib/selectsaver.t
+
+ Date: Sun, 22 Sep 1996 00:59:56 +0200
+ From: Gisle Aas
+ Subject: More standard library test scripts
+
+ This is a collection of test scripts for the standard library modules.
+ Some of the tests does not pass unless some of the patches I have sent
+ out are applied.
+
+Index: t/lib/symbol.t
+
+ Date: Sun, 22 Sep 1996 00:59:56 +0200
+ From: Gisle Aas
+ Subject: More standard library test scripts
+
+ This is a collection of test scripts for the standard library modules.
+ Some of the tests does not pass unless some of the patches I have sent
+ out are applied.
+
+ Date: Mon, 30 Sep 1996 00:54:37 -0400
+ From: Spider Boardman
+
+ The various new lib/*.t tests didn't all work. For some, it was
+ only because the count of tests was wrong:
+
+Index: t/lib/texttabs.t
+
+ Date: Sun, 22 Sep 1996 00:59:56 +0200
+ From: Gisle Aas
+ Subject: More standard library test scripts
+
+ This is a collection of test scripts for the standard library modules.
+ Some of the tests does not pass unless some of the patches I have sent
+ out are applied.
+
+Index: t/lib/textwrap.t
+
+ Date: Sun, 22 Sep 1996 00:59:56 +0200
+ From: Gisle Aas
+ Subject: More standard library test scripts
+
+ This is a collection of test scripts for the standard library modules.
+ Some of the tests does not pass unless some of the patches I have sent
+ out are applied.
+
+Index: t/lib/timelocal.t
+
+ Date: Sun, 22 Sep 1996 00:59:56 +0200
+ From: Gisle Aas
+ Subject: More standard library test scripts
+
+ This is a collection of test scripts for the standard library modules.
+ Some of the tests does not pass unless some of the patches I have sent
+ out are applied.
+
+Index: t/op/each.t
+
+ Date: Mon, 30 Sep 1996 01:13:28 -0400
+ From: Spider Boardman
+ Subject: Re: pre extending hash? - need speed
+
+ The patch below (which is relative to perl5.001l) implements
+ "keys %hash = 50_000;" (or other integer-evaluable sizes) for
+ pre-sizing hashes. I've only moved the patch forward from
+ when I first did it. I'm sure the code in hv_ksplit could be
+ improved.
+
+ Date: Mon, 7 Oct 1996 22:03:00 +0300
+ From: Jarkko Hietaniemi
+ Subject: LC_COLLATE.
+
+ Big patch to add, document, and test LC_COLLATE support.
+
+ A not necessarily gt a.
+
+Index: t/op/glob.t
+
+ Date: Tue, 01 Oct 1996 16:37:03 -0400 (EDT)
+ From: Charles Bailey
+ Subject: Re: glob test 1 failing...bad test or bug
+
+ Under AIX 4.1.4, with LOCALE set en_GB (British english) glob test one
+ fails because <op/*> sorts op/re_* before op/rea*, while
+ $otherway = `echo op/*` sorts op/re_* after op/re[a-z]*.t
+
+ This version doesn't rely on the sorting order.
+
+Index: t/op/magic.t
+
+ Date: Mon, 7 Oct 1996 22:03:00 +0300
+ From: Jarkko Hietaniemi
+ Subject: LC_COLLATE.
+
+ Big patch to add, document, and test LC_COLLATE support.
+
+Index: t/op/readdir.t
+
+ Date: Mon, 7 Oct 1996 22:03:00 +0300
+ From: Jarkko Hietaniemi
+ Subject: LC_COLLATE.
+
+ Big patch to add, document, and test LC_COLLATE support.
+
+ A not necessarily gt a.
+
+Index: t/op/sort.t
+
+ Date: Mon, 7 Oct 1996 22:03:00 +0300
+ From: Jarkko Hietaniemi
+ Subject: LC_COLLATE.
+
+ Big patch to add, document, and test LC_COLLATE support.
+
+ A not necessarily gt a.
+
+Index: toke.c
+
+ Date: Sat, 14 Sep 1996 17:08:16 -0400
+ From: Gurusamy Sarathy
+ Subject: whitespace induced lexer errors (with patch)
+
+ I finally got around to fixing skipspace() to not indiscriminately
+ overwrite oldbufptr and oldoldbufptr (which are used in making
+ expectation decisions in the lexer).
+
+ Date: Sat, 14 Sep 1996 18:55:16 -0400
+ From: Gurusamy Sarathy
+ Subject: perl lexer won't accept C<my($a,$b);$a<=>$b;>
+
+ Date: Thu, 19 Sep 1996 11:58:22 -0400
+ From: "Randy J. Ray" <rjray@uswest.com>
+ Subject: Patch: Untaint FH flag and clean DATA handles
+
+ This patch adds a IOf_UNTAINT flag in sv.h, as one of the possibles
+ on an xpvio->xio_flags struct member. It is used to mark the given
+ file handle as a clean source, even when tainting is turned on.
+ There are also patches to pp_sys.c in pp_sysread to check this flag
+ before tainting data, and in pp_hot.c in do_readline for the same
+ reason. Lastly, it patches toke.c to automatically set this flag on
+ on a __DATA__ filehandle. The creation of the $pack::DATA
+ pseudo-filehandle is already checked against running under eval, so
+ this should not introduce any insecurity.
+
+ This patch *does not*:
+
+ * Add the "untaint" keyword.
+
+Index: util.c
+
+ Date: Mon, 7 Oct 1996 22:03:00 +0300
+ From: Jarkko Hietaniemi
+ Subject: LC_COLLATE.
+
+ Big patch to add, document, and test LC_COLLATE support.
+
+ rewrote perl_init_i18n() completely.
+ - reworded to be much more friendly and clear.
+ - perl_init_fold() split to its own function.
+ wrote mem_collxfrm().
+
+Index: utils/c2ph.PL
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+Index: utils/h2ph.PL
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+Index: utils/h2xs.PL
+
+ Date: Sat, 21 Sep 1996 16:38:24 -0500
+ From: Dean Roehrich
+ Subject: h2xs bug fix
+
+ The h2xs that is in perl5.003_05 has a regexp bug which prevents it from
+ finding #define statements and filling the constant() function. This patch
+ fixes that. The h2xs_test program found this--maybe people who are
+ modifying h2xs should get a copy of the test program.
+
+ This also adds a -d to enable debugging messages (there's just one for now).
+ I've also placed some of the doc-related things in alphabetical order.
+
+ h2xs_test can be found in my directory on CPAN. Those of you modifying
+ xsubpp should know there's a test suite for that, too, called XSTEST which
+ can also be found in my directory on CPAN.
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ Here is a patch for various typos and other defects in the Perl
+ 5.003_05 pods, including the pods embedded in library modules.
+
+Index: utils/perldoc.PL
+
+ Date: Sun, 29 Sep 1996 22:00:09 -0400 (EDT)
+ From: Kenneth Albanowski
+ Subject: perldoc patch
+
+ Ilya has found that this change makes perldoc much more useful under OS/2.
+
+Index: vms/config.vms
+
+ Date: Thu, 03 Oct 1996 16:31:46 -0400 (EDT)
+ From: Charles Bailey
+ Subject: VMS patches to 5.003_05
+
+Index: vms/descrip.mms
+
+ Date: Thu, 03 Oct 1996 16:31:46 -0400 (EDT)
+ From: Charles Bailey
+ Subject: VMS patches to 5.003_05
+
+Index: vms/genconfig.pl
+
+ Date: Thu, 03 Oct 1996 16:31:46 -0400 (EDT)
+ From: Charles Bailey
+ Subject: VMS patches to 5.003_05
+
+Index: vms/perlvms.pod
+
+ Date: Thu, 03 Oct 1996 16:31:46 -0400 (EDT)
+ From: Charles Bailey
+ Subject: VMS patches to 5.003_05
+
+Index: vms/vms.c
+
+ Date: Thu, 03 Oct 1996 16:31:46 -0400 (EDT)
+ From: Charles Bailey
+ Subject: VMS patches to 5.003_05
+
+Index: x2p/a2p.pod
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ This patch just changed the old a2p.man page into a pod page.
+
+Index: x2p/s2p.PL
+
+ Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
+ From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
+ Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
+
+ This patch just changed the old s2p.man page into a pod page.
+ I then embedded the pod into the s2p script.
+
+
+----------------
+Version 5.003_05
+----------------
+
+This patch was primarily to fix bugs and to clean up some of
+the remaining issues from in 5.003_04. The details are described below.
+A very brief summary is:
+
+o Visible Changes to Core Functionality
+
+ -Add support for a READLINE method to tied filehandles.
+
+ -times function now uses CLK_TCK if HZ is not available, rather
+ than just defaulting to 60. times output might change on some
+ systems, but should be correct now.
+
+ -AnyDBM_File (modifying ISA does not work as expected)
+ Now behaves as documented: Modifying ISA works to select
+ order in which *DB* modules are tried. The default is still
+ the same.
+
+o Configure and build enhancements
+
+ -Enhance detection of [gs]etpgrp() variants. Some systems have
+ BSD-style behavior for one and POSIX for the other. Use
+ [gs]etpgid() instead, whenever possible.
+
+ -You can now build a shared libperl.so without running through
+ the LD_RUN_PATH hoops, if your system supports appropriate
+ ld command-line options. Solaris, NetBSD, and Linux are currently
+ supported. Others are easy to add. (This makes like a lot easier
+ for embedders.)
+
+ -VMS updates.
+
+ -Fix installperl and installman so that the -n option really only
+ prints commands. (previously, it would still do the mkdirs.)
+
+o Bug fixes
+
+ -debugger ought to work.
+
+ -A new heredoc tag in Makefile.SH is now quoted. This prevented
+ 5.003_04 from working most places.
+
+ -numerous smaller ones, detailed below.
+
+o Specific Changes
+
+Here are the specific file-by-file changes.
+
+# This is my patch perl5.003_05.pat to perl5.003_04
+# The full description is below.
+# Please execute the following commands before applying this patch.
+# (You can feed this patch to 'sh' to do so.)
+# -- Andy Dougherty
+
+# We'll create a new test, but patch won't automatically make it
+# executable.
+touch t/io/read.t
+chmod +x t/io/read.t
+
+exit 0
+
+
+This is patch perl5.003_05.pat to perl version 5.003_04.
+This takes you from 5.003_04 to 5.003_05.
+
+To apply this patch, run the above commands,
+cd to your perl source directory and then type
+
+ patch -p1 -N < perl5.003_05.pat
+
+The changes are described after each /^Index/ line below. This is
+designed so you can examine each change with a command such as
+
+ csplit -k perl5.003_05.pat '/^Index:/' '{99}'
+
+Index: Changes
+
+ Updated for 5.003_05.
+
+Index: Configure
+
+ Allow command line or hint-file overrides of $afs.
+
+ Allow trailing spaces in nm output for HPUX10.
+
+ Check for newer BIND 'search' directives in /etc/resolv.conf as well
+ as older 'domain' directive.
+
+ Enhance detection of [gs]etpgrp() variants. Some systems have
+ BSD-style behavior for one and POSIX for the other. Use
+ [gs]etpgid() instead, whenever possible.
+
+ Include -s in the -h summary of available options.
+
+ Allow command-line override of $afs.
+
+ Handle trailing spaces in nm-output on HPUX10.
+
+ Set shrpenv for handling LD_RUN_PATH, if needed. (This used to
+ be in Makefile.SH. Now it's available for other modules too.)
+
+ When using shared libperl, avoid LD_RUN_PATH if possible by adding
+ correct ld flags. Currently, Solaris and NetBSD get the correct
+ -R $archlibexp/CORE, and Linux gets its
+ -Wl,-rpath,$archlibexp/CORE flag. Other contributions are
+ welcome.
+
+Index: INSTALL
+
+ Correct libperl5 -> libperl typo.
+
+ Describe MakeMaker's Warning (will try anyway) messages.
+
+ More info on where and how to send reports.
+
+ Add info on non-Unix ports.
+
+
+Index: MANIFEST
+
+ Add new test t/io/read.t.
+
+ Add new hints files for ODBM_File for ultrix and hpux.
+
+ Add new pod checker script.
+
+Index: Makefile.SH
+
+ A new heredoc tag in Makefile.SH needs to be quoted.
+
+ shrpenv stuff moved to Configure.
+
+Index: Porting/Glossary
+
+ Updated to match Configure.
+
+Index: README.vms
+
+ VMS 5.003_05 Update.
+
+Index: av.h
+
+ Subject: turbidity in av.[ch]
+ Date: Sun, 10 Dec 1995 00:21:31 -0500
+ From: Gurusamy Sarathy
+
+ Some unclean code that I noticed today.
+
+Index: config_H
+
+ Updated to match newest config_h.SH.
+
+Index: config_h.SH
+
+ Updated to match Configure.
+
+ Changed the DLSYM_NEEDS_UNDERSCORE comment to
+ /**/ to conform to metaconfig style.
+
+Index: emacs/cperl-mode.el
+
+ From: Ilya Zakharevich
+ Subject: Newer CPerl-mode
+
+Index: ext/DB_File/DB_File.pm
+
+ Update to DB_File 1.03.
+
+Index: ext/DB_File/DB_File.xs
+
+ Update to DB_File 1.03.
+
+Index: ext/Fcntl/Fcntl.pm
+
+ Date: Thu, 5 Sep 1996 18:19:14 -0400 (EDT)
+ From: Chip Salzenberg
+ Subject: No AutoLoader for Fcntl
+
+ Just like Socket, Fcntl doesn't need splitting and AutoLoading.
+
+Index: ext/FileHandle/FileHandle.pm
+
+ From: Roderick Schertler
+ Subject: FileHandle::DESTROY for fd 0
+
+ This fixes FileHandle::DESTROY when called on stdin.
+
+Index: ext/ODBM_File/ODBM_File.xs
+
+ Attempt to correct for "Bad free" in Ultrix and HPUX versions of
+ odbm.
+
+Index: ext/ODBM_File/hints/hpux.pl
+
+ Try to work around "bad free" in dbmclose().
+
+Index: ext/ODBM_File/hints/ultrix.pl
+
+ Try to work around "bad free" in dbmclose().
+
+Index: ext/Socket/Socket.pm
+
+ Date: Thu, 5 Sep 1996 09:58:08 +0200
+ From: Andreas Koenig
+ Subject: Patch to inhibit autosplit on Socket.pm
+
+ This patch inhibits production and use of a completely useless
+ auto/Socket/autosplit.ix.
+
+Index: handy.h
+
+ Make a little more C++-friendly for IBM's CSET++ compiler.
+
+Index: hints/convexos.sh
+
+ Remove [gs]etpgrp workaround. Configure & perl.h should handle
+ this now.
+
+Index: hints/hpux.sh
+
+ Add note about possible gcc GR3 warning message.
+
+ Remove [gs]etpgrp workaround. Configure & perl.h should handle
+ this now.
+
+Index: hints/sco.sh
+
+ Turn off optimization for stock cc. This appears to
+ prevent miniperl core dumps.
+
+Index: hints/solaris_2.sh
+
+ Catch GNU ld even though it doesn't identify itself as a GNU tool.
+ Thanks to Tim Pierce <twpierce@midway.uchicago.edu>.
+
+Index: hints/sunos_4_1.sh
+
+ Describe solution for the __lib_version problem with acc on
+ SunOS.
+
+Index: hv.c
+
+ Date: Thu, 05 Sep 1996 00:25:28 -0400
+ From: Gurusamy Sarathy
+ Subject: minor misc. cleanup
+
+ This patch makes some minor cleanups to the sources. No change
+ in functionality whatsoever.
+
+ Date: Thu, 05 Sep 1996 02:52:21 -0400
+ From: Gurusamy Sarathy
+
+ Subject: debugger problems--another patch (was Re: 5.003_04)
+
+ I have tried to avoid copying of hash keys that are passed to
+ magical hashes, but it seems that copying may be unavoidable
+ since the hv_*_ent() functions could be PADTMPs (and other
+ SVs that may get reused) as keys.
+
+ VMS dynamic %ENV fix
+
+Index: installman
+
+ From: scotth@sgi.com
+ Subject: Re: installperl feature request (was: Re: Upgrade 4.0x to 5.001m)
+
+ Fix installperl so that the -n option really only prints commands.
+ (previously, it would still do the mkdirs.)
+
+ an "ignore installed" option, so that it doesn't bother to check
+ to see if the target already exists (an optimization that I
+ *don't* want it to do when I do #1 above)
+
+Index: installperl
+
+ From: scotth@sgi.com
+ Subject: Re: installperl feature request (was: Re: Upgrade 4.0x to 5.001m)
+
+ Fix installperl so that the -n option really only prints commands.
+ (previously, it would still do the mkdirs.)
+
+ an "ignore installed" option, so that it doesn't bother to check
+ to see if the target already exists (an optimization that I
+ *don't* want it to do when I do #1 above)
+
+Index: lib/AnyDBM_File.pm
+
+ AnyDBM_File (modifying ISA does not work as expected)
+ Now behaves as documented: Modifying ISA works to select
+ order in which *DB* modules are tried. The default is still
+ the same.
+
+
+ Add helpful "die" message to end of AnyDBM_File. Previously
+ it would return a 0, and the failure would eventually show up
+ somewhere else in the script and be hard to track down. It is
+ a failure if perl can't open AnyDBM_File. The test regression
+ suite is supposed to indicate this as a failure too.
+
+Index: lib/ExtUtils/Install.pm
+
+ Updated to MakeMaker-5.38.
+
+ Fix for VMS utime.
+
+Index: lib/ExtUtils/Liblist.pm
+
+ Updated to MakeMaker-5.38.
+
+Index: lib/ExtUtils/MM_Unix.pm
+ Updated to MakeMaker-5.38.
+
+Index: lib/ExtUtils/MakeMaker.pm
+
+ Updated to MakeMaker-5.38.
+
+ Updated to MakeMaker-5.39 to allow CFLAGS in hint files.
+
+Index: lib/ExtUtils/Manifest.pm
+
+ Updated to MakeMaker-5.38.
+
+Index: lib/ExtUtils/Mkbootstrap.pm
+
+ Updated to MakeMaker-5.38.
+
+Index: lib/ExtUtils/Mksymlists.pm
+
+ Updated to MakeMaker-5.38.
+
+Index: lib/File/Find.pm
+
+ From: Michael Mahan <mahanm@nextwork.rose-hulman.edu>
+ Subject: Cwd::fastcwd in File::Find
+
+ Is there a good reason why File::Find uses Cwd::fastcwd instead of
+ Cwd:cwd when fastcwd isn't as portable?
+ [In particular, fastcwd() doesn't work on AFS.]
+
+Index: lib/Math/Complex.pm
+
+ There was a mistake in the sqrt routine in lib/Math/Complex.pm that
+ gave wrong answers when the magnitude of the imaginary part of the
+ argument exceeded the magnitude of the real part. Line 69 had too
+ many sqrt($y)'s. Further, expressions were re-arranged so that
+ calls to the expensive real sqrt() routine were reduced from 4 to 2
+ in this case.
+
+Index: lib/open3.pl
+
+ The I/O directions on the dad_wtr and kid_rdr were backwards.
+ IO/Open3.pm didn't have this error.
+
+Index: lib/syslog.pl
+
+ Date: Tue, 03 Sep 1996 20:33:54 -0400
+ From: Roderick Schertler
+ Subject: syslog.pl `use Socket' lossage
+
+ syslog.pl tries but fails to use
+ Socket.pm, the problem is that use doesn't return a true value. This
+ module should be recast in terms of Sys::Syslog, of course.
+
+Index: makedepend.SH
+
+ This patch eliminates "\|" in sed patterns in makedepend.SH, since
+ they're not really needed anyway in this one case.
+
+Index: mg.c
+
+ Ok, here's a tested patch for the debugger problem.
+ I was missing the fact that DB::dbline magic is actually
+ uppercase (which means hv_store_ent() etc., will pass SV keys
+ to the vtbl_dbline handlers).
+
+ Replace the oft-repeated mg_ptr incantation with
+ the simple MgPVKEY macro.
+
+ Rename MgPVKEY to MgPV (to match with HePV elsewhere). Add
+ additional parens around the "mg".
+
+ (lines near 584) Part of VMS changes. I don't know what this did.
+
+ Date: Fri, 23 Aug 1996 17:20:22 -0400 (EDT)
+ From: Chip Salzenberg
+ Subject: Integerize mg.c; eliminate warning on C< local($)) >
+
+ This patch converts magic variables ($!, $^E, etc.) to use integers
+ (C<sv_setiv>) instead of floats. It also eliminates a warning from
+ C< local($)) >, via a hack similar to $!.
+
+Index: mg.h
+
+ Replace the oft-repeated mg_ptr incantation with
+ the simple MgPVKEY macro.
+
+ Rename MgPVKEY to MgPV (to match with HePV elsewhere). Add
+ additional parens around the "mg".
+
+Index: nostdio.h
+
+ Add _STDIO_LOADED (VMS) to list of guard symbols.
+
+Index: op.c
+
+ From: Gurusamy Sarathy
+ Subject: Re: \ ( @array ) busted for lexical @array (once more)
+
+Index: patchlevel.h
+
+ Change to subversion 5.
+
+Index: perl.c
+
+ Make floating point constants Locale-friendly.
+
+Index: perl.h
+
+ One last LONG & co. fix (yet another cut'n'paste error) and a few
+ minor cleanups. Nothing crucial.
+
+ Make a little more C++-friendly for IBM's CSET++ compiler.
+
+ Enhance detection of [gs]etpgrp() variants. Some systems have
+ BSD-style behavior for one and POSIX for the other. Use
+ [gs]etpgid() instead, whenever possible.
+
+Index: perlio.c
+
+ Eliminate potential "signed vs. unsigned" warning
+
+ Add PerlIO_reopen and PerlIO_cgetname functions.
+
+Index: perlsdio.h
+
+ Don't supply redundant parameters for PerlIO_open and PerlIO_fdopen.
+
+ Include PerlIO_reopen and PerlIO_getname.
+
+ s/FILE_(CNT|PTR)_LVALUE/STDIO_(CNT|PTR)_LVALUE to fix a typo.
+ This had prevented SV_FAST_FGETS from working anywhere.
+
+ Include PerlIO_canset_cnt. I'm not sure how this is supposed to
+ differ from STDIO_CNT_LVALUE.
+
+Index: pod/Makefile
+
+ Remove trailing spaces in pods.
+ Include a call to the checkpods script in the Makefile (though it's
+ not ordinarily used by users).
+
+Index: pod/checkpods.PL
+
+ New script to check for common errors in pods. This is not
+ normally called during the perl build process, but you can
+ use it with B<make check>.
+
+Index: pod/perlfunc.pod
+
+ Document correct C<use POSIX ":wait_h";> usage.
+
+ Add notes about POSIX [gs]etpgrp.
+
+Index: pod/perlipc.pod
+
+ Document correct C<use POSIX ":wait_h";> usage.
+
+Index: pod/perlref.pod
+
+ From: Gurusamy Sarathy
+ Subject: Re: \ ( @array ) busted for lexical @array (once more)
+
+Index: pod/perltie.pod
+
+ Date: Thu, 29 Aug 1996 15:14:51 +0200
+ From: Sven Verdoolaege <skimo@breughel.ufsia.ac.be>
+ Subject: more TIEHANDLE
+
+ This adds support for a READLINE method.
+
+Index: pod/perltrap.pod
+
+ Here's documentation on the change in split's behavior between Perl 4
+ and Perl 5.
+
+ Subject: More (and less!) 425traps
+
+ Large integer traps
+
+ Precedence
+
+ warn STDERR
+
+ Change blank lines to empty lines.
+
+Index: pod/perlvar.pod
+
+ Be explicit about $/="" matching empty lines, that is, lines
+ with no spaces or tabs.
+
+ Change blank lines to empty lines.
+
+Index: pp.c
+
+ Date: Fri, 23 Aug 1996 17:22:40 -0400 (EDT)
+ From: Chip Salzenberg
+ Subject: Minor integer speedups in mathematics
+
+ This patch provides minor speedups by using integer math and SVt_IV
+ values when performing bitwise operations and modulus.
+
+ Date: Tue, 3 Sep 1996 17:49:22 -0400 (EDT)
+ From: Kenneth Albanowski
+ Subject: Pack Patch (was Re: 5.002 - pack/unpack does not do "I" right)
+
+ (double)auint cast added for call to sv_setnv().
+
+Index: pp_hot.c
+
+ Date: Thu, 05 Sep 1996 00:25:28 -0400
+ From: Gurusamy Sarathy
+ Subject: minor misc. cleanup
+
+ This patch makes some minor cleanups to the sources. No change
+ in functionality whatsoever.
+
+ Date: Thu, 29 Aug 1996 15:14:51 +0200
+ From: Sven Verdoolaege <skimo@breughel.ufsia.ac.be>
+ Subject: more TIEHANDLE
+
+ This adds support for a READLINE method.
+
+Index: pp_sys.c
+
+ Clear any buffer space exposed by by read().
+ This is almost certainly a bug-fix.
+
+ Undef and then re-define my_chsize from Perl_my_chsize to
+ just plain chsize if this system HAS_CHSIZE. This probably only
+ applies to SCO. This shows the perils of having internal
+ functions with the same name as external library functions :-).
+
+ Use CLK_TCK if HZ is not available.
+
+Index: sv.c
+
+ Fix more spots where we had PerlIO_stderr() and should have had
+ Perl_debug_log instead.
+
+ Date: Fri, 23 Aug 1996 17:26:42 -0400 (EDT)
+ From: Chip Salzenberg
+ Subject: Minor potential bug in AV creation
+
+ I wasn't the one who originated this patch. But it looks like it
+ would improve the safety of AV creation.
+
+ Remove potentially incorrect casts on PerlIO_set_ptrcnt.
+ 'ptr' is already STDCHAR, which is supposed to be the type of
+ char used in stdio.h, so we shouldn't have to cast it.
+
+Index: t/io/read.t
+
+ Clear any buffer space exposed by by read().
+ This is almost certainly a bug-fix.
+
+Index: t/lib/db-btree.t
+
+ Update to DB_File 1.03.
+
+Index: t/lib/db-hash.t
+
+ Update to DB_File 1.03.
+
+Index: t/lib/db-recno.t
+
+ Update to DB_File 1.03.
+
+Index: t/lib/io_sock.t
+
+ From: Lupe Christoph <lupe@alanya.m.isar.de>
+ Subject: Perl 5.003.03: race condition in t/lib/io_sock.t
+
+ io_sock.t works by forking a subprocess it can communicate with.
+ It has the subprocess wait for the main process by sleeping 10
+ seconds or until an alarm arrives.
+
+ With my setup, the alarm signal arrives *before* the child
+ has a chance to ignore the alarm signal.
+
+ I fixed this by moving the "$SIG{ALRM} = sub {};" up before the
+ fork. It does not hurt to have the parent ignore alarms, too.
+
+Index: t/op/inc.t
+
+ One last LONG & co. fix (yet another cut'n'paste error) and a few
+ minor cleanups. Nothing crucial.
+
+Index: t/op/misc.t
+
+ Date: Thu, 29 Aug 1996 15:14:51 +0200
+ From: Sven Verdoolaege <skimo@breughel.ufsia.ac.be>
+ Subject: more TIEHANDLE
+
+ This adds support for a READLINE method.
+
+Index: t/op/pack.t
+
+ Date: Tue, 3 Sep 1996 17:49:22 -0400 (EDT)
+ From: Kenneth Albanowski
+ Subject: Pack Patch (was Re: 5.002 - pack/unpack does not do "I" right)
+
+Index: t/op/ref.t
+
+ From: Gurusamy Sarathy
+ Subject: Re: \ ( @array ) busted for lexical @array (once more)
+
+Index: universal.c
+
+ Date: Thu, 29 Aug 96 07:05:10 BST
+ From: Graham Barr
+ Subject: Re: UNIVERSAL::class busted
+
+ yes, but I also noticed that this does not check that the reference
+ is an object, so the patch should be
+
+Index: unixish.h
+
+ Change comment style so that IBM's picky xlc compiler doesn't
+ think we've mistakenly tried to nest comments.
+
+Index: util.c
+
+ One last LONG & co. fix (yet another cut'n'paste error) and a few
+ minor cleanups. Nothing crucial.
+
+Index: utils/h2xs.PL
+
+ Date: Fri, 6 Sep 1996 06:09:20 -0400 (EDT)
+ From: Ilya Zakharevich
+ Subject: updated h2xs
+
+ Changes:
+ a) Docs and examples for -x updated;
+ b) Path to xxxx.h would not be changed to /usr/include/xxxx.h
+ unless this file exists (outside of VMS, I'm afraid to make an error
+ there). - Useful with -x option, when the file may be eaten via -I
+ inside -F.
+ c) .h file would be scanned only if needed.
+ d) typemap would be generated (with T_PTROBJ).
+ e) Documentation (=list) for autogenerated guys would be
+ included into POD.
+ f) duplicated XSUBs would not be generated;
+ g) arguments to XSUBs being arrays are recognized (note that
+ xsubpp would probably choke on such guys).
+
+ -x option requires C-Scan-0.3 (releases a couple of minutes ago to
+ ftp://ftp.math.ohio-state.edu/pub/users/ilya/perl
+ should propagate to CPAN soon).
+
+Index: utils/perlbug.PL
+
+ Fix typo $Config{'has_sockets'} ought to be $Config{'d_socket'};
+
+Index: utils/perldoc.PL
+
+ More choices in the pager war. Unfortunately, we can't rely on
+ all users agreeing with the Sysadmin's choice, nor can we
+ assign a default preference order, since opinions vary. If the
+ user doesn't have $ENV{PAGER} set, we do want to pick up one that
+ at least works, so we'll try whatever Configure found.
+
+Index: vms/Makefile
+
+ VMS 5.003_05 Update.
+
+Index: vms/config.vms
+
+ VMS 5.003_05 Update.
+
+Index: vms/descrip.mms
+
+ VMS 5.003_05 Update.
+
+Index: vms/ext/Stdio/Stdio.pm
+
+ VMS 5.003_05 Update.
+
+Index: vms/ext/filespec.t
+
+ VMS 5.003_05 Update.
+
+Index: vms/gen_shrfls.pl
+
+ VMS 5.003_05 Update.
+
+Index: vms/perlvms.pod
+
+ VMS 5.003_05 Update.
+
+Index: vms/vms.c
+
+ VMS 5.003_05 Update.
+
+Index: vms/vmsish.h
+
+ VMS 5.003_05 Update.
+
+
+----------------
+Version 5.003_04
+----------------
+
+This patch was primarily to fix bugs and to clean up some of
+the changes made in 5.003_03. The details are described below.
+A very brief summary is:
+
+o Visible Changes to Core Functionality
+
+ -Allow and document permissions for FileHandle::new and
+ IO::File::new.
+ -glob in Safe compartment used to allow shell access; now
+ it's in the same category as `` and system().
+
+o Configure and build enhancements
+
+ -perl library name is again -lperl, not -lperl5 in some cases.
+ -Several hint files no longer set -g -DDEBUGGING by default.
+ Instead, they just turn off optimization, since that is
+ probably what was intended.
+ -Include OS/2 and Plan9 updates.
+
+o Bug fixes
+
+ -SEGV with $_[0] and circular references fixed.
+ -Ilya's debugger patch.
+ -FAKE typeglobs fixed.
+ -truncate with file name now works.
+ -lval substr() no longer coredumps with refs
+ -lval substr now clears lexicals in re-entered scopes.
+ -core dump in caller() for signal handler for __DIE__.
+
+o Specific Changes
+
+Here are the specific file-by-file changes.
+
+# This is my patch perl5.003_04.pat to perl5.003_03
+# The full description is below.
+# Please execute the following commands before applying this patch.
+# (You can feed this patch to 'sh' to do so.)
+# -- Andy Dougherty
+
+# Obsolete perl4 hint file.
+rm -f hints/dnix.sh
+# Obsolete
+rm -f os2/notes
+
+# We'll create a new test, but patch won't automatically make it
+# executable.
+touch t/op/gv.t
+chmod +x t/op/gv.t
+
+exit 0
+
+
+This is patch perl5.003_04.pat to perl version 5.003_03.
+This takes you from 5.003_03 to 5.003_04.
+
+To apply this patch, run the above commands,
+cd to your perl source directory and then type
+
+ patch -p1 -N < perl5.003_04.pat
+
+The changes are described after each /^Index/ line below. This is
+designed so you can examine each change with a command such as
+
+ csplit -k perl5.003_04.pat '/^Index:/' '{99}'
+
+Index: Changes
+
+ Updated for 5.003_04.
+
+Index: Configure
+
+ Change name of shared libperl library back to libperl.so.xxx,
+ so that a simple -lperl picks up either libperl.a or
+ libperl.so.xxx.
+
+ Check if $sh='' in case we've reloaded an old config.sh
+
+Index: INSTALL
+
+ Change name of shared perl library to libperl, instead of
+ libperl5.
+
+ Add notes about fragility of shared libperl and the usefulness
+ of archlib to separate different binaries.
+
+Index: MANIFEST
+
+ os2/notes removed
+
+ obsolete hints/dnix.sh removed.
+
+ New typeglob test.
+
+Index: Makefile.SH
+
+ For building shared libperl, relocate whole rule to
+ inside the if test -f $osname/Makefile.SHs case.
+
+Index: Porting/Glossary
+
+ Updated.
+
+Index: README.os2
+
+ Updated.
+
+Index: av.c
+
+ Subject: Re: SEGV with $_[0] and circular references
+
+ Subject: random cleanup
+
+ This patch removes a few obvious redundancies in the source.
+
+Index: config_H
+
+ Updated. Note new comments to make AIX happy.
+
+Index: config_h.SH
+
+ Change /*#define../**/ into /*#define../ **/
+ to make IBM's xlc compiler shut up about nested comments.
+ The /*#define FOO /**/ is a perfectly legal un-nested comment, and
+ I wish IBM would fix it's blasted compiler instead. In the meantime
+ we'll take mercy on the poor AIX user and get rid of the screenfulls
+ of stupid warning messages. Thanks to Hallvard B Furuseth for the fix.
+
+Index: dump.c
+
+ This patch changes neither behavior nor performance. However, it does
+ reduce code size and improve maintainability by combining some common
+ code in gv_fullname() and gv_efullname().
+
+Index: ext/FileHandle/FileHandle.pm
+
+ This patch documents the behavior of FileHandle::{new,open} with
+ regard to open modes. It also documents the exportation of Fcntl
+ constants.
+
+ This patch fixes a bug observed by Tom Christiansen: FileHandle::new
+ didn't allow for file permissions after the file mode. Here's a patch.
+
+Index: ext/IO/lib/IO/File.pm
+
+ This patch fixes a bug observed by Tom Christiansen: IO::File::new
+ didn't allow for file permissions after the file mode. Here's a patch.
+
+ This patch documents the behavior of IO::File::{new,open} with
+ regard to open modes. It also documents the exportation of Fcntl
+ constants.
+
+Index: ext/Opcode/Opcode.pm
+
+ Subject: Re: glob in Safe compartment allows shell access
+
+ I've moved the glob op into the same opcode tag as backticks and system
+ and added a comment.
+
+Index: gv.c
+
+ This patch changes neither behavior nor performance. However, it does
+ reduce code size and improve maintainability by combining some common
+ code in gv_fullname() and gv_efullname().
+
+Index: handy.h
+
+ Subject: Patch for LONG_MAX & co.
+
+ Sorry about adding yet another #ifdef forest, but hopefully this
+ should resolve the *_MAX issues permanently. It adds to the
+ previously defined PERL_LONG_MAX, PERL_LONG_MIN, and PERL_ULONG_MAX
+ symbols the complete set of
+ /PERL_U?(CHAR|SHORT|INT|LONG)_(MAX|MIN)/, and installs aliases to
+ those from /(I|U)(8|16|32|V)_(MAX|MIN)/ so that for any standard
+ Perl typedef, like I32 or UV, you can reference I32_MAX or UV_MIN,
+ and get appropriate figures. All references to LONG_(MIN|MAX) are
+ changed appropriately.
+
+ The .c changes have the side effect of making cast_uv properly use quad
+ limits if quads are in use, but longs aren't 64 bit. Hopefully this all
+ works, but I don't have any handy Crays to try it out on.
+
+ Add notes on perl's internal types, specifically Quad_t and IV.
+
+Index: hints/hpux.sh
+
+ Remove the d_bsdpgrp hint. The defaults should be ok.
+
+Index: hints/irix_6_2.sh
+
+ Change optimize=-g to optimize=none to avoid pulling in -DDEBUGGING,
+ unless that's what the user really wants.
+
+Index: hints/mpeix.sh
+
+ Change optimize=-g to optimize=none to avoid pulling in -DDEBUGGING,
+ unless that's what the user really wants.
+
+Index: hints/os2.sh
+
+ Fixes for sh vs. bin_sh + cleanup.
+
+Index: hints/ultrix_4.sh
+
+ Don't call optimize=-g, just call optimize=none. The -g
+ pulls in -DDEBUGGING, which might not be wanted.
+
+Index: lib/ExtUtils/MM_Unix.pm
+
+ .C$(obj_ext) removed under OS/2 - conflicts with .c$(obj_ext).
+
+Index: lib/ExtUtils/xsubpp
+
+ Fix SCOPE? (See pod/perlxs.pod).
+ Up version number to 1.938.
+
+Index: lib/Test/Harness.pm
+
+ Add a return value to runtests - non-zero if all tests ran ok,
+ zero otherwise.
+
+Index: lib/perl5db.pl
+
+ Ilya's debugger patch.
+ Undefined subroutine &Carp::longmess called at
+ /opt/perl5.003_03/lib/perl5db.pl line 1423.
+
+
+ Make perl5db compatible with the recent 'strict refs' enforcement
+ in %SIG.
+
+Index: malloc.c
+
+ A patch to perl5.003_02/malloc to give a sensible error abort() message
+ in ANSI C, and to give it to stderr instead of stdout.
+
+ Use config_h's STRINGIFY macro instead of pre-ANSI "p".
+
+Index: mg.c
+
+ Subject: FAKE typeglobs seriously busted (with patch)
+
+ Handling of fake typeglobs (scalars that are really globs
+ in disguise) is seriously busted since 5.002 (it wasn't
+ so in 5.001n).
+ The problem is that mg_get() on a glob calls gv_efullname()
+ which might coerce its first arg to a string.
+
+ Sub-critical patch to conceivably fix some %SIG problems. (Shared hash key
+ weren't being properly detected by some of the sig magic, but as shared
+ hash keys wouldn't normally be used in %SIG it's unlikely this is a
+ significant problem.)
+
+ This patch changes neither behavior nor performance. However, it does
+ reduce code size and improve maintainability by combining some common
+ code in gv_fullname() and gv_efullname().
+
+Index: myconfig
+
+ Update perlio-related variables.
+
+Index: op.c
+
+ This patch changes neither behavior nor performance. However, it does
+ reduce code size and improve maintainability by combining some common
+ code in gv_fullname() and gv_efullname().
+
+Index: opcode.h
+
+ Updated. See opcode.pl.
+
+Index: opcode.pl
+
+ Subject: Re: truncate with file name does not work (with patch)
+
+ The prototype for truncate was changed so that perl won't die
+ with C<use strict;> when the first arg is a bareword (filehandle).
+ I think it was Tom (as in "tchrist") who brought this up.
+
+ Here's a patch that undoes the damage, makes it work with
+ C<use strict;>, and adds to the testsuite.
+
+Index: os2/Makefile.SHs
+
+ perllib vs. LIBPERL
+
+Index: os2/diff.configure
+
+ Updated.
+
+Index: os2/os2.c
+
+ SH_PATH_INI vs. BIN_SH
+
+Index: os2/os2ish.h
+
+ SH_PATH_INI added (needed to redefine SH_PATH for binary
+ distribution).
+ SH_PATH is redefined.
+
+Index: patchlevel.h
+
+ SUBVERSION 4.
+
+Index: perl.h
+
+ Subject: Patch for LONG_MAX & co.
+
+ Sorry about adding yet another #ifdef forest, but hopefully this
+ should resolve the *_MAX issues permanently. It adds to the
+ previously defined PERL_LONG_MAX, PERL_LONG_MIN, and PERL_ULONG_MAX
+ symbols the complete set of
+ /PERL_U?(CHAR|SHORT|INT|LONG)_(MAX|MIN)/, and installs aliases to
+ those from /(I|U)(8|16|32|V)_(MAX|MIN)/ so that for any standard
+ Perl typedef, like I32 or UV, you can reference I32_MAX or UV_MIN,
+ and get appropriate figures. All references to LONG_(MIN|MAX) are
+ changed appropriately.
+
+ The .c changes have the side effect of making cast_uv properly use quad
+ limits if quads are in use, but longs aren't 64 bit. Hopefully this all
+ works, but I don't have any handy Crays to try it out on.
+
+ Add notes on perl's internal types, specifically Quad_t and IV.
+
+Index: perlio.c
+
+ Removes an incorrect prototype for setlinebuf from
+ perlio.c because it conflicts with the correct declaration in
+ MachTen's stdio.h (and possibly other stdio's as well).
+
+ Secondly, the code in perlio.c is not handling the (!PERLIO_IS_STDIO &
+ HAS_F[GS]ETPOS) case. The patch fixes this omission (in a rather lumpen
+ manner). I don't think this should affect platforms which try to hack a
+ different path through the #ifdef forest, but this assertion would benefit
+ from testing...
+
+ Dominic Dunlop
+
+Index: plan9/config.plan9
+
+ Updated.
+
+Index: plan9/fndvers
+
+ Updated.
+
+Index: plan9/mkfile
+
+ Updated.
+
+Index: plan9/setup.rc
+
+ Updated.
+
+Index: pod/perldiag.pod
+
+ Subject: lval substr() coredumps with refs (with patch)
+
+ substr() coredumps with a target that is a ref, when it is used in
+ an lvalue context.
+ The patch below corrects the problem by stringifying the reference
+ first (and emitting a warning when appropriate).
+
+Index: pod/perlxs.pod
+
+ document xsubpp SCOPE:
+
+Index: pp.c
+
+ Subject: lval substr() fails to clear lexicals in re-entered scopes (with patch)
+
+ substr() in lvalue context interacts in buggy fashion with SVs that
+ are !SvOK. This manifests itself with lexicals that have a REFCNT of
+ 1, since these are merely "cleared in place" by setting SvOK_off.
+
+ Subject: lval substr() coredumps with refs (with patch)
+
+ substr() coredumps with a target that is a ref, when it is used in
+ an lvalue context.
+ The patch below corrects the problem by stringifying the reference
+ first (and emitting a warning when appropriate).
+
+ Subject: Patch for LONG_MAX & co.
+
+Index: pp_ctl.c
+
+ This patch changes neither behavior nor performance. However, it does
+ reduce code size and improve maintainability by combining some common
+ code in gv_fullname() and gv_efullname().
+
+Index: pp_hot.c
+
+ Subject: Patch for LONG_MAX & co.
+
+ This patch changes neither behavior nor performance. However, it does
+ reduce code size and improve maintainability by combining some common
+ code in gv_fullname() and gv_efullname().
+
+Index: pp_sys.c
+
+ This patch changes neither behavior nor performance. However, it does
+ reduce code size and improve maintainability by combining some common
+ code in gv_fullname() and gv_efullname().
+
+Index: proto.h
+
+ This patch changes neither behavior nor performance. However, it does
+ reduce code size and improve maintainability by combining some common
+ code in gv_fullname() and gv_efullname().
+
+Index: run.c
+
+ This patch changes neither behavior nor performance. However, it does
+ reduce code size and improve maintainability by combining some common
+ code in gv_fullname() and gv_efullname().
+
+Index: sv.c
+
+ Subject: random cleanup
+
+ This patch removes a few obvious redundancies in the source.
+
+ Subject: sv_setsv patch
+
+ This patch changes neither behavior nor performance. However, it does
+ reduce code size and improve maintainability by combining some common
+ code in gv_fullname() and gv_efullname().
+
+ From: Chip Salzenberg
+ Subject: Track SVs for destruction when -DPURIFY
+
+ When checking for memory leaks, I compiled Perl with "-DPURIFY".
+ Although that flag improves the leak checking, it also breaks
+ destruction of global objects, because SVs aren't kept in captive
+ arenas any more.
+
+ This patch rectifies the problem by providing an alternative
+ method for keeping track of SVs when Perl is compiled for Purify.
+ It has no effect on normal operation.
+
+
+ Add comment about assert(len >=0) when len is unsigned anyway.
+
+Index: t/io/fs.t
+
+ Subject: Re: truncate with file name does not work (with patch)
+
+ The prototype for truncate was changed so that perl won't die
+ with C<use strict;> when the first arg is a bareword (filehandle).
+ I think it was Tom (as in "tchrist") who brought this up.
+
+ Here's a patch that undoes the damage, makes it work with
+ C<use strict;>, and adds to the testsuite.
+
+ The "not implemented" branch is missing a "\n".
+
+Index: t/op/gv.t
+
+ Subject: FAKE typeglobs seriously busted (with patch)
+
+ Handling of fake typeglobs (scalars that are really globs
+ in disguise) is seriously busted since 5.002 (it wasn't
+ so in 5.001n).
+
+ The problem is that mg_get() on a glob calls gv_efullname()
+ which might coerce its first arg to a string.
+
+Index: t/op/substr.t
+
+
+ Subject: lval substr() fails to clear lexicals in re-entered scopes (with patch)
+
+ substr() in lvalue context interacts in buggy fashion with SVs that
+ are !SvOK. This manifests itself with lexicals that have a REFCNT of
+ 1, since these are merely "cleared in place" by setting SvOK_off.
+
+ Subject: lval substr() coredumps with refs (with patch)
+
+ substr() coredumps with a target that is a ref, when it is used in
+ an lvalue context.
+ The patch below corrects the problem by stringifying the reference
+ first (and emitting a warning when appropriate).
+
+Index: toke.c
+
+ Subject: Re: truncate with file name does not work (with patch)
+
+ The prototype for truncate was changed so that perl won't die
+ with C<use strict;> when the first arg is a bareword (filehandle).
+ I think it was Tom (as in "tchrist") who brought this up.
+
+ Here's a patch that undoes the damage, makes it work with
+ C<use strict;>, and adds to the testsuite.
+
+Index: util.c
+
+ Subject: Re: Perl 5.003 dumps core executing caller() in signal handler for
+ __DIE__ (with patch)
+
+ sv_2pv() might call croak() (which is not prepared to handle that
+ when it calls sv_2pv(), itself). Likewise for warn() (but under
+ slightly more esoteric circumstances--mg_get() in sv_2pv() might
+ trigger a call to warn()).
+
+
+ Subject: Patch for LONG_MAX & co.
+
+ PERL_BADLANG is examined by default before issuing a warning during
+ internationalization.
+
+Index: utils/h2xs.PL
+
+ Make leading =head NAME item a paragraph so pod2man finds it.
+
+Index: utils/perldoc.PL
+
+ Use col -x to filter out half-line feeds (ESC-9) from
+ HP-UX nroff -man output. (col -x isn't portable -- SunOS
+ doesn't support the -x option.)
+
+
+----------------
+Version 5.003_03
+----------------
+
+Most of the changes in 5.003_03 are to make the build and installation
+process more robust. The details are described below. A very brief
+summary is:
+
+o Visible Changes to Core Functionality
+
+ -Support for tied filehandles.
+
+o Configure enhancements
+
+ -How to build and install a shared libperl.so is now documented
+ and supported, though it's not the default for most platforms.
+
+o Bug fixes
+
+ -Support bit operations on strings longer than 15 bytes.
+
+ -If a regex supplied to split() contains paranthesized subpatterns
+ that can result in null matches, perl no longer coredumps.
+
+ -Fix problems with each() on tied hashes.
+
+ -Make h2ph architecture-independent by using Config at run-time
+ rather than extraction time.
+
+o Specific Changes
+
+Here are the specific file-by-file changes.
+
+# This is my patch perl5.003_03.pat to perl5.003_02
+# The full description is below.
+# Please execute the following commands before applying this patch.
+# (You can feed this patch to 'sh' to do so.)
+# -- Andy Dougherty
+
+# Absorbed into Changes5.002
+rm -f Changes.Conf
+
+# Not needed.
+rm -f ext/POSIX/mkposixman.pl
+
+# Moved to README.os2. I'm not sure why the README files are
+# here rather than in the appropriate subdirectories.
+rm -f os2/README
+
+# Not needed.
+rm -f pod/Makefile.PL
+
+# New test for bit ops.
+touch t/op/bob.t
+
+# Patches that create new tests don't always make them executable.
+chmod +x t/*/*.t
+
+# Create a new directory for Porting and Patching info.
+mkdir Porting
+
+exit 0
+
+This is patch perl5.003_03.pat to perl version 5.003_02.
+This takes you from 5.003_02 to 5.003_03.
+
+To apply this patch, run the above commands,
+cd to your perl source directory and then type
+
+ patch -p1 -N < perl5.003_03.pat
+
+The changes are described after each /^Index/ line below. This is
+designed so you can examine each change with a command such as
+
+ csplit -k perl5.003_03.pat '/^Index:/' '{99}'
+
+Index: Changes
+
+ Include 5.003_03 change notes.
+
+ Move older change notes to separate files.
+
+Index: Changes5.000
+
+ New file. Changes from perl4.036 to 5.000.
+
+Index: Changes5.001
+
+ New file. Changes from 5.000 to 5.001
+
+Index: Changes5.002
+
+ New file. Changes from 5.001 to 5.002
+
+Index: Changes5.003
+
+ New file. Changes from 5.002 to 5.003
+
+Index: Configure
+
+ Relaxed warning about ksh on exotic machines.
+
+ Changed usesafe to useopcode.
+
+ Add search for gzip and zip.
+
+ Look more carefully for $sh (the Bourne-ish shell).
+ Use that info to set $startsh correctly.
+
+ Change prompts for PerlIO interface. See INSTALL
+ for how this is supposed to work. The default is
+ still the same as in 5.003_02, namely don't use
+ any fancy new PerlIO stuff.
+
+ Don't look for sigvec() since we don't actually use it.
+ (Plus, it used to print an alarming misleading message about
+ race conditions.)
+
+ Look for stdio's _filbuf under the possible names of
+ _filbuf, __filbuf, and _fill.
+
+ New $useshrplib variable to control whether we build a shared
+ libperl.so. The name of the library is in $libperl.
+ Always install it in $installarchlib/CORE/$libperl.
+
+ Check for <sys/resource.h> and <sys/wait.h> for NetBSD.
+
+ Replace old $altmake stuff with newer autoconf-ish
+ $make_set_make, which checks if $make sets $(MAKE). Now you
+ choose an alternate make with sh Configure -Dmake=gmake (or
+ whatever).
+
+ Remove 'ln' for the list of essential commands. Simulate
+ it with 'cp' if necessary.
+
+ Change `logname` prompts to handle extra gratuitous spaces in
+ Ultrix output.
+
+ Autodetect os2.
+
+ Fix silly bug in checking for fully-qualified names in /etc/hosts.
+
+ Generalize Gconvert tests. Give correct and more useful
+ error messages.
+
+ Use $obj_ext instead of literal '.o' in the dynaloader test.
+
+ Include appropriate header files in bcopy() and memcpy()
+ tests. Note whether memmove is available.
+
+ Check whether struct sigaction works (needed for Solaris 2.5
+ with -Xc).
+
+ Include appropriate header files for randbits test.
+
+Index: INSTALL
+
+ Add note about space requirements.
+
+ Update to match Configure changes (Opcode vs. Safe,
+ useperlio, useshrplib, etc.)
+
+ Reorganize the structure of some of the hints.
+
+ Miscellaneous clarifications.
+
+Index: MANIFEST
+
+ Updated. 5.003_02 introduced some massive patches, mostly
+ due to spacing changes. I didn't bother to sort them all out;
+ I just started with 5.003's MANIEFST.
+
+Index: Makefile.SH
+
+ Support the new simplified shared libperl mechanism.
+
+ Use new $make_set_make directive.
+
+ Remove redundant libperl Make variable.
+
+ Remove unnecessary MAB variable.
+
+ Remove dependency of minitest on lib/Config.pm, since it could
+ well have been a failure of configpm that inspired testing
+ miniperl in the first place!
+
+Index: Porting/Glossary
+
+ New file describing all the config.sh variables.
+ Eventually, I hope to fill this directory with other useful
+ stuff.
+
+Index: README.os2
+
+ Replace old README.os2 with more up-to-date os2/README.
+
+Index: config_H
+
+ Updated to match current Configure and config_h.SH.
+ Some rearrangement of parts has occurred due to new
+ dependencies in the metaconfig units.
+
+Index: config_h.SH
+
+ Updated to match current Configure and config_h.SH.
+ Some rearrangement of parts has occurred due to new
+ dependencies in the metaconfig units.
+
+ Include full descriptions of ARCHLIB, OLDARCHLIB, PRIVLIB,
+ SITEARCH, and SITELIB. Previous versions just included the
+ ~-expanded names (with unhelpful descriptions). No functionality
+ is changed, but maybe it's a little better documented now.
+
+Index: doio.c
+
+ Possibly Include <signal.h> and <unistd.h>
+
+Index: doop.c
+
+ No longer prefer bcmp over memcmp when order doesn't matter.
+
+ Support bit operations on strings longer than 15 bytes.
+
+Index: embed.h
+
+ Auto-generated.
+
+Index: embed.pl
+
+ Expand warning at the top.
+
+Index: ext/IO/IO.pm
+
+ Clean up docmentation installation errors.
+
+Index: ext/IO/lib/IO/Seekable.pm
+
+ Clean up docmentation installation errors.
+
+Index: ext/IO/lib/IO/Select.pm
+
+ Clean up docmentation installation errors.
+
+Index: ext/Opcode/Opcode.xs
+
+ Add support for tied filehandles.
+
+Index: ext/SDBM_File/sdbm/sdbm.h
+
+ Change the Mymalloc to match Perl_malloc in perl.h.
+
+Index: ext/util/make_ext
+
+ Typo change.
+ Get rid of unused altmake.
+
+Index: global.sym
+
+ Fix problems with each() on tied hashes.
+
+Index: handy.h
+
+ Change safe*alloc functions to have prototypes that
+ match the system's malloc and free types. That is, use
+ Malloc_t instead of char *, and Free_t instead of void.
+ This is necessary so . . .
+
+ Safefree cast matches type of free() whether it's perl's
+ malloc/free or the system's malloc/free.
+
+Index: hints/README.hints
+
+ Remove out-of-date info.
+
+ Document a bit about how hint files work.
+
+Index: hints/aix.sh
+
+ qmaxmem hint doesn't apply to gcc.
+
+Index: hints/dgux.sh
+
+ Configure will now automatically detect shared libperl stuff.
+
+Index: hints/dynixptx.sh
+
+ Fix typo in comment.
+
+ Configure will now automatically detect shared libperl stuff.
+
+Index: hints/epix.sh
+
+ Use glibpth instead of libpth. This allows Configure to
+ add local directories, such as /opt/local/lib, etc.
+
+Index: hints/irix_6_2.sh
+
+ Include some info on cc -n32 compile.
+
+Index: hints/linux.sh
+
+ Configure now tests gcvt() more thoroughly.
+
+Index: hints/machten_2.sh
+
+ Update where to find dld.
+
+Index: hints/mips.sh
+
+ Use glibpth instead of libpth.
+
+Index: hints/next_3.sh
+
+ Build up $mab dynamically. Since $mab isn't used anywhere
+ anymore, this is useless. However, $mab was never used for
+ next_3.sh anyway, so there's been no change in functionality.
+
+Index: hints/next_4.sh
+
+ Get rid of extraneous isnext_4 variable. Configure and
+ Makefile.SH will use $osname and $osvers instead.
+
+ Build up $mab dynamically based on available architectures.
+
+ Absorb $mab into ccflags and ccdlflags. I hope that will
+ cover everything. (Configure should automatically remove
+ the -arch stuff from cppflags.)
+
+ Configure now knows next4 needs to use a shared libperl.5.so.
+
+ Allow users to use -Dprefix.
+
+Index: hints/os2.sh
+
+ Try to update to reflect newer shared libperl stuff.
+ I probably goofed :-).
+
+Index: hints/sco.sh
+
+ Additional notes on using icc.
+
+ Additional flags for dynamic loading.
+
+Index: hints/solaris_2.sh
+
+ Perl.h no longer prefers bcmp, so it's again ok if Configure
+ finds them, since perl will prefer the mem* versions anyway.
+
+Index: hints/sunos_4_0.sh
+
+ Don't include <unistd.h>
+
+Index: hints/sunos_4_1.sh
+
+ Add brief note about GNU as and ld.
+
+ Don't include <unistd.h>
+
+ Add notes about WHOA THERE messages.
+
+Index: hints/titanos.sh
+
+ Include sfio in libswanted.
+
+ Don't set libpth any more.
+
+Index: hints/umips.sh
+
+ New hint file.
+
+Index: hv.c
+
+ Use memcmp even in cases where ordering doesn't matter.
+
+ Fix problems with each() on tied hashes.
+
+Index: installperl
+
+ Simplify installation of shared libperl.so.
+
+ Avoid reaching Command Failed!!! with /usr/bin/perl.
+
+Index: lib/AutoSplit.pm
+
+ Clean up docmentation installation errors.
+
+Index: lib/ExtUtils/MM_Unix.pm
+
+ Remove MAB references.
+
+ Use 'useshrplib' instead of 'd_shrplib'
+
+Index: lib/ExtUtils/MakeMaker.pm
+
+ Remove mab references.
+
+Index: lib/FindBin.pm
+
+ Clean up docmentation installation errors.
+
+Index: lib/Symbol.pm
+
+ Put back in the BEGIN { require 5.002; }. The version in
+ 5.003_02 wouldn't work in 5.002 anyway. Further, the whole
+ point of the construct is to catch 5.001m, so we can't use
+ syntax introduced after 5.001m to do that.
+
+Index: lib/Text/Wrap.pm
+
+ Remove double 'use strict'.
+
+Index: lib/perl5db.pl
+
+ Add explicit '&' to avoid warnings under strict refs.
+
+Index: lib/sigtrap.pm
+
+ Clean up docmentation installation errors.
+
+Index: makedepend.SH
+
+ Use Configure's $sh and $make_set_make variables.
+
+Index: mg.c
+
+ Include <unistd.h>
+
+ Use Safefree() macro instead of safefree() function with
+ a (possibly) incorrect cast. The whole point of the
+ Safefree() macro is that it does the correct cast for you.
+
+
+Index: patchlevel.h
+
+ Change to SUBVERSION 3.
+
+Index: perl.c
+
+ Include <unistd.h>
+
+Index: perl.h
+
+ No longer prefer bcmp slightly for comparisons that don't care
+ about ordering.
+
+ Rely on Configure setting SH_PATH.
+
+ Change the function name to Pause() instead of pause() to
+ avoid potential prototype problems. (This naming convention
+ is similar to the Fwrite and Fflush macros.)
+
+ Fix problems with each() on tied hashes.
+
+ Work around crypt prototype problem on NeXT.
+
+Index: perlio.c
+
+ Fixes to support non-std stdio.
+
+Index: perlio.h
+
+ Try to document the various #defines a bit. This is far from
+ finished.
+
+ Remove a lot of trailing whitespace. (It's of no consequence, but
+ but I'm not going to redo the patch just to put back in the trailing
+ whitespace either.)
+
+Index: perlsdio.h
+
+ Fixes to support non-std stdio.
+
+Index: perly.c
+
+ Restore use of Safefree() macro.
+
+Index: perly.c.diff
+
+ Restore use of Safefree() macro.
+
+Index: perly.h
+
+ Delete duplicate line.
+
+Index: plan9/buildinfo
+
+ Update.
+
+Index: pod/perlapio.pod
+
+ Clean up docmentation installation errors.
+
+Index: pod/perlipc.pod
+
+ Fix typo.
+
+ Untaint port number.
+
+Index: pod/perlmod.pod
+
+ Fix a minor nit regarding Exporter.
+
+Index: pod/perlre.pod
+
+ Clean up docmentation installation errors.
+
+Index: pod/perltie.pod
+
+ Add support for tied filehandles.
+
+Index: pod/perltrap.pod
+
+ Clean up docmentation installation errors.
+
+Index: pod/perlxstut.pod
+
+ Clean up docmentation installation errors.
+
+Index: pod/pod2man.PL
+
+ Clean up docmentation installation errors.
+
+Index: pp.c
+
+ Add support for tied filehandles.
+
+ If a regex supplied to split() contains paranthesized subpatterns
+ that can result in null matches, perl coredumps.
+
+Index: pp_hot.c
+
+ Use memcmp instead of bcmp even when we don't care about order.
+
+ Add support for tied filehandles.
+
+Index: pp_sys.c
+
+ Include <unistd.h>, <sys/wait.h>, and <sys/resource.h>.
+ (The latter two are especially for NetBSD.)
+
+ Don't assume sys/time.h and sys/select.h can't coexist.
+
+ Use Pause macro.
+
+Index: proto.h
+
+ Fix safe*alloc and safefree prototypes.
+
+Index: regexec.c
+
+ Use memcmp instead of bcmp even when we don't care about order.
+
+Index: sv.c
+
+ Use memcmp instead of bcmp even when we don't care about order.
+
+Index: t/lib/opcode.t
+
+ Add support for tied filehandles.
+
+Index: t/op/bop.t
+
+ Support bit operations on strings longer than 15 bytes.
+
+Index: t/op/misc.t
+
+ Add support for tied filehandles.
+
+Index: t/op/split.t
+
+ If a regex supplied to split() contains paranthesized subpatterns
+ that can result in null matches, perl coredumps.
+
+Index: toke.c
+
+ Include <unistd.h>.
+
+ Use memcmp instead of bcmp even when we don't care about order.
+
+Index: util.c
+
+ Include <unistd.h>.
+
+ Use correct types for safe*alloc and safefree functions.
+
+Index: utils/h2ph.PL
+
+ Make h2ph architecture-independent by using Config at run-time
+ rather than extraction time.
+
+Index: writemain.SH
+
+ Remove unnecessary curlies. (They are a leftover from
+ an older auto_init mechanism.)
+
+Index: x2p/Makefile.SH
+
+ Use Configure's $sh and $make_set_make.
+
+ Remove MAB stuff, since it's now in ccflags.
+
+ Keep 5.003's RCS info.
+
+Index: x2p/a2p.h
+
+ Keep 5.003's RCS info.
+
+Index: x2p/str.c
+
+ Use Configure's FILE_filbuf macro instead of a raw _filbuf.
+
+
+----------------
+Version 5.003_02
+----------------
+
+o Visible Changes to Core Functionality
+ - Redefining constant subs, or changing sub's prototype now give warnings.
+ - Fixes for ++/-- of values close to max/min size of an integer
+ - Warning for un-qualified bareword as handler in $SIG{}.
+ - UNIVERSAL::isa can now be called as static method.
+
+o Changes in Core Internals
+ - PerlIO abstraction added.
+ Perl core and standard extensions no longer assume ANSI C's stdio is IO
+ mechanism, Default Configure mode is still to use stdio via set of C macros.
+ Alternate modes are to use stdio via one perlio.c module, or
+ to use sfio if available.
+
+ - Several bug fixs from perl5-porters
+ - Make sources non-ANSI C correct again.
+ - SUPER in gv.c
+ - Last of shared-hash-key patches
+ - eval '(0,1..3)'; # --> SegFault
+ - coredumps after simple subsitutes.
+ - Correction to UNIVERSAL::VERSION docs.
+ - Fixed io_udp test.
+ - Fixed another abuse of malloc'ed memory.
+ - Enabled DEBUGING_MSTATS whenever perl's malloc() is used.
+ - Reverted to default of not hiding perl's malloc (if used).
+
+o Changes in the Standard Library and Utilities
+ - Fixed MakeMaker for static SDBM and builing in a link tree.
+ - Upgraded to IO-1.09, and includes latest (still experimental) IO::Select.
+ - Documentation/test tweak to DB_File
+ - h2xs upgrade to allow use C::Scan module
+
+o Changes in OS-specific and Build-time Support
+ - Attempted to re-created 5.003_01's NeXT support with metaconfig units.
+ - Updated MANIFEST
+ - make minitest now depends on lib/Config.pm, as some of tests require it.
+ - Included latest plan9 sub-directory
+ - Applied OS/2 patches.
+ - Typo patch for VMS.
+
+
+----------------
+Version 5.003_01
+----------------
+
+Version 5.003_01 contains bugfixes and additions accumulated since
+version 5.002_01, since the patch to version 5.003 was deliberately
+kept simple. In addition to numerous small bugfixes in the core,
+library files, and documentation, this patch contains several
+significant revisions, summarized below:
+
+o Visible Changes to Core Functionality
+
+ - A port to Plan9 has been started, and changes are integrated into
+ the standard distribution. As of this release, the Perl core
+ and several common extensions are working.
+
+ - A set of basic methods in the UNIVERSAL class have been added to
+ the Perl core. Since UNIVERSAL is an implicit member of every
+ class's @ISA, the methods can be called via any object.
+
+ - A mandatory warning has been added for 'declarations' of lexical
+ variables using the "my" operator which mask an existing lexical
+ variable declared in the same scope, making the previous variable
+ inaccessible by its name.
+
+ - The "use" and "require" operators have been extended to allow
+ checking of the required module's version. The "use" operator
+ can now be used for an immediate version check of Perl itself.
+
+ - A new "strict" pragma, "strict untie", has been added, which
+ produces an error if a tied value is untied when other references
+ exist to the internal object implementing the tie.
+
+ - Barewords used as associative array keys (i.e. when specifying
+ an associative array element like $foo{__BAR} or on the left
+ side of the => operator) may now begin with an underscore as
+ well as an alphabetic character.
+
+ - Some of the configuration information previously produced by the
+ -v switch has been moved to the -V switch, in order to keep -v
+ output concise.
+
+o Changes in Core Internals
+
+ - Symbol table and method lookups have been made faster.
+
+ - Perl subroutines which just return a constant value are now
+ optimized at compile time into inline constants.
+
+ - Management of keys for associative arrays has been improved to
+ conserve space when the same keys are reused frequently, and
+ to pass true Perl values to tie functions, instead of stringified
+ representations.
+
+ - Messages normally output to stderr may be directed to another
+ stream when Perl is built. This allows some platforms to
+ present diagnostic output in a separate window from normal
+ program results.
+
+ - A bug which caused suiperl to fail silently, albeit securely,
+ in version 5.003 on some systems has been fixed.
+
+ - Management of Unix-style signal handlers via the %SIG associative
+ array has been made safer.
+
+ - Several global C symbols have been renamed to eliminate collisions
+ with system C header files or libraries on some platforms.
+ Unfortunately, this means that dynamic extensions compiled under
+ previous versions of Perl will need to be rebuilt for Perl
+ 5.003_01. We're in the process of cleaning up Perl's C
+ namespace to make it easier to link Perl with other binaries,
+ so this will probably happen again between now and version 5.004.
+ After that, we'll do our best to maintain binary compatibility
+ between versions.
+
+ - An alternate allocation strategy has been added to Perl's
+ optional private memory management routines. This strategy,
+ which may be selected when Perl is built, is designed to
+ conserve memory in programs which allocate many small
+ chunks of memory with sizes near a power of 2, as is often
+ the case in Perl programs.
+
+ - Several memory leaks in the creation and destruction of
+ multiple interpreters have been fixed.
+
+o Changes in the Standard Library and Utilities
+
+ - The Opcode extension, which allows you to control a program's
+ access to Perl operations, has been added to the standard
+ distribution. This extends the work begun in the original
+ Safe extension, and subsumes it. The Safe interface is still
+ available.
+
+ - The IO extension, which provides a set of classes for object-
+ oriented handling of common I/O tasks, has been added to the
+ standard distribution. The IO classes will form the basis
+ for future development of Perl's I/O interface, and will
+ subsume the FileHandle class in the near future. The default
+ class to which all Perl I/O handles belong is now IO::Handle,
+ rather than FileHandle.
+
+ - The ExtUtils::Embed library module, which provides a set
+ of utility function to help in embedding Perl in other
+ applications, has been added to the standard distribution.
+
+ - The Fatal library module, which provides a simple interface
+ for creating "do-or-die" equivalents of existing functions,
+ has been added to the standard distribution.
+
+ - The FindBin library module, which determines the full path
+ to the currently executing program, has been added to the
+ standard distribution.
+
+ - The DB_File extension, and the Getopt::Long, Test::Harness,
+ Text::Tabs, Text::Wrap, Time::Local and sigtrap library modules
+ have been updated to the authors' latest versions.
+
+ - The Carp library module now considers the @ISA chain when
+ determining the caller's package for inclusion in error messages.
+
+ - The h2xs, perlbug, and xsubpp utilities have been updated.
+
+ - The standard Perl debugger has been updated, and the information
+ provided to the debugger when an XSUB is called has been improved,
+ making it possible for alternate debuggers (such as Devel::DProf)
+ to do a better job of tracking XSUB calls.
+
+ - The pod documentation formatting tools in the standard distribution
+ can now handle characters in the input stream whose high bit is set.
+
+ - The cperl-mode EMACS editing mode has been updated.
+
+o Changes in Documentation
+
+ - Typographic and formatting errors have been corrected in the pod
+ documentation for the core and standard library files
+
+ - Explanations of several core operators have been improved
+
+ - The perldebug, perlembed, perlipc, perlsec, and perltrap documents
+ extensively revised.
+
+o Changes in OS-specific and Build-time Support
+
+ - Support for the NeXT platform has been extended through
+ NeXTSTEP/OPENSTEP 4.0, and now includes the ability to create MABs.
+
+ - Support for OS/2 has been extended as well, and now includes
+ options for building a.out binaries.
+
+ - Support for VMS has also been extended, incorporating improved
+ processing of file specification strings, optional suppression of
+ carriage control interpretation for record-structured files,
+ improved support for the -S command line switch, a number of
+ VMS-specific bugfixes, and significantly improved performance
+ in line-oriented reading of files.
+
+ - Several hints files have been added or updated: aux.sh (updated),
+ convexos.sh (updated), irix_4.sh (updated), irix_5.sh (updated),
+ irix_6_2.sh (updated), next_3.sh (updated), next_3_2.sh (new),
+ next_3_3.sh (new), next_4.sh (new), os2/sh (updated),
+ sco.sh (updated), and solaris_2.sh (updated).
+
+ - The test driver for the regression tests now reports when a set
+ of tests have been skipped (presumable because the operation
+ they're designed to test isn't supported on the current system).
diff --git a/gnu/usr.bin/perl/Copying b/gnu/usr.bin/perl/Copying
index 3c68f02bb42..43cd72c3e01 100644
--- a/gnu/usr.bin/perl/Copying
+++ b/gnu/usr.bin/perl/Copying
@@ -2,7 +2,7 @@
Version 1, February 1989
Copyright (C) 1989 Free Software Foundation, Inc.
- 675 Mass Ave, Cambridge, MA 02139, USA
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@@ -215,8 +215,8 @@ the exclusion of warranty; and each file should have at least the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
Also add information on how to contact you by electronic and paper mail.
diff --git a/gnu/usr.bin/perl/Policy_sh.SH b/gnu/usr.bin/perl/Policy_sh.SH
new file mode 100644
index 00000000000..52a2c57da5e
--- /dev/null
+++ b/gnu/usr.bin/perl/Policy_sh.SH
@@ -0,0 +1,153 @@
+case $CONFIG in
+'') . ./config.sh ;;
+esac
+echo "Extracting Policy.sh (with variable substitutions)"
+$spitshell <<!GROK!THIS! >Policy.sh
+$startsh
+#
+# This file was produced by running the Policy_sh.SH script, which
+# gets its values from config.sh, which is generally produced by
+# running Configure. The Policy.sh file gets overwritten each time
+# Configure is run. Any variables you add to Policy.sh will be lost
+# unless you copy Policy.sh somewhere else before running Configure.
+#
+# The idea here is to distill in one place the common site-wide
+# "policy" answers (such as installation directories) that are
+# to be "sticky". If you keep the file Policy.sh around in
+# the same directory as you are building Perl, then Configure will
+# (by default) load up the Policy.sh file just before the
+# platform-specific hints file.
+#
+
+# Allow Configure command-line overrides; usually these won't be
+# needed, but something like -Dprefix=/test/location can be quite
+# useful for testing out new versions.
+
+#Site-specific values:
+
+case "\$perladmin" in
+'') perladmin='$perladmin' ;;
+esac
+
+# Installation prefix. Allow a Configure -D override. You
+# may wish to reinstall perl under a different prefix, perhaps
+# in order to test a different configuration.
+case "\$prefix" in
+'') prefix='$prefix' ;;
+esac
+
+# Installation directives. Note that each one comes in three flavors.
+# For example, we have privlib, privlibexp, and installprivlib.
+# privlib is for private (to perl) library files.
+# privlibexp is the same, except any '~' the user gave to Configure
+# is expanded to the user's home directory. This is figured
+# out automatically by Configure, so you don't have to include it here.
+# installprivlib is for systems (such as those running AFS) that
+# need to distinguish between the place where things
+# get installed and where they finally will reside.
+#
+# In each case, if your previous value was the default, leave it commented
+# out. That way, if you override prefix, all of these will be
+# automatically adjusted.
+#
+# WARNING: Be especially careful about architecture-dependent and
+# version-dependent names, particularly if you reuse this file for
+# different versions of perl.
+
+!GROK!THIS!
+
+for var in bin scriptdir privlib archlib \
+ man1dir man3dir sitelib sitearch \
+ installbin installscript installprivlib installarchlib \
+ installman1dir installman3dir installsitelib installsitearch \
+ man1ext man3ext; do
+
+ case "$var" in
+ bin) dflt=$prefix/bin ;;
+ # The scriptdir test is more complex, but this is probably usually ok.
+ scriptdir)
+ if $test -d $prefix/script; then
+ dflt=$prefix/script
+ else
+ dflt=$bin
+ fi
+ ;;
+ privlib)
+ case "$prefix" in
+ *perl*) dflt=$prefix/lib/$version ;;
+ *) dflt=$prefix/lib/$package/$version ;;
+ esac
+ ;;
+ archlib)
+ case "$prefix" in
+ *perl*) dflt=$prefix/lib/$version/$archname ;;
+ *) dflt=$prefix/lib/$package/$version/$archname ;;
+ esac
+ ;;
+ sitelib)
+ case "$prefix" in
+ *perl*) dflt=$prefix/lib/site_perl/$apiversion ;;
+ *) dflt=$prefix/lib/$package/site_perl/$apiversion ;;
+ esac
+ ;;
+ sitearch)
+ case "$prefix" in
+ *perl*) dflt=$prefix/lib/site_perl/$apiversion/$archname ;;
+ *) dflt=$prefix/lib/$package/site_perl/$apiversion/$archname ;;
+ esac
+ ;;
+ man1dir) dflt="$prefix/man/man1" ;;
+ man3dir)
+ case "$prefix" in
+ *perl*) dflt=`echo $man1dir |
+ sed -e 's/man1/man3/g' -e 's/man\.1/man\.3/g'` ;;
+ *) dflt=$privlib/man/man3 ;;
+ esac
+ ;;
+
+ # Can we assume all sed's have greedy matching?
+ man1ext) dflt=`echo $man1dir | sed -e 's!.*man!!' -e 's!^\.!!'` ;;
+ man3ext) dflt=`echo $man3dir | sed -e 's!.*man!!' -e 's!^\.!!'` ;;
+
+ # It might be possible to fool these next tests. Please let
+ # me know if they don't work right for you.
+ installbin) dflt=`echo $binexp | sed 's#^/afs/#/afs/.#'`;;
+ installscript) dflt=`echo $scriptdirexp | sed 's#^/afs/#/afs/.#'`;;
+ installprivlib) dflt=`echo $privlibexp | sed 's#^/afs/#/afs/.#'`;;
+ installarchlib) dflt=`echo $archlibexp | sed 's#^/afs/#/afs/.#'`;;
+ installsitelib) dflt=`echo $sitelibexp | sed 's#^/afs/#/afs/.#'`;;
+ installsitearch) dflt=`echo $sitearchexp | sed 's#^/afs/#/afs/.#'`;;
+ installman1dir) dflt=`echo $man1direxp | sed 's#^/afs/#/afs/.#'`;;
+ installman3dir) dflt=`echo $man3direxp | sed 's#^/afs/#/afs/.#'`;;
+ esac
+
+ eval val="\$$var"
+ if test X"$val" = X"$dflt"; then
+ echo "# $var='$dflt'"
+ else
+ echo "# Preserving custom $var"
+ echo "$var='$val'"
+ fi
+
+done >> Policy.sh
+
+$spitshell <<!GROK!THIS! >>Policy.sh
+
+# Lastly, you may add additional items here. For example, to set the
+# pager to your local favorite value, uncomment the following line in
+# the original Policy_sh.SH file and re-run sh Policy_sh.SH.
+#
+# pager='$pager'
+#
+# A full Glossary of all the config.sh variables is in the file
+# Porting/Glossary.
+
+!GROK!THIS!
+
+#Credits:
+# The original design for this Policy.sh file came from Wayne Davison,
+# maintainer of trn.
+# This version for Perl5.004_61 originally written by
+# Andy Dougherty <doughera@lafcol.lafayette.edu>.
+# This file may be distributed under the same terms as Perl itself.
+
diff --git a/gnu/usr.bin/perl/Porting/Contract b/gnu/usr.bin/perl/Porting/Contract
new file mode 100644
index 00000000000..cc91af26bca
--- /dev/null
+++ b/gnu/usr.bin/perl/Porting/Contract
@@ -0,0 +1,108 @@
+
+ Contributed Modules in Perl Core
+ A Social Contract about Artistic Control
+
+What follows is a statement about artistic control, defined as the ability
+of authors of packages to guide the future of their code and maintain
+control over their work. It is a recognition that authors should have
+control over their work, and that it is a responsibility of the rest of
+the Perl community to ensure that they retain this control. It is an
+attempt to document the standards to which we, as Perl developers, intend
+to hold ourselves. It is an attempt to write down rough guidelines about
+the respect we owe each other as Perl developers.
+
+This statement is not a legal contract. This statement is not a legal
+document in any way, shape, or form. Perl is distributed under the GNU
+Public License and under the Artistic License; those are the precise legal
+terms. This statement isn't about the law or licenses. It's about
+community, mutual respect, trust, and good-faith cooperation.
+
+We recognize that the Perl core, defined as the software distributed with
+the heart of Perl itself, is a joint project on the part of all of us.
+>From time to time, a script, module, or set of modules (hereafter referred
+to simply as a "module") will prove so widely useful and/or so integral to
+the correct functioning of Perl itself that it should be distributed with
+Perl core. This should never be done without the author's explicit
+consent, and a clear recognition on all parts that this means the module
+is being distributed under the same terms as Perl itself. A module author
+should realize that inclusion of a module into the Perl core will
+necessarily mean some loss of control over it, since changes may
+occasionally have to be made on short notice or for consistency with the
+rest of Perl.
+
+Once a module has been included in the Perl core, however, everyone
+involved in maintaining Perl should be aware that the module is still the
+property of the original author unless the original author explicitly
+gives up their ownership of it. In particular:
+
+ 1) The version of the module in the core should still be considered the
+ work of the original author. All patches, bug reports, and so forth
+ should be fed back to them. Their development directions should be
+ respected whenever possible.
+
+ 2) Patches may be applied by the pumpkin holder without the explicit
+ cooperation of the module author if and only if they are very minor,
+ time-critical in some fashion (such as urgent security fixes), or if
+ the module author cannot be reached. Those patches must still be
+ given back to the author when possible, and if the author decides on
+ an alternate fix in their version, that fix should be strongly
+ preferred unless there is a serious problem with it. Any changes not
+ endorsed by the author should be marked as such, and the contributor
+ of the change acknowledged.
+
+ 3) The version of the module distributed with Perl should, whenever
+ possible, be the latest version of the module as distributed by the
+ author (the latest non-beta version in the case of public Perl
+ releases), although the pumpkin holder may hold off on upgrading the
+ version of the module distributed with Perl to the latest version
+ until the latest version has had sufficient testing.
+
+In other words, the author of a module should be considered to have final
+say on modifications to their module whenever possible (bearing in mind
+that it's expected that everyone involved will work together and arrive at
+reasonable compromises when there are disagreements).
+
+As a last resort, however:
+
+ 4) If the author's vision of the future of their module is sufficiently
+ different from the vision of the pumpkin holder and perl5-porters as a
+ whole so as to cause serious problems for Perl, the pumpkin holder may
+ choose to formally fork the version of the module in the core from the
+ one maintained by the author. This should not be done lightly and
+ should *always* if at all possible be done only after direct input
+ from Larry. If this is done, it must then be made explicit in the
+ module as distributed with Perl core that it is a forked version and
+ that while it is based on the original author's work, it is no longer
+ maintained by them. This must be noted in both the documentation and
+ in the comments in the source of the module.
+
+Again, this should be a last resort only. Ideally, this should never
+happen, and every possible effort at cooperation and compromise should be
+made before doing this. If it does prove necessary to fork a module for
+the overall health of Perl, proper credit must be given to the original
+author in perpetuity and the decision should be constantly re-evaluated to
+see if a remerging of the two branches is possible down the road.
+
+In all dealings with contributed modules, everyone maintaining Perl should
+keep in mind that the code belongs to the original author, that they may
+not be on perl5-porters at any given time, and that a patch is not
+official unless it has been integrated into the author's copy of the
+module. To aid with this, and with points #1, #2, and #3 above, contact
+information for the authors of all contributed modules should be kept with
+the Perl distribution.
+
+Finally, the Perl community as a whole recognizes that respect for
+ownership of code, respect for artistic control, proper credit, and active
+effort to prevent unintentional code skew or communication gaps is vital
+to the health of the community and Perl itself. Members of a community
+should not normally have to resort to rules and laws to deal with each
+other, and this document, although it contains rules so as to be clear, is
+about an attitude and general approach. The first step in any dispute
+should be open communication, respect for opposing views, and an attempt
+at a compromise. In nearly every circumstance nothing more will be
+necessary, and certainly no more drastic measure should be used until
+every avenue of communication and discussion has failed.
+
+--
+Version 1.2. By Russ Allbery (rra@stanford.edu) and the perl5-porters.
+
diff --git a/gnu/usr.bin/perl/Porting/config.sh b/gnu/usr.bin/perl/Porting/config.sh
new file mode 100644
index 00000000000..20e1c4cfd78
--- /dev/null
+++ b/gnu/usr.bin/perl/Porting/config.sh
@@ -0,0 +1,585 @@
+#!/bin/sh
+#
+# This file was produced by running the Configure script. It holds all the
+# definitions figured out by Configure. Should you modify one of these values,
+# do not forget to propagate your changes by running "Configure -der". You may
+# instead choose to run each of the .SH files by yourself, or "Configure -S".
+#
+
+# Package name : perl5
+# Source directory : .
+# Configuration time: Tue Jul 21 10:03:27 EDT 1998
+# Configured by : doughera
+# Target system : linux fractal 2.0.34 #1 tue jun 23 10:09:17 edt 1998 i686 unknown
+
+Author=''
+Date='$Date'
+Header=''
+Id='$Id'
+Locker=''
+Log='$Log'
+Mcc='Mcc'
+RCSfile='$RCSfile'
+Revision='$Revision'
+Source=''
+State=''
+_a='.a'
+_exe=''
+_o='.o'
+afs='false'
+alignbytes='4'
+ansi2knr=''
+aphostname=''
+apiversion='5.005'
+ar='ar'
+archlib='/opt/perl/lib/5.005/i686-linux-thread'
+archlibexp='/opt/perl/lib/5.005/i686-linux-thread'
+archname='i686-linux-thread'
+archobjs=''
+awk='awk'
+baserev='5.0'
+bash=''
+bin='/opt/perl/bin'
+binexp='/opt/perl/bin'
+bison=''
+byacc='byacc'
+byteorder='1234'
+c=''
+castflags='0'
+cat='cat'
+cc='cc'
+cccdlflags='-fpic'
+ccdlflags='-rdynamic'
+ccflags='-D_REENTRANT -Dbool=char -DHAS_BOOL -I/usr/local/include'
+cf_by='doughera'
+cf_email='yourname@yourhost.yourplace.com'
+cf_time='Tue Jul 21 10:03:27 EDT 1998'
+chgrp=''
+chmod=''
+chown=''
+clocktype='clock_t'
+comm='comm'
+compress=''
+contains='grep'
+cp='cp'
+cpio=''
+cpp='cpp'
+cpp_stuff='42'
+cppflags='-D_REENTRANT -Dbool=char -DHAS_BOOL -I/usr/local/include'
+cpplast='-'
+cppminus='-'
+cpprun='cc -E'
+cppstdin='cc -E'
+cryptlib=''
+csh='csh'
+d_Gconvert='gcvt((x),(n),(b))'
+d_access='define'
+d_alarm='define'
+d_archlib='define'
+d_attribut='define'
+d_bcmp='define'
+d_bcopy='define'
+d_bsd='undef'
+d_bsdgetpgrp='undef'
+d_bsdsetpgrp='undef'
+d_bzero='define'
+d_casti32='undef'
+d_castneg='define'
+d_charvspr='undef'
+d_chown='define'
+d_chroot='define'
+d_chsize='undef'
+d_closedir='define'
+d_const='define'
+d_crypt='define'
+d_csh='define'
+d_cuserid='define'
+d_dbl_dig='define'
+d_difftime='define'
+d_dirnamlen='undef'
+d_dlerror='define'
+d_dlopen='define'
+d_dlsymun='undef'
+d_dosuid='undef'
+d_dup2='define'
+d_endgrent='define'
+d_endhent='define'
+d_endnent='define'
+d_endpent='define'
+d_endpwent='define'
+d_endsent='define'
+d_eofnblk='define'
+d_eunice='undef'
+d_fchmod='define'
+d_fchown='define'
+d_fcntl='define'
+d_fd_macros='define'
+d_fd_set='define'
+d_fds_bits='define'
+d_fgetpos='define'
+d_flexfnam='define'
+d_flock='define'
+d_fork='define'
+d_fpathconf='define'
+d_fsetpos='define'
+d_ftime='undef'
+d_getgrent='define'
+d_getgrps='define'
+d_gethbyaddr='define'
+d_gethbyname='define'
+d_gethent='define'
+d_gethname='undef'
+d_gethostprotos='define'
+d_getlogin='define'
+d_getnbyaddr='define'
+d_getnbyname='define'
+d_getnent='define'
+d_getnetprotos='define'
+d_getpbyname='define'
+d_getpbynumber='define'
+d_getpent='define'
+d_getpgid='define'
+d_getpgrp2='undef'
+d_getpgrp='define'
+d_getppid='define'
+d_getprior='define'
+d_getprotoprotos='define'
+d_getpwent='define'
+d_getsbyname='define'
+d_getsbyport='define'
+d_getsent='define'
+d_getservprotos='define'
+d_gettimeod='define'
+d_gnulibc='define'
+d_grpasswd='define'
+d_htonl='define'
+d_index='undef'
+d_inetaton='define'
+d_isascii='define'
+d_killpg='define'
+d_lchown='undef'
+d_link='define'
+d_locconv='define'
+d_lockf='define'
+d_longdbl='define'
+d_longlong='define'
+d_lstat='define'
+d_mblen='define'
+d_mbstowcs='define'
+d_mbtowc='define'
+d_memcmp='define'
+d_memcpy='define'
+d_memmove='define'
+d_memset='define'
+d_mkdir='define'
+d_mkfifo='define'
+d_mktime='define'
+d_msg='define'
+d_msgctl='define'
+d_msgget='define'
+d_msgrcv='define'
+d_msgsnd='define'
+d_mymalloc='undef'
+d_nice='define'
+d_oldpthreads='undef'
+d_oldsock='undef'
+d_open3='define'
+d_pathconf='define'
+d_pause='define'
+d_phostname='undef'
+d_pipe='define'
+d_poll='define'
+d_portable='define'
+d_pthread_yield='undef'
+d_pthreads_created_joinable='define'
+d_pwage='undef'
+d_pwchange='undef'
+d_pwclass='undef'
+d_pwcomment='undef'
+d_pwexpire='undef'
+d_pwgecos='define'
+d_pwquota='undef'
+d_pwpasswd='define'
+d_readdir='define'
+d_readlink='define'
+d_rename='define'
+d_rewinddir='define'
+d_rmdir='define'
+d_safebcpy='define'
+d_safemcpy='undef'
+d_sanemcmp='define'
+d_sched_yield='define'
+d_seekdir='define'
+d_select='define'
+d_sem='define'
+d_semctl='define'
+d_semctl_semid_ds='define'
+d_semctl_semun='define'
+d_semget='define'
+d_semop='define'
+d_setegid='define'
+d_seteuid='define'
+d_setgrent='define'
+d_setgrps='define'
+d_sethent='define'
+d_setlinebuf='define'
+d_setlocale='define'
+d_setnent='define'
+d_setpent='define'
+d_setpgid='define'
+d_setpgrp2='undef'
+d_setpgrp='define'
+d_setprior='define'
+d_setpwent='define'
+d_setregid='define'
+d_setresgid='undef'
+d_setresuid='undef'
+d_setreuid='define'
+d_setrgid='undef'
+d_setruid='undef'
+d_setsent='define'
+d_setsid='define'
+d_setvbuf='define'
+d_sfio='undef'
+d_shm='define'
+d_shmat='define'
+d_shmatprototype='define'
+d_shmctl='define'
+d_shmdt='define'
+d_shmget='define'
+d_sigaction='define'
+d_sigsetjmp='define'
+d_socket='define'
+d_sockpair='define'
+d_statblks='undef'
+d_stdio_cnt_lval='undef'
+d_stdio_ptr_lval='define'
+d_stdiobase='define'
+d_stdstdio='define'
+d_strchr='define'
+d_strcoll='define'
+d_strctcpy='define'
+d_strerrm='strerror(e)'
+d_strerror='define'
+d_strtod='define'
+d_strtol='define'
+d_strtoul='define'
+d_strxfrm='define'
+d_suidsafe='undef'
+d_symlink='define'
+d_syscall='define'
+d_sysconf='define'
+d_sysernlst=''
+d_syserrlst='define'
+d_system='define'
+d_tcgetpgrp='define'
+d_tcsetpgrp='define'
+d_telldir='define'
+d_time='define'
+d_times='define'
+d_truncate='define'
+d_tzname='define'
+d_umask='define'
+d_uname='define'
+d_union_semun='define'
+d_vfork='undef'
+d_void_closedir='undef'
+d_voidsig='define'
+d_voidtty=''
+d_volatile='define'
+d_vprintf='define'
+d_wait4='define'
+d_waitpid='define'
+d_wcstombs='define'
+d_wctomb='define'
+d_xenix='undef'
+date='date'
+db_hashtype='u_int32_t'
+db_prefixtype='size_t'
+defvoidused='15'
+direntrytype='struct dirent'
+dlext='so'
+dlsrc='dl_dlopen.xs'
+doublesize='8'
+dynamic_ext='B DB_File Data/Dumper Fcntl GDBM_File IO IPC/SysV NDBM_File ODBM_File Opcode POSIX SDBM_File Socket Thread attrs re'
+eagain='EAGAIN'
+ebcdic='undef'
+echo='echo'
+egrep='egrep'
+emacs=''
+eunicefix=':'
+exe_ext=''
+expr='expr'
+extensions='B DB_File Data/Dumper Fcntl GDBM_File IO IPC/SysV NDBM_File ODBM_File Opcode POSIX SDBM_File Socket Thread attrs re Errno'
+find='find'
+firstmakefile='makefile'
+flex=''
+fpostype='fpos_t'
+freetype='void'
+full_csh='/bin/csh'
+full_sed='/bin/sed'
+gccversion='2.7.2.3'
+gidtype='gid_t'
+glibpth='/usr/shlib /shlib /lib/pa1.1 /usr/lib/large /lib /usr/lib /usr/lib/386 /lib/386 /lib/large /usr/lib/small /lib/small /usr/ccs/lib /usr/ucblib /usr/local/lib '
+grep='grep'
+groupcat='cat /etc/group'
+groupstype='gid_t'
+gzip='gzip'
+h_fcntl='false'
+h_sysfile='true'
+hint='recommended'
+hostcat='cat /etc/hosts'
+huge=''
+i_arpainet='define'
+i_bsdioctl=''
+i_db='define'
+i_dbm='define'
+i_dirent='define'
+i_dld='undef'
+i_dlfcn='define'
+i_fcntl='undef'
+i_float='define'
+i_gdbm='define'
+i_grp='define'
+i_limits='define'
+i_locale='define'
+i_malloc='define'
+i_math='define'
+i_memory='undef'
+i_ndbm='define'
+i_netdb='define'
+i_neterrno='undef'
+i_niin='define'
+i_pwd='define'
+i_rpcsvcdbm='undef'
+i_sfio='undef'
+i_sgtty='undef'
+i_stdarg='define'
+i_stddef='define'
+i_stdlib='define'
+i_string='define'
+i_sysdir='define'
+i_sysfile='define'
+i_sysfilio='undef'
+i_sysin='undef'
+i_sysioctl='define'
+i_sysndir='undef'
+i_sysparam='define'
+i_sysresrc='define'
+i_sysselct='define'
+i_syssockio=''
+i_sysstat='define'
+i_systime='define'
+i_systimek='undef'
+i_systimes='define'
+i_systypes='define'
+i_sysun='define'
+i_syswait='define'
+i_termio='undef'
+i_termios='define'
+i_time='undef'
+i_unistd='define'
+i_utime='define'
+i_values='define'
+i_varargs='undef'
+i_varhdr='stdarg.h'
+i_vfork='undef'
+incpath=''
+inews=''
+installarchlib='/opt/perl/lib/5.005/i686-linux-thread'
+installbin='/opt/perl/bin'
+installman1dir='/opt/perl/man/man1'
+installman3dir='/opt/perl/man/man3'
+installprivlib='/opt/perl/lib/5.005'
+installscript='/opt/perl/script'
+installsitearch='/opt/perl/lib/site_perl/5.005/i686-linux-thread'
+installsitelib='/opt/perl/lib/site_perl/5.005'
+intsize='4'
+known_extensions='B DB_File Data/Dumper Fcntl GDBM_File IO IPC/SysV NDBM_File ODBM_File Opcode POSIX SDBM_File Socket Thread attrs re'
+ksh=''
+large=''
+ld='cc'
+lddlflags='-shared -L/usr/local/lib'
+ldflags=' -L/usr/local/lib'
+less='less'
+lib_ext='.a'
+libc=''
+libperl='libperl.a'
+libpth='/usr/local/lib /lib /usr/lib'
+libs='-lnsl -lndbm -lgdbm -ldbm -ldb -ldl -lm -lpthread -lc -lposix -lcrypt'
+libswanted='sfio socket inet nsl nm ndbm gdbm dbm db malloc dl dld ld sun m pthread c cposix posix ndir dir crypt ucb BSD PW x'
+line='line'
+lint=''
+lkflags=''
+ln='ln'
+lns='/bin/ln -s'
+locincpth='/usr/local/include /opt/local/include /usr/gnu/include /opt/gnu/include /usr/GNU/include /opt/GNU/include'
+loclibpth='/usr/local/lib /opt/local/lib /usr/gnu/lib /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib'
+longdblsize='12'
+longlongsize='8'
+longsize='4'
+lp=''
+lpr=''
+ls='ls'
+lseektype='off_t'
+mail=''
+mailx=''
+make='make'
+make_set_make='#'
+mallocobj=''
+mallocsrc=''
+malloctype='void *'
+man1dir='/opt/perl/man/man1'
+man1direxp='/opt/perl/man/man1'
+man1ext='1'
+man3dir='/opt/perl/man/man3'
+man3direxp='/opt/perl/man/man3'
+man3ext='3'
+medium=''
+mips=''
+mips_type=''
+mkdir='mkdir'
+models='none'
+modetype='mode_t'
+more='more'
+mv=''
+myarchname='i686-linux'
+mydomain='.yourplace.com'
+myhostname='yourhost'
+myuname='linux fractal 2.0.34 #1 tue jun 23 10:09:17 edt 1998 i686 unknown '
+n='-n'
+netdb_hlen_type='int'
+netdb_host_type='const char *'
+netdb_name_type='const char *'
+netdb_net_type='unsigned long'
+nm='nm'
+nm_opt=''
+nm_so_opt='--dynamic'
+nonxs_ext='Errno'
+nroff='nroff'
+o_nonblock='O_NONBLOCK'
+obj_ext='.o'
+optimize='-O'
+orderlib='false'
+osname='linux'
+osvers='2.0.34'
+package='perl5'
+pager='/usr/bin/less'
+passcat='cat /etc/passwd'
+patchlevel='5'
+path_sep=':'
+perl='perl'
+perladmin='yourname@yourhost.yourplace.com'
+perlpath='/opt/perl/bin/perl'
+pg='pg'
+phostname=''
+pidtype='pid_t'
+plibpth=''
+pmake=''
+pr=''
+prefix='/opt/perl'
+prefixexp='/opt/perl'
+privlib='/opt/perl/lib/5.005'
+privlibexp='/opt/perl/lib/5.005'
+prototype='define'
+ptrsize='4'
+randbits='31'
+ranlib=':'
+rd_nodata='-1'
+rm='rm'
+rmail=''
+runnm='false'
+scriptdir='/opt/perl/script'
+scriptdirexp='/opt/perl/script'
+sed='sed'
+selecttype='fd_set *'
+sendmail='sendmail'
+sh='/bin/sh'
+shar=''
+sharpbang='#!'
+shmattype='void *'
+shortsize='2'
+shrpenv=''
+shsharp='true'
+sig_name='ZERO HUP INT QUIT ILL TRAP ABRT BUS FPE KILL USR1 SEGV USR2 PIPE ALRM TERM STKFLT CHLD CONT STOP TSTP TTIN TTOU URG XCPU XFSZ VTALRM PROF WINCH IO PWR UNUSED IOT CLD POLL '
+sig_name_init='"ZERO", "HUP", "INT", "QUIT", "ILL", "TRAP", "ABRT", "BUS", "FPE", "KILL", "USR1", "SEGV", "USR2", "PIPE", "ALRM", "TERM", "STKFLT", "CHLD", "CONT", "STOP", "TSTP", "TTIN", "TTOU", "URG", "XCPU", "XFSZ", "VTALRM", "PROF", "WINCH", "IO", "PWR", "UNUSED", "IOT", "CLD", "POLL", 0'
+sig_num='0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 6, 17, 29, 0'
+signal_t='void'
+sitearch='/opt/perl/lib/site_perl/5.005/i686-linux-thread'
+sitearchexp='/opt/perl/lib/site_perl/5.005/i686-linux-thread'
+sitelib='/opt/perl/lib/site_perl/5.005'
+sitelibexp='/opt/perl/lib/site_perl/5.005'
+sizetype='size_t'
+sleep=''
+smail=''
+small=''
+so='so'
+sockethdr=''
+socketlib=''
+sort='sort'
+spackage='Perl5'
+spitshell='cat'
+split=''
+src='.'
+ssizetype='ssize_t'
+startperl='#!/opt/perl/bin/perl'
+startsh='#!/bin/sh'
+static_ext=' '
+stdchar='char'
+stdio_base='((fp)->_IO_read_base)'
+stdio_bufsiz='((fp)->_IO_read_end - (fp)->_IO_read_base)'
+stdio_cnt='((fp)->_IO_read_end - (fp)->_IO_read_ptr)'
+stdio_filbuf=''
+stdio_ptr='((fp)->_IO_read_ptr)'
+strings='/usr/include/string.h'
+submit=''
+subversion='0'
+sysman='/usr/man/man1'
+tail=''
+tar=''
+tbl=''
+tee='tee'
+test='test'
+timeincl='/usr/include/sys/time.h '
+timetype='time_t'
+touch='touch'
+tr='tr'
+trnl='\n'
+troff=''
+uidtype='uid_t'
+uname='uname'
+uniq='uniq'
+usedl='define'
+usemymalloc='n'
+usenm='false'
+useopcode='true'
+useperlio='undef'
+useposix='true'
+usesfio='false'
+useshrplib='false'
+usethreads='define'
+usevfork='false'
+usrinc='/usr/include'
+uuname=''
+version='5.005'
+vi=''
+voidflags='15'
+xlibpth='/usr/lib/386 /lib/386'
+zcat=''
+zip='zip'
+# Configure command line arguments.
+config_arg0='Configure'
+config_args='-Dprefix=/opt/perl -Doptimize=-O -Dusethreads -Dcf_by=yourname -Dcf_email=yourname@yourhost.yourplace.com -Dperladmin=yourname@yourhost.yourplace.com -Dmydomain=.yourplace.com -Dmyhostname=yourhost -dE'
+config_argc=9
+config_arg1='-Dprefix=/opt/perl'
+config_arg2='-Doptimize=-O'
+config_arg3='-Dusethreads'
+config_arg4='-Dcf_by=yourname'
+config_arg5='-Dcf_email=yourname@yourhost.yourplace.com'
+config_arg6='-Dperladmin=yourname@yourhost.yourplace.com'
+config_arg7='-Dmydomain=.yourplace.com'
+config_arg8='-Dmyhostname=yourhost'
+config_arg9='-dE'
+PATCHLEVEL=5
+SUBVERSION=0
+CONFIG=true
diff --git a/gnu/usr.bin/perl/Porting/config_H b/gnu/usr.bin/perl/Porting/config_H
new file mode 100644
index 00000000000..8cbf3c497b9
--- /dev/null
+++ b/gnu/usr.bin/perl/Porting/config_H
@@ -0,0 +1,2103 @@
+/* This file (config_H) is a sample config.h file. If you are unable
+ to successfully run Configure, copy this file to config.h and
+ edit it to suit your system.
+*/
+/*
+ * This file was produced by running the config_h.SH script, which
+ * gets its values from config.sh, which is generally produced by
+ * running Configure.
+ *
+ * Feel free to modify any of this as the need arises. Note, however,
+ * that running config_h.SH again will wipe out any changes you've made.
+ * For a more permanent change edit config.sh and rerun config_h.SH.
+ *
+ * $Id: Config_h.U,v 3.0.1.5 1997/02/28 14:57:43 ram Exp $
+ */
+
+/*
+ * Package name : perl5
+ * Source directory : .
+ * Configuration time: Tue Jul 21 10:03:27 EDT 1998
+ * Configured by : doughera
+ * Target system : linux fractal 2.0.34 #1 tue jun 23 10:09:17 edt 1998 i686 unknown
+ */
+
+#ifndef _config_h_
+#define _config_h_
+
+/* LOC_SED:
+ * This symbol holds the complete pathname to the sed program.
+ */
+#define LOC_SED "/bin/sed" /**/
+
+/* BIN:
+ * This symbol holds the path of the bin directory where the package will
+ * be installed. Program must be prepared to deal with ~name substitution.
+ */
+/* BIN_EXP:
+ * This symbol is the filename expanded version of the BIN symbol, for
+ * programs that do not want to deal with that at run-time.
+ */
+#define BIN "/opt/perl/bin" /**/
+#define BIN_EXP "/opt/perl/bin" /**/
+
+/* CPPSTDIN:
+ * This symbol contains the first part of the string which will invoke
+ * the C preprocessor on the standard input and produce to standard
+ * output. Typical value of "cc -E" or "/lib/cpp", but it can also
+ * call a wrapper. See CPPRUN.
+ */
+/* CPPMINUS:
+ * This symbol contains the second part of the string which will invoke
+ * the C preprocessor on the standard input and produce to standard
+ * output. This symbol will have the value "-" if CPPSTDIN needs a minus
+ * to specify standard input, otherwise the value is "".
+ */
+#define CPPSTDIN "cc -E"
+#define CPPMINUS "-"
+
+/* HAS_ALARM:
+ * This symbol, if defined, indicates that the alarm routine is
+ * available.
+ */
+#define HAS_ALARM /**/
+
+/* HASATTRIBUTE:
+ * This symbol indicates the C compiler can check for function attributes,
+ * such as printf formats. This is normally only supported by GNU cc.
+ */
+#define HASATTRIBUTE /**/
+#ifndef HASATTRIBUTE
+#define __attribute__(_arg_)
+#endif
+
+/* HAS_BCMP:
+ * This symbol is defined if the bcmp() routine is available to
+ * compare blocks of memory.
+ */
+#define HAS_BCMP /**/
+
+/* HAS_BCOPY:
+ * This symbol is defined if the bcopy() routine is available to
+ * copy blocks of memory.
+ */
+#define HAS_BCOPY /**/
+
+/* HAS_BZERO:
+ * This symbol is defined if the bzero() routine is available to
+ * set a memory block to 0.
+ */
+#define HAS_BZERO /**/
+
+/* HAS_CHOWN:
+ * This symbol, if defined, indicates that the chown routine is
+ * available.
+ */
+#define HAS_CHOWN /**/
+
+/* HAS_CHROOT:
+ * This symbol, if defined, indicates that the chroot routine is
+ * available.
+ */
+#define HAS_CHROOT /**/
+
+/* HAS_CHSIZE:
+ * This symbol, if defined, indicates that the chsize routine is available
+ * to truncate files. You might need a -lx to get this routine.
+ */
+/*#define HAS_CHSIZE / **/
+
+/* HASCONST:
+ * This symbol, if defined, indicates that this C compiler knows about
+ * the const type. There is no need to actually test for that symbol
+ * within your programs. The mere use of the "const" keyword will
+ * trigger the necessary tests.
+ */
+#define HASCONST /**/
+#ifndef HASCONST
+#define const
+#endif
+
+/* HAS_CRYPT:
+ * This symbol, if defined, indicates that the crypt routine is available
+ * to encrypt passwords and the like.
+ */
+#define HAS_CRYPT /**/
+
+/* HAS_CUSERID:
+ * This symbol, if defined, indicates that the cuserid routine is
+ * available to get character login names.
+ */
+#define HAS_CUSERID /**/
+
+/* HAS_DBL_DIG:
+ * This symbol, if defined, indicates that this system's <float.h>
+ * or <limits.h> defines the symbol DBL_DIG, which is the number
+ * of significant digits in a double precision number. If this
+ * symbol is not defined, a guess of 15 is usually pretty good.
+ */
+#define HAS_DBL_DIG /* */
+
+/* HAS_DIFFTIME:
+ * This symbol, if defined, indicates that the difftime routine is
+ * available.
+ */
+#define HAS_DIFFTIME /**/
+
+/* HAS_DLERROR:
+ * This symbol, if defined, indicates that the dlerror routine is
+ * available to return a string describing the last error that
+ * occurred from a call to dlopen(), dlclose() or dlsym().
+ */
+#define HAS_DLERROR /**/
+
+/* SETUID_SCRIPTS_ARE_SECURE_NOW:
+ * This symbol, if defined, indicates that the bug that prevents
+ * setuid scripts from being secure is not present in this kernel.
+ */
+/* DOSUID:
+ * This symbol, if defined, indicates that the C program should
+ * check the script that it is executing for setuid/setgid bits, and
+ * attempt to emulate setuid/setgid on systems that have disabled
+ * setuid #! scripts because the kernel can't do it securely.
+ * It is up to the package designer to make sure that this emulation
+ * is done securely. Among other things, it should do an fstat on
+ * the script it just opened to make sure it really is a setuid/setgid
+ * script, it should make sure the arguments passed correspond exactly
+ * to the argument on the #! line, and it should not trust any
+ * subprocesses to which it must pass the filename rather than the
+ * file descriptor of the script to be executed.
+ */
+/*#define SETUID_SCRIPTS_ARE_SECURE_NOW / **/
+/*#define DOSUID / **/
+
+/* HAS_DUP2:
+ * This symbol, if defined, indicates that the dup2 routine is
+ * available to duplicate file descriptors.
+ */
+#define HAS_DUP2 /**/
+
+/* HAS_FCHMOD:
+ * This symbol, if defined, indicates that the fchmod routine is available
+ * to change mode of opened files. If unavailable, use chmod().
+ */
+#define HAS_FCHMOD /**/
+
+/* HAS_FCHOWN:
+ * This symbol, if defined, indicates that the fchown routine is available
+ * to change ownership of opened files. If unavailable, use chown().
+ */
+#define HAS_FCHOWN /**/
+
+/* HAS_FCNTL:
+ * This symbol, if defined, indicates to the C program that
+ * the fcntl() function exists.
+ */
+#define HAS_FCNTL /**/
+
+/* HAS_FGETPOS:
+ * This symbol, if defined, indicates that the fgetpos routine is
+ * available to get the file position indicator, similar to ftell().
+ */
+#define HAS_FGETPOS /**/
+
+/* FLEXFILENAMES:
+ * This symbol, if defined, indicates that the system supports filenames
+ * longer than 14 characters.
+ */
+#define FLEXFILENAMES /**/
+
+/* HAS_FLOCK:
+ * This symbol, if defined, indicates that the flock routine is
+ * available to do file locking.
+ */
+#define HAS_FLOCK /**/
+
+/* HAS_FORK:
+ * This symbol, if defined, indicates that the fork routine is
+ * available.
+ */
+#define HAS_FORK /**/
+
+/* HAS_FSETPOS:
+ * This symbol, if defined, indicates that the fsetpos routine is
+ * available to set the file position indicator, similar to fseek().
+ */
+#define HAS_FSETPOS /**/
+
+/* HAS_GETTIMEOFDAY:
+ * This symbol, if defined, indicates that the gettimeofday() system
+ * call is available for a sub-second accuracy clock. Usually, the file
+ * <sys/resource.h> needs to be included (see I_SYS_RESOURCE).
+ * The type "Timeval" should be used to refer to "struct timeval".
+ */
+#define HAS_GETTIMEOFDAY /**/
+#ifdef HAS_GETTIMEOFDAY
+#define Timeval struct timeval /* Structure used by gettimeofday() */
+#endif
+
+/* HAS_GETGROUPS:
+ * This symbol, if defined, indicates that the getgroups() routine is
+ * available to get the list of process groups. If unavailable, multiple
+ * groups are probably not supported.
+ */
+#define HAS_GETGROUPS /**/
+
+/* HAS_UNAME:
+ * This symbol, if defined, indicates that the C program may use the
+ * uname() routine to derive the host name. See also HAS_GETHOSTNAME
+ * and PHOSTNAME.
+ */
+#define HAS_UNAME /**/
+
+/* HAS_GETLOGIN:
+ * This symbol, if defined, indicates that the getlogin routine is
+ * available to get the login name.
+ */
+#define HAS_GETLOGIN /**/
+
+/* HAS_GETPGID:
+ * This symbol, if defined, indicates to the C program that
+ * the getpgid(pid) function is available to get the
+ * process group id.
+ */
+#define HAS_GETPGID /**/
+
+/* HAS_GETPGRP:
+ * This symbol, if defined, indicates that the getpgrp routine is
+ * available to get the current process group.
+ */
+/* USE_BSD_GETPGRP:
+ * This symbol, if defined, indicates that getpgrp needs one
+ * arguments whereas USG one needs none.
+ */
+#define HAS_GETPGRP /**/
+/*#define USE_BSD_GETPGRP / **/
+
+/* HAS_GETPGRP2:
+ * This symbol, if defined, indicates that the getpgrp2() (as in DG/UX)
+ * routine is available to get the current process group.
+ */
+/*#define HAS_GETPGRP2 / **/
+
+/* HAS_GETPPID:
+ * This symbol, if defined, indicates that the getppid routine is
+ * available to get the parent process ID.
+ */
+#define HAS_GETPPID /**/
+
+/* HAS_GETPRIORITY:
+ * This symbol, if defined, indicates that the getpriority routine is
+ * available to get a process's priority.
+ */
+#define HAS_GETPRIORITY /**/
+
+/* HAS_HTONL:
+ * This symbol, if defined, indicates that the htonl() routine (and
+ * friends htons() ntohl() ntohs()) are available to do network
+ * order byte swapping.
+ */
+/* HAS_HTONS:
+ * This symbol, if defined, indicates that the htons() routine (and
+ * friends htonl() ntohl() ntohs()) are available to do network
+ * order byte swapping.
+ */
+/* HAS_NTOHL:
+ * This symbol, if defined, indicates that the ntohl() routine (and
+ * friends htonl() htons() ntohs()) are available to do network
+ * order byte swapping.
+ */
+/* HAS_NTOHS:
+ * This symbol, if defined, indicates that the ntohs() routine (and
+ * friends htonl() htons() ntohl()) are available to do network
+ * order byte swapping.
+ */
+#define HAS_HTONL /**/
+#define HAS_HTONS /**/
+#define HAS_NTOHL /**/
+#define HAS_NTOHS /**/
+
+/* HAS_INET_ATON:
+ * This symbol, if defined, indicates to the C program that the
+ * inet_aton() function is available to parse IP address "dotted-quad"
+ * strings.
+ */
+#define HAS_INET_ATON /**/
+
+/* HAS_KILLPG:
+ * This symbol, if defined, indicates that the killpg routine is available
+ * to kill process groups. If unavailable, you probably should use kill
+ * with a negative process number.
+ */
+#define HAS_KILLPG /**/
+
+/* HAS_LINK:
+ * This symbol, if defined, indicates that the link routine is
+ * available to create hard links.
+ */
+#define HAS_LINK /**/
+
+/* HAS_LOCALECONV:
+ * This symbol, if defined, indicates that the localeconv routine is
+ * available for numeric and monetary formatting conventions.
+ */
+#define HAS_LOCALECONV /**/
+
+/* HAS_LOCKF:
+ * This symbol, if defined, indicates that the lockf routine is
+ * available to do file locking.
+ */
+#define HAS_LOCKF /**/
+
+/* HAS_LSTAT:
+ * This symbol, if defined, indicates that the lstat routine is
+ * available to do file stats on symbolic links.
+ */
+#define HAS_LSTAT /**/
+
+/* HAS_MBLEN:
+ * This symbol, if defined, indicates that the mblen routine is available
+ * to find the number of bytes in a multibye character.
+ */
+#define HAS_MBLEN /**/
+
+/* HAS_MBSTOWCS:
+ * This symbol, if defined, indicates that the mbstowcs routine is
+ * available to covert a multibyte string into a wide character string.
+ */
+#define HAS_MBSTOWCS /**/
+
+/* HAS_MBTOWC:
+ * This symbol, if defined, indicates that the mbtowc routine is available
+ * to covert a multibyte to a wide character.
+ */
+#define HAS_MBTOWC /**/
+
+/* HAS_MEMCMP:
+ * This symbol, if defined, indicates that the memcmp routine is available
+ * to compare blocks of memory.
+ */
+#define HAS_MEMCMP /**/
+
+/* HAS_MEMCPY:
+ * This symbol, if defined, indicates that the memcpy routine is available
+ * to copy blocks of memory.
+ */
+#define HAS_MEMCPY /**/
+
+/* HAS_MEMMOVE:
+ * This symbol, if defined, indicates that the memmove routine is available
+ * to copy potentially overlapping blocks of memory. This should be used
+ * only when HAS_SAFE_BCOPY is not defined. If neither is there, roll your
+ * own version.
+ */
+#define HAS_MEMMOVE /**/
+
+/* HAS_MEMSET:
+ * This symbol, if defined, indicates that the memset routine is available
+ * to set blocks of memory.
+ */
+#define HAS_MEMSET /**/
+
+/* HAS_MKDIR:
+ * This symbol, if defined, indicates that the mkdir routine is available
+ * to create directories. Otherwise you should fork off a new process to
+ * exec /bin/mkdir.
+ */
+#define HAS_MKDIR /**/
+
+/* HAS_MKFIFO:
+ * This symbol, if defined, indicates that the mkfifo routine is
+ * available to create FIFOs. Otherwise, mknod should be able to
+ * do it for you. However, if mkfifo is there, mknod might require
+ * super-user privileges which mkfifo will not.
+ */
+#define HAS_MKFIFO /**/
+
+/* HAS_MKTIME:
+ * This symbol, if defined, indicates that the mktime routine is
+ * available.
+ */
+#define HAS_MKTIME /**/
+
+/* HAS_MSG:
+ * This symbol, if defined, indicates that the entire msg*(2) library is
+ * supported (IPC mechanism based on message queues).
+ */
+#define HAS_MSG /**/
+
+/* HAS_NICE:
+ * This symbol, if defined, indicates that the nice routine is
+ * available.
+ */
+#define HAS_NICE /**/
+
+/* HAS_PATHCONF:
+ * This symbol, if defined, indicates that pathconf() is available
+ * to determine file-system related limits and options associated
+ * with a given filename.
+ */
+/* HAS_FPATHCONF:
+ * This symbol, if defined, indicates that pathconf() is available
+ * to determine file-system related limits and options associated
+ * with a given open file descriptor.
+ */
+#define HAS_PATHCONF /**/
+#define HAS_FPATHCONF /**/
+
+/* HAS_PAUSE:
+ * This symbol, if defined, indicates that the pause routine is
+ * available to suspend a process until a signal is received.
+ */
+#define HAS_PAUSE /**/
+
+/* HAS_PIPE:
+ * This symbol, if defined, indicates that the pipe routine is
+ * available to create an inter-process channel.
+ */
+#define HAS_PIPE /**/
+
+/* HAS_POLL:
+ * This symbol, if defined, indicates that the poll routine is
+ * available to poll active file descriptors. You may safely
+ * include <poll.h> when this symbol is defined.
+ */
+#define HAS_POLL /**/
+
+/* HAS_READDIR:
+ * This symbol, if defined, indicates that the readdir routine is
+ * available to read directory entries. You may have to include
+ * <dirent.h>. See I_DIRENT.
+ */
+#define HAS_READDIR /**/
+
+/* HAS_SEEKDIR:
+ * This symbol, if defined, indicates that the seekdir routine is
+ * available. You may have to include <dirent.h>. See I_DIRENT.
+ */
+#define HAS_SEEKDIR /**/
+
+/* HAS_TELLDIR:
+ * This symbol, if defined, indicates that the telldir routine is
+ * available. You may have to include <dirent.h>. See I_DIRENT.
+ */
+#define HAS_TELLDIR /**/
+
+/* HAS_REWINDDIR:
+ * This symbol, if defined, indicates that the rewinddir routine is
+ * available. You may have to include <dirent.h>. See I_DIRENT.
+ */
+#define HAS_REWINDDIR /**/
+
+/* HAS_READLINK:
+ * This symbol, if defined, indicates that the readlink routine is
+ * available to read the value of a symbolic link.
+ */
+#define HAS_READLINK /**/
+
+/* HAS_RENAME:
+ * This symbol, if defined, indicates that the rename routine is available
+ * to rename files. Otherwise you should do the unlink(), link(), unlink()
+ * trick.
+ */
+#define HAS_RENAME /**/
+
+/* HAS_RMDIR:
+ * This symbol, if defined, indicates that the rmdir routine is
+ * available to remove directories. Otherwise you should fork off a
+ * new process to exec /bin/rmdir.
+ */
+#define HAS_RMDIR /**/
+
+/* HAS_SELECT:
+ * This symbol, if defined, indicates that the select routine is
+ * available to select active file descriptors. If the timeout field
+ * is used, <sys/time.h> may need to be included.
+ */
+#define HAS_SELECT /**/
+
+/* HAS_SEM:
+ * This symbol, if defined, indicates that the entire sem*(2) library is
+ * supported.
+ */
+#define HAS_SEM /**/
+
+/* HAS_SETEGID:
+ * This symbol, if defined, indicates that the setegid routine is available
+ * to change the effective gid of the current program.
+ */
+#define HAS_SETEGID /**/
+
+/* HAS_SETEUID:
+ * This symbol, if defined, indicates that the seteuid routine is available
+ * to change the effective uid of the current program.
+ */
+#define HAS_SETEUID /**/
+
+/* HAS_SETLINEBUF:
+ * This symbol, if defined, indicates that the setlinebuf routine is
+ * available to change stderr or stdout from block-buffered or unbuffered
+ * to a line-buffered mode.
+ */
+#define HAS_SETLINEBUF /**/
+
+/* HAS_SETLOCALE:
+ * This symbol, if defined, indicates that the setlocale routine is
+ * available to handle locale-specific ctype implementations.
+ */
+#define HAS_SETLOCALE /**/
+
+/* HAS_SETPGID:
+ * This symbol, if defined, indicates that the setpgid(pid, gpid)
+ * routine is available to set process group ID.
+ */
+#define HAS_SETPGID /**/
+
+/* HAS_SETPGRP:
+ * This symbol, if defined, indicates that the setpgrp routine is
+ * available to set the current process group.
+ */
+/* USE_BSD_SETPGRP:
+ * This symbol, if defined, indicates that setpgrp needs two
+ * arguments whereas USG one needs none. See also HAS_SETPGID
+ * for a POSIX interface.
+ */
+#define HAS_SETPGRP /**/
+/*#define USE_BSD_SETPGRP / **/
+
+/* HAS_SETPGRP2:
+ * This symbol, if defined, indicates that the setpgrp2() (as in DG/UX)
+ * routine is available to set the current process group.
+ */
+/*#define HAS_SETPGRP2 / **/
+
+/* HAS_SETPRIORITY:
+ * This symbol, if defined, indicates that the setpriority routine is
+ * available to set a process's priority.
+ */
+#define HAS_SETPRIORITY /**/
+
+/* HAS_SETREGID:
+ * This symbol, if defined, indicates that the setregid routine is
+ * available to change the real and effective gid of the current
+ * process.
+ */
+/* HAS_SETRESGID:
+ * This symbol, if defined, indicates that the setresgid routine is
+ * available to change the real, effective and saved gid of the current
+ * process.
+ */
+#define HAS_SETREGID /**/
+/*#define HAS_SETRESGID / **/
+
+/* HAS_SETREUID:
+ * This symbol, if defined, indicates that the setreuid routine is
+ * available to change the real and effective uid of the current
+ * process.
+ */
+/* HAS_SETRESUID:
+ * This symbol, if defined, indicates that the setresuid routine is
+ * available to change the real, effective and saved uid of the current
+ * process.
+ */
+#define HAS_SETREUID /**/
+/*#define HAS_SETRESUID / **/
+
+/* HAS_SETRGID:
+ * This symbol, if defined, indicates that the setrgid routine is available
+ * to change the real gid of the current program.
+ */
+/*#define HAS_SETRGID / **/
+
+/* HAS_SETRUID:
+ * This symbol, if defined, indicates that the setruid routine is available
+ * to change the real uid of the current program.
+ */
+/*#define HAS_SETRUID / **/
+
+/* HAS_SETSID:
+ * This symbol, if defined, indicates that the setsid routine is
+ * available to set the process group ID.
+ */
+#define HAS_SETSID /**/
+
+/* HAS_SHM:
+ * This symbol, if defined, indicates that the entire shm*(2) library is
+ * supported.
+ */
+#define HAS_SHM /**/
+
+/* Shmat_t:
+ * This symbol holds the return type of the shmat() system call.
+ * Usually set to 'void *' or 'char *'.
+ */
+/* HAS_SHMAT_PROTOTYPE:
+ * This symbol, if defined, indicates that the sys/shm.h includes
+ * a prototype for shmat(). Otherwise, it is up to the program to
+ * guess one. Shmat_t shmat _((int, Shmat_t, int)) is a good guess,
+ * but not always right so it should be emitted by the program only
+ * when HAS_SHMAT_PROTOTYPE is not defined to avoid conflicting defs.
+ */
+#define Shmat_t void * /**/
+#define HAS_SHMAT_PROTOTYPE /**/
+
+/* USE_STAT_BLOCKS:
+ * This symbol is defined if this system has a stat structure declaring
+ * st_blksize and st_blocks.
+ */
+/*#define USE_STAT_BLOCKS / **/
+
+/* HAS_STRCHR:
+ * This symbol is defined to indicate that the strchr()/strrchr()
+ * functions are available for string searching. If not, try the
+ * index()/rindex() pair.
+ */
+/* HAS_INDEX:
+ * This symbol is defined to indicate that the index()/rindex()
+ * functions are available for string searching.
+ */
+#define HAS_STRCHR /**/
+/*#define HAS_INDEX / **/
+
+/* HAS_STRCOLL:
+ * This symbol, if defined, indicates that the strcoll routine is
+ * available to compare strings using collating information.
+ */
+#define HAS_STRCOLL /**/
+
+/* USE_STRUCT_COPY:
+ * This symbol, if defined, indicates that this C compiler knows how
+ * to copy structures. If undefined, you'll need to use a block copy
+ * routine of some sort instead.
+ */
+#define USE_STRUCT_COPY /**/
+
+/* HAS_STRERROR:
+ * This symbol, if defined, indicates that the strerror routine is
+ * available to translate error numbers to strings. See the writeup
+ * of Strerror() in this file before you try to define your own.
+ */
+/* HAS_SYS_ERRLIST:
+ * This symbol, if defined, indicates that the sys_errlist array is
+ * available to translate error numbers to strings. The extern int
+ * sys_nerr gives the size of that table.
+ */
+/* Strerror:
+ * This preprocessor symbol is defined as a macro if strerror() is
+ * not available to translate error numbers to strings but sys_errlist[]
+ * array is there.
+ */
+#define HAS_STRERROR /**/
+#define HAS_SYS_ERRLIST /**/
+#define Strerror(e) strerror(e)
+
+/* HAS_STRTOD:
+ * This symbol, if defined, indicates that the strtod routine is
+ * available to provide better numeric string conversion than atof().
+ */
+#define HAS_STRTOD /**/
+
+/* HAS_STRTOL:
+ * This symbol, if defined, indicates that the strtol routine is available
+ * to provide better numeric string conversion than atoi() and friends.
+ */
+#define HAS_STRTOL /**/
+
+/* HAS_STRTOUL:
+ * This symbol, if defined, indicates that the strtoul routine is
+ * available to provide conversion of strings to unsigned long.
+ */
+#define HAS_STRTOUL /**/
+
+/* HAS_STRXFRM:
+ * This symbol, if defined, indicates that the strxfrm() routine is
+ * available to transform strings.
+ */
+#define HAS_STRXFRM /**/
+
+/* HAS_SYMLINK:
+ * This symbol, if defined, indicates that the symlink routine is available
+ * to create symbolic links.
+ */
+#define HAS_SYMLINK /**/
+
+/* HAS_SYSCALL:
+ * This symbol, if defined, indicates that the syscall routine is
+ * available to call arbitrary system calls. If undefined, that's tough.
+ */
+#define HAS_SYSCALL /**/
+
+/* HAS_SYSCONF:
+ * This symbol, if defined, indicates that sysconf() is available
+ * to determine system related limits and options.
+ */
+#define HAS_SYSCONF /**/
+
+/* HAS_SYSTEM:
+ * This symbol, if defined, indicates that the system routine is
+ * available to issue a shell command.
+ */
+#define HAS_SYSTEM /**/
+
+/* HAS_TCGETPGRP:
+ * This symbol, if defined, indicates that the tcgetpgrp routine is
+ * available to get foreground process group ID.
+ */
+#define HAS_TCGETPGRP /**/
+
+/* HAS_TCSETPGRP:
+ * This symbol, if defined, indicates that the tcsetpgrp routine is
+ * available to set foreground process group ID.
+ */
+#define HAS_TCSETPGRP /**/
+
+/* HAS_TRUNCATE:
+ * This symbol, if defined, indicates that the truncate routine is
+ * available to truncate files.
+ */
+#define HAS_TRUNCATE /**/
+
+/* HAS_TZNAME:
+ * This symbol, if defined, indicates that the tzname[] array is
+ * available to access timezone names.
+ */
+#define HAS_TZNAME /**/
+
+/* HAS_UMASK:
+ * This symbol, if defined, indicates that the umask routine is
+ * available to set and get the value of the file creation mask.
+ */
+#define HAS_UMASK /**/
+
+/* HAS_VFORK:
+ * This symbol, if defined, indicates that vfork() exists.
+ */
+/*#define HAS_VFORK / **/
+
+/* HASVOLATILE:
+ * This symbol, if defined, indicates that this C compiler knows about
+ * the volatile declaration.
+ */
+#define HASVOLATILE /**/
+#ifndef HASVOLATILE
+#define volatile
+#endif
+
+/* HAS_WAIT4:
+ * This symbol, if defined, indicates that wait4() exists.
+ */
+#define HAS_WAIT4 /**/
+
+/* HAS_WAITPID:
+ * This symbol, if defined, indicates that the waitpid routine is
+ * available to wait for child process.
+ */
+#define HAS_WAITPID /**/
+
+/* HAS_WCSTOMBS:
+ * This symbol, if defined, indicates that the wcstombs routine is
+ * available to convert wide character strings to multibyte strings.
+ */
+#define HAS_WCSTOMBS /**/
+
+/* HAS_WCTOMB:
+ * This symbol, if defined, indicates that the wctomb routine is available
+ * to covert a wide character to a multibyte.
+ */
+#define HAS_WCTOMB /**/
+
+/* EBCDIC:
+ * This symbol, if defined, indicates that this system uses
+ * EBCDIC encoding.
+ */
+/*#define EBCDIC / **/
+
+/* I_ARPA_INET:
+ * This symbol, if defined, indicates that <arpa/inet.h> exists and should
+ * be included.
+ */
+#define I_ARPA_INET /**/
+
+/* I_DBM:
+ * This symbol, if defined, indicates that <dbm.h> exists and should
+ * be included.
+ */
+/* I_RPCSVC_DBM:
+ * This symbol, if defined, indicates that <rpcsvc/dbm.h> exists and
+ * should be included.
+ */
+#define I_DBM /**/
+/*#define I_RPCSVC_DBM / **/
+
+/* I_DIRENT:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <dirent.h>. Using this symbol also triggers the definition
+ * of the Direntry_t define which ends up being 'struct dirent' or
+ * 'struct direct' depending on the availability of <dirent.h>.
+ */
+/* DIRNAMLEN:
+ * This symbol, if defined, indicates to the C program that the length
+ * of directory entry names is provided by a d_namlen field. Otherwise
+ * you need to do strlen() on the d_name field.
+ */
+/* Direntry_t:
+ * This symbol is set to 'struct direct' or 'struct dirent' depending on
+ * whether dirent is available or not. You should use this pseudo type to
+ * portably declare your directory entries.
+ */
+#define I_DIRENT /**/
+/*#define DIRNAMLEN / **/
+#define Direntry_t struct dirent
+
+/* I_DLFCN:
+ * This symbol, if defined, indicates that <dlfcn.h> exists and should
+ * be included.
+ */
+#define I_DLFCN /**/
+
+/* I_FCNTL:
+ * This manifest constant tells the C program to include <fcntl.h>.
+ */
+/*#define I_FCNTL / **/
+
+/* I_FLOAT:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <float.h> to get definition of symbols like DBL_MAX or
+ * DBL_MIN, i.e. machine dependent floating point values.
+ */
+#define I_FLOAT /**/
+
+/* I_GRP:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <grp.h>.
+ */
+/* GRPASSWD:
+ * This symbol, if defined, indicates to the C program that struct group
+ * contains gr_passwd.
+ */
+/* HAS_SETGRENT:
+ * This symbol, if defined, indicates that the getgrent routine is
+ * available for initializing sequential access of the group database.
+ */
+/* HAS_GETGRENT:
+ * This symbol, if defined, indicates that the getgrent routine is
+ * available for sequential access of the group database.
+ */
+/* HAS_ENDGRENT:
+ * This symbol, if defined, indicates that the getgrent routine is
+ * available for finalizing sequential access of the group database.
+ */
+#define I_GRP /**/
+#define GRPASSWD /**/
+#define HAS_SETGRENT /**/
+#define HAS_GETGRENT /**/
+#define HAS_ENDGRENT /**/
+
+/* I_LIMITS:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <limits.h> to get definition of symbols like WORD_BIT or
+ * LONG_MAX, i.e. machine dependant limitations.
+ */
+#define I_LIMITS /**/
+
+/* I_LOCALE:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <locale.h>.
+ */
+#define I_LOCALE /**/
+
+/* I_MATH:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <math.h>.
+ */
+#define I_MATH /**/
+
+/* I_MEMORY:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <memory.h>.
+ */
+/*#define I_MEMORY / **/
+
+/* I_NDBM:
+ * This symbol, if defined, indicates that <ndbm.h> exists and should
+ * be included.
+ */
+#define I_NDBM /**/
+
+/* I_NET_ERRNO:
+ * This symbol, if defined, indicates that <net/errno.h> exists and
+ * should be included.
+ */
+/*#define I_NET_ERRNO / **/
+
+/* I_NETINET_IN:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <netinet/in.h>. Otherwise, you may try <sys/in.h>.
+ */
+#define I_NETINET_IN /**/
+
+/* I_SFIO:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sfio.h>.
+ */
+/*#define I_SFIO / **/
+
+/* I_STDDEF:
+ * This symbol, if defined, indicates that <stddef.h> exists and should
+ * be included.
+ */
+#define I_STDDEF /**/
+
+/* I_STDLIB:
+ * This symbol, if defined, indicates that <stdlib.h> exists and should
+ * be included.
+ */
+#define I_STDLIB /**/
+
+/* I_STRING:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <string.h> (USG systems) instead of <strings.h> (BSD systems).
+ */
+#define I_STRING /**/
+
+/* I_SYS_DIR:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/dir.h>.
+ */
+#define I_SYS_DIR /**/
+
+/* I_SYS_FILE:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/file.h> to get definition of R_OK and friends.
+ */
+#define I_SYS_FILE /**/
+
+/* I_SYS_IOCTL:
+ * This symbol, if defined, indicates that <sys/ioctl.h> exists and should
+ * be included. Otherwise, include <sgtty.h> or <termio.h>.
+ */
+#define I_SYS_IOCTL /**/
+
+/* I_SYS_NDIR:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/ndir.h>.
+ */
+/*#define I_SYS_NDIR / **/
+
+/* I_SYS_PARAM:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/param.h>.
+ */
+#define I_SYS_PARAM /**/
+
+/* I_SYS_RESOURCE:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/resource.h>.
+ */
+#define I_SYS_RESOURCE /**/
+
+/* I_SYS_SELECT:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/select.h> in order to get definition of struct timeval.
+ */
+#define I_SYS_SELECT /**/
+
+/* I_SYS_STAT:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/stat.h>.
+ */
+#define I_SYS_STAT /**/
+
+/* I_SYS_TIMES:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/times.h>.
+ */
+#define I_SYS_TIMES /**/
+
+/* I_SYS_TYPES:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/types.h>.
+ */
+#define I_SYS_TYPES /**/
+
+/* I_SYS_UN:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/un.h> to get UNIX domain socket definitions.
+ */
+#define I_SYS_UN /**/
+
+/* I_SYS_WAIT:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/wait.h>.
+ */
+#define I_SYS_WAIT /**/
+
+/* I_TERMIO:
+ * This symbol, if defined, indicates that the program should include
+ * <termio.h> rather than <sgtty.h>. There are also differences in
+ * the ioctl() calls that depend on the value of this symbol.
+ */
+/* I_TERMIOS:
+ * This symbol, if defined, indicates that the program should include
+ * the POSIX termios.h rather than sgtty.h or termio.h.
+ * There are also differences in the ioctl() calls that depend on the
+ * value of this symbol.
+ */
+/* I_SGTTY:
+ * This symbol, if defined, indicates that the program should include
+ * <sgtty.h> rather than <termio.h>. There are also differences in
+ * the ioctl() calls that depend on the value of this symbol.
+ */
+/*#define I_TERMIO / **/
+#define I_TERMIOS /**/
+/*#define I_SGTTY / **/
+
+/* I_UNISTD:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <unistd.h>.
+ */
+#define I_UNISTD /**/
+
+/* I_UTIME:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <utime.h>.
+ */
+#define I_UTIME /**/
+
+/* I_VALUES:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <values.h> to get definition of symbols like MINFLOAT or
+ * MAXLONG, i.e. machine dependant limitations. Probably, you
+ * should use <limits.h> instead, if it is available.
+ */
+#define I_VALUES /**/
+
+/* I_STDARG:
+ * This symbol, if defined, indicates that <stdarg.h> exists and should
+ * be included.
+ */
+/* I_VARARGS:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <varargs.h>.
+ */
+#define I_STDARG /**/
+/*#define I_VARARGS / **/
+
+/* I_VFORK:
+ * This symbol, if defined, indicates to the C program that it should
+ * include vfork.h.
+ */
+/*#define I_VFORK / **/
+
+/* CAN_PROTOTYPE:
+ * If defined, this macro indicates that the C compiler can handle
+ * function prototypes.
+ */
+/* _:
+ * This macro is used to declare function parameters for folks who want
+ * to make declarations with prototypes using a different style than
+ * the above macros. Use double parentheses. For example:
+ *
+ * int main _((int argc, char *argv[]));
+ */
+#define CAN_PROTOTYPE /**/
+#ifdef CAN_PROTOTYPE
+#define _(args) args
+#else
+#define _(args) ()
+#endif
+
+/* SH_PATH:
+ * This symbol contains the full pathname to the shell used on this
+ * on this system to execute Bourne shell scripts. Usually, this will be
+ * /bin/sh, though it's possible that some systems will have /bin/ksh,
+ * /bin/pdksh, /bin/ash, /bin/bash, or even something such as
+ * D:/bin/sh.exe.
+ */
+#define SH_PATH "/bin/sh" /**/
+
+/* STDCHAR:
+ * This symbol is defined to be the type of char used in stdio.h.
+ * It has the values "unsigned char" or "char".
+ */
+#define STDCHAR char /**/
+
+/* MEM_ALIGNBYTES:
+ * This symbol contains the number of bytes required to align a
+ * double. Usual values are 2, 4 and 8.
+ * On NeXT starting with 3.2, you can build "Fat" Multiple Architecture
+ * Binaries (MAB) for targets with varying alignment. This only matters
+ * for perl, where the config.h can be generated and installed on one
+ * system, and used by a different architecture to build an extension.
+ * The default is eight, for safety.
+ */
+#define MEM_ALIGNBYTES 4 /**/
+
+/* BYTEORDER:
+ * This symbol holds the hexadecimal constant defined in byteorder,
+ * i.e. 0x1234 or 0x4321, etc...
+ * On NeXT 3.2 (and greater), you can build "Fat" Multiple Architecture
+ * Binaries (MAB) on either big endian or little endian machines.
+ * The endian-ness is available at compile-time. This only matters
+ * for perl, where the config.h can be generated and installed on
+ * one system, and used by a different architecture to build an
+ * extension. Older versions of NeXT that might not have
+ * defined either *_ENDIAN__ were all on Motorola 680x0 series,
+ * so the default case (for NeXT) is big endian to catch them.
+ * This might matter for NeXT 3.0.
+ */
+#ifndef NeXT
+#define BYTEORDER 0x1234 /* large digits for MSB */
+#else /* NeXT */
+#ifdef __LITTLE_ENDIAN__
+#define BYTEORDER 0x1234
+#else /* __BIG_ENDIAN__ */
+#define BYTEORDER 0x4321
+#endif /* ENDIAN CHECK */
+#endif /* NeXT */
+
+/* CASTI32:
+ * This symbol is defined if the C compiler can cast negative
+ * or large floating point numbers to 32-bit ints.
+ */
+/*#define CASTI32 / **/
+
+/* CASTNEGFLOAT:
+ * This symbol is defined if the C compiler can cast negative
+ * numbers to unsigned longs, ints and shorts.
+ */
+/* CASTFLAGS:
+ * This symbol contains flags that say what difficulties the compiler
+ * has casting odd floating values to unsigned long:
+ * 0 = ok
+ * 1 = couldn't cast < 0
+ * 2 = couldn't cast >= 0x80000000
+ * 4 = couldn't cast in argument expression list
+ */
+#define CASTNEGFLOAT /**/
+#define CASTFLAGS 0 /**/
+
+/* VOID_CLOSEDIR:
+ * This symbol, if defined, indicates that the closedir() routine
+ * does not return a value.
+ */
+/*#define VOID_CLOSEDIR / **/
+
+/* Gconvert:
+ * This preprocessor macro is defined to convert a floating point
+ * number to a string without a trailing decimal point. This
+ * emulates the behavior of sprintf("%g"), but is sometimes much more
+ * efficient. If gconvert() is not available, but gcvt() drops the
+ * trailing decimal point, then gcvt() is used. If all else fails,
+ * a macro using sprintf("%g") is used. Arguments for the Gconvert
+ * macro are: value, number of digits, whether trailing zeros should
+ * be retained, and the output buffer.
+ * Possible values are:
+ * d_Gconvert='gconvert((x),(n),(t),(b))'
+ * d_Gconvert='gcvt((x),(n),(b))'
+ * d_Gconvert='sprintf((b),"%.*g",(n),(x))'
+ * The last two assume trailing zeros should not be kept.
+ */
+#define Gconvert(x,n,t,b) gcvt((x),(n),(b))
+
+/* HAS_GNULIBC:
+ * This symbol, if defined, indicates to the C program that
+ * the GNU C library is being used.
+ */
+#define HAS_GNULIBC /**/
+/* HAS_ISASCII:
+ * This manifest constant lets the C program know that isascii
+ * is available.
+ */
+#define HAS_ISASCII /**/
+
+/* HAS_LCHOWN:
+ * This symbol, if defined, indicates that the lchown routine is
+ * available to operate on a symbolic link (instead of following the
+ * link).
+ */
+/*#define HAS_LCHOWN / **/
+
+/* HAS_OPEN3:
+ * This manifest constant lets the C program know that the three
+ * argument form of open(2) is available.
+ */
+#define HAS_OPEN3 /**/
+
+/* HAS_SAFE_BCOPY:
+ * This symbol, if defined, indicates that the bcopy routine is available
+ * to copy potentially overlapping memory blocks. Otherwise you should
+ * probably use memmove() or memcpy(). If neither is defined, roll your
+ * own version.
+ */
+#define HAS_SAFE_BCOPY /**/
+
+/* HAS_SAFE_MEMCPY:
+ * This symbol, if defined, indicates that the memcpy routine is available
+ * to copy potentially overlapping memory blocks. Otherwise you should
+ * probably use memmove() or memcpy(). If neither is defined, roll your
+ * own version.
+ */
+/*#define HAS_SAFE_MEMCPY / **/
+
+/* HAS_SANE_MEMCMP:
+ * This symbol, if defined, indicates that the memcmp routine is available
+ * and can be used to compare relative magnitudes of chars with their high
+ * bits set. If it is not defined, roll your own version.
+ */
+#define HAS_SANE_MEMCMP /**/
+
+/* HAS_SIGACTION:
+ * This symbol, if defined, indicates that Vr4's sigaction() routine
+ * is available.
+ */
+#define HAS_SIGACTION /**/
+
+/* Sigjmp_buf:
+ * This is the buffer type to be used with Sigsetjmp and Siglongjmp.
+ */
+/* Sigsetjmp:
+ * This macro is used in the same way as sigsetjmp(), but will invoke
+ * traditional setjmp() if sigsetjmp isn't available.
+ * See HAS_SIGSETJMP.
+ */
+/* Siglongjmp:
+ * This macro is used in the same way as siglongjmp(), but will invoke
+ * traditional longjmp() if siglongjmp isn't available.
+ * See HAS_SIGSETJMP.
+ */
+#define HAS_SIGSETJMP /**/
+#ifdef HAS_SIGSETJMP
+#define Sigjmp_buf sigjmp_buf
+#define Sigsetjmp(buf,save_mask) sigsetjmp((buf),(save_mask))
+#define Siglongjmp(buf,retval) siglongjmp((buf),(retval))
+#else
+#define Sigjmp_buf jmp_buf
+#define Sigsetjmp(buf,save_mask) setjmp((buf))
+#define Siglongjmp(buf,retval) longjmp((buf),(retval))
+#endif
+
+/* USE_STDIO_PTR:
+ * This symbol is defined if the _ptr and _cnt fields (or similar)
+ * of the stdio FILE structure can be used to access the stdio buffer
+ * for a file handle. If this is defined, then the FILE_ptr(fp)
+ * and FILE_cnt(fp) macros will also be defined and should be used
+ * to access these fields.
+ */
+/* FILE_ptr:
+ * This macro is used to access the _ptr field (or equivalent) of the
+ * FILE structure pointed to by its argument. This macro will always be
+ * defined if USE_STDIO_PTR is defined.
+ */
+/* STDIO_PTR_LVALUE:
+ * This symbol is defined if the FILE_ptr macro can be used as an
+ * lvalue.
+ */
+/* FILE_cnt:
+ * This macro is used to access the _cnt field (or equivalent) of the
+ * FILE structure pointed to by its argument. This macro will always be
+ * defined if USE_STDIO_PTR is defined.
+ */
+/* STDIO_CNT_LVALUE:
+ * This symbol is defined if the FILE_cnt macro can be used as an
+ * lvalue.
+ */
+#define USE_STDIO_PTR /**/
+#ifdef USE_STDIO_PTR
+#define FILE_ptr(fp) ((fp)->_IO_read_ptr)
+#define STDIO_PTR_LVALUE /**/
+#define FILE_cnt(fp) ((fp)->_IO_read_end - (fp)->_IO_read_ptr)
+/*#define STDIO_CNT_LVALUE / **/
+#endif
+
+/* USE_STDIO_BASE:
+ * This symbol is defined if the _base field (or similar) of the
+ * stdio FILE structure can be used to access the stdio buffer for
+ * a file handle. If this is defined, then the FILE_base(fp) macro
+ * will also be defined and should be used to access this field.
+ * Also, the FILE_bufsiz(fp) macro will be defined and should be used
+ * to determine the number of bytes in the buffer. USE_STDIO_BASE
+ * will never be defined unless USE_STDIO_PTR is.
+ */
+/* FILE_base:
+ * This macro is used to access the _base field (or equivalent) of the
+ * FILE structure pointed to by its argument. This macro will always be
+ * defined if USE_STDIO_BASE is defined.
+ */
+/* FILE_bufsiz:
+ * This macro is used to determine the number of bytes in the I/O
+ * buffer pointed to by _base field (or equivalent) of the FILE
+ * structure pointed to its argument. This macro will always be defined
+ * if USE_STDIO_BASE is defined.
+ */
+#define USE_STDIO_BASE /**/
+#ifdef USE_STDIO_BASE
+#define FILE_base(fp) ((fp)->_IO_read_base)
+#define FILE_bufsiz(fp) ((fp)->_IO_read_end - (fp)->_IO_read_base)
+#endif
+
+/* HAS_VPRINTF:
+ * This symbol, if defined, indicates that the vprintf routine is available
+ * to printf with a pointer to an argument list. If unavailable, you
+ * may need to write your own, probably in terms of _doprnt().
+ */
+/* USE_CHAR_VSPRINTF:
+ * This symbol is defined if this system has vsprintf() returning type
+ * (char*). The trend seems to be to declare it as "int vsprintf()". It
+ * is up to the package author to declare vsprintf correctly based on the
+ * symbol.
+ */
+#define HAS_VPRINTF /**/
+/*#define USE_CHAR_VSPRINTF / **/
+
+/* DOUBLESIZE:
+ * This symbol contains the size of a double, so that the C preprocessor
+ * can make decisions based on it.
+ */
+#define DOUBLESIZE 8 /**/
+
+/* I_TIME:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <time.h>.
+ */
+/* I_SYS_TIME:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/time.h>.
+ */
+/* I_SYS_TIME_KERNEL:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/time.h> with KERNEL defined.
+ */
+/*#define I_TIME / **/
+#define I_SYS_TIME /**/
+/*#define I_SYS_TIME_KERNEL / **/
+
+/* INTSIZE:
+ * This symbol contains the value of sizeof(int) so that the C
+ * preprocessor can make decisions based on it.
+ */
+/* LONGSIZE:
+ * This symbol contains the value of sizeof(long) so that the C
+ * preprocessor can make decisions based on it.
+ */
+/* SHORTSIZE:
+ * This symbol contains the value of sizeof(short) so that the C
+ * preprocessor can make decisions based on it.
+ */
+#define INTSIZE 4 /**/
+#define LONGSIZE 4 /**/
+#define SHORTSIZE 2 /**/
+
+/* VAL_O_NONBLOCK:
+ * This symbol is to be used during open() or fcntl(F_SETFL) to turn on
+ * non-blocking I/O for the file descriptor. Note that there is no way
+ * back, i.e. you cannot turn it blocking again this way. If you wish to
+ * alternatively switch between blocking and non-blocking, use the
+ * ioctl(FIOSNBIO) call instead, but that is not supported by all devices.
+ */
+/* VAL_EAGAIN:
+ * This symbol holds the errno error code set by read() when no data was
+ * present on the non-blocking file descriptor.
+ */
+/* RD_NODATA:
+ * This symbol holds the return code from read() when no data is present
+ * on the non-blocking file descriptor. Be careful! If EOF_NONBLOCK is
+ * not defined, then you can't distinguish between no data and EOF by
+ * issuing a read(). You'll have to find another way to tell for sure!
+ */
+/* EOF_NONBLOCK:
+ * This symbol, if defined, indicates to the C program that a read() on
+ * a non-blocking file descriptor will return 0 on EOF, and not the value
+ * held in RD_NODATA (-1 usually, in that case!).
+ */
+#define VAL_O_NONBLOCK O_NONBLOCK
+#define VAL_EAGAIN EAGAIN
+#define RD_NODATA -1
+#define EOF_NONBLOCK
+
+/* PTRSIZE:
+ * This symbol contains the size of a pointer, so that the C preprocessor
+ * can make decisions based on it. It will be sizeof(void *) if
+ * the compiler supports (void *); otherwise it will be
+ * sizeof(char *).
+ */
+#define PTRSIZE 4 /**/
+
+/* RANDBITS:
+ * This symbol contains the number of bits of random number the rand()
+ * function produces. Usual values are 15, 16, and 31.
+ */
+#define RANDBITS 31 /**/
+
+/* SSize_t:
+ * This symbol holds the type used by functions that return
+ * a count of bytes or an error condition. It must be a signed type.
+ * It is usually ssize_t, but may be long or int, etc.
+ * It may be necessary to include <sys/types.h> or <unistd.h>
+ * to get any typedef'ed information.
+ * We will pick a type such that sizeof(SSize_t) == sizeof(Size_t).
+ */
+#define SSize_t ssize_t /* signed count of bytes */
+
+/* OSNAME:
+ * This symbol contains the name of the operating system, as determined
+ * by Configure. You shouldn't rely on it too much; the specific
+ * feature tests from Configure are generally more reliable.
+ */
+#define OSNAME "linux" /**/
+
+/* CAT2:
+ * This macro catenates 2 tokens together.
+ */
+/* STRINGIFY:
+ * This macro surrounds its token with double quotes.
+ */
+#if 42 == 1
+#define CAT2(a,b)a/**/b
+#define STRINGIFY(a)"a"
+ /* If you can get stringification with catify, tell me how! */
+#endif
+#if 42 == 42
+#define CAT2(a,b)a ## b
+#define StGiFy(a)# a
+#define STRINGIFY(a)StGiFy(a)
+#endif
+#if 42 != 1 && 42 != 42
+#include "Bletch: How does this C preprocessor catenate tokens?"
+#endif
+
+/* CSH:
+ * This symbol, if defined, contains the full pathname of csh.
+ */
+#define HAS_CSH /**/
+#ifdef HAS_CSH
+#define CSH "/bin/csh" /**/
+#endif
+
+/* HAS_ENDHOSTENT:
+ * This symbol, if defined, indicates that the endhostent() routine is
+ * available to close whatever was being used for host queries.
+ */
+#define HAS_ENDHOSTENT /**/
+
+/* HAS_ENDNETENT:
+ * This symbol, if defined, indicates that the endnetent() routine is
+ * available to close whatever was being used for network queries.
+ */
+#define HAS_ENDNETENT /**/
+
+/* HAS_ENDPROTOENT:
+ * This symbol, if defined, indicates that the endprotoent() routine is
+ * available to close whatever was being used for protocol queries.
+ */
+#define HAS_ENDPROTOENT /**/
+
+/* HAS_ENDSERVENT:
+ * This symbol, if defined, indicates that the endservent() routine is
+ * available to close whatever was being used for service queries.
+ */
+#define HAS_ENDSERVENT /**/
+
+/* HAS_GETHOSTBYADDR:
+ * This symbol, if defined, indicates that the gethostbyaddr() routine is
+ * available to look up hosts by their IP addresses.
+ */
+#define HAS_GETHOSTBYADDR /**/
+
+/* HAS_GETHOSTBYNAME:
+ * This symbol, if defined, indicates that the gethostbyname() routine is
+ * available to look up host names in some data base or other.
+ */
+#define HAS_GETHOSTBYNAME /**/
+
+/* HAS_GETHOSTENT:
+ * This symbol, if defined, indicates that the gethostent() routine is
+ * available to look up host names in some data base or another.
+ */
+#define HAS_GETHOSTENT /**/
+
+/* HAS_GETNETBYADDR:
+ * This symbol, if defined, indicates that the getnetbyaddr() routine is
+ * available to look up networks by their IP addresses.
+ */
+#define HAS_GETNETBYADDR /**/
+
+/* HAS_GETNETBYNAME:
+ * This symbol, if defined, indicates that the getnetbyname() routine is
+ * available to look up networks by their names.
+ */
+#define HAS_GETNETBYNAME /**/
+
+/* HAS_GETNETENT:
+ * This symbol, if defined, indicates that the getnetent() routine is
+ * available to look up network names in some data base or another.
+ */
+#define HAS_GETNETENT /**/
+
+/* HAS_GETPROTOENT:
+ * This symbol, if defined, indicates that the getprotoent() routine is
+ * available to look up protocols in some data base or another.
+ */
+#define HAS_GETPROTOENT /**/
+
+/* HAS_GETPROTOBYNAME:
+ * This symbol, if defined, indicates that the getprotobyname()
+ * routine is available to look up protocols by their name.
+ */
+/* HAS_GETPROTOBYNUMBER:
+ * This symbol, if defined, indicates that the getprotobynumber()
+ * routine is available to look up protocols by their number.
+ */
+#define HAS_GETPROTOBYNAME /**/
+#define HAS_GETPROTOBYNUMBER /**/
+
+/* HAS_GETSERVENT:
+ * This symbol, if defined, indicates that the getservent() routine is
+ * available to look up network services in some data base or another.
+ */
+#define HAS_GETSERVENT /**/
+
+/* HAS_GETSERVBYNAME:
+ * This symbol, if defined, indicates that the getservbyname()
+ * routine is available to look up services by their name.
+ */
+/* HAS_GETSERVBYPORT:
+ * This symbol, if defined, indicates that the getservbyport()
+ * routine is available to look up services by their port.
+ */
+#define HAS_GETSERVBYNAME /**/
+#define HAS_GETSERVBYPORT /**/
+
+/* HAS_LONG_DOUBLE:
+ * This symbol will be defined if the C compiler supports long
+ * doubles.
+ */
+/* LONG_DOUBLESIZE:
+ * This symbol contains the size of a long double, so that the
+ * C preprocessor can make decisions based on it. It is only
+ * defined if the system supports long doubles.
+ */
+#define HAS_LONG_DOUBLE /**/
+#ifdef HAS_LONG_DOUBLE
+#define LONG_DOUBLESIZE 12 /**/
+#endif
+
+/* HAS_LONG_LONG:
+ * This symbol will be defined if the C compiler supports
+ * long long.
+ */
+/* LONGLONGSIZE:
+ * This symbol contains the size of a long long, so that the
+ * C preprocessor can make decisions based on it. It is only
+ * defined if the system supports long long.
+ */
+#define HAS_LONG_LONG /**/
+#ifdef HAS_LONG_LONG
+#define LONGLONGSIZE 8 /**/
+#endif
+
+/* HAS_SETGROUPS:
+ * This symbol, if defined, indicates that the setgroups() routine is
+ * available to set the list of process groups. If unavailable, multiple
+ * groups are probably not supported.
+ */
+#define HAS_SETGROUPS /**/
+
+/* HAS_SETHOSTENT:
+ * This symbol, if defined, indicates that the sethostent() routine is
+ * available.
+ */
+#define HAS_SETHOSTENT /**/
+
+/* HAS_SETNETENT:
+ * This symbol, if defined, indicates that the setnetent() routine is
+ * available.
+ */
+#define HAS_SETNETENT /**/
+
+/* HAS_SETPROTOENT:
+ * This symbol, if defined, indicates that the setprotoent() routine is
+ * available.
+ */
+#define HAS_SETPROTOENT /**/
+
+/* HAS_SETSERVENT:
+ * This symbol, if defined, indicates that the setservent() routine is
+ * available.
+ */
+#define HAS_SETSERVENT /**/
+
+/* HAS_SETVBUF:
+ * This symbol, if defined, indicates that the setvbuf routine is
+ * available to change buffering on an open stdio stream.
+ * to a line-buffered mode.
+ */
+#define HAS_SETVBUF /**/
+
+/* HAS_SOCKET:
+ * This symbol, if defined, indicates that the BSD socket interface is
+ * supported.
+ */
+/* HAS_SOCKETPAIR:
+ * This symbol, if defined, indicates that the BSD socketpair() call is
+ * supported.
+ */
+#define HAS_SOCKET /**/
+#define HAS_SOCKETPAIR /**/
+
+/* HAS_UNION_SEMUN:
+ * This symbol, if defined, indicates that the union semun is
+ * defined by including <sys/sem.h>. If not, the user code
+ * probably needs to define it as:
+ * union semun {
+ * int val;
+ * struct semid_ds *buf;
+ * unsigned short *array;
+ * }
+ */
+/* USE_SEMCTL_SEMUN:
+ * This symbol, if defined, indicates that union semun is
+ * used for semctl IPC_STAT.
+ */
+/* USE_SEMCTL_SEMID_DS:
+ * This symbol, if defined, indicates that struct semid_ds * is
+ * used for semctl IPC_STAT.
+ */
+#define HAS_UNION_SEMUN /**/
+#define USE_SEMCTL_SEMUN /**/
+#define USE_SEMCTL_SEMID_DS /**/
+
+/* Signal_t:
+ * This symbol's value is either "void" or "int", corresponding to the
+ * appropriate return type of a signal handler. Thus, you can declare
+ * a signal handler using "Signal_t (*handler)()", and define the
+ * handler using "Signal_t handler(sig)".
+ */
+#define Signal_t void /* Signal handler's return type */
+
+/* Groups_t:
+ * This symbol holds the type used for the second argument to
+ * getgroups() and setgropus(). Usually, this is the same as
+ * gidtype (gid_t) , but sometimes it isn't.
+ * It can be int, ushort, uid_t, etc...
+ * It may be necessary to include <sys/types.h> to get any
+ * typedef'ed information. This is only required if you have
+ * getgroups() or setgropus()..
+ */
+#if defined(HAS_GETGROUPS) || defined(HAS_SETGROUPS)
+#define Groups_t gid_t /* Type for 2nd arg to [sg]etgroups() */
+#endif
+
+/* I_NETDB:
+ * This symbol, if defined, indicates that <netdb.h> exists and
+ * should be included.
+ */
+#define I_NETDB /**/
+
+/* I_PWD:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <pwd.h>.
+ */
+/* PWQUOTA:
+ * This symbol, if defined, indicates to the C program that struct passwd
+ * contains pw_quota.
+ */
+/* PWAGE:
+ * This symbol, if defined, indicates to the C program that struct passwd
+ * contains pw_age.
+ */
+/* PWCHANGE:
+ * This symbol, if defined, indicates to the C program that struct passwd
+ * contains pw_change.
+ */
+/* PWCLASS:
+ * This symbol, if defined, indicates to the C program that struct passwd
+ * contains pw_class.
+ */
+/* PWEXPIRE:
+ * This symbol, if defined, indicates to the C program that struct passwd
+ * contains pw_expire.
+ */
+/* PWCOMMENT:
+ * This symbol, if defined, indicates to the C program that struct passwd
+ * contains pw_comment.
+ */
+/* PWGECOS:
+ * This symbol, if defined, indicates to the C program that struct passwd
+ * contains pw_gecos.
+ */
+/* PWPASSWD:
+ * This symbol, if defined, indicates to the C program that struct passwd
+ * contains pw_passwd.
+ */
+/* HAS_SETPWENT:
+ * This symbol, if defined, indicates that the getpwrent routine is
+ * available for initializing sequential access of the passwd database.
+ */
+/* HAS_GETPWENT:
+ * This symbol, if defined, indicates that the getpwent routine is
+ * available for sequential access of the password database.
+ */
+/* HAS_ENDPWENT:
+ * This symbol, if defined, indicates that the getpwent routine is
+ * available for finalizing sequential access of the passwd database.
+ */
+#define I_PWD /**/
+/*#define PWQUOTA / **/
+/*#define PWAGE / **/
+/*#define PWCHANGE / **/
+/*#define PWCLASS / **/
+/*#define PWEXPIRE / **/
+/*#define PWCOMMENT / **/
+#define PWGECOS /**/
+#define PWPASSWD /**/
+#define HAS_SETPWENT /**/
+#define HAS_GETPWENT /**/
+#define HAS_ENDPWENT /**/
+
+/* Free_t:
+ * This variable contains the return type of free(). It is usually
+ * void, but occasionally int.
+ */
+/* Malloc_t:
+ * This symbol is the type of pointer returned by malloc and realloc.
+ */
+#define Malloc_t void * /**/
+#define Free_t void /**/
+
+/* MYMALLOC:
+ * This symbol, if defined, indicates that we're using our own malloc.
+ */
+/*#define MYMALLOC / **/
+
+/* SIG_NAME:
+ * This symbol contains a list of signal names in order of
+ * signal number. This is intended
+ * to be used as a static array initialization, like this:
+ * char *sig_name[] = { SIG_NAME };
+ * The signals in the list are separated with commas, and each signal
+ * is surrounded by double quotes. There is no leading SIG in the signal
+ * name, i.e. SIGQUIT is known as "QUIT".
+ * Gaps in the signal numbers (up to NSIG) are filled in with NUMnn,
+ * etc., where nn is the actual signal number (e.g. NUM37).
+ * The signal number for sig_name[i] is stored in sig_num[i].
+ * The last element is 0 to terminate the list with a NULL. This
+ * corresponds to the 0 at the end of the sig_num list.
+ */
+/* SIG_NUM:
+ * This symbol contains a list of signal numbers, in the same order as the
+ * SIG_NAME list. It is suitable for static array initialization, as in:
+ * int sig_num[] = { SIG_NUM };
+ * The signals in the list are separated with commas, and the indices
+ * within that list and the SIG_NAME list match, so it's easy to compute
+ * the signal name from a number or vice versa at the price of a small
+ * dynamic linear lookup.
+ * Duplicates are allowed, but are moved to the end of the list.
+ * The signal number corresponding to sig_name[i] is sig_number[i].
+ * if (i < NSIG) then sig_number[i] == i.
+ * The last element is 0, corresponding to the 0 at the end of
+ * the sig_name list.
+ */
+#define SIG_NAME "ZERO", "HUP", "INT", "QUIT", "ILL", "TRAP", "ABRT", "BUS", "FPE", "KILL", "USR1", "SEGV", "USR2", "PIPE", "ALRM", "TERM", "STKFLT", "CHLD", "CONT", "STOP", "TSTP", "TTIN", "TTOU", "URG", "XCPU", "XFSZ", "VTALRM", "PROF", "WINCH", "IO", "PWR", "UNUSED", "IOT", "CLD", "POLL", 0 /**/
+#define SIG_NUM 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 6, 17, 29, 0 /**/
+
+/* VOIDFLAGS:
+ * This symbol indicates how much support of the void type is given by this
+ * compiler. What various bits mean:
+ *
+ * 1 = supports declaration of void
+ * 2 = supports arrays of pointers to functions returning void
+ * 4 = supports comparisons between pointers to void functions and
+ * addresses of void functions
+ * 8 = suports declaration of generic void pointers
+ *
+ * The package designer should define VOIDUSED to indicate the requirements
+ * of the package. This can be done either by #defining VOIDUSED before
+ * including config.h, or by defining defvoidused in Myinit.U. If the
+ * latter approach is taken, only those flags will be tested. If the
+ * level of void support necessary is not present, defines void to int.
+ */
+#ifndef VOIDUSED
+#define VOIDUSED 15
+#endif
+#define VOIDFLAGS 15
+#if (VOIDFLAGS & VOIDUSED) != VOIDUSED
+#define void int /* is void to be avoided? */
+#define M_VOID /* Xenix strikes again */
+#endif
+
+/* ARCHLIB:
+ * This variable, if defined, holds the name of the directory in
+ * which the user wants to put architecture-dependent public
+ * library files for perl5. It is most often a local directory
+ * such as /usr/local/lib. Programs using this variable must be
+ * prepared to deal with filename expansion. If ARCHLIB is the
+ * same as PRIVLIB, it is not defined, since presumably the
+ * program already searches PRIVLIB.
+ */
+/* ARCHLIB_EXP:
+ * This symbol contains the ~name expanded version of ARCHLIB, to be used
+ * in programs that are not prepared to deal with ~ expansion at run-time.
+ */
+#define ARCHLIB "/opt/perl/lib/5.005/i686-linux-thread" /**/
+#define ARCHLIB_EXP "/opt/perl/lib/5.005/i686-linux-thread" /**/
+
+/* DLSYM_NEEDS_UNDERSCORE:
+ * This symbol, if defined, indicates that we need to prepend an
+ * underscore to the symbol name before calling dlsym(). This only
+ * makes sense if you *have* dlsym, which we will presume is the
+ * case if you're using dl_dlopen.xs.
+ */
+/*#define DLSYM_NEEDS_UNDERSCORE / **/
+
+/* USE_SFIO:
+ * This symbol, if defined, indicates that sfio should
+ * be used.
+ */
+/*#define USE_SFIO / **/
+
+/* USE_DYNAMIC_LOADING:
+ * This symbol, if defined, indicates that dynamic loading of
+ * some sort is available.
+ */
+#define USE_DYNAMIC_LOADING /**/
+
+/* DB_Prefix_t:
+ * This symbol contains the type of the prefix structure element
+ * in the <db.h> header file. In older versions of DB, it was
+ * int, while in newer ones it is u_int32_t.
+ */
+/* DB_Hash_t:
+ * This symbol contains the type of the prefix structure element
+ * in the <db.h> header file. In older versions of DB, it was
+ * int, while in newer ones it is size_t.
+ */
+#define DB_Hash_t u_int32_t /**/
+#define DB_Prefix_t size_t /**/
+
+/* PRIVLIB:
+ * This symbol contains the name of the private library for this package.
+ * The library is private in the sense that it needn't be in anyone's
+ * execution path, but it should be accessible by the world. The program
+ * should be prepared to do ~ expansion.
+ */
+/* PRIVLIB_EXP:
+ * This symbol contains the ~name expanded version of PRIVLIB, to be used
+ * in programs that are not prepared to deal with ~ expansion at run-time.
+ */
+#define PRIVLIB "/opt/perl/lib/5.005" /**/
+#define PRIVLIB_EXP "/opt/perl/lib/5.005" /**/
+
+/* SITEARCH:
+ * This symbol contains the name of the private library for this package.
+ * The library is private in the sense that it needn't be in anyone's
+ * execution path, but it should be accessible by the world. The program
+ * should be prepared to do ~ expansion.
+ * The standard distribution will put nothing in this directory.
+ * Individual sites may place their own extensions and modules in
+ * this directory.
+ */
+/* SITEARCH_EXP:
+ * This symbol contains the ~name expanded version of SITEARCH, to be used
+ * in programs that are not prepared to deal with ~ expansion at run-time.
+ */
+#define SITEARCH "/opt/perl/lib/site_perl/5.005/i686-linux-thread" /**/
+#define SITEARCH_EXP "/opt/perl/lib/site_perl/5.005/i686-linux-thread" /**/
+
+/* SITELIB:
+ * This symbol contains the name of the private library for this package.
+ * The library is private in the sense that it needn't be in anyone's
+ * execution path, but it should be accessible by the world. The program
+ * should be prepared to do ~ expansion.
+ * The standard distribution will put nothing in this directory.
+ * Individual sites may place their own extensions and modules in
+ * this directory.
+ */
+/* SITELIB_EXP:
+ * This symbol contains the ~name expanded version of SITELIB, to be used
+ * in programs that are not prepared to deal with ~ expansion at run-time.
+ */
+#define SITELIB "/opt/perl/lib/site_perl/5.005" /**/
+#define SITELIB_EXP "/opt/perl/lib/site_perl/5.005" /**/
+
+/* STARTPERL:
+ * This variable contains the string to put in front of a perl
+ * script to make sure (one hopes) that it runs with perl and not
+ * some shell.
+ */
+#define STARTPERL "#!/opt/perl/bin/perl" /**/
+
+/* USE_PERLIO:
+ * This symbol, if defined, indicates that the PerlIO abstraction should
+ * be used throughout. If not defined, stdio should be
+ * used in a fully backward compatible manner.
+ */
+/*#define USE_PERLIO / **/
+
+/* HAS_GETHOST_PROTOS:
+ * This symbol, if defined, indicates that <netdb.h> includes
+ * prototypes for gethostent(), gethostbyname(), and
+ * gethostbyaddr(). Otherwise, it is up to the program to guess
+ * them. See netdbtype.U for probing for various Netdb_xxx_t types.
+ */
+#define HAS_GETHOST_PROTOS /**/
+
+/* HAS_GETNET_PROTOS:
+ * This symbol, if defined, indicates that <netdb.h> includes
+ * prototypes for getnetent(), getnetbyname(), and
+ * getnetbyaddr(). Otherwise, it is up to the program to guess
+ * them. See netdbtype.U for probing for various Netdb_xxx_t types.
+ */
+#define HAS_GETNET_PROTOS /**/
+
+/* HAS_GETPROTO_PROTOS:
+ * This symbol, if defined, indicates that <netdb.h> includes
+ * prototypes for getprotoent(), getprotobyname(), and
+ * getprotobyaddr(). Otherwise, it is up to the program to guess
+ * them. See netdbtype.U for probing for various Netdb_xxx_t types.
+ */
+#define HAS_GETPROTO_PROTOS /**/
+
+/* HAS_GETSERV_PROTOS:
+ * This symbol, if defined, indicates that <netdb.h> includes
+ * prototypes for getservent(), getservbyname(), and
+ * getservbyaddr(). Otherwise, it is up to the program to guess
+ * them. See netdbtype.U for probing for various Netdb_xxx_t types.
+ */
+#define HAS_GETSERV_PROTOS /**/
+
+/* Netdb_host_t:
+ * This symbol holds the type used for the 1st argument
+ * to gethostbyaddr().
+ */
+/* Netdb_hlen_t:
+ * This symbol holds the type used for the 2nd argument
+ * to gethostbyaddr().
+ */
+/* Netdb_name_t:
+ * This symbol holds the type used for the argument to
+ * gethostbyname().
+ */
+/* Netdb_net_t:
+ * This symbol holds the type used for the 1st argument to
+ * getnetbyaddr().
+ */
+#define Netdb_host_t const char * /**/
+#define Netdb_hlen_t int /**/
+#define Netdb_name_t const char * /**/
+#define Netdb_net_t unsigned long /**/
+
+/* Select_fd_set_t:
+ * This symbol holds the type used for the 2nd, 3rd, and 4th
+ * arguments to select. Usually, this is 'fd_set *', if HAS_FD_SET
+ * is defined, and 'int *' otherwise. This is only useful if you
+ * have select(), of course.
+ */
+#define Select_fd_set_t fd_set * /**/
+
+/* ARCHNAME:
+ * This symbol holds a string representing the architecture name.
+ * It may be used to construct an architecture-dependant pathname
+ * where library files may be held under a private library, for
+ * instance.
+ */
+#define ARCHNAME "i686-linux-thread" /**/
+
+/* HAS_PTHREAD_YIELD:
+ * This symbol, if defined, indicates that the pthread_yield
+ * routine is available to yield the execution of the current
+ * thread.
+ */
+/* HAS_SCHED_YIELD:
+ * This symbol, if defined, indicates that the sched_yield
+ * routine is available to yield the execution of the current
+ * thread.
+ */
+/*#define HAS_PTHREAD_YIELD / **/
+#define HAS_SCHED_YIELD /**/
+
+/* PTHREADS_CREATED_JOINABLE:
+ * This symbol, if defined, indicates that pthreads are created
+ * in the joinable (aka undetached) state.
+ */
+#define PTHREADS_CREATED_JOINABLE /**/
+
+/* USE_THREADS:
+ * This symbol, if defined, indicates that Perl should
+ * be built to use threads.
+ */
+/* OLD_PTHREADS_API:
+ * This symbol, if defined, indicates that Perl should
+ * be built to use the old draft POSIX threads API.
+ */
+#define USE_THREADS /**/
+/*#define OLD_PTHREADS_API / **/
+
+/* Time_t:
+ * This symbol holds the type returned by time(). It can be long,
+ * or time_t on BSD sites (in which case <sys/types.h> should be
+ * included).
+ */
+#define Time_t time_t /* Time type */
+
+/* HAS_TIMES:
+ * This symbol, if defined, indicates that the times() routine exists.
+ * Note that this became obsolete on some systems (SUNOS), which now
+ * use getrusage(). It may be necessary to include <sys/times.h>.
+ */
+#define HAS_TIMES /**/
+
+/* Fpos_t:
+ * This symbol holds the type used to declare file positions in libc.
+ * It can be fpos_t, long, uint, etc... It may be necessary to include
+ * <sys/types.h> to get any typedef'ed information.
+ */
+#define Fpos_t fpos_t /* File position type */
+
+/* Gid_t:
+ * This symbol holds the return type of getgid() and the type of
+ * argument to setrgid() and related functions. Typically,
+ * it is the type of group ids in the kernel. It can be int, ushort,
+ * uid_t, etc... It may be necessary to include <sys/types.h> to get
+ * any typedef'ed information.
+ */
+#define Gid_t gid_t /* Type for getgid(), etc... */
+
+/* Off_t:
+ * This symbol holds the type used to declare offsets in the kernel.
+ * It can be int, long, off_t, etc... It may be necessary to include
+ * <sys/types.h> to get any typedef'ed information.
+ */
+#define Off_t off_t /* <offset> type */
+
+/* Mode_t:
+ * This symbol holds the type used to declare file modes
+ * for systems calls. It is usually mode_t, but may be
+ * int or unsigned short. It may be necessary to include <sys/types.h>
+ * to get any typedef'ed information.
+ */
+#define Mode_t mode_t /* file mode parameter for system calls */
+
+/* Pid_t:
+ * This symbol holds the type used to declare process ids in the kernel.
+ * It can be int, uint, pid_t, etc... It may be necessary to include
+ * <sys/types.h> to get any typedef'ed information.
+ */
+#define Pid_t pid_t /* PID type */
+
+/* Size_t:
+ * This symbol holds the type used to declare length parameters
+ * for string functions. It is usually size_t, but may be
+ * unsigned long, int, etc. It may be necessary to include
+ * <sys/types.h> to get any typedef'ed information.
+ */
+#define Size_t size_t /* length paramater for string functions */
+
+/* Uid_t:
+ * This symbol holds the type used to declare user ids in the kernel.
+ * It can be int, ushort, uid_t, etc... It may be necessary to include
+ * <sys/types.h> to get any typedef'ed information.
+ */
+#define Uid_t uid_t /* UID type */
+
+#endif
diff --git a/gnu/usr.bin/perl/Porting/findvars b/gnu/usr.bin/perl/Porting/findvars
new file mode 100644
index 00000000000..2e81244ac86
--- /dev/null
+++ b/gnu/usr.bin/perl/Porting/findvars
@@ -0,0 +1,373 @@
+#!/l/local/bin/perl -w
+
+$pat = '';
+# construct word list
+while (<DATA>) {
+ chomp;
+ next unless $_;
+ $pat .= "$_|";
+}
+chop $pat if $pat =~ /\|$/;
+
+# grep
+while (<>) {
+ if (/^(.*?)\b($pat)\b(.*)$/o) {
+ my $head = "$1#$2#";
+ $_ = $3;
+ while (/^(.*?)\b($pat)\b(.*)$/o) {
+ $head .= "$1#$2#";
+ $_ = $3;
+ }
+ print "$ARGV\:$.\:$head$_\n";
+ }
+}
+continue {
+ close ARGV if eof;
+}
+__END__
+Argv
+Cmd
+DBcv
+DBgv
+DBline
+DBsignal
+DBsingle
+DBsub
+DBtrace
+No
+Sv
+Xpv
+Yes
+amagic_generation
+ampergv
+an
+archpat_auto
+argvgv
+argvoutgv
+av_fetch_sv
+basetime
+beginav
+bodytarget
+bostr
+bufend
+bufptr
+cddir
+chopset
+collation_ix
+collation_name
+collation_standard
+collxfrm_base
+collxfrm_mult
+colors
+colorset
+compcv
+compiling
+comppad
+comppad_name
+comppad_name_fill
+comppad_name_floor
+cop_seqmax
+copline
+cryptseen
+cshlen
+cshname
+curcop
+curcopdb
+curinterp
+curpad
+curpm
+curstack
+curstackinfo
+curstash
+curstname
+curthr
+dbargs
+debdelim
+debname
+debstash
+debug
+defgv
+defoutgv
+defstash
+delaymagic
+diehook
+dirty
+dlevel
+dlmax
+do_undump
+doextract
+doswitches
+dowarn
+dumplvl
+e_script
+egid
+endav
+envgv
+errgv
+error_count
+euid
+eval_cond
+eval_mutex
+eval_owner
+eval_root
+eval_start
+evalseq
+exitlist
+exitlistlen
+expect
+extralen
+fdpid
+filemode
+firstgv
+forkprocess
+formfeed
+formtarget
+generation
+gensym
+gid
+globalstash
+he_root
+hexdigit
+hintgv
+hints
+hv_fetch_ent_mh
+hv_fetch_sv
+in_clean_all
+in_clean_objs
+in_eval
+in_my
+in_my_stash
+incgv
+initav
+inplace
+last_in_gv
+last_lop
+last_lop_op
+last_proto
+last_uni
+lastfd
+lastgotoprobe
+lastscream
+lastsize
+lastspbase
+laststatval
+laststype
+leftgv
+lex_brackets
+lex_brackstack
+lex_casemods
+lex_casestack
+lex_defer
+lex_dojoin
+lex_expect
+lex_fakebrack
+lex_formbrack
+lex_inpat
+lex_inwhat
+lex_op
+lex_repl
+lex_starts
+lex_state
+lex_stuff
+lineary
+linestart
+linestr
+localizing
+localpatches
+main_cv
+main_root
+main_start
+mainstack
+malloc_mutex
+markstack
+markstack_max
+markstack_ptr
+max_intro_pending
+maxo
+maxscream
+maxsysfd
+mess_sv
+min_intro_pending
+minus_F
+minus_a
+minus_c
+minus_l
+minus_n
+minus_p
+modcount
+modglobal
+multi_close
+multi_end
+multi_open
+multi_start
+multiline
+mystrk
+na
+nexttoke
+nexttype
+nextval
+nice_chunk
+nice_chunk_size
+ninterps
+nomemok
+nrs
+nthreads
+nthreads_cond
+numeric_local
+numeric_name
+numeric_standard
+ofmt
+ofs
+ofslen
+oldbufptr
+oldlastpm
+oldname
+oldoldbufptr
+op
+op_mask
+op_seqmax
+opsave
+origalen
+origargc
+origargv
+origenviron
+origfilename
+ors
+orslen
+osname
+pad_reset_pending
+padix
+padix_floor
+parsehook
+patchlevel
+patleave
+pending_ident
+perl_destruct_level
+perldb
+pidstatus
+preambleav
+preambled
+preprocess
+profiledata
+reg_eval_set
+reg_flags
+reg_start_tmp
+reg_start_tmpl
+regbol
+regcc
+regcode
+regcomp_parse
+regcomp_rx
+regcompp
+regdata
+regdummy
+regendp
+regeol
+regexecp
+regflags
+regindent
+reginput
+reginterp_cnt
+reglastparen
+regnarrate
+regnaughty
+regnpar
+regprecomp
+regprev
+regprogram
+regsawback
+regseen
+regsize
+regstartp
+regtill
+regxend
+replgv
+restartop
+retstack
+retstack_ix
+retstack_max
+rightgv
+rs
+rsfp
+rsfp_filters
+runops
+savestack
+savestack_ix
+savestack_max
+sawampersand
+sawstudy
+sawvec
+scopestack
+scopestack_ix
+scopestack_max
+screamfirst
+screamnext
+secondgv
+seen_evals
+seen_zerolen
+sh_path
+siggv
+sighandlerp
+sortcop
+sortcxix
+sortstash
+specialsv_list
+splitstr
+stack_base
+stack_max
+stack_sp
+start_env
+statbuf
+statcache
+statgv
+statname
+statusvalue
+statusvalue_vms
+stdingv
+strchop
+strtab
+sub_generation
+sublex_info
+subline
+subname
+sv_arenaroot
+sv_count
+sv_mutex
+sv_no
+sv_objcount
+sv_root
+sv_undef
+sv_yes
+svref_mutex
+sys_intern
+tainted
+tainting
+thisexpr
+thr_key
+threadnum
+threads_mutex
+threadsv_names
+thrsv
+timesbuf
+tmps_floor
+tmps_ix
+tmps_max
+tmps_stack
+tokenbuf
+top_env
+toptarget
+uid
+unsafe
+warnhook
+xiv_arenaroot
+xiv_root
+xnv_root
+xpv_root
+xrv_root
+piMem
+piENV
+piStdIO
+piLIO
+piDir
+piSock
+piProc
diff --git a/gnu/usr.bin/perl/Porting/fixCORE b/gnu/usr.bin/perl/Porting/fixCORE
new file mode 100644
index 00000000000..4c586d89698
--- /dev/null
+++ b/gnu/usr.bin/perl/Porting/fixCORE
@@ -0,0 +1,68 @@
+#!/usr/local/bin/perl -w
+use Data::Dumper;
+
+my $targ = shift;
+my $inc = join(' ',map("-I$_",@INC));
+
+my $work = 1;
+while ($work)
+ {
+ open(PIPE,"$^X -w $inc -M$targ -e '' 2>&1 |") || die "Cannot open pipe to child:$!";
+ my %fix;
+ while (<PIPE>)
+ {
+ if (/^Ambiguous call resolved as CORE::(\w+)\(\), qualify as such or use \& at (\S+) line (\d+)/
+ && -f $2 )
+ {
+ my ($var,$file,$line) = ($1,$2,$3);
+ $fix{$file} = [] unless exists $fix{$file};
+ push(@{$fix{$file}},[$line => $var]) unless ($var =~ /^PL_/ || $file =~ /\.h$/);
+ }
+ print;
+ }
+ close(PIPE);
+# warn "Make retured $?\n";
+# last unless $?;
+ my $changed = 0;
+ foreach my $file (keys %fix)
+ {
+ my @ar = sort( { $a->[0] <=> $b->[0] } @{delete $fix{$file}});
+ my @miss;
+ my $fixed = 0;
+ @ARGV = ($file);
+ $. = 0;
+ local $^I = '.sav';
+ while (<>)
+ {
+ while (@ar && $. == $ar[0][0])
+ {
+ my ($line,$var) = @{shift(@ar)};
+ if (s/(?<!CORE::)\b$var\b(?=\s*\()/CORE::$var/)
+ {
+ warn "$file:$line: FIX $var\n";
+ $fixed++;
+ $changed++;
+ }
+ else
+ {
+ push(@miss,[$line,$var,$_]);
+ }
+ }
+ print;
+ }
+ unless ($fixed)
+ {
+ rename("$file$^I",$file);
+ if (@miss)
+ {
+ while (@miss)
+ {
+ my ($line,$var,$txt) = @{shift(@miss)};
+ warn "$file:$line:$var | $txt";
+ }
+ }
+ }
+ }
+ last unless $changed;
+ }
+
diff --git a/gnu/usr.bin/perl/Porting/fixvars b/gnu/usr.bin/perl/Porting/fixvars
new file mode 100644
index 00000000000..a211e5816fa
--- /dev/null
+++ b/gnu/usr.bin/perl/Porting/fixvars
@@ -0,0 +1,69 @@
+#!/usr/local/bin/perl -w
+use Data::Dumper;
+
+my $targ = (@ARGV) ? join(' ',@ARGV) : 'miniperl' ;
+
+my $work = 1;
+while ($work)
+ {
+ open(PIPE,"make $targ 2>&1 |") || die "Cannot open pipe to make:$!";
+ my %fix;
+ while (<PIPE>)
+ {
+ if (/^(.*):(\d+):\s+\`(\w+)'\s+undeclared/ && -f $1 )
+ {
+ my ($file,$line,$var) = ($1,$2,$3);
+ $fix{$file} = [] unless exists $fix{$file};
+ push(@{$fix{$file}},[$line => $var]) unless ($var =~ /^PL_/ || $file =~ /\.h$/);
+ }
+ print;
+ }
+ close(PIPE);
+ warn "Make retured $?\n";
+ last unless $?;
+ my $changed = 0;
+ foreach my $file (keys %fix)
+ {
+ my @ar = sort( { $a->[0] <=> $b->[0] } @{delete $fix{$file}});
+ my @miss;
+ my $fixed = 0;
+ unless (-w $file)
+ {
+ system("d4","edit",$file);
+ }
+ @ARGV = ($file);
+ $. = 0;
+ local $^I = '.sav';
+ while (<>)
+ {
+ while (@ar && $. == $ar[0][0])
+ {
+ my ($line,$var) = @{shift(@ar)};
+ if (s/\b$var\b/PL_$var/)
+ {
+ warn "$file:$line: FIX $var\n";
+ $fixed++;
+ $changed++;
+ }
+ else
+ {
+ push(@miss,[$line,$var,$_]);
+ }
+ }
+ print;
+ }
+ unless ($fixed)
+ {
+ rename("$file$^I",$file);
+ if (@miss)
+ {
+ while (@miss)
+ {
+ my ($line,$var,$txt) = @{shift(@miss)};
+ warn "$file:$line:$var | $txt";
+ }
+ }
+ }
+ }
+ last unless $changed;
+ }
diff --git a/gnu/usr.bin/perl/Porting/genlog b/gnu/usr.bin/perl/Porting/genlog
new file mode 100644
index 00000000000..5c3e90577e1
--- /dev/null
+++ b/gnu/usr.bin/perl/Porting/genlog
@@ -0,0 +1,118 @@
+#!/l/local/bin/perl -w
+#
+# Generate a nice changelist by querying perforce.
+#
+# Each change is described with the change number, description,
+# which branch the change happened in, files modified,
+# and who was responsible for entering the change.
+#
+# Can be called with a list of change numbers or a range of the
+# form "12..42". Changelog will be printed from highest number
+# to lowest.
+#
+# Outputs the changelist to stdout.
+#
+# Gurusamy Sarathy <gsar@umich.edu>
+#
+
+use Text::Wrap;
+
+$0 =~ s|^.*/||;
+unless (@ARGV) {
+ die <<USAGE;
+ $0 [-p \$P4PORT] <change numbers or from..to>
+USAGE
+}
+
+my @changes;
+
+my %editkind;
+@editkind{ qw( add edit delete integrate branch )}
+ = qw( + ! - !> +> );
+
+my $p4port = $ENV{P4PORT} || 'localhost:1666';
+
+while (@ARGV) {
+ $_ = shift;
+ if (/^(\d+)\.\.(\d+)$/) {
+ push @changes, $1 .. $2;
+ }
+ elsif (/^\d+$/) {
+ push @changes, $_;
+ }
+ elsif (/^-p(.*)$/) {
+ $p4port = $1 || shift;
+ }
+ else {
+ warn "Arguments must be change numbers, ignoring `$_'\n";
+ }
+}
+
+@changes = sort { $b <=> $a } @changes;
+
+my @desc = `p4 -p $p4port describe -s @changes`;
+if ($?) {
+ die "$0: `p4 -p $p4port describe -s @changes` failed, status[$?]\n";
+}
+else {
+ chomp @desc;
+ while (@desc) {
+ my ($change,$who,$date,$time,@log,$branch,$file,$type,%files);
+ $_ = shift @desc;
+ if (/^Change (\d+) by (\w+)\@.+ on (\S+) (\S+)\s*$/) {
+ ($change, $who, $date, $time) = ($1,$2,$3,$4);
+ $_ = shift @desc; # get rid of empty line
+ while (@desc) {
+ $_ = shift @desc;
+ last if /^Affected/;
+ push @log, $_;
+ }
+ if (/^Affected/) {
+ $_ = shift @desc; # get rid of empty line
+ while ($_ = shift @desc) {
+ last unless /^\.\.\./;
+ if (m{^\.\.\. //depot/(.*?perl|[^/]*)/([^#]+)#\d+ (\w+)\s*$}) {
+ ($branch,$file,$type) = ($1,$2,$3);
+ $files{$branch} = {} unless exists $files{$branch};
+ $files{$branch}{$type} = [] unless exists $files{$branch}{$type};
+ push @{$files{$branch}{$type}}, $file;
+ }
+ else {
+ warn "Unknown line [$_], ignoring\n";
+ }
+ }
+ }
+ }
+ next unless $change;
+ print "_" x 76, "\n";
+ printf <<EOT, $change, $who, $date, $time;
+[%6s] By: %-25s on %9s %9s
+EOT
+ print " Log: ";
+ my $i = 0;
+ while (@log) {
+ $_ = shift @log;
+ s/^\s*//;
+ s/^\[.*\]\s*// unless $i ;
+ # don't print last empty line
+ if ($_ or @log) {
+ print " " if $i++;
+ print "$_\n";
+ }
+ }
+ for my $branch (sort keys %files) {
+ printf "%11s: $branch\n", 'Branch';
+ for my $kind (sort keys %{$files{$branch}}) {
+ warn("### $kind ###\n"), next unless exists $editkind{$kind};
+ my $files = $files{$branch}{$kind};
+ # don't show large branches and integrations
+ $files = ["($kind " . scalar(@$files) . ' files)']
+ if (@$files > 25
+ && ( $kind eq 'integrate' || $kind eq 'branch'));
+ print wrap(sprintf("%12s ", $editkind{$kind}),
+ sprintf("%12s ", $editkind{$kind}),
+ "@$files\n");
+ }
+ }
+ }
+}
diff --git a/gnu/usr.bin/perl/Porting/p4d2p b/gnu/usr.bin/perl/Porting/p4d2p
new file mode 100644
index 00000000000..67780a93933
--- /dev/null
+++ b/gnu/usr.bin/perl/Porting/p4d2p
@@ -0,0 +1,84 @@
+#!/l/local/bin/perl -wspi.bak
+
+#
+# reads a perforce style diff on stdin and outputs appropriate headers
+# so the diff can be applied with the patch program
+#
+# Gurusamy Sarathy <gsar@umich.edu>
+#
+
+BEGIN {
+ $0 =~ s|.*/||;
+ if ($h or $help) {
+ print STDERR <<USAGE;
+Usage: $0 [-v] [-h] files
+
+ -h print this help
+ -v output progress messages
+
+Does inplace edit of diff files output by the perforce commands
+"p4 describe", "p4 diff", and "p4 diff2". The result is suitable
+for feeding to the "patch" program.
+
+If no files are specified, reads from stdin and writes to stdout.
+
+WARNING: It only handles context or unified diffs.
+
+Example: p4 describe -du 123 | $0 > change-123.patch
+
+USAGE
+ exit(0);
+ }
+ unless (@ARGV) { @ARGV = '-'; undef $^I; }
+ use vars qw($thisfile $time $file $fnum $v $h $help);
+ $thisfile = "";
+ $time = localtime(time);
+}
+
+my ($cur, $match);
+$cur = m<^==== //depot/(.+?)\#\d+.* ====$> ... m<^(\@\@.+\@\@|\*+)$>;
+
+$match = $1;
+
+if ($ARGV ne $thisfile) {
+ warn "processing patchfile [$ARGV]\n" unless $ARGV eq '-';
+ $thisfile = $ARGV;
+}
+
+# while we are within range
+if ($cur) {
+ # set the file name after first line
+ if ($cur == 1) {
+ $file = $match;
+ $fnum++;
+ }
+ # emit the diff header when we hit last line
+ elsif ($cur =~ /E0$/) {
+ my $f = $file;
+
+ # special hack for perl so we can always use "patch -p1"
+ $f =~ s<^.*?(perl.*?/)><$1>;
+
+ # unified diff
+ if ($match =~ /^\@/) {
+ warn "emitting udiff header\n" if $v;
+ $_ = "Index: $f\n--- $f.~1~\t$time\n+++ $f\t$time\n$_";
+ }
+ # context diff
+ elsif ($match =~ /^\*/) {
+ warn "emitting cdiff header\n" if $v;
+ $_ = "Index: $f\n*** $f.~1~\t$time\n--- $f\t$time\n$_";
+ }
+ }
+ # see if we hit another patch (i.e. previous patch was empty)
+ elsif (m<^==== //depot/(.+?)\#\d+.* ====$>) {
+ $file = $match = $1;
+ }
+ # suppress all other lines in the header
+ else {
+ $_ = "";
+ }
+ warn "file [$file] line [$cur] file# [$fnum]\n" if $v;
+}
+
+$_ .= "End of Patch.\n" if eof;
diff --git a/gnu/usr.bin/perl/Porting/patching.pod b/gnu/usr.bin/perl/Porting/patching.pod
new file mode 100644
index 00000000000..caada0c9802
--- /dev/null
+++ b/gnu/usr.bin/perl/Porting/patching.pod
@@ -0,0 +1,325 @@
+=head1 Name
+
+patching.pod - Appropriate format for patches to the perl source tree
+
+=head2 Where to get this document
+
+The latest version of this document is available from
+ http://perrin.dimensional.com/perl/perlpatch.html
+
+=head2 How to contribute to this document
+
+You may mail corrections, additions, and suggestions to me
+at dgris@dimensional.com but the preferred method would be
+to follow the instructions set forth in this document and
+submit a patch 8-).
+
+=head1 Description
+
+=head2 Why this document exists
+
+As an open source project Perl relies on patches and contributions from
+its users to continue functioning properly and to root out the inevitable
+bugs. But, some users are unsure as to the I<right> way to prepare a patch
+and end up submitting seriously malformed patches. This makes it very
+difficult for the current maintainer to integrate said patches into their
+distribution. This document sets out usage guidelines for patches in an
+attempt to make everybody's life easier.
+
+=head2 Common problems
+
+The most common problems appear to be patches being mangled by certain
+mailers (I won't name names, but most of these seem to be originating on
+boxes running a certain popular commercial operating system). Other problems
+include patches not rooted in the appropriate place in the directory structure,
+and patches not produced using standard utilities (such as diff).
+
+=head1 Proper Patch Guidelines
+
+=head2 What to patch
+
+Generally speaking you should patch the latest development release
+of perl. The maintainers of the individual branches will see to it
+that patches are picked up and applied as appropriate.
+
+=head2 How to prepare your patch
+
+=over 4
+
+=item Creating your patch
+
+First, back up the original files. This can't be stressed enough,
+back everything up _first_.
+
+Also, please create patches against a clean distribution of the perl source.
+This insures that everyone else can apply your patch without clobbering their
+source tree.
+
+=item diff
+
+While individual tastes vary (and are not the point here) patches should
+be created using either C<-u> or C<-c> arguments to diff. These produce,
+respectively, unified diffs (where the changed line appears immediately next
+to the original) and context diffs (where several lines surrounding the changes
+are included). See the manpage for diff for more details.
+
+Also, the preferred method for patching is -
+
+C<diff [C<-c> | C<-u>] E<lt>old-fileE<gt> E<lt>new-fileE<gt>>
+
+Note the order of files.
+
+Also, if your patch is to the core (rather than to a module) it
+is better to create it as a context diff as some machines have
+broken patch utilities that choke on unified diffs.
+
+GNU diff has many desirable features not provided by most vendor-supplied
+diffs. Some examples using GNU diff:
+
+ # generate a patch for a newly added file
+ % diff -u /dev/null new/file
+
+ # generate a patch to remove a file (patch > v2.4 will remove it cleanly)
+ % diff -u old/goner /dev/null
+
+ # get additions, deletions along with everything else, recursively
+ % diff -ruN olddir newdir
+
+ # ignore whitespace
+ % diff -bu a/file b/file
+
+ # show function name in every hunk (safer, more informative)
+ % diff -u -F '^[_a-zA-Z0-9]+ *(' old/file new/file
+
+
+=item Directories
+
+Patches should be generated from the source root directory, not from the
+directory that the patched file resides in. This insures that the maintainer
+patches the proper file and avoids name collisions (especially common when trying
+to apply patches to files that appear in both $src_root/ext/* and $src_root/lib/*).
+It is better to diff the file in $src_root/ext than the file in $src_root/lib.
+
+=item Filenames
+
+The most usual convention when submitting patches for a single file is to make
+your changes to a copy of the file with the same name as the original. Rename
+the original file in such a way that it is obvious what is being patched ($file~ or
+$file.old seem to be popular).
+
+If you are submitting patches that affect multiple files then you should backup
+the entire directory tree (to $source_root.old/ for example). This will allow
+C<diff C<-c> E<lt>old-dirE<gt> E<lt>new-dirE<gt>> to create all the patches
+at once.
+
+=back
+
+=head2 What to include in your patch
+
+=over 4
+
+=item Description of problem
+
+The first thing you should include is a description of the problem that
+the patch corrects. If it is a code patch (rather than a documentation
+patch) you should also include a small test case that illustrates the
+bug.
+
+=item Direction for application
+
+You should include instructions on how to properly apply your patch.
+These should include the files affected, any shell scripts or commands
+that need to be run before or after application of the patch, and
+the command line necessary for application.
+
+=item If you have a code patch
+
+If you are submitting a code patch there are several other things that
+you need to do.
+
+=over 4
+
+=item Comments, Comments, Comments
+
+Be sure to adequately comment your code. While commenting every
+line is unnecessary, anything that takes advantage of side effects of
+operators, that creates changes that will be felt outside of the
+function being patched, or that others may find confusing should
+be documented. If you are going to err, it is better to err on the
+side of adding too many comments than too few.
+
+=item Style
+
+Please follow the indentation style and nesting style in use in the
+block of code that you are patching.
+
+=item Testsuite
+
+When submitting a patch you should make every effort to also include
+an addition to perl's regression tests to properly exercise your
+patch. Your testsuite additions should generally follow these
+guidelines (courtesy of Gurusamy Sarathy (gsar@engin.umich.edu))-
+
+ Know what you're testing. Read the docs, and the source.
+ Tend to fail, not succeed.
+ Interpret results strictly.
+ Use unrelated features (this will flush out bizarre interactions).
+ Use non-standard idioms (otherwise you are not testing TIMTOWTDI).
+ Avoid using hardcoded test numbers whenever possible (the
+ EXPECTED/GOT found in t/op/tie.t is much more maintainable,
+ and gives better failure reports).
+ Give meaningful error messages when a test fails.
+ Avoid using qx// and system() unless you are testing for them. If you
+ do use them, make sure that you cover _all_ perl platforms.
+ Unlink any temporary files you create.
+ Promote unforeseen warnings to errors with $SIG{__WARN__}.
+ Be sure to use the libraries and modules shipped with version
+ being tested, not those that were already installed.
+ Add comments to the code explaining what you are testing for.
+ Make updating the '1..42' string unnecessary. Or make sure that
+ you update it.
+ Test _all_ behaviors of a given operator, library, or function-
+ All optional arguments
+ Return values in various contexts (boolean, scalar, list, lvalue)
+ Use both global and lexical variables
+ Don't forget the exceptional, pathological cases.
+
+=back
+
+=item Test your patch
+
+Apply your patch to a clean distribution, compile, and run the
+regression test suite (you did remember to add one for your
+patch, didn't you).
+
+=back
+
+=head2 An example patch creation
+
+This should work for most patches-
+
+ cp MANIFEST MANIFEST.old
+ emacs MANIFEST
+ (make changes)
+ cd ..
+ diff -c perl5.008_42/MANIFEST.old perl5.008_42/MANIFEST > mypatch
+ (testing the patch:)
+ mv perl5.008_42/MANIFEST perl5.008_42/MANIFEST.new
+ cp perl5.008_42/MANIFEST.old perl5.008_42/MANIFEST
+ patch -p < mypatch
+ (should succeed)
+ diff perl5.008_42/MANIFEST perl5.008_42/MANIFEST.new
+ (should produce no output)
+
+=head2 Submitting your patch
+
+=over 4
+
+=item Mailers
+
+Please, please, please (get the point? 8-) don't use a mailer that
+word wraps your patch or that MIME encodes it. Both of these leave
+the patch essentially worthless to the maintainer.
+
+If you have no choice in mailers and no way to get your hands on a
+better one there is, of course, a perl solution. Just do this-
+
+ perl -ne 'print pack("u*",$_)' patch > patch.uue
+
+and post patch.uue with a note saying to unpack it using
+
+ perl -ne 'print unpack("u*",$_)' patch.uue > patch
+
+=item Subject lines for patches
+
+The subject line on your patch should read
+
+[PATCH]5.xxx_xx (Area) Description
+
+where the x's are replaced by the appropriate version number,
+area is a short keyword identifying what area of perl you are
+patching, and description is a very brief summary of the
+problem (don't forget this is an email header).
+
+Examples-
+
+[PATCH]5.004_04 (DOC) fix minor typos
+
+[PATCH]5.004_99 (CORE) New warning for foo() when frobbing
+
+[PATCH]5.005_42 (CONFIG) Added support for fribnatz 1.5
+
+=item Where to send your patch
+
+If your patch is for the perl core it should be sent perlbug@perl.org.
+If it is a patch to a module that you downloaded from CPAN you should
+submit your patch to that module's author.
+
+=back
+
+=head2 Applying a patch
+
+=over 4
+
+=item General notes on applying patches
+
+The following are some general notes on applying a patch
+to your perl distribution.
+
+=over 4
+
+=item patch C<-p>
+
+It is generally easier to apply patches with the C<-p> argument to
+patch. This helps reconcile differing paths between the machine the
+patch was created on and the machine on which it is being applied.
+
+=item Cut and paste
+
+_Never_ cut and paste a patch into your editor. This usually clobbers
+the tabs and confuses patch.
+
+=item Hand editing patches
+
+Avoid hand editing patches as this frequently screws up the whitespace
+in the patch and confuses the patch program.
+
+=back
+
+=back
+
+=head2 Final notes
+
+If you follow these guidelines it will make everybody's life a little
+easier. You'll have the satisfaction of having contributed to perl,
+others will have an easy time using your work, and it should be easier
+for the maintainers to coordinate the occasionally large numbers of
+patches received.
+
+Also, just because you're not a brilliant coder doesn't mean that you
+can't contribute. As valuable as code patches are there is always a
+need for better documentation (especially considering the general
+level of joy that most programmers feel when forced to sit down and
+write docs). If all you do is patch the documentation you have still
+contributed more than the person who sent in an amazing new feature
+that no one can use because no one understands the code (what I'm
+getting at is that documentation is both the hardest part to do
+(because everyone hates doing it) and the most valuable).
+
+Mostly, when contributing patches, imagine that it is B<you> receiving
+hundreds of patches and that it is B<your> responsibility to integrate
+them into the source. Obviously you'd want the patches to be as easy
+to apply as possible. Keep that in mind. 8-)
+
+=head1 Last Modified
+
+Last modified 21 January 1999
+Daniel Grisinger <dgris@dimensional.com>
+
+=head1 Author and Copyright Information
+
+Copyright (c) 1998 Daniel Grisinger
+
+Adapted from a posting to perl5-porters by Tim Bunce (Tim.Bunce@ig.co.uk).
+
+I'd like to thank the perl5-porters for their suggestions.
diff --git a/gnu/usr.bin/perl/README.apollo b/gnu/usr.bin/perl/README.apollo
new file mode 100644
index 00000000000..6de115c073e
--- /dev/null
+++ b/gnu/usr.bin/perl/README.apollo
@@ -0,0 +1,11 @@
+The following tests are known to fail as of Perl 5.005_03:
+
+comp/decl..........FAILED at test 0
+op/write...........FAILED at test 0
+lib/filefind.......FAILED at test 2
+lib/io_udp.........FAILED at test 2
+lib/findbin........stat(/ressel/ABT/USER/vta/jk/proj.local/perl/perl5.005_03-MAINT_TRIAL_5/t/lib/): No such file or directory at ../lib/FindBin.pm line 162
+stat(/ressel/ABT/USER/vta/jk/proj.local/perl/perl5.005_03-MAINT_TRIAL_5/t/lib/): No such file or directory at ../lib/FindBin.pm line 163
+FAILED at test 1
+
+Johann Klasek <jk@auto.tuwien.ac.at>
diff --git a/gnu/usr.bin/perl/README.beos b/gnu/usr.bin/perl/README.beos
new file mode 100644
index 00000000000..ccd9cbc6c68
--- /dev/null
+++ b/gnu/usr.bin/perl/README.beos
@@ -0,0 +1,43 @@
+Notes on building perl under BeOS:
+
+GENERAL ISSUES
+--------------
+how to compile perl:
+
+To compile perl under BeOS R4 x86:
+
+`./Configure -d` and hit ^C when it asks you if you want to make changes
+to config.sh;
+
+edit config.sh and do the following:
+change d_socket='define' to ='undef';
+remove SDBM, Errno, and Socket from dynamic_ext= and nonxs_ext=;
+
+add '#define bool short' to x2p/a2p.h;
+
+../Configure -S; make; make install
+
+cd ~/config/lib; ln -s 5.00502/BeOS-BePC/CORE/libperl.so .
+(substitute 5.00502 with the appropriate filename)
+
+OS RELEASE-SPECIFIC NOTES
+-------------------------
+R4 x86 - dynamic loading finally works! Yay! This means you can compile
+your own modules into perl. However, Sockets and Errno still don't work.
+(Hopefully, sockets will at least work by R5, if not sooner.)
+
+R4 PPC - I have not tested this. I rather severely doubt that dynamic
+loading will work. (My BeBox is in pieces right now, following a nasty
+disk crash.) You may have to disable dynamic loading to get the thing
+to compile at all. (use `./Configure` without -d, and say 'no' to
+'Build a shared libperl.so'.)
+
+CONTACT INFORMATION
+-------------------
+If you have comments, problem reports, or even patches or bugfixes (gasp!)
+please email me.
+
+28 Jan 1999
+Tom Spindler
+dogcow@isi.net
+
diff --git a/gnu/usr.bin/perl/README.dos b/gnu/usr.bin/perl/README.dos
new file mode 100644
index 00000000000..0e0a17335b6
--- /dev/null
+++ b/gnu/usr.bin/perl/README.dos
@@ -0,0 +1,276 @@
+If you read this file _as_is_, just ignore the funny characters you
+see. It is written in the POD format (see perlpod manpage) which is
+specially designed to be readable as is.
+
+=head1 NAME
+
+perldos - Perl under DOS, W31, W95.
+
+=head1 SYNOPSIS
+
+These are instructions for building Perl under DOS (or w??), using
+DJGPP v2.01 or later. Under w95 long filenames are supported.
+
+=head1 DESCRIPTION
+
+Before you start, you should glance through the README file
+found in the top-level directory where the Perl distribution
+was extracted. Make sure you read and understand the terms under
+which this software is being distributed.
+
+This port currently supports MakeMaker (the set of modules that
+is used to build extensions to perl). Therefore, you should be
+able to build and install most extensions found in the CPAN sites.
+
+=head2 Prerequisites
+
+=over 4
+
+=item DJGPP
+
+DJGPP is a port of GNU C/C++ compiler and development tools to 32-bit,
+protected-mode environment on Intel 32-bit CPUs running MS-DOS and compatible
+operating systems, by DJ Delorie <dj@delorie.com> and friends.
+
+For more details (FAQ), check out the home of DJGPP at:
+
+ http://www.delorie.com/djgpp/
+
+If you have questions about DJGPP, try posting to the DJGPP newsgroup:
+comp.os.msdos.djgpp, or use the email gateway djgpp@delorie.com.
+
+You can find the full DJGPP distribution on any SimTel.Net mirror all over
+the world. Like:
+
+ ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2*
+
+You need the following files to build perl (or add new modules):
+
+ v2/djdev201.zip
+ v2/bnu27b.zip
+ v2gnu/gcc2721b.zip
+ v2gnu/bsh1147b.zip
+ v2gnu/mak3761b.zip
+ v2gnu/fil316b.zip
+ v2gnu/sed118b.zip
+ v2gnu/txt122b.zip
+ v2gnu/dif271b.zip
+ v2gnu/grep21b.zip
+ v2gnu/shl112b.zip
+ v2gnu/gawk303b.zip
+ v2misc/csdpmi4b.zip
+
+or any newer version.
+
+=item Pthreads
+
+If you want multithreading support in perl, you need a pthread library
+that supports DJGPP. One of them can be found at:
+
+ ftp://ftp.cs.fsu.edu/pub/PART/PTHREADS/pthreads.zip
+
+But thread support is still in alpha, it may be unstable. For more information
+see below.
+
+=back
+
+=head2 Shortcomings of Perl under DOS
+
+Perl under DOS lacks some features of perl under UNIX because of
+deficiencies in the UNIX-emulation, most notably:
+
+=over 4
+
+=item *
+
+fork() and pipe()
+
+=item *
+
+some features of the UNIX filesystem regarding link count and file dates
+
+=item *
+
+in-place operation is a little bit broken with short filenames
+
+=item *
+
+sockets
+
+=back
+
+=head2 Building
+
+=over 4
+
+=item *
+
+Unpack the source package F<perl5.00?_??.tar.gz> with djtarx. If you want
+to use long file names under w95, don't forget to use
+
+ set LFN=y
+
+before unpacking the archive.
+
+=item *
+
+Create a "symlink" or copy your bash.exe to sh.exe in your C<($DJDIR)/bin>
+directory.
+
+ ln -s bash.exe sh.exe
+
+And make the C<SHELL> environment variable point to this F<sh.exe>:
+
+ set SHELL=c:/djgpp/bin/sh.exe (use full path name!)
+
+You can do this in F<djgpp.env> too. Add this line BEFORE any section
+definition:
+
+ +SHELL=%DJDIR%/bin/sh.exe
+
+=item *
+
+If you have F<split.exe> and F<gsplit.exe> in your path, then rename
+F<split.exe> to F<djsplit.exe>, and F<gsplit.exe> to F<split.exe>.
+Copy or link F<gecho.exe> to F<echo.exe> if you don't have F<echo.exe>.
+Copy or link F<gawk.exe> to F<awk.exe> if you don't have F<awk.exe>.
+
+=item *
+
+Chdir to the djgpp subdirectory of perl toplevel and type the following
+command:
+
+ configure.bat
+
+This will do some preprocessing then run the Configure script for you.
+The Configure script is interactive, but in most cases you
+just need to press ENTER.
+
+If the script says that your package is incomplete, and asks whether
+to continue, just answer with Y (this can only happen if you don't use
+long filenames).
+
+When Configure asks about the extensions, I suggest IO and Fcntl,
+and if you want database handling then SDBM_File or GDBM_File
+(you need to install gdbm for this one). If you want to use the
+POSIX extension (this is the default), make sure that the stack
+size of your F<cc1.exe> is at least 512kbyte (you can check this
+with: C<stubedit cc1.exe>).
+
+You can use the Configure script in non-interactive mode too.
+When I built my F<perl.exe>, I used something like this:
+
+ configure.bat -Uuseposix -des
+
+You can find more info about Configure's command line switches in
+the F<INSTALL> file.
+
+When the script ends, and you want to change some values in the
+generated F<config.sh> file, then run
+
+ sh Configure -S
+
+after you made your modifications.
+
+IMPORTANT: if you use this C<-S> switch, be sure to delete the CONFIG
+environment variable before running the script:
+
+ set CONFIG=
+
+=item *
+
+Now you can compile Perl. Type:
+
+ make
+
+=back
+
+=head2 Testing
+
+Type:
+
+ make test
+
+You should see "All tests successful" if you configured a database
+manager, and 1 failed test script if not (F<lib/anydbm.t>). If you
+configured POSIX you will see 1 additional failed subtest in F<lib/posix.t>.
+
+=head2 Installation
+
+Type:
+
+ make install
+
+This will copy the newly compiled perl and libraries into your DJGPP
+directory structure. Perl.exe and the utilities go into C<($DJDIR)/bin>,
+and the library goes under C<($DJDIR)/lib/perl5>. The pod documentation
+goes under C<($DJDIR)/lib/perl5/pod>.
+
+=head2 Threaded perl under dos-djgpp
+
+Multithreading support is considered alpha, because some of the
+tests in C<ext/Thread> still die with SIGSEGV (patches are welcome). But
+if you want to give it a try, here are the necessary steps:
+
+=over 4
+
+=item
+
+1. You will need a pthread library which supports djgpp. Go, and download
+FSU's version from:
+
+ ftp://ftp.cs.fsu.edu/pub/PART/PTHREADS/pthreads.zip
+
+The latest version is 3.5, released in Feb 98.
+
+=item
+
+2. Unzip the file, cd to C<threads\src> and run F<configur.bat>.
+
+=item
+
+3. Add C<RAND_SWITCH> or C<MUTEX_SWITCH> or C<RR_SWITCH> to C<CFLAGS>
+in the F<makefile>. Note that using these values, multithreading will
+NOT be preemptive. This is necessary, since djgpp's libc is not thread safe.
+
+=item
+
+4. Apply the following patch:
+
+ *** include/pthread/signal.h~ Wed Feb 4 10:51:24 1998
+ --- include/pthread/signal.h Tue Feb 10 22:40:32 1998
+ ***************
+ *** 364,368 ****
+ --- 364,370 ----
+
+ #ifndef SA_ONSTACK
+ + #ifdef SV_ONSTACK
+ #define SA_ONSTACK SV_ONSTACK
+ + #endif
+ #endif /* !SA_ONSTACK */
+
+=item
+
+5. run make (before you do this, you must make sure your C<SHELL> environment
+variable does NOT point to bash).
+
+=item
+
+6. Install the library and header files into your djgpp directory structure.
+
+=item
+
+7. Add C<-Dusethreads> to the commmand line of perl's F<configure.bat>.
+
+=back
+
+=head1 AUTHOR
+
+Laszlo Molnar, F<molnarl@cdata.tvnet.hu>
+
+=head1 SEE ALSO
+
+perl(1).
+
+=cut
+
diff --git a/gnu/usr.bin/perl/README.hpux b/gnu/usr.bin/perl/README.hpux
new file mode 100644
index 00000000000..4cdcf58d9b0
--- /dev/null
+++ b/gnu/usr.bin/perl/README.hpux
@@ -0,0 +1,226 @@
+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.hpux - Perl version 5 on Hewlett-Packard Unix (HP-UX) systems
+
+=head1 DESCRIPTION
+
+This document describes various features of HP's Unix operating system (HP-UX)
+that will affect how Perl version 5 (hereafter just Perl) is compiled and/or
+runs.
+
+=head2 Compiling Perl 5 on HP-UX
+
+When compiling Perl, the use of an ANSI C compiler is highly recommended.
+The C compiler that ships with all HP-UX systems is a K&R compiler that
+should only be used to build new kernels.
+
+Perl can be compiled with either HP's ANSI C compiler or with gcc. The
+former is recommended, as not only can it compile Perl with no difficulty,
+but also can take advantage of features listed later that require the use
+of HP compiler-specific command-line flags.
+
+If you decide to use gcc, make sure your installation is recent and complete,
+and be sure to read the Perl README file for more gcc-specific details.
+
+=head2 PA-RISC
+
+HP's current Unix systems run on its own Precision Architecture (PA-RISC) chip.
+HP-UX used to run on the Motorola MC68000 family of chips, but any machine with
+this chip in it is quite obsolete and this document will not attempt to address
+issues for compiling Perl on the Motorola chipset.
+
+The most recent version of PA-RISC at the time of this document's last update
+is 2.0.
+
+=head2 PA-RISC 1.0
+
+The original version of PA-RISC, HP no longer sells any system with this chip.
+
+The following systems contain PA-RISC 1.0 chips:
+
+ 600, 635, 645, 800, 808, 815, 822, 825, 832, 834, 835, 840,
+ 842, 845, 850, 852, 855, 860, 865, 870, 890
+
+=head2 PA-RISC 1.1
+
+An upgrade to the PA-RISC design, it shipped for many years in many different
+system.
+
+The following systems contain with PA-RISC 1.1 chips:
+
+ 705, 710, 712, 715, 720, 722, 725, 728, 730, 735, 743, 745, 747, 750,
+ 755, 770, 807S, 817S, 827S, 837S, 847S, 857S, 867S, 877S, 887S, 897S,
+ D200, D210, D220, D230, D250, D260, D310, D320, D330, D350, D360, D400,
+ E25, E35, E45, E55, F10, F20, F30, G30, G40, G50, G60, G70, H30, H40,
+ H50, H60, H70, I30, I40, I50, I60, I70, K100, K200, K210, K220, K400,
+ K410, K420, T500, T520
+
+
+=head2 PA-RISC 2.0
+
+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 (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 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 or 2.0 platforms.
+
+=head2 Building Dynamic Extensions on HP-UX
+
+HP-UX supports dynamically loadable libraries (shared libraries).
+Shared libraries end with the suffix .sl.
+
+Shared libraries created on a platform using a particular PA-RISC version
+are not usable on platforms using an earlier PA-RISC version by default.
+However, this backwards compatibility may be enabled using the same
++DAportable compiler flag (with the same PA-RISC 1.0 caveat mentioned above).
+
+To create a shared library, the following steps must be performed:
+
+ 1. Compile source modules with +z or +Z flag to create a .o module
+ which contains Position-Independent Code (PIC). The linker will
+ tell you in the next step if +Z was needed.
+
+ 2. Link the shared library using the -b flag. If the code calls
+ any functions in other system libraries (e.g., libm), it must
+ be included on this line.
+
+(Note that these steps are usually handled automatically by the extension's
+Makefile).
+
+If these dependent libraries are not listed at shared library creation
+time, you will get fatal "Unresolved symbol" errors at run time when the
+library is loaded.
+
+You may create a shared library that referers to another library, which
+may be either an archive library or a shared library. If it is a
+shared library, this is called a "dependent library".
+The dependent library's name is recorded in the main shared library,
+but it is not linked into the shared library.
+Instead, it is loaded when the main shared library is loaded.
+
+If the referred library is an archive library, then it is treated as a
+simple collection of .o modules (all of which must contain PIC). These
+modules are then linked into the shared library.
+
+Note that it is okay to create a library which contains a dependent library
+that is already linked into perl.
+
+It is no longer possible to link PA-RISC 1.0 shared libraries.
+
+=head2 The HP ANSI C Compiler
+
+When using this compiler to build Perl, you should make sure that
+the flag -Aa is added to the cpprun and cppstdin variables in the
+config.sh file.
+
+=head2 Using Large Files with Perl
+
+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.
+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.
+
+There are only two drawbacks to this approach:
+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
+(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 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
+
+It is impossible to compile a version of threaded Perl on any version of
+HP-UX before 10.30, and it is strongly suggested that you be running on
+HP-UX 11.00 at least.
+
+To compile Perl with thread, add -Dusethreads to the arguments of Configure.
+Ensure that the -D_POSIX_C_SOURCE=199506L compiler flag is automatically
+added to the list of flags. Also make sure that -lpthread is listed before
+-lc in the list of libraries to link Perl with.
+
+As of the date of this document, Perl threads are not fully supported on HP-UX.
+
+=head2 64-bit Perl
+
+Beginning with HP-UX 11.00, programs compiled under HP-UX can take advantage
+of the LP64 programming environment (LP64 means Longs and Pointers are 64 bits
+wide).
+
+Work is being performed on Perl to make it 64-bit compliant on all versions
+of Unix. Once this is complete, scalar variables will be able to hold
+numbers larger than 2^32 with complete precision.
+
+As of the date of this document, Perl is not 64-bit compliant on HP-UX.
+
+Should a user wish to experiment with compiling Perl in the LP64 environment,
+the following steps must be taken: libraries must be searched only within
+/lib/pa20_64, the compiler flag +DD64 must be used, and the C library is
+now located at /lib/pa20_64/libc.sl.
+
+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>
+
+With much assistance regarding shared libraries from Marc Sabatella.
+
+=head1 DATE
+
+Version 0.2: 1999/03/01
+
+=cut
diff --git a/gnu/usr.bin/perl/README.hurd b/gnu/usr.bin/perl/README.hurd
new file mode 100644
index 00000000000..40e1ba996d8
--- /dev/null
+++ b/gnu/usr.bin/perl/README.hurd
@@ -0,0 +1,40 @@
+Notes on Perl on the Hurd
+Last Updated: Sat, 6 Mar 1999 16:07:59 +0100
+Written by: Mark Kettenis <kettenis@gnu.org>
+
+If you want to use Perl on the Hurd, I recommend using the Debian
+GNU/Hurd distribution (see http://www.debian.org), even if an
+official, stable release has not yet been made. The old `gnu-0.2'
+binary distribution will most certainly have additional problems.
+
+* Known Problems
+
+The Perl testsuite may still report some errors on the Hurd. The
+`lib/anydbm.t' and `op/stat.t' tests will most certainly fail. The
+first fails because Berkeley DB 2 does not allow empty keys and the
+test tries to use them anyway. This is not really a Hurd bug. The
+same test fails on Linux with version 2.1 of the GNU C Library. The
+second failure is caused by a bug in the Hurd's filesystem servers,
+that we have not been able to fix yet. I don't think it is crucial.
+
+The socket tests may fail if the network is not configured. You have
+to make `/hurd/pfinet' the translator for `/servers/socket/2', giving
+it the right arguments. Try `/hurd/pfinet --help' for more
+information.
+
+Here are the statistics for Perl 5.005_03 on my system:
+
+Failed Test Status Wstat Total Fail Failed List of failed
+-------------------------------------------------------------------------------
+lib/anydbm.t 12 1 8.33% 12
+op/stat.t 58 1 1.72% 4
+5 tests skipped, plus 14 subtests skipped.
+Failed 2/189 test scripts, 98.94% okay. 2/6669 subtests failed, 99.97% okay.
+
+There are quite a few systems out there that do worse!
+
+However, since I am running a very recent Hurd snapshot, in which a lot of
+bugs that were exposed by the Perl testsuite have been fixed, you may
+encounter more failures. Likely candidates are: `lib/io_pipe.t',
+`lib/io_sock.t', `lib/io_udp.t' and `lib/time.t'.
+
diff --git a/gnu/usr.bin/perl/README.mint b/gnu/usr.bin/perl/README.mint
new file mode 100644
index 00000000000..9cd480881d2
--- /dev/null
+++ b/gnu/usr.bin/perl/README.mint
@@ -0,0 +1,222 @@
+##########################################################################
+# *** README.mint
+##########################################################################
+
+If you want to build perl yourself on MiNT (or maybe on an Atari without
+MiNT) you may want to accept some advice from somebody who already did it...
+
+There was a perl port for Atari ST done by ++jrb bammi@cadence.com.
+This port tried very hard to build on non-MiNT-systems. For the
+sake of efficiency I've left this way. Yet, I haven't removed bammi's
+patches but left them intact. Unfortunately some of the files that
+bammi contributed to the perl distribution seem to have vanished?
+
+So, how can you distinguish my patches from bammi's patches? All of
+bammi's stuff is embedded in "#ifdef atarist" preprocessor macros.
+My MiNT port uses "#ifdef __MINT__" instead (and unconditionally
+undefines "atarist". If you want to continue on bammi's port, all
+you have to do is to swap the "-D" and "-U" switches for "__MINT__"
+and "atarist" in the variable ccflags.
+
+However, I think that my version will still run on non-MiNT-systems
+provided that the user has a Eunuchs-like environment (i.e. the
+standard envariables like $PATH, $HOME, ... are set, there is a
+POSIX compliant shell in /bin/sh, and...)
+
+Known problems
+==============
+
+The problems you may encounter when building perl on your machine
+are most probably due to deficiencies in MiNT resp. the Atari
+platform in general.
+
+First of all, if you have less than 8 MB of RAM you shouldn't
+even try to build Perl yourself. Better grab a binary pre-compiled
+version somewhere. Even if you have more memory you should take
+some care. Try to run in a fresh environment (without memory
+fragmented too much) with as few daemons, accessories, xcontrol
+modules etc. as possible. If you run some AES you should
+consider to start a console based environment instead.
+
+A problem has been reported with sed. Sed is used to create
+some configuration files based on the answers you have given
+to the Configure script. Unfortunately the Perl Configure script
+shows sed on MiNT its limits. I have sed 2.05 with a stacksize
+of 64k and I have encountered no problems. If sed crashes
+during your configuration process you should first try to
+augment sed's stacksize:
+
+ fixstk 64k /usr/bin/sed
+
+(or similar). If it still doesn't help you may have a look
+which other versions of sed are installed on your system.
+If you have a KGMD 1.0 installation you will find three
+in /usr/bin. Have a look there.
+
+Perl has some "mammut" C files. If gcc reports "internal
+compiler error: program cc1 got fatal signal 10" this is very
+likely due to a stack overflow in program cc1. Find cc1
+and fix its stack. I have made good experiences with
+
+ fixstk 2 cc1
+
+This doesn't establish a stack of 2 Bytes only as you might
+think. It really reserves one half of the available memory
+for cc1's stack. A setting of 1 would reserve the entire
+memory for cc1, 3 would reserve three thirds. You will have
+to find out the value that suits to your system yourself.
+
+BTW, cc1 is maybe a little hard to find. It is generally installed
+as
+ /usr/local/lib/gcc-lib/<platform>/<gcc-version>/cc1
+
+where <platform> is probably something like "m68k-atari-mint"
+and <version> is the gcc version you use (find out with
+"gcc --version"). Maybe "gcc-lib" is not installed in
+"/usr/local/lib" but "/usr/lib" on your system.
+
+Now run make (maybe "make -k"). If you get a fatal signal 10
+increase cc1's stacksize, if you run out of memory you should
+either decrease the stacksize or follow some more hints:
+
+Perl's building process is very handy on machines with a lot
+of virtual memory but may result in a desaster if you are short
+of memory. If gcc fails to compile many source files you should
+reduce the optimization. Grep for "optimize" in the file
+config.sh and change the flags.
+
+If only several huge files cause problems (actually it is not a
+matter of the file size resp. the amount of code but depends on
+the size of the individual funtions) it is useful to bypass
+the make program and compile these files directly from the
+command line. For example if you got something like the
+following from make:
+
+ CCCMD = gcc -DPERL_CORE ....
+ ...
+ ...: virtual memory exhausted
+
+you should hack into the shell:
+
+ gcc -DPERL_CORE ... toke.c
+
+Please note that you have to add the name of the source file
+(here toke.c) at the end.
+
+If none of this helps, you're helpless. Wait for a binary
+release. If you have succeded you may encounter another problem
+at the linking process. If gcc complains that it can't find
+some libraries within the perl distribution you probably have
+an old linker. If it complains for example about "file not
+found for xxx.olb" you should cd into the directory in
+question and
+
+ ln -s libxxx.a xxx.olb
+
+This will fix the problem.
+
+This version (5.00402) of perl has passed most of the tests on my system:
+
+Failed Test Status Wstat Total Fail Failed List of failed
+------------------------------------------------------------------------------
+io/pipe.t 10 2 20.00% 7, 9
+io/tell.t 13 1 7.69% 12
+lib/complex.t 762 13 1.71% 84-85, 248-251, 257, 272-273,
+ 371, 380, 419-420
+lib/io_pipe.t 10 1 10.00% 9
+lib/io_tell.t 13 1 7.69% 12
+op/magic.t 30 2 6.67% 29-30
+Failed 6/152 test scripts, 96.05% okay. 20/4359 subtests failed, 99.54% okay.
+
+Pipes always cause problems with MiNT, it's actually a surprise that
+most of the tests did work. I've got no idea why the "tell" test failed,
+this shouldn't mean too big a problem however.
+
+Most of the failures of lib/complex seem to be harmless, actually errors
+far right to the decimal point... Two failures seem to be serious:
+The sign of the results is reversed. I would say that this is due
+to minor bugs in the portable math lib that I compiled perl with.
+
+I haven't bothered very much to find the reason for the failures
+with op/magic.t and op/stat.t. Maybe you'll find it out.
+
+##########################################################################
+
+Another possible problem may arise from the implementation of the "pwd"
+command. It happened to add a carriage return and newline to its output
+no matter what the setting of $UNIXMODE is. This is quite annoying since many
+library modules for perl take the output of pwd, chop off the
+trailing newline character and then expect to see a valid path in
+that. But the carriage return (last but second character!) isn't
+chopped off. You can either try to patch all library modules (at
+the price of performance for the extra transformation) or you can
+use my version of pwd that doesn't suffer from this deficiency.
+
+The fixed implementation is in the mint subdirectory. Running
+"Configure" will attempt to build and install it if necessary
+(hints/mint.sh will do this work) but you can build and install it
+explicitly by:
+
+ cd mint
+ make install
+
+This is the fastest solution.
+
+Just in case you want to go the hard way: perl won't even build with a
+broken pwd! You will have to fix the library modules
+(ext/POSIX/POSIX.pm, lib/Cwd.pm, lib/pwd.pl) at last after building
+miniperl.
+
+A major nuisance of current MiNTLib versions is the implementation
+of system() which is far from being POSIX compliant. A real system()
+should fork and then exec /bin/sh with its argument as a command
+line to the shell. The MiNTLib system() however doesn't expect
+that every user has a POSIX shell in /bin/sh. It tries to work
+around the problem by forking and exec'ing the first token in its argument
+string. To get a little bit of compliance to POSIX system() it
+tries to handle at least redirection ("<" or ">") on its own
+behalf.
+
+This isn't a good idea since many programs expect that they can
+pass a command line to system() that exploits all features of a
+POSIX shell. If you use the MiNTLib version of system() with
+perl the Perl function system() will suffer from the same deficiencies.
+
+You will find a fixed version of system() in the mint subdirectory.
+You can easily insert this version into your system libc:
+
+ cd mint
+ make system.o
+ ar r /usr/lib/libc.a
+ ranlib /usr/lib/libc.a
+
+If you are suspicious you should either back up your libc before
+or extract the original system.o from your libc with
+"ar x /usr/lib/libc.a system.o". You can then backup the system.o
+module somewhere before you succeed.
+
+Anything missing? Yep, I've almost forgotten...
+No file in this distribution without a fine saying. Take this one:
+
+ "From a thief you should learn: (1) to work at night;
+ (2) if one cannot gain what one wants in one night to
+ try again the next night; (3) to love one's coworkers
+ just as thieves love each other; (4) to be willing to
+ risk one's life even for a little thing; (5) not to
+ attach too much value to things even though one has
+ risked one's life for them - just as a thief will resell
+ a stolen article for a fraction of its real value;
+ (6) to withstand all kinds of beatings and tortures
+ but to remain what you are; and (7) to believe your
+ work is worthwhile and not be willing to change it."
+
+ -- Rabbi Dov Baer, Maggid of Mezeritch
+
+OK, this was my motto while working on Perl for MiNT, especially rule (1)...
+
+Have fun with Perl!
+
+Guido Flohr
+--
+mailto:gufl0000@stud.uni-sb.de
+http://stud.uni-sb.de/~gufl0000
diff --git a/gnu/usr.bin/perl/README.mpeix b/gnu/usr.bin/perl/README.mpeix
new file mode 100644
index 00000000000..9e0b51d796b
--- /dev/null
+++ b/gnu/usr.bin/perl/README.mpeix
@@ -0,0 +1,260 @@
+Perl/iX for HP 3000 MPE
+
+http://www.cccd.edu/~markb/perlix.html
+Perl language for MPE
+Last updated July 15, 1998 @ 2030 UTC
+
+ ------------------------------------------------------------------------
+
+What's New
+
+ * July 15, 1998
+ o Changed startperl to #!/PERL/PUB/perl so that Perl will recognize
+ scripts more easily and efficiently.
+ * July 8, 1998
+ o Updated to version 5.004_70 (internal developer release) which is
+ now MPE-ready. The next public freeware release of Perl should
+ compile "straight out of the box" on MPE. Note that this version
+ of Perl/iX was strictly internal to me and never publicly
+ released. Note that BIND/iX is now required (well, the include
+ files and libbind.a) if you wish to compile Perl/iX.
+ * November 6, 1997
+ o Updated to version 5.004_04. No changes in MPE-specific
+ functionality.
+
+ ------------------------------------------------------------------------
+
+Welcome
+
+This is the official home page for the HP 3000 MPE port of the Perl
+scripting language which gives you all of the power of C, awk, sed, and sh
+in a single language. Check here for the latest news, implemented
+functionality, known bugs, to-do list, etc. Status reports about major
+milestones will also be posted to the HP3000-L mailing list and its
+associated gatewayed newsgroup comp.sys.hp.mpe.
+
+I'm doing this port because I can't live without Perl on the HPUX machines
+that I administer for the Coast Community College District, and I want to
+have the same power available to me on MPE.
+
+Please send your comments, questions, and bug reports directly to me, Mark
+Bixby, by e-mailing to markb@cccd.edu. Or just post them to HP3000-L. You
+can also telephone me at +1 714 438-4647 Monday-Friday 0815-1745 PDT
+(1615-0145 UTC).
+
+The platform I'm using to do this port is an HP 3000 969KS200 running
+MPE/iX 5.5 and using the gcc 2.8 compiler from
+http://www.interex.org/sources/freeware.html.
+
+The combined porting wisdom from all of my ports can be found in my MPE/iX
+Porting Guide.
+
+ ------------------------------------------------------------------------
+
+System Requirements
+
+ * MPE/iX 5.5 or later. This version of Perl/iX does NOT run on MPE/iX
+ 5.0 or earlier, nor does it run on "classic" MPE/V machines.
+ * The Perl binary requires that you must have converted your NMRL
+ libraries in /lib/lib*.a and /usr/lib/lib*.a to NMXL libraries
+ /lib/lib*.sl and /usr/lib/lib*.sl via the LIBSHP3K script that comes
+ with the GNUCORE portion of the FREEWARE tape.
+ * If you wish to recompile Perl, you must install both GNUCORE and
+ GNUGCC from the FREEWARE tape.
+ * Perl/iX will be happier if you install the MPEKX76A additional POSIX
+ filename characters patch, but this is optional.
+ * If you will be compiling Perl/iX yourself, you will also need the
+ /BIND/PUB/include and /BIND/PUB/lib portions of BIND/iX.
+
+ ------------------------------------------------------------------------
+
+Demos
+
+Here is a brief selection of some sample Perl/iX uses:
+
+ * A web feedback CGI form that lets a web browser user enter some data
+ and send e-mail to the person responsible for reading the feedback
+ comments. The CGI is written in Perl and requires Sendmail/iX.
+
+ ------------------------------------------------------------------------
+
+How to Obtain Perl/iX
+
+ 1. Download Perl using either FTP.ARPA.SYS or some other client
+ 2. Extract the installation script
+ 3. Edit the installation script
+ 4. Run the installation script
+
+Download Perl using FTP.ARPA.SYS from your HP 3000 (the preferred
+method).....
+
+:HELLO MANAGER.SYS
+:XEQ FTP.ARPA.SYS
+open ftp.cccd.edu
+anonymous
+your@email.address
+bytestream
+cd /pub/mpe
+get perl5.005.tar.Z /tmp/perl.tar.Z
+exit
+
+.....Or download using some other generic web or ftp client (the alternate
+method)
+
+Download the following files (make sure that you use "binary mode" or
+whatever client feature that is 8-bit clean):
+
+ * Perl from http://www.cccd.edu/ftp/pub/mpe/perl5.005.tar.Z or
+ ftp://ftp.cccd.edu/pub/mpe/perl5.005.tar.Z
+
+Upload those files to your HP 3000 in an 8-bit clean bytestream manner to:
+
+ * /tmp/perl.tar.Z
+
+Then extract the installation script (after both download methods)
+
+:CHDIR /tmp
+:XEQ TAR.HPBIN.SYS 'xvfopz /tmp/perl.tar.Z INSTALL'
+
+Edit the installation script
+
+Examine the accounting structure creation commands and modify if necessary
+(adding additional capabilities, choosing a non-system volume set, etc).
+
+:XEQ VI.HPBIN.SYS /tmp/INSTALL
+
+Run the installation script
+
+The accounting structure will be created and then all files will be
+extracted from the archive.
+
+:XEQ SH.HPBIN.SYS /tmp/INSTALL
+
+ ------------------------------------------------------------------------
+
+Distribution Contents Highlights
+
+README
+ The file you're reading now.
+INSTALL
+ Perl/iX Installation script.
+PERL
+ Perl NMPRG executable. A version-numbered backup copy also exists.
+ You might wish to "ln -s /PERL/PUB/PERL /usr/local/bin/perl".
+lib/
+ Perl libraries, both core and add-on.
+man/
+ Perl man page documentation.
+public_html/feedback.cgi
+ Sample feedback CGI form written in Perl.
+src/perl5.005
+ Source code.
+
+ ------------------------------------------------------------------------
+
+How to Compile Perl/iX
+
+ 1. cd src/perl5.005
+ 2. Read the INSTALL file for the official instructions
+ 3. ./Configure
+ 4. make
+ 5. ./mpeix/relink
+ 6. make test (expect 31 out of 5899 subtests to fail, mostly due to MPE
+ not supporting hard links and handling exit() return codes improperly)
+ 7. make install
+ 8. Optionally create symbolic links that point to the Perl executable,
+ i.e. ln -s /usr/local/bin/perl /PERL/PUB/PERL
+
+The summary test results from "cd t; ./perl -I../lib harness":
+
+Failed Test Status Wstat Total Fail Failed List of failed
+-------------------------------------------------------------------------------
+io/fs.t 26 8 30.77% 2-5, 7-9, 11
+io/pipe.t 12 2 16.67% 11-12
+lib/posix.t 18 1 5.56% 12
+op/die_exit.t 16 16 100.00% 1-16
+op/exec.t 8 2 25.00% 5-6
+op/stat.t 58 2 3.45% 3, 35
+Failed 6/183 test scripts, 96.72% okay. 31/5899 subtests failed, 99.47% okay.
+
+ ------------------------------------------------------------------------
+
+Getting Started with Perl/iX
+
+Create your Perl script files with "#!/PERL/PUB/perl" (or an equivalent
+symbolic link) as the first line. Use the chmod command to make sure that
+your script has execute permission. Run your script!
+
+If you want to use Perl to write web server CGI scripts, obtain and install
+CGI.pm. Build CGI.pm and all other add-on modules below /PERL/PUB/src/.
+
+Be sure to take a look at the CPAN module list. A wide variety of free Perl
+software is available.
+
+ ------------------------------------------------------------------------
+
+MPE/iX Implementation Considerations
+
+There some minor functionality issues to be aware of when comparing Perl
+for Unix (Perl/UX) to Perl/iX:
+
+ * MPE gcc/ld doesn't properly support linking NMPRG executables against
+ NMXL dynamic libraries, so you must manually run mpeix/relink after
+ each re-build of Perl.
+ * Perl/iX File::Copy will use MPE's /bin/cp command to copy files by
+ name in order to preserve file attributes like file code.
+ * MPE (and thus Perl/iX) lacks support for setgrent(), endgrent(),
+ setpwent(), endpwent().
+ * MPE (and thus Perl/iX) lacks support for hard links.
+ * MPE requires GETPRIVMODE() in order to bind() to ports less than
+ 1024. Perl/iX will call GETPRIVMODE() automatically on your behalf if
+ you attempt to bind() to these low-numbered ports. Note that the
+ Perl/iX executable and the PERL account do not normally have CAP=PM,
+ so if you will be bind()-ing to these privileged ports, you will
+ manually need to add PM capability as appropriate.
+ * MPE requires that you bind() to an IP address of zero. Perl/iX
+ automatically replaces the IP address that you pass to bind() with a
+ zero.
+ * If you use Perl/iX fcntl() against a socket it will fail, because MPE
+ requires that you use sfcntl() instead. Perl/iX does not presently
+ support sfcntl().
+ * MPE requires GETPRIVMODE() in order to setuid(). There are too many
+ calls to setuid() within Perl/iX, so I have not attempted an automatic
+ GETPRIVMODE() solution similar to bind().
+
+ ------------------------------------------------------------------------
+
+Known Bugs Under Investigation
+
+ * None
+
+ ------------------------------------------------------------------------
+
+To-Do List
+
+ * Make setuid()/setgid() support work.
+ * Make sure that fcntl() against a socket descriptor is redirected to
+ sfcntl().
+ * Add support for Berkeley DB once I've finished porting Berkeley DB.
+ * Write an MPE XS extension library containing miscellaneous important
+ MPE functions like GETPRIVMODE(), GETUSERMODE(), and sfcntl().
+
+ ------------------------------------------------------------------------
+
+Change History
+
+ * October 16, 1997
+ o Added Demos section to the Perl/iX home page so you can see some
+ sample Perl applications running on my 3000.
+ * October 3, 1997
+ o Added System Requirements section to the Perl/iX home page just
+ so the prerequisites stand out more. Various other home page
+ tweaks.
+ * October 2, 1997
+ o Initial public release.
+ * September 1997
+ o Porting begins.
+
+ ------------------------------------------------------------------------
+
+Mark Bixby, markb@cccd.edu
diff --git a/gnu/usr.bin/perl/README.os390 b/gnu/usr.bin/perl/README.os390
new file mode 100644
index 00000000000..5fcdfc01216
--- /dev/null
+++ b/gnu/usr.bin/perl/README.os390
@@ -0,0 +1,158 @@
+This document is written in pod format hence there are punctuation
+characters in in odd places. Do not worry, you've apparently got
+the ASCII->EBCDIC translation worked out correctly. You can read
+more about pod in pod/perlpod.pod or the short summary in the
+INSTALL file.
+
+=head1 NAME
+
+README.os390 - building and installing Perl for OS/390.
+
+=head1 SYNOPSIS
+
+This document will help you Configure, build, test and install Perl
+on OS/390 Unix System Services.
+
+=head1 DESCRIPTION
+
+This is a fully ported perl for OS/390 Release 3, 5 and 6.
+It may work on other versions, but those are the ones we've
+tested it on.
+
+You may need to carry out some system configuration tasks before
+running the Configure script for perl.
+
+=head2 Unpacking
+
+Gunzip/gzip for OS/390 is discussed at:
+
+ http://www.s390.ibm.com/products/oe/bpxqp1.html
+
+to extract an ASCII tar archive on OS/390, try this:
+
+ pax -o to=IBM-1047,from=ISO8859-1 -r < latest.tar
+
+=head2 Setup and utilities
+
+Be sure that your yacc installation is in place including any necessary
+parser template files. If you have not already done so then be sure to:
+
+ cp /samples/yyparse.c /etc
+
+This may also be a good time to ensure that your /etc/protocol file
+and either your /etc/resolv.conf or /etc/hosts files are in place.
+
+GNU make for OS/390, which may be required for the build of perl,
+is available from:
+
+ http://www.mks.com/s390/gnu/index.htm
+
+=head2 Configure
+
+Once you've unpacked the distribution, run "sh Configure" (see INSTALL
+for a full discussion of the Configure options). There is a "hints" file
+for os390 that specifies the correct values for most things. Some things
+to watch out for include:
+
+=over 4
+
+=item *
+
+Some of the parser default template files in /samples are needed in /etc.
+In particular be sure that you at least copy /samples/yyparse.c to /etc
+before running perl's Configure. This step ensures successful extraction
+of EBCDIC versions of parser files such as perly.c.
+
+=item *
+
+This port doesn't support dynamic loading. Although
+OS/390 has support for DLLs, there are some differences
+that cause problems for perl.
+
+=item *
+
+You may see a "WHOA THERE!!!" message for $d_shmatprototype
+it is OK to keep the recommended "define".
+
+=item *
+
+Don't turn on the compiler optimization flag "-O". There's
+a bug in either the optimizer or perl that causes perl to
+not work correctly when the optimizer is on.
+
+=item *
+
+Some of the configuration files in /etc used by the
+networking APIs are either missing or have the wrong
+names. In particular, make sure that there's either
+an /etc/resolv.conf or and /etc/hosts, so that
+gethostbyname() works, and make sure that the file
+/etc/proto has been renamed to /etc/protocol (NOT
+/etc/protocols, as used by other Unix systems).
+
+=back
+
+=head2 Build, test, install
+
+Simply put:
+
+ sh Configure
+ make
+ make test
+
+if everything looks ok then:
+
+ make install
+
+this last step may or may not require UID=0 privileges depending
+on how you answered the questions that Configure asked and whether
+or not you have write access to the directories you specified.
+
+=head2 Usage Hints
+
+When using perl on OS/390 please keep in mind that the EBCDIC and ASCII
+character sets are different. Perl builtin functions that may behave
+differently under EBCDIC are mentioned in the perlport.pod document.
+
+OpenEdition (UNIX System Services) does not (yet) support the #! means
+of script invokation.
+See:
+
+ head `whence perldoc`
+
+for an example of how to use the "eval exec" trick to ask the shell to
+have perl run your scripts for you.
+
+=head2 Extensions
+
+You can build xs based extensions to Perl for OS/390 but will need to
+follow the instructions in ExtUtils::MakeMaker for building statically
+linked perl binaries. In most cases people have reported better
+results with GNU make rather than the system's /bin/make.
+
+=head1 AUTHORS
+
+David Fiander and Peter Prymmer.
+
+=head1 SEE ALSO
+
+L<INSTALL>, L<perlport>, L<ExtUtils::MakeMaker>.
+
+=head2 Mailing list
+
+The Perl Institute (http://www.perl.org/) maintains a perl-mvs
+mailing list of interest to all folks building and/or
+using perl on EBCDIC platforms. To subscibe, send a message of:
+
+ subscribe perl-mvs
+
+to majordomo@perl.org.
+
+=head1 HISTORY
+
+This document was originally written by David Fiander for the 5.005
+release of Perl.
+
+This document was podified for the 5.005_03 release of perl 11 March 1999.
+
+=cut
diff --git a/gnu/usr.bin/perl/README.threads b/gnu/usr.bin/perl/README.threads
new file mode 100644
index 00000000000..136b156e7ff
--- /dev/null
+++ b/gnu/usr.bin/perl/README.threads
@@ -0,0 +1,289 @@
+NOTE
+
+Threading is a highly experimental feature. There are still a
+few race conditions that show up under high contention on SMP
+machines. Internal implementation is still subject to changes.
+It is not recommended for production use at this time.
+
+Building
+
+If you want to build with multi-threading support and you are
+running one of the following:
+
+ * Linux 2.x (with the LinuxThreads library installed: that's
+ the linuxthreads and linuxthreads-devel RPMs for RedHat)
+
+ * Digital UNIX 4.x
+
+ * Digital UNIX 3.x (Formerly DEC OSF/1), see additional note below
+
+ * Solaris 2.x for recentish x (2.5 is OK)
+
+ * IRIX 6.2 or newer. 6.2 will require a few os patches.
+ IMPORTANT: Without patch 2401, a kernel bug in IRIX 6.2 will
+ cause your machine to panic and crash when running threaded perl.
+ IRIX 6.3 and up should be OK. See lower down for patch details.
+
+then you should be able to use
+
+ ./Configure -Dusethreads -des
+ make
+
+and ignore the rest of this "Building" section. If it doesn't
+work or you are using another platform which you believe supports
+POSIX.1c threads then read on. Additional information may be in
+a platform-specific "hints" file in the hints/ subdirectory.
+
+On other platforms that use Configure to build perl, omit the -d
+from your ./Configure arguments. For example, use:
+
+ ./Configure -Dusethreads
+
+When Configure prompts you for ccflags, insert any other arguments in
+there that your compiler needs to use POSIX threads. When Configure
+prompts you for linking flags, include any flags required for
+threading (usually nothing special is required here). Finally, when
+COnfigure prompts you for libraries, include any necessary libraries
+(e.g. -lpthread). Pay attention to the order of libraries. It is
+probably necessary to specify your threading library *before* your
+standard C library, e.g. it might be necessary to have -lpthread -lc,
+instead of -lc -lpthread.
+
+Once you have specified all your compiler flags, you can have Configure
+accept all the defaults for the remainder of the session by typing &-d
+at any Configure prompt.
+
+Some additional notes (some of these may be obsolete now, other items
+may be handled automatically):
+
+For Digital Unix 4.x:
+ Add -pthread to ccflags
+ Add -pthread to ldflags
+ Add -lpthread -lc_r to lddlflags
+
+ For some reason, the extra includes for pthreads make Digital UNIX
+ complain fatally about the sbrk() delcaration in perl's malloc.c
+ so use the native malloc, e.g. sh Configure -Uusemymalloc, or
+ manually edit your config.sh as follows:
+ Change usemymalloc to n
+ Zap mallocobj and mallocsrc (foo='')
+ Change d_mymalloc to undef
+
+For Digital Unix 3.x (Formerly DEC OSF/1):
+ Add -DOLD_PTHREADS_API to ccflags
+ If compiling with the GNU cc compiler, remove -thread from ccflags
+
+ (The following should be done automatically if you call Configure
+ with the -Dusethreads option).
+ Add -lpthread -lmach -lc_r to libs (in the order specified).
+
+For IRIX:
+ (This should all be done automatically by the hint file).
+ Add -lpthread to libs
+ For IRIX 6.2, you have to have the following patches installed:
+ 1404 Irix 6.2 Posix 1003.1b man pages
+ 1645 IRIX 6.2 & 6.3 POSIX header file updates
+ 2000 Irix 6.2 Posix 1003.1b support modules
+ 2254 Pthread library fixes
+ 2401 6.2 all platform kernel rollup
+ IMPORTANT: Without patch 2401, a kernel bug in IRIX 6.2 will
+ cause your machine to panic and crash when running threaded perl.
+ IRIX 6.3 and up should be OK.
+
+ For IRIX 6.3 and 6.4 the pthreads should work out of the box.
+ Thanks to Hannu Napari <Hannu.Napari@hut.fi> for the IRIX
+ pthreads patches information.
+For AIX:
+ (This should all be done automatically by the hint file).
+ Change cc to xlc_r or cc_r.
+ Add -DNEED_PTHREAD_INIT to ccflags and cppflags
+ Add -lc_r to libswanted
+ Change -lc in lddflags to be -lpthread -lc_r -lc
+
+For Win32:
+ See README.win32, and the notes at the beginning of win32/Makefile
+ or win32/makefile.mk.
+
+Now you can do a
+ make
+
+
+O/S specific bugs
+
+Irix 6.2: See the Irix warning above.
+
+LinuxThreads 0.5 has a bug which can cause file descriptor 0 to be
+closed after a fork() leading to many strange symptoms. Version 0.6
+has this fixed but the following patch can be applied to 0.5 for now:
+
+----------------------------- cut here -----------------------------
+--- linuxthreads-0.5/pthread.c.ORI Mon Oct 6 13:55:50 1997
++++ linuxthreads-0.5/pthread.c Mon Oct 6 13:57:24 1997
+@@ -312,8 +312,10 @@
+ free(pthread_manager_thread_bos);
+ pthread_manager_thread_bos = pthread_manager_thread_tos = NULL;
+ /* Close the two ends of the pipe */
+- close(pthread_manager_request);
+- close(pthread_manager_reader);
++ if (pthread_manager_request >= 0) {
++ close(pthread_manager_request);
++ close(pthread_manager_reader);
++ }
+ pthread_manager_request = pthread_manager_reader = -1;
+ /* Update the pid of the main thread */
+ self->p_pid = getpid();
+----------------------------- cut here -----------------------------
+
+
+Building the Thread extension
+
+The Thread extension is now part of the main perl distribution tree.
+If you did Configure -Dusethreads then it will have been added to
+the list of extensions automatically.
+
+You can try some of the tests with
+ cd ext/Thread
+ perl create.t
+ perl join.t
+ perl lock.t
+ perl io.t
+etc.
+The io one leaves a thread reading from the keyboard on stdin so
+as the ping messages appear you can type lines and see them echoed.
+
+Try running the main perl test suite too. There are known
+failures for some of the DBM/DB extensions (if their underlying
+libraries were not compiled to be thread-aware).
+
+
+Bugs
+
+* FAKE_THREADS should produce a working perl but the Thread
+extension won't build with it yet. (FAKE_THREADS has not been
+tested at all in recent times.)
+
+* There may still be races where bugs show up under contention.
+
+* Need to document "lock", Thread.pm, Queue.pm, ...
+
+
+Debugging
+
+Use the -DS command-line option to turn on debugging of the
+multi-threading code. Under Linux, that also turns on a quick
+hack I did to grab a bit of extra information from segfaults.
+If you have a fancier gdb/threads setup than I do then you'll
+have to delete the lines in perl.c which say
+ #if defined(DEBUGGING) && defined(USE_THREADS) && defined(__linux__)
+ DEBUG_S(signal(SIGSEGV, (void(*)(int))catch_sigsegv););
+ #endif
+
+
+Background
+
+Some old globals (e.g. stack_sp, op) and some old per-interpreter
+variables (e.g. tmps_stack, cxstack) move into struct thread.
+All fields of struct thread which derived from original perl
+variables have names of the form Tfoo. For example, stack_sp becomes
+the field Tstack_sp of struct thread. For those fields which moved
+from original perl, thread.h does
+ #define foo (thr->Tfoo)
+This means that all functions in perl which need to use one of these
+fields need an (automatic) variable thr which points at the current
+thread's struct thread. For pp_foo functions, it is passed around as
+an argument, for other functions they do
+ dTHR;
+which declares and initialises thr from thread-specific data
+via pthread_getspecific. If a function fails to compile with an
+error about "no such variable thr", it probably just needs a dTHR
+at the top.
+
+
+Fake threads
+
+For FAKE_THREADS, thr is a global variable and perl schedules threads
+by altering thr in between appropriate ops. The next and prev fields
+of struct thread keep all fake threads on a doubly linked list and
+the next_run and prev_run fields keep all runnable threads on a
+doubly linked list. Mutexes are stubs for FAKE_THREADS. Condition
+variables are implemented as a list of waiting threads.
+
+
+Mutexes and condition variables
+
+The API is via macros MUTEX_{INIT,LOCK,UNLOCK,DESTROY} and
+COND_{INIT,WAIT,SIGNAL,BROADCAST,DESTROY}.
+
+A mutex is only required to be a simple, fast mutex (e.g. it does not
+have to be recursive). It is only ever held across very short pieces
+of code. Condition variables are only ever signalled/broadcast while
+their associated mutex is held. (This constraint simplifies the
+implementation of condition variables in certain porting situations.)
+For POSIX threads, perl mutexes and condition variables correspond to
+POSIX ones. For FAKE_THREADS, mutexes are stubs and condition variables
+are implmented as lists of waiting threads. For FAKE_THREADS, a thread
+waits on a condition variable by removing itself from the runnable
+list, calling SCHEDULE to change thr to the next appropriate
+runnable thread and returning op (i.e. the new threads next op).
+This means that fake threads can only block while in PP code.
+A PP function which contains a COND_WAIT must be prepared to
+handle such restarts and can use the field "private" of struct
+thread to record its state. For fake threads, COND_SIGNAL and
+COND_BROADCAST work by putting back all the threads on the
+condition variables list into the run queue. Note that a mutex
+must *not* be held while returning from a PP function.
+
+Perl locks and condition variables are both implemented as a
+condpair_t structure, containing a mutex, an "owner" condition
+variable, an owner thread field and another condition variable).
+The structure is attached by 'm' magic to any SV. pp_lock locks
+such an object by waiting on the ownercond condition variable until
+the owner field is zero and then setting the owner field to its own
+thread pointer. The lock is semantically recursive so if the owner
+field already matches the current thread then pp_lock returns
+straight away. If the owner field has to be filled in then
+unlock_condpair is queued as an end-of-block destructor and
+that function zeroes out the owner field and signals the ownercond
+condition variable, thus waking up any other thread that wants to
+lock it. When used as a condition variable, the condpair is locked
+(involving the above wait-for-ownership and setting the owner field)
+and the spare condition variable field is used for waiting on.
+
+
+Thread states
+
+
+ $t->join
+R_JOINABLE ---------------------> R_JOINED >----\
+ | \ pthread_join(t) | ^ |
+ | \ | | join | pthread_join
+ | \ | | |
+ | \ | \------/
+ | \ |
+ | \ |
+ | $t->detach\ pthread_detach |
+ | _\| |
+ends| R_DETACHED ends | unlink
+ | \ |
+ | ends \ unlink |
+ | \ |
+ | \ |
+ | \ |
+ | \ |
+ | \ |
+ V join detach _\| V
+ZOMBIE ----------------------------> DEAD
+ pthread_join pthread_detach
+ and unlink and unlink
+
+
+
+Malcolm Beattie
+mbeattie@sable.ox.ac.uk
+Last updated: 27 November 1997
+
+Configure-related info updated 16 July 1998 by
+Andy Dougherty <doughera@lafayette.edu>
+
+Other minor updates 10 Feb 1999 by
+Gurusamy Sarathy
diff --git a/gnu/usr.bin/perl/README.vos b/gnu/usr.bin/perl/README.vos
new file mode 100644
index 00000000000..40753c66d28
--- /dev/null
+++ b/gnu/usr.bin/perl/README.vos
@@ -0,0 +1,139 @@
+Perl 5 README file for the Stratus VOS operating system.
+Paul Green (Paul_Green@stratus.com)
+February 4, 1999
+
+
+Introduction
+------------
+This is a port of Perl version 5, revision 005-03, to VOS. Perl
+is a scripting or macro language that is popular on many
+systems. See your local computer bookstore for a number of good
+books on Perl.
+
+Most of the Perl features should work on VOS. However, any
+attempt by perl.pm to call the following unimplemented POSIX
+functions will result in an error message and an immediate and
+fatal call to the VOS debugger. They are "dup", "fork", and
+"waitpid". The lack of these functions pretty much prevents you
+from starting VOS commands and grabbing their output in perl.
+The workaround is to run the commands outside of perl, then have
+perl process the output file.
+
+
+Compiling Perl 5 on VOS
+-----------------------
+Before you can build Perl 5 on VOS, you need to have or acquire the
+following additional items.
+
+1. The VOS Standard C Compiler and Runtime, or the VOS Standard C
+ Cross-Compiler. This is a standard Stratus product.
+
+2. The VOS OS TCP/IP product set. While the necessary header
+ files are included with VOS POSIX.1, you still need the
+ appropriate object files in order to bind perl.pm. This is
+ a standard Stratus product.
+
+3. The VOS POSIX.1 environment. As of this writing, this is
+ available on the VOS FTP site. Login anonymously to
+ ftp.stratus.com and get the file
+ /pub/vos/alpha/posix.save.evf.gz in binary file-transfer
+ mode. Or use the Uniform Resource Locator (URL)
+ ftp://ftp.stratus.com/pub/vos/alpha/posix.save.evf.gz from
+ your web browser. This is not a standard Stratus product.
+
+ Instructions for unbundling this file are at
+ ftp://ftp.stratus.com/pub/vos/utility/utility.html.
+
+To build perl 5, change to the "vos" subdirectory and type the
+command "compile_perl -processor X", where X is the processor
+type (mc68020, i80860, pa7100, pa8000) that you wish to use.
+
+
+Installing Perl 5 on VOS
+------------------------
+1. Create the directory >system>ported>command_library.
+
+2. Copy the appropriate version of the perl program module to
+ this directory. For example, with your current directory
+ set to the top-level directory of Perl 5, to install the
+ executable program module for the Motorola 68K
+ architecture, enter:
+
+ !copy_file vos>obj>perl.pm >system>ported>command_library>*
+
+ (If you wish to use both Perl version 4 and Perl version 5,
+ you must give them different names; for example, perl.pm
+ and perl5.pm).
+
+3. Create the directory >system>ported>perl>lib.
+
+4. Copy all of the files and subdirectories from the lib
+ subdirectory into this new directory. For example, with
+ the current directory set to the top-level directory of the
+ perl distribution, enter:
+
+ !copy_dir lib >system>ported>perl>lib>5.005
+
+5. While there are currently no architecture-specific
+ extensions or modules distributed with perl, the following
+ directories can be used to hold such files:
+
+ >system>ported>perl>lib>5.005.68k
+ >system>ported>perl>lib>5.005.860
+ >system>ported>perl>lib>5.005.7100
+ >system>ported>perl>lib>5.005.8000
+
+6. Site-specific perl extensions and modules can be installed
+ in one of two places. Put architecture-independent files
+ into:
+
+ >system>ported>perl>lib>site>5.005
+
+ Put architecture-dependent files into one of the following
+ directories:
+
+ >system>ported>perl>lib>site>5.005.68k
+ >system>ported>perl>lib>site>5.005.860
+ >system>ported>perl>lib>site>5.005.7100
+ >system>ported>perl>lib>site>5.005.8000
+
+7. You can examine the @INC variable from within a perl program
+ to see the order in which Perl searches these directories.
+
+
+Unimplemented Features
+----------------------
+If Perl 5 attempts to call an unimplemented VOS POSIX.1 function,
+it will print a fatal error message and enter the VOS debugger.
+This error is not recoverable. See vos_dummies.c for a list of
+the unimplemented POSIX.1 functions. To see what functions are
+unimplemented and what the error message looks like, compile and
+execute "test_vos_dummies.c".
+
+
+Restrictions
+------------
+This port of Perl version 5 to VOS prefers Unix-style,
+slash-separated pathnames over VOS-style greater-than-separated
+pathnames. VOS-style pathnames should work in most contexts, but
+if you have trouble, replace all greater-than characters by slash
+characters. Because the slash character is used as a pathname
+delimiter, Perl cannot process VOS pathnames containing a slash
+character in a directory or file name; these must be renamed.
+
+This port of Perl also uses Unix-epoch date values internally.
+As long as you are dealing with ASCII character string
+representations of dates, this should not be an issue. The
+supported epoch is January 1, 1980 to January 17, 2038.
+
+See the file pod/perlport.pod for more information about the VOS
+port of Perl.
+
+
+Support Status
+--------------
+I'm offering this port "as is". You can ask me questions, but I
+can't guarantee I'll be able to answer them; I don't know much
+about Perl itself; I'm still learning that.
+
+(end)
diff --git a/gnu/usr.bin/perl/Todo-5.005 b/gnu/usr.bin/perl/Todo-5.005
new file mode 100644
index 00000000000..7f2dbc957c8
--- /dev/null
+++ b/gnu/usr.bin/perl/Todo-5.005
@@ -0,0 +1,61 @@
+Multi-threading
+ $AUTOLOAD. Hmm.
+ consistent semantics for exit/die in threads
+ SvREFCNT_dec(curstack) in threadstart() in Thread.xs
+ better support for externally created threads
+ Thread::Pool
+ spot-check globals like statcache and global GVs for thread-safety
+
+Compiler
+ auto-produce executable
+ typed lexicals should affect B::CC::load_pad
+ workarounds to help Win32
+ END blocks need saving in compiled output
+ _AUTOLOAD prodding
+ fix comppadlist (names in comppad_name can have fake SvCUR
+ from where newASSIGNOP steals the field)
+
+Namespace cleanup
+ CPP-space: restrict what we export from headers
+ stop malloc()/free() pollution unless asked
+ header-space: move into CORE/perl/
+ API-space: begin list of things that constitute public api
+
+MULTIPLICITY support
+ complete work on safe recursive interpreters, C<Perl->new()>
+ revisit extra implicit arg that provides curthread/curinterp context
+
+Reliable Signals
+ alternate runops() for signal despatch
+ figure out how to die() in delayed sighandler
+ add tests for Thread::Signal
+
+Win32 stuff
+ get PERL_OBJECT building under gcc
+ get PERL_OBJECT building on non-win32
+ automate generation of 'protected' prototypes for CPerlObj
+ rename new headers to be consistent with the rest
+ sort out the spawnvp() mess
+ work out DLL versioning
+ style-check
+
+Miscellaneous
+ rename and alter ISA.pm
+ magic_setisa should be made to update %FIELDS [???]
+ add new modules (Archive::Tar, Compress::Zlib, CPAN::FTP?)
+ fix pod2html to generate relative URLs
+ automate testing with large parts of CPAN
+
+Ongoing
+ keep filenames 8.3 friendly, where feasible
+ upgrade to newer versions of all independently maintained modules
+ comprehensive perldelta.pod
+
+Documentation
+ describe new age patterns
+ update perl{guts,call,embed,xs} with additions, changes to API
+ document Win32 choices
+ spot-check all new modules for completeness
+ better docs for pack()/unpack()
+ reorg tutorials vs. reference sections
+
diff --git a/gnu/usr.bin/perl/XSlock.h b/gnu/usr.bin/perl/XSlock.h
new file mode 100644
index 00000000000..0b2c8299b91
--- /dev/null
+++ b/gnu/usr.bin/perl/XSlock.h
@@ -0,0 +1,38 @@
+#ifndef __XSlock_h__
+#define __XSlock_h__
+
+class XSLockManager
+{
+public:
+ XSLockManager() { InitializeCriticalSection(&cs); };
+ ~XSLockManager() { DeleteCriticalSection(&cs); };
+ void Enter(void) { EnterCriticalSection(&cs); };
+ void Leave(void) { LeaveCriticalSection(&cs); };
+protected:
+ CRITICAL_SECTION cs;
+};
+
+XSLockManager g_XSLock;
+CPerlObj* pPerl;
+
+class XSLock
+{
+public:
+ XSLock(CPerlObj *p) {
+ g_XSLock.Enter();
+ ::pPerl = p;
+ };
+ ~XSLock() { g_XSLock.Leave(); };
+};
+
+/* PERL_CAPI does its own locking in xs_handler() */
+#if defined(PERL_OBJECT) && !defined(PERL_CAPI)
+#undef dXSARGS
+#define dXSARGS \
+ XSLock localLock(pPerl); \
+ dSP; dMARK; \
+ I32 ax = mark - PL_stack_base + 1; \
+ I32 items = sp - mark
+#endif /* PERL_OBJECT && !PERL_CAPI */
+
+#endif
diff --git a/gnu/usr.bin/perl/apollo/netinet/in.h b/gnu/usr.bin/perl/apollo/netinet/in.h
new file mode 100644
index 00000000000..cfbc0485d07
--- /dev/null
+++ b/gnu/usr.bin/perl/apollo/netinet/in.h
@@ -0,0 +1,8 @@
+/* Apollo's <netinet/in.h> isn't protected against multiple inclusion. */
+
+#ifndef _NETINET_IN_INCLUDED
+#define _NETINET_IN_INCLUDED
+
+#include "/bsd4.3/usr/include/netinet/in.h"
+
+#endif /* _NETINET_IN_INCLUDED */
diff --git a/gnu/usr.bin/perl/beos/nm.c b/gnu/usr.bin/perl/beos/nm.c
new file mode 100644
index 00000000000..4f53f743b26
--- /dev/null
+++ b/gnu/usr.bin/perl/beos/nm.c
@@ -0,0 +1,53 @@
+/* nm.c - a feeble shared-lib library parser
+ * Copyright 1997, 1998 Tom Spindler
+ * This software is covered under perl's Artistic license.
+ */
+
+/* $Id: nm.c,v 1.1 1998/02/16 03:51:26 dogcow Exp $ */
+
+#include <be/kernel/image.h>
+#include <malloc.h>
+#include <string.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+main(int argc, char **argv) {
+char *path, *symname;
+image_id img;
+int32 n = 0;
+volatile int32 symnamelen, symtype;
+void *symloc;
+
+if (argc != 2) { printf("more args, bozo\n"); exit(1); }
+
+path = (void *) malloc((size_t) 2048);
+symname = (void *) malloc((size_t) 2048);
+
+if (!getcwd(path, 2048)) { printf("aiee!\n"); exit(1); }
+if (!strcat(path, "/")) {printf("naah.\n"); exit (1); }
+/*printf("%s\n",path);*/
+
+if ('/' != argv[1][0]) {
+ if (!strcat(path, argv[1])) { printf("feh1\n"); exit(1); }
+} else {
+ if (!strcpy(path, argv[1])) { printf("gah!\n"); exit(1); }
+}
+/*printf("%s\n",path);*/
+
+img = load_add_on(path);
+if (B_ERROR == img) {printf("Couldn't load_add_on() %s.\n", path); exit(2); }
+
+symnamelen=2047;
+
+while (B_BAD_INDEX != get_nth_image_symbol(img, n++, symname, &symnamelen,
+ &symtype, &symloc)) {
+ printf("%s |%s |GLOB %Lx | \n", symname,
+ ((B_SYMBOL_TYPE_ANY == symtype) || (B_SYMBOL_TYPE_TEXT == symtype)) ? "FUNC" : "VAR ", symloc);
+ symnamelen=2047;
+}
+printf("number of symbols: %d\n", n);
+if (B_ERROR == unload_add_on(img)) {printf("err while closing.\n"); exit(3); }
+free(path);
+return(0);
+}
diff --git a/gnu/usr.bin/perl/bytecode.h b/gnu/usr.bin/perl/bytecode.h
new file mode 100644
index 00000000000..7f0ab13a490
--- /dev/null
+++ b/gnu/usr.bin/perl/bytecode.h
@@ -0,0 +1,161 @@
+typedef char *pvcontents;
+typedef char *strconst;
+typedef U32 PV;
+typedef char *op_tr_array;
+typedef int comment_t;
+typedef SV *svindex;
+typedef OP *opindex;
+typedef IV IV64;
+
+#ifdef INDIRECT_BGET_MACROS
+#define BGET_FREAD(argp, len, nelem) \
+ bs.fread((char*)(argp),(len),(nelem),bs.data)
+#define BGET_FGETC() bs.fgetc(bs.data)
+#else
+#define BGET_FREAD(argp, len, nelem) PerlIO_read(fp, (argp), (len)*(nelem))
+#define BGET_FGETC() PerlIO_getc(fp)
+#endif /* INDIRECT_BGET_MACROS */
+
+#define BGET_U32(arg) \
+ BGET_FREAD(&arg, sizeof(U32), 1); arg = PerlSock_ntohl((U32)arg)
+#define BGET_I32(arg) \
+ BGET_FREAD(&arg, sizeof(I32), 1); arg = (I32)PerlSock_ntohl((U32)arg)
+#define BGET_U16(arg) \
+ BGET_FREAD(&arg, sizeof(U16), 1); arg = PerlSock_ntohs((U16)arg)
+#define BGET_U8(arg) arg = BGET_FGETC()
+
+#if INDIRECT_BGET_MACROS
+#define BGET_PV(arg) STMT_START { \
+ BGET_U32(arg); \
+ if (arg) \
+ bs.freadpv(arg, bs.data); \
+ else { \
+ PL_bytecode_pv.xpv_pv = 0; \
+ PL_bytecode_pv.xpv_len = 0; \
+ PL_bytecode_pv.xpv_cur = 0; \
+ } \
+ } STMT_END
+#else
+#define BGET_PV(arg) STMT_START { \
+ BGET_U32(arg); \
+ if (arg) { \
+ New(666, PL_bytecode_pv.xpv_pv, arg, char); \
+ PerlIO_read(fp, PL_bytecode_pv.xpv_pv, arg); \
+ PL_bytecode_pv.xpv_len = arg; \
+ PL_bytecode_pv.xpv_cur = arg - 1; \
+ } else { \
+ PL_bytecode_pv.xpv_pv = 0; \
+ PL_bytecode_pv.xpv_len = 0; \
+ PL_bytecode_pv.xpv_cur = 0; \
+ } \
+ } STMT_END
+#endif /* INDIRECT_BGET_MACROS */
+
+#define BGET_comment_t(arg) \
+ do { arg = BGET_FGETC(); } while (arg != '\n' && arg != EOF)
+
+/*
+ * In the following, sizeof(IV)*4 is just a way of encoding 32 on 64-bit-IV
+ * machines such that 32-bit machine compilers don't whine about the shift
+ * count being too high even though the code is never reached there.
+ */
+#define BGET_IV64(arg) STMT_START { \
+ U32 hi, lo; \
+ BGET_U32(hi); \
+ BGET_U32(lo); \
+ if (sizeof(IV) == 8) \
+ arg = ((IV)hi << (sizeof(IV)*4) | lo); \
+ else if (((I32)hi == -1 && (I32)lo < 0) \
+ || ((I32)hi == 0 && (I32)lo >= 0)) { \
+ arg = (I32)lo; \
+ } \
+ else { \
+ PL_bytecode_iv_overflows++; \
+ arg = 0; \
+ } \
+ } STMT_END
+
+#define BGET_op_tr_array(arg) do { \
+ unsigned short *ary; \
+ int i; \
+ New(666, ary, 256, unsigned short); \
+ BGET_FREAD(ary, 256, 2); \
+ for (i = 0; i < 256; i++) \
+ ary[i] = PerlSock_ntohs(ary[i]); \
+ arg = (char *) ary; \
+ } while (0)
+
+#define BGET_pvcontents(arg) arg = PL_bytecode_pv.xpv_pv
+#define BGET_strconst(arg) STMT_START { \
+ for (arg = PL_tokenbuf; (*arg = BGET_FGETC()); arg++) /* nothing */; \
+ arg = PL_tokenbuf; \
+ } STMT_END
+
+#define BGET_double(arg) STMT_START { \
+ char *str; \
+ BGET_strconst(str); \
+ arg = atof(str); \
+ } STMT_END
+
+#define BGET_objindex(arg, type) STMT_START { \
+ U32 ix; \
+ BGET_U32(ix); \
+ arg = (type)PL_bytecode_obj_list[ix]; \
+ } STMT_END
+#define BGET_svindex(arg) BGET_objindex(arg, svindex)
+#define BGET_opindex(arg) BGET_objindex(arg, opindex)
+
+#define BSET_ldspecsv(sv, arg) sv = PL_specialsv_list[arg]
+
+#define BSET_sv_refcnt_add(svrefcnt, arg) svrefcnt += arg
+#define BSET_gp_refcnt_add(gprefcnt, arg) gprefcnt += arg
+#define BSET_gp_share(sv, arg) STMT_START { \
+ gp_free((GV*)sv); \
+ GvGP(sv) = GvGP(arg); \
+ } STMT_END
+
+#define BSET_gv_fetchpv(sv, arg) sv = (SV*)gv_fetchpv(arg, TRUE, SVt_PV)
+#define BSET_gv_stashpv(sv, arg) sv = (SV*)gv_stashpv(arg, TRUE)
+#define BSET_sv_magic(sv, arg) sv_magic(sv, Nullsv, arg, 0, 0)
+#define BSET_mg_pv(mg, arg) mg->mg_ptr = arg; mg->mg_len = PL_bytecode_pv.xpv_cur
+#define BSET_sv_upgrade(sv, arg) (void)SvUPGRADE(sv, arg)
+#define BSET_xpv(sv) do { \
+ SvPV_set(sv, PL_bytecode_pv.xpv_pv); \
+ SvCUR_set(sv, PL_bytecode_pv.xpv_cur); \
+ SvLEN_set(sv, PL_bytecode_pv.xpv_len); \
+ } while (0)
+#define BSET_av_extend(sv, arg) av_extend((AV*)sv, arg)
+
+#define BSET_av_push(sv, arg) av_push((AV*)sv, arg)
+#define BSET_hv_store(sv, arg) \
+ hv_store((HV*)sv, PL_bytecode_pv.xpv_pv, PL_bytecode_pv.xpv_cur, arg, 0)
+#define BSET_pv_free(pv) Safefree(pv.xpv_pv)
+#define BSET_pregcomp(o, arg) \
+ ((PMOP*)o)->op_pmregexp = arg ? \
+ CALLREGCOMP(arg, arg + PL_bytecode_pv.xpv_cur, ((PMOP*)o)) : 0
+#define BSET_newsv(sv, arg) sv = NEWSV(666,0); SvUPGRADE(sv, arg)
+#define BSET_newop(o, arg) o = (OP*)safemalloc(optype_size[arg])
+#define BSET_newopn(o, arg) STMT_START { \
+ OP *oldop = o; \
+ BSET_newop(o, arg); \
+ oldop->op_next = o; \
+ } STMT_END
+
+#define BSET_ret(foo) return
+
+/*
+ * Kludge special-case workaround for OP_MAPSTART
+ * which needs the ppaddr for OP_GREPSTART. Blech.
+ */
+#define BSET_op_type(o, arg) STMT_START { \
+ o->op_type = arg; \
+ if (arg == OP_MAPSTART) \
+ arg = OP_GREPSTART; \
+ o->op_ppaddr = ppaddr[arg]; \
+ } STMT_END
+#define BSET_op_ppaddr(o, arg) croak("op_ppaddr not yet implemented")
+#define BSET_curpad(pad, arg) pad = AvARRAY(arg)
+
+#define BSET_OBJ_STORE(obj, ix) \
+ (I32)ix > PL_bytecode_obj_list_fill ? \
+ bset_obj_store(obj, (I32)ix) : (PL_bytecode_obj_list[ix] = obj)
diff --git a/gnu/usr.bin/perl/bytecode.pl b/gnu/usr.bin/perl/bytecode.pl
new file mode 100644
index 00000000000..cc096ac1bcf
--- /dev/null
+++ b/gnu/usr.bin/perl/bytecode.pl
@@ -0,0 +1,388 @@
+use strict;
+my %alias_to = (
+ U32 => [qw(PADOFFSET STRLEN)],
+ I32 => [qw(SSize_t long)],
+ U16 => [qw(OPCODE line_t short)],
+ U8 => [qw(char)],
+);
+
+my @optype= qw(OP UNOP BINOP LOGOP CONDOP LISTOP PMOP SVOP GVOP PVOP LOOP COP);
+
+# Nullsv *must* come first in the following so that the condition
+# ($$sv == 0) can continue to be used to test (sv == Nullsv).
+my @specialsv = qw(Nullsv &PL_sv_undef &PL_sv_yes &PL_sv_no);
+
+my (%alias_from, $from, $tos);
+while (($from, $tos) = each %alias_to) {
+ map { $alias_from{$_} = $from } @$tos;
+}
+
+my $c_header = <<'EOT';
+/*
+ * Copyright (c) 1996-1998 Malcolm Beattie
+ *
+ * You may distribute under the terms of either the GNU General Public
+ * License or the Artistic License, as specified in the README file.
+ *
+ */
+/*
+ * This file is autogenerated from bytecode.pl. Changes made here will be lost.
+ */
+EOT
+
+my $perl_header;
+($perl_header = $c_header) =~ s{[/ ]?\*/?}{#}g;
+
+unlink "byterun.c", "byterun.h", "ext/B/B/Asmdata.pm";
+
+#
+# Start with boilerplate for Asmdata.pm
+#
+open(ASMDATA_PM, ">ext/B/B/Asmdata.pm") or die "ext/B/B/Asmdata.pm: $!";
+print ASMDATA_PM $perl_header, <<'EOT';
+package B::Asmdata;
+use Exporter;
+@ISA = qw(Exporter);
+@EXPORT_OK = qw(%insn_data @insn_name @optype @specialsv_name);
+use vars qw(%insn_data @insn_name @optype @specialsv_name);
+
+EOT
+print ASMDATA_PM <<"EOT";
+\@optype = qw(@optype);
+\@specialsv_name = qw(@specialsv);
+
+# XXX insn_data is initialised this way because with a large
+# %insn_data = (foo => [...], bar => [...], ...) initialiser
+# I get a hard-to-track-down stack underflow and segfault.
+EOT
+
+#
+# Boilerplate for byterun.c
+#
+open(BYTERUN_C, ">byterun.c") or die "byterun.c: $!";
+print BYTERUN_C $c_header, <<'EOT';
+
+#include "EXTERN.h"
+#include "perl.h"
+
+void *
+bset_obj_store(void *obj, I32 ix)
+{
+ if (ix > PL_bytecode_obj_list_fill) {
+ if (PL_bytecode_obj_list_fill == -1)
+ New(666, PL_bytecode_obj_list, ix + 1, void*);
+ else
+ Renew(PL_bytecode_obj_list, ix + 1, void*);
+ PL_bytecode_obj_list_fill = ix;
+ }
+ PL_bytecode_obj_list[ix] = obj;
+ return obj;
+}
+
+#ifdef INDIRECT_BGET_MACROS
+void byterun(struct bytestream bs)
+#else
+void byterun(PerlIO *fp)
+#endif /* INDIRECT_BGET_MACROS */
+{
+ dTHR;
+ int insn;
+ while ((insn = BGET_FGETC()) != EOF) {
+ switch (insn) {
+EOT
+
+
+my (@insn_name, $insn_num, $insn, $lvalue, $argtype, $flags, $fundtype);
+
+while (<DATA>) {
+ chop;
+ s/#.*//; # remove comments
+ next unless length;
+ if (/^%number\s+(.*)/) {
+ $insn_num = $1;
+ next;
+ } elsif (/%enum\s+(.*?)\s+(.*)/) {
+ create_enum($1, $2); # must come before instructions
+ next;
+ }
+ ($insn, $lvalue, $argtype, $flags) = split;
+ $insn_name[$insn_num] = $insn;
+ $fundtype = $alias_from{$argtype} || $argtype;
+
+ #
+ # Add the case statement and code for the bytecode interpreter in byterun.c
+ #
+ printf BYTERUN_C "\t case INSN_%s:\t\t/* %d */\n\t {\n",
+ uc($insn), $insn_num;
+ my $optarg = $argtype eq "none" ? "" : ", arg";
+ if ($optarg) {
+ printf BYTERUN_C "\t\t$argtype arg;\n\t\tBGET_%s(arg);\n", $fundtype;
+ }
+ if ($flags =~ /x/) {
+ print BYTERUN_C "\t\tBSET_$insn($lvalue$optarg);\n";
+ } elsif ($flags =~ /s/) {
+ # Store instructions store to PL_bytecode_obj_list[arg]. "lvalue" field is rvalue.
+ print BYTERUN_C "\t\tBSET_OBJ_STORE($lvalue$optarg);\n";
+ }
+ elsif ($optarg && $lvalue ne "none") {
+ print BYTERUN_C "\t\t$lvalue = arg;\n";
+ }
+ print BYTERUN_C "\t\tbreak;\n\t }\n";
+
+ #
+ # Add the initialiser line for %insn_data in Asmdata.pm
+ #
+ print ASMDATA_PM <<"EOT";
+\$insn_data{$insn} = [$insn_num, \\&PUT_$fundtype, "GET_$fundtype"];
+EOT
+
+ # Find the next unused instruction number
+ do { $insn_num++ } while $insn_name[$insn_num];
+}
+
+#
+# Finish off byterun.c
+#
+print BYTERUN_C <<'EOT';
+ default:
+ croak("Illegal bytecode instruction %d\n", insn);
+ /* NOTREACHED */
+ }
+ }
+}
+EOT
+
+#
+# Write the instruction and optype enum constants into byterun.h
+#
+open(BYTERUN_H, ">byterun.h") or die "byterun.h: $!";
+print BYTERUN_H $c_header, <<'EOT';
+#ifdef INDIRECT_BGET_MACROS
+struct bytestream {
+ void *data;
+ int (*fgetc)(void *);
+ int (*fread)(char *, size_t, size_t, void*);
+ void (*freadpv)(U32, void*);
+};
+#endif /* INDIRECT_BGET_MACROS */
+
+void *bset_obj_store _((void *, I32));
+
+enum {
+EOT
+
+my $i = 0;
+my $add_enum_value = 0;
+my $max_insn;
+for ($i = 0; $i < @insn_name; $i++) {
+ $insn = uc($insn_name[$i]);
+ if (defined($insn)) {
+ $max_insn = $i;
+ if ($add_enum_value) {
+ print BYTERUN_H " INSN_$insn = $i,\t\t\t/* $i */\n";
+ $add_enum_value = 0;
+ } else {
+ print BYTERUN_H " INSN_$insn,\t\t\t/* $i */\n";
+ }
+ } else {
+ $add_enum_value = 1;
+ }
+}
+
+print BYTERUN_H " MAX_INSN = $max_insn\n};\n";
+
+print BYTERUN_H "\nenum {\n";
+for ($i = 0; $i < @optype - 1; $i++) {
+ printf BYTERUN_H " OPt_%s,\t\t/* %d */\n", $optype[$i], $i;
+}
+printf BYTERUN_H " OPt_%s\t\t/* %d */\n};\n\n", $optype[$i], $i;
+print BYTERUN_H <<'EOT';
+EXT int optype_size[]
+#ifdef DOINIT
+= {
+EOT
+for ($i = 0; $i < @optype - 1; $i++) {
+ printf BYTERUN_H " sizeof(%s),\n", $optype[$i], $i;
+}
+printf BYTERUN_H " sizeof(%s)\n}\n", $optype[$i], $i;
+print BYTERUN_H <<'EOT';
+#endif /* DOINIT */
+;
+
+EOT
+
+print BYTERUN_H <<'EOT';
+#define INIT_SPECIALSV_LIST STMT_START { \
+EOT
+for ($i = 0; $i < @specialsv; $i++) {
+ print BYTERUN_H "\tPL_specialsv_list[$i] = $specialsv[$i]; \\\n";
+}
+print BYTERUN_H <<'EOT';
+ } STMT_END
+EOT
+
+#
+# Finish off insn_data and create array initialisers in Asmdata.pm
+#
+print ASMDATA_PM <<'EOT';
+
+my ($insn_name, $insn_data);
+while (($insn_name, $insn_data) = each %insn_data) {
+ $insn_name[$insn_data->[0]] = $insn_name;
+}
+# Fill in any gaps
+@insn_name = map($_ || "unused", @insn_name);
+
+1;
+
+__END__
+
+=head1 NAME
+
+B::Asmdata - Autogenerated data about Perl ops, used to generate bytecode
+
+=head1 SYNOPSIS
+
+ use Asmdata;
+
+=head1 DESCRIPTION
+
+See F<ext/B/B/Asmdata.pm>.
+
+=head1 AUTHOR
+
+Malcolm Beattie, C<mbeattie@sable.ox.ac.uk>
+
+=cut
+EOT
+
+__END__
+# First set instruction ord("#") to read comment to end-of-line (sneaky)
+%number 35
+comment arg comment_t
+# Then make ord("\n") into a no-op
+%number 10
+nop none none
+# Now for the rest of the ordinary ones, beginning with \0 which is
+# ret so that \0-terminated strings can be read properly as bytecode.
+%number 0
+#
+#opcode lvalue argtype flags
+#
+ret none none x
+ldsv PL_bytecode_sv svindex
+ldop PL_op opindex
+stsv PL_bytecode_sv U32 s
+stop PL_op U32 s
+ldspecsv PL_bytecode_sv U8 x
+newsv PL_bytecode_sv U8 x
+newop PL_op U8 x
+newopn PL_op U8 x
+newpv none PV
+pv_cur PL_bytecode_pv.xpv_cur STRLEN
+pv_free PL_bytecode_pv none x
+sv_upgrade PL_bytecode_sv char x
+sv_refcnt SvREFCNT(PL_bytecode_sv) U32
+sv_refcnt_add SvREFCNT(PL_bytecode_sv) I32 x
+sv_flags SvFLAGS(PL_bytecode_sv) U32
+xrv SvRV(PL_bytecode_sv) svindex
+xpv PL_bytecode_sv none x
+xiv32 SvIVX(PL_bytecode_sv) I32
+xiv64 SvIVX(PL_bytecode_sv) IV64
+xnv SvNVX(PL_bytecode_sv) double
+xlv_targoff LvTARGOFF(PL_bytecode_sv) STRLEN
+xlv_targlen LvTARGLEN(PL_bytecode_sv) STRLEN
+xlv_targ LvTARG(PL_bytecode_sv) svindex
+xlv_type LvTYPE(PL_bytecode_sv) char
+xbm_useful BmUSEFUL(PL_bytecode_sv) I32
+xbm_previous BmPREVIOUS(PL_bytecode_sv) U16
+xbm_rare BmRARE(PL_bytecode_sv) U8
+xfm_lines FmLINES(PL_bytecode_sv) I32
+xio_lines IoLINES(PL_bytecode_sv) long
+xio_page IoPAGE(PL_bytecode_sv) long
+xio_page_len IoPAGE_LEN(PL_bytecode_sv) long
+xio_lines_left IoLINES_LEFT(PL_bytecode_sv) long
+xio_top_name IoTOP_NAME(PL_bytecode_sv) pvcontents
+xio_top_gv *(SV**)&IoTOP_GV(PL_bytecode_sv) svindex
+xio_fmt_name IoFMT_NAME(PL_bytecode_sv) pvcontents
+xio_fmt_gv *(SV**)&IoFMT_GV(PL_bytecode_sv) svindex
+xio_bottom_name IoBOTTOM_NAME(PL_bytecode_sv) pvcontents
+xio_bottom_gv *(SV**)&IoBOTTOM_GV(PL_bytecode_sv) svindex
+xio_subprocess IoSUBPROCESS(PL_bytecode_sv) short
+xio_type IoTYPE(PL_bytecode_sv) char
+xio_flags IoFLAGS(PL_bytecode_sv) char
+xcv_stash *(SV**)&CvSTASH(PL_bytecode_sv) svindex
+xcv_start CvSTART(PL_bytecode_sv) opindex
+xcv_root CvROOT(PL_bytecode_sv) opindex
+xcv_gv *(SV**)&CvGV(PL_bytecode_sv) svindex
+xcv_filegv *(SV**)&CvFILEGV(PL_bytecode_sv) svindex
+xcv_depth CvDEPTH(PL_bytecode_sv) long
+xcv_padlist *(SV**)&CvPADLIST(PL_bytecode_sv) svindex
+xcv_outside *(SV**)&CvOUTSIDE(PL_bytecode_sv) svindex
+xcv_flags CvFLAGS(PL_bytecode_sv) U8
+av_extend PL_bytecode_sv SSize_t x
+av_push PL_bytecode_sv svindex x
+xav_fill AvFILLp(PL_bytecode_sv) SSize_t
+xav_max AvMAX(PL_bytecode_sv) SSize_t
+xav_flags AvFLAGS(PL_bytecode_sv) U8
+xhv_riter HvRITER(PL_bytecode_sv) I32
+xhv_name HvNAME(PL_bytecode_sv) pvcontents
+hv_store PL_bytecode_sv svindex x
+sv_magic PL_bytecode_sv char x
+mg_obj SvMAGIC(PL_bytecode_sv)->mg_obj svindex
+mg_private SvMAGIC(PL_bytecode_sv)->mg_private U16
+mg_flags SvMAGIC(PL_bytecode_sv)->mg_flags U8
+mg_pv SvMAGIC(PL_bytecode_sv) pvcontents x
+xmg_stash *(SV**)&SvSTASH(PL_bytecode_sv) svindex
+gv_fetchpv PL_bytecode_sv strconst x
+gv_stashpv PL_bytecode_sv strconst x
+gp_sv GvSV(PL_bytecode_sv) svindex
+gp_refcnt GvREFCNT(PL_bytecode_sv) U32
+gp_refcnt_add GvREFCNT(PL_bytecode_sv) I32 x
+gp_av *(SV**)&GvAV(PL_bytecode_sv) svindex
+gp_hv *(SV**)&GvHV(PL_bytecode_sv) svindex
+gp_cv *(SV**)&GvCV(PL_bytecode_sv) svindex
+gp_filegv *(SV**)&GvFILEGV(PL_bytecode_sv) svindex
+gp_io *(SV**)&GvIOp(PL_bytecode_sv) svindex
+gp_form *(SV**)&GvFORM(PL_bytecode_sv) svindex
+gp_cvgen GvCVGEN(PL_bytecode_sv) U32
+gp_line GvLINE(PL_bytecode_sv) line_t
+gp_share PL_bytecode_sv svindex x
+xgv_flags GvFLAGS(PL_bytecode_sv) U8
+op_next PL_op->op_next opindex
+op_sibling PL_op->op_sibling opindex
+op_ppaddr PL_op->op_ppaddr strconst x
+op_targ PL_op->op_targ PADOFFSET
+op_type PL_op OPCODE x
+op_seq PL_op->op_seq U16
+op_flags PL_op->op_flags U8
+op_private PL_op->op_private U8
+op_first cUNOP->op_first opindex
+op_last cBINOP->op_last opindex
+op_other cLOGOP->op_other opindex
+op_true cCONDOP->op_true opindex
+op_false cCONDOP->op_false opindex
+op_children cLISTOP->op_children U32
+op_pmreplroot cPMOP->op_pmreplroot opindex
+op_pmreplrootgv *(SV**)&cPMOP->op_pmreplroot svindex
+op_pmreplstart cPMOP->op_pmreplstart opindex
+op_pmnext *(OP**)&cPMOP->op_pmnext opindex
+pregcomp PL_op pvcontents x
+op_pmflags cPMOP->op_pmflags U16
+op_pmpermflags cPMOP->op_pmpermflags U16
+op_sv cSVOP->op_sv svindex
+op_gv *(SV**)&cGVOP->op_gv svindex
+op_pv cPVOP->op_pv pvcontents
+op_pv_tr cPVOP->op_pv op_tr_array
+op_redoop cLOOP->op_redoop opindex
+op_nextop cLOOP->op_nextop opindex
+op_lastop cLOOP->op_lastop opindex
+cop_label cCOP->cop_label pvcontents
+cop_stash *(SV**)&cCOP->cop_stash svindex
+cop_filegv *(SV**)&cCOP->cop_filegv svindex
+cop_seq cCOP->cop_seq U32
+cop_arybase cCOP->cop_arybase I32
+cop_line cCOP->cop_line line_t
+main_start PL_main_start opindex
+main_root PL_main_root opindex
+curpad PL_curpad svindex x
diff --git a/gnu/usr.bin/perl/byterun.c b/gnu/usr.bin/perl/byterun.c
new file mode 100644
index 00000000000..34beaf4f4b9
--- /dev/null
+++ b/gnu/usr.bin/perl/byterun.c
@@ -0,0 +1,867 @@
+/*
+ * Copyright (c) 1996-1998 Malcolm Beattie
+ *
+ * You may distribute under the terms of either the GNU General Public
+ * License or the Artistic License, as specified in the README file.
+ *
+ */
+/*
+ * This file is autogenerated from bytecode.pl. Changes made here will be lost.
+ */
+
+#include "EXTERN.h"
+#include "perl.h"
+
+void *
+bset_obj_store(void *obj, I32 ix)
+{
+ if (ix > PL_bytecode_obj_list_fill) {
+ if (PL_bytecode_obj_list_fill == -1)
+ New(666, PL_bytecode_obj_list, ix + 1, void*);
+ else
+ Renew(PL_bytecode_obj_list, ix + 1, void*);
+ PL_bytecode_obj_list_fill = ix;
+ }
+ PL_bytecode_obj_list[ix] = obj;
+ return obj;
+}
+
+#ifdef INDIRECT_BGET_MACROS
+void byterun(struct bytestream bs)
+#else
+void byterun(PerlIO *fp)
+#endif /* INDIRECT_BGET_MACROS */
+{
+ dTHR;
+ int insn;
+ while ((insn = BGET_FGETC()) != EOF) {
+ switch (insn) {
+ case INSN_COMMENT: /* 35 */
+ {
+ comment_t arg;
+ BGET_comment_t(arg);
+ arg = arg;
+ break;
+ }
+ case INSN_NOP: /* 10 */
+ {
+ break;
+ }
+ case INSN_RET: /* 0 */
+ {
+ BSET_ret(none);
+ break;
+ }
+ case INSN_LDSV: /* 1 */
+ {
+ svindex arg;
+ BGET_svindex(arg);
+ PL_bytecode_sv = arg;
+ break;
+ }
+ case INSN_LDOP: /* 2 */
+ {
+ opindex arg;
+ BGET_opindex(arg);
+ PL_op = arg;
+ break;
+ }
+ case INSN_STSV: /* 3 */
+ {
+ U32 arg;
+ BGET_U32(arg);
+ BSET_OBJ_STORE(PL_bytecode_sv, arg);
+ break;
+ }
+ case INSN_STOP: /* 4 */
+ {
+ U32 arg;
+ BGET_U32(arg);
+ BSET_OBJ_STORE(PL_op, arg);
+ break;
+ }
+ case INSN_LDSPECSV: /* 5 */
+ {
+ U8 arg;
+ BGET_U8(arg);
+ BSET_ldspecsv(PL_bytecode_sv, arg);
+ break;
+ }
+ case INSN_NEWSV: /* 6 */
+ {
+ U8 arg;
+ BGET_U8(arg);
+ BSET_newsv(PL_bytecode_sv, arg);
+ break;
+ }
+ case INSN_NEWOP: /* 7 */
+ {
+ U8 arg;
+ BGET_U8(arg);
+ BSET_newop(PL_op, arg);
+ break;
+ }
+ case INSN_NEWOPN: /* 8 */
+ {
+ U8 arg;
+ BGET_U8(arg);
+ BSET_newopn(PL_op, arg);
+ break;
+ }
+ case INSN_NEWPV: /* 9 */
+ {
+ PV arg;
+ BGET_PV(arg);
+ break;
+ }
+ case INSN_PV_CUR: /* 11 */
+ {
+ STRLEN arg;
+ BGET_U32(arg);
+ PL_bytecode_pv.xpv_cur = arg;
+ break;
+ }
+ case INSN_PV_FREE: /* 12 */
+ {
+ BSET_pv_free(PL_bytecode_pv);
+ break;
+ }
+ case INSN_SV_UPGRADE: /* 13 */
+ {
+ char arg;
+ BGET_U8(arg);
+ BSET_sv_upgrade(PL_bytecode_sv, arg);
+ break;
+ }
+ case INSN_SV_REFCNT: /* 14 */
+ {
+ U32 arg;
+ BGET_U32(arg);
+ SvREFCNT(PL_bytecode_sv) = arg;
+ break;
+ }
+ case INSN_SV_REFCNT_ADD: /* 15 */
+ {
+ I32 arg;
+ BGET_I32(arg);
+ BSET_sv_refcnt_add(SvREFCNT(PL_bytecode_sv), arg);
+ break;
+ }
+ case INSN_SV_FLAGS: /* 16 */
+ {
+ U32 arg;
+ BGET_U32(arg);
+ SvFLAGS(PL_bytecode_sv) = arg;
+ break;
+ }
+ case INSN_XRV: /* 17 */
+ {
+ svindex arg;
+ BGET_svindex(arg);
+ SvRV(PL_bytecode_sv) = arg;
+ break;
+ }
+ case INSN_XPV: /* 18 */
+ {
+ BSET_xpv(PL_bytecode_sv);
+ break;
+ }
+ case INSN_XIV32: /* 19 */
+ {
+ I32 arg;
+ BGET_I32(arg);
+ SvIVX(PL_bytecode_sv) = arg;
+ break;
+ }
+ case INSN_XIV64: /* 20 */
+ {
+ IV64 arg;
+ BGET_IV64(arg);
+ SvIVX(PL_bytecode_sv) = arg;
+ break;
+ }
+ case INSN_XNV: /* 21 */
+ {
+ double arg;
+ BGET_double(arg);
+ SvNVX(PL_bytecode_sv) = arg;
+ break;
+ }
+ case INSN_XLV_TARGOFF: /* 22 */
+ {
+ STRLEN arg;
+ BGET_U32(arg);
+ LvTARGOFF(PL_bytecode_sv) = arg;
+ break;
+ }
+ case INSN_XLV_TARGLEN: /* 23 */
+ {
+ STRLEN arg;
+ BGET_U32(arg);
+ LvTARGLEN(PL_bytecode_sv) = arg;
+ break;
+ }
+ case INSN_XLV_TARG: /* 24 */
+ {
+ svindex arg;
+ BGET_svindex(arg);
+ LvTARG(PL_bytecode_sv) = arg;
+ break;
+ }
+ case INSN_XLV_TYPE: /* 25 */
+ {
+ char arg;
+ BGET_U8(arg);
+ LvTYPE(PL_bytecode_sv) = arg;
+ break;
+ }
+ case INSN_XBM_USEFUL: /* 26 */
+ {
+ I32 arg;
+ BGET_I32(arg);
+ BmUSEFUL(PL_bytecode_sv) = arg;
+ break;
+ }
+ case INSN_XBM_PREVIOUS: /* 27 */
+ {
+ U16 arg;
+ BGET_U16(arg);
+ BmPREVIOUS(PL_bytecode_sv) = arg;
+ break;
+ }
+ case INSN_XBM_RARE: /* 28 */
+ {
+ U8 arg;
+ BGET_U8(arg);
+ BmRARE(PL_bytecode_sv) = arg;
+ break;
+ }
+ case INSN_XFM_LINES: /* 29 */
+ {
+ I32 arg;
+ BGET_I32(arg);
+ FmLINES(PL_bytecode_sv) = arg;
+ break;
+ }
+ case INSN_XIO_LINES: /* 30 */
+ {
+ long arg;
+ BGET_I32(arg);
+ IoLINES(PL_bytecode_sv) = arg;
+ break;
+ }
+ case INSN_XIO_PAGE: /* 31 */
+ {
+ long arg;
+ BGET_I32(arg);
+ IoPAGE(PL_bytecode_sv) = arg;
+ break;
+ }
+ case INSN_XIO_PAGE_LEN: /* 32 */
+ {
+ long arg;
+ BGET_I32(arg);
+ IoPAGE_LEN(PL_bytecode_sv) = arg;
+ break;
+ }
+ case INSN_XIO_LINES_LEFT: /* 33 */
+ {
+ long arg;
+ BGET_I32(arg);
+ IoLINES_LEFT(PL_bytecode_sv) = arg;
+ break;
+ }
+ case INSN_XIO_TOP_NAME: /* 34 */
+ {
+ pvcontents arg;
+ BGET_pvcontents(arg);
+ IoTOP_NAME(PL_bytecode_sv) = arg;
+ break;
+ }
+ case INSN_XIO_TOP_GV: /* 36 */
+ {
+ svindex arg;
+ BGET_svindex(arg);
+ *(SV**)&IoTOP_GV(PL_bytecode_sv) = arg;
+ break;
+ }
+ case INSN_XIO_FMT_NAME: /* 37 */
+ {
+ pvcontents arg;
+ BGET_pvcontents(arg);
+ IoFMT_NAME(PL_bytecode_sv) = arg;
+ break;
+ }
+ case INSN_XIO_FMT_GV: /* 38 */
+ {
+ svindex arg;
+ BGET_svindex(arg);
+ *(SV**)&IoFMT_GV(PL_bytecode_sv) = arg;
+ break;
+ }
+ case INSN_XIO_BOTTOM_NAME: /* 39 */
+ {
+ pvcontents arg;
+ BGET_pvcontents(arg);
+ IoBOTTOM_NAME(PL_bytecode_sv) = arg;
+ break;
+ }
+ case INSN_XIO_BOTTOM_GV: /* 40 */
+ {
+ svindex arg;
+ BGET_svindex(arg);
+ *(SV**)&IoBOTTOM_GV(PL_bytecode_sv) = arg;
+ break;
+ }
+ case INSN_XIO_SUBPROCESS: /* 41 */
+ {
+ short arg;
+ BGET_U16(arg);
+ IoSUBPROCESS(PL_bytecode_sv) = arg;
+ break;
+ }
+ case INSN_XIO_TYPE: /* 42 */
+ {
+ char arg;
+ BGET_U8(arg);
+ IoTYPE(PL_bytecode_sv) = arg;
+ break;
+ }
+ case INSN_XIO_FLAGS: /* 43 */
+ {
+ char arg;
+ BGET_U8(arg);
+ IoFLAGS(PL_bytecode_sv) = arg;
+ break;
+ }
+ case INSN_XCV_STASH: /* 44 */
+ {
+ svindex arg;
+ BGET_svindex(arg);
+ *(SV**)&CvSTASH(PL_bytecode_sv) = arg;
+ break;
+ }
+ case INSN_XCV_START: /* 45 */
+ {
+ opindex arg;
+ BGET_opindex(arg);
+ CvSTART(PL_bytecode_sv) = arg;
+ break;
+ }
+ case INSN_XCV_ROOT: /* 46 */
+ {
+ opindex arg;
+ BGET_opindex(arg);
+ CvROOT(PL_bytecode_sv) = arg;
+ break;
+ }
+ case INSN_XCV_GV: /* 47 */
+ {
+ svindex arg;
+ BGET_svindex(arg);
+ *(SV**)&CvGV(PL_bytecode_sv) = arg;
+ break;
+ }
+ case INSN_XCV_FILEGV: /* 48 */
+ {
+ svindex arg;
+ BGET_svindex(arg);
+ *(SV**)&CvFILEGV(PL_bytecode_sv) = arg;
+ break;
+ }
+ case INSN_XCV_DEPTH: /* 49 */
+ {
+ long arg;
+ BGET_I32(arg);
+ CvDEPTH(PL_bytecode_sv) = arg;
+ break;
+ }
+ case INSN_XCV_PADLIST: /* 50 */
+ {
+ svindex arg;
+ BGET_svindex(arg);
+ *(SV**)&CvPADLIST(PL_bytecode_sv) = arg;
+ break;
+ }
+ case INSN_XCV_OUTSIDE: /* 51 */
+ {
+ svindex arg;
+ BGET_svindex(arg);
+ *(SV**)&CvOUTSIDE(PL_bytecode_sv) = arg;
+ break;
+ }
+ case INSN_XCV_FLAGS: /* 52 */
+ {
+ U8 arg;
+ BGET_U8(arg);
+ CvFLAGS(PL_bytecode_sv) = arg;
+ break;
+ }
+ case INSN_AV_EXTEND: /* 53 */
+ {
+ SSize_t arg;
+ BGET_I32(arg);
+ BSET_av_extend(PL_bytecode_sv, arg);
+ break;
+ }
+ case INSN_AV_PUSH: /* 54 */
+ {
+ svindex arg;
+ BGET_svindex(arg);
+ BSET_av_push(PL_bytecode_sv, arg);
+ break;
+ }
+ case INSN_XAV_FILL: /* 55 */
+ {
+ SSize_t arg;
+ BGET_I32(arg);
+ AvFILLp(PL_bytecode_sv) = arg;
+ break;
+ }
+ case INSN_XAV_MAX: /* 56 */
+ {
+ SSize_t arg;
+ BGET_I32(arg);
+ AvMAX(PL_bytecode_sv) = arg;
+ break;
+ }
+ case INSN_XAV_FLAGS: /* 57 */
+ {
+ U8 arg;
+ BGET_U8(arg);
+ AvFLAGS(PL_bytecode_sv) = arg;
+ break;
+ }
+ case INSN_XHV_RITER: /* 58 */
+ {
+ I32 arg;
+ BGET_I32(arg);
+ HvRITER(PL_bytecode_sv) = arg;
+ break;
+ }
+ case INSN_XHV_NAME: /* 59 */
+ {
+ pvcontents arg;
+ BGET_pvcontents(arg);
+ HvNAME(PL_bytecode_sv) = arg;
+ break;
+ }
+ case INSN_HV_STORE: /* 60 */
+ {
+ svindex arg;
+ BGET_svindex(arg);
+ BSET_hv_store(PL_bytecode_sv, arg);
+ break;
+ }
+ case INSN_SV_MAGIC: /* 61 */
+ {
+ char arg;
+ BGET_U8(arg);
+ BSET_sv_magic(PL_bytecode_sv, arg);
+ break;
+ }
+ case INSN_MG_OBJ: /* 62 */
+ {
+ svindex arg;
+ BGET_svindex(arg);
+ SvMAGIC(PL_bytecode_sv)->mg_obj = arg;
+ break;
+ }
+ case INSN_MG_PRIVATE: /* 63 */
+ {
+ U16 arg;
+ BGET_U16(arg);
+ SvMAGIC(PL_bytecode_sv)->mg_private = arg;
+ break;
+ }
+ case INSN_MG_FLAGS: /* 64 */
+ {
+ U8 arg;
+ BGET_U8(arg);
+ SvMAGIC(PL_bytecode_sv)->mg_flags = arg;
+ break;
+ }
+ case INSN_MG_PV: /* 65 */
+ {
+ pvcontents arg;
+ BGET_pvcontents(arg);
+ BSET_mg_pv(SvMAGIC(PL_bytecode_sv), arg);
+ break;
+ }
+ case INSN_XMG_STASH: /* 66 */
+ {
+ svindex arg;
+ BGET_svindex(arg);
+ *(SV**)&SvSTASH(PL_bytecode_sv) = arg;
+ break;
+ }
+ case INSN_GV_FETCHPV: /* 67 */
+ {
+ strconst arg;
+ BGET_strconst(arg);
+ BSET_gv_fetchpv(PL_bytecode_sv, arg);
+ break;
+ }
+ case INSN_GV_STASHPV: /* 68 */
+ {
+ strconst arg;
+ BGET_strconst(arg);
+ BSET_gv_stashpv(PL_bytecode_sv, arg);
+ break;
+ }
+ case INSN_GP_SV: /* 69 */
+ {
+ svindex arg;
+ BGET_svindex(arg);
+ GvSV(PL_bytecode_sv) = arg;
+ break;
+ }
+ case INSN_GP_REFCNT: /* 70 */
+ {
+ U32 arg;
+ BGET_U32(arg);
+ GvREFCNT(PL_bytecode_sv) = arg;
+ break;
+ }
+ case INSN_GP_REFCNT_ADD: /* 71 */
+ {
+ I32 arg;
+ BGET_I32(arg);
+ BSET_gp_refcnt_add(GvREFCNT(PL_bytecode_sv), arg);
+ break;
+ }
+ case INSN_GP_AV: /* 72 */
+ {
+ svindex arg;
+ BGET_svindex(arg);
+ *(SV**)&GvAV(PL_bytecode_sv) = arg;
+ break;
+ }
+ case INSN_GP_HV: /* 73 */
+ {
+ svindex arg;
+ BGET_svindex(arg);
+ *(SV**)&GvHV(PL_bytecode_sv) = arg;
+ break;
+ }
+ case INSN_GP_CV: /* 74 */
+ {
+ svindex arg;
+ BGET_svindex(arg);
+ *(SV**)&GvCV(PL_bytecode_sv) = arg;
+ break;
+ }
+ case INSN_GP_FILEGV: /* 75 */
+ {
+ svindex arg;
+ BGET_svindex(arg);
+ *(SV**)&GvFILEGV(PL_bytecode_sv) = arg;
+ break;
+ }
+ case INSN_GP_IO: /* 76 */
+ {
+ svindex arg;
+ BGET_svindex(arg);
+ *(SV**)&GvIOp(PL_bytecode_sv) = arg;
+ break;
+ }
+ case INSN_GP_FORM: /* 77 */
+ {
+ svindex arg;
+ BGET_svindex(arg);
+ *(SV**)&GvFORM(PL_bytecode_sv) = arg;
+ break;
+ }
+ case INSN_GP_CVGEN: /* 78 */
+ {
+ U32 arg;
+ BGET_U32(arg);
+ GvCVGEN(PL_bytecode_sv) = arg;
+ break;
+ }
+ case INSN_GP_LINE: /* 79 */
+ {
+ line_t arg;
+ BGET_U16(arg);
+ GvLINE(PL_bytecode_sv) = arg;
+ break;
+ }
+ case INSN_GP_SHARE: /* 80 */
+ {
+ svindex arg;
+ BGET_svindex(arg);
+ BSET_gp_share(PL_bytecode_sv, arg);
+ break;
+ }
+ case INSN_XGV_FLAGS: /* 81 */
+ {
+ U8 arg;
+ BGET_U8(arg);
+ GvFLAGS(PL_bytecode_sv) = arg;
+ break;
+ }
+ case INSN_OP_NEXT: /* 82 */
+ {
+ opindex arg;
+ BGET_opindex(arg);
+ PL_op->op_next = arg;
+ break;
+ }
+ case INSN_OP_SIBLING: /* 83 */
+ {
+ opindex arg;
+ BGET_opindex(arg);
+ PL_op->op_sibling = arg;
+ break;
+ }
+ case INSN_OP_PPADDR: /* 84 */
+ {
+ strconst arg;
+ BGET_strconst(arg);
+ BSET_op_ppaddr(PL_op->op_ppaddr, arg);
+ break;
+ }
+ case INSN_OP_TARG: /* 85 */
+ {
+ PADOFFSET arg;
+ BGET_U32(arg);
+ PL_op->op_targ = arg;
+ break;
+ }
+ case INSN_OP_TYPE: /* 86 */
+ {
+ OPCODE arg;
+ BGET_U16(arg);
+ BSET_op_type(PL_op, arg);
+ break;
+ }
+ case INSN_OP_SEQ: /* 87 */
+ {
+ U16 arg;
+ BGET_U16(arg);
+ PL_op->op_seq = arg;
+ break;
+ }
+ case INSN_OP_FLAGS: /* 88 */
+ {
+ U8 arg;
+ BGET_U8(arg);
+ PL_op->op_flags = arg;
+ break;
+ }
+ case INSN_OP_PRIVATE: /* 89 */
+ {
+ U8 arg;
+ BGET_U8(arg);
+ PL_op->op_private = arg;
+ break;
+ }
+ case INSN_OP_FIRST: /* 90 */
+ {
+ opindex arg;
+ BGET_opindex(arg);
+ cUNOP->op_first = arg;
+ break;
+ }
+ case INSN_OP_LAST: /* 91 */
+ {
+ opindex arg;
+ BGET_opindex(arg);
+ cBINOP->op_last = arg;
+ break;
+ }
+ case INSN_OP_OTHER: /* 92 */
+ {
+ opindex arg;
+ BGET_opindex(arg);
+ cLOGOP->op_other = arg;
+ break;
+ }
+ case INSN_OP_TRUE: /* 93 */
+ {
+ opindex arg;
+ BGET_opindex(arg);
+ cCONDOP->op_true = arg;
+ break;
+ }
+ case INSN_OP_FALSE: /* 94 */
+ {
+ opindex arg;
+ BGET_opindex(arg);
+ cCONDOP->op_false = arg;
+ break;
+ }
+ case INSN_OP_CHILDREN: /* 95 */
+ {
+ U32 arg;
+ BGET_U32(arg);
+ cLISTOP->op_children = arg;
+ break;
+ }
+ case INSN_OP_PMREPLROOT: /* 96 */
+ {
+ opindex arg;
+ BGET_opindex(arg);
+ cPMOP->op_pmreplroot = arg;
+ break;
+ }
+ case INSN_OP_PMREPLROOTGV: /* 97 */
+ {
+ svindex arg;
+ BGET_svindex(arg);
+ *(SV**)&cPMOP->op_pmreplroot = arg;
+ break;
+ }
+ case INSN_OP_PMREPLSTART: /* 98 */
+ {
+ opindex arg;
+ BGET_opindex(arg);
+ cPMOP->op_pmreplstart = arg;
+ break;
+ }
+ case INSN_OP_PMNEXT: /* 99 */
+ {
+ opindex arg;
+ BGET_opindex(arg);
+ *(OP**)&cPMOP->op_pmnext = arg;
+ break;
+ }
+ case INSN_PREGCOMP: /* 100 */
+ {
+ pvcontents arg;
+ BGET_pvcontents(arg);
+ BSET_pregcomp(PL_op, arg);
+ break;
+ }
+ case INSN_OP_PMFLAGS: /* 101 */
+ {
+ U16 arg;
+ BGET_U16(arg);
+ cPMOP->op_pmflags = arg;
+ break;
+ }
+ case INSN_OP_PMPERMFLAGS: /* 102 */
+ {
+ U16 arg;
+ BGET_U16(arg);
+ cPMOP->op_pmpermflags = arg;
+ break;
+ }
+ case INSN_OP_SV: /* 103 */
+ {
+ svindex arg;
+ BGET_svindex(arg);
+ cSVOP->op_sv = arg;
+ break;
+ }
+ case INSN_OP_GV: /* 104 */
+ {
+ svindex arg;
+ BGET_svindex(arg);
+ *(SV**)&cGVOP->op_gv = arg;
+ break;
+ }
+ case INSN_OP_PV: /* 105 */
+ {
+ pvcontents arg;
+ BGET_pvcontents(arg);
+ cPVOP->op_pv = arg;
+ break;
+ }
+ case INSN_OP_PV_TR: /* 106 */
+ {
+ op_tr_array arg;
+ BGET_op_tr_array(arg);
+ cPVOP->op_pv = arg;
+ break;
+ }
+ case INSN_OP_REDOOP: /* 107 */
+ {
+ opindex arg;
+ BGET_opindex(arg);
+ cLOOP->op_redoop = arg;
+ break;
+ }
+ case INSN_OP_NEXTOP: /* 108 */
+ {
+ opindex arg;
+ BGET_opindex(arg);
+ cLOOP->op_nextop = arg;
+ break;
+ }
+ case INSN_OP_LASTOP: /* 109 */
+ {
+ opindex arg;
+ BGET_opindex(arg);
+ cLOOP->op_lastop = arg;
+ break;
+ }
+ case INSN_COP_LABEL: /* 110 */
+ {
+ pvcontents arg;
+ BGET_pvcontents(arg);
+ cCOP->cop_label = arg;
+ break;
+ }
+ case INSN_COP_STASH: /* 111 */
+ {
+ svindex arg;
+ BGET_svindex(arg);
+ *(SV**)&cCOP->cop_stash = arg;
+ break;
+ }
+ case INSN_COP_FILEGV: /* 112 */
+ {
+ svindex arg;
+ BGET_svindex(arg);
+ *(SV**)&cCOP->cop_filegv = arg;
+ break;
+ }
+ case INSN_COP_SEQ: /* 113 */
+ {
+ U32 arg;
+ BGET_U32(arg);
+ cCOP->cop_seq = arg;
+ break;
+ }
+ case INSN_COP_ARYBASE: /* 114 */
+ {
+ I32 arg;
+ BGET_I32(arg);
+ cCOP->cop_arybase = arg;
+ break;
+ }
+ case INSN_COP_LINE: /* 115 */
+ {
+ line_t arg;
+ BGET_U16(arg);
+ cCOP->cop_line = arg;
+ break;
+ }
+ case INSN_MAIN_START: /* 116 */
+ {
+ opindex arg;
+ BGET_opindex(arg);
+ PL_main_start = arg;
+ break;
+ }
+ case INSN_MAIN_ROOT: /* 117 */
+ {
+ opindex arg;
+ BGET_opindex(arg);
+ PL_main_root = arg;
+ break;
+ }
+ case INSN_CURPAD: /* 118 */
+ {
+ svindex arg;
+ BGET_svindex(arg);
+ BSET_curpad(PL_curpad, arg);
+ break;
+ }
+ default:
+ croak("Illegal bytecode instruction %d\n", insn);
+ /* NOTREACHED */
+ }
+ }
+}
diff --git a/gnu/usr.bin/perl/byterun.h b/gnu/usr.bin/perl/byterun.h
new file mode 100644
index 00000000000..bd54c76e763
--- /dev/null
+++ b/gnu/usr.bin/perl/byterun.h
@@ -0,0 +1,184 @@
+/*
+ * Copyright (c) 1996-1998 Malcolm Beattie
+ *
+ * You may distribute under the terms of either the GNU General Public
+ * License or the Artistic License, as specified in the README file.
+ *
+ */
+/*
+ * This file is autogenerated from bytecode.pl. Changes made here will be lost.
+ */
+#ifdef INDIRECT_BGET_MACROS
+struct bytestream {
+ void *data;
+ int (*fgetc)(void *);
+ int (*fread)(char *, size_t, size_t, void*);
+ void (*freadpv)(U32, void*);
+};
+#endif /* INDIRECT_BGET_MACROS */
+
+void *bset_obj_store _((void *, I32));
+
+enum {
+ INSN_RET, /* 0 */
+ INSN_LDSV, /* 1 */
+ INSN_LDOP, /* 2 */
+ INSN_STSV, /* 3 */
+ INSN_STOP, /* 4 */
+ INSN_LDSPECSV, /* 5 */
+ INSN_NEWSV, /* 6 */
+ INSN_NEWOP, /* 7 */
+ INSN_NEWOPN, /* 8 */
+ INSN_NEWPV, /* 9 */
+ INSN_NOP, /* 10 */
+ INSN_PV_CUR, /* 11 */
+ INSN_PV_FREE, /* 12 */
+ INSN_SV_UPGRADE, /* 13 */
+ INSN_SV_REFCNT, /* 14 */
+ INSN_SV_REFCNT_ADD, /* 15 */
+ INSN_SV_FLAGS, /* 16 */
+ INSN_XRV, /* 17 */
+ INSN_XPV, /* 18 */
+ INSN_XIV32, /* 19 */
+ INSN_XIV64, /* 20 */
+ INSN_XNV, /* 21 */
+ INSN_XLV_TARGOFF, /* 22 */
+ INSN_XLV_TARGLEN, /* 23 */
+ INSN_XLV_TARG, /* 24 */
+ INSN_XLV_TYPE, /* 25 */
+ INSN_XBM_USEFUL, /* 26 */
+ INSN_XBM_PREVIOUS, /* 27 */
+ INSN_XBM_RARE, /* 28 */
+ INSN_XFM_LINES, /* 29 */
+ INSN_XIO_LINES, /* 30 */
+ INSN_XIO_PAGE, /* 31 */
+ INSN_XIO_PAGE_LEN, /* 32 */
+ INSN_XIO_LINES_LEFT, /* 33 */
+ INSN_XIO_TOP_NAME, /* 34 */
+ INSN_COMMENT, /* 35 */
+ INSN_XIO_TOP_GV, /* 36 */
+ INSN_XIO_FMT_NAME, /* 37 */
+ INSN_XIO_FMT_GV, /* 38 */
+ INSN_XIO_BOTTOM_NAME, /* 39 */
+ INSN_XIO_BOTTOM_GV, /* 40 */
+ INSN_XIO_SUBPROCESS, /* 41 */
+ INSN_XIO_TYPE, /* 42 */
+ INSN_XIO_FLAGS, /* 43 */
+ INSN_XCV_STASH, /* 44 */
+ INSN_XCV_START, /* 45 */
+ INSN_XCV_ROOT, /* 46 */
+ INSN_XCV_GV, /* 47 */
+ INSN_XCV_FILEGV, /* 48 */
+ INSN_XCV_DEPTH, /* 49 */
+ INSN_XCV_PADLIST, /* 50 */
+ INSN_XCV_OUTSIDE, /* 51 */
+ INSN_XCV_FLAGS, /* 52 */
+ INSN_AV_EXTEND, /* 53 */
+ INSN_AV_PUSH, /* 54 */
+ INSN_XAV_FILL, /* 55 */
+ INSN_XAV_MAX, /* 56 */
+ INSN_XAV_FLAGS, /* 57 */
+ INSN_XHV_RITER, /* 58 */
+ INSN_XHV_NAME, /* 59 */
+ INSN_HV_STORE, /* 60 */
+ INSN_SV_MAGIC, /* 61 */
+ INSN_MG_OBJ, /* 62 */
+ INSN_MG_PRIVATE, /* 63 */
+ INSN_MG_FLAGS, /* 64 */
+ INSN_MG_PV, /* 65 */
+ INSN_XMG_STASH, /* 66 */
+ INSN_GV_FETCHPV, /* 67 */
+ INSN_GV_STASHPV, /* 68 */
+ INSN_GP_SV, /* 69 */
+ INSN_GP_REFCNT, /* 70 */
+ INSN_GP_REFCNT_ADD, /* 71 */
+ INSN_GP_AV, /* 72 */
+ INSN_GP_HV, /* 73 */
+ INSN_GP_CV, /* 74 */
+ INSN_GP_FILEGV, /* 75 */
+ INSN_GP_IO, /* 76 */
+ INSN_GP_FORM, /* 77 */
+ INSN_GP_CVGEN, /* 78 */
+ INSN_GP_LINE, /* 79 */
+ INSN_GP_SHARE, /* 80 */
+ INSN_XGV_FLAGS, /* 81 */
+ INSN_OP_NEXT, /* 82 */
+ INSN_OP_SIBLING, /* 83 */
+ INSN_OP_PPADDR, /* 84 */
+ INSN_OP_TARG, /* 85 */
+ INSN_OP_TYPE, /* 86 */
+ INSN_OP_SEQ, /* 87 */
+ INSN_OP_FLAGS, /* 88 */
+ INSN_OP_PRIVATE, /* 89 */
+ INSN_OP_FIRST, /* 90 */
+ INSN_OP_LAST, /* 91 */
+ INSN_OP_OTHER, /* 92 */
+ INSN_OP_TRUE, /* 93 */
+ INSN_OP_FALSE, /* 94 */
+ INSN_OP_CHILDREN, /* 95 */
+ INSN_OP_PMREPLROOT, /* 96 */
+ INSN_OP_PMREPLROOTGV, /* 97 */
+ INSN_OP_PMREPLSTART, /* 98 */
+ INSN_OP_PMNEXT, /* 99 */
+ INSN_PREGCOMP, /* 100 */
+ INSN_OP_PMFLAGS, /* 101 */
+ INSN_OP_PMPERMFLAGS, /* 102 */
+ INSN_OP_SV, /* 103 */
+ INSN_OP_GV, /* 104 */
+ INSN_OP_PV, /* 105 */
+ INSN_OP_PV_TR, /* 106 */
+ INSN_OP_REDOOP, /* 107 */
+ INSN_OP_NEXTOP, /* 108 */
+ INSN_OP_LASTOP, /* 109 */
+ INSN_COP_LABEL, /* 110 */
+ INSN_COP_STASH, /* 111 */
+ INSN_COP_FILEGV, /* 112 */
+ INSN_COP_SEQ, /* 113 */
+ INSN_COP_ARYBASE, /* 114 */
+ INSN_COP_LINE, /* 115 */
+ INSN_MAIN_START, /* 116 */
+ INSN_MAIN_ROOT, /* 117 */
+ INSN_CURPAD, /* 118 */
+ MAX_INSN = 118
+};
+
+enum {
+ OPt_OP, /* 0 */
+ OPt_UNOP, /* 1 */
+ OPt_BINOP, /* 2 */
+ OPt_LOGOP, /* 3 */
+ OPt_CONDOP, /* 4 */
+ OPt_LISTOP, /* 5 */
+ OPt_PMOP, /* 6 */
+ OPt_SVOP, /* 7 */
+ OPt_GVOP, /* 8 */
+ OPt_PVOP, /* 9 */
+ OPt_LOOP, /* 10 */
+ OPt_COP /* 11 */
+};
+
+EXT int optype_size[]
+#ifdef DOINIT
+= {
+ sizeof(OP),
+ sizeof(UNOP),
+ sizeof(BINOP),
+ sizeof(LOGOP),
+ sizeof(CONDOP),
+ sizeof(LISTOP),
+ sizeof(PMOP),
+ sizeof(SVOP),
+ sizeof(GVOP),
+ sizeof(PVOP),
+ sizeof(LOOP),
+ sizeof(COP)
+}
+#endif /* DOINIT */
+;
+
+#define INIT_SPECIALSV_LIST STMT_START { \
+ PL_specialsv_list[0] = Nullsv; \
+ PL_specialsv_list[1] = &PL_sv_undef; \
+ PL_specialsv_list[2] = &PL_sv_yes; \
+ PL_specialsv_list[3] = &PL_sv_no; \
+ } STMT_END
diff --git a/gnu/usr.bin/perl/cc_runtime.h b/gnu/usr.bin/perl/cc_runtime.h
new file mode 100644
index 00000000000..9a01ff83359
--- /dev/null
+++ b/gnu/usr.bin/perl/cc_runtime.h
@@ -0,0 +1,71 @@
+#define DOOP(ppname) PUTBACK; PL_op = ppname(ARGS); SPAGAIN
+
+#define PP_LIST(g) do { \
+ dMARK; \
+ if (g != G_ARRAY) { \
+ if (++MARK <= SP) \
+ *MARK = *SP; \
+ else \
+ *MARK = &PL_sv_undef; \
+ SP = MARK; \
+ } \
+ } while (0)
+
+#define MAYBE_TAINT_SASSIGN_SRC(sv) \
+ if (PL_tainting && PL_tainted && (!SvGMAGICAL(left) || !SvSMAGICAL(left) || \
+ !((mg=mg_find(left, 't')) && mg->mg_len & 1)))\
+ TAINT_NOT
+
+#define PP_PREINC(sv) do { \
+ if (SvIOK(sv)) { \
+ ++SvIVX(sv); \
+ SvFLAGS(sv) &= ~(SVf_NOK|SVf_POK|SVp_NOK|SVp_POK); \
+ } \
+ else \
+ sv_inc(sv); \
+ SvSETMAGIC(sv); \
+ } while (0)
+
+#define PP_UNSTACK do { \
+ TAINT_NOT; \
+ PL_stack_sp = PL_stack_base + cxstack[cxstack_ix].blk_oldsp; \
+ FREETMPS; \
+ oldsave = PL_scopestack[PL_scopestack_ix - 1]; \
+ LEAVE_SCOPE(oldsave); \
+ SPAGAIN; \
+ } while(0)
+
+/* Anyone using eval "" deserves this mess */
+#define PP_EVAL(ppaddr, nxt) do { \
+ dJMPENV; \
+ int ret; \
+ PUTBACK; \
+ JMPENV_PUSH(ret); \
+ switch (ret) { \
+ case 0: \
+ PL_op = ppaddr(ARGS); \
+ PL_retstack[PL_retstack_ix - 1] = Nullop; \
+ if (PL_op != nxt) CALLRUNOPS(); \
+ JMPENV_POP; \
+ break; \
+ case 1: JMPENV_POP; JMPENV_JUMP(1); \
+ case 2: JMPENV_POP; JMPENV_JUMP(2); \
+ case 3: \
+ JMPENV_POP; \
+ if (PL_restartop != nxt) \
+ JMPENV_JUMP(3); \
+ } \
+ PL_op = nxt; \
+ SPAGAIN; \
+ } while (0)
+
+#define PP_ENTERTRY(jmpbuf,label) do { \
+ dJMPENV; \
+ int ret; \
+ JMPENV_PUSH(ret); \
+ switch (ret) { \
+ case 1: JMPENV_POP; JMPENV_JUMP(1); \
+ case 2: JMPENV_POP; JMPENV_JUMP(2); \
+ case 3: JMPENV_POP; SPAGAIN; goto label;\
+ } \
+ } while (0)
diff --git a/gnu/usr.bin/perl/configure.com b/gnu/usr.bin/perl/configure.com
new file mode 100644
index 00000000000..d51793abe80
--- /dev/null
+++ b/gnu/usr.bin/perl/configure.com
@@ -0,0 +1,2033 @@
+$ sav_ver = 'F$VERIFY(0)'
+$! SET VERIFY
+$!
+$! For example, if you unpacked perl into: [USER.PERL5_00n...] then you will
+$! want to cd into the tree and execute Configure:
+$!
+$! $ SET DEFAULT [USER.PERL5_00n]
+$! $ @Configure
+$!
+$! or
+$!
+$! $ SET DEFAULT [USER.PERL5_00n]
+$! $ @Configure "-des"
+$!
+$! That's it. If you get into a bind trying to build perl on VMS then
+$! definitely read through the README.VMS file.
+$! Beyond that send email to VMSPerl@cor.newman.upenn.edu
+$!
+$! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+$!
+$! send suggestions to:
+$! Dan Sugalski <sugalskd@ous.edu>
+$! Thank you!!!!
+$!
+$! Adapted and converted from Larry Wall & Andy Dougherty's
+$! "Configure generated by metaconfig 3.0 PL60." by Peter Prymmer
+$! (a Bourne sh[ell] script for configuring the installation of perl on VMS)
+$! in the perl5.002|3 epoch (spring/summer 1996)
+$! with much valuable help from Charles Bailey &
+$! the whole VMSPerl crew.
+$! Extended and messed about with by Dan Sugalski
+$!
+$! SET NOVERIFY
+$ sav_ver = F$VERIFY(sav_ver)
+$!
+$! VMS-isms we will need:
+$ echo = "write sys$output "
+$ cat = "type"
+$ gcc_symbol = "gcc"
+$ ans = ""
+$ macros = ""
+$ use_debugging_perl = "Y"
+$ C_Compiler_Replace = "CC="
+$ Thread_Live_Dangerously = "MT="
+$ use_two_pot_malloc = "N"
+$ use_pack_malloc = "N"
+$ use_debugmalloc = "N"
+$ preload_env = "N"
+$ vms_default_directory_name = F$ENVIRONMENT("DEFAULT")
+$! max_allowed_dir_depth = 3 ! e.g. [A.B.PERL5_00n] not [A.B.C.PERL5_00n]
+$ max_allowed_dir_depth = 2 ! e.g. [FOO.PERL5_00n] not [FOO.BAR.PERL5_00n]
+$!
+$ vms_filcnt = F$GETJPI ("","FILCNT")
+$!
+$!: compute my invocation name
+$ me = F$ENVIRONMENT("PROCEDURE")
+$!
+$! Many null statements (begin with colon ':') in the Bourne shell version of
+$! this script serve as comments/placeholders. I have retained some of the ones
+$! that will help you compare this .COM file to the sh version - as well as
+$! leave placeholders for future improvements to this .COM file.
+$! sfn = VMS "skipped for now"
+$!
+$!: Proper PATH separator !sfn
+$!: Proper PATH setting !sfn
+$!: Sanity checks !sfn "Say '@''$me''"
+$!: On HP-UX, large Configure scripts may exercise a bug in /bin/sh !sfn
+$!: Configure runs within the UU subdirectory !->after find MANIFEST
+$! <big long list of default values (mostly null)>
+$!: We must find out about Eunice early !(?)
+$!: list of known cpp symbols, sorted alphabetically !sfn
+$! al = al + "..."
+$!: default library list !sfn
+$! <no hints files in use (yet?)>
+$!: Extra object files, if any, needed on this platform. !sfn
+$!: Possible local include directories to search. !sfn
+$!: Set locincpth to "" in a hint file to defeat local include searches. !sfn
+$!locincpth="/usr/local/include /opt/local/include /usr/gnu/include" !sfn
+$!locincpth="$locincpth /opt/gnu/include /usr/GNU/include /opt/GNU/include"
+$!: no include file wanted by default !sfn
+$!inclwanted='' !sfn
+$!: Possible local library directories to search. !sfn
+$!loclibpth="/usr/local/lib /opt/local/lib /usr/gnu/lib" !sfn
+$!loclibpth="$loclibpth /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib" !sfn
+$!: general looking path for locating libraries !sfn
+$!glibpth="/lib/pa1.1 /usr/shlib /usr/lib/large /lib /usr/lib" !sfn
+$!glibpth="$glibpth $xlibpth /lib/large /usr/lib/small /lib/small" !sfn
+$!glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/shlib" !sfn
+$!: Private path used by Configure to find libraries. Its value !sfn
+$!: is prepended to libpth. This variable takes care of special !sfn
+$!: machines, like the mips. Usually, it should be empty. !sfn
+$!plibpth='' !sfn
+$!: full support for void wanted by default !sfn
+$!defvoidused=15 !sfn
+$!: List of libraries we want. !sfn
+$!libswanted='net socket inet nsl nm ndbm gdbm dbm db malloc dl' !sfn
+$!libswanted="$libswanted dld ld sun m c cposix posix ndir dir crypt" !sfn
+$!libswanted="$libswanted ucb bsd BSD PW x" !sfn
+$!: We probably want to search /usr/shlib before most other libraries. !sfn
+$!: This is only used by the lib/ExtUtils/MakeMaker.pm routine extliblist. !sfn
+$!glibpth=`echo " $glibpth " | sed -e 's! /usr/shlib ! !'` !sfn
+$!glibpth="/usr/shlib $glibpth" !sfn
+$!: Do not use vfork unless overridden by a hint file. !sfn
+$!usevfork=false !sfn
+$!: script used to extract .SH files with variable substitutions !sfn
+$!: produce awk script to parse command line options !sfn
+$!sfn (assume no sed awk) see below
+$!: process the command line options
+$!
+$!: set up default values
+$ fastread=""
+$ reuseval="false"
+$ config_sh=""
+$ alldone=""
+$ error=""
+$ silent=""
+$ extractsh=""
+$ override=""
+$ knowitall=""
+$ Using_Dec_C = ""
+$ Using_Vax_C = ""
+$ Using_Gnu_C = ""
+$ Dec_C_Version = ""
+$ use_threads = "F"
+$!
+$!: option parsing
+$ IF (P1 .NES. "")
+$ THEN !one or more switches was thrown
+$ i = 1
+$ bang = 0
+$Param_loop:
+$ IF (P'i'.NES."") THEN bang = bang + 1
+$ i = i + 1
+$ IF (i.LT.9) THEN GOTO Param_loop !DCL allows P1..P8
+$!
+$ i = 1
+$Opt_loop:
+$ IF (F$EXTRACT(0,1,P'i') .EQS. "-") THEN P'i' = P'i' - "-"
+$ IF (F$EXTRACT(0,1,P'i') .EQS. "/") THEN P'i' = P'i' - "/"
+$Remove_quotation_mark:
+$ P'i' = P'i' - """"
+$ IF F$LOCATE("""",P'i') .LT. F$LENGTH(P'i') THEN GOTO Remove_quotation_mark
+$ gotopt = "f" !"alse"
+$ gotshortopt = "f" !"alse"
+$ IF (F$EXTRACT(0,1,P'i') .EQS. "d")
+$ THEN
+$ fastread = "yes"
+$ gotopt = "t" !"rue"
+$ P'i' = P'i' - "d"
+$ gotshortopt = "t" !"rue"
+$ ENDIF
+$ IF (F$EXTRACT(0,1,P'i') .EQS. "e")
+$ THEN
+$ alldone = "cont"
+$ gotopt = "t"
+$ P'i' = P'i' - "e"
+$ gotshortopt = "t"
+$ ENDIF
+$ IF (F$EXTRACT(0,1,P'i') .EQS. "f") !"-f")
+$ THEN
+$ P'i' = P'i' - "f"
+$ config_sh = P'i'
+$ IF (F$SEARCH(config_sh).NES."")
+$ THEN
+$ test = F$FILE_ATTRIBUTES(config_sh,"PRO")
+$ IF (F$LOCATE("R",test).NE.F$LENGTH(test))
+$ THEN
+$ CONTINUE !at this point check UIC && if test allows...
+$ !to be continued ?
+$ ELSE
+$ echo "''me': cannot read config file ''config_sh'."
+$ error="true"
+$ ENDIF
+$ ELSE
+$ echo "''me': cannot read config file ''config_sh'."
+$ error="true"
+$ ENDIF
+$ gotopt = "t"
+$ ENDIF
+$ IF (F$EXTRACT(0,1,P'i') .EQS. "h")
+$ THEN
+$ error = "true"
+$ gotopt = "t"
+$ P'i' = P'i' - "h"
+$ gotshortopt = "t"
+$ ENDIF
+$ IF (F$EXTRACT(0,1,P'i') .EQS. "r")
+$ THEN
+$ reuseval = "true"
+$ gotopt = "t"
+$ P'i' = P'i' - "r"
+$ gotshortopt = "t"
+$ ENDIF
+$ IF (F$EXTRACT(0,1,P'i') .EQS. "s")
+$ THEN
+$ silent = "true"
+$ gotopt = "t"
+$ P'i' = P'i' - "s"
+$ gotshortopt = "t"
+$ ENDIF
+$ IF (F$EXTRACT(0,1,P'i') .EQS. "E") !"-E")
+$ THEN
+$ alldone = "exit"
+$ gotopt = "t"
+$ ENDIF
+$ IF (F$EXTRACT(0,1,P'i') .EQS. "K") !"-K")
+$ THEN
+$ knowitall = "true"
+$ gotopt = "t"
+$ P'i' = P'i' - "K"
+$ gotshortopt = "t"
+$ ENDIF
+$ IF (F$EXTRACT(0,1,P'i') .EQS. "O")
+$ THEN
+$ override = "true"
+$ gotopt = "t"
+$ P'i' = P'i' - "O"
+$ gotshortopt = "t"
+$ ENDIF
+$ IF (F$EXTRACT(0,1,P'i') .EQS. "S") !"-S")
+$ THEN
+$ extractsh = "true" !VMS?
+$ gotopt = "t"
+$ P'i' = P'i' - "S"
+$ gotshortopt = "t"
+$ ENDIF
+$ IF (F$EXTRACT(0,1,P'i') .EQS. "D") !"-D")
+$ THEN
+$ P'i' = P'i' - "D"
+$!Hmm.. this part needs work
+$! P'i'
+$ IF (F$LOCATE("=",P'i') .EQ. F$LENGTH(P'i'))
+$ THEN
+$ P'i' = "define"
+$ ELSE
+$ IF (F$LOCATE("=",P'i') .EQ. (F$LENGTH(P'i') - 1))
+$ THEN
+$ me = F$PARSE(me,,,"NAME") + F$PARSE(me,,,"TYPE")
+$ echo "''me': use '-Usymbol=val' not '-Dsymbol='."
+$ echo "''me': ignoring -D",P'i'
+$ ELSE
+$!Hmm.. this part needs work
+$! 'F$EXTRACT(0,F$LOCATE("=",P'i'),P'i')' = -
+$! 'F$EXTRACT(F$LOCATE("=",P'i'),P'i'),F$LENGTH(P'i'),P'i')'
+$ ENDIF
+$ ENDIF
+$ ECHO "P''i' =>",P'i',"<=" !Diag
+$ gotopt = "t"
+$ ENDIF
+$ IF (F$EXTRACT(0,1,P'i') .EQS. "U") !"-U")
+$ THEN
+$ P'i' = P'i' - "U"
+$ IF (F$LOCATE("=",P'i') .EQ. F$LENGTH(P'i'))
+$ THEN
+$ P'i' = ""
+$ ELSE
+$ IF (F$LOCATE("=",P'i') .LT. (F$LENGTH(P'i') - 1))
+$ THEN
+$ me = F$PARSE(me,,,"NAME") + F$PARSE(me,,,"TYPE")
+$ echo "''me': use '-Dsymbol=val' not '-Usymbol=val'."
+$ echo "''me': ignoring -U",P'i'
+$ ELSE
+$ P'i' = "undef"
+$ ENDIF
+$ ENDIF
+$ ECHO "P''i' =>",P'i',"<=" !Diag
+$ gotopt = "t"
+$ ENDIF
+$ IF (F$EXTRACT(0,1,P'i') .EQS. "V")
+$ THEN
+$ me = F$PARSE(me,,,"NAME") + F$PARSE(me,,,"TYPE")
+$ echo "''me' generated by an unknown version of EDT."
+$ STOP
+$ EXIT !0
+$ ENDIF
+$ IF .NOT.gotopt
+$ THEN
+$ echo "''me': unknown option ",P'i'
+$ error = "true"
+$ ENDIF
+$ IF (F$LENGTH(P'i').GT.0).AND.(gotshortopt) THEN i = i - 1 !clustered switch
+$ i = i + 1
+$ IF (i .LT. (bang + 1)) THEN GOTO Opt_loop
+$!
+$ ENDIF ! (P1 .NES. "")
+$!
+$ IF (error)
+$ THEN
+$ me = F$PARSE(me,,,"DIRECTORY")+ F$PARSE(me,,,"NAME")
+$ echo "Usage: @''me' [-dehrEKOSV] [-fconfig.sh] [-Dsymbol] [-Dsymbol=value]"
+$ echo " [-Usymbol] [-Usymbol=]"
+$ TYPE SYS$INPUT
+ "-d" : use defaults for all answers.
+ "-e" : go on without questioning past the production of config.sh. *
+ "-f" : specify an alternate default configuration file.
+ "-h" : print this help message and exit (with an error status).
+ "-r" : reuse C symbols value if possible (skips costly nm extraction).*
+ "-s" : silent mode, only echoes questions and essential information.
+ -"D" : define symbol to have some value: *
+ -"Dsymbol" symbol gets the value 'define'
+ -"Dsymbol=value" symbol gets the value 'value'
+ -E : stop at the end of questions, after having produced config.sh. *
+ -K : do not use unless you know what you are doing.
+ -O : let -D and -U override definitions from loaded configuration file. *
+ -S : perform variable substitutions on all .SH files (can mix with -f) *
+ -"U" : undefine symbol: *
+ -"Usymbol" symbol gets the value 'undef'
+ -"Usymbol=" symbol gets completely empty
+ -V : print version number and exit (with a zero status).
+$ echo "%Config-I-VMS, lower case switches must be enclosed"
+$ echo "-Config-I-VMS, in double quotation marks, e.g.:"
+$ echo "-Config-I-VMS, @Configure ""-des"""
+$ echo "-Config-I-VMS, * indicates switch may not be fully implemented for VMS."
+$ SET DEFAULT 'vms_default_directory_name' !be kind rewind
+$ STOP
+$ EXIT 3 ! $STATUS = "%X00000003" (informational)
+$ ENDIF
+$!
+$ GOTO Check_silence
+$!
+$Shut_up:
+$ STDOUT = F$TRNLNM("SYS$OUTPUT")
+$ DEFINE SYS$OUTPUT "_NLA0:"
+$ echo4 = "write STDOUT "
+$ cat4 = "TYPE/OUTPUT=''STDOUT'"
+$ open/write STDOUT 'STDOUT'
+$ RETURN
+$!
+$Check_silence:
+$ IF (silent)
+$ THEN
+$ GOSUB Shut_up
+$ ELSE
+$ echo4 = "write SYS$OUTPUT "
+$ cat4 = "TYPE"
+$ ENDIF
+$!
+$!: run the defines and the undefines, if any, but leave the file out there...
+$! Unfortunately Configure.COM in DCL is not yet set up to do this -
+$! maybe someday
+$!
+$!: set package name
+$ package = "perl5"
+$!
+$!: Eunice requires " " instead of "", can you believe it
+$ echo ""
+$!: Here we go...
+$ echo "Beginning of configuration questions for ''package'."
+$ echo ""
+$!
+$!: Some greps do not return status, grrr.
+$ contains = "SEARCH"
+$!
+$!: first determine how to suppress newline on echo command !cant DCL is record oriented
+$! echo "Checking ''echo' to see how to suppress newlines..."
+$! echo "giving up..."
+$! echo "The star should be here-->*"
+$!
+$!: Now test for existence of everything in MANIFEST
+$ echo ""
+$ echo4 "First let's make sure your kit is complete. Checking..."
+$ manifestfound = ""
+$ miss_list = ""
+$! Here I assume we are in the [foo.PERL5xxx.VMS...] tree
+$! because the search routine simply does set def [-] if necessary.
+$ file_2_find = "MANIFEST" !I hope this one is not in [foo.PERL5xxx.VMS...]
+$Research_manifest:
+$ manifestfound = F$SEARCH(file_2_find)
+$ IF (manifestfound .EQS. "")
+$ THEN
+$ IF F$PARSE(F$ENVIRONMENT("DEFAULT"),,,"DIRECTORY",).NES."[000000]"
+$ THEN
+$ SET DEFAULT [-]
+$ GOTO Research_manifest
+$ ELSE
+$ echo ""
+$ echo "There is no MANIFEST file. I hope your kit is complete !"
+$ miss_list = ""
+$ GOTO Beyond_manifest
+$ ENDIF
+$ ELSE
+$! MANIFEST. has been found and we have set def'ed there -
+$! time to bail out before it's too late.
+$ tmp = f$extract(1,3,f$edit(f$getsyi("VERSION"),"TRIM,COLLAPSE"))
+$ IF tmp .GES. "7.2" THEN GOTO Beyond_depth_check
+$ IF (F$ELEMENT(max_allowed_dir_depth,".",F$ENVIRONMENT("Default")).nes.".")
+$ THEN
+$ TYPE SYS$INPUT:
+%Config-E-VMS, ERROR:
+ Sorry! It apears as though your perl build sub-directory is already too
+ deep into the VMS file system. Please try moving stuff into a shallower
+ directory (or altering the "max_allowed_dir_depth" parameter).
+$ echo4 "ABORTING..."
+$ SET DEFAULT 'vms_default_directory_name' !be kind rewind
+$ STOP
+$ EXIT !2 !$STATUS = "%X00000002" (error)
+$ ENDIF
+$Beyond_depth_check:
+$!
+$! after finding MANIFEST let's create (but not yet enter) the UU subdirectory
+$!
+$ IF (manifestfound .NES. "")
+$ THEN
+$ IF ( F$SEARCH("UU.DIR").EQS."" )
+$ THEN
+$ CREATE/DIRECTORY [.UU]
+$ ELSE
+$ IF ( F$SEARCH("[.UU]*.*").NES."" ) THEN DELETE/NOLOG [.UU]*.*;*
+$ ENDIF
+$!: Configure runs within the UU subdirectory
+$ SET DEFAULT [.UU]
+$!
+$! a little redundancy never hurt anybody?
+$ file_2_find = "[-]" + file_2_find
+$ manifestfound = F$SEARCH(file_2_find)
+$!
+$ OPEN/WRITE MISSING MISSING.
+$!change to "FALSE" if you wish to skip the manifest search
+$!(which after all is rather slow in DCL :-)
+$ IF ("TRUE")
+$ THEN
+$ OPEN/READ CONFIG 'manifestfound'
+$Read_loop_manifest:
+$ READ/END_OF_FILE = Done_manifest CONFIG line
+$! This algorithm turns "foo/bar/baz.c" into "[.foo.bar]baz.c"
+$! pvhp@lns62.lns.cornell.edu 10-JUN-1996 20:31:46
+$! 2-MAR-1998 15:46:11 Improved to turn "foo/bar/baz.c.buz"
+$! into "[.foo.bar]baz.c_buz as happens with vmstar and unzip
+$ line = F$EDIT(line,"TRIM, COMPRESS")
+$ file_2_find = F$EXTRACT(0,F$LOCATE(" ",line),line)
+$ IF F$LOCATE("/",file_2_find) .NE. F$LENGTH(file_2_find)
+$ THEN
+$Re_strip_line_manifest:
+$ loca = F$LOCATE("/",file_2_find)
+$ ante = F$EXTRACT(0,loca,file_2_find)
+$ post = F$EXTRACT(loca,F$LENGTH(file_2_find),file_2_find)
+$ test_this = ante + "." + (post - "/")
+$ IF F$LOCATE("/",test_this) .NE. F$LENGTH(test_this)
+$ THEN
+$ file_2_find = ante + "." + (post - "/")
+$ GOTO Re_strip_line_manifest
+$ ELSE
+$ file_2_find = ante + "]" + (post - "/")
+$ ENDIF
+$ file_2_find = "[-."+file_2_find
+$ ELSE
+$ file_2_find = "[-]" + file_2_find
+$ ENDIF
+$!
+$ dirname = F$EXTRACT(0,F$LOCATE("]",file_2_find),file_2_find) + "]"
+$ file_2_find = file_2_find - dirname
+$ dots = 0
+$Dot_loop:
+$ dot_ele = F$ELEMENT(dots,".",file_2_find)
+$ IF dot_ele .EQS. "." THEN GOTO Eo_dot_loop
+$ IF dots .eq. 0
+$ THEN basename = f$extract(0,f$locate(".",file_2_find),file_2_find) + "."
+$ ELSE basename = basename + dot_ele + "_"
+$ ENDIF
+$ dots = dots + 1
+$ GOTO dot_loop
+$Eo_dot_loop:
+$ IF (((f$length(file_2_find)+1) .eq. f$length(basename)) .and. -
+ (f$extract(f$length(basename)-1,1,basename) .eqs. "_")) THEN -
+ basename = f$extract(0,f$length(basename)-1,basename)
+$ file_2_find = dirname + basename
+$!
+$ found = F$SEARCH(file_2_find)
+$ IF (found .EQS. "")
+$ THEN
+$ WRITE MISSING file_2_find
+$ IF ((F$LENGTH(miss_list)+F$LENGTH(file_2_find)).LT.250)
+$ THEN
+$ miss_list = miss_list + "," + file_2_find
+$ ENDIF
+$ ENDIF
+$ GOTO Read_loop_manifest
+$Done_manifest:
+$ CLOSE CONFIG
+$ ENDIF !"TRUE"
+$ CLOSE MISSING
+$ ENDIF ! (manifestfound .NES. "")
+$Beyond_manifest:
+$ IF (miss_list .NES. "")
+$ THEN
+$ echo "Some of the files not found include:"
+$ cat4 MISSING.
+$ ENDIF
+$ IF ((miss_list .NES. "").OR.(manifestfound .EQS. ""))
+$ THEN
+$ TYPE SYS$INPUT:
+
+THIS PACKAGE SEEMS TO BE INCOMPLETE.
+
+You have the option of continuing the configuration process, despite the
+distinct possibility that your kit is damaged, by typing 'y'es. If you
+do, don't blame me if something goes wrong. I advise you to type 'n'o
+and contact the author (sugalskd@ous.edu).
+
+$ READ SYS$COMMAND/PROMPT="Continue? [n] " ans
+$ IF ans
+$ THEN
+$ echo4 "Continuing..."
+$ ELSE
+$ echo4 "ABORTING..."
+$ GOTO Clean_up
+$ ENDIF
+$ ELSE
+$ echo4 "Looks good..."
+$ DELETE/NOLOG MISSING.;
+$ ENDIF ! (miss_list .NES. "")
+$ ENDIF ! (manifestfound .EQS. "") ELSE
+$!
+$! after finding MANIFEST (see above)
+$!: Configure runs within the UU subdirectory
+$!
+$!: compute the number of columns on the terminal for proper question formatting
+$! (sfn, will assume 80-ish)
+$!
+$!: set up the echo used in my read !sfn
+$!: now set up to do reads with possible shell escape and default assignment !sfn
+$ GOTO Beyond_myread
+$!
+$myread:
+$ ans = ""
+$ If (fastread)
+$ Then
+$ echo4 "''rp'"
+$ Else
+$ If (silent)
+$ Then
+$ READ SYS$COMMAND/PROMPT="''rp'" ans
+$ Else
+$ echo ""
+$ READ SYS$COMMAND/PROMPT="''rp'" ans
+$ Endif
+$ Endif
+$ RETURN
+$!
+$Beyond_myread:
+$!
+$!: create .config dir to save info across Configure sessions
+$ IF ( F$SEARCH("[-]CONFIG.DIR").EQS."" )
+$ THEN
+$ CREATE/DIRECTORY [-.CONFIG]
+$ OPEN/WRITE CONFIG [-.CONFIG]README.
+$ WRITE CONFIG -
+ "This directory created by Configure to save information that should"
+$ WRITE CONFIG -
+ "persist across sessions."
+$ WRITE CONFIG ""
+$ WRITE CONFIG -
+ "You may safely delete it if you wish."
+$ CLOSE CONFIG
+$ ENDIF
+$!
+$!: general instructions
+$ needman = "true"
+$ firsttime = "true"
+$ user = F$EDIT(F$GETJPI("","USERNAME"),"TRIM,COLLAPSE")
+$ IF .NOT.(F$SEARCH("[-.CONFIG]INSTRUCT.").EQS."")
+$ THEN
+$ messages = F$ENVIRONMENT("MESSAGE")
+$ SET MESSAGE/NOFAC/NOSEV/NOIDENT/NOTEXT !sorry :-(
+$ contains /NOOUTPUT [-.CONFIG]INSTRUCT. 'user'
+$ IF .NOT.($status.EQ.%X08D78053)
+$ THEN
+$ firsttime=""
+$ dflt = "n"
+$ rp = "Would you like to see the instructions? [''dflt'] "
+$ GOSUB myread
+$ if .NOT.ans THEN needman=""
+$ ENDIF
+$ SET MESSAGE 'messages' !hope you made it here :-)
+$ ENDIF
+$ if (fastread.AND.silent.AND.(alldone.eqs."cont")) THEN needman=""
+$!
+$ IF (needman)
+$ THEN
+$ TYPE SYS$INPUT:
+
+This installation shell script will examine your system and ask you questions
+to determine how the perl5 package should be installed. If you get
+stuck on a question, you may use a ^C or ^Y shell escape to STOP this
+process, edit something, then restart this process as you just did.
+Many of the questions will have default answers in square
+brackets; typing carriage return will give you the default.
+
+$ READ SYS$COMMAND/PROMPT="Type carriage return to continue " ans
+$ TYPE SYS$INPUT:
+
+In a hurry? You may run '@Configure -d'. This will bypass nearly all
+the questions and use the computed defaults (or the previous answers provided
+there was already a config.sh file). Type '@Configure -h' for a list of
+options.
+
+$ READ SYS$COMMAND/PROMPT="Type carriage return to continue " ans
+$ TYPE SYS$INPUT:
+
+Much effort has been expended to ensure that this shell script will
+run on any VMS system. If despite that it blows up on yours, your
+best bet is to edit Configure.com and @ it again. Whatever problems
+you have with Configure.com, let me (sugalskd@ous.edu) know how I blew
+it.
+
+$!This installation script affects things in two ways:
+$!
+$!1) it may do direct variable substitutions on some of the files included
+$! in this kit.
+$!2) it builds a config.h file for inclusion in C programs. You may edit
+$! any of these files as the need arises after running this script.
+$!
+$!If you make a mistake on a question, there is no easy way to back up to it
+$!currently.
+$!
+$ READ SYS$COMMAND/PROMPT="Type carriage return to continue " ans
+$ IF (F$SEARCH("[-.CONFIG]INSTRUCT.").EQS."")
+$ THEN
+$ OPEN/WRITE CONFIG [-.CONFIG]INSTRUCT.
+$ WRITE CONFIG user
+$ CLOSE CONFIG
+$ ENDIF
+$ ENDIF !(needman .EQS. "true")
+$!
+$!: see if sh knows # comments !sfn
+$ sharpbang = "$ "
+$!: figure out how to guarantee sh startup !sfn
+$!: find out where common programs are !sfn
+$!loclist="awk/cat/comm/cp/echo/expr/find/grep/ln/ls/mkdir/rm/sed/sort/touch/tr/uniq"
+$!trylist="Mcc/byacc/cpp/csh/date/egrep/less/line/more/nroff/perl/pg/sendmail/test/uname"
+$! echo "I don't know where '$file' is, and my life depends on it."
+$! echo "Go find a public domain implementation or fix your PATH setting!"
+$! echo ""
+$! echo "Don't worry if any of the following aren't found..."
+$!: determine whether symbolic links are supported !sfn
+$!: see whether [:lower:] and [:upper:] are supported character classes !sfn
+$!: set up the translation script tr, must be called with ./tr of course !sfn
+$!
+$!: Try to determine whether config.sh was made on this system
+$!: Get old answers from old config file if Configure was run on the
+$!: same system, otherwise use the hints.
+$ config_sh_es = "''config_sh'/[-]config.sh/[-.vms]config.vms/"
+$ i = 0
+$ max = 3
+$Config_sh_look:
+$ config_sh = F$ELEMENT(i,"/",config_sh_es)
+$ i = i + 1
+$ IF (config_sh.NES."/").AND.(config_sh.NES."")
+$ THEN
+$ configshfound = F$SEARCH(config_sh)
+$ IF (configshfound.NES."") THEN GOTO Config_sh_found
+$ ENDIF
+$ IF (i.LT.max) THEN GOTO Config_sh_look
+$ IF (configshfound.EQS."") THEN GOTO Beyond_config_sh
+$Config_sh_found:
+$ echo ""
+$ echo "Fetching default answers from ''config_sh'..."
+$!we actually do not have "hints/" for VMS
+$! TYPE SYS$INPUT:
+$!
+$!First time through, eh? I have some defaults handy for the following systems:
+$!
+$! echo " ","VMS_VAX"
+$! echo " ","VMS_AXP"
+$! : Now look for a hint file osname_osvers, unless one has been
+$! : specified already.
+$! TYPE SYS$INPUT:
+$!
+$!You may give one or more space-separated answers, or "none" if appropriate.
+$!If your OS version has no hints, DO NOT give a wrong version -- say "none".
+$!
+$! READ SYS$COMMAND/PROMPT="Which of these apply, if any? " ans
+$!
+$Beyond_config_sh:
+$!
+$!: Restore computed paths !sfn
+$!
+$! genconfig.pl has "osname='VMS'"
+$ osname = F$EDIT(F$GETSYI("NODE_SWTYPE"),"COLLAPSE")
+$! %Config-I-VMS, a necessary error trap (could be PC running VCL)
+$!
+$ IF (osname .NES. "VMS")
+$ THEN
+$ echo4 "Hmm.. I wonder what ''osname' is (?)"
+$ TYPE SYS$INPUT:
+
+%Config-E-VMS, ERROR:
+
+ Err, you do not appear to be running VMS!
+ This package is intended to Configure the building of Perl for VMS.
+
+$ READ SYS$COMMAND/PROMPT="Continue anyway? [n] " ans
+$ IF ans
+$ THEN
+$ echo4 "Continuing..."
+$ ELSE
+$ echo4 "ABORTING..."
+$ SET DEFAULT 'vms_default_directory_name' !be kind rewind
+$ STOP
+$ EXIT 2 !$STATUS = "%X00000002" (error)
+$ ENDIF
+$ ELSE !we are on VMS huzzah!
+$ IF .NOT.silent
+$ THEN TYPE SYS$INPUT:
+
+Configure uses the operating system name and version to set some defaults.
+The default value is probably right if the name rings a bell. Otherwise,
+since spelling matters for me, either accept the default or answer "none"
+to leave it blank.
+$ ENDIF
+$ rp = "Operating system name? [''osname'] "
+$ GOSUB myread
+$ IF ans.nes.""
+$ THEN
+$ IF (ans.NES.osname) !.AND.knowitall
+$ THEN
+$ echo4 "I'll go with ''osname' anyway..."
+$ ENDIF
+$ ENDIF
+$ ENDIF !(osname .NES./.EQS. "VMS")
+$!
+$!: who configured the system
+$! see 'user' above.
+$ cf_by = F$EDIT(user,"LOWERCASE")
+$! cf_time = F$CVTIME() !superceded by procedure below
+$ osvers = F$GETSYI("VERSION")
+$!
+$! Peter Prymmer has seen:
+$! "SYS$TIMEZONE_DIFFERENTIAL" = "-46800" (sic)
+$! "SYS$TIME_ZONE" = "EDT"
+$!
+$! Charles Lane recommended:
+$! "SYS$TIMEZONE_DIFFERENTIAL" = "-14400"
+$! "NEWS_TIMEZONE" = "-0500"
+$! "ST_TIMEZONE" = "EDT"
+$! "JAN_TIME_ZONE" = "EST "
+$! "MULTINET_TIMEZONE" = "EST"
+$! "DAYLIGHT_SAVINGS" = "1"
+$!
+$! Charles Bailey recommends (in ANU NEWS Doc Jan 1995):
+$! "PMDF_Timezone"
+$! "Multinet_Timezone"
+$! "TCPware_Timezone"
+$! "WIN$Time_Zone"
+$!
+$! This snippet o' DCL returns a string in default Unix `date` format,
+$! and it will prompt to set SYS$TIMEZONE_DIFFERENTIAL.
+$! Peter Prymmer pvhp@lns62.lns.cornell.edu
+$!
+$ MIN_TZO = -840 !units are minutes here
+$ MAX_TZO = 840
+$!
+$ wkday = F$EXTRACT(0,3,F$CVTIME(,,"WEEKDAY"))
+$ monn = F$CVTIME(,,"MONTH")
+$ mday = F$EXTRACT(8,2,F$CVTIME(,,"DATE"))
+$ hour = F$CVTIME(,,"HOUR")
+$ min = F$CVTIME(,,"MINUTE")
+$ sec = F$CVTIME(,,"SECOND")
+$ year = F$CVTIME(,,"YEAR")
+$!
+$ months = "/Jan/Feb/Mar/Apr/May/Jun/Jul/Aug/Sep/Oct/Nov/Dec/"
+$ i = 0
+$Mon_loop:
+$ i = i + 1
+$ mon = F$ELEMENT(i,"/",months)
+$ IF i.LT.monn THEN GOTO Mon_loop
+$!
+$ tzneedset = "t"
+$ systz = F$TRNLNM("SYS$TIMEZONE_DIFFERENTIAL")
+$ IF systz.NES.""
+$ THEN
+$ tzhour = F$INTEGER(systz)/3600
+$ tzmins = F$INTEGER(systz)/60
+$ tzminrem = tzmins - tzhour*60
+$ IF tzminrem.lt.0 THEN tzminrem = -1*tzminrem !keeps !2ZL happy
+$ IF tzhour.ge.0
+$ THEN signothetime = "+"
+$ IF tzhour.EQ.0.AND.tzminrem.EQ.0
+$ THEN direction = "on GMT/"
+$ ELSE direction = "east of "
+$ ENDIF
+$ ELSE signothetime = "-"
+$ tzhour = -1*tzhour !keeps !UL happy
+$ direction = "west of "
+$ ENDIF
+$ echo ""
+$ echo "%Config-I-VMS,"
+$ echo "According to the setting of your ""SYS$TIMEZONE_DIFFERENTIAL"" (= ''systz')"
+$ IF tzminrem.ne.0
+$ THEN
+$ tzspan = "''tzhour' hours & ''tzminrem' minutes"
+$ ELSE
+$ tzspan = "''tzhour' hours"
+$ ENDIF
+$ dflt = "y"
+$ echo "Your system is ''tzspan' ''direction'UTC in England."
+$ rp = "%Config-I-VMS, (''systz') Is this UTC Time Zone Offset correct? [''dflt'] "
+$ GOSUB myread
+$ IF ans.OR.(ans.EQS."")
+$ THEN
+$ tzneedset = "f"
+$ tzd = systz
+$ GOTO Beyond_TimeZone
+$ ENDIF
+$ ELSE
+$ echo ""
+$ echo4 "%Config-I-VMS,"
+$ echo4 """SYS$TIMEZONE_DIFFERENTIAL"" does not appear to be DEFINEd on your system"
+$ ENDIF
+$!
+$TZSet:
+$ echo ""
+$ echo "Please tell me in hh:mm form what time offset from GMT/UTC in England"
+$ echo "you are. As an example Eastern (US) Standard Time is -5:00 offset, but"
+$ echo "Eastern Daylight Time (summer) is -4:00 offset."
+$ dflt = "0:00"
+$ rp = "Enter the Time Zone offset: [''dflt'] "
+$ GOSUB myread
+$ ans = F$Edit(ans,"collapse,trim,uncomment,upcase")
+$ IF ans.EQS."" THEN ans = dflt
+$ tzhour = F$ELEMENT(0,":","''ans'") !first
+$ IF tzhour.EQS."" THEN tzhour = 0
+$ tzhour = F$INTEGER(tzhour)
+$ tzminrem = F$ELEMENT(1,":","''ans'") !second
+$ IF tzminrem.NES.""
+$ THEN
+$ tzminrem = F$INTEGER(tzminrem)
+$ IF F$EXTRACT(0,1,"''ans'") .EQS. "-" THEN tzminrem = tzminrem * -1
+$ ELSE
+$ tzminrem = 0
+$ ENDIF
+$ tzmins = tzhour*60 + tzminrem
+$ tzd = F$STRING(tzmins*60)
+$ IF tzhour .GE. 0
+$ THEN
+$ signothetime = "+"
+$ ELSE
+$ tzhour = -1*tzhour !keeps !UL happy
+$ signothetime = "-"
+$ ENDIF
+$ IF (tzmins.GT.MAX_TZO).OR.(tzmins.LT.MIN_TZO)
+$ THEN
+$ echo ""
+$ echo "%Config-W-VMS-TIMERANGE, Response must be in the range -14:00 to 14:00."
+$ goto TZSet
+$ ENDIF
+$!
+$Beyond_TimeZone:
+$ tz = f$fao("UTC!AS!UL:!2ZL",signothetime,tzhour,tzminrem)
+$ cf_time = "''wkday' ''mon' ''mday' ''hour':''min':''sec' ''tz' ''year'"
+$!
+$!: determine the architecture name
+$! genconfig.pl has either archname='VMS_AXP' or 'VMS_VAX'
+$!
+$ IF (F$GETSYI("HW_MODEL") .LT. 1024)
+$ THEN
+$ archname = "VMS_VAX"
+$ ELSE
+$ archname = "VMS_AXP"
+$ ENDIF
+$ rp = "What is your architecture name? [''archname'] "
+$ GOSUB myread
+$ IF ans.NES.""
+$ THEN
+$ ans = F$EDIT(ans,"COLLAPSE, UPCASE")
+$ IF (ans.NES.archname) !.AND.knowitall
+$ THEN
+$ echo4 "I'll go with ''archname' anyway..."
+$ ENDIF
+$ ENDIF
+$ IF (archname.EQS."VMS_AXP")
+$ THEN
+$ dflt = "n"
+$ rp = "Are you sharing your PERL_ROOT with a VAX? [''dflt'] "
+$ GOSUB myread
+$ if ans.NES.""
+$ THEN
+$ ans = F$EDIT(ans,"COLLAPSE, UPCASE")
+$ ENDIF
+$ IF (ans.NES."Y")
+$ THEN
+$ sharedperl = "N"
+$ ELSE
+$ sharedperl = "Y"
+$ macros = macros + """AXE=1"","
+$ ENDIF
+$ ELSE
+$ sharedperl = "N"
+$ ENDIF
+$!
+$!: is AFS running? !sfn
+$!: decide how portable to be. Allow command line overrides. !sfn
+$!: set up shell script to do ~ expansion !sfn
+$!: expand filename !sfn
+$!: now set up to get a file name !sfn
+$!
+$ vms_skip_install = "true"
+$ dflt = "y"
+$! echo ""
+$ rp = "%Config-I-VMS, Do you wish to skip the """"where install"""" questions? [''dflt'] "
+$ GOSUB myread
+$ IF (.NOT.ans).AND.(ans.NES."") THEN vms_skip_install = "false"
+$ prefix = F$ENVIRONMENT("DEFAULT") - ".UU]" + "]"
+$ prefix = f$parse(prefix,,,,"NO_CONCEAL") - "][" - ".;"
+$ prefix = prefix - "]" + ".]"
+$ IF (.NOT.vms_skip_install)
+$ THEN
+$!: determine root of directory hierarchy where package will be installed.
+$ dflt = "default"
+$ IF .NOT.silent
+$ THEN
+$ echo ""
+$ echo "By default, ''package' will be installed in ''dflt'/bin, manual"
+$ echo "pages under ''dflt'/man, etc..., i.e. with ''dflt' as prefix for"
+$ echo "all installation directories. Typically set to /usr/local, but you"
+$ echo "may choose /usr if you wish to install ''package' among your system
+$ ENDIF
+$ IF .NOT.silent
+$ THEN TYPE SYS$INPUT:
+binaries. If you wish to have binaries under /bin but manual pages
+under /usr/local/man, that's ok: you will be prompted separately
+for each of the installation directories, the prefix being only used
+to set the defaults.
+$ ENDIF
+$ dflt = prefix
+$ rp = "Installation prefix to use? [ ''dflt' ] "
+$ GOSUB myread
+$ IF ans.NES.""
+$ THEN
+$ prefix = ans
+$ IF F$LOCATE(".]",ans) .EQ. F$LENGTH(ans) THEN prefix = prefix - "]" + ".]"
+$ ELSE
+$ prefix = dflt
+$ ENDIF
+$!
+$!: set the prefixit variable, to compute a suitable default value
+$!
+$!: determine where private library files go
+$!: Usual default is /usr/local/lib/perl5. Also allow things like
+$!: /opt/perl/lib, since /opt/perl/lib/perl5 would be redundant.
+$ IF .NOT.silent
+$ THEN TYPE SYS$INPUT:
+
+There are some auxiliary files for perl5 that need to be put into a
+private library directory that is accessible by everyone.
+$ ENDIF
+$ dflt = prefix - ".]" + ".LIB]"
+$ rp = "Pathname where the private library files will reside? "
+$ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
+$ GOSUB myread
+$ IF ans.NES.""
+$ THEN privlib = ans
+$ ELSE privlib = dflt
+$ ENDIF
+$!
+$ ENDIF !%Config-I-VMS, skip "where install" questions
+$!
+$!: set the base revision
+$ baserev="5.0"
+$!: get the patchlevel
+$ echo ""
+$ echo4 "Getting the current patchlevel..." !>&4
+$ patchlevel_h = F$SEARCH("[-]patchlevel.h")
+$ IF (patchlevel_h.NES."")
+$ THEN
+$ got_patch = "false"
+$ got_sub = "false"
+$ OPEN/READONLY CONFIG 'patchlevel_h'
+$Patchlevel_h_loop:
+$ READ/END_Of_File=Close_patch CONFIG line
+$ IF ((F$LOCATE("#define PATCHLEVEL",line).NE.F$LENGTH(line)).AND.(.NOT.got_patch))
+$ THEN
+$ line = F$EDIT(line,"COMPRESS, TRIM")
+$ patchlevel = F$EXTRACT(18,F$LENGTH(line)-18,line)
+$ got_patch = "true"
+$ ENDIF
+$ IF ((F$LOCATE("#define SUBVERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_sub))
+$ THEN
+$ line = F$EDIT(line,"COMPRESS, TRIM")
+$ subversion = F$EXTRACT(18,F$LENGTH(line)-18,line)
+$ got_sub = "true"
+$ ENDIF
+$ IF (.NOT.got_patch).OR.(.NOT.got_sub) THEN GOTO Patchlevel_h_loop
+$Close_patch:
+$ CLOSE CONFIG
+$ ELSE
+$ patchlevel="0"
+$ subversion="0"
+$ ENDIF
+$ echo "(You have ''package' ''baserev' PL''patchlevel' sub''subversion'.)"
+$! This whole thing needs replacing w/ F$FAO() calls:
+$ patchlevel = F$INTEGER(patchlevel)
+$ IF patchlevel.LT.10
+$ THEN patchlevel = "00" + F$STRING(patchlevel)
+$ ELSE patchlevel = "0" + F$STRING(patchlevel)
+$ ENDIF
+$ subversion = F$INTEGER(subversion)
+$ IF subversion.GT.0
+$ THEN
+$ IF subversion.LT.10
+$ THEN subversion = "0" + F$STRING(subversion)
+$ ELSE subversion = F$STRING(subversion)
+$ ENDIF
+$ ELSE subversion = ""
+$ ENDIF
+$!
+$ version = F$EXTRACT(0,1,baserev) + "_" + patchlevel + subversion
+$!
+$ IF (.NOT.vms_skip_install)
+$ THEN
+$!: set the prefixup variable, to restore leading tilda escape !sfn
+$!: set the prefixup variable, to restore leading tilde escape !sfn
+$!
+$!: determine where public architecture dependent libraries go
+$ IF (.NOT.silent)
+$ THEN
+$ echo ""
+$ echo "''package' contains architecture-dependent library files. If you are"
+$ ENDIF
+$ IF (.NOT.silent)
+$ THEN TYPE SYS$INPUT:
+sharing libraries in a heterogeneous environment, you might store
+these files in a separate location. Otherwise, you can just include
+them with the rest of the public library files.
+$ ENDIF
+$ dflt = privlib - "]" + "." + archname + "." + version + "]"
+$ rp = "Where do you want to put the public architecture-dependent libraries? "
+$ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
+$ GOSUB myread
+$ IF ans.NES.""
+$ THEN archlib = ans
+$ ELSE archlib = dflt
+$ ENDIF
+$!
+$!: set up the script used to warn in case of inconsistency !sfn
+$!: function used to set $1 to $val !sfn
+$!
+$ ENDIF !%Config-I-VMS, skip "where install" questions
+$! This quotation from Configure has to be included on VMS:
+$ TYPE SYS$INPUT:
+
+There is, however, a strange, musty smell in the air that reminds me of
+something...hmm...yes...I've got it...there's a VMS nearby, or I'm a Blit.
+$ CONTINUE
+$ IF (.NOT.vms_skip_install)
+$ THEN
+$!: it so happens the Eunice I know will not run shell scripts in Unix format
+$!
+$!: see if setuid scripts can be secure !sfn
+$!: now see if they want to do setuid emulation !sfn
+$!
+$!: determine where site specific libraries go.
+$ IF .NOT.silent
+$ THEN TYPE SYS$INPUT:
+
+The installation process will also create a directory for
+site-specific extensions and modules. Some users find it convenient
+to place all local files in this directory rather than in the main
+distribution directory.
+$ ENDIF
+$ dflt = privlib - "]" + ".SITE_PERL]"
+$ rp = "Pathname for the site-specific library files? "
+$ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
+$ GOSUB myread
+$ IF ans.NES.""
+$ THEN sitelib = ans
+$ ELSE sitelib = dflt
+$ ENDIF
+$!
+$!: determine where site specific architecture-dependent libraries go.
+$ IF .NOT.silent
+$ THEN TYPE SYS$INPUT:
+
+The installation process will also create a directory for
+architecture-dependent site-specific extensions and modules.
+$ ENDIF
+$ dflt = sitelib - "]" + "." + archname + "]"
+$ rp = "Pathname for the site-specific architecture-dependent library files? "
+$ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
+$ GOSUB myread
+$ IF ans.NES.""
+$ THEN sitearch = ans
+$ ELSE sitearch = dflt
+$ ENDIF
+$!
+$!: determine where old public architecture dependent libraries might be
+$!
+$!: determine where public executables go
+$ dflt = prefix - ".]" + ".BIN]"
+$ rp = "Pathname where the public executables will reside? "
+$ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
+$ GOSUB myread
+$ IF ans.NES.""
+$ THEN bin = ans
+$ ELSE bin = dflt
+$ ENDIF
+$!
+$!: determine where manual pages are on this system
+$!: What suffix to use on installed man pages
+$!: see if we can have long filenames
+$!: determine where library module manual pages go
+$!: What suffix to use on installed man pages
+$!: see what memory models we can support
+$!
+$ ENDIF !%Config-I-VMS, skip "where install" questions
+$!
+$!: see if we need a special compiler
+$! cc_list = "cc/vaxc|cc/decc|gcc" !%Config-I-VMS, compiler symbols/commands
+$!
+$ nocc = "f"
+$ vms_cc_dflt = ""
+$ vms_cc_available = ""
+$!
+$ OPEN/WRITE CONFIG ccvms.c
+$ WRITE CONFIG "#include <stdlib.h>" !DECC is sooo picky
+$ WRITE CONFIG "#include <stdio.h>"
+$ WRITE CONFIG "int main() {"
+$ WRITE CONFIG "#ifdef __DECC"
+$ WRITE CONFIG " printf(""/DECC\n"");"
+$ WRITE CONFIG "#else"
+$ WRITE CONFIG " printf(""/VAXC\n"");"
+$ WRITE CONFIG "#endif"
+$ WRITE CONFIG " exit(0);"
+$ WRITE CONFIG "}"
+$ CLOSE CONFIG
+$!
+$ DEFINE SYS$ERROR _NLA0:
+$ DEFINE SYS$OUTPUT _NLA0:
+$ cc/NoObj/list=ccvms.lis ccvms.c
+$ tmp = $status
+$ DEASSIGN SYS$OUTPUT
+$ DEASSIGN SYS$ERROR
+$ IF (silent) THEN GOSUB Shut_up
+$! echo "%Config-I-VMS, After cc compile $status = >''tmp'<" !diagnostic
+$!
+$ IF tmp.NE.%X10B90001
+$ THEN
+$ IF tmp.NE.%X10000001
+$ THEN
+$ nocc = "t" !%X10000001 is return from gcc
+$ GOTO Gcc_initial_check
+$ ENDIF
+$ ENDIF
+$!
+$ GOSUB List_Parse
+$ IF .NOT.silent THEN echo ""
+$ echo "%Config-I-VMS, Default ""cc"" is ''line' ''archsufx' ''F$GETSYI("VERSION")'"
+$ IF F$LOCATE("VAX",line).NE.F$LENGTH(line)
+$ THEN
+$ vms_cc_dflt = "/vaxc"
+$ vms_cc_available = vms_cc_available + "cc/vaxc "
+$ IF .NOT.silent
+$ THEN
+$ echo "%Config-I-VMS, Will try cc/decc..."
+$ ENDIF
+$ DEFINE SYS$ERROR _NLA0:
+$ DEFINE SYS$OUTPUT _NLA0:
+$ SET NOON
+$ cc/decc/NoObj/list=ccvms.lis ccvms.c
+$ tmp = $status
+$ DEASSIGN SYS$OUTPUT
+$ DEASSIGN SYS$ERROR
+$ SET ON
+$ IF (silent) THEN GOSUB Shut_up
+$ IF tmp.NE.%X10B90001
+$ THEN
+$ echo "%Config-I-VMS, Apparently you don't have that one."
+$ ELSE
+$ GOSUB List_parse
+$ echo "%Config-I-VMS, You also have: ''line' ''archsufx' ''F$GETSYI("VERSION")'"
+$ vms_cc_available = vms_cc_available + "cc/decc "
+$ ENDIF
+$ ELSE
+$ IF F$LOCATE("DEC",line).NE.F$LENGTH(line)
+$ THEN
+$ vms_cc_dflt = "/decc"
+$ vms_cc_available = vms_cc_available + "cc/decc "
+$ echo "%Config-I-VMS, Will try cc/vaxc..."
+$ DEFINE SYS$ERROR _NLA0:
+$ DEFINE SYS$OUTPUT _NLA0:
+$ SET NOON
+$ cc/vaxc/NoObj/list=ccvms.lis ccvms.c
+$ tmp = $status
+$ DEASSIGN SYS$OUTPUT
+$ DEASSIGN SYS$ERROR
+$ SET ON
+$ IF (silent) THEN GOSUB Shut_up
+$ IF tmp.NE.%X10B90001
+$ THEN
+$ echo "%Config-I-VMS, Apparently you don't have that one."
+$ ELSE
+$ GOSUB List_parse
+$ echo "%Config-I-VMS, You also have: ''line' ''archsufx' ''F$GETSYI("VERSION")'"
+$ vms_cc_available = vms_cc_available + "cc/vaxc "
+$ ENDIF
+$ ENDIF
+$ ENDIF
+$!
+$Gcc_initial_check:
+$ echo "%Config-I-VMS, Checking for Gcc"
+$ OPEN/WRITE CONFIG gccvers.lis
+$ DEFINE SYS$ERROR CONFIG
+$ DEFINE SYS$OUTPUT CONFIG
+$ 'gcc_symbol'/noobj/version _nla0:
+$ tmp = $status
+$ DEASSIGN SYS$OUTPUT
+$ DEASSIGN SYS$ERROR
+$ IF (silent) THEN GOSUB Shut_up
+$ CLOSE CONFIG
+$ IF (tmp.NE.%X10000001).and.(tmp.ne.%X00030001)
+$ THEN
+$ echo "%Config-I-VMS, Symbol ""''gcc_symbol'"" is not defined. I guess you don't have it."
+$ goto cc_cleanup
+$ ENDIF
+$ OPEN/READ CONFIG gccvers.lis
+$GCC_List_Read:
+$ READ/END_OF_FILE=GCC_List_End CONFIG line
+$ GOTO GCC_List_Read
+$GCC_List_End:
+$ CLOSE CONFIG
+$ echo line
+$ vms_cc_available = vms_cc_available + "''gcc_symbol' "
+$ DELETE/NOLOG/NOCONFIRM gccvers.lis;
+$!
+$CC_Cleanup:
+$ DELETE/NOLOG/NOCONFIRM ccvms.*;
+$CC_Desired:
+$!: see if we need a special compiler
+$! echo ""
+$ echo "%Config-I-VMS, available compiler(s):"
+$ echo "( ''vms_cc_available')"
+$ IF .NOT.nocc
+$ THEN
+$ dflt = "cc''vms_cc_dflt'" !-> "cc" in case first compile went OK
+$ ELSE
+$ dflt = gcc_symbol
+$ ENDIF
+$ rp = "Use which C compiler? [''dflt'] "
+$ GOSUB myread
+$ IF ans.NES.""
+$ THEN
+$ ans = F$EDIT(ans,"TRIM, COMPRESS, LOWERCASE")
+$ Mcc = ans
+$ IF F$LOCATE("dec",ans).NE.F$LENGTH(ans)
+$ THEN
+$ Mcc = "cc/decc"
+$ Using_Dec_C = "Yes"
+$ C_COMPILER_Replace = "CC=cc=''Mcc'"
+$ ENDIF
+$ IF F$LOCATE("vax",ans).NE.F$LENGTH(ans)
+$ THEN
+$ Mcc = "cc/vaxc"
+$ Using_Vax_C = "Yes"
+$ C_COMPILER_Replace = "CC=cc=''Mcc'"
+$ ENDIF
+$ IF Mcc.NES.dflt
+$ THEN
+$ IF F$LOCATE("dec",dflt).NE.F$LENGTH(dflt)
+$ THEN
+$ C_COMPILER_Replace = "CC=cc=''Mcc'"
+$ ELSE
+$ Using_Dec_C = "Yes"
+$ IF F$LOCATE("vax",dflt).NE.F$LENGTH(dflt)
+$ THEN
+$ C_COMPILER_Replace = "CC=cc=''Mcc'"
+$ ENDIF
+$ ENDIF
+$ ELSE
+$ IF Mcc .EQS. "cc/decc"
+$ THEN
+$ Using_Dec_C = "Yes"
+$ C_COMPILER_Replace = "CC=cc=''Mcc'"
+$ ENDIF
+$ ENDIF
+$ ELSE
+$ Mcc = dflt
+$ IF Mcc .EQS. "cc/decc"
+$ THEN
+$ Using_Dec_C = "Yes"
+$ C_COMPILER_Replace = "CC=cc=''Mcc'"
+$ ENDIF
+$ IF Mcc .EQS. "cc/vaxc"
+$ THEN
+$ Using_Vax_C = "Yes"
+$ C_COMPILER_Replace = "CC=cc=''Mcc'"
+$ ENDIF
+$ IF Mcc .EQS. "gcc"
+$ THEN
+$ Using_Gnu_C = "Yes"
+$ C_COMPILER_Replace = "CC=cc=''Mcc'"
+$ ENDIF
+$ ENDIF
+$Decc_Version_check:
+$ IF "''Using_Dec_C'".EQS."Yes"
+$ THEN
+$ echo ""
+$ echo4 "Checking for Dec C's version number..." !>&4
+$ OPEN/WRITE CONFIG deccvers.c
+$ WRITE CONFIG "#include <stdlib.h>" !DECC is sooo picky
+$ WRITE CONFIG "#include <stdio.h>"
+$ WRITE CONFIG "int main() {"
+$ WRITE CONFIG "#ifdef __DECC"
+$ WRITE CONFIG "#ifdef __DECC_VER"
+$ WRITE CONFIG " printf(""%i\n"", __DECC_VER);"
+$ WRITE CONFIG "#else"
+$ WRITE CONFIG " printf(""%i\n"", ""1"");"
+$ WRITE CONFIG "#endif"
+$ WRITE CONFIG "#endif"
+$ WRITE CONFIG " exit(0);"
+$ WRITE CONFIG "}"
+$ CLOSE CONFIG
+$ DEFINE SYS$ERROR _NLA0:
+$ DEFINE SYS$OUTPUT _NLA0:
+$ 'Mcc' deccvers.c
+$ tmp = $status
+$ DEASSIGN SYS$ERROR _NLA0:
+$ DEASSIGN SYS$OUTPUT _NLA0:
+$ IF (silent) THEN GOSUB Shut_up
+$ DEFINE SYS$ERROR _NLA0:
+$ DEFINE SYS$OUTPUT _NLA0:
+$ link deccvers.obj
+$ tmp = $status
+$ DEASSIGN SYS$ERROR
+$ DEASSIGN SYS$OUTPUT
+$ IF (silent) THEN GOSUB Shut_up
+$ OPEN/WRITE CONFIG deccvers.out
+$ DEFINE SYS$ERROR CONFIG
+$ DEFINE SYS$OUTPUT CONFIG
+$ mcr []deccvers.exe
+$ tmp = $status
+$ CLOSE CONFIG
+$ DEASSIGN SYS$OUTPUT
+$ DEASSIGN SYS$ERROR
+$ IF (silent) THEN GOSUB Shut_up
+$ OPEN/READ CONFIG deccvers.out
+$ READ/END_OF_FILE=Dec_c_cleanup CONFIG line
+$Dec_c_cleanup:
+$ CLOSE CONFIG
+$! DELETE/NOLOG/NOCONFIRM deccvers.*;
+$ echo "You are using Dec C ''line'"
+$ Dec_C_Version = line
+$ ENDIF
+$Vaxc_Invoke_check:
+$ IF "''Using_Vax_C'".EQS."Yes"
+$ THEN
+$ echo ""
+$ echo4 "Checking to see how to invoke Vax C..."
+$ OPEN/WRITE CONFIG vaxcchk.c
+$ WRITE CONFIG "#include <stdio.h>"
+$ WRITE CONFIG "int main() {"
+$ WRITE CONFIG " printf(""%i\n"", ""1"");"
+$ WRITE CONFIG " exit(0);"
+$ WRITE CONFIG "}"
+$ CLOSE CONFIG
+$ DEFINE SYS$ERROR _NLA0:
+$ DEFINE SYS$OUTPUT _NLA0:
+$ SET NOON
+$ cc/vaxc/NoObj vaxcchk.c
+$ tmp = $status
+$ DEASSIGN SYS$OUTPUT
+$ DEASSIGN SYS$ERROR
+$ SET ON
+$ IF (silent) THEN GOSUB Shut_up
+$ IF tmp.NE.%X10B90001
+$ THEN
+$ Mcc = "cc"
+$ ELSE
+$ Mcc = "cc/vaxc"
+$ ENDIF
+$Vax_c_cleanup:
+$ DELETE/NOLOG/NOCONFIRM vaxcchk.*;
+$ ENDIF
+$Gcc_check:
+$ if "''using_gnu_c'" .eqs. "Yes"
+$ THEN
+$ vaxcrtl_olb = F$SEARCH("SYS$LIBRARY:VAXCRTL.OLB")
+$ vaxcrtl_exe = F$SEARCH("SYS$SHARE:VAXCRTL.EXE")
+$ gcclib_olb = F$SEARCH("GNU_CC:[000000]GCCLIB.OLB")
+$ IF gcclib_olb .EQS. ""
+$ THEN
+$! These objects/libs come w/ gcc 2.7.2 for AXP:
+$ tmp = F$SEARCH("GNU_CC:[000000]libgcc2.olb")
+$ IF tmp .NES. "" then gcclib_olb = tmp
+$ tmp = F$SEARCH("GNU_CC:[000000]libgcclib.olb")
+$ IF tmp .NES. ""
+$ THEN
+$ IF gcclib_olb .EQS. ""
+$ THEN gcclib_olb = tmp
+$ ELSE gcclib_olb = gcclib_olb + "/lib," + tmp
+$ ENDIF
+$ ENDIF
+$ tmp = F$SEARCH("SYS$LIBRARY:VAXCRTL.OLB")
+$ IF tmp .NES. ""
+$ THEN
+$ IF gcclib_olb .EQS. ""
+$ THEN gcclib_olb = tmp
+$ ELSE gcclib_olb = gcclib_olb + "/lib," + tmp
+$ ENDIF
+$ ENDIF
+$ tmp = F$SEARCH("GNU_CC:[000000]crt0.obj")
+$ IF tmp .NES. ""
+$ THEN
+$ IF gcclib_olb .EQS. ""
+$ THEN gcclib_olb = tmp
+$ ELSE gcclib_olb = gcclib_olb + "/lib," + tmp
+$ ENDIF
+$ ENDIF
+$ IF gcclib_olb .EQS. vaxcrtl_olb THEN gcclib_olb = "" !goofy order of axplibs
+$ ELSE
+$ gcclib_olb = gcclib_olb + "/lib"
+$ ENDIF
+$ IF gcclib_olb .NES. "" .AND. -
+ (vaxcrtl_olb .NES. "" .OR. -
+ vaxcrtl_exe .NES. "" )
+$ THEN
+$ echo ""
+$ echo4 "Checking for GNU cc in disguise and/or its version number..." !>&4
+$ OPEN/WRITE CONFIG gccvers.c
+$ WRITE CONFIG "#include <stdlib.h>" !DECC is sooo picky
+$ WRITE CONFIG "#include <stdio.h>"
+$ WRITE CONFIG "int main() {"
+$ WRITE CONFIG "#ifdef __GNUC__"
+$ WRITE CONFIG "#ifdef __VERSION__"
+$ WRITE CONFIG " printf(""%s\n"", __VERSION__);"
+$ WRITE CONFIG "#else"
+$ WRITE CONFIG " printf(""%s\n"", ""1"");"
+$ WRITE CONFIG "#endif"
+$ WRITE CONFIG "#endif"
+$ WRITE CONFIG " exit(0);"
+$ WRITE CONFIG "}"
+$ CLOSE CONFIG
+$ DEFINE SYS$ERROR _NLA0:
+$ DEFINE SYS$OUTPUT _NLA0:
+$ 'Mcc' gccvers.c
+$ tmp = $status
+$ DEASSIGN SYS$ERROR _NLA0:
+$ DEASSIGN SYS$OUTPUT _NLA0:
+$ IF (silent) THEN GOSUB Shut_up
+$ DEFINE SYS$ERROR _NLA0:
+$ DEFINE SYS$OUTPUT _NLA0:
+$ IF vaxcrtl_exe .EQS. ""
+$ THEN
+$ IF F$LOCATE("VAXCRTL",gcclib_olb).NE.F$LENGTH(gcclib_olb)
+$ THEN
+$ link gccvers.obj,'gcclib_olb',SYS$LIBRARY:VAXCRTL/Library
+$ tmp = $status
+$ ELSE
+$ link gccvers.obj,'gcclib_olb'
+$ tmp = $status
+$ ENDIF
+$ ELSE
+$ OPEN/WRITE CONFIG GCCVERS.OPT
+$ WRITE CONFIG "SYS$SHARE:VAXCRTL/SHARE"
+$ CLOSE CONFIG
+$ link gccvers.obj,GCCVERS.OPT/OPT,'gcclib_olb'
+$ tmp = $status
+$ ENDIF
+$ DEASSIGN SYS$ERROR
+$ DEASSIGN SYS$OUTPUT
+$ IF (silent) THEN GOSUB Shut_up
+$ OPEN/WRITE CONFIG gccvers.out
+$ DEFINE SYS$ERROR CONFIG
+$ DEFINE SYS$OUTPUT CONFIG
+$ mcr []gccvers.exe
+$ tmp = $status
+$ CLOSE CONFIG
+$ DEASSIGN SYS$OUTPUT
+$ DEASSIGN SYS$ERROR
+$ IF (silent) THEN GOSUB Shut_up
+$ OPEN/READ CONFIG gccvers.out
+$ READ/END_OF_FILE=Gcc_cleanup CONFIG line
+$Gcc_cleanup:
+$ CLOSE CONFIG
+$ DELETE/NOLOG/NOCONFIRM gccvers.*;
+$ IF F$LOCATE("GNU C version ",line).NE.F$LENGTH(line)
+$ THEN
+$ echo "You are not using GNU cc."
+$ GOTO Host_name
+$ ELSE
+$ echo "You are using GNU cc ''line'"
+$ Using_Gnu_C = "Yes"
+$ C_COMPILER_Replace = "CC=cc=''Mcc'"
+$ GOTO Include_dirs
+$ ENDIF
+$ ENDIF
+$endif
+$ GOTO Host_name
+$!
+$List_Parse:
+$ OPEN/READ CONFIG ccvms.lis
+$ READ CONFIG line
+$ IF (F$GETSYI("HW_MODEL") .LT. 1024)
+$ THEN
+$ read CONFIG line
+$ archsufx = "VAX"
+$ ELSE
+$ archsufx = "AXP"
+$ ENDIF
+$ CLOSE CONFIG
+$ line = F$EDIT(line,"TRIM,COMPRESS")
+$ line = line - "Page 1" ! occurs at end all compilers
+$ line = line - "CCVMS " ! filename appears w/ VAXC
+$ line = line - "Source Listing " ! Seen w/ AXP DECC
+$ tmp = F$EXTRACT(0,20,line) !timestamp, e.g. "30-JUL-1996 21:12:54 "
+$ line = line - tmp
+$ line = F$EDIT(line,"TRIM") !bit redundant but we're in no big hurry
+$ DELETE/NOLOG/NOCONFIRM ccvms.lis;
+$ RETURN
+$!
+$Include_dirs:
+$!: What should the include directory be ?
+$ dflt = gcclib_olb
+$ rp = "Where are the include files you want to use? "
+$ IF f$length( rp + "[''dflt'] " ).gt.76
+$ THEN rp = F$FAO("!AS!/!AS",rp,"[''dflt'] ")
+$ ELSE rp = rp + "[''dflt'] "
+$ ENDIF
+$ GOSUB myread
+$ usrinc = ans
+$!
+$!: see if we have to deal with yellow pages, now NIS.
+$!: now get the host name
+$Host_name:
+$ echo ""
+$ echo4 "Figuring out host name..." !>&4
+$ myhostname = ""
+$ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("ARPANET_HOST_NAME")
+$ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("INTERNET_HOST_NAME")
+$ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("MULTINET_HOST_NAME")
+$ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("UCX$INET_HOST_NAME")
+$ IF myhostname.eqs."".and. -
+ F$TRNLNM("UCX$INET_HOST") .nes. "" .and. -
+ F$TRNLNM("UCX$INET_DOMAIN") .nes. "" THEN -
+ myhostname = F$TRNLNM("UCX$INET_HOST") + "." + F$TRNLNM("UCX$INET_DOMAIN")
+$ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("TCPWARE_DOMAINNAME")
+$ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("NEWS_ADDRESS")
+$ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("SYS$NODE") - "::"
+$ IF myhostname.eqs."" THEN myhostname = F$EDIT(F$GETSYI("SCSNODE"),"TRIM")
+$!: you do not want to know about this
+$!: verify guess
+$ rp = "Your host name appears to be """"''myhostname'"""". Right? "
+$ GOSUB myread
+$ IF (.not.ans).and.(ans.NES."")
+$ THEN
+$ READ SYS$COMMAND/PROMPT= -
+ "Please type the (one word) name of your host: " ans
+$ myhostname = ans
+$ ENDIF
+$!: translate upper to lower if necessary
+$ myhostname = F$EDIT(myhostname,"COLLAPSE")
+$ mylowhostname = F$EDIT(myhostname," LOWERCASE")
+$ IF mylowhostname.NES.myhostname
+$ THEN
+$ echo "(Normalizing case in your host name)"
+$ myhostname = mylowhostname
+$ ENDIF
+$!
+$ fp = F$LOCATE(".",myhostname)
+$ mydomain = F$EXTRACT(fp,(F$LENGTH(myhostname)-fp)+1,myhostname)
+$ IF mydomain.NES."" !no periods in DECnet names like "MYDECNODE::"
+$ THEN
+$ rp = "What is your domain name? [''mydomain'] "
+$ GOSUB myread
+$ IF ans THEN mydomain = ans
+$!: translate upper to lower if necessary
+$ mydomain = F$EDIT(mydomain,"COLLAPSE")
+$ mylowdomain = F$EDIT(mydomain," LOWERCASE")
+$ IF mylowdomain.NES.mydomain
+$ THEN
+$ echo "(Normalizing case in your domain name)"
+$ mydomain = mylowdomain
+$ ENDIF
+$ ENDIF
+$ myhostname = myhostname - mydomain
+$ echo "(Trimming domain name from host name--host name is now ''myhostname')"
+$ IF .NOT.silent
+$ THEN TYPE SYS$INPUT:
+
+I need to get your e-mail address in Internet format if possible, i.e.
+something like user@host.domain. Please answer accurately since I have
+no easy means to double check it. The default value provided below
+is most probably close to the reality but may not be valid from outside
+your organization...
+$ ENDIF
+$ dflt = "''cf_by@''myhostname'"+"''mydomain'"
+$ rp = "What is your e-mail address? [''dflt'] "
+$ GOSUB myread
+$ IF ans
+$ THEN cf_email = ans
+$ ELSE cf_email = dflt
+$ ENDIF
+$!
+$ IF .NOT.silent
+$ THEN TYPE SYS$INPUT:
+
+If you or somebody else will be maintaining perl at your site, please
+fill in the correct e-mail address here so that they may be contacted
+if necessary. Currently, the "perlbug" program included with perl
+will send mail to this address in addition to perlbug@perl.com. You may
+enter "none" for no administrator.
+$ ENDIF
+$ dflt = "''cf_email'"
+$ rp = "Perl administrator e-mail address [''dflt'] "
+$ GOSUB myread
+$ IF ans
+$ THEN perladmin = ans
+$ ELSE perladmin = dflt
+$ ENDIF
+$!
+$!: determine where public executable scripts go
+$!: determine perl absolute location
+$!: figure out how to guarantee perl startup
+$!
+$!: see how we invoke the C preprocessor
+$! echo ""
+$! echo4 "Now, how can we feed standard input to your C preprocessor..." !>&4
+$!: Set private lib path
+$!: Now check and see which directories actually exist, avoiding duplicates
+$!: determine optimize, if desired, or use for debug flag also
+$!: We will not override a previous value, but we might want to
+$!: augment a hint file
+$!: the following weeds options from ccflags that are of no interest to cpp
+$!: flags used in final linking phase
+$!: Try to guess additional flags to pick up local libraries.
+$!: coherency check
+$! echo ""
+$! echo4 "Checking your choice of C compiler and flags for coherency..." !>&4
+$!: compute shared library extension
+$!: Looking for optional libraries
+$!: see if nm is to be used to determine whether a symbol is defined or not
+$!: get list of predefined functions in a handy place
+$!: see if we have sigaction
+$!: see whether socketshr exists
+$ IF (F$SEARCH(F$PARSE("SocketShr","Sys$Share:.Exe")).NES."")
+$ THEN
+$ has_socketshr = "T"
+$ echo ""
+$ echo4 "Hmm... Looks like you have SOCKETSHR's Berkeley networking support."
+$ endif
+$ if (Dec_C_Version .ge. 50200000)
+$ THEN
+$ Has_Dec_C_Sockets = "T"
+$ echo ""
+$ echo4 "Hmm... Looks like you've got Dec C's Berkeley networking support."
+$ ENDIF
+$ ! Hey, we've got both. Default to Dec C, then, since it's better
+$ if ("''Has_socketshr'".eq."T") .or.("''has_dec_c_sockets'".eq."T")
+$ THEN
+$ echo ""
+$ echo "You've got sockets available. Which socket stack do you want to"
+$ echo "build into perl?"
+$ if "''has_dec_c_sockets'".eqs."T"
+$ THEN
+$ dflt = "DECC"
+$ else
+$ dflt = "SOCKETSHR"
+$ endif
+$ rp = "Choose socket stack (NONE"
+$ if "''has_socketshr'".eqs."T" THEN rp = rp + ",SOCKETSHR"
+$ if "''has_dec_c_sockets'".eqs."T" THEN rp = rp + ",DECC"
+$ rp = rp + ") [''dflt'] "
+$ GOSUB myread
+$ IF "''ans'".eqs."" THEN ans = "''dflt'"
+$ has_dec_c_sockets = "F"
+$ has_socketshr = "F"
+$ ans = F$EDIT(ans,"TRIM,COMPRESS,LOWERCASE")
+$ IF ans.eqs."decc" then has_dec_c_sockets = "T"
+$ IF ans.eqs."socketshr" then has_socketshr = "T"
+$ endif
+$!
+$!
+$! Ask about threads, if appropriate
+$ if (Using_Dec_C.eqs."Yes")
+$ THEN
+$ echo "This version of Perl can be built with threads. While really nifty,
+$ echo "they are a beta feature, and there is a speed penalty for perl
+$ echo "programs if you build with threads *even if you don't use them*
+$ echo ""
+$ dflt = "n"
+$ rp = "Build with threads? [''dflt'] "
+$ GOSUB myread
+$ if ans.eqs."" then ans = dflt
+$ if (f$extract(0, 1, "''ans'").eqs."Y").or.(f$extract(0, 1, "''ans'").eqs."y")
+$ THEN
+$ use_threads="T"
+$ ! Are they on VMS 7.1 on an alpha?
+$ if (Archname.eqs."VMS_AXP").and.("''f$extract(1,3, f$getsyi(""version""))'".ges."7.1")
+$ THEN
+$ echo ""
+$ echo "Threaded perl can be linked to use multiple kernel threads
+$ echo "and system upcalls on VMS 7.1+ on Alpha systems. This feature
+$ echo "allows multiple threads to execute simultaneously on an SMP
+$ echo "system as well as preventing a single thread from blocking
+$ echo "all the threads in a program, even on a single-processor
+$ echo "machine. Unfortunately this feature isn't safe on an
+$ echo "unpatched 7.1 system. (Several OS patches were required when
+$ echo "this procedure was written)
+$ echo ""
+$ dflt = "n"
+$ rp = "Enable multiple kernel threads and upcalls? [''dflt'] "
+$ gosub myread
+$ if ans.eqs."" then ans="''dflt'"
+$ if f$extract(0, 1, f$edit(ans,"TRIM,COMPRESS,UPCASE")).eqs."Y"
+$ THEN
+$ Thread_Live_Dangerously = "MT=MT=1"
+$ ENDIF
+$ ENDIF
+$ ENDIF
+$ ENDIF
+$!
+$! Pre-load %ENV?
+$ echo ""
+$ echo "Because of the way perl fetches the list of logical names
+$ echo "for the %ENV hash (we spawn a subprocess that does a
+$ echo "SHOW LOGICALS *, which is expensive), we defer fetching it
+$ echo "until the first time a program iterates over the %ENV hash.
+$ echo "This means things like 'exists($ENV{'SYS$MANAGER'})' will
+$ echo "return false unless you've already accessed $ENV{SYS$MANAGER}
+$ echo "or done something like a keys %ENV."
+$ echo ""
+$ echo "If you choose, perl can populate the %ENV hash at startup.
+$ echo "This will exact both a memory penalty (to store the keys) and
+$ echo "a time penalty (to spawn the subprocess) every time you invoke
+$ echo "perl. Depending on your system, this might not be a big deal.
+$ echo ""
+$ dflt = "n"
+$ rp = "Populate %ENV at startup time? [''dflt'] "
+$ GOSUB myread
+$ if ans.eqs."" then ans="''dflt'"
+$ preload_env = f$extract(0, 1, f$edit(ans,"TRIM,COMPRESS,UPCASE"))
+$!
+$! Ask if they want to use perl's memory allocator
+$ echo ""
+$ echo "Perl has a built-in memory allocator that's tuned for perl's
+$ echo "normal memory usage. It's oftentimes better than the standard
+$ echo "system memory allocator. It also has the advantage of providing
+$ echo "memory allocation statistics, if you choose to enable them.
+$ echo ""
+$ dflt = "n"
+$ rp = "Build with perl's memory allocator? [''dflt'] "
+$ GOSUB myread
+$ if ans.eqs."" then ans="''dflt'"
+$ mymalloc = f$extract(0, 1, f$edit(ans,"TRIM,COMPRESS,UPCASE"))
+$ if mymalloc.eqs."Y"
+$ THEN
+$ if use_debugging_perl.eqs."Y"
+$ THEN
+$ echo ""
+$ echo "Perl can keep statistics on memory usage if you choose to use
+$ echo "them. This is useful for debugging, but does have some
+$ echo "performance overhead.
+$ echo ""
+$ dflt = "n"
+$ rp = "Do you want the debugging memory allocator? [''dflt'] "
+$ gosub myread
+$ if ans.eqs."" then ans="''dflt'"
+$ use_debugmalloc = f$extract(0, 1, f$edit(ans, "TRIM,COMPRESS,UPCASE"))
+$ ENDIF
+$ ! Check which memory allocator we want
+$ echo ""
+$ echo "There are currently three different memory allocators: the
+$ echo "default (which is a pretty good general-purpose memory manager),
+$ echo "the TWO_POT allocator (which is optimized to save memory for
+$ echo "larger allocations), and PACK_MALLOC (which is optimized to save
+$ echo "memory for smaller allocations). They're all good, but if your
+$ echo "usage tends towards larger chunks use TWO_POT, otherwise use
+$ echo "PACK_MALLOC."
+$ echo ""
+$ dflt = "DEFAULT"
+$ rp = "Memory allocator (DEFAULT, TWO_POT, PACK_MALLOC) [''dflt'] "
+$ GOSUB myread
+$ if ans.eqs."" then ans = "''dflt'"
+$ if ans.eqs."TWO_POT" then use_two_pot_malloc = "Y"
+$ if ans.eqs."PACK_MALLOC" then use_pack_malloc = "Y"
+$ ENDIF
+$!
+$! Ask for their default list of extensions to build
+$ echo ""
+$ echo "It's time to specify which modules you want to build into
+$ echo "perl. Most of these are standard and should be chosen, though
+$ echo "you might, for example, want to build GDBM_File instead of
+$ echo "SDBM_File if you have the GDBM library built on your machine
+$ echo "
+$ echo "Which modules do you want to build into perl?"
+$ dflt = "Fcntl Errno IO Opcode Dumper attrs re Stdio DCLsym B SDBM_File"
+$ if Using_Dec_C.eqs."Yes"
+$ THEN
+$ dflt = dflt + " POSIX"
+$ if Use_Threads.eqs."T"
+$ THEN
+$ dflt = dflt + " Thread"
+$ ENDIF
+$ ENDIF
+$ rp = "[''dflt'] "
+$ GOSUB myread
+$ if ans.eqs."" then ans = "''dflt'"
+$ extensions = "''ans'"
+$!
+$! %Config-I-VMS, determine build/make utility here (make gmake mmk mms)
+$ echo ""
+$ echo "%Config-I-VMS, Checking your ""make"" utilities..."
+$! If the 'build' that you use is not here add it and it's test
+$! switch to the _END_ of these strings (and increment max_build)
+$! (e.g. builders = builders + "/FOOMAKE"
+$! probers = probers + " -fooVersionSwitch"
+$! ) & please let me know about it.
+$ builders = "IMAKE/GNUMAKE/MGMAKE/GMAKE/MAKE/MMS/MMK"
+$ probers = "-f Makefile. -v!-f Makefile. -v!-f Makefile. -v!-f Makefile. -v!-f Makefile. -v!/IDENT!/IDENT"
+$ max_build = 7
+$!
+$ orig_dflt = "MMK"
+$ default_set = ""
+$ ok_builders = ""
+$ OPEN/WRITE/ERROR=Open_error CONFIG Makefile.
+$ WRITE CONFIG "dont_make_anything_yet:"
+$ WRITE CONFIG F$FAO("!_")
+$ CLOSE CONFIG
+$ n = 0
+$ messages = F$ENVIRONMENT("MESSAGE")
+$Build_probe:
+$ build = F$ELEMENT(n,"/",builders)
+$ probe = F$ELEMENT(n,"!",probers)
+$ echo "Testing whether you have ''build' on your system..."
+$ SET NOON !sorry :-(
+$ ON CONTROL_Y THEN GOTO Reenable_messages_build !sorry :-(
+$ SET MESSAGE/NOFAC/NOSEV/NOIDENT/NOTEXT !sorry :-(
+$ 'build' 'probe'
+$ IF ($SEVERITY .EQ. 1)
+$ THEN
+$ echo "OK."
+$ IF (build .EQS. orig_dflt)
+$ THEN
+$ default_set = "TRUE"
+$ dflt = build
+$ ENDIF
+$ ok_builders = ok_builders + " " + build
+$ IF (.NOT. default_set) THEN dflt = build
+$ ELSE
+$ echo "Nope."
+$ ENDIF
+$Reenable_messages_build: !hope you made it here :-)
+$ SET MESSAGE 'messages' !hope you made it here :-)
+$ SET ON !hope you made it here :-)
+$ n = n + 1
+$ IF (n .LT. max_build) THEN GOTO Build_probe
+$!
+$ echo ""
+$ IF (ok_builders .NES. "")
+$ THEN
+$ echo "Here is the list of builders you can apparently use:"
+$ echo "(",ok_builders," )"
+$ rp = "Which """"make"""" utility do you wish to use [''dflt']? "
+$ GOSUB myread
+$ ans = F$EDIT(ans,"TRIM, COMPRESS")
+$ ans = F$EXTRACT(0,F$LOCATE(" ",ans),ans) !throw out "-f Makefile." here
+$ IF (ans .EQS. "")
+$ THEN build = dflt
+$ ELSE build = ans
+$ ENDIF
+$ ELSE
+$ TYPE SYS$INPUT:
+
+%Config-E-VMS, ERROR:
+ Well this looks pretty serious. Perl5 cannot be compiled without a "make"
+ utility of some sort and after checking my "builders" list I cannot find
+ the symbol or command you use on your system to compile programs.
+
+$ READ SYS$COMMAND/PROMPT="%Config-I-VMS, Which ""MMS"" do you use? " ans
+$ ans = F$EDIT(ans,"TRIM, COMPRESS")
+$ ans = F$EXTRACT(0,F$LOCATE(" ",ans),ans) !throw out "-f Makefile." here
+$ IF (ans .EQS. "")
+$ THEN build = dflt
+$ echo "I don't know where 'make' is, and my life depends on it."
+$ echo "Go find a make program or fix your DCL$PATH setting!"
+$ echo "ABORTING..."
+$ SET DEFAULT 'vms_default_directory_name' !be kind rewind
+$ STOP
+$ EXIT 2 !$STATUS = "%X00000002" (error)
+$ ELSE
+$ build = ans
+$ ENDIF
+$ ENDIF
+$!
+$ DELETE/NOLOG Makefile.;
+$ GOTO Beyond_open
+$Open_error:
+$ TYPE SYS$INPUT:
+
+ There seems to be trouble. I just tried to create a file in
+$ echo4 'F$ENVIRONMENT("DEFAULT")'
+$ TYPE SYS$INPUT:
+ but was unsuccessful. I am stopping now. Please check that directories'
+ PROTECTION bits. I will leave you in the directory where you started
+ Configure.com
+$ echo4 "ABORTING..."
+$ GOTO Clean_up
+$ STOP
+$ EXIT
+$!
+$Beyond_open:
+$! echo " Very well I will proceed with ""''build'"""
+$ make = F$EDIT(build,"UPCASE")
+$!
+$!: locate the preferred pager for this system
+$!pagers = "most|more|less|type/page"
+$!rp='What pager is used on your system?'
+$!
+$! update [.vms]config.vms here
+$!
+$! update makefile here
+$! echo4 "Updating makefile..."
+$!
+$ IF (make .EQS. "MMS").OR.(make .EQS. "MMK")
+$ THEN
+$ makefile = "" !wrt MANIFEST dir
+$ UUmakefile = "DESCRIP.MMS" !wrt CWD dir
+$ DEFmakefile = "DESCRIP.MMS" !wrt DEF dir (?)
+$ ELSE
+$ makefile = " -f [.VMS]Makefile." !wrt MANIFEST dir
+$ UUmakefile = "[-.VMS]Makefile." !wrt CWD dir
+$ DEFmakefile = "[-.VMS]Makefile." !wrt DEF dir (?)
+$ ENDIF
+$!
+$ IF macros.NES.""
+$ THEN
+$ tmp = F$LENGTH(macros)
+$ macros = F$EXTRACT(0,(tmp-1),macros) !miss trailing comma
+$ macros = "/macro=(" + macros + ")"
+$ ENDIF
+$!
+$! Invoke the subconfig piece
+$!
+$ echo ""
+$ echo4 "Checking the C Run time library"
+$ dflt = F$ENVIRONMENT("DEFAULT")
+$ SET DEFAULT [-.vms]
+$ @subconfigure
+$ SET DEFAULT 'dflt
+$!
+$! %Config-I-VMS, write perl_setup.com here
+$!
+$ echo ""
+$ echo4 "%Config-I-VMS, The perl_setup.com file is now being written..."
+$ file_2_find = "[-.vms]perl_setup.com"
+$ OPEN/WRITE CONFIG 'file_2_find'
+$ WRITE CONFIG "$!"
+$ WRITE CONFIG "$! Perl_Setup.com ''cf_time'"
+$ IF cf_email.NES.perladmin
+$ THEN
+$ WRITE CONFIG "$! perl configured by ''cf_email'"
+$ ELSE
+$ WRITE CONFIG "$! This perl configured & administered by ''perladmin'"
+$ ENDIF
+$ WRITE CONFIG "$!"
+$ IF F$LOCATE(".]",prefix) .EQ. F$LENGTH(prefix) THEN -
+ prefix = prefix - "]" + ".]"
+$ WRITE CONFIG "$ define/translation=concealed Perl_Root ''prefix'"
+$ WRITE CONFIG "$ perl :== $Perl_Root:[000000]Perl"
+$ WRITE CONFIG "$ define PerlShr Perl_Root:[000000]PerlShr.Exe"
+$ IF (tzneedset)
+$ THEN
+$ WRITE CONFIG "$ define SYS$TIMEZONE_DIFFERENTIAL ''tzd'"
+$ ELSE !leave in but commented out (in case setting was from perl :-)
+$ WRITE CONFIG "$! define SYS$TIMEZONE_DIFFERENTIAL ''tzd'"
+$ ENDIF
+$ WRITE CONFIG "$!"
+$ WRITE CONFIG "$! Symbols for commonly used scripts:"
+$ WRITE CONFIG "$!"
+$ WRITE CONFIG "$ Perldoc == ""'"+"'Perl' Perl_Root:[lib.pod]Perldoc.com -t"""
+$ CLOSE CONFIG
+$!
+$ echo ""
+$ echo "%Config-I-VMS, The file can be found at:"
+$ echo4 "-Config-I-VMS, ''F$SEARCH(file_2_find)'"
+$ echo "-Config-I-VMS, Add that file (or an @ call to it) to your [SY]LOGIN.COM"
+$ echo "-Config-I-VMS, when you are satisfied with a successful compilation,"
+$ echo "-Config-I-VMS, testing, and installation of your perl."
+$ echo ""
+$!
+$!figure out where we "are" by parsing 'vms_default_directory_name'
+$!
+$ set_def_command = ""
+$ dflt = F$ENVIRONMENT("DEFAULT") - ".UU]"
+$ tmp = vms_default_directory_name - dflt - "]"
+$ i = 0
+$ IF tmp .EQS. "" THEN GOTO Beyond_set_def_loop
+$Set_def_loop:
+$ tmp1 = F$ELEMENT(i,".",tmp)
+$ IF tmp1 .EQS. "." THEN GOTO Beyond_set_def_loop
+$ IF i .EQ. 0
+$ THEN set_def_command = "set default [-"
+$ ELSE set_def_command = set_def_command + "-"
+$ ENDIF
+$ i = i + 1
+$ GOTO Set_def_loop
+$Beyond_set_def_loop:
+$ IF set_def_command.NES.""
+$ THEN
+$ set_def_command = set_def_command - "-" + "]"
+$ echo4 ""
+$ echo4 "In order to build ''package' you must now issue the commands:"
+$ echo4 ""
+$ echo4 " ''set_def_command'"
+$ ELSE
+$ echo4 ""
+$ echo4 "In order to build ''package' you must now issue the command:"
+$ echo4 ""
+$ ENDIF
+$ echo4 " ''make'''makefile'", macros
+$ echo4 ""
+$!
+$Clean_up:
+$ IF (silent)
+$ THEN
+$ DEASSIGN SYS$OUTPUT
+$! DEASSIGN SYS$ERROR
+$ ENDIF
+$ IF F$GETJPI("","FILCNT").NE.vms_filcnt THEN CLOSE CONFIG
+$ IF F$GETJPI("","FILCNT").NE.vms_filcnt
+$ THEN WRITE SYS$ERROR "%Config-W-VMS, WARNING: There is a file still open"
+$ ENDIF
+$ dflt = F$ENVIRONMENT("DEFAULT")
+$ IF F$LOCATE("UU]",dflt).EQS.(F$LENGTH(dflt)-3)
+$ THEN
+$ IF ( F$SEARCH("[]*.*").NES."" ) THEN DELETE/NOLOG/NOCONFIRM []*.*;*
+$ SET DEFAULT [-]
+$ SET PROTECTION=(SYSTEM:RWED,OWNER:RWED) UU.DIR
+$ DELETE/NOLOG/NOCONFIRM UU.DIR;
+$ ENDIF
+$ SET DEFAULT 'vms_default_directory_name' !be kind rewind
+$ STOP
+$ EXIT
+$!: End of Configure
diff --git a/gnu/usr.bin/perl/djgpp/config.over b/gnu/usr.bin/perl/djgpp/config.over
new file mode 100644
index 00000000000..b81c6970968
--- /dev/null
+++ b/gnu/usr.bin/perl/djgpp/config.over
@@ -0,0 +1,39 @@
+ln='cp'
+pager='less'
+
+# fix extension names under DOS
+repair()
+{
+ echo "$1" | \
+ sed \
+ -e 's/^b/B/'\
+ -e 's=\([^a-z_]\)b=\1B='\
+ -e 's=data/dumper=Data/Dumper='\
+ -e 's/db_file/DB_File/'\
+ -e 's/dynaload/DynaLoader/'\
+ -e 's/errno/Errno/'\
+ -e 's/fcntl/Fcntl/'\
+ -e 's/gdbm_fil/GDBM_File/'\
+ -e 's/io/IO/'\
+ -e 's/SysV//'\
+ -e 's/sysv//'\
+ -e 's=ipc/=='\
+ -e 's=IPC/=='\
+ -e 's/ndbm_fil/NDBM_File/'\
+ -e 's/odbm_fil/ODBM_File/'\
+ -e 's/opcode/Opcode/'\
+ -e 's/posix/POSIX/'\
+ -e 's/sdbm_fil/SDBM_File/'\
+ -e 's/socket/Socket/'\
+ -e 's/thread/Thread/'
+}
+static_ext=$(repair "$static_ext")
+extensions=$(repair "$extensions")
+known_extensions=$(repair "$known_extensions")
+nonxs_ext=$(repair "$nonxs_ext")
+
+# I use Dos::UseLFN in AutoSplit.pm to override this under win0.95
+d_flexfnam='undef'
+
+# under W95 + bash the test program returns bogus result
+d_casti32='undef'
diff --git a/gnu/usr.bin/perl/djgpp/configure.bat b/gnu/usr.bin/perl/djgpp/configure.bat
new file mode 100644
index 00000000000..64b46ec34f7
--- /dev/null
+++ b/gnu/usr.bin/perl/djgpp/configure.bat
@@ -0,0 +1,37 @@
+@echo off
+set CONFIG=
+set PATH_SEPARATOR=;
+set PATH_EXPAND=y
+sh -c 'if test $PATH_SEPARATOR = ";"; then exit 1; fi'
+if ERRORLEVEL 1 goto path_sep_ok
+echo Error:
+echo Make sure the environment variable PATH_SEPARATOR=; while building perl!
+echo Please check your DJGPP.ENV!
+goto end
+
+:path_sep_ok
+sh -c 'if test $PATH_EXPAND = "Y" -o $PATH_EXPAND = "y"; then exit 1; fi'
+if ERRORLEVEL 1 goto path_exp_ok
+echo Error:
+echo Make sure the environment variable PATH_EXPAND=Y while building perl!
+echo Please check your DJGPP.ENV!
+goto end
+
+:path_exp_ok
+sh -c '$SHELL -c "exit 128"'
+if ERRORLEVEL 128 goto shell_ok
+
+echo Error:
+echo The SHELL environment variable must be set to the full path of your sh.exe!
+goto end
+
+:shell_ok
+sh -c 'if test ! -d /tmp; then mkdir /tmp; fi'
+cp djgpp.c config.over ..
+cd ..
+echo Running sed...
+sh djgpp/djgppsed.sh
+
+echo Running Configure...
+sh Configure %1 %2 %3 %4 %5 %6 %7 %8 %9
+:end
diff --git a/gnu/usr.bin/perl/djgpp/djgpp.c b/gnu/usr.bin/perl/djgpp/djgpp.c
new file mode 100644
index 00000000000..3a3a1fc5264
--- /dev/null
+++ b/gnu/usr.bin/perl/djgpp/djgpp.c
@@ -0,0 +1,436 @@
+#include <libc/stubs.h>
+#include <io.h>
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <libc/file.h>
+#include <process.h>
+#include <fcntl.h>
+#include <glob.h>
+#include <sys/fsext.h>
+#include <crt0.h>
+#include "EXTERN.h"
+#include "perl.h"
+#include "XSUB.h"
+
+/* hold file pointer, command, mode, and the status of the command */
+struct pipe_list {
+ FILE *fp;
+ int exit_status;
+ struct pipe_list *next;
+ char *command, mode;
+};
+
+/* static, global list pointer */
+static struct pipe_list *pl = NULL;
+
+FILE *
+popen (const char *cm, const char *md) /* program name, pipe mode */
+{
+ struct pipe_list *l1;
+ int fd;
+ char *temp_name=NULL;
+
+ /* make new node */
+ if ((l1 = (struct pipe_list *) malloc (sizeof (*l1)))
+ && (temp_name = malloc (L_tmpnam)) && tmpnam (temp_name))
+ {
+ l1->fp = NULL;
+ l1->command = NULL;
+ l1->next = pl;
+ l1->exit_status = -1;
+ l1->mode = md[0];
+
+ /* if caller wants to read */
+ if (md[0] == 'r' && (fd = dup (fileno (stdout))) >= 0)
+ {
+ if ((l1->fp = freopen (temp_name, "wb", stdout)))
+ {
+ l1->exit_status = system (cm);
+ if (dup2 (fd, fileno (stdout)) >= 0)
+ l1->fp = fopen (temp_name, md);
+ }
+ close (fd);
+ }
+ /* if caller wants to write */
+ else if (md[0] == 'w' && (l1->command = malloc (1 + strlen (cm))))
+ {
+ strcpy (l1->command, cm);
+ l1->fp = fopen (temp_name, md);
+ }
+
+ if (l1->fp)
+ {
+ l1->fp->_flag |= _IORMONCL; /* remove on close */
+ l1->fp->_name_to_remove = temp_name;
+ return (pl = l1)->fp;
+ }
+ free (l1->command);
+ }
+ free (temp_name);
+ free (l1);
+ return NULL;
+}
+
+int
+pclose (FILE *pp)
+{
+ struct pipe_list *l1, **l2; /* list pointers */
+ int retval=-1; /* function return value */
+
+ for (l2 = &pl; *l2 && (*l2)->fp != pp; l2 = &((*l2)->next))
+ ;
+ if (!(l1 = *l2))
+ return retval;
+ *l2 = l1->next;
+
+ /* if pipe was opened to write */
+ if (l1->mode == 'w')
+ {
+ int fd;
+ fflush (l1->fp);
+ close (fileno (l1->fp));
+
+ if ((fd = dup (fileno (stdin))) >= 0
+ && (freopen (l1->fp->_name_to_remove, "rb", stdin)))
+ {
+ retval = system (l1->command);
+ dup2 (fd, fileno (stdin));
+ }
+ close (fd);
+ free (l1->command);
+ }
+ else
+ /* if pipe was opened to read, return the exit status we saved */
+ retval = l1->exit_status;
+
+ fclose (l1->fp); /* this removes the temp file */
+ free (l1);
+ return retval; /* retval==0 ? OK : ERROR */
+}
+
+/**/
+
+#define EXECF_SPAWN 0
+#define EXECF_EXEC 1
+
+static int
+convretcode (int rc,char *prog,int fl)
+{
+ if (rc < 0 && PL_dowarn)
+ warn ("Can't %s \"%s\": %s",fl ? "exec" : "spawn",prog,Strerror (errno));
+ if (rc > 0)
+ return rc <<= 8;
+ if (rc < 0)
+ return 255 << 8;
+ return 0;
+}
+
+int
+do_aspawn (SV *really,SV **mark,SV **sp)
+{
+ dTHR;
+ int rc;
+ char **a,*tmps,**argv;
+ STRLEN n_a;
+
+ if (sp<=mark)
+ return -1;
+ a=argv=(char**) alloca ((sp-mark+3)*sizeof (char*));
+
+ while (++mark <= sp)
+ if (*mark)
+ *a++ = SvPVx(*mark, n_a);
+ else
+ *a++ = "";
+ *a = Nullch;
+
+ if (argv[0][0] != '/' && argv[0][0] != '\\'
+ && !(argv[0][0] && argv[0][1] == ':'
+ && (argv[0][2] == '/' || argv[0][2] != '\\'))
+ ) /* will swawnvp use PATH? */
+ TAINT_ENV(); /* testing IFS here is overkill, probably */
+
+ if (really && *(tmps = SvPV(really, n_a)))
+ rc=spawnvp (P_WAIT,tmps,argv);
+ else
+ rc=spawnvp (P_WAIT,argv[0],argv);
+
+ return convretcode (rc,argv[0],EXECF_SPAWN);
+}
+
+#define EXTRA "\x00\x00\x00\x00\x00\x00"
+
+int
+do_spawn2 (char *cmd,int execf)
+{
+ char **a,*s,*shell,*metachars;
+ int rc,unixysh;
+
+ if ((shell=getenv("SHELL"))==NULL && (shell=getenv("COMSPEC"))==NULL)
+ shell="c:\\command.com" EXTRA;
+
+ unixysh=_is_unixy_shell (shell);
+ metachars=unixysh ? "$&*(){}[]'\";\\?>|<~`\n" EXTRA : "*?[|<>\"\\" EXTRA;
+
+ while (*cmd && isSPACE(*cmd))
+ cmd++;
+
+ if (strnEQ (cmd,"/bin/sh",7) && isSPACE (cmd[7]))
+ cmd+=5;
+
+ /* save an extra exec if possible */
+ /* see if there are shell metacharacters in it */
+ if (strstr (cmd,"..."))
+ goto doshell;
+ if (unixysh)
+ {
+ if (*cmd=='.' && isSPACE (cmd[1]))
+ goto doshell;
+ if (strnEQ (cmd,"exec",4) && isSPACE (cmd[4]))
+ goto doshell;
+ for (s=cmd; *s && isALPHA (*s); s++) ; /* catch VAR=val gizmo */
+ if (*s=='=')
+ goto doshell;
+ }
+ for (s=cmd; *s; s++)
+ if (strchr (metachars,*s))
+ {
+ if (*s=='\n' && s[1]=='\0')
+ {
+ *s='\0';
+ break;
+ }
+doshell:
+ if (execf==EXECF_EXEC)
+ return convretcode (execl (shell,shell,unixysh ? "-c" : "/c",cmd,NULL),cmd,execf);
+ return convretcode (system (cmd),cmd,execf);
+ }
+
+ New (1303,PL_Argv,(s-cmd)/2+2,char*);
+ PL_Cmd=savepvn (cmd,s-cmd);
+ a=PL_Argv;
+ for (s=PL_Cmd; *s;) {
+ while (*s && isSPACE (*s)) s++;
+ if (*s)
+ *(a++)=s;
+ while (*s && !isSPACE (*s)) s++;
+ if (*s)
+ *s++='\0';
+ }
+ *a=Nullch;
+ if (!PL_Argv[0])
+ return -1;
+
+ if (execf==EXECF_EXEC)
+ rc=execvp (PL_Argv[0],PL_Argv);
+ else
+ rc=spawnvp (P_WAIT,PL_Argv[0],PL_Argv);
+ return convretcode (rc,PL_Argv[0],execf);
+}
+
+int
+do_spawn (char *cmd)
+{
+ return do_spawn2 (cmd,EXECF_SPAWN);
+}
+
+bool
+do_exec (char *cmd)
+{
+ do_spawn2 (cmd,EXECF_EXEC);
+ return FALSE;
+}
+
+/**/
+
+struct globinfo
+{
+ int fd;
+ char *matches;
+ size_t size;
+ fpos_t pos;
+};
+
+#define MAXOPENGLOBS 10
+
+static struct globinfo myglobs[MAXOPENGLOBS];
+
+static struct globinfo *
+searchfd (int fd)
+{
+ int ic;
+ for (ic=0; ic<MAXOPENGLOBS; ic++)
+ if (myglobs[ic].fd==fd)
+ return myglobs+ic;
+ return NULL;
+}
+
+static int
+glob_handler (__FSEXT_Fnumber n,int *rv,va_list args)
+{
+ unsigned ic;
+ struct globinfo *gi;
+ switch (n)
+ {
+ case __FSEXT_open:
+ {
+ char *p1,*pattern,*name=va_arg (args,char*);
+ STRLEN len;
+ glob_t pglob;
+
+ if (strnNE (name,"/dev/dosglob/",13))
+ break;
+ if ((gi=searchfd (-1)) == NULL)
+ break;
+
+ gi->pos=0;
+ pattern=alloca (strlen (name+=13)+1);
+ strcpy (pattern,name);
+ if (!_USE_LFN)
+ strlwr (pattern);
+ ic=pglob.gl_pathc=0;
+ pglob.gl_pathv=NULL;
+ while (pattern)
+ {
+ if ((p1=strchr (pattern,' '))!=NULL)
+ *p1=0;
+ glob (pattern,ic,0,&pglob);
+ ic=GLOB_APPEND;
+ if ((pattern=p1)!=NULL)
+ pattern++;
+ }
+ for (ic=len=0; ic<pglob.gl_pathc; ic++)
+ len+=1+strlen (pglob.gl_pathv[ic]);
+ if (len)
+ {
+ if ((gi->matches=p1=(char*) malloc (gi->size=len))==NULL)
+ break;
+ for (ic=0; ic<pglob.gl_pathc; ic++)
+ {
+ strcpy (p1,pglob.gl_pathv[ic]);
+ p1+=strlen (p1)+1;
+ }
+ }
+ else
+ {
+ if ((gi->matches=strdup (name))==NULL)
+ break;
+ gi->size=strlen (name)+1;
+ }
+ globfree (&pglob);
+ gi->fd=*rv=__FSEXT_alloc_fd (glob_handler);
+ return 1;
+ }
+ case __FSEXT_read:
+ {
+ int fd=va_arg (args,int);
+ char *buf=va_arg (args,char*);
+ size_t siz=va_arg (args,size_t);
+
+ if ((gi=searchfd (fd))==NULL)
+ break;
+
+ if (siz+gi->pos>gi->size)
+ siz=gi->size-gi->pos;
+ memcpy (buf,gi->pos+gi->matches,siz);
+ gi->pos+=siz;
+ *rv=siz;
+ return 1;
+ }
+ case __FSEXT_close:
+ {
+ int fd=va_arg (args,int);
+
+ if ((gi=searchfd (fd))==NULL)
+ break;
+ free (gi->matches);
+ gi->fd=-1;
+ break;
+ }
+ default:
+ break;
+ }
+ return 0;
+}
+
+static
+XS(dos_GetCwd)
+{
+ dXSARGS;
+
+ if (items)
+ croak ("Usage: Dos::GetCwd()");
+ {
+ char tmp[PATH_MAX+2];
+ ST(0)=sv_newmortal ();
+ if (getcwd (tmp,PATH_MAX+1)!=NULL)
+ sv_setpv ((SV*)ST(0),tmp);
+ }
+ XSRETURN (1);
+}
+
+static
+XS(dos_UseLFN)
+{
+ dXSARGS;
+ XSRETURN_IV (_USE_LFN);
+}
+
+void
+init_os_extras()
+{
+ char *file = __FILE__;
+
+ dXSUB_SYS;
+
+ newXS ("Dos::GetCwd",dos_GetCwd,file);
+ newXS ("Dos::UseLFN",dos_UseLFN,file);
+
+ /* install my File System Extension for globbing */
+ __FSEXT_add_open_handler (glob_handler);
+ memset (myglobs,-1,sizeof (myglobs));
+}
+
+static char *perlprefix;
+
+#define PERL5 "/perl5"
+
+char *djgpp_pathexp (const char *p)
+{
+ static char expp[PATH_MAX];
+ strcpy (expp,perlprefix);
+ switch (p[0])
+ {
+ case 'B':
+ strcat (expp,"/bin");
+ break;
+ case 'S':
+ strcat (expp,"/lib" PERL5 "/site");
+ break;
+ default:
+ strcat (expp,"/lib" PERL5);
+ break;
+ }
+ return expp;
+}
+
+void
+Perl_DJGPP_init (int *argcp,char ***argvp)
+{
+ char *p;
+
+ perlprefix=strdup (**argvp);
+ strlwr (perlprefix);
+ if ((p=strrchr (perlprefix,'/'))!=NULL)
+ {
+ *p=0;
+ if (strEQ (p-4,"/bin"))
+ p[-4]=0;
+ }
+ else
+ strcpy (perlprefix,"..");
+}
+
diff --git a/gnu/usr.bin/perl/djgpp/djgppsed.sh b/gnu/usr.bin/perl/djgpp/djgppsed.sh
new file mode 100644
index 00000000000..5276f4f67fb
--- /dev/null
+++ b/gnu/usr.bin/perl/djgpp/djgppsed.sh
@@ -0,0 +1,49 @@
+#! /bin/sh
+
+# Change some files to work under DOS
+# Most of this stuff does .xx -> _xx and aa.bb.ccc -> aa_bb.cc conversion
+
+SCONFIG='s=\.\(config\)=_\1=g'
+SLIST='s=\.\([a-z]\+list\)=_\1=g'
+SGREPTMP='s=\.\(greptmp\)=_\1=g'
+SECHOTMP='s=\.\(echotmp\)=_\1=g'
+SDDC='s=\.\($$\.c\)=_\1=g'
+SOUT='s=\([^a-z1-9?]\)\.\(out\)=\1_\2=g'
+SEXISTS='s=\.\(exists\)=_\1=g'
+SPOD2HTML='s=pod2html-=pod2html.=g'
+SCC='s=\.c\.c=.c_c=g'
+SFILEC="s=\(\$file\)\.c=\\1'_c'=g"
+SCOR='s=c\\\.c|=c\_c|=g'
+SHSED='s=\.\(hsed\)=_\1=g'
+SDEPTMP='s=\.\(deptmp\)=_\1=g'
+SCPP='s=\.\(cpp\.\)=_\1=g'
+SARGV='s=\.\(argv\.\)=_\1=g'
+SABC='s=\.\([abc][^a]\)=_\1=g'
+SDBMX='s=\.\(dbmx\)=_\1=g'
+SDBHASH='s=dbhash\.tmp=dbhash_tmp=g'
+SSTAT='s=\.\(stat\.\)=_\1=g'
+STMP2='s=tmp2=tm2=g'
+SPACKLIST='s=\.\(packlist\)=_\1=g'
+
+sed -e $SCONFIG -e $SGREPTMP -e $SECHOTMP -e $SDDC -e $SOUT -e 's=\.\( \./\$file\)$=sh\1=g' Configure |tr -d '\r' >s; mv -f s Configure
+sed -e $SEXISTS -e $SLIST -e $SCONFIG Makefile.SH |tr -d '\r' >s; mv -f s Makefile.SH
+sed -e $SEXISTS -e $SPACKLIST lib/ExtUtils/Install.pm |tr -d '\r' >s; mv -f s lib/ExtUtils/Install.pm
+sed -e $SEXISTS -e $SPACKLIST lib/ExtUtils/MM_Unix.pm |tr -d '\r' >s; mv -f s lib/ExtUtils/MM_Unix.pm
+sed -e $SEXISTS -e $SPACKLIST installperl >s; mv -f s installperl
+sed -e $SPOD2HTML lib/Pod/Html.pm |tr -d '\r' >s; mv -f s lib/Pod/Html.pm
+sed -e $SCC -e $SLIST -e $SFILEC -e $SCOR -e $SDEPTMP -e $SHSED makedepend.SH |tr -d '\r' >s; mv -f s makedepend.SH
+sed -e $SCPP t/comp/cpp.aux |tr -d '\r' >s; mv -f s t/comp/cpp.aux
+sed -e $SARGV t/io/argv.t >s; mv -f s t/io/argv.t
+sed -e $SABC t/io/inplace.t >s; mv -f s t/io/inplace.t
+sed -e $SDBMX t/lib/anydbm.t >s; mv -f s t/lib/anydbm.t
+sed -e $SDBMX -e $SDBHASH t/lib/gdbm.t >s; mv -f s t/lib/gdbm.t
+sed -e $SDBMX -e $SDBHASH t/lib/sdbm.t >s; mv -f s t/lib/sdbm.t
+sed -e $SSTAT -e $STMP2 t/op/stat.t >s; mv -f s t/op/stat.t
+sed -e $SLIST x2p/Makefile.SH |tr -d '\r' >s; mv -f s x2p/Makefile.SH
+sed -e 's=^#define.\([A-Z]\+\)_EXP.*$=#define \1_EXP djgpp_pathexp("\1")=g' config_h.SH >s; mv -f s config_h.SH
+sed -e 's=:^/:={^([a-z]:)?[\\\\/]}=g' lib/termcap.pl >s; mv -f s lib/termcap.pl
+sed -e $SPACKLIST installman >s; mv -f s installman
+sed -e $SPACKLIST lib/ExtUtils/Installed.pm >s; mv -f s lib/ExtUtils/Installed.pm
+sed -e $SPACKLIST lib/ExtUtils/Packlist.pm >s; mv -f s lib/ExtUtils/Packlist.pm
+sed -e $SPACKLIST lib/ExtUtils/inst >s; mv -f s lib/ExtUtils/inst
+sed -e $SABC t/io/iprefix.t >s; mv -f s t/io/iprefix.t
diff --git a/gnu/usr.bin/perl/djgpp/fixpmain b/gnu/usr.bin/perl/djgpp/fixpmain
new file mode 100644
index 00000000000..6b0591c40f4
--- /dev/null
+++ b/gnu/usr.bin/perl/djgpp/fixpmain
@@ -0,0 +1,31 @@
+#!perl -w
+# Fix perlmain.c under DOS (short & case insensitive filenames).
+# Called from Makefile.aperl when needed.
+# You don't need this when LFN=y.
+
+use Config;
+
+open (PERLM,"<perlmain.c") or die "Can't load perlmain.c: $!";
+open (MAKEFILE,"<makefile.pl") or die "Can't load makefile.pl: $!";
+undef $/;
+$perlmain=<PERLM>;
+$makefile=<MAKEFILE>;
+
+($_) = $makefile =~ /\bNAME\b.*=>\W*([\w\:]+)/; # extract module name
+$badname=join ("__",map {lc substr ($_,0,8)} split /:+/); # dosify
+$perlmain =~ s/^.*boot_$badname.*$//gm if $badname; # delete bad lines
+
+@exts=('DynaLoader',split (" ",$Config{known_extensions}));
+for $realname (@exts)
+{
+ $dosname=join ("__",map {lc substr ($_,0,8)} split /\//,$realname);
+ $realname =~ s!/!__!g;
+ $perlmain =~ s/\bboot_$dosname/boot_$realname/gm;
+ $perlmain =~ s/\b$dosname(::bootstrap)/$realname$1/gm;
+}
+
+#DynaLoader is special
+$perlmain =~ s/(DynaLoader:\:boot)strap/$1_DynaLoader/gm;
+
+open (PERLM,">perlmain.c") or die "Can't write perlmain.c: $!";
+print PERLM $perlmain;
diff --git a/gnu/usr.bin/perl/ebcdic.c b/gnu/usr.bin/perl/ebcdic.c
new file mode 100644
index 00000000000..890bd086d2b
--- /dev/null
+++ b/gnu/usr.bin/perl/ebcdic.c
@@ -0,0 +1,32 @@
+#include "EXTERN.h"
+#include "perl.h"
+
+/* in ASCII order, not that it matters */
+static const char controllablechars[] = "?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_";
+
+int
+ebcdic_control(int ch)
+{
+ if (ch > 'a') {
+ char *ctlp;
+
+ if (islower(ch))
+ ch = toupper(ch);
+
+ if ((ctlp = strchr(controllablechars, ch)) == 0) {
+ die("unrecognised control character '%c'\n", ch);
+ }
+
+ if (ctlp == controllablechars)
+ return('\177'); /* DEL */
+ else
+ return((unsigned char)(ctlp - controllablechars - 1));
+ } else { /* Want uncontrol */
+ if (ch == '\177' || ch == -1)
+ return('?');
+ else if (0 < ch && ch < (sizeof(controllablechars) - 1))
+ return(controllablechars[ch+1]);
+ else
+ die("invalid control request: '\\%03o'\n", ch & 0xFF);
+ }
+}
diff --git a/gnu/usr.bin/perl/eg/cgi/caution.xbm b/gnu/usr.bin/perl/eg/cgi/caution.xbm
new file mode 100644
index 00000000000..87fcdbef8ae
--- /dev/null
+++ b/gnu/usr.bin/perl/eg/cgi/caution.xbm
@@ -0,0 +1,12 @@
+#define caution_width 32
+#define caution_height 32
+static char caution_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x00,0x00,0x00,0x10,0x01,
+ 0x00,0x00,0x08,0x07,0x00,0x00,0x08,0x0e,0x00,0x00,0x04,0x0e,0x00,0x00,0x04,
+ 0x1c,0x00,0x00,0x02,0x1c,0x00,0x00,0xe2,0x38,0x00,0x00,0xf1,0x39,0x00,0x00,
+ 0xf1,0x71,0x00,0x80,0xf0,0x71,0x00,0x80,0xf0,0xe1,0x00,0x40,0xf0,0xe1,0x00,
+ 0x40,0xf0,0xc1,0x01,0x20,0xf0,0xc1,0x01,0x20,0xf0,0x81,0x03,0x10,0xe0,0x80,
+ 0x03,0x10,0xe0,0x00,0x07,0x08,0xe0,0x00,0x07,0x08,0xe0,0x00,0x0e,0x04,0x00,
+ 0x00,0x0e,0x04,0xe0,0x00,0x1c,0x02,0xf0,0x01,0x1c,0x02,0xf0,0x01,0x38,0x01,
+ 0xe0,0x00,0x38,0x01,0x00,0x00,0x70,0x01,0x00,0x00,0x70,0xff,0xff,0xff,0x7f,
+ 0xf8,0xff,0xff,0x3f,0x00,0x00,0x00,0x00};
diff --git a/gnu/usr.bin/perl/eg/cgi/dna.small.gif.uu b/gnu/usr.bin/perl/eg/cgi/dna.small.gif.uu
new file mode 100644
index 00000000000..d3ce24c18dc
--- /dev/null
+++ b/gnu/usr.bin/perl/eg/cgi/dna.small.gif.uu
@@ -0,0 +1,63 @@
+begin 444 dna.small.gif
+M1TE&.#=A)0`J`.<``+9%&Y<R0M<F'ID\,!<07%<G1:P<0Q`A2Q`P;"L9/L$:
+M,"480N5"&RL7:4LD0T,G144[7BHL2B4?3\0I+"</)BQ.9KD0/S878\96$Z\@
+M(:\1*RL:3L0W&QL?2#4?9>@_&A$_5<I"&C`A3*,3-A`//9X<)\@Q(L`@.#\E
+M7K,R*R\T6)H++1L72T8=4207:T`G=JX..MD^&!$_;^)2$#T=7S`79AL7.A$3
+M1-=%#^,Q&QT_:C8=1!L86]\R#4M":4H76R,515HZ4"477G@T,J\;(X(@/$\7
+M."4A2N9;$"DZ6RL34-8I$34A73P86I84/\87%1`0/V,B2"0<0N!(%QPH91<6
+M2=!5$3(=73(E23`/,!L4.=$Z'-MH%>`Y#3$=2"=#59M((H88,GP\/]X^&+$R
+M$"(79"DF33(93"$86=%;&"T4/=Y"&\\A$Q4Z4!`62*T4-Q4B9+X1*BH96SP?
+M1<0D/3(F<-TM$!`=5:H.(!<64C$W?#8J3*`S(S<@3=8V%K$](QT.6Q`43AL4
+M1:$D,;<0,\X9&,8])\@=$A(U244S5U,D6Q<V;]\I&&<K/8!*.R044>=/#YH>
+M08$I1B,09S$35R(:4C0?<19$7<D^#Q`>5!()-;4702M`=;56)A`25,0K%"X<
+M83`N>K`H'HDS*1`40,M&%!<@7M,_$A<N2L)%%18E4^<M$A@=5=0Q$Q`E311*
+M2L8E&2D<7Q\A7P\80B48,%E/8[1-'J4/-"H<3"PA1$,T?Q<15R44,R,A4AL/
+M,^M4%2,07!L+,[\[&!P4520I:C(9.=54$[,2/M-)&RP?7M=(%1$J8<-,%2H@
+M4B,=51436^]2"!X<1A<44RD</>E+#%0>0S0/:4PJ9I,F-6DG420Y<"@09R,0
+M-V$R/R4M<:\H0!(H410Z:AT27&4Q9"L@;=1%(MA-$M5+#RL4+M8Z&AT<7[<:
+M(-QA&2,36R$++B(84!0:5ALO:K$A.]X?&!$84V@;/SX<6Q`;2$(B2QD21W4J
+M1=TW&@```````````````"P`````)0`J```(_@!]:(N'18\W%15T$1N'C)V?
+M0_HH,<$G9YBX!C6<3;+T@AZ-)K@\O*"!KP^$>"KVA`L3*8P3)^5ZA)@B:AH+
+M9];F7.$Q+!`!0=*<E3'5K(:EHS2N%"AP*Y(\&##H6(!A:!XU99B*H?%4IDF?
+M!8'<"-F%9I*TH8A83:*TXYD!J83D$0ICI-NE(:O8I6&FJ$64$M5$M%!3PU,F
+M2UJD"9I41E824WT2G?BV-!$(!`=,+<IF!P>.%",&P7J"9XB82L5,48F5K,:"
+M'94FU='6;!*R3T->E"%&95DR"`/6P,I0PDF)0SG8($$RJN0R`FI(H7$A2]VD
+M*^^L_6(T3U*V%XH"_AB:HDS8H$AO5@R:P,8.I%^.:*AC(>Z!'":6RC`1L@W-
+M%1Q/,%(.'5+1`<D^74R@P2#?T*'/$"%@\(L5Y?RAB!SO3#*,-6CL44\4]C1#
+MR0Q3C&&"!AH08@(#:Y2C@`&1---,.#)\T84=R##`0",H++8#)34,@X80R:"`
+M0A<]?'#.!";`TDH.8QBB0354A!,*)WI0\<D\YJRQ3PE[V",(.D#48$T9GO22
+MA0.BC,)'*]3TP,`^\_#QA0P@>`/"*]=<HX\3"C!BAQV%5",$+Z0,0X,UL3SB
+M#B[NN$'/,A&,$L,Y[-BASR(@<**("E^,0(<&;[QA0@^,3%",#2S8H,01_LX0
+M`(0:W%`@13#TN+'#&LK@0$T0VER##50*Q/%-%%&H$`0#K7"`!B^X/`),()F0
+M0PNT[K#BRBS1-!("`^=,$8`D="B`QRW?1**+-I?(X$@(L(R2AQ8+Y,*#-*YX
+MH(00'1Q!CSI,U'!%)^_%4(X&FUB@01$.@*!#$I?4D48I&1BA!2*HD%))(.+T
+MYTEOT3B#PB/U4(,$%QD0(<\QX^CRBC=)@%`!&+:<<TH&M*C1"RJX'-'.'`YX
+M<H0@<)#"0CX+I%`*-%:4L@XFS`#[11M?U-))"&RP84LWZL!A1A^YH.*)!)3<
+MHXX6L]P3"!I`H/!`*>90`PD.F'3SR@-AG)`&_A=3'"**#[J(P<<I@YCA2@32
+M!,*+Q9H`(XT2'O2RS"CGS.U9!K>0^C0&S/#1""(ZI)'&*6,,$842N%Q!@3NK
+M"R'%%4KP0D(Q?"`S!3)<I#!!".68$T(IMHP#>BVE(/$+)#-80<PTLBRP^@$>
+M<+,`-[QH$LP+0_P!1C>=S("!,N>8XP<8H6131!B;3`#&#)"DTH(L5#P0S#W+
+MQ)*`$K1HHD4^;E!2QP%:B``&4H$,/Y2C$Y*(1%0(00A)@```77B"*$0@#3>P
+MP&PU4`,^H!","P!!$')0P^H6((I5L"$'.;``';[Q!@-\PP"<B$<]EG"(#*C"
+M%-(@0":\L0U?D&`#_L50@33.(`4M4``=&4@'+-9!!P9JP`#9T$4H=*$+!#1B
+M'3A(`SYH`81'B.,(XJ@"":0(CDRPH@/<"$88V+"%$N#A&)MPX0N2H`L]C&,<
+MEW"$%6:0BCV@XPIH>$0?)M$`<92!%OG8Q3#@(`U2C*)%9-!`&`K`!!EP0@80
+M2,0M;I$.:"C#"D.@P#UJ``]GT"*,K%B&*0+!@TFH8VV*0$(:_/`)?7@#'.'0
+M@R[H8``\:&`,=NC"*"B@!2TTHP5]N((TEH&`<)B"!PU`0RQ(P8MNS``9K6@%
+M'W31AG%$(BZ2&((PA-&#'I"A&`F8!DD\\`H6-,.,X'B'%,+R#FX4`PS&_L!$
+M.4R0#7W<0@%O2,07$($#9@C3"%C8P!5H88\]J$,"-E!;(.X@C5T<`!65V,40
+M,'&(0C!"`1JP@"3TH`T9=&,5JRC$-]+1`U%TP@@[^,$>Z$&*0%1A%XFK`BFD
+MX0L6Y"(#A_A$#[JPC@%\@1@02`(SJ#&&.`A@'\&$!AALX(4Y="`/TA"",UA!
+M@%W<8!*\$`$@C%""+G1A"9AP!"<>9@ME*)$0F\C!$I8`B3\TP@%'@$(QH$`"
+M)8@#'(B0ACB`P`,@%&,'9"##)S`1!&)\`0)^&,,^+$`("QC"#D\X!":HX0!<
+ML(`&-O!%,&H@BS#F0AI'`!LO^"`,/OS!%KJ0_H0HEA`E27Q#%T%X0"%"@`1E
+M2,`!:F!%+Q#A!G)40A!HP`4OFK`#-13#`?I(QCW38(Q/9&``%0#!);01BE>$
+M@!TZNL81$G`!-]2!&&5@A1N&T0Q<,$$$%*!``BR1A5$PPPH<74$%]*`#$.RA
+M`(VP@#`X$(`7``(%T=@`.5Q`C@:0`P[)D$4'$H`."MB#"908Q=X@,01B9$(7
+MG'A%`#8!"QSL@PUAL,0==M"")CQCP4)0QQUDP806H&,!T]A!`EH@AC2P`P,^
+MT`,*NN%-&&T!&L@X!!Y^<(4.D(,%E>A`,T20C#IXL`6-:,`5F+"#!W"@'%OH
+MA`IJ$5(#;`(;AV/'FA103(EV+(,>GHB&&ZJ`!D'<X0[-N$(N@)$+4$C@`<(`
+M$(&/<8Q;7$,1UT"``+>P!57`X1F9D`4<W$`"4MP@$ZYX\B-"004Y2$`.HT@%
+M)@IAB#><0!]FB(<I.(&`(7P"%GPPQ3)F`0YB0"$0@8"")L!Q!RH`8A&AL,8L
+BR!$$,@@#&5OX!1V.\85XA.,.,A##!T2!AP@LXP#;"`@`.P``
+end
diff --git a/gnu/usr.bin/perl/eg/cgi/nph-multipart.cgi b/gnu/usr.bin/perl/eg/cgi/nph-multipart.cgi
new file mode 100644
index 00000000000..f8cea59a878
--- /dev/null
+++ b/gnu/usr.bin/perl/eg/cgi/nph-multipart.cgi
@@ -0,0 +1,10 @@
+#!/usr/local/bin/perl
+use CGI qw/:push -nph/;
+$| = 1;
+print multipart_init(-boundary=>'----------------here we go!');
+while (1) {
+ print multipart_start(-type=>'text/plain'),
+ "The current time is ",scalar(localtime),"\n",
+ multipart_end;
+ sleep 1;
+}
diff --git a/gnu/usr.bin/perl/emacs/ptags b/gnu/usr.bin/perl/emacs/ptags
new file mode 100644
index 00000000000..c6726122374
--- /dev/null
+++ b/gnu/usr.bin/perl/emacs/ptags
@@ -0,0 +1,158 @@
+# Make a TAGS file for emacs ``M-x find-tag'' from all <c,h,y,xs> source files.
+# (``make realclean'' first to avoid generated files, or ``make'' first
+# to get tags from all files.)
+#
+# (IZ: to be a happier jumper: install 'imenu-go.el' from
+# ftp://ftp.math.ohio-state.edu/pub/users/ilya/emacs.)
+#
+# (Some tags should probably live in their own subdirs, like those in x2p/,
+# but I have never been interested in x2p anyway.)
+#
+# Hallvard B Furuseth <h.b.furuseth@usit.uio.no>, Aug -96.
+#
+# Ilya Zakharevich, Oct 97: minor comments, add CPerl scan;
+# Use Hallvard's scan for XS files - since he processes the "C" part too -
+# but with a lot of improvements: now it is no worse than CPerl's one.
+
+# Avoid builtin on OS/2:
+if test ! -z "$OS2_SHELL"; then alias find=gnufind; fi
+
+# Insure proper order (.h after .c, .xs before .c in subdirs):
+# Move autogenerated less-informative files to the end:
+# Hard to do embed.h and embedvar.h in one sweep:
+
+topfiles="`echo ' ' *.y *.c *.h ' ' | sed 's/ \(embed\(var\|\)\.h\|obj\(pp\|XSUB\)\.h\|globals\.c\) \(\(embedvar\|objpp\).h \|\)/ /g'`"
+subdirfiles="`( find ./*/* -name '*.[cy]' -print | sort ; find ./*/* -name '*.[hH]' -print | sort )`"
+xsfiles="`find . -name '*.xs' -print | sort`"
+
+# etags -d : process defines too (default now)
+
+# These are example lines for global variables and PP-code:
+## IEXT SV * Iparsehook;
+## IEXT char * Isplitstr IINIT(" ");
+## dEXTCONST char rcsid[] = "perl.c\nPatch level: ###\n";
+## PP(pp_const)
+## PERLVARI(Grsfp, PerlIO *, Nullfp)
+## PERLVAR(cvcache, HV *)
+
+# Putting PL_\1 in the substitution line makes etags dump core
+# Thus we do it later (but 20.2.92 does it OK).
+set x -d -l c \
+ -r '/[dI]?EXT\(CONST\)?[ \t*]+\([a-zA-Z_0-9]+[ \t*]+\)*\([a-zA-Z_0-9]+\)[ \t]*\($\|;\|\[\|[ \t]I+NIT[ \t]*(\|\/\*\)/\3/' \
+ -r '/IEXT[ \t][^\/]*[ \t*]I\([a-zA-Z_][a-zA-Z_0-9]*\)[\[; \t]/\1/' \
+ -r '/PERLVAR[a-zA-Z_0-9]*[ \t]*([ \t]*[GIT]?\([a-zA-Z_][a-zA-Z_0-9]*\)[ \t]*[\[,]/\1/' \
+ -r '/PP[ \t]*([ \t]*\([^ \t()]*\)[ \t]*)/\1/'
+
+shift
+
+rm -f TAGS.tmp TAGS.tm2
+
+# Process lines like this: #define MEM_ALIGNBYTES $alignbytes /**/
+etags -o TAGS.tmp \
+ -l none -r '/#\(\$[a-zA-Z_0-9]+\|define\)[ \t]+\([a-zA-Z_0-9]+\)/\2/' \
+ config_h.SH
+etags -o TAGS.tmp -a "$@" $topfiles
+
+# Now add these PL_:
+perl -w014pe 'if (s/^( .* PERLVAR I? # 1: TAG group
+ \s* \( \s* [GIT] #
+ .* #
+ \x7F # End of description
+ )
+ ( .* \x1 ) # 2: Exact group
+ /${1}PL_$2/mgx) { # Add PL_
+ $chars = chomp;
+ s/^((\n.+,)\d+)/ $2 . (length($_) - length($1) - 1) /e;
+ $_ .= ("\f" x $chars);
+ }' TAGS.tmp > TAGS.tm1 && mv TAGS.tm1 TAGS.tmp
+
+
+
+etags -o TAGS.tmp -a -D -l none -r '/#define.*\t\(Perl_.*\)/\1/' embed.h
+etags -o TAGS.tmp -a globals.c embedvar.h objXSUB.h objpp.h
+
+perl -w014pe 'if (s/^( [^\n\x7F\x1]*\b # 1: TAG group
+ (\w+) # 2: word
+ [^\w\x7X\x1\n]* # Most anything
+ \x7F # End of description
+ )
+ (\d+,\d+\n) # 3: TAGS Trail
+ /$1$2\x1$3/mgx) { # Add specific marking
+ $chars = chomp;
+ s/^((\n.+,)\d+)/ $2 . (length($_) - length($1) - 1) /e;
+ $_ .= ("\f" x $chars);
+ }' TAGS.tmp > TAGS.tm1 && mv TAGS.tm1 TAGS.tmp
+
+# Add MODULE lines to TAG files (to be postprocessed later),
+# and BOOT: lines (in DynaLoader processed twice?)
+
+# This skips too many XSUBs:
+
+# etags -o TAGS.tmp -a -d -l c \
+# -r '/MODULE[ \t=]+\(.*PACKAGE[ \t]*=[ \t]*\)?\([^ \t]+\)\([ \t]*PREFIX[ \t]*=[ \t]*\([^ \t]+\)\)?/\2/' \
+# -r '/[ \t]*BOOT:/' \
+# $xsfiles
+
+etags -o TAGS.tmp -a -d -l c \
+ -r '/MODULE[ \t=]+\(.*PACKAGE[ \t]*=[ \t]*\)?\([^ \t]+\)\([ \t]*PREFIX[ \t]*=[ \t]*\([^ \t]+\)\)?/\2/' \
+ -r '/[ \t]*BOOT:/' \
+ -r '/\([_a-zA-Z][a-zA-Z0-9_:]*\)(/' \
+ $xsfiles
+
+# -r '/MODULE[ \t=]+\(.*PACKAGE[ \t]*=[ \t]*\)?\([^ \t]+\)/\2/' \
+# -r '/MODULE.*PREFIX[ \t]*=[ \t]*\([^ \t]+\)/\1/' \
+# $xsfiles
+
+etags -o TAGS.tmp -a "$@" $subdirfiles
+
+if test ! -f emacs/cperl-mode.elc ; then
+ ( cd emacs; emacs -batch -q -no-site-file -f batch-byte-compile cperl-mode.el )
+fi
+
+# This should work with newer Emaxen
+
+cp TAGS.tmp TAGS
+if emacs -batch -q -no-site-file -l emacs/cperl-mode.elc -f cperl-add-tags-recurse-noxs ; then
+ mv TAGS TAGS.tmp
+fi
+
+perl -w014pe '
+ $update = s/^PP\(\177\d+,\d+\n//gm;
+ $update += s/^(I?EXT.*[ \t])IINIT[ \t]*\((\177)/$1$2/gm;
+ if (/^\n*[^\s,]+\.xs,/s) {
+ $mod = $cmod = $bmod = $pref = "";
+ s/^(.*\n)\1+/$1/mg; # Remove duplicate lines
+ $_ = join("", map {
+ if (/^MODULE[ \t]*=[ \t]*(\S+)(?:[ \t]+PACKAGE[ \t]*=[ \t]*(\S+))?[ \t\177]/m) {
+ $mod = $+;
+ ($bmod = $mod) =~ tr/:/_/;
+ $cmod = "XS_${bmod}_";
+ $pref = "";
+ if (s/[ \t]+PREFIX[ \t]*=[ \t]*([^\s\177]+)(\177)/$+/) {
+ $pref = $1;
+ $pref =~ s/([^\w\s])/\\$1/g;
+ $pref = "(?:$pref)?";
+ }
+ } elsif ($mod ne "") {
+ # Ref points for Module::subr, XS_Module_subr, subr
+ s/^($pref(\w+)[ \t()]*\177)(\d+,\d+)$/$1${mod}::${2}\01$3\n$1$2\01$3\n$1$cmod$2\01$3/gm;
+ # Ref for Module::bootstrap bootstrap boot_Module
+ s/^([ \t]*BOOT:\177)(\d+,\d+)$/$1${mod}::bootstrap\01$2\n${1}bootstrap\01$2\n${1}boot_$bmod\01$2/gm;
+ }
+ $_;
+ } split(/(\nMODULE[ \t]*=[^\n\177]+\177)/));
+
+ $update = 1;
+ }
+ if ($update) {
+ $chars = chomp;
+ s/^((\n.+,)\d+)/ $2 . (length($_) - length($1) - 1) /e;
+ $_ .= ("\f" x $chars);
+ }' TAGS.tmp > TAGS.tm2
+
+rm -f TAGS
+mv TAGS.tm2 TAGS
+rm -f TAGS.tmp
+
+
+
diff --git a/gnu/usr.bin/perl/embedvar.h b/gnu/usr.bin/perl/embedvar.h
new file mode 100644
index 00000000000..25b31e01556
--- /dev/null
+++ b/gnu/usr.bin/perl/embedvar.h
@@ -0,0 +1,895 @@
+/* !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
+ This file is built by embed.pl from global.sym, intrpvar.h,
+ and thrdvar.h. Any changes made here will be lost!
+*/
+
+/* (Doing namespace management portably in C is really gross.) */
+
+/* EMBED has no run-time penalty, but helps keep the Perl namespace
+ from colliding with that used by other libraries pulled in
+ by extensions or by embedding perl. Allow a cc -DNO_EMBED
+ override, however, to keep binary compatability with previous
+ versions of perl.
+*/
+
+
+/* Put interpreter-specific symbols into a struct? */
+
+#ifdef MULTIPLICITY
+
+#ifndef USE_THREADS
+/* If we do not have threads then per-thread vars are per-interpreter */
+
+#define PL_Sv (PL_curinterp->TSv)
+#define PL_Xpv (PL_curinterp->TXpv)
+#define PL_av_fetch_sv (PL_curinterp->Tav_fetch_sv)
+#define PL_bodytarget (PL_curinterp->Tbodytarget)
+#define PL_bostr (PL_curinterp->Tbostr)
+#define PL_chopset (PL_curinterp->Tchopset)
+#define PL_colors (PL_curinterp->Tcolors)
+#define PL_colorset (PL_curinterp->Tcolorset)
+#define PL_curcop (PL_curinterp->Tcurcop)
+#define PL_curpad (PL_curinterp->Tcurpad)
+#define PL_curpm (PL_curinterp->Tcurpm)
+#define PL_curstack (PL_curinterp->Tcurstack)
+#define PL_curstackinfo (PL_curinterp->Tcurstackinfo)
+#define PL_curstash (PL_curinterp->Tcurstash)
+#define PL_defoutgv (PL_curinterp->Tdefoutgv)
+#define PL_defstash (PL_curinterp->Tdefstash)
+#define PL_delaymagic (PL_curinterp->Tdelaymagic)
+#define PL_dirty (PL_curinterp->Tdirty)
+#define PL_extralen (PL_curinterp->Textralen)
+#define PL_firstgv (PL_curinterp->Tfirstgv)
+#define PL_formtarget (PL_curinterp->Tformtarget)
+#define PL_hv_fetch_ent_mh (PL_curinterp->Thv_fetch_ent_mh)
+#define PL_hv_fetch_sv (PL_curinterp->Thv_fetch_sv)
+#define PL_in_eval (PL_curinterp->Tin_eval)
+#define PL_last_in_gv (PL_curinterp->Tlast_in_gv)
+#define PL_lastgotoprobe (PL_curinterp->Tlastgotoprobe)
+#define PL_lastscream (PL_curinterp->Tlastscream)
+#define PL_localizing (PL_curinterp->Tlocalizing)
+#define PL_mainstack (PL_curinterp->Tmainstack)
+#define PL_markstack (PL_curinterp->Tmarkstack)
+#define PL_markstack_max (PL_curinterp->Tmarkstack_max)
+#define PL_markstack_ptr (PL_curinterp->Tmarkstack_ptr)
+#define PL_maxscream (PL_curinterp->Tmaxscream)
+#define PL_modcount (PL_curinterp->Tmodcount)
+#define PL_nrs (PL_curinterp->Tnrs)
+#define PL_ofs (PL_curinterp->Tofs)
+#define PL_ofslen (PL_curinterp->Tofslen)
+#define PL_op (PL_curinterp->Top)
+#define PL_opsave (PL_curinterp->Topsave)
+#define PL_reg_eval_set (PL_curinterp->Treg_eval_set)
+#define PL_reg_flags (PL_curinterp->Treg_flags)
+#define PL_reg_start_tmp (PL_curinterp->Treg_start_tmp)
+#define PL_reg_start_tmpl (PL_curinterp->Treg_start_tmpl)
+#define PL_regbol (PL_curinterp->Tregbol)
+#define PL_regcc (PL_curinterp->Tregcc)
+#define PL_regcode (PL_curinterp->Tregcode)
+#define PL_regcomp_parse (PL_curinterp->Tregcomp_parse)
+#define PL_regcomp_rx (PL_curinterp->Tregcomp_rx)
+#define PL_regcompp (PL_curinterp->Tregcompp)
+#define PL_regdata (PL_curinterp->Tregdata)
+#define PL_regdummy (PL_curinterp->Tregdummy)
+#define PL_regendp (PL_curinterp->Tregendp)
+#define PL_regeol (PL_curinterp->Tregeol)
+#define PL_regexecp (PL_curinterp->Tregexecp)
+#define PL_regflags (PL_curinterp->Tregflags)
+#define PL_regindent (PL_curinterp->Tregindent)
+#define PL_reginput (PL_curinterp->Treginput)
+#define PL_reginterp_cnt (PL_curinterp->Treginterp_cnt)
+#define PL_reglastparen (PL_curinterp->Treglastparen)
+#define PL_regnarrate (PL_curinterp->Tregnarrate)
+#define PL_regnaughty (PL_curinterp->Tregnaughty)
+#define PL_regnpar (PL_curinterp->Tregnpar)
+#define PL_regprecomp (PL_curinterp->Tregprecomp)
+#define PL_regprev (PL_curinterp->Tregprev)
+#define PL_regprogram (PL_curinterp->Tregprogram)
+#define PL_regsawback (PL_curinterp->Tregsawback)
+#define PL_regseen (PL_curinterp->Tregseen)
+#define PL_regsize (PL_curinterp->Tregsize)
+#define PL_regstartp (PL_curinterp->Tregstartp)
+#define PL_regtill (PL_curinterp->Tregtill)
+#define PL_regxend (PL_curinterp->Tregxend)
+#define PL_restartop (PL_curinterp->Trestartop)
+#define PL_retstack (PL_curinterp->Tretstack)
+#define PL_retstack_ix (PL_curinterp->Tretstack_ix)
+#define PL_retstack_max (PL_curinterp->Tretstack_max)
+#define PL_rs (PL_curinterp->Trs)
+#define PL_savestack (PL_curinterp->Tsavestack)
+#define PL_savestack_ix (PL_curinterp->Tsavestack_ix)
+#define PL_savestack_max (PL_curinterp->Tsavestack_max)
+#define PL_scopestack (PL_curinterp->Tscopestack)
+#define PL_scopestack_ix (PL_curinterp->Tscopestack_ix)
+#define PL_scopestack_max (PL_curinterp->Tscopestack_max)
+#define PL_screamfirst (PL_curinterp->Tscreamfirst)
+#define PL_screamnext (PL_curinterp->Tscreamnext)
+#define PL_secondgv (PL_curinterp->Tsecondgv)
+#define PL_seen_evals (PL_curinterp->Tseen_evals)
+#define PL_seen_zerolen (PL_curinterp->Tseen_zerolen)
+#define PL_sortcop (PL_curinterp->Tsortcop)
+#define PL_sortcxix (PL_curinterp->Tsortcxix)
+#define PL_sortstash (PL_curinterp->Tsortstash)
+#define PL_stack_base (PL_curinterp->Tstack_base)
+#define PL_stack_max (PL_curinterp->Tstack_max)
+#define PL_stack_sp (PL_curinterp->Tstack_sp)
+#define PL_start_env (PL_curinterp->Tstart_env)
+#define PL_statbuf (PL_curinterp->Tstatbuf)
+#define PL_statcache (PL_curinterp->Tstatcache)
+#define PL_statgv (PL_curinterp->Tstatgv)
+#define PL_statname (PL_curinterp->Tstatname)
+#define PL_tainted (PL_curinterp->Ttainted)
+#define PL_timesbuf (PL_curinterp->Ttimesbuf)
+#define PL_tmps_floor (PL_curinterp->Ttmps_floor)
+#define PL_tmps_ix (PL_curinterp->Ttmps_ix)
+#define PL_tmps_max (PL_curinterp->Ttmps_max)
+#define PL_tmps_stack (PL_curinterp->Ttmps_stack)
+#define PL_top_env (PL_curinterp->Ttop_env)
+#define PL_toptarget (PL_curinterp->Ttoptarget)
+
+#endif /* !USE_THREADS */
+
+/* These are always per-interpreter if there is more than one */
+
+#define PL_Argv (PL_curinterp->IArgv)
+#define PL_Cmd (PL_curinterp->ICmd)
+#define PL_DBcv (PL_curinterp->IDBcv)
+#define PL_DBgv (PL_curinterp->IDBgv)
+#define PL_DBline (PL_curinterp->IDBline)
+#define PL_DBsignal (PL_curinterp->IDBsignal)
+#define PL_DBsingle (PL_curinterp->IDBsingle)
+#define PL_DBsub (PL_curinterp->IDBsub)
+#define PL_DBtrace (PL_curinterp->IDBtrace)
+#define PL_ampergv (PL_curinterp->Iampergv)
+#define PL_archpat_auto (PL_curinterp->Iarchpat_auto)
+#define PL_argvgv (PL_curinterp->Iargvgv)
+#define PL_argvoutgv (PL_curinterp->Iargvoutgv)
+#define PL_basetime (PL_curinterp->Ibasetime)
+#define PL_beginav (PL_curinterp->Ibeginav)
+#define PL_bytecode_iv_overflows (PL_curinterp->Ibytecode_iv_overflows)
+#define PL_bytecode_obj_list (PL_curinterp->Ibytecode_obj_list)
+#define PL_bytecode_obj_list_fill (PL_curinterp->Ibytecode_obj_list_fill)
+#define PL_bytecode_pv (PL_curinterp->Ibytecode_pv)
+#define PL_bytecode_sv (PL_curinterp->Ibytecode_sv)
+#define PL_cddir (PL_curinterp->Icddir)
+#define PL_compcv (PL_curinterp->Icompcv)
+#define PL_compiling (PL_curinterp->Icompiling)
+#define PL_comppad (PL_curinterp->Icomppad)
+#define PL_comppad_name (PL_curinterp->Icomppad_name)
+#define PL_comppad_name_fill (PL_curinterp->Icomppad_name_fill)
+#define PL_comppad_name_floor (PL_curinterp->Icomppad_name_floor)
+#define PL_copline (PL_curinterp->Icopline)
+#define PL_curcopdb (PL_curinterp->Icurcopdb)
+#define PL_curstname (PL_curinterp->Icurstname)
+#define PL_dbargs (PL_curinterp->Idbargs)
+#define PL_debdelim (PL_curinterp->Idebdelim)
+#define PL_debname (PL_curinterp->Idebname)
+#define PL_debstash (PL_curinterp->Idebstash)
+#define PL_defgv (PL_curinterp->Idefgv)
+#define PL_diehook (PL_curinterp->Idiehook)
+#define PL_dlevel (PL_curinterp->Idlevel)
+#define PL_dlmax (PL_curinterp->Idlmax)
+#define PL_doextract (PL_curinterp->Idoextract)
+#define PL_doswitches (PL_curinterp->Idoswitches)
+#define PL_dowarn (PL_curinterp->Idowarn)
+#define PL_dumplvl (PL_curinterp->Idumplvl)
+#define PL_e_script (PL_curinterp->Ie_script)
+#define PL_endav (PL_curinterp->Iendav)
+#define PL_envgv (PL_curinterp->Ienvgv)
+#define PL_errgv (PL_curinterp->Ierrgv)
+#define PL_eval_root (PL_curinterp->Ieval_root)
+#define PL_eval_start (PL_curinterp->Ieval_start)
+#define PL_exitlist (PL_curinterp->Iexitlist)
+#define PL_exitlistlen (PL_curinterp->Iexitlistlen)
+#define PL_fdpid (PL_curinterp->Ifdpid)
+#define PL_filemode (PL_curinterp->Ifilemode)
+#define PL_forkprocess (PL_curinterp->Iforkprocess)
+#define PL_formfeed (PL_curinterp->Iformfeed)
+#define PL_generation (PL_curinterp->Igeneration)
+#define PL_gensym (PL_curinterp->Igensym)
+#define PL_globalstash (PL_curinterp->Iglobalstash)
+#define PL_hintgv (PL_curinterp->Ihintgv)
+#define PL_in_clean_all (PL_curinterp->Iin_clean_all)
+#define PL_in_clean_objs (PL_curinterp->Iin_clean_objs)
+#define PL_incgv (PL_curinterp->Iincgv)
+#define PL_initav (PL_curinterp->Iinitav)
+#define PL_inplace (PL_curinterp->Iinplace)
+#define PL_last_proto (PL_curinterp->Ilast_proto)
+#define PL_lastfd (PL_curinterp->Ilastfd)
+#define PL_lastsize (PL_curinterp->Ilastsize)
+#define PL_lastspbase (PL_curinterp->Ilastspbase)
+#define PL_laststatval (PL_curinterp->Ilaststatval)
+#define PL_laststype (PL_curinterp->Ilaststype)
+#define PL_leftgv (PL_curinterp->Ileftgv)
+#define PL_lineary (PL_curinterp->Ilineary)
+#define PL_linestart (PL_curinterp->Ilinestart)
+#define PL_localpatches (PL_curinterp->Ilocalpatches)
+#define PL_main_cv (PL_curinterp->Imain_cv)
+#define PL_main_root (PL_curinterp->Imain_root)
+#define PL_main_start (PL_curinterp->Imain_start)
+#define PL_maxsysfd (PL_curinterp->Imaxsysfd)
+#define PL_mess_sv (PL_curinterp->Imess_sv)
+#define PL_minus_F (PL_curinterp->Iminus_F)
+#define PL_minus_a (PL_curinterp->Iminus_a)
+#define PL_minus_c (PL_curinterp->Iminus_c)
+#define PL_minus_l (PL_curinterp->Iminus_l)
+#define PL_minus_n (PL_curinterp->Iminus_n)
+#define PL_minus_p (PL_curinterp->Iminus_p)
+#define PL_modglobal (PL_curinterp->Imodglobal)
+#define PL_multiline (PL_curinterp->Imultiline)
+#define PL_mystrk (PL_curinterp->Imystrk)
+#define PL_ofmt (PL_curinterp->Iofmt)
+#define PL_oldlastpm (PL_curinterp->Ioldlastpm)
+#define PL_oldname (PL_curinterp->Ioldname)
+#define PL_op_mask (PL_curinterp->Iop_mask)
+#define PL_origargc (PL_curinterp->Iorigargc)
+#define PL_origargv (PL_curinterp->Iorigargv)
+#define PL_origfilename (PL_curinterp->Iorigfilename)
+#define PL_ors (PL_curinterp->Iors)
+#define PL_orslen (PL_curinterp->Iorslen)
+#define PL_parsehook (PL_curinterp->Iparsehook)
+#define PL_patchlevel (PL_curinterp->Ipatchlevel)
+#define PL_pending_ident (PL_curinterp->Ipending_ident)
+#define PL_perl_destruct_level (PL_curinterp->Iperl_destruct_level)
+#define PL_perldb (PL_curinterp->Iperldb)
+#define PL_preambleav (PL_curinterp->Ipreambleav)
+#define PL_preambled (PL_curinterp->Ipreambled)
+#define PL_preprocess (PL_curinterp->Ipreprocess)
+#define PL_profiledata (PL_curinterp->Iprofiledata)
+#define PL_replgv (PL_curinterp->Ireplgv)
+#define PL_rightgv (PL_curinterp->Irightgv)
+#define PL_rsfp (PL_curinterp->Irsfp)
+#define PL_rsfp_filters (PL_curinterp->Irsfp_filters)
+#define PL_sawampersand (PL_curinterp->Isawampersand)
+#define PL_sawstudy (PL_curinterp->Isawstudy)
+#define PL_sawvec (PL_curinterp->Isawvec)
+#define PL_siggv (PL_curinterp->Isiggv)
+#define PL_splitstr (PL_curinterp->Isplitstr)
+#define PL_statusvalue (PL_curinterp->Istatusvalue)
+#define PL_statusvalue_vms (PL_curinterp->Istatusvalue_vms)
+#define PL_stdingv (PL_curinterp->Istdingv)
+#define PL_strchop (PL_curinterp->Istrchop)
+#define PL_strtab (PL_curinterp->Istrtab)
+#define PL_strtab_mutex (PL_curinterp->Istrtab_mutex)
+#define PL_sub_generation (PL_curinterp->Isub_generation)
+#define PL_sublex_info (PL_curinterp->Isublex_info)
+#define PL_sv_arenaroot (PL_curinterp->Isv_arenaroot)
+#define PL_sv_count (PL_curinterp->Isv_count)
+#define PL_sv_objcount (PL_curinterp->Isv_objcount)
+#define PL_sv_root (PL_curinterp->Isv_root)
+#define PL_sys_intern (PL_curinterp->Isys_intern)
+#define PL_tainting (PL_curinterp->Itainting)
+#define PL_threadnum (PL_curinterp->Ithreadnum)
+#define PL_thrsv (PL_curinterp->Ithrsv)
+#define PL_unsafe (PL_curinterp->Iunsafe)
+#define PL_warnhook (PL_curinterp->Iwarnhook)
+
+#else /* !MULTIPLICITY */
+
+#define PL_IArgv PL_Argv
+#define PL_ICmd PL_Cmd
+#define PL_IDBcv PL_DBcv
+#define PL_IDBgv PL_DBgv
+#define PL_IDBline PL_DBline
+#define PL_IDBsignal PL_DBsignal
+#define PL_IDBsingle PL_DBsingle
+#define PL_IDBsub PL_DBsub
+#define PL_IDBtrace PL_DBtrace
+#define PL_Iampergv PL_ampergv
+#define PL_Iarchpat_auto PL_archpat_auto
+#define PL_Iargvgv PL_argvgv
+#define PL_Iargvoutgv PL_argvoutgv
+#define PL_Ibasetime PL_basetime
+#define PL_Ibeginav PL_beginav
+#define PL_Ibytecode_iv_overflows PL_bytecode_iv_overflows
+#define PL_Ibytecode_obj_list PL_bytecode_obj_list
+#define PL_Ibytecode_obj_list_fill PL_bytecode_obj_list_fill
+#define PL_Ibytecode_pv PL_bytecode_pv
+#define PL_Ibytecode_sv PL_bytecode_sv
+#define PL_Icddir PL_cddir
+#define PL_Icompcv PL_compcv
+#define PL_Icompiling PL_compiling
+#define PL_Icomppad PL_comppad
+#define PL_Icomppad_name PL_comppad_name
+#define PL_Icomppad_name_fill PL_comppad_name_fill
+#define PL_Icomppad_name_floor PL_comppad_name_floor
+#define PL_Icopline PL_copline
+#define PL_Icurcopdb PL_curcopdb
+#define PL_Icurstname PL_curstname
+#define PL_Idbargs PL_dbargs
+#define PL_Idebdelim PL_debdelim
+#define PL_Idebname PL_debname
+#define PL_Idebstash PL_debstash
+#define PL_Idefgv PL_defgv
+#define PL_Idiehook PL_diehook
+#define PL_Idlevel PL_dlevel
+#define PL_Idlmax PL_dlmax
+#define PL_Idoextract PL_doextract
+#define PL_Idoswitches PL_doswitches
+#define PL_Idowarn PL_dowarn
+#define PL_Idumplvl PL_dumplvl
+#define PL_Ie_script PL_e_script
+#define PL_Iendav PL_endav
+#define PL_Ienvgv PL_envgv
+#define PL_Ierrgv PL_errgv
+#define PL_Ieval_root PL_eval_root
+#define PL_Ieval_start PL_eval_start
+#define PL_Iexitlist PL_exitlist
+#define PL_Iexitlistlen PL_exitlistlen
+#define PL_Ifdpid PL_fdpid
+#define PL_Ifilemode PL_filemode
+#define PL_Iforkprocess PL_forkprocess
+#define PL_Iformfeed PL_formfeed
+#define PL_Igeneration PL_generation
+#define PL_Igensym PL_gensym
+#define PL_Iglobalstash PL_globalstash
+#define PL_Ihintgv PL_hintgv
+#define PL_Iin_clean_all PL_in_clean_all
+#define PL_Iin_clean_objs PL_in_clean_objs
+#define PL_Iincgv PL_incgv
+#define PL_Iinitav PL_initav
+#define PL_Iinplace PL_inplace
+#define PL_Ilast_proto PL_last_proto
+#define PL_Ilastfd PL_lastfd
+#define PL_Ilastsize PL_lastsize
+#define PL_Ilastspbase PL_lastspbase
+#define PL_Ilaststatval PL_laststatval
+#define PL_Ilaststype PL_laststype
+#define PL_Ileftgv PL_leftgv
+#define PL_Ilineary PL_lineary
+#define PL_Ilinestart PL_linestart
+#define PL_Ilocalpatches PL_localpatches
+#define PL_Imain_cv PL_main_cv
+#define PL_Imain_root PL_main_root
+#define PL_Imain_start PL_main_start
+#define PL_Imaxsysfd PL_maxsysfd
+#define PL_Imess_sv PL_mess_sv
+#define PL_Iminus_F PL_minus_F
+#define PL_Iminus_a PL_minus_a
+#define PL_Iminus_c PL_minus_c
+#define PL_Iminus_l PL_minus_l
+#define PL_Iminus_n PL_minus_n
+#define PL_Iminus_p PL_minus_p
+#define PL_Imodglobal PL_modglobal
+#define PL_Imultiline PL_multiline
+#define PL_Imystrk PL_mystrk
+#define PL_Iofmt PL_ofmt
+#define PL_Ioldlastpm PL_oldlastpm
+#define PL_Ioldname PL_oldname
+#define PL_Iop_mask PL_op_mask
+#define PL_Iorigargc PL_origargc
+#define PL_Iorigargv PL_origargv
+#define PL_Iorigfilename PL_origfilename
+#define PL_Iors PL_ors
+#define PL_Iorslen PL_orslen
+#define PL_Iparsehook PL_parsehook
+#define PL_Ipatchlevel PL_patchlevel
+#define PL_Ipending_ident PL_pending_ident
+#define PL_Iperl_destruct_level PL_perl_destruct_level
+#define PL_Iperldb PL_perldb
+#define PL_Ipreambleav PL_preambleav
+#define PL_Ipreambled PL_preambled
+#define PL_Ipreprocess PL_preprocess
+#define PL_Iprofiledata PL_profiledata
+#define PL_Ireplgv PL_replgv
+#define PL_Irightgv PL_rightgv
+#define PL_Irsfp PL_rsfp
+#define PL_Irsfp_filters PL_rsfp_filters
+#define PL_Isawampersand PL_sawampersand
+#define PL_Isawstudy PL_sawstudy
+#define PL_Isawvec PL_sawvec
+#define PL_Isiggv PL_siggv
+#define PL_Isplitstr PL_splitstr
+#define PL_Istatusvalue PL_statusvalue
+#define PL_Istatusvalue_vms PL_statusvalue_vms
+#define PL_Istdingv PL_stdingv
+#define PL_Istrchop PL_strchop
+#define PL_Istrtab PL_strtab
+#define PL_Istrtab_mutex PL_strtab_mutex
+#define PL_Isub_generation PL_sub_generation
+#define PL_Isublex_info PL_sublex_info
+#define PL_Isv_arenaroot PL_sv_arenaroot
+#define PL_Isv_count PL_sv_count
+#define PL_Isv_objcount PL_sv_objcount
+#define PL_Isv_root PL_sv_root
+#define PL_Isys_intern PL_sys_intern
+#define PL_Itainting PL_tainting
+#define PL_Ithreadnum PL_threadnum
+#define PL_Ithrsv PL_thrsv
+#define PL_Iunsafe PL_unsafe
+#define PL_Iwarnhook PL_warnhook
+
+#ifndef USE_THREADS
+
+#define PL_TSv PL_Sv
+#define PL_TXpv PL_Xpv
+#define PL_Tav_fetch_sv PL_av_fetch_sv
+#define PL_Tbodytarget PL_bodytarget
+#define PL_Tbostr PL_bostr
+#define PL_Tchopset PL_chopset
+#define PL_Tcolors PL_colors
+#define PL_Tcolorset PL_colorset
+#define PL_Tcurcop PL_curcop
+#define PL_Tcurpad PL_curpad
+#define PL_Tcurpm PL_curpm
+#define PL_Tcurstack PL_curstack
+#define PL_Tcurstackinfo PL_curstackinfo
+#define PL_Tcurstash PL_curstash
+#define PL_Tdefoutgv PL_defoutgv
+#define PL_Tdefstash PL_defstash
+#define PL_Tdelaymagic PL_delaymagic
+#define PL_Tdirty PL_dirty
+#define PL_Textralen PL_extralen
+#define PL_Tfirstgv PL_firstgv
+#define PL_Tformtarget PL_formtarget
+#define PL_Thv_fetch_ent_mh PL_hv_fetch_ent_mh
+#define PL_Thv_fetch_sv PL_hv_fetch_sv
+#define PL_Tin_eval PL_in_eval
+#define PL_Tlast_in_gv PL_last_in_gv
+#define PL_Tlastgotoprobe PL_lastgotoprobe
+#define PL_Tlastscream PL_lastscream
+#define PL_Tlocalizing PL_localizing
+#define PL_Tmainstack PL_mainstack
+#define PL_Tmarkstack PL_markstack
+#define PL_Tmarkstack_max PL_markstack_max
+#define PL_Tmarkstack_ptr PL_markstack_ptr
+#define PL_Tmaxscream PL_maxscream
+#define PL_Tmodcount PL_modcount
+#define PL_Tnrs PL_nrs
+#define PL_Tofs PL_ofs
+#define PL_Tofslen PL_ofslen
+#define PL_Top PL_op
+#define PL_Topsave PL_opsave
+#define PL_Treg_eval_set PL_reg_eval_set
+#define PL_Treg_flags PL_reg_flags
+#define PL_Treg_start_tmp PL_reg_start_tmp
+#define PL_Treg_start_tmpl PL_reg_start_tmpl
+#define PL_Tregbol PL_regbol
+#define PL_Tregcc PL_regcc
+#define PL_Tregcode PL_regcode
+#define PL_Tregcomp_parse PL_regcomp_parse
+#define PL_Tregcomp_rx PL_regcomp_rx
+#define PL_Tregcompp PL_regcompp
+#define PL_Tregdata PL_regdata
+#define PL_Tregdummy PL_regdummy
+#define PL_Tregendp PL_regendp
+#define PL_Tregeol PL_regeol
+#define PL_Tregexecp PL_regexecp
+#define PL_Tregflags PL_regflags
+#define PL_Tregindent PL_regindent
+#define PL_Treginput PL_reginput
+#define PL_Treginterp_cnt PL_reginterp_cnt
+#define PL_Treglastparen PL_reglastparen
+#define PL_Tregnarrate PL_regnarrate
+#define PL_Tregnaughty PL_regnaughty
+#define PL_Tregnpar PL_regnpar
+#define PL_Tregprecomp PL_regprecomp
+#define PL_Tregprev PL_regprev
+#define PL_Tregprogram PL_regprogram
+#define PL_Tregsawback PL_regsawback
+#define PL_Tregseen PL_regseen
+#define PL_Tregsize PL_regsize
+#define PL_Tregstartp PL_regstartp
+#define PL_Tregtill PL_regtill
+#define PL_Tregxend PL_regxend
+#define PL_Trestartop PL_restartop
+#define PL_Tretstack PL_retstack
+#define PL_Tretstack_ix PL_retstack_ix
+#define PL_Tretstack_max PL_retstack_max
+#define PL_Trs PL_rs
+#define PL_Tsavestack PL_savestack
+#define PL_Tsavestack_ix PL_savestack_ix
+#define PL_Tsavestack_max PL_savestack_max
+#define PL_Tscopestack PL_scopestack
+#define PL_Tscopestack_ix PL_scopestack_ix
+#define PL_Tscopestack_max PL_scopestack_max
+#define PL_Tscreamfirst PL_screamfirst
+#define PL_Tscreamnext PL_screamnext
+#define PL_Tsecondgv PL_secondgv
+#define PL_Tseen_evals PL_seen_evals
+#define PL_Tseen_zerolen PL_seen_zerolen
+#define PL_Tsortcop PL_sortcop
+#define PL_Tsortcxix PL_sortcxix
+#define PL_Tsortstash PL_sortstash
+#define PL_Tstack_base PL_stack_base
+#define PL_Tstack_max PL_stack_max
+#define PL_Tstack_sp PL_stack_sp
+#define PL_Tstart_env PL_start_env
+#define PL_Tstatbuf PL_statbuf
+#define PL_Tstatcache PL_statcache
+#define PL_Tstatgv PL_statgv
+#define PL_Tstatname PL_statname
+#define PL_Ttainted PL_tainted
+#define PL_Ttimesbuf PL_timesbuf
+#define PL_Ttmps_floor PL_tmps_floor
+#define PL_Ttmps_ix PL_tmps_ix
+#define PL_Ttmps_max PL_tmps_max
+#define PL_Ttmps_stack PL_tmps_stack
+#define PL_Ttop_env PL_top_env
+#define PL_Ttoptarget PL_toptarget
+
+#endif /* USE_THREADS */
+
+/* Hide what would have been interpreter-specific symbols? */
+
+#ifdef EMBED
+
+
+#ifndef USE_THREADS
+
+
+#endif /* USE_THREADS */
+#endif /* EMBED */
+#endif /* MULTIPLICITY */
+
+/* Now same trickey for per-thread variables */
+
+#ifdef USE_THREADS
+
+#define PL_Sv (thr->TSv)
+#define PL_Xpv (thr->TXpv)
+#define PL_av_fetch_sv (thr->Tav_fetch_sv)
+#define PL_bodytarget (thr->Tbodytarget)
+#define PL_bostr (thr->Tbostr)
+#define PL_chopset (thr->Tchopset)
+#define PL_colors (thr->Tcolors)
+#define PL_colorset (thr->Tcolorset)
+#define PL_curcop (thr->Tcurcop)
+#define PL_curpad (thr->Tcurpad)
+#define PL_curpm (thr->Tcurpm)
+#define PL_curstack (thr->Tcurstack)
+#define PL_curstackinfo (thr->Tcurstackinfo)
+#define PL_curstash (thr->Tcurstash)
+#define PL_defoutgv (thr->Tdefoutgv)
+#define PL_defstash (thr->Tdefstash)
+#define PL_delaymagic (thr->Tdelaymagic)
+#define PL_dirty (thr->Tdirty)
+#define PL_extralen (thr->Textralen)
+#define PL_firstgv (thr->Tfirstgv)
+#define PL_formtarget (thr->Tformtarget)
+#define PL_hv_fetch_ent_mh (thr->Thv_fetch_ent_mh)
+#define PL_hv_fetch_sv (thr->Thv_fetch_sv)
+#define PL_in_eval (thr->Tin_eval)
+#define PL_last_in_gv (thr->Tlast_in_gv)
+#define PL_lastgotoprobe (thr->Tlastgotoprobe)
+#define PL_lastscream (thr->Tlastscream)
+#define PL_localizing (thr->Tlocalizing)
+#define PL_mainstack (thr->Tmainstack)
+#define PL_markstack (thr->Tmarkstack)
+#define PL_markstack_max (thr->Tmarkstack_max)
+#define PL_markstack_ptr (thr->Tmarkstack_ptr)
+#define PL_maxscream (thr->Tmaxscream)
+#define PL_modcount (thr->Tmodcount)
+#define PL_nrs (thr->Tnrs)
+#define PL_ofs (thr->Tofs)
+#define PL_ofslen (thr->Tofslen)
+#define PL_op (thr->Top)
+#define PL_opsave (thr->Topsave)
+#define PL_reg_eval_set (thr->Treg_eval_set)
+#define PL_reg_flags (thr->Treg_flags)
+#define PL_reg_start_tmp (thr->Treg_start_tmp)
+#define PL_reg_start_tmpl (thr->Treg_start_tmpl)
+#define PL_regbol (thr->Tregbol)
+#define PL_regcc (thr->Tregcc)
+#define PL_regcode (thr->Tregcode)
+#define PL_regcomp_parse (thr->Tregcomp_parse)
+#define PL_regcomp_rx (thr->Tregcomp_rx)
+#define PL_regcompp (thr->Tregcompp)
+#define PL_regdata (thr->Tregdata)
+#define PL_regdummy (thr->Tregdummy)
+#define PL_regendp (thr->Tregendp)
+#define PL_regeol (thr->Tregeol)
+#define PL_regexecp (thr->Tregexecp)
+#define PL_regflags (thr->Tregflags)
+#define PL_regindent (thr->Tregindent)
+#define PL_reginput (thr->Treginput)
+#define PL_reginterp_cnt (thr->Treginterp_cnt)
+#define PL_reglastparen (thr->Treglastparen)
+#define PL_regnarrate (thr->Tregnarrate)
+#define PL_regnaughty (thr->Tregnaughty)
+#define PL_regnpar (thr->Tregnpar)
+#define PL_regprecomp (thr->Tregprecomp)
+#define PL_regprev (thr->Tregprev)
+#define PL_regprogram (thr->Tregprogram)
+#define PL_regsawback (thr->Tregsawback)
+#define PL_regseen (thr->Tregseen)
+#define PL_regsize (thr->Tregsize)
+#define PL_regstartp (thr->Tregstartp)
+#define PL_regtill (thr->Tregtill)
+#define PL_regxend (thr->Tregxend)
+#define PL_restartop (thr->Trestartop)
+#define PL_retstack (thr->Tretstack)
+#define PL_retstack_ix (thr->Tretstack_ix)
+#define PL_retstack_max (thr->Tretstack_max)
+#define PL_rs (thr->Trs)
+#define PL_savestack (thr->Tsavestack)
+#define PL_savestack_ix (thr->Tsavestack_ix)
+#define PL_savestack_max (thr->Tsavestack_max)
+#define PL_scopestack (thr->Tscopestack)
+#define PL_scopestack_ix (thr->Tscopestack_ix)
+#define PL_scopestack_max (thr->Tscopestack_max)
+#define PL_screamfirst (thr->Tscreamfirst)
+#define PL_screamnext (thr->Tscreamnext)
+#define PL_secondgv (thr->Tsecondgv)
+#define PL_seen_evals (thr->Tseen_evals)
+#define PL_seen_zerolen (thr->Tseen_zerolen)
+#define PL_sortcop (thr->Tsortcop)
+#define PL_sortcxix (thr->Tsortcxix)
+#define PL_sortstash (thr->Tsortstash)
+#define PL_stack_base (thr->Tstack_base)
+#define PL_stack_max (thr->Tstack_max)
+#define PL_stack_sp (thr->Tstack_sp)
+#define PL_start_env (thr->Tstart_env)
+#define PL_statbuf (thr->Tstatbuf)
+#define PL_statcache (thr->Tstatcache)
+#define PL_statgv (thr->Tstatgv)
+#define PL_statname (thr->Tstatname)
+#define PL_tainted (thr->Ttainted)
+#define PL_timesbuf (thr->Ttimesbuf)
+#define PL_tmps_floor (thr->Ttmps_floor)
+#define PL_tmps_ix (thr->Ttmps_ix)
+#define PL_tmps_max (thr->Ttmps_max)
+#define PL_tmps_stack (thr->Ttmps_stack)
+#define PL_top_env (thr->Ttop_env)
+#define PL_toptarget (thr->Ttoptarget)
+
+#endif /* USE_THREADS */
+
+#ifdef PERL_GLOBAL_STRUCT
+
+#define PL_No (PL_Vars.GNo)
+#define PL_Yes (PL_Vars.GYes)
+#define PL_amagic_generation (PL_Vars.Gamagic_generation)
+#define PL_an (PL_Vars.Gan)
+#define PL_bufend (PL_Vars.Gbufend)
+#define PL_bufptr (PL_Vars.Gbufptr)
+#define PL_collation_ix (PL_Vars.Gcollation_ix)
+#define PL_collation_name (PL_Vars.Gcollation_name)
+#define PL_collation_standard (PL_Vars.Gcollation_standard)
+#define PL_collxfrm_base (PL_Vars.Gcollxfrm_base)
+#define PL_collxfrm_mult (PL_Vars.Gcollxfrm_mult)
+#define PL_cop_seqmax (PL_Vars.Gcop_seqmax)
+#define PL_cred_mutex (PL_Vars.Gcred_mutex)
+#define PL_cryptseen (PL_Vars.Gcryptseen)
+#define PL_cshlen (PL_Vars.Gcshlen)
+#define PL_cshname (PL_Vars.Gcshname)
+#define PL_curinterp (PL_Vars.Gcurinterp)
+#define PL_curthr (PL_Vars.Gcurthr)
+#define PL_debug (PL_Vars.Gdebug)
+#define PL_do_undump (PL_Vars.Gdo_undump)
+#define PL_egid (PL_Vars.Gegid)
+#define PL_error_count (PL_Vars.Gerror_count)
+#define PL_euid (PL_Vars.Geuid)
+#define PL_eval_cond (PL_Vars.Geval_cond)
+#define PL_eval_mutex (PL_Vars.Geval_mutex)
+#define PL_eval_owner (PL_Vars.Geval_owner)
+#define PL_evalseq (PL_Vars.Gevalseq)
+#define PL_expect (PL_Vars.Gexpect)
+#define PL_gid (PL_Vars.Ggid)
+#define PL_he_root (PL_Vars.Ghe_root)
+#define PL_hexdigit (PL_Vars.Ghexdigit)
+#define PL_hints (PL_Vars.Ghints)
+#define PL_in_my (PL_Vars.Gin_my)
+#define PL_in_my_stash (PL_Vars.Gin_my_stash)
+#define PL_last_lop (PL_Vars.Glast_lop)
+#define PL_last_lop_op (PL_Vars.Glast_lop_op)
+#define PL_last_uni (PL_Vars.Glast_uni)
+#define PL_lex_brackets (PL_Vars.Glex_brackets)
+#define PL_lex_brackstack (PL_Vars.Glex_brackstack)
+#define PL_lex_casemods (PL_Vars.Glex_casemods)
+#define PL_lex_casestack (PL_Vars.Glex_casestack)
+#define PL_lex_defer (PL_Vars.Glex_defer)
+#define PL_lex_dojoin (PL_Vars.Glex_dojoin)
+#define PL_lex_expect (PL_Vars.Glex_expect)
+#define PL_lex_fakebrack (PL_Vars.Glex_fakebrack)
+#define PL_lex_formbrack (PL_Vars.Glex_formbrack)
+#define PL_lex_inpat (PL_Vars.Glex_inpat)
+#define PL_lex_inwhat (PL_Vars.Glex_inwhat)
+#define PL_lex_op (PL_Vars.Glex_op)
+#define PL_lex_repl (PL_Vars.Glex_repl)
+#define PL_lex_starts (PL_Vars.Glex_starts)
+#define PL_lex_state (PL_Vars.Glex_state)
+#define PL_lex_stuff (PL_Vars.Glex_stuff)
+#define PL_linestr (PL_Vars.Glinestr)
+#define PL_malloc_mutex (PL_Vars.Gmalloc_mutex)
+#define PL_max_intro_pending (PL_Vars.Gmax_intro_pending)
+#define PL_maxo (PL_Vars.Gmaxo)
+#define PL_min_intro_pending (PL_Vars.Gmin_intro_pending)
+#define PL_multi_close (PL_Vars.Gmulti_close)
+#define PL_multi_end (PL_Vars.Gmulti_end)
+#define PL_multi_open (PL_Vars.Gmulti_open)
+#define PL_multi_start (PL_Vars.Gmulti_start)
+#define PL_na (PL_Vars.Gna)
+#define PL_nexttoke (PL_Vars.Gnexttoke)
+#define PL_nexttype (PL_Vars.Gnexttype)
+#define PL_nextval (PL_Vars.Gnextval)
+#define PL_nice_chunk (PL_Vars.Gnice_chunk)
+#define PL_nice_chunk_size (PL_Vars.Gnice_chunk_size)
+#define PL_ninterps (PL_Vars.Gninterps)
+#define PL_nomemok (PL_Vars.Gnomemok)
+#define PL_nthreads (PL_Vars.Gnthreads)
+#define PL_nthreads_cond (PL_Vars.Gnthreads_cond)
+#define PL_numeric_local (PL_Vars.Gnumeric_local)
+#define PL_numeric_name (PL_Vars.Gnumeric_name)
+#define PL_numeric_standard (PL_Vars.Gnumeric_standard)
+#define PL_oldbufptr (PL_Vars.Goldbufptr)
+#define PL_oldoldbufptr (PL_Vars.Goldoldbufptr)
+#define PL_op_seqmax (PL_Vars.Gop_seqmax)
+#define PL_origalen (PL_Vars.Gorigalen)
+#define PL_origenviron (PL_Vars.Gorigenviron)
+#define PL_osname (PL_Vars.Gosname)
+#define PL_pad_reset_pending (PL_Vars.Gpad_reset_pending)
+#define PL_padix (PL_Vars.Gpadix)
+#define PL_padix_floor (PL_Vars.Gpadix_floor)
+#define PL_patleave (PL_Vars.Gpatleave)
+#define PL_pidstatus (PL_Vars.Gpidstatus)
+#define PL_runops (PL_Vars.Grunops)
+#define PL_sh_path (PL_Vars.Gsh_path)
+#define PL_sighandlerp (PL_Vars.Gsighandlerp)
+#define PL_specialsv_list (PL_Vars.Gspecialsv_list)
+#define PL_subline (PL_Vars.Gsubline)
+#define PL_subname (PL_Vars.Gsubname)
+#define PL_sv_mutex (PL_Vars.Gsv_mutex)
+#define PL_sv_no (PL_Vars.Gsv_no)
+#define PL_sv_undef (PL_Vars.Gsv_undef)
+#define PL_sv_yes (PL_Vars.Gsv_yes)
+#define PL_svref_mutex (PL_Vars.Gsvref_mutex)
+#define PL_thisexpr (PL_Vars.Gthisexpr)
+#define PL_thr_key (PL_Vars.Gthr_key)
+#define PL_threads_mutex (PL_Vars.Gthreads_mutex)
+#define PL_threadsv_names (PL_Vars.Gthreadsv_names)
+#define PL_tokenbuf (PL_Vars.Gtokenbuf)
+#define PL_uid (PL_Vars.Guid)
+#define PL_xiv_arenaroot (PL_Vars.Gxiv_arenaroot)
+#define PL_xiv_root (PL_Vars.Gxiv_root)
+#define PL_xnv_root (PL_Vars.Gxnv_root)
+#define PL_xpv_root (PL_Vars.Gxpv_root)
+#define PL_xrv_root (PL_Vars.Gxrv_root)
+
+#else /* !PERL_GLOBAL_STRUCT */
+
+#define PL_GNo PL_No
+#define PL_GYes PL_Yes
+#define PL_Gamagic_generation PL_amagic_generation
+#define PL_Gan PL_an
+#define PL_Gbufend PL_bufend
+#define PL_Gbufptr PL_bufptr
+#define PL_Gcollation_ix PL_collation_ix
+#define PL_Gcollation_name PL_collation_name
+#define PL_Gcollation_standard PL_collation_standard
+#define PL_Gcollxfrm_base PL_collxfrm_base
+#define PL_Gcollxfrm_mult PL_collxfrm_mult
+#define PL_Gcop_seqmax PL_cop_seqmax
+#define PL_Gcred_mutex PL_cred_mutex
+#define PL_Gcryptseen PL_cryptseen
+#define PL_Gcshlen PL_cshlen
+#define PL_Gcshname PL_cshname
+#define PL_Gcurinterp PL_curinterp
+#define PL_Gcurthr PL_curthr
+#define PL_Gdebug PL_debug
+#define PL_Gdo_undump PL_do_undump
+#define PL_Gegid PL_egid
+#define PL_Gerror_count PL_error_count
+#define PL_Geuid PL_euid
+#define PL_Geval_cond PL_eval_cond
+#define PL_Geval_mutex PL_eval_mutex
+#define PL_Geval_owner PL_eval_owner
+#define PL_Gevalseq PL_evalseq
+#define PL_Gexpect PL_expect
+#define PL_Ggid PL_gid
+#define PL_Ghe_root PL_he_root
+#define PL_Ghexdigit PL_hexdigit
+#define PL_Ghints PL_hints
+#define PL_Gin_my PL_in_my
+#define PL_Gin_my_stash PL_in_my_stash
+#define PL_Glast_lop PL_last_lop
+#define PL_Glast_lop_op PL_last_lop_op
+#define PL_Glast_uni PL_last_uni
+#define PL_Glex_brackets PL_lex_brackets
+#define PL_Glex_brackstack PL_lex_brackstack
+#define PL_Glex_casemods PL_lex_casemods
+#define PL_Glex_casestack PL_lex_casestack
+#define PL_Glex_defer PL_lex_defer
+#define PL_Glex_dojoin PL_lex_dojoin
+#define PL_Glex_expect PL_lex_expect
+#define PL_Glex_fakebrack PL_lex_fakebrack
+#define PL_Glex_formbrack PL_lex_formbrack
+#define PL_Glex_inpat PL_lex_inpat
+#define PL_Glex_inwhat PL_lex_inwhat
+#define PL_Glex_op PL_lex_op
+#define PL_Glex_repl PL_lex_repl
+#define PL_Glex_starts PL_lex_starts
+#define PL_Glex_state PL_lex_state
+#define PL_Glex_stuff PL_lex_stuff
+#define PL_Glinestr PL_linestr
+#define PL_Gmalloc_mutex PL_malloc_mutex
+#define PL_Gmax_intro_pending PL_max_intro_pending
+#define PL_Gmaxo PL_maxo
+#define PL_Gmin_intro_pending PL_min_intro_pending
+#define PL_Gmulti_close PL_multi_close
+#define PL_Gmulti_end PL_multi_end
+#define PL_Gmulti_open PL_multi_open
+#define PL_Gmulti_start PL_multi_start
+#define PL_Gna PL_na
+#define PL_Gnexttoke PL_nexttoke
+#define PL_Gnexttype PL_nexttype
+#define PL_Gnextval PL_nextval
+#define PL_Gnice_chunk PL_nice_chunk
+#define PL_Gnice_chunk_size PL_nice_chunk_size
+#define PL_Gninterps PL_ninterps
+#define PL_Gnomemok PL_nomemok
+#define PL_Gnthreads PL_nthreads
+#define PL_Gnthreads_cond PL_nthreads_cond
+#define PL_Gnumeric_local PL_numeric_local
+#define PL_Gnumeric_name PL_numeric_name
+#define PL_Gnumeric_standard PL_numeric_standard
+#define PL_Goldbufptr PL_oldbufptr
+#define PL_Goldoldbufptr PL_oldoldbufptr
+#define PL_Gop_seqmax PL_op_seqmax
+#define PL_Gorigalen PL_origalen
+#define PL_Gorigenviron PL_origenviron
+#define PL_Gosname PL_osname
+#define PL_Gpad_reset_pending PL_pad_reset_pending
+#define PL_Gpadix PL_padix
+#define PL_Gpadix_floor PL_padix_floor
+#define PL_Gpatleave PL_patleave
+#define PL_Gpidstatus PL_pidstatus
+#define PL_Grunops PL_runops
+#define PL_Gsh_path PL_sh_path
+#define PL_Gsighandlerp PL_sighandlerp
+#define PL_Gspecialsv_list PL_specialsv_list
+#define PL_Gsubline PL_subline
+#define PL_Gsubname PL_subname
+#define PL_Gsv_mutex PL_sv_mutex
+#define PL_Gsv_no PL_sv_no
+#define PL_Gsv_undef PL_sv_undef
+#define PL_Gsv_yes PL_sv_yes
+#define PL_Gsvref_mutex PL_svref_mutex
+#define PL_Gthisexpr PL_thisexpr
+#define PL_Gthr_key PL_thr_key
+#define PL_Gthreads_mutex PL_threads_mutex
+#define PL_Gthreadsv_names PL_threadsv_names
+#define PL_Gtokenbuf PL_tokenbuf
+#define PL_Guid PL_uid
+#define PL_Gxiv_arenaroot PL_xiv_arenaroot
+#define PL_Gxiv_root PL_xiv_root
+#define PL_Gxnv_root PL_xnv_root
+#define PL_Gxpv_root PL_xpv_root
+#define PL_Gxrv_root PL_xrv_root
+
+#ifdef EMBED
+
+
+#endif /* EMBED */
+#endif /* PERL_GLOBAL_STRUCT */
+
+
+#ifndef MIN_PERL_DEFINE
+
+#define DBsingle PL_DBsingle
+#define DBsub PL_DBsub
+#define compiling PL_compiling
+#define curcop PL_curcop
+#define curstash PL_curstash
+#define debstash PL_debstash
+#define defgv PL_defgv
+#define diehook PL_diehook
+#define dirty PL_dirty
+#define dowarn PL_dowarn
+#define errgv PL_errgv
+#define na PL_na
+#define perl_destruct_level PL_perl_destruct_level
+#define perldb PL_perldb
+#define rsfp PL_rsfp
+#define rsfp_filters PL_rsfp_filters
+#define stack_base PL_stack_base
+#define stack_sp PL_stack_sp
+#define stdingv PL_stdingv
+#define sv_arenaroot PL_sv_arenaroot
+#define sv_no PL_sv_no
+#define sv_undef PL_sv_undef
+#define sv_yes PL_sv_yes
+#define tainted PL_tainted
+#define tainting PL_tainting
+
+#endif /* MIN_PERL_DEFINE */
diff --git a/gnu/usr.bin/perl/ext/B/B.pm b/gnu/usr.bin/perl/ext/B/B.pm
new file mode 100644
index 00000000000..75dcfb3b74d
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/B/B.pm
@@ -0,0 +1,831 @@
+# B.pm
+#
+# Copyright (c) 1996, 1997, 1998 Malcolm Beattie
+#
+# You may distribute under the terms of either the GNU General Public
+# License or the Artistic License, as specified in the README file.
+#
+package B;
+require DynaLoader;
+require Exporter;
+@ISA = qw(Exporter DynaLoader);
+@EXPORT_OK = qw(byteload_fh byteload_string minus_c ppname
+ class peekop cast_I32 cstring cchar hash threadsv_names
+ main_root main_start main_cv svref_2object
+ walkoptree walkoptree_slow walkoptree_exec walksymtable
+ parents comppadlist sv_undef compile_stats timing_info init_av);
+
+use strict;
+@B::SV::ISA = 'B::OBJECT';
+@B::NULL::ISA = 'B::SV';
+@B::PV::ISA = 'B::SV';
+@B::IV::ISA = 'B::SV';
+@B::NV::ISA = 'B::IV';
+@B::RV::ISA = 'B::SV';
+@B::PVIV::ISA = qw(B::PV B::IV);
+@B::PVNV::ISA = qw(B::PV B::NV);
+@B::PVMG::ISA = 'B::PVNV';
+@B::PVLV::ISA = 'B::PVMG';
+@B::BM::ISA = 'B::PVMG';
+@B::AV::ISA = 'B::PVMG';
+@B::GV::ISA = 'B::PVMG';
+@B::HV::ISA = 'B::PVMG';
+@B::CV::ISA = 'B::PVMG';
+@B::IO::ISA = 'B::PVMG';
+@B::FM::ISA = 'B::CV';
+
+@B::OP::ISA = 'B::OBJECT';
+@B::UNOP::ISA = 'B::OP';
+@B::BINOP::ISA = 'B::UNOP';
+@B::LOGOP::ISA = 'B::UNOP';
+@B::CONDOP::ISA = 'B::UNOP';
+@B::LISTOP::ISA = 'B::BINOP';
+@B::SVOP::ISA = 'B::OP';
+@B::GVOP::ISA = 'B::OP';
+@B::PVOP::ISA = 'B::OP';
+@B::CVOP::ISA = 'B::OP';
+@B::LOOP::ISA = 'B::LISTOP';
+@B::PMOP::ISA = 'B::LISTOP';
+@B::COP::ISA = 'B::OP';
+
+@B::SPECIAL::ISA = 'B::OBJECT';
+
+{
+ # Stop "-w" from complaining about the lack of a real B::OBJECT class
+ package B::OBJECT;
+}
+
+my $debug;
+my $op_count = 0;
+my @parents = ();
+
+sub debug {
+ my ($class, $value) = @_;
+ $debug = $value;
+ walkoptree_debug($value);
+}
+
+# sub OPf_KIDS;
+# add to .xs for perl5.002
+sub OPf_KIDS () { 4 }
+
+sub class {
+ my $obj = shift;
+ my $name = ref $obj;
+ $name =~ s/^.*:://;
+ return $name;
+}
+
+sub parents { \@parents }
+
+# For debugging
+sub peekop {
+ my $op = shift;
+ return sprintf("%s (0x%x) %s", class($op), $$op, $op->ppaddr);
+}
+
+sub walkoptree_slow {
+ my($op, $method, $level) = @_;
+ $op_count++; # just for statistics
+ $level ||= 0;
+ warn(sprintf("walkoptree: %d. %s\n", $level, peekop($op))) if $debug;
+ $op->$method($level);
+ if ($$op && ($op->flags & OPf_KIDS)) {
+ my $kid;
+ unshift(@parents, $op);
+ for ($kid = $op->first; $$kid; $kid = $kid->sibling) {
+ walkoptree_slow($kid, $method, $level + 1);
+ }
+ shift @parents;
+ }
+}
+
+sub compile_stats {
+ return "Total number of OPs processed: $op_count\n";
+}
+
+sub timing_info {
+ my ($sec, $min, $hr) = localtime;
+ my ($user, $sys) = times;
+ sprintf("%02d:%02d:%02d user=$user sys=$sys",
+ $hr, $min, $sec, $user, $sys);
+}
+
+my %symtable;
+sub savesym {
+ my ($obj, $value) = @_;
+# warn(sprintf("savesym: sym_%x => %s\n", $$obj, $value)); # debug
+ $symtable{sprintf("sym_%x", $$obj)} = $value;
+}
+
+sub objsym {
+ my $obj = shift;
+ return $symtable{sprintf("sym_%x", $$obj)};
+}
+
+sub walkoptree_exec {
+ my ($op, $method, $level) = @_;
+ my ($sym, $ppname);
+ my $prefix = " " x $level;
+ for (; $$op; $op = $op->next) {
+ $sym = objsym($op);
+ if (defined($sym)) {
+ print $prefix, "goto $sym\n";
+ return;
+ }
+ savesym($op, sprintf("%s (0x%lx)", class($op), $$op));
+ $op->$method($level);
+ $ppname = $op->ppaddr;
+ if ($ppname =~ /^pp_(or|and|mapwhile|grepwhile|entertry)$/) {
+ print $prefix, uc($1), " => {\n";
+ walkoptree_exec($op->other, $method, $level + 1);
+ print $prefix, "}\n";
+ } elsif ($ppname eq "pp_match" || $ppname eq "pp_subst") {
+ my $pmreplstart = $op->pmreplstart;
+ if ($$pmreplstart) {
+ print $prefix, "PMREPLSTART => {\n";
+ walkoptree_exec($pmreplstart, $method, $level + 1);
+ print $prefix, "}\n";
+ }
+ } elsif ($ppname eq "pp_substcont") {
+ print $prefix, "SUBSTCONT => {\n";
+ walkoptree_exec($op->other->pmreplstart, $method, $level + 1);
+ print $prefix, "}\n";
+ $op = $op->other;
+ } elsif ($ppname eq "pp_cond_expr") {
+ # pp_cond_expr never returns op_next
+ print $prefix, "TRUE => {\n";
+ walkoptree_exec($op->true, $method, $level + 1);
+ print $prefix, "}\n";
+ $op = $op->false;
+ redo;
+ } elsif ($ppname eq "pp_range") {
+ print $prefix, "TRUE => {\n";
+ walkoptree_exec($op->true, $method, $level + 1);
+ print $prefix, "}\n", $prefix, "FALSE => {\n";
+ walkoptree_exec($op->false, $method, $level + 1);
+ print $prefix, "}\n";
+ } elsif ($ppname eq "pp_enterloop") {
+ print $prefix, "REDO => {\n";
+ walkoptree_exec($op->redoop, $method, $level + 1);
+ print $prefix, "}\n", $prefix, "NEXT => {\n";
+ walkoptree_exec($op->nextop, $method, $level + 1);
+ print $prefix, "}\n", $prefix, "LAST => {\n";
+ walkoptree_exec($op->lastop, $method, $level + 1);
+ print $prefix, "}\n";
+ } elsif ($ppname eq "pp_subst") {
+ my $replstart = $op->pmreplstart;
+ if ($$replstart) {
+ print $prefix, "SUBST => {\n";
+ walkoptree_exec($replstart, $method, $level + 1);
+ print $prefix, "}\n";
+ }
+ }
+ }
+}
+
+sub walksymtable {
+ my ($symref, $method, $recurse, $prefix) = @_;
+ my $sym;
+ no strict 'vars';
+ local(*glob);
+ while (($sym, *glob) = each %$symref) {
+ if ($sym =~ /::$/) {
+ $sym = $prefix . $sym;
+ if ($sym ne "main::" && &$recurse($sym)) {
+ walksymtable(\%glob, $method, $recurse, $sym);
+ }
+ } else {
+ svref_2object(\*glob)->EGV->$method();
+ }
+ }
+}
+
+{
+ package B::Section;
+ my $output_fh;
+ my %sections;
+
+ sub new {
+ my ($class, $section, $symtable, $default) = @_;
+ $output_fh ||= FileHandle->new_tmpfile;
+ my $obj = bless [-1, $section, $symtable, $default], $class;
+ $sections{$section} = $obj;
+ return $obj;
+ }
+
+ sub get {
+ my ($class, $section) = @_;
+ return $sections{$section};
+ }
+
+ sub add {
+ my $section = shift;
+ while (defined($_ = shift)) {
+ print $output_fh "$section->[1]\t$_\n";
+ $section->[0]++;
+ }
+ }
+
+ sub index {
+ my $section = shift;
+ return $section->[0];
+ }
+
+ sub name {
+ my $section = shift;
+ return $section->[1];
+ }
+
+ sub symtable {
+ my $section = shift;
+ return $section->[2];
+ }
+
+ sub default {
+ my $section = shift;
+ return $section->[3];
+ }
+
+ sub output {
+ my ($section, $fh, $format) = @_;
+ my $name = $section->name;
+ my $sym = $section->symtable || {};
+ my $default = $section->default;
+
+ seek($output_fh, 0, 0);
+ while (<$output_fh>) {
+ chomp;
+ s/^(.*?)\t//;
+ if ($1 eq $name) {
+ s{(s\\_[0-9a-f]+)} {
+ exists($sym->{$1}) ? $sym->{$1} : $default;
+ }ge;
+ printf $fh $format, $_;
+ }
+ }
+ }
+}
+
+bootstrap B;
+
+1;
+
+__END__
+
+=head1 NAME
+
+B - The Perl Compiler
+
+=head1 SYNOPSIS
+
+ use B;
+
+=head1 DESCRIPTION
+
+The C<B> module supplies classes which allow a Perl program to delve
+into its own innards. It is the module used to implement the
+"backends" of the Perl compiler. Usage of the compiler does not
+require knowledge of this module: see the F<O> module for the
+user-visible part. The C<B> module is of use to those who want to
+write new compiler backends. This documentation assumes that the
+reader knows a fair amount about perl's internals including such
+things as SVs, OPs and the internal symbol table and syntax tree
+of a program.
+
+=head1 OVERVIEW OF CLASSES
+
+The C structures used by Perl's internals to hold SV and OP
+information (PVIV, AV, HV, ..., OP, SVOP, UNOP, ...) are modelled on a
+class hierarchy and the C<B> module gives access to them via a true
+object hierarchy. Structure fields which point to other objects
+(whether types of SV or types of OP) are represented by the C<B>
+module as Perl objects of the appropriate class. The bulk of the C<B>
+module is the methods for accessing fields of these structures. Note
+that all access is read-only: you cannot modify the internals by
+using this module.
+
+=head2 SV-RELATED CLASSES
+
+B::IV, B::NV, B::RV, B::PV, B::PVIV, B::PVNV, B::PVMG, B::BM, B::PVLV,
+B::AV, B::HV, B::CV, B::GV, B::FM, B::IO. These classes correspond in
+the obvious way to the underlying C structures of similar names. The
+inheritance hierarchy mimics the underlying C "inheritance". Access
+methods correspond to the underlying C macros for field access,
+usually with the leading "class indication" prefix removed (Sv, Av,
+Hv, ...). The leading prefix is only left in cases where its removal
+would cause a clash in method name. For example, C<GvREFCNT> stays
+as-is since its abbreviation would clash with the "superclass" method
+C<REFCNT> (corresponding to the C function C<SvREFCNT>).
+
+=head2 B::SV METHODS
+
+=over 4
+
+=item REFCNT
+
+=item FLAGS
+
+=back
+
+=head2 B::IV METHODS
+
+=over 4
+
+=item IV
+
+=item IVX
+
+=item needs64bits
+
+=item packiv
+
+=back
+
+=head2 B::NV METHODS
+
+=over 4
+
+=item NV
+
+=item NVX
+
+=back
+
+=head2 B::RV METHODS
+
+=over 4
+
+=item RV
+
+=back
+
+=head2 B::PV METHODS
+
+=over 4
+
+=item PV
+
+=back
+
+=head2 B::PVMG METHODS
+
+=over 4
+
+=item MAGIC
+
+=item SvSTASH
+
+=back
+
+=head2 B::MAGIC METHODS
+
+=over 4
+
+=item MOREMAGIC
+
+=item PRIVATE
+
+=item TYPE
+
+=item FLAGS
+
+=item OBJ
+
+=item PTR
+
+=back
+
+=head2 B::PVLV METHODS
+
+=over 4
+
+=item TARGOFF
+
+=item TARGLEN
+
+=item TYPE
+
+=item TARG
+
+=back
+
+=head2 B::BM METHODS
+
+=over 4
+
+=item USEFUL
+
+=item PREVIOUS
+
+=item RARE
+
+=item TABLE
+
+=back
+
+=head2 B::GV METHODS
+
+=over 4
+
+=item NAME
+
+=item STASH
+
+=item SV
+
+=item IO
+
+=item FORM
+
+=item AV
+
+=item HV
+
+=item EGV
+
+=item CV
+
+=item CVGEN
+
+=item LINE
+
+=item FILEGV
+
+=item GvREFCNT
+
+=item FLAGS
+
+=back
+
+=head2 B::IO METHODS
+
+=over 4
+
+=item LINES
+
+=item PAGE
+
+=item PAGE_LEN
+
+=item LINES_LEFT
+
+=item TOP_NAME
+
+=item TOP_GV
+
+=item FMT_NAME
+
+=item FMT_GV
+
+=item BOTTOM_NAME
+
+=item BOTTOM_GV
+
+=item SUBPROCESS
+
+=item IoTYPE
+
+=item IoFLAGS
+
+=back
+
+=head2 B::AV METHODS
+
+=over 4
+
+=item FILL
+
+=item MAX
+
+=item OFF
+
+=item ARRAY
+
+=item AvFLAGS
+
+=back
+
+=head2 B::CV METHODS
+
+=over 4
+
+=item STASH
+
+=item START
+
+=item ROOT
+
+=item GV
+
+=item FILEGV
+
+=item DEPTH
+
+=item PADLIST
+
+=item OUTSIDE
+
+=item XSUB
+
+=item XSUBANY
+
+=item CvFLAGS
+
+=back
+
+=head2 B::HV METHODS
+
+=over 4
+
+=item FILL
+
+=item MAX
+
+=item KEYS
+
+=item RITER
+
+=item NAME
+
+=item PMROOT
+
+=item ARRAY
+
+=back
+
+=head2 OP-RELATED CLASSES
+
+B::OP, B::UNOP, B::BINOP, B::LOGOP, B::CONDOP, B::LISTOP, B::PMOP,
+B::SVOP, B::GVOP, B::PVOP, B::CVOP, B::LOOP, B::COP.
+These classes correspond in
+the obvious way to the underlying C structures of similar names. The
+inheritance hierarchy mimics the underlying C "inheritance". Access
+methods correspond to the underlying C structre field names, with the
+leading "class indication" prefix removed (op_).
+
+=head2 B::OP METHODS
+
+=over 4
+
+=item next
+
+=item sibling
+
+=item ppaddr
+
+This returns the function name as a string (e.g. pp_add, pp_rv2av).
+
+=item desc
+
+This returns the op description from the global C PL_op_desc array
+(e.g. "addition" "array deref").
+
+=item targ
+
+=item type
+
+=item seq
+
+=item flags
+
+=item private
+
+=back
+
+=head2 B::UNOP METHOD
+
+=over 4
+
+=item first
+
+=back
+
+=head2 B::BINOP METHOD
+
+=over 4
+
+=item last
+
+=back
+
+=head2 B::LOGOP METHOD
+
+=over 4
+
+=item other
+
+=back
+
+=head2 B::CONDOP METHODS
+
+=over 4
+
+=item true
+
+=item false
+
+=back
+
+=head2 B::LISTOP METHOD
+
+=over 4
+
+=item children
+
+=back
+
+=head2 B::PMOP METHODS
+
+=over 4
+
+=item pmreplroot
+
+=item pmreplstart
+
+=item pmnext
+
+=item pmregexp
+
+=item pmflags
+
+=item pmpermflags
+
+=item precomp
+
+=back
+
+=head2 B::SVOP METHOD
+
+=over 4
+
+=item sv
+
+=back
+
+=head2 B::GVOP METHOD
+
+=over 4
+
+=item gv
+
+=back
+
+=head2 B::PVOP METHOD
+
+=over 4
+
+=item pv
+
+=back
+
+=head2 B::LOOP METHODS
+
+=over 4
+
+=item redoop
+
+=item nextop
+
+=item lastop
+
+=back
+
+=head2 B::COP METHODS
+
+=over 4
+
+=item label
+
+=item stash
+
+=item filegv
+
+=item cop_seq
+
+=item arybase
+
+=item line
+
+=back
+
+=head1 FUNCTIONS EXPORTED BY C<B>
+
+The C<B> module exports a variety of functions: some are simple
+utility functions, others provide a Perl program with a way to
+get an initial "handle" on an internal object.
+
+=over 4
+
+=item main_cv
+
+Return the (faked) CV corresponding to the main part of the Perl
+program.
+
+=item init_av
+
+Returns the AV object (i.e. in class B::AV) representing INIT blocks.
+
+=item main_root
+
+Returns the root op (i.e. an object in the appropriate B::OP-derived
+class) of the main part of the Perl program.
+
+=item main_start
+
+Returns the starting op of the main part of the Perl program.
+
+=item comppadlist
+
+Returns the AV object (i.e. in class B::AV) of the global comppadlist.
+
+=item sv_undef
+
+Returns the SV object corresponding to the C variable C<sv_undef>.
+
+=item sv_yes
+
+Returns the SV object corresponding to the C variable C<sv_yes>.
+
+=item sv_no
+
+Returns the SV object corresponding to the C variable C<sv_no>.
+
+=item walkoptree(OP, METHOD)
+
+Does a tree-walk of the syntax tree based at OP and calls METHOD on
+each op it visits. Each node is visited before its children. If
+C<walkoptree_debug> (q.v.) has been called to turn debugging on then
+the method C<walkoptree_debug> is called on each op before METHOD is
+called.
+
+=item walkoptree_debug(DEBUG)
+
+Returns the current debugging flag for C<walkoptree>. If the optional
+DEBUG argument is non-zero, it sets the debugging flag to that. See
+the description of C<walkoptree> above for what the debugging flag
+does.
+
+=item walksymtable(SYMREF, METHOD, RECURSE)
+
+Walk the symbol table starting at SYMREF and call METHOD on each
+symbol visited. When the walk reached package symbols "Foo::" it
+invokes RECURSE and only recurses into the package if that sub
+returns true.
+
+=item svref_2object(SV)
+
+Takes any Perl variable and turns it into an object in the
+appropriate B::OP-derived or B::SV-derived class. Apart from functions
+such as C<main_root>, this is the primary way to get an initial
+"handle" on a internal perl data structure which can then be followed
+with the other access methods.
+
+=item ppname(OPNUM)
+
+Return the PP function name (e.g. "pp_add") of op number OPNUM.
+
+=item hash(STR)
+
+Returns a string in the form "0x..." representing the value of the
+internal hash function used by perl on string STR.
+
+=item cast_I32(I)
+
+Casts I to the internal I32 type used by that perl.
+
+
+=item minus_c
+
+Does the equivalent of the C<-c> command-line option. Obviously, this
+is only useful in a BEGIN block or else the flag is set too late.
+
+
+=item cstring(STR)
+
+Returns a double-quote-surrounded escaped version of STR which can
+be used as a string in C source code.
+
+=item class(OBJ)
+
+Returns the class of an object without the part of the classname
+preceding the first "::". This is used to turn "B::UNOP" into
+"UNOP" for example.
+
+=item threadsv_names
+
+In a perl compiled for threads, this returns a list of the special
+per-thread threadsv variables.
+
+=item byteload_fh(FILEHANDLE)
+
+Load the contents of FILEHANDLE as bytecode. See documentation for
+the B<Bytecode> module in F<B::Backend> for how to generate bytecode.
+
+=back
+
+=head1 AUTHOR
+
+Malcolm Beattie, C<mbeattie@sable.ox.ac.uk>
+
+=cut
diff --git a/gnu/usr.bin/perl/ext/B/B.xs b/gnu/usr.bin/perl/ext/B/B.xs
new file mode 100644
index 00000000000..6610ae8d523
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/B/B.xs
@@ -0,0 +1,1219 @@
+/* B.xs
+ *
+ * Copyright (c) 1996 Malcolm Beattie
+ *
+ * You may distribute under the terms of either the GNU General Public
+ * License or the Artistic License, as specified in the README file.
+ *
+ */
+
+#include "EXTERN.h"
+#include "perl.h"
+#include "XSUB.h"
+#include "INTERN.h"
+
+#ifdef PERL_OBJECT
+#undef op_name
+#undef opargs
+#undef op_desc
+#define op_name (pPerl->Perl_get_op_names())
+#define opargs (pPerl->Perl_get_opargs())
+#define op_desc (pPerl->Perl_get_op_descs())
+#endif
+
+#ifdef PerlIO
+typedef PerlIO * InputStream;
+#else
+typedef FILE * InputStream;
+#endif
+
+
+static char *svclassnames[] = {
+ "B::NULL",
+ "B::IV",
+ "B::NV",
+ "B::RV",
+ "B::PV",
+ "B::PVIV",
+ "B::PVNV",
+ "B::PVMG",
+ "B::BM",
+ "B::PVLV",
+ "B::AV",
+ "B::HV",
+ "B::CV",
+ "B::GV",
+ "B::FM",
+ "B::IO",
+};
+
+typedef enum {
+ OPc_NULL, /* 0 */
+ OPc_BASEOP, /* 1 */
+ OPc_UNOP, /* 2 */
+ OPc_BINOP, /* 3 */
+ OPc_LOGOP, /* 4 */
+ OPc_CONDOP, /* 5 */
+ OPc_LISTOP, /* 6 */
+ OPc_PMOP, /* 7 */
+ OPc_SVOP, /* 8 */
+ OPc_GVOP, /* 9 */
+ OPc_PVOP, /* 10 */
+ OPc_CVOP, /* 11 */
+ OPc_LOOP, /* 12 */
+ OPc_COP /* 13 */
+} opclass;
+
+static char *opclassnames[] = {
+ "B::NULL",
+ "B::OP",
+ "B::UNOP",
+ "B::BINOP",
+ "B::LOGOP",
+ "B::CONDOP",
+ "B::LISTOP",
+ "B::PMOP",
+ "B::SVOP",
+ "B::GVOP",
+ "B::PVOP",
+ "B::CVOP",
+ "B::LOOP",
+ "B::COP"
+};
+
+static int walkoptree_debug = 0; /* Flag for walkoptree debug hook */
+
+static opclass
+cc_opclass(OP *o)
+{
+ if (!o)
+ return OPc_NULL;
+
+ if (o->op_type == 0)
+ return (o->op_flags & OPf_KIDS) ? OPc_UNOP : OPc_BASEOP;
+
+ if (o->op_type == OP_SASSIGN)
+ return ((o->op_private & OPpASSIGN_BACKWARDS) ? OPc_UNOP : OPc_BINOP);
+
+ switch (opargs[o->op_type] & OA_CLASS_MASK) {
+ case OA_BASEOP:
+ return OPc_BASEOP;
+
+ case OA_UNOP:
+ return OPc_UNOP;
+
+ case OA_BINOP:
+ return OPc_BINOP;
+
+ case OA_LOGOP:
+ return OPc_LOGOP;
+
+ case OA_CONDOP:
+ return OPc_CONDOP;
+
+ case OA_LISTOP:
+ return OPc_LISTOP;
+
+ case OA_PMOP:
+ return OPc_PMOP;
+
+ case OA_SVOP:
+ return OPc_SVOP;
+
+ case OA_GVOP:
+ return OPc_GVOP;
+
+ case OA_PVOP:
+ return OPc_PVOP;
+
+ case OA_LOOP:
+ return OPc_LOOP;
+
+ case OA_COP:
+ return OPc_COP;
+
+ case OA_BASEOP_OR_UNOP:
+ /*
+ * UNI(OP_foo) in toke.c returns token UNI or FUNC1 depending on
+ * whether parens were seen. perly.y uses OPf_SPECIAL to
+ * signal whether a BASEOP had empty parens or none.
+ * Some other UNOPs are created later, though, so the best
+ * test is OPf_KIDS, which is set in newUNOP.
+ */
+ return (o->op_flags & OPf_KIDS) ? OPc_UNOP : OPc_BASEOP;
+
+ case OA_FILESTATOP:
+ /*
+ * The file stat OPs are created via UNI(OP_foo) in toke.c but use
+ * the OPf_REF flag to distinguish between OP types instead of the
+ * usual OPf_SPECIAL flag. As usual, if OPf_KIDS is set, then we
+ * return OPc_UNOP so that walkoptree can find our children. If
+ * OPf_KIDS is not set then we check OPf_REF. Without OPf_REF set
+ * (no argument to the operator) it's an OP; with OPf_REF set it's
+ * a GVOP (and op_gv is the GV for the filehandle argument).
+ */
+ return ((o->op_flags & OPf_KIDS) ? OPc_UNOP :
+ (o->op_flags & OPf_REF) ? OPc_GVOP : OPc_BASEOP);
+
+ case OA_LOOPEXOP:
+ /*
+ * next, last, redo, dump and goto use OPf_SPECIAL to indicate that a
+ * label was omitted (in which case it's a BASEOP) or else a term was
+ * seen. In this last case, all except goto are definitely PVOP but
+ * goto is either a PVOP (with an ordinary constant label), an UNOP
+ * with OPf_STACKED (with a non-constant non-sub) or an UNOP for
+ * OP_REFGEN (with goto &sub) in which case OPf_STACKED also seems to
+ * get set.
+ */
+ if (o->op_flags & OPf_STACKED)
+ return OPc_UNOP;
+ else if (o->op_flags & OPf_SPECIAL)
+ return OPc_BASEOP;
+ else
+ return OPc_PVOP;
+ }
+ warn("can't determine class of operator %s, assuming BASEOP\n",
+ op_name[o->op_type]);
+ return OPc_BASEOP;
+}
+
+static char *
+cc_opclassname(OP *o)
+{
+ return opclassnames[cc_opclass(o)];
+}
+
+static SV *
+make_sv_object(SV *arg, SV *sv)
+{
+ char *type = 0;
+ IV iv;
+
+ for (iv = 0; iv < sizeof(PL_specialsv_list)/sizeof(SV*); iv++) {
+ if (sv == PL_specialsv_list[iv]) {
+ type = "B::SPECIAL";
+ break;
+ }
+ }
+ if (!type) {
+ type = svclassnames[SvTYPE(sv)];
+ iv = (IV)sv;
+ }
+ sv_setiv(newSVrv(arg, type), iv);
+ return arg;
+}
+
+static SV *
+make_mg_object(SV *arg, MAGIC *mg)
+{
+ sv_setiv(newSVrv(arg, "B::MAGIC"), (IV)mg);
+ return arg;
+}
+
+static SV *
+cstring(SV *sv)
+{
+ SV *sstr = newSVpv("", 0);
+ STRLEN len;
+ char *s;
+
+ if (!SvOK(sv))
+ sv_setpvn(sstr, "0", 1);
+ else
+ {
+ /* XXX Optimise? */
+ s = SvPV(sv, len);
+ sv_catpv(sstr, "\"");
+ for (; len; len--, s++)
+ {
+ /* At least try a little for readability */
+ if (*s == '"')
+ sv_catpv(sstr, "\\\"");
+ else if (*s == '\\')
+ sv_catpv(sstr, "\\\\");
+ else if (*s >= ' ' && *s < 127) /* XXX not portable */
+ sv_catpvn(sstr, s, 1);
+ else if (*s == '\n')
+ sv_catpv(sstr, "\\n");
+ else if (*s == '\r')
+ sv_catpv(sstr, "\\r");
+ else if (*s == '\t')
+ sv_catpv(sstr, "\\t");
+ else if (*s == '\a')
+ sv_catpv(sstr, "\\a");
+ else if (*s == '\b')
+ sv_catpv(sstr, "\\b");
+ else if (*s == '\f')
+ sv_catpv(sstr, "\\f");
+ else if (*s == '\v')
+ sv_catpv(sstr, "\\v");
+ else
+ {
+ /* no trigraph support */
+ char escbuff[5]; /* to fit backslash, 3 octals + trailing \0 */
+ /* Don't want promotion of a signed -1 char in sprintf args */
+ unsigned char c = (unsigned char) *s;
+ sprintf(escbuff, "\\%03o", c);
+ sv_catpv(sstr, escbuff);
+ }
+ /* XXX Add line breaks if string is long */
+ }
+ sv_catpv(sstr, "\"");
+ }
+ return sstr;
+}
+
+static SV *
+cchar(SV *sv)
+{
+ SV *sstr = newSVpv("'", 0);
+ STRLEN n_a;
+ char *s = SvPV(sv, n_a);
+
+ if (*s == '\'')
+ sv_catpv(sstr, "\\'");
+ else if (*s == '\\')
+ sv_catpv(sstr, "\\\\");
+ else if (*s >= ' ' && *s < 127) /* XXX not portable */
+ sv_catpvn(sstr, s, 1);
+ else if (*s == '\n')
+ sv_catpv(sstr, "\\n");
+ else if (*s == '\r')
+ sv_catpv(sstr, "\\r");
+ else if (*s == '\t')
+ sv_catpv(sstr, "\\t");
+ else if (*s == '\a')
+ sv_catpv(sstr, "\\a");
+ else if (*s == '\b')
+ sv_catpv(sstr, "\\b");
+ else if (*s == '\f')
+ sv_catpv(sstr, "\\f");
+ else if (*s == '\v')
+ sv_catpv(sstr, "\\v");
+ else
+ {
+ /* no trigraph support */
+ char escbuff[5]; /* to fit backslash, 3 octals + trailing \0 */
+ /* Don't want promotion of a signed -1 char in sprintf args */
+ unsigned char c = (unsigned char) *s;
+ sprintf(escbuff, "\\%03o", c);
+ sv_catpv(sstr, escbuff);
+ }
+ sv_catpv(sstr, "'");
+ return sstr;
+}
+
+#ifdef INDIRECT_BGET_MACROS
+void freadpv(U32 len, void *data)
+{
+ New(666, pv.xpv_pv, len, char);
+ fread(pv.xpv_pv, 1, len, (FILE*)data);
+ pv.xpv_len = len;
+ pv.xpv_cur = len - 1;
+}
+
+void byteload_fh(InputStream fp)
+{
+ struct bytestream bs;
+ bs.data = fp;
+ bs.fgetc = (int(*) _((void*)))fgetc;
+ bs.fread = (int(*) _((char*,size_t,size_t,void*)))fread;
+ bs.freadpv = freadpv;
+ byterun(bs);
+}
+
+static int fgetc_fromstring(void *data)
+{
+ char **strp = (char **)data;
+ return *(*strp)++;
+}
+
+static int fread_fromstring(char *argp, size_t elemsize, size_t nelem,
+ void *data)
+{
+ char **strp = (char **)data;
+ size_t len = elemsize * nelem;
+
+ memcpy(argp, *strp, len);
+ *strp += len;
+ return (int)len;
+}
+
+static void freadpv_fromstring(U32 len, void *data)
+{
+ char **strp = (char **)data;
+
+ New(666, pv.xpv_pv, len, char);
+ memcpy(pv.xpv_pv, *strp, len);
+ pv.xpv_len = len;
+ pv.xpv_cur = len - 1;
+ *strp += len;
+}
+
+void byteload_string(char *str)
+{
+ struct bytestream bs;
+ bs.data = &str;
+ bs.fgetc = fgetc_fromstring;
+ bs.fread = fread_fromstring;
+ bs.freadpv = freadpv_fromstring;
+ byterun(bs);
+}
+#else
+void byteload_fh(InputStream fp)
+{
+ byterun(fp);
+}
+
+void byteload_string(char *str)
+{
+ croak("Must compile with -DINDIRECT_BGET_MACROS for byteload_string");
+}
+#endif /* INDIRECT_BGET_MACROS */
+
+void
+walkoptree(SV *opsv, char *method)
+{
+ dSP;
+ OP *o;
+
+ if (!SvROK(opsv))
+ croak("opsv is not a reference");
+ opsv = sv_mortalcopy(opsv);
+ o = (OP*)SvIV((SV*)SvRV(opsv));
+ if (walkoptree_debug) {
+ PUSHMARK(sp);
+ XPUSHs(opsv);
+ PUTBACK;
+ perl_call_method("walkoptree_debug", G_DISCARD);
+ }
+ PUSHMARK(sp);
+ XPUSHs(opsv);
+ PUTBACK;
+ perl_call_method(method, G_DISCARD);
+ if (o && (o->op_flags & OPf_KIDS)) {
+ OP *kid;
+ for (kid = ((UNOP*)o)->op_first; kid; kid = kid->op_sibling) {
+ /* Use the same opsv. Rely on methods not to mess it up. */
+ sv_setiv(newSVrv(opsv, cc_opclassname(kid)), (IV)kid);
+ walkoptree(opsv, method);
+ }
+ }
+}
+
+typedef OP *B__OP;
+typedef UNOP *B__UNOP;
+typedef BINOP *B__BINOP;
+typedef LOGOP *B__LOGOP;
+typedef CONDOP *B__CONDOP;
+typedef LISTOP *B__LISTOP;
+typedef PMOP *B__PMOP;
+typedef SVOP *B__SVOP;
+typedef GVOP *B__GVOP;
+typedef PVOP *B__PVOP;
+typedef LOOP *B__LOOP;
+typedef COP *B__COP;
+
+typedef SV *B__SV;
+typedef SV *B__IV;
+typedef SV *B__PV;
+typedef SV *B__NV;
+typedef SV *B__PVMG;
+typedef SV *B__PVLV;
+typedef SV *B__BM;
+typedef SV *B__RV;
+typedef AV *B__AV;
+typedef HV *B__HV;
+typedef CV *B__CV;
+typedef GV *B__GV;
+typedef IO *B__IO;
+
+typedef MAGIC *B__MAGIC;
+
+MODULE = B PACKAGE = B PREFIX = B_
+
+PROTOTYPES: DISABLE
+
+BOOT:
+ INIT_SPECIALSV_LIST;
+
+#define B_main_cv() PL_main_cv
+#define B_init_av() PL_initav
+#define B_main_root() PL_main_root
+#define B_main_start() PL_main_start
+#define B_comppadlist() (PL_main_cv ? CvPADLIST(PL_main_cv) : CvPADLIST(PL_compcv))
+#define B_sv_undef() &PL_sv_undef
+#define B_sv_yes() &PL_sv_yes
+#define B_sv_no() &PL_sv_no
+
+B::AV
+B_init_av()
+
+B::CV
+B_main_cv()
+
+B::OP
+B_main_root()
+
+B::OP
+B_main_start()
+
+B::AV
+B_comppadlist()
+
+B::SV
+B_sv_undef()
+
+B::SV
+B_sv_yes()
+
+B::SV
+B_sv_no()
+
+MODULE = B PACKAGE = B
+
+
+void
+walkoptree(opsv, method)
+ SV * opsv
+ char * method
+
+int
+walkoptree_debug(...)
+ CODE:
+ RETVAL = walkoptree_debug;
+ if (items > 0 && SvTRUE(ST(1)))
+ walkoptree_debug = 1;
+ OUTPUT:
+ RETVAL
+
+int
+byteload_fh(fp)
+ InputStream fp
+ CODE:
+ byteload_fh(fp);
+ RETVAL = 1;
+ OUTPUT:
+ RETVAL
+
+void
+byteload_string(str)
+ char * str
+
+#define address(sv) (IV)sv
+
+IV
+address(sv)
+ SV * sv
+
+B::SV
+svref_2object(sv)
+ SV * sv
+ CODE:
+ if (!SvROK(sv))
+ croak("argument is not a reference");
+ RETVAL = (SV*)SvRV(sv);
+ OUTPUT:
+ RETVAL
+
+void
+ppname(opnum)
+ int opnum
+ CODE:
+ ST(0) = sv_newmortal();
+ if (opnum >= 0 && opnum < PL_maxo) {
+ sv_setpvn(ST(0), "pp_", 3);
+ sv_catpv(ST(0), op_name[opnum]);
+ }
+
+void
+hash(sv)
+ SV * sv
+ CODE:
+ char *s;
+ STRLEN len;
+ U32 hash = 0;
+ char hexhash[11]; /* must fit "0xffffffff" plus trailing \0 */
+ s = SvPV(sv, len);
+ while (len--)
+ hash = hash * 33 + *s++;
+ sprintf(hexhash, "0x%x", hash);
+ ST(0) = sv_2mortal(newSVpv(hexhash, 0));
+
+#define cast_I32(foo) (I32)foo
+IV
+cast_I32(i)
+ IV i
+
+void
+minus_c()
+ CODE:
+ PL_minus_c = TRUE;
+
+SV *
+cstring(sv)
+ SV * sv
+
+SV *
+cchar(sv)
+ SV * sv
+
+void
+threadsv_names()
+ PPCODE:
+#ifdef USE_THREADS
+ int i;
+ STRLEN len = strlen(PL_threadsv_names);
+
+ EXTEND(sp, len);
+ for (i = 0; i < len; i++)
+ PUSHs(sv_2mortal(newSVpv(&PL_threadsv_names[i], 1)));
+#endif
+
+
+#define OP_next(o) o->op_next
+#define OP_sibling(o) o->op_sibling
+#define OP_desc(o) op_desc[o->op_type]
+#define OP_targ(o) o->op_targ
+#define OP_type(o) o->op_type
+#define OP_seq(o) o->op_seq
+#define OP_flags(o) o->op_flags
+#define OP_private(o) o->op_private
+
+MODULE = B PACKAGE = B::OP PREFIX = OP_
+
+B::OP
+OP_next(o)
+ B::OP o
+
+B::OP
+OP_sibling(o)
+ B::OP o
+
+char *
+OP_ppaddr(o)
+ B::OP o
+ CODE:
+ ST(0) = sv_newmortal();
+ sv_setpvn(ST(0), "pp_", 3);
+ sv_catpv(ST(0), op_name[o->op_type]);
+
+char *
+OP_desc(o)
+ B::OP o
+
+U16
+OP_targ(o)
+ B::OP o
+
+U16
+OP_type(o)
+ B::OP o
+
+U16
+OP_seq(o)
+ B::OP o
+
+U8
+OP_flags(o)
+ B::OP o
+
+U8
+OP_private(o)
+ B::OP o
+
+#define UNOP_first(o) o->op_first
+
+MODULE = B PACKAGE = B::UNOP PREFIX = UNOP_
+
+B::OP
+UNOP_first(o)
+ B::UNOP o
+
+#define BINOP_last(o) o->op_last
+
+MODULE = B PACKAGE = B::BINOP PREFIX = BINOP_
+
+B::OP
+BINOP_last(o)
+ B::BINOP o
+
+#define LOGOP_other(o) o->op_other
+
+MODULE = B PACKAGE = B::LOGOP PREFIX = LOGOP_
+
+B::OP
+LOGOP_other(o)
+ B::LOGOP o
+
+#define CONDOP_true(o) o->op_true
+#define CONDOP_false(o) o->op_false
+
+MODULE = B PACKAGE = B::CONDOP PREFIX = CONDOP_
+
+B::OP
+CONDOP_true(o)
+ B::CONDOP o
+
+B::OP
+CONDOP_false(o)
+ B::CONDOP o
+
+#define LISTOP_children(o) o->op_children
+
+MODULE = B PACKAGE = B::LISTOP PREFIX = LISTOP_
+
+U32
+LISTOP_children(o)
+ B::LISTOP o
+
+#define PMOP_pmreplroot(o) o->op_pmreplroot
+#define PMOP_pmreplstart(o) o->op_pmreplstart
+#define PMOP_pmnext(o) o->op_pmnext
+#define PMOP_pmregexp(o) o->op_pmregexp
+#define PMOP_pmflags(o) o->op_pmflags
+#define PMOP_pmpermflags(o) o->op_pmpermflags
+
+MODULE = B PACKAGE = B::PMOP PREFIX = PMOP_
+
+void
+PMOP_pmreplroot(o)
+ B::PMOP o
+ OP * root = NO_INIT
+ CODE:
+ ST(0) = sv_newmortal();
+ root = o->op_pmreplroot;
+ /* OP_PUSHRE stores an SV* instead of an OP* in op_pmreplroot */
+ if (o->op_type == OP_PUSHRE) {
+ sv_setiv(newSVrv(ST(0), root ?
+ svclassnames[SvTYPE((SV*)root)] : "B::SV"),
+ (IV)root);
+ }
+ else {
+ sv_setiv(newSVrv(ST(0), cc_opclassname(root)), (IV)root);
+ }
+
+B::OP
+PMOP_pmreplstart(o)
+ B::PMOP o
+
+B::PMOP
+PMOP_pmnext(o)
+ B::PMOP o
+
+U16
+PMOP_pmflags(o)
+ B::PMOP o
+
+U16
+PMOP_pmpermflags(o)
+ B::PMOP o
+
+void
+PMOP_precomp(o)
+ B::PMOP o
+ REGEXP * rx = NO_INIT
+ CODE:
+ ST(0) = sv_newmortal();
+ rx = o->op_pmregexp;
+ if (rx)
+ sv_setpvn(ST(0), rx->precomp, rx->prelen);
+
+#define SVOP_sv(o) o->op_sv
+
+MODULE = B PACKAGE = B::SVOP PREFIX = SVOP_
+
+
+B::SV
+SVOP_sv(o)
+ B::SVOP o
+
+#define GVOP_gv(o) o->op_gv
+
+MODULE = B PACKAGE = B::GVOP PREFIX = GVOP_
+
+
+B::GV
+GVOP_gv(o)
+ B::GVOP o
+
+MODULE = B PACKAGE = B::PVOP PREFIX = PVOP_
+
+void
+PVOP_pv(o)
+ B::PVOP o
+ CODE:
+ /*
+ * OP_TRANS uses op_pv to point to a table of 256 shorts
+ * whereas other PVOPs point to a null terminated string.
+ */
+ ST(0) = sv_2mortal(newSVpv(o->op_pv, (o->op_type == OP_TRANS) ?
+ 256 * sizeof(short) : 0));
+
+#define LOOP_redoop(o) o->op_redoop
+#define LOOP_nextop(o) o->op_nextop
+#define LOOP_lastop(o) o->op_lastop
+
+MODULE = B PACKAGE = B::LOOP PREFIX = LOOP_
+
+
+B::OP
+LOOP_redoop(o)
+ B::LOOP o
+
+B::OP
+LOOP_nextop(o)
+ B::LOOP o
+
+B::OP
+LOOP_lastop(o)
+ B::LOOP o
+
+#define COP_label(o) o->cop_label
+#define COP_stash(o) o->cop_stash
+#define COP_filegv(o) o->cop_filegv
+#define COP_cop_seq(o) o->cop_seq
+#define COP_arybase(o) o->cop_arybase
+#define COP_line(o) o->cop_line
+
+MODULE = B PACKAGE = B::COP PREFIX = COP_
+
+char *
+COP_label(o)
+ B::COP o
+
+B::HV
+COP_stash(o)
+ B::COP o
+
+B::GV
+COP_filegv(o)
+ B::COP o
+
+U32
+COP_cop_seq(o)
+ B::COP o
+
+I32
+COP_arybase(o)
+ B::COP o
+
+U16
+COP_line(o)
+ B::COP o
+
+MODULE = B PACKAGE = B::SV PREFIX = Sv
+
+U32
+SvREFCNT(sv)
+ B::SV sv
+
+U32
+SvFLAGS(sv)
+ B::SV sv
+
+MODULE = B PACKAGE = B::IV PREFIX = Sv
+
+IV
+SvIV(sv)
+ B::IV sv
+
+IV
+SvIVX(sv)
+ B::IV sv
+
+MODULE = B PACKAGE = B::IV
+
+#define needs64bits(sv) ((I32)SvIVX(sv) != SvIVX(sv))
+
+int
+needs64bits(sv)
+ B::IV sv
+
+void
+packiv(sv)
+ B::IV sv
+ CODE:
+ if (sizeof(IV) == 8) {
+ U32 wp[2];
+ IV iv = SvIVX(sv);
+ /*
+ * The following way of spelling 32 is to stop compilers on
+ * 32-bit architectures from moaning about the shift count
+ * being >= the width of the type. Such architectures don't
+ * reach this code anyway (unless sizeof(IV) > 8 but then
+ * everything else breaks too so I'm not fussed at the moment).
+ */
+ wp[0] = htonl(((U32)iv) >> (sizeof(IV)*4));
+ wp[1] = htonl(iv & 0xffffffff);
+ ST(0) = sv_2mortal(newSVpv((char *)wp, 8));
+ } else {
+ U32 w = htonl((U32)SvIVX(sv));
+ ST(0) = sv_2mortal(newSVpv((char *)&w, 4));
+ }
+
+MODULE = B PACKAGE = B::NV PREFIX = Sv
+
+double
+SvNV(sv)
+ B::NV sv
+
+double
+SvNVX(sv)
+ B::NV sv
+
+MODULE = B PACKAGE = B::RV PREFIX = Sv
+
+B::SV
+SvRV(sv)
+ B::RV sv
+
+MODULE = B PACKAGE = B::PV PREFIX = Sv
+
+void
+SvPV(sv)
+ B::PV sv
+ CODE:
+ ST(0) = sv_newmortal();
+ sv_setpvn(ST(0), SvPVX(sv), SvCUR(sv));
+
+MODULE = B PACKAGE = B::PVMG PREFIX = Sv
+
+void
+SvMAGIC(sv)
+ B::PVMG sv
+ MAGIC * mg = NO_INIT
+ PPCODE:
+ for (mg = SvMAGIC(sv); mg; mg = mg->mg_moremagic)
+ XPUSHs(make_mg_object(sv_newmortal(), mg));
+
+MODULE = B PACKAGE = B::PVMG
+
+B::HV
+SvSTASH(sv)
+ B::PVMG sv
+
+#define MgMOREMAGIC(mg) mg->mg_moremagic
+#define MgPRIVATE(mg) mg->mg_private
+#define MgTYPE(mg) mg->mg_type
+#define MgFLAGS(mg) mg->mg_flags
+#define MgOBJ(mg) mg->mg_obj
+
+MODULE = B PACKAGE = B::MAGIC PREFIX = Mg
+
+B::MAGIC
+MgMOREMAGIC(mg)
+ B::MAGIC mg
+
+U16
+MgPRIVATE(mg)
+ B::MAGIC mg
+
+char
+MgTYPE(mg)
+ B::MAGIC mg
+
+U8
+MgFLAGS(mg)
+ B::MAGIC mg
+
+B::SV
+MgOBJ(mg)
+ B::MAGIC mg
+
+void
+MgPTR(mg)
+ B::MAGIC mg
+ CODE:
+ ST(0) = sv_newmortal();
+ if (mg->mg_ptr)
+ sv_setpvn(ST(0), mg->mg_ptr, mg->mg_len);
+
+MODULE = B PACKAGE = B::PVLV PREFIX = Lv
+
+U32
+LvTARGOFF(sv)
+ B::PVLV sv
+
+U32
+LvTARGLEN(sv)
+ B::PVLV sv
+
+char
+LvTYPE(sv)
+ B::PVLV sv
+
+B::SV
+LvTARG(sv)
+ B::PVLV sv
+
+MODULE = B PACKAGE = B::BM PREFIX = Bm
+
+I32
+BmUSEFUL(sv)
+ B::BM sv
+
+U16
+BmPREVIOUS(sv)
+ B::BM sv
+
+U8
+BmRARE(sv)
+ B::BM sv
+
+void
+BmTABLE(sv)
+ B::BM sv
+ STRLEN len = NO_INIT
+ char * str = NO_INIT
+ CODE:
+ str = SvPV(sv, len);
+ /* Boyer-Moore table is just after string and its safety-margin \0 */
+ ST(0) = sv_2mortal(newSVpv(str + len + 1, 256));
+
+MODULE = B PACKAGE = B::GV PREFIX = Gv
+
+void
+GvNAME(gv)
+ B::GV gv
+ CODE:
+ ST(0) = sv_2mortal(newSVpv(GvNAME(gv), GvNAMELEN(gv)));
+
+B::HV
+GvSTASH(gv)
+ B::GV gv
+
+B::SV
+GvSV(gv)
+ B::GV gv
+
+B::IO
+GvIO(gv)
+ B::GV gv
+
+B::CV
+GvFORM(gv)
+ B::GV gv
+
+B::AV
+GvAV(gv)
+ B::GV gv
+
+B::HV
+GvHV(gv)
+ B::GV gv
+
+B::GV
+GvEGV(gv)
+ B::GV gv
+
+B::CV
+GvCV(gv)
+ B::GV gv
+
+U32
+GvCVGEN(gv)
+ B::GV gv
+
+U16
+GvLINE(gv)
+ B::GV gv
+
+B::GV
+GvFILEGV(gv)
+ B::GV gv
+
+MODULE = B PACKAGE = B::GV
+
+U32
+GvREFCNT(gv)
+ B::GV gv
+
+U8
+GvFLAGS(gv)
+ B::GV gv
+
+MODULE = B PACKAGE = B::IO PREFIX = Io
+
+long
+IoLINES(io)
+ B::IO io
+
+long
+IoPAGE(io)
+ B::IO io
+
+long
+IoPAGE_LEN(io)
+ B::IO io
+
+long
+IoLINES_LEFT(io)
+ B::IO io
+
+char *
+IoTOP_NAME(io)
+ B::IO io
+
+B::GV
+IoTOP_GV(io)
+ B::IO io
+
+char *
+IoFMT_NAME(io)
+ B::IO io
+
+B::GV
+IoFMT_GV(io)
+ B::IO io
+
+char *
+IoBOTTOM_NAME(io)
+ B::IO io
+
+B::GV
+IoBOTTOM_GV(io)
+ B::IO io
+
+short
+IoSUBPROCESS(io)
+ B::IO io
+
+MODULE = B PACKAGE = B::IO
+
+char
+IoTYPE(io)
+ B::IO io
+
+U8
+IoFLAGS(io)
+ B::IO io
+
+MODULE = B PACKAGE = B::AV PREFIX = Av
+
+SSize_t
+AvFILL(av)
+ B::AV av
+
+SSize_t
+AvMAX(av)
+ B::AV av
+
+#define AvOFF(av) ((XPVAV*)SvANY(av))->xof_off
+
+IV
+AvOFF(av)
+ B::AV av
+
+void
+AvARRAY(av)
+ B::AV av
+ PPCODE:
+ if (AvFILL(av) >= 0) {
+ SV **svp = AvARRAY(av);
+ I32 i;
+ for (i = 0; i <= AvFILL(av); i++)
+ XPUSHs(make_sv_object(sv_newmortal(), svp[i]));
+ }
+
+MODULE = B PACKAGE = B::AV
+
+U8
+AvFLAGS(av)
+ B::AV av
+
+MODULE = B PACKAGE = B::CV PREFIX = Cv
+
+B::HV
+CvSTASH(cv)
+ B::CV cv
+
+B::OP
+CvSTART(cv)
+ B::CV cv
+
+B::OP
+CvROOT(cv)
+ B::CV cv
+
+B::GV
+CvGV(cv)
+ B::CV cv
+
+B::GV
+CvFILEGV(cv)
+ B::CV cv
+
+long
+CvDEPTH(cv)
+ B::CV cv
+
+B::AV
+CvPADLIST(cv)
+ B::CV cv
+
+B::CV
+CvOUTSIDE(cv)
+ B::CV cv
+
+void
+CvXSUB(cv)
+ B::CV cv
+ CODE:
+ ST(0) = sv_2mortal(newSViv((IV)CvXSUB(cv)));
+
+
+void
+CvXSUBANY(cv)
+ B::CV cv
+ CODE:
+ ST(0) = sv_2mortal(newSViv(CvXSUBANY(cv).any_iv));
+
+MODULE = B PACKAGE = B::CV
+
+U8
+CvFLAGS(cv)
+ B::CV cv
+
+
+MODULE = B PACKAGE = B::HV PREFIX = Hv
+
+STRLEN
+HvFILL(hv)
+ B::HV hv
+
+STRLEN
+HvMAX(hv)
+ B::HV hv
+
+I32
+HvKEYS(hv)
+ B::HV hv
+
+I32
+HvRITER(hv)
+ B::HV hv
+
+char *
+HvNAME(hv)
+ B::HV hv
+
+B::PMOP
+HvPMROOT(hv)
+ B::HV hv
+
+void
+HvARRAY(hv)
+ B::HV hv
+ PPCODE:
+ if (HvKEYS(hv) > 0) {
+ SV *sv;
+ char *key;
+ I32 len;
+ (void)hv_iterinit(hv);
+ EXTEND(sp, HvKEYS(hv) * 2);
+ while (sv = hv_iternextsv(hv, &key, &len)) {
+ PUSHs(newSVpv(key, len));
+ PUSHs(make_sv_object(sv_newmortal(), sv));
+ }
+ }
diff --git a/gnu/usr.bin/perl/ext/B/B/Asmdata.pm b/gnu/usr.bin/perl/ext/B/B/Asmdata.pm
new file mode 100644
index 00000000000..f3e57a17d03
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/B/B/Asmdata.pm
@@ -0,0 +1,170 @@
+#
+# Copyright (c) 1996-1998 Malcolm Beattie
+#
+# You may distribute under the terms of either the GNU General Public
+# License or the Artistic License, as specified in the README file.
+#
+#
+#
+# This file is autogenerated from bytecode.pl. Changes made here will be lost.
+#
+package B::Asmdata;
+use Exporter;
+@ISA = qw(Exporter);
+@EXPORT_OK = qw(%insn_data @insn_name @optype @specialsv_name);
+use vars qw(%insn_data @insn_name @optype @specialsv_name);
+
+@optype = qw(OP UNOP BINOP LOGOP CONDOP LISTOP PMOP SVOP GVOP PVOP LOOP COP);
+@specialsv_name = qw(Nullsv &PL_sv_undef &PL_sv_yes &PL_sv_no);
+
+# XXX insn_data is initialised this way because with a large
+# %insn_data = (foo => [...], bar => [...], ...) initialiser
+# I get a hard-to-track-down stack underflow and segfault.
+$insn_data{comment} = [35, \&PUT_comment_t, "GET_comment_t"];
+$insn_data{nop} = [10, \&PUT_none, "GET_none"];
+$insn_data{ret} = [0, \&PUT_none, "GET_none"];
+$insn_data{ldsv} = [1, \&PUT_svindex, "GET_svindex"];
+$insn_data{ldop} = [2, \&PUT_opindex, "GET_opindex"];
+$insn_data{stsv} = [3, \&PUT_U32, "GET_U32"];
+$insn_data{stop} = [4, \&PUT_U32, "GET_U32"];
+$insn_data{ldspecsv} = [5, \&PUT_U8, "GET_U8"];
+$insn_data{newsv} = [6, \&PUT_U8, "GET_U8"];
+$insn_data{newop} = [7, \&PUT_U8, "GET_U8"];
+$insn_data{newopn} = [8, \&PUT_U8, "GET_U8"];
+$insn_data{newpv} = [9, \&PUT_PV, "GET_PV"];
+$insn_data{pv_cur} = [11, \&PUT_U32, "GET_U32"];
+$insn_data{pv_free} = [12, \&PUT_none, "GET_none"];
+$insn_data{sv_upgrade} = [13, \&PUT_U8, "GET_U8"];
+$insn_data{sv_refcnt} = [14, \&PUT_U32, "GET_U32"];
+$insn_data{sv_refcnt_add} = [15, \&PUT_I32, "GET_I32"];
+$insn_data{sv_flags} = [16, \&PUT_U32, "GET_U32"];
+$insn_data{xrv} = [17, \&PUT_svindex, "GET_svindex"];
+$insn_data{xpv} = [18, \&PUT_none, "GET_none"];
+$insn_data{xiv32} = [19, \&PUT_I32, "GET_I32"];
+$insn_data{xiv64} = [20, \&PUT_IV64, "GET_IV64"];
+$insn_data{xnv} = [21, \&PUT_double, "GET_double"];
+$insn_data{xlv_targoff} = [22, \&PUT_U32, "GET_U32"];
+$insn_data{xlv_targlen} = [23, \&PUT_U32, "GET_U32"];
+$insn_data{xlv_targ} = [24, \&PUT_svindex, "GET_svindex"];
+$insn_data{xlv_type} = [25, \&PUT_U8, "GET_U8"];
+$insn_data{xbm_useful} = [26, \&PUT_I32, "GET_I32"];
+$insn_data{xbm_previous} = [27, \&PUT_U16, "GET_U16"];
+$insn_data{xbm_rare} = [28, \&PUT_U8, "GET_U8"];
+$insn_data{xfm_lines} = [29, \&PUT_I32, "GET_I32"];
+$insn_data{xio_lines} = [30, \&PUT_I32, "GET_I32"];
+$insn_data{xio_page} = [31, \&PUT_I32, "GET_I32"];
+$insn_data{xio_page_len} = [32, \&PUT_I32, "GET_I32"];
+$insn_data{xio_lines_left} = [33, \&PUT_I32, "GET_I32"];
+$insn_data{xio_top_name} = [34, \&PUT_pvcontents, "GET_pvcontents"];
+$insn_data{xio_top_gv} = [36, \&PUT_svindex, "GET_svindex"];
+$insn_data{xio_fmt_name} = [37, \&PUT_pvcontents, "GET_pvcontents"];
+$insn_data{xio_fmt_gv} = [38, \&PUT_svindex, "GET_svindex"];
+$insn_data{xio_bottom_name} = [39, \&PUT_pvcontents, "GET_pvcontents"];
+$insn_data{xio_bottom_gv} = [40, \&PUT_svindex, "GET_svindex"];
+$insn_data{xio_subprocess} = [41, \&PUT_U16, "GET_U16"];
+$insn_data{xio_type} = [42, \&PUT_U8, "GET_U8"];
+$insn_data{xio_flags} = [43, \&PUT_U8, "GET_U8"];
+$insn_data{xcv_stash} = [44, \&PUT_svindex, "GET_svindex"];
+$insn_data{xcv_start} = [45, \&PUT_opindex, "GET_opindex"];
+$insn_data{xcv_root} = [46, \&PUT_opindex, "GET_opindex"];
+$insn_data{xcv_gv} = [47, \&PUT_svindex, "GET_svindex"];
+$insn_data{xcv_filegv} = [48, \&PUT_svindex, "GET_svindex"];
+$insn_data{xcv_depth} = [49, \&PUT_I32, "GET_I32"];
+$insn_data{xcv_padlist} = [50, \&PUT_svindex, "GET_svindex"];
+$insn_data{xcv_outside} = [51, \&PUT_svindex, "GET_svindex"];
+$insn_data{xcv_flags} = [52, \&PUT_U8, "GET_U8"];
+$insn_data{av_extend} = [53, \&PUT_I32, "GET_I32"];
+$insn_data{av_push} = [54, \&PUT_svindex, "GET_svindex"];
+$insn_data{xav_fill} = [55, \&PUT_I32, "GET_I32"];
+$insn_data{xav_max} = [56, \&PUT_I32, "GET_I32"];
+$insn_data{xav_flags} = [57, \&PUT_U8, "GET_U8"];
+$insn_data{xhv_riter} = [58, \&PUT_I32, "GET_I32"];
+$insn_data{xhv_name} = [59, \&PUT_pvcontents, "GET_pvcontents"];
+$insn_data{hv_store} = [60, \&PUT_svindex, "GET_svindex"];
+$insn_data{sv_magic} = [61, \&PUT_U8, "GET_U8"];
+$insn_data{mg_obj} = [62, \&PUT_svindex, "GET_svindex"];
+$insn_data{mg_private} = [63, \&PUT_U16, "GET_U16"];
+$insn_data{mg_flags} = [64, \&PUT_U8, "GET_U8"];
+$insn_data{mg_pv} = [65, \&PUT_pvcontents, "GET_pvcontents"];
+$insn_data{xmg_stash} = [66, \&PUT_svindex, "GET_svindex"];
+$insn_data{gv_fetchpv} = [67, \&PUT_strconst, "GET_strconst"];
+$insn_data{gv_stashpv} = [68, \&PUT_strconst, "GET_strconst"];
+$insn_data{gp_sv} = [69, \&PUT_svindex, "GET_svindex"];
+$insn_data{gp_refcnt} = [70, \&PUT_U32, "GET_U32"];
+$insn_data{gp_refcnt_add} = [71, \&PUT_I32, "GET_I32"];
+$insn_data{gp_av} = [72, \&PUT_svindex, "GET_svindex"];
+$insn_data{gp_hv} = [73, \&PUT_svindex, "GET_svindex"];
+$insn_data{gp_cv} = [74, \&PUT_svindex, "GET_svindex"];
+$insn_data{gp_filegv} = [75, \&PUT_svindex, "GET_svindex"];
+$insn_data{gp_io} = [76, \&PUT_svindex, "GET_svindex"];
+$insn_data{gp_form} = [77, \&PUT_svindex, "GET_svindex"];
+$insn_data{gp_cvgen} = [78, \&PUT_U32, "GET_U32"];
+$insn_data{gp_line} = [79, \&PUT_U16, "GET_U16"];
+$insn_data{gp_share} = [80, \&PUT_svindex, "GET_svindex"];
+$insn_data{xgv_flags} = [81, \&PUT_U8, "GET_U8"];
+$insn_data{op_next} = [82, \&PUT_opindex, "GET_opindex"];
+$insn_data{op_sibling} = [83, \&PUT_opindex, "GET_opindex"];
+$insn_data{op_ppaddr} = [84, \&PUT_strconst, "GET_strconst"];
+$insn_data{op_targ} = [85, \&PUT_U32, "GET_U32"];
+$insn_data{op_type} = [86, \&PUT_U16, "GET_U16"];
+$insn_data{op_seq} = [87, \&PUT_U16, "GET_U16"];
+$insn_data{op_flags} = [88, \&PUT_U8, "GET_U8"];
+$insn_data{op_private} = [89, \&PUT_U8, "GET_U8"];
+$insn_data{op_first} = [90, \&PUT_opindex, "GET_opindex"];
+$insn_data{op_last} = [91, \&PUT_opindex, "GET_opindex"];
+$insn_data{op_other} = [92, \&PUT_opindex, "GET_opindex"];
+$insn_data{op_true} = [93, \&PUT_opindex, "GET_opindex"];
+$insn_data{op_false} = [94, \&PUT_opindex, "GET_opindex"];
+$insn_data{op_children} = [95, \&PUT_U32, "GET_U32"];
+$insn_data{op_pmreplroot} = [96, \&PUT_opindex, "GET_opindex"];
+$insn_data{op_pmreplrootgv} = [97, \&PUT_svindex, "GET_svindex"];
+$insn_data{op_pmreplstart} = [98, \&PUT_opindex, "GET_opindex"];
+$insn_data{op_pmnext} = [99, \&PUT_opindex, "GET_opindex"];
+$insn_data{pregcomp} = [100, \&PUT_pvcontents, "GET_pvcontents"];
+$insn_data{op_pmflags} = [101, \&PUT_U16, "GET_U16"];
+$insn_data{op_pmpermflags} = [102, \&PUT_U16, "GET_U16"];
+$insn_data{op_sv} = [103, \&PUT_svindex, "GET_svindex"];
+$insn_data{op_gv} = [104, \&PUT_svindex, "GET_svindex"];
+$insn_data{op_pv} = [105, \&PUT_pvcontents, "GET_pvcontents"];
+$insn_data{op_pv_tr} = [106, \&PUT_op_tr_array, "GET_op_tr_array"];
+$insn_data{op_redoop} = [107, \&PUT_opindex, "GET_opindex"];
+$insn_data{op_nextop} = [108, \&PUT_opindex, "GET_opindex"];
+$insn_data{op_lastop} = [109, \&PUT_opindex, "GET_opindex"];
+$insn_data{cop_label} = [110, \&PUT_pvcontents, "GET_pvcontents"];
+$insn_data{cop_stash} = [111, \&PUT_svindex, "GET_svindex"];
+$insn_data{cop_filegv} = [112, \&PUT_svindex, "GET_svindex"];
+$insn_data{cop_seq} = [113, \&PUT_U32, "GET_U32"];
+$insn_data{cop_arybase} = [114, \&PUT_I32, "GET_I32"];
+$insn_data{cop_line} = [115, \&PUT_U16, "GET_U16"];
+$insn_data{main_start} = [116, \&PUT_opindex, "GET_opindex"];
+$insn_data{main_root} = [117, \&PUT_opindex, "GET_opindex"];
+$insn_data{curpad} = [118, \&PUT_svindex, "GET_svindex"];
+
+my ($insn_name, $insn_data);
+while (($insn_name, $insn_data) = each %insn_data) {
+ $insn_name[$insn_data->[0]] = $insn_name;
+}
+# Fill in any gaps
+@insn_name = map($_ || "unused", @insn_name);
+
+1;
+
+__END__
+
+=head1 NAME
+
+B::Asmdata - Autogenerated data about Perl ops, used to generate bytecode
+
+=head1 SYNOPSIS
+
+ use Asmdata;
+
+=head1 DESCRIPTION
+
+See F<ext/B/B/Asmdata.pm>.
+
+=head1 AUTHOR
+
+Malcolm Beattie, C<mbeattie@sable.ox.ac.uk>
+
+=cut
diff --git a/gnu/usr.bin/perl/ext/B/B/Assembler.pm b/gnu/usr.bin/perl/ext/B/B/Assembler.pm
new file mode 100644
index 00000000000..06e00adeb54
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/B/B/Assembler.pm
@@ -0,0 +1,229 @@
+# Assembler.pm
+#
+# Copyright (c) 1996 Malcolm Beattie
+#
+# You may distribute under the terms of either the GNU General Public
+# License or the Artistic License, as specified in the README file.
+package B::Assembler;
+use Exporter;
+use B qw(ppname);
+use B::Asmdata qw(%insn_data @insn_name);
+
+@ISA = qw(Exporter);
+@EXPORT_OK = qw(assemble_fh assemble_insn strip_comments
+ parse_statement uncstring);
+
+use strict;
+my %opnumber;
+my ($i, $opname);
+for ($i = 0; defined($opname = ppname($i)); $i++) {
+ $opnumber{$opname} = $i;
+}
+
+my ($linenum, $errors);
+
+sub error {
+ my $str = shift;
+ warn "$linenum: $str\n";
+ $errors++;
+}
+
+my $debug = 0;
+sub debug { $debug = shift }
+
+#
+# First define all the data conversion subs to which Asmdata will refer
+#
+
+sub B::Asmdata::PUT_U8 {
+ my $arg = shift;
+ my $c = uncstring($arg);
+ if (defined($c)) {
+ if (length($c) != 1) {
+ error "argument for U8 is too long: $c";
+ $c = substr($c, 0, 1);
+ }
+ } else {
+ $c = chr($arg);
+ }
+ return $c;
+}
+
+sub B::Asmdata::PUT_U16 { pack("n", $_[0]) }
+sub B::Asmdata::PUT_U32 { pack("N", $_[0]) }
+sub B::Asmdata::PUT_I32 { pack("N", $_[0]) }
+sub B::Asmdata::PUT_objindex { pack("N", $_[0]) } # could allow names here
+sub B::Asmdata::PUT_svindex { &B::Asmdata::PUT_objindex }
+sub B::Asmdata::PUT_opindex { &B::Asmdata::PUT_objindex }
+
+sub B::Asmdata::PUT_strconst {
+ my $arg = shift;
+ $arg = uncstring($arg);
+ if (!defined($arg)) {
+ error "bad string constant: $arg";
+ return "";
+ }
+ if ($arg =~ s/\0//g) {
+ error "string constant argument contains NUL: $arg";
+ }
+ return $arg . "\0";
+}
+
+sub B::Asmdata::PUT_pvcontents {
+ my $arg = shift;
+ error "extraneous argument: $arg" if defined $arg;
+ return "";
+}
+sub B::Asmdata::PUT_PV {
+ my $arg = shift;
+ $arg = uncstring($arg);
+ error "bad string argument: $arg" unless defined($arg);
+ return pack("N", length($arg)) . $arg;
+}
+sub B::Asmdata::PUT_comment_t {
+ my $arg = shift;
+ $arg = uncstring($arg);
+ error "bad string argument: $arg" unless defined($arg);
+ if ($arg =~ s/\n//g) {
+ error "comment argument contains linefeed: $arg";
+ }
+ return $arg . "\n";
+}
+sub B::Asmdata::PUT_double { sprintf("%s\0", $_[0]) }
+sub B::Asmdata::PUT_none {
+ my $arg = shift;
+ error "extraneous argument: $arg" if defined $arg;
+ return "";
+}
+sub B::Asmdata::PUT_op_tr_array {
+ my $arg = shift;
+ my @ary = split(/\s*,\s*/, $arg);
+ if (@ary != 256) {
+ error "wrong number of arguments to op_tr_array";
+ @ary = (0) x 256;
+ }
+ return pack("n256", @ary);
+}
+# XXX Check this works
+sub B::Asmdata::PUT_IV64 {
+ my $arg = shift;
+ return pack("NN", $arg >> 32, $arg & 0xffffffff);
+}
+
+my %unesc = (n => "\n", r => "\r", t => "\t", a => "\a",
+ b => "\b", f => "\f", v => "\013");
+
+sub uncstring {
+ my $s = shift;
+ $s =~ s/^"// and $s =~ s/"$// or return undef;
+ $s =~ s/\\(\d\d\d|.)/length($1) == 3 ? chr(oct($1)) : ($unesc{$1}||$1)/eg;
+ return $s;
+}
+
+sub strip_comments {
+ my $stmt = shift;
+ # Comments only allowed in instructions which don't take string arguments
+ $stmt =~ s{
+ (?sx) # Snazzy extended regexp coming up. Also, treat
+ # string as a single line so .* eats \n characters.
+ ^\s* # Ignore leading whitespace
+ (
+ [^"]* # A double quote '"' indicates a string argument. If we
+ # find a double quote, the match fails and we strip nothing.
+ )
+ \s*\# # Any amount of whitespace plus the comment marker...
+ .*$ # ...which carries on to end-of-string.
+ }{$1}; # Keep only the instruction and optional argument.
+ return $stmt;
+}
+
+sub parse_statement {
+ my $stmt = shift;
+ my ($insn, $arg) = $stmt =~ m{
+ (?sx)
+ ^\s* # allow (but ignore) leading whitespace
+ (.*?) # Instruction continues up until...
+ (?: # ...an optional whitespace+argument group
+ \s+ # first whitespace.
+ (.*) # The argument is all the rest (newlines included).
+ )?$ # anchor at end-of-line
+ };
+ if (defined($arg)) {
+ if ($arg =~ s/^0x(?=[0-9a-fA-F]+$)//) {
+ $arg = hex($arg);
+ } elsif ($arg =~ s/^0(?=[0-7]+$)//) {
+ $arg = oct($arg);
+ } elsif ($arg =~ /^pp_/) {
+ $arg =~ s/\s*$//; # strip trailing whitespace
+ my $opnum = $opnumber{$arg};
+ if (defined($opnum)) {
+ $arg = $opnum;
+ } else {
+ error qq(No such op type "$arg");
+ $arg = 0;
+ }
+ }
+ }
+ return ($insn, $arg);
+}
+
+sub assemble_insn {
+ my ($insn, $arg) = @_;
+ my $data = $insn_data{$insn};
+ if (defined($data)) {
+ my ($bytecode, $putsub) = @{$data}[0, 1];
+ my $argcode = &$putsub($arg);
+ return chr($bytecode).$argcode;
+ } else {
+ error qq(no such instruction "$insn");
+ return "";
+ }
+}
+
+sub assemble_fh {
+ my ($fh, $out) = @_;
+ my ($line, $insn, $arg);
+ $linenum = 0;
+ $errors = 0;
+ while ($line = <$fh>) {
+ $linenum++;
+ chomp $line;
+ if ($debug) {
+ my $quotedline = $line;
+ $quotedline =~ s/\\/\\\\/g;
+ $quotedline =~ s/"/\\"/g;
+ &$out(assemble_insn("comment", qq("$quotedline")));
+ }
+ $line = strip_comments($line) or next;
+ ($insn, $arg) = parse_statement($line);
+ &$out(assemble_insn($insn, $arg));
+ if ($debug) {
+ &$out(assemble_insn("nop", undef));
+ }
+ }
+ if ($errors) {
+ die "Assembly failed with $errors error(s)\n";
+ }
+}
+
+1;
+
+__END__
+
+=head1 NAME
+
+B::Assembler - Assemble Perl bytecode
+
+=head1 SYNOPSIS
+
+ use Assembler;
+
+=head1 DESCRIPTION
+
+See F<ext/B/B/Assembler.pm>.
+
+=head1 AUTHOR
+
+Malcolm Beattie, C<mbeattie@sable.ox.ac.uk>
+
+=cut
diff --git a/gnu/usr.bin/perl/ext/B/B/Bblock.pm b/gnu/usr.bin/perl/ext/B/B/Bblock.pm
new file mode 100644
index 00000000000..a54431b4ce7
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/B/B/Bblock.pm
@@ -0,0 +1,162 @@
+package B::Bblock;
+use Exporter ();
+@ISA = "Exporter";
+@EXPORT_OK = qw(find_leaders);
+
+use B qw(peekop walkoptree walkoptree_exec
+ main_root main_start svref_2object);
+use B::Terse;
+use strict;
+
+my $bblock;
+my @bblock_ends;
+
+sub mark_leader {
+ my $op = shift;
+ if ($$op) {
+ $bblock->{$$op} = $op;
+ }
+}
+
+sub find_leaders {
+ my ($root, $start) = @_;
+ $bblock = {};
+ mark_leader($start);
+ walkoptree($root, "mark_if_leader");
+ return $bblock;
+}
+
+# Debugging
+sub walk_bblocks {
+ my ($root, $start) = @_;
+ my ($op, $lastop, $leader, $bb);
+ $bblock = {};
+ mark_leader($start);
+ walkoptree($root, "mark_if_leader");
+ my @leaders = values %$bblock;
+ while ($leader = shift @leaders) {
+ $lastop = $leader;
+ $op = $leader->next;
+ while ($$op && !exists($bblock->{$$op})) {
+ $bblock->{$$op} = $leader;
+ $lastop = $op;
+ $op = $op->next;
+ }
+ push(@bblock_ends, [$leader, $lastop]);
+ }
+ foreach $bb (@bblock_ends) {
+ ($leader, $lastop) = @$bb;
+ printf "%s .. %s\n", peekop($leader), peekop($lastop);
+ for ($op = $leader; $$op != $$lastop; $op = $op->next) {
+ printf " %s\n", peekop($op);
+ }
+ printf " %s\n", peekop($lastop);
+ }
+ print "-------\n";
+ walkoptree_exec($start, "terse");
+}
+
+sub walk_bblocks_obj {
+ my $cvref = shift;
+ my $cv = svref_2object($cvref);
+ walk_bblocks($cv->ROOT, $cv->START);
+}
+
+sub B::OP::mark_if_leader {}
+
+sub B::COP::mark_if_leader {
+ my $op = shift;
+ if ($op->label) {
+ mark_leader($op);
+ }
+}
+
+sub B::LOOP::mark_if_leader {
+ my $op = shift;
+ mark_leader($op->next);
+ mark_leader($op->nextop);
+ mark_leader($op->redoop);
+ mark_leader($op->lastop->next);
+}
+
+sub B::LOGOP::mark_if_leader {
+ my $op = shift;
+ my $ppaddr = $op->ppaddr;
+ mark_leader($op->next);
+ if ($ppaddr eq "pp_entertry") {
+ mark_leader($op->other->next);
+ } else {
+ mark_leader($op->other);
+ }
+}
+
+sub B::CONDOP::mark_if_leader {
+ my $op = shift;
+ mark_leader($op->next);
+ mark_leader($op->true);
+ mark_leader($op->false);
+}
+
+sub B::PMOP::mark_if_leader {
+ my $op = shift;
+ if ($op->ppaddr ne "pp_pushre") {
+ my $replroot = $op->pmreplroot;
+ if ($$replroot) {
+ mark_leader($replroot);
+ mark_leader($op->next);
+ mark_leader($op->pmreplstart);
+ }
+ }
+}
+
+# PMOP stuff omitted
+
+sub compile {
+ my @options = @_;
+ if (@options) {
+ return sub {
+ my $objname;
+ foreach $objname (@options) {
+ $objname = "main::$objname" unless $objname =~ /::/;
+ eval "walk_bblocks_obj(\\&$objname)";
+ die "walk_bblocks_obj(\\&$objname) failed: $@" if $@;
+ }
+ }
+ } else {
+ return sub { walk_bblocks(main_root, main_start) };
+ }
+}
+
+# Basic block leaders:
+# Any COP (pp_nextstate) with a non-NULL label
+# [The op after a pp_enter] Omit
+# [The op after a pp_entersub. Don't count this one.]
+# The ops pointed at by nextop, redoop and lastop->op_next of a LOOP
+# The ops pointed at by op_next and op_other of a LOGOP, except
+# for pp_entertry which has op_next and op_other->op_next
+# The ops pointed at by op_true and op_false of a CONDOP
+# The op pointed at by op_pmreplstart of a PMOP
+# The op pointed at by op_other->op_pmreplstart of pp_substcont?
+# [The op after a pp_return] Omit
+
+1;
+
+__END__
+
+=head1 NAME
+
+B::Bblock - Walk basic blocks
+
+=head1 SYNOPSIS
+
+ perl -MO=Bblock[,OPTIONS] foo.pl
+
+=head1 DESCRIPTION
+
+See F<ext/B/README>.
+
+=head1 AUTHOR
+
+Malcolm Beattie, C<mbeattie@sable.ox.ac.uk>
+
+=cut
diff --git a/gnu/usr.bin/perl/ext/B/B/Bytecode.pm b/gnu/usr.bin/perl/ext/B/B/Bytecode.pm
new file mode 100644
index 00000000000..0c5a58dc542
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/B/B/Bytecode.pm
@@ -0,0 +1,908 @@
+# Bytecode.pm
+#
+# Copyright (c) 1996-1998 Malcolm Beattie
+#
+# You may distribute under the terms of either the GNU General Public
+# License or the Artistic License, as specified in the README file.
+#
+package B::Bytecode;
+use strict;
+use Carp;
+use IO::File;
+
+use B qw(minus_c main_cv main_root main_start comppadlist
+ class peekop walkoptree svref_2object cstring walksymtable);
+use B::Asmdata qw(@optype @specialsv_name);
+use B::Assembler qw(assemble_fh);
+
+my %optype_enum;
+my $i;
+for ($i = 0; $i < @optype; $i++) {
+ $optype_enum{$optype[$i]} = $i;
+}
+
+# Following is SVf_POK|SVp_POK
+# XXX Shouldn't be hardwired
+sub POK () { 0x04040000 }
+
+# Following is SVf_IOK|SVp_OK
+# XXX Shouldn't be hardwired
+sub IOK () { 0x01010000 }
+
+my ($verbose, $module_only, $no_assemble, $debug_bc, $debug_cv);
+my $assembler_pid;
+
+# Optimisation options. On the command line, use hyphens instead of
+# underscores for compatibility with gcc-style options. We use
+# underscores here because they are OK in (strict) barewords.
+my ($strip_syntree, $compress_nullops, $omit_seq, $bypass_nullops);
+my %optimise = (strip_syntax_tree => \$strip_syntree,
+ compress_nullops => \$compress_nullops,
+ omit_sequence_numbers => \$omit_seq,
+ bypass_nullops => \$bypass_nullops);
+
+my $nextix = 0;
+my %symtable; # maps object addresses to object indices.
+ # Filled in at allocation (newsv/newop) time.
+my %saved; # maps object addresses (for SVish classes) to "saved yet?"
+ # flag. Set at FOO::bytecode time usually by SV::bytecode.
+ # Manipulated via saved(), mark_saved(), unmark_saved().
+
+my $svix = -1; # we keep track of when the sv register contains an element
+ # of the object table to avoid unnecessary repeated
+ # consecutive ldsv instructions.
+my $opix = -1; # Ditto for the op register.
+
+sub ldsv {
+ my $ix = shift;
+ if ($ix != $svix) {
+ print "ldsv $ix\n";
+ $svix = $ix;
+ }
+}
+
+sub stsv {
+ my $ix = shift;
+ print "stsv $ix\n";
+ $svix = $ix;
+}
+
+sub set_svix {
+ $svix = shift;
+}
+
+sub ldop {
+ my $ix = shift;
+ if ($ix != $opix) {
+ print "ldop $ix\n";
+ $opix = $ix;
+ }
+}
+
+sub stop {
+ my $ix = shift;
+ print "stop $ix\n";
+ $opix = $ix;
+}
+
+sub set_opix {
+ $opix = shift;
+}
+
+sub pvstring {
+ my $str = shift;
+ if (defined($str)) {
+ return cstring($str . "\0");
+ } else {
+ return '""';
+ }
+}
+
+sub saved { $saved{${$_[0]}} }
+sub mark_saved { $saved{${$_[0]}} = 1 }
+sub unmark_saved { $saved{${$_[0]}} = 0 }
+
+sub debug { $debug_bc = shift }
+
+sub B::OBJECT::nyi {
+ my $obj = shift;
+ warn sprintf("bytecode save method for %s (0x%x) not yet implemented\n",
+ class($obj), $$obj);
+}
+
+#
+# objix may stomp on the op register (for op objects)
+# or the sv register (for SV objects)
+#
+sub B::OBJECT::objix {
+ my $obj = shift;
+ my $ix = $symtable{$$obj};
+ if (defined($ix)) {
+ return $ix;
+ } else {
+ $obj->newix($nextix);
+ return $symtable{$$obj} = $nextix++;
+ }
+}
+
+sub B::SV::newix {
+ my ($sv, $ix) = @_;
+ printf "newsv %d\t# %s\n", $sv->FLAGS & 0xf, class($sv);
+ stsv($ix);
+}
+
+sub B::GV::newix {
+ my ($gv, $ix) = @_;
+ my $gvname = $gv->NAME;
+ my $name = cstring($gv->STASH->NAME . "::" . $gvname);
+ print "gv_fetchpv $name\n";
+ stsv($ix);
+}
+
+sub B::HV::newix {
+ my ($hv, $ix) = @_;
+ my $name = $hv->NAME;
+ if ($name) {
+ # It's a stash
+ printf "gv_stashpv %s\n", cstring($name);
+ stsv($ix);
+ } else {
+ # It's an ordinary HV. Fall back to ordinary newix method
+ $hv->B::SV::newix($ix);
+ }
+}
+
+sub B::SPECIAL::newix {
+ my ($sv, $ix) = @_;
+ # Special case. $$sv is not the address of the SV but an
+ # index into svspecialsv_list.
+ printf "ldspecsv $$sv\t# %s\n", $specialsv_name[$$sv];
+ stsv($ix);
+}
+
+sub B::OP::newix {
+ my ($op, $ix) = @_;
+ my $class = class($op);
+ my $typenum = $optype_enum{$class};
+ croak "OP::newix: can't understand class $class" unless defined($typenum);
+ print "newop $typenum\t# $class\n";
+ stop($ix);
+}
+
+sub B::OP::walkoptree_debug {
+ my $op = shift;
+ warn(sprintf("walkoptree: %s\n", peekop($op)));
+}
+
+sub B::OP::bytecode {
+ my $op = shift;
+ my $next = $op->next;
+ my $nextix;
+ my $sibix = $op->sibling->objix;
+ my $ix = $op->objix;
+ my $type = $op->type;
+
+ if ($bypass_nullops) {
+ $next = $next->next while $$next && $next->type == 0;
+ }
+ $nextix = $next->objix;
+
+ printf "# %s\n", peekop($op) if $debug_bc;
+ ldop($ix);
+ print "op_next $nextix\n";
+ print "op_sibling $sibix\n" unless $strip_syntree;
+ printf "op_type %s\t# %d\n", $op->ppaddr, $type;
+ printf("op_seq %d\n", $op->seq) unless $omit_seq;
+ if ($type || !$compress_nullops) {
+ printf "op_targ %d\nop_flags 0x%x\nop_private 0x%x\n",
+ $op->targ, $op->flags, $op->private;
+ }
+}
+
+sub B::UNOP::bytecode {
+ my $op = shift;
+ my $firstix = $op->first->objix;
+ $op->B::OP::bytecode;
+ if (($op->type || !$compress_nullops) && !$strip_syntree) {
+ print "op_first $firstix\n";
+ }
+}
+
+sub B::LOGOP::bytecode {
+ my $op = shift;
+ my $otherix = $op->other->objix;
+ $op->B::UNOP::bytecode;
+ print "op_other $otherix\n";
+}
+
+sub B::SVOP::bytecode {
+ my $op = shift;
+ my $sv = $op->sv;
+ my $svix = $sv->objix;
+ $op->B::OP::bytecode;
+ print "op_sv $svix\n";
+ $sv->bytecode;
+}
+
+sub B::GVOP::bytecode {
+ my $op = shift;
+ my $gv = $op->gv;
+ my $gvix = $gv->objix;
+ $op->B::OP::bytecode;
+ print "op_gv $gvix\n";
+ $gv->bytecode;
+}
+
+sub B::PVOP::bytecode {
+ my $op = shift;
+ my $pv = $op->pv;
+ $op->B::OP::bytecode;
+ #
+ # This would be easy except that OP_TRANS uses a PVOP to store an
+ # endian-dependent array of 256 shorts instead of a plain string.
+ #
+ if ($op->ppaddr eq "pp_trans") {
+ my @shorts = unpack("s256", $pv); # assembler handles endianness
+ print "op_pv_tr ", join(",", @shorts), "\n";
+ } else {
+ printf "newpv %s\nop_pv\n", pvstring($pv);
+ }
+}
+
+sub B::BINOP::bytecode {
+ my $op = shift;
+ my $lastix = $op->last->objix;
+ $op->B::UNOP::bytecode;
+ if (($op->type || !$compress_nullops) && !$strip_syntree) {
+ print "op_last $lastix\n";
+ }
+}
+
+sub B::CONDOP::bytecode {
+ my $op = shift;
+ my $trueix = $op->true->objix;
+ my $falseix = $op->false->objix;
+ $op->B::UNOP::bytecode;
+ print "op_true $trueix\nop_false $falseix\n";
+}
+
+sub B::LISTOP::bytecode {
+ my $op = shift;
+ my $children = $op->children;
+ $op->B::BINOP::bytecode;
+ if (($op->type || !$compress_nullops) && !$strip_syntree) {
+ print "op_children $children\n";
+ }
+}
+
+sub B::LOOP::bytecode {
+ my $op = shift;
+ my $redoopix = $op->redoop->objix;
+ my $nextopix = $op->nextop->objix;
+ my $lastopix = $op->lastop->objix;
+ $op->B::LISTOP::bytecode;
+ print "op_redoop $redoopix\nop_nextop $nextopix\nop_lastop $lastopix\n";
+}
+
+sub B::COP::bytecode {
+ my $op = shift;
+ my $stash = $op->stash;
+ my $stashix = $stash->objix;
+ my $filegv = $op->filegv;
+ my $filegvix = $filegv->objix;
+ my $line = $op->line;
+ if ($debug_bc) {
+ printf "# line %s:%d\n", $filegv->SV->PV, $line;
+ }
+ $op->B::OP::bytecode;
+ printf <<"EOT", pvstring($op->label), $op->cop_seq, $op->arybase;
+newpv %s
+cop_label
+cop_stash $stashix
+cop_seq %d
+cop_filegv $filegvix
+cop_arybase %d
+cop_line $line
+EOT
+ $filegv->bytecode;
+ $stash->bytecode;
+}
+
+sub B::PMOP::bytecode {
+ my $op = shift;
+ my $replroot = $op->pmreplroot;
+ my $replrootix = $replroot->objix;
+ my $replstartix = $op->pmreplstart->objix;
+ my $ppaddr = $op->ppaddr;
+ # pmnext is corrupt in some PMOPs (see misc.t for example)
+ #my $pmnextix = $op->pmnext->objix;
+
+ if ($$replroot) {
+ # OP_PUSHRE (a mutated version of OP_MATCH for the regexp
+ # argument to a split) stores a GV in op_pmreplroot instead
+ # of a substitution syntax tree. We don't want to walk that...
+ if ($ppaddr eq "pp_pushre") {
+ $replroot->bytecode;
+ } else {
+ walkoptree($replroot, "bytecode");
+ }
+ }
+ $op->B::LISTOP::bytecode;
+ if ($ppaddr eq "pp_pushre") {
+ printf "op_pmreplrootgv $replrootix\n";
+ } else {
+ print "op_pmreplroot $replrootix\nop_pmreplstart $replstartix\n";
+ }
+ my $re = pvstring($op->precomp);
+ # op_pmnext omitted since a perl bug means it's sometime corrupt
+ printf <<"EOT", $op->pmflags, $op->pmpermflags;
+op_pmflags 0x%x
+op_pmpermflags 0x%x
+newpv $re
+pregcomp
+EOT
+}
+
+sub B::SV::bytecode {
+ my $sv = shift;
+ return if saved($sv);
+ my $ix = $sv->objix;
+ my $refcnt = $sv->REFCNT;
+ my $flags = sprintf("0x%x", $sv->FLAGS);
+ ldsv($ix);
+ print "sv_refcnt $refcnt\nsv_flags $flags\n";
+ mark_saved($sv);
+}
+
+sub B::PV::bytecode {
+ my $sv = shift;
+ return if saved($sv);
+ $sv->B::SV::bytecode;
+ printf("newpv %s\nxpv\n", pvstring($sv->PV)) if $sv->FLAGS & POK;
+}
+
+sub B::IV::bytecode {
+ my $sv = shift;
+ return if saved($sv);
+ my $iv = $sv->IVX;
+ $sv->B::SV::bytecode;
+ printf "%s $iv\n", $sv->needs64bits ? "xiv64" : "xiv32";
+}
+
+sub B::NV::bytecode {
+ my $sv = shift;
+ return if saved($sv);
+ $sv->B::SV::bytecode;
+ printf "xnv %s\n", $sv->NVX;
+}
+
+sub B::RV::bytecode {
+ my $sv = shift;
+ return if saved($sv);
+ my $rv = $sv->RV;
+ my $rvix = $rv->objix;
+ $rv->bytecode;
+ $sv->B::SV::bytecode;
+ print "xrv $rvix\n";
+}
+
+sub B::PVIV::bytecode {
+ my $sv = shift;
+ return if saved($sv);
+ my $iv = $sv->IVX;
+ $sv->B::PV::bytecode;
+ printf "%s $iv\n", $sv->needs64bits ? "xiv64" : "xiv32";
+}
+
+sub B::PVNV::bytecode {
+ my ($sv, $flag) = @_;
+ # The $flag argument is passed through PVMG::bytecode by BM::bytecode
+ # and AV::bytecode and indicates special handling. $flag = 1 is used by
+ # BM::bytecode and means that we should ensure we save the whole B-M
+ # table. It consists of 257 bytes (256 char array plus a final \0)
+ # which follow the ordinary PV+\0 and the 257 bytes are *not* reflected
+ # in SvCUR. $flag = 2 is used by AV::bytecode and means that we only
+ # call SV::bytecode instead of saving PV and calling NV::bytecode since
+ # PV/NV/IV stuff is different for AVs.
+ return if saved($sv);
+ if ($flag == 2) {
+ $sv->B::SV::bytecode;
+ } else {
+ my $pv = $sv->PV;
+ $sv->B::IV::bytecode;
+ printf "xnv %s\n", $sv->NVX;
+ if ($flag == 1) {
+ $pv .= "\0" . $sv->TABLE;
+ printf "newpv %s\npv_cur %d\nxpv\n", pvstring($pv),length($pv)-257;
+ } else {
+ printf("newpv %s\nxpv\n", pvstring($pv)) if $sv->FLAGS & POK;
+ }
+ }
+}
+
+sub B::PVMG::bytecode {
+ my ($sv, $flag) = @_;
+ # See B::PVNV::bytecode for an explanation of $flag.
+ return if saved($sv);
+ # XXX We assume SvSTASH is already saved and don't save it later ourselves
+ my $stashix = $sv->SvSTASH->objix;
+ my @mgchain = $sv->MAGIC;
+ my (@mgobjix, $mg);
+ #
+ # We need to traverse the magic chain and get objix for each OBJ
+ # field *before* we do B::PVNV::bytecode since objix overwrites
+ # the sv register. However, we need to write the magic-saving
+ # bytecode *after* B::PVNV::bytecode since sv isn't initialised
+ # to refer to $sv until then.
+ #
+ @mgobjix = map($_->OBJ->objix, @mgchain);
+ $sv->B::PVNV::bytecode($flag);
+ print "xmg_stash $stashix\n";
+ foreach $mg (@mgchain) {
+ printf "sv_magic %s\nmg_obj %d\nnewpv %s\nmg_pv\n",
+ cstring($mg->TYPE), shift(@mgobjix), pvstring($mg->PTR);
+ }
+}
+
+sub B::PVLV::bytecode {
+ my $sv = shift;
+ return if saved($sv);
+ $sv->B::PVMG::bytecode;
+ printf <<'EOT', $sv->TARGOFF, $sv->TARGLEN, cstring($sv->TYPE);
+xlv_targoff %d
+xlv_targlen %d
+xlv_type %s
+EOT
+}
+
+sub B::BM::bytecode {
+ my $sv = shift;
+ return if saved($sv);
+ # See PVNV::bytecode for an explanation of what the argument does
+ $sv->B::PVMG::bytecode(1);
+ printf "xbm_useful %d\nxbm_previous %d\nxbm_rare %d\n",
+ $sv->USEFUL, $sv->PREVIOUS, $sv->RARE;
+}
+
+sub B::GV::bytecode {
+ my $gv = shift;
+ return if saved($gv);
+ my $ix = $gv->objix;
+ mark_saved($gv);
+ my $gvname = $gv->NAME;
+ my $name = cstring($gv->STASH->NAME . "::" . $gvname);
+ my $egv = $gv->EGV;
+ my $egvix = $egv->objix;
+ ldsv($ix);
+ printf <<"EOT", $gv->FLAGS, $gv->GvFLAGS, $gv->LINE;
+sv_flags 0x%x
+xgv_flags 0x%x
+gp_line %d
+EOT
+ my $refcnt = $gv->REFCNT;
+ printf("sv_refcnt_add %d\n", $refcnt - 1) if $refcnt > 1;
+ my $gvrefcnt = $gv->GvREFCNT;
+ printf("gp_refcnt_add %d\n", $gvrefcnt - 1) if $gvrefcnt > 1;
+ if ($gvrefcnt > 1 && $ix != $egvix) {
+ print "gp_share $egvix\n";
+ } else {
+ if ($gvname !~ /^([^A-Za-z]|STDIN|STDOUT|STDERR|ARGV|SIG|ENV)$/) {
+ my $i;
+ my @subfield_names = qw(SV AV HV CV FILEGV FORM IO);
+ my @subfields = map($gv->$_(), @subfield_names);
+ my @ixes = map($_->objix, @subfields);
+ # Reset sv register for $gv
+ ldsv($ix);
+ for ($i = 0; $i < @ixes; $i++) {
+ printf "gp_%s %d\n", lc($subfield_names[$i]), $ixes[$i];
+ }
+ # Now save all the subfields
+ my $sv;
+ foreach $sv (@subfields) {
+ $sv->bytecode;
+ }
+ }
+ }
+}
+
+sub B::HV::bytecode {
+ my $hv = shift;
+ return if saved($hv);
+ mark_saved($hv);
+ my $name = $hv->NAME;
+ my $ix = $hv->objix;
+ if (!$name) {
+ # It's an ordinary HV. Stashes have NAME set and need no further
+ # saving beyond the gv_stashpv that $hv->objix already ensures.
+ my @contents = $hv->ARRAY;
+ my ($i, @ixes);
+ for ($i = 1; $i < @contents; $i += 2) {
+ push(@ixes, $contents[$i]->objix);
+ }
+ for ($i = 1; $i < @contents; $i += 2) {
+ $contents[$i]->bytecode;
+ }
+ ldsv($ix);
+ for ($i = 0; $i < @contents; $i += 2) {
+ printf("newpv %s\nhv_store %d\n",
+ pvstring($contents[$i]), $ixes[$i / 2]);
+ }
+ printf "sv_refcnt %d\nsv_flags 0x%x\n", $hv->REFCNT, $hv->FLAGS;
+ }
+}
+
+sub B::AV::bytecode {
+ my $av = shift;
+ return if saved($av);
+ my $ix = $av->objix;
+ my $fill = $av->FILL;
+ my $max = $av->MAX;
+ my (@array, @ixes);
+ if ($fill > -1) {
+ @array = $av->ARRAY;
+ @ixes = map($_->objix, @array);
+ my $sv;
+ foreach $sv (@array) {
+ $sv->bytecode;
+ }
+ }
+ # See PVNV::bytecode for the meaning of the flag argument of 2.
+ $av->B::PVMG::bytecode(2);
+ # Recover sv register and set AvMAX and AvFILL to -1 (since we
+ # create an AV with NEWSV and SvUPGRADE rather than doing newAV
+ # which is what sets AvMAX and AvFILL.
+ ldsv($ix);
+ printf "xav_flags 0x%x\nxav_max -1\nxav_fill -1\n", $av->AvFLAGS;
+ if ($fill > -1) {
+ my $elix;
+ foreach $elix (@ixes) {
+ print "av_push $elix\n";
+ }
+ } else {
+ if ($max > -1) {
+ print "av_extend $max\n";
+ }
+ }
+}
+
+sub B::CV::bytecode {
+ my $cv = shift;
+ return if saved($cv);
+ my $ix = $cv->objix;
+ $cv->B::PVMG::bytecode;
+ my $i;
+ my @subfield_names = qw(ROOT START STASH GV FILEGV PADLIST OUTSIDE);
+ my @subfields = map($cv->$_(), @subfield_names);
+ my @ixes = map($_->objix, @subfields);
+ # Save OP tree from CvROOT (first element of @subfields)
+ my $root = shift @subfields;
+ if ($$root) {
+ walkoptree($root, "bytecode");
+ }
+ # Reset sv register for $cv (since above ->objix calls stomped on it)
+ ldsv($ix);
+ for ($i = 0; $i < @ixes; $i++) {
+ printf "xcv_%s %d\n", lc($subfield_names[$i]), $ixes[$i];
+ }
+ printf "xcv_depth %d\nxcv_flags 0x%x\n", $cv->DEPTH, $cv->FLAGS;
+ # Now save all the subfields (except for CvROOT which was handled
+ # above) and CvSTART (now the initial element of @subfields).
+ shift @subfields; # bye-bye CvSTART
+ my $sv;
+ foreach $sv (@subfields) {
+ $sv->bytecode;
+ }
+}
+
+sub B::IO::bytecode {
+ my $io = shift;
+ return if saved($io);
+ my $ix = $io->objix;
+ my $top_gv = $io->TOP_GV;
+ my $top_gvix = $top_gv->objix;
+ my $fmt_gv = $io->FMT_GV;
+ my $fmt_gvix = $fmt_gv->objix;
+ my $bottom_gv = $io->BOTTOM_GV;
+ my $bottom_gvix = $bottom_gv->objix;
+
+ $io->B::PVMG::bytecode;
+ ldsv($ix);
+ print "xio_top_gv $top_gvix\n";
+ print "xio_fmt_gv $fmt_gvix\n";
+ print "xio_bottom_gv $bottom_gvix\n";
+ my $field;
+ foreach $field (qw(TOP_NAME FMT_NAME BOTTOM_NAME)) {
+ printf "newpv %s\nxio_%s\n", pvstring($io->$field()), lc($field);
+ }
+ foreach $field (qw(LINES PAGE PAGE_LEN LINES_LEFT SUBPROCESS)) {
+ printf "xio_%s %d\n", lc($field), $io->$field();
+ }
+ printf "xio_type %s\nxio_flags 0x%x\n", cstring($io->IoTYPE), $io->IoFLAGS;
+ $top_gv->bytecode;
+ $fmt_gv->bytecode;
+ $bottom_gv->bytecode;
+}
+
+sub B::SPECIAL::bytecode {
+ # nothing extra needs doing
+}
+
+sub bytecompile_object {
+ my $sv;
+ foreach $sv (@_) {
+ svref_2object($sv)->bytecode;
+ }
+}
+
+sub B::GV::bytecodecv {
+ my $gv = shift;
+ my $cv = $gv->CV;
+ if ($$cv && !saved($cv)) {
+ if ($debug_cv) {
+ warn sprintf("saving extra CV &%s::%s (0x%x) from GV 0x%x\n",
+ $gv->STASH->NAME, $gv->NAME, $$cv, $$gv);
+ }
+ $gv->bytecode;
+ }
+}
+
+sub bytecompile_main {
+ my $curpad = (comppadlist->ARRAY)[1];
+ my $curpadix = $curpad->objix;
+ $curpad->bytecode;
+ walkoptree(main_root, "bytecode");
+ warn "done main program, now walking symbol table\n" if $debug_bc;
+ my ($pack, %exclude);
+ foreach $pack (qw(B O AutoLoader DynaLoader Config DB VMS strict vars
+ FileHandle Exporter Carp UNIVERSAL IO Fcntl Symbol
+ SelectSaver blib Cwd))
+ {
+ $exclude{$pack."::"} = 1;
+ }
+ no strict qw(vars refs);
+ walksymtable(\%{"main::"}, "bytecodecv", sub {
+ warn "considering $_[0]\n" if $debug_bc;
+ return !defined($exclude{$_[0]});
+ });
+ if (!$module_only) {
+ printf "main_root %d\n", main_root->objix;
+ printf "main_start %d\n", main_start->objix;
+ printf "curpad $curpadix\n";
+ # XXX Do min_intro_pending and max_intro_pending matter?
+ }
+}
+
+sub prepare_assemble {
+ my $newfh = IO::File->new_tmpfile;
+ select($newfh);
+ binmode $newfh;
+ return $newfh;
+}
+
+sub do_assemble {
+ my $fh = shift;
+ seek($fh, 0, 0); # rewind the temporary file
+ assemble_fh($fh, sub { print OUT @_ });
+}
+
+sub compile {
+ my @options = @_;
+ my ($option, $opt, $arg);
+ open(OUT, ">&STDOUT");
+ binmode OUT;
+ select(OUT);
+ OPTION:
+ while ($option = shift @options) {
+ if ($option =~ /^-(.)(.*)/) {
+ $opt = $1;
+ $arg = $2;
+ } else {
+ unshift @options, $option;
+ last OPTION;
+ }
+ if ($opt eq "-" && $arg eq "-") {
+ shift @options;
+ last OPTION;
+ } elsif ($opt eq "o") {
+ $arg ||= shift @options;
+ open(OUT, ">$arg") or return "$arg: $!\n";
+ binmode OUT;
+ } elsif ($opt eq "D") {
+ $arg ||= shift @options;
+ foreach $arg (split(//, $arg)) {
+ if ($arg eq "b") {
+ $| = 1;
+ debug(1);
+ } elsif ($arg eq "o") {
+ B->debug(1);
+ } elsif ($arg eq "a") {
+ B::Assembler::debug(1);
+ } elsif ($arg eq "C") {
+ $debug_cv = 1;
+ }
+ }
+ } elsif ($opt eq "v") {
+ $verbose = 1;
+ } elsif ($opt eq "m") {
+ $module_only = 1;
+ } elsif ($opt eq "S") {
+ $no_assemble = 1;
+ } elsif ($opt eq "f") {
+ $arg ||= shift @options;
+ my $value = $arg !~ s/^no-//;
+ $arg =~ s/-/_/g;
+ my $ref = $optimise{$arg};
+ if (defined($ref)) {
+ $$ref = $value;
+ } else {
+ warn qq(ignoring unknown optimisation option "$arg"\n);
+ }
+ } elsif ($opt eq "O") {
+ $arg = 1 if $arg eq "";
+ my $ref;
+ foreach $ref (values %optimise) {
+ $$ref = 0;
+ }
+ if ($arg >= 6) {
+ $strip_syntree = 1;
+ }
+ if ($arg >= 2) {
+ $bypass_nullops = 1;
+ }
+ if ($arg >= 1) {
+ $compress_nullops = 1;
+ $omit_seq = 1;
+ }
+ }
+ }
+ if (@options) {
+ return sub {
+ my $objname;
+ my $newfh;
+ $newfh = prepare_assemble() unless $no_assemble;
+ foreach $objname (@options) {
+ eval "bytecompile_object(\\$objname)";
+ }
+ do_assemble($newfh) unless $no_assemble;
+ }
+ } else {
+ return sub {
+ my $newfh;
+ $newfh = prepare_assemble() unless $no_assemble;
+ bytecompile_main();
+ do_assemble($newfh) unless $no_assemble;
+ }
+ }
+}
+
+1;
+
+__END__
+
+=head1 NAME
+
+B::Bytecode - Perl compiler's bytecode backend
+
+=head1 SYNOPSIS
+
+ perl -MO=Bytecode[,OPTIONS] foo.pl
+
+=head1 DESCRIPTION
+
+This compiler backend takes Perl source and generates a
+platform-independent bytecode encapsulating code to load the
+internal structures perl uses to run your program. When the
+generated bytecode is loaded in, your program is ready to run,
+reducing the time which perl would have taken to load and parse
+your program into its internal semi-compiled form. That means that
+compiling with this backend will not help improve the runtime
+execution speed of your program but may improve the start-up time.
+Depending on the environment in which your program runs this may
+or may not be a help.
+
+The resulting bytecode can be run with a special byteperl executable
+or (for non-main programs) be loaded via the C<byteload_fh> function
+in the F<B> module.
+
+=head1 OPTIONS
+
+If there are any non-option arguments, they are taken to be names of
+objects to be saved (probably doesn't work properly yet). Without
+extra arguments, it saves the main program.
+
+=over 4
+
+=item B<-ofilename>
+
+Output to filename instead of STDOUT.
+
+=item B<-->
+
+Force end of options.
+
+=item B<-f>
+
+Force optimisations on or off one at a time. Each can be preceded
+by B<no-> to turn the option off (e.g. B<-fno-compress-nullops>).
+
+=item B<-fcompress-nullops>
+
+Only fills in the necessary fields of ops which have
+been optimised away by perl's internal compiler.
+
+=item B<-fomit-sequence-numbers>
+
+Leaves out code to fill in the op_seq field of all ops
+which is only used by perl's internal compiler.
+
+=item B<-fbypass-nullops>
+
+If op->op_next ever points to a NULLOP, replaces the op_next field
+with the first non-NULLOP in the path of execution.
+
+=item B<-fstrip-syntax-tree>
+
+Leaves out code to fill in the pointers which link the internal syntax
+tree together. They're not needed at run-time but leaving them out
+will make it impossible to recompile or disassemble the resulting
+program. It will also stop C<goto label> statements from working.
+
+=item B<-On>
+
+Optimisation level (n = 0, 1, 2, ...). B<-O> means B<-O1>.
+B<-O1> sets B<-fcompress-nullops> B<-fomit-sequence numbers>.
+B<-O6> adds B<-fstrip-syntax-tree>.
+
+=item B<-D>
+
+Debug options (concatenated or separate flags like C<perl -D>).
+
+=item B<-Do>
+
+Prints each OP as it's processed.
+
+=item B<-Db>
+
+Print debugging information about bytecompiler progress.
+
+=item B<-Da>
+
+Tells the (bytecode) assembler to include source assembler lines
+in its output as bytecode comments.
+
+=item B<-DC>
+
+Prints each CV taken from the final symbol tree walk.
+
+=item B<-S>
+
+Output (bytecode) assembler source rather than piping it
+through the assembler and outputting bytecode.
+
+=item B<-m>
+
+Compile as a module rather than a standalone program. Currently this
+just means that the bytecodes for initialising C<main_start>,
+C<main_root> and C<curpad> are omitted.
+
+=back
+
+=head1 EXAMPLES
+
+ perl -MO=Bytecode,-O6,-o,foo.plc foo.pl
+
+ perl -MO=Bytecode,-S foo.pl > foo.S
+ assemble foo.S > foo.plc
+ byteperl foo.plc
+
+ perl -MO=Bytecode,-m,-oFoo.pmc Foo.pm
+
+=head1 BUGS
+
+Plenty. Current status: experimental.
+
+=head1 AUTHOR
+
+Malcolm Beattie, C<mbeattie@sable.ox.ac.uk>
+
+=cut
diff --git a/gnu/usr.bin/perl/ext/B/B/C.pm b/gnu/usr.bin/perl/ext/B/B/C.pm
new file mode 100644
index 00000000000..e695cc28767
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/B/B/C.pm
@@ -0,0 +1,1378 @@
+# C.pm
+#
+# Copyright (c) 1996, 1997, 1998 Malcolm Beattie
+#
+# You may distribute under the terms of either the GNU General Public
+# License or the Artistic License, as specified in the README file.
+#
+package B::C;
+use Exporter ();
+@ISA = qw(Exporter);
+@EXPORT_OK = qw(output_all output_boilerplate output_main
+ init_sections set_callback save_unused_subs objsym);
+
+use B qw(minus_c sv_undef walkoptree walksymtable main_root main_start peekop
+ class cstring cchar svref_2object compile_stats comppadlist hash
+ threadsv_names main_cv init_av);
+use B::Asmdata qw(@specialsv_name);
+
+use FileHandle;
+use Carp;
+use strict;
+
+my $hv_index = 0;
+my $gv_index = 0;
+my $re_index = 0;
+my $pv_index = 0;
+my $anonsub_index = 0;
+
+my %symtable;
+my $warn_undefined_syms;
+my $verbose;
+my @unused_sub_packages;
+my $nullop_count;
+my $pv_copy_on_grow;
+my ($debug_cops, $debug_av, $debug_cv, $debug_mg);
+
+my @threadsv_names;
+BEGIN {
+ @threadsv_names = threadsv_names();
+}
+
+# Code sections
+my ($init, $decl, $symsect, $binopsect, $condopsect, $copsect, $cvopsect,
+ $gvopsect, $listopsect, $logopsect, $loopsect, $opsect, $pmopsect,
+ $pvopsect, $svopsect, $unopsect, $svsect, $xpvsect, $xpvavsect,
+ $xpvhvsect, $xpvcvsect, $xpvivsect, $xpvnvsect, $xpvmgsect, $xpvlvsect,
+ $xrvsect, $xpvbmsect, $xpviosect, $bootstrap);
+
+sub walk_and_save_optree;
+my $saveoptree_callback = \&walk_and_save_optree;
+sub set_callback { $saveoptree_callback = shift }
+sub saveoptree { &$saveoptree_callback(@_) }
+
+sub walk_and_save_optree {
+ my ($name, $root, $start) = @_;
+ walkoptree($root, "save");
+ return objsym($start);
+}
+
+# Current workaround/fix for op_free() trying to free statically
+# defined OPs is to set op_seq = -1 and check for that in op_free().
+# Instead of hardwiring -1 in place of $op->seq, we use $op_seq
+# so that it can be changed back easily if necessary. In fact, to
+# stop compilers from moaning about a U16 being initialised with an
+# uncast -1 (the printf format is %d so we can't tweak it), we have
+# to "know" that op_seq is a U16 and use 65535. Ugh.
+my $op_seq = 65535;
+
+sub AVf_REAL () { 1 }
+
+# XXX This shouldn't really be hardcoded here but it saves
+# looking up the name of every BASEOP in B::OP
+sub OP_THREADSV () { 345 }
+
+sub savesym {
+ my ($obj, $value) = @_;
+ my $sym = sprintf("s\\_%x", $$obj);
+ $symtable{$sym} = $value;
+}
+
+sub objsym {
+ my $obj = shift;
+ return $symtable{sprintf("s\\_%x", $$obj)};
+}
+
+sub getsym {
+ my $sym = shift;
+ my $value;
+
+ return 0 if $sym eq "sym_0"; # special case
+ $value = $symtable{$sym};
+ if (defined($value)) {
+ return $value;
+ } else {
+ warn "warning: undefined symbol $sym\n" if $warn_undefined_syms;
+ return "UNUSED";
+ }
+}
+
+sub savepv {
+ my $pv = shift;
+ my $pvsym = 0;
+ my $pvmax = 0;
+ if ($pv_copy_on_grow) {
+ my $cstring = cstring($pv);
+ if ($cstring ne "0") { # sic
+ $pvsym = sprintf("pv%d", $pv_index++);
+ $decl->add(sprintf("static char %s[] = %s;", $pvsym, $cstring));
+ }
+ } else {
+ $pvmax = length($pv) + 1;
+ }
+ return ($pvsym, $pvmax);
+}
+
+sub B::OP::save {
+ my ($op, $level) = @_;
+ my $type = $op->type;
+ $nullop_count++ unless $type;
+ if ($type == OP_THREADSV) {
+ # saves looking up ppaddr but it's a bit naughty to hard code this
+ $init->add(sprintf("(void)find_threadsv(%s);",
+ cstring($threadsv_names[$op->targ])));
+ }
+ $opsect->add(sprintf("s\\_%x, s\\_%x, %s, %u, %u, %u, 0x%x, 0x%x",
+ ${$op->next}, ${$op->sibling}, $op->ppaddr, $op->targ,
+ $type, $op_seq, $op->flags, $op->private));
+ savesym($op, sprintf("&op_list[%d]", $opsect->index));
+}
+
+sub B::FAKEOP::new {
+ my ($class, %objdata) = @_;
+ bless \%objdata, $class;
+}
+
+sub B::FAKEOP::save {
+ my ($op, $level) = @_;
+ $opsect->add(sprintf("%s, %s, %s, %u, %u, %u, 0x%x, 0x%x",
+ $op->next, $op->sibling, $op->ppaddr, $op->targ,
+ $op->type, $op_seq, $op->flags, $op->private));
+ return sprintf("&op_list[%d]", $opsect->index);
+}
+
+sub B::FAKEOP::next { $_[0]->{"next"} || 0 }
+sub B::FAKEOP::type { $_[0]->{type} || 0}
+sub B::FAKEOP::sibling { $_[0]->{sibling} || 0 }
+sub B::FAKEOP::ppaddr { $_[0]->{ppaddr} || 0 }
+sub B::FAKEOP::targ { $_[0]->{targ} || 0 }
+sub B::FAKEOP::flags { $_[0]->{flags} || 0 }
+sub B::FAKEOP::private { $_[0]->{private} || 0 }
+
+sub B::UNOP::save {
+ my ($op, $level) = @_;
+ $unopsect->add(sprintf("s\\_%x, s\\_%x, %s, %u, %u, %u, 0x%x, 0x%x, s\\_%x",
+ ${$op->next}, ${$op->sibling}, $op->ppaddr,
+ $op->targ, $op->type, $op_seq, $op->flags,
+ $op->private, ${$op->first}));
+ savesym($op, sprintf("(OP*)&unop_list[%d]", $unopsect->index));
+}
+
+sub B::BINOP::save {
+ my ($op, $level) = @_;
+ $binopsect->add(sprintf("s\\_%x, s\\_%x, %s, %u, %u, %u, 0x%x, 0x%x, s\\_%x, s\\_%x",
+ ${$op->next}, ${$op->sibling}, $op->ppaddr,
+ $op->targ, $op->type, $op_seq, $op->flags,
+ $op->private, ${$op->first}, ${$op->last}));
+ savesym($op, sprintf("(OP*)&binop_list[%d]", $binopsect->index));
+}
+
+sub B::LISTOP::save {
+ my ($op, $level) = @_;
+ $listopsect->add(sprintf("s\\_%x, s\\_%x, %s, %u, %u, %u, 0x%x, 0x%x, s\\_%x, s\\_%x, %u",
+ ${$op->next}, ${$op->sibling}, $op->ppaddr,
+ $op->targ, $op->type, $op_seq, $op->flags,
+ $op->private, ${$op->first}, ${$op->last},
+ $op->children));
+ savesym($op, sprintf("(OP*)&listop_list[%d]", $listopsect->index));
+}
+
+sub B::LOGOP::save {
+ my ($op, $level) = @_;
+ $logopsect->add(sprintf("s\\_%x, s\\_%x, %s, %u, %u, %u, 0x%x, 0x%x, s\\_%x, s\\_%x",
+ ${$op->next}, ${$op->sibling}, $op->ppaddr,
+ $op->targ, $op->type, $op_seq, $op->flags,
+ $op->private, ${$op->first}, ${$op->other}));
+ savesym($op, sprintf("(OP*)&logop_list[%d]", $logopsect->index));
+}
+
+sub B::CONDOP::save {
+ my ($op, $level) = @_;
+ $condopsect->add(sprintf("s\\_%x, s\\_%x, %s, %u, %u, %u, 0x%x, 0x%x, s\\_%x, s\\_%x, s\\_%x",
+ ${$op->next}, ${$op->sibling}, $op->ppaddr,
+ $op->targ, $op->type, $op_seq, $op->flags,
+ $op->private, ${$op->first}, ${$op->true},
+ ${$op->false}));
+ savesym($op, sprintf("(OP*)&condop_list[%d]", $condopsect->index));
+}
+
+sub B::LOOP::save {
+ my ($op, $level) = @_;
+ #warn sprintf("LOOP: redoop %s, nextop %s, lastop %s\n",
+ # peekop($op->redoop), peekop($op->nextop),
+ # peekop($op->lastop)); # debug
+ $loopsect->add(sprintf("s\\_%x, s\\_%x, %s, %u, %u, %u, 0x%x, 0x%x, s\\_%x, s\\_%x, %u, s\\_%x, s\\_%x, s\\_%x",
+ ${$op->next}, ${$op->sibling}, $op->ppaddr,
+ $op->targ, $op->type, $op_seq, $op->flags,
+ $op->private, ${$op->first}, ${$op->last},
+ $op->children, ${$op->redoop}, ${$op->nextop},
+ ${$op->lastop}));
+ savesym($op, sprintf("(OP*)&loop_list[%d]", $loopsect->index));
+}
+
+sub B::PVOP::save {
+ my ($op, $level) = @_;
+ $pvopsect->add(sprintf("s\\_%x, s\\_%x, %s, %u, %u, %u, 0x%x, 0x%x, %s",
+ ${$op->next}, ${$op->sibling}, $op->ppaddr,
+ $op->targ, $op->type, $op_seq, $op->flags,
+ $op->private, cstring($op->pv)));
+ savesym($op, sprintf("(OP*)&pvop_list[%d]", $pvopsect->index));
+}
+
+sub B::SVOP::save {
+ my ($op, $level) = @_;
+ my $svsym = $op->sv->save;
+ $svopsect->add(sprintf("s\\_%x, s\\_%x, %s, %u, %u, %u, 0x%x, 0x%x, %s",
+ ${$op->next}, ${$op->sibling}, $op->ppaddr,
+ $op->targ, $op->type, $op_seq, $op->flags,
+ $op->private, "(SV*)$svsym"));
+ savesym($op, sprintf("(OP*)&svop_list[%d]", $svopsect->index));
+}
+
+sub B::GVOP::save {
+ my ($op, $level) = @_;
+ my $gvsym = $op->gv->save;
+ $gvopsect->add(sprintf("s\\_%x, s\\_%x, %s, %u, %u, %u, 0x%x, 0x%x, Nullgv",
+ ${$op->next}, ${$op->sibling}, $op->ppaddr,
+ $op->targ, $op->type, $op_seq, $op->flags,
+ $op->private));
+ $init->add(sprintf("gvop_list[%d].op_gv = %s;", $gvopsect->index, $gvsym));
+ savesym($op, sprintf("(OP*)&gvop_list[%d]", $gvopsect->index));
+}
+
+sub B::COP::save {
+ my ($op, $level) = @_;
+ my $gvsym = $op->filegv->save;
+ my $stashsym = $op->stash->save;
+ warn sprintf("COP: line %d file %s\n", $op->line, $op->filegv->SV->PV)
+ if $debug_cops;
+ $copsect->add(sprintf("s\\_%x, s\\_%x, %s, %u, %u, %u, 0x%x, 0x%x, %s, Nullhv, Nullgv, %u, %d, %u",
+ ${$op->next}, ${$op->sibling}, $op->ppaddr,
+ $op->targ, $op->type, $op_seq, $op->flags,
+ $op->private, cstring($op->label), $op->cop_seq,
+ $op->arybase, $op->line));
+ my $copix = $copsect->index;
+ $init->add(sprintf("cop_list[%d].cop_filegv = %s;", $copix, $gvsym),
+ sprintf("cop_list[%d].cop_stash = %s;", $copix, $stashsym));
+ savesym($op, "(OP*)&cop_list[$copix]");
+}
+
+sub B::PMOP::save {
+ my ($op, $level) = @_;
+ my $replroot = $op->pmreplroot;
+ my $replstart = $op->pmreplstart;
+ my $replrootfield = sprintf("s\\_%x", $$replroot);
+ my $replstartfield = sprintf("s\\_%x", $$replstart);
+ my $gvsym;
+ my $ppaddr = $op->ppaddr;
+ if ($$replroot) {
+ # OP_PUSHRE (a mutated version of OP_MATCH for the regexp
+ # argument to a split) stores a GV in op_pmreplroot instead
+ # of a substitution syntax tree. We don't want to walk that...
+ if ($ppaddr eq "pp_pushre") {
+ $gvsym = $replroot->save;
+# warn "PMOP::save saving a pp_pushre with GV $gvsym\n"; # debug
+ $replrootfield = 0;
+ } else {
+ $replstartfield = saveoptree("*ignore*", $replroot, $replstart);
+ }
+ }
+ # pmnext handling is broken in perl itself, I think. Bad op_pmnext
+ # fields aren't noticed in perl's runtime (unless you try reset) but we
+ # segfault when trying to dereference it to find op->op_pmnext->op_type
+ $pmopsect->add(sprintf("s\\_%x, s\\_%x, %s, %u, %u, %u, 0x%x, 0x%x, s\\_%x, s\\_%x, %u, %s, %s, 0, 0, 0x%x, 0x%x",
+ ${$op->next}, ${$op->sibling}, $ppaddr, $op->targ,
+ $op->type, $op_seq, $op->flags, $op->private,
+ ${$op->first}, ${$op->last}, $op->children,
+ $replrootfield, $replstartfield,
+ $op->pmflags, $op->pmpermflags,));
+ my $pm = sprintf("pmop_list[%d]", $pmopsect->index);
+ my $re = $op->precomp;
+ if (defined($re)) {
+ my $resym = sprintf("re%d", $re_index++);
+ $decl->add(sprintf("static char *$resym = %s;", cstring($re)));
+ $init->add(sprintf("$pm.op_pmregexp = pregcomp($resym, $resym + %u, &$pm);",
+ length($re)));
+ }
+ if ($gvsym) {
+ $init->add("$pm.op_pmreplroot = (OP*)$gvsym;");
+ }
+ savesym($op, sprintf("(OP*)&pmop_list[%d]", $pmopsect->index));
+}
+
+sub B::SPECIAL::save {
+ my ($sv) = @_;
+ # special case: $$sv is not the address but an index into specialsv_list
+# warn "SPECIAL::save specialsv $$sv\n"; # debug
+ my $sym = $specialsv_name[$$sv];
+ if (!defined($sym)) {
+ confess "unknown specialsv index $$sv passed to B::SPECIAL::save";
+ }
+ return $sym;
+}
+
+sub B::OBJECT::save {}
+
+sub B::NULL::save {
+ my ($sv) = @_;
+ my $sym = objsym($sv);
+ return $sym if defined $sym;
+# warn "Saving SVt_NULL SV\n"; # debug
+ # debug
+ #if ($$sv == 0) {
+ # warn "NULL::save for sv = 0 called from @{[(caller(1))[3]]}\n";
+ #}
+ $svsect->add(sprintf("0, %u, 0x%x", $sv->REFCNT + 1, $sv->FLAGS));
+ return savesym($sv, sprintf("&sv_list[%d]", $svsect->index));
+}
+
+sub B::IV::save {
+ my ($sv) = @_;
+ my $sym = objsym($sv);
+ return $sym if defined $sym;
+ $xpvivsect->add(sprintf("0, 0, 0, %d", $sv->IVX));
+ $svsect->add(sprintf("&xpviv_list[%d], %lu, 0x%x",
+ $xpvivsect->index, $sv->REFCNT + 1, $sv->FLAGS));
+ return savesym($sv, sprintf("&sv_list[%d]", $svsect->index));
+}
+
+sub B::NV::save {
+ my ($sv) = @_;
+ my $sym = objsym($sv);
+ return $sym if defined $sym;
+ $xpvnvsect->add(sprintf("0, 0, 0, %d, %s", $sv->IVX, $sv->NVX));
+ $svsect->add(sprintf("&xpvnv_list[%d], %lu, 0x%x",
+ $xpvnvsect->index, $sv->REFCNT + 1, $sv->FLAGS));
+ return savesym($sv, sprintf("&sv_list[%d]", $svsect->index));
+}
+
+sub B::PVLV::save {
+ my ($sv) = @_;
+ my $sym = objsym($sv);
+ return $sym if defined $sym;
+ my $pv = $sv->PV;
+ my $len = length($pv);
+ my ($pvsym, $pvmax) = savepv($pv);
+ my ($lvtarg, $lvtarg_sym);
+ $xpvlvsect->add(sprintf("%s, %u, %u, %d, %g, 0, 0, %u, %u, 0, %s",
+ $pvsym, $len, $pvmax, $sv->IVX, $sv->NVX,
+ $sv->TARGOFF, $sv->TARGLEN, cchar($sv->TYPE)));
+ $svsect->add(sprintf("&xpvlv_list[%d], %lu, 0x%x",
+ $xpvlvsect->index, $sv->REFCNT + 1, $sv->FLAGS));
+ if (!$pv_copy_on_grow) {
+ $init->add(sprintf("xpvlv_list[%d].xpv_pv = savepvn(%s, %u);",
+ $xpvlvsect->index, cstring($pv), $len));
+ }
+ $sv->save_magic;
+ return savesym($sv, sprintf("&sv_list[%d]", $svsect->index));
+}
+
+sub B::PVIV::save {
+ my ($sv) = @_;
+ my $sym = objsym($sv);
+ return $sym if defined $sym;
+ my $pv = $sv->PV;
+ my $len = length($pv);
+ my ($pvsym, $pvmax) = savepv($pv);
+ $xpvivsect->add(sprintf("%s, %u, %u, %d", $pvsym, $len, $pvmax, $sv->IVX));
+ $svsect->add(sprintf("&xpviv_list[%d], %u, 0x%x",
+ $xpvivsect->index, $sv->REFCNT + 1, $sv->FLAGS));
+ if (!$pv_copy_on_grow) {
+ $init->add(sprintf("xpviv_list[%d].xpv_pv = savepvn(%s, %u);",
+ $xpvivsect->index, cstring($pv), $len));
+ }
+ return savesym($sv, sprintf("&sv_list[%d]", $svsect->index));
+}
+
+sub B::PVNV::save {
+ my ($sv) = @_;
+ my $sym = objsym($sv);
+ return $sym if defined $sym;
+ my $pv = $sv->PV;
+ my $len = length($pv);
+ my ($pvsym, $pvmax) = savepv($pv);
+ $xpvnvsect->add(sprintf("%s, %u, %u, %d, %s",
+ $pvsym, $len, $pvmax, $sv->IVX, $sv->NVX));
+ $svsect->add(sprintf("&xpvnv_list[%d], %lu, 0x%x",
+ $xpvnvsect->index, $sv->REFCNT + 1, $sv->FLAGS));
+ if (!$pv_copy_on_grow) {
+ $init->add(sprintf("xpvnv_list[%d].xpv_pv = savepvn(%s,%u);",
+ $xpvnvsect->index, cstring($pv), $len));
+ }
+ return savesym($sv, sprintf("&sv_list[%d]", $svsect->index));
+}
+
+sub B::BM::save {
+ my ($sv) = @_;
+ my $sym = objsym($sv);
+ return $sym if defined $sym;
+ my $pv = $sv->PV . "\0" . $sv->TABLE;
+ my $len = length($pv);
+ $xpvbmsect->add(sprintf("0, %u, %u, %d, %s, 0, 0, %d, %u, 0x%x",
+ $len, $len + 258, $sv->IVX, $sv->NVX,
+ $sv->USEFUL, $sv->PREVIOUS, $sv->RARE));
+ $svsect->add(sprintf("&xpvbm_list[%d], %lu, 0x%x",
+ $xpvbmsect->index, $sv->REFCNT + 1, $sv->FLAGS));
+ $sv->save_magic;
+ $init->add(sprintf("xpvbm_list[%d].xpv_pv = savepvn(%s, %u);",
+ $xpvbmsect->index, cstring($pv), $len),
+ sprintf("xpvbm_list[%d].xpv_cur = %u;",
+ $xpvbmsect->index, $len - 257));
+ return savesym($sv, sprintf("&sv_list[%d]", $svsect->index));
+}
+
+sub B::PV::save {
+ my ($sv) = @_;
+ my $sym = objsym($sv);
+ return $sym if defined $sym;
+ my $pv = $sv->PV;
+ my $len = length($pv);
+ my ($pvsym, $pvmax) = savepv($pv);
+ $xpvsect->add(sprintf("%s, %u, %u", $pvsym, $len, $pvmax));
+ $svsect->add(sprintf("&xpv_list[%d], %lu, 0x%x",
+ $xpvsect->index, $sv->REFCNT + 1, $sv->FLAGS));
+ if (!$pv_copy_on_grow) {
+ $init->add(sprintf("xpv_list[%d].xpv_pv = savepvn(%s, %u);",
+ $xpvsect->index, cstring($pv), $len));
+ }
+ return savesym($sv, sprintf("&sv_list[%d]", $svsect->index));
+}
+
+sub B::PVMG::save {
+ my ($sv) = @_;
+ my $sym = objsym($sv);
+ return $sym if defined $sym;
+ my $pv = $sv->PV;
+ my $len = length($pv);
+ my ($pvsym, $pvmax) = savepv($pv);
+ $xpvmgsect->add(sprintf("%s, %u, %u, %d, %s, 0, 0",
+ $pvsym, $len, $pvmax, $sv->IVX, $sv->NVX));
+ $svsect->add(sprintf("&xpvmg_list[%d], %lu, 0x%x",
+ $xpvmgsect->index, $sv->REFCNT + 1, $sv->FLAGS));
+ if (!$pv_copy_on_grow) {
+ $init->add(sprintf("xpvmg_list[%d].xpv_pv = savepvn(%s, %u);",
+ $xpvmgsect->index, cstring($pv), $len));
+ }
+ $sym = savesym($sv, sprintf("&sv_list[%d]", $svsect->index));
+ $sv->save_magic;
+ return $sym;
+}
+
+sub B::PVMG::save_magic {
+ my ($sv) = @_;
+ #warn sprintf("saving magic for %s (0x%x)\n", class($sv), $$sv); # debug
+ my $stash = $sv->SvSTASH;
+ if ($$stash) {
+ warn sprintf("xmg_stash = %s (0x%x)\n", $stash->NAME, $$stash)
+ if $debug_mg;
+ # XXX Hope stash is already going to be saved.
+ $init->add(sprintf("SvSTASH(s\\_%x) = s\\_%x;", $$sv, $$stash));
+ }
+ my @mgchain = $sv->MAGIC;
+ my ($mg, $type, $obj, $ptr);
+ foreach $mg (@mgchain) {
+ $type = $mg->TYPE;
+ $obj = $mg->OBJ;
+ $ptr = $mg->PTR;
+ my $len = defined($ptr) ? length($ptr) : 0;
+ if ($debug_mg) {
+ warn sprintf("magic %s (0x%x), obj %s (0x%x), type %s, ptr %s\n",
+ class($sv), $$sv, class($obj), $$obj,
+ cchar($type), cstring($ptr));
+ }
+ $init->add(sprintf("sv_magic((SV*)s\\_%x, (SV*)s\\_%x, %s, %s, %d);",
+ $$sv, $$obj, cchar($type),cstring($ptr),$len));
+ }
+}
+
+sub B::RV::save {
+ my ($sv) = @_;
+ my $sym = objsym($sv);
+ return $sym if defined $sym;
+ $xrvsect->add($sv->RV->save);
+ $svsect->add(sprintf("&xrv_list[%d], %lu, 0x%x",
+ $xrvsect->index, $sv->REFCNT + 1, $sv->FLAGS));
+ return savesym($sv, sprintf("&sv_list[%d]", $svsect->index));
+}
+
+sub try_autoload {
+ my ($cvstashname, $cvname) = @_;
+ warn sprintf("No definition for sub %s::%s\n", $cvstashname, $cvname);
+ # Handle AutoLoader classes explicitly. Any more general AUTOLOAD
+ # use should be handled by the class itself.
+ no strict 'refs';
+ my $isa = \@{"$cvstashname\::ISA"};
+ if (grep($_ eq "AutoLoader", @$isa)) {
+ warn "Forcing immediate load of sub derived from AutoLoader\n";
+ # Tweaked version of AutoLoader::AUTOLOAD
+ my $dir = $cvstashname;
+ $dir =~ s(::)(/)g;
+ eval { require "auto/$dir/$cvname.al" };
+ if ($@) {
+ warn qq(failed require "auto/$dir/$cvname.al": $@\n);
+ return 0;
+ } else {
+ return 1;
+ }
+ }
+}
+
+sub B::CV::save {
+ my ($cv) = @_;
+ my $sym = objsym($cv);
+ if (defined($sym)) {
+# warn sprintf("CV 0x%x already saved as $sym\n", $$cv); # debug
+ return $sym;
+ }
+ # Reserve a place in svsect and xpvcvsect and record indices
+ my $sv_ix = $svsect->index + 1;
+ $svsect->add("svix$sv_ix");
+ my $xpvcv_ix = $xpvcvsect->index + 1;
+ $xpvcvsect->add("xpvcvix$xpvcv_ix");
+ # Save symbol now so that GvCV() doesn't recurse back to us via CvGV()
+ $sym = savesym($cv, "&sv_list[$sv_ix]");
+ warn sprintf("saving CV 0x%x as $sym\n", $$cv) if $debug_cv;
+ my $gv = $cv->GV;
+ my $cvstashname = $gv->STASH->NAME;
+ my $cvname = $gv->NAME;
+ my $root = $cv->ROOT;
+ my $cvxsub = $cv->XSUB;
+ if (!$$root && !$cvxsub) {
+ if (try_autoload($cvstashname, $cvname)) {
+ # Recalculate root and xsub
+ $root = $cv->ROOT;
+ $cvxsub = $cv->XSUB;
+ if ($$root || $cvxsub) {
+ warn "Successful forced autoload\n";
+ }
+ }
+ }
+ my $startfield = 0;
+ my $padlist = $cv->PADLIST;
+ my $pv = $cv->PV;
+ my $xsub = 0;
+ my $xsubany = "Nullany";
+ if ($$root) {
+ warn sprintf("saving op tree for CV 0x%x, root = 0x%x\n",
+ $$cv, $$root) if $debug_cv;
+ my $ppname = "";
+ if ($$gv) {
+ my $stashname = $gv->STASH->NAME;
+ my $gvname = $gv->NAME;
+ if ($gvname ne "__ANON__") {
+ $ppname = (${$gv->FORM} == $$cv) ? "pp_form_" : "pp_sub_";
+ $ppname .= ($stashname eq "main") ?
+ $gvname : "$stashname\::$gvname";
+ $ppname =~ s/::/__/g;
+ }
+ }
+ if (!$ppname) {
+ $ppname = "pp_anonsub_$anonsub_index";
+ $anonsub_index++;
+ }
+ $startfield = saveoptree($ppname, $root, $cv->START, $padlist->ARRAY);
+ warn sprintf("done saving op tree for CV 0x%x, name %s, root 0x%x\n",
+ $$cv, $ppname, $$root) if $debug_cv;
+ if ($$padlist) {
+ warn sprintf("saving PADLIST 0x%x for CV 0x%x\n",
+ $$padlist, $$cv) if $debug_cv;
+ $padlist->save;
+ warn sprintf("done saving PADLIST 0x%x for CV 0x%x\n",
+ $$padlist, $$cv) if $debug_cv;
+ }
+ }
+ elsif ($cvxsub) {
+ $xsubany = sprintf("ANYINIT((void*)0x%x)", $cv->XSUBANY);
+ # Try to find out canonical name of XSUB function from EGV.
+ # XXX Doesn't work for XSUBs with PREFIX set (or anyone who
+ # calls newXS() manually with weird arguments).
+ my $egv = $gv->EGV;
+ my $stashname = $egv->STASH->NAME;
+ $stashname =~ s/::/__/g;
+ $xsub = sprintf("XS_%s_%s", $stashname, $egv->NAME);
+ $decl->add("void $xsub _((CV*));");
+ }
+ else {
+ warn sprintf("No definition for sub %s::%s (unable to autoload)\n",
+ $cvstashname, $cvname); # debug
+ }
+ $symsect->add(sprintf("xpvcvix%d\t%s, %u, 0, %d, %s, 0, Nullhv, Nullhv, %s, s\\_%x, $xsub, $xsubany, Nullgv, Nullgv, %d, s\\_%x, (CV*)s\\_%x, 0x%x",
+ $xpvcv_ix, cstring($pv), length($pv), $cv->IVX,
+ $cv->NVX, $startfield, ${$cv->ROOT}, $cv->DEPTH,
+ $$padlist, ${$cv->OUTSIDE}, $cv->CvFLAGS));
+
+ if (${$cv->OUTSIDE} == ${main_cv()}){
+ $init->add(sprintf("CvOUTSIDE(s\\_%x)=PL_main_cv;",$$cv));
+ }
+
+ if ($$gv) {
+ $gv->save;
+ $init->add(sprintf("CvGV(s\\_%x) = s\\_%x;",$$cv,$$gv));
+ warn sprintf("done saving GV 0x%x for CV 0x%x\n",
+ $$gv, $$cv) if $debug_cv;
+ }
+ my $filegv = $cv->FILEGV;
+ if ($$filegv) {
+ $filegv->save;
+ $init->add(sprintf("CvFILEGV(s\\_%x) = s\\_%x;", $$cv, $$filegv));
+ warn sprintf("done saving FILEGV 0x%x for CV 0x%x\n",
+ $$filegv, $$cv) if $debug_cv;
+ }
+ my $stash = $cv->STASH;
+ if ($$stash) {
+ $stash->save;
+ $init->add(sprintf("CvSTASH(s\\_%x) = s\\_%x;", $$cv, $$stash));
+ warn sprintf("done saving STASH 0x%x for CV 0x%x\n",
+ $$stash, $$cv) if $debug_cv;
+ }
+ $symsect->add(sprintf("svix%d\t(XPVCV*)&xpvcv_list[%u], %lu, 0x%x",
+ $sv_ix, $xpvcv_ix, $cv->REFCNT + 1, $cv->FLAGS));
+ return $sym;
+}
+
+sub B::GV::save {
+ my ($gv) = @_;
+ my $sym = objsym($gv);
+ if (defined($sym)) {
+ #warn sprintf("GV 0x%x already saved as $sym\n", $$gv); # debug
+ return $sym;
+ } else {
+ my $ix = $gv_index++;
+ $sym = savesym($gv, "gv_list[$ix]");
+ #warn sprintf("Saving GV 0x%x as $sym\n", $$gv); # debug
+ }
+ my $gvname = $gv->NAME;
+ my $name = cstring($gv->STASH->NAME . "::" . $gvname);
+ #warn "GV name is $name\n"; # debug
+ my $egv = $gv->EGV;
+ my $egvsym;
+ if ($$gv != $$egv) {
+ #warn(sprintf("EGV name is %s, saving it now\n",
+ # $egv->STASH->NAME . "::" . $egv->NAME)); # debug
+ $egvsym = $egv->save;
+ }
+ $init->add(qq[$sym = gv_fetchpv($name, TRUE, SVt_PV);],
+ sprintf("SvFLAGS($sym) = 0x%x;", $gv->FLAGS),
+ sprintf("GvFLAGS($sym) = 0x%x;", $gv->GvFLAGS),
+ sprintf("GvLINE($sym) = %u;", $gv->LINE));
+ # Shouldn't need to do save_magic since gv_fetchpv handles that
+ #$gv->save_magic;
+ my $refcnt = $gv->REFCNT + 1;
+ $init->add(sprintf("SvREFCNT($sym) += %u;", $refcnt - 1)) if $refcnt > 1;
+ my $gvrefcnt = $gv->GvREFCNT;
+ if ($gvrefcnt > 1) {
+ $init->add(sprintf("GvREFCNT($sym) += %u;", $gvrefcnt - 1));
+ }
+ if (defined($egvsym)) {
+ # Shared glob *foo = *bar
+ $init->add("gp_free($sym);",
+ "GvGP($sym) = GvGP($egvsym);");
+ } elsif ($gvname !~ /^([^A-Za-z]|STDIN|STDOUT|STDERR|ARGV|SIG|ENV)$/) {
+ # Don't save subfields of special GVs (*_, *1, *# and so on)
+# warn "GV::save saving subfields\n"; # debug
+ my $gvsv = $gv->SV;
+ if ($$gvsv) {
+ $init->add(sprintf("GvSV($sym) = s\\_%x;", $$gvsv));
+# warn "GV::save \$$name\n"; # debug
+ $gvsv->save;
+ }
+ my $gvav = $gv->AV;
+ if ($$gvav) {
+ $init->add(sprintf("GvAV($sym) = s\\_%x;", $$gvav));
+# warn "GV::save \@$name\n"; # debug
+ $gvav->save;
+ }
+ my $gvhv = $gv->HV;
+ if ($$gvhv) {
+ $init->add(sprintf("GvHV($sym) = s\\_%x;", $$gvhv));
+# warn "GV::save \%$name\n"; # debug
+ $gvhv->save;
+ }
+ my $gvcv = $gv->CV;
+ if ($$gvcv) {
+ $init->add(sprintf("GvCV($sym) = (CV*)s\\_%x;", $$gvcv));
+# warn "GV::save &$name\n"; # debug
+ $gvcv->save;
+ }
+ my $gvfilegv = $gv->FILEGV;
+ if ($$gvfilegv) {
+ $init->add(sprintf("GvFILEGV($sym) = (GV*)s\\_%x;",$$gvfilegv));
+# warn "GV::save GvFILEGV(*$name)\n"; # debug
+ $gvfilegv->save;
+ }
+ my $gvform = $gv->FORM;
+ if ($$gvform) {
+ $init->add(sprintf("GvFORM($sym) = (CV*)s\\_%x;", $$gvform));
+# warn "GV::save GvFORM(*$name)\n"; # debug
+ $gvform->save;
+ }
+ my $gvio = $gv->IO;
+ if ($$gvio) {
+ $init->add(sprintf("GvIOp($sym) = s\\_%x;", $$gvio));
+# warn "GV::save GvIO(*$name)\n"; # debug
+ $gvio->save;
+ }
+ }
+ return $sym;
+}
+sub B::AV::save {
+ my ($av) = @_;
+ my $sym = objsym($av);
+ return $sym if defined $sym;
+ my $avflags = $av->AvFLAGS;
+ $xpvavsect->add(sprintf("0, -1, -1, 0, 0.0, 0, Nullhv, 0, 0, 0x%x",
+ $avflags));
+ $svsect->add(sprintf("&xpvav_list[%d], %lu, 0x%x",
+ $xpvavsect->index, $av->REFCNT + 1, $av->FLAGS));
+ my $sv_list_index = $svsect->index;
+ my $fill = $av->FILL;
+ $av->save_magic;
+ warn sprintf("saving AV 0x%x FILL=$fill AvFLAGS=0x%x", $$av, $avflags)
+ if $debug_av;
+ # XXX AVf_REAL is wrong test: need to save comppadlist but not stack
+ #if ($fill > -1 && ($avflags & AVf_REAL)) {
+ if ($fill > -1) {
+ my @array = $av->ARRAY;
+ if ($debug_av) {
+ my $el;
+ my $i = 0;
+ foreach $el (@array) {
+ warn sprintf("AV 0x%x[%d] = %s 0x%x\n",
+ $$av, $i++, class($el), $$el);
+ }
+ }
+ my @names = map($_->save, @array);
+ # XXX Better ways to write loop?
+ # Perhaps svp[0] = ...; svp[1] = ...; svp[2] = ...;
+ # Perhaps I32 i = 0; svp[i++] = ...; svp[i++] = ...; svp[i++] = ...;
+ $init->add("{",
+ "\tSV **svp;",
+ "\tAV *av = (AV*)&sv_list[$sv_list_index];",
+ "\tav_extend(av, $fill);",
+ "\tsvp = AvARRAY(av);",
+ map("\t*svp++ = (SV*)$_;", @names),
+ "\tAvFILLp(av) = $fill;",
+ "}");
+ } else {
+ my $max = $av->MAX;
+ $init->add("av_extend((AV*)&sv_list[$sv_list_index], $max);")
+ if $max > -1;
+ }
+ return savesym($av, "(AV*)&sv_list[$sv_list_index]");
+}
+
+sub B::HV::save {
+ my ($hv) = @_;
+ my $sym = objsym($hv);
+ return $sym if defined $sym;
+ my $name = $hv->NAME;
+ if ($name) {
+ # It's a stash
+
+ # A perl bug means HvPMROOT isn't altered when a PMOP is freed. Usually
+ # the only symptom is that sv_reset tries to reset the PMf_USED flag of
+ # a trashed op but we look at the trashed op_type and segfault.
+ #my $adpmroot = ${$hv->PMROOT};
+ my $adpmroot = 0;
+ $decl->add("static HV *hv$hv_index;");
+ # XXX Beware of weird package names containing double-quotes, \n, ...?
+ $init->add(qq[hv$hv_index = gv_stashpv("$name", TRUE);]);
+ if ($adpmroot) {
+ $init->add(sprintf("HvPMROOT(hv$hv_index) = (PMOP*)s\\_%x;",
+ $adpmroot));
+ }
+ $sym = savesym($hv, "hv$hv_index");
+ $hv_index++;
+ return $sym;
+ }
+ # It's just an ordinary HV
+ $xpvhvsect->add(sprintf("0, 0, %d, 0, 0.0, 0, Nullhv, %d, 0, 0, 0",
+ $hv->MAX, $hv->RITER));
+ $svsect->add(sprintf("&xpvhv_list[%d], %lu, 0x%x",
+ $xpvhvsect->index, $hv->REFCNT + 1, $hv->FLAGS));
+ my $sv_list_index = $svsect->index;
+ my @contents = $hv->ARRAY;
+ if (@contents) {
+ my $i;
+ for ($i = 1; $i < @contents; $i += 2) {
+ $contents[$i] = $contents[$i]->save;
+ }
+ $init->add("{", "\tHV *hv = (HV*)&sv_list[$sv_list_index];");
+ while (@contents) {
+ my ($key, $value) = splice(@contents, 0, 2);
+ $init->add(sprintf("\thv_store(hv, %s, %u, %s, %s);",
+ cstring($key),length($key),$value, hash($key)));
+ }
+ $init->add("}");
+ }
+ return savesym($hv, "(HV*)&sv_list[$sv_list_index]");
+}
+
+sub B::IO::save {
+ my ($io) = @_;
+ my $sym = objsym($io);
+ return $sym if defined $sym;
+ my $pv = $io->PV;
+ my $len = length($pv);
+ $xpviosect->add(sprintf("0, %u, %u, %d, %s, 0, 0, 0, 0, 0, %d, %d, %d, %d, %s, Nullgv, %s, Nullgv, %s, Nullgv, %d, %s, 0x%x",
+ $len, $len+1, $io->IVX, $io->NVX, $io->LINES,
+ $io->PAGE, $io->PAGE_LEN, $io->LINES_LEFT,
+ cstring($io->TOP_NAME), cstring($io->FMT_NAME),
+ cstring($io->BOTTOM_NAME), $io->SUBPROCESS,
+ cchar($io->IoTYPE), $io->IoFLAGS));
+ $svsect->add(sprintf("&xpvio_list[%d], %lu, 0x%x",
+ $xpviosect->index, $io->REFCNT + 1, $io->FLAGS));
+ $sym = savesym($io, sprintf("(IO*)&sv_list[%d]", $svsect->index));
+ my ($field, $fsym);
+ foreach $field (qw(TOP_GV FMT_GV BOTTOM_GV)) {
+ $fsym = $io->$field();
+ if ($$fsym) {
+ $init->add(sprintf("Io$field($sym) = (GV*)s\\_%x;", $$fsym));
+ $fsym->save;
+ }
+ }
+ $io->save_magic;
+ return $sym;
+}
+
+sub B::SV::save {
+ my $sv = shift;
+ # This is where we catch an honest-to-goodness Nullsv (which gets
+ # blessed into B::SV explicitly) and any stray erroneous SVs.
+ return 0 unless $$sv;
+ confess sprintf("cannot save that type of SV: %s (0x%x)\n",
+ class($sv), $$sv);
+}
+
+sub output_all {
+ my $init_name = shift;
+ my $section;
+ my @sections = ($opsect, $unopsect, $binopsect, $logopsect, $condopsect,
+ $listopsect, $pmopsect, $svopsect, $gvopsect, $pvopsect,
+ $cvopsect, $loopsect, $copsect, $svsect, $xpvsect,
+ $xpvavsect, $xpvhvsect, $xpvcvsect, $xpvivsect, $xpvnvsect,
+ $xpvmgsect, $xpvlvsect, $xrvsect, $xpvbmsect, $xpviosect);
+ $bootstrap->output(\*STDOUT, "/* bootstrap %s */\n");
+ $symsect->output(\*STDOUT, "#define %s\n");
+ print "\n";
+ output_declarations();
+ foreach $section (@sections) {
+ my $lines = $section->index + 1;
+ if ($lines) {
+ my $name = $section->name;
+ my $typename = ($name eq "xpvcv") ? "XPVCV_or_similar" : uc($name);
+ print "Static $typename ${name}_list[$lines];\n";
+ }
+ }
+ $decl->output(\*STDOUT, "%s\n");
+ print "\n";
+ foreach $section (@sections) {
+ my $lines = $section->index + 1;
+ if ($lines) {
+ my $name = $section->name;
+ my $typename = ($name eq "xpvcv") ? "XPVCV_or_similar" : uc($name);
+ printf "static %s %s_list[%u] = {\n", $typename, $name, $lines;
+ $section->output(\*STDOUT, "\t{ %s },\n");
+ print "};\n\n";
+ }
+ }
+
+ print <<"EOT";
+static int $init_name()
+{
+ dTHR;
+EOT
+ $init->output(\*STDOUT, "\t%s\n");
+ print "\treturn 0;\n}\n";
+ if ($verbose) {
+ warn compile_stats();
+ warn "NULLOP count: $nullop_count\n";
+ }
+}
+
+sub output_declarations {
+ print <<'EOT';
+#ifdef BROKEN_STATIC_REDECL
+#define Static extern
+#else
+#define Static static
+#endif /* BROKEN_STATIC_REDECL */
+
+#ifdef BROKEN_UNION_INIT
+/*
+ * Cribbed from cv.h with ANY (a union) replaced by void*.
+ * Some pre-Standard compilers can't cope with initialising unions. Ho hum.
+ */
+typedef struct {
+ char * xpv_pv; /* pointer to malloced string */
+ STRLEN xpv_cur; /* length of xp_pv as a C string */
+ STRLEN xpv_len; /* allocated size */
+ IV xof_off; /* integer value */
+ double xnv_nv; /* numeric value, if any */
+ MAGIC* xmg_magic; /* magic for scalar array */
+ HV* xmg_stash; /* class package */
+
+ HV * xcv_stash;
+ OP * xcv_start;
+ OP * xcv_root;
+ void (*xcv_xsub) _((CV*));
+ void * xcv_xsubany;
+ GV * xcv_gv;
+ GV * xcv_filegv;
+ long xcv_depth; /* >= 2 indicates recursive call */
+ AV * xcv_padlist;
+ CV * xcv_outside;
+#ifdef USE_THREADS
+ perl_mutex *xcv_mutexp;
+ struct perl_thread *xcv_owner; /* current owner thread */
+#endif /* USE_THREADS */
+ U8 xcv_flags;
+} XPVCV_or_similar;
+#define ANYINIT(i) i
+#else
+#define XPVCV_or_similar XPVCV
+#define ANYINIT(i) {i}
+#endif /* BROKEN_UNION_INIT */
+#define Nullany ANYINIT(0)
+
+#define UNUSED 0
+#define sym_0 0
+
+EOT
+ print "static GV *gv_list[$gv_index];\n" if $gv_index;
+ print "\n";
+}
+
+
+sub output_boilerplate {
+ print <<'EOT';
+#include "EXTERN.h"
+#include "perl.h"
+#ifndef PATCHLEVEL
+#include "patchlevel.h"
+#endif
+
+/* Workaround for mapstart: the only op which needs a different ppaddr */
+#undef pp_mapstart
+#define pp_mapstart pp_grepstart
+
+static void xs_init _((void));
+static PerlInterpreter *my_perl;
+EOT
+}
+
+sub output_main {
+ print <<'EOT';
+int
+#ifndef CAN_PROTOTYPE
+main(argc, argv, env)
+int argc;
+char **argv;
+char **env;
+#else /* def(CAN_PROTOTYPE) */
+main(int argc, char **argv, char **env)
+#endif /* def(CAN_PROTOTYPE) */
+{
+ int exitstatus;
+ int i;
+ char **fakeargv;
+
+ PERL_SYS_INIT(&argc,&argv);
+
+ perl_init_i18nl10n(1);
+
+ if (!PL_do_undump) {
+ my_perl = perl_alloc();
+ if (!my_perl)
+ exit(1);
+ perl_construct( my_perl );
+ }
+
+#ifdef CSH
+ if (!PL_cshlen)
+ PL_cshlen = strlen(PL_cshname);
+#endif
+
+#ifdef ALLOW_PERL_OPTIONS
+#define EXTRA_OPTIONS 2
+#else
+#define EXTRA_OPTIONS 3
+#endif /* ALLOW_PERL_OPTIONS */
+ New(666, fakeargv, argc + EXTRA_OPTIONS + 1, char *);
+ fakeargv[0] = argv[0];
+ fakeargv[1] = "-e";
+ fakeargv[2] = "";
+#ifndef ALLOW_PERL_OPTIONS
+ fakeargv[3] = "--";
+#endif /* ALLOW_PERL_OPTIONS */
+ for (i = 1; i < argc; i++)
+ fakeargv[i + EXTRA_OPTIONS] = argv[i];
+ fakeargv[argc + EXTRA_OPTIONS] = 0;
+
+ exitstatus = perl_parse(my_perl, xs_init, argc + EXTRA_OPTIONS,
+ fakeargv, NULL);
+ if (exitstatus)
+ exit( exitstatus );
+
+ sv_setpv(GvSV(gv_fetchpv("0", TRUE, SVt_PV)), argv[0]);
+ PL_main_cv = PL_compcv;
+ PL_compcv = 0;
+
+ exitstatus = perl_init();
+ if (exitstatus)
+ exit( exitstatus );
+
+ exitstatus = perl_run( my_perl );
+
+ perl_destruct( my_perl );
+ perl_free( my_perl );
+
+ exit( exitstatus );
+}
+
+static void
+xs_init()
+{
+}
+EOT
+}
+
+sub dump_symtable {
+ # For debugging
+ my ($sym, $val);
+ warn "----Symbol table:\n";
+ while (($sym, $val) = each %symtable) {
+ warn "$sym => $val\n";
+ }
+ warn "---End of symbol table\n";
+}
+
+sub save_object {
+ my $sv;
+ foreach $sv (@_) {
+ svref_2object($sv)->save;
+ }
+}
+
+sub Dummy_BootStrap { }
+
+sub B::GV::savecv {
+ my $gv = shift;
+ my $cv = $gv->CV;
+ my $name = $gv->NAME;
+ if ($$cv) {
+ if ($name eq "bootstrap" && $cv->XSUB) {
+ my $file = $cv->FILEGV->SV->PV;
+ $bootstrap->add($file);
+ my $name = $gv->STASH->NAME.'::'.$name;
+ no strict 'refs';
+ *{$name} = \&Dummy_BootStrap;
+ $cv = $gv->CV;
+ }
+ if ($debug_cv) {
+ warn sprintf("saving extra CV &%s::%s (0x%x) from GV 0x%x\n",
+ $gv->STASH->NAME, $name, $$cv, $$gv);
+ }
+ my $package=$gv->STASH->NAME;
+ # This seems to undo all the ->isa and prefix stuff we do below
+ # so disable again for now
+ if (0 && ! grep(/^$package$/,@unused_sub_packages)){
+ warn sprintf("omitting cv in superclass %s", $gv->STASH->NAME)
+ if $debug_cv;
+ return ;
+ }
+ $gv->save;
+ }
+ elsif ($name eq 'ISA')
+ {
+ $gv->save;
+ }
+
+}
+
+
+
+sub save_unused_subs {
+ my %search_pack;
+ map { $search_pack{$_} = 1 } @_;
+ @unused_sub_packages=@_;
+ no strict qw(vars refs);
+ walksymtable(\%{"main::"}, "savecv", sub {
+ my $package = shift;
+ $package =~ s/::$//;
+ return 0 if ($package =~ /::::/); # skip ::::ISA::CACHE etc.
+ #warn "Considering $package\n";#debug
+ return 1 if exists $search_pack{$package};
+ #sub try for a partial match
+ if (grep(/^$package\:\:/,@unused_sub_packages)){
+ return 1;
+ }
+ #warn " (nothing explicit)\n";#debug
+ # Omit the packages which we use (and which cause grief
+ # because of fancy "goto &$AUTOLOAD" stuff).
+ # XXX Surely there must be a nicer way to do this.
+ if ($package eq "FileHandle"
+ || $package eq "Config"
+ || $package eq "SelectSaver") {
+ return 0;
+ }
+ foreach my $u (keys %search_pack) {
+ if ($package =~ /^${u}::/) {
+ warn "$package starts with $u\n";
+ return 1
+ }
+ if ($package->isa($u)) {
+ warn "$package isa $u\n";
+ return 1
+ }
+ return 1 if $package->isa($u);
+ }
+ foreach my $m (qw(new DESTROY TIESCALAR TIEARRAY TIEHASH)) {
+ if (defined(&{$package."::$m"})) {
+ warn "$package has method $m: -u$package assumed\n";#debug
+ push @unused_sub_package, $package;
+ return 1;
+ }
+ }
+ return 0;
+ });
+}
+
+sub save_main {
+ warn "Walking tree\n";
+ my $curpad_nam = (comppadlist->ARRAY)[0]->save;
+ my $curpad_sym = (comppadlist->ARRAY)[1]->save;
+ my $init_av = init_av->save;
+ my $inc_hv = svref_2object(\%INC)->save;
+ my $inc_av = svref_2object(\@INC)->save;
+ walkoptree(main_root, "save");
+ warn "done main optree, walking symtable for extras\n" if $debug_cv;
+ save_unused_subs(@unused_sub_packages);
+
+ $init->add(sprintf("PL_main_root = s\\_%x;", ${main_root()}),
+ sprintf("PL_main_start = s\\_%x;", ${main_start()}),
+ "PL_curpad = AvARRAY($curpad_sym);",
+ "PL_initav = $init_av;",
+ "GvHV(PL_incgv) = $inc_hv;",
+ "GvAV(PL_incgv) = $inc_av;",
+ "av_store(CvPADLIST(PL_main_cv),0,SvREFCNT_inc($curpad_nam));",
+ "av_store(CvPADLIST(PL_main_cv),1,SvREFCNT_inc($curpad_sym));");
+ warn "Writing output\n";
+ output_boilerplate();
+ print "\n";
+ output_all("perl_init");
+ print "\n";
+ output_main();
+}
+
+sub init_sections {
+ my @sections = (init => \$init, decl => \$decl, sym => \$symsect,
+ binop => \$binopsect, condop => \$condopsect,
+ cop => \$copsect, cvop => \$cvopsect, gvop => \$gvopsect,
+ listop => \$listopsect, logop => \$logopsect,
+ loop => \$loopsect, op => \$opsect, pmop => \$pmopsect,
+ pvop => \$pvopsect, svop => \$svopsect, unop => \$unopsect,
+ sv => \$svsect, xpv => \$xpvsect, xpvav => \$xpvavsect,
+ xpvhv => \$xpvhvsect, xpvcv => \$xpvcvsect,
+ xpviv => \$xpvivsect, xpvnv => \$xpvnvsect,
+ xpvmg => \$xpvmgsect, xpvlv => \$xpvlvsect,
+ xrv => \$xrvsect, xpvbm => \$xpvbmsect,
+ xpvio => \$xpviosect, bootstrap => \$bootstrap);
+ my ($name, $sectref);
+ while (($name, $sectref) = splice(@sections, 0, 2)) {
+ $$sectref = new B::Section $name, \%symtable, 0;
+ }
+}
+
+sub compile {
+ my @options = @_;
+ my ($option, $opt, $arg);
+ OPTION:
+ while ($option = shift @options) {
+ if ($option =~ /^-(.)(.*)/) {
+ $opt = $1;
+ $arg = $2;
+ } else {
+ unshift @options, $option;
+ last OPTION;
+ }
+ if ($opt eq "-" && $arg eq "-") {
+ shift @options;
+ last OPTION;
+ }
+ if ($opt eq "w") {
+ $warn_undefined_syms = 1;
+ } elsif ($opt eq "D") {
+ $arg ||= shift @options;
+ foreach $arg (split(//, $arg)) {
+ if ($arg eq "o") {
+ B->debug(1);
+ } elsif ($arg eq "c") {
+ $debug_cops = 1;
+ } elsif ($arg eq "A") {
+ $debug_av = 1;
+ } elsif ($arg eq "C") {
+ $debug_cv = 1;
+ } elsif ($arg eq "M") {
+ $debug_mg = 1;
+ } else {
+ warn "ignoring unknown debug option: $arg\n";
+ }
+ }
+ } elsif ($opt eq "o") {
+ $arg ||= shift @options;
+ open(STDOUT, ">$arg") or return "$arg: $!\n";
+ } elsif ($opt eq "v") {
+ $verbose = 1;
+ } elsif ($opt eq "u") {
+ $arg ||= shift @options;
+ push(@unused_sub_packages, $arg);
+ } elsif ($opt eq "f") {
+ $arg ||= shift @options;
+ if ($arg eq "cog") {
+ $pv_copy_on_grow = 1;
+ } elsif ($arg eq "no-cog") {
+ $pv_copy_on_grow = 0;
+ }
+ } elsif ($opt eq "O") {
+ $arg = 1 if $arg eq "";
+ $pv_copy_on_grow = 0;
+ if ($arg >= 1) {
+ # Optimisations for -O1
+ $pv_copy_on_grow = 1;
+ }
+ }
+ }
+ init_sections();
+ if (@options) {
+ return sub {
+ my $objname;
+ foreach $objname (@options) {
+ eval "save_object(\\$objname)";
+ }
+ output_all();
+ }
+ } else {
+ return sub { save_main() };
+ }
+}
+
+1;
+
+__END__
+
+=head1 NAME
+
+B::C - Perl compiler's C backend
+
+=head1 SYNOPSIS
+
+ perl -MO=C[,OPTIONS] foo.pl
+
+=head1 DESCRIPTION
+
+This compiler backend takes Perl source and generates C source code
+corresponding to the internal structures that perl uses to run
+your program. When the generated C source is compiled and run, it
+cuts out the time which perl would have taken to load and parse
+your program into its internal semi-compiled form. That means that
+compiling with this backend will not help improve the runtime
+execution speed of your program but may improve the start-up time.
+Depending on the environment in which your program runs this may be
+either a help or a hindrance.
+
+=head1 OPTIONS
+
+If there are any non-option arguments, they are taken to be
+names of objects to be saved (probably doesn't work properly yet).
+Without extra arguments, it saves the main program.
+
+=over 4
+
+=item B<-ofilename>
+
+Output to filename instead of STDOUT
+
+=item B<-v>
+
+Verbose compilation (currently gives a few compilation statistics).
+
+=item B<-->
+
+Force end of options
+
+=item B<-uPackname>
+
+Force apparently unused subs from package Packname to be compiled.
+This allows programs to use eval "foo()" even when sub foo is never
+seen to be used at compile time. The down side is that any subs which
+really are never used also have code generated. This option is
+necessary, for example, if you have a signal handler foo which you
+initialise with C<$SIG{BAR} = "foo">. A better fix, though, is just
+to change it to C<$SIG{BAR} = \&foo>. You can have multiple B<-u>
+options. The compiler tries to figure out which packages may possibly
+have subs in which need compiling but the current version doesn't do
+it very well. In particular, it is confused by nested packages (i.e.
+of the form C<A::B>) where package C<A> does not contain any subs.
+
+=item B<-D>
+
+Debug options (concatenated or separate flags like C<perl -D>).
+
+=item B<-Do>
+
+OPs, prints each OP as it's processed
+
+=item B<-Dc>
+
+COPs, prints COPs as processed (incl. file & line num)
+
+=item B<-DA>
+
+prints AV information on saving
+
+=item B<-DC>
+
+prints CV information on saving
+
+=item B<-DM>
+
+prints MAGIC information on saving
+
+=item B<-f>
+
+Force optimisations on or off one at a time.
+
+=item B<-fcog>
+
+Copy-on-grow: PVs declared and initialised statically.
+
+=item B<-fno-cog>
+
+No copy-on-grow.
+
+=item B<-On>
+
+Optimisation level (n = 0, 1, 2, ...). B<-O> means B<-O1>. Currently,
+B<-O1> and higher set B<-fcog>.
+
+=head1 EXAMPLES
+
+ perl -MO=C,-ofoo.c foo.pl
+ perl cc_harness -o foo foo.c
+
+Note that C<cc_harness> lives in the C<B> subdirectory of your perl
+library directory. The utility called C<perlcc> may also be used to
+help make use of this compiler.
+
+ perl -MO=C,-v,-DcA bar.pl > /dev/null
+
+=head1 BUGS
+
+Plenty. Current status: experimental.
+
+=head1 AUTHOR
+
+Malcolm Beattie, C<mbeattie@sable.ox.ac.uk>
+
+=cut
diff --git a/gnu/usr.bin/perl/ext/B/B/CC.pm b/gnu/usr.bin/perl/ext/B/B/CC.pm
new file mode 100644
index 00000000000..d200d70f1ae
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/B/B/CC.pm
@@ -0,0 +1,1749 @@
+# CC.pm
+#
+# Copyright (c) 1996, 1997, 1998 Malcolm Beattie
+#
+# You may distribute under the terms of either the GNU General Public
+# License or the Artistic License, as specified in the README file.
+#
+package B::CC;
+use strict;
+use B qw(main_start main_root class comppadlist peekop svref_2object
+ timing_info);
+use B::C qw(save_unused_subs objsym init_sections
+ output_all output_boilerplate output_main);
+use B::Bblock qw(find_leaders);
+use B::Stackobj qw(:types :flags);
+
+# These should probably be elsewhere
+# Flags for $op->flags
+sub OPf_LIST () { 1 }
+sub OPf_KNOW () { 2 }
+sub OPf_MOD () { 32 }
+sub OPf_STACKED () { 64 }
+sub OPf_SPECIAL () { 128 }
+# op-specific flags for $op->private
+sub OPpASSIGN_BACKWARDS () { 64 }
+sub OPpLVAL_INTRO () { 128 }
+sub OPpDEREF_AV () { 32 }
+sub OPpDEREF_HV () { 64 }
+sub OPpDEREF () { OPpDEREF_AV|OPpDEREF_HV }
+sub OPpFLIP_LINENUM () { 64 }
+sub G_ARRAY () { 1 }
+# cop.h
+sub CXt_NULL () { 0 }
+sub CXt_SUB () { 1 }
+sub CXt_EVAL () { 2 }
+sub CXt_LOOP () { 3 }
+sub CXt_SUBST () { 4 }
+sub CXt_BLOCK () { 5 }
+
+my $module; # module name (when compiled with -m)
+my %done; # hash keyed by $$op of leaders of basic blocks
+ # which have already been done.
+my $leaders; # ref to hash of basic block leaders. Keys are $$op
+ # addresses, values are the $op objects themselves.
+my @bblock_todo; # list of leaders of basic blocks that need visiting
+ # sometime.
+my @cc_todo; # list of tuples defining what PP code needs to be
+ # saved (e.g. CV, main or PMOP repl code). Each tuple
+ # is [$name, $root, $start, @padlist]. PMOP repl code
+ # tuples inherit padlist.
+my @stack; # shadows perl's stack when contents are known.
+ # Values are objects derived from class B::Stackobj
+my @pad; # Lexicals in current pad as Stackobj-derived objects
+my @padlist; # Copy of current padlist so PMOP repl code can find it
+my @cxstack; # Shadows the (compile-time) cxstack for next,last,redo
+my $jmpbuf_ix = 0; # Next free index for dynamically allocated jmpbufs
+my %constobj; # OP_CONST constants as Stackobj-derived objects
+ # keyed by $$sv.
+my $need_freetmps = 0; # We may postpone FREETMPS to the end of each basic
+ # block or even to the end of each loop of blocks,
+ # depending on optimisation options.
+my $know_op = 0; # Set when C variable op already holds the right op
+ # (from an immediately preceding DOOP(ppname)).
+my $errors = 0; # Number of errors encountered
+my %skip_stack; # Hash of PP names which don't need write_back_stack
+my %skip_lexicals; # Hash of PP names which don't need write_back_lexicals
+my %skip_invalidate; # Hash of PP names which don't need invalidate_lexicals
+my %ignore_op; # Hash of ops which do nothing except returning op_next
+
+BEGIN {
+ foreach (qw(pp_scalar pp_regcmaybe pp_lineseq pp_scope pp_null)) {
+ $ignore_op{$_} = 1;
+ }
+}
+
+my @unused_sub_packages; # list of packages (given by -u options) to search
+ # explicitly and save every sub we find there, even
+ # if apparently unused (could be only referenced from
+ # an eval "" or from a $SIG{FOO} = "bar").
+
+my ($module_name);
+my ($debug_op, $debug_stack, $debug_cxstack, $debug_pad, $debug_runtime,
+ $debug_shadow, $debug_queue, $debug_lineno, $debug_timings);
+
+# Optimisation options. On the command line, use hyphens instead of
+# underscores for compatibility with gcc-style options. We use
+# underscores here because they are OK in (strict) barewords.
+my ($freetmps_each_bblock, $freetmps_each_loop, $omit_taint);
+my %optimise = (freetmps_each_bblock => \$freetmps_each_bblock,
+ freetmps_each_loop => \$freetmps_each_loop,
+ omit_taint => \$omit_taint);
+# perl patchlevel to generate code for (defaults to current patchlevel)
+my $patchlevel = int(0.5 + 1000 * ($] - 5));
+
+# Could rewrite push_runtime() and output_runtime() to use a
+# temporary file if memory is at a premium.
+my $ppname; # name of current fake PP function
+my $runtime_list_ref;
+my $declare_ref; # Hash ref keyed by C variable type of declarations.
+
+my @pp_list; # list of [$ppname, $runtime_list_ref, $declare_ref]
+ # tuples to be written out.
+
+my ($init, $decl);
+
+sub init_hash { map { $_ => 1 } @_ }
+
+#
+# Initialise the hashes for the default PP functions where we can avoid
+# either write_back_stack, write_back_lexicals or invalidate_lexicals.
+#
+%skip_lexicals = init_hash qw(pp_enter pp_enterloop);
+%skip_invalidate = init_hash qw(pp_enter pp_enterloop);
+
+sub debug {
+ if ($debug_runtime) {
+ warn(@_);
+ } else {
+ runtime(map { chomp; "/* $_ */"} @_);
+ }
+}
+
+sub declare {
+ my ($type, $var) = @_;
+ push(@{$declare_ref->{$type}}, $var);
+}
+
+sub push_runtime {
+ push(@$runtime_list_ref, @_);
+ warn join("\n", @_) . "\n" if $debug_runtime;
+}
+
+sub save_runtime {
+ push(@pp_list, [$ppname, $runtime_list_ref, $declare_ref]);
+}
+
+sub output_runtime {
+ my $ppdata;
+ print qq(#include "cc_runtime.h"\n);
+ foreach $ppdata (@pp_list) {
+ my ($name, $runtime, $declare) = @$ppdata;
+ print "\nstatic\nPP($name)\n{\n";
+ my ($type, $varlist, $line);
+ while (($type, $varlist) = each %$declare) {
+ print "\t$type ", join(", ", @$varlist), ";\n";
+ }
+ foreach $line (@$runtime) {
+ print $line, "\n";
+ }
+ print "}\n";
+ }
+}
+
+sub runtime {
+ my $line;
+ foreach $line (@_) {
+ push_runtime("\t$line");
+ }
+}
+
+sub init_pp {
+ $ppname = shift;
+ $runtime_list_ref = [];
+ $declare_ref = {};
+ runtime("djSP;");
+ declare("I32", "oldsave");
+ declare("SV", "**svp");
+ map { declare("SV", "*$_") } qw(sv src dst left right);
+ declare("MAGIC", "*mg");
+ $decl->add("static OP * $ppname _((ARGSproto));");
+ debug "init_pp: $ppname\n" if $debug_queue;
+}
+
+# Initialise runtime_callback function for Stackobj class
+BEGIN { B::Stackobj::set_callback(\&runtime) }
+
+# Initialise saveoptree_callback for B::C class
+sub cc_queue {
+ my ($name, $root, $start, @pl) = @_;
+ debug "cc_queue: name $name, root $root, start $start, padlist (@pl)\n"
+ if $debug_queue;
+ if ($name eq "*ignore*") {
+ $name = 0;
+ } else {
+ push(@cc_todo, [$name, $root, $start, (@pl ? @pl : @padlist)]);
+ }
+ my $fakeop = new B::FAKEOP ("next" => 0, sibling => 0, ppaddr => $name);
+ $start = $fakeop->save;
+ debug "cc_queue: name $name returns $start\n" if $debug_queue;
+ return $start;
+}
+BEGIN { B::C::set_callback(\&cc_queue) }
+
+sub valid_int { $_[0]->{flags} & VALID_INT }
+sub valid_double { $_[0]->{flags} & VALID_DOUBLE }
+sub valid_numeric { $_[0]->{flags} & (VALID_INT | VALID_DOUBLE) }
+sub valid_sv { $_[0]->{flags} & VALID_SV }
+
+sub top_int { @stack ? $stack[-1]->as_int : "TOPi" }
+sub top_double { @stack ? $stack[-1]->as_double : "TOPn" }
+sub top_numeric { @stack ? $stack[-1]->as_numeric : "TOPn" }
+sub top_sv { @stack ? $stack[-1]->as_sv : "TOPs" }
+sub top_bool { @stack ? $stack[-1]->as_numeric : "SvTRUE(TOPs)" }
+
+sub pop_int { @stack ? (pop @stack)->as_int : "POPi" }
+sub pop_double { @stack ? (pop @stack)->as_double : "POPn" }
+sub pop_numeric { @stack ? (pop @stack)->as_numeric : "POPn" }
+sub pop_sv { @stack ? (pop @stack)->as_sv : "POPs" }
+sub pop_bool {
+ if (@stack) {
+ return ((pop @stack)->as_numeric);
+ } else {
+ # Careful: POPs has an auto-decrement and SvTRUE evaluates
+ # its argument more than once.
+ runtime("sv = POPs;");
+ return "SvTRUE(sv)";
+ }
+}
+
+sub write_back_lexicals {
+ my $avoid = shift || 0;
+ debug "write_back_lexicals($avoid) called from @{[(caller(1))[3]]}\n"
+ if $debug_shadow;
+ my $lex;
+ foreach $lex (@pad) {
+ next unless ref($lex);
+ $lex->write_back unless $lex->{flags} & $avoid;
+ }
+}
+
+sub write_back_stack {
+ my $obj;
+ return unless @stack;
+ runtime(sprintf("EXTEND(sp, %d);", scalar(@stack)));
+ foreach $obj (@stack) {
+ runtime(sprintf("PUSHs((SV*)%s);", $obj->as_sv));
+ }
+ @stack = ();
+}
+
+sub invalidate_lexicals {
+ my $avoid = shift || 0;
+ debug "invalidate_lexicals($avoid) called from @{[(caller(1))[3]]}\n"
+ if $debug_shadow;
+ my $lex;
+ foreach $lex (@pad) {
+ next unless ref($lex);
+ $lex->invalidate unless $lex->{flags} & $avoid;
+ }
+}
+
+sub reload_lexicals {
+ my $lex;
+ foreach $lex (@pad) {
+ next unless ref($lex);
+ my $type = $lex->{type};
+ if ($type == T_INT) {
+ $lex->as_int;
+ } elsif ($type == T_DOUBLE) {
+ $lex->as_double;
+ } else {
+ $lex->as_sv;
+ }
+ }
+}
+
+{
+ package B::Pseudoreg;
+ #
+ # This class allocates pseudo-registers (OK, so they're C variables).
+ #
+ my %alloc; # Keyed by variable name. A value of 1 means the
+ # variable has been declared. A value of 2 means
+ # it's in use.
+
+ sub new_scope { %alloc = () }
+
+ sub new ($$$) {
+ my ($class, $type, $prefix) = @_;
+ my ($ptr, $i, $varname, $status, $obj);
+ $prefix =~ s/^(\**)//;
+ $ptr = $1;
+ $i = 0;
+ do {
+ $varname = "$prefix$i";
+ $status = $alloc{$varname};
+ } while $status == 2;
+ if ($status != 1) {
+ # Not declared yet
+ B::CC::declare($type, "$ptr$varname");
+ $alloc{$varname} = 2; # declared and in use
+ }
+ $obj = bless \$varname, $class;
+ return $obj;
+ }
+ sub DESTROY {
+ my $obj = shift;
+ $alloc{$$obj} = 1; # no longer in use but still declared
+ }
+}
+{
+ package B::Shadow;
+ #
+ # This class gives a standard API for a perl object to shadow a
+ # C variable and only generate reloads/write-backs when necessary.
+ #
+ # Use $obj->load($foo) instead of runtime("shadowed_c_var = foo").
+ # Use $obj->write_back whenever shadowed_c_var needs to be up to date.
+ # Use $obj->invalidate whenever an unknown function may have
+ # set shadow itself.
+
+ sub new {
+ my ($class, $write_back) = @_;
+ # Object fields are perl shadow variable, validity flag
+ # (for *C* variable) and callback sub for write_back
+ # (passed perl shadow variable as argument).
+ bless [undef, 1, $write_back], $class;
+ }
+ sub load {
+ my ($obj, $newval) = @_;
+ $obj->[1] = 0; # C variable no longer valid
+ $obj->[0] = $newval;
+ }
+ sub write_back {
+ my $obj = shift;
+ if (!($obj->[1])) {
+ $obj->[1] = 1; # C variable will now be valid
+ &{$obj->[2]}($obj->[0]);
+ }
+ }
+ sub invalidate { $_[0]->[1] = 0 } # force C variable to be invalid
+}
+my $curcop = new B::Shadow (sub {
+ my $opsym = shift->save;
+ runtime("PL_curcop = (COP*)$opsym;");
+});
+
+#
+# Context stack shadowing. Mimics stuff in pp_ctl.c, cop.h and so on.
+#
+sub dopoptoloop {
+ my $cxix = $#cxstack;
+ while ($cxix >= 0 && $cxstack[$cxix]->{type} != CXt_LOOP) {
+ $cxix--;
+ }
+ debug "dopoptoloop: returning $cxix" if $debug_cxstack;
+ return $cxix;
+}
+
+sub dopoptolabel {
+ my $label = shift;
+ my $cxix = $#cxstack;
+ while ($cxix >= 0 && $cxstack[$cxix]->{type} != CXt_LOOP
+ && $cxstack[$cxix]->{label} ne $label) {
+ $cxix--;
+ }
+ debug "dopoptolabel: returning $cxix" if $debug_cxstack;
+ return $cxix;
+}
+
+sub error {
+ my $format = shift;
+ my $file = $curcop->[0]->filegv->SV->PV;
+ my $line = $curcop->[0]->line;
+ $errors++;
+ if (@_) {
+ warn sprintf("%s:%d: $format\n", $file, $line, @_);
+ } else {
+ warn sprintf("%s:%d: %s\n", $file, $line, $format);
+ }
+}
+
+#
+# Load pad takes (the elements of) a PADLIST as arguments and loads
+# up @pad with Stackobj-derived objects which represent those lexicals.
+# If/when perl itself can generate type information (my int $foo) then
+# we'll take advantage of that here. Until then, we'll use various hacks
+# to tell the compiler when we want a lexical to be a particular type
+# or to be a register.
+#
+sub load_pad {
+ my ($namelistav, $valuelistav) = @_;
+ @padlist = @_;
+ my @namelist = $namelistav->ARRAY;
+ my @valuelist = $valuelistav->ARRAY;
+ my $ix;
+ @pad = ();
+ debug "load_pad: $#namelist names, $#valuelist values\n" if $debug_pad;
+ # Temporary lexicals don't get named so it's possible for @valuelist
+ # to be strictly longer than @namelist. We count $ix up to the end of
+ # @valuelist but index into @namelist for the name. Any temporaries which
+ # run off the end of @namelist will make $namesv undefined and we treat
+ # that the same as having an explicit SPECIAL sv_undef object in @namelist.
+ # [XXX If/when @_ becomes a lexical, we must start at 0 here.]
+ for ($ix = 1; $ix < @valuelist; $ix++) {
+ my $namesv = $namelist[$ix];
+ my $type = T_UNKNOWN;
+ my $flags = 0;
+ my $name = "tmp$ix";
+ my $class = class($namesv);
+ if (!defined($namesv) || $class eq "SPECIAL") {
+ # temporaries have &PL_sv_undef instead of a PVNV for a name
+ $flags = VALID_SV|TEMPORARY|REGISTER;
+ } else {
+ if ($namesv->PV =~ /^\$(.*)_([di])(r?)$/) {
+ $name = $1;
+ if ($2 eq "i") {
+ $type = T_INT;
+ $flags = VALID_SV|VALID_INT;
+ } elsif ($2 eq "d") {
+ $type = T_DOUBLE;
+ $flags = VALID_SV|VALID_DOUBLE;
+ }
+ $flags |= REGISTER if $3;
+ }
+ }
+ $pad[$ix] = new B::Stackobj::Padsv ($type, $flags, $ix,
+ "i_$name", "d_$name");
+ declare("IV", $type == T_INT ? "i_$name = 0" : "i_$name");
+ declare("double", $type == T_DOUBLE ? "d_$name = 0" : "d_$name");
+ debug sprintf("PL_curpad[$ix] = %s\n", $pad[$ix]->peek) if $debug_pad;
+ }
+}
+
+#
+# Debugging stuff
+#
+sub peek_stack { sprintf "stack = %s\n", join(" ", map($_->minipeek, @stack)) }
+
+#
+# OP stuff
+#
+
+sub label {
+ my $op = shift;
+ # XXX Preserve original label name for "real" labels?
+ return sprintf("lab_%x", $$op);
+}
+
+sub write_label {
+ my $op = shift;
+ push_runtime(sprintf(" %s:", label($op)));
+}
+
+sub loadop {
+ my $op = shift;
+ my $opsym = $op->save;
+ runtime("PL_op = $opsym;") unless $know_op;
+ return $opsym;
+}
+
+sub doop {
+ my $op = shift;
+ my $ppname = $op->ppaddr;
+ my $sym = loadop($op);
+ runtime("DOOP($ppname);");
+ $know_op = 1;
+ return $sym;
+}
+
+sub gimme {
+ my $op = shift;
+ my $flags = $op->flags;
+ return (($flags & OPf_KNOW) ? ($flags & OPf_LIST) : "dowantarray()");
+}
+
+#
+# Code generation for PP code
+#
+
+sub pp_null {
+ my $op = shift;
+ return $op->next;
+}
+
+sub pp_stub {
+ my $op = shift;
+ my $gimme = gimme($op);
+ if ($gimme != 1) {
+ # XXX Change to push a constant sv_undef Stackobj onto @stack
+ write_back_stack();
+ runtime("if ($gimme != G_ARRAY) XPUSHs(&PL_sv_undef);");
+ }
+ return $op->next;
+}
+
+sub pp_unstack {
+ my $op = shift;
+ @stack = ();
+ runtime("PP_UNSTACK;");
+ return $op->next;
+}
+
+sub pp_and {
+ my $op = shift;
+ my $next = $op->next;
+ reload_lexicals();
+ unshift(@bblock_todo, $next);
+ if (@stack >= 1) {
+ my $bool = pop_bool();
+ write_back_stack();
+ runtime(sprintf("if (!$bool) goto %s;", label($next)));
+ } else {
+ runtime(sprintf("if (!%s) goto %s;", top_bool(), label($next)),
+ "*sp--;");
+ }
+ return $op->other;
+}
+
+sub pp_or {
+ my $op = shift;
+ my $next = $op->next;
+ reload_lexicals();
+ unshift(@bblock_todo, $next);
+ if (@stack >= 1) {
+ my $obj = pop @stack;
+ write_back_stack();
+ runtime(sprintf("if (%s) { XPUSHs(%s); goto %s; }",
+ $obj->as_numeric, $obj->as_sv, label($next)));
+ } else {
+ runtime(sprintf("if (%s) goto %s;", top_bool(), label($next)),
+ "*sp--;");
+ }
+ return $op->other;
+}
+
+sub pp_cond_expr {
+ my $op = shift;
+ my $false = $op->false;
+ unshift(@bblock_todo, $false);
+ reload_lexicals();
+ my $bool = pop_bool();
+ write_back_stack();
+ runtime(sprintf("if (!$bool) goto %s;", label($false)));
+ return $op->true;
+}
+
+sub pp_padsv {
+ my $op = shift;
+ my $ix = $op->targ;
+ push(@stack, $pad[$ix]);
+ if ($op->flags & OPf_MOD) {
+ my $private = $op->private;
+ if ($private & OPpLVAL_INTRO) {
+ runtime("SAVECLEARSV(PL_curpad[$ix]);");
+ } elsif ($private & OPpDEREF) {
+ runtime(sprintf("vivify_ref(PL_curpad[%d], %d);",
+ $ix, $private & OPpDEREF));
+ $pad[$ix]->invalidate;
+ }
+ }
+ return $op->next;
+}
+
+sub pp_const {
+ my $op = shift;
+ my $sv = $op->sv;
+ my $obj = $constobj{$$sv};
+ if (!defined($obj)) {
+ $obj = $constobj{$$sv} = new B::Stackobj::Const ($sv);
+ }
+ push(@stack, $obj);
+ return $op->next;
+}
+
+sub pp_nextstate {
+ my $op = shift;
+ $curcop->load($op);
+ @stack = ();
+ debug(sprintf("%s:%d\n", $op->filegv->SV->PV, $op->line)) if $debug_lineno;
+ runtime("TAINT_NOT;") unless $omit_taint;
+ runtime("sp = PL_stack_base + cxstack[cxstack_ix].blk_oldsp;");
+ if ($freetmps_each_bblock || $freetmps_each_loop) {
+ $need_freetmps = 1;
+ } else {
+ runtime("FREETMPS;");
+ }
+ return $op->next;
+}
+
+sub pp_dbstate {
+ my $op = shift;
+ $curcop->invalidate; # XXX?
+ return default_pp($op);
+}
+
+sub pp_rv2gv { $curcop->write_back; default_pp(@_) }
+sub pp_bless { $curcop->write_back; default_pp(@_) }
+sub pp_repeat { $curcop->write_back; default_pp(@_) }
+# The following subs need $curcop->write_back if we decide to support arybase:
+# pp_pos, pp_substr, pp_index, pp_rindex, pp_aslice, pp_lslice, pp_splice
+sub pp_sort { $curcop->write_back; default_pp(@_) }
+sub pp_caller { $curcop->write_back; default_pp(@_) }
+sub pp_reset { $curcop->write_back; default_pp(@_) }
+
+sub pp_gv {
+ my $op = shift;
+ my $gvsym = $op->gv->save;
+ write_back_stack();
+ runtime("XPUSHs((SV*)$gvsym);");
+ return $op->next;
+}
+
+sub pp_gvsv {
+ my $op = shift;
+ my $gvsym = $op->gv->save;
+ write_back_stack();
+ if ($op->private & OPpLVAL_INTRO) {
+ runtime("XPUSHs(save_scalar($gvsym));");
+ } else {
+ runtime("XPUSHs(GvSV($gvsym));");
+ }
+ return $op->next;
+}
+
+sub pp_aelemfast {
+ my $op = shift;
+ my $gvsym = $op->gv->save;
+ my $ix = $op->private;
+ my $flag = $op->flags & OPf_MOD;
+ write_back_stack();
+ runtime("svp = av_fetch(GvAV($gvsym), $ix, $flag);",
+ "PUSHs(svp ? *svp : &PL_sv_undef);");
+ return $op->next;
+}
+
+sub int_binop {
+ my ($op, $operator) = @_;
+ if ($op->flags & OPf_STACKED) {
+ my $right = pop_int();
+ if (@stack >= 1) {
+ my $left = top_int();
+ $stack[-1]->set_int(&$operator($left, $right));
+ } else {
+ runtime(sprintf("sv_setiv(TOPs, %s);",&$operator("TOPi", $right)));
+ }
+ } else {
+ my $targ = $pad[$op->targ];
+ my $right = new B::Pseudoreg ("IV", "riv");
+ my $left = new B::Pseudoreg ("IV", "liv");
+ runtime(sprintf("$$right = %s; $$left = %s;", pop_int(), pop_int));
+ $targ->set_int(&$operator($$left, $$right));
+ push(@stack, $targ);
+ }
+ return $op->next;
+}
+
+sub INTS_CLOSED () { 0x1 }
+sub INT_RESULT () { 0x2 }
+sub NUMERIC_RESULT () { 0x4 }
+
+sub numeric_binop {
+ my ($op, $operator, $flags) = @_;
+ my $force_int = 0;
+ $force_int ||= ($flags & INT_RESULT);
+ $force_int ||= ($flags & INTS_CLOSED && @stack >= 2
+ && valid_int($stack[-2]) && valid_int($stack[-1]));
+ if ($op->flags & OPf_STACKED) {
+ my $right = pop_numeric();
+ if (@stack >= 1) {
+ my $left = top_numeric();
+ if ($force_int) {
+ $stack[-1]->set_int(&$operator($left, $right));
+ } else {
+ $stack[-1]->set_numeric(&$operator($left, $right));
+ }
+ } else {
+ if ($force_int) {
+ runtime(sprintf("sv_setiv(TOPs, %s);",
+ &$operator("TOPi", $right)));
+ } else {
+ runtime(sprintf("sv_setnv(TOPs, %s);",
+ &$operator("TOPn", $right)));
+ }
+ }
+ } else {
+ my $targ = $pad[$op->targ];
+ $force_int ||= ($targ->{type} == T_INT);
+ if ($force_int) {
+ my $right = new B::Pseudoreg ("IV", "riv");
+ my $left = new B::Pseudoreg ("IV", "liv");
+ runtime(sprintf("$$right = %s; $$left = %s;",
+ pop_numeric(), pop_numeric));
+ $targ->set_int(&$operator($$left, $$right));
+ } else {
+ my $right = new B::Pseudoreg ("double", "rnv");
+ my $left = new B::Pseudoreg ("double", "lnv");
+ runtime(sprintf("$$right = %s; $$left = %s;",
+ pop_numeric(), pop_numeric));
+ $targ->set_numeric(&$operator($$left, $$right));
+ }
+ push(@stack, $targ);
+ }
+ return $op->next;
+}
+
+sub sv_binop {
+ my ($op, $operator, $flags) = @_;
+ if ($op->flags & OPf_STACKED) {
+ my $right = pop_sv();
+ if (@stack >= 1) {
+ my $left = top_sv();
+ if ($flags & INT_RESULT) {
+ $stack[-1]->set_int(&$operator($left, $right));
+ } elsif ($flags & NUMERIC_RESULT) {
+ $stack[-1]->set_numeric(&$operator($left, $right));
+ } else {
+ # XXX Does this work?
+ runtime(sprintf("sv_setsv($left, %s);",
+ &$operator($left, $right)));
+ $stack[-1]->invalidate;
+ }
+ } else {
+ my $f;
+ if ($flags & INT_RESULT) {
+ $f = "sv_setiv";
+ } elsif ($flags & NUMERIC_RESULT) {
+ $f = "sv_setnv";
+ } else {
+ $f = "sv_setsv";
+ }
+ runtime(sprintf("%s(TOPs, %s);", $f, &$operator("TOPs", $right)));
+ }
+ } else {
+ my $targ = $pad[$op->targ];
+ runtime(sprintf("right = %s; left = %s;", pop_sv(), pop_sv));
+ if ($flags & INT_RESULT) {
+ $targ->set_int(&$operator("left", "right"));
+ } elsif ($flags & NUMERIC_RESULT) {
+ $targ->set_numeric(&$operator("left", "right"));
+ } else {
+ # XXX Does this work?
+ runtime(sprintf("sv_setsv(%s, %s);",
+ $targ->as_sv, &$operator("left", "right")));
+ $targ->invalidate;
+ }
+ push(@stack, $targ);
+ }
+ return $op->next;
+}
+
+sub bool_int_binop {
+ my ($op, $operator) = @_;
+ my $right = new B::Pseudoreg ("IV", "riv");
+ my $left = new B::Pseudoreg ("IV", "liv");
+ runtime(sprintf("$$right = %s; $$left = %s;", pop_int(), pop_int()));
+ my $bool = new B::Stackobj::Bool (new B::Pseudoreg ("int", "b"));
+ $bool->set_int(&$operator($$left, $$right));
+ push(@stack, $bool);
+ return $op->next;
+}
+
+sub bool_numeric_binop {
+ my ($op, $operator) = @_;
+ my $right = new B::Pseudoreg ("double", "rnv");
+ my $left = new B::Pseudoreg ("double", "lnv");
+ runtime(sprintf("$$right = %s; $$left = %s;",
+ pop_numeric(), pop_numeric()));
+ my $bool = new B::Stackobj::Bool (new B::Pseudoreg ("int", "b"));
+ $bool->set_numeric(&$operator($$left, $$right));
+ push(@stack, $bool);
+ return $op->next;
+}
+
+sub bool_sv_binop {
+ my ($op, $operator) = @_;
+ runtime(sprintf("right = %s; left = %s;", pop_sv(), pop_sv()));
+ my $bool = new B::Stackobj::Bool (new B::Pseudoreg ("int", "b"));
+ $bool->set_numeric(&$operator("left", "right"));
+ push(@stack, $bool);
+ return $op->next;
+}
+
+sub infix_op {
+ my $opname = shift;
+ return sub { "$_[0] $opname $_[1]" }
+}
+
+sub prefix_op {
+ my $opname = shift;
+ return sub { sprintf("%s(%s)", $opname, join(", ", @_)) }
+}
+
+BEGIN {
+ my $plus_op = infix_op("+");
+ my $minus_op = infix_op("-");
+ my $multiply_op = infix_op("*");
+ my $divide_op = infix_op("/");
+ my $modulo_op = infix_op("%");
+ my $lshift_op = infix_op("<<");
+ my $rshift_op = infix_op(">>");
+ my $ncmp_op = sub { "($_[0] > $_[1] ? 1 : ($_[0] < $_[1]) ? -1 : 0)" };
+ my $scmp_op = prefix_op("sv_cmp");
+ my $seq_op = prefix_op("sv_eq");
+ my $sne_op = prefix_op("!sv_eq");
+ my $slt_op = sub { "sv_cmp($_[0], $_[1]) < 0" };
+ my $sgt_op = sub { "sv_cmp($_[0], $_[1]) > 0" };
+ my $sle_op = sub { "sv_cmp($_[0], $_[1]) <= 0" };
+ my $sge_op = sub { "sv_cmp($_[0], $_[1]) >= 0" };
+ my $eq_op = infix_op("==");
+ my $ne_op = infix_op("!=");
+ my $lt_op = infix_op("<");
+ my $gt_op = infix_op(">");
+ my $le_op = infix_op("<=");
+ my $ge_op = infix_op(">=");
+
+ #
+ # XXX The standard perl PP code has extra handling for
+ # some special case arguments of these operators.
+ #
+ sub pp_add { numeric_binop($_[0], $plus_op, INTS_CLOSED) }
+ sub pp_subtract { numeric_binop($_[0], $minus_op, INTS_CLOSED) }
+ sub pp_multiply { numeric_binop($_[0], $multiply_op, INTS_CLOSED) }
+ sub pp_divide { numeric_binop($_[0], $divide_op) }
+ sub pp_modulo { int_binop($_[0], $modulo_op) } # differs from perl's
+ sub pp_ncmp { numeric_binop($_[0], $ncmp_op, INT_RESULT) }
+
+ sub pp_left_shift { int_binop($_[0], $lshift_op) }
+ sub pp_right_shift { int_binop($_[0], $rshift_op) }
+ sub pp_i_add { int_binop($_[0], $plus_op) }
+ sub pp_i_subtract { int_binop($_[0], $minus_op) }
+ sub pp_i_multiply { int_binop($_[0], $multiply_op) }
+ sub pp_i_divide { int_binop($_[0], $divide_op) }
+ sub pp_i_modulo { int_binop($_[0], $modulo_op) }
+
+ sub pp_eq { bool_numeric_binop($_[0], $eq_op) }
+ sub pp_ne { bool_numeric_binop($_[0], $ne_op) }
+ sub pp_lt { bool_numeric_binop($_[0], $lt_op) }
+ sub pp_gt { bool_numeric_binop($_[0], $gt_op) }
+ sub pp_le { bool_numeric_binop($_[0], $le_op) }
+ sub pp_ge { bool_numeric_binop($_[0], $ge_op) }
+
+ sub pp_i_eq { bool_int_binop($_[0], $eq_op) }
+ sub pp_i_ne { bool_int_binop($_[0], $ne_op) }
+ sub pp_i_lt { bool_int_binop($_[0], $lt_op) }
+ sub pp_i_gt { bool_int_binop($_[0], $gt_op) }
+ sub pp_i_le { bool_int_binop($_[0], $le_op) }
+ sub pp_i_ge { bool_int_binop($_[0], $ge_op) }
+
+ sub pp_scmp { sv_binop($_[0], $scmp_op, INT_RESULT) }
+ sub pp_slt { bool_sv_binop($_[0], $slt_op) }
+ sub pp_sgt { bool_sv_binop($_[0], $sgt_op) }
+ sub pp_sle { bool_sv_binop($_[0], $sle_op) }
+ sub pp_sge { bool_sv_binop($_[0], $sge_op) }
+ sub pp_seq { bool_sv_binop($_[0], $seq_op) }
+ sub pp_sne { bool_sv_binop($_[0], $sne_op) }
+}
+
+
+sub pp_sassign {
+ my $op = shift;
+ my $backwards = $op->private & OPpASSIGN_BACKWARDS;
+ my ($dst, $src);
+ if (@stack >= 2) {
+ $dst = pop @stack;
+ $src = pop @stack;
+ ($src, $dst) = ($dst, $src) if $backwards;
+ my $type = $src->{type};
+ if ($type == T_INT) {
+ $dst->set_int($src->as_int);
+ } elsif ($type == T_DOUBLE) {
+ $dst->set_numeric($src->as_numeric);
+ } else {
+ $dst->set_sv($src->as_sv);
+ }
+ push(@stack, $dst);
+ } elsif (@stack == 1) {
+ if ($backwards) {
+ my $src = pop @stack;
+ my $type = $src->{type};
+ runtime("if (PL_tainting && PL_tainted) TAINT_NOT;");
+ if ($type == T_INT) {
+ runtime sprintf("sv_setiv(TOPs, %s);", $src->as_int);
+ } elsif ($type == T_DOUBLE) {
+ runtime sprintf("sv_setnv(TOPs, %s);", $src->as_double);
+ } else {
+ runtime sprintf("sv_setsv(TOPs, %s);", $src->as_sv);
+ }
+ runtime("SvSETMAGIC(TOPs);");
+ } else {
+ my $dst = $stack[-1];
+ my $type = $dst->{type};
+ runtime("sv = POPs;");
+ runtime("MAYBE_TAINT_SASSIGN_SRC(sv);");
+ if ($type == T_INT) {
+ $dst->set_int("SvIV(sv)");
+ } elsif ($type == T_DOUBLE) {
+ $dst->set_double("SvNV(sv)");
+ } else {
+ runtime("SvSetSV($dst->{sv}, sv);");
+ $dst->invalidate;
+ }
+ }
+ } else {
+ if ($backwards) {
+ runtime("src = POPs; dst = TOPs;");
+ } else {
+ runtime("dst = POPs; src = TOPs;");
+ }
+ runtime("MAYBE_TAINT_SASSIGN_SRC(src);",
+ "SvSetSV(dst, src);",
+ "SvSETMAGIC(dst);",
+ "SETs(dst);");
+ }
+ return $op->next;
+}
+
+sub pp_preinc {
+ my $op = shift;
+ if (@stack >= 1) {
+ my $obj = $stack[-1];
+ my $type = $obj->{type};
+ if ($type == T_INT || $type == T_DOUBLE) {
+ $obj->set_int($obj->as_int . " + 1");
+ } else {
+ runtime sprintf("PP_PREINC(%s);", $obj->as_sv);
+ $obj->invalidate();
+ }
+ } else {
+ runtime sprintf("PP_PREINC(TOPs);");
+ }
+ return $op->next;
+}
+
+sub pp_pushmark {
+ my $op = shift;
+ write_back_stack();
+ runtime("PUSHMARK(sp);");
+ return $op->next;
+}
+
+sub pp_list {
+ my $op = shift;
+ write_back_stack();
+ my $gimme = gimme($op);
+ if ($gimme == 1) { # sic
+ runtime("POPMARK;"); # need this even though not a "full" pp_list
+ } else {
+ runtime("PP_LIST($gimme);");
+ }
+ return $op->next;
+}
+
+sub pp_entersub {
+ my $op = shift;
+ write_back_lexicals(REGISTER|TEMPORARY);
+ write_back_stack();
+ my $sym = doop($op);
+ runtime("while (PL_op != ($sym)->op_next && PL_op != (OP*)0 ){");
+ runtime("PL_op = (*PL_op->op_ppaddr)(ARGS);");
+ runtime("SPAGAIN;}");
+ $know_op = 0;
+ invalidate_lexicals(REGISTER|TEMPORARY);
+ return $op->next;
+}
+
+sub pp_goto{
+
+ my $op = shift;
+ my $ppname = $op->ppaddr;
+ write_back_lexicals() unless $skip_lexicals{$ppname};
+ write_back_stack() unless $skip_stack{$ppname};
+ my $sym=doop($op);
+ runtime("if (PL_op != ($sym)->op_next && PL_op != (OP*)0){return PL_op;}");
+ invalidate_lexicals() unless $skip_invalidate{$ppname};
+ return $op->next;
+}
+sub pp_enterwrite {
+ my $op = shift;
+ pp_entersub($op);
+}
+
+sub pp_leavewrite {
+ my $op = shift;
+ write_back_lexicals(REGISTER|TEMPORARY);
+ write_back_stack();
+ my $sym = doop($op);
+ # XXX Is this the right way to distinguish between it returning
+ # CvSTART(cv) (via doform) and pop_return()?
+ runtime("if (PL_op) PL_op = (*PL_op->op_ppaddr)(ARGS);");
+ runtime("SPAGAIN;");
+ $know_op = 0;
+ invalidate_lexicals(REGISTER|TEMPORARY);
+ return $op->next;
+}
+
+sub doeval {
+ my $op = shift;
+ $curcop->write_back;
+ write_back_lexicals(REGISTER|TEMPORARY);
+ write_back_stack();
+ my $sym = loadop($op);
+ my $ppaddr = $op->ppaddr;
+ runtime("PP_EVAL($ppaddr, ($sym)->op_next);");
+ $know_op = 1;
+ invalidate_lexicals(REGISTER|TEMPORARY);
+ return $op->next;
+}
+
+sub pp_entereval { doeval(@_) }
+sub pp_require { doeval(@_) }
+sub pp_dofile { doeval(@_) }
+
+sub pp_entertry {
+ my $op = shift;
+ $curcop->write_back;
+ write_back_lexicals(REGISTER|TEMPORARY);
+ write_back_stack();
+ my $sym = doop($op);
+ my $jmpbuf = sprintf("jmpbuf%d", $jmpbuf_ix++);
+ declare("Sigjmp_buf", $jmpbuf);
+ runtime(sprintf("PP_ENTERTRY(%s,%s);", $jmpbuf, label($op->other->next)));
+ invalidate_lexicals(REGISTER|TEMPORARY);
+ return $op->next;
+}
+
+sub pp_grepstart {
+ my $op = shift;
+ if ($need_freetmps && $freetmps_each_loop) {
+ runtime("FREETMPS;"); # otherwise the grepwhile loop messes things up
+ $need_freetmps = 0;
+ }
+ write_back_stack();
+ doop($op);
+ return $op->next->other;
+}
+
+sub pp_mapstart {
+ my $op = shift;
+ if ($need_freetmps && $freetmps_each_loop) {
+ runtime("FREETMPS;"); # otherwise the mapwhile loop messes things up
+ $need_freetmps = 0;
+ }
+ write_back_stack();
+ doop($op);
+ return $op->next->other;
+}
+
+sub pp_grepwhile {
+ my $op = shift;
+ my $next = $op->next;
+ unshift(@bblock_todo, $next);
+ write_back_lexicals();
+ write_back_stack();
+ my $sym = doop($op);
+ # pp_grepwhile can return either op_next or op_other and we need to
+ # be able to distinguish the two at runtime. Since it's possible for
+ # both ops to be "inlined", the fields could both be zero. To get
+ # around that, we hack op_next to be our own op (purely because we
+ # know it's a non-NULL pointer and can't be the same as op_other).
+ $init->add("((LOGOP*)$sym)->op_next = $sym;");
+ runtime(sprintf("if (PL_op == ($sym)->op_next) goto %s;", label($next)));
+ $know_op = 0;
+ return $op->other;
+}
+
+sub pp_mapwhile {
+ pp_grepwhile(@_);
+}
+
+sub pp_return {
+ my $op = shift;
+ write_back_lexicals(REGISTER|TEMPORARY);
+ write_back_stack();
+ doop($op);
+ runtime("PUTBACK;", "return (PL_op)?PL_op->op_next:0;");
+ $know_op = 0;
+ return $op->next;
+}
+
+sub nyi {
+ my $op = shift;
+ warn sprintf("%s not yet implemented properly\n", $op->ppaddr);
+ return default_pp($op);
+}
+
+sub pp_range {
+ my $op = shift;
+ my $flags = $op->flags;
+ if (!($flags & OPf_KNOW)) {
+ error("context of range unknown at compile-time");
+ }
+ write_back_lexicals();
+ write_back_stack();
+ if (!($flags & OPf_LIST)) {
+ # We need to save our UNOP structure since pp_flop uses
+ # it to find and adjust out targ. We don't need it ourselves.
+ $op->save;
+ runtime sprintf("if (SvTRUE(PL_curpad[%d])) goto %s;",
+ $op->targ, label($op->false));
+ unshift(@bblock_todo, $op->false);
+ }
+ return $op->true;
+}
+
+sub pp_flip {
+ my $op = shift;
+ my $flags = $op->flags;
+ if (!($flags & OPf_KNOW)) {
+ error("context of flip unknown at compile-time");
+ }
+ if ($flags & OPf_LIST) {
+ return $op->first->false;
+ }
+ write_back_lexicals();
+ write_back_stack();
+ # We need to save our UNOP structure since pp_flop uses
+ # it to find and adjust out targ. We don't need it ourselves.
+ $op->save;
+ my $ix = $op->targ;
+ my $rangeix = $op->first->targ;
+ runtime(($op->private & OPpFLIP_LINENUM) ?
+ "if (PL_last_in_gv && SvIV(TOPs) == IoLINES(GvIOp(PL_last_in_gv))) {"
+ : "if (SvTRUE(TOPs)) {");
+ runtime("\tsv_setiv(PL_curpad[$rangeix], 1);");
+ if ($op->flags & OPf_SPECIAL) {
+ runtime("sv_setiv(PL_curpad[$ix], 1);");
+ } else {
+ runtime("\tsv_setiv(PL_curpad[$ix], 0);",
+ "\tsp--;",
+ sprintf("\tgoto %s;", label($op->first->false)));
+ }
+ runtime("}",
+ qq{sv_setpv(PL_curpad[$ix], "");},
+ "SETs(PL_curpad[$ix]);");
+ $know_op = 0;
+ return $op->next;
+}
+
+sub pp_flop {
+ my $op = shift;
+ default_pp($op);
+ $know_op = 0;
+ return $op->next;
+}
+
+sub enterloop {
+ my $op = shift;
+ my $nextop = $op->nextop;
+ my $lastop = $op->lastop;
+ my $redoop = $op->redoop;
+ $curcop->write_back;
+ debug "enterloop: pushing on cxstack" if $debug_cxstack;
+ push(@cxstack, {
+ type => CXt_LOOP,
+ op => $op,
+ "label" => $curcop->[0]->label,
+ nextop => $nextop,
+ lastop => $lastop,
+ redoop => $redoop
+ });
+ $nextop->save;
+ $lastop->save;
+ $redoop->save;
+ return default_pp($op);
+}
+
+sub pp_enterloop { enterloop(@_) }
+sub pp_enteriter { enterloop(@_) }
+
+sub pp_leaveloop {
+ my $op = shift;
+ if (!@cxstack) {
+ die "panic: leaveloop";
+ }
+ debug "leaveloop: popping from cxstack" if $debug_cxstack;
+ pop(@cxstack);
+ return default_pp($op);
+}
+
+sub pp_next {
+ my $op = shift;
+ my $cxix;
+ if ($op->flags & OPf_SPECIAL) {
+ $cxix = dopoptoloop();
+ if ($cxix < 0) {
+ error('"next" used outside loop');
+ return $op->next; # ignore the op
+ }
+ } else {
+ $cxix = dopoptolabel($op->pv);
+ if ($cxix < 0) {
+ error('Label not found at compile time for "next %s"', $op->pv);
+ return $op->next; # ignore the op
+ }
+ }
+ default_pp($op);
+ my $nextop = $cxstack[$cxix]->{nextop};
+ push(@bblock_todo, $nextop);
+ runtime(sprintf("goto %s;", label($nextop)));
+ return $op->next;
+}
+
+sub pp_redo {
+ my $op = shift;
+ my $cxix;
+ if ($op->flags & OPf_SPECIAL) {
+ $cxix = dopoptoloop();
+ if ($cxix < 0) {
+ error('"redo" used outside loop');
+ return $op->next; # ignore the op
+ }
+ } else {
+ $cxix = dopoptolabel($op->pv);
+ if ($cxix < 0) {
+ error('Label not found at compile time for "redo %s"', $op->pv);
+ return $op->next; # ignore the op
+ }
+ }
+ default_pp($op);
+ my $redoop = $cxstack[$cxix]->{redoop};
+ push(@bblock_todo, $redoop);
+ runtime(sprintf("goto %s;", label($redoop)));
+ return $op->next;
+}
+
+sub pp_last {
+ my $op = shift;
+ my $cxix;
+ if ($op->flags & OPf_SPECIAL) {
+ $cxix = dopoptoloop();
+ if ($cxix < 0) {
+ error('"last" used outside loop');
+ return $op->next; # ignore the op
+ }
+ } else {
+ $cxix = dopoptolabel($op->pv);
+ if ($cxix < 0) {
+ error('Label not found at compile time for "last %s"', $op->pv);
+ return $op->next; # ignore the op
+ }
+ # XXX Add support for "last" to leave non-loop blocks
+ if ($cxstack[$cxix]->{type} != CXt_LOOP) {
+ error('Use of "last" for non-loop blocks is not yet implemented');
+ return $op->next; # ignore the op
+ }
+ }
+ default_pp($op);
+ my $lastop = $cxstack[$cxix]->{lastop}->next;
+ push(@bblock_todo, $lastop);
+ runtime(sprintf("goto %s;", label($lastop)));
+ return $op->next;
+}
+
+sub pp_subst {
+ my $op = shift;
+ write_back_lexicals();
+ write_back_stack();
+ my $sym = doop($op);
+ my $replroot = $op->pmreplroot;
+ if ($$replroot) {
+ runtime sprintf("if (PL_op == ((PMOP*)(%s))->op_pmreplroot) goto %s;",
+ $sym, label($replroot));
+ $op->pmreplstart->save;
+ push(@bblock_todo, $replroot);
+ }
+ invalidate_lexicals();
+ return $op->next;
+}
+
+sub pp_substcont {
+ my $op = shift;
+ write_back_lexicals();
+ write_back_stack();
+ doop($op);
+ my $pmop = $op->other;
+ warn sprintf("substcont: op = %s, pmop = %s\n",
+ peekop($op), peekop($pmop));#debug
+# my $pmopsym = objsym($pmop);
+ my $pmopsym = $pmop->save; # XXX can this recurse?
+ warn "pmopsym = $pmopsym\n";#debug
+ runtime sprintf("if (PL_op == ((PMOP*)(%s))->op_pmreplstart) goto %s;",
+ $pmopsym, label($pmop->pmreplstart));
+ invalidate_lexicals();
+ return $pmop->next;
+}
+
+sub default_pp {
+ my $op = shift;
+ my $ppname = $op->ppaddr;
+ write_back_lexicals() unless $skip_lexicals{$ppname};
+ write_back_stack() unless $skip_stack{$ppname};
+ doop($op);
+ # XXX If the only way that ops can write to a TEMPORARY lexical is
+ # when it's named in $op->targ then we could call
+ # invalidate_lexicals(TEMPORARY) and avoid having to write back all
+ # the temporaries. For now, we'll play it safe and write back the lot.
+ invalidate_lexicals() unless $skip_invalidate{$ppname};
+ return $op->next;
+}
+
+sub compile_op {
+ my $op = shift;
+ my $ppname = $op->ppaddr;
+ if (exists $ignore_op{$ppname}) {
+ return $op->next;
+ }
+ debug peek_stack() if $debug_stack;
+ if ($debug_op) {
+ debug sprintf("%s [%s]\n",
+ peekop($op),
+ $op->flags & OPf_STACKED ? "OPf_STACKED" : $op->targ);
+ }
+ no strict 'refs';
+ if (defined(&$ppname)) {
+ $know_op = 0;
+ return &$ppname($op);
+ } else {
+ return default_pp($op);
+ }
+}
+
+sub compile_bblock {
+ my $op = shift;
+ #warn "compile_bblock: ", peekop($op), "\n"; # debug
+ write_label($op);
+ $know_op = 0;
+ do {
+ $op = compile_op($op);
+ } while (defined($op) && $$op && !exists($leaders->{$$op}));
+ write_back_stack(); # boo hoo: big loss
+ reload_lexicals();
+ return $op;
+}
+
+sub cc {
+ my ($name, $root, $start, @padlist) = @_;
+ my $op;
+ init_pp($name);
+ load_pad(@padlist);
+ B::Pseudoreg->new_scope;
+ @cxstack = ();
+ if ($debug_timings) {
+ warn sprintf("Basic block analysis at %s\n", timing_info);
+ }
+ $leaders = find_leaders($root, $start);
+ @bblock_todo = ($start, values %$leaders);
+ if ($debug_timings) {
+ warn sprintf("Compilation at %s\n", timing_info);
+ }
+ while (@bblock_todo) {
+ $op = shift @bblock_todo;
+ #warn sprintf("Considering basic block %s\n", peekop($op)); # debug
+ next if !defined($op) || !$$op || $done{$$op};
+ #warn "...compiling it\n"; # debug
+ do {
+ $done{$$op} = 1;
+ $op = compile_bblock($op);
+ if ($need_freetmps && $freetmps_each_bblock) {
+ runtime("FREETMPS;");
+ $need_freetmps = 0;
+ }
+ } while defined($op) && $$op && !$done{$$op};
+ if ($need_freetmps && $freetmps_each_loop) {
+ runtime("FREETMPS;");
+ $need_freetmps = 0;
+ }
+ if (!$$op) {
+ runtime("PUTBACK;","return (PL_op)?PL_op->op_next:0;");
+ } elsif ($done{$$op}) {
+ runtime(sprintf("goto %s;", label($op)));
+ }
+ }
+ if ($debug_timings) {
+ warn sprintf("Saving runtime at %s\n", timing_info);
+ }
+ save_runtime();
+}
+
+sub cc_recurse {
+ my $ccinfo;
+ my $start;
+ $start = cc_queue(@_) if @_;
+ while ($ccinfo = shift @cc_todo) {
+ cc(@$ccinfo);
+ }
+ return $start;
+}
+
+sub cc_obj {
+ my ($name, $cvref) = @_;
+ my $cv = svref_2object($cvref);
+ my @padlist = $cv->PADLIST->ARRAY;
+ my $curpad_sym = $padlist[1]->save;
+ cc_recurse($name, $cv->ROOT, $cv->START, @padlist);
+}
+
+sub cc_main {
+ my @comppadlist = comppadlist->ARRAY;
+ my $curpad_nam = $comppadlist[0]->save;
+ my $curpad_sym = $comppadlist[1]->save;
+ my $start = cc_recurse("pp_main", main_root, main_start, @comppadlist);
+ save_unused_subs(@unused_sub_packages);
+ cc_recurse();
+
+ return if $errors;
+ if (!defined($module)) {
+ $init->add(sprintf("PL_main_root = s\\_%x;", ${main_root()}),
+ "PL_main_start = $start;",
+ "PL_curpad = AvARRAY($curpad_sym);",
+ "av_store(CvPADLIST(PL_main_cv),0,SvREFCNT_inc($curpad_nam));",
+ "av_store(CvPADLIST(PL_main_cv),1,SvREFCNT_inc($curpad_sym));");
+ }
+ output_boilerplate();
+ print "\n";
+ output_all("perl_init");
+ output_runtime();
+ print "\n";
+ output_main();
+ if (defined($module)) {
+ my $cmodule = $module;
+ $cmodule =~ s/::/__/g;
+ print <<"EOT";
+
+#include "XSUB.h"
+XS(boot_$cmodule)
+{
+ dXSARGS;
+ perl_init();
+ ENTER;
+ SAVETMPS;
+ SAVESPTR(PL_curpad);
+ SAVESPTR(PL_op);
+ PL_curpad = AvARRAY($curpad_sym);
+ PL_op = $start;
+ pp_main(ARGS);
+ FREETMPS;
+ LEAVE;
+ ST(0) = &PL_sv_yes;
+ XSRETURN(1);
+}
+EOT
+ }
+ if ($debug_timings) {
+ warn sprintf("Done at %s\n", timing_info);
+ }
+}
+
+sub compile {
+ my @options = @_;
+ my ($option, $opt, $arg);
+ OPTION:
+ while ($option = shift @options) {
+ if ($option =~ /^-(.)(.*)/) {
+ $opt = $1;
+ $arg = $2;
+ } else {
+ unshift @options, $option;
+ last OPTION;
+ }
+ if ($opt eq "-" && $arg eq "-") {
+ shift @options;
+ last OPTION;
+ } elsif ($opt eq "o") {
+ $arg ||= shift @options;
+ open(STDOUT, ">$arg") or return "open '>$arg': $!\n";
+ } elsif ($opt eq "n") {
+ $arg ||= shift @options;
+ $module_name = $arg;
+ } elsif ($opt eq "u") {
+ $arg ||= shift @options;
+ push(@unused_sub_packages, $arg);
+ } elsif ($opt eq "f") {
+ $arg ||= shift @options;
+ my $value = $arg !~ s/^no-//;
+ $arg =~ s/-/_/g;
+ my $ref = $optimise{$arg};
+ if (defined($ref)) {
+ $$ref = $value;
+ } else {
+ warn qq(ignoring unknown optimisation option "$arg"\n);
+ }
+ } elsif ($opt eq "O") {
+ $arg = 1 if $arg eq "";
+ my $ref;
+ foreach $ref (values %optimise) {
+ $$ref = 0;
+ }
+ if ($arg >= 2) {
+ $freetmps_each_loop = 1;
+ }
+ if ($arg >= 1) {
+ $freetmps_each_bblock = 1 unless $freetmps_each_loop;
+ }
+ } elsif ($opt eq "m") {
+ $arg ||= shift @options;
+ $module = $arg;
+ push(@unused_sub_packages, $arg);
+ } elsif ($opt eq "p") {
+ $arg ||= shift @options;
+ $patchlevel = $arg;
+ } elsif ($opt eq "D") {
+ $arg ||= shift @options;
+ foreach $arg (split(//, $arg)) {
+ if ($arg eq "o") {
+ B->debug(1);
+ } elsif ($arg eq "O") {
+ $debug_op = 1;
+ } elsif ($arg eq "s") {
+ $debug_stack = 1;
+ } elsif ($arg eq "c") {
+ $debug_cxstack = 1;
+ } elsif ($arg eq "p") {
+ $debug_pad = 1;
+ } elsif ($arg eq "r") {
+ $debug_runtime = 1;
+ } elsif ($arg eq "S") {
+ $debug_shadow = 1;
+ } elsif ($arg eq "q") {
+ $debug_queue = 1;
+ } elsif ($arg eq "l") {
+ $debug_lineno = 1;
+ } elsif ($arg eq "t") {
+ $debug_timings = 1;
+ }
+ }
+ }
+ }
+ init_sections();
+ $init = B::Section->get("init");
+ $decl = B::Section->get("decl");
+
+ if (@options) {
+ return sub {
+ my ($objname, $ppname);
+ foreach $objname (@options) {
+ $objname = "main::$objname" unless $objname =~ /::/;
+ ($ppname = $objname) =~ s/^.*?:://;
+ eval "cc_obj(qq(pp_sub_$ppname), \\&$objname)";
+ die "cc_obj(qq(pp_sub_$ppname, \\&$objname) failed: $@" if $@;
+ return if $errors;
+ }
+ output_boilerplate();
+ print "\n";
+ output_all($module_name || "init_module");
+ output_runtime();
+ }
+ } else {
+ return sub { cc_main() };
+ }
+}
+
+1;
+
+__END__
+
+=head1 NAME
+
+B::CC - Perl compiler's optimized C translation backend
+
+=head1 SYNOPSIS
+
+ perl -MO=CC[,OPTIONS] foo.pl
+
+=head1 DESCRIPTION
+
+This compiler backend takes Perl source and generates C source code
+corresponding to the flow of your program. In other words, this
+backend is somewhat a "real" compiler in the sense that many people
+think about compilers. Note however that, currently, it is a very
+poor compiler in that although it generates (mostly, or at least
+sometimes) correct code, it performs relatively few optimisations.
+This will change as the compiler develops. The result is that
+running an executable compiled with this backend may start up more
+quickly than running the original Perl program (a feature shared
+by the B<C> compiler backend--see F<B::C>) and may also execute
+slightly faster. This is by no means a good optimising compiler--yet.
+
+=head1 OPTIONS
+
+If there are any non-option arguments, they are taken to be
+names of objects to be saved (probably doesn't work properly yet).
+Without extra arguments, it saves the main program.
+
+=over 4
+
+=item B<-ofilename>
+
+Output to filename instead of STDOUT
+
+=item B<-v>
+
+Verbose compilation (currently gives a few compilation statistics).
+
+=item B<-->
+
+Force end of options
+
+=item B<-uPackname>
+
+Force apparently unused subs from package Packname to be compiled.
+This allows programs to use eval "foo()" even when sub foo is never
+seen to be used at compile time. The down side is that any subs which
+really are never used also have code generated. This option is
+necessary, for example, if you have a signal handler foo which you
+initialise with C<$SIG{BAR} = "foo">. A better fix, though, is just
+to change it to C<$SIG{BAR} = \&foo>. You can have multiple B<-u>
+options. The compiler tries to figure out which packages may possibly
+have subs in which need compiling but the current version doesn't do
+it very well. In particular, it is confused by nested packages (i.e.
+of the form C<A::B>) where package C<A> does not contain any subs.
+
+=item B<-mModulename>
+
+Instead of generating source for a runnable executable, generate
+source for an XSUB module. The boot_Modulename function (which
+DynaLoader can look for) does the appropriate initialisation and runs
+the main part of the Perl source that is being compiled.
+
+
+=item B<-D>
+
+Debug options (concatenated or separate flags like C<perl -D>).
+
+=item B<-Dr>
+
+Writes debugging output to STDERR just as it's about to write to the
+program's runtime (otherwise writes debugging info as comments in
+its C output).
+
+=item B<-DO>
+
+Outputs each OP as it's compiled
+
+=item B<-Ds>
+
+Outputs the contents of the shadow stack at each OP
+
+=item B<-Dp>
+
+Outputs the contents of the shadow pad of lexicals as it's loaded for
+each sub or the main program.
+
+=item B<-Dq>
+
+Outputs the name of each fake PP function in the queue as it's about
+to process it.
+
+=item B<-Dl>
+
+Output the filename and line number of each original line of Perl
+code as it's processed (C<pp_nextstate>).
+
+=item B<-Dt>
+
+Outputs timing information of compilation stages.
+
+=item B<-f>
+
+Force optimisations on or off one at a time.
+
+=item B<-ffreetmps-each-bblock>
+
+Delays FREETMPS from the end of each statement to the end of the each
+basic block.
+
+=item B<-ffreetmps-each-loop>
+
+Delays FREETMPS from the end of each statement to the end of the group
+of basic blocks forming a loop. At most one of the freetmps-each-*
+options can be used.
+
+=item B<-fomit-taint>
+
+Omits generating code for handling perl's tainting mechanism.
+
+=item B<-On>
+
+Optimisation level (n = 0, 1, 2, ...). B<-O> means B<-O1>.
+Currently, B<-O1> sets B<-ffreetmps-each-bblock> and B<-O2>
+sets B<-ffreetmps-each-loop>.
+
+=back
+
+=head1 EXAMPLES
+
+ perl -MO=CC,-O2,-ofoo.c foo.pl
+ perl cc_harness -o foo foo.c
+
+Note that C<cc_harness> lives in the C<B> subdirectory of your perl
+library directory. The utility called C<perlcc> may also be used to
+help make use of this compiler.
+
+ perl -MO=CC,-mFoo,-oFoo.c Foo.pm
+ perl cc_harness -shared -c -o Foo.so Foo.c
+
+=head1 BUGS
+
+Plenty. Current status: experimental.
+
+=head1 DIFFERENCES
+
+These aren't really bugs but they are constructs which are heavily
+tied to perl's compile-and-go implementation and with which this
+compiler backend cannot cope.
+
+=head2 Loops
+
+Standard perl calculates the target of "next", "last", and "redo"
+at run-time. The compiler calculates the targets at compile-time.
+For example, the program
+
+ sub skip_on_odd { next NUMBER if $_[0] % 2 }
+ NUMBER: for ($i = 0; $i < 5; $i++) {
+ skip_on_odd($i);
+ print $i;
+ }
+
+produces the output
+
+ 024
+
+with standard perl but gives a compile-time error with the compiler.
+
+=head2 Context of ".."
+
+The context (scalar or array) of the ".." operator determines whether
+it behaves as a range or a flip/flop. Standard perl delays until
+runtime the decision of which context it is in but the compiler needs
+to know the context at compile-time. For example,
+
+ @a = (4,6,1,0,0,1);
+ sub range { (shift @a)..(shift @a) }
+ print range();
+ while (@a) { print scalar(range()) }
+
+generates the output
+
+ 456123E0
+
+with standard Perl but gives a compile-time error with compiled Perl.
+
+=head2 Arithmetic
+
+Compiled Perl programs use native C arithemtic much more frequently
+than standard perl. Operations on large numbers or on boundary
+cases may produce different behaviour.
+
+=head2 Deprecated features
+
+Features of standard perl such as C<$[> which have been deprecated
+in standard perl since Perl5 was released have not been implemented
+in the compiler.
+
+=head1 AUTHOR
+
+Malcolm Beattie, C<mbeattie@sable.ox.ac.uk>
+
+=cut
diff --git a/gnu/usr.bin/perl/ext/B/B/Debug.pm b/gnu/usr.bin/perl/ext/B/B/Debug.pm
new file mode 100644
index 00000000000..7754a5a8079
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/B/B/Debug.pm
@@ -0,0 +1,283 @@
+package B::Debug;
+use strict;
+use B qw(peekop class walkoptree walkoptree_exec
+ main_start main_root cstring sv_undef);
+use B::Asmdata qw(@specialsv_name);
+
+my %done_gv;
+
+sub B::OP::debug {
+ my ($op) = @_;
+ printf <<'EOT', class($op), $$op, ${$op->next}, ${$op->sibling}, $op->ppaddr, $op->targ, $op->type, $op->seq, $op->flags, $op->private;
+%s (0x%lx)
+ op_next 0x%x
+ op_sibling 0x%x
+ op_ppaddr %s
+ op_targ %d
+ op_type %d
+ op_seq %d
+ op_flags %d
+ op_private %d
+EOT
+}
+
+sub B::UNOP::debug {
+ my ($op) = @_;
+ $op->B::OP::debug();
+ printf "\top_first\t0x%x\n", ${$op->first};
+}
+
+sub B::BINOP::debug {
+ my ($op) = @_;
+ $op->B::UNOP::debug();
+ printf "\top_last\t\t0x%x\n", ${$op->last};
+}
+
+sub B::LOGOP::debug {
+ my ($op) = @_;
+ $op->B::UNOP::debug();
+ printf "\top_other\t0x%x\n", ${$op->other};
+}
+
+sub B::CONDOP::debug {
+ my ($op) = @_;
+ $op->B::UNOP::debug();
+ printf "\top_true\t0x%x\n", ${$op->true};
+ printf "\top_false\t0x%x\n", ${$op->false};
+}
+
+sub B::LISTOP::debug {
+ my ($op) = @_;
+ $op->B::BINOP::debug();
+ printf "\top_children\t%d\n", $op->children;
+}
+
+sub B::PMOP::debug {
+ my ($op) = @_;
+ $op->B::LISTOP::debug();
+ printf "\top_pmreplroot\t0x%x\n", ${$op->pmreplroot};
+ printf "\top_pmreplstart\t0x%x\n", ${$op->pmreplstart};
+ printf "\top_pmnext\t0x%x\n", ${$op->pmnext};
+ printf "\top_pmregexp->precomp\t%s\n", cstring($op->precomp);
+ printf "\top_pmflags\t0x%x\n", $op->pmflags;
+ $op->pmshort->debug;
+ $op->pmreplroot->debug;
+}
+
+sub B::COP::debug {
+ my ($op) = @_;
+ $op->B::OP::debug();
+ my ($filegv) = $op->filegv;
+ printf <<'EOT', $op->label, ${$op->stash}, $$filegv, $op->seq, $op->arybase, $op->line;
+ cop_label %s
+ cop_stash 0x%x
+ cop_filegv 0x%x
+ cop_seq %d
+ cop_arybase %d
+ cop_line %d
+EOT
+ $filegv->debug;
+}
+
+sub B::SVOP::debug {
+ my ($op) = @_;
+ $op->B::OP::debug();
+ printf "\top_sv\t\t0x%x\n", ${$op->sv};
+ $op->sv->debug;
+}
+
+sub B::PVOP::debug {
+ my ($op) = @_;
+ $op->B::OP::debug();
+ printf "\top_pv\t\t0x%x\n", $op->pv;
+}
+
+sub B::GVOP::debug {
+ my ($op) = @_;
+ $op->B::OP::debug();
+ printf "\top_gv\t\t0x%x\n", ${$op->gv};
+ $op->gv->debug;
+}
+
+sub B::CVOP::debug {
+ my ($op) = @_;
+ $op->B::OP::debug();
+ printf "\top_cv\t\t0x%x\n", ${$op->cv};
+}
+
+sub B::NULL::debug {
+ my ($sv) = @_;
+ if ($$sv == ${sv_undef()}) {
+ print "&sv_undef\n";
+ } else {
+ printf "NULL (0x%x)\n", $$sv;
+ }
+}
+
+sub B::SV::debug {
+ my ($sv) = @_;
+ if (!$$sv) {
+ print class($sv), " = NULL\n";
+ return;
+ }
+ printf <<'EOT', class($sv), $$sv, $sv->REFCNT, $sv->FLAGS;
+%s (0x%x)
+ REFCNT %d
+ FLAGS 0x%x
+EOT
+}
+
+sub B::PV::debug {
+ my ($sv) = @_;
+ $sv->B::SV::debug();
+ my $pv = $sv->PV();
+ printf <<'EOT', cstring($pv), length($pv);
+ xpv_pv %s
+ xpv_cur %d
+EOT
+}
+
+sub B::IV::debug {
+ my ($sv) = @_;
+ $sv->B::SV::debug();
+ printf "\txiv_iv\t\t%d\n", $sv->IV;
+}
+
+sub B::NV::debug {
+ my ($sv) = @_;
+ $sv->B::IV::debug();
+ printf "\txnv_nv\t\t%s\n", $sv->NV;
+}
+
+sub B::PVIV::debug {
+ my ($sv) = @_;
+ $sv->B::PV::debug();
+ printf "\txiv_iv\t\t%d\n", $sv->IV;
+}
+
+sub B::PVNV::debug {
+ my ($sv) = @_;
+ $sv->B::PVIV::debug();
+ printf "\txnv_nv\t\t%s\n", $sv->NV;
+}
+
+sub B::PVLV::debug {
+ my ($sv) = @_;
+ $sv->B::PVNV::debug();
+ printf "\txlv_targoff\t%d\n", $sv->TARGOFF;
+ printf "\txlv_targlen\t%u\n", $sv->TARGLEN;
+ printf "\txlv_type\t%s\n", cstring(chr($sv->TYPE));
+}
+
+sub B::BM::debug {
+ my ($sv) = @_;
+ $sv->B::PVNV::debug();
+ printf "\txbm_useful\t%d\n", $sv->USEFUL;
+ printf "\txbm_previous\t%u\n", $sv->PREVIOUS;
+ printf "\txbm_rare\t%s\n", cstring(chr($sv->RARE));
+}
+
+sub B::CV::debug {
+ my ($sv) = @_;
+ $sv->B::PVNV::debug();
+ my ($stash) = $sv->STASH;
+ my ($start) = $sv->START;
+ my ($root) = $sv->ROOT;
+ my ($padlist) = $sv->PADLIST;
+ my ($gv) = $sv->GV;
+ my ($filegv) = $sv->FILEGV;
+ printf <<'EOT', $$stash, $$start, $$root, $$gv, $$filegv, $sv->DEPTH, $padlist, ${$sv->OUTSIDE};
+ STASH 0x%x
+ START 0x%x
+ ROOT 0x%x
+ GV 0x%x
+ FILEGV 0x%x
+ DEPTH %d
+ PADLIST 0x%x
+ OUTSIDE 0x%x
+EOT
+ $start->debug if $start;
+ $root->debug if $root;
+ $gv->debug if $gv;
+ $filegv->debug if $filegv;
+ $padlist->debug if $padlist;
+}
+
+sub B::AV::debug {
+ my ($av) = @_;
+ $av->B::SV::debug;
+ my(@array) = $av->ARRAY;
+ print "\tARRAY\t\t(", join(", ", map("0x" . $$_, @array)), ")\n";
+ printf <<'EOT', scalar(@array), $av->MAX, $av->OFF, $av->AvFLAGS;
+ FILL %d
+ MAX %d
+ OFF %d
+ AvFLAGS %d
+EOT
+}
+
+sub B::GV::debug {
+ my ($gv) = @_;
+ if ($done_gv{$$gv}++) {
+ printf "GV %s::%s\n", $gv->STASH->NAME, $gv->NAME;
+ return;
+ }
+ my ($sv) = $gv->SV;
+ my ($av) = $gv->AV;
+ my ($cv) = $gv->CV;
+ $gv->B::SV::debug;
+ printf <<'EOT', $gv->NAME, $gv->STASH->NAME, $gv->STASH, $$sv, $gv->GvREFCNT, $gv->FORM, $$av, ${$gv->HV}, ${$gv->EGV}, $$cv, $gv->CVGEN, $gv->LINE, $gv->FILEGV, $gv->GvFLAGS;
+ NAME %s
+ STASH %s (0x%x)
+ SV 0x%x
+ GvREFCNT %d
+ FORM 0x%x
+ AV 0x%x
+ HV 0x%x
+ EGV 0x%x
+ CV 0x%x
+ CVGEN %d
+ LINE %d
+ FILEGV 0x%x
+ GvFLAGS 0x%x
+EOT
+ $sv->debug if $sv;
+ $av->debug if $av;
+ $cv->debug if $cv;
+}
+
+sub B::SPECIAL::debug {
+ my $sv = shift;
+ print $specialsv_name[$$sv], "\n";
+}
+
+sub compile {
+ my $order = shift;
+ if ($order eq "exec") {
+ return sub { walkoptree_exec(main_start, "debug") }
+ } else {
+ return sub { walkoptree(main_root, "debug") }
+ }
+}
+
+1;
+
+__END__
+
+=head1 NAME
+
+B::Debug - Walk Perl syntax tree, printing debug info about ops
+
+=head1 SYNOPSIS
+
+ perl -MO=Debug[,OPTIONS] foo.pl
+
+=head1 DESCRIPTION
+
+See F<ext/B/README>.
+
+=head1 AUTHOR
+
+Malcolm Beattie, C<mbeattie@sable.ox.ac.uk>
+
+=cut
diff --git a/gnu/usr.bin/perl/ext/B/B/Deparse.pm b/gnu/usr.bin/perl/ext/B/B/Deparse.pm
new file mode 100644
index 00000000000..5e0bd1d3de7
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/B/B/Deparse.pm
@@ -0,0 +1,2670 @@
+# B::Deparse.pm
+# Copyright (c) 1998 Stephen McCamant. All rights reserved.
+# This module is free software; you can redistribute and/or modify
+# it under the same terms as Perl itself.
+
+# This is based on the module of the same name by Malcolm Beattie,
+# but essentially none of his code remains.
+
+package B::Deparse;
+use Carp 'cluck';
+use B qw(class main_root main_start main_cv svref_2object);
+$VERSION = 0.56;
+use strict;
+
+# Changes between 0.50 and 0.51:
+# - fixed nulled leave with live enter in sort { }
+# - fixed reference constants (\"str")
+# - handle empty programs gracefully
+# - handle infinte loops (for (;;) {}, while (1) {})
+# - differentiate between `for my $x ...' and `my $x; for $x ...'
+# - various minor cleanups
+# - moved globals into an object
+# - added `-u', like B::C
+# - package declarations using cop_stash
+# - subs, formats and code sorted by cop_seq
+# Changes between 0.51 and 0.52:
+# - added pp_threadsv (special variables under USE_THREADS)
+# - added documentation
+# Changes between 0.52 and 0.53
+# - many changes adding precedence contexts and associativity
+# - added `-p' and `-s' output style options
+# - various other minor fixes
+# Changes between 0.53 and 0.54
+# - added support for new `for (1..100)' optimization,
+# thanks to Gisle Aas
+# Changes between 0.54 and 0.55
+# - added support for new qr// construct
+# - added support for new pp_regcreset OP
+# Changes between 0.55 and 0.56
+# - tested on base/*.t, cmd/*.t, comp/*.t, io/*.t
+# - fixed $# on non-lexicals broken in last big rewrite
+# - added temporary fix for change in opcode of OP_STRINGIFY
+# - fixed problem in 0.54's for() patch in `for (@ary)'
+# - fixed precedence in conditional of ?:
+# - tweaked list paren elimination in `my($x) = @_'
+# - made continue-block detection trickier wrt. null ops
+# - fixed various prototype problems in pp_entersub
+# - added support for sub prototypes that never get GVs
+# - added unquoting for special filehandle first arg in truncate
+# - print doubled rv2gv (a bug) as `*{*GV}' instead of illegal `**GV'
+# - added semicolons at the ends of blocks
+# - added -l `#line' declaration option -- fixes cmd/subval.t 27,28
+
+# Todo:
+# - {} around variables in strings ("${var}letters")
+# base/lex.t 25-27
+# comp/term.t 11
+# - generate symbolic constants directly from core source
+# - left/right context
+# - avoid semis in one-statement blocks
+# - associativity of &&=, ||=, ?:
+# - ',' => '=>' (auto-unquote?)
+# - break long lines ("\r" as discretionary break?)
+# - include values of variables (e.g. set in BEGIN)
+# - coordinate with Data::Dumper (both directions? see previous)
+# - version using op_next instead of op_first/sibling?
+# - avoid string copies (pass arrays, one big join?)
+# - auto-apply `-u'?
+# - while{} with one-statement continue => for(; XXX; XXX) {}?
+# - -uPackage:: descend recursively?
+# - here-docs?
+# - <DATA>?
+
+# Tests that will always fail:
+# comp/redef.t -- all (redefinition happens at compile time)
+
+# Object fields (were globals):
+#
+# avoid_local:
+# (local($a), local($b)) and local($a, $b) have the same internal
+# representation but the short form looks better. We notice we can
+# use a large-scale local when checking the list, but need to prevent
+# individual locals too. This hash holds the addresses of OPs that
+# have already had their local-ness accounted for. The same thing
+# is done with my().
+#
+# curcv:
+# CV for current sub (or main program) being deparsed
+#
+# curstash:
+# name of the current package for deparsed code
+#
+# subs_todo:
+# array of [cop_seq, GV, is_format?] for subs and formats we still
+# want to deparse
+#
+# protos_todo:
+# as above, but [name, prototype] for subs that never got a GV
+#
+# subs_done, forms_done:
+# keys are addresses of GVs for subs and formats we've already
+# deparsed (or at least put into subs_todo)
+#
+# parens: -p
+# linenums: -l
+# cuddle: ` ' or `\n', depending on -sC
+
+# A little explanation of how precedence contexts and associativity
+# work:
+#
+# deparse() calls each per-op subroutine with an argument $cx (short
+# for context, but not the same as the cx* in the perl core), which is
+# a number describing the op's parents in terms of precedence, whether
+# they're inside an expression or at statement level, etc. (see
+# chart below). When ops with children call deparse on them, they pass
+# along their precedence. Fractional values are used to implement
+# associativity (`($x + $y) + $z' => `$x + $y + $y') and related
+# parentheses hacks. The major disadvantage of this scheme is that
+# it doesn't know about right sides and left sides, so say if you
+# assign a listop to a variable, it can't tell it's allowed to leave
+# the parens off the listop.
+
+# Precedences:
+# 26 [TODO] inside interpolation context ("")
+# 25 left terms and list operators (leftward)
+# 24 left ->
+# 23 nonassoc ++ --
+# 22 right **
+# 21 right ! ~ \ and unary + and -
+# 20 left =~ !~
+# 19 left * / % x
+# 18 left + - .
+# 17 left << >>
+# 16 nonassoc named unary operators
+# 15 nonassoc < > <= >= lt gt le ge
+# 14 nonassoc == != <=> eq ne cmp
+# 13 left &
+# 12 left | ^
+# 11 left &&
+# 10 left ||
+# 9 nonassoc .. ...
+# 8 right ?:
+# 7 right = += -= *= etc.
+# 6 left , =>
+# 5 nonassoc list operators (rightward)
+# 4 right not
+# 3 left and
+# 2 left or xor
+# 1 statement modifiers
+# 0 statement level
+
+# Nonprinting characters with special meaning:
+# \cS - steal parens (see maybe_parens_unop)
+# \n - newline and indent
+# \t - increase indent
+# \b - decrease indent (`outdent')
+# \f - flush left (no indent)
+# \cK - kill following semicolon, if any
+
+sub null {
+ my $op = shift;
+ return class($op) eq "NULL";
+}
+
+sub todo {
+ my $self = shift;
+ my($gv, $cv, $is_form) = @_;
+ my $seq;
+ if (!null($cv->START) and is_state($cv->START)) {
+ $seq = $cv->START->cop_seq;
+ } else {
+ $seq = 0;
+ }
+ push @{$self->{'subs_todo'}}, [$seq, $gv, $is_form];
+}
+
+sub next_todo {
+ my $self = shift;
+ my $ent = shift @{$self->{'subs_todo'}};
+ my $name = $self->gv_name($ent->[1]);
+ if ($ent->[2]) {
+ return "format $name =\n"
+ . $self->deparse_format($ent->[1]->FORM). "\n";
+ } else {
+ return "sub $name " .
+ $self->deparse_sub($ent->[1]->CV);
+ }
+}
+
+sub OPf_KIDS () { 4 }
+
+sub walk_tree {
+ my($op, $sub) = @_;
+ $sub->($op);
+ if ($op->flags & OPf_KIDS) {
+ my $kid;
+ for ($kid = $op->first; not null $kid; $kid = $kid->sibling) {
+ walk_tree($kid, $sub);
+ }
+ }
+}
+
+sub walk_sub {
+ my $self = shift;
+ my $cv = shift;
+ my $op = $cv->ROOT;
+ $op = shift if null $op;
+ return if !$op or null $op;
+ walk_tree($op, sub {
+ my $op = shift;
+ if ($op->ppaddr eq "pp_gv") {
+ if ($op->next->ppaddr eq "pp_entersub") {
+ next if $self->{'subs_done'}{$ {$op->gv}}++;
+ next if class($op->gv->CV) eq "SPECIAL";
+ $self->todo($op->gv, $op->gv->CV, 0);
+ $self->walk_sub($op->gv->CV);
+ } elsif ($op->next->ppaddr eq "pp_enterwrite"
+ or ($op->next->ppaddr eq "pp_rv2gv"
+ and $op->next->next->ppaddr eq "pp_enterwrite")) {
+ next if $self->{'forms_done'}{$ {$op->gv}}++;
+ next if class($op->gv->FORM) eq "SPECIAL";
+ $self->todo($op->gv, $op->gv->FORM, 1);
+ $self->walk_sub($op->gv->FORM);
+ }
+ }
+ });
+}
+
+sub stash_subs {
+ my $self = shift;
+ my $pack = shift;
+ my(%stash, @ret);
+ { no strict 'refs'; %stash = svref_2object(\%{$pack . "::"})->ARRAY }
+ if ($pack eq "main") {
+ $pack = "";
+ } else {
+ $pack = $pack . "::";
+ }
+ my($key, $val);
+ while (($key, $val) = each %stash) {
+ my $class = class($val);
+ if ($class eq "PV") {
+ # Just a prototype
+ push @{$self->{'protos_todo'}}, [$pack . $key, $val->PV];
+ } elsif ($class eq "IV") {
+ # Just a name
+ push @{$self->{'protos_todo'}}, [$pack . $key, undef];
+ } elsif ($class eq "GV") {
+ if (class($val->CV) ne "SPECIAL") {
+ next if $self->{'subs_done'}{$$val}++;
+ $self->todo($val, $val->CV, 0);
+ $self->walk_sub($val->CV);
+ }
+ if (class($val->FORM) ne "SPECIAL") {
+ next if $self->{'forms_done'}{$$val}++;
+ $self->todo($val, $val->FORM, 1);
+ $self->walk_sub($val->FORM);
+ }
+ }
+ }
+}
+
+sub print_protos {
+ my $self = shift;
+ my $ar;
+ my @ret;
+ foreach $ar (@{$self->{'protos_todo'}}) {
+ my $proto = (defined $ar->[1] ? " (". $ar->[1] . ")" : "");
+ push @ret, "sub " . $ar->[0] . "$proto;\n";
+ }
+ delete $self->{'protos_todo'};
+ return @ret;
+}
+
+sub style_opts {
+ my $self = shift;
+ my $opts = shift;
+ my $opt;
+ while (length($opt = substr($opts, 0, 1))) {
+ if ($opt eq "C") {
+ $self->{'cuddle'} = " ";
+ }
+ $opts = substr($opts, 1);
+ }
+}
+
+sub compile {
+ my(@args) = @_;
+ return sub {
+ my $self = bless {};
+ my $arg;
+ $self->{'subs_todo'} = [];
+ $self->stash_subs("main");
+ $self->{'curcv'} = main_cv;
+ $self->{'curstash'} = "main";
+ $self->{'cuddle'} = "\n";
+ while ($arg = shift @args) {
+ if (substr($arg, 0, 2) eq "-u") {
+ $self->stash_subs(substr($arg, 2));
+ } elsif ($arg eq "-p") {
+ $self->{'parens'} = 1;
+ } elsif ($arg eq "-l") {
+ $self->{'linenums'} = 1;
+ } elsif (substr($arg, 0, 2) eq "-s") {
+ $self->style_opts(substr $arg, 2);
+ }
+ }
+ $self->walk_sub(main_cv, main_start);
+ print $self->print_protos;
+ @{$self->{'subs_todo'}} =
+ sort {$a->[0] <=> $b->[0]} @{$self->{'subs_todo'}};
+ print indent($self->deparse(main_root, 0)), "\n" unless null main_root;
+ my @text;
+ while (scalar(@{$self->{'subs_todo'}})) {
+ push @text, $self->next_todo;
+ }
+ print indent(join("", @text)), "\n" if @text;
+ }
+}
+
+sub deparse {
+ my $self = shift;
+ my($op, $cx) = @_;
+# cluck if class($op) eq "NULL";
+ my $meth = $op->ppaddr;
+ return $self->$meth($op, $cx);
+}
+
+sub indent {
+ my $txt = shift;
+ my @lines = split(/\n/, $txt);
+ my $leader = "";
+ my $line;
+ for $line (@lines) {
+ if (substr($line, 0, 1) eq "\t") {
+ $leader = $leader . " ";
+ $line = substr($line, 1);
+ } elsif (substr($line, 0, 1) eq "\b") {
+ $leader = substr($leader, 0, length($leader) - 4);
+ $line = substr($line, 1);
+ }
+ if (substr($line, 0, 1) eq "\f") {
+ $line = substr($line, 1); # no indent
+ } else {
+ $line = $leader . $line;
+ }
+ $line =~ s/\cK;?//g;
+ }
+ return join("\n", @lines);
+}
+
+sub SVf_POK () {0x40000}
+
+sub deparse_sub {
+ my $self = shift;
+ my $cv = shift;
+ my $proto = "";
+ if ($cv->FLAGS & SVf_POK) {
+ $proto = "(". $cv->PV . ") ";
+ }
+ local($self->{'curcv'}) = $cv;
+ local($self->{'curstash'}) = $self->{'curstash'};
+ if (not null $cv->ROOT) {
+ # skip leavesub
+ return $proto . "{\n\t" .
+ $self->deparse($cv->ROOT->first, 0) . "\n\b}\n";
+ } else { # XSUB?
+ return $proto . "{}\n";
+ }
+}
+
+sub deparse_format {
+ my $self = shift;
+ my $form = shift;
+ my @text;
+ local($self->{'curcv'}) = $form;
+ local($self->{'curstash'}) = $self->{'curstash'};
+ my $op = $form->ROOT;
+ my $kid;
+ $op = $op->first->first; # skip leavewrite, lineseq
+ while (not null $op) {
+ $op = $op->sibling; # skip nextstate
+ my @exprs;
+ $kid = $op->first->sibling; # skip pushmark
+ push @text, $kid->sv->PV;
+ $kid = $kid->sibling;
+ for (; not null $kid; $kid = $kid->sibling) {
+ push @exprs, $self->deparse($kid, 0);
+ }
+ push @text, join(", ", @exprs)."\n" if @exprs;
+ $op = $op->sibling;
+ }
+ return join("", @text) . ".";
+}
+
+# the aassign in-common check messes up SvCUR (always setting it
+# to a value >= 100), but it's probably safe to assume there
+# won't be any NULs in the names of my() variables. (with
+# stash variables, I wouldn't be so sure)
+sub padname_fix {
+ my $str = shift;
+ $str = substr($str, 0, index($str, "\0")) if index($str, "\0") != -1;
+ return $str;
+}
+
+sub is_scope {
+ my $op = shift;
+ return $op->ppaddr eq "pp_leave" || $op->ppaddr eq "pp_scope"
+ || $op->ppaddr eq "pp_lineseq"
+ || ($op->ppaddr eq "pp_null" && class($op) eq "UNOP"
+ && (is_scope($op->first) || $op->first->ppaddr eq "pp_enter"));
+}
+
+sub is_state {
+ my $name = $_[0]->ppaddr;
+ return $name eq "pp_nextstate" || $name eq "pp_dbstate";
+}
+
+sub is_miniwhile { # check for one-line loop (`foo() while $y--')
+ my $op = shift;
+ return (!null($op) and null($op->sibling)
+ and $op->ppaddr eq "pp_null" and class($op) eq "UNOP"
+ and (($op->first->ppaddr =~ /^pp_(and|or)$/
+ and $op->first->first->sibling->ppaddr eq "pp_lineseq")
+ or ($op->first->ppaddr eq "pp_lineseq"
+ and not null $op->first->first->sibling
+ and $op->first->first->sibling->ppaddr eq "pp_unstack")
+ ));
+}
+
+sub is_scalar {
+ my $op = shift;
+ return ($op->ppaddr eq "pp_rv2sv" or
+ $op->ppaddr eq "pp_padsv" or
+ $op->ppaddr eq "pp_gv" or # only in array/hash constructs
+ !null($op->first) && $op->first->ppaddr eq "pp_gvsv");
+}
+
+sub maybe_parens {
+ my $self = shift;
+ my($text, $cx, $prec) = @_;
+ if ($prec < $cx # unary ops nest just fine
+ or $prec == $cx and $cx != 4 and $cx != 16 and $cx != 21
+ or $self->{'parens'})
+ {
+ $text = "($text)";
+ # In a unop, let parent reuse our parens; see maybe_parens_unop
+ $text = "\cS" . $text if $cx == 16;
+ return $text;
+ } else {
+ return $text;
+ }
+}
+
+# same as above, but get around the `if it looks like a function' rule
+sub maybe_parens_unop {
+ my $self = shift;
+ my($name, $kid, $cx) = @_;
+ if ($cx > 16 or $self->{'parens'}) {
+ return "$name(" . $self->deparse($kid, 1) . ")";
+ } else {
+ $kid = $self->deparse($kid, 16);
+ if (substr($kid, 0, 1) eq "\cS") {
+ # use kid's parens
+ return $name . substr($kid, 1);
+ } elsif (substr($kid, 0, 1) eq "(") {
+ # avoid looks-like-a-function trap with extra parens
+ # (`+' can lead to ambiguities)
+ return "$name(" . $kid . ")";
+ } else {
+ return "$name $kid";
+ }
+ }
+}
+
+sub maybe_parens_func {
+ my $self = shift;
+ my($func, $text, $cx, $prec) = @_;
+ if ($prec <= $cx or substr($text, 0, 1) eq "(" or $self->{'parens'}) {
+ return "$func($text)";
+ } else {
+ return "$func $text";
+ }
+}
+
+sub OPp_LVAL_INTRO () { 128 }
+
+sub maybe_local {
+ my $self = shift;
+ my($op, $cx, $text) = @_;
+ if ($op->private & OPp_LVAL_INTRO and not $self->{'avoid_local'}{$$op}) {
+ return $self->maybe_parens_func("local", $text, $cx, 16);
+ } else {
+ return $text;
+ }
+}
+
+sub padname_sv {
+ my $self = shift;
+ my $targ = shift;
+ return (($self->{'curcv'}->PADLIST->ARRAY)[0]->ARRAY)[$targ];
+}
+
+sub maybe_my {
+ my $self = shift;
+ my($op, $cx, $text) = @_;
+ if ($op->private & OPp_LVAL_INTRO and not $self->{'avoid_local'}{$$op}) {
+ return $self->maybe_parens_func("my", $text, $cx, 16);
+ } else {
+ return $text;
+ }
+}
+
+# The following OPs don't have functions:
+
+# pp_padany -- does not exist after parsing
+# pp_rcatline -- does not exist
+
+sub pp_enter { # see also leave
+ cluck "unexpected OP_ENTER";
+ return "XXX";
+}
+
+sub pp_pushmark { # see also list
+ cluck "unexpected OP_PUSHMARK";
+ return "XXX";
+}
+
+sub pp_leavesub { # see also deparse_sub
+ cluck "unexpected OP_LEAVESUB";
+ return "XXX";
+}
+
+sub pp_leavewrite { # see also deparse_format
+ cluck "unexpected OP_LEAVEWRITE";
+ return "XXX";
+}
+
+sub pp_method { # see also entersub
+ cluck "unexpected OP_METHOD";
+ return "XXX";
+}
+
+sub pp_regcmaybe { # see also regcomp
+ cluck "unexpected OP_REGCMAYBE";
+ return "XXX";
+}
+
+sub pp_regcreset { # see also regcomp
+ cluck "unexpected OP_REGCRESET";
+ return "XXX";
+}
+
+sub pp_substcont { # see also subst
+ cluck "unexpected OP_SUBSTCONT";
+ return "XXX";
+}
+
+sub pp_grepstart { # see also grepwhile
+ cluck "unexpected OP_GREPSTART";
+ return "XXX";
+}
+
+sub pp_mapstart { # see also mapwhile
+ cluck "unexpected OP_MAPSTART";
+ return "XXX";
+}
+
+sub pp_flip { # see also flop
+ cluck "unexpected OP_FLIP";
+ return "XXX";
+}
+
+sub pp_iter { # see also leaveloop
+ cluck "unexpected OP_ITER";
+ return "XXX";
+}
+
+sub pp_enteriter { # see also leaveloop
+ cluck "unexpected OP_ENTERITER";
+ return "XXX";
+}
+
+sub pp_enterloop { # see also leaveloop
+ cluck "unexpected OP_ENTERLOOP";
+ return "XXX";
+}
+
+sub pp_leaveeval { # see also entereval
+ cluck "unexpected OP_LEAVEEVAL";
+ return "XXX";
+}
+
+sub pp_entertry { # see also leavetry
+ cluck "unexpected OP_ENTERTRY";
+ return "XXX";
+}
+
+# leave and scope/lineseq should probably share code
+sub pp_leave {
+ my $self = shift;
+ my($op, $cx) = @_;
+ my ($kid, $expr);
+ my @exprs;
+ local($self->{'curstash'}) = $self->{'curstash'};
+ $kid = $op->first->sibling; # skip enter
+ if (is_miniwhile($kid)) {
+ my $top = $kid->first;
+ my $name = $top->ppaddr;
+ if ($name eq "pp_and") {
+ $name = "while";
+ } elsif ($name eq "pp_or") {
+ $name = "until";
+ } else { # no conditional -> while 1 or until 0
+ return $self->deparse($top->first, 1) . " while 1";
+ }
+ my $cond = $top->first;
+ my $body = $cond->sibling->first; # skip lineseq
+ $cond = $self->deparse($cond, 1);
+ $body = $self->deparse($body, 1);
+ return "$body $name $cond";
+ }
+ for (; !null($kid); $kid = $kid->sibling) {
+ $expr = "";
+ if (is_state $kid) {
+ $expr = $self->deparse($kid, 0);
+ $kid = $kid->sibling;
+ last if null $kid;
+ }
+ $expr .= $self->deparse($kid, 0);
+ push @exprs, $expr if $expr;
+ }
+ if ($cx > 0) { # inside an expression
+ return "do { " . join(";\n", @exprs) . " }";
+ } else {
+ return join(";\n", @exprs) . ";";
+ }
+}
+
+sub pp_scope {
+ my $self = shift;
+ my($op, $cx) = @_;
+ my ($kid, $expr);
+ my @exprs;
+ for ($kid = $op->first; !null($kid); $kid = $kid->sibling) {
+ $expr = "";
+ if (is_state $kid) {
+ $expr = $self->deparse($kid, 0);
+ $kid = $kid->sibling;
+ last if null $kid;
+ }
+ $expr .= $self->deparse($kid, 0);
+ push @exprs, $expr if $expr;
+ }
+ if ($cx > 0) { # inside an expression, (a do {} while for lineseq)
+ return "do { " . join(";\n", @exprs) . " }";
+ } else {
+ return join(";\n", @exprs) . ";";
+ }
+}
+
+sub pp_lineseq { pp_scope(@_) }
+
+# The BEGIN {} is used here because otherwise this code isn't executed
+# when you run B::Deparse on itself.
+my %globalnames;
+BEGIN { map($globalnames{$_}++, "SIG", "STDIN", "STDOUT", "STDERR", "INC",
+ "ENV", "ARGV", "ARGVOUT", "_"); }
+
+sub gv_name {
+ my $self = shift;
+ my $gv = shift;
+ my $stash = $gv->STASH->NAME;
+ my $name = $gv->NAME;
+ if ($stash eq $self->{'curstash'} or $globalnames{$name}
+ or $name =~ /^[^A-Za-z_]/)
+ {
+ $stash = "";
+ } else {
+ $stash = $stash . "::";
+ }
+ if ($name =~ /^([\cA-\cZ])$/) {
+ $name = "^" . chr(64 + ord($1));
+ }
+ return $stash . $name;
+}
+
+# Notice how subs and formats are inserted between statements here
+sub pp_nextstate {
+ my $self = shift;
+ my($op, $cx) = @_;
+ my @text;
+ @text = $op->label . ": " if $op->label;
+ my $seq = $op->cop_seq;
+ while (scalar(@{$self->{'subs_todo'}})
+ and $seq > $self->{'subs_todo'}[0][0]) {
+ push @text, $self->next_todo;
+ }
+ my $stash = $op->stash->NAME;
+ if ($stash ne $self->{'curstash'}) {
+ push @text, "package $stash;\n";
+ $self->{'curstash'} = $stash;
+ }
+ if ($self->{'linenums'}) {
+ push @text, "\f#line " . $op->line .
+ ' "' . substr($op->filegv->NAME, 2), qq'"\n';
+ }
+ return join("", @text);
+}
+
+sub pp_dbstate { pp_nextstate(@_) }
+
+sub pp_unstack { return "" } # see also leaveloop
+
+sub baseop {
+ my $self = shift;
+ my($op, $cx, $name) = @_;
+ return $name;
+}
+
+sub pp_stub { baseop(@_, "()") }
+sub pp_wantarray { baseop(@_, "wantarray") }
+sub pp_fork { baseop(@_, "fork") }
+sub pp_wait { baseop(@_, "wait") }
+sub pp_getppid { baseop(@_, "getppid") }
+sub pp_time { baseop(@_, "time") }
+sub pp_tms { baseop(@_, "times") }
+sub pp_ghostent { baseop(@_, "gethostent") }
+sub pp_gnetent { baseop(@_, "getnetent") }
+sub pp_gprotoent { baseop(@_, "getprotoent") }
+sub pp_gservent { baseop(@_, "getservent") }
+sub pp_ehostent { baseop(@_, "endhostent") }
+sub pp_enetent { baseop(@_, "endnetent") }
+sub pp_eprotoent { baseop(@_, "endprotoent") }
+sub pp_eservent { baseop(@_, "endservent") }
+sub pp_gpwent { baseop(@_, "getpwent") }
+sub pp_spwent { baseop(@_, "setpwent") }
+sub pp_epwent { baseop(@_, "endpwent") }
+sub pp_ggrent { baseop(@_, "getgrent") }
+sub pp_sgrent { baseop(@_, "setgrent") }
+sub pp_egrent { baseop(@_, "endgrent") }
+sub pp_getlogin { baseop(@_, "getlogin") }
+
+sub POSTFIX () { 1 }
+
+# I couldn't think of a good short name, but this is the category of
+# symbolic unary operators with interesting precedence
+
+sub pfixop {
+ my $self = shift;
+ my($op, $cx, $name, $prec, $flags) = (@_, 0);
+ my $kid = $op->first;
+ $kid = $self->deparse($kid, $prec);
+ return $self->maybe_parens(($flags & POSTFIX) ? "$kid$name" : "$name$kid",
+ $cx, $prec);
+}
+
+sub pp_preinc { pfixop(@_, "++", 23) }
+sub pp_predec { pfixop(@_, "--", 23) }
+sub pp_postinc { pfixop(@_, "++", 23, POSTFIX) }
+sub pp_postdec { pfixop(@_, "--", 23, POSTFIX) }
+sub pp_i_preinc { pfixop(@_, "++", 23) }
+sub pp_i_predec { pfixop(@_, "--", 23) }
+sub pp_i_postinc { pfixop(@_, "++", 23, POSTFIX) }
+sub pp_i_postdec { pfixop(@_, "--", 23, POSTFIX) }
+sub pp_complement { pfixop(@_, "~", 21) }
+
+sub pp_negate {
+ my $self = shift;
+ my($op, $cx) = @_;
+ if ($op->first->ppaddr =~ /^pp_(i_)?negate$/) {
+ # avoid --$x
+ $self->pfixop($op, $cx, "-", 21.5);
+ } else {
+ $self->pfixop($op, $cx, "-", 21);
+ }
+}
+sub pp_i_negate { pp_negate(@_) }
+
+sub pp_not {
+ my $self = shift;
+ my($op, $cx) = @_;
+ if ($cx <= 4) {
+ $self->pfixop($op, $cx, "not ", 4);
+ } else {
+ $self->pfixop($op, $cx, "!", 21);
+ }
+}
+
+sub OPf_SPECIAL () { 128 }
+
+sub unop {
+ my $self = shift;
+ my($op, $cx, $name, $prec, $flags) = (@_, 0, 0);
+ my $kid;
+ if ($op->flags & OPf_KIDS) {
+ $kid = $op->first;
+ return $self->maybe_parens_unop($name, $kid, $cx);
+ } else {
+ return $name . ($op->flags & OPf_SPECIAL ? "()" : "");
+ }
+}
+
+sub pp_chop { unop(@_, "chop") }
+sub pp_chomp { unop(@_, "chomp") }
+sub pp_schop { unop(@_, "chop") }
+sub pp_schomp { unop(@_, "chomp") }
+sub pp_defined { unop(@_, "defined") }
+sub pp_undef { unop(@_, "undef") }
+sub pp_study { unop(@_, "study") }
+sub pp_ref { unop(@_, "ref") }
+sub pp_pos { maybe_local(@_, unop(@_, "pos")) }
+
+sub pp_sin { unop(@_, "sin") }
+sub pp_cos { unop(@_, "cos") }
+sub pp_rand { unop(@_, "rand") }
+sub pp_srand { unop(@_, "srand") }
+sub pp_exp { unop(@_, "exp") }
+sub pp_log { unop(@_, "log") }
+sub pp_sqrt { unop(@_, "sqrt") }
+sub pp_int { unop(@_, "int") }
+sub pp_hex { unop(@_, "hex") }
+sub pp_oct { unop(@_, "oct") }
+sub pp_abs { unop(@_, "abs") }
+
+sub pp_length { unop(@_, "length") }
+sub pp_ord { unop(@_, "ord") }
+sub pp_chr { unop(@_, "chr") }
+sub pp_ucfirst { unop(@_, "ucfirst") }
+sub pp_lcfirst { unop(@_, "lcfirst") }
+sub pp_uc { unop(@_, "uc") }
+sub pp_lc { unop(@_, "lc") }
+sub pp_quotemeta { unop(@_, "quotemeta") }
+
+sub pp_each { unop(@_, "each") }
+sub pp_values { unop(@_, "values") }
+sub pp_keys { unop(@_, "keys") }
+sub pp_pop { unop(@_, "pop") }
+sub pp_shift { unop(@_, "shift") }
+
+sub pp_caller { unop(@_, "caller") }
+sub pp_reset { unop(@_, "reset") }
+sub pp_exit { unop(@_, "exit") }
+sub pp_prototype { unop(@_, "prototype") }
+
+sub pp_close { unop(@_, "close") }
+sub pp_fileno { unop(@_, "fileno") }
+sub pp_umask { unop(@_, "umask") }
+sub pp_binmode { unop(@_, "binmode") }
+sub pp_untie { unop(@_, "untie") }
+sub pp_tied { unop(@_, "tied") }
+sub pp_dbmclose { unop(@_, "dbmclose") }
+sub pp_getc { unop(@_, "getc") }
+sub pp_eof { unop(@_, "eof") }
+sub pp_tell { unop(@_, "tell") }
+sub pp_getsockname { unop(@_, "getsockname") }
+sub pp_getpeername { unop(@_, "getpeername") }
+
+sub pp_chdir { unop(@_, "chdir") }
+sub pp_chroot { unop(@_, "chroot") }
+sub pp_readlink { unop(@_, "readlink") }
+sub pp_rmdir { unop(@_, "rmdir") }
+sub pp_readdir { unop(@_, "readdir") }
+sub pp_telldir { unop(@_, "telldir") }
+sub pp_rewinddir { unop(@_, "rewinddir") }
+sub pp_closedir { unop(@_, "closedir") }
+sub pp_getpgrp { unop(@_, "getpgrp") }
+sub pp_localtime { unop(@_, "localtime") }
+sub pp_gmtime { unop(@_, "gmtime") }
+sub pp_alarm { unop(@_, "alarm") }
+sub pp_sleep { unop(@_, "sleep") }
+
+sub pp_dofile { unop(@_, "do") }
+sub pp_entereval { unop(@_, "eval") }
+
+sub pp_ghbyname { unop(@_, "gethostbyname") }
+sub pp_gnbyname { unop(@_, "getnetbyname") }
+sub pp_gpbyname { unop(@_, "getprotobyname") }
+sub pp_shostent { unop(@_, "sethostent") }
+sub pp_snetent { unop(@_, "setnetent") }
+sub pp_sprotoent { unop(@_, "setprotoent") }
+sub pp_sservent { unop(@_, "setservent") }
+sub pp_gpwnam { unop(@_, "getpwnam") }
+sub pp_gpwuid { unop(@_, "getpwuid") }
+sub pp_ggrnam { unop(@_, "getgrnam") }
+sub pp_ggrgid { unop(@_, "getgrgid") }
+
+sub pp_lock { unop(@_, "lock") }
+
+sub pp_exists {
+ my $self = shift;
+ my($op, $cx) = @_;
+ return $self->maybe_parens_func("exists", $self->pp_helem($op->first, 16),
+ $cx, 16);
+}
+
+sub OPpSLICE () { 64 }
+
+sub pp_delete {
+ my $self = shift;
+ my($op, $cx) = @_;
+ my $arg;
+ if ($op->private & OPpSLICE) {
+ return $self->maybe_parens_func("delete",
+ $self->pp_hslice($op->first, 16),
+ $cx, 16);
+ } else {
+ return $self->maybe_parens_func("delete",
+ $self->pp_helem($op->first, 16),
+ $cx, 16);
+ }
+}
+
+sub OPp_CONST_BARE () { 64 }
+
+sub pp_require {
+ my $self = shift;
+ my($op, $cx) = @_;
+ if (class($op) eq "UNOP" and $op->first->ppaddr eq "pp_const"
+ and $op->first->private & OPp_CONST_BARE)
+ {
+ my $name = $op->first->sv->PV;
+ $name =~ s[/][::]g;
+ $name =~ s/\.pm//g;
+ return "require($name)";
+ } else {
+ $self->unop($op, $cx, "require");
+ }
+}
+
+sub pp_scalar {
+ my $self = shift;
+ my($op, $cv) = @_;
+ my $kid = $op->first;
+ if (not null $kid->sibling) {
+ # XXX Was a here-doc
+ return $self->dquote($op);
+ }
+ $self->unop(@_, "scalar");
+}
+
+
+sub padval {
+ my $self = shift;
+ my $targ = shift;
+ return (($self->{'curcv'}->PADLIST->ARRAY)[1]->ARRAY)[$targ];
+}
+
+sub OPf_REF () { 16 }
+
+sub pp_refgen {
+ my $self = shift;
+ my($op, $cx) = @_;
+ my $kid = $op->first;
+ if ($kid->ppaddr eq "pp_null") {
+ $kid = $kid->first;
+ if ($kid->ppaddr eq "pp_anonlist" || $kid->ppaddr eq "pp_anonhash") {
+ my($pre, $post) = @{{"pp_anonlist" => ["[","]"],
+ "pp_anonhash" => ["{","}"]}->{$kid->ppaddr}};
+ my($expr, @exprs);
+ $kid = $kid->first->sibling; # skip pushmark
+ for (; !null($kid); $kid = $kid->sibling) {
+ $expr = $self->deparse($kid, 6);
+ push @exprs, $expr;
+ }
+ return $pre . join(", ", @exprs) . $post;
+ } elsif (!null($kid->sibling) and
+ $kid->sibling->ppaddr eq "pp_anoncode") {
+ return "sub " .
+ $self->deparse_sub($self->padval($kid->sibling->targ));
+ } elsif ($kid->ppaddr eq "pp_pushmark"
+ and $kid->sibling->ppaddr =~ /^pp_(pad|rv2)[ah]v$/
+ and not $kid->sibling->flags & OPf_REF) {
+ # The @a in \(@a) isn't in ref context, but only when the
+ # parens are there.
+ return "\\(" . $self->deparse($kid->sibling, 1) . ")";
+ }
+ }
+ $self->pfixop($op, $cx, "\\", 20);
+}
+
+sub pp_srefgen { pp_refgen(@_) }
+
+sub pp_readline {
+ my $self = shift;
+ my($op, $cx) = @_;
+ my $kid = $op->first;
+ $kid = $kid->first if $kid->ppaddr eq "pp_rv2gv"; # <$fh>
+ if ($kid->ppaddr eq "pp_rv2gv") {
+ $kid = $kid->first;
+ }
+ return "<" . $self->deparse($kid, 1) . ">";
+}
+
+sub loopex {
+ my $self = shift;
+ my ($op, $cx, $name) = @_;
+ if (class($op) eq "PVOP") {
+ return "$name " . $op->pv;
+ } elsif (class($op) eq "OP") {
+ return $name;
+ } elsif (class($op) eq "UNOP") {
+ # Note -- loop exits are actually exempt from the
+ # looks-like-a-func rule, but a few extra parens won't hurt
+ return $self->maybe_parens_unop($name, $op->first, $cx);
+ }
+}
+
+sub pp_last { loopex(@_, "last") }
+sub pp_next { loopex(@_, "next") }
+sub pp_redo { loopex(@_, "redo") }
+sub pp_goto { loopex(@_, "goto") }
+sub pp_dump { loopex(@_, "dump") }
+
+sub ftst {
+ my $self = shift;
+ my($op, $cx, $name) = @_;
+ if (class($op) eq "UNOP") {
+ # Genuine `-X' filetests are exempt from the LLAFR, but not
+ # l?stat(); for the sake of clarity, give'em all parens
+ return $self->maybe_parens_unop($name, $op->first, $cx);
+ } elsif (class($op) eq "GVOP") {
+ return $self->maybe_parens_func($name, $self->pp_gv($op, 1), $cx, 16);
+ } else { # I don't think baseop filetests ever survive ck_ftst, but...
+ return $name;
+ }
+}
+
+sub pp_lstat { ftst(@_, "lstat") }
+sub pp_stat { ftst(@_, "stat") }
+sub pp_ftrread { ftst(@_, "-R") }
+sub pp_ftrwrite { ftst(@_, "-W") }
+sub pp_ftrexec { ftst(@_, "-X") }
+sub pp_fteread { ftst(@_, "-r") }
+sub pp_ftewrite { ftst(@_, "-r") }
+sub pp_fteexec { ftst(@_, "-r") }
+sub pp_ftis { ftst(@_, "-e") }
+sub pp_fteowned { ftst(@_, "-O") }
+sub pp_ftrowned { ftst(@_, "-o") }
+sub pp_ftzero { ftst(@_, "-z") }
+sub pp_ftsize { ftst(@_, "-s") }
+sub pp_ftmtime { ftst(@_, "-M") }
+sub pp_ftatime { ftst(@_, "-A") }
+sub pp_ftctime { ftst(@_, "-C") }
+sub pp_ftsock { ftst(@_, "-S") }
+sub pp_ftchr { ftst(@_, "-c") }
+sub pp_ftblk { ftst(@_, "-b") }
+sub pp_ftfile { ftst(@_, "-f") }
+sub pp_ftdir { ftst(@_, "-d") }
+sub pp_ftpipe { ftst(@_, "-p") }
+sub pp_ftlink { ftst(@_, "-l") }
+sub pp_ftsuid { ftst(@_, "-u") }
+sub pp_ftsgid { ftst(@_, "-g") }
+sub pp_ftsvtx { ftst(@_, "-k") }
+sub pp_fttty { ftst(@_, "-t") }
+sub pp_fttext { ftst(@_, "-T") }
+sub pp_ftbinary { ftst(@_, "-B") }
+
+sub SWAP_CHILDREN () { 1 }
+sub ASSIGN () { 2 } # has OP= variant
+
+sub OPf_STACKED () { 64 }
+
+my(%left, %right);
+
+sub assoc_class {
+ my $op = shift;
+ my $name = $op->ppaddr;
+ if ($name eq "pp_concat" and $op->first->ppaddr eq "pp_concat") {
+ # avoid spurious `=' -- see comment in pp_concat
+ return "pp_concat";
+ }
+ if ($name eq "pp_null" and class($op) eq "UNOP"
+ and $op->first->ppaddr =~ /^pp_(and|x?or)$/
+ and null $op->first->sibling)
+ {
+ # Like all conditional constructs, OP_ANDs and OP_ORs are topped
+ # with a null that's used as the common end point of the two
+ # flows of control. For precedence purposes, ignore it.
+ # (COND_EXPRs have these too, but we don't bother with
+ # their associativity).
+ return assoc_class($op->first);
+ }
+ return $name . ($op->flags & OPf_STACKED ? "=" : "");
+}
+
+# Left associative operators, like `+', for which
+# $a + $b + $c is equivalent to ($a + $b) + $c
+
+BEGIN {
+ %left = ('pp_multiply' => 19, 'pp_i_multiply' => 19,
+ 'pp_divide' => 19, 'pp_i_divide' => 19,
+ 'pp_modulo' => 19, 'pp_i_modulo' => 19,
+ 'pp_repeat' => 19,
+ 'pp_add' => 18, 'pp_i_add' => 18,
+ 'pp_subtract' => 18, 'pp_i_subtract' => 18,
+ 'pp_concat' => 18,
+ 'pp_left_shift' => 17, 'pp_right_shift' => 17,
+ 'pp_bit_and' => 13,
+ 'pp_bit_or' => 12, 'pp_bit_xor' => 12,
+ 'pp_and' => 3,
+ 'pp_or' => 2, 'pp_xor' => 2,
+ );
+}
+
+sub deparse_binop_left {
+ my $self = shift;
+ my($op, $left, $prec) = @_;
+ if ($left{assoc_class($op)}
+ and $left{assoc_class($op)} == $left{assoc_class($left)})
+ {
+ return $self->deparse($left, $prec - .00001);
+ } else {
+ return $self->deparse($left, $prec);
+ }
+}
+
+# Right associative operators, like `=', for which
+# $a = $b = $c is equivalent to $a = ($b = $c)
+
+BEGIN {
+ %right = ('pp_pow' => 22,
+ 'pp_sassign=' => 7, 'pp_aassign=' => 7,
+ 'pp_multiply=' => 7, 'pp_i_multiply=' => 7,
+ 'pp_divide=' => 7, 'pp_i_divide=' => 7,
+ 'pp_modulo=' => 7, 'pp_i_modulo=' => 7,
+ 'pp_repeat=' => 7,
+ 'pp_add=' => 7, 'pp_i_add=' => 7,
+ 'pp_subtract=' => 7, 'pp_i_subtract=' => 7,
+ 'pp_concat=' => 7,
+ 'pp_left_shift=' => 7, 'pp_right_shift=' => 7,
+ 'pp_bit_and=' => 7,
+ 'pp_bit_or=' => 7, 'pp_bit_xor=' => 7,
+ 'pp_andassign' => 7,
+ 'pp_orassign' => 7,
+ );
+}
+
+sub deparse_binop_right {
+ my $self = shift;
+ my($op, $right, $prec) = @_;
+ if ($right{assoc_class($op)}
+ and $right{assoc_class($op)} == $right{assoc_class($right)})
+ {
+ return $self->deparse($right, $prec - .00001);
+ } else {
+ return $self->deparse($right, $prec);
+ }
+}
+
+sub binop {
+ my $self = shift;
+ my ($op, $cx, $opname, $prec, $flags) = (@_, 0);
+ my $left = $op->first;
+ my $right = $op->last;
+ my $eq = "";
+ if ($op->flags & OPf_STACKED && $flags & ASSIGN) {
+ $eq = "=";
+ $prec = 7;
+ }
+ if ($flags & SWAP_CHILDREN) {
+ ($left, $right) = ($right, $left);
+ }
+ $left = $self->deparse_binop_left($op, $left, $prec);
+ $right = $self->deparse_binop_right($op, $right, $prec);
+ return $self->maybe_parens("$left $opname$eq $right", $cx, $prec);
+}
+
+sub pp_add { binop(@_, "+", 18, ASSIGN) }
+sub pp_multiply { binop(@_, "*", 19, ASSIGN) }
+sub pp_subtract { binop(@_, "-",18, ASSIGN) }
+sub pp_divide { binop(@_, "/", 19, ASSIGN) }
+sub pp_modulo { binop(@_, "%", 19, ASSIGN) }
+sub pp_i_add { binop(@_, "+", 18, ASSIGN) }
+sub pp_i_multiply { binop(@_, "*", 19, ASSIGN) }
+sub pp_i_subtract { binop(@_, "-", 18, ASSIGN) }
+sub pp_i_divide { binop(@_, "/", 19, ASSIGN) }
+sub pp_i_modulo { binop(@_, "%", 19, ASSIGN) }
+sub pp_pow { binop(@_, "**", 22, ASSIGN) }
+
+sub pp_left_shift { binop(@_, "<<", 17, ASSIGN) }
+sub pp_right_shift { binop(@_, ">>", 17, ASSIGN) }
+sub pp_bit_and { binop(@_, "&", 13, ASSIGN) }
+sub pp_bit_or { binop(@_, "|", 12, ASSIGN) }
+sub pp_bit_xor { binop(@_, "^", 12, ASSIGN) }
+
+sub pp_eq { binop(@_, "==", 14) }
+sub pp_ne { binop(@_, "!=", 14) }
+sub pp_lt { binop(@_, "<", 15) }
+sub pp_gt { binop(@_, ">", 15) }
+sub pp_ge { binop(@_, ">=", 15) }
+sub pp_le { binop(@_, "<=", 15) }
+sub pp_ncmp { binop(@_, "<=>", 14) }
+sub pp_i_eq { binop(@_, "==", 14) }
+sub pp_i_ne { binop(@_, "!=", 14) }
+sub pp_i_lt { binop(@_, "<", 15) }
+sub pp_i_gt { binop(@_, ">", 15) }
+sub pp_i_ge { binop(@_, ">=", 15) }
+sub pp_i_le { binop(@_, "<=", 15) }
+sub pp_i_ncmp { binop(@_, "<=>", 14) }
+
+sub pp_seq { binop(@_, "eq", 14) }
+sub pp_sne { binop(@_, "ne", 14) }
+sub pp_slt { binop(@_, "lt", 15) }
+sub pp_sgt { binop(@_, "gt", 15) }
+sub pp_sge { binop(@_, "ge", 15) }
+sub pp_sle { binop(@_, "le", 15) }
+sub pp_scmp { binop(@_, "cmp", 14) }
+
+sub pp_sassign { binop(@_, "=", 7, SWAP_CHILDREN) }
+sub pp_aassign { binop(@_, "=", 7, SWAP_CHILDREN) }
+
+# `.' is special because concats-of-concats are optimized to save copying
+# by making all but the first concat stacked. The effect is as if the
+# programmer had written `($a . $b) .= $c', except legal.
+sub pp_concat {
+ my $self = shift;
+ my($op, $cx) = @_;
+ my $left = $op->first;
+ my $right = $op->last;
+ my $eq = "";
+ my $prec = 18;
+ if ($op->flags & OPf_STACKED and $op->first->ppaddr ne "pp_concat") {
+ $eq = "=";
+ $prec = 7;
+ }
+ $left = $self->deparse_binop_left($op, $left, $prec);
+ $right = $self->deparse_binop_right($op, $right, $prec);
+ return $self->maybe_parens("$left .$eq $right", $cx, $prec);
+}
+
+# `x' is weird when the left arg is a list
+sub pp_repeat {
+ my $self = shift;
+ my($op, $cx) = @_;
+ my $left = $op->first;
+ my $right = $op->last;
+ my $eq = "";
+ my $prec = 19;
+ if ($op->flags & OPf_STACKED) {
+ $eq = "=";
+ $prec = 7;
+ }
+ if (null($right)) { # list repeat; count is inside left-side ex-list
+ my $kid = $left->first->sibling; # skip pushmark
+ my @exprs;
+ for (; !null($kid->sibling); $kid = $kid->sibling) {
+ push @exprs, $self->deparse($kid, 6);
+ }
+ $right = $kid;
+ $left = "(" . join(", ", @exprs). ")";
+ } else {
+ $left = $self->deparse_binop_left($op, $left, $prec);
+ }
+ $right = $self->deparse_binop_right($op, $right, $prec);
+ return $self->maybe_parens("$left x$eq $right", $cx, $prec);
+}
+
+sub range {
+ my $self = shift;
+ my ($op, $cx, $type) = @_;
+ my $left = $op->first;
+ my $right = $left->sibling;
+ $left = $self->deparse($left, 9);
+ $right = $self->deparse($right, 9);
+ return $self->maybe_parens("$left $type $right", $cx, 9);
+}
+
+sub pp_flop {
+ my $self = shift;
+ my($op, $cx) = @_;
+ my $flip = $op->first;
+ my $type = ($flip->flags & OPf_SPECIAL) ? "..." : "..";
+ return $self->range($flip->first, $cx, $type);
+}
+
+# one-line while/until is handled in pp_leave
+
+sub logop {
+ my $self = shift;
+ my ($op, $cx, $lowop, $lowprec, $highop, $highprec, $blockname) = @_;
+ my $left = $op->first;
+ my $right = $op->first->sibling;
+ if ($cx == 0 and is_scope($right) and $blockname) { # if ($a) {$b}
+ $left = $self->deparse($left, 1);
+ $right = $self->deparse($right, 0);
+ return "$blockname ($left) {\n\t$right\n\b}\cK";
+ } elsif ($cx == 0 and $blockname and not $self->{'parens'}) { # $b if $a
+ $right = $self->deparse($right, 1);
+ $left = $self->deparse($left, 1);
+ return "$right $blockname $left";
+ } elsif ($cx > $lowprec and $highop) { # $a && $b
+ $left = $self->deparse_binop_left($op, $left, $highprec);
+ $right = $self->deparse_binop_right($op, $right, $highprec);
+ return $self->maybe_parens("$left $highop $right", $cx, $highprec);
+ } else { # $a and $b
+ $left = $self->deparse_binop_left($op, $left, $lowprec);
+ $right = $self->deparse_binop_right($op, $right, $lowprec);
+ return $self->maybe_parens("$left $lowop $right", $cx, $lowprec);
+ }
+}
+
+sub pp_and { logop(@_, "and", 3, "&&", 11, "if") }
+sub pp_or { logop(@_, "or", 2, "||", 10, "unless") }
+sub pp_xor { logop(@_, "xor", 2, "", 0, "") }
+
+sub logassignop {
+ my $self = shift;
+ my ($op, $cx, $opname) = @_;
+ my $left = $op->first;
+ my $right = $op->first->sibling->first; # skip sassign
+ $left = $self->deparse($left, 7);
+ $right = $self->deparse($right, 7);
+ return $self->maybe_parens("$left $opname $right", $cx, 7);
+}
+
+sub pp_andassign { logassignop(@_, "&&=") }
+sub pp_orassign { logassignop(@_, "||=") }
+
+sub listop {
+ my $self = shift;
+ my($op, $cx, $name) = @_;
+ my(@exprs);
+ my $parens = ($cx >= 5) || $self->{'parens'};
+ my $kid = $op->first->sibling;
+ return $name if null $kid;
+ my $first = $self->deparse($kid, 6);
+ $first = "+$first" if not $parens and substr($first, 0, 1) eq "(";
+ push @exprs, $first;
+ $kid = $kid->sibling;
+ for (; !null($kid); $kid = $kid->sibling) {
+ push @exprs, $self->deparse($kid, 6);
+ }
+ if ($parens) {
+ return "$name(" . join(", ", @exprs) . ")";
+ } else {
+ return "$name " . join(", ", @exprs);
+ }
+}
+
+sub pp_bless { listop(@_, "bless") }
+sub pp_atan2 { listop(@_, "atan2") }
+sub pp_substr { maybe_local(@_, listop(@_, "substr")) }
+sub pp_vec { maybe_local(@_, listop(@_, "vec")) }
+sub pp_index { listop(@_, "index") }
+sub pp_rindex { listop(@_, "rindex") }
+sub pp_sprintf { listop(@_, "sprintf") }
+sub pp_formline { listop(@_, "formline") } # see also deparse_format
+sub pp_crypt { listop(@_, "crypt") }
+sub pp_unpack { listop(@_, "unpack") }
+sub pp_pack { listop(@_, "pack") }
+sub pp_join { listop(@_, "join") }
+sub pp_splice { listop(@_, "splice") }
+sub pp_push { listop(@_, "push") }
+sub pp_unshift { listop(@_, "unshift") }
+sub pp_reverse { listop(@_, "reverse") }
+sub pp_warn { listop(@_, "warn") }
+sub pp_die { listop(@_, "die") }
+# Actually, return is exempt from the LLAFR (see examples in this very
+# module!), but for consistency's sake, ignore that fact
+sub pp_return { listop(@_, "return") }
+sub pp_open { listop(@_, "open") }
+sub pp_pipe_op { listop(@_, "pipe") }
+sub pp_tie { listop(@_, "tie") }
+sub pp_dbmopen { listop(@_, "dbmopen") }
+sub pp_sselect { listop(@_, "select") }
+sub pp_select { listop(@_, "select") }
+sub pp_read { listop(@_, "read") }
+sub pp_sysopen { listop(@_, "sysopen") }
+sub pp_sysseek { listop(@_, "sysseek") }
+sub pp_sysread { listop(@_, "sysread") }
+sub pp_syswrite { listop(@_, "syswrite") }
+sub pp_send { listop(@_, "send") }
+sub pp_recv { listop(@_, "recv") }
+sub pp_seek { listop(@_, "seek") }
+sub pp_fcntl { listop(@_, "fcntl") }
+sub pp_ioctl { listop(@_, "ioctl") }
+sub pp_flock { listop(@_, "flock") }
+sub pp_socket { listop(@_, "socket") }
+sub pp_sockpair { listop(@_, "sockpair") }
+sub pp_bind { listop(@_, "bind") }
+sub pp_connect { listop(@_, "connect") }
+sub pp_listen { listop(@_, "listen") }
+sub pp_accept { listop(@_, "accept") }
+sub pp_shutdown { listop(@_, "shutdown") }
+sub pp_gsockopt { listop(@_, "getsockopt") }
+sub pp_ssockopt { listop(@_, "setsockopt") }
+sub pp_chown { listop(@_, "chown") }
+sub pp_unlink { listop(@_, "unlink") }
+sub pp_chmod { listop(@_, "chmod") }
+sub pp_utime { listop(@_, "utime") }
+sub pp_rename { listop(@_, "rename") }
+sub pp_link { listop(@_, "link") }
+sub pp_symlink { listop(@_, "symlink") }
+sub pp_mkdir { listop(@_, "mkdir") }
+sub pp_open_dir { listop(@_, "opendir") }
+sub pp_seekdir { listop(@_, "seekdir") }
+sub pp_waitpid { listop(@_, "waitpid") }
+sub pp_system { listop(@_, "system") }
+sub pp_exec { listop(@_, "exec") }
+sub pp_kill { listop(@_, "kill") }
+sub pp_setpgrp { listop(@_, "setpgrp") }
+sub pp_getpriority { listop(@_, "getpriority") }
+sub pp_setpriority { listop(@_, "setpriority") }
+sub pp_shmget { listop(@_, "shmget") }
+sub pp_shmctl { listop(@_, "shmctl") }
+sub pp_shmread { listop(@_, "shmread") }
+sub pp_shmwrite { listop(@_, "shmwrite") }
+sub pp_msgget { listop(@_, "msgget") }
+sub pp_msgctl { listop(@_, "msgctl") }
+sub pp_msgsnd { listop(@_, "msgsnd") }
+sub pp_msgrcv { listop(@_, "msgrcv") }
+sub pp_semget { listop(@_, "semget") }
+sub pp_semctl { listop(@_, "semctl") }
+sub pp_semop { listop(@_, "semop") }
+sub pp_ghbyaddr { listop(@_, "gethostbyaddr") }
+sub pp_gnbyaddr { listop(@_, "getnetbyaddr") }
+sub pp_gpbynumber { listop(@_, "getprotobynumber") }
+sub pp_gsbyname { listop(@_, "getservbyname") }
+sub pp_gsbyport { listop(@_, "getservbyport") }
+sub pp_syscall { listop(@_, "syscall") }
+
+sub pp_glob {
+ my $self = shift;
+ my($op, $cx) = @_;
+ my $text = $self->dq($op->first->sibling); # skip pushmark
+ if ($text =~ /^\$?(\w|::|\`)+$/ # could look like a readline
+ or $text =~ /[<>]/) {
+ return 'glob(' . single_delim('qq', '"', $text) . ')';
+ } else {
+ return '<' . $text . '>';
+ }
+}
+
+# Truncate is special because OPf_SPECIAL makes a bareword first arg
+# be a filehandle. This could probably be better fixed in the core
+# by moving the GV lookup into ck_truc.
+
+sub pp_truncate {
+ my $self = shift;
+ my($op, $cx) = @_;
+ my(@exprs);
+ my $parens = ($cx >= 5) || $self->{'parens'};
+ my $kid = $op->first->sibling;
+ my($fh, $len);
+ if ($op->flags & OPf_SPECIAL) {
+ # $kid is an OP_CONST
+ $fh = $kid->sv->PV;
+ } else {
+ $fh = $self->deparse($kid, 6);
+ $fh = "+$fh" if not $parens and substr($fh, 0, 1) eq "(";
+ }
+ my $len = $self->deparse($kid->sibling, 6);
+ if ($parens) {
+ return "truncate($fh, $len)";
+ } else {
+ return "truncate $fh, $len";
+ }
+
+}
+
+sub indirop {
+ my $self = shift;
+ my($op, $cx, $name) = @_;
+ my($expr, @exprs);
+ my $kid = $op->first->sibling;
+ my $indir = "";
+ if ($op->flags & OPf_STACKED) {
+ $indir = $kid;
+ $indir = $indir->first; # skip rv2gv
+ if (is_scope($indir)) {
+ $indir = "{" . $self->deparse($indir, 0) . "}";
+ } else {
+ $indir = $self->deparse($indir, 24);
+ }
+ $indir = $indir . " ";
+ $kid = $kid->sibling;
+ }
+ for (; !null($kid); $kid = $kid->sibling) {
+ $expr = $self->deparse($kid, 6);
+ push @exprs, $expr;
+ }
+ return $self->maybe_parens_func($name,
+ $indir . join(", ", @exprs),
+ $cx, 5);
+}
+
+sub pp_prtf { indirop(@_, "printf") }
+sub pp_print { indirop(@_, "print") }
+sub pp_sort { indirop(@_, "sort") }
+
+sub mapop {
+ my $self = shift;
+ my($op, $cx, $name) = @_;
+ my($expr, @exprs);
+ my $kid = $op->first; # this is the (map|grep)start
+ $kid = $kid->first->sibling; # skip a pushmark
+ my $code = $kid->first; # skip a null
+ if (is_scope $code) {
+ $code = "{" . $self->deparse($code, 1) . "} ";
+ } else {
+ $code = $self->deparse($code, 24) . ", ";
+ }
+ $kid = $kid->sibling;
+ for (; !null($kid); $kid = $kid->sibling) {
+ $expr = $self->deparse($kid, 6);
+ push @exprs, $expr if $expr;
+ }
+ return $self->maybe_parens_func($name, $code . join(", ", @exprs), $cx, 5);
+}
+
+sub pp_mapwhile { mapop(@_, "map") }
+sub pp_grepwhile { mapop(@_, "grep") }
+
+sub pp_list {
+ my $self = shift;
+ my($op, $cx) = @_;
+ my($expr, @exprs);
+ my $kid = $op->first->sibling; # skip pushmark
+ my $lop;
+ my $local = "either"; # could be local(...) or my(...)
+ for ($lop = $kid; !null($lop); $lop = $lop->sibling) {
+ # This assumes that no other private flags equal 128, and that
+ # OPs that store things other than flags in their op_private,
+ # like OP_AELEMFAST, won't be immediate children of a list.
+ unless ($lop->private & OPp_LVAL_INTRO or $lop->ppaddr eq "pp_undef")
+ {
+ $local = ""; # or not
+ last;
+ }
+ if ($lop->ppaddr =~ /^pp_pad[ash]v$/) { # my()
+ ($local = "", last) if $local eq "local";
+ $local = "my";
+ } elsif ($lop->ppaddr ne "pp_undef") { # local()
+ ($local = "", last) if $local eq "my";
+ $local = "local";
+ }
+ }
+ $local = "" if $local eq "either"; # no point if it's all undefs
+ return $self->deparse($kid, $cx) if null $kid->sibling and not $local;
+ for (; !null($kid); $kid = $kid->sibling) {
+ if ($local) {
+ if (class($kid) eq "UNOP" and $kid->first->ppaddr eq "pp_gvsv") {
+ $lop = $kid->first;
+ } else {
+ $lop = $kid;
+ }
+ $self->{'avoid_local'}{$$lop}++;
+ $expr = $self->deparse($kid, 6);
+ delete $self->{'avoid_local'}{$$lop};
+ } else {
+ $expr = $self->deparse($kid, 6);
+ }
+ push @exprs, $expr;
+ }
+ if ($local) {
+ return "$local(" . join(", ", @exprs) . ")";
+ } else {
+ return $self->maybe_parens( join(", ", @exprs), $cx, 6);
+ }
+}
+
+sub pp_cond_expr {
+ my $self = shift;
+ my($op, $cx) = @_;
+ my $cond = $op->first;
+ my $true = $cond->sibling;
+ my $false = $true->sibling;
+ my $cuddle = $self->{'cuddle'};
+ unless ($cx == 0 and is_scope($true) and is_scope($false)) {
+ $cond = $self->deparse($cond, 8);
+ $true = $self->deparse($true, 8);
+ $false = $self->deparse($false, 8);
+ return $self->maybe_parens("$cond ? $true : $false", $cx, 8);
+ }
+ $cond = $self->deparse($cond, 1);
+ $true = $self->deparse($true, 0);
+ if ($false->ppaddr eq "pp_lineseq") { # braces w/o scope => elsif
+ my $head = "if ($cond) {\n\t$true\n\b}";
+ my @elsifs;
+ while (!null($false) and $false->ppaddr eq "pp_lineseq") {
+ my $newop = $false->first->sibling->first;
+ my $newcond = $newop->first;
+ my $newtrue = $newcond->sibling;
+ $false = $newtrue->sibling; # last in chain is OP_AND => no else
+ $newcond = $self->deparse($newcond, 1);
+ $newtrue = $self->deparse($newtrue, 0);
+ push @elsifs, "elsif ($newcond) {\n\t$newtrue\n\b}";
+ }
+ if (!null($false)) {
+ $false = $cuddle . "else {\n\t" .
+ $self->deparse($false, 0) . "\n\b}\cK";
+ } else {
+ $false = "\cK";
+ }
+ return $head . join($cuddle, "", @elsifs) . $false;
+ }
+ $false = $self->deparse($false, 0);
+ return "if ($cond) {\n\t$true\n\b}${cuddle}else {\n\t$false\n\b}\cK";
+}
+
+sub pp_leaveloop {
+ my $self = shift;
+ my($op, $cx) = @_;
+ my $enter = $op->first;
+ my $kid = $enter->sibling;
+ local($self->{'curstash'}) = $self->{'curstash'};
+ my $head = "";
+ my $bare = 0;
+ if ($kid->ppaddr eq "pp_lineseq") { # bare or infinite loop
+ if (is_state $kid->last) { # infinite
+ $head = "for (;;) "; # shorter than while (1)
+ } else {
+ $bare = 1;
+ }
+ } elsif ($enter->ppaddr eq "pp_enteriter") { # foreach
+ my $ary = $enter->first->sibling; # first was pushmark
+ my $var = $ary->sibling;
+ if ($enter->flags & OPf_STACKED
+ and not null $ary->first->sibling->sibling)
+ {
+ $ary = $self->deparse($ary->first->sibling, 9) . " .. " .
+ $self->deparse($ary->first->sibling->sibling, 9);
+ } else {
+ $ary = $self->deparse($ary, 1);
+ }
+ if (null $var) {
+ if ($enter->flags & OPf_SPECIAL) { # thread special var
+ $var = $self->pp_threadsv($enter, 1);
+ } else { # regular my() variable
+ $var = $self->pp_padsv($enter, 1);
+ if ($self->padname_sv($enter->targ)->IVX ==
+ $kid->first->first->sibling->last->cop_seq)
+ {
+ # If the scope of this variable closes at the last
+ # statement of the loop, it must have been
+ # declared here.
+ $var = "my " . $var;
+ }
+ }
+ } elsif ($var->ppaddr eq "pp_rv2gv") {
+ $var = $self->pp_rv2sv($var, 1);
+ } elsif ($var->ppaddr eq "pp_gv") {
+ $var = "\$" . $self->deparse($var, 1);
+ }
+ $head = "foreach $var ($ary) ";
+ $kid = $kid->first->first->sibling; # skip OP_AND and OP_ITER
+ } elsif ($kid->ppaddr eq "pp_null") { # while/until
+ $kid = $kid->first;
+ my $name = {"pp_and" => "while", "pp_or" => "until"}
+ ->{$kid->ppaddr};
+ $head = "$name (" . $self->deparse($kid->first, 1) . ") ";
+ $kid = $kid->first->sibling;
+ } elsif ($kid->ppaddr eq "pp_stub") { # bare and empty
+ return "{;}"; # {} could be a hashref
+ }
+ # The third-to-last kid is the continue block if the pointer used
+ # by `next BLOCK' points to its first OP, which happens to be the
+ # the op_next of the head of the _previous_ statement.
+ # Unless it's a bare loop, in which case it's last, since there's
+ # no unstack or extra nextstate.
+ # Except if the previous head isn't null but the first kid is
+ # (because it's a nulled out nextstate in a scope), in which
+ # case the head's next is advanced past the null but the nextop's
+ # isn't, so we need to try nextop->next.
+ my($cont, $precont);
+ if ($bare) {
+ $cont = $kid->first;
+ while (!null($cont->sibling)) {
+ $precont = $cont;
+ $cont = $cont->sibling;
+ }
+ } else {
+ $cont = $kid->first;
+ while (!null($cont->sibling->sibling->sibling)) {
+ $precont = $cont;
+ $cont = $cont->sibling;
+ }
+ }
+ if ($precont and $ {$precont->next} == $ {$enter->nextop}
+ || $ {$precont->next} == $ {$enter->nextop->next} )
+ {
+ my $state = $kid->first;
+ my $cuddle = $self->{'cuddle'};
+ my($expr, @exprs);
+ for (; $$state != $$cont; $state = $state->sibling) {
+ $expr = "";
+ if (is_state $state) {
+ $expr = $self->deparse($state, 0);
+ $state = $state->sibling;
+ last if null $kid;
+ }
+ $expr .= $self->deparse($state, 0);
+ push @exprs, $expr if $expr;
+ }
+ $kid = join(";\n", @exprs);
+ $cont = $cuddle . "continue {\n\t" .
+ $self->deparse($cont, 0) . "\n\b}\cK";
+ } else {
+ $cont = "\cK";
+ $kid = $self->deparse($kid, 0);
+ }
+ return $head . "{\n\t" . $kid . "\n\b}" . $cont;
+}
+
+sub pp_leavetry {
+ my $self = shift;
+ return "eval {\n\t" . $self->pp_leave(@_) . "\n\b}";
+}
+
+sub OP_CONST () { 5 }
+
+# XXX need a better way to do this
+sub OP_STRINGIFY () { $] > 5.004_72 ? 67 : 65 }
+
+sub pp_null {
+ my $self = shift;
+ my($op, $cx) = @_;
+ if (class($op) eq "OP") {
+ return "'???'" if $op->targ == OP_CONST; # old value is lost
+ } elsif ($op->first->ppaddr eq "pp_pushmark") {
+ return $self->pp_list($op, $cx);
+ } elsif ($op->first->ppaddr eq "pp_enter") {
+ return $self->pp_leave($op, $cx);
+ } elsif ($op->targ == OP_STRINGIFY) {
+ return $self->dquote($op);
+ } elsif (!null($op->first->sibling) and
+ $op->first->sibling->ppaddr eq "pp_readline" and
+ $op->first->sibling->flags & OPf_STACKED) {
+ return $self->maybe_parens($self->deparse($op->first, 7) . " = "
+ . $self->deparse($op->first->sibling, 7),
+ $cx, 7);
+ } elsif (!null($op->first->sibling) and
+ $op->first->sibling->ppaddr eq "pp_trans" and
+ $op->first->sibling->flags & OPf_STACKED) {
+ return $self->maybe_parens($self->deparse($op->first, 20) . " =~ "
+ . $self->deparse($op->first->sibling, 20),
+ $cx, 20);
+ } else {
+ return $self->deparse($op->first, $cx);
+ }
+}
+
+sub padname {
+ my $self = shift;
+ my $targ = shift;
+ my $str = $self->padname_sv($targ)->PV;
+ return padname_fix($str);
+}
+
+sub padany {
+ my $self = shift;
+ my $op = shift;
+ return substr($self->padname($op->targ), 1); # skip $/@/%
+}
+
+sub pp_padsv {
+ my $self = shift;
+ my($op, $cx) = @_;
+ return $self->maybe_my($op, $cx, $self->padname($op->targ));
+}
+
+sub pp_padav { pp_padsv(@_) }
+sub pp_padhv { pp_padsv(@_) }
+
+my @threadsv_names;
+
+BEGIN {
+ @threadsv_names = ("_", "1", "2", "3", "4", "5", "6", "7", "8", "9",
+ "&", "`", "'", "+", "/", ".", ",", "\\", '"', ";",
+ "^", "-", "%", "=", "|", "~", ":", "^A", "^E",
+ "!", "@");
+}
+
+sub pp_threadsv {
+ my $self = shift;
+ my($op, $cx) = @_;
+ return $self->maybe_local($op, $cx, "\$" . $threadsv_names[$op->targ]);
+}
+
+sub pp_gvsv {
+ my $self = shift;
+ my($op, $cx) = @_;
+ return $self->maybe_local($op, $cx, "\$" . $self->gv_name($op->gv));
+}
+
+sub pp_gv {
+ my $self = shift;
+ my($op, $cx) = @_;
+ return $self->gv_name($op->gv);
+}
+
+sub pp_aelemfast {
+ my $self = shift;
+ my($op, $cx) = @_;
+ my $gv = $op->gv;
+ return "\$" . $self->gv_name($gv) . "[" . $op->private . "]";
+}
+
+sub rv2x {
+ my $self = shift;
+ my($op, $cx, $type) = @_;
+ my $kid = $op->first;
+ my $str = $self->deparse($kid, 0);
+ return $type . (is_scalar($kid) ? $str : "{$str}");
+}
+
+sub pp_rv2sv { maybe_local(@_, rv2x(@_, "\$")) }
+sub pp_rv2hv { maybe_local(@_, rv2x(@_, "%")) }
+sub pp_rv2gv { maybe_local(@_, rv2x(@_, "*")) }
+
+# skip rv2av
+sub pp_av2arylen {
+ my $self = shift;
+ my($op, $cx) = @_;
+ if ($op->first->ppaddr eq "pp_padav") {
+ return $self->maybe_local($op, $cx, '$#' . $self->padany($op->first));
+ } else {
+ return $self->maybe_local($op, $cx,
+ $self->rv2x($op->first, $cx, '$#'));
+ }
+}
+
+# skip down to the old, ex-rv2cv
+sub pp_rv2cv { $_[0]->rv2x($_[1]->first->first->sibling, $_[2], "&") }
+
+sub pp_rv2av {
+ my $self = shift;
+ my($op, $cx) = @_;
+ my $kid = $op->first;
+ if ($kid->ppaddr eq "pp_const") { # constant list
+ my $av = $kid->sv;
+ return "(" . join(", ", map(const($_), $av->ARRAY)) . ")";
+ } else {
+ return $self->maybe_local($op, $cx, $self->rv2x($op, $cx, "\@"));
+ }
+ }
+
+
+sub elem {
+ my $self = shift;
+ my ($op, $cx, $left, $right, $padname) = @_;
+ my($array, $idx) = ($op->first, $op->first->sibling);
+ unless ($array->ppaddr eq $padname) { # Maybe this has been fixed
+ $array = $array->first; # skip rv2av (or ex-rv2av in _53+)
+ }
+ if ($array->ppaddr eq $padname) {
+ $array = $self->padany($array);
+ } elsif (is_scope($array)) { # ${expr}[0]
+ $array = "{" . $self->deparse($array, 0) . "}";
+ } elsif (is_scalar $array) { # $x[0], $$x[0], ...
+ $array = $self->deparse($array, 24);
+ } else {
+ # $x[20][3]{hi} or expr->[20]
+ my $arrow;
+ $arrow = "->" if $array->ppaddr !~ /^pp_[ah]elem$/;
+ return $self->deparse($array, 24) . $arrow .
+ $left . $self->deparse($idx, 1) . $right;
+ }
+ $idx = $self->deparse($idx, 1);
+ return "\$" . $array . $left . $idx . $right;
+}
+
+sub pp_aelem { maybe_local(@_, elem(@_, "[", "]", "pp_padav")) }
+sub pp_helem { maybe_local(@_, elem(@_, "{", "}", "pp_padhv")) }
+
+sub pp_gelem {
+ my $self = shift;
+ my($op, $cx) = @_;
+ my($glob, $part) = ($op->first, $op->last);
+ $glob = $glob->first; # skip rv2gv
+ $glob = $glob->first if $glob->ppaddr eq "pp_rv2gv"; # this one's a bug
+ my $scope = is_scope($glob);
+ $glob = $self->deparse($glob, 0);
+ $part = $self->deparse($part, 1);
+ return "*" . ($scope ? "{$glob}" : $glob) . "{$part}";
+}
+
+sub slice {
+ my $self = shift;
+ my ($op, $cx, $left, $right, $regname, $padname) = @_;
+ my $last;
+ my(@elems, $kid, $array, $list);
+ if (class($op) eq "LISTOP") {
+ $last = $op->last;
+ } else { # ex-hslice inside delete()
+ for ($kid = $op->first; !null $kid->sibling; $kid = $kid->sibling) {}
+ $last = $kid;
+ }
+ $array = $last;
+ $array = $array->first
+ if $array->ppaddr eq $regname or $array->ppaddr eq "pp_null";
+ if (is_scope($array)) {
+ $array = "{" . $self->deparse($array, 0) . "}";
+ } elsif ($array->ppaddr eq $padname) {
+ $array = $self->padany($array);
+ } else {
+ $array = $self->deparse($array, 24);
+ }
+ $kid = $op->first->sibling; # skip pushmark
+ if ($kid->ppaddr eq "pp_list") {
+ $kid = $kid->first->sibling; # skip list, pushmark
+ for (; !null $kid; $kid = $kid->sibling) {
+ push @elems, $self->deparse($kid, 6);
+ }
+ $list = join(", ", @elems);
+ } else {
+ $list = $self->deparse($kid, 1);
+ }
+ return "\@" . $array . $left . $list . $right;
+}
+
+sub pp_aslice { maybe_local(@_, slice(@_, "[", "]",
+ "pp_rv2av", "pp_padav")) }
+sub pp_hslice { maybe_local(@_, slice(@_, "{", "}",
+ "pp_rv2hv", "pp_padhv")) }
+
+sub pp_lslice {
+ my $self = shift;
+ my($op, $cx) = @_;
+ my $idx = $op->first;
+ my $list = $op->last;
+ my(@elems, $kid);
+ $list = $self->deparse($list, 1);
+ $idx = $self->deparse($idx, 1);
+ return "($list)" . "[$idx]";
+}
+
+sub OPpENTERSUB_AMPER () { 8 }
+
+sub OPf_WANT () { 3 }
+sub OPf_WANT_VOID () { 1 }
+sub OPf_WANT_SCALAR () { 2 }
+sub OPf_WANT_LIST () { 2 }
+
+sub want_scalar {
+ my $op = shift;
+ return ($op->flags & OPf_WANT) == OPf_WANT_SCALAR;
+}
+
+sub pp_entersub {
+ my $self = shift;
+ my($op, $cx) = @_;
+ my $prefix = "";
+ my $amper = "";
+ my $proto = undef;
+ my $simple = 0;
+ my($kid, $args, @exprs);
+ if (not null $op->first->sibling) { # method
+ $kid = $op->first->sibling; # skip pushmark
+ my $obj = $self->deparse($kid, 24);
+ $kid = $kid->sibling;
+ for (; not null $kid->sibling; $kid = $kid->sibling) {
+ push @exprs, $self->deparse($kid, 6);
+ }
+ my $meth = $kid->first;
+ if ($meth->ppaddr eq "pp_const") {
+ $meth = $meth->sv->PV; # needs to be bare
+ } else {
+ $meth = $self->deparse($meth, 1);
+ }
+ $args = join(", ", @exprs);
+ $kid = $obj . "->" . $meth;
+ if ($args) {
+ return $kid . "(" . $args . ")"; # parens mandatory
+ } else {
+ return $kid; # toke.c fakes parens
+ }
+ }
+ # else, not a method
+ if ($op->flags & OPf_SPECIAL) {
+ $prefix = "do ";
+ } elsif ($op->private & OPpENTERSUB_AMPER) {
+ $amper = "&";
+ }
+ $kid = $op->first;
+ $kid = $kid->first->sibling; # skip ex-list, pushmark
+ for (; not null $kid->sibling; $kid = $kid->sibling) {
+ push @exprs, $kid;
+ }
+ if (is_scope($kid)) {
+ $amper = "&";
+ $kid = "{" . $self->deparse($kid, 0) . "}";
+ } elsif ($kid->first->ppaddr eq "pp_gv") {
+ my $gv = $kid->first->gv;
+ if (class($gv->CV) ne "SPECIAL") {
+ $proto = $gv->CV->PV if $gv->CV->FLAGS & SVf_POK;
+ }
+ $simple = 1;
+ $kid = $self->deparse($kid, 24);
+ } elsif (is_scalar $kid->first) {
+ $amper = "&";
+ $kid = $self->deparse($kid, 24);
+ } else {
+ $prefix = "";
+ $kid = $self->deparse($kid, 24) . "->";
+ }
+ if (defined $proto and not $amper) {
+ my($arg, $real);
+ my $doneok = 0;
+ my @args = @exprs;
+ my @reals;
+ my $p = $proto;
+ $p =~ s/([^\\]|^)([@%])(.*)$/$1$2/;
+ while ($p) {
+ $p =~ s/^ *([\\]?[\$\@&%*]|;)//;
+ my $chr = $1;
+ if ($chr eq "") {
+ undef $proto if @args;
+ } elsif ($chr eq ";") {
+ $doneok = 1;
+ } elsif ($chr eq "@" or $chr eq "%") {
+ push @reals, map($self->deparse($_, 6), @args);
+ @args = ();
+ } else {
+ $arg = shift @args;
+ last unless $arg;
+ if ($chr eq "\$") {
+ if (want_scalar $arg) {
+ push @reals, $self->deparse($arg, 6);
+ } else {
+ undef $proto;
+ }
+ } elsif ($chr eq "&") {
+ if ($arg->ppaddr =~ /pp_(s?refgen|undef)/) {
+ push @reals, $self->deparse($arg, 6);
+ } else {
+ undef $proto;
+ }
+ } elsif ($chr eq "*") {
+ if ($arg->ppaddr =~ /^pp_s?refgen$/
+ and $arg->first->first->ppaddr eq "pp_rv2gv")
+ {
+ $real = $arg->first->first; # skip refgen, null
+ if ($real->first->ppaddr eq "pp_gv") {
+ push @reals, $self->deparse($real, 6);
+ } else {
+ push @reals, $self->deparse($real->first, 6);
+ }
+ } else {
+ undef $proto;
+ }
+ } elsif (substr($chr, 0, 1) eq "\\") {
+ $chr = substr($chr, 1);
+ if ($arg->ppaddr =~ /^pp_s?refgen$/ and
+ !null($real = $arg->first) and
+ ($chr eq "\$" && is_scalar($real->first)
+ or ($chr eq "\@"
+ && $real->first->sibling->ppaddr
+ =~ /^pp_(rv2|pad)av$/)
+ or ($chr eq "%"
+ && $real->first->sibling->ppaddr
+ =~ /^pp_(rv2|pad)hv$/)
+ #or ($chr eq "&" # This doesn't work
+ # && $real->first->ppaddr eq "pp_rv2cv")
+ or ($chr eq "*"
+ && $real->first->ppaddr eq "pp_rv2gv")))
+ {
+ push @reals, $self->deparse($real, 6);
+ } else {
+ undef $proto;
+ }
+ }
+ }
+ }
+ undef $proto if $p and !$doneok;
+ undef $proto if @args;
+ $args = join(", ", @reals);
+ $amper = "";
+ unless (defined $proto) {
+ $amper = "&";
+ $args = join(", ", map($self->deparse($_, 6), @exprs));
+ }
+ } else {
+ $args = join(", ", map($self->deparse($_, 6), @exprs));
+ }
+ if ($prefix or $amper) {
+ if ($op->flags & OPf_STACKED) {
+ return $prefix . $amper . $kid . "(" . $args . ")";
+ } else {
+ return $prefix . $amper. $kid;
+ }
+ } else {
+ if (defined $proto and $proto eq "") {
+ return $kid;
+ } elsif ($proto eq "\$") {
+ return $self->maybe_parens_func($kid, $args, $cx, 16);
+ } elsif ($proto or $simple) {
+ return $self->maybe_parens_func($kid, $args, $cx, 5);
+ } else {
+ return "$kid(" . $args . ")";
+ }
+ }
+}
+
+sub pp_enterwrite { unop(@_, "write") }
+
+# escape things that cause interpolation in double quotes,
+# but not character escapes
+sub uninterp {
+ my($str) = @_;
+ $str =~ s/(^|[^\\])([\$\@]|\\[uUlLQE])/$1\\$2/g;
+ return $str;
+}
+
+# the same, but treat $|, $), and $ at the end of the string differently
+sub re_uninterp {
+ my($str) = @_;
+ $str =~ s/(^|[^\\])(\@|\\[uUlLQE])/$1\\$2/g;
+ $str =~ s/(^|[^\\])(\$[^)|])/$1\\$2/g;
+ return $str;
+}
+
+# character escapes, but not delimiters that might need to be escaped
+sub escape_str { # ASCII
+ my($str) = @_;
+ $str =~ s/\a/\\a/g;
+# $str =~ s/\cH/\\b/g; # \b means someting different in a regex
+ $str =~ s/\t/\\t/g;
+ $str =~ s/\n/\\n/g;
+ $str =~ s/\e/\\e/g;
+ $str =~ s/\f/\\f/g;
+ $str =~ s/\r/\\r/g;
+ $str =~ s/([\cA-\cZ])/'\\c' . chr(ord('@') + ord($1))/ge;
+ $str =~ s/([\0\033-\037\177-\377])/'\\' . sprintf("%03o", ord($1))/ge;
+ return $str;
+}
+
+# Don't do this for regexen
+sub unback {
+ my($str) = @_;
+ $str =~ s/\\/\\\\/g;
+ return $str;
+}
+
+sub balanced_delim {
+ my($str) = @_;
+ my @str = split //, $str;
+ my($ar, $open, $close, $fail, $c, $cnt);
+ for $ar (['[',']'], ['(',')'], ['<','>'], ['{','}']) {
+ ($open, $close) = @$ar;
+ $fail = 0; $cnt = 0;
+ for $c (@str) {
+ if ($c eq $open) {
+ $cnt++;
+ } elsif ($c eq $close) {
+ $cnt--;
+ if ($cnt < 0) {
+ $fail = 1;
+ last;
+ }
+ }
+ }
+ $fail = 1 if $cnt != 0;
+ return ($open, "$open$str$close") if not $fail;
+ }
+ return ("", $str);
+}
+
+sub single_delim {
+ my($q, $default, $str) = @_;
+ return "$default$str$default" if $default and index($str, $default) == -1;
+ my($succeed, $delim);
+ ($succeed, $str) = balanced_delim($str);
+ return "$q$str" if $succeed;
+ for $delim ('/', '"', '#') {
+ return "$q$delim" . $str . $delim if index($str, $delim) == -1;
+ }
+ if ($default) {
+ $str =~ s/$default/\\$default/g;
+ return "$default$str$default";
+ } else {
+ $str =~ s[/][\\/]g;
+ return "$q/$str/";
+ }
+}
+
+sub SVf_IOK () {0x10000}
+sub SVf_NOK () {0x20000}
+sub SVf_ROK () {0x80000}
+
+sub const {
+ my $sv = shift;
+ if (class($sv) eq "SPECIAL") {
+ return ('undef', '1', '0')[$$sv-1];
+ } elsif ($sv->FLAGS & SVf_IOK) {
+ return $sv->IV;
+ } elsif ($sv->FLAGS & SVf_NOK) {
+ return $sv->NV;
+ } elsif ($sv->FLAGS & SVf_ROK) {
+ return "\\(" . const($sv->RV) . ")"; # constant folded
+ } else {
+ my $str = $sv->PV;
+ if ($str =~ /[^ -~]/) { # ASCII
+ return single_delim("qq", '"', uninterp escape_str unback $str);
+ } else {
+ $str =~ s/\\/\\\\/g;
+ return single_delim("q", "'", $str);
+ }
+ }
+}
+
+sub pp_const {
+ my $self = shift;
+ my($op, $cx) = @_;
+# if ($op->private & OPp_CONST_BARE) { # trouble with `=>' autoquoting
+# return $op->sv->PV;
+# }
+ return const($op->sv);
+}
+
+sub dq {
+ my $self = shift;
+ my $op = shift;
+ my $type = $op->ppaddr;
+ if ($type eq "pp_const") {
+ return uninterp(escape_str(unback($op->sv->PV)));
+ } elsif ($type eq "pp_concat") {
+ return $self->dq($op->first) . $self->dq($op->last);
+ } elsif ($type eq "pp_uc") {
+ return '\U' . $self->dq($op->first->sibling) . '\E';
+ } elsif ($type eq "pp_lc") {
+ return '\L' . $self->dq($op->first->sibling) . '\E';
+ } elsif ($type eq "pp_ucfirst") {
+ return '\u' . $self->dq($op->first->sibling);
+ } elsif ($type eq "pp_lcfirst") {
+ return '\l' . $self->dq($op->first->sibling);
+ } elsif ($type eq "pp_quotemeta") {
+ return '\Q' . $self->dq($op->first->sibling) . '\E';
+ } elsif ($type eq "pp_join") {
+ return $self->deparse($op->last, 26); # was join($", @ary)
+ } else {
+ return $self->deparse($op, 26);
+ }
+}
+
+sub pp_backtick {
+ my $self = shift;
+ my($op, $cx) = @_;
+ # skip pushmark
+ return single_delim("qx", '`', $self->dq($op->first->sibling));
+}
+
+sub dquote {
+ my $self = shift;
+ my $op = shift;
+ # skip ex-stringify, pushmark
+ return single_delim("qq", '"', $self->dq($op->first->sibling));
+}
+
+# OP_STRINGIFY is a listop, but it only ever has one arg (?)
+sub pp_stringify { dquote(@_) }
+
+# tr/// and s/// (and tr[][], tr[]//, tr###, etc)
+# note that tr(from)/to/ is OK, but not tr/from/(to)
+sub double_delim {
+ my($from, $to) = @_;
+ my($succeed, $delim);
+ if ($from !~ m[/] and $to !~ m[/]) {
+ return "/$from/$to/";
+ } elsif (($succeed, $from) = balanced_delim($from) and $succeed) {
+ if (($succeed, $to) = balanced_delim($to) and $succeed) {
+ return "$from$to";
+ } else {
+ for $delim ('/', '"', '#') { # note no `'' -- s''' is special
+ return "$from$delim$to$delim" if index($to, $delim) == -1;
+ }
+ $to =~ s[/][\\/]g;
+ return "$from/$to/";
+ }
+ } else {
+ for $delim ('/', '"', '#') { # note no '
+ return "$delim$from$delim$to$delim"
+ if index($to . $from, $delim) == -1;
+ }
+ $from =~ s[/][\\/]g;
+ $to =~ s[/][\\/]g;
+ return "/$from/$to/";
+ }
+}
+
+sub pchr { # ASCII
+ my($n) = @_;
+ if ($n == ord '\\') {
+ return '\\\\';
+ } elsif ($n >= ord(' ') and $n <= ord('~')) {
+ return chr($n);
+ } elsif ($n == ord "\a") {
+ return '\\a';
+ } elsif ($n == ord "\b") {
+ return '\\b';
+ } elsif ($n == ord "\t") {
+ return '\\t';
+ } elsif ($n == ord "\n") {
+ return '\\n';
+ } elsif ($n == ord "\e") {
+ return '\\e';
+ } elsif ($n == ord "\f") {
+ return '\\f';
+ } elsif ($n == ord "\r") {
+ return '\\r';
+ } elsif ($n >= ord("\cA") and $n <= ord("\cZ")) {
+ return '\\c' . chr(ord("@") + $n);
+ } else {
+# return '\x' . sprintf("%02x", $n);
+ return '\\' . sprintf("%03o", $n);
+ }
+}
+
+sub collapse {
+ my(@chars) = @_;
+ my($c, $str, $tr);
+ for ($c = 0; $c < @chars; $c++) {
+ $tr = $chars[$c];
+ $str .= pchr($tr);
+ if ($c <= $#chars - 2 and $chars[$c + 1] == $tr + 1 and
+ $chars[$c + 2] == $tr + 2)
+ {
+ for (; $c <= $#chars and $chars[$c + 1] == $chars[$c] + 1; $c++) {}
+ $str .= "-";
+ $str .= pchr($chars[$c]);
+ }
+ }
+ return $str;
+}
+
+sub OPpTRANS_SQUASH () { 16 }
+sub OPpTRANS_DELETE () { 32 }
+sub OPpTRANS_COMPLEMENT () { 64 }
+
+sub pp_trans {
+ my $self = shift;
+ my($op, $cx) = @_;
+ my(@table) = unpack("s256", $op->pv);
+ my($c, $tr, @from, @to, @delfrom, $delhyphen);
+ if ($table[ord "-"] != -1 and
+ $table[ord("-") - 1] == -1 || $table[ord("-") + 1] == -1)
+ {
+ $tr = $table[ord "-"];
+ $table[ord "-"] = -1;
+ if ($tr >= 0) {
+ @from = ord("-");
+ @to = $tr;
+ } else { # -2 ==> delete
+ $delhyphen = 1;
+ }
+ }
+ for ($c = 0; $c < 256; $c++) {
+ $tr = $table[$c];
+ if ($tr >= 0) {
+ push @from, $c; push @to, $tr;
+ } elsif ($tr == -2) {
+ push @delfrom, $c;
+ }
+ }
+ my $flags;
+ @from = (@from, @delfrom);
+ if ($op->private & OPpTRANS_COMPLEMENT) {
+ $flags .= "c";
+ my @newfrom = ();
+ my %from;
+ @from{@from} = (1) x @from;
+ for ($c = 0; $c < 256; $c++) {
+ push @newfrom, $c unless $from{$c};
+ }
+ @from = @newfrom;
+ }
+ if ($op->private & OPpTRANS_DELETE) {
+ $flags .= "d";
+ } else {
+ pop @to while $#to and $to[$#to] == $to[$#to -1];
+ }
+ $flags .= "s" if $op->private & OPpTRANS_SQUASH;
+ my($from, $to);
+ $from = collapse(@from);
+ $to = collapse(@to);
+ $from .= "-" if $delhyphen;
+ return "tr" . double_delim($from, $to) . $flags;
+}
+
+# Like dq(), but different
+sub re_dq {
+ my $self = shift;
+ my $op = shift;
+ my $type = $op->ppaddr;
+ if ($type eq "pp_const") {
+ return uninterp($op->sv->PV);
+ } elsif ($type eq "pp_concat") {
+ return $self->re_dq($op->first) . $self->re_dq($op->last);
+ } elsif ($type eq "pp_uc") {
+ return '\U' . $self->re_dq($op->first->sibling) . '\E';
+ } elsif ($type eq "pp_lc") {
+ return '\L' . $self->re_dq($op->first->sibling) . '\E';
+ } elsif ($type eq "pp_ucfirst") {
+ return '\u' . $self->re_dq($op->first->sibling);
+ } elsif ($type eq "pp_lcfirst") {
+ return '\l' . $self->re_dq($op->first->sibling);
+ } elsif ($type eq "pp_quotemeta") {
+ return '\Q' . $self->re_dq($op->first->sibling) . '\E';
+ } elsif ($type eq "pp_join") {
+ return $self->deparse($op->last, 26); # was join($", @ary)
+ } else {
+ return $self->deparse($op, 26);
+ }
+}
+
+sub pp_regcomp {
+ my $self = shift;
+ my($op, $cx) = @_;
+ my $kid = $op->first;
+ $kid = $kid->first if $kid->ppaddr eq "pp_regcmaybe";
+ $kid = $kid->first if $kid->ppaddr eq "pp_regcreset";
+ return $self->re_dq($kid);
+}
+
+sub OPp_RUNTIME () { 64 }
+
+sub PMf_ONCE () { 0x2 }
+sub PMf_SKIPWHITE () { 0x10 }
+sub PMf_CONST () { 0x40 }
+sub PMf_KEEP () { 0x80 }
+sub PMf_GLOBAL () { 0x100 }
+sub PMf_CONTINUE () { 0x200 }
+sub PMf_EVAL () { 0x400 }
+sub PMf_LOCALE () { 0x800 }
+sub PMf_MULTILINE () { 0x1000 }
+sub PMf_SINGLELINE () { 0x2000 }
+sub PMf_FOLD () { 0x4000 }
+sub PMf_EXTENDED () { 0x8000 }
+
+# osmic acid -- see osmium tetroxide
+
+my %matchwords;
+map($matchwords{join "", sort split //, $_} = $_, 'cig', 'cog', 'cos', 'cogs',
+ 'cox', 'go', 'is', 'ism', 'iso', 'mig', 'mix', 'osmic', 'ox', 'sic',
+ 'sig', 'six', 'smog', 'so', 'soc', 'sog', 'xi');
+
+sub matchop {
+ my $self = shift;
+ my($op, $cx, $name, $delim) = @_;
+ my $kid = $op->first;
+ my ($binop, $var, $re) = ("", "", "");
+ if ($op->flags & OPf_STACKED) {
+ $binop = 1;
+ $var = $self->deparse($kid, 20);
+ $kid = $kid->sibling;
+ }
+ if (null $kid) {
+ $re = re_uninterp(escape_str($op->precomp));
+ } else {
+ $re = $self->deparse($kid, 1);
+ }
+ my $flags = "";
+ $flags .= "c" if $op->pmflags & PMf_CONTINUE;
+ $flags .= "g" if $op->pmflags & PMf_GLOBAL;
+ $flags .= "i" if $op->pmflags & PMf_FOLD;
+ $flags .= "m" if $op->pmflags & PMf_MULTILINE;
+ $flags .= "o" if $op->pmflags & PMf_KEEP;
+ $flags .= "s" if $op->pmflags & PMf_SINGLELINE;
+ $flags .= "x" if $op->pmflags & PMf_EXTENDED;
+ $flags = $matchwords{$flags} if $matchwords{$flags};
+ if ($op->pmflags & PMf_ONCE) { # only one kind of delimiter works here
+ $re =~ s/\?/\\?/g;
+ $re = "?$re?";
+ } else {
+ $re = single_delim($name, $delim, $re);
+ }
+ $re = $re . $flags;
+ if ($binop) {
+ return $self->maybe_parens("$var =~ $re", $cx, 20);
+ } else {
+ return $re;
+ }
+}
+
+sub pp_match { matchop(@_, "m", "/") }
+sub pp_pushre { matchop(@_, "m", "/") }
+sub pp_qr { matchop(@_, "qr", "") }
+
+sub pp_split {
+ my $self = shift;
+ my($op, $cx) = @_;
+ my($kid, @exprs, $ary, $expr);
+ $kid = $op->first;
+ if ($ {$kid->pmreplroot}) {
+ $ary = '@' . $self->gv_name($kid->pmreplroot);
+ }
+ for (; !null($kid); $kid = $kid->sibling) {
+ push @exprs, $self->deparse($kid, 6);
+ }
+ $expr = "split(" . join(", ", @exprs) . ")";
+ if ($ary) {
+ return $self->maybe_parens("$ary = $expr", $cx, 7);
+ } else {
+ return $expr;
+ }
+}
+
+# oxime -- any of various compounds obtained chiefly by the action of
+# hydroxylamine on aldehydes and ketones and characterized by the
+# bivalent grouping C=NOH [Webster's Tenth]
+
+my %substwords;
+map($substwords{join "", sort split //, $_} = $_, 'ego', 'egoism', 'em',
+ 'es', 'ex', 'exes', 'gee', 'go', 'goes', 'ie', 'ism', 'iso', 'me',
+ 'meese', 'meso', 'mig', 'mix', 'os', 'ox', 'oxime', 'see', 'seem',
+ 'seg', 'sex', 'sig', 'six', 'smog', 'sog', 'some', 'xi');
+
+sub pp_subst {
+ my $self = shift;
+ my($op, $cx) = @_;
+ my $kid = $op->first;
+ my($binop, $var, $re, $repl) = ("", "", "", "");
+ if ($op->flags & OPf_STACKED) {
+ $binop = 1;
+ $var = $self->deparse($kid, 20);
+ $kid = $kid->sibling;
+ }
+ my $flags = "";
+ if (null($op->pmreplroot)) {
+ $repl = $self->dq($kid);
+ $kid = $kid->sibling;
+ } else {
+ $repl = $op->pmreplroot->first; # skip substcont
+ while ($repl->ppaddr eq "pp_entereval") {
+ $repl = $repl->first;
+ $flags .= "e";
+ }
+ $repl = $self->dq($repl);
+ }
+ if (null $kid) {
+ $re = re_uninterp(escape_str($op->precomp));
+ } else {
+ $re = $self->deparse($kid, 1);
+ }
+ $flags .= "e" if $op->pmflags & PMf_EVAL;
+ $flags .= "g" if $op->pmflags & PMf_GLOBAL;
+ $flags .= "i" if $op->pmflags & PMf_FOLD;
+ $flags .= "m" if $op->pmflags & PMf_MULTILINE;
+ $flags .= "o" if $op->pmflags & PMf_KEEP;
+ $flags .= "s" if $op->pmflags & PMf_SINGLELINE;
+ $flags .= "x" if $op->pmflags & PMf_EXTENDED;
+ $flags = $substwords{$flags} if $substwords{$flags};
+ if ($binop) {
+ return $self->maybe_parens("$var =~ s"
+ . double_delim($re, $repl) . $flags,
+ $cx, 20);
+ } else {
+ return "s". double_delim($re, $repl) . $flags;
+ }
+}
+
+1;
+__END__
+
+=head1 NAME
+
+B::Deparse - Perl compiler backend to produce perl code
+
+=head1 SYNOPSIS
+
+B<perl> B<-MO=Deparse>[B<,-u>I<PACKAGE>][B<,-p>][B<,-l>][B<,-s>I<LETTERS>] I<prog.pl>
+
+=head1 DESCRIPTION
+
+B::Deparse is a backend module for the Perl compiler that generates
+perl source code, based on the internal compiled structure that perl
+itself creates after parsing a program. The output of B::Deparse won't
+be exactly the same as the original source, since perl doesn't keep
+track of comments or whitespace, and there isn't a one-to-one
+correspondence between perl's syntactical constructions and their
+compiled form, but it will often be close. When you use the B<-p>
+option, the output also includes parentheses even when they are not
+required by precedence, which can make it easy to see if perl is
+parsing your expressions the way you intended.
+
+Please note that this module is mainly new and untested code and is
+still under development, so it may change in the future.
+
+=head1 OPTIONS
+
+As with all compiler backend options, these must follow directly after
+the '-MO=Deparse', separated by a comma but not any white space.
+
+=over 4
+
+=item B<-p>
+
+Print extra parentheses. Without this option, B::Deparse includes
+parentheses in its output only when they are needed, based on the
+structure of your program. With B<-p>, it uses parentheses (almost)
+whenever they would be legal. This can be useful if you are used to
+LISP, or if you want to see how perl parses your input. If you say
+
+ if ($var & 0x7f == 65) {print "Gimme an A!"}
+ print ($which ? $a : $b), "\n";
+ $name = $ENV{USER} or "Bob";
+
+C<B::Deparse,-p> will print
+
+ if (($var & 0)) {
+ print('Gimme an A!')
+ };
+ (print(($which ? $a : $b)), '???');
+ (($name = $ENV{'USER'}) or '???')
+
+which probably isn't what you intended (the C<'???'> is a sign that
+perl optimized away a constant value).
+
+=item B<-u>I<PACKAGE>
+
+Normally, B::Deparse deparses the main code of a program, all the subs
+called by the main program (and all the subs called by them,
+recursively), and any other subs in the main:: package. To include
+subs in other packages that aren't called directly, such as AUTOLOAD,
+DESTROY, other subs called automatically by perl, and methods, which
+aren't resolved to subs until runtime, use the B<-u> option. The
+argument to B<-u> is the name of a package, and should follow directly
+after the 'u'. Multiple B<-u> options may be given, separated by
+commas. Note that unlike some other backends, B::Deparse doesn't
+(yet) try to guess automatically when B<-u> is needed -- you must
+invoke it yourself.
+
+=item B<-l>
+
+Add '#line' declarations to the output based on the line and file
+locations of the original code.
+
+=item B<-s>I<LETTERS>
+
+Tweak the style of B::Deparse's output. At the moment, only one style
+option is implemented:
+
+=over 4
+
+=item B<C>
+
+Cuddle C<elsif>, C<else>, and C<continue> blocks. For example, print
+
+ if (...) {
+ ...
+ } else {
+ ...
+ }
+
+instead of
+
+ if (...) {
+ ...
+ }
+ else {
+ ...
+ }
+
+The default is not to cuddle.
+
+=back
+
+=back
+
+=head1 BUGS
+
+See the 'to do' list at the beginning of the module file.
+
+=head1 AUTHOR
+
+Stephen McCamant <alias@mcs.com>, based on an earlier version by
+Malcolm Beattie <mbeattie@sable.ox.ac.uk>.
+
+=cut
diff --git a/gnu/usr.bin/perl/ext/B/B/Disassembler.pm b/gnu/usr.bin/perl/ext/B/B/Disassembler.pm
new file mode 100644
index 00000000000..4a008a3750c
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/B/B/Disassembler.pm
@@ -0,0 +1,164 @@
+# Disassembler.pm
+#
+# Copyright (c) 1996 Malcolm Beattie
+#
+# You may distribute under the terms of either the GNU General Public
+# License or the Artistic License, as specified in the README file.
+package B::Disassembler::BytecodeStream;
+use FileHandle;
+use Carp;
+use B qw(cstring cast_I32);
+@ISA = qw(FileHandle);
+sub readn {
+ my ($fh, $len) = @_;
+ my $data;
+ read($fh, $data, $len);
+ croak "reached EOF while reading $len bytes" unless length($data) == $len;
+ return $data;
+}
+
+sub GET_U8 {
+ my $fh = shift;
+ my $c = $fh->getc;
+ croak "reached EOF while reading U8" unless defined($c);
+ return ord($c);
+}
+
+sub GET_U16 {
+ my $fh = shift;
+ my $str = $fh->readn(2);
+ croak "reached EOF while reading U16" unless length($str) == 2;
+ return unpack("n", $str);
+}
+
+sub GET_U32 {
+ my $fh = shift;
+ my $str = $fh->readn(4);
+ croak "reached EOF while reading U32" unless length($str) == 4;
+ return unpack("N", $str);
+}
+
+sub GET_I32 {
+ my $fh = shift;
+ my $str = $fh->readn(4);
+ croak "reached EOF while reading I32" unless length($str) == 4;
+ return cast_I32(unpack("N", $str));
+}
+
+sub GET_objindex {
+ my $fh = shift;
+ my $str = $fh->readn(4);
+ croak "reached EOF while reading objindex" unless length($str) == 4;
+ return unpack("N", $str);
+}
+
+sub GET_strconst {
+ my $fh = shift;
+ my ($str, $c);
+ while (defined($c = $fh->getc) && $c ne "\0") {
+ $str .= $c;
+ }
+ croak "reached EOF while reading strconst" unless defined($c);
+ return cstring($str);
+}
+
+sub GET_pvcontents {}
+
+sub GET_PV {
+ my $fh = shift;
+ my $str;
+ my $len = $fh->GET_U32;
+ if ($len) {
+ read($fh, $str, $len);
+ croak "reached EOF while reading PV" unless length($str) == $len;
+ return cstring($str);
+ } else {
+ return '""';
+ }
+}
+
+sub GET_comment_t {
+ my $fh = shift;
+ my ($str, $c);
+ while (defined($c = $fh->getc) && $c ne "\n") {
+ $str .= $c;
+ }
+ croak "reached EOF while reading comment" unless defined($c);
+ return cstring($str);
+}
+
+sub GET_double {
+ my $fh = shift;
+ my ($str, $c);
+ while (defined($c = $fh->getc) && $c ne "\0") {
+ $str .= $c;
+ }
+ croak "reached EOF while reading double" unless defined($c);
+ return $str;
+}
+
+sub GET_none {}
+
+sub GET_op_tr_array {
+ my $fh = shift;
+ my @ary = unpack("n256", $fh->readn(256 * 2));
+ return join(",", @ary);
+}
+
+sub GET_IV64 {
+ my $fh = shift;
+ my ($hi, $lo) = unpack("NN", $fh->readn(8));
+ return sprintf("0x%4x%04x", $hi, $lo); # cheat
+}
+
+package B::Disassembler;
+use Exporter;
+@ISA = qw(Exporter);
+@EXPORT_OK = qw(disassemble_fh);
+use Carp;
+use strict;
+
+use B::Asmdata qw(%insn_data @insn_name);
+
+sub disassemble_fh {
+ my ($fh, $out) = @_;
+ my ($c, $getmeth, $insn, $arg);
+ bless $fh, "B::Disassembler::BytecodeStream";
+ while (defined($c = $fh->getc)) {
+ $c = ord($c);
+ $insn = $insn_name[$c];
+ if (!defined($insn) || $insn eq "unused") {
+ my $pos = $fh->tell - 1;
+ die "Illegal instruction code $c at stream offset $pos\n";
+ }
+ $getmeth = $insn_data{$insn}->[2];
+ $arg = $fh->$getmeth();
+ if (defined($arg)) {
+ &$out($insn, $arg);
+ } else {
+ &$out($insn);
+ }
+ }
+}
+
+1;
+
+__END__
+
+=head1 NAME
+
+B::Disassembler - Disassemble Perl bytecode
+
+=head1 SYNOPSIS
+
+ use Disassembler;
+
+=head1 DESCRIPTION
+
+See F<ext/B/B/Disassembler.pm>.
+
+=head1 AUTHOR
+
+Malcolm Beattie, C<mbeattie@sable.ox.ac.uk>
+
+=cut
diff --git a/gnu/usr.bin/perl/ext/B/B/Lint.pm b/gnu/usr.bin/perl/ext/B/B/Lint.pm
new file mode 100644
index 00000000000..d34bd7792bc
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/B/B/Lint.pm
@@ -0,0 +1,367 @@
+package B::Lint;
+
+=head1 NAME
+
+B::Lint - Perl lint
+
+=head1 SYNOPSIS
+
+perl -MO=Lint[,OPTIONS] foo.pl
+
+=head1 DESCRIPTION
+
+The B::Lint module is equivalent to an extended version of the B<-w>
+option of B<perl>. It is named after the program B<lint> which carries
+out a similar process for C programs.
+
+=head1 OPTIONS AND LINT CHECKS
+
+Option words are separated by commas (not whitespace) and follow the
+usual conventions of compiler backend options. Following any options
+(indicated by a leading B<->) come lint check arguments. Each such
+argument (apart from the special B<all> and B<none> options) is a
+word representing one possible lint check (turning on that check) or
+is B<no-foo> (turning off that check). Before processing the check
+arguments, a standard list of checks is turned on. Later options
+override earlier ones. Available options are:
+
+=over 8
+
+=item B<context>
+
+Produces a warning whenever an array is used in an implicit scalar
+context. For example, both of the lines
+
+ $foo = length(@bar);
+ $foo = @bar;
+will elicit a warning. Using an explicit B<scalar()> silences the
+warning. For example,
+
+ $foo = scalar(@bar);
+
+=item B<implicit-read> and B<implicit-write>
+
+These options produce a warning whenever an operation implicitly
+reads or (respectively) writes to one of Perl's special variables.
+For example, B<implicit-read> will warn about these:
+
+ /foo/;
+
+and B<implicit-write> will warn about these:
+
+ s/foo/bar/;
+
+Both B<implicit-read> and B<implicit-write> warn about this:
+
+ for (@a) { ... }
+
+=item B<dollar-underscore>
+
+This option warns whenever $_ is used either explicitly anywhere or
+as the implicit argument of a B<print> statement.
+
+=item B<private-names>
+
+This option warns on each use of any variable, subroutine or
+method name that lives in a non-current package but begins with
+an underscore ("_"). Warnings aren't issued for the special case
+of the single character name "_" by itself (e.g. $_ and @_).
+
+=item B<undefined-subs>
+
+This option warns whenever an undefined subroutine is invoked.
+This option will only catch explicitly invoked subroutines such
+as C<foo()> and not indirect invocations such as C<&$subref()>
+or C<$obj-E<gt>meth()>. Note that some programs or modules delay
+definition of subs until runtime by means of the AUTOLOAD
+mechanism.
+
+=item B<regexp-variables>
+
+This option warns whenever one of the regexp variables $', $& or
+$' is used. Any occurrence of any of these variables in your
+program can slow your whole program down. See L<perlre> for
+details.
+
+=item B<all>
+
+Turn all warnings on.
+
+=item B<none>
+
+Turn all warnings off.
+
+=back
+
+=head1 NON LINT-CHECK OPTIONS
+
+=over 8
+
+=item B<-u Package>
+
+Normally, Lint only checks the main code of the program together
+with all subs defined in package main. The B<-u> option lets you
+include other package names whose subs are then checked by Lint.
+
+=back
+
+=head1 BUGS
+
+This is only a very preliminary version.
+
+=head1 AUTHOR
+
+Malcolm Beattie, mbeattie@sable.ox.ac.uk.
+
+=cut
+
+use strict;
+use B qw(walkoptree_slow main_root walksymtable svref_2object parents);
+
+# Constants (should probably be elsewhere)
+sub G_ARRAY () { 1 }
+sub OPf_LIST () { 1 }
+sub OPf_KNOW () { 2 }
+sub OPf_STACKED () { 64 }
+
+my $file = "unknown"; # shadows current filename
+my $line = 0; # shadows current line number
+my $curstash = "main"; # shadows current stash
+
+# Lint checks
+my %check;
+my %implies_ok_context;
+BEGIN {
+ map($implies_ok_context{$_}++,
+ qw(pp_scalar pp_av2arylen pp_aelem pp_aslice pp_helem pp_hslice
+ pp_keys pp_values pp_hslice pp_defined pp_undef pp_delete));
+}
+
+# Lint checks turned on by default
+my @default_checks = qw(context);
+
+my %valid_check;
+# All valid checks
+BEGIN {
+ map($valid_check{$_}++,
+ qw(context implicit_read implicit_write dollar_underscore
+ private_names undefined_subs regexp_variables));
+}
+
+# Debugging options
+my ($debug_op);
+
+my %done_cv; # used to mark which subs have already been linted
+my @extra_packages; # Lint checks mainline code and all subs which are
+ # in main:: or in one of these packages.
+
+sub warning {
+ my $format = (@_ < 2) ? "%s" : shift;
+ warn sprintf("$format at %s line %d\n", @_, $file, $line);
+}
+
+# This gimme can't cope with context that's only determined
+# at runtime via dowantarray().
+sub gimme {
+ my $op = shift;
+ my $flags = $op->flags;
+ if ($flags & OPf_KNOW) {
+ return(($flags & OPf_LIST) ? 1 : 0);
+ }
+ return undef;
+}
+
+sub B::OP::lint {}
+
+sub B::COP::lint {
+ my $op = shift;
+ if ($op->ppaddr eq "pp_nextstate") {
+ $file = $op->filegv->SV->PV;
+ $line = $op->line;
+ $curstash = $op->stash->NAME;
+ }
+}
+
+sub B::UNOP::lint {
+ my $op = shift;
+ my $ppaddr = $op->ppaddr;
+ if ($check{context} && ($ppaddr eq "pp_rv2av" || $ppaddr eq "pp_rv2hv")) {
+ my $parent = parents->[0];
+ my $pname = $parent->ppaddr;
+ return if gimme($op) || $implies_ok_context{$pname};
+ # Two special cases to deal with: "foreach (@foo)" and "delete $a{$b}"
+ # null out the parent so we have to check for a parent of pp_null and
+ # a grandparent of pp_enteriter or pp_delete
+ if ($pname eq "pp_null") {
+ my $gpname = parents->[1]->ppaddr;
+ return if $gpname eq "pp_enteriter" || $gpname eq "pp_delete";
+ }
+ warning("Implicit scalar context for %s in %s",
+ $ppaddr eq "pp_rv2av" ? "array" : "hash", $parent->desc);
+ }
+ if ($check{private_names} && $ppaddr eq "pp_method") {
+ my $methop = $op->first;
+ if ($methop->ppaddr eq "pp_const") {
+ my $method = $methop->sv->PV;
+ if ($method =~ /^_/ && !defined(&{"$curstash\::$method"})) {
+ warning("Illegal reference to private method name $method");
+ }
+ }
+ }
+}
+
+sub B::PMOP::lint {
+ my $op = shift;
+ if ($check{implicit_read}) {
+ my $ppaddr = $op->ppaddr;
+ if ($ppaddr eq "pp_match" && !($op->flags & OPf_STACKED)) {
+ warning('Implicit match on $_');
+ }
+ }
+ if ($check{implicit_write}) {
+ my $ppaddr = $op->ppaddr;
+ if ($ppaddr eq "pp_subst" && !($op->flags & OPf_STACKED)) {
+ warning('Implicit substitution on $_');
+ }
+ }
+}
+
+sub B::LOOP::lint {
+ my $op = shift;
+ if ($check{implicit_read} || $check{implicit_write}) {
+ my $ppaddr = $op->ppaddr;
+ if ($ppaddr eq "pp_enteriter") {
+ my $last = $op->last;
+ if ($last->ppaddr eq "pp_gv" && $last->gv->NAME eq "_") {
+ warning('Implicit use of $_ in foreach');
+ }
+ }
+ }
+}
+
+sub B::GVOP::lint {
+ my $op = shift;
+ if ($check{dollar_underscore} && $op->ppaddr eq "pp_gvsv"
+ && $op->gv->NAME eq "_")
+ {
+ warning('Use of $_');
+ }
+ if ($check{private_names}) {
+ my $ppaddr = $op->ppaddr;
+ my $gv = $op->gv;
+ if (($ppaddr eq "pp_gv" || $ppaddr eq "pp_gvsv")
+ && $gv->NAME =~ /^_./ && $gv->STASH->NAME ne $curstash)
+ {
+ warning('Illegal reference to private name %s', $gv->NAME);
+ }
+ }
+ if ($check{undefined_subs}) {
+ if ($op->ppaddr eq "pp_gv" && $op->next->ppaddr eq "pp_entersub") {
+ my $gv = $op->gv;
+ my $subname = $gv->STASH->NAME . "::" . $gv->NAME;
+ no strict 'refs';
+ if (!defined(&$subname)) {
+ $subname =~ s/^main:://;
+ warning('Undefined subroutine %s called', $subname);
+ }
+ }
+ }
+ if ($check{regexp_variables} && $op->ppaddr eq "pp_gvsv") {
+ my $name = $op->gv->NAME;
+ if ($name =~ /^[&'`]$/) {
+ warning('Use of regexp variable $%s', $name);
+ }
+ }
+}
+
+sub B::GV::lintcv {
+ my $gv = shift;
+ my $cv = $gv->CV;
+ #warn sprintf("lintcv: %s::%s (done=%d)\n",
+ # $gv->STASH->NAME, $gv->NAME, $done_cv{$$cv});#debug
+ return if !$$cv || $done_cv{$$cv}++;
+ my $root = $cv->ROOT;
+ #warn " root = $root (0x$$root)\n";#debug
+ walkoptree_slow($root, "lint") if $$root;
+}
+
+sub do_lint {
+ my %search_pack;
+ walkoptree_slow(main_root, "lint") if ${main_root()};
+
+ # Now do subs in main
+ no strict qw(vars refs);
+ my $sym;
+ local(*glob);
+ while (($sym, *glob) = each %{"main::"}) {
+ #warn "Trying $sym\n";#debug
+ svref_2object(\*glob)->EGV->lintcv unless $sym =~ /::$/;
+ }
+
+ # Now do subs in non-main packages given by -u options
+ map { $search_pack{$_} = 1 } @extra_packages;
+ walksymtable(\%{"main::"}, "lintcv", sub {
+ my $package = shift;
+ $package =~ s/::$//;
+ #warn "Considering $package\n";#debug
+ return exists $search_pack{$package};
+ });
+}
+
+sub compile {
+ my @options = @_;
+ my ($option, $opt, $arg);
+ # Turn on default lint checks
+ for $opt (@default_checks) {
+ $check{$opt} = 1;
+ }
+ OPTION:
+ while ($option = shift @options) {
+ if ($option =~ /^-(.)(.*)/) {
+ $opt = $1;
+ $arg = $2;
+ } else {
+ unshift @options, $option;
+ last OPTION;
+ }
+ if ($opt eq "-" && $arg eq "-") {
+ shift @options;
+ last OPTION;
+ } elsif ($opt eq "D") {
+ $arg ||= shift @options;
+ foreach $arg (split(//, $arg)) {
+ if ($arg eq "o") {
+ B->debug(1);
+ } elsif ($arg eq "O") {
+ $debug_op = 1;
+ }
+ }
+ } elsif ($opt eq "u") {
+ $arg ||= shift @options;
+ push(@extra_packages, $arg);
+ }
+ }
+ foreach $opt (@default_checks, @options) {
+ $opt =~ tr/-/_/;
+ if ($opt eq "all") {
+ %check = %valid_check;
+ }
+ elsif ($opt eq "none") {
+ %check = ();
+ }
+ else {
+ if ($opt =~ s/^no-//) {
+ $check{$opt} = 0;
+ }
+ else {
+ $check{$opt} = 1;
+ }
+ warn "No such check: $opt\n" unless defined $valid_check{$opt};
+ }
+ }
+ # Remaining arguments are things to check
+
+ return \&do_lint;
+}
+
+1;
diff --git a/gnu/usr.bin/perl/ext/B/B/Showlex.pm b/gnu/usr.bin/perl/ext/B/B/Showlex.pm
new file mode 100644
index 00000000000..648f95dcc0a
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/B/B/Showlex.pm
@@ -0,0 +1,80 @@
+package B::Showlex;
+use strict;
+use B qw(svref_2object comppadlist class);
+use B::Terse ();
+
+#
+# Invoke as
+# perl -MO=Showlex,foo bar.pl
+# to see the names of lexical variables used by &foo
+# or as
+# perl -MO=Showlex bar.pl
+# to see the names of file scope lexicals used by bar.pl
+#
+
+sub showarray {
+ my ($name, $av) = @_;
+ my @els = $av->ARRAY;
+ my $count = @els;
+ my $i;
+ print "$name has $count entries\n";
+ for ($i = 0; $i < $count; $i++) {
+ print "$i: ";
+ $els[$i]->terse;
+ }
+}
+
+sub showlex {
+ my ($objname, $namesav, $valsav) = @_;
+ showarray("Pad of lexical names for $objname", $namesav);
+ showarray("Pad of lexical values for $objname", $valsav);
+}
+
+sub showlex_obj {
+ my ($objname, $obj) = @_;
+ $objname =~ s/^&main::/&/;
+ showlex($objname, svref_2object($obj)->PADLIST->ARRAY);
+}
+
+sub showlex_main {
+ showlex("comppadlist", comppadlist->ARRAY);
+}
+
+sub compile {
+ my @options = @_;
+ if (@options) {
+ return sub {
+ my $objname;
+ foreach $objname (@options) {
+ $objname = "main::$objname" unless $objname =~ /::/;
+ eval "showlex_obj('&$objname', \\&$objname)";
+ }
+ }
+ } else {
+ return \&showlex_main;
+ }
+}
+
+1;
+
+__END__
+
+=head1 NAME
+
+B::Showlex - Show lexical variables used in functions or files
+
+=head1 SYNOPSIS
+
+ perl -MO=Showlex[,SUBROUTINE] foo.pl
+
+=head1 DESCRIPTION
+
+When a subroutine name is provided in OPTIONS, prints the lexical
+variables used in that subroutine. Otherwise, prints the file-scope
+lexicals in the file.
+
+=head1 AUTHOR
+
+Malcolm Beattie, C<mbeattie@sable.ox.ac.uk>
+
+=cut
diff --git a/gnu/usr.bin/perl/ext/B/B/Stackobj.pm b/gnu/usr.bin/perl/ext/B/B/Stackobj.pm
new file mode 100644
index 00000000000..eea966ceb6b
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/B/B/Stackobj.pm
@@ -0,0 +1,301 @@
+# Stackobj.pm
+#
+# Copyright (c) 1996 Malcolm Beattie
+#
+# You may distribute under the terms of either the GNU General Public
+# License or the Artistic License, as specified in the README file.
+#
+package B::Stackobj;
+use Exporter ();
+@ISA = qw(Exporter);
+@EXPORT_OK = qw(set_callback T_UNKNOWN T_DOUBLE T_INT
+ VALID_INT VALID_DOUBLE VALID_SV REGISTER TEMPORARY);
+%EXPORT_TAGS = (types => [qw(T_UNKNOWN T_DOUBLE T_INT)],
+ flags => [qw(VALID_INT VALID_DOUBLE VALID_SV
+ REGISTER TEMPORARY)]);
+
+use Carp qw(confess);
+use strict;
+use B qw(class);
+
+# Perl internal constants that I should probably define elsewhere.
+sub SVf_IOK () { 0x10000 }
+sub SVf_NOK () { 0x20000 }
+
+# Types
+sub T_UNKNOWN () { 0 }
+sub T_DOUBLE () { 1 }
+sub T_INT () { 2 }
+
+# Flags
+sub VALID_INT () { 0x01 }
+sub VALID_DOUBLE () { 0x02 }
+sub VALID_SV () { 0x04 }
+sub REGISTER () { 0x08 } # no implicit write-back when calling subs
+sub TEMPORARY () { 0x10 } # no implicit write-back needed at all
+
+#
+# Callback for runtime code generation
+#
+my $runtime_callback = sub { confess "set_callback not yet called" };
+sub set_callback (&) { $runtime_callback = shift }
+sub runtime { &$runtime_callback(@_) }
+
+#
+# Methods
+#
+
+sub write_back { confess "stack object does not implement write_back" }
+
+sub invalidate { shift->{flags} &= ~(VALID_INT | VALID_DOUBLE) }
+
+sub as_sv {
+ my $obj = shift;
+ if (!($obj->{flags} & VALID_SV)) {
+ $obj->write_back;
+ $obj->{flags} |= VALID_SV;
+ }
+ return $obj->{sv};
+}
+
+sub as_int {
+ my $obj = shift;
+ if (!($obj->{flags} & VALID_INT)) {
+ $obj->load_int;
+ $obj->{flags} |= VALID_INT;
+ }
+ return $obj->{iv};
+}
+
+sub as_double {
+ my $obj = shift;
+ if (!($obj->{flags} & VALID_DOUBLE)) {
+ $obj->load_double;
+ $obj->{flags} |= VALID_DOUBLE;
+ }
+ return $obj->{nv};
+}
+
+sub as_numeric {
+ my $obj = shift;
+ return $obj->{type} == T_INT ? $obj->as_int : $obj->as_double;
+}
+
+#
+# Debugging methods
+#
+sub peek {
+ my $obj = shift;
+ my $type = $obj->{type};
+ my $flags = $obj->{flags};
+ my @flags;
+ if ($type == T_UNKNOWN) {
+ $type = "T_UNKNOWN";
+ } elsif ($type == T_INT) {
+ $type = "T_INT";
+ } elsif ($type == T_DOUBLE) {
+ $type = "T_DOUBLE";
+ } else {
+ $type = "(illegal type $type)";
+ }
+ push(@flags, "VALID_INT") if $flags & VALID_INT;
+ push(@flags, "VALID_DOUBLE") if $flags & VALID_DOUBLE;
+ push(@flags, "VALID_SV") if $flags & VALID_SV;
+ push(@flags, "REGISTER") if $flags & REGISTER;
+ push(@flags, "TEMPORARY") if $flags & TEMPORARY;
+ @flags = ("none") unless @flags;
+ return sprintf("%s type=$type flags=%s sv=$obj->{sv}",
+ class($obj), join("|", @flags));
+}
+
+sub minipeek {
+ my $obj = shift;
+ my $type = $obj->{type};
+ my $flags = $obj->{flags};
+ if ($type == T_INT || $flags & VALID_INT) {
+ return $obj->{iv};
+ } elsif ($type == T_DOUBLE || $flags & VALID_DOUBLE) {
+ return $obj->{nv};
+ } else {
+ return $obj->{sv};
+ }
+}
+
+#
+# Caller needs to ensure that set_int, set_double,
+# set_numeric and set_sv are only invoked on legal lvalues.
+#
+sub set_int {
+ my ($obj, $expr) = @_;
+ runtime("$obj->{iv} = $expr;");
+ $obj->{flags} &= ~(VALID_SV | VALID_DOUBLE);
+ $obj->{flags} |= VALID_INT;
+}
+
+sub set_double {
+ my ($obj, $expr) = @_;
+ runtime("$obj->{nv} = $expr;");
+ $obj->{flags} &= ~(VALID_SV | VALID_INT);
+ $obj->{flags} |= VALID_DOUBLE;
+}
+
+sub set_numeric {
+ my ($obj, $expr) = @_;
+ if ($obj->{type} == T_INT) {
+ $obj->set_int($expr);
+ } else {
+ $obj->set_double($expr);
+ }
+}
+
+sub set_sv {
+ my ($obj, $expr) = @_;
+ runtime("SvSetSV($obj->{sv}, $expr);");
+ $obj->invalidate;
+ $obj->{flags} |= VALID_SV;
+}
+
+#
+# Stackobj::Padsv
+#
+
+@B::Stackobj::Padsv::ISA = 'B::Stackobj';
+sub B::Stackobj::Padsv::new {
+ my ($class, $type, $extra_flags, $ix, $iname, $dname) = @_;
+ bless {
+ type => $type,
+ flags => VALID_SV | $extra_flags,
+ sv => "PL_curpad[$ix]",
+ iv => "$iname",
+ nv => "$dname"
+ }, $class;
+}
+
+sub B::Stackobj::Padsv::load_int {
+ my $obj = shift;
+ if ($obj->{flags} & VALID_DOUBLE) {
+ runtime("$obj->{iv} = $obj->{nv};");
+ } else {
+ runtime("$obj->{iv} = SvIV($obj->{sv});");
+ }
+ $obj->{flags} |= VALID_INT;
+}
+
+sub B::Stackobj::Padsv::load_double {
+ my $obj = shift;
+ $obj->write_back;
+ runtime("$obj->{nv} = SvNV($obj->{sv});");
+ $obj->{flags} |= VALID_DOUBLE;
+}
+
+sub B::Stackobj::Padsv::write_back {
+ my $obj = shift;
+ my $flags = $obj->{flags};
+ return if $flags & VALID_SV;
+ if ($flags & VALID_INT) {
+ runtime("sv_setiv($obj->{sv}, $obj->{iv});");
+ } elsif ($flags & VALID_DOUBLE) {
+ runtime("sv_setnv($obj->{sv}, $obj->{nv});");
+ } else {
+ confess "write_back failed for lexical @{[$obj->peek]}\n";
+ }
+ $obj->{flags} |= VALID_SV;
+}
+
+#
+# Stackobj::Const
+#
+
+@B::Stackobj::Const::ISA = 'B::Stackobj';
+sub B::Stackobj::Const::new {
+ my ($class, $sv) = @_;
+ my $obj = bless {
+ flags => 0,
+ sv => $sv # holds the SV object until write_back happens
+ }, $class;
+ my $svflags = $sv->FLAGS;
+ if ($svflags & SVf_IOK) {
+ $obj->{flags} = VALID_INT|VALID_DOUBLE;
+ $obj->{type} = T_INT;
+ $obj->{nv} = $obj->{iv} = $sv->IV;
+ } elsif ($svflags & SVf_NOK) {
+ $obj->{flags} = VALID_INT|VALID_DOUBLE;
+ $obj->{type} = T_DOUBLE;
+ $obj->{iv} = $obj->{nv} = $sv->NV;
+ } else {
+ $obj->{type} = T_UNKNOWN;
+ }
+ return $obj;
+}
+
+sub B::Stackobj::Const::write_back {
+ my $obj = shift;
+ return if $obj->{flags} & VALID_SV;
+ # Save the SV object and replace $obj->{sv} by its C source code name
+ $obj->{sv} = $obj->{sv}->save;
+ $obj->{flags} |= VALID_SV|VALID_INT|VALID_DOUBLE;
+}
+
+sub B::Stackobj::Const::load_int {
+ my $obj = shift;
+ $obj->{iv} = int($obj->{sv}->PV);
+ $obj->{flags} |= VALID_INT;
+}
+
+sub B::Stackobj::Const::load_double {
+ my $obj = shift;
+ $obj->{nv} = $obj->{sv}->PV + 0.0;
+ $obj->{flags} |= VALID_DOUBLE;
+}
+
+sub B::Stackobj::Const::invalidate {}
+
+#
+# Stackobj::Bool
+#
+
+@B::Stackobj::Bool::ISA = 'B::Stackobj';
+sub B::Stackobj::Bool::new {
+ my ($class, $preg) = @_;
+ my $obj = bless {
+ type => T_INT,
+ flags => VALID_INT|VALID_DOUBLE,
+ iv => $$preg,
+ nv => $$preg,
+ preg => $preg # this holds our ref to the pseudo-reg
+ }, $class;
+ return $obj;
+}
+
+sub B::Stackobj::Bool::write_back {
+ my $obj = shift;
+ return if $obj->{flags} & VALID_SV;
+ $obj->{sv} = "($obj->{iv} ? &PL_sv_yes : &PL_sv_no)";
+ $obj->{flags} |= VALID_SV;
+}
+
+# XXX Might want to handle as_double/set_double/load_double?
+
+sub B::Stackobj::Bool::invalidate {}
+
+1;
+
+__END__
+
+=head1 NAME
+
+B::Stackobj - Helper module for CC backend
+
+=head1 SYNOPSIS
+
+ use B::Stackobj;
+
+=head1 DESCRIPTION
+
+See F<ext/B/README>.
+
+=head1 AUTHOR
+
+Malcolm Beattie, C<mbeattie@sable.ox.ac.uk>
+
+=cut
diff --git a/gnu/usr.bin/perl/ext/B/B/Terse.pm b/gnu/usr.bin/perl/ext/B/B/Terse.pm
new file mode 100644
index 00000000000..93757f34ce8
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/B/B/Terse.pm
@@ -0,0 +1,152 @@
+package B::Terse;
+use strict;
+use B qw(peekop class walkoptree_slow walkoptree_exec
+ main_start main_root cstring svref_2object);
+use B::Asmdata qw(@specialsv_name);
+
+sub terse {
+ my ($order, $cvref) = @_;
+ my $cv = svref_2object($cvref);
+ if ($order eq "exec") {
+ walkoptree_exec($cv->START, "terse");
+ } else {
+ walkoptree_slow($cv->ROOT, "terse");
+ }
+}
+
+sub compile {
+ my $order = shift;
+ my @options = @_;
+ if (@options) {
+ return sub {
+ my $objname;
+ foreach $objname (@options) {
+ $objname = "main::$objname" unless $objname =~ /::/;
+ eval "terse(\$order, \\&$objname)";
+ die "terse($order, \\&$objname) failed: $@" if $@;
+ }
+ }
+ } else {
+ if ($order eq "exec") {
+ return sub { walkoptree_exec(main_start, "terse") }
+ } else {
+ return sub { walkoptree_slow(main_root, "terse") }
+ }
+ }
+}
+
+sub indent {
+ my $level = shift;
+ return " " x $level;
+}
+
+sub B::OP::terse {
+ my ($op, $level) = @_;
+ my $targ = $op->targ;
+ $targ = ($targ > 0) ? " [$targ]" : "";
+ print indent($level), peekop($op), $targ, "\n";
+}
+
+sub B::SVOP::terse {
+ my ($op, $level) = @_;
+ print indent($level), peekop($op), " ";
+ $op->sv->terse(0);
+}
+
+sub B::GVOP::terse {
+ my ($op, $level) = @_;
+ print indent($level), peekop($op), " ";
+ $op->gv->terse(0);
+}
+
+sub B::PMOP::terse {
+ my ($op, $level) = @_;
+ my $precomp = $op->precomp;
+ print indent($level), peekop($op),
+ defined($precomp) ? " /$precomp/\n" : " (regexp not compiled)\n";
+
+}
+
+sub B::PVOP::terse {
+ my ($op, $level) = @_;
+ print indent($level), peekop($op), " ", cstring($op->pv), "\n";
+}
+
+sub B::COP::terse {
+ my ($op, $level) = @_;
+ my $label = $op->label;
+ if ($label) {
+ $label = " label ".cstring($label);
+ }
+ print indent($level), peekop($op), $label, "\n";
+}
+
+sub B::PV::terse {
+ my ($sv, $level) = @_;
+ print indent($level);
+ printf "%s (0x%lx) %s\n", class($sv), $$sv, cstring($sv->PV);
+}
+
+sub B::AV::terse {
+ my ($sv, $level) = @_;
+ print indent($level);
+ printf "%s (0x%lx) FILL %d\n", class($sv), $$sv, $sv->FILL;
+}
+
+sub B::GV::terse {
+ my ($gv, $level) = @_;
+ my $stash = $gv->STASH->NAME;
+ if ($stash eq "main") {
+ $stash = "";
+ } else {
+ $stash = $stash . "::";
+ }
+ print indent($level);
+ printf "%s (0x%lx) *%s%s\n", class($gv), $$gv, $stash, $gv->NAME;
+}
+
+sub B::IV::terse {
+ my ($sv, $level) = @_;
+ print indent($level);
+ printf "%s (0x%lx) %d\n", class($sv), $$sv, $sv->IV;
+}
+
+sub B::NV::terse {
+ my ($sv, $level) = @_;
+ print indent($level);
+ printf "%s (0x%lx) %s\n", class($sv), $$sv, $sv->NV;
+}
+
+sub B::NULL::terse {
+ my ($sv, $level) = @_;
+ print indent($level);
+ printf "%s (0x%lx)\n", class($sv), $$sv;
+}
+
+sub B::SPECIAL::terse {
+ my ($sv, $level) = @_;
+ print indent($level);
+ printf "%s #%d %s\n", class($sv), $$sv, $specialsv_name[$$sv];
+}
+
+1;
+
+__END__
+
+=head1 NAME
+
+B::Terse - Walk Perl syntax tree, printing terse info about ops
+
+=head1 SYNOPSIS
+
+ perl -MO=Terse[,OPTIONS] foo.pl
+
+=head1 DESCRIPTION
+
+See F<ext/B/README>.
+
+=head1 AUTHOR
+
+Malcolm Beattie, C<mbeattie@sable.ox.ac.uk>
+
+=cut
diff --git a/gnu/usr.bin/perl/ext/B/B/Xref.pm b/gnu/usr.bin/perl/ext/B/B/Xref.pm
new file mode 100644
index 00000000000..0102856919a
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/B/B/Xref.pm
@@ -0,0 +1,392 @@
+package B::Xref;
+
+=head1 NAME
+
+B::Xref - Generates cross reference reports for Perl programs
+
+=head1 SYNOPSIS
+
+perl -MO=Xref[,OPTIONS] foo.pl
+
+=head1 DESCRIPTION
+
+The B::Xref module is used to generate a cross reference listing of all
+definitions and uses of variables, subroutines and formats in a Perl program.
+It is implemented as a backend for the Perl compiler.
+
+The report generated is in the following format:
+
+ File filename1
+ Subroutine subname1
+ Package package1
+ object1 C<line numbers>
+ object2 C<line numbers>
+ ...
+ Package package2
+ ...
+
+Each B<File> section reports on a single file. Each B<Subroutine> section
+reports on a single subroutine apart from the special cases
+"(definitions)" and "(main)". These report, respectively, on subroutine
+definitions found by the initial symbol table walk and on the main part of
+the program or module external to all subroutines.
+
+The report is then grouped by the B<Package> of each variable,
+subroutine or format with the special case "(lexicals)" meaning
+lexical variables. Each B<object> name (implicitly qualified by its
+containing B<Package>) includes its type character(s) at the beginning
+where possible. Lexical variables are easier to track and even
+included dereferencing information where possible.
+
+The C<line numbers> are a comma separated list of line numbers (some
+preceded by code letters) where that object is used in some way.
+Simple uses aren't preceded by a code letter. Introductions (such as
+where a lexical is first defined with C<my>) are indicated with the
+letter "i". Subroutine and method calls are indicated by the character
+"&". Subroutine definitions are indicated by "s" and format
+definitions by "f".
+
+=head1 OPTIONS
+
+Option words are separated by commas (not whitespace) and follow the
+usual conventions of compiler backend options.
+
+=over 8
+
+=item C<-oFILENAME>
+
+Directs output to C<FILENAME> instead of standard output.
+
+=item C<-r>
+
+Raw output. Instead of producing a human-readable report, outputs a line
+in machine-readable form for each definition/use of a variable/sub/format.
+
+=item C<-D[tO]>
+
+(Internal) debug options, probably only useful if C<-r> included.
+The C<t> option prints the object on the top of the stack as it's
+being tracked. The C<O> option prints each operator as it's being
+processed in the execution order of the program.
+
+=back
+
+=head1 BUGS
+
+Non-lexical variables are quite difficult to track through a program.
+Sometimes the type of a non-lexical variable's use is impossible to
+determine. Introductions of non-lexical non-scalars don't seem to be
+reported properly.
+
+=head1 AUTHOR
+
+Malcolm Beattie, mbeattie@sable.ox.ac.uk.
+
+=cut
+
+use strict;
+use B qw(peekop class comppadlist main_start svref_2object walksymtable);
+
+# Constants (should probably be elsewhere)
+sub OPpLVAL_INTRO () { 128 }
+sub SVf_POK () { 0x40000 }
+
+sub UNKNOWN { ["?", "?", "?"] }
+
+my @pad; # lexicals in current pad
+ # as ["(lexical)", type, name]
+my %done; # keyed by $$op: set when each $op is done
+my $top = UNKNOWN; # shadows top element of stack as
+ # [pack, type, name] (pack can be "(lexical)")
+my $file; # shadows current filename
+my $line; # shadows current line number
+my $subname; # shadows current sub name
+my %table; # Multi-level hash to record all uses etc.
+my @todo = (); # List of CVs that need processing
+
+my %code = (intro => "i", used => "",
+ subdef => "s", subused => "&",
+ formdef => "f", meth => "->");
+
+
+# Options
+my ($debug_op, $debug_top, $nodefs, $raw);
+
+sub process {
+ my ($var, $event) = @_;
+ my ($pack, $type, $name) = @$var;
+ if ($type eq "*") {
+ if ($event eq "used") {
+ return;
+ } elsif ($event eq "subused") {
+ $type = "&";
+ }
+ }
+ $type =~ s/(.)\*$/$1/g;
+ if ($raw) {
+ printf "%-16s %-12s %5d %-12s %4s %-16s %s\n",
+ $file, $subname, $line, $pack, $type, $name, $event;
+ } else {
+ # Wheee
+ push(@{$table{$file}->{$subname}->{$pack}->{$type.$name}->{$event}},
+ $line);
+ }
+}
+
+sub load_pad {
+ my $padlist = shift;
+ my ($namelistav, @namelist, $ix);
+ @pad = ();
+ return if class($padlist) eq "SPECIAL";
+ ($namelistav) = $padlist->ARRAY;
+ @namelist = $namelistav->ARRAY;
+ for ($ix = 1; $ix < @namelist; $ix++) {
+ my $namesv = $namelist[$ix];
+ next if class($namesv) eq "SPECIAL";
+ my ($type, $name) = $namesv->PV =~ /^(.)(.*)$/;
+ $pad[$ix] = ["(lexical)", $type, $name];
+ }
+}
+
+sub xref {
+ my $start = shift;
+ my $op;
+ for ($op = $start; $$op; $op = $op->next) {
+ last if $done{$$op}++;
+ warn sprintf("top = [%s, %s, %s]\n", @$top) if $debug_top;
+ warn peekop($op), "\n" if $debug_op;
+ my $ppname = $op->ppaddr;
+ if ($ppname =~ /^pp_(or|and|mapwhile|grepwhile)$/) {
+ xref($op->other);
+ } elsif ($ppname eq "pp_match" || $ppname eq "pp_subst") {
+ xref($op->pmreplstart);
+ } elsif ($ppname eq "pp_substcont") {
+ xref($op->other->pmreplstart);
+ $op = $op->other;
+ redo;
+ } elsif ($ppname eq "pp_cond_expr") {
+ # pp_cond_expr never returns op_next
+ xref($op->true);
+ $op = $op->false;
+ redo;
+ } elsif ($ppname eq "pp_enterloop") {
+ xref($op->redoop);
+ xref($op->nextop);
+ xref($op->lastop);
+ } elsif ($ppname eq "pp_subst") {
+ xref($op->pmreplstart);
+ } else {
+ no strict 'refs';
+ &$ppname($op) if defined(&$ppname);
+ }
+ }
+}
+
+sub xref_cv {
+ my $cv = shift;
+ my $pack = $cv->GV->STASH->NAME;
+ $subname = ($pack eq "main" ? "" : "$pack\::") . $cv->GV->NAME;
+ load_pad($cv->PADLIST);
+ xref($cv->START);
+ $subname = "(main)";
+}
+
+sub xref_object {
+ my $cvref = shift;
+ xref_cv(svref_2object($cvref));
+}
+
+sub xref_main {
+ $subname = "(main)";
+ load_pad(comppadlist);
+ xref(main_start);
+ while (@todo) {
+ xref_cv(shift @todo);
+ }
+}
+
+sub pp_nextstate {
+ my $op = shift;
+ $file = $op->filegv->SV->PV;
+ $line = $op->line;
+ $top = UNKNOWN;
+}
+
+sub pp_padsv {
+ my $op = shift;
+ $top = $pad[$op->targ];
+ process($top, $op->private & OPpLVAL_INTRO ? "intro" : "used");
+}
+
+sub pp_padav { pp_padsv(@_) }
+sub pp_padhv { pp_padsv(@_) }
+
+sub deref {
+ my ($var, $as) = @_;
+ $var->[1] = $as . $var->[1];
+ process($var, "used");
+}
+
+sub pp_rv2cv { deref($top, "&"); }
+sub pp_rv2hv { deref($top, "%"); }
+sub pp_rv2sv { deref($top, "\$"); }
+sub pp_rv2av { deref($top, "\@"); }
+sub pp_rv2gv { deref($top, "*"); }
+
+sub pp_gvsv {
+ my $op = shift;
+ my $gv = $op->gv;
+ $top = [$gv->STASH->NAME, '$', $gv->NAME];
+ process($top, $op->private & OPpLVAL_INTRO ? "intro" : "used");
+}
+
+sub pp_gv {
+ my $op = shift;
+ my $gv = $op->gv;
+ $top = [$gv->STASH->NAME, "*", $gv->NAME];
+ process($top, $op->private & OPpLVAL_INTRO ? "intro" : "used");
+}
+
+sub pp_const {
+ my $op = shift;
+ my $sv = $op->sv;
+ $top = ["?", "",
+ (class($sv) ne "SPECIAL" && $sv->FLAGS & SVf_POK) ? $sv->PV : "?"];
+}
+
+sub pp_method {
+ my $op = shift;
+ $top = ["(method)", "->".$top->[1], $top->[2]];
+}
+
+sub pp_entersub {
+ my $op = shift;
+ if ($top->[1] eq "m") {
+ process($top, "meth");
+ } else {
+ process($top, "subused");
+ }
+ $top = UNKNOWN;
+}
+
+#
+# Stuff for cross referencing definitions of variables and subs
+#
+
+sub B::GV::xref {
+ my $gv = shift;
+ my $cv = $gv->CV;
+ if ($$cv) {
+ #return if $done{$$cv}++;
+ $file = $gv->FILEGV->SV->PV;
+ $line = $gv->LINE;
+ process([$gv->STASH->NAME, "&", $gv->NAME], "subdef");
+ push(@todo, $cv);
+ }
+ my $form = $gv->FORM;
+ if ($$form) {
+ return if $done{$$form}++;
+ $file = $gv->FILEGV->SV->PV;
+ $line = $gv->LINE;
+ process([$gv->STASH->NAME, "", $gv->NAME], "formdef");
+ }
+}
+
+sub xref_definitions {
+ my ($pack, %exclude);
+ return if $nodefs;
+ $subname = "(definitions)";
+ foreach $pack (qw(B O AutoLoader DynaLoader Config DB VMS
+ strict vars FileHandle Exporter Carp)) {
+ $exclude{$pack."::"} = 1;
+ }
+ no strict qw(vars refs);
+ walksymtable(\%{"main::"}, "xref", sub { !defined($exclude{$_[0]}) });
+}
+
+sub output {
+ return if $raw;
+ my ($file, $subname, $pack, $name, $ev, $perfile, $persubname,
+ $perpack, $pername, $perev);
+ foreach $file (sort(keys(%table))) {
+ $perfile = $table{$file};
+ print "File $file\n";
+ foreach $subname (sort(keys(%$perfile))) {
+ $persubname = $perfile->{$subname};
+ print " Subroutine $subname\n";
+ foreach $pack (sort(keys(%$persubname))) {
+ $perpack = $persubname->{$pack};
+ print " Package $pack\n";
+ foreach $name (sort(keys(%$perpack))) {
+ $pername = $perpack->{$name};
+ my @lines;
+ foreach $ev (qw(intro formdef subdef meth subused used)) {
+ $perev = $pername->{$ev};
+ if (defined($perev) && @$perev) {
+ my $code = $code{$ev};
+ push(@lines, map("$code$_", @$perev));
+ }
+ }
+ printf " %-16s %s\n", $name, join(", ", @lines);
+ }
+ }
+ }
+ }
+}
+
+sub compile {
+ my @options = @_;
+ my ($option, $opt, $arg);
+ OPTION:
+ while ($option = shift @options) {
+ if ($option =~ /^-(.)(.*)/) {
+ $opt = $1;
+ $arg = $2;
+ } else {
+ unshift @options, $option;
+ last OPTION;
+ }
+ if ($opt eq "-" && $arg eq "-") {
+ shift @options;
+ last OPTION;
+ } elsif ($opt eq "o") {
+ $arg ||= shift @options;
+ open(STDOUT, ">$arg") or return "$arg: $!\n";
+ } elsif ($opt eq "d") {
+ $nodefs = 1;
+ } elsif ($opt eq "r") {
+ $raw = 1;
+ } elsif ($opt eq "D") {
+ $arg ||= shift @options;
+ foreach $arg (split(//, $arg)) {
+ if ($arg eq "o") {
+ B->debug(1);
+ } elsif ($arg eq "O") {
+ $debug_op = 1;
+ } elsif ($arg eq "t") {
+ $debug_top = 1;
+ }
+ }
+ }
+ }
+ if (@options) {
+ return sub {
+ my $objname;
+ xref_definitions();
+ foreach $objname (@options) {
+ $objname = "main::$objname" unless $objname =~ /::/;
+ eval "xref_object(\\&$objname)";
+ die "xref_object(\\&$objname) failed: $@" if $@;
+ }
+ output();
+ }
+ } else {
+ return sub {
+ xref_definitions();
+ xref_main();
+ output();
+ }
+ }
+}
+
+1;
diff --git a/gnu/usr.bin/perl/ext/B/B/assemble b/gnu/usr.bin/perl/ext/B/B/assemble
new file mode 100644
index 00000000000..43cc5bc4b33
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/B/B/assemble
@@ -0,0 +1,30 @@
+use B::Assembler qw(assemble_fh);
+use FileHandle;
+
+my ($filename, $fh, $out);
+
+if ($ARGV[0] eq "-d") {
+ B::Assembler::debug(1);
+ shift;
+}
+
+$out = \*STDOUT;
+
+if (@ARGV == 0) {
+ $fh = \*STDIN;
+ $filename = "-";
+} elsif (@ARGV == 1) {
+ $filename = $ARGV[0];
+ $fh = new FileHandle "<$filename";
+} elsif (@ARGV == 2) {
+ $filename = $ARGV[0];
+ $fh = new FileHandle "<$filename";
+ $out = new FileHandle ">$ARGV[1]";
+} else {
+ die "Usage: assemble [filename] [outfilename]\n";
+}
+
+binmode $out;
+$SIG{__WARN__} = sub { warn "$filename:@_" };
+$SIG{__DIE__} = sub { die "$filename: @_" };
+assemble_fh($fh, sub { print $out @_ });
diff --git a/gnu/usr.bin/perl/ext/B/B/cc_harness b/gnu/usr.bin/perl/ext/B/B/cc_harness
new file mode 100644
index 00000000000..79f8727a8f0
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/B/B/cc_harness
@@ -0,0 +1,12 @@
+use Config;
+
+$libdir = $ENV{PERL_SRC} || "$Config{installarchlib}/CORE";
+
+if (!grep(/^-[cS]$/, @ARGV)) {
+ $linkargs = sprintf("%s $libdir/$Config{libperl} %s",
+ @Config{qw(ldflags libs)});
+}
+
+$cccmd = "$Config{cc} $Config{ccflags} -I$libdir @ARGV $linkargs";
+print "$cccmd\n";
+exec $cccmd;
diff --git a/gnu/usr.bin/perl/ext/B/B/disassemble b/gnu/usr.bin/perl/ext/B/B/disassemble
new file mode 100644
index 00000000000..6530b809502
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/B/B/disassemble
@@ -0,0 +1,22 @@
+use B::Disassembler qw(disassemble_fh);
+use FileHandle;
+
+my $fh;
+if (@ARGV == 0) {
+ $fh = \*STDIN;
+} elsif (@ARGV == 1) {
+ $fh = new FileHandle "<$ARGV[0]";
+} else {
+ die "Usage: disassemble [filename]\n";
+}
+
+sub print_insn {
+ my ($insn, $arg) = @_;
+ if (defined($arg)) {
+ printf "%s %s\n", $insn, $arg;
+ } else {
+ print $insn, "\n";
+ }
+}
+
+disassemble_fh($fh, \&print_insn);
diff --git a/gnu/usr.bin/perl/ext/B/B/makeliblinks b/gnu/usr.bin/perl/ext/B/B/makeliblinks
new file mode 100644
index 00000000000..82560783c01
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/B/B/makeliblinks
@@ -0,0 +1,54 @@
+use File::Find;
+use Config;
+
+if (@ARGV != 2) {
+ warn <<"EOT";
+Usage: makeliblinks libautodir targetdir
+where libautodir is the architecture-dependent auto directory
+(e.g. $Config::Config{archlib}/auto).
+EOT
+ exit 2;
+}
+
+my ($libautodir, $targetdir) = @ARGV;
+
+# Calculate relative path prefix from $targetdir to $libautodir
+sub relprefix {
+ my ($to, $from) = @_;
+ my $up;
+ for ($up = 0; substr($to, 0, length($from)) ne $from; $up++) {
+ $from =~ s(
+ [^/]+ (?# a group of non-slashes)
+ /* (?# maybe with some trailing slashes)
+ $ (?# at the end of the path)
+ )()x;
+ }
+ return (("../" x $up) . substr($to, length($from)));
+}
+
+my $relprefix = relprefix($libautodir, $targetdir);
+
+my ($dlext, $lib_ext) = @Config::Config{qw(dlext lib_ext)};
+
+sub link_if_library {
+ if (/\.($dlext|$lib_ext)$/o) {
+ my $ext = $1;
+ my $name = $File::Find::name;
+ if (substr($name, 0, length($libautodir) + 1) ne "$libautodir/") {
+ die "directory of $name doesn't match $libautodir\n";
+ }
+ substr($name, 0, length($libautodir) + 1) = '';
+ my @parts = split(m(/), $name);
+ if ($parts[-1] ne "$parts[-2].$ext") {
+ die "module name $_ doesn't match its directory $libautodir\n";
+ }
+ pop @parts;
+ my $libpath = "$targetdir/lib" . join("__", @parts) . ".$ext";
+ print "$libpath -> $relprefix/$name\n";
+ symlink("$relprefix/$name", $libpath)
+ or warn "above link failed with error: $!\n";
+ }
+}
+
+find(\&link_if_library, $libautodir);
+exit 0;
diff --git a/gnu/usr.bin/perl/ext/B/Makefile.PL b/gnu/usr.bin/perl/ext/B/Makefile.PL
new file mode 100644
index 00000000000..80e5e1b905d
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/B/Makefile.PL
@@ -0,0 +1,46 @@
+use ExtUtils::MakeMaker;
+use Config;
+
+my $e = $Config{'exe_ext'};
+my $o = $Config{'obj_ext'};
+my $exeout_flag = '-o ';
+if ($^O eq 'MSWin32') {
+ if ($Config{'cc'} =~ /^cl/i) {
+ $exeout_flag = '-Fe';
+ }
+ elsif ($Config{'cc'} =~ /^bcc/i) {
+ $exeout_flag = '-e';
+ }
+}
+
+WriteMakefile(
+ NAME => "B",
+ VERSION => "a5",
+ MAN3PODS => {},
+ clean => {
+ FILES => "perl$e byteperl$e *$o B.c *~"
+ }
+);
+
+sub MY::post_constants {
+ "\nLIBS = $Config{libs}\n"
+}
+
+# Leave out doing byteperl for now. Probably should be built in the
+# core directory or somewhere else rather than here
+#sub MY::top_targets {
+# my $self = shift;
+# my $targets = $self->MM::top_targets();
+# $targets =~ s/^(all ::.*)$/$1 byteperl$e/m;
+# return <<"EOT" . $targets;
+
+#
+# byteperl is *not* a standard perl+XSUB executable. It's a special
+# program for running standalone bytecode executables. It isn't an XSUB
+# at the moment because a standlone Perl program needs to set up curpad
+# which is overwritten on exit from an XSUB.
+#
+#byteperl$e : byteperl$o B$o \$(PERL_SRC)/byterun$o
+# \$(CC) ${exeout_flag}byteperl$e byteperl$o B$o byterun$o \$(LDFLAGS) \$(PERL_ARCHLIB)/CORE/$Config{libperl} \$(LIBS)
+#EOT
+#}
diff --git a/gnu/usr.bin/perl/ext/B/NOTES b/gnu/usr.bin/perl/ext/B/NOTES
new file mode 100644
index 00000000000..ee10ba03e97
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/B/NOTES
@@ -0,0 +1,168 @@
+C backend invocation
+ If there are any non-option arguments, they are taken to be
+ names of objects to be saved (probably doesn't work properly yet).
+ Without extra arguments, it saves the main program.
+ -ofilename Output to filename instead of STDOUT
+ -v Verbose (currently gives a few compilation statistics)
+ -- Force end of options
+ -uPackname Force apparently unused subs from package Packname to
+ be compiled. This allows programs to use eval "foo()"
+ even when sub foo is never seen to be used at compile
+ time. The down side is that any subs which really are
+ never used also have code generated. This option is
+ necessary, for example, if you have a signal handler
+ foo which you initialise with $SIG{BAR} = "foo".
+ A better fix, though, is just to change it to
+ $SIG{BAR} = \&foo. You can have multiple -u options.
+ -D Debug options (concat or separate flags like perl -D)
+ o OPs, prints each OP as it's processed
+ c COPs, prints COPs as processed (incl. file & line num)
+ A prints AV information on saving
+ C prints CV information on saving
+ M prints MAGIC information on saving
+ -f Force optimisations on or off one at a time.
+ cog Copy-on-grow: PVs declared and initialised statically
+ no-cog No copy-on-grow
+ -On Optimisation level (n = 0, 1, 2, ...). -O means -O1.
+ Currently, -O1 and higher set -fcog.
+
+Examples
+ perl -MO=C foo.pl > foo.c
+ perl cc_harness -o foo foo.c
+
+ perl -MO=C,-v,-DcA bar.pl > /dev/null
+
+CC backend invocation
+ If there are any non-option arguments, they are taken to be names of
+ subs to be saved. Without extra arguments, it saves the main program.
+ -ofilename Output to filename instead of STDOUT
+ -- Force end of options
+ -uPackname Force apparently unused subs from package Packname to
+ be compiled. This allows programs to use eval "foo()"
+ even when sub foo is never seen to be used at compile
+ time. The down side is that any subs which really are
+ never used also have code generated. This option is
+ necessary, for example, if you have a signal handler
+ foo which you initialise with $SIG{BAR} = "foo".
+ A better fix, though, is just to change it to
+ $SIG{BAR} = \&foo. You can have multiple -u options.
+ -mModulename Instead of generating source for a runnable executable,
+ generate source for an XSUB module. The
+ boot_Modulename function (which DynaLoader can look
+ for) does the appropriate initialisation and runs the
+ main part of the Perl source that is being compiled.
+ -pn Generate code for perl patchlevel n (e.g. 3 or 4).
+ The default is to generate C code which will link
+ with the currently executing version of perl.
+ running the perl compiler.
+ -D Debug options (concat or separate flags like perl -D)
+ r Writes debugging output to STDERR just as it's about
+ to write to the program's runtime (otherwise writes
+ debugging info as comments in its C output).
+ O Outputs each OP as it's compiled
+ s Outputs the contents of the shadow stack at each OP
+ p Outputs the contents of the shadow pad of lexicals as
+ it's loaded for each sub or the main program.
+ q Outputs the name of each fake PP function in the queue
+ as it's about to processes.
+ l Output the filename and line number of each original
+ line of Perl code as it's processed (pp_nextstate).
+ t Outputs timing information of compilation stages
+ -f Force optimisations on or off one at a time.
+ [
+ cog Copy-on-grow: PVs declared and initialised statically
+ no-cog No copy-on-grow
+ These two not in CC yet.
+ ]
+ freetmps-each-bblock Delays FREETMPS from the end of each
+ statement to the end of the each basic
+ block.
+ freetmps-each-loop Delays FREETMPS from the end of each
+ statement to the end of the group of
+ basic blocks forming a loop. At most
+ one of the freetmps-each-* options can
+ be used.
+ omit-taint Omits generating code for handling
+ perl's tainting mechanism.
+ -On Optimisation level (n = 0, 1, 2, ...). -O means -O1.
+ Currently, -O1 sets -ffreetmps-each-bblock and -O2
+ sets -ffreetmps-each-loop.
+
+Example
+ perl -MO=CC,-O2,-ofoo.c foo.pl
+ perl cc_harness -o foo foo.c
+
+ perl -MO=CC,-mFoo,-oFoo.c Foo.pm
+ perl cc_harness -shared -c -o Foo.so Foo.c
+
+
+Bytecode backend invocation
+
+ If there are any non-option arguments, they are taken to be
+ names of objects to be saved (probably doesn't work properly yet).
+ Without extra arguments, it saves the main program.
+ -ofilename Output to filename instead of STDOUT.
+ -- Force end of options.
+ -f Force optimisations on or off one at a time.
+ Each can be preceded by no- to turn the option off.
+ compress-nullops
+ Only fills in the necessary fields of ops which have
+ been optimised away by perl's internal compiler.
+ omit-sequence-numbers
+ Leaves out code to fill in the op_seq field of all ops
+ which is only used by perl's internal compiler.
+ bypass-nullops
+ If op->op_next ever points to a NULLOP, replaces the
+ op_next field with the first non-NULLOP in the path
+ of execution.
+ strip-syntax-tree
+ Leaves out code to fill in the pointers which link the
+ internal syntax tree together. They're not needed at
+ run-time but leaving them out will make it impossible
+ to recompile or disassemble the resulting program.
+ It will also stop "goto label" statements from working.
+ -On Optimisation level (n = 0, 1, 2, ...). -O means -O1.
+ -O1 sets -fcompress-nullops -fomit-sequence numbers.
+ -O6 adds -fstrip-syntax-tree.
+ -D Debug options (concat or separate flags like perl -D)
+ o OPs, prints each OP as it's processed.
+ b print debugging information about bytecompiler progress
+ a tells the assembler to include source assembler lines
+ in its output as bytecode comments.
+ C prints each CV taken from the final symbol tree walk.
+ -S Output assembler source rather than piping it
+ through the assembler and outputting bytecode.
+ -m Compile as a module rather than a standalone program.
+ Currently this just means that the bytecodes for
+ initialising main_start, main_root and curpad are
+ omitted.
+
+Example
+ perl -MO=Bytecode,-O6,-o,foo.plc foo.pl
+
+ perl -MO=Bytecode,-S foo.pl > foo.S
+ assemble foo.S > foo.plc
+ byteperl foo.plc
+
+ perl -MO=Bytecode,-m,-oFoo.pmc Foo.pm
+
+Backends for debugging
+ perl -MO=Terse,exec foo.pl
+ perl -MO=Debug bar.pl
+
+O module
+ Used with "perl -MO=Backend,foo,bar prog.pl" to invoke the backend
+ B::Backend with options foo and bar. O invokes the sub
+ B::Backend::compile() with arguments foo and bar at BEGIN time.
+ That compile() sub must do any inital argument processing replied.
+ If unsuccessful, it should return a string which O arranges to be
+ printed as an error message followed by a clean error exit. In the
+ normal case where any option processing in compile() is successful,
+ it should return a sub ref (usually a closure) to perform the
+ actual compilation. When O regains control, it ensures that the
+ "-c" option is forced (so that the program being compiled doesn't
+ end up running) and registers an END block to call back the sub ref
+ returned from the backend's compile(). Perl then continues by
+ parsing prog.pl (just as it would with "perl -c prog.pl") and after
+ doing so, assuming there are no parse-time errors, the END block
+ of O gets called and the actual backend compilation happens. Phew.
diff --git a/gnu/usr.bin/perl/ext/B/O.pm b/gnu/usr.bin/perl/ext/B/O.pm
new file mode 100644
index 00000000000..ad391a3f4a4
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/B/O.pm
@@ -0,0 +1,85 @@
+package O;
+use B qw(minus_c);
+use Carp;
+
+sub import {
+ my ($class, $backend, @options) = @_;
+ eval "use B::$backend ()";
+ if ($@) {
+ croak "use of backend $backend failed: $@";
+ }
+ my $compilesub = &{"B::${backend}::compile"}(@options);
+ if (ref($compilesub) eq "CODE") {
+ minus_c;
+ eval 'END { &$compilesub() }';
+ } else {
+ die $compilesub;
+ }
+}
+
+1;
+
+__END__
+
+=head1 NAME
+
+O - Generic interface to Perl Compiler backends
+
+=head1 SYNOPSIS
+
+ perl -MO=Backend[,OPTIONS] foo.pl
+
+=head1 DESCRIPTION
+
+This is the module that is used as a frontend to the Perl Compiler.
+
+=head1 CONVENTIONS
+
+Most compiler backends use the following conventions: OPTIONS
+consists of a comma-separated list of words (no white-space).
+The C<-v> option usually puts the backend into verbose mode.
+The C<-ofile> option generates output to B<file> instead of
+stdout. The C<-D> option followed by various letters turns on
+various internal debugging flags. See the documentation for the
+desired backend (named C<B::Backend> for the example above) to
+find out about that backend.
+
+=head1 IMPLEMENTATION
+
+This section is only necessary for those who want to write a
+compiler backend module that can be used via this module.
+
+The command-line mentioned in the SYNOPSIS section corresponds to
+the Perl code
+
+ use O ("Backend", OPTIONS);
+
+The C<import> function which that calls loads in the appropriate
+C<B::Backend> module and calls the C<compile> function in that
+package, passing it OPTIONS. That function is expected to return
+a sub reference which we'll call CALLBACK. Next, the "compile-only"
+flag is switched on (equivalent to the command-line option C<-c>)
+and an END block is registered which calls CALLBACK. Thus the main
+Perl program mentioned on the command-line is read in, parsed and
+compiled into internal syntax tree form. Since the C<-c> flag is
+set, the program does not start running (excepting BEGIN blocks of
+course) but the CALLBACK function registered by the compiler
+backend is called.
+
+In summary, a compiler backend module should be called "B::Foo"
+for some foo and live in the appropriate directory for that name.
+It should define a function called C<compile>. When the user types
+
+ perl -MO=Foo,OPTIONS foo.pl
+
+that function is called and is passed those OPTIONS (split on
+commas). It should return a sub ref to the main compilation function.
+After the user's program is loaded and parsed, that returned sub ref
+is invoked which can then go ahead and do the compilation, usually by
+making use of the C<B> module's functionality.
+
+=head1 AUTHOR
+
+Malcolm Beattie, C<mbeattie@sable.ox.ac.uk>
+
+=cut
diff --git a/gnu/usr.bin/perl/ext/B/README b/gnu/usr.bin/perl/ext/B/README
new file mode 100644
index 00000000000..fa3f085a986
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/B/README
@@ -0,0 +1,325 @@
+ Perl Compiler Kit, Version alpha4
+
+ Copyright (c) 1996, 1997, Malcolm Beattie
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of either:
+
+ a) the GNU General Public License as published by the Free
+ Software Foundation; either version 1, or (at your option) any
+ later version, or
+
+ b) the "Artistic License" which comes with this kit.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either
+ the GNU General Public License or the Artistic License for more details.
+
+ You should have received a copy of the Artistic License with this kit,
+ in the file named "Artistic". If not, you can get one from the Perl
+ distribution. You should also have received a copy of the GNU General
+ Public License, in the file named "Copying". If not, you can get one
+ from the Perl distribution or else write to the Free Software Foundation,
+ Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+
+CHANGES
+
+New since alpha3
+ Anonymous subs work properly with C and CC.
+ Heuristics for forcing compilation of apparently unused subs/methods.
+ Subs which use the AutoLoader module are forcibly loaded at compile-time.
+ Slightly faster compilation.
+ Handles slightly more complex code within a BEGIN { }.
+ Minor bug fixes.
+
+New since alpha2
+ CC backend now supports ".." and s//e.
+ Xref backend generates cross-reference reports
+ Cleanups to fix benign but irritating "-w" warnings
+ Minor cxstack fix
+New since alpha1
+ Working CC backend
+ Shared globs and pre-initialised hash support
+ Some XSUB support
+ Assorted bug fixes
+
+INSTALLATION
+
+(1) You need perl5.002 or later.
+
+(2) If you want to compile and run programs with the C or CC backends
+which undefine (or redefine) subroutines, then you need to apply a
+one-line patch to perl itself. One or two of the programs in perl's
+own test suite do this. The patch is in file op.patch. It prevents
+perl from calling free() on OPs with the magic sequence number (U16)-1.
+The compiler declares all OPs as static structures and uses that magic
+sequence number.
+
+(3) Type
+ perl Makefile.PL
+to write a personalised Makefile for your system. If you want the
+bytecode modules to support reading bytecode from strings (instead of
+just from files) then add the option
+ -DINDIRECT_BGET_MACROS
+into the middle of the definition of the CCCMD macro in the Makefile.
+Your C compiler may need to be able to cope with Standard C for this.
+I haven't tested this option yet with an old pre-Standard compiler.
+
+(4) If your platform supports dynamic loading then just type
+ make
+and you can then use
+ perl -Iblib/arch -MO=foo bar
+to use the compiler modules (see later for details).
+If you need/want instead to make a statically linked perl which
+contains the appropriate modules, then type
+ make perl
+ make byteperl
+and you can then use
+ ./perl -MO=foo bar
+to use the compiler modules.
+In both cases, the byteperl executable is required for running standalone
+bytecode programs. It is *not* a standard perl+XSUB perl executable.
+
+USAGE
+
+As of the alpha3 release, the Bytecode, C and CC backends are now all
+functional enough to compile almost the whole of the main perl test
+suite. In the case of the CC backend, any failures are all due to
+differences and/or known bugs documented below. See the file TESTS.
+In the following examples, you'll need to replace "perl" by
+ perl -Iblib/arch
+if you have built the extensions for a dynamic loading platform but
+haven't installed the extensions completely. You'll need to replace
+"perl" by
+ ./perl
+if you have built the extensions into a statically linked perl binary.
+
+(1) To compile perl program foo.pl with the C backend, do
+ perl -MO=C,-ofoo.c foo.pl
+Then use the cc_harness perl program to compile the resulting C source:
+ perl cc_harness -O2 -o foo foo.c
+
+If you are using a non-ANSI pre-Standard C compiler that can't handle
+pre-declaring static arrays, then add -DBROKEN_STATIC_REDECL to the
+options you use:
+ perl cc_harness -O2 -o foo -DBROKEN_STATIC_REDECL foo.c
+If you are using a non-ANSI pre-Standard C compiler that can't handle
+static initialisation of structures with union members then add
+-DBROKEN_UNION_INIT to the options you use. If you want command line
+arguments passed to your executable to be interpreted by perl (e.g. -Dx)
+then compile foo.c with -DALLOW_PERL_OPTIONS. Otherwise, all command line
+arguments passed to foo will appear directly in @ARGV. The resulting
+executable foo is the compiled version of foo.pl. See the file NOTES for
+extra options you can pass to -MO=C.
+
+There are some constraints on the contents on foo.pl if you want to be
+able to compile it successfully. Some problems can be fixed fairly easily
+by altering foo.pl; some problems with the compiler are known to be
+straightforward to solve and I'll do so soon. The file Todo lists a
+number of known problems. See the XSUB section lower down for information
+about compiling programs which use XSUBs.
+
+(2) To compile foo.pl with the CC backend (which generates actual
+optimised C code for the execution path of your perl program), use
+ perl -MO=CC,-ofoo.c foo.pl
+
+and proceed just as with the C backend. You should almost certainly
+use an option such as -O2 with the subsequent cc_harness invocation
+so that your C compiler uses optimisation. The C code generated by
+the Perl compiler's CC backend looks ugly to humans but is easily
+optimised by C compilers.
+
+To make the most of this compiler backend, you need to tell the
+compiler when you're using int or double variables so that it can
+optimise appropriately (although this part of the compiler is the most
+buggy). You currently do that by naming lexical variables ending in
+"_i" for ints, "_d" for doubles, "_ir" for int "register" variables or
+"_dr" for double "register" variables. Here "register" is a promise
+that you won't pass a reference to the variable into a sub which then
+modifies the variable. The compiler ought to catch attempts to use
+"\$i" just as C compilers catch attempts to do "&i" for a register int
+i but it doesn't at the moment. Bugs in the CC backend may make your
+program fail in mysterious ways and give wrong answers rather than just
+crash in boring ways. But, hey, this is an alpha release so you knew
+that anyway. See the XSUB section lower down for information about
+compiling programs which use XSUBs.
+
+If your program uses classes which define methods (or other subs which
+are not exported and not apparently used until runtime) then you'll
+need to use -u compile-time options (see the NOTES file) to force the
+subs to be compiled. Future releases will probably default the other
+way, do more auto-detection and provide more fine-grained control.
+
+Since compiled executables need linking with libperl, you may want
+to turn libperl.a into a shared library if your platform supports
+it. For example, with Digital UNIX, do something like
+ ld -shared -o libperl.so -all libperl.a -none -lc
+and with Linux/ELF, rebuild the perl .c files with -fPIC (and I
+also suggest -fomit-frame-pointer for Linux on Intel architetcures),
+do "make libperl.a" and then do
+ gcc -shared -Wl,-soname,libperl.so.5 -o libperl.so.5.3 `ar t libperl.a`
+and then
+ # cp libperl.so.5.3 /usr/lib
+ # cd /usr/lib
+ # ln -s libperl.so.5.3 libperl.so.5
+ # ln -s libperl.so.5 libperl.so
+ # ldconfig
+When you compile perl executables with cc_harness, append -L/usr/lib
+otherwise the -L for the perl source directory will override it. For
+example,
+ perl -Iblib/arch -MO=CC,-O2,-ofoo3.c foo3.bench
+ perl cc_harness -o foo3 -O2 foo3.c -L/usr/lib
+ ls -l foo3
+ -rwxr-xr-x 1 mbeattie xzdg 11218 Jul 1 15:28 foo3
+You'll probably also want to link your main perl executable against
+libperl.so; it's nice having an 11K perl executable.
+
+(3) To compile foo.pl into bytecode do
+ perl -MO=Bytecode,-ofoo foo.pl
+To run the resulting bytecode file foo as a standalone program, you
+use the program byteperl which should have been built along with the
+extensions.
+ ./byteperl foo
+Any extra arguments are passed in as @ARGV; they are not interpreted
+as perl options. If you want to load chunks of bytecode into an already
+running perl program then use the -m option and investigate the
+byteload_fh and byteload_string functions exported by the B module.
+See the NOTES file for details of these and other options (including
+optimisation options and ways of getting at the intermediate "assembler"
+code that the Bytecode backend uses).
+
+(3) There are little Bourne shell scripts and perl programs to aid with
+some common operations: assemble, disassemble, run_bytecode_test,
+run_test, cc_harness, test_harness, test_harness_bytecode.
+
+(4) Walk the op tree in execution order printing terse info about each op
+ perl -MO=Terse,exec foo.pl
+
+(5) Walk the op tree in syntax order printing lengthier debug info about
+each op. You can also append ",exec" to walk in execution order, but the
+formatting is designed to look nice with Terse rather than Debug.
+ perl -MO=Debug foo.pl
+
+(6) Produce a cross-reference report of the line numbers at which all
+variables, subs and formats are defined and used.
+ perl -MO=Xref foo.pl
+
+XSUBS
+
+The C and CC backends can successfully compile some perl programs which
+make use of XSUB extensions. [I'll add more detail to this section in a
+later release.] As a prerequisite, such extensions must not need to do
+anything in their BOOT: section which needs to be done at runtime rather
+than compile time. Normally, the only code in the boot_Foo() function is
+a list of newXS() calls which xsubpp puts there and the compiler handles
+saving those XS subs itself. For each XSUB used, the C and CC compiler
+will generate an initialiser in their C output which refers to the name
+of the relevant C function (XS_Foo_somesub). What is not yet automated
+is the necessary commands and cc command-line options (e.g. via
+"perl cc_harness") which link against the extension libraries. For now,
+you need the XSUB extension to have installed files in the right format
+for using as C libraries (e.g. Foo.a or Foo.so). As the Foo.so files (or
+your platform's version) aren't suitable for linking against, you will
+have to reget the extension source and rebuild it as a static extension
+to force the generation of a suitable Foo.a file. Then you need to make
+a symlink (or copy or rename) of that file into a libFoo.a suitable for
+cc linking. Then add the appropriate -L and -l options to your
+"perl cc_harness" command line to find and link against those libraries.
+You may also need to fix up some platform-dependent environment variable
+to ensure that linked-against .so files are found at runtime too.
+
+DIFFERENCES
+
+The result of running a compiled Perl program can sometimes be different
+from running the same program with standard perl. Think of the compiler
+as having a slightly different implementation of the language Perl.
+Unfortunately, since Perl has had a single implementation until now,
+there are no formal standards or documents defining what behaviour is
+guaranteed of Perl the language and what just "happens to work".
+Some of the differences below are almost impossible to change because of
+the way the compiler works. Others can be changed to produce "standard"
+perl behaviour if it's deemed proper and the resulting performance hit
+is accepted. I'll use "standard perl" to mean the result of running a
+Perl program using the perl executable from the perl distribution.
+I'll use "compiled Perl program" to mean running an executable produced
+by this compiler kit ("the compiler") with the CC backend.
+
+Loops
+ Standard perl calculates the target of "next", "last", and "redo"
+ at run-time. The compiler calculates the targets at compile-time.
+ For example, the program
+
+ sub skip_on_odd { next NUMBER if $_[0] % 2 }
+ NUMBER: for ($i = 0; $i < 5; $i++) {
+ skip_on_odd($i);
+ print $i;
+ }
+
+ produces the output
+ 024
+ with standard perl but gives a compile-time error with the compiler.
+
+Context of ".."
+ The context (scalar or array) of the ".." operator determines whether
+ it behaves as a range or a flip/flop. Standard perl delays until
+ runtime the decision of which context it is in but the compiler needs
+ to know the context at compile-time. For example,
+ @a = (4,6,1,0,0,1);
+ sub range { (shift @a)..(shift @a) }
+ print range();
+ while (@a) { print scalar(range()) }
+ generates the output
+ 456123E0
+ with standard Perl but gives a compile-time error with compiled Perl.
+
+Arithmetic
+ Compiled Perl programs use native C arithemtic much more frequently
+ than standard perl. Operations on large numbers or on boundary
+ cases may produce different behaviour.
+
+Deprecated features
+ Features of standard perl such as $[ which have been deprecated
+ in standard perl since version 5 was released have not been
+ implemented in the compiler.
+
+Others
+ I'll add to this list as I remember what they are.
+
+BUGS
+
+Here are some things which may cause the compiler problems.
+
+The following render the compiler useless (without serious hacking):
+* Use of the DATA filehandle (via __END__ or __DATA__ tokens)
+* Operator overloading with %OVERLOAD
+* The (deprecated) magic array-offset variable $[ does not work
+* The following operators are not yet implemented for CC
+ goto
+ sort with a non-default comparison (i.e. a named sub or inline block)
+* You can't use "last" to exit from a non-loop block.
+
+The following may give significant problems:
+* BEGIN blocks containing complex initialisation code
+* Code which is only ever referred to at runtime (e.g. via eval "..." or
+ via method calls): see the -u option for the C and CC backends.
+* Run-time lookups of lexical variables in "outside" closures
+
+The following may cause problems (not thoroughly tested):
+* Dependencies on whether values of some "magic" Perl variables are
+ determined at compile-time or runtime.
+* For the C and CC backends: compile-time strings which are longer than
+ your C compiler can cope with in a single line or definition.
+* Reliance on intimate details of global destruction
+* For the Bytecode backend: high -On optimisation numbers with code
+ that has complex flow of control.
+* Any "-w" option in the first line of your perl program is seen and
+ acted on by perl itself before the compiler starts. The compiler
+ itself then runs with warnings turned on. This may cause perl to
+ print out warnings about the compiler itself since I haven't tested
+ it thoroughly with warnings turned on.
+
+There is a terser but more complete list in the Todo file.
+
+Malcolm Beattie
+2 September 1996
diff --git a/gnu/usr.bin/perl/ext/B/TESTS b/gnu/usr.bin/perl/ext/B/TESTS
new file mode 100644
index 00000000000..e050f6cfddb
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/B/TESTS
@@ -0,0 +1,78 @@
+Test results from compiling t/*/*.t
+ C Bytecode CC
+
+base/cond.t OK ok OK
+base/if.t OK ok OK
+base/lex.t OK ok OK
+base/pat.t OK ok OK
+base/term.t OK ok OK
+cmd/elsif.t OK ok OK
+cmd/for.t OK ok ok 1, 2, 3, panic: pp_iter
+cmd/mod.t OK ok ok
+cmd/subval.t OK ok 1..34, not ok 27,28 (simply
+ because filename changes).
+cmd/switch.t OK ok ok
+cmd/while.t OK ok ok
+io/argv.t OK ok ok
+io/dup.t OK ok ok
+io/fs.t OK ok ok
+io/inplace.t OK ok ok
+io/pipe.t OK ok ok with -umain
+io/print.t OK ok ok
+io/tell.t OK ok ok
+op/append.t OK ok OK
+op/array.t OK ok 1..36, not ok 7,10 (no $[)
+op/auto.t OK ok OK
+op/chop.t OK ok OK
+op/cond.t OK ok OK
+op/delete.t OK ok OK
+op/do.t OK ok OK
+op/each.t OK ok OK
+op/eval.t OK ok ok 1-6 of 16 then exits
+op/exec.t OK ok OK
+op/exp.t OK ok OK
+op/flip.t OK ok OK
+op/fork.t OK ok OK
+op/glob.t OK ok OK
+op/goto.t OK ok 1..9, Can't find label label1.
+op/groups.t OK (s/ucb/bin/ under Linux) OK 1..0 for now.
+op/index.t OK ok OK
+op/int.t OK ok OK
+op/join.t OK ok OK
+op/list.t OK ok OK
+op/local.t OK ok OK
+op/magic.t OK ok OK
+op/misc.t no DATA filehandle so succeeds trivially with 1..0
+op/mkdir.t OK ok OK
+op/my.t OK ok OK
+op/oct.t OK ok OK (C large const warnings)
+op/ord.t OK ok OK
+op/overload.t Mostly not ok Mostly not ok C errors.
+op/pack.t OK ok OK
+op/pat.t omit 26 (reset) ok [lots of memory for compile]
+op/push.t OK ok OK
+op/quotemeta.t OK ok OK
+op/rand.t OK ok
+op/range.t OK ok OK
+op/read.t OK ok OK
+op/readdir.t OK ok OK (substcont works too)
+op/ref.t omits "ok 40" (lex destruction) ok (Bytecode)
+ CC: need -u for OBJ,BASEOBJ,
+ UNIVERSAL,WHATEVER,main.
+ 1..41, ok1-33,36-38,
+ then ok 41, ok 39.DESTROY probs
+op/regexp.t OK ok ok (trivially all eval'd)
+op/repeat.t OK ok ok
+op/sleep.t OK ok ok
+op/sort.t OK ok 1..10, ok 1, Out of memory!
+op/split.t OK ok ok
+op/sprintf.t OK ok ok
+op/stat.t OK ok ok
+op/study.t OK ok ok
+op/subst.t OK ok ok
+op/substr.t OK ok ok1-22 except 7-9,11 (all $[)
+op/time.t OK ok ok
+op/undef.t omit 21 ok ok
+op/unshift.t OK ok ok
+op/vec.t OK ok ok
+op/write.t not ok 3 (no CvOUTSIDE lex from runtime eval). CC: 1..3, hang
diff --git a/gnu/usr.bin/perl/ext/B/Todo b/gnu/usr.bin/perl/ext/B/Todo
new file mode 100644
index 00000000000..495be2ef3d1
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/B/Todo
@@ -0,0 +1,37 @@
+* Fixes
+
+CC backend: goto, sort with non-default comparison. last for non-loop blocks.
+Version checking
+improve XSUB handling (both static and dynamic)
+sv_magic can do SvREFCNT_inc(obj) which messes up precalculated refcounts
+allocation of XPV[INAHC]V structures needs fixing: Perl tries to free
+them whereas the compiler expects them to be linked to a xpv[inahc]v_root
+list the same as X[IPR]V structures.
+ref counts
+perl_parse replacement
+fix cstring for long strings
+compile-time initialisation of AvARRAYs
+signed/unsigned problems with NV (and IV?) initialisation and elsewhere?
+CvOUTSIDE for ordinary subs
+DATA filehandle for standalone Bytecode program (easy)
+DATA filehandle for multiple bytecode-compiled modules (harder)
+DATA filehandle for C-compiled program (yet harder)
+
+* Features
+
+type checking
+compile time v. runtime initialisation
+save PMOPs in compiled form
+selection of what to dump
+options for cutting out line info etc.
+comment output
+shared constants
+module dependencies
+
+* Optimisations
+collapse LISTOPs to UNOPs or BASEOPs
+compile-time qw(), constant subs
+global analysis of variables, type hints etc.
+demand-loaded bytecode (leader of each basic block replaced by an op
+which loads in bytecode for its block)
+fast sub calls for CC backend
diff --git a/gnu/usr.bin/perl/ext/B/byteperl.c b/gnu/usr.bin/perl/ext/B/byteperl.c
new file mode 100644
index 00000000000..6b53e3b174a
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/B/byteperl.c
@@ -0,0 +1,110 @@
+#include "EXTERN.h"
+#include "perl.h"
+#ifndef PATCHLEVEL
+#include "patchlevel.h"
+#endif
+
+static void xs_init _((void));
+static PerlInterpreter *my_perl;
+
+int
+#ifndef CAN_PROTOTYPE
+main(argc, argv, env)
+int argc;
+char **argv;
+char **env;
+#else /* def(CAN_PROTOTYPE) */
+main(int argc, char **argv, char **env)
+#endif /* def(CAN_PROTOTYPE) */
+{
+ int exitstatus;
+ int i;
+ char **fakeargv;
+ FILE *fp;
+#ifdef INDIRECT_BGET_MACROS
+ struct bytestream bs;
+#endif /* INDIRECT_BGET_MACROS */
+
+ INIT_SPECIALSV_LIST;
+ PERL_SYS_INIT(&argc,&argv);
+
+#if PATCHLEVEL > 3 || (PATCHLEVEL == 3 && SUBVERSION >= 1)
+ perl_init_i18nl10n(1);
+#else
+ perl_init_i18nl14n(1);
+#endif
+
+ if (!PL_do_undump) {
+ my_perl = perl_alloc();
+ if (!my_perl)
+#ifdef VMS
+ exit(vaxc$errno);
+#else
+ exit(1);
+#endif
+ perl_construct( my_perl );
+ }
+
+#ifdef CSH
+ if (!PL_cshlen)
+ PL_cshlen = strlen(PL_cshname);
+#endif
+
+ if (argc < 2)
+ fp = stdin;
+ else {
+#ifdef WIN32
+ fp = fopen(argv[1], "rb");
+#else
+ fp = fopen(argv[1], "r");
+#endif
+ if (!fp) {
+ perror(argv[1]);
+#ifdef VMS
+ exit(vaxc$errno);
+#else
+ exit(1);
+#endif
+ }
+ argv++;
+ argc--;
+ }
+ New(666, fakeargv, argc + 4, char *);
+ fakeargv[0] = argv[0];
+ fakeargv[1] = "-e";
+ fakeargv[2] = "";
+ fakeargv[3] = "--";
+ for (i = 1; i < argc; i++)
+ fakeargv[i + 3] = argv[i];
+ fakeargv[argc + 3] = 0;
+
+ exitstatus = perl_parse(my_perl, xs_init, argc + 3, fakeargv, NULL);
+ if (exitstatus)
+ exit( exitstatus );
+
+ sv_setpv(GvSV(gv_fetchpv("0", TRUE, SVt_PV)), argv[0]);
+ PL_main_cv = PL_compcv;
+ PL_compcv = 0;
+
+#ifdef INDIRECT_BGET_MACROS
+ bs.data = fp;
+ bs.fgetc = (int(*) _((void*)))fgetc;
+ bs.fread = (int(*) _((char*,size_t,size_t,void*)))fread;
+ bs.freadpv = freadpv;
+ byterun(bs);
+#else
+ byterun(fp);
+#endif /* INDIRECT_BGET_MACROS */
+
+ exitstatus = perl_run( my_perl );
+
+ perl_destruct( my_perl );
+ perl_free( my_perl );
+
+ exit( exitstatus );
+}
+
+static void
+xs_init()
+{
+}
diff --git a/gnu/usr.bin/perl/ext/B/ramblings/cc.notes b/gnu/usr.bin/perl/ext/B/ramblings/cc.notes
new file mode 100644
index 00000000000..47bd65a09d8
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/B/ramblings/cc.notes
@@ -0,0 +1,32 @@
+At entry to each basic block, the following can be assumed (and hence
+must be forced where necessary at the end of each basic block):
+
+The shadow stack @stack is empty.
+For each lexical object in @pad, VALID_IV holds for each T_INT,
+VALID_DOUBLE holds for each T_DOUBLE and VALID_SV holds otherwise.
+The C shadow variable sp holds the stack pointer (not necessarily stack_sp).
+
+write_back_stack
+ Writes the contents of the shadow stack @stack back to the real stack.
+ A write-back of each object in the stack is forced so that its
+ backing SV contains the right value and that SV is then pushed onto the
+ real stack. On return, @stack is empty.
+
+write_back_lexicals
+ Forces a write-back (i.e. achieves VALID_SV), where necessary, for each
+ lexical object in @pad. Objects with the TEMPORARY flag are skipped. If
+ write_back_lexicals is called with an (optional) argument, then it is
+ taken to be a bitmask of more flags: any lexical object with one of those
+ flags set is also skipped and not written back to its SV.
+
+invalidate_lexicals($avoid)
+ The VALID_INT and VALID_DOUBLE flags are turned off for each lexical
+ object in @pad whose flags field doesn't overlap with $avoid.
+
+reload_lexicals
+ For each necessary lexical object in @pad, makes sure that VALID_IV
+ holds for objects of type T_INT, VALID_DOUBLE holds for objects for
+ type T_DOUBLE, and VALID_SV holds for other objects. An object is
+ considered for reloading if its flags field does not overlap with the
+ (optional) argument passed to reload_lexicals.
+
diff --git a/gnu/usr.bin/perl/ext/B/ramblings/curcop.runtime b/gnu/usr.bin/perl/ext/B/ramblings/curcop.runtime
new file mode 100644
index 00000000000..9b8b7d52e71
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/B/ramblings/curcop.runtime
@@ -0,0 +1,39 @@
+PP code uses of curcop
+----------------------
+
+pp_rv2gv
+ when a new glob is created for an OPpLVAL_INTRO,
+ curcop->cop_line is stored as GvLINE() in the new GP.
+pp_bless
+ curcop->cop_stash is used as the stash in the one-arg form of bless
+
+pp_repeat
+ tests (curcop != &compiling) to warn "Can't x= to readonly value"
+
+pp_pos
+pp_substr
+pp_index
+pp_rindex
+pp_aslice
+pp_lslice
+pp_splice
+ curcop->cop_arybase
+
+pp_sort
+ curcop->cop_stash used to determine whether to gv_fetchpv $a and $b
+
+pp_caller
+ tests (curcop->cop_stash == debstash) to determine whether
+ to set DB::args
+
+pp_reset
+ resets vars in curcop->cop_stash
+
+pp_dbstate
+ sets curcop = (COP*)op
+
+doeval
+ compiles into curcop->cop_stash
+
+pp_nextstate
+ sets curcop = (COP*)op
diff --git a/gnu/usr.bin/perl/ext/B/ramblings/flip-flop b/gnu/usr.bin/perl/ext/B/ramblings/flip-flop
new file mode 100644
index 00000000000..183d541b982
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/B/ramblings/flip-flop
@@ -0,0 +1,51 @@
+PP(pp_range)
+{
+ if (GIMME == G_ARRAY)
+ return cCONDOP->op_true;
+ return SvTRUEx(PAD_SV(op->op_targ)) ? cCONDOP->op_false : cCONDOP->op_true;
+}
+
+pp_range is a CONDOP.
+In array context, it just returns op_true.
+In scalar context it checks the truth of targ and returns
+op_false if true, op_true if false.
+
+flip is an UNOP.
+It "looks after" its child which is always a pp_range CONDOP.
+In array context, it just returns the child's op_false.
+In scalar context, there are three possible outcomes:
+ (1) set child's targ to 1, our targ to 1 and return op_next.
+ (2) set child's targ to 1, our targ to 0, sp-- and return child's op_false.
+ (3) Blank targ and TOPs and return op_next.
+Case 1 happens for a "..." with a matching lineno... or true TOPs.
+Case 2 happens for a ".." with a matching lineno... or true TOPs.
+Case 3 happens for a non-matching lineno or false TOPs.
+
+ $a = lhs..rhs;
+
+ ,-------> range
+ ^ / \
+ | true/ \false
+ | / \
+ first| lhs rhs
+ | \ first /
+ ^--- flip <----- flop
+ \ /
+ \ /
+ sassign
+
+
+/* range */
+if (SvTRUE(curpad[op->op_targ]))
+ goto label(op_false);
+/* op_true */
+...
+/* flip */
+/* For "..." returns op_next. For ".." returns op_next or op_first->op_false */
+/* end of basic block */
+goto out;
+label(range op_false):
+...
+/* flop */
+out:
+...
diff --git a/gnu/usr.bin/perl/ext/B/ramblings/magic b/gnu/usr.bin/perl/ext/B/ramblings/magic
new file mode 100644
index 00000000000..e41930a0f02
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/B/ramblings/magic
@@ -0,0 +1,93 @@
+sv_magic()
+----------
+av.c
+av_store()
+ Storing a non-undef element into an SMAGICAL array, av,
+ assigns the equivalent lowercase form of magic (of the first
+ MAGIC in the chain) to the value (with obj = av, name = 0 and
+ namlen = array index).
+
+gv.c
+gv_init()
+ Initialising gv assigns '*' magic to it with obj = gv, name =
+ GvNAME and namlen = GvNAMELEN.
+gv_fetchpv()
+ @ISA gets 'I' magic with obj = gv, zero name and namlen.
+ %OVERLOAD gets 'A' magic with obj = gv, zero name and namlen.
+ $1 to $9, $&, $`, $', $+ get '\0' magic with obj = gv,
+ name = GvNAME and namlen = len ( = 1 presumably).
+Gv_AMupdate()
+ Stashes for overload magic seem to get 'c' magic with obj = 0,
+ name = &amt and namlen = sizeof(amt).
+hv_magic(hv, gv, how)
+ Gives magic how to hv with obj = gv and zero name and namlen.
+
+mg.c
+mg_copy(sv, nsv, key, klen)
+ Traverses the magic chain of sv. Upper case forms of magic
+ (only) are copied across to nsv, preserving obj but using
+ name = key and namlen = klen.
+magic_setpos()
+ LvTARG of a PVLV gets 'g' magic with obj = name = 0 and namlen = pos.
+
+op.c
+mod()
+ PVLV operators give magic to their targs with
+ obj = name = namlen = 0. OP_POS gives '.', OP_VEC gives 'v'
+ and OP_SUBSTR gives 'x'.
+
+perl.c
+magicname(sym, name, namlen)
+ Fetches/creates a GV with name sym and gives it '\0' magic
+ with obj = gv, name and namlen as passed.
+init_postdump_symbols()
+ Elements of the environment get given SVs with 'e' magic.
+ obj = sv and name and namlen point to the actual string
+ within env.
+
+pp.c
+pp_av2arylen()
+ $#foo gives '#' magic to the new SV with obj = av and
+ name = namlen = 0.
+pp_study()
+ SV gets 'g' magic with obj = name = namlen = 0.
+pp_substr()
+ PVLV gets 'x' magic with obj = name = namlen = 0.
+pp_vec()
+ PVLV gets 'x' magic with obj = name = namlen = 0.
+
+pp_hot.c
+pp_match()
+ m//g gets 'g' magic with obj = name = namlen = 0.
+
+pp_sys.c
+pp_tie()
+ sv gets magic with obj = sv and name = namlen = 0.
+ If an HV or an AV, it gets 'P' magic, otherwise 'q' magic.
+pp_dbmopen()
+ 'P' magic for the HV just as with pp_tie().
+pp_sysread()
+ If tainting, the buffer SV gets 't' magic with
+ obj = name = namlen = 0.
+
+sv.c
+sv_setsv()
+ Doing sv_setsv(dstr, gv) gives '*' magic to dstr with
+ obj = dstr, name = GvNAME, namlen = GvNAMELEN.
+
+util.c
+fbm_compile()
+ The PVBM gets 'B' magic with obj = name = namlen = 0 and SvVALID
+ is set to indicate that the Boyer-Moore table is valid.
+ magic_setbm() just clears the SvVALID flag.
+
+hv_magic()
+----------
+
+gv.c
+gv_fetchfile()
+ With perldb, the HV of a gvfile gv gets 'L' magic with obj = gv.
+gv_fetchpv()
+ %SIG gets 'S' magic with obj = siggv.
+init_postdump_symbols()
+ %ENV gets 'E' magic with obj = envgv.
diff --git a/gnu/usr.bin/perl/ext/B/ramblings/reg.alloc b/gnu/usr.bin/perl/ext/B/ramblings/reg.alloc
new file mode 100644
index 00000000000..7fd69f2ebe5
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/B/ramblings/reg.alloc
@@ -0,0 +1,32 @@
+while ($i--) {
+ foo();
+}
+exit
+
+ PP code if i an int register if i an int but not a
+ (i.e. can't be register (i.e. can be
+ implicitly invalidated) implicitly invalidated)
+ nextstate
+ enterloop
+
+
+ loop:
+ gvsv GV (0xe6078) *i validates i validates i
+ postdec invalidates $i invalidates $i
+ and if_false goto out;
+ i valid; $i invalid i valid; $i invalid
+
+ i valid; $i invalid i valid; $i invalid
+ nextstate
+ pushmark
+ gv GV (0xe600c) *foo
+ entersub validates $i; invals i
+
+ unstack
+ goto loop:
+
+ i valid; $i invalid
+ out:
+ leaveloop
+ nextstate
+ exit
diff --git a/gnu/usr.bin/perl/ext/B/ramblings/runtime.porting b/gnu/usr.bin/perl/ext/B/ramblings/runtime.porting
new file mode 100644
index 00000000000..4699b255cf4
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/B/ramblings/runtime.porting
@@ -0,0 +1,350 @@
+Notes on porting the perl runtime PP engine.
+Importance: 1 = who cares?, 10 = vital
+Difficulty: 1 = trivial, 10 = very difficult. Level assumes a
+reasonable implementation of the SV and OP API already ported.
+
+OP Import Diff Comments
+null 10 1
+stub 10 1
+scalar 10 1
+pushmark 10 1 PUSHMARK
+wantarray 7 3 cxstack, dopoptosub
+const 10 1
+gvsv 10 1 save_scalar
+gv 10 1
+gelem 3 3
+padsv 10 2 SAVECLEARSV, provide_ref
+padav 10 2
+padhv 10 2
+padany 1 1
+pushre 7 3 pushes an op. Blech.
+rv2gv 6 5
+rv2sv 10 4
+av2arylen 7 3 sv_magic
+rv2cv 8 5 sv_2cv
+anoncode 7 6 cv_clone
+prototype 4 4 sv_2cv
+refgen 8 3
+srefgen 8 2
+ref 8 3
+bless 7 3
+backtick 5 4
+glob 5 2 do_readline
+readline 8 2 do_readline
+rcatline 8 2
+regcmaybe 8 1
+regcomp 8 9 pregcomp
+match 8 10
+subst 8 10
+substcont 8 7
+trans 7 4 do_trans
+sassign 10 3 mg_find, SvSETMAGIC
+aassign 10 5
+chop 8 3 do_chop
+schop 8 3 do_chop
+chomp 8 3 do_chomp
+schomp 8 3 do_chomp
+defined 10 2
+undef 10 3
+study 4 5
+pos 8 3 PVLV, mg_find
+preinc 10 2 sv_inc, SvSETMAGIC
+i_preinc
+predec 10 2 sv_dec, SvSETMAGIC
+i_predec
+postinc 10 2 sv_dec, SvSETMAGIC
+i_postinc
+postdec 10 2 sv_dec, SvSETMAGIC
+i_postdec
+pow 10 1
+multiply 10 1
+i_multiply 10 1
+divide 10 2
+i_divide 10 1
+modulo 10 2
+i_modulo 10 1
+repeat 6 4
+add 10 1
+i_add 10 1
+subtract 10 1
+i_subtract 10 1
+concat 10 2 mg_get
+stringify 10 2 sv_setpvn
+left_shift 10 1
+right_shift 10 1
+lt 10 1
+i_lt 10 1
+gt 10 1
+i_gt 10 1
+le 10 1
+i_le 10 1
+ge 10 1
+i_ge 10 1
+eq 10 1
+i_eq 10 1
+ne 10 1
+i_ne 10 1
+ncmp 10 1
+i_ncmp 10 1
+slt 10 2
+sgt 10 2
+sle 10 2
+sge 10 2
+seq 10 2 sv_eq
+sne 10 2
+scmp 10 2
+bit_and 10 2
+bit_xor 10 2
+bit_or 10 2
+negate 10 3
+i_negate 10 1
+not 10 1
+complement 10 3
+atan2 6 1
+sin 6 1
+cos 6 1
+rand 5 2
+srand 5 2
+exp 6 1
+log 6 2
+sqrt 6 2
+int 10 2
+hex 9 2
+oct 9 2
+abs 10 1
+length 10 1
+substr 10 4 PVLV
+vec 5 4
+index 9 3
+rindex 9 3
+sprintf 9 4 do_sprintf
+formline 6 7
+ord 6 2
+chr 6 2
+crypt 3 2
+ucfirst 6 2
+lcfirst 6 2
+uc 6 2
+lc 6 2
+quotemeta 6 3
+rv2av 10 3 save_svref, mg_get, save_ary
+aelemfast 10 2 av_fetch
+aelem 10 3
+aslice 9 4
+each 10 3 hv_iternext
+values 10 3 do_kv
+keys 10 3 do_kv
+delete 10 3
+exists 10 3
+rv2hv 10 3 save_svref, mg_get, save_ary, do_kv
+helem 10 3 save_svref, provide_ref
+hslice 9 4
+unpack 9 6 lengthy
+pack 9 6 lengthy
+split 9 9
+join 10 4 do_join
+list 10 2
+lslice 9 4
+anonlist 10 2
+anonhash 10 3
+splice 9 6
+push 10 2
+pop 10 2
+shift 10 2
+unshift 10 2
+sort 6 7
+reverse 9 4
+grepstart 6 5 modifies flow of control
+grepwhile 6 5 modifies flow of control
+mapstart 1 1
+mapwhile 6 5 modifies flow of control
+range 7 3 modifies flow of control
+flip 7 4 modifies flow of control
+flop 7 4 modifies flow of control
+and 10 3 modifies flow of control
+or 10 3 modifies flow of control
+xor
+cond_expr 10 3 modifies flow of control
+andassign 7 3 modifies flow of control
+orassign 7 3 modifies flow of control
+method 8 5
+entersub 10 7
+leavesub 10 5
+caller 2 8
+warn 9 3
+die 9 3
+reset 2 2
+lineseq 1 1
+nextstate 10 1 Update stack_sp from cxstack. FREETMPS.
+dbstate 3 7
+unstack
+enter 10 3 cxstack, ENTER, SAVETMPS, PUSHBLOCK
+leave 10 3 cxstack, SAVETMPS, LEAVE, POPBLOCK
+scope 1 1
+enteriter 9 4 cxstack
+iter 9 3 cxstack
+enterloop 10 4
+leaveloop 10 4
+return 10 5
+last 9 6
+next 9 6
+redo 9 6
+dump 1 9 pp_goto
+goto 6 9
+exit 9 2 my_exit
+open 9 5 do_open
+close 9 3 do_close
+pipe_op 7 4
+fileno 9 2
+umask 4 2
+binmode 4 2
+tie 5 5 pp_entersub
+untie 5 2 sv_unmagic
+tied 5 2
+dbmopen 4 5
+dbmclose 4 2
+sselect 4 4
+select 7 3
+getc 7 2
+read 8 2 pp_sysread
+enterwrite 4 4 doform
+leavewrite 4 5
+prtf 4 4 do_sprintf
+print 8 6
+sysopen 8 2
+sysread 8 4
+syswrite 8 4 pp_send
+send 8 4
+recv 8 4 pp_sysread
+eof 9 2
+tell 9 3
+seek 9 2
+truncate 8 3
+fcntl 8 4 pp_ioctl
+ioctl 8 4
+flock 8 2
+socket 5 3
+sockpair 5 3
+bind 5 3
+connect 5 3
+listen 5 3
+accept 5 3
+shutdown 5 2
+gsockopt 5 3 pp_ssockopt
+ssockopt 5 3
+getsockname 5 3 pp_getpeername
+getpeername 5 3
+lstat 5 4 pp_stat
+stat 5 4 lengthy
+ftrread 5 2 cando
+ftrwrite 5 2 cando
+ftrexec 5 2 cando
+fteread 5 2 cando
+ftewrite 5 2 cando
+fteexec 5 2 cando
+ftis 5 2 cando
+fteowned 5 2 cando
+ftrowned 5 2 cando
+ftzero 5 2 cando
+ftsize 5 2 cando
+ftmtime 5 2 cando
+ftatime 5 2 cando
+ftctime 5 2 cando
+ftsock 5 2 cando
+ftchr 5 2 cando
+ftblk 5 2 cando
+ftfile 5 2 cando
+ftdir 5 2 cando
+ftpipe 5 2 cando
+ftlink 5 2 cando
+ftsuid 5 2 cando
+ftsgid 5 2 cando
+ftsvtx 5 2 cando
+fttty 5 2 cando
+fttext 5 4
+ftbinary 5 4 fttext
+chdir
+chown
+chroot
+unlink
+chmod
+utime
+rename
+link
+symlink
+readlink
+mkdir
+rmdir
+open_dir
+readdir
+telldir
+seekdir
+rewinddir
+closedir
+fork
+wait
+waitpid
+system
+exec
+kill
+getppid
+getpgrp
+setpgrp
+getpriority
+setpriority
+time
+tms
+localtime
+gmtime
+alarm
+sleep
+shmget
+shmctl
+shmread
+shmwrite
+msgget
+msgctl
+msgsnd
+msgrcv
+semget
+semctl
+semop
+require 6 9 doeval
+dofile 6 9 doeval
+entereval 6 9 doeval
+leaveeval 6 5
+entertry 7 4 modifies flow of control
+leavetry 7 3
+ghbyname
+ghbyaddr
+ghostent
+gnbyname
+gnbyaddr
+gnetent
+gpbyname
+gpbynumber
+gprotoent
+gsbyname
+gsbyport
+gservent
+shostent
+snetent
+sprotoent
+sservent
+ehostent
+enetent
+eprotoent
+eservent
+gpwnam
+gpwuid
+gpwent
+spwent
+epwent
+ggrnam
+ggrgid
+ggrent
+sgrent
+egrent
+getlogin
+syscall
+ \ No newline at end of file
diff --git a/gnu/usr.bin/perl/ext/B/typemap b/gnu/usr.bin/perl/ext/B/typemap
new file mode 100644
index 00000000000..7206a6a2e11
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/B/typemap
@@ -0,0 +1,69 @@
+TYPEMAP
+
+B::OP T_OP_OBJ
+B::UNOP T_OP_OBJ
+B::BINOP T_OP_OBJ
+B::LOGOP T_OP_OBJ
+B::CONDOP T_OP_OBJ
+B::LISTOP T_OP_OBJ
+B::PMOP T_OP_OBJ
+B::SVOP T_OP_OBJ
+B::GVOP T_OP_OBJ
+B::PVOP T_OP_OBJ
+B::CVOP T_OP_OBJ
+B::LOOP T_OP_OBJ
+B::COP T_OP_OBJ
+
+B::SV T_SV_OBJ
+B::PV T_SV_OBJ
+B::IV T_SV_OBJ
+B::NV T_SV_OBJ
+B::PVMG T_SV_OBJ
+B::PVLV T_SV_OBJ
+B::BM T_SV_OBJ
+B::RV T_SV_OBJ
+B::GV T_SV_OBJ
+B::CV T_SV_OBJ
+B::HV T_SV_OBJ
+B::AV T_SV_OBJ
+B::IO T_SV_OBJ
+
+B::MAGIC T_MG_OBJ
+SSize_t T_IV
+STRLEN T_IV
+
+INPUT
+T_OP_OBJ
+ if (SvROK($arg)) {
+ IV tmp = SvIV((SV*)SvRV($arg));
+ $var = ($type) tmp;
+ }
+ else
+ croak(\"$var is not a reference\")
+
+T_SV_OBJ
+ if (SvROK($arg)) {
+ IV tmp = SvIV((SV*)SvRV($arg));
+ $var = ($type) tmp;
+ }
+ else
+ croak(\"$var is not a reference\")
+
+T_MG_OBJ
+ if (SvROK($arg)) {
+ IV tmp = SvIV((SV*)SvRV($arg));
+ $var = ($type) tmp;
+ }
+ else
+ croak(\"$var is not a reference\")
+
+OUTPUT
+T_OP_OBJ
+ sv_setiv(newSVrv($arg, cc_opclassname((OP*)$var)), (IV)$var);
+
+T_SV_OBJ
+ make_sv_object(($arg), (SV*)($var));
+
+
+T_MG_OBJ
+ sv_setiv(newSVrv($arg, "B::MAGIC"), (IV)$var);
diff --git a/gnu/usr.bin/perl/ext/DB_File/Changes b/gnu/usr.bin/perl/ext/DB_File/Changes
new file mode 100644
index 00000000000..2fab9192290
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/DB_File/Changes
@@ -0,0 +1,234 @@
+
+0.1
+
+ First Release.
+
+0.2
+
+ When DB_File is opening a database file it no longer terminates the
+ process if dbopen returned an error. This allows file protection
+ errors to be caught at run time. Thanks to Judith Grass
+ <grass@cybercash.com> for spotting the bug.
+
+0.3
+
+ Added prototype support for multiple btree compare callbacks.
+
+1.0
+
+ DB_File has been in use for over a year. To reflect that, the
+ version number has been incremented to 1.0.
+
+ Added complete support for multiple concurrent callbacks.
+
+ Using the push method on an empty list didn't work properly. This
+ has been fixed.
+
+1.01
+
+ Fixed a core dump problem with SunOS.
+
+ The return value from TIEHASH wasn't set to NULL when dbopen
+ returned an error.
+
+1.02
+
+ Merged OS/2 specific code into DB_File.xs
+
+ Removed some redundant code in DB_File.xs.
+
+ Documentation update.
+
+ Allow negative subscripts with RECNO interface.
+
+ Changed the default flags from O_RDWR to O_CREAT|O_RDWR.
+
+ The example code which showed how to lock a database needed a call
+ to sync added. Without it the resultant database file was empty.
+
+ Added get_dup method.
+
+1.03
+
+ Documentation update.
+
+ DB_File now imports the constants (O_RDWR, O_CREAT etc.) from Fcntl
+ automatically.
+
+ The standard hash function exists is now supported.
+
+ Modified the behavior of get_dup. When it returns an associative
+ array, the value is the count of the number of matching BTREE
+ values.
+
+1.04
+
+ Minor documentation changes.
+
+ Fixed a bug in hash_cb. Patches supplied by Dave Hammen,
+ <hammen@gothamcity.jsc.nasa.govt>.
+
+ Fixed a bug with the constructors for DB_File::HASHINFO,
+ DB_File::BTREEINFO and DB_File::RECNOINFO. Also tidied up the
+ constructors to make them -w clean.
+
+ Reworked part of the test harness to be more locale friendly.
+
+1.05
+
+ Made all scripts in the documentation strict and -w clean.
+
+ Added logic to DB_File.xs to allow the module to be built after
+ Perl is installed.
+
+1.06
+
+ Minor namespace cleanup: Localized PrintBtree.
+
+1.07
+
+ Fixed bug with RECNO, where bval wasn't defaulting to "\n".
+
+1.08
+
+ Documented operation of bval.
+
+1.09
+
+ Minor bug fix in DB_File::HASHINFO, DB_File::RECNOINFO and
+ DB_File::BTREEINFO.
+
+ Changed default mode to 0666.
+
+1.10
+
+ Fixed fd method so that it still returns -1 for in-memory files
+ when db 1.86 is used.
+
+1.11
+
+ Documented the untie gotcha.
+
+1.12
+
+ Documented the incompatibility with version 2 of Berkeley DB.
+
+1.13
+
+ Minor changes to DB_FIle.xs and DB_File.pm
+
+1.14
+
+ Made it illegal to tie an associative array to a RECNO database and
+ an ordinary array to a HASH or BTREE database.
+
+1.15
+
+ Patch from Gisle Aas <gisle@aas.no> to suppress "use of undefined
+ value" warning with db_get and db_seq.
+
+ Patch from Gisle Aas <gisle@aas.no> to make DB_File export only the
+ O_* constants from Fcntl.
+
+ Removed the DESTROY method from the DB_File::HASHINFO module.
+
+ Previously DB_File hard-wired the class name of any object that it
+ created to "DB_File". This makes sub-classing difficult. Now
+ DB_File creats objects in the namespace of the package it has been
+ inherited into.
+
+
+1.16
+
+ A harmless looking tab was causing Makefile.PL to fail on AIX 3.2.5
+
+ Small fix for the AIX strict C compiler XLC which doesn't like
+ __attribute__ being defined via proto.h and redefined via db.h. Fix
+ courtesy of Jarkko Hietaniemi.
+
+1.50
+
+ DB_File can now build with either DB 1.x or 2.x, but not both at
+ the same time.
+
+1.51
+
+ Fixed the test harness so that it doesn't expect DB_File to have
+ been installed by the main Perl build.
+
+
+ Fixed a bug in mapping 1.x O_RDONLY flag to 2.x DB_RDONLY equivalent
+
+1.52
+
+ Patch from Nick Ing-Simmons now allows DB_File to build on NT.
+ Merged 1.15 patch.
+
+1.53
+
+ Added DB_RENUMBER to flags for recno.
+
+1.54
+
+ Fixed a small bug in the test harness when run under win32
+ The emulation of fd when useing DB 2.x was busted.
+
+1.55
+ Merged 1.16 changes.
+
+1.56
+ Documented the Solaris 2.5 mutex bug
+
+1.57
+ If Perl has been compiled with Threads support,the symbol op will be
+ defined. This clashes with a field name in db.h, so it needs to be
+ #undef'ed before db.h is included.
+
+1.58
+ Tied Array support was enhanced in Perl 5.004_57. DB_File now
+ supports PUSH,POP,SHIFT,UNSHIFT & STORESIZE.
+
+ Fixed a problem with the use of sv_setpvn. When the size is
+ specified as 0, it does a strlen on the data. This was ok for DB
+ 1.x, but isn't for DB 2.x.
+
+1.59
+ Updated the license section.
+
+ Berkeley DB 2.4.10 disallows zero length keys. Tests 32 & 42 in
+ db-btree.t and test 27 in db-hash.t failed because of this change.
+ Those tests have been zapped.
+
+ Added dbinfo to the distribution.
+
+1.60
+ Changed the test to check for full tied array support
+
+1.61 19th November 1998
+
+ Added a note to README about how to build Berkeley DB 2.x when
+ using HP-UX.
+ Minor modifications to get the module to build with DB 2.5.x
+ Fixed a typo in the definition of O_RDONLY, courtesy of Mark Kettenis.
+
+1.62 30th November 1998
+
+ Added hints/dynixptx.pl.
+ Fixed typemap -- 1.61 used PL_na instead of na
+
+1.63 19th December 1998
+
+ * Fix to allow DB 2.6.x to build with DB_File
+ * Documentation updated to use push,pop etc in the RECNO example &
+ to include the find_dup & del_dup methods.
+
+1.64 21st February 1999
+
+ * Tidied the 1.x to 2.x flag mapping code.
+ * Added a patch from Mark Kettenis <kettenis@wins.uva.nl> to fix a flag
+ mapping problem with O_RDONLY on the Hurd
+ * Updated the message that db-recno.t prints when tests 51, 53 or 55 fail.
+
+1.65 6th March 1999
+ * Fixed a bug in the recno PUSH logic.
+ * The BOOT version check now needs 2.3.4 when using Berkeley DB version 2
diff --git a/gnu/usr.bin/perl/ext/DB_File/dbinfo b/gnu/usr.bin/perl/ext/DB_File/dbinfo
new file mode 100644
index 00000000000..24a794448f8
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/DB_File/dbinfo
@@ -0,0 +1,96 @@
+#!/usr/local/bin/perl
+
+# Name: dbinfo -- identify berkeley DB version used to create
+# a database file
+#
+# Author: Paul Marquess <Paul.Marquess@btinternet.com>
+# Version: 1.01
+# Date 16th April 1998
+#
+# Copyright (c) 1998 Paul Marquess. All rights reserved.
+# This program is free software; you can redistribute it and/or
+# modify it under the same terms as Perl itself.
+
+# Todo: Print more stats on a db file, e.g. no of records
+# add log/txn/lock files
+
+use strict ;
+
+my %Data =
+ (
+ 0x053162 => {
+ Type => "Btree",
+ Versions =>
+ {
+ 1 => "Unknown (older than 1.71)",
+ 2 => "Unknown (older than 1.71)",
+ 3 => "1.71 -> 1.85, 1.86",
+ 4 => "Unknown",
+ 5 => "2.0.0 -> 2.3.0",
+ 6 => "2.3.1 or greater",
+ }
+ },
+ 0x061561 => {
+ Type => "Hash",
+ Versions =>
+ {
+ 1 => "Unknown (older than 1.71)",
+ 2 => "1.71 -> 1.85",
+ 3 => "1.86",
+ 4 => "2.0.0 -> 2.1.0",
+ 5 => "2.2.6 or greater",
+ }
+ },
+ ) ;
+
+die "Usage: dbinfo file\n" unless @ARGV == 1 ;
+
+print "testing file $ARGV[0]...\n\n" ;
+open (F, "<$ARGV[0]") or die "Cannot open file $ARGV[0]: $!\n" ;
+
+my $buff ;
+read F, $buff, 20 ;
+
+my (@info) = unpack("NNNNN", $buff) ;
+my (@info1) = unpack("VVVVV", $buff) ;
+my ($magic, $version, $endian) ;
+
+if ($Data{$info[0]}) # first try DB 1.x format
+{
+ $magic = $info[0] ;
+ $version = $info[1] ;
+ $endian = "Unknown" ;
+}
+elsif ($Data{$info[3]}) # next DB 2.x big endian
+{
+ $magic = $info[3] ;
+ $version = $info[4] ;
+ $endian = "Big Endian" ;
+}
+elsif ($Data{$info1[3]}) # next DB 2.x little endian
+{
+ $magic = $info1[3] ;
+ $version = $info1[4] ;
+ $endian = "Little Endian" ;
+}
+else
+ { die "not a Berkeley DB database file.\n" }
+
+my $type = $Data{$magic} ;
+my $magic = sprintf "%06X", $magic ;
+
+my $ver_string = "Unknown" ;
+$ver_string = $type->{Versions}{$version}
+ if defined $type->{Versions}{$version} ;
+
+print <<EOM ;
+File Type: Berkeley DB $type->{Type} file.
+File Version ID: $version
+Built with Berkeley DB: $ver_string
+Byte Order: $endian
+Magic: $magic
+EOM
+
+close F ;
+
+exit ;
diff --git a/gnu/usr.bin/perl/ext/DB_File/hints/dynixptx.pl b/gnu/usr.bin/perl/ext/DB_File/hints/dynixptx.pl
new file mode 100644
index 00000000000..bb5ffa56e6b
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/DB_File/hints/dynixptx.pl
@@ -0,0 +1,3 @@
+# Need to add an extra '-lc' to the end to work around a DYNIX/ptx bug
+
+$self->{LIBS} = ['-lm -lc'];
diff --git a/gnu/usr.bin/perl/ext/Data/Dumper/Changes b/gnu/usr.bin/perl/ext/Data/Dumper/Changes
new file mode 100644
index 00000000000..9a96edab8dd
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/Data/Dumper/Changes
@@ -0,0 +1,178 @@
+=head1 NAME
+
+HISTORY - public release history for Data::Dumper
+
+=head1 DESCRIPTION
+
+=over 8
+
+=item 2.10 (31 Oct 1998)
+
+Bugfixes for dumping related undef values, globs, and better double
+quoting: three patches suggested by Gisle Aas <gisle@aas.no>.
+
+Escaping of single quotes in the XS version could get tripped up
+by the presence of nulls in the string. Fix suggested by
+Slaven Rezic <eserte@cs.tu-berlin.de>.
+
+Rather large scale reworking of the logic in how seen values
+are stashed. Anonymous scalars that may be encountered while
+traversing the structure are properly tracked, in case they become
+used in data dumped in a later pass. There used to be a problem
+with the previous logic that prevented such structures from being
+dumped correctly.
+
+Various additions to the testsuite.
+
+=item 2.09 (9 July 1998)
+
+Implement $Data::Dumper::Bless, suggested by Mark Daku <daku@nortel.ca>.
+
+=item 2.081 (15 January 1998)
+
+Minor release to fix Makefile.PL not accepting MakeMaker args.
+
+=item 2.08 (7 December 1997)
+
+Glob dumps don't output superflous 'undef' anymore.
+
+Fixes from Gisle Aas <gisle@aas.no> to make Dumper() work with
+overloaded strings in recent perls, and his new testsuite.
+
+require 5.004.
+
+A separate flag to always quote hash keys (on by default).
+
+Recreating known CODE refs is now better supported.
+
+Changed flawed constant SCALAR bless workaround.
+
+=item 2.07 (7 December 1996)
+
+Dumpxs output is now exactly the same as Dump. It still doesn't
+honor C<Useqq> though.
+
+Regression tests test for identical output and C<eval>-ability.
+
+Bug in *GLOB{THING} output fixed.
+
+Other small enhancements.
+
+=item 2.06 (2 December 1996)
+
+Bugfix that was serious enough for new release--the bug cripples
+MLDBM. Problem was "Attempt to modify readonly value..." failures
+that stemmed for a misguided SvPV_force() instead of a SvPV().)
+
+=item 2.05 (2 December 1996)
+
+Fixed the type mismatch that was causing Dumpxs test to fail
+on 64-bit platforms.
+
+GLOB elements are dumped now when C<Purity> is set (using the
+*GLOB{THING} syntax).
+
+The C<Freezer> option can be set to a method name to call
+before probing objects for dumping. Some applications: objects with
+external data, can re-bless themselves into a transitional package;
+Objects the maintain ephemeral state (like open files) can put
+additional information in the object to facilitate persistence.
+
+The corresponding C<Toaster> option, if set, specifies
+the method call that will revive the frozen object.
+
+The C<Deepcopy> flag has been added to do just that.
+
+Dumper does more aggressive cataloging of SCALARs encountered
+within ARRAY/HASH structures. Thanks to Norman Gaywood
+<norm@godel.une.edu.au> for reporting the problem.
+
+Objects that C<overload> the '""' operator are now handled
+properly by the C<Dump> method.
+
+Significant additions to the testsuite.
+
+More documentation.
+
+=item 2.04beta (28 August 1996)
+
+Made dump of glob names respect C<Useqq> setting.
+
+[@$%] are now escaped now when in double quotes.
+
+=item 2.03beta (26 August 1996)
+
+Fixed Dumpxs. It was appending trailing nulls to globnames.
+(reported by Randal Schwartz <merlyn@teleport.com>).
+
+Calling the C<Indent()> method on a dumper object now correctly
+resets the internal separator (reported by Curt Tilmes
+<curt@ltpmail.gsfc.nasa.gov>).
+
+New C<Terse> option to suppress the 'C<VARI<n> = >' prefix
+introduced. If the option is set, they are output only when
+absolutely essential.
+
+The C<Useqq> flag is supported (but not by the XSUB version
+yet).
+
+Embedded nulls in keys are now handled properly by Dumpxs.
+
+Dumper.xs now use various integer types in perl.h (should
+make it compile without noises on 64 bit platforms, although
+I haven't been able to test this).
+
+All the dump methods now return a list of strings in a list
+context.
+
+
+=item 2.02beta (13 April 1996)
+
+Non portable sprintf usage in XS code fixed (thanks to
+Ulrich Pfeifer <pfeifer@charly.informatik.uni-dortmund.de>).
+
+
+=item 2.01beta (10 April 1996)
+
+Minor bugfix (single digit numbers were always getting quoted).
+
+
+=item 2.00beta (9 April 1996)
+
+C<Dumpxs> is now the exact XSUB equivalent of C<Dump>. The XS version
+is 4-5 times faster.
+
+C<require 5.002>.
+
+MLDBM example removed (as its own module, it has a separate CPAN
+reality now).
+
+Fixed bugs in handling keys with wierd characters. Perl can be
+tripped up in its implicit quoting of the word before '=>'. The
+fix: C<Data::Dumper::Purity>, when set, always triggers quotes
+around hash keys.
+
+Andreas Koenig <k@anna.in-berlin.de> pointed out that handling octals
+is busted. His patch added.
+
+Dead code removed, other minor documentation fixes.
+
+
+=item 1.23 (3 Dec 1995)
+
+MLDBM example added.
+
+Several folks pointed out that quoting of ticks and backslashes
+in strings is missing. Added.
+
+Ian Phillips <ian@pipex.net> pointed out that numerics may lose
+precision without quotes. Fixed.
+
+
+=item 1.21 (20 Nov 1995)
+
+Last stable version I can remember.
+
+=back
+
+=cut
diff --git a/gnu/usr.bin/perl/ext/Data/Dumper/Dumper.pm b/gnu/usr.bin/perl/ext/Data/Dumper/Dumper.pm
new file mode 100644
index 00000000000..b1fd2b790ae
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/Data/Dumper/Dumper.pm
@@ -0,0 +1,1000 @@
+#
+# Data/Dumper.pm
+#
+# convert perl data structures into perl syntax suitable for both printing
+# and eval
+#
+# Documentation at the __END__
+#
+
+package Data::Dumper;
+
+$VERSION = $VERSION = '2.101';
+
+#$| = 1;
+
+require 5.004;
+require Exporter;
+require DynaLoader;
+require overload;
+
+use Carp;
+
+@ISA = qw(Exporter DynaLoader);
+@EXPORT = qw(Dumper);
+@EXPORT_OK = qw(DumperX);
+
+bootstrap Data::Dumper;
+
+# module vars and their defaults
+$Indent = 2 unless defined $Indent;
+$Purity = 0 unless defined $Purity;
+$Pad = "" unless defined $Pad;
+$Varname = "VAR" unless defined $Varname;
+$Useqq = 0 unless defined $Useqq;
+$Terse = 0 unless defined $Terse;
+$Freezer = "" unless defined $Freezer;
+$Toaster = "" unless defined $Toaster;
+$Deepcopy = 0 unless defined $Deepcopy;
+$Quotekeys = 1 unless defined $Quotekeys;
+$Bless = "bless" unless defined $Bless;
+#$Expdepth = 0 unless defined $Expdepth;
+#$Maxdepth = 0 unless defined $Maxdepth;
+
+#
+# expects an arrayref of values to be dumped.
+# can optionally pass an arrayref of names for the values.
+# names must have leading $ sign stripped. begin the name with *
+# to cause output of arrays and hashes rather than refs.
+#
+sub new {
+ my($c, $v, $n) = @_;
+
+ croak "Usage: PACKAGE->new(ARRAYREF, [ARRAYREF])"
+ unless (defined($v) && (ref($v) eq 'ARRAY'));
+ $n = [] unless (defined($n) && (ref($v) eq 'ARRAY'));
+
+ my($s) = {
+ level => 0, # current recursive depth
+ indent => $Indent, # various styles of indenting
+ pad => $Pad, # all lines prefixed by this string
+ xpad => "", # padding-per-level
+ apad => "", # added padding for hash keys n such
+ sep => "", # list separator
+ seen => {}, # local (nested) refs (id => [name, val])
+ todump => $v, # values to dump []
+ names => $n, # optional names for values []
+ varname => $Varname, # prefix to use for tagging nameless ones
+ purity => $Purity, # degree to which output is evalable
+ useqq => $Useqq, # use "" for strings (backslashitis ensues)
+ terse => $Terse, # avoid name output (where feasible)
+ freezer => $Freezer, # name of Freezer method for objects
+ toaster => $Toaster, # name of method to revive objects
+ deepcopy => $Deepcopy, # dont cross-ref, except to stop recursion
+ quotekeys => $Quotekeys, # quote hash keys
+ 'bless' => $Bless, # keyword to use for "bless"
+# expdepth => $Expdepth, # cutoff depth for explicit dumping
+# maxdepth => $Maxdepth, # depth beyond which we give up
+ };
+
+ if ($Indent > 0) {
+ $s->{xpad} = " ";
+ $s->{sep} = "\n";
+ }
+ return bless($s, $c);
+}
+
+#
+# add-to or query the table of already seen references
+#
+sub Seen {
+ my($s, $g) = @_;
+ if (defined($g) && (ref($g) eq 'HASH')) {
+ my($k, $v, $id);
+ while (($k, $v) = each %$g) {
+ if (defined $v and ref $v) {
+ ($id) = (overload::StrVal($v) =~ /\((.*)\)$/);
+ if ($k =~ /^[*](.*)$/) {
+ $k = (ref $v eq 'ARRAY') ? ( "\\\@" . $1 ) :
+ (ref $v eq 'HASH') ? ( "\\\%" . $1 ) :
+ (ref $v eq 'CODE') ? ( "\\\&" . $1 ) :
+ ( "\$" . $1 ) ;
+ }
+ elsif ($k !~ /^\$/) {
+ $k = "\$" . $k;
+ }
+ $s->{seen}{$id} = [$k, $v];
+ }
+ else {
+ carp "Only refs supported, ignoring non-ref item \$$k";
+ }
+ }
+ return $s;
+ }
+ else {
+ return map { @$_ } values %{$s->{seen}};
+ }
+}
+
+#
+# set or query the values to be dumped
+#
+sub Values {
+ my($s, $v) = @_;
+ if (defined($v) && (ref($v) eq 'ARRAY')) {
+ $s->{todump} = [@$v]; # make a copy
+ return $s;
+ }
+ else {
+ return @{$s->{todump}};
+ }
+}
+
+#
+# set or query the names of the values to be dumped
+#
+sub Names {
+ my($s, $n) = @_;
+ if (defined($n) && (ref($n) eq 'ARRAY')) {
+ $s->{names} = [@$n]; # make a copy
+ return $s;
+ }
+ else {
+ return @{$s->{names}};
+ }
+}
+
+sub DESTROY {}
+
+#
+# dump the refs in the current dumper object.
+# expects same args as new() if called via package name.
+#
+sub Dump {
+ my($s) = shift;
+ my(@out, $val, $name);
+ my($i) = 0;
+ local(@post);
+
+ $s = $s->new(@_) unless ref $s;
+
+ for $val (@{$s->{todump}}) {
+ my $out = "";
+ @post = ();
+ $name = $s->{names}[$i++];
+ if (defined $name) {
+ if ($name =~ /^[*](.*)$/) {
+ if (defined $val) {
+ $name = (ref $val eq 'ARRAY') ? ( "\@" . $1 ) :
+ (ref $val eq 'HASH') ? ( "\%" . $1 ) :
+ (ref $val eq 'CODE') ? ( "\*" . $1 ) :
+ ( "\$" . $1 ) ;
+ }
+ else {
+ $name = "\$" . $1;
+ }
+ }
+ elsif ($name !~ /^\$/) {
+ $name = "\$" . $name;
+ }
+ }
+ else {
+ $name = "\$" . $s->{varname} . $i;
+ }
+
+ my $valstr;
+ {
+ local($s->{apad}) = $s->{apad};
+ $s->{apad} .= ' ' x (length($name) + 3) if $s->{indent} >= 2;
+ $valstr = $s->_dump($val, $name);
+ }
+
+ $valstr = "$name = " . $valstr . ';' if @post or !$s->{terse};
+ $out .= $s->{pad} . $valstr . $s->{sep};
+ $out .= $s->{pad} . join(';' . $s->{sep} . $s->{pad}, @post)
+ . ';' . $s->{sep} if @post;
+
+ push @out, $out;
+ }
+ return wantarray ? @out : join('', @out);
+}
+
+#
+# twist, toil and turn;
+# and recurse, of course.
+#
+sub _dump {
+ my($s, $val, $name) = @_;
+ my($sname);
+ my($out, $realpack, $realtype, $type, $ipad, $id, $blesspad);
+
+ $type = ref $val;
+ $out = "";
+
+ if ($type) {
+
+ # prep it, if it looks like an object
+ if ($type =~ /[a-z_:]/) {
+ my $freezer = $s->{freezer};
+ $val->$freezer() if $freezer && UNIVERSAL::can($val, $freezer);
+ }
+
+ ($realpack, $realtype, $id) =
+ (overload::StrVal($val) =~ /^(?:(.*)\=)?([^=]*)\(([^\(]*)\)$/);
+
+ # if it has a name, we need to either look it up, or keep a tab
+ # on it so we know when we hit it later
+ if (defined($name) and length($name)) {
+ # keep a tab on it so that we dont fall into recursive pit
+ if (exists $s->{seen}{$id}) {
+# if ($s->{expdepth} < $s->{level}) {
+ if ($s->{purity} and $s->{level} > 0) {
+ $out = ($realtype eq 'HASH') ? '{}' :
+ ($realtype eq 'ARRAY') ? '[]' :
+ "''" ;
+ push @post, $name . " = " . $s->{seen}{$id}[0];
+ }
+ else {
+ $out = $s->{seen}{$id}[0];
+ if ($name =~ /^([\@\%])/) {
+ my $start = $1;
+ if ($out =~ /^\\$start/) {
+ $out = substr($out, 1);
+ }
+ else {
+ $out = $start . '{' . $out . '}';
+ }
+ }
+ }
+ return $out;
+# }
+ }
+ else {
+ # store our name
+ $s->{seen}{$id} = [ (($name =~ /^[@%]/) ? ('\\' . $name ) :
+ ($realtype eq 'CODE' and
+ $name =~ /^[*](.*)$/) ? ('\\&' . $1 ) :
+ $name ),
+ $val ];
+ }
+ }
+
+ $s->{level}++;
+ $ipad = $s->{xpad} x $s->{level};
+
+ if ($realpack) { # we have a blessed ref
+ $out = $s->{'bless'} . '( ';
+ $blesspad = $s->{apad};
+ $s->{apad} .= ' ' if ($s->{indent} >= 2);
+ }
+
+ if ($realtype eq 'SCALAR') {
+ if ($realpack) {
+ $out .= 'do{\\(my $o = ' . $s->_dump($$val, "\${$name}") . ')}';
+ }
+ else {
+ $out .= '\\' . $s->_dump($$val, "\${$name}");
+ }
+ }
+ elsif ($realtype eq 'GLOB') {
+ $out .= '\\' . $s->_dump($$val, "*{$name}");
+ }
+ elsif ($realtype eq 'ARRAY') {
+ my($v, $pad, $mname);
+ my($i) = 0;
+ $out .= ($name =~ /^\@/) ? '(' : '[';
+ $pad = $s->{sep} . $s->{pad} . $s->{apad};
+ ($name =~ /^\@(.*)$/) ? ($mname = "\$" . $1) :
+ # omit -> if $foo->[0]->{bar}, but not ${$foo->[0]}->{bar}
+ ($name =~ /^\\?[\%\@\*\$][^{].*[]}]$/) ? ($mname = $name) :
+ ($mname = $name . '->');
+ $mname .= '->' if $mname =~ /^\*.+\{[A-Z]+\}$/;
+ for $v (@$val) {
+ $sname = $mname . '[' . $i . ']';
+ $out .= $pad . $ipad . '#' . $i if $s->{indent} >= 3;
+ $out .= $pad . $ipad . $s->_dump($v, $sname);
+ $out .= "," if $i++ < $#$val;
+ }
+ $out .= $pad . ($s->{xpad} x ($s->{level} - 1)) if $i;
+ $out .= ($name =~ /^\@/) ? ')' : ']';
+ }
+ elsif ($realtype eq 'HASH') {
+ my($k, $v, $pad, $lpad, $mname);
+ $out .= ($name =~ /^\%/) ? '(' : '{';
+ $pad = $s->{sep} . $s->{pad} . $s->{apad};
+ $lpad = $s->{apad};
+ ($name =~ /^\%(.*)$/) ? ($mname = "\$" . $1) :
+ # omit -> if $foo->[0]->{bar}, but not ${$foo->[0]}->{bar}
+ ($name =~ /^\\?[\%\@\*\$][^{].*[]}]$/) ? ($mname = $name) :
+ ($mname = $name . '->');
+ $mname .= '->' if $mname =~ /^\*.+\{[A-Z]+\}$/;
+ while (($k, $v) = each %$val) {
+ my $nk = $s->_dump($k, "");
+ $nk = $1 if !$s->{quotekeys} and $nk =~ /^[\"\']([A-Za-z_]\w*)[\"\']$/;
+ $sname = $mname . '{' . $nk . '}';
+ $out .= $pad . $ipad . $nk . " => ";
+
+ # temporarily alter apad
+ $s->{apad} .= (" " x (length($nk) + 4)) if $s->{indent} >= 2;
+ $out .= $s->_dump($val->{$k}, $sname) . ",";
+ $s->{apad} = $lpad if $s->{indent} >= 2;
+ }
+ if (substr($out, -1) eq ',') {
+ chop $out;
+ $out .= $pad . ($s->{xpad} x ($s->{level} - 1));
+ }
+ $out .= ($name =~ /^\%/) ? ')' : '}';
+ }
+ elsif ($realtype eq 'CODE') {
+ $out .= 'sub { "DUMMY" }';
+ carp "Encountered CODE ref, using dummy placeholder" if $s->{purity};
+ }
+ else {
+ croak "Can\'t handle $realtype type.";
+ }
+
+ if ($realpack) { # we have a blessed ref
+ $out .= ', \'' . $realpack . '\'' . ' )';
+ $out .= '->' . $s->{toaster} . '()' if $s->{toaster} ne '';
+ $s->{apad} = $blesspad;
+ }
+ $s->{level}--;
+
+ }
+ else { # simple scalar
+
+ my $ref = \$_[1];
+ # first, catalog the scalar
+ if ($name ne '') {
+ ($id) = ("$ref" =~ /\(([^\(]*)\)$/);
+ if (exists $s->{seen}{$id}) {
+ if ($s->{seen}{$id}[2]) {
+ $out = $s->{seen}{$id}[0];
+ #warn "[<$out]\n";
+ return "\${$out}";
+ }
+ }
+ else {
+ #warn "[>\\$name]\n";
+ $s->{seen}{$id} = ["\\$name", $ref];
+ }
+ }
+ if (ref($ref) eq 'GLOB' or "$ref" =~ /=GLOB\([^()]+\)$/) { # glob
+ my $name = substr($val, 1);
+ if ($name =~ /^[A-Za-z_][\w:]*$/) {
+ $name =~ s/^main::/::/;
+ $sname = $name;
+ }
+ else {
+ $sname = $s->_dump($name, "");
+ $sname = '{' . $sname . '}';
+ }
+ if ($s->{purity}) {
+ my $k;
+ local ($s->{level}) = 0;
+ for $k (qw(SCALAR ARRAY HASH)) {
+ my $gval = *$val{$k};
+ next unless defined $gval;
+ next if $k eq "SCALAR" && ! defined $$gval; # always there
+
+ # _dump can push into @post, so we hold our place using $postlen
+ my $postlen = scalar @post;
+ $post[$postlen] = "\*$sname = ";
+ local ($s->{apad}) = " " x length($post[$postlen]) if $s->{indent} >= 2;
+ $post[$postlen] .= $s->_dump($gval, "\*$sname\{$k\}");
+ }
+ }
+ $out .= '*' . $sname;
+ }
+ elsif (!defined($val)) {
+ $out .= "undef";
+ }
+ elsif ($val =~ /^-?[1-9]\d{0,8}$/) { # safe decimal number
+ $out .= $val;
+ }
+ else { # string
+ if ($s->{useqq}) {
+ $out .= qquote($val, $s->{useqq});
+ }
+ else {
+ $val =~ s/([\\\'])/\\$1/g;
+ $out .= '\'' . $val . '\'';
+ }
+ }
+ }
+ if ($id) {
+ # if we made it this far, $id was added to seen list at current
+ # level, so remove it to get deep copies
+ if ($s->{deepcopy}) {
+ delete($s->{seen}{$id});
+ }
+ elsif ($name) {
+ $s->{seen}{$id}[2] = 1;
+ }
+ }
+ return $out;
+}
+
+#
+# non-OO style of earlier version
+#
+sub Dumper {
+ return Data::Dumper->Dump([@_]);
+}
+
+#
+# same, only calls the XS version
+#
+sub DumperX {
+ return Data::Dumper->Dumpxs([@_], []);
+}
+
+sub Dumpf { return Data::Dumper->Dump(@_) }
+
+sub Dumpp { print Data::Dumper->Dump(@_) }
+
+#
+# reset the "seen" cache
+#
+sub Reset {
+ my($s) = shift;
+ $s->{seen} = {};
+ return $s;
+}
+
+sub Indent {
+ my($s, $v) = @_;
+ if (defined($v)) {
+ if ($v == 0) {
+ $s->{xpad} = "";
+ $s->{sep} = "";
+ }
+ else {
+ $s->{xpad} = " ";
+ $s->{sep} = "\n";
+ }
+ $s->{indent} = $v;
+ return $s;
+ }
+ else {
+ return $s->{indent};
+ }
+}
+
+sub Pad {
+ my($s, $v) = @_;
+ defined($v) ? (($s->{pad} = $v), return $s) : $s->{pad};
+}
+
+sub Varname {
+ my($s, $v) = @_;
+ defined($v) ? (($s->{varname} = $v), return $s) : $s->{varname};
+}
+
+sub Purity {
+ my($s, $v) = @_;
+ defined($v) ? (($s->{purity} = $v), return $s) : $s->{purity};
+}
+
+sub Useqq {
+ my($s, $v) = @_;
+ defined($v) ? (($s->{useqq} = $v), return $s) : $s->{useqq};
+}
+
+sub Terse {
+ my($s, $v) = @_;
+ defined($v) ? (($s->{terse} = $v), return $s) : $s->{terse};
+}
+
+sub Freezer {
+ my($s, $v) = @_;
+ defined($v) ? (($s->{freezer} = $v), return $s) : $s->{freezer};
+}
+
+sub Toaster {
+ my($s, $v) = @_;
+ defined($v) ? (($s->{toaster} = $v), return $s) : $s->{toaster};
+}
+
+sub Deepcopy {
+ my($s, $v) = @_;
+ defined($v) ? (($s->{deepcopy} = $v), return $s) : $s->{deepcopy};
+}
+
+sub Quotekeys {
+ my($s, $v) = @_;
+ defined($v) ? (($s->{quotekeys} = $v), return $s) : $s->{quotekeys};
+}
+
+sub Bless {
+ my($s, $v) = @_;
+ defined($v) ? (($s->{'bless'} = $v), return $s) : $s->{'bless'};
+}
+
+# used by qquote below
+my %esc = (
+ "\a" => "\\a",
+ "\b" => "\\b",
+ "\t" => "\\t",
+ "\n" => "\\n",
+ "\f" => "\\f",
+ "\r" => "\\r",
+ "\e" => "\\e",
+);
+
+# put a string value in double quotes
+sub qquote {
+ local($_) = shift;
+ s/([\\\"\@\$])/\\$1/g;
+ return qq("$_") unless /[^\040-\176]/; # fast exit
+
+ my $high = shift || "";
+ s/([\a\b\t\n\f\r\e])/$esc{$1}/g;
+
+ # no need for 3 digits in escape for these
+ s/([\0-\037])(?!\d)/'\\'.sprintf('%o',ord($1))/eg;
+
+ s/([\0-\037\177])/'\\'.sprintf('%03o',ord($1))/eg;
+ if ($high eq "iso8859") {
+ s/([\200-\240])/'\\'.sprintf('%o',ord($1))/eg;
+ } elsif ($high eq "utf8") {
+# use utf8;
+# $str =~ s/([^\040-\176])/sprintf "\\x{%04x}", ord($1)/ge;
+ } elsif ($high eq "8bit") {
+ # leave it as it is
+ } else {
+ s/([\0-\037\177-\377])/'\\'.sprintf('%03o',ord($1))/eg;
+ }
+ return qq("$_");
+}
+
+1;
+__END__
+
+=head1 NAME
+
+Data::Dumper - stringified perl data structures, suitable for both printing and C<eval>
+
+
+=head1 SYNOPSIS
+
+ use Data::Dumper;
+
+ # simple procedural interface
+ print Dumper($foo, $bar);
+
+ # extended usage with names
+ print Data::Dumper->Dump([$foo, $bar], [qw(foo *ary)]);
+
+ # configuration variables
+ {
+ local $Data::Dump::Purity = 1;
+ eval Data::Dumper->Dump([$foo, $bar], [qw(foo *ary)]);
+ }
+
+ # OO usage
+ $d = Data::Dumper->new([$foo, $bar], [qw(foo *ary)]);
+ ...
+ print $d->Dump;
+ ...
+ $d->Purity(1)->Terse(1)->Deepcopy(1);
+ eval $d->Dump;
+
+
+=head1 DESCRIPTION
+
+Given a list of scalars or reference variables, writes out their contents in
+perl syntax. The references can also be objects. The contents of each
+variable is output in a single Perl statement. Handles self-referential
+structures correctly.
+
+The return value can be C<eval>ed to get back an identical copy of the
+original reference structure.
+
+Any references that are the same as one of those passed in will be named
+C<$VAR>I<n> (where I<n> is a numeric suffix), and other duplicate references
+to substructures within C<$VAR>I<n> will be appropriately labeled using arrow
+notation. You can specify names for individual values to be dumped if you
+use the C<Dump()> method, or you can change the default C<$VAR> prefix to
+something else. See C<$Data::Dumper::Varname> and C<$Data::Dumper::Terse>
+below.
+
+The default output of self-referential structures can be C<eval>ed, but the
+nested references to C<$VAR>I<n> will be undefined, since a recursive
+structure cannot be constructed using one Perl statement. You should set the
+C<Purity> flag to 1 to get additional statements that will correctly fill in
+these references.
+
+In the extended usage form, the references to be dumped can be given
+user-specified names. If a name begins with a C<*>, the output will
+describe the dereferenced type of the supplied reference for hashes and
+arrays, and coderefs. Output of names will be avoided where possible if
+the C<Terse> flag is set.
+
+In many cases, methods that are used to set the internal state of the
+object will return the object itself, so method calls can be conveniently
+chained together.
+
+Several styles of output are possible, all controlled by setting
+the C<Indent> flag. See L<Configuration Variables or Methods> below
+for details.
+
+
+=head2 Methods
+
+=over 4
+
+=item I<PACKAGE>->new(I<ARRAYREF [>, I<ARRAYREF]>)
+
+Returns a newly created C<Data::Dumper> object. The first argument is an
+anonymous array of values to be dumped. The optional second argument is an
+anonymous array of names for the values. The names need not have a leading
+C<$> sign, and must be comprised of alphanumeric characters. You can begin
+a name with a C<*> to specify that the dereferenced type must be dumped
+instead of the reference itself, for ARRAY and HASH references.
+
+The prefix specified by C<$Data::Dumper::Varname> will be used with a
+numeric suffix if the name for a value is undefined.
+
+Data::Dumper will catalog all references encountered while dumping the
+values. Cross-references (in the form of names of substructures in perl
+syntax) will be inserted at all possible points, preserving any structural
+interdependencies in the original set of values. Structure traversal is
+depth-first, and proceeds in order from the first supplied value to
+the last.
+
+=item I<$OBJ>->Dump I<or> I<PACKAGE>->Dump(I<ARRAYREF [>, I<ARRAYREF]>)
+
+Returns the stringified form of the values stored in the object (preserving
+the order in which they were supplied to C<new>), subject to the
+configuration options below. In an array context, it returns a list
+of strings corresponding to the supplied values.
+
+The second form, for convenience, simply calls the C<new> method on its
+arguments before dumping the object immediately.
+
+=item I<$OBJ>->Dumpxs I<or> I<PACKAGE>->Dumpxs(I<ARRAYREF [>, I<ARRAYREF]>)
+
+This method is available if you were able to compile and install the XSUB
+extension to C<Data::Dumper>. It is exactly identical to the C<Dump> method
+above, only about 4 to 5 times faster, since it is written entirely in C.
+
+=item I<$OBJ>->Seen(I<[HASHREF]>)
+
+Queries or adds to the internal table of already encountered references.
+You must use C<Reset> to explicitly clear the table if needed. Such
+references are not dumped; instead, their names are inserted wherever they
+are encountered subsequently. This is useful especially for properly
+dumping subroutine references.
+
+Expects a anonymous hash of name => value pairs. Same rules apply for names
+as in C<new>. If no argument is supplied, will return the "seen" list of
+name => value pairs, in an array context. Otherwise, returns the object
+itself.
+
+=item I<$OBJ>->Values(I<[ARRAYREF]>)
+
+Queries or replaces the internal array of values that will be dumped.
+When called without arguments, returns the values. Otherwise, returns the
+object itself.
+
+=item I<$OBJ>->Names(I<[ARRAYREF]>)
+
+Queries or replaces the internal array of user supplied names for the values
+that will be dumped. When called without arguments, returns the names.
+Otherwise, returns the object itself.
+
+=item I<$OBJ>->Reset
+
+Clears the internal table of "seen" references and returns the object
+itself.
+
+=back
+
+=head2 Functions
+
+=over 4
+
+=item Dumper(I<LIST>)
+
+Returns the stringified form of the values in the list, subject to the
+configuration options below. The values will be named C<$VAR>I<n> in the
+output, where I<n> is a numeric suffix. Will return a list of strings
+in an array context.
+
+=item DumperX(I<LIST>)
+
+Identical to the C<Dumper()> function above, but this calls the XSUB
+implementation. Only available if you were able to compile and install
+the XSUB extensions in C<Data::Dumper>.
+
+=back
+
+=head2 Configuration Variables or Methods
+
+Several configuration variables can be used to control the kind of output
+generated when using the procedural interface. These variables are usually
+C<local>ized in a block so that other parts of the code are not affected by
+the change.
+
+These variables determine the default state of the object created by calling
+the C<new> method, but cannot be used to alter the state of the object
+thereafter. The equivalent method names should be used instead to query
+or set the internal state of the object.
+
+The method forms return the object itself when called with arguments,
+so that they can be chained together nicely.
+
+=over 4
+
+=item $Data::Dumper::Indent I<or> I<$OBJ>->Indent(I<[NEWVAL]>)
+
+Controls the style of indentation. It can be set to 0, 1, 2 or 3. Style 0
+spews output without any newlines, indentation, or spaces between list
+items. It is the most compact format possible that can still be called
+valid perl. Style 1 outputs a readable form with newlines but no fancy
+indentation (each level in the structure is simply indented by a fixed
+amount of whitespace). Style 2 (the default) outputs a very readable form
+which takes into account the length of hash keys (so the hash value lines
+up). Style 3 is like style 2, but also annotates the elements of arrays
+with their index (but the comment is on its own line, so array output
+consumes twice the number of lines). Style 2 is the default.
+
+=item $Data::Dumper::Purity I<or> I<$OBJ>->Purity(I<[NEWVAL]>)
+
+Controls the degree to which the output can be C<eval>ed to recreate the
+supplied reference structures. Setting it to 1 will output additional perl
+statements that will correctly recreate nested references. The default is
+0.
+
+=item $Data::Dumper::Pad I<or> I<$OBJ>->Pad(I<[NEWVAL]>)
+
+Specifies the string that will be prefixed to every line of the output.
+Empty string by default.
+
+=item $Data::Dumper::Varname I<or> I<$OBJ>->Varname(I<[NEWVAL]>)
+
+Contains the prefix to use for tagging variable names in the output. The
+default is "VAR".
+
+=item $Data::Dumper::Useqq I<or> I<$OBJ>->Useqq(I<[NEWVAL]>)
+
+When set, enables the use of double quotes for representing string values.
+Whitespace other than space will be represented as C<[\n\t\r]>, "unsafe"
+characters will be backslashed, and unprintable characters will be output as
+quoted octal integers. Since setting this variable imposes a performance
+penalty, the default is 0. The C<Dumpxs()> method does not honor this
+flag yet.
+
+=item $Data::Dumper::Terse I<or> I<$OBJ>->Terse(I<[NEWVAL]>)
+
+When set, Data::Dumper will emit single, non-self-referential values as
+atoms/terms rather than statements. This means that the C<$VAR>I<n> names
+will be avoided where possible, but be advised that such output may not
+always be parseable by C<eval>.
+
+=item $Data::Dumper::Freezer I<or> $I<OBJ>->Freezer(I<[NEWVAL]>)
+
+Can be set to a method name, or to an empty string to disable the feature.
+Data::Dumper will invoke that method via the object before attempting to
+stringify it. This method can alter the contents of the object (if, for
+instance, it contains data allocated from C), and even rebless it in a
+different package. The client is responsible for making sure the specified
+method can be called via the object, and that the object ends up containing
+only perl data types after the method has been called. Defaults to an empty
+string.
+
+=item $Data::Dumper::Toaster I<or> $I<OBJ>->Toaster(I<[NEWVAL]>)
+
+Can be set to a method name, or to an empty string to disable the feature.
+Data::Dumper will emit a method call for any objects that are to be dumped
+using the syntax C<bless(DATA, CLASS)->METHOD()>. Note that this means that
+the method specified will have to perform any modifications required on the
+object (like creating new state within it, and/or reblessing it in a
+different package) and then return it. The client is responsible for making
+sure the method can be called via the object, and that it returns a valid
+object. Defaults to an empty string.
+
+=item $Data::Dumper::Deepcopy I<or> $I<OBJ>->Deepcopy(I<[NEWVAL]>)
+
+Can be set to a boolean value to enable deep copies of structures.
+Cross-referencing will then only be done when absolutely essential
+(i.e., to break reference cycles). Default is 0.
+
+=item $Data::Dumper::Quotekeys I<or> $I<OBJ>->Quotekeys(I<[NEWVAL]>)
+
+Can be set to a boolean value to control whether hash keys are quoted.
+A false value will avoid quoting hash keys when it looks like a simple
+string. Default is 1, which will always enclose hash keys in quotes.
+
+=item $Data::Dumper::Bless I<or> $I<OBJ>->Bless(I<[NEWVAL]>)
+
+Can be set to a string that specifies an alternative to the C<bless>
+builtin operator used to create objects. A function with the specified
+name should exist, and should accept the same arguments as the builtin.
+Default is C<bless>.
+
+=back
+
+=head2 Exports
+
+=over 4
+
+=item Dumper
+
+=back
+
+=head1 EXAMPLES
+
+Run these code snippets to get a quick feel for the behavior of this
+module. When you are through with these examples, you may want to
+add or change the various configuration variables described above,
+to see their behavior. (See the testsuite in the Data::Dumper
+distribution for more examples.)
+
+
+ use Data::Dumper;
+
+ package Foo;
+ sub new {bless {'a' => 1, 'b' => sub { return "foo" }}, $_[0]};
+
+ package Fuz; # a weird REF-REF-SCALAR object
+ sub new {bless \($_ = \ 'fu\'z'), $_[0]};
+
+ package main;
+ $foo = Foo->new;
+ $fuz = Fuz->new;
+ $boo = [ 1, [], "abcd", \*foo,
+ {1 => 'a', 023 => 'b', 0x45 => 'c'},
+ \\"p\q\'r", $foo, $fuz];
+
+ ########
+ # simple usage
+ ########
+
+ $bar = eval(Dumper($boo));
+ print($@) if $@;
+ print Dumper($boo), Dumper($bar); # pretty print (no array indices)
+
+ $Data::Dumper::Terse = 1; # don't output names where feasible
+ $Data::Dumper::Indent = 0; # turn off all pretty print
+ print Dumper($boo), "\n";
+
+ $Data::Dumper::Indent = 1; # mild pretty print
+ print Dumper($boo);
+
+ $Data::Dumper::Indent = 3; # pretty print with array indices
+ print Dumper($boo);
+
+ $Data::Dumper::Useqq = 1; # print strings in double quotes
+ print Dumper($boo);
+
+
+ ########
+ # recursive structures
+ ########
+
+ @c = ('c');
+ $c = \@c;
+ $b = {};
+ $a = [1, $b, $c];
+ $b->{a} = $a;
+ $b->{b} = $a->[1];
+ $b->{c} = $a->[2];
+ print Data::Dumper->Dump([$a,$b,$c], [qw(a b c)]);
+
+
+ $Data::Dumper::Purity = 1; # fill in the holes for eval
+ print Data::Dumper->Dump([$a, $b], [qw(*a b)]); # print as @a
+ print Data::Dumper->Dump([$b, $a], [qw(*b a)]); # print as %b
+
+
+ $Data::Dumper::Deepcopy = 1; # avoid cross-refs
+ print Data::Dumper->Dump([$b, $a], [qw(*b a)]);
+
+
+ $Data::Dumper::Purity = 0; # avoid cross-refs
+ print Data::Dumper->Dump([$b, $a], [qw(*b a)]);
+
+
+ ########
+ # object-oriented usage
+ ########
+
+ $d = Data::Dumper->new([$a,$b], [qw(a b)]);
+ $d->Seen({'*c' => $c}); # stash a ref without printing it
+ $d->Indent(3);
+ print $d->Dump;
+ $d->Reset->Purity(0); # empty the seen cache
+ print join "----\n", $d->Dump;
+
+
+ ########
+ # persistence
+ ########
+
+ package Foo;
+ sub new { bless { state => 'awake' }, shift }
+ sub Freeze {
+ my $s = shift;
+ print STDERR "preparing to sleep\n";
+ $s->{state} = 'asleep';
+ return bless $s, 'Foo::ZZZ';
+ }
+
+ package Foo::ZZZ;
+ sub Thaw {
+ my $s = shift;
+ print STDERR "waking up\n";
+ $s->{state} = 'awake';
+ return bless $s, 'Foo';
+ }
+
+ package Foo;
+ use Data::Dumper;
+ $a = Foo->new;
+ $b = Data::Dumper->new([$a], ['c']);
+ $b->Freezer('Freeze');
+ $b->Toaster('Thaw');
+ $c = $b->Dump;
+ print $c;
+ $d = eval $c;
+ print Data::Dumper->Dump([$d], ['d']);
+
+
+ ########
+ # symbol substitution (useful for recreating CODE refs)
+ ########
+
+ sub foo { print "foo speaking\n" }
+ *other = \&foo;
+ $bar = [ \&other ];
+ $d = Data::Dumper->new([\&other,$bar],['*other','bar']);
+ $d->Seen({ '*foo' => \&foo });
+ print $d->Dump;
+
+
+=head1 BUGS
+
+Due to limitations of Perl subroutine call semantics, you cannot pass an
+array or hash. Prepend it with a C<\> to pass its reference instead. This
+will be remedied in time, with the arrival of prototypes in later versions
+of Perl. For now, you need to use the extended usage form, and prepend the
+name with a C<*> to output it as a hash or array.
+
+C<Data::Dumper> cheats with CODE references. If a code reference is
+encountered in the structure being processed, an anonymous subroutine that
+contains the string '"DUMMY"' will be inserted in its place, and a warning
+will be printed if C<Purity> is set. You can C<eval> the result, but bear
+in mind that the anonymous sub that gets created is just a placeholder.
+Someday, perl will have a switch to cache-on-demand the string
+representation of a compiled piece of code, I hope. If you have prior
+knowledge of all the code refs that your data structures are likely
+to have, you can use the C<Seen> method to pre-seed the internal reference
+table and make the dumped output point to them, instead. See L<EXAMPLES>
+above.
+
+The C<Useqq> flag is not honored by C<Dumpxs()> (it always outputs
+strings in single quotes).
+
+SCALAR objects have the weirdest looking C<bless> workaround.
+
+
+=head1 AUTHOR
+
+Gurusamy Sarathy gsar@umich.edu
+
+Copyright (c) 1996-98 Gurusamy Sarathy. All rights reserved.
+This program is free software; you can redistribute it and/or
+modify it under the same terms as Perl itself.
+
+
+=head1 VERSION
+
+Version 2.10 (31 Oct 1998)
+
+=head1 SEE ALSO
+
+perl(1)
+
+=cut
diff --git a/gnu/usr.bin/perl/ext/Data/Dumper/Dumper.xs b/gnu/usr.bin/perl/ext/Data/Dumper/Dumper.xs
new file mode 100644
index 00000000000..a3da110453d
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/Data/Dumper/Dumper.xs
@@ -0,0 +1,861 @@
+#include "EXTERN.h"
+#include "perl.h"
+#include "XSUB.h"
+
+#include "patchlevel.h"
+
+#if PATCHLEVEL < 5
+# ifndef PL_sv_undef
+# define PL_sv_undef sv_undef
+# endif
+# ifndef ERRSV
+# define ERRSV GvSV(errgv)
+# endif
+# ifndef newSVpvn
+# define newSVpvn newSVpv
+# endif
+#endif
+
+static I32 num_q _((char *s, STRLEN slen));
+static I32 esc_q _((char *dest, char *src, STRLEN slen));
+static SV *sv_x _((SV *sv, char *str, STRLEN len, I32 n));
+static I32 DD_dump _((SV *val, char *name, STRLEN namelen, SV *retval,
+ HV *seenhv, AV *postav, I32 *levelp, I32 indent,
+ SV *pad, SV *xpad, SV *apad, SV *sep,
+ SV *freezer, SV *toaster,
+ I32 purity, I32 deepcopy, I32 quotekeys, SV *bless));
+
+/* does a string need to be protected? */
+static I32
+needs_quote(register char *s)
+{
+TOP:
+ if (s[0] == ':') {
+ if (*++s) {
+ if (*s++ != ':')
+ return 1;
+ }
+ else
+ return 1;
+ }
+ if (isIDFIRST(*s)) {
+ while (*++s)
+ if (!isALNUM(*s))
+ if (*s == ':')
+ goto TOP;
+ else
+ return 1;
+ }
+ else
+ return 1;
+ return 0;
+}
+
+/* count the number of "'"s and "\"s in string */
+static I32
+num_q(register char *s, register STRLEN slen)
+{
+ register I32 ret = 0;
+
+ while (slen > 0) {
+ if (*s == '\'' || *s == '\\')
+ ++ret;
+ ++s;
+ --slen;
+ }
+ return ret;
+}
+
+
+/* returns number of chars added to escape "'"s and "\"s in s */
+/* slen number of characters in s will be escaped */
+/* destination must be long enough for additional chars */
+static I32
+esc_q(register char *d, register char *s, register STRLEN slen)
+{
+ register I32 ret = 0;
+
+ while (slen > 0) {
+ switch (*s) {
+ case '\'':
+ case '\\':
+ *d = '\\';
+ ++d; ++ret;
+ default:
+ *d = *s;
+ ++d; ++s; --slen;
+ break;
+ }
+ }
+ return ret;
+}
+
+/* append a repeated string to an SV */
+static SV *
+sv_x(SV *sv, register char *str, STRLEN len, I32 n)
+{
+ if (sv == Nullsv)
+ sv = newSVpvn("", 0);
+ else
+ assert(SvTYPE(sv) >= SVt_PV);
+
+ if (n > 0) {
+ SvGROW(sv, len*n + SvCUR(sv) + 1);
+ if (len == 1) {
+ char *start = SvPVX(sv) + SvCUR(sv);
+ SvCUR(sv) += n;
+ start[n] = '\0';
+ while (n > 0)
+ start[--n] = str[0];
+ }
+ else
+ while (n > 0) {
+ sv_catpvn(sv, str, len);
+ --n;
+ }
+ }
+ return sv;
+}
+
+/*
+ * This ought to be split into smaller functions. (it is one long function since
+ * it exactly parallels the perl version, which was one long thing for
+ * efficiency raisins.) Ugggh!
+ */
+static I32
+DD_dump(SV *val, char *name, STRLEN namelen, SV *retval, HV *seenhv,
+ AV *postav, I32 *levelp, I32 indent, SV *pad, SV *xpad,
+ SV *apad, SV *sep, SV *freezer, SV *toaster, I32 purity,
+ I32 deepcopy, I32 quotekeys, SV *bless)
+{
+ char tmpbuf[128];
+ U32 i;
+ char *c, *r, *realpack, id[128];
+ SV **svp;
+ SV *sv, *ipad, *ival;
+ SV *blesspad = Nullsv;
+ AV *seenentry = Nullav;
+ char *iname;
+ STRLEN inamelen, idlen = 0;
+ U32 flags;
+ U32 realtype;
+
+ if (!val)
+ return 0;
+
+ flags = SvFLAGS(val);
+ realtype = SvTYPE(val);
+
+ if (SvGMAGICAL(val))
+ mg_get(val);
+ if (SvROK(val)) {
+
+ if (SvOBJECT(SvRV(val)) && freezer &&
+ SvPOK(freezer) && SvCUR(freezer))
+ {
+ dSP; ENTER; SAVETMPS; PUSHMARK(sp);
+ XPUSHs(val); PUTBACK;
+ i = perl_call_method(SvPVX(freezer), G_EVAL|G_SCALAR);
+ SPAGAIN;
+ if (SvTRUE(ERRSV))
+ warn("WARNING(Freezer method call failed): %s",
+ SvPVX(ERRSV));
+ else if (i)
+ val = newSVsv(POPs);
+ PUTBACK; FREETMPS; LEAVE;
+ if (i)
+ (void)sv_2mortal(val);
+ }
+
+ ival = SvRV(val);
+ flags = SvFLAGS(ival);
+ realtype = SvTYPE(ival);
+ (void) sprintf(id, "0x%lx", (unsigned long)ival);
+ idlen = strlen(id);
+ if (SvOBJECT(ival))
+ realpack = HvNAME(SvSTASH(ival));
+ else
+ realpack = Nullch;
+
+ /* if it has a name, we need to either look it up, or keep a tab
+ * on it so we know when we hit it later
+ */
+ if (namelen) {
+ if ((svp = hv_fetch(seenhv, id, idlen, FALSE))
+ && (sv = *svp) && SvROK(sv) && (seenentry = (AV*)SvRV(sv)))
+ {
+ SV *othername;
+ if ((svp = av_fetch(seenentry, 0, FALSE))
+ && (othername = *svp))
+ {
+ if (purity && *levelp > 0) {
+ SV *postentry;
+
+ if (realtype == SVt_PVHV)
+ sv_catpvn(retval, "{}", 2);
+ else if (realtype == SVt_PVAV)
+ sv_catpvn(retval, "[]", 2);
+ else
+ sv_catpvn(retval, "''", 2);
+ postentry = newSVpvn(name, namelen);
+ sv_catpvn(postentry, " = ", 3);
+ sv_catsv(postentry, othername);
+ av_push(postav, postentry);
+ }
+ else {
+ if (name[0] == '@' || name[0] == '%') {
+ if ((SvPVX(othername))[0] == '\\' &&
+ (SvPVX(othername))[1] == name[0]) {
+ sv_catpvn(retval, SvPVX(othername)+1,
+ SvCUR(othername)-1);
+ }
+ else {
+ sv_catpvn(retval, name, 1);
+ sv_catpvn(retval, "{", 1);
+ sv_catsv(retval, othername);
+ sv_catpvn(retval, "}", 1);
+ }
+ }
+ else
+ sv_catsv(retval, othername);
+ }
+ return 1;
+ }
+ else {
+ warn("ref name not found for %s", id);
+ return 0;
+ }
+ }
+ else { /* store our name and continue */
+ SV *namesv;
+ if (name[0] == '@' || name[0] == '%') {
+ namesv = newSVpvn("\\", 1);
+ sv_catpvn(namesv, name, namelen);
+ }
+ else if (realtype == SVt_PVCV && name[0] == '*') {
+ namesv = newSVpvn("\\", 2);
+ sv_catpvn(namesv, name, namelen);
+ (SvPVX(namesv))[1] = '&';
+ }
+ else
+ namesv = newSVpvn(name, namelen);
+ seenentry = newAV();
+ av_push(seenentry, namesv);
+ (void)SvREFCNT_inc(val);
+ av_push(seenentry, val);
+ (void)hv_store(seenhv, id, strlen(id),
+ newRV((SV*)seenentry), 0);
+ SvREFCNT_dec(seenentry);
+ }
+ }
+
+ (*levelp)++;
+ ipad = sv_x(Nullsv, SvPVX(xpad), SvCUR(xpad), *levelp);
+
+ if (realpack) { /* we have a blessed ref */
+ STRLEN blesslen;
+ char *blessstr = SvPV(bless, blesslen);
+ sv_catpvn(retval, blessstr, blesslen);
+ sv_catpvn(retval, "( ", 2);
+ if (indent >= 2) {
+ blesspad = apad;
+ apad = newSVsv(apad);
+ sv_x(apad, " ", 1, blesslen+2);
+ }
+ }
+
+ if (realtype <= SVt_PVBM) { /* scalar ref */
+ SV *namesv = newSVpvn("${", 2);
+ sv_catpvn(namesv, name, namelen);
+ sv_catpvn(namesv, "}", 1);
+ if (realpack) { /* blessed */
+ sv_catpvn(retval, "do{\\(my $o = ", 13);
+ DD_dump(ival, SvPVX(namesv), SvCUR(namesv), retval, seenhv,
+ postav, levelp, indent, pad, xpad, apad, sep,
+ freezer, toaster, purity, deepcopy, quotekeys, bless);
+ sv_catpvn(retval, ")}", 2);
+ } /* plain */
+ else {
+ sv_catpvn(retval, "\\", 1);
+ DD_dump(ival, SvPVX(namesv), SvCUR(namesv), retval, seenhv,
+ postav, levelp, indent, pad, xpad, apad, sep,
+ freezer, toaster, purity, deepcopy, quotekeys, bless);
+ }
+ SvREFCNT_dec(namesv);
+ }
+ else if (realtype == SVt_PVGV) { /* glob ref */
+ SV *namesv = newSVpvn("*{", 2);
+ sv_catpvn(namesv, name, namelen);
+ sv_catpvn(namesv, "}", 1);
+ sv_catpvn(retval, "\\", 1);
+ DD_dump(ival, SvPVX(namesv), SvCUR(namesv), retval, seenhv,
+ postav, levelp, indent, pad, xpad, apad, sep,
+ freezer, toaster, purity, deepcopy, quotekeys, bless);
+ SvREFCNT_dec(namesv);
+ }
+ else if (realtype == SVt_PVAV) {
+ SV *totpad;
+ I32 ix = 0;
+ I32 ixmax = av_len((AV *)ival);
+
+ SV *ixsv = newSViv(0);
+ /* allowing for a 24 char wide array index */
+ New(0, iname, namelen+28, char);
+ (void)strcpy(iname, name);
+ inamelen = namelen;
+ if (name[0] == '@') {
+ sv_catpvn(retval, "(", 1);
+ iname[0] = '$';
+ }
+ else {
+ sv_catpvn(retval, "[", 1);
+ /* omit "->" in $foo{bar}->[0], but not in ${$foo}->[0] */
+ /*if (namelen > 0
+ && name[namelen-1] != ']' && name[namelen-1] != '}'
+ && (namelen < 4 || (name[1] != '{' && name[2] != '{')))*/
+ if ((namelen > 0
+ && name[namelen-1] != ']' && name[namelen-1] != '}')
+ || (namelen > 4
+ && (name[1] == '{'
+ || (name[0] == '\\' && name[2] == '{'))))
+ {
+ iname[inamelen++] = '-'; iname[inamelen++] = '>';
+ iname[inamelen] = '\0';
+ }
+ }
+ if (iname[0] == '*' && iname[inamelen-1] == '}' && inamelen >= 8 &&
+ (instr(iname+inamelen-8, "{SCALAR}") ||
+ instr(iname+inamelen-7, "{ARRAY}") ||
+ instr(iname+inamelen-6, "{HASH}"))) {
+ iname[inamelen++] = '-'; iname[inamelen++] = '>';
+ }
+ iname[inamelen++] = '['; iname[inamelen] = '\0';
+ totpad = newSVsv(sep);
+ sv_catsv(totpad, pad);
+ sv_catsv(totpad, apad);
+
+ for (ix = 0; ix <= ixmax; ++ix) {
+ STRLEN ilen;
+ SV *elem;
+ svp = av_fetch((AV*)ival, ix, FALSE);
+ if (svp)
+ elem = *svp;
+ else
+ elem = &PL_sv_undef;
+
+ ilen = inamelen;
+ sv_setiv(ixsv, ix);
+ (void) sprintf(iname+ilen, "%ld", ix);
+ ilen = strlen(iname);
+ iname[ilen++] = ']'; iname[ilen] = '\0';
+ if (indent >= 3) {
+ sv_catsv(retval, totpad);
+ sv_catsv(retval, ipad);
+ sv_catpvn(retval, "#", 1);
+ sv_catsv(retval, ixsv);
+ }
+ sv_catsv(retval, totpad);
+ sv_catsv(retval, ipad);
+ DD_dump(elem, iname, ilen, retval, seenhv, postav,
+ levelp, indent, pad, xpad, apad, sep,
+ freezer, toaster, purity, deepcopy, quotekeys, bless);
+ if (ix < ixmax)
+ sv_catpvn(retval, ",", 1);
+ }
+ if (ixmax >= 0) {
+ SV *opad = sv_x(Nullsv, SvPVX(xpad), SvCUR(xpad), (*levelp)-1);
+ sv_catsv(retval, totpad);
+ sv_catsv(retval, opad);
+ SvREFCNT_dec(opad);
+ }
+ if (name[0] == '@')
+ sv_catpvn(retval, ")", 1);
+ else
+ sv_catpvn(retval, "]", 1);
+ SvREFCNT_dec(ixsv);
+ SvREFCNT_dec(totpad);
+ Safefree(iname);
+ }
+ else if (realtype == SVt_PVHV) {
+ SV *totpad, *newapad;
+ SV *iname, *sname;
+ HE *entry;
+ char *key;
+ I32 klen;
+ SV *hval;
+
+ iname = newSVpvn(name, namelen);
+ if (name[0] == '%') {
+ sv_catpvn(retval, "(", 1);
+ (SvPVX(iname))[0] = '$';
+ }
+ else {
+ sv_catpvn(retval, "{", 1);
+ /* omit "->" in $foo[0]->{bar}, but not in ${$foo}->{bar} */
+ if ((namelen > 0
+ && name[namelen-1] != ']' && name[namelen-1] != '}')
+ || (namelen > 4
+ && (name[1] == '{'
+ || (name[0] == '\\' && name[2] == '{'))))
+ {
+ sv_catpvn(iname, "->", 2);
+ }
+ }
+ if (name[0] == '*' && name[namelen-1] == '}' && namelen >= 8 &&
+ (instr(name+namelen-8, "{SCALAR}") ||
+ instr(name+namelen-7, "{ARRAY}") ||
+ instr(name+namelen-6, "{HASH}"))) {
+ sv_catpvn(iname, "->", 2);
+ }
+ sv_catpvn(iname, "{", 1);
+ totpad = newSVsv(sep);
+ sv_catsv(totpad, pad);
+ sv_catsv(totpad, apad);
+
+ (void)hv_iterinit((HV*)ival);
+ i = 0;
+ while ((entry = hv_iternext((HV*)ival))) {
+ char *nkey;
+ I32 nticks = 0;
+
+ if (i)
+ sv_catpvn(retval, ",", 1);
+ i++;
+ key = hv_iterkey(entry, &klen);
+ hval = hv_iterval((HV*)ival, entry);
+
+ if (quotekeys || needs_quote(key)) {
+ nticks = num_q(key, klen);
+ New(0, nkey, klen+nticks+3, char);
+ nkey[0] = '\'';
+ if (nticks)
+ klen += esc_q(nkey+1, key, klen);
+ else
+ (void)Copy(key, nkey+1, klen, char);
+ nkey[++klen] = '\'';
+ nkey[++klen] = '\0';
+ }
+ else {
+ New(0, nkey, klen, char);
+ (void)Copy(key, nkey, klen, char);
+ }
+
+ sname = newSVsv(iname);
+ sv_catpvn(sname, nkey, klen);
+ sv_catpvn(sname, "}", 1);
+
+ sv_catsv(retval, totpad);
+ sv_catsv(retval, ipad);
+ sv_catpvn(retval, nkey, klen);
+ sv_catpvn(retval, " => ", 4);
+ if (indent >= 2) {
+ char *extra;
+ I32 elen = 0;
+ newapad = newSVsv(apad);
+ New(0, extra, klen+4+1, char);
+ while (elen < (klen+4))
+ extra[elen++] = ' ';
+ extra[elen] = '\0';
+ sv_catpvn(newapad, extra, elen);
+ Safefree(extra);
+ }
+ else
+ newapad = apad;
+
+ DD_dump(hval, SvPVX(sname), SvCUR(sname), retval, seenhv,
+ postav, levelp, indent, pad, xpad, newapad, sep,
+ freezer, toaster, purity, deepcopy, quotekeys, bless);
+ SvREFCNT_dec(sname);
+ Safefree(nkey);
+ if (indent >= 2)
+ SvREFCNT_dec(newapad);
+ }
+ if (i) {
+ SV *opad = sv_x(Nullsv, SvPVX(xpad), SvCUR(xpad), *levelp-1);
+ sv_catsv(retval, totpad);
+ sv_catsv(retval, opad);
+ SvREFCNT_dec(opad);
+ }
+ if (name[0] == '%')
+ sv_catpvn(retval, ")", 1);
+ else
+ sv_catpvn(retval, "}", 1);
+ SvREFCNT_dec(iname);
+ SvREFCNT_dec(totpad);
+ }
+ else if (realtype == SVt_PVCV) {
+ sv_catpvn(retval, "sub { \"DUMMY\" }", 15);
+ if (purity)
+ warn("Encountered CODE ref, using dummy placeholder");
+ }
+ else {
+ warn("cannot handle ref type %ld", realtype);
+ }
+
+ if (realpack) { /* free blessed allocs */
+ if (indent >= 2) {
+ SvREFCNT_dec(apad);
+ apad = blesspad;
+ }
+ sv_catpvn(retval, ", '", 3);
+ sv_catpvn(retval, realpack, strlen(realpack));
+ sv_catpvn(retval, "' )", 3);
+ if (toaster && SvPOK(toaster) && SvCUR(toaster)) {
+ sv_catpvn(retval, "->", 2);
+ sv_catsv(retval, toaster);
+ sv_catpvn(retval, "()", 2);
+ }
+ }
+ SvREFCNT_dec(ipad);
+ (*levelp)--;
+ }
+ else {
+ STRLEN i;
+
+ if (namelen) {
+ (void) sprintf(id, "0x%lx", (unsigned long)val);
+ if ((svp = hv_fetch(seenhv, id, (idlen = strlen(id)), FALSE)) &&
+ (sv = *svp) && SvROK(sv) &&
+ (seenentry = (AV*)SvRV(sv)))
+ {
+ SV *othername;
+ if ((svp = av_fetch(seenentry, 0, FALSE)) && (othername = *svp)
+ && (svp = av_fetch(seenentry, 2, FALSE)) && *svp && SvIV(*svp) > 0)
+ {
+ sv_catpvn(retval, "${", 2);
+ sv_catsv(retval, othername);
+ sv_catpvn(retval, "}", 1);
+ return 1;
+ }
+ }
+ else {
+ SV *namesv;
+ namesv = newSVpvn("\\", 1);
+ sv_catpvn(namesv, name, namelen);
+ seenentry = newAV();
+ av_push(seenentry, namesv);
+ av_push(seenentry, newRV(val));
+ (void)hv_store(seenhv, id, strlen(id), newRV((SV*)seenentry), 0);
+ SvREFCNT_dec(seenentry);
+ }
+ }
+
+ if (SvIOK(val)) {
+ STRLEN len;
+ i = SvIV(val);
+ (void) sprintf(tmpbuf, "%d", i);
+ len = strlen(tmpbuf);
+ sv_catpvn(retval, tmpbuf, len);
+ }
+ else if (realtype == SVt_PVGV) {/* GLOBs can end up with scribbly names */
+ c = SvPV(val, i);
+ ++c; --i; /* just get the name */
+ if (i >= 6 && strncmp(c, "main::", 6) == 0) {
+ c += 4;
+ i -= 4;
+ }
+ if (needs_quote(c)) {
+ sv_grow(retval, SvCUR(retval)+6+2*i);
+ r = SvPVX(retval)+SvCUR(retval);
+ r[0] = '*'; r[1] = '{'; r[2] = '\'';
+ i += esc_q(r+3, c, i);
+ i += 3;
+ r[i++] = '\''; r[i++] = '}';
+ r[i] = '\0';
+ }
+ else {
+ sv_grow(retval, SvCUR(retval)+i+2);
+ r = SvPVX(retval)+SvCUR(retval);
+ r[0] = '*'; strcpy(r+1, c);
+ i++;
+ }
+ SvCUR_set(retval, SvCUR(retval)+i);
+
+ if (purity) {
+ static char *entries[] = { "{SCALAR}", "{ARRAY}", "{HASH}" };
+ static STRLEN sizes[] = { 8, 7, 6 };
+ SV *e;
+ SV *nname = newSVpvn("", 0);
+ SV *newapad = newSVpvn("", 0);
+ GV *gv = (GV*)val;
+ I32 j;
+
+ for (j=0; j<3; j++) {
+ e = ((j == 0) ? GvSV(gv) : (j == 1) ? (SV*)GvAV(gv) : (SV*)GvHV(gv));
+ if (!e)
+ continue;
+ if (j == 0 && !SvOK(e))
+ continue;
+
+ {
+ I32 nlevel = 0;
+ SV *postentry = newSVpvn(r,i);
+
+ sv_setsv(nname, postentry);
+ sv_catpvn(nname, entries[j], sizes[j]);
+ sv_catpvn(postentry, " = ", 3);
+ av_push(postav, postentry);
+ e = newRV(e);
+
+ SvCUR(newapad) = 0;
+ if (indent >= 2)
+ (void)sv_x(newapad, " ", 1, SvCUR(postentry));
+
+ DD_dump(e, SvPVX(nname), SvCUR(nname), postentry,
+ seenhv, postav, &nlevel, indent, pad, xpad,
+ newapad, sep, freezer, toaster, purity,
+ deepcopy, quotekeys, bless);
+ SvREFCNT_dec(e);
+ }
+ }
+
+ SvREFCNT_dec(newapad);
+ SvREFCNT_dec(nname);
+ }
+ }
+ else if (val == &PL_sv_undef || !SvOK(val)) {
+ sv_catpvn(retval, "undef", 5);
+ }
+ else {
+ c = SvPV(val, i);
+ sv_grow(retval, SvCUR(retval)+3+2*i);
+ r = SvPVX(retval)+SvCUR(retval);
+ r[0] = '\'';
+ i += esc_q(r+1, c, i);
+ ++i;
+ r[i++] = '\'';
+ r[i] = '\0';
+ SvCUR_set(retval, SvCUR(retval)+i);
+ }
+ }
+
+ if (idlen) {
+ if (deepcopy)
+ (void)hv_delete(seenhv, id, idlen, G_DISCARD);
+ else if (namelen && seenentry) {
+ SV *mark = *av_fetch(seenentry, 2, TRUE);
+ sv_setiv(mark,1);
+ }
+ }
+ return 1;
+}
+
+
+MODULE = Data::Dumper PACKAGE = Data::Dumper PREFIX = Data_Dumper_
+
+#
+# This is the exact equivalent of Dump. Well, almost. The things that are
+# different as of now (due to Laziness):
+# * doesnt do double-quotes yet.
+#
+
+void
+Data_Dumper_Dumpxs(href, ...)
+ SV *href;
+ PROTOTYPE: $;$$
+ PPCODE:
+ {
+ HV *hv;
+ SV *retval, *valstr;
+ HV *seenhv = Nullhv;
+ AV *postav, *todumpav, *namesav;
+ I32 level = 0;
+ I32 indent, terse, useqq, i, imax, postlen;
+ SV **svp;
+ SV *val, *name, *pad, *xpad, *apad, *sep, *tmp, *varname;
+ SV *freezer, *toaster, *bless;
+ I32 purity, deepcopy, quotekeys;
+ char tmpbuf[1024];
+ I32 gimme = GIMME;
+
+ if (!SvROK(href)) { /* call new to get an object first */
+ SV *valarray;
+ SV *namearray;
+
+ if (items == 3) {
+ valarray = ST(1);
+ namearray = ST(2);
+ }
+ else
+ croak("Usage: Data::Dumper::Dumpxs(PACKAGE, VAL_ARY_REF, NAME_ARY_REF)");
+
+ ENTER;
+ SAVETMPS;
+
+ PUSHMARK(sp);
+ XPUSHs(href);
+ XPUSHs(sv_2mortal(newSVsv(valarray)));
+ XPUSHs(sv_2mortal(newSVsv(namearray)));
+ PUTBACK;
+ i = perl_call_method("new", G_SCALAR);
+ SPAGAIN;
+ if (i)
+ href = newSVsv(POPs);
+
+ PUTBACK;
+ FREETMPS;
+ LEAVE;
+ if (i)
+ (void)sv_2mortal(href);
+ }
+
+ todumpav = namesav = Nullav;
+ seenhv = Nullhv;
+ val = pad = xpad = apad = sep = tmp = varname
+ = freezer = toaster = bless = &PL_sv_undef;
+ name = sv_newmortal();
+ indent = 2;
+ terse = useqq = purity = deepcopy = 0;
+ quotekeys = 1;
+
+ retval = newSVpvn("", 0);
+ if (SvROK(href)
+ && (hv = (HV*)SvRV((SV*)href))
+ && SvTYPE(hv) == SVt_PVHV) {
+
+ if ((svp = hv_fetch(hv, "seen", 4, FALSE)) && SvROK(*svp))
+ seenhv = (HV*)SvRV(*svp);
+ if ((svp = hv_fetch(hv, "todump", 6, FALSE)) && SvROK(*svp))
+ todumpav = (AV*)SvRV(*svp);
+ if ((svp = hv_fetch(hv, "names", 5, FALSE)) && SvROK(*svp))
+ namesav = (AV*)SvRV(*svp);
+ if ((svp = hv_fetch(hv, "indent", 6, FALSE)))
+ indent = SvIV(*svp);
+ if ((svp = hv_fetch(hv, "purity", 6, FALSE)))
+ purity = SvIV(*svp);
+ if ((svp = hv_fetch(hv, "terse", 5, FALSE)))
+ terse = SvTRUE(*svp);
+ if ((svp = hv_fetch(hv, "useqq", 5, FALSE)))
+ useqq = SvTRUE(*svp);
+ if ((svp = hv_fetch(hv, "pad", 3, FALSE)))
+ pad = *svp;
+ if ((svp = hv_fetch(hv, "xpad", 4, FALSE)))
+ xpad = *svp;
+ if ((svp = hv_fetch(hv, "apad", 4, FALSE)))
+ apad = *svp;
+ if ((svp = hv_fetch(hv, "sep", 3, FALSE)))
+ sep = *svp;
+ if ((svp = hv_fetch(hv, "varname", 7, FALSE)))
+ varname = *svp;
+ if ((svp = hv_fetch(hv, "freezer", 7, FALSE)))
+ freezer = *svp;
+ if ((svp = hv_fetch(hv, "toaster", 7, FALSE)))
+ toaster = *svp;
+ if ((svp = hv_fetch(hv, "deepcopy", 8, FALSE)))
+ deepcopy = SvTRUE(*svp);
+ if ((svp = hv_fetch(hv, "quotekeys", 9, FALSE)))
+ quotekeys = SvTRUE(*svp);
+ if ((svp = hv_fetch(hv, "bless", 5, FALSE)))
+ bless = *svp;
+ postav = newAV();
+
+ if (todumpav)
+ imax = av_len(todumpav);
+ else
+ imax = -1;
+ valstr = newSVpvn("",0);
+ for (i = 0; i <= imax; ++i) {
+ SV *newapad;
+
+ av_clear(postav);
+ if ((svp = av_fetch(todumpav, i, FALSE)))
+ val = *svp;
+ else
+ val = &PL_sv_undef;
+ if ((svp = av_fetch(namesav, i, TRUE)))
+ sv_setsv(name, *svp);
+ else
+ SvOK_off(name);
+
+ if (SvOK(name)) {
+ if ((SvPVX(name))[0] == '*') {
+ if (SvROK(val)) {
+ switch (SvTYPE(SvRV(val))) {
+ case SVt_PVAV:
+ (SvPVX(name))[0] = '@';
+ break;
+ case SVt_PVHV:
+ (SvPVX(name))[0] = '%';
+ break;
+ case SVt_PVCV:
+ (SvPVX(name))[0] = '*';
+ break;
+ default:
+ (SvPVX(name))[0] = '$';
+ break;
+ }
+ }
+ else
+ (SvPVX(name))[0] = '$';
+ }
+ else if ((SvPVX(name))[0] != '$')
+ sv_insert(name, 0, 0, "$", 1);
+ }
+ else {
+ STRLEN nchars = 0;
+ sv_setpvn(name, "$", 1);
+ sv_catsv(name, varname);
+ (void) sprintf(tmpbuf, "%ld", i+1);
+ nchars = strlen(tmpbuf);
+ sv_catpvn(name, tmpbuf, nchars);
+ }
+
+ if (indent >= 2) {
+ SV *tmpsv = sv_x(Nullsv, " ", 1, SvCUR(name)+3);
+ newapad = newSVsv(apad);
+ sv_catsv(newapad, tmpsv);
+ SvREFCNT_dec(tmpsv);
+ }
+ else
+ newapad = apad;
+
+ DD_dump(val, SvPVX(name), SvCUR(name), valstr, seenhv,
+ postav, &level, indent, pad, xpad, newapad, sep,
+ freezer, toaster, purity, deepcopy, quotekeys,
+ bless);
+
+ if (indent >= 2)
+ SvREFCNT_dec(newapad);
+
+ postlen = av_len(postav);
+ if (postlen >= 0 || !terse) {
+ sv_insert(valstr, 0, 0, " = ", 3);
+ sv_insert(valstr, 0, 0, SvPVX(name), SvCUR(name));
+ sv_catpvn(valstr, ";", 1);
+ }
+ sv_catsv(retval, pad);
+ sv_catsv(retval, valstr);
+ sv_catsv(retval, sep);
+ if (postlen >= 0) {
+ I32 i;
+ sv_catsv(retval, pad);
+ for (i = 0; i <= postlen; ++i) {
+ SV *elem;
+ svp = av_fetch(postav, i, FALSE);
+ if (svp && (elem = *svp)) {
+ sv_catsv(retval, elem);
+ if (i < postlen) {
+ sv_catpvn(retval, ";", 1);
+ sv_catsv(retval, sep);
+ sv_catsv(retval, pad);
+ }
+ }
+ }
+ sv_catpvn(retval, ";", 1);
+ sv_catsv(retval, sep);
+ }
+ sv_setpvn(valstr, "", 0);
+ if (gimme == G_ARRAY) {
+ XPUSHs(sv_2mortal(retval));
+ if (i < imax) /* not the last time thro ? */
+ retval = newSVpvn("",0);
+ }
+ }
+ SvREFCNT_dec(postav);
+ SvREFCNT_dec(valstr);
+ }
+ else
+ croak("Call to new() method failed to return HASH ref");
+ if (gimme == G_SCALAR)
+ XPUSHs(sv_2mortal(retval));
+ }
diff --git a/gnu/usr.bin/perl/ext/Data/Dumper/Makefile.PL b/gnu/usr.bin/perl/ext/Data/Dumper/Makefile.PL
new file mode 100644
index 00000000000..12930c5c398
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/Data/Dumper/Makefile.PL
@@ -0,0 +1,11 @@
+use ExtUtils::MakeMaker;
+WriteMakefile(
+ NAME => "Data::Dumper",
+ VERSION_FROM => 'Dumper.pm',
+ 'dist' => {
+ COMPRESS => 'gzip -9f',
+ SUFFIX => 'gz',
+ DIST_DEFAULT => 'all tardist',
+ },
+ MAN3PODS => {},
+);
diff --git a/gnu/usr.bin/perl/ext/Data/Dumper/Todo b/gnu/usr.bin/perl/ext/Data/Dumper/Todo
new file mode 100644
index 00000000000..7dcd40b8e3e
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/Data/Dumper/Todo
@@ -0,0 +1,34 @@
+=head1 NAME
+
+TODO - seeds germane, yet not germinated
+
+=head1 DESCRIPTION
+
+The following functionality will be supported in the next few releases.
+
+=over 4
+
+=item $Data::Dumper::Maxdepth I<or> $I<OBJ>->Maxdepth(I<NEWVAL>)
+
+Depth beyond which we don't venture into a structure. Has no effect when
+C<Data::Dumper::Purity> is set. (useful in debugger when we often don't
+want to see more than enough).
+
+=item $Data::Dumper::Expdepth I<or> $I<OBJ>->Expdepth(I<NEWVAL>)
+
+Dump contents explicitly up to a certain depth and then use names for
+cross-referencing identical references. (useful in debugger, in situations
+where we don't care so much for cross-references).
+
+=item Make C<Dumpxs()> honor C<$Useqq>
+
+=item Fix formatting when Terse is set and Indent >= 2
+
+=item Output space after '\' (ref constructor) for high enough Indent
+
+=item Implement redesign that allows various backends (Perl, Lisp,
+some-binary-data-format, graph-description-languages, etc.)
+
+=item Dump traversal in breadth-first order
+
+=back
diff --git a/gnu/usr.bin/perl/ext/DynaLoader/DynaLoader_pm.PL b/gnu/usr.bin/perl/ext/DynaLoader/DynaLoader_pm.PL
new file mode 100644
index 00000000000..cf7d7085bc8
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/DynaLoader/DynaLoader_pm.PL
@@ -0,0 +1,730 @@
+
+use Config;
+
+sub to_string {
+ my ($value) = @_;
+ $value =~ s/\\/\\\\'/g;
+ $value =~ s/'/\\'/g;
+ return "'$value'";
+}
+
+unlink "DynaLoader.pm" if -f "DynaLoader.pm";
+open OUT, ">DynaLoader.pm" or die $!;
+print OUT <<'EOT';
+
+# Generated from DynaLoader.pm.PL (resolved %Config::Config values)
+
+package DynaLoader;
+
+# And Gandalf said: 'Many folk like to know beforehand what is to
+# be set on the table; but those who have laboured to prepare the
+# feast like to keep their secret; for wonder makes the words of
+# praise louder.'
+
+# (Quote from Tolkien sugested by Anno Siegel.)
+#
+# See pod text at end of file for documentation.
+# See also ext/DynaLoader/README in source tree for other information.
+#
+# Tim.Bunce@ig.co.uk, August 1994
+
+$VERSION = $VERSION = "1.03"; # avoid typo warning
+
+require AutoLoader;
+*AUTOLOAD = \&AutoLoader::AUTOLOAD;
+
+# The following require can't be removed during maintenance
+# releases, sadly, because of the risk of buggy code that does
+# require Carp; Carp::croak "..."; without brackets dying
+# if Carp hasn't been loaded in earlier compile time. :-(
+# We'll let those bugs get found on the development track.
+require Carp if $] < 5.00450;
+
+
+# enable debug/trace messages from DynaLoader perl code
+$dl_debug = $ENV{PERL_DL_DEBUG} || 0 unless defined $dl_debug;
+
+#
+# Flags to alter dl_load_file behaviour. Assigned bits:
+# 0x01 make symbols available for linking later dl_load_file's.
+# (only known to work on Solaris 2 using dlopen(RTLD_GLOBAL))
+# (ignored under VMS; effect is built-in to image linking)
+#
+# This is called as a class method $module->dl_load_flags. The
+# definition here will be inherited and result on "default" loading
+# behaviour unless a sub-class of DynaLoader defines its own version.
+#
+
+sub dl_load_flags { 0x00 }
+
+# ($dl_dlext, $dlsrc)
+# = @Config::Config{'dlext', 'dlsrc'};
+EOT
+
+print OUT " (\$dl_dlext, \$dlsrc) = (",
+ to_string($Config::Config{'dlext'}), ",",
+ to_string($Config::Config{'dlsrc'}), ")\n;" ;
+
+print OUT <<'EOT';
+
+# Some systems need special handling to expand file specifications
+# (VMS support by Charles Bailey <bailey@HMIVAX.HUMGEN.UPENN.EDU>)
+# See dl_expandspec() for more details. Should be harmless but
+# inefficient to define on systems that don't need it.
+$do_expand = $Is_VMS = $^O eq 'VMS';
+
+@dl_require_symbols = (); # names of symbols we need
+@dl_resolve_using = (); # names of files to link with
+@dl_library_path = (); # path to look for files
+@dl_librefs = (); # things we have loaded
+@dl_modules = (); # Modules we have loaded
+
+# This is a fix to support DLD's unfortunate desire to relink -lc
+@dl_resolve_using = dl_findfile('-lc') if $dlsrc eq "dl_dld.xs";
+
+# Initialise @dl_library_path with the 'standard' library path
+# for this platform as determined by Configure
+
+# push(@dl_library_path, split(' ', $Config::Config{'libpth'});
+EOT
+
+print OUT "push(\@dl_library_path, split(' ', ",
+ to_string($Config::Config{'libpth'}), "));\n";
+
+print OUT <<'EOT';
+
+# Add to @dl_library_path any extra directories we can gather from
+# environment variables. So far LD_LIBRARY_PATH is the only known
+# variable used for this purpose. Others may be added later.
+push(@dl_library_path, split(/:/, $ENV{LD_LIBRARY_PATH}))
+ if $ENV{LD_LIBRARY_PATH};
+
+
+# No prizes for guessing why we don't say 'bootstrap DynaLoader;' here.
+boot_DynaLoader('DynaLoader') if defined(&boot_DynaLoader) &&
+ !defined(&dl_load_file);
+
+
+if ($dl_debug) {
+ print STDERR "DynaLoader.pm loaded (@INC, @dl_library_path)\n";
+ print STDERR "DynaLoader not linked into this perl\n"
+ unless defined(&boot_DynaLoader);
+}
+
+1; # End of main code
+
+
+sub croak { require Carp; Carp::croak(@_) }
+
+# The bootstrap function cannot be autoloaded (without complications)
+# so we define it here:
+
+sub bootstrap {
+ # use local vars to enable $module.bs script to edit values
+ local(@args) = @_;
+ local($module) = $args[0];
+ local(@dirs, $file);
+
+ unless ($module) {
+ require Carp;
+ Carp::confess("Usage: DynaLoader::bootstrap(module)");
+ }
+
+ # A common error on platforms which don't support dynamic loading.
+ # Since it's fatal and potentially confusing we give a detailed message.
+ croak("Can't load module $module, dynamic loading not available in this perl.\n".
+ " (You may need to build a new perl executable which either supports\n".
+ " dynamic loading or has the $module module statically linked into it.)\n")
+ unless defined(&dl_load_file);
+
+ my @modparts = split(/::/,$module);
+ my $modfname = $modparts[-1];
+
+ # Some systems have restrictions on files names for DLL's etc.
+ # mod2fname returns appropriate file base name (typically truncated)
+ # It may also edit @modparts if required.
+ $modfname = &mod2fname(\@modparts) if defined &mod2fname;
+
+ my $modpname = join('/',@modparts);
+
+ print STDERR "DynaLoader::bootstrap for $module ",
+ "(auto/$modpname/$modfname.$dl_dlext)\n" if $dl_debug;
+
+ foreach (@INC) {
+ chop($_ = VMS::Filespec::unixpath($_)) if $Is_VMS;
+ my $dir = "$_/auto/$modpname";
+ next unless -d $dir; # skip over uninteresting directories
+
+ # check for common cases to avoid autoload of dl_findfile
+ my $try = "$dir/$modfname.$dl_dlext";
+ last if $file = ($do_expand) ? dl_expandspec($try) : (-f $try && $try);
+
+ # no luck here, save dir for possible later dl_findfile search
+ push @dirs, $dir;
+ }
+ # last resort, let dl_findfile have a go in all known locations
+ $file = dl_findfile(map("-L$_",@dirs,@INC), $modfname) unless $file;
+
+ croak("Can't locate loadable object for module $module in \@INC (\@INC contains: @INC)")
+ unless $file; # wording similar to error from 'require'
+
+ my $bootname = "boot_$module";
+ $bootname =~ s/\W/_/g;
+ @dl_require_symbols = ($bootname);
+
+ # Execute optional '.bootstrap' perl script for this module.
+ # The .bs file can be used to configure @dl_resolve_using etc to
+ # match the needs of the individual module on this architecture.
+ my $bs = $file;
+ $bs =~ s/(\.\w+)?$/\.bs/; # look for .bs 'beside' the library
+ if (-s $bs) { # only read file if it's not empty
+ print STDERR "BS: $bs ($^O, $dlsrc)\n" if $dl_debug;
+ eval { do $bs; };
+ warn "$bs: $@\n" if $@;
+ }
+
+ # Many dynamic extension loading problems will appear to come from
+ # this section of code: XYZ failed at line 123 of DynaLoader.pm.
+ # Often these errors are actually occurring in the initialisation
+ # C code of the extension XS file. Perl reports the error as being
+ # in this perl code simply because this was the last perl code
+ # it executed.
+
+ my $libref = dl_load_file($file, $module->dl_load_flags) or
+ croak("Can't load '$file' for module $module: ".dl_error()."\n");
+
+ push(@dl_librefs,$libref); # record loaded object
+
+ my @unresolved = dl_undef_symbols();
+ if (@unresolved) {
+ require Carp;
+ Carp::carp("Undefined symbols present after loading $file: @unresolved\n");
+ }
+
+ my $boot_symbol_ref = dl_find_symbol($libref, $bootname) or
+ croak("Can't find '$bootname' symbol in $file\n");
+
+ my $xs = dl_install_xsub("${module}::bootstrap", $boot_symbol_ref, $file);
+
+ push(@dl_modules, $module); # record loaded module
+
+ # See comment block above
+ &$xs(@args);
+}
+
+
+#sub _check_file { # private utility to handle dl_expandspec vs -f tests
+# my($file) = @_;
+# return $file if (!$do_expand && -f $file); # the common case
+# return $file if ( $do_expand && ($file=dl_expandspec($file)));
+# return undef;
+#}
+
+
+# Let autosplit and the autoloader deal with these functions:
+__END__
+
+
+sub dl_findfile {
+ # Read ext/DynaLoader/DynaLoader.doc for detailed information.
+ # This function does not automatically consider the architecture
+ # or the perl library auto directories.
+ my (@args) = @_;
+ my (@dirs, $dir); # which directories to search
+ my (@found); # full paths to real files we have found
+EOT
+
+print OUT ' my $dl_ext= ' . to_string($Config::Config{'dlext'}) .
+ "; # \$Config::Config{'dlext'} suffix for perl extensions\n";
+print OUT ' my $dl_so = ' . to_string($Config::Config{'so'}) .
+ "; # \$Config::Config{'so'} suffix for shared libraries\n";
+
+print OUT <<'EOT';
+
+ print STDERR "dl_findfile(@args)\n" if $dl_debug;
+
+ # accumulate directories but process files as they appear
+ arg: foreach(@args) {
+ # Special fast case: full filepath requires no search
+ if ($Is_VMS && m%[:>/\]]% && -f $_) {
+ push(@found,dl_expandspec(VMS::Filespec::vmsify($_)));
+ last arg unless wantarray;
+ next;
+ }
+ elsif (m:/: && -f $_ && !$do_expand) {
+ push(@found,$_);
+ last arg unless wantarray;
+ next;
+ }
+
+ # Deal with directories first:
+ # Using a -L prefix is the preferred option (faster and more robust)
+ if (m:^-L:) { s/^-L//; push(@dirs, $_); next; }
+
+ # Otherwise we try to try to spot directories by a heuristic
+ # (this is a more complicated issue than it first appears)
+ if (m:/: && -d $_) { push(@dirs, $_); next; }
+
+ # VMS: we may be using native VMS directry syntax instead of
+ # Unix emulation, so check this as well
+ if ($Is_VMS && /[:>\]]/ && -d $_) { push(@dirs, $_); next; }
+
+ # Only files should get this far...
+ my(@names, $name); # what filenames to look for
+ if (m:-l: ) { # convert -lname to appropriate library name
+ s/-l//;
+ push(@names,"lib$_.$dl_so");
+ push(@names,"lib$_.a");
+ } else { # Umm, a bare name. Try various alternatives:
+ # these should be ordered with the most likely first
+ push(@names,"$_.$dl_ext") unless m/\.$dl_ext$/o;
+ push(@names,"$_.$dl_so") unless m/\.$dl_so$/o;
+ push(@names,"lib$_.$dl_so") unless m:/:;
+ push(@names,"$_.a") if !m/\.a$/ and $dlsrc eq "dl_dld.xs";
+ push(@names, $_);
+ }
+ foreach $dir (@dirs, @dl_library_path) {
+ next unless -d $dir;
+ chop($dir = VMS::Filespec::unixpath($dir)) if $Is_VMS;
+ foreach $name (@names) {
+ my($file) = "$dir/$name";
+ print STDERR " checking in $dir for $name\n" if $dl_debug;
+ $file = ($do_expand) ? dl_expandspec($file) : (-f $file && $file);
+ #$file = _check_file($file);
+ if ($file) {
+ push(@found, $file);
+ next arg; # no need to look any further
+ }
+ }
+ }
+ }
+ if ($dl_debug) {
+ foreach(@dirs) {
+ print STDERR " dl_findfile ignored non-existent directory: $_\n" unless -d $_;
+ }
+ print STDERR "dl_findfile found: @found\n";
+ }
+ return $found[0] unless wantarray;
+ @found;
+}
+
+
+sub dl_expandspec {
+ my($spec) = @_;
+ # Optional function invoked if DynaLoader.pm sets $do_expand.
+ # Most systems do not require or use this function.
+ # Some systems may implement it in the dl_*.xs file in which case
+ # this autoload version will not be called but is harmless.
+
+ # This function is designed to deal with systems which treat some
+ # 'filenames' in a special way. For example VMS 'Logical Names'
+ # (something like unix environment variables - but different).
+ # This function should recognise such names and expand them into
+ # full file paths.
+ # Must return undef if $spec is invalid or file does not exist.
+
+ my $file = $spec; # default output to input
+
+ if ($Is_VMS) { # dl_expandspec should be defined in dl_vms.xs
+ require Carp;
+ Carp::croak("dl_expandspec: should be defined in XS file!\n");
+ } else {
+ return undef unless -f $file;
+ }
+ print STDERR "dl_expandspec($spec) => $file\n" if $dl_debug;
+ $file;
+}
+
+sub dl_find_symbol_anywhere
+{
+ my $sym = shift;
+ my $libref;
+ foreach $libref (@dl_librefs) {
+ my $symref = dl_find_symbol($libref,$sym);
+ return $symref if $symref;
+ }
+ return undef;
+}
+
+=head1 NAME
+
+DynaLoader - Dynamically load C libraries into Perl code
+
+dl_error(), dl_findfile(), dl_expandspec(), dl_load_file(), dl_find_symbol(), dl_find_symbol_anywhere(), dl_undef_symbols(), dl_install_xsub(), dl_load_flags(), bootstrap() - routines used by DynaLoader modules
+
+=head1 SYNOPSIS
+
+ package YourPackage;
+ require DynaLoader;
+ @ISA = qw(... DynaLoader ...);
+ bootstrap YourPackage;
+
+ # optional method for 'global' loading
+ sub dl_load_flags { 0x01 }
+
+
+=head1 DESCRIPTION
+
+This document defines a standard generic interface to the dynamic
+linking mechanisms available on many platforms. Its primary purpose is
+to implement automatic dynamic loading of Perl modules.
+
+This document serves as both a specification for anyone wishing to
+implement the DynaLoader for a new platform and as a guide for
+anyone wishing to use the DynaLoader directly in an application.
+
+The DynaLoader is designed to be a very simple high-level
+interface that is sufficiently general to cover the requirements
+of SunOS, HP-UX, NeXT, Linux, VMS and other platforms.
+
+It is also hoped that the interface will cover the needs of OS/2, NT
+etc and also allow pseudo-dynamic linking (using C<ld -A> at runtime).
+
+It must be stressed that the DynaLoader, by itself, is practically
+useless for accessing non-Perl libraries because it provides almost no
+Perl-to-C 'glue'. There is, for example, no mechanism for calling a C
+library function or supplying arguments. A C::DynaLib module
+is available from CPAN sites which performs that function for some
+common system types.
+
+DynaLoader Interface Summary
+
+ @dl_library_path
+ @dl_resolve_using
+ @dl_require_symbols
+ $dl_debug
+ @dl_librefs
+ @dl_modules
+ Implemented in:
+ bootstrap($modulename) Perl
+ @filepaths = dl_findfile(@names) Perl
+ $flags = $modulename->dl_load_flags Perl
+ $symref = dl_find_symbol_anywhere($symbol) Perl
+
+ $libref = dl_load_file($filename, $flags) C
+ $symref = dl_find_symbol($libref, $symbol) C
+ @symbols = dl_undef_symbols() C
+ dl_install_xsub($name, $symref [, $filename]) C
+ $message = dl_error C
+
+=over 4
+
+=item @dl_library_path
+
+The standard/default list of directories in which dl_findfile() will
+search for libraries etc. Directories are searched in order:
+$dl_library_path[0], [1], ... etc
+
+@dl_library_path is initialised to hold the list of 'normal' directories
+(F</usr/lib>, etc) determined by B<Configure> (C<$Config{'libpth'}>). This should
+ensure portability across a wide range of platforms.
+
+@dl_library_path should also be initialised with any other directories
+that can be determined from the environment at runtime (such as
+LD_LIBRARY_PATH for SunOS).
+
+After initialisation @dl_library_path can be manipulated by an
+application using push and unshift before calling dl_findfile().
+Unshift can be used to add directories to the front of the search order
+either to save search time or to override libraries with the same name
+in the 'normal' directories.
+
+The load function that dl_load_file() calls may require an absolute
+pathname. The dl_findfile() function and @dl_library_path can be
+used to search for and return the absolute pathname for the
+library/object that you wish to load.
+
+=item @dl_resolve_using
+
+A list of additional libraries or other shared objects which can be
+used to resolve any undefined symbols that might be generated by a
+later call to load_file().
+
+This is only required on some platforms which do not handle dependent
+libraries automatically. For example the Socket Perl extension
+library (F<auto/Socket/Socket.so>) contains references to many socket
+functions which need to be resolved when it's loaded. Most platforms
+will automatically know where to find the 'dependent' library (e.g.,
+F</usr/lib/libsocket.so>). A few platforms need to be told the
+location of the dependent library explicitly. Use @dl_resolve_using
+for this.
+
+Example usage:
+
+ @dl_resolve_using = dl_findfile('-lsocket');
+
+=item @dl_require_symbols
+
+A list of one or more symbol names that are in the library/object file
+to be dynamically loaded. This is only required on some platforms.
+
+=item @dl_librefs
+
+An array of the handles returned by successful calls to dl_load_file(),
+made by bootstrap, in the order in which they were loaded.
+Can be used with dl_find_symbol() to look for a symbol in any of
+the loaded files.
+
+=item @dl_modules
+
+An array of module (package) names that have been bootstrap'ed.
+
+=item dl_error()
+
+Syntax:
+
+ $message = dl_error();
+
+Error message text from the last failed DynaLoader function. Note
+that, similar to errno in unix, a successful function call does not
+reset this message.
+
+Implementations should detect the error as soon as it occurs in any of
+the other functions and save the corresponding message for later
+retrieval. This will avoid problems on some platforms (such as SunOS)
+where the error message is very temporary (e.g., dlerror()).
+
+=item $dl_debug
+
+Internal debugging messages are enabled when $dl_debug is set true.
+Currently setting $dl_debug only affects the Perl side of the
+DynaLoader. These messages should help an application developer to
+resolve any DynaLoader usage problems.
+
+$dl_debug is set to C<$ENV{'PERL_DL_DEBUG'}> if defined.
+
+For the DynaLoader developer/porter there is a similar debugging
+variable added to the C code (see dlutils.c) and enabled if Perl was
+built with the B<-DDEBUGGING> flag. This can also be set via the
+PERL_DL_DEBUG environment variable. Set to 1 for minimal information or
+higher for more.
+
+=item dl_findfile()
+
+Syntax:
+
+ @filepaths = dl_findfile(@names)
+
+Determine the full paths (including file suffix) of one or more
+loadable files given their generic names and optionally one or more
+directories. Searches directories in @dl_library_path by default and
+returns an empty list if no files were found.
+
+Names can be specified in a variety of platform independent forms. Any
+names in the form B<-lname> are converted into F<libname.*>, where F<.*> is
+an appropriate suffix for the platform.
+
+If a name does not already have a suitable prefix and/or suffix then
+the corresponding file will be searched for by trying combinations of
+prefix and suffix appropriate to the platform: "$name.o", "lib$name.*"
+and "$name".
+
+If any directories are included in @names they are searched before
+@dl_library_path. Directories may be specified as B<-Ldir>. Any other
+names are treated as filenames to be searched for.
+
+Using arguments of the form C<-Ldir> and C<-lname> is recommended.
+
+Example:
+
+ @dl_resolve_using = dl_findfile(qw(-L/usr/5lib -lposix));
+
+
+=item dl_expandspec()
+
+Syntax:
+
+ $filepath = dl_expandspec($spec)
+
+Some unusual systems, such as VMS, require special filename handling in
+order to deal with symbolic names for files (i.e., VMS's Logical Names).
+
+To support these systems a dl_expandspec() function can be implemented
+either in the F<dl_*.xs> file or code can be added to the autoloadable
+dl_expandspec() function in F<DynaLoader.pm>. See F<DynaLoader.pm> for
+more information.
+
+=item dl_load_file()
+
+Syntax:
+
+ $libref = dl_load_file($filename, $flags)
+
+Dynamically load $filename, which must be the path to a shared object
+or library. An opaque 'library reference' is returned as a handle for
+the loaded object. Returns undef on error.
+
+The $flags argument to alters dl_load_file behaviour.
+Assigned bits:
+
+ 0x01 make symbols available for linking later dl_load_file's.
+ (only known to work on Solaris 2 using dlopen(RTLD_GLOBAL))
+ (ignored under VMS; this is a normal part of image linking)
+
+(On systems that provide a handle for the loaded object such as SunOS
+and HPUX, $libref will be that handle. On other systems $libref will
+typically be $filename or a pointer to a buffer containing $filename.
+The application should not examine or alter $libref in any way.)
+
+This is the function that does the real work. It should use the
+current values of @dl_require_symbols and @dl_resolve_using if required.
+
+ SunOS: dlopen($filename)
+ HP-UX: shl_load($filename)
+ Linux: dld_create_reference(@dl_require_symbols); dld_link($filename)
+ NeXT: rld_load($filename, @dl_resolve_using)
+ VMS: lib$find_image_symbol($filename,$dl_require_symbols[0])
+
+(The dlopen() function is also used by Solaris and some versions of
+Linux, and is a common choice when providing a "wrapper" on other
+mechanisms as is done in the OS/2 port.)
+
+=item dl_loadflags()
+
+Syntax:
+
+ $flags = dl_loadflags $modulename;
+
+Designed to be a method call, and to be overridden by a derived class
+(i.e. a class which has DynaLoader in its @ISA). The definition in
+DynaLoader itself returns 0, which produces standard behavior from
+dl_load_file().
+
+=item dl_find_symbol()
+
+Syntax:
+
+ $symref = dl_find_symbol($libref, $symbol)
+
+Return the address of the symbol $symbol or C<undef> if not found. If the
+target system has separate functions to search for symbols of different
+types then dl_find_symbol() should search for function symbols first and
+then other types.
+
+The exact manner in which the address is returned in $symref is not
+currently defined. The only initial requirement is that $symref can
+be passed to, and understood by, dl_install_xsub().
+
+ SunOS: dlsym($libref, $symbol)
+ HP-UX: shl_findsym($libref, $symbol)
+ Linux: dld_get_func($symbol) and/or dld_get_symbol($symbol)
+ NeXT: rld_lookup("_$symbol")
+ VMS: lib$find_image_symbol($libref,$symbol)
+
+
+=item dl_find_symbol_anywhere()
+
+Syntax:
+
+ $symref = dl_find_symbol_anywhere($symbol)
+
+Applies dl_find_symbol() to the members of @dl_librefs and returns
+the first match found.
+
+=item dl_undef_symbols()
+
+Example
+
+ @symbols = dl_undef_symbols()
+
+Return a list of symbol names which remain undefined after load_file().
+Returns C<()> if not known. Don't worry if your platform does not provide
+a mechanism for this. Most do not need it and hence do not provide it,
+they just return an empty list.
+
+
+=item dl_install_xsub()
+
+Syntax:
+
+ dl_install_xsub($perl_name, $symref [, $filename])
+
+Create a new Perl external subroutine named $perl_name using $symref as
+a pointer to the function which implements the routine. This is simply
+a direct call to newXSUB(). Returns a reference to the installed
+function.
+
+The $filename parameter is used by Perl to identify the source file for
+the function if required by die(), caller() or the debugger. If
+$filename is not defined then "DynaLoader" will be used.
+
+
+=item bootstrap()
+
+Syntax:
+
+bootstrap($module)
+
+This is the normal entry point for automatic dynamic loading in Perl.
+
+It performs the following actions:
+
+=over 8
+
+=item *
+
+locates an auto/$module directory by searching @INC
+
+=item *
+
+uses dl_findfile() to determine the filename to load
+
+=item *
+
+sets @dl_require_symbols to C<("boot_$module")>
+
+=item *
+
+executes an F<auto/$module/$module.bs> file if it exists
+(typically used to add to @dl_resolve_using any files which
+are required to load the module on the current platform)
+
+=item *
+
+calls dl_load_flags() to determine how to load the file.
+
+=item *
+
+calls dl_load_file() to load the file
+
+=item *
+
+calls dl_undef_symbols() and warns if any symbols are undefined
+
+=item *
+
+calls dl_find_symbol() for "boot_$module"
+
+=item *
+
+calls dl_install_xsub() to install it as "${module}::bootstrap"
+
+=item *
+
+calls &{"${module}::bootstrap"} to bootstrap the module (actually
+it uses the function reference returned by dl_install_xsub for speed)
+
+=back
+
+=back
+
+
+=head1 AUTHOR
+
+Tim Bunce, 11 August 1994.
+
+This interface is based on the work and comments of (in no particular
+order): Larry Wall, Robert Sanders, Dean Roehrich, Jeff Okamoto, Anno
+Siegel, Thomas Neumann, Paul Marquess, Charles Bailey, myself and others.
+
+Larry Wall designed the elegant inherited bootstrap mechanism and
+implemented the first Perl 5 dynamic loader using it.
+
+Solaris global loading added by Nick Ing-Simmons with design/coding
+assistance from Tim Bunce, January 1996.
+
+=cut
+EOT
+
+close OUT or die $!;
+
diff --git a/gnu/usr.bin/perl/ext/DynaLoader/dl_beos.xs b/gnu/usr.bin/perl/ext/DynaLoader/dl_beos.xs
new file mode 100644
index 00000000000..42a27cb1f17
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/DynaLoader/dl_beos.xs
@@ -0,0 +1,115 @@
+/*
+ * dl_beos.xs, by Tom Spindler
+ * based on dl_dlopen.xs, by Paul Marquess
+ * $Id:$
+ */
+
+#include "EXTERN.h"
+#include "perl.h"
+#include "XSUB.h"
+
+#include <be/kernel/image.h>
+#include <OS.h>
+#include <stdlib.h>
+#include <limits.h>
+
+#define dlerror() strerror(errno)
+
+#include "dlutils.c" /* SaveError() etc */
+
+static void
+dl_private_init()
+{
+ (void)dl_generic_private_init();
+}
+
+MODULE = DynaLoader PACKAGE = DynaLoader
+
+BOOT:
+ (void)dl_private_init();
+
+
+void *
+dl_load_file(filename, flags=0)
+ char * filename
+ int flags
+ CODE:
+{ image_id bogo;
+ char *path;
+ path = malloc(PATH_MAX);
+ if (*filename != '/') {
+ getcwd(path, PATH_MAX);
+ strcat(path, "/");
+ strcat(path, filename);
+ } else {
+ strcpy(path, filename);
+ }
+
+ DLDEBUG(1,PerlIO_printf(PerlIO_stderr(), "dl_load_file(%s,%x):\n", path, flags));
+ bogo = load_add_on(path);
+ DLDEBUG(2,PerlIO_printf(PerlIO_stderr(), " libref=%lx\n", (unsigned long) RETVAL));
+ ST(0) = sv_newmortal() ;
+ if (bogo < 0) {
+ SaveError("%s", strerror(bogo));
+ PerlIO_printf(PerlIO_stderr(), "load_add_on(%s) : %d (%s)\n", path, bogo, strerror(bogo));
+ } else {
+ RETVAL = (void *) bogo;
+ sv_setiv( ST(0), (IV)RETVAL);
+ }
+ free(path);
+}
+
+void *
+dl_find_symbol(libhandle, symbolname)
+ void * libhandle
+ char * symbolname
+ CODE:
+ status_t retcode;
+ void *adr = 0;
+#ifdef DLSYM_NEEDS_UNDERSCORE
+ symbolname = form("_%s", symbolname);
+#endif
+ RETVAL = NULL;
+ DLDEBUG(2, PerlIO_printf(PerlIO_stderr(),
+ "dl_find_symbol(handle=%lx, symbol=%s)\n",
+ (unsigned long) libhandle, symbolname));
+ retcode = get_image_symbol((image_id) libhandle, symbolname,
+ B_SYMBOL_TYPE_TEXT, (void **) &adr);
+ RETVAL = adr;
+ DLDEBUG(2, PerlIO_printf(PerlIO_stderr(),
+ " symbolref = %lx\n", (unsigned long) RETVAL));
+ ST(0) = sv_newmortal() ;
+ if (RETVAL == NULL) {
+ SaveError("%s", strerror(retcode)) ;
+ PerlIO_printf(PerlIO_stderr(), "retcode = %p (%s)\n", retcode, strerror(retcode));
+ } else
+ sv_setiv( ST(0), (IV)RETVAL);
+
+
+void
+dl_undef_symbols()
+ PPCODE:
+
+
+
+# These functions should not need changing on any platform:
+
+void
+dl_install_xsub(perl_name, symref, filename="$Package")
+ char * perl_name
+ void * symref
+ char * filename
+ CODE:
+ DLDEBUG(2,PerlIO_printf(PerlIO_stderr(), "dl_install_xsub(name=%s, symref=%lx)\n",
+ perl_name, (unsigned long) symref));
+ ST(0)=sv_2mortal(newRV((SV*)newXS(perl_name, (void(*)_((CV *)))symref, filename)));
+
+
+char *
+dl_error()
+ CODE:
+ RETVAL = LastError ;
+ OUTPUT:
+ RETVAL
+
+# end.
diff --git a/gnu/usr.bin/perl/ext/DynaLoader/dl_mpeix.xs b/gnu/usr.bin/perl/ext/DynaLoader/dl_mpeix.xs
new file mode 100644
index 00000000000..4cc07ec4c3c
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/DynaLoader/dl_mpeix.xs
@@ -0,0 +1,129 @@
+/*
+ * Author: Mark Klein (mklein@dis.com)
+ * Version: 2.1, 1996/07/25
+ * Version: 2.2, 1997/09/25 Mark Bixby (markb@cccd.edu)
+ * Version: 2.3, 1998/11/19 Mark Bixby (markb@cccd.edu)
+ */
+
+#include "EXTERN.h"
+#include "perl.h"
+#include "XSUB.h"
+
+#ifdef __GNUC__
+extern void HPGETPROCPLABEL( int parms,
+ char * procname,
+ int * plabel,
+ int * status,
+ char * firstfile,
+ int casesensitive,
+ int symboltype,
+ int * datasize,
+ int position,
+ int searchpath,
+ int binding);
+#else
+#pragma intrinsic HPGETPROCPLABEL
+#endif
+#include "dlutils.c" /* for SaveError() etc */
+
+typedef struct {
+ char filename[PATH_MAX + 3];
+ } t_mpe_dld, *p_mpe_dld;
+
+static AV *dl_resolve_using = Nullav;
+
+static void
+dl_private_init()
+{
+ (void)dl_generic_private_init();
+ dl_resolve_using = perl_get_av("DynaLoader::dl_resolve_using", 0x4);
+}
+
+MODULE = DynaLoader PACKAGE = DynaLoader
+
+BOOT:
+ (void)dl_private_init();
+
+void *
+dl_load_file(filename, flags=0)
+ char * filename
+ int flags
+ PREINIT:
+ char buf[PATH_MAX + 3];
+ p_mpe_dld obj = NULL;
+ int i;
+ CODE:
+ DLDEBUG(1,PerlIO_printf(PerlIO_stderr(), "dl_load_file(%s,%x):\n", filename,
+flags));
+ if (flags & 0x01)
+ warn("Can't make loaded symbols global on this platform while loading %s
+",filename);
+ obj = (p_mpe_dld) safemalloc(sizeof(t_mpe_dld));
+ memzero(obj, sizeof(t_mpe_dld));
+ if (filename[0] != '/')
+ {
+ getcwd(buf,sizeof(buf));
+ sprintf(obj->filename," %s/%s ",buf,filename);
+ }
+ else
+ sprintf(obj->filename," %s ",filename);
+
+ DLDEBUG(2,PerlIO_printf(PerlIO_stderr()," libref=%x\n", obj));
+
+ ST(0) = sv_newmortal() ;
+ if (obj == NULL)
+ SaveError("%s",Strerror(errno));
+ else
+ sv_setiv( ST(0), (IV)obj);
+
+void *
+dl_find_symbol(libhandle, symbolname)
+ void * libhandle
+ char * symbolname
+ CODE:
+ int datalen;
+ p_mpe_dld obj = (p_mpe_dld) libhandle;
+ char symname[PATH_MAX + 3];
+ void * symaddr = NULL;
+ int status;
+ DLDEBUG(2,PerlIO_printf(PerlIO_stderr(),"dl_find_symbol(handle=%x, symbol=%s)\n",
+ libhandle, symbolname));
+ ST(0) = sv_newmortal() ;
+ errno = 0;
+
+ sprintf(symname, " %s ", symbolname);
+ HPGETPROCPLABEL(8, symname, &symaddr, &status, obj->filename, 1,
+ 0, &datalen, 1, 0, 0);
+
+ DLDEBUG(2,PerlIO_printf(PerlIO_stderr()," symbolref(PROCEDURE) = %x, status=%x\n", symaddr, status));
+
+ if (status != 0) {
+ SaveError("%s",(errno) ? Strerror(errno) : "Symbol not found") ;
+ } else {
+ sv_setiv( ST(0), (IV)symaddr);
+ }
+
+void
+dl_undef_symbols()
+ PPCODE:
+
+# These functions should not need changing on any platform:
+
+void
+dl_install_xsub(perl_name, symref, filename="$Package")
+ char * perl_name
+ void * symref
+ char * filename
+ CODE:
+ DLDEBUG(2,PerlIO_printf(PerlIO_stderr(),"dl_install_xsub(name=%s, symref=%x)\n",
+ perl_name, symref));
+ ST(0)=sv_2mortal(newRV((SV*)newXS(perl_name, (void(*)())symref, filename)));
+
+char *
+dl_error()
+ CODE:
+ RETVAL = LastError ;
+ OUTPUT:
+ RETVAL
+
+# end.
diff --git a/gnu/usr.bin/perl/ext/Errno/ChangeLog b/gnu/usr.bin/perl/ext/Errno/ChangeLog
new file mode 100644
index 00000000000..2bfa003d96a
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/Errno/ChangeLog
@@ -0,0 +1,50 @@
+Change 170 on 1998/07/05 by <gbarr@pobox.com> (Graham Barr)
+
+ Fixed three problems reported by Hans Mulder for NeXT
+
+ - Errno_pm.PL does not recognize #define lines because they have
+ whitespace before the '#'. ANSI does not allow that in portable
+ code; that didn't stop the author of NeXT's <errno.h>.
+
+ - Cpp output lines look like this: #1 "errno.c"
+ Errno_pm.PL does not recognize that format; it wants whitespace
+ before the line number.
+
+ - Cpp does a syntax check on files with names ending in ".c"; it
+ reports fatal errors on input lines like: "ENOSYS" [[ENOSYS]]
+ Workaround: use $Config{cppstdin}, like Errno 1.04 did.
+
+Change 160 on 1998/06/27 by <gbarr@pobox.com> (Graham Barr)
+
+ - Added patch from Sarathy to support Win32
+ - Changed use of $Config{cpp} to $Config{cpprun} as suggested by
+ Tom Horsley
+
+Change 159 on 1998/06/27 by <gbarr@pobox.com> (Graham Barr)
+
+ - Changed to use cpp to locate required files
+ - Moved dummy Errno.pm file into d/
+ - Added support for VMS
+
+Change 158 on 1998/06/27 by <gbarr@pobox.com> (Graham Barr)
+
+ Rename errno.pl to Errno_pm.PL
+
+Change 146 on 1998/05/31 by <gbarr@pobox.com> (Graham Barr)
+
+ Added ChangeLog to MANIFEST
+
+Change 140 on 1998/05/23 by <gbarr@pobox.com> (Graham Barr)
+
+ Fix type in errno.pl
+
+Change 139 on 1998/05/23 by <gbarr@pobox.com> (Graham Barr)
+
+ Moved code to generate Errno.pm into errno.pl
+
+Change 136 on 1998/05/19 by <gbarr@pobox.com> (Graham Barr)
+
+ Changed to use cpp to locate constants
+
+ Added t/errno.t
+
diff --git a/gnu/usr.bin/perl/ext/Errno/Errno_pm.PL b/gnu/usr.bin/perl/ext/Errno/Errno_pm.PL
new file mode 100644
index 00000000000..c1f26fc1c7e
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/Errno/Errno_pm.PL
@@ -0,0 +1,316 @@
+use ExtUtils::MakeMaker;
+use Config;
+use strict;
+
+use vars qw($VERSION);
+
+$VERSION = "1.111";
+
+my %err = ();
+
+unlink "Errno.pm" if -f "Errno.pm";
+open OUT, ">Errno.pm" or die "Cannot open Errno.pm: $!";
+select OUT;
+my $file;
+foreach $file (get_files()) {
+ process_file($file);
+}
+write_errno_pm();
+unlink "errno.c" if -f "errno.c";
+
+sub process_file {
+ my($file) = @_;
+
+ return unless defined $file and -f $file;
+
+ local *FH;
+ if (($^O eq 'VMS') && ($Config{vms_cc_type} ne 'gnuc')) {
+ unless(open(FH," LIBRARY/EXTRACT=ERRNO/OUTPUT=SYS\$OUTPUT $file |")) {
+ warn "Cannot open '$file'";
+ return;
+ }
+ } else {
+ unless(open(FH,"< $file")) {
+ # This file could be a temporary file created by cppstdin
+ # so only warn under -w, and return
+ warn "Cannot open '$file'" if $^W;
+ return;
+ }
+ }
+ while(<FH>) {
+ $err{$1} = 1
+ if /^\s*#\s*define\s+(E\w+)\s+/;
+ }
+ close(FH);
+}
+
+my $cppstdin;
+
+sub default_cpp {
+ unless (defined $cppstdin) {
+ use File::Spec;
+ $cppstdin = $Config{cppstdin};
+ my $upup_cppstdin = File::Spec->catfile(File::Spec->updir,
+ File::Spec->updir,
+ "cppstdin");
+ my $cppstdin_is_wrapper =
+ ($cppstdin eq 'cppstdin'
+ and -f $upup_cppstdin
+ and -x $upup_cppstdin);
+ $cppstdin = $upup_cppstdin if $cppstdin_is_wrapper;
+ }
+ return "$cppstdin $Config{cppflags} $Config{cppminus}";
+}
+
+sub get_files {
+ my %file = ();
+ # VMS keeps its include files in system libraries (well, except for Gcc)
+ if ($^O eq 'VMS') {
+ if ($Config{vms_cc_type} eq 'decc') {
+ $file{'Sys$Library:DECC$RTLDEF.TLB'} = 1;
+ } elsif ($Config{vms_cc_type} eq 'vaxc') {
+ $file{'Sys$Library:vaxcdef.tlb'} = 1;
+ } elsif ($Config{vms_cc_type} eq 'gcc') {
+ $file{'gnu_cc_include:[000000]errno.h'} = 1;
+ }
+ } elsif ($^O eq 'os390') {
+ # OS/390 C compiler doesn't generate #file or #line directives
+ $file{'/usr/include/errno.h'} = 1;
+ } elsif ($^O eq 'vmesa') {
+ # OS/390 C compiler doesn't generate #file or #line directives
+ $file{'../../vmesa/errno.h'} = 1;
+ } else {
+ open(CPPI,"> errno.c") or
+ die "Cannot open errno.c";
+
+ print CPPI "#include <errno.h>\n";
+
+ close(CPPI);
+
+ # invoke CPP and read the output
+ if ($^O eq 'MSWin32') {
+ open(CPPO,"$Config{cpprun} $Config{cppflags} errno.c |") or
+ die "Cannot run '$Config{cpprun} $Config{cppflags} errno.c'";
+ } else {
+ my $cpp = default_cpp();
+ open(CPPO,"$cpp < errno.c |") or
+ die "Cannot exec $cpp";
+ }
+
+ my $pat;
+ if ($^O eq 'MSWin32' and $Config{cc} =~ /^bcc/i) {
+ $pat = '^/\*\s+(.+)\s+\d+\s*:\s+\*/';
+ }
+ else {
+ $pat = '^#(?:line)?\s*\d+\s+"([^"]+)"';
+ }
+ while(<CPPO>) {
+ if ($^O eq 'os2' or $^O eq 'MSWin32') {
+ if (/$pat/o) {
+ my $f = $1;
+ $f =~ s,\\\\,/,g;
+ $file{$f} = 1;
+ }
+ }
+ else {
+ $file{$1} = 1 if /$pat/o;
+ }
+ }
+ close(CPPO);
+ }
+ return keys %file;
+}
+
+sub write_errno_pm {
+ my $err;
+
+ # quick sanity check
+
+ die "No error definitions found" unless keys %err;
+
+ # create the CPP input
+
+ open(CPPI,"> errno.c") or
+ die "Cannot open errno.c";
+
+ print CPPI "#include <errno.h>\n";
+
+ foreach $err (keys %err) {
+ print CPPI '"',$err,'" [[',$err,']]',"\n";
+ }
+
+ close(CPPI);
+
+ # invoke CPP and read the output
+
+ if ($^O eq 'VMS') {
+ my $cpp = "$Config{cppstdin} $Config{cppflags} $Config{cppminus}";
+ $cpp =~ s/sys\$input//i;
+ open(CPPO,"$cpp errno.c |") or
+ die "Cannot exec $Config{cppstdin}";
+ } elsif ($^O eq 'MSWin32') {
+ open(CPPO,"$Config{cpprun} $Config{cppflags} errno.c |") or
+ die "Cannot run '$Config{cpprun} $Config{cppflags} errno.c'";
+ } else {
+ my $cpp = default_cpp();
+ open(CPPO,"$cpp < errno.c |")
+ or die "Cannot exec $cpp";
+ }
+
+ %err = ();
+
+ while(<CPPO>) {
+ my($name,$expr);
+ next unless ($name, $expr) = /"(.*?)"\s*\[\s*\[\s*(.*?)\s*\]\s*\]/;
+ next if $name eq $expr;
+ $err{$name} = eval $expr;
+ }
+ close(CPPO);
+
+ # Write Errno.pm
+
+ print <<"EDQ";
+#
+# This file is auto-generated. ***ANY*** changes here will be lost
+#
+
+package Errno;
+use vars qw(\@EXPORT_OK \%EXPORT_TAGS \@ISA \$VERSION \%errno \$AUTOLOAD);
+use Exporter ();
+use Config;
+use strict;
+
+\$Config{'myarchname'} eq "$Config{'myarchname'}" or
+ die "Errno architecture ($Config{'myarchname'}) does not match executable architecture (\$Config{'myarchname'})";
+
+\$VERSION = "$VERSION";
+\@ISA = qw(Exporter);
+
+EDQ
+
+ my $len = 0;
+ my @err = sort { $err{$a} <=> $err{$b} } keys %err;
+ map { $len = length if length > $len } @err;
+
+ my $j = "\@EXPORT_OK = qw(" . join(" ",keys %err) . ");\n";
+ $j =~ s/(.{50,70})\s/$1\n\t/g;
+ print $j,"\n";
+
+print <<'ESQ';
+%EXPORT_TAGS = (
+ POSIX => [qw(
+ESQ
+
+ my $k = join(" ", grep { exists $err{$_} }
+ qw(E2BIG EACCES EADDRINUSE EADDRNOTAVAIL EAFNOSUPPORT
+ EAGAIN EALREADY EBADF EBUSY ECHILD ECONNABORTED
+ ECONNREFUSED ECONNRESET EDEADLK EDESTADDRREQ EDOM EDQUOT
+ EEXIST EFAULT EFBIG EHOSTDOWN EHOSTUNREACH EINPROGRESS
+ EINTR EINVAL EIO EISCONN EISDIR ELOOP EMFILE EMLINK
+ EMSGSIZE ENAMETOOLONG ENETDOWN ENETRESET ENETUNREACH
+ ENFILE ENOBUFS ENODEV ENOENT ENOEXEC ENOLCK ENOMEM
+ ENOPROTOOPT ENOSPC ENOSYS ENOTBLK ENOTCONN ENOTDIR
+ ENOTEMPTY ENOTSOCK ENOTTY ENXIO EOPNOTSUPP EPERM
+ EPFNOSUPPORT EPIPE EPROCLIM EPROTONOSUPPORT EPROTOTYPE
+ ERANGE EREMOTE ERESTART EROFS ESHUTDOWN ESOCKTNOSUPPORT
+ ESPIPE ESRCH ESTALE ETIMEDOUT ETOOMANYREFS ETXTBSY
+ EUSERS EWOULDBLOCK EXDEV));
+
+ $k =~ s/(.{50,70})\s/$1\n\t/g;
+ print "\t",$k,"\n )]\n);\n\n";
+
+ foreach $err (@err) {
+ printf "sub %s () { %d }\n",,$err,$err{$err};
+ }
+
+ print <<'ESQ';
+
+sub TIEHASH { bless [] }
+
+sub FETCH {
+ my ($self, $errname) = @_;
+ my $proto = prototype("Errno::$errname");
+ if (defined($proto) && $proto eq "") {
+ no strict 'refs';
+ return $! == &$errname;
+ }
+ require Carp;
+ Carp::confess("No errno $errname");
+}
+
+sub STORE {
+ require Carp;
+ Carp::confess("ERRNO hash is read only!");
+}
+
+*CLEAR = \&STORE;
+*DELETE = \&STORE;
+
+sub NEXTKEY {
+ my($k,$v);
+ while(($k,$v) = each %Errno::) {
+ my $proto = prototype("Errno::$k");
+ last if (defined($proto) && $proto eq "");
+
+ }
+ $k
+}
+
+sub FIRSTKEY {
+ my $s = scalar keys %Errno::;
+ goto &NEXTKEY;
+}
+
+sub EXISTS {
+ my ($self, $errname) = @_;
+ my $proto = prototype($errname);
+ defined($proto) && $proto eq "";
+}
+
+tie %!, __PACKAGE__;
+
+1;
+__END__
+
+=head1 NAME
+
+Errno - System errno constants
+
+=head1 SYNOPSIS
+
+ use Errno qw(EINTR EIO :POSIX);
+
+=head1 DESCRIPTION
+
+C<Errno> defines and conditionally exports all the error constants
+defined in your system C<errno.h> include file. It has a single export
+tag, C<:POSIX>, which will export all POSIX defined error numbers.
+
+C<Errno> also makes C<%!> magic such that each element of C<%!> has a non-zero
+value only if C<$!> is set to that value, eg
+
+ use Errno;
+
+ unless (open(FH, "/fangorn/spouse")) {
+ if ($!{ENOENT}) {
+ warn "Get a wife!\n";
+ } else {
+ warn "This path is barred: $!";
+ }
+ }
+
+=head1 AUTHOR
+
+Graham Barr <gbarr@pobox.com>
+
+=head1 COPYRIGHT
+
+Copyright (c) 1997-8 Graham Barr. All rights reserved.
+This program is free software; you can redistribute it and/or modify it
+under the same terms as Perl itself.
+
+=cut
+
+ESQ
+
+}
diff --git a/gnu/usr.bin/perl/ext/Errno/Makefile.PL b/gnu/usr.bin/perl/ext/Errno/Makefile.PL
new file mode 100644
index 00000000000..604d4fb8e8c
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/Errno/Makefile.PL
@@ -0,0 +1,30 @@
+use ExtUtils::MakeMaker;
+
+@VMS = ($^O eq 'VMS') ? (MAN3PODS => {}) : ();
+
+WriteMakefile(
+ NAME => 'Errno',
+ VERSION_FROM => 'Errno_pm.PL',
+ MAN3PODS => {}, # Pods will be built by installman.
+ PL_FILES => {'Errno_pm.PL'=>'Errno.pm'},
+ PM => {'Errno.pm' => '$(INST_LIBDIR)/Errno.pm'},
+ 'clean' => {FILES => 'Errno.pm'},
+ 'dist' => {
+ COMPRESS => 'gzip -9f',
+ SUFFIX => '.gz',
+ DIST_DEFAULT => 'd/Errno.pm tardist',
+ },
+ @VMS,
+);
+
+sub MY::postamble {
+ my $TARG = MM->catfile('d','Errno.pm');
+qq!$TARG : Makefile
+ echo '#This is a dummy file so CPAN will find a VERSION' > $TARG
+ echo 'package Errno;' >> $TARG
+ echo '\$\$VERSION = "\$(VERSION)";' >>$TARG
+ echo '#This is to make sure require will return an error' >>$TARG
+ echo '0;' >>$TARG
+
+!
+}
diff --git a/gnu/usr.bin/perl/ext/Fcntl/Makefile.PL b/gnu/usr.bin/perl/ext/Fcntl/Makefile.PL
index 66a6df6060d..03463737131 100644
--- a/gnu/usr.bin/perl/ext/Fcntl/Makefile.PL
+++ b/gnu/usr.bin/perl/ext/Fcntl/Makefile.PL
@@ -1,7 +1,7 @@
use ExtUtils::MakeMaker;
WriteMakefile(
NAME => 'Fcntl',
- MAN3PODS => ' ', # Pods will be built by installman.
+ MAN3PODS => {}, # Pods will be built by installman.
XSPROTOARG => '-noprototypes', # XXX remove later?
VERSION_FROM => 'Fcntl.pm',
);
diff --git a/gnu/usr.bin/perl/ext/GDBM_File/GDBM_File.xs b/gnu/usr.bin/perl/ext/GDBM_File/GDBM_File.xs
index a423c88c705..ac1ca8c68d9 100644
--- a/gnu/usr.bin/perl/ext/GDBM_File/GDBM_File.xs
+++ b/gnu/usr.bin/perl/ext/GDBM_File/GDBM_File.xs
@@ -23,8 +23,7 @@ typedef datum gdatum;
typedef void (*FATALFUNC)();
static int
-not_here(s)
-char *s;
+not_here(char *s)
{
croak("GDBM_File::%s not implemented on this architecture", s);
return -1;
@@ -41,9 +40,7 @@ char *s;
#endif
static double
-constant(name, arg)
-char *name;
-int arg;
+constant(char *name, int arg)
{
errno = 0;
switch (*name) {
diff --git a/gnu/usr.bin/perl/ext/GDBM_File/Makefile.PL b/gnu/usr.bin/perl/ext/GDBM_File/Makefile.PL
index d24461350b6..2a7256fa41b 100644
--- a/gnu/usr.bin/perl/ext/GDBM_File/Makefile.PL
+++ b/gnu/usr.bin/perl/ext/GDBM_File/Makefile.PL
@@ -2,7 +2,7 @@ use ExtUtils::MakeMaker;
WriteMakefile(
NAME => 'GDBM_File',
LIBS => ["-L/usr/local/lib -lgdbm", "-ldbm"],
- MAN3PODS => ' ', # Pods will be built by installman.
+ MAN3PODS => {}, # Pods will be built by installman.
XSPROTOARG => '-noprototypes', # XXX remove later?
VERSION_FROM => 'GDBM_File.pm',
);
diff --git a/gnu/usr.bin/perl/ext/GDBM_File/hints/sco.pl b/gnu/usr.bin/perl/ext/GDBM_File/hints/sco.pl
new file mode 100644
index 00000000000..5c74a77495f
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/GDBM_File/hints/sco.pl
@@ -0,0 +1,2 @@
+# SCO OSR5 needs to link with libc.so again to have C<fsync> defined
+$self->{LIBS} = ['-lgdbm -lc'];
diff --git a/gnu/usr.bin/perl/ext/IPC/SysV/ChangeLog b/gnu/usr.bin/perl/ext/IPC/SysV/ChangeLog
new file mode 100644
index 00000000000..fff95bec431
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/IPC/SysV/ChangeLog
@@ -0,0 +1,28 @@
+Fri Jul 3 15:06:40 1998 Jarkko Hietaniemi <jhi@iki.fi>
+
+ - Integrated IPC::SysV 1.03 to Perl 5.004_69.
+
+Change 142 on 1998/05/31 by <gbarr@pobox.com> (Graham Barr)
+
+ - Changed SHMLBA from a constSUB to an XS sub as on some systems it is not
+ a constant
+ - Added a missing MODULE line to SysV.xs so ftok is defined in IPC::SysV
+
+Change 138 on 1998/05/23 by <gbarr@pobox.com> (Graham Barr)
+
+ Applied patch from Jarkko Hietaniemi to add constats for UNICOS
+
+ Reduced size of XS object by changing constant sub definition
+ into a loop
+
+ Updated POD to include ftok()
+
+Change 135 on 1998/05/18 by <gbarr@pobox.com> (Graham Barr)
+
+ applied changes from Jarkko Hietaniemi <jhi@iki.fi> to add
+ new constants and ftok
+
+ fixed to compile with >5.004_50
+
+ surrounded newCONSTSUB with #ifndef as perl now defines this itself
+
diff --git a/gnu/usr.bin/perl/ext/IPC/SysV/MANIFEST b/gnu/usr.bin/perl/ext/IPC/SysV/MANIFEST
new file mode 100644
index 00000000000..4b2aa00daf1
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/IPC/SysV/MANIFEST
@@ -0,0 +1,10 @@
+MANIFEST
+Makefile.PL
+Msg.pm
+README
+Semaphore.pm
+SysV.pm
+SysV.xs
+t/msg.t
+t/sem.t
+ChangeLog
diff --git a/gnu/usr.bin/perl/ext/IPC/SysV/Makefile.PL b/gnu/usr.bin/perl/ext/IPC/SysV/Makefile.PL
new file mode 100644
index 00000000000..7e8eba2a254
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/IPC/SysV/Makefile.PL
@@ -0,0 +1,37 @@
+# This -*- perl -*- script makes the Makefile
+# $Id: Makefile.PL,v 1.1 1999/04/29 22:38:48 millert Exp $
+
+require 5.002;
+use ExtUtils::MakeMaker;
+
+#--- MY package
+
+sub MY::libscan
+{
+ my($self,$path) = @_;
+
+ return ''
+ if($path =~ m:/(RCS|CVS|SCCS)/: ||
+ $path =~ m:[~%]$: ||
+ $path =~ m:\.(orig|rej)$:
+ );
+
+ $path;
+}
+
+WriteMakefile(
+ VERSION_FROM => "SysV.pm",
+ NAME => "IPC::SysV",
+ MAN3PODS => {}, # Pods will be built by installman.
+
+ 'dist' => {COMPRESS => 'gzip -9f',
+ SUFFIX => 'gz',
+ DIST_DEFAULT => 'all tardist',
+ },
+
+ 'clean' => {FILES => join(" ",
+ map { "$_ */$_ */*/$_" }
+ qw(*% *.html *.b[ac]k *.old *.orig))
+ },
+ 'macro' => { INSTALLDIRS => 'perl' },
+);
diff --git a/gnu/usr.bin/perl/ext/IPC/SysV/Msg.pm b/gnu/usr.bin/perl/ext/IPC/SysV/Msg.pm
new file mode 100644
index 00000000000..a739ca23679
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/IPC/SysV/Msg.pm
@@ -0,0 +1,223 @@
+# IPC::Msg.pm
+#
+# Copyright (c) 1997 Graham Barr <gbarr@pobox.com>. All rights reserved.
+# This program is free software; you can redistribute it and/or
+# modify it under the same terms as Perl itself.
+
+package IPC::Msg;
+
+use IPC::SysV qw(IPC_STAT IPC_SET IPC_RMID);
+use strict;
+use vars qw($VERSION);
+use Carp;
+
+$VERSION = "1.00";
+
+{
+ package IPC::Msg::stat;
+
+ use Class::Struct qw(struct);
+
+ struct 'IPC::Msg::stat' => [
+ uid => '$',
+ gid => '$',
+ cuid => '$',
+ cgid => '$',
+ mode => '$',
+ qnum => '$',
+ qbytes => '$',
+ lspid => '$',
+ lrpid => '$',
+ stime => '$',
+ rtime => '$',
+ ctime => '$',
+ ];
+}
+
+sub new {
+ @_ == 3 || croak 'new IPC::Msg ( KEY , FLAGS )';
+ my $class = shift;
+
+ my $id = msgget($_[0],$_[1]);
+
+ defined($id)
+ ? bless \$id, $class
+ : undef;
+}
+
+sub id {
+ my $self = shift;
+ $$self;
+}
+
+sub stat {
+ my $self = shift;
+ my $data = "";
+ msgctl($$self,IPC_STAT,$data) or
+ return undef;
+ IPC::Msg::stat->new->unpack($data);
+}
+
+sub set {
+ my $self = shift;
+ my $ds;
+
+ if(@_ == 1) {
+ $ds = shift;
+ }
+ else {
+ croak 'Bad arg count' if @_ % 2;
+ my %arg = @_;
+ my $ds = $self->stat
+ or return undef;
+ my($key,$val);
+ $ds->$key($val)
+ while(($key,$val) = each %arg);
+ }
+
+ msgctl($$self,IPC_SET,$ds->pack);
+}
+
+sub remove {
+ my $self = shift;
+ (msgctl($$self,IPC_RMID,0), undef $$self)[0];
+}
+
+sub rcv {
+ @_ <= 5 && @_ >= 3 or croak '$msg->rcv( BUF, LEN, TYPE, FLAGS )';
+ my $self = shift;
+ my $buf = "";
+ msgrcv($$self,$buf,$_[1],$_[2] || 0, $_[3] || 0) or
+ return;
+ my $type;
+ ($type,$_[0]) = unpack("L a*",$buf);
+ $type;
+}
+
+sub snd {
+ @_ <= 4 && @_ >= 3 or croak '$msg->snd( TYPE, BUF, FLAGS )';
+ my $self = shift;
+ msgsnd($$self,pack("L a*",$_[0],$_[1]), $_[2] || 0);
+}
+
+
+1;
+
+__END__
+
+=head1 NAME
+
+IPC::Msg - SysV Msg IPC object class
+
+=head1 SYNOPSIS
+
+ use IPC::SysV qw(IPC_PRIVATE S_IRWXU S_IRWXG S_IRWXO);
+ use IPC::Msg;
+
+ $msg = new IPC::Msg(IPC_PRIVATE, S_IRWXU | S_IRWXG | S_IRWXO);
+
+ $msg->snd(pack("L a*",$msgtype,$msg));
+
+ $msg->rcv($buf,256);
+
+ $ds = $msg->stat;
+
+ $msg->remove;
+
+=head1 DESCRIPTION
+
+=head1 METHODS
+
+=over 4
+
+=item new ( KEY , FLAGS )
+
+Creates a new message queue associated with C<KEY>. A new queue is
+created if
+
+=over 4
+
+=item *
+
+C<KEY> is equal to C<IPC_PRIVATE>
+
+=item *
+
+C<KEY> does not already have a message queue
+associated with it, and C<I<FLAGS> & IPC_CREAT> is true.
+
+=back
+
+On creation of a new message queue C<FLAGS> is used to set the
+permissions.
+
+=item id
+
+Returns the system message queue identifier.
+
+=item rcv ( BUF, LEN [, TYPE [, FLAGS ]] )
+
+Read a message from the queue. Returns the type of the message read. See
+L<msgrcv>
+
+=item remove
+
+Remove and destroy the message queue from the system.
+
+=item set ( STAT )
+
+=item set ( NAME => VALUE [, NAME => VALUE ...] )
+
+C<set> will set the following values of the C<stat> structure associated
+with the message queue.
+
+ uid
+ gid
+ mode (oly the permission bits)
+ qbytes
+
+C<set> accepts either a stat object, as returned by the C<stat> method,
+or a list of I<name>-I<value> pairs.
+
+=item snd ( TYPE, MSG [, FLAGS ] )
+
+Place a message on the queue with the data from C<MSG> and with type C<TYPE>.
+See L<msgsnd>.
+
+=item stat
+
+Returns an object of type C<IPC::Msg::stat> which is a sub-class of
+C<Class::Struct>. It provides the following fields. For a description
+of these fields see you system documentation.
+
+ uid
+ gid
+ cuid
+ cgid
+ mode
+ qnum
+ qbytes
+ lspid
+ lrpid
+ stime
+ rtime
+ ctime
+
+=back
+
+=head1 SEE ALSO
+
+L<IPC::SysV> L<Class::Struct>
+
+=head1 AUTHOR
+
+Graham Barr <gbarr@pobox.com>
+
+=head1 COPYRIGHT
+
+Copyright (c) 1997 Graham Barr. All rights reserved.
+This program is free software; you can redistribute it and/or modify it
+under the same terms as Perl itself.
+
+=cut
+
diff --git a/gnu/usr.bin/perl/ext/IPC/SysV/README b/gnu/usr.bin/perl/ext/IPC/SysV/README
new file mode 100644
index 00000000000..d412c4c712d
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/IPC/SysV/README
@@ -0,0 +1,20 @@
+Copyright (c) 1997 Graham Barr <gbarr@pobox.com>. All rights reserved.
+This package is free software; you can redistribute it and/or
+modify it under the same terms as Perl itself.
+
+The SysV-IPC contains three packages
+
+ IPC::Semaphore
+ - Provides an object interface to using SysV IPC semaphores
+
+ IPC::Msg
+ - Provides an object interface to using SysV IPC messages
+
+ IPC::SysV
+ - Provides the constants required to use the system SysV IPC calls.
+
+Currently there is not object support for SysV shared memory, but
+SysV::SharedMem is a project for the future.
+
+Share and enjoy!
+
diff --git a/gnu/usr.bin/perl/ext/IPC/SysV/Semaphore.pm b/gnu/usr.bin/perl/ext/IPC/SysV/Semaphore.pm
new file mode 100644
index 00000000000..464eb0bc192
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/IPC/SysV/Semaphore.pm
@@ -0,0 +1,297 @@
+# IPC::Semaphore
+#
+# Copyright (c) 1997 Graham Barr <gbarr@pobox.com>. All rights reserved.
+# This program is free software; you can redistribute it and/or
+# modify it under the same terms as Perl itself.
+
+package IPC::Semaphore;
+
+use IPC::SysV qw(GETNCNT GETZCNT GETVAL SETVAL GETPID GETALL SETALL
+ IPC_STAT IPC_SET IPC_RMID);
+use strict;
+use vars qw($VERSION);
+use Carp;
+
+$VERSION = "1.00";
+
+{
+ package IPC::Semaphore::stat;
+
+ use Class::Struct qw(struct);
+
+ struct 'IPC::Semaphore::stat' => [
+ uid => '$',
+ gid => '$',
+ cuid => '$',
+ cgid => '$',
+ mode => '$',
+ ctime => '$',
+ otime => '$',
+ nsems => '$',
+ ];
+}
+
+sub new {
+ @_ == 4 || croak 'new ' . __PACKAGE__ . '( KEY, NSEMS, FLAGS )';
+ my $class = shift;
+
+ my $id = semget($_[0],$_[1],$_[2]);
+
+ defined($id)
+ ? bless \$id, $class
+ : undef;
+}
+
+sub id {
+ my $self = shift;
+ $$self;
+}
+
+sub remove {
+ my $self = shift;
+ (semctl($$self,0,IPC_RMID,0), undef $$self)[0];
+}
+
+sub getncnt {
+ @_ == 2 || croak '$sem->getncnt( SEM )';
+ my $self = shift;
+ my $sem = shift;
+ my $v = semctl($$self,$sem,GETNCNT,0);
+ $v ? 0 + $v : undef;
+}
+
+sub getzcnt {
+ @_ == 2 || croak '$sem->getzcnt( SEM )';
+ my $self = shift;
+ my $sem = shift;
+ my $v = semctl($$self,$sem,GETZCNT,0);
+ $v ? 0 + $v : undef;
+}
+
+sub getval {
+ @_ == 2 || croak '$sem->getval( SEM )';
+ my $self = shift;
+ my $sem = shift;
+ my $v = semctl($$self,$sem,GETVAL,0);
+ $v ? 0 + $v : undef;
+}
+
+sub getpid {
+ @_ == 2 || croak '$sem->getpid( SEM )';
+ my $self = shift;
+ my $sem = shift;
+ my $v = semctl($$self,$sem,GETPID,0);
+ $v ? 0 + $v : undef;
+}
+
+sub op {
+ @_ >= 4 || croak '$sem->op( OPLIST )';
+ my $self = shift;
+ croak 'Bad arg count' if @_ % 3;
+ my $data = pack("s*",@_);
+ semop($$self,$data);
+}
+
+sub stat {
+ my $self = shift;
+ my $data = "";
+ semctl($$self,0,IPC_STAT,$data)
+ or return undef;
+ IPC::Semaphore::stat->new->unpack($data);
+}
+
+sub set {
+ my $self = shift;
+ my $ds;
+
+ if(@_ == 1) {
+ $ds = shift;
+ }
+ else {
+ croak 'Bad arg count' if @_ % 2;
+ my %arg = @_;
+ my $ds = $self->stat
+ or return undef;
+ my($key,$val);
+ $ds->$key($val)
+ while(($key,$val) = each %arg);
+ }
+
+ my $v = semctl($$self,0,IPC_SET,$ds->pack);
+ $v ? 0 + $v : undef;
+}
+
+sub getall {
+ my $self = shift;
+ my $data = "";
+ semctl($$self,0,GETALL,$data)
+ or return ();
+ (unpack("s*",$data));
+}
+
+sub setall {
+ my $self = shift;
+ my $data = pack("s*",@_);
+ semctl($$self,0,SETALL,$data);
+}
+
+sub setval {
+ @_ == 3 || croak '$sem->setval( SEM, VAL )';
+ my $self = shift;
+ my $sem = shift;
+ my $val = shift;
+ semctl($$self,$sem,SETVAL,$val);
+}
+
+1;
+
+__END__
+
+=head1 NAME
+
+IPC::Semaphore - SysV Semaphore IPC object class
+
+=head1 SYNOPSIS
+
+ use IPC::SysV qw(IPC_PRIVATE S_IRWXU IPC_CREAT);
+ use IPC::Semaphore;
+
+ $sem = new IPC::Semaphore(IPC_PRIVATE, 10, S_IRWXU | IPC_CREAT);
+
+ $sem->setall( (0) x 10);
+
+ @sem = $sem->getall;
+
+ $ncnt = $sem->getncnt;
+
+ $zcnt = $sem->getzcnt;
+
+ $ds = $sem->stat;
+
+ $sem->remove;
+
+=head1 DESCRIPTION
+
+=head1 METHODS
+
+=over 4
+
+=item new ( KEY , NSEMS , FLAGS )
+
+Create a new semaphore set associated with C<KEY>. C<NSEMS> is the number
+of semaphores in the set. A new set is created if
+
+=over 4
+
+=item *
+
+C<KEY> is equal to C<IPC_PRIVATE>
+
+=item *
+
+C<KEY> does not already have a semaphore identifier
+associated with it, and C<I<FLAGS> & IPC_CREAT> is true.
+
+=back
+
+On creation of a new semaphore set C<FLAGS> is used to set the
+permissions.
+
+=item getall
+
+Returns the values of the semaphore set as an array.
+
+=item getncnt ( SEM )
+
+Returns the number of processed waiting for the semaphore C<SEM> to
+become greater than it's current value
+
+=item getpid ( SEM )
+
+Returns the process id of the last process that performed an operation
+on the semaphore C<SEM>.
+
+=item getval ( SEM )
+
+Returns the current value of the semaphore C<SEM>.
+
+=item getzcnt ( SEM )
+
+Returns the number of processed waiting for the semaphore C<SEM> to
+become zero.
+
+=item id
+
+Returns the system identifier for the semaphore set.
+
+=item op ( OPLIST )
+
+C<OPLIST> is a list of operations to pass to C<semop>. C<OPLIST> is
+a concatenation of smaller lists, each which has three values. The
+first is the semaphore number, the second is the operation and the last
+is a flags value. See L<semop> for more details. For example
+
+ $sem->op(
+ 0, -1, IPC_NOWAIT,
+ 1, 1, IPC_NOWAIT
+ );
+
+=item remove
+
+Remove and destroy the semaphore set from the system.
+
+=item set ( STAT )
+
+=item set ( NAME => VALUE [, NAME => VALUE ...] )
+
+C<set> will set the following values of the C<stat> structure associated
+with the semaphore set.
+
+ uid
+ gid
+ mode (oly the permission bits)
+
+C<set> accepts either a stat object, as returned by the C<stat> method,
+or a list of I<name>-I<value> pairs.
+
+=item setall ( VALUES )
+
+Sets all values in the semaphore set to those given on the C<VALUES> list.
+C<VALUES> must contain the correct number of values.
+
+=item setval ( N , VALUE )
+
+Set the C<N>th value in the semaphore set to C<VALUE>
+
+=item stat
+
+Returns an object of type C<IPC::Semaphore::stat> which is a sub-class of
+C<Class::Struct>. It provides the following fields. For a description
+of these fields see you system documentation.
+
+ uid
+ gid
+ cuid
+ cgid
+ mode
+ ctime
+ otime
+ nsems
+
+=back
+
+=head1 SEE ALSO
+
+L<IPC::SysV> L<Class::Struct> L<semget> L<semctl> L<semop>
+
+=head1 AUTHOR
+
+Graham Barr <gbarr@pobox.com>
+
+=head1 COPYRIGHT
+
+Copyright (c) 1997 Graham Barr. All rights reserved.
+This program is free software; you can redistribute it and/or modify it
+under the same terms as Perl itself.
+
+=cut
diff --git a/gnu/usr.bin/perl/ext/IPC/SysV/SysV.pm b/gnu/usr.bin/perl/ext/IPC/SysV/SysV.pm
new file mode 100644
index 00000000000..eb245937aa4
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/IPC/SysV/SysV.pm
@@ -0,0 +1,98 @@
+# IPC::SysV.pm
+#
+# Copyright (c) 1997 Graham Barr <gbarr@pobox.com>. All rights reserved.
+# This program is free software; you can redistribute it and/or
+# modify it under the same terms as Perl itself.
+
+package IPC::SysV;
+
+use strict;
+use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $VERSION);
+use Carp;
+use Config;
+
+require Exporter;
+@ISA = qw(Exporter);
+
+$VERSION = "1.03";
+
+@EXPORT_OK = qw(
+ GETALL GETNCNT GETPID GETVAL GETZCNT
+
+ IPC_ALLOC IPC_CREAT IPC_EXCL IPC_GETACL IPC_LOCKED IPC_M
+ IPC_NOERROR IPC_NOWAIT IPC_PRIVATE IPC_R IPC_RMID IPC_SET
+ IPC_SETACL IPC_SETLABEL IPC_STAT IPC_W IPC_WANTED
+
+ MSG_FWAIT MSG_LOCKED MSG_MWAIT MSG_NOERROR MSG_QWAIT
+ MSG_R MSG_RWAIT MSG_STAT MSG_W MSG_WWAIT
+
+ SEM_A SEM_ALLOC SEM_DEST SEM_ERR SEM_ORDER SEM_R SEM_UNDO
+
+ SETALL SETVAL
+
+ SHMLBA
+
+ SHM_A SHM_CLEAR SHM_COPY SHM_DCACHE SHM_DEST SHM_ECACHE
+ SHM_FMAP SHM_ICACHE SHM_INIT SHM_LOCK SHM_LOCKED SHM_MAP
+ SHM_NOSWAP SHM_R SHM_RDONLY SHM_REMOVED SHM_RND SHM_SHARE_MMU
+ SHM_SHATTR SHM_SIZE SHM_UNLOCK SHM_W
+
+ S_IRUSR S_IWUSR S_IRWXU
+ S_IRGRP S_IWGRP S_IRWXG
+ S_IROTH S_IWOTH S_IRWXO
+
+ ftok
+);
+
+BOOT_XS: {
+ # If I inherit DynaLoader then I inherit AutoLoader and I DON'T WANT TO
+ require DynaLoader;
+
+ # DynaLoader calls dl_load_flags as a static method.
+ *dl_load_flags = DynaLoader->can('dl_load_flags');
+
+ do {
+ __PACKAGE__->can('bootstrap') || \&DynaLoader::bootstrap
+ }->(__PACKAGE__, $VERSION);
+}
+
+1;
+
+__END__
+
+=head1 NAME
+
+IPC::SysV - SysV IPC constants
+
+=head1 SYNOPSIS
+
+ use IPC::SysV qw(IPC_STAT IPC_PRIVATE);
+
+=head1 DESCRIPTION
+
+C<IPC::SysV> defines and conditionally exports all the constants
+defined in your system include files which are needed by the SysV
+IPC calls.
+
+=item ftok( PATH, ID )
+
+Return a key based on PATH and ID, which can be used as a key for
+C<msgget>, C<semget> and C<shmget>. See L<ftok>
+
+=head1 SEE ALSO
+
+L<IPC::Msg>, L<IPC::Semaphore>, L<ftok>
+
+=head1 AUTHORS
+
+Graham Barr <gbarr@pobox.com>
+Jarkko Hietaniemi <jhi@iki.fi>
+
+=head1 COPYRIGHT
+
+Copyright (c) 1997 Graham Barr. All rights reserved.
+This program is free software; you can redistribute it and/or modify it
+under the same terms as Perl itself.
+
+=cut
+
diff --git a/gnu/usr.bin/perl/ext/IPC/SysV/SysV.xs b/gnu/usr.bin/perl/ext/IPC/SysV/SysV.xs
new file mode 100644
index 00000000000..ecd52702222
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/IPC/SysV/SysV.xs
@@ -0,0 +1,443 @@
+#include "EXTERN.h"
+#include "perl.h"
+#include "XSUB.h"
+
+#include <sys/types.h>
+#ifdef __linux__
+# include <asm/page.h>
+#endif
+#if defined(HAS_MSG) || defined(HAS_SEM) || defined(HAS_SHM)
+#ifndef HAS_SEM
+# include <sys/ipc.h>
+#endif
+# ifdef HAS_MSG
+# include <sys/msg.h>
+# endif
+# ifdef HAS_SHM
+# if defined(PERL_SCO) || defined(PERL_ISC)
+# include <sys/sysmacros.h> /* SHMLBA */
+# endif
+# include <sys/shm.h>
+# ifndef HAS_SHMAT_PROTOTYPE
+ extern Shmat_t shmat _((int, char *, int));
+# endif
+# if defined(__sparc__) && (defined(__NetBSD__) || defined(__OpenBSD__))
+# undef SHMLBA /* not static: determined at boot time */
+# define SHMLBA getpagesize()
+# endif
+# endif
+#endif
+
+/* Required to get 'struct pte' for SHMLBA on ULTRIX. */
+#if defined(__ultrix) || defined(__ultrix__) || defined(ultrix)
+# include <machine/pte.h>
+#endif
+
+/* Required in BSDI to get PAGE_SIZE definition for SHMLBA.
+ * Ugly. More beautiful solutions welcome.
+ * Shouting at BSDI sounds quite beautiful. */
+#ifdef __bsdi__
+# include <vm/vm_param.h> /* move upwards under HAS_SHM? */
+#endif
+
+#ifndef S_IRWXU
+# ifdef S_IRUSR
+# define S_IRWXU (S_IRUSR|S_IWUSR|S_IWUSR)
+# define S_IRWXG (S_IRGRP|S_IWGRP|S_IWGRP)
+# define S_IRWXO (S_IROTH|S_IWOTH|S_IWOTH)
+# else
+# define S_IRWXU 0700
+# define S_IRWXG 0070
+# define S_IRWXO 0007
+# endif
+#endif
+
+MODULE=IPC::SysV PACKAGE=IPC::Msg::stat
+
+PROTOTYPES: ENABLE
+
+void
+pack(obj)
+ SV * obj
+PPCODE:
+{
+#ifdef HAS_MSG
+ SV *sv;
+ struct msqid_ds ds;
+ AV *list = (AV*)SvRV(obj);
+ sv = *av_fetch(list,0,TRUE); ds.msg_perm.uid = SvIV(sv);
+ sv = *av_fetch(list,1,TRUE); ds.msg_perm.gid = SvIV(sv);
+ sv = *av_fetch(list,4,TRUE); ds.msg_perm.mode = SvIV(sv);
+ sv = *av_fetch(list,6,TRUE); ds.msg_qbytes = SvIV(sv);
+ ST(0) = sv_2mortal(newSVpv((char *)&ds,sizeof(ds)));
+ XSRETURN(1);
+#else
+ croak("System V msgxxx is not implemented on this machine");
+#endif
+}
+
+void
+unpack(obj,buf)
+ SV * obj
+ SV * buf
+PPCODE:
+{
+#ifdef HAS_MSG
+ STRLEN len;
+ SV **sv_ptr;
+ struct msqid_ds *ds = (struct msqid_ds *)SvPV(buf,len);
+ AV *list = (AV*)SvRV(obj);
+ if (len != sizeof(*ds)) {
+ croak("Bad arg length for %s, length is %d, should be %d",
+ "IPC::Msg::stat",
+ len, sizeof(*ds));
+ }
+ sv_ptr = av_fetch(list,0,TRUE);
+ sv_setiv(*sv_ptr, ds->msg_perm.uid);
+ sv_ptr = av_fetch(list,1,TRUE);
+ sv_setiv(*sv_ptr, ds->msg_perm.gid);
+ sv_ptr = av_fetch(list,2,TRUE);
+ sv_setiv(*sv_ptr, ds->msg_perm.cuid);
+ sv_ptr = av_fetch(list,3,TRUE);
+ sv_setiv(*sv_ptr, ds->msg_perm.cgid);
+ sv_ptr = av_fetch(list,4,TRUE);
+ sv_setiv(*sv_ptr, ds->msg_perm.mode);
+ sv_ptr = av_fetch(list,5,TRUE);
+ sv_setiv(*sv_ptr, ds->msg_qnum);
+ sv_ptr = av_fetch(list,6,TRUE);
+ sv_setiv(*sv_ptr, ds->msg_qbytes);
+ sv_ptr = av_fetch(list,7,TRUE);
+ sv_setiv(*sv_ptr, ds->msg_lspid);
+ sv_ptr = av_fetch(list,8,TRUE);
+ sv_setiv(*sv_ptr, ds->msg_lrpid);
+ sv_ptr = av_fetch(list,9,TRUE);
+ sv_setiv(*sv_ptr, ds->msg_stime);
+ sv_ptr = av_fetch(list,10,TRUE);
+ sv_setiv(*sv_ptr, ds->msg_rtime);
+ sv_ptr = av_fetch(list,11,TRUE);
+ sv_setiv(*sv_ptr, ds->msg_ctime);
+ XSRETURN(1);
+#else
+ croak("System V msgxxx is not implemented on this machine");
+#endif
+}
+
+MODULE=IPC::SysV PACKAGE=IPC::Semaphore::stat
+
+void
+unpack(obj,ds)
+ SV * obj
+ SV * ds
+PPCODE:
+{
+#ifdef HAS_SEM
+ STRLEN len;
+ AV *list = (AV*)SvRV(obj);
+ struct semid_ds *data = (struct semid_ds *)SvPV(ds,len);
+ if(!sv_isa(obj, "IPC::Semaphore::stat"))
+ croak("method %s not called a %s object",
+ "unpack","IPC::Semaphore::stat");
+ if (len != sizeof(*data)) {
+ croak("Bad arg length for %s, length is %d, should be %d",
+ "IPC::Semaphore::stat",
+ len, sizeof(*data));
+ }
+ sv_setiv(*av_fetch(list,0,TRUE), data[0].sem_perm.uid);
+ sv_setiv(*av_fetch(list,1,TRUE), data[0].sem_perm.gid);
+ sv_setiv(*av_fetch(list,2,TRUE), data[0].sem_perm.cuid);
+ sv_setiv(*av_fetch(list,3,TRUE), data[0].sem_perm.cgid);
+ sv_setiv(*av_fetch(list,4,TRUE), data[0].sem_perm.mode);
+ sv_setiv(*av_fetch(list,5,TRUE), data[0].sem_ctime);
+ sv_setiv(*av_fetch(list,6,TRUE), data[0].sem_otime);
+ sv_setiv(*av_fetch(list,7,TRUE), data[0].sem_nsems);
+ XSRETURN(1);
+#else
+ croak("System V semxxx is not implemented on this machine");
+#endif
+}
+
+void
+pack(obj)
+ SV * obj
+PPCODE:
+{
+#ifdef HAS_SEM
+ SV **sv_ptr;
+ SV *sv;
+ struct semid_ds ds;
+ AV *list = (AV*)SvRV(obj);
+ if(!sv_isa(obj, "IPC::Semaphore::stat"))
+ croak("method %s not called a %s object",
+ "pack","IPC::Semaphore::stat");
+ if((sv_ptr = av_fetch(list,0,TRUE)) && (sv = *sv_ptr))
+ ds.sem_perm.uid = SvIV(*sv_ptr);
+ if((sv_ptr = av_fetch(list,1,TRUE)) && (sv = *sv_ptr))
+ ds.sem_perm.gid = SvIV(*sv_ptr);
+ if((sv_ptr = av_fetch(list,2,TRUE)) && (sv = *sv_ptr))
+ ds.sem_perm.cuid = SvIV(*sv_ptr);
+ if((sv_ptr = av_fetch(list,3,TRUE)) && (sv = *sv_ptr))
+ ds.sem_perm.cgid = SvIV(*sv_ptr);
+ if((sv_ptr = av_fetch(list,4,TRUE)) && (sv = *sv_ptr))
+ ds.sem_perm.mode = SvIV(*sv_ptr);
+ if((sv_ptr = av_fetch(list,5,TRUE)) && (sv = *sv_ptr))
+ ds.sem_ctime = SvIV(*sv_ptr);
+ if((sv_ptr = av_fetch(list,6,TRUE)) && (sv = *sv_ptr))
+ ds.sem_otime = SvIV(*sv_ptr);
+ if((sv_ptr = av_fetch(list,7,TRUE)) && (sv = *sv_ptr))
+ ds.sem_nsems = SvIV(*sv_ptr);
+ ST(0) = sv_2mortal(newSVpv((char *)&ds,sizeof(ds)));
+ XSRETURN(1);
+#else
+ croak("System V semxxx is not implemented on this machine");
+#endif
+}
+
+MODULE=IPC::SysV PACKAGE=IPC::SysV
+
+int
+ftok(path, id)
+ char * path
+ int id
+ CODE:
+#if defined(HAS_SEM) || defined(HAS_SHM)
+ key_t k = ftok(path, id);
+ ST(0) = k == (key_t) -1 ? &PL_sv_undef : sv_2mortal(newSViv(k));
+#else
+ DIE(no_func, "ftok");
+#endif
+
+int
+SHMLBA()
+ CODE:
+#ifdef SHMLBA
+ ST(0) = sv_2mortal(newSViv(SHMLBA));
+#else
+ croak("SHMLBA is not defined on this architecture");
+#endif
+
+BOOT:
+{
+ HV *stash = gv_stashpvn("IPC::SysV", 9, TRUE);
+ /*
+ * constant subs for IPC::SysV
+ */
+ struct { char *n; I32 v; } IPC__SysV__const[] = {
+#ifdef GETVAL
+ {"GETVAL", GETVAL},
+#endif
+#ifdef GETPID
+ {"GETPID", GETPID},
+#endif
+#ifdef GETNCNT
+ {"GETNCNT", GETNCNT},
+#endif
+#ifdef GETZCNT
+ {"GETZCNT", GETZCNT},
+#endif
+#ifdef GETALL
+ {"GETALL", GETALL},
+#endif
+#ifdef IPC_ALLOC
+ {"IPC_ALLOC", IPC_ALLOC},
+#endif
+#ifdef IPC_CREAT
+ {"IPC_CREAT", IPC_CREAT},
+#endif
+#ifdef IPC_EXCL
+ {"IPC_EXCL", IPC_EXCL},
+#endif
+#ifdef IPC_GETACL
+ {"IPC_GETACL", IPC_EXCL},
+#endif
+#ifdef IPC_LOCKED
+ {"IPC_LOCKED", IPC_LOCKED},
+#endif
+#ifdef IPC_M
+ {"IPC_M", IPC_M},
+#endif
+#ifdef IPC_NOERROR
+ {"IPC_NOERROR", IPC_NOERROR},
+#endif
+#ifdef IPC_NOWAIT
+ {"IPC_NOWAIT", IPC_NOWAIT},
+#endif
+#ifdef IPC_PRIVATE
+ {"IPC_PRIVATE", IPC_PRIVATE},
+#endif
+#ifdef IPC_R
+ {"IPC_R", IPC_R},
+#endif
+#ifdef IPC_RMID
+ {"IPC_RMID", IPC_RMID},
+#endif
+#ifdef IPC_SET
+ {"IPC_SET", IPC_SET},
+#endif
+#ifdef IPC_SETACL
+ {"IPC_SETACL", IPC_SETACL},
+#endif
+#ifdef IPC_SETLABEL
+ {"IPC_SETLABEL", IPC_SETLABEL},
+#endif
+#ifdef IPC_STAT
+ {"IPC_STAT", IPC_STAT},
+#endif
+#ifdef IPC_W
+ {"IPC_W", IPC_W},
+#endif
+#ifdef IPC_WANTED
+ {"IPC_WANTED", IPC_WANTED},
+#endif
+#ifdef MSG_NOERROR
+ {"MSG_NOERROR", MSG_NOERROR},
+#endif
+#ifdef MSG_FWAIT
+ {"MSG_FWAIT", MSG_FWAIT},
+#endif
+#ifdef MSG_LOCKED
+ {"MSG_LOCKED", MSG_LOCKED},
+#endif
+#ifdef MSG_MWAIT
+ {"MSG_MWAIT", MSG_MWAIT},
+#endif
+#ifdef MSG_WAIT
+ {"MSG_WAIT", MSG_WAIT},
+#endif
+#ifdef MSG_R
+ {"MSG_R", MSG_R},
+#endif
+#ifdef MSG_RWAIT
+ {"MSG_RWAIT", MSG_RWAIT},
+#endif
+#ifdef MSG_STAT
+ {"MSG_STAT", MSG_STAT},
+#endif
+#ifdef MSG_W
+ {"MSG_W", MSG_W},
+#endif
+#ifdef MSG_WWAIT
+ {"MSG_WWAIT", MSG_WWAIT},
+#endif
+#ifdef SEM_A
+ {"SEM_A", SEM_A},
+#endif
+#ifdef SEM_ALLOC
+ {"SEM_ALLOC", SEM_ALLOC},
+#endif
+#ifdef SEM_DEST
+ {"SEM_DEST", SEM_DEST},
+#endif
+#ifdef SEM_ERR
+ {"SEM_ERR", SEM_ERR},
+#endif
+#ifdef SEM_R
+ {"SEM_R", SEM_R},
+#endif
+#ifdef SEM_ORDER
+ {"SEM_ORDER", SEM_ORDER},
+#endif
+#ifdef SEM_UNDO
+ {"SEM_UNDO", SEM_UNDO},
+#endif
+#ifdef SETVAL
+ {"SETVAL", SETVAL},
+#endif
+#ifdef SETALL
+ {"SETALL", SETALL},
+#endif
+#ifdef SHM_CLEAR
+ {"SHM_CLEAR", SHM_CLEAR},
+#endif
+#ifdef SHM_COPY
+ {"SHM_COPY", SHM_COPY},
+#endif
+#ifdef SHM_DCACHE
+ {"SHM_DCACHE", SHM_DCACHE},
+#endif
+#ifdef SHM_DEST
+ {"SHM_DEST", SHM_DEST},
+#endif
+#ifdef SHM_ECACHE
+ {"SHM_ECACHE", SHM_ECACHE},
+#endif
+#ifdef SHM_FMAP
+ {"SHM_FMAP", SHM_FMAP},
+#endif
+#ifdef SHM_ICACHE
+ {"SHM_ICACHE", SHM_ICACHE},
+#endif
+#ifdef SHM_INIT
+ {"SHM_INIT", SHM_INIT},
+#endif
+#ifdef SHM_LOCK
+ {"SHM_LOCK", SHM_LOCK},
+#endif
+#ifdef SHM_LOCKED
+ {"SHM_LOCKED", SHM_LOCKED},
+#endif
+#ifdef SHM_MAP
+ {"SHM_MAP", SHM_MAP},
+#endif
+#ifdef SHM_NOSWAP
+ {"SHM_NOSWAP", SHM_NOSWAP},
+#endif
+#ifdef SHM_RDONLY
+ {"SHM_RDONLY", SHM_RDONLY},
+#endif
+#ifdef SHM_REMOVED
+ {"SHM_REMOVED", SHM_REMOVED},
+#endif
+#ifdef SHM_RND
+ {"SHM_RND", SHM_RND},
+#endif
+#ifdef SHM_SHARE_MMU
+ {"SHM_SHARE_MMU", SHM_SHARE_MMU},
+#endif
+#ifdef SHM_SHATTR
+ {"SHM_SHATTR", SHM_SHATTR},
+#endif
+#ifdef SHM_SIZE
+ {"SHM_SIZE", SHM_SIZE},
+#endif
+#ifdef SHM_UNLOCK
+ {"SHM_UNLOCK", SHM_UNLOCK},
+#endif
+#ifdef SHM_W
+ {"SHM_W", SHM_W},
+#endif
+#ifdef S_IRUSR
+ {"S_IRUSR", S_IRUSR},
+#endif
+#ifdef S_IWUSR
+ {"S_IWUSR", S_IWUSR},
+#endif
+#ifdef S_IRWXU
+ {"S_IRWXU", S_IRWXU},
+#endif
+#ifdef S_IRGRP
+ {"S_IRGRP", S_IRGRP},
+#endif
+#ifdef S_IWGRP
+ {"S_IWGRP", S_IWGRP},
+#endif
+#ifdef S_IRWXG
+ {"S_IRWXG", S_IRWXG},
+#endif
+#ifdef S_IROTH
+ {"S_IROTH", S_IROTH},
+#endif
+#ifdef S_IWOTH
+ {"S_IWOTH", S_IWOTH},
+#endif
+#ifdef S_IRWXO
+ {"S_IRWXO", S_IRWXO},
+#endif
+ {Nullch,0}};
+ char *name;
+ int i;
+
+ for(i = 0 ; name = IPC__SysV__const[i].n ; i++) {
+ newCONSTSUB(stash,name, newSViv(IPC__SysV__const[i].v));
+ }
+}
+
diff --git a/gnu/usr.bin/perl/ext/IPC/SysV/t/msg.t b/gnu/usr.bin/perl/ext/IPC/SysV/t/msg.t
new file mode 100644
index 00000000000..2a982f054a7
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/IPC/SysV/t/msg.t
@@ -0,0 +1,41 @@
+use IPC::SysV qw(IPC_PRIVATE IPC_RMID IPC_NOWAIT IPC_STAT S_IRWXU S_IRWXG S_IRWXO);
+
+use IPC::Msg;
+#Creating a message queue
+
+print "1..9\n";
+
+$msq = new IPC::Msg(IPC_PRIVATE, S_IRWXU | S_IRWXG | S_IRWXO)
+ || die "msgget: ",$!+0," $!\n";
+
+print "ok 1\n";
+
+#Putting a message on the queue
+$msgtype = 1;
+$msg = "hello";
+$msq->snd($msgtype,$msg,0) || print "not ";
+print "ok 2\n";
+
+#Check if there are messages on the queue
+$ds = $msq->stat() or print "not ";
+print "ok 3\n";
+
+print "not " unless $ds && $ds->qnum() == 1;
+print "ok 4\n";
+
+#Retreiving a message from the queue
+$rmsgtype = 0; # Give me any type
+$rmsgtype = $msq->rcv($rmsg,256,$rmsgtype,IPC_NOWAIT) || print "not ";
+print "ok 5\n";
+
+print "not " unless $rmsgtype == $msgtype && $rmsg eq $msg;
+print "ok 6\n";
+
+$ds = $msq->stat() or print "not ";
+print "ok 7\n";
+
+print "not " unless $ds && $ds->qnum() == 0;
+print "ok 8\n";
+
+$msq->remove || print "not ";
+print "ok 9\n";
diff --git a/gnu/usr.bin/perl/ext/IPC/SysV/t/sem.t b/gnu/usr.bin/perl/ext/IPC/SysV/t/sem.t
new file mode 100644
index 00000000000..9d6fff64f23
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/IPC/SysV/t/sem.t
@@ -0,0 +1,51 @@
+
+use IPC::SysV qw(
+ SETALL
+ IPC_PRIVATE
+ IPC_CREAT
+ IPC_RMID
+ IPC_NOWAIT
+ IPC_STAT
+ S_IRWXU
+ S_IRWXG
+ S_IRWXO
+);
+use IPC::Semaphore;
+
+print "1..10\n";
+
+$sem = new IPC::Semaphore(IPC_PRIVATE, 10, S_IRWXU | S_IRWXG | S_IRWXO | IPC_CREAT)
+ || die "semget: ",$!+0," $!\n";
+
+print "ok 1\n";
+
+my $st = $sem->stat || print "not ";
+print "ok 2\n";
+
+$sem->setall( (0) x 10) || print "not ";
+print "ok 3\n";
+
+my @sem = $sem->getall;
+print "not " unless join("",@sem) eq "0000000000";
+print "ok 4\n";
+
+$sem[2] = 1;
+$sem->setall( @sem ) || print "not ";
+print "ok 5\n";
+
+@sem = $sem->getall;
+print "not " unless join("",@sem) eq "0010000000";
+print "ok 6\n";
+
+my $ncnt = $sem->getncnt(0);
+print "not " if $sem->getncnt(0) || !defined($ncnt);
+print "ok 7\n";
+
+$sem->op(2,-1,IPC_NOWAIT) || print "not ";
+print "ok 8\n";
+
+print "not " if $sem->getncnt(0);
+print "ok 9\n";
+
+$sem->remove || print "not ";
+print "ok 10\n";
diff --git a/gnu/usr.bin/perl/ext/ODBM_File/Makefile.PL b/gnu/usr.bin/perl/ext/ODBM_File/Makefile.PL
index 76a5d199990..2732a32ac34 100644
--- a/gnu/usr.bin/perl/ext/ODBM_File/Makefile.PL
+++ b/gnu/usr.bin/perl/ext/ODBM_File/Makefile.PL
@@ -2,7 +2,7 @@ use ExtUtils::MakeMaker;
WriteMakefile(
NAME => 'ODBM_File',
LIBS => ["-ldbm -lucb"],
- MAN3PODS => ' ', # Pods will be built by installman.
+ MAN3PODS => {}, # Pods will be built by installman.
XSPROTOARG => '-noprototypes', # XXX remove later?
VERSION_FROM => 'ODBM_File.pm',
);
diff --git a/gnu/usr.bin/perl/ext/ODBM_File/typemap b/gnu/usr.bin/perl/ext/ODBM_File/typemap
index a6b0e5faa86..5e12e739338 100644
--- a/gnu/usr.bin/perl/ext/ODBM_File/typemap
+++ b/gnu/usr.bin/perl/ext/ODBM_File/typemap
@@ -14,8 +14,8 @@ FATALFUNC T_OPAQUEPTR
INPUT
T_DATUM
- $var.dptr = SvPV($arg, na);
- $var.dsize = (int)na;
+ $var.dptr = SvPV($arg, PL_na);
+ $var.dsize = (int)PL_na;
T_GDATUM
UNIMPLEMENTED
OUTPUT
diff --git a/gnu/usr.bin/perl/ext/POSIX/Makefile.PL b/gnu/usr.bin/perl/ext/POSIX/Makefile.PL
index 3359d1742c3..d379fdb908e 100644
--- a/gnu/usr.bin/perl/ext/POSIX/Makefile.PL
+++ b/gnu/usr.bin/perl/ext/POSIX/Makefile.PL
@@ -1,8 +1,8 @@
use ExtUtils::MakeMaker;
WriteMakefile(
NAME => 'POSIX',
- LIBS => ["-lm -lposix -lcposix"],
- MAN3PODS => ' ', # Pods will be built by installman.
+ ($^O eq 'MSWin32' ? () : (LIBS => ["-lm -lposix -lcposix"])),
+ MAN3PODS => {}, # Pods will be built by installman.
XSPROTOARG => '-noprototypes', # XXX remove later?
VERSION_FROM => 'POSIX.pm',
);
diff --git a/gnu/usr.bin/perl/ext/POSIX/hints/bsdos.pl b/gnu/usr.bin/perl/ext/POSIX/hints/bsdos.pl
new file mode 100644
index 00000000000..62732ac7b9d
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/POSIX/hints/bsdos.pl
@@ -0,0 +1,3 @@
+# BSD platforms have extra fields in struct tm that need to be initialized.
+# XXX A Configure test is needed.
+$self->{CCFLAGS} = $Config{ccflags} . ' -DSTRUCT_TM_HASZONE' ;
diff --git a/gnu/usr.bin/perl/ext/POSIX/hints/dynixptx.pl b/gnu/usr.bin/perl/ext/POSIX/hints/dynixptx.pl
new file mode 100644
index 00000000000..9b636843823
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/POSIX/hints/dynixptx.pl
@@ -0,0 +1,4 @@
+# Need to add an extra '-lc' to the end to work around a DYNIX/ptx bug
+# PR#227670 - linker error on fpgetround()
+
+$self->{LIBS} = ['-ldb -lm -lc'];
diff --git a/gnu/usr.bin/perl/ext/POSIX/hints/freebsd.pl b/gnu/usr.bin/perl/ext/POSIX/hints/freebsd.pl
new file mode 100644
index 00000000000..62732ac7b9d
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/POSIX/hints/freebsd.pl
@@ -0,0 +1,3 @@
+# BSD platforms have extra fields in struct tm that need to be initialized.
+# XXX A Configure test is needed.
+$self->{CCFLAGS} = $Config{ccflags} . ' -DSTRUCT_TM_HASZONE' ;
diff --git a/gnu/usr.bin/perl/ext/POSIX/hints/linux.pl b/gnu/usr.bin/perl/ext/POSIX/hints/linux.pl
new file mode 100644
index 00000000000..f1d19814ae1
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/POSIX/hints/linux.pl
@@ -0,0 +1,5 @@
+# libc6, aka glibc2, seems to need STRUCT_TM_HASZONE defined.
+# Thanks to Bart Schuller <schuller@Lunatech.com>
+# See Message-ID: <19971009002636.50729@tanglefoot>
+# XXX A Configure test is needed.
+$self->{CCFLAGS} = $Config{ccflags} . ' -DSTRUCT_TM_HASZONE -DHINT_SC_EXIST' ;
diff --git a/gnu/usr.bin/perl/ext/POSIX/hints/mint.pl b/gnu/usr.bin/perl/ext/POSIX/hints/mint.pl
new file mode 100644
index 00000000000..b975cbb2ee6
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/POSIX/hints/mint.pl
@@ -0,0 +1,2 @@
+$self->{CCFLAGS} = $Config{ccflags} . ' -DNO_LOCALECONV_GROUPING -DNO_LOCALECONV_MON_GROUPING';
+
diff --git a/gnu/usr.bin/perl/ext/POSIX/hints/netbsd.pl b/gnu/usr.bin/perl/ext/POSIX/hints/netbsd.pl
new file mode 100644
index 00000000000..62732ac7b9d
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/POSIX/hints/netbsd.pl
@@ -0,0 +1,3 @@
+# BSD platforms have extra fields in struct tm that need to be initialized.
+# XXX A Configure test is needed.
+$self->{CCFLAGS} = $Config{ccflags} . ' -DSTRUCT_TM_HASZONE' ;
diff --git a/gnu/usr.bin/perl/ext/POSIX/hints/openbsd.pl b/gnu/usr.bin/perl/ext/POSIX/hints/openbsd.pl
new file mode 100644
index 00000000000..62732ac7b9d
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/POSIX/hints/openbsd.pl
@@ -0,0 +1,3 @@
+# BSD platforms have extra fields in struct tm that need to be initialized.
+# XXX A Configure test is needed.
+$self->{CCFLAGS} = $Config{ccflags} . ' -DSTRUCT_TM_HASZONE' ;
diff --git a/gnu/usr.bin/perl/ext/POSIX/hints/sunos_4.pl b/gnu/usr.bin/perl/ext/POSIX/hints/sunos_4.pl
new file mode 100644
index 00000000000..32b3558a5e8
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/POSIX/hints/sunos_4.pl
@@ -0,0 +1,10 @@
+# SunOS 4.1.3 has two extra fields in struct tm. This works around
+# the problem. Other BSD platforms may have similar problems.
+# This state of affairs also persists in glibc2, found
+# on linux systems running libc6.
+# XXX A Configure test is needed.
+
+# Although <unistd.h> is inappropriate in general for SunOS, we need it
+# in POSIX.xs to get the correct prototype for ttyname().
+
+$self->{CCFLAGS} = $Config{ccflags} . ' -DSTRUCT_TM_HASZONE -DI_UNISTD' ;
diff --git a/gnu/usr.bin/perl/ext/POSIX/typemap b/gnu/usr.bin/perl/ext/POSIX/typemap
index 45e0862ff0f..63e41c77bf1 100644
--- a/gnu/usr.bin/perl/ext/POSIX/typemap
+++ b/gnu/usr.bin/perl/ext/POSIX/typemap
@@ -4,6 +4,7 @@ Uid_t T_NV
Time_t T_NV
Gid_t T_NV
Off_t T_NV
+Dev_t T_NV
fd T_IV
speed_t T_IV
tcflag_t T_IV
diff --git a/gnu/usr.bin/perl/ext/SDBM_File/sdbm/dba.c b/gnu/usr.bin/perl/ext/SDBM_File/sdbm/dba.c
index 4f227e52456..05e70c8961c 100644
--- a/gnu/usr.bin/perl/ext/SDBM_File/sdbm/dba.c
+++ b/gnu/usr.bin/perl/ext/SDBM_File/sdbm/dba.c
@@ -4,6 +4,7 @@
#include <stdio.h>
#include <sys/file.h>
+#include "EXTERN.h"
#include "sdbm.h"
char *progname;
diff --git a/gnu/usr.bin/perl/ext/SDBM_File/sdbm/dbd.c b/gnu/usr.bin/perl/ext/SDBM_File/sdbm/dbd.c
index 697a5475977..04ab842e2d6 100644
--- a/gnu/usr.bin/perl/ext/SDBM_File/sdbm/dbd.c
+++ b/gnu/usr.bin/perl/ext/SDBM_File/sdbm/dbd.c
@@ -4,6 +4,7 @@
#include <stdio.h>
#include <sys/file.h>
+#include "EXTERN.h"
#include "sdbm.h"
char *progname;
diff --git a/gnu/usr.bin/perl/ext/SDBM_File/sdbm/dbu.c b/gnu/usr.bin/perl/ext/SDBM_File/sdbm/dbu.c
index 106262872e2..a3c0004da9f 100644
--- a/gnu/usr.bin/perl/ext/SDBM_File/sdbm/dbu.c
+++ b/gnu/usr.bin/perl/ext/SDBM_File/sdbm/dbu.c
@@ -1,6 +1,7 @@
#include <stdio.h>
#include <sys/file.h>
#ifdef SDBM
+#include "EXTERN.h"
#include "sdbm.h"
#else
#include <ndbm.h>
diff --git a/gnu/usr.bin/perl/ext/SDBM_File/sdbm/hash.c b/gnu/usr.bin/perl/ext/SDBM_File/sdbm/hash.c
index eb585ac1025..9b276485993 100644
--- a/gnu/usr.bin/perl/ext/SDBM_File/sdbm/hash.c
+++ b/gnu/usr.bin/perl/ext/SDBM_File/sdbm/hash.c
@@ -8,6 +8,7 @@
*/
#include "config.h"
+#include "EXTERN.h"
#include "sdbm.h"
/*
* polynomial conversion ignoring overflows
@@ -17,9 +18,7 @@
* 65587 even better.
*/
long
-sdbm_hash(str, len)
-register char *str;
-register int len;
+sdbm_hash(register char *str, register int len)
{
register unsigned long n = 0;
diff --git a/gnu/usr.bin/perl/ext/SDBM_File/sdbm/util.c b/gnu/usr.bin/perl/ext/SDBM_File/sdbm/util.c
index 4b03d89f09a..16bd4ac9a5c 100644
--- a/gnu/usr.bin/perl/ext/SDBM_File/sdbm/util.c
+++ b/gnu/usr.bin/perl/ext/SDBM_File/sdbm/util.c
@@ -6,9 +6,7 @@
#endif
void
-oops(s1, s2)
-register char *s1;
-register char *s2;
+oops(register char *s1, register char *s2)
{
extern int errno, sys_nerr;
extern char *sys_errlist[];
@@ -24,8 +22,7 @@ register char *s2;
}
int
-okpage(pag)
-char *pag;
+okpage(char *pag)
{
register unsigned n;
register off;
diff --git a/gnu/usr.bin/perl/ext/Socket/Makefile.PL b/gnu/usr.bin/perl/ext/Socket/Makefile.PL
index 7b9469a728e..3819143ac0e 100644
--- a/gnu/usr.bin/perl/ext/Socket/Makefile.PL
+++ b/gnu/usr.bin/perl/ext/Socket/Makefile.PL
@@ -2,6 +2,6 @@ use ExtUtils::MakeMaker;
WriteMakefile(
NAME => 'Socket',
VERSION_FROM => 'Socket.pm',
- MAN3PODS => ' ', # Pods will be built by installman.
+ MAN3PODS => {}, # Pods will be built by installman.
XSPROTOARG => '-noprototypes', # XXX remove later?
);
diff --git a/gnu/usr.bin/perl/ext/Thread/Makefile.PL b/gnu/usr.bin/perl/ext/Thread/Makefile.PL
new file mode 100644
index 00000000000..e67fbb7e264
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/Thread/Makefile.PL
@@ -0,0 +1,7 @@
+use ExtUtils::MakeMaker;
+WriteMakefile(
+ NAME => 'Thread',
+ VERSION_FROM => 'Thread.pm',
+ MAN3PODS => {}
+ );
+
diff --git a/gnu/usr.bin/perl/ext/Thread/Notes b/gnu/usr.bin/perl/ext/Thread/Notes
new file mode 100644
index 00000000000..1505877ee9d
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/Thread/Notes
@@ -0,0 +1,13 @@
+Should cvcache be per CV (keyed by thread) or per thread (keyed by CV)?
+
+Maybe ought to protect all SVs by a mutex for SvREFCNT_{dec,inc},
+upgrades and so on. Then use SvMUTEX instead of CvMUTEX for CVs.
+On the other hand, people shouldn't expect concurrent operations
+on non-lexicals to be safe anyway.
+
+Probably don't need to bother keeping track of CvOWNER on clones.
+
+Either @_ needs to be made lexical or other arrangments need to be
+made so that some globs (or just *_) are per-thread.
+
+tokenbuf and buf probably ought to be global protected by a global lock.
diff --git a/gnu/usr.bin/perl/ext/Thread/README b/gnu/usr.bin/perl/ext/Thread/README
new file mode 100644
index 00000000000..a6b22fb4ae6
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/Thread/README
@@ -0,0 +1,20 @@
+See the README.threads in the main perl 5.004_xx development
+distribution (x >= 50) for details of how to build and use this.
+If all else fails, read on.
+
+If your version of patch can't create a file from scratch, then you'll
+need to create an empty thread.h manually first. Perl itself will need
+to be built with -DUSE_THREADS yet. If you're using MIT pthreads or
+another threads package that needs pthread_init() to be called, then
+add -DNEED_PTHREAD_INIT. If you're using a threads library that only
+follows one of the old POSIX drafts, then you'll probably need to add
+-DOLD_PTHREADS_API. I haven't tested -DOLD_PTHREADS_API properly yet
+and I think you may still have to tweak a couple of the mutex calls
+to follow the old API.
+
+This extension is copyright Malcolm Beattie 1995-1997 and is freely
+distributable under your choice of the GNU Public License or the
+Artistic License (see the main perl distribution).
+
+Malcolm Beattie
+mbeattie@sable.ox.ac.uk
diff --git a/gnu/usr.bin/perl/ext/Thread/Thread.pm b/gnu/usr.bin/perl/ext/Thread/Thread.pm
new file mode 100644
index 00000000000..c8bca0db713
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/Thread/Thread.pm
@@ -0,0 +1,185 @@
+package Thread;
+require Exporter;
+require DynaLoader;
+use vars qw($VERSION @ISA @EXPORT);
+
+$VERSION = "1.0";
+
+@ISA = qw(Exporter DynaLoader);
+@EXPORT_OK = qw(yield cond_signal cond_broadcast cond_wait async);
+
+=head1 NAME
+
+Thread - multithreading
+
+=head1 SYNOPSIS
+
+ use Thread;
+
+ my $t = new Thread \&start_sub, @start_args;
+
+ $t->join;
+
+ my $tid = Thread->self->tid;
+
+ my $tlist = Thread->list;
+
+ lock($scalar);
+
+ use Thread 'async';
+
+ use Thread 'eval';
+
+=head1 DESCRIPTION
+
+The C<Thread> module provides multithreading support for perl.
+
+=head1 FUNCTIONS
+
+=over 8
+
+=item new \&start_sub
+
+=item new \&start_sub, LIST
+
+C<new> starts a new thread of execution in the referenced subroutine. The
+optional list is passed as parameters to the subroutine. Execution
+continues in both the subroutine and the code after the C<new> call.
+
+C<new Thread> returns a thread object representing the newly created
+thread.
+
+=item lock VARIABLE
+
+C<lock> places a lock on a variable until the lock goes out of scope. If
+the variable is locked by another thread, the C<lock> call will block until
+it's available. C<lock> is recursive, so multiple calls to C<lock> are
+safe--the variable will remain locked until the outermost lock on the
+variable goes out of scope.
+
+Locks on variables only affect C<lock> calls--they do I<not> affect normal
+access to a variable. (Locks on subs are different, and covered in a bit)
+If you really, I<really> want locks to block access, then go ahead and tie
+them to something and manage this yourself. This is done on purpose. While
+managing access to variables is a good thing, perl doesn't force you out of
+its living room...
+
+If a container object, such as a hash or array, is locked, all the elements
+of that container are not locked. For example, if a thread does a C<lock
+@a>, any other thread doing a C<lock($a[12])> won't block.
+
+You may also C<lock> a sub, using C<lock &sub>. Any calls to that sub from
+another thread will block until the lock is released. This behaviour is not
+equvalent to C<use attrs qw(locked)> in the sub. C<use attrs qw(locked)>
+serializes access to a subroutine, but allows different threads
+non-simultaneous access. C<lock &sub>, on the other hand, will not allow
+I<any> other thread access for the duration of the lock.
+
+Finally, C<lock> will traverse up references exactly I<one> level.
+C<lock(\$a)> is equivalent to C<lock($a)>, while C<lock(\\$a)> is not.
+
+=item async BLOCK;
+
+C<async> creates a thread to execute the block immediately following
+it. This block is treated as an anonymous sub, and so must have a
+semi-colon after the closing brace. Like C<new Thread>, C<async> returns a
+thread object.
+
+=item Thread->self
+
+The C<Thread-E<gt>self> function returns a thread object that represents
+the thread making the C<Thread-E<gt>self> call.
+
+=item Thread->list
+
+C<Thread-E<gt>list> returns a list of thread objects for all running and
+finished but un-C<join>ed threads.
+
+=item cond_wait VARIABLE
+
+The C<cond_wait> function takes a B<locked> variable as a parameter,
+unlocks the variable, and blocks until another thread does a C<cond_signal>
+or C<cond_broadcast> for that same locked variable. The variable that
+C<cond_wait> blocked on is relocked after the C<cond_wait> is satisfied.
+If there are multiple threads C<cond_wait>ing on the same variable, all but
+one will reblock waiting to reaquire the lock on the variable. (So if
+you're only using C<cond_wait> for synchronization, give up the lock as
+soon as possible)
+
+=item cond_signal VARIABLE
+
+The C<cond_signal> function takes a locked variable as a parameter and
+unblocks one thread that's C<cond_wait>ing on that variable. If more than
+one thread is blocked in a C<cond_wait> on that variable, only one (and
+which one is indeterminate) will be unblocked.
+
+If there are no threads blocked in a C<cond_wait> on the variable, the
+signal is discarded.
+
+=item cond_broadcast VARIABLE
+
+The C<cond_broadcast> function works similarly to C<cond_wait>.
+C<cond_broadcast>, though, will unblock B<all> the threads that are blocked
+in a C<cond_wait> on the locked variable, rather than only one.
+
+=back
+
+=head1 METHODS
+
+=over 8
+
+=item join
+
+C<join> waits for a thread to end and returns any values the thread exited
+with. C<join> will block until the thread has ended, though it won't block
+if the thread has already terminated.
+
+If the thread being C<join>ed C<die>d, the error it died with will be
+returned at this time. If you don't want the thread performing the C<join>
+to die as well, you should either wrap the C<join> in an C<eval> or use the
+C<eval> thread method instead of C<join>.
+
+=item eval
+
+The C<eval> method wraps an C<eval> around a C<join>, and so waits for a
+thread to exit, passing along any values the thread might have returned.
+Errors, of course, get placed into C<$@>.
+
+=item tid
+
+The C<tid> method returns the tid of a thread. The tid is a monotonically
+increasing integer assigned when a thread is created. The main thread of a
+program will have a tid of zero, while subsequent threads will have tids
+assigned starting with one.
+
+=head1 LIMITATIONS
+
+The sequence number used to assign tids is a simple integer, and no
+checking is done to make sure the tid isn't currently in use. If a program
+creates more than 2^32 - 1 threads in a single run, threads may be assigned
+duplicate tids. This limitation may be lifted in a future version of Perl.
+
+=head1 SEE ALSO
+
+L<attrs>, L<Thread::Queue>, L<Thread::Semaphore>, L<Thread::Specific>.
+
+=cut
+
+#
+# Methods
+#
+
+#
+# Exported functions
+#
+sub async (&) {
+ return new Thread $_[0];
+}
+
+sub eval {
+ return eval { shift->join; };
+}
+
+bootstrap Thread;
+
+1;
diff --git a/gnu/usr.bin/perl/ext/Thread/Thread.xs b/gnu/usr.bin/perl/ext/Thread/Thread.xs
new file mode 100644
index 00000000000..2337e8c3881
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/Thread/Thread.xs
@@ -0,0 +1,662 @@
+#include "EXTERN.h"
+#include "perl.h"
+#include "XSUB.h"
+
+/* Magic signature for Thread's mg_private is "Th" */
+#define Thread_MAGIC_SIGNATURE 0x5468
+
+#ifdef __cplusplus
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+#endif
+#include <fcntl.h>
+
+static int sig_pipe[2];
+
+#ifndef THREAD_RET_TYPE
+#define THREAD_RET_TYPE void *
+#define THREAD_RET_CAST(x) ((THREAD_RET_TYPE) x)
+#endif
+
+static void
+remove_thread(struct perl_thread *t)
+{
+#ifdef USE_THREADS
+ DEBUG_S(WITH_THR(PerlIO_printf(PerlIO_stderr(),
+ "%p: remove_thread %p\n", thr, t)));
+ MUTEX_LOCK(&PL_threads_mutex);
+ MUTEX_DESTROY(&t->mutex);
+ PL_nthreads--;
+ t->prev->next = t->next;
+ t->next->prev = t->prev;
+ COND_BROADCAST(&PL_nthreads_cond);
+ MUTEX_UNLOCK(&PL_threads_mutex);
+#endif
+}
+
+static THREAD_RET_TYPE
+threadstart(void *arg)
+{
+#ifdef USE_THREADS
+#ifdef FAKE_THREADS
+ Thread savethread = thr;
+ LOGOP myop;
+ dSP;
+ I32 oldscope = PL_scopestack_ix;
+ I32 retval;
+ AV *av;
+ int i;
+
+ DEBUG_S(PerlIO_printf(PerlIO_stderr(), "new thread %p starting at %s\n",
+ thr, SvPEEK(TOPs)));
+ thr = (Thread) arg;
+ savemark = TOPMARK;
+ thr->prev = thr->prev_run = savethread;
+ thr->next = savethread->next;
+ thr->next_run = savethread->next_run;
+ savethread->next = savethread->next_run = thr;
+ thr->wait_queue = 0;
+ thr->private = 0;
+
+ /* Now duplicate most of perl_call_sv but with a few twists */
+ PL_op = (OP*)&myop;
+ Zero(PL_op, 1, LOGOP);
+ myop.op_flags = OPf_STACKED;
+ myop.op_next = Nullop;
+ myop.op_flags |= OPf_KNOW;
+ myop.op_flags |= OPf_WANT_LIST;
+ PL_op = pp_entersub(ARGS);
+ DEBUG_S(if (!PL_op)
+ PerlIO_printf(PerlIO_stderr(), "thread starts at Nullop\n"));
+ /*
+ * When this thread is next scheduled, we start in the right
+ * place. When the thread runs off the end of the sub, perl.c
+ * handles things, using savemark to figure out how much of the
+ * stack is the return value for any join.
+ */
+ thr = savethread; /* back to the old thread */
+ return 0;
+#else
+ Thread thr = (Thread) arg;
+ LOGOP myop;
+ djSP;
+ I32 oldmark = TOPMARK;
+ I32 oldscope = PL_scopestack_ix;
+ I32 retval;
+ SV *sv;
+ AV *av = newAV();
+ int i, ret;
+ dJMPENV;
+ DEBUG_S(PerlIO_printf(PerlIO_stderr(), "new thread %p waiting to start\n",
+ thr));
+
+ /* Don't call *anything* requiring dTHR until after SET_THR() */
+ /*
+ * Wait until our creator releases us. If we didn't do this, then
+ * it would be potentially possible for out thread to carry on and
+ * do stuff before our creator fills in our "self" field. For example,
+ * if we went and created another thread which tried to JOIN with us,
+ * then we'd be in a mess.
+ */
+ MUTEX_LOCK(&thr->mutex);
+ MUTEX_UNLOCK(&thr->mutex);
+
+ /*
+ * It's safe to wait until now to set the thread-specific pointer
+ * from our pthread_t structure to our struct perl_thread, since
+ * we're the only thread who can get at it anyway.
+ */
+ SET_THR(thr);
+
+ /* Only now can we use SvPEEK (which calls sv_newmortal which does dTHR) */
+ DEBUG_S(PerlIO_printf(PerlIO_stderr(), "new thread %p starting at %s\n",
+ thr, SvPEEK(TOPs)));
+
+ sv = POPs;
+ PUTBACK;
+ ENTER;
+ SAVETMPS;
+ perl_call_sv(sv, G_ARRAY|G_EVAL);
+ SPAGAIN;
+ retval = SP - (PL_stack_base + oldmark);
+ SP = PL_stack_base + oldmark + 1;
+ if (SvCUR(thr->errsv)) {
+ STRLEN n_a;
+ MUTEX_LOCK(&thr->mutex);
+ thr->flags |= THRf_DID_DIE;
+ MUTEX_UNLOCK(&thr->mutex);
+ av_store(av, 0, &PL_sv_no);
+ av_store(av, 1, newSVsv(thr->errsv));
+ DEBUG_S(PerlIO_printf(PerlIO_stderr(), "%p died: %s\n",
+ thr, SvPV(thr->errsv, n_a)));
+ } else {
+ DEBUG_S(STMT_START {
+ for (i = 1; i <= retval; i++) {
+ PerlIO_printf(PerlIO_stderr(), "%p return[%d] = %s\n",
+ thr, i, SvPEEK(SP[i - 1]));
+ }
+ } STMT_END);
+ av_store(av, 0, &PL_sv_yes);
+ for (i = 1; i <= retval; i++, SP++)
+ sv_setsv(*av_fetch(av, i, TRUE), SvREFCNT_inc(*SP));
+ }
+ FREETMPS;
+ LEAVE;
+
+ finishoff:
+#if 0
+ /* removed for debug */
+ SvREFCNT_dec(PL_curstack);
+#endif
+ SvREFCNT_dec(thr->cvcache);
+ SvREFCNT_dec(thr->threadsv);
+ SvREFCNT_dec(thr->specific);
+ SvREFCNT_dec(thr->errsv);
+ SvREFCNT_dec(thr->errhv);
+
+ /*Safefree(cxstack);*/
+ while (PL_curstackinfo->si_next)
+ PL_curstackinfo = PL_curstackinfo->si_next;
+ while (PL_curstackinfo) {
+ PERL_SI *p = PL_curstackinfo->si_prev;
+ SvREFCNT_dec(PL_curstackinfo->si_stack);
+ Safefree(PL_curstackinfo->si_cxstack);
+ Safefree(PL_curstackinfo);
+ PL_curstackinfo = p;
+ }
+ Safefree(PL_markstack);
+ Safefree(PL_scopestack);
+ Safefree(PL_savestack);
+ Safefree(PL_retstack);
+ Safefree(PL_tmps_stack);
+ Safefree(PL_ofs);
+
+ SvREFCNT_dec(PL_rs);
+ SvREFCNT_dec(PL_nrs);
+ SvREFCNT_dec(PL_statname);
+ Safefree(PL_screamfirst);
+ Safefree(PL_screamnext);
+ Safefree(PL_reg_start_tmp);
+ SvREFCNT_dec(PL_lastscream);
+ SvREFCNT_dec(PL_defoutgv);
+
+ MUTEX_LOCK(&thr->mutex);
+ DEBUG_S(PerlIO_printf(PerlIO_stderr(),
+ "%p: threadstart finishing: state is %u\n",
+ thr, ThrSTATE(thr)));
+ switch (ThrSTATE(thr)) {
+ case THRf_R_JOINABLE:
+ ThrSETSTATE(thr, THRf_ZOMBIE);
+ MUTEX_UNLOCK(&thr->mutex);
+ DEBUG_S(PerlIO_printf(PerlIO_stderr(),
+ "%p: R_JOINABLE thread finished\n", thr));
+ break;
+ case THRf_R_JOINED:
+ ThrSETSTATE(thr, THRf_DEAD);
+ MUTEX_UNLOCK(&thr->mutex);
+ remove_thread(thr);
+ DEBUG_S(PerlIO_printf(PerlIO_stderr(),
+ "%p: R_JOINED thread finished\n", thr));
+ break;
+ case THRf_R_DETACHED:
+ ThrSETSTATE(thr, THRf_DEAD);
+ MUTEX_UNLOCK(&thr->mutex);
+ SvREFCNT_dec(av);
+ DEBUG_S(PerlIO_printf(PerlIO_stderr(),
+ "%p: DETACHED thread finished\n", thr));
+ remove_thread(thr); /* This might trigger main thread to finish */
+ break;
+ default:
+ MUTEX_UNLOCK(&thr->mutex);
+ croak("panic: illegal state %u at end of threadstart", ThrSTATE(thr));
+ /* NOTREACHED */
+ }
+ return THREAD_RET_CAST(av); /* Available for anyone to join with */
+ /* us unless we're detached, in which */
+ /* case noone sees the value anyway. */
+#endif
+#else
+ return THREAD_RET_CAST(NULL);
+#endif
+}
+
+static SV *
+newthread (SV *startsv, AV *initargs, char *classname)
+{
+#ifdef USE_THREADS
+ dSP;
+ Thread savethread;
+ int i;
+ SV *sv;
+ int err;
+#ifndef THREAD_CREATE
+ static pthread_attr_t attr;
+ static int attr_inited = 0;
+ sigset_t fullmask, oldmask;
+#endif
+
+ savethread = thr;
+ thr = new_struct_thread(thr);
+ /* temporarily pretend to be the child thread in case the
+ * XPUSHs() below want to grow the child's stack. This is
+ * safe, since the other thread is not yet created, and we
+ * are the only ones who know about it */
+ SET_THR(thr);
+ SPAGAIN;
+ DEBUG_S(PerlIO_printf(PerlIO_stderr(),
+ "%p: newthread (%p), tid is %u, preparing stack\n",
+ savethread, thr, thr->tid));
+ /* The following pushes the arg list and startsv onto the *new* stack */
+ PUSHMARK(SP);
+ /* Could easily speed up the following greatly */
+ for (i = 0; i <= AvFILL(initargs); i++)
+ XPUSHs(SvREFCNT_inc(*av_fetch(initargs, i, FALSE)));
+ XPUSHs(SvREFCNT_inc(startsv));
+ PUTBACK;
+
+ /* On your marks... */
+ SET_THR(savethread);
+ MUTEX_LOCK(&thr->mutex);
+
+#ifdef THREAD_CREATE
+ err = THREAD_CREATE(thr, threadstart);
+#else
+ /* Get set... */
+ sigfillset(&fullmask);
+ if (sigprocmask(SIG_SETMASK, &fullmask, &oldmask) == -1)
+ croak("panic: sigprocmask");
+ err = 0;
+ if (!attr_inited) {
+ attr_inited = 1;
+#ifdef OLD_PTHREADS_API
+ err = pthread_attr_create(&attr);
+#else
+ err = pthread_attr_init(&attr);
+#endif
+#ifdef OLD_PTHREADS_API
+#ifdef VMS
+/* This is available with the old pthreads API, but only with */
+/* DecThreads (VMS and Digital Unix) */
+ if (err == 0)
+ err = pthread_attr_setdetach_np(&attr, ATTR_JOINABLE);
+#endif
+#else
+ if (err == 0)
+ err = pthread_attr_setdetachstate(&attr, ATTR_JOINABLE);
+#endif
+ }
+ if (err == 0)
+#ifdef OLD_PTHREADS_API
+ err = pthread_create(&thr->self, attr, threadstart, (void*) thr);
+#else
+ err = pthread_create(&thr->self, &attr, threadstart, (void*) thr);
+#endif
+#endif
+ if (err) {
+ MUTEX_UNLOCK(&thr->mutex);
+ DEBUG_S(PerlIO_printf(PerlIO_stderr(),
+ "%p: create of %p failed %d\n",
+ savethread, thr, err));
+ /* Thread creation failed--clean up */
+ SvREFCNT_dec(thr->cvcache);
+ remove_thread(thr);
+ MUTEX_DESTROY(&thr->mutex);
+ for (i = 0; i <= AvFILL(initargs); i++)
+ SvREFCNT_dec(*av_fetch(initargs, i, FALSE));
+ SvREFCNT_dec(startsv);
+ return NULL;
+ }
+
+#ifdef THREAD_POST_CREATE
+ THREAD_POST_CREATE(thr);
+#else
+ if (sigprocmask(SIG_SETMASK, &oldmask, 0))
+ croak("panic: sigprocmask");
+#endif
+
+ sv = newSViv(thr->tid);
+ sv_magic(sv, thr->oursv, '~', 0, 0);
+ SvMAGIC(sv)->mg_private = Thread_MAGIC_SIGNATURE;
+ sv = sv_bless(newRV_noinc(sv), gv_stashpv(classname, TRUE));
+
+ /* Go */
+ MUTEX_UNLOCK(&thr->mutex);
+
+ return sv;
+#else
+ croak("No threads in this perl");
+ return &PL_sv_undef;
+#endif
+}
+
+static Signal_t handle_thread_signal _((int sig));
+
+static Signal_t
+handle_thread_signal(int sig)
+{
+ unsigned char c = (unsigned char) sig;
+ /*
+ * We're not really allowed to call fprintf in a signal handler
+ * so don't be surprised if this isn't robust while debugging
+ * with -DL.
+ */
+ DEBUG_S(PerlIO_printf(PerlIO_stderr(),
+ "handle_thread_signal: got signal %d\n", sig););
+ write(sig_pipe[1], &c, 1);
+}
+
+MODULE = Thread PACKAGE = Thread
+PROTOTYPES: DISABLE
+
+void
+new(classname, startsv, ...)
+ char * classname
+ SV * startsv
+ AV * av = av_make(items - 2, &ST(2));
+ PPCODE:
+ XPUSHs(sv_2mortal(newthread(startsv, av, classname)));
+
+void
+join(t)
+ Thread t
+ AV * av = NO_INIT
+ int i = NO_INIT
+ PPCODE:
+#ifdef USE_THREADS
+ DEBUG_S(PerlIO_printf(PerlIO_stderr(), "%p: joining %p (state %u)\n",
+ thr, t, ThrSTATE(t)););
+ MUTEX_LOCK(&t->mutex);
+ switch (ThrSTATE(t)) {
+ case THRf_R_JOINABLE:
+ case THRf_R_JOINED:
+ ThrSETSTATE(t, THRf_R_JOINED);
+ MUTEX_UNLOCK(&t->mutex);
+ break;
+ case THRf_ZOMBIE:
+ ThrSETSTATE(t, THRf_DEAD);
+ MUTEX_UNLOCK(&t->mutex);
+ remove_thread(t);
+ break;
+ default:
+ MUTEX_UNLOCK(&t->mutex);
+ croak("can't join with thread");
+ /* NOTREACHED */
+ }
+ JOIN(t, &av);
+
+ if (SvTRUE(*av_fetch(av, 0, FALSE))) {
+ /* Could easily speed up the following if necessary */
+ for (i = 1; i <= AvFILL(av); i++)
+ XPUSHs(sv_2mortal(*av_fetch(av, i, FALSE)));
+ } else {
+ STRLEN n_a;
+ char *mess = SvPV(*av_fetch(av, 1, FALSE), n_a);
+ DEBUG_S(PerlIO_printf(PerlIO_stderr(),
+ "%p: join propagating die message: %s\n",
+ thr, mess));
+ croak(mess);
+ }
+#endif
+
+void
+detach(t)
+ Thread t
+ CODE:
+#ifdef USE_THREADS
+ DEBUG_S(PerlIO_printf(PerlIO_stderr(), "%p: detaching %p (state %u)\n",
+ thr, t, ThrSTATE(t)););
+ MUTEX_LOCK(&t->mutex);
+ switch (ThrSTATE(t)) {
+ case THRf_R_JOINABLE:
+ ThrSETSTATE(t, THRf_R_DETACHED);
+ /* fall through */
+ case THRf_R_DETACHED:
+ DETACH(t);
+ MUTEX_UNLOCK(&t->mutex);
+ break;
+ case THRf_ZOMBIE:
+ ThrSETSTATE(t, THRf_DEAD);
+ DETACH(t);
+ MUTEX_UNLOCK(&t->mutex);
+ remove_thread(t);
+ break;
+ default:
+ MUTEX_UNLOCK(&t->mutex);
+ croak("can't detach thread");
+ /* NOTREACHED */
+ }
+#endif
+
+void
+equal(t1, t2)
+ Thread t1
+ Thread t2
+ PPCODE:
+ PUSHs((t1 == t2) ? &PL_sv_yes : &PL_sv_no);
+
+void
+flags(t)
+ Thread t
+ PPCODE:
+#ifdef USE_THREADS
+ PUSHs(sv_2mortal(newSViv(t->flags)));
+#endif
+
+void
+self(classname)
+ char * classname
+ PREINIT:
+ SV *sv;
+ PPCODE:
+#ifdef USE_THREADS
+ sv = newSViv(thr->tid);
+ sv_magic(sv, thr->oursv, '~', 0, 0);
+ SvMAGIC(sv)->mg_private = Thread_MAGIC_SIGNATURE;
+ PUSHs(sv_2mortal(sv_bless(newRV_noinc(sv),
+ gv_stashpv(classname, TRUE))));
+#endif
+
+U32
+tid(t)
+ Thread t
+ CODE:
+#ifdef USE_THREADS
+ MUTEX_LOCK(&t->mutex);
+ RETVAL = t->tid;
+ MUTEX_UNLOCK(&t->mutex);
+#else
+ RETVAL = 0;
+#endif
+ OUTPUT:
+ RETVAL
+
+void
+DESTROY(t)
+ SV * t
+ PPCODE:
+ PUSHs(&PL_sv_yes);
+
+void
+yield()
+ CODE:
+{
+#ifdef USE_THREADS
+ YIELD;
+#endif
+}
+
+void
+cond_wait(sv)
+ SV * sv
+ MAGIC * mg = NO_INIT
+CODE:
+#ifdef USE_THREADS
+ if (SvROK(sv))
+ sv = SvRV(sv);
+
+ mg = condpair_magic(sv);
+ DEBUG_S(PerlIO_printf(PerlIO_stderr(), "%p: cond_wait %p\n", thr, sv));
+ MUTEX_LOCK(MgMUTEXP(mg));
+ if (MgOWNER(mg) != thr) {
+ MUTEX_UNLOCK(MgMUTEXP(mg));
+ croak("cond_wait for lock that we don't own\n");
+ }
+ MgOWNER(mg) = 0;
+ COND_SIGNAL(MgOWNERCONDP(mg));
+ COND_WAIT(MgCONDP(mg), MgMUTEXP(mg));
+ while (MgOWNER(mg))
+ COND_WAIT(MgOWNERCONDP(mg), MgMUTEXP(mg));
+ MgOWNER(mg) = thr;
+ MUTEX_UNLOCK(MgMUTEXP(mg));
+#endif
+
+void
+cond_signal(sv)
+ SV * sv
+ MAGIC * mg = NO_INIT
+CODE:
+#ifdef USE_THREADS
+ if (SvROK(sv))
+ sv = SvRV(sv);
+
+ mg = condpair_magic(sv);
+ DEBUG_S(PerlIO_printf(PerlIO_stderr(), "%p: cond_signal %p\n",thr,sv));
+ MUTEX_LOCK(MgMUTEXP(mg));
+ if (MgOWNER(mg) != thr) {
+ MUTEX_UNLOCK(MgMUTEXP(mg));
+ croak("cond_signal for lock that we don't own\n");
+ }
+ COND_SIGNAL(MgCONDP(mg));
+ MUTEX_UNLOCK(MgMUTEXP(mg));
+#endif
+
+void
+cond_broadcast(sv)
+ SV * sv
+ MAGIC * mg = NO_INIT
+CODE:
+#ifdef USE_THREADS
+ if (SvROK(sv))
+ sv = SvRV(sv);
+
+ mg = condpair_magic(sv);
+ DEBUG_S(PerlIO_printf(PerlIO_stderr(), "%p: cond_broadcast %p\n",
+ thr, sv));
+ MUTEX_LOCK(MgMUTEXP(mg));
+ if (MgOWNER(mg) != thr) {
+ MUTEX_UNLOCK(MgMUTEXP(mg));
+ croak("cond_broadcast for lock that we don't own\n");
+ }
+ COND_BROADCAST(MgCONDP(mg));
+ MUTEX_UNLOCK(MgMUTEXP(mg));
+#endif
+
+void
+list(classname)
+ char * classname
+ PREINIT:
+ Thread t;
+ AV * av;
+ SV ** svp;
+ int n = 0;
+ PPCODE:
+#ifdef USE_THREADS
+ av = newAV();
+ /*
+ * Iterate until we have enough dynamic storage for all threads.
+ * We mustn't do any allocation while holding threads_mutex though.
+ */
+ MUTEX_LOCK(&PL_threads_mutex);
+ do {
+ n = PL_nthreads;
+ MUTEX_UNLOCK(&PL_threads_mutex);
+ if (AvFILL(av) < n - 1) {
+ int i = AvFILL(av);
+ for (i = AvFILL(av); i < n - 1; i++) {
+ SV *sv = newSViv(0); /* fill in tid later */
+ sv_magic(sv, 0, '~', 0, 0); /* fill in other magic later */
+ av_push(av, sv_bless(newRV_noinc(sv),
+ gv_stashpv(classname, TRUE)));
+
+ }
+ }
+ MUTEX_LOCK(&PL_threads_mutex);
+ } while (n < PL_nthreads);
+ n = PL_nthreads; /* Get the final correct value */
+
+ /*
+ * At this point, there's enough room to fill in av.
+ * Note that we are holding threads_mutex so the list
+ * won't change out from under us but all the remaining
+ * processing is "fast" (no blocking, malloc etc.)
+ */
+ t = thr;
+ svp = AvARRAY(av);
+ do {
+ SV *sv = (SV*)SvRV(*svp);
+ sv_setiv(sv, t->tid);
+ SvMAGIC(sv)->mg_obj = SvREFCNT_inc(t->oursv);
+ SvMAGIC(sv)->mg_flags |= MGf_REFCOUNTED;
+ SvMAGIC(sv)->mg_private = Thread_MAGIC_SIGNATURE;
+ t = t->next;
+ svp++;
+ } while (t != thr);
+ /* */
+ MUTEX_UNLOCK(&PL_threads_mutex);
+ /* Truncate any unneeded slots in av */
+ av_fill(av, n - 1);
+ /* Finally, push all the new objects onto the stack and drop av */
+ EXTEND(SP, n);
+ for (svp = AvARRAY(av); n > 0; n--, svp++)
+ PUSHs(*svp);
+ (void)sv_2mortal((SV*)av);
+#endif
+
+
+MODULE = Thread PACKAGE = Thread::Signal
+
+void
+kill_sighandler_thread()
+ PPCODE:
+ write(sig_pipe[1], "\0", 1);
+ PUSHs(&PL_sv_yes);
+
+void
+init_thread_signals()
+ PPCODE:
+ PL_sighandlerp = handle_thread_signal;
+ if (pipe(sig_pipe) == -1)
+ XSRETURN_UNDEF;
+ PUSHs(&PL_sv_yes);
+
+void
+await_signal()
+ PREINIT:
+ unsigned char c;
+ SSize_t ret;
+ CODE:
+ do {
+ ret = read(sig_pipe[0], &c, 1);
+ } while (ret == -1 && errno == EINTR);
+ if (ret == -1)
+ croak("panic: await_signal");
+ ST(0) = sv_newmortal();
+ if (ret)
+ sv_setsv(ST(0), c ? psig_ptr[c] : &PL_sv_no);
+ DEBUG_S(PerlIO_printf(PerlIO_stderr(),
+ "await_signal returning %s\n", SvPEEK(ST(0))););
+
+MODULE = Thread PACKAGE = Thread::Specific
+
+void
+data(classname = "Thread::Specific")
+ char * classname
+ PPCODE:
+#ifdef USE_THREADS
+ if (AvFILL(thr->specific) == -1) {
+ GV *gv = gv_fetchpv("Thread::Specific::FIELDS", TRUE, SVt_PVHV);
+ av_store(thr->specific, 0, newRV((SV*)GvHV(gv)));
+ }
+ XPUSHs(sv_bless(newRV((SV*)thr->specific),gv_stashpv(classname,TRUE)));
+#endif
diff --git a/gnu/usr.bin/perl/ext/Thread/Thread/Queue.pm b/gnu/usr.bin/perl/ext/Thread/Thread/Queue.pm
new file mode 100644
index 00000000000..6d5f82be344
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/Thread/Thread/Queue.pm
@@ -0,0 +1,99 @@
+package Thread::Queue;
+use Thread qw(cond_wait cond_broadcast);
+
+=head1 NAME
+
+Thread::Queue - thread-safe queues
+
+=head1 SYNOPSIS
+
+ use Thread::Queue;
+ my $q = new Thread::Queue;
+ $q->enqueue("foo", "bar");
+ my $foo = $q->dequeue; # The "bar" is still in the queue.
+ my $foo = $q->dequeue_nb; # returns "bar", or undef if the queue was
+ # empty
+ my $left = $q->pending; # returns the number of items still in the queue
+
+=head1 DESCRIPTION
+
+A queue, as implemented by C<Thread::Queue> is a thread-safe data structure
+much like a list. Any number of threads can safely add elements to the end
+of the list, or remove elements from the head of the list. (Queues don't
+permit adding or removing elements from the middle of the list)
+
+=head1 FUNCTIONS AND METHODS
+
+=over 8
+
+=item new
+
+The C<new> function creates a new empty queue.
+
+=item enqueue LIST
+
+The C<enqueue> method adds a list of scalars on to the end of the queue.
+The queue will grow as needed to accomodate the list.
+
+=item dequeue
+
+The C<dequeue> method removes a scalar from the head of the queue and
+returns it. If the queue is currently empty, C<dequeue> will block the
+thread until another thread C<enqueue>s a scalar.
+
+=item dequeue_nb
+
+The C<dequeue_nb> method, like the C<dequeue> method, removes a scalar from
+the head of the queue and returns it. Unlike C<dequeue>, though,
+C<dequeue_nb> won't block if the queue is empty, instead returning
+C<undef>.
+
+=item pending
+
+The C<pending> method returns the number of items still in the queue. (If
+there can be multiple readers on the queue it's best to lock the queue
+before checking to make sure that it stays in a consistent state)
+
+=back
+
+=head1 SEE ALSO
+
+L<Thread>
+
+=cut
+
+sub new {
+ my $class = shift;
+ return bless [@_], $class;
+}
+
+sub dequeue {
+ use attrs qw(locked method);
+ my $q = shift;
+ cond_wait $q until @$q;
+ return shift @$q;
+}
+
+sub dequeue_nb {
+ use attrs qw(locked method);
+ my $q = shift;
+ if (@$q) {
+ return shift @$q;
+ } else {
+ return undef;
+ }
+}
+
+sub enqueue {
+ use attrs qw(locked method);
+ my $q = shift;
+ push(@$q, @_) and cond_broadcast $q;
+}
+
+sub pending {
+ use attrs qw(locked method);
+ my $q = shift;
+ return scalar(@$q);
+}
+
+1;
diff --git a/gnu/usr.bin/perl/ext/Thread/Thread/Semaphore.pm b/gnu/usr.bin/perl/ext/Thread/Thread/Semaphore.pm
new file mode 100644
index 00000000000..915808cbed7
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/Thread/Thread/Semaphore.pm
@@ -0,0 +1,87 @@
+package Thread::Semaphore;
+use Thread qw(cond_wait cond_broadcast);
+
+=head1 NAME
+
+Thread::Semaphore - thread-safe semaphores
+
+=head1 SYNOPSIS
+
+ use Thread::Semaphore;
+ my $s = new Thread::Semaphore;
+ $s->up; # Also known as the semaphore V -operation.
+ # The guarded section is here
+ $s->down; # Also known as the semaphore P -operation.
+
+ # The default semaphore value is 1.
+ my $s = new Thread::Semaphore($initial_value);
+ $s->up($up_value);
+ $s->down($up_value);
+
+=head1 DESCRIPTION
+
+Semaphores provide a mechanism to regulate access to resources. Semaphores,
+unlike locks, aren't tied to particular scalars, and so may be used to
+control access to anything you care to use them for.
+
+Semaphores don't limit their values to zero or one, so they can be used to
+control access to some resource that may have more than one of. (For
+example, filehandles) Increment and decrement amounts aren't fixed at one
+either, so threads can reserve or return multiple resources at once.
+
+=head1 FUNCTIONS AND METHODS
+
+=over 8
+
+=item new
+
+=item new NUMBER
+
+C<new> creates a new semaphore, and initializes its count to the passed
+number. If no number is passed, the semaphore's count is set to one.
+
+=item down
+
+=item down NUMBER
+
+The C<down> method decreases the semaphore's count by the specified number,
+or one if no number has been specified. If the semaphore's count would drop
+below zero, this method will block until such time that the semaphore's
+count is equal to or larger than the amount you're C<down>ing the
+semaphore's count by.
+
+=item up
+
+=item up NUMBER
+
+The C<up> method increases the semaphore's count by the number specified,
+or one if no number's been specified. This will unblock any thread blocked
+trying to C<down> the semaphore if the C<up> raises the semaphore count
+above what the C<down>s are trying to decrement it by.
+
+=back
+
+=cut
+
+sub new {
+ my $class = shift;
+ my $val = @_ ? shift : 1;
+ bless \$val, $class;
+}
+
+sub down {
+ use attrs qw(locked method);
+ my $s = shift;
+ my $inc = @_ ? shift : 1;
+ cond_wait $s until $$s >= $inc;
+ $$s -= $inc;
+}
+
+sub up {
+ use attrs qw(locked method);
+ my $s = shift;
+ my $inc = @_ ? shift : 1;
+ ($$s += $inc) > 0 and cond_broadcast $s;
+}
+
+1;
diff --git a/gnu/usr.bin/perl/ext/Thread/Thread/Signal.pm b/gnu/usr.bin/perl/ext/Thread/Thread/Signal.pm
new file mode 100644
index 00000000000..f5f03db8a82
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/Thread/Thread/Signal.pm
@@ -0,0 +1,50 @@
+package Thread::Signal;
+use Thread qw(async);
+
+=head1 NAME
+
+Thread::Signal - Start a thread which runs signal handlers reliably
+
+=head1 SYNOPSIS
+
+ use Thread::Signal;
+
+ $SIG{HUP} = \&some_handler;
+
+=head1 DESCRIPTION
+
+The C<Thread::Signal> module starts up a special signal handler thread.
+All signals to the process are delivered to it and it runs the
+associated C<$SIG{FOO}> handlers for them. Without this module,
+signals arriving at inopportune moments (such as when perl's internals
+are in the middle of updating critical structures) cause the perl
+code of the handler to be run unsafely which can cause memory corruption
+or worse.
+
+=head1 BUGS
+
+This module changes the semantics of signal handling slightly in that
+the signal handler is run separately from the main thread (and in
+parallel with it). This means that tricks such as calling C<die> from
+a signal handler behave differently (and, in particular, can't be
+used to exit directly from a system call).
+
+=cut
+
+if (!init_thread_signals()) {
+ require Carp;
+ Carp::croak("init_thread_signals failed: $!");
+}
+
+async {
+ my $sig;
+ while ($sig = await_signal()) {
+ &$sig();
+ }
+};
+
+END {
+ kill_sighandler_thread();
+}
+
+1;
diff --git a/gnu/usr.bin/perl/ext/Thread/Thread/Specific.pm b/gnu/usr.bin/perl/ext/Thread/Thread/Specific.pm
new file mode 100644
index 00000000000..9c8a66a9e6a
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/Thread/Thread/Specific.pm
@@ -0,0 +1,29 @@
+package Thread::Specific;
+
+=head1 NAME
+
+Thread::Specific - thread-specific keys
+
+=head1 SYNOPSIS
+
+ use Thread::Specific;
+ my $k = key_create Thread::Specific;
+
+=head1 DESCRIPTION
+
+C<key_create> returns a unique thread-specific key.
+
+=cut
+
+sub import {
+ use attrs qw(locked method);
+ require fields;
+ fields->import(@_);
+}
+
+sub key_create {
+ use attrs qw(locked method);
+ return ++$FIELDS{__MAX__};
+}
+
+1;
diff --git a/gnu/usr.bin/perl/ext/Thread/create.t b/gnu/usr.bin/perl/ext/Thread/create.t
new file mode 100644
index 00000000000..df8fc77ba34
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/Thread/create.t
@@ -0,0 +1,26 @@
+use Thread 'async';
+use Config;
+use Tie::Hash;
+
+sub start_here {
+ my $i;
+ print "In start_here with args: @_\n";
+ for ($i = 1; $i <= 5; $i++) {
+ print "start_here: $i\n";
+ sleep 1;
+ }
+}
+
+async {
+ tie my(%h), 'Tie::StdHash';
+ %h = %Config;
+ print "running on $h{archname}\n";
+};
+
+print "Starting new thread now\n";
+$t = new Thread \&start_here, qw(foo bar baz);
+print "Started thread $t\n";
+for ($count = 1; $count <= 5; $count++) {
+ print "main: $count\n";
+ sleep 1;
+}
diff --git a/gnu/usr.bin/perl/ext/Thread/die.t b/gnu/usr.bin/perl/ext/Thread/die.t
new file mode 100644
index 00000000000..623940579ff
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/Thread/die.t
@@ -0,0 +1,16 @@
+use Thread 'async';
+
+$t = async {
+ print "here\n";
+ die "success";
+ print "shouldn't get here\n";
+};
+
+sleep 1;
+print "joining...\n";
+eval { @r = $t->join; };
+if ($@) {
+ print "thread died with message: $@";
+} else {
+ print "thread failed to die successfully\n";
+}
diff --git a/gnu/usr.bin/perl/ext/Thread/die2.t b/gnu/usr.bin/perl/ext/Thread/die2.t
new file mode 100644
index 00000000000..f6b695520f9
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/Thread/die2.t
@@ -0,0 +1,16 @@
+use Thread 'async';
+
+$t = async {
+ sleep 1;
+ print "here\n";
+ die "success if preceded by 'thread died...'";
+ print "shouldn't get here\n";
+};
+
+print "joining...\n";
+@r = eval { $t->join; };
+if ($@) {
+ print "thread died with message: $@";
+} else {
+ print "thread failed to die successfully\n";
+}
diff --git a/gnu/usr.bin/perl/ext/Thread/io.t b/gnu/usr.bin/perl/ext/Thread/io.t
new file mode 100644
index 00000000000..6012008ef57
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/Thread/io.t
@@ -0,0 +1,39 @@
+use Thread;
+
+sub counter {
+$count = 10;
+while ($count--) {
+ sleep 1;
+ print "ping $count\n";
+}
+}
+
+sub reader {
+ my $line;
+ while ($line = <STDIN>) {
+ print "reader: $line";
+ }
+ print "End of input in reader\n";
+ return 0;
+}
+
+print <<'EOT';
+This test starts up a thread to read and echo whatever is typed on
+the keyboard/stdin, line by line, while the main thread counts down
+to zero. The test stays running until both the main thread has
+finished counting down and the I/O thread has seen end-of-file on
+the terminal/stdin.
+EOT
+
+$r = new Thread \&counter;
+
+&reader;
+
+__END__
+
+
+$count = 10;
+while ($count--) {
+ sleep 1;
+ print "ping $count\n";
+}
diff --git a/gnu/usr.bin/perl/ext/Thread/join.t b/gnu/usr.bin/perl/ext/Thread/join.t
new file mode 100644
index 00000000000..cba2c1cf567
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/Thread/join.t
@@ -0,0 +1,11 @@
+use Thread;
+sub foo {
+ print "In foo with args: @_\n";
+ return (7, 8, 9);
+}
+
+print "Starting thread\n";
+$t = new Thread \&foo, qw(foo bar baz);
+print "Joining with $t\n";
+@results = $t->join();
+print "Joining returned ", scalar(@results), " values: @results\n";
diff --git a/gnu/usr.bin/perl/ext/Thread/join2.t b/gnu/usr.bin/perl/ext/Thread/join2.t
new file mode 100644
index 00000000000..99b43a54dc5
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/Thread/join2.t
@@ -0,0 +1,12 @@
+use Thread;
+sub foo {
+ print "In foo with args: @_\n";
+ return (7, 8, 9);
+}
+
+print "Starting thread\n";
+$t = new Thread \&foo, qw(foo bar baz);
+sleep 2;
+print "Joining with $t\n";
+@results = $t->join();
+print "Joining returned @results\n";
diff --git a/gnu/usr.bin/perl/ext/Thread/list.t b/gnu/usr.bin/perl/ext/Thread/list.t
new file mode 100644
index 00000000000..f13f4b266a4
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/Thread/list.t
@@ -0,0 +1,30 @@
+use Thread qw(async);
+use Thread::Semaphore;
+
+my $sem = Thread::Semaphore->new(0);
+
+$nthreads = 4;
+
+for (my $i = 0; $i < $nthreads; $i++) {
+ async {
+ my $tid = Thread->self->tid;
+ print "thread $tid started...\n";
+ $sem->down;
+ print "thread $tid finishing\n";
+ };
+}
+
+print "main: started $nthreads threads\n";
+sleep 2;
+
+my @list = Thread->list;
+printf "main: Thread->list returned %d threads\n", scalar(@list);
+
+foreach my $t (@list) {
+ print "inspecting thread $t...\n";
+ print "...deref is $$t\n";
+ print "...flags = ", $t->flags, "\n";
+ print "...tid = ", $t->tid, "\n";
+}
+print "main thread telling workers to finish off...\n";
+$sem->up($nthreads);
diff --git a/gnu/usr.bin/perl/ext/Thread/lock.t b/gnu/usr.bin/perl/ext/Thread/lock.t
new file mode 100644
index 00000000000..fefb1298797
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/Thread/lock.t
@@ -0,0 +1,27 @@
+use Thread;
+
+$level = 0;
+
+sub worker
+{
+ my $num = shift;
+ my $i;
+ print "thread $num starting\n";
+ for ($i = 1; $i <= 20; $i++) {
+ print "thread $num iteration $i\n";
+ select(undef, undef, undef, rand(10)/100);
+ {
+ lock($lock);
+ warn "thread $num saw non-zero level = $level\n" if $level;
+ $level++;
+ print "thread $num has lock\n";
+ select(undef, undef, undef, rand(10)/100);
+ $level--;
+ }
+ print "thread $num released lock\n";
+ }
+}
+
+for ($t = 1; $t <= 5; $t++) {
+ new Thread \&worker, $t;
+}
diff --git a/gnu/usr.bin/perl/ext/Thread/queue.t b/gnu/usr.bin/perl/ext/Thread/queue.t
new file mode 100644
index 00000000000..4672ba6ee74
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/Thread/queue.t
@@ -0,0 +1,36 @@
+use Thread;
+use Thread::Queue;
+
+$q = new Thread::Queue;
+
+sub reader {
+ my $tid = Thread->self->tid;
+ my $i = 0;
+ while (1) {
+ $i++;
+ print "reader (tid $tid): waiting for element $i...\n";
+ my $el = $q->dequeue;
+ print "reader (tid $tid): dequeued element $i: value $el\n";
+ select(undef, undef, undef, rand(2));
+ if ($el == -1) {
+ # end marker
+ print "reader (tid $tid) returning\n";
+ return;
+ }
+ }
+}
+
+my $nthreads = 3;
+
+for (my $i = 0; $i < $nthreads; $i++) {
+ Thread->new(\&reader, $i);
+}
+
+for (my $i = 1; $i <= 10; $i++) {
+ my $el = int(rand(100));
+ select(undef, undef, undef, rand(2));
+ print "writer: enqueuing value $el\n";
+ $q->enqueue($el);
+}
+
+$q->enqueue((-1) x $nthreads); # one end marker for each thread
diff --git a/gnu/usr.bin/perl/ext/Thread/specific.t b/gnu/usr.bin/perl/ext/Thread/specific.t
new file mode 100644
index 00000000000..da130b1d64c
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/Thread/specific.t
@@ -0,0 +1,17 @@
+use Thread;
+
+use Thread::Specific qw(foo);
+
+sub count {
+ my $tid = Thread->self->tid;
+ my Thread::Specific $tsd = Thread::Specific::data;
+ for (my $i = 0; $i < 5; $i++) {
+ $tsd->{foo} = $i;
+ print "thread $tid count: $tsd->{foo}\n";
+ select(undef, undef, undef, rand(2));
+ }
+};
+
+for(my $t = 0; $t < 5; $t++) {
+ new Thread \&count;
+}
diff --git a/gnu/usr.bin/perl/ext/Thread/sync.t b/gnu/usr.bin/perl/ext/Thread/sync.t
new file mode 100644
index 00000000000..9c2e5897da5
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/Thread/sync.t
@@ -0,0 +1,61 @@
+use Thread;
+
+$level = 0;
+
+sub single_file {
+ use attrs 'locked';
+ my $arg = shift;
+ $level++;
+ print "Level $level for $arg\n";
+ print "(something is wrong)\n" if $level < 0 || $level > 1;
+ sleep 1;
+ $level--;
+ print "Back to level $level\n";
+}
+
+sub start_bar {
+ my $i;
+ print "start bar\n";
+ for $i (1..3) {
+ print "bar $i\n";
+ single_file("bar $i");
+ sleep 1 if rand > 0.5;
+ }
+ print "end bar\n";
+ return 1;
+}
+
+sub start_foo {
+ my $i;
+ print "start foo\n";
+ for $i (1..3) {
+ print "foo $i\n";
+ single_file("foo $i");
+ sleep 1 if rand > 0.5;
+ }
+ print "end foo\n";
+ return 1;
+}
+
+sub start_baz {
+ my $i;
+ print "start baz\n";
+ for $i (1..3) {
+ print "baz $i\n";
+ single_file("baz $i");
+ sleep 1 if rand > 0.5;
+ }
+ print "end baz\n";
+ return 1;
+}
+
+$| = 1;
+srand($$^$^T);
+
+$foo = new Thread \&start_foo;
+$bar = new Thread \&start_bar;
+$baz = new Thread \&start_baz;
+$foo->join();
+$bar->join();
+$baz->join();
+print "main: threads finished, exiting\n";
diff --git a/gnu/usr.bin/perl/ext/Thread/sync2.t b/gnu/usr.bin/perl/ext/Thread/sync2.t
new file mode 100644
index 00000000000..0901da46a0a
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/Thread/sync2.t
@@ -0,0 +1,69 @@
+use Thread;
+
+$global = undef;
+
+sub single_file {
+ use attrs 'locked';
+ my $who = shift;
+ my $i;
+
+ print "Uh oh: $who entered while locked by $global\n" if $global;
+ $global = $who;
+ print "[";
+ for ($i = 0; $i < int(10 * rand); $i++) {
+ print $who;
+ select(undef, undef, undef, 0.1);
+ }
+ print "]";
+ $global = undef;
+}
+
+sub start_a {
+ my ($i, $j);
+ for ($j = 0; $j < 10; $j++) {
+ single_file("A");
+ for ($i = 0; $i < int(10 * rand); $i++) {
+ print "a";
+ select(undef, undef, undef, 0.1);
+ }
+ }
+}
+
+sub start_b {
+ my ($i, $j);
+ for ($j = 0; $j < 10; $j++) {
+ single_file("B");
+ for ($i = 0; $i < int(10 * rand); $i++) {
+ print "b";
+ select(undef, undef, undef, 0.1);
+ }
+ }
+}
+
+sub start_c {
+ my ($i, $j);
+ for ($j = 0; $j < 10; $j++) {
+ single_file("C");
+ for ($i = 0; $i < int(10 * rand); $i++) {
+ print "c";
+ select(undef, undef, undef, 0.1);
+ }
+ }
+}
+
+$| = 1;
+srand($$^$^T);
+
+print <<'EOT';
+Each pair of square brackets [...] should contain a repeated sequence of
+a unique upper case letter. Lower case letters may appear randomly both
+in and out of the brackets.
+EOT
+$foo = new Thread \&start_a;
+$bar = new Thread \&start_b;
+$baz = new Thread \&start_c;
+print "\nmain: joining...\n";
+#$foo->join;
+#$bar->join;
+#$baz->join;
+print "\ndone\n";
diff --git a/gnu/usr.bin/perl/ext/Thread/typemap b/gnu/usr.bin/perl/ext/Thread/typemap
new file mode 100644
index 00000000000..21eb6c32409
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/Thread/typemap
@@ -0,0 +1,24 @@
+Thread T_XSCPTR
+
+INPUT
+T_XSCPTR
+ STMT_START {
+ MAGIC *mg;
+ SV *sv = ($arg);
+
+ if (!sv_isobject(sv))
+ croak(\"$var is not an object\");
+ sv = (SV*)SvRV(sv);
+ if (!SvRMAGICAL(sv) || !(mg = mg_find(sv, '~'))
+ || mg->mg_private != ${ntype}_MAGIC_SIGNATURE)
+ croak(\"XSUB ${func_name}: $var is a forged ${ntype} object\");
+ $var = ($type) SvPVX(mg->mg_obj);
+ DEBUG_S(PerlIO_printf(PerlIO_stderr(),
+ \"XSUB ${func_name}: %p\\n\", $var);)
+ } STMT_END
+T_IVREF
+ if (SvROK($arg))
+ $var = ($type) SvIV((SV*)SvRV($arg));
+ else
+ croak(\"$var is not a reference\")
+
diff --git a/gnu/usr.bin/perl/ext/Thread/unsync.t b/gnu/usr.bin/perl/ext/Thread/unsync.t
new file mode 100644
index 00000000000..f0a51efe1f7
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/Thread/unsync.t
@@ -0,0 +1,37 @@
+use Thread;
+
+$| = 1;
+
+if (@ARGV) {
+ srand($ARGV[0]);
+} else {
+ my $seed = $$ ^ $^T;
+ print "Randomising to $seed\n";
+ srand($seed);
+}
+
+sub whoami {
+ my ($depth, $a, $b, $c) = @_;
+ my $i;
+ print "whoami ($depth): $a $b $c\n";
+ sleep 1;
+ whoami($depth - 1, $a, $b, $c) if $depth > 0;
+}
+
+sub start_foo {
+ my $r = 3 + int(10 * rand);
+ print "start_foo: r is $r\n";
+ whoami($r, "start_foo", "foo1", "foo2");
+ print "start_foo: finished\n";
+}
+
+sub start_bar {
+ my $r = 3 + int(10 * rand);
+ print "start_bar: r is $r\n";
+ whoami($r, "start_bar", "bar1", "bar2");
+ print "start_bar: finished\n";
+}
+
+$foo = new Thread \&start_foo;
+$bar = new Thread \&start_bar;
+print "main: exiting\n";
diff --git a/gnu/usr.bin/perl/ext/Thread/unsync2.t b/gnu/usr.bin/perl/ext/Thread/unsync2.t
new file mode 100644
index 00000000000..fb955ac31e1
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/Thread/unsync2.t
@@ -0,0 +1,36 @@
+use Thread;
+
+$| = 1;
+
+srand($$^$^T);
+
+sub printargs {
+ my $thread = shift;
+ my $arg;
+ my $i;
+ while ($arg = shift) {
+ my $delay = int(rand(500));
+ $i++;
+ print "$thread arg $i is $arg\n";
+ 1 while $delay--;
+ }
+}
+
+sub start_thread {
+ my $thread = shift;
+ my $count = 10;
+ while ($count--) {
+ my(@args) = ($thread) x int(rand(10));
+ print "$thread $count calling printargs @args\n";
+ printargs($thread, @args);
+ }
+}
+
+new Thread (\&start_thread, "A");
+new Thread (\&start_thread, "B");
+#new Thread (\&start_thread, "C");
+#new Thread (\&start_thread, "D");
+#new Thread (\&start_thread, "E");
+#new Thread (\&start_thread, "F");
+
+print "main: exiting\n";
diff --git a/gnu/usr.bin/perl/ext/Thread/unsync3.t b/gnu/usr.bin/perl/ext/Thread/unsync3.t
new file mode 100644
index 00000000000..e03e9c8af10
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/Thread/unsync3.t
@@ -0,0 +1,50 @@
+use Thread;
+
+$| = 1;
+
+srand($$^$^T);
+
+sub whoami {
+ my $thread = shift;
+ print $thread;
+}
+
+sub uppercase {
+ my $count = 100;
+ while ($count--) {
+ my $i = int(rand(1000));
+ 1 while $i--;
+ print "A";
+ $i = int(rand(1000));
+ 1 while $i--;
+ whoami("B");
+ }
+}
+
+sub lowercase {
+ my $count = 100;
+ while ($count--) {
+ my $i = int(rand(1000));
+ 1 while $i--;
+ print "x";
+ $i = int(rand(1000));
+ 1 while $i--;
+ whoami("y");
+ }
+}
+
+sub numbers {
+ my $count = 100;
+ while ($count--) {
+ my $i = int(rand(1000));
+ 1 while $i--;
+ print 1;
+ $i = int(rand(1000));
+ 1 while $i--;
+ whoami(2);
+ }
+}
+
+new Thread \&numbers;
+new Thread \&uppercase;
+new Thread \&lowercase;
diff --git a/gnu/usr.bin/perl/ext/Thread/unsync4.t b/gnu/usr.bin/perl/ext/Thread/unsync4.t
new file mode 100644
index 00000000000..494ad2be920
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/Thread/unsync4.t
@@ -0,0 +1,38 @@
+use Thread;
+
+$| = 1;
+
+srand($$^$^T);
+
+sub printargs {
+ my(@copyargs) = @_;
+ my $thread = shift @copyargs;
+ my $arg;
+ my $i;
+ while ($arg = shift @copyargs) {
+ my $delay = int(rand(500));
+ $i++;
+ print "$thread arg $i is $arg\n";
+ 1 while $delay--;
+ }
+}
+
+sub start_thread {
+ my(@threadargs) = @_;
+ my $thread = $threadargs[0];
+ my $count = 10;
+ while ($count--) {
+ my(@args) = ($thread) x int(rand(10));
+ print "$thread $count calling printargs @args\n";
+ printargs($thread, @args);
+ }
+}
+
+new Thread (\&start_thread, "A");
+new Thread (\&start_thread, "B");
+new Thread (\&start_thread, "C");
+new Thread (\&start_thread, "D");
+new Thread (\&start_thread, "E");
+new Thread (\&start_thread, "F");
+
+print "main: exiting\n";
diff --git a/gnu/usr.bin/perl/ext/attrs/Makefile.PL b/gnu/usr.bin/perl/ext/attrs/Makefile.PL
new file mode 100644
index 00000000000..86ed3f39355
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/attrs/Makefile.PL
@@ -0,0 +1,7 @@
+use ExtUtils::MakeMaker;
+WriteMakefile(
+ NAME => 'attrs',
+ VERSION_FROM => 'attrs.pm',
+ MAN3PODS => {}, # Pods will be built by installman.
+ XSPROTOARG => '-noprototypes'
+);
diff --git a/gnu/usr.bin/perl/ext/attrs/attrs.pm b/gnu/usr.bin/perl/ext/attrs/attrs.pm
new file mode 100644
index 00000000000..fe2bf356e4f
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/attrs/attrs.pm
@@ -0,0 +1,55 @@
+package attrs;
+require DynaLoader;
+use vars '@ISA';
+@ISA = 'DynaLoader';
+
+use vars qw($VERSION);
+$VERSION = "1.0";
+
+=head1 NAME
+
+attrs - set/get attributes of a subroutine
+
+=head1 SYNOPSIS
+
+ sub foo {
+ use attrs qw(locked method);
+ ...
+ }
+
+ @a = attrs::get(\&foo);
+
+=head1 DESCRIPTION
+
+This module lets you set and get attributes for subroutines.
+Setting attributes takes place at compile time; trying to set
+invalid attribute names causes a compile-time error. Calling
+C<attr::get> on a subroutine reference or name returns its list
+of attribute names. Notice that C<attr::get> is not exported.
+Valid attributes are as follows.
+
+=over
+
+=item method
+
+Indicates that the invoking subroutine is a method.
+
+=item locked
+
+Setting this attribute is only meaningful when the subroutine or
+method is to be called by multiple threads. When set on a method
+subroutine (i.e. one marked with the B<method> attribute above),
+perl ensures that any invocation of it implicitly locks its first
+argument before execution. When set on a non-method subroutine,
+perl ensures that a lock is taken on the subroutine itself before
+execution. The semantics of the lock are exactly those of one
+explicitly taken with the C<lock> operator immediately after the
+subroutine is entered.
+
+=back
+
+=cut
+
+bootstrap attrs $VERSION;
+
+1;
diff --git a/gnu/usr.bin/perl/ext/attrs/attrs.xs b/gnu/usr.bin/perl/ext/attrs/attrs.xs
new file mode 100644
index 00000000000..7f7970d207d
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/attrs/attrs.xs
@@ -0,0 +1,61 @@
+#include "EXTERN.h"
+#include "perl.h"
+#include "XSUB.h"
+
+static cv_flags_t
+get_flag(char *attr)
+{
+ if (strnEQ(attr, "method", 6))
+ return CVf_METHOD;
+ else if (strnEQ(attr, "locked", 6))
+ return CVf_LOCKED;
+ else
+ return 0;
+}
+
+MODULE = attrs PACKAGE = attrs
+
+void
+import(Class, ...)
+char * Class
+ ALIAS:
+ unimport = 1
+ PREINIT:
+ int i;
+ CV *cv;
+ PPCODE:
+ if (!PL_compcv || !(cv = CvOUTSIDE(PL_compcv)))
+ croak("can't set attributes outside a subroutine scope");
+ for (i = 1; i < items; i++) {
+ STRLEN n_a;
+ char *attr = SvPV(ST(i), n_a);
+ cv_flags_t flag = get_flag(attr);
+ if (!flag)
+ croak("invalid attribute name %s", attr);
+ if (ix)
+ CvFLAGS(cv) &= ~flag;
+ else
+ CvFLAGS(cv) |= flag;
+ }
+
+void
+get(sub)
+SV * sub
+ PPCODE:
+ if (SvROK(sub)) {
+ sub = SvRV(sub);
+ if (SvTYPE(sub) != SVt_PVCV)
+ sub = Nullsv;
+ }
+ else {
+ STRLEN n_a;
+ char *name = SvPV(sub, n_a);
+ sub = (SV*)perl_get_cv(name, FALSE);
+ }
+ if (!sub)
+ croak("invalid subroutine reference or name");
+ if (CvFLAGS(sub) & CVf_METHOD)
+ XPUSHs(sv_2mortal(newSVpv("method", 0)));
+ if (CvFLAGS(sub) & CVf_LOCKED)
+ XPUSHs(sv_2mortal(newSVpv("locked", 0)));
+
diff --git a/gnu/usr.bin/perl/ext/re/Makefile.PL b/gnu/usr.bin/perl/ext/re/Makefile.PL
new file mode 100644
index 00000000000..040b085f4fa
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/re/Makefile.PL
@@ -0,0 +1,41 @@
+use ExtUtils::MakeMaker;
+WriteMakefile(
+ NAME => 're',
+ VERSION_FROM => 're.pm',
+ MAN3PODS => {}, # Pods will be built by installman.
+ XSPROTOARG => '-noprototypes',
+ OBJECT => 're_exec$(OBJ_EXT) re_comp$(OBJ_EXT) re$(OBJ_EXT)',
+ DEFINE => '-DPERL_EXT_RE_BUILD',
+ clean => { FILES => '*$(OBJ_EXT) *.c ../../lib/re.pm' },
+);
+
+sub MY::postamble {
+ if ($^O eq 'VMS') {
+ return <<'VMS_EOF';
+re_comp.c : [--]regcomp.c
+ - $(RM_F) $(MMS$TARGET_NAME)
+ $(CP) [--]regcomp.c $(MMS$TARGET_NAME)
+
+re_comp$(OBJ_EXT) : re_comp.c
+
+re_exec.c : [--]regexec.c
+ - $(RM_F) $(MMS$TARGET_NAME)
+ $(CP) [--]regexec.c $(MMS$TARGET_NAME)
+
+re_exec$(OBJ_EXT) : re_exec.c
+
+
+VMS_EOF
+ } else {
+ return <<'EOF';
+re_comp.c: ../../regcomp.c
+ -$(RM_F) $@
+ $(CP) ../../regcomp.c $@
+
+re_exec.c: ../../regexec.c
+ -$(RM_F) $@
+ $(CP) ../../regexec.c $@
+
+EOF
+ }
+}
diff --git a/gnu/usr.bin/perl/ext/re/hints/mpeix.pl b/gnu/usr.bin/perl/ext/re/hints/mpeix.pl
new file mode 100644
index 00000000000..d1fbb91f8fd
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/re/hints/mpeix.pl
@@ -0,0 +1,3 @@
+# Fall back to -O optimization to avoid known gcc 2.8.0 -O2 problems on MPE/iX.
+# Mark Bixby <markb@cccd.edu>
+$self->{OPTIMIZE} = '-O';
diff --git a/gnu/usr.bin/perl/ext/re/re.pm b/gnu/usr.bin/perl/ext/re/re.pm
new file mode 100644
index 00000000000..83e7dbafe56
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/re/re.pm
@@ -0,0 +1,131 @@
+package re;
+
+$VERSION = 0.02;
+
+=head1 NAME
+
+re - Perl pragma to alter regular expression behaviour
+
+=head1 SYNOPSIS
+
+ use re 'taint';
+ ($x) = ($^X =~ /^(.*)$/s); # $x is tainted here
+
+ $pat = '(?{ $foo = 1 })';
+ use re 'eval';
+ /foo${pat}bar/; # won't fail (when not under -T switch)
+
+ {
+ no re 'taint'; # the default
+ ($x) = ($^X =~ /^(.*)$/s); # $x is not tainted here
+
+ no re 'eval'; # the default
+ /foo${pat}bar/; # disallowed (with or without -T switch)
+ }
+
+ use re 'debug'; # NOT lexically scoped (as others are)
+ /^(.*)$/s; # output debugging info during
+ # compile and run time
+
+ use re 'debugcolor'; # same as 'debug', but with colored output
+ ...
+
+(We use $^X in these examples because it's tainted by default.)
+
+=head1 DESCRIPTION
+
+When C<use re 'taint'> is in effect, and a tainted string is the target
+of a regex, the regex memories (or values returned by the m// operator
+in list context) are tainted. This feature is useful when regex operations
+on tainted data aren't meant to extract safe substrings, but to perform
+other transformations.
+
+When C<use re 'eval'> is in effect, a regex is allowed to contain
+C<(?{ ... })> zero-width assertions even if the regex contains
+variable interpolation. This is normally disallowed, since it is a
+potential security risk. Note that this pragma is ignored when the regular
+expression is obtained from tainted data, i.e. evaluation is always
+disallowed with tainted regular expressions. See L<perlre/(?{ code })>.
+
+For the purpose of this pragma, interpolation of precompiled regular
+expressions (i.e., the result of C<qr//>) is I<not> considered variable
+interpolation. Thus:
+
+ /foo${pat}bar/
+
+I<is> allowed if $pat is a precompiled regular expression, even
+if $pat contains C<(?{ ... })> assertions.
+
+When C<use re 'debug'> is in effect, perl emits debugging messages when
+compiling and using regular expressions. The output is the same as that
+obtained by running a C<-DDEBUGGING>-enabled perl interpreter with the
+B<-Dr> switch. It may be quite voluminous depending on the complexity
+of the match. Using C<debugcolor> instead of C<debug> enables a
+form of output that can be used to get a colorful display on terminals
+that understand termcap color sequences. Set C<$ENV{PERL_RE_TC}> to a
+comma-separated list of C<termcap> properties to use for highlighting
+strings on/off, pre-point part on/off.
+See L<perldebug/"Debugging regular expressions"> for additional info.
+
+The directive C<use re 'debug'> is I<not lexically scoped>, as the
+other directives are. It has both compile-time and run-time effects.
+
+See L<perlmodlib/Pragmatic Modules>.
+
+=cut
+
+my %bitmask = (
+taint => 0x00100000,
+eval => 0x00200000,
+);
+
+sub setcolor {
+ eval { # Ignore errors
+ require Term::Cap;
+
+ my $terminal = Tgetent Term::Cap ({OSPEED => 9600}); # Avoid warning.
+ my $props = $ENV{PERL_RE_TC} || 'md,me,so,se'; # can use us/ue later
+ my @props = split /,/, $props;
+
+
+ $ENV{TERMCAP_COLORS} = join "\t", map {$terminal->Tputs($_,1)} @props;
+ };
+
+ not defined $ENV{TERMCAP_COLORS} or ($ENV{TERMCAP_COLORS} =~ tr/\t/\t/) >= 4
+ or not defined $ENV{PERL_RE_TC}
+ or die "Not enough fields in \$ENV{PERL_RE_TC}=`$ENV{PERL_RE_TC}'";
+}
+
+sub bits {
+ my $on = shift;
+ my $bits = 0;
+ unless(@_) {
+ require Carp;
+ Carp::carp("Useless use of \"re\" pragma");
+ }
+ foreach my $s (@_){
+ if ($s eq 'debug' or $s eq 'debugcolor') {
+ setcolor() if $s eq 'debugcolor';
+ require DynaLoader;
+ @ISA = ('DynaLoader');
+ bootstrap re;
+ install() if $on;
+ uninstall() unless $on;
+ next;
+ }
+ $bits |= $bitmask{$s} || 0;
+ }
+ $bits;
+}
+
+sub import {
+ shift;
+ $^H |= bits(1,@_);
+}
+
+sub unimport {
+ shift;
+ $^H &= ~ bits(0,@_);
+}
+
+1;
diff --git a/gnu/usr.bin/perl/ext/re/re.xs b/gnu/usr.bin/perl/ext/re/re.xs
new file mode 100644
index 00000000000..7230d626dc2
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/re/re.xs
@@ -0,0 +1,46 @@
+/* We need access to debugger hooks */
+#ifndef DEBUGGING
+# define DEBUGGING
+#endif
+
+#include "EXTERN.h"
+#include "perl.h"
+#include "XSUB.h"
+
+extern regexp* my_regcomp _((char* exp, char* xend, PMOP* pm));
+extern I32 my_regexec _((regexp* prog, char* stringarg, char* strend,
+ char* strbeg, I32 minend, SV* screamer,
+ void* data, U32 flags));
+
+static int oldfl;
+
+#define R_DB 512
+
+static void
+deinstall(void)
+{
+ dTHR;
+ PL_regexecp = &regexec_flags;
+ PL_regcompp = &pregcomp;
+ if (!oldfl)
+ PL_debug &= ~R_DB;
+}
+
+static void
+install(void)
+{
+ dTHR;
+ PL_colorset = 0; /* Allow reinspection of ENV. */
+ PL_regexecp = &my_regexec;
+ PL_regcompp = &my_regcomp;
+ oldfl = PL_debug & R_DB;
+ PL_debug |= R_DB;
+}
+
+MODULE = re PACKAGE = re
+
+void
+install()
+
+void
+deinstall()
diff --git a/gnu/usr.bin/perl/fakethr.h b/gnu/usr.bin/perl/fakethr.h
new file mode 100644
index 00000000000..098fefea9ec
--- /dev/null
+++ b/gnu/usr.bin/perl/fakethr.h
@@ -0,0 +1,56 @@
+typedef int perl_mutex;
+typedef int perl_key;
+
+typedef struct perl_thread *perl_os_thread;
+/* With fake threads, thr is global(ish) so we don't need dTHR */
+#define dTHR extern int errno
+
+struct perl_wait_queue {
+ struct perl_thread * thread;
+ struct perl_wait_queue * next;
+};
+typedef struct perl_wait_queue *perl_cond;
+
+/* Ask thread.h to include our per-thread extras */
+#define HAVE_THREAD_INTERN
+struct thread_intern {
+ perl_os_thread next_run, prev_run; /* Linked list of runnable threads */
+ perl_cond wait_queue; /* Wait queue that we are waiting on */
+ IV private; /* Holds data across time slices */
+ I32 savemark; /* Holds MARK for thread join values */
+};
+
+#define init_thread_intern(t) \
+ STMT_START { \
+ t->self = (t); \
+ (t)->i.next_run = (t)->i.prev_run = (t); \
+ (t)->i.wait_queue = 0; \
+ (t)->i.private = 0; \
+ } STMT_END
+
+/*
+ * Note that SCHEDULE() is only callable from pp code (which
+ * must be expecting to be restarted). We'll have to do
+ * something a bit different for XS code.
+ */
+
+#define SCHEDULE() return schedule(), PL_op
+
+#define MUTEX_LOCK(m)
+#define MUTEX_UNLOCK(m)
+#define MUTEX_INIT(m)
+#define MUTEX_DESTROY(m)
+#define COND_INIT(c) perl_cond_init(c)
+#define COND_SIGNAL(c) perl_cond_signal(c)
+#define COND_BROADCAST(c) perl_cond_broadcast(c)
+#define COND_WAIT(c, m) \
+ STMT_START { \
+ perl_cond_wait(c); \
+ SCHEDULE(); \
+ } STMT_END
+#define COND_DESTROY(c)
+
+#define THREAD_CREATE(t, f) f((t))
+#define THREAD_POST_CREATE(t) NOOP
+
+#define YIELD NOOP
diff --git a/gnu/usr.bin/perl/globals.c b/gnu/usr.bin/perl/globals.c
index 0550a5ac416..1d8ef9272d2 100644
--- a/gnu/usr.bin/perl/globals.c
+++ b/gnu/usr.bin/perl/globals.c
@@ -1,2 +1,1471 @@
#include "INTERN.h"
#include "perl.h"
+
+#ifdef PERL_OBJECT
+#undef pp_null
+#define pp_null CPerlObj::Perl_pp_null
+#undef pp_stub
+#define pp_stub CPerlObj::Perl_pp_stub
+#undef pp_scalar
+#define pp_scalar CPerlObj::Perl_pp_scalar
+#undef pp_pushmark
+#define pp_pushmark CPerlObj::Perl_pp_pushmark
+#undef pp_wantarray
+#define pp_wantarray CPerlObj::Perl_pp_wantarray
+#undef pp_const
+#define pp_const CPerlObj::Perl_pp_const
+#undef pp_gvsv
+#define pp_gvsv CPerlObj::Perl_pp_gvsv
+#undef pp_gv
+#define pp_gv CPerlObj::Perl_pp_gv
+#undef pp_gelem
+#define pp_gelem CPerlObj::Perl_pp_gelem
+#undef pp_padsv
+#define pp_padsv CPerlObj::Perl_pp_padsv
+#undef pp_padav
+#define pp_padav CPerlObj::Perl_pp_padav
+#undef pp_padhv
+#define pp_padhv CPerlObj::Perl_pp_padhv
+#undef pp_padany
+#define pp_padany CPerlObj::Perl_pp_padany
+#undef pp_pushre
+#define pp_pushre CPerlObj::Perl_pp_pushre
+#undef pp_rv2gv
+#define pp_rv2gv CPerlObj::Perl_pp_rv2gv
+#undef pp_rv2sv
+#define pp_rv2sv CPerlObj::Perl_pp_rv2sv
+#undef pp_av2arylen
+#define pp_av2arylen CPerlObj::Perl_pp_av2arylen
+#undef pp_rv2cv
+#define pp_rv2cv CPerlObj::Perl_pp_rv2cv
+#undef pp_anoncode
+#define pp_anoncode CPerlObj::Perl_pp_anoncode
+#undef pp_prototype
+#define pp_prototype CPerlObj::Perl_pp_prototype
+#undef pp_refgen
+#define pp_refgen CPerlObj::Perl_pp_refgen
+#undef pp_srefgen
+#define pp_srefgen CPerlObj::Perl_pp_srefgen
+#undef pp_ref
+#define pp_ref CPerlObj::Perl_pp_ref
+#undef pp_bless
+#define pp_bless CPerlObj::Perl_pp_bless
+#undef pp_backtick
+#define pp_backtick CPerlObj::Perl_pp_backtick
+#undef pp_glob
+#define pp_glob CPerlObj::Perl_pp_glob
+#undef pp_readline
+#define pp_readline CPerlObj::Perl_pp_readline
+#undef pp_rcatline
+#define pp_rcatline CPerlObj::Perl_pp_rcatline
+#undef pp_regcmaybe
+#define pp_regcmaybe CPerlObj::Perl_pp_regcmaybe
+#undef pp_regcreset
+#define pp_regcreset CPerlObj::Perl_pp_regcreset
+#undef pp_regcomp
+#define pp_regcomp CPerlObj::Perl_pp_regcomp
+#undef pp_match
+#define pp_match CPerlObj::Perl_pp_match
+#undef pp_qr
+#define pp_qr CPerlObj::Perl_pp_qr
+#undef pp_subst
+#define pp_subst CPerlObj::Perl_pp_subst
+#undef pp_substcont
+#define pp_substcont CPerlObj::Perl_pp_substcont
+#undef pp_trans
+#define pp_trans CPerlObj::Perl_pp_trans
+#undef pp_sassign
+#define pp_sassign CPerlObj::Perl_pp_sassign
+#undef pp_aassign
+#define pp_aassign CPerlObj::Perl_pp_aassign
+#undef pp_chop
+#define pp_chop CPerlObj::Perl_pp_chop
+#undef pp_schop
+#define pp_schop CPerlObj::Perl_pp_schop
+#undef pp_chomp
+#define pp_chomp CPerlObj::Perl_pp_chomp
+#undef pp_schomp
+#define pp_schomp CPerlObj::Perl_pp_schomp
+#undef pp_defined
+#define pp_defined CPerlObj::Perl_pp_defined
+#undef pp_undef
+#define pp_undef CPerlObj::Perl_pp_undef
+#undef pp_study
+#define pp_study CPerlObj::Perl_pp_study
+#undef pp_pos
+#define pp_pos CPerlObj::Perl_pp_pos
+#undef pp_preinc
+#define pp_preinc CPerlObj::Perl_pp_preinc
+#undef pp_i_preinc
+#define pp_i_preinc CPerlObj::Perl_pp_preinc
+#undef pp_predec
+#define pp_predec CPerlObj::Perl_pp_predec
+#undef pp_i_predec
+#define pp_i_predec CPerlObj::Perl_pp_predec
+#undef pp_postinc
+#define pp_postinc CPerlObj::Perl_pp_postinc
+#undef pp_i_postinc
+#define pp_i_postinc CPerlObj::Perl_pp_postinc
+#undef pp_postdec
+#define pp_postdec CPerlObj::Perl_pp_postdec
+#undef pp_i_postdec
+#define pp_i_postdec CPerlObj::Perl_pp_postdec
+#undef pp_pow
+#define pp_pow CPerlObj::Perl_pp_pow
+#undef pp_multiply
+#define pp_multiply CPerlObj::Perl_pp_multiply
+#undef pp_i_multiply
+#define pp_i_multiply CPerlObj::Perl_pp_i_multiply
+#undef pp_divide
+#define pp_divide CPerlObj::Perl_pp_divide
+#undef pp_i_divide
+#define pp_i_divide CPerlObj::Perl_pp_i_divide
+#undef pp_modulo
+#define pp_modulo CPerlObj::Perl_pp_modulo
+#undef pp_i_modulo
+#define pp_i_modulo CPerlObj::Perl_pp_i_modulo
+#undef pp_repeat
+#define pp_repeat CPerlObj::Perl_pp_repeat
+#undef pp_add
+#define pp_add CPerlObj::Perl_pp_add
+#undef pp_i_add
+#define pp_i_add CPerlObj::Perl_pp_i_add
+#undef pp_subtract
+#define pp_subtract CPerlObj::Perl_pp_subtract
+#undef pp_i_subtract
+#define pp_i_subtract CPerlObj::Perl_pp_i_subtract
+#undef pp_concat
+#define pp_concat CPerlObj::Perl_pp_concat
+#undef pp_stringify
+#define pp_stringify CPerlObj::Perl_pp_stringify
+#undef pp_left_shift
+#define pp_left_shift CPerlObj::Perl_pp_left_shift
+#undef pp_right_shift
+#define pp_right_shift CPerlObj::Perl_pp_right_shift
+#undef pp_lt
+#define pp_lt CPerlObj::Perl_pp_lt
+#undef pp_i_lt
+#define pp_i_lt CPerlObj::Perl_pp_i_lt
+#undef pp_gt
+#define pp_gt CPerlObj::Perl_pp_gt
+#undef pp_i_gt
+#define pp_i_gt CPerlObj::Perl_pp_i_gt
+#undef pp_le
+#define pp_le CPerlObj::Perl_pp_le
+#undef pp_i_le
+#define pp_i_le CPerlObj::Perl_pp_i_le
+#undef pp_ge
+#define pp_ge CPerlObj::Perl_pp_ge
+#undef pp_i_ge
+#define pp_i_ge CPerlObj::Perl_pp_i_ge
+#undef pp_eq
+#define pp_eq CPerlObj::Perl_pp_eq
+#undef pp_i_eq
+#define pp_i_eq CPerlObj::Perl_pp_i_eq
+#undef pp_ne
+#define pp_ne CPerlObj::Perl_pp_ne
+#undef pp_i_ne
+#define pp_i_ne CPerlObj::Perl_pp_i_ne
+#undef pp_ncmp
+#define pp_ncmp CPerlObj::Perl_pp_ncmp
+#undef pp_i_ncmp
+#define pp_i_ncmp CPerlObj::Perl_pp_i_ncmp
+#undef pp_slt
+#define pp_slt CPerlObj::Perl_pp_slt
+#undef pp_sgt
+#define pp_sgt CPerlObj::Perl_pp_sgt
+#undef pp_sle
+#define pp_sle CPerlObj::Perl_pp_sle
+#undef pp_sge
+#define pp_sge CPerlObj::Perl_pp_sge
+#undef pp_seq
+#define pp_seq CPerlObj::Perl_pp_seq
+#undef pp_sne
+#define pp_sne CPerlObj::Perl_pp_sne
+#undef pp_scmp
+#define pp_scmp CPerlObj::Perl_pp_scmp
+#undef pp_bit_and
+#define pp_bit_and CPerlObj::Perl_pp_bit_and
+#undef pp_bit_xor
+#define pp_bit_xor CPerlObj::Perl_pp_bit_xor
+#undef pp_bit_or
+#define pp_bit_or CPerlObj::Perl_pp_bit_or
+#undef pp_negate
+#define pp_negate CPerlObj::Perl_pp_negate
+#undef pp_i_negate
+#define pp_i_negate CPerlObj::Perl_pp_i_negate
+#undef pp_not
+#define pp_not CPerlObj::Perl_pp_not
+#undef pp_complement
+#define pp_complement CPerlObj::Perl_pp_complement
+#undef pp_atan2
+#define pp_atan2 CPerlObj::Perl_pp_atan2
+#undef pp_sin
+#define pp_sin CPerlObj::Perl_pp_sin
+#undef pp_cos
+#define pp_cos CPerlObj::Perl_pp_cos
+#undef pp_rand
+#define pp_rand CPerlObj::Perl_pp_rand
+#undef pp_srand
+#define pp_srand CPerlObj::Perl_pp_srand
+#undef pp_exp
+#define pp_exp CPerlObj::Perl_pp_exp
+#undef pp_log
+#define pp_log CPerlObj::Perl_pp_log
+#undef pp_sqrt
+#define pp_sqrt CPerlObj::Perl_pp_sqrt
+#undef pp_int
+#define pp_int CPerlObj::Perl_pp_int
+#undef pp_hex
+#define pp_hex CPerlObj::Perl_pp_hex
+#undef pp_oct
+#define pp_oct CPerlObj::Perl_pp_oct
+#undef pp_abs
+#define pp_abs CPerlObj::Perl_pp_abs
+#undef pp_length
+#define pp_length CPerlObj::Perl_pp_length
+#undef pp_substr
+#define pp_substr CPerlObj::Perl_pp_substr
+#undef pp_vec
+#define pp_vec CPerlObj::Perl_pp_vec
+#undef pp_index
+#define pp_index CPerlObj::Perl_pp_index
+#undef pp_rindex
+#define pp_rindex CPerlObj::Perl_pp_rindex
+#undef pp_sprintf
+#define pp_sprintf CPerlObj::Perl_pp_sprintf
+#undef pp_formline
+#define pp_formline CPerlObj::Perl_pp_formline
+#undef pp_ord
+#define pp_ord CPerlObj::Perl_pp_ord
+#undef pp_chr
+#define pp_chr CPerlObj::Perl_pp_chr
+#undef pp_crypt
+#define pp_crypt CPerlObj::Perl_pp_crypt
+#undef pp_ucfirst
+#define pp_ucfirst CPerlObj::Perl_pp_ucfirst
+#undef pp_lcfirst
+#define pp_lcfirst CPerlObj::Perl_pp_lcfirst
+#undef pp_uc
+#define pp_uc CPerlObj::Perl_pp_uc
+#undef pp_lc
+#define pp_lc CPerlObj::Perl_pp_lc
+#undef pp_quotemeta
+#define pp_quotemeta CPerlObj::Perl_pp_quotemeta
+#undef pp_rv2av
+#define pp_rv2av CPerlObj::Perl_pp_rv2av
+#undef pp_aelemfast
+#define pp_aelemfast CPerlObj::Perl_pp_aelemfast
+#undef pp_aelem
+#define pp_aelem CPerlObj::Perl_pp_aelem
+#undef pp_aslice
+#define pp_aslice CPerlObj::Perl_pp_aslice
+#undef pp_each
+#define pp_each CPerlObj::Perl_pp_each
+#undef pp_values
+#define pp_values CPerlObj::Perl_pp_values
+#undef pp_keys
+#define pp_keys CPerlObj::Perl_pp_keys
+#undef pp_delete
+#define pp_delete CPerlObj::Perl_pp_delete
+#undef pp_exists
+#define pp_exists CPerlObj::Perl_pp_exists
+#undef pp_rv2hv
+#define pp_rv2hv CPerlObj::Perl_pp_rv2hv
+#undef pp_helem
+#define pp_helem CPerlObj::Perl_pp_helem
+#undef pp_hslice
+#define pp_hslice CPerlObj::Perl_pp_hslice
+#undef pp_unpack
+#define pp_unpack CPerlObj::Perl_pp_unpack
+#undef pp_pack
+#define pp_pack CPerlObj::Perl_pp_pack
+#undef pp_split
+#define pp_split CPerlObj::Perl_pp_split
+#undef pp_join
+#define pp_join CPerlObj::Perl_pp_join
+#undef pp_list
+#define pp_list CPerlObj::Perl_pp_list
+#undef pp_lslice
+#define pp_lslice CPerlObj::Perl_pp_lslice
+#undef pp_anonlist
+#define pp_anonlist CPerlObj::Perl_pp_anonlist
+#undef pp_anonhash
+#define pp_anonhash CPerlObj::Perl_pp_anonhash
+#undef pp_splice
+#define pp_splice CPerlObj::Perl_pp_splice
+#undef pp_push
+#define pp_push CPerlObj::Perl_pp_push
+#undef pp_pop
+#define pp_pop CPerlObj::Perl_pp_pop
+#undef pp_shift
+#define pp_shift CPerlObj::Perl_pp_shift
+#undef pp_unshift
+#define pp_unshift CPerlObj::Perl_pp_unshift
+#undef pp_sort
+#define pp_sort CPerlObj::Perl_pp_sort
+#undef pp_reverse
+#define pp_reverse CPerlObj::Perl_pp_reverse
+#undef pp_grepstart
+#define pp_grepstart CPerlObj::Perl_pp_grepstart
+#undef pp_grepwhile
+#define pp_grepwhile CPerlObj::Perl_pp_grepwhile
+#undef pp_mapstart
+#define pp_mapstart CPerlObj::Perl_pp_mapstart
+#undef pp_mapwhile
+#define pp_mapwhile CPerlObj::Perl_pp_mapwhile
+#undef pp_range
+#define pp_range CPerlObj::Perl_pp_range
+#undef pp_flip
+#define pp_flip CPerlObj::Perl_pp_flip
+#undef pp_flop
+#define pp_flop CPerlObj::Perl_pp_flop
+#undef pp_and
+#define pp_and CPerlObj::Perl_pp_and
+#undef pp_or
+#define pp_or CPerlObj::Perl_pp_or
+#undef pp_xor
+#define pp_xor CPerlObj::Perl_pp_xor
+#undef pp_cond_expr
+#define pp_cond_expr CPerlObj::Perl_pp_cond_expr
+#undef pp_andassign
+#define pp_andassign CPerlObj::Perl_pp_andassign
+#undef pp_orassign
+#define pp_orassign CPerlObj::Perl_pp_orassign
+#undef pp_method
+#define pp_method CPerlObj::Perl_pp_method
+#undef pp_entersub
+#define pp_entersub CPerlObj::Perl_pp_entersub
+#undef pp_leavesub
+#define pp_leavesub CPerlObj::Perl_pp_leavesub
+#undef pp_caller
+#define pp_caller CPerlObj::Perl_pp_caller
+#undef pp_warn
+#define pp_warn CPerlObj::Perl_pp_warn
+#undef pp_die
+#define pp_die CPerlObj::Perl_pp_die
+#undef pp_reset
+#define pp_reset CPerlObj::Perl_pp_reset
+#undef pp_lineseq
+#define pp_lineseq CPerlObj::Perl_pp_lineseq
+#undef pp_nextstate
+#define pp_nextstate CPerlObj::Perl_pp_nextstate
+#undef pp_dbstate
+#define pp_dbstate CPerlObj::Perl_pp_dbstate
+#undef pp_unstack
+#define pp_unstack CPerlObj::Perl_pp_unstack
+#undef pp_enter
+#define pp_enter CPerlObj::Perl_pp_enter
+#undef pp_leave
+#define pp_leave CPerlObj::Perl_pp_leave
+#undef pp_scope
+#define pp_scope CPerlObj::Perl_pp_scope
+#undef pp_enteriter
+#define pp_enteriter CPerlObj::Perl_pp_enteriter
+#undef pp_iter
+#define pp_iter CPerlObj::Perl_pp_iter
+#undef pp_enterloop
+#define pp_enterloop CPerlObj::Perl_pp_enterloop
+#undef pp_leaveloop
+#define pp_leaveloop CPerlObj::Perl_pp_leaveloop
+#undef pp_return
+#define pp_return CPerlObj::Perl_pp_return
+#undef pp_last
+#define pp_last CPerlObj::Perl_pp_last
+#undef pp_next
+#define pp_next CPerlObj::Perl_pp_next
+#undef pp_redo
+#define pp_redo CPerlObj::Perl_pp_redo
+#undef pp_dump
+#define pp_dump CPerlObj::Perl_pp_dump
+#undef pp_goto
+#define pp_goto CPerlObj::Perl_pp_goto
+#undef pp_exit
+#define pp_exit CPerlObj::Perl_pp_exit
+#undef pp_open
+#define pp_open CPerlObj::Perl_pp_open
+#undef pp_close
+#define pp_close CPerlObj::Perl_pp_close
+#undef pp_pipe_op
+#define pp_pipe_op CPerlObj::Perl_pp_pipe_op
+#undef pp_fileno
+#define pp_fileno CPerlObj::Perl_pp_fileno
+#undef pp_umask
+#define pp_umask CPerlObj::Perl_pp_umask
+#undef pp_binmode
+#define pp_binmode CPerlObj::Perl_pp_binmode
+#undef pp_tie
+#define pp_tie CPerlObj::Perl_pp_tie
+#undef pp_untie
+#define pp_untie CPerlObj::Perl_pp_untie
+#undef pp_tied
+#define pp_tied CPerlObj::Perl_pp_tied
+#undef pp_dbmopen
+#define pp_dbmopen CPerlObj::Perl_pp_dbmopen
+#undef pp_dbmclose
+#define pp_dbmclose CPerlObj::Perl_pp_dbmclose
+#undef pp_sselect
+#define pp_sselect CPerlObj::Perl_pp_sselect
+#undef pp_select
+#define pp_select CPerlObj::Perl_pp_select
+#undef pp_getc
+#define pp_getc CPerlObj::Perl_pp_getc
+#undef pp_read
+#define pp_read CPerlObj::Perl_pp_read
+#undef pp_enterwrite
+#define pp_enterwrite CPerlObj::Perl_pp_enterwrite
+#undef pp_leavewrite
+#define pp_leavewrite CPerlObj::Perl_pp_leavewrite
+#undef pp_prtf
+#define pp_prtf CPerlObj::Perl_pp_prtf
+#undef pp_print
+#define pp_print CPerlObj::Perl_pp_print
+#undef pp_sysopen
+#define pp_sysopen CPerlObj::Perl_pp_sysopen
+#undef pp_sysseek
+#define pp_sysseek CPerlObj::Perl_pp_sysseek
+#undef pp_sysread
+#define pp_sysread CPerlObj::Perl_pp_sysread
+#undef pp_syswrite
+#define pp_syswrite CPerlObj::Perl_pp_syswrite
+#undef pp_send
+#define pp_send CPerlObj::Perl_pp_send
+#undef pp_recv
+#define pp_recv CPerlObj::Perl_pp_recv
+#undef pp_eof
+#define pp_eof CPerlObj::Perl_pp_eof
+#undef pp_tell
+#define pp_tell CPerlObj::Perl_pp_tell
+#undef pp_seek
+#define pp_seek CPerlObj::Perl_pp_seek
+#undef pp_truncate
+#define pp_truncate CPerlObj::Perl_pp_truncate
+#undef pp_fcntl
+#define pp_fcntl CPerlObj::Perl_pp_fcntl
+#undef pp_ioctl
+#define pp_ioctl CPerlObj::Perl_pp_ioctl
+#undef pp_flock
+#define pp_flock CPerlObj::Perl_pp_flock
+#undef pp_socket
+#define pp_socket CPerlObj::Perl_pp_socket
+#undef pp_sockpair
+#define pp_sockpair CPerlObj::Perl_pp_sockpair
+#undef pp_bind
+#define pp_bind CPerlObj::Perl_pp_bind
+#undef pp_connect
+#define pp_connect CPerlObj::Perl_pp_connect
+#undef pp_listen
+#define pp_listen CPerlObj::Perl_pp_listen
+#undef pp_accept
+#define pp_accept CPerlObj::Perl_pp_accept
+#undef pp_shutdown
+#define pp_shutdown CPerlObj::Perl_pp_shutdown
+#undef pp_gsockopt
+#define pp_gsockopt CPerlObj::Perl_pp_gsockopt
+#undef pp_ssockopt
+#define pp_ssockopt CPerlObj::Perl_pp_ssockopt
+#undef pp_getsockname
+#define pp_getsockname CPerlObj::Perl_pp_getsockname
+#undef pp_getpeername
+#define pp_getpeername CPerlObj::Perl_pp_getpeername
+#undef pp_lstat
+#define pp_lstat CPerlObj::Perl_pp_lstat
+#undef pp_stat
+#define pp_stat CPerlObj::Perl_pp_stat
+#undef pp_ftrread
+#define pp_ftrread CPerlObj::Perl_pp_ftrread
+#undef pp_ftrwrite
+#define pp_ftrwrite CPerlObj::Perl_pp_ftrwrite
+#undef pp_ftrexec
+#define pp_ftrexec CPerlObj::Perl_pp_ftrexec
+#undef pp_fteread
+#define pp_fteread CPerlObj::Perl_pp_fteread
+#undef pp_ftewrite
+#define pp_ftewrite CPerlObj::Perl_pp_ftewrite
+#undef pp_fteexec
+#define pp_fteexec CPerlObj::Perl_pp_fteexec
+#undef pp_ftis
+#define pp_ftis CPerlObj::Perl_pp_ftis
+#undef pp_fteowned
+#define pp_fteowned CPerlObj::Perl_pp_fteowned
+#undef pp_ftrowned
+#define pp_ftrowned CPerlObj::Perl_pp_ftrowned
+#undef pp_ftzero
+#define pp_ftzero CPerlObj::Perl_pp_ftzero
+#undef pp_ftsize
+#define pp_ftsize CPerlObj::Perl_pp_ftsize
+#undef pp_ftmtime
+#define pp_ftmtime CPerlObj::Perl_pp_ftmtime
+#undef pp_ftatime
+#define pp_ftatime CPerlObj::Perl_pp_ftatime
+#undef pp_ftctime
+#define pp_ftctime CPerlObj::Perl_pp_ftctime
+#undef pp_ftsock
+#define pp_ftsock CPerlObj::Perl_pp_ftsock
+#undef pp_ftchr
+#define pp_ftchr CPerlObj::Perl_pp_ftchr
+#undef pp_ftblk
+#define pp_ftblk CPerlObj::Perl_pp_ftblk
+#undef pp_ftfile
+#define pp_ftfile CPerlObj::Perl_pp_ftfile
+#undef pp_ftdir
+#define pp_ftdir CPerlObj::Perl_pp_ftdir
+#undef pp_ftpipe
+#define pp_ftpipe CPerlObj::Perl_pp_ftpipe
+#undef pp_ftlink
+#define pp_ftlink CPerlObj::Perl_pp_ftlink
+#undef pp_ftsuid
+#define pp_ftsuid CPerlObj::Perl_pp_ftsuid
+#undef pp_ftsgid
+#define pp_ftsgid CPerlObj::Perl_pp_ftsgid
+#undef pp_ftsvtx
+#define pp_ftsvtx CPerlObj::Perl_pp_ftsvtx
+#undef pp_fttty
+#define pp_fttty CPerlObj::Perl_pp_fttty
+#undef pp_fttext
+#define pp_fttext CPerlObj::Perl_pp_fttext
+#undef pp_ftbinary
+#define pp_ftbinary CPerlObj::Perl_pp_ftbinary
+#undef pp_chdir
+#define pp_chdir CPerlObj::Perl_pp_chdir
+#undef pp_chown
+#define pp_chown CPerlObj::Perl_pp_chown
+#undef pp_chroot
+#define pp_chroot CPerlObj::Perl_pp_chroot
+#undef pp_unlink
+#define pp_unlink CPerlObj::Perl_pp_unlink
+#undef pp_chmod
+#define pp_chmod CPerlObj::Perl_pp_chmod
+#undef pp_utime
+#define pp_utime CPerlObj::Perl_pp_utime
+#undef pp_rename
+#define pp_rename CPerlObj::Perl_pp_rename
+#undef pp_link
+#define pp_link CPerlObj::Perl_pp_link
+#undef pp_symlink
+#define pp_symlink CPerlObj::Perl_pp_symlink
+#undef pp_readlink
+#define pp_readlink CPerlObj::Perl_pp_readlink
+#undef pp_mkdir
+#define pp_mkdir CPerlObj::Perl_pp_mkdir
+#undef pp_rmdir
+#define pp_rmdir CPerlObj::Perl_pp_rmdir
+#undef pp_open_dir
+#define pp_open_dir CPerlObj::Perl_pp_open_dir
+#undef pp_readdir
+#define pp_readdir CPerlObj::Perl_pp_readdir
+#undef pp_telldir
+#define pp_telldir CPerlObj::Perl_pp_telldir
+#undef pp_seekdir
+#define pp_seekdir CPerlObj::Perl_pp_seekdir
+#undef pp_rewinddir
+#define pp_rewinddir CPerlObj::Perl_pp_rewinddir
+#undef pp_closedir
+#define pp_closedir CPerlObj::Perl_pp_closedir
+#undef pp_fork
+#define pp_fork CPerlObj::Perl_pp_fork
+#undef pp_wait
+#define pp_wait CPerlObj::Perl_pp_wait
+#undef pp_waitpid
+#define pp_waitpid CPerlObj::Perl_pp_waitpid
+#undef pp_system
+#define pp_system CPerlObj::Perl_pp_system
+#undef pp_exec
+#define pp_exec CPerlObj::Perl_pp_exec
+#undef pp_kill
+#define pp_kill CPerlObj::Perl_pp_kill
+#undef pp_getppid
+#define pp_getppid CPerlObj::Perl_pp_getppid
+#undef pp_getpgrp
+#define pp_getpgrp CPerlObj::Perl_pp_getpgrp
+#undef pp_setpgrp
+#define pp_setpgrp CPerlObj::Perl_pp_setpgrp
+#undef pp_getpriority
+#define pp_getpriority CPerlObj::Perl_pp_getpriority
+#undef pp_setpriority
+#define pp_setpriority CPerlObj::Perl_pp_setpriority
+#undef pp_time
+#define pp_time CPerlObj::Perl_pp_time
+#undef pp_tms
+#define pp_tms CPerlObj::Perl_pp_tms
+#undef pp_localtime
+#define pp_localtime CPerlObj::Perl_pp_localtime
+#undef pp_gmtime
+#define pp_gmtime CPerlObj::Perl_pp_gmtime
+#undef pp_alarm
+#define pp_alarm CPerlObj::Perl_pp_alarm
+#undef pp_sleep
+#define pp_sleep CPerlObj::Perl_pp_sleep
+#undef pp_shmget
+#define pp_shmget CPerlObj::Perl_pp_shmget
+#undef pp_shmctl
+#define pp_shmctl CPerlObj::Perl_pp_shmctl
+#undef pp_shmread
+#define pp_shmread CPerlObj::Perl_pp_shmread
+#undef pp_shmwrite
+#define pp_shmwrite CPerlObj::Perl_pp_shmwrite
+#undef pp_msgget
+#define pp_msgget CPerlObj::Perl_pp_msgget
+#undef pp_msgctl
+#define pp_msgctl CPerlObj::Perl_pp_msgctl
+#undef pp_msgsnd
+#define pp_msgsnd CPerlObj::Perl_pp_msgsnd
+#undef pp_msgrcv
+#define pp_msgrcv CPerlObj::Perl_pp_msgrcv
+#undef pp_semget
+#define pp_semget CPerlObj::Perl_pp_semget
+#undef pp_semctl
+#define pp_semctl CPerlObj::Perl_pp_semctl
+#undef pp_semop
+#define pp_semop CPerlObj::Perl_pp_semop
+#undef pp_require
+#define pp_require CPerlObj::Perl_pp_require
+#undef pp_dofile
+#define pp_dofile CPerlObj::Perl_pp_dofile
+#undef pp_entereval
+#define pp_entereval CPerlObj::Perl_pp_entereval
+#undef pp_leaveeval
+#define pp_leaveeval CPerlObj::Perl_pp_leaveeval
+#undef pp_entertry
+#define pp_entertry CPerlObj::Perl_pp_entertry
+#undef pp_leavetry
+#define pp_leavetry CPerlObj::Perl_pp_leavetry
+#undef pp_ghbyname
+#define pp_ghbyname CPerlObj::Perl_pp_ghbyname
+#undef pp_ghbyaddr
+#define pp_ghbyaddr CPerlObj::Perl_pp_ghbyaddr
+#undef pp_ghostent
+#define pp_ghostent CPerlObj::Perl_pp_ghostent
+#undef pp_gnbyname
+#define pp_gnbyname CPerlObj::Perl_pp_gnbyname
+#undef pp_gnbyaddr
+#define pp_gnbyaddr CPerlObj::Perl_pp_gnbyaddr
+#undef pp_gnetent
+#define pp_gnetent CPerlObj::Perl_pp_gnetent
+#undef pp_gpbyname
+#define pp_gpbyname CPerlObj::Perl_pp_gpbyname
+#undef pp_gpbynumber
+#define pp_gpbynumber CPerlObj::Perl_pp_gpbynumber
+#undef pp_gprotoent
+#define pp_gprotoent CPerlObj::Perl_pp_gprotoent
+#undef pp_gsbyname
+#define pp_gsbyname CPerlObj::Perl_pp_gsbyname
+#undef pp_gsbyport
+#define pp_gsbyport CPerlObj::Perl_pp_gsbyport
+#undef pp_gservent
+#define pp_gservent CPerlObj::Perl_pp_gservent
+#undef pp_shostent
+#define pp_shostent CPerlObj::Perl_pp_shostent
+#undef pp_snetent
+#define pp_snetent CPerlObj::Perl_pp_snetent
+#undef pp_sprotoent
+#define pp_sprotoent CPerlObj::Perl_pp_sprotoent
+#undef pp_sservent
+#define pp_sservent CPerlObj::Perl_pp_sservent
+#undef pp_ehostent
+#define pp_ehostent CPerlObj::Perl_pp_ehostent
+#undef pp_enetent
+#define pp_enetent CPerlObj::Perl_pp_enetent
+#undef pp_eprotoent
+#define pp_eprotoent CPerlObj::Perl_pp_eprotoent
+#undef pp_eservent
+#define pp_eservent CPerlObj::Perl_pp_eservent
+#undef pp_gpwnam
+#define pp_gpwnam CPerlObj::Perl_pp_gpwnam
+#undef pp_gpwuid
+#define pp_gpwuid CPerlObj::Perl_pp_gpwuid
+#undef pp_gpwent
+#define pp_gpwent CPerlObj::Perl_pp_gpwent
+#undef pp_spwent
+#define pp_spwent CPerlObj::Perl_pp_spwent
+#undef pp_epwent
+#define pp_epwent CPerlObj::Perl_pp_epwent
+#undef pp_ggrnam
+#define pp_ggrnam CPerlObj::Perl_pp_ggrnam
+#undef pp_ggrgid
+#define pp_ggrgid CPerlObj::Perl_pp_ggrgid
+#undef pp_ggrent
+#define pp_ggrent CPerlObj::Perl_pp_ggrent
+#undef pp_sgrent
+#define pp_sgrent CPerlObj::Perl_pp_sgrent
+#undef pp_egrent
+#define pp_egrent CPerlObj::Perl_pp_egrent
+#undef pp_getlogin
+#define pp_getlogin CPerlObj::Perl_pp_getlogin
+#undef pp_syscall
+#define pp_syscall CPerlObj::Perl_pp_syscall
+#undef pp_lock
+#define pp_lock CPerlObj::Perl_pp_lock
+#undef pp_threadsv
+#define pp_threadsv CPerlObj::Perl_pp_threadsv
+
+OP * (CPERLscope(*check)[]) _((OP *op)) = {
+ ck_null, /* null */
+ ck_null, /* stub */
+ ck_fun, /* scalar */
+ ck_null, /* pushmark */
+ ck_null, /* wantarray */
+ ck_svconst, /* const */
+ ck_null, /* gvsv */
+ ck_null, /* gv */
+ ck_null, /* gelem */
+ ck_null, /* padsv */
+ ck_null, /* padav */
+ ck_null, /* padhv */
+ ck_null, /* padany */
+ ck_null, /* pushre */
+ ck_rvconst, /* rv2gv */
+ ck_rvconst, /* rv2sv */
+ ck_null, /* av2arylen */
+ ck_rvconst, /* rv2cv */
+ ck_anoncode, /* anoncode */
+ ck_null, /* prototype */
+ ck_spair, /* refgen */
+ ck_null, /* srefgen */
+ ck_fun, /* ref */
+ ck_fun, /* bless */
+ ck_null, /* backtick */
+ ck_glob, /* glob */
+ ck_null, /* readline */
+ ck_null, /* rcatline */
+ ck_fun, /* regcmaybe */
+ ck_fun, /* regcreset */
+ ck_null, /* regcomp */
+ ck_match, /* match */
+ ck_match, /* qr */
+ ck_null, /* subst */
+ ck_null, /* substcont */
+ ck_null, /* trans */
+ ck_null, /* sassign */
+ ck_null, /* aassign */
+ ck_spair, /* chop */
+ ck_null, /* schop */
+ ck_spair, /* chomp */
+ ck_null, /* schomp */
+ ck_rfun, /* defined */
+ ck_lfun, /* undef */
+ ck_fun, /* study */
+ ck_lfun, /* pos */
+ ck_lfun, /* preinc */
+ ck_lfun, /* i_preinc */
+ ck_lfun, /* predec */
+ ck_lfun, /* i_predec */
+ ck_lfun, /* postinc */
+ ck_lfun, /* i_postinc */
+ ck_lfun, /* postdec */
+ ck_lfun, /* i_postdec */
+ ck_null, /* pow */
+ ck_null, /* multiply */
+ ck_null, /* i_multiply */
+ ck_null, /* divide */
+ ck_null, /* i_divide */
+ ck_null, /* modulo */
+ ck_null, /* i_modulo */
+ ck_repeat, /* repeat */
+ ck_null, /* add */
+ ck_null, /* i_add */
+ ck_null, /* subtract */
+ ck_null, /* i_subtract */
+ ck_concat, /* concat */
+ ck_fun, /* stringify */
+ ck_bitop, /* left_shift */
+ ck_bitop, /* right_shift */
+ ck_null, /* lt */
+ ck_null, /* i_lt */
+ ck_null, /* gt */
+ ck_null, /* i_gt */
+ ck_null, /* le */
+ ck_null, /* i_le */
+ ck_null, /* ge */
+ ck_null, /* i_ge */
+ ck_null, /* eq */
+ ck_null, /* i_eq */
+ ck_null, /* ne */
+ ck_null, /* i_ne */
+ ck_null, /* ncmp */
+ ck_null, /* i_ncmp */
+ ck_scmp, /* slt */
+ ck_scmp, /* sgt */
+ ck_scmp, /* sle */
+ ck_scmp, /* sge */
+ ck_null, /* seq */
+ ck_null, /* sne */
+ ck_scmp, /* scmp */
+ ck_bitop, /* bit_and */
+ ck_bitop, /* bit_xor */
+ ck_bitop, /* bit_or */
+ ck_null, /* negate */
+ ck_null, /* i_negate */
+ ck_null, /* not */
+ ck_bitop, /* complement */
+ ck_fun, /* atan2 */
+ ck_fun, /* sin */
+ ck_fun, /* cos */
+ ck_fun, /* rand */
+ ck_fun, /* srand */
+ ck_fun, /* exp */
+ ck_fun, /* log */
+ ck_fun, /* sqrt */
+ ck_fun, /* int */
+ ck_fun, /* hex */
+ ck_fun, /* oct */
+ ck_fun, /* abs */
+ ck_lengthconst, /* length */
+ ck_fun, /* substr */
+ ck_fun, /* vec */
+ ck_index, /* index */
+ ck_index, /* rindex */
+ ck_fun_locale, /* sprintf */
+ ck_fun, /* formline */
+ ck_fun, /* ord */
+ ck_fun, /* chr */
+ ck_fun, /* crypt */
+ ck_fun_locale, /* ucfirst */
+ ck_fun_locale, /* lcfirst */
+ ck_fun_locale, /* uc */
+ ck_fun_locale, /* lc */
+ ck_fun, /* quotemeta */
+ ck_rvconst, /* rv2av */
+ ck_null, /* aelemfast */
+ ck_null, /* aelem */
+ ck_null, /* aslice */
+ ck_fun, /* each */
+ ck_fun, /* values */
+ ck_fun, /* keys */
+ ck_delete, /* delete */
+ ck_exists, /* exists */
+ ck_rvconst, /* rv2hv */
+ ck_null, /* helem */
+ ck_null, /* hslice */
+ ck_fun, /* unpack */
+ ck_fun, /* pack */
+ ck_split, /* split */
+ ck_fun, /* join */
+ ck_null, /* list */
+ ck_null, /* lslice */
+ ck_fun, /* anonlist */
+ ck_fun, /* anonhash */
+ ck_fun, /* splice */
+ ck_fun, /* push */
+ ck_shift, /* pop */
+ ck_shift, /* shift */
+ ck_fun, /* unshift */
+ ck_sort, /* sort */
+ ck_fun, /* reverse */
+ ck_grep, /* grepstart */
+ ck_null, /* grepwhile */
+ ck_grep, /* mapstart */
+ ck_null, /* mapwhile */
+ ck_null, /* range */
+ ck_null, /* flip */
+ ck_null, /* flop */
+ ck_null, /* and */
+ ck_null, /* or */
+ ck_null, /* xor */
+ ck_null, /* cond_expr */
+ ck_null, /* andassign */
+ ck_null, /* orassign */
+ ck_null, /* method */
+ ck_subr, /* entersub */
+ ck_null, /* leavesub */
+ ck_fun, /* caller */
+ ck_fun, /* warn */
+ ck_fun, /* die */
+ ck_fun, /* reset */
+ ck_null, /* lineseq */
+ ck_null, /* nextstate */
+ ck_null, /* dbstate */
+ ck_null, /* unstack */
+ ck_null, /* enter */
+ ck_null, /* leave */
+ ck_null, /* scope */
+ ck_null, /* enteriter */
+ ck_null, /* iter */
+ ck_null, /* enterloop */
+ ck_null, /* leaveloop */
+ ck_null, /* return */
+ ck_null, /* last */
+ ck_null, /* next */
+ ck_null, /* redo */
+ ck_null, /* dump */
+ ck_null, /* goto */
+ ck_fun, /* exit */
+ ck_fun, /* open */
+ ck_fun, /* close */
+ ck_fun, /* pipe_op */
+ ck_fun, /* fileno */
+ ck_fun, /* umask */
+ ck_fun, /* binmode */
+ ck_fun, /* tie */
+ ck_fun, /* untie */
+ ck_fun, /* tied */
+ ck_fun, /* dbmopen */
+ ck_fun, /* dbmclose */
+ ck_select, /* sselect */
+ ck_select, /* select */
+ ck_eof, /* getc */
+ ck_fun, /* read */
+ ck_fun, /* enterwrite */
+ ck_null, /* leavewrite */
+ ck_listiob, /* prtf */
+ ck_listiob, /* print */
+ ck_fun, /* sysopen */
+ ck_fun, /* sysseek */
+ ck_fun, /* sysread */
+ ck_fun, /* syswrite */
+ ck_fun, /* send */
+ ck_fun, /* recv */
+ ck_eof, /* eof */
+ ck_fun, /* tell */
+ ck_fun, /* seek */
+ ck_trunc, /* truncate */
+ ck_fun, /* fcntl */
+ ck_fun, /* ioctl */
+ ck_fun, /* flock */
+ ck_fun, /* socket */
+ ck_fun, /* sockpair */
+ ck_fun, /* bind */
+ ck_fun, /* connect */
+ ck_fun, /* listen */
+ ck_fun, /* accept */
+ ck_fun, /* shutdown */
+ ck_fun, /* gsockopt */
+ ck_fun, /* ssockopt */
+ ck_fun, /* getsockname */
+ ck_fun, /* getpeername */
+ ck_ftst, /* lstat */
+ ck_ftst, /* stat */
+ ck_ftst, /* ftrread */
+ ck_ftst, /* ftrwrite */
+ ck_ftst, /* ftrexec */
+ ck_ftst, /* fteread */
+ ck_ftst, /* ftewrite */
+ ck_ftst, /* fteexec */
+ ck_ftst, /* ftis */
+ ck_ftst, /* fteowned */
+ ck_ftst, /* ftrowned */
+ ck_ftst, /* ftzero */
+ ck_ftst, /* ftsize */
+ ck_ftst, /* ftmtime */
+ ck_ftst, /* ftatime */
+ ck_ftst, /* ftctime */
+ ck_ftst, /* ftsock */
+ ck_ftst, /* ftchr */
+ ck_ftst, /* ftblk */
+ ck_ftst, /* ftfile */
+ ck_ftst, /* ftdir */
+ ck_ftst, /* ftpipe */
+ ck_ftst, /* ftlink */
+ ck_ftst, /* ftsuid */
+ ck_ftst, /* ftsgid */
+ ck_ftst, /* ftsvtx */
+ ck_ftst, /* fttty */
+ ck_ftst, /* fttext */
+ ck_ftst, /* ftbinary */
+ ck_fun, /* chdir */
+ ck_fun, /* chown */
+ ck_fun, /* chroot */
+ ck_fun, /* unlink */
+ ck_fun, /* chmod */
+ ck_fun, /* utime */
+ ck_fun, /* rename */
+ ck_fun, /* link */
+ ck_fun, /* symlink */
+ ck_fun, /* readlink */
+ ck_fun, /* mkdir */
+ ck_fun, /* rmdir */
+ ck_fun, /* open_dir */
+ ck_fun, /* readdir */
+ ck_fun, /* telldir */
+ ck_fun, /* seekdir */
+ ck_fun, /* rewinddir */
+ ck_fun, /* closedir */
+ ck_null, /* fork */
+ ck_null, /* wait */
+ ck_fun, /* waitpid */
+ ck_exec, /* system */
+ ck_exec, /* exec */
+ ck_fun, /* kill */
+ ck_null, /* getppid */
+ ck_fun, /* getpgrp */
+ ck_fun, /* setpgrp */
+ ck_fun, /* getpriority */
+ ck_fun, /* setpriority */
+ ck_null, /* time */
+ ck_null, /* tms */
+ ck_fun, /* localtime */
+ ck_fun, /* gmtime */
+ ck_fun, /* alarm */
+ ck_fun, /* sleep */
+ ck_fun, /* shmget */
+ ck_fun, /* shmctl */
+ ck_fun, /* shmread */
+ ck_fun, /* shmwrite */
+ ck_fun, /* msgget */
+ ck_fun, /* msgctl */
+ ck_fun, /* msgsnd */
+ ck_fun, /* msgrcv */
+ ck_fun, /* semget */
+ ck_fun, /* semctl */
+ ck_fun, /* semop */
+ ck_require, /* require */
+ ck_fun, /* dofile */
+ ck_eval, /* entereval */
+ ck_null, /* leaveeval */
+ ck_null, /* entertry */
+ ck_null, /* leavetry */
+ ck_fun, /* ghbyname */
+ ck_fun, /* ghbyaddr */
+ ck_null, /* ghostent */
+ ck_fun, /* gnbyname */
+ ck_fun, /* gnbyaddr */
+ ck_null, /* gnetent */
+ ck_fun, /* gpbyname */
+ ck_fun, /* gpbynumber */
+ ck_null, /* gprotoent */
+ ck_fun, /* gsbyname */
+ ck_fun, /* gsbyport */
+ ck_null, /* gservent */
+ ck_fun, /* shostent */
+ ck_fun, /* snetent */
+ ck_fun, /* sprotoent */
+ ck_fun, /* sservent */
+ ck_null, /* ehostent */
+ ck_null, /* enetent */
+ ck_null, /* eprotoent */
+ ck_null, /* eservent */
+ ck_fun, /* gpwnam */
+ ck_fun, /* gpwuid */
+ ck_null, /* gpwent */
+ ck_null, /* spwent */
+ ck_null, /* epwent */
+ ck_fun, /* ggrnam */
+ ck_fun, /* ggrgid */
+ ck_null, /* ggrent */
+ ck_null, /* sgrent */
+ ck_null, /* egrent */
+ ck_null, /* getlogin */
+ ck_fun, /* syscall */
+ ck_rfun, /* lock */
+ ck_null, /* threadsv */
+};
+
+OP * (CPERLscope(*ppaddr)[])(ARGSproto) = {
+ pp_null,
+ pp_stub,
+ pp_scalar,
+ pp_pushmark,
+ pp_wantarray,
+ pp_const,
+ pp_gvsv,
+ pp_gv,
+ pp_gelem,
+ pp_padsv,
+ pp_padav,
+ pp_padhv,
+ pp_padany,
+ pp_pushre,
+ pp_rv2gv,
+ pp_rv2sv,
+ pp_av2arylen,
+ pp_rv2cv,
+ pp_anoncode,
+ pp_prototype,
+ pp_refgen,
+ pp_srefgen,
+ pp_ref,
+ pp_bless,
+ pp_backtick,
+ pp_glob,
+ pp_readline,
+ pp_rcatline,
+ pp_regcmaybe,
+ pp_regcreset,
+ pp_regcomp,
+ pp_match,
+ pp_qr,
+ pp_subst,
+ pp_substcont,
+ pp_trans,
+ pp_sassign,
+ pp_aassign,
+ pp_chop,
+ pp_schop,
+ pp_chomp,
+ pp_schomp,
+ pp_defined,
+ pp_undef,
+ pp_study,
+ pp_pos,
+ pp_preinc,
+ pp_i_preinc,
+ pp_predec,
+ pp_i_predec,
+ pp_postinc,
+ pp_i_postinc,
+ pp_postdec,
+ pp_i_postdec,
+ pp_pow,
+ pp_multiply,
+ pp_i_multiply,
+ pp_divide,
+ pp_i_divide,
+ pp_modulo,
+ pp_i_modulo,
+ pp_repeat,
+ pp_add,
+ pp_i_add,
+ pp_subtract,
+ pp_i_subtract,
+ pp_concat,
+ pp_stringify,
+ pp_left_shift,
+ pp_right_shift,
+ pp_lt,
+ pp_i_lt,
+ pp_gt,
+ pp_i_gt,
+ pp_le,
+ pp_i_le,
+ pp_ge,
+ pp_i_ge,
+ pp_eq,
+ pp_i_eq,
+ pp_ne,
+ pp_i_ne,
+ pp_ncmp,
+ pp_i_ncmp,
+ pp_slt,
+ pp_sgt,
+ pp_sle,
+ pp_sge,
+ pp_seq,
+ pp_sne,
+ pp_scmp,
+ pp_bit_and,
+ pp_bit_xor,
+ pp_bit_or,
+ pp_negate,
+ pp_i_negate,
+ pp_not,
+ pp_complement,
+ pp_atan2,
+ pp_sin,
+ pp_cos,
+ pp_rand,
+ pp_srand,
+ pp_exp,
+ pp_log,
+ pp_sqrt,
+ pp_int,
+ pp_hex,
+ pp_oct,
+ pp_abs,
+ pp_length,
+ pp_substr,
+ pp_vec,
+ pp_index,
+ pp_rindex,
+ pp_sprintf,
+ pp_formline,
+ pp_ord,
+ pp_chr,
+ pp_crypt,
+ pp_ucfirst,
+ pp_lcfirst,
+ pp_uc,
+ pp_lc,
+ pp_quotemeta,
+ pp_rv2av,
+ pp_aelemfast,
+ pp_aelem,
+ pp_aslice,
+ pp_each,
+ pp_values,
+ pp_keys,
+ pp_delete,
+ pp_exists,
+ pp_rv2hv,
+ pp_helem,
+ pp_hslice,
+ pp_unpack,
+ pp_pack,
+ pp_split,
+ pp_join,
+ pp_list,
+ pp_lslice,
+ pp_anonlist,
+ pp_anonhash,
+ pp_splice,
+ pp_push,
+ pp_pop,
+ pp_shift,
+ pp_unshift,
+ pp_sort,
+ pp_reverse,
+ pp_grepstart,
+ pp_grepwhile,
+ pp_mapstart,
+ pp_mapwhile,
+ pp_range,
+ pp_flip,
+ pp_flop,
+ pp_and,
+ pp_or,
+ pp_xor,
+ pp_cond_expr,
+ pp_andassign,
+ pp_orassign,
+ pp_method,
+ pp_entersub,
+ pp_leavesub,
+ pp_caller,
+ pp_warn,
+ pp_die,
+ pp_reset,
+ pp_lineseq,
+ pp_nextstate,
+ pp_dbstate,
+ pp_unstack,
+ pp_enter,
+ pp_leave,
+ pp_scope,
+ pp_enteriter,
+ pp_iter,
+ pp_enterloop,
+ pp_leaveloop,
+ pp_return,
+ pp_last,
+ pp_next,
+ pp_redo,
+ pp_dump,
+ pp_goto,
+ pp_exit,
+ pp_open,
+ pp_close,
+ pp_pipe_op,
+ pp_fileno,
+ pp_umask,
+ pp_binmode,
+ pp_tie,
+ pp_untie,
+ pp_tied,
+ pp_dbmopen,
+ pp_dbmclose,
+ pp_sselect,
+ pp_select,
+ pp_getc,
+ pp_read,
+ pp_enterwrite,
+ pp_leavewrite,
+ pp_prtf,
+ pp_print,
+ pp_sysopen,
+ pp_sysseek,
+ pp_sysread,
+ pp_syswrite,
+ pp_send,
+ pp_recv,
+ pp_eof,
+ pp_tell,
+ pp_seek,
+ pp_truncate,
+ pp_fcntl,
+ pp_ioctl,
+ pp_flock,
+ pp_socket,
+ pp_sockpair,
+ pp_bind,
+ pp_connect,
+ pp_listen,
+ pp_accept,
+ pp_shutdown,
+ pp_gsockopt,
+ pp_ssockopt,
+ pp_getsockname,
+ pp_getpeername,
+ pp_lstat,
+ pp_stat,
+ pp_ftrread,
+ pp_ftrwrite,
+ pp_ftrexec,
+ pp_fteread,
+ pp_ftewrite,
+ pp_fteexec,
+ pp_ftis,
+ pp_fteowned,
+ pp_ftrowned,
+ pp_ftzero,
+ pp_ftsize,
+ pp_ftmtime,
+ pp_ftatime,
+ pp_ftctime,
+ pp_ftsock,
+ pp_ftchr,
+ pp_ftblk,
+ pp_ftfile,
+ pp_ftdir,
+ pp_ftpipe,
+ pp_ftlink,
+ pp_ftsuid,
+ pp_ftsgid,
+ pp_ftsvtx,
+ pp_fttty,
+ pp_fttext,
+ pp_ftbinary,
+ pp_chdir,
+ pp_chown,
+ pp_chroot,
+ pp_unlink,
+ pp_chmod,
+ pp_utime,
+ pp_rename,
+ pp_link,
+ pp_symlink,
+ pp_readlink,
+ pp_mkdir,
+ pp_rmdir,
+ pp_open_dir,
+ pp_readdir,
+ pp_telldir,
+ pp_seekdir,
+ pp_rewinddir,
+ pp_closedir,
+ pp_fork,
+ pp_wait,
+ pp_waitpid,
+ pp_system,
+ pp_exec,
+ pp_kill,
+ pp_getppid,
+ pp_getpgrp,
+ pp_setpgrp,
+ pp_getpriority,
+ pp_setpriority,
+ pp_time,
+ pp_tms,
+ pp_localtime,
+ pp_gmtime,
+ pp_alarm,
+ pp_sleep,
+ pp_shmget,
+ pp_shmctl,
+ pp_shmread,
+ pp_shmwrite,
+ pp_msgget,
+ pp_msgctl,
+ pp_msgsnd,
+ pp_msgrcv,
+ pp_semget,
+ pp_semctl,
+ pp_semop,
+ pp_require,
+ pp_dofile,
+ pp_entereval,
+ pp_leaveeval,
+ pp_entertry,
+ pp_leavetry,
+ pp_ghbyname,
+ pp_ghbyaddr,
+ pp_ghostent,
+ pp_gnbyname,
+ pp_gnbyaddr,
+ pp_gnetent,
+ pp_gpbyname,
+ pp_gpbynumber,
+ pp_gprotoent,
+ pp_gsbyname,
+ pp_gsbyport,
+ pp_gservent,
+ pp_shostent,
+ pp_snetent,
+ pp_sprotoent,
+ pp_sservent,
+ pp_ehostent,
+ pp_enetent,
+ pp_eprotoent,
+ pp_eservent,
+ pp_gpwnam,
+ pp_gpwuid,
+ pp_gpwent,
+ pp_spwent,
+ pp_epwent,
+ pp_ggrnam,
+ pp_ggrgid,
+ pp_ggrent,
+ pp_sgrent,
+ pp_egrent,
+ pp_getlogin,
+ pp_syscall,
+ pp_lock,
+ pp_threadsv,
+};
+
+int
+fprintf(PerlIO *stream, const char *format, ...)
+{
+ va_list(arglist);
+ va_start(arglist, format);
+ return PerlIO_vprintf(stream, format, arglist);
+}
+
+#undef PERLVAR
+#define PERLVAR(x, y)
+#undef PERLVARI
+#define PERLVARI(x, y, z) PL_##x = z;
+#undef PERLVARIC
+#define PERLVARIC(x, y, z) PL_##x = z;
+
+CPerlObj::CPerlObj(IPerlMem* ipM, IPerlEnv* ipE, IPerlStdIO* ipStd,
+ IPerlLIO* ipLIO, IPerlDir* ipD, IPerlSock* ipS, IPerlProc* ipP)
+{
+ memset(((char*)this)+sizeof(void*), 0, sizeof(CPerlObj)-sizeof(void*));
+
+#include "thrdvar.h"
+#include "intrpvar.h"
+#include "perlvars.h"
+
+ PL_piMem = ipM;
+ PL_piENV = ipE;
+ PL_piStdIO = ipStd;
+ PL_piLIO = ipLIO;
+ PL_piDir = ipD;
+ PL_piSock = ipS;
+ PL_piProc = ipP;
+}
+
+void*
+CPerlObj::operator new(size_t nSize, IPerlMem *pvtbl)
+{
+ if(pvtbl != NULL)
+ return pvtbl->Malloc(nSize);
+
+ return NULL;
+}
+
+int&
+CPerlObj::ErrorNo(void)
+{
+ return errno;
+}
+
+void
+CPerlObj::Init(void)
+{
+}
+
+#ifdef WIN32 /* XXX why are these needed? */
+bool
+do_exec(char *cmd)
+{
+ return PerlProc_Cmd(cmd);
+}
+
+int
+do_aspawn(void *vreally, void **vmark, void **vsp)
+{
+ return PerlProc_aspawn(vreally, vmark, vsp);
+}
+#endif /* WIN32 */
+
+#endif /* PERL_OBJECT */
diff --git a/gnu/usr.bin/perl/hints/beos.sh b/gnu/usr.bin/perl/hints/beos.sh
new file mode 100644
index 00000000000..8d76bc5146f
--- /dev/null
+++ b/gnu/usr.bin/perl/hints/beos.sh
@@ -0,0 +1,53 @@
+# BeOS hints file
+# $Id: beos.sh,v 1.1 1998/02/16 03:51:45 dogcow Exp $
+
+if [ ! -f beos/nm ]; then mwcc -w all -o beos/nm beos/nm.c 2>/dev/null; fi
+# If this fails, that's all right - it's only for PPC.
+
+prefix="/boot/home/config"
+
+#cpp="mwcc -e"
+
+libpth='/boot/beos/system/lib /boot/home/config/lib'
+usrinc='/boot/develop/headers/posix'
+locinc='/boot/develop/headers/ /boot/home/config/include'
+
+libc='/boot/beos/system/lib/libroot.so'
+libs=' '
+
+d_bcmp='define'
+d_bcopy='define'
+d_bzero='define'
+d_index='define'
+#d_htonl='define' # It exists, but much hackery would be required to support.
+# a bunch of extra includes would have to be added, and it's only used at
+# one place in the non-socket perl code.
+
+#these are all in libdll.a, which my version of nm doesn't know how to parse.
+#if I can get it to both do that, and scan multiple library files, perhaps
+#these can be gotten rid of.
+
+usemymalloc='n'
+# Hopefully, Be's malloc knows better than perl's.
+
+d_link='undef'
+dont_use_nlink='define'
+# no posix (aka hard) links for us!
+
+d_syserrlst='undef'
+# the array syserrlst[] is useless for the most part.
+# large negative numbers really kind of suck in arrays.
+
+d_socket='undef'
+d_gethbyaddr='undef'
+d_gethbyname='undef'
+d_getsbyname='undef'
+
+ld='gcc'
+
+# Sockets really don't work with the current version of perl and the
+# current BeOS sockets; I suspect that a new module a la GSAR's WIN32 port
+# will be required.
+# Of course, this may also change with R5.
+
+export PATH="$PATH:$PWD/beos"
diff --git a/gnu/usr.bin/perl/hints/dos_djgpp.sh b/gnu/usr.bin/perl/hints/dos_djgpp.sh
new file mode 100644
index 00000000000..7c59428c7e4
--- /dev/null
+++ b/gnu/usr.bin/perl/hints/dos_djgpp.sh
@@ -0,0 +1,65 @@
+# hints file for dos/djgpp v2.xx
+# Original by Laszlo Molnar <molnarl@cdata.tvnet.hu>
+
+# 971015 - archname changed from 'djgpp' to 'dos-djgpp'
+# 971210 - threads support
+
+archname='dos-djgpp'
+archobjs='djgpp.o'
+path_sep=\;
+startsh="#! /bin/sh"
+
+cc='gcc'
+ld='gcc'
+usrinc="$DJDIR/include"
+
+libpth="$DJDIR/lib"
+libc="$libpth/libc.a"
+
+so='none'
+usedl='n'
+
+firstmakefile='GNUmakefile'
+exe_ext='.exe'
+
+randbits=31
+lns='cp'
+
+usenm='true'
+
+d_link='undef' # these are empty functions in libc.a
+d_symlink='undef'
+d_fork='undef'
+d_pipe='undef'
+
+startperl='#!perl'
+
+case "X$optimize" in
+ X)
+ optimize="-O2 -malign-loops=2 -malign-jumps=2 -malign-functions=2"
+ ;;
+esac
+ldflags='-s'
+usemymalloc='n'
+timetype='time_t'
+
+prefix=$DJDIR
+privlib=$prefix/lib/perl5
+archlib=$privlib
+sitelib=$privlib/site
+sitearch=$sitelib
+
+eagain='EAGAIN'
+rd_nodata='-1'
+
+# This script UU/usethreads.cbu will get 'called-back' by Configure
+# after it has prompted the user for whether to use threads.
+cat > UU/usethreads.cbu <<'EOCBU'
+case "$usethreads" in
+$define|true|[yY]*)
+ set `echo X "$libswanted "| sed -e 's/ c / gthreads c /'`
+ shift
+ libswanted="$*"
+ ;;
+esac
+EOCBU
diff --git a/gnu/usr.bin/perl/hints/gnu.sh b/gnu/usr.bin/perl/hints/gnu.sh
new file mode 100644
index 00000000000..927bceab9df
--- /dev/null
+++ b/gnu/usr.bin/perl/hints/gnu.sh
@@ -0,0 +1,33 @@
+# hints/gnu.sh
+# Last modified: Thu Dec 10 20:47:28 CET 1998
+# Mark Kettenis <kettenis@phys.uva.nl>
+
+# libnsl is unusable on the Hurd.
+# XXX remove this once SUNRPC is implemented.
+set `echo X "$libswanted "| sed -e 's/ nsl / /'`
+shift
+libswanted="$*"
+
+case "$optimize" in
+'') optimize='-O2' ;;
+esac
+
+# Flags needed to produce shared libraries.
+lddlflags='-shared'
+
+# Flags needed by programs that use dynamic linking.
+ccdlflags='-Wl,-E'
+
+# The following routines are only available as stubs in GNU libc.
+# XXX remove this once metaconf detects the GNU libc stubs.
+d_msgctl='undef'
+d_msgget='undef'
+d_msgrcv='undef'
+d_msgsnd='undef'
+d_semctl='undef'
+d_semget='undef'
+d_semop='undef'
+d_shmat='undef'
+d_shmctl='undef'
+d_shmdt='undef'
+d_shmget='undef'
diff --git a/gnu/usr.bin/perl/hints/isc_2.sh b/gnu/usr.bin/perl/hints/isc_2.sh
index c73908cbc68..d8ca7dc63a7 100644
--- a/gnu/usr.bin/perl/hints/isc_2.sh
+++ b/gnu/usr.bin/perl/hints/isc_2.sh
@@ -20,3 +20,6 @@ esac
# Compensate for conflicts in <net/errno.h>
doio_cflags='ccflags="$ccflags -DENOTSOCK=103"'
pp_sys_cflags='ccflags="$ccflags -DENOTSOCK=103"'
+
+# for ext/IPC/SysV/SysV.xs
+ccflags="$ccflags -DPERL_ISC"
diff --git a/gnu/usr.bin/perl/hints/mint.sh b/gnu/usr.bin/perl/hints/mint.sh
new file mode 100644
index 00000000000..22d854c397c
--- /dev/null
+++ b/gnu/usr.bin/perl/hints/mint.sh
@@ -0,0 +1,94 @@
+# hints/mint.sh
+#
+# talk to gufl0000@stud.uni-sb.de if you want to change this file.
+# Please read the README.mint file.
+#
+# misc stuff
+
+case `uname -m` in
+ atarist*) archname="m68000-mint"
+ ;;
+ *) archname="m68k-mint"
+ ;;
+esac
+
+here=`pwd | tr -d '\015'`
+
+cc='gcc'
+
+# The weird include path is really to work around some bugs in
+# broken system header files.
+ccflags="-D__MINT__ -Uatarist -DDEBUGGING -I$here/../mint"
+
+# libs
+
+libpth="$prefix/lib /usr/lib /usr/local/lib"
+glibpth="$libpth"
+xlibpth="$libpth"
+
+libswanted='gdbm socket port m'
+so='none'
+
+#
+# compiler & linker flags
+#
+optimize='-O2 -fomit-frame-pointer -fno-defer-pop -fstrength-reduce'
+
+# The setlocale function in the MiNTLib is actually a bad joke. We
+# lend a workaround from Ultrix. If neither LC_ALL nor LANG is
+# set in the environment, perl won't complain. If one is set to
+# anything but "C" you will see a warning. Note that you can
+# still use the GNU extension "$LANGUAGE" if you want to use
+# the i18n features of some GNU packages.
+util_cflags='ccflags="$ccflags -DLOCALE_ENVIRON_REQUIRED"'
+
+#
+# Some good answers to the questions in Configure:
+usenm='true'
+d_suidsafe='true'
+clocktype='long'
+usevfork='true'
+d_fsetpos='fpos_t'
+gidtype='gid_t'
+groupstype='gid_t'
+lseektype='long'
+models='none'
+modetype='mode_t'
+sizetype='size_t'
+timetype='time_t'
+uidtype='uid_t'
+
+# Don't remove that leading tab character (Configure Black Magic (TM)).
+ broken_pwd=
+case "`/bin/pwd|tr -d xy|tr '\015\012' 'xy'`" in
+*xy) broken_pwd=yes ;;
+esac
+
+if test X"$broken_pwd" = Xyes
+then
+ echo " "
+ echo "*** Building fixed 'pwd'... (as described in README.mint) ***"
+ echo " "
+ cd mint
+ make pwd
+ cd ..
+ if test -x mint/pwd -a -w /usr/bin
+ then
+ echo " "
+ echo "*** Installing fixed 'pwd'... ***"
+ echo " "
+ cd mint
+ make install
+ cd ..
+ if cmp -s mint/pwd /usr/bin/pwd
+ then
+ echo "*** Installed fixed 'pwd' successfully. ***"
+ else
+ echo "*** Failed to install fixed 'pwd'. Aborting. ***"
+ exit 1
+ fi
+ else
+ echo "*** Cannot install fixed 'pwd'. Aborting. ***"
+ exit 1
+ fi
+fi
diff --git a/gnu/usr.bin/perl/hints/openbsd.sh b/gnu/usr.bin/perl/hints/openbsd.sh
new file mode 100644
index 00000000000..e9d8ea483d5
--- /dev/null
+++ b/gnu/usr.bin/perl/hints/openbsd.sh
@@ -0,0 +1,61 @@
+# hints/openbsd.sh
+#
+# hints file for OpenBSD; Todd Miller <millert@openbsd.org>
+# Edited to allow Configure command-line overrides by
+# Andy Dougherty <doughera@lafcol.lafayette.edu>
+#
+
+# OpenBSD has a better malloc than perl...
+test "$usemymalloc" || usemymalloc='n'
+
+# Currently, vfork(2) is not a real win over fork(2) but this will
+# change in a future release.
+usevfork='true'
+
+# setre?[ug]id() have been replaced by the _POSIX_SAVED_IDS versions
+# in 4.4BSD. Configure will find these but they are just emulated
+# and do not have the same semantics as in 4.3BSD.
+d_setregid='undef'
+d_setreuid='undef'
+d_setrgid='undef'
+d_setruid='undef'
+
+#
+# Not all platforms support shared libs...
+#
+case `uname -m` in
+alpha|mips|powerpc|vax)
+ d_dlopen=$undef
+ ;;
+*)
+ d_dlopen=$define
+ d_dlerror=$define
+ # we use -fPIC here because -fpic is *NOT* enough for some of the
+ # extensions like Tk on some OpenBSD platforms (ie: sparc)
+ cccdlflags="-DPIC -fPIC $cccdlflags"
+ lddlflags="-Bforcearchive -Bshareable $lddlflags"
+ ;;
+esac
+
+# OpenBSD doesn't need libcrypt but many folks keep a stub lib
+# around for old NetBSD binaries.
+libswanted=`echo $libswanted | sed 's/ crypt / /'`
+
+# Configure can't figure this out non-interactively
+d_suidsafe='define'
+
+# cc is gcc so we can do better than -O
+# Allow a command-line override, such as -Doptimize=-g
+test "$optimize" || optimize='-O2'
+
+# This script UU/usethreads.cbu will get 'called-back' by Configure
+# after it has prompted the user for whether to use threads.
+cat > UU/usethreads.cbu <<'EOCBU'
+case "$usethreads" in
+$define|true|[yY]*)
+ # any openbsd version dependencies with pthreads?
+ libswanted="$libswanted pthread"
+esac
+EOCBU
+
+# end
diff --git a/gnu/usr.bin/perl/hints/uwin.sh b/gnu/usr.bin/perl/hints/uwin.sh
new file mode 100644
index 00000000000..0e5e11adfd6
--- /dev/null
+++ b/gnu/usr.bin/perl/hints/uwin.sh
@@ -0,0 +1,36 @@
+#
+# hint file for U/WIN (UNIX for Windows 95/NT)
+#
+# created for U/WIN version 1.55
+# running under Windows NT 4.0 SP 3
+# using MSVC++ 5.0 for the compiler
+#
+# created by Joe Buehler (jbuehler@hekimian.com)
+#
+# for information about U/WIN see www.gtlinc.com
+#
+
+#ccflags=-D_BSDCOMPAT
+# confusion in Configure over preprocessor
+cppstdin=`pwd`/cppstdin
+cpprun=`pwd`/cppstdin
+# pwd.h confuses Configure
+d_pwcomment=undef
+d_pwgecos=define
+# work around case-insensitive file names
+firstmakefile=GNUmakefile
+# avoid compilation error
+i_utime=undef
+# compile/link flags
+ldflags=-g
+optimize=-g
+static_ext="B Data/Dumper Fcntl IO IPC/SysV Opcode POSIX SDBM_File Socket attrs"
+#static_ext=none
+# dynamic loading needs work
+usedl=undef
+# perl malloc will not work
+usemymalloc=n
+# cannot use nm
+usenm=undef
+# vfork() is buggy (as of 1.55 anyway)
+usevfork=false
diff --git a/gnu/usr.bin/perl/intrpvar.h b/gnu/usr.bin/perl/intrpvar.h
new file mode 100644
index 00000000000..1f6244d557a
--- /dev/null
+++ b/gnu/usr.bin/perl/intrpvar.h
@@ -0,0 +1,219 @@
+/***********************************************/
+/* Global only to current interpreter instance */
+/***********************************************/
+
+/* Don't forget to re-run embed.pl to propagate changes! */
+
+/* The 'I' prefix is only needed for vars that need appropriate #defines
+ * generated when built with or without MULTIPLICITY. It is also used
+ * to generate the appropriate export list for win32.
+ *
+ * When building without MULTIPLICITY, these variables will be truly global.
+ *
+ * Avoid build-specific #ifdefs here, like DEBUGGING. That way,
+ * we can keep binary compatibility of the curinterp structure */
+
+/* pseudo environmental stuff */
+PERLVAR(Iorigargc, int)
+PERLVAR(Iorigargv, char **)
+PERLVAR(Ienvgv, GV *)
+PERLVAR(Isiggv, GV *)
+PERLVAR(Iincgv, GV *)
+PERLVAR(Ihintgv, GV *)
+PERLVAR(Iorigfilename, char *)
+PERLVAR(Idiehook, SV *)
+PERLVAR(Iwarnhook, SV *)
+PERLVAR(Iparsehook, SV *)
+PERLVAR(Icddir, char *) /* switches */
+PERLVAR(Iminus_c, bool)
+PERLVAR(Ipatchlevel[10],char)
+PERLVAR(Ilocalpatches, char **)
+PERLVARI(Isplitstr, char *, " ")
+PERLVAR(Ipreprocess, bool)
+PERLVAR(Iminus_n, bool)
+PERLVAR(Iminus_p, bool)
+PERLVAR(Iminus_l, bool)
+PERLVAR(Iminus_a, bool)
+PERLVAR(Iminus_F, bool)
+PERLVAR(Idoswitches, bool)
+PERLVAR(Idowarn, bool)
+PERLVAR(Idoextract, bool)
+PERLVAR(Isawampersand, bool) /* must save all match strings */
+PERLVAR(Isawstudy, bool) /* do fbm_instr on all strings */
+PERLVAR(Isawvec, bool)
+PERLVAR(Iunsafe, bool)
+PERLVAR(Iinplace, char *)
+PERLVAR(Ie_script, SV *)
+PERLVAR(Iperldb, U32)
+
+/* This value may be raised by extensions for testing purposes */
+/* 0=none, 1=full, 2=full with checks */
+PERLVARI(Iperl_destruct_level, int, 0)
+
+/* magical thingies */
+PERLVAR(Ibasetime, Time_t) /* $^T */
+PERLVAR(Iformfeed, SV *) /* $^L */
+
+
+PERLVARI(Imaxsysfd, I32, MAXSYSFD)
+ /* top fd to pass to subprocesses */
+PERLVAR(Imultiline, int) /* $*--do strings hold >1 line? */
+PERLVAR(Istatusvalue, I32) /* $? */
+#ifdef VMS
+PERLVAR(Istatusvalue_vms,U32)
+#endif
+
+/* shortcuts to various I/O objects */
+PERLVAR(Istdingv, GV *)
+PERLVAR(Idefgv, GV *)
+PERLVAR(Iargvgv, GV *)
+PERLVAR(Iargvoutgv, GV *)
+
+/* shortcuts to regexp stuff */
+/* XXX these three aren't used anywhere */
+PERLVAR(Ileftgv, GV *)
+PERLVAR(Iampergv, GV *)
+PERLVAR(Irightgv, GV *)
+
+/* this one needs to be moved to thrdvar.h and accessed via
+ * find_threadsv() when USE_THREADS */
+PERLVAR(Ireplgv, GV *)
+
+/* shortcuts to misc objects */
+PERLVAR(Ierrgv, GV *)
+
+/* shortcuts to debugging objects */
+PERLVAR(IDBgv, GV *)
+PERLVAR(IDBline, GV *)
+PERLVAR(IDBsub, GV *)
+PERLVAR(IDBsingle, SV *)
+PERLVAR(IDBtrace, SV *)
+PERLVAR(IDBsignal, SV *)
+PERLVAR(Ilineary, AV *) /* lines of script for debugger */
+PERLVAR(Idbargs, AV *) /* args to call listed by caller function */
+
+/* symbol tables */
+PERLVAR(Idebstash, HV *) /* symbol table for perldb package */
+PERLVAR(Iglobalstash, HV *) /* global keyword overrides imported here */
+PERLVAR(Icurstname, SV *) /* name of current package */
+PERLVAR(Ibeginav, AV *) /* names of BEGIN subroutines */
+PERLVAR(Iendav, AV *) /* names of END subroutines */
+PERLVAR(Iinitav, AV *) /* names of INIT subroutines */
+PERLVAR(Istrtab, HV *) /* shared string table */
+PERLVARI(Isub_generation,U32,1) /* incr to invalidate method cache */
+
+/* memory management */
+PERLVAR(Isv_count, I32) /* how many SV* are currently allocated */
+PERLVAR(Isv_objcount, I32) /* how many objects are currently allocated */
+PERLVAR(Isv_root, SV*) /* storage for SVs belonging to interp */
+PERLVAR(Isv_arenaroot, SV*) /* list of areas for garbage collection */
+
+/* funky return mechanisms */
+PERLVAR(Ilastspbase, I32)
+PERLVAR(Ilastsize, I32)
+PERLVAR(Iforkprocess, int) /* so do_open |- can return proc# */
+
+/* subprocess state */
+PERLVAR(Ifdpid, AV *) /* keep fd-to-pid mappings for my_popen */
+
+/* internal state */
+PERLVAR(Itainting, bool) /* doing taint checks */
+PERLVARI(Iop_mask, char *, NULL) /* masked operations for safe evals */
+PERLVAR(Ilast_proto, char *) /* Prototype of last sub seen. */
+
+/* trace state */
+PERLVAR(Idlevel, I32)
+PERLVARI(Idlmax, I32, 128)
+PERLVAR(Idebname, char *)
+PERLVAR(Idebdelim, char *)
+
+/* current interpreter roots */
+PERLVAR(Imain_cv, CV *)
+PERLVAR(Imain_root, OP *)
+PERLVAR(Imain_start, OP *)
+PERLVAR(Ieval_root, OP *)
+PERLVAR(Ieval_start, OP *)
+
+/* runtime control stuff */
+PERLVARI(Icurcopdb, COP *, NULL)
+PERLVARI(Icopline, line_t, NOLINE)
+
+/* statics moved here for shared library purposes */
+PERLVAR(Istrchop, SV) /* return value from chop */
+PERLVAR(Ifilemode, int) /* so nextargv() can preserve mode */
+PERLVAR(Ilastfd, int) /* what to preserve mode on */
+PERLVAR(Ioldname, char *) /* what to preserve mode on */
+PERLVAR(IArgv, char **) /* stuff to free from do_aexec, vfork safe */
+PERLVAR(ICmd, char *) /* stuff to free from do_aexec, vfork safe */
+PERLVAR(Imystrk, SV *) /* temp key string for do_each() */
+PERLVAR(Idumplvl, I32) /* indentation level on syntax tree dump */
+PERLVAR(Ioldlastpm, PMOP *) /* for saving regexp context in debugger */
+PERLVAR(Igensym, I32) /* next symbol for getsym() to define */
+PERLVAR(Ipreambled, bool)
+PERLVAR(Ipreambleav, AV *)
+PERLVARI(Ilaststatval, int, -1)
+PERLVARI(Ilaststype, I32, OP_STAT)
+PERLVAR(Imess_sv, SV *)
+
+/* XXX shouldn't these be per-thread? --GSAR */
+PERLVAR(Iors, char *) /* output record separator $\ */
+PERLVAR(Iorslen, STRLEN)
+PERLVAR(Iofmt, char *) /* output format for numbers $# */
+
+/* interpreter atexit processing */
+PERLVARI(Iexitlist, PerlExitListEntry *, NULL)
+ /* list of exit functions */
+PERLVARI(Iexitlistlen, I32, 0) /* length of same */
+PERLVAR(Imodglobal, HV *) /* per-interp module data */
+
+/* these used to be in global before 5.004_68 */
+PERLVARI(Iprofiledata, U32 *, NULL) /* table of ops, counts */
+PERLVARI(Irsfp, PerlIO * VOL, Nullfp) /* current source file pointer */
+PERLVARI(Irsfp_filters, AV *, Nullav) /* keeps active source filters */
+
+PERLVAR(Icompiling, COP) /* compiling/done executing marker */
+
+PERLVAR(Icompcv, CV *) /* currently compiling subroutine */
+PERLVAR(Icomppad, AV *) /* storage for lexically scoped temporaries */
+PERLVAR(Icomppad_name, AV *) /* variable names for "my" variables */
+PERLVAR(Icomppad_name_fill, I32) /* last "introduced" variable offset */
+PERLVAR(Icomppad_name_floor, I32) /* start of vars in innermost block */
+
+#ifdef HAVE_INTERP_INTERN
+PERLVAR(Isys_intern, struct interp_intern)
+ /* platform internals */
+#endif
+
+/* more statics moved here */
+PERLVARI(Igeneration, int, 100) /* from op.c */
+PERLVAR(IDBcv, CV *) /* from perl.c */
+PERLVAR(Iarchpat_auto, char*) /* from perl.c */
+
+PERLVARI(Iin_clean_objs,bool, FALSE) /* from sv.c */
+PERLVARI(Iin_clean_all, bool, FALSE) /* from sv.c */
+
+PERLVAR(Ilinestart, char *) /* beg. of most recently read line */
+PERLVAR(Ipending_ident, char) /* pending identifier lookup */
+PERLVAR(Isublex_info, SUBLEXINFO) /* from toke.c */
+
+#ifdef USE_THREADS
+PERLVAR(Ithrsv, SV *) /* struct perl_thread for main thread */
+PERLVARI(Ithreadnum, U32, 0) /* incremented each thread creation */
+PERLVAR(Istrtab_mutex, perl_mutex) /* Mutex for string table access */
+#endif /* USE_THREADS */
+
+PERLVARI(Ibytecode_iv_overflows,int, 0) /* from bytecode.h */
+PERLVAR(Ibytecode_sv, SV *)
+PERLVAR(Ibytecode_pv, XPV)
+PERLVAR(Ibytecode_obj_list, void **)
+PERLVARI(Ibytecode_obj_list_fill, I32, -1)
+
+#ifdef PERL_OBJECT
+PERLVARI(piMem, IPerlMem*, NULL)
+PERLVARI(piENV, IPerlEnv*, NULL)
+PERLVARI(piStdIO, IPerlStdIO*, NULL)
+PERLVARI(piLIO, IPerlLIO*, NULL)
+PERLVARI(piDir, IPerlDir*, NULL)
+PERLVARI(piSock, IPerlSock*, NULL)
+PERLVARI(piProc, IPerlProc*, NULL)
+#endif
diff --git a/gnu/usr.bin/perl/iperlsys.h b/gnu/usr.bin/perl/iperlsys.h
new file mode 100644
index 00000000000..da8c5d6ac93
--- /dev/null
+++ b/gnu/usr.bin/perl/iperlsys.h
@@ -0,0 +1,931 @@
+/*
+ * iperlsys.h - Perl's interface to the system
+ *
+ * This file defines the system level functionality that perl needs.
+ *
+ * When using C, this definition is in the form of a set of macros
+ * that can be #defined to the system-level function (or a wrapper
+ * provided elsewhere).
+ *
+ * When using C++ with -DPERL_OBJECT, this definition is in the
+ * form of a set of virtual base classes which must be subclassed to
+ * provide a real implementation. The Perl Object will use instances
+ * of this implementation to use the system-level functionality.
+ *
+ * GSAR 21-JUN-98
+ */
+
+#ifndef __Inc__IPerl___
+#define __Inc__IPerl___
+
+/*
+ * PerlXXX_YYY explained - DickH and DougL @ ActiveState.com
+ *
+ * XXX := functional group
+ * YYY := stdlib/OS function name
+ *
+ * Continuing with the theme of PerlIO, all OS functionality was
+ * encapsulated into one of several interfaces.
+ *
+ * PerlIO - stdio
+ * PerlLIO - low level I/O
+ * PerlMem - malloc, realloc, free
+ * PerlDir - directory related
+ * PerlEnv - process environment handling
+ * PerlProc - process control
+ * PerlSock - socket functions
+ *
+ *
+ * The features of this are:
+ * 1. All OS dependant code is in the Perl Host and not the Perl Core.
+ * (At least this is the holy grail goal of this work)
+ * 2. The Perl Host (see perl.h for description) can provide a new and
+ * improved interface to OS functionality if required.
+ * 3. Developers can easily hook into the OS calls for instrumentation
+ * or diagnostic purposes.
+ *
+ * What was changed to do this:
+ * 1. All calls to OS functions were replaced with PerlXXX_YYY
+ *
+ */
+
+
+/*
+ Interface for perl stdio functions
+*/
+
+
+/* Clean up (or at least document) the various possible #defines.
+ This section attempts to match the 5.003_03 Configure variables
+ onto the 5.003_02 header file values.
+ I can't figure out where USE_STDIO was supposed to be set.
+ --AD
+*/
+#ifndef USE_PERLIO
+# define PERLIO_IS_STDIO
+#endif
+
+/* Below is the 5.003_02 stuff. */
+#ifdef USE_STDIO
+# ifndef PERLIO_IS_STDIO
+# define PERLIO_IS_STDIO
+# endif
+#else
+extern void PerlIO_init _((void));
+#endif
+
+#ifdef PERL_OBJECT
+
+#ifndef PerlIO
+typedef struct _PerlIO PerlIO;
+#endif
+
+class IPerlStdIO
+{
+public:
+ virtual PerlIO * Stdin(void) = 0;
+ virtual PerlIO * Stdout(void) = 0;
+ virtual PerlIO * Stderr(void) = 0;
+ virtual PerlIO * Open(const char *, const char *, int &err) = 0;
+ virtual int Close(PerlIO*, int &err) = 0;
+ virtual int Eof(PerlIO*, int &err) = 0;
+ virtual int Error(PerlIO*, int &err) = 0;
+ virtual void Clearerr(PerlIO*, int &err) = 0;
+ virtual int Getc(PerlIO*, int &err) = 0;
+ virtual char * GetBase(PerlIO *, int &err) = 0;
+ virtual int GetBufsiz(PerlIO *, int &err) = 0;
+ virtual int GetCnt(PerlIO *, int &err) = 0;
+ virtual char * GetPtr(PerlIO *, int &err) = 0;
+ virtual char * Gets(PerlIO*, char*, int, int& err) = 0;
+ virtual int Putc(PerlIO*, int, int &err) = 0;
+ virtual int Puts(PerlIO*, const char *, int &err) = 0;
+ virtual int Flush(PerlIO*, int &err) = 0;
+ virtual int Ungetc(PerlIO*,int, int &err) = 0;
+ virtual int Fileno(PerlIO*, int &err) = 0;
+ virtual PerlIO * Fdopen(int, const char *, int &err) = 0;
+ virtual PerlIO * Reopen(const char*, const char*, PerlIO*, int &err) = 0;
+ virtual SSize_t Read(PerlIO*,void *,Size_t, int &err) = 0;
+ virtual SSize_t Write(PerlIO*,const void *,Size_t, int &err) = 0;
+ virtual void SetBuf(PerlIO *, char*, int &err) = 0;
+ virtual int SetVBuf(PerlIO *, char*, int, Size_t, int &err) = 0;
+ virtual void SetCnt(PerlIO *, int, int &err) = 0;
+ virtual void SetPtrCnt(PerlIO *, char *, int, int& err) = 0;
+ virtual void Setlinebuf(PerlIO*, int &err) = 0;
+ virtual int Printf(PerlIO*, int &err, const char *,...) = 0;
+ virtual int Vprintf(PerlIO*, int &err, const char *, va_list) = 0;
+ virtual long Tell(PerlIO*, int &err) = 0;
+ virtual int Seek(PerlIO*, Off_t, int, int &err) = 0;
+ virtual void Rewind(PerlIO*, int &err) = 0;
+ virtual PerlIO * Tmpfile(int &err) = 0;
+ virtual int Getpos(PerlIO*, Fpos_t *, int &err) = 0;
+ virtual int Setpos(PerlIO*, const Fpos_t *, int &err) = 0;
+ virtual void Init(int &err) = 0;
+ virtual void InitOSExtras(void* p) = 0;
+#ifdef WIN32
+ virtual int OpenOSfhandle(long osfhandle, int flags) = 0;
+ virtual int GetOSfhandle(int filenum) = 0;
+#endif
+};
+
+
+
+#ifdef USE_STDIO_PTR
+# define PerlIO_has_cntptr(f) 1
+# ifdef STDIO_CNT_LVALUE
+# define PerlIO_canset_cnt(f) 1
+# ifdef STDIO_PTR_LVALUE
+# define PerlIO_fast_gets(f) 1
+# endif
+# else
+# define PerlIO_canset_cnt(f) 0
+# endif
+#else /* USE_STDIO_PTR */
+# define PerlIO_has_cntptr(f) 0
+# define PerlIO_canset_cnt(f) 0
+#endif /* USE_STDIO_PTR */
+
+#ifndef PerlIO_fast_gets
+#define PerlIO_fast_gets(f) 0
+#endif
+
+#ifdef FILE_base
+#define PerlIO_has_base(f) 1
+#else
+#define PerlIO_has_base(f) 0
+#endif
+
+#define PerlIO_stdin() PL_piStdIO->Stdin()
+#define PerlIO_stdout() PL_piStdIO->Stdout()
+#define PerlIO_stderr() PL_piStdIO->Stderr()
+#define PerlIO_open(x,y) PL_piStdIO->Open((x),(y), ErrorNo())
+#define PerlIO_close(f) PL_piStdIO->Close((f), ErrorNo())
+#define PerlIO_eof(f) PL_piStdIO->Eof((f), ErrorNo())
+#define PerlIO_error(f) PL_piStdIO->Error((f), ErrorNo())
+#define PerlIO_clearerr(f) PL_piStdIO->Clearerr((f), ErrorNo())
+#define PerlIO_getc(f) PL_piStdIO->Getc((f), ErrorNo())
+#define PerlIO_get_base(f) PL_piStdIO->GetBase((f), ErrorNo())
+#define PerlIO_get_bufsiz(f) PL_piStdIO->GetBufsiz((f), ErrorNo())
+#define PerlIO_get_cnt(f) PL_piStdIO->GetCnt((f), ErrorNo())
+#define PerlIO_get_ptr(f) PL_piStdIO->GetPtr((f), ErrorNo())
+#define PerlIO_putc(f,c) PL_piStdIO->Putc((f),(c), ErrorNo())
+#define PerlIO_puts(f,s) PL_piStdIO->Puts((f),(s), ErrorNo())
+#define PerlIO_flush(f) PL_piStdIO->Flush((f), ErrorNo())
+#define PerlIO_gets(s, n, fp) PL_piStdIO->Gets((fp), s, n, ErrorNo())
+#define PerlIO_ungetc(f,c) PL_piStdIO->Ungetc((f),(c), ErrorNo())
+#define PerlIO_fileno(f) PL_piStdIO->Fileno((f), ErrorNo())
+#define PerlIO_fdopen(f, s) PL_piStdIO->Fdopen((f),(s), ErrorNo())
+#define PerlIO_reopen(p, m, f) PL_piStdIO->Reopen((p), (m), (f), ErrorNo())
+#define PerlIO_read(f,buf,count) \
+ (SSize_t)PL_piStdIO->Read((f), (buf), (count), ErrorNo())
+#define PerlIO_write(f,buf,count) \
+ PL_piStdIO->Write((f), (buf), (count), ErrorNo())
+#define PerlIO_setbuf(f,b) PL_piStdIO->SetBuf((f), (b), ErrorNo())
+#define PerlIO_setvbuf(f,b,t,s) PL_piStdIO->SetVBuf((f), (b), (t), (s), ErrorNo())
+#define PerlIO_set_cnt(f,c) PL_piStdIO->SetCnt((f), (c), ErrorNo())
+#define PerlIO_set_ptrcnt(f,p,c) \
+ PL_piStdIO->SetPtrCnt((f), (p), (c), ErrorNo())
+#define PerlIO_setlinebuf(f) PL_piStdIO->Setlinebuf((f), ErrorNo())
+#define PerlIO_printf fprintf
+#define PerlIO_stdoutf PL_piStdIO->Printf
+#define PerlIO_vprintf(f,fmt,a) PL_piStdIO->Vprintf((f), ErrorNo(), (fmt),a)
+#define PerlIO_tell(f) PL_piStdIO->Tell((f), ErrorNo())
+#define PerlIO_seek(f,o,w) PL_piStdIO->Seek((f),(o),(w), ErrorNo())
+#define PerlIO_getpos(f,p) PL_piStdIO->Getpos((f),(p), ErrorNo())
+#define PerlIO_setpos(f,p) PL_piStdIO->Setpos((f),(p), ErrorNo())
+#define PerlIO_rewind(f) PL_piStdIO->Rewind((f), ErrorNo())
+#define PerlIO_tmpfile() PL_piStdIO->Tmpfile(ErrorNo())
+#define PerlIO_init() PL_piStdIO->Init(ErrorNo())
+#undef init_os_extras
+#define init_os_extras() PL_piStdIO->InitOSExtras(this)
+
+#else /* PERL_OBJECT */
+
+#include "perlsdio.h"
+
+#endif /* PERL_OBJECT */
+
+#ifndef PERLIO_IS_STDIO
+#ifdef USE_SFIO
+#include "perlsfio.h"
+#endif /* USE_SFIO */
+#endif /* PERLIO_IS_STDIO */
+
+#ifndef EOF
+#define EOF (-1)
+#endif
+
+/* This is to catch case with no stdio */
+#ifndef BUFSIZ
+#define BUFSIZ 1024
+#endif
+
+#ifndef SEEK_SET
+#define SEEK_SET 0
+#endif
+
+#ifndef SEEK_CUR
+#define SEEK_CUR 1
+#endif
+
+#ifndef SEEK_END
+#define SEEK_END 2
+#endif
+
+#ifndef PerlIO
+struct _PerlIO;
+#define PerlIO struct _PerlIO
+#endif /* No PerlIO */
+
+#ifndef Fpos_t
+#define Fpos_t long
+#endif
+
+#ifndef NEXT30_NO_ATTRIBUTE
+#ifndef HASATTRIBUTE /* disable GNU-cc attribute checking? */
+#ifdef __attribute__ /* Avoid possible redefinition errors */
+#undef __attribute__
+#endif
+#define __attribute__(attr)
+#endif
+#endif
+
+#ifndef PerlIO_stdoutf
+extern int PerlIO_stdoutf _((const char *,...))
+ __attribute__((format (printf, 1, 2)));
+#endif
+#ifndef PerlIO_puts
+extern int PerlIO_puts _((PerlIO *,const char *));
+#endif
+#ifndef PerlIO_open
+extern PerlIO * PerlIO_open _((const char *,const char *));
+#endif
+#ifndef PerlIO_close
+extern int PerlIO_close _((PerlIO *));
+#endif
+#ifndef PerlIO_eof
+extern int PerlIO_eof _((PerlIO *));
+#endif
+#ifndef PerlIO_error
+extern int PerlIO_error _((PerlIO *));
+#endif
+#ifndef PerlIO_clearerr
+extern void PerlIO_clearerr _((PerlIO *));
+#endif
+#ifndef PerlIO_getc
+extern int PerlIO_getc _((PerlIO *));
+#endif
+#ifndef PerlIO_putc
+extern int PerlIO_putc _((PerlIO *,int));
+#endif
+#ifndef PerlIO_flush
+extern int PerlIO_flush _((PerlIO *));
+#endif
+#ifndef PerlIO_ungetc
+extern int PerlIO_ungetc _((PerlIO *,int));
+#endif
+#ifndef PerlIO_fileno
+extern int PerlIO_fileno _((PerlIO *));
+#endif
+#ifndef PerlIO_fdopen
+extern PerlIO * PerlIO_fdopen _((int, const char *));
+#endif
+#ifndef PerlIO_importFILE
+extern PerlIO * PerlIO_importFILE _((FILE *,int));
+#endif
+#ifndef PerlIO_exportFILE
+extern FILE * PerlIO_exportFILE _((PerlIO *,int));
+#endif
+#ifndef PerlIO_findFILE
+extern FILE * PerlIO_findFILE _((PerlIO *));
+#endif
+#ifndef PerlIO_releaseFILE
+extern void PerlIO_releaseFILE _((PerlIO *,FILE *));
+#endif
+#ifndef PerlIO_read
+extern SSize_t PerlIO_read _((PerlIO *,void *,Size_t));
+#endif
+#ifndef PerlIO_write
+extern SSize_t PerlIO_write _((PerlIO *,const void *,Size_t));
+#endif
+#ifndef PerlIO_setlinebuf
+extern void PerlIO_setlinebuf _((PerlIO *));
+#endif
+#ifndef PerlIO_printf
+extern int PerlIO_printf _((PerlIO *, const char *,...))
+ __attribute__((format (printf, 2, 3)));
+#endif
+#ifndef PerlIO_sprintf
+extern int PerlIO_sprintf _((char *, int, const char *,...))
+ __attribute__((format (printf, 3, 4)));
+#endif
+#ifndef PerlIO_vprintf
+extern int PerlIO_vprintf _((PerlIO *, const char *, va_list));
+#endif
+#ifndef PerlIO_tell
+extern Off_t PerlIO_tell _((PerlIO *));
+#endif
+#ifndef PerlIO_seek
+extern int PerlIO_seek _((PerlIO *, Off_t, int));
+#endif
+#ifndef PerlIO_rewind
+extern void PerlIO_rewind _((PerlIO *));
+#endif
+#ifndef PerlIO_has_base
+extern int PerlIO_has_base _((PerlIO *));
+#endif
+#ifndef PerlIO_has_cntptr
+extern int PerlIO_has_cntptr _((PerlIO *));
+#endif
+#ifndef PerlIO_fast_gets
+extern int PerlIO_fast_gets _((PerlIO *));
+#endif
+#ifndef PerlIO_canset_cnt
+extern int PerlIO_canset_cnt _((PerlIO *));
+#endif
+#ifndef PerlIO_get_ptr
+extern STDCHAR * PerlIO_get_ptr _((PerlIO *));
+#endif
+#ifndef PerlIO_get_cnt
+extern int PerlIO_get_cnt _((PerlIO *));
+#endif
+#ifndef PerlIO_set_cnt
+extern void PerlIO_set_cnt _((PerlIO *,int));
+#endif
+#ifndef PerlIO_set_ptrcnt
+extern void PerlIO_set_ptrcnt _((PerlIO *,STDCHAR *,int));
+#endif
+#ifndef PerlIO_get_base
+extern STDCHAR * PerlIO_get_base _((PerlIO *));
+#endif
+#ifndef PerlIO_get_bufsiz
+extern int PerlIO_get_bufsiz _((PerlIO *));
+#endif
+#ifndef PerlIO_tmpfile
+extern PerlIO * PerlIO_tmpfile _((void));
+#endif
+#ifndef PerlIO_stdin
+extern PerlIO * PerlIO_stdin _((void));
+#endif
+#ifndef PerlIO_stdout
+extern PerlIO * PerlIO_stdout _((void));
+#endif
+#ifndef PerlIO_stderr
+extern PerlIO * PerlIO_stderr _((void));
+#endif
+#ifndef PerlIO_getpos
+extern int PerlIO_getpos _((PerlIO *,Fpos_t *));
+#endif
+#ifndef PerlIO_setpos
+extern int PerlIO_setpos _((PerlIO *,const Fpos_t *));
+#endif
+
+
+/*
+ * Interface for directory functions
+ */
+
+#ifdef PERL_OBJECT
+
+class IPerlDir
+{
+public:
+ virtual int Makedir(const char *dirname, int mode, int &err) = 0;
+ virtual int Chdir(const char *dirname, int &err) = 0;
+ virtual int Rmdir(const char *dirname, int &err) = 0;
+ virtual int Close(DIR *dirp, int &err) = 0;
+ virtual DIR * Open(char *filename, int &err) = 0;
+ virtual struct direct *Read(DIR *dirp, int &err) = 0;
+ virtual void Rewind(DIR *dirp, int &err) = 0;
+ virtual void Seek(DIR *dirp, long loc, int &err) = 0;
+ virtual long Tell(DIR *dirp, int &err) = 0;
+};
+
+#define PerlDir_mkdir(name, mode) \
+ PL_piDir->Makedir((name), (mode), ErrorNo())
+#define PerlDir_chdir(name) \
+ PL_piDir->Chdir((name), ErrorNo())
+#define PerlDir_rmdir(name) \
+ PL_piDir->Rmdir((name), ErrorNo())
+#define PerlDir_close(dir) \
+ PL_piDir->Close((dir), ErrorNo())
+#define PerlDir_open(name) \
+ PL_piDir->Open((name), ErrorNo())
+#define PerlDir_read(dir) \
+ PL_piDir->Read((dir), ErrorNo())
+#define PerlDir_rewind(dir) \
+ PL_piDir->Rewind((dir), ErrorNo())
+#define PerlDir_seek(dir, loc) \
+ PL_piDir->Seek((dir), (loc), ErrorNo())
+#define PerlDir_tell(dir) \
+ PL_piDir->Tell((dir), ErrorNo())
+
+#else /* PERL_OBJECT */
+
+#define PerlDir_mkdir(name, mode) Mkdir((name), (mode))
+#ifdef VMS
+# define PerlDir_chdir(n) chdir(((n) && *(n)) ? (n) : "SYS$LOGIN")
+#else
+# define PerlDir_chdir(name) chdir((name))
+#endif
+#define PerlDir_rmdir(name) rmdir((name))
+#define PerlDir_close(dir) closedir((dir))
+#define PerlDir_open(name) opendir((name))
+#define PerlDir_read(dir) readdir((dir))
+#define PerlDir_rewind(dir) rewinddir((dir))
+#define PerlDir_seek(dir, loc) seekdir((dir), (loc))
+#define PerlDir_tell(dir) telldir((dir))
+
+#endif /* PERL_OBJECT */
+
+/*
+ Interface for perl environment functions
+*/
+
+#ifdef PERL_OBJECT
+
+class IPerlEnv
+{
+public:
+ virtual char * Getenv(const char *varname, int &err) = 0;
+ virtual int Putenv(const char *envstring, int &err) = 0;
+ virtual char * LibPath(char *patchlevel) =0;
+ virtual char * SiteLibPath(char *patchlevel) =0;
+};
+
+#define PerlEnv_putenv(str) PL_piENV->Putenv((str), ErrorNo())
+#define PerlEnv_getenv(str) PL_piENV->Getenv((str), ErrorNo())
+#ifdef WIN32
+#define PerlEnv_lib_path(str) PL_piENV->LibPath((str))
+#define PerlEnv_sitelib_path(str) PL_piENV->SiteLibPath((str))
+#endif
+
+#else /* PERL_OBJECT */
+
+#define PerlEnv_putenv(str) putenv((str))
+#define PerlEnv_getenv(str) getenv((str))
+
+#endif /* PERL_OBJECT */
+
+/*
+ Interface for perl low-level IO functions
+*/
+
+#ifdef PERL_OBJECT
+
+class IPerlLIO
+{
+public:
+ virtual int Access(const char *path, int mode, int &err) = 0;
+ virtual int Chmod(const char *filename, int pmode, int &err) = 0;
+ virtual int Chown(const char *filename, uid_t owner,
+ gid_t group, int &err) = 0;
+ virtual int Chsize(int handle, long size, int &err) = 0;
+ virtual int Close(int handle, int &err) = 0;
+ virtual int Dup(int handle, int &err) = 0;
+ virtual int Dup2(int handle1, int handle2, int &err) = 0;
+ virtual int Flock(int fd, int oper, int &err) = 0;
+ virtual int FileStat(int handle, struct stat *buffer, int &err) = 0;
+ virtual int IOCtl(int i, unsigned int u, char *data, int &err) = 0;
+ virtual int Isatty(int handle, int &err) = 0;
+ virtual long Lseek(int handle, long offset, int origin, int &err) = 0;
+ virtual int Lstat(const char *path, struct stat *buffer, int &err) = 0;
+ virtual char * Mktemp(char *Template, int &err) = 0;
+ virtual int Open(const char *filename, int oflag, int &err) = 0;
+ virtual int Open(const char *filename, int oflag,
+ int pmode, int &err) = 0;
+ virtual int Read(int handle, void *buffer,
+ unsigned int count, int &err) = 0;
+ virtual int Rename(const char *oname,
+ const char *newname, int &err) = 0;
+ virtual int Setmode(int handle, int mode, int &err) = 0;
+ virtual int NameStat(const char *path,
+ struct stat *buffer, int &err) = 0;
+ virtual char * Tmpnam(char *string, int &err) = 0;
+ virtual int Umask(int pmode, int &err) = 0;
+ virtual int Unlink(const char *filename, int &err) = 0;
+ virtual int Utime(char *filename, struct utimbuf *times, int &err) = 0;
+ virtual int Write(int handle, const void *buffer,
+ unsigned int count, int &err) = 0;
+};
+
+#define PerlLIO_access(file, mode) \
+ PL_piLIO->Access((file), (mode), ErrorNo())
+#define PerlLIO_chmod(file, mode) \
+ PL_piLIO->Chmod((file), (mode), ErrorNo())
+#define PerlLIO_chown(file, owner, group) \
+ PL_piLIO->Chown((file), (owner), (group), ErrorNo())
+#define PerlLIO_chsize(fd, size) \
+ PL_piLIO->Chsize((fd), (size), ErrorNo())
+#define PerlLIO_close(fd) \
+ PL_piLIO->Close((fd), ErrorNo())
+#define PerlLIO_dup(fd) \
+ PL_piLIO->Dup((fd), ErrorNo())
+#define PerlLIO_dup2(fd1, fd2) \
+ PL_piLIO->Dup2((fd1), (fd2), ErrorNo())
+#define PerlLIO_flock(fd, op) \
+ PL_piLIO->Flock((fd), (op), ErrorNo())
+#define PerlLIO_fstat(fd, buf) \
+ PL_piLIO->FileStat((fd), (buf), ErrorNo())
+#define PerlLIO_ioctl(fd, u, buf) \
+ PL_piLIO->IOCtl((fd), (u), (buf), ErrorNo())
+#define PerlLIO_isatty(fd) \
+ PL_piLIO->Isatty((fd), ErrorNo())
+#define PerlLIO_lseek(fd, offset, mode) \
+ PL_piLIO->Lseek((fd), (offset), (mode), ErrorNo())
+#define PerlLIO_lstat(name, buf) \
+ PL_piLIO->Lstat((name), (buf), ErrorNo())
+#define PerlLIO_mktemp(file) \
+ PL_piLIO->Mktemp((file), ErrorNo())
+#define PerlLIO_open(file, flag) \
+ PL_piLIO->Open((file), (flag), ErrorNo())
+#define PerlLIO_open3(file, flag, perm) \
+ PL_piLIO->Open((file), (flag), (perm), ErrorNo())
+#define PerlLIO_read(fd, buf, count) \
+ PL_piLIO->Read((fd), (buf), (count), ErrorNo())
+#define PerlLIO_rename(oname, newname) \
+ PL_piLIO->Rename((oname), (newname), ErrorNo())
+#define PerlLIO_setmode(fd, mode) \
+ PL_piLIO->Setmode((fd), (mode), ErrorNo())
+#define PerlLIO_stat(name, buf) \
+ PL_piLIO->NameStat((name), (buf), ErrorNo())
+#define PerlLIO_tmpnam(str) \
+ PL_piLIO->Tmpnam((str), ErrorNo())
+#define PerlLIO_umask(mode) \
+ PL_piLIO->Umask((mode), ErrorNo())
+#define PerlLIO_unlink(file) \
+ PL_piLIO->Unlink((file), ErrorNo())
+#define PerlLIO_utime(file, time) \
+ PL_piLIO->Utime((file), (time), ErrorNo())
+#define PerlLIO_write(fd, buf, count) \
+ PL_piLIO->Write((fd), (buf), (count), ErrorNo())
+
+#else /* PERL_OBJECT */
+
+#define PerlLIO_access(file, mode) access((file), (mode))
+#define PerlLIO_chmod(file, mode) chmod((file), (mode))
+#define PerlLIO_chown(file, owner, grp) chown((file), (owner), (grp))
+#define PerlLIO_chsize(fd, size) chsize((fd), (size))
+#define PerlLIO_close(fd) close((fd))
+#define PerlLIO_dup(fd) dup((fd))
+#define PerlLIO_dup2(fd1, fd2) dup2((fd1), (fd2))
+#define PerlLIO_flock(fd, op) FLOCK((fd), (op))
+#define PerlLIO_fstat(fd, buf) Fstat((fd), (buf))
+#define PerlLIO_ioctl(fd, u, buf) ioctl((fd), (u), (buf))
+#define PerlLIO_isatty(fd) isatty((fd))
+#define PerlLIO_lseek(fd, offset, mode) lseek((fd), (offset), (mode))
+#define PerlLIO_lstat(name, buf) lstat((name), (buf))
+#define PerlLIO_mktemp(file) mktemp((file))
+#define PerlLIO_mkstemp(file) mkstemp((file))
+#define PerlLIO_open(file, flag) open((file), (flag))
+#define PerlLIO_open3(file, flag, perm) open((file), (flag), (perm))
+#define PerlLIO_read(fd, buf, count) read((fd), (buf), (count))
+#define PerlLIO_rename(old, new) rename((old), (new))
+#define PerlLIO_setmode(fd, mode) setmode((fd), (mode))
+#define PerlLIO_stat(name, buf) Stat((name), (buf))
+#define PerlLIO_tmpnam(str) tmpnam((str))
+#define PerlLIO_umask(mode) umask((mode))
+#define PerlLIO_unlink(file) unlink((file))
+#define PerlLIO_utime(file, time) utime((file), (time))
+#define PerlLIO_write(fd, buf, count) write((fd), (buf), (count))
+
+#endif /* PERL_OBJECT */
+
+/*
+ Interface for perl memory allocation
+*/
+
+#ifdef PERL_OBJECT
+
+class IPerlMem
+{
+public:
+ virtual void * Malloc(size_t) = 0;
+ virtual void * Realloc(void*, size_t) = 0;
+ virtual void Free(void*) = 0;
+};
+
+#define PerlMem_malloc(size) PL_piMem->Malloc((size))
+#define PerlMem_realloc(buf, size) PL_piMem->Realloc((buf), (size))
+#define PerlMem_free(buf) PL_piMem->Free((buf))
+
+#else /* PERL_OBJECT */
+
+#define PerlMem_malloc(size) malloc((size))
+#define PerlMem_realloc(buf, size) realloc((buf), (size))
+#define PerlMem_free(buf) free((buf))
+
+#endif /* PERL_OBJECT */
+
+/*
+ Interface for perl process functions
+*/
+
+
+#ifdef PERL_OBJECT
+
+#ifndef Sighandler_t
+typedef Signal_t (*Sighandler_t) _((int));
+#endif
+#ifndef jmp_buf
+#include <setjmp.h>
+#endif
+
+class IPerlProc
+{
+public:
+ virtual void Abort(void) = 0;
+ virtual char * Crypt(const char* clear, const char* salt) = 0;
+ virtual void Exit(int status) = 0;
+ virtual void _Exit(int status) = 0;
+ virtual int Execl(const char *cmdname, const char *arg0,
+ const char *arg1, const char *arg2,
+ const char *arg3) = 0;
+ virtual int Execv(const char *cmdname, const char *const *argv) = 0;
+ virtual int Execvp(const char *cmdname, const char *const *argv) = 0;
+ virtual uid_t Getuid(void) = 0;
+ virtual uid_t Geteuid(void) = 0;
+ virtual gid_t Getgid(void) = 0;
+ virtual gid_t Getegid(void) = 0;
+ virtual char * Getlogin(void) = 0;
+ virtual int Kill(int pid, int sig) = 0;
+ virtual int Killpg(int pid, int sig) = 0;
+ virtual int PauseProc(void) = 0;
+ virtual PerlIO * Popen(const char *command, const char *mode) = 0;
+ virtual int Pclose(PerlIO *stream) = 0;
+ virtual int Pipe(int *phandles) = 0;
+ virtual int Setuid(uid_t uid) = 0;
+ virtual int Setgid(gid_t gid) = 0;
+ virtual int Sleep(unsigned int) = 0;
+ virtual int Times(struct tms *timebuf) = 0;
+ virtual int Wait(int *status) = 0;
+ virtual int Waitpid(int pid, int *status, int flags) = 0;
+ virtual Sighandler_t Signal(int sig, Sighandler_t subcode) = 0;
+#ifdef WIN32
+ virtual void GetSysMsg(char*& msg, DWORD& dwLen, DWORD dwErr) = 0;
+ virtual void FreeBuf(char* msg) = 0;
+ virtual BOOL DoCmd(char *cmd) = 0;
+ virtual int Spawn(char*cmds) = 0;
+ virtual int Spawnvp(int mode, const char *cmdname,
+ const char *const *argv) = 0;
+ virtual int ASpawn(void *vreally, void **vmark, void **vsp) = 0;
+#endif
+};
+
+#define PerlProc_abort() PL_piProc->Abort()
+#define PerlProc_crypt(c,s) PL_piProc->Crypt((c), (s))
+#define PerlProc_exit(s) PL_piProc->Exit((s))
+#define PerlProc__exit(s) PL_piProc->_Exit((s))
+#define PerlProc_execl(c, w, x, y, z) \
+ PL_piProc->Execl((c), (w), (x), (y), (z))
+
+#define PerlProc_execv(c, a) PL_piProc->Execv((c), (a))
+#define PerlProc_execvp(c, a) PL_piProc->Execvp((c), (a))
+#define PerlProc_getuid() PL_piProc->Getuid()
+#define PerlProc_geteuid() PL_piProc->Geteuid()
+#define PerlProc_getgid() PL_piProc->Getgid()
+#define PerlProc_getegid() PL_piProc->Getegid()
+#define PerlProc_getlogin() PL_piProc->Getlogin()
+#define PerlProc_kill(i, a) PL_piProc->Kill((i), (a))
+#define PerlProc_killpg(i, a) PL_piProc->Killpg((i), (a))
+#define PerlProc_pause() PL_piProc->PauseProc()
+#define PerlProc_popen(c, m) PL_piProc->Popen((c), (m))
+#define PerlProc_pclose(f) PL_piProc->Pclose((f))
+#define PerlProc_pipe(fd) PL_piProc->Pipe((fd))
+#define PerlProc_setuid(u) PL_piProc->Setuid((u))
+#define PerlProc_setgid(g) PL_piProc->Setgid((g))
+#define PerlProc_sleep(t) PL_piProc->Sleep((t))
+#define PerlProc_times(t) PL_piProc->Times((t))
+#define PerlProc_wait(t) PL_piProc->Wait((t))
+#define PerlProc_waitpid(p,s,f) PL_piProc->Waitpid((p), (s), (f))
+#define PerlProc_setjmp(b, n) Sigsetjmp((b), (n))
+#define PerlProc_longjmp(b, n) Siglongjmp((b), (n))
+#define PerlProc_signal(n, h) PL_piProc->Signal((n), (h))
+
+#ifdef WIN32
+#define PerlProc_GetSysMsg(s,l,e) \
+ PL_piProc->GetSysMsg((s), (l), (e))
+
+#define PerlProc_FreeBuf(s) PL_piProc->FreeBuf((s))
+#define PerlProc_Cmd(s) PL_piProc->DoCmd((s))
+#define do_spawn(s) PL_piProc->Spawn((s))
+#define do_spawnvp(m, c, a) PL_piProc->Spawnvp((m), (c), (a))
+#define PerlProc_aspawn(m,c,a) PL_piProc->ASpawn((m), (c), (a))
+#endif
+
+#else /* PERL_OBJECT */
+
+#define PerlProc_abort() abort()
+#define PerlProc_crypt(c,s) crypt((c), (s))
+#define PerlProc_exit(s) exit((s))
+#define PerlProc__exit(s) _exit((s))
+#define PerlProc_execl(c,w,x,y,z) \
+ execl((c), (w), (x), (y), (z))
+#define PerlProc_execv(c, a) execv((c), (a))
+#define PerlProc_execvp(c, a) execvp((c), (a))
+#define PerlProc_getuid() getuid()
+#define PerlProc_geteuid() geteuid()
+#define PerlProc_getgid() getgid()
+#define PerlProc_getegid() getegid()
+#define PerlProc_getlogin() getlogin()
+#define PerlProc_kill(i, a) kill((i), (a))
+#define PerlProc_killpg(i, a) killpg((i), (a))
+#define PerlProc_pause() Pause()
+#define PerlProc_popen(c, m) my_popen((c), (m))
+#define PerlProc_pclose(f) my_pclose((f))
+#define PerlProc_pipe(fd) pipe((fd))
+#define PerlProc_setuid(u) setuid((u))
+#define PerlProc_setgid(g) setgid((g))
+#define PerlProc_sleep(t) sleep((t))
+#define PerlProc_times(t) times((t))
+#define PerlProc_wait(t) wait((t))
+#define PerlProc_waitpid(p,s,f) waitpid((p), (s), (f))
+#define PerlProc_setjmp(b, n) Sigsetjmp((b), (n))
+#define PerlProc_longjmp(b, n) Siglongjmp((b), (n))
+#define PerlProc_signal(n, h) signal((n), (h))
+
+
+#endif /* PERL_OBJECT */
+
+/*
+ Interface for perl socket functions
+*/
+
+#ifdef PERL_OBJECT
+
+class IPerlSock
+{
+public:
+ virtual u_long Htonl(u_long hostlong) = 0;
+ virtual u_short Htons(u_short hostshort) = 0;
+ virtual u_long Ntohl(u_long netlong) = 0;
+ virtual u_short Ntohs(u_short netshort) = 0;
+ virtual SOCKET Accept(SOCKET s, struct sockaddr* addr,
+ int* addrlen, int &err) = 0;
+ virtual int Bind(SOCKET s, const struct sockaddr* name,
+ int namelen, int &err) = 0;
+ virtual int Connect(SOCKET s, const struct sockaddr* name,
+ int namelen, int &err) = 0;
+ virtual void Endhostent(int &err) = 0;
+ virtual void Endnetent(int &err) = 0;
+ virtual void Endprotoent(int &err) = 0;
+ virtual void Endservent(int &err) = 0;
+ virtual int Gethostname(char* name, int namelen, int &err) = 0;
+ virtual int Getpeername(SOCKET s, struct sockaddr* name,
+ int* namelen, int &err) = 0;
+ virtual struct hostent * Gethostbyaddr(const char* addr, int len,
+ int type, int &err) = 0;
+ virtual struct hostent * Gethostbyname(const char* name, int &err) = 0;
+ virtual struct hostent * Gethostent(int &err) = 0;
+ virtual struct netent * Getnetbyaddr(long net, int type, int &err) = 0;
+ virtual struct netent * Getnetbyname(const char *, int &err) = 0;
+ virtual struct netent * Getnetent(int &err) = 0;
+ virtual struct protoent * Getprotobyname(const char* name, int &err) = 0;
+ virtual struct protoent * Getprotobynumber(int number, int &err) = 0;
+ virtual struct protoent * Getprotoent(int &err) = 0;
+ virtual struct servent * Getservbyname(const char* name,
+ const char* proto, int &err) = 0;
+ virtual struct servent * Getservbyport(int port, const char* proto,
+ int &err) = 0;
+ virtual struct servent * Getservent(int &err) = 0;
+ virtual int Getsockname(SOCKET s, struct sockaddr* name,
+ int* namelen, int &err) = 0;
+ virtual int Getsockopt(SOCKET s, int level, int optname,
+ char* optval, int* optlen, int &err) = 0;
+ virtual unsigned long InetAddr(const char* cp, int &err) = 0;
+ virtual char * InetNtoa(struct in_addr in, int &err) = 0;
+ virtual int Listen(SOCKET s, int backlog, int &err) = 0;
+ virtual int Recv(SOCKET s, char* buf, int len,
+ int flags, int &err) = 0;
+ virtual int Recvfrom(SOCKET s, char* buf, int len, int flags,
+ struct sockaddr* from, int* fromlen, int &err) = 0;
+ virtual int Select(int nfds, char* readfds, char* writefds,
+ char* exceptfds, const struct timeval* timeout,
+ int &err) = 0;
+ virtual int Send(SOCKET s, const char* buf, int len,
+ int flags, int &err) = 0;
+ virtual int Sendto(SOCKET s, const char* buf, int len, int flags,
+ const struct sockaddr* to, int tolen, int &err) = 0;
+ virtual void Sethostent(int stayopen, int &err) = 0;
+ virtual void Setnetent(int stayopen, int &err) = 0;
+ virtual void Setprotoent(int stayopen, int &err) = 0;
+ virtual void Setservent(int stayopen, int &err) = 0;
+ virtual int Setsockopt(SOCKET s, int level, int optname,
+ const char* optval, int optlen, int &err) = 0;
+ virtual int Shutdown(SOCKET s, int how, int &err) = 0;
+ virtual SOCKET Socket(int af, int type, int protocol, int &err) = 0;
+ virtual int Socketpair(int domain, int type, int protocol,
+ int* fds, int &err) = 0;
+#ifdef WIN32
+ virtual int Closesocket(SOCKET s, int& err) = 0;
+ virtual int Ioctlsocket(SOCKET s, long cmd, u_long *argp,
+ int& err) = 0;
+#endif
+};
+
+#define PerlSock_htonl(x) PL_piSock->Htonl(x)
+#define PerlSock_htons(x) PL_piSock->Htons(x)
+#define PerlSock_ntohl(x) PL_piSock->Ntohl(x)
+#define PerlSock_ntohs(x) PL_piSock->Ntohs(x)
+#define PerlSock_accept(s, a, l) PL_piSock->Accept(s, a, l, ErrorNo())
+#define PerlSock_bind(s, n, l) PL_piSock->Bind(s, n, l, ErrorNo())
+#define PerlSock_connect(s, n, l) PL_piSock->Connect(s, n, l, ErrorNo())
+#define PerlSock_endhostent() PL_piSock->Endhostent(ErrorNo())
+#define PerlSock_endnetent() PL_piSock->Endnetent(ErrorNo())
+#define PerlSock_endprotoent() PL_piSock->Endprotoent(ErrorNo())
+#define PerlSock_endservent() PL_piSock->Endservent(ErrorNo())
+#define PerlSock_gethostbyaddr(a, l, t) PL_piSock->Gethostbyaddr(a, l, t, ErrorNo())
+#define PerlSock_gethostbyname(n) PL_piSock->Gethostbyname(n, ErrorNo())
+#define PerlSock_gethostent() PL_piSock->Gethostent(ErrorNo())
+#define PerlSock_gethostname(n, l) PL_piSock->Gethostname(n, l, ErrorNo())
+#define PerlSock_getnetbyaddr(n, t) PL_piSock->Getnetbyaddr(n, t, ErrorNo())
+#define PerlSock_getnetbyname(c) PL_piSock->Getnetbyname(c, ErrorNo())
+#define PerlSock_getnetent() PL_piSock->Getnetent(ErrorNo())
+#define PerlSock_getpeername(s, n, l) PL_piSock->Getpeername(s, n, l, ErrorNo())
+#define PerlSock_getprotobyname(n) PL_piSock->Getprotobyname(n, ErrorNo())
+#define PerlSock_getprotobynumber(n) PL_piSock->Getprotobynumber(n, ErrorNo())
+#define PerlSock_getprotoent() PL_piSock->Getprotoent(ErrorNo())
+#define PerlSock_getservbyname(n, p) PL_piSock->Getservbyname(n, p, ErrorNo())
+#define PerlSock_getservbyport(port, p) PL_piSock->Getservbyport(port, p, ErrorNo())
+#define PerlSock_getservent() PL_piSock->Getservent(ErrorNo())
+#define PerlSock_getsockname(s, n, l) PL_piSock->Getsockname(s, n, l, ErrorNo())
+#define PerlSock_getsockopt(s,l,n,v,i) PL_piSock->Getsockopt(s, l, n, v, i, ErrorNo())
+#define PerlSock_inet_addr(c) PL_piSock->InetAddr(c, ErrorNo())
+#define PerlSock_inet_ntoa(i) PL_piSock->InetNtoa(i, ErrorNo())
+#define PerlSock_listen(s, b) PL_piSock->Listen(s, b, ErrorNo())
+#define PerlSock_recv(s, b, l, f) PL_piSock->Recv(s, b, l, f, ErrorNo())
+#define PerlSock_recvfrom(s,b,l,f,from,fromlen) \
+ PL_piSock->Recvfrom(s, b, l, f, from, fromlen, ErrorNo())
+#define PerlSock_select(n, r, w, e, t) \
+ PL_piSock->Select(n, (char*)r, (char*)w, (char*)e, t, ErrorNo())
+#define PerlSock_send(s, b, l, f) PL_piSock->Send(s, b, l, f, ErrorNo())
+#define PerlSock_sendto(s, b, l, f, t, tlen) \
+ PL_piSock->Sendto(s, b, l, f, t, tlen, ErrorNo())
+#define PerlSock_sethostent(f) PL_piSock->Sethostent(f, ErrorNo())
+#define PerlSock_setnetent(f) PL_piSock->Setnetent(f, ErrorNo())
+#define PerlSock_setprotoent(f) PL_piSock->Setprotoent(f, ErrorNo())
+#define PerlSock_setservent(f) PL_piSock->Setservent(f, ErrorNo())
+#define PerlSock_setsockopt(s, l, n, v, len) \
+ PL_piSock->Setsockopt(s, l, n, v, len, ErrorNo())
+#define PerlSock_shutdown(s, h) PL_piSock->Shutdown(s, h, ErrorNo())
+#define PerlSock_socket(a, t, p) PL_piSock->Socket(a, t, p, ErrorNo())
+#define PerlSock_socketpair(a, t, p, f) PL_piSock->Socketpair(a, t, p, f, ErrorNo())
+
+#else /* PERL_OBJECT */
+
+#define PerlSock_htonl(x) htonl(x)
+#define PerlSock_htons(x) htons(x)
+#define PerlSock_ntohl(x) ntohl(x)
+#define PerlSock_ntohs(x) ntohs(x)
+#define PerlSock_accept(s, a, l) accept(s, a, l)
+#define PerlSock_bind(s, n, l) bind(s, n, l)
+#define PerlSock_connect(s, n, l) connect(s, n, l)
+
+#define PerlSock_gethostbyaddr(a, l, t) gethostbyaddr(a, l, t)
+#define PerlSock_gethostbyname(n) gethostbyname(n)
+#define PerlSock_gethostent gethostent
+#define PerlSock_endhostent endhostent
+#define PerlSock_gethostname(n, l) gethostname(n, l)
+
+#define PerlSock_getnetbyaddr(n, t) getnetbyaddr(n, t)
+#define PerlSock_getnetbyname(n) getnetbyname(n)
+#define PerlSock_getnetent getnetent
+#define PerlSock_endnetent endnetent
+#define PerlSock_getpeername(s, n, l) getpeername(s, n, l)
+
+#define PerlSock_getprotobyname(n) getprotobyname(n)
+#define PerlSock_getprotobynumber(n) getprotobynumber(n)
+#define PerlSock_getprotoent getprotoent
+#define PerlSock_endprotoent endprotoent
+
+#define PerlSock_getservbyname(n, p) getservbyname(n, p)
+#define PerlSock_getservbyport(port, p) getservbyport(port, p)
+#define PerlSock_getservent getservent
+#define PerlSock_endservent endservent
+
+#define PerlSock_getsockname(s, n, l) getsockname(s, n, l)
+#define PerlSock_getsockopt(s,l,n,v,i) getsockopt(s, l, n, v, i)
+#define PerlSock_inet_addr(c) inet_addr(c)
+#define PerlSock_inet_ntoa(i) inet_ntoa(i)
+#define PerlSock_listen(s, b) listen(s, b)
+#define PerlSock_recv(s, b, l, f) recv(s, b, l, f)
+#define PerlSock_recvfrom(s, b, l, f, from, fromlen) \
+ recvfrom(s, b, l, f, from, fromlen)
+#define PerlSock_select(n, r, w, e, t) select(n, r, w, e, t)
+#define PerlSock_send(s, b, l, f) send(s, b, l, f)
+#define PerlSock_sendto(s, b, l, f, t, tlen) \
+ sendto(s, b, l, f, t, tlen)
+#define PerlSock_sethostent(f) sethostent(f)
+#define PerlSock_setnetent(f) setnetent(f)
+#define PerlSock_setprotoent(f) setprotoent(f)
+#define PerlSock_setservent(f) setservent(f)
+#define PerlSock_setsockopt(s, l, n, v, len) \
+ setsockopt(s, l, n, v, len)
+#define PerlSock_shutdown(s, h) shutdown(s, h)
+#define PerlSock_socket(a, t, p) socket(a, t, p)
+#define PerlSock_socketpair(a, t, p, f) socketpair(a, t, p, f)
+
+
+#endif /* PERL_OBJECT */
+
+#endif /* __Inc__IPerl___ */
+
diff --git a/gnu/usr.bin/perl/lib/CGI/Cookie.pm b/gnu/usr.bin/perl/lib/CGI/Cookie.pm
new file mode 100644
index 00000000000..204d67b08ae
--- /dev/null
+++ b/gnu/usr.bin/perl/lib/CGI/Cookie.pm
@@ -0,0 +1,419 @@
+package CGI::Cookie;
+
+# See the bottom of this file for the POD documentation. Search for the
+# string '=head'.
+
+# You can run this file through either pod2man or pod2html to produce pretty
+# documentation in manual or html file format (these utilities are part of the
+# Perl 5 distribution).
+
+# Copyright 1995,1996, Lincoln D. Stein. All rights reserved.
+# It may be used and modified freely, but I do request that this copyright
+# notice remain attached to the file. You may modify this module as you
+# wish, but if you redistribute a modified version, please attach a note
+# listing the modifications you have made.
+
+# The most recent version and complete docs are available at:
+# http://www.genome.wi.mit.edu/ftp/pub/software/WWW/cgi_docs.html
+# ftp://ftp-genome.wi.mit.edu/pub/software/WWW/
+
+$CGI::Cookie::VERSION='1.06';
+
+use CGI;
+use overload '""' => \&as_string,
+ 'cmp' => \&compare,
+ 'fallback'=>1;
+
+# fetch a list of cookies from the environment and
+# return as a hash. the cookies are parsed as normal
+# escaped URL data.
+sub fetch {
+ my $class = shift;
+ my $raw_cookie = $ENV{HTTP_COOKIE} || $ENV{COOKIE};
+ return () unless $raw_cookie;
+ return $class->parse($raw_cookie);
+}
+
+# fetch a list of cookies from the environment and
+# return as a hash. the cookie values are not unescaped
+# or altered in any way.
+sub raw_fetch {
+ my $class = shift;
+ my $raw_cookie = $ENV{HTTP_COOKIE} || $ENV{COOKIE};
+ return () unless $raw_cookie;
+ my %results;
+ my($key,$value);
+
+ my(@pairs) = split("; ",$raw_cookie);
+ foreach (@pairs) {
+ if (/^([^=]+)=(.*)/) {
+ $key = $1;
+ $value = $2;
+ }
+ else {
+ $key = $_;
+ $value = '';
+ }
+ $results{$key} = $value;
+ }
+ return \%results unless wantarray;
+ return %results;
+}
+
+sub parse {
+ my ($self,$raw_cookie) = @_;
+ my %results;
+
+ my(@pairs) = split("; ",$raw_cookie);
+ foreach (@pairs) {
+ my($key,$value) = split("=");
+ my(@values) = map CGI::unescape($_),split('&',$value);
+ $key = CGI::unescape($key);
+ # A bug in Netscape can cause several cookies with same name to
+ # appear. The FIRST one in HTTP_COOKIE is the most recent version.
+ $results{$key} ||= $self->new(-name=>$key,-value=>\@values);
+ }
+ return \%results unless wantarray;
+ return %results;
+}
+
+sub new {
+ my $class = shift;
+ $class = ref($class) if ref($class);
+ my($name,$value,$path,$domain,$secure,$expires) =
+ CGI->rearrange([NAME,[VALUE,VALUES],PATH,DOMAIN,SECURE,EXPIRES],@_);
+
+ # Pull out our parameters.
+ my @values;
+ if (ref($value)) {
+ if (ref($value) eq 'ARRAY') {
+ @values = @$value;
+ } elsif (ref($value) eq 'HASH') {
+ @values = %$value;
+ }
+ } else {
+ @values = ($value);
+ }
+
+ bless my $self = {
+ 'name'=>$name,
+ 'value'=>[@values],
+ },$class;
+
+ # IE requires the path to be present for some reason.
+ ($path = $ENV{'SCRIPT_NAME'})=~s![^/]+$!! unless $path;
+
+ $self->path($path) if defined $path;
+ $self->domain($domain) if defined $domain;
+ $self->secure($secure) if defined $secure;
+ $self->expires($expires) if defined $expires;
+ return $self;
+}
+
+sub as_string {
+ my $self = shift;
+ return "" unless $self->name;
+
+ my(@constant_values,$domain,$path,$expires,$secure);
+
+ push(@constant_values,"domain=$domain") if $domain = $self->domain;
+ push(@constant_values,"path=$path") if $path = $self->path;
+ push(@constant_values,"expires=$expires") if $expires = $self->expires;
+ push(@constant_values,'secure') if $secure = $self->secure;
+
+ my($key) = CGI::escape($self->name);
+ my($cookie) = join("=",$key,join("&",map CGI::escape($_),$self->value));
+ return join("; ",$cookie,@constant_values);
+}
+
+sub compare {
+ my $self = shift;
+ my $value = shift;
+ return "$self" cmp $value;
+}
+
+# accessors
+sub name {
+ my $self = shift;
+ my $name = shift;
+ $self->{'name'} = $name if defined $name;
+ return $self->{'name'};
+}
+
+sub value {
+ my $self = shift;
+ my $value = shift;
+ $self->{'value'} = $value if defined $value;
+ return wantarray ? @{$self->{'value'}} : $self->{'value'}->[0]
+}
+
+sub domain {
+ my $self = shift;
+ my $domain = shift;
+ $self->{'domain'} = $domain if defined $domain;
+ return $self->{'domain'};
+}
+
+sub secure {
+ my $self = shift;
+ my $secure = shift;
+ $self->{'secure'} = $secure if defined $secure;
+ return $self->{'secure'};
+}
+
+sub expires {
+ my $self = shift;
+ my $expires = shift;
+ $self->{'expires'} = CGI::expires($expires,'cookie') if defined $expires;
+ return $self->{'expires'};
+}
+
+sub path {
+ my $self = shift;
+ my $path = shift;
+ $self->{'path'} = $path if defined $path;
+ return $self->{'path'};
+}
+
+1;
+
+=head1 NAME
+
+CGI::Cookie - Interface to Netscape Cookies
+
+=head1 SYNOPSIS
+
+ use CGI qw/:standard/;
+ use CGI::Cookie;
+
+ # Create new cookies and send them
+ $cookie1 = new CGI::Cookie(-name=>'ID',-value=>123456);
+ $cookie2 = new CGI::Cookie(-name=>'preferences',
+ -value=>{ font => Helvetica,
+ size => 12 }
+ );
+ print header(-cookie=>[$cookie1,$cookie2]);
+
+ # fetch existing cookies
+ %cookies = fetch CGI::Cookie;
+ $id = $cookies{'ID'}->value;
+
+ # create cookies returned from an external source
+ %cookies = parse CGI::Cookie($ENV{COOKIE});
+
+=head1 DESCRIPTION
+
+CGI::Cookie is an interface to Netscape (HTTP/1.1) cookies, an
+innovation that allows Web servers to store persistent information on
+the browser's side of the connection. Although CGI::Cookie is
+intended to be used in conjunction with CGI.pm (and is in fact used by
+it internally), you can use this module independently.
+
+For full information on cookies see
+
+ http://www.ics.uci.edu/pub/ietf/http/rfc2109.txt
+
+=head1 USING CGI::Cookie
+
+CGI::Cookie is object oriented. Each cookie object has a name and a
+value. The name is any scalar value. The value is any scalar or
+array value (associative arrays are also allowed). Cookies also have
+several optional attributes, including:
+
+=over 4
+
+=item B<1. expiration date>
+
+The expiration date tells the browser how long to hang on to the
+cookie. If the cookie specifies an expiration date in the future, the
+browser will store the cookie information in a disk file and return it
+to the server every time the user reconnects (until the expiration
+date is reached). If the cookie species an expiration date in the
+past, the browser will remove the cookie from the disk file. If the
+expiration date is not specified, the cookie will persist only until
+the user quits the browser.
+
+=item B<2. domain>
+
+This is a partial or complete domain name for which the cookie is
+valid. The browser will return the cookie to any host that matches
+the partial domain name. For example, if you specify a domain name
+of ".capricorn.com", then Netscape will return the cookie to
+Web servers running on any of the machines "www.capricorn.com",
+"ftp.capricorn.com", "feckless.capricorn.com", etc. Domain names
+must contain at least two periods to prevent attempts to match
+on top level domains like ".edu". If no domain is specified, then
+the browser will only return the cookie to servers on the host the
+cookie originated from.
+
+=item B<3. path>
+
+If you provide a cookie path attribute, the browser will check it
+against your script's URL before returning the cookie. For example,
+if you specify the path "/cgi-bin", then the cookie will be returned
+to each of the scripts "/cgi-bin/tally.pl", "/cgi-bin/order.pl",
+and "/cgi-bin/customer_service/complain.pl", but not to the script
+"/cgi-private/site_admin.pl". By default, path is set to "/", which
+causes the cookie to be sent to any CGI script on your site.
+
+=item B<4. secure flag>
+
+If the "secure" attribute is set, the cookie will only be sent to your
+script if the CGI request is occurring on a secure channel, such as SSL.
+
+=back
+
+=head2 Creating New Cookies
+
+ $c = new CGI::Cookie(-name => 'foo',
+ -value => 'bar',
+ -expires => '+3M',
+ -domain => '.capricorn.com',
+ -path => '/cgi-bin/database'
+ -secure => 1
+ );
+
+Create cookies from scratch with the B<new> method. The B<-name> and
+B<-value> parameters are required. The name must be a scalar value.
+The value can be a scalar, an array reference, or a hash reference.
+(At some point in the future cookies will support one of the Perl
+object serialization protocols for full generality).
+
+B<-expires> accepts any of the relative or absolute date formats
+recognized by CGI.pm, for example "+3M" for three months in the
+future. See CGI.pm's documentation for details.
+
+B<-domain> points to a domain name or to a fully qualified host name.
+If not specified, the cookie will be returned only to the Web server
+that created it.
+
+B<-path> points to a partial URL on the current server. The cookie
+will be returned to all URLs beginning with the specified path. If
+not specified, it defaults to '/', which returns the cookie to all
+pages at your site.
+
+B<-secure> if set to a true value instructs the browser to return the
+cookie only when a cryptographic protocol is in use.
+
+=head2 Sending the Cookie to the Browser
+
+Within a CGI script you can send a cookie to the browser by creating
+one or more Set-Cookie: fields in the HTTP header. Here is a typical
+sequence:
+
+ my $c = new CGI::Cookie(-name => 'foo',
+ -value => ['bar','baz'],
+ -expires => '+3M');
+
+ print "Set-Cookie: $c\n";
+ print "Content-Type: text/html\n\n";
+
+To send more than one cookie, create several Set-Cookie: fields.
+Alternatively, you may concatenate the cookies together with "; " and
+send them in one field.
+
+If you are using CGI.pm, you send cookies by providing a -cookie
+argument to the header() method:
+
+ print header(-cookie=>$c);
+
+Mod_perl users can set cookies using the request object's header_out()
+method:
+
+ $r->header_out('Set-Cookie',$c);
+
+Internally, Cookie overloads the "" operator to call its as_string()
+method when incorporated into the HTTP header. as_string() turns the
+Cookie's internal representation into an RFC-compliant text
+representation. You may call as_string() yourself if you prefer:
+
+ print "Set-Cookie: ",$c->as_string,"\n";
+
+=head2 Recovering Previous Cookies
+
+ %cookies = fetch CGI::Cookie;
+
+B<fetch> returns an associative array consisting of all cookies
+returned by the browser. The keys of the array are the cookie names. You
+can iterate through the cookies this way:
+
+ %cookies = fetch CGI::Cookie;
+ foreach (keys %cookies) {
+ do_something($cookies{$_});
+ }
+
+In a scalar context, fetch() returns a hash reference, which may be more
+efficient if you are manipulating multiple cookies.
+
+CGI.pm uses the URL escaping methods to save and restore reserved characters
+in its cookies. If you are trying to retrieve a cookie set by a foreign server,
+this escaping method may trip you up. Use raw_fetch() instead, which has the
+same semantics as fetch(), but performs no unescaping.
+
+You may also retrieve cookies that were stored in some external
+form using the parse() class method:
+
+ $COOKIES = `cat /usr/tmp/Cookie_stash`;
+ %cookies = parse CGI::Cookie($COOKIES);
+
+=head2 Manipulating Cookies
+
+Cookie objects have a series of accessor methods to get and set cookie
+attributes. Each accessor has a similar syntax. Called without
+arguments, the accessor returns the current value of the attribute.
+Called with an argument, the accessor changes the attribute and
+returns its new value.
+
+=over 4
+
+=item B<name()>
+
+Get or set the cookie's name. Example:
+
+ $name = $c->name;
+ $new_name = $c->name('fred');
+
+=item B<value()>
+
+Get or set the cookie's value. Example:
+
+ $value = $c->value;
+ @new_value = $c->value(['a','b','c','d']);
+
+B<value()> is context sensitive. In an array context it will return
+the current value of the cookie as an array. In a scalar context it
+will return the B<first> value of a multivalued cookie.
+
+=item B<domain()>
+
+Get or set the cookie's domain.
+
+=item B<path()>
+
+Get or set the cookie's path.
+
+=item B<expires()>
+
+Get or set the cookie's expiration time.
+
+=back
+
+
+=head1 AUTHOR INFORMATION
+
+Copyright 1997-1998, Lincoln D. Stein. All rights reserved.
+
+This library is free software; you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+Address bug reports and comments to: lstein@cshl.org
+
+=head1 BUGS
+
+This section intentionally left blank.
+
+=head1 SEE ALSO
+
+L<CGI::Carp>, L<CGI>
+
+=cut
diff --git a/gnu/usr.bin/perl/lib/Dumpvalue.pm b/gnu/usr.bin/perl/lib/Dumpvalue.pm
new file mode 100644
index 00000000000..5bcd58f4fba
--- /dev/null
+++ b/gnu/usr.bin/perl/lib/Dumpvalue.pm
@@ -0,0 +1,600 @@
+require 5.005; # For (defined ref) and $#$v
+package Dumpvalue;
+use strict;
+use vars qw(%address *stab %subs);
+
+# translate control chars to ^X - Randal Schwartz
+# Modifications to print types by Peter Gordon v1.0
+
+# Ilya Zakharevich -- patches after 5.001 (and some before ;-)
+
+# Won't dump symbol tables and contents of debugged files by default
+
+# (IZ) changes for objectification:
+# c) quote() renamed to method set_quote();
+# d) unctrlSet() renamed to method set_unctrl();
+# f) Compiles with `use strict', but in two places no strict refs is needed:
+# maybe more problems are waiting...
+
+my %defaults = (
+ globPrint => 0,
+ printUndef => 1,
+ tick => "auto",
+ unctrl => 'quote',
+ subdump => 1,
+ dumpReused => 0,
+ bareStringify => 1,
+ hashDepth => '',
+ arrayDepth => '',
+ dumpDBFiles => '',
+ dumpPackages => '',
+ quoteHighBit => '',
+ usageOnly => '',
+ compactDump => '',
+ veryCompact => '',
+ stopDbSignal => '',
+ );
+
+sub new {
+ my $class = shift;
+ my %opt = (%defaults, @_);
+ bless \%opt, $class;
+}
+
+sub set {
+ my $self = shift;
+ my %opt = @_;
+ @$self{keys %opt} = values %opt;
+}
+
+sub get {
+ my $self = shift;
+ wantarray ? @$self{@_} : $$self{pop @_};
+}
+
+sub dumpValue {
+ my $self = shift;
+ die "usage: \$dumper->dumpValue(value)" unless @_ == 1;
+ local %address;
+ local $^W=0;
+ (print "undef\n"), return unless defined $_[0];
+ (print $self->stringify($_[0]), "\n"), return unless ref $_[0];
+ $self->unwrap($_[0],0);
+}
+
+sub dumpValues {
+ my $self = shift;
+ local %address;
+ local $^W=0;
+ (print "undef\n"), return unless defined $_[0];
+ $self->unwrap(\@_,0);
+}
+
+# This one is good for variable names:
+
+sub unctrl {
+ local($_) = @_;
+
+ return \$_ if ref \$_ eq "GLOB";
+ s/([\001-\037\177])/'^'.pack('c',ord($1)^64)/eg;
+ $_;
+}
+
+sub stringify {
+ my $self = shift;
+ local $_ = shift;
+ my $noticks = shift;
+ my $tick = $self->{tick};
+
+ return 'undef' unless defined $_ or not $self->{printUndef};
+ return $_ . "" if ref \$_ eq 'GLOB';
+ { no strict 'refs';
+ $_ = &{'overload::StrVal'}($_)
+ if $self->{bareStringify} and ref $_
+ and defined %overload:: and defined &{'overload::StrVal'};
+ }
+
+ if ($tick eq 'auto') {
+ if (/[\000-\011\013-\037\177]/) {
+ $tick = '"';
+ } else {
+ $tick = "'";
+ }
+ }
+ if ($tick eq "'") {
+ s/([\'\\])/\\$1/g;
+ } elsif ($self->{unctrl} eq 'unctrl') {
+ s/([\"\\])/\\$1/g ;
+ s/([\000-\037\177])/'^'.pack('c',ord($1)^64)/eg;
+ s/([\200-\377])/'\\0x'.sprintf('%2X',ord($1))/eg
+ if $self->{quoteHighBit};
+ } elsif ($self->{unctrl} eq 'quote') {
+ s/([\"\\\$\@])/\\$1/g if $tick eq '"';
+ s/\033/\\e/g;
+ s/([\000-\037\177])/'\\c'.chr(ord($1)^64)/eg;
+ }
+ s/([\200-\377])/'\\'.sprintf('%3o',ord($1))/eg if $self->{quoteHighBit};
+ ($noticks || /^\d+(\.\d*)?\Z/)
+ ? $_
+ : $tick . $_ . $tick;
+}
+
+sub DumpElem {
+ my ($self, $v) = (shift, shift);
+ my $short = $self->stringify($v, ref $v);
+ my $shortmore = '';
+ if ($self->{veryCompact} && ref $v
+ && (ref $v eq 'ARRAY' and !grep(ref $_, @$v) )) {
+ my $depth = $#$v;
+ ($shortmore, $depth) = (' ...', $self->{arrayDepth} - 1)
+ if $self->{arrayDepth} and $depth >= $self->{arrayDepth};
+ my @a = map $self->stringify($_), @$v[0..$depth];
+ print "0..$#{$v} @a$shortmore\n";
+ } elsif ($self->{veryCompact} && ref $v
+ && (ref $v eq 'HASH') and !grep(ref $_, values %$v)) {
+ my @a = sort keys %$v;
+ my $depth = $#a;
+ ($shortmore, $depth) = (' ...', $self->{hashDepth} - 1)
+ if $self->{hashDepth} and $depth >= $self->{hashDepth};
+ my @b = map {$self->stringify($_) . " => " . $self->stringify($$v{$_})}
+ @a[0..$depth];
+ local $" = ', ';
+ print "@b$shortmore\n";
+ } else {
+ print "$short\n";
+ $self->unwrap($v,shift);
+ }
+}
+
+sub unwrap {
+ my $self = shift;
+ return if $DB::signal and $self->{stopDbSignal};
+ my ($v) = shift ;
+ my ($s) = shift ; # extra no of spaces
+ my $sp;
+ my (%v,@v,$address,$short,$fileno);
+
+ $sp = " " x $s ;
+ $s += 3 ;
+
+ # Check for reused addresses
+ if (ref $v) {
+ my $val = $v;
+ { no strict 'refs';
+ $val = &{'overload::StrVal'}($v)
+ if defined %overload:: and defined &{'overload::StrVal'};
+ }
+ ($address) = $val =~ /(0x[0-9a-f]+)\)$/ ;
+ if (!$self->{dumpReused} && defined $address) {
+ $address{$address}++ ;
+ if ( $address{$address} > 1 ) {
+ print "${sp}-> REUSED_ADDRESS\n" ;
+ return ;
+ }
+ }
+ } elsif (ref \$v eq 'GLOB') {
+ $address = "$v" . ""; # To avoid a bug with globs
+ $address{$address}++ ;
+ if ( $address{$address} > 1 ) {
+ print "${sp}*DUMPED_GLOB*\n" ;
+ return ;
+ }
+ }
+
+ if ( UNIVERSAL::isa($v, 'HASH') ) {
+ my @sortKeys = sort keys(%$v) ;
+ my $more;
+ my $tHashDepth = $#sortKeys ;
+ $tHashDepth = $#sortKeys < $self->{hashDepth}-1 ? $#sortKeys : $self->{hashDepth}-1
+ unless $self->{hashDepth} eq '' ;
+ $more = "....\n" if $tHashDepth < $#sortKeys ;
+ my $shortmore = "";
+ $shortmore = ", ..." if $tHashDepth < $#sortKeys ;
+ $#sortKeys = $tHashDepth ;
+ if ($self->{compactDump} && !grep(ref $_, values %{$v})) {
+ $short = $sp;
+ my @keys;
+ for (@sortKeys) {
+ push @keys, $self->stringify($_) . " => " . $self->stringify($v->{$_});
+ }
+ $short .= join ', ', @keys;
+ $short .= $shortmore;
+ (print "$short\n"), return if length $short <= $self->{compactDump};
+ }
+ for my $key (@sortKeys) {
+ return if $DB::signal and $self->{stopDbSignal};
+ my $value = $ {$v}{$key} ;
+ print $sp, $self->stringify($key), " => ";
+ $self->DumpElem($value, $s);
+ }
+ print "$sp empty hash\n" unless @sortKeys;
+ print "$sp$more" if defined $more ;
+ } elsif ( UNIVERSAL::isa($v, 'ARRAY') ) {
+ my $tArrayDepth = $#{$v} ;
+ my $more ;
+ $tArrayDepth = $#$v < $self->{arrayDepth}-1 ? $#$v : $self->{arrayDepth}-1
+ unless $self->{arrayDepth} eq '' ;
+ $more = "....\n" if $tArrayDepth < $#{$v} ;
+ my $shortmore = "";
+ $shortmore = " ..." if $tArrayDepth < $#{$v} ;
+ if ($self->{compactDump} && !grep(ref $_, @{$v})) {
+ if ($#$v >= 0) {
+ $short = $sp . "0..$#{$v} " .
+ join(" ",
+ map {$self->stringify($_)} @{$v}[0..$tArrayDepth])
+ . "$shortmore";
+ } else {
+ $short = $sp . "empty array";
+ }
+ (print "$short\n"), return if length $short <= $self->{compactDump};
+ }
+ for my $num ($[ .. $tArrayDepth) {
+ return if $DB::signal and $self->{stopDbSignal};
+ print "$sp$num ";
+ $self->DumpElem($v->[$num], $s);
+ }
+ print "$sp empty array\n" unless @$v;
+ print "$sp$more" if defined $more ;
+ } elsif ( UNIVERSAL::isa($v, 'SCALAR') or ref $v eq 'REF' ) {
+ print "$sp-> ";
+ $self->DumpElem($$v, $s);
+ } elsif ( UNIVERSAL::isa($v, 'CODE') ) {
+ print "$sp-> ";
+ $self->dumpsub(0, $v);
+ } elsif ( UNIVERSAL::isa($v, 'GLOB') ) {
+ print "$sp-> ",$self->stringify($$v,1),"\n";
+ if ($self->{globPrint}) {
+ $s += 3;
+ $self->dumpglob('', $s, "{$$v}", $$v, 1);
+ } elsif (defined ($fileno = fileno($v))) {
+ print( (' ' x ($s+3)) . "FileHandle({$$v}) => fileno($fileno)\n" );
+ }
+ } elsif (ref \$v eq 'GLOB') {
+ if ($self->{globPrint}) {
+ $self->dumpglob('', $s, "{$v}", $v, 1);
+ } elsif (defined ($fileno = fileno(\$v))) {
+ print( (' ' x $s) . "FileHandle({$v}) => fileno($fileno)\n" );
+ }
+ }
+}
+
+sub matchvar {
+ $_[0] eq $_[1] or
+ ($_[1] =~ /^([!~])(.)([\x00-\xff]*)/) and
+ ($1 eq '!') ^ (eval {($_[2] . "::" . $_[0]) =~ /$2$3/});
+}
+
+sub compactDump {
+ my $self = shift;
+ $self->{compactDump} = shift if @_;
+ $self->{compactDump} = 6*80-1
+ if $self->{compactDump} and $self->{compactDump} < 2;
+ $self->{compactDump};
+}
+
+sub veryCompact {
+ my $self = shift;
+ $self->{veryCompact} = shift if @_;
+ $self->compactDump(1) if !$self->{compactDump} and $self->{veryCompact};
+ $self->{veryCompact};
+}
+
+sub set_unctrl {
+ my $self = shift;
+ if (@_) {
+ my $in = shift;
+ if ($in eq 'unctrl' or $in eq 'quote') {
+ $self->{unctrl} = $in;
+ } else {
+ print "Unknown value for `unctrl'.\n";
+ }
+ }
+ $self->{unctrl};
+}
+
+sub set_quote {
+ my $self = shift;
+ if (@_ and $_[0] eq '"') {
+ $self->{tick} = '"';
+ $self->{unctrl} = 'quote';
+ } elsif (@_ and $_[0] eq 'auto') {
+ $self->{tick} = 'auto';
+ $self->{unctrl} = 'quote';
+ } elsif (@_) { # Need to set
+ $self->{tick} = "'";
+ $self->{unctrl} = 'unctrl';
+ }
+ $self->{tick};
+}
+
+sub dumpglob {
+ my $self = shift;
+ return if $DB::signal and $self->{stopDbSignal};
+ my ($package, $off, $key, $val, $all) = @_;
+ local(*stab) = $val;
+ my $fileno;
+ if (($key !~ /^_</ or $self->{dumpDBFiles}) and defined $stab) {
+ print( (' ' x $off) . "\$", &unctrl($key), " = " );
+ $self->DumpElem($stab, 3+$off);
+ }
+ if (($key !~ /^_</ or $self->{dumpDBFiles}) and defined @stab) {
+ print( (' ' x $off) . "\@$key = (\n" );
+ $self->unwrap(\@stab,3+$off) ;
+ print( (' ' x $off) . ")\n" );
+ }
+ if ($key ne "main::" && $key ne "DB::" && defined %stab
+ && ($self->{dumpPackages} or $key !~ /::$/)
+ && ($key !~ /^_</ or $self->{dumpDBFiles})
+ && !($package eq "Dumpvalue" and $key eq "stab")) {
+ print( (' ' x $off) . "\%$key = (\n" );
+ $self->unwrap(\%stab,3+$off) ;
+ print( (' ' x $off) . ")\n" );
+ }
+ if (defined ($fileno = fileno(*stab))) {
+ print( (' ' x $off) . "FileHandle($key) => fileno($fileno)\n" );
+ }
+ if ($all) {
+ if (defined &stab) {
+ $self->dumpsub($off, $key);
+ }
+ }
+}
+
+sub dumpsub {
+ my $self = shift;
+ my ($off,$sub) = @_;
+ $sub = $1 if $sub =~ /^\{\*(.*)\}$/;
+ my $subref = \&$sub;
+ my $place = $DB::sub{$sub} || (($sub = $subs{"$subref"}) && $DB::sub{$sub})
+ || ($self->{subdump} && ($sub = $self->findsubs("$subref"))
+ && $DB::sub{$sub});
+ $place = '???' unless defined $place;
+ print( (' ' x $off) . "&$sub in $place\n" );
+}
+
+sub findsubs {
+ my $self = shift;
+ return undef unless defined %DB::sub;
+ my ($addr, $name, $loc);
+ while (($name, $loc) = each %DB::sub) {
+ $addr = \&$name;
+ $subs{"$addr"} = $name;
+ }
+ $self->{subdump} = 0;
+ $subs{ shift() };
+}
+
+sub dumpvars {
+ my $self = shift;
+ my ($package,@vars) = @_;
+ local(%address,$^W);
+ my ($key,$val);
+ $package .= "::" unless $package =~ /::$/;
+ *stab = *main::;
+
+ while ($package =~ /(\w+?::)/g) {
+ *stab = $ {stab}{$1};
+ }
+ $self->{TotalStrings} = 0;
+ $self->{Strings} = 0;
+ $self->{CompleteTotal} = 0;
+ while (($key,$val) = each(%stab)) {
+ return if $DB::signal and $self->{stopDbSignal};
+ next if @vars && !grep( matchvar($key, $_), @vars );
+ if ($self->{usageOnly}) {
+ $self->globUsage(\$val, $key)
+ unless $package eq 'Dumpvalue' and $key eq 'stab';
+ } else {
+ $self->dumpglob($package, 0,$key, $val);
+ }
+ }
+ if ($self->{usageOnly}) {
+ print <<EOP;
+String space: $self->{TotalStrings} bytes in $self->{Strings} strings.
+EOP
+ $self->{CompleteTotal} += $self->{TotalStrings};
+ print <<EOP;
+Grand total = $self->{CompleteTotal} bytes (1 level deep) + overhead.
+EOP
+ }
+}
+
+sub scalarUsage {
+ my $self = shift;
+ my $size = length($_[0]);
+ $self->{TotalStrings} += $size;
+ $self->{Strings}++;
+ $size;
+}
+
+sub arrayUsage { # array ref, name
+ my $self = shift;
+ my $size = 0;
+ map {$size += $self->scalarUsage($_)} @{$_[0]};
+ my $len = @{$_[0]};
+ print "\@$_[1] = $len item", ($len > 1 ? "s" : ""), " (data: $size bytes)\n"
+ if defined $_[1];
+ $self->{CompleteTotal} += $size;
+ $size;
+}
+
+sub hashUsage { # hash ref, name
+ my $self = shift;
+ my @keys = keys %{$_[0]};
+ my @values = values %{$_[0]};
+ my $keys = $self->arrayUsage(\@keys);
+ my $values = $self->arrayUsage(\@values);
+ my $len = @keys;
+ my $total = $keys + $values;
+ print "\%$_[1] = $len item", ($len > 1 ? "s" : ""),
+ " (keys: $keys; values: $values; total: $total bytes)\n"
+ if defined $_[1];
+ $total;
+}
+
+sub globUsage { # glob ref, name
+ my $self = shift;
+ local *stab = *{$_[0]};
+ my $total = 0;
+ $total += $self->scalarUsage($stab) if defined $stab;
+ $total += $self->arrayUsage(\@stab, $_[1]) if defined @stab;
+ $total += $self->hashUsage(\%stab, $_[1])
+ if defined %stab and $_[1] ne "main::" and $_[1] ne "DB::";
+ #and !($package eq "Dumpvalue" and $key eq "stab"));
+ $total;
+}
+
+1;
+
+=head1 NAME
+
+Dumpvalue - provides screen dump of Perl data.
+
+=head1 SYNOPSYS
+
+ use Dumpvalue;
+ my $dumper = new Dumpvalue;
+ $dumper->set(globPrint => 1);
+ $dumper->dumpValue(\*::);
+ $dumper->dumpvars('main');
+
+=head1 DESCRIPTION
+
+=head2 Creation
+
+A new dumper is created by a call
+
+ $d = new Dumpvalue(option1 => value1, option2 => value2)
+
+Recognized options:
+
+=over
+
+=item C<arrayDepth>, C<hashDepth>
+
+Print only first N elements of arrays and hashes. If false, prints all the
+elements.
+
+=item C<compactDump>, C<veryCompact>
+
+Change style of array and hash dump. If true, short array
+may be printed on one line.
+
+=item C<globPrint>
+
+Whether to print contents of globs.
+
+=item C<DumpDBFiles>
+
+Dump arrays holding contents of debugged files.
+
+=item C<DumpPackages>
+
+Dump symbol tables of packages.
+
+=item C<DumpReused>
+
+Dump contents of "reused" addresses.
+
+=item C<tick>, C<HighBit>, C<printUndef>
+
+Change style of string dump. Default value of C<tick> is C<auto>, one
+can enable either double-quotish dump, or single-quotish by setting it
+to C<"> or C<'>. By default, characters with high bit set are printed
+I<as is>.
+
+=item C<UsageOnly>
+
+I<very> rudimentally per-package memory usage dump. If set,
+C<dumpvars> calculates total size of strings in variables in the package.
+
+=item unctrl
+
+Changes the style of printout of strings. Possible values are
+C<unctrl> and C<quote>.
+
+=item subdump
+
+Whether to try to find the subroutine name given the reference.
+
+=item bareStringify
+
+Whether to write the non-overloaded form of the stringify-overloaded objects.
+
+=item quoteHighBit
+
+Whether to print chars with high bit set in binary or "as is".
+
+=item stopDbSignal
+
+Whether to abort printing if debugger signal flag is raised.
+
+=back
+
+Later in the life of the object the methods may be queries with get()
+method and set() method (which accept multiple arguments).
+
+=head2 Methods
+
+=over
+
+=item dumpValue
+
+ $dumper->dumpValue($value);
+ $dumper->dumpValue([$value1, $value2]);
+
+=item dumpValues
+
+ $dumper->dumpValues($value1, $value2);
+
+=item dumpvars
+
+ $dumper->dumpvars('my_package');
+ $dumper->dumpvars('my_package', 'foo', '~bar$', '!......');
+
+The optional arguments are considered as literal strings unless they
+start with C<~> or C<!>, in which case they are interpreted as regular
+expressions (possibly negated).
+
+The second example prints entries with names C<foo>, and also entries
+with names which ends on C<bar>, or are shorter than 5 chars.
+
+=item set_quote
+
+ $d->set_quote('"');
+
+Sets C<tick> and C<unctrl> options to suitable values for printout with the
+given quote char. Possible values are C<auto>, C<'> and C<">.
+
+=item set_unctrl
+
+ $d->set_unctrl('"');
+
+Sets C<unctrl> option with checking for an invalid argument.
+Possible values are C<unctrl> and C<quote>.
+
+=item compactDump
+
+ $d->compactDump(1);
+
+Sets C<compactDump> option. If the value is 1, sets to a reasonable
+big number.
+
+=item veryCompact
+
+ $d->veryCompact(1);
+
+Sets C<compactDump> and C<veryCompact> options simultaneously.
+
+=item set
+
+ $d->set(option1 => value1, option2 => value2);
+
+=item get
+
+ @values = $d->get('option1', 'option2');
+
+=back
+
+=cut
+
diff --git a/gnu/usr.bin/perl/lib/ExtUtils/Installed.pm b/gnu/usr.bin/perl/lib/ExtUtils/Installed.pm
new file mode 100644
index 00000000000..dda594e7843
--- /dev/null
+++ b/gnu/usr.bin/perl/lib/ExtUtils/Installed.pm
@@ -0,0 +1,272 @@
+package ExtUtils::Installed;
+use strict;
+use Carp qw();
+use ExtUtils::Packlist;
+use ExtUtils::MakeMaker;
+use Config;
+use File::Find;
+use File::Basename;
+use vars qw($VERSION);
+$VERSION = '0.02';
+
+sub _is_type($$$)
+{
+my ($self, $path, $type) = @_;
+return(1) if ($type eq "all");
+if ($type eq "doc")
+ {
+ return(substr($path, 0, length($Config{installman1dir}))
+ eq $Config{installman1dir}
+ ||
+ substr($path, 0, length($Config{installman3dir}))
+ eq $Config{installman3dir}
+ ? 1 : 0)
+ }
+if ($type eq "prog")
+ {
+ return(substr($path, 0, length($Config{prefix})) eq $Config{prefix}
+ &&
+ substr($path, 0, length($Config{installman1dir}))
+ ne $Config{installman1dir}
+ &&
+ substr($path, 0, length($Config{installman3dir}))
+ ne $Config{installman3dir}
+ ? 1 : 0);
+ }
+return(0);
+}
+
+sub _is_under($$;)
+{
+my ($self, $path, @under) = @_;
+$under[0] = "" if (! @under);
+foreach my $dir (@under)
+ {
+ return(1) if (substr($path, 0, length($dir)) eq $dir);
+ }
+return(0);
+}
+
+sub new($)
+{
+my ($class) = @_;
+$class = ref($class) || $class;
+my $self = {};
+
+# Read the core packlist
+$self->{Perl}{packlist} =
+ ExtUtils::Packlist->new("$Config{installarchlib}/.packlist");
+$self->{Perl}{version} = $];
+
+# Read the module packlists
+my $sub = sub
+ {
+ # Only process module .packlists
+ return if ($_) ne ".packlist" || $File::Find::dir eq $Config{installarchlib};
+
+ # Hack of the leading bits of the paths & convert to a module name
+ my $module = $File::Find::name;
+ $module =~ s!$Config{archlib}/auto/(.*)/.packlist!$1!;
+ $module =~ s!$Config{sitearch}/auto/(.*)/.packlist!$1!;
+ my $modfile = "$module.pm";
+ $module =~ s!/!::!g;
+
+ # Find the top-level module file in @INC
+ $self->{$module}{version} = '';
+ foreach my $dir (@INC)
+ {
+ my $p = MM->catfile($dir, $modfile);
+ if (-f $p)
+ {
+ $self->{$module}{version} = MM->parse_version($p);
+ last;
+ }
+ }
+
+ # Read the .packlist
+ $self->{$module}{packlist} = ExtUtils::Packlist->new($File::Find::name);
+ };
+find($sub, $Config{archlib}, $Config{sitearch});
+
+return(bless($self, $class));
+}
+
+sub modules($)
+{
+my ($self) = @_;
+return(sort(keys(%$self)));
+}
+
+sub files($$;$)
+{
+my ($self, $module, $type, @under) = @_;
+
+# Validate arguments
+Carp::croak("$module is not installed") if (! exists($self->{$module}));
+$type = "all" if (! defined($type));
+Carp::croak('type must be "all", "prog" or "doc"')
+ if ($type ne "all" && $type ne "prog" && $type ne "doc");
+
+my (@files);
+foreach my $file (keys(%{$self->{$module}{packlist}}))
+ {
+ push(@files, $file)
+ if ($self->_is_type($file, $type) && $self->_is_under($file, @under));
+ }
+return(@files);
+}
+
+sub directories($$;$)
+{
+my ($self, $module, $type, @under) = @_;
+my (%dirs);
+foreach my $file ($self->files($module, $type, @under))
+ {
+ $dirs{dirname($file)}++;
+ }
+return(sort(keys(%dirs)));
+}
+
+sub directory_tree($$;$)
+{
+my ($self, $module, $type, @under) = @_;
+my (%dirs);
+foreach my $dir ($self->directories($module, $type, @under))
+ {
+ $dirs{$dir}++;
+ my ($last) = ("");
+ while ($last ne $dir)
+ {
+ $last = $dir;
+ $dir = dirname($dir);
+ last if (! $self->_is_under($dir, @under));
+ $dirs{$dir}++;
+ }
+ }
+return(sort(keys(%dirs)));
+}
+
+sub validate($;$)
+{
+my ($self, $module, $remove) = @_;
+Carp::croak("$module is not installed") if (! exists($self->{$module}));
+return($self->{$module}{packlist}->validate($remove));
+}
+
+sub packlist($$)
+{
+my ($self, $module) = @_;
+Carp::croak("$module is not installed") if (! exists($self->{$module}));
+return($self->{$module}{packlist});
+}
+
+sub version($$)
+{
+my ($self, $module) = @_;
+Carp::croak("$module is not installed") if (! exists($self->{$module}));
+return($self->{$module}{version});
+}
+
+sub DESTROY
+{
+}
+
+1;
+
+__END__
+
+=head1 NAME
+
+ExtUtils::Installed - Inventory management of installed modules
+
+=head1 SYNOPSIS
+
+ use ExtUtils::Installed;
+ my ($inst) = ExtUtils::Installed->new();
+ my (@modules) = $inst->modules();
+ my (@missing) = $inst->validate("DBI");
+ my $all_files = $inst->files("DBI");
+ my $files_below_usr_local = $inst->files("DBI", "all", "/usr/local");
+ my $all_dirs = $inst->directories("DBI");
+ my $dirs_below_usr_local = $inst->directory_tree("DBI", "prog");
+ my $packlist = $inst->packlist("DBI");
+
+=head1 DESCRIPTION
+
+ExtUtils::Installed provides a standard way to find out what core and module
+files have been installed. It uses the information stored in .packlist files
+created during installation to provide this information. In addition it
+provides facilities to classify the installed files and to extract directory
+information from the .packlist files.
+
+=head1 USAGE
+
+The new() function searches for all the installed .packlists on the system, and
+stores their contents. The .packlists can be queried with the functions
+described below.
+
+=head1 FUNCTIONS
+
+=over
+
+=item new()
+
+This takes no parameters, and searches for all the installed .packlists on the
+system. The packlists are read using the ExtUtils::packlist module.
+
+=item modules()
+
+This returns a list of the names of all the installed modules. The perl 'core'
+is given the special name 'Perl'.
+
+=item files()
+
+This takes one mandatory parameter, the name of a module. It returns a list of
+all the filenames from the package. To obtain a list of core perl files, use
+the module name 'Perl'. Additional parameters are allowed. The first is one
+of the strings "prog", "man" or "all", to select either just program files,
+just manual files or all files. The remaining parameters are a list of
+directories. The filenames returned will be restricted to those under the
+specified directories.
+
+=item directories()
+
+This takes one mandatory parameter, the name of a module. It returns a list of
+all the directories from the package. Additional parameters are allowed. The
+first is one of the strings "prog", "man" or "all", to select either just
+program directories, just manual directories or all directories. The remaining
+parameters are a list of directories. The directories returned will be
+restricted to those under the specified directories. This method returns only
+the leaf directories that contain files from the specified module.
+
+=item directory_tree()
+
+This is identical in operation to directory(), except that it includes all the
+intermediate directories back up to the specified directories.
+
+=item validate()
+
+This takes one mandatory parameter, the name of a module. It checks that all
+the files listed in the modules .packlist actually exist, and returns a list of
+any missing files. If an optional second argument which evaluates to true is
+given any missing files will be removed from the .packlist
+
+=item packlist()
+
+This returns the ExtUtils::Packlist object for the specified module.
+
+=item version()
+
+This returns the version number for the specified module.
+
+=back
+
+=head1 EXAMPLE
+
+See the example in L<ExtUtils::Packlist>.
+
+=head1 AUTHOR
+
+Alan Burlison <Alan.Burlison@uk.sun.com>
+
+=cut
diff --git a/gnu/usr.bin/perl/lib/ExtUtils/Packlist.pm b/gnu/usr.bin/perl/lib/ExtUtils/Packlist.pm
new file mode 100644
index 00000000000..eeb0a5b0c1c
--- /dev/null
+++ b/gnu/usr.bin/perl/lib/ExtUtils/Packlist.pm
@@ -0,0 +1,288 @@
+package ExtUtils::Packlist;
+use strict;
+use Carp qw();
+use vars qw($VERSION);
+$VERSION = '0.03';
+
+# Used for generating filehandle globs. IO::File might not be available!
+my $fhname = "FH1";
+
+sub mkfh()
+{
+no strict;
+my $fh = \*{$fhname++};
+use strict;
+return($fh);
+}
+
+sub new($$)
+{
+my ($class, $packfile) = @_;
+$class = ref($class) || $class;
+my %self;
+tie(%self, $class, $packfile);
+return(bless(\%self, $class));
+}
+
+sub TIEHASH
+{
+my ($class, $packfile) = @_;
+my $self = { packfile => $packfile };
+bless($self, $class);
+$self->read($packfile) if (defined($packfile) && -f $packfile);
+return($self);
+}
+
+sub STORE
+{
+$_[0]->{data}->{$_[1]} = $_[2];
+}
+
+sub FETCH
+{
+return($_[0]->{data}->{$_[1]});
+}
+
+sub FIRSTKEY
+{
+my $reset = scalar(keys(%{$_[0]->{data}}));
+return(each(%{$_[0]->{data}}));
+}
+
+sub NEXTKEY
+{
+return(each(%{$_[0]->{data}}));
+}
+
+sub EXISTS
+{
+return(exists($_[0]->{data}->{$_[1]}));
+}
+
+sub DELETE
+{
+return(delete($_[0]->{data}->{$_[1]}));
+}
+
+sub CLEAR
+{
+%{$_[0]->{data}} = ();
+}
+
+sub DESTROY
+{
+}
+
+sub read($;$)
+{
+my ($self, $packfile) = @_;
+$self = tied(%$self) || $self;
+
+if (defined($packfile)) { $self->{packfile} = $packfile; }
+else { $packfile = $self->{packfile}; }
+Carp::croak("No packlist filename specified") if (! defined($packfile));
+my $fh = mkfh();
+open($fh, "<$packfile") || Carp::croak("Can't open file $packfile: $!");
+$self->{data} = {};
+my ($line);
+while (defined($line = <$fh>))
+ {
+ chomp $line;
+ my ($key, @kvs) = split(' ', $line);
+ $key =~ s!/\./!/!g; # Some .packlists have spurious '/./' bits in the paths
+ if (! @kvs)
+ {
+ $self->{data}->{$key} = undef;
+ }
+ else
+ {
+ my ($data) = {};
+ foreach my $kv (@kvs)
+ {
+ my ($k, $v) = split('=', $kv);
+ $data->{$k} = $v;
+ }
+ $self->{data}->{$key} = $data;
+ }
+ }
+close($fh);
+}
+
+sub write($;$)
+{
+my ($self, $packfile) = @_;
+$self = tied(%$self) || $self;
+if (defined($packfile)) { $self->{packfile} = $packfile; }
+else { $packfile = $self->{packfile}; }
+Carp::croak("No packlist filename specified") if (! defined($packfile));
+my $fh = mkfh();
+open($fh, ">$packfile") || Carp::croak("Can't open file $packfile: $!");
+foreach my $key (sort(keys(%{$self->{data}})))
+ {
+ print $fh ("$key");
+ if (ref($self->{data}->{$key}))
+ {
+ my $data = $self->{data}->{$key};
+ foreach my $k (sort(keys(%$data)))
+ {
+ print $fh (" $k=$data->{$k}");
+ }
+ }
+ print $fh ("\n");
+ }
+close($fh);
+}
+
+sub validate($;$)
+{
+my ($self, $remove) = @_;
+$self = tied(%$self) || $self;
+my @missing;
+foreach my $key (sort(keys(%{$self->{data}})))
+ {
+ if (! -e $key)
+ {
+ push(@missing, $key);
+ delete($self->{data}{$key}) if ($remove);
+ }
+ }
+return(@missing);
+}
+
+sub packlist_file($)
+{
+my ($self) = @_;
+$self = tied(%$self) || $self;
+return($self->{packfile});
+}
+
+1;
+
+__END__
+
+=head1 NAME
+
+ExtUtils::Packlist - manage .packlist files
+
+=head1 SYNOPSIS
+
+ use ExtUtils::Packlist;
+ my ($pl) = ExtUtils::Packlist->new('.packlist');
+ $pl->read('/an/old/.packlist');
+ my @missing_files = $pl->validate();
+ $pl->write('/a/new/.packlist');
+
+ $pl->{'/some/file/name'}++;
+ or
+ $pl->{'/some/other/file/name'} = { type => 'file',
+ from => '/some/file' };
+
+=head1 DESCRIPTION
+
+ExtUtils::Packlist provides a standard way to manage .packlist files.
+Functions are provided to read and write .packlist files. The original
+.packlist format is a simple list of absolute pathnames, one per line. In
+addition, this package supports an extended format, where as well as a filename
+each line may contain a list of attributes in the form of a space separated
+list of key=value pairs. This is used by the installperl script to
+differentiate between files and links, for example.
+
+=head1 USAGE
+
+The hash reference returned by the new() function can be used to examine and
+modify the contents of the .packlist. Items may be added/deleted from the
+.packlist by modifying the hash. If the value associated with a hash key is a
+scalar, the entry written to the .packlist by any subsequent write() will be a
+simple filename. If the value is a hash, the entry written will be the
+filename followed by the key=value pairs from the hash. Reading back the
+.packlist will recreate the original entries.
+
+=head1 FUNCTIONS
+
+=over
+
+=item new()
+
+This takes an optional parameter, the name of a .packlist. If the file exists,
+it will be opened and the contents of the file will be read. The new() method
+returns a reference to a hash. This hash holds an entry for each line in the
+.packlist. In the case of old-style .packlists, the value associated with each
+key is undef. In the case of new-style .packlists, the value associated with
+each key is a hash containing the key=value pairs following the filename in the
+.packlist.
+
+=item read()
+
+This takes an optional parameter, the name of the .packlist to be read. If
+no file is specified, the .packlist specified to new() will be read. If the
+.packlist does not exist, Carp::croak will be called.
+
+=item write()
+
+This takes an optional parameter, the name of the .packlist to be written. If
+no file is specified, the .packlist specified to new() will be overwritten.
+
+=item validate()
+
+This checks that every file listed in the .packlist actually exists. If an
+argument which evaluates to true is given, any missing files will be removed
+from the internal hash. The return value is a list of the missing files, which
+will be empty if they all exist.
+
+=item packlist_file()
+
+This returns the name of the associated .packlist file
+
+=back
+
+=head1 EXAMPLE
+
+Here's C<modrm>, a little utility to cleanly remove an installed module.
+
+ #!/usr/local/bin/perl -w
+
+ use strict;
+ use IO::Dir;
+ use ExtUtils::Packlist;
+ use ExtUtils::Installed;
+
+ sub emptydir($) {
+ my ($dir) = @_;
+ my $dh = IO::Dir->new($dir) || return(0);
+ my @count = $dh->read();
+ $dh->close();
+ return(@count == 2 ? 1 : 0);
+ }
+
+ # Find all the installed packages
+ print("Finding all installed modules...\n");
+ my $installed = ExtUtils::Installed->new();
+
+ foreach my $module (grep(!/^Perl$/, $installed->modules())) {
+ my $version = $installed->version($module) || "???";
+ print("Found module $module Version $version\n");
+ print("Do you want to delete $module? [n] ");
+ my $r = <STDIN>; chomp($r);
+ if ($r && $r =~ /^y/i) {
+ # Remove all the files
+ foreach my $file (sort($installed->files($module))) {
+ print("rm $file\n");
+ unlink($file);
+ }
+ my $pf = $installed->packlist($module)->packlist_file();
+ print("rm $pf\n");
+ unlink($pf);
+ foreach my $dir (sort($installed->directory_tree($module))) {
+ if (emptydir($dir)) {
+ print("rmdir $dir\n");
+ rmdir($dir);
+ }
+ }
+ }
+ }
+
+=head1 AUTHOR
+
+Alan Burlison <Alan.Burlison@uk.sun.com>
+
+=cut
diff --git a/gnu/usr.bin/perl/lib/ExtUtils/inst b/gnu/usr.bin/perl/lib/ExtUtils/inst
new file mode 100644
index 00000000000..cbf2d01194a
--- /dev/null
+++ b/gnu/usr.bin/perl/lib/ExtUtils/inst
@@ -0,0 +1,139 @@
+#!/usr/local/bin/perl -w
+
+use strict;
+use IO::File;
+use ExtUtils::Packlist;
+use ExtUtils::Installed;
+
+use vars qw($Inst @Modules);
+
+################################################################################
+
+sub do_module($)
+{
+my ($module) = @_;
+my $help = <<EOF;
+Available commands are:
+ f [all|prog|doc] - List installed files of a given type
+ d [all|prog|doc] - List the directories used by a module
+ v - Validate the .packlist - check for missing files
+ t <tarfile> - Create a tar archive of the module
+ q - Quit the module
+EOF
+print($help);
+while (1)
+ {
+ print("$module cmd? ");
+ my $reply = <STDIN>; chomp($reply);
+ CASE:
+ {
+ $reply =~ /^f\s*/ and do
+ {
+ my $class = (split(' ', $reply))[1];
+ $class = 'all' if (! $class);
+ my @files;
+ if (eval { @files = $Inst->files($module, $class); })
+ {
+ print("$class files in $module are:\n ",
+ join("\n ", @files), "\n");
+ last CASE;
+ }
+ else
+ { print($@); }
+ };
+ $reply =~ /^d\s*/ and do
+ {
+ my $class = (split(' ', $reply))[1];
+ $class = 'all' if (! $class);
+ my @dirs;
+ if (eval { @dirs = $Inst->directories($module, $class); })
+ {
+ print("$class directories in $module are:\n ",
+ join("\n ", @dirs), "\n");
+ last CASE;
+ }
+ else
+ { print($@); }
+ };
+ $reply =~ /^t\s*/ and do
+ {
+ my $file = (split(' ', $reply))[1];
+ my $tmp = "/tmp/inst.$$";
+ if (my $fh = IO::File->new($tmp, "w"))
+ {
+ $fh->print(join("\n", $Inst->files($module)));
+ $fh->close();
+ system("tar cvf $file -I $tmp");
+ unlink($tmp);
+ last CASE;
+ }
+ else { print("Can't open $file: $!\n"); }
+ last CASE;
+ };
+ $reply eq 'v' and do
+ {
+ if (my @missing = $Inst->validate($module))
+ {
+ print("Files missing from $module are:\n ",
+ join("\n ", @missing), "\n");
+ }
+ else
+ {
+ print("$module has no missing files\n");
+ }
+ last CASE;
+ };
+ $reply eq 'q' and do
+ {
+ return;
+ };
+ # Default
+ print($help);
+ }
+ }
+}
+
+################################################################################
+
+sub toplevel()
+{
+my $help = <<EOF;
+Available commands are:
+ l - List all installed modules
+ m <module> - Select a module
+ q - Quit the program
+EOF
+print($help);
+while (1)
+ {
+ print("cmd? ");
+ my $reply = <STDIN>; chomp($reply);
+ CASE:
+ {
+ $reply eq 'l' and do
+ {
+ print("Installed modules are:\n ", join("\n ", @Modules), "\n");
+ last CASE;
+ };
+ $reply =~ /^m\s+/ and do
+ {
+ do_module((split(' ', $reply))[1]);
+ last CASE;
+ };
+ $reply eq 'q' and do
+ {
+ exit(0);
+ };
+ # Default
+ print($help);
+ }
+ }
+}
+
+################################################################################
+
+$Inst = ExtUtils::Installed->new();
+@Modules = $Inst->modules();
+toplevel();
+
+################################################################################
diff --git a/gnu/usr.bin/perl/lib/Fatal.pm b/gnu/usr.bin/perl/lib/Fatal.pm
new file mode 100644
index 00000000000..d1d95af8848
--- /dev/null
+++ b/gnu/usr.bin/perl/lib/Fatal.pm
@@ -0,0 +1,159 @@
+package Fatal;
+
+use Carp;
+use strict;
+use vars qw( $AUTOLOAD $Debug $VERSION);
+
+$VERSION = 1.02;
+
+$Debug = 0 unless defined $Debug;
+
+sub import {
+ my $self = shift(@_);
+ my($sym, $pkg);
+ $pkg = (caller)[0];
+ foreach $sym (@_) {
+ &_make_fatal($sym, $pkg);
+ }
+};
+
+sub AUTOLOAD {
+ my $cmd = $AUTOLOAD;
+ $cmd =~ s/.*:://;
+ &_make_fatal($cmd, (caller)[0]);
+ goto &$AUTOLOAD;
+}
+
+sub fill_protos {
+ my $proto = shift;
+ my ($n, $isref, @out, @out1, $seen_semi) = -1;
+ while ($proto =~ /\S/) {
+ $n++;
+ push(@out1,[$n,@out]) if $seen_semi;
+ push(@out, $1 . "{\$_[$n]}"), next if $proto =~ s/^\s*\\([\@%\$\&])//;
+ push(@out, "\$_[$n]"), next if $proto =~ s/^\s*([*\$&])//;
+ push(@out, "\@_[$n..\$#_]"), last if $proto =~ s/^\s*(;\s*)?\@//;
+ $seen_semi = 1, $n--, next if $proto =~ s/^\s*;//; # XXXX ????
+ die "Unknown prototype letters: \"$proto\"";
+ }
+ push(@out1,[$n+1,@out]);
+ @out1;
+}
+
+sub write_invocation {
+ my ($core, $call, $name, @argvs) = @_;
+ if (@argvs == 1) { # No optional arguments
+ my @argv = @{$argvs[0]};
+ shift @argv;
+ return "\t" . one_invocation($core, $call, $name, @argv) . ";\n";
+ } else {
+ my $else = "\t";
+ my (@out, @argv, $n);
+ while (@argvs) {
+ @argv = @{shift @argvs};
+ $n = shift @argv;
+ push @out, "$ {else}if (\@_ == $n) {\n";
+ $else = "\t} els";
+ push @out,
+ "\t\treturn " . one_invocation($core, $call, $name, @argv) . ";\n";
+ }
+ push @out, <<EOC;
+ }
+ die "$name(\@_): Do not expect to get ", scalar \@_, " arguments";
+EOC
+ return join '', @out;
+ }
+}
+
+sub one_invocation {
+ my ($core, $call, $name, @argv) = @_;
+ local $" = ', ';
+ return qq{$call(@argv) || croak "Can't $name(\@_)} .
+ ($core ? ': $!' : ', \$! is \"$!\"') . '"';
+}
+
+sub _make_fatal {
+ my($sub, $pkg) = @_;
+ my($name, $code, $sref, $real_proto, $proto, $core, $call);
+ my $ini = $sub;
+
+ $sub = "${pkg}::$sub" unless $sub =~ /::/;
+ $name = $sub;
+ $name =~ s/.*::// or $name =~ s/^&//;
+ print "# _make_fatal: sub=$sub pkg=$pkg name=$name\n" if $Debug;
+ croak "Bad subroutine name for Fatal: $name" unless $name =~ /^\w+$/;
+ if (defined(&$sub)) { # user subroutine
+ $sref = \&$sub;
+ $proto = prototype $sref;
+ $call = '&$sref';
+ } elsif ($sub eq $ini) { # Stray user subroutine
+ die "$sub is not a Perl subroutine"
+ } else { # CORE subroutine
+ $proto = eval { prototype "CORE::$name" };
+ die "$name is neither a builtin, nor a Perl subroutine"
+ if $@;
+ die "Cannot make a non-overridable builtin fatal"
+ if not defined $proto;
+ $core = 1;
+ $call = "CORE::$name";
+ }
+ if (defined $proto) {
+ $real_proto = " ($proto)";
+ } else {
+ $real_proto = '';
+ $proto = '@';
+ }
+ $code = <<EOS;
+sub$real_proto {
+ local(\$", \$!) = (', ', 0);
+EOS
+ my @protos = fill_protos($proto);
+ $code .= write_invocation($core, $call, $name, @protos);
+ $code .= "}\n";
+ print $code if $Debug;
+ {
+ no strict 'refs'; # to avoid: Can't use string (...) as a symbol ref ...
+ $code = eval("package $pkg; use Carp; $code");
+ die if $@;
+ local($^W) = 0; # to avoid: Subroutine foo redefined ...
+ *{$sub} = $code;
+ }
+}
+
+1;
+
+__END__
+
+=head1 NAME
+
+Fatal - replace functions with equivalents which succeed or die
+
+=head1 SYNOPSIS
+
+ use Fatal qw(open close);
+
+ sub juggle { . . . }
+ import Fatal 'juggle';
+
+=head1 DESCRIPTION
+
+C<Fatal> provides a way to conveniently replace functions which normally
+return a false value when they fail with equivalents which halt execution
+if they are not successful. This lets you use these functions without
+having to test their return values explicitly on each call. Errors are
+reported via C<die>, so you can trap them using C<$SIG{__DIE__}> if you
+wish to take some action before the program exits.
+
+The do-or-die equivalents are set up simply by calling Fatal's
+C<import> routine, passing it the names of the functions to be
+replaced. You may wrap both user-defined functions and overridable
+CORE operators (except C<exec>, C<system> which cannot be expressed
+via prototypes) in this way.
+
+=head1 AUTHOR
+
+Lionel.Cons@cern.ch
+
+prototype updates by Ilya Zakharevich ilya@math.ohio-state.edu
+
+=cut
diff --git a/gnu/usr.bin/perl/lib/File/Spec.pm b/gnu/usr.bin/perl/lib/File/Spec.pm
new file mode 100644
index 00000000000..616dcbcb7a0
--- /dev/null
+++ b/gnu/usr.bin/perl/lib/File/Spec.pm
@@ -0,0 +1,116 @@
+package File::Spec;
+
+require Exporter;
+
+@ISA = qw(Exporter);
+# Items to export into callers namespace by default. Note: do not export
+# names by default without a very good reason. Use EXPORT_OK instead.
+# Do not simply export all your public functions/methods/constants.
+@EXPORT = qw(
+
+);
+@EXPORT_OK = qw($Verbose);
+
+use strict;
+use vars qw(@ISA $VERSION $Verbose);
+
+$VERSION = '0.6';
+
+$Verbose = 0;
+
+require File::Spec::Unix;
+
+
+sub load {
+ my($class,$OS) = @_;
+ if ($OS eq 'VMS') {
+ require File::Spec::VMS;
+ require VMS::Filespec;
+ 'File::Spec::VMS'
+ } elsif ($OS eq 'os2') {
+ require File::Spec::OS2;
+ 'File::Spec::OS2'
+ } elsif ($OS eq 'MacOS') {
+ require File::Spec::Mac;
+ 'File::Spec::Mac'
+ } elsif ($OS eq 'MSWin32') {
+ require File::Spec::Win32;
+ 'File::Spec::Win32'
+ } else {
+ 'File::Spec::Unix'
+ }
+}
+
+@ISA = load('File::Spec', $^O);
+
+1;
+__END__
+
+=head1 NAME
+
+File::Spec - portably perform operations on file names
+
+=head1 SYNOPSIS
+
+C<use File::Spec;>
+
+C<$x=File::Spec-E<gt>catfile('a','b','c');>
+
+which returns 'a/b/c' under Unix.
+
+=head1 DESCRIPTION
+
+This module is designed to support operations commonly performed on file
+specifications (usually called "file names", but not to be confused with the
+contents of a file, or Perl's file handles), such as concatenating several
+directory and file names into a single path, or determining whether a path
+is rooted. It is based on code directly taken from MakeMaker 5.17, code
+written by Andreas KE<ouml>nig, Andy Dougherty, Charles Bailey, Ilya
+Zakharevich, Paul Schinder, and others.
+
+Since these functions are different for most operating systems, each set of
+OS specific routines is available in a separate module, including:
+
+ File::Spec::Unix
+ File::Spec::Mac
+ File::Spec::OS2
+ File::Spec::Win32
+ File::Spec::VMS
+
+The module appropriate for the current OS is automatically loaded by
+File::Spec. Since some modules (like VMS) make use of OS specific
+facilities, it may not be possible to load all modules under all operating
+systems.
+
+Since File::Spec is object oriented, subroutines should not called directly,
+as in:
+
+ File::Spec::catfile('a','b');
+
+but rather as class methods:
+
+ File::Spec->catfile('a','b');
+
+For a reference of available functions, please consult L<File::Spec::Unix>,
+which contains the entire set, and inherited by the modules for other
+platforms. For further information, please see L<File::Spec::Mac>,
+L<File::Spec::OS2>, L<File::Spec::Win32>, or L<File::Spec::VMS>.
+
+=head1 SEE ALSO
+
+File::Spec::Unix, File::Spec::Mac, File::Spec::OS2, File::Spec::Win32,
+File::Spec::VMS, ExtUtils::MakeMaker
+
+=head1 AUTHORS
+
+Kenneth Albanowski <F<kjahds@kjahds.com>>, Andy Dougherty
+<F<doughera@lafcol.lafayette.edu>>, Andreas KE<ouml>nig
+<F<A.Koenig@franz.ww.TU-Berlin.DE>>, Tim Bunce <F<Tim.Bunce@ig.co.uk>>. VMS
+support by Charles Bailey <F<bailey@newman.upenn.edu>>. OS/2 support by
+Ilya Zakharevich <F<ilya@math.ohio-state.edu>>. Mac support by Paul Schinder
+<F<schinder@pobox.com>>.
+
+=cut
+
+
+1;
diff --git a/gnu/usr.bin/perl/lib/File/Spec/Mac.pm b/gnu/usr.bin/perl/lib/File/Spec/Mac.pm
new file mode 100644
index 00000000000..63a9e1283e0
--- /dev/null
+++ b/gnu/usr.bin/perl/lib/File/Spec/Mac.pm
@@ -0,0 +1,230 @@
+package File::Spec::Mac;
+
+use Exporter ();
+use Config;
+use strict;
+use File::Spec;
+use vars qw(@ISA $VERSION $Is_Mac);
+
+$VERSION = '1.0';
+
+@ISA = qw(File::Spec::Unix);
+$Is_Mac = $^O eq 'MacOS';
+
+Exporter::import('File::Spec', '$Verbose');
+
+
+=head1 NAME
+
+File::Spec::Mac - File::Spec for MacOS
+
+=head1 SYNOPSIS
+
+C<require File::Spec::Mac;>
+
+=head1 DESCRIPTION
+
+Methods for manipulating file specifications.
+
+=head1 METHODS
+
+=over 2
+
+=item canonpath
+
+On MacOS, there's nothing to be done. Returns what it's given.
+
+=cut
+
+sub canonpath {
+ my($self,$path) = @_;
+ $path;
+}
+
+=item catdir
+
+Concatenate two or more directory names to form a complete path ending with
+a directory. Put a trailing : on the end of the complete path if there
+isn't one, because that's what's done in MacPerl's environment.
+
+The fundamental requirement of this routine is that
+
+ File::Spec->catdir(split(":",$path)) eq $path
+
+But because of the nature of Macintosh paths, some additional
+possibilities are allowed to make using this routine give reasonable results
+for some common situations. Here are the rules that are used. Each
+argument has its trailing ":" removed. Each argument, except the first,
+has its leading ":" removed. They are then joined together by a ":".
+
+So
+
+ File::Spec->catdir("a","b") = "a:b:"
+ File::Spec->catdir("a:",":b") = "a:b:"
+ File::Spec->catdir("a:","b") = "a:b:"
+ File::Spec->catdir("a",":b") = "a:b"
+ File::Spec->catdir("a","","b") = "a::b"
+
+etc.
+
+To get a relative path (one beginning with :), begin the first argument with :
+or put a "" as the first argument.
+
+If you don't want to worry about these rules, never allow a ":" on the ends
+of any of the arguments except at the beginning of the first.
+
+Under MacPerl, there is an additional ambiguity. Does the user intend that
+
+ File::Spec->catfile("LWP","Protocol","http.pm")
+
+be relative or absolute? There's no way of telling except by checking for the
+existence of LWP: or :LWP, and even there he may mean a dismounted volume or
+a relative path in a different directory (like in @INC). So those checks
+aren't done here. This routine will treat this as absolute.
+
+=cut
+
+# ';
+
+sub catdir {
+ shift;
+ my @args = @_;
+ $args[0] =~ s/:$//;
+ my $result = shift @args;
+ for (@args) {
+ s/:$//;
+ s/^://;
+ $result .= ":$_";
+ }
+ $result .= ":";
+ $result;
+}
+
+=item catfile
+
+Concatenate one or more directory names and a filename to form a
+complete path ending with a filename. Since this uses catdir, the
+same caveats apply. Note that the leading : is removed from the filename,
+so that
+
+ File::Spec->catfile($ENV{HOME},"file");
+
+and
+
+ File::Spec->catfile($ENV{HOME},":file");
+
+give the same answer, as one might expect.
+
+=cut
+
+sub catfile {
+ my $self = shift @_;
+ my $file = pop @_;
+ return $file unless @_;
+ my $dir = $self->catdir(@_);
+ $file =~ s/^://;
+ return $dir.$file;
+}
+
+=item curdir
+
+Returns a string representing of the current directory.
+
+=cut
+
+sub curdir {
+ return ":" ;
+}
+
+=item rootdir
+
+Returns a string representing the root directory. Under MacPerl,
+returns the name of the startup volume, since that's the closest in
+concept, although other volumes aren't rooted there. On any other
+platform returns '', since there's no common way to indicate "root
+directory" across all Macs.
+
+=cut
+
+sub rootdir {
+#
+# There's no real root directory on MacOS. If you're using MacPerl,
+# the name of the startup volume is returned, since that's the closest in
+# concept. On other platforms, simply return '', because nothing better
+# can be done.
+#
+ if($Is_Mac) {
+ require Mac::Files;
+ my $system = Mac::Files::FindFolder(&Mac::Files::kOnSystemDisk,
+ &Mac::Files::kSystemFolderType);
+ $system =~ s/:.*$/:/;
+ return $system;
+ } else {
+ return '';
+ }
+}
+
+=item updir
+
+Returns a string representing the parent directory.
+
+=cut
+
+sub updir {
+ return "::";
+}
+
+=item file_name_is_absolute
+
+Takes as argument a path and returns true, if it is an absolute path. In
+the case where a name can be either relative or absolute (for example, a
+folder named "HD" in the current working directory on a drive named "HD"),
+relative wins. Use ":" in the appropriate place in the path if you want to
+distinguish unambiguously.
+
+=cut
+
+sub file_name_is_absolute {
+ my($self,$file) = @_;
+ if ($file =~ /:/) {
+ return ($file !~ m/^:/);
+ } else {
+ return (! -e ":$file");
+ }
+}
+
+=item path
+
+Returns the null list for the MacPerl application, since the concept is
+usually meaningless under MacOS. But if you're using the MacPerl tool under
+MPW, it gives back $ENV{Commands} suitably split, as is done in
+:lib:ExtUtils:MM_Mac.pm.
+
+=cut
+
+sub path {
+#
+# The concept is meaningless under the MacPerl application.
+# Under MPW, it has a meaning.
+#
+ my($self) = @_;
+ my @path;
+ if(exists $ENV{Commands}) {
+ @path = split /,/,$ENV{Commands};
+ } else {
+ @path = ();
+ }
+ @path;
+}
+
+=back
+
+=head1 SEE ALSO
+
+L<File::Spec>
+
+=cut
+
+1;
+__END__
+
diff --git a/gnu/usr.bin/perl/lib/File/Spec/OS2.pm b/gnu/usr.bin/perl/lib/File/Spec/OS2.pm
new file mode 100644
index 00000000000..d6026177028
--- /dev/null
+++ b/gnu/usr.bin/perl/lib/File/Spec/OS2.pm
@@ -0,0 +1,51 @@
+package File::Spec::OS2;
+
+#use Config;
+#use Cwd;
+#use File::Basename;
+use strict;
+require Exporter;
+
+use File::Spec;
+use vars qw(@ISA);
+
+Exporter::import('File::Spec',
+ qw( $Verbose));
+
+@ISA = qw(File::Spec::Unix);
+
+$ENV{EMXSHELL} = 'sh'; # to run `commands`
+
+sub file_name_is_absolute {
+ my($self,$file) = @_;
+ $file =~ m{^([a-z]:)?[\\/]}i ;
+}
+
+sub path {
+ my($self) = @_;
+ my $path_sep = ";";
+ my $path = $ENV{PATH};
+ $path =~ s:\\:/:g;
+ my @path = split $path_sep, $path;
+ foreach(@path) { $_ = '.' if $_ eq '' }
+ @path;
+}
+
+1;
+__END__
+
+=head1 NAME
+
+File::Spec::OS2 - methods for OS/2 file specs
+
+=head1 SYNOPSIS
+
+ use File::Spec::OS2; # Done internally by File::Spec if needed
+
+=head1 DESCRIPTION
+
+See File::Spec::Unix for a documentation of the methods provided
+there. This package overrides the implementation of these methods, not
+the semantics.
+
+=cut
diff --git a/gnu/usr.bin/perl/lib/File/Spec/Unix.pm b/gnu/usr.bin/perl/lib/File/Spec/Unix.pm
new file mode 100644
index 00000000000..77de73a216a
--- /dev/null
+++ b/gnu/usr.bin/perl/lib/File/Spec/Unix.pm
@@ -0,0 +1,197 @@
+package File::Spec::Unix;
+
+use Exporter ();
+use Config;
+use File::Basename qw(basename dirname fileparse);
+use DirHandle;
+use strict;
+use vars qw(@ISA $Is_Mac $Is_OS2 $Is_VMS $Is_Win32);
+use File::Spec;
+
+Exporter::import('File::Spec', '$Verbose');
+
+$Is_OS2 = $^O eq 'os2';
+$Is_Mac = $^O eq 'MacOS';
+$Is_Win32 = $^O eq 'MSWin32';
+
+if ($Is_VMS = $^O eq 'VMS') {
+ require VMS::Filespec;
+ import VMS::Filespec qw( &vmsify );
+}
+
+=head1 NAME
+
+File::Spec::Unix - methods used by File::Spec
+
+=head1 SYNOPSIS
+
+C<require File::Spec::Unix;>
+
+=head1 DESCRIPTION
+
+Methods for manipulating file specifications.
+
+=head1 METHODS
+
+=over 2
+
+=item canonpath
+
+No physical check on the filesystem, but a logical cleanup of a
+path. On UNIX eliminated successive slashes and successive "/.".
+
+=cut
+
+sub canonpath {
+ my($self,$path) = @_;
+ $path =~ s|/+|/|g ; # xx////xx -> xx/xx
+ $path =~ s|(/\.)+/|/|g ; # xx/././xx -> xx/xx
+ $path =~ s|^(\./)+|| unless $path eq "./"; # ./xx -> xx
+ $path =~ s|/$|| unless $path eq "/"; # xx/ -> xx
+ $path;
+}
+
+=item catdir
+
+Concatenate two or more directory names to form a complete path ending
+with a directory. But remove the trailing slash from the resulting
+string, because it doesn't look good, isn't necessary and confuses
+OS2. Of course, if this is the root directory, don't cut off the
+trailing slash :-)
+
+=cut
+
+# ';
+
+sub catdir {
+ shift;
+ my @args = @_;
+ for (@args) {
+ # append a slash to each argument unless it has one there
+ $_ .= "/" if $_ eq '' or substr($_,-1) ne "/";
+ }
+ my $result = join('', @args);
+ # remove a trailing slash unless we are root
+ substr($result,-1) = ""
+ if length($result) > 1 && substr($result,-1) eq "/";
+ $result;
+}
+
+=item catfile
+
+Concatenate one or more directory names and a filename to form a
+complete path ending with a filename
+
+=cut
+
+sub catfile {
+ my $self = shift @_;
+ my $file = pop @_;
+ return $file unless @_;
+ my $dir = $self->catdir(@_);
+ for ($dir) {
+ $_ .= "/" unless substr($_,length($_)-1,1) eq "/";
+ }
+ return $dir.$file;
+}
+
+=item curdir
+
+Returns a string representing of the current directory. "." on UNIX.
+
+=cut
+
+sub curdir {
+ return "." ;
+}
+
+=item rootdir
+
+Returns a string representing of the root directory. "/" on UNIX.
+
+=cut
+
+sub rootdir {
+ return "/";
+}
+
+=item updir
+
+Returns a string representing of the parent directory. ".." on UNIX.
+
+=cut
+
+sub updir {
+ return "..";
+}
+
+=item no_upwards
+
+Given a list of file names, strip out those that refer to a parent
+directory. (Does not strip symlinks, only '.', '..', and equivalents.)
+
+=cut
+
+sub no_upwards {
+ my($self) = shift;
+ return grep(!/^\.{1,2}$/, @_);
+}
+
+=item file_name_is_absolute
+
+Takes as argument a path and returns true, if it is an absolute path.
+
+=cut
+
+sub file_name_is_absolute {
+ my($self,$file) = @_;
+ $file =~ m:^/: ;
+}
+
+=item path
+
+Takes no argument, returns the environment variable PATH as an array.
+
+=cut
+
+sub path {
+ my($self) = @_;
+ my $path_sep = ":";
+ my $path = $ENV{PATH};
+ my @path = split $path_sep, $path;
+ foreach(@path) { $_ = '.' if $_ eq '' }
+ @path;
+}
+
+=item join
+
+join is the same as catfile.
+
+=cut
+
+sub join {
+ my($self) = shift @_;
+ $self->catfile(@_);
+}
+
+=item nativename
+
+TBW.
+
+=cut
+
+sub nativename {
+ my($self,$name) = shift @_;
+ $name;
+}
+
+=back
+
+=head1 SEE ALSO
+
+L<File::Spec>
+
+=cut
+
+1;
+__END__
diff --git a/gnu/usr.bin/perl/lib/File/Spec/VMS.pm b/gnu/usr.bin/perl/lib/File/Spec/VMS.pm
new file mode 100644
index 00000000000..c5269fd10c7
--- /dev/null
+++ b/gnu/usr.bin/perl/lib/File/Spec/VMS.pm
@@ -0,0 +1,148 @@
+
+package File::Spec::VMS;
+
+use Carp qw( &carp );
+use Config;
+require Exporter;
+use VMS::Filespec;
+use File::Basename;
+
+use File::Spec;
+use vars qw($Revision);
+$Revision = '5.3901 (6-Mar-1997)';
+
+@ISA = qw(File::Spec::Unix);
+
+Exporter::import('File::Spec', '$Verbose');
+
+=head1 NAME
+
+File::Spec::VMS - methods for VMS file specs
+
+=head1 SYNOPSIS
+
+ use File::Spec::VMS; # Done internally by File::Spec if needed
+
+=head1 DESCRIPTION
+
+See File::Spec::Unix for a documentation of the methods provided
+there. This package overrides the implementation of these methods, not
+the semantics.
+
+=head2 Methods always loaded
+
+=over
+
+=item catdir
+
+Concatenates a list of file specifications, and returns the result as a
+VMS-syntax directory specification.
+
+=cut
+
+sub catdir {
+ my($self,@dirs) = @_;
+ my($dir) = pop @dirs;
+ @dirs = grep($_,@dirs);
+ my($rslt);
+ if (@dirs) {
+ my($path) = (@dirs == 1 ? $dirs[0] : $self->catdir(@dirs));
+ my($spath,$sdir) = ($path,$dir);
+ $spath =~ s/.dir$//; $sdir =~ s/.dir$//;
+ $sdir = $self->eliminate_macros($sdir) unless $sdir =~ /^[\w\-]+$/;
+ $rslt = $self->fixpath($self->eliminate_macros($spath)."/$sdir",1);
+ }
+ else {
+ if ($dir =~ /^\$\([^\)]+\)$/) { $rslt = $dir; }
+ else { $rslt = vmspath($dir); }
+ }
+ print "catdir(",join(',',@_[1..$#_]),") = |$rslt|\n" if $Verbose >= 3;
+ $rslt;
+}
+
+=item catfile
+
+Concatenates a list of file specifications, and returns the result as a
+VMS-syntax directory specification.
+
+=cut
+
+sub catfile {
+ my($self,@files) = @_;
+ my($file) = pop @files;
+ @files = grep($_,@files);
+ my($rslt);
+ if (@files) {
+ my($path) = (@files == 1 ? $files[0] : $self->catdir(@files));
+ my($spath) = $path;
+ $spath =~ s/.dir$//;
+ if ( $spath =~ /^[^\)\]\/:>]+\)$/ && basename($file) eq $file) { $rslt = "$spath$file"; }
+ else {
+ $rslt = $self->eliminate_macros($spath);
+ $rslt = vmsify($rslt.($rslt ? '/' : '').unixify($file));
+ }
+ }
+ else { $rslt = vmsify($file); }
+ print "catfile(",join(',',@_[1..$#_]),") = |$rslt|\n" if $Verbose >= 3;
+ $rslt;
+}
+
+=item curdir (override)
+
+Returns a string representing of the current directory.
+
+=cut
+
+sub curdir {
+ return '[]';
+}
+
+=item rootdir (override)
+
+Returns a string representing of the root directory.
+
+=cut
+
+sub rootdir {
+ return '';
+}
+
+=item updir (override)
+
+Returns a string representing of the parent directory.
+
+=cut
+
+sub updir {
+ return '[-]';
+}
+
+=item path (override)
+
+Translate logical name DCL$PATH as a searchlist, rather than trying
+to C<split> string value of C<$ENV{'PATH'}>.
+
+=cut
+
+sub path {
+ my(@dirs,$dir,$i);
+ while ($dir = $ENV{'DCL$PATH;' . $i++}) { push(@dirs,$dir); }
+ @dirs;
+}
+
+=item file_name_is_absolute (override)
+
+Checks for VMS directory spec as well as Unix separators.
+
+=cut
+
+sub file_name_is_absolute {
+ my($self,$file) = @_;
+ # If it's a logical name, expand it.
+ $file = $ENV{$file} while $file =~ /^[\w\$\-]+$/ and $ENV{$file};
+ $file =~ m!^/! or $file =~ m![<\[][^.\-\]>]! or $file =~ /:[^<\[]/;
+}
+
+1;
+__END__
+
diff --git a/gnu/usr.bin/perl/lib/File/Spec/Win32.pm b/gnu/usr.bin/perl/lib/File/Spec/Win32.pm
new file mode 100644
index 00000000000..034a0cbc2e6
--- /dev/null
+++ b/gnu/usr.bin/perl/lib/File/Spec/Win32.pm
@@ -0,0 +1,104 @@
+package File::Spec::Win32;
+
+=head1 NAME
+
+File::Spec::Win32 - methods for Win32 file specs
+
+=head1 SYNOPSIS
+
+ use File::Spec::Win32; # Done internally by File::Spec if needed
+
+=head1 DESCRIPTION
+
+See File::Spec::Unix for a documentation of the methods provided
+there. This package overrides the implementation of these methods, not
+the semantics.
+
+=over
+
+=cut
+
+#use Config;
+#use Cwd;
+use File::Basename;
+require Exporter;
+use strict;
+
+use vars qw(@ISA);
+
+use File::Spec;
+Exporter::import('File::Spec', qw( $Verbose));
+
+@ISA = qw(File::Spec::Unix);
+
+$ENV{EMXSHELL} = 'sh'; # to run `commands`
+
+sub file_name_is_absolute {
+ my($self,$file) = @_;
+ $file =~ m{^([a-z]:)?[\\/]}i ;
+}
+
+sub catdir {
+ my $self = shift;
+ my @args = @_;
+ for (@args) {
+ # append a slash to each argument unless it has one there
+ $_ .= "\\" if $_ eq '' or substr($_,-1) ne "\\";
+ }
+ my $result = $self->canonpath(join('', @args));
+ $result;
+}
+
+=item catfile
+
+Concatenate one or more directory names and a filename to form a
+complete path ending with a filename
+
+=cut
+
+sub catfile {
+ my $self = shift @_;
+ my $file = pop @_;
+ return $file unless @_;
+ my $dir = $self->catdir(@_);
+ $dir =~ s/(\\\.)$//;
+ $dir .= "\\" unless substr($dir,length($dir)-1,1) eq "\\";
+ return $dir.$file;
+}
+
+sub path {
+ local $^W = 1;
+ my($self) = @_;
+ my $path = $ENV{'PATH'} || $ENV{'Path'} || $ENV{'path'};
+ my @path = split(';',$path);
+ foreach(@path) { $_ = '.' if $_ eq '' }
+ @path;
+}
+
+=item canonpath
+
+No physical check on the filesystem, but a logical cleanup of a
+path. On UNIX eliminated successive slashes and successive "/.".
+
+=cut
+
+sub canonpath {
+ my($self,$path) = @_;
+ $path =~ s/^([a-z]:)/\u$1/;
+ $path =~ s|/|\\|g;
+ $path =~ s|\\+|\\|g ; # xx////xx -> xx/xx
+ $path =~ s|(\\\.)+\\|\\|g ; # xx/././xx -> xx/xx
+ $path =~ s|^(\.\\)+|| unless $path eq ".\\"; # ./xx -> xx
+ $path =~ s|\\$||
+ unless $path =~ m#^([a-z]:)?\\#; # xx/ -> xx
+ $path .= '.' if $path =~ m#\\$#;
+ $path;
+}
+
+1;
+__END__
+
+=back
+
+=cut
+
diff --git a/gnu/usr.bin/perl/lib/Test.pm b/gnu/usr.bin/perl/lib/Test.pm
new file mode 100644
index 00000000000..7a0e59b855f
--- /dev/null
+++ b/gnu/usr.bin/perl/lib/Test.pm
@@ -0,0 +1,249 @@
+use strict;
+package Test;
+use Test::Harness 1.1601 ();
+use Carp;
+use vars (qw($VERSION @ISA @EXPORT @EXPORT_OK $ntest $TestLevel), #public-ish
+ qw($TESTOUT $ONFAIL %todo %history $planned @FAILDETAIL)); #private-ish
+$VERSION = '1.122';
+require Exporter;
+@ISA=('Exporter');
+@EXPORT=qw(&plan &ok &skip);
+@EXPORT_OK=qw($ntest $TESTOUT);
+
+$TestLevel = 0; # how many extra stack frames to skip
+$|=1;
+#$^W=1; ?
+$ntest=1;
+$TESTOUT = *STDOUT{IO};
+
+# Use of this variable is strongly discouraged. It is set mainly to
+# help test coverage analyzers know which test is running.
+$ENV{REGRESSION_TEST} = $0;
+
+sub plan {
+ croak "Test::plan(%args): odd number of arguments" if @_ & 1;
+ croak "Test::plan(): should not be called more than once" if $planned;
+ my $max=0;
+ for (my $x=0; $x < @_; $x+=2) {
+ my ($k,$v) = @_[$x,$x+1];
+ if ($k =~ /^test(s)?$/) { $max = $v; }
+ elsif ($k eq 'todo' or
+ $k eq 'failok') { for (@$v) { $todo{$_}=1; }; }
+ elsif ($k eq 'onfail') {
+ ref $v eq 'CODE' or croak "Test::plan(onfail => $v): must be CODE";
+ $ONFAIL = $v;
+ }
+ else { carp "Test::plan(): skipping unrecognized directive '$k'" }
+ }
+ my @todo = sort { $a <=> $b } keys %todo;
+ if (@todo) {
+ print $TESTOUT "1..$max todo ".join(' ', @todo).";\n";
+ } else {
+ print $TESTOUT "1..$max\n";
+ }
+ ++$planned;
+}
+
+sub to_value {
+ my ($v) = @_;
+ (ref $v or '') eq 'CODE' ? $v->() : $v;
+}
+
+sub ok ($;$$) {
+ croak "ok: plan before you test!" if !$planned;
+ my ($pkg,$file,$line) = caller($TestLevel);
+ my $repetition = ++$history{"$file:$line"};
+ my $context = ("$file at line $line".
+ ($repetition > 1 ? " fail \#$repetition" : ''));
+ my $ok=0;
+ my $result = to_value(shift);
+ my ($expected,$diag);
+ if (@_ == 0) {
+ $ok = $result;
+ } else {
+ $expected = to_value(shift);
+ my ($regex,$ignore);
+ if ((ref($expected)||'') eq 'Regexp') {
+ $ok = $result =~ /$expected/;
+ } elsif (($regex) = ($expected =~ m,^ / (.+) / $,sx) or
+ ($ignore, $regex) = ($expected =~ m,^ m([^\w\s]) (.+) \1 $,sx)) {
+ $ok = $result =~ /$regex/;
+ } else {
+ $ok = $result eq $expected;
+ }
+ }
+ my $todo = $todo{$ntest};
+ if ($todo and $ok) {
+ $context .= ' TODO?!' if $todo;
+ print $TESTOUT "ok $ntest # ($context)\n";
+ } else {
+ print $TESTOUT "not " if !$ok;
+ print $TESTOUT "ok $ntest\n";
+
+ if (!$ok) {
+ my $detail = { 'repetition' => $repetition, 'package' => $pkg,
+ 'result' => $result, 'todo' => $todo };
+ $$detail{expected} = $expected if defined $expected;
+ $diag = $$detail{diagnostic} = to_value(shift) if @_;
+ $context .= ' *TODO*' if $todo;
+ if (!defined $expected) {
+ if (!$diag) {
+ print $TESTOUT "# Failed test $ntest in $context\n";
+ } else {
+ print $TESTOUT "# Failed test $ntest in $context: $diag\n";
+ }
+ } else {
+ my $prefix = "Test $ntest";
+ print $TESTOUT "# $prefix got: '$result' ($context)\n";
+ $prefix = ' ' x (length($prefix) - 5);
+ if ((ref($expected)||'') eq 'Regexp') {
+ $expected = 'qr/'.$expected.'/'
+ } else {
+ $expected = "'$expected'";
+ }
+ if (!$diag) {
+ print $TESTOUT "# $prefix Expected: $expected\n";
+ } else {
+ print $TESTOUT "# $prefix Expected: $expected ($diag)\n";
+ }
+ }
+ push @FAILDETAIL, $detail;
+ }
+ }
+ ++ $ntest;
+ $ok;
+}
+
+sub skip ($$;$$) {
+ my $whyskip = to_value(shift);
+ if ($whyskip) {
+ $whyskip = 'skip' if $whyskip =~ m/^\d+$/;
+ print $TESTOUT "ok $ntest # $whyskip\n";
+ ++ $ntest;
+ 1;
+ } else {
+ local($TestLevel) = $TestLevel+1; #ignore this stack frame
+ &ok;
+ }
+}
+
+END {
+ $ONFAIL->(\@FAILDETAIL) if @FAILDETAIL && $ONFAIL;
+}
+
+1;
+__END__
+
+=head1 NAME
+
+ Test - provides a simple framework for writing test scripts
+
+=head1 SYNOPSIS
+
+ use strict;
+ use Test;
+
+ # use a BEGIN block so we print our plan before MyModule is loaded
+ BEGIN { plan tests => 14, todo => [3,4] }
+
+ # load your module...
+ use MyModule;
+
+ ok(0); # failure
+ ok(1); # success
+
+ ok(0); # ok, expected failure (see todo list, above)
+ ok(1); # surprise success!
+
+ ok(0,1); # failure: '0' ne '1'
+ ok('broke','fixed'); # failure: 'broke' ne 'fixed'
+ ok('fixed','fixed'); # success: 'fixed' eq 'fixed'
+ ok('fixed',qr/x/); # success: 'fixed' =~ qr/x/
+
+ ok(sub { 1+1 }, 2); # success: '2' eq '2'
+ ok(sub { 1+1 }, 3); # failure: '2' ne '3'
+ ok(0, int(rand(2)); # (just kidding :-)
+
+ my @list = (0,0);
+ ok @list, 3, "\@list=".join(',',@list); #extra diagnostics
+ ok 'segmentation fault', '/(?i)success/'; #regex match
+
+ skip($feature_is_missing, ...); #do platform specific test
+
+=head1 DESCRIPTION
+
+L<Test::Harness> expects to see particular output when it executes
+tests. This module aims to make writing proper test scripts just a
+little bit easier (and less error prone :-).
+
+=head1 TEST TYPES
+
+=over 4
+
+=item * NORMAL TESTS
+
+These tests are expected to succeed. If they don't something's
+screwed up!
+
+=item * SKIPPED TESTS
+
+Skip is for tests that might or might not be possible to run depending
+on the availability of platform specific features. The first argument
+should evaluate to true (think "yes, please skip") if the required
+feature is not available. After the first argument, skip works
+exactly the same way as do normal tests.
+
+=item * TODO TESTS
+
+TODO tests are designed for maintaining an B<executable TODO list>.
+These tests are expected NOT to succeed. If a TODO test does succeed,
+the feature in question should not be on the TODO list, now should it?
+
+Packages should NOT be released with succeeding TODO tests. As soon
+as a TODO test starts working, it should be promoted to a normal test
+and the newly working feature should be documented in the release
+notes or change log.
+
+=back
+
+=head1 RETURN VALUE
+
+Both C<ok> and C<skip> return true if their test succeeds and false
+otherwise in a scalar context.
+
+=head1 ONFAIL
+
+ BEGIN { plan test => 4, onfail => sub { warn "CALL 911!" } }
+
+While test failures should be enough, extra diagnostics can be
+triggered at the end of a test run. C<onfail> is passed an array ref
+of hash refs that describe each test failure. Each hash will contain
+at least the following fields: C<package>, C<repetition>, and
+C<result>. (The file, line, and test number are not included because
+their correspondance to a particular test is tenuous.) If the test
+had an expected value or a diagnostic string, these will also be
+included.
+
+The B<optional> C<onfail> hook might be used simply to print out the
+version of your package and/or how to report problems. It might also
+be used to generate extremely sophisticated diagnostics for a
+particularly bizarre test failure. However it's not a panacea. Core
+dumps or other unrecoverable errors prevent the C<onfail> hook from
+running. (It is run inside an C<END> block.) Besides, C<onfail> is
+probably over-kill in most cases. (Your test code should be simpler
+than the code it is testing, yes?)
+
+=head1 SEE ALSO
+
+L<Test::Harness> and, perhaps, test coverage analysis tools.
+
+=head1 AUTHOR
+
+Copyright (c) 1998 Joshua Nathaniel Pritikin. All rights reserved.
+
+This package is free software and is provided "as is" without express
+or implied warranty. It may be used, redistributed and/or modified
+under the terms of the Perl Artistic License (see
+http://www.perl.com/perl/misc/Artistic.html)
+
+=cut
diff --git a/gnu/usr.bin/perl/lib/Tie/Array.pm b/gnu/usr.bin/perl/lib/Tie/Array.pm
new file mode 100644
index 00000000000..3f34c3b81ff
--- /dev/null
+++ b/gnu/usr.bin/perl/lib/Tie/Array.pm
@@ -0,0 +1,262 @@
+package Tie::Array;
+use vars qw($VERSION);
+use strict;
+$VERSION = '1.00';
+
+# Pod documentation after __END__ below.
+
+sub DESTROY { }
+sub EXTEND { }
+sub UNSHIFT { shift->SPLICE(0,0,@_) }
+sub SHIFT { shift->SPLICE(0,1) }
+sub CLEAR { shift->STORESIZE(0) }
+
+sub PUSH
+{
+ my $obj = shift;
+ my $i = $obj->FETCHSIZE;
+ $obj->STORE($i++, shift) while (@_);
+}
+
+sub POP
+{
+ my $obj = shift;
+ my $newsize = $obj->FETCHSIZE - 1;
+ my $val;
+ if ($newsize >= 0)
+ {
+ $val = $obj->FETCH($newsize);
+ $obj->STORESIZE($newsize);
+ }
+ $val;
+}
+
+sub SPLICE
+{
+ my $obj = shift;
+ my $sz = $obj->FETCHSIZE;
+ my $off = (@_) ? shift : 0;
+ $off += $sz if ($off < 0);
+ my $len = (@_) ? shift : $sz - $off;
+ my @result;
+ for (my $i = 0; $i < $len; $i++)
+ {
+ push(@result,$obj->FETCH($off+$i));
+ }
+ if (@_ > $len)
+ {
+ # Move items up to make room
+ my $d = @_ - $len;
+ my $e = $off+$len;
+ $obj->EXTEND($sz+$d);
+ for (my $i=$sz-1; $i >= $e; $i--)
+ {
+ my $val = $obj->FETCH($i);
+ $obj->STORE($i+$d,$val);
+ }
+ }
+ elsif (@_ < $len)
+ {
+ # Move items down to close the gap
+ my $d = $len - @_;
+ my $e = $off+$len;
+ for (my $i=$off+$len; $i < $sz; $i++)
+ {
+ my $val = $obj->FETCH($i);
+ $obj->STORE($i-$d,$val);
+ }
+ $obj->STORESIZE($sz-$d);
+ }
+ for (my $i=0; $i < @_; $i++)
+ {
+ $obj->STORE($off+$i,$_[$i]);
+ }
+ return @result;
+}
+
+package Tie::StdArray;
+use vars qw(@ISA);
+@ISA = 'Tie::Array';
+
+sub TIEARRAY { bless [], $_[0] }
+sub FETCHSIZE { scalar @{$_[0]} }
+sub STORESIZE { $#{$_[0]} = $_[1]-1 }
+sub STORE { $_[0]->[$_[1]] = $_[2] }
+sub FETCH { $_[0]->[$_[1]] }
+sub CLEAR { @{$_[0]} = () }
+sub POP { pop(@{$_[0]}) }
+sub PUSH { my $o = shift; push(@$o,@_) }
+sub SHIFT { shift(@{$_[0]}) }
+sub UNSHIFT { my $o = shift; unshift(@$o,@_) }
+
+sub SPLICE
+{
+ my $ob = shift;
+ my $sz = $ob->FETCHSIZE;
+ my $off = @_ ? shift : 0;
+ $off += $sz if $off < 0;
+ my $len = @_ ? shift : $sz-$off;
+ return splice(@$ob,$off,$len,@_);
+}
+
+1;
+
+__END__
+
+=head1 NAME
+
+Tie::Array - base class for tied arrays
+
+=head1 SYNOPSIS
+
+ package NewArray;
+ use Tie::Array;
+ @ISA = ('Tie::Array');
+
+ # mandatory methods
+ sub TIEARRAY { ... }
+ sub FETCH { ... }
+ sub FETCHSIZE { ... }
+
+ sub STORE { ... } # mandatory if elements writeable
+ sub STORESIZE { ... } # mandatory if elements can be added/deleted
+
+ # optional methods - for efficiency
+ sub CLEAR { ... }
+ sub PUSH { ... }
+ sub POP { ... }
+ sub SHIFT { ... }
+ sub UNSHIFT { ... }
+ sub SPLICE { ... }
+ sub EXTEND { ... }
+ sub DESTROY { ... }
+
+ package NewStdArray;
+ use Tie::Array;
+
+ @ISA = ('Tie::StdArray');
+
+ # all methods provided by default
+
+ package main;
+
+ $object = tie @somearray,Tie::NewArray;
+ $object = tie @somearray,Tie::StdArray;
+ $object = tie @somearray,Tie::NewStdArray;
+
+
+
+=head1 DESCRIPTION
+
+This module provides methods for array-tying classes. See
+L<perltie> for a list of the functions required in order to tie an array
+to a package. The basic B<Tie::Array> package provides stub C<DELETE>
+and C<EXTEND> methods, and implementations of C<PUSH>, C<POP>, C<SHIFT>,
+C<UNSHIFT>, C<SPLICE> and C<CLEAR> in terms of basic C<FETCH>, C<STORE>,
+C<FETCHSIZE>, C<STORESIZE>.
+
+The B<Tie::StdArray> package provides efficient methods required for tied arrays
+which are implemented as blessed references to an "inner" perl array.
+It inherits from B<Tie::Array>, and should cause tied arrays to behave exactly
+like standard arrays, allowing for selective overloading of methods.
+
+For developers wishing to write their own tied arrays, the required methods
+are briefly defined below. See the L<perltie> section for more detailed
+descriptive, as well as example code:
+
+=over
+
+=item TIEARRAY classname, LIST
+
+The class method is invoked by the command C<tie @array, classname>. Associates
+an array instance with the specified class. C<LIST> would represent
+additional arguments (along the lines of L<AnyDBM_File> and compatriots) needed
+to complete the association. The method should return an object of a class which
+provides the methods below.
+
+=item STORE this, index, value
+
+Store datum I<value> into I<index> for the tied array associated with
+object I<this>. If this makes the array larger then
+class's mapping of C<undef> should be returned for new positions.
+
+=item FETCH this, index
+
+Retrieve the datum in I<index> for the tied array associated with
+object I<this>.
+
+=item FETCHSIZE this
+
+Returns the total number of items in the tied array associated with
+object I<this>. (Equivalent to C<scalar(@array)>).
+
+=item STORESIZE this, count
+
+Sets the total number of items in the tied array associated with
+object I<this> to be I<count>. If this makes the array larger then
+class's mapping of C<undef> should be returned for new positions.
+If the array becomes smaller then entries beyond count should be
+deleted.
+
+=item EXTEND this, count
+
+Informative call that array is likely to grow to have I<count> entries.
+Can be used to optimize allocation. This method need do nothing.
+
+=item CLEAR this
+
+Clear (remove, delete, ...) all values from the tied array associated with
+object I<this>.
+
+=item DESTROY this
+
+Normal object destructor method.
+
+=item PUSH this, LIST
+
+Append elements of LIST to the array.
+
+=item POP this
+
+Remove last element of the array and return it.
+
+=item SHIFT this
+
+Remove the first element of the array (shifting other elements down)
+and return it.
+
+=item UNSHIFT this, LIST
+
+Insert LIST elements at the beginning of the array, moving existing elements
+up to make room.
+
+=item SPLICE this, offset, length, LIST
+
+Perform the equivalent of C<splice> on the array.
+
+I<offset> is optional and defaults to zero, negative values count back
+from the end of the array.
+
+I<length> is optional and defaults to rest of the array.
+
+I<LIST> may be empty.
+
+Returns a list of the original I<length> elements at I<offset>.
+
+=back
+
+=head1 CAVEATS
+
+There is no support at present for tied @ISA. There is a potential conflict
+between magic entries needed to notice setting of @ISA, and those needed to
+implement 'tie'.
+
+Very little consideration has been given to the behaviour of tied arrays
+when C<$[> is not default value of zero.
+
+=head1 AUTHOR
+
+Nick Ing-Simmons E<lt>nik@tiuk.ti.comE<gt>
+
+=cut
+
diff --git a/gnu/usr.bin/perl/lib/Tie/Handle.pm b/gnu/usr.bin/perl/lib/Tie/Handle.pm
new file mode 100644
index 00000000000..c7550530b87
--- /dev/null
+++ b/gnu/usr.bin/perl/lib/Tie/Handle.pm
@@ -0,0 +1,161 @@
+package Tie::Handle;
+
+=head1 NAME
+
+Tie::Handle - base class definitions for tied handles
+
+=head1 SYNOPSIS
+
+ package NewHandle;
+ require Tie::Handle;
+
+ @ISA = (Tie::Handle);
+
+ sub READ { ... } # Provide a needed method
+ sub TIEHANDLE { ... } # Overrides inherited method
+
+
+ package main;
+
+ tie *FH, 'NewHandle';
+
+=head1 DESCRIPTION
+
+This module provides some skeletal methods for handle-tying classes. See
+L<perltie> for a list of the functions required in tying a handle to a package.
+The basic B<Tie::Handle> package provides a C<new> method, as well as methods
+C<TIESCALAR>, C<FETCH> and C<STORE>. The C<new> method is provided as a means
+of grandfathering, for classes that forget to provide their own C<TIESCALAR>
+method.
+
+For developers wishing to write their own tied-handle classes, the methods
+are summarized below. The L<perltie> section not only documents these, but
+has sample code as well:
+
+=over
+
+=item TIEHANDLE classname, LIST
+
+The method invoked by the command C<tie *glob, classname>. Associates a new
+glob instance with the specified class. C<LIST> would represent additional
+arguments (along the lines of L<AnyDBM_File> and compatriots) needed to
+complete the association.
+
+=item WRITE this, scalar, length, offset
+
+Write I<length> bytes of data from I<scalar> starting at I<offset>.
+
+=item PRINT this, LIST
+
+Print the values in I<LIST>
+
+=item PRINTF this, format, LIST
+
+Print the values in I<LIST> using I<format>
+
+=item READ this, scalar, length, offset
+
+Read I<length> bytes of data into I<scalar> starting at I<offset>.
+
+=item READLINE this
+
+Read a single line
+
+=item GETC this
+
+Get a single character
+
+=item DESTROY this
+
+Free the storage associated with the tied handle referenced by I<this>.
+This is rarely needed, as Perl manages its memory quite well. But the
+option exists, should a class wish to perform specific actions upon the
+destruction of an instance.
+
+=back
+
+=head1 MORE INFORMATION
+
+The L<perltie> section contains an example of tying handles.
+
+=cut
+
+use Carp;
+
+sub new {
+ my $pkg = shift;
+ $pkg->TIEHANDLE(@_);
+}
+
+# "Grandfather" the new, a la Tie::Hash
+
+sub TIEHANDLE {
+ my $pkg = shift;
+ if (defined &{"{$pkg}::new"}) {
+ carp "WARNING: calling ${pkg}->new since ${pkg}->TIEHANDLE is missing"
+ if $^W;
+ $pkg->new(@_);
+ }
+ else {
+ croak "$pkg doesn't define a TIEHANDLE method";
+ }
+}
+
+sub PRINT {
+ my $self = shift;
+ if($self->can('WRITE') != \&WRITE) {
+ my $buf = join(defined $, ? $, : "",@_);
+ $buf .= $\ if defined $\;
+ $self->WRITE($buf,length($buf),0);
+ }
+ else {
+ croak ref($self)," doesn't define a PRINT method";
+ }
+}
+
+sub PRINTF {
+ my $self = shift;
+
+ if($self->can('WRITE') != \&WRITE) {
+ my $buf = sprintf(@_);
+ $self->WRITE($buf,length($buf),0);
+ }
+ else {
+ croak ref($self)," doesn't define a PRINTF method";
+ }
+}
+
+sub READLINE {
+ my $pkg = ref $_[0];
+ croak "$pkg doesn't define a READLINE method";
+}
+
+sub GETC {
+ my $self = shift;
+
+ if($self->can('READ') != \&READ) {
+ my $buf;
+ $self->READ($buf,1);
+ return $buf;
+ }
+ else {
+ croak ref($self)," doesn't define a GETC method";
+ }
+}
+
+sub READ {
+ my $pkg = ref $_[0];
+ croak "$pkg doesn't define a READ method";
+}
+
+sub WRITE {
+ my $pkg = ref $_[0];
+ croak "$pkg doesn't define a WRITE method";
+}
+
+sub CLOSE {
+ my $pkg = ref $_[0];
+ croak "$pkg doesn't define a CLOSE method";
+}
+
+1;
diff --git a/gnu/usr.bin/perl/lib/fields.pm b/gnu/usr.bin/perl/lib/fields.pm
new file mode 100644
index 00000000000..54602a6b882
--- /dev/null
+++ b/gnu/usr.bin/perl/lib/fields.pm
@@ -0,0 +1,156 @@
+package fields;
+
+=head1 NAME
+
+fields - compile-time class fields
+
+=head1 SYNOPSIS
+
+ {
+ package Foo;
+ use fields qw(foo bar _private);
+ }
+ ...
+ my Foo $var = new Foo;
+ $var->{foo} = 42;
+
+ # This will generate a compile-time error.
+ $var->{zap} = 42;
+
+ {
+ package Bar;
+ use base 'Foo';
+ use fields 'bar'; # hides Foo->{bar}
+ use fields qw(baz _private); # not shared with Foo
+ }
+
+=head1 DESCRIPTION
+
+The C<fields> pragma enables compile-time verified class fields. It
+does so by updating the %FIELDS hash in the calling package.
+
+If a typed lexical variable holding a reference is used to access a
+hash element and the %FIELDS hash of the given type exists, then the
+operation is turned into an array access at compile time. The %FIELDS
+hash maps from hash element names to the array indices. If the hash
+element is not present in the %FIELDS hash, then a compile-time error
+is signaled.
+
+Since the %FIELDS hash is used at compile-time, it must be set up at
+compile-time too. This is made easier with the help of the 'fields'
+and the 'base' pragma modules. The 'base' pragma will copy fields
+from base classes and the 'fields' pragma adds new fields. Field
+names that start with an underscore character are made private to a
+class and are not visible to subclasses. Inherited fields can be
+overridden but will generate a warning if used together with the C<-w>
+switch.
+
+The effect of all this is that you can have objects with named fields
+which are as compact and as fast arrays to access. This only works
+as long as the objects are accessed through properly typed variables.
+For untyped access to work you have to make sure that a reference to
+the proper %FIELDS hash is assigned to the 0'th element of the array
+object (so that the objects can be treated like an pseudo-hash). A
+constructor like this does the job:
+
+ sub new
+ {
+ my $class = shift;
+ no strict 'refs';
+ my $self = bless [\%{"$class\::FIELDS"}], $class;
+ $self;
+ }
+
+
+=head1 SEE ALSO
+
+L<base>,
+L<perlref/Pseudo-hashes: Using an array as a hash>
+
+=cut
+
+use strict;
+no strict 'refs';
+use vars qw(%attr $VERSION);
+
+$VERSION = "0.02";
+
+# some constants
+sub _PUBLIC () { 1 }
+sub _PRIVATE () { 2 }
+sub _INHERITED () { 4 }
+
+# The %attr hash holds the attributes of the currently assigned fields
+# per class. The hash is indexed by class names and the hash value is
+# an array reference. The array is indexed with the field numbers
+# (minus one) and the values are integer bit masks (or undef). The
+# size of the array also indicate the next field index too assign for
+# additional fields in this class.
+
+sub import {
+ my $class = shift;
+ my $package = caller(0);
+ my $fields = \%{"$package\::FIELDS"};
+ my $fattr = ($attr{$package} ||= []);
+
+ foreach my $f (@_) {
+ if (my $fno = $fields->{$f}) {
+ require Carp;
+ if ($fattr->[$fno-1] & _INHERITED) {
+ Carp::carp("Hides field '$f' in base class") if $^W;
+ } else {
+ Carp::croak("Field name '$f' already in use");
+ }
+ }
+ $fields->{$f} = @$fattr + 1;
+ push(@$fattr, ($f =~ /^_/) ? _PRIVATE : _PUBLIC);
+ }
+}
+
+sub inherit # called by base.pm
+{
+ my($derived, $base) = @_;
+
+ if (defined %{"$derived\::FIELDS"}) {
+ require Carp;
+ Carp::croak("Inherited %FIELDS can't override existing %FIELDS");
+ } else {
+ my $base_fields = \%{"$base\::FIELDS"};
+ my $derived_fields = \%{"$derived\::FIELDS"};
+
+ $attr{$derived}[@{$attr{$base}}-1] = undef;
+ while (my($k,$v) = each %$base_fields) {
+ next if $attr{$base}[$v-1] & _PRIVATE;
+ $attr{$derived}[$v-1] = _INHERITED;
+ $derived_fields->{$k} = $v;
+ }
+ }
+
+}
+
+sub _dump # sometimes useful for debugging
+{
+ for my $pkg (sort keys %attr) {
+ print "\n$pkg";
+ if (defined @{"$pkg\::ISA"}) {
+ print " (", join(", ", @{"$pkg\::ISA"}), ")";
+ }
+ print "\n";
+ my $fields = \%{"$pkg\::FIELDS"};
+ for my $f (sort {$fields->{$a} <=> $fields->{$b}} keys %$fields) {
+ my $no = $fields->{$f};
+ print " $no: $f";
+ my $fattr = $attr{$pkg}[$no-1];
+ if (defined $fattr) {
+ my @a;
+ push(@a, "public") if $fattr & _PUBLIC;
+ push(@a, "private") if $fattr & _PRIVATE;
+ push(@a, "inherited") if $fattr & _INHERITED;
+ print "\t(", join(", ", @a), ")";
+ }
+ print "\n";
+ }
+ }
+}
+
+1;
diff --git a/gnu/usr.bin/perl/lib/integer.pm b/gnu/usr.bin/perl/lib/integer.pm
index a88ce6a77c8..894931896fc 100644
--- a/gnu/usr.bin/perl/lib/integer.pm
+++ b/gnu/usr.bin/perl/lib/integer.pm
@@ -12,11 +12,22 @@ integer - Perl pragma to compute arithmetic in integer instead of double
=head1 DESCRIPTION
-This tells the compiler that it's okay to use integer operations
+This tells the compiler to use integer operations
from here to the end of the enclosing BLOCK. On many machines,
this doesn't matter a great deal for most computations, but on those
without floating point hardware, it can make a big difference.
+Note that this affects the operations, not the numbers. If you run this
+code
+
+ use integer;
+ $x = 1.5;
+ $y = $x + 1;
+ $z = -1.5;
+
+you'll be left with C<$x == 1.5>, C<$y == 2> and C<$z == -1>. The $z
+case happens because unary C<-> counts as an operation.
+
See L<perlmod/Pragmatic Modules>.
=cut
diff --git a/gnu/usr.bin/perl/mint/Makefile b/gnu/usr.bin/perl/mint/Makefile
new file mode 100644
index 00000000000..1608b153599
--- /dev/null
+++ b/gnu/usr.bin/perl/mint/Makefile
@@ -0,0 +1,15 @@
+# IMPORTANT: This Makefile is not intended to build Perl itself but
+# only to replace a broken pwd command!
+
+all: pwd
+
+pwd: pwd.c
+ $(CC) -O3 -o pwd pwd.c
+
+install: pwd
+ (new_pwd=`which pwd` && cp -f $$new_pwd $$new_pwd.broken \
+ && cp -f pwd $$new_pwd)
+
+clean:
+ rm -f pwd.o pwd
+
diff --git a/gnu/usr.bin/perl/mint/README b/gnu/usr.bin/perl/mint/README
new file mode 100644
index 00000000000..85e8a752915
--- /dev/null
+++ b/gnu/usr.bin/perl/mint/README
@@ -0,0 +1,14 @@
+This subdirectory contains some additional files which are necessary
+(or at least useful) when compiling Perl on MiNT.
+
+"Makefile" and "pwd.c" will build and install a fixed version of the
+pwd command if your system pwd is broken.
+
+The header files are wrappers around broken system header files. Make
+sure that this directory stands at first place in your include path
+when compiling Perl.
+
+The file system.c is an enhanced version of the system() function
+in the MiNTLib. It is strongly recommended that you insert this
+version into your libc before you compile Perl (see README.MiNT
+in the toplevel directory for details).
diff --git a/gnu/usr.bin/perl/mint/errno.h b/gnu/usr.bin/perl/mint/errno.h
new file mode 100644
index 00000000000..5c19d0efa7f
--- /dev/null
+++ b/gnu/usr.bin/perl/mint/errno.h
@@ -0,0 +1,32 @@
+/* Wrapper around broken system errno.h. */
+
+#ifndef _PERL_WRAPPER_AROUND_ERRNO_H
+# define _PERL_WRAPPER_AROUND_ERRNO_H 1
+
+/* First include the system file. */
+#include_next <errno.h>
+
+/* Now add the missing stuff.
+#ifndef EAGAIN
+# define EAGAIN EWOULDBLOCK
+#endif
+
+/* This one is problematic. If you open() a directory with the
+ MiNTLib you can't detect from errno if it is really a directory
+ or if the file simply doesn't exist. You'll get ENOENT
+ ("file not found") in either case.
+
+ Defining EISDIR as ENOENT is actually a bad idea but works fine
+ in general. In praxi, if code checks for errno == EISDIR it
+ will attempt an opendir() call on the file in question and this
+ call will also file if the file really can't be found. But
+ you may get compile-time errors if the errno checking is embedded
+ in a switch statement ("duplicate case value in switch").
+
+ Anyway, here the define works alright. */
+#ifndef EISDIR
+# define EISDIR ENOENT
+#endif
+
+#endif
+
diff --git a/gnu/usr.bin/perl/mint/pwd.c b/gnu/usr.bin/perl/mint/pwd.c
new file mode 100644
index 00000000000..c2711996de9
--- /dev/null
+++ b/gnu/usr.bin/perl/mint/pwd.c
@@ -0,0 +1,43 @@
+/* pwd.c - replacement for broken pwd command.
+ * Copyright 1997 Guido Flohr, <gufl0000@stud.uni-sb.de>.
+ * Do with it as you please.
+ */
+#include <stdio.h>
+#include <limits.h>
+#include <unistd.h>
+#include <string.h>
+#include <errno.h>
+
+#if defined(__STDC__) || defined(__cplusplus)
+int main (int argc, char* argv[])
+#else
+int main (argc, argv)
+ int argc;
+ char* argv[];
+#endif
+{
+ char path_buf[PATH_MAX + 1];
+
+ if (argc > 1) {
+ int i;
+
+ fflush (stdout);
+ fputs (argv[0], stderr);
+ fputs (": ignoring garbage arguments\n", stderr);
+ }
+
+ if (!getcwd (path_buf, PATH_MAX + 1)) {
+ fflush (stdout);
+ /* Save space, memory and the whales, avoid fprintf. */
+ fputs (argv[0], stderr);
+ fputs (": can\'t get current working directory: ", stderr);
+ fputs (strerror (errno), stderr);
+ fputc ('\n', stderr);
+ return 1;
+ }
+ if (puts (path_buf) < 0) {
+ return 1;
+ }
+ return 0;
+}
+/* End of pwd.c. */
diff --git a/gnu/usr.bin/perl/mint/stdio.h b/gnu/usr.bin/perl/mint/stdio.h
new file mode 100644
index 00000000000..7b2d65d8a8e
--- /dev/null
+++ b/gnu/usr.bin/perl/mint/stdio.h
@@ -0,0 +1,21 @@
+/* Wrapper around broken system stdio.h. */
+
+#ifndef _PERL_WRAPPER_AROUND_STDIO_H
+# define _PERL_WRAPPER_AROUND_STDIO_H 1
+
+/* The MiNTLib has a macro called EOS in stdio.h. This conflicts
+ with regnode.h. Who had this glorious idea. */
+#ifdef EOS
+# define PERL_EOS EOS
+#endif
+
+/* First include the system file. */
+#include_next <stdio.h>
+
+#ifdef EOS
+# undef EOS
+# define EOS PERL_EOS
+#endif
+
+#endif
+
diff --git a/gnu/usr.bin/perl/mint/sys/time.h b/gnu/usr.bin/perl/mint/sys/time.h
new file mode 100644
index 00000000000..38806cc9c12
--- /dev/null
+++ b/gnu/usr.bin/perl/mint/sys/time.h
@@ -0,0 +1,2 @@
+#include <time.h>
+
diff --git a/gnu/usr.bin/perl/mint/time.h b/gnu/usr.bin/perl/mint/time.h
new file mode 100644
index 00000000000..d6b031db312
--- /dev/null
+++ b/gnu/usr.bin/perl/mint/time.h
@@ -0,0 +1,22 @@
+/* Wrapper around broken system time.h. */
+
+#ifndef _PERL_WRAPPER_AROUND_TIME_H
+# define _PERL_WRAPPER_AROUND_TIME_H 1
+
+/* Recent versions of the MiNTLib have a macro HAS_TZNAME in
+ time.h resp. sys/time.h. Wow, I wonder why they didn't
+ define HAVE_CONFIG_H ... */
+#ifdef HAS_TZNAME
+# define PERL_HAS_TZNAME HAS_TZNAME
+#endif
+
+/* First include the system file. */
+#include_next <time.h>
+
+#ifdef HAS_TZNAME
+# undef HAS_TZNAME
+# define HAS_TZNAME PERL_HAS_TZNAME
+#endif
+
+#endif
+
diff --git a/gnu/usr.bin/perl/mpeix/mpeixish.h b/gnu/usr.bin/perl/mpeix/mpeixish.h
new file mode 100644
index 00000000000..23111718ffe
--- /dev/null
+++ b/gnu/usr.bin/perl/mpeix/mpeixish.h
@@ -0,0 +1,139 @@
+/*
+ * The following symbols are defined if your operating system supports
+ * functions by that name. All Unixes I know of support them, thus they
+ * are not checked by the configuration script, but are directly defined
+ * here.
+ */
+
+/* HAS_IOCTL:
+ * This symbol, if defined, indicates that the ioctl() routine is
+ * available to set I/O characteristics
+ */
+#define HAS_IOCTL / **/
+
+/* HAS_UTIME:
+ * This symbol, if defined, indicates that the routine utime() is
+ * available to update the access and modification times of files.
+ */
+#define HAS_UTIME / **/
+
+/* HAS_GROUP
+ * This symbol, if defined, indicates that the getgrnam() and
+ * getgrgid() routines are available to get group entries.
+ */
+#define HAS_GROUP / **/
+
+/* HAS_PASSWD
+ * This symbol, if defined, indicates that the getpwnam() and
+ * getpwuid() routines are available to get password entries.
+ */
+#define HAS_PASSWD / **/
+
+#define HAS_KILL
+#define HAS_WAIT
+
+/* USEMYBINMODE
+ * This symbol, if defined, indicates that the program should
+ * use the routine my_binmode(FILE *fp, char iotype) to insure
+ * that a file is in "binary" mode -- that is, that no translation
+ * of bytes occurs on read or write operations.
+ */
+#undef USEMYBINMODE
+
+/* Stat_t:
+ * This symbol holds the type used to declare buffers for information
+ * returned by stat(). It's usually just struct stat. It may be necessary
+ * to include <sys/stat.h> and <sys/types.h> to get any typedef'ed
+ * information.
+ */
+#define Stat_t struct stat
+
+/* USE_STAT_RDEV:
+ * This symbol is defined if this system has a stat structure declaring
+ * st_rdev
+ */
+#define USE_STAT_RDEV / **/
+
+/* ACME_MESS:
+ * This symbol, if defined, indicates that error messages should be
+ * should be generated in a format that allows the use of the Acme
+ * GUI/editor's autofind feature.
+ */
+#undef ACME_MESS /**/
+
+/* UNLINK_ALL_VERSIONS:
+ * This symbol, if defined, indicates that the program should arrange
+ * to remove all versions of a file if unlink() is called. This is
+ * probably only relevant for VMS.
+ */
+/* #define UNLINK_ALL_VERSIONS / **/
+
+/* VMS:
+ * This symbol, if defined, indicates that the program is running under
+ * VMS. It is currently automatically set by cpps running under VMS,
+ * and is included here for completeness only.
+ */
+/* #define VMS / **/
+
+/* ALTERNATE_SHEBANG:
+ * This symbol, if defined, contains a "magic" string which may be used
+ * as the first line of a Perl program designed to be executed directly
+ * by name, instead of the standard Unix #!. If ALTERNATE_SHEBANG
+ * begins with a character other then #, then Perl will only treat
+ * it as a command line if if finds the string "perl" in the first
+ * word; otherwise it's treated as the first line of code in the script.
+ * (IOW, Perl won't hand off to another interpreter via an alternate
+ * shebang sequence that might be legal Perl code.)
+ */
+/* #define ALTERNATE_SHEBANG "#!" / **/
+
+#if !defined(NSIG) || defined(M_UNIX) || defined(M_XENIX)
+# include <signal.h>
+#endif
+
+#ifndef SIGABRT
+# define SIGABRT SIGILL
+#endif
+#ifndef SIGILL
+# define SIGILL 6 /* blech */
+#endif
+#define ABORT() kill(getpid(),SIGABRT);
+
+/*
+ * fwrite1() should be a routine with the same calling sequence as fwrite(),
+ * but which outputs all of the bytes requested as a single stream (unlike
+ * fwrite() itself, which on some systems outputs several distinct records
+ * if the number_of_items parameter is >1).
+ */
+#define fwrite1 fwrite
+
+#define Stat(fname,bufptr) stat((fname),(bufptr))
+#define Fstat(fd,bufptr) fstat((fd),(bufptr))
+#define Fflush(fp) fflush(fp)
+#define Mkdir(path,mode) mkdir((path),(mode))
+
+#ifndef PERL_SYS_INIT
+#ifdef PERL_SCO5
+/* this should be set in a hint file, not here */
+# define PERL_SYS_INIT(c,v) fpsetmask(0); MALLOC_INIT
+#else
+# define PERL_SYS_INIT(c,v) MALLOC_INIT
+#endif
+#endif
+
+#ifndef PERL_SYS_TERM
+#define PERL_SYS_TERM() MALLOC_TERM
+#endif
+
+#define BIT_BUCKET "/dev/null"
+
+#define dXSUB_SYS
+
+/* pw_passwd, pw_gecos, pw_age, pw_comment exist in the struct passwd
+ * but they contain uninitialized (as in "accessing them will crash perl")
+ * pointers. Stay away from them. */
+
+#undef PWGECOS
+#undef PRPASSWD
+#undef PWAGE
+#undef PWCOMMENT
diff --git a/gnu/usr.bin/perl/mpeix/nm b/gnu/usr.bin/perl/mpeix/nm
new file mode 100644
index 00000000000..b2eb58d9d6c
--- /dev/null
+++ b/gnu/usr.bin/perl/mpeix/nm
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+# MPE doesn't have a native nm, and the gcc nm isn't quite fully functional.
+#
+# If Perl Configure is calling us, then use the native linker to extract the
+# symbol table and reformat it into something nm-like.
+#
+# Else it must be gcc calling us during the final link phase, so call gcc nm.
+
+if [ "$1" != "-configperl" ]; then
+ # Oops, the caller must be expecting gcc nm. Give it to them.
+ /usr/local/bin/nm $@
+ exit $?
+fi
+
+case $2 in
+ *.a) LIST="LISTRL RL=$2;DATA;ENTRYSYM" ;;
+ *.sl) LIST="LISTXL XL=$2;DATA;ENTRYSYM" ;;
+ *) exit 0 ;;
+esac
+
+# I wanted to pipe this into awk, but it fell victim to a known pipe/streams
+# bug on my multiprocessor machine.
+
+callci xeq linkedit.pub.sys \"$LIST\" >/tmp/nm.$$
+
+awk '\
+ / data univ / { printf "%-20s|%10s|%-6s|%-7s|%s\n",$1,$5,"extern","data","?"} \
+ / entry univ / { printf "%-20s|%10s|%-6s|%-7s|%s\n",$1,$7,"extern","entry","?"}' /tmp/nm.$$
+
+rm -f /tmp/nm.$$
+
+exit 0
diff --git a/gnu/usr.bin/perl/mpeix/relink b/gnu/usr.bin/perl/mpeix/relink
new file mode 100644
index 00000000000..625e2f03a5a
--- /dev/null
+++ b/gnu/usr.bin/perl/mpeix/relink
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+# MPE/iX as of 5.5 does not yet properly support linking against dynamic
+# libraries via gcc or ld. For now, re-run gcc without the external library
+# list, and then run the native linker with the list of dynamic libraries.
+
+gcc -o perl perlmain.o lib/auto/DynaLoader/DynaLoader.a libperl.a `cat ext.libs` -L/BIND/PUB/lib -lbind -L/SYSLOG/PUB -lsyslog
+callci 'linkedit "altprog ./perl;xl=/usr/lib/libcurses.sl,/lib/libsvipc.sl,/usr/lib/libsocket.sl,/lib/libm.sl,/lib/libc.sl"'
diff --git a/gnu/usr.bin/perl/objXSUB.h b/gnu/usr.bin/perl/objXSUB.h
new file mode 100644
index 00000000000..94ea6bebe75
--- /dev/null
+++ b/gnu/usr.bin/perl/objXSUB.h
@@ -0,0 +1,2065 @@
+#ifndef __objXSUB_h__
+#define __objXSUB_h__
+
+/* Varibles */
+
+#undef PL_Sv
+#define PL_Sv pPerl->PL_Sv
+#undef PL_Xpv
+#define PL_Xpv pPerl->PL_Xpv
+#undef PL_av_fetch_sv
+#define PL_av_fetch_sv pPerl->PL_av_fetch_sv
+#undef PL_bodytarget
+#define PL_bodytarget pPerl->PL_bodytarget
+#undef PL_bostr
+#define PL_bostr pPerl->PL_bostr
+#undef PL_chopset
+#define PL_chopset pPerl->PL_chopset
+#undef PL_colors
+#define PL_colors pPerl->PL_colors
+#undef PL_colorset
+#define PL_colorset pPerl->PL_colorset
+#undef PL_cred_mutex
+#define PL_cred_mutex pPerl->PL_cred_mutex
+#undef PL_curcop
+#define PL_curcop pPerl->PL_curcop
+#undef PL_curpad
+#define PL_curpad pPerl->PL_curpad
+#undef PL_curpm
+#define PL_curpm pPerl->PL_curpm
+#undef PL_curstack
+#define PL_curstack pPerl->PL_curstack
+#undef PL_curstackinfo
+#define PL_curstackinfo pPerl->PL_curstackinfo
+#undef PL_curstash
+#define PL_curstash pPerl->PL_curstash
+#undef PL_defoutgv
+#define PL_defoutgv pPerl->PL_defoutgv
+#undef PL_defstash
+#define PL_defstash pPerl->PL_defstash
+#undef PL_delaymagic
+#define PL_delaymagic pPerl->PL_delaymagic
+#undef PL_dirty
+#define PL_dirty pPerl->PL_dirty
+#undef PL_extralen
+#define PL_extralen pPerl->PL_extralen
+#undef PL_firstgv
+#define PL_firstgv pPerl->PL_firstgv
+#undef PL_formtarget
+#define PL_formtarget pPerl->PL_formtarget
+#undef PL_hv_fetch_ent_mh
+#define PL_hv_fetch_ent_mh pPerl->PL_hv_fetch_ent_mh
+#undef PL_hv_fetch_sv
+#define PL_hv_fetch_sv pPerl->PL_hv_fetch_sv
+#undef PL_in_eval
+#define PL_in_eval pPerl->PL_in_eval
+#undef PL_last_in_gv
+#define PL_last_in_gv pPerl->PL_last_in_gv
+#undef PL_lastgotoprobe
+#define PL_lastgotoprobe pPerl->PL_lastgotoprobe
+#undef PL_lastscream
+#define PL_lastscream pPerl->PL_lastscream
+#undef PL_localizing
+#define PL_localizing pPerl->PL_localizing
+#undef PL_mainstack
+#define PL_mainstack pPerl->PL_mainstack
+#undef PL_markstack
+#define PL_markstack pPerl->PL_markstack
+#undef PL_markstack_max
+#define PL_markstack_max pPerl->PL_markstack_max
+#undef PL_markstack_ptr
+#define PL_markstack_ptr pPerl->PL_markstack_ptr
+#undef PL_maxscream
+#define PL_maxscream pPerl->PL_maxscream
+#undef PL_modcount
+#define PL_modcount pPerl->PL_modcount
+#undef PL_nrs
+#define PL_nrs pPerl->PL_nrs
+#undef PL_ofs
+#define PL_ofs pPerl->PL_ofs
+#undef PL_ofslen
+#define PL_ofslen pPerl->PL_ofslen
+#undef PL_op
+#define PL_op pPerl->PL_op
+#undef PL_opsave
+#define PL_opsave pPerl->PL_opsave
+#undef PL_reg_eval_set
+#define PL_reg_eval_set pPerl->PL_reg_eval_set
+#undef PL_reg_flags
+#define PL_reg_flags pPerl->PL_reg_flags
+#undef PL_reg_start_tmp
+#define PL_reg_start_tmp pPerl->PL_reg_start_tmp
+#undef PL_reg_start_tmpl
+#define PL_reg_start_tmpl pPerl->PL_reg_start_tmpl
+#undef PL_regbol
+#define PL_regbol pPerl->PL_regbol
+#undef PL_regcc
+#define PL_regcc pPerl->PL_regcc
+#undef PL_regcode
+#define PL_regcode pPerl->PL_regcode
+#undef PL_regcomp_parse
+#define PL_regcomp_parse pPerl->PL_regcomp_parse
+#undef PL_regcomp_rx
+#define PL_regcomp_rx pPerl->PL_regcomp_rx
+#undef PL_regcompp
+#define PL_regcompp pPerl->PL_regcompp
+#undef PL_regdata
+#define PL_regdata pPerl->PL_regdata
+#undef PL_regdummy
+#define PL_regdummy pPerl->PL_regdummy
+#undef PL_regendp
+#define PL_regendp pPerl->PL_regendp
+#undef PL_regeol
+#define PL_regeol pPerl->PL_regeol
+#undef PL_regexecp
+#define PL_regexecp pPerl->PL_regexecp
+#undef PL_regflags
+#define PL_regflags pPerl->PL_regflags
+#undef PL_regindent
+#define PL_regindent pPerl->PL_regindent
+#undef PL_reginput
+#define PL_reginput pPerl->PL_reginput
+#undef PL_reginterp_cnt
+#define PL_reginterp_cnt pPerl->PL_reginterp_cnt
+#undef PL_reglastparen
+#define PL_reglastparen pPerl->PL_reglastparen
+#undef PL_regnarrate
+#define PL_regnarrate pPerl->PL_regnarrate
+#undef PL_regnaughty
+#define PL_regnaughty pPerl->PL_regnaughty
+#undef PL_regnpar
+#define PL_regnpar pPerl->PL_regnpar
+#undef PL_regprecomp
+#define PL_regprecomp pPerl->PL_regprecomp
+#undef PL_regprev
+#define PL_regprev pPerl->PL_regprev
+#undef PL_regprogram
+#define PL_regprogram pPerl->PL_regprogram
+#undef PL_regsawback
+#define PL_regsawback pPerl->PL_regsawback
+#undef PL_regseen
+#define PL_regseen pPerl->PL_regseen
+#undef PL_regsize
+#define PL_regsize pPerl->PL_regsize
+#undef PL_regstartp
+#define PL_regstartp pPerl->PL_regstartp
+#undef PL_regtill
+#define PL_regtill pPerl->PL_regtill
+#undef PL_regxend
+#define PL_regxend pPerl->PL_regxend
+#undef PL_restartop
+#define PL_restartop pPerl->PL_restartop
+#undef PL_retstack
+#define PL_retstack pPerl->PL_retstack
+#undef PL_retstack_ix
+#define PL_retstack_ix pPerl->PL_retstack_ix
+#undef PL_retstack_max
+#define PL_retstack_max pPerl->PL_retstack_max
+#undef PL_rs
+#define PL_rs pPerl->PL_rs
+#undef PL_savestack
+#define PL_savestack pPerl->PL_savestack
+#undef PL_savestack_ix
+#define PL_savestack_ix pPerl->PL_savestack_ix
+#undef PL_savestack_max
+#define PL_savestack_max pPerl->PL_savestack_max
+#undef PL_scopestack
+#define PL_scopestack pPerl->PL_scopestack
+#undef PL_scopestack_ix
+#define PL_scopestack_ix pPerl->PL_scopestack_ix
+#undef PL_scopestack_max
+#define PL_scopestack_max pPerl->PL_scopestack_max
+#undef PL_screamfirst
+#define PL_screamfirst pPerl->PL_screamfirst
+#undef PL_screamnext
+#define PL_screamnext pPerl->PL_screamnext
+#undef PL_secondgv
+#define PL_secondgv pPerl->PL_secondgv
+#undef PL_seen_evals
+#define PL_seen_evals pPerl->PL_seen_evals
+#undef PL_seen_zerolen
+#define PL_seen_zerolen pPerl->PL_seen_zerolen
+#undef PL_sortcop
+#define PL_sortcop pPerl->PL_sortcop
+#undef PL_sortcxix
+#define PL_sortcxix pPerl->PL_sortcxix
+#undef PL_sortstash
+#define PL_sortstash pPerl->PL_sortstash
+#undef PL_stack_base
+#define PL_stack_base pPerl->PL_stack_base
+#undef PL_stack_max
+#define PL_stack_max pPerl->PL_stack_max
+#undef PL_stack_sp
+#define PL_stack_sp pPerl->PL_stack_sp
+#undef PL_start_env
+#define PL_start_env pPerl->PL_start_env
+#undef PL_statbuf
+#define PL_statbuf pPerl->PL_statbuf
+#undef PL_statcache
+#define PL_statcache pPerl->PL_statcache
+#undef PL_statgv
+#define PL_statgv pPerl->PL_statgv
+#undef PL_statname
+#define PL_statname pPerl->PL_statname
+#undef PL_tainted
+#define PL_tainted pPerl->PL_tainted
+#undef PL_timesbuf
+#define PL_timesbuf pPerl->PL_timesbuf
+#undef PL_tmps_floor
+#define PL_tmps_floor pPerl->PL_tmps_floor
+#undef PL_tmps_ix
+#define PL_tmps_ix pPerl->PL_tmps_ix
+#undef PL_tmps_max
+#define PL_tmps_max pPerl->PL_tmps_max
+#undef PL_tmps_stack
+#define PL_tmps_stack pPerl->PL_tmps_stack
+#undef PL_top_env
+#define PL_top_env pPerl->PL_top_env
+#undef PL_toptarget
+#define PL_toptarget pPerl->PL_toptarget
+#undef PL_Argv
+#define PL_Argv pPerl->PL_Argv
+#undef PL_Cmd
+#define PL_Cmd pPerl->PL_Cmd
+#undef PL_DBcv
+#define PL_DBcv pPerl->PL_DBcv
+#undef PL_DBgv
+#define PL_DBgv pPerl->PL_DBgv
+#undef PL_DBline
+#define PL_DBline pPerl->PL_DBline
+#undef PL_DBsignal
+#define PL_DBsignal pPerl->PL_DBsignal
+#undef PL_DBsingle
+#define PL_DBsingle pPerl->PL_DBsingle
+#undef PL_DBsub
+#define PL_DBsub pPerl->PL_DBsub
+#undef PL_DBtrace
+#define PL_DBtrace pPerl->PL_DBtrace
+#undef PL_ampergv
+#define PL_ampergv pPerl->PL_ampergv
+#undef PL_archpat_auto
+#define PL_archpat_auto pPerl->PL_archpat_auto
+#undef PL_argvgv
+#define PL_argvgv pPerl->PL_argvgv
+#undef PL_argvoutgv
+#define PL_argvoutgv pPerl->PL_argvoutgv
+#undef PL_basetime
+#define PL_basetime pPerl->PL_basetime
+#undef PL_beginav
+#define PL_beginav pPerl->PL_beginav
+#undef PL_cddir
+#define PL_cddir pPerl->PL_cddir
+#undef PL_compcv
+#define PL_compcv pPerl->PL_compcv
+#undef PL_compiling
+#define PL_compiling pPerl->PL_compiling
+#undef PL_comppad
+#define PL_comppad pPerl->PL_comppad
+#undef PL_comppad_name
+#define PL_comppad_name pPerl->PL_comppad_name
+#undef PL_comppad_name_fill
+#define PL_comppad_name_fill pPerl->PL_comppad_name_fill
+#undef PL_comppad_name_floor
+#define PL_comppad_name_floor pPerl->PL_comppad_name_floor
+#undef PL_copline
+#define PL_copline pPerl->PL_copline
+#undef PL_curcopdb
+#define PL_curcopdb pPerl->PL_curcopdb
+#undef PL_curstname
+#define PL_curstname pPerl->PL_curstname
+#undef PL_dbargs
+#define PL_dbargs pPerl->PL_dbargs
+#undef PL_debdelim
+#define PL_debdelim pPerl->PL_debdelim
+#undef PL_debname
+#define PL_debname pPerl->PL_debname
+#undef PL_debstash
+#define PL_debstash pPerl->PL_debstash
+#undef PL_defgv
+#define PL_defgv pPerl->PL_defgv
+#undef PL_diehook
+#define PL_diehook pPerl->PL_diehook
+#undef PL_dlevel
+#define PL_dlevel pPerl->PL_dlevel
+#undef PL_dlmax
+#define PL_dlmax pPerl->PL_dlmax
+#undef PL_doextract
+#define PL_doextract pPerl->PL_doextract
+#undef PL_doswitches
+#define PL_doswitches pPerl->PL_doswitches
+#undef PL_dowarn
+#define PL_dowarn pPerl->PL_dowarn
+#undef PL_dumplvl
+#define PL_dumplvl pPerl->PL_dumplvl
+#undef PL_e_script
+#define PL_e_script pPerl->PL_e_script
+#undef PL_endav
+#define PL_endav pPerl->PL_endav
+#undef PL_envgv
+#define PL_envgv pPerl->PL_envgv
+#undef PL_errgv
+#define PL_errgv pPerl->PL_errgv
+#undef PL_eval_root
+#define PL_eval_root pPerl->PL_eval_root
+#undef PL_eval_start
+#define PL_eval_start pPerl->PL_eval_start
+#undef PL_exitlist
+#define PL_exitlist pPerl->PL_exitlist
+#undef PL_exitlistlen
+#define PL_exitlistlen pPerl->PL_exitlistlen
+#undef PL_fdpid
+#define PL_fdpid pPerl->PL_fdpid
+#undef PL_filemode
+#define PL_filemode pPerl->PL_filemode
+#undef PL_forkprocess
+#define PL_forkprocess pPerl->PL_forkprocess
+#undef PL_formfeed
+#define PL_formfeed pPerl->PL_formfeed
+#undef PL_generation
+#define PL_generation pPerl->PL_generation
+#undef PL_gensym
+#define PL_gensym pPerl->PL_gensym
+#undef PL_globalstash
+#define PL_globalstash pPerl->PL_globalstash
+#undef PL_hintgv
+#define PL_hintgv pPerl->PL_hintgv
+#undef PL_in_clean_all
+#define PL_in_clean_all pPerl->PL_in_clean_all
+#undef PL_in_clean_objs
+#define PL_in_clean_objs pPerl->PL_in_clean_objs
+#undef PL_incgv
+#define PL_incgv pPerl->PL_incgv
+#undef PL_initav
+#define PL_initav pPerl->PL_initav
+#undef PL_inplace
+#define PL_inplace pPerl->PL_inplace
+#undef PL_last_proto
+#define PL_last_proto pPerl->PL_last_proto
+#undef PL_lastfd
+#define PL_lastfd pPerl->PL_lastfd
+#undef PL_lastsize
+#define PL_lastsize pPerl->PL_lastsize
+#undef PL_lastspbase
+#define PL_lastspbase pPerl->PL_lastspbase
+#undef PL_laststatval
+#define PL_laststatval pPerl->PL_laststatval
+#undef PL_laststype
+#define PL_laststype pPerl->PL_laststype
+#undef PL_leftgv
+#define PL_leftgv pPerl->PL_leftgv
+#undef PL_lineary
+#define PL_lineary pPerl->PL_lineary
+#undef PL_linestart
+#define PL_linestart pPerl->PL_linestart
+#undef PL_localpatches
+#define PL_localpatches pPerl->PL_localpatches
+#undef PL_main_cv
+#define PL_main_cv pPerl->PL_main_cv
+#undef PL_main_root
+#define PL_main_root pPerl->PL_main_root
+#undef PL_main_start
+#define PL_main_start pPerl->PL_main_start
+#undef PL_maxsysfd
+#define PL_maxsysfd pPerl->PL_maxsysfd
+#undef PL_mess_sv
+#define PL_mess_sv pPerl->PL_mess_sv
+#undef PL_minus_F
+#define PL_minus_F pPerl->PL_minus_F
+#undef PL_minus_a
+#define PL_minus_a pPerl->PL_minus_a
+#undef PL_minus_c
+#define PL_minus_c pPerl->PL_minus_c
+#undef PL_minus_l
+#define PL_minus_l pPerl->PL_minus_l
+#undef PL_minus_n
+#define PL_minus_n pPerl->PL_minus_n
+#undef PL_minus_p
+#define PL_minus_p pPerl->PL_minus_p
+#undef PL_modglobal
+#define PL_modglobal pPerl->PL_modglobal
+#undef PL_multiline
+#define PL_multiline pPerl->PL_multiline
+#undef PL_mystrk
+#define PL_mystrk pPerl->PL_mystrk
+#undef PL_ofmt
+#define PL_ofmt pPerl->PL_ofmt
+#undef PL_oldlastpm
+#define PL_oldlastpm pPerl->PL_oldlastpm
+#undef PL_oldname
+#define PL_oldname pPerl->PL_oldname
+#undef PL_op_mask
+#define PL_op_mask pPerl->PL_op_mask
+#undef PL_origargc
+#define PL_origargc pPerl->PL_origargc
+#undef PL_origargv
+#define PL_origargv pPerl->PL_origargv
+#undef PL_origfilename
+#define PL_origfilename pPerl->PL_origfilename
+#undef PL_ors
+#define PL_ors pPerl->PL_ors
+#undef PL_orslen
+#define PL_orslen pPerl->PL_orslen
+#undef PL_parsehook
+#define PL_parsehook pPerl->PL_parsehook
+#undef PL_patchlevel
+#define PL_patchlevel pPerl->PL_patchlevel
+#undef PL_pending_ident
+#define PL_pending_ident pPerl->PL_pending_ident
+#undef PL_perl_destruct_level
+#define PL_perl_destruct_level pPerl->PL_perl_destruct_level
+#undef PL_perldb
+#define PL_perldb pPerl->PL_perldb
+#undef PL_preambleav
+#define PL_preambleav pPerl->PL_preambleav
+#undef PL_preambled
+#define PL_preambled pPerl->PL_preambled
+#undef PL_preprocess
+#define PL_preprocess pPerl->PL_preprocess
+#undef PL_profiledata
+#define PL_profiledata pPerl->PL_profiledata
+#undef PL_replgv
+#define PL_replgv pPerl->PL_replgv
+#undef PL_rightgv
+#define PL_rightgv pPerl->PL_rightgv
+#undef PL_rsfp
+#define PL_rsfp pPerl->PL_rsfp
+#undef PL_rsfp_filters
+#define PL_rsfp_filters pPerl->PL_rsfp_filters
+#undef PL_sawampersand
+#define PL_sawampersand pPerl->PL_sawampersand
+#undef PL_sawstudy
+#define PL_sawstudy pPerl->PL_sawstudy
+#undef PL_sawvec
+#define PL_sawvec pPerl->PL_sawvec
+#undef PL_siggv
+#define PL_siggv pPerl->PL_siggv
+#undef PL_splitstr
+#define PL_splitstr pPerl->PL_splitstr
+#undef PL_statusvalue
+#define PL_statusvalue pPerl->PL_statusvalue
+#undef PL_statusvalue_vms
+#define PL_statusvalue_vms pPerl->PL_statusvalue_vms
+#undef PL_stdingv
+#define PL_stdingv pPerl->PL_stdingv
+#undef PL_strchop
+#define PL_strchop pPerl->PL_strchop
+#undef PL_strtab
+#define PL_strtab pPerl->PL_strtab
+#undef PL_strtab_mutex
+#define PL_strtab_mutex pPerl->PL_strtab_mutex
+#undef PL_sub_generation
+#define PL_sub_generation pPerl->PL_sub_generation
+#undef PL_sublex_info
+#define PL_sublex_info pPerl->PL_sublex_info
+#undef PL_sv_arenaroot
+#define PL_sv_arenaroot pPerl->PL_sv_arenaroot
+#undef PL_sv_count
+#define PL_sv_count pPerl->PL_sv_count
+#undef PL_sv_objcount
+#define PL_sv_objcount pPerl->PL_sv_objcount
+#undef PL_sv_root
+#define PL_sv_root pPerl->PL_sv_root
+#undef PL_sys_intern
+#define PL_sys_intern pPerl->PL_sys_intern
+#undef PL_tainting
+#define PL_tainting pPerl->PL_tainting
+#undef PL_threadnum
+#define PL_threadnum pPerl->PL_threadnum
+#undef PL_thrsv
+#define PL_thrsv pPerl->PL_thrsv
+#undef PL_unsafe
+#define PL_unsafe pPerl->PL_unsafe
+#undef PL_warnhook
+#define PL_warnhook pPerl->PL_warnhook
+#undef PL_No
+#define PL_No pPerl->PL_No
+#undef PL_Yes
+#define PL_Yes pPerl->PL_Yes
+#undef PL_amagic_generation
+#define PL_amagic_generation pPerl->PL_amagic_generation
+#undef PL_an
+#define PL_an pPerl->PL_an
+#undef PL_bufend
+#define PL_bufend pPerl->PL_bufend
+#undef PL_bufptr
+#define PL_bufptr pPerl->PL_bufptr
+#undef PL_collation_ix
+#define PL_collation_ix pPerl->PL_collation_ix
+#undef PL_collation_name
+#define PL_collation_name pPerl->PL_collation_name
+#undef PL_collation_standard
+#define PL_collation_standard pPerl->PL_collation_standard
+#undef PL_collxfrm_base
+#define PL_collxfrm_base pPerl->PL_collxfrm_base
+#undef PL_collxfrm_mult
+#define PL_collxfrm_mult pPerl->PL_collxfrm_mult
+#undef PL_cop_seqmax
+#define PL_cop_seqmax pPerl->PL_cop_seqmax
+#undef PL_cryptseen
+#define PL_cryptseen pPerl->PL_cryptseen
+#undef PL_cshlen
+#define PL_cshlen pPerl->PL_cshlen
+#undef PL_cshname
+#define PL_cshname pPerl->PL_cshname
+#undef PL_curinterp
+#define PL_curinterp pPerl->PL_curinterp
+#undef PL_curthr
+#define PL_curthr pPerl->PL_curthr
+#undef PL_debug
+#define PL_debug pPerl->PL_debug
+#undef PL_do_undump
+#define PL_do_undump pPerl->PL_do_undump
+#undef PL_egid
+#define PL_egid pPerl->PL_egid
+#undef PL_error_count
+#define PL_error_count pPerl->PL_error_count
+#undef PL_euid
+#define PL_euid pPerl->PL_euid
+#undef PL_eval_cond
+#define PL_eval_cond pPerl->PL_eval_cond
+#undef PL_eval_mutex
+#define PL_eval_mutex pPerl->PL_eval_mutex
+#undef PL_eval_owner
+#define PL_eval_owner pPerl->PL_eval_owner
+#undef PL_evalseq
+#define PL_evalseq pPerl->PL_evalseq
+#undef PL_expect
+#define PL_expect pPerl->PL_expect
+#undef PL_gid
+#define PL_gid pPerl->PL_gid
+#undef PL_he_root
+#define PL_he_root pPerl->PL_he_root
+#undef PL_hexdigit
+#define PL_hexdigit pPerl->PL_hexdigit
+#undef PL_hints
+#define PL_hints pPerl->PL_hints
+#undef PL_in_my
+#define PL_in_my pPerl->PL_in_my
+#undef PL_in_my_stash
+#define PL_in_my_stash pPerl->PL_in_my_stash
+#undef PL_last_lop
+#define PL_last_lop pPerl->PL_last_lop
+#undef PL_last_lop_op
+#define PL_last_lop_op pPerl->PL_last_lop_op
+#undef PL_last_uni
+#define PL_last_uni pPerl->PL_last_uni
+#undef PL_lex_brackets
+#define PL_lex_brackets pPerl->PL_lex_brackets
+#undef PL_lex_brackstack
+#define PL_lex_brackstack pPerl->PL_lex_brackstack
+#undef PL_lex_casemods
+#define PL_lex_casemods pPerl->PL_lex_casemods
+#undef PL_lex_casestack
+#define PL_lex_casestack pPerl->PL_lex_casestack
+#undef PL_lex_defer
+#define PL_lex_defer pPerl->PL_lex_defer
+#undef PL_lex_dojoin
+#define PL_lex_dojoin pPerl->PL_lex_dojoin
+#undef PL_lex_expect
+#define PL_lex_expect pPerl->PL_lex_expect
+#undef PL_lex_fakebrack
+#define PL_lex_fakebrack pPerl->PL_lex_fakebrack
+#undef PL_lex_formbrack
+#define PL_lex_formbrack pPerl->PL_lex_formbrack
+#undef PL_lex_inpat
+#define PL_lex_inpat pPerl->PL_lex_inpat
+#undef PL_lex_inwhat
+#define PL_lex_inwhat pPerl->PL_lex_inwhat
+#undef PL_lex_op
+#define PL_lex_op pPerl->PL_lex_op
+#undef PL_lex_repl
+#define PL_lex_repl pPerl->PL_lex_repl
+#undef PL_lex_starts
+#define PL_lex_starts pPerl->PL_lex_starts
+#undef PL_lex_state
+#define PL_lex_state pPerl->PL_lex_state
+#undef PL_lex_stuff
+#define PL_lex_stuff pPerl->PL_lex_stuff
+#undef PL_linestr
+#define PL_linestr pPerl->PL_linestr
+#undef PL_malloc_mutex
+#define PL_malloc_mutex pPerl->PL_malloc_mutex
+#undef PL_max_intro_pending
+#define PL_max_intro_pending pPerl->PL_max_intro_pending
+#undef PL_maxo
+#define PL_maxo pPerl->PL_maxo
+#undef PL_min_intro_pending
+#define PL_min_intro_pending pPerl->PL_min_intro_pending
+#undef PL_multi_close
+#define PL_multi_close pPerl->PL_multi_close
+#undef PL_multi_end
+#define PL_multi_end pPerl->PL_multi_end
+#undef PL_multi_open
+#define PL_multi_open pPerl->PL_multi_open
+#undef PL_multi_start
+#define PL_multi_start pPerl->PL_multi_start
+#undef PL_na
+#define PL_na pPerl->PL_na
+#undef PL_nexttoke
+#define PL_nexttoke pPerl->PL_nexttoke
+#undef PL_nexttype
+#define PL_nexttype pPerl->PL_nexttype
+#undef PL_nextval
+#define PL_nextval pPerl->PL_nextval
+#undef PL_nice_chunk
+#define PL_nice_chunk pPerl->PL_nice_chunk
+#undef PL_nice_chunk_size
+#define PL_nice_chunk_size pPerl->PL_nice_chunk_size
+#undef PL_ninterps
+#define PL_ninterps pPerl->PL_ninterps
+#undef PL_nomemok
+#define PL_nomemok pPerl->PL_nomemok
+#undef PL_nthreads
+#define PL_nthreads pPerl->PL_nthreads
+#undef PL_nthreads_cond
+#define PL_nthreads_cond pPerl->PL_nthreads_cond
+#undef PL_numeric_local
+#define PL_numeric_local pPerl->PL_numeric_local
+#undef PL_numeric_name
+#define PL_numeric_name pPerl->PL_numeric_name
+#undef PL_numeric_standard
+#define PL_numeric_standard pPerl->PL_numeric_standard
+#undef PL_oldbufptr
+#define PL_oldbufptr pPerl->PL_oldbufptr
+#undef PL_oldoldbufptr
+#define PL_oldoldbufptr pPerl->PL_oldoldbufptr
+#undef PL_op_seqmax
+#define PL_op_seqmax pPerl->PL_op_seqmax
+#undef PL_origalen
+#define PL_origalen pPerl->PL_origalen
+#undef PL_origenviron
+#define PL_origenviron pPerl->PL_origenviron
+#undef PL_osname
+#define PL_osname pPerl->PL_osname
+#undef PL_pad_reset_pending
+#define PL_pad_reset_pending pPerl->PL_pad_reset_pending
+#undef PL_padix
+#define PL_padix pPerl->PL_padix
+#undef PL_padix_floor
+#define PL_padix_floor pPerl->PL_padix_floor
+#undef PL_patleave
+#define PL_patleave pPerl->PL_patleave
+#undef PL_pidstatus
+#define PL_pidstatus pPerl->PL_pidstatus
+#undef PL_runops
+#define PL_runops pPerl->PL_runops
+#undef PL_sh_path
+#define PL_sh_path pPerl->PL_sh_path
+#undef PL_sighandlerp
+#define PL_sighandlerp pPerl->PL_sighandlerp
+#undef PL_specialsv_list
+#define PL_specialsv_list pPerl->PL_specialsv_list
+#undef PL_subline
+#define PL_subline pPerl->PL_subline
+#undef PL_subname
+#define PL_subname pPerl->PL_subname
+#undef PL_sv_mutex
+#define PL_sv_mutex pPerl->PL_sv_mutex
+#undef PL_sv_no
+#define PL_sv_no pPerl->PL_sv_no
+#undef PL_sv_undef
+#define PL_sv_undef pPerl->PL_sv_undef
+#undef PL_sv_yes
+#define PL_sv_yes pPerl->PL_sv_yes
+#undef PL_svref_mutex
+#define PL_svref_mutex pPerl->PL_svref_mutex
+#undef PL_thisexpr
+#define PL_thisexpr pPerl->PL_thisexpr
+#undef PL_thr_key
+#define PL_thr_key pPerl->PL_thr_key
+#undef PL_threads_mutex
+#define PL_threads_mutex pPerl->PL_threads_mutex
+#undef PL_threadsv_names
+#define PL_threadsv_names pPerl->PL_threadsv_names
+#undef PL_tokenbuf
+#define PL_tokenbuf pPerl->PL_tokenbuf
+#undef PL_uid
+#define PL_uid pPerl->PL_uid
+#undef PL_xiv_arenaroot
+#define PL_xiv_arenaroot pPerl->PL_xiv_arenaroot
+#undef PL_xiv_root
+#define PL_xiv_root pPerl->PL_xiv_root
+#undef PL_xnv_root
+#define PL_xnv_root pPerl->PL_xnv_root
+#undef PL_xpv_root
+#define PL_xpv_root pPerl->PL_xpv_root
+#undef PL_xrv_root
+#define PL_xrv_root pPerl->PL_xrv_root
+
+/* Functions */
+
+#undef amagic_call
+#define amagic_call pPerl->Perl_amagic_call
+#undef Perl_GetVars
+#define Perl_GetVars pPerl->Perl_GetVars
+#undef Gv_AMupdate
+#define Gv_AMupdate pPerl->Perl_Gv_AMupdate
+#undef append_elem
+#define append_elem pPerl->Perl_append_elem
+#undef append_list
+#define append_list pPerl->Perl_append_list
+#undef apply
+#define apply pPerl->Perl_apply
+#undef assertref
+#define assertref pPerl->Perl_assertref
+#undef av_clear
+#define av_clear pPerl->Perl_av_clear
+#undef av_extend
+#define av_extend pPerl->Perl_av_extend
+#undef av_fake
+#define av_fake pPerl->Perl_av_fake
+#undef av_fetch
+#define av_fetch pPerl->Perl_av_fetch
+#undef av_fill
+#define av_fill pPerl->Perl_av_fill
+#undef av_len
+#define av_len pPerl->Perl_av_len
+#undef av_make
+#define av_make pPerl->Perl_av_make
+#undef av_pop
+#define av_pop pPerl->Perl_av_pop
+#undef av_push
+#define av_push pPerl->Perl_av_push
+#undef av_reify
+#define av_reify pPerl->Perl_av_reify
+#undef av_shift
+#define av_shift pPerl->Perl_av_shift
+#undef av_store
+#define av_store pPerl->Perl_av_store
+#undef av_undef
+#define av_undef pPerl->Perl_av_undef
+#undef av_unshift
+#define av_unshift pPerl->Perl_av_unshift
+#undef avhv_exists_ent
+#define avhv_exists_ent pPerl->Perl_avhv_exists_ent
+#undef avhv_fetch_ent
+#define avhv_fetch_ent pPerl->Perl_avhv_fetch_ent
+#undef avhv_iternext
+#define avhv_iternext pPerl->Perl_avhv_iternext
+#undef avhv_iterval
+#define avhv_iterval pPerl->Perl_avhv_iterval
+#undef avhv_keys
+#define avhv_keys pPerl->Perl_avhv_keys
+#undef bind_match
+#define bind_match pPerl->Perl_bind_match
+#undef block_end
+#define block_end pPerl->Perl_block_end
+#undef block_gimme
+#define block_gimme pPerl->Perl_block_gimme
+#undef block_start
+#define block_start pPerl->Perl_block_start
+#undef byterun
+#define byterun pPerl->Perl_byterun
+#undef call_list
+#define call_list pPerl->Perl_call_list
+#undef cando
+#define cando pPerl->Perl_cando
+#undef cast_ulong
+#define cast_ulong pPerl->Perl_cast_ulong
+#undef checkcomma
+#define checkcomma pPerl->Perl_checkcomma
+#undef check_uni
+#define check_uni pPerl->Perl_check_uni
+#undef ck_concat
+#define ck_concat pPerl->Perl_ck_concat
+#undef ck_delete
+#define ck_delete pPerl->Perl_ck_delete
+#undef ck_eof
+#define ck_eof pPerl->Perl_ck_eof
+#undef ck_eval
+#define ck_eval pPerl->Perl_ck_eval
+#undef ck_exec
+#define ck_exec pPerl->Perl_ck_exec
+#undef ck_formline
+#define ck_formline pPerl->Perl_ck_formline
+#undef ck_ftst
+#define ck_ftst pPerl->Perl_ck_ftst
+#undef ck_fun
+#define ck_fun pPerl->Perl_ck_fun
+#undef ck_glob
+#define ck_glob pPerl->Perl_ck_glob
+#undef ck_grep
+#define ck_grep pPerl->Perl_ck_grep
+#undef ck_gvconst
+#define ck_gvconst pPerl->Perl_ck_gvconst
+#undef ck_index
+#define ck_index pPerl->Perl_ck_index
+#undef ck_lengthconst
+#define ck_lengthconst pPerl->Perl_ck_lengthconst
+#undef ck_lfun
+#define ck_lfun pPerl->Perl_ck_lfun
+#undef ck_listiob
+#define ck_listiob pPerl->Perl_ck_listiob
+#undef ck_match
+#define ck_match pPerl->Perl_ck_match
+#undef ck_null
+#define ck_null pPerl->Perl_ck_null
+#undef ck_repeat
+#define ck_repeat pPerl->Perl_ck_repeat
+#undef ck_require
+#define ck_require pPerl->Perl_ck_require
+#undef ck_retarget
+#define ck_retarget pPerl->Perl_ck_retarget
+#undef ck_rfun
+#define ck_rfun pPerl->Perl_ck_rfun
+#undef ck_rvconst
+#define ck_rvconst pPerl->Perl_ck_rvconst
+#undef ck_select
+#define ck_select pPerl->Perl_ck_select
+#undef ck_shift
+#define ck_shift pPerl->Perl_ck_shift
+#undef ck_sort
+#define ck_sort pPerl->Perl_ck_sort
+#undef ck_spair
+#define ck_spair pPerl->Perl_ck_spair
+#undef ck_split
+#define ck_split pPerl->Perl_ck_split
+#undef ck_subr
+#define ck_subr pPerl->Perl_ck_subr
+#undef ck_svconst
+#define ck_svconst pPerl->Perl_ck_svconst
+#undef ck_trunc
+#define ck_trunc pPerl->Perl_ck_trunc
+#undef condpair_magic
+#define condpair_magic pPerl->Perl_condpair_magic
+#undef convert
+#define convert pPerl->Perl_convert
+#undef cpytill
+#define cpytill pPerl->Perl_cpytill
+#undef croak
+#define croak pPerl->Perl_croak
+#undef cv_ckproto
+#define cv_ckproto pPerl->Perl_cv_ckproto
+#undef cv_clone
+#define cv_clone pPerl->Perl_cv_clone
+#undef cv_const_sv
+#define cv_const_sv pPerl->Perl_cv_const_sv
+#undef cv_undef
+#define cv_undef pPerl->Perl_cv_undef
+#undef cx_dump
+#define cx_dump pPerl->Perl_cx_dump
+#undef cxinc
+#define cxinc pPerl->Perl_cxinc
+#undef deb
+#define deb pPerl->Perl_deb
+#undef deb_growlevel
+#define deb_growlevel pPerl->Perl_deb_growlevel
+#undef debprofdump
+#define debprofdump pPerl->Perl_debprofdump
+#undef debop
+#define debop pPerl->Perl_debop
+#undef debstack
+#define debstack pPerl->Perl_debstack
+#undef debstackptrs
+#define debstackptrs pPerl->Perl_debstackptrs
+#undef delimcpy
+#define delimcpy pPerl->Perl_delimcpy
+#undef deprecate
+#define deprecate pPerl->Perl_deprecate
+#undef die
+#define die pPerl->Perl_die
+#undef die_where
+#define die_where pPerl->Perl_die_where
+#undef dopoptoeval
+#define dopoptoeval pPerl->Perl_dopoptoeval
+#undef dounwind
+#define dounwind pPerl->Perl_dounwind
+#undef do_aexec
+#define do_aexec pPerl->Perl_do_aexec
+#undef do_binmode
+#define do_binmode pPerl->Perl_do_binmode
+#undef do_chomp
+#define do_chomp pPerl->Perl_do_chomp
+#undef do_chop
+#define do_chop pPerl->Perl_do_chop
+#undef do_close
+#define do_close pPerl->Perl_do_close
+#undef do_eof
+#define do_eof pPerl->Perl_do_eof
+#undef do_exec
+#define do_exec pPerl->Perl_do_exec
+#undef do_execfree
+#define do_execfree pPerl->Perl_do_execfree
+#undef do_join
+#define do_join pPerl->Perl_do_join
+#undef do_kv
+#define do_kv pPerl->Perl_do_kv
+#undef do_open
+#define do_open pPerl->Perl_do_open
+#undef do_pipe
+#define do_pipe pPerl->Perl_do_pipe
+#undef do_print
+#define do_print pPerl->Perl_do_print
+#undef do_readline
+#define do_readline pPerl->Perl_do_readline
+#undef do_seek
+#define do_seek pPerl->Perl_do_seek
+#undef do_sprintf
+#define do_sprintf pPerl->Perl_do_sprintf
+#undef do_sysseek
+#define do_sysseek pPerl->Perl_do_sysseek
+#undef do_tell
+#define do_tell pPerl->Perl_do_tell
+#undef do_trans
+#define do_trans pPerl->Perl_do_trans
+#undef do_vecset
+#define do_vecset pPerl->Perl_do_vecset
+#undef do_vop
+#define do_vop pPerl->Perl_do_vop
+#undef dofile
+#define dofile pPerl->Perl_dofile
+#undef dowantarray
+#define dowantarray pPerl->Perl_dowantarray
+#undef dump_all
+#define dump_all pPerl->Perl_dump_all
+#undef dump_eval
+#define dump_eval pPerl->Perl_dump_eval
+#undef dump_fds
+#define dump_fds pPerl->Perl_dump_fds
+#undef dump_form
+#define dump_form pPerl->Perl_dump_form
+#undef dump_gv
+#define dump_gv pPerl->Perl_dump_gv
+#undef dump_mstats
+#define dump_mstats pPerl->Perl_dump_mstats
+#undef dump_op
+#define dump_op pPerl->Perl_dump_op
+#undef dump_pm
+#define dump_pm pPerl->Perl_dump_pm
+#undef dump_packsubs
+#define dump_packsubs pPerl->Perl_dump_packsubs
+#undef dump_sub
+#define dump_sub pPerl->Perl_dump_sub
+#undef fbm_compile
+#define fbm_compile pPerl->Perl_fbm_compile
+#undef fbm_instr
+#define fbm_instr pPerl->Perl_fbm_instr
+#undef filter_add
+#define filter_add pPerl->Perl_filter_add
+#undef filter_del
+#define filter_del pPerl->Perl_filter_del
+#undef filter_read
+#define filter_read pPerl->Perl_filter_read
+#undef find_threadsv
+#define find_threadsv pPerl->Perl_find_threadsv
+#undef find_script
+#define find_script pPerl->Perl_find_script
+#undef force_ident
+#define force_ident pPerl->Perl_force_ident
+#undef force_list
+#define force_list pPerl->Perl_force_list
+#undef force_next
+#define force_next pPerl->Perl_force_next
+#undef force_word
+#define force_word pPerl->Perl_force_word
+#undef form
+#define form pPerl->Perl_form
+#undef fold_constants
+#define fold_constants pPerl->Perl_fold_constants
+#undef fprintf
+#define fprintf pPerl->fprintf
+#undef free_tmps
+#define free_tmps pPerl->Perl_free_tmps
+#undef gen_constant_list
+#define gen_constant_list pPerl->Perl_gen_constant_list
+#undef get_op_descs
+#define get_op_descs pPerl->Perl_get_op_descs
+#undef get_op_names
+#define get_op_names pPerl->Perl_get_op_names
+#undef get_no_modify
+#define get_no_modify pPerl->Perl_get_no_modify
+#undef get_opargs
+#define get_opargs pPerl->Perl_get_opargs
+#undef get_specialsv_list
+#define get_specialsv_list pPerl->Perl_get_specialsv_list
+#undef get_vtbl
+#define get_vtbl pPerl->Perl_get_vtbl
+#undef gp_free
+#define gp_free pPerl->Perl_gp_free
+#undef gp_ref
+#define gp_ref pPerl->Perl_gp_ref
+#undef gv_AVadd
+#define gv_AVadd pPerl->Perl_gv_AVadd
+#undef gv_HVadd
+#define gv_HVadd pPerl->Perl_gv_HVadd
+#undef gv_IOadd
+#define gv_IOadd pPerl->Perl_gv_IOadd
+#undef gv_autoload4
+#define gv_autoload4 pPerl->Perl_gv_autoload4
+#undef gv_check
+#define gv_check pPerl->Perl_gv_check
+#undef gv_efullname
+#define gv_efullname pPerl->Perl_gv_efullname
+#undef gv_efullname3
+#define gv_efullname3 pPerl->Perl_gv_efullname3
+#undef gv_fetchfile
+#define gv_fetchfile pPerl->Perl_gv_fetchfile
+#undef gv_fetchmeth
+#define gv_fetchmeth pPerl->Perl_gv_fetchmeth
+#undef gv_fetchmethod
+#define gv_fetchmethod pPerl->Perl_gv_fetchmethod
+#undef gv_fetchmethod_autoload
+#define gv_fetchmethod_autoload pPerl->Perl_gv_fetchmethod_autoload
+#undef gv_fetchpv
+#define gv_fetchpv pPerl->Perl_gv_fetchpv
+#undef gv_fullname
+#define gv_fullname pPerl->Perl_gv_fullname
+#undef gv_fullname3
+#define gv_fullname3 pPerl->Perl_gv_fullname3
+#undef gv_init
+#define gv_init pPerl->Perl_gv_init
+#undef gv_stashpv
+#define gv_stashpv pPerl->Perl_gv_stashpv
+#undef gv_stashpvn
+#define gv_stashpvn pPerl->Perl_gv_stashpvn
+#undef gv_stashsv
+#define gv_stashsv pPerl->Perl_gv_stashsv
+#undef he_delayfree
+#define he_delayfree pPerl->Perl_he_delayfree
+#undef he_free
+#define he_free pPerl->Perl_he_free
+#undef hoistmust
+#define hoistmust pPerl->Perl_hoistmust
+#undef hv_clear
+#define hv_clear pPerl->Perl_hv_clear
+#undef hv_delayfree_ent
+#define hv_delayfree_ent pPerl->Perl_hv_delayfree_ent
+#undef hv_delete
+#define hv_delete pPerl->Perl_hv_delete
+#undef hv_delete_ent
+#define hv_delete_ent pPerl->Perl_hv_delete_ent
+#undef hv_exists
+#define hv_exists pPerl->Perl_hv_exists
+#undef hv_exists_ent
+#define hv_exists_ent pPerl->Perl_hv_exists_ent
+#undef hv_fetch
+#define hv_fetch pPerl->Perl_hv_fetch
+#undef hv_fetch_ent
+#define hv_fetch_ent pPerl->Perl_hv_fetch_ent
+#undef hv_free_ent
+#define hv_free_ent pPerl->Perl_hv_free_ent
+#undef hv_iterinit
+#define hv_iterinit pPerl->Perl_hv_iterinit
+#undef hv_iterkey
+#define hv_iterkey pPerl->Perl_hv_iterkey
+#undef hv_iterkeysv
+#define hv_iterkeysv pPerl->Perl_hv_iterkeysv
+#undef hv_iternext
+#define hv_iternext pPerl->Perl_hv_iternext
+#undef hv_iternextsv
+#define hv_iternextsv pPerl->Perl_hv_iternextsv
+#undef hv_iterval
+#define hv_iterval pPerl->Perl_hv_iterval
+#undef hv_ksplit
+#define hv_ksplit pPerl->Perl_hv_ksplit
+#undef hv_magic
+#define hv_magic pPerl->Perl_hv_magic
+#undef hv_store
+#define hv_store pPerl->Perl_hv_store
+#undef hv_store_ent
+#define hv_store_ent pPerl->Perl_hv_store_ent
+#undef hv_undef
+#define hv_undef pPerl->Perl_hv_undef
+#undef ibcmp
+#define ibcmp pPerl->Perl_ibcmp
+#undef ibcmp_locale
+#define ibcmp_locale pPerl->Perl_ibcmp_locale
+#undef incpush
+#define incpush pPerl->incpush
+#undef incline
+#define incline pPerl->incline
+#undef incl_perldb
+#define incl_perldb pPerl->incl_perldb
+#undef ingroup
+#define ingroup pPerl->Perl_ingroup
+#undef init_stacks
+#define init_stacks pPerl->Perl_init_stacks
+#undef instr
+#define instr pPerl->Perl_instr
+#undef intro_my
+#define intro_my pPerl->Perl_intro_my
+#undef intuit_method
+#define intuit_method pPerl->intuit_method
+#undef intuit_more
+#define intuit_more pPerl->Perl_intuit_more
+#undef invert
+#define invert pPerl->Perl_invert
+#undef io_close
+#define io_close pPerl->Perl_io_close
+#undef ioctl
+#define ioctl pPerl->ioctl
+#undef jmaybe
+#define jmaybe pPerl->Perl_jmaybe
+#undef keyword
+#define keyword pPerl->Perl_keyword
+#undef leave_scope
+#define leave_scope pPerl->Perl_leave_scope
+#undef lex_end
+#define lex_end pPerl->Perl_lex_end
+#undef lex_start
+#define lex_start pPerl->Perl_lex_start
+#undef linklist
+#define linklist pPerl->Perl_linklist
+#undef list
+#define list pPerl->Perl_list
+#undef listkids
+#define listkids pPerl->Perl_listkids
+#undef lop
+#define lop pPerl->lop
+#undef localize
+#define localize pPerl->Perl_localize
+#undef looks_like_number
+#define looks_like_number pPerl->Perl_looks_like_number
+#undef magic_clear_all_env
+#define magic_clear_all_env pPerl->Perl_magic_clear_all_env
+#undef magic_clearenv
+#define magic_clearenv pPerl->Perl_magic_clearenv
+#undef magic_clearpack
+#define magic_clearpack pPerl->Perl_magic_clearpack
+#undef magic_clearsig
+#define magic_clearsig pPerl->Perl_magic_clearsig
+#undef magic_existspack
+#define magic_existspack pPerl->Perl_magic_existspack
+#undef magic_freeregexp
+#define magic_freeregexp pPerl->Perl_magic_freeregexp
+#undef magic_get
+#define magic_get pPerl->Perl_magic_get
+#undef magic_getarylen
+#define magic_getarylen pPerl->Perl_magic_getarylen
+#undef magic_getdefelem
+#define magic_getdefelem pPerl->Perl_magic_getdefelem
+#undef magic_getpack
+#define magic_getpack pPerl->Perl_magic_getpack
+#undef magic_getglob
+#define magic_getglob pPerl->Perl_magic_getglob
+#undef magic_getnkeys
+#define magic_getnkeys pPerl->Perl_magic_getnkeys
+#undef magic_getpos
+#define magic_getpos pPerl->Perl_magic_getpos
+#undef magic_getsig
+#define magic_getsig pPerl->Perl_magic_getsig
+#undef magic_getsubstr
+#define magic_getsubstr pPerl->Perl_magic_getsubstr
+#undef magic_gettaint
+#define magic_gettaint pPerl->Perl_magic_gettaint
+#undef magic_getuvar
+#define magic_getuvar pPerl->Perl_magic_getuvar
+#undef magic_getvec
+#define magic_getvec pPerl->Perl_magic_getvec
+#undef magic_len
+#define magic_len pPerl->Perl_magic_len
+#undef magic_methpack
+#define magic_methpack pPerl->magic_methpack
+#undef magic_mutexfree
+#define magic_mutexfree pPerl->Perl_magic_mutexfree
+#undef magic_nextpack
+#define magic_nextpack pPerl->Perl_magic_nextpack
+#undef magic_set
+#define magic_set pPerl->Perl_magic_set
+#undef magic_set_all_env
+#define magic_set_all_env pPerl->Perl_magic_set_all_env
+#undef magic_setamagic
+#define magic_setamagic pPerl->Perl_magic_setamagic
+#undef magic_setarylen
+#define magic_setarylen pPerl->Perl_magic_setarylen
+#undef magic_setbm
+#define magic_setbm pPerl->Perl_magic_setbm
+#undef magic_setcollxfrm
+#define magic_setcollxfrm pPerl->Perl_magic_setcollxfrm
+#undef magic_setdbline
+#define magic_setdbline pPerl->Perl_magic_setdbline
+#undef magic_setdefelem
+#define magic_setdefelem pPerl->Perl_magic_setdefelem
+#undef magic_setenv
+#define magic_setenv pPerl->Perl_magic_setenv
+#undef magic_setfm
+#define magic_setfm pPerl->Perl_magic_setfm
+#undef magic_setisa
+#define magic_setisa pPerl->Perl_magic_setisa
+#undef magic_setglob
+#define magic_setglob pPerl->Perl_magic_setglob
+#undef magic_setmglob
+#define magic_setmglob pPerl->Perl_magic_setmglob
+#undef magic_setnkeys
+#define magic_setnkeys pPerl->Perl_magic_setnkeys
+#undef magic_setpack
+#define magic_setpack pPerl->Perl_magic_setpack
+#undef magic_setpos
+#define magic_setpos pPerl->Perl_magic_setpos
+#undef magic_setsig
+#define magic_setsig pPerl->Perl_magic_setsig
+#undef magic_setsubstr
+#define magic_setsubstr pPerl->Perl_magic_setsubstr
+#undef magic_settaint
+#define magic_settaint pPerl->Perl_magic_settaint
+#undef magic_setuvar
+#define magic_setuvar pPerl->Perl_magic_setuvar
+#undef magic_setvec
+#define magic_setvec pPerl->Perl_magic_setvec
+#undef magic_sizepack
+#define magic_sizepack pPerl->Perl_magic_sizepack
+#undef magic_unchain
+#define magic_unchain pPerl->Perl_magic_unchain
+#undef magic_wipepack
+#define magic_wipepack pPerl->Perl_magic_wipepack
+#undef magicname
+#define magicname pPerl->Perl_magicname
+#undef malloced_size
+#define malloced_size pPerl->Perl_malloced_size
+#undef markstack_grow
+#define markstack_grow pPerl->Perl_markstack_grow
+#undef mem_collxfrm
+#define mem_collxfrm pPerl->Perl_mem_collxfrm
+#undef mess
+#define mess pPerl->Perl_mess
+#undef mg_clear
+#define mg_clear pPerl->Perl_mg_clear
+#undef mg_copy
+#define mg_copy pPerl->Perl_mg_copy
+#undef mg_find
+#define mg_find pPerl->Perl_mg_find
+#undef mg_free
+#define mg_free pPerl->Perl_mg_free
+#undef mg_get
+#define mg_get pPerl->Perl_mg_get
+#undef mg_magical
+#define mg_magical pPerl->Perl_mg_magical
+#undef mg_length
+#define mg_length pPerl->Perl_mg_length
+#undef mg_set
+#define mg_set pPerl->Perl_mg_set
+#undef mg_size
+#define mg_size pPerl->Perl_mg_size
+#undef missingterm
+#define missingterm pPerl->missingterm
+#undef mod
+#define mod pPerl->Perl_mod
+#undef modkids
+#define modkids pPerl->Perl_modkids
+#undef moreswitches
+#define moreswitches pPerl->Perl_moreswitches
+#undef more_sv
+#define more_sv pPerl->more_sv
+#undef more_xiv
+#define more_xiv pPerl->more_xiv
+#undef more_xnv
+#define more_xnv pPerl->more_xnv
+#undef more_xpv
+#define more_xpv pPerl->more_xpv
+#undef more_xrv
+#define more_xrv pPerl->more_xrv
+#undef my
+#define my pPerl->Perl_my
+#undef my_bcopy
+#define my_bcopy pPerl->Perl_my_bcopy
+#undef my_bzero
+#define my_bzero pPerl->Perl_my_bzero
+#undef my_chsize
+#define my_chsize pPerl->Perl_my_chsize
+#undef my_exit
+#define my_exit pPerl->Perl_my_exit
+#undef my_failure_exit
+#define my_failure_exit pPerl->Perl_my_failure_exit
+#undef my_htonl
+#define my_htonl pPerl->Perl_my_htonl
+#undef my_lstat
+#define my_lstat pPerl->Perl_my_lstat
+#undef my_memcmp
+#define my_memcmp pPerl->my_memcmp
+#undef my_ntohl
+#define my_ntohl pPerl->Perl_my_ntohl
+#undef my_pclose
+#define my_pclose pPerl->Perl_my_pclose
+#undef my_popen
+#define my_popen pPerl->Perl_my_popen
+#undef my_setenv
+#define my_setenv pPerl->Perl_my_setenv
+#undef my_stat
+#define my_stat pPerl->Perl_my_stat
+#undef my_swap
+#define my_swap pPerl->Perl_my_swap
+#undef my_unexec
+#define my_unexec pPerl->Perl_my_unexec
+#undef newANONLIST
+#define newANONLIST pPerl->Perl_newANONLIST
+#undef newANONHASH
+#define newANONHASH pPerl->Perl_newANONHASH
+#undef newANONSUB
+#define newANONSUB pPerl->Perl_newANONSUB
+#undef newASSIGNOP
+#define newASSIGNOP pPerl->Perl_newASSIGNOP
+#undef newCONDOP
+#define newCONDOP pPerl->Perl_newCONDOP
+#undef newCONSTSUB
+#define newCONSTSUB pPerl->Perl_newCONSTSUB
+#undef newFORM
+#define newFORM pPerl->Perl_newFORM
+#undef newFOROP
+#define newFOROP pPerl->Perl_newFOROP
+#undef newLOGOP
+#define newLOGOP pPerl->Perl_newLOGOP
+#undef newLOOPEX
+#define newLOOPEX pPerl->Perl_newLOOPEX
+#undef newLOOPOP
+#define newLOOPOP pPerl->Perl_newLOOPOP
+#undef newMETHOD
+#define newMETHOD pPerl->Perl_newMETHOD
+#undef newNULLLIST
+#define newNULLLIST pPerl->Perl_newNULLLIST
+#undef newOP
+#define newOP pPerl->Perl_newOP
+#undef newPROG
+#define newPROG pPerl->Perl_newPROG
+#undef newRANGE
+#define newRANGE pPerl->Perl_newRANGE
+#undef newSLICEOP
+#define newSLICEOP pPerl->Perl_newSLICEOP
+#undef newSTATEOP
+#define newSTATEOP pPerl->Perl_newSTATEOP
+#undef newSUB
+#define newSUB pPerl->Perl_newSUB
+#undef newXS
+#define newXS pPerl->Perl_newXS
+#undef newAV
+#define newAV pPerl->Perl_newAV
+#undef newAVREF
+#define newAVREF pPerl->Perl_newAVREF
+#undef newBINOP
+#define newBINOP pPerl->Perl_newBINOP
+#undef newCVREF
+#define newCVREF pPerl->Perl_newCVREF
+#undef newCVOP
+#define newCVOP pPerl->Perl_newCVOP
+#undef newGVOP
+#define newGVOP pPerl->Perl_newGVOP
+#undef newGVgen
+#define newGVgen pPerl->Perl_newGVgen
+#undef newGVREF
+#define newGVREF pPerl->Perl_newGVREF
+#undef newHVREF
+#define newHVREF pPerl->Perl_newHVREF
+#undef newHV
+#define newHV pPerl->Perl_newHV
+#undef newHVhv
+#define newHVhv pPerl->Perl_newHVhv
+#undef newIO
+#define newIO pPerl->Perl_newIO
+#undef newLISTOP
+#define newLISTOP pPerl->Perl_newLISTOP
+#undef newPMOP
+#define newPMOP pPerl->Perl_newPMOP
+#undef newPVOP
+#define newPVOP pPerl->Perl_newPVOP
+#undef newRV
+#define newRV pPerl->Perl_newRV
+#undef newRV_noinc
+#undef Perl_newRV_noinc
+#define newRV_noinc pPerl->Perl_newRV_noinc
+#undef newSV
+#define newSV pPerl->Perl_newSV
+#undef newSVREF
+#define newSVREF pPerl->Perl_newSVREF
+#undef newSVOP
+#define newSVOP pPerl->Perl_newSVOP
+#undef newSViv
+#define newSViv pPerl->Perl_newSViv
+#undef newSVnv
+#define newSVnv pPerl->Perl_newSVnv
+#undef newSVpv
+#define newSVpv pPerl->Perl_newSVpv
+#undef newSVpvf
+#define newSVpvf pPerl->Perl_newSVpvf
+#undef newSVpvn
+#define newSVpvn pPerl->Perl_newSVpvn
+#undef newSVrv
+#define newSVrv pPerl->Perl_newSVrv
+#undef newSVsv
+#define newSVsv pPerl->Perl_newSVsv
+#undef newUNOP
+#define newUNOP pPerl->Perl_newUNOP
+#undef newWHILEOP
+#define newWHILEOP pPerl->Perl_newWHILEOP
+#undef new_struct_thread
+#define new_struct_thread pPerl->Perl_new_struct_thread
+#undef new_stackinfo
+#define new_stackinfo pPerl->Perl_new_stackinfo
+#undef new_sv
+#define new_sv pPerl->new_sv
+#undef new_xnv
+#define new_xnv pPerl->new_xnv
+#undef new_xpv
+#define new_xpv pPerl->new_xpv
+#undef nextargv
+#define nextargv pPerl->Perl_nextargv
+#undef nextchar
+#define nextchar pPerl->nextchar
+#undef ninstr
+#define ninstr pPerl->Perl_ninstr
+#undef no_fh_allowed
+#define no_fh_allowed pPerl->Perl_no_fh_allowed
+#undef no_op
+#define no_op pPerl->Perl_no_op
+#undef package
+#define package pPerl->Perl_package
+#undef pad_alloc
+#define pad_alloc pPerl->Perl_pad_alloc
+#undef pad_allocmy
+#define pad_allocmy pPerl->Perl_pad_allocmy
+#undef pad_findmy
+#define pad_findmy pPerl->Perl_pad_findmy
+#undef op_const_sv
+#define op_const_sv pPerl->Perl_op_const_sv
+#undef op_free
+#define op_free pPerl->Perl_op_free
+#undef oopsCV
+#define oopsCV pPerl->Perl_oopsCV
+#undef oopsAV
+#define oopsAV pPerl->Perl_oopsAV
+#undef oopsHV
+#define oopsHV pPerl->Perl_oopsHV
+#undef opendir
+#define opendir pPerl->opendir
+#undef pad_leavemy
+#define pad_leavemy pPerl->Perl_pad_leavemy
+#undef pad_sv
+#define pad_sv pPerl->Perl_pad_sv
+#undef pad_findlex
+#define pad_findlex pPerl->pad_findlex
+#undef pad_free
+#define pad_free pPerl->Perl_pad_free
+#undef pad_reset
+#define pad_reset pPerl->Perl_pad_reset
+#undef pad_swipe
+#define pad_swipe pPerl->Perl_pad_swipe
+#undef peep
+#define peep pPerl->Perl_peep
+#undef perl_atexit
+#define perl_atexit pPerl->perl_atexit
+#undef perl_call_argv
+#define perl_call_argv pPerl->perl_call_argv
+#undef perl_call_method
+#define perl_call_method pPerl->perl_call_method
+#undef perl_call_pv
+#define perl_call_pv pPerl->perl_call_pv
+#undef perl_call_sv
+#define perl_call_sv pPerl->perl_call_sv
+#undef perl_callargv
+#define perl_callargv pPerl->perl_callargv
+#undef perl_callpv
+#define perl_callpv pPerl->perl_callpv
+#undef perl_callsv
+#define perl_callsv pPerl->perl_callsv
+#undef perl_eval_pv
+#define perl_eval_pv pPerl->perl_eval_pv
+#undef perl_eval_sv
+#define perl_eval_sv pPerl->perl_eval_sv
+#undef perl_get_sv
+#define perl_get_sv pPerl->perl_get_sv
+#undef perl_get_av
+#define perl_get_av pPerl->perl_get_av
+#undef perl_get_hv
+#define perl_get_hv pPerl->perl_get_hv
+#undef perl_get_cv
+#define perl_get_cv pPerl->perl_get_cv
+#undef perl_init_i18nl10n
+#define perl_init_i18nl10n pPerl->perl_init_i18nl10n
+#undef perl_init_i18nl14n
+#define perl_init_i18nl14n pPerl->perl_init_i18nl14n
+#undef perl_new_collate
+#define perl_new_collate pPerl->perl_new_collate
+#undef perl_new_ctype
+#define perl_new_ctype pPerl->perl_new_ctype
+#undef perl_new_numeric
+#define perl_new_numeric pPerl->perl_new_numeric
+#undef perl_set_numeric_local
+#define perl_set_numeric_local pPerl->perl_set_numeric_local
+#undef perl_set_numeric_standard
+#define perl_set_numeric_standard pPerl->perl_set_numeric_standard
+#undef perl_require_pv
+#define perl_require_pv pPerl->perl_require_pv
+#undef pidgone
+#define pidgone pPerl->Perl_pidgone
+#undef pmflag
+#define pmflag pPerl->Perl_pmflag
+#undef pmruntime
+#define pmruntime pPerl->Perl_pmruntime
+#undef pmtrans
+#define pmtrans pPerl->Perl_pmtrans
+#undef pop_return
+#define pop_return pPerl->Perl_pop_return
+#undef pop_scope
+#define pop_scope pPerl->Perl_pop_scope
+#undef prepend_elem
+#define prepend_elem pPerl->Perl_prepend_elem
+#undef push_return
+#define push_return pPerl->Perl_push_return
+#undef push_scope
+#define push_scope pPerl->Perl_push_scope
+#undef pregcomp
+#define pregcomp pPerl->Perl_pregcomp
+#undef ref
+#define ref pPerl->Perl_ref
+#undef refkids
+#define refkids pPerl->Perl_refkids
+#undef regexec_flags
+#define regexec_flags pPerl->Perl_regexec_flags
+#undef pregexec
+#define pregexec pPerl->Perl_pregexec
+#undef pregfree
+#define pregfree pPerl->Perl_pregfree
+#undef regdump
+#define regdump pPerl->Perl_regdump
+#undef regnext
+#define regnext pPerl->Perl_regnext
+#undef regnoderegnext
+#define regnoderegnext pPerl->regnoderegnext
+#undef regprop
+#define regprop pPerl->Perl_regprop
+#undef repeatcpy
+#define repeatcpy pPerl->Perl_repeatcpy
+#undef rninstr
+#define rninstr pPerl->Perl_rninstr
+#undef rsignal
+#define rsignal pPerl->Perl_rsignal
+#undef rsignal_restore
+#define rsignal_restore pPerl->Perl_rsignal_restore
+#undef rsignal_save
+#define rsignal_save pPerl->Perl_rsignal_save
+#undef rsignal_state
+#define rsignal_state pPerl->Perl_rsignal_state
+#undef run
+#define run pPerl->Perl_run
+#undef rxres_free
+#define rxres_free pPerl->Perl_rxres_free
+#undef rxres_restore
+#define rxres_restore pPerl->Perl_rxres_restore
+#undef rxres_save
+#define rxres_save pPerl->Perl_rxres_save
+#undef safefree
+#define safefree pPerl->Perl_safefree
+#undef safecalloc
+#define safecalloc pPerl->Perl_safecalloc
+#undef safemalloc
+#define safemalloc pPerl->Perl_safemalloc
+#undef saferealloc
+#define saferealloc pPerl->Perl_saferealloc
+#undef safexcalloc
+#define safexcalloc pPerl->Perl_safexcalloc
+#undef safexfree
+#define safexfree pPerl->Perl_safexfree
+#undef safexmalloc
+#define safexmalloc pPerl->Perl_safexmalloc
+#undef safexrealloc
+#define safexrealloc pPerl->Perl_safexrealloc
+#undef same_dirent
+#define same_dirent pPerl->Perl_same_dirent
+#undef savepv
+#define savepv pPerl->Perl_savepv
+#undef savepvn
+#define savepvn pPerl->Perl_savepvn
+#undef savestack_grow
+#define savestack_grow pPerl->Perl_savestack_grow
+#undef save_aelem
+#define save_aelem pPerl->Perl_save_aelem
+#undef save_aptr
+#define save_aptr pPerl->Perl_save_aptr
+#undef save_ary
+#define save_ary pPerl->Perl_save_ary
+#undef save_clearsv
+#define save_clearsv pPerl->Perl_save_clearsv
+#undef save_delete
+#define save_delete pPerl->Perl_save_delete
+#undef save_destructor
+#define save_destructor pPerl->Perl_save_destructor
+#undef save_freesv
+#define save_freesv pPerl->Perl_save_freesv
+#undef save_freeop
+#define save_freeop pPerl->Perl_save_freeop
+#undef save_freepv
+#define save_freepv pPerl->Perl_save_freepv
+#undef save_generic_svref
+#define save_generic_svref pPerl->Perl_generic_save_svref
+#undef save_gp
+#define save_gp pPerl->Perl_save_gp
+#undef save_hash
+#define save_hash pPerl->Perl_save_hash
+#undef save_helem
+#define save_helem pPerl->Perl_save_helem
+#undef save_hints
+#define save_hints pPerl->Perl_save_hints
+#undef save_hptr
+#define save_hptr pPerl->Perl_save_hptr
+#undef save_I16
+#define save_I16 pPerl->Perl_save_I16
+#undef save_I32
+#define save_I32 pPerl->Perl_save_I32
+#undef save_int
+#define save_int pPerl->Perl_save_int
+#undef save_item
+#define save_item pPerl->Perl_save_item
+#undef save_iv
+#define save_iv pPerl->Perl_save_iv
+#undef save_list
+#define save_list pPerl->Perl_save_list
+#undef save_long
+#define save_long pPerl->Perl_save_long
+#undef save_nogv
+#define save_nogv pPerl->Perl_save_nogv
+#undef save_op
+#define save_op pPerl->Perl_save_op
+#undef save_scalar
+#define save_scalar pPerl->Perl_save_scalar
+#undef save_pptr
+#define save_pptr pPerl->Perl_save_pptr
+#undef save_sptr
+#define save_sptr pPerl->Perl_save_sptr
+#undef save_svref
+#define save_svref pPerl->Perl_save_svref
+#undef save_threadsv
+#define save_threadsv pPerl->Perl_save_threadsv
+#undef sawparens
+#define sawparens pPerl->Perl_sawparens
+#undef scalar
+#define scalar pPerl->Perl_scalar
+#undef scalarkids
+#define scalarkids pPerl->Perl_scalarkids
+#undef scalarseq
+#define scalarseq pPerl->Perl_scalarseq
+#undef scalarvoid
+#define scalarvoid pPerl->Perl_scalarvoid
+#undef scan_const
+#define scan_const pPerl->Perl_scan_const
+#undef scan_formline
+#define scan_formline pPerl->Perl_scan_formline
+#undef scan_ident
+#define scan_ident pPerl->Perl_scan_ident
+#undef scan_inputsymbol
+#define scan_inputsymbol pPerl->Perl_scan_inputsymbol
+#undef scan_heredoc
+#define scan_heredoc pPerl->Perl_scan_heredoc
+#undef scan_hex
+#define scan_hex pPerl->Perl_scan_hex
+#undef scan_num
+#define scan_num pPerl->Perl_scan_num
+#undef scan_oct
+#define scan_oct pPerl->Perl_scan_oct
+#undef scan_pat
+#define scan_pat pPerl->Perl_scan_pat
+#undef scan_str
+#define scan_str pPerl->Perl_scan_str
+#undef scan_subst
+#define scan_subst pPerl->Perl_scan_subst
+#undef scan_trans
+#define scan_trans pPerl->Perl_scan_trans
+#undef scope
+#define scope pPerl->Perl_scope
+#undef screaminstr
+#define screaminstr pPerl->Perl_screaminstr
+#undef setdefout
+#define setdefout pPerl->Perl_setdefout
+#undef setenv_getix
+#define setenv_getix pPerl->Perl_setenv_getix
+#undef share_hek
+#define share_hek pPerl->Perl_share_hek
+#undef sharepvn
+#define sharepvn pPerl->Perl_sharepvn
+#undef sighandler
+#define sighandler pPerl->Perl_sighandler
+#undef skipspace
+#define skipspace pPerl->Perl_skipspace
+#undef stack_grow
+#define stack_grow pPerl->Perl_stack_grow
+#undef start_subparse
+#define start_subparse pPerl->Perl_start_subparse
+#undef sub_crush_depth
+#define sub_crush_depth pPerl->Perl_sub_crush_depth
+#undef sublex_done
+#define sublex_done pPerl->Perl_sublex_done
+#undef sublex_start
+#define sublex_start pPerl->Perl_sublex_start
+#undef sv_2bool
+#define sv_2bool pPerl->Perl_sv_2bool
+#undef sv_2cv
+#define sv_2cv pPerl->Perl_sv_2cv
+#undef sv_2io
+#define sv_2io pPerl->Perl_sv_2io
+#undef sv_2iv
+#define sv_2iv pPerl->Perl_sv_2iv
+#undef sv_2mortal
+#define sv_2mortal pPerl->Perl_sv_2mortal
+#undef sv_2nv
+#define sv_2nv pPerl->Perl_sv_2nv
+#undef sv_2pv
+#define sv_2pv pPerl->Perl_sv_2pv
+#undef sv_2uv
+#define sv_2uv pPerl->Perl_sv_2uv
+#undef sv_add_arena
+#define sv_add_arena pPerl->Perl_sv_add_arena
+#undef sv_backoff
+#define sv_backoff pPerl->Perl_sv_backoff
+#undef sv_bless
+#define sv_bless pPerl->Perl_sv_bless
+#undef sv_catpv
+#define sv_catpv pPerl->Perl_sv_catpv
+#undef sv_catpvf
+#define sv_catpvf pPerl->Perl_sv_catpvf
+#undef sv_catpvn
+#define sv_catpvn pPerl->Perl_sv_catpvn
+#undef sv_catsv
+#define sv_catsv pPerl->Perl_sv_catsv
+#undef sv_chop
+#define sv_chop pPerl->Perl_sv_chop
+#undef sv_clean_all
+#define sv_clean_all pPerl->Perl_sv_clean_all
+#undef sv_clean_objs
+#define sv_clean_objs pPerl->Perl_sv_clean_objs
+#undef sv_clear
+#define sv_clear pPerl->Perl_sv_clear
+#undef sv_cmp
+#define sv_cmp pPerl->Perl_sv_cmp
+#undef sv_cmp_locale
+#define sv_cmp_locale pPerl->Perl_sv_cmp_locale
+#undef sv_collxfrm
+#define sv_collxfrm pPerl->Perl_sv_collxfrm
+#undef sv_compile_2op
+#define sv_compile_2op pPerl->Perl_sv_compile_2op
+#undef sv_dec
+#define sv_dec pPerl->Perl_sv_dec
+#undef sv_derived_from
+#define sv_derived_from pPerl->Perl_sv_derived_from
+#undef sv_dump
+#define sv_dump pPerl->Perl_sv_dump
+#undef sv_eq
+#define sv_eq pPerl->Perl_sv_eq
+#undef sv_free
+#define sv_free pPerl->Perl_sv_free
+#undef sv_free_arenas
+#define sv_free_arenas pPerl->Perl_sv_free_arenas
+#undef sv_gets
+#define sv_gets pPerl->Perl_sv_gets
+#undef sv_grow
+#define sv_grow pPerl->Perl_sv_grow
+#undef sv_inc
+#define sv_inc pPerl->Perl_sv_inc
+#undef sv_insert
+#define sv_insert pPerl->Perl_sv_insert
+#undef sv_isa
+#define sv_isa pPerl->Perl_sv_isa
+#undef sv_isobject
+#define sv_isobject pPerl->Perl_sv_isobject
+#undef sv_iv
+#define sv_iv pPerl->Perl_sv_iv
+#undef sv_len
+#define sv_len pPerl->Perl_sv_len
+#undef sv_magic
+#define sv_magic pPerl->Perl_sv_magic
+#undef sv_mortalcopy
+#define sv_mortalcopy pPerl->Perl_sv_mortalcopy
+#undef sv_newmortal
+#define sv_newmortal pPerl->Perl_sv_newmortal
+#undef sv_newref
+#define sv_newref pPerl->Perl_sv_newref
+#undef sv_nv
+#define sv_nv pPerl->Perl_sv_nv
+#undef sv_peek
+#define sv_peek pPerl->Perl_sv_peek
+#undef sv_pvn
+#define sv_pvn pPerl->Perl_sv_pvn
+#undef sv_pvn_force
+#define sv_pvn_force pPerl->Perl_sv_pvn_force
+#undef sv_reftype
+#define sv_reftype pPerl->Perl_sv_reftype
+#undef sv_replace
+#define sv_replace pPerl->Perl_sv_replace
+#undef sv_report_used
+#define sv_report_used pPerl->Perl_sv_report_used
+#undef sv_reset
+#define sv_reset pPerl->Perl_sv_reset
+#undef sv_setiv
+#define sv_setiv pPerl->Perl_sv_setiv
+#undef sv_setnv
+#define sv_setnv pPerl->Perl_sv_setnv
+#undef sv_setpv
+#define sv_setpv pPerl->Perl_sv_setpv
+#undef sv_setpvf
+#define sv_setpvf pPerl->Perl_sv_setpvf
+#undef sv_setpviv
+#define sv_setpviv pPerl->Perl_sv_setpviv
+#undef sv_setpvn
+#define sv_setpvn pPerl->Perl_sv_setpvn
+#undef sv_setref_iv
+#define sv_setref_iv pPerl->Perl_sv_setref_iv
+#undef sv_setref_nv
+#define sv_setref_nv pPerl->Perl_sv_setref_nv
+#undef sv_setref_pv
+#define sv_setref_pv pPerl->Perl_sv_setref_pv
+#undef sv_setref_pvn
+#define sv_setref_pvn pPerl->Perl_sv_setref_pvn
+#undef sv_setsv
+#define sv_setsv pPerl->Perl_sv_setsv
+#undef sv_setuv
+#define sv_setuv pPerl->Perl_sv_setuv
+#undef sv_taint
+#define sv_taint pPerl->Perl_sv_taint
+#undef sv_tainted
+#define sv_tainted pPerl->Perl_sv_tainted
+#undef sv_true
+#define sv_true pPerl->Perl_sv_true
+#undef sv_unmagic
+#define sv_unmagic pPerl->Perl_sv_unmagic
+#undef sv_unref
+#define sv_unref pPerl->Perl_sv_unref
+#undef sv_untaint
+#define sv_untaint pPerl->Perl_sv_untaint
+#undef sv_upgrade
+#define sv_upgrade pPerl->Perl_sv_upgrade
+#undef sv_usepvn
+#define sv_usepvn pPerl->Perl_sv_usepvn
+#undef sv_uv
+#define sv_uv pPerl->Perl_sv_uv
+#undef sv_vcatpvfn
+#define sv_vcatpvfn pPerl->Perl_sv_vcatpvfn
+#undef sv_vsetpvfn
+#define sv_vsetpvfn pPerl->Perl_sv_vsetpvfn
+#undef taint_env
+#define taint_env pPerl->Perl_taint_env
+#undef taint_not
+#define taint_not pPerl->Perl_taint_not
+#undef taint_proper
+#define taint_proper pPerl->Perl_taint_proper
+#undef too_few_arguments
+#define too_few_arguments pPerl->Perl_too_few_arguments
+#undef too_many_arguments
+#define too_many_arguments pPerl->Perl_too_many_arguments
+#undef unlnk
+#define unlnk pPerl->Perl_unlnk
+#undef unlock_condpair
+#define unlock_condpair pPerl->Perl_unlock_condpair
+#undef unshare_hek
+#define unshare_hek pPerl->Perl_unshare_hek
+#undef unsharepvn
+#define unsharepvn pPerl->Perl_unsharepvn
+#undef utilize
+#define utilize pPerl->Perl_utilize
+#undef vivify_defelem
+#define vivify_defelem pPerl->Perl_vivify_defelem
+#undef vivify_ref
+#define vivify_ref pPerl->Perl_vivify_ref
+#undef wait4pid
+#define wait4pid pPerl->Perl_wait4pid
+#undef warn
+#define warn pPerl->Perl_warn
+#undef watch
+#define watch pPerl->Perl_watch
+#undef whichsig
+#define whichsig pPerl->Perl_whichsig
+#undef yyerror
+#define yyerror pPerl->Perl_yyerror
+#undef yylex
+#define yylex pPerl->Perl_yylex
+#undef yyparse
+#define yyparse pPerl->Perl_yyparse
+#undef yywarn
+#define yywarn pPerl->Perl_yywarn
+
+
+#undef PL_piMem
+#define PL_piMem (pPerl->PL_piMem)
+#undef PL_piENV
+#define PL_piENV (pPerl->PL_piENV)
+#undef PL_piStdIO
+#define PL_piStdIO (pPerl->PL_piStdIO)
+#undef PL_piLIO
+#define PL_piLIO (pPerl->PL_piLIO)
+#undef PL_piDir
+#define PL_piDir (pPerl->PL_piDir)
+#undef PL_piSock
+#define PL_piSock (pPerl->PL_piSock)
+#undef PL_piProc
+#define PL_piProc (pPerl->PL_piProc)
+
+#ifndef NO_XSLOCKS
+#undef closedir
+#undef opendir
+#undef stdin
+#undef stdout
+#undef stderr
+#undef feof
+#undef ferror
+#undef fgetpos
+#undef ioctl
+#undef getlogin
+#undef setjmp
+#undef getc
+#undef ungetc
+#undef fileno
+
+#define mkdir PerlDir_mkdir
+#define chdir PerlDir_chdir
+#define rmdir PerlDir_rmdir
+#define closedir PerlDir_close
+#define opendir PerlDir_open
+#define readdir PerlDir_read
+#define rewinddir PerlDir_rewind
+#define seekdir PerlDir_seek
+#define telldir PerlDir_tell
+#define putenv PerlEnv_putenv
+#define getenv PerlEnv_getenv
+#define stdin PerlIO_stdin()
+#define stdout PerlIO_stdout()
+#define stderr PerlIO_stderr()
+#define fopen PerlIO_open
+#define fclose PerlIO_close
+#define feof PerlIO_eof
+#define ferror PerlIO_error
+#define fclearerr PerlIO_clearerr
+#define getc PerlIO_getc
+#define fputc(c, f) PerlIO_putc(f,c)
+#define fputs(s, f) PerlIO_puts(f,s)
+#define fflush PerlIO_flush
+#define ungetc(c, f) PerlIO_ungetc((f),(c))
+#define fileno PerlIO_fileno
+#define fdopen PerlIO_fdopen
+#define freopen PerlIO_reopen
+#define fread(b,s,c,f) PerlIO_read((f),(b),(s*c))
+#define fwrite(b,s,c,f) PerlIO_write((f),(b),(s*c))
+#define setbuf PerlIO_setbuf
+#define setvbuf PerlIO_setvbuf
+#define setlinebuf PerlIO_setlinebuf
+#define stdoutf PerlIO_stdoutf
+#define vfprintf PerlIO_vprintf
+#define ftell PerlIO_tell
+#define fseek PerlIO_seek
+#define fgetpos PerlIO_getpos
+#define fsetpos PerlIO_setpos
+#define frewind PerlIO_rewind
+#define tmpfile PerlIO_tmpfile
+#define access PerlLIO_access
+#define chmod PerlLIO_chmod
+#define chsize PerlLIO_chsize
+#define close PerlLIO_close
+#define dup PerlLIO_dup
+#define dup2 PerlLIO_dup2
+#define flock PerlLIO_flock
+#define fstat PerlLIO_fstat
+#define ioctl PerlLIO_ioctl
+#define isatty PerlLIO_isatty
+#define lseek PerlLIO_lseek
+#define lstat PerlLIO_lstat
+#define mktemp PerlLIO_mktemp
+#define open PerlLIO_open
+#define read PerlLIO_read
+#define rename PerlLIO_rename
+#define setmode PerlLIO_setmode
+#define stat PerlLIO_stat
+#define tmpnam PerlLIO_tmpnam
+#define umask PerlLIO_umask
+#define unlink PerlLIO_unlink
+#define utime PerlLIO_utime
+#define write PerlLIO_write
+#define malloc PerlMem_malloc
+#define realloc PerlMem_realloc
+#define free PerlMem_free
+#define abort PerlProc_abort
+#define exit PerlProc_exit
+#define _exit PerlProc__exit
+#define execl PerlProc_execl
+#define execv PerlProc_execv
+#define execvp PerlProc_execvp
+#define getuid PerlProc_getuid
+#define geteuid PerlProc_geteuid
+#define getgid PerlProc_getgid
+#define getegid PerlProc_getegid
+#define getlogin PerlProc_getlogin
+#define kill PerlProc_kill
+#define killpg PerlProc_killpg
+#define pause PerlProc_pause
+#define popen PerlProc_popen
+#define pclose PerlProc_pclose
+#define pipe PerlProc_pipe
+#define setuid PerlProc_setuid
+#define setgid PerlProc_setgid
+#define sleep PerlProc_sleep
+#define times PerlProc_times
+#define wait PerlProc_wait
+#define setjmp PerlProc_setjmp
+#define longjmp PerlProc_longjmp
+#define signal PerlProc_signal
+#define htonl PerlSock_htonl
+#define htons PerlSock_htons
+#define ntohl PerlSock_ntohl
+#define ntohs PerlSock_ntohs
+#define accept PerlSock_accept
+#define bind PerlSock_bind
+#define connect PerlSock_connect
+#define endhostent PerlSock_endhostent
+#define endnetent PerlSock_endnetent
+#define endprotoent PerlSock_endprotoent
+#define endservent PerlSock_endservent
+#define gethostbyaddr PerlSock_gethostbyaddr
+#define gethostbyname PerlSock_gethostbyname
+#define gethostent PerlSock_gethostent
+#define gethostname PerlSock_gethostname
+#define getnetbyaddr PerlSock_getnetbyaddr
+#define getnetbyname PerlSock_getnetbyname
+#define getnetent PerlSock_getnetent
+#define getpeername PerlSock_getpeername
+#define getprotobyname PerlSock_getprotobyname
+#define getprotobynumber PerlSock_getprotobynumber
+#define getprotoent PerlSock_getprotoent
+#define getservbyname PerlSock_getservbyname
+#define getservbyport PerlSock_getservbyport
+#define getservent PerlSock_getservent
+#define getsockname PerlSock_getsockname
+#define getsockopt PerlSock_getsockopt
+#define inet_addr PerlSock_inet_addr
+#define inet_ntoa PerlSock_inet_ntoa
+#define listen PerlSock_listen
+#define recvfrom PerlSock_recvfrom
+#define select PerlSock_select
+#define send PerlSock_send
+#define sendto PerlSock_sendto
+#define sethostent PerlSock_sethostent
+#define setnetent PerlSock_setnetent
+#define setprotoent PerlSock_setprotoent
+#define setservent PerlSock_setservent
+#define setsockopt PerlSock_setsockopt
+#define shutdown PerlSock_shutdown
+#define socket PerlSock_socket
+#define socketpair PerlSock_socketpair
+#endif /* NO_XSLOCKS */
+
+#undef PERL_OBJECT_THIS
+#define PERL_OBJECT_THIS pPerl
+#undef PERL_OBJECT_THIS_
+#define PERL_OBJECT_THIS_ pPerl,
+
+#undef SAVEDESTRUCTOR
+#define SAVEDESTRUCTOR(f,p) \
+ pPerl->Perl_save_destructor((FUNC_NAME_TO_PTR(f)),(p))
+
+#ifdef WIN32
+
+#ifndef WIN32IO_IS_STDIO
+#undef errno
+#define errno ErrorNo()
+#endif
+
+#undef ErrorNo
+#define ErrorNo pPerl->ErrorNo
+#undef NtCrypt
+#define NtCrypt pPerl->NtCrypt
+#undef NtGetLib
+#define NtGetLib pPerl->NtGetLib
+#undef NtGetArchLib
+#define NtGetArchLib pPerl->NtGetArchLib
+#undef NtGetSiteLib
+#define NtGetSiteLib pPerl->NtGetSiteLib
+#undef NtGetBin
+#define NtGetBin pPerl->NtGetBin
+#undef NtGetDebugScriptStr
+#define NtGetDebugScriptStr pPerl->NtGetDebugScriptStr
+#endif /* WIN32 */
+
+#endif /* __objXSUB_h__ */
+
diff --git a/gnu/usr.bin/perl/objpp.h b/gnu/usr.bin/perl/objpp.h
new file mode 100644
index 00000000000..dd24e389812
--- /dev/null
+++ b/gnu/usr.bin/perl/objpp.h
@@ -0,0 +1,1473 @@
+#ifndef __Objpp_h__
+#define __Objpp_h__
+
+#undef amagic_call
+#define amagic_call CPerlObj::Perl_amagic_call
+#undef amagic_cmp
+#define amagic_cmp CPerlObj::amagic_cmp
+#undef amagic_cmp_locale
+#define amagic_cmp_locale CPerlObj::amagic_cmp_locale
+#undef Gv_AMupdate
+#define Gv_AMupdate CPerlObj::Perl_Gv_AMupdate
+#undef add_data
+#define add_data CPerlObj::add_data
+#undef ao
+#define ao CPerlObj::ao
+#undef append_elem
+#define append_elem CPerlObj::Perl_append_elem
+#undef append_list
+#define append_list CPerlObj::Perl_append_list
+#undef apply
+#define apply CPerlObj::Perl_apply
+#undef asIV
+#define asIV CPerlObj::asIV
+#undef asUV
+#define asUV CPerlObj::asUV
+#undef assertref
+#define assertref CPerlObj::Perl_assertref
+#undef av_clear
+#define av_clear CPerlObj::Perl_av_clear
+#undef av_extend
+#define av_extend CPerlObj::Perl_av_extend
+#undef av_fake
+#define av_fake CPerlObj::Perl_av_fake
+#undef av_fetch
+#define av_fetch CPerlObj::Perl_av_fetch
+#undef av_fill
+#define av_fill CPerlObj::Perl_av_fill
+#undef av_len
+#define av_len CPerlObj::Perl_av_len
+#undef av_make
+#define av_make CPerlObj::Perl_av_make
+#undef av_pop
+#define av_pop CPerlObj::Perl_av_pop
+#undef av_push
+#define av_push CPerlObj::Perl_av_push
+#undef av_shift
+#define av_shift CPerlObj::Perl_av_shift
+#undef av_reify
+#define av_reify CPerlObj::Perl_av_reify
+#undef av_store
+#define av_store CPerlObj::Perl_av_store
+#undef av_undef
+#define av_undef CPerlObj::Perl_av_undef
+#undef av_unshift
+#define av_unshift CPerlObj::Perl_av_unshift
+#undef avhv_keys
+#define avhv_keys CPerlObj::Perl_avhv_keys
+#undef avhv_fetch_ent
+#define avhv_fetch_ent CPerlObj::Perl_avhv_fetch_ent
+#undef avhv_exists_ent
+#define avhv_exists_ent CPerlObj::Perl_avhv_exists_ent
+#undef avhv_index_sv
+#define avhv_index_sv CPerlObj::avhv_index_sv
+#undef avhv_iternext
+#define avhv_iternext CPerlObj::Perl_avhv_iternext
+#undef avhv_iterval
+#define avhv_iterval CPerlObj::Perl_avhv_iterval
+#undef bad_type
+#define bad_type CPerlObj::bad_type
+#undef bind_match
+#define bind_match CPerlObj::Perl_bind_match
+#undef block_end
+#define block_end CPerlObj::Perl_block_end
+#undef block_gimme
+#define block_gimme CPerlObj::Perl_block_gimme
+#undef block_start
+#define block_start CPerlObj::Perl_block_start
+#undef bset_obj_store
+#define bset_obj_store CPerlObj::Perl_bset_obj_store
+#undef byterun
+#define byterun CPerlObj::Perl_byterun
+#undef call_list
+#define call_list CPerlObj::Perl_call_list
+#undef cando
+#define cando CPerlObj::Perl_cando
+#undef cast_ulong
+#define cast_ulong CPerlObj::cast_ulong
+#undef checkcomma
+#define checkcomma CPerlObj::Perl_checkcomma
+#undef check_uni
+#define check_uni CPerlObj::Perl_check_uni
+#undef ck_anoncode
+#define ck_anoncode CPerlObj::Perl_ck_anoncode
+#undef ck_bitop
+#define ck_bitop CPerlObj::Perl_ck_bitop
+#undef ck_concat
+#define ck_concat CPerlObj::Perl_ck_concat
+#undef ck_delete
+#define ck_delete CPerlObj::Perl_ck_delete
+#undef ck_eof
+#define ck_eof CPerlObj::Perl_ck_eof
+#undef ck_eval
+#define ck_eval CPerlObj::Perl_ck_eval
+#undef ck_exec
+#define ck_exec CPerlObj::Perl_ck_exec
+#undef ck_exists
+#define ck_exists CPerlObj::Perl_ck_exists
+#undef ck_formline
+#define ck_formline CPerlObj::Perl_ck_formline
+#undef ck_ftst
+#define ck_ftst CPerlObj::Perl_ck_ftst
+#undef ck_fun
+#define ck_fun CPerlObj::Perl_ck_fun
+#undef ck_fun_locale
+#define ck_fun_locale CPerlObj::Perl_ck_fun_locale
+#undef ck_glob
+#define ck_glob CPerlObj::Perl_ck_glob
+#undef ck_grep
+#define ck_grep CPerlObj::Perl_ck_grep
+#undef ck_gvconst
+#define ck_gvconst CPerlObj::Perl_ck_gvconst
+#undef ck_index
+#define ck_index CPerlObj::Perl_ck_index
+#undef ck_lengthconst
+#define ck_lengthconst CPerlObj::Perl_ck_lengthconst
+#undef ck_lfun
+#define ck_lfun CPerlObj::Perl_ck_lfun
+#undef ck_listiob
+#define ck_listiob CPerlObj::Perl_ck_listiob
+#undef ck_match
+#define ck_match CPerlObj::Perl_ck_match
+#undef ck_null
+#define ck_null CPerlObj::Perl_ck_null
+#undef ck_repeat
+#define ck_repeat CPerlObj::Perl_ck_repeat
+#undef ck_require
+#define ck_require CPerlObj::Perl_ck_require
+#undef ck_retarget
+#define ck_retarget CPerlObj::Perl_ck_retarget
+#undef ck_rfun
+#define ck_rfun CPerlObj::Perl_ck_rfun
+#undef ck_rvconst
+#define ck_rvconst CPerlObj::Perl_ck_rvconst
+#undef ck_scmp
+#define ck_scmp CPerlObj::Perl_ck_scmp
+#undef ck_select
+#define ck_select CPerlObj::Perl_ck_select
+#undef ck_shift
+#define ck_shift CPerlObj::Perl_ck_shift
+#undef ck_sort
+#define ck_sort CPerlObj::Perl_ck_sort
+#undef ck_spair
+#define ck_spair CPerlObj::Perl_ck_spair
+#undef ck_split
+#define ck_split CPerlObj::Perl_ck_split
+#undef ck_subr
+#define ck_subr CPerlObj::Perl_ck_subr
+#undef ck_svconst
+#define ck_svconst CPerlObj::Perl_ck_svconst
+#undef ck_trunc
+#define ck_trunc CPerlObj::Perl_ck_trunc
+#undef convert
+#define convert CPerlObj::Perl_convert
+#undef cpytill
+#define cpytill CPerlObj::Perl_cpytill
+#undef croak
+#define croak CPerlObj::Perl_croak
+#undef cv_ckproto
+#define cv_ckproto CPerlObj::Perl_cv_ckproto
+#undef cv_clone
+#define cv_clone CPerlObj::Perl_cv_clone
+#undef cv_clone2
+#define cv_clone2 CPerlObj::cv_clone2
+#undef cv_const_sv
+#define cv_const_sv CPerlObj::Perl_cv_const_sv
+#undef cv_undef
+#define cv_undef CPerlObj::Perl_cv_undef
+#undef cx_dump
+#define cx_dump CPerlObj::Perl_cx_dump
+#undef cxinc
+#define cxinc CPerlObj::Perl_cxinc
+#undef deb
+#define deb CPerlObj::Perl_deb
+#undef deb_growlevel
+#define deb_growlevel CPerlObj::Perl_deb_growlevel
+#undef debop
+#define debop CPerlObj::Perl_debop
+#undef debstackptrs
+#define debstackptrs CPerlObj::Perl_debstackptrs
+#undef debprof
+#define debprof CPerlObj::debprof
+#undef debprofdump
+#define debprofdump CPerlObj::Perl_debprofdump
+#undef debstack
+#define debstack CPerlObj::Perl_debstack
+#undef del_sv
+#define del_sv CPerlObj::del_sv
+#undef del_xiv
+#define del_xiv CPerlObj::del_xiv
+#undef del_xnv
+#define del_xnv CPerlObj::del_xnv
+#undef del_xpv
+#define del_xpv CPerlObj::del_xpv
+#undef del_xrv
+#define del_xrv CPerlObj::del_xrv
+#undef delimcpy
+#define delimcpy CPerlObj::Perl_delimcpy
+#undef depcom
+#define depcom CPerlObj::depcom
+#undef deprecate
+#define deprecate CPerlObj::Perl_deprecate
+#undef die
+#define die CPerlObj::Perl_die
+#undef die_where
+#define die_where CPerlObj::Perl_die_where
+#undef div128
+#define div128 CPerlObj::div128
+#undef doencodes
+#define doencodes CPerlObj::doencodes
+#undef doeval
+#define doeval CPerlObj::doeval
+#undef doform
+#define doform CPerlObj::doform
+#undef dofindlabel
+#define dofindlabel CPerlObj::Perl_dofindlabel
+#undef doparseform
+#define doparseform CPerlObj::doparseform
+#undef dopoptoeval
+#define dopoptoeval CPerlObj::Perl_dopoptoeval
+#undef dopoptolabel
+#define dopoptolabel CPerlObj::dopoptolabel
+#undef dopoptoloop
+#define dopoptoloop CPerlObj::dopoptoloop
+#undef dopoptosub
+#define dopoptosub CPerlObj::dopoptosub
+#undef dopoptosub_at
+#define dopoptosub_at CPerlObj::dopoptosub_at
+#undef dounwind
+#define dounwind CPerlObj::Perl_dounwind
+#undef do_aexec
+#define do_aexec CPerlObj::Perl_do_aexec
+#undef do_aspawn
+#define do_aspawn CPerlObj::do_aspawn
+#undef do_binmode
+#define do_binmode CPerlObj::Perl_do_binmode
+#undef do_chop
+#define do_chop CPerlObj::Perl_do_chop
+#undef do_close
+#define do_close CPerlObj::Perl_do_close
+#undef do_eof
+#define do_eof CPerlObj::Perl_do_eof
+#undef do_exec
+#define do_exec CPerlObj::Perl_do_exec
+#undef do_execfree
+#define do_execfree CPerlObj::Perl_do_execfree
+#undef do_ipcctl
+#define do_ipcctl CPerlObj::Perl_do_ipcctl
+#undef do_ipcget
+#define do_ipcget CPerlObj::Perl_do_ipcget
+#undef do_join
+#define do_join CPerlObj::Perl_do_join
+#undef do_kv
+#define do_kv CPerlObj::Perl_do_kv
+#undef do_msgrcv
+#define do_msgrcv CPerlObj::Perl_do_msgrcv
+#undef do_msgsnd
+#define do_msgsnd CPerlObj::Perl_do_msgsnd
+#undef do_open
+#define do_open CPerlObj::Perl_do_open
+#undef do_pipe
+#define do_pipe CPerlObj::Perl_do_pipe
+#undef do_print
+#define do_print CPerlObj::Perl_do_print
+#undef do_readline
+#define do_readline CPerlObj::Perl_do_readline
+#undef do_chomp
+#define do_chomp CPerlObj::Perl_do_chomp
+#undef do_seek
+#define do_seek CPerlObj::Perl_do_seek
+#undef do_semop
+#define do_semop CPerlObj::Perl_do_semop
+#undef do_shmio
+#define do_shmio CPerlObj::Perl_do_shmio
+#undef do_sprintf
+#define do_sprintf CPerlObj::Perl_do_sprintf
+#undef do_sysseek
+#define do_sysseek CPerlObj::Perl_do_sysseek
+#undef do_tell
+#define do_tell CPerlObj::Perl_do_tell
+#undef do_trans
+#define do_trans CPerlObj::Perl_do_trans
+#undef do_vecset
+#define do_vecset CPerlObj::Perl_do_vecset
+#undef do_vop
+#define do_vop CPerlObj::Perl_do_vop
+#undef dofile
+#define dofile CPerlObj::Perl_dofile
+#undef do_clean_all
+#define do_clean_all CPerlObj::do_clean_all
+#undef do_clean_named_objs
+#define do_clean_named_objs CPerlObj::do_clean_named_objs
+#undef do_clean_objs
+#define do_clean_objs CPerlObj::do_clean_objs
+#undef do_report_used
+#define do_report_used CPerlObj::do_report_used
+#undef docatch
+#define docatch CPerlObj::docatch
+#undef dowantarray
+#define dowantarray CPerlObj::Perl_dowantarray
+#undef dump
+#define dump CPerlObj::dump
+#undef dump_all
+#define dump_all CPerlObj::Perl_dump_all
+#undef dump_eval
+#define dump_eval CPerlObj::Perl_dump_eval
+#undef dump_fds
+#define dump_fds CPerlObj::Perl_dump_fds
+#undef dump_form
+#define dump_form CPerlObj::Perl_dump_form
+#undef dump_gv
+#define dump_gv CPerlObj::Perl_dump_gv
+#undef dump_mstats
+#define dump_mstats CPerlObj::Perl_dump_mstats
+#undef dump_op
+#define dump_op CPerlObj::Perl_dump_op
+#undef dump_pm
+#define dump_pm CPerlObj::Perl_dump_pm
+#undef dump_packsubs
+#define dump_packsubs CPerlObj::Perl_dump_packsubs
+#undef dump_sub
+#define dump_sub CPerlObj::Perl_dump_sub
+#undef dumpuntil
+#define dumpuntil CPerlObj::dumpuntil
+#undef fbm_compile
+#define fbm_compile CPerlObj::Perl_fbm_compile
+#undef fbm_instr
+#define fbm_instr CPerlObj::Perl_fbm_instr
+#undef filter_add
+#define filter_add CPerlObj::Perl_filter_add
+#undef filter_del
+#define filter_del CPerlObj::Perl_filter_del
+#undef filter_gets
+#define filter_gets CPerlObj::filter_gets
+#undef filter_read
+#define filter_read CPerlObj::Perl_filter_read
+#undef find_beginning
+#define find_beginning CPerlObj::find_beginning
+#undef find_script
+#define find_script CPerlObj::Perl_find_script
+#undef forbid_setid
+#define forbid_setid CPerlObj::forbid_setid
+#undef force_ident
+#define force_ident CPerlObj::Perl_force_ident
+#undef force_list
+#define force_list CPerlObj::Perl_force_list
+#undef force_next
+#define force_next CPerlObj::Perl_force_next
+#undef force_word
+#define force_word CPerlObj::Perl_force_word
+#undef force_version
+#define force_version CPerlObj::force_version
+#undef form
+#define form CPerlObj::Perl_form
+#undef fold_constants
+#define fold_constants CPerlObj::Perl_fold_constants
+#undef fprintf
+#define fprintf CPerlObj::fprintf
+#undef free_tmps
+#define free_tmps CPerlObj::Perl_free_tmps
+#undef gen_constant_list
+#define gen_constant_list CPerlObj::Perl_gen_constant_list
+#undef get_db_sub
+#define get_db_sub CPerlObj::get_db_sub
+#undef get_op_descs
+#define get_op_descs CPerlObj::Perl_get_op_descs
+#undef get_op_names
+#define get_op_names CPerlObj::Perl_get_op_names
+#undef get_no_modify
+#define get_no_modify CPerlObj::Perl_get_no_modify
+#undef get_opargs
+#define get_opargs CPerlObj::Perl_get_opargs
+#undef get_specialsv_list
+#define get_specialsv_list CPerlObj::Perl_get_specialsv_list
+#undef get_vtbl
+#define get_vtbl CPerlObj::Perl_get_vtbl
+#undef getlogin
+#define getlogin CPerlObj::getlogin
+#undef gp_free
+#define gp_free CPerlObj::Perl_gp_free
+#undef gp_ref
+#define gp_ref CPerlObj::Perl_gp_ref
+#undef gv_autoload4
+#define gv_autoload4 CPerlObj::Perl_gv_autoload4
+#undef gv_AVadd
+#define gv_AVadd CPerlObj::Perl_gv_AVadd
+#undef gv_HVadd
+#define gv_HVadd CPerlObj::Perl_gv_HVadd
+#undef gv_IOadd
+#define gv_IOadd CPerlObj::Perl_gv_IOadd
+#undef gv_check
+#define gv_check CPerlObj::Perl_gv_check
+#undef gv_efullname
+#define gv_efullname CPerlObj::Perl_gv_efullname
+#undef gv_efullname3
+#define gv_efullname3 CPerlObj::Perl_gv_efullname3
+#undef gv_ename
+#define gv_ename CPerlObj::gv_ename
+#undef gv_fetchfile
+#define gv_fetchfile CPerlObj::Perl_gv_fetchfile
+#undef gv_fetchmeth
+#define gv_fetchmeth CPerlObj::Perl_gv_fetchmeth
+#undef gv_fetchmethod
+#define gv_fetchmethod CPerlObj::Perl_gv_fetchmethod
+#undef gv_fetchmethod_autoload
+#define gv_fetchmethod_autoload CPerlObj::Perl_gv_fetchmethod_autoload
+#undef gv_fetchpv
+#define gv_fetchpv CPerlObj::Perl_gv_fetchpv
+#undef gv_fullname
+#define gv_fullname CPerlObj::Perl_gv_fullname
+#undef gv_fullname3
+#define gv_fullname3 CPerlObj::Perl_gv_fullname3
+#undef gv_init
+#define gv_init CPerlObj::Perl_gv_init
+#undef gv_init_sv
+#define gv_init_sv CPerlObj::gv_init_sv
+#undef gv_stashpv
+#define gv_stashpv CPerlObj::Perl_gv_stashpv
+#undef gv_stashpvn
+#define gv_stashpvn CPerlObj::Perl_gv_stashpvn
+#undef gv_stashsv
+#define gv_stashsv CPerlObj::Perl_gv_stashsv
+#undef he_delayfree
+#define he_delayfree CPerlObj::Perl_he_delayfree
+#undef he_free
+#define he_free CPerlObj::Perl_he_free
+#undef hfreeentries
+#define hfreeentries CPerlObj::hfreeentries
+#undef hoistmust
+#define hoistmust CPerlObj::Perl_hoistmust
+#undef hsplit
+#define hsplit CPerlObj::hsplit
+#undef hv_clear
+#define hv_clear CPerlObj::Perl_hv_clear
+#undef hv_delayfree_ent
+#define hv_delayfree_ent CPerlObj::Perl_hv_delayfree_ent
+#undef hv_delete
+#define hv_delete CPerlObj::Perl_hv_delete
+#undef hv_delete_ent
+#define hv_delete_ent CPerlObj::Perl_hv_delete_ent
+#undef hv_exists
+#define hv_exists CPerlObj::Perl_hv_exists
+#undef hv_exists_ent
+#define hv_exists_ent CPerlObj::Perl_hv_exists_ent
+#undef hv_free_ent
+#define hv_free_ent CPerlObj::Perl_hv_free_ent
+#undef hv_fetch
+#define hv_fetch CPerlObj::Perl_hv_fetch
+#undef hv_fetch_ent
+#define hv_fetch_ent CPerlObj::Perl_hv_fetch_ent
+#undef hv_iterinit
+#define hv_iterinit CPerlObj::Perl_hv_iterinit
+#undef hv_iterkey
+#define hv_iterkey CPerlObj::Perl_hv_iterkey
+#undef hv_iterkeysv
+#define hv_iterkeysv CPerlObj::Perl_hv_iterkeysv
+#undef hv_iternext
+#define hv_iternext CPerlObj::Perl_hv_iternext
+#undef hv_iternextsv
+#define hv_iternextsv CPerlObj::Perl_hv_iternextsv
+#undef hv_iterval
+#define hv_iterval CPerlObj::Perl_hv_iterval
+#undef hv_ksplit
+#define hv_ksplit CPerlObj::Perl_hv_ksplit
+#undef hv_magic
+#define hv_magic CPerlObj::Perl_hv_magic
+#undef hv_store
+#define hv_store CPerlObj::Perl_hv_store
+#undef hv_store_ent
+#define hv_store_ent CPerlObj::Perl_hv_store_ent
+#undef hv_undef
+#define hv_undef CPerlObj::Perl_hv_undef
+#undef ibcmp
+#define ibcmp CPerlObj::Perl_ibcmp
+#undef ibcmp_locale
+#define ibcmp_locale CPerlObj::Perl_ibcmp_locale
+#undef incpush
+#define incpush CPerlObj::incpush
+#undef incline
+#define incline CPerlObj::incline
+#undef incl_perldb
+#define incl_perldb CPerlObj::incl_perldb
+#undef ingroup
+#define ingroup CPerlObj::Perl_ingroup
+#undef init_debugger
+#define init_debugger CPerlObj::init_debugger
+#undef init_ids
+#define init_ids CPerlObj::init_ids
+#undef init_interp
+#define init_interp CPerlObj::init_interp
+#undef init_main_thread
+#define init_main_thread CPerlObj::init_main_thread
+#undef init_main_stash
+#define init_main_stash CPerlObj::init_main_stash
+#undef init_lexer
+#define init_lexer CPerlObj::init_lexer
+#undef init_perllib
+#define init_perllib CPerlObj::init_perllib
+#undef init_predump_symbols
+#define init_predump_symbols CPerlObj::init_predump_symbols
+#undef init_postdump_symbols
+#define init_postdump_symbols CPerlObj::init_postdump_symbols
+#undef init_stacks
+#define init_stacks CPerlObj::Perl_init_stacks
+#undef intro_my
+#define intro_my CPerlObj::Perl_intro_my
+#undef nuke_stacks
+#define nuke_stacks CPerlObj::nuke_stacks
+#undef instr
+#define instr CPerlObj::Perl_instr
+#undef intuit_method
+#define intuit_method CPerlObj::intuit_method
+#undef intuit_more
+#define intuit_more CPerlObj::Perl_intuit_more
+#undef invert
+#define invert CPerlObj::Perl_invert
+#undef io_close
+#define io_close CPerlObj::Perl_io_close
+#undef is_an_int
+#define is_an_int CPerlObj::is_an_int
+#undef isa_lookup
+#define isa_lookup CPerlObj::isa_lookup
+#undef jmaybe
+#define jmaybe CPerlObj::Perl_jmaybe
+#undef keyword
+#define keyword CPerlObj::Perl_keyword
+#undef leave_scope
+#define leave_scope CPerlObj::Perl_leave_scope
+#undef lex_end
+#define lex_end CPerlObj::Perl_lex_end
+#undef lex_start
+#define lex_start CPerlObj::Perl_lex_start
+#undef linklist
+#define linklist CPerlObj::Perl_linklist
+#undef list
+#define list CPerlObj::Perl_list
+#undef list_assignment
+#define list_assignment CPerlObj::list_assignment
+#undef listkids
+#define listkids CPerlObj::Perl_listkids
+#undef lop
+#define lop CPerlObj::lop
+#undef localize
+#define localize CPerlObj::Perl_localize
+#undef looks_like_number
+#define looks_like_number CPerlObj::Perl_looks_like_number
+#undef magic_clearenv
+#define magic_clearenv CPerlObj::Perl_magic_clearenv
+#undef magic_clear_all_env
+#define magic_clear_all_env CPerlObj::Perl_magic_clear_all_env
+#undef magic_clearpack
+#define magic_clearpack CPerlObj::Perl_magic_clearpack
+#undef magic_clearsig
+#define magic_clearsig CPerlObj::Perl_magic_clearsig
+#undef magic_existspack
+#define magic_existspack CPerlObj::Perl_magic_existspack
+#undef magic_freeregexp
+#define magic_freeregexp CPerlObj::Perl_magic_freeregexp
+#undef magic_get
+#define magic_get CPerlObj::Perl_magic_get
+#undef magic_getarylen
+#define magic_getarylen CPerlObj::Perl_magic_getarylen
+#undef magic_getdefelem
+#define magic_getdefelem CPerlObj::Perl_magic_getdefelem
+#undef magic_getpack
+#define magic_getpack CPerlObj::Perl_magic_getpack
+#undef magic_getglob
+#define magic_getglob CPerlObj::Perl_magic_getglob
+#undef magic_getnkeys
+#define magic_getnkeys CPerlObj::Perl_magic_getnkeys
+#undef magic_getpos
+#define magic_getpos CPerlObj::Perl_magic_getpos
+#undef magic_getsig
+#define magic_getsig CPerlObj::Perl_magic_getsig
+#undef magic_getsubstr
+#define magic_getsubstr CPerlObj::Perl_magic_getsubstr
+#undef magic_gettaint
+#define magic_gettaint CPerlObj::Perl_magic_gettaint
+#undef magic_getuvar
+#define magic_getuvar CPerlObj::Perl_magic_getuvar
+#undef magic_getvec
+#define magic_getvec CPerlObj::Perl_magic_getvec
+#undef magic_len
+#define magic_len CPerlObj::Perl_magic_len
+#undef magic_methcall
+#define magic_methcall CPerlObj::magic_methcall
+#undef magic_methpack
+#define magic_methpack CPerlObj::magic_methpack
+#undef magic_nextpack
+#define magic_nextpack CPerlObj::Perl_magic_nextpack
+#undef magic_set
+#define magic_set CPerlObj::Perl_magic_set
+#undef magic_set_all_env
+#define magic_set_all_env CPerlObj::Perl_magic_set_all_env
+#undef magic_setamagic
+#define magic_setamagic CPerlObj::Perl_magic_setamagic
+#undef magic_setarylen
+#define magic_setarylen CPerlObj::Perl_magic_setarylen
+#undef magic_setbm
+#define magic_setbm CPerlObj::Perl_magic_setbm
+#undef magic_setcollxfrm
+#define magic_setcollxfrm CPerlObj::Perl_magic_setcollxfrm
+#undef magic_setdbline
+#define magic_setdbline CPerlObj::Perl_magic_setdbline
+#undef magic_setdefelem
+#define magic_setdefelem CPerlObj::Perl_magic_setdefelem
+#undef magic_setenv
+#define magic_setenv CPerlObj::Perl_magic_setenv
+#undef magic_setfm
+#define magic_setfm CPerlObj::Perl_magic_setfm
+#undef magic_setisa
+#define magic_setisa CPerlObj::Perl_magic_setisa
+#undef magic_setglob
+#define magic_setglob CPerlObj::Perl_magic_setglob
+#undef magic_setmglob
+#define magic_setmglob CPerlObj::Perl_magic_setmglob
+#undef magic_setnkeys
+#define magic_setnkeys CPerlObj::Perl_magic_setnkeys
+#undef magic_setpack
+#define magic_setpack CPerlObj::Perl_magic_setpack
+#undef magic_setpos
+#define magic_setpos CPerlObj::Perl_magic_setpos
+#undef magic_setsig
+#define magic_setsig CPerlObj::Perl_magic_setsig
+#undef magic_setsubstr
+#define magic_setsubstr CPerlObj::Perl_magic_setsubstr
+#undef magic_settaint
+#define magic_settaint CPerlObj::Perl_magic_settaint
+#undef magic_setuvar
+#define magic_setuvar CPerlObj::Perl_magic_setuvar
+#undef magic_setvec
+#define magic_setvec CPerlObj::Perl_magic_setvec
+#undef magic_sizepack
+#define magic_sizepack CPerlObj::Perl_magic_sizepack
+#undef magic_unchain
+#define magic_unchain CPerlObj::Perl_magic_unchain
+#undef magic_wipepack
+#define magic_wipepack CPerlObj::Perl_magic_wipepack
+#undef magicname
+#define magicname CPerlObj::Perl_magicname
+#undef malloced_size
+#define malloced_size CPerlObj::Perl_malloced_size
+#undef markstack_grow
+#define markstack_grow CPerlObj::Perl_markstack_grow
+#undef markstack_ptr
+#define markstack_ptr CPerlObj::Perl_markstack_ptr
+#undef mess
+#define mess CPerlObj::Perl_mess
+#undef mess_alloc
+#define mess_alloc CPerlObj::mess_alloc
+#undef mem_collxfrm
+#define mem_collxfrm CPerlObj::Perl_mem_collxfrm
+#undef mg_clear
+#define mg_clear CPerlObj::Perl_mg_clear
+#undef mg_copy
+#define mg_copy CPerlObj::Perl_mg_copy
+#undef mg_find
+#define mg_find CPerlObj::Perl_mg_find
+#undef mg_free
+#define mg_free CPerlObj::Perl_mg_free
+#undef mg_get
+#define mg_get CPerlObj::Perl_mg_get
+#undef mg_length
+#define mg_length CPerlObj::Perl_mg_length
+#undef mg_magical
+#define mg_magical CPerlObj::Perl_mg_magical
+#undef mg_set
+#define mg_set CPerlObj::Perl_mg_set
+#undef mg_size
+#define mg_size CPerlObj::Perl_mg_size
+#undef missingterm
+#define missingterm CPerlObj::missingterm
+#undef mod
+#define mod CPerlObj::Perl_mod
+#undef modkids
+#define modkids CPerlObj::Perl_modkids
+#undef moreswitches
+#define moreswitches CPerlObj::Perl_moreswitches
+#undef more_sv
+#define more_sv CPerlObj::more_sv
+#undef more_xiv
+#define more_xiv CPerlObj::more_xiv
+#undef more_xnv
+#define more_xnv CPerlObj::more_xnv
+#undef more_xpv
+#define more_xpv CPerlObj::more_xpv
+#undef more_xrv
+#define more_xrv CPerlObj::more_xrv
+#undef mstats
+#define mstats CPerlObj::mstats
+#undef mul128
+#define mul128 CPerlObj::mul128
+#undef my
+#define my CPerlObj::Perl_my
+#undef my_bcopy
+#define my_bcopy CPerlObj::Perl_my_bcopy
+#undef my_bzero
+#define my_bzero CPerlObj::Perl_my_bzero
+#undef my_exit
+#define my_exit CPerlObj::Perl_my_exit
+#undef my_exit_jump
+#define my_exit_jump CPerlObj::my_exit_jump
+#undef my_failure_exit
+#define my_failure_exit CPerlObj::Perl_my_failure_exit
+#undef my_lstat
+#define my_lstat CPerlObj::Perl_my_lstat
+#undef my_memcmp
+#define my_memcmp CPerlObj::Perl_my_memcmp
+#undef my_memset
+#define my_memset CPerlObj::Perl_my_memset
+#undef my_pclose
+#define my_pclose CPerlObj::Perl_my_pclose
+#undef my_popen
+#define my_popen CPerlObj::Perl_my_popen
+#undef my_safemalloc
+#define my_safemalloc CPerlObj::my_safemalloc
+#undef my_setenv
+#define my_setenv CPerlObj::Perl_my_setenv
+#undef my_stat
+#define my_stat CPerlObj::Perl_my_stat
+#undef my_swap
+#define my_swap CPerlObj::my_swap
+#undef my_htonl
+#define my_htonl CPerlObj::my_htonl
+#undef my_ntohl
+#define my_ntohl CPerlObj::my_ntohl
+#undef my_unexec
+#define my_unexec CPerlObj::Perl_my_unexec
+#undef newANONLIST
+#define newANONLIST CPerlObj::Perl_newANONLIST
+#undef newANONHASH
+#define newANONHASH CPerlObj::Perl_newANONHASH
+#undef newANONSUB
+#define newANONSUB CPerlObj::Perl_newANONSUB
+#undef newASSIGNOP
+#define newASSIGNOP CPerlObj::Perl_newASSIGNOP
+#undef newCONDOP
+#define newCONDOP CPerlObj::Perl_newCONDOP
+#undef newCONSTSUB
+#define newCONSTSUB CPerlObj::Perl_newCONSTSUB
+#undef newDEFSVOP
+#define newDEFSVOP CPerlObj::newDEFSVOP
+#undef newFORM
+#define newFORM CPerlObj::Perl_newFORM
+#undef newFOROP
+#define newFOROP CPerlObj::Perl_newFOROP
+#undef newLOGOP
+#define newLOGOP CPerlObj::Perl_newLOGOP
+#undef newLOOPEX
+#define newLOOPEX CPerlObj::Perl_newLOOPEX
+#undef newLOOPOP
+#define newLOOPOP CPerlObj::Perl_newLOOPOP
+#undef newMETHOD
+#define newMETHOD CPerlObj::Perl_newMETHOD
+#undef newNULLLIST
+#define newNULLLIST CPerlObj::Perl_newNULLLIST
+#undef newOP
+#define newOP CPerlObj::Perl_newOP
+#undef newPROG
+#define newPROG CPerlObj::Perl_newPROG
+#undef newRANGE
+#define newRANGE CPerlObj::Perl_newRANGE
+#undef newSLICEOP
+#define newSLICEOP CPerlObj::Perl_newSLICEOP
+#undef newSTATEOP
+#define newSTATEOP CPerlObj::Perl_newSTATEOP
+#undef newSUB
+#define newSUB CPerlObj::Perl_newSUB
+#undef newXS
+#define newXS CPerlObj::Perl_newXS
+#undef newXSUB
+#define newXSUB CPerlObj::Perl_newXSUB
+#undef newAV
+#define newAV CPerlObj::Perl_newAV
+#undef newAVREF
+#define newAVREF CPerlObj::Perl_newAVREF
+#undef newBINOP
+#define newBINOP CPerlObj::Perl_newBINOP
+#undef newCVREF
+#define newCVREF CPerlObj::Perl_newCVREF
+#undef newCVOP
+#define newCVOP CPerlObj::Perl_newCVOP
+#undef newGVOP
+#define newGVOP CPerlObj::Perl_newGVOP
+#undef newGVgen
+#define newGVgen CPerlObj::Perl_newGVgen
+#undef newGVREF
+#define newGVREF CPerlObj::Perl_newGVREF
+#undef newHVREF
+#define newHVREF CPerlObj::Perl_newHVREF
+#undef newHV
+#define newHV CPerlObj::Perl_newHV
+#undef newHVhv
+#define newHVhv CPerlObj::Perl_newHVhv
+#undef newIO
+#define newIO CPerlObj::Perl_newIO
+#undef newLISTOP
+#define newLISTOP CPerlObj::Perl_newLISTOP
+#undef newPMOP
+#define newPMOP CPerlObj::Perl_newPMOP
+#undef newPVOP
+#define newPVOP CPerlObj::Perl_newPVOP
+#undef newRV
+#define newRV CPerlObj::Perl_newRV
+#undef Perl_newRV_noinc
+#define Perl_newRV_noinc CPerlObj::Perl_newRV_noinc
+#undef newSV
+#define newSV CPerlObj::Perl_newSV
+#undef newSVREF
+#define newSVREF CPerlObj::Perl_newSVREF
+#undef newSVOP
+#define newSVOP CPerlObj::Perl_newSVOP
+#undef newSViv
+#define newSViv CPerlObj::Perl_newSViv
+#undef newSVnv
+#define newSVnv CPerlObj::Perl_newSVnv
+#undef newSVpv
+#define newSVpv CPerlObj::Perl_newSVpv
+#undef newSVpvf
+#define newSVpvf CPerlObj::Perl_newSVpvf
+#undef newSVpvn
+#define newSVpvn CPerlObj::Perl_newSVpvn
+#undef newSVrv
+#define newSVrv CPerlObj::Perl_newSVrv
+#undef newSVsv
+#define newSVsv CPerlObj::Perl_newSVsv
+#undef newUNOP
+#define newUNOP CPerlObj::Perl_newUNOP
+#undef newWHILEOP
+#define newWHILEOP CPerlObj::Perl_newWHILEOP
+#undef new_constant
+#define new_constant CPerlObj::new_constant
+#undef new_logop
+#define new_logop CPerlObj::new_logop
+#undef new_stackinfo
+#define new_stackinfo CPerlObj::Perl_new_stackinfo
+#undef new_sv
+#define new_sv CPerlObj::new_sv
+#undef new_xiv
+#define new_xiv CPerlObj::new_xiv
+#undef new_xnv
+#define new_xnv CPerlObj::new_xnv
+#undef new_xpv
+#define new_xpv CPerlObj::new_xpv
+#undef new_xrv
+#define new_xrv CPerlObj::new_xrv
+#undef nextargv
+#define nextargv CPerlObj::Perl_nextargv
+#undef nextchar
+#define nextchar CPerlObj::nextchar
+#undef ninstr
+#define ninstr CPerlObj::Perl_ninstr
+#undef not_a_number
+#define not_a_number CPerlObj::not_a_number
+#undef no_fh_allowed
+#define no_fh_allowed CPerlObj::Perl_no_fh_allowed
+#undef no_op
+#define no_op CPerlObj::Perl_no_op
+#undef null
+#define null CPerlObj::null
+#undef profiledata
+#define profiledata CPerlObj::Perl_profiledata
+#undef package
+#define package CPerlObj::Perl_package
+#undef pad_alloc
+#define pad_alloc CPerlObj::Perl_pad_alloc
+#undef pad_allocmy
+#define pad_allocmy CPerlObj::Perl_pad_allocmy
+#undef pad_findmy
+#define pad_findmy CPerlObj::Perl_pad_findmy
+#undef op_const_sv
+#define op_const_sv CPerlObj::Perl_op_const_sv
+#undef op_free
+#define op_free CPerlObj::Perl_op_free
+#undef oopsCV
+#define oopsCV CPerlObj::Perl_oopsCV
+#undef oopsAV
+#define oopsAV CPerlObj::Perl_oopsAV
+#undef oopsHV
+#define oopsHV CPerlObj::Perl_oopsHV
+#undef open_script
+#define open_script CPerlObj::open_script
+#undef pad_leavemy
+#define pad_leavemy CPerlObj::Perl_pad_leavemy
+#undef pad_sv
+#define pad_sv CPerlObj::Perl_pad_sv
+#undef pad_findlex
+#define pad_findlex CPerlObj::pad_findlex
+#undef pad_free
+#define pad_free CPerlObj::Perl_pad_free
+#undef pad_reset
+#define pad_reset CPerlObj::Perl_pad_reset
+#undef pad_swipe
+#define pad_swipe CPerlObj::Perl_pad_swipe
+#undef peep
+#define peep CPerlObj::Perl_peep
+#undef perl_call_argv
+#define perl_call_argv CPerlObj::perl_call_argv
+#undef perl_call_method
+#define perl_call_method CPerlObj::perl_call_method
+#undef perl_call_pv
+#define perl_call_pv CPerlObj::perl_call_pv
+#undef perl_call_sv
+#define perl_call_sv CPerlObj::perl_call_sv
+#undef perl_callargv
+#define perl_callargv CPerlObj::perl_callargv
+#undef perl_callpv
+#define perl_callpv CPerlObj::perl_callpv
+#undef perl_callsv
+#define perl_callsv CPerlObj::perl_callsv
+#undef perl_eval_pv
+#define perl_eval_pv CPerlObj::perl_eval_pv
+#undef perl_eval_sv
+#define perl_eval_sv CPerlObj::perl_eval_sv
+#undef perl_get_sv
+#define perl_get_sv CPerlObj::perl_get_sv
+#undef perl_get_av
+#define perl_get_av CPerlObj::perl_get_av
+#undef perl_get_hv
+#define perl_get_hv CPerlObj::perl_get_hv
+#undef perl_get_cv
+#define perl_get_cv CPerlObj::perl_get_cv
+#undef Perl_GetVars
+#define Perl_GetVars CPerlObj::Perl_GetVars
+#undef perl_init_fold
+#define perl_init_fold CPerlObj::perl_init_fold
+#undef perl_init_i18nl10n
+#define perl_init_i18nl10n CPerlObj::perl_init_i18nl10n
+#undef perl_init_i18nl14n
+#define perl_init_i18nl14n CPerlObj::perl_init_i18nl14n
+#undef perl_new_collate
+#define perl_new_collate CPerlObj::perl_new_collate
+#undef perl_new_ctype
+#define perl_new_ctype CPerlObj::perl_new_ctype
+#undef perl_new_numeric
+#define perl_new_numeric CPerlObj::perl_new_numeric
+#undef perl_set_numeric_standard
+#define perl_set_numeric_standard CPerlObj::perl_set_numeric_standard
+#undef perl_set_numeric_local
+#define perl_set_numeric_local CPerlObj::perl_set_numeric_local
+#undef perl_require_pv
+#define perl_require_pv CPerlObj::perl_require_pv
+#undef perl_thread
+#define perl_thread CPerlObj::perl_thread
+#undef pidgone
+#define pidgone CPerlObj::Perl_pidgone
+#undef pmflag
+#define pmflag CPerlObj::Perl_pmflag
+#undef pmruntime
+#define pmruntime CPerlObj::Perl_pmruntime
+#undef pmtrans
+#define pmtrans CPerlObj::Perl_pmtrans
+#undef pop_return
+#define pop_return CPerlObj::Perl_pop_return
+#undef pop_scope
+#define pop_scope CPerlObj::Perl_pop_scope
+#undef prepend_elem
+#define prepend_elem CPerlObj::Perl_prepend_elem
+#undef provide_ref
+#define provide_ref CPerlObj::Perl_provide_ref
+#undef push_return
+#define push_return CPerlObj::Perl_push_return
+#undef push_scope
+#define push_scope CPerlObj::Perl_push_scope
+#undef pregcomp
+#define pregcomp CPerlObj::Perl_pregcomp
+#undef qsortsv
+#define qsortsv CPerlObj::qsortsv
+#undef ref
+#define ref CPerlObj::Perl_ref
+#undef refkids
+#define refkids CPerlObj::Perl_refkids
+#undef regdump
+#define regdump CPerlObj::Perl_regdump
+#undef rsignal
+#define rsignal CPerlObj::Perl_rsignal
+#undef rsignal_restore
+#define rsignal_restore CPerlObj::Perl_rsignal_restore
+#undef rsignal_save
+#define rsignal_save CPerlObj::Perl_rsignal_save
+#undef rsignal_state
+#define rsignal_state CPerlObj::Perl_rsignal_state
+#undef pregexec
+#define pregexec CPerlObj::Perl_pregexec
+#undef pregfree
+#define pregfree CPerlObj::Perl_pregfree
+#undef re_croak2
+#define re_croak2 CPerlObj::re_croak2
+#undef refto
+#define refto CPerlObj::refto
+#undef reg
+#define reg CPerlObj::reg
+#undef reg_node
+#define reg_node CPerlObj::reg_node
+#undef reganode
+#define reganode CPerlObj::reganode
+#undef regatom
+#define regatom CPerlObj::regatom
+#undef regbranch
+#define regbranch CPerlObj::regbranch
+#undef regc
+#define regc CPerlObj::regc
+#undef regcurly
+#define regcurly CPerlObj::regcurly
+#undef regcppush
+#define regcppush CPerlObj::regcppush
+#undef regcppop
+#define regcppop CPerlObj::regcppop
+#undef regclass
+#define regclass CPerlObj::regclass
+#undef regexec_flags
+#define regexec_flags CPerlObj::Perl_regexec_flags
+#undef reginclass
+#define reginclass CPerlObj::reginclass
+#undef reginsert
+#define reginsert CPerlObj::reginsert
+#undef regmatch
+#define regmatch CPerlObj::regmatch
+#undef regnext
+#define regnext CPerlObj::Perl_regnext
+#undef regoptail
+#define regoptail CPerlObj::regoptail
+#undef regpiece
+#define regpiece CPerlObj::regpiece
+#undef regprop
+#define regprop CPerlObj::Perl_regprop
+#undef regrepeat
+#define regrepeat CPerlObj::regrepeat
+#undef regrepeat_hard
+#define regrepeat_hard CPerlObj::regrepeat_hard
+#undef regset
+#define regset CPerlObj::regset
+#undef regtail
+#define regtail CPerlObj::regtail
+#undef regtry
+#define regtry CPerlObj::regtry
+#undef regwhite
+#define regwhite CPerlObj::regwhite
+#undef repeatcpy
+#define repeatcpy CPerlObj::Perl_repeatcpy
+#undef restore_expect
+#define restore_expect CPerlObj::restore_expect
+#undef restore_lex_expect
+#define restore_lex_expect CPerlObj::restore_lex_expect
+#undef restore_magic
+#define restore_magic CPerlObj::restore_magic
+#undef restore_rsfp
+#define restore_rsfp CPerlObj::restore_rsfp
+#undef rninstr
+#define rninstr CPerlObj::Perl_rninstr
+#undef runops_standard
+#define runops_standard CPerlObj::Perl_runops_standard
+#undef runops_debug
+#define runops_debug CPerlObj::Perl_runops_debug
+#undef rxres_free
+#define rxres_free CPerlObj::Perl_rxres_free
+#undef rxres_restore
+#define rxres_restore CPerlObj::Perl_rxres_restore
+#undef rxres_save
+#define rxres_save CPerlObj::Perl_rxres_save
+#ifndef MYMALLOC
+#undef safefree
+#define safefree CPerlObj::Perl_safefree
+#undef safecalloc
+#define safecalloc CPerlObj::Perl_safecalloc
+#undef safemalloc
+#define safemalloc CPerlObj::Perl_safemalloc
+#undef saferealloc
+#define saferealloc CPerlObj::Perl_saferealloc
+#endif /* MYMALLOC */
+#undef same_dirent
+#define same_dirent CPerlObj::same_dirent
+#undef savepv
+#define savepv CPerlObj::Perl_savepv
+#undef savepvn
+#define savepvn CPerlObj::Perl_savepvn
+#undef savestack_grow
+#define savestack_grow CPerlObj::Perl_savestack_grow
+#undef save_aelem
+#define save_aelem CPerlObj::Perl_save_aelem
+#undef save_aptr
+#define save_aptr CPerlObj::Perl_save_aptr
+#undef save_ary
+#define save_ary CPerlObj::Perl_save_ary
+#undef save_clearsv
+#define save_clearsv CPerlObj::Perl_save_clearsv
+#undef save_delete
+#define save_delete CPerlObj::Perl_save_delete
+#undef save_destructor
+#define save_destructor CPerlObj::Perl_save_destructor
+#undef save_freesv
+#define save_freesv CPerlObj::Perl_save_freesv
+#undef save_freeop
+#define save_freeop CPerlObj::Perl_save_freeop
+#undef save_freepv
+#define save_freepv CPerlObj::Perl_save_freepv
+#undef save_generic_svref
+#define save_generic_svref CPerlObj::Perl_save_generic_svref
+#undef save_gp
+#define save_gp CPerlObj::Perl_save_gp
+#undef save_hash
+#define save_hash CPerlObj::Perl_save_hash
+#undef save_hek
+#define save_hek CPerlObj::save_hek
+#undef save_helem
+#define save_helem CPerlObj::Perl_save_helem
+#undef save_hints
+#define save_hints CPerlObj::Perl_save_hints
+#undef save_hptr
+#define save_hptr CPerlObj::Perl_save_hptr
+#undef save_I16
+#define save_I16 CPerlObj::Perl_save_I16
+#undef save_I32
+#define save_I32 CPerlObj::Perl_save_I32
+#undef save_int
+#define save_int CPerlObj::Perl_save_int
+#undef save_item
+#define save_item CPerlObj::Perl_save_item
+#undef save_iv
+#define save_iv CPerlObj::Perl_save_iv
+#undef save_lines
+#define save_lines CPerlObj::save_lines
+#undef save_list
+#define save_list CPerlObj::Perl_save_list
+#undef save_long
+#define save_long CPerlObj::Perl_save_long
+#undef save_magic
+#define save_magic CPerlObj::save_magic
+#undef save_nogv
+#define save_nogv CPerlObj::Perl_save_nogv
+#undef save_op
+#define save_op CPerlObj::Perl_save_op
+#undef save_scalar
+#define save_scalar CPerlObj::Perl_save_scalar
+#undef save_scalar_at
+#define save_scalar_at CPerlObj::save_scalar_at
+#undef save_pptr
+#define save_pptr CPerlObj::Perl_save_pptr
+#undef save_sptr
+#define save_sptr CPerlObj::Perl_save_sptr
+#undef save_svref
+#define save_svref CPerlObj::Perl_save_svref
+#undef save_threadsv
+#define save_threadsv CPerlObj::Perl_save_threadsv
+#undef sawparens
+#define sawparens CPerlObj::Perl_sawparens
+#undef scalar
+#define scalar CPerlObj::Perl_scalar
+#undef scalarboolean
+#define scalarboolean CPerlObj::scalarboolean
+#undef scalarkids
+#define scalarkids CPerlObj::Perl_scalarkids
+#undef scalarseq
+#define scalarseq CPerlObj::Perl_scalarseq
+#undef scalarvoid
+#define scalarvoid CPerlObj::Perl_scalarvoid
+#undef scan_commit
+#define scan_commit CPerlObj::scan_commit
+#undef scan_const
+#define scan_const CPerlObj::Perl_scan_const
+#undef scan_formline
+#define scan_formline CPerlObj::Perl_scan_formline
+#undef scan_ident
+#define scan_ident CPerlObj::Perl_scan_ident
+#undef scan_inputsymbol
+#define scan_inputsymbol CPerlObj::Perl_scan_inputsymbol
+#undef scan_heredoc
+#define scan_heredoc CPerlObj::Perl_scan_heredoc
+#undef scan_hex
+#define scan_hex CPerlObj::Perl_scan_hex
+#undef scan_num
+#define scan_num CPerlObj::Perl_scan_num
+#undef scan_oct
+#define scan_oct CPerlObj::Perl_scan_oct
+#undef scan_pat
+#define scan_pat CPerlObj::Perl_scan_pat
+#undef scan_str
+#define scan_str CPerlObj::Perl_scan_str
+#undef scan_subst
+#define scan_subst CPerlObj::Perl_scan_subst
+#undef scan_trans
+#define scan_trans CPerlObj::Perl_scan_trans
+#undef scan_word
+#define scan_word CPerlObj::Perl_scan_word
+#undef scope
+#define scope CPerlObj::Perl_scope
+#undef screaminstr
+#define screaminstr CPerlObj::Perl_screaminstr
+#undef seed
+#define seed CPerlObj::seed
+#undef setdefout
+#define setdefout CPerlObj::Perl_setdefout
+#undef setenv_getix
+#define setenv_getix CPerlObj::Perl_setenv_getix
+#undef sharepvn
+#define sharepvn CPerlObj::Perl_sharepvn
+#undef set_csh
+#define set_csh CPerlObj::set_csh
+#undef sighandler
+#define sighandler CPerlObj::Perl_sighandler
+#undef share_hek
+#define share_hek CPerlObj::Perl_share_hek
+#undef skipspace
+#define skipspace CPerlObj::Perl_skipspace
+#undef sortcv
+#define sortcv CPerlObj::sortcv
+#ifndef PERL_OBJECT
+#undef stack_base
+#define stack_base CPerlObj::Perl_stack_base
+#endif
+#undef stack_grow
+#define stack_grow CPerlObj::Perl_stack_grow
+#undef start_subparse
+#define start_subparse CPerlObj::Perl_start_subparse
+#undef study_chunk
+#define study_chunk CPerlObj::study_chunk
+#undef sub_crush_depth
+#define sub_crush_depth CPerlObj::Perl_sub_crush_depth
+#undef sublex_done
+#define sublex_done CPerlObj::sublex_done
+#undef sublex_push
+#define sublex_push CPerlObj::sublex_push
+#undef sublex_start
+#define sublex_start CPerlObj::sublex_start
+#undef sv_2bool
+#define sv_2bool CPerlObj::Perl_sv_2bool
+#undef sv_2cv
+#define sv_2cv CPerlObj::Perl_sv_2cv
+#undef sv_2io
+#define sv_2io CPerlObj::Perl_sv_2io
+#undef sv_2iv
+#define sv_2iv CPerlObj::Perl_sv_2iv
+#undef sv_2uv
+#define sv_2uv CPerlObj::Perl_sv_2uv
+#undef sv_2mortal
+#define sv_2mortal CPerlObj::Perl_sv_2mortal
+#undef sv_2nv
+#define sv_2nv CPerlObj::Perl_sv_2nv
+#undef sv_2pv
+#define sv_2pv CPerlObj::Perl_sv_2pv
+#undef sv_add_arena
+#define sv_add_arena CPerlObj::Perl_sv_add_arena
+#undef sv_backoff
+#define sv_backoff CPerlObj::Perl_sv_backoff
+#undef sv_bless
+#define sv_bless CPerlObj::Perl_sv_bless
+#undef sv_catpv
+#define sv_catpv CPerlObj::Perl_sv_catpv
+#undef sv_catpv_mg
+#define sv_catpv_mg CPerlObj::Perl_sv_catpv_mg
+#undef sv_catpvf
+#define sv_catpvf CPerlObj::Perl_sv_catpvf
+#undef sv_catpvf_mg
+#define sv_catpvf_mg CPerlObj::Perl_sv_catpvf_mg
+#undef sv_catpvn
+#define sv_catpvn CPerlObj::Perl_sv_catpvn
+#undef sv_catpvn_mg
+#define sv_catpvn_mg CPerlObj::Perl_sv_catpvn_mg
+#undef sv_catsv
+#define sv_catsv CPerlObj::Perl_sv_catsv
+#undef sv_catsv_mg
+#define sv_catsv_mg CPerlObj::Perl_sv_catsv_mg
+#undef sv_check_thinkfirst
+#define sv_check_thinkfirst CPerlObj::sv_check_thinkfirst
+#undef sv_chop
+#define sv_chop CPerlObj::Perl_sv_chop
+#undef sv_clean_all
+#define sv_clean_all CPerlObj::Perl_sv_clean_all
+#undef sv_clean_objs
+#define sv_clean_objs CPerlObj::Perl_sv_clean_objs
+#undef sv_clear
+#define sv_clear CPerlObj::Perl_sv_clear
+#undef sv_cmp
+#define sv_cmp CPerlObj::Perl_sv_cmp
+#undef sv_cmp_locale
+#define sv_cmp_locale CPerlObj::Perl_sv_cmp_locale
+#undef sv_collxfrm
+#define sv_collxfrm CPerlObj::Perl_sv_collxfrm
+#undef sv_compile_2op
+#define sv_compile_2op CPerlObj::Perl_sv_compile_2op
+#undef sv_dec
+#define sv_dec CPerlObj::Perl_sv_dec
+#undef sv_derived_from
+#define sv_derived_from CPerlObj::Perl_sv_derived_from
+#undef sv_dump
+#define sv_dump CPerlObj::Perl_sv_dump
+#undef sv_eq
+#define sv_eq CPerlObj::Perl_sv_eq
+#undef sv_free
+#define sv_free CPerlObj::Perl_sv_free
+#undef sv_free_arenas
+#define sv_free_arenas CPerlObj::Perl_sv_free_arenas
+#undef sv_gets
+#define sv_gets CPerlObj::Perl_sv_gets
+#undef sv_grow
+#define sv_grow CPerlObj::Perl_sv_grow
+#undef sv_inc
+#define sv_inc CPerlObj::Perl_sv_inc
+#undef sv_insert
+#define sv_insert CPerlObj::Perl_sv_insert
+#undef sv_isa
+#define sv_isa CPerlObj::Perl_sv_isa
+#undef sv_isobject
+#define sv_isobject CPerlObj::Perl_sv_isobject
+#undef sv_iv
+#define sv_iv CPerlObj::Perl_sv_iv
+#undef sv_len
+#define sv_len CPerlObj::Perl_sv_len
+#undef sv_magic
+#define sv_magic CPerlObj::Perl_sv_magic
+#undef sv_mortalcopy
+#define sv_mortalcopy CPerlObj::Perl_sv_mortalcopy
+#undef sv_mortalgrow
+#define sv_mortalgrow CPerlObj::sv_mortalgrow
+#undef sv_newmortal
+#define sv_newmortal CPerlObj::Perl_sv_newmortal
+#undef sv_newref
+#define sv_newref CPerlObj::Perl_sv_newref
+#undef sv_nv
+#define sv_nv CPerlObj::Perl_sv_nv
+#undef sv_peek
+#define sv_peek CPerlObj::Perl_sv_peek
+#undef sv_pvn
+#define sv_pvn CPerlObj::Perl_sv_pvn
+#undef sv_pvn_force
+#define sv_pvn_force CPerlObj::Perl_sv_pvn_force
+#undef sv_reftype
+#define sv_reftype CPerlObj::Perl_sv_reftype
+#undef sv_replace
+#define sv_replace CPerlObj::Perl_sv_replace
+#undef sv_report_used
+#define sv_report_used CPerlObj::Perl_sv_report_used
+#undef sv_reset
+#define sv_reset CPerlObj::Perl_sv_reset
+#undef sv_setiv
+#define sv_setiv CPerlObj::Perl_sv_setiv
+#undef sv_setiv_mg
+#define sv_setiv_mg CPerlObj::Perl_sv_setiv_mg
+#undef sv_setnv
+#define sv_setnv CPerlObj::Perl_sv_setnv
+#undef sv_setnv_mg
+#define sv_setnv_mg CPerlObj::Perl_sv_setnv_mg
+#undef sv_setuv
+#define sv_setuv CPerlObj::Perl_sv_setuv
+#undef sv_setuv_mg
+#define sv_setuv_mg CPerlObj::Perl_sv_setuv_mg
+#undef sv_setref_iv
+#define sv_setref_iv CPerlObj::Perl_sv_setref_iv
+#undef sv_setref_nv
+#define sv_setref_nv CPerlObj::Perl_sv_setref_nv
+#undef sv_setref_pv
+#define sv_setref_pv CPerlObj::Perl_sv_setref_pv
+#undef sv_setref_pvn
+#define sv_setref_pvn CPerlObj::Perl_sv_setref_pvn
+#undef sv_setpv
+#define sv_setpv CPerlObj::Perl_sv_setpv
+#undef sv_setpv_mg
+#define sv_setpv_mg CPerlObj::Perl_sv_setpv_mg
+#undef sv_setpvf
+#define sv_setpvf CPerlObj::Perl_sv_setpvf
+#undef sv_setpvf_mg
+#define sv_setpvf_mg CPerlObj::Perl_sv_setpvf_mg
+#undef sv_setpviv
+#define sv_setpviv CPerlObj::Perl_sv_setpviv
+#undef sv_setpviv_mg
+#define sv_setpviv_mg CPerlObj::Perl_sv_setpviv_mg
+#undef sv_setpvn
+#define sv_setpvn CPerlObj::Perl_sv_setpvn
+#undef sv_setpvn_mg
+#define sv_setpvn_mg CPerlObj::Perl_sv_setpvn_mg
+#undef sv_setsv
+#define sv_setsv CPerlObj::Perl_sv_setsv
+#undef sv_setsv_mg
+#define sv_setsv_mg CPerlObj::Perl_sv_setsv_mg
+#undef sv_taint
+#define sv_taint CPerlObj::Perl_sv_taint
+#undef sv_tainted
+#define sv_tainted CPerlObj::Perl_sv_tainted
+#undef sv_true
+#define sv_true CPerlObj::Perl_sv_true
+#undef sv_unglob
+#define sv_unglob CPerlObj::sv_unglob
+#undef sv_unmagic
+#define sv_unmagic CPerlObj::Perl_sv_unmagic
+#undef sv_unref
+#define sv_unref CPerlObj::Perl_sv_unref
+#undef sv_untaint
+#define sv_untaint CPerlObj::Perl_sv_untaint
+#undef sv_upgrade
+#define sv_upgrade CPerlObj::Perl_sv_upgrade
+#undef sv_usepvn
+#define sv_usepvn CPerlObj::Perl_sv_usepvn
+#undef sv_usepvn_mg
+#define sv_usepvn_mg CPerlObj::Perl_sv_usepvn_mg
+#undef sv_uv
+#define sv_uv CPerlObj::Perl_sv_uv
+#undef sv_vcatpvfn
+#define sv_vcatpvfn CPerlObj::Perl_sv_vcatpvfn
+#undef sv_vsetpvfn
+#define sv_vsetpvfn CPerlObj::Perl_sv_vsetpvfn
+#undef taint_env
+#define taint_env CPerlObj::Perl_taint_env
+#undef taint_not
+#define taint_not CPerlObj::Perl_taint_not
+#undef taint_proper
+#define taint_proper CPerlObj::Perl_taint_proper
+#undef tokeq
+#define tokeq CPerlObj::tokeq
+#undef too_few_arguments
+#define too_few_arguments CPerlObj::Perl_too_few_arguments
+#undef too_many_arguments
+#define too_many_arguments CPerlObj::Perl_too_many_arguments
+#undef unlnk
+#define unlnk CPerlObj::unlnk
+#undef unsharepvn
+#define unsharepvn CPerlObj::Perl_unsharepvn
+#undef unshare_hek
+#define unshare_hek CPerlObj::Perl_unshare_hek
+#undef unwind_handler_stack
+#define unwind_handler_stack CPerlObj::unwind_handler_stack
+#undef usage
+#define usage CPerlObj::usage
+#undef utilize
+#define utilize CPerlObj::Perl_utilize
+#undef validate_suid
+#define validate_suid CPerlObj::validate_suid
+#undef visit
+#define visit CPerlObj::visit
+#undef vivify_defelem
+#define vivify_defelem CPerlObj::Perl_vivify_defelem
+#undef vivify_ref
+#define vivify_ref CPerlObj::Perl_vivify_ref
+#undef wait4pid
+#define wait4pid CPerlObj::Perl_wait4pid
+#undef warn
+#define warn CPerlObj::Perl_warn
+#undef watch
+#define watch CPerlObj::Perl_watch
+#undef whichsig
+#define whichsig CPerlObj::Perl_whichsig
+#undef win32_textfilter
+#define win32_textfilter CPerlObj::win32_textfilter
+#undef yyerror
+#define yyerror CPerlObj::Perl_yyerror
+#undef yylex
+#define yylex CPerlObj::Perl_yylex
+#undef yyparse
+#define yyparse CPerlObj::Perl_yyparse
+#undef yywarn
+#define yywarn CPerlObj::Perl_yywarn
+#undef yydestruct
+#define yydestruct CPerlObj::Perl_yydestruct
+
+#define new_he CPerlObj::new_he
+#define more_he CPerlObj::more_he
+#define del_he CPerlObj::del_he
+
+#if defined(WIN32) && !defined(WIN32IO_IS_STDIO)
+#undef errno
+#define errno CPerlObj::ErrorNo()
+
+#endif /* WIN32 */
+
+#endif /* __Objpp_h__ */
diff --git a/gnu/usr.bin/perl/os2/os2.sym b/gnu/usr.bin/perl/os2/os2.sym
new file mode 100644
index 00000000000..4bd97c93e2b
--- /dev/null
+++ b/gnu/usr.bin/perl/os2/os2.sym
@@ -0,0 +1,30 @@
+ctermid
+get_sysinfo
+Perl_OS2_init
+OS2_Perl_data
+dlopen
+dlsym
+dlerror
+my_tmpfile
+my_tmpnam
+my_flock
+malloc_mutex
+threads_mutex
+nthreads
+nthreads_cond
+os2_cond_wait
+pthread_join
+pthread_create
+pthread_detach
+XS_Cwd_change_drive
+XS_Cwd_current_drive
+XS_Cwd_extLibpath
+XS_Cwd_extLibpath_set
+XS_Cwd_sys_abspath
+XS_Cwd_sys_chdir
+XS_Cwd_sys_cwd
+XS_Cwd_sys_is_absolute
+XS_Cwd_sys_is_relative
+XS_Cwd_sys_is_rooted
+XS_DynaLoader_mod2fname
+XS_File__Copy_syscopy
diff --git a/gnu/usr.bin/perl/os2/os2thread.h b/gnu/usr.bin/perl/os2/os2thread.h
new file mode 100644
index 00000000000..d56fe160ddf
--- /dev/null
+++ b/gnu/usr.bin/perl/os2/os2thread.h
@@ -0,0 +1,16 @@
+#include <sys/builtin.h>
+#include <sys/fmutex.h>
+#include <sys/rmutex.h>
+typedef int perl_os_thread;
+
+typedef _rmutex perl_mutex;
+
+/*typedef HEV perl_cond;*/ /* Will include os2.h into all C files. */
+typedef unsigned long perl_cond;
+
+typedef int perl_key;
+
+typedef unsigned long pthread_attr_t;
+#define PTHREADS_INCLUDED
+#define pthread_attr_init(arg) 0
+#define pthread_attr_setdetachstate(arg1,arg2) 0
diff --git a/gnu/usr.bin/perl/perlvars.h b/gnu/usr.bin/perl/perlvars.h
new file mode 100644
index 00000000000..ffb3fe60e4f
--- /dev/null
+++ b/gnu/usr.bin/perl/perlvars.h
@@ -0,0 +1,183 @@
+/****************/
+/* Truly global */
+/****************/
+
+/* Don't forget to re-run embed.pl to propagate changes! */
+
+/* This file describes the "global" variables used by perl
+ * This used to be in perl.h directly but we want to abstract out into
+ * distinct files which are per-thread, per-interpreter or really global,
+ * and how they're initialized.
+ *
+ * The 'G' prefix is only needed for vars that need appropriate #defines
+ * generated when built with or without EMBED. It is also used to generate
+ * the appropriate export list for win32.
+ *
+ * Avoid build-specific #ifdefs here, like DEBUGGING. That way,
+ * we can keep binary compatibility of the curinterp structure */
+
+
+/* global state */
+PERLVAR(Gcurinterp, PerlInterpreter *)
+ /* currently running interpreter */
+#ifdef USE_THREADS
+PERLVAR(Gthr_key, perl_key) /* For per-thread struct perl_thread* */
+PERLVAR(Gsv_mutex, perl_mutex) /* Mutex for allocating SVs in sv.c */
+PERLVAR(Gmalloc_mutex, perl_mutex) /* Mutex for malloc */
+PERLVAR(Geval_mutex, perl_mutex) /* Mutex for doeval */
+PERLVAR(Geval_cond, perl_cond) /* Condition variable for doeval */
+PERLVAR(Geval_owner, struct perl_thread *)
+ /* Owner thread for doeval */
+PERLVAR(Gnthreads, int) /* Number of threads currently */
+PERLVAR(Gthreads_mutex, perl_mutex) /* Mutex for nthreads and thread list */
+PERLVAR(Gnthreads_cond, perl_cond) /* Condition variable for nthreads */
+PERLVAR(Gsvref_mutex, perl_mutex) /* Mutex for SvREFCNT_{inc,dec} */
+PERLVARI(Gthreadsv_names,char *, THREADSV_NAMES)
+#ifdef FAKE_THREADS
+PERLVAR(Gcurthr, struct perl_thread *)
+ /* Currently executing (fake) thread */
+#endif
+#endif /* USE_THREADS */
+
+PERLVAR(Gninterps, int) /* number of active interpreters */
+
+PERLVAR(Guid, int) /* current real user id */
+PERLVAR(Geuid, int) /* current effective user id */
+PERLVAR(Ggid, int) /* current real group id */
+PERLVAR(Gegid, int) /* current effective group id */
+PERLVAR(Gnomemok, bool) /* let malloc context handle nomem */
+PERLVAR(Gan, U32) /* malloc sequence number */
+PERLVAR(Gcop_seqmax, U32) /* statement sequence number */
+PERLVAR(Gop_seqmax, U16) /* op sequence number */
+PERLVAR(Gevalseq, U32) /* eval sequence number */
+PERLVAR(Gorigenviron, char **)
+PERLVAR(Gorigalen, U32)
+PERLVAR(Gpidstatus, HV *) /* pid-to-status mappings for waitpid */
+PERLVARI(Gmaxo, int, MAXO) /* maximum number of ops */
+PERLVAR(Gosname, char *) /* operating system */
+PERLVARI(Gsh_path, char *, SH_PATH)/* full path of shell */
+PERLVAR(Gsighandlerp, Sighandler_t)
+
+PERLVAR(Gxiv_arenaroot, XPV*) /* list of allocated xiv areas */
+PERLVAR(Gxiv_root, IV *) /* free xiv list--shared by interpreters */
+PERLVAR(Gxnv_root, double *) /* free xnv list--shared by interpreters */
+PERLVAR(Gxrv_root, XRV *) /* free xrv list--shared by interpreters */
+PERLVAR(Gxpv_root, XPV *) /* free xpv list--shared by interpreters */
+PERLVAR(Ghe_root, HE *) /* free he list--shared by interpreters */
+PERLVAR(Gnice_chunk, char *) /* a nice chunk of memory to reuse */
+PERLVAR(Gnice_chunk_size, U32) /* how nice the chunk of memory is */
+
+#ifdef PERL_OBJECT
+PERLVARI(Grunops, runops_proc_t, FUNC_NAME_TO_PTR(RUNOPS_DEFAULT))
+#else
+PERLVARI(Grunops, runops_proc_t *, RUNOPS_DEFAULT)
+#endif
+
+PERLVAR(Gtokenbuf[256], char)
+PERLVAR(Gna, STRLEN) /* for use in SvPV when length is
+ Not Applicable */
+
+PERLVAR(Gsv_undef, SV)
+PERLVAR(Gsv_no, SV)
+PERLVAR(Gsv_yes, SV)
+#ifdef CSH
+PERLVARI(Gcshname, char *, CSH)
+PERLVAR(Gcshlen, I32)
+#endif
+
+PERLVAR(Glex_state, U32) /* next token is determined */
+PERLVAR(Glex_defer, U32) /* state after determined token */
+PERLVAR(Glex_expect, expectation) /* expect after determined token */
+PERLVAR(Glex_brackets, I32) /* bracket count */
+PERLVAR(Glex_formbrack, I32) /* bracket count at outer format level */
+PERLVAR(Glex_fakebrack, I32) /* outer bracket is mere delimiter */
+PERLVAR(Glex_casemods, I32) /* casemod count */
+PERLVAR(Glex_dojoin, I32) /* doing an array interpolation */
+PERLVAR(Glex_starts, I32) /* how many interps done on level */
+PERLVAR(Glex_stuff, SV *) /* runtime pattern from m// or s/// */
+PERLVAR(Glex_repl, SV *) /* runtime replacement from s/// */
+PERLVAR(Glex_op, OP *) /* extra info to pass back on op */
+PERLVAR(Glex_inpat, OP *) /* in pattern $) and $| are special */
+PERLVAR(Glex_inwhat, I32) /* what kind of quoting are we in */
+PERLVAR(Glex_brackstack,char *) /* what kind of brackets to pop */
+PERLVAR(Glex_casestack, char *) /* what kind of case mods in effect */
+
+/* What we know when we're in LEX_KNOWNEXT state. */
+PERLVAR(Gnextval[5], YYSTYPE) /* value of next token, if any */
+PERLVAR(Gnexttype[5], I32) /* type of next token */
+PERLVAR(Gnexttoke, I32)
+
+PERLVAR(Glinestr, SV *)
+PERLVAR(Gbufptr, char *)
+PERLVAR(Goldbufptr, char *)
+PERLVAR(Goldoldbufptr, char *)
+PERLVAR(Gbufend, char *)
+PERLVARI(Gexpect,expectation, XSTATE) /* how to interpret ambiguous tokens */
+
+PERLVAR(Gmulti_start, I32) /* 1st line of multi-line string */
+PERLVAR(Gmulti_end, I32) /* last line of multi-line string */
+PERLVAR(Gmulti_open, I32) /* delimiter of said string */
+PERLVAR(Gmulti_close, I32) /* delimiter of said string */
+
+PERLVAR(Gerror_count, I32) /* how many errors so far, max 10 */
+PERLVAR(Gsubline, I32) /* line this subroutine began on */
+PERLVAR(Gsubname, SV *) /* name of current subroutine */
+
+PERLVAR(Gmin_intro_pending, I32) /* start of vars to introduce */
+PERLVAR(Gmax_intro_pending, I32) /* end of vars to introduce */
+PERLVAR(Gpadix, I32) /* max used index in current "register" pad */
+PERLVAR(Gpadix_floor, I32) /* how low may inner block reset padix */
+PERLVAR(Gpad_reset_pending, I32) /* reset pad on next attempted alloc */
+
+PERLVAR(Gthisexpr, I32) /* name id for nothing_in_common() */
+PERLVAR(Glast_uni, char *) /* position of last named-unary op */
+PERLVAR(Glast_lop, char *) /* position of last list operator */
+PERLVAR(Glast_lop_op, OPCODE) /* last list operator */
+PERLVAR(Gin_my, bool) /* we're compiling a "my" declaration */
+PERLVAR(Gin_my_stash, HV *) /* declared class of this "my" declaration */
+#ifdef FCRYPT
+PERLVAR(Gcryptseen, I32) /* has fast crypt() been initialized? */
+#endif
+
+PERLVAR(Ghints, U32) /* pragma-tic compile-time flags */
+
+PERLVAR(Gdo_undump, bool) /* -u or dump seen? */
+PERLVAR(Gdebug, VOL U32) /* flags given to -D switch */
+
+
+#ifdef OVERLOAD
+
+PERLVAR(Gamagic_generation, long)
+
+#endif
+
+#ifdef USE_LOCALE_COLLATE
+PERLVAR(Gcollation_ix, U32) /* Collation generation index */
+PERLVAR(Gcollation_name,char *) /* Name of current collation */
+PERLVARI(Gcollation_standard, bool, TRUE)
+ /* Assume simple collation */
+PERLVAR(Gcollxfrm_base, Size_t) /* Basic overhead in *xfrm() */
+PERLVARI(Gcollxfrm_mult,Size_t, 2) /* Expansion factor in *xfrm() */
+#endif /* USE_LOCALE_COLLATE */
+
+#ifdef USE_LOCALE_NUMERIC
+
+PERLVAR(Gnumeric_name, char *) /* Name of current numeric locale */
+PERLVARI(Gnumeric_standard, bool, TRUE)
+ /* Assume simple numerics */
+PERLVARI(Gnumeric_local, bool, TRUE)
+ /* Assume local numerics */
+
+#endif /* !USE_LOCALE_NUMERIC */
+
+/* constants (these are not literals to facilitate pointer comparisons) */
+PERLVARIC(GYes, char *, "1")
+PERLVARIC(GNo, char *, "")
+PERLVARIC(Ghexdigit, char *, "0123456789abcdef0123456789ABCDEF")
+PERLVARIC(Gpatleave, char *, "\\.^$@dDwWsSbB+*?|()-nrtfeaxc0123456789[{]}")
+
+PERLVAR(Gspecialsv_list[4],SV *) /* from byterun.h */
+
+#ifdef USE_THREADS
+PERLVAR(Gcred_mutex, perl_mutex) /* altered credentials in effect */
+#endif
diff --git a/gnu/usr.bin/perl/perly_c.diff b/gnu/usr.bin/perl/perly_c.diff
new file mode 100644
index 00000000000..5107901a576
--- /dev/null
+++ b/gnu/usr.bin/perl/perly_c.diff
@@ -0,0 +1,452 @@
+*** perly.c.old Wed Jan 06 20:03:41 1999
+--- perly.c Wed Jan 06 18:51:20 1999
+***************
+*** 7,86 ****
+ #include "perl.h"
+
+ static void
+ dep(void)
+ {
+ deprecate("\"do\" to call subroutines");
+ }
+
+ #line 30 "perly.y"
+- #ifndef OEMVS
+- #line 33 "perly.y"
+- typedef union {
+- I32 ival;
+- char *pval;
+- OP *opval;
+- GV *gvval;
+- } YYSTYPE;
+- #line 41 "perly.y"
+- #endif /* OEMVS */
+- #line 27 "y.tab.c"
+- #define WORD 257
+- #define METHOD 258
+- #define FUNCMETH 259
+- #define THING 260
+- #define PMFUNC 261
+- #define PRIVATEREF 262
+- #define FUNC0SUB 263
+- #define UNIOPSUB 264
+- #define LSTOPSUB 265
+- #define LABEL 266
+- #define FORMAT 267
+- #define SUB 268
+- #define ANONSUB 269
+- #define PACKAGE 270
+- #define USE 271
+- #define WHILE 272
+- #define UNTIL 273
+- #define IF 274
+- #define UNLESS 275
+- #define ELSE 276
+- #define ELSIF 277
+- #define CONTINUE 278
+- #define FOR 279
+- #define LOOPEX 280
+- #define DOTDOT 281
+- #define FUNC0 282
+- #define FUNC1 283
+- #define FUNC 284
+- #define UNIOP 285
+- #define LSTOP 286
+- #define RELOP 287
+- #define EQOP 288
+- #define MULOP 289
+- #define ADDOP 290
+- #define DOLSHARP 291
+- #define DO 292
+- #define HASHBRACK 293
+- #define NOAMP 294
+- #define LOCAL 295
+- #define MY 296
+- #define OROP 297
+- #define ANDOP 298
+- #define NOTOP 299
+- #define ASSIGNOP 300
+- #define OROR 301
+- #define ANDAND 302
+- #define BITOROP 303
+- #define BITANDOP 304
+- #define SHIFTOP 305
+- #define MATCHOP 306
+- #define UMINUS 307
+- #define REFGEN 308
+- #define POWOP 309
+- #define PREINC 310
+- #define PREDEC 311
+- #define POSTINC 312
+- #define POSTDEC 313
+- #define ARROW 314
+ #define YYERRCODE 256
+ short yylhs[] = { -1,
+--- 7,26 ----
+ #include "perl.h"
+
++ #ifdef PERL_OBJECT
+ static void
++ Dep(CPerlObj *pPerl)
++ {
++ pPerl->deprecate("\"do\" to call subroutines");
++ }
++ #define dep() Dep(this)
++ #else
++ static void
+ dep(void)
+ {
+ deprecate("\"do\" to call subroutines");
+ }
++ #endif
+
+ #line 30 "perly.y"
+ #define YYERRCODE 256
+ short yylhs[] = { -1,
+***************
+*** 1337,1340 ****
+--- 1277,1281 ----
+ #endif
+ #endif
++ #ifndef PERL_OBJECT
+ int yydebug;
+ int yynerrs;
+***************
+*** 1345,1365 ****
+ YYSTYPE yyval;
+ YYSTYPE yylval;
+! short yyss[YYSTACKSIZE];
+! YYSTYPE yyvs[YYSTACKSIZE];
+! #define yystacksize YYSTACKSIZE
+ #line 643 "perly.y"
+ /* PROGRAM */
+! #line 1353 "y.tab.c"
+ #define YYABORT goto yyabort
+ #define YYACCEPT goto yyaccept
+ #define YYERROR goto yyerrlab
+ int
+! yyparse()
+ {
+ register int yym, yyn, yystate;
+ #if YYDEBUG
+ register char *yys;
+ extern char *getenv();
+
+ if (yys = getenv("YYDEBUG"))
+ {
+--- 1286,1351 ----
+ YYSTYPE yyval;
+ YYSTYPE yylval;
+! #endif
+ #line 643 "perly.y"
+ /* PROGRAM */
+! #line 1353 "perly.c"
+ #define YYABORT goto yyabort
+ #define YYACCEPT goto yyaccept
+ #define YYERROR goto yyerrlab
++
++ struct ysv {
++ short* yyss;
++ YYSTYPE* yyvs;
++ int oldyydebug;
++ int oldyynerrs;
++ int oldyyerrflag;
++ int oldyychar;
++ YYSTYPE oldyyval;
++ YYSTYPE oldyylval;
++ };
++
++ void
++ yydestruct(void *ptr)
++ {
++ struct ysv* ysave = (struct ysv*)ptr;
++ if (ysave->yyss) Safefree(ysave->yyss);
++ if (ysave->yyvs) Safefree(ysave->yyvs);
++ yydebug = ysave->oldyydebug;
++ yynerrs = ysave->oldyynerrs;
++ yyerrflag = ysave->oldyyerrflag;
++ yychar = ysave->oldyychar;
++ yyval = ysave->oldyyval;
++ yylval = ysave->oldyylval;
++ Safefree(ysave);
++ }
++
+ int
+! yyparse(void)
+ {
+ register int yym, yyn, yystate;
++ register short *yyssp;
++ register YYSTYPE *yyvsp;
++ short* yyss;
++ YYSTYPE* yyvs;
++ unsigned yystacksize = YYSTACKSIZE;
++ int retval = 0;
+ #if YYDEBUG
+ register char *yys;
++ #ifndef __cplusplus
+ extern char *getenv();
++ #endif
++ #endif
++
++ struct ysv *ysave;
++ New(73, ysave, 1, struct ysv);
++ SAVEDESTRUCTOR(yydestruct, ysave);
++ ysave->oldyydebug = yydebug;
++ ysave->oldyynerrs = yynerrs;
++ ysave->oldyyerrflag = yyerrflag;
++ ysave->oldyychar = yychar;
++ ysave->oldyyval = yyval;
++ ysave->oldyylval = yylval;
+
++ #if YYDEBUG
+ if (yys = getenv("YYDEBUG"))
+ {
+***************
+*** 1374,1377 ****
+--- 1360,1373 ----
+ yychar = (-1);
+
++ /*
++ ** Initialize private stacks (yyparse may be called from an action)
++ */
++ New(73, yyss, yystacksize, short);
++ New(73, yyvs, yystacksize, YYSTYPE);
++ ysave->yyss = yyss;
++ ysave->yyvs = yyvs;
++ if (!yyvs || !yyss)
++ goto yyoverflow;
++
+ yyssp = yyss;
+ yyvsp = yyvs;
+***************
+*** 1389,1393 ****
+ if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
+ if (!yys) yys = "illegal-symbol";
+! printf("yydebug: state %d, reading %d (%s)\n", yystate,
+ yychar, yys);
+ }
+--- 1385,1389 ----
+ if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
+ if (!yys) yys = "illegal-symbol";
+! PerlIO_printf(Perl_debug_log, "yydebug: state %d, reading %d (%s)\n", yystate,
+ yychar, yys);
+ }
+***************
+*** 1399,1408 ****
+ #if YYDEBUG
+ if (yydebug)
+! printf("yydebug: state %d, shifting to state %d\n",
+ yystate, yytable[yyn]);
+ #endif
+ if (yyssp >= yyss + yystacksize - 1)
+ {
+! goto yyoverflow;
+ }
+ *++yyssp = yystate = yytable[yyn];
+--- 1395,1418 ----
+ #if YYDEBUG
+ if (yydebug)
+! PerlIO_printf(Perl_debug_log, "yydebug: state %d, shifting to state %d\n",
+ yystate, yytable[yyn]);
+ #endif
+ if (yyssp >= yyss + yystacksize - 1)
+ {
+! /*
+! ** reallocate and recover. Note that pointers
+! ** have to be reset, or bad things will happen
+! */
+! int yyps_index = (yyssp - yyss);
+! int yypv_index = (yyvsp - yyvs);
+! yystacksize += YYSTACKSIZE;
+! ysave->yyvs = yyvs =
+! (YYSTYPE*)PerlMem_realloc((char*)yyvs,yystacksize * sizeof(YYSTYPE));
+! ysave->yyss = yyss =
+! (short*)PerlMem_realloc((char*)yyss,yystacksize * sizeof(short));
+! if (!yyvs || !yyss)
+! goto yyoverflow;
+! yyssp = yyss + yyps_index;
+! yyvsp = yyvs + yypv_index;
+ }
+ *++yyssp = yystate = yytable[yyn];
+***************
+*** 1440,1449 ****
+ #if YYDEBUG
+ if (yydebug)
+! printf("yydebug: state %d, error recovery shifting\
+! to state %d\n", *yyssp, yytable[yyn]);
+ #endif
+ if (yyssp >= yyss + yystacksize - 1)
+ {
+! goto yyoverflow;
+ }
+ *++yyssp = yystate = yytable[yyn];
+--- 1450,1474 ----
+ #if YYDEBUG
+ if (yydebug)
+! PerlIO_printf(Perl_debug_log,
+! "yydebug: state %d, error recovery shifting to state %d\n",
+! *yyssp, yytable[yyn]);
+ #endif
+ if (yyssp >= yyss + yystacksize - 1)
+ {
+! /*
+! ** reallocate and recover. Note that pointers
+! ** have to be reset, or bad things will happen
+! */
+! int yyps_index = (yyssp - yyss);
+! int yypv_index = (yyvsp - yyvs);
+! yystacksize += YYSTACKSIZE;
+! ysave->yyvs = yyvs = (YYSTYPE*)PerlMem_realloc((char*)yyvs,
+! yystacksize * sizeof(YYSTYPE));
+! ysave->yyss = yyss = (short*)PerlMem_realloc((char*)yyss,
+! yystacksize * sizeof(short));
+! if (!yyvs || !yyss)
+! goto yyoverflow;
+! yyssp = yyss + yyps_index;
+! yyvsp = yyvs + yypv_index;
+ }
+ *++yyssp = yystate = yytable[yyn];
+***************
+*** 1455,1460 ****
+ #if YYDEBUG
+ if (yydebug)
+! printf("yydebug: error recovery discarding state %d\n",
+! *yyssp);
+ #endif
+ if (yyssp <= yyss) goto yyabort;
+--- 1480,1486 ----
+ #if YYDEBUG
+ if (yydebug)
+! PerlIO_printf(Perl_debug_log,
+! "yydebug: error recovery discarding state %d\n",
+! *yyssp);
+ #endif
+ if (yyssp <= yyss) goto yyabort;
+***************
+*** 1473,1478 ****
+ if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
+ if (!yys) yys = "illegal-symbol";
+! printf("yydebug: state %d, error recovery discards token %d (%s)\n",
+! yystate, yychar, yys);
+ }
+ #endif
+--- 1499,1505 ----
+ if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
+ if (!yys) yys = "illegal-symbol";
+! PerlIO_printf(Perl_debug_log,
+! "yydebug: state %d, error recovery discards token %d (%s)\n",
+! yystate, yychar, yys);
+ }
+ #endif
+***************
+*** 1483,1487 ****
+ #if YYDEBUG
+ if (yydebug)
+! printf("yydebug: state %d, reducing by rule %d (%s)\n",
+ yystate, yyn, yyrule[yyn]);
+ #endif
+--- 1510,1514 ----
+ #if YYDEBUG
+ if (yydebug)
+! PerlIO_printf(Perl_debug_log, "yydebug: state %d, reducing by rule %d (%s)\n",
+ yystate, yyn, yyrule[yyn]);
+ #endif
+***************
+*** 2267,2271 ****
+ { yyval.opval = yyvsp[0].opval; }
+ break;
+! #line 2270 "y.tab.c"
+ }
+ yyssp -= yym;
+--- 2294,2298 ----
+ { yyval.opval = yyvsp[0].opval; }
+ break;
+! #line 2270 "perly.c"
+ }
+ yyssp -= yym;
+***************
+*** 2277,2282 ****
+ #if YYDEBUG
+ if (yydebug)
+! printf("yydebug: after reduction, shifting from state 0 to\
+! state %d\n", YYFINAL);
+ #endif
+ yystate = YYFINAL;
+--- 2304,2310 ----
+ #if YYDEBUG
+ if (yydebug)
+! PerlIO_printf(Perl_debug_log,
+! "yydebug: after reduction, shifting from state 0 to state %d\n",
+! YYFINAL);
+ #endif
+ yystate = YYFINAL;
+***************
+*** 2292,2296 ****
+ if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
+ if (!yys) yys = "illegal-symbol";
+! printf("yydebug: state %d, reading %d (%s)\n",
+ YYFINAL, yychar, yys);
+ }
+--- 2320,2324 ----
+ if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
+ if (!yys) yys = "illegal-symbol";
+! PerlIO_printf(Perl_debug_log, "yydebug: state %d, reading %d (%s)\n",
+ YYFINAL, yychar, yys);
+ }
+***************
+*** 2307,2316 ****
+ #if YYDEBUG
+ if (yydebug)
+! printf("yydebug: after reduction, shifting from state %d \
+! to state %d\n", *yyssp, yystate);
+ #endif
+ if (yyssp >= yyss + yystacksize - 1)
+ {
+! goto yyoverflow;
+ }
+ *++yyssp = yystate;
+--- 2335,2359 ----
+ #if YYDEBUG
+ if (yydebug)
+! PerlIO_printf(Perl_debug_log,
+! "yydebug: after reduction, shifting from state %d to state %d\n",
+! *yyssp, yystate);
+ #endif
+ if (yyssp >= yyss + yystacksize - 1)
+ {
+! /*
+! ** reallocate and recover. Note that pointers
+! ** have to be reset, or bad things will happen
+! */
+! int yyps_index = (yyssp - yyss);
+! int yypv_index = (yyvsp - yyvs);
+! yystacksize += YYSTACKSIZE;
+! ysave->yyvs = yyvs =
+! (YYSTYPE*)PerlMem_realloc((char*)yyvs,yystacksize * sizeof(YYSTYPE));
+! ysave->yyss = yyss =
+! (short*)PerlMem_realloc((char*)yyss,yystacksize * sizeof(short));
+! if (!yyvs || !yyss)
+! goto yyoverflow;
+! yyssp = yyss + yyps_index;
+! yyvsp = yyvs + yypv_index;
+ }
+ *++yyssp = yystate;
+***************
+*** 2318,2325 ****
+ goto yyloop;
+ yyoverflow:
+! yyerror("yacc stack overflow");
+ yyabort:
+! return (1);
+ yyaccept:
+! return (0);
+ }
+--- 2361,2368 ----
+ goto yyloop;
+ yyoverflow:
+! yyerror("Out of memory for yacc stack");
+ yyabort:
+! retval = 1;
+ yyaccept:
+! return retval;
+ }
diff --git a/gnu/usr.bin/perl/pod/perl5004delta.pod b/gnu/usr.bin/perl/pod/perl5004delta.pod
new file mode 100644
index 00000000000..323830b4658
--- /dev/null
+++ b/gnu/usr.bin/perl/pod/perl5004delta.pod
@@ -0,0 +1,1609 @@
+=head1 NAME
+
+perldelta - what's new for perl5.004
+
+=head1 DESCRIPTION
+
+This document describes differences between the 5.003 release (as
+documented in I<Programming Perl>, second edition--the Camel Book) and
+this one.
+
+=head1 Supported Environments
+
+Perl5.004 builds out of the box on Unix, Plan 9, LynxOS, VMS, OS/2,
+QNX, AmigaOS, and Windows NT. Perl runs on Windows 95 as well, but it
+cannot be built there, for lack of a reasonable command interpreter.
+
+=head1 Core Changes
+
+Most importantly, many bugs were fixed, including several security
+problems. See the F<Changes> file in the distribution for details.
+
+=head2 List assignment to %ENV works
+
+C<%ENV = ()> and C<%ENV = @list> now work as expected (except on VMS
+where it generates a fatal error).
+
+=head2 "Can't locate Foo.pm in @INC" error now lists @INC
+
+=head2 Compilation option: Binary compatibility with 5.003
+
+There is a new Configure question that asks if you want to maintain
+binary compatibility with Perl 5.003. If you choose binary
+compatibility, you do not have to recompile your extensions, but you
+might have symbol conflicts if you embed Perl in another application,
+just as in the 5.003 release. By default, binary compatibility
+is preserved at the expense of symbol table pollution.
+
+=head2 $PERL5OPT environment variable
+
+You may now put Perl options in the $PERL5OPT environment variable.
+Unless Perl is running with taint checks, it will interpret this
+variable as if its contents had appeared on a "#!perl" line at the
+beginning of your script, except that hyphens are optional. PERL5OPT
+may only be used to set the following switches: B<-[DIMUdmw]>.
+
+=head2 Limitations on B<-M>, B<-m>, and B<-T> options
+
+The C<-M> and C<-m> options are no longer allowed on the C<#!> line of
+a script. If a script needs a module, it should invoke it with the
+C<use> pragma.
+
+The B<-T> option is also forbidden on the C<#!> line of a script,
+unless it was present on the Perl command line. Due to the way C<#!>
+works, this usually means that B<-T> must be in the first argument.
+Thus:
+
+ #!/usr/bin/perl -T -w
+
+will probably work for an executable script invoked as C<scriptname>,
+while:
+
+ #!/usr/bin/perl -w -T
+
+will probably fail under the same conditions. (Non-Unix systems will
+probably not follow this rule.) But C<perl scriptname> is guaranteed
+to fail, since then there is no chance of B<-T> being found on the
+command line before it is found on the C<#!> line.
+
+=head2 More precise warnings
+
+If you removed the B<-w> option from your Perl 5.003 scripts because it
+made Perl too verbose, we recommend that you try putting it back when
+you upgrade to Perl 5.004. Each new perl version tends to remove some
+undesirable warnings, while adding new warnings that may catch bugs in
+your scripts.
+
+=head2 Deprecated: Inherited C<AUTOLOAD> for non-methods
+
+Before Perl 5.004, C<AUTOLOAD> functions were looked up as methods
+(using the C<@ISA> hierarchy), even when the function to be autoloaded
+was called as a plain function (e.g. C<Foo::bar()>), not a method
+(e.g. C<Foo-E<gt>bar()> or C<$obj-E<gt>bar()>).
+
+Perl 5.005 will use method lookup only for methods' C<AUTOLOAD>s.
+However, there is a significant base of existing code that may be using
+the old behavior. So, as an interim step, Perl 5.004 issues an optional
+warning when a non-method uses an inherited C<AUTOLOAD>.
+
+The simple rule is: Inheritance will not work when autoloading
+non-methods. The simple fix for old code is: In any module that used to
+depend on inheriting C<AUTOLOAD> for non-methods from a base class named
+C<BaseClass>, execute C<*AUTOLOAD = \&BaseClass::AUTOLOAD> during startup.
+
+=head2 Previously deprecated %OVERLOAD is no longer usable
+
+Using %OVERLOAD to define overloading was deprecated in 5.003.
+Overloading is now defined using the overload pragma. %OVERLOAD is
+still used internally but should not be used by Perl scripts. See
+L<overload> for more details.
+
+=head2 Subroutine arguments created only when they're modified
+
+In Perl 5.004, nonexistent array and hash elements used as subroutine
+parameters are brought into existence only if they are actually
+assigned to (via C<@_>).
+
+Earlier versions of Perl vary in their handling of such arguments.
+Perl versions 5.002 and 5.003 always brought them into existence.
+Perl versions 5.000 and 5.001 brought them into existence only if
+they were not the first argument (which was almost certainly a bug).
+Earlier versions of Perl never brought them into existence.
+
+For example, given this code:
+
+ undef @a; undef %a;
+ sub show { print $_[0] };
+ sub change { $_[0]++ };
+ show($a[2]);
+ change($a{b});
+
+After this code executes in Perl 5.004, $a{b} exists but $a[2] does
+not. In Perl 5.002 and 5.003, both $a{b} and $a[2] would have existed
+(but $a[2]'s value would have been undefined).
+
+=head2 Group vector changeable with C<$)>
+
+The C<$)> special variable has always (well, in Perl 5, at least)
+reflected not only the current effective group, but also the group list
+as returned by the C<getgroups()> C function (if there is one).
+However, until this release, there has not been a way to call the
+C<setgroups()> C function from Perl.
+
+In Perl 5.004, assigning to C<$)> is exactly symmetrical with examining
+it: The first number in its string value is used as the effective gid;
+if there are any numbers after the first one, they are passed to the
+C<setgroups()> C function (if there is one).
+
+=head2 Fixed parsing of $$<digit>, &$<digit>, etc.
+
+Perl versions before 5.004 misinterpreted any type marker followed by
+"$" and a digit. For example, "$$0" was incorrectly taken to mean
+"${$}0" instead of "${$0}". This bug is (mostly) fixed in Perl 5.004.
+
+However, the developers of Perl 5.004 could not fix this bug completely,
+because at least two widely-used modules depend on the old meaning of
+"$$0" in a string. So Perl 5.004 still interprets "$$<digit>" in the
+old (broken) way inside strings; but it generates this message as a
+warning. And in Perl 5.005, this special treatment will cease.
+
+=head2 Fixed localization of $<digit>, $&, etc.
+
+Perl versions before 5.004 did not always properly localize the
+regex-related special variables. Perl 5.004 does localize them, as
+the documentation has always said it should. This may result in $1,
+$2, etc. no longer being set where existing programs use them.
+
+=head2 No resetting of $. on implicit close
+
+The documentation for Perl 5.0 has always stated that C<$.> is I<not>
+reset when an already-open file handle is reopened with no intervening
+call to C<close>. Due to a bug, perl versions 5.000 through 5.003
+I<did> reset C<$.> under that circumstance; Perl 5.004 does not.
+
+=head2 C<wantarray> may return undef
+
+The C<wantarray> operator returns true if a subroutine is expected to
+return a list, and false otherwise. In Perl 5.004, C<wantarray> can
+also return the undefined value if a subroutine's return value will
+not be used at all, which allows subroutines to avoid a time-consuming
+calculation of a return value if it isn't going to be used.
+
+=head2 C<eval EXPR> determines value of EXPR in scalar context
+
+Perl (version 5) used to determine the value of EXPR inconsistently,
+sometimes incorrectly using the surrounding context for the determination.
+Now, the value of EXPR (before being parsed by eval) is always determined in
+a scalar context. Once parsed, it is executed as before, by providing
+the context that the scope surrounding the eval provided. This change
+makes the behavior Perl4 compatible, besides fixing bugs resulting from
+the inconsistent behavior. This program:
+
+ @a = qw(time now is time);
+ print eval @a;
+ print '|', scalar eval @a;
+
+used to print something like "timenowis881399109|4", but now (and in perl4)
+prints "4|4".
+
+=head2 Changes to tainting checks
+
+A bug in previous versions may have failed to detect some insecure
+conditions when taint checks are turned on. (Taint checks are used
+in setuid or setgid scripts, or when explicitly turned on with the
+C<-T> invocation option.) Although it's unlikely, this may cause a
+previously-working script to now fail -- which should be construed
+as a blessing, since that indicates a potentially-serious security
+hole was just plugged.
+
+The new restrictions when tainting include:
+
+=over
+
+=item No glob() or <*>
+
+These operators may spawn the C shell (csh), which cannot be made
+safe. This restriction will be lifted in a future version of Perl
+when globbing is implemented without the use of an external program.
+
+=item No spawning if tainted $CDPATH, $ENV, $BASH_ENV
+
+These environment variables may alter the behavior of spawned programs
+(especially shells) in ways that subvert security. So now they are
+treated as dangerous, in the manner of $IFS and $PATH.
+
+=item No spawning if tainted $TERM doesn't look like a terminal name
+
+Some termcap libraries do unsafe things with $TERM. However, it would be
+unnecessarily harsh to treat all $TERM values as unsafe, since only shell
+metacharacters can cause trouble in $TERM. So a tainted $TERM is
+considered to be safe if it contains only alphanumerics, underscores,
+dashes, and colons, and unsafe if it contains other characters (including
+whitespace).
+
+=back
+
+=head2 New Opcode module and revised Safe module
+
+A new Opcode module supports the creation, manipulation and
+application of opcode masks. The revised Safe module has a new API
+and is implemented using the new Opcode module. Please read the new
+Opcode and Safe documentation.
+
+=head2 Embedding improvements
+
+In older versions of Perl it was not possible to create more than one
+Perl interpreter instance inside a single process without leaking like a
+sieve and/or crashing. The bugs that caused this behavior have all been
+fixed. However, you still must take care when embedding Perl in a C
+program. See the updated perlembed manpage for tips on how to manage
+your interpreters.
+
+=head2 Internal change: FileHandle class based on IO::* classes
+
+File handles are now stored internally as type IO::Handle. The
+FileHandle module is still supported for backwards compatibility, but
+it is now merely a front end to the IO::* modules -- specifically,
+IO::Handle, IO::Seekable, and IO::File. We suggest, but do not
+require, that you use the IO::* modules in new code.
+
+In harmony with this change, C<*GLOB{FILEHANDLE}> is now just a
+backward-compatible synonym for C<*GLOB{IO}>.
+
+=head2 Internal change: PerlIO abstraction interface
+
+It is now possible to build Perl with AT&T's sfio IO package
+instead of stdio. See L<perlapio> for more details, and
+the F<INSTALL> file for how to use it.
+
+=head2 New and changed syntax
+
+=over
+
+=item $coderef->(PARAMS)
+
+A subroutine reference may now be suffixed with an arrow and a
+(possibly empty) parameter list. This syntax denotes a call of the
+referenced subroutine, with the given parameters (if any).
+
+This new syntax follows the pattern of S<C<$hashref-E<gt>{FOO}>> and
+S<C<$aryref-E<gt>[$foo]>>: You may now write S<C<&$subref($foo)>> as
+S<C<$subref-E<gt>($foo)>>. All of these arrow terms may be chained;
+thus, S<C<&{$table-E<gt>{FOO}}($bar)>> may now be written
+S<C<$table-E<gt>{FOO}-E<gt>($bar)>>.
+
+=back
+
+=head2 New and changed builtin constants
+
+=over
+
+=item __PACKAGE__
+
+The current package name at compile time, or the undefined value if
+there is no current package (due to a C<package;> directive). Like
+C<__FILE__> and C<__LINE__>, C<__PACKAGE__> does I<not> interpolate
+into strings.
+
+=back
+
+=head2 New and changed builtin variables
+
+=over
+
+=item $^E
+
+Extended error message on some platforms. (Also known as
+$EXTENDED_OS_ERROR if you C<use English>).
+
+=item $^H
+
+The current set of syntax checks enabled by C<use strict>. See the
+documentation of C<strict> for more details. Not actually new, but
+newly documented.
+Because it is intended for internal use by Perl core components,
+there is no C<use English> long name for this variable.
+
+=item $^M
+
+By default, running out of memory it is not trappable. However, if
+compiled for this, Perl may use the contents of C<$^M> as an emergency
+pool after die()ing with this message. Suppose that your Perl were
+compiled with -DPERL_EMERGENCY_SBRK and used Perl's malloc. Then
+
+ $^M = 'a' x (1<<16);
+
+would allocate a 64K buffer for use when in emergency.
+See the F<INSTALL> file for information on how to enable this option.
+As a disincentive to casual use of this advanced feature,
+there is no C<use English> long name for this variable.
+
+=back
+
+=head2 New and changed builtin functions
+
+=over
+
+=item delete on slices
+
+This now works. (e.g. C<delete @ENV{'PATH', 'MANPATH'}>)
+
+=item flock
+
+is now supported on more platforms, prefers fcntl to lockf when
+emulating, and always flushes before (un)locking.
+
+=item printf and sprintf
+
+Perl now implements these functions itself; it doesn't use the C
+library function sprintf() any more, except for floating-point
+numbers, and even then only known flags are allowed. As a result, it
+is now possible to know which conversions and flags will work, and
+what they will do.
+
+The new conversions in Perl's sprintf() are:
+
+ %i a synonym for %d
+ %p a pointer (the address of the Perl value, in hexadecimal)
+ %n special: *stores* the number of characters output so far
+ into the next variable in the parameter list
+
+The new flags that go between the C<%> and the conversion are:
+
+ # prefix octal with "0", hex with "0x"
+ h interpret integer as C type "short" or "unsigned short"
+ V interpret integer as Perl's standard integer type
+
+Also, where a number would appear in the flags, an asterisk ("*") may
+be used instead, in which case Perl uses the next item in the
+parameter list as the given number (that is, as the field width or
+precision). If a field width obtained through "*" is negative, it has
+the same effect as the '-' flag: left-justification.
+
+See L<perlfunc/sprintf> for a complete list of conversion and flags.
+
+=item keys as an lvalue
+
+As an lvalue, C<keys> allows you to increase the number of hash buckets
+allocated for the given hash. This can gain you a measure of efficiency if
+you know the hash is going to get big. (This is similar to pre-extending
+an array by assigning a larger number to $#array.) If you say
+
+ keys %hash = 200;
+
+then C<%hash> will have at least 200 buckets allocated for it. These
+buckets will be retained even if you do C<%hash = ()>; use C<undef
+%hash> if you want to free the storage while C<%hash> is still in scope.
+You can't shrink the number of buckets allocated for the hash using
+C<keys> in this way (but you needn't worry about doing this by accident,
+as trying has no effect).
+
+=item my() in Control Structures
+
+You can now use my() (with or without the parentheses) in the control
+expressions of control structures such as:
+
+ while (defined(my $line = <>)) {
+ $line = lc $line;
+ } continue {
+ print $line;
+ }
+
+ if ((my $answer = <STDIN>) =~ /^y(es)?$/i) {
+ user_agrees();
+ } elsif ($answer =~ /^n(o)?$/i) {
+ user_disagrees();
+ } else {
+ chomp $answer;
+ die "`$answer' is neither `yes' nor `no'";
+ }
+
+Also, you can declare a foreach loop control variable as lexical by
+preceding it with the word "my". For example, in:
+
+ foreach my $i (1, 2, 3) {
+ some_function();
+ }
+
+$i is a lexical variable, and the scope of $i extends to the end of
+the loop, but not beyond it.
+
+Note that you still cannot use my() on global punctuation variables
+such as $_ and the like.
+
+=item pack() and unpack()
+
+A new format 'w' represents a BER compressed integer (as defined in
+ASN.1). Its format is a sequence of one or more bytes, each of which
+provides seven bits of the total value, with the most significant
+first. Bit eight of each byte is set, except for the last byte, in
+which bit eight is clear.
+
+If 'p' or 'P' are given undef as values, they now generate a NULL
+pointer.
+
+Both pack() and unpack() now fail when their templates contain invalid
+types. (Invalid types used to be ignored.)
+
+=item sysseek()
+
+The new sysseek() operator is a variant of seek() that sets and gets the
+file's system read/write position, using the lseek(2) system call. It is
+the only reliable way to seek before using sysread() or syswrite(). Its
+return value is the new position, or the undefined value on failure.
+
+=item use VERSION
+
+If the first argument to C<use> is a number, it is treated as a version
+number instead of a module name. If the version of the Perl interpreter
+is less than VERSION, then an error message is printed and Perl exits
+immediately. Because C<use> occurs at compile time, this check happens
+immediately during the compilation process, unlike C<require VERSION>,
+which waits until runtime for the check. This is often useful if you
+need to check the current Perl version before C<use>ing library modules
+which have changed in incompatible ways from older versions of Perl.
+(We try not to do this more than we have to.)
+
+=item use Module VERSION LIST
+
+If the VERSION argument is present between Module and LIST, then the
+C<use> will call the VERSION method in class Module with the given
+version as an argument. The default VERSION method, inherited from
+the UNIVERSAL class, croaks if the given version is larger than the
+value of the variable $Module::VERSION. (Note that there is not a
+comma after VERSION!)
+
+This version-checking mechanism is similar to the one currently used
+in the Exporter module, but it is faster and can be used with modules
+that don't use the Exporter. It is the recommended method for new
+code.
+
+=item prototype(FUNCTION)
+
+Returns the prototype of a function as a string (or C<undef> if the
+function has no prototype). FUNCTION is a reference to or the name of the
+function whose prototype you want to retrieve.
+(Not actually new; just never documented before.)
+
+=item srand
+
+The default seed for C<srand>, which used to be C<time>, has been changed.
+Now it's a heady mix of difficult-to-predict system-dependent values,
+which should be sufficient for most everyday purposes.
+
+Previous to version 5.004, calling C<rand> without first calling C<srand>
+would yield the same sequence of random numbers on most or all machines.
+Now, when perl sees that you're calling C<rand> and haven't yet called
+C<srand>, it calls C<srand> with the default seed. You should still call
+C<srand> manually if your code might ever be run on a pre-5.004 system,
+of course, or if you want a seed other than the default.
+
+=item $_ as Default
+
+Functions documented in the Camel to default to $_ now in
+fact do, and all those that do are so documented in L<perlfunc>.
+
+=item C<m//gc> does not reset search position on failure
+
+The C<m//g> match iteration construct has always reset its target
+string's search position (which is visible through the C<pos> operator)
+when a match fails; as a result, the next C<m//g> match after a failure
+starts again at the beginning of the string. With Perl 5.004, this
+reset may be disabled by adding the "c" (for "continue") modifier,
+i.e. C<m//gc>. This feature, in conjunction with the C<\G> zero-width
+assertion, makes it possible to chain matches together. See L<perlop>
+and L<perlre>.
+
+=item C<m//x> ignores whitespace before ?*+{}
+
+The C<m//x> construct has always been intended to ignore all unescaped
+whitespace. However, before Perl 5.004, whitespace had the effect of
+escaping repeat modifiers like "*" or "?"; for example, C</a *b/x> was
+(mis)interpreted as C</a\*b/x>. This bug has been fixed in 5.004.
+
+=item nested C<sub{}> closures work now
+
+Prior to the 5.004 release, nested anonymous functions didn't work
+right. They do now.
+
+=item formats work right on changing lexicals
+
+Just like anonymous functions that contain lexical variables
+that change (like a lexical index variable for a C<foreach> loop),
+formats now work properly. For example, this silently failed
+before (printed only zeros), but is fine now:
+
+ my $i;
+ foreach $i ( 1 .. 10 ) {
+ write;
+ }
+ format =
+ my i is @#
+ $i
+ .
+
+However, it still fails (without a warning) if the foreach is within a
+subroutine:
+
+ my $i;
+ sub foo {
+ foreach $i ( 1 .. 10 ) {
+ write;
+ }
+ }
+ foo;
+ format =
+ my i is @#
+ $i
+ .
+
+=back
+
+=head2 New builtin methods
+
+The C<UNIVERSAL> package automatically contains the following methods that
+are inherited by all other classes:
+
+=over
+
+=item isa(CLASS)
+
+C<isa> returns I<true> if its object is blessed into a subclass of C<CLASS>
+
+C<isa> is also exportable and can be called as a sub with two arguments. This
+allows the ability to check what a reference points to. Example:
+
+ use UNIVERSAL qw(isa);
+
+ if(isa($ref, 'ARRAY')) {
+ ...
+ }
+
+=item can(METHOD)
+
+C<can> checks to see if its object has a method called C<METHOD>,
+if it does then a reference to the sub is returned; if it does not then
+I<undef> is returned.
+
+=item VERSION( [NEED] )
+
+C<VERSION> returns the version number of the class (package). If the
+NEED argument is given then it will check that the current version (as
+defined by the $VERSION variable in the given package) not less than
+NEED; it will die if this is not the case. This method is normally
+called as a class method. This method is called automatically by the
+C<VERSION> form of C<use>.
+
+ use A 1.2 qw(some imported subs);
+ # implies:
+ A->VERSION(1.2);
+
+=back
+
+B<NOTE:> C<can> directly uses Perl's internal code for method lookup, and
+C<isa> uses a very similar method and caching strategy. This may cause
+strange effects if the Perl code dynamically changes @ISA in any package.
+
+You may add other methods to the UNIVERSAL class via Perl or XS code.
+You do not need to C<use UNIVERSAL> in order to make these methods
+available to your program. This is necessary only if you wish to
+have C<isa> available as a plain subroutine in the current package.
+
+=head2 TIEHANDLE now supported
+
+See L<perltie> for other kinds of tie()s.
+
+=over
+
+=item TIEHANDLE classname, LIST
+
+This is the constructor for the class. That means it is expected to
+return an object of some sort. The reference can be used to
+hold some internal information.
+
+ sub TIEHANDLE {
+ print "<shout>\n";
+ my $i;
+ return bless \$i, shift;
+ }
+
+=item PRINT this, LIST
+
+This method will be triggered every time the tied handle is printed to.
+Beyond its self reference it also expects the list that was passed to
+the print function.
+
+ sub PRINT {
+ $r = shift;
+ $$r++;
+ return print join( $, => map {uc} @_), $\;
+ }
+
+=item PRINTF this, LIST
+
+This method will be triggered every time the tied handle is printed to
+with the C<printf()> function.
+Beyond its self reference it also expects the format and list that was
+passed to the printf function.
+
+ sub PRINTF {
+ shift;
+ my $fmt = shift;
+ print sprintf($fmt, @_)."\n";
+ }
+
+=item READ this LIST
+
+This method will be called when the handle is read from via the C<read>
+or C<sysread> functions.
+
+ sub READ {
+ $r = shift;
+ my($buf,$len,$offset) = @_;
+ print "READ called, \$buf=$buf, \$len=$len, \$offset=$offset";
+ }
+
+=item READLINE this
+
+This method will be called when the handle is read from. The method
+should return undef when there is no more data.
+
+ sub READLINE {
+ $r = shift;
+ return "PRINT called $$r times\n"
+ }
+
+=item GETC this
+
+This method will be called when the C<getc> function is called.
+
+ sub GETC { print "Don't GETC, Get Perl"; return "a"; }
+
+=item DESTROY this
+
+As with the other types of ties, this method will be called when the
+tied handle is about to be destroyed. This is useful for debugging and
+possibly for cleaning up.
+
+ sub DESTROY {
+ print "</shout>\n";
+ }
+
+=back
+
+=head2 Malloc enhancements
+
+If perl is compiled with the malloc included with the perl distribution
+(that is, if C<perl -V:d_mymalloc> is 'define') then you can print
+memory statistics at runtime by running Perl thusly:
+
+ env PERL_DEBUG_MSTATS=2 perl your_script_here
+
+The value of 2 means to print statistics after compilation and on
+exit; with a value of 1, the statistics are printed only on exit.
+(If you want the statistics at an arbitrary time, you'll need to
+install the optional module Devel::Peek.)
+
+Three new compilation flags are recognized by malloc.c. (They have no
+effect if perl is compiled with system malloc().)
+
+=over
+
+=item -DPERL_EMERGENCY_SBRK
+
+If this macro is defined, running out of memory need not be a fatal
+error: a memory pool can allocated by assigning to the special
+variable C<$^M>. See L<"$^M">.
+
+=item -DPACK_MALLOC
+
+Perl memory allocation is by bucket with sizes close to powers of two.
+Because of these malloc overhead may be big, especially for data of
+size exactly a power of two. If C<PACK_MALLOC> is defined, perl uses
+a slightly different algorithm for small allocations (up to 64 bytes
+long), which makes it possible to have overhead down to 1 byte for
+allocations which are powers of two (and appear quite often).
+
+Expected memory savings (with 8-byte alignment in C<alignbytes>) is
+about 20% for typical Perl usage. Expected slowdown due to additional
+malloc overhead is in fractions of a percent (hard to measure, because
+of the effect of saved memory on speed).
+
+=item -DTWO_POT_OPTIMIZE
+
+Similarly to C<PACK_MALLOC>, this macro improves allocations of data
+with size close to a power of two; but this works for big allocations
+(starting with 16K by default). Such allocations are typical for big
+hashes and special-purpose scripts, especially image processing.
+
+On recent systems, the fact that perl requires 2M from system for 1M
+allocation will not affect speed of execution, since the tail of such
+a chunk is not going to be touched (and thus will not require real
+memory). However, it may result in a premature out-of-memory error.
+So if you will be manipulating very large blocks with sizes close to
+powers of two, it would be wise to define this macro.
+
+Expected saving of memory is 0-100% (100% in applications which
+require most memory in such 2**n chunks); expected slowdown is
+negligible.
+
+=back
+
+=head2 Miscellaneous efficiency enhancements
+
+Functions that have an empty prototype and that do nothing but return
+a fixed value are now inlined (e.g. C<sub PI () { 3.14159 }>).
+
+Each unique hash key is only allocated once, no matter how many hashes
+have an entry with that key. So even if you have 100 copies of the
+same hash, the hash keys never have to be reallocated.
+
+=head1 Support for More Operating Systems
+
+Support for the following operating systems is new in Perl 5.004.
+
+=head2 Win32
+
+Perl 5.004 now includes support for building a "native" perl under
+Windows NT, using the Microsoft Visual C++ compiler (versions 2.0
+and above) or the Borland C++ compiler (versions 5.02 and above).
+The resulting perl can be used under Windows 95 (if it
+is installed in the same directory locations as it got installed
+in Windows NT). This port includes support for perl extension
+building tools like L<MakeMaker> and L<h2xs>, so that many extensions
+available on the Comprehensive Perl Archive Network (CPAN) can now be
+readily built under Windows NT. See http://www.perl.com/ for more
+information on CPAN and F<README.win32> in the perl distribution for more
+details on how to get started with building this port.
+
+There is also support for building perl under the Cygwin32 environment.
+Cygwin32 is a set of GNU tools that make it possible to compile and run
+many UNIX programs under Windows NT by providing a mostly UNIX-like
+interface for compilation and execution. See F<README.cygwin32> in the
+perl distribution for more details on this port and how to obtain the
+Cygwin32 toolkit.
+
+=head2 Plan 9
+
+See F<README.plan9> in the perl distribution.
+
+=head2 QNX
+
+See F<README.qnx> in the perl distribution.
+
+=head2 AmigaOS
+
+See F<README.amigaos> in the perl distribution.
+
+=head1 Pragmata
+
+Six new pragmatic modules exist:
+
+=over
+
+=item use autouse MODULE => qw(sub1 sub2 sub3)
+
+Defers C<require MODULE> until someone calls one of the specified
+subroutines (which must be exported by MODULE). This pragma should be
+used with caution, and only when necessary.
+
+=item use blib
+
+=item use blib 'dir'
+
+Looks for MakeMaker-like I<'blib'> directory structure starting in
+I<dir> (or current directory) and working back up to five levels of
+parent directories.
+
+Intended for use on command line with B<-M> option as a way of testing
+arbitrary scripts against an uninstalled version of a package.
+
+=item use constant NAME => VALUE
+
+Provides a convenient interface for creating compile-time constants,
+See L<perlsub/"Constant Functions">.
+
+=item use locale
+
+Tells the compiler to enable (or disable) the use of POSIX locales for
+builtin operations.
+
+When C<use locale> is in effect, the current LC_CTYPE locale is used
+for regular expressions and case mapping; LC_COLLATE for string
+ordering; and LC_NUMERIC for numeric formating in printf and sprintf
+(but B<not> in print). LC_NUMERIC is always used in write, since
+lexical scoping of formats is problematic at best.
+
+Each C<use locale> or C<no locale> affects statements to the end of
+the enclosing BLOCK or, if not inside a BLOCK, to the end of the
+current file. Locales can be switched and queried with
+POSIX::setlocale().
+
+See L<perllocale> for more information.
+
+=item use ops
+
+Disable unsafe opcodes, or any named opcodes, when compiling Perl code.
+
+=item use vmsish
+
+Enable VMS-specific language features. Currently, there are three
+VMS-specific features available: 'status', which makes C<$?> and
+C<system> return genuine VMS status values instead of emulating POSIX;
+'exit', which makes C<exit> take a genuine VMS status value instead of
+assuming that C<exit 1> is an error; and 'time', which makes all times
+relative to the local time zone, in the VMS tradition.
+
+=back
+
+=head1 Modules
+
+=head2 Required Updates
+
+Though Perl 5.004 is compatible with almost all modules that work
+with Perl 5.003, there are a few exceptions:
+
+ Module Required Version for Perl 5.004
+ ------ -------------------------------
+ Filter Filter-1.12
+ LWP libwww-perl-5.08
+ Tk Tk400.202 (-w makes noise)
+
+Also, the majordomo mailing list program, version 1.94.1, doesn't work
+with Perl 5.004 (nor with perl 4), because it executes an invalid
+regular expression. This bug is fixed in majordomo version 1.94.2.
+
+=head2 Installation directories
+
+The I<installperl> script now places the Perl source files for
+extensions in the architecture-specific library directory, which is
+where the shared libraries for extensions have always been. This
+change is intended to allow administrators to keep the Perl 5.004
+library directory unchanged from a previous version, without running
+the risk of binary incompatibility between extensions' Perl source and
+shared libraries.
+
+=head2 Module information summary
+
+Brand new modules, arranged by topic rather than strictly
+alphabetically:
+
+ CGI.pm Web server interface ("Common Gateway Interface")
+ CGI/Apache.pm Support for Apache's Perl module
+ CGI/Carp.pm Log server errors with helpful context
+ CGI/Fast.pm Support for FastCGI (persistent server process)
+ CGI/Push.pm Support for server push
+ CGI/Switch.pm Simple interface for multiple server types
+
+ CPAN Interface to Comprehensive Perl Archive Network
+ CPAN::FirstTime Utility for creating CPAN configuration file
+ CPAN::Nox Runs CPAN while avoiding compiled extensions
+
+ IO.pm Top-level interface to IO::* classes
+ IO/File.pm IO::File extension Perl module
+ IO/Handle.pm IO::Handle extension Perl module
+ IO/Pipe.pm IO::Pipe extension Perl module
+ IO/Seekable.pm IO::Seekable extension Perl module
+ IO/Select.pm IO::Select extension Perl module
+ IO/Socket.pm IO::Socket extension Perl module
+
+ Opcode.pm Disable named opcodes when compiling Perl code
+
+ ExtUtils/Embed.pm Utilities for embedding Perl in C programs
+ ExtUtils/testlib.pm Fixes up @INC to use just-built extension
+
+ FindBin.pm Find path of currently executing program
+
+ Class/Struct.pm Declare struct-like datatypes as Perl classes
+ File/stat.pm By-name interface to Perl's builtin stat
+ Net/hostent.pm By-name interface to Perl's builtin gethost*
+ Net/netent.pm By-name interface to Perl's builtin getnet*
+ Net/protoent.pm By-name interface to Perl's builtin getproto*
+ Net/servent.pm By-name interface to Perl's builtin getserv*
+ Time/gmtime.pm By-name interface to Perl's builtin gmtime
+ Time/localtime.pm By-name interface to Perl's builtin localtime
+ Time/tm.pm Internal object for Time::{gm,local}time
+ User/grent.pm By-name interface to Perl's builtin getgr*
+ User/pwent.pm By-name interface to Perl's builtin getpw*
+
+ Tie/RefHash.pm Base class for tied hashes with references as keys
+
+ UNIVERSAL.pm Base class for *ALL* classes
+
+=head2 Fcntl
+
+New constants in the existing Fcntl modules are now supported,
+provided that your operating system happens to support them:
+
+ F_GETOWN F_SETOWN
+ O_ASYNC O_DEFER O_DSYNC O_FSYNC O_SYNC
+ O_EXLOCK O_SHLOCK
+
+These constants are intended for use with the Perl operators sysopen()
+and fcntl() and the basic database modules like SDBM_File. For the
+exact meaning of these and other Fcntl constants please refer to your
+operating system's documentation for fcntl() and open().
+
+In addition, the Fcntl module now provides these constants for use
+with the Perl operator flock():
+
+ LOCK_SH LOCK_EX LOCK_NB LOCK_UN
+
+These constants are defined in all environments (because where there is
+no flock() system call, Perl emulates it). However, for historical
+reasons, these constants are not exported unless they are explicitly
+requested with the ":flock" tag (e.g. C<use Fcntl ':flock'>).
+
+=head2 IO
+
+The IO module provides a simple mechanism to load all of the IO modules at one
+go. Currently this includes:
+
+ IO::Handle
+ IO::Seekable
+ IO::File
+ IO::Pipe
+ IO::Socket
+
+For more information on any of these modules, please see its
+respective documentation.
+
+=head2 Math::Complex
+
+The Math::Complex module has been totally rewritten, and now supports
+more operations. These are overloaded:
+
+ + - * / ** <=> neg ~ abs sqrt exp log sin cos atan2 "" (stringify)
+
+And these functions are now exported:
+
+ pi i Re Im arg
+ log10 logn ln cbrt root
+ tan
+ csc sec cot
+ asin acos atan
+ acsc asec acot
+ sinh cosh tanh
+ csch sech coth
+ asinh acosh atanh
+ acsch asech acoth
+ cplx cplxe
+
+=head2 Math::Trig
+
+This new module provides a simpler interface to parts of Math::Complex for
+those who need trigonometric functions only for real numbers.
+
+=head2 DB_File
+
+There have been quite a few changes made to DB_File. Here are a few of
+the highlights:
+
+=over
+
+=item *
+
+Fixed a handful of bugs.
+
+=item *
+
+By public demand, added support for the standard hash function exists().
+
+=item *
+
+Made it compatible with Berkeley DB 1.86.
+
+=item *
+
+Made negative subscripts work with RECNO interface.
+
+=item *
+
+Changed the default flags from O_RDWR to O_CREAT|O_RDWR and the default
+mode from 0640 to 0666.
+
+=item *
+
+Made DB_File automatically import the open() constants (O_RDWR,
+O_CREAT etc.) from Fcntl, if available.
+
+=item *
+
+Updated documentation.
+
+=back
+
+Refer to the HISTORY section in DB_File.pm for a complete list of
+changes. Everything after DB_File 1.01 has been added since 5.003.
+
+=head2 Net::Ping
+
+Major rewrite - support added for both udp echo and real icmp pings.
+
+=head2 Object-oriented overrides for builtin operators
+
+Many of the Perl builtins returning lists now have
+object-oriented overrides. These are:
+
+ File::stat
+ Net::hostent
+ Net::netent
+ Net::protoent
+ Net::servent
+ Time::gmtime
+ Time::localtime
+ User::grent
+ User::pwent
+
+For example, you can now say
+
+ use File::stat;
+ use User::pwent;
+ $his = (stat($filename)->st_uid == pwent($whoever)->pw_uid);
+
+=head1 Utility Changes
+
+=head2 pod2html
+
+=over
+
+=item Sends converted HTML to standard output
+
+The I<pod2html> utility included with Perl 5.004 is entirely new.
+By default, it sends the converted HTML to its standard output,
+instead of writing it to a file like Perl 5.003's I<pod2html> did.
+Use the B<--outfile=FILENAME> option to write to a file.
+
+=back
+
+=head2 xsubpp
+
+=over
+
+=item C<void> XSUBs now default to returning nothing
+
+Due to a documentation/implementation bug in previous versions of
+Perl, XSUBs with a return type of C<void> have actually been
+returning one value. Usually that value was the GV for the XSUB,
+but sometimes it was some already freed or reused value, which would
+sometimes lead to program failure.
+
+In Perl 5.004, if an XSUB is declared as returning C<void>, it
+actually returns no value, i.e. an empty list (though there is a
+backward-compatibility exception; see below). If your XSUB really
+does return an SV, you should give it a return type of C<SV *>.
+
+For backward compatibility, I<xsubpp> tries to guess whether a
+C<void> XSUB is really C<void> or if it wants to return an C<SV *>.
+It does so by examining the text of the XSUB: if I<xsubpp> finds
+what looks like an assignment to C<ST(0)>, it assumes that the
+XSUB's return type is really C<SV *>.
+
+=back
+
+=head1 C Language API Changes
+
+=over
+
+=item C<gv_fetchmethod> and C<perl_call_sv>
+
+The C<gv_fetchmethod> function finds a method for an object, just like
+in Perl 5.003. The GV it returns may be a method cache entry.
+However, in Perl 5.004, method cache entries are not visible to users;
+therefore, they can no longer be passed directly to C<perl_call_sv>.
+Instead, you should use the C<GvCV> macro on the GV to extract its CV,
+and pass the CV to C<perl_call_sv>.
+
+The most likely symptom of passing the result of C<gv_fetchmethod> to
+C<perl_call_sv> is Perl's producing an "Undefined subroutine called"
+error on the I<second> call to a given method (since there is no cache
+on the first call).
+
+=item C<perl_eval_pv>
+
+A new function handy for eval'ing strings of Perl code inside C code.
+This function returns the value from the eval statement, which can
+be used instead of fetching globals from the symbol table. See
+L<perlguts>, L<perlembed> and L<perlcall> for details and examples.
+
+=item Extended API for manipulating hashes
+
+Internal handling of hash keys has changed. The old hashtable API is
+still fully supported, and will likely remain so. The additions to the
+API allow passing keys as C<SV*>s, so that C<tied> hashes can be given
+real scalars as keys rather than plain strings (nontied hashes still
+can only use strings as keys). New extensions must use the new hash
+access functions and macros if they wish to use C<SV*> keys. These
+additions also make it feasible to manipulate C<HE*>s (hash entries),
+which can be more efficient. See L<perlguts> for details.
+
+=back
+
+=head1 Documentation Changes
+
+Many of the base and library pods were updated. These
+new pods are included in section 1:
+
+=over
+
+=item L<perldelta>
+
+This document.
+
+=item L<perlfaq>
+
+Frequently asked questions.
+
+=item L<perllocale>
+
+Locale support (internationalization and localization).
+
+=item L<perltoot>
+
+Tutorial on Perl OO programming.
+
+=item L<perlapio>
+
+Perl internal IO abstraction interface.
+
+=item L<perlmodlib>
+
+Perl module library and recommended practice for module creation.
+Extracted from L<perlmod> (which is much smaller as a result).
+
+=item L<perldebug>
+
+Although not new, this has been massively updated.
+
+=item L<perlsec>
+
+Although not new, this has been massively updated.
+
+=back
+
+=head1 New Diagnostics
+
+Several new conditions will trigger warnings that were
+silent before. Some only affect certain platforms.
+The following new warnings and errors outline these.
+These messages are classified as follows (listed in
+increasing order of desperation):
+
+ (W) A warning (optional).
+ (D) A deprecation (optional).
+ (S) A severe warning (mandatory).
+ (F) A fatal error (trappable).
+ (P) An internal error you should never see (trappable).
+ (X) A very fatal error (nontrappable).
+ (A) An alien error message (not generated by Perl).
+
+=over
+
+=item "my" variable %s masks earlier declaration in same scope
+
+(W) A lexical variable has been redeclared in the same scope, effectively
+eliminating all access to the previous instance. This is almost always
+a typographical error. Note that the earlier variable will still exist
+until the end of the scope or until all closure referents to it are
+destroyed.
+
+=item %s argument is not a HASH element or slice
+
+(F) The argument to delete() must be either a hash element, such as
+
+ $foo{$bar}
+ $ref->[12]->{"susie"}
+
+or a hash slice, such as
+
+ @foo{$bar, $baz, $xyzzy}
+ @{$ref->[12]}{"susie", "queue"}
+
+=item Allocation too large: %lx
+
+(X) You can't allocate more than 64K on an MS-DOS machine.
+
+=item Allocation too large
+
+(F) You can't allocate more than 2^31+"small amount" bytes.
+
+=item Applying %s to %s will act on scalar(%s)
+
+(W) The pattern match (//), substitution (s///), and transliteration (tr///)
+operators work on scalar values. If you apply one of them to an array
+or a hash, it will convert the array or hash to a scalar value -- the
+length of an array, or the population info of a hash -- and then work on
+that scalar value. This is probably not what you meant to do. See
+L<perlfunc/grep> and L<perlfunc/map> for alternatives.
+
+=item Attempt to free nonexistent shared string
+
+(P) Perl maintains a reference counted internal table of strings to
+optimize the storage and access of hash keys and other strings. This
+indicates someone tried to decrement the reference count of a string
+that can no longer be found in the table.
+
+=item Attempt to use reference as lvalue in substr
+
+(W) You supplied a reference as the first argument to substr() used
+as an lvalue, which is pretty strange. Perhaps you forgot to
+dereference it first. See L<perlfunc/substr>.
+
+=item Bareword "%s" refers to nonexistent package
+
+(W) You used a qualified bareword of the form C<Foo::>, but
+the compiler saw no other uses of that namespace before that point.
+Perhaps you need to predeclare a package?
+
+=item Can't redefine active sort subroutine %s
+
+(F) Perl optimizes the internal handling of sort subroutines and keeps
+pointers into them. You tried to redefine one such sort subroutine when it
+was currently active, which is not allowed. If you really want to do
+this, you should write C<sort { &func } @x> instead of C<sort func @x>.
+
+=item Can't use bareword ("%s") as %s ref while "strict refs" in use
+
+(F) Only hard references are allowed by "strict refs". Symbolic references
+are disallowed. See L<perlref>.
+
+=item Cannot resolve method `%s' overloading `%s' in package `%s'
+
+(P) Internal error trying to resolve overloading specified by a method
+name (as opposed to a subroutine reference).
+
+=item Constant subroutine %s redefined
+
+(S) You redefined a subroutine which had previously been eligible for
+inlining. See L<perlsub/"Constant Functions"> for commentary and
+workarounds.
+
+=item Constant subroutine %s undefined
+
+(S) You undefined a subroutine which had previously been eligible for
+inlining. See L<perlsub/"Constant Functions"> for commentary and
+workarounds.
+
+=item Copy method did not return a reference
+
+(F) The method which overloads "=" is buggy. See L<overload/Copy Constructor>.
+
+=item Died
+
+(F) You passed die() an empty string (the equivalent of C<die "">) or
+you called it with no args and both C<$@> and C<$_> were empty.
+
+=item Exiting pseudo-block via %s
+
+(W) You are exiting a rather special block construct (like a sort block or
+subroutine) by unconventional means, such as a goto, or a loop control
+statement. See L<perlfunc/sort>.
+
+=item Identifier too long
+
+(F) Perl limits identifiers (names for variables, functions, etc.) to
+252 characters for simple names, somewhat more for compound names (like
+C<$A::B>). You've exceeded Perl's limits. Future versions of Perl are
+likely to eliminate these arbitrary limitations.
+
+=item Illegal character %s (carriage return)
+
+(F) A carriage return character was found in the input. This is an
+error, and not a warning, because carriage return characters can break
+multi-line strings, including here documents (e.g., C<print E<lt>E<lt>EOF;>).
+
+=item Illegal switch in PERL5OPT: %s
+
+(X) The PERL5OPT environment variable may only be used to set the
+following switches: B<-[DIMUdmw]>.
+
+=item Integer overflow in hex number
+
+(S) The literal hex number you have specified is too big for your
+architecture. On a 32-bit architecture the largest hex literal is
+0xFFFFFFFF.
+
+=item Integer overflow in octal number
+
+(S) The literal octal number you have specified is too big for your
+architecture. On a 32-bit architecture the largest octal literal is
+037777777777.
+
+=item internal error: glob failed
+
+(P) Something went wrong with the external program(s) used for C<glob>
+and C<E<lt>*.cE<gt>>. This may mean that your csh (C shell) is
+broken. If so, you should change all of the csh-related variables in
+config.sh: If you have tcsh, make the variables refer to it as if it
+were csh (e.g. C<full_csh='/usr/bin/tcsh'>); otherwise, make them all
+empty (except that C<d_csh> should be C<'undef'>) so that Perl will
+think csh is missing. In either case, after editing config.sh, run
+C<./Configure -S> and rebuild Perl.
+
+=item Invalid conversion in %s: "%s"
+
+(W) Perl does not understand the given format conversion.
+See L<perlfunc/sprintf>.
+
+=item Invalid type in pack: '%s'
+
+(F) The given character is not a valid pack type. See L<perlfunc/pack>.
+
+=item Invalid type in unpack: '%s'
+
+(F) The given character is not a valid unpack type. See L<perlfunc/unpack>.
+
+=item Name "%s::%s" used only once: possible typo
+
+(W) Typographical errors often show up as unique variable names.
+If you had a good reason for having a unique name, then just mention
+it again somehow to suppress the message (the C<use vars> pragma is
+provided for just this purpose).
+
+=item Null picture in formline
+
+(F) The first argument to formline must be a valid format picture
+specification. It was found to be empty, which probably means you
+supplied it an uninitialized value. See L<perlform>.
+
+=item Offset outside string
+
+(F) You tried to do a read/write/send/recv operation with an offset
+pointing outside the buffer. This is difficult to imagine.
+The sole exception to this is that C<sysread()>ing past the buffer
+will extend the buffer and zero pad the new area.
+
+=item Out of memory!
+
+(X|F) The malloc() function returned 0, indicating there was insufficient
+remaining memory (or virtual memory) to satisfy the request.
+
+The request was judged to be small, so the possibility to trap it
+depends on the way Perl was compiled. By default it is not trappable.
+However, if compiled for this, Perl may use the contents of C<$^M> as
+an emergency pool after die()ing with this message. In this case the
+error is trappable I<once>.
+
+=item Out of memory during request for %s
+
+(F) The malloc() function returned 0, indicating there was insufficient
+remaining memory (or virtual memory) to satisfy the request. However,
+the request was judged large enough (compile-time default is 64K), so
+a possibility to shut down by trapping this error is granted.
+
+=item panic: frexp
+
+(P) The library function frexp() failed, making printf("%f") impossible.
+
+=item Possible attempt to put comments in qw() list
+
+(W) qw() lists contain items separated by whitespace; as with literal
+strings, comment characters are not ignored, but are instead treated
+as literal data. (You may have used different delimiters than the
+parentheses shown here; braces are also frequently used.)
+
+You probably wrote something like this:
+
+ @list = qw(
+ a # a comment
+ b # another comment
+ );
+
+when you should have written this:
+
+ @list = qw(
+ a
+ b
+ );
+
+If you really want comments, build your list the
+old-fashioned way, with quotes and commas:
+
+ @list = (
+ 'a', # a comment
+ 'b', # another comment
+ );
+
+=item Possible attempt to separate words with commas
+
+(W) qw() lists contain items separated by whitespace; therefore commas
+aren't needed to separate the items. (You may have used different
+delimiters than the parentheses shown here; braces are also frequently
+used.)
+
+You probably wrote something like this:
+
+ qw! a, b, c !;
+
+which puts literal commas into some of the list items. Write it without
+commas if you don't want them to appear in your data:
+
+ qw! a b c !;
+
+=item Scalar value @%s{%s} better written as $%s{%s}
+
+(W) You've used a hash slice (indicated by @) to select a single element of
+a hash. Generally it's better to ask for a scalar value (indicated by $).
+The difference is that C<$foo{&bar}> always behaves like a scalar, both when
+assigning to it and when evaluating its argument, while C<@foo{&bar}> behaves
+like a list when you assign to it, and provides a list context to its
+subscript, which can do weird things if you're expecting only one subscript.
+
+=item Stub found while resolving method `%s' overloading `%s' in package `%s'
+
+(P) Overloading resolution over @ISA tree may be broken by importing stubs.
+Stubs should never be implicitly created, but explicit calls to C<can>
+may break this.
+
+=item Too late for "B<-T>" option
+
+(X) The #! line (or local equivalent) in a Perl script contains the
+B<-T> option, but Perl was not invoked with B<-T> in its argument
+list. This is an error because, by the time Perl discovers a B<-T> in
+a script, it's too late to properly taint everything from the
+environment. So Perl gives up.
+
+=item untie attempted while %d inner references still exist
+
+(W) A copy of the object returned from C<tie> (or C<tied>) was still
+valid when C<untie> was called.
+
+=item Unrecognized character %s
+
+(F) The Perl parser has no idea what to do with the specified character
+in your Perl script (or eval). Perhaps you tried to run a compressed
+script, a binary program, or a directory as a Perl program.
+
+=item Unsupported function fork
+
+(F) Your version of executable does not support forking.
+
+Note that under some systems, like OS/2, there may be different flavors of
+Perl executables, some of which may support fork, some not. Try changing
+the name you call Perl by to C<perl_>, C<perl__>, and so on.
+
+=item Use of "$$<digit>" to mean "${$}<digit>" is deprecated
+
+(D) Perl versions before 5.004 misinterpreted any type marker followed
+by "$" and a digit. For example, "$$0" was incorrectly taken to mean
+"${$}0" instead of "${$0}". This bug is (mostly) fixed in Perl 5.004.
+
+However, the developers of Perl 5.004 could not fix this bug completely,
+because at least two widely-used modules depend on the old meaning of
+"$$0" in a string. So Perl 5.004 still interprets "$$<digit>" in the
+old (broken) way inside strings; but it generates this message as a
+warning. And in Perl 5.005, this special treatment will cease.
+
+=item Value of %s can be "0"; test with defined()
+
+(W) In a conditional expression, you used <HANDLE>, <*> (glob), C<each()>,
+or C<readdir()> as a boolean value. Each of these constructs can return a
+value of "0"; that would make the conditional expression false, which is
+probably not what you intended. When using these constructs in conditional
+expressions, test their values with the C<defined> operator.
+
+=item Variable "%s" may be unavailable
+
+(W) An inner (nested) I<anonymous> subroutine is inside a I<named>
+subroutine, and outside that is another subroutine; and the anonymous
+(innermost) subroutine is referencing a lexical variable defined in
+the outermost subroutine. For example:
+
+ sub outermost { my $a; sub middle { sub { $a } } }
+
+If the anonymous subroutine is called or referenced (directly or
+indirectly) from the outermost subroutine, it will share the variable
+as you would expect. But if the anonymous subroutine is called or
+referenced when the outermost subroutine is not active, it will see
+the value of the shared variable as it was before and during the
+*first* call to the outermost subroutine, which is probably not what
+you want.
+
+In these circumstances, it is usually best to make the middle
+subroutine anonymous, using the C<sub {}> syntax. Perl has specific
+support for shared variables in nested anonymous subroutines; a named
+subroutine in between interferes with this feature.
+
+=item Variable "%s" will not stay shared
+
+(W) An inner (nested) I<named> subroutine is referencing a lexical
+variable defined in an outer subroutine.
+
+When the inner subroutine is called, it will probably see the value of
+the outer subroutine's variable as it was before and during the
+*first* call to the outer subroutine; in this case, after the first
+call to the outer subroutine is complete, the inner and outer
+subroutines will no longer share a common value for the variable. In
+other words, the variable will no longer be shared.
+
+Furthermore, if the outer subroutine is anonymous and references a
+lexical variable outside itself, then the outer and inner subroutines
+will I<never> share the given variable.
+
+This problem can usually be solved by making the inner subroutine
+anonymous, using the C<sub {}> syntax. When inner anonymous subs that
+reference variables in outer subroutines are called or referenced,
+they are automatically rebound to the current values of such
+variables.
+
+=item Warning: something's wrong
+
+(W) You passed warn() an empty string (the equivalent of C<warn "">) or
+you called it with no args and C<$_> was empty.
+
+=item Ill-formed logical name |%s| in prime_env_iter
+
+(W) A warning peculiar to VMS. A logical name was encountered when preparing
+to iterate over %ENV which violates the syntactic rules governing logical
+names. Since it cannot be translated normally, it is skipped, and will not
+appear in %ENV. This may be a benign occurrence, as some software packages
+might directly modify logical name tables and introduce nonstandard names,
+or it may indicate that a logical name table has been corrupted.
+
+=item Got an error from DosAllocMem
+
+(P) An error peculiar to OS/2. Most probably you're using an obsolete
+version of Perl, and this should not happen anyway.
+
+=item Malformed PERLLIB_PREFIX
+
+(F) An error peculiar to OS/2. PERLLIB_PREFIX should be of the form
+
+ prefix1;prefix2
+
+or
+
+ prefix1 prefix2
+
+with nonempty prefix1 and prefix2. If C<prefix1> is indeed a prefix
+of a builtin library search path, prefix2 is substituted. The error
+may appear if components are not found, or are too long. See
+"PERLLIB_PREFIX" in F<README.os2>.
+
+=item PERL_SH_DIR too long
+
+(F) An error peculiar to OS/2. PERL_SH_DIR is the directory to find the
+C<sh>-shell in. See "PERL_SH_DIR" in F<README.os2>.
+
+=item Process terminated by SIG%s
+
+(W) This is a standard message issued by OS/2 applications, while *nix
+applications die in silence. It is considered a feature of the OS/2
+port. One can easily disable this by appropriate sighandlers, see
+L<perlipc/"Signals">. See also "Process terminated by SIGTERM/SIGINT"
+in F<README.os2>.
+
+=back
+
+=head1 BUGS
+
+If you find what you think is a bug, you might check the headers of
+recently posted articles in the comp.lang.perl.misc newsgroup.
+There may also be information at http://www.perl.com/perl/, the Perl
+Home Page.
+
+If you believe you have an unreported bug, please run the B<perlbug>
+program included with your release. Make sure you trim your bug down
+to a tiny but sufficient test case. Your bug report, along with the
+output of C<perl -V>, will be sent off to <F<perlbug@perl.com>> to be
+analysed by the Perl porting team.
+
+=head1 SEE ALSO
+
+The F<Changes> file for exhaustive details on what changed.
+
+The F<INSTALL> file for how to build Perl. This file has been
+significantly updated for 5.004, so even veteran users should
+look through it.
+
+The F<README> file for general stuff.
+
+The F<Copying> file for copyright information.
+
+=head1 HISTORY
+
+Constructed by Tom Christiansen, grabbing material with permission
+from innumerable contributors, with kibitzing by more than a few Perl
+porters.
+
+Last update: Wed May 14 11:14:09 EDT 1997
diff --git a/gnu/usr.bin/perl/pod/perlhist.pod b/gnu/usr.bin/perl/pod/perlhist.pod
new file mode 100644
index 00000000000..5828ea4fcd2
--- /dev/null
+++ b/gnu/usr.bin/perl/pod/perlhist.pod
@@ -0,0 +1,537 @@
+=pod
+
+=head1 NAME
+
+perlhist - the Perl history records
+
+=begin RCS
+
+#
+# $Id: perlhist.pod,v 1.57 1999/01/26 17:38:07 jhi Exp $
+#
+
+=end RCS
+
+=head1 DESCRIPTION
+
+This document aims to record the Perl source code releases.
+
+=head1 INTRODUCTION
+
+Perl history in brief, by Larry Wall:
+
+ Perl 0 introduced Perl to my officemates.
+ Perl 1 introduced Perl to the world, and changed /\(...\|...\)/ to
+ /(...|...)/. \(Dan Faigin still hasn't forgiven me. :-\)
+ Perl 2 introduced Henry Spencer's regular expression package.
+ Perl 3 introduced the ability to handle binary data (embedded nulls).
+ Perl 4 introduced the first Camel book. Really. We mostly just
+ switched version numbers so the book could refer to 4.000.
+ Perl 5 introduced everything else, including the ability to
+ introduce everything else.
+
+=head1 THE KEEPERS OF THE PUMPKIN
+
+Larry Wall, Andy Dougherty, Tom Christiansen, Charles Bailey, Nick
+Ing-Simmons, Chip Salzenberg, Tim Bunce, Malcolm Beattie, Gurusamy
+Sarathy, Graham Barr.
+
+=head2 PUMPKIN?
+
+[from Porting/pumpkin.pod in the Perl source code distribution]
+
+Chip Salzenberg gets credit for that, with a nod to his cow orker,
+David Croy. We had passed around various names (baton, token, hot
+potato) but none caught on. Then, Chip asked:
+
+[begin quote]
+
+ Who has the patch pumpkin?
+
+To explain: David Croy once told me once that at a previous job,
+there was one tape drive and multiple systems that used it for backups.
+But instead of some high-tech exclusion software, they used a low-tech
+method to prevent multiple simultaneous backups: a stuffed pumpkin.
+No one was allowed to make backups unless they had the "backup pumpkin".
+
+[end quote]
+
+The name has stuck. The holder of the pumpkin is sometimes called
+the pumpking (keeping the source afloat?) or the pumpkineer (pulling
+the strings?).
+
+=head1 THE RECORDS
+
+ Pump- Release Date Notes
+ king (by no means
+ comprehensive,
+ see Changes*
+ for details)
+ ===========================================================================
+
+ Larry 0 Classified. Don't ask.
+
+ Larry 1.000 1987-Dec-18
+
+ 1.001..10 1988-Jan-30
+ 1.011..14 1988-Feb-02
+
+ Larry 2.000 1988-Jun-05
+
+ 2.001 1988-Jun-28
+
+ Larry 3.000 1989-Oct-18
+
+ 3.001 1989-Oct-26
+ 3.002..4 1989-Nov-11
+ 3.005 1989-Nov-18
+ 3.006..8 1989-Dec-22
+ 3.009..13 1990-Mar-02
+ 3.014 1990-Mar-13
+ 3.015 1990-Mar-14
+ 3.016..18 1990-Mar-28
+ 3.019..27 1990-Aug-10 User subs.
+ 3.028 1990-Aug-14
+ 3.029..36 1990-Oct-17
+ 3.037 1990-Oct-20
+ 3.040 1990-Nov-10
+ 3.041 1990-Nov-13
+ 3.042..43 1990-Jan-??
+ 3.044 1991-Jan-12
+
+ Larry 4.000 1991-Mar-21
+
+ 4.001..3 1991-Apr-12
+ 4.004..9 1991-Jun-07
+ 4.010 1991-Jun-10
+ 4.011..18 1991-Nov-05
+ 4.019 1991-Nov-11 Stable.
+ 4.020..33 1992-Jun-08
+ 4.034 1992-Jun-11
+ 4.035 1992-Jun-23
+ Larry 4.036 1993-Feb-05 Very stable.
+
+ 5.000alpha1 1993-Jul-31
+ 5.000alpha2 1993-Aug-16
+ 5.000alpha3 1993-Oct-10
+ 5.000alpha4 1993-???-??
+ 5.000alpha5 1993-???-??
+ 5.000alpha6 1994-Mar-18
+ 5.003alpha7 1994-Mar-25
+ Andy 5.000alpha8 1994-Apr-04
+ Larry 5.000alpha9 1994-May-05 ext appears.
+ 5.000alpha10 1994-???-??
+ 5.000alpha11 1994-???-??
+ Andy 5.000a11a 1994-Jul-07 To fit 14.
+ 5.000a11b 1994-Jul-14
+ 5.000a11c 1994-Jul-19
+ 5.000a11d 1994-Jul-22
+ Larry 5.000alpha12 1994-???-??
+ Andy 5.000a12a 1994-Aug-08
+ 5.000a12b 1994-Aug-15
+ 5.000a12c 1994-Aug-22
+ 5.000a12d 1994-Aug-22
+ 5.000a12e 1994-Aug-22
+ 5.000a12f 1994-Aug-24
+ 5.000a12g 1994-Aug-24
+ 5.000a12h 1994-Aug-24
+ Larry 5.000beta1 1994-???-??
+ Andy 5.000b1a 1994-???-??
+ Larry 5.000beta2 1994-Sep-14 Core slushified.
+ Andy 5.000b2a 1994-Sep-14
+ 5.000b2b 1994-Sep-17
+ 5.000b2c 1994-Sep-17
+ Larry 5.000beta3 1994-Sep-??
+ Andy 5.000b3a 1994-Sep-18
+ 5.000b3b 1994-Sep-22
+ 5.000b3c 1994-Sep-23
+ 5.000b3d 1994-Sep-27
+ 5.000b3e 1994-Sep-28
+ 5.000b3f 1994-Sep-30
+ 5.000b3g 1994-Oct-04
+ Andy 5.000b3h 1994-Oct-07
+
+ Larry 5.000 1994-Oct-18
+
+ Andy 5.000a 1994-Dec-19
+ 5.000b 1995-Jan-18
+ 5.000c 1995-Jan-18
+ 5.000d 1995-Jan-18
+ 5.000e 1995-Jan-18
+ 5.000f 1995-Jan-18
+ 5.000g 1995-Jan-18
+ 5.000h 1995-Jan-18
+ 5.000i 1995-Jan-26
+ 5.000j 1995-Feb-07
+ 5.000k 1995-Feb-11
+ 5.000l 1995-Feb-21
+ 5.000m 1995-???-??
+ 5.000n 1995-Mar-07
+
+ Larry 5.001 1995-Mar-13
+
+ Andy 5.001a 1995-Mar-15
+ 5.001b 1995-Mar-31
+ 5.001c 1995-Apr-07
+ 5.001d 1995-Apr-14
+ 5.001e 1995-Apr-18 Stable.
+ 5.001f 1995-May-31
+ 5.001g 1995-May-25
+ 5.001h 1995-May-25
+ 5.001i 1995-May-30
+ 5.001j 1995-Jun-05
+ 5.001k 1995-Jun-06
+ 5.001l 1995-Jun-06 Stable.
+ 5.001m 1995-Jul-02 Very stable.
+ 5.001n 1995-Oct-31 Very unstable.
+ 5.002beta1 1995-Nov-21
+ 5.002b1a 1995-Nov-??
+ 5.002b1b 1995-Dec-04
+ 5.002b1c 1995-Dec-04
+ 5.002b1d 1995-Dec-04
+ 5.002b1e 1995-Dec-08
+ 5.002b1f 1995-Dec-08
+ Tom 5.002b1g 1995-Dec-21 Doc release.
+ Andy 5.002b1h 1996-Jan-05
+ 5.002b2 1996-Jan-14
+ Larry 5.002b3 1996-Feb-02
+ Andy 5.002gamma 1996-Feb-11
+ Larry 5.002delta 1996-Feb-27
+
+ Larry 5.002 1996-Feb-29 Prototypes.
+
+ Charles 5.002_01 1996-Mar-25
+
+ 5.003 1996-Jun-25 Security release.
+
+ 5.003_01 1996-Jul-31
+ Nick 5.003_02 1996-Aug-10
+ Andy 5.003_03 1996-Aug-28
+ 5.003_04 1996-Sep-02
+ 5.003_05 1996-Sep-12
+ 5.003_06 1996-Oct-07
+ 5.003_07 1996-Oct-10
+ Chip 5.003_08 1996-Nov-19
+ 5.003_09 1996-Nov-26
+ 5.003_10 1996-Nov-29
+ 5.003_11 1996-Dec-06
+ 5.003_12 1996-Dec-19
+ 5.003_13 1996-Dec-20
+ 5.003_14 1996-Dec-23
+ 5.003_15 1996-Dec-23
+ 5.003_16 1996-Dec-24
+ 5.003_17 1996-Dec-27
+ 5.003_18 1996-Dec-31
+ 5.003_19 1997-Jan-04
+ 5.003_20 1997-Jan-07
+ 5.003_21 1997-Jan-15
+ 5.003_22 1997-Jan-16
+ 5.003_23 1997-Jan-25
+ 5.003_24 1997-Jan-29
+ 5.003_25 1997-Feb-04
+ 5.003_26 1997-Feb-10
+ 5.003_27 1997-Feb-18
+ 5.003_28 1997-Feb-21
+ 5.003_90 1997-Feb-25 Ramping up to the 5.004 release.
+ 5.003_91 1997-Mar-01
+ 5.003_92 1997-Mar-06
+ 5.003_93 1997-Mar-10
+ 5.003_94 1997-Mar-22
+ 5.003_95 1997-Mar-25
+ 5.003_96 1997-Apr-01
+ 5.003_97 1997-Apr-03 Fairly widely used.
+ 5.003_97a 1997-Apr-05
+ 5.003_97b 1997-Apr-08
+ 5.003_97c 1997-Apr-10
+ 5.003_97d 1997-Apr-13
+ 5.003_97e 1997-Apr-15
+ 5.003_97f 1997-Apr-17
+ 5.003_97g 1997-Apr-18
+ 5.003_97h 1997-Apr-24
+ 5.003_97i 1997-Apr-25
+ 5.003_97j 1997-Apr-28
+ 5.003_98 1997-Apr-30
+ 5.003_99 1997-May-01
+ 5.003_99a 1997-May-09
+ p54rc1 1997-May-12 Release Candidates.
+ p54rc2 1997-May-14
+
+ Chip 5.004 1997-May-15 A major maintenance release.
+
+ Tim 5.004_01 1997-Jun-13 The 5.004 maintenance track.
+ 5.004_02 1997-Aug-07
+ 5.004_03 1997-Sep-05
+ 5.004_04 1997-Oct-15
+ 5.004m5t1 1998-Mar-04 Maintenance Trials (for 5.004_05).
+ 5.004_04-m2 1997-May-01
+ 5.004_04-m3 1998-May-15
+ 5.004_04-m4 1998-May-19
+ 5.004_04-MT5 1998-Jul-21
+ 5.004_04-MT6 1998-Oct-09
+ 5.004_04-MT7 1998-Nov-22
+ 5.004_04-MT8 1998-Dec-03
+ 5.004_04-MT9 1999-***-**
+
+ Malcolm 5.004_50 1997-Sep-09 The 5.005 development track.
+ 5.004_51 1997-Oct-02
+ 5.004_52 1997-Oct-15
+ 5.004_53 1997-Oct-16
+ 5.004_54 1997-Nov-14
+ 5.004_55 1997-Nov-25
+ 5.004_56 1997-Dec-18
+ 5.004_57 1998-Feb-03
+ 5.004_58 1998-Feb-06
+ 5.004_59 1998-Feb-13
+ 5.004_60 1998-Feb-20
+ 5.004_61 1998-Feb-27
+ 5.004_62 1998-Mar-06
+ 5.004_63 1998-Mar-17
+ 5.004_64 1998-Apr-03
+ 5.004_65 1998-May-15
+ 5.004_66 1998-May-29
+ Sarathy 5.004_67 1998-Jun-15
+ 5.004_68 1998-Jun-23
+ 5.004_69 1998-Jun-29
+ 5.004_70 1998-Jul-06
+ 5.004_71 1998-Jul-09
+ 5.004_72 1998-Jul-12
+ 5.004_73 1998-Jul-13
+ 5.004_74 1998-Jul-14 5.005 beta candidate.
+ 5.004_75 1998-Jul-15 5.005 beta1.
+ 5.004_76 1998-Jul-21 5.005 beta2.
+ 5.005 1998-Jul-22 Oneperl.
+
+ Sarathy 5.005_01 1998-Jul-27 The 5.005 maintenance track.
+ 5.005_02-T1 1998-Aug-02
+ 5.005_02-T2 1998-Aug-05
+ 5.005_02 1998-Aug-08
+ Graham 5.005_03-MT1 1998-Nov-30
+ 5.005_03-MT2 1999-Jan-04
+ 5.005_03-MT3 1999-Jan-17
+ 5.005_03-MT4 1999-Jan-26
+ 5.005_03-MT5 1999-Jan-28
+ 5.005_03-MT6 1999-Mar-04
+ 5.005_03 1999-Mar-28
+
+ Sarathy 5.005_50 1998-Jul-26 The 5.006 development track.
+ 5.005_51 1998-Aug-10
+ 5.005_52 1998-Sep-25
+ 5.005_53 1998-Oct-31
+ 5.005_54 1998-Nov-30
+ 5.005_55 1999-Feb-16
+ 5.005_56 1999-Mar-01
+
+=head2 SELECTED RELEASE SIZES
+
+For example the notation "core: 212 29" in the release 1.000 means that
+it had in the core 212 kilobytes, in 29 files. The "core".."doc" are
+explained below.
+
+ release core lib ext t doc
+ ======================================================================
+
+ 1.000 212 29 - - - - 38 51 62 3
+ 1.014 219 29 - - - - 39 52 68 4
+ 2.000 309 31 2 3 - - 55 57 92 4
+ 2.001 312 31 2 3 - - 55 57 94 4
+ 3.000 508 36 24 11 - - 79 73 156 5
+ 3.044 645 37 61 20 - - 90 74 190 6
+ 4.000 635 37 59 20 - - 91 75 198 4
+ 4.019 680 37 85 29 - - 98 76 199 4
+ 4.036 709 37 89 30 - - 98 76 208 5
+ 5.000alpha2 785 50 114 32 - - 112 86 209 5
+ 5.000alpha3 801 50 117 33 - - 121 87 209 5
+ 5.000alpha9 1022 56 149 43 116 29 125 90 217 6
+ 5.000a12h 978 49 140 49 205 46 152 97 228 9
+ 5.000b3h 1035 53 232 70 216 38 162 94 218 21
+ 5.000 1038 53 250 76 216 38 154 92 536 62
+ 5.001m 1071 54 388 82 240 38 159 95 544 29
+ 5.002 1121 54 661 101 287 43 155 94 847 35
+ 5.003 1129 54 680 102 291 43 166 100 853 35
+ 5.003_07 1231 60 748 106 396 53 213 137 976 39
+ 5.004 1351 60 1230 136 408 51 355 161 1587 55
+ 5.004_01 1356 60 1258 138 410 51 358 161 1587 55
+ 5.004_04 1375 60 1294 139 413 51 394 162 1629 55
+ 5.004_51 1401 61 1260 140 413 53 358 162 1594 56
+ 5.004_53 1422 62 1295 141 438 70 394 162 1637 56
+ 5.004_56 1501 66 1301 140 447 74 408 165 1648 57
+ 5.004_59 1555 72 1317 142 448 74 424 171 1678 58
+ 5.004_62 1602 77 1327 144 629 92 428 173 1674 58
+ 5.004_65 1626 77 1358 146 615 92 446 179 1698 60
+ 5.004_68 1856 74 1382 152 619 92 463 187 1784 60
+ 5.004_70 1863 75 1456 154 675 92 494 194 1809 60
+ 5.004_73 1874 76 1467 152 762 102 506 196 1883 61
+ 5.004_75 1877 76 1467 152 770 103 508 196 1896 62
+ 5.005 1896 76 1469 152 795 103 509 197 1945 63
+
+The "core"..."doc" mean the following files from the Perl source code
+distribution. The glob notation ** means recursively, (.) means
+regular files.
+
+ core *.[hcy]
+ lib lib/**/*.p[ml]
+ ext ext/**/*.{[hcyt],xs,pm}
+ t t/**/*(.)
+ doc {README*,INSTALL,*[_.]man{,.?},pod/**/*.pod}
+
+Here are some statistics for the other subdirectories and one file in
+the Perl source distribution for somewhat more selected releases.
+
+ ======================================================================
+ Legend: kB #
+
+ 1.014 2.001 3.044 4.000 4.019 4.036
+
+ atarist - - - - - - - - - - 113 31
+ Configure 31 1 37 1 62 1 73 1 83 1 86 1
+ eg - - 34 28 47 39 47 39 47 39 47 39
+ emacs - - - - - - 67 4 67 4 67 4
+ h2pl - - - - 12 12 12 12 12 12 12 12
+ hints - - - - - - - - 5 42 11 56
+ msdos - - - - 41 13 57 15 58 15 60 15
+ os2 - - - - 63 22 81 29 81 29 113 31
+ usub - - - - 21 16 25 7 43 8 43 8
+ x2p 103 17 104 17 137 17 147 18 152 19 154 19
+
+ ======================================================================
+
+ 5.000a2 5.000a12h 5.000b3h 5.000 5.001m 5.002 5.003
+
+ atarist 113 31 113 31 - - - - - - - - - -
+ bench - - 0 1 - - - - - - - - - -
+ Bugs 2 5 26 1 - - - - - - - - - -
+ dlperl 40 5 - - - - - - - - - - - -
+ do 127 71 - - - - - - - - - - - -
+ Configure - - 153 1 159 1 160 1 180 1 201 1 201 1
+ Doc - - 26 1 75 7 11 1 11 1 - - - -
+ eg 79 58 53 44 51 43 54 44 54 44 54 44 54 44
+ emacs 67 4 104 6 104 6 104 1 104 6 108 1 108 1
+ h2pl 12 12 12 12 12 12 12 12 12 12 12 12 12 12
+ hints 11 56 12 46 18 48 18 48 44 56 73 59 77 60
+ msdos 60 15 60 15 - - - - - - - - - -
+ os2 113 31 113 31 - - - - - - 84 17 56 10
+ U - - 62 8 112 42 - - - - - - - -
+ usub 43 8 - - - - - - - - - - - -
+ utils - - - - - - - - - - 87 7 88 7
+ vms - - 80 7 123 9 184 15 304 20 500 24 475 26
+ x2p 171 22 171 21 162 20 162 20 279 20 280 20 280 20
+
+ ======================================================================
+
+ 5.003_07 5.004 5.004_04 5.004_62 5.004_65 5.004_68
+
+ beos - - - - - - - - 1 1 1 1
+ Configure 217 1 225 1 225 1 240 1 248 1 256 1
+ cygwin32 - - 23 5 23 5 23 5 24 5 24 5
+ djgpp - - - - - - 14 5 14 5 14 5
+ eg 54 44 81 62 81 62 81 62 81 62 81 62
+ emacs 143 1 194 1 204 1 212 2 212 2 212 2
+ h2pl 12 12 12 12 12 12 12 12 12 12 12 12
+ hints 90 62 129 69 132 71 144 72 151 74 155 74
+ os2 117 42 121 42 127 42 127 44 129 44 129 44
+ plan9 79 15 82 15 82 15 82 15 82 15 82 15
+ Porting 51 1 94 2 109 4 203 6 234 8 241 9
+ qnx - - 1 2 1 2 1 2 1 2 1 2
+ utils 97 7 112 8 118 8 124 8 156 9 159 9
+ vms 505 27 518 34 524 34 538 34 569 34 569 34
+ win32 - - 285 33 378 36 470 39 493 39 575 41
+ x2p 280 19 281 19 281 19 281 19 282 19 281 19
+
+ ======================================================================
+
+ 5.004_70 5.004_73 5.004_75 5.005
+
+ beos 1 1 1 1 1 1 1 1
+ Configure 256 1 256 1 264 1 264 1
+ cygwin32 24 5 24 5 24 5 24 5
+ djgpp 14 5 14 5 14 5 14 5
+ eg 86 65 86 65 86 65 86 65
+ emacs 262 2 262 2 262 2 262 2
+ h2pl 12 12 12 12 12 12 12 12
+ hints 157 74 157 74 159 74 160 74
+ mpeix - - - - 5 3 5 3
+ os2 129 44 139 44 142 44 143 44
+ plan9 82 15 82 15 82 15 82 15
+ Porting 241 9 253 9 259 10 264 12
+ qnx 1 2 1 2 1 2 1 2
+ utils 160 9 160 9 160 9 160 9
+ vms 570 34 572 34 573 34 575 34
+ win32 577 41 585 41 585 41 587 41
+ x2p 281 19 281 19 281 19 281 19
+
+=head2 SELECTED PATCH SIZES
+
+The "diff lines kb" means that for example the patch 5.003_08, to be
+applied on top of the 5.003_07 (or whatever was before the 5.003_08)
+added lines for 110 kilobytes, it removed lines for 19 kilobytes, and
+changed lines for 424 kilobytes. Just the lines themselves are
+counted, not their context. The "+ - !" become from the diff(1)
+context diff output format.
+
+ Pump- Release Date diff lines kB
+ king -------------
+ + - !
+ ===========================================================================
+
+ Chip 5.003_08 1996-Nov-19 110 19 424
+ 5.003_09 1996-Nov-26 38 9 248
+ 5.003_10 1996-Nov-29 29 2 27
+ 5.003_11 1996-Dec-06 73 12 165
+ 5.003_12 1996-Dec-19 275 6 436
+ 5.003_13 1996-Dec-20 95 1 56
+ 5.003_14 1996-Dec-23 23 7 333
+ 5.003_15 1996-Dec-23 0 0 1
+ 5.003_16 1996-Dec-24 12 3 50
+ 5.003_17 1996-Dec-27 19 1 14
+ 5.003_18 1996-Dec-31 21 1 32
+ 5.003_19 1997-Jan-04 80 3 85
+ 5.003_20 1997-Jan-07 18 1 146
+ 5.003_21 1997-Jan-15 38 10 221
+ 5.003_22 1997-Jan-16 4 0 18
+ 5.003_23 1997-Jan-25 71 15 119
+ 5.003_24 1997-Jan-29 426 1 20
+ 5.003_25 1997-Feb-04 21 8 169
+ 5.003_26 1997-Feb-10 16 1 15
+ 5.003_27 1997-Feb-18 32 10 38
+ 5.003_28 1997-Feb-21 58 4 66
+ 5.003_90 1997-Feb-25 22 2 34
+ 5.003_91 1997-Mar-01 37 1 39
+ 5.003_92 1997-Mar-06 16 3 69
+ 5.003_93 1997-Mar-10 12 3 15
+ 5.003_94 1997-Mar-22 407 7 200
+ 5.003_95 1997-Mar-25 41 1 37
+ 5.003_96 1997-Apr-01 283 5 261
+ 5.003_97 1997-Apr-03 13 2 34
+ 5.003_97a 1997-Apr-05 57 1 27
+ 5.003_97b 1997-Apr-08 14 1 20
+ 5.003_97c 1997-Apr-10 20 1 16
+ 5.003_97d 1997-Apr-13 8 0 16
+ 5.003_97e 1997-Apr-15 15 4 46
+ 5.003_97f 1997-Apr-17 7 1 33
+ 5.003_97g 1997-Apr-18 6 1 42
+ 5.003_97h 1997-Apr-24 23 3 68
+ 5.003_97i 1997-Apr-25 23 1 31
+ 5.003_97j 1997-Apr-28 36 1 49
+ 5.003_98 1997-Apr-30 171 12 539
+ 5.003_99 1997-May-01 6 0 7
+ 5.003_99a 1997-May-09 36 2 61
+ p54rc1 1997-May-12 8 1 11
+ p54rc2 1997-May-14 6 0 40
+
+ 5.004 1997-May-15 4 0 4
+
+ Tim 5.004_01 1997-Jun-13 222 14 57
+ 5.004_02 1997-Aug-07 112 16 119
+ 5.004_03 1997-Sep-05 109 0 17
+ 5.004_04 1997-Oct-15 66 8 173
+
+=head1 THE KEEPERS OF THE RECORDS
+
+Jarkko Hietaniemi <F<jhi@iki.fi>>.
+
+Thanks to the collective memory of the Perlfolk. In addition to the
+Keepers of the Pumpkin also Alan Champion, Andreas König, John
+Macdonald, Matthias Neeracher, Michael Peppler, Randal Schwartz, and
+Paul D. Smith sent corrections and additions.
+
+=cut
diff --git a/gnu/usr.bin/perl/pod/perlmodinstall.pod b/gnu/usr.bin/perl/pod/perlmodinstall.pod
new file mode 100644
index 00000000000..b6176f0927f
--- /dev/null
+++ b/gnu/usr.bin/perl/pod/perlmodinstall.pod
@@ -0,0 +1,430 @@
+=head1 NAME
+
+perlmodinstall - Installing CPAN Modules
+
+=head1 DESCRIPTION
+
+You can think of a module as the fundamental unit of reusable Perl
+code; see L<perlmod> for details. Whenever anyone creates a chunk of
+Perl code that they think will be useful to the world, they register
+as a Perl developer at http://www.perl.com/CPAN/modules/04pause.html
+so that they can then upload their code to the CPAN. The CPAN is the
+Comprehensive Perl Archive Network and can be accessed at
+http://www.perl.com/CPAN/.
+
+This documentation is for people who want to download CPAN modules
+and install them on their own computer.
+
+=head2 PREAMBLE
+
+You have a file ending in .tar.gz (or, less often, .zip). You know
+there's a tasty module inside. There are four steps you must now
+take:
+
+=over 5
+
+=item B<DECOMPRESS> the file
+
+=item B<UNPACK> the file into a directory
+
+=item B<BUILD> the module (sometimes unnecessary)
+
+=item B<INSTALL> the module.
+
+=back
+
+Here's how to perform each step for each operating system. This is
+I<not> a substitute for reading the README and INSTALL files that
+might have come with your module!
+
+Also note that these instructions are tailored for installing the
+module into your system's repository of Perl modules. But you can
+install modules into any directory you wish. For instance, where I
+say C<perl Makefile.PL>, you can substitute C<perl
+Makefile.PL PREFIX=/my/perl_directory> to install the modules
+into C</my/perl_directory>. Then you can use the modules
+from your Perl programs with C<use lib
+"/my/perl_directory/lib/site_perl";> or sometimes just C<use
+"/my/perl_directory";>.
+
+=over 4
+
+=item *
+
+B<If you're on Unix,>
+
+You can use Andreas Koenig's CPAN module
+( http://www.perl.com/CPAN/modules/by-module/CPAN )
+to automate the following steps, from DECOMPRESS through INSTALL.
+
+A. DECOMPRESS
+
+Decompress the file with C<gzip -d yourmodule.tar.gz>
+
+You can get gzip from ftp://prep.ai.mit.edu/pub/gnu.
+
+Or, you can combine this step with the next to save disk space:
+
+ gzip -dc yourmodule.tar.gz | tar -xof -
+
+B. UNPACK
+
+Unpack the result with C<tar -xof yourmodule.tar>
+
+C. BUILD
+
+Go into the newly-created directory and type:
+
+ perl Makefile.PL
+ make
+ make test
+
+D. INSTALL
+
+While still in that directory, type:
+
+ make install
+
+Make sure you have the appropriate permissions to install the module
+in your Perl 5 library directory. Often, you'll need to be root.
+
+That's all you need to do on Unix systems with dynamic linking.
+Most Unix systems have dynamic linking -- if yours doesn't, or if for
+another reason you have a statically-linked perl, B<and> the
+module requires compilation, you'll need to build a new Perl binary
+that includes the module. Again, you'll probably need to be root.
+
+=item *
+
+B<If you're running Windows 95 or NT with the ActiveState port of Perl>
+
+ A. DECOMPRESS
+
+You can use the shareware Winzip ( http://www.winzip.com ) to
+decompress and unpack modules.
+
+ B. UNPACK
+
+If you used WinZip, this was already done for you.
+
+ C. BUILD
+
+Does the module require compilation (i.e. does it have files
+that end in .xs, .c, .h, .y, .cc, .cxx, or .C)? If it does, you're on
+your own. You can try compiling it yourself if you have a C compiler.
+If you're successful, consider uploading the resulting binary to the
+CPAN for others to use. If it doesn't, go to INSTALL.
+
+ D. INSTALL
+
+Copy the module into your Perl's I<lib> directory. That'll be one
+of the directories you see when you type
+
+ perl -e 'print "@INC"'
+
+=item *
+
+B<If you're running Windows 95 or NT with the core Windows distribution of Perl,>
+
+ A. DECOMPRESS
+
+When you download the module, make sure it ends in either
+C<.tar.gz> or C<.zip>. Windows browsers sometimes
+download C<.tar.gz> files as C<_tar.tar>, because
+early versions of Windows prohibited more than one dot in a filename.
+
+You can use the shareware WinZip ( http://www.winzip.com ) to
+decompress and unpack modules.
+
+Or, you can use InfoZip's C<unzip> utility (
+http://www.cdrom.com/pub/infozip/Info-Zip.html ) to uncompress
+C<.zip> files; type C<unzip yourmodule.zip> in
+your shell.
+
+Or, if you have a working C<tar> and C<gzip>, you can
+type
+
+ gzip -cd yourmodule.tar.gz | tar xvf -
+
+in the shell to decompress C<yourmodule.tar.gz>. This will
+UNPACK your module as well.
+
+ B. UNPACK
+
+All of the methods in DECOMPRESS will have done this for you.
+
+ C. BUILD
+
+Go into the newly-created directory and type:
+
+ perl Makefile.PL
+ dmake
+ dmake test
+
+Depending on your perl configuration, C<dmake> might not be
+available. You might have to substitute whatever C<perl
+-V:make> says. (Usually, that will be C<nmake> or
+C<make>.)
+
+ D. INSTALL
+
+While still in that directory, type:
+
+ dmake install
+
+=item *
+
+B<If you're using a Macintosh,>
+
+A. DECOMPRESS
+
+In general, all Macintosh decompression utilities mentioned here
+can be found in the Info-Mac Hyperarchive
+( http://hyperarchive.lcs.mit.edu/HyperArchive.html ).
+Specificly the "Commpress & Translate" listing
+( http://hyperarchive.lcs.mit.edu/HyperArchive/Abstracts/cmp/HyperArchive.html ).
+
+
+You can either use the shareware StuffIt Expander
+( http://hyperarchive.lcs.mit.edu/HyperArchive/Archive/cmp/stuffit-expander-401.hqx )
+in combination with I<DropStuff with Expander Enhancer>
+( http://hyperarchive.lcs.mit.edu/HyperArchive/Archive/cmp/drop-stuff-with-ee-40.hqx )
+or the freeware MacGzip (
+http://persephone.cps.unizar.es/general/gente/spd/gzip/gzip.html ).
+
+
+B. UNPACK
+
+If you're using DropStuff or Stuffit, you can just extract the tar
+archive. Otherwise, you can use the freeware I<suntar>
+( http://hyperarchive.lcs.mit.edu/HyperArchive/Archive/cmp/suntar-221.hqx )
+or I<Tar> ( http://hyperarchive.lcs.mit.edu/HyperArchive/Archive/cmp/tar-40b.hqx ).
+
+C. BUILD
+
+Does the module require compilation?
+
+1. If it does,
+
+Overview: You need MPW and a combination of new and old CodeWarrior
+compilers for MPW and libraries. Makefiles created for building under
+MPW use the Metrowerks compilers. It's most likely possible to build
+without other compilers, but it has not been done successfully, to our
+knowledge. Read the documentation in MacPerl: Power and Ease (
+http://www.ptf.com/macperl/ ) on porting/building extensions, or find
+an existing precompiled binary, or hire someone to build it for you.
+
+Or, ask someone on the mac-perl mailing list (mac-perl@iis.ee.ethz.ch)
+to build it for you. To subscribe to the mac-perl mailing list, send
+mail to mac-perl-request@iis.ee.ethz.ch.
+
+2. If the module doesn't require compilation, go to INSTALL.
+
+D. INSTALL
+
+Make sure the newlines for the modules are in Mac format, not Unix format.
+If they are not then you might have decompressed them incorrectly. Check
+your decompression and unpacking utilities settings to make sure they are
+translating text files properly.
+As a last resort, you can use the perl one-liner:
+
+ perl -i.bak -pe 's/(?:\015)?\012/\015/g' filenames
+
+on the source files.
+
+Move the files manually into the correct folders.
+
+Move the files to their final destination: This will
+most likely be in C<$ENV{MACPERL}site_lib:> (i.e.,
+C<HD:MacPerl folder:site_lib:>). You can add new paths to
+the default C<@INC> in the Preferences menu item in the
+MacPerl application (C<$ENV{MACPERL}site_lib:> is added
+automagically). Create whatever directory structures are required
+(i.e., for C<Some::Module>, create
+C<$ENV{MACPERL}site_lib:Some:> and put
+C<Module.pm> in that directory).
+
+Run the following script (or something like it):
+
+ #!perl -w
+ use AutoSplit;
+ my $dir = "${MACPERL}site_perl";
+ autosplit("$dir:Some:Module.pm", "$dir:auto", 0, 1, 1);
+
+Eventually there should be a way to automate the installation process; some
+solutions exist, but none are ready for the general public yet.
+
+=item *
+
+B<If you're on the DJGPP port of DOS,>
+
+ A. DECOMPRESS
+
+djtarx ( ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2/ )
+will both uncompress and unpack.
+
+ B. UNPACK
+
+See above.
+
+ C. BUILD
+
+Go into the newly-created directory and type:
+
+ perl Makefile.PL
+ make
+ make test
+
+You will need the packages mentioned in C<Readme.dos>
+in the Perl distribution.
+
+ D. INSTALL
+
+While still in that directory, type:
+
+ make install
+
+You will need the packages mentioned in Readme.dos in the Perl distribution.
+
+=item *
+
+B<If you're on OS/2,>
+
+Get the EMX development suite and gzip/tar, from either Hobbes (
+http://hobbes.nmsu.edu ) or Leo ( http://www.leo.org ), and then follow
+the instructions for Unix.
+
+=item *
+
+B<If you're on VMS,>
+
+When downloading from CPAN, save your file with a C<.tgz>
+extension instead of C<.tar.gz>. All other periods in the
+filename should be replaced with underscores. For example,
+C<Your-Module-1.33.tar.gz> should be downloaded as
+C<Your-Module-1_33.tgz>.
+
+A. DECOMPRESS
+
+Type
+
+ gzip -d Your-Module.tgz
+
+or, for zipped modules, type
+
+ unzip Your-Module.zip
+
+Executables for gzip, zip, and VMStar ( Alphas:
+http://www.openvms.digital.com/cd/000TOOLS/ALPHA/ and Vaxen:
+http://www.openvms.digital.com/cd/000TOOLS/VAX/ ).
+
+gzip and tar
+are also available at ftp://ftp.digital.com/pub/VMS.
+
+Note that GNU's gzip/gunzip is not the same as Info-ZIP's zip/unzip
+package. The former is a simple compression tool; the latter permits
+creation of multi-file archives.
+
+B. UNPACK
+
+If you're using VMStar:
+
+ VMStar xf Your-Module.tar
+
+Or, if you're fond of VMS command syntax:
+
+ tar/extract/verbose Your_Module.tar
+
+C. BUILD
+
+Make sure you have MMS (from Digital) or the freeware MMK ( available from MadGoat at http://www.madgoat.com ). Then type this to create the
+DESCRIP.MMS for the module:
+
+ perl Makefile.PL
+
+Now you're ready to build:
+
+ mms
+ mms test
+
+Substitute C<mmk> for C<mms> above if you're using MMK.
+
+D. INSTALL
+
+Type
+
+ mms install
+
+Substitute C<mmk> for C<mms> above if you're using MMK.
+
+=item *
+
+B<If you're on MVS>,
+
+Introduce the .tar.gz file into an HFS as binary; don't translate from
+ASCII to EBCDIC.
+
+A. DECOMPRESS
+
+ Decompress the file with C<gzip -d yourmodule.tar.gz>
+
+ You can get gzip from
+ http://www.s390.ibm.com/products/oe/bpxqp1.html.
+
+B. UNPACK
+
+Unpack the result with
+
+ pax -o to=IBM-1047,from=ISO8859-1 -r < yourmodule.tar
+
+The BUILD and INSTALL steps are identical to those for Unix. Some
+modules generate Makefiles that work better with GNU make, which is
+available from http://www.mks.com/s390/gnu/index.htm.
+
+=back
+
+=head1 HEY
+
+If you have any suggested changes for this page, let me know. Please
+don't send me mail asking for help on how to install your modules.
+There are too many modules, and too few Orwants, for me to be able to
+answer or even acknowledge all your questions. Contact the module
+author instead, or post to comp.lang.perl.modules, or ask someone
+familiar with Perl on your operating system.
+
+=head1 AUTHOR
+
+Jon Orwant
+
+orwant@tpj.com
+
+The Perl Journal, http://tpj.com
+
+with invaluable help from Brandon Allbery, Charles Bailey, Graham
+Barr, Dominic Dunlop, Jarkko Hietaniemi, Ben Holzman, Tom Horsley,
+Nick Ing-Simmons, Tuomas J. Lukka, Laszlo Molnar, Chris Nandor, Alan
+Olsen, Peter Prymmer, Gurusamy Sarathy, Christoph Spalinger, Dan
+Sugalski, Larry Virden, and Ilya Zakharevich.
+
+July 22, 1998
+
+=head1 COPYRIGHT
+
+Copyright (C) 1998 Jon Orwant. All Rights Reserved.
+
+Permission is granted to make and distribute verbatim copies of this
+documentation provided the copyright notice and this permission notice are
+preserved on all copies.
+
+Permission is granted to copy and distribute modified versions of this
+documentation under the conditions for verbatim copying, provided also
+that they are marked clearly as modified versions, that the authors'
+names and title are unchanged (though subtitles and additional
+authors' names may be added), and that the entire resulting derived
+work is distributed under the terms of a permission notice identical
+to this one.
+
+Permission is granted to copy and distribute translations of this
+documentation into another language, under the above conditions for
+modified versions.
+
diff --git a/gnu/usr.bin/perl/pod/perlopentut.pod b/gnu/usr.bin/perl/pod/perlopentut.pod
new file mode 100644
index 00000000000..6e6091ab493
--- /dev/null
+++ b/gnu/usr.bin/perl/pod/perlopentut.pod
@@ -0,0 +1,862 @@
+=head1 NAME
+
+perlopentut - tutorial on opening things in Perl
+
+=head1 DESCRIPTION
+
+Perl has two simple, built-in ways to open files: the shell way for
+convenience, and the C way for precision. The choice is yours.
+
+=head1 Open E<agrave> la shell
+
+Perl's C<open> function was designed to mimic the way command-line
+redirection in the shell works. Here are some basic examples
+from the shell:
+
+ $ myprogram file1 file2 file3
+ $ myprogram < inputfile
+ $ myprogram > outputfile
+ $ myprogram >> outputfile
+ $ myprogram | otherprogram
+ $ otherprogram | myprogram
+
+And here are some more advanced examples:
+
+ $ otherprogram | myprogram f1 - f2
+ $ otherprogram 2>&1 | myprogram -
+ $ myprogram <&3
+ $ myprogram >&4
+
+Programmers accustomed to constructs like those above can take comfort
+in learning that Perl directly supports these familiar constructs using
+virtually the same syntax as the shell.
+
+=head2 Simple Opens
+
+The C<open> function takes two arguments: the first is a filehandle,
+and the second is a single string comprising both what to open and how
+to open it. C<open> returns true when it works, and when it fails,
+returns a false value and sets the special variable $! to reflect
+the system error. If the filehandle was previously opened, it will
+be implicitly closed first.
+
+For example:
+
+ open(INFO, "datafile") || die("can't open datafile: $!");
+ open(INFO, "< datafile") || die("can't open datafile: $!");
+ open(RESULTS,"> runstats") || die("can't open runstats: $!");
+ open(LOG, ">> logfile ") || die("can't open logfile: $!");
+
+If you prefer the low-punctuation version, you could write that this way:
+
+ open INFO, "< datafile" or die "can't open datafile: $!";
+ open RESULTS,"> runstats" or die "can't open runstats: $!";
+ open LOG, ">> logfile " or die "can't open logfile: $!";
+
+A few things to notice. First, the leading less-than is optional.
+If omitted, Perl assumes that you want to open the file for reading.
+
+The other important thing to notice is that, just as in the shell,
+any white space before or after the filename is ignored. This is good,
+because you wouldn't want these to do different things:
+
+ open INFO, "<datafile"
+ open INFO, "< datafile"
+ open INFO, "< datafile"
+
+Ignoring surround whitespace also helps for when you read a filename in
+from a different file, and forget to trim it before opening:
+
+ $filename = <INFO>; # oops, \n still there
+ open(EXTRA, "< $filename") || die "can't open $filename: $!";
+
+This is not a bug, but a feature. Because C<open> mimics the shell in
+its style of using redirection arrows to specify how to open the file, it
+also does so with respect to extra white space around the filename itself
+as well. For accessing files with naughty names, see L</"Dispelling
+the Dweomer">.
+
+=head2 Pipe Opens
+
+In C, when you want to open a file using the standard I/O library,
+you use the C<fopen> function, but when opening a pipe, you use the
+C<popen> function. But in the shell, you just use a different redirection
+character. That's also the case for Perl. The C<open> call
+remains the same--just its argument differs.
+
+If the leading character is a pipe symbol, C<open) starts up a new
+command and open a write-only filehandle leading into that command.
+This lets you write into that handle and have what you write show up on
+that command's standard input. For example:
+
+ open(PRINTER, "| lpr -Plp1") || die "cannot fork: $!";
+ print PRINTER "stuff\n";
+ close(PRINTER) || die "can't close lpr: $!";
+
+If the trailing character is a pipe, you start up a new command and open a
+read-only filehandle leading out of that command. This lets whatever that
+command writes to its standard output show up on your handle for reading.
+For example:
+
+ open(NET, "netstat -i -n |") || die "cannot fork: $!";
+ while (<NET>) { } # do something with input
+ close(NET) || die "can't close netstat: $!";
+
+What happens if you try to open a pipe to or from a non-existent command?
+In most systems, such an C<open> will not return an error. That's
+because in the traditional C<fork>/C<exec> model, running the other
+program happens only in the forked child process, which means that
+the failed C<exec> can't be reflected in the return value of C<open>.
+Only a failed C<fork> shows up there. See L<perlfaq8/"Why doesn't open()
+return an error when a pipe open fails?"> to see how to cope with this.
+There's also an explanation in L<perlipc>.
+
+If you would like to open a bidirectional pipe, the IPC::Open2
+library will handle this for you. Check out L<perlipc/"Bidirectional
+Communication with Another Process">
+
+=head2 The Minus File
+
+Again following the lead of the standard shell utilities, Perl's
+C<open> function treats a file whose name is a single minus, "-", in a
+special way. If you open minus for reading, it really means to access
+the standard input. If you open minus for writing, it really means to
+access the standard output.
+
+If minus can be used as the default input or default output? What happens
+if you open a pipe into or out of minus? What's the default command it
+would run? The same script as you're current running! This is actually
+a stealth C<fork> hidden inside an C<open> call. See L<perlipc/"Safe Pipe
+Opens"> for details.
+
+=head2 Mixing Reads and Writes
+
+It is possible to specify both read and write access. All you do is
+add a "+" symbol in front of the redirection. But as in the shell,
+using a less-than on a file never creates a new file; it only opens an
+existing one. On the other hand, using a greater-than always clobbers
+(truncates to zero length) an existing file, or creates a brand-new one
+if there isn't an old one. Adding a "+" for read-write doesn't affect
+whether it only works on existing files or always clobbers existing ones.
+
+ open(WTMP, "+< /usr/adm/wtmp")
+ || die "can't open /usr/adm/wtmp: $!";
+
+ open(SCREEN, "+> /tmp/lkscreen")
+ || die "can't open /tmp/lkscreen: $!";
+
+ open(LOGFILE, "+>> /tmp/applog"
+ || die "can't open /tmp/applog: $!";
+
+The first one won't create a new file, and the second one will always
+clobber an old one. The third one will create a new file if necessary
+and not clobber an old one, and it will allow you to read at any point
+in the file, but all writes will always go to the end. In short,
+the first case is substantially more common than the second and third
+cases, which are almost always wrong. (If you know C, the plus in
+Perl's C<open> is historically derived from the one in C's fopen(3S),
+which it ultimately calls.)
+
+In fact, when it comes to updating a file, unless you're working on
+a binary file as in the WTMP case above, you probably don't want to
+use this approach for updating. Instead, Perl's B<-i> flag comes to
+the rescue. The following command takes all the C, C++, or yacc source
+or header files and changes all their foo's to bar's, leaving
+the old version in the original file name with a ".orig" tacked
+on the end:
+
+ $ perl -i.orig -pe 's/\bfoo\b/bar/g' *.[Cchy]
+
+This is a short cut for some renaming games that are really
+the best way to update textfiles. See the second question in
+L<perlfaq5> for more details.
+
+=head2 Filters
+
+One of the most common uses for C<open> is one you never
+even notice. When you process the ARGV filehandle using
+C<E<lt>ARGVE<gt>>, Perl actually does an implicit open
+on each file in @ARGV. Thus a program called like this:
+
+ $ myprogram file1 file2 file3
+
+Can have all its files opened and processed one at a time
+using a construct no more complex than:
+
+ while (<>) {
+ # do something with $_
+ }
+
+If @ARGV is empty when the loop first begins, Perl pretends you've opened
+up minus, that is, the standard input. In fact, $ARGV, the currently
+open file during C<E<lt>ARGVE<gt>> processing, is even set to "-"
+in these circumstances.
+
+You are welcome to pre-process your @ARGV before starting the loop to
+make sure it's to your liking. One reason to do this might be to remove
+command options beginning with a minus. While you can always roll the
+simple ones by hand, the Getopts modules are good for this.
+
+ use Getopt::Std;
+
+ # -v, -D, -o ARG, sets $opt_v, $opt_D, $opt_o
+ getopts("vDo:");
+
+ # -v, -D, -o ARG, sets $args{v}, $args{D}, $args{o}
+ getopts("vDo:", \%args);
+
+Or the standard Getopt::Long module to permit named arguments:
+
+ use Getopt::Long;
+ GetOptions( "verbose" => \$verbose, # --verbose
+ "Debug" => \$debug, # --Debug
+ "output=s" => \$output );
+ # --output=somestring or --output somestring
+
+Another reason for preprocessing arguments is to make an empty
+argument list default to all files:
+
+ @ARGV = glob("*") unless @ARGV;
+
+You could even filter out all but plain, text files. This is a bit
+silent, of course, and you might prefer to mention them on the way.
+
+ @ARGV = grep { -f && -T } @ARGV;
+
+If you're using the B<-n> or B<-p> command-line options, you
+should put changes to @ARGV in a C<BEGIN{}> block.
+
+Remember that a normal C<open> has special properties, in that it might
+call fopen(3S) or it might called popen(3S), depending on what its
+argument looks like; that's why it's sometimes called "magic open".
+Here's an example:
+
+ $pwdinfo = `domainname` =~ /^(\(none\))?$/
+ ? '< /etc/passwd'
+ : 'ypcat passwd |';
+
+ open(PWD, $pwdinfo)
+ or die "can't open $pwdinfo: $!";
+
+This sort of thing also comes into play in filter processing. Because
+C<E<lt>ARGVE<gt>> processing employs the normal, shell-style Perl C<open>,
+it respects all the special things we've already seen:
+
+ $ myprogram f1 "cmd1|" - f2 "cmd2|" f3 < tmpfile
+
+That program will read from the file F<f1>, the process F<cmd1>, standard
+input (F<tmpfile> in this case), the F<f2> file, the F<cmd2> command,
+and finally the F<f3> file.
+
+Yes, this also means that if you have a file named "-" (and so on) in
+your directory, that they won't be processed as literal files by C<open>.
+You'll need to pass them as "./-" much as you would for the I<rm> program.
+Or you could use C<sysopen> as described below.
+
+One of the more interesting applications is to change files of a certain
+name into pipes. For example, to autoprocess gzipped or compressed
+files by decompressing them with I<gzip>:
+
+ @ARGV = map { /^\.(gz|Z)$/ ? "gzip -dc $_ |" : $_ } @ARGV;
+
+Or, if you have the I<GET> program installed from LWP,
+you can fetch URLs before processing them:
+
+ @ARGV = map { m#^\w+://# ? "GET $_ |" : $_ } @ARGV;
+
+It's not for nothing that this is called magic C<E<lt>ARGVE<gt>>.
+Pretty nifty, eh?
+
+=head1 Open E<agrave> la C
+
+If you want the convenience of the shell, then Perl's C<open> is
+definitely the way to go. On the other hand, if you want finer precision
+than C's simplistic fopen(3S) provides, then you should look to Perl's
+C<sysopen>, which is a direct hook into the open(2) system call.
+That does mean it's a bit more involved, but that's the price of
+precision.
+
+C<sysopen> takes 3 (or 4) arguments.
+
+ sysopen HANDLE, PATH, FLAGS, [MASK]
+
+The HANDLE argument is a filehandle just as with C<open>. The PATH is
+a literal path, one that doesn't pay attention to any greater-thans or
+less-thans or pipes or minuses, nor ignore white space. If it's there,
+it's part of the path. The FLAGS argument contains one or more values
+derived from the Fcntl module that have been or'd together using the
+bitwise "|" operator. The final argument, the MASK, is optional; if
+present, it is combined with the user's current umask for the creation
+mode of the file. You should usually omit this.
+
+Although the traditional values of read-only, write-only, and read-write
+are 0, 1, and 2 respectively, this is known not to hold true on some
+systems. Instead, it's best to load in the appropriate constants first
+from the Fcntl module, which supplies the following standard flags:
+
+ O_RDONLY Read only
+ O_WRONLY Write only
+ O_RDWR Read and write
+ O_CREAT Create the file if it doesn't exist
+ O_EXCL Fail if the file already exists
+ O_APPEND Append to the file
+ O_TRUNC Truncate the file
+ O_NONBLOCK Non-blocking access
+
+Less common flags that are sometimes available on some operating systems
+include C<O_BINARY>, C<O_TEXT>, C<O_SHLOCK>, C<O_EXLOCK>, C<O_DEFER>,
+C<O_SYNC>, C<O_ASYNC>, C<O_DSYNC>, C<O_RSYNC>, C<O_NOCTTY>, C<O_NDELAY>
+and C<O_LARGEFILE>. Consult your open(2) manpage or its local equivalent
+for details.
+
+Here's how to use C<sysopen> to emulate the simple C<open> calls we had
+before. We'll omit the C<|| die $!> checks for clarity, but make sure
+you always check the return values in real code. These aren't quite
+the same, since C<open> will trim leading and trailing white space,
+but you'll get the idea:
+
+To open a file for reading:
+
+ open(FH, "< $path");
+ sysopen(FH, $path, O_RDONLY);
+
+To open a file for writing, creating a new file if needed or else truncating
+an old file:
+
+ open(FH, "> $path");
+ sysopen(FH, $path, O_WRONLY | O_TRUNC | O_CREAT);
+
+To open a file for appending, creating one if necessary:
+
+ open(FH, ">> $path");
+ sysopen(FH, $path, O_WRONLY | O_APPEND | O_CREAT);
+
+To open a file for update, where the file must already exist:
+
+ open(FH, "+< $path");
+ sysopen(FH, $path, O_RDWR);
+
+And here are things you can do with C<sysopen> that you cannot do with
+a regular C<open>. As you see, it's just a matter of controlling the
+flags in the third argument.
+
+To open a file for writing, creating a new file which must not previously
+exist:
+
+ sysopen(FH, $path, O_WRONLY | O_EXCL | O_CREAT);
+
+To open a file for appending, where that file must already exist:
+
+ sysopen(FH, $path, O_WRONLY | O_APPEND);
+
+To open a file for update, creating a new file if necessary:
+
+ sysopen(FH, $path, O_RDWR | O_CREAT);
+
+To open a file for update, where that file must not already exist:
+
+ sysopen(FH, $path, O_RDWR | O_EXCL | O_CREAT);
+
+To open a file without blocking, creating one if necessary:
+
+ sysopen(FH, $path, O_WRONLY | O_NONBLOCK | O_CREAT);
+
+=head2 Permissions E<agrave> la mode
+
+If you omit the MASK argument to C<sysopen>, Perl uses the octal value
+0666. The normal MASK to use for executables and directories should
+be 0777, and for anything else, 0666.
+
+Why so permissive? Well, it isn't really. The MASK will be modified
+by your process's current C<umask>. A umask is a number representing
+I<disabled> permissions bits; that is, bits that will not be turned on
+in the created files' permissions field.
+
+For example, if your C<umask> were 027, then the 020 part would
+disable the group from writing, and the 007 part would disable others
+from reading, writing, or executing. Under these conditions, passing
+C<sysopen> 0666 would create a file with mode 0640, since C<0666 &~ 027>
+is 0640.
+
+You should seldom use the MASK argument to C<sysopen()>. That takes
+away the user's freedom to choose what permission new files will have.
+Denying choice is almost always a bad thing. One exception would be for
+cases where sensitive or private data is being stored, such as with mail
+folders, cookie files, and internal temporary files.
+
+=head1 Obscure Open Tricks
+
+=head2 Re-Opening Files (dups)
+
+Sometimes you already have a filehandle open, and want to make another
+handle that's a duplicate of the first one. In the shell, we place an
+ampersand in front of a file descriptor number when doing redirections.
+For example, C<2E<gt>&1> makes descriptor 2 (that's STDERR in Perl)
+be redirected into descriptor 1 (which is usually Perl's STDOUT).
+The same is essentially true in Perl: a filename that begins with an
+ampersand is treated instead as a file descriptor if a number, or as a
+filehandle if a string.
+
+ open(SAVEOUT, ">&SAVEERR") || die "couldn't dup SAVEERR: $!";
+ open(MHCONTEXT, "<&4") || die "couldn't dup fd4: $!";
+
+That means that if a function is expecting a filename, but you don't
+want to give it a filename because you already have the file open, you
+can just pass the filehandle with a leading ampersand. It's best to
+use a fully qualified handle though, just in case the function happens
+to be in a different package:
+
+ somefunction("&main::LOGFILE");
+
+This way if somefunction() is planning on opening its argument, it can
+just use the already opened handle. This differs from passing a handle,
+because with a handle, you don't open the file. Here you have something
+you can pass to open.
+
+If you have one of those tricky, newfangled I/O objects that the C++
+folks are raving about, then this doesn't work because those aren't a
+proper filehandle in the native Perl sense. You'll have to use fileno()
+to pull out the proper descriptor number, assuming you can:
+
+ use IO::Socket;
+ $handle = IO::Socket::INET->new("www.perl.com:80");
+ $fd = $handle->fileno;
+ somefunction("&$fd"); # not an indirect function call
+
+It can be easier (and certainly will be faster) just to use real
+filehandles though:
+
+ use IO::Socket;
+ local *REMOTE = IO::Socket::INET->new("www.perl.com:80");
+ die "can't connect" unless defined(fileno(REMOTE));
+ somefunction("&main::REMOTE");
+
+If the filehandle or descriptor number is preceded not just with a simple
+"&" but rather with a "&=" combination, then Perl will not create a
+completely new descriptor opened to the same place using the dup(2)
+system call. Instead, it will just make something of an alias to the
+existing one using the fdopen(3S) library call This is slightly more
+parsimonious of systems resources, although this is less a concern
+these days. Here's an example of that:
+
+ $fd = $ENV{"MHCONTEXTFD"};
+ open(MHCONTEXT, "<&=$fd") or die "couldn't fdopen $fd: $!";
+
+If you're using magic C<E<lt>ARGVE<gt>>, you could even pass in as a
+command line argument in @ARGV something like C<"E<lt>&=$MHCONTEXTFD">,
+but we've never seen anyone actually do this.
+
+=head2 Dispelling the Dweomer
+
+Perl is more of a DWIMmer language than something like Java--where DWIM
+is an acronym for "do what I mean". But this principle sometimes leads
+to more hidden magic than one knows what to do with. In this way, Perl
+is also filled with I<dweomer>, an obscure word meaning an enchantment.
+Sometimes, Perl's DWIMmer is just too much like dweomer for comfort.
+
+If magic C<open> is a bit too magical for you, you don't have to turn
+to C<sysopen>. To open a file with arbitrary weird characters in
+it, it's necessary to protect any leading and trailing whitespace.
+Leading whitespace is protected by inserting a C<"./"> in front of a
+filename that starts with whitespace. Trailing whitespace is protected
+by appending an ASCII NUL byte (C<"\0">) at the end off the string.
+
+ $file =~ s#^(\s)#./$1#;
+ open(FH, "< $file\0") || die "can't open $file: $!";
+
+This assumes, of course, that your system considers dot the current
+working directory, slash the directory separator, and disallows ASCII
+NULs within a valid filename. Most systems follow these conventions,
+including all POSIX systems as well as proprietary Microsoft systems.
+The only vaguely popular system that doesn't work this way is the
+proprietary Macintosh system, which uses a colon where the rest of us
+use a slash. Maybe C<sysopen> isn't such a bad idea after all.
+
+If you want to use C<E<lt>ARGVE<gt>> processing in a totally boring
+and non-magical way, you could do this first:
+
+ # "Sam sat on the ground and put his head in his hands.
+ # 'I wish I had never come here, and I don't want to see
+ # no more magic,' he said, and fell silent."
+ for (@ARGV) {
+ s#^([^./])#./$1#;
+ $_ .= "\0";
+ }
+ while (<>) {
+ # now process $_
+ }
+
+But be warned that users will not appreciate being unable to use "-"
+to mean standard input, per the standard convention.
+
+=head2 Paths as Opens
+
+You've probably noticed how Perl's C<warn> and C<die> functions can
+produce messages like:
+
+ Some warning at scriptname line 29, <FH> chunk 7.
+
+That's because you opened a filehandle FH, and had read in seven records
+from it. But what was the name of the file, not the handle?
+
+If you aren't running with C<strict refs>, or if you've turn them off
+temporarily, then all you have to do is this:
+
+ open($path, "< $path") || die "can't open $path: $!";
+ while (<$path>) {
+ # whatever
+ }
+
+Since you're using the pathname of the file as its handle,
+you'll get warnings more like
+
+ Some warning at scriptname line 29, </etc/motd> chunk 7.
+
+=head2 Single Argument Open
+
+Remember how we said that Perl's open took two arguments? That was a
+passive prevarication. You see, it can also take just one argument.
+If and only if the variable is a global variable, not a lexical, you
+can pass C<open> just one argument, the filehandle, and it will
+get the path from the global scalar variable of the same name.
+
+ $FILE = "/etc/motd";
+ open FILE or die "can't open $FILE: $!";
+ while (<FILE>) {
+ # whatever
+ }
+
+Why is this here? Someone has to cater to the hysterical porpoises.
+It's something that's been in Perl since the very beginning, if not
+before.
+
+=head2 Playing with STDIN and STDOUT
+
+One clever move with STDOUT is to explicitly close it when you're done
+with the program.
+
+ END { close(STDOUT) || die "can't close stdout: $!" }
+
+If you don't do this, and your program fills up the disk partition due
+to a command line redirection, it won't report the error exit with a
+failure status.
+
+You don't have to accept the STDIN and STDOUT you were given. You are
+welcome to reopen them if you'd like.
+
+ open(STDIN, "< datafile")
+ || die "can't open datafile: $!";
+
+ open(STDOUT, "> output")
+ || die "can't open output: $!";
+
+And then these can be read directly or passed on to subprocesses.
+This makes it look as though the program were initially invoked
+with those redirections from the command line.
+
+It's probably more interesting to connect these to pipes. For example:
+
+ $pager = $ENV{PAGER} || "(less || more)";
+ open(STDOUT, "| $pager")
+ || die "can't fork a pager: $!";
+
+This makes it appear as though your program were called with its stdout
+already piped into your pager. You can also use this kind of thing
+in conjunction with an implicit fork to yourself. You might do this
+if you would rather handle the post processing in your own program,
+just in a different process:
+
+ head(100);
+ while (<>) {
+ print;
+ }
+
+ sub head {
+ my $lines = shift || 20;
+ return unless $pid = open(STDOUT, "|-");
+ die "cannot fork: $!" unless defined $pid;
+ while (<STDIN>) {
+ print;
+ last if --$lines < 0;
+ }
+ exit;
+ }
+
+This technique can be applied to repeatedly push as many filters on your
+output stream as you wish.
+
+=head1 Other I/O Issues
+
+These topics aren't really arguments related to C<open> or C<sysopen>,
+but they do affect what you do with your open files.
+
+=head2 Opening Non-File Files
+
+When is a file not a file? Well, you could say when it exists but
+isn't a plain file. We'll check whether it's a symbolic link first,
+just in case.
+
+ if (-l $file || ! -f _) {
+ print "$file is not a plain file\n";
+ }
+
+What other kinds of files are there than, well, files? Directories,
+symbolic links, named pipes, Unix-domain sockets, and block and character
+devices. Those are all files, too--just not I<plain> files. This isn't
+the same issue as being a text file. Not all text files are plain files.
+Not all plain files are textfiles. That's why there are separate C<-f>
+and C<-T> file tests.
+
+To open a directory, you should use the C<opendir> function, then
+process it with C<readdir>, carefully restoring the directory
+name if necessary:
+
+ opendir(DIR, $dirname) or die "can't opendir $dirname: $!";
+ while (defined($file = readdir(DIR))) {
+ # do something with "$dirname/$file"
+ }
+ closedir(DIR);
+
+If you want to process directories recursively, it's better to use the
+File::Find module. For example, this prints out all files recursively,
+add adds a slash to their names if the file is a directory.
+
+ @ARGV = qw(.) unless @ARGV;
+ use File::Find;
+ find sub { print $File::Find::name, -d && '/', "\n" }, @ARGV;
+
+This finds all bogus symbolic links beneath a particular directory:
+
+ find sub { print "$File::Find::name\n" if -l && !-e }, $dir;
+
+As you see, with symbolic links, you can just pretend that it is
+what it points to. Or, if you want to know I<what> it points to, then
+C<readlink> is called for:
+
+ if (-l $file) {
+ if (defined($whither = readlink($file))) {
+ print "$file points to $whither\n";
+ } else {
+ print "$file points nowhere: $!\n";
+ }
+ }
+
+Named pipes are a different matter. You pretend they're regular files,
+but their opens will normally block until there is both a reader and
+a writer. You can read more about them in L<perlipc/"Named Pipes">.
+Unix-domain sockets are rather different beasts as well; they're
+described in L<perlipc/"Unix-Domain TCP Clients and Servers">.
+
+When it comes to opening devices, it can be easy and it can tricky.
+We'll assume that if you're opening up a block device, you know what
+you're doing. The character devices are more interesting. These are
+typically used for modems, mice, and some kinds of printers. This is
+described in L<perlfaq8/"How do I read and write the serial port?">
+It's often enough to open them carefully:
+
+ sysopen(TTYIN, "/dev/ttyS1", O_RDWR | O_NDELAY | O_NOCTTY)
+ # (O_NOCTTY no longer needed on POSIX systems)
+ or die "can't open /dev/ttyS1: $!";
+ open(TTYOUT, "+>&TTYIN")
+ or die "can't dup TTYIN: $!";
+
+ $ofh = select(TTYOUT); $| = 1; select($ofh);
+
+ print TTYOUT "+++at\015";
+ $answer = <TTYIN>;
+
+With descriptors that you haven't opened using C<sysopen>, such as a
+socket, you can set them to be non-blocking using C<fcntl>:
+
+ use Fcntl;
+ fcntl(Connection, F_SETFL, O_NONBLOCK)
+ or die "can't set non blocking: $!";
+
+Rather than losing yourself in a morass of twisting, turning C<ioctl>s,
+all dissimilar, if you're going to manipulate ttys, it's best to
+make calls out to the stty(1) program if you have it, or else use the
+portable POSIX interface. To figure this all out, you'll need to read the
+termios(3) manpage, which describes the POSIX interface to tty devices,
+and then L<POSIX>, which describes Perl's interface to POSIX. There are
+also some high-level modules on CPAN that can help you with these games.
+Check out Term::ReadKey and Term::ReadLine.
+
+What else can you open? To open a connection using sockets, you won't use
+one of Perl's two open functions. See L<perlipc/"Sockets: Client/Server
+Communication"> for that. Here's an example. Once you have it,
+you can use FH as a bidirectional filehandle.
+
+ use IO::Socket;
+ local *FH = IO::Socket::INET->new("www.perl.com:80");
+
+For opening up a URL, the LWP modules from CPAN are just what
+the doctor ordered. There's no filehandle interface, but
+it's still easy to get the contents of a document:
+
+ use LWP::Simple;
+ $doc = get('http://www.sn.no/libwww-perl/');
+
+=head2 Binary Files
+
+On certain legacy systems with what could charitably be called terminally
+convoluted (some would say broken) I/O models, a file isn't a file--at
+least, not with respect to the C standard I/O library. On these old
+systems whose libraries (but not kernels) distinguish between text and
+binary streams, to get files to behave properly you'll have to bend over
+backwards to avoid nasty problems. On such infelicitous systems, sockets
+and pipes are already opened in binary mode, and there is currently no
+way to turn that off. With files, you have more options.
+
+Another option is to use the C<binmode> function on the appropriate
+handles before doing regular I/O on them:
+
+ binmode(STDIN);
+ binmode(STDOUT);
+ while (<STDIN>) { print }
+
+Passing C<sysopen> a non-standard flag option will also open the file in
+binary mode on those systems that support it. This is the equivalent of
+opening the file normally, then calling C<binmode>ing on the handle.
+
+ sysopen(BINDAT, "records.data", O_RDWR | O_BINARY)
+ || die "can't open records.data: $!";
+
+Now you can use C<read> and C<print> on that handle without worrying
+about the system non-standard I/O library breaking your data. It's not
+a pretty picture, but then, legacy systems seldom are. CP/M will be
+with us until the end of days, and after.
+
+On systems with exotic I/O systems, it turns out that, astonishingly
+enough, even unbuffered I/O using C<sysread> and C<syswrite> might do
+sneaky data mutilation behind your back.
+
+ while (sysread(WHENCE, $buf, 1024)) {
+ syswrite(WHITHER, $buf, length($buf));
+ }
+
+Depending on the vicissitudes of your runtime system, even these calls
+may need C<binmode> or C<O_BINARY> first. Systems known to be free of
+such difficulties include Unix, the Mac OS, Plan9, and Inferno.
+
+=head2 File Locking
+
+In a multitasking environment, you may need to be careful not to collide
+with other processes who want to do I/O on the same files as others
+are working on. You'll often need shared or exclusive locks
+on files for reading and writing respectively. You might just
+pretend that only exclusive locks exist.
+
+Never use the existence of a file C<-e $file> as a locking indication,
+because there is a race condition between the test for the existence of
+the file and its creation. Atomicity is critical.
+
+Perl's most portable locking interface is via the C<flock> function,
+whose simplicity is emulated on systems that don't directly support it,
+such as SysV or WindowsNT. The underlying semantics may affect how
+it all works, so you should learn how C<flock> is implemented on your
+system's port of Perl.
+
+File locking I<does not> lock out another process that would like to
+do I/O. A file lock only locks out others trying to get a lock, not
+processes trying to do I/O. Because locks are advisory, if one process
+uses locking and another doesn't, all bets are off.
+
+By default, the C<flock> call will block until a lock is granted.
+A request for a shared lock will be granted as soon as there is no
+exclusive locker. A request for a exclusive lock will be granted as
+soon as there is no locker of any kind. Locks are on file descriptors,
+not file names. You can't lock a file until you open it, and you can't
+hold on to a lock once the file has been closed.
+
+Here's how to get a blocking shared lock on a file, typically used
+for reading:
+
+ use 5.004;
+ use Fcntl qw(:DEFAULT :flock);
+ open(FH, "< filename") or die "can't open filename: $!";
+ flock(FH, LOCK_SH) or die "can't lock filename: $!";
+ # now read from FH
+
+You can get a non-blocking lock by using C<LOCK_NB>.
+
+ flock(FH, LOCK_SH | LOCK_NB)
+ or die "can't lock filename: $!";
+
+This can be useful for producing more user-friendly behaviour by warning
+if you're going to be blocking:
+
+ use 5.004;
+ use Fcntl qw(:DEFAULT :flock);
+ open(FH, "< filename") or die "can't open filename: $!";
+ unless (flock(FH, LOCK_SH | LOCK_NB)) {
+ $| = 1;
+ print "Waiting for lock...";
+ flock(FH, LOCK_SH) or die "can't lock filename: $!";
+ print "got it.\n"
+ }
+ # now read from FH
+
+To get an exclusive lock, typically used for writing, you have to be
+careful. We C<sysopen> the file so it can be locked before it gets
+emptied. You can get a nonblocking version using C<LOCK_EX | LOCK_NB>.
+
+ use 5.004;
+ use Fcntl qw(:DEFAULT :flock);
+ sysopen(FH, "filename", O_WRONLY | O_CREAT)
+ or die "can't open filename: $!";
+ flock(FH, LOCK_EX)
+ or die "can't lock filename: $!";
+ truncate(FH, 0)
+ or die "can't truncate filename: $!";
+ # now write to FH
+
+Finally, due to the uncounted millions who cannot be dissuaded from
+wasting cycles on useless vanity devices called hit counters, here's
+how to increment a number in a file safely:
+
+ use Fcntl qw(:DEFAULT :flock);
+
+ sysopen(FH, "numfile", O_RDWR | O_CREAT)
+ or die "can't open numfile: $!";
+ # autoflush FH
+ $ofh = select(FH); $| = 1; select ($ofh);
+ flock(FH, LOCK_EX)
+ or die "can't write-lock numfile: $!";
+
+ $num = <FH> || 0;
+ seek(FH, 0, 0)
+ or die "can't rewind numfile : $!";
+ print FH $num+1, "\n"
+ or die "can't write numfile: $!";
+
+ truncate(FH, tell(FH))
+ or die "can't truncate numfile: $!";
+ close(FH)
+ or die "can't close numfile: $!";
+
+=head1 SEE ALSO
+
+The C<open> and C<sysopen> function in perlfunc(1);
+the standard open(2), dup(2), fopen(3), and fdopen(3) manpages;
+the POSIX documentation.
+
+=head1 AUTHOR and COPYRIGHT
+
+Copyright 1998 Tom Christiansen.
+
+When included as part of the Standard Version of Perl, or as part of
+its complete documentation whether printed or otherwise, this work may
+be distributed only under the terms of Perl's Artistic License. Any
+distribution of this file or derivatives thereof outside of that
+package require that special arrangements be made with copyright
+holder.
+
+Irrespective of its distribution, all code examples in these files are
+hereby placed into the public domain. You are permitted and
+encouraged to use this code in your own programs for fun or for profit
+as you see fit. A simple comment in the code giving credit would be
+courteous but is not required.
+
+=head1 HISTORY
+
+First release: Sat Jan 9 08:09:11 MST 1999
diff --git a/gnu/usr.bin/perl/pod/perlport.pod b/gnu/usr.bin/perl/pod/perlport.pod
new file mode 100644
index 00000000000..c1a5483add6
--- /dev/null
+++ b/gnu/usr.bin/perl/pod/perlport.pod
@@ -0,0 +1,1613 @@
+=head1 NAME
+
+perlport - Writing portable Perl
+
+
+=head1 DESCRIPTION
+
+Perl runs on a variety of operating systems. While most of them share
+a lot in common, they also have their own very particular and unique
+features.
+
+This document is meant to help you to find out what constitutes portable
+Perl code, so that once you have made your decision to write portably,
+you know where the lines are drawn, and you can stay within them.
+
+There is a tradeoff between taking full advantage of B<a> particular type
+of computer, and taking advantage of a full B<range> of them. Naturally,
+as you make your range bigger (and thus more diverse), the common
+denominators drop, and you are left with fewer areas of common ground in
+which you can operate to accomplish a particular task. Thus, when you
+begin attacking a problem, it is important to consider which part of the
+tradeoff curve you want to operate under. Specifically, whether it is
+important to you that the task that you are coding needs the full
+generality of being portable, or if it is sufficient to just get the job
+done. This is the hardest choice to be made. The rest is easy, because
+Perl provides lots of choices, whichever way you want to approach your
+problem.
+
+Looking at it another way, writing portable code is usually about
+willfully limiting your available choices. Naturally, it takes discipline
+to do that.
+
+Be aware of two important points:
+
+=over 4
+
+=item Not all Perl programs have to be portable
+
+There is no reason why you should not use Perl as a language to glue Unix
+tools together, or to prototype a Macintosh application, or to manage the
+Windows registry. If it makes no sense to aim for portability for one
+reason or another in a given program, then don't bother.
+
+=item The vast majority of Perl B<is> portable
+
+Don't be fooled into thinking that it is hard to create portable Perl
+code. It isn't. Perl tries its level-best to bridge the gaps between
+what's available on different platforms, and all the means available to
+use those features. Thus almost all Perl code runs on any machine
+without modification. But there I<are> some significant issues in
+writing portable code, and this document is entirely about those issues.
+
+=back
+
+Here's the general rule: When you approach a task that is commonly done
+using a whole range of platforms, think in terms of writing portable
+code. That way, you don't sacrifice much by way of the implementation
+choices you can avail yourself of, and at the same time you can give
+your users lots of platform choices. On the other hand, when you have to
+take advantage of some unique feature of a particular platform, as is
+often the case with systems programming (whether for Unix, Windows,
+S<Mac OS>, VMS, etc.), consider writing platform-specific code.
+
+When the code will run on only two or three operating systems, then you
+may only need to consider the differences of those particular systems.
+The important thing is to decide where the code will run, and to be
+deliberate in your decision.
+
+The material below is separated into three main sections: main issues of
+portability (L<"ISSUES">, platform-specific issues (L<"PLATFORMS">, and
+builtin perl functions that behave differently on various ports
+(L<"FUNCTION IMPLEMENTATIONS">.
+
+This information should not be considered complete; it includes possibly
+transient information about idiosyncrasies of some of the ports, almost
+all of which are in a state of constant evolution. Thus this material
+should be considered a perpetual work in progress
+(E<lt>IMG SRC="yellow_sign.gif" ALT="Under Construction"E<gt>).
+
+
+
+
+=head1 ISSUES
+
+=head2 Newlines
+
+In most operating systems, lines in files are terminated by newlines.
+Just what is used as a newline may vary from OS to OS. Unix
+traditionally uses C<\012>, one kind of Windows I/O uses C<\015\012>,
+and S<Mac OS> uses C<\015>.
+
+Perl uses C<\n> to represent the "logical" newline, where what
+is logical may depend on the platform in use. In MacPerl, C<\n>
+always means C<\015>. In DOSish perls, C<\n> usually means C<\012>, but
+when accessing a file in "text" mode, STDIO translates it to (or from)
+C<\015\012>.
+
+Due to the "text" mode translation, DOSish perls have limitations
+of using C<seek> and C<tell> when a file is being accessed in "text"
+mode. Specifically, if you stick to C<seek>-ing to locations you got
+from C<tell> (and no others), you are usually free to use C<seek> and
+C<tell> even in "text" mode. In general, using C<seek> or C<tell> or
+other file operations that count bytes instead of characters, without
+considering the length of C<\n>, may be non-portable. If you use
+C<binmode> on a file, however, you can usually use C<seek> and C<tell>
+with arbitrary values quite safely.
+
+A common misconception in socket programming is that C<\n> eq C<\012>
+everywhere. When using protocols such as common Internet protocols,
+C<\012> and C<\015> are called for specifically, and the values of
+the logical C<\n> and C<\r> (carriage return) are not reliable.
+
+ print SOCKET "Hi there, client!\r\n"; # WRONG
+ print SOCKET "Hi there, client!\015\012"; # RIGHT
+
+[NOTE: this does not necessarily apply to communications that are
+filtered by another program or module before sending to the socket; the
+the most popular EBCDIC webserver, for instance, accepts C<\r\n>,
+which translates those characters, along with all other
+characters in text streams, from EBCDIC to ASCII.]
+
+However, using C<\015\012> (or C<\cM\cJ>, or C<\x0D\x0A>) can be tedious
+and unsightly, as well as confusing to those maintaining the code. As
+such, the C<Socket> module supplies the Right Thing for those who want it.
+
+ use Socket qw(:DEFAULT :crlf);
+ print SOCKET "Hi there, client!$CRLF" # RIGHT
+
+When reading I<from> a socket, remember that the default input record
+separator (C<$/>) is C<\n>, but code like this should recognize C<$/> as
+C<\012> or C<\015\012>:
+
+ while (<SOCKET>) {
+ # ...
+ }
+
+Better:
+
+ use Socket qw(:DEFAULT :crlf);
+ local($/) = LF; # not needed if $/ is already \012
+
+ while (<SOCKET>) {
+ s/$CR?$LF/\n/; # not sure if socket uses LF or CRLF, OK
+ # s/\015?\012/\n/; # same thing
+ }
+
+And this example is actually better than the previous one even for Unix
+platforms, because now any C<\015>'s (C<\cM>'s) are stripped out
+(and there was much rejoicing).
+
+An important thing to remember is that functions that return data
+should translate newlines when appropriate. Often one line of code
+will suffice:
+
+ $data =~ s/\015?\012/\n/g;
+ return $data;
+
+
+=head2 Numbers endianness and Width
+
+Different CPUs store integers and floating point numbers in different
+orders (called I<endianness>) and widths (32-bit and 64-bit being the
+most common). This affects your programs if they attempt to transfer
+numbers in binary format from a CPU architecture to another over some
+channel: either 'live' via network connections or storing the numbers
+to secondary storage such as a disk file.
+
+Conflicting storage orders make utter mess out of the numbers: if a
+little-endian host (Intel, Alpha) stores 0x12345678 (305419896 in
+decimal), a big-endian host (Motorola, MIPS, Sparc, PA) reads it as
+0x78563412 (2018915346 in decimal). To avoid this problem in network
+(socket) connections use the C<pack()> and C<unpack()> formats C<"n">
+and C<"N">, the "network" orders, they are guaranteed to be portable.
+
+Different widths can cause truncation even between platforms of equal
+endianness: the platform of shorter width loses the upper parts of the
+number. There is no good solution for this problem except to avoid
+transferring or storing raw binary numbers.
+
+One can circumnavigate both these problems in two ways: either
+transfer and store numbers always in text format, instead of raw
+binary, or consider using modules like C<Data::Dumper> (included in
+the standard distribution as of Perl 5.005) and C<Storable>.
+
+=head2 Files and Filesystems
+
+Most platforms these days structure files in a hierarchical fashion.
+So, it is reasonably safe to assume that any platform supports the
+notion of a "path" to uniquely identify a file on the system. Just
+how that path is actually written, differs.
+
+While they are similar, file path specifications differ between Unix,
+Windows, S<Mac OS>, OS/2, VMS, VOS, S<RISC OS> and probably others.
+Unix, for example, is one of the few OSes that has the idea of a single
+root directory.
+
+VMS, Windows, and OS/2 can work similarly to Unix with C</> as path
+separator, or in their own idiosyncratic ways (such as having several
+root directories and various "unrooted" device files such NIL: and
+LPT:).
+
+S<Mac OS> uses C<:> as a path separator instead of C</>.
+
+The filesystem may support neither hard links (C<link()>) nor
+symbolic links (C<symlink()>, C<readlink()>, C<lstat()>).
+
+The filesystem may not support neither access timestamp nor change
+timestamp (meaning that about the only portable timestamp is the
+modification timestamp), or one second granularity of any timestamps
+(e.g. the FAT filesystem limits the time granularity to two seconds).
+
+VOS perl can emulate Unix filenames with C</> as path separator. The
+native pathname characters greater-than, less-than, number-sign, and
+percent-sign are always accepted.
+
+C<RISC OS> perl can emulate Unix filenames with C</> as path
+separator, or go native and use C<.> for path separator and C<:> to
+signal filing systems and disc names.
+
+As with the newline problem above, there are modules that can help. The
+C<File::Spec> modules provide methods to do the Right Thing on whatever
+platform happens to be running the program.
+
+ use File::Spec;
+ chdir(File::Spec->updir()); # go up one directory
+ $file = File::Spec->catfile(
+ File::Spec->curdir(), 'temp', 'file.txt'
+ );
+ # on Unix and Win32, './temp/file.txt'
+ # on Mac OS, ':temp:file.txt'
+
+File::Spec is available in the standard distribution, as of version
+5.004_05.
+
+In general, production code should not have file paths hardcoded; making
+them user supplied or from a configuration file is better, keeping in mind
+that file path syntax varies on different machines.
+
+This is especially noticeable in scripts like Makefiles and test suites,
+which often assume C</> as a path separator for subdirectories.
+
+Also of use is C<File::Basename>, from the standard distribution, which
+splits a pathname into pieces (base filename, full path to directory,
+and file suffix).
+
+Even when on a single platform (if you can call UNIX a single platform),
+remember not to count on the existence or the contents of
+system-specific files or directories, like F</etc/passwd>,
+F</etc/sendmail.conf>, F</etc/resolv.conf>, or even F</tmp/>. For
+example, F</etc/passwd> may exist but it may not contain the encrypted
+passwords because the system is using some form of enhanced security --
+or it may not contain all the accounts because the system is using NIS.
+If code does need to rely on such a file, include a description of the
+file and its format in the code's documentation, and make it easy for
+the user to override the default location of the file.
+
+Don't assume a text file will end with a newline.
+
+Do not have two files of the same name with different case, like
+F<test.pl> and F<Test.pl>, as many platforms have case-insensitive
+filenames. Also, try not to have non-word characters (except for C<.>)
+in the names, and keep them to the 8.3 convention, for maximum
+portability.
+
+Likewise, if using C<AutoSplit>, try to keep the split functions to
+8.3 naming and case-insensitive conventions; or, at the very least,
+make it so the resulting files have a unique (case-insensitively)
+first 8 characters.
+
+There certainly can be whitespace in filenames. Many systems (DOS,
+VMS) cannot have more than one C<"."> in their filenames.
+
+Don't assume C<E<gt>> won't be the first character of a filename.
+Always use C<E<lt>> explicitly to open a file for reading.
+
+ open(FILE, "<$existing_file") or die $!;
+
+Actually, though, if filenames might use strange characters, it is
+safest to open it with C<sysopen> instead of C<open>, which is magic.
+
+
+=head2 System Interaction
+
+Not all platforms provide for the notion of a command line, necessarily.
+These are usually platforms that rely on a Graphical User Interface (GUI)
+for user interaction. So a program requiring command lines might not work
+everywhere. But this is probably for the user of the program to deal
+with.
+
+Some platforms can't delete or rename files that are being held open by
+the system. Remember to C<close> files when you are done with them.
+Don't C<unlink> or C<rename> an open file. Don't C<tie> to or C<open> a
+file that is already tied to or opened; C<untie> or C<close> first.
+
+Don't open the same file more than once at a time for writing, as some
+operating systems put mandatory locks on such files.
+
+Don't count on a specific environment variable existing in C<%ENV>.
+Don't count on C<%ENV> entries being case-sensitive, or even
+case-preserving.
+
+Don't count on signals.
+
+Don't count on filename globbing. Use C<opendir>, C<readdir>, and
+C<closedir> instead.
+
+Don't count on per-program environment variables, or per-program current
+directories.
+
+Don't count on specific values of C<$!>.
+
+
+=head2 Interprocess Communication (IPC)
+
+In general, don't directly access the system in code that is meant to be
+portable. That means, no C<system>, C<exec>, C<fork>, C<pipe>, C<``>,
+C<qx//>, C<open> with a C<|>, nor any of the other things that makes being
+a Unix perl hacker worth being.
+
+Commands that launch external processes are generally supported on
+most platforms (though many of them do not support any type of forking),
+but the problem with using them arises from what you invoke with them.
+External tools are often named differently on different platforms, often
+not available in the same location, often accept different arguments,
+often behave differently, and often represent their results in a
+platform-dependent way. Thus you should seldom depend on them to produce
+consistent results.
+
+One especially common bit of Perl code is opening a pipe to sendmail:
+
+ open(MAIL, '|/usr/lib/sendmail -t') or die $!;
+
+This is fine for systems programming when sendmail is known to be
+available. But it is not fine for many non-Unix systems, and even
+some Unix systems that may not have sendmail installed. If a portable
+solution is needed, see the C<Mail::Send> and C<Mail::Mailer> modules
+in the C<MailTools> distribution. C<Mail::Mailer> provides several
+mailing methods, including mail, sendmail, and direct SMTP
+(via C<Net::SMTP>) if a mail transfer agent is not available.
+
+The rule of thumb for portable code is: Do it all in portable Perl, or
+use a module (that may internally implement it with platform-specific
+code, but expose a common interface).
+
+The UNIX System V IPC (C<msg*(), sem*(), shm*()>) is not available
+even in all UNIX platforms.
+
+
+=head2 External Subroutines (XS)
+
+XS code, in general, can be made to work with any platform; but dependent
+libraries, header files, etc., might not be readily available or
+portable, or the XS code itself might be platform-specific, just as Perl
+code might be. If the libraries and headers are portable, then it is
+normally reasonable to make sure the XS code is portable, too.
+
+There is a different kind of portability issue with writing XS
+code: availability of a C compiler on the end-user's system. C brings
+with it its own portability issues, and writing XS code will expose you to
+some of those. Writing purely in perl is a comparatively easier way to
+achieve portability.
+
+
+=head2 Standard Modules
+
+In general, the standard modules work across platforms. Notable
+exceptions are C<CPAN.pm> (which currently makes connections to external
+programs that may not be available), platform-specific modules (like
+C<ExtUtils::MM_VMS>), and DBM modules.
+
+There is no one DBM module that is available on all platforms.
+C<SDBM_File> and the others are generally available on all Unix and DOSish
+ports, but not in MacPerl, where only C<NBDM_File> and C<DB_File> are
+available.
+
+The good news is that at least some DBM module should be available, and
+C<AnyDBM_File> will use whichever module it can find. Of course, then
+the code needs to be fairly strict, dropping to the lowest common
+denominator (e.g., not exceeding 1K for each record).
+
+
+=head2 Time and Date
+
+The system's notion of time of day and calendar date is controlled in
+widely different ways. Don't assume the timezone is stored in C<$ENV{TZ}>,
+and even if it is, don't assume that you can control the timezone through
+that variable.
+
+Don't assume that the epoch starts at 00:00:00, January 1, 1970,
+because that is OS-specific. Better to store a date in an unambiguous
+representation. The ISO 8601 standard defines YYYY-MM-DD as the date
+format. A text representation (like C<1 Jan 1970>) can be easily
+converted into an OS-specific value using a module like
+C<Date::Parse>. An array of values, such as those returned by
+C<localtime>, can be converted to an OS-specific representation using
+C<Time::Local>.
+
+
+=head2 Character sets and character encoding
+
+Assume very little about character sets. Do not assume anything about
+the numerical values (C<ord()>, C<chr()>) of characters. Do not
+assume that the alphabetic characters are encoded contiguously (in
+numerical sense). Do not assume anything about the ordering of the
+characters. The lowercase letters may come before or after the
+uppercase letters, the lowercase and uppercase may be interlaced so
+that both 'a' and 'A' come before the 'b', the accented and other
+international characters may be interlaced so that E<auml> comes
+before the 'b'.
+
+
+=head2 Internationalisation
+
+If you may assume POSIX (a rather large assumption, that in practice
+means UNIX), you may read more about the POSIX locale system from
+L<perllocale>. The locale system at least attempts to make things a
+little bit more portable, or at least more convenient and
+native-friendly for non-English users. The system affects character
+sets and encoding, and date and time formatting, among other things.
+
+
+=head2 System Resources
+
+If your code is destined for systems with severely constrained (or
+missing!) virtual memory systems then you want to be I<especially> mindful
+of avoiding wasteful constructs such as:
+
+ # NOTE: this is no longer "bad" in perl5.005
+ for (0..10000000) {} # bad
+ for (my $x = 0; $x <= 10000000; ++$x) {} # good
+
+ @lines = <VERY_LARGE_FILE>; # bad
+
+ while (<FILE>) {$file .= $_} # sometimes bad
+ $file = join('', <FILE>); # better
+
+The last two may appear unintuitive to most people. The first of those
+two constructs repeatedly grows a string, while the second allocates a
+large chunk of memory in one go. On some systems, the latter is more
+efficient that the former.
+
+
+=head2 Security
+
+Most multi-user platforms provide basic levels of security that is usually
+felt at the file-system level. Other platforms usually don't
+(unfortunately). Thus the notion of user id, or "home" directory, or even
+the state of being logged-in, may be unrecognizable on many platforms. If
+you write programs that are security conscious, it is usually best to know
+what type of system you will be operating under, and write code explicitly
+for that platform (or class of platforms).
+
+
+=head2 Style
+
+For those times when it is necessary to have platform-specific code,
+consider keeping the platform-specific code in one place, making porting
+to other platforms easier. Use the C<Config> module and the special
+variable C<$^O> to differentiate platforms, as described in
+L<"PLATFORMS">.
+
+
+=head1 CPAN Testers
+
+Modules uploaded to CPAN are tested by a variety of volunteers on
+different platforms. These CPAN testers are notified by mail of each
+new upload, and reply to the list with PASS, FAIL, NA (not applicable to
+this platform), or UNKNOWN (unknown), along with any relevant notations.
+
+The purpose of the testing is twofold: one, to help developers fix any
+problems in their code that crop up because of lack of testing on other
+platforms; two, to provide users with information about whether or not
+a given module works on a given platform.
+
+=over 4
+
+=item Mailing list: cpan-testers@perl.org
+
+=item Testing results: C<http://www.connect.net/gbarr/cpan-test/>
+
+=back
+
+
+=head1 PLATFORMS
+
+As of version 5.002, Perl is built with a C<$^O> variable that
+indicates the operating system it was built on. This was implemented
+to help speed up code that would otherwise have to C<use Config;> and
+use the value of C<$Config{'osname'}>. Of course, to get
+detailed information about the system, looking into C<%Config> is
+certainly recommended.
+
+=head2 Unix
+
+Perl works on a bewildering variety of Unix and Unix-like platforms (see
+e.g. most of the files in the F<hints/> directory in the source code kit).
+On most of these systems, the value of C<$^O> (hence C<$Config{'osname'}>,
+too) is determined by lowercasing and stripping punctuation from the first
+field of the string returned by typing C<uname -a> (or a similar command)
+at the shell prompt. Here, for example, are a few of the more popular
+Unix flavors:
+
+ uname $^O $Config{'archname'}
+ -------------------------------------------
+ AIX aix aix
+ FreeBSD freebsd freebsd-i386
+ Linux linux i386-linux
+ HP-UX hpux PA-RISC1.1
+ IRIX irix irix
+ OSF1 dec_osf alpha-dec_osf
+ SunOS solaris sun4-solaris
+ SunOS solaris i86pc-solaris
+ SunOS4 sunos sun4-sunos
+
+Note that because the C<$Config{'archname'}> may depend on the hardware
+architecture it may vary quite a lot, much more than the C<$^O>.
+
+=head2 DOS and Derivatives
+
+Perl has long been ported to PC style microcomputers running under
+systems like PC-DOS, MS-DOS, OS/2, and most Windows platforms you can
+bring yourself to mention (except for Windows CE, if you count that).
+Users familiar with I<COMMAND.COM> and/or I<CMD.EXE> style shells should
+be aware that each of these file specifications may have subtle
+differences:
+
+ $filespec0 = "c:/foo/bar/file.txt";
+ $filespec1 = "c:\\foo\\bar\\file.txt";
+ $filespec2 = 'c:\foo\bar\file.txt';
+ $filespec3 = 'c:\\foo\\bar\\file.txt';
+
+System calls accept either C</> or C<\> as the path separator. However,
+many command-line utilities of DOS vintage treat C</> as the option
+prefix, so they may get confused by filenames containing C</>. Aside
+from calling any external programs, C</> will work just fine, and
+probably better, as it is more consistent with popular usage, and avoids
+the problem of remembering what to backwhack and what not to.
+
+The DOS FAT filesystem can only accommodate "8.3" style filenames. Under
+the "case insensitive, but case preserving" HPFS (OS/2) and NTFS (NT)
+filesystems you may have to be careful about case returned with functions
+like C<readdir> or used with functions like C<open> or C<opendir>.
+
+DOS also treats several filenames as special, such as AUX, PRN, NUL, CON,
+COM1, LPT1, LPT2 etc. Unfortunately these filenames won't even work
+if you include an explicit directory prefix, in some cases. It is best
+to avoid such filenames, if you want your code to be portable to DOS
+and its derivatives.
+
+Users of these operating systems may also wish to make use of
+scripts such as I<pl2bat.bat> or I<pl2cmd> as appropriate to
+put wrappers around your scripts.
+
+Newline (C<\n>) is translated as C<\015\012> by STDIO when reading from
+and writing to files. C<binmode(FILEHANDLE)> will keep C<\n> translated
+as C<\012> for that filehandle. Since it is a noop on other systems,
+C<binmode> should be used for cross-platform code that deals with binary
+data.
+
+The C<$^O> variable and the C<$Config{'archname'}> values for various
+DOSish perls are as follows:
+
+ OS $^O $Config{'archname'}
+ --------------------------------------------
+ MS-DOS dos
+ PC-DOS dos
+ OS/2 os2
+ Windows 95 MSWin32 MSWin32-x86
+ Windows NT MSWin32 MSWin32-x86
+ Windows NT MSWin32 MSWin32-alpha
+ Windows NT MSWin32 MSWin32-ppc
+
+Also see:
+
+=over 4
+
+=item The djgpp environment for DOS, C<http://www.delorie.com/djgpp/>
+
+=item The EMX environment for DOS, OS/2, etc. C<emx@iaehv.nl>,
+C<http://www.leo.org/pub/comp/os/os2/leo/gnu/emx+gcc/index.html> or
+C<ftp://hobbes.nmsu.edu/pub/os2/dev/emx>
+
+=item Build instructions for Win32, L<perlwin32>.
+
+=item The ActiveState Pages, C<http://www.activestate.com/>
+
+=back
+
+
+=head2 S<Mac OS>
+
+Any module requiring XS compilation is right out for most people, because
+MacPerl is built using non-free (and non-cheap!) compilers. Some XS
+modules that can work with MacPerl are built and distributed in binary
+form on CPAN. See I<MacPerl: Power and Ease> and L<"CPAN Testers">
+for more details.
+
+Directories are specified as:
+
+ volume:folder:file for absolute pathnames
+ volume:folder: for absolute pathnames
+ :folder:file for relative pathnames
+ :folder: for relative pathnames
+ :file for relative pathnames
+ file for relative pathnames
+
+Files in a directory are stored in alphabetical order. Filenames are
+limited to 31 characters, and may include any character except C<:>,
+which is reserved as a path separator.
+
+Instead of C<flock>, see C<FSpSetFLock> and C<FSpRstFLock> in the
+C<Mac::Files> module, or C<chmod(0444, ...)> and C<chmod(0666, ...)>.
+
+In the MacPerl application, you can't run a program from the command line;
+programs that expect C<@ARGV> to be populated can be edited with something
+like the following, which brings up a dialog box asking for the command
+line arguments.
+
+ if (!@ARGV) {
+ @ARGV = split /\s+/, MacPerl::Ask('Arguments?');
+ }
+
+A MacPerl script saved as a droplet will populate C<@ARGV> with the full
+pathnames of the files dropped onto the script.
+
+Mac users can use programs on a kind of command line under MPW (Macintosh
+Programmer's Workshop, a free development environment from Apple).
+MacPerl was first introduced as an MPW tool, and MPW can be used like a
+shell:
+
+ perl myscript.plx some arguments
+
+ToolServer is another app from Apple that provides access to MPW tools
+from MPW and the MacPerl app, which allows MacPerl programs to use
+C<system>, backticks, and piped C<open>.
+
+"S<Mac OS>" is the proper name for the operating system, but the value
+in C<$^O> is "MacOS". To determine architecture, version, or whether
+the application or MPW tool version is running, check:
+
+ $is_app = $MacPerl::Version =~ /App/;
+ $is_tool = $MacPerl::Version =~ /MPW/;
+ ($version) = $MacPerl::Version =~ /^(\S+)/;
+ $is_ppc = $MacPerl::Architecture eq 'MacPPC';
+ $is_68k = $MacPerl::Architecture eq 'Mac68K';
+
+S<Mac OS X>, to be based on NeXT's OpenStep OS, will (in theory) be able
+to run MacPerl natively, but Unix perl will also run natively under the
+built-in Unix environment.
+
+Also see:
+
+=over 4
+
+=item The MacPerl Pages, C<http://www.ptf.com/macperl/>.
+
+=item The MacPerl mailing list, C<mac-perl-request@iis.ee.ethz.ch>.
+
+=back
+
+
+=head2 VMS
+
+Perl on VMS is discussed in F<vms/perlvms.pod> in the perl distribution.
+Note that perl on VMS can accept either VMS- or Unix-style file
+specifications as in either of the following:
+
+ $ perl -ne "print if /perl_setup/i" SYS$LOGIN:LOGIN.COM
+ $ perl -ne "print if /perl_setup/i" /sys$login/login.com
+
+but not a mixture of both as in:
+
+ $ perl -ne "print if /perl_setup/i" sys$login:/login.com
+ Can't open sys$login:/login.com: file specification syntax error
+
+Interacting with Perl from the Digital Command Language (DCL) shell
+often requires a different set of quotation marks than Unix shells do.
+For example:
+
+ $ perl -e "print ""Hello, world.\n"""
+ Hello, world.
+
+There are a number of ways to wrap your perl scripts in DCL .COM files if
+you are so inclined. For example:
+
+ $ write sys$output "Hello from DCL!"
+ $ if p1 .eqs. ""
+ $ then perl -x 'f$environment("PROCEDURE")
+ $ else perl -x - 'p1 'p2 'p3 'p4 'p5 'p6 'p7 'p8
+ $ deck/dollars="__END__"
+ #!/usr/bin/perl
+
+ print "Hello from Perl!\n";
+
+ __END__
+ $ endif
+
+Do take care with C<$ ASSIGN/nolog/user SYS$COMMAND: SYS$INPUT> if your
+perl-in-DCL script expects to do things like C<$read = E<lt>STDINE<gt>;>.
+
+Filenames are in the format "name.extension;version". The maximum
+length for filenames is 39 characters, and the maximum length for
+extensions is also 39 characters. Version is a number from 1 to
+32767. Valid characters are C</[A-Z0-9$_-]/>.
+
+VMS' RMS filesystem is case insensitive and does not preserve case.
+C<readdir> returns lowercased filenames, but specifying a file for
+opening remains case insensitive. Files without extensions have a
+trailing period on them, so doing a C<readdir> with a file named F<A.;5>
+will return F<a.> (though that file could be opened with
+C<open(FH, 'A')>).
+
+RMS had an eight level limit on directory depths from any rooted logical
+(allowing 16 levels overall) prior to VMS 7.2. Hence
+C<PERL_ROOT:[LIB.2.3.4.5.6.7.8]> is a valid directory specification but
+C<PERL_ROOT:[LIB.2.3.4.5.6.7.8.9]> is not. F<Makefile.PL> authors might
+have to take this into account, but at least they can refer to the former
+as C</PERL_ROOT/lib/2/3/4/5/6/7/8/>.
+
+The C<VMS::Filespec> module, which gets installed as part of the build
+process on VMS, is a pure Perl module that can easily be installed on
+non-VMS platforms and can be helpful for conversions to and from RMS
+native formats.
+
+What C<\n> represents depends on the type of file that is open. It could
+be C<\015>, C<\012>, C<\015\012>, or nothing. Reading from a file
+translates newlines to C<\012>, unless C<binmode> was executed on that
+handle, just like DOSish perls.
+
+TCP/IP stacks are optional on VMS, so socket routines might not be
+implemented. UDP sockets may not be supported.
+
+The value of C<$^O> on OpenVMS is "VMS". To determine the architecture
+that you are running on without resorting to loading all of C<%Config>
+you can examine the content of the C<@INC> array like so:
+
+ if (grep(/VMS_AXP/, @INC)) {
+ print "I'm on Alpha!\n";
+ } elsif (grep(/VMS_VAX/, @INC)) {
+ print "I'm on VAX!\n";
+ } else {
+ print "I'm not so sure about where $^O is...\n";
+ }
+
+Also see:
+
+=over 4
+
+=item L<perlvms.pod>
+
+=item vmsperl list, C<vmsperl-request@newman.upenn.edu>
+
+Put words C<SUBSCRIBE VMSPERL> in message body.
+
+=item vmsperl on the web, C<http://www.sidhe.org/vmsperl/index.html>
+
+=back
+
+
+=head2 VOS
+
+Perl on VOS is discussed in F<README.vos> in the perl distribution.
+Note that perl on VOS can accept either VOS- or Unix-style file
+specifications as in either of the following:
+
+ $ perl -ne "print if /perl_setup/i" >system>notices
+ $ perl -ne "print if /perl_setup/i" /system/notices
+
+or even a mixture of both as in:
+
+ $ perl -ne "print if /perl_setup/i" >system/notices
+
+Note that even though VOS allows the slash character to appear in object
+names, because the VOS port of Perl interprets it as a pathname
+delimiting character, VOS files, directories, or links whose names
+contain a slash character cannot be processed. Such files must be
+renamed before they can be processed by Perl.
+
+The following C functions are unimplemented on VOS, and any attempt by
+Perl to use them will result in a fatal error message and an immediate
+exit from Perl: dup, do_aspawn, do_spawn, fork, waitpid. Once these
+functions become available in the VOS POSIX.1 implementation, you can
+either recompile and rebind Perl, or you can download a newer port from
+ftp.stratus.com.
+
+The value of C<$^O> on VOS is "VOS". To determine the architecture that
+you are running on without resorting to loading all of C<%Config> you
+can examine the content of the C<@INC> array like so:
+
+ if (grep(/VOS/, @INC)) {
+ print "I'm on a Stratus box!\n";
+ } else {
+ print "I'm not on a Stratus box!\n";
+ die;
+ }
+
+ if (grep(/860/, @INC)) {
+ print "This box is a Stratus XA/R!\n";
+ } elsif (grep(/7100/, @INC)) {
+ print "This box is a Stratus HP 7100 or 8000!\n";
+ } elsif (grep(/8000/, @INC)) {
+ print "This box is a Stratus HP 8000!\n";
+ } else {
+ print "This box is a Stratus 68K...\n";
+ }
+
+Also see:
+
+=over 4
+
+=item L<README.vos>
+
+=item VOS mailing list
+
+There is no specific mailing list for Perl on VOS. You can post
+comments to the comp.sys.stratus newsgroup, or subscribe to the general
+Stratus mailing list. Send a letter with "Subscribe Info-Stratus" in
+the message body to majordomo@list.stratagy.com.
+
+=item VOS Perl on the web at C<http://ftp.stratus.com/pub/vos/vos.html>
+
+=back
+
+
+=head2 EBCDIC Platforms
+
+Recent versions of Perl have been ported to platforms such as OS/400 on
+AS/400 minicomputers as well as OS/390 & VM/ESA for IBM Mainframes. Such
+computers use EBCDIC character sets internally (usually Character Code
+Set ID 00819 for OS/400 and IBM-1047 for OS/390 & VM/ESA). Note that on
+the mainframe perl currently works under the "Unix system services
+for OS/390" (formerly known as OpenEdition) and VM/ESA OpenEdition.
+
+As of R2.5 of USS for OS/390 and Version 2.3 of VM/ESA these Unix
+sub-systems do not support the C<#!> shebang trick for script invocation.
+Hence, on OS/390 and VM/ESA perl scripts can be executed with a header
+similar to the following simple script:
+
+ : # use perl
+ eval 'exec /usr/local/bin/perl -S $0 ${1+"$@"}'
+ if 0;
+ #!/usr/local/bin/perl # just a comment really
+
+ print "Hello from perl!\n";
+
+On these platforms, bear in mind that the EBCDIC character set may have
+an effect on what happens with some perl functions (such as C<chr>,
+C<pack>, C<print>, C<printf>, C<ord>, C<sort>, C<sprintf>, C<unpack>), as
+well as bit-fiddling with ASCII constants using operators like C<^>, C<&>
+and C<|>, not to mention dealing with socket interfaces to ASCII computers
+(see L<Newlines>).
+
+Fortunately, most web servers for the mainframe will correctly translate
+the C<\n> in the following statement to its ASCII equivalent (note that
+C<\r> is the same under both Unix and OS/390 & VM/ESA):
+
+ print "Content-type: text/html\r\n\r\n";
+
+The value of C<$^O> on OS/390 is "os390".
+
+The value of C<$^O> on VM/ESA is "vmesa".
+
+Some simple tricks for determining if you are running on an EBCDIC
+platform could include any of the following (perhaps all):
+
+ if ("\t" eq "\05") { print "EBCDIC may be spoken here!\n"; }
+
+ if (ord('A') == 193) { print "EBCDIC may be spoken here!\n"; }
+
+ if (chr(169) eq 'z') { print "EBCDIC may be spoken here!\n"; }
+
+Note that one thing you may not want to rely on is the EBCDIC encoding
+of punctuation characters since these may differ from code page to code
+page (and once your module or script is rumoured to work with EBCDIC,
+folks will want it to work with all EBCDIC character sets).
+
+Also see:
+
+=over 4
+
+=item perl-mvs list
+
+The perl-mvs@perl.org list is for discussion of porting issues as well as
+general usage issues for all EBCDIC Perls. Send a message body of
+"subscribe perl-mvs" to majordomo@perl.org.
+
+=item AS/400 Perl information at C<http://as400.rochester.ibm.com/>
+
+=back
+
+
+=head2 Acorn RISC OS
+
+As Acorns use ASCII with newlines (C<\n>) in text files as C<\012> like
+Unix and Unix filename emulation is turned on by default, it is quite
+likely that most simple scripts will work "out of the box". The native
+filing system is modular, and individual filing systems are free to be
+case-sensitive or insensitive, and are usually case-preserving. Some
+native filing systems have name length limits which file and directory
+names are silently truncated to fit - scripts should be aware that the
+standard disc filing system currently has a name length limit of B<10>
+characters, with up to 77 items in a directory, but other filing systems
+may not impose such limitations.
+
+Native filenames are of the form
+
+ Filesystem#Special_Field::DiscName.$.Directory.Directory.File
+
+where
+
+ Special_Field is not usually present, but may contain . and $ .
+ Filesystem =~ m|[A-Za-z0-9_]|
+ DsicName =~ m|[A-Za-z0-9_/]|
+ $ represents the root directory
+ . is the path separator
+ @ is the current directory (per filesystem but machine global)
+ ^ is the parent directory
+ Directory and File =~ m|[^\0- "\.\$\%\&:\@\\^\|\177]+|
+
+The default filename translation is roughly C<tr|/.|./|;>
+
+Note that C<"ADFS::HardDisc.$.File" ne 'ADFS::HardDisc.$.File'> and that
+the second stage of C<$> interpolation in regular expressions will fall
+foul of the C<$.> if scripts are not careful.
+
+Logical paths specified by system variables containing comma-separated
+search lists are also allowed, hence C<System:Modules> is a valid
+filename, and the filesystem will prefix C<Modules> with each section of
+C<System$Path> until a name is made that points to an object on disc.
+Writing to a new file C<System:Modules> would only be allowed if
+C<System$Path> contains a single item list. The filesystem will also
+expand system variables in filenames if enclosed in angle brackets, so
+C<E<lt>System$DirE<gt>.Modules> would look for the file
+S<C<$ENV{'System$Dir'} . 'Modules'>>. The obvious implication of this is
+that B<fully qualified filenames can start with C<E<lt>E<gt>>> and should
+be protected when C<open> is used for input.
+
+Because C<.> was in use as a directory separator and filenames could not
+be assumed to be unique after 10 characters, Acorn implemented the C
+compiler to strip the trailing C<.c> C<.h> C<.s> and C<.o> suffix from
+filenames specified in source code and store the respective files in
+subdirectories named after the suffix. Hence files are translated:
+
+ foo.h h.foo
+ C:foo.h C:h.foo (logical path variable)
+ sys/os.h sys.h.os (C compiler groks Unix-speak)
+ 10charname.c c.10charname
+ 10charname.o o.10charname
+ 11charname_.c c.11charname (assuming filesystem truncates at 10)
+
+The Unix emulation library's translation of filenames to native assumes
+that this sort of translation is required, and allows a user defined list
+of known suffixes which it will transpose in this fashion. This may
+appear transparent, but consider that with these rules C<foo/bar/baz.h>
+and C<foo/bar/h/baz> both map to C<foo.bar.h.baz>, and that C<readdir> and
+C<glob> cannot and do not attempt to emulate the reverse mapping. Other
+C<.>s in filenames are translated to C</>.
+
+As implied above the environment accessed through C<%ENV> is global, and
+the convention is that program specific environment variables are of the
+form C<Program$Name>. Each filing system maintains a current directory,
+and the current filing system's current directory is the B<global> current
+directory. Consequently, sociable scripts don't change the current
+directory but rely on full pathnames, and scripts (and Makefiles) cannot
+assume that they can spawn a child process which can change the current
+directory without affecting its parent (and everyone else for that
+matter).
+
+As native operating system filehandles are global and currently are
+allocated down from 255, with 0 being a reserved value the Unix emulation
+library emulates Unix filehandles. Consequently, you can't rely on
+passing C<STDIN>, C<STDOUT>, or C<STDERR> to your children.
+
+The desire of users to express filenames of the form
+C<E<lt>Foo$DirE<gt>.Bar> on the command line unquoted causes problems,
+too: C<``> command output capture has to perform a guessing game. It
+assumes that a string C<E<lt>[^E<lt>E<gt>]+\$[^E<lt>E<gt>]E<gt>> is a
+reference to an environment variable, whereas anything else involving
+C<E<lt>> or C<E<gt>> is redirection, and generally manages to be 99%
+right. Of course, the problem remains that scripts cannot rely on any
+Unix tools being available, or that any tools found have Unix-like command
+line arguments.
+
+Extensions and XS are, in theory, buildable by anyone using free tools.
+In practice, many don't, as users of the Acorn platform are used to binary
+distribution. MakeMaker does run, but no available make currently copes
+with MakeMaker's makefiles; even if/when this is fixed, the lack of a
+Unix-like shell can cause problems with makefile rules, especially lines
+of the form C<cd sdbm && make all>, and anything using quoting.
+
+"S<RISC OS>" is the proper name for the operating system, but the value
+in C<$^O> is "riscos" (because we don't like shouting).
+
+Also see:
+
+=over 4
+
+=item perl list
+
+=back
+
+
+=head2 Other perls
+
+Perl has been ported to a variety of platforms that do not fit into any of
+the above categories. Some, such as AmigaOS, BeOS, QNX, and Plan 9, have
+been well-integrated into the standard Perl source code kit. You may need
+to see the F<ports/> directory on CPAN for information, and possibly
+binaries, for the likes of: aos, atari, lynxos, riscos, Tandem Guardian,
+vos, I<etc.> (yes we know that some of these OSes may fall under the Unix
+category, but we are not a standards body.)
+
+See also:
+
+=over 4
+
+=item Atari, Guido Flohr's page C<http://stud.uni-sb.de/~gufl0000/>
+
+=item HP 300 MPE/iX C<http://www.cccd.edu/~markb/perlix.html>
+
+=item Novell Netware
+
+A free perl5-based PERL.NLM for Novell Netware is available from
+C<http://www.novell.com/>
+
+=back
+
+
+=head1 FUNCTION IMPLEMENTATIONS
+
+Listed below are functions unimplemented or implemented differently on
+various platforms. Following each description will be, in parentheses, a
+list of platforms that the description applies to.
+
+The list may very well be incomplete, or wrong in some places. When in
+doubt, consult the platform-specific README files in the Perl source
+distribution, and other documentation resources for a given port.
+
+Be aware, moreover, that even among Unix-ish systems there are variations.
+
+For many functions, you can also query C<%Config>, exported by default
+from C<Config.pm>. For example, to check if the platform has the C<lstat>
+call, check C<$Config{'d_lstat'}>. See L<Config.pm> for a full
+description of available variables.
+
+
+=head2 Alphabetical Listing of Perl Functions
+
+=over 8
+
+=item -X FILEHANDLE
+
+=item -X EXPR
+
+=item -X
+
+C<-r>, C<-w>, and C<-x> have only a very limited meaning; directories
+and applications are executable, and there are no uid/gid
+considerations. C<-o> is not supported. (S<Mac OS>)
+
+C<-r>, C<-w>, C<-x>, and C<-o> tell whether or not file is accessible,
+which may not reflect UIC-based file protections. (VMS)
+
+C<-s> returns the size of the data fork, not the total size of data fork
+plus resource fork. (S<Mac OS>).
+
+C<-s> by name on an open file will return the space reserved on disk,
+rather than the current extent. C<-s> on an open filehandle returns the
+current size. (S<RISC OS>)
+
+C<-R>, C<-W>, C<-X>, C<-O> are indistinguishable from C<-r>, C<-w>,
+C<-x>, C<-o>. (S<Mac OS>, Win32, VMS, S<RISC OS>)
+
+C<-b>, C<-c>, C<-k>, C<-g>, C<-p>, C<-u>, C<-A> are not implemented.
+(S<Mac OS>)
+
+C<-g>, C<-k>, C<-l>, C<-p>, C<-u>, C<-A> are not particularly meaningful.
+(Win32, VMS, S<RISC OS>)
+
+C<-d> is true if passed a device spec without an explicit directory.
+(VMS)
+
+C<-T> and C<-B> are implemented, but might misclassify Mac text files
+with foreign characters; this is the case will all platforms, but may
+affect S<Mac OS> often. (S<Mac OS>)
+
+C<-x> (or C<-X>) determine if a file ends in one of the executable
+suffixes. C<-S> is meaningless. (Win32)
+
+C<-x> (or C<-X>) determine if a file has an executable file type.
+(S<RISC OS>)
+
+=item binmode FILEHANDLE
+
+Meaningless. (S<Mac OS>, S<RISC OS>)
+
+Reopens file and restores pointer; if function fails, underlying
+filehandle may be closed, or pointer may be in a different position.
+(VMS)
+
+The value returned by C<tell> may be affected after the call, and
+the filehandle may be flushed. (Win32)
+
+=item chmod LIST
+
+Only limited meaning. Disabling/enabling write permission is mapped to
+locking/unlocking the file. (S<Mac OS>)
+
+Only good for changing "owner" read-write access, "group", and "other"
+bits are meaningless. (Win32)
+
+Only good for changing "owner" and "other" read-write access. (S<RISC OS>)
+
+Access permissions are mapped onto VOS access-control list changes. (VOS)
+
+=item chown LIST
+
+Not implemented. (S<Mac OS>, Win32, Plan9, S<RISC OS>, VOS)
+
+Does nothing, but won't fail. (Win32)
+
+=item chroot FILENAME
+
+=item chroot
+
+Not implemented. (S<Mac OS>, Win32, VMS, Plan9, S<RISC OS>, VOS, VM/ESA)
+
+=item crypt PLAINTEXT,SALT
+
+May not be available if library or source was not provided when building
+perl. (Win32)
+
+Not implemented. (VOS)
+
+=item dbmclose HASH
+
+Not implemented. (VMS, Plan9, VOS)
+
+=item dbmopen HASH,DBNAME,MODE
+
+Not implemented. (VMS, Plan9, VOS)
+
+=item dump LABEL
+
+Not useful. (S<Mac OS>, S<RISC OS>)
+
+Not implemented. (Win32)
+
+Invokes VMS debugger. (VMS)
+
+=item exec LIST
+
+Not implemented. (S<Mac OS>)
+
+Implemented via Spawn. (VM/ESA)
+
+=item fcntl FILEHANDLE,FUNCTION,SCALAR
+
+Not implemented. (Win32, VMS)
+
+=item flock FILEHANDLE,OPERATION
+
+Not implemented (S<Mac OS>, VMS, S<RISC OS>, VOS).
+
+Available only on Windows NT (not on Windows 95). (Win32)
+
+=item fork
+
+Not implemented. (S<Mac OS>, Win32, AmigaOS, S<RISC OS>, VOS, VM/ESA)
+
+=item getlogin
+
+Not implemented. (S<Mac OS>, S<RISC OS>)
+
+=item getpgrp PID
+
+Not implemented. (S<Mac OS>, Win32, VMS, S<RISC OS>, VOS)
+
+=item getppid
+
+Not implemented. (S<Mac OS>, Win32, VMS, S<RISC OS>)
+
+=item getpriority WHICH,WHO
+
+Not implemented. (S<Mac OS>, Win32, VMS, S<RISC OS>, VOS, VM/ESA)
+
+=item getpwnam NAME
+
+Not implemented. (S<Mac OS>, Win32)
+
+Not useful. (S<RISC OS>)
+
+=item getgrnam NAME
+
+Not implemented. (S<Mac OS>, Win32, VMS, S<RISC OS>)
+
+=item getnetbyname NAME
+
+Not implemented. (S<Mac OS>, Win32, Plan9)
+
+=item getpwuid UID
+
+Not implemented. (S<Mac OS>, Win32)
+
+Not useful. (S<RISC OS>)
+
+=item getgrgid GID
+
+Not implemented. (S<Mac OS>, Win32, VMS, S<RISC OS>)
+
+=item getnetbyaddr ADDR,ADDRTYPE
+
+Not implemented. (S<Mac OS>, Win32, Plan9)
+
+=item getprotobynumber NUMBER
+
+Not implemented. (S<Mac OS>)
+
+=item getservbyport PORT,PROTO
+
+Not implemented. (S<Mac OS>)
+
+=item getpwent
+
+Not implemented. (S<Mac OS>, Win32, VM/ESA)
+
+=item getgrent
+
+Not implemented. (S<Mac OS>, Win32, VMS, VM/ESA)
+
+=item gethostent
+
+Not implemented. (S<Mac OS>, Win32)
+
+=item getnetent
+
+Not implemented. (S<Mac OS>, Win32, Plan9)
+
+=item getprotoent
+
+Not implemented. (S<Mac OS>, Win32, Plan9)
+
+=item getservent
+
+Not implemented. (Win32, Plan9)
+
+=item setpwent
+
+Not implemented. (S<Mac OS>, Win32, S<RISC OS>)
+
+=item setgrent
+
+Not implemented. (S<Mac OS>, Win32, VMS, S<RISC OS>)
+
+=item sethostent STAYOPEN
+
+Not implemented. (S<Mac OS>, Win32, Plan9, S<RISC OS>)
+
+=item setnetent STAYOPEN
+
+Not implemented. (S<Mac OS>, Win32, Plan9, S<RISC OS>)
+
+=item setprotoent STAYOPEN
+
+Not implemented. (S<Mac OS>, Win32, Plan9, S<RISC OS>)
+
+=item setservent STAYOPEN
+
+Not implemented. (Plan9, Win32, S<RISC OS>)
+
+=item endpwent
+
+Not implemented. (S<Mac OS>, Win32, VM/ESA)
+
+=item endgrent
+
+Not implemented. (S<Mac OS>, Win32, VMS, S<RISC OS>, VM/ESA)
+
+=item endhostent
+
+Not implemented. (S<Mac OS>, Win32)
+
+=item endnetent
+
+Not implemented. (S<Mac OS>, Win32, Plan9)
+
+=item endprotoent
+
+Not implemented. (S<Mac OS>, Win32, Plan9)
+
+=item endservent
+
+Not implemented. (Plan9, Win32)
+
+=item getsockopt SOCKET,LEVEL,OPTNAME
+
+Not implemented. (S<Mac OS>, Plan9)
+
+=item glob EXPR
+
+=item glob
+
+Globbing built-in, but only C<*> and C<?> metacharacters are supported.
+(S<Mac OS>)
+
+Features depend on external perlglob.exe or perlglob.bat. May be
+overridden with something like File::DosGlob, which is recommended.
+(Win32)
+
+Globbing built-in, but only C<*> and C<?> metacharacters are supported.
+Globbing relies on operating system calls, which may return filenames
+in any order. As most filesystems are case-insensitive, even "sorted"
+filenames will not be in case-sensitive order. (S<RISC OS>)
+
+=item ioctl FILEHANDLE,FUNCTION,SCALAR
+
+Not implemented. (VMS)
+
+Available only for socket handles, and it does what the ioctlsocket() call
+in the Winsock API does. (Win32)
+
+Available only for socket handles. (S<RISC OS>)
+
+=item kill LIST
+
+Not implemented, hence not useful for taint checking. (S<Mac OS>,
+S<RISC OS>)
+
+Available only for process handles returned by the C<system(1, ...)>
+method of spawning a process. (Win32)
+
+=item link OLDFILE,NEWFILE
+
+Not implemented. (S<Mac OS>, Win32, VMS, S<RISC OS>)
+
+Link count not updated because hard links are not quite that hard
+(They are sort of half-way between hard and soft links). (AmigaOS)
+
+=item lstat FILEHANDLE
+
+=item lstat EXPR
+
+=item lstat
+
+Not implemented. (VMS, S<RISC OS>)
+
+Return values may be bogus. (Win32)
+
+=item msgctl ID,CMD,ARG
+
+=item msgget KEY,FLAGS
+
+=item msgsnd ID,MSG,FLAGS
+
+=item msgrcv ID,VAR,SIZE,TYPE,FLAGS
+
+Not implemented. (S<Mac OS>, Win32, VMS, Plan9, S<RISC OS>, VOS)
+
+=item open FILEHANDLE,EXPR
+
+=item open FILEHANDLE
+
+The C<|> variants are only supported if ToolServer is installed.
+(S<Mac OS>)
+
+open to C<|-> and C<-|> are unsupported. (S<Mac OS>, Win32, S<RISC OS>)
+
+=item pipe READHANDLE,WRITEHANDLE
+
+Not implemented. (S<Mac OS>)
+
+Very limited functionality. (MiNT)
+
+=item readlink EXPR
+
+=item readlink
+
+Not implemented. (Win32, VMS, S<RISC OS>)
+
+=item select RBITS,WBITS,EBITS,TIMEOUT
+
+Only implemented on sockets. (Win32)
+
+Only reliable on sockets. (S<RISC OS>)
+
+=item semctl ID,SEMNUM,CMD,ARG
+
+=item semget KEY,NSEMS,FLAGS
+
+=item semop KEY,OPSTRING
+
+Not implemented. (S<Mac OS>, Win32, VMS, S<RISC OS>, VOS)
+
+=item setpgrp PID,PGRP
+
+Not implemented. (S<Mac OS>, Win32, VMS, S<RISC OS>, VOS)
+
+=item setpriority WHICH,WHO,PRIORITY
+
+Not implemented. (S<Mac OS>, Win32, VMS, S<RISC OS>, VOS)
+
+=item setsockopt SOCKET,LEVEL,OPTNAME,OPTVAL
+
+Not implemented. (S<Mac OS>, Plan9)
+
+=item shmctl ID,CMD,ARG
+
+=item shmget KEY,SIZE,FLAGS
+
+=item shmread ID,VAR,POS,SIZE
+
+=item shmwrite ID,STRING,POS,SIZE
+
+Not implemented. (S<Mac OS>, Win32, VMS, S<RISC OS>, VOS)
+
+=item socketpair SOCKET1,SOCKET2,DOMAIN,TYPE,PROTOCOL
+
+Not implemented. (S<Mac OS>, Win32, VMS, S<RISC OS>, VOS, VM/ESA)
+
+=item stat FILEHANDLE
+
+=item stat EXPR
+
+=item stat
+
+mtime and atime are the same thing, and ctime is creation time instead of
+inode change time. (S<Mac OS>)
+
+device and inode are not meaningful. (Win32)
+
+device and inode are not necessarily reliable. (VMS)
+
+mtime, atime and ctime all return the last modification time. Device and
+inode are not necessarily reliable. (S<RISC OS>)
+
+=item symlink OLDFILE,NEWFILE
+
+Not implemented. (Win32, VMS, S<RISC OS>)
+
+=item syscall LIST
+
+Not implemented. (S<Mac OS>, Win32, VMS, S<RISC OS>, VOS, VM/ESA)
+
+=item sysopen FILEHANDLE,FILENAME,MODE,PERMS
+
+The traditional "0", "1", and "2" MODEs are implemented with different
+numeric values on some systems. The flags exported by C<Fcntl>
+(O_RDONLY, O_WRONLY, O_RDWR) should work everywhere though. (S<Mac
+OS>, OS/390, VM/ESA)
+
+=item system LIST
+
+Only implemented if ToolServer is installed. (S<Mac OS>)
+
+As an optimization, may not call the command shell specified in
+C<$ENV{PERL5SHELL}>. C<system(1, @args)> spawns an external
+process and immediately returns its process designator, without
+waiting for it to terminate. Return value may be used subsequently
+in C<wait> or C<waitpid>. (Win32)
+
+There is no shell to process metacharacters, and the native standard is
+to pass a command line terminated by "\n" "\r" or "\0" to the spawned
+program. Redirection such as C<E<gt> foo> is performed (if at all) by
+the run time library of the spawned program. C<system> I<list> will call
+the Unix emulation library's C<exec> emulation, which attempts to provide
+emulation of the stdin, stdout, stderr in force in the parent, providing
+the child program uses a compatible version of the emulation library.
+I<scalar> will call the native command line direct and no such emulation
+of a child Unix program will exists. Mileage B<will> vary. (S<RISC OS>)
+
+Far from being POSIX compliant. Because there may be no underlying
+/bin/sh tries to work around the problem by forking and execing the
+first token in its argument string. Handles basic redirection
+("E<lt>" or "E<gt>") on its own behalf. (MiNT)
+
+=item times
+
+Only the first entry returned is nonzero. (S<Mac OS>)
+
+"cumulative" times will be bogus. On anything other than Windows NT,
+"system" time will be bogus, and "user" time is actually the time
+returned by the clock() function in the C runtime library. (Win32)
+
+Not useful. (S<RISC OS>)
+
+=item truncate FILEHANDLE,LENGTH
+
+=item truncate EXPR,LENGTH
+
+Not implemented. (VMS)
+
+Truncation to zero-length only. (VOS)
+
+If a FILEHANDLE is supplied, it must be writable and opened in append
+mode (i.e., use C<open(FH, '>>filename')>
+or C<sysopen(FH,...,O_APPEND|O_RDWR)>. If a filename is supplied, it
+should not be held open elsewhere. (Win32)
+
+=item umask EXPR
+
+=item umask
+
+Returns undef where unavailable, as of version 5.005.
+
+C<umask()> works but the correct permissions are only set when the file
+is finally close()d. (AmigaOS)
+
+=item utime LIST
+
+Only the modification time is updated. (S<Mac OS>, VMS, S<RISC OS>)
+
+May not behave as expected. Behavior depends on the C runtime
+library's implementation of utime(), and the filesystem being
+used. The FAT filesystem typically does not support an "access
+time" field, and it may limit timestamps to a granularity of
+two seconds. (Win32)
+
+=item wait
+
+=item waitpid PID,FLAGS
+
+Not implemented. (S<Mac OS>, VOS)
+
+Can only be applied to process handles returned for processes spawned
+using C<system(1, ...)>. (Win32)
+
+Not useful. (S<RISC OS>)
+
+=back
+
+=head1 CHANGES
+
+=over 4
+
+=item v1.39, 11 February, 1999
+
+Changes from Jarkko and EMX URL fixes Michael Schwern. Additional
+note about newlines added.
+
+=item v1.38, 31 December 1998
+
+More changes from Jarkko.
+
+=item v1.37, 19 December 1998
+
+More minor changes. Merge two separate version 1.35 documents.
+
+=item v1.36, 9 September 1998
+
+Updated for Stratus VOS. Also known as version 1.35.
+
+=item v1.35, 13 August 1998
+
+Integrate more minor changes, plus addition of new sections under
+L<"ISSUES">: L<"Numbers endianness and Width">,
+L<"Character sets and character encoding">,
+L<"Internationalisation">.
+
+=item v1.33, 06 August 1998
+
+Integrate more minor changes.
+
+=item v1.32, 05 August 1998
+
+Integrate more minor changes.
+
+=item v1.30, 03 August 1998
+
+Major update for RISC OS, other minor changes.
+
+=item v1.23, 10 July 1998
+
+First public release with perl5.005.
+
+=back
+
+=head1 AUTHORS / CONTRIBUTORS
+
+Abigail E<lt>abigail@fnx.comE<gt>,
+Charles Bailey E<lt>bailey@newman.upenn.eduE<gt>,
+Graham Barr E<lt>gbarr@pobox.comE<gt>,
+Tom Christiansen E<lt>tchrist@perl.comE<gt>,
+Nicholas Clark E<lt>Nicholas.Clark@liverpool.ac.ukE<gt>,
+Andy Dougherty E<lt>doughera@lafcol.lafayette.eduE<gt>,
+Dominic Dunlop E<lt>domo@vo.luE<gt>,
+Neale Ferguson E<lt>neale@mailbox.tabnsw.com.auE<gt>
+Paul Green E<lt>Paul_Green@stratus.comE<gt>,
+M.J.T. Guy E<lt>mjtg@cus.cam.ac.ukE<gt>,
+Jarkko Hietaniemi E<lt>jhi@iki.fi<gt>,
+Luther Huffman E<lt>lutherh@stratcom.comE<gt>,
+Nick Ing-Simmons E<lt>nick@ni-s.u-net.comE<gt>,
+Andreas J. KE<ouml>nig E<lt>koenig@kulturbox.deE<gt>,
+Markus Laker E<lt>mlaker@contax.co.ukE<gt>,
+Andrew M. Langmead E<lt>aml@world.std.comE<gt>,
+Paul Moore E<lt>Paul.Moore@uk.origin-it.comE<gt>,
+Chris Nandor E<lt>pudge@pobox.comE<gt>,
+Matthias Neeracher E<lt>neeri@iis.ee.ethz.chE<gt>,
+Gary Ng E<lt>71564.1743@CompuServe.COME<gt>,
+Tom Phoenix E<lt>rootbeer@teleport.comE<gt>,
+Peter Prymmer E<lt>pvhp@forte.comE<gt>,
+Hugo van der Sanden E<lt>hv@crypt0.demon.co.ukE<gt>,
+Gurusamy Sarathy E<lt>gsar@umich.eduE<gt>,
+Paul J. Schinder E<lt>schinder@pobox.comE<gt>,
+Michael G Schwern E<lt>schwern@pobox.comE<gt>,
+Dan Sugalski E<lt>sugalskd@ous.eduE<gt>,
+Nathan Torkington E<lt>gnat@frii.comE<gt>.
+
+This document is maintained by Chris Nandor
+E<lt>pudge@pobox.comE<gt>.
+
+=head1 VERSION
+
+Version 1.39, last modified 11 February 1999
diff --git a/gnu/usr.bin/perl/pod/perlreftut.pod b/gnu/usr.bin/perl/pod/perlreftut.pod
new file mode 100644
index 00000000000..09bea594ff4
--- /dev/null
+++ b/gnu/usr.bin/perl/pod/perlreftut.pod
@@ -0,0 +1,416 @@
+
+=head1 NAME
+
+perlreftut - Mark's very short tutorial about references
+
+=head1 DESCRIPTION
+
+One of the most important new features in Perl 5 was the capability to
+manage complicated data structures like multidimensional arrays and
+nested hashes. To enable these, Perl 5 introduced a feature called
+`references', and using references is the key to managing complicated,
+structured data in Perl. Unfortunately, there's a lot of funny syntax
+to learn, and the main manual page can be hard to follow. The manual
+is quite complete, and sometimes people find that a problem, because
+it can be hard to tell what is important and what isn't.
+
+Fortunately, you only need to know 10% of what's in the main page to get
+90% of the benefit. This page will show you that 10%.
+
+=head1 Who Needs Complicated Data Structures?
+
+One problem that came up all the time in Perl 4 was how to represent a
+hash whose values were lists. Perl 4 had hashes, of course, but the
+values had to be scalars; they couldn't be lists.
+
+Why would you want a hash of lists? Let's take a simple example: You
+have a file of city and country names, like this:
+
+ Chicago, USA
+ Frankfurt, Germany
+ Berlin, Germany
+ Washington, USA
+ Helsinki, Finland
+ New York, USA
+
+and you want to produce an output like this, with each country mentioned
+once, and then an alphabetical list of the cities in that country:
+
+ Finland: Helsinki.
+ Germany: Berlin, Frankfurt.
+ USA: Chicago, New York, Washington.
+
+The natural way to do this is to have a hash whose keys are country
+names. Associated with each country name key is a list of the cities in
+that country. Each time you read a line of input, split it into a country
+and a city, look up the list of cities already known to be in that
+country, and append the new city to the list. When you're done reading
+the input, iterate over the hash as usual, sorting each list of cities
+before you print it out.
+
+If hash values can't be lists, you lose. In Perl 4, hash values can't
+be lists; they can only be strings. You lose. You'd probably have to
+combine all the cities into a single string somehow, and then when
+time came to write the output, you'd have to break the string into a
+list, sort the list, and turn it back into a string. This is messy
+and error-prone. And it's frustrating, because Perl already has
+perfectly good lists that would solve the problem if only you could
+use them.
+
+=head1 The Solution
+
+By the time Perl 5 rolled around, we were already stuck with this
+design: Hash values must be scalars. The solution to this is
+references.
+
+A reference is a scalar value that I<refers to> an entire array or an
+entire hash (or to just about anything else). Names are one kind of
+reference that you're already familiar with. Think of the President:
+a messy, inconvenient bag of blood and bones. But to talk about him,
+or to represent him in a computer program, all you need is the easy,
+convenient scalar string "Bill Clinton".
+
+References in Perl are like names for arrays and hashes. They're
+Perl's private, internal names, so you can be sure they're
+unambiguous. Unlike "Bill Clinton", a reference only refers to one
+thing, and you always know what it refers to. If you have a reference
+to an array, you can recover the entire array from it. If you have a
+reference to a hash, you can recover the entire hash. But the
+reference is still an easy, compact scalar value.
+
+You can't have a hash whose values are arrays; hash values can only be
+scalars. We're stuck with that. But a single reference can refer to
+an entire array, and references are scalars, so you can have a hash of
+references to arrays, and it'll act a lot like a hash of arrays, and
+it'll be just as useful as a hash of arrays.
+
+We'll come back to this city-country problem later, after we've seen
+some syntax for managing references.
+
+
+=head1 Syntax
+
+There are just two ways to make a reference, and just two ways to use
+it once you have it.
+
+=head2 Making References
+
+B<Make Rule 1>
+
+If you put a C<\> in front of a variable, you get a
+reference to that variable.
+
+ $aref = \@array; # $aref now holds a reference to @array
+ $href = \%hash; # $href now holds a reference to %hash
+
+Once the reference is stored in a variable like $aref or $href, you
+can copy it or store it just the same as any other scalar value:
+
+ $xy = $aref; # $xy now holds a reference to @array
+ $p[3] = $href; # $p[3] now holds a reference to %hash
+ $z = $p[3]; # $z now holds a reference to %hash
+
+
+These examples show how to make references to variables with names.
+Sometimes you want to make an array or a hash that doesn't have a
+name. This is analogous to the way you like to be able to use the
+string C<"\n"> or the number 80 without having to store it in a named
+variable first.
+
+B<Make Rule 2>
+
+C<[ ITEMS ]> makes a new, anonymous array, and returns a reference to
+that array. C<{ ITEMS }> makes a new, anonymous hash. and returns a
+reference to that hash.
+
+ $aref = [ 1, "foo", undef, 13 ];
+ # $aref now holds a reference to an array
+
+ $href = { APR => 4, AUG => 8 };
+ # $href now holds a reference to a hash
+
+
+The references you get from rule 2 are the same kind of
+references that you get from rule 1:
+
+ # This:
+ $aref = [ 1, 2, 3 ];
+
+ # Does the same as this:
+ @array = (1, 2, 3);
+ $aref = \@array;
+
+
+The first line is an abbreviation for the following two lines, except
+that it doesn't create the superfluous array variable C<@array>.
+
+
+=head2 Using References
+
+What can you do with a reference once you have it? It's a scalar
+value, and we've seen that you can store it as a scalar and get it back
+again just like any scalar. There are just two more ways to use it:
+
+B<Use Rule 1>
+
+If C<$aref> contains a reference to an array, then you
+can put C<{$aref}> anywhere you would normally put the name of an
+array. For example, C<@{$aref}> instead of C<@array>.
+
+Here are some examples of that:
+
+Arrays:
+
+
+ @a @{$aref} An array
+ reverse @a reverse @{$aref} Reverse the array
+ $a[3] ${$aref}[3] An element of the array
+ $a[3] = 17; ${$aref}[3] = 17 Assigning an element
+
+
+On each line are two expressions that do the same thing. The
+left-hand versions operate on the array C<@a>, and the right-hand
+versions operate on the array that is referred to by C<$aref>, but
+once they find the array they're operating on, they do the same things
+to the arrays.
+
+Using a hash reference is I<exactly> the same:
+
+ %h %{$href} A hash
+ keys %h keys %{$href} Get the keys from the hash
+ $h{'red'} ${$href}{'red'} An element of the hash
+ $h{'red'} = 17 ${$href}{'red'} = 17 Assigning an element
+
+
+B<Use Rule 2>
+
+C<${$aref}[3]> is too hard to read, so you can write C<$aref-E<gt>[3]>
+instead.
+
+C<${$href}{red}> is too hard to read, so you can write
+C<$href-E<gt>{red}> instead.
+
+Most often, when you have an array or a hash, you want to get or set a
+single element from it. C<${$aref}[3]> and C<${$href}{'red'}> have
+too much punctuation, and Perl lets you abbreviate.
+
+If C<$aref> holds a reference to an array, then C<$aref-E<gt>[3]> is
+the fourth element of the array. Don't confuse this with C<$aref[3]>,
+which is the fourth element of a totally different array, one
+deceptively named C<@aref>. C<$aref> and C<@aref> are unrelated the
+same way that C<$item> and C<@item> are.
+
+Similarly, C<$href-E<gt>{'red'}> is part of the hash referred to by
+the scalar variable C<$href>, perhaps even one with no name.
+C<$href{'red'}> is part of the deceptively named C<%href> hash. It's
+easy to forget to leave out the C<-E<gt>>, and if you do, you'll get
+bizarre results when your program gets array and hash elements out of
+totally unexpected hashes and arrays that weren't the ones you wanted
+to use.
+
+
+=head1 An Example
+
+Let's see a quick example of how all this is useful.
+
+First, remember that C<[1, 2, 3]> makes an anonymous array containing
+C<(1, 2, 3)>, and gives you a reference to that array.
+
+Now think about
+
+ @a = ( [1, 2, 3],
+ [4, 5, 6],
+ [7, 8, 9]
+ );
+
+@a is an array with three elements, and each one is a reference to
+another array.
+
+C<$a[1]> is one of these references. It refers to an array, the array
+containing C<(4, 5, 6)>, and because it is a reference to an array,
+B<USE RULE 2> says that we can write C<$a[1]-E<gt>[2]> to get the
+third element from that array. C<$a[1]-E<gt>[2]> is the 6.
+Similarly, C<$a[0]-E<gt>[1]> is the 2. What we have here is like a
+two-dimensional array; you can write C<$a[ROW]-E<gt>[COLUMN]> to get
+or set the element in any row and any column of the array.
+
+The notation still looks a little cumbersome, so there's one more
+abbreviation:
+
+=head1 Arrow Rule
+
+In between two B<subscripts>, the arrow is optional.
+
+Instead of C<$a[1]-E<gt>[2]>, we can write C<$a[1][2]>; it means the
+same thing. Instead of C<$a[0]-E<gt>[1]>, we can write C<$a[0][1]>;
+it means the same thing.
+
+Now it really looks like two-dimensional arrays!
+
+You can see why the arrows are important. Without them, we would have
+had to write C<${$a[1]}[2]> instead of C<$a[1][2]>. For
+three-dimensional arrays, they let us write C<$x[2][3][5]> instead of
+the unreadable C<${${$x[2]}[3]}[5]>.
+
+
+=head1 Solution
+
+Here's the answer to the problem I posed earlier, of reformatting a
+file of city and country names.
+
+ 1 while (<>) {
+ 2 chomp;
+ 3 my ($city, $country) = split /, /;
+ 4 push @{$table{$country}}, $city;
+ 5 }
+ 6
+ 7 foreach $country (sort keys %table) {
+ 8 print "$country: ";
+ 9 my @cities = @{$table{$country}};
+ 10 print join ', ', sort @cities;
+ 11 print ".\n";
+ 12 }
+
+
+The program has two pieces: Lines 1--5 read the input and build a
+data structure, and lines 7--12 analyze the data and print out the
+report.
+
+In the first part, line 4 is the important one. We're going to have a
+hash, C<%table>, whose keys are country names, and whose values are
+(references to) arrays of city names. After acquiring a city and
+country name, the program looks up C<$table{$country}>, which holds (a
+reference to) the list of cities seen in that country so far. Line 4 is
+totally analogous to
+
+ push @array, $city;
+
+except that the name C<array> has been replaced by the reference
+C<{$table{$country}}>. The C<push> adds a city name to the end of the
+referred-to array.
+
+In the second part, line 9 is the important one. Again,
+C<$table{$country}> is (a reference to) the list of cities in the country, so
+we can recover the original list, and copy it into the array C<@cities>,
+by using C<@{$table{$country}}>. Line 9 is totally analogous to
+
+ @cities = @array;
+
+except that the name C<array> has been replaced by the reference
+C<{$table{$country}}>. The C<@> tells Perl to get the entire array.
+
+The rest of the program is just familiar uses of C<chomp>, C<split>, C<sort>,
+C<print>, and doesn't involve references at all.
+
+There's one fine point I skipped. Suppose the program has just read
+the first line in its input that happens to mention Greece.
+Control is at line 4, C<$country> is C<'Greece'>, and C<$city> is
+C<'Athens'>. Since this is the first city in Greece,
+C<$table{$country}> is undefined---in fact there isn't an C<'Greece'> key
+in C<%table> at all. What does line 4 do here?
+
+ 4 push @{$table{$country}}, $city;
+
+
+This is Perl, so it does the exact right thing. It sees that you want
+to push C<Athens> onto an array that doesn't exist, so it helpfully
+makes a new, empty, anonymous array for you, installs it in the table,
+and then pushes C<Athens> onto it. This is called `autovivification'.
+
+
+=head1 The Rest
+
+I promised to give you 90% of the benefit with 10% of the details, and
+that means I left out 90% of the details. Now that you have an
+overview of the important parts, it should be easier to read the
+L<perlref> manual page, which discusses 100% of the details.
+
+Some of the highlights of L<perlref>:
+
+=over 4
+
+=item *
+
+You can make references to anything, including scalars, functions, and
+other references.
+
+=item *
+
+In B<USE RULE 1>, you can omit the curly brackets whenever the thing
+inside them is an atomic scalar variable like C<$aref>. For example,
+C<@$aref> is the same as C<@{$aref}>, and C<$$aref[1]> is the same as
+C<${$aref}[1]>. If you're just starting out, you may want to adopt
+the habit of always including the curly brackets.
+
+=item *
+
+To see if a variable contains a reference, use the `ref' function.
+It returns true if its argument is a reference. Actually it's a
+little better than that: It returns HASH for hash references and
+ARRAY for array references.
+
+=item *
+
+If you try to use a reference like a string, you get strings like
+
+ ARRAY(0x80f5dec) or HASH(0x826afc0)
+
+If you ever see a string that looks like this, you'll know you
+printed out a reference by mistake.
+
+A side effect of this representation is that you can use C<eq> to see
+if two references refer to the same thing. (But you should usually use
+C<==> instead because it's much faster.)
+
+=item *
+
+You can use a string as if it were a reference. If you use the string
+C<"foo"> as an array reference, it's taken to be a reference to the
+array C<@foo>. This is called a I<soft reference> or I<symbolic reference>.
+
+=back
+
+You might prefer to go on to L<perllol> instead of L<perlref>; it
+discusses lists of lists and multidimensional arrays in detail. After
+that, you should move on to L<perldsc>; it's a Data Structure Cookbook
+that shows recipes for using and printing out arrays of hashes, hashes
+of arrays, and other kinds of data.
+
+=head1 Summary
+
+Everyone needs compound data structures, and in Perl the way you get
+them is with references. There are four important rules for managing
+references: Two for making references and two for using them. Once
+you know these rules you can do most of the important things you need
+to do with references.
+
+=head1 Credits
+
+Author: Mark-Jason Dominus, Plover Systems (C<mjd-perl-ref@plover.com>)
+
+This article originally appeared in I<The Perl Journal>
+(http://tpj.com) volume 3, #2. Reprinted with permission.
+
+The original title was I<Understand References Today>.
+
+=head2 Distribution Conditions
+
+Copyright 1998 The Perl Journal.
+
+When included as part of the Standard Version of Perl, or as part of
+its complete documentation whether printed or otherwise, this work may
+be distributed only under the terms of Perl's Artistic License. Any
+distribution of this file or derivatives thereof outside of that
+package require that special arrangements be made with copyright
+holder.
+
+Irrespective of its distribution, all code examples in these files are
+hereby placed into the public domain. You are permitted and
+encouraged to use this code in your own programs for fun or for profit
+as you see fit. A simple comment in the code giving credit would be
+courteous but is not required.
+
+
+
+
+=cut
diff --git a/gnu/usr.bin/perl/pod/perlthrtut.pod b/gnu/usr.bin/perl/pod/perlthrtut.pod
new file mode 100644
index 00000000000..f2ca3bda644
--- /dev/null
+++ b/gnu/usr.bin/perl/pod/perlthrtut.pod
@@ -0,0 +1,1063 @@
+=head1 NAME
+
+perlthrtut - tutorial on threads in Perl
+
+=head1 DESCRIPTION
+
+One of the most prominent new features of Perl 5.005 is the inclusion
+of threads. Threads make a number of things a lot easier, and are a
+very useful addition to your bag of programming tricks.
+
+=head1 What Is A Thread Anyway?
+
+A thread is a flow of control through a program with a single
+execution point.
+
+Sounds an awful lot like a process, doesn't it? Well, it should.
+Threads are one of the pieces of a process. Every process has at least
+one thread and, up until now, every process running Perl had only one
+thread. With 5.005, though, you can create extra threads. We're going
+to show you how, when, and why.
+
+=head1 Threaded Program Models
+
+There are three basic ways that you can structure a threaded
+program. Which model you choose depends on what you need your program
+to do. For many non-trivial threaded programs you'll need to choose
+different models for different pieces of your program.
+
+=head2 Boss/Worker
+
+The boss/worker model usually has one `boss' thread and one or more
+`worker' threads. The boss thread gathers or generates tasks that need
+to be done, then parcels those tasks out to the appropriate worker
+thread.
+
+This model is common in GUI and server programs, where a main thread
+waits for some event and then passes that event to the appropriate
+worker threads for processing. Once the event has been passed on, the
+boss thread goes back to waiting for another event.
+
+The boss thread does relatively little work. While tasks aren't
+necessarily performed faster than with any other method, it tends to
+have the best user-response times.
+
+=head2 Work Crew
+
+In the work crew model, several threads are created that do
+essentially the same thing to different pieces of data. It closely
+mirrors classical parallel processing and vector processors, where a
+large array of processors do the exact same thing to many pieces of
+data.
+
+This model is particularly useful if the system running the program
+will distribute multiple threads across different processors. It can
+also be useful in ray tracing or rendering engines, where the
+individual threads can pass on interim results to give the user visual
+feedback.
+
+=head2 Pipeline
+
+The pipeline model divides up a task into a series of steps, and
+passes the results of one step on to the thread processing the
+next. Each thread does one thing to each piece of data and passes the
+results to the next thread in line.
+
+This model makes the most sense if you have multiple processors so two
+or more threads will be executing in parallel, though it can often
+make sense in other contexts as well. It tends to keep the individual
+tasks small and simple, as well as allowing some parts of the pipeline
+to block (on I/O or system calls, for example) while other parts keep
+going. If you're running different parts of the pipeline on different
+processors you may also take advantage of the caches on each
+processor.
+
+This model is also handy for a form of recursive programming where,
+rather than having a subroutine call itself, it instead creates
+another thread. Prime and Fibonacci generators both map well to this
+form of the pipeline model. (A version of a prime number generator is
+presented later on.)
+
+=head1 Native threads
+
+There are several different ways to implement threads on a system. How
+threads are implemented depends both on the vendor and, in some cases,
+the version of the operating system. Often the first implementation
+will be relatively simple, but later versions of the OS will be more
+sophisticated.
+
+While the information in this section is useful, it's not necessary,
+so you can skip it if you don't feel up to it.
+
+There are three basic categories of threads-user-mode threads, kernel
+threads, and multiprocessor kernel threads.
+
+User-mode threads are threads that live entirely within a program and
+its libraries. In this model, the OS knows nothing about threads. As
+far as it's concerned, your process is just a process.
+
+This is the easiest way to implement threads, and the way most OSes
+start. The big disadvantage is that, since the OS knows nothing about
+threads, if one thread blocks they all do. Typical blocking activities
+include most system calls, most I/O, and things like sleep().
+
+Kernel threads are the next step in thread evolution. The OS knows
+about kernel threads, and makes allowances for them. The main
+difference between a kernel thread and a user-mode thread is
+blocking. With kernel threads, things that block a single thread don't
+block other threads. This is not the case with user-mode threads,
+where the kernel blocks at the process level and not the thread level.
+
+This is a big step forward, and can give a threaded program quite a
+performance boost over non-threaded programs. Threads that block
+performing I/O, for example, won't block threads that are doing other
+things. Each process still has only one thread running at once,
+though, regardless of how many CPUs a system might have.
+
+Since kernel threading can interrupt a thread at any time, they will
+uncover some of the implicit locking assumptions you may make in your
+program. For example, something as simple as C<$a = $a + 2> can behave
+unpredictably with kernel threads if C<$a> is visible to other
+threads, as another thread may have changed C<$a> between the time it
+was fetched on the right hand side and the time the new value is
+stored.
+
+Multiprocessor Kernel Threads are the final step in thread
+support. With multiprocessor kernel threads on a machine with multiple
+CPUs, the OS may schedule two or more threads to run simultaneously on
+different CPUs.
+
+This can give a serious performance boost to your threaded program,
+since more than one thread will be executing at the same time. As a
+tradeoff, though, any of those nagging synchronization issues that
+might not have shown with basic kernel threads will appear with a
+vengeance.
+
+In addition to the different levels of OS involvement in threads,
+different OSes (and different thread implementations for a particular
+OS) allocate CPU cycles to threads in different ways.
+
+Cooperative multitasking systems have running threads give up control
+if one of two things happen. If a thread calls a yield function, it
+gives up control. It also gives up control if the thread does
+something that would cause it to block, such as perform I/O. In a
+cooperative multitasking implementation, one thread can starve all the
+others for CPU time if it so chooses.
+
+Preemptive multitasking systems interrupt threads at regular intervals
+while the system decides which thread should run next. In a preemptive
+multitasking system, one thread usually won't monopolize the CPU.
+
+On some systems, there can be cooperative and preemptive threads
+running simultaneously. (Threads running with realtime priorities
+often behave cooperatively, for example, while threads running at
+normal priorities behave preemptively.)
+
+=head1 What kind of threads are perl threads?
+
+If you have experience with other thread implementations, you might
+find that things aren't quite what you expect. It's very important to
+remember when dealing with Perl threads that Perl Threads Are Not X
+Threads, for all values of X. They aren't POSIX threads, or
+DecThreads, or Java's Green threads, or Win32 threads. There are
+similarities, and the broad concepts are the same, but if you start
+looking for implementation details you're going to be either
+disappointed or confused. Possibly both.
+
+This is not to say that Perl threads are completely different from
+everything that's ever come before--they're not. Perl's threading
+model owes a lot to other thread models, especially POSIX. Just as
+Perl is not C, though, Perl threads are not POSIX threads. So if you
+find yourself looking for mutexes, or thread priorities, it's time to
+step back a bit and think about what you want to do and how Perl can
+do it.
+
+=head1 Threadsafe Modules
+
+The addition of threads has changed Perl's internals
+substantially. There are implications for people who write
+modules--especially modules with XS code or external libraries. While
+most modules won't encounter any problems, modules that aren't
+explicitly tagged as thread-safe should be tested before being used in
+production code.
+
+Not all modules that you might use are thread-safe, and you should
+always assume a module is unsafe unless the documentation says
+otherwise. This includes modules that are distributed as part of the
+core. Threads are a beta feature, and even some of the standard
+modules aren't thread-safe.
+
+If you're using a module that's not thread-safe for some reason, you
+can protect yourself by using semaphores and lots of programming
+discipline to control access to the module. Semaphores are covered
+later in the article. Perl Threads Are Different
+
+=head1 Thread Basics
+
+The core Thread module provides the basic functions you need to write
+threaded programs. In the following sections we'll cover the basics,
+showing you what you need to do to create a threaded program. After
+that, we'll go over some of the features of the Thread module that
+make threaded programming easier.
+
+=head2 Basic Thread Support
+
+Thread support is a Perl compile-time option-it's something that's
+turned on or off when Perl is built at your site, rather than when
+your programs are compiled. If your Perl wasn't compiled with thread
+support enabled, then any attempt to use threads will fail.
+
+Remember that the threading support in 5.005 is in beta release, and
+should be treated as such. You should expect that it may not function
+entirely properly, and the thread interface may well change some
+before it is a fully supported, production release. The beta version
+shouldn't be used for mission-critical projects. Having said that,
+threaded Perl is pretty nifty, and worth a look.
+
+Your programs can use the Config module to check whether threads are
+enabled. If your program can't run without them, you can say something
+like:
+
+ $Config{usethreads} or die "Recompile Perl with threads to run this program.";
+
+A possibly-threaded program using a possibly-threaded module might
+have code like this:
+
+ use Config;
+ use MyMod;
+
+ if ($Config{usethreads}) {
+ # We have threads
+ require MyMod_threaded;
+ import MyMod_threaded;
+ } else {
+ require MyMod_unthreaded;
+ import MyMod_unthreaded;
+ }
+
+Since code that runs both with and without threads is usually pretty
+messy, it's best to isolate the thread-specific code in its own
+module. In our example above, that's what MyMod_threaded is, and it's
+only imported if we're running on a threaded Perl.
+
+=head2 Creating Threads
+
+The Thread package provides the tools you need to create new
+threads. Like any other module, you need to tell Perl you want to use
+it; use Thread imports all the pieces you need to create basic
+threads.
+
+The simplest, straightforward way to create a thread is with new():
+
+ use Thread;
+
+ $thr = new Thread \&sub1;
+
+ sub sub1 {
+ print "In the thread\n";
+ }
+
+The new() method takes a reference to a subroutine and creates a new
+thread, which starts executing in the referenced subroutine. Control
+then passes both to the subroutine and the caller.
+
+If you need to, your program can pass parameters to the subroutine as
+part of the thread startup. Just include the list of parameters as
+part of the C<Thread::new> call, like this:
+
+ use Thread;
+ $Param3 = "foo";
+ $thr = new Thread \&sub1, "Param 1", "Param 2", $Param3;
+ $thr = new Thread \&sub1, @ParamList;
+ $thr = new Thread \&sub1, qw(Param1 Param2 $Param3);
+
+ sub sub1 {
+ my @InboundParameters = @_;
+ print "In the thread\n";
+ print "got parameters >", join("<>", @InboundParameters), "<\n";
+ }
+
+
+The subroutine runs like a normal Perl subroutine, and the call to new
+Thread returns whatever the subroutine returns.
+
+The last example illustrates another feature of threads. You can spawn
+off several threads using the same subroutine. Each thread executes
+the same subroutine, but in a separate thread with a separate
+environment and potentially separate arguments.
+
+The other way to spawn a new thread is with async(), which is a way to
+spin off a chunk of code like eval(), but into its own thread:
+
+ use Thread qw(async);
+
+ $LineCount = 0;
+
+ $thr = async {
+ while(<>) {$LineCount++}
+ print "Got $LineCount lines\n";
+ };
+
+ print "Waiting for the linecount to end\n";
+ $thr->join;
+ print "All done\n";
+
+You'll notice we did a use Thread qw(async) in that example. async is
+not exported by default, so if you want it, you'll either need to
+import it before you use it or fully qualify it as
+Thread::async. You'll also note that there's a semicolon after the
+closing brace. That's because async() treats the following block as an
+anonymous subroutine, so the semicolon is necessary.
+
+Like eval(), the code executes in the same context as it would if it
+weren't spun off. Since both the code inside and after the async start
+executing, you need to be careful with any shared resources. Locking
+and other synchronization techniques are covered later.
+
+=head2 Giving up control
+
+There are times when you may find it useful to have a thread
+explicitly give up the CPU to another thread. Your threading package
+might not support preemptive multitasking for threads, for example, or
+you may be doing something compute-intensive and want to make sure
+that the user-interface thread gets called frequently. Regardless,
+there are times that you might want a thread to give up the processor.
+
+Perl's threading package provides the yield() function that does
+this. yield() is pretty straightforward, and works like this:
+
+ use Thread qw(yield async);
+ async {
+ my $foo = 50;
+ while ($foo--) { print "first async\n" }
+ yield;
+ $foo = 50;
+ while ($foo--) { print "first async\n" }
+ };
+ async {
+ my $foo = 50;
+ while ($foo--) { print "second async\n" }
+ yield;
+ $foo = 50;
+ while ($foo--) { print "second async\n" }
+ };
+
+=head2 Waiting For A Thread To Exit
+
+Since threads are also subroutines, they can return values. To wait
+for a thread to exit and extract any scalars it might return, you can
+use the join() method.
+
+ use Thread;
+ $thr = new Thread \&sub1;
+
+ @ReturnData = $thr->join;
+ print "Thread returned @ReturnData";
+
+ sub sub1 { return "Fifty-six", "foo", 2; }
+
+In the example above, the join() method returns as soon as the thread
+ends. In addition to waiting for a thread to finish and gathering up
+any values that the thread might have returned, join() also performs
+any OS cleanup necessary for the thread. That cleanup might be
+important, especially for long-running programs that spawn lots of
+threads. If you don't want the return values and don't want to wait
+for the thread to finish, you should call the detach() method
+instead. detach() is covered later in the article.
+
+=head2 Errors In Threads
+
+So what happens when an error occurs in a thread? Any errors that
+could be caught with eval() are postponed until the thread is
+joined. If your program never joins, the errors appear when your
+program exits.
+
+Errors deferred until a join() can be caught with eval():
+
+ use Thread qw(async);
+ $thr = async {$b = 3/0}; # Divide by zero error
+ $foo = eval {$thr->join};
+ if ($@) {
+ print "died with error $@\n";
+ } else {
+ print "Hey, why aren't you dead?\n";
+ }
+
+eval() passes any results from the joined thread back unmodified, so
+if you want the return value of the thread, this is your only chance
+to get them.
+
+=head2 Ignoring A Thread
+
+join() does three things:it waits for a thread to exit, cleans up
+after it, and returns any data the thread may have produced. But what
+if you're not interested in the thread's return values, and you don't
+really care when the thread finishes? All you want is for the thread
+to get cleaned up after when it's done.
+
+In this case, you use the detach() method. Once a thread is detached,
+it'll run until it's finished, then Perl will clean up after it
+automatically.
+
+ use Thread;
+ $thr = new Thread \&sub1; # Spawn the thread
+
+ $thr->detach; # Now we officially don't care any more
+
+ sub sub1 {
+ $a = 0;
+ while (1) {
+ $a++;
+ print "\$a is $a\n";
+ sleep 1;
+ }
+ }
+
+
+Once a thread is detached, it may not be joined, and any output that
+it might have produced (if it was done and waiting for a join) is
+lost.
+
+=head1 Threads And Data
+
+Now that we've covered the basics of threads, it's time for our next
+topic: data. Threading introduces a couple of complications to data
+access that non-threaded programs never need to worry about.
+
+=head2 Shared And Unshared Data
+
+The single most important thing to remember when using threads is that
+all threads potentially have access to all the data anywhere in your
+program. While this is true with a nonthreaded Perl program as well,
+it's especially important to remember with a threaded program, since
+more than one thread can be accessing this data at once.
+
+Perl's scoping rules don't change because you're using threads. If a
+subroutine (or block, in the case of async()) could see a variable if
+you weren't running with threads, it can see it if you are. This is
+especially important for the subroutines that create, and makes my
+variables even more important. Remember--if your variables aren't
+lexically scoped (declared with C<my>) you're probably sharing it between
+threads.
+
+=head2 Thread Pitfall: Races
+
+While threads bring a new set of useful tools, they also bring a
+number of pitfalls. One pitfall is the race condition:
+
+ use Thread;
+ $a = 1;
+ $thr1 = Thread->new(\&sub1);
+ $thr2 = Thread->new(\&sub2);
+
+ sleep 10;
+ print "$a\n";
+
+ sub sub1 { $foo = $a; $a = $foo + 1; }
+ sub sub2 { $bar = $a; $a = $bar + 1; }
+
+What do you think $a will be? The answer, unfortunately, is "it
+depends." Both sub1() and sub2() access the global variable $a, once
+to read and once to write. Depending on factors ranging from your
+thread implementation's scheduling algorithm to the phase of the moon,
+$a can be 2 or 3.
+
+Race conditions are caused by unsynchronized access to shared
+data. Without explicit synchronization, there's no way to be sure that
+nothing has happened to the shared data between the time you access it
+and the time you update it. Even this simple code fragment has the
+possibility of error:
+
+ use Thread qw(async);
+ $a = 2;
+ async{ $b = $a; $a = $b + 1; };
+ async{ $c = $a; $a = $c + 1; };
+
+Two threads both access $a. Each thread can potentially be interrupted
+at any point, or be executed in any order. At the end, $a could be 3
+or 4, and both $b and $c could be 2 or 3.
+
+Whenever your program accesses data or resources that can be accessed
+by other threads, you must take steps to coordinate access or risk
+data corruption and race conditions.
+
+=head2 Controlling access: lock()
+
+The lock() function takes a variable (or subroutine, but we'll get to
+that later) and puts a lock on it. No other thread may lock the
+variable until the locking thread exits the innermost block containing
+the lock. Using lock() is straightforward:
+
+ use Thread qw(async);
+ $a = 4;
+ $thr1 = async {
+ $foo = 12;
+ {
+ lock ($a); # Block until we get access to $a
+ $b = $a;
+ $a = $b * $foo;
+ }
+ print "\$foo was $foo\n";
+ };
+ $thr2 = async {
+ $bar = 7;
+ {
+ lock ($a); # Block until we can get access to $a
+ $c = $a;
+ $a = $c * $bar;
+ }
+ print "\$bar was $bar\n";
+ };
+ $thr1->join;
+ $thr2->join;
+ print "\$a is $a\n";
+
+lock() blocks the thread until the variable being locked is
+available. When lock() returns, your thread can be sure that no other
+thread can lock that variable until the innermost block containing the
+lock exits.
+
+It's important to note that locks don't prevent access to the variable
+in question, only lock attempts. This is in keeping with Perl's
+longstanding tradition of courteous programming, and the advisory file
+locking that flock() gives you. Locked subroutines behave differently,
+however. We'll cover that later in the article.
+
+You may lock arrays and hashes as well as scalars. Locking an array,
+though, will not block subsequent locks on array elements, just lock
+attempts on the array itself.
+
+Finally, locks are recursive, which means it's okay for a thread to
+lock a variable more than once. The lock will last until the outermost
+lock() on the variable goes out of scope.
+
+=head2 Thread Pitfall: Deadlocks
+
+Locks are a handy tool to synchronize access to data. Using them
+properly is the key to safe shared data. Unfortunately, locks aren't
+without their dangers. Consider the following code:
+
+ use Thread qw(async yield);
+ $a = 4;
+ $b = "foo";
+ async {
+ lock($a);
+ yield;
+ sleep 20;
+ lock ($b);
+ };
+ async {
+ lock($b);
+ yield;
+ sleep 20;
+ lock ($a);
+ };
+
+This program will probably hang until you kill it. The only way it
+won't hang is if one of the two async() routines acquires both locks
+first. A guaranteed-to-hang version is more complicated, but the
+principle is the same.
+
+The first thread spawned by async() will grab a lock on $a then, a
+second or two later, try to grab a lock on $b. Meanwhile, the second
+thread grabs a lock on $b, then later tries to grab a lock on $a. The
+second lock attempt for both threads will block, each waiting for the
+other to release its lock.
+
+This condition is called a deadlock, and it occurs whenever two or
+more threads are trying to get locks on resources that the others
+own. Each thread will block, waiting for the other to release a lock
+on a resource. That never happens, though, since the thread with the
+resource is itself waiting for a lock to be released.
+
+There are a number of ways to handle this sort of problem. The best
+way is to always have all threads acquire locks in the exact same
+order. If, for example, you lock variables $a, $b, and $c, always lock
+$a before $b, and $b before $c. It's also best to hold on to locks for
+as short a period of time to minimize the risks of deadlock.
+
+=head2 Queues: Passing Data Around
+
+A queue is a special thread-safe object that lets you put data in one
+end and take it out the other without having to worry about
+synchronization issues. They're pretty straightforward, and look like
+this:
+
+ use Thread qw(async);
+ use Thread::Queue;
+
+ my $DataQueue = new Thread::Queue;
+ $thr = async {
+ while ($DataElement = $DataQueue->dequeue) {
+ print "Popped $DataElement off the queue\n";
+ }
+ };
+
+ $DataQueue->enqueue(12);
+ $DataQueue->enqueue("A", "B", "C");
+ $DataQueue->enqueue(\$thr);
+ sleep 10;
+ $DataQueue->enqueue(undef);
+
+You create the queue with new Thread::Queue. Then you can add lists of
+scalars onto the end with enqueue(), and pop scalars off the front of
+it with dequeue(). A queue has no fixed size, and can grow as needed
+to hold everything pushed on to it.
+
+If a queue is empty, dequeue() blocks until another thread enqueues
+something. This makes queues ideal for event loops and other
+communications between threads.
+
+=head1 Threads And Code
+
+In addition to providing thread-safe access to data via locks and
+queues, threaded Perl also provides general-purpose semaphores for
+coarser synchronization than locks provide and thread-safe access to
+entire subroutines.
+
+=head2 Semaphores: Synchronizing Data Access
+
+Semaphores are a kind of generic locking mechanism. Unlike lock, which
+gets a lock on a particular scalar, Perl doesn't associate any
+particular thing with a semaphore so you can use them to control
+access to anything you like. In addition, semaphores can allow more
+than one thread to access a resource at once, though by default
+semaphores only allow one thread access at a time.
+
+=over 4
+
+=item Basic semaphores
+
+Semaphores have two methods, down and up. down decrements the resource
+count, while up increments it. down calls will block if the
+semaphore's current count would decrement below zero. This program
+gives a quick demonstration:
+
+ use Thread qw(yield);
+ use Thread::Semaphore;
+ my $semaphore = new Thread::Semaphore;
+ $GlobalVariable = 0;
+
+ $thr1 = new Thread \&sample_sub, 1;
+ $thr2 = new Thread \&sample_sub, 2;
+ $thr3 = new Thread \&sample_sub, 3;
+
+ sub sample_sub {
+ my $SubNumber = shift @_;
+ my $TryCount = 10;
+ my $LocalCopy;
+ sleep 1;
+ while ($TryCount--) {
+ $semaphore->down;
+ $LocalCopy = $GlobalVariable;
+ print "$TryCount tries left for sub $SubNumber (\$GlobalVariable is $GlobalVariable)\n";
+ yield;
+ sleep 2;
+ $LocalCopy++;
+ $GlobalVariable = $LocalCopy;
+ $semaphore->up;
+ }
+ }
+
+The three invocations of the subroutine all operate in sync. The
+semaphore, though, makes sure that only one thread is accessing the
+global variable at once.
+
+=item Advanced Semaphores
+
+By default, semaphores behave like locks, letting only one thread
+down() them at a time. However, there are other uses for semaphores.
+
+Each semaphore has a counter attached to it. down() decrements the
+counter and up() increments the counter. By default, semaphores are
+created with the counter set to one, down() decrements by one, and
+up() increments by one. If down() attempts to decrement the counter
+below zero, it blocks until the counter is large enough. Note that
+while a semaphore can be created with a starting count of zero, any
+up() or down() always changes the counter by at least
+one. $semaphore->down(0) is the same as $semaphore->down(1).
+
+The question, of course, is why would you do something like this? Why
+create a semaphore with a starting count that's not one, or why
+decrement/increment it by more than one? The answer is resource
+availability. Many resources that you want to manage access for can be
+safely used by more than one thread at once.
+
+For example, let's take a GUI driven program. It has a semaphore that
+it uses to synchronize access to the display, so only one thread is
+ever drawing at once. Handy, but of course you don't want any thread
+to start drawing until things are properly set up. In this case, you
+can create a semaphore with a counter set to zero, and up it when
+things are ready for drawing.
+
+Semaphores with counters greater than one are also useful for
+establishing quotas. Say, for example, that you have a number of
+threads that can do I/O at once. You don't want all the threads
+reading or writing at once though, since that can potentially swamp
+your I/O channels, or deplete your process' quota of filehandles. You
+can use a semaphore initialized to the number of concurrent I/O
+requests (or open files) that you want at any one time, and have your
+threads quietly block and unblock themselves.
+
+Larger increments or decrements are handy in those cases where a
+thread needs to check out or return a number of resources at once.
+
+=back
+
+=head2 Attributes: Restricting Access To Subroutines
+
+In addition to synchronizing access to data or resources, you might
+find it useful to synchronize access to subroutines. You may be
+accessing a singular machine resource (perhaps a vector processor), or
+find it easier to serialize calls to a particular subroutine than to
+have a set of locks and sempahores.
+
+One of the additions to Perl 5.005 is subroutine attributes. The
+Thread package uses these to provide several flavors of
+serialization. It's important to remember that these attributes are
+used in the compilation phase of your program so you can't change a
+subroutine's behavior while your program is actually running.
+
+=head2 Subroutine Locks
+
+The basic subroutine lock looks like this:
+
+ sub test_sub {
+ use attrs qw(locked);
+ }
+
+This ensures that only one thread will be executing this subroutine at
+any one time. Once a thread calls this subroutine, any other thread
+that calls it will block until the thread in the subroutine exits
+it. A more elaborate example looks like this:
+
+ use Thread qw(yield);
+
+ new Thread \&thread_sub, 1;
+ new Thread \&thread_sub, 2;
+ new Thread \&thread_sub, 3;
+ new Thread \&thread_sub, 4;
+
+ sub sync_sub {
+ use attrs qw(locked);
+ my $CallingThread = shift @_;
+ print "In sync_sub for thread $CallingThread\n";
+ yield;
+ sleep 3;
+ print "Leaving sync_sub for thread $CallingThread\n";
+ }
+
+ sub thread_sub {
+ my $ThreadID = shift @_;
+ print "Thread $ThreadID calling sync_sub\n";
+ sync_sub($ThreadID);
+ print "$ThreadID is done with sync_sub\n";
+ }
+
+The use attrs qw(locked) locks sync_sub(), and if you run this, you
+can see that only one thread is in it at any one time.
+
+=head2 Methods
+
+Locking an entire subroutine can sometimes be overkill, especially
+when dealing with Perl objects. When calling a method for an object,
+for example, you want to serialize calls to a method, so that only one
+thread will be in the subroutine for a particular object, but threads
+calling that subroutine for a different object aren't blocked. The
+method attribute indicates whether the subroutine is really a method.
+
+ use Thread;
+
+ sub tester {
+ my $thrnum = shift @_;
+ my $bar = new Foo;
+ foreach (1..10) {
+ print "$thrnum calling per_object\n";
+ $bar->per_object($thrnum);
+ print "$thrnum out of per_object\n";
+ yield;
+ print "$thrnum calling one_at_a_time\n";
+ $bar->one_at_a_time($thrnum);
+ print "$thrnum out of one_at_a_time\n";
+ yield;
+ }
+ }
+
+ foreach my $thrnum (1..10) {
+ new Thread \&tester, $thrnum;
+ }
+
+ package Foo;
+ sub new {
+ my $class = shift @_;
+ return bless [@_], $class;
+ }
+
+ sub per_object {
+ use attrs qw(locked method);
+ my ($class, $thrnum) = @_;
+ print "In per_object for thread $thrnum\n";
+ yield;
+ sleep 2;
+ print "Exiting per_object for thread $thrnum\n";
+ }
+
+ sub one_at_a_time {
+ use attrs qw(locked);
+ my ($class, $thrnum) = @_;
+ print "In one_at_a_time for thread $thrnum\n";
+ yield;
+ sleep 2;
+ print "Exiting one_at_a_time for thread $thrnum\n";
+ }
+
+As you can see from the output (omitted for brevity; it's 800 lines)
+all the threads can be in per_object() simultaneously, but only one
+thread is ever in one_at_a_time() at once.
+
+=head2 Locking A Subroutine
+
+You can lock a subroutine as you would lock a variable. Subroutine
+locks work the same as a C<use attrs qw(locked)> in the subroutine,
+and block all access to the subroutine for other threads until the
+lock goes out of scope. When the subroutine isn't locked, any number
+of threads can be in it at once, and getting a lock on a subroutine
+doesn't affect threads already in the subroutine. Getting a lock on a
+subroutine looks like this:
+
+ lock(\&sub_to_lock);
+
+Simple enough. Unlike use attrs, which is a compile time option,
+locking and unlocking a subroutine can be done at runtime at your
+discretion. There is some runtime penalty to using lock(\&sub) instead
+of use attrs qw(locked), so make sure you're choosing the proper
+method to do the locking.
+
+You'd choose lock(\&sub) when writing modules and code to run on both
+threaded and unthreaded Perl, especially for code that will run on
+5.004 or earlier Perls. In that case, it's useful to have subroutines
+that should be serialized lock themselves if they're running threaded,
+like so:
+
+ package Foo;
+ use Config;
+ $Running_Threaded = 0;
+
+ BEGIN { $Running_Threaded = $Config{'usethreads'} }
+
+ sub sub1 { lock(\&sub1) if $Running_Threaded }
+
+
+This way you can ensure single-threadedness regardless of which
+version of Perl you're running.
+
+=head1 General Thread Utility Routines
+
+We've covered the workhorse parts of Perl's threading package, and
+with these tools you should be well on your way to writing threaded
+code and packages. There are a few useful little pieces that didn't
+really fit in anyplace else.
+
+=head2 What Thread Am I In?
+
+The Thread->self method provides your program with a way to get an
+object representing the thread it's currently in. You can use this
+object in the same way as the ones returned from the thread creation.
+
+=head2 Thread IDs
+
+tid() is a thread object method that returns the thread ID of the
+thread the object represents. Thread IDs are integers, with the main
+thread in a program being 0. Currently Perl assigns a unique tid to
+every thread ever created in your program, assigning the first thread
+to be created a tid of 1, and increasing the tid by 1 for each new
+thread that's created.
+
+=head2 Are These Threads The Same?
+
+The equal() method takes two thread objects and returns true
+if the objects represent the same thread, and false if they don't.
+
+=head2 What Threads Are Running?
+
+Thread->list returns a list of thread objects, one for each thread
+that's currently running. Handy for a number of things, including
+cleaning up at the end of your program:
+
+ # Loop through all the threads
+ foreach $thr (Thread->list) {
+ # Don't join the main thread or ourselves
+ if ($thr->tid && !Thread::equal($thr, Thread->self)) {
+ $thr->join;
+ }
+ }
+
+The example above is just for illustration. It isn't strictly
+necessary to join all the threads you create, since Perl detaches all
+the threads before it exits.
+
+=head1 A Complete Example
+
+Confused yet? It's time for an example program to show some of the
+things we've covered. This program finds prime numbers using threads.
+
+ 1 #!/usr/bin/perl -w
+ 2 # prime-pthread, courtesy of Tom Christiansen
+ 3
+ 4 use strict;
+ 5
+ 6 use Thread;
+ 7 use Thread::Queue;
+ 8
+ 9 my $stream = new Thread::Queue;
+ 10 my $kid = new Thread(\&check_num, $stream, 2);
+ 11
+ 12 for my $i ( 3 .. 1000 ) {
+ 13 $stream->enqueue($i);
+ 14 }
+ 15
+ 16 $stream->enqueue(undef);
+ 17 $kid->join();
+ 18
+ 19 sub check_num {
+ 20 my ($upstream, $cur_prime) = @_;
+ 21 my $kid;
+ 22 my $downstream = new Thread::Queue;
+ 23 while (my $num = $upstream->dequeue) {
+ 24 next unless $num % $cur_prime;
+ 25 if ($kid) {
+ 26 $downstream->enqueue($num);
+ 27 } else {
+ 28 print "Found prime $num\n";
+ 29 $kid = new Thread(\&check_num, $downstream, $num);
+ 30 }
+ 31 }
+ 32 $downstream->enqueue(undef) if $kid;
+ 33 $kid->join() if $kid;
+ 34 }
+
+This program uses the pipeline model to generate prime numbers. Each
+thread in the pipeline has an input queue that feeds numbers to be
+checked, a prime number that it's responsible for, and an output queue
+that it funnels numbers that have failed the check into. If the thread
+has a number that's failed its check and there's no child thread, then
+the thread must have found a new prime number. In that case, a new
+child thread is created for that prime and stuck on the end of the
+pipeline.
+
+This probably sounds a bit more confusing than it really is, so lets
+go through this program piece by piece and see what it does. (For
+those of you who might be trying to remember exactly what a prime
+number is, it's a number that's only evenly divisible by itself and 1)
+
+The bulk of the work is done by the check_num() subroutine, which
+takes a reference to its input queue and a prime number that it's
+responsible for. After pulling in the input queue and the prime that
+the subroutine's checking (line 20), we create a new queue (line 22)
+and reserve a scalar for the thread that we're likely to create later
+(line 21).
+
+The while loop from lines 23 to line 31 grabs a scalar off the input
+queue and checks against the prime this thread is responsible
+for. Line 24 checks to see if there's a remainder when we modulo the
+number to be checked against our prime. If there is one, the number
+must not be evenly divisible by our prime, so we need to either pass
+it on to the next thread if we've created one (line 26) or create a
+new thread if we haven't.
+
+The new thread creation is line 29. We pass on to it a reference to
+the queue we've created, and the prime number we've found.
+
+Finally, once the loop terminates (because we got a 0 or undef in the
+queue, which serves as a note to die), we pass on the notice to our
+child and wait for it to exit if we've created a child (Lines 32 and
+37).
+
+Meanwhile, back in the main thread, we create a queue (line 9) and the
+initial child thread (line 10), and pre-seed it with the first prime:
+2. Then we queue all the numbers from 3 to 1000 for checking (lines
+12-14), then queue a die notice (line 16) and wait for the first child
+thread to terminate (line 17). Because a child won't die until its
+child has died, we know that we're done once we return from the join.
+
+That's how it works. It's pretty simple; as with many Perl programs,
+the explanation is much longer than the program.
+
+=head1 Conclusion
+
+A complete thread tutorial could fill a book (and has, many times),
+but this should get you well on your way. The final authority on how
+Perl's threads behave is the documention bundled with the Perl
+distribution, but with what we've covered in this article, you should
+be well on your way to becoming a threaded Perl expert.
+
+=head1 Bibliography
+
+Here's a short bibliography courtesy of Jürgen Christoffel:
+
+=head2 Introductory Texts
+
+Birrell, Andrew D. An Introduction to Programming with
+Threads. Digital Equipment Corporation, 1989, DEC-SRC Research Report
+#35 online as
+http://www.research.digital.com/SRC/staff/birrell/bib.html (highly
+recommended)
+
+Robbins, Kay. A., and Steven Robbins. Practical Unix Programming: A
+Guide to Concurrency, Communication, and
+Multithreading. Prentice-Hall, 1996.
+
+Lewis, Bill, and Daniel J. Berg. Multithreaded Programming with
+Pthreads. Prentice Hall, 1997, ISBN 0-13-443698-9 (a well-written
+introduction to threads).
+
+Nelson, Greg (editor). Systems Programming with Modula-3. Prentice
+Hall, 1991, ISBN 0-13-590464-1.
+
+Nichols, Bradford, Dick Buttlar, and Jacqueline Proulx Farrell.
+Pthreads Programming. O'Reilly & Associates, 1996, ISBN 156592-115-1
+(covers POSIX threads).
+
+=head2 OS-Related References
+
+Boykin, Joseph, David Kirschen, Alan Langerman, and Susan
+LoVerso. Programming under Mach. Addison-Wesley, 1994, ISBN
+0-201-52739-1.
+
+Tanenbaum, Andrew S. Distributed Operating Systems. Prentice Hall,
+1995, ISBN 0-13-143934-0 (great textbook).
+
+Silberschatz, Abraham, and Peter B. Galvin. Operating System Concepts,
+4th ed. Addison-Wesley, 1995, ISBN 0-201-59292-4
+
+=head2 Other References
+
+Arnold, Ken and James Gosling. The Java Programming Language, 2nd
+ed. Addison-Wesley, 1998, ISBN 0-201-31006-6.
+
+Le Sergent, T. and B. Berthomieu. "Incremental MultiThreaded Garbage
+Collection on Virtually Shared Memory Architectures" in Memory
+Management: Proc. of the International Workshop IWMM 92, St. Malo,
+France, September 1992, Yves Bekkers and Jacques Cohen, eds. Springer,
+1992, ISBN 3540-55940-X (real-life thread applications).
+
+=head1 Acknowledgements
+
+Thanks (in no particular order) to Chaim Frenkel, Steve Fink, Gurusamy
+Sarathy, Ilya Zakharevich, Benjamin Sugars, Jürgen Christoffel, Joshua
+Pritikin, and Alan Burlison, for their help in reality-checking and
+polishing this article. Big thanks to Tom Christiansen for his rewrite
+of the prime number generator.
+
+=head1 AUTHOR
+
+Dan Sugalski E<lt>sugalskd@ous.eduE<gt>
+
+=head1 Copyrights
+
+This article originally appeared in The Perl Journal #10, and is
+copyright 1998 The Perl Journal. It appears courtesy of Jon Orwant and
+The Perl Journal. This document may be distributed under the same terms
+as Perl itself.
+
+
diff --git a/gnu/usr.bin/perl/pp_proto.h b/gnu/usr.bin/perl/pp_proto.h
new file mode 100644
index 00000000000..ad82696849b
--- /dev/null
+++ b/gnu/usr.bin/perl/pp_proto.h
@@ -0,0 +1,344 @@
+PPDEF(pp_null)
+PPDEF(pp_stub)
+PPDEF(pp_scalar)
+PPDEF(pp_pushmark)
+PPDEF(pp_wantarray)
+PPDEF(pp_const)
+PPDEF(pp_gvsv)
+PPDEF(pp_gv)
+PPDEF(pp_gelem)
+PPDEF(pp_padsv)
+PPDEF(pp_padav)
+PPDEF(pp_padhv)
+PPDEF(pp_padany)
+PPDEF(pp_pushre)
+PPDEF(pp_rv2gv)
+PPDEF(pp_rv2sv)
+PPDEF(pp_av2arylen)
+PPDEF(pp_rv2cv)
+PPDEF(pp_anoncode)
+PPDEF(pp_prototype)
+PPDEF(pp_refgen)
+PPDEF(pp_srefgen)
+PPDEF(pp_ref)
+PPDEF(pp_bless)
+PPDEF(pp_backtick)
+PPDEF(pp_glob)
+PPDEF(pp_readline)
+PPDEF(pp_rcatline)
+PPDEF(pp_regcmaybe)
+PPDEF(pp_regcreset)
+PPDEF(pp_regcomp)
+PPDEF(pp_match)
+PPDEF(pp_qr)
+PPDEF(pp_subst)
+PPDEF(pp_substcont)
+PPDEF(pp_trans)
+PPDEF(pp_sassign)
+PPDEF(pp_aassign)
+PPDEF(pp_chop)
+PPDEF(pp_schop)
+PPDEF(pp_chomp)
+PPDEF(pp_schomp)
+PPDEF(pp_defined)
+PPDEF(pp_undef)
+PPDEF(pp_study)
+PPDEF(pp_pos)
+PPDEF(pp_preinc)
+PPDEF(pp_predec)
+PPDEF(pp_postinc)
+PPDEF(pp_postdec)
+PPDEF(pp_pow)
+PPDEF(pp_multiply)
+PPDEF(pp_i_multiply)
+PPDEF(pp_divide)
+PPDEF(pp_i_divide)
+PPDEF(pp_modulo)
+PPDEF(pp_i_modulo)
+PPDEF(pp_repeat)
+PPDEF(pp_add)
+PPDEF(pp_i_add)
+PPDEF(pp_subtract)
+PPDEF(pp_i_subtract)
+PPDEF(pp_concat)
+PPDEF(pp_stringify)
+PPDEF(pp_left_shift)
+PPDEF(pp_right_shift)
+PPDEF(pp_lt)
+PPDEF(pp_i_lt)
+PPDEF(pp_gt)
+PPDEF(pp_i_gt)
+PPDEF(pp_le)
+PPDEF(pp_i_le)
+PPDEF(pp_ge)
+PPDEF(pp_i_ge)
+PPDEF(pp_eq)
+PPDEF(pp_i_eq)
+PPDEF(pp_ne)
+PPDEF(pp_i_ne)
+PPDEF(pp_ncmp)
+PPDEF(pp_i_ncmp)
+PPDEF(pp_slt)
+PPDEF(pp_sgt)
+PPDEF(pp_sle)
+PPDEF(pp_sge)
+PPDEF(pp_seq)
+PPDEF(pp_sne)
+PPDEF(pp_scmp)
+PPDEF(pp_bit_and)
+PPDEF(pp_bit_xor)
+PPDEF(pp_bit_or)
+PPDEF(pp_negate)
+PPDEF(pp_i_negate)
+PPDEF(pp_not)
+PPDEF(pp_complement)
+PPDEF(pp_atan2)
+PPDEF(pp_sin)
+PPDEF(pp_cos)
+PPDEF(pp_rand)
+PPDEF(pp_srand)
+PPDEF(pp_exp)
+PPDEF(pp_log)
+PPDEF(pp_sqrt)
+PPDEF(pp_int)
+PPDEF(pp_hex)
+PPDEF(pp_oct)
+PPDEF(pp_abs)
+PPDEF(pp_length)
+PPDEF(pp_substr)
+PPDEF(pp_vec)
+PPDEF(pp_index)
+PPDEF(pp_rindex)
+PPDEF(pp_sprintf)
+PPDEF(pp_formline)
+PPDEF(pp_ord)
+PPDEF(pp_chr)
+PPDEF(pp_crypt)
+PPDEF(pp_ucfirst)
+PPDEF(pp_lcfirst)
+PPDEF(pp_uc)
+PPDEF(pp_lc)
+PPDEF(pp_quotemeta)
+PPDEF(pp_rv2av)
+PPDEF(pp_aelemfast)
+PPDEF(pp_aelem)
+PPDEF(pp_aslice)
+PPDEF(pp_each)
+PPDEF(pp_values)
+PPDEF(pp_keys)
+PPDEF(pp_delete)
+PPDEF(pp_exists)
+PPDEF(pp_rv2hv)
+PPDEF(pp_helem)
+PPDEF(pp_hslice)
+PPDEF(pp_unpack)
+PPDEF(pp_pack)
+PPDEF(pp_split)
+PPDEF(pp_join)
+PPDEF(pp_list)
+PPDEF(pp_lslice)
+PPDEF(pp_anonlist)
+PPDEF(pp_anonhash)
+PPDEF(pp_splice)
+PPDEF(pp_push)
+PPDEF(pp_pop)
+PPDEF(pp_shift)
+PPDEF(pp_unshift)
+PPDEF(pp_sort)
+PPDEF(pp_reverse)
+PPDEF(pp_grepstart)
+PPDEF(pp_grepwhile)
+PPDEF(pp_mapstart)
+PPDEF(pp_mapwhile)
+PPDEF(pp_range)
+PPDEF(pp_flip)
+PPDEF(pp_flop)
+PPDEF(pp_and)
+PPDEF(pp_or)
+PPDEF(pp_xor)
+PPDEF(pp_cond_expr)
+PPDEF(pp_andassign)
+PPDEF(pp_orassign)
+PPDEF(pp_method)
+PPDEF(pp_entersub)
+PPDEF(pp_leavesub)
+PPDEF(pp_caller)
+PPDEF(pp_warn)
+PPDEF(pp_die)
+PPDEF(pp_reset)
+PPDEF(pp_lineseq)
+PPDEF(pp_nextstate)
+PPDEF(pp_dbstate)
+PPDEF(pp_unstack)
+PPDEF(pp_enter)
+PPDEF(pp_leave)
+PPDEF(pp_scope)
+PPDEF(pp_enteriter)
+PPDEF(pp_iter)
+PPDEF(pp_enterloop)
+PPDEF(pp_leaveloop)
+PPDEF(pp_return)
+PPDEF(pp_last)
+PPDEF(pp_next)
+PPDEF(pp_redo)
+PPDEF(pp_dump)
+PPDEF(pp_goto)
+PPDEF(pp_exit)
+PPDEF(pp_open)
+PPDEF(pp_close)
+PPDEF(pp_pipe_op)
+PPDEF(pp_fileno)
+PPDEF(pp_umask)
+PPDEF(pp_binmode)
+PPDEF(pp_tie)
+PPDEF(pp_untie)
+PPDEF(pp_tied)
+PPDEF(pp_dbmopen)
+PPDEF(pp_dbmclose)
+PPDEF(pp_sselect)
+PPDEF(pp_select)
+PPDEF(pp_getc)
+PPDEF(pp_read)
+PPDEF(pp_enterwrite)
+PPDEF(pp_leavewrite)
+PPDEF(pp_prtf)
+PPDEF(pp_print)
+PPDEF(pp_sysopen)
+PPDEF(pp_sysseek)
+PPDEF(pp_sysread)
+PPDEF(pp_syswrite)
+PPDEF(pp_send)
+PPDEF(pp_recv)
+PPDEF(pp_eof)
+PPDEF(pp_tell)
+PPDEF(pp_seek)
+PPDEF(pp_truncate)
+PPDEF(pp_fcntl)
+PPDEF(pp_ioctl)
+PPDEF(pp_flock)
+PPDEF(pp_socket)
+PPDEF(pp_sockpair)
+PPDEF(pp_bind)
+PPDEF(pp_connect)
+PPDEF(pp_listen)
+PPDEF(pp_accept)
+PPDEF(pp_shutdown)
+PPDEF(pp_gsockopt)
+PPDEF(pp_ssockopt)
+PPDEF(pp_getsockname)
+PPDEF(pp_getpeername)
+PPDEF(pp_lstat)
+PPDEF(pp_stat)
+PPDEF(pp_ftrread)
+PPDEF(pp_ftrwrite)
+PPDEF(pp_ftrexec)
+PPDEF(pp_fteread)
+PPDEF(pp_ftewrite)
+PPDEF(pp_fteexec)
+PPDEF(pp_ftis)
+PPDEF(pp_fteowned)
+PPDEF(pp_ftrowned)
+PPDEF(pp_ftzero)
+PPDEF(pp_ftsize)
+PPDEF(pp_ftmtime)
+PPDEF(pp_ftatime)
+PPDEF(pp_ftctime)
+PPDEF(pp_ftsock)
+PPDEF(pp_ftchr)
+PPDEF(pp_ftblk)
+PPDEF(pp_ftfile)
+PPDEF(pp_ftdir)
+PPDEF(pp_ftpipe)
+PPDEF(pp_ftlink)
+PPDEF(pp_ftsuid)
+PPDEF(pp_ftsgid)
+PPDEF(pp_ftsvtx)
+PPDEF(pp_fttty)
+PPDEF(pp_fttext)
+PPDEF(pp_ftbinary)
+PPDEF(pp_chdir)
+PPDEF(pp_chown)
+PPDEF(pp_chroot)
+PPDEF(pp_unlink)
+PPDEF(pp_chmod)
+PPDEF(pp_utime)
+PPDEF(pp_rename)
+PPDEF(pp_link)
+PPDEF(pp_symlink)
+PPDEF(pp_readlink)
+PPDEF(pp_mkdir)
+PPDEF(pp_rmdir)
+PPDEF(pp_open_dir)
+PPDEF(pp_readdir)
+PPDEF(pp_telldir)
+PPDEF(pp_seekdir)
+PPDEF(pp_rewinddir)
+PPDEF(pp_closedir)
+PPDEF(pp_fork)
+PPDEF(pp_wait)
+PPDEF(pp_waitpid)
+PPDEF(pp_system)
+PPDEF(pp_exec)
+PPDEF(pp_kill)
+PPDEF(pp_getppid)
+PPDEF(pp_getpgrp)
+PPDEF(pp_setpgrp)
+PPDEF(pp_getpriority)
+PPDEF(pp_setpriority)
+PPDEF(pp_time)
+PPDEF(pp_tms)
+PPDEF(pp_localtime)
+PPDEF(pp_gmtime)
+PPDEF(pp_alarm)
+PPDEF(pp_sleep)
+PPDEF(pp_shmget)
+PPDEF(pp_shmctl)
+PPDEF(pp_shmread)
+PPDEF(pp_shmwrite)
+PPDEF(pp_msgget)
+PPDEF(pp_msgctl)
+PPDEF(pp_msgsnd)
+PPDEF(pp_msgrcv)
+PPDEF(pp_semget)
+PPDEF(pp_semctl)
+PPDEF(pp_semop)
+PPDEF(pp_require)
+PPDEF(pp_dofile)
+PPDEF(pp_entereval)
+PPDEF(pp_leaveeval)
+PPDEF(pp_entertry)
+PPDEF(pp_leavetry)
+PPDEF(pp_ghbyname)
+PPDEF(pp_ghbyaddr)
+PPDEF(pp_ghostent)
+PPDEF(pp_gnbyname)
+PPDEF(pp_gnbyaddr)
+PPDEF(pp_gnetent)
+PPDEF(pp_gpbyname)
+PPDEF(pp_gpbynumber)
+PPDEF(pp_gprotoent)
+PPDEF(pp_gsbyname)
+PPDEF(pp_gsbyport)
+PPDEF(pp_gservent)
+PPDEF(pp_shostent)
+PPDEF(pp_snetent)
+PPDEF(pp_sprotoent)
+PPDEF(pp_sservent)
+PPDEF(pp_ehostent)
+PPDEF(pp_enetent)
+PPDEF(pp_eprotoent)
+PPDEF(pp_eservent)
+PPDEF(pp_gpwnam)
+PPDEF(pp_gpwuid)
+PPDEF(pp_gpwent)
+PPDEF(pp_spwent)
+PPDEF(pp_epwent)
+PPDEF(pp_ggrnam)
+PPDEF(pp_ggrgid)
+PPDEF(pp_ggrent)
+PPDEF(pp_sgrent)
+PPDEF(pp_egrent)
+PPDEF(pp_getlogin)
+PPDEF(pp_syscall)
+PPDEF(pp_lock)
+PPDEF(pp_threadsv)
diff --git a/gnu/usr.bin/perl/regcomp.pl b/gnu/usr.bin/perl/regcomp.pl
new file mode 100644
index 00000000000..cfe59adc221
--- /dev/null
+++ b/gnu/usr.bin/perl/regcomp.pl
@@ -0,0 +1,98 @@
+#use Fatal qw(open close rename chmod unlink);
+open DESC, 'regcomp.sym';
+$ind = 0;
+
+while (<DESC>) {
+ next if /^\s*($|\#)/;
+ $ind++;
+ chomp;
+ ($name[$ind], $desc, $rest[$ind]) = split /\t+/, $_, 3;
+ ($type[$ind], $code[$ind], $args[$ind], $longj[$ind])
+ = split /[,\s]\s*/, $desc, 4;
+}
+close DESC;
+$tot = $ind;
+
+$tmp_h = 'tmp_reg.h';
+
+unlink $tmp_h if -f $tmp_h;
+
+open OUT, ">$tmp_h";
+
+print OUT <<EOP;
+/* !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
+ This file is built by regcomp.pl from regcomp.sym.
+ Any changes made here will be lost!
+*/
+
+EOP
+
+$ind = 0;
+while (++$ind <= $tot) {
+ $oind = $ind - 1;
+ $hind = sprintf "%#4x", $oind;
+ print OUT <<EOP;
+#define $name[$ind] $oind /* $hind $rest[$ind] */
+EOP
+}
+
+print OUT <<EOP;
+
+#ifndef DOINIT
+EXTCONST U8 regkind[];
+#else
+EXTCONST U8 regkind[] = {
+EOP
+
+$ind = 0;
+while (++$ind <= $tot) {
+ print OUT <<EOP;
+ $type[$ind], /* $name[$ind] */
+EOP
+}
+
+print OUT <<EOP;
+};
+#endif
+
+
+#ifdef REG_COMP_C
+const static U8 regarglen[] = {
+EOP
+
+$ind = 0;
+while (++$ind <= $tot) {
+ $size = 0;
+ $size = "EXTRA_SIZE(struct regnode_$args[$ind])" if $args[$ind];
+
+ print OUT <<EOP;
+ $size, /* $name[$ind] */
+EOP
+}
+
+print OUT <<EOP;
+};
+
+const static char reg_off_by_arg[] = {
+EOP
+
+$ind = 0;
+while (++$ind <= $tot) {
+ $size = $longj[$ind] || 0;
+
+ print OUT <<EOP;
+ $size, /* $name[$ind] */
+EOP
+}
+
+print OUT <<EOP;
+};
+#endif /* REG_COMP_C */
+
+EOP
+
+close OUT;
+
+chmod 0666, 'regnodes.h';
+unlink 'regnodes.h';
+rename $tmp_h, 'regnodes.h';
diff --git a/gnu/usr.bin/perl/regcomp.sym b/gnu/usr.bin/perl/regcomp.sym
new file mode 100644
index 00000000000..9775b9374da
--- /dev/null
+++ b/gnu/usr.bin/perl/regcomp.sym
@@ -0,0 +1,112 @@
+# Format:
+# NAME \t TYPE, arg-description [num-args] [longjump-len] \t DESCRIPTION
+
+# Empty rows and #-comment rows are ignored.
+
+# Exit points
+END END, no End of program.
+SUCCEED END, no Return from a subroutine, basically.
+
+# Anchors:
+BOL BOL, no Match "" at beginning of line.
+MBOL BOL, no Same, assuming multiline.
+SBOL BOL, no Same, assuming singleline.
+EOS EOL, no Match "" at end of string.
+EOL EOL, no Match "" at end of line.
+MEOL EOL, no Same, assuming multiline.
+SEOL EOL, no Same, assuming singleline.
+BOUND BOUND, no Match "" at any word boundary
+BOUNDL BOUND, no Match "" at any word boundary
+NBOUND NBOUND, no Match "" at any word non-boundary
+NBOUNDL NBOUND, no Match "" at any word non-boundary
+GPOS GPOS, no Matches where last m//g left off.
+
+# [Special] alternatives
+ANY ANY, no Match any one character (except newline).
+SANY ANY, no Match any one character.
+ANYOF ANYOF, sv Match character in (or not in) this class.
+ALNUM ALNUM, no Match any alphanumeric character
+ALNUML ALNUM, no Match any alphanumeric char in locale
+NALNUM NALNUM, no Match any non-alphanumeric character
+NALNUML NALNUM, no Match any non-alphanumeric char in locale
+SPACE SPACE, no Match any whitespace character
+SPACEL SPACE, no Match any whitespace char in locale
+NSPACE NSPACE, no Match any non-whitespace character
+NSPACEL NSPACE, no Match any non-whitespace char in locale
+DIGIT DIGIT, no Match any numeric character
+NDIGIT NDIGIT, no Match any non-numeric character
+
+# BRANCH The set of branches constituting a single choice are hooked
+# together with their "next" pointers, since precedence prevents
+# anything being concatenated to any individual branch. The
+# "next" pointer of the last BRANCH in a choice points to the
+# thing following the whole choice. This is also where the
+# final "next" pointer of each individual branch points; each
+# branch starts with the operand node of a BRANCH node.
+#
+BRANCH BRANCH, node Match this alternative, or the next...
+
+# BACK Normal "next" pointers all implicitly point forward; BACK
+# exists to make loop structures possible.
+# not used
+BACK BACK, no Match "", "next" ptr points backward.
+
+# Literals
+EXACT EXACT, sv Match this string (preceded by length).
+EXACTF EXACT, sv Match this string, folded (prec. by length).
+EXACTFL EXACT, sv Match this string, folded in locale (w/len).
+
+# Do nothing
+NOTHING NOTHING,no Match empty string.
+# A variant of above which delimits a group, thus stops optimizations
+TAIL NOTHING,no Match empty string. Can jump here from outside.
+
+# STAR,PLUS '?', and complex '*' and '+', are implemented as circular
+# BRANCH structures using BACK. Simple cases (one character
+# per match) are implemented with STAR and PLUS for speed
+# and to minimize recursive plunges.
+#
+STAR STAR, node Match this (simple) thing 0 or more times.
+PLUS PLUS, node Match this (simple) thing 1 or more times.
+
+CURLY CURLY, sv 2 Match this simple thing {n,m} times.
+CURLYN CURLY, no 2 Match next-after-this simple thing
+# {n,m} times, set parenths.
+CURLYM CURLY, no 2 Match this medium-complex thing {n,m} times.
+CURLYX CURLY, sv 2 Match this complex thing {n,m} times.
+
+# This terminator creates a loop structure for CURLYX
+WHILEM WHILEM, no Do curly processing and see if rest matches.
+
+# OPEN,CLOSE,GROUPP ...are numbered at compile time.
+OPEN OPEN, num 1 Mark this point in input as start of #n.
+CLOSE CLOSE, num 1 Analogous to OPEN.
+
+REF REF, num 1 Match some already matched string
+REFF REF, num 1 Match already matched string, folded
+REFFL REF, num 1 Match already matched string, folded in loc.
+
+# grouping assertions
+IFMATCH BRANCHJ,off 1 2 Succeeds if the following matches.
+UNLESSM BRANCHJ,off 1 2 Fails if the following matches.
+SUSPEND BRANCHJ,off 1 1 "Independent" sub-RE.
+IFTHEN BRANCHJ,off 1 1 Switch, should be preceeded by switcher .
+GROUPP GROUPP, num 1 Whether the group matched.
+
+# Support for long RE
+LONGJMP LONGJMP,off 1 1 Jump far away.
+BRANCHJ BRANCHJ,off 1 1 BRANCH with long offset.
+
+# The heavy worker
+EVAL EVAL, evl 1 Execute some Perl code.
+
+# Modifiers
+MINMOD MINMOD, no Next operator is not greedy.
+LOGICAL LOGICAL,no Next opcode should set the flag only.
+
+# This is not used yet
+RENUM BRANCHJ,off 1 1 Group with independently numbered parens.
+
+# This is not really a node, but an optimized away piece of a "long" node.
+# To simplify debugging output, we mark it as if it were a node
+OPTIMIZED NOTHING,off Placeholder for dump.
diff --git a/gnu/usr.bin/perl/regnodes.h b/gnu/usr.bin/perl/regnodes.h
new file mode 100644
index 00000000000..c494daed12b
--- /dev/null
+++ b/gnu/usr.bin/perl/regnodes.h
@@ -0,0 +1,254 @@
+/* !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
+ This file is built by regcomp.pl from regcomp.sym.
+ Any changes made here will be lost!
+*/
+
+#define END 0 /* 0 End of program. */
+#define SUCCEED 1 /* 0x1 Return from a subroutine, basically. */
+#define BOL 2 /* 0x2 Match "" at beginning of line. */
+#define MBOL 3 /* 0x3 Same, assuming multiline. */
+#define SBOL 4 /* 0x4 Same, assuming singleline. */
+#define EOS 5 /* 0x5 Match "" at end of string. */
+#define EOL 6 /* 0x6 Match "" at end of line. */
+#define MEOL 7 /* 0x7 Same, assuming multiline. */
+#define SEOL 8 /* 0x8 Same, assuming singleline. */
+#define BOUND 9 /* 0x9 Match "" at any word boundary */
+#define BOUNDL 10 /* 0xa Match "" at any word boundary */
+#define NBOUND 11 /* 0xb Match "" at any word non-boundary */
+#define NBOUNDL 12 /* 0xc Match "" at any word non-boundary */
+#define GPOS 13 /* 0xd Matches where last m//g left off. */
+#define ANY 14 /* 0xe Match any one character (except newline). */
+#define SANY 15 /* 0xf Match any one character. */
+#define ANYOF 16 /* 0x10 Match character in (or not in) this class. */
+#define ALNUM 17 /* 0x11 Match any alphanumeric character */
+#define ALNUML 18 /* 0x12 Match any alphanumeric char in locale */
+#define NALNUM 19 /* 0x13 Match any non-alphanumeric character */
+#define NALNUML 20 /* 0x14 Match any non-alphanumeric char in locale */
+#define SPACE 21 /* 0x15 Match any whitespace character */
+#define SPACEL 22 /* 0x16 Match any whitespace char in locale */
+#define NSPACE 23 /* 0x17 Match any non-whitespace character */
+#define NSPACEL 24 /* 0x18 Match any non-whitespace char in locale */
+#define DIGIT 25 /* 0x19 Match any numeric character */
+#define NDIGIT 26 /* 0x1a Match any non-numeric character */
+#define BRANCH 27 /* 0x1b Match this alternative, or the next... */
+#define BACK 28 /* 0x1c Match "", "next" ptr points backward. */
+#define EXACT 29 /* 0x1d Match this string (preceded by length). */
+#define EXACTF 30 /* 0x1e Match this string, folded (prec. by length). */
+#define EXACTFL 31 /* 0x1f Match this string, folded in locale (w/len). */
+#define NOTHING 32 /* 0x20 Match empty string. */
+#define TAIL 33 /* 0x21 Match empty string. Can jump here from outside. */
+#define STAR 34 /* 0x22 Match this (simple) thing 0 or more times. */
+#define PLUS 35 /* 0x23 Match this (simple) thing 1 or more times. */
+#define CURLY 36 /* 0x24 Match this simple thing {n,m} times. */
+#define CURLYN 37 /* 0x25 Match next-after-this simple thing */
+#define CURLYM 38 /* 0x26 Match this medium-complex thing {n,m} times. */
+#define CURLYX 39 /* 0x27 Match this complex thing {n,m} times. */
+#define WHILEM 40 /* 0x28 Do curly processing and see if rest matches. */
+#define OPEN 41 /* 0x29 Mark this point in input as start of #n. */
+#define CLOSE 42 /* 0x2a Analogous to OPEN. */
+#define REF 43 /* 0x2b Match some already matched string */
+#define REFF 44 /* 0x2c Match already matched string, folded */
+#define REFFL 45 /* 0x2d Match already matched string, folded in loc. */
+#define IFMATCH 46 /* 0x2e Succeeds if the following matches. */
+#define UNLESSM 47 /* 0x2f Fails if the following matches. */
+#define SUSPEND 48 /* 0x30 "Independent" sub-RE. */
+#define IFTHEN 49 /* 0x31 Switch, should be preceeded by switcher . */
+#define GROUPP 50 /* 0x32 Whether the group matched. */
+#define LONGJMP 51 /* 0x33 Jump far away. */
+#define BRANCHJ 52 /* 0x34 BRANCH with long offset. */
+#define EVAL 53 /* 0x35 Execute some Perl code. */
+#define MINMOD 54 /* 0x36 Next operator is not greedy. */
+#define LOGICAL 55 /* 0x37 Next opcode should set the flag only. */
+#define RENUM 56 /* 0x38 Group with independently numbered parens. */
+#define OPTIMIZED 57 /* 0x39 Placeholder for dump. */
+
+#ifndef DOINIT
+EXTCONST U8 regkind[];
+#else
+EXTCONST U8 regkind[] = {
+ END, /* END */
+ END, /* SUCCEED */
+ BOL, /* BOL */
+ BOL, /* MBOL */
+ BOL, /* SBOL */
+ EOL, /* EOS */
+ EOL, /* EOL */
+ EOL, /* MEOL */
+ EOL, /* SEOL */
+ BOUND, /* BOUND */
+ BOUND, /* BOUNDL */
+ NBOUND, /* NBOUND */
+ NBOUND, /* NBOUNDL */
+ GPOS, /* GPOS */
+ ANY, /* ANY */
+ ANY, /* SANY */
+ ANYOF, /* ANYOF */
+ ALNUM, /* ALNUM */
+ ALNUM, /* ALNUML */
+ NALNUM, /* NALNUM */
+ NALNUM, /* NALNUML */
+ SPACE, /* SPACE */
+ SPACE, /* SPACEL */
+ NSPACE, /* NSPACE */
+ NSPACE, /* NSPACEL */
+ DIGIT, /* DIGIT */
+ NDIGIT, /* NDIGIT */
+ BRANCH, /* BRANCH */
+ BACK, /* BACK */
+ EXACT, /* EXACT */
+ EXACT, /* EXACTF */
+ EXACT, /* EXACTFL */
+ NOTHING, /* NOTHING */
+ NOTHING, /* TAIL */
+ STAR, /* STAR */
+ PLUS, /* PLUS */
+ CURLY, /* CURLY */
+ CURLY, /* CURLYN */
+ CURLY, /* CURLYM */
+ CURLY, /* CURLYX */
+ WHILEM, /* WHILEM */
+ OPEN, /* OPEN */
+ CLOSE, /* CLOSE */
+ REF, /* REF */
+ REF, /* REFF */
+ REF, /* REFFL */
+ BRANCHJ, /* IFMATCH */
+ BRANCHJ, /* UNLESSM */
+ BRANCHJ, /* SUSPEND */
+ BRANCHJ, /* IFTHEN */
+ GROUPP, /* GROUPP */
+ LONGJMP, /* LONGJMP */
+ BRANCHJ, /* BRANCHJ */
+ EVAL, /* EVAL */
+ MINMOD, /* MINMOD */
+ LOGICAL, /* LOGICAL */
+ BRANCHJ, /* RENUM */
+ NOTHING, /* OPTIMIZED */
+};
+#endif
+
+
+#ifdef REG_COMP_C
+const static U8 regarglen[] = {
+ 0, /* END */
+ 0, /* SUCCEED */
+ 0, /* BOL */
+ 0, /* MBOL */
+ 0, /* SBOL */
+ 0, /* EOS */
+ 0, /* EOL */
+ 0, /* MEOL */
+ 0, /* SEOL */
+ 0, /* BOUND */
+ 0, /* BOUNDL */
+ 0, /* NBOUND */
+ 0, /* NBOUNDL */
+ 0, /* GPOS */
+ 0, /* ANY */
+ 0, /* SANY */
+ 0, /* ANYOF */
+ 0, /* ALNUM */
+ 0, /* ALNUML */
+ 0, /* NALNUM */
+ 0, /* NALNUML */
+ 0, /* SPACE */
+ 0, /* SPACEL */
+ 0, /* NSPACE */
+ 0, /* NSPACEL */
+ 0, /* DIGIT */
+ 0, /* NDIGIT */
+ 0, /* BRANCH */
+ 0, /* BACK */
+ 0, /* EXACT */
+ 0, /* EXACTF */
+ 0, /* EXACTFL */
+ 0, /* NOTHING */
+ 0, /* TAIL */
+ 0, /* STAR */
+ 0, /* PLUS */
+ EXTRA_SIZE(struct regnode_2), /* CURLY */
+ EXTRA_SIZE(struct regnode_2), /* CURLYN */
+ EXTRA_SIZE(struct regnode_2), /* CURLYM */
+ EXTRA_SIZE(struct regnode_2), /* CURLYX */
+ 0, /* WHILEM */
+ EXTRA_SIZE(struct regnode_1), /* OPEN */
+ EXTRA_SIZE(struct regnode_1), /* CLOSE */
+ EXTRA_SIZE(struct regnode_1), /* REF */
+ EXTRA_SIZE(struct regnode_1), /* REFF */
+ EXTRA_SIZE(struct regnode_1), /* REFFL */
+ EXTRA_SIZE(struct regnode_1), /* IFMATCH */
+ EXTRA_SIZE(struct regnode_1), /* UNLESSM */
+ EXTRA_SIZE(struct regnode_1), /* SUSPEND */
+ EXTRA_SIZE(struct regnode_1), /* IFTHEN */
+ EXTRA_SIZE(struct regnode_1), /* GROUPP */
+ EXTRA_SIZE(struct regnode_1), /* LONGJMP */
+ EXTRA_SIZE(struct regnode_1), /* BRANCHJ */
+ EXTRA_SIZE(struct regnode_1), /* EVAL */
+ 0, /* MINMOD */
+ 0, /* LOGICAL */
+ EXTRA_SIZE(struct regnode_1), /* RENUM */
+ 0, /* OPTIMIZED */
+};
+
+const static char reg_off_by_arg[] = {
+ 0, /* END */
+ 0, /* SUCCEED */
+ 0, /* BOL */
+ 0, /* MBOL */
+ 0, /* SBOL */
+ 0, /* EOS */
+ 0, /* EOL */
+ 0, /* MEOL */
+ 0, /* SEOL */
+ 0, /* BOUND */
+ 0, /* BOUNDL */
+ 0, /* NBOUND */
+ 0, /* NBOUNDL */
+ 0, /* GPOS */
+ 0, /* ANY */
+ 0, /* SANY */
+ 0, /* ANYOF */
+ 0, /* ALNUM */
+ 0, /* ALNUML */
+ 0, /* NALNUM */
+ 0, /* NALNUML */
+ 0, /* SPACE */
+ 0, /* SPACEL */
+ 0, /* NSPACE */
+ 0, /* NSPACEL */
+ 0, /* DIGIT */
+ 0, /* NDIGIT */
+ 0, /* BRANCH */
+ 0, /* BACK */
+ 0, /* EXACT */
+ 0, /* EXACTF */
+ 0, /* EXACTFL */
+ 0, /* NOTHING */
+ 0, /* TAIL */
+ 0, /* STAR */
+ 0, /* PLUS */
+ 0, /* CURLY */
+ 0, /* CURLYN */
+ 0, /* CURLYM */
+ 0, /* CURLYX */
+ 0, /* WHILEM */
+ 0, /* OPEN */
+ 0, /* CLOSE */
+ 0, /* REF */
+ 0, /* REFF */
+ 0, /* REFFL */
+ 2, /* IFMATCH */
+ 2, /* UNLESSM */
+ 1, /* SUSPEND */
+ 1, /* IFTHEN */
+ 0, /* GROUPP */
+ 1, /* LONGJMP */
+ 1, /* BRANCHJ */
+ 0, /* EVAL */
+ 0, /* MINMOD */
+ 0, /* LOGICAL */
+ 1, /* RENUM */
+ 0, /* OPTIMIZED */
+};
+#endif /* REG_COMP_C */
+
diff --git a/gnu/usr.bin/perl/t/base/rs.t b/gnu/usr.bin/perl/t/base/rs.t
new file mode 100644
index 00000000000..52a957260fd
--- /dev/null
+++ b/gnu/usr.bin/perl/t/base/rs.t
@@ -0,0 +1,131 @@
+#!./perl
+# Test $!
+
+print "1..14\n";
+
+$teststring = "1\n12\n123\n1234\n1234\n12345\n\n123456\n1234567\n";
+
+# Create our test datafile
+open TESTFILE, ">./foo" or die "error $! $^E opening";
+binmode TESTFILE;
+print TESTFILE $teststring;
+close TESTFILE;
+
+open TESTFILE, "<./foo";
+binmode TESTFILE;
+
+# Check the default $/
+$bar = <TESTFILE>;
+if ($bar eq "1\n") {print "ok 1\n";} else {print "not ok 1\n";}
+
+# explicitly set to \n
+$/ = "\n";
+$bar = <TESTFILE>;
+if ($bar eq "12\n") {print "ok 2\n";} else {print "not ok 2\n";}
+
+# Try a non line terminator
+$/ = "3";
+$bar = <TESTFILE>;
+if ($bar eq "123") {print "ok 3\n";} else {print "not ok 3\n";}
+
+# Eat the line terminator
+$/ = "\n";
+$bar = <TESTFILE>;
+
+# How about a larger terminator
+$/ = "34";
+$bar = <TESTFILE>;
+if ($bar eq "1234") {print "ok 4\n";} else {print "not ok 4\n";}
+
+# Eat the line terminator
+$/ = "\n";
+$bar = <TESTFILE>;
+
+# Does paragraph mode work?
+$/ = '';
+$bar = <TESTFILE>;
+if ($bar eq "1234\n12345\n\n") {print "ok 5\n";} else {print "not ok 5\n";}
+
+# Try slurping the rest of the file
+$/ = undef;
+$bar = <TESTFILE>;
+if ($bar eq "123456\n1234567\n") {print "ok 6\n";} else {print "not ok 6\n";}
+
+# try the record reading tests. New file so we don't have to worry about
+# the size of \n.
+close TESTFILE;
+unlink "./foo";
+open TESTFILE, ">./foo";
+print TESTFILE "1234567890123456789012345678901234567890";
+binmode TESTFILE;
+close TESTFILE;
+open TESTFILE, "<./foo";
+binmode TESTFILE;
+
+# Test straight number
+$/ = \2;
+$bar = <TESTFILE>;
+if ($bar eq "12") {print "ok 7\n";} else {print "not ok 7\n";}
+
+# Test stringified number
+$/ = \"2";
+$bar = <TESTFILE>;
+if ($bar eq "34") {print "ok 8\n";} else {print "not ok 8\n";}
+
+# Integer variable
+$foo = 2;
+$/ = \$foo;
+$bar = <TESTFILE>;
+if ($bar eq "56") {print "ok 9\n";} else {print "not ok 9\n";}
+
+# String variable
+$foo = "2";
+$/ = \$foo;
+$bar = <TESTFILE>;
+if ($bar eq "78") {print "ok 10\n";} else {print "not ok 10\n";}
+
+# Get rid of the temp file
+close TESTFILE;
+unlink "./foo";
+
+# Now for the tricky bit--full record reading
+if ($^O eq 'VMS') {
+ # Create a temp file. We jump through these hoops 'cause CREATE really
+ # doesn't like our methods for some reason.
+ open FDLFILE, "> ./foo.fdl";
+ print FDLFILE "RECORD\n FORMAT VARIABLE\n";
+ close FDLFILE;
+ open CREATEFILE, "> ./foo.com";
+ print CREATEFILE '$ DEFINE/USER SYS$INPUT NL:', "\n";
+ print CREATEFILE '$ DEFINE/USER SYS$OUTPUT NL:', "\n";
+ print CREATEFILE '$ OPEN YOW []FOO.BAR/WRITE', "\n";
+ print CREATEFILE '$ CLOSE YOW', "\n";
+ print CREATEFILE "\$EXIT\n";
+ close CREATEFILE;
+ $throwaway = `\@\[\]foo`, "\n";
+ open(TEMPFILE, ">./foo.bar") or print "# open failed $! $^E\n";
+ print TEMPFILE "foo\nfoobar\nbaz\n";
+ close TEMPFILE;
+
+ open TESTFILE, "<./foo.bar";
+ $/ = \10;
+ $bar = <TESTFILE>;
+ if ($bar eq "foo\n") {print "ok 11\n";} else {print "not ok 11\n";}
+ $bar = <TESTFILE>;
+ if ($bar eq "foobar\n") {print "ok 12\n";} else {print "not ok 12\n";}
+ # can we do a short read?
+ $/ = \2;
+ $bar = <TESTFILE>;
+ if ($bar eq "ba") {print "ok 13\n";} else {print "not ok 13\n";}
+ # do we get the rest of the record?
+ $bar = <TESTFILE>;
+ if ($bar eq "z\n") {print "ok 14\n";} else {print "not ok 14\n";}
+
+ close TESTFILE;
+ unlink "./foo.bar";
+ unlink "./foo.com";
+} else {
+ # Nobody else does this at the moment (well, maybe OS/390, but they can
+ # put their own tests in) so we just punt
+ foreach $test (11..14) {print "ok $test # skipped on non-VMS system\n"};
+}
diff --git a/gnu/usr.bin/perl/t/comp/require.t b/gnu/usr.bin/perl/t/comp/require.t
new file mode 100644
index 00000000000..5c41f5ccece
--- /dev/null
+++ b/gnu/usr.bin/perl/t/comp/require.t
@@ -0,0 +1,52 @@
+#!./perl
+
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = ('.', '../lib');
+}
+
+# don't make this lexical
+$i = 1;
+print "1..4\n";
+
+sub do_require {
+ %INC = ();
+ write_file('bleah.pm',@_);
+ eval { require "bleah.pm" };
+ my @a; # magic guard for scope violations (must be first lexical in file)
+}
+
+sub write_file {
+ my $f = shift;
+ open(REQ,">$f") or die "Can't write '$f': $!";
+ print REQ @_;
+ close REQ;
+}
+
+# interaction with pod (see the eof)
+write_file('bleah.pm', "print 'ok $i\n'; 1;\n");
+require "bleah.pm";
+$i++;
+
+# run-time failure in require
+do_require "0;\n";
+print "# $@\nnot " unless $@ =~ /did not return a true/;
+print "ok ",$i++,"\n";
+
+# compile-time failure in require
+do_require "1)\n";
+# bison says 'parse error' instead of 'syntax error',
+# various yaccs may or may not capitalize 'syntax'.
+print "# $@\nnot " unless $@ =~ /(syntax|parse) error/mi;
+print "ok ",$i++,"\n";
+
+# successful require
+do_require "1";
+print "# $@\nnot " if $@;
+print "ok ",$i++,"\n";
+
+END { unlink 'bleah.pm'; }
+
+# ***interaction with pod (don't put any thing after here)***
+
+=pod
diff --git a/gnu/usr.bin/perl/t/io/iprefix.t b/gnu/usr.bin/perl/t/io/iprefix.t
new file mode 100644
index 00000000000..10a5c5f686a
--- /dev/null
+++ b/gnu/usr.bin/perl/t/io/iprefix.t
@@ -0,0 +1,36 @@
+#!./perl
+
+$^I = 'bak*';
+
+# Modified from the original inplace.t to test adding prefixes
+
+print "1..2\n";
+
+@ARGV = ('.a','.b','.c');
+if ($^O eq 'MSWin32') {
+ $CAT = '.\perl -e "print<>"';
+ `.\\perl -le "print 'foo'" > .a`;
+ `.\\perl -le "print 'foo'" > .b`;
+ `.\\perl -le "print 'foo'" > .c`;
+}
+elsif ($^O eq 'VMS') {
+ $CAT = 'MCR []perl. -e "print<>"';
+ `MCR []perl. -le "print 'foo'" > ./.a`;
+ `MCR []perl. -le "print 'foo'" > ./.b`;
+ `MCR []perl. -le "print 'foo'" > ./.c`;
+}
+else {
+ $CAT = 'cat';
+ `echo foo | tee .a .b .c`;
+}
+while (<>) {
+ s/foo/bar/;
+}
+continue {
+ print;
+}
+
+if (`$CAT .a .b .c` eq "bar\nbar\nbar\n") {print "ok 1\n";} else {print "not ok 1\n";}
+if (`$CAT bak.a bak.b bak.c` eq "foo\nfoo\nfoo\n") {print "ok 2\n";} else {print "not ok 2\n";}
+
+unlink '.a', '.b', '.c', 'bak.a', 'bak.b', 'bak.c';
diff --git a/gnu/usr.bin/perl/t/lib/cgi-form.t b/gnu/usr.bin/perl/t/lib/cgi-form.t
new file mode 100644
index 00000000000..86df161b02e
--- /dev/null
+++ b/gnu/usr.bin/perl/t/lib/cgi-form.t
@@ -0,0 +1,81 @@
+#!./perl
+
+# Test ability to retrieve HTTP request info
+######################### We start with some black magic to print on failure.
+
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = '../lib' if -d '../lib';
+}
+
+BEGIN {$| = 1; print "1..17\n"; }
+END {print "not ok 1\n" unless $loaded;}
+use CGI (':standard','-no_debug');
+$loaded = 1;
+print "ok 1\n";
+
+######################### End of black magic.
+
+# util
+sub test {
+ local($^W) = 0;
+ my($num, $true,$msg) = @_;
+ print($true ? "ok $num\n" : "not ok $num $msg\n");
+}
+
+# Set up a CGI environment
+$ENV{REQUEST_METHOD}='GET';
+$ENV{QUERY_STRING} ='game=chess&game=checkers&weather=dull';
+$ENV{PATH_INFO} ='/somewhere/else';
+$ENV{PATH_TRANSLATED} ='/usr/local/somewhere/else';
+$ENV{SCRIPT_NAME} ='/cgi-bin/foo.cgi';
+$ENV{SERVER_PROTOCOL} = 'HTTP/1.0';
+$ENV{SERVER_PORT} = 8080;
+$ENV{SERVER_NAME} = 'the.good.ship.lollypop.com';
+
+test(2,start_form(-action=>'foobar',-method=>GET) eq
+ qq(<FORM METHOD="GET" ACTION="foobar" ENCTYPE="application/x-www-form-urlencoded">\n),
+ "start_form()");
+
+test(3,submit() eq qq(<INPUT TYPE="submit" NAME=".submit">),"submit()");
+test(4,submit(-name=>'foo',-value=>'bar') eq qq(<INPUT TYPE="submit" NAME="foo" VALUE="bar">),"submit(-name,-value)");
+test(5,submit({-name=>'foo',-value=>'bar'}) eq qq(<INPUT TYPE="submit" NAME="foo" VALUE="bar">),"submit({-name,-value})");
+test(6,textfield(-name=>'weather') eq qq(<INPUT TYPE="text" NAME="weather" VALUE="dull">),"textfield({-name})");
+test(7,textfield(-name=>'weather',-value=>'nice') eq qq(<INPUT TYPE="text" NAME="weather" VALUE="dull">),"textfield({-name,-value})");
+test(8,textfield(-name=>'weather',-value=>'nice',-override=>1) eq qq(<INPUT TYPE="text" NAME="weather" VALUE="nice">),
+ "textfield({-name,-value,-override})");
+test(9,checkbox(-name=>'weather',-value=>'nice') eq qq(<INPUT TYPE="checkbox" NAME="weather" VALUE="nice">weather\n),
+ "checkbox()");
+test(10,checkbox(-name=>'weather',-value=>'nice',-label=>'forecast') eq
+ qq(<INPUT TYPE="checkbox" NAME="weather" VALUE="nice">forecast\n),
+ "checkbox()");
+test(11,checkbox(-name=>'weather',-value=>'nice',-label=>'forecast',-checked=>1,-override=>1) eq
+ qq(<INPUT TYPE="checkbox" NAME="weather" VALUE="nice" CHECKED>forecast\n),
+ "checkbox()");
+test(12,checkbox(-name=>'weather',-value=>'dull',-label=>'forecast') eq
+ qq(<INPUT TYPE="checkbox" NAME="weather" VALUE="dull" CHECKED>forecast\n),
+ "checkbox()");
+
+test(13,radio_group(-name=>'game') eq
+ qq(<INPUT TYPE="radio" NAME="game" VALUE="chess" CHECKED>chess <INPUT TYPE="radio" NAME="game" VALUE="checkers">checkers),
+ 'radio_group()');
+test(14,radio_group(-name=>'game',-labels=>{'chess'=>'ping pong'}) eq
+ qq(<INPUT TYPE="radio" NAME="game" VALUE="chess" CHECKED>ping pong <INPUT TYPE="radio" NAME="game" VALUE="checkers">checkers),
+ 'radio_group()');
+
+test(15, checkbox_group(-name=>'game',-Values=>[qw/checkers chess cribbage/]) eq
+ qq(<INPUT TYPE="checkbox" NAME="game" VALUE="checkers" CHECKED>checkers <INPUT TYPE="checkbox" NAME="game" VALUE="chess" CHECKED>chess <INPUT TYPE="checkbox" NAME="game" VALUE="cribbage">cribbage),
+ 'checkbox_group()');
+
+test(16, checkbox_group(-name=>'game',-Values=>[qw/checkers chess cribbage/],-Defaults=>['cribbage'],-override=>1) eq
+ qq(<INPUT TYPE="checkbox" NAME="game" VALUE="checkers">checkers <INPUT TYPE="checkbox" NAME="game" VALUE="chess">chess <INPUT TYPE="checkbox" NAME="game" VALUE="cribbage" CHECKED>cribbage),
+ 'checkbox_group()');
+
+test(17, popup_menu(-name=>'game',-Values=>[qw/checkers chess cribbage/],-Default=>'cribbage',-override=>1) eq <<END,'checkbox_group()');
+<SELECT NAME="game">
+<OPTION VALUE="checkers">checkers
+<OPTION VALUE="chess">chess
+<OPTION SELECTED VALUE="cribbage">cribbage
+</SELECT>
+END
+
diff --git a/gnu/usr.bin/perl/t/lib/cgi-function.t b/gnu/usr.bin/perl/t/lib/cgi-function.t
new file mode 100644
index 00000000000..ad8b968161d
--- /dev/null
+++ b/gnu/usr.bin/perl/t/lib/cgi-function.t
@@ -0,0 +1,85 @@
+#!./perl
+
+# Test ability to retrieve HTTP request info
+######################### We start with some black magic to print on failure.
+
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = '../lib' if -d '../lib';
+}
+
+BEGIN {$| = 1; print "1..24\n"; }
+END {print "not ok 1\n" unless $loaded;}
+use Config;
+use CGI (':standard','keywords');
+$loaded = 1;
+print "ok 1\n";
+
+######################### End of black magic.
+
+# util
+sub test {
+ local($^W) = 0;
+ my($num, $true,$msg) = @_;
+ print($true ? "ok $num\n" : "not ok $num $msg\n");
+}
+
+# Set up a CGI environment
+$ENV{REQUEST_METHOD}='GET';
+$ENV{QUERY_STRING} ='game=chess&game=checkers&weather=dull';
+$ENV{PATH_INFO} ='/somewhere/else';
+$ENV{PATH_TRANSLATED} ='/usr/local/somewhere/else';
+$ENV{SCRIPT_NAME} ='/cgi-bin/foo.cgi';
+$ENV{SERVER_PROTOCOL} = 'HTTP/1.0';
+$ENV{SERVER_PORT} = 8080;
+$ENV{SERVER_NAME} = 'the.good.ship.lollypop.com';
+$ENV{HTTP_LOVE} = 'true';
+
+test(2,request_method() eq 'GET',"CGI::request_method()");
+test(3,query_string() eq 'game=chess&game=checkers&weather=dull',"CGI::query_string()");
+test(4,param() == 2,"CGI::param()");
+test(5,join(' ',sort {$a cmp $b} param()) eq 'game weather',"CGI::param()");
+test(6,param('game') eq 'chess',"CGI::param()");
+test(7,param('weather') eq 'dull',"CGI::param()");
+test(8,join(' ',param('game')) eq 'chess checkers',"CGI::param()");
+test(9,param(-name=>'foo',-value=>'bar'),'CGI::param() put');
+test(10,param(-name=>'foo') eq 'bar','CGI::param() get');
+test(11,query_string() eq 'game=chess&game=checkers&weather=dull&foo=bar',"CGI::query_string() redux");
+test(12,http('love') eq 'true',"CGI::http()");
+test(13,script_name() eq '/cgi-bin/foo.cgi',"CGI::script_name()");
+test(14,url() eq 'http://the.good.ship.lollypop.com:8080/cgi-bin/foo.cgi',"CGI::url()");
+test(15,self_url() eq
+ 'http://the.good.ship.lollypop.com:8080/cgi-bin/foo.cgi/somewhere/else?game=chess&game=checkers&weather=dull&foo=bar',
+ "CGI::url()");
+test(16,url(-absolute=>1) eq '/cgi-bin/foo.cgi','CGI::url(-absolute=>1)');
+test(17,url(-relative=>1) eq 'foo.cgi','CGI::url(-relative=>1)');
+test(18,url(-relative=>1,-path=>1) eq 'foo.cgi/somewhere/else','CGI::url(-relative=>1,-path=>1)');
+test(19,url(-relative=>1,-path=>1,-query=>1) eq
+ 'foo.cgi/somewhere/else?game=chess&game=checkers&weather=dull&foo=bar',
+ 'CGI::url(-relative=>1,-path=>1,-query=>1)');
+Delete('foo');
+test(20,!param('foo'),'CGI::delete()');
+
+CGI::_reset_globals();
+$ENV{QUERY_STRING}='mary+had+a+little+lamb';
+test(21,join(' ',keywords()) eq 'mary had a little lamb','CGI::keywords');
+test(22,join(' ',param('keywords')) eq 'mary had a little lamb','CGI::keywords');
+
+if (!$Config{d_fork} or $^O eq 'MSWin32' or $^O eq 'VMS') {
+ for (23,24) { print "ok $_ # Skipped: fork n/a\n" }
+}
+else {
+ CGI::_reset_globals;
+ $test_string = 'game=soccer&game=baseball&weather=nice';
+ $ENV{REQUEST_METHOD}='POST';
+ $ENV{CONTENT_LENGTH}=length($test_string);
+ $ENV{QUERY_STRING}='big_balls=basketball&small_balls=golf';
+ if (open(CHILD,"|-")) { # cparent
+ print CHILD $test_string;
+ close CHILD;
+ exit 0;
+ }
+ # at this point, we're in a new (child) process
+ test(23,param('weather') eq 'nice',"CGI::param() from POST");
+ test(24,url_param('big_balls') eq 'basketball',"CGI::url_param()");
+}
diff --git a/gnu/usr.bin/perl/t/lib/cgi-html.t b/gnu/usr.bin/perl/t/lib/cgi-html.t
new file mode 100644
index 00000000000..6a7ff1ecf5c
--- /dev/null
+++ b/gnu/usr.bin/perl/t/lib/cgi-html.t
@@ -0,0 +1,69 @@
+#!./perl
+
+# Test ability to retrieve HTTP request info
+######################### We start with some black magic to print on failure.
+
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = '../lib' if -d '../lib';
+}
+
+BEGIN {$| = 1; print "1..20\n"; }
+BEGIN {$eol = $^O eq 'VMS' ? "\n" : "\cM\cJ";
+ $eol = "\r\n" if $^O eq 'os390'; }
+END {print "not ok 1\n" unless $loaded;}
+use CGI (':standard','-no_debug','*h3','start_table');
+$loaded = 1;
+print "ok 1\n";
+
+######################### End of black magic.
+
+# util
+sub test {
+ local($^W) = 0;
+ my($num, $true,$msg) = @_;
+ print($true ? "ok $num\n" : "not ok $num $msg\n");
+}
+
+# all the automatic tags
+test(2,h1() eq '<H1>',"single tag");
+test(3,h1('fred') eq '<H1>fred</H1>',"open/close tag");
+test(4,h1('fred','agnes','maura') eq '<H1>fred agnes maura</H1>',"open/close tag multiple");
+test(5,h1({-align=>'CENTER'},'fred') eq '<H1 ALIGN="CENTER">fred</H1>',"open/close tag with attribute");
+test(6,h1({-align=>undef},'fred') eq '<H1 ALIGN>fred</H1>',"open/close tag with orphan attribute");
+test(7,h1({-align=>'CENTER'},['fred','agnes']) eq
+ '<H1 ALIGN="CENTER">fred</H1> <H1 ALIGN="CENTER">agnes</H1>',
+ "distributive tag with attribute");
+{
+ local($") = '-';
+ test(8,h1('fred','agnes','maura') eq '<H1>fred-agnes-maura</H1>',"open/close tag \$\" interpolation");
+}
+test(9,header() eq "Content-Type: text/html${eol}${eol}","header()");
+test(10,header(-type=>'image/gif') eq "Content-Type: image/gif${eol}${eol}","header()");
+test(11,header(-type=>'image/gif',-status=>'500 Sucks') eq "Status: 500 Sucks${eol}Content-Type: image/gif${eol}${eol}","header()");
+test(12,header(-nph=>1) eq "HTTP/1.0 200 OK${eol}Content-Type: text/html${eol}${eol}","header()");
+test(13,start_html() ."\n" eq <<END,"start_html()");
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<HTML><HEAD><TITLE>Untitled Document</TITLE>
+</HEAD><BODY>
+END
+ ;
+test(14,start_html(-dtd=>"-//IETF//DTD HTML 3.2//FR") ."\n" eq <<END,"start_html()");
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.2//FR">
+<HTML><HEAD><TITLE>Untitled Document</TITLE>
+</HEAD><BODY>
+END
+ ;
+test(15,start_html(-Title=>'The world of foo') ."\n" eq <<END,"start_html()");
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<HTML><HEAD><TITLE>The world of foo</TITLE>
+</HEAD><BODY>
+END
+ ;
+test(16,($cookie=cookie(-name=>'fred',-value=>['chocolate','chip'],-path=>'/')) eq
+ 'fred=chocolate&chip; path=/',"cookie()");
+test(17,header(-Cookie=>$cookie) =~ m!^Set-Cookie: fred=chocolate&chip\; path=/${eol}Date:.*${eol}Content-Type: text/html${eol}${eol}!s,
+ "header(-cookie)");
+test(18,start_h3 eq '<H3>');
+test(19,end_h3 eq '</H3>');
+test(20,start_table({-border=>undef}) eq '<TABLE BORDER>');
diff --git a/gnu/usr.bin/perl/t/lib/cgi-request.t b/gnu/usr.bin/perl/t/lib/cgi-request.t
new file mode 100644
index 00000000000..8c70c40350b
--- /dev/null
+++ b/gnu/usr.bin/perl/t/lib/cgi-request.t
@@ -0,0 +1,93 @@
+#!./perl
+
+# Test ability to retrieve HTTP request info
+######################### We start with some black magic to print on failure.
+
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = '../lib' if -d '../lib';
+}
+
+BEGIN {$| = 1; print "1..31\n"; }
+END {print "not ok 1\n" unless $loaded;}
+use Config;
+use CGI ();
+$loaded = 1;
+print "ok 1\n";
+
+######################### End of black magic.
+
+# util
+sub test {
+ local($^W) = 0;
+ my($num, $true,$msg) = @_;
+ print($true ? "ok $num\n" : "not ok $num $msg\n");
+}
+
+# Set up a CGI environment
+$ENV{REQUEST_METHOD}='GET';
+$ENV{QUERY_STRING} ='game=chess&game=checkers&weather=dull';
+$ENV{PATH_INFO} ='/somewhere/else';
+$ENV{PATH_TRANSLATED} ='/usr/local/somewhere/else';
+$ENV{SCRIPT_NAME} ='/cgi-bin/foo.cgi';
+$ENV{SERVER_PROTOCOL} = 'HTTP/1.0';
+$ENV{SERVER_PORT} = 8080;
+$ENV{SERVER_NAME} = 'the.good.ship.lollypop.com';
+$ENV{HTTP_LOVE} = 'true';
+
+$q = new CGI;
+test(2,$q,"CGI::new()");
+test(3,$q->request_method eq 'GET',"CGI::request_method()");
+test(4,$q->query_string eq 'game=chess&game=checkers&weather=dull',"CGI::query_string()");
+test(5,$q->param() == 2,"CGI::param()");
+test(6,join(' ',sort $q->param()) eq 'game weather',"CGI::param()");
+test(7,$q->param('game') eq 'chess',"CGI::param()");
+test(8,$q->param('weather') eq 'dull',"CGI::param()");
+test(9,join(' ',$q->param('game')) eq 'chess checkers',"CGI::param()");
+test(10,$q->param(-name=>'foo',-value=>'bar'),'CGI::param() put');
+test(11,$q->param(-name=>'foo') eq 'bar','CGI::param() get');
+test(12,$q->query_string eq 'game=chess&game=checkers&weather=dull&foo=bar',"CGI::query_string() redux");
+test(13,$q->http('love') eq 'true',"CGI::http()");
+test(14,$q->script_name eq '/cgi-bin/foo.cgi',"CGI::script_name()");
+test(15,$q->url eq 'http://the.good.ship.lollypop.com:8080/cgi-bin/foo.cgi',"CGI::url()");
+test(16,$q->self_url eq
+ 'http://the.good.ship.lollypop.com:8080/cgi-bin/foo.cgi/somewhere/else?game=chess&game=checkers&weather=dull&foo=bar',
+ "CGI::url()");
+test(17,$q->url(-absolute=>1) eq '/cgi-bin/foo.cgi','CGI::url(-absolute=>1)');
+test(18,$q->url(-relative=>1) eq 'foo.cgi','CGI::url(-relative=>1)');
+test(19,$q->url(-relative=>1,-path=>1) eq 'foo.cgi/somewhere/else','CGI::url(-relative=>1,-path=>1)');
+test(20,$q->url(-relative=>1,-path=>1,-query=>1) eq
+ 'foo.cgi/somewhere/else?game=chess&game=checkers&weather=dull&foo=bar',
+ 'CGI::url(-relative=>1,-path=>1,-query=>1)');
+$q->delete('foo');
+test(21,!$q->param('foo'),'CGI::delete()');
+
+$q->_reset_globals;
+$ENV{QUERY_STRING}='mary+had+a+little+lamb';
+test(22,$q=new CGI,"CGI::new() redux");
+test(23,join(' ',$q->keywords) eq 'mary had a little lamb','CGI::keywords');
+test(24,join(' ',$q->param('keywords')) eq 'mary had a little lamb','CGI::keywords');
+test(25,$q=new CGI('foo=bar&foo=baz'),"CGI::new() redux");
+test(26,$q->param('foo') eq 'bar','CGI::param() redux');
+test(27,$q=new CGI({'foo'=>'bar','bar'=>'froz'}),"CGI::new() redux 2");
+test(28,$q->param('bar') eq 'froz',"CGI::param() redux 2");
+
+if (!$Config{d_fork} or $^O eq 'MSWin32' or $^O eq 'VMS') {
+ for (29..31) { print "ok $_ # Skipped: fork n/a\n" }
+}
+else {
+ $q->_reset_globals;
+ $test_string = 'game=soccer&game=baseball&weather=nice';
+ $ENV{REQUEST_METHOD}='POST';
+ $ENV{CONTENT_LENGTH}=length($test_string);
+ $ENV{QUERY_STRING}='big_balls=basketball&small_balls=golf';
+ if (open(CHILD,"|-")) { # cparent
+ print CHILD $test_string;
+ close CHILD;
+ exit 0;
+ }
+ # at this point, we're in a new (child) process
+ test(29,$q=new CGI,"CGI::new() from POST");
+ test(30,$q->param('weather') eq 'nice',"CGI::param() from POST");
+ test(31,$q->url_param('big_balls') eq 'basketball',"CGI::url_param()");
+}
diff --git a/gnu/usr.bin/perl/t/lib/dumper-ovl.t b/gnu/usr.bin/perl/t/lib/dumper-ovl.t
new file mode 100644
index 00000000000..db4a5d9e752
--- /dev/null
+++ b/gnu/usr.bin/perl/t/lib/dumper-ovl.t
@@ -0,0 +1,30 @@
+#!./perl -w
+
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = '../lib' if -d '../lib';
+}
+
+use Data::Dumper;
+
+print "1..1\n";
+
+package Foo;
+use overload '""' => 'as_string';
+
+sub new { bless { foo => "bar" }, shift }
+sub as_string { "%%%%" }
+
+package main;
+
+my $f = Foo->new;
+
+print "#\$f=$f\n";
+
+$_ = Dumper($f);
+s/^/#/mg;
+print $_;
+
+print "not " unless /bar/ && /Foo/;
+print "ok 1\n";
+
diff --git a/gnu/usr.bin/perl/t/lib/dumper.t b/gnu/usr.bin/perl/t/lib/dumper.t
new file mode 100644
index 00000000000..8c8dc4023cc
--- /dev/null
+++ b/gnu/usr.bin/perl/t/lib/dumper.t
@@ -0,0 +1,780 @@
+#!./perl -w
+#
+# testsuite for Data::Dumper
+#
+
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = '../lib' if -d '../lib';
+}
+
+use Data::Dumper;
+use Config;
+my $Is_ebcdic = defined($Config{'ebcdic'}) && $Config{'ebcdic'} eq 'define';
+
+$Data::Dumper::Pad = "#";
+my $TMAX;
+my $XS;
+my $TNUM = 0;
+my $WANT = '';
+
+sub TEST {
+ my $string = shift;
+ my $t = eval $string;
+ ++$TNUM;
+ print( ($t eq $WANT and not $@) ? "ok $TNUM\n"
+ : "not ok $TNUM\n--Expected--\n$WANT\n--Got--\n$@$t\n");
+
+ ++$TNUM;
+ eval "$t";
+ print $@ ? "not ok $TNUM\n# \$@ says: $@\n" : "ok $TNUM\n";
+
+ $t = eval $string;
+ ++$TNUM;
+ print( ($t eq $WANT and not $@) ? "ok $TNUM\n"
+ : "not ok $TNUM\n--Expected--\n$WANT\n--Got--\n$@$t\n");
+}
+
+if (defined &Data::Dumper::Dumpxs) {
+ print "### XS extension loaded, will run XS tests\n";
+ $TMAX = 162; $XS = 1;
+}
+else {
+ print "### XS extensions not loaded, will NOT run XS tests\n";
+ $TMAX = 81; $XS = 0;
+}
+
+print "1..$TMAX\n";
+
+#############
+#############
+
+@c = ('c');
+$c = \@c;
+$b = {};
+$a = [1, $b, $c];
+$b->{a} = $a;
+$b->{b} = $a->[1];
+$b->{c} = $a->[2];
+
+############# 1
+##
+$WANT = <<'EOT';
+#$a = [
+# 1,
+# {
+# 'a' => $a,
+# 'b' => $a->[1],
+# 'c' => [
+# 'c'
+# ]
+# },
+# $a->[1]{'c'}
+# ];
+#$b = $a->[1];
+#$c = $a->[1]{'c'};
+EOT
+
+TEST q(Data::Dumper->Dump([$a,$b,$c], [qw(a b c)]));
+TEST q(Data::Dumper->Dumpxs([$a,$b,$c], [qw(a b c)])) if $XS;
+
+
+############# 7
+##
+$WANT = <<'EOT';
+#@a = (
+# 1,
+# {
+# 'a' => [],
+# 'b' => {},
+# 'c' => [
+# 'c'
+# ]
+# },
+# []
+# );
+#$a[1]{'a'} = \@a;
+#$a[1]{'b'} = $a[1];
+#$a[2] = $a[1]{'c'};
+#$b = $a[1];
+EOT
+
+$Data::Dumper::Purity = 1; # fill in the holes for eval
+TEST q(Data::Dumper->Dump([$a, $b], [qw(*a b)])); # print as @a
+TEST q(Data::Dumper->Dumpxs([$a, $b], [qw(*a b)])) if $XS;
+
+############# 13
+##
+$WANT = <<'EOT';
+#%b = (
+# 'a' => [
+# 1,
+# {},
+# [
+# 'c'
+# ]
+# ],
+# 'b' => {},
+# 'c' => []
+# );
+#$b{'a'}[1] = \%b;
+#$b{'b'} = \%b;
+#$b{'c'} = $b{'a'}[2];
+#$a = $b{'a'};
+EOT
+
+TEST q(Data::Dumper->Dump([$b, $a], [qw(*b a)])); # print as %b
+TEST q(Data::Dumper->Dumpxs([$b, $a], [qw(*b a)])) if $XS;
+
+############# 19
+##
+$WANT = <<'EOT';
+#$a = [
+# 1,
+# {
+# 'a' => [],
+# 'b' => {},
+# 'c' => []
+# },
+# []
+#];
+#$a->[1]{'a'} = $a;
+#$a->[1]{'b'} = $a->[1];
+#$a->[1]{'c'} = \@c;
+#$a->[2] = \@c;
+#$b = $a->[1];
+EOT
+
+$Data::Dumper::Indent = 1;
+TEST q(
+ $d = Data::Dumper->new([$a,$b], [qw(a b)]);
+ $d->Seen({'*c' => $c});
+ $d->Dump;
+ );
+if ($XS) {
+ TEST q(
+ $d = Data::Dumper->new([$a,$b], [qw(a b)]);
+ $d->Seen({'*c' => $c});
+ $d->Dumpxs;
+ );
+}
+
+
+############# 25
+##
+$WANT = <<'EOT';
+#$a = [
+# #0
+# 1,
+# #1
+# {
+# a => $a,
+# b => $a->[1],
+# c => [
+# #0
+# 'c'
+# ]
+# },
+# #2
+# $a->[1]{c}
+# ];
+#$b = $a->[1];
+EOT
+
+$d->Indent(3);
+$d->Purity(0)->Quotekeys(0);
+TEST q( $d->Reset; $d->Dump );
+
+TEST q( $d->Reset; $d->Dumpxs ) if $XS;
+
+############# 31
+##
+$WANT = <<'EOT';
+#$VAR1 = [
+# 1,
+# {
+# 'a' => [],
+# 'b' => {},
+# 'c' => [
+# 'c'
+# ]
+# },
+# []
+#];
+#$VAR1->[1]{'a'} = $VAR1;
+#$VAR1->[1]{'b'} = $VAR1->[1];
+#$VAR1->[2] = $VAR1->[1]{'c'};
+EOT
+
+TEST q(Dumper($a));
+TEST q(Data::Dumper::DumperX($a)) if $XS;
+
+############# 37
+##
+$WANT = <<'EOT';
+#[
+# 1,
+# {
+# a => $VAR1,
+# b => $VAR1->[1],
+# c => [
+# 'c'
+# ]
+# },
+# $VAR1->[1]{c}
+#]
+EOT
+
+{
+ local $Data::Dumper::Purity = 0;
+ local $Data::Dumper::Quotekeys = 0;
+ local $Data::Dumper::Terse = 1;
+ TEST q(Dumper($a));
+ TEST q(Data::Dumper::DumperX($a)) if $XS;
+}
+
+
+############# 43
+##
+if (!$Is_ebcdic) {
+$WANT = <<'EOT';
+#$VAR1 = {
+# "abc\0'\efg" => "mno\0"
+#};
+EOT
+}
+else {
+$WANT = <<'EOT';
+#$VAR1 = {
+# "\201\202\203\340\360'\340\205\206\207" => "\224\225\226\340\360"
+#};
+EOT
+}
+
+$foo = { "abc\000\'\efg" => "mno\000" };
+{
+ local $Data::Dumper::Useqq = 1;
+ TEST q(Dumper($foo));
+}
+
+ $WANT = <<"EOT";
+#\$VAR1 = {
+# 'abc\0\\'\efg' => 'mno\0'
+#};
+EOT
+
+ {
+ local $Data::Dumper::Useqq = 1;
+ TEST q(Data::Dumper::DumperX($foo)) if $XS; # cheat
+ }
+
+
+
+#############
+#############
+
+{
+ package main;
+ use Data::Dumper;
+ $foo = 5;
+ @foo = (10,\*foo);
+ %foo = (a=>1,b=>\$foo,c=>\@foo);
+ $foo{d} = \%foo;
+ $foo[2] = \%foo;
+
+############# 49
+##
+ $WANT = <<'EOT';
+#$foo = \*::foo;
+#*::foo = \5;
+#*::foo = [
+# #0
+# 10,
+# #1
+# '',
+# #2
+# {
+# 'a' => 1,
+# 'b' => '',
+# 'c' => [],
+# 'd' => {}
+# }
+# ];
+#*::foo{ARRAY}->[1] = $foo;
+#*::foo{ARRAY}->[2]{'b'} = *::foo{SCALAR};
+#*::foo{ARRAY}->[2]{'c'} = *::foo{ARRAY};
+#*::foo{ARRAY}->[2]{'d'} = *::foo{ARRAY}->[2];
+#*::foo = *::foo{ARRAY}->[2];
+#@bar = @{*::foo{ARRAY}};
+#%baz = %{*::foo{ARRAY}->[2]};
+EOT
+
+ $Data::Dumper::Purity = 1;
+ $Data::Dumper::Indent = 3;
+ TEST q(Data::Dumper->Dump([\\*foo, \\@foo, \\%foo], ['*foo', '*bar', '*baz']));
+ TEST q(Data::Dumper->Dumpxs([\\*foo, \\@foo, \\%foo], ['*foo', '*bar', '*baz'])) if $XS;
+
+############# 55
+##
+ $WANT = <<'EOT';
+#$foo = \*::foo;
+#*::foo = \5;
+#*::foo = [
+# 10,
+# '',
+# {
+# 'a' => 1,
+# 'b' => '',
+# 'c' => [],
+# 'd' => {}
+# }
+#];
+#*::foo{ARRAY}->[1] = $foo;
+#*::foo{ARRAY}->[2]{'b'} = *::foo{SCALAR};
+#*::foo{ARRAY}->[2]{'c'} = *::foo{ARRAY};
+#*::foo{ARRAY}->[2]{'d'} = *::foo{ARRAY}->[2];
+#*::foo = *::foo{ARRAY}->[2];
+#$bar = *::foo{ARRAY};
+#$baz = *::foo{ARRAY}->[2];
+EOT
+
+ $Data::Dumper::Indent = 1;
+ TEST q(Data::Dumper->Dump([\\*foo, \\@foo, \\%foo], ['foo', 'bar', 'baz']));
+ TEST q(Data::Dumper->Dumpxs([\\*foo, \\@foo, \\%foo], ['foo', 'bar', 'baz'])) if $XS;
+
+############# 61
+##
+ $WANT = <<'EOT';
+#@bar = (
+# 10,
+# \*::foo,
+# {}
+#);
+#*::foo = \5;
+#*::foo = \@bar;
+#*::foo = {
+# 'a' => 1,
+# 'b' => '',
+# 'c' => [],
+# 'd' => {}
+#};
+#*::foo{HASH}->{'b'} = *::foo{SCALAR};
+#*::foo{HASH}->{'c'} = \@bar;
+#*::foo{HASH}->{'d'} = *::foo{HASH};
+#$bar[2] = *::foo{HASH};
+#%baz = %{*::foo{HASH}};
+#$foo = $bar[1];
+EOT
+
+ TEST q(Data::Dumper->Dump([\\@foo, \\%foo, \\*foo], ['*bar', '*baz', '*foo']));
+ TEST q(Data::Dumper->Dumpxs([\\@foo, \\%foo, \\*foo], ['*bar', '*baz', '*foo'])) if $XS;
+
+############# 67
+##
+ $WANT = <<'EOT';
+#$bar = [
+# 10,
+# \*::foo,
+# {}
+#];
+#*::foo = \5;
+#*::foo = $bar;
+#*::foo = {
+# 'a' => 1,
+# 'b' => '',
+# 'c' => [],
+# 'd' => {}
+#};
+#*::foo{HASH}->{'b'} = *::foo{SCALAR};
+#*::foo{HASH}->{'c'} = $bar;
+#*::foo{HASH}->{'d'} = *::foo{HASH};
+#$bar->[2] = *::foo{HASH};
+#$baz = *::foo{HASH};
+#$foo = $bar->[1];
+EOT
+
+ TEST q(Data::Dumper->Dump([\\@foo, \\%foo, \\*foo], ['bar', 'baz', 'foo']));
+ TEST q(Data::Dumper->Dumpxs([\\@foo, \\%foo, \\*foo], ['bar', 'baz', 'foo'])) if $XS;
+
+############# 73
+##
+ $WANT = <<'EOT';
+#$foo = \*::foo;
+#@bar = (
+# 10,
+# $foo,
+# {
+# a => 1,
+# b => \5,
+# c => \@bar,
+# d => $bar[2]
+# }
+#);
+#%baz = %{$bar[2]};
+EOT
+
+ $Data::Dumper::Purity = 0;
+ $Data::Dumper::Quotekeys = 0;
+ TEST q(Data::Dumper->Dump([\\*foo, \\@foo, \\%foo], ['*foo', '*bar', '*baz']));
+ TEST q(Data::Dumper->Dumpxs([\\*foo, \\@foo, \\%foo], ['*foo', '*bar', '*baz'])) if $XS;
+
+############# 79
+##
+ $WANT = <<'EOT';
+#$foo = \*::foo;
+#$bar = [
+# 10,
+# $foo,
+# {
+# a => 1,
+# b => \5,
+# c => $bar,
+# d => $bar->[2]
+# }
+#];
+#$baz = $bar->[2];
+EOT
+
+ TEST q(Data::Dumper->Dump([\\*foo, \\@foo, \\%foo], ['foo', 'bar', 'baz']));
+ TEST q(Data::Dumper->Dumpxs([\\*foo, \\@foo, \\%foo], ['foo', 'bar', 'baz'])) if $XS;
+
+}
+
+#############
+#############
+{
+ package main;
+ @dogs = ( 'Fido', 'Wags' );
+ %kennel = (
+ First => \$dogs[0],
+ Second => \$dogs[1],
+ );
+ $dogs[2] = \%kennel;
+ $mutts = \%kennel;
+ $mutts = $mutts; # avoid warning
+
+############# 85
+##
+if (!$Is_ebcdic) {
+ $WANT = <<'EOT';
+#%kennels = (
+# First => \'Fido',
+# Second => \'Wags'
+#);
+#@dogs = (
+# ${$kennels{First}},
+# ${$kennels{Second}},
+# \%kennels
+#);
+#%mutts = %kennels;
+EOT
+}
+else {
+ $WANT = <<'EOT';
+#%kennels = (
+# Second => \'Wags',
+# First => \'Fido'
+#);
+#@dogs = (
+# ${$kennels{First}},
+# ${$kennels{Second}},
+# \%kennels
+#);
+#%mutts = %kennels;
+EOT
+}
+
+ TEST q(
+ $d = Data::Dumper->new([\\%kennel, \\@dogs, $mutts],
+ [qw(*kennels *dogs *mutts)] );
+ $d->Dump;
+ );
+ if ($XS) {
+ TEST q(
+ $d = Data::Dumper->new([\\%kennel, \\@dogs, $mutts],
+ [qw(*kennels *dogs *mutts)] );
+ $d->Dumpxs;
+ );
+ }
+
+############# 91
+##
+ $WANT = <<'EOT';
+#%kennels = %kennels;
+#@dogs = @dogs;
+#%mutts = %kennels;
+EOT
+
+ TEST q($d->Dump);
+ TEST q($d->Dumpxs) if $XS;
+
+############# 97
+##
+if (!$Is_ebcdic) {
+ $WANT = <<'EOT';
+#%kennels = (
+# First => \'Fido',
+# Second => \'Wags'
+#);
+#@dogs = (
+# ${$kennels{First}},
+# ${$kennels{Second}},
+# \%kennels
+#);
+#%mutts = %kennels;
+EOT
+}
+else {
+ $WANT = <<'EOT';
+#%kennels = (
+# Second => \'Wags',
+# First => \'Fido'
+#);
+#@dogs = (
+# ${$kennels{First}},
+# ${$kennels{Second}},
+# \%kennels
+#);
+#%mutts = %kennels;
+EOT
+}
+
+ TEST q($d->Reset; $d->Dump);
+ if ($XS) {
+ TEST q($d->Reset; $d->Dumpxs);
+ }
+
+############# 103
+##
+if (!$Is_ebcdic) {
+ $WANT = <<'EOT';
+#@dogs = (
+# 'Fido',
+# 'Wags',
+# {
+# First => \$dogs[0],
+# Second => \$dogs[1]
+# }
+#);
+#%kennels = %{$dogs[2]};
+#%mutts = %{$dogs[2]};
+EOT
+}
+else {
+ $WANT = <<'EOT';
+#@dogs = (
+# 'Fido',
+# 'Wags',
+# {
+# Second => \$dogs[1],
+# First => \$dogs[0]
+# }
+#);
+#%kennels = %{$dogs[2]};
+#%mutts = %{$dogs[2]};
+EOT
+}
+
+ TEST q(
+ $d = Data::Dumper->new([\\@dogs, \\%kennel, $mutts],
+ [qw(*dogs *kennels *mutts)] );
+ $d->Dump;
+ );
+ if ($XS) {
+ TEST q(
+ $d = Data::Dumper->new([\\@dogs, \\%kennel, $mutts],
+ [qw(*dogs *kennels *mutts)] );
+ $d->Dumpxs;
+ );
+ }
+
+############# 109
+##
+ TEST q($d->Reset->Dump);
+ if ($XS) {
+ TEST q($d->Reset->Dumpxs);
+ }
+
+############# 115
+##
+if (!$Is_ebcdic) {
+ $WANT = <<'EOT';
+#@dogs = (
+# 'Fido',
+# 'Wags',
+# {
+# First => \'Fido',
+# Second => \'Wags'
+# }
+#);
+#%kennels = (
+# First => \'Fido',
+# Second => \'Wags'
+#);
+EOT
+}
+else {
+ $WANT = <<'EOT';
+#@dogs = (
+# 'Fido',
+# 'Wags',
+# {
+# Second => \'Wags',
+# First => \'Fido'
+# }
+#);
+#%kennels = (
+# Second => \'Wags',
+# First => \'Fido'
+#);
+EOT
+}
+
+ TEST q(
+ $d = Data::Dumper->new( [\@dogs, \%kennel], [qw(*dogs *kennels)] );
+ $d->Deepcopy(1)->Dump;
+ );
+ if ($XS) {
+ TEST q($d->Reset->Dumpxs);
+ }
+
+}
+
+{
+
+sub z { print "foo\n" }
+$c = [ \&z ];
+
+############# 121
+##
+ $WANT = <<'EOT';
+#$a = $b;
+#$c = [
+# $b
+#];
+EOT
+
+TEST q(Data::Dumper->new([\&z,$c],['a','c'])->Seen({'b' => \&z})->Dump;);
+TEST q(Data::Dumper->new([\&z,$c],['a','c'])->Seen({'b' => \&z})->Dumpxs;)
+ if $XS;
+
+############# 127
+##
+ $WANT = <<'EOT';
+#$a = \&b;
+#$c = [
+# \&b
+#];
+EOT
+
+TEST q(Data::Dumper->new([\&z,$c],['a','c'])->Seen({'*b' => \&z})->Dump;);
+TEST q(Data::Dumper->new([\&z,$c],['a','c'])->Seen({'*b' => \&z})->Dumpxs;)
+ if $XS;
+
+############# 133
+##
+ $WANT = <<'EOT';
+#*a = \&b;
+#@c = (
+# \&b
+#);
+EOT
+
+TEST q(Data::Dumper->new([\&z,$c],['*a','*c'])->Seen({'*b' => \&z})->Dump;);
+TEST q(Data::Dumper->new([\&z,$c],['*a','*c'])->Seen({'*b' => \&z})->Dumpxs;)
+ if $XS;
+
+}
+
+{
+ $a = [];
+ $a->[1] = \$a->[0];
+
+############# 139
+##
+ $WANT = <<'EOT';
+#@a = (
+# undef,
+# ''
+#);
+#$a[1] = \$a[0];
+EOT
+
+TEST q(Data::Dumper->new([$a],['*a'])->Purity(1)->Dump;);
+TEST q(Data::Dumper->new([$a],['*a'])->Purity(1)->Dumpxs;)
+ if $XS;
+}
+
+{
+ $a = \\\\\'foo';
+ $b = $$$a;
+
+############# 145
+##
+ $WANT = <<'EOT';
+#$a = \\\\\'foo';
+#$b = ${${$a}};
+EOT
+
+TEST q(Data::Dumper->new([$a,$b],['a','b'])->Purity(1)->Dump;);
+TEST q(Data::Dumper->new([$a,$b],['a','b'])->Purity(1)->Dumpxs;)
+ if $XS;
+}
+
+{
+ $a = [{ a => \$b }, { b => undef }];
+ $b = [{ c => \$b }, { d => \$a }];
+
+############# 151
+##
+ $WANT = <<'EOT';
+#$a = [
+# {
+# a => \[
+# {
+# c => ''
+# },
+# {
+# d => \[]
+# }
+# ]
+# },
+# {
+# b => undef
+# }
+#];
+#${$a->[0]{a}}->[0]->{c} = $a->[0]{a};
+#${${$a->[0]{a}}->[1]->{d}} = $a;
+#$b = ${$a->[0]{a}};
+EOT
+
+TEST q(Data::Dumper->new([$a,$b],['a','b'])->Purity(1)->Dump;);
+TEST q(Data::Dumper->new([$a,$b],['a','b'])->Purity(1)->Dumpxs;)
+ if $XS;
+}
+
+{
+ $a = [[[[\\\\\'foo']]]];
+ $b = $a->[0][0];
+ $c = $${$b->[0][0]};
+
+############# 157
+##
+ $WANT = <<'EOT';
+#$a = [
+# [
+# [
+# [
+# \\\\\'foo'
+# ]
+# ]
+# ]
+#];
+#$b = $a->[0][0];
+#$c = ${${$a->[0][0][0][0]}};
+EOT
+
+TEST q(Data::Dumper->new([$a,$b,$c],['a','b','c'])->Purity(1)->Dump;);
+TEST q(Data::Dumper->new([$a,$b,$c],['a','b','c'])->Purity(1)->Dumpxs;)
+ if $XS;
+}
diff --git a/gnu/usr.bin/perl/t/lib/errno.t b/gnu/usr.bin/perl/t/lib/errno.t
new file mode 100644
index 00000000000..361723f1b22
--- /dev/null
+++ b/gnu/usr.bin/perl/t/lib/errno.t
@@ -0,0 +1,50 @@
+#!./perl
+
+BEGIN {
+ unless(grep /blib/, @INC) {
+ chdir 't' if -d 't';
+ @INC = '../lib' if -d '../lib';
+ }
+}
+
+use Errno;
+
+print "1..5\n";
+
+print "not " unless @Errno::EXPORT_OK;
+print "ok 1\n";
+die unless @Errno::EXPORT_OK;
+
+$err = $Errno::EXPORT_OK[0];
+$num = &{"Errno::$err"};
+
+print "not " unless &{"Errno::$err"} == $num;
+print "ok 2\n";
+
+$! = $num;
+print "not " unless $!{$err};
+print "ok 3\n";
+
+$! = 0;
+print "not " if $!{$err};
+print "ok 4\n";
+
+$s1 = join(",",sort keys(%!));
+$s2 = join(",",sort @Errno::EXPORT_OK);
+
+if($s1 ne $s2) {
+ my @s1 = keys(%!);
+ my @s2 = @Errno::EXPORT_OK;
+ my(%s1,%s2);
+ @s1{@s1} = ();
+ @s2{@s2} = ();
+ delete @s2{@s1};
+ delete @s1{@s2};
+ print "# These are only in \%!\n";
+ print "# ",join(" ",map { "'$_'" } keys %s1),"\n";
+ print "# These are only in \@EXPORT_OK\n";
+ print "# ",join(" ",map { "'$_'" } keys %s2),"\n";
+ print "not ";
+}
+
+print "ok 5\n";
diff --git a/gnu/usr.bin/perl/t/lib/fatal.t b/gnu/usr.bin/perl/t/lib/fatal.t
new file mode 100644
index 00000000000..fb3757f5cda
--- /dev/null
+++ b/gnu/usr.bin/perl/t/lib/fatal.t
@@ -0,0 +1,27 @@
+#!./perl -w
+
+BEGIN {
+ chdir 't' if -d 't';
+ unshift @INC, '../lib';
+ print "1..9\n";
+}
+
+use strict;
+use Fatal qw(open);
+
+my $i = 1;
+eval { open FOO, '<lkjqweriuapofukndajsdlfjnvcvn' };
+print "not " unless $@ =~ /^Can't open/;
+print "ok $i\n"; ++$i;
+
+my $foo = 'FOO';
+for ('$foo', "'$foo'", "*$foo", "\\*$foo") {
+ eval qq{ open $_, '<$0' };
+ print "not " if $@;
+ print "ok $i\n"; ++$i;
+
+ print "not " unless scalar(<FOO>) =~ m|^#!./perl|;
+ print "not " if $@;
+ print "ok $i\n"; ++$i;
+ close FOO;
+}
diff --git a/gnu/usr.bin/perl/t/lib/fields.t b/gnu/usr.bin/perl/t/lib/fields.t
new file mode 100644
index 00000000000..139e469b5a2
--- /dev/null
+++ b/gnu/usr.bin/perl/t/lib/fields.t
@@ -0,0 +1,112 @@
+#!./perl -w
+
+my $w;
+
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = '../lib' if -d '../lib';
+ $SIG{__WARN__} = sub {
+ if ($_[0] =~ /^Hides field 'b1' in base class/) {
+ $w++;
+ return;
+ }
+ print $_[0];
+ };
+}
+
+use strict;
+use vars qw($DEBUG);
+
+package B1;
+use fields qw(b1 b2 b3);
+
+package B2;
+use fields '_b1';
+use fields qw(b1 _b2 b2);
+
+sub new { bless [], shift }
+
+package D1;
+use base 'B1';
+use fields qw(d1 d2 d3);
+
+package D2;
+use base 'B1';
+use fields qw(_d1 _d2);
+use fields qw(d1 d2);
+
+package D3;
+use base 'B2';
+use fields qw(b1 d1 _b1 _d1); # hide b1
+
+package D4;
+use base 'D3';
+use fields qw(_d3 d3);
+
+package M;
+sub m {}
+
+package D5;
+use base qw(M B2);
+
+package Foo::Bar;
+use base 'B1';
+
+package Foo::Bar::Baz;
+use base 'Foo::Bar';
+use fields qw(foo bar baz);
+
+package main;
+
+sub fstr
+{
+ my $h = shift;
+ my @tmp;
+ for my $k (sort {$h->{$a} <=> $h->{$b}} keys %$h) {
+ my $v = $h->{$k};
+ push(@tmp, "$k:$v");
+ }
+ my $str = join(",", @tmp);
+ print "$h => $str\n" if $DEBUG;
+ $str;
+}
+
+my %expect = (
+ B1 => "b1:1,b2:2,b3:3",
+ B2 => "_b1:1,b1:2,_b2:3,b2:4",
+ D1 => "b1:1,b2:2,b3:3,d1:4,d2:5,d3:6",
+ D2 => "b1:1,b2:2,b3:3,_d1:4,_d2:5,d1:6,d2:7",
+ D3 => "b2:4,b1:5,d1:6,_b1:7,_d1:8",
+ D4 => "b2:4,b1:5,d1:6,_d3:9,d3:10",
+ D5 => "b1:2,b2:4",
+ 'Foo::Bar::Baz' => 'b1:1,b2:2,b3:3,foo:4,bar:5,baz:6',
+);
+
+print "1..", int(keys %expect)+3, "\n";
+my $testno = 0;
+while (my($class, $exp) = each %expect) {
+ no strict 'refs';
+ my $fstr = fstr(\%{$class."::FIELDS"});
+ print "EXP: $exp\nGOT: $fstr\nnot " unless $fstr eq $exp;
+ print "ok ", ++$testno, "\n";
+}
+
+# Did we get the appropriate amount of warnings?
+print "not " unless $w == 1;
+print "ok ", ++$testno, "\n";
+
+# A simple object creation and AVHV attribute access test
+my B2 $obj1 = D3->new;
+$obj1->{b1} = "B2";
+my D3 $obj2 = $obj1;
+$obj2->{b1} = "D3";
+
+print "not " unless $obj1->[2] eq "B2" && $obj1->[5] eq "D3";
+print "ok ", ++$testno, "\n";
+
+# We should get compile time failures field name typos
+eval q(my D3 $obj3 = $obj2; $obj3->{notthere} = "");
+print "not " unless $@ && $@ =~ /^No such field "notthere"/;
+print "ok ", ++$testno, "\n";
+
+#fields::_dump();
diff --git a/gnu/usr.bin/perl/t/lib/filespec.t b/gnu/usr.bin/perl/t/lib/filespec.t
new file mode 100644
index 00000000000..ca22d3e12ba
--- /dev/null
+++ b/gnu/usr.bin/perl/t/lib/filespec.t
@@ -0,0 +1,43 @@
+#!./perl
+
+BEGIN {
+ $^O = '';
+ chdir 't' if -d 't';
+ @INC = '../lib';
+}
+
+print "1..4\n";
+
+use File::Spec;
+
+
+if (File::Spec->catfile('a','b','c') eq 'a/b/c') {
+ print "ok 1\n";
+} else {
+ print "not ok 1\n";
+}
+
+use File::Spec::OS2;
+
+if (File::Spec::OS2->catfile('a','b','c') eq 'a/b/c') {
+ print "ok 2\n";
+} else {
+ print "not ok 2\n";
+}
+
+use File::Spec::Win32;
+
+if (File::Spec::Win32->catfile('a','b','c') eq 'a\b\c') {
+ print "ok 3\n";
+} else {
+ print "not ok 3\n";
+}
+
+use File::Spec::Mac;
+
+if (File::Spec::Mac->catfile('a','b','c') eq 'a:b:c') {
+ print "ok 4\n";
+} else {
+ print "not ok 4\n";
+}
+
diff --git a/gnu/usr.bin/perl/t/lib/h2ph.h b/gnu/usr.bin/perl/t/lib/h2ph.h
new file mode 100644
index 00000000000..cddf0a7d947
--- /dev/null
+++ b/gnu/usr.bin/perl/t/lib/h2ph.h
@@ -0,0 +1,85 @@
+/*
+ * Test header file for h2ph
+ *
+ * Try to test as many constructs as possible
+ * For example, the multi-line comment :)
+ */
+
+/* And here's a single line comment :) */
+
+/* Test #define with no indenting, over multiple lines */
+#define SQUARE(x) \
+((x)*(x))
+
+/* Test #ifndef and parameter interpretation*/
+#ifndef ERROR
+#define ERROR(x) fprintf(stderr, "%s\n", x[2][3][0])
+#endif /* ERROR */
+
+#ifndef _H2PH_H_
+#define _H2PH_H_
+
+/* #ident - doesn't really do anything, but I think it always gets included anyway */
+#ident "$Revision h2ph.h,v 1.0 98/05/04 20:42:14 billy $"
+
+/* Test #undef */
+#undef MAX
+#define MAX(a,b) ((a) > (b) ? (a) : (b))
+
+/* Test #ifdef */
+#ifdef __SOME_UNIMPORTANT_PROPERTY
+#define MIN(a,b) ((a) < (b) ? (a) : (b))
+#endif /* __SOME_UNIMPORTANT_PROPERTY */
+
+/*
+ * Test #if, #elif, #else, #endif, #warn and #error, and `!'
+ * Also test whitespace between the `#' and the command
+ */
+#if !(defined __SOMETHING_MORE_IMPORTANT)
+# warn Be careful...
+#elif !(defined __SOMETHING_REALLY_REALLY_IMPORTANT)
+# error Nup, can't go on /* ' /* stupid font-lock-mode */
+#else /* defined __SOMETHING_MORE_IMPORTANT && defined __SOMETHING_REALLY_REALLY_IMPORTANT */
+# define EVERYTHING_IS_OK
+#endif
+
+/* Test && and || */
+#undef WHATEVER
+#if (!((defined __SOMETHING_TRIVIAL && defined __SOMETHING_LESS_SO)) \
+ || defined __SOMETHING_OVERPOWERING)
+# define WHATEVER 6
+#elif !(defined __SOMETHING_TRIVIAL) /* defined __SOMETHING_LESS_SO */
+# define WHATEVER 7
+#elif !(defined __SOMETHING_LESS_SO) /* defined __SOMETHING_TRIVIAL */
+# define WHATEVER 8
+#else /* defined __SOMETHING_TRIVIAL && defined __SOMETHING_LESS_SO */
+# define WHATEVER 1000
+#endif
+
+/*
+ * Test #include, #import and #include_next
+ * #include_next is difficult to test, it really depends on the actual
+ * circumstances - for example, `#include_next <limits.h>' on a Linux system
+ * with `use lib qw(/opt/perl5/lib/site_perl/i586-linux/linux);' or whatever
+ * your equivalent is...
+ */
+#include <sys/socket.h>
+#import "sys/ioctl.h"
+#include_next <sys/fcntl.h>
+
+/* typedefs should be ignored */
+typedef struct a_struct {
+ int typedefs_should;
+ char be_ignored;
+ long as_well;
+} a_typedef;
+
+/*
+ * however, typedefs of enums and just plain enums should end up being treated
+ * like a bunch of #defines...
+ */
+
+typedef enum _days_of_week { sun, mon, tue, wed, thu, fri, sat, Sun=0, Mon,
+ Tue, Wed, Thu, Fri, Sat } days_of_week;
+
+#endif /* _H2PH_H_ */
diff --git a/gnu/usr.bin/perl/t/lib/h2ph.pht b/gnu/usr.bin/perl/t/lib/h2ph.pht
new file mode 100644
index 00000000000..e5b293243ec
--- /dev/null
+++ b/gnu/usr.bin/perl/t/lib/h2ph.pht
@@ -0,0 +1,71 @@
+require '_h2ph_pre.ph';
+
+unless(defined(&SQUARE)) {
+ sub SQUARE {
+ local($x) = @_;
+ eval q((($x)*($x)));
+ }
+}
+unless(defined(&ERROR)) {
+ eval 'sub ERROR {
+ local($x) = @_;
+ eval q( &fprintf( &stderr, \\"%s\\\\n\\", $x->[2][3][0]));
+ }' unless defined(&ERROR);
+}
+unless(defined(&_H2PH_H_)) {
+ eval 'sub _H2PH_H_ () {1;}' unless defined(&_H2PH_H_);
+ # "$Revision h2ph.h,v 1.0 98/05/04 20:42:14 billy $"
+ undef(&MAX) if defined(&MAX);
+ eval 'sub MAX {
+ local($a,$b) = @_;
+ eval q((($a) > ($b) ? ($a) : ($b)));
+ }' unless defined(&MAX);
+ if(defined(&__SOME_UNIMPORTANT_PROPERTY)) {
+ eval 'sub MIN {
+ local($a,$b) = @_;
+ eval q((($a) < ($b) ? ($a) : ($b)));
+ }' unless defined(&MIN);
+ }
+ if(!(defined (defined(&__SOMETHING_MORE_IMPORTANT) ? &__SOMETHING_MORE_IMPORTANT : 0))) {
+ }
+ elsif(!(defined (defined(&__SOMETHING_REALLY_REALLY_IMPORTANT) ? &__SOMETHING_REALLY_REALLY_IMPORTANT : 0))) {
+ die("Nup\,\ can\'t\ go\ on\ ");
+ } else {
+ eval 'sub EVERYTHING_IS_OK () {1;}' unless defined(&EVERYTHING_IS_OK);
+ }
+ undef(&WHATEVER) if defined(&WHATEVER);
+ if((!((defined (defined(&__SOMETHING_TRIVIAL) ? &__SOMETHING_TRIVIAL : 0) && defined (defined(&__SOMETHING_LESS_SO) ? &__SOMETHING_LESS_SO : 0))) || defined (defined(&__SOMETHING_OVERPOWERING) ? &__SOMETHING_OVERPOWERING : 0))) {
+ eval 'sub WHATEVER () {6;}' unless defined(&WHATEVER);
+ }
+ elsif(!(defined (defined(&__SOMETHING_TRIVIAL) ? &__SOMETHING_TRIVIAL : 0)) ) {
+ eval 'sub WHATEVER () {7;}' unless defined(&WHATEVER);
+ }
+ elsif(!(defined (defined(&__SOMETHING_LESS_SO) ? &__SOMETHING_LESS_SO : 0)) ) {
+ eval 'sub WHATEVER () {8;}' unless defined(&WHATEVER);
+ } else {
+ eval 'sub WHATEVER () {1000;}' unless defined(&WHATEVER);
+ }
+ require 'sys/socket.ph';
+ require 'sys/ioctl.ph';
+ eval {
+ my(%INCD) = map { $INC{$_} => 1 } (grep { $_ eq "sys/fcntl.ph" } keys(%INC));
+ my(@REM) = map { "$_/sys/fcntl.ph" } (grep { not exists($INCD{"$_/sys/fcntl.ph"})and -f "$_/sys/fcntl.ph" } @INC);
+ require "$REM[0]" if @REM;
+ };
+ warn($@) if $@;
+ eval("sub sun () { 0; }") unless defined(&sun);
+ eval("sub mon () { 1; }") unless defined(&mon);
+ eval("sub tue () { 2; }") unless defined(&tue);
+ eval("sub wed () { 3; }") unless defined(&wed);
+ eval("sub thu () { 4; }") unless defined(&thu);
+ eval("sub fri () { 5; }") unless defined(&fri);
+ eval("sub sat () { 6; }") unless defined(&sat);
+ eval("sub Sun () { 0; }") unless defined(&Sun);
+ eval("sub Mon () { 1; }") unless defined(&Mon);
+ eval("sub Tue () { 2; }") unless defined(&Tue);
+ eval("sub Wed () { 3; }") unless defined(&Wed);
+ eval("sub Thu () { 4; }") unless defined(&Thu);
+ eval("sub Fri () { 5; }") unless defined(&Fri);
+ eval("sub Sat () { 6; }") unless defined(&Sat);
+}
+1;
diff --git a/gnu/usr.bin/perl/t/lib/h2ph.t b/gnu/usr.bin/perl/t/lib/h2ph.t
new file mode 100644
index 00000000000..1fa7f63536d
--- /dev/null
+++ b/gnu/usr.bin/perl/t/lib/h2ph.t
@@ -0,0 +1,34 @@
+#!./perl
+
+# quickie tests to see if h2ph actually runs and does more or less what is
+# expected
+
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+}
+
+print "1..2\n";
+
+# quickly compare two text files
+sub txt_compare {
+ local ($/, $A, $B);
+ for (($A,$B) = @_) { open(_,"<$_") ? $_ = <_> : die "$_ : $!"; close _ }
+ $A cmp $B;
+}
+
+unless(-e '../utils/h2ph') {
+ print("ok 1\nok 2\n");
+ # i'll probably get in trouble for this :)
+} else {
+ # does it run?
+ $ok = system("./perl -I../lib ../utils/h2ph -d. -Q lib/h2ph.h");
+ print(($ok == 0 ? "" : "not "), "ok 1\n");
+
+ # does it work? well, does it do what we expect? :-)
+ $ok = txt_compare("lib/h2ph.ph", "lib/h2ph.pht");
+ print(($ok == 0 ? "" : "not "), "ok 2\n");
+
+ # cleanup - should this be in an END block?
+ unlink("lib/h2ph.ph");
+}
diff --git a/gnu/usr.bin/perl/t/lib/ipc_sysv.t b/gnu/usr.bin/perl/t/lib/ipc_sysv.t
new file mode 100644
index 00000000000..30ea48d9994
--- /dev/null
+++ b/gnu/usr.bin/perl/t/lib/ipc_sysv.t
@@ -0,0 +1,178 @@
+#!./perl
+
+BEGIN {
+ chdir 't' if -d 't';
+
+ @INC = '../lib';
+
+ require Config; import Config;
+
+ unless ($Config{'d_msg'} eq 'define' &&
+ $Config{'d_sem'} eq 'define') {
+ print "1..0\n";
+ exit;
+ }
+}
+
+# These constants are common to all tests.
+# Later the sem* tests will import more for themselves.
+
+use IPC::SysV qw(IPC_PRIVATE IPC_NOWAIT IPC_STAT IPC_RMID
+ S_IRWXU S_IRWXG S_IRWXO);
+use strict;
+
+print "1..16\n";
+
+my $msg;
+my $sem;
+
+$SIG{__DIE__} = 'cleanup'; # will cleanup $msg and $sem if needed
+
+# FreeBSD is known to throw this if there's no SysV IPC in the kernel.
+$SIG{SYS} = sub {
+ print STDERR <<EOM;
+SIGSYS caught.
+It may be that your kernel does not have SysV IPC configured.
+
+EOM
+ if ($^O eq 'freebsd') {
+ print STDERR <<EOM;
+You must have following options in your kernel:
+
+options SYSVSHM
+options SYSVSEM
+options SYSVMSG
+
+See config(8).
+EOM
+ }
+ exit(1);
+};
+
+if ($Config{'d_msgget'} eq 'define' &&
+ $Config{'d_msgctl'} eq 'define' &&
+ $Config{'d_msgsnd'} eq 'define' &&
+ $Config{'d_msgrcv'} eq 'define') {
+ $msg = msgget(IPC_PRIVATE, S_IRWXU | S_IRWXG | S_IRWXO);
+ # Very first time called after machine is booted value may be 0
+ die "msgget failed: $!\n" unless defined($msg) && $msg >= 0;
+
+ print "ok 1\n";
+
+ #Putting a message on the queue
+ my $msgtype = 1;
+ my $msgtext = "hello";
+
+ msgsnd($msg,pack("L a*",$msgtype,$msgtext),0) or print "not ";
+ print "ok 2\n";
+
+ my $data;
+ msgctl($msg,IPC_STAT,$data) or print "not ";
+ print "ok 3\n";
+
+ print "not " unless length($data);
+ print "ok 4\n";
+
+ my $msgbuf;
+ msgrcv($msg,$msgbuf,256,0,IPC_NOWAIT) or print "not ";
+ print "ok 5\n";
+
+ my($rmsgtype,$rmsgtext) = unpack("L a*",$msgbuf);
+
+ print "not " unless($rmsgtype == $msgtype && $rmsgtext eq $msgtext);
+ print "ok 6\n";
+} else {
+ for (1..6) {
+ print "ok $_\n"; # fake it
+ }
+}
+
+if($Config{'d_semget'} eq 'define' &&
+ $Config{'d_semctl'} eq 'define') {
+
+ use IPC::SysV qw(IPC_CREAT GETALL SETALL);
+
+ $sem = semget(IPC_PRIVATE, 10, S_IRWXU | S_IRWXG | S_IRWXO | IPC_CREAT);
+ # Very first time called after machine is booted value may be 0
+ die "semget: $!\n" unless defined($sem) && $sem >= 0;
+
+ print "ok 7\n";
+
+ my $data;
+ semctl($sem,0,IPC_STAT,$data) or print "not ";
+ print "ok 8\n";
+
+ print "not " unless length($data);
+ print "ok 9\n";
+
+ my $template;
+
+ # Find the pack/unpack template capable of handling native C shorts.
+
+ if ($Config{shortsize} == 2) {
+ $template = "s";
+ } elsif ($Config{shortsize} == 4) {
+ $template = "l";
+ } elsif ($Config{shortsize} == 8) {
+ # Try quad last because not supported everywhere.
+ foreach my $t (qw(i q)) {
+ # We could trap the unsupported quad template with eval
+ # but if we get this far we should have quad support anyway.
+ if (length(pack($t, 0)) == 8) {
+ $template = $t;
+ last;
+ }
+ }
+ }
+
+ die "$0: cannot pack native shorts\n" unless defined $template;
+
+ $template .= "*";
+
+ my $nsem = 10;
+
+ semctl($sem,0,SETALL,pack($template,(0) x $nsem)) or print "not ";
+ print "ok 10\n";
+
+ $data = "";
+ semctl($sem,0,GETALL,$data) or print "not ";
+ print "ok 11\n";
+
+ print "not " unless length($data) == length(pack($template,(0) x $nsem));
+ print "ok 12\n";
+
+ my @data = unpack($template,$data);
+
+ my $adata = "0" x $nsem;
+
+ print "not " unless @data == $nsem and join("",@data) eq $adata;
+ print "ok 13\n";
+
+ my $poke = 2;
+
+ $data[$poke] = 1;
+ semctl($sem,0,SETALL,pack($template,@data)) or print "not ";
+ print "ok 14\n";
+
+ $data = "";
+ semctl($sem,0,GETALL,$data) or print "not ";
+ print "ok 15\n";
+
+ @data = unpack($template,$data);
+
+ my $bdata = "0" x $poke . "1" . "0" x ($nsem-$poke-1);
+
+ print "not " unless join("",@data) eq $bdata;
+ print "ok 16\n";
+} else {
+ for (7..16) {
+ print "ok $_\n"; # fake it
+ }
+}
+
+sub cleanup {
+ msgctl($msg,IPC_RMID,0) if defined $msg;
+ semctl($sem,0,IPC_RMID,undef) if defined $sem;
+}
+
+cleanup;
diff --git a/gnu/usr.bin/perl/t/lib/ph.t b/gnu/usr.bin/perl/t/lib/ph.t
new file mode 100644
index 00000000000..de27dee5e23
--- /dev/null
+++ b/gnu/usr.bin/perl/t/lib/ph.t
@@ -0,0 +1,96 @@
+#!./perl
+
+# Check for presence and correctness of .ph files; for now,
+# just socket.ph and pals.
+# -- Kurt Starsinic <kstar@isinet.com>
+
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+}
+
+# All the constants which Socket.pm tries to make available:
+my @possibly_defined = qw(
+ INADDR_ANY INADDR_LOOPBACK INADDR_NONE AF_802 AF_APPLETALK AF_CCITT
+ AF_CHAOS AF_DATAKIT AF_DECnet AF_DLI AF_ECMA AF_GOSIP AF_HYLINK AF_IMPLINK
+ AF_INET AF_LAT AF_MAX AF_NBS AF_NIT AF_NS AF_OSI AF_OSINET AF_PUP
+ AF_SNA AF_UNIX AF_UNSPEC AF_X25 MSG_DONTROUTE MSG_MAXIOVLEN MSG_OOB
+ MSG_PEEK PF_802 PF_APPLETALK PF_CCITT PF_CHAOS PF_DATAKIT PF_DECnet PF_DLI
+ PF_ECMA PF_GOSIP PF_HYLINK PF_IMPLINK PF_INET PF_LAT PF_MAX PF_NBS PF_NIT
+ PF_NS PF_OSI PF_OSINET PF_PUP PF_SNA PF_UNIX PF_UNSPEC PF_X25 SOCK_DGRAM
+ SOCK_RAW SOCK_RDM SOCK_SEQPACKET SOCK_STREAM SOL_SOCKET SOMAXCONN
+ SO_ACCEPTCONN SO_BROADCAST SO_DEBUG SO_DONTLINGER SO_DONTROUTE SO_ERROR
+ SO_KEEPALIVE SO_LINGER SO_OOBINLINE SO_RCVBUF SO_RCVLOWAT SO_RCVTIMEO
+ SO_REUSEADDR SO_SNDBUF SO_SNDLOWAT SO_SNDTIMEO SO_TYPE SO_USELOOPBACK
+);
+
+
+# The libraries which I'm going to require:
+my @libs = qw(Socket "sys/types.ph" "sys/socket.ph" "netinet/in.ph");
+
+
+# These are defined by Socket.pm even if the C header files don't define them:
+my %ok_to_miss = (
+ INADDR_NONE => 1,
+ INADDR_LOOPBACK => 1,
+);
+
+
+my $total_tests = scalar @libs + scalar @possibly_defined;
+my $i = 0;
+
+print "1..$total_tests\n";
+
+
+foreach (@libs) {
+ $i++;
+
+ if (eval "require $_" ) {
+ print "ok $i\n";
+ } else {
+ print "# Skipping tests; $_ may be missing\n";
+ foreach ($i .. $total_tests) { print "ok $_\n" }
+ exit;
+ }
+}
+
+
+foreach (@possibly_defined) {
+ $i++;
+
+ $pm_val = eval "Socket::$_()";
+ $ph_val = eval "main::$_()";
+
+ if (defined $pm_val and !defined $ph_val) {
+ if ($ok_to_miss{$_}) { print "ok $i\n" }
+ else { print "not ok $i\n" }
+ next;
+ } elsif (defined $ph_val and !defined $pm_val) {
+ print "not ok $i\n";
+ next;
+ }
+
+ # Socket.pm converts these to network byte order, so we convert the
+ # socket.ph version to match; note that these cases skip the following
+ # `elsif', which is only applied to _numeric_ values, not literal
+ # bitmasks.
+ if ($_ eq 'INADDR_ANY'
+ or $_ eq 'INADDR_LOOPBACK'
+ or $_ eq 'INADDR_NONE') {
+ $ph_val = pack("N*", $ph_val); # htonl(3) equivalent
+ }
+
+ # Since Socket.pm and socket.ph wave their hands over macros differently,
+ # they could return functionally equivalent bitmaps with different numeric
+ # interpretations (due to sign extension). The only apparent case of this
+ # is SO_DONTLINGER (only on Solaris, and deprecated, at that):
+ elsif ($pm_val != $ph_val) {
+ $pm_val = oct(sprintf "0x%lx", $pm_val);
+ $ph_val = oct(sprintf "0x%lx", $ph_val);
+ }
+
+ if ($pm_val == $ph_val) { print "ok $i\n" }
+ else { print "not ok $i\n" }
+}
+
+
diff --git a/gnu/usr.bin/perl/t/lib/textfill.t b/gnu/usr.bin/perl/t/lib/textfill.t
new file mode 100644
index 00000000000..19add694238
--- /dev/null
+++ b/gnu/usr.bin/perl/t/lib/textfill.t
@@ -0,0 +1,96 @@
+#!./perl -w
+
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+}
+
+@tests = (split(/\nEND\n/s, <<DONE));
+TEST1
+Cyberdog Information
+
+Cyberdog & Netscape in the news
+Important Press Release regarding Cyberdog and Netscape. Check it out!
+
+Cyberdog Plug-in Support!
+Cyberdog support for Netscape Plug-ins is now available to download! Go
+to the Cyberdog Beta Download page and download it now!
+
+Cyberdog Book
+Check out Jesse Feiler's way-cool book about Cyberdog. You can find
+details out about the book as well as ordering information at Philmont
+Software Mill site.
+
+Java!
+Looking to view Java applets in Cyberdog 1.1 Beta 3? Download and install
+the Mac OS Runtime for Java and try it out!
+
+Cyberdog 1.1 Beta 3
+We hope that Cyberdog and OpenDoc 1.1 will be available within the next
+two weeks. In the meantime, we have released another version of
+Cyberdog, Cyberdog 1.1 Beta 3. This version fixes several bugs that were
+reported to us during out public beta period. You can check out our release
+notes to see what we fixed!
+END
+ Cyberdog Information
+ Cyberdog & Netscape in the news Important Press Release regarding
+ Cyberdog and Netscape. Check it out!
+ Cyberdog Plug-in Support! Cyberdog support for Netscape Plug-ins is now
+ available to download! Go to the Cyberdog Beta Download page and download
+ it now!
+ Cyberdog Book Check out Jesse Feiler's way-cool book about Cyberdog.
+ You can find details out about the book as well as ordering information at
+ Philmont Software Mill site.
+ Java! Looking to view Java applets in Cyberdog 1.1 Beta 3? Download and
+ install the Mac OS Runtime for Java and try it out!
+ Cyberdog 1.1 Beta 3 We hope that Cyberdog and OpenDoc 1.1 will be
+ available within the next two weeks. In the meantime, we have released
+ another version of Cyberdog, Cyberdog 1.1 Beta 3. This version fixes
+ several bugs that were reported to us during out public beta period. You
+ can check out our release notes to see what we fixed!
+END
+DONE
+
+
+$| = 1;
+
+print "1..", @tests/2, "\n";
+
+use Text::Wrap;
+
+$rerun = $ENV{'PERL_DL_NONLAZY'} ? 0 : 1;
+
+$tn = 1;
+while (@tests) {
+ my $in = shift(@tests);
+ my $out = shift(@tests);
+
+ $in =~ s/^TEST(\d+)?\n//;
+
+ my $back = fill(' ', ' ', $in);
+
+ if ($back eq $out) {
+ print "ok $tn\n";
+ } elsif ($rerun) {
+ my $oi = $in;
+ open(F,">#o") and do { print F $back; close(F) };
+ open(F,">#e") and do { print F $out; close(F) };
+ foreach ($in, $back, $out) {
+ s/\t/^I\t/gs;
+ s/\n/\$\n/gs;
+ }
+ print "------------ input ------------\n";
+ print $in;
+ print "\n------------ output -----------\n";
+ print $back;
+ print "\n------------ expected ---------\n";
+ print $out;
+ print "\n-------------------------------\n";
+ $Text::Wrap::debug = 1;
+ fill(' ', ' ', $oi);
+ exit(1);
+ } else {
+ print "not ok $tn\n";
+ }
+ $tn++;
+}
diff --git a/gnu/usr.bin/perl/t/lib/thread.t b/gnu/usr.bin/perl/t/lib/thread.t
new file mode 100644
index 00000000000..c127d0f28f2
--- /dev/null
+++ b/gnu/usr.bin/perl/t/lib/thread.t
@@ -0,0 +1,73 @@
+#!./perl
+
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+ require Config; import Config;
+ if (! $Config{'usethreads'}) {
+ print "1..0\n";
+ exit 0;
+ }
+
+ # XXX known trouble with global destruction
+ $ENV{PERL_DESTRUCT_LEVEL} = 0 unless $ENV{PERL_DESTRUCT_LEVEL} > 3;
+}
+$| = 1;
+print "1..14\n";
+use Thread;
+print "ok 1\n";
+
+sub content
+{
+ print shift;
+ return shift;
+}
+
+# create a thread passing args and immedaietly wait for it.
+my $t = new Thread \&content,("ok 2\n","ok 3\n", 1..1000);
+print $t->join;
+
+# check that lock works ...
+{lock $foo;
+ $t = new Thread sub { lock $foo; print "ok 5\n" };
+ print "ok 4\n";
+}
+$t->join;
+
+sub dorecurse
+{
+ my $val = shift;
+ my $ret;
+ print $val;
+ if (@_)
+ {
+ $ret = Thread->new(\&dorecurse, @_);
+ $ret->join;
+ }
+}
+
+$t = new Thread \&dorecurse, map { "ok $_\n" } 6..10;
+$t->join;
+
+# test that sleep lets other thread run
+$t = new Thread \&dorecurse,"ok 11\n";
+sleep 6;
+print "ok 12\n";
+$t->join;
+
+sub islocked
+{
+ use attrs 'locked';
+ my $val = shift;
+ my $ret;
+ print $val;
+ if (@_)
+ {
+ $ret = Thread->new(\&islocked, shift);
+ }
+ $ret;
+}
+
+$t = Thread->new(\&islocked, "ok 13\n", "ok 14\n");
+$t->join->join;
+
diff --git a/gnu/usr.bin/perl/t/lib/tie-push.t b/gnu/usr.bin/perl/t/lib/tie-push.t
new file mode 100644
index 00000000000..dd718deb145
--- /dev/null
+++ b/gnu/usr.bin/perl/t/lib/tie-push.t
@@ -0,0 +1,24 @@
+#!./perl
+
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+}
+
+{
+ package Basic;
+ use Tie::Array;
+ @ISA = qw(Tie::Array);
+
+ sub TIEARRAY { return bless [], shift }
+ sub FETCH { $_[0]->[$_[1]] }
+ sub STORE { $_[0]->[$_[1]] = $_[2] }
+ sub FETCHSIZE { scalar(@{$_[0]}) }
+ sub STORESIZE { $#{$_[0]} = $_[1]-1 }
+}
+
+tie @x,Basic;
+tie @get,Basic;
+tie @got,Basic;
+tie @tests,Basic;
+require "../t/op/push.t"
diff --git a/gnu/usr.bin/perl/t/lib/tie-stdarray.t b/gnu/usr.bin/perl/t/lib/tie-stdarray.t
new file mode 100644
index 00000000000..7ca4d76f119
--- /dev/null
+++ b/gnu/usr.bin/perl/t/lib/tie-stdarray.t
@@ -0,0 +1,12 @@
+#!./perl
+
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+}
+
+use Tie::Array;
+tie @foo,Tie::StdArray;
+tie @ary,Tie::StdArray;
+tie @bar,Tie::StdArray;
+require "../t/op/array.t"
diff --git a/gnu/usr.bin/perl/t/lib/tie-stdpush.t b/gnu/usr.bin/perl/t/lib/tie-stdpush.t
new file mode 100644
index 00000000000..34a69472f4c
--- /dev/null
+++ b/gnu/usr.bin/perl/t/lib/tie-stdpush.t
@@ -0,0 +1,10 @@
+#!./perl
+
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+}
+
+use Tie::Array;
+tie @x,Tie::StdArray;
+require "../t/op/push.t"
diff --git a/gnu/usr.bin/perl/t/op/avhv.t b/gnu/usr.bin/perl/t/op/avhv.t
new file mode 100644
index 00000000000..55cc992e63c
--- /dev/null
+++ b/gnu/usr.bin/perl/t/op/avhv.t
@@ -0,0 +1,110 @@
+#!./perl
+
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+}
+
+require Tie::Array;
+
+package Tie::BasicArray;
+@ISA = 'Tie::Array';
+sub TIEARRAY { bless [], $_[0] }
+sub STORE { $_[0]->[$_[1]] = $_[2] }
+sub FETCH { $_[0]->[$_[1]] }
+sub FETCHSIZE { scalar(@{$_[0]})}
+sub STORESIZE { $#{$_[0]} = $_[1]+1 }
+
+package main;
+
+print "1..12\n";
+
+$sch = {
+ 'abc' => 1,
+ 'def' => 2,
+ 'jkl' => 3,
+};
+
+# basic normal array
+$a = [];
+$a->[0] = $sch;
+
+$a->{'abc'} = 'ABC';
+$a->{'def'} = 'DEF';
+$a->{'jkl'} = 'JKL';
+
+@keys = keys %$a;
+@values = values %$a;
+
+if ($#keys == 2 && $#values == 2) {print "ok 1\n";} else {print "not ok 1\n";}
+
+$i = 0; # stop -w complaints
+
+while (($key,$value) = each %$a) {
+ if ($key eq $keys[$i] && $value eq $values[$i] && $key eq lc($value)) {
+ $key =~ y/a-z/A-Z/;
+ $i++ if $key eq $value;
+ }
+}
+
+if ($i == 3) {print "ok 2\n";} else {print "not ok 2\n";}
+
+# quick check with tied array
+tie @fake, 'Tie::StdArray';
+$a = \@fake;
+$a->[0] = $sch;
+
+$a->{'abc'} = 'ABC';
+if ($a->{'abc'} eq 'ABC') {print "ok 3\n";} else {print "not ok 3\n";}
+
+# quick check with tied array
+tie @fake, 'Tie::BasicArray';
+$a = \@fake;
+$a->[0] = $sch;
+
+$a->{'abc'} = 'ABC';
+if ($a->{'abc'} eq 'ABC') {print "ok 4\n";} else {print "not ok 4\n";}
+
+# quick check with tied array & tied hash
+require Tie::Hash;
+tie %fake, Tie::StdHash;
+%fake = %$sch;
+$a->[0] = \%fake;
+
+$a->{'abc'} = 'ABC';
+if ($a->{'abc'} eq 'ABC') {print "ok 5\n";} else {print "not ok 5\n";}
+
+# hash slice
+my $slice = join('', 'x',@$a{'abc','def'},'x');
+print "not " if $slice ne 'xABCx';
+print "ok 6\n";
+
+# evaluation in scalar context
+my $avhv = [{}];
+print "not " if %$avhv;
+print "ok 7\n";
+
+push @$avhv, "a";
+print "not " if %$avhv;
+print "ok 8\n";
+
+$avhv = [];
+eval { $a = %$avhv };
+print "not " unless $@ and $@ =~ /^Can't coerce array into hash/;
+print "ok 9\n";
+
+$avhv = [{foo=>1, bar=>2}];
+print "not " unless %$avhv =~ m,^\d+/\d+,;
+print "ok 10\n";
+
+# check if defelem magic works
+sub f {
+ print "not " unless $_[0] eq 'a';
+ $_[0] = 'b';
+ print "ok 11\n";
+}
+$a = [{key => 1}, 'a'];
+f($a->{key});
+print "not " unless $a->[1] eq 'b';
+print "ok 12\n";
+
diff --git a/gnu/usr.bin/perl/t/op/context.t b/gnu/usr.bin/perl/t/op/context.t
new file mode 100644
index 00000000000..4625441efa7
--- /dev/null
+++ b/gnu/usr.bin/perl/t/op/context.t
@@ -0,0 +1,18 @@
+#!./perl
+
+$n=0;
+
+print "1..3\n";
+
+sub foo {
+ $a='abcd';
+
+ $a=~/(.)/g;
+
+ $1 eq 'a' or print 'not ';
+ print "ok ",++$n,"\n";
+}
+
+$a=foo;
+@a=foo;
+foo;
diff --git a/gnu/usr.bin/perl/t/op/defins.t b/gnu/usr.bin/perl/t/op/defins.t
new file mode 100644
index 00000000000..33c74ea28e8
--- /dev/null
+++ b/gnu/usr.bin/perl/t/op/defins.t
@@ -0,0 +1,147 @@
+#!./perl -w
+
+#
+# test auto defined() test insertion
+#
+
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+ $SIG{__WARN__} = sub { $warns++; warn $_[0] };
+ print "1..14\n";
+}
+
+$wanted_filename = $^O eq 'VMS' ? '0.' : '0';
+
+print "not " if $warns;
+print "ok 1\n";
+
+open(FILE,">./0");
+print FILE "1\n";
+print FILE "0";
+close(FILE);
+
+open(FILE,"<./0");
+my $seen = 0;
+my $dummy;
+while (my $name = <FILE>)
+ {
+ $seen++ if $name eq '0';
+ }
+print "not " unless $seen;
+print "ok 2\n";
+
+seek(FILE,0,0);
+$seen = 0;
+my $line = '';
+do
+ {
+ $seen++ if $line eq '0';
+ } while ($line = <FILE>);
+
+print "not " unless $seen;
+print "ok 3\n";
+
+
+seek(FILE,0,0);
+$seen = 0;
+while (($seen ? $dummy : $name) = <FILE>)
+ {
+ $seen++ if $name eq '0';
+ }
+print "not " unless $seen;
+print "ok 4\n";
+
+seek(FILE,0,0);
+$seen = 0;
+my %where;
+while ($where{$seen} = <FILE>)
+ {
+ $seen++ if $where{$seen} eq '0';
+ }
+print "not " unless $seen;
+print "ok 5\n";
+close FILE;
+
+opendir(DIR,'.');
+$seen = 0;
+while (my $name = readdir(DIR))
+ {
+ $seen++ if $name eq $wanted_filename;
+ }
+print "not " unless $seen;
+print "ok 6\n";
+
+rewinddir(DIR);
+$seen = 0;
+$dummy = '';
+while (($seen ? $dummy : $name) = readdir(DIR))
+ {
+ $seen++ if $name eq $wanted_filename;
+ }
+print "not " unless $seen;
+print "ok 7\n";
+
+rewinddir(DIR);
+$seen = 0;
+while ($where{$seen} = readdir(DIR))
+ {
+ $seen++ if $where{$seen} eq $wanted_filename;
+ }
+print "not " unless $seen;
+print "ok 8\n";
+
+$seen = 0;
+while (my $name = glob('*'))
+ {
+ $seen++ if $name eq $wanted_filename;
+ }
+print "not " unless $seen;
+print "ok 9\n";
+
+$seen = 0;
+$dummy = '';
+while (($seen ? $dummy : $name) = glob('*'))
+ {
+ $seen++ if $name eq $wanted_filename;
+ }
+print "not " unless $seen;
+print "ok 10\n";
+
+$seen = 0;
+while ($where{$seen} = glob('*'))
+ {
+ $seen++ if $where{$seen} eq $wanted_filename;
+ }
+print "not " unless $seen;
+print "ok 11\n";
+
+unlink("./0");
+
+my %hash = (0 => 1, 1 => 2);
+
+$seen = 0;
+while (my $name = each %hash)
+ {
+ $seen++ if $name eq '0';
+ }
+print "not " unless $seen;
+print "ok 12\n";
+
+$seen = 0;
+$dummy = '';
+while (($seen ? $dummy : $name) = each %hash)
+ {
+ $seen++ if $name eq '0';
+ }
+print "not " unless $seen;
+print "ok 13\n";
+
+$seen = 0;
+while ($where{$seen} = each %hash)
+ {
+ $seen++ if $where{$seen} eq '0';
+ }
+print "not " unless $seen;
+print "ok 14\n";
+
diff --git a/gnu/usr.bin/perl/t/op/die.t b/gnu/usr.bin/perl/t/op/die.t
new file mode 100644
index 00000000000..d473ed6b7f7
--- /dev/null
+++ b/gnu/usr.bin/perl/t/op/die.t
@@ -0,0 +1,43 @@
+#!./perl
+
+print "1..10\n";
+
+$SIG{__DIE__} = sub { print ref($_[0]) ? ("ok ",$_[0]->[0]++,"\n") : @_ } ;
+
+$err = "ok 1\n";
+eval {
+ die $err;
+};
+
+print "not " unless $@ eq $err;
+print "ok 2\n";
+
+$x = [3];
+eval { die $x; };
+
+print "not " unless $x->[0] == 4;
+print "ok 4\n";
+
+eval {
+ eval {
+ die [ 5 ];
+ };
+ die if $@;
+};
+
+eval {
+ eval {
+ die bless [ 7 ], "Error";
+ };
+ die if $@;
+};
+
+print "not " unless ref($@) eq "Out";
+print "ok 10\n";
+
+package Error;
+
+sub PROPAGATE {
+ print "ok ",$_[0]->[0]++,"\n";
+ bless [$_[0]->[0]], "Out";
+}
diff --git a/gnu/usr.bin/perl/t/op/die_exit.t b/gnu/usr.bin/perl/t/op/die_exit.t
new file mode 100644
index 00000000000..26b477a8c94
--- /dev/null
+++ b/gnu/usr.bin/perl/t/op/die_exit.t
@@ -0,0 +1,53 @@
+#!./perl
+
+#
+# Verify that C<die> return the return code
+# -- Robin Barker <rmb@cise.npl.co.uk>
+#
+
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = '../lib' if -e '../lib';
+}
+my $perl = -e '../perl' ? '../perl' : -e './perl' ? './perl' : 'perl';
+
+use strict;
+
+my %tests = (
+ 1 => [ 0, 0],
+ 2 => [ 0, 1],
+ 3 => [ 0, 127],
+ 4 => [ 0, 128],
+ 5 => [ 0, 255],
+ 6 => [ 0, 256],
+ 7 => [ 0, 512],
+ 8 => [ 1, 0],
+ 9 => [ 1, 1],
+ 10 => [ 1, 256],
+ 11 => [ 128, 0],
+ 12 => [ 128, 1],
+ 13 => [ 128, 256],
+ 14 => [ 255, 0],
+ 15 => [ 255, 1],
+ 16 => [ 255, 256],
+ # see if implicit close preserves $?
+ 17 => [ 0, 512, '{ local *F; open F, q[TEST]; close F } die;'],
+);
+
+my $max = keys %tests;
+
+print "1..$max\n";
+
+foreach my $test (1 .. $max) {
+ my($bang, $query, $code) = @{$tests{$test}};
+ $code ||= 'die;';
+ my $exit =
+ ($^O eq 'MSWin32'
+ ? system qq($perl -e "\$! = $bang; \$? = $query; $code" 2> nul)
+ : system qq($perl -e '\$! = $bang; \$? = $query; $code' 2> /dev/null));
+
+ printf "# 0x%04x 0x%04x 0x%04x\n", $exit, $bang, $query;
+ print "not " unless $exit == (($bang || ($query >> 8) || 255) << 8);
+ print "ok $test\n";
+}
+
diff --git a/gnu/usr.bin/perl/t/op/goto_xs.t b/gnu/usr.bin/perl/t/op/goto_xs.t
new file mode 100644
index 00000000000..a35575eb26a
--- /dev/null
+++ b/gnu/usr.bin/perl/t/op/goto_xs.t
@@ -0,0 +1,98 @@
+#!./perl
+# tests for "goto &sub"-ing into XSUBs
+
+# $RCSfile$$Revision$$Date$
+
+# Note: This only tests things that should *work*. At some point, it may
+# be worth while to write some failure tests for things that should
+# *break* (such as calls with wrong number of args). For now, I'm
+# guessing that if all of these work correctly, the bad ones will
+# break correctly as well.
+
+chdir 't' if -d 't';
+@INC = "../lib";
+$ENV{PERL5LIB} = "../lib";
+
+# turn warnings into fatal errors
+$SIG{__WARN__} = sub { die "WARNING: @_" } ;
+
+BEGIN { $| = 1; }
+eval 'require Fcntl'
+ or do { print "1..0\n# Fcntl unavailable, can't test XS goto.\n"; exit 0 };
+
+print "1..10\n";
+
+# We don't know what symbols are defined in platform X's system headers.
+# We don't even want to guess, because some platform out there will
+# likely do the unthinkable. However, Fcntl::constant("LOCK_SH",0)
+# should always return a value, even on platforms which don't define the
+# cpp symbol; Fcntl.xs says:
+# /* We support flock() on systems which don't have it, so
+# always supply the constants. */
+# If this ceases to be the case, we're in trouble. =)
+$VALID = 'LOCK_SH';
+
+### First, we check whether Fcntl::constant returns sane answers.
+# Fcntl::constant("LOCK_SH",0) should always succeed.
+
+$value = Fcntl::constant($VALID,0);
+print((!defined $value)
+ ? "not ok 1\n# Sanity check broke, remaining tests will fail.\n"
+ : "ok 1\n");
+
+### OK, we're ready to do real tests.
+
+# test "goto &function_constant"
+sub goto_const { goto &Fcntl::constant; }
+
+$ret = goto_const($VALID,0);
+print(($ret == $value) ? "ok 2\n" : "not ok 2\n# ($ret != $value)\n");
+
+# test "goto &$function_package_and_name"
+$FNAME1 = 'Fcntl::constant';
+sub goto_name1 { goto &$FNAME1; }
+
+$ret = goto_name1($VALID,0);
+print(($ret == $value) ? "ok 3\n" : "not ok 3\n# ($ret != $value)\n");
+
+# test "goto &$function_package_and_name" again, with dirtier stack
+$ret = goto_name1($VALID,0);
+print(($ret == $value) ? "ok 4\n" : "not ok 4\n# ($ret != $value)\n");
+$ret = goto_name1($VALID,0);
+print(($ret == $value) ? "ok 5\n" : "not ok 5\n# ($ret != $value)\n");
+
+# test "goto &$function_name" from local package
+package Fcntl;
+$FNAME2 = 'constant';
+sub goto_name2 { goto &$FNAME2; }
+package main;
+
+$ret = Fcntl::goto_name2($VALID,0);
+print(($ret == $value) ? "ok 6\n" : "not ok 6\n# ($ret != $value)\n");
+
+# test "goto &$function_ref"
+$FREF = \&Fcntl::constant;
+sub goto_ref { goto &$FREF; }
+
+$ret = goto_ref($VALID,0);
+print(($ret == $value) ? "ok 7\n" : "not ok 7\n# ($ret != $value)\n");
+
+### tests where the args are not on stack but in GvAV(defgv) (ie, @_)
+
+# test "goto &function_constant" from a sub called without arglist
+sub call_goto_const { &goto_const; }
+
+$ret = call_goto_const($VALID,0);
+print(($ret == $value) ? "ok 8\n" : "not ok 8\n# ($ret != $value)\n");
+
+# test "goto &$function_package_and_name" from a sub called without arglist
+sub call_goto_name1 { &goto_name1; }
+
+$ret = call_goto_name1($VALID,0);
+print(($ret == $value) ? "ok 9\n" : "not ok 9\n# ($ret != $value)\n");
+
+# test "goto &$function_ref" from a sub called without arglist
+sub call_goto_ref { &goto_ref; }
+
+$ret = call_goto_ref($VALID,0);
+print(($ret == $value) ? "ok 10\n" : "not ok 10\n# ($ret != $value)\n");
diff --git a/gnu/usr.bin/perl/t/op/grep.t b/gnu/usr.bin/perl/t/op/grep.t
new file mode 100644
index 00000000000..45d0e25a27c
--- /dev/null
+++ b/gnu/usr.bin/perl/t/op/grep.t
@@ -0,0 +1,31 @@
+#!./perl
+
+#
+# grep() and map() tests
+#
+
+print "1..3\n";
+
+$test = 1;
+
+sub ok {
+ my ($got,$expect) = @_;
+ print "# expected [$expect], got [$got]\nnot " if $got ne $expect;
+ print "ok $test\n";
+}
+
+{
+ my @lol = ([qw(a b c)], [], [qw(1 2 3)]);
+ my @mapped = map {scalar @$_} @lol;
+ ok "@mapped", "3 0 3";
+ $test++;
+
+ my @grepped = grep {scalar @$_} @lol;
+ ok "@grepped", "$lol[0] $lol[2]";
+ $test++;
+
+ @grepped = grep { $_ } @mapped;
+ ok "@grepped", "3 3";
+ $test++;
+}
+
diff --git a/gnu/usr.bin/perl/t/op/hashwarn.t b/gnu/usr.bin/perl/t/op/hashwarn.t
new file mode 100644
index 00000000000..6343a2a8d57
--- /dev/null
+++ b/gnu/usr.bin/perl/t/op/hashwarn.t
@@ -0,0 +1,71 @@
+#!./perl
+
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+}
+
+use strict;
+
+use vars qw{ @warnings };
+
+BEGIN {
+ $^W |= 1; # Insist upon warnings
+ # ...and save 'em as we go
+ $SIG{'__WARN__'} = sub { push @warnings, @_ };
+ $| = 1;
+ print "1..7\n";
+}
+
+END { print "not ok\n# Uncaught warnings:\n@warnings\n" if @warnings }
+
+sub test ($$;$) {
+ my($num, $bool, $diag) = @_;
+ if ($bool) {
+ print "ok $num\n";
+ return;
+ }
+ print "not ok $num\n";
+ return unless defined $diag;
+ $diag =~ s/\Z\n?/\n/; # unchomp
+ print map "# $num : $_", split m/^/m, $diag;
+}
+
+sub test_warning ($$$) {
+ my($num, $got, $expected) = @_;
+ my($pattern, $ok);
+ if (($pattern) = ($expected =~ m#^/(.+)/$#s) or
+ (undef, $pattern) = ($expected =~ m#^m([^\w\s])(.+)\1$#s)) {
+ # it's a regexp
+ $ok = ($got =~ /$pattern/);
+ test $num, $ok, "Expected pattern /$pattern/, got '$got'\n";
+ } else {
+ $ok = ($got eq $expected);
+ test $num, $ok, "Expected string '$expected', got '$got'\n";
+ }
+# print "# $num: $got\n";
+}
+
+my $odd_msg = '/^Odd number of elements in hash/';
+my $ref_msg = '/^Reference found where even-sized list expected/';
+
+{
+ my %hash = (1..3);
+ test_warning 1, shift @warnings, $odd_msg;
+
+ %hash = 1;
+ test_warning 2, shift @warnings, $odd_msg;
+
+ %hash = { 1..3 };
+ test_warning 3, shift @warnings, $odd_msg;
+ test_warning 4, shift @warnings, $ref_msg;
+
+ %hash = [ 1..3 ];
+ test_warning 5, shift @warnings, $ref_msg;
+
+ %hash = sub { print "ok" };
+ test_warning 6, shift @warnings, $odd_msg;
+
+ $_ = { 1..10 };
+ test 7, ! @warnings, "Unexpected warning";
+}
diff --git a/gnu/usr.bin/perl/t/op/nothread.t b/gnu/usr.bin/perl/t/op/nothread.t
new file mode 100644
index 00000000000..a0d444d90b3
--- /dev/null
+++ b/gnu/usr.bin/perl/t/op/nothread.t
@@ -0,0 +1,35 @@
+#!./perl
+
+# NOTE: Please don't add tests to this file unless they *need* to be run in
+# separate executable and can't simply use eval.
+
+BEGIN
+ {
+ chdir 't' if -d 't';
+ @INC = "../lib";
+ require Config;
+ import Config;
+ if ($Config{'usethreads'})
+ {
+ print "1..0\n";
+ exit 0;
+ }
+ }
+
+
+$|=1;
+
+print "1..9\n";
+$t = 1;
+sub foo { local(@_) = ('p', 'q', 'r'); }
+sub bar { unshift @_, 'D'; @_ }
+sub baz { push @_, 'E'; return @_ }
+for (1..3)
+ {
+ print "not " unless join('',foo('a', 'b', 'c')) eq 'pqr';
+ print "ok ",$t++,"\n";
+ print "not" unless join('',bar('d')) eq 'Dd';
+ print "ok ",$t++,"\n";
+ print "not" unless join('',baz('e')) eq 'eE';
+ print "ok ",$t++,"\n";
+ }
diff --git a/gnu/usr.bin/perl/t/op/pos.t b/gnu/usr.bin/perl/t/op/pos.t
new file mode 100644
index 00000000000..46811b7bbc7
--- /dev/null
+++ b/gnu/usr.bin/perl/t/op/pos.t
@@ -0,0 +1,16 @@
+#!./perl
+
+print "1..3\n";
+
+$x='banana';
+$x=~/.a/g;
+if (pos($x)==2) {print "ok 1\n"} else {print "not ok 1\n";}
+
+$x=~/.z/gc;
+if (pos($x)==2) {print "ok 2\n"} else {print "not ok 2\n";}
+
+sub f { my $p=$_[0]; return $p }
+
+$x=~/.a/g;
+if (f(pos($x))==4) {print "ok 3\n"} else {print "not ok 3\n";}
+
diff --git a/gnu/usr.bin/perl/t/op/regexp_noamp.t b/gnu/usr.bin/perl/t/op/regexp_noamp.t
new file mode 100644
index 00000000000..03c19e95edc
--- /dev/null
+++ b/gnu/usr.bin/perl/t/op/regexp_noamp.t
@@ -0,0 +1,10 @@
+#!./perl
+
+$skip_amp = 1;
+for $file ('op/regexp.t', 't/op/regexp.t') {
+ if (-r $file) {
+ do $file;
+ exit;
+ }
+}
+die "Cannot find op/regexp.t or t/op/regexp.t\n";
diff --git a/gnu/usr.bin/perl/t/op/splice.t b/gnu/usr.bin/perl/t/op/splice.t
new file mode 100644
index 00000000000..06e350988d0
--- /dev/null
+++ b/gnu/usr.bin/perl/t/op/splice.t
@@ -0,0 +1,34 @@
+#!./perl
+
+print "1..9\n";
+
+@a = (1..10);
+
+sub j { join(":",@_) }
+
+print "not " unless j(splice(@a,@a,0,11,12)) eq "" && j(@a) eq j(1..12);
+print "ok 1\n";
+
+print "not " unless j(splice(@a,-1)) eq "12" && j(@a) eq j(1..11);
+print "ok 2\n";
+
+print "not " unless j(splice(@a,0,1)) eq "1" && j(@a) eq j(2..11);
+print "ok 3\n";
+
+print "not " unless j(splice(@a,0,0,0,1)) eq "" && j(@a) eq j(0..11);
+print "ok 4\n";
+
+print "not " unless j(splice(@a,5,1,5)) eq "5" && j(@a) eq j(0..11);
+print "ok 5\n";
+
+print "not " unless j(splice(@a, 20, 0, 12, 13)) eq "" && j(@a) eq j(0..13);
+print "ok 6\n";
+
+print "not " unless j(splice(@a, -@a, @a, 1, 2, 3)) eq j(0..13) && j(@a) eq j(1..3);
+print "ok 7\n";
+
+print "not " unless j(splice(@a, 1, -1, 7, 7)) eq "2" && j(@a) eq j(1,7,7,3);
+print "ok 8\n";
+
+print "not " unless j(splice(@a,-3,-2,2)) eq j(7) && j(@a) eq j(1,2,7,3);
+print "ok 9\n";
diff --git a/gnu/usr.bin/perl/t/op/tiearray.t b/gnu/usr.bin/perl/t/op/tiearray.t
new file mode 100644
index 00000000000..8e78b2f76b0
--- /dev/null
+++ b/gnu/usr.bin/perl/t/op/tiearray.t
@@ -0,0 +1,210 @@
+#!./perl
+
+
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+}
+
+my %seen;
+
+package Implement;
+
+sub TIEARRAY
+{
+ $seen{'TIEARRAY'}++;
+ my ($class,@val) = @_;
+ return bless \@val,$class;
+}
+
+sub STORESIZE
+{
+ $seen{'STORESIZE'}++;
+ my ($ob,$sz) = @_;
+ return $#{$ob} = $sz-1;
+}
+
+sub EXTEND
+{
+ $seen{'EXTEND'}++;
+ my ($ob,$sz) = @_;
+ return @$ob = $sz;
+}
+
+sub FETCHSIZE
+{
+ $seen{'FETCHSIZE'}++;
+ return scalar(@{$_[0]});
+}
+
+sub FETCH
+{
+ $seen{'FETCH'}++;
+ my ($ob,$id) = @_;
+ return $ob->[$id];
+}
+
+sub STORE
+{
+ $seen{'STORE'}++;
+ my ($ob,$id,$val) = @_;
+ $ob->[$id] = $val;
+}
+
+sub UNSHIFT
+{
+ $seen{'UNSHIFT'}++;
+ my $ob = shift;
+ unshift(@$ob,@_);
+}
+
+sub PUSH
+{
+ $seen{'PUSH'}++;
+ my $ob = shift;;
+ push(@$ob,@_);
+}
+
+sub CLEAR
+{
+ $seen{'CLEAR'}++;
+ @{$_[0]} = ();
+}
+
+sub DESTROY
+{
+ $seen{'DESTROY'}++;
+}
+
+sub POP
+{
+ $seen{'POP'}++;
+ my ($ob) = @_;
+ return pop(@$ob);
+}
+
+sub SHIFT
+{
+ $seen{'SHIFT'}++;
+ my ($ob) = @_;
+ return shift(@$ob);
+}
+
+sub SPLICE
+{
+ $seen{'SPLICE'}++;
+ my $ob = shift;
+ my $off = @_ ? shift : 0;
+ my $len = @_ ? shift : @$ob-1;
+ return splice(@$ob,$off,$len,@_);
+}
+
+package main;
+
+print "1..31\n";
+my $test = 1;
+
+{my @ary;
+
+{ my $ob = tie @ary,'Implement',3,2,1;
+ print "not " unless $ob;
+ print "ok ", $test++,"\n";
+ print "not " unless tied(@ary) == $ob;
+ print "ok ", $test++,"\n";
+}
+
+
+print "not " unless @ary == 3;
+print "ok ", $test++,"\n";
+
+print "not " unless $#ary == 2;
+print "ok ", $test++,"\n";
+
+print "not " unless join(':',@ary) eq '3:2:1';
+print "ok ", $test++,"\n";
+
+print "not " unless $seen{'FETCH'} >= 3;
+print "ok ", $test++,"\n";
+
+@ary = (1,2,3);
+
+print "not " unless $seen{'STORE'} >= 3;
+print "ok ", $test++,"\n";
+print "not " unless join(':',@ary) eq '1:2:3';
+print "ok ", $test++,"\n";
+
+{my @thing = @ary;
+print "not " unless join(':',@thing) eq '1:2:3';
+print "ok ", $test++,"\n";
+
+tie @thing,'Implement';
+@thing = @ary;
+print "not " unless join(':',@thing) eq '1:2:3';
+print "ok ", $test++,"\n";
+}
+
+print "not " unless pop(@ary) == 3;
+print "ok ", $test++,"\n";
+print "not " unless $seen{'POP'} == 1;
+print "ok ", $test++,"\n";
+print "not " unless join(':',@ary) eq '1:2';
+print "ok ", $test++,"\n";
+
+push(@ary,4);
+print "not " unless $seen{'PUSH'} == 1;
+print "ok ", $test++,"\n";
+print "not " unless join(':',@ary) eq '1:2:4';
+print "ok ", $test++,"\n";
+
+my @x = splice(@ary,1,1,7);
+
+
+print "not " unless $seen{'SPLICE'} == 1;
+print "ok ", $test++,"\n";
+
+print "not " unless @x == 1;
+print "ok ", $test++,"\n";
+print "not " unless $x[0] == 2;
+print "ok ", $test++,"\n";
+print "not " unless join(':',@ary) eq '1:7:4';
+print "ok ", $test++,"\n";
+
+print "not " unless shift(@ary) == 1;
+print "ok ", $test++,"\n";
+print "not " unless $seen{'SHIFT'} == 1;
+print "ok ", $test++,"\n";
+print "not " unless join(':',@ary) eq '7:4';
+print "ok ", $test++,"\n";
+
+my $n = unshift(@ary,5,6);
+print "not " unless $seen{'UNSHIFT'} == 1;
+print "ok ", $test++,"\n";
+print "not " unless $n == 4;
+print "ok ", $test++,"\n";
+print "not " unless join(':',@ary) eq '5:6:7:4';
+print "ok ", $test++,"\n";
+
+@ary = split(/:/,'1:2:3');
+print "not " unless join(':',@ary) eq '1:2:3';
+print "ok ", $test++,"\n";
+
+my $t = 0;
+foreach $n (@ary)
+ {
+ print "not " unless $n == ++$t;
+ print "ok ", $test++,"\n";
+ }
+
+@ary = qw(3 2 1);
+print "not " unless join(':',@ary) eq '3:2:1';
+print "ok ", $test++,"\n";
+
+untie @ary;
+
+}
+
+print "not " unless $seen{'DESTROY'} == 2;
+print "ok ", $test++,"\n";
+
+
+
diff --git a/gnu/usr.bin/perl/t/op/tiehandle.t b/gnu/usr.bin/perl/t/op/tiehandle.t
new file mode 100644
index 00000000000..d7e6a78bafa
--- /dev/null
+++ b/gnu/usr.bin/perl/t/op/tiehandle.t
@@ -0,0 +1,151 @@
+#!./perl
+
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+}
+
+my @expect;
+my $data = "";
+my @data = ();
+my $test = 1;
+
+sub ok { print "not " unless shift; print "ok ",$test++,"\n"; }
+
+package Implement;
+
+BEGIN { *ok = \*main::ok }
+
+sub compare {
+ return unless @expect;
+ return ok(0) unless(@_ == @expect);
+
+ my $i;
+ for($i = 0 ; $i < @_ ; $i++) {
+ next if $_[$i] eq $expect[$i];
+ return ok(0);
+ }
+
+ ok(1);
+}
+
+sub TIEHANDLE {
+ compare(TIEHANDLE => @_);
+ my ($class,@val) = @_;
+ return bless \@val,$class;
+}
+
+sub PRINT {
+ compare(PRINT => @_);
+ 1;
+}
+
+sub PRINTF {
+ compare(PRINTF => @_);
+ 2;
+}
+
+sub READLINE {
+ compare(READLINE => @_);
+ wantarray ? @data : shift @data;
+}
+
+sub GETC {
+ compare(GETC => @_);
+ substr($data,0,1);
+}
+
+sub READ {
+ compare(READ => @_);
+ substr($_[1],$_[3] || 0) = substr($data,0,$_[2]);
+ 3;
+}
+
+sub WRITE {
+ compare(WRITE => @_);
+ $data = substr($_[1],$_[3] || 0, $_[2]);
+ length($data);
+}
+
+sub CLOSE {
+ compare(CLOSE => @_);
+
+ 5;
+}
+
+package main;
+
+use Symbol;
+
+print "1..29\n";
+
+my $fh = gensym;
+
+@expect = (TIEHANDLE => 'Implement');
+my $ob = tie *$fh,'Implement';
+ok(ref($ob) eq 'Implement');
+ok(tied(*$fh) == $ob);
+
+@expect = (PRINT => $ob,"some","text");
+$r = print $fh @expect[2,3];
+ok($r == 1);
+
+@expect = (PRINTF => $ob,"%s","text");
+$r = printf $fh @expect[2,3];
+ok($r == 2);
+
+$text = (@data = ("the line\n"))[0];
+@expect = (READLINE => $ob);
+$ln = <$fh>;
+ok($ln eq $text);
+
+@expect = ();
+@in = @data = qw(a line at a time);
+@line = <$fh>;
+@expect = @in;
+Implement::compare(@line);
+
+@expect = (GETC => $ob);
+$data = "abc";
+$ch = getc $fh;
+ok($ch eq "a");
+
+$buf = "xyz";
+@expect = (READ => $ob, $buf, 3);
+$data = "abc";
+$r = read $fh,$buf,3;
+ok($r == 3);
+ok($buf eq "abc");
+
+
+$buf = "xyzasd";
+@expect = (READ => $ob, $buf, 3,3);
+$data = "abc";
+$r = sysread $fh,$buf,3,3;
+ok($r == 3);
+ok($buf eq "xyzabc");
+
+$buf = "qwerty";
+@expect = (WRITE => $ob, $buf, 4,1);
+$data = "";
+$r = syswrite $fh,$buf,4,1;
+ok($r == 4);
+ok($data eq "wert");
+
+$buf = "qwerty";
+@expect = (WRITE => $ob, $buf, 4);
+$data = "";
+$r = syswrite $fh,$buf,4;
+ok($r == 4);
+ok($data eq "qwer");
+
+$buf = "qwerty";
+@expect = (WRITE => $ob, $buf, 6);
+$data = "";
+$r = syswrite $fh,$buf;
+ok($r == 6);
+ok($data eq "qwerty");
+
+@expect = (CLOSE => $ob);
+$r = close $fh;
+ok($r == 5);
diff --git a/gnu/usr.bin/perl/t/op/tr.t b/gnu/usr.bin/perl/t/op/tr.t
new file mode 100644
index 00000000000..3503c3cf12f
--- /dev/null
+++ b/gnu/usr.bin/perl/t/op/tr.t
@@ -0,0 +1,33 @@
+# tr.t
+
+print "1..4\n";
+
+$_ = "abcdefghijklmnopqrstuvwxyz";
+
+tr/a-z/A-Z/;
+
+print "not " unless $_ eq "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
+print "ok 1\n";
+
+tr/A-Z/a-z/;
+
+print "not " unless $_ eq "abcdefghijklmnopqrstuvwxyz";
+print "ok 2\n";
+
+tr/b-y/B-Y/;
+
+print "not " unless $_ eq "aBCDEFGHIJKLMNOPQRSTUVWXYz";
+print "ok 3\n";
+
+# In EBCDIC 'I' is \xc9 and 'J' is \0xd1, 'i' is \x89 and 'j' is \x91.
+# Yes, discontinuities. Regardless, the \xca in the below should stay
+# untouched (and not became \x8a).
+
+$_ = "I\xcaJ";
+
+tr/I-J/i-j/;
+
+print "not " unless $_ eq "i\xcaj";
+print "ok 4\n";
+
+#
diff --git a/gnu/usr.bin/perl/t/op/wantarray.t b/gnu/usr.bin/perl/t/op/wantarray.t
new file mode 100644
index 00000000000..0a47b6d3ba0
--- /dev/null
+++ b/gnu/usr.bin/perl/t/op/wantarray.t
@@ -0,0 +1,16 @@
+#!./perl
+
+print "1..3\n";
+sub context {
+ my ( $cona, $testnum ) = @_;
+ my $conb = (defined wantarray) ? ( wantarray ? 'A' : 'S' ) : 'V';
+ unless ( $cona eq $conb ) {
+ print "# Context $conb should be $cona\nnot ";
+ }
+ print "ok $testnum\n";
+}
+
+context('V',1);
+$a = context('S',2);
+@a = context('A',3);
+1;
diff --git a/gnu/usr.bin/perl/thrdvar.h b/gnu/usr.bin/perl/thrdvar.h
new file mode 100644
index 00000000000..4ca3ccbd50a
--- /dev/null
+++ b/gnu/usr.bin/perl/thrdvar.h
@@ -0,0 +1,192 @@
+/***********************************************/
+/* Global only to current thread */
+/***********************************************/
+
+/* Don't forget to re-run embed.pl to propagate changes! */
+
+/* The 'T' prefix is only needed for vars that need appropriate #defines
+ * generated when built with or without USE_THREADS. It is also used
+ * to generate the appropriate export list for win32.
+ *
+ * When building without USE_THREADS, these variables will be truly global.
+ * When building without USE_THREADS but with MULTIPLICITY, these variables
+ * will be global per-interpreter.
+ *
+ * Avoid build-specific #ifdefs here, like DEBUGGING. That way,
+ * we can keep binary compatibility of the curinterp structure */
+
+/* Important ones in the first cache line (if alignment is done right) */
+
+PERLVAR(Tstack_sp, SV **) /* top of the stack */
+#ifdef OP_IN_REGISTER
+PERLVAR(Topsave, OP *)
+#else
+PERLVAR(Top, OP *) /* currently executing op */
+#endif
+PERLVAR(Tcurpad, SV **) /* active pad (lexicals+tmps) */
+
+PERLVAR(Tstack_base, SV **)
+PERLVAR(Tstack_max, SV **)
+
+PERLVAR(Tscopestack, I32 *) /* scopes we've ENTERed */
+PERLVAR(Tscopestack_ix, I32)
+PERLVAR(Tscopestack_max,I32)
+
+PERLVAR(Tsavestack, ANY *) /* items that need to be restored
+ when LEAVEing scopes we've ENTERed */
+PERLVAR(Tsavestack_ix, I32)
+PERLVAR(Tsavestack_max, I32)
+
+PERLVAR(Ttmps_stack, SV **) /* mortals we've made */
+PERLVARI(Ttmps_ix, I32, -1)
+PERLVARI(Ttmps_floor, I32, -1)
+PERLVAR(Ttmps_max, I32)
+
+PERLVAR(Tmarkstack, I32 *) /* stack_sp locations we're remembering */
+PERLVAR(Tmarkstack_ptr, I32 *)
+PERLVAR(Tmarkstack_max, I32 *)
+
+PERLVAR(Tretstack, OP **) /* OPs we have postponed executing */
+PERLVAR(Tretstack_ix, I32)
+PERLVAR(Tretstack_max, I32)
+
+PERLVAR(TSv, SV *) /* used to hold temporary values */
+PERLVAR(TXpv, XPV *) /* used to hold temporary values */
+
+/* stat stuff */
+PERLVAR(Tstatbuf, Stat_t)
+PERLVAR(Tstatcache, Stat_t) /* _ */
+PERLVAR(Tstatgv, GV *)
+PERLVARI(Tstatname, SV *, Nullsv)
+
+#ifdef HAS_TIMES
+PERLVAR(Ttimesbuf, struct tms)
+#endif
+
+/* Fields used by magic variables such as $@, $/ and so on */
+PERLVAR(Ttainted, bool) /* using variables controlled by $< */
+PERLVAR(Tcurpm, PMOP *) /* what to do \ interps in REs from */
+PERLVAR(Tnrs, SV *)
+PERLVAR(Trs, SV *) /* input record separator $/ */
+PERLVAR(Tlast_in_gv, GV *) /* GV used in last <FH> */
+PERLVAR(Tofs, char *) /* output field separator $, */
+PERLVAR(Tofslen, STRLEN)
+PERLVAR(Tdefoutgv, GV *) /* default FH for output */
+PERLVARI(Tchopset, char *, " \n-") /* $: */
+PERLVAR(Tformtarget, SV *)
+PERLVAR(Tbodytarget, SV *)
+PERLVAR(Ttoptarget, SV *)
+
+/* Stashes */
+PERLVAR(Tdefstash, HV *) /* main symbol table */
+PERLVAR(Tcurstash, HV *) /* symbol table for current package */
+
+PERLVAR(Trestartop, OP *) /* propagating an error from croak? */
+PERLVARI(Tcurcop, COP * VOL, &PL_compiling)
+PERLVAR(Tin_eval, VOL int) /* trap "fatal" errors? */
+PERLVAR(Tdelaymagic, int) /* ($<,$>) = ... */
+PERLVAR(Tdirty, bool) /* in the middle of tearing things down? */
+PERLVAR(Tlocalizing, int) /* are we processing a local() list? */
+
+PERLVAR(Tcurstack, AV *) /* THE STACK */
+PERLVAR(Tcurstackinfo, PERL_SI *) /* current stack + context */
+PERLVAR(Tmainstack, AV *) /* the stack when nothing funny is happening */
+PERLVAR(Ttop_env, JMPENV *) /* ptr. to current sigjmp() environment */
+PERLVAR(Tstart_env, JMPENV) /* empty startup sigjmp() environment */
+
+/* statics "owned" by various functions */
+PERLVAR(Tav_fetch_sv, SV *) /* owned by av_fetch() */
+PERLVAR(Thv_fetch_sv, SV *) /* owned by hv_fetch() */
+PERLVAR(Thv_fetch_ent_mh, HE) /* owned by hv_fetch_ent() */
+
+PERLVAR(Tmodcount, I32) /* how much mod()ification in assignment? */
+
+PERLVAR(Tlastgotoprobe, OP*) /* from pp_ctl.c */
+
+/* sort stuff */
+PERLVAR(Tsortcop, OP *) /* user defined sort routine */
+PERLVAR(Tsortstash, HV *) /* which is in some package or other */
+PERLVAR(Tfirstgv, GV *) /* $a */
+PERLVAR(Tsecondgv, GV *) /* $b */
+PERLVAR(Tsortcxix, I32) /* from pp_ctl.c */
+
+/* regex stuff */
+
+PERLVAR(Tscreamfirst, I32 *)
+PERLVAR(Tscreamnext, I32 *)
+PERLVARI(Tmaxscream, I32, -1)
+PERLVAR(Tlastscream, SV *)
+
+PERLVAR(Tregdummy, regnode) /* from regcomp.c */
+PERLVAR(Tregcomp_parse, char*) /* Input-scan pointer. */
+PERLVAR(Tregxend, char*) /* End of input for compile */
+PERLVAR(Tregcode, regnode*) /* Code-emit pointer; &regdummy = don't */
+PERLVAR(Tregnaughty, I32) /* How bad is this pattern? */
+PERLVAR(Tregsawback, I32) /* Did we see \1, ...? */
+PERLVAR(Tregprecomp, char *) /* uncompiled string. */
+PERLVAR(Tregnpar, I32) /* () count. */
+PERLVAR(Tregsize, I32) /* Code size. */
+PERLVAR(Tregflags, U16) /* are we folding, multilining? */
+PERLVAR(Tregseen, U32) /* from regcomp.c */
+PERLVAR(Tseen_zerolen, I32) /* from regcomp.c */
+PERLVAR(Tseen_evals, I32) /* from regcomp.c */
+PERLVAR(Tregcomp_rx, regexp *) /* from regcomp.c */
+PERLVAR(Textralen, I32) /* from regcomp.c */
+PERLVAR(Tcolorset, int) /* from regcomp.c */
+PERLVAR(Tcolors[4], char *) /* from regcomp.c */
+PERLVAR(Treginput, char *) /* String-input pointer. */
+PERLVAR(Tregbol, char *) /* Beginning of input, for ^ check. */
+PERLVAR(Tregeol, char *) /* End of input, for $ check. */
+PERLVAR(Tregstartp, char **) /* Pointer to startp array. */
+PERLVAR(Tregendp, char **) /* Ditto for endp. */
+PERLVAR(Treglastparen, U32 *) /* Similarly for lastparen. */
+PERLVAR(Tregtill, char *) /* How far we are required to go. */
+PERLVAR(Tregprev, char) /* char before regbol, \n if none */
+PERLVAR(Treg_start_tmp, char **) /* from regexec.c */
+PERLVAR(Treg_start_tmpl,U32) /* from regexec.c */
+PERLVAR(Tregdata, struct reg_data *)
+ /* from regexec.c renamed was data */
+PERLVAR(Tbostr, char *) /* from regexec.c */
+PERLVAR(Treg_flags, U32) /* from regexec.c */
+PERLVAR(Treg_eval_set, I32) /* from regexec.c */
+PERLVAR(Tregnarrate, I32) /* from regexec.c */
+PERLVAR(Tregprogram, regnode *) /* from regexec.c */
+PERLVARI(Tregindent, int, 0) /* from regexec.c */
+PERLVAR(Tregcc, CURCUR *) /* from regexec.c */
+
+PERLVARI(Tregcompp, regcomp_t, FUNC_NAME_TO_PTR(pregcomp))
+ /* Pointer to RE compiler */
+PERLVARI(Tregexecp, regexec_t, FUNC_NAME_TO_PTR(regexec_flags))
+ /* Pointer to RE executer */
+PERLVARI(Treginterp_cnt,int, 0) /* Whether `Regexp'
+ was interpolated. */
+
+
+/* Note that the variables below are all explicitly referenced in the code
+ * as thr->whatever and therefore don't need the 'T' prefix. */
+
+#ifdef USE_THREADS
+
+PERLVAR(oursv, SV *)
+PERLVAR(cvcache, HV *)
+PERLVAR(self, perl_os_thread) /* Underlying thread object */
+PERLVAR(flags, U32)
+PERLVAR(threadsv, AV *) /* Per-thread SVs ($_, $@ etc.) */
+PERLVAR(threadsvp, SV **) /* AvARRAY(threadsv) */
+PERLVAR(specific, AV *) /* Thread-specific user data */
+PERLVAR(errsv, SV *) /* Backing SV for $@ */
+PERLVAR(errhv, HV *) /* HV for what was %@ in pp_ctl.c */
+PERLVAR(mutex, perl_mutex) /* For the fields others can change */
+PERLVAR(tid, U32)
+PERLVAR(prev, struct perl_thread *)
+PERLVAR(next, struct perl_thread *)
+ /* Circular linked list of threads */
+
+#ifdef HAVE_THREAD_INTERN
+PERLVAR(i, struct thread_intern)
+ /* Platform-dependent internals */
+#endif
+
+PERLVAR(trailing_nul, char) /* For the sake of thrsv and oursv */
+
+#endif /* USE_THREADS */
diff --git a/gnu/usr.bin/perl/thread.h b/gnu/usr.bin/perl/thread.h
new file mode 100644
index 00000000000..089077c0f54
--- /dev/null
+++ b/gnu/usr.bin/perl/thread.h
@@ -0,0 +1,324 @@
+#ifdef USE_THREADS
+
+#ifdef WIN32
+# include <win32thread.h>
+#else
+
+#ifndef DJGPP
+/* POSIXish threads */
+#ifdef OLD_PTHREADS_API
+# define pthread_mutexattr_init(a) pthread_mutexattr_create(a)
+# define pthread_mutexattr_settype(a,t) pthread_mutexattr_setkind_np(a,t)
+# define pthread_key_create(k,d) pthread_keycreate(k,(pthread_destructor_t)(d))
+# define YIELD pthread_yield()
+# define DETACH(t) \
+ STMT_START { \
+ if (pthread_detach(&(t)->self)) { \
+ MUTEX_UNLOCK(&(t)->mutex); \
+ croak("panic: DETACH"); \
+ } \
+ } STMT_END
+#else
+# define pthread_mutexattr_default NULL
+# define pthread_condattr_default NULL
+#endif /* OLD_PTHREADS_API */
+#endif
+#endif
+
+#ifdef PTHREADS_CREATED_JOINABLE
+# define ATTR_JOINABLE PTHREAD_CREATE_JOINABLE
+#else
+# ifdef PTHREAD_CREATE_UNDETACHED
+# define ATTR_JOINABLE PTHREAD_CREATE_UNDETACHED
+# else
+# define ATTR_JOINABLE PTHREAD_CREATE_JOINABLE
+# endif
+#endif
+
+#ifdef I_MACH_CTHREADS
+
+/* cthreads interface */
+
+/* #include <mach/cthreads.h> is in perl.h #ifdef I_MACH_CTHREADS */
+
+#define MUTEX_INIT(m) \
+ STMT_START { \
+ *m = mutex_alloc(); \
+ if (*m) { \
+ mutex_init(*m); \
+ } else { \
+ croak("panic: MUTEX_INIT"); \
+ } \
+ } STMT_END
+
+#define MUTEX_LOCK(m) mutex_lock(*m)
+#define MUTEX_UNLOCK(m) mutex_unlock(*m)
+#define MUTEX_DESTROY(m) \
+ STMT_START { \
+ mutex_free(*m); \
+ *m = 0; \
+ } STMT_END
+
+#define COND_INIT(c) \
+ STMT_START { \
+ *c = condition_alloc(); \
+ if (*c) { \
+ condition_init(*c); \
+ } else { \
+ croak("panic: COND_INIT"); \
+ } \
+ } STMT_END
+
+#define COND_SIGNAL(c) condition_signal(*c)
+#define COND_BROADCAST(c) condition_broadcast(*c)
+#define COND_WAIT(c, m) condition_wait(*c, *m)
+#define COND_DESTROY(c) \
+ STMT_START { \
+ condition_free(*c); \
+ *c = 0; \
+ } STMT_END
+
+#define THREAD_CREATE(thr, f) (thr->self = cthread_fork(f, thr), 0)
+#define THREAD_POST_CREATE(thr)
+
+#define THREAD_RET_TYPE any_t
+#define THREAD_RET_CAST(x) ((any_t) x)
+
+#define DETACH(t) cthread_detach(t->self)
+#define JOIN(t, avp) (*(avp) = (AV *)cthread_join(t->self))
+
+#define SET_THR(thr) cthread_set_data(cthread_self(), thr)
+#define THR cthread_data(cthread_self())
+
+#define INIT_THREADS cthread_init()
+#define YIELD cthread_yield()
+#define ALLOC_THREAD_KEY
+#define SET_THREAD_SELF(thr) (thr->self = cthread_self())
+
+#endif /* I_MACH_CTHREADS */
+
+#ifndef YIELD
+# ifdef HAS_SCHED_YIELD
+# define YIELD sched_yield()
+# else
+# ifdef HAS_PTHREAD_YIELD
+# define YIELD pthread_yield()
+# endif
+# endif
+#endif
+
+#ifdef __hpux
+# define MUTEX_INIT_NEEDS_MUTEX_ZEROED
+#endif
+
+#ifndef MUTEX_INIT
+#ifdef MUTEX_INIT_NEEDS_MUTEX_ZEROED
+ /* Temporary workaround, true bug is deeper. --jhi 1999-02-25 */
+#define MUTEX_INIT(m) \
+ STMT_START { \
+ Zero((m), 1, perl_mutex); \
+ if (pthread_mutex_init((m), pthread_mutexattr_default)) \
+ croak("panic: MUTEX_INIT"); \
+ } STMT_END
+#else
+#define MUTEX_INIT(m) \
+ STMT_START { \
+ if (pthread_mutex_init((m), pthread_mutexattr_default)) \
+ croak("panic: MUTEX_INIT"); \
+ } STMT_END
+#endif
+#define MUTEX_LOCK(m) \
+ STMT_START { \
+ if (pthread_mutex_lock((m))) \
+ croak("panic: MUTEX_LOCK"); \
+ } STMT_END
+#define MUTEX_UNLOCK(m) \
+ STMT_START { \
+ if (pthread_mutex_unlock((m))) \
+ croak("panic: MUTEX_UNLOCK"); \
+ } STMT_END
+#define MUTEX_DESTROY(m) \
+ STMT_START { \
+ if (pthread_mutex_destroy((m))) \
+ croak("panic: MUTEX_DESTROY"); \
+ } STMT_END
+#endif /* MUTEX_INIT */
+
+#ifndef COND_INIT
+#define COND_INIT(c) \
+ STMT_START { \
+ if (pthread_cond_init((c), pthread_condattr_default)) \
+ croak("panic: COND_INIT"); \
+ } STMT_END
+#define COND_SIGNAL(c) \
+ STMT_START { \
+ if (pthread_cond_signal((c))) \
+ croak("panic: COND_SIGNAL"); \
+ } STMT_END
+#define COND_BROADCAST(c) \
+ STMT_START { \
+ if (pthread_cond_broadcast((c))) \
+ croak("panic: COND_BROADCAST"); \
+ } STMT_END
+#define COND_WAIT(c, m) \
+ STMT_START { \
+ if (pthread_cond_wait((c), (m))) \
+ croak("panic: COND_WAIT"); \
+ } STMT_END
+#define COND_DESTROY(c) \
+ STMT_START { \
+ if (pthread_cond_destroy((c))) \
+ croak("panic: COND_DESTROY"); \
+ } STMT_END
+#endif /* COND_INIT */
+
+/* DETACH(t) must only be called while holding t->mutex */
+#ifndef DETACH
+#define DETACH(t) \
+ STMT_START { \
+ if (pthread_detach((t)->self)) { \
+ MUTEX_UNLOCK(&(t)->mutex); \
+ croak("panic: DETACH"); \
+ } \
+ } STMT_END
+#endif /* DETACH */
+
+#ifndef JOIN
+#define JOIN(t, avp) \
+ STMT_START { \
+ if (pthread_join((t)->self, (void**)(avp))) \
+ croak("panic: pthread_join"); \
+ } STMT_END
+#endif /* JOIN */
+
+#ifndef SET_THR
+#define SET_THR(t) \
+ STMT_START { \
+ if (pthread_setspecific(PL_thr_key, (void *) (t))) \
+ croak("panic: pthread_setspecific"); \
+ } STMT_END
+#endif /* SET_THR */
+
+#ifndef THR
+# ifdef OLD_PTHREADS_API
+struct perl_thread *getTHR _((void));
+# define THR getTHR()
+# else
+# define THR ((struct perl_thread *) pthread_getspecific(PL_thr_key))
+# endif /* OLD_PTHREADS_API */
+#endif /* THR */
+
+/*
+ * dTHR is performance-critical. Here, we only do the pthread_get_specific
+ * if there may be more than one thread in existence, otherwise we get thr
+ * from thrsv which is cached in the per-interpreter structure.
+ * Systems with very fast pthread_get_specific (which should be all systems
+ * but unfortunately isn't) may wish to simplify to "...*thr = THR".
+ *
+ * The use of PL_threadnum should be safe here.
+ */
+#ifndef dTHR
+# define dTHR \
+ struct perl_thread *thr = PL_threadnum? THR : (struct perl_thread*)SvPVX(PL_thrsv)
+#endif /* dTHR */
+
+#ifndef INIT_THREADS
+# ifdef NEED_PTHREAD_INIT
+# define INIT_THREADS pthread_init()
+# else
+# define INIT_THREADS NOOP
+# endif
+#endif
+
+/* Accessor for per-thread SVs */
+#define THREADSV(i) (thr->threadsvp[i])
+
+/*
+ * LOCK_SV_MUTEX and UNLOCK_SV_MUTEX are performance-critical. Here, we
+ * try only locking them if there may be more than one thread in existence.
+ * Systems with very fast mutexes (and/or slow conditionals) may wish to
+ * remove the "if (threadnum) ..." test.
+ * XXX do NOT use C<if (PL_threadnum) ...> -- it sets up race conditions!
+ */
+#define LOCK_SV_MUTEX \
+ STMT_START { \
+ MUTEX_LOCK(&PL_sv_mutex); \
+ } STMT_END
+
+#define UNLOCK_SV_MUTEX \
+ STMT_START { \
+ MUTEX_UNLOCK(&PL_sv_mutex); \
+ } STMT_END
+
+/* Likewise for strtab_mutex */
+#define LOCK_STRTAB_MUTEX \
+ STMT_START { \
+ MUTEX_LOCK(&PL_strtab_mutex); \
+ } STMT_END
+
+#define UNLOCK_STRTAB_MUTEX \
+ STMT_START { \
+ MUTEX_UNLOCK(&PL_strtab_mutex); \
+ } STMT_END
+
+#ifndef THREAD_RET_TYPE
+# define THREAD_RET_TYPE void *
+# define THREAD_RET_CAST(p) ((void *)(p))
+#endif /* THREAD_RET */
+
+
+/* Values and macros for thr->flags */
+#define THRf_STATE_MASK 7
+#define THRf_R_JOINABLE 0
+#define THRf_R_JOINED 1
+#define THRf_R_DETACHED 2
+#define THRf_ZOMBIE 3
+#define THRf_DEAD 4
+
+#define THRf_DID_DIE 8
+
+/* ThrSTATE(t) and ThrSETSTATE(t) must only be called while holding t->mutex */
+#define ThrSTATE(t) ((t)->flags & THRf_STATE_MASK)
+#define ThrSETSTATE(t, s) STMT_START { \
+ (t)->flags &= ~THRf_STATE_MASK; \
+ (t)->flags |= (s); \
+ DEBUG_S(PerlIO_printf(PerlIO_stderr(), \
+ "thread %p set to state %d\n", (t), (s))); \
+ } STMT_END
+
+typedef struct condpair {
+ perl_mutex mutex; /* Protects all other fields */
+ perl_cond owner_cond; /* For when owner changes at all */
+ perl_cond cond; /* For cond_signal and cond_broadcast */
+ Thread owner; /* Currently owning thread */
+} condpair_t;
+
+#define MgMUTEXP(mg) (&((condpair_t *)(mg->mg_ptr))->mutex)
+#define MgOWNERCONDP(mg) (&((condpair_t *)(mg->mg_ptr))->owner_cond)
+#define MgCONDP(mg) (&((condpair_t *)(mg->mg_ptr))->cond)
+#define MgOWNER(mg) ((condpair_t *)(mg->mg_ptr))->owner
+
+#else
+/* USE_THREADS is not defined */
+#define MUTEX_LOCK(m)
+#define MUTEX_UNLOCK(m)
+#define MUTEX_INIT(m)
+#define MUTEX_DESTROY(m)
+#define COND_INIT(c)
+#define COND_SIGNAL(c)
+#define COND_BROADCAST(c)
+#define COND_WAIT(c, m)
+#define COND_DESTROY(c)
+#define LOCK_SV_MUTEX
+#define UNLOCK_SV_MUTEX
+#define LOCK_STRTAB_MUTEX
+#define UNLOCK_STRTAB_MUTEX
+
+#define THR
+/* Rats: if dTHR is just blank then the subsequent ";" throws an error */
+#ifdef WIN32
+#define dTHR extern int Perl___notused
+#else
+#define dTHR extern int errno
+#endif
+#endif /* USE_THREADS */
diff --git a/gnu/usr.bin/perl/thread.sym b/gnu/usr.bin/perl/thread.sym
new file mode 100644
index 00000000000..1e0ca6a5f2c
--- /dev/null
+++ b/gnu/usr.bin/perl/thread.sym
@@ -0,0 +1 @@
+#
diff --git a/gnu/usr.bin/perl/utils/perlcc.PL b/gnu/usr.bin/perl/utils/perlcc.PL
new file mode 100644
index 00000000000..b214645ad99
--- /dev/null
+++ b/gnu/usr.bin/perl/utils/perlcc.PL
@@ -0,0 +1,945 @@
+#!/usr/local/bin/perl
+
+use Config;
+use File::Basename qw(&basename &dirname);
+use Cwd;
+
+# List explicitly here the variables you want Configure to
+# generate. Metaconfig only looks for shell variables, so you
+# have to mention them as if they were shell variables, not
+# %Config entries. Thus you write
+# $startperl
+# to ensure Configure will look for $Config{startperl}.
+# Wanted: $archlibexp
+
+# This forces PL files to create target in same directory as PL file.
+# This is so that make depend always knows where to find PL derivatives.
+$origdir = cwd;
+chdir dirname($0);
+$file = basename($0, '.PL');
+$file .= '.com' if $^O eq 'VMS';
+
+open OUT,">$file" or die "Can't create $file: $!";
+
+print "Extracting $file (with variable substitutions)\n";
+
+# In this section, perl variables will be expanded during extraction.
+# You can use $Config{...} to use Configure variables.
+
+print OUT <<"!GROK!THIS!";
+$Config{startperl}
+ eval 'exec $Config{perlpath} -S \$0 \${1+"\$@"}'
+ if \$running_under_some_shell;
+!GROK!THIS!
+
+# In the following, perl variables are not expanded during extraction.
+
+print OUT <<'!NO!SUBS!';
+
+use Config;
+use strict;
+use FileHandle;
+use File::Basename qw(&basename &dirname);
+use Cwd;
+
+use Getopt::Long;
+
+$Getopt::Long::bundling_override = 1;
+$Getopt::Long::passthrough = 0;
+$Getopt::Long::ignore_case = 0;
+
+my $options = {};
+my $_fh;
+
+main();
+
+sub main
+{
+
+ GetOptions
+ (
+ $options, "L:s",
+ "I:s",
+ "C:s",
+ "o:s",
+ "e:s",
+ "regex:s",
+ "verbose:s",
+ "log:s",
+ "argv:s",
+ "gen",
+ "sav",
+ "run",
+ "prog",
+ "mod"
+ );
+
+
+ my $key;
+
+ local($") = "|";
+
+ _usage() if (!_checkopts());
+ push(@ARGV, _maketempfile()) if ($options->{'e'});
+
+ _usage() if (!@ARGV);
+
+ my $file;
+ foreach $file (@ARGV)
+ {
+ _print("
+--------------------------------------------------------------------------------
+Compiling $file:
+--------------------------------------------------------------------------------
+", 36 );
+ _doit($file);
+ }
+}
+
+sub _doit
+{
+ my ($file) = @_;
+
+ my ($program_ext, $module_ext) = _getRegexps();
+ my ($obj, $objfile, $so, $type);
+
+ if (
+ (($file =~ m"@$program_ext") && ($file !~ m"@$module_ext"))
+ || (defined($options->{'prog'}) || defined($options->{'run'}))
+ )
+ {
+ $objfile = ($options->{'C'}) ? $options->{'C'} : "$file.c";
+ $type = 'program';
+
+ $obj = ($options->{'o'})? $options->{'o'} :
+ _getExecutable( $file,$program_ext);
+
+ return() if (!$obj);
+
+ }
+ elsif (($file =~ m"@$module_ext") || ($options->{'mod'}))
+ {
+ die "Shared objects are not supported on Win32 yet!!!!\n"
+ if ($Config{'osname'} eq 'MSWin32');
+
+ $obj = ($options->{'o'})? $options->{'o'} :
+ _getExecutable($file, $module_ext);
+ $so = "$obj.$Config{so}";
+ $type = 'sharedlib';
+ return() if (!$obj);
+ $objfile = ($options->{'C'}) ? $options->{'C'} : "$file.c";
+ }
+ else
+ {
+ _error("noextension", $file, $program_ext, $module_ext);
+ return();
+ }
+
+ if ($type eq 'program')
+ {
+ _print("Making C($objfile) for $file!\n", 36 );
+
+ my $errcode = _createCode($objfile, $file);
+ (_print( "ERROR: In generating code for $file!\n", -1), return())
+ if ($errcode);
+
+ _print("Compiling C($obj) for $file!\n", 36 ) if (!$options->{'gen'});
+ $errcode = _compileCode($file, $objfile, $obj)
+ if (!$options->{'gen'});
+
+ if ($errcode)
+ {
+ _print( "ERROR: In compiling code for $objfile !\n", -1);
+ my $ofile = File::Basename::basename($objfile);
+ $ofile =~ s"\.c$"\.o"s;
+
+ _removeCode("$ofile");
+ return()
+ }
+
+ _runCode($obj) if ($options->{'run'});
+
+ _removeCode($objfile) if (!$options->{'sav'} ||
+ ($options->{'e'} && !$options->{'C'}));
+
+ _removeCode($file) if ($options->{'e'});
+
+ _removeCode($obj) if (($options->{'e'}
+ && !$options->{'sav'}
+ && !$options->{'o'})
+ || ($options->{'run'} && !$options->{'sav'}));
+ }
+ else
+ {
+ _print( "Making C($objfile) for $file!\n", 36 );
+ my $errcode = _createCode($objfile, $file, $obj);
+ (_print( "ERROR: In generating code for $file!\n", -1), return())
+ if ($errcode);
+
+ _print( "Compiling C($so) for $file!\n", 36 ) if (!$options->{'gen'});
+
+ my $errorcode =
+ _compileCode($file, $objfile, $obj, $so ) if (!$options->{'gen'});
+
+ (_print( "ERROR: In compiling code for $objfile!\n", -1), return())
+ if ($errcode);
+ }
+}
+
+sub _getExecutable
+{
+ my ($sourceprog, $ext) = @_;
+ my ($obj);
+
+ if (defined($options->{'regex'}))
+ {
+ eval("(\$obj = \$sourceprog) =~ $options->{'regex'}");
+ return(0) if (_error('badeval', $@));
+ return(0) if (_error('equal', $obj, $sourceprog));
+ }
+ elsif (defined ($options->{'ext'}))
+ {
+ ($obj = $sourceprog) =~ s"@$ext"$options->{ext}"g;
+ return(0) if (_error('equal', $obj, $sourceprog));
+ }
+ elsif (defined ($options->{'run'}))
+ {
+ $obj = "perlc$$";
+ }
+ else
+ {
+ ($obj = $sourceprog) =~ s"@$ext""g;
+ return(0) if (_error('equal', $obj, $sourceprog));
+ }
+ return($obj);
+}
+
+sub _createCode
+{
+ my ( $generated_cfile, $file, $final_output ) = @_;
+ my $return;
+
+ local($") = " -I";
+
+ if (@_ == 2) # compiling a program
+ {
+ _print( "$^X -I@INC -MO=CC,-o$generated_cfile $file\n", 36);
+ $return = _run("$ -I@INC -MO=CC,-o$generated_cfile $file", 9);
+ $return;
+ }
+ else # compiling a shared object
+ {
+ _print(
+ "$ -I@INC -MO=CC,-m$final_output,-o$generated_cfile $file\n", 36);
+ $return =
+ _run("$ -I@INC -MO=CC,-m$final_output,-o$generated_cfile $file", 9);
+ $return;
+ }
+}
+
+sub _compileCode
+{
+ my ($sourceprog, $generated_cfile, $output_executable, $shared_object) = @_;
+ my @return;
+
+ if (@_ == 3) # just compiling a program
+ {
+ $return[0] =
+ _ccharness('static', $sourceprog, "-o", $output_executable, $generated_cfile);
+ $return[0];
+ }
+ else
+ {
+ my $object_file = $generated_cfile;
+ $object_file =~ s"\.c$"$Config{_o}";
+
+ $return[0] = _ccharness('compile', $sourceprog, "-c", $generated_cfile);
+ $return[1] = _ccharness
+ (
+ 'dynamic',
+ $sourceprog, "-o",
+ $shared_object, $object_file
+ );
+ return(1) if (grep ($_, @return));
+ return(0);
+ }
+}
+
+sub _runCode
+{
+ my ($executable) = @_;
+ _print("$executable $options->{'argv'}\n", 36);
+ _run("$executable $options->{'argv'}", -1 );
+}
+
+sub _removeCode
+{
+ my ($file) = @_;
+ unlink($file) if (-e $file);
+}
+
+sub _ccharness
+{
+ my $type = shift;
+ my (@args) = @_;
+ local($") = " ";
+
+ my $sourceprog = shift(@args);
+ my ($libdir, $incdir);
+
+ if (-d "$Config{installarchlib}/CORE")
+ {
+ $libdir = "-L$Config{installarchlib}/CORE";
+ $incdir = "-I$Config{installarchlib}/CORE";
+ }
+ else
+ {
+ $libdir = "-L.. -L.";
+ $incdir = "-I.. -I.";
+ }
+
+ $libdir .= " -L$options->{L}" if (defined($options->{L}));
+ $incdir .= " -I$options->{L}" if (defined($options->{L}));
+
+ my $linkargs = '';
+
+ if (!grep(/^-[cS]$/, @args))
+ {
+ my $lperl = $^O eq 'os2' ? '-llibperl' : '-lperl';
+ my $flags = $type eq 'dynamic' ? $Config{lddlflags} : $Config{ldflags};
+ $linkargs = "$flags $libdir $lperl @Config{libs}";
+ }
+
+ my @sharedobjects = _getSharedObjects($sourceprog);
+
+ my $cccmd =
+ "$Config{cc} @Config{qw(ccflags optimize)} $incdir @sharedobjects @args $linkargs";
+
+
+ _print ("$cccmd\n", 36);
+ _run("$cccmd", 18 );
+}
+
+sub _getSharedObjects
+{
+ my ($sourceprog) = @_;
+ my ($tmpfile, $incfile);
+ my (@return);
+ local($") = " -I";
+
+ if ($Config{'osname'} eq 'MSWin32')
+ {
+ # _addstuff;
+ }
+ else
+ {
+ my ($tmpprog);
+ ($tmpprog = $sourceprog) =~ s"(.*)[\/\\](.*)"$2";
+ $tmpfile = "/tmp/$tmpprog.tst";
+ $incfile = "/tmp/$tmpprog.val";
+ }
+
+ my $fd = new FileHandle("> $tmpfile") || die "Couldn't open $tmpfile!\n";
+ my $fd2 =
+ new FileHandle("$sourceprog") || die "Couldn't open $sourceprog!\n";
+
+ my $perl = <$fd2>; # strip off header;
+
+ print $fd
+<<"EOF";
+ use FileHandle;
+ my \$fh3 = new FileHandle("> $incfile")
+ || die "Couldn't open $incfile\\n";
+
+ my \$key;
+ foreach \$key (keys(\%INC)) { print \$fh3 "\$key:\$INC{\$key}\\n"; }
+ close(\$fh3);
+ exit();
+EOF
+
+ print $fd ( <$fd2> );
+ close($fd);
+
+ _print("$ -I@INC $tmpfile\n", 36);
+ _run("$ -I@INC $tmpfile", 9 );
+
+ $fd = new FileHandle ("$incfile");
+ my @lines = <$fd>;
+
+ unlink($tmpfile);
+ unlink($incfile);
+
+ my $line;
+ my $autolib;
+
+ foreach $line (@lines)
+ {
+ chomp($line);
+ my ($modname, $modpath) = split(':', $line);
+ my ($dir, $file) = ($modpath=~ m"(.*)[\\/]($modname)");
+
+ if ($autolib = _lookforAuto($dir, $file))
+ {
+ push(@return, $autolib);
+ }
+ }
+
+ return(@return);
+}
+
+sub _maketempfile
+{
+ my $return;
+
+# if ($Config{'osname'} eq 'MSWin32')
+# { $return = "C:\\TEMP\\comp$$.p"; }
+# else
+# { $return = "/tmp/comp$$.p"; }
+
+ $return = "comp$$.p";
+
+ my $fd = new FileHandle( "> $return") || die "Couldn't open $return!\n";
+ print $fd $options->{'e'};
+ close($fd);
+
+ return($return);
+}
+
+
+sub _lookforAuto
+{
+ my ($dir, $file) = @_;
+
+ my $relshared;
+ my $return;
+
+ ($relshared = $file) =~ s"(.*)\.pm"$1";
+
+ my ($tmp, $modname) = ($relshared =~ m"(?:(.*)[\\/]){0,1}(.*)"s);
+
+ $relshared .=
+ ($Config{'osname'} eq 'MSWin32')? "\\$modname.dll" : "/$modname.so";
+
+
+
+ if (-e ($return = "$Config{'installarchlib'}/auto/$relshared") )
+ {
+ return($return);
+ }
+ elsif (-e ($return = "$Config{'installsitearch'}/auto/$relshared"))
+ {
+ return($return);
+ }
+ elsif (-e ($return = "$dir/arch/auto/$relshared"))
+ {
+ return($return);
+ }
+ else
+ {
+ return(undef);
+ }
+}
+
+sub _getRegexps # make the appropriate regexps for making executables,
+{ # shared libs
+
+ my ($program_ext, $module_ext) = ([],[]);
+
+
+ @$program_ext = ($ENV{PERL_SCRIPT_EXT})? split(':', $ENV{PERL_SCRIPT_EXT}) :
+ ('.p$', '.pl$', '.bat$');
+
+
+ @$module_ext = ($ENV{PERL_MODULE_EXT})? split(':', $ENV{PERL_MODULE_EXT}) :
+ ('.pm$');
+
+
+ _mungeRegexp( $program_ext );
+ _mungeRegexp( $module_ext );
+
+ return($program_ext, $module_ext);
+}
+
+sub _mungeRegexp
+{
+ my ($regexp) = @_;
+
+ grep(s:(^|[^\\])\.:$1\x00\\.:g, @$regexp);
+ grep(s:(^|[^\x00])\\\.:$1\.:g, @$regexp);
+ grep(s:\x00::g, @$regexp);
+}
+
+
+sub _error
+{
+ my ($type, @args) = @_;
+
+ if ($type eq 'equal')
+ {
+
+ if ($args[0] eq $args[1])
+ {
+ _print ("ERROR: The object file '$args[0]' does not generate a legitimate executable file! Skipping!\n", -1);
+ return(1);
+ }
+ }
+ elsif ($type eq 'badeval')
+ {
+ if ($args[0])
+ {
+ _print ("ERROR: $args[0]\n", -1);
+ return(1);
+ }
+ }
+ elsif ($type eq 'noextension')
+ {
+ my $progext = join(',', @{$args[1]});
+ my $modext = join(',', @{$args[2]});
+
+ $progext =~ s"\\""g;
+ $modext =~ s"\\""g;
+
+ $progext =~ s"\$""g;
+ $modext =~ s"\$""g;
+
+ _print
+ (
+"
+ERROR: '$args[0]' does not have a proper extension! Proper extensions are:
+
+ PROGRAM: $progext
+ SHARED OBJECT: $modext
+
+Use the '-prog' flag to force your files to be interpreted as programs.
+Use the '-mod' flag to force your files to be interpreted as modules.
+", -1
+ );
+ return(1);
+ }
+
+ return(0);
+}
+
+sub _checkopts
+{
+ my @errors;
+ local($") = "\n";
+
+ if ($options->{'log'})
+ {
+ $_fh = new FileHandle(">> $options->{'log'}") || push(@errors, "ERROR: Couldn't open $options->{'log'}\n");
+ }
+
+ if (($options->{'c'}) && (@ARGV > 1) && ($options->{'sav'} ))
+ {
+ push(@errors,
+"ERROR: The '-sav' and '-C' options are incompatible when you have more than
+ one input file! ('-C' explicitly names resulting C code, '-sav' saves it,
+ and hence, with more than one file, the c code will be overwritten for
+ each file that you compile)\n");
+ }
+ if (($options->{'o'}) && (@ARGV > 1))
+ {
+ push(@errors,
+"ERROR: The '-o' option is incompatible when you have more than one input file!
+ (-o explicitly names the resulting executable, hence, with more than
+ one file the names clash)\n");
+ }
+
+ if ($options->{'e'} && $options->{'sav'} && !$options->{'o'} &&
+ !$options->{'C'})
+ {
+ push(@errors,
+"ERROR: You need to specify where you are going to save the resulting
+ executable or C code, when using '-sav' and '-e'. Use '-o' or '-C'.\n");
+ }
+
+ if (($options->{'regex'} || $options->{'run'} || $options->{'o'})
+ && $options->{'gen'})
+ {
+ push(@errors,
+"ERROR: The options '-regex', '-run', and '-o' are incompatible with '-gen'.
+ '-gen' says to stop at C generation, and the other three modify the
+ compilation and/or running process!\n");
+ }
+
+ if ($options->{'run'} && $options->{'mod'})
+ {
+ push(@errors,
+"ERROR: Can't run modules that you are compiling! '-run' and '-mod' are
+ incompatible!\n");
+ }
+
+ if ($options->{'e'} && @ARGV)
+ {
+ push (@errors,
+"ERROR: The option '-e' needs to be all by itself without any other
+ file arguments!\n");
+ }
+ if ($options->{'e'} && !($options->{'o'} || $options->{'run'}))
+ {
+ $options->{'run'} = 1;
+ }
+
+ if (!defined($options->{'verbose'}))
+ {
+ $options->{'verbose'} = ($options->{'log'})? 64 : 7;
+ }
+
+ my $verbose_error;
+
+ if ($options->{'verbose'} =~ m"[^tagfcd]" &&
+ !( $options->{'verbose'} eq '0' ||
+ ($options->{'verbose'} < 64 && $options->{'verbose'} > 0)))
+ {
+ $verbose_error = 1;
+ push(@errors,
+"ERROR: Illegal verbosity level. Needs to have either the letters
+ 't','a','g','f','c', or 'd' in it or be between 0 and 63, inclusive.\n");
+ }
+
+ $options->{'verbose'} = ($options->{'verbose'} =~ m"[tagfcd]")?
+ ($options->{'verbose'} =~ m"d") * 32 +
+ ($options->{'verbose'} =~ m"c") * 16 +
+ ($options->{'verbose'} =~ m"f") * 8 +
+ ($options->{'verbose'} =~ m"t") * 4 +
+ ($options->{'verbose'} =~ m"a") * 2 +
+ ($options->{'verbose'} =~ m"g") * 1
+ : $options->{'verbose'};
+
+ if (!$verbose_error && ( $options->{'log'} &&
+ !(
+ ($options->{'verbose'} & 8) ||
+ ($options->{'verbose'} & 16) ||
+ ($options->{'verbose'} & 32 )
+ )
+ )
+ )
+ {
+ push(@errors,
+"ERROR: The verbosity level '$options->{'verbose'}' does not output anything
+ to a logfile, and you specified '-log'!\n");
+ } # }
+
+ if (!$verbose_error && ( !$options->{'log'} &&
+ (
+ ($options->{'verbose'} & 8) ||
+ ($options->{'verbose'} & 16) ||
+ ($options->{'verbose'} & 32) ||
+ ($options->{'verbose'} & 64)
+ )
+ )
+ )
+ {
+ push(@errors,
+"ERROR: The verbosity level '$options->{'verbose'}' requires that you also
+ specify a logfile via '-log'\n");
+ } # }
+
+
+ (_print( "\n". join("\n", @errors), -1), return(0)) if (@errors);
+ return(1);
+}
+
+sub _print
+{
+ my ($text, $flag ) = @_;
+
+ my $logflag = int($flag/8) * 8;
+ my $regflag = $flag % 8;
+
+ if ($flag == -1 || ($flag & $options->{'verbose'}))
+ {
+ my $dolog = ((($logflag & $options->{'verbose'}) || $flag == -1)
+ && $options->{'log'});
+
+ my $doreg = (($regflag & $options->{'verbose'}) || $flag == -1);
+
+ if ($doreg) { print( STDERR $text ); }
+ if ($dolog) { print $_fh $text; }
+ }
+}
+
+sub _run
+{
+ my ($command, $flag) = @_;
+
+ my $logflag = ($flag != -1)? int($flag/8) * 8 : 0;
+ my $regflag = $flag % 8;
+
+ if ($flag == -1 || ($flag & $options->{'verbose'}))
+ {
+ my $dolog = ($logflag & $options->{'verbose'} && $options->{'log'});
+ my $doreg = (($regflag & $options->{'verbose'}) || $flag == -1);
+
+ if ($doreg && !$dolog)
+ { system("$command"); }
+
+ elsif ($doreg && $dolog)
+ { my $text = `$command 2>&1`; print $_fh $text; print STDERR $text;}
+ else
+ { my $text = `$command 2>&1`; print $_fh $text; }
+ }
+ else
+ {
+ `$command 2>&1`;
+ }
+ return($?);
+}
+
+sub _usage
+{
+ _print
+ (
+ <<"EOF"
+
+Usage: $0 <file_list>
+
+ Flags with arguments
+ -L < extra library dirs for installation (form of 'dir1:dir2') >
+ -I < extra include dirs for installation (form of 'dir1:dir2') >
+ -C < explicit name of resulting C code >
+ -o < explicit name of resulting executable >
+ -e < to compile 'one liners'. Need executable name (-o) or '-run'>
+ -regex < rename regex, -regex 's/\.p/\.exe/' compiles a.p to a.exe >
+ -verbose < verbose level (1-63, or following letters 'gatfcd' >
+ -argv < arguments for the executables to be run via '-run' or '-e' >
+
+ Boolean flags
+ -gen ( to just generate the c code. Implies '-sav' )
+ -sav ( to save intermediate c code, (and executables with '-run'))
+ -run ( to run the compiled program on the fly, as were interpreted.)
+ -prog ( to indicate that the files on command line are programs )
+ -mod ( to indicate that the files on command line are modules )
+
+EOF
+, -1
+
+ );
+ exit(255);
+}
+
+
+__END__
+
+=head1 NAME
+
+perlcc - frontend for perl compiler
+
+=head1 SYNOPSIS
+
+ %prompt perlcc a.p # compiles into executable 'a'
+
+ %prompt perlcc A.pm # compile into 'A.so'
+
+ %prompt perlcc a.p -o execute # compiles 'a.p' into 'execute'.
+
+ %prompt perlcc a.p -o execute -run # compiles 'a.p' into execute, runs on
+ # the fly
+
+ %prompt perlcc a.p -o execute -run -argv 'arg1 arg2 arg3'
+ # compiles into execute, runs with
+ # arg1 arg2 arg3 as @ARGV
+
+ %prompt perlcc a.p b.p c.p -regex 's/\.p/\.exe'
+ # compiles into 'a.exe','b.exe','c.exe'.
+
+ %prompt perlcc a.p -log compilelog # compiles into 'a', saves compilation
+ # info into compilelog, as well
+ # as mirroring to screen
+
+ %prompt perlcc a.p -log compilelog -verbose cdf
+ # compiles into 'a', saves compilation
+ # info into compilelog, being silent
+ # on screen.
+
+ %prompt perlcc a.p -C a.c -gen # generates C code (into a.c) and
+ # stops without compile.
+
+ %prompt perlcc a.p -L ../lib a.c
+ # Compiles with the perl libraries
+ # inside ../lib included.
+
+=head1 DESCRIPTION
+
+'perlcc' is the frontend into the perl compiler. Typing 'perlcc a.p'
+compiles the code inside a.p into a standalone executable, and
+perlcc A.pm will compile into a shared object, A.so, suitable for inclusion
+into a perl program via "use A".
+
+There are quite a few flags to perlcc which help with such issues as compiling
+programs in bulk, testing compiled programs for compatibility with the
+interpreter, and controlling.
+
+=head1 OPTIONS
+
+=over 4
+
+=item -L < library_directories >
+
+Adds directories in B<library_directories> to the compilation command.
+
+=item -I < include_directories >
+
+Adds directories inside B<include_directories> to the compilation command.
+
+=item -C < c_code_name >
+
+Explicitly gives the name B<c_code_name> to the generated c code which is to
+be compiled. Can only be used if compiling one file on the command line.
+
+=item -o < executable_name >
+
+Explicitly gives the name B<executable_name> to the executable which is to be
+compiled. Can only be used if compiling one file on the command line.
+
+=item -e < perl_line_to_execute>
+
+Compiles 'one liners', in the same way that B<perl -e> runs text strings at
+the command line. Default is to have the 'one liner' be compiled, and run all
+in one go (see B<-run>); giving the B<-o> flag saves the resultant executable,
+rather than throwing it away. Use '-argv' to pass arguments to the executable
+created.
+
+=item -regex <rename_regex>
+
+Gives a rule B<rename_regex> - which is a legal perl regular expression - to
+create executable file names.
+
+=item -verbose <verbose_level>
+
+Show exactly what steps perlcc is taking to compile your code. You can change
+the verbosity level B<verbose_level> much in the same way that the '-D' switch
+changes perl's debugging level, by giving either a number which is the sum of
+bits you want or a list of letters representing what you wish to see. Here are
+the verbosity levels so far :
+
+ Bit 1(g): Code Generation Errors to STDERR
+ Bit 2(a): Compilation Errors to STDERR
+ Bit 4(t): Descriptive text to STDERR
+ Bit 8(f): Code Generation Errors to file (B<-log> flag needed)
+ Bit 16(c): Compilation Errors to file (B<-log> flag needed)
+ Bit 32(d): Descriptive text to file (B<-log> flag needed)
+
+If the B<-log> tag is given, the default verbose level is 63 (ie: mirroring
+all of perlcc's output to both the screen and to a log file). If no B<-log>
+tag is given, then the default verbose level is 7 (ie: outputting all of
+perlcc's output to STDERR).
+
+NOTE: Because of buffering concerns, you CANNOT shadow the output of '-run' to
+both a file, and to the screen! Suggestions are welcome on how to overcome this
+difficulty, but for now it simply does not work properly, and hence will only go
+to the screen.
+
+=item -log <logname>
+
+Opens, for append, a logfile to save some or all of the text for a given
+compile command. No rewrite version is available, so this needs to be done
+manually.
+
+=item -argv <arguments>
+
+In combination with '-run' or '-e', tells perlcc to run the resulting
+executable with the string B<arguments> as @ARGV.
+
+=item -sav
+
+Tells perl to save the intermediate C code. Usually, this C code is the name
+of the perl code, plus '.c'; 'perlcode.p' gets generated in 'perlcode.p.c',
+for example. If used with the '-e' operator, you need to tell perlcc where to
+save resulting executables.
+
+=item -gen
+
+Tells perlcc to only create the intermediate C code, and not compile the
+results. Does an implicit B<-sav>, saving the C code rather than deleting it.
+
+=item -run
+
+Immediately run the perl code that has been generated. NOTE: IF YOU GIVE THE
+B<-run> FLAG TO B<perlcc>, THEN THE REST OF @ARGV WILL BE INTERPRETED AS
+ARGUMENTS TO THE PROGRAM THAT YOU ARE COMPILING.
+
+=item -prog
+
+Indicate that the programs at the command line are programs, and should be
+compiled as such. B<perlcc> will automatically determine files to be
+programs if they have B<.p>, B<.pl>, B<.bat> extensions.
+
+=item -mod
+
+Indicate that the programs at the command line are modules, and should be
+compiled as such. B<perlcc> will automatically determine files to be
+modules if they have the extension B<.pm>.
+
+=back
+
+=head1 ENVIRONMENT
+
+Most of the work of B<perlcc> is done at the command line. However, you can
+change the heuristic which determines what is a module and what is a program.
+As indicated above, B<perlcc> assumes that the extensions:
+
+.p$, .pl$, and .bat$
+
+indicate a perl program, and:
+
+.pm$
+
+indicate a library, for the purposes of creating executables. And furthermore,
+by default, these extensions will be replaced (and dropped ) in the process of
+creating an executable.
+
+To change the extensions which are programs, and which are modules, set the
+environmental variables:
+
+PERL_SCRIPT_EXT
+PERL_MODULE_EXT
+
+These two environmental variables take colon-separated, legal perl regular
+expressions, and are used by perlcc to decide which objects are which.
+For example:
+
+setenv PERL_SCRIPT_EXT '.prl$:.perl$'
+prompt% perlcc sample.perl
+
+will compile the script 'sample.perl' into the executable 'sample', and
+
+setenv PERL_MODULE_EXT '.perlmod$:.perlmodule$'
+
+prompt% perlcc sample.perlmod
+
+will compile the module 'sample.perlmod' into the shared object
+'sample.so'
+
+NOTE: the '.' in the regular expressions for PERL_SCRIPT_EXT and PERL_MODULE_EXT
+is a literal '.', and not a wild-card. To get a true wild-card, you need to
+backslash the '.'; as in:
+
+setenv PERL_SCRIPT_EXT '\.\.\.\.\.'
+
+which would have the effect of compiling ANYTHING (except what is in
+PERL_MODULE_EXT) into an executable with 5 less characters in its name.
+
+=head1 FILES
+
+'perlcc' uses a temporary file when you use the B<-e> option to evaluate
+text and compile it. This temporary file is 'perlc$$.p'. The temporary C code is
+perlc$$.p.c, and the temporary executable is perlc$$.
+
+When you use '-run' and don't save your executable, the temporary executable is
+perlc$$
+
+=head1 BUGS
+
+perlcc currently cannot compile shared objects on Win32. This should be fixed
+by perl5.005.
+
+=cut
+
+!NO!SUBS!
+
+close OUT or die "Can't close $file: $!";
+chmod 0755, $file or die "Can't reset permissions for $file: $!\n";
+exec("$Config{'eunicefix'} $file") if $Config{'eunicefix'} ne ':';
+chdir $origdir;
diff --git a/gnu/usr.bin/perl/vms/descrip_mms.template b/gnu/usr.bin/perl/vms/descrip_mms.template
new file mode 100644
index 00000000000..f28c64ac058
--- /dev/null
+++ b/gnu/usr.bin/perl/vms/descrip_mms.template
@@ -0,0 +1,1633 @@
+!GROK!THIS!
+# Descrip.MMS for perl5 on VMS
+# Last revised 27-Feb-1998 by Charles Bailey bailey@genetics.upenn.edu
+#
+#: This file uses MMS syntax, and can be processed using DEC's MMS product,
+#: or the free MMK clone (available by ftp at ftp.spc.edu). If you want to
+#: a Unix-style MAKE tool, run this file through mms2make.pl, which should
+#: be found in the same directory as this file. (There should be a pre-made
+#: copy of Makefile for VAXC in this directory to allow you to build perl.)
+#:
+#: Lines beginning with "#:" will be removed by mms2make.pl when converting
+#: this file to MAKE syntax.
+#
+# tidy -- purge files generated by executing this file
+# clean -- remove all intermediate (e.g. object files, C files generated
+# during build) files generated by executing this file,
+# but leave `installable' files (images, library) intact
+# realclean -- remove all files generated by executing this file
+# cleansrc -- `realclean' + purge *.c,*.h,descrip.mms
+# crtl.opt -- compiler-specific linker options file (made automatically)
+#
+
+#### Start of system configuration section. ####
+
+~DECC~
+~GNUC~
+~ARCH-TYPE~ = 1
+~THREAD~
+~SOCKET~
+~MALLOC~
+~CC~
+~MT~
+
+#: >>>>> Architecture-specific options <<<<<
+.ifdef AXE
+# File type to use for object files
+O = .abj
+# File type to use for object libraries
+OLB = .alb
+# File type to use for executable images
+E = .axe
+.else
+# File type to use for object files
+O = .obj
+# File type to use for object libraries
+OLB = .olb
+# File type to use for executable images
+E = .exe
+.endif
+
+.ifdef __AXP__
+ARCH = VMS_AXP
+OBJVAL = $(O)
+.else
+ARCH = VMS_VAX
+OBJVAL = $(MMS$TARGET_NAME)$(O)
+.endif
+
+PERL_VERSION = ~PV~
+
+.ifdef MALLOC
+MALLOC_O = ,malloc$(O)
+MALLOC_C = ,malloc$(C)
+.endif
+
+.ifdef DECC_SOCKETS
+SOCKET=1
+.endif
+
+.ifdef SOCKETSHR_SOCKETS
+SOCKET=1
+.endif
+
+# If they defined SOCKET but didn't choose a stack, default to SOCKETSHR
+.ifdef DECC_SOCKETS
+.else
+.ifdef SOCKETSHR_SOCKETS
+.else
+.ifdef SOCKET
+SOCKETSHR_SOCKETS=1
+.endif
+.endif
+.endif
+
+
+ARCHDIR = [.lib.$(ARCH).$(PERL_VERSION)]
+ARCHCORE = [.lib.$(ARCH).$(PERL_VERSION).CORE]
+ARCHAUTO = [.lib.$(ARCH).$(PERL_VERSION).auto]
+
+
+#: Backwards compatibility
+.ifdef DECC_PIPES_BROKEN
+PIPES_BROKEN = 1
+.endif
+
+.ifdef __DEBUG__
+NOX2P = 1
+.endif
+
+#: >>>>>Compiler-specific options <<<<<
+.ifdef GNUC
+.first
+ @ If F$TrnLnm("Sys").eqs."" Then Define/NoLog SYS GNU_CC_Include:[VMS]
+CC = gcc
+PIPES_BROKEN = 1
+# -fno-builtin avoids bug in gcc up to version 2.6.2 which can destroy
+# data when memcpy() is called on large (>64 kB) blocks of memory
+# (fixed in gcc 2.6.3)
+XTRACCFLAGS = /Obj=$(MMS$TARGET_NAME)$(O)/NoCase_Hack/Optimize=2
+DBGSPECFLAGS =
+XTRADEF =
+XTRAOBJS =
+LIBS1 = GNU_CC:[000000]GCCLIB.OLB/Library
+LIBS2 = Sys$Share:VAXCRTL/Shareable
+POSIX =
+.else
+XTRAOBJS =
+LIBS1 = $(XTRAOBJS)
+DBGSPECFLAGS = /Show=All
+.ifdef decc
+# Some versions of DECCRTL on AXP have a bug in chdir() which causes the change
+# to persist after the image exits, even when this was not requested, iff
+# SYSNAM is enabled. This is fixed in CSC Patch # AXPACRT04_061, but turning
+# off SYSNAM for the MM[SK] subprocess doesn't hurt anything, so we do it
+# just in case.
+.first
+ @ Set Process/Privilege=(NoSYSNAM)
+ @ If F$TrnLnm("Sys").eqs."" .and. F$TrnLnm("DECC$System_Include").nes."" Then Define/NoLog SYS DECC$System_Include
+.ifdef __AXP__
+ @ If F$TrnLnm("Sys").eqs."" .and. F$TrnLnm("DECC$System_Include").eqs."" Then Define/NoLog SYS Sys$Library
+.else
+ @ If F$TrnLnm("Sys").eqs."" .and. F$TrnLnm("DECC$System_Include").eqs."" Then Define/NoLog SYS DECC$Library_Include
+.endif
+
+XTRACCFLAGS = /Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=$(OBJVAL)
+XTRADEF =
+POSIX = POSIX
+.else # VAXC
+.first
+ @ If F$TrnLnm("Sys").eqs."" .and. F$TrnLnm("VAXC$Include").eqs."" Then Define/NoLog SYS Sys$Library
+ @ If F$TrnLnm("Sys").eqs."" .and. F$TrnLnm("VAXC$Include").nes."" Then Define/NoLog SYS VAXC$Include
+
+XTRACCFLAGS = /Include=[]/Object=$(O)
+XTRADEF =
+LIBS2 = Sys$Share:VAXCRTL/Shareable
+POSIX =
+.endif
+.endif
+
+
+#: >>>>> Configuration options <<<<<
+#: __DEBUG__: builds images with full VMS debugger support
+.ifdef __DEBUG__
+DBGCCFLAGS = /List/Debug/NoOpt$(DBGSPECFLAGS)
+DBGLINKFLAGS = /Trace/Debug/Map/Full/Cross
+DBG = DBG
+.else
+DBGCCFLAGS = /NoList
+DBGLINKFLAGS = /NoTrace/NoMap
+DBG =
+.endif
+
+#: SOCKET: build in support for TCP/IP sockets
+#: By default, used SOCKETSHR library; see ReadMe.VMS
+#: for information on changing socket support
+.ifdef SOCKET
+.ifdef DECC_SOCKETS
+SOCKDEF =
+SOCKLIB =
+.else
+SOCKDEF =
+SOCKLIB = SocketShr/Share
+.endif
+# N.B. the targets for $(SOCKC) and $(SOCKH) assume that the permanent
+# copies live in [.vms], and the `clean' target will delete copies of
+# these files in the current default directory.
+SOCKC = sockadapt.c
+SOCKH = sockadapt.h
+SOCKCLIS = ,$(SOCKC)
+SOCKHLIS = ,$(SOCKH)
+SOCKOBJ = ,sockadapt$(O)
+SOCKPM = [.lib]Socket.pm
+.else
+SOCKDEF =
+SOCKLIB =
+SOCKC =
+SOCKH =
+SOCKCLIS =
+SOCKHLIS =
+SOCKOBJ =
+SOCKPM =
+.endif
+
+.ifdef THREADED
+THREADDEF =
+THREAD = THREAD
+.endif
+
+.ifdef OLDTHREADED
+THREADDEF =
+THREAD = THREAD
+THRLIBS1 = sys$share:cma$lib_shr/share|sys$share:cma$rtl/share
+.ifdef __AXP__
+THRLIBS2 = sys$share:cma$open_lib_shr/share|sys$share:cma$open_rtl/share
+.endif
+.endif
+
+.ifdef FAKETHREADED
+THREADDEF =
+THREADH = fakethr.h
+acth = $(ARCHCORE)fakethr.h
+THREAD = THREAD
+.else
+THREADH =
+acth =
+.endif
+
+# C preprocessor manifest "DEBUGGING" ==> perl -D, not the VMS debugger
+CFLAGS = $(XTRACCFLAGS)$(DBGCCFLAGS)
+# Flags for a core compile
+X2PCFLAGS = $(CFLAGS)/Define=PERL_FOR_X2P
+# Flags for an x2p compile
+CORECFLAGS = $(CFLAGS)/Define=PERL_CORE
+LINKFLAGS = $(DBGLINKFLAGS)
+
+MAKE = $(MMS)
+MAKEFILE = Descrip.MMS # this file
+NOOP = continue
+
+# Macros to invoke a copy of miniperl during the build. Targets which
+# are built using these macros should depend on $(MINIPERL_EXE)
+MINIPERL_EXE = Sys$Disk:[]miniperl$(E)
+MINIPERL = MCR $(MINIPERL_EXE) "-I[.lib]"
+XSUBPP = $(MINIPERL) [.lib.extutils]xsubpp -noprototypes
+# Macro to invoke a preexisting copy of Perl. This is used to regenerate
+# some header files when rebuilding Perl, but premade versions are provided
+# in the distribution, so it's OK if this doesn't work; it's here to make
+# life easier for those who modify Perl and rebuild it.
+INSTPERL = perl
+
+# Space-separated list of "static" extensions to build into perlshr (case counts).
+MYEXT = DynaLoader
+# object files for these extensions; the trailing comma is required if
+# there are any object files specified
+# These must be built separately, or you must add rules below to build them
+myextobj = [.ext.dynaloader]dl_vms$(O),
+#: We include the Socket extension by default if we're building with socket
+#: support, since it's small and not really worth bothering to keep track
+#: of separately.
+.ifdef SOCKET
+EXT = $(MYEXT) Socket
+extobj = $(myextobj) [.ext.socket]socket$(O),
+.else
+EXT = $(MYEXT)
+extobj = $(myextobj)
+.endif
+
+.ifdef LIBS2
+.else
+LIBS2=
+.endif
+
+.ifdef THRLIBS1
+.else
+THRLIBS1=
+.endif
+
+.ifdef THRLIBS2
+.else
+THRLIBS2=
+.endif
+
+FULLLIBS2 = $(LIBS2)|$(THRLIBS1)|$(THRLIBS2)
+
+#### End of system configuration section. ####
+
+
+h1 = EXTERN.h, INTERN.h, XSUB.h, av.h, bytecode.h, byterun.h, config.h, cop.h, cv.h
+h2 = embed.h, form.h, gv.h, handy.h, hv.h, keywords.h, mg.h, op.h, thread.h
+h3 = opcode.h, patchlevel.h, perl.h, perly.h, pp.h, proto.h, regcomp.h
+h4 = regexp.h, scope.h, sv.h, vmsish.h, util.h, perlsdio.h, perlio.h
+h5 = embedvar.h, intrpvar.h, perlvars.h, thrdvar.h, iperlsys.h
+h = $(h1), $(h2), $(h3), $(h4), $(h5) $(SOCKHLIS) $(THREADH)
+
+c1 = av.c, scope.c, op.c, doop.c, doio.c, dump.c, hv.c, mg.c, universal.c, perlio.c
+c2 = perl.c, perly.c, pp.c, pp_hot.c, pp_ctl.c, pp_sys.c, regcomp.c, regexec.c $(MALLOC_C)
+c3 = gv.c, sv.c, taint.c, toke.c, util.c, deb.c, run.c, globals.c, vms.c, byterun.c $(SOCKCLIS)
+
+c = $(c1), $(c2), $(c3), miniperlmain.c, perlmain.c, byteperl.c
+
+obj1 = perl$(O), gv$(O), toke$(O), perly$(O), op$(O), regcomp$(O), dump$(O), util$(O), mg$(O), perlio$(O) $(MALLOC_O)
+obj2 = hv$(O), av$(O), run$(O), pp_hot$(O), sv$(O), pp$(O), scope$(O), pp_ctl$(O), pp_sys$(O)
+obj3 = doop$(O), doio$(O), regexec$(O), taint$(O), deb$(O), universal$(O), globals$(O), vms$(O), byterun$(O) $(SOCKOBJ)
+
+obj = $(obj1), $(obj2), $(obj3)
+
+ac1 = $(ARCHCORE)EXTERN.h $(ARCHCORE)INTERN.h $(ARCHCORE)XSUB.h $(ARCHCORE)av.h
+ac2 = $(ARCHCORE)config.h $(ARCHCORE)cop.h $(ARCHCORE)cv.h $(ARCHCORE)embed.h
+ac3 = $(ARCHCORE)form.h $(ARCHCORE)gv.h $(ARCHCORE)handy.h $(ARCHCORE)hv.h
+ac4 = $(ARCHCORE)keywords.h $(ARCHCORE)mg.h $(ARCHCORE)op.h $(ARCHCORE)opcode.h
+ac5 = $(ARCHCORE)patchlevel.h $(ARCHCORE)perl.h $(ARCHCORE)perly.h $(ARCHCORE)thread.h $(ARCHCORE)iperlsys.h
+ac6 = $(ARCHCORE)pp.h $(ARCHCORE)proto.h $(ARCHCORE)regcomp.h $(ARCHCORE)perlsdio.h $(ARCHCORE)perlio.h
+ac7 = $(ARCHCORE)regexp.h $(ARCHCORE)scope.h $(ARCHCORE)sv.h $(ARCHCORE)util.h
+ac8 = $(ARCHCORE)embedvar.h $(ARCHCORE)intrpvar.h $(ARCHCORE)perlvars.h $(ARCHCORE)thrdvar.h
+ac9 = $(ARCHCORE)vmsish.h $(ARCHCORE)$(DBG)libperl$(OLB) $(ARCHCORE)perlshr_attr.opt
+ac10 = $(ARCHCORE)$(DBG)perlshr_bld.opt $(ARCHCORE)bytecode.h $(ARCHCORE)byterun.h
+.ifdef SOCKET
+acs = $(ARCHCORE)$(SOCKH)
+.else
+acs =
+.endif
+
+
+CRTL = []crtl.opt
+CRTLOPTS =,$(CRTL)/Options
+
+.SUFFIXES
+
+.ifdef LINK_ONLY
+.else
+.SUFFIXES $(O) .c .xs
+
+.xs.c :
+ $(XSUBPP) $(MMS$SOURCE) >$(MMS$TARGET)
+
+
+.c$(O) :
+ $(CC) $(CFLAGS) $(MMS$SOURCE)
+
+.xs$(O) :
+ $(XSUBPP) $(MMS$SOURCE) >$(MMS$SOURCE_NAME).c
+ $(CC) $(CFLAGS) $(MMS$SOURCE_NAME).c
+.endif
+
+# Modules which must be installed before we can build extensions
+LIBPREREQ = $(ARCHDIR)Config.pm [.lib]DynaLoader.pm [.lib]vmsish.pm [.lib.VMS]Filespec.pm [.lib.ExtUtils]XSSymSet.pm
+
+utils1 = [.lib.pod]perldoc.com [.lib.ExtUtils]Miniperl.pm [.utils]c2ph.com [.utils]h2ph.com [.utils]h2xs.com [.lib]perlbug.com
+utils2 = [.lib]splain.com [.utils]pl2pm.com
+
+.ifdef NOX2P
+all : base extras archcorefiles preplibrary perlpods
+ @ $(NOOP)
+.else
+all : base extras x2p archcorefiles preplibrary perlpods
+ @ $(NOOP)
+.endif
+base : miniperl perl
+ @ $(NOOP)
+#extras : Fcntl IO Opcode attrs Stdio DCLsym B $(POSIX) $(THREAD) SDBM_File libmods utils podxform
+extras : $extensions libmods utils podxform
+ @ $(NOOP)
+libmods : $(LIBPREREQ)
+ @ $(NOOP)
+utils : $(utils1) $(utils2)
+ @ $(NOOP)
+podxform : [.lib.pod]pod2text.com [.lib.pod]pod2html.com [.lib.pod]pod2latex.com [.lib.pod]pod2man.com
+ @ $(NOOP)
+x2p : [.x2p]a2p$(E) [.x2p]s2p.com [.x2p]find2perl.com
+ @ $(NOOP)
+
+pod1 = [.lib.pod]perl.pod [.lib.pod]perlapio.pod [.lib.pod]perlbook.pod [.lib.pod]perlbot.pod [.lib.pod]perlcall.pod
+pod2 = [.lib.pod]perldata.pod [.lib.pod]perldebug.pod [.lib.pod]perldelta.pod [.lib.pod]perldiag.pod [.lib.pod]perldsc.pod
+pod3 = [.lib.pod]perlembed.pod [.lib.pod]perlform.pod [.lib.pod]perlfunc.pod [.lib.pod]perlguts.pod
+pod4 = [.lib.pod]perlipc.pod [.lib.pod]perllocale.pod [.lib.pod]perllol.pod [.lib.pod]perlmod.pod [.lib.pod]perlobj.pod
+pod5 = [.lib.pod]perlop.pod [.lib.pod]perlpod.pod [.lib.pod]perlre.pod [.lib.pod]perlref.pod [.lib.pod]perlrun.pod
+pod6 = [.lib.pod]perlsec.pod [.lib.pod]perlstyle.pod [.lib.pod]perlsub.pod [.lib.pod]perlsyn.pod
+pod7 = [.lib.pod]perltie.pod [.lib.pod]perltoc.pod [.lib.pod]perltoot.pod
+pod8 = [.lib.pod]perltrap.pod [.lib.pod]perlvar.pod [.lib.pod]perlxs.pod [.lib.pod]perlxstut.pod
+
+perlpods : $(pod1) $(pod2) $(pod3) $(pod4) $(pod5) $(pod6) $(pod7) $(pod8) [.lib.pod]perlvms.pod
+ @ $(NOOP)
+
+archcorefiles : $(ac1) $(ac2) $(ac3) $(ac4) $(ac5) $(ac6) $(ac7) $(ac8) $(ac9) $(ac10) $(acs) $(acth) $(ARCHAUTO)time.stamp
+ @ $(NOOP)
+
+miniperl : $(DBG)miniperl$(E)
+ @ Continue
+$(MINIPERL_EXE) : miniperlmain$(O), $(DBG)libperl$(OLB) $(CRTL)
+ Link $(LINKFLAGS)/NoDebug/Trace/NoMap/NoFull/NoCross/Exe=$(MMS$TARGET) miniperlmain$(O), $(DBG)libperl$(OLB)/Library/Include=globals $(CRTLOPTS)
+$(DBG)miniperl$(E) : miniperlmain$(O), $(DBG)libperl$(OLB) $(CRTL)
+ Link $(LINKFLAGS)/Trace/Exe=$(MMS$TARGET) miniperlmain$(O),$(DBG)libperl$(OLB)/Library/Include=globals $(CRTLOPTS)
+
+$(DBG)libperl$(OLB) : $(obj)
+ @ If F$Search("$(MMS$TARGET)").eqs."" Then Library/Object/Create $(MMS$TARGET)
+ Library/Object/Replace $(MMS$TARGET) $(obj1)
+ Library/Object/Replace $(MMS$TARGET) $(obj2)
+ Library/Object/Replace $(MMS$TARGET) $(obj3)
+
+perlmain.c : miniperlmain.c $(MINIPERL_EXE) [.vms]writemain.pl
+ $(MINIPERL) [.VMS]Writemain.pl "$(EXT)"
+
+byteperl.c : [.ext.B]byteperl.c
+ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+
+.ifdef __DEBUG__
+# Link an extra perl that doesn't invoke the debugger
+perl : $(DBG)perl$(E) $(DBG)byteperl$(E)
+ Link $(LINKFLAGS)/NoDebug/Trace/NoMap/NoCross/NoFull/Exe=N$(DBG)perl$(E) perlmain$(O), perlshr.opt/Option, perlshr_attr.opt/Option $(CRTLOPTS)
+ Link $(LINKFLAGS)/NoDebug/Trace/NoMap/NoCross/NoFull/Exe=N$(DBG)byteperl$(E) byteperl$(O), perlshr.opt/Option, perlshr_attr.opt/Option $(CRTLOPTS)
+.else
+perl : $(DBG)perl$(E) $(DBG)byteperl$(E)
+ @ Continue
+.endif
+
+$(DBG)perl$(E) : perlmain$(O), $(DBG)perlshr$(E), $(MINIPERL_EXE)
+ @ @[.vms]genopt "PerlShr.Opt/Write" "|" "''F$Environment("Default")'$(DBG)PerlShr$(E)/Share"
+.ifdef MT
+ Link $(LINKFLAGS)/Exe=$(MMS$TARGET) perlmain$(O), perlshr.opt/Option, perlshr_attr.opt/Option $(CRTLOPTS)/THREAD=(MULTI,UPCALL)
+.else
+ Link $(LINKFLAGS)/Exe=$(MMS$TARGET) perlmain$(O), perlshr.opt/Option, perlshr_attr.opt/Option $(CRTLOPTS)
+.endif
+
+$(DBG)byteperl$(E) : byteperl$(O), $(DBG)perlshr$(E), $(MINIPERL_EXE)
+ @ @[.vms]genopt "PerlShr.Opt/Write" "|" "''F$Environment("Default")'$(DBG)PerlShr$(E)/Share"
+ Link $(LINKFLAGS)/Exe=$(MMS$TARGET) byteperl$(O), perlshr.opt/Option, perlshr_attr.opt/Option $(CRTLOPTS)
+
+$(DBG)perlshr$(E) : $(DBG)libperl$(OLB) $(extobj) $(DBG)perlshr_xtras.ts
+ Link $(LINKFLAGS)/Share=$(MMS$TARGET) $(extobj) []$(DBG)perlshr_bld.opt/Option, perlshr_attr.opt/Option
+
+# The following files are built in one go by gen_shrfls.pl:
+# perlshr_attr.opt, $(DBG)perlshr_bld.opt - VAX and AXP
+# perlshr_gbl*.mar, perlshr_gbl*$(O) - VAX only
+# The song and dance with gen_shrfls.opt accomodates DCL's 255 character
+# line length limit.
+.ifdef PIPES_BROKEN
+# This is a backup target used only with older versions of the DECCRTL which
+# can't deal with pipes properly. See ReadMe.VMS for details.
+$(DBG)perlshr_xtras.ts : perl.h config.h vmsish.h proto.h [.vms]gen_shrfls.pl $(MINIPERL_EXE) $(MAKEFILE) $(CRTL)
+ $(CC) $(CFLAGS)/NoObject/NoList/PreProcess=perl.i perl.h
+ @ $(MINIPERL) -e "print join('|',@ARGV),'|';" "~~NOCC~~perl.i~~$(CC)$(CFLAGS)" >gen_shrfls.opt
+ @ $(MINIPERL) -e "print join('|',@ARGV);" "$(O)" "$(DBG)" "$(OLB)" "$(EXT)" "$(CRTL)" >>gen_shrfls.opt
+ $(MINIPERL) [.vms]gen_shrfls.pl -f gen_shrfls.opt
+ @ Delete/NoLog/NoConfirm perl.i;, gen_shrfls.opt;
+ @ If F$Search("$(DBG)perlshr_xtras.ts").nes."" Then Delete/NoLog/NoConfirm $(DBG)perlshr_xtras.ts;*
+ @ Copy _NLA0: $(DBG)perlshr_xtras.ts
+.else
+$(DBG)perlshr_xtras.ts : perl.h config.h vmsish.h proto.h [.vms]gen_shrfls.pl $(MINIPERL_EXE) $(MAKEFILE) $(CRTL)
+ @ $(MINIPERL) -e "print join('|',@ARGV),'|';" "$(CC)$(CFLAGS)" >gen_shrfls.opt
+ @ $(MINIPERL) -e "print join('|',@ARGV);" "$(O)" "$(DBG)" "$(OLB)" "$(EXT)" "$(CRTL)" >>gen_shrfls.opt
+ $(MINIPERL) [.vms]gen_shrfls.pl -f gen_shrfls.opt
+ @ Delete/NoLog/NoConfirm gen_shrfls.opt;
+ @ If F$Search("$(DBG)perlshr_xtras.ts").nes."" Then Delete/NoLog/NoConfirm $(DBG)perlshr_xtras.ts;*
+ @ Copy _NLA0: $(DBG)perlshr_xtras.ts
+.endif
+
+$(ARCHDIR)config.pm : [.lib]config.pm
+ Create/Directory $(ARCHDIR)
+ Copy $(MMS$SOURCE) $(MMS$TARGET)
+
+[.lib]config.pm : config.h $(MINIPERL_EXE) [.lib]re.pm
+ $(MINIPERL) ConfigPM.
+
+[.ext.dynaloader]dl_vms.c : [.ext.dynaloader]dl_vms.xs $(ARCHDIR)Config.pm [.lib.ExtUtils]XSSymSet.pm $(MINIPERL_EXE)
+ $(XSUBPP) $(MMS$SOURCE) >$(MMS$TARGET)
+
+[.ext.dynaloader]dl_vms$(O) : [.ext.dynaloader]dl_vms.c
+ $(CC) $(CFLAGS) /Include=([],[.ext.dynaloader])/Object=$(MMS$TARGET) $(MMS$SOURCE)
+
+[.lib]DynaLoader.pm : [.ext.dynaloader]dynaloader.pm
+ Copy/Log/NoConfirm [.ext.dynaloader]dynaloader.pm [.lib]DynaLoader.pm
+ @ If F$Search("[.lib]auto.dir").eqs."" Then Create/Directory [.lib.auto]
+ @ $(MINIPERL) -e "use AutoSplit; autosplit_lib_modules(@ARGV)" [.lib]DynaLoader.pm
+
+[.ext.dynaloader]dynaloader.pm : [.ext.dynaloader]dynaloader_pm.pl
+ $(MINIPERL) $(MMS$SOURCE)
+ @ Rename/Log dynaloader.pm [.ext.dynaloader]
+
+Opcode : [.lib]Opcode.pm [.lib]ops.pm [.lib]Safe.pm [.lib.auto.Opcode]Opcode$(E)
+ @ $(NOOP)
+
+[.lib]Opcode.pm : [.ext.Opcode]Descrip.MMS
+ @ If F$Search("[.lib]auto.dir").eqs."" Then Create/Directory [.lib.auto]
+ @ Set Default [.ext.Opcode]
+ $(MMS)
+ @ Set Default [--]
+
+[.lib]ops.pm : [.ext.Opcode]Descrip.MMS
+ @ If F$Search("[.lib]auto.dir").eqs."" Then Create/Directory [.lib.auto]
+ @ Set Default [.ext.Opcode]
+ $(MMS)
+ @ Set Default [--]
+
+[.lib]Safe.pm : [.ext.Opcode]Descrip.MMS
+ @ If F$Search("[.lib]auto.dir").eqs."" Then Create/Directory [.lib.auto]
+ @ Set Default [.ext.Opcode]
+ $(MMS)
+ @ Set Default [--]
+
+[.lib.auto.Opcode]Opcode$(E) : [.ext.Opcode]Descrip.MMS
+ @ Set Default [.ext.Opcode]
+ $(MMS)
+ @ Set Default [--]
+
+# Add "-I[--.lib]" t $(MINIPERL) so we use this copy of lib after C<chdir>
+# ${@} necessary to distract different versions of MM[SK]/make
+[.ext.Opcode]Descrip.MMS : [.ext.Opcode]Makefile.PL $(LIBPREREQ) $(DBG)perlshr$(E)
+ $(MINIPERL) "-I[--.lib]" -e "chdir('[.ext.Opcode]') or die $!; do 'Makefile.PL'; print ${@} if ${@};" "INST_LIB=[--.lib]" "INST_ARCHLIB=[--.lib]"
+
+Fcntl : [.lib]Fcntl.pm [.lib.auto.Fcntl]Fcntl$(E)
+ @ $(NOOP)
+
+[.lib]Fcntl.pm : [.ext.Fcntl]Descrip.MMS
+ @ If F$Search("[.lib]auto.dir").eqs."" Then Create/Directory [.lib.auto]
+ @ Set Default [.ext.Fcntl]
+ $(MMS)
+ @ Set Default [--]
+
+[.lib.auto.Fcntl]Fcntl$(E) : [.ext.Fcntl]Descrip.MMS
+ @ Set Default [.ext.Fcntl]
+ $(MMS)
+ @ Set Default [--]
+
+# Add "-I[--.lib]" t $(MINIPERL) so we use this copy of lib after C<chdir>
+# ${@} necessary to distract different versions of MM[SK]/make
+[.ext.Fcntl]Descrip.MMS : [.ext.Fcntl]Makefile.PL $(LIBPREREQ) $(DBG)perlshr$(E)
+ $(MINIPERL) "-I[--.lib]" -e "chdir('[.ext.Fcntl]') or die $!; do 'Makefile.PL'; print ${@} if ${@};" "INST_LIB=[--.lib]" "INST_ARCHLIB=[--.lib]"
+
+Stdio : [.lib.vms]Stdio.pm [.lib.auto.vms.Stdio]Stdio$(E) [.t.lib]vms_stdio.t
+ @ $(NOOP)
+
+[.lib.vms]Stdio.pm : [.vms.ext.stdio]Descrip.MMS
+ @ If F$Search("[.lib]auto.dir").eqs."" Then Create/Directory [.lib.auto]
+ @ Set Default [.vms.ext.Stdio]
+ $(MMS)
+ @ Set Default [---]
+
+[.lib.auto.vms.Stdio]Stdio$(E) : [.vms.ext.Stdio]Descrip.MMS
+ @ Set Default [.vms.ext.Stdio]
+ $(MMS)
+ @ Set Default [---]
+
+[.t.lib]vms_stdio.t : [.vms.ext.Stdio]test.pl
+ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+
+# Add "-I[--.lib]" t $(MINIPERL) so we use this copy of lib after C<chdir>
+# ${@} necessary to distract different versions of MM[SK]/make
+[.vms.ext.stdio]Descrip.MMS : [.vms.ext.Stdio]Makefile.PL $(LIBPREREQ) $(DBG)perlshr$(E)
+ $(MINIPERL) "-I[---.lib]" -e "chdir('[.vms.ext.Stdio]') or die $!; do 'Makefile.PL'; print ${@} if ${@};" "INST_LIB=[---.lib]" "INST_ARCHLIB=[---.lib]"
+
+DCLsym : [.lib.vms]DCLsym.pm [.lib.auto.vms.DCLsym]DCLsym$(E) [.t.lib]vms_dclsym.t
+ @ $(NOOP)
+
+[.lib.vms]DCLsym.pm : [.vms.ext.dclsym]Descrip.MMS
+ @ If F$Search("[.lib]auto.dir").eqs."" Then Create/Directory [.lib.auto]
+ @ Set Default [.vms.ext.DCLsym]
+ $(MMS)
+ @ Set Default [---]
+
+[.lib.auto.vms.DCLsym]DCLsym$(E) : [.vms.ext.DCLsym]Descrip.MMS
+ @ Set Default [.vms.ext.DCLsym]
+ $(MMS)
+ @ Set Default [---]
+
+[.t.lib]vms_dclsym.t : [.vms.ext.DCLsym]test.pl
+ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+
+# Add "-I[--.lib]" t $(MINIPERL) so we use this copy of lib after C<chdir>
+# ${@} necessary to distract different versions of MM[SK]/make
+[.vms.ext.DCLsym]Descrip.MMS : [.vms.ext.DCLsym]Makefile.PL $(LIBPREREQ) $(DBG)perlshr$(E)
+ $(MINIPERL) "-I[---.lib]" -e "chdir('[.vms.ext.DCLsym]') or die $!; do 'Makefile.PL'; print ${@} if ${@};" "INST_LIB=[---.lib]" "INST_ARCHLIB=[---.lib]"
+
+attrs : [.lib]attrs.pm [.lib.auto.attrs]attrs$(E)
+ @ $(NOOP)
+
+[.lib]attrs.pm : [.ext.attrs]Descrip.MMS
+ @ If F$Search("[.lib]auto.dir").eqs."" Then Create/Directory [.lib.auto]
+ @ Set Default [.ext.attrs]
+ $(MMS)
+ @ Set Default [--]
+
+[.lib.auto.attrs]attrs$(E) : [.ext.attrs]Descrip.MMS
+ @ Set Default [.ext.attrs]
+ $(MMS)
+ @ Set Default [--]
+
+# Add "-I[--.lib]" t $(MINIPERL) so we use this copy of lib after C<chdir>
+# ${@} necessary to distract different versions of MM[SK]/make
+[.ext.attrs]Descrip.MMS : [.ext.Fcntl]Makefile.PL $(LIBPREREQ) $(DBG)perlshr$(E)
+ $(MINIPERL) "-I[--.lib]" -e "chdir('[.ext.attrs]') or die $!; do 'Makefile.PL'; print ${@} if ${@};" "INST_LIB=[--.lib]" "INST_ARCHLIB=[--.lib]"
+
+POSIX : [.lib]POSIX.pm [.lib.auto.POSIX]POSIX$(E)
+ @ $(NOOP)
+
+[.lib]POSIX.pm : [.ext.POSIX]Descrip.MMS
+ @ If F$Search("[.lib]auto.dir").eqs."" Then Create/Directory [.lib.auto]
+ @ Set Default [.ext.POSIX]
+ $(MMS)
+ @ Set Default [--]
+
+[.lib.auto.POSIX]POSIX$(E) : [.ext.POSIX]Descrip.MMS
+ @ Set Default [.ext.POSIX]
+ $(MMS)
+ @ Set Default [--]
+
+# Add "-I[--.lib]" t $(MINIPERL) so we use this copy of lib after C<chdir>
+# ${@} necessary to distract different versions of MM[SK]/make
+[.ext.POSIX]Descrip.MMS : [.ext.POSIX]Makefile.PL $(LIBPREREQ) $(DBG)perlshr$(E)
+ $(MINIPERL) "-I[--.lib]" -e "chdir('[.ext.POSIX]') or die $!; do 'Makefile.PL'; print ${@} if ${@};" "INST_LIB=[--.lib]" "INST_ARCHLIB=[--.lib]"
+
+Dumper : [.lib.data]dumper.pm [.lib.auto.data.dumper]dumper$(E)
+ @ $(NOOP)
+
+[.lib.data]dumper.pm : [.ext.data.dumper]Descrip.MMS
+ @ If F$Search("[.lib]auto.dir").eqs."" Then Create/Directory [.lib.auto]
+ @ Set Default [.ext.data.dumper]
+ $(MMS)
+ @ Set Default [---]
+
+[.lib.auto.data.dumper]dumper$(E) : [.ext.data.dumper]Descrip.MMS
+ @ Set Default [.ext.data.dumper]
+ $(MMS)
+ @ Set Default [---]
+
+# Add "-I[--.lib]" t $(MINIPERL) so we use this copy of lib after C<chdir>
+# ${@} necessary to distract different versions of MM[SK]/make
+[.ext.data.dumper]Descrip.MMS : [.ext.data.dumper]Makefile.PL $(LIBPREREQ) $(DBG)perlshr$(E)
+ $(MINIPERL) "-I[---.lib]" -e "chdir('[.ext.data.dumper]') or die $!; do 'Makefile.PL'; print ${@} if ${@};" "INST_LIB=[---.lib]" "INST_ARCHLIB=[---.lib]"
+
+re : [.lib]re.pm [.lib.auto.re]re$(E)
+ @ $(NOOP)
+
+[.lib]re.pm : [.ext.re]re.pm
+ @ If F$Search("[.lib]auto.dir").eqs."" Then Create/Directory [.lib.auto]
+ @ copy [.ext.re]re.pm [.lib]re.pm
+
+[.lib.auto.re]re$(E) : [.ext.re]Descrip.MMS
+ @ If F$Search("[.lib]auto.dir").eqs."" Then Create/Directory [.lib.auto]
+ @ Set Default [.ext.re]
+ $(MMS)
+ @ Set Default [--]
+
+# Add "-I[--.lib]" t $(MINIPERL) so we use this copy of lib after C<chdir>
+# ${@} necessary to distract different versions of MM[SK]/make
+[.ext.re]Descrip.MMS : [.ext.re]Makefile.PL $(LIBPREREQ) $(DBG)perlshr$(E)
+ $(MINIPERL) "-I[--.lib]" -e "chdir('[.ext.re]') or die $!; do 'Makefile.PL'; print ${@} if ${@};" "INST_LIB=[--.lib]" "INST_ARCHLIB=[--.lib]"
+
+THREAD : [.lib]THREAD.pm [.lib.auto.THREAD]THREAD$(E)
+ @ $(NOOP)
+
+[.lib]THREAD.pm : [.ext.THREAD]Descrip.MMS
+ @ If F$Search("[.lib]auto.dir").eqs."" Then Create/Directory [.lib.auto]
+ @ Set Default [.ext.THREAD]
+ $(MMS)
+ @ Set Default [--]
+
+[.lib.auto.THREAD]THREAD$(E) : [.ext.THREAD]Descrip.MMS
+ @ Set Default [.ext.THREAD]
+ $(MMS)
+ @ Set Default [--]
+
+# Add "-I[--.lib]" t $(MINIPERL) so we use this copy of lib after C<chdir>
+# ${@} necessary to distract different versions of MM[SK]/make
+[.ext.THREAD]Descrip.MMS : [.ext.THREAD]Makefile.PL $(LIBPREREQ) $(DBG)perlshr$(E)
+ $(MINIPERL) "-I[--.lib]" -e "chdir('[.ext.THREAD]') or die $!; do 'Makefile.PL'; print ${@} if ${@};" "INST_LIB=[--.lib]" "INST_ARCHLIB=[--.lib]"
+
+Errno : [.lib]Errno.pm
+ @ $(NOOP)
+
+[.lib]Errno.pm : [.ext.Errno]Descrip.MMS
+ @ If F$Search("[.lib]auto.dir").eqs."" Then Create/Directory [.lib.auto]
+ @ Set Default [.ext.Errno]
+ $(MMS)
+ @ Set Default [--]
+
+# Add "-I[--.lib]" t $(MINIPERL) so we use this copy of lib after C<chdir>
+# ${@} necessary to distract different versions of MM[SK]/make
+[.ext.Errno]Descrip.MMS : [.ext.Errno]Makefile.PL $(LIBPREREQ) $(DBG)perlshr$(E)
+ $(MINIPERL) "-I[--.lib]" -e "chdir('[.ext.Errno]') or die $!; do 'Makefile.PL'; print ${@} if ${@};" "INST_LIB=[--.lib]" "INST_ARCHLIB=[--.lib]"
+
+SDBM_File : [.lib]SDBM_File.pm [.lib.auto.SDBM_File]SDBM_File$(E)
+ @ $(NOOP)
+
+[.lib]SDBM_File.pm : [.ext.SDBM_File]Descrip.MMS
+ @ If F$Search("[.lib]auto.dir").eqs."" Then Create/Directory [.lib.auto]
+ @ If F$Search("[.lib.auto]sdbm.dir").eqs."" Then Create/Directory [.lib.auto.sdbm]
+ @ Set Default [.ext.SDBM_File]
+ $(MMS)
+ @ Set Default [--]
+
+[.lib.auto.SDBM_File]SDBM_File$(E) : [.ext.SDBM_File]Descrip.MMS
+ @ Set Default [.ext.SDBM_File]
+ $(MMS)
+ @ Set Default [--]
+
+# Add "-I[--.lib]" t $(MINIPERL) so we use this copy of lib after C<chdir>
+# ${@} necessary to distract different versions of MM[SK]/make
+[.ext.SDBM_File]Descrip.MMS : [.ext.SDBM_File]Makefile.PL $(LIBPREREQ) $(DBG)perlshr$(E)
+ $(MINIPERL) "-I[--.lib]" -e "chdir('[.ext.SDBM_File]') or die $!; do 'Makefile.PL'; print ${@} if ${@};" "INST_LIB=[--.lib]" "INST_ARCHLIB=[--.lib]"
+
+IO : [.lib]IO.pm [.lib.IO]File.pm [.lib.IO]Handle.pm [.lib.IO]Pipe.pm [.lib.IO]Seekable.pm [.lib.IO]Socket.pm [.lib.auto.IO]IO$(E)
+ @ $(NOOP)
+
+[.lib]IO.pm : [.ext.IO]Descrip.MMS
+ @ If F$Search("[.lib]auto.dir").eqs."" Then Create/Directory [.lib.auto]
+ @ Set Default [.ext.IO]
+ $(MMS)
+ @ Set Default [--]
+
+[.lib.IO]File.pm : [.ext.IO]Descrip.MMS
+ @ If F$Search("[.lib]auto.dir").eqs."" Then Create/Directory [.lib.auto]
+ @ Set Default [.ext.IO]
+ $(MMS)
+ @ Set Default [--]
+
+[.lib.IO]Handle.pm : [.ext.IO]Descrip.MMS
+ @ If F$Search("[.lib]auto.dir").eqs."" Then Create/Directory [.lib.auto]
+ @ Set Default [.ext.IO]
+ $(MMS)
+ @ Set Default [--]
+
+[.lib.IO]Pipe.pm : [.ext.IO]Descrip.MMS
+ @ If F$Search("[.lib]auto.dir").eqs."" Then Create/Directory [.lib.auto]
+ @ Set Default [.ext.IO]
+ $(MMS)
+ @ Set Default [--]
+
+[.lib.IO]Seekable.pm : [.ext.IO]Descrip.MMS
+ @ If F$Search("[.lib]auto.dir").eqs."" Then Create/Directory [.lib.auto]
+ @ Set Default [.ext.IO]
+ $(MMS)
+ @ Set Default [--]
+
+[.lib.IO]Socket.pm : [.ext.IO]Descrip.MMS
+ @ If F$Search("[.lib]auto.dir").eqs."" Then Create/Directory [.lib.auto]
+ @ Set Default [.ext.IO]
+ $(MMS)
+ @ Set Default [--]
+
+[.lib.auto.IO]IO$(E) : [.ext.IO]Descrip.MMS
+ @ If F$Search("[.lib]auto.dir").eqs."" Then Create/Directory [.lib.auto]
+ @ Set Default [.ext.IO]
+ $(MMS)
+ @ Set Default [--]
+
+# Add "-I[--.lib]" t $(MINIPERL) so we use this copy of lib after C<chdir>
+# ${@} necessary to distract different versions of MM[SK]/make
+[.ext.IO]Descrip.MMS : [.ext.IO]Makefile.PL $(LIBPREREQ) $(DBG)perlshr$(E)
+ $(MINIPERL) "-I[--.lib]" -e "chdir('[.ext.IO]') or die $!; do 'Makefile.PL'; print ${@} if ${@};" "INST_LIB=[--.lib]" "INST_ARCHLIB=[--.lib]"
+
+B : [.lib]B.pm [.lib]O.pm [.lib.B]Asmdata.pm [.lib.B]Assembler.pm [.lib.B]Bblock.pm [.lib.B]Bytecode.pm [.lib.B]C.pm [.lib.B]CC.pm [.lib.B]Debug.pm [.lib.B]Deparse.pm [.lib.B]Disassembler.pm [.lib.B]Lint.pm [.lib.B]Showlex.pm [.lib.B]Stackobj.pm [.lib.B]Terse.pm [.lib.B]Xref.pm [.lib.auto.B]B$(E)
+ @ $(NOOP)
+
+[.lib]B.pm : [.ext.B]Descrip.MMS
+ @ If F$Search("[.lib]auto.dir").eqs."" Then Create/Directory [.lib.auto]
+ @ Set Default [.ext.B]
+ $(MMS)
+ @ Set Default [--]
+
+[.lib]O.pm : [.ext.B]Descrip.MMS
+ @ If F$Search("[.lib]auto.dir").eqs."" Then Create/Directory [.lib.auto]
+ @ Set Default [.ext.B]
+ $(MMS)
+ @ Set Default [--]
+
+[.lib.B]Asmdata.pm : [.ext.B]Descrip.MMS
+ @ If F$Search("[.lib]auto.dir").eqs."" Then Create/Directory [.lib.auto]
+ @ Set Default [.ext.B]
+ $(MMS)
+ @ Set Default [--]
+
+[.lib.B]Assembler.pm : [.ext.B]Descrip.MMS
+ @ If F$Search("[.lib]auto.dir").eqs."" Then Create/Directory [.lib.auto]
+ @ Set Default [.ext.B]
+ $(MMS)
+ @ Set Default [--]
+
+[.lib.B]Bblock.pm : [.ext.B]Descrip.MMS
+ @ If F$Search("[.lib]auto.dir").eqs."" Then Create/Directory [.lib.auto]
+ @ Set Default [.ext.B]
+ $(MMS)
+ @ Set Default [--]
+
+[.lib.B]Bytecode.pm : [.ext.B]Descrip.MMS
+ @ If F$Search("[.lib]auto.dir").eqs."" Then Create/Directory [.lib.auto]
+ @ Set Default [.ext.B]
+ $(MMS)
+ @ Set Default [--]
+
+[.lib.B]C.pm : [.ext.B]Descrip.MMS
+ @ If F$Search("[.lib]auto.dir").eqs."" Then Create/Directory [.lib.auto]
+ @ Set Default [.ext.B]
+ $(MMS)
+ @ Set Default [--]
+
+[.lib.B]CC.pm : [.ext.B]Descrip.MMS
+ @ If F$Search("[.lib]auto.dir").eqs."" Then Create/Directory [.lib.auto]
+ @ Set Default [.ext.B]
+ $(MMS)
+ @ Set Default [--]
+
+[.lib.B]Debug.pm : [.ext.B]Descrip.MMS
+ @ If F$Search("[.lib]auto.dir").eqs."" Then Create/Directory [.lib.auto]
+ @ Set Default [.ext.B]
+ $(MMS)
+ @ Set Default [--]
+
+[.lib.B]Deparse.pm : [.ext.B]Descrip.MMS
+ @ If F$Search("[.lib]auto.dir").eqs."" Then Create/Directory [.lib.auto]
+ @ Set Default [.ext.B]
+ $(MMS)
+ @ Set Default [--]
+
+[.lib.B]Disassembler.pm : [.ext.B]Descrip.MMS
+ @ If F$Search("[.lib]auto.dir").eqs."" Then Create/Directory [.lib.auto]
+ @ Set Default [.ext.B]
+ $(MMS)
+ @ Set Default [--]
+
+[.lib.B]Lint.pm : [.ext.B]Descrip.MMS
+ @ If F$Search("[.lib]auto.dir").eqs."" Then Create/Directory [.lib.auto]
+ @ Set Default [.ext.B]
+ $(MMS)
+ @ Set Default [--]
+
+[.lib.B]Showlex.pm : [.ext.B]Descrip.MMS
+ @ If F$Search("[.lib]auto.dir").eqs."" Then Create/Directory [.lib.auto]
+ @ Set Default [.ext.B]
+ $(MMS)
+ @ Set Default [--]
+
+[.lib.B]Stackobj.pm : [.ext.B]Descrip.MMS
+ @ If F$Search("[.lib]auto.dir").eqs."" Then Create/Directory [.lib.auto]
+ @ Set Default [.ext.B]
+ $(MMS)
+ @ Set Default [--]
+
+[.lib.B]Terse.pm : [.ext.B]Descrip.MMS
+ @ If F$Search("[.lib]auto.dir").eqs."" Then Create/Directory [.lib.auto]
+ @ Set Default [.ext.B]
+ $(MMS)
+ @ Set Default [--]
+
+[.lib.B]Xref.pm : [.ext.B]Descrip.MMS
+ @ If F$Search("[.lib]auto.dir").eqs."" Then Create/Directory [.lib.auto]
+ @ Set Default [.ext.B]
+ $(MMS)
+ @ Set Default [--]
+
+[.lib.auto.B]B$(E) : [.ext.B]Descrip.MMS
+ @ If F$Search("[.lib]auto.dir").eqs."" Then Create/Directory [.lib.auto]
+ @ Set Default [.ext.B]
+ $(MMS)
+ @ Set Default [--]
+
+# Add "-I[--.lib]" t $(MINIPERL) so we use this copy of lib after C<chdir>
+# ${@} necessary to distract different versions of MM[SK]/make
+[.ext.B]Descrip.MMS : [.ext.B]Makefile.PL $(LIBPREREQ) $(DBG)perlshr$(E)
+ $(MINIPERL) "-I[--.lib]" -e "chdir('[.ext.B]') or die $!; do 'Makefile.PL'; print ${@} if ${@};" "INST_LIB=[--.lib]" "INST_ARCHLIB=[--.lib]"
+
+[.lib]vmsish.pm : [.vms.ext]vmsish.pm
+ Copy/Log/NoConfirm $(MMS$SOURCE) $(MMS$TARGET)
+
+[.lib.VMS]Filespec.pm : [.vms.ext]Filespec.pm
+ @ If F$Search("[.lib]VMS.Dir").eqs."" Then Create/Directory [.lib.VMS]
+ Copy/Log/NoConfirm $(MMS$SOURCE) $(MMS$TARGET)
+
+[.lib.ExtUtils]XSSymSet.pm : [.vms.ext]XSSymSet.pm
+ @ If F$Search("[.lib]VMS.Dir").eqs."" Then Create/Directory [.lib.VMS]
+ Copy/Log/NoConfirm $(MMS$SOURCE) $(MMS$TARGET)
+
+[.lib.pod]perldoc.com : [.utils]perldoc.PL $(ARCHDIR)Config.pm
+ @ If F$Search("[.lib]pod.dir").eqs."" Then Create/Directory [.lib.pod]
+ $(MINIPERL) $(MMS$SOURCE)
+ Copy/Log [.utils]perldoc.com $(MMS$TARGET)
+
+[.lib.ExtUtils]Miniperl.pm : Minimod.PL miniperlmain.c $(ARCHDIR)Config.pm
+ $(MINIPERL) $(MMS$SOURCE) >$(MMS$TARGET)
+
+[.utils]c2ph.com : [.utils]c2ph.PL $(ARCHDIR)Config.pm
+ $(MINIPERL) $(MMS$SOURCE)
+
+[.utils]h2ph.com : [.utils]h2ph.PL $(ARCHDIR)Config.pm
+ $(MINIPERL) $(MMS$SOURCE)
+
+[.utils]h2xs.com : [.utils]h2xs.PL $(ARCHDIR)Config.pm
+ $(MINIPERL) $(MMS$SOURCE)
+
+[.lib]perlbug.com : [.utils]perlbug.PL $(ARCHDIR)Config.pm
+ $(MINIPERL) $(MMS$SOURCE)
+ Copy/Log [.utils]perlbug.com $(MMS$TARGET)
+
+[.utils]pl2pm.com : [.utils]pl2pm.PL $(ARCHDIR)Config.pm
+ $(MINIPERL) $(MMS$SOURCE)
+
+[.lib]splain.com : [.utils]splain.PL $(ARCHDIR)Config.pm
+ $(MINIPERL) $(MMS$SOURCE)
+ Copy/Log [.utils]splain.com $(MMS$TARGET)
+
+[.x2p]find2perl.com : [.x2p]find2perl.PL $(ARCHDIR)Config.pm
+ $(MINIPERL) $(MMS$SOURCE)
+
+[.x2p]s2p.com : [.x2p]s2p.PL $(ARCHDIR)Config.pm
+ $(MINIPERL) $(MMS$SOURCE)
+
+# Rename catches problem with some DECC versions in which object file is
+# placed in current default dir, not same one as source file.
+[.x2p]$(DBG)a2p$(E) : [.x2p]a2p$(O), [.x2p]hash$(O), [.x2p]str$(O), [.x2p]util$(O), [.x2p]walk$(O)
+ @ If F$Search("hash$(O)").nes."" Then Rename/NoLog hash$(O),str$(O),util$(O),walk$(O) [.x2p]
+ Link $(LINKFLAGS) /Exe=$(MMS$TARGET) $(MMS$SOURCE_LIST) $(CRTLOPTS)
+
+# Accomodate buggy cpp in some version of DECC, which chokes on illegal
+# filespec "y.tab.c", and broken gcc cpp, which doesn't start #include ""
+# search in same dir as source file
+[.x2p]a2p$(O) : [.x2p]a2p.c $(MINIPERL_EXE)
+ $(MINIPERL) -pe "s/^#line\s+(\d+)\s+\Q""y.tab.c""/#line $1 ""y_tab.c""/;" $(MMS$SOURCE) >$(MMS$TARGET_NAME)_vms.c
+ $(CC) $(X2PCFLAGS) /Object=$(MMS$TARGET)/Include=([.x2p],[]) $(MMS$TARGET_NAME)_vms.c
+ Delete/Log/NoConfirm $(MMS$TARGET_NAME)_vms.c;
+
+# gcc cpp broken -- doesn't look in directory of source file for #include ""
+.ifdef GNUC
+[.x2p]hash$(O) : [.x2p]hash.c
+ $(CC) $(X2PCFLAGS) /Include=[.x2p] $(MMS$SOURCE)
+
+[.x2p]str$(O) : [.x2p]str.c
+ $(CC) $(X2PCFLAGS) /Include=[.x2p] $(MMS$SOURCE)
+
+[.x2p]util$(O) : [.x2p]util.c
+ $(CC) $(X2PCFLAGS) /Include=[.x2p] $(MMS$SOURCE)
+
+[.x2p]walk$(O) : [.x2p]walk.c
+ $(CC) $(X2PCFLAGS) /Include=[.x2p] $(MMS$SOURCE)
+.endif
+
+[.lib.pod]pod2html.com : [.pod]pod2html.PL $(ARCHDIR)Config.pm
+ @ If F$Search("[.lib]pod.dir").eqs."" Then Create/Directory [.lib.pod]
+ $(MINIPERL) $(MMS$SOURCE)
+ Copy/Log [.pod]pod2html.com $(MMS$TARGET)
+
+[.lib.pod]pod2latex.com : [.pod]pod2latex.PL $(ARCHDIR)Config.pm
+ @ If F$Search("[.lib]pod.dir").eqs."" Then Create/Directory [.lib.pod]
+ $(MINIPERL) $(MMS$SOURCE)
+ Copy/Log [.pod]pod2latex.com $(MMS$TARGET)
+
+[.lib.pod]pod2man.com : [.pod]pod2man.PL $(ARCHDIR)Config.pm
+ @ If F$Search("[.lib]pod.dir").eqs."" Then Create/Directory [.lib.pod]
+ $(MINIPERL) $(MMS$SOURCE)
+ Copy/Log [.pod]pod2man.com $(MMS$TARGET)
+
+[.lib.pod]pod2text.com : [.pod]pod2text.PL $(ARCHDIR)Config.pm
+ @ If F$Search("[.lib]pod.dir").eqs."" Then Create/Directory [.lib.pod]
+ $(MINIPERL) $(MMS$SOURCE)
+ Copy/Log [.pod]pod2text.com $(MMS$TARGET)
+
+preplibrary : $(MINIPERL_EXE) $(LIBPREREQ) $(SOCKPM)
+ @ Write Sys$Output "Autosplitting Perl library . . ."
+ @ Create/Directory [.lib.auto]
+ @ $(MINIPERL) -e "use AutoSplit; autosplit_lib_modules(@ARGV)" [.lib]*.pm [.lib.*]*.pm
+
+[.lib.pod]perl.pod : [.pod]perl.pod
+ @ If F$Search("[.lib]pod.dir").eqs."" Then Create/Directory [.lib.pod]
+ @ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+
+[.lib.pod]perlapio.pod : [.pod]perlapio.pod
+ @ If F$Search("[.lib]pod.dir").eqs."" Then Create/Directory [.lib.pod]
+ @ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+
+[.lib.pod]perlbook.pod : [.pod]perlbook.pod
+ @ If F$Search("[.lib]pod.dir").eqs."" Then Create/Directory [.lib.pod]
+ @ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+
+[.lib.pod]perlbot.pod : [.pod]perlbot.pod
+ @ If F$Search("[.lib]pod.dir").eqs."" Then Create/Directory [.lib.pod]
+ @ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+
+[.lib.pod]perlcall.pod : [.pod]perlcall.pod
+ @ If F$Search("[.lib]pod.dir").eqs."" Then Create/Directory [.lib.pod]
+ @ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+
+[.lib.pod]perldata.pod : [.pod]perldata.pod
+ @ If F$Search("[.lib]pod.dir").eqs."" Then Create/Directory [.lib.pod]
+ @ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+
+[.lib.pod]perldebug.pod : [.pod]perldebug.pod
+ @ If F$Search("[.lib]pod.dir").eqs."" Then Create/Directory [.lib.pod]
+ @ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+
+[.lib.pod]perldelta.pod : [.pod]perldelta.pod
+ @ If F$Search("[.lib]pod.dir").eqs."" Then Create/Directory [.lib.pod]
+ @ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+
+[.lib.pod]perldiag.pod : [.pod]perldiag.pod
+ @ If F$Search("[.lib]pod.dir").eqs."" Then Create/Directory [.lib.pod]
+ @ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+
+[.lib.pod]perldsc.pod : [.pod]perldsc.pod
+ @ If F$Search("[.lib]pod.dir").eqs."" Then Create/Directory [.lib.pod]
+ @ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+
+[.lib.pod]perlembed.pod : [.pod]perlembed.pod
+ @ If F$Search("[.lib]pod.dir").eqs."" Then Create/Directory [.lib.pod]
+ @ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+
+[.lib.pod]perlform.pod : [.pod]perlform.pod
+ @ If F$Search("[.lib]pod.dir").eqs."" Then Create/Directory [.lib.pod]
+ @ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+
+[.lib.pod]perlfunc.pod : [.pod]perlfunc.pod
+ @ If F$Search("[.lib]pod.dir").eqs."" Then Create/Directory [.lib.pod]
+ @ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+
+[.lib.pod]perlguts.pod : [.pod]perlguts.pod
+ @ If F$Search("[.lib]pod.dir").eqs."" Then Create/Directory [.lib.pod]
+ @ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+
+[.lib.pod]perllocale.pod : [.pod]perllocale.pod
+ @ If F$Search("[.lib]pod.dir").eqs."" Then Create/Directory [.lib.pod]
+ @ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+
+[.lib.pod]perlipc.pod : [.pod]perlipc.pod
+ @ If F$Search("[.lib]pod.dir").eqs."" Then Create/Directory [.lib.pod]
+ @ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+
+[.lib.pod]perllol.pod : [.pod]perllol.pod
+ @ If F$Search("[.lib]pod.dir").eqs."" Then Create/Directory [.lib.pod]
+ @ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+
+[.lib.pod]perlmod.pod : [.pod]perlmod.pod
+ @ If F$Search("[.lib]pod.dir").eqs."" Then Create/Directory [.lib.pod]
+ @ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+
+[.lib.pod]perlobj.pod : [.pod]perlobj.pod
+ @ If F$Search("[.lib]pod.dir").eqs."" Then Create/Directory [.lib.pod]
+ @ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+
+[.lib.pod]perlop.pod : [.pod]perlop.pod
+ @ If F$Search("[.lib]pod.dir").eqs."" Then Create/Directory [.lib.pod]
+ @ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+
+[.lib.pod]perlpod.pod : [.pod]perlpod.pod
+ @ If F$Search("[.lib]pod.dir").eqs."" Then Create/Directory [.lib.pod]
+ @ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+
+[.lib.pod]perlre.pod : [.pod]perlre.pod
+ @ If F$Search("[.lib]pod.dir").eqs."" Then Create/Directory [.lib.pod]
+ @ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+
+[.lib.pod]perlref.pod : [.pod]perlref.pod
+ @ If F$Search("[.lib]pod.dir").eqs."" Then Create/Directory [.lib.pod]
+ @ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+
+[.lib.pod]perlrun.pod : [.pod]perlrun.pod
+ @ If F$Search("[.lib]pod.dir").eqs."" Then Create/Directory [.lib.pod]
+ @ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+
+[.lib.pod]perlsec.pod : [.pod]perlsec.pod
+ @ If F$Search("[.lib]pod.dir").eqs."" Then Create/Directory [.lib.pod]
+ @ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+
+[.lib.pod]perlstyle.pod : [.pod]perlstyle.pod
+ @ If F$Search("[.lib]pod.dir").eqs."" Then Create/Directory [.lib.pod]
+ @ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+
+[.lib.pod]perlsub.pod : [.pod]perlsub.pod
+ @ If F$Search("[.lib]pod.dir").eqs."" Then Create/Directory [.lib.pod]
+ @ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+
+[.lib.pod]perlsyn.pod : [.pod]perlsyn.pod
+ @ If F$Search("[.lib]pod.dir").eqs."" Then Create/Directory [.lib.pod]
+ @ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+
+[.lib.pod]perltie.pod : [.pod]perltie.pod
+ @ If F$Search("[.lib]pod.dir").eqs."" Then Create/Directory [.lib.pod]
+ @ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+
+[.lib.pod]perltoc.pod : [.pod]perltoc.pod
+ @ If F$Search("[.lib]pod.dir").eqs."" Then Create/Directory [.lib.pod]
+ @ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+
+[.lib.pod]perltoot.pod : [.pod]perltoot.pod
+ @ If F$Search("[.lib]pod.dir").eqs."" Then Create/Directory [.lib.pod]
+ @ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+
+[.lib.pod]perltrap.pod : [.pod]perltrap.pod
+ @ If F$Search("[.lib]pod.dir").eqs."" Then Create/Directory [.lib.pod]
+ @ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+
+[.lib.pod]perlvar.pod : [.pod]perlvar.pod
+ @ If F$Search("[.lib]pod.dir").eqs."" Then Create/Directory [.lib.pod]
+ @ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+
+[.lib.pod]perlxs.pod : [.pod]perlxs.pod
+ @ If F$Search("[.lib]pod.dir").eqs."" Then Create/Directory [.lib.pod]
+ @ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+
+[.lib.pod]perlxstut.pod : [.pod]perlxstut.pod
+ @ If F$Search("[.lib]pod.dir").eqs."" Then Create/Directory [.lib.pod]
+ @ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+
+[.lib.pod]perlvms.pod : [.vms]perlvms.pod
+ @ If F$Search("[.lib]pod.dir").eqs."" Then Create/Directory [.lib.pod]
+ @ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+
+printconfig :
+ @ @[.vms]make_command $(MMS) $(MMSQUALIFIERS) $(MMSTARGETS)
+ @ @[.vms]myconfig "$(CC)" "$(CFLAGS)" "$(LINKFLAGS)" "$(LIBS1)" "$(FULLLIBS2)" "$(SOCKLIB)" "$(EXT)" "$(DBG)"
+
+.ifdef SOCKET
+
+.ifdef LINK_ONLY
+.else
+[.ext.Socket]Socket$(O) : [.ext.Socket]Socket.c
+ $(CC) $(CFLAGS) /Object=$(MMS$TARGET) $(MMS$SOURCE)
+
+[.ext.Socket]Socket.c : [.ext.Socket]Socket.xs [.lib.ExtUtils]XSSymSet.pm $(MINIPERL_EXE)
+ $(XSUBPP) $(MMS$SOURCE) >$(MMS$TARGET)
+.endif # !LINK_ONLY
+
+vmsish.h : $(SOCKH)
+
+$(SOCKOBJ) : $(SOCKC) EXTERN.h perl.h config.h embed.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h perlio.h
+
+$(SOCKC) : [.vms]$(SOCKC)
+ Copy/Log/NoConfirm [.vms]$(SOCKC) []$(SOCKC)
+
+$(SOCKH) : [.vms]$(SOCKH)
+ Copy/Log/NoConfirm [.vms]$(SOCKH) []$(SOCKH)
+
+[.lib]Socket.pm : [.ext.Socket]Socket.pm
+ Copy/Log/NoConfirm $(MMS$SOURCE) $(MMS$TARGET)
+.endif
+
+# The following three header files are generated automatically
+# keywords.h : keywords.pl
+# opcode.h : opcode.pl
+# embed.h : embed.pl global.sym interp.sym
+# The correct versions should be already supplied with the perl kit,
+# in case you don't have perl available.
+# To force them to run, type
+# MMS regen_headers
+regen_headers :
+ $(INSTPERL) keywords.pl
+ $(INSTPERL) opcode.pl
+ $(INSTPERL) embed.pl
+
+# VMS uses modified perly.[ch] with tags for globaldefs if using DEC compiler
+perly.c : [.vms]perly_c.vms
+ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+perly.h : [.vms]perly_h.vms
+ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+
+# I now supply perly.c with the kits, so the following section is
+# commented out if you don't have byacc.
+# Altered for VMS by Charles Bailey bailey@genetics.upenn.edu
+# perly.c:
+# @ Write Sys$Output "Expect 80 shift/reduce and 62 reduce/reduce conflicts"
+# \$(BYACC) -d perly.y
+# Has to be done by hand or by POSIX shell under VMS
+# sh \$(shellflags) ./perly.fixer y.tab.c perly.c
+# rename y.tab.h perly.h
+# $(INSTPERL) [.vms]vms_yfix.pl perly.c perly.h [.vms]perly_c.vms [.vms]perly_h.vms
+
+.ifdef LINK_ONLY
+.else
+perly$(O) : perly.c, perly.h, $(h)
+.endif
+
+[.t.lib]vmsfspec.t : [.vms.ext]filespec.t
+ Copy/Log/NoConfirm $(MMS$SOURCE) $(MMS$TARGET)
+
+[.t.lib]vmsish.t : [.vms.ext]vmsish.t
+ Copy/Log/NoConfirm $(MMS$SOURCE) $(MMS$TARGET)
+
+test : all [.t.lib]vmsfspec.t [.t.lib]vmsish.t
+ - @[.VMS]Test.Com "$(E)"
+
+# install ought not need a source, but it doesn't work if one's not
+# there. Go figure...
+install : $(MINIPERL_EXE)
+ $(MINIPERL) installperl
+
+archify : all
+ @ Write Sys$Output "Moving files to architecture-specific locations for $(ARCH)"
+ archroot = "$(ARCHAUTO)" - "]" + "...]"
+ Backup/Log/Verify [.lib.auto...]*.*;/Exclude=(*.al,*.ix) 'archroot'/New_Version
+ Delete/Log/NoConfirm [.lib.auto...]*.*;*/exclude=(*.al,*.ix,*.dir)
+ Delete/Log/NoConfirm [.lib]Config.pm;*
+ Copy/Log/NoConfirm *$(E);,[.x2p]a2p$(E); $(ARCHDIR)
+ Delete/Log/NoConfirm Perl*$(E);*,[.x2p]a2p$(E);*
+ @ Write Sys$Output "Architecture-specific setup completed."
+ @ Write Sys$Output "Before building for another architecture, be sure to"
+ @ Write Sys$Output " 1. $(MMS)$(MMSQUALIFIERS) clean"
+ @ Write Sys$Output " 2. Delete Miniperl$(E)"
+
+# CORE subset for MakeMaker, so we can build Perl without sources
+# Should move to VMS installperl when we get one
+$(ARCHCORE)EXTERN.h : EXTERN.h
+ @ If F$Search("$(ARCHDIR)CORE.dir").eqs."" Then Create/Directory $(ARCHCORE)
+ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+$(ARCHCORE)INTERN.h : INTERN.h
+ @ If F$Search("$(ARCHDIR)CORE.dir").eqs."" Then Create/Directory $(ARCHCORE)
+ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+$(ARCHCORE)XSUB.h : XSUB.h
+ @ If F$Search("$(ARCHDIR)CORE.dir").eqs."" Then Create/Directory $(ARCHCORE)
+ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+$(ARCHCORE)bytecode.h : bytecode.h
+ @ If F$Search("$(ARCHDIR)CORE.dir").eqs."" Then Create/Directory $(ARCHCORE)
+ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+$(ARCHCORE)byterun.h : byterun.h
+ @ If F$Search("$(ARCHDIR)CORE.dir").eqs."" Then Create/Directory $(ARCHCORE)
+ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+$(ARCHCORE)av.h : av.h
+ @ If F$Search("$(ARCHDIR)CORE.dir").eqs."" Then Create/Directory $(ARCHCORE)
+ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+$(ARCHCORE)config.h : config.h
+ @ If F$Search("$(ARCHDIR)CORE.dir").eqs."" Then Create/Directory $(ARCHCORE)
+ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+$(ARCHCORE)cop.h : cop.h
+ @ If F$Search("$(ARCHDIR)CORE.dir").eqs."" Then Create/Directory $(ARCHCORE)
+ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+$(ARCHCORE)cv.h : cv.h
+ @ If F$Search("$(ARCHDIR)CORE.dir").eqs."" Then Create/Directory $(ARCHCORE)
+ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+$(ARCHCORE)embed.h : embed.h
+ @ If F$Search("$(ARCHDIR)CORE.dir").eqs."" Then Create/Directory $(ARCHCORE)
+ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+$(ARCHCORE)embedvar.h : embedvar.h
+ @ If F$Search("$(ARCHDIR)CORE.dir").eqs."" Then Create/Directory $(ARCHCORE)
+ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+.ifdef FAKETHREADED
+$(ARCHCORE)fakethr.h : fakethr.h
+ @ If F$Search("$(ARCHDIR)CORE.dir").eqs."" Then Create/Directory $(ARCHCORE)
+ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+.endif
+$(ARCHCORE)form.h : form.h
+ @ If F$Search("$(ARCHDIR)CORE.dir").eqs."" Then Create/Directory $(ARCHCORE)
+ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+$(ARCHCORE)gv.h : gv.h
+ @ If F$Search("$(ARCHDIR)CORE.dir").eqs."" Then Create/Directory $(ARCHCORE)
+ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+$(ARCHCORE)handy.h : handy.h
+ @ If F$Search("$(ARCHDIR)CORE.dir").eqs."" Then Create/Directory $(ARCHCORE)
+ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+$(ARCHCORE)hv.h : hv.h
+ @ If F$Search("$(ARCHDIR)CORE.dir").eqs."" Then Create/Directory $(ARCHCORE)
+ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+$(ARCHCORE)intrpvar.h : intrpvar.h
+ @ If F$Search("$(ARCHDIR)CORE.dir").eqs."" Then Create/Directory $(ARCHCORE)
+ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+$(ARCHCORE)keywords.h : keywords.h
+ @ If F$Search("$(ARCHDIR)CORE.dir").eqs."" Then Create/Directory $(ARCHCORE)
+ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+$(ARCHCORE)mg.h : mg.h
+ @ If F$Search("$(ARCHDIR)CORE.dir").eqs."" Then Create/Directory $(ARCHCORE)
+ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+$(ARCHCORE)op.h : op.h
+ @ If F$Search("$(ARCHDIR)CORE.dir").eqs."" Then Create/Directory $(ARCHCORE)
+ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+$(ARCHCORE)opcode.h : opcode.h
+ @ If F$Search("$(ARCHDIR)CORE.dir").eqs."" Then Create/Directory $(ARCHCORE)
+ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+$(ARCHCORE)patchlevel.h : patchlevel.h
+ @ If F$Search("$(ARCHDIR)CORE.dir").eqs."" Then Create/Directory $(ARCHCORE)
+ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+$(ARCHCORE)perl.h : perl.h
+ @ If F$Search("$(ARCHDIR)CORE.dir").eqs."" Then Create/Directory $(ARCHCORE)
+ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+$(ARCHCORE)iperlsys.h : iperlsys.h
+ @ If F$Search("$(ARCHDIR)CORE.dir").eqs."" Then Create/Directory $(ARCHCORE)
+ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+$(ARCHCORE)perlsdio.h : perlsdio.h
+ @ If F$Search("$(ARCHDIR)CORE.dir").eqs."" Then Create/Directory $(ARCHCORE)
+ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+$(ARCHCORE)perlio.h : perlio.h
+ @ If F$Search("$(ARCHDIR)CORE.dir").eqs."" Then Create/Directory $(ARCHCORE)
+ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+$(ARCHCORE)perlvars.h : perlvars.h
+ @ If F$Search("$(ARCHDIR)CORE.dir").eqs."" Then Create/Directory $(ARCHCORE)
+ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+$(ARCHCORE)perly.h : perly.h
+ @ If F$Search("$(ARCHDIR)CORE.dir").eqs."" Then Create/Directory $(ARCHCORE)
+ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+$(ARCHCORE)pp.h : pp.h
+ @ If F$Search("$(ARCHDIR)CORE.dir").eqs."" Then Create/Directory $(ARCHCORE)
+ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+$(ARCHCORE)proto.h : proto.h
+ @ If F$Search("$(ARCHDIR)CORE.dir").eqs."" Then Create/Directory $(ARCHCORE)
+ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+$(ARCHCORE)regcomp.h : regcomp.h
+ @ If F$Search("$(ARCHDIR)CORE.dir").eqs."" Then Create/Directory $(ARCHCORE)
+ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+$(ARCHCORE)regexp.h : regexp.h
+ @ If F$Search("$(ARCHDIR)CORE.dir").eqs."" Then Create/Directory $(ARCHCORE)
+ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+$(ARCHCORE)scope.h : scope.h
+ @ If F$Search("$(ARCHDIR)CORE.dir").eqs."" Then Create/Directory $(ARCHCORE)
+ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+$(ARCHCORE)sv.h : sv.h
+ @ If F$Search("$(ARCHDIR)CORE.dir").eqs."" Then Create/Directory $(ARCHCORE)
+ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+$(ARCHCORE)thrdvar.h : thrdvar.h
+ @ If F$Search("$(ARCHDIR)CORE.dir").eqs."" Then Create/Directory $(ARCHCORE)
+ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+$(ARCHCORE)thread.h : thread.h
+ @ If F$Search("$(ARCHDIR)CORE.dir").eqs."" Then Create/Directory $(ARCHCORE)
+ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+$(ARCHCORE)util.h : util.h
+ @ If F$Search("$(ARCHDIR)CORE.dir").eqs."" Then Create/Directory $(ARCHCORE)
+ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+$(ARCHCORE)vmsish.h : vmsish.h
+ @ If F$Search("$(ARCHDIR)CORE.dir").eqs."" Then Create/Directory $(ARCHCORE)
+ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+.ifdef SOCKET
+$(ARCHCORE)$(SOCKH) : $(SOCKH)
+ @ If F$Search("$(ARCHDIR)CORE.dir").eqs."" Then Create/Directory $(ARCHCORE)
+ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+.endif
+$(ARCHCORE)$(DBG)libperl$(OLB) : $(DBG)libperl$(OLB) $(DBG)perlshr_xtras.ts
+ @ If F$Search("$(ARCHDIR)CORE.dir").eqs."" Then Create/Directory $(ARCHCORE)
+ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+$(ARCHCORE)perlshr_attr.opt : $(DBG)perlshr_xtras.ts
+ @ If F$Search("$(ARCHDIR)CORE.dir").eqs."" Then Create/Directory $(ARCHCORE)
+ Copy/Log perlshr_attr.opt $(MMS$TARGET)
+$(ARCHCORE)$(DBG)perlshr_bld.opt : $(DBG)perlshr_xtras.ts
+ @ If F$Search("$(ARCHDIR)CORE.dir").eqs."" Then Create/Directory $(ARCHCORE)
+ Copy/Log $(DBG)perlshr_bld.opt $(MMS$TARGET)
+$(ARCHAUTO)time.stamp :
+ @ If F$Search("$(ARCHDIR)auto.dir").eqs."" Then Create/Directory $(ARCHAUTO)
+ @ If F$Search("$(MMS$TARGET)").eqs."" Then Copy/NoConfirm _NLA0: $(MMS$TARGET)
+
+.ifdef LINK_ONLY
+.else
+# We need an action line here for broken older versions of MMS which
+# otherwise conclude that they should be compiling [.x2p]utils.c :-(
+#util$(O) : util.c
+# $(CC) $(CORECFLAGS) $(MMS$SOURCE)
+# AUTOMATICALLY GENERATED MAKE DEPENDENCIES--PUT NOTHING BELOW THIS LINE
+av$(O) : av.c EXTERN.h perl.h bytecode.h byterun.h config.h embed.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h iperlsys.h
+ $(CC) $(CORECFLAGS) $(MMS$SOURCE)
+
+byterun$(O) : byterun.c EXTERN.h perl.h bytecode.h byterun.h config.h embed.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h iperlsys.h
+ $(CC) $(CORECFLAGS) $(MMS$SOURCE)
+
+deb$(O) : deb.c EXTERN.h perl.h bytecode.h byterun.h config.h embed.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h iperlsys.h
+ $(CC) $(CORECFLAGS) $(MMS$SOURCE)
+
+doio$(O) : doio.c EXTERN.h perl.h bytecode.h byterun.h config.h embed.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h iperlsys.h
+ $(CC) $(CORECFLAGS) $(MMS$SOURCE)
+
+doop$(O) : doop.c EXTERN.h perl.h bytecode.h byterun.h config.h embed.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h iperlsys.h
+ $(CC) $(CORECFLAGS) $(MMS$SOURCE)
+
+dump$(O) : dump.c EXTERN.h perl.h bytecode.h byterun.h config.h embed.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h iperlsys.h
+ $(CC) $(CORECFLAGS) $(MMS$SOURCE)
+
+globals$(O) : globals.c INTERN.h perl.h bytecode.h byterun.h config.h embed.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h iperlsys.h
+ $(CC) $(CORECFLAGS) $(MMS$SOURCE)
+
+gv$(O) : gv.c EXTERN.h perl.h bytecode.h byterun.h config.h embed.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h iperlsys.h
+ $(CC) $(CORECFLAGS) $(MMS$SOURCE)
+
+hv$(O) : hv.c EXTERN.h perl.h bytecode.h byterun.h config.h embed.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h iperlsys.h
+ $(CC) $(CORECFLAGS) $(MMS$SOURCE)
+
+malloc$(O) : malloc.c EXTERN.h perl.h bytecode.h byterun.h config.h embed.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h iperlsys.h
+ $(CC) $(CORECFLAGS) $(MMS$SOURCE)
+
+mg$(O) : mg.c EXTERN.h perl.h bytecode.h byterun.h config.h embed.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h iperlsys.h
+ $(CC) $(CORECFLAGS) $(MMS$SOURCE)
+
+miniperlmain$(O) : miniperlmain.c EXTERN.h perl.h bytecode.h byterun.h config.h embed.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h iperlsys.h
+ $(CC) $(CORECFLAGS) $(MMS$SOURCE)
+
+op$(O) : op.c EXTERN.h perl.h bytecode.h byterun.h config.h embed.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h iperlsys.h
+ $(CC) $(CORECFLAGS) $(MMS$SOURCE)
+
+perl$(O) : perl.c EXTERN.h perl.h bytecode.h byterun.h config.h embed.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h patchlevel.h iperlsys.h
+ $(CC) $(CORECFLAGS) $(MMS$SOURCE)
+
+perlio$(O) : perlio.c config.h EXTERN.h perl.h bytecode.h byterun.h embed.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h iperlsys.h
+ $(CC) $(CORECFLAGS) $(MMS$SOURCE)
+
+perlmain$(O) : perlmain.c EXTERN.h perl.h bytecode.h byterun.h config.h embed.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h iperlsys.h
+ $(CC) $(CORECFLAGS) $(MMS$SOURCE)
+
+byteperl$(O) : byteperl.c EXTERN.h perl.h bytecode.h byterun.h config.h embed.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h iperlsys.h
+ $(CC) $(CORECFLAGS) $(MMS$SOURCE)
+
+perly$(O) : perly.c EXTERN.h perl.h bytecode.h byterun.h config.h embed.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h iperlsys.h
+ $(CC) $(CORECFLAGS) $(MMS$SOURCE)
+
+pp$(O) : pp.c EXTERN.h perl.h bytecode.h byterun.h config.h embed.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h iperlsys.h
+ $(CC) $(CORECFLAGS) $(MMS$SOURCE)
+
+pp_ctl$(O) : pp_ctl.c EXTERN.h perl.h bytecode.h byterun.h config.h embed.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h iperlsys.h
+ $(CC) $(CORECFLAGS) $(MMS$SOURCE)
+
+pp_hot$(O) : pp_hot.c EXTERN.h perl.h bytecode.h byterun.h config.h embed.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h iperlsys.h
+ $(CC) $(CORECFLAGS) $(MMS$SOURCE)
+
+pp_sys$(O) : pp_sys.c EXTERN.h perl.h bytecode.h byterun.h config.h embed.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h iperlsys.h
+ $(CC) $(CORECFLAGS) $(MMS$SOURCE)
+
+regcomp$(O) : regcomp.c EXTERN.h perl.h bytecode.h byterun.h config.h embed.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h INTERN.h regcomp.h iperlsys.h
+ $(CC) $(CORECFLAGS) $(MMS$SOURCE)
+
+regexec$(O) : regexec.c EXTERN.h perl.h bytecode.h byterun.h config.h embed.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h regcomp.h iperlsys.h
+ $(CC) $(CORECFLAGS) $(MMS$SOURCE)
+
+run$(O) : run.c EXTERN.h perl.h bytecode.h byterun.h config.h embed.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h iperlsys.h
+ $(CC) $(CORECFLAGS) $(MMS$SOURCE)
+
+scope$(O) : scope.c EXTERN.h perl.h bytecode.h byterun.h config.h embed.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h iperlsys.h
+ $(CC) $(CORECFLAGS) $(MMS$SOURCE)
+
+sv$(O) : sv.c EXTERN.h perl.h bytecode.h byterun.h config.h embed.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h iperlsys.h
+ $(CC) $(CORECFLAGS) $(MMS$SOURCE)
+
+taint$(O) : taint.c EXTERN.h perl.h bytecode.h byterun.h config.h embed.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h iperlsys.h
+ $(CC) $(CORECFLAGS) $(MMS$SOURCE)
+
+toke$(O) : toke.c EXTERN.h perl.h bytecode.h byterun.h config.h embed.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h keywords.h iperlsys.h
+ $(CC) $(CORECFLAGS) $(MMS$SOURCE)
+
+universal$(O) : universal.c EXTERN.h perl.h bytecode.h byterun.h config.h embed.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h XSUB.h iperlsys.h
+ $(CC) $(CORECFLAGS) $(MMS$SOURCE)
+
+util$(O) : util.c EXTERN.h perl.h bytecode.h byterun.h config.h embed.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h iperlsys.h
+ $(CC) $(CORECFLAGS) $(MMS$SOURCE)
+
+vms$(O) : vms.c EXTERN.h perl.h bytecode.h byterun.h config.h embed.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h XSUB.h iperlsys.h
+ $(CC) $(CORECFLAGS) $(MMS$SOURCE)
+
+#[.x2p]a2p$(O) : [.x2p]a2p.c [.x2p]a2py.c [.x2p]INTERN.h [.x2p]a2p.h [.x2p]hash.h [.x2p]str.h config.h handy.h
+# $(CC) $(X2PCFLAGS) $(MMS$SOURCE)
+
+[.x2p]hash$(O) : [.x2p]hash.c [.x2p]EXTERN.h [.x2p]a2p.h [.x2p]hash.h [.x2p]str.h [.x2p]util.h config.h handy.h
+ $(CC) $(X2PCFLAGS) $(MMS$SOURCE)
+
+[.x2p]str$(O) : [.x2p]str.c [.x2p]EXTERN.h [.x2p]a2p.h [.x2p]hash.h [.x2p]str.h [.x2p]util.h config.h handy.h
+ $(CC) $(X2PCFLAGS) $(MMS$SOURCE)
+
+[.x2p]util$(O) : [.x2p]util.c [.x2p]EXTERN.h [.x2p]INTERN.h [.x2p]a2p.h [.x2p]hash.h [.x2p]str.h [.x2p]util.h config.h handy.h
+ $(CC) $(X2PCFLAGS) $(MMS$SOURCE)
+
+[.x2p]walk$(O) : [.x2p]walk.c [.x2p]EXTERN.h [.x2p]a2p.h [.x2p]hash.h [.x2p]str.h [.x2p]util.h config.h handy.h
+ $(CC) $(X2PCFLAGS) $(MMS$SOURCE)
+
+# End of automatically generated make dependencies
+.endif # !LINK_ONLY
+
+vmsish.h : [.vms]vmsish.h
+ Copy/Log/NoConfirm [.vms]vmsish.h []vmsish.h
+
+vms.c : [.vms]vms.c
+ Copy/Log/Noconfirm [.vms]vms.c []
+
+$(CRTL) : $(MAKEFILE)
+ @ @[.vms]genopt "$(CRTL)/Write" "|" "$(LIBS1)|$(FULLLIBS2)|$(SOCKLIB)"
+
+
+cleanlis :
+ - If F$Search("*.Lis").nes."" Then Delete/NoConfirm/Log *.Lis;*
+ - If F$Search("*.CPP").nes."" Then Delete/NoConfirm/Log *.CPP;*
+ - If F$Search("*.Map").nes."" Then Delete/NoConfirm/Log *.Map;*
+
+tidy : cleanlis
+ - If F$Search("[...]*.Opt;-1").nes."" Then Purge/NoConfirm/Log [...]*.Opt
+ - If F$Search("[...]*$(O);-1").nes."" Then Purge/NoConfirm/Log [...]*$(O)
+ - If F$Search("[...]*$(E);-1").nes."" Then Purge/NoConfirm/Log [...]*$(E)
+ - If F$Search("Config.H;-1").nes."" Then Purge/NoConfirm/Log Config.H
+ - If F$Search("Config.SH;-1").nes."" Then Purge/NoConfirm/Log Config.SH
+ - If F$Search("perly.c;-1").nes."" Then Purge/NoConfirm/Log perly.c
+ - If F$Search("perly.h;-1").nes."" Then Purge/NoConfirm/Log perly.h
+ - If F$Search("VMSish.H;-1").nes."" Then Purge/NoConfirm/Log VMSish.H
+ - If F$Search("VMS.C;-1") .nes."" Then Purge/NoConfirm/Log VMS.C
+ - If F$Search("Perlmain.C;-1") .nes."" Then Purge/NoConfirm/Log Perlmain.C
+ - If F$Search("byteperl.C;-1") .nes."" Then Purge/NoConfirm/Log byteperl.C
+ - If F$Search("Perlshr_Gbl*.Mar;-1") .nes."" Then Purge/NoConfirm/Log Perlshr_Gbl*.Mar
+ - If F$Search("[.Ext.DynaLoader]DL_VMS$(O);-1").nes."" Then Purge/NoConfirm/Log [.Ext.DynaLoader]DL_VMS$(O)
+ - If F$Search("[.Ext.DynaLoader]DL_VMS.C;-1").nes."" Then Purge/NoConfirm/Log [.Ext.DynaLoader]DL_VMS.C
+ - If F$Search("[.Ext.Socket]Socket.C;-1").nes."" Then Purge/NoConfirm/Log [.Ext.DynaLoader]DL_VMS.C
+ - If F$Search("[.Ext.Opcode...];-1").nes."" Then Purge/NoConfirm/Log [.Ext.Opcode]
+ - If F$Search("[.VMS.Ext...]*.C;-1").nes."" Then Purge/NoConfirm/Log [.VMS.Ext...]*.C
+ - If F$Search("[.VMS.Ext...]*$(O);-1").nes."" Then Purge/NoConfirm/Log [.VMS.Ext...]*$(O)
+ - If F$Search("[.Lib.Auto...]*.al;-1").nes."" Then Purge/NoConfirm/Log [.Lib.Auto...]*.al
+ - If F$Search("[.Lib.Auto...]autosplit.ix;-1").nes."" Then Purge/NoConfirm/Log [.Lib.Auto...]autosplit.ix
+ - If F$Search("[.Lib]DynaLoader.pm;-1").nes."" Then Purge/NoConfirm/Log [.Lib]DynaLoader.pm
+ - If F$Search("[.Lib]Socket.pm;-1").nes."" Then Purge/NoConfirm/Log [.Lib]Socket.pm
+ - If F$Search("[.Lib]Config.pm;-1").nes."" Then Purge/NoConfirm/Log [.Lib]Config.pm
+ - If F$Search("$(ARCHDIR)Config.pm;-1").nes."" Then Purge/NoConfirm/Log $(ARCHDIR)Config.pm
+ - If F$Search("[.lib.ExtUtils]Miniperl.pm").nes."" Then Purge/NoConfirm/Log [.lib.ExtUtils]Miniperl.pm
+ - If F$Search("[.lib.ExtUtils]XSSymSet.pm").nes."" Then Purge/NoConfirm/Log [.lib.ExtUtils]XSSymSet.pm
+ - If F$Search("[.Lib.VMS]*.*;-1").nes."" Then Purge/NoConfirm/Log [.Lib.VMS]*.*
+ - If F$Search("[.Lib.Pod]*.Pod;-1").nes."" Then Purge/NoConfirm/Log [.Lib.Pod]*.Pod
+ - If F$Search("$(ARCHCORE)*.*").nes."" Then Purge/NoConfirm/Log $(ARCHCORE)*.*
+ - If F$Search("[.lib]*.com;-1").nes."" Then Purge/NoConfirm/Log [.lib]*.com
+ - If F$Search("[.pod]*.com;-1").nes."" Then Purge/NoConfirm/Log [.pod]*.com
+ - If F$Search("[.utils]*.com;-1").nes."" Then Purge/NoConfirm/Log [.utils]*.com
+ - If F$Search("[.x2p]*.com;-1").nes."" Then Purge/NoConfirm/Log [.x2p]*.com
+ - If F$Search("[.lib.pod]*.com;-1").nes."" Then Purge/NoConfirm/Log [.lib.pod]*.com
+
+clean : tidy
+ Set Default [.ext.Fcntl]
+ - $(MMS) clean
+ Set Default [--]
+ Set Default [.ext.Errno]
+ - $(MMS) clean
+ Set Default [--]
+ Set Default [.ext.IO]
+ - $(MMS) clean
+ Set Default [--]
+ Set Default [.ext.Opcode]
+ - $(MMS) clean
+ Set Default [--]
+ Set Default [.ext.attrs]
+ - $(MMS) clean
+ Set Default [--]
+ Set Default [.ext.B]
+ - $(MMS) clean
+ Set Default [--]
+.ifdef THREAD
+ Set Default [.ext.Thread]
+ - $(MMS) realclean
+ Set Default [--]
+.endif
+.ifdef DECC
+ Set Default [.ext.POSIX]
+ - $(MMS) clean
+ Set Default [--]
+.endif
+ Set Default [.ext.SDBM_File]
+ - $(MMS) clean
+ Set Default [--]
+ Set Default [.vms.ext.Stdio]
+ - $(MMS) clean
+ Set Default [---]
+ Set Default [.vms.ext.DCLsym]
+ - $(MMS) clean
+ Set Default [---]
+ Set Default [.ext.re]
+ - $(MMS) clean
+ Set Default [--]
+ Set Default [.ext.dumper]
+ - $(MMS) clean
+ Set Default [--]
+ - If F$Search("*.Opt").nes."" Then Delete/NoConfirm/Log *.Opt;*/Exclude=PerlShr_*.Opt
+ - If F$Search("[...]*$(O);*") .nes."" Then Delete/NoConfirm/Log [...]*$(O);*
+ - If F$Search(F$Parse("Sys$Disk:[]","$(SOCKH)")).nes."" Then Delete/NoConfirm/Log $(SOCKH);*
+ - If F$Search(F$Parse("Sys$Disk:[]","$(SOCKC)")).nes."" Then Delete/NoConfirm/Log $(SOCKC);*
+ - If F$Search("perly.c").nes."" Then Delete/NoConfirm/Log perly.c;*
+ - If F$Search("perly.h").nes."" Then Delete/NoConfirm/Log perly.h;*
+ - If F$Search("VMSish.H").nes."" Then Delete/NoConfirm/Log VMSish.H;*
+ - If F$Search("VMS.C") .nes."" Then Delete/NoConfirm/Log VMS.C;*
+ - If F$Search("Perlmain.C") .nes."" Then Delete/NoConfirm/Log Perlmain.C;*
+ - If F$Search("byteperl.C") .nes."" Then Delete/NoConfirm/Log byteperl.C;*
+ - If F$Search("Perlshr_Gbl*.Mar") .nes."" Then Delete/NoConfirm/Log Perlshr_Gbl*.Mar;*
+ - If F$Search("*.TS").nes."" Then Delete/NoConfirm/Log *.TS;*
+ - If F$Search("[.Ext.DynaLoader]DL_VMS$(O)").nes."" Then Delete/NoConfirm/Log [.Ext.DynaLoader]DL_VMS$(O);*
+ - If F$Search("[.Ext.DynaLoader]DL_VMS.C").nes."" Then Delete/NoConfirm/Log [.Ext.DynaLoader]DL_VMS.C;*
+ - If F$Search("[.Ext.Socket]Socket$(O)").nes."" Then Delete/NoConfirm/Log [.Ext.Socket]Socket$(O);*
+ - If F$Search("[.Ext.Socket]Socket.C").nes."" Then Delete/NoConfirm/Log [.Ext.Socket]Socket.C;*
+ - If F$Search("[.VMS.Ext...]*.C").nes."" Then Delete/NoConfirm/Log [.VMS.Ext...]*.C;*
+ - If F$Search("[.VMS.Ext...]*$(O)").nes."" Then Delete/NoConfirm/Log [.VMS.Ext...]*$(O);*
+ - If F$Search("[.pod]*.com").nes."" Then Delete/NoConfirm/Log [.pod]*.com;*
+
+realclean : tidy
+ Set Default [.ext.Fcntl]
+ - $(MMS) realclean
+ Set Default [--]
+ Set Default [.ext.Errno]
+ - $(MMS) realclean
+ Set Default [--]
+ Set Default [.ext.IO]
+ - $(MMS) realclean
+ Set Default [--]
+ Set Default [.ext.Opcode]
+ - $(MMS) realclean
+ Set Default [--]
+ Set Default [.ext.attrs]
+ - $(MMS) realclean
+ Set Default [--]
+ Set Default [.ext.B]
+ - $(MMS) realclean
+ Set Default [--]
+.ifdef THREAD
+ Set Default [.ext.Thread]
+ - $(MMS) realclean
+ Set Default [--]
+.endif
+.ifdef DECC
+ Set Default [.ext.POSIX]
+ - $(MMS) realclean
+ Set Default [--]
+.endif
+ Set Default [.ext.SDBM_File]
+ - $(MMS) realclean
+ Set Default [--]
+ Set Default [.vms.ext.Stdio]
+ - $(MMS) realclean
+ Set Default [---]
+ Set Default [.vms.ext.DCLsym]
+ - $(MMS) realclean
+ Set Default [---]
+ Set Default [.ext.dumper]
+ - $(MMS) realclean
+ Set Default [--]
+ Set Default [.ext.re]
+ - $(MMS) realclean
+ Set Default [--]
+ - If F$Search("*$(OLB)").nes."" Then Delete/NoConfirm/Log *$(OLB);*
+ - If F$Search("*.Opt").nes."" Then Delete/NoConfirm/Log *.Opt;*
+ - If F$Search("Config.H").nes."" Then Delete/NoConfirm/Log Config.H;*
+ - If F$Search("Config.SH").nes."" Then Delete/NoConfirm/Log Config.SH;*
+ - If F$Search("descrip.mms").nes."" Then Delete/NoConfirm/Log descrip.mms;*
+ - $(MINIPERL) -e "use File::Path; rmtree(['lib/auto','lib/VMS','lib/$(ARCH)'],1,0);"
+ - If F$Search("[.Lib]DynaLoader.pm").nes."" Then Delete/NoConfirm/Log [.Lib]DynaLoader.pm;*
+ - If F$Search("[.Lib]Socket.pm").nes."" Then Delete/NoConfirm/Log [.Lib]Socket.pm;*
+ - If F$Search("[.Lib]Config.pm").nes."" Then Delete/NoConfirm/Log [.Lib]Config.pm;*
+ - If F$Search("[.Lib]*.com").nes."" Then Delete/NoConfirm/Log [.Lib]*.com;*
+ - If F$Search("[.utils]*.com").nes."" Then Delete/NoConfirm/Log [.utils]*.com;*
+ - If F$Search("[.x2p]*.com").nes."" Then Delete/NoConfirm/Log [.x2p]*.com;*
+ - If F$Search("$(ARCHDIR)Config.pm").nes."" Then Delete/NoConfirm/Log $(ARCHDIR)Config.pm;*
+ - If F$Search("[.lib.ExtUtils]Miniperl.pm").nes."" Then Delete/NoConfirm/Log [.lib.ExtUtils]Miniperl.pm;*
+ - If F$Search("[.lib.ExtUtils]XSSymSet.pm").nes."" Then Delete/NoConfirm/Log [.lib.ExtUtils]XSSymSet.pm;*
+ - If F$Search("[.lib.pod]*.pod").nes."" Then Delete/NoConfirm/Log [.lib.pod]*.pod;*
+ - If F$Search("[.lib.pod]perldoc.com").nes."" Then Delete/NoConfirm/Log [.lib.pod]perldoc.com;*
+ - If F$Search("[.lib.pod]pod2*.com").nes."" Then Delete/NoConfirm/Log [.lib.pod]pod2*.com;*
+ - If F$Search("[.t.lib]vms*.t").nes."" Then Delete/NoConfirm/Log [.t.lib]vms*.t;*
+ - If F$Search("[...]*$(E)").nes."" Then Delete/NoConfirm/Log [...]*$(E);*
+
+cleansrc : clean
+ - If F$Search("*.C;-1").nes."" Then Purge/NoConfirm/Log *.C
+ - If F$Search("*.H;-1").nes."" Then Purge/NoConfirm/Log *.H
+ - If F$Search("*.VMS;-1").nes."" Then Purge/NoConfirm/Log *.VMS
+ - If F$Search("[.VMS]$(MAKEFILE);-1").nes."" Then Purge/NoConfirm/Log [.VMS]$(MAKEFILE)
+ - If F$Search("[.VMS]*.C;-1").nes."" Then Purge/NoConfirm/Log [.VMS]*.C
+ - If F$Search("[.VMS]*.H;-1").nes."" Then Purge/NoConfirm/Log [.VMS]*.H
+ - If F$Search("[.VMS]*.Pl;-1").nes."" Then Purge/NoConfirm/Log [.VMS]*.Pl
+ - If F$Search("[.VMS]*.VMS;-1").nes."" Then Purge/NoConfirm/Log [.VMS]*.VMS
+ - If F$Search("[.VMS...]*.pm;-1").nes."" Then Purge/NoConfirm/Log [.VMS...]*.pm
+ - If F$Search("[.VMS...]*.xs;-1").nes."" Then Purge/NoConfirm/Log [.VMS...]*.xs
+!GROK!THIS!
diff --git a/gnu/usr.bin/perl/vms/munchconfig.c b/gnu/usr.bin/perl/vms/munchconfig.c
new file mode 100644
index 00000000000..58c7e7c0971
--- /dev/null
+++ b/gnu/usr.bin/perl/vms/munchconfig.c
@@ -0,0 +1,366 @@
+/* munchconfig.c
+
+ A very, very (very!) simple program to process a config_h.sh file on
+ non-unix systems.
+
+ usage:
+ munchconfig config.sh config_h.sh [foo=bar [baz=xyzzy [...]]] >config.h
+
+ which is to say, it takes as its firt parameter a config.sh (or
+ equivalent), as its second a config_h.sh (or equvalent), and a list of
+ optional tag=value pairs.
+
+ It spits the processed config.h out to STDOUT.
+
+ */
+
+#include <stdio.h>
+#include <errno.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+
+/* The failure code to exit with */
+#ifndef EXIT_FAILURE
+#ifdef VMS
+#define EXIT_FAILURE 0
+#else
+#define EXIT_FAILURE -1
+#endif
+#endif
+
+/* The biggest line we can read in from a file */
+#define LINEBUFFERSIZE 400
+#define NUMTILDESUBS 30
+#define NUMCONFIGSUBS 1000
+#define TOKENBUFFERSIZE 80
+
+typedef struct {
+ char Tag[TOKENBUFFERSIZE];
+ char Value[512];
+} Translate;
+
+void tilde_sub(char [], Translate [], int);
+
+int
+main(int argc, char *argv[])
+{
+ FILE *ConfigSH, *Config_H;
+ char LineBuffer[LINEBUFFERSIZE], *TempValue, *StartTilde, *EndTilde;
+ char SecondaryLineBuffer[LINEBUFFERSIZE];
+ char TokenBuffer[TOKENBUFFERSIZE];
+ int LineBufferLength, TempLength, DummyVariable, LineBufferLoop;
+ int TokenBufferLoop, ConfigSubLoop, GotIt;
+ Translate TildeSub[NUMTILDESUBS]; /* Holds the tilde (~FOO~) */
+ /* substitutions */
+ Translate ConfigSub[NUMCONFIGSUBS]; /* Holds the substitutions from */
+ /* config.sh */
+ int TildeSubCount = 0, ConfigSubCount = 0; /* # of tilde substitutions */
+ /* and config substitutions, */
+ /* respectively */
+ if (argc < 3) {
+ printf("Usage: munchconfig config.sh config_h.sh [foo=bar [baz=xyzzy [...]]]\n");
+ exit(EXIT_FAILURE);
+ }
+
+
+ /* First, open the input files */
+ if (NULL == (ConfigSH = fopen(argv[1], "r"))) {
+ printf("Error %i trying to open config.sh file %s\n", errno, argv[1]);
+ exit(EXIT_FAILURE);
+ }
+
+ if (NULL == (Config_H = fopen(argv[2], "r"))) {
+ printf("Error %i trying to open config_h.sh file %s\n", errno, argv[2]);
+ exit(EXIT_FAILURE);
+ }
+
+ /* Any tag/value pairs on the command line? */
+ if (argc > 3) {
+ int i;
+ char WorkString[80];
+ for (i=3; i < argc && argv[i]; i++) {
+
+ /* Local copy */
+ strcpy(WorkString, argv[i]);
+ /* Stick a NULL over the = */
+ TempValue = strchr(WorkString, '=');
+ *TempValue++ = '\0';
+
+ /* Copy the tag and value into the holding array */
+ strcpy(TildeSub[TildeSubCount].Tag, WorkString);
+ strcpy(TildeSub[TildeSubCount].Value, TempValue);
+ TildeSubCount++;
+ }
+ }
+
+ /* Now read in the config.sh file. */
+ while(fgets(LineBuffer, LINEBUFFERSIZE - 1, ConfigSH)) {
+ /* Force a trailing null, just in case */
+ LineBuffer[LINEBUFFERSIZE - 1] = '\0';
+
+ LineBufferLength = strlen(LineBuffer);
+
+ /* Chop trailing control characters */
+ while((LineBufferLength > 0) && (LineBuffer[LineBufferLength-1] < ' ')) {
+ LineBuffer[LineBufferLength - 1] = '\0';
+ LineBufferLength--;
+ }
+
+ /* If it's empty, then try again */
+ if (!*LineBuffer)
+ continue;
+
+ /* If the line begins with a '#' or ' ', skip */
+ if ((LineBuffer[0] == ' ') || (LineBuffer[0] == '#'))
+ continue;
+
+ /* We've got something. Guess we need to actually handle it */
+ /* Do the tilde substitution */
+ tilde_sub(LineBuffer, TildeSub, TildeSubCount);
+
+ /* Stick a NULL over the = */
+ TempValue = strchr(LineBuffer, '=');
+ *TempValue++ = '\0';
+ /* And another over the leading ', which better be there */
+ *TempValue++ = '\0';
+
+ /* Check to see if there's a trailing ' or ". If not, add a newline to
+ the buffer and grab another line. */
+ TempLength = strlen(TempValue);
+ while ((TempValue[TempLength-1] != '\'') &&
+ (TempValue[TempLength-1] != '"')) {
+ fgets(SecondaryLineBuffer, LINEBUFFERSIZE - 1, ConfigSH);
+ /* Force a trailing null, just in case */
+ SecondaryLineBuffer[LINEBUFFERSIZE - 1] = '\0';
+ /* Go substitute */
+ tilde_sub(SecondaryLineBuffer, TildeSub, TildeSubCount);
+ /* Tack a nweline on the end of our primary buffer */
+ strcat(TempValue, "\n");
+ /* Concat the new line we just read */
+ strcat(TempValue, SecondaryLineBuffer);
+
+ /* Refigure the length */
+ TempLength = strlen(TempValue);
+
+ /* Chop trailing control characters */
+ while((TempLength > 0) && (TempValue[TempLength-1] < ' ')) {
+ TempValue[TempLength - 1] = '\0';
+ TempLength--;
+ }
+ }
+
+ /* And finally one over the trailing ' */
+ TempValue[TempLength-1] = '\0';
+
+ /* Is there even anything left? */
+ if(*TempValue) {
+ /* Copy the tag over */
+ strcpy(ConfigSub[ConfigSubCount].Tag, LineBuffer);
+ /* Copy the value over */
+ strcpy(ConfigSub[ConfigSubCount].Value, TempValue);
+
+ /* Up the count */
+ ConfigSubCount++;
+
+ }
+ }
+
+ /* Okay, we've read in all the substititions from our config.sh */
+ /* equivalent. Read in the config_h.sh equiv and start the substitution */
+
+ /* First, eat all the lines until we get to one with !GROK!THIS! in it */
+ while(!strstr(fgets(LineBuffer, LINEBUFFERSIZE, Config_H),
+ "!GROK!THIS!")) {
+
+ /* Dummy statement to shut up any compiler that'll whine about an empty */
+ /* loop */
+ DummyVariable++;
+ }
+
+ /* Right, we've read all the lines through the first one with !GROK!THIS! */
+ /* in it. That gets us through the beginning stuff. Now start in earnest */
+ /* with our translations, which run until we get to another !GROK!THIS! */
+ while(!strstr(fgets(LineBuffer, LINEBUFFERSIZE, Config_H),
+ "!GROK!THIS!")) {
+ /* Force a trailing null, just in case */
+ LineBuffer[LINEBUFFERSIZE - 1] = '\0';
+
+ /* Tilde Substitute */
+ tilde_sub(LineBuffer, TildeSub, TildeSubCount);
+
+ LineBufferLength = strlen(LineBuffer);
+
+ /* Chop trailing control characters */
+ while((LineBufferLength > 0) && (LineBuffer[LineBufferLength-1] < ' ')) {
+ LineBuffer[LineBufferLength - 1] = '\0';
+ LineBufferLength--;
+ }
+
+ /* Right. Go looking for $s. */
+ for(LineBufferLoop = 0; LineBufferLoop < LineBufferLength;
+ LineBufferLoop++) {
+ /* Did we find one? */
+ if ('$' != LineBuffer[LineBufferLoop]) {
+ /* Nope, spit out the value */
+ putchar(LineBuffer[LineBufferLoop]);
+ } else {
+ /* Yes, we did. Is it escaped? */
+ if ((LineBufferLoop > 0) && ('\\' == LineBuffer[LineBufferLoop -
+ 1])) {
+ /* Yup. Spit it out */
+ putchar(LineBuffer[LineBufferLoop]);
+ } else {
+ /* Nope. Go grab us a token */
+ TokenBufferLoop = 0;
+ /* Advance to the next character in the input stream */
+ LineBufferLoop++;
+ while((LineBufferLoop < LineBufferLength) &&
+ ((isalnum(LineBuffer[LineBufferLoop]) || ('_' ==
+ LineBuffer[LineBufferLoop])))) {
+ TokenBuffer[TokenBufferLoop] = LineBuffer[LineBufferLoop];
+ LineBufferLoop++;
+ TokenBufferLoop++;
+ }
+
+ /* Trailing null on the token buffer */
+ TokenBuffer[TokenBufferLoop] = '\0';
+
+ /* Back the line buffer pointer up one */
+ LineBufferLoop--;
+
+ /* Right, we're done grabbing a token. Check to make sure we got */
+ /* something */
+ if (TokenBufferLoop) {
+ /* Well, we do. Run through all the tokens we've got in the */
+ /* ConfigSub array and see if any match */
+ GotIt = 0;
+ for(ConfigSubLoop = 0; ConfigSubLoop < ConfigSubCount;
+ ConfigSubLoop++) {
+ if (!strcmp(TokenBuffer, ConfigSub[ConfigSubLoop].Tag)) {
+ GotIt = 1;
+ printf("%s", ConfigSub[ConfigSubLoop].Value);
+ break;
+ }
+ }
+
+ /* Did we find something? If not, spit out what was in our */
+ /* buffer */
+ if (!GotIt) {
+ printf("$%s", TokenBuffer);
+ }
+
+ } else {
+ /* Just a bare $. Spit it out */
+ putchar('$');
+ }
+ }
+ }
+ }
+
+ /* We're all done. Spit out an EOL */
+ printf("\n");
+
+
+ }
+
+ /* Close the files */
+ fclose(ConfigSH);
+ fclose(Config_H);
+}
+
+void
+tilde_sub(char LineBuffer[], Translate TildeSub[], int TildeSubCount)
+{
+ char TempBuffer[LINEBUFFERSIZE], TempTilde[TOKENBUFFERSIZE];
+ int TildeLoop, InTilde, CopiedBufferLength, TildeBufferLength, k, GotIt;
+ int TempLength;
+ InTilde = 0;
+ CopiedBufferLength = 0;
+ TildeBufferLength = 0;
+ TempLength = strlen(LineBuffer);
+
+ /* Grovel over our input looking for ~foo~ constructs */
+ for(TildeLoop = 0; TildeLoop < TempLength; TildeLoop++) {
+ /* Are we in a tilde? */
+ if (InTilde) {
+ /* Yup. Is the current character a tilde? */
+ if (LineBuffer[TildeLoop] == '~') {
+ /* Yup. That means we're ready to do a substitution */
+ InTilde = 0;
+ GotIt = 0;
+ /* Trailing null */
+ TempTilde[TildeBufferLength] = '\0';
+ for( k=0; k < TildeSubCount; k++) {
+ if (!strcmp(TildeSub[k].Tag, TempTilde)) {
+ GotIt = 1;
+ /* Tack on the trailing null to the main buffer */
+ TempBuffer[CopiedBufferLength] = '\0';
+ /* Copy the tilde substitution over */
+ strcat(TempBuffer, TildeSub[k].Value);
+ CopiedBufferLength = strlen(TempBuffer);
+ }
+ }
+
+ /* Did we find anything? */
+ if (GotIt == 0) {
+ /* Guess not. Copy the whole thing out verbatim */
+ TempBuffer[CopiedBufferLength] = '\0';
+ TempBuffer[CopiedBufferLength++] = '~';
+ TempBuffer[CopiedBufferLength] = '\0';
+ strcat(TempBuffer, TempTilde);
+ strcat(TempBuffer, "~");
+ CopiedBufferLength = strlen(TempBuffer);
+ }
+
+ } else {
+ /* 'Kay, not a tilde. Is it a word character? */
+ if (isalnum(LineBuffer[TildeLoop]) || (LineBuffer[TildeLoop] =
+ '-') ||
+ (LineBuffer[TildeLoop] == '-')) {
+ TempTilde[TildeBufferLength++] = LineBuffer[TildeLoop];
+ } else {
+ /* No, it's not a tilde character. For shame! We've got a */
+ /* bogus token. Copy a ~ into the output buffer, then append */
+ /* whatever we've got in our token buffer */
+ TempBuffer[CopiedBufferLength++] = '~';
+ TempBuffer[CopiedBufferLength] = '\0';
+ TempTilde[TildeBufferLength] = '\0';
+ strcat(TempBuffer, TempTilde);
+ CopiedBufferLength += TildeBufferLength;
+ InTilde = 0;
+ }
+ }
+ } else {
+ /* We're not in a tilde. Do we want to be? */
+ if (LineBuffer[TildeLoop] == '~') {
+ /* Guess so */
+ InTilde = 1;
+ TildeBufferLength = 0;
+ } else {
+ /* Nope. Copy the character to the output buffer */
+ TempBuffer[CopiedBufferLength++] = LineBuffer[TildeLoop];
+ }
+ }
+ }
+
+ /* Out of the loop. First, double-check to see if there was anything */
+ /* pending. */
+ if (InTilde) {
+ /* bogus token. Copy a ~ into the output buffer, then append */
+ /* whatever we've got in our token buffer */
+ TempBuffer[CopiedBufferLength++] = '~';
+ TempBuffer[CopiedBufferLength] = '\0';
+ TempTilde[TildeBufferLength] = '\0';
+ strcat(TempBuffer, TempTilde);
+ CopiedBufferLength += TildeBufferLength;
+ } else {
+ /* Nope, nothing pensing. Tack on a \0 */
+ TempBuffer[CopiedBufferLength] = '\0';
+ }
+
+ /* Okay, we're done. Copy the temp buffer back into the line buffer */
+ strcpy(LineBuffer, TempBuffer);
+
+}
+
diff --git a/gnu/usr.bin/perl/vms/subconfigure.com b/gnu/usr.bin/perl/vms/subconfigure.com
new file mode 100644
index 00000000000..4cdafbc08f8
--- /dev/null
+++ b/gnu/usr.bin/perl/vms/subconfigure.com
@@ -0,0 +1,2628 @@
+$! SUBCONFIGURE.COM - build a config.sh for VMS Perl.
+$!
+$! Note for folks from other platforms changing things in here:
+$! Fancy changes (based on compiler capabilities or VMS version or
+$! whatever) are tricky, so go ahead and punt on those.
+$!
+$! Simple changes, though (say, always setting something to 1, or undef,
+$! or something like that) are straightforward. Adding a new item for the
+$! ultimately created config.sh requires adding two lines to this file.
+$!
+$! First, a line in the format:
+$! $ perl_foo = "bar"
+$! after the line tagged ##ADD NEW CONSTANTS HERE##. Replace foo with the
+$! variable name as it appears in config.sh.
+$!
+$! Second, add a line in the format:
+$! $ WC "foo='" + perl_foo + "'"
+$! after the line tagged ##WRITE NEW CONSTANTS HERE##. Careful of the
+$! quoting, as it can be tricky.
+$!
+$! This .COM file expects to be called by configure.com, and thus expects
+$! a few symbols in the environment. Notably:
+$!
+$! One of: Using_Dec_C, Using_Vax_C, Using_Gnu_C set to "YES"
+$! Dec_C_Version set to the Dec C version (defaults to 0 if not specified)
+$! Has_Socketshr set to "T" if using socketshr
+$! Has_Dec_C_Sockets set to "T" if using Dec C sockets
+$! Use_Threads set to "T" if they're using threads
+$! C_Compiler_Invoke is the command needed to invoke the C compiler
+$!
+$! Set Dec_C_Version to something
+$ WRITE_RESULT := "WRITE SYS$OUTPUT ""%CONFIG-I-RESULT "" + "
+$ Dec_C_Version := "''Dec_C_Version'"
+$ Dec_C_Version = Dec_C_Version + 0
+$ Vms_Ver := "''f$extract(1,3, f$getsyi(""version""))'"
+$ perl_extensions := "''extensions'"
+$ if f$length(Mcc) .eq. 0 then Mcc := "cc"
+$ MCC = f$edit(mcc, "UPCASE")
+$ IF Mcc.eqs."CC
+$ THEN
+$ C_Compiler_Replace := "CC="
+$ ELSE
+$ C_Compiler_Replace := "CC=CC=''Mcc'"
+$ ENDIF
+$ if "''Using_Dec_C'" .eqs. "Yes"
+$ THEN
+$ Checkcc := "''Mcc'/prefix=all"
+$ ELSE
+$ Checkcc := "''Mcc'"
+$ ENDIF
+$ cc_flags = ""
+$! Some constant defaults.
+$
+$ hwname = f$getsyi("HW_NAME")
+$ myname = myhostname
+$ if "''myname'" .eqs. "" THEN myname = f$trnlnm("SYS$NODE")
+$!
+$! ##ADD NEW CONSTANTS HERE##
+$ perl_i_sysmount="undef"
+$ perl_d_fstatfs="undef"
+$ perl_i_machcthreads="undef"
+$ perl_i_pthread="define"
+$ perl_d_fstatvfs="undef"
+$ perl_d_statfsflags="undef"
+$ perl_i_sysstatvfs="undef"
+$ perl_i_mntent="undef"
+$ perl_d_getmntent="undef"
+$ perl_d_hasmntopt="undef"
+$ perl_package="''package'"
+$ perl_baserev = "''baserev'"
+$ cc_defines=""
+$ perl_CONFIG="true"
+$ perl_i_netdb="undef"
+$ perl_d_gnulibc="undef"
+$ perl_cf_by="unknown"
+$ perl_ccdlflags=""
+$ perl_cccdlflags=""
+$ perl_mab=""
+$ perl_libpth="/sys$share /sys$library"
+$ perl_ld="Link"
+$ perl_lddlflags="/Share"
+$ perl_ranlib=""
+$ perl_ar=""
+$ perl_eunicefix=":"
+$ perl_hint="none"
+$ perl_i_arpainet="undef"
+$ perl_d_grpasswd="undef"
+$ perl_d_setgrent="undef"
+$ perl_d_getgrent="define"
+$ perl_d_endgrent="define"
+$ perl_d_pwpasswd="define"
+$ perl_d_setpwent="define"
+$ perl_d_getpwent="define"
+$ perl_d_endpwent="define"
+$ perl_ebcdic="undef"
+$ perl_hintfile=""
+$ perl_shrplib="define"
+$ perl_usemymalloc=mymalloc
+$ perl_usevfork="true"
+$ perl_useposix="false"
+$ perl_spitshell="write sys$output "
+$ perl_dlsrc="dl_vms.c"
+$ perl_man1ext="rno"
+$ perl_man3ext="rno"
+$ perl_prefix="perl_root"
+$ perl_binexp="''perl_prefix':[000000]"
+$ perl_builddir="''perl_prefix':[000000]"
+$ perl_installbin="''perl_prefix':[000000]"
+$ perl_installscript="''perl_prefix':[000000]"
+$ perl_installman1dir="''perl_prefix':[man.man1]"
+$ perl_installman3dir="''perl_prefix':[man.man3]"
+$ perl_installprivlib="''perl_prefix':[lib]"
+$ perl_installsitelib="''perl_prefix':[lib.site_perl]"
+$ perl_path_sep="|"
+$ perl_cc=Mcc
+$ perl_d_sockpair="undef"
+$ perl_i_neterrno="define"
+$ perl_ldflags="/NoTrace/NoMap"
+$ perl_d_lchown="undef"
+$ perl_d_mknod="undef"
+$ perl_d_union_semun="undef"
+$ perl_d_semctl_semun="undef"
+$ perl_d_semctl_semid_ds="undef"
+$ IF (sharedperl.EQS."Y")
+$ THEN
+$ perl_obj_ext=".abj"
+$ perl_so="axe"
+$ perl_dlext="axe"
+$ perl_exe_ext=".axe"
+$ perl_lib_ext=".alb"
+$ ELSE
+$ perl_obj_ext=".obj"
+$ perl_so="exe"
+$ perl_dlext="exe"
+$ perl_exe_ext=".exe"
+$ perl_lib_ext=".olb"
+$ENDIF
+$ perl_dlobj="dl_vms''perl_obj_ext'"
+$ perl_osname="VMS"
+$ perl_d_archlib="define"
+$ perl_d_bincompat3="undef"
+$ perl_cppstdin="''Perl_CC'/noobj/preprocess=sys$output sys$input"
+$ perl_cppminus=""
+$ perl_d_castneg="define"
+$ perl_castflags="0"
+$ perl_d_chsize="undef"
+$ perl_d_const="define"
+$ perl_d_crypt="define"
+$ perl_byteorder="1234"
+$ perl_full_csh=""
+$ perl_d_csh="undef"
+$ perl_d_dup2="define"
+$ perl_d_fchmod="undef"
+$ perl_d_fchown="undef"
+$ perl_d_fcntl="undef"
+$ perl_d_fgetpos="define"
+$ perl_d_flexfnam="define"
+$ perl_d_flock="undef"
+$ perl_d_fsetpos="define"
+$ perl_d_getgrps="undef"
+$ perl_d_setgrps="undef"
+$ perl_d_getprior="undef"
+$ perl_d_killpg="undef"
+$ perl_d_link="undef"
+$ perl_d_lstat="undef"
+$ perl_d_lockf="undef"
+$ perl_d_memcmp="define"
+$ perl_d_memcpy="define"
+$ perl_d_memmove="define"
+$ perl_d_memset="define"
+$ perl_d_mkdir="define"
+$ perl_d_msg="undef"
+$ perl_d_open3="define"
+$ perl_d_poll="undef"
+$ perl_d_readdir="define"
+$ perl_d_seekdir="define"
+$ perl_d_telldir="define"
+$ perl_d_rewinddir="define"
+$ perl_d_rename="define"
+$ perl_d_rmdir="define"
+$ perl_d_sem="undef"
+$ perl_d_setegid="undef"
+$ perl_d_seteuid="undef"
+$ perl_d_setprior="undef"
+$ perl_d_setregid="undef"
+$ perl_d_setresgid="undef"
+$ perl_d_setreuid="undef"
+$ perl_d_setresuid="undef"
+$ perl_d_setrgid="undef"
+$ perl_d_setruid="undef"
+$ perl_d_setsid="undef"
+$ perl_d_shm="undef"
+$ perl_d_shmatprototype="undef"
+$ perl_d_statblks="undef"
+$ perl_stdio_ptr="((*fp)->_ptr)"
+$ perl_stdio_cnt="((*fp)->_cnt)"
+$ perl_stdio_base="((*fp)->_base)"
+$ perl_stdio_bufsiz="((*fp)->_cnt + (*fp)->_ptr - (*fp)->_base)"
+$ perl_d_strctcpy="define"
+$ perl_d_strerror="define"
+$ perl_d_syserrlst="undef"
+$ perl_d_strerrm="strerror((e),vaxc$errno)"
+$ perl_d_symlink="undef"
+$ perl_d_syscall="undef"
+$ perl_d_system="define"
+$ perl_timetype="time_t"
+$ perl_d_vfork="define"
+$ perl_signal_t="void"
+$ perl_d_volatile="define"
+$ perl_d_vprintf="define"
+$ perl_d_charvspr="undef"
+$ perl_d_waitpid="define"
+$ perl_i_dirent="undef"
+$ perl_d_dirnamlen="define"
+$ perl_direntrytype="struct dirent"
+$ perl_i_fcntl="undef"
+$ perl_i_grp="undef"
+$ perl_i_limits="define"
+$ perl_i_memory="undef"
+$ perl_i_ndbm="undef"
+$ perl_i_stdarg="define"
+$ perl_i_pwd="undef"
+$ perl_d_pwquota="undef"
+$ perl_d_pwage="undef"
+$ perl_d_pwchange="undef"
+$ perl_d_pwclass="undef"
+$ perl_d_pwexpire="undef"
+$ perl_d_pwcomment="define"
+$ perl_i_stddef="define"
+$ perl_i_stdlib="define"
+$ perl_i_string="define"
+$ perl_i_sysdir="undef"
+$ perl_i_sysfile="undef"
+$ perl_i_sysioctl="undef"
+$ perl_i_sysndir="undef"
+$ perl_i_sysresrc="undef"
+$ perl_i_sysselct="undef"
+$ perl_i_dbm="undef"
+$ perl_i_rpcsvcdbm="undef"
+$ perl_i_sfio="undef"
+$ perl_i_sysstat="define"
+$ perl_i_systimes="undef"
+$ perl_i_systypes="define"
+$ perl_i_sysun="undef"
+$ perl_i_syswait="undef"
+$ perl_i_termio="undef"
+$ perl_i_sgtty="undef"
+$ perl_i_termios="undef"
+$ perl_i_time="define"
+$ perl_i_systime="undef"
+$ perl_i_systimek="undef"
+$! perl_i_unistd="undef"
+$ perl_i_utime="undef"
+$ perl_i_varargs="undef"
+$ perl_i_vfork="undef"
+$ perl_prototype="define"
+$ perl_randbits="31"
+$ perl_stdchar="char"
+$ perl_d_unlink_all_versions="undef"
+$ perl_full_sed="_NLA0:"
+$ perl_bin="/''perl_prefix'/000000"
+$ perl_binexp="''perl_prefix':[000000]"
+$ perl_d_alarm="define"
+$ perl_d_casti32="define"
+$ perl_d_chown="define"
+$ perl_d_chroot="undef"
+$ perl_d_cuserid="define"
+$ perl_d_dbl_dig="define"
+$ perl_d_difftime="define"
+$ perl_d_fork="undef"
+$ perl_d_getlogin="define"
+$ perl_d_getppid="undef"
+$ perl_d_nice="define"
+$ perl_d_pause="define"
+$ perl_d_pipe="define"
+$ perl_d_readlink="undef"
+$ perl_d_setlinebuf="undef"
+$ perl_d_strchr="define"
+$ perl_d_strtod="define"
+$ perl_d_strtol="define"
+$ perl_d_strtoul="define"
+$ perl_d_tcgetpgrp="undef"
+$ perl_d_tcsetpgrp="undef"
+$ perl_d_times="define"
+$ perl_d_tzname="undef"
+$ perl_d_umask="define"
+$ perl_fpostype="fpos_t"
+$ perl_i_dlfcn="undef"
+$ perl_i_float="define"
+$ perl_i_math="define"
+$ perl_lseektype="int"
+$ perl_i_values="undef"
+$ perl_malloctype="void *"
+$ perl_freetype="void"
+$ if "''mymalloc'".eqs."Y"
+$ THEN
+$ perl_d_mymalloc="define"
+$ ELSE
+$ perl_d_mymalloc="undef"
+$ENDIF
+$ perl_sh="MCR"
+$ perl_modetype="unsigned int"
+$ perl_ssizetype="int"
+$ perl_o_nonblock=""
+$ perl_eagain=""
+$ perl_rd_nodata=""
+$ perl_d_eofnblk="undef"
+$ perl_d_oldarchlib="define"
+$ perl_privlibexp="''perl_prefix':[lib]"
+$ perl_privlib="''perl_prefix':[lib]"
+$ perl_sitelibexp="''perl_prefix':[lib.site_perl]"
+$ perl_sitelib="''perl_prefix':[lib.site_perl]"
+$ perl_sizetype="size_t"
+$ perl_i_sysparam="undef"
+$ perl_d_void_closedir="define"
+$ perl_d_dlerror="undef"
+$ perl_d_dlsymun="undef"
+$ perl_d_suidsafe="undef"
+$ perl_d_dosuid="undef"
+$ perl_d_inetaton="undef"
+$ perl_d_isascii="define"
+$ perl_d_mkfifo="undef"
+$ perl_d_safebcpy="undef"
+$ perl_d_safemcpy="define"
+$ perl_d_sanemcmp="define"
+$ perl_d_setpgrp="undef"
+$ perl_d_bsdsetpgrp="undef"
+$ perl_d_bsdpgrp="undef"
+$ perl_d_setpgid="undef"
+$ perl_d_setpgrp2="undef"
+$ perl_d_Gconvert="my_gconvert(x,n,t,b)"
+$ perl_d_getpgid="undef"
+$ perl_d_getpgrp="undef"
+$ perl_d_bsdgetpgrp="undef"
+$ perl_d_getpgrp2="undef"
+$ perl_d_sfio="undef"
+$ perl_usedl="define"
+$ perl_startperl="""$ perl 'f$env(\""procedure\"")' 'p1' 'p2' 'p3' 'p4' 'p5' 'p6' 'p7' 'p8' !\n$ exit++ + ++$status != 0 and $exit = $status = undef;"""
+$ perl_db_hashtype=""
+$ perl_db_prefixtype=""
+$ perl_useperlio="undef"
+$ perl_defvoidused="15"
+$ perl_voidflags="15"
+$ perl_d_eunice="undef"
+$ perl_d_pwgecos="define"
+$ IF ("''Use_Threads'".eqs."T").and.("''VMS_VER'".LES."6.2")
+$ THEN
+$ perl_libs="SYS$SHARE:CMA$LIB_SHR.EXE/SHARE SYS$SHARE:CMA$RTL.EXE/SHARE SYS$SHARE:CMA$OPEN_LIB_SHR.exe/SHARE SYS$SHARE:CMA$OPEN_RTL.exe/SHARE"
+$ ELSE
+$ perl_libs=""
+$ ENDIF
+$ IF ("''Using_Dec_C'".eqs."Yes")
+$ THEN
+$ perl_libc="(DECCRTL)"
+$ ELSE
+$ perl_libc=""
+$ ENDIF
+$ perl_PATCHLEVEL="''patchlevel'"
+$ perl_SUBVERSION="''subversion'"
+$ perl_pager="most"
+$!
+$!
+$! Now some that we build up
+$!
+$ LocalTime = f$time()
+$ perl_cf_time= f$extract(0, 3, f$cvtime(LocalTime,, "WEEKDAY")) + " " + -
+ f$edit(f$cvtime(LocalTime, "ABSOLUTE", "MONTH"), "LOWERCASE") + -
+ " " + f$cvtime(LocalTime,, "DAY") + " " + f$cvtime(LocalTime,, "TIME") + -
+ " " + f$cvtime(LocalTime,, "YEAR")
+$ if f$getsyi("HW_MODEL").ge.1024
+$ THEN
+$ perl_arch="VMS_AXP"
+$ perl_archname="VMS_AXP"
+$ perl_alignbytes="8"
+$ ELSE
+$ perl_arch="VMS_VAX"
+$ perl_archname="VMS_VAX"
+$ perl_alignbytes="8"
+$ ENDIF
+$ if ("''Use_Threads'".eqs."T")
+$ THEN
+$ perl_arch = "''perl_arch'-thread"
+$ perl_archname = "''perl_archname'-thread"
+$ ENDIF
+$ perl_osvers=f$edit(osvers, "TRIM")
+$ if (perl_subversion + 0).eq.0
+$ THEN
+$ LocalPerlVer = "5_" + Perl_PATCHLEVEL
+$ ELSE
+$ LocalPerlVer = "5_" + Perl_PATCHLEVEL + perl_subversion
+$ ENDIF
+$!
+$! Some that we need to invoke the compiler for
+$ OS := "open/write SOURCECHAN []temp.c"
+$ WS := "write SOURCECHAN"
+$ CS := "close SOURCECHAN"
+$ DS := "delete/nolog []temp.*;*"
+$ Needs_Opt := "No"
+$ if ("''using_vax_c'".eqs."Yes").or.("''using_gnu_c'".eqs."Yes")
+$ THEN
+$ open/write OPTCHAN []temp.opt
+$ IF ("''using_gnu_c'".eqs."Yes")
+$ THEN
+$ write OPTCHAN "Gnu_CC:[000000]gcclib.olb/library"
+$ endif
+$ write OPTCHAN "Sys$Share:VAXCRTL/Share"
+$ Close OPTCHAN
+$ Needs_Opt := "Yes"
+$ ENDIF
+$!
+$! Check for __STDC__
+$!
+$ OS
+$ WS "#ifdef __DECC
+$ WS "#include <stdlib.h>
+$ WS "#endif
+$ WS "#include <stdio.h>
+$ WS "int main()
+$ WS "{"
+$ WS "#ifdef __STDC__
+$ WS "printf(""42\n"");
+$ WS "#else
+$ WS "printf(""1\n"");
+$ WS "#endif
+$ WS "exit(0);
+$ WS "}"
+$ CS
+$ DEFINE SYS$ERROR _NLA0:
+$ DEFINE SYS$OUTPUT _NLA0:
+$ ON ERROR THEN CONTINUE
+$ ON WARNING THEN CONTINUE
+$ 'Checkcc' temp.c
+$ If (Needs_Opt.eqs."Yes")
+$ THEN
+$ link temp.obj,temp.opt/opt
+$ else
+$ link temp.obj
+$ endif
+$ DEASSIGN SYS$OUTPUT
+$ DEASSIGN SYS$ERROR
+$ OPEN/WRITE TEMPOUT [-.uu]tempout.lis
+$ DEFINE SYS$ERROR TEMPOUT
+$ DEFINE SYS$OUTPUT TEMPOUT
+$ mcr []temp
+$ CLOSE TEMPOUT
+$ DEASSIGN SYS$OUTPUT
+$ DEASSIGN SYS$ERROR
+$ OPEN/READ TEMPOUT [-.uu]tempout.lis
+$ READ TEMPOUT line
+$ CLOSE TEMPOUT
+$
+$ perl_cpp_stuff=line
+$ WRITE_RESULT "cpp_stuff is ''perl_cpp_stuff'"
+$!
+$! Check for double size
+$!
+$ OS
+$ WS "#ifdef __DECC
+$ WS "#include <stdlib.h>
+$ WS "#endif
+$ WS "#include <stdio.h>
+$ WS "int main()
+$ WS "{"
+$ WS "int foo;
+$ WS "foo = sizeof(double);
+$ WS "printf(""%d\n"", foo);
+$ WS "exit(0);
+$ WS "}"
+$ CS
+$ DEFINE SYS$ERROR _NLA0:
+$ DEFINE SYS$OUTPUT _NLA0:
+$ ON ERROR THEN CONTINUE
+$ ON WARNING THEN CONTINUE
+$ 'Checkcc' temp.c
+$ If (Needs_Opt.eqs."Yes")
+$ THEN
+$ link temp.obj,temp.opt/opt
+$ else
+$ link temp.obj
+$ endif
+$! link temp.obj
+$ OPEN/WRITE TEMPOUT [-.uu]tempout.lis
+$ DEASSIGN SYS$OUTPUT
+$ DEASSIGN SYS$ERROR
+$ DEFINE SYS$ERROR TEMPOUT
+$ DEFINE SYS$OUTPUT TEMPOUT
+$ mcr []temp
+$ CLOSE TEMPOUT
+$ DEASSIGN SYS$OUTPUT
+$ DEASSIGN SYS$ERROR
+$ OPEN/READ TEMPOUT [-.uu]tempout.lis
+$ READ TEMPOUT line
+$ CLOSE TEMPOUT
+$
+$ perl_doublesize=line
+$ WRITE_RESULT "doublesize is ''perl_doublesize'"
+$!
+$! Check for long double size
+$!
+$ OS
+$ WS "#ifdef __DECC
+$ WS "#include <stdlib.h>
+$ WS "#endif
+$ WS "#include <stdio.h>
+$ WS "int main()
+$ WS "{"
+$ WS "printf(""%d\n"", sizeof(long double));
+$ WS "exit(0);
+$ WS "}"
+$ CS
+$ DEFINE SYS$ERROR _NLA0:
+$ DEFINE SYS$OUTPUT _NLA0:
+$ ON ERROR THEN CONTINUE
+$ ON WARNING THEN CONTINUE
+$ 'Checkcc' temp.c
+$ teststatus = f$extract(9,1,$status)
+$ if (teststatus.nes."1")
+$ THEN
+$ perl_longdblsize="0"
+$ perl_d_longdbl="undef"
+$ ELSE
+$ ON ERROR THEN CONTINUE
+$ ON WARNING THEN CONTINUE
+$ If (Needs_Opt.eqs."Yes")
+$ THEN
+$ link temp.obj,temp.opt/opt
+$ else
+$ link temp.obj
+$ endif
+$ teststatus = f$extract(9,1,$status)
+$ DEASSIGN SYS$OUTPUT
+$ DEASSIGN SYS$ERROR
+$ if (teststatus.nes."1")
+$ THEN
+$ perl_longdblsize="0"
+$ perl_d_longdbl="undef"
+$ ELSE
+$ OPEN/WRITE TEMPOUT [-.uu]tempout.lis
+$ DEFINE SYS$ERROR TEMPOUT
+$ DEFINE SYS$OUTPUT TEMPOUT
+$ mcr []temp
+$ CLOSE TEMPOUT
+$ DEASSIGN SYS$OUTPUT
+$ DEASSIGN SYS$ERROR
+$ OPEN/READ TEMPOUT [-.uu]tempout.lis
+$ READ TEMPOUT line
+$ CLOSE TEMPOUT
+$
+$ perl_longdblsize=line
+$ perl_d_longdbl="define"
+$ ENDIF
+$ ENDIF
+$ WRITE_RESULT "longdblsize is ''perl_longdblsize'"
+$ WRITE_RESULT "d_longdbl is ''perl_d_longdbl'"
+$!
+$! Check for long long existance and size
+$!
+$ OS
+$ WS "#ifdef __DECC
+$ WS "#include <stdlib.h>
+$ WS "#endif
+$ WS "#include <stdio.h>
+$ WS "int main()
+$ WS "{"
+$ WS "printf(""%d\n"", sizeof(long long));
+$ WS "exit(0);
+$ WS "}"
+$ CS
+$ DEFINE SYS$ERROR _NLA0:
+$ DEFINE SYS$OUTPUT _NLA0:
+$ on error then continue
+$ on warning then continue
+$ 'Checkcc' temp.c
+$ If (Needs_Opt.eqs."Yes")
+$ THEN
+$ link temp.obj,temp.opt/opt
+$ else
+$ link temp.obj
+$ endif
+$ teststatus = f$extract(9,1,$status)
+$ DEASSIGN SYS$OUTPUT
+$ DEASSIGN SYS$ERROR
+$ if (teststatus.nes."1")
+$ THEN
+$ perl_longlongsize="0"
+$ perl_d_longlong="undef"
+$ ELSE
+$ OPEN/WRITE TEMPOUT [-.uu]tempout.lis
+$ DEFINE SYS$ERROR TEMPOUT
+$ DEFINE SYS$OUTPUT TEMPOUT
+$ mcr []temp
+$ CLOSE TEMPOUT
+$ DEASSIGN SYS$OUTPUT
+$ DEASSIGN SYS$ERROR
+$ OPEN/READ TEMPOUT [-.uu]tempout.lis
+$ READ TEMPOUT line
+$ CLOSE TEMPOUT
+$
+$ perl_longlongsize=line
+$ perl_d_longlong="define"
+$ ENDIF
+$ WRITE_RESULT "longlongsize is ''perl_longlongsize'"
+$ WRITE_RESULT "d_longlong is ''perl_d_longlong'"
+$!
+$! Check for int size
+$!
+$ OS
+$ WS "#ifdef __DECC
+$ WS "#include <stdlib.h>
+$ WS "#endif
+$ WS "#include <stdio.h>
+$ WS "int main()
+$ WS "{"
+$ WS "printf(""%d\n"", sizeof(int));
+$ WS "exit(0);
+$ WS "}"
+$ CS
+$ DEFINE SYS$ERROR _NLA0:
+$ DEFINE SYS$OUTPUT _NLA0:
+$ on error then continue
+$ on warning then continue
+$ 'Checkcc' temp.c
+$ If (Needs_Opt.eqs."Yes")
+$ THEN
+$ link temp.obj,temp.opt/opt
+$ else
+$ link temp.obj
+$ endif
+$ If (Needs_Opt.eqs."Yes")
+$ THEN
+$ link temp.obj,temp.opt/opt
+$ else
+$ link temp.obj
+$ endif
+$ OPEN/WRITE TEMPOUT [-.uu]tempout.lis
+$ DEASSIGN SYS$OUTPUT
+$ DEASSIGN SYS$ERROR
+$ DEFINE SYS$ERROR TEMPOUT
+$ DEFINE SYS$OUTPUT TEMPOUT
+$ mcr []temp
+$ CLOSE TEMPOUT
+$ DEASSIGN SYS$OUTPUT
+$ DEASSIGN SYS$ERROR
+$ OPEN/READ TEMPOUT [-.uu]tempout.lis
+$ READ TEMPOUT line
+$ CLOSE TEMPOUT
+$
+$ perl_intsize=line
+$ WRITE_RESULT "intsize is ''perl_intsize'"
+$!
+$! Check for short size
+$!
+$ OS
+$ WS "#ifdef __DECC
+$ WS "#include <stdlib.h>
+$ WS "#endif
+$ WS "#include <stdio.h>
+$ WS "int main()
+$ WS "{"
+$ WS "printf(""%d\n"", sizeof(short));
+$ WS "exit(0);
+$ WS "}"
+$ CS
+$ DEFINE SYS$ERROR _NLA0:
+$ DEFINE SYS$OUTPUT _NLA0:
+$ on error then continue
+$ on warning then continue
+$ 'Checkcc' temp.c
+$ If (Needs_Opt.eqs."Yes")
+$ THEN
+$ link temp.obj,temp.opt/opt
+$ else
+$ link temp.obj
+$ endif
+$ OPEN/WRITE TEMPOUT [-.uu]tempout.lis
+$ DEASSIGN SYS$OUTPUT
+$ DEASSIGN SYS$ERROR
+$ DEFINE SYS$ERROR TEMPOUT
+$ DEFINE SYS$OUTPUT TEMPOUT
+$ mcr []temp
+$ CLOSE TEMPOUT
+$ DEASSIGN SYS$OUTPUT
+$ DEASSIGN SYS$ERROR
+$ OPEN/READ TEMPOUT [-.uu]tempout.lis
+$ READ TEMPOUT line
+$ CLOSE TEMPOUT
+$
+$ perl_shortsize=line
+$ WRITE_RESULT "shortsize is ''perl_shortsize'"
+$!
+$! Check for long size
+$!
+$ OS
+$ WS "#ifdef __DECC
+$ WS "#include <stdlib.h>
+$ WS "#endif
+$ WS "#include <stdio.h>
+$ WS "int main()
+$ WS "{"
+$ WS "int foo;
+$ WS "foo = sizeof(long);
+$ WS "printf(""%d\n"", foo);
+$ WS "exit(0);
+$ WS "}"
+$ CS
+$ DEFINE SYS$ERROR _NLA0:
+$ DEFINE SYS$OUTPUT _NLA0:
+$ on error then continue
+$ on warning then continue
+$ 'Checkcc' temp.c
+$ If (Needs_Opt.eqs."Yes")
+$ THEN
+$ link temp.obj,temp.opt/opt
+$ else
+$ link temp.obj
+$ endif
+$ OPEN/WRITE TEMPOUT [-.uu]tempout.lis
+$ DEASSIGN SYS$OUTPUT
+$ DEASSIGN SYS$ERROR
+$ DEFINE SYS$ERROR TEMPOUT
+$ DEFINE SYS$OUTPUT TEMPOUT
+$ mcr []temp
+$ CLOSE TEMPOUT
+$ DEASSIGN SYS$OUTPUT
+$ DEASSIGN SYS$ERROR
+$ OPEN/READ TEMPOUT [-.uu]tempout.lis
+$ READ TEMPOUT line
+$ CLOSE TEMPOUT
+$
+$ perl_longsize=line
+$ WRITE_RESULT "longsize is ''perl_longsize'"
+$!
+$! Check the prototype for getgid
+$!
+$ OS
+$ WS "#ifdef __DECC
+$ WS "#include <stdlib.h>
+$ WS "#endif
+$ WS "#include <stdio.h>
+$ WS "#include <types.h>
+$ WS "#include <unistd.h>
+$ WS "int main()
+$ WS "{"
+$ WS "gid_t foo;
+$ WS "exit(0);
+$ WS "}"
+$ CS
+$ DEFINE SYS$ERROR _NLA0:
+$ DEFINE SYS$OUTPUT _NLA0:
+$ on error then continue
+$ on warning then continue
+$ 'Checkcc' temp.c
+$ teststatus = f$extract(9,1,$status)
+$ DEASSIGN SYS$OUTPUT
+$ DEASSIGN SYS$ERROR
+$ if (teststatus.nes."1")
+$ THEN
+$! Okay, gid_t failed. Must be unsigned int
+$ perl_gidtype = "unsigned int"
+$ ELSE
+$ perl_gidtype = "gid_t"
+$ ENDIF
+$ WRITE_RESULT "Gid_t is ''perl_gidtype'"
+$!
+$! Check to see if we've got dev_t
+$!
+$ OS
+$ WS "#ifdef __DECC
+$ WS "#include <stdlib.h>
+$ WS "#endif
+$ WS "#include <stdio.h>
+$ WS "#include <types.h>
+$ WS "#include <unistd.h>
+$ WS "int main()
+$ WS "{"
+$ WS "dev_t foo;
+$ WS "exit(0);
+$ WS "}"
+$ CS
+$ DEFINE SYS$ERROR _NLA0:
+$ DEFINE SYS$OUTPUT _NLA0:
+$ on error then continue
+$ on warning then continue
+$ 'Checkcc' temp.c
+$ teststatus = f$extract(9,1,$status)
+$ DEASSIGN SYS$OUTPUT
+$ DEASSIGN SYS$ERROR
+$ if (teststatus.nes."1")
+$ THEN
+$! Okay, dev_t failed. Must be unsigned int
+$ perl_devtype = "unsigned int"
+$ ELSE
+$ perl_devtype = "dev_t"
+$ ENDIF
+$ WRITE_RESULT "Dev_t is ''perl_devtype'"
+$!
+$! Check to see if we've got unistd.h (which we ought to, but you never know)
+$!
+$ OS
+$ WS "#ifdef __DECC
+$ WS "#include <stdlib.h>
+$ WS "#endif
+$ WS "#include <unistd.h>
+$ WS "int main()
+$ WS "{"
+$ WS "exit(0);
+$ WS "}"
+$ CS
+$ DEFINE SYS$ERROR _NLA0:
+$ DEFINE SYS$OUTPUT _NLA0:
+$ on error then continue
+$ on warning then continue
+$ 'Checkcc' temp.c
+$ teststatus = f$extract(9,1,$status)
+$ DEASSIGN SYS$OUTPUT
+$ DEASSIGN SYS$ERROR
+$ if (teststatus.nes."1")
+$ THEN
+$! Okay, failed. Must not have it
+$ perl_i_unistd = "undef"
+$ ELSE
+$ perl_i_unistd = "define"
+
+$ ENDIF
+$ WRITE_RESULT "i_unistd is ''perl_i_unistd'"
+$!
+$! Check the prototype for select
+$!
+$ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
+$ THEN
+$ OS
+$ WS "#ifdef __DECC
+$ WS "#include <stdlib.h>
+$ WS "#endif
+$ WS "#include <stdio.h>
+$ WS "#include <types.h>
+$ WS "#include <unistd.h>
+$ if ("''Has_Socketshr'".eqs."T")
+$ THEN
+$ WS "#include <socketshr.h>"
+$ else
+$ WS "#include <time.h>
+$ WS "#include <socket.h>
+$ endif
+$ WS "int main()
+$ WS "{"
+$ WS "fd_set *foo;
+$ WS "int bar;
+$ WS "foo = NULL;
+$ WS "bar = select(2, foo, foo, foo, NULL);
+$ WS "exit(0);
+$ WS "}"
+$ CS
+$ DEFINE SYS$ERROR _NLA0:
+$ DEFINE SYS$OUTPUT _NLA0:
+$ on error then continue
+$ on warning then continue
+$ 'Checkcc' temp.c
+$ teststatus = f$extract(9,1,$status)
+$ DEASSIGN SYS$OUTPUT
+$ DEASSIGN SYS$ERROR
+$ if (teststatus.nes."1")
+$ THEN
+$! Okay, fd_set failed. Must be an int
+$ perl_selecttype = "int *"
+$ ELSE
+$ perl_selecttype="fd_set *"
+$ ENDIF
+$ ELSE
+$ ! No sockets, so stick in an int *
+$ perl_selecttype = "int *"
+$ ENDIF
+$ WRITE_RESULT "selectype is ''perl_selecttype'"
+$!
+$! Check for sys/file.h
+$!
+$ OS
+$ WS "#ifdef __DECC
+$ WS "#include <stdlib.h>
+$ WS "#endif
+$ WS "#include <stdio.h>
+$ WS "#include <unistd.h>
+$ WS "#include <sys/file.h>
+$ WS "int main()
+$ WS "{"
+$ WS "exit(0);
+$ WS "}"
+$ CS
+$ DEFINE SYS$ERROR _NLA0:
+$ DEFINE SYS$OUTPUT _NLA0:
+$ on error then continue
+$ on warning then continue
+$ 'Checkcc' temp.c
+$ savedstatus = $status
+$ teststatus = f$extract(9,1,savedstatus)
+$ if (teststatus.nes."1")
+$ THEN
+$ perl_i_sysfile="undef"
+$ DEASSIGN SYS$OUTPUT
+$ DEASSIGN SYS$ERROR
+$ ELSE
+$ If (Needs_Opt.eqs."Yes")
+$ THEN
+$ link temp.obj,temp.opt/opt
+$ else
+$ link temp.obj
+$ endif
+$ savedstatus = $status
+$ teststatus = f$extract(9,1,savedstatus)
+$ DEASSIGN SYS$OUTPUT
+$ DEASSIGN SYS$ERROR
+$ if (teststatus.nes."1")
+$ THEN
+$ perl_i_sysfile="undef"
+$ ELSE
+$ perl_i_sysfile="define"
+$ ENDIF
+$ ENDIF
+$ WRITE_RESULT "i_sysfile is ''perl_i_sysfile'"
+$!
+$! Check for fcntl.h
+$!
+$ OS
+$ WS "#ifdef __DECC
+$ WS "#include <stdlib.h>
+$ WS "#endif
+$ WS "#include <stdio.h>
+$ WS "#include <unistd.h>
+$ WS "#include <fcntl.h>
+$ WS "int main()
+$ WS "{"
+$ WS "exit(0);
+$ WS "}"
+$ CS
+$ DEFINE SYS$ERROR _NLA0:
+$ DEFINE SYS$OUTPUT _NLA0:
+$ on error then continue
+$ on warning then continue
+$ 'Checkcc' temp.c
+$ savedstatus = $status
+$ teststatus = f$extract(9,1,savedstatus)
+$ if (teststatus.nes."1")
+$ THEN
+$ perl_i_fcntl="undef"
+$ DEASSIGN SYS$OUTPUT
+$ DEASSIGN SYS$ERROR
+$ ELSE
+$ If (Needs_Opt.eqs."Yes")
+$ THEN
+$ link temp.obj,temp.opt/opt
+$ else
+$ link temp.obj
+$ endif
+$ savedstatus = $status
+$ teststatus = f$extract(9,1,savedstatus)
+$ DEASSIGN SYS$OUTPUT
+$ DEASSIGN SYS$ERROR
+$ if (teststatus.nes."1")
+$ THEN
+$ perl_i_fcntl="undef"
+$ ELSE
+$ perl_i_fcntl="define"
+$ ENDIF
+$ ENDIF
+$ WRITE_RESULT "i_fcntl is ''perl_i_fcntl'"
+$!
+$! Check for fcntl
+$!
+$ OS
+$ WS "#ifdef __DECC
+$ WS "#include <stdlib.h>
+$ WS "#endif
+$ WS "#include <stdio.h>
+$ WS "#include <unistd.h>
+$ WS "#include <fcntl.h>
+$ WS "int main()
+$ WS "{"
+$ WS "fcntl(1,2,3);
+$ WS "exit(0);
+$ WS "}"
+$ CS
+$ DEFINE SYS$ERROR _NLA0:
+$ DEFINE SYS$OUTPUT _NLA0:
+$ on error then continue
+$ on warning then continue
+$ 'Checkcc' temp.c
+$ savedstatus = $status
+$ teststatus = f$extract(9,1,savedstatus)
+$ if (teststatus.nes."1")
+$ THEN
+$ perl_d_fcntl="undef"
+$ DEASSIGN SYS$OUTPUT
+$ DEASSIGN SYS$ERROR
+$ ELSE
+$ If (Needs_Opt.eqs."Yes")
+$ THEN
+$ link temp.obj,temp.opt/opt
+$ else
+$ link temp.obj
+$ endif
+$ savedstatus = $status
+$ teststatus = f$extract(9,1,savedstatus)
+$ DEASSIGN SYS$OUTPUT
+$ DEASSIGN SYS$ERROR
+$ if (teststatus.nes."1")
+$ THEN
+$ perl_d_fcntl="undef"
+$ ELSE
+$ perl_d_fcntl="define"
+$ ENDIF
+$ ENDIF
+$ WRITE_RESULT "d_fcntl is ''perl_d_fcntl'"
+$!
+$! Check for bzero
+$!
+$ OS
+$ WS "#ifdef __DECC
+$ WS "#include <stdlib.h>
+$ WS "#endif
+$ WS "#include <stdio.h>
+$ WS "#include <strings.h>
+$ WS "int main()
+$ WS "{"
+$ WS "char foo[10];
+$ WS "bzero(foo, 10);
+$ WS "exit(0);
+$ WS "}"
+$ CS
+$ DEFINE SYS$ERROR _NLA0:
+$ DEFINE SYS$OUTPUT _NLA0:
+$ on error then continue
+$ on warning then continue
+$ 'Checkcc' temp.c
+$ savedstatus = $status
+$ teststatus = f$extract(9,1,savedstatus)
+$ if (teststatus.nes."1")
+$ THEN
+$ perl_d_bzero="undef"
+$ DEASSIGN SYS$OUTPUT
+$ DEASSIGN SYS$ERROR
+$ ELSE
+$ If (Needs_Opt.eqs."Yes")
+$ THEN
+$ link temp.obj,temp.opt/opt
+$ else
+$ link temp.obj
+$ endif
+$ savedstatus = $status
+$ teststatus = f$extract(9,1,savedstatus)
+$ DEASSIGN SYS$OUTPUT
+$ DEASSIGN SYS$ERROR
+$ if (teststatus.nes."1")
+$ THEN
+$ perl_d_bzero="undef"
+$ ELSE
+$ perl_d_bzero="define"
+$ ENDIF
+$ ENDIF
+$ WRITE_RESULT "d_bzero is ''perl_d_bzero'"
+$!
+$! Check for bcopy
+$!
+$ OS
+$ WS "#ifdef __DECC
+$ WS "#include <stdlib.h>
+$ WS "#endif
+$ WS "#include <stdio.h>
+$ WS "#include <strings.h>
+$ WS "int main()
+$ WS "{"
+$ WS "char foo[10], bar[10];
+$ WS "bcopy(""foo"", bar, 3);
+$ WS "exit(0);
+$ WS "}"
+$ CS
+$ DEFINE SYS$ERROR _NLA0:
+$ DEFINE SYS$OUTPUT _NLA0:
+$ on error then continue
+$ on warning then continue
+$ 'Checkcc' temp.c
+$ savedstatus = $status
+$ teststatus = f$extract(9,1,savedstatus)
+$ if (teststatus.nes."1")
+$ THEN
+$ perl_d_bcopy="undef"
+$ DEASSIGN SYS$OUTPUT
+$ DEASSIGN SYS$ERROR
+$ ELSE
+$ If (Needs_Opt.eqs."Yes")
+$ THEN
+$ link temp.obj,temp.opt/opt
+$ else
+$ link temp.obj
+$ endif
+$ savedstatus = $status
+$ teststatus = f$extract(9,1,savedstatus)
+$ DEASSIGN SYS$OUTPUT
+$ DEASSIGN SYS$ERROR
+$ if (teststatus.nes."1")
+$ THEN
+$ perl_d_bcopy="undef"
+$ ELSE
+$ perl_d_bcopy="define"
+$ ENDIF
+$ ENDIF
+$ WRITE_RESULT "d_bcopy is ''perl_d_bcopy'"
+$!
+$! Check for mkstemp
+$!
+$ OS
+$ WS "#ifdef __DECC
+$ WS "#include <stdlib.h>
+$ WS "#endif
+$ WS "#include <stdio.h>
+$ WS "int main()
+$ WS "{"
+$ WS "mkstemp(""foo"");
+$ WS "exit(0);
+$ WS "}"
+$ CS
+$ DEFINE SYS$ERROR _NLA0:
+$ DEFINE SYS$OUTPUT _NLA0:
+$ on error then continue
+$ on warning then continue
+$ 'Checkcc' temp.c
+$ If (Needs_Opt.eqs."Yes")
+$ THEN
+$ link temp.obj,temp.opt/opt
+$ else
+$ link temp.obj
+$ endif
+$ savedstatus = $status
+$ teststatus = f$extract(9,1,savedstatus)
+$ DEASSIGN SYS$OUTPUT
+$ DEASSIGN SYS$ERROR
+$ if (teststatus.nes."1")
+$ THEN
+$ perl_d_mkstemp="undef"
+$ ELSE
+$ perl_d_mkstemp="define"
+$ ENDIF
+$ WRITE_RESULT "d_mkstemp is ''perl_d_mkstemp'"
+$!
+$! Check for setvbuf
+$!
+$ OS
+$ WS "#ifdef __DECC
+$ WS "#include <stdlib.h>
+$ WS "#endif
+$ WS "#include <stdio.h>
+$ WS "int main()
+$ WS "{"
+$ WS "FILE *foo;
+$ WS "char Buffer[99];
+$ WS "foo = fopen(""foo"", ""r"");
+$ WS "setvbuf(foo, Buffer, 0, 0);
+$ WS "exit(0);
+$ WS "}"
+$ CS
+$ DEFINE SYS$ERROR _NLA0:
+$ DEFINE SYS$OUTPUT _NLA0:
+$ on error then continue
+$ on warning then continue
+$ 'Checkcc' temp.c
+$ If (Needs_Opt.eqs."Yes")
+$ THEN
+$ link temp.obj,temp.opt/opt
+$ else
+$ link temp.obj
+$ endif
+$ teststatus = f$extract(9,1,$status)
+$ DEASSIGN SYS$OUTPUT
+$ DEASSIGN SYS$ERROR
+$ if (teststatus.nes."1")
+$ THEN
+$ perl_d_setvbuf="undef"
+$ ELSE
+$ perl_d_setvbuf="define"
+$ ENDIF
+$ WRITE_RESULT "d_setvbuf is ''perl_d_setvbuf'"
+$!
+$! Check for <netinet/in.h>
+$!
+$ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
+$ THEN
+$ OS
+$ WS "#ifdef __DECC
+$ WS "#include <stdlib.h>
+$ WS "#endif
+$ WS "#include <stdio.h>
+$ if ("''Has_Socketshr'".eqs."T")
+$ THEN
+$ WS "#include <socketshr.h>"
+$ else
+$ WS "#include <netdb.h>
+$ endif
+$ WS "#include <netinet/in.h>"
+$ WS "int main()
+$ WS "{"
+$ WS "exit(0);
+$ WS "}"
+$ CS
+$ DEFINE SYS$ERROR _NLA0:
+$ DEFINE SYS$OUTPUT _NLA0:
+$ on error then continue
+$ on warning then continue
+$ 'Checkcc' temp.c
+$ If (Needs_Opt.eqs."Yes")
+$ THEN
+$ link temp.obj,temp.opt/opt
+$ else
+$ link temp.obj
+$ endif
+$ teststatus = f$extract(9,1,$status)
+$ DEASSIGN SYS$OUTPUT
+$ DEASSIGN SYS$ERROR
+$ if (teststatus.nes."1")
+$ THEN
+$ perl_i_niin="undef"
+$ ELSE
+$ perl_i_niin="define"
+$ ENDIF
+$ ELSE
+$ perl_i_niin="undef"
+$ ENDIF
+$ WRITE_RESULT "i_niin is ''perl_i_niin'"
+$!
+$! Check for endhostent
+$!
+$ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
+$ THEN
+$ OS
+$ WS "#ifdef __DECC
+$ WS "#include <stdlib.h>
+$ WS "#endif
+$ WS "#include <stdio.h>
+$ if ("''Has_Socketshr'".eqs."T")
+$ THEN
+$ WS "#include <socketshr.h>"
+$ else
+$ WS "#include <netdb.h>
+$ endif
+$ WS "int main()
+$ WS "{"
+$ WS "endhostent();
+$ WS "exit(0);
+
+$ CS
+$ DEFINE SYS$ERROR _NLA0:
+$ DEFINE SYS$OUTPUT _NLA0:
+$ on error then continue
+$ on warning then continue
+$ 'Checkcc' temp.c
+$ If (Needs_Opt.eqs."Yes")
+$ THEN
+$ link temp.obj,temp.opt/opt
+$ else
+$ link temp.obj
+$ endif
+$ teststatus = f$extract(9,1,$status)
+$ DEASSIGN SYS$OUTPUT
+$ DEASSIGN SYS$ERROR
+$ if (teststatus.nes."1")
+$ THEN
+$ perl_d_endhent="undef"
+$ ELSE
+$ perl_d_endhent="define"
+$ ENDIF
+$ ELSE
+$ perl_d_endhent="undef"
+$ ENDIF
+$ WRITE_RESULT "d_endhent is ''perl_d_endhent'"
+$!
+$! Check for endnetent
+$!
+$ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
+$ THEN
+$ OS
+$ WS "#ifdef __DECC
+$ WS "#include <stdlib.h>
+$ WS "#endif
+$ WS "#include <stdio.h>
+$ if ("''Has_Socketshr'".eqs."T")
+$ THEN
+$ WS "#include <socketshr.h>"
+$ else
+$ WS "#include <netdb.h>
+$ endif
+$ WS "int main()
+$ WS "{"
+$ WS "endnetent();
+$ WS "exit(0);
+$ WS "}"
+$ CS
+$ DEFINE SYS$ERROR _NLA0:
+$ DEFINE SYS$OUTPUT _NLA0:
+$ on error then continue
+$ on warning then continue
+$ 'Checkcc' temp.c
+$ If (Needs_Opt.eqs."Yes")
+$ THEN
+$ link temp.obj,temp.opt/opt
+$ else
+$ link temp.obj
+$ endif
+$ teststatus = f$extract(9,1,$status)
+$ DEASSIGN SYS$OUTPUT
+$ DEASSIGN SYS$ERROR
+$ if (teststatus.nes."1")
+$ THEN
+$ perl_d_endnent="undef"
+$ ELSE
+$ perl_d_endnent="define"
+$ ENDIF
+$ ELSE
+$ perl_d_endnent="undef"
+$ ENDIF
+$ WRITE_RESULT "d_endnent is ''perl_d_endnent'"
+$!
+$! Check for endprotoent
+$!
+$ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
+$ THEN
+$ OS
+$ WS "#ifdef __DECC
+$ WS "#include <stdlib.h>
+$ WS "#endif
+$ WS "#include <stdio.h>
+$ if ("''Has_Socketshr'".eqs."T")
+$ THEN
+$ WS "#include <socketshr.h>"
+$ else
+$ WS "#include <netdb.h>
+$ endif
+$ WS "int main()
+$ WS "{"
+$ WS "endprotoent();
+$ WS "exit(0);
+$ WS "}"
+$ CS
+$ DEFINE SYS$ERROR _NLA0:
+$ DEFINE SYS$OUTPUT _NLA0:
+$ on error then continue
+$ on warning then continue
+$ 'Checkcc' temp.c
+$ If (Needs_Opt.eqs."Yes")
+$ THEN
+$ link temp.obj,temp.opt/opt
+$ else
+$ link temp.obj
+$ endif
+$ teststatus = f$extract(9,1,$status)
+$ DEASSIGN SYS$OUTPUT
+$ DEASSIGN SYS$ERROR
+$ if (teststatus.nes."1")
+$ THEN
+$ perl_d_endpent="undef"
+$ ELSE
+$ perl_d_endpent="define"
+$ ENDIF
+$ ELSE
+$ perl_d_endpent="undef"
+$ ENDIF
+$ WRITE_RESULT "d_endpent is ''perl_d_endpent'"
+$!
+$! Check for endservent
+$!
+$ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
+$ THEN
+$ OS
+$ WS "#ifdef __DECC
+$ WS "#include <stdlib.h>
+$ WS "#endif
+$ WS "#include <stdio.h>
+$ if ("''Has_Socketshr'".eqs."T")
+$ THEN
+$ WS "#include <socketshr.h>"
+$ else
+$ WS "#include <netdb.h>
+$ endif
+$ WS "int main()
+$ WS "{"
+$ WS "endservent();
+$ WS "exit(0);
+$ WS "}"
+$ CS
+$ DEFINE SYS$ERROR _NLA0:
+$ DEFINE SYS$OUTPUT _NLA0:
+$ on error then continue
+$ on warning then continue
+$ 'Checkcc' temp.c
+$ If (Needs_Opt.eqs."Yes")
+$ THEN
+$ link temp.obj,temp.opt/opt
+$ else
+$ link temp.obj
+$ endif
+$ teststatus = f$extract(9,1,$status)
+$ DEASSIGN SYS$OUTPUT
+$ DEASSIGN SYS$ERROR
+$ if (teststatus.nes."1")
+$ THEN
+$ perl_d_endsent="undef"
+$ ELSE
+$ perl_d_endsent="define"
+$ ENDIF
+$ ELSE
+$ perl_d_endsent="undef"
+$ ENDIF
+$ WRITE_RESULT "d_endsent is ''perl_d_endsent'"
+$!
+$! Check for sethostent
+$!
+$ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
+$ THEN
+$ OS
+$ WS "#ifdef __DECC
+$ WS "#include <stdlib.h>
+$ WS "#endif
+$ WS "#include <stdio.h>
+$ if ("''Has_Socketshr'".eqs."T")
+$ THEN
+$ WS "#include <socketshr.h>"
+$ else
+$ WS "#include <netdb.h>
+$ endif
+$ WS "int main()
+$ WS "{"
+$ WS "sethostent(1);
+$ WS "exit(0);
+$ WS "}"
+$ CS
+$ DEFINE SYS$ERROR _NLA0:
+$ DEFINE SYS$OUTPUT _NLA0:
+$ on error then continue
+$ on warning then continue
+$ 'Checkcc' temp.c
+$ If (Needs_Opt.eqs."Yes")
+$ THEN
+$ link temp.obj,temp.opt/opt
+$ else
+$ link temp.obj
+$ endif
+$ teststatus = f$extract(9,1,$status)
+$ DEASSIGN SYS$OUTPUT
+$ DEASSIGN SYS$ERROR
+$ if (teststatus.nes."1")
+$ THEN
+$ perl_d_sethent="undef"
+$ ELSE
+$ perl_d_sethent="define"
+$ ENDIF
+$ ELSE
+$ perl_d_sethent="undef"
+$ ENDIF
+$ WRITE_RESULT "d_sethent is ''perl_d_sethent'"
+$!
+$! Check for setnetent
+$!
+$ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
+$ THEN
+$ OS
+$ WS "#ifdef __DECC
+$ WS "#include <stdlib.h>
+$ WS "#endif
+$ WS "#include <stdio.h>
+$ if ("''Has_Socketshr'".eqs."T")
+$ THEN
+$ WS "#include <socketshr.h>"
+$ else
+$ WS "#include <netdb.h>
+$ endif
+$ WS "int main()
+$ WS "{"
+$ WS "setnetent(1);
+$ WS "exit(0);
+$ WS "}"
+$ CS
+$ DEFINE SYS$ERROR _NLA0:
+$ DEFINE SYS$OUTPUT _NLA0:
+$ on error then continue
+$ on warning then continue
+$ 'Checkcc' temp.c
+$ If (Needs_Opt.eqs."Yes")
+$ THEN
+$ link temp.obj,temp.opt/opt
+$ else
+$ link temp.obj
+$ endif
+$ teststatus = f$extract(9,1,$status)
+$ DEASSIGN SYS$OUTPUT
+$ DEASSIGN SYS$ERROR
+$ if (teststatus.nes."1")
+$ THEN
+$ perl_d_setnent="undef"
+$ ELSE
+$ perl_d_setnent="define"
+$ ENDIF
+$ ELSE
+$ perl_d_setnent="undef"
+$ ENDIF
+$ WRITE_RESULT "d_setnent is ''perl_d_setnent'"
+$!
+$! Check for setprotoent
+$!
+$ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
+$ THEN
+$ OS
+$ WS "#ifdef __DECC
+$ WS "#include <stdlib.h>
+$ WS "#endif
+$ WS "#include <stdio.h>
+$ if ("''Has_Socketshr'".eqs."T")
+$ THEN
+$ WS "#include <socketshr.h>"
+$ else
+$ WS "#include <netdb.h>
+$ endif
+$ WS "int main()
+$ WS "{"
+$ WS "setprotoent(1);
+$ WS "exit(0);
+$ WS "}"
+$ CS
+$ DEFINE SYS$ERROR _NLA0:
+$ DEFINE SYS$OUTPUT _NLA0:
+$ on error then continue
+$ on warning then continue
+$ 'Checkcc' temp.c
+$ If (Needs_Opt.eqs."Yes")
+$ THEN
+$ link temp.obj,temp.opt/opt
+$ else
+$ link temp.obj
+$ endif
+$ teststatus = f$extract(9,1,$status)
+$ DEASSIGN SYS$OUTPUT
+$ DEASSIGN SYS$ERROR
+$ if (teststatus.nes."1")
+$ THEN
+$ perl_d_setpent="undef"
+$ ELSE
+$ perl_d_setpent="define"
+$ ENDIF
+$ ELSE
+$ perl_d_setpent="undef"
+$ ENDIF
+$ WRITE_RESULT "d_setpent is ''perl_d_setpent'"
+$!
+$! Check for setservent
+$!
+$ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
+$ THEN
+$ OS
+$ WS "#ifdef __DECC
+$ WS "#include <stdlib.h>
+$ WS "#endif
+$ WS "#include <stdio.h>
+$ if ("''Has_Socketshr'".eqs."T")
+$ THEN
+$ WS "#include <socketshr.h>"
+$ else
+$ WS "#include <netdb.h>
+$ endif
+$ WS "int main()
+$ WS "{"
+$ WS "setservent(1);
+$ WS "exit(0);
+$ WS "}"
+$ CS
+$ DEFINE SYS$ERROR _NLA0:
+$ DEFINE SYS$OUTPUT _NLA0:
+$ on error then continue
+$ on warning then continue
+$ 'Checkcc' temp.c
+$ If (Needs_Opt.eqs."Yes")
+$ THEN
+$ link temp.obj,temp.opt/opt
+$ else
+$ link temp.obj
+$ endif
+$ teststatus = f$extract(9,1,$status)
+$ DEASSIGN SYS$OUTPUT
+$ DEASSIGN SYS$ERROR
+$ if (teststatus.nes."1")
+$ THEN
+$ perl_d_setsent="undef"
+$ ELSE
+$ perl_d_setsent="define"
+$ ENDIF
+$ ELSE
+$ perl_d_setsent="undef"
+$ ENDIF
+$ WRITE_RESULT "d_setsent is ''perl_d_setsent'"
+$!
+$! Check for gethostent
+$!
+$ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
+$ THEN
+$ OS
+$ WS "#ifdef __DECC
+$ WS "#include <stdlib.h>
+$ WS "#endif
+$ WS "#include <stdio.h>
+$ if ("''Has_Socketshr'".eqs."T")
+$ THEN
+$ WS "#include <socketshr.h>"
+$ else
+$ WS "#include <netdb.h>
+$ endif
+$ WS "int main()
+$ WS "{"
+$ WS "gethostent();
+$ WS "exit(0);
+$ WS "}"
+$ CS
+$ DEFINE SYS$ERROR _NLA0:
+$ DEFINE SYS$OUTPUT _NLA0:
+$ on error then continue
+$ on warning then continue
+$ 'Checkcc' temp.c
+$ If (Needs_Opt.eqs."Yes")
+$ THEN
+$ link temp.obj,temp.opt/opt
+$ else
+$ link temp.obj
+$ endif
+$ teststatus = f$extract(9,1,$status)
+$ DEASSIGN SYS$OUTPUT
+$ DEASSIGN SYS$ERROR
+$ if (teststatus.nes."1")
+$ THEN
+$ perl_d_gethent="undef"
+$ ELSE
+$ perl_d_gethent="define"
+$ ENDIF
+$ ELSE
+$ perl_d_gethent="undef"
+$ ENDIF
+$ WRITE_RESULT "d_gethent is ''perl_d_gethent'"
+$!
+$! Check for getnetent
+$!
+$ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
+$ THEN
+$ OS
+$ WS "#ifdef __DECC
+$ WS "#include <stdlib.h>
+$ WS "#endif
+$ WS "#include <stdio.h>
+$ if ("''Has_Socketshr'".eqs."T")
+$ THEN
+$ WS "#include <socketshr.h>"
+$ else
+$ WS "#include <netdb.h>
+$ endif
+$ WS "int main()
+$ WS "{"
+$ WS "getnetent();
+$ WS "exit(0);
+$ WS "}"
+$ CS
+$ DEFINE SYS$ERROR _NLA0:
+$ DEFINE SYS$OUTPUT _NLA0:
+$ on error then continue
+$ on warning then continue
+$ 'Checkcc' temp.c
+$ If (Needs_Opt.eqs."Yes")
+$ THEN
+$ link temp.obj,temp.opt/opt
+$ else
+$ link temp.obj
+$ endif
+$ teststatus = f$extract(9,1,$status)
+$ DEASSIGN SYS$OUTPUT
+$ DEASSIGN SYS$ERROR
+$ if (teststatus.nes."1")
+$ THEN
+$ perl_d_getnent="undef"
+$ ELSE
+$ perl_d_getnent="define"
+$ ENDIF
+$ ELSE
+$ perl_d_getnent="undef"
+$ ENDIF
+$ WRITE_RESULT "d_getnent is ''perl_d_getnent'"
+$!
+$! Check for getprotoent
+$!
+$ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
+$ THEN
+$ OS
+$ WS "#ifdef __DECC
+$ WS "#include <stdlib.h>
+$ WS "#endif
+$ WS "#include <stdio.h>
+$ if ("''Has_Socketshr'".eqs."T")
+$ THEN
+$ WS "#include <socketshr.h>"
+$ else
+$ WS "#include <netdb.h>
+$ endif
+$ WS "int main()
+$ WS "{"
+$ WS "getprotoent();
+$ WS "exit(0);
+$ WS "}"
+$ CS
+$ DEFINE SYS$ERROR _NLA0:
+$ DEFINE SYS$OUTPUT _NLA0:
+$ on error then continue
+$ on warning then continue
+$ 'Checkcc' temp.c
+$ If (Needs_Opt.eqs."Yes")
+$ THEN
+$ link temp.obj,temp.opt/opt
+$ else
+$ link temp.obj
+$ endif
+$ teststatus = f$extract(9,1,$status)
+$ DEASSIGN SYS$OUTPUT
+$ DEASSIGN SYS$ERROR
+$ if (teststatus.nes."1")
+$ THEN
+$ perl_d_getpent="undef"
+$ ELSE
+$ perl_d_getpent="define"
+$ ENDIF
+$ ELSE
+$ perl_d_getpent="undef"
+$ ENDIF
+$ WRITE_RESULT "d_getpent is ''perl_d_getpent'"
+$!
+$! Check for getservent
+$!
+$ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
+$ THEN
+$ OS
+$ WS "#ifdef __DECC
+$ WS "#include <stdlib.h>
+$ WS "#endif
+$ WS "#include <stdio.h>
+$ if ("''Has_Socketshr'".eqs."T")
+$ THEN
+$ WS "#include <socketshr.h>"
+$ else
+$ WS "#include <netdb.h>
+$ endif
+$ WS "int main()
+$ WS "{"
+$ WS "getservent();
+$ WS "exit(0);
+$ WS "}"
+$ CS
+$ DEFINE SYS$ERROR _NLA0:
+$ DEFINE SYS$OUTPUT _NLA0:
+$ on error then continue
+$ on warning then continue
+$ 'Checkcc' temp.c
+$ If (Needs_Opt.eqs."Yes")
+$ THEN
+$ link temp.obj,temp.opt/opt
+$ else
+$ link temp.obj
+$ endif
+$ teststatus = f$extract(9,1,$status)
+$ DEASSIGN SYS$OUTPUT
+$ DEASSIGN SYS$ERROR
+$ if (teststatus.nes."1")
+$ THEN
+$ perl_d_getsent="undef"
+$ ELSE
+$ perl_d_getsent="define"
+$ ENDIF
+$ ELSE
+$ perl_d_getsent="undef"
+$ ENDIF
+$ WRITE_RESULT "d_getsent is ''perl_d_getsent'"
+$!
+$! Check for pthread_yield
+$!
+$ if ("''use_threads'".eqs."T")
+$ THEN
+$ OS
+$ WS "#ifdef __DECC
+$ WS "#include <stdlib.h>
+$ WS "#endif
+$ WS "#include <pthread.h>
+$ WS "#include <stdio.h>
+$ WS "int main()
+$ WS "{"
+$ WS "pthread_yield();
+$ WS "exit(0);
+$ WS "}"
+$ CS
+$ DEFINE SYS$ERROR _NLA0:
+$ DEFINE SYS$OUTPUT _NLA0:
+$ on error then continue
+$ on warning then continue
+$ 'Checkcc' temp.c
+$ teststatus = f$extract(9,1,$status)
+$ DEASSIGN SYS$OUTPUT
+$ DEASSIGN SYS$ERROR
+$ if (teststatus.nes."1")
+$ THEN
+$ perl_d_pthread_yield="undef"
+$ ELSE
+$ perl_d_pthread_yield="define"
+$ ENDIF
+$ ELSE
+$ perl_d_pthread_yield="undef"
+$ ENDIF
+$ WRITE_RESULT "d_pthread_yield is ''perl_d_pthread_yield'"
+$!
+$! Check for sched_yield
+$!
+$ if ("''use_threads'".eqs."T")
+$ THEN
+$ OS
+$ WS "#ifdef __DECC
+$ WS "#include <stdlib.h>
+$ WS "#endif
+$ WS "#include <pthread.h>
+$ WS "#include <stdio.h>
+$ WS "int main()
+$ WS "{"
+$ WS "sched_yield();
+$ WS "exit(0);
+$ WS "}"
+$ CS
+$ DEFINE SYS$ERROR _NLA0:
+$ DEFINE SYS$OUTPUT _NLA0:
+$ on error then continue
+$ on warning then continue
+$ 'Checkcc' temp.c
+$ teststatus = f$extract(9,1,$status)
+$ DEASSIGN SYS$OUTPUT
+$ DEASSIGN SYS$ERROR
+$ if (teststatus.nes."1")
+$ THEN
+$ perl_d_sched_yield="undef"
+$ ELSE
+$ perl_d_sched_yield="define"
+$ ENDIF
+$ ELSE
+$ perl_d_sched_yield="undef"
+$ ENDIF
+$ WRITE_RESULT "d_sched_yield is ''perl_d_sched_yield'"
+$!
+$! Check for generic pointer size
+$!
+$ OS
+$ WS "#ifdef __DECC
+$ WS "#include <stdlib.h>
+$ WS "#endif
+$ WS "#include <stdio.h>
+$ WS "int main()
+$ WS "{"
+$ WS "int foo;
+$ WS "foo = sizeof(char *);
+$ WS "printf(""%d\n"", foo);
+$ WS "exit(0);
+$ WS "}"
+$ CS
+$! copy temp.c sys$output
+$!
+$ DEFINE SYS$ERROR _NLA0:
+$ DEFINE SYS$OUTPUT _NLA0:
+$ ON ERROR THEN CONTINUE
+$ ON WARNING THEN CONTINUE
+$ 'Checkcc' temp.c
+$ If (Needs_Opt.eqs."Yes")
+$ THEN
+$ link temp.obj,temp.opt/opt
+$ else
+$ link temp.obj
+$ endif
+$ OPEN/WRITE TEMPOUT [-.uu]tempout.lis
+$ DEASSIGN SYS$OUTPUT
+$ DEASSIGN SYS$ERROR
+$ DEFINE SYS$ERROR TEMPOUT
+$ DEFINE SYS$OUTPUT TEMPOUT
+$ mcr []temp
+$ CLOSE TEMPOUT
+$ DEASSIGN SYS$OUTPUT
+$ DEASSIGN SYS$ERROR
+$ OPEN/READ TEMPOUT [-.uu]tempout.lis
+$ READ TEMPOUT line
+$ CLOSE TEMPOUT
+$
+$ perl_ptrsize=line
+$ WRITE_RESULT "ptrsize is ''perl_ptrsize'"
+$!
+$ set nover
+$! Done with compiler checks. Clean up.
+$ if f$search("temp.c").nes."" then DELETE/NOLOG temp.c;*
+$ if f$search("temp.obj").nes."" then DELETE/NOLOG temp.obj;*
+$ if f$search("temp.exe").nes."" then DELETE/NOLOG temp.exe;*
+$ if f$search("temp.opt").nes."" then DELETE/NOLOG Temp.opt;*
+$!
+$!
+$! Some that are compiler or VMS version sensitive
+$!
+$! Gnu C stuff
+$ IF "''Using_Gnu_C'".EQS."Yes"
+$ THEN
+$ perl_d_attribut="define"
+$ perl_vms_cc_type="gcc"
+$ ELSE
+$ perl_d_attribut="undef"
+$ ENDIF
+$
+$! Dec C >= 5.2 and VMS ver >= 7.0
+$ IF ("''Using_Dec_C'".EQS."Yes").AND.(F$INTEGER(Dec_C_Version).GE.50200000).AND.("''VMS_VER'".GES."7.0")
+$ THEN
+$ perl_d_bcmp="define"
+$ perl_d_gettimeod="define"
+$ perl_d_uname="define"
+$ perl_d_sigaction="define"
+$ perl_d_truncate="define"
+$ perl_d_wait4="define"
+$ perl_d_index="define"
+$ perl_pidtype="pid_t"
+$ perl_sig_name="ZERO HUP INT QUIT ILL TRAP IOT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM ABRT USR1 USR2 SPARE18 SPARE19 CHLD CONT STOP TSTP TTIN TTOU DEBUG SPARE27 SPARE28 SPARE29 SPARE30 SPARE31 SPARE32 RTMIN RTMAX"",0"
+$ psnwc1="""ZERO"",""HUP"",""INT"",""QUIT"",""ILL"",""TRAP"",""IOT"",""EMT"",""FPE"",""KILL"",""BUS"",""SEGV"",""SYS"","
+$ psnwc2="""PIPE"",""ALRM"",""TERM"",""ABRT"",""USR1"",""USR2"",""SPARE18"",""SPARE19"",""CHLD"",""CONT"",""STOP"",""TSTP"","
+$ psnwc3="""TTIN"",""TTOU"",""DEBUG"",""SPARE27"",""SPARE28"",""SPARE29"",""SPARE30"",""SPARE31"",""SPARE32"",""RTMIN"",""RTMAX"",0"
+$perl_sig_name_with_commas = psnwc1 + psnwc2 + psnwc3
+$ perl_sig_num="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,6,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,64,0"
+$ perl_sig_num_with_commas=perl_sig_num
+$ perl_uidtype="uid_t"
+$ perl_d_pathconf="define"
+$ perl_d_fpathconf="define"
+$ perl_d_sysconf="define"
+$ perl_d_sigsetjmp="define"
+$ ELSE
+$ perl_pidtype="unsigned int"
+$ perl_d_gettimeod="undef"
+$ perl_d_bcmp="undef"
+$ perl_d_uname="undef"
+$ perl_d_sigaction="undef"
+$ perl_d_truncate="undef"
+$ perl_d_wait4="undef"
+$ perl_d_index="undef"
+$ perl_sig_name="ZERO HUP INT QUIT ILL TRAP IOT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM ABRT USR1 USR2"",0"
+$ psnwc1="""ZERO"",""HUP"",""INT"",""QUIT"",""ILL"",""TRAP"",""IOT"",""EMT"",""FPE"",""KILL"",""BUS"",""SEGV"",""SYS"","
+$ psnwc2="""PIPE"",""ALRM"",""TERM"",""ABRT"",""USR1"",""USR2"",0"
+$ perl_sig_name_with_commas = psnwc1 + psnwc2
+$ perl_sig_num="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,6,16,17,0"
+$ perl_sig_num_with_commas=perl_sig_num
+$ perl_uidtype="unsigned int"
+$ perl_d_pathconf="undef"
+$ perl_d_fpathconf="undef"
+$ perl_d_sysconf="undef"
+$ perl_d_sigsetjmp="undef"
+$ ENDIF
+$!
+$! Dec C alone
+$ IF ("''Using_Dec_C'".EQS."Yes")
+$ THEN
+$ perl_d_mbstowcs="define"
+$ perl_d_mbtowc="define"
+$ perl_d_stdiobase="define"
+$ perl_d_stdio_ptr_lval="define"
+$ perl_d_stdio_cnt_lval="define"
+$ perl_d_stdstdio="define"
+$ perl_d_wcstombs="define"
+$ perl_d_mblen="define"
+$ perl_d_mktime="define"
+$ perl_d_strcoll="define"
+$ perl_d_strxfrm="define"
+$ perl_d_wctomb="define"
+$ perl_i_locale="define"
+$ perl_d_locconv="define"
+$ perl_d_setlocale="define"
+$ perl_vms_cc_type="decc"
+$ ELSE
+$ perl_d_mbstowcs="undef"
+$ perl_d_mbtowc="undef"
+$ perl_d_stdiobase="undef"
+$ perl_d_stdio_ptr_lval="undef"
+$ perl_d_stdio_cnt_lval="undef"
+$ perl_d_stdstdio="undef"
+$ perl_d_wcstombs="undef"
+$ perl_d_mblen="undef"
+$ perl_d_mktime="undef"
+$ perl_d_strcoll="undef"
+$ perl_d_strxfrm="undef"
+$ perl_d_wctomb="undef"
+$ perl_i_locale="undef"
+$ perl_d_locconv="undef"
+$ perl_d_setlocale="undef"
+$ ENDIF
+$!
+$! Vax C stuff
+$ if ("''Using_Vax_C'".EQS."Yes")
+$ THEN
+$ perl_vms_cc_type="vaxc"
+$ ENDIF
+$!
+$!
+$! Sockets?
+$ if ("''Has_Socketshr'".EQS."T").OR.("''Has_Dec_C_Sockets'".EQS."T")
+$ THEN
+$ perl_d_vms_do_sockets="define"
+$ perl_d_htonl="define"
+$ perl_d_socket="define"
+$ perl_d_select="define"
+$ perl_netdb_host_type="char *"
+$ perl_netdb_hlen_type="int"
+$ perl_netdb_name_type="char *"
+$ perl_netdb_net_type="long"
+$ perl_d_gethbyaddr="define"
+$ perl_d_gethbyname="define"
+$ perl_d_getnbyaddr="define"
+$ perl_d_getnbyname="define"
+$ perl_d_getpbynumber="define"
+$ perl_d_getpbyname="define"
+$ perl_d_getsbyport="define"
+$ perl_d_getsbyname="define"
+$ perl_d_gethostprotos="define"
+$ perl_d_getnetprotos="define"
+$ perl_d_getprotoprotos="define"
+$ perl_d_getservprotos="define"
+$ ELSE
+$ perl_d_vms_do_sockets="undef"
+$ perl_d_htonl="undef"
+$ perl_d_socket="undef"
+$ perl_d_select="undef"
+$ perl_netdb_host_type="char *"
+$ perl_netdb_hlen_type="int"
+$ perl_netdb_name_type="char *"
+$ perl_netdb_net_type="long"
+$ perl_d_gethbyaddr="undef"
+$ perl_d_gethbyname="undef"
+$ perl_d_getnbyaddr="undef"
+$ perl_d_getnbyname="undef"
+$ perl_d_getpbynumber="undef"
+$ perl_d_getpbyname="undef"
+$ perl_d_getsbyport="undef"
+$ perl_d_getsbyname="undef"
+$ perl_d_gethostprotos="undef"
+$ perl_d_getnetprotos="undef"
+$ perl_d_getprotoprotos="undef"
+$ perl_d_getservprotos="undef"
+$ ENDIF
+$! Threads
+$ if ("''use_threads'".eqs."T")
+$ THEN
+$ perl_usethreads="define"
+$ perl_d_pthreads_created_joinable="define"
+$ if ("''VMS_VER'".ges."7.0")
+$ THEN
+$ perl_d_oldpthreads="undef"
+$ ELSE
+$ perl_d_oldpthreads="define"
+$ ENDIF
+$ ELSE
+$ perl_d_oldpthreads="undef"
+$ perl_usethreads="undef"
+$
+$ perl_d_pthreads_created_joinable="undef"
+$ ENDIF
+$!
+$!
+$! Finally the composite ones. All config
+$ perl_installarchlib="''perl_prefix':[lib.''perl_arch'.''localperlver']"
+$ perl_installsitearch="''perl_prefix':[lib.site_perl.''perl_arch']"
+$ perl_myhostname="''myhostname'"
+$ perl_mydomain="''mydomain'"
+$ perl_perladmin="''perladmin'"
+$ perl_cf_email="''cf_email'"
+$ perl_myuname:="VMS ''myname' ''f$edit(perl_osvers, "TRIM")' ''f$edit(hwname, "TRIM")'"
+$ perl_archlibexp="''perl_prefix':[lib.''perl_arch'.''localperlver']"
+$ perl_archlib="''perl_prefix':[lib.''perl_arch'.''lovalperlver']"
+$ perl_oldarchlibexp="''perl_prefix':[lib.''perl_arch']"
+$ perl_oldarchlib="''perl_prefix':[lib.''perl_arch']"
+$ perl_sitearchexp="''perl_prefix':[lib.site_perl.''perl_arch']"
+$ perl_sitearch="''perl_prefix':[lib.site_perl.''perl_arch']"
+$ if "''Using_Dec_C'" .eqs. "Yes"
+$ THEN
+$ perl_ccflags="/Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=''perl_obj_ext'/NoList''cc_flags'"
+$ ELSE
+$ IF "''Using_Vax_C'" .eqs. "Yes"
+$ THEN
+$ perl_ccflags="/Include=[]/Obj=''perl_obj_ext'/NoList''cc_flags'"
+$ ENDIF
+$ ENDIF
+$!
+$! Finally clean off any leading zeros from the patchlevel or subversion
+$ perl_patchlevel = perl_patchlevel + 0
+$ perl_subversion = perl_subversion + 0
+$!
+$! Okay, we've got everything configured. Now go write out a config.sh.
+$ open/write CONFIGSH [-]config.sh
+$ WC := "write CONFIGSH"
+$!
+$ WC "# This file generated by Configure.COM on a VMS system."
+$ WC "# Time: " + perl_cf_time
+$ WC ""
+$ WC "package='" + perl_package + "'"
+$ WC "CONFIG='" + perl_config + "'"
+$ WC "cf_time='" + perl_cf_time + "'"
+$ WC "cf_by='" + perl_cf_by+ "'"
+$ WC "cpp_stuff='" + perl_cpp_stuff + "'"
+$ WC "ccdlflags='" + perl_ccdlflags + "'"
+$ WC "cccdlflags='" + perl_cccdlflags + "'"
+$ WC "mab='" + perl_mab + "'"
+$ WC "libpth='" + perl_libpth + "'"
+$ WC "ld='" + perl_ld + "'"
+$ WC "lddlflags='" + perl_lddlflags + "'"
+$ WC "ranlib='" + perl_ranlib + "'"
+$ WC "ar='" + perl_ar + "'"
+$ WC "eunicefix='" + perl_eunicefix + "'"
+$ WC "hint='" + perl_hint +"'"
+$ WC "hintfile='" + perl_hintfile + "'"
+$ WC "shrplib='" + perl_shrplib + "'"
+$ WC "usemymalloc='" + perl_usemymalloc + "'"
+$ WC "usevfork='" + perl_usevfork + "'"
+$ WC "useposix='false'"
+$ WC "spitshell='write sys$output '"
+$ WC "dlsrc='dl_vms.c'"
+$ WC "binexp='" + perl_binexp + "'"
+$ WC "man1ext='" + perl_man1ext + "'"
+$ WC "man3ext='" + perl_man3ext + "'"
+$ WC "arch='" + perl_arch + "'"
+$ WC "archname='" + perl_archname + "'"
+$ WC "osvers='" + perl_osvers + "'"
+$ WC "prefix='" + perl_prefix + "'"
+$ WC "builddir='" + perl_builddir + "'"
+$ WC "installbin='" + perl_installbin + "'"
+$ WC "installscript='" + perl_installscript + "'"
+$ WC "installman1dir='" + perl_installman1dir + "'"
+$ WC "installman3dir='" + perl_installman3dir + "'"
+$ WC "installprivlib='" + perl_installprivlib + "'"
+$ WC "installarchlib='" + perl_installarchlib + "'"
+$ WC "installsitelib='" + perl_installsitelib + "'"
+$ WC "installsitearch='" + perl_installsitearch + "'"
+$ WC "path_sep='" + perl_path_sep + "'"
+$ WC "vms_cc_type='" + perl_vms_cc_type + "'"
+$ WC "d_attribut='" + perl_d_attribut + "'"
+$ WC "cc='" + perl_cc + "'"
+$ WC "ccflags='" + perl_ccflags + "'"
+$ WC "d_vms_do_sockets='" + perl_d_vms_do_sockets + "'"
+$ WC "d_socket='" + perl_d_socket + "'"
+$ WC "d_sockpair='" + perl_d_sockpair + "'"
+$ WC "d_gethent='" + perl_d_gethent + "'"
+$ WC "d_getsent='" + perl_d_getsent + "'"
+$ WC "d_select='" + perl_d_select + "'"
+$ WC "i_niin='" + perl_i_niin + "'"
+$ WC "i_neterrno='" + perl_i_neterrno + "'"
+$ WC "d_stdstdio='" + perl_d_stdstdio + "'"
+$ WC "d_stdio_ptr_lval='" + perl_d_stdio_ptr_lval + "'"
+$ WC "d_stdio_cnt_lval='" + perl_d_stdio_cnt_lval + "'"
+$ WC "d_stdiobase='" + perl_d_stdiobase + "'"
+$ WC "d_locconv='" + perl_d_locconv + "'"
+$ WC "d_setlocale='" + perl_d_setlocale + "'"
+$ WC "i_locale='" + perl_i_locale + "'"
+$ WC "d_mbstowcs='" + perl_d_mbstowcs + "'"
+$ WC "d_mbtowc='" + perl_d_mbtowc + "'"
+$ WC "d_wcstombs='" + perl_d_wcstombs + "'"
+$ WC "d_wctomb='" + perl_d_wctomb + "'"
+$ WC "d_mblen='" + perl_d_mblen + "'"
+$ WC "d_mktime='" + perl_d_mktime + "'"
+$ WC "d_strcoll='" + perl_d_strcoll + "'"
+$ WC "d_strxfrm='" + perl_d_strxfrm + "'"
+$ WC "ldflags='" + perl_ldflags + "'"
+$ WC "dlobj='" + perl_dlobj + "'"
+$ WC "obj_ext='" + perl_obj_ext + "'"
+$ WC "so='" + perl_so + "'"
+$ WC "dlext='" + perl_dlext + "'"
+$ WC "exe_ext='" + perl_exe_ext + "'"
+$ WC "lib_ext='" + perl_lib_ext + "'"
+$ WC "myhostname='" + perl_myhostname + "'"
+$ WC "mydomain='" + perl_mydomain + "'"
+$ WC "perladmin='" + perl_perladmin + "'"
+$ WC "cf_email='" + perl_cf_email + "'"
+$ WC "myuname='" + perl_myuname + "'"
+$ WC "alignbytes='" + perl_alignbytes + "'"
+$ WC "osname='" + perl_osname + "'"
+$ WC "d_archlib='" + perl_d_archlib + "'"
+$ WC "archlibexp='" + perl_archlibexp + "'"
+$ WC "archlib='" + perl_archlib + "'"
+$ WC "archname='" + perl_archname + "'"
+$ WC "d_bincompat3='" + perl_d_bincompat3 + "'"
+$ WC "cppstdin='" + perl_cppstdin + "'"
+$ WC "cppminus='" + perl_cppminus + "'"
+$ WC "d_bcmp='" + perl_d_bcmp + "'"
+$ WC "d_bcopy='" + perl_d_bcopy + "'"
+$ WC "d_bzero='" + perl_d_bzero + "'"
+$ WC "d_castneg='" + perl_d_castneg + "'"
+$ WC "castflags='" + perl_castflags + "'"
+$ WC "d_chsize='" + perl_d_chsize + "'"
+$ WC "d_const='" + perl_d_const + "'"
+$ WC "d_crypt='" + perl_d_crypt + "'"
+$ WC "byteorder='" + perl_byteorder + "'"
+$ WC "full_csh='" + perl_full_csh + "'"
+$ WC "d_csh='" + perl_d_csh + "'"
+$ WC "d_dup2='" + perl_d_dup2 + "'"
+$ WC "d_fchmod='" + perl_d_fchmod + "'"
+$ WC "d_fchown='" + perl_d_fchown + "'"
+$ WC "d_fcntl='" + perl_d_fcntl + "'"
+$ WC "d_fgetpos='" + perl_d_fgetpos + "'"
+$ WC "d_flexfnam='" + perl_d_flexfnam + "'"
+$ WC "d_flock='" + perl_d_flock + "'"
+$ WC "d_fsetpos='" + perl_d_fsetpos + "'"
+$ WC "d_gettimeod='" + perl_d_gettimeod + "'"
+$ WC "d_getgrps='" + perl_d_getgrps + "'"
+$ WC "d_setgrps='" + perl_d_setgrps + "'"
+$ WC "d_uname='" + perl_d_uname + "'"
+$ WC "d_getprior='" + perl_d_getprior + "'"
+$ WC "d_killpg='" + perl_d_killpg + "'"
+$ WC "d_link='" + perl_d_link + "'"
+$ WC "d_lstat='" + perl_d_lstat + "'"
+$ WC "d_lockf='" + perl_d_lockf + "'"
+$ WC "d_memcmp='" + perl_d_memcmp + "'"
+$ WC "d_memcpy='" + perl_d_memcpy + "'"
+$ WC "d_memmove='" + perl_d_memmove + "'"
+$ WC "d_memset='" + perl_d_memset + "'"
+$ WC "d_mkdir='" + perl_d_mkdir + "'"
+$ WC "d_msg='" + perl_d_msg + "'"
+$ WC "d_open3='" + perl_d_open3 + "'"
+$ WC "d_poll='" + perl_d_poll + "'"
+$ WC "d_readdir='" + perl_d_readdir + "'"
+$ WC "d_seekdir='" + perl_d_seekdir + "'"
+$ WC "d_telldir='" + perl_d_telldir + "'"
+$ WC "d_rewinddir='" + perl_d_rewinddir + "'"
+$ WC "d_rename='" + perl_d_rename + "'"
+$ WC "d_rmdir='" + perl_d_rmdir + "'"
+$ WC "d_sem='" + perl_d_sem + "'"
+$ WC "d_setegid='" + perl_d_setegid + "'"
+$ WC "d_seteuid='" + perl_d_seteuid + "'"
+$ WC "d_setprior='" + perl_d_setprior + "'"
+$ WC "d_setregid='" + perl_d_setregid + "'"
+$ WC "d_setresgid='" + perl_d_setresgid + "'"
+$ WC "d_setreuid='" + perl_d_setreuid + "'"
+$ WC "d_setresuid='" + perl_d_setresuid + "'"
+$ WC "d_setrgid='" + perl_d_setrgid + "'"
+$ WC "d_setruid='" + perl_d_setruid + "'"
+$ WC "d_setsid='" + perl_d_setsid + "'"
+$ WC "d_shm='" + perl_d_shm + "'"
+$ WC "d_shmatprototype='" + perl_d_shmatprototype + "'"
+$ WC "d_sigaction='" + perl_d_sigaction + "'"
+$ WC "d_statblks='" + perl_d_statblks + "'"
+$ WC "stdio_ptr='" + perl_stdio_ptr + "'"
+$ WC "stdio_cnt='" + perl_stdio_cnt + "'"
+$ WC "stdio_base='" + perl_stdio_base + "'"
+$ WC "stdio_bufsiz='" + perl_stdio_bufsiz + "'"
+$ WC "d_strctcpy='" + perl_d_strctcpy + "'"
+$ WC "d_strerror='" + perl_d_strerror + "'"
+$ WC "d_syserrlst='" + perl_d_syserrlst + "'"
+$ WC "d_strerrm='" + perl_d_strerrm + "'"
+$ WC "d_symlink='" + perl_d_symlink + "'"
+$ WC "d_syscall='" + perl_d_syscall + "'"
+$ WC "d_system='" + perl_d_system + "'"
+$ WC "timetype='" + perl_timetype + "'"
+$ WC "d_truncate='" + perl_d_truncate + "'"
+$ WC "d_vfork='" + perl_d_vfork + "'"
+$ WC "signal_t='" + perl_signal_t + "'"
+$ WC "d_volatile='" + perl_d_volatile + "'"
+$ WC "d_vprintf='" + perl_d_vprintf + "'"
+$ WC "d_charvspr='" + perl_d_charvspr + "'"
+$ WC "d_wait4='" + perl_d_wait4 + "'"
+$ WC "d_waitpid='" + perl_d_waitpid + "'"
+$ WC "i_dirent='" + perl_i_dirent + "'"
+$ WC "d_dirnamlen='" + perl_d_dirnamlen + "'"
+$ WC "direntrytype='" + perl_direntrytype + "'"
+$ WC "i_fcntl='" + perl_i_fcntl + "'"
+$ WC "i_grp='" + perl_i_grp + "'"
+$ WC "i_limits='" + perl_i_limits + "'"
+$ WC "i_memory='" + perl_i_memory + "'"
+$ WC "i_ndbm='" + perl_i_ndbm + "'"
+$ WC "i_stdarg='" + perl_i_stdarg + "'"
+$ WC "i_pwd='" + perl_i_pwd + "'"
+$ WC "d_pwquota='" + perl_d_pwquota + "'"
+$ WC "d_pwage='" + perl_d_pwage + "'"
+$ WC "d_pwchange='" + perl_d_pwchange + "'"
+$ WC "d_pwclass='" + perl_d_pwclass + "'"
+$ WC "d_pwexpire='" + perl_d_pwexpire + "'"
+$ WC "d_pwcomment='" + perl_d_pwcomment + "'"
+$ WC "i_stddef='" + perl_i_stddef + "'"
+$ WC "i_stdlib='" + perl_i_stdlib + "'"
+$ WC "i_string='" + perl_i_string + "'"
+$ WC "i_sysdir='" + perl_i_sysdir + "'"
+$ WC "i_sysfile='" + perl_i_sysfile + "'"
+$ WC "i_sysioctl='" + perl_i_sysioctl + "'"
+$ WC "i_sysndir='" + perl_i_sysndir + "'"
+$ WC "i_sysresrc='" + perl_i_sysresrc + "'"
+$ WC "i_sysselct='" + perl_i_sysselct + "'"
+$ WC "i_dbm='" + perl_i_dbm + "'"
+$ WC "i_rpcsvcdbm='" + perl_i_rpcsvcdbm + "'"
+$ WC "i_sfio='" + perl_i_sfio + "'"
+$ WC "i_sysstat='" + perl_i_sysstat + "'"
+$ WC "i_systimes='" + perl_i_systimes + "'"
+$ WC "i_systypes='" + perl_i_systypes + "'"
+$ WC "i_sysun='" + perl_i_sysun + "'"
+$ WC "i_syswait='" + perl_i_syswait + "'"
+$ WC "i_termio='" + perl_i_termio + "'"
+$ WC "i_sgtty='" + perl_i_sgtty + "'"
+$ WC "i_termios='" + perl_i_termios + "'"
+$ WC "i_time='" + perl_i_time + "'"
+$ WC "i_systime='" + perl_i_systime + "'"
+$ WC "i_systimek='" + perl_i_systimek + "'"
+$ WC "i_unistd='" + perl_i_unistd + "'"
+$ WC "i_utime='" + perl_i_utime + "'"
+$ WC "i_varargs='" + perl_i_varargs + "'"
+$ WC "i_vfork='" + perl_i_vfork + "'"
+$ WC "prototype='" + perl_prototype + "'"
+$ WC "randbits='" + perl_randbits +"'"
+$ WC "selecttype='" + perl_selecttype + "'"
+$ WC "stdchar='" + perl_stdchar + "'"
+$ WC "d_unlink_all_versions='" + perl_d_unlink_all_versions + "'"
+$ WC "full_sed='" + perl_full_sed + "'"
+$ WC "bin='" + perl_bin + "'"
+$ WC "binexp='" + perl_binexp + "'"
+$ WC "d_alarm='" + perl_d_alarm + "'"
+$ WC "d_casti32='" + perl_d_casti32 + "'"
+$ WC "d_chown='" + perl_d_chown + "'"
+$ WC "d_chroot='" + perl_d_chroot + "'"
+$ WC "d_cuserid='" + perl_d_cuserid + "'"
+$ WC "d_dbl_dig='" + perl_d_dbl_dig + "'"
+$ WC "d_difftime='" + perl_d_difftime + "'"
+$ WC "d_fork='" + perl_d_fork + "'"
+$ WC "d_getlogin='" + perl_d_getlogin + "'"
+$ WC "d_getppid='" + perl_d_getppid + "'"
+$ WC "d_htonl='" + perl_d_htonl + "'"
+$ WC "d_nice='" + perl_d_nice + "'"
+$ WC "d_pause='" + perl_d_pause + "'"
+$ WC "d_pipe='" + perl_d_pipe + "'"
+$ WC "d_readlink='" + perl_d_readlink + "'"
+$ WC "d_setlinebuf='" + perl_d_setlinebuf + "'"
+$ WC "d_strchr='" + perl_d_strchr + "'"
+$ WC "d_index='" + perl_d_index + "'"
+$ WC "d_strtod='" + perl_d_strtod + "'"
+$ WC "d_strtol='" + perl_d_strtol + "'"
+$ WC "d_strtoul='" + perl_d_strtoul + "'"
+$ WC "d_tcgetpgrp='" + perl_d_tcgetpgrp + "'"
+$ WC "d_tcsetpgrp='" + perl_d_tcsetpgrp + "'"
+$ WC "d_times='" + perl_d_times + "'"
+$ WC "d_tzname='" + perl_d_tzname + "'"
+$ WC "d_umask='" + perl_d_umask + "'"
+$ WC "fpostype='" + perl_fpostype + "'"
+$ WC "i_dlfcn='" + perl_i_dlfcn + "'"
+$ WC "i_float='" + perl_i_float + "'"
+$ WC "i_math='" + perl_i_math + "'"
+$ WC "intsize='" + perl_intsize + "'"
+$ WC "longsize='" + perl_longsize + "'"
+$ WC "shortsize='" + perl_shortsize + "'"
+$ WC "lseektype='" + perl_lseektype + "'"
+$ WC "i_values='" + perl_i_values + "'"
+$ WC "malloctype='" + perl_malloctype + "'"
+$ WC "freetype='" + perl_freetype + "'"
+$ WC "d_mymalloc='" + perl_d_mymalloc + "'"
+$ WC "sh='" + perl_sh + "'"
+$ WC "sig_name='" + perl_sig_name + "'"
+$ WC "sig_num='" + perl_sig_num + "'"
+$ tempsym = "sig_name_init='" + perl_sig_name_with_commas + "'"
+$ WC/symbol tempsym
+$ WC "sig_num_init='" + perl_sig_num_with_commas + "'"
+$ WC "modetype='" + perl_modetype + "'"
+$ WC "ssizetype='" + perl_ssizetype + "'"
+$ WC "o_nonblock='" + perl_o_nonblock + "'"
+$ WC "eagain='" + perl_eagain + "'"
+$ WC "rd_nodata='" + perl_rd_nodata + "'"
+$ WC "d_eofnblk='" + perl_d_eofnblk + "'"
+$ WC "d_oldarchlib='" + perl_d_oldarchlib + "'"
+$ WC "oldarchlibexp='" + perl_oldarchlibexp + "'"
+$ WC "oldarchlib='" + perl_oldarchlib + "'"
+$ WC "privlibexp='" + perl_privlibexp + "'"
+$ WC "privlib='" + perl_privlib + "'"
+$ WC "sitelibexp='" + perl_sitelibexp + "'"
+$ WC "sitelib='" + perl_sitelib + "'"
+$ WC "sitearchexp='" + perl_sitearchexp + "'"
+$ WC "sitearch='" + perl_sitearch + "'"
+$ WC "sizetype='" + perl_sizetype + "'"
+$ WC "i_sysparam='" + perl_i_sysparam + "'"
+$ WC "d_void_closedir='" + perl_d_void_closedir + "'"
+$ WC "d_dlerror='" + perl_d_dlerror + "'"
+$ WC "d_dlsymun='" + perl_d_dlsymun + "'"
+$ WC "d_suidsafe='" + perl_d_suidsafe + "'"
+$ WC "d_dosuid='" + perl_d_dosuid + "'"
+$ WC "d_inetaton='" + perl_d_inetaton + "'"
+$ WC "d_isascii='" + perl_d_isascii + "'"
+$ WC "d_mkfifo='" + perl_d_mkfifo + "'"
+$ WC "d_pathconf='" + perl_d_pathconf + "'"
+$ WC "d_fpathconf='" + perl_d_fpathconf + "'"
+$ WC "d_safebcpy='" + perl_d_safebcpy + "'"
+$ WC "d_safemcpy='" + perl_d_safemcpy + "'"
+$ WC "d_sanemcmp='" + perl_d_sanemcmp + "'"
+$ WC "d_setpgrp='" + perl_d_setpgrp + "'"
+$ WC "d_bsdsetpgrp='" + perl_d_bsdsetpgrp + "'"
+$ WC "d_bsdpgrp='" + perl_d_bsdpgrp + "'"
+$ WC "d_setpgid='" + perl_d_setpgid + "'"
+$ WC "d_setpgrp2='" + perl_d_setpgrp2 + "'"
+$ WC "d_sysconf='" + perl_d_sysconf + "'"
+$ WC "d_Gconvert='" + perl_d_Gconvert + "'"
+$ WC "d_getpgid='" + perl_d_getpgid + "'"
+$ WC "d_getpgrp='" + perl_d_getpgrp + "'"
+$ WC "d_bsdgetpgrp='" + perl_d_bsdgetpgrp + "'"
+$ WC "d_getpgrp2='" + perl_d_getpgrp2 + "'"
+$ WC "d_sfio='" + perl_d_sfio + "'"
+$ WC "d_sigsetjmp='" + perl_d_sigsetjmp + "'"
+$ WC "usedl='" + perl_usedl + "'"
+$ WC "startperl=" + perl_startperl ! This one's special--no enclosing single quotes
+$ WC "db_hashtype='" + perl_db_hashtype + "'"
+$ WC "db_prefixtype='" + perl_db_prefixtype + "'"
+$ WC "useperlio='" + perl_useperlio + "'"
+$ WC "defvoidused='" + perl_defvoidused + "'"
+$ WC "voidflags='" + perl_voidflags + "'"
+$ WC "d_eunice='" + perl_d_eunice + "'"
+$ WC "libs='" + perl_libs + "'"
+$ WC "libc='" + perl_libc + "'"
+$ tempstring = "PATCHLEVEL='" + "''perl_patchlevel'" + "'"
+$ WC tempstring
+$ tempstring = "SUBVERSION='" + "''perl_SUBVERSION'" + "'"
+$ WC tempstring
+$ WC "pager='" + perl_pager + "'"
+$ WC "uidtype='" + perl_uidtype + "'"
+$ WC "gidtype='" + perl_gidtype + "'"
+$ WC "usethreads='" + perl_usethreads + "'"
+$ WC "d_pthread_yield='" + perl_d_pthread_yield + "'"
+$ WC "d_pthreads_created_joinable='" + perl_d_pthreads_created_joinable + "'"
+$ WC "d_gnulibc='" + perl_d_gnulibc + "'"
+$ WC "i_netdb='" + perl_i_netdb + "'"
+$ WC "pidtype='" + perl_pidtype + "'"
+$ WC "netdb_host_type='" + perl_netdb_host_type + "'"
+$ WC "netdb_hlen_type='" + perl_netdb_hlen_type + "'"
+$ WC "netdb_name_type='" + perl_netdb_name_type + "'"
+$ WC "netdb_net_type='" + perl_netdb_net_type + "'"
+$ WC "baserev='" + perl_baserev + "'"
+$ WC "doublesize='" + perl_doublesize + "'"
+$ WC "ptrsize='" + perl_ptrsize + "'"
+$ WC "d_gethbyaddr='" + perl_d_gethbyaddr + "'"
+$ WC "d_gethbyname='" + perl_d_gethbyname + "'"
+$ WC "d_getnbyaddr='" + perl_d_getnbyaddr + "'"
+$ WC "d_getnbyname='" + perl_d_getnbyname + "'"
+$ WC "d_getpbynumber='" + perl_d_getpbynumber + "'"
+$ WC "d_getpbyname='" + perl_d_getpbyname + "'"
+$ WC "d_getsbyport='" + perl_d_getsbyport + "'"
+$ WC "d_getsbyname='" + perl_d_getsbyname + "'"
+$ WC "d_sethent='" + perl_d_sethent + "'"
+$ WC "d_oldpthreads='" + perl_d_oldpthreads + "'"
+$ WC "d_longdbl='" + perl_d_longdbl + "'"
+$ WC "longdblsize='" + perl_longdblsize + "'"
+$ WC "d_longlong='" + perl_d_longlong + "'"
+$ WC "longlongsize='" + perl_longlongsize + "'"
+$ WC "d_mkstemp='" + perl_d_mkstemp + "'"
+$ WC "d_setvbuf='" + perl_d_setvbuf + "'"
+$ WC "d_endhent='" + perl_d_endhent + "'"
+$ WC "d_endnent='" + perl_d_endsent + "'"
+$ WC "d_endpent='" + perl_d_endpent + "'"
+$ WC "d_endsent='" + perl_d_endsent + "'"
+$ WC "d_gethent='" + perl_d_gethent + "'"
+$ WC "d_getnent='" + perl_d_getsent + "'"
+$ WC "d_getpent='" + perl_d_getpent + "'"
+$ WC "d_getsent='" + perl_d_getsent + "'"
+$ WC "d_sethent='" + perl_d_sethent + "'"
+$ WC "d_setnent='" + perl_d_setsent + "'"
+$ WC "d_setpent='" + perl_d_setpent + "'"
+$ WC "ebcdic='" + perl_ebcdic + "'"
+$ WC "d_setsent='" + perl_d_setsent + "'"
+$ WC "d_gethostprotos='" + perl_d_gethostprotos + "'"
+$ WC "d_getnetprotos='" + perl_d_getnetprotos + "'"
+$ WC "d_getprotoprotos='" + perl_d_getprotoprotos + "'"
+$ WC "d_getservprotos='" + perl_d_getservprotos + "'"
+$ WC "d_pwgecos='" + perl_d_pwgecos + "'"
+$ WC "d_sched_yield='" + perl_d_sched_yield + "'"
+$ WC "d_lchown='" + perl_d_lchown + "'"
+$ WC "d_union_semun='" + perl_d_union_semun + "'"
+$ WC "i_arpainet='" + perl_i_arpainet + "'"
+$ WC "d_grpasswd='" + perl_d_grpasswd + "'"
+$ WC "d_setgrent='" + perl_d_setgrent + "'"
+$ WC "d_getgrent='" + perl_d_getgrent + "'"
+$ WC "d_endgrent='" + perl_d_endgrent + "'"
+$ WC "d_pwpasswd='" + perl_d_pwpasswd + "'"
+$ WC "d_setpwent='" + perl_d_setpwent + "'"
+$ WC "d_getpwent='" + perl_d_getpwent + "'"
+$ WC "d_endpwent='" + perl_d_endpwent + "'"
+$ WC "d_semctl_semun='" + perl_d_semctl_semun + "'"
+$ WC "d_semctl_semid_ds='" + perl_d_semctl_semid_ds + "'"
+$ WC "extensions='" + perl_extensions + "'"
+$ WC "d_mknod='" + perl_d_mknod + "'"
+$ WC "devtype='" + perl_devtype + "'"
+$ WC "i_sysmount='" + perl_i_sysmount + "'"
+$ WC "d_fstatfs='" + perl_d_fstatfs + "'"
+$ WC "d_statfsflags='" + perl_d_statfsflags + "'"
+$ WC "i_sysstatvfs='" + perl_i_sysstatvfs + "'"
+$ WC "i_machcthreads='" + perl_i_machcthreads + "'"
+$ WC "i_pthread='" + perl_i_pthread + "'"
+$ WC "d_fstatvfs='" + perl_d_fstatvfs + "'"
+$ WC "i_mntent='" + perl_i_mntent + "'"
+$ WC "d_getmntent='" + perl_d_getmntent + "'"
+$ WC "d_hasmntopt='" + perl_d_hasmntopt + "'"
+$!
+$! ##WRITE NEW CONSTANTS HERE##
+$!
+$ Close CONFIGSH
+$
+$! Okay, we've gotten here. Build munchconfig and run it
+$ 'Perl_CC' munchconfig.c
+$ If (Needs_Opt.eqs."Yes")
+$ THEN
+$ open/write OPTCHAN []munchconfig.opt
+$ IF ("''using_gnu_c'".eqs."Yes")
+$ THEN
+$ write OPTCHAN "Gnu_CC:[000000]gcclib.olb/library"
+$ endif
+$ write OPTCHAN "Sys$Share:VAXCRTL/Share"
+$ Close OPTCHAN
+$ link munchconfig.obj,munchconfig.opt/opt
+$ delete munchconfig.opt;*
+$ else
+$ link munchconfig.obj
+$ endif
+$ WRITE_RESULT "Writing config.h"
+$ !
+$ ! we need an fdl file
+$ CREATE [-]CONFIG.FDL
+RECORD
+ FORMAT STREAM_LF
+$ CREATE /FDL=[-]CONFIG.FDL [-]CONFIG.LOCAL
+$ ! First spit out the header info with the local defines (to get
+$ ! around the 255 character command line limit)
+$ OPEN/APPEND CONFIG [-]config.local
+$ if use_debugging_perl.eqs."Y"
+$ THEN
+$ WRITE CONFIG "#define DEBUGGING"
+$ ENDIF
+$ if preload_env.eqs."Y"
+$ THEN
+$ WRITE CONFIG "#define PRIME_ENV_AT_STARTUP"
+$ ENDIF
+$ if use_two_pot_malloc.eqs."Y"
+$ THEN
+$ WRITE CONFIG "#define TWO_POT_OPTIMIZE"
+$ endif
+$ if mymalloc.eqs."Y"
+$ THEN
+$ WRITE CONFIG "#define EMBEDMYMALLOC"
+$ ENDIF
+$ if use_pack_malloc.eqs."Y"
+$ THEN
+$ WRITE CONFIG "#define PACK_MALLOC"
+$ endif
+$ if use_debugmalloc.eqs."Y"
+$ THEN
+$ write config "#define DEBUGGING_MSTATS"
+$ ENDIF
+$ if "''Using_Gnu_C'" .eqs."Yes"
+$ THEN
+$ WRITE CONFIG "#define GNUC_ATTRIBUTE_CHECK"
+$ ENDIF
+$ if "''Has_Dec_C_Sockets'".eqs."T"
+$ THEN
+$ WRITE CONFIG "#define VMS_DO_SOCKETS"
+$ WRITE CONFIG "#define DECCRTL_SOCKETS"
+$ ENDIF
+$ if "''Has_Socketshr'".eqs."T"
+$ THEN
+$ WRITE CONFIG "#define VMS_DO_SOCKETS"
+$ ENDIF
+$ CLOSE CONFIG
+$!
+$! Now build the normal config.h
+$ define/user sys$output [-]config.main
+$ mcr []munchconfig [-]config.sh [-]config_h.sh
+$ ! Concatenate them together
+$ copy [-]config.local,[-]config.main [-]config.h
+$! Clean up
+$ DELETE/NOLOG [-]CONFIG.MAIN;*
+$ DELETE/NOLOG [-]CONFIG.LOCAL;*
+$ DELETE/NOLOG [-]CONFIG.FDL;*
+$!
+$ if "''Using_Dec_C'" .eqs."Yes"
+$ THEN
+$ DECC_REPLACE = "DECC=decc=1"
+$ ELSE
+$ DECC_REPLACE = "DECC="
+$ ENDIF
+$ if "''Using_Gnu_C'" .eqs."Yes"
+$ THEN
+$ GNUC_REPLACE = "GNUC=gnuc=1"
+$ ELSE
+$ GNUC_REPLACE = "GNUC="
+$ ENDIF
+$ if "''Has_Dec_C_Sockets'" .eqs."T"
+$ THEN
+$ SOCKET_REPLACE = "SOCKET=DECC_SOCKETS=1"
+$ ELSE
+$ if "''Has_Socketshr'" .eqs."T"
+$ THEN
+$ SOCKET_REPLACE = "SOCKET=SOCKETSHR_SOCKETS=1"
+$ ELSE
+$ SOCKET_REPLACE = "SOCKET="
+$ ENDIF
+$ ENDIF
+$ IF ("''Use_Threads'".eqs."T")
+$ THEN
+$ if ("''VMS_VER'".LES."6.2")
+$ THEN
+$ THREAD_REPLACE = "THREAD=OLDTHREADED=1"
+$ ELSE
+$ THREAD_REPLACE = "THREAD=THREADED=1"
+$ ENDIF
+$ ELSE
+$ THREAD_REPLACE = "THREAD="
+$ ENDIF
+$ if mymalloc.eqs."Y"
+$ THEN
+$ MALLOC_REPLACE = "MALLOC=MALLOC=1"
+$ ELSE
+$ MALLOC_REPLACE = "MALLOC="
+$ ENDIF
+$ if f$getsyi("HW_MODEL").ge.1024
+$ THEN
+$ ARCH_TYPE = "ARCH-TYPE=__AXP__"
+$ ELSE
+$ ARCH_TYPE = "ARCH-TYPE=__VAX__"
+$ ENDIF
+$ WRITE_RESULT "Writing DESCRIP.MMS"
+$!set ver
+$ define/user sys$output [-]descrip.mms
+$ mcr []munchconfig [-]config.sh descrip_mms.template "''DECC_REPLACE'" "''ARCH_TYPE'" "''GNUC_REPLACE'" "''SOCKET_REPLACE'" "''THREAD_REPLACE'" "''C_Compiler_Replace'" "''MALLOC_REPLACE'" "''Thread_Live_Dangerously'" "PV=''LocalPerlVer'"
+$! set nover
+$!
+$! Clean up after ourselves
+$ delete/nolog munchconfig.exe;*
+$ delete/nolog munchconfig.obj;*
diff --git a/gnu/usr.bin/perl/vos/Changes b/gnu/usr.bin/perl/vos/Changes
new file mode 100644
index 00000000000..4b4988eea55
--- /dev/null
+++ b/gnu/usr.bin/perl/vos/Changes
@@ -0,0 +1,41 @@
+This file documents the changes made to port Perl to the Stratus
+VOS operating system.
+
+Paul Green (Paul_Green@stratus.com)
+February 4, 1999
+
+after 5.005_03:
+ Fixed the VOS port to work with the current version of VOS POSIX.1.
+ Fixed "build.cm" to work-around C compiler bug pcg-98 that affected
+ pp.c when compiled for PA-RISC systems.
+ Updated "config.h" to latest version.
+ Changed "compile_perl.cm" from a sample macro to a real one.
+ Changed "perl.bind" to use Unix-style slash-separated pathnames
+ instead of VOS-style greater-than-separated pathnames.
+ Updated "README.vos" to document the location of the VOS perl
+ libraries.
+ Created "vos_accept.c" to redirect standard "accept" call to
+ nonstandard VOS "_accept" call.
+ Updated "vos_dummies.c" to agree with current version of VOS POSIX.1.
+ Updated "vosish.h" to track changes made to unixish.h.
+
+after 5.005_02:
+ Initial release.
+ Supplied "build.cm" command macro to build perl.
+ Supplied "Changes" to document the change history.
+ Supplied "compile_perl.cm" to launch processes to compile all
+ four versions of the Perl 5 binaries.
+ Supplied "config.h" to configure Perl 5 to VOS. Unfortunately,
+ since VOS does not have the configure tool, this file was
+ built by hand by editing "config_h.SH".
+ Supplied "config_h.SH.orig", which is the version of this file
+ that was current for version 5.005_02. Use this to discover
+ any subsequent changes to config_h.SH that must be
+ hand-copied into the real config.h.
+ Supplied "perl.bind" to control the VOS binder.
+ Supplied "README.vos" to describe the VOS port.
+ Supplied "test_vos_dummies.c" to test the VOS dummy functions.
+ Supplied "vos_dummies.c" to trap unimplemented POSIX functions.
+ Supplied "vosish.h" to configure Perl 5 to VOS.
+
+(end)
diff --git a/gnu/usr.bin/perl/vos/build.cm b/gnu/usr.bin/perl/vos/build.cm
new file mode 100644
index 00000000000..d9821ea4a84
--- /dev/null
+++ b/gnu/usr.bin/perl/vos/build.cm
@@ -0,0 +1,154 @@
+&begin_parameters
+ cpu option(-processor)name,allow(mc68020,i80860,pa7100,pa8000),=mc68020
+ recompile switch(-recompile),=1
+ rebind switch(-rebind),=1
+&end_parameters
+&echo command_lines
+&
+& This is a VOS command macro to build Perl 5 for the Stratus VOS
+& operating system. You need to have the VOS POSIX.1 support
+& loaded on your system. Change the following statement, if
+& necessary, to assign the correct pathname of the directory that
+& contains VOS POSIX.1 support.
+&
+&set_string POSIX >vos_ftp_site>pub>vos>alpha>posix
+&
+& See if the site has VOS POSIX.1 support loaded. If not, quit now.
+&
+&if ^ (exists &POSIX& -directory)
+&then &do
+ &display_line build: VOS POSIX.1 support not found. &POSIX&
+ &return
+ &end
+&
+& Set up the appropriate directory suffix for each architecture.
+&
+&if &cpu& = mc68020
+&then &set_string obj ''
+&if &cpu& = i80860
+&then &set_string obj .860
+&if &cpu& = pa7100
+&then &set_string obj .7100
+&if &cpu& = pa8000
+&then &set_string obj .8000
+&
+&if &cpu& = mc68020
+&then &set_string obj2 .68k
+&else &set_string obj2 &obj&
+&
+&set_string cpu -processor &cpu&
+&
+& If requested, compile the source code.
+&
+&if &recompile& = 0
+&then &goto CHECK_REBIND
+&
+!set_library_paths include << < &POSIX&>incl &+
+ (master_disk)>system>include_library
+!list_library_paths include
+&
+&if (exists *.obj -link)
+&then !unlink *.obj -no_ask -brief
+&
+& Suppress several harmless compiler warning and advice messages.
+&
+& For complete listings, add -list -show_macros both_ways -show_include all
+&set_string cflags -O4 -u
+!cc <<av.c -suppress_diag 2006 2064 2065 &cpu& &cflags&
+&if (command_status) ^= 0 &then &return
+!cc <<byterun.c -suppress_diag 2006 &cpu& &cflags&
+&if (command_status) ^= 0 &then &return
+!cc <<deb.c -suppress_diag 2006 &cpu& &cflags&
+&if (command_status) ^= 0 &then &return
+!cc <<doio.c -suppress_diag 2006 &cpu& &cflags&
+&if (command_status) ^= 0 &then &return
+!cc <<doop.c -suppress_diag 2006 &cpu& &cflags&
+&if (command_status) ^= 0 &then &return
+!cc <<dump.c -suppress_diag 2006 &cpu& &cflags&
+&if (command_status) ^= 0 &then &return
+!cc <<ebcdic.c -suppress_diag 2006 &cpu& &cflags&
+&if (command_status) ^= 0 &then &return
+!cc <<globals.c -suppress_diag 2006 &cpu& &cflags&
+&if (command_status) ^= 0 &then &return
+!cc <<gv.c -suppress_diag 2006 2065 &cpu& &cflags&
+&if (command_status) ^= 0 &then &return
+!cc <<hv.c -suppress_diag 2006 &cpu& &cflags&
+&if (command_status) ^= 0 &then &return
+& !cc <<malloc.c -suppress_diag 2006 &cpu& &cflags&
+& &if (command_status) ^= 0 &then &return
+!cc <<mg.c -suppress_diag 2006 2064 2065 &cpu& &cflags&
+&if (command_status) ^= 0 &then &return
+!cc <<miniperlmain.c -suppress_diag 2006 &cpu& &cflags&
+&if (command_status) ^= 0 &then &return
+!cc <<op.c -suppress_diag 2006 2064 2065 &cpu& &cflags&
+&if (command_status) ^= 0 &then &return
+!cc <<perl.c -suppress_diag 2006 2065 &cpu& &cflags& &+
+ -DARCHLIB="/system/ported/perl/lib/5.005&obj2&" &+
+ -DARCHLIB_EXP="/system/ported/perl/lib/5.005&obj2&" &+
+ -DSITEARCH="/system/ported/perl/lib/site/5.005&obj2&" &+
+ -DSITEARCH_EXP="/system/ported/perl/lib/site/5.005&obj2&"
+&if (command_status) ^= 0 &then &return
+!cc <<perlio.c -suppress_diag 2006 &cpu& &cflags&
+&if (command_status) ^= 0 &then &return
+!cc <<perly.c -suppress_diag 2006 &cpu& &cflags&
+&if (command_status) ^= 0 &then &return
+& compiling pp.c for the PA-RISC hits compiler bug pcg-98; avoid it.
+&if (index (string &cpu&) pa) > 0
+&then !cc <<pp.c -suppress_diag 2006 2064 &cpu& &cflags& -no_schedule
+&else !cc <<pp.c -suppress_diag 2006 2064 &cpu& &cflags&
+&if (command_status) ^= 0 &then &return
+!cc <<pp_ctl.c -suppress_diag 2006 2064 2065 &cpu& &cflags&
+&if (command_status) ^= 0 &then &return
+!cc <<pp_hot.c -suppress_diag 2006 2064 &cpu& &cflags&
+&if (command_status) ^= 0 &then &return
+!cc <<pp_sys.c -suppress_diag 2002 2006 2064 2065 &cpu& &cflags& -Xc
+&if (command_status) ^= 0 &then &return
+!cc <<regcomp.c -suppress_diag 2006 &cpu& &cflags&
+&if (command_status) ^= 0 &then &return
+!cc <<regexec.c -suppress_diag 2006 &cpu& &cflags&
+&if (command_status) ^= 0 &then &return
+!cc <<run.c -suppress_diag 2006 &cpu& &cflags&
+&if (command_status) ^= 0 &then &return
+!cc <<scope.c -suppress_diag 2006 2064 2065 &cpu& &cflags&
+&if (command_status) ^= 0 &then &return
+!cc <<sv.c -suppress_diag 2006 2065 &cpu& &cflags&
+&if (command_status) ^= 0 &then &return
+!cc <<taint.c -suppress_diag 2006 &cpu& &cflags&
+&if (command_status) ^= 0 &then &return
+!cc <<toke.c -suppress_diag 2006 2065 &cpu& &cflags&
+&if (command_status) ^= 0 &then &return
+!cc <<universal.c -suppress_diag 2006 &cpu& &cflags&
+&if (command_status) ^= 0 &then &return
+!cc <<util.c -suppress_diag 2006 2065 &cpu& &cflags&
+&if (command_status) ^= 0 &then &return
+!cc <vos_accept.c &cpu& &cflags& -Xc
+&if (command_status) ^= 0 &then &return
+!cc <vos_dummies.c &cpu& &cflags&
+&if (command_status) ^= 0 &then &return
+&
+& If requested, bind the executable program module.
+&
+&label CHECK_REBIND
+&if &rebind& = 0
+&then &return
+&
+&if (exists -directory (master_disk)>system>tcp_os>object_library&obj&)
+&then &set_string tcp_objlib (master_disk)>system>tcp_os>object_library&obj&
+&else &set_string tcp_objlib (master_disk)>system>tcp_os>object_library
+&
+&if (exists -directory (master_disk)>system>object_library&obj&)
+&then &set_string objlib (master_disk)>system>object_library&obj&
+&else &set_string objlib (master_disk)>system>object_library
+&
+&if (exists -directory (master_disk)>system>c_object_library&obj&)
+&then &set_string c_objlib (master_disk)>system>c_object_library&obj&
+&else &set_string c_objlib (master_disk)>system>c_object_library
+&
+!set_library_paths object . &+
+ &POSIX&>c>runtime>obj&obj& &+
+ &POSIX&>c>sysv_runtime>obj&obj& &+
+ &tcp_objlib& &objlib& &c_objlib&
+!list_library_paths object
+!bind -control <perl.bind &cpu&
+&if (command_status) ^= 0 &then &return
+!delete_file *.obj -no_ask -brief
diff --git a/gnu/usr.bin/perl/vos/compile_perl.cm b/gnu/usr.bin/perl/vos/compile_perl.cm
new file mode 100644
index 00000000000..177da4a3612
--- /dev/null
+++ b/gnu/usr.bin/perl/vos/compile_perl.cm
@@ -0,0 +1,39 @@
+& This command macro creates the appropriate subdirectory
+& for the specified processor type and then runs the
+& build macro in that subdirectory to create the perl
+& executable program module file.
+& Written 99-02-03 by Paul Green (Paul_Green@stratus.com)
+&
+&begin_parameters
+ cpu option(-processor)name,allow(mc68020,i80860,pa7100,pa8000),=mc68020
+ recompile switch(-recompile),=1
+ rebind switch(-rebind),=1
+&end_parameters
+&echo command_lines
+&
+&if &recompile&
+&then &set_string recompile -recompile
+&else &set_string recompile -no_recompile
+&
+&if &rebind&
+&then &set_string rebind -rebind
+&else &set_string rebind -no_rebind
+&
+&if &cpu& = mc68020
+&then &set_string obj ''
+&if &cpu& = i80860
+&then &set_string obj .860
+&if &cpu& = pa7100
+&then &set_string obj .7100
+&if &cpu& = pa8000
+&then &set_string obj .8000
+&
+&if ^ (exists obj&obj& -directory)
+&then !create_dir obj&obj&
+&
+&if ^ (exists obj&obj&>build.out)
+&then !create_file obj&obj&>build.out ; set_implicit_locking obj&obj&>build.out
+&
+!change_current_dir obj&obj&
+!start_process (string <build -processor &cpu& &recompile& &rebind&)
+!change_current_dir <
diff --git a/gnu/usr.bin/perl/vos/config.h b/gnu/usr.bin/perl/vos/config.h
new file mode 100644
index 00000000000..60b2dbce798
--- /dev/null
+++ b/gnu/usr.bin/perl/vos/config.h
@@ -0,0 +1,2167 @@
+/* This is config.h for Stratus VOS. It was created by hand
+ from the distribution copy of config_h.SH. */
+
+/* Configuration time: March 5, 1999
+ * Configured by: Paul Green
+ * Target system: Stratus VOS
+ */
+
+#ifndef _config_h_
+#define _config_h_
+
+/* LOC_SED:
+ * This symbol holds the complete pathname to the sed program.
+ */
+#define LOC_SED "/system/ported/command_library/sed.pm" /**/
+
+/* BIN:
+ * This symbol holds the path of the bin directory where the package will
+ * be installed. Program must be prepared to deal with ~name substitution.
+ */
+/* BIN_EXP:
+ * This symbol is the filename expanded version of the BIN symbol, for
+ * programs that do not want to deal with that at run-time.
+ */
+#define BIN "/system/ported/command_library" /**/
+#define BIN_EXP "/system/ported/command_library" /**/
+
+/* CPPSTDIN:
+ * This symbol contains the first part of the string which will invoke
+ * the C preprocessor on the standard input and produce to standard
+ * output. Typical value of "cc -E" or "/lib/cpp", but it can also
+ * call a wrapper. See CPPRUN.
+ */
+/* CPPMINUS:
+ * This symbol contains the second part of the string which will invoke
+ * the C preprocessor on the standard input and produce to standard
+ * output. This symbol will have the value "-" if CPPSTDIN needs a minus
+ * to specify standard input, otherwise the value is "".
+ */
+#define CPPSTDIN "cc -E"
+#define CPPMINUS "-"
+
+/* HAS_ALARM:
+ * This symbol, if defined, indicates that the alarm routine is
+ * available.
+ */
+#define HAS_ALARM /**/
+
+/* HASATTRIBUTE:
+ * This symbol indicates the C compiler can check for function attributes,
+ * such as printf formats. This is normally only supported by GNU cc.
+ */
+/*#define HASATTRIBUTE / **/
+#ifndef HASATTRIBUTE
+#define __attribute__(_arg_)
+#endif
+
+/* HAS_BCMP:
+ * This symbol is defined if the bcmp() routine is available to
+ * compare blocks of memory.
+ */
+/*#define HAS_BCMP /**/
+
+/* HAS_BCOPY:
+ * This symbol is defined if the bcopy() routine is available to
+ * copy blocks of memory.
+ */
+/*#define HAS_BCOPY /**/
+
+/* HAS_BZERO:
+ * This symbol is defined if the bzero() routine is available to
+ * set a memory block to 0.
+ */
+/*#define HAS_BZERO /**/
+
+/* HAS_CHOWN:
+ * This symbol, if defined, indicates that the chown routine is
+ * available.
+ */
+/*#define HAS_CHOWN /**/
+
+/* HAS_CHROOT:
+ * This symbol, if defined, indicates that the chroot routine is
+ * available.
+ */
+/*#define HAS_CHROOT /**/
+
+/* HAS_CHSIZE:
+ * This symbol, if defined, indicates that the chsize routine is available
+ * to truncate files. You might need a -lx to get this routine.
+ */
+/*#define HAS_CHSIZE / **/
+
+/* HASCONST:
+ * This symbol, if defined, indicates that this C compiler knows about
+ * the const type. There is no need to actually test for that symbol
+ * within your programs. The mere use of the "const" keyword will
+ * trigger the necessary tests.
+ */
+#define HASCONST /**/
+#ifndef HASCONST
+#define const
+#endif
+
+/* HAS_CRYPT:
+ * This symbol, if defined, indicates that the crypt routine is available
+ * to encrypt passwords and the like.
+ */
+/*#define HAS_CRYPT /**/
+
+/* HAS_CUSERID:
+ * This symbol, if defined, indicates that the cuserid routine is
+ * available to get character login names.
+ */
+/*#define HAS_CUSERID /**/
+
+/* HAS_DBL_DIG:
+ * This symbol, if defined, indicates that this system's <float.h>
+ * or <limits.h> defines the symbol DBL_DIG, which is the number
+ * of significant digits in a double precision number. If this
+ * symbol is not defined, a guess of 15 is usually pretty good.
+ */
+#define HAS_DBL_DIG /* */
+
+/* HAS_DIFFTIME:
+ * This symbol, if defined, indicates that the difftime routine is
+ * available.
+ */
+#define HAS_DIFFTIME /**/
+
+/* HAS_DLERROR:
+ * This symbol, if defined, indicates that the dlerror routine is
+ * available to return a string describing the last error that
+ * occurred from a call to dlopen(), dlclose() or dlsym().
+ */
+/*#define HAS_DLERROR /**/
+
+/* SETUID_SCRIPTS_ARE_SECURE_NOW:
+ * This symbol, if defined, indicates that the bug that prevents
+ * setuid scripts from being secure is not present in this kernel.
+ */
+/* DOSUID:
+ * This symbol, if defined, indicates that the C program should
+ * check the script that it is executing for setuid/setgid bits, and
+ * attempt to emulate setuid/setgid on systems that have disabled
+ * setuid #! scripts because the kernel can't do it securely.
+ * It is up to the package designer to make sure that this emulation
+ * is done securely. Among other things, it should do an fstat on
+ * the script it just opened to make sure it really is a setuid/setgid
+ * script, it should make sure the arguments passed correspond exactly
+ * to the argument on the #! line, and it should not trust any
+ * subprocesses to which it must pass the filename rather than the
+ * file descriptor of the script to be executed.
+ */
+#define SETUID_SCRIPTS_ARE_SECURE_NOW /**/ /* PG: ASSUME THESE ARE NO-OPS W/O SETUID */
+/*#define DOSUID / **/
+
+/* HAS_DUP2:
+ * This symbol, if defined, indicates that the dup2 routine is
+ * available to duplicate file descriptors.
+ */
+/*#define HAS_DUP2 /**/
+
+/* HAS_FCHMOD:
+ * This symbol, if defined, indicates that the fchmod routine is available
+ * to change mode of opened files. If unavailable, use chmod().
+ */
+#define HAS_FCHMOD /**/
+
+/* HAS_FCHOWN:
+ * This symbol, if defined, indicates that the fchown routine is available
+ * to change ownership of opened files. If unavailable, use chown().
+ */
+/*#define HAS_FCHOWN /**/
+
+/* HAS_FCNTL:
+ * This symbol, if defined, indicates to the C program that
+ * the fcntl() function exists.
+ */
+#define HAS_FCNTL /**/
+
+/* HAS_FGETPOS:
+ * This symbol, if defined, indicates that the fgetpos routine is
+ * available to get the file position indicator, similar to ftell().
+ */
+#define HAS_FGETPOS /**/
+
+/* FLEXFILENAMES:
+ * This symbol, if defined, indicates that the system supports filenames
+ * longer than 14 characters.
+ */
+#define FLEXFILENAMES /**/
+
+/* HAS_FLOCK:
+ * This symbol, if defined, indicates that the flock routine is
+ * available to do file locking.
+ */
+/*#define HAS_FLOCK / **/
+
+/* HAS_FORK:
+ * This symbol, if defined, indicates that the fork routine is
+ * available.
+ */
+/*#define HAS_FORK /**/
+
+/* HAS_FSETPOS:
+ * This symbol, if defined, indicates that the fsetpos routine is
+ * available to set the file position indicator, similar to fseek().
+ */
+#define HAS_FSETPOS /**/
+
+/* I_SYS_MOUNT:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/mount.h>.
+ */
+/*#define I_SYS_MOUNT /**/
+
+/* HAS_FSTATFS:
+ * This symbol, if defined, indicates that the fstatfs routine is
+ * available to stat the filesystem of a file descriptor.
+ */
+/*#define HAS_FSTATFS /**/
+
+/* HAS_STRUCT_STATFS_FLAGS:
+ * This symbol, if defined, indicates that the struct statfs has
+ * the f_flags member for mount flags.
+ */
+/*#define HAS_STRUCT_STATFS_FLAGS /**/
+
+/* I_SYS_STATVFS:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/statvfs.h>.
+ */
+/*#define I_SYS_STATVFS /**/
+
+/* HAS_FSTATVFS:
+ * This symbol, if defined, indicates that the fstatvfs routine is
+ * available to stat the filesystem of a file descriptor.
+ */
+/*#define HAS_FSTATVFS /**/
+
+/* I_MNTENT:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <mntent.h>.
+ */
+/*#define I_MNTENT /**/
+
+/* HAS_GETMNTENT:
+ * This symbol, if defined, indicates that the getmntent routine is
+ * available to lookup mount entries in some data base or other.
+ */
+/*#define HAS_GETMNTENT /**/
+
+/* HAS_HASMNTOPT:
+ * This symbol, if defined, indicates that the hasmntopt routine is
+ * available to query mount entries returned by getmntent.
+ */
+/*#define HAS_HASMNTOPT /**/
+
+/* HAS_GETTIMEOFDAY:
+ * This symbol, if defined, indicates that the gettimeofday() system
+ * call is available for a sub-second accuracy clock. Usually, the file
+ * <sys/resource.h> needs to be included (see I_SYS_RESOURCE).
+ * The type "Timeval" should be used to refer to "struct timeval".
+ */
+/*#define HAS_GETTIMEOFDAY / **/
+#ifdef HAS_GETTIMEOFDAY
+#define Timeval struct timeval /* Structure used by gettimeofday() */
+#endif
+
+/* HAS_GETGROUPS:
+ * This symbol, if defined, indicates that the getgroups() routine is
+ * available to get the list of process groups. If unavailable, multiple
+ * groups are probably not supported.
+ */
+/*#define HAS_GETGROUPS /**/
+
+/* HAS_UNAME:
+ * This symbol, if defined, indicates that the C program may use the
+ * uname() routine to derive the host name. See also HAS_GETHOSTNAME
+ * and PHOSTNAME.
+ */
+#define HAS_UNAME /**/
+
+/* HAS_GETLOGIN:
+ * This symbol, if defined, indicates that the getlogin routine is
+ * available to get the login name.
+ */
+#define HAS_GETLOGIN /**/
+
+/* HAS_GETPGID:
+ * This symbol, if defined, indicates to the C program that
+ * the getpgid(pid) function is available to get the
+ * process group id.
+ */
+/*#define HAS_GETPGID /**/
+
+/* HAS_GETPGRP:
+ * This symbol, if defined, indicates that the getpgrp routine is
+ * available to get the current process group.
+ */
+/* USE_BSD_GETPGRP:
+ * This symbol, if defined, indicates that getpgrp needs one
+ * arguments whereas USG one needs none.
+ */
+#define HAS_GETPGRP /**/
+/*#define USE_BSD_GETPGRP / **/
+
+/* HAS_GETPGRP2:
+ * This symbol, if defined, indicates that the getpgrp2() (as in DG/UX)
+ * routine is available to get the current process group.
+ */
+/*#define HAS_GETPGRP2 / **/
+
+/* HAS_GETPPID:
+ * This symbol, if defined, indicates that the getppid routine is
+ * available to get the parent process ID.
+ */
+#define HAS_GETPPID /**/
+
+/* HAS_GETPRIORITY:
+ * This symbol, if defined, indicates that the getpriority routine is
+ * available to get a process's priority.
+ */
+/*#define HAS_GETPRIORITY /**/
+
+/* HAS_HTONL:
+ * This symbol, if defined, indicates that the htonl() routine (and
+ * friends htons() ntohl() ntohs()) are available to do network
+ * order byte swapping.
+ */
+/* HAS_HTONS:
+ * This symbol, if defined, indicates that the htons() routine (and
+ * friends htonl() ntohl() ntohs()) are available to do network
+ * order byte swapping.
+ */
+/* HAS_NTOHL:
+ * This symbol, if defined, indicates that the ntohl() routine (and
+ * friends htonl() htons() ntohs()) are available to do network
+ * order byte swapping.
+ */
+/* HAS_NTOHS:
+ * This symbol, if defined, indicates that the ntohs() routine (and
+ * friends htonl() htons() ntohl()) are available to do network
+ * order byte swapping.
+ */
+#define HAS_HTONL /**/
+#define HAS_HTONS /**/
+#define HAS_NTOHL /**/
+#define HAS_NTOHS /**/
+
+/* HAS_INET_ATON:
+ * This symbol, if defined, indicates to the C program that the
+ * inet_aton() function is available to parse IP address "dotted-quad"
+ * strings.
+ */
+/*#define HAS_INET_ATON /**/ /* PG: WE HAVE OTHERS, NOT THIS ONE. */
+
+/* HAS_KILLPG:
+ * This symbol, if defined, indicates that the killpg routine is available
+ * to kill process groups. If unavailable, you probably should use kill
+ * with a negative process number.
+ */
+/*#define HAS_KILLPG /**/
+
+/* HAS_LINK:
+ * This symbol, if defined, indicates that the link routine is
+ * available to create hard links.
+ */
+/*#define HAS_LINK /**/
+
+/* HAS_LOCALECONV:
+ * This symbol, if defined, indicates that the localeconv routine is
+ * available for numeric and monetary formatting conventions.
+ */
+#define HAS_LOCALECONV /**/
+
+/* HAS_LOCKF:
+ * This symbol, if defined, indicates that the lockf routine is
+ * available to do file locking.
+ */
+#define HAS_LOCKF /**/
+
+/* HAS_LSTAT:
+ * This symbol, if defined, indicates that the lstat routine is
+ * available to do file stats on symbolic links.
+ */
+#define HAS_LSTAT /**/
+
+/* HAS_MBLEN:
+ * This symbol, if defined, indicates that the mblen routine is available
+ * to find the number of bytes in a multibye character.
+ */
+#define HAS_MBLEN /**/
+
+/* HAS_MBSTOWCS:
+ * This symbol, if defined, indicates that the mbstowcs routine is
+ * available to covert a multibyte string into a wide character string.
+ */
+#define HAS_MBSTOWCS /**/
+
+/* HAS_MBTOWC:
+ * This symbol, if defined, indicates that the mbtowc routine is available
+ * to covert a multibyte to a wide character.
+ */
+#define HAS_MBTOWC /**/
+
+/* HAS_MEMCMP:
+ * This symbol, if defined, indicates that the memcmp routine is available
+ * to compare blocks of memory.
+ */
+#define HAS_MEMCMP /**/
+
+/* HAS_MEMCPY:
+ * This symbol, if defined, indicates that the memcpy routine is available
+ * to copy blocks of memory.
+ */
+#define HAS_MEMCPY /**/
+
+/* HAS_MEMMOVE:
+ * This symbol, if defined, indicates that the memmove routine is available
+ * to copy potentially overlapping blocks of memory. This should be used
+ * only when HAS_SAFE_BCOPY is not defined. If neither is there, roll your
+ * own version.
+ */
+#define HAS_MEMMOVE /**/
+
+/* HAS_MEMSET:
+ * This symbol, if defined, indicates that the memset routine is available
+ * to set blocks of memory.
+ */
+#define HAS_MEMSET /**/
+
+/* HAS_MKDIR:
+ * This symbol, if defined, indicates that the mkdir routine is available
+ * to create directories. Otherwise you should fork off a new process to
+ * exec /bin/mkdir.
+ */
+#define HAS_MKDIR /**/
+
+/* HAS_MKFIFO:
+ * This symbol, if defined, indicates that the mkfifo routine is
+ * available to create FIFOs. Otherwise, mknod should be able to
+ * do it for you. However, if mkfifo is there, mknod might require
+ * super-user privileges which mkfifo will not.
+ */
+#define HAS_MKFIFO /**/
+
+/* HAS_MKTIME:
+ * This symbol, if defined, indicates that the mktime routine is
+ * available.
+ */
+#define HAS_MKTIME /**/
+
+/* HAS_MSG:
+ * This symbol, if defined, indicates that the entire msg*(2) library is
+ * supported (IPC mechanism based on message queues).
+ */
+/*#define HAS_MSG /**/
+
+/* HAS_NICE:
+ * This symbol, if defined, indicates that the nice routine is
+ * available.
+ */
+/*#define HAS_NICE /**/
+
+/* HAS_PATHCONF:
+ * This symbol, if defined, indicates that pathconf() is available
+ * to determine file-system related limits and options associated
+ * with a given filename.
+ */
+/* HAS_FPATHCONF:
+ * This symbol, if defined, indicates that pathconf() is available
+ * to determine file-system related limits and options associated
+ * with a given open file descriptor.
+ */
+#define HAS_PATHCONF /**/
+#define HAS_FPATHCONF /**/
+
+/* HAS_PAUSE:
+ * This symbol, if defined, indicates that the pause routine is
+ * available to suspend a process until a signal is received.
+ */
+#define HAS_PAUSE /**/
+
+/* HAS_PIPE:
+ * This symbol, if defined, indicates that the pipe routine is
+ * available to create an inter-process channel.
+ */
+#define HAS_PIPE /**/
+
+/* HAS_POLL:
+ * This symbol, if defined, indicates that the poll routine is
+ * available to poll active file descriptors. You may safely
+ * include <poll.h> when this symbol is defined.
+ */
+#define HAS_POLL /**/
+
+/* HAS_READDIR:
+ * This symbol, if defined, indicates that the readdir routine is
+ * available to read directory entries. You may have to include
+ * <dirent.h>. See I_DIRENT.
+ */
+#define HAS_READDIR /**/
+
+/* HAS_SEEKDIR:
+ * This symbol, if defined, indicates that the seekdir routine is
+ * available. You may have to include <dirent.h>. See I_DIRENT.
+ */
+/*#define HAS_SEEKDIR /**/
+
+/* HAS_TELLDIR:
+ * This symbol, if defined, indicates that the telldir routine is
+ * available. You may have to include <dirent.h>. See I_DIRENT.
+ */
+/*#define HAS_TELLDIR /**/
+
+/* HAS_REWINDDIR:
+ * This symbol, if defined, indicates that the rewinddir routine is
+ * available. You may have to include <dirent.h>. See I_DIRENT.
+ */
+#define HAS_REWINDDIR /**/
+
+/* HAS_READLINK:
+ * This symbol, if defined, indicates that the readlink routine is
+ * available to read the value of a symbolic link.
+ */
+#define HAS_READLINK /**/
+
+/* HAS_RENAME:
+ * This symbol, if defined, indicates that the rename routine is available
+ * to rename files. Otherwise you should do the unlink(), link(), unlink()
+ * trick.
+ */
+#define HAS_RENAME /**/
+
+/* HAS_RMDIR:
+ * This symbol, if defined, indicates that the rmdir routine is
+ * available to remove directories. Otherwise you should fork off a
+ * new process to exec /bin/rmdir.
+ */
+#define HAS_RMDIR /**/
+
+/* HAS_SELECT:
+ * This symbol, if defined, indicates that the select routine is
+ * available to select active file descriptors. If the timeout field
+ * is used, <sys/time.h> may need to be included.
+ */
+#define HAS_SELECT /**/
+
+/* HAS_SEM:
+ * This symbol, if defined, indicates that the entire sem*(2) library is
+ * supported.
+ */
+/*#define HAS_SEM /**/
+
+/* HAS_SETEGID:
+ * This symbol, if defined, indicates that the setegid routine is available
+ * to change the effective gid of the current program.
+ */
+/*#define HAS_SETEGID /**/
+
+/* HAS_SETEUID:
+ * This symbol, if defined, indicates that the seteuid routine is available
+ * to change the effective uid of the current program.
+ */
+/*#define HAS_SETEUID /**/
+
+/* HAS_SETLINEBUF:
+ * This symbol, if defined, indicates that the setlinebuf routine is
+ * available to change stderr or stdout from block-buffered or unbuffered
+ * to a line-buffered mode.
+ */
+/*#define HAS_SETLINEBUF /**/
+
+/* HAS_SETLOCALE:
+ * This symbol, if defined, indicates that the setlocale routine is
+ * available to handle locale-specific ctype implementations.
+ */
+#define HAS_SETLOCALE /**/
+
+/* HAS_SETPGID:
+ * This symbol, if defined, indicates that the setpgid(pid, gpid)
+ * routine is available to set process group ID.
+ */
+/*#define HAS_SETPGID /**/
+
+/* HAS_SETPGRP:
+ * This symbol, if defined, indicates that the setpgrp routine is
+ * available to set the current process group.
+ */
+/* USE_BSD_SETPGRP:
+ * This symbol, if defined, indicates that setpgrp needs two
+ * arguments whereas USG one needs none. See also HAS_SETPGID
+ * for a POSIX interface.
+ */
+/*#define HAS_SETPGRP /**/
+/*#define USE_BSD_SETPGRP / **/
+
+/* HAS_SETPGRP2:
+ * This symbol, if defined, indicates that the setpgrp2() (as in DG/UX)
+ * routine is available to set the current process group.
+ */
+/*#define HAS_SETPGRP2 / **/
+
+/* HAS_SETPRIORITY:
+ * This symbol, if defined, indicates that the setpriority routine is
+ * available to set a process's priority.
+ */
+/*#define HAS_SETPRIORITY /**/
+
+/* HAS_SETREGID:
+ * This symbol, if defined, indicates that the setregid routine is
+ * available to change the real and effective gid of the current
+ * process.
+ */
+/* HAS_SETRESGID:
+ * This symbol, if defined, indicates that the setresgid routine is
+ * available to change the real, effective and saved gid of the current
+ * process.
+ */
+/*#define HAS_SETREGID /**/
+/*#define HAS_SETRESGID / **/
+
+/* HAS_SETREUID:
+ * This symbol, if defined, indicates that the setreuid routine is
+ * available to change the real and effective uid of the current
+ * process.
+ */
+/* HAS_SETRESUID:
+ * This symbol, if defined, indicates that the setresuid routine is
+ * available to change the real, effective and saved uid of the current
+ * process.
+ */
+/*#define HAS_SETREUID /**/
+/*#define HAS_SETRESUID / **/
+
+/* HAS_SETRGID:
+ * This symbol, if defined, indicates that the setrgid routine is available
+ * to change the real gid of the current program.
+ */
+/*#define HAS_SETRGID / **/
+
+/* HAS_SETRUID:
+ * This symbol, if defined, indicates that the setruid routine is available
+ * to change the real uid of the current program.
+ */
+/*#define HAS_SETRUID / **/
+
+/* HAS_SETSID:
+ * This symbol, if defined, indicates that the setsid routine is
+ * available to set the process group ID.
+ */
+/*#define HAS_SETSID /**/
+
+/* HAS_SHM:
+ * This symbol, if defined, indicates that the entire shm*(2) library is
+ * supported.
+ */
+/*#define HAS_SHM /**/
+
+/* Shmat_t:
+ * This symbol holds the return type of the shmat() system call.
+ * Usually set to 'void *' or 'char *'.
+ */
+/* HAS_SHMAT_PROTOTYPE:
+ * This symbol, if defined, indicates that the sys/shm.h includes
+ * a prototype for shmat(). Otherwise, it is up to the program to
+ * guess one. Shmat_t shmat _((int, Shmat_t, int)) is a good guess,
+ * but not always right so it should be emitted by the program only
+ * when HAS_SHMAT_PROTOTYPE is not defined to avoid conflicting defs.
+ */
+#define Shmat_t void * /**/
+#define HAS_SHMAT_PROTOTYPE /**/
+
+/* USE_STAT_BLOCKS:
+ * This symbol is defined if this system has a stat structure declaring
+ * st_blksize and st_blocks.
+ */
+/*#define USE_STAT_BLOCKS /**/
+
+/* HAS_STRCHR:
+ * This symbol is defined to indicate that the strchr()/strrchr()
+ * functions are available for string searching. If not, try the
+ * index()/rindex() pair.
+ */
+/* HAS_INDEX:
+ * This symbol is defined to indicate that the index()/rindex()
+ * functions are available for string searching.
+ */
+#define HAS_STRCHR /**/
+/*#define HAS_INDEX / **/
+
+/* HAS_STRCOLL:
+ * This symbol, if defined, indicates that the strcoll routine is
+ * available to compare strings using collating information.
+ */
+#define HAS_STRCOLL /**/
+
+/* USE_STRUCT_COPY:
+ * This symbol, if defined, indicates that this C compiler knows how
+ * to copy structures. If undefined, you'll need to use a block copy
+ * routine of some sort instead.
+ */
+#define USE_STRUCT_COPY /**/
+
+/* HAS_STRERROR:
+ * This symbol, if defined, indicates that the strerror routine is
+ * available to translate error numbers to strings. See the writeup
+ * of Strerror() in this file before you try to define your own.
+ */
+/* HAS_SYS_ERRLIST:
+ * This symbol, if defined, indicates that the sys_errlist array is
+ * available to translate error numbers to strings. The extern int
+ * sys_nerr gives the size of that table.
+ */
+/* Strerror:
+ * This preprocessor symbol is defined as a macro if strerror() is
+ * not available to translate error numbers to strings but sys_errlist[]
+ * array is there.
+ */
+#define HAS_STRERROR /**/
+#define HAS_SYS_ERRLIST /**/
+#define Strerror(e) strerror(e)
+
+/* HAS_STRTOD:
+ * This symbol, if defined, indicates that the strtod routine is
+ * available to provide better numeric string conversion than atof().
+ */
+#define HAS_STRTOD /**/
+
+/* HAS_STRTOL:
+ * This symbol, if defined, indicates that the strtol routine is available
+ * to provide better numeric string conversion than atoi() and friends.
+ */
+#define HAS_STRTOL /**/
+
+/* HAS_STRTOUL:
+ * This symbol, if defined, indicates that the strtoul routine is
+ * available to provide conversion of strings to unsigned long.
+ */
+#define HAS_STRTOUL /**/
+
+/* HAS_STRXFRM:
+ * This symbol, if defined, indicates that the strxfrm() routine is
+ * available to transform strings.
+ */
+#define HAS_STRXFRM /**/
+
+/* HAS_SYMLINK:
+ * This symbol, if defined, indicates that the symlink routine is available
+ * to create symbolic links.
+ */
+#define HAS_SYMLINK /**/
+
+/* HAS_SYSCALL:
+ * This symbol, if defined, indicates that the syscall routine is
+ * available to call arbitrary system calls. If undefined, that's tough.
+ */
+/*#define HAS_SYSCALL /**/
+
+/* HAS_SYSCONF:
+ * This symbol, if defined, indicates that sysconf() is available
+ * to determine system related limits and options.
+ */
+#define HAS_SYSCONF /**/
+
+/* HAS_SYSTEM:
+ * This symbol, if defined, indicates that the system routine is
+ * available to issue a shell command.
+ */
+#define HAS_SYSTEM /**/
+
+/* HAS_TCGETPGRP:
+ * This symbol, if defined, indicates that the tcgetpgrp routine is
+ * available to get foreground process group ID.
+ */
+/*#define HAS_TCGETPGRP /**/
+
+/* HAS_TCSETPGRP:
+ * This symbol, if defined, indicates that the tcsetpgrp routine is
+ * available to set foreground process group ID.
+ */
+/*#define HAS_TCSETPGRP /**/
+
+/* HAS_TRUNCATE:
+ * This symbol, if defined, indicates that the truncate routine is
+ * available to truncate files.
+ */
+/*#define HAS_TRUNCATE /**/
+
+/* HAS_TZNAME:
+ * This symbol, if defined, indicates that the tzname[] array is
+ * available to access timezone names.
+ */
+#define HAS_TZNAME /**/
+
+/* HAS_UMASK:
+ * This symbol, if defined, indicates that the umask routine is
+ * available to set and get the value of the file creation mask.
+ */
+#define HAS_UMASK /**/
+
+/* HAS_VFORK:
+ * This symbol, if defined, indicates that vfork() exists.
+ */
+/*#define HAS_VFORK / **/
+
+/* HASVOLATILE:
+ * This symbol, if defined, indicates that this C compiler knows about
+ * the volatile declaration.
+ */
+#define HASVOLATILE /**/
+#ifndef HASVOLATILE
+#define volatile
+#endif
+
+/* HAS_WAIT4:
+ * This symbol, if defined, indicates that wait4() exists.
+ */
+/*#define HAS_WAIT4 /**/
+
+/* HAS_WAITPID:
+ * This symbol, if defined, indicates that the waitpid routine is
+ * available to wait for child process.
+ */
+#define HAS_WAITPID /**/
+
+/* HAS_WCSTOMBS:
+ * This symbol, if defined, indicates that the wcstombs routine is
+ * available to convert wide character strings to multibyte strings.
+ */
+#define HAS_WCSTOMBS /**/
+
+/* HAS_WCTOMB:
+ * This symbol, if defined, indicates that the wctomb routine is available
+ * to covert a wide character to a multibyte.
+ */
+#define HAS_WCTOMB /**/
+
+/* EBCDIC:
+ * This symbol, if defined, indicates that this system uses
+ * EBCDIC encoding.
+ */
+/*#define EBCDIC /**/
+
+/* I_ARPA_INET:
+ * This symbol, if defined, indicates that <arpa/inet.h> exists and should
+ * be included.
+ */
+/*#define I_ARPA_INET /**/
+
+/* I_DBM:
+ * This symbol, if defined, indicates that <dbm.h> exists and should
+ * be included.
+ */
+/* I_RPCSVC_DBM:
+ * This symbol, if defined, indicates that <rpcsvc/dbm.h> exists and
+ * should be included.
+ */
+/*#define I_DBM /**/
+/*#define I_RPCSVC_DBM /**/
+
+/* I_DIRENT:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <dirent.h>. Using this symbol also triggers the definition
+ * of the Direntry_t define which ends up being 'struct dirent' or
+ * 'struct direct' depending on the availability of <dirent.h>.
+ */
+/* DIRNAMLEN:
+ * This symbol, if defined, indicates to the C program that the length
+ * of directory entry names is provided by a d_namlen field. Otherwise
+ * you need to do strlen() on the d_name field.
+ */
+/* Direntry_t:
+ * This symbol is set to 'struct direct' or 'struct dirent' depending on
+ * whether dirent is available or not. You should use this pseudo type to
+ * portably declare your directory entries.
+ */
+#define I_DIRENT /**/
+/*#define DIRNAMLEN / **/
+#define Direntry_t struct dirent
+
+/* I_DLFCN:
+ * This symbol, if defined, indicates that <dlfcn.h> exists and should
+ * be included.
+ */
+/*#define I_DLFCN /**/
+
+/* I_FCNTL:
+ * This manifest constant tells the C program to include <fcntl.h>.
+ */
+#define I_FCNTL /**/
+
+/* I_FLOAT:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <float.h> to get definition of symbols like DBL_MAX or
+ * DBL_MIN, i.e. machine dependent floating point values.
+ */
+#define I_FLOAT /**/
+
+/* I_GRP:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <grp.h>.
+ */
+/* GRPASSWD:
+ * This symbol, if defined, indicates to the C program that struct group
+ * contains gr_passwd.
+ */
+/* HAS_SETGRENT:
+ * This symbol, if defined, indicates that the getgrent routine is
+ * available for initializing sequential access of the group database.
+ */
+/* HAS_GETGRENT:
+ * This symbol, if defined, indicates that the getgrent routine is
+ * available for sequential access of the group database.
+ */
+/* HAS_ENDGRENT:
+ * This symbol, if defined, indicates that the getgrent routine is
+ * available for finalizing sequential access of the group database.
+ */
+/*#define I_GRP /**/
+/*#define GRPASSWD /**/
+/*#define HAS_SETGRENT /**/
+/*#define HAS_GETGRENT /**/
+/*#define HAS_ENDGRENT /**/
+
+/* I_LIMITS:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <limits.h> to get definition of symbols like WORD_BIT or
+ * LONG_MAX, i.e. machine dependant limitations.
+ */
+#define I_LIMITS /**/
+
+/* I_LOCALE:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <locale.h>.
+ */
+#define I_LOCALE /**/
+
+/* I_MATH:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <math.h>.
+ */
+#define I_MATH /**/
+
+/* I_MEMORY:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <memory.h>.
+ */
+/*#define I_MEMORY / **/
+
+/* I_NDBM:
+ * This symbol, if defined, indicates that <ndbm.h> exists and should
+ * be included.
+ */
+/*#define I_NDBM /**/
+
+/* I_NET_ERRNO:
+ * This symbol, if defined, indicates that <net/errno.h> exists and
+ * should be included.
+ */
+/*#define I_NET_ERRNO / **/
+
+/* I_NETINET_IN:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <netinet/in.h>. Otherwise, you may try <sys/in.h>.
+ */
+#define I_NETINET_IN /**/
+
+/* I_SFIO:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sfio.h>.
+ */
+/*#define I_SFIO / **/
+
+/* I_STDDEF:
+ * This symbol, if defined, indicates that <stddef.h> exists and should
+ * be included.
+ */
+#define I_STDDEF /**/
+
+/* I_STDLIB:
+ * This symbol, if defined, indicates that <stdlib.h> exists and should
+ * be included.
+ */
+#define I_STDLIB /**/
+
+/* I_STRING:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <string.h> (USG systems) instead of <strings.h> (BSD systems).
+ */
+#define I_STRING /**/
+
+/* I_SYS_DIR:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/dir.h>.
+ */
+/*#define I_SYS_DIR / **/
+
+/* I_SYS_FILE:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/file.h> to get definition of R_OK and friends.
+ */
+/*#define I_SYS_FILE / **/
+
+/* I_SYS_IOCTL:
+ * This symbol, if defined, indicates that <sys/ioctl.h> exists and should
+ * be included. Otherwise, include <sgtty.h> or <termio.h>.
+ */
+#define I_SYS_IOCTL /**/
+
+/* I_SYS_NDIR:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/ndir.h>.
+ */
+/*#define I_SYS_NDIR / **/
+
+/* I_SYS_PARAM:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/param.h>.
+ */
+/*#define I_SYS_PARAM /**/
+
+/* I_SYS_RESOURCE:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/resource.h>.
+ */
+/*#define I_SYS_RESOURCE /**/
+
+/* I_SYS_SELECT:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/select.h> in order to get definition of struct timeval.
+ */
+#define I_SYS_SELECT /**/
+
+/* I_SYS_STAT:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/stat.h>.
+ */
+#define I_SYS_STAT /**/
+
+/* I_SYS_TIMES:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/times.h>.
+ */
+#define I_SYS_TIMES /**/
+
+/* I_SYS_TYPES:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/types.h>.
+ */
+#define I_SYS_TYPES /**/
+
+/* I_SYS_UN:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/un.h> to get UNIX domain socket definitions.
+ */
+/*#define I_SYS_UN /**/
+
+/* I_SYS_WAIT:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/wait.h>.
+ */
+#define I_SYS_WAIT /**/
+
+/* I_TERMIO:
+ * This symbol, if defined, indicates that the program should include
+ * <termio.h> rather than <sgtty.h>. There are also differences in
+ * the ioctl() calls that depend on the value of this symbol.
+ */
+/* I_TERMIOS:
+ * This symbol, if defined, indicates that the program should include
+ * the POSIX termios.h rather than sgtty.h or termio.h.
+ * There are also differences in the ioctl() calls that depend on the
+ * value of this symbol.
+ */
+/* I_SGTTY:
+ * This symbol, if defined, indicates that the program should include
+ * <sgtty.h> rather than <termio.h>. There are also differences in
+ * the ioctl() calls that depend on the value of this symbol.
+ */
+/*#define I_TERMIO / **/
+#define I_TERMIOS /**/
+/*#define I_SGTTY / **/
+
+/* I_UNISTD:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <unistd.h>.
+ */
+#define I_UNISTD /**/
+
+/* I_UTIME:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <utime.h>.
+ */
+#define I_UTIME /**/
+
+/* I_VALUES:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <values.h> to get definition of symbols like MINFLOAT or
+ * MAXLONG, i.e. machine dependant limitations. Probably, you
+ * should use <limits.h> instead, if it is available.
+ */
+#define I_VALUES /**/
+
+/* I_STDARG:
+ * This symbol, if defined, indicates that <stdarg.h> exists and should
+ * be included.
+ */
+/* I_VARARGS:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <varargs.h>.
+ */
+#define I_STDARG /**/
+/*#define I_VARARGS / **/
+
+/* I_VFORK:
+ * This symbol, if defined, indicates to the C program that it should
+ * include vfork.h.
+ */
+/*#define I_VFORK / **/
+
+/* CAN_PROTOTYPE:
+ * If defined, this macro indicates that the C compiler can handle
+ * function prototypes.
+ */
+/* _:
+ * This macro is used to declare function parameters for folks who want
+ * to make declarations with prototypes using a different style than
+ * the above macros. Use double parentheses. For example:
+ *
+ * int main _((int argc, char *argv[]));
+ */
+#define CAN_PROTOTYPE /**/
+#ifdef CAN_PROTOTYPE
+#define _(args) args
+#else
+#define _(args) ()
+#endif
+
+/* SH_PATH:
+ * This symbol contains the full pathname to the shell used on this
+ * on this system to execute Bourne shell scripts. Usually, this will be
+ * /bin/sh, though it's possible that some systems will have /bin/ksh,
+ * /bin/pdksh, /bin/ash, /bin/bash, or even something such as
+ * D:/bin/sh.exe.
+ */
+#define SH_PATH "/bin/sh" /**/
+
+/* STDCHAR:
+ * This symbol is defined to be the type of char used in stdio.h.
+ * It has the values "unsigned char" or "char".
+ */
+#define STDCHAR unsigned char /**/
+
+/* MEM_ALIGNBYTES:
+ * This symbol contains the number of bytes required to align a
+ * double. Usual values are 2, 4 and 8.
+ * On NeXT starting with 3.2, you can build "Fat" Multiple Architecture
+ * Binaries (MAB) for targets with varying alignment. This only matters
+ * for perl, where the config.h can be generated and installed on one
+ * system, and used by a different architecture to build an extension.
+ * The default is eight, for safety.
+ */
+#define MEM_ALIGNBYTES 8 /**/
+
+/* BYTEORDER:
+ * This symbol holds the hexadecimal constant defined in byteorder,
+ * i.e. 0x1234 or 0x4321, etc...
+ * On NeXT 3.2 (and greater), you can build "Fat" Multiple Architecture
+ * Binaries (MAB) on either big endian or little endian machines.
+ * The endian-ness is available at compile-time. This only matters
+ * for perl, where the config.h can be generated and installed on
+ * one system, and used by a different architecture to build an
+ * extension. Older versions of NeXT that might not have
+ * defined either *_ENDIAN__ were all on Motorola 680x0 series,
+ * so the default case (for NeXT) is big endian to catch them.
+ * This might matter for NeXT 3.0.
+ */
+#ifndef NeXT
+#define BYTEORDER 0x4321 /* large digits for MSB */
+#else /* NeXT */
+#ifdef __LITTLE_ENDIAN__
+#define BYTEORDER 0x1234
+#else /* __BIG_ENDIAN__ */
+#define BYTEORDER 0x4321
+#endif /* ENDIAN CHECK */
+#endif /* NeXT */
+
+/* CASTI32:
+ * This symbol is defined if the C compiler can cast negative
+ * or large floating point numbers to 32-bit ints.
+ */
+/*#define CASTI32 /**/
+
+/* CASTNEGFLOAT:
+ * This symbol is defined if the C compiler can cast negative
+ * numbers to unsigned longs, ints and shorts.
+ */
+/* CASTFLAGS:
+ * This symbol contains flags that say what difficulties the compiler
+ * has casting odd floating values to unsigned long:
+ * 0 = ok
+ * 1 = couldn't cast < 0
+ * 2 = couldn't cast >= 0x80000000
+ * 4 = couldn't cast in argument expression list
+ */
+#define CASTNEGFLOAT /**/
+#define CASTFLAGS 0 /**/
+
+/* VOID_CLOSEDIR:
+ * This symbol, if defined, indicates that the closedir() routine
+ * does not return a value.
+ */
+/*#define VOID_CLOSEDIR / **/
+
+/* Gconvert:
+ * This preprocessor macro is defined to convert a floating point
+ * number to a string without a trailing decimal point. This
+ * emulates the behavior of sprintf("%g"), but is sometimes much more
+ * efficient. If gconvert() is not available, but gcvt() drops the
+ * trailing decimal point, then gcvt() is used. If all else fails,
+ * a macro using sprintf("%g") is used. Arguments for the Gconvert
+ * macro are: value, number of digits, whether trailing zeros should
+ * be retained, and the output buffer.
+ * Possible values are:
+ * d_Gconvert='gconvert((x),(n),(t),(b))'
+ * d_Gconvert='gcvt((x),(n),(b))'
+ * d_Gconvert='sprintf((b),"%.*g",(n),(x))'
+ * The last two assume trailing zeros should not be kept.
+ */
+#define Gconvert(x,n,t,b) sprintf((b),"%.*g",(n),(x))
+
+/* HAS_GNULIBC:
+ * This symbol, if defined, indicates to the C program that
+ * the GNU C library is being used.
+ */
+/*#define HAS_GNULIBC /**/
+/* HAS_ISASCII:
+ * This manifest constant lets the C program know that isascii
+ * is available.
+ */
+#define HAS_ISASCII /**/
+
+/* HAS_LCHOWN:
+ * This symbol, if defined, indicates that the lchown routine is
+ * available to operate on a symbolic link (instead of following the
+ * link).
+ */
+/*#define HAS_LCHOWN /**/
+
+/* HAS_OPEN3:
+ * This manifest constant lets the C program know that the three
+ * argument form of open(2) is available.
+ */
+#define HAS_OPEN3 /**/
+
+/* HAS_SAFE_BCOPY:
+ * This symbol, if defined, indicates that the bcopy routine is available
+ * to copy potentially overlapping memory blocks. Otherwise you should
+ * probably use memmove() or memcpy(). If neither is defined, roll your
+ * own version.
+ */
+/*#define HAS_SAFE_BCOPY /**/ /* PG: VOS has bcopy; do not know if it is safe. */
+
+/* HAS_SAFE_MEMCPY:
+ * This symbol, if defined, indicates that the memcpy routine is available
+ * to copy potentially overlapping memory blocks. Otherwise you should
+ * probably use memmove() or memcpy(). If neither is defined, roll your
+ * own version.
+ */
+/*#define HAS_SAFE_MEMCPY / **/
+
+/* HAS_SANE_MEMCMP:
+ * This symbol, if defined, indicates that the memcmp routine is available
+ * and can be used to compare relative magnitudes of chars with their high
+ * bits set. If it is not defined, roll your own version.
+ */
+#define HAS_SANE_MEMCMP / **/ /* PG: VOS GUESS */
+
+/* HAS_SIGACTION:
+ * This symbol, if defined, indicates that Vr4's sigaction() routine
+ * is available.
+ */
+/*#define HAS_SIGACTION /**/
+
+/* Sigjmp_buf:
+ * This is the buffer type to be used with Sigsetjmp and Siglongjmp.
+ */
+/* Sigsetjmp:
+ * This macro is used in the same way as sigsetjmp(), but will invoke
+ * traditional setjmp() if sigsetjmp isn't available.
+ * See HAS_SIGSETJMP.
+ */
+/* Siglongjmp:
+ * This macro is used in the same way as siglongjmp(), but will invoke
+ * traditional longjmp() if siglongjmp isn't available.
+ * See HAS_SIGSETJMP.
+ */
+/*#define HAS_SIGSETJMP /**/
+#ifdef HAS_SIGSETJMP
+#define Sigjmp_buf sigjmp_buf
+#define Sigsetjmp(buf,save_mask) sigsetjmp((buf),(save_mask))
+#define Siglongjmp(buf,retval) siglongjmp((buf),(retval))
+#else
+#define Sigjmp_buf jmp_buf
+#define Sigsetjmp(buf,save_mask) setjmp((buf))
+#define Siglongjmp(buf,retval) longjmp((buf),(retval))
+#endif
+
+/* USE_STDIO_PTR:
+ * This symbol is defined if the _ptr and _cnt fields (or similar)
+ * of the stdio FILE structure can be used to access the stdio buffer
+ * for a file handle. If this is defined, then the FILE_ptr(fp)
+ * and FILE_cnt(fp) macros will also be defined and should be used
+ * to access these fields.
+ */
+/* FILE_ptr:
+ * This macro is used to access the _ptr field (or equivalent) of the
+ * FILE structure pointed to by its argument. This macro will always be
+ * defined if USE_STDIO_PTR is defined.
+ */
+/* STDIO_PTR_LVALUE:
+ * This symbol is defined if the FILE_ptr macro can be used as an
+ * lvalue.
+ */
+/* FILE_cnt:
+ * This macro is used to access the _cnt field (or equivalent) of the
+ * FILE structure pointed to by its argument. This macro will always be
+ * defined if USE_STDIO_PTR is defined.
+ */
+/* STDIO_CNT_LVALUE:
+ * This symbol is defined if the FILE_cnt macro can be used as an
+ * lvalue.
+ */
+#define USE_STDIO_PTR /**/
+#ifdef USE_STDIO_PTR
+#define FILE_ptr(fp) ((fp)->_ptr)
+#define STDIO_PTR_LVALUE /**/
+#define FILE_cnt(fp) ((fp)->_cnt)
+#define STDIO_CNT_LVALUE /**/
+#endif
+
+/* USE_STDIO_BASE:
+ * This symbol is defined if the _base field (or similar) of the
+ * stdio FILE structure can be used to access the stdio buffer for
+ * a file handle. If this is defined, then the FILE_base(fp) macro
+ * will also be defined and should be used to access this field.
+ * Also, the FILE_bufsiz(fp) macro will be defined and should be used
+ * to determine the number of bytes in the buffer. USE_STDIO_BASE
+ * will never be defined unless USE_STDIO_PTR is.
+ */
+/* FILE_base:
+ * This macro is used to access the _base field (or equivalent) of the
+ * FILE structure pointed to by its argument. This macro will always be
+ * defined if USE_STDIO_BASE is defined.
+ */
+/* FILE_bufsiz:
+ * This macro is used to determine the number of bytes in the I/O
+ * buffer pointed to by _base field (or equivalent) of the FILE
+ * structure pointed to its argument. This macro will always be defined
+ * if USE_STDIO_BASE is defined.
+ */
+#define USE_STDIO_BASE /**/
+#ifdef USE_STDIO_BASE
+#define FILE_base(fp) ((fp)->_base)
+#define FILE_bufsiz(fp) ((fp)->_cnt + (fp)->_ptr - (fp)->_base)
+#endif
+
+/* HAS_VPRINTF:
+ * This symbol, if defined, indicates that the vprintf routine is available
+ * to printf with a pointer to an argument list. If unavailable, you
+ * may need to write your own, probably in terms of _doprnt().
+ */
+/* USE_CHAR_VSPRINTF:
+ * This symbol is defined if this system has vsprintf() returning type
+ * (char*). The trend seems to be to declare it as "int vsprintf()". It
+ * is up to the package author to declare vsprintf correctly based on the
+ * symbol.
+ */
+#define HAS_VPRINTF /**/
+/*#define USE_CHAR_VSPRINTF / **/
+
+/* DOUBLESIZE:
+ * This symbol contains the size of a double, so that the C preprocessor
+ * can make decisions based on it.
+ */
+#define DOUBLESIZE 8 /**/
+
+/* I_TIME:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <time.h>.
+ */
+/* I_SYS_TIME:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/time.h>.
+ */
+/* I_SYS_TIME_KERNEL:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/time.h> with KERNEL defined.
+ */
+/*#define I_TIME / **/
+#define I_SYS_TIME /**/
+/*#define I_SYS_TIME_KERNEL / **/
+
+/* INTSIZE:
+ * This symbol contains the value of sizeof(int) so that the C
+ * preprocessor can make decisions based on it.
+ */
+/* LONGSIZE:
+ * This symbol contains the value of sizeof(long) so that the C
+ * preprocessor can make decisions based on it.
+ */
+/* SHORTSIZE:
+ * This symbol contains the value of sizeof(short) so that the C
+ * preprocessor can make decisions based on it.
+ */
+#define INTSIZE 4 /**/
+#define LONGSIZE 4 /**/
+#define SHORTSIZE 2 /**/
+
+/* VAL_O_NONBLOCK:
+ * This symbol is to be used during open() or fcntl(F_SETFL) to turn on
+ * non-blocking I/O for the file descriptor. Note that there is no way
+ * back, i.e. you cannot turn it blocking again this way. If you wish to
+ * alternatively switch between blocking and non-blocking, use the
+ * ioctl(FIOSNBIO) call instead, but that is not supported by all devices.
+ */
+/* VAL_EAGAIN:
+ * This symbol holds the errno error code set by read() when no data was
+ * present on the non-blocking file descriptor.
+ */
+/* RD_NODATA:
+ * This symbol holds the return code from read() when no data is present
+ * on the non-blocking file descriptor. Be careful! If EOF_NONBLOCK is
+ * not defined, then you can't distinguish between no data and EOF by
+ * issuing a read(). You'll have to find another way to tell for sure!
+ */
+/* EOF_NONBLOCK:
+ * This symbol, if defined, indicates to the C program that a read() on
+ * a non-blocking file descriptor will return 0 on EOF, and not the value
+ * held in RD_NODATA (-1 usually, in that case!).
+ */
+#define VAL_O_NONBLOCK O_NONBLOCK
+#define VAL_EAGAIN EAGAIN
+#define RD_NODATA -1
+#define EOF_NONBLOCK
+
+/* PTRSIZE:
+ * This symbol contains the size of a pointer, so that the C preprocessor
+ * can make decisions based on it. It will be sizeof(void *) if
+ * the compiler supports (void *); otherwise it will be
+ * sizeof(char *).
+ */
+#define PTRSIZE 4 /**/
+
+/* RANDBITS:
+ * This symbol contains the number of bits of random number the rand()
+ * function produces. Usual values are 15, 16, and 31.
+ */
+#define RANDBITS 15 /**/
+
+/* SSize_t:
+ * This symbol holds the type used by functions that return
+ * a count of bytes or an error condition. It must be a signed type.
+ * It is usually ssize_t, but may be long or int, etc.
+ * It may be necessary to include <sys/types.h> or <unistd.h>
+ * to get any typedef'ed information.
+ * We will pick a type such that sizeof(SSize_t) == sizeof(Size_t).
+ */
+#define SSize_t ssize_t /* signed count of bytes */
+
+/* OSNAME:
+ * This symbol contains the name of the operating system, as determined
+ * by Configure. You shouldn't rely on it too much; the specific
+ * feature tests from Configure are generally more reliable.
+ */
+#define OSNAME "VOS" /**/
+
+/* CAT2:
+ * This macro catenates 2 tokens together.
+ */
+/* STRINGIFY:
+ * This macro surrounds its token with double quotes.
+ */
+#if 42 == 1
+#define CAT2(a,b)a/**/b
+#define STRINGIFY(a)"a"
+ /* If you can get stringification with catify, tell me how! */
+#endif
+#if 42 == 42
+#define CAT2(a,b)a ## b
+#define StGiFy(a)# a
+#define STRINGIFY(a)StGiFy(a)
+#endif
+#if 42 != 1 && 42 != 42
+#include "Bletch: How does this C preprocessor catenate tokens?"
+#endif
+
+/* CSH:
+ * This symbol, if defined, contains the full pathname of csh.
+ */
+/*#define HAS_CSH /**/
+#ifdef HAS_CSH
+/*#define CSH "/bin/csh" /**/
+#endif
+
+/* HAS_ENDHOSTENT:
+ * This symbol, if defined, indicates that the endhostent() routine is
+ * available to close whatever was being used for host queries.
+ */
+#define HAS_ENDHOSTENT /**/
+
+/* HAS_ENDNETENT:
+ * This symbol, if defined, indicates that the endnetent() routine is
+ * available to close whatever was being used for network queries.
+ */
+#define HAS_ENDNETENT /**/
+
+/* HAS_ENDPROTOENT:
+ * This symbol, if defined, indicates that the endprotoent() routine is
+ * available to close whatever was being used for protocol queries.
+ */
+#define HAS_ENDPROTOENT /**/
+
+/* HAS_ENDSERVENT:
+ * This symbol, if defined, indicates that the endservent() routine is
+ * available to close whatever was being used for service queries.
+ */
+#define HAS_ENDSERVENT /**/
+
+/* HAS_GETHOSTBYADDR:
+ * This symbol, if defined, indicates that the gethostbyaddr() routine is
+ * available to look up hosts by their IP addresses.
+ */
+#define HAS_GETHOSTBYADDR /**/
+
+/* HAS_GETHOSTBYNAME:
+ * This symbol, if defined, indicates that the gethostbyname() routine is
+ * available to look up host names in some data base or other.
+ */
+#define HAS_GETHOSTBYNAME /**/
+
+/* HAS_GETHOSTENT:
+ * This symbol, if defined, indicates that the gethostent() routine is
+ * available to look up host names in some data base or another.
+ */
+#define HAS_GETHOSTENT /**/
+
+/* HAS_GETNETBYADDR:
+ * This symbol, if defined, indicates that the getnetbyaddr() routine is
+ * available to look up networks by their IP addresses.
+ */
+#define HAS_GETNETBYADDR /**/
+
+/* HAS_GETNETBYNAME:
+ * This symbol, if defined, indicates that the getnetbyname() routine is
+ * available to look up networks by their names.
+ */
+#define HAS_GETNETBYNAME /**/
+
+/* HAS_GETNETENT:
+ * This symbol, if defined, indicates that the getnetent() routine is
+ * available to look up network names in some data base or another.
+ */
+#define HAS_GETNETENT /**/
+
+/* HAS_GETPROTOENT:
+ * This symbol, if defined, indicates that the getprotoent() routine is
+ * available to look up protocols in some data base or another.
+ */
+#define HAS_GETPROTOENT /**/
+
+/* HAS_GETPROTOBYNAME:
+ * This symbol, if defined, indicates that the getprotobyname()
+ * routine is available to look up protocols by their name.
+ */
+/* HAS_GETPROTOBYNUMBER:
+ * This symbol, if defined, indicates that the getprotobynumber()
+ * routine is available to look up protocols by their number.
+ */
+#define HAS_GETPROTOBYNAME /**/
+#define HAS_GETPROTOBYNUMBER /**/
+
+/* HAS_GETSERVENT:
+ * This symbol, if defined, indicates that the getservent() routine is
+ * available to look up network services in some data base or another.
+ */
+#define HAS_GETSERVENT /**/
+
+/* HAS_GETSERVBYNAME:
+ * This symbol, if defined, indicates that the getservbyname()
+ * routine is available to look up services by their name.
+ */
+/* HAS_GETSERVBYPORT:
+ * This symbol, if defined, indicates that the getservbyport()
+ * routine is available to look up services by their port.
+ */
+#define HAS_GETSERVBYNAME /**/
+#define HAS_GETSERVBYPORT /**/
+
+/* HAS_LONG_DOUBLE:
+ * This symbol will be defined if the C compiler supports long
+ * doubles.
+ */
+/* LONG_DOUBLESIZE:
+ * This symbol contains the size of a long double, so that the
+ * C preprocessor can make decisions based on it. It is only
+ * defined if the system supports long doubles.
+ */
+#define HAS_LONG_DOUBLE /**/
+#ifdef HAS_LONG_DOUBLE
+#define LONG_DOUBLESIZE 8 /**/
+#endif
+
+/* HAS_LONG_LONG:
+ * This symbol will be defined if the C compiler supports
+ * long long.
+ */
+/* LONGLONGSIZE:
+ * This symbol contains the size of a long long, so that the
+ * C preprocessor can make decisions based on it. It is only
+ * defined if the system supports long long.
+ */
+/*#define HAS_LONG_LONG /**/
+#ifdef HAS_LONG_LONG
+/*#define LONGLONGSIZE $longlongsize /**/
+#endif
+
+/* HAS_SETGROUPS:
+ * This symbol, if defined, indicates that the setgroups() routine is
+ * available to set the list of process groups. If unavailable, multiple
+ * groups are probably not supported.
+ */
+/*#define HAS_SETGROUPS /**/
+
+/* HAS_SETHOSTENT:
+ * This symbol, if defined, indicates that the sethostent() routine is
+ * available.
+ */
+#define HAS_SETHOSTENT /**/
+
+/* HAS_SETNETENT:
+ * This symbol, if defined, indicates that the setnetent() routine is
+ * available.
+ */
+#define HAS_SETNETENT /**/
+
+/* HAS_SETPROTOENT:
+ * This symbol, if defined, indicates that the setprotoent() routine is
+ * available.
+ */
+#define HAS_SETPROTOENT /**/
+
+/* HAS_SETSERVENT:
+ * This symbol, if defined, indicates that the setservent() routine is
+ * available.
+ */
+#define HAS_SETSERVENT /**/
+
+/* HAS_SETVBUF:
+ * This symbol, if defined, indicates that the setvbuf routine is
+ * available to change buffering on an open stdio stream.
+ * to a line-buffered mode.
+ */
+#define HAS_SETVBUF /**/
+
+/* HAS_SOCKET:
+ * This symbol, if defined, indicates that the BSD socket interface is
+ * supported.
+ */
+/* HAS_SOCKETPAIR:
+ * This symbol, if defined, indicates that the BSD socketpair() call is
+ * supported.
+ */
+#define HAS_SOCKET /**/
+/*#define HAS_SOCKETPAIR / **/
+
+/* HAS_UNION_SEMUN:
+ * This symbol, if defined, indicates that the union semun is
+ * defined by including <sys/sem.h>. If not, the user code
+ * probably needs to define it as:
+ * union semun {
+ * int val;
+ * struct semid_ds *buf;
+ * unsigned short *array;
+ * }
+ */
+/* USE_SEMCTL_SEMUN:
+ * This symbol, if defined, indicates that union semun is
+ * used for semctl IPC_STAT.
+ */
+/* USE_SEMCTL_SEMID_DS:
+ * This symbol, if defined, indicates that struct semid_ds * is
+ * used for semctl IPC_STAT.
+ */
+/*#define HAS_UNION_SEMUN /**/
+/*#define USE_SEMCTL_SEMUN /**/
+/*#define USE_SEMCTL_SEMID_DS /**/
+
+/* Signal_t:
+ * This symbol's value is either "void" or "int", corresponding to the
+ * appropriate return type of a signal handler. Thus, you can declare
+ * a signal handler using "Signal_t (*handler)()", and define the
+ * handler using "Signal_t handler(sig)".
+ */
+#define Signal_t void /* Signal handler's return type */
+
+/* Groups_t:
+ * This symbol holds the type used for the second argument to
+ * getgroups() and setgropus(). Usually, this is the same as
+ * gidtype (gid_t) , but sometimes it isn't.
+ * It can be int, ushort, uid_t, etc...
+ * It may be necessary to include <sys/types.h> to get any
+ * typedef'ed information. This is only required if you have
+ * getgroups() or setgropus()..
+ */
+#if defined(HAS_GETGROUPS) || defined(HAS_SETGROUPS)
+#define Groups_t gid_t /* Type for 2nd arg to [gs]etgroups() */
+#endif
+
+/* I_NETDB:
+ * This symbol, if defined, indicates that <netdb.h> exists and
+ * should be included.
+ */
+#define I_NETDB /**/
+
+/* I_PWD:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <pwd.h>.
+ */
+/* PWQUOTA:
+ * This symbol, if defined, indicates to the C program that struct passwd
+ * contains pw_quota.
+ */
+/* PWAGE:
+ * This symbol, if defined, indicates to the C program that struct passwd
+ * contains pw_age.
+ */
+/* PWCHANGE:
+ * This symbol, if defined, indicates to the C program that struct passwd
+ * contains pw_change.
+ */
+/* PWCLASS:
+ * This symbol, if defined, indicates to the C program that struct passwd
+ * contains pw_class.
+ */
+/* PWEXPIRE:
+ * This symbol, if defined, indicates to the C program that struct passwd
+ * contains pw_expire.
+ */
+/* PWCOMMENT:
+ * This symbol, if defined, indicates to the C program that struct passwd
+ * contains pw_comment.
+ */
+/* PWGECOS:
+ * This symbol, if defined, indicates to the C program that struct passwd
+ * contains pw_gecos.
+ */
+/* PWPASSWD:
+ * This symbol, if defined, indicates to the C program that struct passwd
+ * contains pw_passwd.
+ */
+/* HAS_SETPWENT:
+ * This symbol, if defined, indicates that the getpwrent routine is
+ * available for initializing sequential access of the passwd database.
+ */
+/* HAS_GETPWENT:
+ * This symbol, if defined, indicates that the getpwent routine is
+ * available for sequential access of the password database.
+ */
+/* HAS_ENDPWENT:
+ * This symbol, if defined, indicates that the getpwent routine is
+ * available for finalizing sequential access of the passwd database.
+ */
+/*#define I_PWD /**/
+/*#define PWQUOTA / **/
+/*#define PWAGE /**/
+/*#define PWCHANGE / **/
+/*#define PWCLASS / **/
+/*#define PWEXPIRE / **/
+/*#define PWCOMMENT /**/
+/*#define PWGECOS /**/
+/*#define PWPASSWD /**/
+/*#define HAS_SETPWENT /**/
+/*#define HAS_GETPWENT /**/
+/*#define HAS_ENDPWENT /**/
+
+/* Free_t:
+ * This variable contains the return type of free(). It is usually
+ * void, but occasionally int.
+ */
+/* Malloc_t:
+ * This symbol is the type of pointer returned by malloc and realloc.
+ */
+#define Malloc_t void * /**/
+#define Free_t void /**/
+
+/* MYMALLOC:
+ * This symbol, if defined, indicates that we're using our own malloc.
+ */
+/*#define MYMALLOC /**/
+
+/* SIG_NAME:
+ * This symbol contains a list of signal names in order of
+ * signal number. This is intended
+ * to be used as a static array initialization, like this:
+ * char *sig_name[] = { SIG_NAME };
+ * The signals in the list are separated with commas, and each signal
+ * is surrounded by double quotes. There is no leading SIG in the signal
+ * name, i.e. SIGQUIT is known as "QUIT".
+ * Gaps in the signal numbers (up to NSIG) are filled in with NUMnn,
+ * etc., where nn is the actual signal number (e.g. NUM37).
+ * The signal number for sig_name[i] is stored in sig_num[i].
+ * The last element is 0 to terminate the list with a NULL. This
+ * corresponds to the 0 at the end of the sig_num list.
+ */
+/* SIG_NUM:
+ * This symbol contains a list of signal numbers, in the same order as the
+ * SIG_NAME list. It is suitable for static array initialization, as in:
+ * int sig_num[] = { SIG_NUM };
+ * The signals in the list are separated with commas, and the indices
+ * within that list and the SIG_NAME list match, so it's easy to compute
+ * the signal name from a number or vice versa at the price of a small
+ * dynamic linear lookup.
+ * Duplicates are allowed, but are moved to the end of the list.
+ * The signal number corresponding to sig_name[i] is sig_number[i].
+ * if (i < NSIG) then sig_number[i] == i.
+ * The last element is 0, corresponding to the 0 at the end of
+ * the sig_name list.
+ */
+/*#define SIG_NAME "ZERO","HUP","INT","QUIT","ILL","TRAP","ABRT","EMT","FPE","KILL","BUS","SEGV","SYS","PIPE","ALRM","TERM","USR1","USR2","CHLD","PWR","WINCH","URG","IO","STOP","TSTP","CONT","TTIN","TTOU","VTALRM","PROF","XCPU","XFSZ","WAITING","LWP","FREEZE","THAW","CANCEL","RTMIN","NUM38","NUM39","NUM40","NUM41","NUM42","NUM43","RTMAX","IOT","CLD","POLL",0 /**/
+/*#define SIG_NUM 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,6,18,22,0 /**/
+
+#define SIG_NAME "ZERO","ABRT","FPE","ILL","INT","SEGV","TERM","USR1","USR2","IO","POLL","HUP","URG","ALRM","KILL","PIPE","QUIT","CHLD","CONT","STOP","TSTP","TTIN","TTOU","BUS","RT1","RT2","RT3","RT4","RT5","RT6","RT7","RT8",0
+#define SIG_NUM 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,0
+
+/* VOIDFLAGS:
+ * This symbol indicates how much support of the void type is given by this
+ * compiler. What various bits mean:
+ *
+ * 1 = supports declaration of void
+ * 2 = supports arrays of pointers to functions returning void
+ * 4 = supports comparisons between pointers to void functions and
+ * addresses of void functions
+ * 8 = suports declaration of generic void pointers
+ *
+ * The package designer should define VOIDUSED to indicate the requirements
+ * of the package. This can be done either by #defining VOIDUSED before
+ * including config.h, or by defining defvoidused in Myinit.U. If the
+ * latter approach is taken, only those flags will be tested. If the
+ * level of void support necessary is not present, defines void to int.
+ */
+#ifndef VOIDUSED
+#define VOIDUSED 15
+#endif
+#define VOIDFLAGS 15
+#if (VOIDFLAGS & VOIDUSED) != VOIDUSED
+#define void int /* is void to be avoided? */
+#define M_VOID /* Xenix strikes again */
+#endif
+
+/* ARCHLIB:
+ * This variable, if defined, holds the name of the directory in
+ * which the user wants to put architecture-dependent public
+ * library files for perl5. It is most often a local directory
+ * such as /usr/local/lib. Programs using this variable must be
+ * prepared to deal with filename expansion. If ARCHLIB is the
+ * same as PRIVLIB, it is not defined, since presumably the
+ * program already searches PRIVLIB.
+ */
+/* ARCHLIB_EXP:
+ * This symbol contains the ~name expanded version of ARCHLIB, to be used
+ * in programs that are not prepared to deal with ~ expansion at run-time.
+ */
+/*#define ARCHLIB "/system/ported/perl/lib/5.005.{68k,860,7100,8000}" /* See build macro */
+/*#define ARCHLIB_EXP "/system/ported/perl/lib/5.005.{68k,860,7100,8000}" /* See build macro */
+
+/* DLSYM_NEEDS_UNDERSCORE:
+ * This symbol, if defined, indicates that we need to prepend an
+ * underscore to the symbol name before calling dlsym(). This only
+ * makes sense if you *have* dlsym, which we will presume is the
+ * case if you're using dl_dlopen.xs.
+ */
+/*#define DLSYM_NEEDS_UNDERSCORE /**/
+
+/* USE_SFIO:
+ * This symbol, if defined, indicates that sfio should
+ * be used.
+ */
+/*#define USE_SFIO /**/
+
+/* USE_DYNAMIC_LOADING:
+ * This symbol, if defined, indicates that dynamic loading of
+ * some sort is available.
+ */
+/*#define USE_DYNAMIC_LOADING /**/
+
+/* DB_Prefix_t:
+ * This symbol contains the type of the prefix structure element
+ * in the <db.h> header file. In older versions of DB, it was
+ * int, while in newer ones it is u_int32_t.
+ */
+/* DB_Hash_t:
+ * This symbol contains the type of the prefix structure element
+ * in the <db.h> header file. In older versions of DB, it was
+ * int, while in newer ones it is size_t.
+ */
+/*#define DB_Hash_t int /**/
+/*#define DB_Prefix_t int /**/
+
+/* PRIVLIB:
+ * This symbol contains the name of the private library for this package.
+ * The library is private in the sense that it needn't be in anyone's
+ * execution path, but it should be accessible by the world. The program
+ * should be prepared to do ~ expansion.
+ */
+/* PRIVLIB_EXP:
+ * This symbol contains the ~name expanded version of PRIVLIB, to be used
+ * in programs that are not prepared to deal with ~ expansion at run-time.
+ */
+#define PRIVLIB "/system/ported/perl/lib/5.005" /**/
+#define PRIVLIB_EXP "/system/ported/perl/lib/5.005" /**/
+
+/* SELECT_MIN_BITS:
+ * This symbol holds the minimum number of bits operated by select.
+ * That is, if you do select(n, ...), how many bits at least will be
+ * cleared in the masks if some activity is detected. Usually this
+ * is either n or 32*ceil(n/32), especially many little-endians do
+ * the latter. This is only useful if you have select(), naturally.
+ */
+#define SELECT_MIN_BITS 1 /**/
+
+/* SITEARCH:
+ * This symbol contains the name of the private library for this package.
+ * The library is private in the sense that it needn't be in anyone's
+ * execution path, but it should be accessible by the world. The program
+ * should be prepared to do ~ expansion.
+ * The standard distribution will put nothing in this directory.
+ * Individual sites may place their own extensions and modules in
+ * this directory.
+ */
+/* SITEARCH_EXP:
+ * This symbol contains the ~name expanded version of SITEARCH, to be used
+ * in programs that are not prepared to deal with ~ expansion at run-time.
+ */
+/*#define SITEARCH "/system/ported/perl/lib/site/5.005.{68k,860,7100,8000}" /* See build macro */
+/*#define SITEARCH_EXP "/system/ported/perl/lib/site/5.005.{68k,860,7100,8000}" /* See build macro */
+
+/* SITELIB:
+ * This symbol contains the name of the private library for this package.
+ * The library is private in the sense that it needn't be in anyone's
+ * execution path, but it should be accessible by the world. The program
+ * should be prepared to do ~ expansion.
+ * The standard distribution will put nothing in this directory.
+ * Individual sites may place their own extensions and modules in
+ * this directory.
+ */
+/* SITELIB_EXP:
+ * This symbol contains the ~name expanded version of SITELIB, to be used
+ * in programs that are not prepared to deal with ~ expansion at run-time.
+ */
+#define SITELIB "/system/ported/perl/lib/site/5.005" /**/
+#define SITELIB_EXP "/system/ported/perl/lib/site/5.005" /**/
+
+/* STARTPERL:
+ * This variable contains the string to put in front of a perl
+ * script to make sure (one hopes) that it runs with perl and not
+ * some shell.
+ */
+#define STARTPERL "!perl.pm" /**/
+
+/* USE_PERLIO:
+ * This symbol, if defined, indicates that the PerlIO abstraction should
+ * be used throughout. If not defined, stdio should be
+ * used in a fully backward compatible manner.
+ */
+/*#define USE_PERLIO / **/
+
+/* HAS_GETHOST_PROTOS:
+ * This symbol, if defined, indicates that <netdb.h> includes
+ * prototypes for gethostent(), gethostbyname(), and
+ * gethostbyaddr(). Otherwise, it is up to the program to guess
+ * them. See netdbtype.U for probing for various Netdb_xxx_t types.
+ */
+#define HAS_GETHOST_PROTOS /**/
+
+/* HAS_GETNET_PROTOS:
+ * This symbol, if defined, indicates that <netdb.h> includes
+ * prototypes for getnetent(), getnetbyname(), and
+ * getnetbyaddr(). Otherwise, it is up to the program to guess
+ * them. See netdbtype.U for probing for various Netdb_xxx_t types.
+ */
+#define HAS_GETNET_PROTOS /**/
+
+/* HAS_GETPROTO_PROTOS:
+ * This symbol, if defined, indicates that <netdb.h> includes
+ * prototypes for getprotoent(), getprotobyname(), and
+ * getprotobyaddr(). Otherwise, it is up to the program to guess
+ * them. See netdbtype.U for probing for various Netdb_xxx_t types.
+ */
+#define HAS_GETPROTO_PROTOS /**/
+
+/* HAS_GETSERV_PROTOS:
+ * This symbol, if defined, indicates that <netdb.h> includes
+ * prototypes for getservent(), getservbyname(), and
+ * getservbyaddr(). Otherwise, it is up to the program to guess
+ * them. See netdbtype.U for probing for various Netdb_xxx_t types.
+ */
+#define HAS_GETSERV_PROTOS /**/
+
+/* Netdb_host_t:
+ * This symbol holds the type used for the 1st argument
+ * to gethostbyaddr().
+ */
+/* Netdb_hlen_t:
+ * This symbol holds the type used for the 2nd argument
+ * to gethostbyaddr().
+ */
+/* Netdb_name_t:
+ * This symbol holds the type used for the argument to
+ * gethostbyname().
+ */
+/* Netdb_net_t:
+ * This symbol holds the type used for the 1st argument to
+ * getnetbyaddr().
+ */
+#define Netdb_host_t char * /**/
+#define Netdb_hlen_t int /**/
+#define Netdb_name_t char * /**/
+#define Netdb_net_t long /**/
+
+/* Select_fd_set_t:
+ * This symbol holds the type used for the 2nd, 3rd, and 4th
+ * arguments to select. Usually, this is 'fd_set *', if HAS_FD_SET
+ * is defined, and 'int *' otherwise. This is only useful if you
+ * have select(), of course.
+ */
+#define Select_fd_set_t fd_set * /**/
+
+/* ARCHNAME:
+ * This symbol holds a string representing the architecture name.
+ * It may be used to construct an architecture-dependant pathname
+ * where library files may be held under a private library, for
+ * instance.
+ */
+#define ARCHNAME "vos" /**/
+
+/* I_MACH_CTHREADS:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <mach/cthreads.h>.
+ */
+/*#define I_MACH_CTHREADS /**/
+
+/* I_PTHREAD:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <pthread.h>.
+ */
+/*#define I_PTHREAD /**/
+
+/* HAS_PTHREAD_YIELD:
+ * This symbol, if defined, indicates that the pthread_yield
+ * routine is available to yield the execution of the current
+ * thread.
+ */
+/* HAS_SCHED_YIELD:
+ * This symbol, if defined, indicates that the sched_yield
+ * routine is available to yield the execution of the current
+ * thread.
+ */
+/*#define HAS_PTHREAD_YIELD /**/
+/*#define HAS_SCHED_YIELD /**/
+
+/* PTHREADS_CREATED_JOINABLE:
+ * This symbol, if defined, indicates that pthreads are created
+ * in the joinable (aka undetached) state.
+ */
+/*#define PTHREADS_CREATED_JOINABLE /**/
+
+/* USE_THREADS:
+ * This symbol, if defined, indicates that Perl should
+ * be built to use threads.
+ */
+/* OLD_PTHREADS_API:
+ * This symbol, if defined, indicates that Perl should
+ * be built to use the old draft POSIX threads API.
+ */
+/*#define USE_THREADS /**/
+/*#define OLD_PTHREADS_API /**/
+
+/* Time_t:
+ * This symbol holds the type returned by time(). It can be long,
+ * or time_t on BSD sites (in which case <sys/types.h> should be
+ * included).
+ */
+#define Time_t time_t /* Time type */
+
+/* HAS_TIMES:
+ * This symbol, if defined, indicates that the times() routine exists.
+ * Note that this became obsolete on some systems (SUNOS), which now
+ * use getrusage(). It may be necessary to include <sys/times.h>.
+ */
+#define HAS_TIMES /**/
+
+/* Fpos_t:
+ * This symbol holds the type used to declare file positions in libc.
+ * It can be fpos_t, long, uint, etc... It may be necessary to include
+ * <sys/types.h> to get any typedef'ed information.
+ */
+#define Fpos_t fpos_t /* File position type */
+
+/* Gid_t:
+ * This symbol holds the return type of getgid() and the type of
+ * argument to setrgid() and related functions. Typically,
+ * it is the type of group ids in the kernel. It can be int, ushort,
+ * uid_t, etc... It may be necessary to include <sys/types.h> to get
+ * any typedef'ed information.
+ */
+#define Gid_t gid_t /* Type for getgid(), etc... */
+
+/* Off_t:
+ * This symbol holds the type used to declare offsets in the kernel.
+ * It can be int, long, off_t, etc... It may be necessary to include
+ * <sys/types.h> to get any typedef'ed information.
+ */
+#define Off_t off_t /* <offset> type */
+
+/* Mode_t:
+ * This symbol holds the type used to declare file modes
+ * for systems calls. It is usually mode_t, but may be
+ * int or unsigned short. It may be necessary to include <sys/types.h>
+ * to get any typedef'ed information.
+ */
+#define Mode_t mode_t /* file mode parameter for system calls */
+
+/* Pid_t:
+ * This symbol holds the type used to declare process ids in the kernel.
+ * It can be int, uint, pid_t, etc... It may be necessary to include
+ * <sys/types.h> to get any typedef'ed information.
+ */
+#define Pid_t pid_t /* PID type */
+
+/* Size_t:
+ * This symbol holds the type used to declare length parameters
+ * for string functions. It is usually size_t, but may be
+ * unsigned long, int, etc. It may be necessary to include
+ * <sys/types.h> to get any typedef'ed information.
+ */
+#define Size_t size_t /* length paramater for string functions */
+
+/* Uid_t:
+ * This symbol holds the type used to declare user ids in the kernel.
+ * It can be int, ushort, uid_t, etc... It may be necessary to include
+ * <sys/types.h> to get any typedef'ed information.
+ */
+#define Uid_t uid_t /* UID type */
+
+/* _POSIX_C_SOURCE:
+ * VOS must have this symbol defined before we include any of the
+ * standard headers (e.g., sys/types.h).
+ */
+#ifndef _POSIX_C_SOURCE
+#define _POSIX_C_SOURCE 199309L
+#endif
+
+#endif
diff --git a/gnu/usr.bin/perl/vos/config_h.SH_orig b/gnu/usr.bin/perl/vos/config_h.SH_orig
new file mode 100644
index 00000000000..1b9120a2651
--- /dev/null
+++ b/gnu/usr.bin/perl/vos/config_h.SH_orig
@@ -0,0 +1,2187 @@
+case $CONFIG in
+'')
+ if test -f config.sh; then TOP=.;
+ elif test -f ../config.sh; then TOP=..;
+ elif test -f ../../config.sh; then TOP=../..;
+ elif test -f ../../../config.sh; then TOP=../../..;
+ elif test -f ../../../../config.sh; then TOP=../../../..;
+ else
+ echo "Can't find config.sh."; exit 1
+ fi
+ . $TOP/config.sh
+ ;;
+esac
+case "$0" in
+*/*) cd `expr X$0 : 'X\(.*\)/'` ;;
+esac
+echo "Extracting config.h (with variable substitutions)"
+sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-def!#undef!'
+/*
+ * This file was produced by running the config_h.SH script, which
+ * gets its values from config.sh, which is generally produced by
+ * running Configure.
+ *
+ * Feel free to modify any of this as the need arises. Note, however,
+ * that running config_h.SH again will wipe out any changes you've made.
+ * For a more permanent change edit config.sh and rerun config_h.SH.
+ *
+ * \$Id: config_h.SH_orig,v 1.1 1999/04/29 22:42:10 millert Exp $
+ */
+
+/*
+ * Package name : $package
+ * Source directory : $src
+ * Configuration time: $cf_time
+ * Configured by : $cf_by
+ * Target system : $myuname
+ */
+
+#ifndef _config_h_
+#define _config_h_
+
+/* LOC_SED:
+ * This symbol holds the complete pathname to the sed program.
+ */
+#define LOC_SED "$full_sed" /**/
+
+/* BIN:
+ * This symbol holds the path of the bin directory where the package will
+ * be installed. Program must be prepared to deal with ~name substitution.
+ */
+/* BIN_EXP:
+ * This symbol is the filename expanded version of the BIN symbol, for
+ * programs that do not want to deal with that at run-time.
+ */
+#define BIN "$bin" /**/
+#define BIN_EXP "$binexp" /**/
+
+/* CPPSTDIN:
+ * This symbol contains the first part of the string which will invoke
+ * the C preprocessor on the standard input and produce to standard
+ * output. Typical value of "cc -E" or "/lib/cpp", but it can also
+ * call a wrapper. See CPPRUN.
+ */
+/* CPPMINUS:
+ * This symbol contains the second part of the string which will invoke
+ * the C preprocessor on the standard input and produce to standard
+ * output. This symbol will have the value "-" if CPPSTDIN needs a minus
+ * to specify standard input, otherwise the value is "".
+ */
+#define CPPSTDIN "$cppstdin"
+#define CPPMINUS "$cppminus"
+
+/* HAS_ALARM:
+ * This symbol, if defined, indicates that the alarm routine is
+ * available.
+ */
+#$d_alarm HAS_ALARM /**/
+
+/* HASATTRIBUTE:
+ * This symbol indicates the C compiler can check for function attributes,
+ * such as printf formats. This is normally only supported by GNU cc.
+ */
+#$d_attribut HASATTRIBUTE /**/
+#ifndef HASATTRIBUTE
+#define __attribute__(_arg_)
+#endif
+
+/* HAS_BCMP:
+ * This symbol is defined if the bcmp() routine is available to
+ * compare blocks of memory.
+ */
+#$d_bcmp HAS_BCMP /**/
+
+/* HAS_BCOPY:
+ * This symbol is defined if the bcopy() routine is available to
+ * copy blocks of memory.
+ */
+#$d_bcopy HAS_BCOPY /**/
+
+/* HAS_BZERO:
+ * This symbol is defined if the bzero() routine is available to
+ * set a memory block to 0.
+ */
+#$d_bzero HAS_BZERO /**/
+
+/* HAS_CHOWN:
+ * This symbol, if defined, indicates that the chown routine is
+ * available.
+ */
+#$d_chown HAS_CHOWN /**/
+
+/* HAS_CHROOT:
+ * This symbol, if defined, indicates that the chroot routine is
+ * available.
+ */
+#$d_chroot HAS_CHROOT /**/
+
+/* HAS_CHSIZE:
+ * This symbol, if defined, indicates that the chsize routine is available
+ * to truncate files. You might need a -lx to get this routine.
+ */
+#$d_chsize HAS_CHSIZE /**/
+
+/* HASCONST:
+ * This symbol, if defined, indicates that this C compiler knows about
+ * the const type. There is no need to actually test for that symbol
+ * within your programs. The mere use of the "const" keyword will
+ * trigger the necessary tests.
+ */
+#$d_const HASCONST /**/
+#ifndef HASCONST
+#define const
+#endif
+
+/* HAS_CRYPT:
+ * This symbol, if defined, indicates that the crypt routine is available
+ * to encrypt passwords and the like.
+ */
+#$d_crypt HAS_CRYPT /**/
+
+/* HAS_CUSERID:
+ * This symbol, if defined, indicates that the cuserid routine is
+ * available to get character login names.
+ */
+#$d_cuserid HAS_CUSERID /**/
+
+/* HAS_DBL_DIG:
+ * This symbol, if defined, indicates that this system's <float.h>
+ * or <limits.h> defines the symbol DBL_DIG, which is the number
+ * of significant digits in a double precision number. If this
+ * symbol is not defined, a guess of 15 is usually pretty good.
+ */
+#$d_dbl_dig HAS_DBL_DIG /* */
+
+/* HAS_DIFFTIME:
+ * This symbol, if defined, indicates that the difftime routine is
+ * available.
+ */
+#$d_difftime HAS_DIFFTIME /**/
+
+/* HAS_DLERROR:
+ * This symbol, if defined, indicates that the dlerror routine is
+ * available to return a string describing the last error that
+ * occurred from a call to dlopen(), dlclose() or dlsym().
+ */
+#$d_dlerror HAS_DLERROR /**/
+
+/* SETUID_SCRIPTS_ARE_SECURE_NOW:
+ * This symbol, if defined, indicates that the bug that prevents
+ * setuid scripts from being secure is not present in this kernel.
+ */
+/* DOSUID:
+ * This symbol, if defined, indicates that the C program should
+ * check the script that it is executing for setuid/setgid bits, and
+ * attempt to emulate setuid/setgid on systems that have disabled
+ * setuid #! scripts because the kernel can't do it securely.
+ * It is up to the package designer to make sure that this emulation
+ * is done securely. Among other things, it should do an fstat on
+ * the script it just opened to make sure it really is a setuid/setgid
+ * script, it should make sure the arguments passed correspond exactly
+ * to the argument on the #! line, and it should not trust any
+ * subprocesses to which it must pass the filename rather than the
+ * file descriptor of the script to be executed.
+ */
+#$d_suidsafe SETUID_SCRIPTS_ARE_SECURE_NOW /**/
+#$d_dosuid DOSUID /**/
+
+/* HAS_DUP2:
+ * This symbol, if defined, indicates that the dup2 routine is
+ * available to duplicate file descriptors.
+ */
+#$d_dup2 HAS_DUP2 /**/
+
+/* HAS_FCHMOD:
+ * This symbol, if defined, indicates that the fchmod routine is available
+ * to change mode of opened files. If unavailable, use chmod().
+ */
+#$d_fchmod HAS_FCHMOD /**/
+
+/* HAS_FCHOWN:
+ * This symbol, if defined, indicates that the fchown routine is available
+ * to change ownership of opened files. If unavailable, use chown().
+ */
+#$d_fchown HAS_FCHOWN /**/
+
+/* HAS_FCNTL:
+ * This symbol, if defined, indicates to the C program that
+ * the fcntl() function exists.
+ */
+#$d_fcntl HAS_FCNTL /**/
+
+/* HAS_FGETPOS:
+ * This symbol, if defined, indicates that the fgetpos routine is
+ * available to get the file position indicator, similar to ftell().
+ */
+#$d_fgetpos HAS_FGETPOS /**/
+
+/* FLEXFILENAMES:
+ * This symbol, if defined, indicates that the system supports filenames
+ * longer than 14 characters.
+ */
+#$d_flexfnam FLEXFILENAMES /**/
+
+/* HAS_FLOCK:
+ * This symbol, if defined, indicates that the flock routine is
+ * available to do file locking.
+ */
+#$d_flock HAS_FLOCK /**/
+
+/* HAS_FORK:
+ * This symbol, if defined, indicates that the fork routine is
+ * available.
+ */
+#$d_fork HAS_FORK /**/
+
+/* HAS_FSETPOS:
+ * This symbol, if defined, indicates that the fsetpos routine is
+ * available to set the file position indicator, similar to fseek().
+ */
+#$d_fsetpos HAS_FSETPOS /**/
+
+/* I_SYS_MOUNT:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/mount.h>.
+ */
+#$i_sysmount I_SYS_MOUNT /**/
+
+/* HAS_FSTATFS:
+ * This symbol, if defined, indicates that the fstatfs routine is
+ * available to stat the filesystem of a file descriptor.
+ */
+#$d_fstatfs HAS_FSTATFS /**/
+
+/* HAS_STRUCT_STATFS_FLAGS:
+ * This symbol, if defined, indicates that the struct statfs has
+ * the f_flags member for mount flags.
+ */
+#$d_statfsflags HAS_STRUCT_STATFS_FLAGS /**/
+
+/* I_SYS_STATVFS:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/statvfs.h>.
+ */
+#$i_sysstatvfs I_SYS_STATVFS /**/
+
+/* HAS_FSTATVFS:
+ * This symbol, if defined, indicates that the fstatvfs routine is
+ * available to stat the filesystem of a file descriptor.
+ */
+#$d_fstatvfs HAS_FSTATVFS /**/
+
+/* I_MNTENT:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <mntent.h>.
+ */
+#$i_mntent I_MNTENT /**/
+
+/* HAS_GETMNTENT:
+ * This symbol, if defined, indicates that the getmntent routine is
+ * available to lookup mount entries in some data base or other.
+ */
+#$d_getmntent HAS_GETMNTENT /**/
+
+/* HAS_HASMNTOPT:
+ * This symbol, if defined, indicates that the hasmntopt routine is
+ * available to query mount entries returned by getmntent.
+ */
+#$d_hasmntopt HAS_HASMNTOPT /**/
+
+/* HAS_GETTIMEOFDAY:
+ * This symbol, if defined, indicates that the gettimeofday() system
+ * call is available for a sub-second accuracy clock. Usually, the file
+ * <sys/resource.h> needs to be included (see I_SYS_RESOURCE).
+ * The type "Timeval" should be used to refer to "struct timeval".
+ */
+#$d_gettimeod HAS_GETTIMEOFDAY /**/
+#ifdef HAS_GETTIMEOFDAY
+#define Timeval struct timeval /* Structure used by gettimeofday() */
+#endif
+
+/* HAS_GETGROUPS:
+ * This symbol, if defined, indicates that the getgroups() routine is
+ * available to get the list of process groups. If unavailable, multiple
+ * groups are probably not supported.
+ */
+#$d_getgrps HAS_GETGROUPS /**/
+
+/* HAS_UNAME:
+ * This symbol, if defined, indicates that the C program may use the
+ * uname() routine to derive the host name. See also HAS_GETHOSTNAME
+ * and PHOSTNAME.
+ */
+#$d_uname HAS_UNAME /**/
+
+/* HAS_GETLOGIN:
+ * This symbol, if defined, indicates that the getlogin routine is
+ * available to get the login name.
+ */
+#$d_getlogin HAS_GETLOGIN /**/
+
+/* HAS_GETPGID:
+ * This symbol, if defined, indicates to the C program that
+ * the getpgid(pid) function is available to get the
+ * process group id.
+ */
+#$d_getpgid HAS_GETPGID /**/
+
+/* HAS_GETPGRP:
+ * This symbol, if defined, indicates that the getpgrp routine is
+ * available to get the current process group.
+ */
+/* USE_BSD_GETPGRP:
+ * This symbol, if defined, indicates that getpgrp needs one
+ * arguments whereas USG one needs none.
+ */
+#$d_getpgrp HAS_GETPGRP /**/
+#$d_bsdgetpgrp USE_BSD_GETPGRP /**/
+
+/* HAS_GETPGRP2:
+ * This symbol, if defined, indicates that the getpgrp2() (as in DG/UX)
+ * routine is available to get the current process group.
+ */
+#$d_getpgrp2 HAS_GETPGRP2 /**/
+
+/* HAS_GETPPID:
+ * This symbol, if defined, indicates that the getppid routine is
+ * available to get the parent process ID.
+ */
+#$d_getppid HAS_GETPPID /**/
+
+/* HAS_GETPRIORITY:
+ * This symbol, if defined, indicates that the getpriority routine is
+ * available to get a process's priority.
+ */
+#$d_getprior HAS_GETPRIORITY /**/
+
+/* HAS_HTONL:
+ * This symbol, if defined, indicates that the htonl() routine (and
+ * friends htons() ntohl() ntohs()) are available to do network
+ * order byte swapping.
+ */
+/* HAS_HTONS:
+ * This symbol, if defined, indicates that the htons() routine (and
+ * friends htonl() ntohl() ntohs()) are available to do network
+ * order byte swapping.
+ */
+/* HAS_NTOHL:
+ * This symbol, if defined, indicates that the ntohl() routine (and
+ * friends htonl() htons() ntohs()) are available to do network
+ * order byte swapping.
+ */
+/* HAS_NTOHS:
+ * This symbol, if defined, indicates that the ntohs() routine (and
+ * friends htonl() htons() ntohl()) are available to do network
+ * order byte swapping.
+ */
+#$d_htonl HAS_HTONL /**/
+#$d_htonl HAS_HTONS /**/
+#$d_htonl HAS_NTOHL /**/
+#$d_htonl HAS_NTOHS /**/
+
+/* HAS_INET_ATON:
+ * This symbol, if defined, indicates to the C program that the
+ * inet_aton() function is available to parse IP address "dotted-quad"
+ * strings.
+ */
+#$d_inetaton HAS_INET_ATON /**/
+
+/* HAS_KILLPG:
+ * This symbol, if defined, indicates that the killpg routine is available
+ * to kill process groups. If unavailable, you probably should use kill
+ * with a negative process number.
+ */
+#$d_killpg HAS_KILLPG /**/
+
+/* HAS_LINK:
+ * This symbol, if defined, indicates that the link routine is
+ * available to create hard links.
+ */
+#$d_link HAS_LINK /**/
+
+/* HAS_LOCALECONV:
+ * This symbol, if defined, indicates that the localeconv routine is
+ * available for numeric and monetary formatting conventions.
+ */
+#$d_locconv HAS_LOCALECONV /**/
+
+/* HAS_LOCKF:
+ * This symbol, if defined, indicates that the lockf routine is
+ * available to do file locking.
+ */
+#$d_lockf HAS_LOCKF /**/
+
+/* HAS_LSTAT:
+ * This symbol, if defined, indicates that the lstat routine is
+ * available to do file stats on symbolic links.
+ */
+#$d_lstat HAS_LSTAT /**/
+
+/* HAS_MBLEN:
+ * This symbol, if defined, indicates that the mblen routine is available
+ * to find the number of bytes in a multibye character.
+ */
+#$d_mblen HAS_MBLEN /**/
+
+/* HAS_MBSTOWCS:
+ * This symbol, if defined, indicates that the mbstowcs routine is
+ * available to covert a multibyte string into a wide character string.
+ */
+#$d_mbstowcs HAS_MBSTOWCS /**/
+
+/* HAS_MBTOWC:
+ * This symbol, if defined, indicates that the mbtowc routine is available
+ * to covert a multibyte to a wide character.
+ */
+#$d_mbtowc HAS_MBTOWC /**/
+
+/* HAS_MEMCMP:
+ * This symbol, if defined, indicates that the memcmp routine is available
+ * to compare blocks of memory.
+ */
+#$d_memcmp HAS_MEMCMP /**/
+
+/* HAS_MEMCPY:
+ * This symbol, if defined, indicates that the memcpy routine is available
+ * to copy blocks of memory.
+ */
+#$d_memcpy HAS_MEMCPY /**/
+
+/* HAS_MEMMOVE:
+ * This symbol, if defined, indicates that the memmove routine is available
+ * to copy potentially overlapping blocks of memory. This should be used
+ * only when HAS_SAFE_BCOPY is not defined. If neither is there, roll your
+ * own version.
+ */
+#$d_memmove HAS_MEMMOVE /**/
+
+/* HAS_MEMSET:
+ * This symbol, if defined, indicates that the memset routine is available
+ * to set blocks of memory.
+ */
+#$d_memset HAS_MEMSET /**/
+
+/* HAS_MKDIR:
+ * This symbol, if defined, indicates that the mkdir routine is available
+ * to create directories. Otherwise you should fork off a new process to
+ * exec /bin/mkdir.
+ */
+#$d_mkdir HAS_MKDIR /**/
+
+/* HAS_MKFIFO:
+ * This symbol, if defined, indicates that the mkfifo routine is
+ * available to create FIFOs. Otherwise, mknod should be able to
+ * do it for you. However, if mkfifo is there, mknod might require
+ * super-user privileges which mkfifo will not.
+ */
+#$d_mkfifo HAS_MKFIFO /**/
+
+/* HAS_MKTIME:
+ * This symbol, if defined, indicates that the mktime routine is
+ * available.
+ */
+#$d_mktime HAS_MKTIME /**/
+
+/* HAS_MSG:
+ * This symbol, if defined, indicates that the entire msg*(2) library is
+ * supported (IPC mechanism based on message queues).
+ */
+#$d_msg HAS_MSG /**/
+
+/* HAS_NICE:
+ * This symbol, if defined, indicates that the nice routine is
+ * available.
+ */
+#$d_nice HAS_NICE /**/
+
+/* HAS_PATHCONF:
+ * This symbol, if defined, indicates that pathconf() is available
+ * to determine file-system related limits and options associated
+ * with a given filename.
+ */
+/* HAS_FPATHCONF:
+ * This symbol, if defined, indicates that pathconf() is available
+ * to determine file-system related limits and options associated
+ * with a given open file descriptor.
+ */
+#$d_pathconf HAS_PATHCONF /**/
+#$d_fpathconf HAS_FPATHCONF /**/
+
+/* HAS_PAUSE:
+ * This symbol, if defined, indicates that the pause routine is
+ * available to suspend a process until a signal is received.
+ */
+#$d_pause HAS_PAUSE /**/
+
+/* HAS_PIPE:
+ * This symbol, if defined, indicates that the pipe routine is
+ * available to create an inter-process channel.
+ */
+#$d_pipe HAS_PIPE /**/
+
+/* HAS_POLL:
+ * This symbol, if defined, indicates that the poll routine is
+ * available to poll active file descriptors. You may safely
+ * include <poll.h> when this symbol is defined.
+ */
+#$d_poll HAS_POLL /**/
+
+/* HAS_READDIR:
+ * This symbol, if defined, indicates that the readdir routine is
+ * available to read directory entries. You may have to include
+ * <dirent.h>. See I_DIRENT.
+ */
+#$d_readdir HAS_READDIR /**/
+
+/* HAS_SEEKDIR:
+ * This symbol, if defined, indicates that the seekdir routine is
+ * available. You may have to include <dirent.h>. See I_DIRENT.
+ */
+#$d_seekdir HAS_SEEKDIR /**/
+
+/* HAS_TELLDIR:
+ * This symbol, if defined, indicates that the telldir routine is
+ * available. You may have to include <dirent.h>. See I_DIRENT.
+ */
+#$d_telldir HAS_TELLDIR /**/
+
+/* HAS_REWINDDIR:
+ * This symbol, if defined, indicates that the rewinddir routine is
+ * available. You may have to include <dirent.h>. See I_DIRENT.
+ */
+#$d_rewinddir HAS_REWINDDIR /**/
+
+/* HAS_READLINK:
+ * This symbol, if defined, indicates that the readlink routine is
+ * available to read the value of a symbolic link.
+ */
+#$d_readlink HAS_READLINK /**/
+
+/* HAS_RENAME:
+ * This symbol, if defined, indicates that the rename routine is available
+ * to rename files. Otherwise you should do the unlink(), link(), unlink()
+ * trick.
+ */
+#$d_rename HAS_RENAME /**/
+
+/* HAS_RMDIR:
+ * This symbol, if defined, indicates that the rmdir routine is
+ * available to remove directories. Otherwise you should fork off a
+ * new process to exec /bin/rmdir.
+ */
+#$d_rmdir HAS_RMDIR /**/
+
+/* HAS_SELECT:
+ * This symbol, if defined, indicates that the select routine is
+ * available to select active file descriptors. If the timeout field
+ * is used, <sys/time.h> may need to be included.
+ */
+#$d_select HAS_SELECT /**/
+
+/* HAS_SEM:
+ * This symbol, if defined, indicates that the entire sem*(2) library is
+ * supported.
+ */
+#$d_sem HAS_SEM /**/
+
+/* HAS_SETEGID:
+ * This symbol, if defined, indicates that the setegid routine is available
+ * to change the effective gid of the current program.
+ */
+#$d_setegid HAS_SETEGID /**/
+
+/* HAS_SETEUID:
+ * This symbol, if defined, indicates that the seteuid routine is available
+ * to change the effective uid of the current program.
+ */
+#$d_seteuid HAS_SETEUID /**/
+
+/* HAS_SETLINEBUF:
+ * This symbol, if defined, indicates that the setlinebuf routine is
+ * available to change stderr or stdout from block-buffered or unbuffered
+ * to a line-buffered mode.
+ */
+#$d_setlinebuf HAS_SETLINEBUF /**/
+
+/* HAS_SETLOCALE:
+ * This symbol, if defined, indicates that the setlocale routine is
+ * available to handle locale-specific ctype implementations.
+ */
+#$d_setlocale HAS_SETLOCALE /**/
+
+/* HAS_SETPGID:
+ * This symbol, if defined, indicates that the setpgid(pid, gpid)
+ * routine is available to set process group ID.
+ */
+#$d_setpgid HAS_SETPGID /**/
+
+/* HAS_SETPGRP:
+ * This symbol, if defined, indicates that the setpgrp routine is
+ * available to set the current process group.
+ */
+/* USE_BSD_SETPGRP:
+ * This symbol, if defined, indicates that setpgrp needs two
+ * arguments whereas USG one needs none. See also HAS_SETPGID
+ * for a POSIX interface.
+ */
+#$d_setpgrp HAS_SETPGRP /**/
+#$d_bsdsetpgrp USE_BSD_SETPGRP /**/
+
+/* HAS_SETPGRP2:
+ * This symbol, if defined, indicates that the setpgrp2() (as in DG/UX)
+ * routine is available to set the current process group.
+ */
+#$d_setpgrp2 HAS_SETPGRP2 /**/
+
+/* HAS_SETPRIORITY:
+ * This symbol, if defined, indicates that the setpriority routine is
+ * available to set a process's priority.
+ */
+#$d_setprior HAS_SETPRIORITY /**/
+
+/* HAS_SETREGID:
+ * This symbol, if defined, indicates that the setregid routine is
+ * available to change the real and effective gid of the current
+ * process.
+ */
+/* HAS_SETRESGID:
+ * This symbol, if defined, indicates that the setresgid routine is
+ * available to change the real, effective and saved gid of the current
+ * process.
+ */
+#$d_setregid HAS_SETREGID /**/
+#$d_setresgid HAS_SETRESGID /**/
+
+/* HAS_SETREUID:
+ * This symbol, if defined, indicates that the setreuid routine is
+ * available to change the real and effective uid of the current
+ * process.
+ */
+/* HAS_SETRESUID:
+ * This symbol, if defined, indicates that the setresuid routine is
+ * available to change the real, effective and saved uid of the current
+ * process.
+ */
+#$d_setreuid HAS_SETREUID /**/
+#$d_setresuid HAS_SETRESUID /**/
+
+/* HAS_SETRGID:
+ * This symbol, if defined, indicates that the setrgid routine is available
+ * to change the real gid of the current program.
+ */
+#$d_setrgid HAS_SETRGID /**/
+
+/* HAS_SETRUID:
+ * This symbol, if defined, indicates that the setruid routine is available
+ * to change the real uid of the current program.
+ */
+#$d_setruid HAS_SETRUID /**/
+
+/* HAS_SETSID:
+ * This symbol, if defined, indicates that the setsid routine is
+ * available to set the process group ID.
+ */
+#$d_setsid HAS_SETSID /**/
+
+/* HAS_SHM:
+ * This symbol, if defined, indicates that the entire shm*(2) library is
+ * supported.
+ */
+#$d_shm HAS_SHM /**/
+
+/* Shmat_t:
+ * This symbol holds the return type of the shmat() system call.
+ * Usually set to 'void *' or 'char *'.
+ */
+/* HAS_SHMAT_PROTOTYPE:
+ * This symbol, if defined, indicates that the sys/shm.h includes
+ * a prototype for shmat(). Otherwise, it is up to the program to
+ * guess one. Shmat_t shmat _((int, Shmat_t, int)) is a good guess,
+ * but not always right so it should be emitted by the program only
+ * when HAS_SHMAT_PROTOTYPE is not defined to avoid conflicting defs.
+ */
+#define Shmat_t $shmattype /**/
+#$d_shmatprototype HAS_SHMAT_PROTOTYPE /**/
+
+/* USE_STAT_BLOCKS:
+ * This symbol is defined if this system has a stat structure declaring
+ * st_blksize and st_blocks.
+ */
+#$d_statblks USE_STAT_BLOCKS /**/
+
+/* HAS_STRCHR:
+ * This symbol is defined to indicate that the strchr()/strrchr()
+ * functions are available for string searching. If not, try the
+ * index()/rindex() pair.
+ */
+/* HAS_INDEX:
+ * This symbol is defined to indicate that the index()/rindex()
+ * functions are available for string searching.
+ */
+#$d_strchr HAS_STRCHR /**/
+#$d_index HAS_INDEX /**/
+
+/* HAS_STRCOLL:
+ * This symbol, if defined, indicates that the strcoll routine is
+ * available to compare strings using collating information.
+ */
+#$d_strcoll HAS_STRCOLL /**/
+
+/* USE_STRUCT_COPY:
+ * This symbol, if defined, indicates that this C compiler knows how
+ * to copy structures. If undefined, you'll need to use a block copy
+ * routine of some sort instead.
+ */
+#$d_strctcpy USE_STRUCT_COPY /**/
+
+/* HAS_STRERROR:
+ * This symbol, if defined, indicates that the strerror routine is
+ * available to translate error numbers to strings. See the writeup
+ * of Strerror() in this file before you try to define your own.
+ */
+/* HAS_SYS_ERRLIST:
+ * This symbol, if defined, indicates that the sys_errlist array is
+ * available to translate error numbers to strings. The extern int
+ * sys_nerr gives the size of that table.
+ */
+/* Strerror:
+ * This preprocessor symbol is defined as a macro if strerror() is
+ * not available to translate error numbers to strings but sys_errlist[]
+ * array is there.
+ */
+#$d_strerror HAS_STRERROR /**/
+#$d_syserrlst HAS_SYS_ERRLIST /**/
+#define Strerror(e) $d_strerrm
+
+/* HAS_STRTOD:
+ * This symbol, if defined, indicates that the strtod routine is
+ * available to provide better numeric string conversion than atof().
+ */
+#$d_strtod HAS_STRTOD /**/
+
+/* HAS_STRTOL:
+ * This symbol, if defined, indicates that the strtol routine is available
+ * to provide better numeric string conversion than atoi() and friends.
+ */
+#$d_strtol HAS_STRTOL /**/
+
+/* HAS_STRTOUL:
+ * This symbol, if defined, indicates that the strtoul routine is
+ * available to provide conversion of strings to unsigned long.
+ */
+#$d_strtoul HAS_STRTOUL /**/
+
+/* HAS_STRXFRM:
+ * This symbol, if defined, indicates that the strxfrm() routine is
+ * available to transform strings.
+ */
+#$d_strxfrm HAS_STRXFRM /**/
+
+/* HAS_SYMLINK:
+ * This symbol, if defined, indicates that the symlink routine is available
+ * to create symbolic links.
+ */
+#$d_symlink HAS_SYMLINK /**/
+
+/* HAS_SYSCALL:
+ * This symbol, if defined, indicates that the syscall routine is
+ * available to call arbitrary system calls. If undefined, that's tough.
+ */
+#$d_syscall HAS_SYSCALL /**/
+
+/* HAS_SYSCONF:
+ * This symbol, if defined, indicates that sysconf() is available
+ * to determine system related limits and options.
+ */
+#$d_sysconf HAS_SYSCONF /**/
+
+/* HAS_SYSTEM:
+ * This symbol, if defined, indicates that the system routine is
+ * available to issue a shell command.
+ */
+#$d_system HAS_SYSTEM /**/
+
+/* HAS_TCGETPGRP:
+ * This symbol, if defined, indicates that the tcgetpgrp routine is
+ * available to get foreground process group ID.
+ */
+#$d_tcgetpgrp HAS_TCGETPGRP /**/
+
+/* HAS_TCSETPGRP:
+ * This symbol, if defined, indicates that the tcsetpgrp routine is
+ * available to set foreground process group ID.
+ */
+#$d_tcsetpgrp HAS_TCSETPGRP /**/
+
+/* HAS_TRUNCATE:
+ * This symbol, if defined, indicates that the truncate routine is
+ * available to truncate files.
+ */
+#$d_truncate HAS_TRUNCATE /**/
+
+/* HAS_TZNAME:
+ * This symbol, if defined, indicates that the tzname[] array is
+ * available to access timezone names.
+ */
+#$d_tzname HAS_TZNAME /**/
+
+/* HAS_UMASK:
+ * This symbol, if defined, indicates that the umask routine is
+ * available to set and get the value of the file creation mask.
+ */
+#$d_umask HAS_UMASK /**/
+
+/* HAS_VFORK:
+ * This symbol, if defined, indicates that vfork() exists.
+ */
+#$d_vfork HAS_VFORK /**/
+
+/* HASVOLATILE:
+ * This symbol, if defined, indicates that this C compiler knows about
+ * the volatile declaration.
+ */
+#$d_volatile HASVOLATILE /**/
+#ifndef HASVOLATILE
+#define volatile
+#endif
+
+/* HAS_WAIT4:
+ * This symbol, if defined, indicates that wait4() exists.
+ */
+#$d_wait4 HAS_WAIT4 /**/
+
+/* HAS_WAITPID:
+ * This symbol, if defined, indicates that the waitpid routine is
+ * available to wait for child process.
+ */
+#$d_waitpid HAS_WAITPID /**/
+
+/* HAS_WCSTOMBS:
+ * This symbol, if defined, indicates that the wcstombs routine is
+ * available to convert wide character strings to multibyte strings.
+ */
+#$d_wcstombs HAS_WCSTOMBS /**/
+
+/* HAS_WCTOMB:
+ * This symbol, if defined, indicates that the wctomb routine is available
+ * to covert a wide character to a multibyte.
+ */
+#$d_wctomb HAS_WCTOMB /**/
+
+/* EBCDIC:
+ * This symbol, if defined, indicates that this system uses
+ * EBCDIC encoding.
+ */
+#$ebcdic EBCDIC /**/
+
+/* I_ARPA_INET:
+ * This symbol, if defined, indicates that <arpa/inet.h> exists and should
+ * be included.
+ */
+#$i_arpainet I_ARPA_INET /**/
+
+/* I_DBM:
+ * This symbol, if defined, indicates that <dbm.h> exists and should
+ * be included.
+ */
+/* I_RPCSVC_DBM:
+ * This symbol, if defined, indicates that <rpcsvc/dbm.h> exists and
+ * should be included.
+ */
+#$i_dbm I_DBM /**/
+#$i_rpcsvcdbm I_RPCSVC_DBM /**/
+
+/* I_DIRENT:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <dirent.h>. Using this symbol also triggers the definition
+ * of the Direntry_t define which ends up being 'struct dirent' or
+ * 'struct direct' depending on the availability of <dirent.h>.
+ */
+/* DIRNAMLEN:
+ * This symbol, if defined, indicates to the C program that the length
+ * of directory entry names is provided by a d_namlen field. Otherwise
+ * you need to do strlen() on the d_name field.
+ */
+/* Direntry_t:
+ * This symbol is set to 'struct direct' or 'struct dirent' depending on
+ * whether dirent is available or not. You should use this pseudo type to
+ * portably declare your directory entries.
+ */
+#$i_dirent I_DIRENT /**/
+#$d_dirnamlen DIRNAMLEN /**/
+#define Direntry_t $direntrytype
+
+/* I_DLFCN:
+ * This symbol, if defined, indicates that <dlfcn.h> exists and should
+ * be included.
+ */
+#$i_dlfcn I_DLFCN /**/
+
+/* I_FCNTL:
+ * This manifest constant tells the C program to include <fcntl.h>.
+ */
+#$i_fcntl I_FCNTL /**/
+
+/* I_FLOAT:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <float.h> to get definition of symbols like DBL_MAX or
+ * DBL_MIN, i.e. machine dependent floating point values.
+ */
+#$i_float I_FLOAT /**/
+
+/* I_GRP:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <grp.h>.
+ */
+/* GRPASSWD:
+ * This symbol, if defined, indicates to the C program that struct group
+ * contains gr_passwd.
+ */
+/* HAS_SETGRENT:
+ * This symbol, if defined, indicates that the getgrent routine is
+ * available for initializing sequential access of the group database.
+ */
+/* HAS_GETGRENT:
+ * This symbol, if defined, indicates that the getgrent routine is
+ * available for sequential access of the group database.
+ */
+/* HAS_ENDGRENT:
+ * This symbol, if defined, indicates that the getgrent routine is
+ * available for finalizing sequential access of the group database.
+ */
+#$i_grp I_GRP /**/
+#$d_grpasswd GRPASSWD /**/
+#$d_setgrent HAS_SETGRENT /**/
+#$d_getgrent HAS_GETGRENT /**/
+#$d_endgrent HAS_ENDGRENT /**/
+
+/* I_LIMITS:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <limits.h> to get definition of symbols like WORD_BIT or
+ * LONG_MAX, i.e. machine dependant limitations.
+ */
+#$i_limits I_LIMITS /**/
+
+/* I_LOCALE:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <locale.h>.
+ */
+#$i_locale I_LOCALE /**/
+
+/* I_MATH:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <math.h>.
+ */
+#$i_math I_MATH /**/
+
+/* I_MEMORY:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <memory.h>.
+ */
+#$i_memory I_MEMORY /**/
+
+/* I_NDBM:
+ * This symbol, if defined, indicates that <ndbm.h> exists and should
+ * be included.
+ */
+#$i_ndbm I_NDBM /**/
+
+/* I_NET_ERRNO:
+ * This symbol, if defined, indicates that <net/errno.h> exists and
+ * should be included.
+ */
+#$i_neterrno I_NET_ERRNO /**/
+
+/* I_NETINET_IN:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <netinet/in.h>. Otherwise, you may try <sys/in.h>.
+ */
+#$i_niin I_NETINET_IN /**/
+
+/* I_SFIO:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sfio.h>.
+ */
+#$i_sfio I_SFIO /**/
+
+/* I_STDDEF:
+ * This symbol, if defined, indicates that <stddef.h> exists and should
+ * be included.
+ */
+#$i_stddef I_STDDEF /**/
+
+/* I_STDLIB:
+ * This symbol, if defined, indicates that <stdlib.h> exists and should
+ * be included.
+ */
+#$i_stdlib I_STDLIB /**/
+
+/* I_STRING:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <string.h> (USG systems) instead of <strings.h> (BSD systems).
+ */
+#$i_string I_STRING /**/
+
+/* I_SYS_DIR:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/dir.h>.
+ */
+#$i_sysdir I_SYS_DIR /**/
+
+/* I_SYS_FILE:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/file.h> to get definition of R_OK and friends.
+ */
+#$i_sysfile I_SYS_FILE /**/
+
+/* I_SYS_IOCTL:
+ * This symbol, if defined, indicates that <sys/ioctl.h> exists and should
+ * be included. Otherwise, include <sgtty.h> or <termio.h>.
+ */
+#$i_sysioctl I_SYS_IOCTL /**/
+
+/* I_SYS_NDIR:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/ndir.h>.
+ */
+#$i_sysndir I_SYS_NDIR /**/
+
+/* I_SYS_PARAM:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/param.h>.
+ */
+#$i_sysparam I_SYS_PARAM /**/
+
+/* I_SYS_RESOURCE:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/resource.h>.
+ */
+#$i_sysresrc I_SYS_RESOURCE /**/
+
+/* I_SYS_SELECT:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/select.h> in order to get definition of struct timeval.
+ */
+#$i_sysselct I_SYS_SELECT /**/
+
+/* I_SYS_STAT:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/stat.h>.
+ */
+#$i_sysstat I_SYS_STAT /**/
+
+/* I_SYS_TIMES:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/times.h>.
+ */
+#$i_systimes I_SYS_TIMES /**/
+
+/* I_SYS_TYPES:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/types.h>.
+ */
+#$i_systypes I_SYS_TYPES /**/
+
+/* I_SYS_UN:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/un.h> to get UNIX domain socket definitions.
+ */
+#$i_sysun I_SYS_UN /**/
+
+/* I_SYS_WAIT:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/wait.h>.
+ */
+#$i_syswait I_SYS_WAIT /**/
+
+/* I_TERMIO:
+ * This symbol, if defined, indicates that the program should include
+ * <termio.h> rather than <sgtty.h>. There are also differences in
+ * the ioctl() calls that depend on the value of this symbol.
+ */
+/* I_TERMIOS:
+ * This symbol, if defined, indicates that the program should include
+ * the POSIX termios.h rather than sgtty.h or termio.h.
+ * There are also differences in the ioctl() calls that depend on the
+ * value of this symbol.
+ */
+/* I_SGTTY:
+ * This symbol, if defined, indicates that the program should include
+ * <sgtty.h> rather than <termio.h>. There are also differences in
+ * the ioctl() calls that depend on the value of this symbol.
+ */
+#$i_termio I_TERMIO /**/
+#$i_termios I_TERMIOS /**/
+#$i_sgtty I_SGTTY /**/
+
+/* I_UNISTD:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <unistd.h>.
+ */
+#$i_unistd I_UNISTD /**/
+
+/* I_UTIME:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <utime.h>.
+ */
+#$i_utime I_UTIME /**/
+
+/* I_VALUES:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <values.h> to get definition of symbols like MINFLOAT or
+ * MAXLONG, i.e. machine dependant limitations. Probably, you
+ * should use <limits.h> instead, if it is available.
+ */
+#$i_values I_VALUES /**/
+
+/* I_STDARG:
+ * This symbol, if defined, indicates that <stdarg.h> exists and should
+ * be included.
+ */
+/* I_VARARGS:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <varargs.h>.
+ */
+#$i_stdarg I_STDARG /**/
+#$i_varargs I_VARARGS /**/
+
+/* I_VFORK:
+ * This symbol, if defined, indicates to the C program that it should
+ * include vfork.h.
+ */
+#$i_vfork I_VFORK /**/
+
+/* CAN_PROTOTYPE:
+ * If defined, this macro indicates that the C compiler can handle
+ * function prototypes.
+ */
+/* _:
+ * This macro is used to declare function parameters for folks who want
+ * to make declarations with prototypes using a different style than
+ * the above macros. Use double parentheses. For example:
+ *
+ * int main _((int argc, char *argv[]));
+ */
+#$prototype CAN_PROTOTYPE /**/
+#ifdef CAN_PROTOTYPE
+#define _(args) args
+#else
+#define _(args) ()
+#endif
+
+/* SH_PATH:
+ * This symbol contains the full pathname to the shell used on this
+ * on this system to execute Bourne shell scripts. Usually, this will be
+ * /bin/sh, though it's possible that some systems will have /bin/ksh,
+ * /bin/pdksh, /bin/ash, /bin/bash, or even something such as
+ * D:/bin/sh.exe.
+ */
+#define SH_PATH "$sh" /**/
+
+/* STDCHAR:
+ * This symbol is defined to be the type of char used in stdio.h.
+ * It has the values "unsigned char" or "char".
+ */
+#define STDCHAR $stdchar /**/
+
+/* MEM_ALIGNBYTES:
+ * This symbol contains the number of bytes required to align a
+ * double. Usual values are 2, 4 and 8.
+ * On NeXT starting with 3.2, you can build "Fat" Multiple Architecture
+ * Binaries (MAB) for targets with varying alignment. This only matters
+ * for perl, where the config.h can be generated and installed on one
+ * system, and used by a different architecture to build an extension.
+ * The default is eight, for safety.
+ */
+#define MEM_ALIGNBYTES $alignbytes /**/
+
+/* BYTEORDER:
+ * This symbol holds the hexadecimal constant defined in byteorder,
+ * i.e. 0x1234 or 0x4321, etc...
+ * On NeXT 3.2 (and greater), you can build "Fat" Multiple Architecture
+ * Binaries (MAB) on either big endian or little endian machines.
+ * The endian-ness is available at compile-time. This only matters
+ * for perl, where the config.h can be generated and installed on
+ * one system, and used by a different architecture to build an
+ * extension. Older versions of NeXT that might not have
+ * defined either *_ENDIAN__ were all on Motorola 680x0 series,
+ * so the default case (for NeXT) is big endian to catch them.
+ * This might matter for NeXT 3.0.
+ */
+#ifndef NeXT
+#define BYTEORDER 0x$byteorder /* large digits for MSB */
+#else /* NeXT */
+#ifdef __LITTLE_ENDIAN__
+#define BYTEORDER 0x1234
+#else /* __BIG_ENDIAN__ */
+#define BYTEORDER 0x4321
+#endif /* ENDIAN CHECK */
+#endif /* NeXT */
+
+/* CASTI32:
+ * This symbol is defined if the C compiler can cast negative
+ * or large floating point numbers to 32-bit ints.
+ */
+#$d_casti32 CASTI32 /**/
+
+/* CASTNEGFLOAT:
+ * This symbol is defined if the C compiler can cast negative
+ * numbers to unsigned longs, ints and shorts.
+ */
+/* CASTFLAGS:
+ * This symbol contains flags that say what difficulties the compiler
+ * has casting odd floating values to unsigned long:
+ * 0 = ok
+ * 1 = couldn't cast < 0
+ * 2 = couldn't cast >= 0x80000000
+ * 4 = couldn't cast in argument expression list
+ */
+#$d_castneg CASTNEGFLOAT /**/
+#define CASTFLAGS $castflags /**/
+
+/* VOID_CLOSEDIR:
+ * This symbol, if defined, indicates that the closedir() routine
+ * does not return a value.
+ */
+#$d_void_closedir VOID_CLOSEDIR /**/
+
+/* Gconvert:
+ * This preprocessor macro is defined to convert a floating point
+ * number to a string without a trailing decimal point. This
+ * emulates the behavior of sprintf("%g"), but is sometimes much more
+ * efficient. If gconvert() is not available, but gcvt() drops the
+ * trailing decimal point, then gcvt() is used. If all else fails,
+ * a macro using sprintf("%g") is used. Arguments for the Gconvert
+ * macro are: value, number of digits, whether trailing zeros should
+ * be retained, and the output buffer.
+ * Possible values are:
+ * d_Gconvert='gconvert((x),(n),(t),(b))'
+ * d_Gconvert='gcvt((x),(n),(b))'
+ * d_Gconvert='sprintf((b),"%.*g",(n),(x))'
+ * The last two assume trailing zeros should not be kept.
+ */
+#define Gconvert(x,n,t,b) $d_Gconvert
+
+/* HAS_GNULIBC:
+ * This symbol, if defined, indicates to the C program that
+ * the GNU C library is being used.
+ */
+#$d_gnulibc HAS_GNULIBC /**/
+/* HAS_ISASCII:
+ * This manifest constant lets the C program know that isascii
+ * is available.
+ */
+#$d_isascii HAS_ISASCII /**/
+
+/* HAS_LCHOWN:
+ * This symbol, if defined, indicates that the lchown routine is
+ * available to operate on a symbolic link (instead of following the
+ * link).
+ */
+#$d_lchown HAS_LCHOWN /**/
+
+/* HAS_OPEN3:
+ * This manifest constant lets the C program know that the three
+ * argument form of open(2) is available.
+ */
+#$d_open3 HAS_OPEN3 /**/
+
+/* HAS_SAFE_BCOPY:
+ * This symbol, if defined, indicates that the bcopy routine is available
+ * to copy potentially overlapping memory blocks. Otherwise you should
+ * probably use memmove() or memcpy(). If neither is defined, roll your
+ * own version.
+ */
+#$d_safebcpy HAS_SAFE_BCOPY /**/
+
+/* HAS_SAFE_MEMCPY:
+ * This symbol, if defined, indicates that the memcpy routine is available
+ * to copy potentially overlapping memory blocks. Otherwise you should
+ * probably use memmove() or memcpy(). If neither is defined, roll your
+ * own version.
+ */
+#$d_safemcpy HAS_SAFE_MEMCPY /**/
+
+/* HAS_SANE_MEMCMP:
+ * This symbol, if defined, indicates that the memcmp routine is available
+ * and can be used to compare relative magnitudes of chars with their high
+ * bits set. If it is not defined, roll your own version.
+ */
+#$d_sanemcmp HAS_SANE_MEMCMP /**/
+
+/* HAS_SIGACTION:
+ * This symbol, if defined, indicates that Vr4's sigaction() routine
+ * is available.
+ */
+#$d_sigaction HAS_SIGACTION /**/
+
+/* Sigjmp_buf:
+ * This is the buffer type to be used with Sigsetjmp and Siglongjmp.
+ */
+/* Sigsetjmp:
+ * This macro is used in the same way as sigsetjmp(), but will invoke
+ * traditional setjmp() if sigsetjmp isn't available.
+ * See HAS_SIGSETJMP.
+ */
+/* Siglongjmp:
+ * This macro is used in the same way as siglongjmp(), but will invoke
+ * traditional longjmp() if siglongjmp isn't available.
+ * See HAS_SIGSETJMP.
+ */
+#$d_sigsetjmp HAS_SIGSETJMP /**/
+#ifdef HAS_SIGSETJMP
+#define Sigjmp_buf sigjmp_buf
+#define Sigsetjmp(buf,save_mask) sigsetjmp((buf),(save_mask))
+#define Siglongjmp(buf,retval) siglongjmp((buf),(retval))
+#else
+#define Sigjmp_buf jmp_buf
+#define Sigsetjmp(buf,save_mask) setjmp((buf))
+#define Siglongjmp(buf,retval) longjmp((buf),(retval))
+#endif
+
+/* USE_STDIO_PTR:
+ * This symbol is defined if the _ptr and _cnt fields (or similar)
+ * of the stdio FILE structure can be used to access the stdio buffer
+ * for a file handle. If this is defined, then the FILE_ptr(fp)
+ * and FILE_cnt(fp) macros will also be defined and should be used
+ * to access these fields.
+ */
+/* FILE_ptr:
+ * This macro is used to access the _ptr field (or equivalent) of the
+ * FILE structure pointed to by its argument. This macro will always be
+ * defined if USE_STDIO_PTR is defined.
+ */
+/* STDIO_PTR_LVALUE:
+ * This symbol is defined if the FILE_ptr macro can be used as an
+ * lvalue.
+ */
+/* FILE_cnt:
+ * This macro is used to access the _cnt field (or equivalent) of the
+ * FILE structure pointed to by its argument. This macro will always be
+ * defined if USE_STDIO_PTR is defined.
+ */
+/* STDIO_CNT_LVALUE:
+ * This symbol is defined if the FILE_cnt macro can be used as an
+ * lvalue.
+ */
+#$d_stdstdio USE_STDIO_PTR /**/
+#ifdef USE_STDIO_PTR
+#define FILE_ptr(fp) $stdio_ptr
+#$d_stdio_ptr_lval STDIO_PTR_LVALUE /**/
+#define FILE_cnt(fp) $stdio_cnt
+#$d_stdio_cnt_lval STDIO_CNT_LVALUE /**/
+#endif
+
+/* USE_STDIO_BASE:
+ * This symbol is defined if the _base field (or similar) of the
+ * stdio FILE structure can be used to access the stdio buffer for
+ * a file handle. If this is defined, then the FILE_base(fp) macro
+ * will also be defined and should be used to access this field.
+ * Also, the FILE_bufsiz(fp) macro will be defined and should be used
+ * to determine the number of bytes in the buffer. USE_STDIO_BASE
+ * will never be defined unless USE_STDIO_PTR is.
+ */
+/* FILE_base:
+ * This macro is used to access the _base field (or equivalent) of the
+ * FILE structure pointed to by its argument. This macro will always be
+ * defined if USE_STDIO_BASE is defined.
+ */
+/* FILE_bufsiz:
+ * This macro is used to determine the number of bytes in the I/O
+ * buffer pointed to by _base field (or equivalent) of the FILE
+ * structure pointed to its argument. This macro will always be defined
+ * if USE_STDIO_BASE is defined.
+ */
+#$d_stdiobase USE_STDIO_BASE /**/
+#ifdef USE_STDIO_BASE
+#define FILE_base(fp) $stdio_base
+#define FILE_bufsiz(fp) $stdio_bufsiz
+#endif
+
+/* HAS_VPRINTF:
+ * This symbol, if defined, indicates that the vprintf routine is available
+ * to printf with a pointer to an argument list. If unavailable, you
+ * may need to write your own, probably in terms of _doprnt().
+ */
+/* USE_CHAR_VSPRINTF:
+ * This symbol is defined if this system has vsprintf() returning type
+ * (char*). The trend seems to be to declare it as "int vsprintf()". It
+ * is up to the package author to declare vsprintf correctly based on the
+ * symbol.
+ */
+#$d_vprintf HAS_VPRINTF /**/
+#$d_charvspr USE_CHAR_VSPRINTF /**/
+
+/* DOUBLESIZE:
+ * This symbol contains the size of a double, so that the C preprocessor
+ * can make decisions based on it.
+ */
+#define DOUBLESIZE $doublesize /**/
+
+/* I_TIME:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <time.h>.
+ */
+/* I_SYS_TIME:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/time.h>.
+ */
+/* I_SYS_TIME_KERNEL:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/time.h> with KERNEL defined.
+ */
+#$i_time I_TIME /**/
+#$i_systime I_SYS_TIME /**/
+#$i_systimek I_SYS_TIME_KERNEL /**/
+
+/* INTSIZE:
+ * This symbol contains the value of sizeof(int) so that the C
+ * preprocessor can make decisions based on it.
+ */
+/* LONGSIZE:
+ * This symbol contains the value of sizeof(long) so that the C
+ * preprocessor can make decisions based on it.
+ */
+/* SHORTSIZE:
+ * This symbol contains the value of sizeof(short) so that the C
+ * preprocessor can make decisions based on it.
+ */
+#define INTSIZE $intsize /**/
+#define LONGSIZE $longsize /**/
+#define SHORTSIZE $shortsize /**/
+
+/* VAL_O_NONBLOCK:
+ * This symbol is to be used during open() or fcntl(F_SETFL) to turn on
+ * non-blocking I/O for the file descriptor. Note that there is no way
+ * back, i.e. you cannot turn it blocking again this way. If you wish to
+ * alternatively switch between blocking and non-blocking, use the
+ * ioctl(FIOSNBIO) call instead, but that is not supported by all devices.
+ */
+/* VAL_EAGAIN:
+ * This symbol holds the errno error code set by read() when no data was
+ * present on the non-blocking file descriptor.
+ */
+/* RD_NODATA:
+ * This symbol holds the return code from read() when no data is present
+ * on the non-blocking file descriptor. Be careful! If EOF_NONBLOCK is
+ * not defined, then you can't distinguish between no data and EOF by
+ * issuing a read(). You'll have to find another way to tell for sure!
+ */
+/* EOF_NONBLOCK:
+ * This symbol, if defined, indicates to the C program that a read() on
+ * a non-blocking file descriptor will return 0 on EOF, and not the value
+ * held in RD_NODATA (-1 usually, in that case!).
+ */
+#define VAL_O_NONBLOCK $o_nonblock
+#define VAL_EAGAIN $eagain
+#define RD_NODATA $rd_nodata
+#$d_eofnblk EOF_NONBLOCK
+
+/* PTRSIZE:
+ * This symbol contains the size of a pointer, so that the C preprocessor
+ * can make decisions based on it. It will be sizeof(void *) if
+ * the compiler supports (void *); otherwise it will be
+ * sizeof(char *).
+ */
+#define PTRSIZE $ptrsize /**/
+
+/* RANDBITS:
+ * This symbol contains the number of bits of random number the rand()
+ * function produces. Usual values are 15, 16, and 31.
+ */
+#define RANDBITS $randbits /**/
+
+/* SSize_t:
+ * This symbol holds the type used by functions that return
+ * a count of bytes or an error condition. It must be a signed type.
+ * It is usually ssize_t, but may be long or int, etc.
+ * It may be necessary to include <sys/types.h> or <unistd.h>
+ * to get any typedef'ed information.
+ * We will pick a type such that sizeof(SSize_t) == sizeof(Size_t).
+ */
+#define SSize_t $ssizetype /* signed count of bytes */
+
+/* OSNAME:
+ * This symbol contains the name of the operating system, as determined
+ * by Configure. You shouldn't rely on it too much; the specific
+ * feature tests from Configure are generally more reliable.
+ */
+#define OSNAME "$osname" /**/
+
+/* CAT2:
+ * This macro catenates 2 tokens together.
+ */
+/* STRINGIFY:
+ * This macro surrounds its token with double quotes.
+ */
+#if $cpp_stuff == 1
+#define CAT2(a,b)a/**/b
+#define STRINGIFY(a)"a"
+ /* If you can get stringification with catify, tell me how! */
+#endif
+#if $cpp_stuff == 42
+#define CAT2(a,b)a ## b
+#define StGiFy(a)# a
+#define STRINGIFY(a)StGiFy(a)
+#endif
+#if $cpp_stuff != 1 && $cpp_stuff != 42
+#include "Bletch: How does this C preprocessor catenate tokens?"
+#endif
+
+/* CSH:
+ * This symbol, if defined, contains the full pathname of csh.
+ */
+#$d_csh HAS_CSH /**/
+#ifdef HAS_CSH
+#define CSH "$full_csh" /**/
+#endif
+
+/* HAS_ENDHOSTENT:
+ * This symbol, if defined, indicates that the endhostent() routine is
+ * available to close whatever was being used for host queries.
+ */
+#$d_endhent HAS_ENDHOSTENT /**/
+
+/* HAS_ENDNETENT:
+ * This symbol, if defined, indicates that the endnetent() routine is
+ * available to close whatever was being used for network queries.
+ */
+#$d_endnent HAS_ENDNETENT /**/
+
+/* HAS_ENDPROTOENT:
+ * This symbol, if defined, indicates that the endprotoent() routine is
+ * available to close whatever was being used for protocol queries.
+ */
+#$d_endpent HAS_ENDPROTOENT /**/
+
+/* HAS_ENDSERVENT:
+ * This symbol, if defined, indicates that the endservent() routine is
+ * available to close whatever was being used for service queries.
+ */
+#$d_endsent HAS_ENDSERVENT /**/
+
+/* HAS_GETHOSTBYADDR:
+ * This symbol, if defined, indicates that the gethostbyaddr() routine is
+ * available to look up hosts by their IP addresses.
+ */
+#$d_gethbyaddr HAS_GETHOSTBYADDR /**/
+
+/* HAS_GETHOSTBYNAME:
+ * This symbol, if defined, indicates that the gethostbyname() routine is
+ * available to look up host names in some data base or other.
+ */
+#$d_gethbyname HAS_GETHOSTBYNAME /**/
+
+/* HAS_GETHOSTENT:
+ * This symbol, if defined, indicates that the gethostent() routine is
+ * available to look up host names in some data base or another.
+ */
+#$d_gethent HAS_GETHOSTENT /**/
+
+/* HAS_GETNETBYADDR:
+ * This symbol, if defined, indicates that the getnetbyaddr() routine is
+ * available to look up networks by their IP addresses.
+ */
+#$d_getnbyaddr HAS_GETNETBYADDR /**/
+
+/* HAS_GETNETBYNAME:
+ * This symbol, if defined, indicates that the getnetbyname() routine is
+ * available to look up networks by their names.
+ */
+#$d_getnbyname HAS_GETNETBYNAME /**/
+
+/* HAS_GETNETENT:
+ * This symbol, if defined, indicates that the getnetent() routine is
+ * available to look up network names in some data base or another.
+ */
+#$d_getnent HAS_GETNETENT /**/
+
+/* HAS_GETPROTOENT:
+ * This symbol, if defined, indicates that the getprotoent() routine is
+ * available to look up protocols in some data base or another.
+ */
+#$d_getpent HAS_GETPROTOENT /**/
+
+/* HAS_GETPROTOBYNAME:
+ * This symbol, if defined, indicates that the getprotobyname()
+ * routine is available to look up protocols by their name.
+ */
+/* HAS_GETPROTOBYNUMBER:
+ * This symbol, if defined, indicates that the getprotobynumber()
+ * routine is available to look up protocols by their number.
+ */
+#$d_getpbyname HAS_GETPROTOBYNAME /**/
+#$d_getpbynumber HAS_GETPROTOBYNUMBER /**/
+
+/* HAS_GETSERVENT:
+ * This symbol, if defined, indicates that the getservent() routine is
+ * available to look up network services in some data base or another.
+ */
+#$d_getsent HAS_GETSERVENT /**/
+
+/* HAS_GETSERVBYNAME:
+ * This symbol, if defined, indicates that the getservbyname()
+ * routine is available to look up services by their name.
+ */
+/* HAS_GETSERVBYPORT:
+ * This symbol, if defined, indicates that the getservbyport()
+ * routine is available to look up services by their port.
+ */
+#$d_getsbyname HAS_GETSERVBYNAME /**/
+#$d_getsbyport HAS_GETSERVBYPORT /**/
+
+/* HAS_LONG_DOUBLE:
+ * This symbol will be defined if the C compiler supports long
+ * doubles.
+ */
+/* LONG_DOUBLESIZE:
+ * This symbol contains the size of a long double, so that the
+ * C preprocessor can make decisions based on it. It is only
+ * defined if the system supports long doubles.
+ */
+#$d_longdbl HAS_LONG_DOUBLE /**/
+#ifdef HAS_LONG_DOUBLE
+#define LONG_DOUBLESIZE $longdblsize /**/
+#endif
+
+/* HAS_LONG_LONG:
+ * This symbol will be defined if the C compiler supports
+ * long long.
+ */
+/* LONGLONGSIZE:
+ * This symbol contains the size of a long long, so that the
+ * C preprocessor can make decisions based on it. It is only
+ * defined if the system supports long long.
+ */
+#$d_longlong HAS_LONG_LONG /**/
+#ifdef HAS_LONG_LONG
+#define LONGLONGSIZE $longlongsize /**/
+#endif
+
+/* HAS_SETGROUPS:
+ * This symbol, if defined, indicates that the setgroups() routine is
+ * available to set the list of process groups. If unavailable, multiple
+ * groups are probably not supported.
+ */
+#$d_setgrps HAS_SETGROUPS /**/
+
+/* HAS_SETHOSTENT:
+ * This symbol, if defined, indicates that the sethostent() routine is
+ * available.
+ */
+#$d_sethent HAS_SETHOSTENT /**/
+
+/* HAS_SETNETENT:
+ * This symbol, if defined, indicates that the setnetent() routine is
+ * available.
+ */
+#$d_setnent HAS_SETNETENT /**/
+
+/* HAS_SETPROTOENT:
+ * This symbol, if defined, indicates that the setprotoent() routine is
+ * available.
+ */
+#$d_setpent HAS_SETPROTOENT /**/
+
+/* HAS_SETSERVENT:
+ * This symbol, if defined, indicates that the setservent() routine is
+ * available.
+ */
+#$d_setsent HAS_SETSERVENT /**/
+
+/* HAS_SETVBUF:
+ * This symbol, if defined, indicates that the setvbuf routine is
+ * available to change buffering on an open stdio stream.
+ * to a line-buffered mode.
+ */
+#$d_setvbuf HAS_SETVBUF /**/
+
+/* HAS_SOCKET:
+ * This symbol, if defined, indicates that the BSD socket interface is
+ * supported.
+ */
+/* HAS_SOCKETPAIR:
+ * This symbol, if defined, indicates that the BSD socketpair() call is
+ * supported.
+ */
+#$d_socket HAS_SOCKET /**/
+#$d_sockpair HAS_SOCKETPAIR /**/
+
+/* HAS_UNION_SEMUN:
+ * This symbol, if defined, indicates that the union semun is
+ * defined by including <sys/sem.h>. If not, the user code
+ * probably needs to define it as:
+ * union semun {
+ * int val;
+ * struct semid_ds *buf;
+ * unsigned short *array;
+ * }
+ */
+/* USE_SEMCTL_SEMUN:
+ * This symbol, if defined, indicates that union semun is
+ * used for semctl IPC_STAT.
+ */
+/* USE_SEMCTL_SEMID_DS:
+ * This symbol, if defined, indicates that struct semid_ds * is
+ * used for semctl IPC_STAT.
+ */
+#$d_union_semun HAS_UNION_SEMUN /**/
+#$d_semctl_semun USE_SEMCTL_SEMUN /**/
+#$d_semctl_semid_ds USE_SEMCTL_SEMID_DS /**/
+
+/* Signal_t:
+ * This symbol's value is either "void" or "int", corresponding to the
+ * appropriate return type of a signal handler. Thus, you can declare
+ * a signal handler using "Signal_t (*handler)()", and define the
+ * handler using "Signal_t handler(sig)".
+ */
+#define Signal_t $signal_t /* Signal handler's return type */
+
+/* Groups_t:
+ * This symbol holds the type used for the second argument to
+ * getgroups() and setgropus(). Usually, this is the same as
+ * gidtype (gid_t) , but sometimes it isn't.
+ * It can be int, ushort, uid_t, etc...
+ * It may be necessary to include <sys/types.h> to get any
+ * typedef'ed information. This is only required if you have
+ * getgroups() or setgropus()..
+ */
+#if defined(HAS_GETGROUPS) || defined(HAS_SETGROUPS)
+#define Groups_t $groupstype /* Type for 2nd arg to [sg]etgroups() */
+#endif
+
+/* I_NETDB:
+ * This symbol, if defined, indicates that <netdb.h> exists and
+ * should be included.
+ */
+#$i_netdb I_NETDB /**/
+
+/* I_PWD:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <pwd.h>.
+ */
+/* PWQUOTA:
+ * This symbol, if defined, indicates to the C program that struct passwd
+ * contains pw_quota.
+ */
+/* PWAGE:
+ * This symbol, if defined, indicates to the C program that struct passwd
+ * contains pw_age.
+ */
+/* PWCHANGE:
+ * This symbol, if defined, indicates to the C program that struct passwd
+ * contains pw_change.
+ */
+/* PWCLASS:
+ * This symbol, if defined, indicates to the C program that struct passwd
+ * contains pw_class.
+ */
+/* PWEXPIRE:
+ * This symbol, if defined, indicates to the C program that struct passwd
+ * contains pw_expire.
+ */
+/* PWCOMMENT:
+ * This symbol, if defined, indicates to the C program that struct passwd
+ * contains pw_comment.
+ */
+/* PWGECOS:
+ * This symbol, if defined, indicates to the C program that struct passwd
+ * contains pw_gecos.
+ */
+/* PWPASSWD:
+ * This symbol, if defined, indicates to the C program that struct passwd
+ * contains pw_passwd.
+ */
+/* HAS_SETPWENT:
+ * This symbol, if defined, indicates that the getpwrent routine is
+ * available for initializing sequential access of the passwd database.
+ */
+/* HAS_GETPWENT:
+ * This symbol, if defined, indicates that the getpwent routine is
+ * available for sequential access of the password database.
+ */
+/* HAS_ENDPWENT:
+ * This symbol, if defined, indicates that the getpwent routine is
+ * available for finalizing sequential access of the passwd database.
+ */
+#$i_pwd I_PWD /**/
+#$d_pwquota PWQUOTA /**/
+#$d_pwage PWAGE /**/
+#$d_pwchange PWCHANGE /**/
+#$d_pwclass PWCLASS /**/
+#$d_pwexpire PWEXPIRE /**/
+#$d_pwcomment PWCOMMENT /**/
+#$d_pwgecos PWGECOS /**/
+#$d_pwpasswd PWPASSWD /**/
+#$d_setpwent HAS_SETPWENT /**/
+#$d_getpwent HAS_GETPWENT /**/
+#$d_endpwent HAS_ENDPWENT /**/
+
+/* Free_t:
+ * This variable contains the return type of free(). It is usually
+ * void, but occasionally int.
+ */
+/* Malloc_t:
+ * This symbol is the type of pointer returned by malloc and realloc.
+ */
+#define Malloc_t $malloctype /**/
+#define Free_t $freetype /**/
+
+/* MYMALLOC:
+ * This symbol, if defined, indicates that we're using our own malloc.
+ */
+#$d_mymalloc MYMALLOC /**/
+
+/* SIG_NAME:
+ * This symbol contains a list of signal names in order of
+ * signal number. This is intended
+ * to be used as a static array initialization, like this:
+ * char *sig_name[] = { SIG_NAME };
+ * The signals in the list are separated with commas, and each signal
+ * is surrounded by double quotes. There is no leading SIG in the signal
+ * name, i.e. SIGQUIT is known as "QUIT".
+ * Gaps in the signal numbers (up to NSIG) are filled in with NUMnn,
+ * etc., where nn is the actual signal number (e.g. NUM37).
+ * The signal number for sig_name[i] is stored in sig_num[i].
+ * The last element is 0 to terminate the list with a NULL. This
+ * corresponds to the 0 at the end of the sig_num list.
+ */
+/* SIG_NUM:
+ * This symbol contains a list of signal numbers, in the same order as the
+ * SIG_NAME list. It is suitable for static array initialization, as in:
+ * int sig_num[] = { SIG_NUM };
+ * The signals in the list are separated with commas, and the indices
+ * within that list and the SIG_NAME list match, so it's easy to compute
+ * the signal name from a number or vice versa at the price of a small
+ * dynamic linear lookup.
+ * Duplicates are allowed, but are moved to the end of the list.
+ * The signal number corresponding to sig_name[i] is sig_number[i].
+ * if (i < NSIG) then sig_number[i] == i.
+ * The last element is 0, corresponding to the 0 at the end of
+ * the sig_name list.
+ */
+#define SIG_NAME $sig_name_init /**/
+#define SIG_NUM $sig_num_init /**/
+
+/* VOIDFLAGS:
+ * This symbol indicates how much support of the void type is given by this
+ * compiler. What various bits mean:
+ *
+ * 1 = supports declaration of void
+ * 2 = supports arrays of pointers to functions returning void
+ * 4 = supports comparisons between pointers to void functions and
+ * addresses of void functions
+ * 8 = suports declaration of generic void pointers
+ *
+ * The package designer should define VOIDUSED to indicate the requirements
+ * of the package. This can be done either by #defining VOIDUSED before
+ * including config.h, or by defining defvoidused in Myinit.U. If the
+ * latter approach is taken, only those flags will be tested. If the
+ * level of void support necessary is not present, defines void to int.
+ */
+#ifndef VOIDUSED
+#define VOIDUSED $defvoidused
+#endif
+#define VOIDFLAGS $voidflags
+#if (VOIDFLAGS & VOIDUSED) != VOIDUSED
+#define void int /* is void to be avoided? */
+#define M_VOID /* Xenix strikes again */
+#endif
+
+/* ARCHLIB:
+ * This variable, if defined, holds the name of the directory in
+ * which the user wants to put architecture-dependent public
+ * library files for $package. It is most often a local directory
+ * such as /usr/local/lib. Programs using this variable must be
+ * prepared to deal with filename expansion. If ARCHLIB is the
+ * same as PRIVLIB, it is not defined, since presumably the
+ * program already searches PRIVLIB.
+ */
+/* ARCHLIB_EXP:
+ * This symbol contains the ~name expanded version of ARCHLIB, to be used
+ * in programs that are not prepared to deal with ~ expansion at run-time.
+ */
+#$d_archlib ARCHLIB "$archlib" /**/
+#$d_archlib ARCHLIB_EXP "$archlibexp" /**/
+
+/* DLSYM_NEEDS_UNDERSCORE:
+ * This symbol, if defined, indicates that we need to prepend an
+ * underscore to the symbol name before calling dlsym(). This only
+ * makes sense if you *have* dlsym, which we will presume is the
+ * case if you're using dl_dlopen.xs.
+ */
+#$d_dlsymun DLSYM_NEEDS_UNDERSCORE /**/
+
+/* USE_SFIO:
+ * This symbol, if defined, indicates that sfio should
+ * be used.
+ */
+#$d_sfio USE_SFIO /**/
+
+/* USE_DYNAMIC_LOADING:
+ * This symbol, if defined, indicates that dynamic loading of
+ * some sort is available.
+ */
+#$usedl USE_DYNAMIC_LOADING /**/
+
+/* DB_Prefix_t:
+ * This symbol contains the type of the prefix structure element
+ * in the <db.h> header file. In older versions of DB, it was
+ * int, while in newer ones it is u_int32_t.
+ */
+/* DB_Hash_t:
+ * This symbol contains the type of the prefix structure element
+ * in the <db.h> header file. In older versions of DB, it was
+ * int, while in newer ones it is size_t.
+ */
+#define DB_Hash_t $db_hashtype /**/
+#define DB_Prefix_t $db_prefixtype /**/
+
+/* PRIVLIB:
+ * This symbol contains the name of the private library for this package.
+ * The library is private in the sense that it needn't be in anyone's
+ * execution path, but it should be accessible by the world. The program
+ * should be prepared to do ~ expansion.
+ */
+/* PRIVLIB_EXP:
+ * This symbol contains the ~name expanded version of PRIVLIB, to be used
+ * in programs that are not prepared to deal with ~ expansion at run-time.
+ */
+#define PRIVLIB "$privlib" /**/
+#define PRIVLIB_EXP "$privlibexp" /**/
+
+/* SELECT_MIN_BITS:
+ * This symbol holds the minimum number of bits operated by select.
+ * That is, if you do select(n, ...), how many bits at least will be
+ * cleared in the masks if some activity is detected. Usually this
+ * is either n or 32*ceil(n/32), especially many little-endians do
+ * the latter. This is only useful if you have select(), naturally.
+ */
+#define SELECT_MIN_BITS $selectminbits /**/
+
+/* SITEARCH:
+ * This symbol contains the name of the private library for this package.
+ * The library is private in the sense that it needn't be in anyone's
+ * execution path, but it should be accessible by the world. The program
+ * should be prepared to do ~ expansion.
+ * The standard distribution will put nothing in this directory.
+ * Individual sites may place their own extensions and modules in
+ * this directory.
+ */
+/* SITEARCH_EXP:
+ * This symbol contains the ~name expanded version of SITEARCH, to be used
+ * in programs that are not prepared to deal with ~ expansion at run-time.
+ */
+#define SITEARCH "$sitearch" /**/
+#define SITEARCH_EXP "$sitearchexp" /**/
+
+/* SITELIB:
+ * This symbol contains the name of the private library for this package.
+ * The library is private in the sense that it needn't be in anyone's
+ * execution path, but it should be accessible by the world. The program
+ * should be prepared to do ~ expansion.
+ * The standard distribution will put nothing in this directory.
+ * Individual sites may place their own extensions and modules in
+ * this directory.
+ */
+/* SITELIB_EXP:
+ * This symbol contains the ~name expanded version of SITELIB, to be used
+ * in programs that are not prepared to deal with ~ expansion at run-time.
+ */
+#define SITELIB "$sitelib" /**/
+#define SITELIB_EXP "$sitelibexp" /**/
+
+/* STARTPERL:
+ * This variable contains the string to put in front of a perl
+ * script to make sure (one hopes) that it runs with perl and not
+ * some shell.
+ */
+#define STARTPERL "$startperl" /**/
+
+/* USE_PERLIO:
+ * This symbol, if defined, indicates that the PerlIO abstraction should
+ * be used throughout. If not defined, stdio should be
+ * used in a fully backward compatible manner.
+ */
+#$useperlio USE_PERLIO /**/
+
+/* HAS_GETHOST_PROTOS:
+ * This symbol, if defined, indicates that <netdb.h> includes
+ * prototypes for gethostent(), gethostbyname(), and
+ * gethostbyaddr(). Otherwise, it is up to the program to guess
+ * them. See netdbtype.U for probing for various Netdb_xxx_t types.
+ */
+#$d_gethostprotos HAS_GETHOST_PROTOS /**/
+
+/* HAS_GETNET_PROTOS:
+ * This symbol, if defined, indicates that <netdb.h> includes
+ * prototypes for getnetent(), getnetbyname(), and
+ * getnetbyaddr(). Otherwise, it is up to the program to guess
+ * them. See netdbtype.U for probing for various Netdb_xxx_t types.
+ */
+#$d_getnetprotos HAS_GETNET_PROTOS /**/
+
+/* HAS_GETPROTO_PROTOS:
+ * This symbol, if defined, indicates that <netdb.h> includes
+ * prototypes for getprotoent(), getprotobyname(), and
+ * getprotobyaddr(). Otherwise, it is up to the program to guess
+ * them. See netdbtype.U for probing for various Netdb_xxx_t types.
+ */
+#$d_getprotoprotos HAS_GETPROTO_PROTOS /**/
+
+/* HAS_GETSERV_PROTOS:
+ * This symbol, if defined, indicates that <netdb.h> includes
+ * prototypes for getservent(), getservbyname(), and
+ * getservbyaddr(). Otherwise, it is up to the program to guess
+ * them. See netdbtype.U for probing for various Netdb_xxx_t types.
+ */
+#$d_getservprotos HAS_GETSERV_PROTOS /**/
+
+/* Netdb_host_t:
+ * This symbol holds the type used for the 1st argument
+ * to gethostbyaddr().
+ */
+/* Netdb_hlen_t:
+ * This symbol holds the type used for the 2nd argument
+ * to gethostbyaddr().
+ */
+/* Netdb_name_t:
+ * This symbol holds the type used for the argument to
+ * gethostbyname().
+ */
+/* Netdb_net_t:
+ * This symbol holds the type used for the 1st argument to
+ * getnetbyaddr().
+ */
+#define Netdb_host_t $netdb_host_type /**/
+#define Netdb_hlen_t $netdb_hlen_type /**/
+#define Netdb_name_t $netdb_name_type /**/
+#define Netdb_net_t $netdb_net_type /**/
+
+/* Select_fd_set_t:
+ * This symbol holds the type used for the 2nd, 3rd, and 4th
+ * arguments to select. Usually, this is 'fd_set *', if HAS_FD_SET
+ * is defined, and 'int *' otherwise. This is only useful if you
+ * have select(), of course.
+ */
+#define Select_fd_set_t $selecttype /**/
+
+/* ARCHNAME:
+ * This symbol holds a string representing the architecture name.
+ * It may be used to construct an architecture-dependant pathname
+ * where library files may be held under a private library, for
+ * instance.
+ */
+#define ARCHNAME "$archname" /**/
+
+/* I_MACH_CTHREADS:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <mach/cthreads.h>.
+ */
+/*#define I_MACH_CTHREADS /**/
+
+/* I_PTHREAD:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <pthread.h>.
+ */
+/*#define I_PTHREAD /**/
+
+/* HAS_PTHREAD_YIELD:
+ * This symbol, if defined, indicates that the pthread_yield
+ * routine is available to yield the execution of the current
+ * thread.
+ */
+/* HAS_SCHED_YIELD:
+ * This symbol, if defined, indicates that the sched_yield
+ * routine is available to yield the execution of the current
+ * thread.
+ */
+#$d_pthread_yield HAS_PTHREAD_YIELD /**/
+#$d_sched_yield HAS_SCHED_YIELD /**/
+
+/* PTHREADS_CREATED_JOINABLE:
+ * This symbol, if defined, indicates that pthreads are created
+ * in the joinable (aka undetached) state.
+ */
+#$d_pthreads_created_joinable PTHREADS_CREATED_JOINABLE /**/
+
+/* USE_THREADS:
+ * This symbol, if defined, indicates that Perl should
+ * be built to use threads.
+ */
+/* OLD_PTHREADS_API:
+ * This symbol, if defined, indicates that Perl should
+ * be built to use the old draft POSIX threads API.
+ */
+#$usethreads USE_THREADS /**/
+#$d_oldpthreads OLD_PTHREADS_API /**/
+
+/* Time_t:
+ * This symbol holds the type returned by time(). It can be long,
+ * or time_t on BSD sites (in which case <sys/types.h> should be
+ * included).
+ */
+#define Time_t $timetype /* Time type */
+
+/* HAS_TIMES:
+ * This symbol, if defined, indicates that the times() routine exists.
+ * Note that this became obsolete on some systems (SUNOS), which now
+ * use getrusage(). It may be necessary to include <sys/times.h>.
+ */
+#$d_times HAS_TIMES /**/
+
+/* Fpos_t:
+ * This symbol holds the type used to declare file positions in libc.
+ * It can be fpos_t, long, uint, etc... It may be necessary to include
+ * <sys/types.h> to get any typedef'ed information.
+ */
+#define Fpos_t $fpostype /* File position type */
+
+/* Gid_t:
+ * This symbol holds the return type of getgid() and the type of
+ * argument to setrgid() and related functions. Typically,
+ * it is the type of group ids in the kernel. It can be int, ushort,
+ * uid_t, etc... It may be necessary to include <sys/types.h> to get
+ * any typedef'ed information.
+ */
+#define Gid_t $gidtype /* Type for getgid(), etc... */
+
+/* Off_t:
+ * This symbol holds the type used to declare offsets in the kernel.
+ * It can be int, long, off_t, etc... It may be necessary to include
+ * <sys/types.h> to get any typedef'ed information.
+ */
+#define Off_t $lseektype /* <offset> type */
+
+/* Mode_t:
+ * This symbol holds the type used to declare file modes
+ * for systems calls. It is usually mode_t, but may be
+ * int or unsigned short. It may be necessary to include <sys/types.h>
+ * to get any typedef'ed information.
+ */
+#define Mode_t $modetype /* file mode parameter for system calls */
+
+/* Pid_t:
+ * This symbol holds the type used to declare process ids in the kernel.
+ * It can be int, uint, pid_t, etc... It may be necessary to include
+ * <sys/types.h> to get any typedef'ed information.
+ */
+#define Pid_t $pidtype /* PID type */
+
+/* Size_t:
+ * This symbol holds the type used to declare length parameters
+ * for string functions. It is usually size_t, but may be
+ * unsigned long, int, etc. It may be necessary to include
+ * <sys/types.h> to get any typedef'ed information.
+ */
+#define Size_t $sizetype /* length paramater for string functions */
+
+/* Uid_t:
+ * This symbol holds the type used to declare user ids in the kernel.
+ * It can be int, ushort, uid_t, etc... It may be necessary to include
+ * <sys/types.h> to get any typedef'ed information.
+ */
+#define Uid_t $uidtype /* UID type */
+
+#endif
+!GROK!THIS!
diff --git a/gnu/usr.bin/perl/vos/perl.bind b/gnu/usr.bin/perl/vos/perl.bind
new file mode 100644
index 00000000000..ccf463f57e1
--- /dev/null
+++ b/gnu/usr.bin/perl/vos/perl.bind
@@ -0,0 +1,37 @@
+name: perl;
+
+/* entry: main; */
+
+modules: miniperlmain,
+ av,
+ deb,
+ doio,
+ doop,
+ dump,
+ globals,
+ gv,
+ hv,
+ mg,
+ op,
+ perl,
+ perlio,
+ perly,
+ pp,
+ pp_ctl,
+ pp_hot,
+ pp_sys,
+ regcomp,
+ regexec,
+ run,
+ scope,
+ sv,
+ taint,
+ toke,
+ universal,
+ util,
+ vos_accept,
+ vos_dummies,
+ tcp_runtime,
+ tcp_gethost;
+
+end;
diff --git a/gnu/usr.bin/perl/vos/test_vos_dummies.c b/gnu/usr.bin/perl/vos/test_vos_dummies.c
new file mode 100644
index 00000000000..2f5cc941eb7
--- /dev/null
+++ b/gnu/usr.bin/perl/vos/test_vos_dummies.c
@@ -0,0 +1,43 @@
+/* +++begin copyright+++ ******************************************* */
+/* */
+/* COPYRIGHT (c) 1997, 1998 Stratus Computer, Inc. */
+/* */
+/* This program is free software; you can redistribute it and/or */
+/* modify it under the terms of either: */
+/* */
+/* a) the GNU General Public License as published by the Free */
+/* Software Foundation; either version 1, or (at your option) any */
+/* later version, or */
+/* */
+/* b) the "Artistic License" which comes with this Kit. */
+/* */
+/* This program is distributed in the hope that it will be useful, */
+/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
+/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either */
+/* the GNU General Public License or the Artistic License for more */
+/* details. */
+/* */
+/* You should have received a copy of the Artistic License with this */
+/* Kit, in the file named "Artistic". If not, you can get one from */
+/* the Perl distribution. */
+/* */
+/* You should also have received a copy of the GNU General Public */
+/* License along with this program; if not, you can get one from */
+/* the Perl distribution or else write to the Free Software */
+/* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA */
+/* 02111-1307, USA. */
+/* */
+/* +++end copyright+++ ********************************************* */
+
+/* This program tests the code in vos_dummies.c to make sure it
+ works as expected. */
+
+extern int dup (int _fildes);
+
+int t_dummies ()
+{
+int fildes;
+
+ fildes=3;
+ dup (fildes);
+}
diff --git a/gnu/usr.bin/perl/vos/vos_accept.c b/gnu/usr.bin/perl/vos/vos_accept.c
new file mode 100644
index 00000000000..fca70db1495
--- /dev/null
+++ b/gnu/usr.bin/perl/vos/vos_accept.c
@@ -0,0 +1,51 @@
+/* +++begin copyright+++ ******************************************* */
+/* */
+/* COPYRIGHT (c) 1999 Stratus Computer, Inc. */
+/* */
+/* This program is free software; you can redistribute it and/or */
+/* modify it under the terms of either: */
+/* */
+/* a) the GNU General Public License as published by the Free */
+/* Software Foundation; either version 1, or (at your option) any */
+/* later version, or */
+/* */
+/* b) the "Artistic License" which comes with this Kit. */
+/* */
+/* This program is distributed in the hope that it will be useful, */
+/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
+/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either */
+/* the GNU General Public License or the Artistic License for more */
+/* details. */
+/* */
+/* You should have received a copy of the Artistic License with this */
+/* Kit, in the file named "Artistic". If not, you can get one from */
+/* the Perl distribution. */
+/* */
+/* You should also have received a copy of the GNU General Public */
+/* License along with this program; if not, you can get one from */
+/* the Perl distribution or else write to the Free Software */
+/* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA */
+/* 02111-1307, USA. */
+/* */
+/* +++end copyright+++ ********************************************* */
+
+#define _POSIX_C_SOURCE 199309L
+
+/* Beginning of modification history */
+/* Written 99-02-03 by Paul Green. */
+/* End of modification history */
+
+/* This short program soaks up the call to "accept" and
+ transfers it to "_accept". This is necessary because the VOS
+ C compilers treat "accept" as a keyword unless the -Xc
+ (strict ANSI option) has been specified. This program must
+ be compiled with -Xc. Because "accept" is a keyword, the VOS
+ OS TCP/IP product has renamed the usual TCP/IP "accept"
+ function to "_accept". */
+
+extern int _accept (int a, struct sockaddr *b, int *c);
+
+extern int accept (int a, struct sockaddr *b, int *c)
+{
+ return _accept (a, b, c);
+}
diff --git a/gnu/usr.bin/perl/vos/vos_dummies.c b/gnu/usr.bin/perl/vos/vos_dummies.c
new file mode 100644
index 00000000000..83bfc4d092f
--- /dev/null
+++ b/gnu/usr.bin/perl/vos/vos_dummies.c
@@ -0,0 +1,94 @@
+/* +++begin copyright+++ ******************************************* */
+/* */
+/* COPYRIGHT (c) 1997, 1998, 1999 Stratus Computer, Inc. */
+/* */
+/* This program is free software; you can redistribute it and/or */
+/* modify it under the terms of either: */
+/* */
+/* a) the GNU General Public License as published by the Free */
+/* Software Foundation; either version 1, or (at your option) any */
+/* later version, or */
+/* */
+/* b) the "Artistic License" which comes with this Kit. */
+/* */
+/* This program is distributed in the hope that it will be useful, */
+/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
+/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either */
+/* the GNU General Public License or the Artistic License for more */
+/* details. */
+/* */
+/* You should have received a copy of the Artistic License with this */
+/* Kit, in the file named "Artistic". If not, you can get one from */
+/* the Perl distribution. */
+/* */
+/* You should also have received a copy of the GNU General Public */
+/* License along with this program; if not, you can get one from */
+/* the Perl distribution or else write to the Free Software */
+/* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA */
+/* 02111-1307, USA. */
+/* */
+/* +++end copyright+++ ********************************************* */
+
+#define _POSIX_C_SOURCE 199309L
+
+#include <stdio.h>
+#include <string.h>
+#include <sys/types.h>
+
+extern void s$stop_program (char_varying (256) *command_line,
+ short int *error_code);
+extern void s$write_code (char_varying *record_buffer,
+ short int *error_code);
+extern int vos_call_debug ();
+
+#pragma page
+static void bomb (char *p_name)
+{
+char_varying(256) msgvs;
+
+ strcpy_vstr_nstr (&msgvs, "FATAL ERROR: Call to unimplemented function '");
+ strcat_vstr_nstr (&msgvs, p_name);
+ strcat_vstr_nstr (&msgvs, "'. Entering debugger.");
+ s$write_code (&msgvs, &0);
+
+ strcpy_vstr_nstr (&msgvs, "Please capture the output of the 'trace' request and mail it to Paul_Green@stratus.com.");
+ s$write_code (&msgvs, &0);
+
+ vos_call_debug ();
+
+ strcpy_vstr_nstr (&msgvs, "Return from debugger. Stopping program. Sorry but this error is unrecoverable.");
+ s$write_code (&msgvs, &0);
+ s$stop_program (&"", &1);
+}
+
+extern int dup (int _fildes)
+{
+ bomb ("dup");
+}
+
+extern int do_aspawn ()
+{
+ bomb ("do_aspawn");
+}
+
+extern int do_spawn ()
+{
+ bomb ("do_spawn");
+}
+
+extern pid_t fork (void)
+{
+ bomb ("fork");
+}
+
+extern void Perl_dump_mstats (char *s)
+{
+ bomb ("Perl_dump_mstats");
+}
+
+extern pid_t waitpid (pid_t pid, int *stat_loc, int options)
+{
+
+ bomb ("waitpid");
+}
+
diff --git a/gnu/usr.bin/perl/vos/vosish.h b/gnu/usr.bin/perl/vos/vosish.h
new file mode 100644
index 00000000000..e4ab71d8a1a
--- /dev/null
+++ b/gnu/usr.bin/perl/vos/vosish.h
@@ -0,0 +1,132 @@
+/*
+ * The following symbols are defined if your operating system supports
+ * functions by that name. All Unixes I know of support them, thus they
+ * are not checked by the configuration script, but are directly defined
+ * here.
+ */
+
+/* HAS_IOCTL:
+ * This symbol, if defined, indicates that the ioctl() routine is
+ * available to set I/O characteristics
+ */
+#define HAS_IOCTL / **/
+
+/* HAS_UTIME:
+ * This symbol, if defined, indicates that the routine utime() is
+ * available to update the access and modification times of files.
+ */
+#define HAS_UTIME / **/
+
+/* HAS_GROUP
+ * This symbol, if defined, indicates that the getgrnam() and
+ * getgrgid() routines are available to get group entries.
+ * The getgrent() has a separate definition, HAS_GETGRENT.
+ */
+/*#define HAS_GROUP / **/
+
+/* HAS_PASSWD
+ * This symbol, if defined, indicates that the getpwnam() and
+ * getpwuid() routines are available to get password entries.
+ * The getpwent() has a separate definition, HAS_GETPWENT.
+ */
+/*#define HAS_PASSWD / **/
+
+#define HAS_KILL
+#define HAS_WAIT
+
+/* USEMYBINMODE
+ * This symbol, if defined, indicates that the program should
+ * use the routine my_binmode(FILE *fp, char iotype) to insure
+ * that a file is in "binary" mode -- that is, that no translation
+ * of bytes occurs on read or write operations.
+ */
+#undef USEMYBINMODE
+
+/* Stat_t:
+ * This symbol holds the type used to declare buffers for information
+ * returned by stat(). It's usually just struct stat. It may be necessary
+ * to include <sys/stat.h> and <sys/types.h> to get any typedef'ed
+ * information.
+ */
+#define Stat_t struct stat
+
+/* USE_STAT_RDEV:
+ * This symbol is defined if this system has a stat structure declaring
+ * st_rdev
+ */
+#undef USE_STAT_RDEV /**/
+
+/* ACME_MESS:
+ * This symbol, if defined, indicates that error messages should be
+ * should be generated in a format that allows the use of the Acme
+ * GUI/editor's autofind feature.
+ */
+#undef ACME_MESS /**/
+
+/* UNLINK_ALL_VERSIONS:
+ * This symbol, if defined, indicates that the program should arrange
+ * to remove all versions of a file if unlink() is called. This is
+ * probably only relevant for VMS.
+ */
+/* #define UNLINK_ALL_VERSIONS / **/
+
+/* VMS:
+ * This symbol, if defined, indicates that the program is running under
+ * VMS. It is currently automatically set by cpps running under VMS,
+ * and is included here for completeness only.
+ */
+/* #define VMS / **/
+
+/* ALTERNATE_SHEBANG:
+ * This symbol, if defined, contains a "magic" string which may be used
+ * as the first line of a Perl program designed to be executed directly
+ * by name, instead of the standard Unix #!. If ALTERNATE_SHEBANG
+ * begins with a character other then #, then Perl will only treat
+ * it as a command line if if finds the string "perl" in the first
+ * word; otherwise it's treated as the first line of code in the script.
+ * (IOW, Perl won't hand off to another interpreter via an alternate
+ * shebang sequence that might be legal Perl code.)
+ */
+/* #define ALTERNATE_SHEBANG "#!" / **/
+
+#if !defined(NSIG) || defined(M_UNIX) || defined(M_XENIX) || defined(__NetBSD__)
+# include <signal.h>
+#endif
+
+#ifndef SIGABRT
+# define SIGABRT SIGILL
+#endif
+#ifndef SIGILL
+# define SIGILL 6 /* blech */
+#endif
+#define ABORT() kill(getpid(),SIGABRT);
+
+/*
+ * fwrite1() should be a routine with the same calling sequence as fwrite(),
+ * but which outputs all of the bytes requested as a single stream (unlike
+ * fwrite() itself, which on some systems outputs several distinct records
+ * if the number_of_items parameter is >1).
+ */
+#define fwrite1 fwrite
+
+#define Stat(fname,bufptr) stat((fname),(bufptr))
+#define Fstat(fd,bufptr) fstat((fd),(bufptr))
+#define Fflush(fp) fflush(fp)
+#define Mkdir(path,mode) mkdir((path),(mode))
+
+#ifndef PERL_SYS_INIT
+#ifdef PERL_SCO5
+/* this should be set in a hint file, not here */
+# define PERL_SYS_INIT(c,v) fpsetmask(0); MALLOC_INIT
+#else
+# define PERL_SYS_INIT(c,v) MALLOC_INIT
+#endif
+#endif
+
+#ifndef PERL_SYS_TERM
+#define PERL_SYS_TERM() MALLOC_TERM
+#endif
+
+#define BIT_BUCKET "/dev/null"
+
+#define dXSUB_SYS
diff --git a/gnu/usr.bin/perl/win32/GenCAPI.pl b/gnu/usr.bin/perl/win32/GenCAPI.pl
new file mode 100644
index 00000000000..c2ff67df8aa
--- /dev/null
+++ b/gnu/usr.bin/perl/win32/GenCAPI.pl
@@ -0,0 +1,1616 @@
+
+# creates a C API file from proto.h
+# takes one argument, the path to lib/CORE directory.
+# creates 2 files: "perlCAPI.cpp" and "perlCAPI.h".
+
+#use Config;
+
+my $hdrfile = "$ARGV[0]\\perlCAPI.h";
+my $infile = '..\\proto.h';
+my $embedfile = '..\\embed.h';
+my $separateObj = 0;
+
+my %skip_list;
+my %embed;
+
+sub readembed(\%$) {
+ my ($syms, $file) = @_;
+ my ($line, @words);
+ %$syms = ();
+ local (*FILE, $_);
+ open(FILE, "< $file")
+ or die "$0: Can't open $file: $!\n";
+ while ($line = <FILE>) {
+ chop($line);
+ if ($line =~ /^#define\s+\w+/) {
+ $line =~ s/^#define\s+//;
+ @words = split ' ', $line;
+# print "$words[0]\t$words[1]\n";
+ $$syms{$words[0]} = $words[1];
+ }
+ }
+ close(FILE);
+}
+
+readembed %embed, $embedfile;
+
+sub skip_these {
+ my $list = shift;
+ foreach my $symbol (@$list) {
+ $skip_list{$symbol} = 1;
+ }
+}
+
+skip_these [qw(
+cando
+cast_ulong
+my_chsize
+condpair_magic
+deb
+deb_growlevel
+debprofdump
+debop
+debstack
+debstackptrs
+dump_fds
+dump_mstats
+fprintf
+find_threadsv
+magic_mutexfree
+my_memcmp
+my_memset
+my_pclose
+my_popen
+my_swap
+my_htonl
+my_ntohl
+new_struct_thread
+same_dirent
+unlnk
+unlock_condpair
+safexmalloc
+safexcalloc
+safexrealloc
+safexfree
+Perl_GetVars
+malloced_size
+)];
+
+
+
+if (!open(INFILE, "<$infile")) {
+ print "open of $infile failed: $!\n";
+ return 1;
+}
+
+if (!open(OUTFILE, ">perlCAPI.cpp")) {
+ print "open of perlCAPI.cpp failed: $!\n";
+ return 1;
+}
+
+print OUTFILE <<ENDCODE;
+#include "EXTERN.h"
+#include "perl.h"
+#include "XSUB.h"
+
+#define DESTRUCTORFUNC (void (*)(void*))
+
+ENDCODE
+
+print OUTFILE "#ifdef SetCPerlObj_defined\n" unless ($separateObj == 0);
+
+print OUTFILE <<ENDCODE;
+EXTERN_C void SetCPerlObj(void *pP)
+{
+ pPerl = (CPerlObj*)pP;
+}
+
+ENDCODE
+
+print OUTFILE "#endif\n" unless ($separateObj == 0);
+
+while () {
+ last unless defined ($_ = <INFILE>);
+ if (/^VIRTUAL\s/) {
+ while (!/;$/) {
+ chomp;
+ $_ .= <INFILE>;
+ }
+ $_ =~ s/^VIRTUAL\s*//;
+ $_ =~ s/\s*__attribute__.*$/;/;
+ if ( /(.*)\s([A-z_]*[0-9A-z_]+\s)_\(\((.*)\)\);/ ||
+ /(.*)\*([A-z_]*[0-9A-z_]+\s)_\(\((.*)\)\);/ ) {
+ $type = $1;
+ $name = $2;
+ $args = $3;
+
+ $name =~ s/\s*$//;
+ $type =~ s/\s*$//;
+ next if (defined $skip_list{$name});
+
+ if($args eq "ARGSproto") {
+ $args = "void";
+ }
+
+ $return = ($type eq "void" or $type eq "Free_t") ? "\t" : "\treturn";
+
+ if(defined $embed{$name}) {
+ $funcName = $embed{$name};
+ } else {
+ $funcName = $name;
+ }
+
+ @args = split(',', $args);
+ if ($args[$#args] =~ /\s*\.\.\.\s*/) {
+ if(($name eq "croak") or ($name eq "deb") or ($name eq "die")
+ or ($name eq "form") or ($name eq "warn")) {
+ print OUTFILE "\n#ifdef $name" . "_defined" unless ($separateObj == 0);
+ $args[0] =~ /(\w+)\W*$/;
+ $arg = $1;
+ print OUTFILE <<ENDCODE;
+
+#undef $name
+EXTERN_C $type $funcName ($args)
+{
+ char *pstr;
+ char *pmsg;
+ va_list args;
+ va_start(args, $arg);
+ pmsg = pPerl->Perl_mess($arg, &args);
+ New(0, pstr, strlen(pmsg)+1, char);
+ strcpy(pstr, pmsg);
+$return pPerl->Perl_$name(pstr);
+ va_end(args);
+}
+ENDCODE
+ print OUTFILE "#endif\n" unless ($separateObj == 0);
+ }
+ elsif($name eq "newSVpvf") {
+ print OUTFILE "\n#ifdef $name" . "_defined" unless ($separateObj == 0);
+ $args[0] =~ /(\w+)\W*$/;
+ $arg = $1;
+ print OUTFILE <<ENDCODE;
+
+#undef $name
+EXTERN_C $type $funcName ($args)
+{
+ SV *sv;
+ va_list args;
+ va_start(args, $arg);
+ sv = pPerl->Perl_newSV(0);
+ pPerl->Perl_sv_vcatpvfn(sv, $arg, strlen($arg), &args, NULL, 0, NULL);
+ va_end(args);
+ return sv;
+}
+ENDCODE
+ print OUTFILE "#endif\n" unless ($separateObj == 0);
+ }
+ elsif($name eq "sv_catpvf") {
+ print OUTFILE "\n#ifdef $name" . "_defined" unless ($separateObj == 0);
+ $args[0] =~ /(\w+)\W*$/;
+ $arg0 = $1;
+ $args[1] =~ /(\w+)\W*$/;
+ $arg1 = $1;
+ print OUTFILE <<ENDCODE;
+
+#undef $name
+EXTERN_C $type $funcName ($args)
+{
+ va_list args;
+ va_start(args, $arg1);
+ pPerl->Perl_sv_vcatpvfn($arg0, $arg1, strlen($arg1), &args, NULL, 0, NULL);
+ va_end(args);
+}
+ENDCODE
+ print OUTFILE "#endif\n" unless ($separateObj == 0);
+ }
+ elsif($name eq "sv_catpvf_mg") {
+ print OUTFILE "\n#ifdef $name" . "_defined" unless ($separateObj == 0);
+ $args[0] =~ /(\w+)\W*$/;
+ $arg0 = $1;
+ $args[1] =~ /(\w+)\W*$/;
+ $arg1 = $1;
+ print OUTFILE <<ENDCODE;
+
+#undef $name
+#ifndef mg_set
+#define mg_set pPerl->Perl_mg_set
+#endif
+EXTERN_C $type $funcName ($args)
+{
+ va_list args;
+ va_start(args, $arg1);
+ pPerl->Perl_sv_vcatpvfn($arg0, $arg1, strlen($arg1), &args, NULL, 0, NULL);
+ va_end(args);
+ SvSETMAGIC(sv);
+}
+ENDCODE
+ print OUTFILE "#endif\n" unless ($separateObj == 0);
+ }
+ elsif($name eq "sv_setpvf") {
+ print OUTFILE "\n#ifdef $name" . "_defined" unless ($separateObj == 0);
+ $args[0] =~ /(\w+)\W*$/;
+ $arg0 = $1;
+ $args[1] =~ /(\w+)\W*$/;
+ $arg1 = $1;
+ print OUTFILE <<ENDCODE;
+
+#undef $name
+EXTERN_C $type $funcName ($args)
+{
+ va_list args;
+ va_start(args, $arg1);
+ pPerl->Perl_sv_vsetpvfn($arg0, $arg1, strlen($arg1), &args, NULL, 0, NULL);
+ va_end(args);
+}
+ENDCODE
+ print OUTFILE "#endif\n" unless ($separateObj == 0);
+ }
+ elsif($name eq "sv_setpvf_mg") {
+ print OUTFILE "\n#ifdef $name" . "_defined" unless ($separateObj == 0);
+ $args[0] =~ /(\w+)\W*$/;
+ $arg0 = $1;
+ $args[1] =~ /(\w+)\W*$/;
+ $arg1 = $1;
+ print OUTFILE <<ENDCODE;
+
+#undef $name
+#ifndef mg_set
+#define mg_set pPerl->Perl_mg_set
+#endif
+EXTERN_C $type $funcName ($args)
+{
+ va_list args;
+ va_start(args, $arg1);
+ pPerl->Perl_sv_vsetpvfn($arg0, $arg1, strlen($arg1), &args, NULL, 0, NULL);
+ va_end(args);
+ SvSETMAGIC(sv);
+}
+ENDCODE
+ print OUTFILE "#endif\n" unless ($separateObj == 0);
+ }
+ elsif($name eq "fprintf") {
+ print OUTFILE "\n#ifdef $name" . "_defined" unless ($separateObj == 0);
+ $args[0] =~ /(\w+)\W*$/;
+ $arg0 = $1;
+ $args[1] =~ /(\w+)\W*$/;
+ $arg1 = $1;
+ print OUTFILE <<ENDCODE;
+
+#undef $name
+EXTERN_C $type $name ($args)
+{
+ int nRet;
+ va_list args;
+ va_start(args, $arg1);
+ nRet = PerlIO_vprintf($arg0, $arg1, args);
+ va_end(args);
+ return nRet;
+}
+ENDCODE
+ print OUTFILE "#endif\n" unless ($separateObj == 0);
+ } else {
+ print "Warning: can't handle varargs function '$name'\n";
+ }
+ next;
+ }
+
+ # newXS special case
+ if ($name eq "newXS") {
+ next;
+ }
+
+ print OUTFILE "\n#ifdef $name" . "defined" unless ($separateObj == 0);
+
+ # handle specical case for save_destructor
+ if ($name eq "save_destructor") {
+ next;
+ }
+ # handle specical case for sighandler
+ if ($name eq "sighandler") {
+ next;
+ }
+ # handle special case for sv_grow
+ if ($name eq "sv_grow" and $args eq "SV* sv, unsigned long newlen") {
+ next;
+ }
+ # handle special case for newSV
+ if ($name eq "newSV" and $args eq "I32 x, STRLEN len") {
+ next;
+ }
+ # handle special case for perl_parse
+ if ($name eq "perl_parse") {
+ print OUTFILE <<ENDCODE;
+
+#undef $name
+EXTERN_C $type $name ($args)
+{
+ return pPerl->perl_parse(xsinit, argc, argv, env);
+}
+ENDCODE
+ print OUTFILE "#endif\n" unless ($separateObj == 0);
+ next;
+ }
+ # handle special case for perl_atexit
+ if ($name eq "perl_atexit") {
+ print OUTFILE <<ENDCODE;
+
+#undef $name
+EXTERN_C $type $name ($args)
+{
+ pPerl->perl_atexit(fn, ptr);
+}
+ENDCODE
+ print OUTFILE "#endif\n" unless ($separateObj == 0);
+ next;
+ }
+
+
+ if($name eq "byterun" and $args eq "struct bytestream bs") {
+ next;
+ }
+
+ # foo(void);
+ if ($args eq "void") {
+ print OUTFILE <<ENDCODE;
+
+#undef $name
+EXTERN_C $type $funcName ()
+{
+$return pPerl->$funcName();
+}
+
+ENDCODE
+ print OUTFILE "#endif\n" unless ($separateObj == 0);
+ next;
+ }
+
+ # foo(char *s, const int bar);
+ print OUTFILE <<ENDCODE;
+
+#undef $name
+EXTERN_C $type $funcName ($args)
+{
+ENDCODE
+ print OUTFILE "$return pPerl->$funcName";
+ $doneone = 0;
+ foreach $arg (@args) {
+ if ($arg =~ /(\w+)\W*$/) {
+ if ($doneone) {
+ print OUTFILE ", $1";
+ }
+ else {
+ print OUTFILE "($1";
+ $doneone++;
+ }
+ }
+ }
+ print OUTFILE ");\n}\n";
+ print OUTFILE "#endif\n" unless ($separateObj == 0);
+ }
+ else {
+ print "failed to match $_";
+ }
+ }
+}
+
+close INFILE;
+
+%skip_list = ();
+
+skip_these [qw(
+strchop
+filemode
+lastfd
+oldname
+curinterp
+Argv
+Cmd
+sortcop
+sortstash
+firstgv
+secondgv
+sortstack
+signalstack
+mystrk
+dumplvl
+oldlastpm
+gensym
+preambled
+preambleav
+Ilaststatval
+Ilaststype
+mess_sv
+ors
+opsave
+eval_mutex
+strtab_mutex
+orslen
+ofmt
+modcount
+generation
+DBcv
+archpat_auto
+sortcxix
+lastgotoprobe
+regdummy
+regcomp_parse
+regxend
+regcode
+regnaughty
+regsawback
+regprecomp
+regnpar
+regsize
+regflags
+regseen
+seen_zerolen
+regcomp_rx
+extralen
+colorset
+colors
+reginput
+regbol
+regeol
+regstartp
+regendp
+reglastparen
+regtill
+regprev
+reg_start_tmp
+reg_start_tmpl
+regdata
+bostr
+reg_flags
+reg_eval_set
+regnarrate
+regprogram
+regindent
+regcc
+in_clean_objs
+in_clean_all
+linestart
+pending_ident
+statusvalue_vms
+sublex_info
+thrsv
+threadnum
+PL_piMem
+PL_piENV
+PL_piStdIO
+PL_piLIO
+PL_piDir
+PL_piSock
+PL_piProc
+cshname
+threadsv_names
+thread
+nthreads
+thr_key
+threads_mutex
+malloc_mutex
+svref_mutex
+sv_mutex
+cred_mutex
+nthreads_cond
+eval_cond
+cryptseen
+cshlen
+)];
+
+sub readvars(\%$$) {
+ my ($syms, $file, $pre) = @_;
+ %$syms = ();
+ local (*FILE, $_);
+ open(FILE, "< $file")
+ or die "$0: Can't open $file: $!\n";
+ while (<FILE>) {
+ s/[ \t]*#.*//; # Delete comments.
+ if (/PERLVARI?C?\($pre(\w+),\s*([^,)]+)/) {
+ $$syms{$1} = $2;
+ }
+ }
+ close(FILE);
+}
+
+my %intrp;
+my %thread;
+my %globvar;
+
+readvars %intrp, '..\intrpvar.h','I';
+readvars %thread, '..\thrdvar.h','T';
+readvars %globvar, '..\perlvars.h','G';
+
+open(HDRFILE, ">$hdrfile") or die "$0: Can't open $hdrfile: $!\n";
+print HDRFILE <<ENDCODE;
+EXTERN_C void SetCPerlObj(void* pP);
+EXTERN_C CV* Perl_newXS(char* name, void (*subaddr)(CV* cv), char* filename);
+
+ENDCODE
+
+sub DoVariable($$) {
+ my $name = shift;
+ my $type = shift;
+
+ return if (defined $skip_list{$name});
+ return if ($type eq 'struct perl_thread *');
+
+ print OUTFILE "\n#ifdef $name" . "_defined" unless ($separateObj == 0);
+ print OUTFILE <<ENDCODE;
+#undef PL_$name
+EXTERN_C $type * _PL_$name ()
+{
+ return (($type *)&pPerl->PL_$name);
+}
+
+ENDCODE
+
+ print OUTFILE "#endif\n" unless ($separateObj == 0);
+
+ print HDRFILE <<ENDCODE;
+
+#undef PL_$name
+EXTERN_C $type * _PL_$name ();
+#define PL_$name (*_PL_$name())
+
+ENDCODE
+
+}
+
+foreach $key (keys %intrp) {
+ DoVariable ($key, $intrp{$key});
+}
+
+foreach $key (keys %thread) {
+ DoVariable ($key, $thread{$key});
+}
+
+foreach $key (keys %globvar) {
+ DoVariable ($key, $globvar{$key});
+}
+
+print OUTFILE <<EOCODE;
+
+START_EXTERN_C
+
+char ** _Perl_op_desc(void)
+{
+ return pPerl->Perl_get_op_descs();
+}
+
+char ** _Perl_op_name(void)
+{
+ return pPerl->Perl_get_op_names();
+}
+
+char * _Perl_no_modify(void)
+{
+ return pPerl->Perl_get_no_modify();
+}
+
+U32 * _Perl_opargs(void)
+{
+ return pPerl->Perl_get_opargs();
+}
+
+void xs_handler(CV* cv, CPerlObj* p)
+{
+#ifndef NO_XSLOCKS
+ XSLock localLock(p);
+#endif
+ void(*func)(CV*);
+ SV* sv;
+ MAGIC* m = pPerl->Perl_mg_find((SV*)cv, '~');
+ if(m != NULL)
+ {
+ sv = m->mg_obj;
+ if(SvIOK(sv))
+ {
+ func = (void(*)(CV*))SvIVX(sv);
+ }
+ else
+ {
+ func = (void(*)(CV*))pPerl->Perl_sv_2iv(sv);
+ }
+ func(cv);
+ }
+}
+
+EXTERN_C CV* Perl_newXS(char* name, void (*subaddr)(CV* cv), char* filename)
+{
+ CV* cv = pPerl->Perl_newXS(name, xs_handler, filename);
+ pPerl->Perl_sv_magic((SV*)cv, pPerl->Perl_sv_2mortal(pPerl->Perl_newSViv((IV)subaddr)), '~', "CAPI", 4);
+ return cv;
+}
+
+
+void Perl_deb(const char pat, ...)
+{
+}
+
+#undef PL_piMem
+#undef PL_piENV
+#undef PL_piStdIO
+#undef PL_piLIO
+#undef PL_piDir
+#undef PL_piSock
+#undef PL_piProc
+
+int * _win32_errno(void)
+{
+ return &pPerl->ErrorNo();
+}
+
+FILE* _win32_stdin(void)
+{
+ return (FILE*)pPerl->PL_piStdIO->Stdin();
+}
+
+FILE* _win32_stdout(void)
+{
+ return (FILE*)pPerl->PL_piStdIO->Stdout();
+}
+
+FILE* _win32_stderr(void)
+{
+ return (FILE*)pPerl->PL_piStdIO->Stderr();
+}
+
+int _win32_ferror(FILE *fp)
+{
+ return pPerl->PL_piStdIO->Error((PerlIO*)fp, ErrorNo());
+}
+
+int _win32_feof(FILE *fp)
+{
+ return pPerl->PL_piStdIO->Eof((PerlIO*)fp, ErrorNo());
+}
+
+char* _win32_strerror(int e)
+{
+ return strerror(e);
+}
+
+void _win32_perror(const char *str)
+{
+ perror(str);
+}
+
+int _win32_vfprintf(FILE *pf, const char *format, va_list arg)
+{
+ return pPerl->PL_piStdIO->Vprintf((PerlIO*)pf, ErrorNo(), format, arg);
+}
+
+int _win32_vprintf(const char *format, va_list arg)
+{
+ return pPerl->PL_piStdIO->Vprintf(pPerl->PL_piStdIO->Stdout(), ErrorNo(), format, arg);
+}
+
+int _win32_fprintf(FILE *pf, const char *format, ...)
+{
+ int ret;
+ va_list args;
+ va_start(args, format);
+ ret = _win32_vfprintf(pf, format, args);
+ va_end(args);
+ return ret;
+}
+
+int _win32_printf(const char *format, ...)
+{
+ int ret;
+ va_list args;
+ va_start(args, format);
+ ret = _win32_vprintf(format, args);
+ va_end(args);
+ return ret;
+}
+
+size_t _win32_fread(void *buf, size_t size, size_t count, FILE *pf)
+{
+ return pPerl->PL_piStdIO->Read((PerlIO*)pf, buf, (size*count), ErrorNo());
+}
+
+size_t _win32_fwrite(const void *buf, size_t size, size_t count, FILE *pf)
+{
+ return pPerl->PL_piStdIO->Write((PerlIO*)pf, buf, (size*count), ErrorNo());
+}
+
+FILE* _win32_fopen(const char *path, const char *mode)
+{
+ return (FILE*)pPerl->PL_piStdIO->Open(path, mode, ErrorNo());
+}
+
+FILE* _win32_fdopen(int fh, const char *mode)
+{
+ return (FILE*)pPerl->PL_piStdIO->Fdopen(fh, mode, ErrorNo());
+}
+
+FILE* _win32_freopen(const char *path, const char *mode, FILE *pf)
+{
+ return (FILE*)pPerl->PL_piStdIO->Reopen(path, mode, (PerlIO*)pf, ErrorNo());
+}
+
+int _win32_fclose(FILE *pf)
+{
+ return pPerl->PL_piStdIO->Close((PerlIO*)pf, ErrorNo());
+}
+
+int _win32_fputs(const char *s,FILE *pf)
+{
+ return pPerl->PL_piStdIO->Puts((PerlIO*)pf, s, ErrorNo());
+}
+
+int _win32_fputc(int c,FILE *pf)
+{
+ return pPerl->PL_piStdIO->Putc((PerlIO*)pf, c, ErrorNo());
+}
+
+int _win32_ungetc(int c,FILE *pf)
+{
+ return pPerl->PL_piStdIO->Ungetc((PerlIO*)pf, c, ErrorNo());
+}
+
+int _win32_getc(FILE *pf)
+{
+ return pPerl->PL_piStdIO->Getc((PerlIO*)pf, ErrorNo());
+}
+
+int _win32_fileno(FILE *pf)
+{
+ return pPerl->PL_piStdIO->Fileno((PerlIO*)pf, ErrorNo());
+}
+
+void _win32_clearerr(FILE *pf)
+{
+ pPerl->PL_piStdIO->Clearerr((PerlIO*)pf, ErrorNo());
+}
+
+int _win32_fflush(FILE *pf)
+{
+ return pPerl->PL_piStdIO->Flush((PerlIO*)pf, ErrorNo());
+}
+
+long _win32_ftell(FILE *pf)
+{
+ return pPerl->PL_piStdIO->Tell((PerlIO*)pf, ErrorNo());
+}
+
+int _win32_fseek(FILE *pf,long offset,int origin)
+{
+ return pPerl->PL_piStdIO->Seek((PerlIO*)pf, offset, origin, ErrorNo());
+}
+
+int _win32_fgetpos(FILE *pf,fpos_t *p)
+{
+ return pPerl->PL_piStdIO->Getpos((PerlIO*)pf, p, ErrorNo());
+}
+
+int _win32_fsetpos(FILE *pf,const fpos_t *p)
+{
+ return pPerl->PL_piStdIO->Setpos((PerlIO*)pf, p, ErrorNo());
+}
+
+void _win32_rewind(FILE *pf)
+{
+ pPerl->PL_piStdIO->Rewind((PerlIO*)pf, ErrorNo());
+}
+
+FILE* _win32_tmpfile(void)
+{
+ return (FILE*)pPerl->PL_piStdIO->Tmpfile(ErrorNo());
+}
+
+void _win32_setbuf(FILE *pf, char *buf)
+{
+ pPerl->PL_piStdIO->SetBuf((PerlIO*)pf, buf, ErrorNo());
+}
+
+int _win32_setvbuf(FILE *pf, char *buf, int type, size_t size)
+{
+ return pPerl->PL_piStdIO->SetVBuf((PerlIO*)pf, buf, type, size, ErrorNo());
+}
+
+char* _win32_fgets(char *s, int n, FILE *pf)
+{
+ return pPerl->PL_piStdIO->Gets((PerlIO*)pf, s, n, ErrorNo());
+}
+
+char* _win32_gets(char *s)
+{
+ return _win32_fgets(s, 80, (FILE*)pPerl->PL_piStdIO->Stdin());
+}
+
+int _win32_fgetc(FILE *pf)
+{
+ return pPerl->PL_piStdIO->Getc((PerlIO*)pf, ErrorNo());
+}
+
+int _win32_putc(int c, FILE *pf)
+{
+ return pPerl->PL_piStdIO->Putc((PerlIO*)pf, c, ErrorNo());
+}
+
+int _win32_puts(const char *s)
+{
+ return pPerl->PL_piStdIO->Puts(pPerl->PL_piStdIO->Stdout(), s, ErrorNo());
+}
+
+int _win32_getchar(void)
+{
+ return pPerl->PL_piStdIO->Getc(pPerl->PL_piStdIO->Stdin(), ErrorNo());
+}
+
+int _win32_putchar(int c)
+{
+ return pPerl->PL_piStdIO->Putc(pPerl->PL_piStdIO->Stdout(), c, ErrorNo());
+}
+
+void* _win32_malloc(size_t size)
+{
+ return pPerl->PL_piMem->Malloc(size);
+}
+
+void* _win32_calloc(size_t numitems, size_t size)
+{
+ return pPerl->PL_piMem->Malloc(numitems*size);
+}
+
+void* _win32_realloc(void *block, size_t size)
+{
+ return pPerl->PL_piMem->Realloc(block, size);
+}
+
+void _win32_free(void *block)
+{
+ pPerl->PL_piMem->Free(block);
+}
+
+void _win32_abort(void)
+{
+ pPerl->PL_piProc->Abort();
+}
+
+int _win32_pipe(int *phandles, unsigned int psize, int textmode)
+{
+ return pPerl->PL_piProc->Pipe(phandles);
+}
+
+FILE* _win32_popen(const char *command, const char *mode)
+{
+ return (FILE*)pPerl->PL_piProc->Popen(command, mode);
+}
+
+int _win32_pclose(FILE *pf)
+{
+ return pPerl->PL_piProc->Pclose((PerlIO*)pf);
+}
+
+unsigned _win32_sleep(unsigned int t)
+{
+ return pPerl->PL_piProc->Sleep(t);
+}
+
+int _win32_spawnvp(int mode, const char *cmdname, const char *const *argv)
+{
+ return pPerl->PL_piProc->Spawnvp(mode, cmdname, argv);
+}
+
+int _win32_mkdir(const char *dir, int mode)
+{
+ return pPerl->PL_piDir->Makedir(dir, mode, ErrorNo());
+}
+
+int _win32_rmdir(const char *dir)
+{
+ return pPerl->PL_piDir->Rmdir(dir, ErrorNo());
+}
+
+int _win32_chdir(const char *dir)
+{
+ return pPerl->PL_piDir->Chdir(dir, ErrorNo());
+}
+
+#undef stat
+int _win32_fstat(int fd,struct stat *sbufptr)
+{
+ return pPerl->PL_piLIO->FileStat(fd, sbufptr, ErrorNo());
+}
+
+int _win32_stat(const char *name,struct stat *sbufptr)
+{
+ return pPerl->PL_piLIO->NameStat(name, sbufptr, ErrorNo());
+}
+
+int _win32_rename(const char *oname, const char *newname)
+{
+ return pPerl->PL_piLIO->Rename(oname, newname, ErrorNo());
+}
+
+int _win32_setmode(int fd, int mode)
+{
+ return pPerl->PL_piLIO->Setmode(fd, mode, ErrorNo());
+}
+
+long _win32_lseek(int fd, long offset, int origin)
+{
+ return pPerl->PL_piLIO->Lseek(fd, offset, origin, ErrorNo());
+}
+
+long _win32_tell(int fd)
+{
+ return pPerl->PL_piStdIO->Tell((PerlIO*)fd, ErrorNo());
+}
+
+int _win32_dup(int fd)
+{
+ return pPerl->PL_piLIO->Dup(fd, ErrorNo());
+}
+
+int _win32_dup2(int h1, int h2)
+{
+ return pPerl->PL_piLIO->Dup2(h1, h2, ErrorNo());
+}
+
+int _win32_open(const char *path, int oflag,...)
+{
+ return pPerl->PL_piLIO->Open(path, oflag, ErrorNo());
+}
+
+int _win32_close(int fd)
+{
+ return pPerl->PL_piLIO->Close(fd, ErrorNo());
+}
+
+int _win32_read(int fd, void *buf, unsigned int cnt)
+{
+ return pPerl->PL_piLIO->Read(fd, buf, cnt, ErrorNo());
+}
+
+int _win32_write(int fd, const void *buf, unsigned int cnt)
+{
+ return pPerl->PL_piLIO->Write(fd, buf, cnt, ErrorNo());
+}
+
+int _win32_times(struct tms *timebuf)
+{
+ return pPerl->PL_piProc->Times(timebuf);
+}
+
+int _win32_ioctl(int i, unsigned int u, char *data)
+{
+ return pPerl->PL_piLIO->IOCtl(i, u, data, ErrorNo());
+}
+
+int _win32_utime(const char *f, struct utimbuf *t)
+{
+ return pPerl->PL_piLIO->Utime((char*)f, t, ErrorNo());
+}
+
+char* _win32_getenv(const char *name)
+{
+ return pPerl->PL_piENV->Getenv(name, ErrorNo());
+}
+
+int _win32_putenv(const char *name)
+{
+ return pPerl->PL_piENV->Putenv(name, ErrorNo());
+}
+
+int _win32_open_osfhandle(long handle, int flags)
+{
+ return pPerl->PL_piStdIO->OpenOSfhandle(handle, flags);
+}
+
+long _win32_get_osfhandle(int fd)
+{
+ return pPerl->PL_piStdIO->GetOSfhandle(fd);
+}
+
+u_long _win32_htonl (u_long hostlong)
+{
+ return pPerl->PL_piSock->Htonl(hostlong);
+}
+
+u_short _win32_htons (u_short hostshort)
+{
+ return pPerl->PL_piSock->Htons(hostshort);
+}
+
+u_long _win32_ntohl (u_long netlong)
+{
+ return pPerl->PL_piSock->Ntohl(netlong);
+}
+
+u_short _win32_ntohs (u_short netshort)
+{
+ return pPerl->PL_piSock->Ntohs(netshort);
+}
+
+unsigned long _win32_inet_addr (const char * cp)
+{
+ return pPerl->PL_piSock->InetAddr(cp, ErrorNo());
+}
+
+char * _win32_inet_ntoa (struct in_addr in)
+{
+ return pPerl->PL_piSock->InetNtoa(in, ErrorNo());
+}
+
+SOCKET _win32_socket (int af, int type, int protocol)
+{
+ return pPerl->PL_piSock->Socket(af, type, protocol, ErrorNo());
+}
+
+int _win32_bind (SOCKET s, const struct sockaddr *addr, int namelen)
+{
+ return pPerl->PL_piSock->Bind(s, addr, namelen, ErrorNo());
+}
+
+int _win32_listen (SOCKET s, int backlog)
+{
+ return pPerl->PL_piSock->Listen(s, backlog, ErrorNo());
+}
+
+SOCKET _win32_accept (SOCKET s, struct sockaddr *addr, int *addrlen)
+{
+ return pPerl->PL_piSock->Accept(s, addr, addrlen, ErrorNo());
+}
+
+int _win32_connect (SOCKET s, const struct sockaddr *name, int namelen)
+{
+ return pPerl->PL_piSock->Connect(s, name, namelen, ErrorNo());
+}
+
+int _win32_send (SOCKET s, const char * buf, int len, int flags)
+{
+ return pPerl->PL_piSock->Send(s, buf, len, flags, ErrorNo());
+}
+
+int _win32_sendto (SOCKET s, const char * buf, int len, int flags,
+ const struct sockaddr *to, int tolen)
+{
+ return pPerl->PL_piSock->Sendto(s, buf, len, flags, to, tolen, ErrorNo());
+}
+
+int _win32_recv (SOCKET s, char * buf, int len, int flags)
+{
+ return pPerl->PL_piSock->Recv(s, buf, len, flags, ErrorNo());
+}
+
+int _win32_recvfrom (SOCKET s, char * buf, int len, int flags,
+ struct sockaddr *from, int * fromlen)
+{
+ return pPerl->PL_piSock->Recvfrom(s, buf, len, flags, from, fromlen, ErrorNo());
+}
+
+int _win32_shutdown (SOCKET s, int how)
+{
+ return pPerl->PL_piSock->Shutdown(s, how, ErrorNo());
+}
+
+int _win32_closesocket (SOCKET s)
+{
+ return pPerl->PL_piSock->Closesocket(s, ErrorNo());
+}
+
+int _win32_ioctlsocket (SOCKET s, long cmd, u_long *argp)
+{
+ return pPerl->PL_piSock->Ioctlsocket(s, cmd, argp, ErrorNo());
+}
+
+int _win32_setsockopt (SOCKET s, int level, int optname,
+ const char * optval, int optlen)
+{
+ return pPerl->PL_piSock->Setsockopt(s, level, optname, optval, optlen, ErrorNo());
+}
+
+int _win32_getsockopt (SOCKET s, int level, int optname, char * optval, int *optlen)
+{
+ return pPerl->PL_piSock->Getsockopt(s, level, optname, optval, optlen, ErrorNo());
+}
+
+int _win32_getpeername (SOCKET s, struct sockaddr *name, int * namelen)
+{
+ return pPerl->PL_piSock->Getpeername(s, name, namelen, ErrorNo());
+}
+
+int _win32_getsockname (SOCKET s, struct sockaddr *name, int * namelen)
+{
+ return pPerl->PL_piSock->Getsockname(s, name, namelen, ErrorNo());
+}
+
+int _win32_gethostname (char * name, int namelen)
+{
+ return pPerl->PL_piSock->Gethostname(name, namelen, ErrorNo());
+}
+
+struct hostent * _win32_gethostbyname(const char * name)
+{
+ return pPerl->PL_piSock->Gethostbyname(name, ErrorNo());
+}
+
+struct hostent * _win32_gethostbyaddr(const char * addr, int len, int type)
+{
+ return pPerl->PL_piSock->Gethostbyaddr(addr, len, type, ErrorNo());
+}
+
+struct protoent * _win32_getprotobyname(const char * name)
+{
+ return pPerl->PL_piSock->Getprotobyname(name, ErrorNo());
+}
+
+struct protoent * _win32_getprotobynumber(int proto)
+{
+ return pPerl->PL_piSock->Getprotobynumber(proto, ErrorNo());
+}
+
+struct servent * _win32_getservbyname(const char * name, const char * proto)
+{
+ return pPerl->PL_piSock->Getservbyname(name, proto, ErrorNo());
+}
+
+struct servent * _win32_getservbyport(int port, const char * proto)
+{
+ return pPerl->PL_piSock->Getservbyport(port, proto, ErrorNo());
+}
+
+int _win32_select (int nfds, Perl_fd_set *rfds, Perl_fd_set *wfds, Perl_fd_set *xfds,
+ const struct timeval *timeout)
+{
+ return pPerl->PL_piSock->Select(nfds, (char*)rfds, (char*)wfds, (char*)xfds, timeout, ErrorNo());
+}
+
+void _win32_endnetent(void)
+{
+ pPerl->PL_piSock->Endnetent(ErrorNo());
+}
+
+void _win32_endhostent(void)
+{
+ pPerl->PL_piSock->Endhostent(ErrorNo());
+}
+
+void _win32_endprotoent(void)
+{
+ pPerl->PL_piSock->Endprotoent(ErrorNo());
+}
+
+void _win32_endservent(void)
+{
+ pPerl->PL_piSock->Endservent(ErrorNo());
+}
+
+struct netent * _win32_getnetent(void)
+{
+ return pPerl->PL_piSock->Getnetent(ErrorNo());
+}
+
+struct netent * _win32_getnetbyname(char *name)
+{
+ return pPerl->PL_piSock->Getnetbyname(name, ErrorNo());
+}
+
+struct netent * _win32_getnetbyaddr(long net, int type)
+{
+ return pPerl->PL_piSock->Getnetbyaddr(net, type, ErrorNo());
+}
+
+struct protoent *_win32_getprotoent(void)
+{
+ return pPerl->PL_piSock->Getprotoent(ErrorNo());
+}
+
+struct servent *_win32_getservent(void)
+{
+ return pPerl->PL_piSock->Getservent(ErrorNo());
+}
+
+void _win32_sethostent(int stayopen)
+{
+ pPerl->PL_piSock->Sethostent(stayopen, ErrorNo());
+}
+
+void _win32_setnetent(int stayopen)
+{
+ pPerl->PL_piSock->Setnetent(stayopen, ErrorNo());
+}
+
+void _win32_setprotoent(int stayopen)
+{
+ pPerl->PL_piSock->Setprotoent(stayopen, ErrorNo());
+}
+
+void _win32_setservent(int stayopen)
+{
+ pPerl->PL_piSock->Setservent(stayopen, ErrorNo());
+}
+END_EXTERN_C
+EOCODE
+
+
+print HDRFILE <<EOCODE;
+
+START_EXTERN_C
+
+#undef Perl_op_desc
+char ** _Perl_op_desc ();
+#define Perl_op_desc (_Perl_op_desc())
+
+#undef Perl_op_name
+char ** _Perl_op_name ();
+#define Perl_op_name (_Perl_op_name())
+
+#undef Perl_no_modify
+char * _Perl_no_modify ();
+#define Perl_no_modify (_Perl_no_modify())
+
+#undef Perl_opargs
+U32 * _Perl_opargs ();
+#define Perl_opargs (_Perl_opargs())
+
+
+#undef win32_errno
+#undef win32_stdin
+#undef win32_stdout
+#undef win32_stderr
+#undef win32_ferror
+#undef win32_feof
+#undef win32_fprintf
+#undef win32_printf
+#undef win32_vfprintf
+#undef win32_vprintf
+#undef win32_fread
+#undef win32_fwrite
+#undef win32_fopen
+#undef win32_fdopen
+#undef win32_freopen
+#undef win32_fclose
+#undef win32_fputs
+#undef win32_fputc
+#undef win32_ungetc
+#undef win32_getc
+#undef win32_fileno
+#undef win32_clearerr
+#undef win32_fflush
+#undef win32_ftell
+#undef win32_fseek
+#undef win32_fgetpos
+#undef win32_fsetpos
+#undef win32_rewind
+#undef win32_tmpfile
+#undef win32_abort
+#undef win32_fstat
+#undef win32_stat
+#undef win32_pipe
+#undef win32_popen
+#undef win32_pclose
+#undef win32_rename
+#undef win32_setmode
+#undef win32_lseek
+#undef win32_tell
+#undef win32_dup
+#undef win32_dup2
+#undef win32_open
+#undef win32_close
+#undef win32_eof
+#undef win32_read
+#undef win32_write
+#undef win32_mkdir
+#undef win32_rmdir
+#undef win32_chdir
+#undef win32_setbuf
+#undef win32_setvbuf
+#undef win32_fgetc
+#undef win32_fgets
+#undef win32_gets
+#undef win32_putc
+#undef win32_puts
+#undef win32_getchar
+#undef win32_putchar
+#undef win32_malloc
+#undef win32_calloc
+#undef win32_realloc
+#undef win32_free
+#undef win32_sleep
+#undef win32_times
+#undef win32_stat
+#undef win32_ioctl
+#undef win32_utime
+#undef win32_getenv
+
+#undef win32_htonl
+#undef win32_htons
+#undef win32_ntohl
+#undef win32_ntohs
+#undef win32_inet_addr
+#undef win32_inet_ntoa
+
+#undef win32_socket
+#undef win32_bind
+#undef win32_listen
+#undef win32_accept
+#undef win32_connect
+#undef win32_send
+#undef win32_sendto
+#undef win32_recv
+#undef win32_recvfrom
+#undef win32_shutdown
+#undef win32_closesocket
+#undef win32_ioctlsocket
+#undef win32_setsockopt
+#undef win32_getsockopt
+#undef win32_getpeername
+#undef win32_getsockname
+#undef win32_gethostname
+#undef win32_gethostbyname
+#undef win32_gethostbyaddr
+#undef win32_getprotobyname
+#undef win32_getprotobynumber
+#undef win32_getservbyname
+#undef win32_getservbyport
+#undef win32_select
+#undef win32_endhostent
+#undef win32_endnetent
+#undef win32_endprotoent
+#undef win32_endservent
+#undef win32_getnetent
+#undef win32_getnetbyname
+#undef win32_getnetbyaddr
+#undef win32_getprotoent
+#undef win32_getservent
+#undef win32_sethostent
+#undef win32_setnetent
+#undef win32_setprotoent
+#undef win32_setservent
+
+#define win32_errno _win32_errno
+#define win32_stdin _win32_stdin
+#define win32_stdout _win32_stdout
+#define win32_stderr _win32_stderr
+#define win32_ferror _win32_ferror
+#define win32_feof _win32_feof
+#define win32_strerror _win32_strerror
+#define win32_perror _win32_perror
+#define win32_fprintf _win32_fprintf
+#define win32_printf _win32_printf
+#define win32_vfprintf _win32_vfprintf
+#define win32_vprintf _win32_vprintf
+#define win32_fread _win32_fread
+#define win32_fwrite _win32_fwrite
+#define win32_fopen _win32_fopen
+#define win32_fdopen _win32_fdopen
+#define win32_freopen _win32_freopen
+#define win32_fclose _win32_fclose
+#define win32_fputs _win32_fputs
+#define win32_fputc _win32_fputc
+#define win32_ungetc _win32_ungetc
+#define win32_getc _win32_getc
+#define win32_fileno _win32_fileno
+#define win32_clearerr _win32_clearerr
+#define win32_fflush _win32_fflush
+#define win32_ftell _win32_ftell
+#define win32_fseek _win32_fseek
+#define win32_fgetpos _win32_fgetpos
+#define win32_fsetpos _win32_fsetpos
+#define win32_rewind _win32_rewind
+#define win32_tmpfile _win32_tmpfile
+#define win32_abort _win32_abort
+#define win32_fstat _win32_fstat
+#define win32_stat _win32_stat
+#define win32_pipe _win32_pipe
+#define win32_popen _win32_popen
+#define win32_pclose _win32_pclose
+#define win32_rename _win32_rename
+#define win32_setmode _win32_setmode
+#define win32_lseek _win32_lseek
+#define win32_tell _win32_tell
+#define win32_dup _win32_dup
+#define win32_dup2 _win32_dup2
+#define win32_open _win32_open
+#define win32_close _win32_close
+#define win32_eof _win32_eof
+#define win32_read _win32_read
+#define win32_write _win32_write
+#define win32_mkdir _win32_mkdir
+#define win32_rmdir _win32_rmdir
+#define win32_chdir _win32_chdir
+#define win32_setbuf _win32_setbuf
+#define win32_setvbuf _win32_setvbuf
+#define win32_fgetc _win32_fgetc
+#define win32_fgets _win32_fgets
+#define win32_gets _win32_gets
+#define win32_putc _win32_putc
+#define win32_puts _win32_puts
+#define win32_getchar _win32_getchar
+#define win32_putchar _win32_putchar
+#define win32_malloc _win32_malloc
+#define win32_calloc _win32_calloc
+#define win32_realloc _win32_realloc
+#define win32_free _win32_free
+#define win32_sleep _win32_sleep
+#define win32_spawnvp _win32_spawnvp
+#define win32_times _win32_times
+#define win32_stat _win32_stat
+#define win32_ioctl _win32_ioctl
+#define win32_utime _win32_utime
+#define win32_getenv _win32_getenv
+#define win32_open_osfhandle _win32_open_osfhandle
+#define win32_get_osfhandle _win32_get_osfhandle
+
+#define win32_htonl _win32_htonl
+#define win32_htons _win32_htons
+#define win32_ntohl _win32_ntohl
+#define win32_ntohs _win32_ntohs
+#define win32_inet_addr _win32_inet_addr
+#define win32_inet_ntoa _win32_inet_ntoa
+
+#define win32_socket _win32_socket
+#define win32_bind _win32_bind
+#define win32_listen _win32_listen
+#define win32_accept _win32_accept
+#define win32_connect _win32_connect
+#define win32_send _win32_send
+#define win32_sendto _win32_sendto
+#define win32_recv _win32_recv
+#define win32_recvfrom _win32_recvfrom
+#define win32_shutdown _win32_shutdown
+#define win32_closesocket _win32_closesocket
+#define win32_ioctlsocket _win32_ioctlsocket
+#define win32_setsockopt _win32_setsockopt
+#define win32_getsockopt _win32_getsockopt
+#define win32_getpeername _win32_getpeername
+#define win32_getsockname _win32_getsockname
+#define win32_gethostname _win32_gethostname
+#define win32_gethostbyname _win32_gethostbyname
+#define win32_gethostbyaddr _win32_gethostbyaddr
+#define win32_getprotobyname _win32_getprotobyname
+#define win32_getprotobynumber _win32_getprotobynumber
+#define win32_getservbyname _win32_getservbyname
+#define win32_getservbyport _win32_getservbyport
+#define win32_select _win32_select
+#define win32_endhostent _win32_endhostent
+#define win32_endnetent _win32_endnetent
+#define win32_endprotoent _win32_endprotoent
+#define win32_endservent _win32_endservent
+#define win32_getnetent _win32_getnetent
+#define win32_getnetbyname _win32_getnetbyname
+#define win32_getnetbyaddr _win32_getnetbyaddr
+#define win32_getprotoent _win32_getprotoent
+#define win32_getservent _win32_getservent
+#define win32_sethostent _win32_sethostent
+#define win32_setnetent _win32_setnetent
+#define win32_setprotoent _win32_setprotoent
+#define win32_setservent _win32_setservent
+
+int * _win32_errno(void);
+FILE* _win32_stdin(void);
+FILE* _win32_stdout(void);
+FILE* _win32_stderr(void);
+int _win32_ferror(FILE *fp);
+int _win32_feof(FILE *fp);
+char* _win32_strerror(int e);
+void _win32_perror(const char *str);
+int _win32_fprintf(FILE *pf, const char *format, ...);
+int _win32_printf(const char *format, ...);
+int _win32_vfprintf(FILE *pf, const char *format, va_list arg);
+int _win32_vprintf(const char *format, va_list arg);
+size_t _win32_fread(void *buf, size_t size, size_t count, FILE *pf);
+size_t _win32_fwrite(const void *buf, size_t size, size_t count, FILE *pf);
+FILE* _win32_fopen(const char *path, const char *mode);
+FILE* _win32_fdopen(int fh, const char *mode);
+FILE* _win32_freopen(const char *path, const char *mode, FILE *pf);
+int _win32_fclose(FILE *pf);
+int _win32_fputs(const char *s,FILE *pf);
+int _win32_fputc(int c,FILE *pf);
+int _win32_ungetc(int c,FILE *pf);
+int _win32_getc(FILE *pf);
+int _win32_fileno(FILE *pf);
+void _win32_clearerr(FILE *pf);
+int _win32_fflush(FILE *pf);
+long _win32_ftell(FILE *pf);
+int _win32_fseek(FILE *pf,long offset,int origin);
+int _win32_fgetpos(FILE *pf,fpos_t *p);
+int _win32_fsetpos(FILE *pf,const fpos_t *p);
+void _win32_rewind(FILE *pf);
+FILE* _win32_tmpfile(void);
+void _win32_abort(void);
+int _win32_fstat(int fd,struct stat *sbufptr);
+int _win32_stat(const char *name,struct stat *sbufptr);
+int _win32_pipe( int *phandles, unsigned int psize, int textmode );
+FILE* _win32_popen( const char *command, const char *mode );
+int _win32_pclose( FILE *pf);
+int _win32_rename( const char *oldname, const char *newname);
+int _win32_setmode( int fd, int mode);
+long _win32_lseek( int fd, long offset, int origin);
+long _win32_tell( int fd);
+int _win32_dup( int fd);
+int _win32_dup2(int h1, int h2);
+int _win32_open(const char *path, int oflag,...);
+int _win32_close(int fd);
+int _win32_eof(int fd);
+int _win32_read(int fd, void *buf, unsigned int cnt);
+int _win32_write(int fd, const void *buf, unsigned int cnt);
+int _win32_mkdir(const char *dir, int mode);
+int _win32_rmdir(const char *dir);
+int _win32_chdir(const char *dir);
+void _win32_setbuf(FILE *pf, char *buf);
+int _win32_setvbuf(FILE *pf, char *buf, int type, size_t size);
+char* _win32_fgets(char *s, int n, FILE *pf);
+char* _win32_gets(char *s);
+int _win32_fgetc(FILE *pf);
+int _win32_putc(int c, FILE *pf);
+int _win32_puts(const char *s);
+int _win32_getchar(void);
+int _win32_putchar(int c);
+void* _win32_malloc(size_t size);
+void* _win32_calloc(size_t numitems, size_t size);
+void* _win32_realloc(void *block, size_t size);
+void _win32_free(void *block);
+unsigned _win32_sleep(unsigned int);
+int _win32_spawnvp(int mode, const char *cmdname, const char *const *argv);
+int _win32_times(struct tms *timebuf);
+int _win32_stat(const char *path, struct stat *buf);
+int _win32_ioctl(int i, unsigned int u, char *data);
+int _win32_utime(const char *f, struct utimbuf *t);
+char* _win32_getenv(const char *name);
+int _win32_open_osfhandle(long handle, int flags);
+long _win32_get_osfhandle(int fd);
+
+u_long _win32_htonl (u_long hostlong);
+u_short _win32_htons (u_short hostshort);
+u_long _win32_ntohl (u_long netlong);
+u_short _win32_ntohs (u_short netshort);
+unsigned long _win32_inet_addr (const char * cp);
+char * _win32_inet_ntoa (struct in_addr in);
+
+SOCKET _win32_socket (int af, int type, int protocol);
+int _win32_bind (SOCKET s, const struct sockaddr *addr, int namelen);
+int _win32_listen (SOCKET s, int backlog);
+SOCKET _win32_accept (SOCKET s, struct sockaddr *addr, int *addrlen);
+int _win32_connect (SOCKET s, const struct sockaddr *name, int namelen);
+int _win32_send (SOCKET s, const char * buf, int len, int flags);
+int _win32_sendto (SOCKET s, const char * buf, int len, int flags,
+ const struct sockaddr *to, int tolen);
+int _win32_recv (SOCKET s, char * buf, int len, int flags);
+int _win32_recvfrom (SOCKET s, char * buf, int len, int flags,
+ struct sockaddr *from, int * fromlen);
+int _win32_shutdown (SOCKET s, int how);
+int _win32_closesocket (SOCKET s);
+int _win32_ioctlsocket (SOCKET s, long cmd, u_long *argp);
+int _win32_setsockopt (SOCKET s, int level, int optname,
+ const char * optval, int optlen);
+int _win32_getsockopt (SOCKET s, int level, int optname, char * optval, int *optlen);
+int _win32_getpeername (SOCKET s, struct sockaddr *name, int * namelen);
+int _win32_getsockname (SOCKET s, struct sockaddr *name, int * namelen);
+int _win32_gethostname (char * name, int namelen);
+struct hostent * _win32_gethostbyname(const char * name);
+struct hostent * _win32_gethostbyaddr(const char * addr, int len, int type);
+struct protoent * _win32_getprotobyname(const char * name);
+struct protoent * _win32_getprotobynumber(int proto);
+struct servent * _win32_getservbyname(const char * name, const char * proto);
+struct servent * _win32_getservbyport(int port, const char * proto);
+int _win32_select (int nfds, Perl_fd_set *rfds, Perl_fd_set *wfds, Perl_fd_set *xfds,
+ const struct timeval *timeout);
+void _win32_endnetent(void);
+void _win32_endhostent(void);
+void _win32_endprotoent(void);
+void _win32_endservent(void);
+struct netent * _win32_getnetent(void);
+struct netent * _win32_getnetbyname(char *name);
+struct netent * _win32_getnetbyaddr(long net, int type);
+struct protoent *_win32_getprotoent(void);
+struct servent *_win32_getservent(void);
+void _win32_sethostent(int stayopen);
+void _win32_setnetent(int stayopen);
+void _win32_setprotoent(int stayopen);
+void _win32_setservent(int stayopen);
+
+END_EXTERN_C
+
+#pragma warning(once : 4113)
+EOCODE
+
+
+close HDRFILE;
+close OUTFILE;
diff --git a/gnu/usr.bin/perl/win32/bin/perlglob.pl b/gnu/usr.bin/perl/win32/bin/perlglob.pl
new file mode 100644
index 00000000000..6467e573b5f
--- /dev/null
+++ b/gnu/usr.bin/perl/win32/bin/perlglob.pl
@@ -0,0 +1,53 @@
+#!perl -w
+use File::DosGlob;
+$| = 1;
+while (@ARGV) {
+ my $arg = shift;
+ my @m = File::DosGlob::doglob(1,$arg);
+ print (@m ? join("\0", sort @m) : $arg);
+ print "\0" if @ARGV;
+}
+__END__
+
+=head1 NAME
+
+perlglob.bat - a more capable perlglob.exe replacement
+
+=head1 SYNOPSIS
+
+ @perlfiles = glob "..\\pe?l/*.p?";
+ print <..\\pe?l/*.p?>;
+
+ # more efficient version
+ > perl -MFile::DosGlob=glob -e "print <../pe?l/*.p?>"
+
+=head1 DESCRIPTION
+
+This file is a portable replacement for perlglob.exe. It
+is largely compatible with perlglob.exe (the Microsoft setargv.obj
+version) in all but one respect--it understands wildcards in
+directory components.
+
+It prints null-separated filenames to standard output.
+
+For details of the globbing features implemented, see
+L<File::DosGlob>.
+
+While one may replace perlglob.exe with this, usage by overriding
+CORE::glob with File::DosGlob::glob should be much more efficient,
+because it avoids launching a separate process, and is therefore
+strongly recommended. See L<perlsub> for details of overriding
+builtins.
+
+=head1 AUTHOR
+
+Gurusamy Sarathy <gsar@umich.edu>
+
+=head1 SEE ALSO
+
+perl
+
+File::DosGlob
+
+=cut
+
diff --git a/gnu/usr.bin/perl/win32/config.gc b/gnu/usr.bin/perl/win32/config.gc
new file mode 100644
index 00000000000..b43c511013a
--- /dev/null
+++ b/gnu/usr.bin/perl/win32/config.gc
@@ -0,0 +1,563 @@
+## Configured by: ~cf_email~
+## Target system: WIN32
+Author=''
+CONFIG='true'
+Date='$Date'
+Header=''
+Id='$Id'
+Locker=''
+Log='$Log'
+Mcc='Mcc'
+PATCHLEVEL='~PATCHLEVEL~'
+RCSfile='$RCSfile'
+Revision='$Revision'
+SUBVERSION='~SUBVERSION~'
+Source=''
+State=''
+_a='.a'
+_exe='.exe'
+_o='.o'
+afs='false'
+alignbytes='8'
+ansi2knr=''
+aphostname=''
+apiversion='5.005'
+ar='ar'
+archlib='~INST_TOP~~INST_VER~\lib\~archname~'
+archlibexp='~INST_TOP~~INST_VER~\lib\~archname~'
+archname='MSWin32'
+archobjs=''
+awk='awk'
+baserev='5.0'
+bash=''
+bin='~INST_TOP~~INST_VER~\bin\~archname~'
+binexp='~INST_TOP~~INST_VER~\bin\~archname~'
+bison=''
+byacc='byacc'
+byteorder='1234'
+c=''
+castflags='0'
+cat='type'
+cc='gcc'
+cccdlflags=' '
+ccdlflags=' '
+ccflags='-MD -DWIN32'
+cf_by='nobody'
+cf_email='nobody@no.where.net'
+cf_time=''
+chgrp=''
+chmod=''
+chown=''
+clocktype='clock_t'
+comm=''
+compress=''
+contains='grep'
+cp='copy'
+cpio=''
+cpp='gcc -E'
+cpp_stuff='42'
+cppflags='-DWIN32'
+cpplast=''
+cppminus='-'
+cpprun='gcc -E'
+cppstdin='gcc -E'
+cryptlib=''
+csh='undef'
+d_Gconvert='sprintf((b),"%.*g",(n),(x))'
+d_access='define'
+d_alarm='undef'
+d_archlib='define'
+d_attribut='define'
+d_bcmp='undef'
+d_bcopy='undef'
+d_bsd='define'
+d_bsdgetpgrp='undef'
+d_bsdsetpgrp='undef'
+d_bzero='undef'
+d_casti32='define'
+d_castneg='define'
+d_charvspr='undef'
+d_chown='undef'
+d_chroot='undef'
+d_chsize='define'
+d_closedir='define'
+d_const='define'
+d_crypt='undef'
+d_csh='undef'
+d_cuserid='undef'
+d_dbl_dig='define'
+d_difftime='define'
+d_dirnamlen='define'
+d_dlerror='define'
+d_dlopen='define'
+d_dlsymun='undef'
+d_dosuid='undef'
+d_dup2='define'
+d_endgrent='undef'
+d_endhent='undef'
+d_endnent='undef'
+d_endpent='undef'
+d_endpwent='undef'
+d_endsent='undef'
+d_eofnblk='define'
+d_eunice='undef'
+d_fchmod='undef'
+d_fchown='undef'
+d_fcntl='undef'
+d_fd_macros='define'
+d_fd_set='define'
+d_fds_bits='define'
+d_fgetpos='define'
+d_flexfnam='define'
+d_flock='define'
+d_fork='undef'
+d_fpathconf='undef'
+d_fsetpos='define'
+d_ftime='define'
+d_getgrent='undef'
+d_getgrps='undef'
+d_gethbyaddr='define'
+d_gethbyname='define'
+d_gethent='undef'
+d_gethname='define'
+d_gethostprotos='define'
+d_getlogin='define'
+d_getnbyaddr='undef'
+d_getnbyname='undef'
+d_getnent='undef'
+d_getnetprotos='undef'
+d_getpbyname='define'
+d_getpbynumber='define'
+d_getpent='undef'
+d_getpwent='undef'
+d_getpgid='undef'
+d_getpgrp2='undef'
+d_getpgrp='undef'
+d_getppid='undef'
+d_getprior='undef'
+d_getprotoprotos='define'
+d_getsbyname='define'
+d_getsbyport='define'
+d_getsent='undef'
+d_getservprotos='define'
+d_gettimeod='undef'
+d_grpasswd='undef'
+d_gnulibc='undef'
+d_htonl='define'
+d_index='undef'
+d_inetaton='undef'
+d_isascii='define'
+d_killpg='undef'
+d_lchown='undef'
+d_link='undef'
+d_locconv='define'
+d_lockf='undef'
+d_longdbl='define'
+d_longlong='undef'
+d_lstat='undef'
+d_mblen='define'
+d_mbstowcs='define'
+d_mbtowc='define'
+d_memcmp='define'
+d_memcpy='define'
+d_memmove='define'
+d_memset='define'
+d_mkdir='define'
+d_mkfifo='undef'
+d_mktime='define'
+d_msg='undef'
+d_msgctl='undef'
+d_msgget='undef'
+d_msgrcv='undef'
+d_msgsnd='undef'
+d_mymalloc='undef'
+d_nice='undef'
+d_oldpthreads='undef'
+d_oldsock='undef'
+d_open3='undef'
+d_pathconf='undef'
+d_pause='define'
+d_phostname='undef'
+d_pipe='define'
+d_poll='undef'
+d_portable='define'
+d_pthread_yield='undef'
+d_pthreads_created_joinable='undef'
+d_pwage='undef'
+d_pwchange='undef'
+d_pwclass='undef'
+d_pwcomment='undef'
+d_pwexpire='undef'
+d_pwgecos='undef'
+d_pwquota='undef'
+d_pwpasswd='undef'
+d_readdir='define'
+d_readlink='undef'
+d_rename='define'
+d_rewinddir='define'
+d_rmdir='define'
+d_safebcpy='undef'
+d_safemcpy='undef'
+d_sanemcmp='define'
+d_sched_yield='undef'
+d_seekdir='define'
+d_select='define'
+d_sem='undef'
+d_semctl='undef'
+d_semctl_semid_ds='undef'
+d_semctl_semun='undef'
+d_semget='undef'
+d_semop='undef'
+d_setegid='undef'
+d_seteuid='undef'
+d_setgrent='undef'
+d_setgrps='undef'
+d_sethent='undef'
+d_setpwent='undef'
+d_setlinebuf='undef'
+d_setlocale='define'
+d_setnent='undef'
+d_setpent='undef'
+d_setpgid='undef'
+d_setpgrp2='undef'
+d_setpgrp='undef'
+d_setprior='undef'
+d_setregid='undef'
+d_setresgid='undef'
+d_setresuid='undef'
+d_setreuid='undef'
+d_setrgid='undef'
+d_setruid='undef'
+d_setsent='undef'
+d_setsid='undef'
+d_setvbuf='define'
+d_sfio='undef'
+d_shm='undef'
+d_shmat='undef'
+d_shmatprototype='undef'
+d_shmctl='undef'
+d_shmdt='undef'
+d_shmget='undef'
+d_sigaction='undef'
+d_sigsetjmp='undef'
+d_socket='define'
+d_sockpair='undef'
+d_statblks='undef'
+d_stdio_cnt_lval='define'
+d_stdio_ptr_lval='define'
+d_stdiobase='undef'
+d_stdstdio='undef'
+d_strchr='define'
+d_strcoll='define'
+d_strctcpy='define'
+d_strerrm='strerror(e)'
+d_strerror='define'
+d_strtod='define'
+d_strtol='define'
+d_strtoul='define'
+d_strxfrm='define'
+d_suidsafe='undef'
+d_symlink='undef'
+d_syscall='undef'
+d_sysconf='undef'
+d_sysernlst=''
+d_syserrlst='define'
+d_system='define'
+d_tcgetpgrp='undef'
+d_tcsetpgrp='undef'
+d_telldir='define'
+d_time='define'
+d_times='define'
+d_truncate='undef'
+d_tzname='undef'
+d_umask='define'
+d_uname='undef'
+d_union_semun='define'
+d_vfork='undef'
+d_void_closedir='undef'
+d_voidsig='define'
+d_voidtty=''
+d_volatile='define'
+d_vprintf='define'
+d_wait4='undef'
+d_waitpid='define'
+d_wcstombs='define'
+d_wctomb='define'
+d_xenix='undef'
+date='date'
+db_hashtype='int'
+db_prefixtype='int'
+defvoidused='15'
+direntrytype='struct direct'
+dlext='dll'
+dlsrc='dl_win32.xs'
+doublesize='8'
+dynamic_ext='Socket IO Fcntl Opcode SDBM_File attrs Thread'
+eagain='EAGAIN'
+ebcdic='undef'
+echo='echo'
+egrep='egrep'
+emacs=''
+eunicefix=':'
+exe_ext='.exe'
+expr='expr'
+extensions='~static_ext~ ~dynamic_ext~ ~nonxs_ext~'
+find='find'
+firstmakefile='makefile'
+flex=''
+fpostype='fpos_t'
+freetype='void'
+full_csh=''
+full_sed=''
+gccversion=''
+gidtype='gid_t'
+glibpth='/usr/shlib /lib/pa1.1 /usr/lib/large /lib /usr/lib /usr/lib/386 /lib/386 /lib/large /usr/lib/small /lib/small /usr/ccs/lib /usr/ucblib /usr/shlib '
+grep='grep'
+groupcat=''
+groupstype='gid_t'
+gzip='gzip'
+h_fcntl='false'
+h_sysfile='true'
+hint='recommended'
+hostcat='ypcat hosts'
+huge=''
+i_arpainet='define'
+i_bsdioctl=''
+i_db='undef'
+i_dbm='undef'
+i_dirent='define'
+i_dld='undef'
+i_dlfcn='define'
+i_fcntl='define'
+i_float='define'
+i_gdbm='undef'
+i_grp='undef'
+i_limits='define'
+i_locale='define'
+i_malloc='define'
+i_math='define'
+i_memory='undef'
+i_ndbm='undef'
+i_netdb='undef'
+i_neterrno='undef'
+i_niin='undef'
+i_pwd='undef'
+i_rpcsvcdbm='define'
+i_sfio='undef'
+i_sgtty='undef'
+i_stdarg='define'
+i_stddef='define'
+i_stdlib='define'
+i_string='define'
+i_sysdir='undef'
+i_sysfile='undef'
+i_sysfilio='define'
+i_sysin='undef'
+i_sysioctl='undef'
+i_sysndir='undef'
+i_sysparam='undef'
+i_sysresrc='undef'
+i_sysselct='undef'
+i_syssockio=''
+i_sysstat='define'
+i_systime='undef'
+i_systimek='undef'
+i_systimes='undef'
+i_systypes='define'
+i_sysun='undef'
+i_syswait='undef'
+i_termio='undef'
+i_termios='undef'
+i_time='define'
+i_unistd='undef'
+i_utime='define'
+i_values='undef'
+i_varargs='undef'
+i_varhdr='varargs.h'
+i_vfork='undef'
+incpath=''
+inews=''
+installarchlib='~INST_TOP~~INST_VER~\lib\~archname~'
+installbin='~INST_TOP~~INST_VER~\bin\~archname~'
+installman1dir='~INST_TOP~~INST_VER~\man\man1'
+installman3dir='~INST_TOP~~INST_VER~\man\man3'
+installhtmldir='~INST_TOP~~INST_VER~\html'
+installhtmlhelpdir='~INST_TOP~~INST_VER~\htmlhelp'
+installprivlib='~INST_TOP~~INST_VER~\lib'
+installscript='~INST_TOP~~INST_VER~\bin'
+installsitearch='~INST_TOP~\site~INST_VER~\lib\~archname~'
+installsitelib='~INST_TOP~\site~INST_VER~\lib'
+intsize='4'
+known_extensions='DB_File Fcntl GDBM_File NDBM_File ODBM_File Opcode POSIX SDBM_File Socket IO attrs Thread'
+ksh=''
+large=''
+ld='gcc'
+lddlflags='-mdll ~LINK_FLAGS~'
+ldflags='~LINK_FLAGS~'
+less='less'
+lib_ext='.a'
+libc='libcrtdll.a'
+libperl='libperl.a'
+libpth=''
+libs=''
+libswanted='net socket inet nsl nm ndbm gdbm dbm db malloc dl dld ld sun m c cposix posix ndir dir crypt ucb bsd BSD PW x'
+line='line'
+lint=''
+lkflags=''
+ln=''
+lns='copy'
+locincpth='/usr/local/include /opt/local/include /usr/gnu/include /opt/gnu/include /usr/GNU/include /opt/GNU/include'
+loclibpth='/usr/local/lib /opt/local/lib /usr/gnu/lib /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib'
+longdblsize='12'
+longlongsize='8'
+longsize='4'
+lp=''
+lpr=''
+ls='dir'
+lseektype='off_t'
+mail=''
+mailx=''
+make='dmake'
+make_set_make='#'
+mallocobj='malloc.o'
+mallocsrc='malloc.c'
+malloctype='void *'
+man1dir='~INST_TOP~~INST_VER~\man\man1'
+man1direxp='~INST_TOP~~INST_VER~\man\man1'
+man1ext='1'
+man3dir='~INST_TOP~~INST_VER~\man\man3'
+man3direxp='~INST_TOP~~INST_VER~\man\man3'
+man3ext='3'
+medium=''
+mips=''
+mips_type=''
+mkdir='mkdir'
+models='none'
+modetype='mode_t'
+more='more /e'
+mv=''
+myarchname='MSWin32'
+mydomain=''
+myhostname=''
+myuname=''
+n='-n'
+netdb_hlen_type='int'
+netdb_host_type='char *'
+netdb_name_type='char *'
+netdb_net_type='long'
+nm='nm'
+nm_opt=''
+nm_so_opt=''
+nonxs_ext='Errno'
+nroff=''
+o_nonblock='O_NONBLOCK'
+obj_ext='.o'
+optimize='-O2'
+orderlib='false'
+osname='MSWin32'
+osvers='4.0'
+package='perl5'
+pager='more /e'
+passcat=''
+patchlevel='~PATCHLEVEL~'
+path_sep=';'
+perl='perl'
+perladmin=''
+perlpath='~INST_TOP~~INST_VER~\bin\~archname~\perl.exe'
+pg=''
+phostname='hostname'
+pidtype='int'
+plibpth=''
+pmake=''
+pr=''
+prefix='~INST_TOP~'
+prefixexp='~INST_DRV~'
+privlib='~INST_TOP~~INST_VER~\lib'
+privlibexp='~INST_TOP~~INST_VER~\lib'
+prototype='define'
+ptrsize='4'
+randbits='15'
+ranlib='rem'
+rd_nodata='-1'
+rm='del'
+rmail=''
+runnm='true'
+scriptdir='~INST_TOP~~INST_VER~\bin'
+scriptdirexp='~INST_TOP~~INST_VER~\bin'
+sed='sed'
+selecttype='Perl_fd_set *'
+sendmail='blat'
+sh='cmd /x /c'
+shar=''
+sharpbang='#!'
+shmattype='void *'
+shortsize='2'
+shrpenv=''
+shsharp='true'
+sig_name='ZERO NUM01 INT QUIT ILL NUM05 NUM06 NUM07 FPE KILL NUM10 SEGV NUM12 PIPE ALRM TERM NUM16 NUM17 NUM18 NUM19 CHLD BREAK ABRT STOP NUM24 CONT CLD'
+sig_name_init='"ZERO", "NUM01", "INT", "QUIT", "ILL", "NUM05", "NUM06", "NUM07", "FPE", "KILL", "NUM10", "SEGV", "NUM12", "PIPE", "ALRM", "TERM", "NUM16", "NUM17", "NUM18", "NUM19", "CHLD", "BREAK", "ABRT", "STOP", "NUM24", "CONT", "CLD", 0'
+sig_num='0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 20 0'
+sig_num_init='0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 20, 0'
+signal_t='void'
+sitearch='~INST_TOP~\site~INST_VER~\lib\~archname~'
+sitearchexp='~INST_TOP~\site~INST_VER~\lib\~archname~'
+sitelib='~INST_TOP~\site~INST_VER~\lib'
+sitelibexp='~INST_TOP~\site~INST_VER~\lib'
+sizetype='size_t'
+sleep=''
+smail=''
+small=''
+so='dll'
+sockethdr=''
+socketlib=''
+sort='sort'
+spackage='Perl5'
+spitshell=''
+split=''
+src=''
+ssizetype='int'
+startperl='#!perl'
+startsh='#!/bin/sh'
+static_ext='DynaLoader'
+stdchar='char'
+stdio_base='((fp)->_base)'
+stdio_bufsiz='((fp)->_cnt + (fp)->_ptr - (fp)->_base)'
+stdio_cnt='((fp)->_cnt)'
+stdio_filbuf=''
+stdio_ptr='((fp)->_ptr)'
+strings='/usr/include/string.h'
+submit=''
+subversion='~SUBVERSION~'
+sysman='/usr/man/man1'
+tail=''
+tar=''
+tbl=''
+tee=''
+test=''
+timeincl='/usr/include/sys/time.h '
+timetype='time_t'
+touch='touch'
+tr=''
+trnl='\012'
+troff=''
+uidtype='uid_t'
+uname='uname'
+uniq='uniq'
+usedl='define'
+usemymalloc='n'
+usenm='false'
+useopcode='true'
+useperlio='undef'
+useposix='true'
+usesfio='false'
+useshrplib='yes'
+usethreads='undef'
+usevfork='false'
+usrinc='/usr/include'
+uuname=''
+version='~VERSION~'
+vi=''
+voidflags='15'
+xlibpth='/usr/lib/386 /lib/386'
+zcat=''
+zip='zip'
diff --git a/gnu/usr.bin/perl/win32/config_H.gc b/gnu/usr.bin/perl/win32/config_H.gc
new file mode 100644
index 00000000000..0cb45e45841
--- /dev/null
+++ b/gnu/usr.bin/perl/win32/config_H.gc
@@ -0,0 +1,2094 @@
+/*
+ * This file was produced by running the config_h.SH script, which
+ * gets its values from config.sh, which is generally produced by
+ * running Configure.
+ *
+ * Feel free to modify any of this as the need arises. Note, however,
+ * that running config_h.SH again will wipe out any changes you've made.
+ * For a more permanent change edit config.sh and rerun config_h.SH.
+ *
+ * $Id: Config_h.U,v 3.0.1.5 1997/02/28 14:57:43 ram Exp $
+ */
+
+/*
+ * Package name : perl5
+ * Source directory :
+ * Configuration time: undef
+ * Configured by : gsar
+ * Target system :
+ */
+
+#ifndef _config_h_
+#define _config_h_
+
+/* LOC_SED:
+ * This symbol holds the complete pathname to the sed program.
+ */
+#define LOC_SED "" /**/
+
+/* BIN:
+ * This symbol holds the path of the bin directory where the package will
+ * be installed. Program must be prepared to deal with ~name substitution.
+ */
+/* BIN_EXP:
+ * This symbol is the filename expanded version of the BIN symbol, for
+ * programs that do not want to deal with that at run-time.
+ */
+#define BIN "c:\\perl\\5.00503\\bin\\MSWin32-x86" /**/
+#define BIN_EXP "c:\\perl\\5.00503\\bin\\MSWin32-x86" /**/
+
+/* CPPSTDIN:
+ * This symbol contains the first part of the string which will invoke
+ * the C preprocessor on the standard input and produce to standard
+ * output. Typical value of "cc -E" or "/lib/cpp", but it can also
+ * call a wrapper. See CPPRUN.
+ */
+/* CPPMINUS:
+ * This symbol contains the second part of the string which will invoke
+ * the C preprocessor on the standard input and produce to standard
+ * output. This symbol will have the value "-" if CPPSTDIN needs a minus
+ * to specify standard input, otherwise the value is "".
+ */
+#define CPPSTDIN "gcc -E"
+#define CPPMINUS "-"
+
+/* HAS_ALARM:
+ * This symbol, if defined, indicates that the alarm routine is
+ * available.
+ */
+/*#define HAS_ALARM /**/
+
+/* HASATTRIBUTE:
+ * This symbol indicates the C compiler can check for function attributes,
+ * such as printf formats. This is normally only supported by GNU cc.
+ */
+#define HASATTRIBUTE /**/
+#ifndef HASATTRIBUTE
+#define __attribute__(_arg_)
+#endif
+
+/* HAS_BCMP:
+ * This symbol is defined if the bcmp() routine is available to
+ * compare blocks of memory.
+ */
+/*#define HAS_BCMP /**/
+
+/* HAS_BCOPY:
+ * This symbol is defined if the bcopy() routine is available to
+ * copy blocks of memory.
+ */
+/*#define HAS_BCOPY /**/
+
+/* HAS_BZERO:
+ * This symbol is defined if the bzero() routine is available to
+ * set a memory block to 0.
+ */
+/*#define HAS_BZERO /**/
+
+/* HAS_CHOWN:
+ * This symbol, if defined, indicates that the chown routine is
+ * available.
+ */
+/*#define HAS_CHOWN /**/
+
+/* HAS_CHROOT:
+ * This symbol, if defined, indicates that the chroot routine is
+ * available.
+ */
+/*#define HAS_CHROOT /**/
+
+/* HAS_CHSIZE:
+ * This symbol, if defined, indicates that the chsize routine is available
+ * to truncate files. You might need a -lx to get this routine.
+ */
+#define HAS_CHSIZE /**/
+
+/* HASCONST:
+ * This symbol, if defined, indicates that this C compiler knows about
+ * the const type. There is no need to actually test for that symbol
+ * within your programs. The mere use of the "const" keyword will
+ * trigger the necessary tests.
+ */
+#define HASCONST /**/
+#ifndef HASCONST
+#define const
+#endif
+
+/* HAS_CRYPT:
+ * This symbol, if defined, indicates that the crypt routine is available
+ * to encrypt passwords and the like.
+ */
+/*#define HAS_CRYPT /**/
+
+/* HAS_CUSERID:
+ * This symbol, if defined, indicates that the cuserid routine is
+ * available to get character login names.
+ */
+/*#define HAS_CUSERID /**/
+
+/* HAS_DBL_DIG:
+ * This symbol, if defined, indicates that this system's <float.h>
+ * or <limits.h> defines the symbol DBL_DIG, which is the number
+ * of significant digits in a double precision number. If this
+ * symbol is not defined, a guess of 15 is usually pretty good.
+ */
+#define HAS_DBL_DIG /**/
+
+/* HAS_DIFFTIME:
+ * This symbol, if defined, indicates that the difftime routine is
+ * available.
+ */
+#define HAS_DIFFTIME /**/
+
+/* HAS_DLERROR:
+ * This symbol, if defined, indicates that the dlerror routine is
+ * available to return a string describing the last error that
+ * occurred from a call to dlopen(), dlclose() or dlsym().
+ */
+#define HAS_DLERROR /**/
+
+/* SETUID_SCRIPTS_ARE_SECURE_NOW:
+ * This symbol, if defined, indicates that the bug that prevents
+ * setuid scripts from being secure is not present in this kernel.
+ */
+/* DOSUID:
+ * This symbol, if defined, indicates that the C program should
+ * check the script that it is executing for setuid/setgid bits, and
+ * attempt to emulate setuid/setgid on systems that have disabled
+ * setuid #! scripts because the kernel can't do it securely.
+ * It is up to the package designer to make sure that this emulation
+ * is done securely. Among other things, it should do an fstat on
+ * the script it just opened to make sure it really is a setuid/setgid
+ * script, it should make sure the arguments passed correspond exactly
+ * to the argument on the #! line, and it should not trust any
+ * subprocesses to which it must pass the filename rather than the
+ * file descriptor of the script to be executed.
+ */
+/*#define SETUID_SCRIPTS_ARE_SECURE_NOW /**/
+/*#define DOSUID /**/
+
+/* HAS_DUP2:
+ * This symbol, if defined, indicates that the dup2 routine is
+ * available to duplicate file descriptors.
+ */
+#define HAS_DUP2 /**/
+
+/* HAS_FCHMOD:
+ * This symbol, if defined, indicates that the fchmod routine is available
+ * to change mode of opened files. If unavailable, use chmod().
+ */
+/*#define HAS_FCHMOD /**/
+
+/* HAS_FCHOWN:
+ * This symbol, if defined, indicates that the fchown routine is available
+ * to change ownership of opened files. If unavailable, use chown().
+ */
+/*#define HAS_FCHOWN /**/
+
+/* HAS_FCNTL:
+ * This symbol, if defined, indicates to the C program that
+ * the fcntl() function exists.
+ */
+/*#define HAS_FCNTL /**/
+
+/* HAS_FGETPOS:
+ * This symbol, if defined, indicates that the fgetpos routine is
+ * available to get the file position indicator, similar to ftell().
+ */
+#define HAS_FGETPOS /**/
+
+/* FLEXFILENAMES:
+ * This symbol, if defined, indicates that the system supports filenames
+ * longer than 14 characters.
+ */
+#define FLEXFILENAMES /**/
+
+/* HAS_FLOCK:
+ * This symbol, if defined, indicates that the flock routine is
+ * available to do file locking.
+ */
+#define HAS_FLOCK /**/
+
+/* HAS_FORK:
+ * This symbol, if defined, indicates that the fork routine is
+ * available.
+ */
+/*#define HAS_FORK /**/
+
+/* HAS_FSETPOS:
+ * This symbol, if defined, indicates that the fsetpos routine is
+ * available to set the file position indicator, similar to fseek().
+ */
+#define HAS_FSETPOS /**/
+
+/* HAS_GETTIMEOFDAY:
+ * This symbol, if defined, indicates that the gettimeofday() system
+ * call is available for a sub-second accuracy clock. Usually, the file
+ * <sys/resource.h> needs to be included (see I_SYS_RESOURCE).
+ * The type "Timeval" should be used to refer to "struct timeval".
+ */
+/*#define HAS_GETTIMEOFDAY /**/
+#ifdef HAS_GETTIMEOFDAY
+#define Timeval struct timeval /* Structure used by gettimeofday() */
+#endif
+
+/* HAS_GETGROUPS:
+ * This symbol, if defined, indicates that the getgroups() routine is
+ * available to get the list of process groups. If unavailable, multiple
+ * groups are probably not supported.
+ */
+/*#define HAS_GETGROUPS /**/
+
+/* HAS_UNAME:
+ * This symbol, if defined, indicates that the C program may use the
+ * uname() routine to derive the host name. See also HAS_GETHOSTNAME
+ * and PHOSTNAME.
+ */
+/*#define HAS_UNAME /**/
+
+/* HAS_GETLOGIN:
+ * This symbol, if defined, indicates that the getlogin routine is
+ * available to get the login name.
+ */
+#define HAS_GETLOGIN /**/
+
+/* HAS_GETPGID:
+ * This symbol, if defined, indicates to the C program that
+ * the getpgid(pid) function is available to get the
+ * process group id.
+ */
+/*#define HAS_GETPGID /**/
+
+/* HAS_GETPGRP:
+ * This symbol, if defined, indicates that the getpgrp routine is
+ * available to get the current process group.
+ */
+/* USE_BSD_GETPGRP:
+ * This symbol, if defined, indicates that getpgrp needs one
+ * arguments whereas USG one needs none.
+ */
+/*#define HAS_GETPGRP /**/
+/*#define USE_BSD_GETPGRP /**/
+
+/* HAS_GETPGRP2:
+ * This symbol, if defined, indicates that the getpgrp2() (as in DG/UX)
+ * routine is available to get the current process group.
+ */
+/*#define HAS_GETPGRP2 /**/
+
+/* HAS_GETPPID:
+ * This symbol, if defined, indicates that the getppid routine is
+ * available to get the parent process ID.
+ */
+/*#define HAS_GETPPID /**/
+
+/* HAS_GETPRIORITY:
+ * This symbol, if defined, indicates that the getpriority routine is
+ * available to get a process's priority.
+ */
+/*#define HAS_GETPRIORITY /**/
+
+/* HAS_HTONL:
+ * This symbol, if defined, indicates that the htonl() routine (and
+ * friends htons() ntohl() ntohs()) are available to do network
+ * order byte swapping.
+ */
+/* HAS_HTONS:
+ * This symbol, if defined, indicates that the htons() routine (and
+ * friends htonl() ntohl() ntohs()) are available to do network
+ * order byte swapping.
+ */
+/* HAS_NTOHL:
+ * This symbol, if defined, indicates that the ntohl() routine (and
+ * friends htonl() htons() ntohs()) are available to do network
+ * order byte swapping.
+ */
+/* HAS_NTOHS:
+ * This symbol, if defined, indicates that the ntohs() routine (and
+ * friends htonl() htons() ntohl()) are available to do network
+ * order byte swapping.
+ */
+#define HAS_HTONL /**/
+#define HAS_HTONS /**/
+#define HAS_NTOHL /**/
+#define HAS_NTOHS /**/
+
+/* HAS_INET_ATON:
+ * This symbol, if defined, indicates to the C program that the
+ * inet_aton() function is available to parse IP address "dotted-quad"
+ * strings.
+ */
+/*#define HAS_INET_ATON /**/
+
+/* HAS_KILLPG:
+ * This symbol, if defined, indicates that the killpg routine is available
+ * to kill process groups. If unavailable, you probably should use kill
+ * with a negative process number.
+ */
+/*#define HAS_KILLPG /**/
+
+/* HAS_LINK:
+ * This symbol, if defined, indicates that the link routine is
+ * available to create hard links.
+ */
+/*#define HAS_LINK /**/
+
+/* HAS_LOCALECONV:
+ * This symbol, if defined, indicates that the localeconv routine is
+ * available for numeric and monetary formatting conventions.
+ */
+#define HAS_LOCALECONV /**/
+
+/* HAS_LOCKF:
+ * This symbol, if defined, indicates that the lockf routine is
+ * available to do file locking.
+ */
+/*#define HAS_LOCKF /**/
+
+/* HAS_LSTAT:
+ * This symbol, if defined, indicates that the lstat routine is
+ * available to do file stats on symbolic links.
+ */
+/*#define HAS_LSTAT /**/
+
+/* HAS_MBLEN:
+ * This symbol, if defined, indicates that the mblen routine is available
+ * to find the number of bytes in a multibye character.
+ */
+#define HAS_MBLEN /**/
+
+/* HAS_MBSTOWCS:
+ * This symbol, if defined, indicates that the mbstowcs routine is
+ * available to covert a multibyte string into a wide character string.
+ */
+#define HAS_MBSTOWCS /**/
+
+/* HAS_MBTOWC:
+ * This symbol, if defined, indicates that the mbtowc routine is available
+ * to covert a multibyte to a wide character.
+ */
+#define HAS_MBTOWC /**/
+
+/* HAS_MEMCMP:
+ * This symbol, if defined, indicates that the memcmp routine is available
+ * to compare blocks of memory.
+ */
+#define HAS_MEMCMP /**/
+
+/* HAS_MEMCPY:
+ * This symbol, if defined, indicates that the memcpy routine is available
+ * to copy blocks of memory.
+ */
+#define HAS_MEMCPY /**/
+
+/* HAS_MEMMOVE:
+ * This symbol, if defined, indicates that the memmove routine is available
+ * to copy potentially overlapping blocks of memory. This should be used
+ * only when HAS_SAFE_BCOPY is not defined. If neither is there, roll your
+ * own version.
+ */
+#define HAS_MEMMOVE /**/
+
+/* HAS_MEMSET:
+ * This symbol, if defined, indicates that the memset routine is available
+ * to set blocks of memory.
+ */
+#define HAS_MEMSET /**/
+
+/* HAS_MKDIR:
+ * This symbol, if defined, indicates that the mkdir routine is available
+ * to create directories. Otherwise you should fork off a new process to
+ * exec /bin/mkdir.
+ */
+#define HAS_MKDIR /**/
+
+/* HAS_MKFIFO:
+ * This symbol, if defined, indicates that the mkfifo routine is
+ * available to create FIFOs. Otherwise, mknod should be able to
+ * do it for you. However, if mkfifo is there, mknod might require
+ * super-user privileges which mkfifo will not.
+ */
+/*#define HAS_MKFIFO /**/
+
+/* HAS_MKTIME:
+ * This symbol, if defined, indicates that the mktime routine is
+ * available.
+ */
+#define HAS_MKTIME /**/
+
+/* HAS_MSG:
+ * This symbol, if defined, indicates that the entire msg*(2) library is
+ * supported (IPC mechanism based on message queues).
+ */
+/*#define HAS_MSG /**/
+
+/* HAS_NICE:
+ * This symbol, if defined, indicates that the nice routine is
+ * available.
+ */
+/*#define HAS_NICE /**/
+
+/* HAS_PATHCONF:
+ * This symbol, if defined, indicates that pathconf() is available
+ * to determine file-system related limits and options associated
+ * with a given filename.
+ */
+/* HAS_FPATHCONF:
+ * This symbol, if defined, indicates that pathconf() is available
+ * to determine file-system related limits and options associated
+ * with a given open file descriptor.
+ */
+/*#define HAS_PATHCONF /**/
+/*#define HAS_FPATHCONF /**/
+
+/* HAS_PAUSE:
+ * This symbol, if defined, indicates that the pause routine is
+ * available to suspend a process until a signal is received.
+ */
+#define HAS_PAUSE /**/
+
+/* HAS_PIPE:
+ * This symbol, if defined, indicates that the pipe routine is
+ * available to create an inter-process channel.
+ */
+#define HAS_PIPE /**/
+
+/* HAS_POLL:
+ * This symbol, if defined, indicates that the poll routine is
+ * available to poll active file descriptors. You may safely
+ * include <poll.h> when this symbol is defined.
+ */
+/*#define HAS_POLL /**/
+
+/* HAS_READDIR:
+ * This symbol, if defined, indicates that the readdir routine is
+ * available to read directory entries. You may have to include
+ * <dirent.h>. See I_DIRENT.
+ */
+#define HAS_READDIR /**/
+
+/* HAS_SEEKDIR:
+ * This symbol, if defined, indicates that the seekdir routine is
+ * available. You may have to include <dirent.h>. See I_DIRENT.
+ */
+#define HAS_SEEKDIR /**/
+
+/* HAS_TELLDIR:
+ * This symbol, if defined, indicates that the telldir routine is
+ * available. You may have to include <dirent.h>. See I_DIRENT.
+ */
+#define HAS_TELLDIR /**/
+
+/* HAS_REWINDDIR:
+ * This symbol, if defined, indicates that the rewinddir routine is
+ * available. You may have to include <dirent.h>. See I_DIRENT.
+ */
+#define HAS_REWINDDIR /**/
+
+/* HAS_READLINK:
+ * This symbol, if defined, indicates that the readlink routine is
+ * available to read the value of a symbolic link.
+ */
+/*#define HAS_READLINK /**/
+
+/* HAS_RENAME:
+ * This symbol, if defined, indicates that the rename routine is available
+ * to rename files. Otherwise you should do the unlink(), link(), unlink()
+ * trick.
+ */
+#define HAS_RENAME /**/
+
+/* HAS_RMDIR:
+ * This symbol, if defined, indicates that the rmdir routine is
+ * available to remove directories. Otherwise you should fork off a
+ * new process to exec /bin/rmdir.
+ */
+#define HAS_RMDIR /**/
+
+/* HAS_SELECT:
+ * This symbol, if defined, indicates that the select routine is
+ * available to select active file descriptors. If the timeout field
+ * is used, <sys/time.h> may need to be included.
+ */
+#define HAS_SELECT /**/
+
+/* HAS_SEM:
+ * This symbol, if defined, indicates that the entire sem*(2) library is
+ * supported.
+ */
+/*#define HAS_SEM /**/
+
+/* HAS_SETEGID:
+ * This symbol, if defined, indicates that the setegid routine is available
+ * to change the effective gid of the current program.
+ */
+/*#define HAS_SETEGID /**/
+
+/* HAS_SETEUID:
+ * This symbol, if defined, indicates that the seteuid routine is available
+ * to change the effective uid of the current program.
+ */
+/*#define HAS_SETEUID /**/
+
+/* HAS_SETLINEBUF:
+ * This symbol, if defined, indicates that the setlinebuf routine is
+ * available to change stderr or stdout from block-buffered or unbuffered
+ * to a line-buffered mode.
+ */
+/*#define HAS_SETLINEBUF /**/
+
+/* HAS_SETLOCALE:
+ * This symbol, if defined, indicates that the setlocale routine is
+ * available to handle locale-specific ctype implementations.
+ */
+#define HAS_SETLOCALE /**/
+
+/* HAS_SETPGID:
+ * This symbol, if defined, indicates that the setpgid(pid, gpid)
+ * routine is available to set process group ID.
+ */
+/*#define HAS_SETPGID /**/
+
+/* HAS_SETPGRP:
+ * This symbol, if defined, indicates that the setpgrp routine is
+ * available to set the current process group.
+ */
+/* USE_BSD_SETPGRP:
+ * This symbol, if defined, indicates that setpgrp needs two
+ * arguments whereas USG one needs none. See also HAS_SETPGID
+ * for a POSIX interface.
+ */
+/*#define HAS_SETPGRP /**/
+/*#define USE_BSD_SETPGRP /**/
+
+/* HAS_SETPGRP2:
+ * This symbol, if defined, indicates that the setpgrp2() (as in DG/UX)
+ * routine is available to set the current process group.
+ */
+/*#define HAS_SETPGRP2 /**/
+
+/* HAS_SETPRIORITY:
+ * This symbol, if defined, indicates that the setpriority routine is
+ * available to set a process's priority.
+ */
+/*#define HAS_SETPRIORITY /**/
+
+/* HAS_SETREGID:
+ * This symbol, if defined, indicates that the setregid routine is
+ * available to change the real and effective gid of the current
+ * process.
+ */
+/* HAS_SETRESGID:
+ * This symbol, if defined, indicates that the setresgid routine is
+ * available to change the real, effective and saved gid of the current
+ * process.
+ */
+/*#define HAS_SETREGID /**/
+/*#define HAS_SETRESGID /**/
+
+/* HAS_SETREUID:
+ * This symbol, if defined, indicates that the setreuid routine is
+ * available to change the real and effective uid of the current
+ * process.
+ */
+/* HAS_SETRESUID:
+ * This symbol, if defined, indicates that the setresuid routine is
+ * available to change the real, effective and saved uid of the current
+ * process.
+ */
+/*#define HAS_SETREUID /**/
+/*#define HAS_SETRESUID /**/
+
+/* HAS_SETRGID:
+ * This symbol, if defined, indicates that the setrgid routine is available
+ * to change the real gid of the current program.
+ */
+/*#define HAS_SETRGID /**/
+
+/* HAS_SETRUID:
+ * This symbol, if defined, indicates that the setruid routine is available
+ * to change the real uid of the current program.
+ */
+/*#define HAS_SETRUID /**/
+
+/* HAS_SETSID:
+ * This symbol, if defined, indicates that the setsid routine is
+ * available to set the process group ID.
+ */
+/*#define HAS_SETSID /**/
+
+/* HAS_SHM:
+ * This symbol, if defined, indicates that the entire shm*(2) library is
+ * supported.
+ */
+/*#define HAS_SHM /**/
+
+/* Shmat_t:
+ * This symbol holds the return type of the shmat() system call.
+ * Usually set to 'void *' or 'char *'.
+ */
+/* HAS_SHMAT_PROTOTYPE:
+ * This symbol, if defined, indicates that the sys/shm.h includes
+ * a prototype for shmat(). Otherwise, it is up to the program to
+ * guess one. Shmat_t shmat _((int, Shmat_t, int)) is a good guess,
+ * but not always right so it should be emitted by the program only
+ * when HAS_SHMAT_PROTOTYPE is not defined to avoid conflicting defs.
+ */
+#define Shmat_t void * /**/
+/*#define HAS_SHMAT_PROTOTYPE /**/
+
+/* USE_STAT_BLOCKS:
+ * This symbol is defined if this system has a stat structure declaring
+ * st_blksize and st_blocks.
+ */
+/*#define USE_STAT_BLOCKS /**/
+
+/* HAS_STRCHR:
+ * This symbol is defined to indicate that the strchr()/strrchr()
+ * functions are available for string searching. If not, try the
+ * index()/rindex() pair.
+ */
+/* HAS_INDEX:
+ * This symbol is defined to indicate that the index()/rindex()
+ * functions are available for string searching.
+ */
+#define HAS_STRCHR /**/
+/*#define HAS_INDEX /**/
+
+/* HAS_STRCOLL:
+ * This symbol, if defined, indicates that the strcoll routine is
+ * available to compare strings using collating information.
+ */
+#define HAS_STRCOLL /**/
+
+/* USE_STRUCT_COPY:
+ * This symbol, if defined, indicates that this C compiler knows how
+ * to copy structures. If undefined, you'll need to use a block copy
+ * routine of some sort instead.
+ */
+#define USE_STRUCT_COPY /**/
+
+/* HAS_STRERROR:
+ * This symbol, if defined, indicates that the strerror routine is
+ * available to translate error numbers to strings. See the writeup
+ * of Strerror() in this file before you try to define your own.
+ */
+/* HAS_SYS_ERRLIST:
+ * This symbol, if defined, indicates that the sys_errlist array is
+ * available to translate error numbers to strings. The extern int
+ * sys_nerr gives the size of that table.
+ */
+/* Strerror:
+ * This preprocessor symbol is defined as a macro if strerror() is
+ * not available to translate error numbers to strings but sys_errlist[]
+ * array is there.
+ */
+#define HAS_STRERROR /**/
+#define HAS_SYS_ERRLIST /**/
+#define Strerror(e) strerror(e)
+
+/* HAS_STRTOD:
+ * This symbol, if defined, indicates that the strtod routine is
+ * available to provide better numeric string conversion than atof().
+ */
+#define HAS_STRTOD /**/
+
+/* HAS_STRTOL:
+ * This symbol, if defined, indicates that the strtol routine is available
+ * to provide better numeric string conversion than atoi() and friends.
+ */
+#define HAS_STRTOL /**/
+
+/* HAS_STRTOUL:
+ * This symbol, if defined, indicates that the strtoul routine is
+ * available to provide conversion of strings to unsigned long.
+ */
+#define HAS_STRTOUL /**/
+
+/* HAS_STRXFRM:
+ * This symbol, if defined, indicates that the strxfrm() routine is
+ * available to transform strings.
+ */
+#define HAS_STRXFRM /**/
+
+/* HAS_SYMLINK:
+ * This symbol, if defined, indicates that the symlink routine is available
+ * to create symbolic links.
+ */
+/*#define HAS_SYMLINK /**/
+
+/* HAS_SYSCALL:
+ * This symbol, if defined, indicates that the syscall routine is
+ * available to call arbitrary system calls. If undefined, that's tough.
+ */
+/*#define HAS_SYSCALL /**/
+
+/* HAS_SYSCONF:
+ * This symbol, if defined, indicates that sysconf() is available
+ * to determine system related limits and options.
+ */
+/*#define HAS_SYSCONF /**/
+
+/* HAS_SYSTEM:
+ * This symbol, if defined, indicates that the system routine is
+ * available to issue a shell command.
+ */
+#define HAS_SYSTEM /**/
+
+/* HAS_TCGETPGRP:
+ * This symbol, if defined, indicates that the tcgetpgrp routine is
+ * available to get foreground process group ID.
+ */
+/*#define HAS_TCGETPGRP /**/
+
+/* HAS_TCSETPGRP:
+ * This symbol, if defined, indicates that the tcsetpgrp routine is
+ * available to set foreground process group ID.
+ */
+/*#define HAS_TCSETPGRP /**/
+
+/* HAS_TRUNCATE:
+ * This symbol, if defined, indicates that the truncate routine is
+ * available to truncate files.
+ */
+/*#define HAS_TRUNCATE /**/
+
+/* HAS_TZNAME:
+ * This symbol, if defined, indicates that the tzname[] array is
+ * available to access timezone names.
+ */
+/*#define HAS_TZNAME /**/
+
+/* HAS_UMASK:
+ * This symbol, if defined, indicates that the umask routine is
+ * available to set and get the value of the file creation mask.
+ */
+#define HAS_UMASK /**/
+
+/* HAS_VFORK:
+ * This symbol, if defined, indicates that vfork() exists.
+ */
+/*#define HAS_VFORK /**/
+
+/* HASVOLATILE:
+ * This symbol, if defined, indicates that this C compiler knows about
+ * the volatile declaration.
+ */
+#define HASVOLATILE /**/
+#ifndef HASVOLATILE
+#define volatile
+#endif
+
+/* HAS_WAIT4:
+ * This symbol, if defined, indicates that wait4() exists.
+ */
+/*#define HAS_WAIT4 /**/
+
+/* HAS_WAITPID:
+ * This symbol, if defined, indicates that the waitpid routine is
+ * available to wait for child process.
+ */
+#define HAS_WAITPID /**/
+
+/* HAS_WCSTOMBS:
+ * This symbol, if defined, indicates that the wcstombs routine is
+ * available to convert wide character strings to multibyte strings.
+ */
+#define HAS_WCSTOMBS /**/
+
+/* HAS_WCTOMB:
+ * This symbol, if defined, indicates that the wctomb routine is available
+ * to covert a wide character to a multibyte.
+ */
+#define HAS_WCTOMB /**/
+
+/* I_ARPA_INET:
+ * This symbol, if defined, indicates that <arpa/inet.h> exists and should
+ * be included.
+ */
+/*#define I_ARPA_INET /**/
+
+/* I_DBM:
+ * This symbol, if defined, indicates that <dbm.h> exists and should
+ * be included.
+ */
+/* I_RPCSVC_DBM:
+ * This symbol, if defined, indicates that <rpcsvc/dbm.h> exists and
+ * should be included.
+ */
+/*#define I_DBM /**/
+#define I_RPCSVC_DBM /**/
+
+/* I_DIRENT:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <dirent.h>. Using this symbol also triggers the definition
+ * of the Direntry_t define which ends up being 'struct dirent' or
+ * 'struct direct' depending on the availability of <dirent.h>.
+ */
+/* DIRNAMLEN:
+ * This symbol, if defined, indicates to the C program that the length
+ * of directory entry names is provided by a d_namlen field. Otherwise
+ * you need to do strlen() on the d_name field.
+ */
+/* Direntry_t:
+ * This symbol is set to 'struct direct' or 'struct dirent' depending on
+ * whether dirent is available or not. You should use this pseudo type to
+ * portably declare your directory entries.
+ */
+#define I_DIRENT /**/
+#define DIRNAMLEN /**/
+#define Direntry_t struct direct
+
+/* I_DLFCN:
+ * This symbol, if defined, indicates that <dlfcn.h> exists and should
+ * be included.
+ */
+#define I_DLFCN /**/
+
+/* I_FCNTL:
+ * This manifest constant tells the C program to include <fcntl.h>.
+ */
+#define I_FCNTL /**/
+
+/* I_FLOAT:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <float.h> to get definition of symbols like DBL_MAX or
+ * DBL_MIN, i.e. machine dependent floating point values.
+ */
+#define I_FLOAT /**/
+
+/* I_GRP:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <grp.h>.
+ */
+/* GRPASSWD:
+ * This symbol, if defined, indicates to the C program that struct group
+ * contains gr_passwd.
+ */
+/* HAS_SETGRENT:
+ * This symbol, if defined, indicates that the getgrent routine is
+ * available for initializing sequential access of the group database.
+ */
+/* HAS_GETGRENT:
+ * This symbol, if defined, indicates that the getgrent routine is
+ * available for sequential access of the group database.
+ */
+/* HAS_ENDGRENT:
+ * This symbol, if defined, indicates that the getgrent routine is
+ * available for finalizing sequential access of the group database.
+ */
+/*#define I_GRP /**/
+/*#define GRPASSWD /**/
+/*#define HAS_SETGRENT /**/
+/*#define HAS_GETGRENT /**/
+/*#define HAS_ENDGRENT /**/
+
+/* I_LIMITS:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <limits.h> to get definition of symbols like WORD_BIT or
+ * LONG_MAX, i.e. machine dependant limitations.
+ */
+#define I_LIMITS /**/
+
+/* I_LOCALE:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <locale.h>.
+ */
+#define I_LOCALE /**/
+
+/* I_MATH:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <math.h>.
+ */
+#define I_MATH /**/
+
+/* I_MEMORY:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <memory.h>.
+ */
+/*#define I_MEMORY /**/
+
+/* I_NDBM:
+ * This symbol, if defined, indicates that <ndbm.h> exists and should
+ * be included.
+ */
+/*#define I_NDBM /**/
+
+/* I_NET_ERRNO:
+ * This symbol, if defined, indicates that <net/errno.h> exists and
+ * should be included.
+ */
+/*#define I_NET_ERRNO /**/
+
+/* I_NETINET_IN:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <netinet/in.h>. Otherwise, you may try <sys/in.h>.
+ */
+/*#define I_NETINET_IN /**/
+
+/* I_SFIO:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sfio.h>.
+ */
+/*#define I_SFIO /**/
+
+/* I_STDDEF:
+ * This symbol, if defined, indicates that <stddef.h> exists and should
+ * be included.
+ */
+#define I_STDDEF /**/
+
+/* I_STDLIB:
+ * This symbol, if defined, indicates that <stdlib.h> exists and should
+ * be included.
+ */
+#define I_STDLIB /**/
+
+/* I_STRING:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <string.h> (USG systems) instead of <strings.h> (BSD systems).
+ */
+#define I_STRING /**/
+
+/* I_SYS_DIR:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/dir.h>.
+ */
+/*#define I_SYS_DIR /**/
+
+/* I_SYS_FILE:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/file.h> to get definition of R_OK and friends.
+ */
+/*#define I_SYS_FILE /**/
+
+/* I_SYS_IOCTL:
+ * This symbol, if defined, indicates that <sys/ioctl.h> exists and should
+ * be included. Otherwise, include <sgtty.h> or <termio.h>.
+ */
+/*#define I_SYS_IOCTL /**/
+
+/* I_SYS_NDIR:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/ndir.h>.
+ */
+/*#define I_SYS_NDIR /**/
+
+/* I_SYS_PARAM:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/param.h>.
+ */
+/*#define I_SYS_PARAM /**/
+
+/* I_SYS_RESOURCE:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/resource.h>.
+ */
+/*#define I_SYS_RESOURCE /**/
+
+/* I_SYS_SELECT:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/select.h> in order to get definition of struct timeval.
+ */
+/*#define I_SYS_SELECT /**/
+
+/* I_SYS_STAT:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/stat.h>.
+ */
+#define I_SYS_STAT /**/
+
+/* I_SYS_TIMES:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/times.h>.
+ */
+/*#define I_SYS_TIMES /**/
+
+/* I_SYS_TYPES:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/types.h>.
+ */
+#define I_SYS_TYPES /**/
+
+/* I_SYS_UN:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/un.h> to get UNIX domain socket definitions.
+ */
+/*#define I_SYS_UN /**/
+
+/* I_SYS_WAIT:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/wait.h>.
+ */
+/*#define I_SYS_WAIT /**/
+
+/* I_TERMIO:
+ * This symbol, if defined, indicates that the program should include
+ * <termio.h> rather than <sgtty.h>. There are also differences in
+ * the ioctl() calls that depend on the value of this symbol.
+ */
+/* I_TERMIOS:
+ * This symbol, if defined, indicates that the program should include
+ * the POSIX termios.h rather than sgtty.h or termio.h.
+ * There are also differences in the ioctl() calls that depend on the
+ * value of this symbol.
+ */
+/* I_SGTTY:
+ * This symbol, if defined, indicates that the program should include
+ * <sgtty.h> rather than <termio.h>. There are also differences in
+ * the ioctl() calls that depend on the value of this symbol.
+ */
+/*#define I_TERMIO /**/
+/*#define I_TERMIOS /**/
+/*#define I_SGTTY /**/
+
+/* I_UNISTD:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <unistd.h>.
+ */
+/*#define I_UNISTD /**/
+
+/* I_UTIME:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <utime.h>.
+ */
+#define I_UTIME /**/
+
+/* I_VALUES:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <values.h> to get definition of symbols like MINFLOAT or
+ * MAXLONG, i.e. machine dependant limitations. Probably, you
+ * should use <limits.h> instead, if it is available.
+ */
+/*#define I_VALUES /**/
+
+/* I_STDARG:
+ * This symbol, if defined, indicates that <stdarg.h> exists and should
+ * be included.
+ */
+/* I_VARARGS:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <varargs.h>.
+ */
+#define I_STDARG /**/
+/*#define I_VARARGS /**/
+
+/* I_VFORK:
+ * This symbol, if defined, indicates to the C program that it should
+ * include vfork.h.
+ */
+/*#define I_VFORK /**/
+
+/* CAN_PROTOTYPE:
+ * If defined, this macro indicates that the C compiler can handle
+ * function prototypes.
+ */
+/* _:
+ * This macro is used to declare function parameters for folks who want
+ * to make declarations with prototypes using a different style than
+ * the above macros. Use double parentheses. For example:
+ *
+ * int main _((int argc, char *argv[]));
+ */
+#define CAN_PROTOTYPE /**/
+#ifdef CAN_PROTOTYPE
+#define _(args) args
+#else
+#define _(args) ()
+#endif
+
+/* SH_PATH:
+ * This symbol contains the full pathname to the shell used on this
+ * on this system to execute Bourne shell scripts. Usually, this will be
+ * /bin/sh, though it's possible that some systems will have /bin/ksh,
+ * /bin/pdksh, /bin/ash, /bin/bash, or even something such as
+ * D:/bin/sh.exe.
+ */
+#define SH_PATH "cmd /x /c" /**/
+
+/* STDCHAR:
+ * This symbol is defined to be the type of char used in stdio.h.
+ * It has the values "unsigned char" or "char".
+ */
+#define STDCHAR char /**/
+
+/* MEM_ALIGNBYTES:
+ * This symbol contains the number of bytes required to align a
+ * double. Usual values are 2, 4 and 8.
+ * On NeXT starting with 3.2, you can build "Fat" Multiple Architecture
+ * Binaries (MAB) for targets with varying alignment. This only matters
+ * for perl, where the config.h can be generated and installed on one
+ * system, and used by a different architecture to build an extension.
+ * The default is eight, for safety.
+ */
+#define MEM_ALIGNBYTES 8 /**/
+
+/* BYTEORDER:
+ * This symbol holds the hexadecimal constant defined in byteorder,
+ * i.e. 0x1234 or 0x4321, etc...
+ * On NeXT 3.2 (and greater), you can build "Fat" Multiple Architecture
+ * Binaries (MAB) on either big endian or little endian machines.
+ * The endian-ness is available at compile-time. This only matters
+ * for perl, where the config.h can be generated and installed on
+ * one system, and used by a different architecture to build an
+ * extension. Older versions of NeXT that might not have
+ * defined either *_ENDIAN__ were all on Motorola 680x0 series,
+ * so the default case (for NeXT) is big endian to catch them.
+ * This might matter for NeXT 3.0.
+ */
+#ifndef NeXT
+#define BYTEORDER 0x1234 /* large digits for MSB */
+#else /* NeXT */
+#ifdef __LITTLE_ENDIAN__
+#define BYTEORDER 0x1234
+#else /* __BIG_ENDIAN__ */
+#define BYTEORDER 0x4321
+#endif /* ENDIAN CHECK */
+#endif /* NeXT */
+
+/* CASTI32:
+ * This symbol is defined if the C compiler can cast negative
+ * or large floating point numbers to 32-bit ints.
+ */
+#define CASTI32 /**/
+
+/* CASTNEGFLOAT:
+ * This symbol is defined if the C compiler can cast negative
+ * numbers to unsigned longs, ints and shorts.
+ */
+/* CASTFLAGS:
+ * This symbol contains flags that say what difficulties the compiler
+ * has casting odd floating values to unsigned long:
+ * 0 = ok
+ * 1 = couldn't cast < 0
+ * 2 = couldn't cast >= 0x80000000
+ * 4 = couldn't cast in argument expression list
+ */
+#define CASTNEGFLOAT /**/
+#define CASTFLAGS 0 /**/
+
+/* VOID_CLOSEDIR:
+ * This symbol, if defined, indicates that the closedir() routine
+ * does not return a value.
+ */
+/*#define VOID_CLOSEDIR /**/
+
+/* Gconvert:
+ * This preprocessor macro is defined to convert a floating point
+ * number to a string without a trailing decimal point. This
+ * emulates the behavior of sprintf("%g"), but is sometimes much more
+ * efficient. If gconvert() is not available, but gcvt() drops the
+ * trailing decimal point, then gcvt() is used. If all else fails,
+ * a macro using sprintf("%g") is used. Arguments for the Gconvert
+ * macro are: value, number of digits, whether trailing zeros should
+ * be retained, and the output buffer.
+ * Possible values are:
+ * d_Gconvert='gconvert((x),(n),(t),(b))'
+ * d_Gconvert='gcvt((x),(n),(b))'
+ * d_Gconvert='sprintf((b),"%.*g",(n),(x))'
+ * The last two assume trailing zeros should not be kept.
+ */
+#define Gconvert(x,n,t,b) sprintf((b),"%.*g",(n),(x))
+
+/* HAS_GNULIBC:
+ * This symbol, if defined, indicates to the C program that
+ * the GNU C library is being used.
+ */
+/*#define HAS_GNULIBC /**/
+/* HAS_ISASCII:
+ * This manifest constant lets the C program know that isascii
+ * is available.
+ */
+#define HAS_ISASCII /**/
+
+/* HAS_LCHOWN:
+ * This symbol, if defined, indicates that the lchown routine is
+ * available to operate on a symbolic link (instead of following the
+ * link).
+ */
+/*#define HAS_LCHOWN /**/
+
+/* HAS_OPEN3:
+ * This manifest constant lets the C program know that the three
+ * argument form of open(2) is available.
+ */
+/*#define HAS_OPEN3 /**/
+
+/* HAS_SAFE_BCOPY:
+ * This symbol, if defined, indicates that the bcopy routine is available
+ * to copy potentially overlapping memory blocks. Otherwise you should
+ * probably use memmove() or memcpy(). If neither is defined, roll your
+ * own version.
+ */
+/*#define HAS_SAFE_BCOPY /**/
+
+/* HAS_SAFE_MEMCPY:
+ * This symbol, if defined, indicates that the memcpy routine is available
+ * to copy potentially overlapping memory blocks. Otherwise you should
+ * probably use memmove() or memcpy(). If neither is defined, roll your
+ * own version.
+ */
+/*#define HAS_SAFE_MEMCPY /**/
+
+/* HAS_SANE_MEMCMP:
+ * This symbol, if defined, indicates that the memcmp routine is available
+ * and can be used to compare relative magnitudes of chars with their high
+ * bits set. If it is not defined, roll your own version.
+ */
+#define HAS_SANE_MEMCMP /**/
+
+/* HAS_SIGACTION:
+ * This symbol, if defined, indicates that Vr4's sigaction() routine
+ * is available.
+ */
+/*#define HAS_SIGACTION /**/
+
+/* Sigjmp_buf:
+ * This is the buffer type to be used with Sigsetjmp and Siglongjmp.
+ */
+/* Sigsetjmp:
+ * This macro is used in the same way as sigsetjmp(), but will invoke
+ * traditional setjmp() if sigsetjmp isn't available.
+ * See HAS_SIGSETJMP.
+ */
+/* Siglongjmp:
+ * This macro is used in the same way as siglongjmp(), but will invoke
+ * traditional longjmp() if siglongjmp isn't available.
+ * See HAS_SIGSETJMP.
+ */
+/*#define HAS_SIGSETJMP /**/
+#ifdef HAS_SIGSETJMP
+#define Sigjmp_buf sigjmp_buf
+#define Sigsetjmp(buf,save_mask) sigsetjmp((buf),(save_mask))
+#define Siglongjmp(buf,retval) siglongjmp((buf),(retval))
+#else
+#define Sigjmp_buf jmp_buf
+#define Sigsetjmp(buf,save_mask) setjmp((buf))
+#define Siglongjmp(buf,retval) longjmp((buf),(retval))
+#endif
+
+/* USE_STDIO_PTR:
+ * This symbol is defined if the _ptr and _cnt fields (or similar)
+ * of the stdio FILE structure can be used to access the stdio buffer
+ * for a file handle. If this is defined, then the FILE_ptr(fp)
+ * and FILE_cnt(fp) macros will also be defined and should be used
+ * to access these fields.
+ */
+/* FILE_ptr:
+ * This macro is used to access the _ptr field (or equivalent) of the
+ * FILE structure pointed to by its argument. This macro will always be
+ * defined if USE_STDIO_PTR is defined.
+ */
+/* STDIO_PTR_LVALUE:
+ * This symbol is defined if the FILE_ptr macro can be used as an
+ * lvalue.
+ */
+/* FILE_cnt:
+ * This macro is used to access the _cnt field (or equivalent) of the
+ * FILE structure pointed to by its argument. This macro will always be
+ * defined if USE_STDIO_PTR is defined.
+ */
+/* STDIO_CNT_LVALUE:
+ * This symbol is defined if the FILE_cnt macro can be used as an
+ * lvalue.
+ */
+/*#define USE_STDIO_PTR /**/
+#ifdef USE_STDIO_PTR
+#define FILE_ptr(fp) ((fp)->_ptr)
+#define STDIO_PTR_LVALUE /**/
+#define FILE_cnt(fp) ((fp)->_cnt)
+#define STDIO_CNT_LVALUE /**/
+#endif
+
+/* USE_STDIO_BASE:
+ * This symbol is defined if the _base field (or similar) of the
+ * stdio FILE structure can be used to access the stdio buffer for
+ * a file handle. If this is defined, then the FILE_base(fp) macro
+ * will also be defined and should be used to access this field.
+ * Also, the FILE_bufsiz(fp) macro will be defined and should be used
+ * to determine the number of bytes in the buffer. USE_STDIO_BASE
+ * will never be defined unless USE_STDIO_PTR is.
+ */
+/* FILE_base:
+ * This macro is used to access the _base field (or equivalent) of the
+ * FILE structure pointed to by its argument. This macro will always be
+ * defined if USE_STDIO_BASE is defined.
+ */
+/* FILE_bufsiz:
+ * This macro is used to determine the number of bytes in the I/O
+ * buffer pointed to by _base field (or equivalent) of the FILE
+ * structure pointed to its argument. This macro will always be defined
+ * if USE_STDIO_BASE is defined.
+ */
+/*#define USE_STDIO_BASE /**/
+#ifdef USE_STDIO_BASE
+#define FILE_base(fp) ((fp)->_base)
+#define FILE_bufsiz(fp) ((fp)->_cnt + (fp)->_ptr - (fp)->_base)
+#endif
+
+/* HAS_VPRINTF:
+ * This symbol, if defined, indicates that the vprintf routine is available
+ * to printf with a pointer to an argument list. If unavailable, you
+ * may need to write your own, probably in terms of _doprnt().
+ */
+/* USE_CHAR_VSPRINTF:
+ * This symbol is defined if this system has vsprintf() returning type
+ * (char*). The trend seems to be to declare it as "int vsprintf()". It
+ * is up to the package author to declare vsprintf correctly based on the
+ * symbol.
+ */
+#define HAS_VPRINTF /**/
+/*#define USE_CHAR_VSPRINTF /**/
+
+/* DOUBLESIZE:
+ * This symbol contains the size of a double, so that the C preprocessor
+ * can make decisions based on it.
+ */
+#define DOUBLESIZE 8 /**/
+
+/* I_TIME:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <time.h>.
+ */
+/* I_SYS_TIME:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/time.h>.
+ */
+/* I_SYS_TIME_KERNEL:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/time.h> with KERNEL defined.
+ */
+#define I_TIME /**/
+/*#define I_SYS_TIME /**/
+/*#define I_SYS_TIME_KERNEL /**/
+
+/* INTSIZE:
+ * This symbol contains the value of sizeof(int) so that the C
+ * preprocessor can make decisions based on it.
+ */
+/* LONGSIZE:
+ * This symbol contains the value of sizeof(long) so that the C
+ * preprocessor can make decisions based on it.
+ */
+/* SHORTSIZE:
+ * This symbol contains the value of sizeof(short) so that the C
+ * preprocessor can make decisions based on it.
+ */
+#define INTSIZE 4 /**/
+#define LONGSIZE 4 /**/
+#define SHORTSIZE 2 /**/
+
+/* VAL_O_NONBLOCK:
+ * This symbol is to be used during open() or fcntl(F_SETFL) to turn on
+ * non-blocking I/O for the file descriptor. Note that there is no way
+ * back, i.e. you cannot turn it blocking again this way. If you wish to
+ * alternatively switch between blocking and non-blocking, use the
+ * ioctl(FIOSNBIO) call instead, but that is not supported by all devices.
+ */
+/* VAL_EAGAIN:
+ * This symbol holds the errno error code set by read() when no data was
+ * present on the non-blocking file descriptor.
+ */
+/* RD_NODATA:
+ * This symbol holds the return code from read() when no data is present
+ * on the non-blocking file descriptor. Be careful! If EOF_NONBLOCK is
+ * not defined, then you can't distinguish between no data and EOF by
+ * issuing a read(). You'll have to find another way to tell for sure!
+ */
+/* EOF_NONBLOCK:
+ * This symbol, if defined, indicates to the C program that a read() on
+ * a non-blocking file descriptor will return 0 on EOF, and not the value
+ * held in RD_NODATA (-1 usually, in that case!).
+ */
+#define VAL_O_NONBLOCK O_NONBLOCK
+#define VAL_EAGAIN EAGAIN
+#define RD_NODATA -1
+#define EOF_NONBLOCK
+
+/* PTRSIZE:
+ * This symbol contains the size of a pointer, so that the C preprocessor
+ * can make decisions based on it. It will be sizeof(void *) if
+ * the compiler supports (void *); otherwise it will be
+ * sizeof(char *).
+ */
+#define PTRSIZE 4 /**/
+
+/* RANDBITS:
+ * This symbol contains the number of bits of random number the rand()
+ * function produces. Usual values are 15, 16, and 31.
+ */
+#define RANDBITS 15 /**/
+
+/* SSize_t:
+ * This symbol holds the type used by functions that return
+ * a count of bytes or an error condition. It must be a signed type.
+ * It is usually ssize_t, but may be long or int, etc.
+ * It may be necessary to include <sys/types.h> or <unistd.h>
+ * to get any typedef'ed information.
+ * We will pick a type such that sizeof(SSize_t) == sizeof(Size_t).
+ */
+#define SSize_t int /* signed count of bytes */
+
+/* OSNAME:
+ * This symbol contains the name of the operating system, as determined
+ * by Configure. You shouldn't rely on it too much; the specific
+ * feature tests from Configure are generally more reliable.
+ */
+#define OSNAME "MSWin32" /**/
+
+/* CAT2:
+ * This macro catenates 2 tokens together.
+ */
+/* STRINGIFY:
+ * This macro surrounds its token with double quotes.
+ */
+#if 42 == 1
+#define CAT2(a,b)a/**/b
+#define STRINGIFY(a)"a"
+ /* If you can get stringification with catify, tell me how! */
+#endif
+#if 42 == 42
+#define CAT2(a,b)a ## b
+#define StGiFy(a)# a
+#define STRINGIFY(a)StGiFy(a)
+#endif
+#if 42 != 1 && 42 != 42
+#include "Bletch: How does this C preprocessor catenate tokens?"
+#endif
+
+/* CSH:
+ * This symbol, if defined, contains the full pathname of csh.
+ */
+/*#define HAS_CSH /**/
+#ifdef HAS_CSH
+#define CSH "" /**/
+#endif
+
+/* HAS_ENDHOSTENT:
+ * This symbol, if defined, indicates that the endhostent() routine is
+ * available to close whatever was being used for host queries.
+ */
+/*#define HAS_ENDHOSTENT /**/
+
+/* HAS_ENDNETENT:
+ * This symbol, if defined, indicates that the endnetent() routine is
+ * available to close whatever was being used for network queries.
+ */
+/*#define HAS_ENDNETENT /**/
+
+/* HAS_ENDPROTOENT:
+ * This symbol, if defined, indicates that the endprotoent() routine is
+ * available to close whatever was being used for protocol queries.
+ */
+/*#define HAS_ENDPROTOENT /**/
+
+/* HAS_ENDSERVENT:
+ * This symbol, if defined, indicates that the endservent() routine is
+ * available to close whatever was being used for service queries.
+ */
+/*#define HAS_ENDSERVENT /**/
+
+/* HAS_GETHOSTBYADDR:
+ * This symbol, if defined, indicates that the gethostbyaddr() routine is
+ * available to look up hosts by their IP addresses.
+ */
+#define HAS_GETHOSTBYADDR /**/
+
+/* HAS_GETHOSTBYNAME:
+ * This symbol, if defined, indicates that the gethostbyname() routine is
+ * available to look up host names in some data base or other.
+ */
+#define HAS_GETHOSTBYNAME /**/
+
+/* HAS_GETHOSTENT:
+ * This symbol, if defined, indicates that the gethostent() routine is
+ * available to look up host names in some data base or another.
+ */
+/*#define HAS_GETHOSTENT /**/
+
+/* HAS_GETNETBYADDR:
+ * This symbol, if defined, indicates that the getnetbyaddr() routine is
+ * available to look up networks by their IP addresses.
+ */
+/*#define HAS_GETNETBYADDR /**/
+
+/* HAS_GETNETBYNAME:
+ * This symbol, if defined, indicates that the getnetbyname() routine is
+ * available to look up networks by their names.
+ */
+/*#define HAS_GETNETBYNAME /**/
+
+/* HAS_GETNETENT:
+ * This symbol, if defined, indicates that the getnetent() routine is
+ * available to look up network names in some data base or another.
+ */
+/*#define HAS_GETNETENT /**/
+
+/* HAS_GETPROTOENT:
+ * This symbol, if defined, indicates that the getprotoent() routine is
+ * available to look up protocols in some data base or another.
+ */
+/*#define HAS_GETPROTOENT /**/
+
+/* HAS_GETPROTOBYNAME:
+ * This symbol, if defined, indicates that the getprotobyname()
+ * routine is available to look up protocols by their name.
+ */
+/* HAS_GETPROTOBYNUMBER:
+ * This symbol, if defined, indicates that the getprotobynumber()
+ * routine is available to look up protocols by their number.
+ */
+#define HAS_GETPROTOBYNAME /**/
+#define HAS_GETPROTOBYNUMBER /**/
+
+/* HAS_GETSERVENT:
+ * This symbol, if defined, indicates that the getservent() routine is
+ * available to look up network services in some data base or another.
+ */
+/*#define HAS_GETSERVENT /**/
+
+/* HAS_GETSERVBYNAME:
+ * This symbol, if defined, indicates that the getservbyname()
+ * routine is available to look up services by their name.
+ */
+/* HAS_GETSERVBYPORT:
+ * This symbol, if defined, indicates that the getservbyport()
+ * routine is available to look up services by their port.
+ */
+#define HAS_GETSERVBYNAME /**/
+#define HAS_GETSERVBYPORT /**/
+
+/* HAS_LONG_DOUBLE:
+ * This symbol will be defined if the C compiler supports long
+ * doubles.
+ */
+/* LONG_DOUBLESIZE:
+ * This symbol contains the size of a long double, so that the
+ * C preprocessor can make decisions based on it. It is only
+ * defined if the system supports long doubles.
+ */
+#define HAS_LONG_DOUBLE /**/
+#ifdef HAS_LONG_DOUBLE
+#define LONG_DOUBLESIZE 12 /**/
+#endif
+
+/* HAS_LONG_LONG:
+ * This symbol will be defined if the C compiler supports
+ * long long.
+ */
+/* LONGLONGSIZE:
+ * This symbol contains the size of a long long, so that the
+ * C preprocessor can make decisions based on it. It is only
+ * defined if the system supports long long.
+ */
+/*#define HAS_LONG_LONG /**/
+#ifdef HAS_LONG_LONG
+#define LONGLONGSIZE 8 /**/
+#endif
+
+/* HAS_SETGROUPS:
+ * This symbol, if defined, indicates that the setgroups() routine is
+ * available to set the list of process groups. If unavailable, multiple
+ * groups are probably not supported.
+ */
+/*#define HAS_SETGROUPS /**/
+
+/* HAS_SETHOSTENT:
+ * This symbol, if defined, indicates that the sethostent() routine is
+ * available.
+ */
+/*#define HAS_SETHOSTENT /**/
+
+/* HAS_SETNETENT:
+ * This symbol, if defined, indicates that the setnetent() routine is
+ * available.
+ */
+/*#define HAS_SETNETENT /**/
+
+/* HAS_SETPROTOENT:
+ * This symbol, if defined, indicates that the setprotoent() routine is
+ * available.
+ */
+/*#define HAS_SETPROTOENT /**/
+
+/* HAS_SETSERVENT:
+ * This symbol, if defined, indicates that the setservent() routine is
+ * available.
+ */
+/*#define HAS_SETSERVENT /**/
+
+/* HAS_SETVBUF:
+ * This symbol, if defined, indicates that the setvbuf routine is
+ * available to change buffering on an open stdio stream.
+ * to a line-buffered mode.
+ */
+#define HAS_SETVBUF /**/
+
+/* HAS_SOCKET:
+ * This symbol, if defined, indicates that the BSD socket interface is
+ * supported.
+ */
+/* HAS_SOCKETPAIR:
+ * This symbol, if defined, indicates that the BSD socketpair() call is
+ * supported.
+ */
+#define HAS_SOCKET /**/
+/*#define HAS_SOCKETPAIR /**/
+
+/* HAS_UNION_SEMUN:
+ * This symbol, if defined, indicates that the union semun is
+ * defined by including <sys/sem.h>. If not, the user code
+ * probably needs to define it as:
+ * union semun {
+ * int val;
+ * struct semid_ds *buf;
+ * unsigned short *array;
+ * }
+ */
+/* USE_SEMCTL_SEMUN:
+ * This symbol, if defined, indicates that union semun is
+ * used for semctl IPC_STAT.
+ */
+/* USE_SEMCTL_SEMID_DS:
+ * This symbol, if defined, indicates that struct semid_ds * is
+ * used for semctl IPC_STAT.
+ */
+#define HAS_UNION_SEMUN /**/
+/*#define USE_SEMCTL_SEMUN /**/
+/*#define USE_SEMCTL_SEMID_DS /**/
+
+/* Signal_t:
+ * This symbol's value is either "void" or "int", corresponding to the
+ * appropriate return type of a signal handler. Thus, you can declare
+ * a signal handler using "Signal_t (*handler)()", and define the
+ * handler using "Signal_t handler(sig)".
+ */
+#define Signal_t void /* Signal handler's return type */
+
+/* Groups_t:
+ * This symbol holds the type used for the second argument to
+ * getgroups() and setgropus(). Usually, this is the same as
+ * gidtype (gid_t) , but sometimes it isn't.
+ * It can be int, ushort, uid_t, etc...
+ * It may be necessary to include <sys/types.h> to get any
+ * typedef'ed information. This is only required if you have
+ * getgroups() or setgropus()..
+ */
+#if defined(HAS_GETGROUPS) || defined(HAS_SETGROUPS)
+#define Groups_t gid_t /* Type for 2nd arg to [sg]etgroups() */
+#endif
+
+/* I_NETDB:
+ * This symbol, if defined, indicates that <netdb.h> exists and
+ * should be included.
+ */
+/*#define I_NETDB /**/
+
+/* I_PWD:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <pwd.h>.
+ */
+/* PWQUOTA:
+ * This symbol, if defined, indicates to the C program that struct passwd
+ * contains pw_quota.
+ */
+/* PWAGE:
+ * This symbol, if defined, indicates to the C program that struct passwd
+ * contains pw_age.
+ */
+/* PWCHANGE:
+ * This symbol, if defined, indicates to the C program that struct passwd
+ * contains pw_change.
+ */
+/* PWCLASS:
+ * This symbol, if defined, indicates to the C program that struct passwd
+ * contains pw_class.
+ */
+/* PWEXPIRE:
+ * This symbol, if defined, indicates to the C program that struct passwd
+ * contains pw_expire.
+ */
+/* PWCOMMENT:
+ * This symbol, if defined, indicates to the C program that struct passwd
+ * contains pw_comment.
+ */
+/* PWGECOS:
+ * This symbol, if defined, indicates to the C program that struct passwd
+ * contains pw_gecos.
+ */
+/* PWPASSWD:
+ * This symbol, if defined, indicates to the C program that struct passwd
+ * contains pw_passwd.
+ */
+/* HAS_SETPWENT:
+ * This symbol, if defined, indicates that the getpwrent routine is
+ * available for initializing sequential access of the passwd database.
+ */
+/* HAS_GETPWENT:
+ * This symbol, if defined, indicates that the getpwent routine is
+ * available for sequential access of the password database.
+ */
+/* HAS_ENDPWENT:
+ * This symbol, if defined, indicates that the getpwent routine is
+ * available for finalizing sequential access of the passwd database.
+ */
+/*#define I_PWD /**/
+/*#define PWQUOTA /**/
+/*#define PWAGE /**/
+/*#define PWCHANGE /**/
+/*#define PWCLASS /**/
+/*#define PWEXPIRE /**/
+/*#define PWCOMMENT /**/
+/*#define PWGECOS /**/
+/*#define PWPASSWD /**/
+/*#define HAS_SETPWENT /**/
+/*#define HAS_GETPWENT /**/
+/*#define HAS_ENDPWENT /**/
+
+/* Free_t:
+ * This variable contains the return type of free(). It is usually
+ * void, but occasionally int.
+ */
+/* Malloc_t:
+ * This symbol is the type of pointer returned by malloc and realloc.
+ */
+#define Malloc_t void * /**/
+#define Free_t void /**/
+
+/* MYMALLOC:
+ * This symbol, if defined, indicates that we're using our own malloc.
+ */
+/*#define MYMALLOC /**/
+
+/* SIG_NAME:
+ * This symbol contains a list of signal names in order of
+ * signal number. This is intended
+ * to be used as a static array initialization, like this:
+ * char *sig_name[] = { SIG_NAME };
+ * The signals in the list are separated with commas, and each signal
+ * is surrounded by double quotes. There is no leading SIG in the signal
+ * name, i.e. SIGQUIT is known as "QUIT".
+ * Gaps in the signal numbers (up to NSIG) are filled in with NUMnn,
+ * etc., where nn is the actual signal number (e.g. NUM37).
+ * The signal number for sig_name[i] is stored in sig_num[i].
+ * The last element is 0 to terminate the list with a NULL. This
+ * corresponds to the 0 at the end of the sig_num list.
+ */
+/* SIG_NUM:
+ * This symbol contains a list of signal numbers, in the same order as the
+ * SIG_NAME list. It is suitable for static array initialization, as in:
+ * int sig_num[] = { SIG_NUM };
+ * The signals in the list are separated with commas, and the indices
+ * within that list and the SIG_NAME list match, so it's easy to compute
+ * the signal name from a number or vice versa at the price of a small
+ * dynamic linear lookup.
+ * Duplicates are allowed, but are moved to the end of the list.
+ * The signal number corresponding to sig_name[i] is sig_number[i].
+ * if (i < NSIG) then sig_number[i] == i.
+ * The last element is 0, corresponding to the 0 at the end of
+ * the sig_name list.
+ */
+#define SIG_NAME "ZERO", "INT", "QUIT", "ILL", "FPE", "KILL", "SEGV", "PIPE", "ALRM", "TERM", "CHLD", "BREAK", "ABRT", "STOP", "CONT", "CLD", 0 /**/
+#define SIG_NUM 0, 2, 3, 4, 8, 9, 11, 13, 14, 15, 20, 21, 22, 23, 25, 20, 0 /**/
+
+/* VOIDFLAGS:
+ * This symbol indicates how much support of the void type is given by this
+ * compiler. What various bits mean:
+ *
+ * 1 = supports declaration of void
+ * 2 = supports arrays of pointers to functions returning void
+ * 4 = supports comparisons between pointers to void functions and
+ * addresses of void functions
+ * 8 = suports declaration of generic void pointers
+ *
+ * The package designer should define VOIDUSED to indicate the requirements
+ * of the package. This can be done either by #defining VOIDUSED before
+ * including config.h, or by defining defvoidused in Myinit.U. If the
+ * latter approach is taken, only those flags will be tested. If the
+ * level of void support necessary is not present, defines void to int.
+ */
+#ifndef VOIDUSED
+#define VOIDUSED 15
+#endif
+#define VOIDFLAGS 15
+#if (VOIDFLAGS & VOIDUSED) != VOIDUSED
+#define void int /* is void to be avoided? */
+#define M_VOID /* Xenix strikes again */
+#endif
+
+/* ARCHLIB:
+ * This variable, if defined, holds the name of the directory in
+ * which the user wants to put architecture-dependent public
+ * library files for perl5. It is most often a local directory
+ * such as /usr/local/lib. Programs using this variable must be
+ * prepared to deal with filename expansion. If ARCHLIB is the
+ * same as PRIVLIB, it is not defined, since presumably the
+ * program already searches PRIVLIB.
+ */
+/* ARCHLIB_EXP:
+ * This symbol contains the ~name expanded version of ARCHLIB, to be used
+ * in programs that are not prepared to deal with ~ expansion at run-time.
+ */
+#define ARCHLIB "c:\\perl\\5.00503\\lib\\MSWin32-x86" /**/
+/*#define ARCHLIB_EXP "" /**/
+
+/* DLSYM_NEEDS_UNDERSCORE:
+ * This symbol, if defined, indicates that we need to prepend an
+ * underscore to the symbol name before calling dlsym(). This only
+ * makes sense if you *have* dlsym, which we will presume is the
+ * case if you're using dl_dlopen.xs.
+ */
+/*#define DLSYM_NEEDS_UNDERSCORE /**/
+
+/* USE_SFIO:
+ * This symbol, if defined, indicates that sfio should
+ * be used.
+ */
+/*#define USE_SFIO /**/
+
+/* USE_DYNAMIC_LOADING:
+ * This symbol, if defined, indicates that dynamic loading of
+ * some sort is available.
+ */
+#define USE_DYNAMIC_LOADING /**/
+
+/* DB_Prefix_t:
+ * This symbol contains the type of the prefix structure element
+ * in the <db.h> header file. In older versions of DB, it was
+ * int, while in newer ones it is u_int32_t.
+ */
+/* DB_Hash_t:
+ * This symbol contains the type of the prefix structure element
+ * in the <db.h> header file. In older versions of DB, it was
+ * int, while in newer ones it is size_t.
+ */
+#define DB_Hash_t int /**/
+#define DB_Prefix_t int /**/
+
+/* PRIVLIB:
+ * This symbol contains the name of the private library for this package.
+ * The library is private in the sense that it needn't be in anyone's
+ * execution path, but it should be accessible by the world. The program
+ * should be prepared to do ~ expansion.
+ */
+/* PRIVLIB_EXP:
+ * This symbol contains the ~name expanded version of PRIVLIB, to be used
+ * in programs that are not prepared to deal with ~ expansion at run-time.
+ */
+#define PRIVLIB "c:\\perl\\5.00503\\lib" /**/
+#define PRIVLIB_EXP (win32_get_privlib("5.00503")) /**/
+
+/* SITEARCH:
+ * This symbol contains the name of the private library for this package.
+ * The library is private in the sense that it needn't be in anyone's
+ * execution path, but it should be accessible by the world. The program
+ * should be prepared to do ~ expansion.
+ * The standard distribution will put nothing in this directory.
+ * Individual sites may place their own extensions and modules in
+ * this directory.
+ */
+/* SITEARCH_EXP:
+ * This symbol contains the ~name expanded version of SITEARCH, to be used
+ * in programs that are not prepared to deal with ~ expansion at run-time.
+ */
+#define SITEARCH "c:\\perl\\site\\5.00503\\lib\\MSWin32-x86" /**/
+/*#define SITEARCH_EXP "" /**/
+
+/* SITELIB:
+ * This symbol contains the name of the private library for this package.
+ * The library is private in the sense that it needn't be in anyone's
+ * execution path, but it should be accessible by the world. The program
+ * should be prepared to do ~ expansion.
+ * The standard distribution will put nothing in this directory.
+ * Individual sites may place their own extensions and modules in
+ * this directory.
+ */
+/* SITELIB_EXP:
+ * This symbol contains the ~name expanded version of SITELIB, to be used
+ * in programs that are not prepared to deal with ~ expansion at run-time.
+ */
+#define SITELIB "c:\\perl\\site\\5.00503\\lib" /**/
+#define SITELIB_EXP (win32_get_sitelib("5.00503")) /**/
+
+/* STARTPERL:
+ * This variable contains the string to put in front of a perl
+ * script to make sure (one hopes) that it runs with perl and not
+ * some shell.
+ */
+#define STARTPERL "#!perl" /**/
+
+/* USE_PERLIO:
+ * This symbol, if defined, indicates that the PerlIO abstraction should
+ * be used throughout. If not defined, stdio should be
+ * used in a fully backward compatible manner.
+ */
+/*#define USE_PERLIO /**/
+
+/* HAS_GETHOST_PROTOS:
+ * This symbol, if defined, indicates that <netdb.h> includes
+ * prototypes for gethostent(), gethostbyname(), and
+ * gethostbyaddr(). Otherwise, it is up to the program to guess
+ * them. See netdbtype.U for probing for various Netdb_xxx_t types.
+ */
+#define HAS_GETHOST_PROTOS /**/
+
+/* HAS_GETNET_PROTOS:
+ * This symbol, if defined, indicates that <netdb.h> includes
+ * prototypes for getnetent(), getnetbyname(), and
+ * getnetbyaddr(). Otherwise, it is up to the program to guess
+ * them. See netdbtype.U for probing for various Netdb_xxx_t types.
+ */
+/*#define HAS_GETNET_PROTOS /**/
+
+/* HAS_GETPROTO_PROTOS:
+ * This symbol, if defined, indicates that <netdb.h> includes
+ * prototypes for getprotoent(), getprotobyname(), and
+ * getprotobyaddr(). Otherwise, it is up to the program to guess
+ * them. See netdbtype.U for probing for various Netdb_xxx_t types.
+ */
+#define HAS_GETPROTO_PROTOS /**/
+
+/* HAS_GETSERV_PROTOS:
+ * This symbol, if defined, indicates that <netdb.h> includes
+ * prototypes for getservent(), getservbyname(), and
+ * getservbyaddr(). Otherwise, it is up to the program to guess
+ * them. See netdbtype.U for probing for various Netdb_xxx_t types.
+ */
+#define HAS_GETSERV_PROTOS /**/
+
+/* Netdb_host_t:
+ * This symbol holds the type used for the 1st argument
+ * to gethostbyaddr().
+ */
+/* Netdb_hlen_t:
+ * This symbol holds the type used for the 2nd argument
+ * to gethostbyaddr().
+ */
+/* Netdb_name_t:
+ * This symbol holds the type used for the argument to
+ * gethostbyname().
+ */
+/* Netdb_net_t:
+ * This symbol holds the type used for the 1st argument to
+ * getnetbyaddr().
+ */
+#define Netdb_host_t char * /**/
+#define Netdb_hlen_t int /**/
+#define Netdb_name_t char * /**/
+#define Netdb_net_t long /**/
+
+/* Select_fd_set_t:
+ * This symbol holds the type used for the 2nd, 3rd, and 4th
+ * arguments to select. Usually, this is 'fd_set *', if HAS_FD_SET
+ * is defined, and 'int *' otherwise. This is only useful if you
+ * have select(), of course.
+ */
+#define Select_fd_set_t Perl_fd_set * /**/
+
+/* ARCHNAME:
+ * This symbol holds a string representing the architecture name.
+ * It may be used to construct an architecture-dependant pathname
+ * where library files may be held under a private library, for
+ * instance.
+ */
+#define ARCHNAME "MSWin32-x86" /**/
+
+/* HAS_PTHREAD_YIELD:
+ * This symbol, if defined, indicates that the pthread_yield
+ * routine is available to yield the execution of the current
+ * thread.
+ */
+/* HAS_SCHED_YIELD:
+ * This symbol, if defined, indicates that the sched_yield
+ * routine is available to yield the execution of the current
+ * thread.
+ */
+/*#define HAS_PTHREAD_YIELD /**/
+/*#define HAS_SCHED_YIELD /**/
+
+/* PTHREADS_CREATED_JOINABLE:
+ * This symbol, if defined, indicates that pthreads are created
+ * in the joinable (aka undetached) state.
+ */
+/*#define PTHREADS_CREATED_JOINABLE /**/
+
+/* USE_THREADS:
+ * This symbol, if defined, indicates that Perl should
+ * be built to use threads.
+ */
+/* OLD_PTHREADS_API:
+ * This symbol, if defined, indicates that Perl should
+ * be built to use the old draft POSIX threads API.
+ */
+/*#define USE_THREADS /**/
+/*#define OLD_PTHREADS_API /**/
+
+/* Time_t:
+ * This symbol holds the type returned by time(). It can be long,
+ * or time_t on BSD sites (in which case <sys/types.h> should be
+ * included).
+ */
+#define Time_t time_t /* Time type */
+
+/* HAS_TIMES:
+ * This symbol, if defined, indicates that the times() routine exists.
+ * Note that this became obsolete on some systems (SUNOS), which now
+ * use getrusage(). It may be necessary to include <sys/times.h>.
+ */
+#define HAS_TIMES /**/
+
+/* Fpos_t:
+ * This symbol holds the type used to declare file positions in libc.
+ * It can be fpos_t, long, uint, etc... It may be necessary to include
+ * <sys/types.h> to get any typedef'ed information.
+ */
+#define Fpos_t fpos_t /* File position type */
+
+/* Gid_t:
+ * This symbol holds the return type of getgid() and the type of
+ * argument to setrgid() and related functions. Typically,
+ * it is the type of group ids in the kernel. It can be int, ushort,
+ * uid_t, etc... It may be necessary to include <sys/types.h> to get
+ * any typedef'ed information.
+ */
+#define Gid_t gid_t /* Type for getgid(), etc... */
+
+/* Off_t:
+ * This symbol holds the type used to declare offsets in the kernel.
+ * It can be int, long, off_t, etc... It may be necessary to include
+ * <sys/types.h> to get any typedef'ed information.
+ */
+#define Off_t off_t /* <offset> type */
+
+/* Mode_t:
+ * This symbol holds the type used to declare file modes
+ * for systems calls. It is usually mode_t, but may be
+ * int or unsigned short. It may be necessary to include <sys/types.h>
+ * to get any typedef'ed information.
+ */
+#define Mode_t mode_t /* file mode parameter for system calls */
+
+/* Pid_t:
+ * This symbol holds the type used to declare process ids in the kernel.
+ * It can be int, uint, pid_t, etc... It may be necessary to include
+ * <sys/types.h> to get any typedef'ed information.
+ */
+#define Pid_t int /* PID type */
+
+/* Size_t:
+ * This symbol holds the type used to declare length parameters
+ * for string functions. It is usually size_t, but may be
+ * unsigned long, int, etc. It may be necessary to include
+ * <sys/types.h> to get any typedef'ed information.
+ */
+#define Size_t size_t /* length paramater for string functions */
+
+/* Uid_t:
+ * This symbol holds the type used to declare user ids in the kernel.
+ * It can be int, ushort, uid_t, etc... It may be necessary to include
+ * <sys/types.h> to get any typedef'ed information.
+ */
+#define Uid_t uid_t /* UID type */
+
+#endif
+#include <win32.h>
diff --git a/gnu/usr.bin/perl/win32/des_fcrypt.patch b/gnu/usr.bin/perl/win32/des_fcrypt.patch
new file mode 100644
index 00000000000..7088e94a7ea
--- /dev/null
+++ b/gnu/usr.bin/perl/win32/des_fcrypt.patch
@@ -0,0 +1,75 @@
+You need the GNU `patch' utility to apply this patch. Get:
+
+ ftp://fractal.mta.ca/pub/crypto/SSLeay/DES/libdes-3.06.tar.gz
+
+Uncompress it somewhere, and use the command line:
+
+ patch -p1 -N < this_file
+
+to apply the patch. Move the fcrypt.c file to the win32 subdirectory
+of the Perl source distribution.
+
+--- libdes-3.06/fcrypt.c.dist Tue Aug 4 18:41:49 1998
++++ libdes-3.06/fcrypt.c Tue Aug 4 18:42:03 1998
+@@ -325,12 +325,15 @@
+
+ static char shifts2[16]={0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0};
+
+-static int body();
+-static int des_set_key();
++static int body(
++ unsigned long *out0,
++ unsigned long *out1,
++ des_key_schedule ks,
++ unsigned long Eswap0,
++ unsigned long Eswap1);
+
+-static int des_set_key(key,schedule)
+-des_cblock *key;
+-des_key_schedule schedule;
++static int
++des_set_key(des_cblock *key, des_key_schedule schedule)
+ {
+ register unsigned long c,d,t,s;
+ register unsigned char *in;
+@@ -460,16 +463,14 @@
+ 0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A
+ };
+
+-char *crypt(buf,salt)
+-char *buf;
+-char *salt;
++char *
++des_fcrypt(const char *buf, const char *salt, char *buff)
+ {
+ unsigned int i,j,x,y;
+ unsigned long Eswap0=0,Eswap1=0;
+ unsigned long out[2],ll;
+ des_cblock key;
+ des_key_schedule ks;
+- static unsigned char buff[20];
+ unsigned char bb[9];
+ unsigned char *b=bb;
+ unsigned char c,u;
+@@ -521,13 +522,15 @@
+ buff[i]=cov_2char[c];
+ }
+ buff[13]='\0';
+- return((char *)buff);
++ return buff;
+ }
+
+-static int body(out0,out1,ks,Eswap0,Eswap1)
+-unsigned long *out0,*out1;
+-des_key_schedule *ks;
+-unsigned long Eswap0,Eswap1;
++static int
++body( unsigned long *out0,
++ unsigned long *out1,
++ des_key_schedule ks,
++ unsigned long Eswap0,
++ unsigned long Eswap1)
+ {
+ register unsigned long l,r,t,u,v;
+ #ifdef ALT_ECB
+End of Patch.
diff --git a/gnu/usr.bin/perl/win32/perlhost.h b/gnu/usr.bin/perl/win32/perlhost.h
new file mode 100644
index 00000000000..a0f7783019c
--- /dev/null
+++ b/gnu/usr.bin/perl/win32/perlhost.h
@@ -0,0 +1,941 @@
+
+#include "iperlsys.h"
+
+extern CPerlObj *pPerl;
+
+#define CALLFUNC0RET(x)\
+ int ret = x;\
+ if (ret < 0)\
+ err = errno;\
+ return ret;
+
+#define PROCESS_AND_RETURN \
+ if (errno) \
+ err = errno; \
+ return r
+
+#define CALLFUNCRET(x)\
+ int ret = x;\
+ if (ret)\
+ err = errno;\
+ return ret;
+
+#define CALLFUNCERR(x)\
+ int ret = x;\
+ if (errno)\
+ err = errno;\
+ return ret;
+
+#define LCALLFUNCERR(x)\
+ long ret = x;\
+ if (errno)\
+ err = errno;\
+ return ret;
+
+class CPerlDir : public IPerlDir
+{
+public:
+ CPerlDir() {};
+ virtual int Makedir(const char *dirname, int mode, int &err)
+ {
+ CALLFUNC0RET(win32_mkdir(dirname, mode));
+ };
+ virtual int Chdir(const char *dirname, int &err)
+ {
+ CALLFUNC0RET(win32_chdir(dirname));
+ };
+ virtual int Rmdir(const char *dirname, int &err)
+ {
+ CALLFUNC0RET(win32_rmdir(dirname));
+ };
+ virtual int Close(DIR *dirp, int &err)
+ {
+ return win32_closedir(dirp);
+ };
+ virtual DIR *Open(char *filename, int &err)
+ {
+ return win32_opendir(filename);
+ };
+ virtual struct direct *Read(DIR *dirp, int &err)
+ {
+ return win32_readdir(dirp);
+ };
+ virtual void Rewind(DIR *dirp, int &err)
+ {
+ win32_rewinddir(dirp);
+ };
+ virtual void Seek(DIR *dirp, long loc, int &err)
+ {
+ win32_seekdir(dirp, loc);
+ };
+ virtual long Tell(DIR *dirp, int &err)
+ {
+ return win32_telldir(dirp);
+ };
+};
+
+
+extern char * g_win32_get_privlib(char *pl);
+extern char * g_win32_get_sitelib(char *pl);
+
+class CPerlEnv : public IPerlEnv
+{
+public:
+ CPerlEnv() {};
+ virtual char *Getenv(const char *varname, int &err)
+ {
+ return win32_getenv(varname);
+ };
+ virtual int Putenv(const char *envstring, int &err)
+ {
+ return win32_putenv(envstring);
+ };
+ virtual char* LibPath(char *pl)
+ {
+ return g_win32_get_privlib(pl);
+ };
+ virtual char* SiteLibPath(char *pl)
+ {
+ return g_win32_get_sitelib(pl);
+ };
+};
+
+class CPerlSock : public IPerlSock
+{
+public:
+ CPerlSock() {};
+ virtual u_long Htonl(u_long hostlong)
+ {
+ return win32_htonl(hostlong);
+ };
+ virtual u_short Htons(u_short hostshort)
+ {
+ return win32_htons(hostshort);
+ };
+ virtual u_long Ntohl(u_long netlong)
+ {
+ return win32_ntohl(netlong);
+ };
+ virtual u_short Ntohs(u_short netshort)
+ {
+ return win32_ntohs(netshort);
+ }
+
+ virtual SOCKET Accept(SOCKET s, struct sockaddr* addr, int* addrlen, int &err)
+ {
+ SOCKET r = win32_accept(s, addr, addrlen);
+ PROCESS_AND_RETURN;
+ };
+ virtual int Bind(SOCKET s, const struct sockaddr* name, int namelen, int &err)
+ {
+ int r = win32_bind(s, name, namelen);
+ PROCESS_AND_RETURN;
+ };
+ virtual int Connect(SOCKET s, const struct sockaddr* name, int namelen, int &err)
+ {
+ int r = win32_connect(s, name, namelen);
+ PROCESS_AND_RETURN;
+ };
+ virtual void Endhostent(int &err)
+ {
+ win32_endhostent();
+ };
+ virtual void Endnetent(int &err)
+ {
+ win32_endnetent();
+ };
+ virtual void Endprotoent(int &err)
+ {
+ win32_endprotoent();
+ };
+ virtual void Endservent(int &err)
+ {
+ win32_endservent();
+ };
+ virtual struct hostent* Gethostbyaddr(const char* addr, int len, int type, int &err)
+ {
+ struct hostent *r = win32_gethostbyaddr(addr, len, type);
+ PROCESS_AND_RETURN;
+ };
+ virtual struct hostent* Gethostbyname(const char* name, int &err)
+ {
+ struct hostent *r = win32_gethostbyname(name);
+ PROCESS_AND_RETURN;
+ };
+ virtual struct hostent* Gethostent(int &err)
+ {
+ croak("gethostent not implemented!\n");
+ return NULL;
+ };
+ virtual int Gethostname(char* name, int namelen, int &err)
+ {
+ int r = win32_gethostname(name, namelen);
+ PROCESS_AND_RETURN;
+ };
+ virtual struct netent *Getnetbyaddr(long net, int type, int &err)
+ {
+ struct netent *r = win32_getnetbyaddr(net, type);
+ PROCESS_AND_RETURN;
+ };
+ virtual struct netent *Getnetbyname(const char *name, int &err)
+ {
+ struct netent *r = win32_getnetbyname((char*)name);
+ PROCESS_AND_RETURN;
+ };
+ virtual struct netent *Getnetent(int &err)
+ {
+ struct netent *r = win32_getnetent();
+ PROCESS_AND_RETURN;
+ };
+ virtual int Getpeername(SOCKET s, struct sockaddr* name, int* namelen, int &err)
+ {
+ int r = win32_getpeername(s, name, namelen);
+ PROCESS_AND_RETURN;
+ };
+ virtual struct protoent* Getprotobyname(const char* name, int &err)
+ {
+ struct protoent *r = win32_getprotobyname(name);
+ PROCESS_AND_RETURN;
+ };
+ virtual struct protoent* Getprotobynumber(int number, int &err)
+ {
+ struct protoent *r = win32_getprotobynumber(number);
+ PROCESS_AND_RETURN;
+ };
+ virtual struct protoent* Getprotoent(int &err)
+ {
+ struct protoent *r = win32_getprotoent();
+ PROCESS_AND_RETURN;
+ };
+ virtual struct servent* Getservbyname(const char* name, const char* proto, int &err)
+ {
+ struct servent *r = win32_getservbyname(name, proto);
+ PROCESS_AND_RETURN;
+ };
+ virtual struct servent* Getservbyport(int port, const char* proto, int &err)
+ {
+ struct servent *r = win32_getservbyport(port, proto);
+ PROCESS_AND_RETURN;
+ };
+ virtual struct servent* Getservent(int &err)
+ {
+ struct servent *r = win32_getservent();
+ PROCESS_AND_RETURN;
+ };
+ virtual int Getsockname(SOCKET s, struct sockaddr* name, int* namelen, int &err)
+ {
+ int r = win32_getsockname(s, name, namelen);
+ PROCESS_AND_RETURN;
+ };
+ virtual int Getsockopt(SOCKET s, int level, int optname, char* optval, int* optlen, int &err)
+ {
+ int r = win32_getsockopt(s, level, optname, optval, optlen);
+ PROCESS_AND_RETURN;
+ };
+ virtual unsigned long InetAddr(const char* cp, int &err)
+ {
+ unsigned long r = win32_inet_addr(cp);
+ PROCESS_AND_RETURN;
+ };
+ virtual char* InetNtoa(struct in_addr in, int &err)
+ {
+ char *r = win32_inet_ntoa(in);
+ PROCESS_AND_RETURN;
+ };
+ virtual int Listen(SOCKET s, int backlog, int &err)
+ {
+ int r = win32_listen(s, backlog);
+ PROCESS_AND_RETURN;
+ };
+ virtual int Recv(SOCKET s, char* buffer, int len, int flags, int &err)
+ {
+ int r = win32_recv(s, buffer, len, flags);
+ PROCESS_AND_RETURN;
+ };
+ virtual int Recvfrom(SOCKET s, char* buffer, int len, int flags, struct sockaddr* from, int* fromlen, int &err)
+ {
+ int r = win32_recvfrom(s, buffer, len, flags, from, fromlen);
+ PROCESS_AND_RETURN;
+ };
+ virtual int Select(int nfds, char* readfds, char* writefds, char* exceptfds, const struct timeval* timeout, int &err)
+ {
+ int r = win32_select(nfds, (Perl_fd_set*)readfds, (Perl_fd_set*)writefds, (Perl_fd_set*)exceptfds, timeout);
+ PROCESS_AND_RETURN;
+ };
+ virtual int Send(SOCKET s, const char* buffer, int len, int flags, int &err)
+ {
+ int r = win32_send(s, buffer, len, flags);
+ PROCESS_AND_RETURN;
+ };
+ virtual int Sendto(SOCKET s, const char* buffer, int len, int flags, const struct sockaddr* to, int tolen, int &err)
+ {
+ int r = win32_sendto(s, buffer, len, flags, to, tolen);
+ PROCESS_AND_RETURN;
+ };
+ virtual void Sethostent(int stayopen, int &err)
+ {
+ win32_sethostent(stayopen);
+ };
+ virtual void Setnetent(int stayopen, int &err)
+ {
+ win32_setnetent(stayopen);
+ };
+ virtual void Setprotoent(int stayopen, int &err)
+ {
+ win32_setprotoent(stayopen);
+ };
+ virtual void Setservent(int stayopen, int &err)
+ {
+ win32_setservent(stayopen);
+ };
+ virtual int Setsockopt(SOCKET s, int level, int optname, const char* optval, int optlen, int &err)
+ {
+ int r = win32_setsockopt(s, level, optname, optval, optlen);
+ PROCESS_AND_RETURN;
+ };
+ virtual int Shutdown(SOCKET s, int how, int &err)
+ {
+ int r = win32_shutdown(s, how);
+ PROCESS_AND_RETURN;
+ };
+ virtual SOCKET Socket(int af, int type, int protocol, int &err)
+ {
+ SOCKET r = win32_socket(af, type, protocol);
+ PROCESS_AND_RETURN;
+ };
+ virtual int Socketpair(int domain, int type, int protocol, int* fds, int &err)
+ {
+ croak("socketpair not implemented!\n");
+ return 0;
+ };
+ virtual int Closesocket(SOCKET s, int& err)
+ {
+ int r = win32_closesocket(s);
+ PROCESS_AND_RETURN;
+ };
+ virtual int Ioctlsocket(SOCKET s, long cmd, u_long *argp, int& err)
+ {
+ int r = win32_ioctlsocket(s, cmd, argp);
+ PROCESS_AND_RETURN;
+ };
+};
+
+class CPerlLIO : public IPerlLIO
+{
+public:
+ CPerlLIO() {};
+ virtual int Access(const char *path, int mode, int &err)
+ {
+ CALLFUNCRET(access(path, mode))
+ };
+ virtual int Chmod(const char *filename, int pmode, int &err)
+ {
+ CALLFUNCRET(chmod(filename, pmode))
+ };
+ virtual int Chown(const char *filename, uid_t owner, gid_t group, int &err)
+ {
+ CALLFUNCERR(chown(filename, owner, group))
+ };
+ virtual int Chsize(int handle, long size, int &err)
+ {
+ CALLFUNCRET(chsize(handle, size))
+ };
+ virtual int Close(int handle, int &err)
+ {
+ CALLFUNCRET(win32_close(handle))
+ };
+ virtual int Dup(int handle, int &err)
+ {
+ CALLFUNCERR(win32_dup(handle))
+ };
+ virtual int Dup2(int handle1, int handle2, int &err)
+ {
+ CALLFUNCERR(win32_dup2(handle1, handle2))
+ };
+ virtual int Flock(int fd, int oper, int &err)
+ {
+ CALLFUNCERR(win32_flock(fd, oper))
+ };
+ virtual int FileStat(int handle, struct stat *buffer, int &err)
+ {
+ CALLFUNCERR(fstat(handle, buffer))
+ };
+ virtual int IOCtl(int i, unsigned int u, char *data, int &err)
+ {
+ CALLFUNCERR(win32_ioctlsocket((SOCKET)i, (long)u, (u_long*)data))
+ };
+ virtual int Isatty(int fd, int &err)
+ {
+ return isatty(fd);
+ };
+ virtual long Lseek(int handle, long offset, int origin, int &err)
+ {
+ LCALLFUNCERR(win32_lseek(handle, offset, origin))
+ };
+ virtual int Lstat(const char *path, struct stat *buffer, int &err)
+ {
+ return NameStat(path, buffer, err);
+ };
+ virtual char *Mktemp(char *Template, int &err)
+ {
+ return mktemp(Template);
+ };
+ virtual int Open(const char *filename, int oflag, int &err)
+ {
+ CALLFUNCERR(win32_open(filename, oflag))
+ };
+ virtual int Open(const char *filename, int oflag, int pmode, int &err)
+ {
+ int ret;
+ if(stricmp(filename, "/dev/null") == 0)
+ ret = open("NUL", oflag, pmode);
+ else
+ ret = open(filename, oflag, pmode);
+
+ if(errno)
+ err = errno;
+ return ret;
+ };
+ virtual int Read(int handle, void *buffer, unsigned int count, int &err)
+ {
+ CALLFUNCERR(win32_read(handle, buffer, count))
+ };
+ virtual int Rename(const char *OldFileName, const char *newname, int &err)
+ {
+ CALLFUNCRET(win32_rename(OldFileName, newname))
+ };
+ virtual int Setmode(int handle, int mode, int &err)
+ {
+ CALLFUNCRET(win32_setmode(handle, mode))
+ };
+ virtual int NameStat(const char *path, struct stat *buffer, int &err)
+ {
+ return win32_stat(path, buffer);
+ };
+ virtual char *Tmpnam(char *string, int &err)
+ {
+ return tmpnam(string);
+ };
+ virtual int Umask(int pmode, int &err)
+ {
+ return umask(pmode);
+ };
+ virtual int Unlink(const char *filename, int &err)
+ {
+ chmod(filename, S_IREAD | S_IWRITE);
+ CALLFUNCRET(unlink(filename))
+ };
+ virtual int Utime(char *filename, struct utimbuf *times, int &err)
+ {
+ CALLFUNCRET(win32_utime(filename, times))
+ };
+ virtual int Write(int handle, const void *buffer, unsigned int count, int &err)
+ {
+ CALLFUNCERR(win32_write(handle, buffer, count))
+ };
+};
+
+class CPerlMem : public IPerlMem
+{
+public:
+ CPerlMem() {};
+ virtual void* Malloc(size_t size)
+ {
+ return win32_malloc(size);
+ };
+ virtual void* Realloc(void* ptr, size_t size)
+ {
+ return win32_realloc(ptr, size);
+ };
+ virtual void Free(void* ptr)
+ {
+ win32_free(ptr);
+ };
+};
+
+#define EXECF_EXEC 1
+#define EXECF_SPAWN 2
+
+extern char * g_getlogin(void);
+extern int do_spawn2(char *cmd, int exectype);
+extern int g_do_aspawn(void *vreally, void **vmark, void **vsp);
+
+class CPerlProc : public IPerlProc
+{
+public:
+ CPerlProc() {};
+ virtual void Abort(void)
+ {
+ win32_abort();
+ };
+ virtual char * Crypt(const char* clear, const char* salt)
+ {
+ return win32_crypt(clear, salt);
+ };
+ virtual void Exit(int status)
+ {
+ exit(status);
+ };
+ virtual void _Exit(int status)
+ {
+ _exit(status);
+ };
+ virtual int Execl(const char *cmdname, const char *arg0, const char *arg1, const char *arg2, const char *arg3)
+ {
+ return execl(cmdname, arg0, arg1, arg2, arg3);
+ };
+ virtual int Execv(const char *cmdname, const char *const *argv)
+ {
+ return win32_execvp(cmdname, argv);
+ };
+ virtual int Execvp(const char *cmdname, const char *const *argv)
+ {
+ return win32_execvp(cmdname, argv);
+ };
+ virtual uid_t Getuid(void)
+ {
+ return getuid();
+ };
+ virtual uid_t Geteuid(void)
+ {
+ return geteuid();
+ };
+ virtual gid_t Getgid(void)
+ {
+ return getgid();
+ };
+ virtual gid_t Getegid(void)
+ {
+ return getegid();
+ };
+ virtual char *Getlogin(void)
+ {
+ return g_getlogin();
+ };
+ virtual int Kill(int pid, int sig)
+ {
+ return win32_kill(pid, sig);
+ };
+ virtual int Killpg(int pid, int sig)
+ {
+ croak("killpg not implemented!\n");
+ return 0;
+ };
+ virtual int PauseProc(void)
+ {
+ return win32_sleep((32767L << 16) + 32767);
+ };
+ virtual PerlIO* Popen(const char *command, const char *mode)
+ {
+ win32_fflush(stdout);
+ win32_fflush(stderr);
+ return (PerlIO*)win32_popen(command, mode);
+ };
+ virtual int Pclose(PerlIO *stream)
+ {
+ return win32_pclose((FILE*)stream);
+ };
+ virtual int Pipe(int *phandles)
+ {
+ return win32_pipe(phandles, 512, O_BINARY);
+ };
+ virtual int Setuid(uid_t u)
+ {
+ return setuid(u);
+ };
+ virtual int Setgid(gid_t g)
+ {
+ return setgid(g);
+ };
+ virtual int Sleep(unsigned int s)
+ {
+ return win32_sleep(s);
+ };
+ virtual int Times(struct tms *timebuf)
+ {
+ return win32_times(timebuf);
+ };
+ virtual int Wait(int *status)
+ {
+ return win32_wait(status);
+ };
+ virtual int Waitpid(int pid, int *status, int flags)
+ {
+ return win32_waitpid(pid, status, flags);
+ };
+ virtual Sighandler_t Signal(int sig, Sighandler_t subcode)
+ {
+ return 0;
+ };
+ virtual void GetSysMsg(char*& sMsg, DWORD& dwLen, DWORD dwErr)
+ {
+ dwLen = FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER
+ |FORMAT_MESSAGE_IGNORE_INSERTS
+ |FORMAT_MESSAGE_FROM_SYSTEM, NULL,
+ dwErr, 0, (char *)&sMsg, 1, NULL);
+ if (0 < dwLen) {
+ while (0 < dwLen && isspace(sMsg[--dwLen]))
+ ;
+ if ('.' != sMsg[dwLen])
+ dwLen++;
+ sMsg[dwLen]= '\0';
+ }
+ if (0 == dwLen) {
+ sMsg = (char*)LocalAlloc(0, 64/**sizeof(TCHAR)*/);
+ dwLen = sprintf(sMsg,
+ "Unknown error #0x%lX (lookup 0x%lX)",
+ dwErr, GetLastError());
+ }
+ };
+ virtual void FreeBuf(char* sMsg)
+ {
+ LocalFree(sMsg);
+ };
+ virtual BOOL DoCmd(char *cmd)
+ {
+ do_spawn2(cmd, EXECF_EXEC);
+ return FALSE;
+ };
+ virtual int Spawn(char* cmds)
+ {
+ return do_spawn2(cmds, EXECF_SPAWN);
+ };
+ virtual int Spawnvp(int mode, const char *cmdname, const char *const *argv)
+ {
+ return win32_spawnvp(mode, cmdname, argv);
+ };
+ virtual int ASpawn(void *vreally, void **vmark, void **vsp)
+ {
+ return g_do_aspawn(vreally, vmark, vsp);
+ };
+};
+
+
+class CPerlStdIO : public IPerlStdIO
+{
+public:
+ CPerlStdIO() {};
+ virtual PerlIO* Stdin(void)
+ {
+ return (PerlIO*)win32_stdin();
+ };
+ virtual PerlIO* Stdout(void)
+ {
+ return (PerlIO*)win32_stdout();
+ };
+ virtual PerlIO* Stderr(void)
+ {
+ return (PerlIO*)win32_stderr();
+ };
+ virtual PerlIO* Open(const char *path, const char *mode, int &err)
+ {
+ PerlIO*pf = (PerlIO*)win32_fopen(path, mode);
+ if(errno)
+ err = errno;
+ return pf;
+ };
+ virtual int Close(PerlIO* pf, int &err)
+ {
+ CALLFUNCERR(win32_fclose(((FILE*)pf)))
+ };
+ virtual int Eof(PerlIO* pf, int &err)
+ {
+ CALLFUNCERR(win32_feof((FILE*)pf))
+ };
+ virtual int Error(PerlIO* pf, int &err)
+ {
+ CALLFUNCERR(win32_ferror((FILE*)pf))
+ };
+ virtual void Clearerr(PerlIO* pf, int &err)
+ {
+ win32_clearerr((FILE*)pf);
+ };
+ virtual int Getc(PerlIO* pf, int &err)
+ {
+ CALLFUNCERR(win32_getc((FILE*)pf))
+ };
+ virtual char* GetBase(PerlIO* pf, int &err)
+ {
+#ifdef FILE_base
+ FILE *f = (FILE*)pf;
+ return FILE_base(f);
+#else
+ return Nullch;
+#endif
+ };
+ virtual int GetBufsiz(PerlIO* pf, int &err)
+ {
+#ifdef FILE_bufsiz
+ FILE *f = (FILE*)pf;
+ return FILE_bufsiz(f);
+#else
+ return (-1);
+#endif
+ };
+ virtual int GetCnt(PerlIO* pf, int &err)
+ {
+#ifdef USE_STDIO_PTR
+ FILE *f = (FILE*)pf;
+ return FILE_cnt(f);
+#else
+ return (-1);
+#endif
+ };
+ virtual char* GetPtr(PerlIO* pf, int &err)
+ {
+#ifdef USE_STDIO_PTR
+ FILE *f = (FILE*)pf;
+ return FILE_ptr(f);
+#else
+ return Nullch;
+#endif
+ };
+ virtual char* Gets(PerlIO* pf, char* s, int n, int& err)
+ {
+ char* ret = win32_fgets(s, n, (FILE*)pf);
+ if(errno)
+ err = errno;
+ return ret;
+ };
+ virtual int Putc(PerlIO* pf, int c, int &err)
+ {
+ CALLFUNCERR(win32_fputc(c, (FILE*)pf))
+ };
+ virtual int Puts(PerlIO* pf, const char *s, int &err)
+ {
+ CALLFUNCERR(win32_fputs(s, (FILE*)pf))
+ };
+ virtual int Flush(PerlIO* pf, int &err)
+ {
+ CALLFUNCERR(win32_fflush((FILE*)pf))
+ };
+ virtual int Ungetc(PerlIO* pf,int c, int &err)
+ {
+ CALLFUNCERR(win32_ungetc(c, (FILE*)pf))
+ };
+ virtual int Fileno(PerlIO* pf, int &err)
+ {
+ CALLFUNCERR(win32_fileno((FILE*)pf))
+ };
+ virtual PerlIO* Fdopen(int fd, const char *mode, int &err)
+ {
+ PerlIO* pf = (PerlIO*)win32_fdopen(fd, mode);
+ if(errno)
+ err = errno;
+ return pf;
+ };
+ virtual PerlIO* Reopen(const char*path, const char*mode, PerlIO* pf, int &err)
+ {
+ PerlIO* newPf = (PerlIO*)win32_freopen(path, mode, (FILE*)pf);
+ if(errno)
+ err = errno;
+ return newPf;
+ };
+ virtual SSize_t Read(PerlIO* pf, void *buffer, Size_t size, int &err)
+ {
+ SSize_t i = win32_fread(buffer, 1, size, (FILE*)pf);
+ if(errno)
+ err = errno;
+ return i;
+ };
+ virtual SSize_t Write(PerlIO* pf, const void *buffer, Size_t size, int &err)
+ {
+ SSize_t i = win32_fwrite(buffer, 1, size, (FILE*)pf);
+ if(errno)
+ err = errno;
+ return i;
+ };
+ virtual void SetBuf(PerlIO* pf, char* buffer, int &err)
+ {
+ win32_setbuf((FILE*)pf, buffer);
+ };
+ virtual int SetVBuf(PerlIO* pf, char* buffer, int type, Size_t size, int &err)
+ {
+ int i = win32_setvbuf((FILE*)pf, buffer, type, size);
+ if(errno)
+ err = errno;
+ return i;
+ };
+ virtual void SetCnt(PerlIO* pf, int n, int &err)
+ {
+#ifdef STDIO_CNT_LVALUE
+ FILE *f = (FILE*)pf;
+ FILE_cnt(f) = n;
+#endif
+ };
+ virtual void SetPtrCnt(PerlIO* pf, char * ptr, int n, int& err)
+ {
+#ifdef STDIO_PTR_LVALUE
+ FILE *f = (FILE*)pf;
+ FILE_ptr(f) = ptr;
+ FILE_cnt(f) = n;
+#endif
+ };
+ virtual void Setlinebuf(PerlIO* pf, int &err)
+ {
+ win32_setvbuf((FILE*)pf, NULL, _IOLBF, 0);
+ };
+ virtual int Printf(PerlIO* pf, int &err, const char *format,...)
+ {
+ va_list(arglist);
+ va_start(arglist, format);
+ int i = win32_vfprintf((FILE*)pf, format, arglist);
+ if(errno)
+ err = errno;
+ return i;
+ };
+ virtual int Vprintf(PerlIO* pf, int &err, const char *format, va_list arglist)
+ {
+ int i = win32_vfprintf((FILE*)pf, format, arglist);
+ if(errno)
+ err = errno;
+ return i;
+ };
+ virtual long Tell(PerlIO* pf, int &err)
+ {
+ long l = win32_ftell((FILE*)pf);
+ if(errno)
+ err = errno;
+ return l;
+ };
+ virtual int Seek(PerlIO* pf, off_t offset, int origin, int &err)
+ {
+ int i = win32_fseek((FILE*)pf, offset, origin);
+ if(errno)
+ err = errno;
+ return i;
+ };
+ virtual void Rewind(PerlIO* pf, int &err)
+ {
+ win32_rewind((FILE*)pf);
+ };
+ virtual PerlIO* Tmpfile(int &err)
+ {
+ PerlIO* pf = (PerlIO*)win32_tmpfile();
+ if(errno)
+ err = errno;
+ return pf;
+ };
+ virtual int Getpos(PerlIO* pf, Fpos_t *p, int &err)
+ {
+ int i = win32_fgetpos((FILE*)pf, p);
+ if(errno)
+ err = errno;
+ return i;
+ };
+ virtual int Setpos(PerlIO* pf, const Fpos_t *p, int &err)
+ {
+ int i = win32_fsetpos((FILE*)pf, p);
+ if(errno)
+ err = errno;
+ return i;
+ };
+ virtual void Init(int &err)
+ {
+ };
+ virtual void InitOSExtras(void* p)
+ {
+ Perl_init_os_extras();
+ };
+ virtual int OpenOSfhandle(long osfhandle, int flags)
+ {
+ return win32_open_osfhandle(osfhandle, flags);
+ }
+ virtual int GetOSfhandle(int filenum)
+ {
+ return win32_get_osfhandle(filenum);
+ }
+};
+
+class CPerlHost
+{
+public:
+ CPerlHost() { pPerl = NULL; };
+ inline BOOL PerlCreate(void)
+ {
+ try
+ {
+ pPerl = perl_alloc(&perlMem, &perlEnv, &perlStdIO, &perlLIO,
+ &perlDir, &perlSock, &perlProc);
+ if(pPerl != NULL)
+ {
+ try
+ {
+ pPerl->perl_construct();
+ }
+ catch(...)
+ {
+ win32_fprintf(stderr, "%s\n",
+ "Error: Unable to construct data structures");
+ pPerl->perl_free();
+ pPerl = NULL;
+ }
+ }
+ }
+ catch(...)
+ {
+ win32_fprintf(stderr, "%s\n", "Error: Unable to allocate memory");
+ pPerl = NULL;
+ }
+ return (pPerl != NULL);
+ };
+ inline int PerlParse(void (*xs_init)(CPerlObj*), int argc, char** argv, char** env)
+ {
+ int retVal;
+ try
+ {
+ retVal = pPerl->perl_parse(xs_init, argc, argv, env);
+ }
+ catch(int x)
+ {
+ // this is where exit() should arrive
+ retVal = x;
+ }
+ catch(...)
+ {
+ win32_fprintf(stderr, "Error: Parse exception\n");
+ retVal = -1;
+ }
+ *win32_errno() = 0;
+ return retVal;
+ };
+ inline int PerlRun(void)
+ {
+ int retVal;
+ try
+ {
+ retVal = pPerl->perl_run();
+ }
+ catch(int x)
+ {
+ // this is where exit() should arrive
+ retVal = x;
+ }
+ catch(...)
+ {
+ win32_fprintf(stderr, "Error: Runtime exception\n");
+ retVal = -1;
+ }
+ return retVal;
+ };
+ inline void PerlDestroy(void)
+ {
+ try
+ {
+ pPerl->perl_destruct();
+ pPerl->perl_free();
+ }
+ catch(...)
+ {
+ }
+ };
+
+protected:
+ CPerlDir perlDir;
+ CPerlEnv perlEnv;
+ CPerlLIO perlLIO;
+ CPerlMem perlMem;
+ CPerlProc perlProc;
+ CPerlSock perlSock;
+ CPerlStdIO perlStdIO;
+};
diff --git a/gnu/usr.bin/perl/win32/win32thread.c b/gnu/usr.bin/perl/win32/win32thread.c
new file mode 100644
index 00000000000..b40c5aa251c
--- /dev/null
+++ b/gnu/usr.bin/perl/win32/win32thread.c
@@ -0,0 +1,131 @@
+#include "EXTERN.h"
+#include "perl.h"
+
+#if defined(PERL_OBJECT)
+#define NO_XSLOCKS
+extern CPerlObj* pPerl;
+#include "XSUB.h"
+#endif
+
+#ifdef USE_DECLSPEC_THREAD
+__declspec(thread) struct perl_thread *Perl_current_thread = NULL;
+#endif
+
+void
+Perl_setTHR(struct perl_thread *t)
+{
+#ifdef USE_THREADS
+#ifdef USE_DECLSPEC_THREAD
+ Perl_current_thread = t;
+#else
+ TlsSetValue(PL_thr_key,t);
+#endif
+#endif
+}
+
+struct perl_thread *
+Perl_getTHR(void)
+{
+#ifdef USE_THREADS
+#ifdef USE_DECLSPEC_THREAD
+ return Perl_current_thread;
+#else
+ return (struct perl_thread *) TlsGetValue(PL_thr_key);
+#endif
+#else
+ return NULL;
+#endif
+}
+
+void
+Perl_alloc_thread_key(void)
+{
+#ifdef USE_THREADS
+ static int key_allocated = 0;
+ if (!key_allocated) {
+ if ((PL_thr_key = TlsAlloc()) == TLS_OUT_OF_INDEXES)
+ croak("panic: TlsAlloc");
+ key_allocated = 1;
+ }
+#endif
+}
+
+void
+Perl_init_thread_intern(struct perl_thread *athr)
+{
+#ifdef USE_THREADS
+#ifndef USE_DECLSPEC_THREAD
+
+ /*
+ * Initialize port-specific per-thread data in thr->i
+ * as only things we have there are just static areas for
+ * return values we don't _need_ to do anything but
+ * this is good practice:
+ */
+ memset(&athr->i,0,sizeof(athr->i));
+
+#endif
+#endif
+}
+
+void
+Perl_set_thread_self(struct perl_thread *thr)
+{
+#ifdef USE_THREADS
+ /* Set thr->self. GetCurrentThread() retrurns a pseudo handle, need
+ this to convert it into a handle another thread can use.
+ */
+ DuplicateHandle(GetCurrentProcess(),
+ GetCurrentThread(),
+ GetCurrentProcess(),
+ &thr->self,
+ 0,
+ FALSE,
+ DUPLICATE_SAME_ACCESS);
+#endif
+}
+
+#ifdef USE_THREADS
+int
+Perl_thread_create(struct perl_thread *thr, thread_func_t *fn)
+{
+ DWORD junk;
+ unsigned long th;
+
+ DEBUG_S(PerlIO_printf(PerlIO_stderr(),
+ "%p: create OS thread\n", thr));
+#ifdef USE_RTL_THREAD_API
+ /* See comment about USE_RTL_THREAD_API in win32thread.h */
+#if defined(__BORLANDC__)
+ th = _beginthreadNT(fn, /* start address */
+ 0, /* stack size */
+ (void *)thr, /* parameters */
+ (void *)NULL, /* security attrib */
+ 0, /* creation flags */
+ (unsigned long *)&junk); /* tid */
+ if (th == (unsigned long)-1)
+ th = 0;
+#elif defined(_MSC_VER_)
+ th = _beginthreadex((void *)NULL, /* security attrib */
+ 0, /* stack size */
+ fn, /* start address */
+ (void*)thr, /* parameters */
+ 0, /* creation flags */
+ (unsigned *)&junk); /* tid */
+#else /* compilers using CRTDLL.DLL only have _beginthread() */
+ th = _beginthread(fn, /* start address */
+ 0, /* stack size */
+ (void*)thr); /* parameters */
+ if (th == (unsigned long)-1)
+ th = 0;
+#endif
+ thr->self = (HANDLE)th;
+#else /* !USE_RTL_THREAD_API */
+ thr->self = CreateThread(NULL, 0, fn, (void*)thr, 0, &junk);
+#endif /* !USE_RTL_THREAD_API */
+ DEBUG_S(PerlIO_printf(PerlIO_stderr(),
+ "%p: OS thread = %p, id=%ld\n", thr, thr->self, junk));
+ return thr->self ? 0 : -1;
+}
+#endif
+
diff --git a/gnu/usr.bin/perl/win32/win32thread.h b/gnu/usr.bin/perl/win32/win32thread.h
new file mode 100644
index 00000000000..512e6296e5d
--- /dev/null
+++ b/gnu/usr.bin/perl/win32/win32thread.h
@@ -0,0 +1,187 @@
+#ifndef _WIN32THREAD_H
+#define _WIN32THREAD_H
+typedef struct win32_cond { LONG waiters; HANDLE sem; } perl_cond;
+typedef DWORD perl_key;
+typedef HANDLE perl_os_thread;
+
+#ifndef DONT_USE_CRITICAL_SECTION
+
+/* Critical Sections used instead of mutexes: lightweight,
+ * but can't be communicated to child processes, and can't get
+ * HANDLE to it for use elsewhere.
+ */
+typedef CRITICAL_SECTION perl_mutex;
+#define MUTEX_INIT(m) InitializeCriticalSection(m)
+#define MUTEX_LOCK(m) EnterCriticalSection(m)
+#define MUTEX_UNLOCK(m) LeaveCriticalSection(m)
+#define MUTEX_DESTROY(m) DeleteCriticalSection(m)
+
+#else
+
+typedef HANDLE perl_mutex;
+#define MUTEX_INIT(m) \
+ STMT_START { \
+ if ((*(m) = CreateMutex(NULL,FALSE,NULL)) == NULL) \
+ croak("panic: MUTEX_INIT"); \
+ } STMT_END
+#define MUTEX_LOCK(m) \
+ STMT_START { \
+ if (WaitForSingleObject(*(m),INFINITE) == WAIT_FAILED) \
+ croak("panic: MUTEX_LOCK"); \
+ } STMT_END
+#define MUTEX_UNLOCK(m) \
+ STMT_START { \
+ if (ReleaseMutex(*(m)) == 0) \
+ croak("panic: MUTEX_UNLOCK"); \
+ } STMT_END
+#define MUTEX_DESTROY(m) \
+ STMT_START { \
+ if (CloseHandle(*(m)) == 0) \
+ croak("panic: MUTEX_DESTROY"); \
+ } STMT_END
+
+#endif
+
+/* These macros assume that the mutex associated with the condition
+ * will always be held before COND_{SIGNAL,BROADCAST,WAIT,DESTROY},
+ * so there's no separate mutex protecting access to (c)->waiters
+ */
+#define COND_INIT(c) \
+ STMT_START { \
+ (c)->waiters = 0; \
+ (c)->sem = CreateSemaphore(NULL,0,LONG_MAX,NULL); \
+ if ((c)->sem == NULL) \
+ croak("panic: COND_INIT (%ld)",GetLastError()); \
+ } STMT_END
+
+#define COND_SIGNAL(c) \
+ STMT_START { \
+ if ((c)->waiters > 0 && \
+ ReleaseSemaphore((c)->sem,1,NULL) == 0) \
+ croak("panic: COND_SIGNAL (%ld)",GetLastError()); \
+ } STMT_END
+
+#define COND_BROADCAST(c) \
+ STMT_START { \
+ if ((c)->waiters > 0 && \
+ ReleaseSemaphore((c)->sem,(c)->waiters,NULL) == 0) \
+ croak("panic: COND_BROADCAST (%ld)",GetLastError());\
+ } STMT_END
+
+#define COND_WAIT(c, m) \
+ STMT_START { \
+ (c)->waiters++; \
+ MUTEX_UNLOCK(m); \
+ /* Note that there's no race here, since a \
+ * COND_BROADCAST() on another thread will have seen the\
+ * right number of waiters (i.e. including this one) */ \
+ if (WaitForSingleObject((c)->sem,INFINITE)==WAIT_FAILED)\
+ croak("panic: COND_WAIT (%ld)",GetLastError()); \
+ /* XXX there may be an inconsequential race here */ \
+ MUTEX_LOCK(m); \
+ (c)->waiters--; \
+ } STMT_END
+
+#define COND_DESTROY(c) \
+ STMT_START { \
+ (c)->waiters = 0; \
+ if (CloseHandle((c)->sem) == 0) \
+ croak("panic: COND_DESTROY (%ld)",GetLastError()); \
+ } STMT_END
+
+#define DETACH(t) \
+ STMT_START { \
+ if (CloseHandle((t)->self) == 0) { \
+ MUTEX_UNLOCK(&(t)->mutex); \
+ croak("panic: DETACH"); \
+ } \
+ } STMT_END
+
+
+#define THREAD_CREATE(t, f) Perl_thread_create(t, f)
+#define THREAD_POST_CREATE(t) NOOP
+
+/* XXX Docs mention that the RTL versions of thread creation routines
+ * should be used, but that advice only seems applicable when the RTL
+ * is not in a DLL. RTL DLLs in both Borland and VC seem to do all of
+ * the init/deinit required upon DLL_THREAD_ATTACH/DETACH. So we seem
+ * to be completely safe using straight Win32 API calls, rather than
+ * the much braindamaged RTL calls.
+ *
+ * _beginthread() in the RTLs call CloseHandle() just after the thread
+ * function returns, which means: 1) we have a race on our hands
+ * 2) it is impossible to implement join() semantics.
+ *
+ * IOW, do *NOT* turn on USE_RTL_THREAD_API! It is here
+ * for experimental purposes only. GSAR 98-01-02
+ */
+#ifdef USE_RTL_THREAD_API
+# include <process.h>
+# if defined(__BORLANDC__)
+ /* Borland RTL doesn't allow a return value from thread function! */
+# define THREAD_RET_TYPE void _USERENTRY
+# define THREAD_RET_CAST(p) ((void)(thr->i.retv = (void *)(p)))
+# elif defined (_MSC_VER)
+# define THREAD_RET_TYPE unsigned __stdcall
+# define THREAD_RET_CAST(p) ((unsigned)(p))
+# else
+ /* CRTDLL.DLL doesn't allow a return value from thread function! */
+# define THREAD_RET_TYPE void __cdecl
+# define THREAD_RET_CAST(p) ((void)(thr->i.retv = (void *)(p)))
+# endif
+#else /* !USE_RTL_THREAD_API */
+# define THREAD_RET_TYPE DWORD WINAPI
+# define THREAD_RET_CAST(p) ((DWORD)(p))
+#endif /* !USE_RTL_THREAD_API */
+
+typedef THREAD_RET_TYPE thread_func_t(void *);
+
+
+START_EXTERN_C
+
+#if defined(PERLDLL) && defined(USE_DECLSPEC_THREAD) && (!defined(__BORLANDC__) || defined(_DLL))
+extern __declspec(thread) struct perl_thread *Perl_current_thread;
+#define SET_THR(t) (Perl_current_thread = t)
+#define THR Perl_current_thread
+#else
+#define THR Perl_getTHR()
+#define SET_THR(t) Perl_setTHR(t)
+#endif
+struct perl_thread;
+
+void Perl_alloc_thread_key _((void));
+int Perl_thread_create _((struct perl_thread *thr, thread_func_t *fn));
+void Perl_set_thread_self _((struct perl_thread *thr));
+struct perl_thread *Perl_getTHR _((void));
+void Perl_setTHR _((struct perl_thread *t));
+void Perl_init_thread_intern _((struct perl_thread *t));
+
+END_EXTERN_C
+
+#define INIT_THREADS NOOP
+#define ALLOC_THREAD_KEY Perl_alloc_thread_key()
+#define SET_THREAD_SELF(thr) Perl_set_thread_self(thr)
+
+#if defined(USE_RTL_THREAD_API) && !defined(_MSC_VER)
+#define JOIN(t, avp) \
+ STMT_START { \
+ if ((WaitForSingleObject((t)->self,INFINITE) == WAIT_FAILED) \
+ || (GetExitCodeThread((t)->self,(LPDWORD)(avp)) == 0) \
+ || (CloseHandle((t)->self) == 0)) \
+ croak("panic: JOIN"); \
+ *avp = (AV *)((t)->i.retv); \
+ } STMT_END
+#else /* !USE_RTL_THREAD_API || _MSC_VER */
+#define JOIN(t, avp) \
+ STMT_START { \
+ if ((WaitForSingleObject((t)->self,INFINITE) == WAIT_FAILED) \
+ || (GetExitCodeThread((t)->self,(LPDWORD)(avp)) == 0) \
+ || (CloseHandle((t)->self) == 0)) \
+ croak("panic: JOIN"); \
+ } STMT_END
+#endif /* !USE_RTL_THREAD_API || _MSC_VER */
+
+#define YIELD Sleep(0)
+
+#endif /* _WIN32THREAD_H */
+