home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / perl501m.zip / patches / patch.1i < prev    next >
Text File  |  1995-05-31  |  157KB  |  5,466 lines

  1. # This is my patch  patch.1i for perl5.001.  See description below.
  2. #    Andy Dougherty        doughera@lafcol.lafayette.edu
  3. #
  4.  
  5. # Please execute the following commands before applying this patch.
  6. # (You can feed this patch to 'sh' to do so.)
  7.  
  8. # Protect config.H on systems with case-insensitive filenames.
  9. mv config.H config_H
  10.  
  11. # These are obsolete.
  12. rm -f autosplit
  13. rm -f doSH
  14. rm -f xf
  15.  
  16. exit
  17.  
  18. This is my patch  patch.1i  for perl5.001.
  19.  
  20. To apply, change to your perl directory, run the commands above, then
  21. apply with
  22.     patch -p1 -N  < thispatch.
  23.  
  24. After you apply this patch, I would recommend:
  25.     rm config.sh
  26.     sh Configure [whatever options you use]
  27.     make depend
  28.     make 
  29.     make test
  30.  
  31. Here are the highlights:
  32.     All pod documentation now installed, along with corresponding man
  33.     pages, if possible (Configure allows you to change this).
  34.  
  35.     cppstdin no longer points back to the build directory.  This
  36.     necessitated two changes to the test suite:  comp/cpp.t is now a
  37.     front end that punts if cppstdin is not yet available (the old
  38.     perl4 trick doesn't work for perl5).  The  op/misc.t test
  39.     ./perl -P -e 'use POSIX;' has been dropped since I couldn't think
  40.     of an elegant way to bypass it for systems that need the cppstdin
  41.     wrapper.
  42.  
  43.     Grand autoload patch included (minus the installperl, lib/, and
  44.     ext/ changes).  The lib/ changes are in patch.1g, and the
  45.     ext/ changes are in patch.1h.
  46.  
  47.     Better detection and use of stdio variants, especially on SVR4.
  48.  
  49.     Sarathy's consolidated patches (for ties) included.
  50.  
  51.     New filter stuff included.
  52.  
  53.     Three patches from Larry (gv.c, toke.c, pp_ctl.c)
  54.  
  55. Patch and enjoy,
  56.     Andy Dougherty        doughera@lafcol.lafayette.edu
  57.     Dept. of Physics
  58.     Lafayette College    Easton, PA  18042
  59.  
  60.  
  61. Here's the file-by-file breakdown of what's included:
  62.  
  63. Changes.Conf
  64.     Document changes in the Configure & build process.
  65.  
  66. Configure
  67.     Upgrade to metaconfig PL55.
  68.  
  69.     Add /opt hierarchy to paths searched for programs.
  70.  
  71.     Tye McQueen's updated std stdio testing.
  72.  
  73.     Prompting for installation info for perl module pages.
  74.  
  75.     Add possible SITELIB to include site-specific include directories.
  76.     By default this is disabled, but it seemed a neat idea now that
  77.     the standard perl library is getting so big.
  78.  
  79.     Check that the compiler chosen exists and actually supports the
  80.     options the user specified.
  81.  
  82.     Correctly sort multiple shared library version numbers.
  83.  
  84.     Use a compile & link test for gconvert(), dlopen(), and dlerror().
  85.  
  86.     Do not include build directory name in cppstdin wrapper.
  87.  
  88. MANIFEST
  89.     Updated.
  90.  
  91. Makefile.SH
  92.     Reorganized a bit to support separate install.perl and install.man
  93.     targets to use the new installman script and to accomodate those who
  94.     don't want to install the man pages.
  95.  
  96.     Organize cleanup of .SH files a little better.
  97.  
  98.     No longer automatically make the pod/*.man files.  This is done by
  99.     installman only if requested.
  100.  
  101.     Include additional error messages and info for regenerating the
  102.     automatically maintained header files.
  103.  
  104.     Add 'minitest' target.
  105.  
  106. README
  107.     Updated.
  108.  
  109. README.vms
  110.     Fix perl5-porters subscription info.
  111.  
  112. config_H
  113.     Updated.
  114.  
  115. config_h.SH
  116.     Updated.
  117.  
  118. configpm
  119.     Embedded pod.
  120.  
  121. configure
  122.     GNU configure-like front end to metaconfig's Configure.
  123.     Only supports a few options.
  124.  
  125. doio.c
  126.     Updated to use new std stdio testing.
  127.  
  128. embed.h
  129.     Add new symbols for filtering.
  130.  
  131. global.sym
  132.     see embed.h.
  133.  
  134. gv.c
  135.     C<sub method;> patch from lwall.
  136.  
  137. hints/README.hints
  138.     Updated.
  139.  
  140. hints/aux.sh
  141.     Updated.
  142.  
  143. hints/cxux.sh
  144.     Updated.
  145.  
  146. hints/epix.sh
  147.     New file.
  148.  
  149. hints/freebsd.sh
  150.     Updated.
  151.  
  152. hints/irix_4.sh
  153.     Updated.
  154.  
  155. hints/irix_5.sh
  156.     Updated.
  157.  
  158. hints/irix_6.sh
  159.     Updated.
  160.  
  161. hints/linux.sh
  162.     Updated.
  163.  
  164. hints/powerunix.sh
  165.     Updated.
  166.  
  167. installman
  168.     New file to install pod/*.pod and lib/*.p(m|od) man pages.
  169.  
  170. installperl
  171.     Move installation of man pages over to installman script.
  172.  
  173.     Install pod/*.pod files in $privlib/pod/.
  174.  
  175.     Preserve timestamps on .a files.
  176.  
  177. makedepend.SH
  178.     Now includes . and .. in PATH to explicitly find cppstdin wrapper.
  179.  
  180. opcode.h
  181. opcode.pl
  182.     shmwrite fix.
  183.  
  184. perl.c
  185.     Changed unofficial patchlevel message.
  186.  
  187.     Included optional SITELIB directory.
  188.  
  189. perl.h
  190.     #include <memory.h>
  191.  
  192.     cryptswitch gone/filters added.
  193.  
  194.     EUNICE replaced by UNLINK_ALL_VERSIONS.  Only matters for VMS.
  195.  
  196. perldoc.SH
  197.     New file.
  198.  
  199. pod/perl.pod
  200.     Describe where modpods are.
  201.  
  202. pp_ctl.c
  203.     sort bug fix from lwall.
  204.  
  205. pp_hot.c
  206.     csh glob bug fix from tchrist.
  207.  
  208.     Sarathy's consolidated "tie" patch for NETaa13753 N 2 trey
  209.  
  210. pp_sys.c
  211.     Emulate flock with lockf, if possible.
  212.  
  213.     Use new std stdio unit.
  214.  
  215. proto.h
  216.     Filters stuff.
  217.  
  218.     prototype for unlnk() is only needed #if UNLINK_ALL_VERSIONS
  219.  
  220. sv.c
  221.     Sarathy's consolidated "tie" patch for NETaa13753 N 2 trey
  222.  
  223.     Sarathy's consolidated patch for nested ties.
  224.  
  225.     Use new std stdio unit.
  226.  
  227. t/comp/cpp.aux
  228.  
  229.     New file.  This only gets called if cppstdin is avaiable.
  230.  
  231. t/comp/cpp.t
  232.     Calls cpp.aux test only if cppstdin is available.
  233.  
  234. t/op/misc.t
  235.     Drop
  236.     perl -P -e 'use POSIX;' test.
  237.     it couldn't work on systems without the cppstdin wrapper
  238.     installed, and is usually misleading when it fails anyway.
  239.  
  240. toke.c
  241.     filter stuff.
  242.  
  243.     fix for NETaa13798 from lwall.
  244.  
  245. unixish.h
  246.     undef UNLINK_ALL_VERSIONS since it's irrelevant for unix.
  247.  
  248. util.c
  249.     s/EUNICE/UNLINK_ALL_VERSIONS/ for the unlnk() function.
  250.  
  251. vms/config.vms
  252.     VMS updates from Charles Bailey.
  253.  
  254.     std stdio updates to match changes in perl sources.
  255.  
  256.     add UNLINK_ALL_VERSIONS constant, but leave it #undef.
  257.  
  258. vms/ext/MM_VMS.pm
  259. vms/ext/VMS/stdio/stdio.xs
  260. vms/perlvms.pod
  261. vms/vms.c
  262.     VMS updates from Charles Bailey.
  263.  
  264. x2p/Makefile.SH
  265.     Updated to match man page Configure questions.
  266.  
  267.     Slight clean-up on .SH targets.
  268.  
  269. x2p/str.c
  270.     Use new std stdio unit.
  271.  
  272. Index: Changes.Conf
  273. *** /dev/null    Wed May 31 09:31:33 1995
  274. --- perl5.001i/Changes.Conf    Thu May 25 15:34:26 1995
  275. ***************
  276. *** 0 ****
  277. --- 1,131 ----
  278. + -------------
  279. + Version 5.002
  280. + -------------
  281. + Summary of user-visible Configure and build changes since 5.001:
  282. + Yet more enhancements and fixes have been made to the Configure and
  283. + build process for perl.  Most of these will not be visible to the
  284. + ordinary user--they just make the process more robust and likely to
  285. + work on a wider range of platforms.
  286. + This is a brief summary of the most important changes:
  287. +     Include 5.000 - 5.001 upgrage notes :-) (see below).  You might
  288. +     want to read through them as well as these notes.
  289. +     Install documentation for perl modules and pod2* translators.  You can
  290. +     now view perl module documentation with either your system's man(1)
  291. +     program or with the supplied perldoc script.
  292. +     Support Linux ELF dynamic loading.
  293. +    
  294. +     Many hint file updates.
  295. + -------------
  296. + Version 5.001
  297. + -------------
  298. + Summary of user-visible Configure and build changes since 5.000:
  299. + A large number of enhancements and fixes have been made to the
  300. + Configure and build process for perl.  Most of these will not be
  301. + visible to the ordinary user--they just make the process more robust
  302. + and likely to work on a wider range of platforms.
  303. + This is a brief summary of the most important changes.
  304. + Configure changes:
  305. +     New and improved Configure command line options.  -O now overrides
  306. +     config.sh settings.  -D options can now include spaces, if
  307. +     protected in quotes (e.g. -Dcc='gcc -posix').  Type Configure -h
  308. +     for a full listing of options.
  309. +     Users can now turn on the defaults for the rest of Configure by
  310. +     typing &-d at any Configure prompt.  This is useful if you just
  311. +     want to change one or two answers.
  312. +     Support on (non-Sun) SVR4 systems for dynamic loading and shared 
  313. +     libperl.so
  314. +     Numerous new or updated hints files: PowerUnix, aix 3.x and 4.x,
  315. +     bsd386, convexos, cxux, DEC OSF, Esix, FreeBSD, HP-UX (especially if
  316. +     you're using the bundled compiler), irix 4.x, 5.x, and 6.x,  Linux,
  317. +     MPE/IX, NeXT 3.0 and 3.2, Solaris, SVR4, Ultrix (especially 4.3),
  318. +     and Unicos.
  319. +     Improved generation of a suitable name for architecture-dependent
  320. +     library files.  NOTE:  This may differ from the name you had from
  321. +     your 5.000 installation.
  322. +     Many many portability enhancements and fixes.
  323. + Build process:
  324. +     The process for building extensions has been extensively revised.  See
  325. +     lib/ExtUtils/MakeMaker.pm for complete documentation.  Basically, with
  326. +     just a simple Makefile.PL (such as the one generated by h2xs), you can
  327. +     now build an extension from anywhere on your system, even if you've
  328. +     deleted the perl source.
  329. +     Improved build/install documentation in README.  A little.
  330. +     Improved dynamic loading on HP-UX.  Support dynamic loading on SVR4.
  331. +     Installperl now gets the version correct :-)
  332. +     Installperl now saves the perl *.h files and the libperl.a library
  333. +     in your architecture-dependent library directory so that you can
  334. +     later build extensions without having to re-install the perl
  335. +     source.
  336. +     Include x2p/a2p.c generated by byacc from x2p/a2p.y.
  337. +     Many many portability fixes.
  338. + Upgrade Traps and Pitfalls:
  339. + Since a lot has changed in the build process, you are probably best
  340. + off starting with a fresh copy of the perl5.000 sources.  In particular,
  341. + your 5.000 config.sh will contain several variables that are no longer
  342. + needed.  Further, improvements in the Configure tests may mean that some
  343. + of the answers will be different than they were in 5.000, and which answer
  344. + to keep can be difficult to sort out.   Therefore, you are probably
  345. + better off ignoring your old config.sh.
  346. + One big change is that architecture-dependent library files may well
  347. + be stored in a different location in 5.001.  This is because the default
  348. + name used in the 5.000 release was not sufficiently specific to
  349. + distinguish incompatible architectures.  The relevant variable is $archlib
  350. + in config.sh.  Before you run ``make install'' you should rename your old
  351. + $archlib.  Thus if your $archlib for version 5.000 was
  352. + /usr/local/lib/perl5/foo, and your new value for 5.001 is
  353. + /usr/local/lib/perl5/foo-bar, then you should
  354. +     mv /usr/local/lib/perl5/foo /usr/local/lib/perl5/foo-bar
  355. + before running  ``make install''.
  356. + Alternatively, you could override Configure's default guess for $archlib
  357. + either by  sh Configure -Darchname='foo', or by answering 'foo' when 
  358. + prompted by Configure for the architecture name.
  359. + The following is the sequence of steps to upgrade to 5.001:
  360. +     cd perl5.000
  361. +     make realclean
  362. +     rm config.sh
  363. +     <apply 5.001 patch>
  364. +     sh Configure
  365. +     make depend
  366. +     make
  367. +     make test
  368. +     <mv old architecture-dependent library to new location, if needed>
  369. +     make install
  370. Index: Configure
  371. Prereq:  3.0.1.7 
  372. *** perl5.001h/Configure    Mon Apr 17 15:55:59 1995
  373. --- perl5.001i/Configure    Wed May 31 09:19:09 1995
  374. ***************
  375. *** 20,26 ****
  376.   
  377.   # $Id: Head.U,v 3.0.1.7 1995/03/21 08:46:15 ram Exp $
  378.   #
  379. ! # Generated on Mon Apr 17 15:46:57 EDT 1995 [metaconfig 3.0 PL53]
  380.   
  381.   cat >/tmp/c1$$ <<EOF
  382.   ARGGGHHHH!!!!!
  383. --- 20,26 ----
  384.   
  385.   # $Id: Head.U,v 3.0.1.7 1995/03/21 08:46:15 ram Exp $
  386.   #
  387. ! # Generated on Wed May 31 09:14:05 EDT 1995 [metaconfig 3.0 PL55]
  388.   
  389.   cat >/tmp/c1$$ <<EOF
  390.   ARGGGHHHH!!!!!
  391. ***************
  392. *** 58,64 ****
  393. --- 58,66 ----
  394.   
  395.   : Proper PATH setting
  396.   paths='/bin /usr/bin /usr/local/bin /usr/ucb /usr/local /usr/lbin'
  397. + paths="$paths /opt/bin /opt/local/bin /opt/local /opt/lbin"
  398.   paths="$paths /usr/5bin /etc /usr/gnu/bin /usr/new /usr/new/bin /usr/nbin"
  399. + paths="$paths /opt/gnu/bin /opt/new /opt/new/bin /opt/nbin"
  400.   paths="$paths /sys5.3/bin /sys5.3/usr/bin /bsd4.3/bin /bsd4.3/usr/ucb"
  401.   paths="$paths /bsd4.3/usr/bin /usr/bsd /bsd43/bin /usr/ccs/bin"
  402.   paths="$paths /etc /usr/lib /usr/ucblib /lib /usr/ccs/lib"
  403. ***************
  404. *** 279,285 ****
  405.   d_isascii=''
  406.   d_killpg=''
  407.   d_link=''
  408. - d_linuxstd=''
  409.   d_locconv=''
  410.   d_lockf=''
  411.   d_lstat=''
  412. --- 281,286 ----
  413. ***************
  414. *** 348,354 ****
  415. --- 349,360 ----
  416.   sockethdr=''
  417.   socketlib=''
  418.   d_statblks=''
  419. + d_stdiobase=''
  420.   d_stdstdio=''
  421. + stdio_base=''
  422. + stdio_bufsiz=''
  423. + stdio_cnt=''
  424. + stdio_ptr=''
  425.   d_index=''
  426.   d_strchr=''
  427.   d_strcoll=''
  428. ***************
  429. *** 469,478 ****
  430.   mallocsrc=''
  431.   malloctype=''
  432.   usemymalloc=''
  433. ! installmansrc=''
  434. ! manext=''
  435. ! mansrc=''
  436. ! mansrcexp=''
  437.   huge=''
  438.   large=''
  439.   medium=''
  440. --- 475,488 ----
  441.   mallocsrc=''
  442.   malloctype=''
  443.   usemymalloc=''
  444. ! installman1dir=''
  445. ! man1dir=''
  446. ! man1direxp=''
  447. ! man1ext=''
  448. ! installman3dir=''
  449. ! man3dir=''
  450. ! man3direxp=''
  451. ! man3ext=''
  452.   huge=''
  453.   large=''
  454.   medium=''
  455. ***************
  456. *** 505,510 ****
  457. --- 515,524 ----
  458.   scriptdirexp=''
  459.   selecttype=''
  460.   sig_name=''
  461. + d_sitelib=''
  462. + installsitelib=''
  463. + sitelib=''
  464. + sitelibexp=''
  465.   sizetype=''
  466.   so=''
  467.   sharpbang=''
  468. ***************
  469. *** 693,699 ****
  470.   : produce awk script to parse command line options
  471.   cat >options.awk <<'EOF'
  472.   BEGIN {
  473. !     optstr = "dD:eEf:hOrsSU:V";    # getopt-style specification
  474.   
  475.       len = length(optstr);
  476.       for (i = 1; i <= len; i++) {
  477. --- 707,713 ----
  478.   : produce awk script to parse command line options
  479.   cat >options.awk <<'EOF'
  480.   BEGIN {
  481. !     optstr = "dD:eEf:hKOrsSU:V";    # getopt-style specification
  482.   
  483.       len = length(optstr);
  484.       for (i = 1; i <= len; i++) {
  485. ***************
  486. *** 751,756 ****
  487. --- 765,771 ----
  488.   silent=''
  489.   extractsh=''
  490.   override=''
  491. + knowitall=''
  492.   rm -f optdef.sh
  493.   
  494.   : option parsing
  495. ***************
  496. *** 773,778 ****
  497. --- 788,794 ----
  498.       -r) shift; reuseval=true;;
  499.       -s) shift; silent=true;;
  500.       -E) shift; alldone=exit;;
  501. +     -K) shift; knowitall=true;;
  502.       -O) shift; override=true;;
  503.       -S) shift; extractsh=true;;
  504.       -D)
  505. ***************
  506. *** 800,806 ****
  507.           esac
  508.           shift
  509.           ;;
  510. !     -V) echo "$me generated by metaconfig 3.0 PL53." >&2
  511.           exit 0;;
  512.       --) break;;
  513.       -*) echo "$me: unknown option $1" >&2; shift; error=true;;
  514. --- 816,822 ----
  515.           esac
  516.           shift
  517.           ;;
  518. !     -V) echo "$me generated by metaconfig 3.0 PL55." >&2
  519.           exit 0;;
  520.       --) break;;
  521.       -*) echo "$me: unknown option $1" >&2; shift; error=true;;
  522. ***************
  523. *** 811,817 ****
  524.   case "$error" in
  525.   true)
  526.       cat >&2 <<EOM
  527. ! Usage: $me [-dehrEOSV] [-f config.sh] [-D symbol] [-D symbol=value]
  528.                    [-U symbol] [-U symbol=]
  529.     -d : use defaults for all answers.
  530.     -e : go on without questioning past the production of config.sh.
  531. --- 827,833 ----
  532.   case "$error" in
  533.   true)
  534.       cat >&2 <<EOM
  535. ! Usage: $me [-dehrEKOSV] [-f config.sh] [-D symbol] [-D symbol=value]
  536.                    [-U symbol] [-U symbol=]
  537.     -d : use defaults for all answers.
  538.     -e : go on without questioning past the production of config.sh.
  539. ***************
  540. *** 823,828 ****
  541. --- 839,845 ----
  542.            -D symbol         symbol gets the value 'define'
  543.            -D symbol=value   symbol gets the value 'value'
  544.     -E : stop at the end of questions, after having produced config.sh.
  545. +   -K : do not use unless you know what you are doing.
  546.     -O : let -D and -U override definitions from loaded configuration file.
  547.     -S : perform variable substitutions on all .SH files (can mix with -f)
  548.     -U : undefine symbol:
  549. ***************
  550. *** 1422,1446 ****
  551.       ./tr '[A-Z]' '[a-z]' | tr '\012' ' '`
  552.   newmyuname="$myuname"
  553.   dflt=n
  554. ! if test -f ../config.sh; then
  555. !     if $contains myuname= ../config.sh >/dev/null 2>&1; then
  556. !         eval "`grep myuname= ../config.sh`"
  557. !     fi
  558. !     if test "X$myuname" = "X$newmyuname"; then
  559. !         dflt=y
  560.       fi
  561. ! fi
  562.   
  563.   : Get old answers from old config file if Configure was run on the
  564.   : same system, otherwise use the hints.
  565.   hint=default
  566.   cd ..
  567.   if test -f config.sh; then
  568. !     $cat <<EOM
  569. ! I see a config.sh file.  Was it built on THIS system with THIS compiler?  
  570. ! EOM
  571. !     rp="Shall I use config.sh to set the defaults?"
  572.       . UU/myread
  573.       case "$ans" in
  574.       n*|N*) echo "OK, I'll ignore it."; mv config.sh config.sh.old;;
  575. --- 1439,1465 ----
  576.       ./tr '[A-Z]' '[a-z]' | tr '\012' ' '`
  577.   newmyuname="$myuname"
  578.   dflt=n
  579. ! case "$knowitall" in
  580. ! '')
  581. !     if test -f ../config.sh; then
  582. !         if $contains myuname= ../config.sh >/dev/null 2>&1; then
  583. !             eval "`grep myuname= ../config.sh`"
  584. !         fi
  585. !         if test "X$myuname" = "X$newmyuname"; then
  586. !             dflt=y
  587. !         fi
  588.       fi
  589. !     ;;
  590. ! *) dflt=y;;
  591. ! esac
  592.   
  593.   : Get old answers from old config file if Configure was run on the
  594.   : same system, otherwise use the hints.
  595.   hint=default
  596.   cd ..
  597.   if test -f config.sh; then
  598. !     echo " "
  599. !     rp="I see a config.sh file.  Shall I use it to set the defaults?"
  600.       . UU/myread
  601.       case "$ans" in
  602.       n*|N*) echo "OK, I'll ignore it."; mv config.sh config.sh.old;;
  603. ***************
  604. *** 2106,2112 ****
  605.       *)  echo "You are using GNU cc $gccversion." ;;
  606.       esac
  607.   else
  608. !     echo "I can't compile the test program -- Assuming it isn't GNU cc."
  609.   fi
  610.   $rm -f gccvers*
  611.   case "$gccversion" in
  612. --- 2125,2139 ----
  613.       *)  echo "You are using GNU cc $gccversion." ;;
  614.       esac
  615.   else
  616. !     echo " "
  617. !     echo "*** WHOA THERE!!! ***" >&4
  618. !     echo "    Your C compiler \"$cc\" doesn't seem to be working!" >&4
  619. !     case "$knowitall" in
  620. !     '')
  621. !     echo "    You'd better start hunting for one and let me know about it." >&4
  622. !         exit 1
  623. !         ;;
  624. !     esac
  625.   fi
  626.   $rm -f gccvers*
  627.   case "$gccversion" in
  628. ***************
  629. *** 2745,2750 ****
  630. --- 2772,2831 ----
  631.   esac
  632.   rmlist="$rmlist pdp11"
  633.   
  634. + : coherency check
  635. + echo " "
  636. + echo "Checking your choice of C compiler and flags for coherency..." >&4
  637. + set X $cc $optimize $ccflags try.c -o try $ldflags
  638. + shift
  639. + $cat >try.msg <<EOM
  640. + I've tried to compile and run a simple program with:
  641. +     $*
  642. +     ./try
  643. + and I got the following output:
  644. + EOM
  645. + $cat > try.c <<'EOF'
  646. + #include <stdio.h>
  647. + main() { exit(0); }
  648. + EOF
  649. + dflt=y
  650. + if sh -c "$cc $optimize $ccflags try.c -o try $ldflags" >>try.msg 2>&1; then
  651. +     if sh -c './try' >>try.msg 2>&1; then
  652. +         dflt=n
  653. +     else
  654. +         echo "The program compiled OK, but exited with status $?." >>try.msg
  655. +         rp="You have a problem.  Shall I abort Configure"
  656. +         dflt=y
  657. +     fi
  658. + else
  659. +     echo "I can't compile the test program." >>try.msg
  660. +     rp="You have a BIG problem.  Shall I abort Configure"
  661. +     dflt=y
  662. + fi
  663. + case "$dflt" in
  664. + y)
  665. +     $cat try.msg
  666. +     case "$knowitall" in
  667. +     '')
  668. +         echo "(The supplied flags might be incorrect with this C compiler.)"
  669. +         ;;
  670. +     *) dflt=n;;
  671. +     esac
  672. +     echo " "
  673. +     . ./myread
  674. +     case "$ans" in
  675. +     n*|N*) ;;
  676. +     *)    echo "Ok.  Stopping Configure." >&4
  677. +         exit 1
  678. +         ;;
  679. +     esac
  680. +     ;;
  681. + n) echo "OK, that should do.";;
  682. + esac
  683. + $rm -f try try.* core
  684.   : Set private lib path
  685.   case "$plibpth" in
  686.   '') if ./mips; then
  687. ***************
  688. *** 2992,3001 ****
  689.       set /usr/ccs/lib/libc.$so
  690.       $test -r $1 || set /usr/lib/libc.$so
  691.       $test -r $1 || set /usr/shlib/libc.$so
  692. !     $test -r $1 || set /usr/lib/libc.$so.[0-9]*
  693.       $test -r $1 || set /lib/libc.$so
  694.       $test -r $1 || set /lib/libsys_s.a
  695. -     eval set \$$#
  696.       ;;
  697.   *)
  698.       set blurfl
  699. --- 3073,3090 ----
  700.       set /usr/ccs/lib/libc.$so
  701.       $test -r $1 || set /usr/lib/libc.$so
  702.       $test -r $1 || set /usr/shlib/libc.$so
  703. !     $test -r $1 || \
  704. !         set `echo blurfl; echo /usr/lib/libc.$so.[0-9]* | \
  705. !         tr ' ' '\012' | egrep -v '\.[A-Za-z]*$' | $sed -e '
  706. !             h
  707. !             s/[0-9][0-9]*/0000&/g
  708. !             s/0*\([0-9][0-9][0-9][0-9][0-9]\)/\1/g
  709. !             G
  710. !             s/\n/ /' | \
  711. !          sort | $sed -e 's/^.* //'`
  712. !     eval set \$$#
  713.       $test -r $1 || set /lib/libc.$so
  714.       $test -r $1 || set /lib/libsys_s.a
  715.       ;;
  716.   *)
  717.       set blurfl
  718. ***************
  719. *** 3085,3091 ****
  720.   $grep fprintf libc.tmp > libc.ptf
  721.   xscan='eval "<libc.ptf $com >libc.list"; $echo $n ".$c" >&4'
  722.   xrun='eval "<libc.tmp $com >libc.list"; echo "done" >&4'
  723. ! if com="$sed -n -e 's/__IO//' -e 's/^.* [ADTSIW]  *_[_.]*//p' -e 's/^.* [ADTSIW] //p'";\
  724.       eval $xscan;\
  725.       $contains '^fprintf$' libc.list >/dev/null 2>&1; then
  726.           eval $xrun
  727. --- 3174,3181 ----
  728.   $grep fprintf libc.tmp > libc.ptf
  729.   xscan='eval "<libc.ptf $com >libc.list"; $echo $n ".$c" >&4'
  730.   xrun='eval "<libc.tmp $com >libc.list"; echo "done" >&4'
  731. ! xxx='[ADTSIW]'
  732. ! if com="$sed -n -e 's/__IO//' -e 's/^.* $xxx  *_[_.]*//p' -e 's/^.* $xxx //p'";\
  733.       eval $xscan;\
  734.       $contains '^fprintf$' libc.list >/dev/null 2>&1; then
  735.           eval $xrun
  736. ***************
  737. *** 3128,3138 ****
  738.           eval $xrun
  739.   else
  740.       nm -p $* 2>/dev/null >libc.tmp
  741. !     com="$sed -n -e 's/^.* [ADTSIW]  *_[_.]*//p' -e 's/^.* [ADTSIW] //p'";\
  742. !     eval "<libc.tmp $com >libc.list"
  743. !     if $contains '^fprintf$' libc.list >/dev/null 2>&1; then
  744.           nm_opt='-p'
  745. !         echo "done" >&4
  746.       else
  747.           echo " "
  748.           echo "nm didn't seem to work right. Trying ar instead..." >&4
  749. --- 3218,3229 ----
  750.           eval $xrun
  751.   else
  752.       nm -p $* 2>/dev/null >libc.tmp
  753. !     $grep fprintf libc.tmp > libc.ptf
  754. !     if com="$sed -n -e 's/^.* [ADTSIW]  *_[_.]*//p' -e 's/^.* [ADTSIW] //p'";\
  755. !         eval $xscan; $contains '^fprintf$' libc.list >/dev/null 2>&1
  756. !     then
  757.           nm_opt='-p'
  758. !         eval $xrun
  759.       else
  760.           echo " "
  761.           echo "nm didn't seem to work right. Trying ar instead..." >&4
  762. ***************
  763. *** 3146,3152 ****
  764.           else
  765.               echo "ar didn't seem to work right." >&4
  766.               echo "Maybe this is a Cray...trying bld instead..." >&4
  767. !             if bld t $libc | $sed -e 's/.*\///' -e 's/\.o:.*$//' > libc.list; then
  768.                   for thisname in $libnames; do
  769.                       bld t $libnames | \
  770.                       $sed -e 's/.*\///' -e 's/\.o:.*$//' >>libc.list
  771. --- 3237,3244 ----
  772.           else
  773.               echo "ar didn't seem to work right." >&4
  774.               echo "Maybe this is a Cray...trying bld instead..." >&4
  775. !             if bld t $libc | $sed -e 's/.*\///' -e 's/\.o:.*$//' > libc.list
  776. !             then
  777.                   for thisname in $libnames; do
  778.                       bld t $libnames | \
  779.                       $sed -e 's/.*\///' -e 's/\.o:.*$//' >>libc.list
  780. ***************
  781. *** 3191,3197 ****
  782.           else tval=false;
  783.           fi;;
  784.       *)
  785. !         echo "main() { extern int $1$tdc; printf(\"%d\", $1$tc); }" > t.c;
  786.           if $cc $ccflags -o t t.c $ldflags $libs >/dev/null 2>&1;
  787.           then tval=true;
  788.           else tval=false;
  789. --- 3283,3289 ----
  790.           else tval=false;
  791.           fi;;
  792.       *)
  793. !         echo "main() { extern short $1$tdc; printf(\"%hd\", $1$tc); }" > t.c;
  794.           if $cc $ccflags -o t t.c $ldflags $libs >/dev/null 2>&1;
  795.           then tval=true;
  796.           else tval=false;
  797. ***************
  798. *** 3247,3254 ****
  799. --- 3339,3353 ----
  800.   esac'
  801.   
  802.   : see if gconvert exists
  803. + : On some SVR4 systems, gconvert is present but can not be used 
  804. + : because it requires some other unavailable functions.
  805. + : Therefore, do not use the nm extraction, but use a real compile
  806. + : and link test instead.
  807. + xxx_runnm="$runnm"
  808. + runnm=false
  809.   set gconvert d_gconvert
  810.   eval $inlibc
  811. + runnm="$xxx_runnm"
  812.   
  813.   case "$d_gconvert" in
  814.   $define)
  815. ***************
  816. *** 4152,4167 ****
  817. --- 4251,4278 ----
  818.   $rm -f try.c
  819.   
  820.   : see if dlerror exists
  821. + : On NetBSD and FreeBSD, dlerror might be available, but it is in 
  822. + : /usr/lib/crt0.o, not in any of the libraries.  Therefore, do not
  823. + : use the nm extraction, but use a real compile and link test instead.
  824. + xxx_runnm="$runnm"
  825. + runnm=false
  826.   set dlerror d_dlerror
  827.   eval $inlibc
  828. + runnm="$xxx_runnm"
  829.   
  830.   : see if dld is available
  831.   set dld.h i_dld
  832.   eval $inhdr
  833.   
  834.   : see if dlopen exists
  835. + : On NetBSD and FreeBSD, dlopen is available, but it is in 
  836. + : /usr/lib/crt0.o, not in any of the libraries.  Therefore, do not
  837. + : use the nm extraction, but use a real compile and link test instead.
  838. + xxx_runnm="$runnm"
  839. + runnm=false
  840.   set dlopen d_dlopen
  841.   eval $inlibc
  842. + runnm="$xxx_runnm"
  843.   
  844.   : determine which dynamic loading, if any, to compile in
  845.   echo " "
  846. ***************
  847. *** 4229,4237 ****
  848.           '') case "$osname" in
  849.               hpux)    dflt='+z' ;;
  850.               next)    dflt='none' ;;
  851. !             solaris) dflt='-K pic' ;;
  852.               sunos)    dflt='-pic' ;;
  853. -             svr4*|esix*) dflt='-Kpic' ;;
  854.               *)    dflt='none' ;;
  855.               esac ;;
  856.           *)    dflt='-fpic' ;;
  857. --- 4340,4347 ----
  858.           '') case "$osname" in
  859.               hpux)    dflt='+z' ;;
  860.               next)    dflt='none' ;;
  861. !             solaris|svr4*|esix*) dflt='-Kpic' ;;
  862.               sunos)    dflt='-pic' ;;
  863.               *)    dflt='none' ;;
  864.               esac ;;
  865.           *)    dflt='-fpic' ;;
  866. ***************
  867. *** 4836,4882 ****
  868.   set link d_link
  869.   eval $inlibc
  870.   
  871. - : see if stdio is really std
  872. - echo " "
  873. - xxx=`./findhdr stdio.h`
  874. - if $contains 'char.*_ptr;' "$xxx" >/dev/null 2>&1 ; then
  875. -     if $contains '_cnt;' "$xxx" >/dev/null 2>&1 ; then
  876. -         echo "Your stdio is pretty std." >&4
  877. -         val="$define"
  878. -     else
  879. -         echo "Your stdio isn't very std." >&4
  880. -         val="$undef"
  881. -     fi
  882. - else
  883. -     echo "Your stdio isn't very std." >&4
  884. -     val="$undef"
  885. - fi
  886. - set d_stdstdio
  887. - eval $setvar
  888. - : see if stdio is like that in linux
  889. - case "$d_stdstdio" in
  890. - "$undef")
  891. -     echo " "
  892. -     xxx=`./findhdr stdio.h`
  893. -     $cppstdin $cppflags $cppminus < "$xxx" > stdio.E
  894. -     if $contains 'char.*_IO_read_base' stdio.E >/dev/null 2>&1 && \
  895. -         $contains '_IO_read_ptr' stdio.E >/dev/null 2>&1 && \
  896. -         $contains '_IO_read_end' stdio.E >/dev/null 2>&1 ; then
  897. -             echo "Your stdio looks like linux." >&4
  898. -             val="$define"
  899. -     else
  900. -         echo "You don't have linux stdio, either." >&4
  901. -         val="$undef"
  902. -     fi
  903. -     $rm -f stdio.E
  904. -     ;;
  905. - *)    val="$undef" ;;
  906. - esac
  907. - set d_linuxstd
  908. - eval $setvar
  909.   : see if localeconv exists
  910.   set localeconv d_locconv
  911.   eval $inlibc
  912. --- 4946,4951 ----
  913. ***************
  914. *** 5422,5427 ****
  915. --- 5491,5539 ----
  916.   set d_shm
  917.   eval $setvar
  918.   
  919. + : determine whether the user wants to include a site-specific library
  920. + : in addition to privlib.
  921. + $cat <<EOM
  922. + Some sites may wish to specify a local directory for $package
  923. + to search by default in addition to $privlib.
  924. + If you don't want to use such an additional directory, answer 'none'.
  925. + EOM
  926. + dflt=none
  927. + fn=d~+n
  928. + rp='Local directory for additional library files?'
  929. + . ./getfile
  930. + if $test "X$sitelibexp" != "X$ansexp"; then
  931. +     installsitelib=''
  932. + fi
  933. + sitelib="$ans"
  934. + sitelibexp="$ansexp"
  935. + if $afs; then
  936. +     $cat <<EOM
  937. + Since you are running AFS, I need to distinguish the directory in which
  938. + private files reside from the directory in which they are installed (and from
  939. + which they are presumably copied to the former directory by occult means).
  940. + EOM
  941. +     case "$installsitelib" in
  942. +     '') dflt=`echo $sitelibexp | sed 's#^/afs/#/afs/.#'`;;
  943. +     *) dflt="$installsitelib";;
  944. +     esac
  945. +     fn=de~
  946. +     rp='Where will additional local files be installed?'
  947. +     . ./getfile
  948. +     installsitelib="$ans"
  949. + else
  950. +     installsitelib="$sitelibexp"
  951. + fi
  952. + case "$sitelibexp" in
  953. + ''|' ') d_sitelib=undef ;;
  954. + *) d_sitelib=define ;;
  955. + esac
  956.   socketlib=''
  957.   sockethdr=''
  958.   : see whether socket exists
  959. ***************
  960. *** 5493,5498 ****
  961. --- 5605,5707 ----
  962.   set d_statblks
  963.   eval $setvar
  964.   
  965. + : see if _ptr and _cnt from stdio act std
  966. + echo " "
  967. + if $contains '_IO_fpos_t' `./findhdr stdio.h` >/dev/null 2>&1 ; then
  968. +     echo "(Looks like you have stdio.h from Linux.)"
  969. +     case "$stdio_ptr" in
  970. +     '') stdio_ptr='((fp)->_IO_read_ptr)';;
  971. +     esac
  972. +     case "$stdio_cnt" in
  973. +     '') stdio_cnt='((fp)->_IO_read_end - (fp)->_IO_read_ptr)';;
  974. +     esac
  975. +     case "$stdio_base" in
  976. +     '') stdio_base='((fp)->_IO_read_base)';;
  977. +     esac
  978. +     case "$stdio_bufsiz" in
  979. +     '') stdio_bufsiz='((fp)->_IO_read_end - (fp)->_IO_read_base))';;
  980. +     esac
  981. + else
  982. +     case "$stdio_ptr" in
  983. +     '') stdio_ptr='((fp)->_ptr)';;
  984. +     esac
  985. +     case "$stdio_cnt" in
  986. +     '') stdio_cnt='((fp)->_cnt)';;
  987. +     esac
  988. +     case "$stdio_base" in
  989. +     '') stdio_base='((fp)->_base)';;
  990. +     esac
  991. +     case "$stdio_bufsiz" in
  992. +     '') stdio_bufsiz='((fp)->_cnt + (fp)->_ptr - (fp)->_base)';;
  993. +     esac
  994. + fi
  995. + : test whether _ptr and _cnt really work
  996. + echo "Checking how std your stdio is..." >&4
  997. + $cat >try.c <<EOP
  998. + #include <stdio.h>
  999. + #define FILE_ptr(fp)    $stdio_ptr
  1000. + #define FILE_cnt(fp)    $stdio_cnt
  1001. + main() { 
  1002. +     FILE *fp = fopen("try.c", "r");
  1003. +     char c = getc(fp);
  1004. +     if (
  1005. +         18 <= FILE_cnt(fp) &&
  1006. +         strncmp(FILE_ptr(fp), "include <stdio.h>\n", 18) == 0
  1007. +     )
  1008. +         exit(0);
  1009. +     exit(1);
  1010. + }
  1011. + EOP
  1012. + val="$undef"
  1013. + if $cc $ccflags $ldflags -o try try.c $libs >/dev/null 2>&1; then
  1014. +     if ./try; then
  1015. +         echo "Your stdio acts pretty std."
  1016. +         val="$define"
  1017. +     else
  1018. +         echo "Your stdio isn't very std."
  1019. +     fi
  1020. + else
  1021. +     echo "Your stdio doesn't appear very std."
  1022. + fi
  1023. + $rm -f try.c try
  1024. + set d_stdstdio
  1025. + eval $setvar
  1026. + : see if _base is also standard
  1027. + val="$undef"
  1028. + case "$d_stdstdio" in
  1029. + $define)
  1030. +     $cat >try.c <<EOP
  1031. + #include <stdio.h>
  1032. + #define FILE_base(fp)    $stdio_base
  1033. + #define FILE_bufsiz(fp)    $stdio_bufsiz
  1034. + main() { 
  1035. +     FILE *fp = fopen("try.c", "r");
  1036. +     char c = getc(fp);
  1037. +     if (
  1038. +         19 <= FILE_bufsiz(fp) &&
  1039. +         strncmp(FILE_base(fp), "#include <stdio.h>\n", 19) == 0
  1040. +     )
  1041. +         exit(0);
  1042. +     exit(1);
  1043. + }
  1044. + EOP
  1045. +     if $cc $ccflags $ldflags -o try try.c $libs > /dev/null 2>&1; then
  1046. +         if ./try; then
  1047. +             echo "Even its _base field acts std."
  1048. +             val="$define"
  1049. +         else
  1050. +             echo "But its _base field isn't std."
  1051. +         fi
  1052. +     else
  1053. +         echo "However, it seems to be lacking the _base field."
  1054. +     fi
  1055. +     $rm -f try.c try
  1056. +     ;;
  1057. + esac
  1058. + set d_stdiobase
  1059. + eval $setvar
  1060.   : see if strcoll exists
  1061.   set strcoll d_strcoll
  1062.   eval $inlibc
  1063. ***************
  1064. *** 6143,6162 ****
  1065.   case "$i_db" in
  1066.   define)
  1067.       : Check the return type needed for hash 
  1068.       echo "Checking return type needed for hash for Berkeley DB ..." >&4
  1069.       $cat >try.c <<'EOCP'
  1070.   #include <sys/types.h>
  1071.   #include <db.h>
  1072. ! u_int32_t 
  1073. ! hash_cb (ptr, size)
  1074. ! const void * ptr ;
  1075. ! size_t size ;
  1076.   {
  1077.   }
  1078. ! HASHINFO info ;
  1079.   main()
  1080.   {
  1081. !     info.hash = hash_cb ;
  1082.   }
  1083.   EOCP
  1084.       if $cc $ccflags -c try.c >try.out 2>&1 ; then
  1085. --- 6352,6371 ----
  1086.   case "$i_db" in
  1087.   define)
  1088.       : Check the return type needed for hash 
  1089. +     echo " "
  1090.       echo "Checking return type needed for hash for Berkeley DB ..." >&4
  1091.       $cat >try.c <<'EOCP'
  1092.   #include <sys/types.h>
  1093.   #include <db.h>
  1094. ! u_int32_t hash_cb (ptr, size)
  1095. ! void *ptr;
  1096. ! size_t size;
  1097.   {
  1098.   }
  1099. ! HASHINFO info;
  1100.   main()
  1101.   {
  1102. !     info.hash = hash_cb;
  1103.   }
  1104.   EOCP
  1105.       if $cc $ccflags -c try.c >try.out 2>&1 ; then
  1106. ***************
  1107. *** 6179,6198 ****
  1108.   case "$i_db" in
  1109.   define)
  1110.       : Check the return type needed for prefix 
  1111.       echo "Checking return type needed for prefix for Berkeley DB ..." >&4
  1112.       cat >try.c <<'EOCP'
  1113.   #include <sys/types.h>
  1114.   #include <db.h>
  1115. ! size_t 
  1116. ! prefix_cb (key1, key2)
  1117. ! const DBT * key1 ;
  1118. ! const DBT * key2 ;
  1119.   {
  1120.   }
  1121. ! BTREEINFO info ;
  1122.   main()
  1123.   {
  1124. !     info.prefix = prefix_cb ;
  1125.   }
  1126.   EOCP
  1127.       if $cc $ccflags -c try.c  >try.out 2>&1 ; then
  1128. --- 6388,6407 ----
  1129.   case "$i_db" in
  1130.   define)
  1131.       : Check the return type needed for prefix 
  1132. +     echo " "
  1133.       echo "Checking return type needed for prefix for Berkeley DB ..." >&4
  1134.       cat >try.c <<'EOCP'
  1135.   #include <sys/types.h>
  1136.   #include <db.h>
  1137. ! size_t prefix_cb (key1, key2)
  1138. ! DBT *key1;
  1139. ! DBT *key2;
  1140.   {
  1141.   }
  1142. ! BTREEINFO info;
  1143.   main()
  1144.   {
  1145. !     info.prefix = prefix_cb;
  1146.   }
  1147.   EOCP
  1148.       if $cc $ccflags -c try.c  >try.out 2>&1 ; then
  1149. ***************
  1150. *** 6571,6577 ****
  1151.   lseektype="$ans"
  1152.   
  1153.   : determine where manual pages go
  1154. ! set mansrc mansrc none
  1155.   eval $prefixit
  1156.   $cat <<EOM
  1157.   
  1158. --- 6780,6786 ----
  1159.   lseektype="$ans"
  1160.   
  1161.   : determine where manual pages go
  1162. ! set man1dir man1dir none
  1163.   eval $prefixit
  1164.   $cat <<EOM
  1165.   
  1166. ***************
  1167. *** 6580,6591 ****
  1168.   case "$nroff" in
  1169.   nroff)
  1170.       echo "However, you don't have nroff, so they're probably useless to you."
  1171. !     case "$mansrc" in
  1172. !     '') mansrc="none";;
  1173.       esac;;
  1174.   esac
  1175.   echo "If you don't want the manual sources installed, answer 'none'."
  1176. ! case "$mansrc" in
  1177.   '')
  1178.       lookpath="$prefixexp/man/man1 $prefixexp/man/u_man/man1"
  1179.       lookpath="$lookpath $prefixexp/man/l_man/man1"
  1180. --- 6789,6800 ----
  1181.   case "$nroff" in
  1182.   nroff)
  1183.       echo "However, you don't have nroff, so they're probably useless to you."
  1184. !     case "$man1dir" in
  1185. !     '') man1dir="none";;
  1186.       esac;;
  1187.   esac
  1188.   echo "If you don't want the manual sources installed, answer 'none'."
  1189. ! case "$man1dir" in
  1190.   '')
  1191.       lookpath="$prefixexp/man/man1 $prefixexp/man/u_man/man1"
  1192.       lookpath="$lookpath $prefixexp/man/l_man/man1"
  1193. ***************
  1194. *** 6593,6601 ****
  1195.       lookpath="$lookpath /usr/man/local/man1 /usr/man/l_man/man1"
  1196.       lookpath="$lookpath /usr/local/man/u_man/man1 /usr/local/man/l_man/man1"
  1197.       lookpath="$lookpath /usr/man/man.L"
  1198. !     mansrc=`./loc . $prefixexp/man/man1 $lookpath`
  1199. !     if $test -d "$mansrc"; then
  1200. !         dflt="$mansrc"
  1201.       else
  1202.           dflt="$sysman"
  1203.       fi
  1204. --- 6802,6810 ----
  1205.       lookpath="$lookpath /usr/man/local/man1 /usr/man/l_man/man1"
  1206.       lookpath="$lookpath /usr/local/man/u_man/man1 /usr/local/man/l_man/man1"
  1207.       lookpath="$lookpath /usr/man/man.L"
  1208. !     man1dir=`./loc . $prefixexp/man/man1 $lookpath`
  1209. !     if $test -d "$man1dir"; then
  1210. !         dflt="$man1dir"
  1211.       else
  1212.           dflt="$sysman"
  1213.       fi
  1214. ***************
  1215. *** 6603,6623 ****
  1216.       eval $prefixup
  1217.       ;;
  1218.   ' ') dflt=none;;
  1219. ! *)  dflt="$mansrc"
  1220.       ;;
  1221.   esac
  1222.   echo " "
  1223.   fn=dn~
  1224. ! rp='Where do the manual pages (source) go?'
  1225.   . ./getfile
  1226. ! if test "X$mansrcexp" != "X$ansexp"; then
  1227. !     installmansrc=''
  1228.   fi
  1229. ! mansrc="$ans"
  1230. ! mansrcexp="$ansexp"
  1231. ! case "$mansrc" in
  1232. ! '') mansrc=' '
  1233. !     installmansrc='';;
  1234.   esac
  1235.   if $afs; then
  1236.       $cat <<EOM
  1237. --- 6812,6832 ----
  1238.       eval $prefixup
  1239.       ;;
  1240.   ' ') dflt=none;;
  1241. ! *)  dflt="$man1dir"
  1242.       ;;
  1243.   esac
  1244.   echo " "
  1245.   fn=dn~
  1246. ! rp="Where do the main $spackage manual pages (source) go?"
  1247.   . ./getfile
  1248. ! if test "X$man1direxp" != "X$ansexp"; then
  1249. !     installman1dir=''
  1250.   fi
  1251. ! man1dir="$ans"
  1252. ! man1direxp="$ansexp"
  1253. ! case "$man1dir" in
  1254. ! '') man1dir=' '
  1255. !     installman1dir='';;
  1256.   esac
  1257.   if $afs; then
  1258.       $cat <<EOM
  1259. ***************
  1260. *** 6627,6654 ****
  1261.   which they are presumably copied to the former directory by occult means).
  1262.   
  1263.   EOM
  1264. !     case "$installmansrc" in
  1265. !     '') dflt=`echo $mansrcexp | sed 's#^/afs/#/afs/.#'`;;
  1266. !     *) dflt="$installmansrc";;
  1267.       esac
  1268.       fn=de~
  1269.       rp='Where will man pages be installed?'
  1270.       . ./getfile
  1271. !     installmansrc="$ans"
  1272.   else
  1273. !     installmansrc="$mansrcexp"
  1274.   fi
  1275.   
  1276. ! case "$mansrc" in
  1277. ! ' ') manext='0';;
  1278. ! *l) manext=l;;
  1279. ! *n) manext=n;;
  1280. ! *o) manext=l;;
  1281. ! *p) manext=n;;
  1282. ! *C) manext=C;;
  1283. ! *L) manext=L;;
  1284. ! *L1) manext=L1;;
  1285. ! *) manext=1;;
  1286.   esac
  1287.   
  1288.   : see what type is used for mode_t
  1289. --- 6836,6946 ----
  1290.   which they are presumably copied to the former directory by occult means).
  1291.   
  1292.   EOM
  1293. !     case "$installman1dir" in
  1294. !     '') dflt=`echo $man1direxp | sed 's#^/afs/#/afs/.#'`;;
  1295. !     *) dflt="$installman1dir";;
  1296.       esac
  1297.       fn=de~
  1298.       rp='Where will man pages be installed?'
  1299.       . ./getfile
  1300. !     installman1dir="$ans"
  1301.   else
  1302. !     installman1dir="$man1direxp"
  1303.   fi
  1304.   
  1305. ! case "$man1dir" in
  1306. ! ' ') man1ext='0';;
  1307. ! *l) man1ext=l;;
  1308. ! *n) man1ext=n;;
  1309. ! *o) man1ext=l;;
  1310. ! *p) man1ext=n;;
  1311. ! *C) man1ext=C;;
  1312. ! *L) man1ext=L;;
  1313. ! *L1) man1ext=L1;;
  1314. ! *) man1ext=1;;
  1315. ! esac
  1316. ! : determine where library module manual pages go
  1317. ! set man3dir man3dir none
  1318. ! eval $prefixit
  1319. ! $cat <<EOM
  1320. ! $spackage has manual pages for many of the library modules.
  1321. ! EOM
  1322. ! case "$nroff" in
  1323. ! nroff)
  1324. !     $cat <<'EOM'
  1325. ! However, you don't have nroff, so they're probably useless to you.
  1326. ! You can use the supplied perldoc script instead.
  1327. ! EOM
  1328. !     case "$man3dir" in
  1329. !     '') man3dir="none";;
  1330. !     esac;;
  1331. ! esac
  1332. ! case "$d_flexfnam" in
  1333. ! undef)
  1334. !     $cat <<'EOM'
  1335. ! However, your system can't handle the long file names like File::Basename.3. 
  1336. ! You can use the supplied perldoc script instead.
  1337. ! EOM
  1338. !     case "$man3dir" in
  1339. !     '') man3dir="none";;
  1340. !     esac;;
  1341. ! esac
  1342. ! echo "If you don't want the manual sources installed, answer 'none'."
  1343. ! case "$man3dir" in
  1344. ! '')    dflt="$privlib/man/man3" ;;
  1345. ! ' ') dflt=none;;
  1346. ! *)    dflt="$man3dir" ;;
  1347. ! esac
  1348. ! echo " "
  1349. ! fn=dn~
  1350. ! rp="Where do the $spackage library man pages (source) go?"
  1351. ! . ./getfile
  1352. ! if test "X$man3direxp" != "X$ansexp"; then
  1353. !     installman3dir=''
  1354. ! fi
  1355. ! man3dir="$ans"
  1356. ! man3direxp="$ansexp"
  1357. ! case "$man3dir" in
  1358. ! '') man3dir=' '
  1359. !     installman3dir='';;
  1360. ! esac
  1361. ! if $afs; then
  1362. !     $cat <<EOM
  1363. ! Since you are running AFS, I need to distinguish the directory in which
  1364. ! manual pages reside from the directory in which they are installed (and from
  1365. ! which they are presumably copied to the former directory by occult means).
  1366. ! EOM
  1367. !     case "$installman3dir" in
  1368. !     '') dflt=`echo $man3direxp | sed 's#^/afs/#/afs/.#'`;;
  1369. !     *) dflt="$installman3dir";;
  1370. !     esac
  1371. !     fn=de~
  1372. !     rp='Where will man pages be installed?'
  1373. !     . ./getfile
  1374. !     installman3dir="$ans"
  1375. ! else
  1376. !     installman3dir="$man3direxp"
  1377. ! fi
  1378. ! case "$man3dir" in
  1379. ! ' ') man3ext='0';;
  1380. ! *l) man3ext=l;;
  1381. ! *n) man3ext=n;;
  1382. ! *o) man3ext=l;;
  1383. ! *p) man3ext=n;;
  1384. ! *C) man3ext=C;;
  1385. ! *L) man3ext=L;;
  1386. ! *L3) man3ext=L3;;
  1387. ! *) man3ext=3;;
  1388.   esac
  1389.   
  1390.   : see what type is used for mode_t
  1391. ***************
  1392. *** 7060,7066 ****
  1393.   case "$sig_name" in
  1394.   '')
  1395.       echo "Generating a list of signal names..." >&4
  1396. !     xxx=`./findhdr signal.h`" "`./findhdr sys/signal.h`" "`./findhdr linux/signal.h`
  1397.       set X `cat $xxx 2>&1 | $awk '
  1398.   $1 ~ /^#define$/ && $2 ~ /^SIG[A-Z0-9]*$/ && $3 ~ /^[1-9][0-9]*$/ {
  1399.       sig[$3] = substr($2,4,20)
  1400. --- 7352,7359 ----
  1401.   case "$sig_name" in
  1402.   '')
  1403.       echo "Generating a list of signal names..." >&4
  1404. !     xxx=`./findhdr signal.h`" "`./findhdr sys/signal.h`
  1405. !     xxx="$xxx "`./findhdr linux/signal.h`
  1406.       set X `cat $xxx 2>&1 | $awk '
  1407.   $1 ~ /^#define$/ && $2 ~ /^SIG[A-Z0-9]*$/ && $3 ~ /^[1-9][0-9]*$/ {
  1408.       sig[$3] = substr($2,4,20)
  1409. ***************
  1410. *** 7638,7643 ****
  1411. --- 7931,7949 ----
  1412.       ;;
  1413.   esac
  1414.   
  1415. + : Remove build directory name from cppstdin so it can be used from
  1416. + : either the present location or the final installed location.
  1417. + echo " "
  1418. + : Get out of the UU directory to get correct path name.
  1419. + cd ..
  1420. + case "$cppstdin" in
  1421. + `pwd`/cppstdin)
  1422. +     echo "Stripping down cppstdin path name"
  1423. +     cppstdin=cppstdin
  1424. +     ;;
  1425. + esac
  1426. + cd UU
  1427.   : end of configuration questions
  1428.   echo " "
  1429.   echo "End of configuration questions."
  1430. ***************
  1431. *** 7796,7802 ****
  1432.   d_isascii='$d_isascii'
  1433.   d_killpg='$d_killpg'
  1434.   d_link='$d_link'
  1435. - d_linuxstd='$d_linuxstd'
  1436.   d_locconv='$d_locconv'
  1437.   d_lockf='$d_lockf'
  1438.   d_lstat='$d_lstat'
  1439. --- 8102,8107 ----
  1440. ***************
  1441. *** 7865,7873 ****
  1442. --- 8170,8180 ----
  1443.   d_shmdt='$d_shmdt'
  1444.   d_shmget='$d_shmget'
  1445.   d_shrplib='$d_shrplib'
  1446. + d_sitelib='$d_sitelib'
  1447.   d_socket='$d_socket'
  1448.   d_sockpair='$d_sockpair'
  1449.   d_statblks='$d_statblks'
  1450. + d_stdiobase='$d_stdiobase'
  1451.   d_stdstdio='$d_stdstdio'
  1452.   d_strchr='$d_strchr'
  1453.   d_strcoll='$d_strcoll'
  1454. ***************
  1455. *** 7983,7991 ****
  1456.   inews='$inews'
  1457.   installarchlib='$installarchlib'
  1458.   installbin='$installbin'
  1459. ! installmansrc='$installmansrc'
  1460.   installprivlib='$installprivlib'
  1461.   installscript='$installscript'
  1462.   intsize='$intsize'
  1463.   known_extensions='$known_extensions'
  1464.   ksh='$ksh'
  1465. --- 8290,8300 ----
  1466.   inews='$inews'
  1467.   installarchlib='$installarchlib'
  1468.   installbin='$installbin'
  1469. ! installman1dir='$installman1dir'
  1470. ! installman3dir='$installman3dir'
  1471.   installprivlib='$installprivlib'
  1472.   installscript='$installscript'
  1473. + installsitelib='$installsitelib'
  1474.   intsize='$intsize'
  1475.   known_extensions='$known_extensions'
  1476.   ksh='$ksh'
  1477. ***************
  1478. *** 8013,8021 ****
  1479.   mallocobj='$mallocobj'
  1480.   mallocsrc='$mallocsrc'
  1481.   malloctype='$malloctype'
  1482. ! manext='$manext'
  1483. ! mansrc='$mansrc'
  1484. ! mansrcexp='$mansrcexp'
  1485.   medium='$medium'
  1486.   mips='$mips'
  1487.   mips_type='$mips_type'
  1488. --- 8322,8333 ----
  1489.   mallocobj='$mallocobj'
  1490.   mallocsrc='$mallocsrc'
  1491.   malloctype='$malloctype'
  1492. ! man1dir='$man1dir'
  1493. ! man1direxp='$man1direxp'
  1494. ! man1ext='$man1ext'
  1495. ! man3dir='$man3dir'
  1496. ! man3direxp='$man3direxp'
  1497. ! man3ext='$man3ext'
  1498.   medium='$medium'
  1499.   mips='$mips'
  1500.   mips_type='$mips_type'
  1501. ***************
  1502. *** 8067,8072 ****
  1503. --- 8379,8386 ----
  1504.   shsharp='$shsharp'
  1505.   sig_name='$sig_name'
  1506.   signal_t='$signal_t'
  1507. + sitelib='$sitelib'
  1508. + sitelibexp='$sitelibexp'
  1509.   sizetype='$sizetype'
  1510.   sleep='$sleep'
  1511.   smail='$smail'
  1512. ***************
  1513. *** 8082,8087 ****
  1514. --- 8396,8405 ----
  1515.   startsh='$startsh'
  1516.   static_ext='$static_ext'
  1517.   stdchar='$stdchar'
  1518. + stdio_base='$stdio_base'
  1519. + stdio_bufsiz='$stdio_bufsiz'
  1520. + stdio_cnt='$stdio_cnt'
  1521. + stdio_ptr='$stdio_ptr'
  1522.   strings='$strings'
  1523.   submit='$submit'
  1524.   sysman='$sysman'
  1525. Index: MANIFEST
  1526. *** perl5.001h/MANIFEST    Thu Apr 13 10:38:43 1995
  1527. --- perl5.001i/MANIFEST    Tue May 30 13:45:16 1995
  1528. ***************
  1529. *** 1,5 ****
  1530.   Artistic        The "Artistic License"
  1531. ! Changes            Differences between Perl 4 and Perl 5
  1532.   Configure        Portability tool
  1533.   Copying            The GNU General Public License
  1534.   Doc/perl5-notes        Samples of new functionality
  1535. --- 1,6 ----
  1536.   Artistic        The "Artistic License"
  1537. ! Changes            Differences from previous versions.
  1538. ! Changes.Conf        Recent changes in the Configure & build process
  1539.   Configure        Portability tool
  1540.   Copying            The GNU General Public License
  1541.   Doc/perl5-notes        Samples of new functionality
  1542. ***************
  1543. *** 11,29 ****
  1544.   README.vms        Notes about VMS
  1545.   Todo            The Wishlist
  1546.   XSUB.h            Include file for extension subroutines
  1547. - autosplit        Splits up autoloader functions
  1548.   av.c            Array value code
  1549.   av.h            Array value header
  1550.   c2ph.SH            program to translate dbx stabs to perl
  1551.   c2ph.doc        documentation for c2ph
  1552.   cflags.SH        A script that emits C compilation flags per file
  1553. ! config.H        Sample config.h
  1554.   config_h.SH        Produces config.h
  1555.   configpm        Produces lib/Config.pm
  1556.   cop.h            Control operator header
  1557.   cv.h            Code value header
  1558.   deb.c            Debugging routines
  1559. - doSH            Script to run all the *.SH files
  1560.   doio.c            I/O operations
  1561.   doop.c            Support code for various operations
  1562.   dosish.h        Some defines for MS/DOSish machines
  1563. --- 12,29 ----
  1564.   README.vms        Notes about VMS
  1565.   Todo            The Wishlist
  1566.   XSUB.h            Include file for extension subroutines
  1567.   av.c            Array value code
  1568.   av.h            Array value header
  1569.   c2ph.SH            program to translate dbx stabs to perl
  1570.   c2ph.doc        documentation for c2ph
  1571.   cflags.SH        A script that emits C compilation flags per file
  1572. ! config_H        Sample config.h
  1573.   config_h.SH        Produces config.h
  1574.   configpm        Produces lib/Config.pm
  1575. + configure        Crude emulation of GNU configure
  1576.   cop.h            Control operator header
  1577.   cv.h            Code value header
  1578.   deb.c            Debugging routines
  1579.   doio.c            I/O operations
  1580.   doop.c            Support code for various operations
  1581.   dosish.h        Some defines for MS/DOSish machines
  1582. ***************
  1583. *** 85,91 ****
  1584.   ext/DB_File/DB_File_BS        Berkeley DB extension mkbootstrap fodder
  1585.   ext/DB_File/Makefile.PL        Berkeley DB extension makefile writer
  1586.   ext/DB_File/typemap        Berkeley DB extension interface types
  1587. - ext/DynaLoader/DynaLoader.doc    Dynamic Loader specification
  1588.   ext/DynaLoader/DynaLoader.pm    Dynamic Loader perl module
  1589.   ext/DynaLoader/Makefile.PL    Dynamic Loader makefile writer
  1590.   ext/DynaLoader/README        Dynamic Loader notes and intro
  1591. --- 85,90 ----
  1592. ***************
  1593. *** 187,192 ****
  1594. --- 186,192 ----
  1595.   hints/dgux.sh        Hints for named architecture
  1596.   hints/dnix.sh        Hints for named architecture
  1597.   hints/dynix.sh        Hints for named architecture
  1598. + hints/epix.sh        Hints for named architecture
  1599.   hints/esix4.sh        Hints for named architecture
  1600.   hints/fps.sh        Hints for named architecture
  1601.   hints/freebsd.sh    Hints for named architecture
  1602. ***************
  1603. *** 230,235 ****
  1604. --- 230,236 ----
  1605.   hints/uts.sh        Hints for named architecture
  1606.   hv.c            Hash value code
  1607.   hv.h            Hash value header
  1608. + installman        Perl script to install man pages for pods.
  1609.   installperl        Perl script to do "make install" dirty work
  1610.   interp.sym        Interpreter specific symbols to hide in a struct
  1611.   ioctl.pl        Sample ioctl.pl
  1612. ***************
  1613. *** 263,268 ****
  1614. --- 264,270 ----
  1615.   lib/Net/Ping.pm        Ping methods
  1616.   lib/Search/Dict.pm    A module to do binary search on dictionaries
  1617.   lib/Shell.pm        A module to make AUTOLOADEed system() calls
  1618. + lib/SubstrHash.pm    Compact hash for known key, value and table size
  1619.   lib/Sys/Hostname.pm    Hostname methods
  1620.   lib/Sys/Syslog.pm    Perl module supporting syslogging
  1621.   lib/Term/Cap.pm        Perl module supporting termcap usage
  1622. ***************
  1623. *** 273,279 ****
  1624.   lib/Text/Soundex.pm    Perl module to implement Soundex
  1625.   lib/Text/Tabs.pm    Do expand and unexpand
  1626.   lib/TieHash.pm        Base class for tied hashes
  1627. - lib/SubstrHash.pm    Compact hash for known key, value and table size
  1628.   lib/Time/Local.pm    Reverse translation of localtime, gmtime
  1629.   lib/abbrev.pl        An abbreviation table builder
  1630.   lib/assert.pl        assertion and panic with stack trace
  1631. --- 275,280 ----
  1632. ***************
  1633. *** 334,339 ****
  1634. --- 335,341 ----
  1635.   perl.c            main()
  1636.   perl.h            Global declarations
  1637.   perl_exp.SH        Creates list of exported symbols for AIX.
  1638. + perldoc.SH        A simple tool to find & display perl's documentation
  1639.   perlsh            A poor man's perl shell
  1640.   perly.c            A byacc'ed perly.y
  1641.   perly.c.diff        Fixup perly.c to allow recursion
  1642. ***************
  1643. *** 342,380 ****
  1644.   perly.y            Yacc grammar for perl
  1645.   pl2pm            A pl to pm translator
  1646.   pod/Makefile        Make pods into something else
  1647. - pod/modpods/Abbrev.pod        Doc for Abbrev.pm
  1648. - pod/modpods/AnyDBMFile.pod    Doc for AnyDBMFile.pm
  1649. - pod/modpods/AutoLoader.pod    Doc for AutoLoader.pm
  1650. - pod/modpods/AutoSplit.pod    Doc for AutoSplit.pm
  1651. - pod/modpods/Basename.pod    Doc for Basename.pm
  1652. - pod/modpods/Benchmark.pod    Doc for Benchmark.pm
  1653. - pod/modpods/Carp.pod        Doc for Carp.pm
  1654. - pod/modpods/CheckTree.pod    Doc for CheckTree.pm
  1655. - pod/modpods/Collate.pod        Doc for Collate.pm
  1656. - pod/modpods/Config.pod        Doc for Config.pm
  1657. - pod/modpods/Cwd.pod        Doc for Cwd.pm
  1658. - pod/modpods/DB_File.pod        Doc for File.pm
  1659. - pod/modpods/Dynaloader.pod    Doc for Dynaloader.pm
  1660. - pod/modpods/English.pod        Doc for English.pm
  1661. - pod/modpods/Env.pod        Doc for Env.pm
  1662. - pod/modpods/Exporter.pod    Doc for Exporter.pm
  1663. - pod/modpods/Fcntl.pod        Doc for Fcntl.pm
  1664. - pod/modpods/FileHandle.pod    Doc for FileHandle.pm
  1665. - pod/modpods/Find.pod        Doc for Find.pm
  1666. - pod/modpods/Finddepth.pod    Doc for Finddepth.pm
  1667. - pod/modpods/GetOptions.pod    Doc for GetOptions.pm
  1668. - pod/modpods/Getopt.pod        Doc for Getopt.pm
  1669. - pod/modpods/MakeMaker.pod    Doc for MakeMaker.pm
  1670. - pod/modpods/Open2.pod        Doc for Open2.pm
  1671. - pod/modpods/Open3.pod        Doc for Open3.pm
  1672. - pod/modpods/POSIX.pod        Doc for POSIX.pm
  1673. - pod/modpods/Ping.pod        Doc for Ping.pm
  1674. - pod/modpods/Socket.pod        Doc for Socket.pm
  1675. - pod/modpods/integer.pod        Doc for integer.pm
  1676. - pod/modpods/less.pod        Doc for less.pm
  1677. - pod/modpods/sigtrap.pod        Doc for sigtrap.pm
  1678. - pod/modpods/strict.pod        Doc for strict.pm
  1679. - pod/modpods/subs.pod        Doc for subs.pm
  1680.   pod/perl.pod        Top level perl man page
  1681.   pod/perlapi.pod        XS api info
  1682.   pod/perlbook.pod    Book info
  1683. --- 344,349 ----
  1684. ***************
  1685. *** 435,440 ****
  1686. --- 404,410 ----
  1687.   t/cmd/switch.t        See if switch optimizations work
  1688.   t/cmd/while.t        See if while loops work
  1689.   t/comp/cmdopt.t        See if command optimization works
  1690. + t/comp/cpp.aux        main file for cpp.t
  1691.   t/comp/cpp.t        See if C preprocessor works
  1692.   t/comp/decl.t        See if declarations work
  1693.   t/comp/multiline.t    See if multiline strings work
  1694. ***************
  1695. *** 561,564 ****
  1696.   x2p/util.c        Utility routines
  1697.   x2p/util.h        Public declarations for the above
  1698.   x2p/walk.c        Parse tree walker
  1699. - xf            A script to translate Perl 4 symbols to Perl 5
  1700. --- 531,533 ----
  1701. Index: Makefile.SH
  1702. *** perl5.001h/Makefile.SH    Sat Apr 15 11:32:18 1995
  1703. --- perl5.001i/Makefile.SH    Tue May 30 13:41:15 1995
  1704. ***************
  1705. *** 78,88 ****
  1706.   BYACC = $byacc
  1707.   CC = $cc
  1708.   LD = $ld
  1709. ! bin = $installbin
  1710. ! scriptdir = $scriptdir
  1711. ! privlib = $installprivlib
  1712. ! mansrc = $mansrc
  1713. ! manext = $manext
  1714.   LDFLAGS = $ldflags
  1715.   CLDFLAGS = $ldflags
  1716.   
  1717. --- 78,84 ----
  1718.   BYACC = $byacc
  1719.   CC = $cc
  1720.   LD = $ld
  1721.   LDFLAGS = $ldflags
  1722.   CLDFLAGS = $ldflags
  1723.   
  1724. ***************
  1725. *** 94,99 ****
  1726. --- 90,107 ----
  1727.   RMS = rm -f
  1728.   ranlib = $ranlib
  1729.   
  1730. + # The following are mentioned only to make metaconfig include the
  1731. + # appropriate questions in Configure.  If you want to change these,
  1732. + # edit config.sh instead, or specify --man1dir=/wherever on 
  1733. + # installman commandline.
  1734. + bin = $installbin
  1735. + scriptdir = $scriptdir
  1736. + privlib = $installprivlib
  1737. + man1dir = $man1dir
  1738. + man1ext = $man1ext
  1739. + man3dir = $man3dir
  1740. + man3ext = $man3ext
  1741.   # The following are used to build and install shared libraries for
  1742.   # dynamic loading.
  1743.   LDDLFLAGS = $lddlflags
  1744. ***************
  1745. *** 127,139 ****
  1746.   
  1747.   private = preplibrary lib/ExtUtils/Miniperl.pm lib/Config.pm
  1748.   
  1749. ! scripts =
  1750. ! manpages = perl.man
  1751. ! util =
  1752.   
  1753. ! sh = Makefile.SH cflags.SH makedepend.SH makedir.SH writemain.SH
  1754.   
  1755.   h1 = EXTERN.h INTERN.h XSUB.h av.h config.h cop.h cv.h dosish.h
  1756.   h2 = embed.h form.h gv.h handy.h hv.h keywords.h mg.h op.h
  1757. --- 135,145 ----
  1758.   
  1759.   private = preplibrary lib/ExtUtils/Miniperl.pm lib/Config.pm
  1760.   
  1761. ! sh = Makefile.SH c2ph.SH cflags.SH config_h.SH h2ph.SH h2xs.SH makeaperl.SH \
  1762. !     makedepend.SH makedir.SH perl_exp.SH perldoc.SH writemain.SH
  1763.   
  1764. ! addedbyconf = UU Makefile c2ph cflags config.h h2ph h2xs makeaperl \
  1765. !     makedepend makedir perl_exp perldoc writemain
  1766.   
  1767.   h1 = EXTERN.h INTERN.h XSUB.h av.h config.h cop.h cv.h dosish.h
  1768.   h2 = embed.h form.h gv.h handy.h hv.h keywords.h mg.h op.h
  1769. ***************
  1770. *** 166,173 ****
  1771.   
  1772.   lintflags = -hbvxac
  1773.   
  1774. - addedbyconf = UU
  1775.   # grrr
  1776.   SHELL = /bin/sh
  1777.   
  1778. --- 172,177 ----
  1779. ***************
  1780. *** 176,190 ****
  1781.   
  1782.   all: makefile miniperl $(private) $(public) $(dynamic_ext)
  1783.       @echo " "; echo "    Making x2p stuff"; cd x2p; $(MAKE) all
  1784. !     @echo " "; echo "    Making docs"; cd pod; $(MAKE) all;
  1785.   
  1786.   # Phony target to force checking subdirectories.
  1787.   FORCE:
  1788.   
  1789. - !NO!SUBS!
  1790. - : Now on to the rest of the Makefile.
  1791. - $spitshell >>Makefile <<'!NO!SUBS!'
  1792.   # The $& notation tells Sequent machines that it can do a parallel make,
  1793.   # and is harmless otherwise.
  1794.   
  1795. --- 180,192 ----
  1796.   
  1797.   all: makefile miniperl $(private) $(public) $(dynamic_ext)
  1798.       @echo " "; echo "    Making x2p stuff"; cd x2p; $(MAKE) all
  1799. !     
  1800. ! # This is now done by installman only if you actually want the man pages.
  1801. ! #    @echo " "; echo "    Making docs"; cd pod; $(MAKE) all;
  1802.   
  1803.   # Phony target to force checking subdirectories.
  1804.   FORCE:
  1805.   
  1806.   # The $& notation tells Sequent machines that it can do a parallel make,
  1807.   # and is harmless otherwise.
  1808.   
  1809. ***************
  1810. *** 250,260 ****
  1811.       $(CCCMD) -DIAMSUID sperl.c
  1812.       $(RMS) sperl.c
  1813.   
  1814.   opcode.h: opcode.pl
  1815.       - perl opcode.pl
  1816.   
  1817.   embed.h: embed_h.sh global.sym interp.sym
  1818. !     sh embed_h.sh
  1819.   
  1820.   # We have to call our ./makedir because Ultrix 4.3 make can't handle the line
  1821.   #    test -d lib/auto || mkdir lib/auto
  1822. --- 252,273 ----
  1823.       $(CCCMD) -DIAMSUID sperl.c
  1824.       $(RMS) sperl.c
  1825.   
  1826. + # The following three header files are generated automatically
  1827. + # The correct versions should be already supplied with the perl kit,
  1828. + # in case you don't have perl or 'sh' available.
  1829. + # The - is to ignore error return codes in case you have the source
  1830. + # installed read-only or you don't have perl yet.
  1831. + keywords.h: keywords.pl
  1832. +     @echo "Don't worry if this fails."
  1833. +     - perl keywords.pl
  1834.   opcode.h: opcode.pl
  1835. +     @echo "Don't worry if this fails."
  1836.       - perl opcode.pl
  1837.   
  1838.   embed.h: embed_h.sh global.sym interp.sym
  1839. !     @echo "Don't worry if this fails."
  1840. !     - sh embed_h.sh
  1841.   
  1842.   # We have to call our ./makedir because Ultrix 4.3 make can't handle the line
  1843.   #    test -d lib/auto || mkdir lib/auto
  1844. ***************
  1845. *** 273,281 ****
  1846.   lib/ExtUtils/Miniperl.pm: miniperlmain.c miniperl minimod.PL lib/Config.pm
  1847.       ./miniperl minimod.PL > tmp && mv tmp $@
  1848.   
  1849. ! install: all
  1850.       ./perl installperl
  1851.   
  1852.   # I now supply perly.c with the kits, so the following section is
  1853.   # used only if you force byacc to run by saying
  1854.   #     make run_byacc
  1855. --- 286,303 ----
  1856.   lib/ExtUtils/Miniperl.pm: miniperlmain.c miniperl minimod.PL lib/Config.pm
  1857.       ./miniperl minimod.PL > tmp && mv tmp $@
  1858.   
  1859. ! install: all install.perl install.man
  1860. ! install.perl:    all
  1861.       ./perl installperl
  1862.   
  1863. + install.man:    all
  1864. +     ./perl installman
  1865. + # Not implemented yet.
  1866. + #install.html:    all
  1867. + #    ./perl installhtml
  1868.   # I now supply perly.c with the kits, so the following section is
  1869.   # used only if you force byacc to run by saying
  1870.   #     make run_byacc
  1871. ***************
  1872. *** 336,347 ****
  1873.       done
  1874.       rm -f *.orig */*.orig *~ */*~ core t/core t/c t/perl
  1875.       rm -rf $(addedbyconf)
  1876. !     rm -f Makefile cflags makedepend makedir writemain
  1877. !     rm -f config.h makefile makefile.old
  1878.       rm -f $(private)
  1879.       rm -rf lib/auto
  1880.       rm -f lib/.exists
  1881. !     rm -f h2ph h2ph.man c2ph pstruct h2xs makeaperl
  1882.       rm -rf .config
  1883.       @echo "Note that make realclean does not delete config.sh"
  1884.   
  1885. --- 358,368 ----
  1886.       done
  1887.       rm -f *.orig */*.orig *~ */*~ core t/core t/c t/perl
  1888.       rm -rf $(addedbyconf)
  1889. !     rm -f makefile makefile.old
  1890.       rm -f $(private)
  1891.       rm -rf lib/auto
  1892.       rm -f lib/.exists
  1893. !     rm -f h2ph.man pstruct
  1894.       rm -rf .config
  1895.       @echo "Note that make realclean does not delete config.sh"
  1896.   
  1897. ***************
  1898. *** 373,378 ****
  1899. --- 394,404 ----
  1900.   test: miniperl perl preplibrary $(dynamic_ext)
  1901.       - cd t && chmod +x TEST */*.t
  1902.       - cd t && (rm -f perl; $(LNS) ../perl perl) && ./perl TEST </dev/tty
  1903. + minitest: miniperl
  1904. +     - cd t && chmod +x TEST */*.t
  1905. +     - cd t && (rm -f perl; $(LNS) ../miniperl perl) \
  1906. +         && ./perl TEST base/*.t comp/*.t cmd/*.t io/*.t op/*.t </dev/tty
  1907.   
  1908.   clist:    $(c)
  1909.       echo $(c) | tr ' ' '\012' >.clist
  1910. Index: README
  1911. *** perl5.001h/README    Thu Apr  6 14:08:57 1995
  1912. --- perl5.001i/README    Tue May 30 16:00:51 1995
  1913. ***************
  1914. *** 68,81 ****
  1915.       run ok, the defaults will usually be right.  It will then proceed to
  1916.       make config.h, config.sh, and Makefile.  You may have to explicitly
  1917.       say     sh Configure    to ensure that Configure is run under sh.
  1918. !     If you're a hotshot, run Configure -d to take all the defaults and
  1919. !     then edit config.sh to patch up any flaws and run Configure -S.
  1920.   
  1921.       Configure supports a number of useful options.  Run Configure -h 
  1922.       to get a listing.  To compile with gcc, for example, you can run 
  1923. !     Configure -Dcc=gcc, or answer 'gcc' at the cc prompt.  This is the
  1924. !     preferred way to invoke an alternate compiler, since the hints
  1925. !     files can then set appropriate defaults.
  1926.       
  1927.       If you change compilers or make other significant changes, you should
  1928.       probably _not_ re-use your old config.sh.  Simply remove it or
  1929. --- 68,83 ----
  1930.       run ok, the defaults will usually be right.  It will then proceed to
  1931.       make config.h, config.sh, and Makefile.  You may have to explicitly
  1932.       say     sh Configure    to ensure that Configure is run under sh.
  1933. !     If you're a hotshot, run Configure -d to take all the defaults,
  1934. !     edit config.sh to patch up any flaws, and then run Configure -S.
  1935.   
  1936.       Configure supports a number of useful options.  Run Configure -h 
  1937.       to get a listing.  To compile with gcc, for example, you can run 
  1938. !     Configure -Dcc=gcc, or answer 'gcc' at the cc prompt.  
  1939. !     
  1940. !     If you wish to use gcc (or another alternative compiler))
  1941. !     you should use  Configure -Dcc=gcc.  That way, the the hints
  1942. !     files can set appropriate defaults.
  1943.       
  1944.       If you change compilers or make other significant changes, you should
  1945.       probably _not_ re-use your old config.sh.  Simply remove it or
  1946. ***************
  1947. *** 94,100 ****
  1948.       if your sh doesn't handle them, but all other # comments will be taken
  1949.       care of.
  1950.   
  1951. !     (If you don't have sh, you'll have to copy the sample file config.H to
  1952.       config.h and edit the config.h to reflect your system's peculiarities.)
  1953.   
  1954.   2)  Glance through config.h to make sure system dependencies are correct.
  1955. --- 96,102 ----
  1956.       if your sh doesn't handle them, but all other # comments will be taken
  1957.       care of.
  1958.   
  1959. !     (If you don't have sh, you'll have to copy the sample file config_H to
  1960.       config.h and edit the config.h to reflect your system's peculiarities.)
  1961.   
  1962.   2)  Glance through config.h to make sure system dependencies are correct.
  1963. ***************
  1964. *** 130,166 ****
  1965.       Makefile.SH, since a default rule only takes effect in the
  1966.       absence of a specific rule.
  1967.   
  1968. !     Many of the following hints are now done automatically by Configure.
  1969. !     Some of the hints here were for Perl 4, and are probably obsolete.
  1970. !     They're left here for the moment just to give you some ideas for
  1971. !     what to try if you're having trouble.
  1972. !     AIX/RT may need a -a switch and -DCRIPPLED_CC.
  1973. !     Ultrix 3.[01] on MIPS needs to undefine WAITPID--the system call is busted.
  1974. !     MIPS machines may need to undef d_volatile.
  1975. !     MIPS machines may need to turn off -O on some files.
  1976. !     Some MIPS machines may need to undefine CASTNEGFLOAT.
  1977.       Genix may need to use libc rather than libc_s, or #undef VARARGS.
  1978.       NCR Tower 32 (OS 2.01.01) may need -W2,-Sl,2000 and #undef MKDIR.
  1979. !     A/UX may appear to work with -O -B/usr/lib/big/ optimizer flags.
  1980. !     A/UX may need -lposix to find rewinddir.
  1981. !     A/UX may need -ZP -DPOSIX, and -g if big cc is used.
  1982.       UTS may need one or more of -DCRIPPLED_CC, -K or -g, and undef LSTAT.
  1983.       If you get syntax errors on '(', try -DCRIPPLED_CC.
  1984.       Machines with half-implemented dbm routines will need to #undef I_ODBM 
  1985.       SCO prior to 3.2.4 may be missing dbmclose().  An upgrade to 3.2.4
  1986.       that includes libdbm.nfs (which includes dbmclose()) may be available.
  1987.       If you get duplicates upon linking for malloc et al, say -DHIDEMYMALLOC.
  1988.       If you get duplicate function definitions (a perl function has the
  1989.       same name as another function on your system) try -DEMBED.
  1990.       If you get varags problems with gcc, be sure that gcc is installed
  1991.       correctly.  When using gcc, you should probably have i_stdarg='define'
  1992. !     and i_varags='undef' in config.sh.
  1993.       If you wish to use dynamic loading on SunOS or Solaris, and you
  1994.       have GNU as and GNU ld installed, you may need to add -B/bin/ to
  1995.       your $ccflags and $ldflags so that the system's versions of as 
  1996.       and ld are used.
  1997.   
  1998.   5)  make test
  1999.   
  2000.       This will run the regression tests on the perl you just made.
  2001. --- 132,181 ----
  2002.       Makefile.SH, since a default rule only takes effect in the
  2003.       absence of a specific rule.
  2004.   
  2005. !     If you used a hint file, try reading the comments in the hint file
  2006. !     for further tips and information.
  2007. !     If you can successfully build miniperl, but the process crashes
  2008. !     during the building of extensions, you should run
  2009. !         make minitest
  2010. !     to test your version of miniperl.
  2011. !     Some additional things that have been reported for either perl4 or
  2012. !     perl5:
  2013.       Genix may need to use libc rather than libc_s, or #undef VARARGS.
  2014.       NCR Tower 32 (OS 2.01.01) may need -W2,-Sl,2000 and #undef MKDIR.
  2015.       UTS may need one or more of -DCRIPPLED_CC, -K or -g, and undef LSTAT.
  2016.       If you get syntax errors on '(', try -DCRIPPLED_CC.
  2017.       Machines with half-implemented dbm routines will need to #undef I_ODBM 
  2018.       SCO prior to 3.2.4 may be missing dbmclose().  An upgrade to 3.2.4
  2019.       that includes libdbm.nfs (which includes dbmclose()) may be available.
  2020.       If you get duplicates upon linking for malloc et al, say -DHIDEMYMALLOC.
  2021.       If you get duplicate function definitions (a perl function has the
  2022.       same name as another function on your system) try -DEMBED.
  2023.       If you get varags problems with gcc, be sure that gcc is installed
  2024.       correctly.  When using gcc, you should probably have i_stdarg='define'
  2025. !     and i_varags='undef' in config.sh.  The problem is usually solved
  2026. !     by running fixincludes correctly.
  2027.       If you wish to use dynamic loading on SunOS or Solaris, and you
  2028.       have GNU as and GNU ld installed, you may need to add -B/bin/ to
  2029.       your $ccflags and $ldflags so that the system's versions of as 
  2030.       and ld are used.
  2031.   
  2032. +     If you run into dynamic loading problems, check your setting of
  2033. +     the LD_LIBRARY_PATH environment variable.  Perl should build 
  2034. +     fine with LD_LIBRARY_PATH unset, though that may depend on details
  2035. +     of your local set-up.
  2036.   5)  make test
  2037.   
  2038.       This will run the regression tests on the perl you just made.
  2039. ***************
  2040. *** 173,185 ****
  2041.   
  2042.   6)  make install
  2043.   
  2044. !     This will put perl into a public directory (such as /usr/local/bin).
  2045. !     It will also try to put the man pages in a reasonable place.  It will not
  2046. !     nroff the man page, however.  You may need to be root to do this.  If
  2047. !     you are not root, you must own the directories in question and you should
  2048. !     ignore any messages about chown not working.
  2049.   
  2050. !     make install will also install the following:
  2051.       perl,
  2052.           perl5.nnn    where nnn is the current release number.  This
  2053.               will be a link to perl.
  2054. --- 188,201 ----
  2055.   
  2056.   6)  make install
  2057.   
  2058. !     This will put perl into a public directory (such as
  2059. !     /usr/local/bin).  It will also try to put the man pages in a
  2060. !     reasonable place.  It will not nroff the man page, however.  You
  2061. !     may need to be root to run make install.  If you are not root, you
  2062. !     must own the directories in question and you should ignore any
  2063. !     messages about chown not working.
  2064.   
  2065. !     make install will install the following:
  2066.       perl,
  2067.           perl5.nnn    where nnn is the current release number.  This
  2068.               will be a link to perl.
  2069. ***************
  2070. *** 192,197 ****
  2071. --- 208,214 ----
  2072.       s2p        sed-to-perl translator
  2073.       find2perl    find-to-perl translator
  2074.       h2xs        Converts C .h header files to Perl extensions.
  2075. +     perldoc        Tool to read perl's pod documentation.
  2076.       pod2html,    Converters from perl's pod documentation format
  2077.       pod2latex, and     to other useful formats.
  2078.       pod2man
  2079. ***************
  2080. *** 200,205 ****
  2081. --- 217,225 ----
  2082.               Configure, usually under /usr/local/lib/perl5/.
  2083.       man pages    in the location specified to Configure, usually
  2084.               something like /usr/local/man/man1.
  2085. +     module        in the location specified to Configure, usually
  2086. +     man pages    under /usr/local/lib/perl5/man/man3.
  2087. +     pod/*.pod    in $privlib/pod/.
  2088.   
  2089.       Perl's *.h header files and the libperl.a library are also
  2090.       installed under $archlib so that you may later build new
  2091. ***************
  2092. *** 208,216 ****
  2093.       make install may also offer to install perl in a "standard" location.
  2094.       
  2095.       Most of the documentation in the pod/ directory is also available 
  2096. !     in HTML format.  Type
  2097.       cd pod; make html; cd ..
  2098. !     to generate the html versions.
  2099.   
  2100.   7)  Read the manual entries before running perl.
  2101.   
  2102. --- 228,238 ----
  2103.       make install may also offer to install perl in a "standard" location.
  2104.       
  2105.       Most of the documentation in the pod/ directory is also available 
  2106. !     in HTML and LaTeX format.  Type
  2107.       cd pod; make html; cd ..
  2108. !     to generate the html versions, and
  2109. !     cd pod; make tex; cd ..
  2110. !     to generate the LaTeX versions.
  2111.   
  2112.   7)  Read the manual entries before running perl.
  2113.   
  2114. Index: README.vms
  2115. *** perl5.001h/README.vms    Mon Mar  6 19:59:34 1995
  2116. --- perl5.001i/README.vms    Tue May 30 14:43:49 1995
  2117. ***************
  2118. *** 211,217 ****
  2119.   internals, you might want to subscribe to the perl5-porters mailing list.  You
  2120.   can do this by sending a message to perl5-porters-request@nicoh.com, containing
  2121.   the single line
  2122. ! subscribe perl5-porters Your Name Here
  2123.   This is a moderately high-volume list at the moment (25-50 messages/day).
  2124.   
  2125.   Finally, if you're interested in ongoing information about the VMS port, you
  2126. --- 211,217 ----
  2127.   internals, you might want to subscribe to the perl5-porters mailing list.  You
  2128.   can do this by sending a message to perl5-porters-request@nicoh.com, containing
  2129.   the single line
  2130. ! subscribe perl5-porters
  2131.   This is a moderately high-volume list at the moment (25-50 messages/day).
  2132.   
  2133.   Finally, if you're interested in ongoing information about the VMS port, you
  2134. Index: config_H
  2135. Prereq:  3.0.1.3 
  2136. *** perl5.001h/config_H    Thu Apr  6 14:10:48 1995
  2137. --- perl5.001i/config_H    Tue May 30 16:01:51 1995
  2138. ***************
  2139. *** 1,4 ****
  2140. ! /* This file (config.H) is a sample config.h file.  If you are unable
  2141.      to successfully run Configure, copy this file to config.h and
  2142.      edit it to suit your system.
  2143.   */
  2144. --- 1,4 ----
  2145. ! /* This file (config_H) is a sample config.h file.  If you are unable
  2146.      to successfully run Configure, copy this file to config.h and
  2147.      edit it to suit your system.
  2148.   */
  2149. ***************
  2150. *** 14,20 ****
  2151.    * $Id: Config_h.U,v 3.0.1.3 1995/01/30 14:25:39 ram Exp $
  2152.    */
  2153.   
  2154. ! /* Configuration time: Wed Apr  5 14:50:33 EDT 1995
  2155.    * Configured by: andy
  2156.    * Target system: crystal crystal 3.2 2 i386 
  2157.    */
  2158. --- 14,20 ----
  2159.    * $Id: Config_h.U,v 3.0.1.3 1995/01/30 14:25:39 ram Exp $
  2160.    */
  2161.   
  2162. ! /* Configuration time: Tue May 30 13:05:37 EDT 1995
  2163.    * Configured by: andy
  2164.    * Target system: crystal crystal 3.2 2 i386 
  2165.    */
  2166. ***************
  2167. *** 161,167 ****
  2168.    *    This symbol, if defined, indicates that the chsize routine is available
  2169.    *    to truncate files.  You might need a -lx to get this routine.
  2170.    */
  2171. ! #define    HAS_CHSIZE        /**/
  2172.   
  2173.   /* VOID_CLOSEDIR:
  2174.    *    This symbol, if defined, indicates that the closedir() routine
  2175. --- 161,167 ----
  2176.    *    This symbol, if defined, indicates that the chsize routine is available
  2177.    *    to truncate files.  You might need a -lx to get this routine.
  2178.    */
  2179. ! /*#define    HAS_CHSIZE        /**/
  2180.   
  2181.   /* VOID_CLOSEDIR:
  2182.    *    This symbol, if defined, indicates that the closedir() routine
  2183. ***************
  2184. *** 296,301 ****
  2185. --- 296,306 ----
  2186.    *    a macro using sprintf("%g") is used. Arguments for the Gconvert
  2187.    *    macro are: value, number of digits, whether trailing zeros should
  2188.    *    be retained, and the output buffer.
  2189. +  *    Possible values are:
  2190. +  *        d_Gconvert='gconvert((x),(n),(t),(b))'
  2191. +  *        d_Gconvert='gcvt((x),(n),(b))'
  2192. +  *        d_Gconvert='sprintf((b),"%.*g",(n),(x))'
  2193. +  *    The last two assume trailing zeros should not be kept.
  2194.    */
  2195.   #define Gconvert(x,n,t,b) sprintf((b),"%.*g",(n),(x))
  2196.   
  2197. ***************
  2198. *** 393,404 ****
  2199.    */
  2200.   #define HAS_LINK    /**/
  2201.   
  2202. - /* USE_LINUX_STDIO:
  2203. -  *    This symbol is defined if this system has a FILE structure declaring
  2204. -  *    _IO_read_base, _IO_read_ptr, and _IO_read_end in stdio.h.
  2205. -  */
  2206. - /*#define USE_LINUX_STDIO     /**/
  2207.   /* HAS_LOCALECONV:
  2208.    *    This symbol, if defined, indicates that the localeconv routine is
  2209.    *    available for numeric and monetary formatting conventions.
  2210. --- 398,403 ----
  2211. ***************
  2212. *** 735,745 ****
  2213.    */
  2214.   /*#define USE_STAT_BLOCKS     /**/
  2215.   
  2216. ! /* USE_STD_STDIO:
  2217. !  *    This symbol is defined if this system has a FILE structure declaring
  2218. !  *    _ptr and _cnt in stdio.h.
  2219. !  */
  2220. ! #define USE_STD_STDIO     /**/
  2221.   
  2222.   /* HAS_STRCHR:
  2223.    *    This symbol is defined to indicate that the strchr()/strrchr()
  2224. --- 734,788 ----
  2225.    */
  2226.   /*#define USE_STAT_BLOCKS     /**/
  2227.   
  2228. ! /* USE_STDIO_PTR:
  2229. !  *    This symbol is defined if the _ptr and _cnt fields (or similar)
  2230. !  *    of the stdio FILE structure can be used to access the stdio buffer
  2231. !  *    for a file handle.  If this is defined, then the FILE_ptr(fp)
  2232. !  *    and FILE_cnt(fp) macros will also be defined and should be used
  2233. !  *    to access these fields.
  2234. !  */
  2235. ! /* USE_STDIO_BASE:
  2236. !  *    This symbol is defined if the _base field (or similar) of the
  2237. !  *    stdio FILE structure can be used to access the stdio buffer for
  2238. !  *    a file handle.  If this is defined, then the FILE_base(fp) macro
  2239. !  *    will also be defined and should be used to access this field.
  2240. !  *    Also, the FILE_bufsiz(fp) macro will be defined and should be used
  2241. !  *    to determine the number of bytes in the buffer.  USE_STDIO_BASE
  2242. !  *    will never be defined unless USE_STDIO_PTR is.
  2243. !  */
  2244. ! #define USE_STDIO_PTR     /**/
  2245. ! #define USE_STDIO_BASE     /**/
  2246. ! /* FILE_ptr:
  2247. !  *    This macro is used to access the _ptr field (or equivalent) of the
  2248. !  *    FILE structure pointed to by its argument. This macro will always be
  2249. !  *    defined if USE_STDIO_PTR is defined.
  2250. !  */
  2251. ! /* FILE_cnt:
  2252. !  *    This macro is used to access the _cnt field (or equivalent) of the
  2253. !  *    FILE structure pointed to by its argument. This macro will always be
  2254. !  *    defined if USE_STDIO_PTR is defined.
  2255. !  */
  2256. ! #ifdef USE_STDIO_PTR
  2257. ! #define FILE_ptr(fp)    ((fp)->_ptr)
  2258. ! #define FILE_cnt(fp)    ((fp)->_cnt)
  2259. ! #endif
  2260. ! /* FILE_base:
  2261. !  *    This macro is used to access the _base field (or equivalent) of the
  2262. !  *    FILE structure pointed to by its argument. This macro will always be
  2263. !  *    defined if USE_STDIO_BASE is defined.
  2264. !  */
  2265. ! /* FILE_bufsiz:
  2266. !  *    This macro is used to determine the number of bytes in the I/O
  2267. !  *    buffer pointed to by _base field (or equivalent) of the FILE
  2268. !  *    structure pointed to its argument. This macro will always be defined
  2269. !  *    if USE_STDIO_BASE is defined.
  2270. !  */
  2271. ! #ifdef USE_STDIO_BASE
  2272. ! #define FILE_base(fp)    ((fp)->_base)
  2273. ! #define FILE_bufsiz(fp)    ((fp)->_cnt + (fp)->_ptr - (fp)->_base)
  2274. ! #endif
  2275.   
  2276.   /* HAS_STRCHR:
  2277.    *    This symbol is defined to indicate that the strchr()/strrchr()
  2278. ***************
  2279. *** 1023,1029 ****
  2280.   /*#define I_MEMORY        /**/
  2281.   
  2282.   /* I_NDBM:
  2283. !  *    This symbol, if defined, indicates that ndbm.h exists and should
  2284.    *    be included.
  2285.    */
  2286.   #define I_NDBM    /**/
  2287. --- 1066,1072 ----
  2288.   /*#define I_MEMORY        /**/
  2289.   
  2290.   /* I_NDBM:
  2291. !  *    This symbol, if defined, indicates that <ndbm.h> exists and should
  2292.    *    be included.
  2293.    */
  2294.   #define I_NDBM    /**/
  2295. ***************
  2296. *** 1340,1357 ****
  2297.   #define M_VOID            /* Xenix strikes again */
  2298.   #endif
  2299.   
  2300. - /* EUNICE:
  2301. -  *    This symbol, if defined, indicates that the program is being compiled
  2302. -  *    under the EUNICE package under VMS.  The program will need to handle
  2303. -  *    things like files that don't go away the first time you unlink them,
  2304. -  *    due to version numbering.  It will also need to compensate for lack
  2305. -  *    of a respectable link() command.
  2306. -  */
  2307.   /* VMS:
  2308.    *    This symbol, if defined, indicates that the program is running under
  2309.    *    VMS.  It is currently only set in conjunction with the EUNICE symbol.
  2310.    */
  2311. - /*#define EUNICE        /**/
  2312.   /*#define VMS        /**/
  2313.   
  2314.   /* LOC_SED:
  2315. --- 1383,1392 ----
  2316. ***************
  2317. *** 1399,1403 ****
  2318. --- 1434,1444 ----
  2319.    *    This symbol, if defined, indicates that we're using our own malloc.
  2320.    */
  2321.   #define MYMALLOC            /**/
  2322. + /* SITELIB_EXP:
  2323. +  *    This symbol contains the ~name expanded version of SITELIB, to be used
  2324. +  *    in programs that are not prepared to deal with ~ expansion at run-time.
  2325. +  */
  2326. + /*#define SITELIB_EXP ""        /**/
  2327.   
  2328.   #endif
  2329. Index: config_h.SH
  2330. Prereq:  3.0.1.3 
  2331. *** perl5.001h/config_h.SH    Mon Apr 17 15:55:59 1995
  2332. --- perl5.001i/config_h.SH    Wed May 31 09:19:09 1995
  2333. ***************
  2334. *** 310,315 ****
  2335. --- 310,320 ----
  2336.    *    a macro using sprintf("%g") is used. Arguments for the Gconvert
  2337.    *    macro are: value, number of digits, whether trailing zeros should
  2338.    *    be retained, and the output buffer.
  2339. +  *    Possible values are:
  2340. +  *        d_Gconvert='gconvert((x),(n),(t),(b))'
  2341. +  *        d_Gconvert='gcvt((x),(n),(b))'
  2342. +  *        d_Gconvert='sprintf((b),"%.*g",(n),(x))'
  2343. +  *    The last two assume trailing zeros should not be kept.
  2344.    */
  2345.   #define Gconvert(x,n,t,b) $d_Gconvert
  2346.   
  2347. ***************
  2348. *** 407,418 ****
  2349.    */
  2350.   #$d_link HAS_LINK    /**/
  2351.   
  2352. - /* USE_LINUX_STDIO:
  2353. -  *    This symbol is defined if this system has a FILE structure declaring
  2354. -  *    _IO_read_base, _IO_read_ptr, and _IO_read_end in stdio.h.
  2355. -  */
  2356. - #$d_linuxstd USE_LINUX_STDIO     /**/
  2357.   /* HAS_LOCALECONV:
  2358.    *    This symbol, if defined, indicates that the localeconv routine is
  2359.    *    available for numeric and monetary formatting conventions.
  2360. --- 412,417 ----
  2361. ***************
  2362. *** 749,759 ****
  2363.    */
  2364.   #$d_statblks USE_STAT_BLOCKS     /**/
  2365.   
  2366. ! /* USE_STD_STDIO:
  2367. !  *    This symbol is defined if this system has a FILE structure declaring
  2368. !  *    _ptr and _cnt in stdio.h.
  2369. !  */
  2370. ! #$d_stdstdio USE_STD_STDIO     /**/
  2371.   
  2372.   /* HAS_STRCHR:
  2373.    *    This symbol is defined to indicate that the strchr()/strrchr()
  2374. --- 748,802 ----
  2375.    */
  2376.   #$d_statblks USE_STAT_BLOCKS     /**/
  2377.   
  2378. ! /* USE_STDIO_PTR:
  2379. !  *    This symbol is defined if the _ptr and _cnt fields (or similar)
  2380. !  *    of the stdio FILE structure can be used to access the stdio buffer
  2381. !  *    for a file handle.  If this is defined, then the FILE_ptr(fp)
  2382. !  *    and FILE_cnt(fp) macros will also be defined and should be used
  2383. !  *    to access these fields.
  2384. !  */
  2385. ! /* USE_STDIO_BASE:
  2386. !  *    This symbol is defined if the _base field (or similar) of the
  2387. !  *    stdio FILE structure can be used to access the stdio buffer for
  2388. !  *    a file handle.  If this is defined, then the FILE_base(fp) macro
  2389. !  *    will also be defined and should be used to access this field.
  2390. !  *    Also, the FILE_bufsiz(fp) macro will be defined and should be used
  2391. !  *    to determine the number of bytes in the buffer.  USE_STDIO_BASE
  2392. !  *    will never be defined unless USE_STDIO_PTR is.
  2393. !  */
  2394. ! #$d_stdstdio USE_STDIO_PTR     /**/
  2395. ! #$d_stdiobase USE_STDIO_BASE     /**/
  2396. ! /* FILE_ptr:
  2397. !  *    This macro is used to access the _ptr field (or equivalent) of the
  2398. !  *    FILE structure pointed to by its argument. This macro will always be
  2399. !  *    defined if USE_STDIO_PTR is defined.
  2400. !  */
  2401. ! /* FILE_cnt:
  2402. !  *    This macro is used to access the _cnt field (or equivalent) of the
  2403. !  *    FILE structure pointed to by its argument. This macro will always be
  2404. !  *    defined if USE_STDIO_PTR is defined.
  2405. !  */
  2406. ! #ifdef USE_STDIO_PTR
  2407. ! #define FILE_ptr(fp)    $stdio_ptr
  2408. ! #define FILE_cnt(fp)    $stdio_cnt
  2409. ! #endif
  2410. ! /* FILE_base:
  2411. !  *    This macro is used to access the _base field (or equivalent) of the
  2412. !  *    FILE structure pointed to by its argument. This macro will always be
  2413. !  *    defined if USE_STDIO_BASE is defined.
  2414. !  */
  2415. ! /* FILE_bufsiz:
  2416. !  *    This macro is used to determine the number of bytes in the I/O
  2417. !  *    buffer pointed to by _base field (or equivalent) of the FILE
  2418. !  *    structure pointed to its argument. This macro will always be defined
  2419. !  *    if USE_STDIO_BASE is defined.
  2420. !  */
  2421. ! #ifdef USE_STDIO_BASE
  2422. ! #define FILE_base(fp)    $stdio_base
  2423. ! #define FILE_bufsiz(fp)    $stdio_bufsiz
  2424. ! #endif
  2425.   
  2426.   /* HAS_STRCHR:
  2427.    *    This symbol is defined to indicate that the strchr()/strrchr()
  2428. ***************
  2429. *** 1037,1043 ****
  2430.   #$i_memory I_MEMORY        /**/
  2431.   
  2432.   /* I_NDBM:
  2433. !  *    This symbol, if defined, indicates that ndbm.h exists and should
  2434.    *    be included.
  2435.    */
  2436.   #$i_ndbm I_NDBM    /**/
  2437. --- 1080,1086 ----
  2438.   #$i_memory I_MEMORY        /**/
  2439.   
  2440.   /* I_NDBM:
  2441. !  *    This symbol, if defined, indicates that <ndbm.h> exists and should
  2442.    *    be included.
  2443.    */
  2444.   #$i_ndbm I_NDBM    /**/
  2445. ***************
  2446. *** 1354,1371 ****
  2447.   #define M_VOID            /* Xenix strikes again */
  2448.   #endif
  2449.   
  2450. - /* EUNICE:
  2451. -  *    This symbol, if defined, indicates that the program is being compiled
  2452. -  *    under the EUNICE package under VMS.  The program will need to handle
  2453. -  *    things like files that don't go away the first time you unlink them,
  2454. -  *    due to version numbering.  It will also need to compensate for lack
  2455. -  *    of a respectable link() command.
  2456. -  */
  2457.   /* VMS:
  2458.    *    This symbol, if defined, indicates that the program is running under
  2459.    *    VMS.  It is currently only set in conjunction with the EUNICE symbol.
  2460.    */
  2461. - #$d_eunice EUNICE        /**/
  2462.   #$d_eunice VMS        /**/
  2463.   
  2464.   /* LOC_SED:
  2465. --- 1397,1406 ----
  2466. ***************
  2467. *** 1413,1418 ****
  2468. --- 1448,1459 ----
  2469.    *    This symbol, if defined, indicates that we're using our own malloc.
  2470.    */
  2471.   #$d_mymalloc MYMALLOC            /**/
  2472. + /* SITELIB_EXP:
  2473. +  *    This symbol contains the ~name expanded version of SITELIB, to be used
  2474. +  *    in programs that are not prepared to deal with ~ expansion at run-time.
  2475. +  */
  2476. + #$d_sitelib SITELIB_EXP "$sitelibexp"        /**/
  2477.   
  2478.   #endif
  2479.   !GROK!THIS!
  2480. Index: configpm
  2481. *** perl5.001h/configpm    Sun Mar 12 02:35:40 1995
  2482. --- perl5.001i/configpm    Thu May 25 11:41:03 1995
  2483. ***************
  2484. *** 29,34 ****
  2485. --- 29,80 ----
  2486.   
  2487.   ENDOFBEG
  2488.   
  2489. + print CONFIG <<'EndOfPod';
  2490. + =head1 NAME
  2491. + Config - access Perl configuration option
  2492. + =head1 SYNOPSIS
  2493. +     use Config;
  2494. +     if ($Config{'cc'} =~ /gcc/) {
  2495. +     print "built by gcc\n";
  2496. +     } 
  2497. + =head1 DESCRIPTION
  2498. + The Config module contains everything that was available to the
  2499. + C<Configure> program at Perl build time.  Shell variables from
  2500. + F<config.sh> are stored in the readonly-variable C<%Config>, indexed by
  2501. + their names.
  2502. + =head1 EXAMPLE
  2503. + Here's a more sophisticated example of using %Config:
  2504. +     use Config;
  2505. +     defined $Config{sig_name} || die "No sigs?";
  2506. +     foreach $name (split(' ', $Config{sig_name})) {
  2507. +     $signo{$name} = $i;
  2508. +     $signame[$i] = $name;
  2509. +     $i++;
  2510. +     }   
  2511. +     print "signal #17 = $signame[17]\n";
  2512. +     if ($signo{ALRM}) { 
  2513. +     print "SIGALRM is $signo{ALRM}\n";
  2514. +     }   
  2515. + =head1 NOTE
  2516. + This module contains a good example of how to make a variable
  2517. + readonly to those outside of it.  
  2518. + =cut
  2519. + EndOfPod
  2520.   @fast{@fast} = @fast;
  2521.   @extensions{@extensions} = @extensions;
  2522.   @non_v=();
  2523. Index: configure
  2524. *** /dev/null    Wed May 31 09:31:33 1995
  2525. --- perl5.001i/configure    Fri May 26 14:32:51 1995
  2526. ***************
  2527. *** 0 ****
  2528. --- 1,65 ----
  2529. + #! /bin/sh
  2530. + # GNU configure-like front end to metaconfig's Configure.
  2531. + #
  2532. + # Written by Andy Dougherty (doughera@lafcol.lafayette.edu)
  2533. + # and matthew green (mrg@mame.mu.oz.au)
  2534. + #
  2535. + # public domain.
  2536. + opts=''
  2537. + for f in $*
  2538. + do
  2539. +   case $f in
  2540. +     --help)
  2541. +       echo This is GNU configure-like front end for a MetaConfig Configure.
  2542. +       echo It understands the follow GNU configure options:
  2543. +       echo "  --prefix=PREFIX"
  2544. +       echo "  --help"
  2545. +       echo ""
  2546. +       echo And these environment variables:
  2547. +       echo "  CFLAGS"
  2548. +       echo "  CC"
  2549. +       echo "  DEFS"
  2550. +       echo 0
  2551. +       ;;
  2552. +     --prefix=*)
  2553. +       shift
  2554. +       arg=`echo $f | sed 's/--prefix=/-Dprefix=/'`
  2555. +       opts="$opts $arg"
  2556. +       ;;
  2557. +     --*)
  2558. +       opt=`echo $f | sed 's/=.*//'`
  2559. +       echo This GNU configure front end does not understand $opt
  2560. +       exit 1
  2561. +       ;;
  2562. +     *)
  2563. +       shift
  2564. +       opts="$opts $f"
  2565. +       ;;
  2566. +   esac
  2567. + done
  2568. + case "$CC" in
  2569. +   '') ;;
  2570. +   *) opts="$opts -Dcc='$CC'" ;;
  2571. + esac
  2572. + # join DEFS and CFLAGS together.
  2573. + ccflags=''
  2574. + if test "x$DEFS" != x
  2575. + then
  2576. +   ccflags=$DEFS
  2577. + fi
  2578. + if test "x$CFLAGS" != x
  2579. + then
  2580. +   ccflags="$ccflags $CFLAGS"
  2581. + fi
  2582. + if test "x$ccflags" != x
  2583. + then
  2584. +   opts="$opts -Dccflags='$ccflags'"
  2585. + fi
  2586. + echo ./Configure "$opts" -des
  2587. + ./Configure "$opts" -des
  2588. Index: doio.c
  2589. *** perl5.001h/doio.c    Fri Mar 31 15:44:07 1995
  2590. --- perl5.001i/doio.c    Thu May 18 15:31:16 1995
  2591. ***************
  2592. *** 567,574 ****
  2593.   
  2594.       while (IoIFP(io)) {
  2595.   
  2596. ! #ifdef USE_STD_STDIO            /* (the code works without this) */
  2597. !     if (IoIFP(io)->_cnt > 0)    /* cheat a little, since */
  2598.           return FALSE;        /* this is the most usual case */
  2599.   #endif
  2600.   
  2601. --- 567,574 ----
  2602.   
  2603.       while (IoIFP(io)) {
  2604.   
  2605. ! #ifdef USE_STDIO_PTR            /* (the code works without this) */
  2606. !     if (FILE_cnt(IoIFP(io)) > 0)    /* cheat a little, since */
  2607.           return FALSE;        /* this is the most usual case */
  2608.   #endif
  2609.   
  2610. ***************
  2611. *** 577,585 ****
  2612.           (void)ungetc(ch, IoIFP(io));
  2613.           return FALSE;
  2614.       }
  2615. ! #ifdef USE_STD_STDIO
  2616. !     if (IoIFP(io)->_cnt < -1)
  2617. !         IoIFP(io)->_cnt = -1;
  2618.   #endif
  2619.       if (op->op_flags & OPf_SPECIAL) { /* not necessarily a real EOF yet? */
  2620.           if (!nextargv(argvgv))    /* get another fp handy */
  2621. --- 577,585 ----
  2622.           (void)ungetc(ch, IoIFP(io));
  2623.           return FALSE;
  2624.       }
  2625. ! #ifdef USE_STDIO_PTR
  2626. !     if (FILE_cnt(IoIFP(io)) < -1)
  2627. !         FILE_cnt(IoIFP(io)) = -1;
  2628.   #endif
  2629.       if (op->op_flags & OPf_SPECIAL) { /* not necessarily a real EOF yet? */
  2630.           if (!nextargv(argvgv))    /* get another fp handy */
  2631. Index: embed.h
  2632. *** perl5.001h/embed.h    Sun Mar 12 01:06:43 1995
  2633. --- perl5.001i/embed.h    Wed May 24 10:57:29 1995
  2634. ***************
  2635. *** 38,45 ****
  2636.   #define cop_seqmax    Perl_cop_seqmax
  2637.   #define cos_amg        Perl_cos_amg
  2638.   #define cryptseen    Perl_cryptseen
  2639. - #define cryptswitch_add    Perl_cryptswitch_add
  2640. - #define cryptswitch_fp    Perl_cryptswitch_fp
  2641.   #define cshlen        Perl_cshlen
  2642.   #define cshname        Perl_cshname
  2643.   #define curcop        Perl_curcop
  2644. --- 38,43 ----
  2645. ***************
  2646. *** 61,66 ****
  2647. --- 59,67 ----
  2648.   #define expect        Perl_expect
  2649.   #define expectterm    Perl_expectterm
  2650.   #define fallback_amg    Perl_fallback_amg
  2651. + #define filter_add    Perl_filter_add
  2652. + #define filter_del    Perl_filter_del
  2653. + #define filter_read    Perl_filter_read
  2654.   #define fold        Perl_fold
  2655.   #define freq        Perl_freq
  2656.   #define ge_amg        Perl_ge_amg
  2657. ***************
  2658. *** 179,184 ****
  2659. --- 180,186 ----
  2660.   #define retstack_ix    Perl_retstack_ix
  2661.   #define retstack_max    Perl_retstack_max
  2662.   #define rsfp        Perl_rsfp
  2663. + #define rsfp_filters    Perl_rsfp_filters
  2664.   #define rshift_amg    Perl_rshift_amg
  2665.   #define rshift_ass_amg    Perl_rshift_ass_amg
  2666.   #define savestack    Perl_savestack
  2667. Index: global.sym
  2668. *** perl5.001h/global.sym    Sun Mar 12 01:06:14 1995
  2669. --- perl5.001i/global.sym    Tue May 23 11:17:36 1995
  2670. ***************
  2671. *** 35,42 ****
  2672.   cop_seqmax
  2673.   cos_amg
  2674.   cryptseen
  2675. - cryptswitch_add
  2676. - cryptswitch_fp
  2677.   cshlen
  2678.   cshname
  2679.   curcop
  2680. --- 35,40 ----
  2681. ***************
  2682. *** 58,63 ****
  2683. --- 56,64 ----
  2684.   expect
  2685.   expectterm
  2686.   fallback_amg
  2687. + filter_add
  2688. + filter_del
  2689. + filter_read
  2690.   fold
  2691.   freq
  2692.   ge_amg
  2693. ***************
  2694. *** 176,181 ****
  2695. --- 177,183 ----
  2696.   retstack_ix
  2697.   retstack_max
  2698.   rsfp
  2699. + rsfp_filters
  2700.   rshift_amg
  2701.   rshift_ass_amg
  2702.   savestack
  2703. Index: gv.c
  2704. *** perl5.001h/gv.c    Tue Feb 21 19:38:56 1995
  2705. --- perl5.001i/gv.c    Wed May 10 10:51:53 1995
  2706. ***************
  2707. *** 147,155 ****
  2708.       if (GvCVGEN(topgv) >= sub_generation)
  2709.           return topgv;    /* valid cached inheritance */
  2710.       if (!GvCVGEN(topgv)) {    /* not an inheritance cache */
  2711. !         if (CvROOT(cv) || CvXSUB(cv))
  2712. !         return topgv;    /* real definition */
  2713. !         /* a simple undef -- save the slot for possible re-use */
  2714.       }
  2715.       else {
  2716.           /* stale cached entry, just junk it */
  2717. --- 147,153 ----
  2718.       if (GvCVGEN(topgv) >= sub_generation)
  2719.           return topgv;    /* valid cached inheritance */
  2720.       if (!GvCVGEN(topgv)) {    /* not an inheritance cache */
  2721. !         return topgv;
  2722.       }
  2723.       else {
  2724.           /* stale cached entry, just junk it */
  2725. Index: hints/README.hints
  2726. *** perl5.001h/hints/README.hints    Tue Oct 18 12:32:24 1994
  2727. --- perl5.001i/hints/README.hints    Fri May  5 14:12:06 1995
  2728. ***************
  2729. *** 1,5 ****
  2730.   These files are used by Configure to set things which Configure either
  2731. ! can't or doesn't guess properly.  Most of these hints files are from
  2732.   perl4.  They may or may not work with perl5, but they are probably a
  2733.   good starting point.
  2734.   
  2735. --- 1,5 ----
  2736.   These files are used by Configure to set things which Configure either
  2737. ! can't or doesn't guess properly.  Many of these hints files are from
  2738.   perl4.  They may or may not work with perl5, but they are probably a
  2739.   good starting point.
  2740.   
  2741. ***************
  2742. *** 7,12 ****
  2743. --- 7,13 ----
  2744.   of perl5 and are probably reasonably close to being correct:
  2745.   
  2746.   aix.sh
  2747. + aux.sh
  2748.   bsd386.sh
  2749.   dec_osf.sh
  2750.   dgux.sh
  2751. ***************
  2752. *** 15,20 ****
  2753. --- 16,22 ----
  2754.   hpux_9.sh
  2755.   irix_4.sh
  2756.   irix_5.sh
  2757. + irix_6.sh
  2758.   isc.sh
  2759.   linux.sh
  2760.   netbsd.sh
  2761. ***************
  2762. *** 33,39 ****
  2763.   3b1.sh
  2764.   altos486.sh
  2765.   apollo.sh
  2766. - aux.sh
  2767.   dnix.sh
  2768.   dynix.sh
  2769.   fps.sh
  2770. --- 35,40 ----
  2771. Index: hints/aux.sh
  2772. *** perl5.001h/hints/aux.sh    Tue Oct 18 12:32:35 1994
  2773. --- perl5.001i/hints/aux.sh    Fri May  5 10:59:49 1995
  2774. ***************
  2775. *** 1,3 ****
  2776. ! optimize='-O'
  2777. ! ccflags="$ccflags -B/usr/lib/big/ -DPARAM_NEEDS_TYPES"
  2778. ! POSIX_cflags='ccflags="$ccflags -ZP -Du_long=U32"'
  2779. --- 1,20 ----
  2780. ! # hints/aux.sh
  2781. ! #
  2782. ! # Improved by Jake Hamby <jehamby@lightside.com> to support both Apple CC
  2783. ! # and GNU CC.  Tested on A/UX 3.1.1 with GCC 2.6.3.
  2784. ! # Last modified 
  2785. ! # Fri May  5 10:59:43 EDT 1995
  2786. ! case "$cc" in
  2787. ! gcc)    optimize='-O2'
  2788. !     ccflags="$ccflags -D_POSIX_SOURCE"
  2789. !     echo "Setting hints for GNU CC."
  2790. !     ;;
  2791. ! *)    optimize='-O'
  2792. !     ccflags="$ccflags -B/usr/lib/big/ -DPARAM_NEEDS_TYPES -D_POSIX_SOURCE"
  2793. !     POSIX_cflags='ccflags="$ccflags -ZP -Du_long=U32"'
  2794. !     echo "Setting hints for Apple's CC.  If you plan to use"
  2795. !     echo "GNU CC, please rerun this Configure script as:"
  2796. !     echo "./Configure -Dcc=gcc"
  2797. !     ;;
  2798. ! esac
  2799. Index: hints/cxux.sh
  2800. *** perl5.001h/hints/cxux.sh    Fri Apr 14 10:40:15 1995
  2801. --- perl5.001i/hints/cxux.sh    Wed May 31 09:15:30 1995
  2802. ***************
  2803. *** 74,85 ****
  2804.   ccdlflags='-Zelf -Zlink=dynamic -Wl,-Bexport -u sigaction'
  2805.   lddlflags='-Zlink=so'
  2806.   
  2807. - # Configure imagines that stdio.h is "standard", but it really isn't.
  2808. - # Things like the -T and -B file test operators (on file handles) fail when
  2809. - # it tries to treat it as "standard"
  2810. - #
  2811. - d_stdstdio='undef'
  2812.   # Configure imagines that it sees a pw_quota field, but it is really in a
  2813.   # different structure than the one it thinks it is looking at.  WARNING:
  2814.   # Setting this here in the hints file doesn't help. You need to fix this by
  2815. --- 74,79 ----
  2816. Index: hints/epix.sh
  2817. *** /dev/null    Wed May 31 09:31:33 1995
  2818. --- perl5.001i/hints/epix.sh    Wed May 31 11:59:41 1995
  2819. ***************
  2820. *** 0 ****
  2821. --- 1,73 ----
  2822. + # epix.sh
  2823. + # Hint file for EP/IX on CDC RISC boxes.
  2824. + #
  2825. + # From: Stanley Donald Capelik <sd9sdc@hp100.den.mmc.com>
  2826. + # Modified by Andy Dougherty   <doughera@lafcol.lafayette.edu>
  2827. + # Last modified:  Mon May  8 15:29:18 EDT 1995
  2828. + #
  2829. + #  This hint file appears to be based on the svr4 hints for perl5.000,
  2830. + #  with some CDC-specific additions.  I've tried to updated it to
  2831. + #  match the 5.001 svr4 hints, which allow for dynamic loading,
  2832. + #  but I have no way of testing the resulting file.
  2833. + #
  2834. + #  There were also some contradictions that I've tried to straighten
  2835. + #  out, but I'm not sure I got them all right.
  2836. + #
  2837. + # Edit config.sh to change shmattype from 'char *' to 'void *'"
  2838. + # Use Configure -Dcc=gcc to use gcc.
  2839. + case "$cc" in
  2840. + '') cc='/bin/cc3.11'
  2841. +     test -f $cc || cc='/usr/ccs/bin/cc'
  2842. +     ;;
  2843. + esac
  2844. + usrinc='/svr4/usr/include'
  2845. + # Various things that Configure apparently doesn't get right.
  2846. + strings='/svr4/usr/include/string.h'
  2847. + timeincl='/svr4/usr/include/sys/time.h '
  2848. + libc='/svr4/usr/lib/libc.a'
  2849. + libpth='/svr4/usr/lib /svr4/usr/lib/cmplrs/cc /usr/ccs/lib /svr4/lib /svr4/usr/ucblib'
  2850. + osname='epix2'
  2851. + archname='epix2'
  2852. + d_suidsafe='define'    # "./Configure -d" can't figure this out easilly
  2853. + d_flock='undef'
  2854. + # Old version had this, but I'm not sure why since the old version
  2855. + # also mucked around with libswanted.  This is also definitely wrong
  2856. + # if the user is trying to use DB_File or GDBM_File.
  2857. + # libs='-lsocket -lnsl -ldbm -ldl -lc -lcrypt -lm -lucb'
  2858. + # We include support for using libraries in /usr/ucblib, but the setting
  2859. + # of libswanted excludes some libraries found there.  You may want to
  2860. + # prevent "ucb" from being removed from libswanted and see if perl will
  2861. + # build on your system.
  2862. + ldflags='-non_shared -systype svr4 -L/svr4/usr/lib -L/svr4/usr/lib/cmplrs/cc -L/usr/ccs/lib -L/svr4/usr/ucblib'
  2863. + ccflags='-systype svr4 -D__STDC__=0 -I/svr4/usr/include -I/svr4/usr/ucbinclude'
  2864. + cppflags='-D__STDC__=0 -I/svr4/usr/include -I/svr4/usr/ucbinclude'
  2865. + # Don't use problematic libraries:
  2866. + libswanted=`echo " $libswanted " | sed -e 's/ malloc / /'` # -e 's/ ucb / /'`
  2867. + # libmalloc.a - Probably using Perl's malloc() anyway.
  2868. + # libucb.a - Remove it if you have problems ld'ing.  We include it because
  2869. + #   it is needed for ODBM_File and NDBM_File extensions.
  2870. + if [ -r /usr/ucblib/libucb.a ]; then    # If using BSD-compat. library:
  2871. +     # Use the "native" counterparts, not the BSD emulation stuff:
  2872. +     d_bcmp='undef'; d_bcopy='undef'; d_bzero='undef'; d_safebcpy='undef'
  2873. +     d_index='undef'; d_killpg='undef'; d_getprior='undef'; d_setprior='undef'
  2874. +     d_setlinebuf='undef'; d_setregid='undef'; d_setreuid='undef'
  2875. + fi
  2876. + lddlflags="-G $ldflags"    # Probably needed for dynamic loading
  2877. + cat <<'EOM' >&4
  2878. + If you wish to use dynamic linking, you must use 
  2879. +     LD_LIBRARY_PATH=`pwd`; export LD_LIBRARY_PATH
  2880. + or
  2881. +     setenv LD_LIBRARY_PATH `pwd`
  2882. + before running make.
  2883. + EOM
  2884. Index: hints/freebsd.sh
  2885. *** perl5.001h/hints/freebsd.sh    Tue Apr 11 11:34:29 1995
  2886. --- perl5.001i/hints/freebsd.sh    Mon May 22 14:23:20 1995
  2887. ***************
  2888. *** 10,15 ****
  2889. --- 10,19 ----
  2890.   # Ollivier Robert <Ollivier.Robert@keltia.frmug.fr.net>
  2891.   # Date: Sat, 8 Apr 1995 20:53:41 +0200 (MET DST)
  2892.   #
  2893. + # Additional 2.0.5 and 2.1 defined from
  2894. + # Ollivier Robert <Ollivier.Robert@keltia.frmug.fr.net>
  2895. + # Date: Fri, 12 May 1995 14:30:38 +0200 (MET DST)
  2896. + #
  2897.   # FreeBSD has the dynamic loading dl*() functions in /usr/lib/crt0.o,
  2898.   # so Configure doesn't find them (unless you abandon the nm scan).
  2899.   #
  2900. ***************
  2901. *** 18,24 ****
  2902.   # -DPIC is not used by perl proper) but the full define is included to 
  2903.   # be consistent with the FreeBSD general shared libs building process.
  2904.   #
  2905. ! # setreuid and friends are inherently broken in all versions of FreeBSD.
  2906.   #
  2907.   
  2908.   case "$osvers" in
  2909. --- 22,30 ----
  2910.   # -DPIC is not used by perl proper) but the full define is included to 
  2911.   # be consistent with the FreeBSD general shared libs building process.
  2912.   #
  2913. ! # setreuid and friends are inherently broken in all versions of FreeBSD
  2914. ! # before 2.1-current (before approx date 4/15/95). It is fixed in 2.0.5
  2915. ! # and what-will-be-2.1
  2916.   #
  2917.   
  2918.   case "$osvers" in
  2919. ***************
  2920. *** 35,41 ****
  2921.       d_setrgid='undef'
  2922.       d_setruid='undef'
  2923.       ;;
  2924. ! *)
  2925.       d_dlopen="$define"
  2926.       cccdlflags='-DPIC -fpic'
  2927.       lddlflags='-Bshareable $lddlflags'
  2928. --- 41,47 ----
  2929.       d_setrgid='undef'
  2930.       d_setruid='undef'
  2931.       ;;
  2932. ! 2.0-RELEASE*)
  2933.       d_dlopen="$define"
  2934.       cccdlflags='-DPIC -fpic'
  2935.       lddlflags='-Bshareable $lddlflags'
  2936. ***************
  2937. *** 44,49 ****
  2938. --- 50,70 ----
  2939.       d_setrgid='undef'
  2940.       d_setruid='undef'
  2941.       ;;
  2942. + #
  2943. + # Trying to cover 2.0.5, 2.1-current and future 2.1
  2944. + # It does not covert all 2.1-current versions as the output of uname
  2945. + # changed a few times.
  2946. + #
  2947. + 2.0.5*|2.0-BUILD|2.1*)
  2948. +     d_dlopen="$define"
  2949. +     cccdlflags='-DPIC -fpic'
  2950. +     lddlflags='-Bshareable $lddlflags'
  2951. +     # Are these defines necessary?  Doesn't Configure find them
  2952. +     # correctly?
  2953. +     d_setregid='define'
  2954. +     d_setreuid='define'
  2955. +     d_setrgid='define'
  2956. +     d_setruid='define'
  2957.   esac
  2958.   # Avoid telldir prototype conflict in pp_sys.c  (FreeBSD uses const DIR *)
  2959.   # Configure should test for this.  Volunteers?
  2960. Index: hints/irix_4.sh
  2961. *** perl5.001h/hints/irix_4.sh    Wed Feb  8 19:43:17 1995
  2962. --- perl5.001i/hints/irix_4.sh    Fri May  5 14:07:26 1995
  2963. ***************
  2964. *** 1,10 ****
  2965.   optimize='-O1'
  2966. ! usemymalloc='y'
  2967.   d_voidsig=define
  2968. - usevfork=false
  2969.   d_charsprf=undef
  2970. ! ccflags="-ansiposix -signed"
  2971. ! #
  2972.   # This hint due thanks Hershel Walters <walters@smd4d.wes.army.mil>
  2973.   # Date: Tue, 31 Jan 1995 16:32:53 -0600 (CST)
  2974.   # Subject: IRIX4.0.4(.5? 5.0?) problems
  2975. --- 1,16 ----
  2976. + #irix_4.sh
  2977. + # Last modified Fri May  5 14:06:37 EDT 1995
  2978.   optimize='-O1'
  2979. ! # Does Configure really get these wrong? Why?
  2980.   d_voidsig=define
  2981.   d_charsprf=undef
  2982. ! case "$cc" in
  2983. ! *gcc) ccflags="$ccflags -D_BSD_TYPES" ;;
  2984. ! *) ccflags="$ccflags -ansiposix -signed" ;;
  2985. ! esac
  2986.   # This hint due thanks Hershel Walters <walters@smd4d.wes.army.mil>
  2987.   # Date: Tue, 31 Jan 1995 16:32:53 -0600 (CST)
  2988.   # Subject: IRIX4.0.4(.5? 5.0?) problems
  2989. Index: hints/irix_5.sh
  2990. *** perl5.001h/hints/irix_5.sh    Mon Apr 17 09:08:24 1995
  2991. --- perl5.001i/hints/irix_5.sh    Fri May  5 14:07:52 1995
  2992. ***************
  2993. *** 1,8 ****
  2994.   # irix_5.sh
  2995.   ld=ld
  2996.   i_time='define'
  2997. ! ccflags="$ccflags -D_POSIX_SOURCE -ansiposix -D_BSD_TYPES -Olimit 3000"
  2998.   lddlflags="-shared"
  2999.   set `echo X "$libswanted "|sed -e 's/ socket / /' -e 's/ nsl / /' -e 's/ dl / /'`
  3000.   shift
  3001.   libswanted="$*"
  3002. --- 1,16 ----
  3003.   # irix_5.sh
  3004. + # Last modified Fri May  5 11:01:23 EDT 1995
  3005.   ld=ld
  3006.   i_time='define'
  3007. ! case "$cc" in
  3008. ! *gcc) ccflags="$ccflags -D_BSD_TYPES" ;;
  3009. ! *) ccflags="$ccflags -D_POSIX_SOURCE -ansiposix -D_BSD_TYPES -Olimit 3000" ;;
  3010. ! esac
  3011.   lddlflags="-shared"
  3012. + # For some reason we don't want -lsocket -lnsl or -ldl.  Can anyone
  3013. + # contribute an explanation?
  3014.   set `echo X "$libswanted "|sed -e 's/ socket / /' -e 's/ nsl / /' -e 's/ dl / /'`
  3015.   shift
  3016.   libswanted="$*"
  3017. Index: hints/irix_6.sh
  3018. *** perl5.001h/hints/irix_6.sh    Mon Apr 17 09:09:32 1995
  3019. --- perl5.001i/hints/irix_6.sh    Fri May  5 14:08:41 1995
  3020. ***************
  3021. *** 12,17 ****
  3022. --- 12,19 ----
  3023.   cc="cc -32"
  3024.   ccflags="$ccflags -D_POSIX_SOURCE -ansiposix -D_BSD_TYPES -Olimit 3000"
  3025.   lddlflags="-32 -shared"
  3026. + # We don't want these libraries.  Anyone know why?
  3027.   set `echo X "$libswanted "|sed -e 's/ socket / /' -e 's/ nsl / /' -e 's/ dl / /'`
  3028.   shift
  3029.   libswanted="$*"
  3030. Index: hints/linux.sh
  3031. *** perl5.001h/hints/linux.sh    Mon Apr 17 12:10:13 1995
  3032. --- perl5.001i/hints/linux.sh    Tue May 30 14:28:25 1995
  3033. ***************
  3034. *** 8,38 ****
  3035.   #
  3036.   # Consolidated by Andy Dougherty <doughera@lafcol.lafayette.edu>
  3037.   #
  3038. ! # Last updated Thu Apr  6 12:22:03 EDT 1995
  3039.   #
  3040.   # If you wish to use something other than 'gcc' for your compiler,
  3041.   # you should specify it on the Configure command line.  To use
  3042. ! # gcc-elf, for exmample, type 
  3043.   # ./Configure -Dcc=gcc-elf
  3044.   
  3045.   # perl goes into the /usr tree.  See the Filesystem Standard
  3046.   # available via anonymous FTP at tsx-11.mit.edu in
  3047.   # /pub/linux/docs/linux-standards/fsstnd.
  3048. ! # This used to be
  3049. ! # bin='/usr/bin'
  3050. ! # but it doesn't seem sensible to put the binary in /usr and all the
  3051. ! # rest of the support stuff (lib, man pages) into /usr/local.
  3052. ! # However, allow a command line override, e.g. Configure -Dprefix=/foo/bar
  3053.   case "$prefix" in
  3054.   '') prefix='/usr' ;;
  3055.   esac
  3056.   
  3057.   # Perl expects BSD style signal handling.
  3058. ! # gcc defines _G_HAVE_BOOL to 1, but doesn't actually supply bool.
  3059.   ccflags="-D__USE_BSD_SIGNAL -Dbool=char -DHAS_BOOL $ccflags"
  3060.   
  3061.   # The following functions are gcc built-ins, but the Configure tests
  3062. ! # may fail because it doesn't supply a proper prototype.
  3063.   d_memcmp=define
  3064.   d_memcpy=define
  3065.   
  3066. --- 8,35 ----
  3067.   #
  3068.   # Consolidated by Andy Dougherty <doughera@lafcol.lafayette.edu>
  3069.   #
  3070. ! # Last updated Tue May 30 14:25:02 EDT 1995
  3071.   #
  3072.   # If you wish to use something other than 'gcc' for your compiler,
  3073.   # you should specify it on the Configure command line.  To use
  3074. ! # gcc-elf, for exmample, type
  3075.   # ./Configure -Dcc=gcc-elf
  3076.   
  3077.   # perl goes into the /usr tree.  See the Filesystem Standard
  3078.   # available via anonymous FTP at tsx-11.mit.edu in
  3079.   # /pub/linux/docs/linux-standards/fsstnd.
  3080. ! # Allow a command line override, e.g. Configure -Dprefix=/foo/bar
  3081.   case "$prefix" in
  3082.   '') prefix='/usr' ;;
  3083.   esac
  3084.   
  3085.   # Perl expects BSD style signal handling.
  3086. ! # gcc-2.6.3 defines _G_HAVE_BOOL to 1, but doesn't actually supply bool.
  3087.   ccflags="-D__USE_BSD_SIGNAL -Dbool=char -DHAS_BOOL $ccflags"
  3088.   
  3089.   # The following functions are gcc built-ins, but the Configure tests
  3090. ! # may fail because they don't supply proper prototypes.
  3091. ! # This should be fixed as of 5.001f.  I'd appreciate reports.
  3092.   d_memcmp=define
  3093.   d_memcpy=define
  3094.   
  3095. ***************
  3096. *** 40,48 ****
  3097. --- 37,49 ----
  3098.   # function in <sys/stat.h>.
  3099.   d_lstat=define
  3100.   
  3101. + # Explanation?
  3102.   d_dosuid='define'
  3103.   
  3104. + # I think Configure gets this right now, but I'd appreciate reports.
  3105.   malloctype='void *'
  3106. + # Explanation?
  3107.   usemymalloc='n'
  3108.   
  3109.   case "$optimize" in
  3110. ***************
  3111. *** 73,82 ****
  3112.   
  3113.   You appear to have ELF support.  I'll try to use it for dynamic loading.
  3114.   EOM
  3115. -     # Configure now handles these automatically.
  3116.   else
  3117. !     echo "You don't have an ELF gcc, using dld if available."
  3118. !     # We might possibly have a version of DLD around.
  3119.       lddlflags="-r $lddlflags"
  3120.       # These empty values are so that Configure doesn't put in the
  3121.       # Linux ELF values.
  3122. --- 74,89 ----
  3123.   
  3124.   You appear to have ELF support.  I'll try to use it for dynamic loading.
  3125.   EOM
  3126.   else
  3127. !     cat <<'EOM'
  3128. ! You don't have an ELF gcc.  I will use dld if possible.  If you are
  3129. ! using a version of DLD earlier than 3.2.6, or don't have it at all, you
  3130. ! should probably upgrade. If you are forced to use 3.2.4, you should
  3131. ! uncomment a couple of lines in hints/linux.sh and rerun Configure to
  3132. ! disallow shared libraries.
  3133. ! EOM
  3134.       lddlflags="-r $lddlflags"
  3135.       # These empty values are so that Configure doesn't put in the
  3136.       # Linux ELF values.
  3137. ***************
  3138. *** 91,106 ****
  3139.   fi
  3140.   rm -rf try.c a.out
  3141.   
  3142. ! cat <<'EOM'
  3143.   
  3144. - You should take a look at hints/linux.sh. There are a some lines you
  3145. - may wish to change.
  3146.   EOM
  3147.   
  3148. - # And -- reported by one user:
  3149. - # We need to get -lc away from the link lines.
  3150. - # If we leave it there we get SEGV from miniperl during the build.
  3151. - # This may have to do with bugs in the pre-release version of libc for ELF.
  3152. - # Uncomment the next two lines to remove -lc from the link line.
  3153. - # set `echo " $libswanted " | sed -e 's@ c @ @'`
  3154. - # libswanted="$*"
  3155. --- 98,118 ----
  3156.   fi
  3157.   rm -rf try.c a.out
  3158.   
  3159. ! case "$BASH_VERSION" in
  3160. ! 1.14.3*)
  3161. !     cat <<'EOM'
  3162. ! If you get failure of op/exec test #5 during the test phase, you probably
  3163. ! have a buggy version of bash. Upgrading to a recent version (1.14.4 or
  3164. ! later) should fix the problem.
  3165.   
  3166.   EOM
  3167. + ;;
  3168. + esac
  3169. + # In addition, on some systems there is a problem with perl and NDBM, which
  3170. + # causes AnyDBM and NDBM_File to lock up. This is evidenced in the tests as
  3171. + # AnyDBM just freezing.  Currently we disable NDBM for all linux systems.
  3172. + # If someone can suggest a more robust test, that would be appreciated.
  3173. + d_dbm_open=undef
  3174.   
  3175. Index: hints/powerunix.sh
  3176. *** perl5.001h/hints/powerunix.sh    Fri Apr 14 10:40:15 1995
  3177. --- perl5.001i/hints/powerunix.sh    Wed May 31 09:15:15 1995
  3178. ***************
  3179. *** 51,62 ****
  3180.   ccdlflags='-Zlink=dynamic -Wl,-Bexport'
  3181.   lddlflags='-Zlink=so'
  3182.   
  3183. - # Configure imagines that stdio.h is "standard", but it really isn't.
  3184. - # Things like the -T and -B file test operators (on file handles) fail when
  3185. - # it tries to treat it as "standard"
  3186. - #
  3187. - d_stdstdio='undef'
  3188.   # Configure sometime finds what it believes to be ndbm header files on the
  3189.   # system and imagines that we have the NDBM library, but we really don't.
  3190.   # There is something there that once resembled ndbm, but it is purely
  3191. --- 51,56 ----
  3192. Index: installman
  3193. *** /dev/null    Wed May 31 09:31:33 1995
  3194. --- perl5.001i/installman    Tue May 30 15:59:55 1995
  3195. ***************
  3196. *** 0 ****
  3197. --- 1,155 ----
  3198. + #!./perl
  3199. + BEGIN { @INC = ('lib') }
  3200. + use Config;
  3201. + use Getopt::Long;
  3202. + use File::Find;
  3203. + require Cwd;
  3204. + umask 022;
  3205. + $ver = $];
  3206. + $release = substr($ver,0,3);   # Not used presently.
  3207. + $patchlevel = substr($ver,3,2);
  3208. + die "Patchlevel of perl ($patchlevel)",
  3209. +     "and patchlevel of config.sh ($Config{'PATCHLEVEL'}) don't match\n"
  3210. +     if $patchlevel != $Config{'PATCHLEVEL'};
  3211. + $usage =
  3212. + "Usage:  installman --man1dir=/usr/wherever --man1ext=1
  3213. +                     --man3dir=/usr/wherever --man3ext=3
  3214. +             --notify --help
  3215. +     Defaults are:
  3216. +     man1dir = $Config{'installman1dir'};
  3217. +     man1ext = $Config{'man1ext'};
  3218. +     man3dir = $Config{'installman3dir'};
  3219. +     man3ext = $Config{'man3ext'};
  3220. +     --notify (or -n) just lists commands that would be executed.\n";
  3221. + GetOptions( qw( man1dir=s man1ext=s man3dir=s man3ext=s notify help)) 
  3222. +     || die $usage;
  3223. + # These are written funny to avoid -w typo warnings.
  3224. + $man1dir = defined($opt_man1dir) ? $opt_man1dir : $Config{'installman1dir'};
  3225. + $man1ext = defined($opt_man1ext) ? $opt_man1ext : $Config{'man1ext'};
  3226. + $man3dir = defined($opt_man3dir) ? $opt_man3dir : $Config{'installman3dir'};
  3227. + $man3ext = defined($opt_man3ext) ? $opt_man3ext : $Config{'man3ext'};
  3228. + $notify = defined($opt_notify) ? $opt_notify : 0;
  3229. + #Sanity checks
  3230. + -x  "./perl"    || warn "./perl not found!  Have you run make?\n";
  3231. + -d  $Config{'installprivlib'}
  3232. +     || warn "Perl library directory $Config{'installprivlib'} not found.
  3233. +         Have you run make install?.  (Installing anyway.)\n";
  3234. + -x 't/TEST'        || warn "WARNING: You've never run 'make test'!!!",
  3235. +     "  (Installing anyway.)\n";
  3236. + # Install the main pod pages.
  3237. + runpod2man('pod', $man1dir, $man1ext);
  3238. + # Install the pods for library modules.
  3239. + runpod2man('lib', $man3dir, $man3ext);
  3240. + sub runpod2man {
  3241. +     my($poddir, $mandir, $manext) = @_;
  3242. +     my($builddir) = Cwd::getcwd();
  3243. +     if ($mandir eq ' ' or $mandir eq '') {
  3244. +     print STDERR "Skipping installation of $poddir man pages.\n";
  3245. +     return;
  3246. +     }
  3247. +     chdir $poddir || die "Unable to cd to $poddir directory!\n$!\n";
  3248. +     # We insist on using the current version of pod2man in case there
  3249. +     # are enhancements or changes from previous installed versions.
  3250. +     $pod2man = "../pod/pod2man";
  3251. +     -x  $pod2man    || die "Executable $pod2man not found.\n";
  3252. +     &makedir($mandir);
  3253. +     # Make a list of all the .pm and .pod files in the directory.  We will
  3254. +     # always run pod2man from the lib directory and feed it the full pathname
  3255. +     # of the pod.  This might be useful for pod2man someday.
  3256. +     @modpods = ();
  3257. +     find(\&lsmodpods, '.');
  3258. +     foreach $mod (@modpods) {
  3259. +     $manpage = $mod;
  3260. +     # Convert name from  File/Basename.pm to File::Basename.3 format,
  3261. +     # if necessary.
  3262. +     $manpage =~ s#\.p(m|od)$##;
  3263. +     $manpage =~ s#/#::#g;
  3264. +     $manpage = "${mandir}/${manpage}.${manext}";
  3265. +     # Print $release $patchlevel stuff?  or should pod2man do that?
  3266. +     &cmd("$pod2man $mod > $manpage");
  3267. +     }
  3268. +     chdir "$builddir" || die "Unable to cd back to $builddir directory!\n$!\n";
  3269. + }
  3270. + sub lsmodpods {
  3271. +     my $dir  = $File::Find::dir;
  3272. +     my $name = $File::Find::name;
  3273. +     if (-f $_) {
  3274. +         $name =~ s#^\./##;
  3275. +     push(@modpods, $name) if ($name =~ /\.p(m|od)$/);
  3276. +     }
  3277. + }
  3278. + print STDERR "  Installation complete\n";
  3279. + exit 0;
  3280. +     
  3281. + ###############################################################################
  3282. + # Utility subroutines from installperl
  3283. + sub cmd {
  3284. +     local($cmd) = @_;
  3285. +     print STDERR "  $cmd\n";
  3286. +     unless ($notify) {
  3287. +     system $cmd;
  3288. +     warn "Command failed!!!\n" if $?;
  3289. +     }
  3290. + }
  3291. + sub link {
  3292. +     local($from,$to) = @_;
  3293. +     print STDERR "  ln $from $to\n";
  3294. +     link($from,$to) || warn "Couldn't link $from to $to: $!\n" unless $notify;
  3295. + }
  3296. + sub chmod {
  3297. +     local($mode,$name) = @_;
  3298. +     printf STDERR "  chmod %o %s\n", $mode, $name;
  3299. +     chmod($mode,$name) || warn sprintf("Couldn't chmod %o %s: $!\n",$mode,$name)
  3300. +     unless $notify;
  3301. + }
  3302. + sub makedir {
  3303. +     local($dir) = @_;
  3304. +     unless (-d $dir) {
  3305. +     local($shortdir) = $dir;
  3306. +     $shortdir =~ s#(.*)/.*#$1#;
  3307. +     &makedir($shortdir);
  3308. +     print STDERR "  mkdir $dir\n";
  3309. +     mkdir($dir, 0777) || warn "Couldn't create $dir: $!\n" unless $notify;
  3310. +     }
  3311. + }
  3312. + sub samepath {
  3313. +     local($p1, $p2) = @_;
  3314. +     local($dev1, $ino1, $dev2, $ino2);
  3315. +     if ($p1 ne $p2) {
  3316. +     ($dev1, $ino1) = stat($p1);
  3317. +     ($dev2, $ino2) = stat($p2);
  3318. +     ($dev1 == $dev2 && $ino1 == $ino2);
  3319. +     }
  3320. +     else {
  3321. +     1;
  3322. +     }
  3323. + }
  3324. Index: installperl
  3325. *** perl5.001h/installperl    Sat Apr 15 11:14:10 1995
  3326. --- perl5.001i/installperl    Tue May 30 13:28:40 1995
  3327. ***************
  3328. *** 13,20 ****
  3329.   umask 022;
  3330.   
  3331.   @scripts = ('cppstdin', 'c2ph', 'h2xs', 'pstruct', 'x2p/s2p', 'x2p/find2perl',
  3332. !         'pod/pod2man', 'pod/pod2html', 'pod/pod2latex' );
  3333. ! @manpages = (<pod/*.man>, 'x2p/a2p.man', 'x2p/s2p.man');
  3334.   
  3335.   # Read in the config file.
  3336.   
  3337. --- 13,25 ----
  3338.   umask 022;
  3339.   
  3340.   @scripts = ('cppstdin', 'c2ph', 'h2xs', 'pstruct', 'x2p/s2p', 'x2p/find2perl',
  3341. !         'perldoc', 'pod/pod2man', 'pod/pod2html', 'pod/pod2latex' );
  3342. ! # pod documentation now handled by separate installman script.
  3343. ! # These two are archaic leftovers.
  3344. ! @manpages = ('x2p/a2p.man', 'x2p/s2p.man');
  3345. ! @pods = (<pod/*.pod>);
  3346.   
  3347.   # Read in the config file.
  3348.   
  3349. ***************
  3350. *** 100,118 ****
  3351.       }
  3352.   }
  3353.   
  3354. ! # Install man pages.
  3355.   
  3356. ! if ($installmansrc ne '') {
  3357. !     &makedir($installmansrc);
  3358.   
  3359. !     if (! &samepath($installmansrc, '.')) {
  3360.       for (@manpages) {
  3361. !         ($new = $_) =~ s/man$/$manext/;
  3362.           $new =~ s#.*/##;
  3363. !         print STDERR "  Installing $installmansrc/$new\n";
  3364.           next if $nonono;
  3365.           open(MI,$_) || warn "Can't open $_: $!\n";
  3366. !         open(MO,">$installmansrc/$new") || warn "Can't install $installmansrc/$new: $!\n";
  3367.           print MO ".ds RP Release $release Patchlevel $patchlevel\n";
  3368.           while (<MI>) {
  3369.           print MO;
  3370. --- 105,131 ----
  3371.       }
  3372.   }
  3373.   
  3374. ! # Install pod pages.  Where? I guess in $installprivlib/pod.
  3375. ! &makedir("${installprivlib}/pod");
  3376. ! foreach $file (@pods) {
  3377. !     # $file is a name like  pod/perl.pod
  3378. !     cp_if_diff($file, "${installprivlib}/${file}");
  3379. ! }
  3380. ! # Install old man pages.
  3381.   
  3382. ! if ($installman1dir ne '') {
  3383. !     &makedir($installman1dir);
  3384.   
  3385. !     if (! &samepath($installman1dir, '.')) {
  3386.       for (@manpages) {
  3387. !         ($new = $_) =~ s/man$/$man1ext/;
  3388.           $new =~ s#.*/##;
  3389. !         print STDERR "  Installing $installman1dir/$new\n";
  3390.           next if $nonono;
  3391.           open(MI,$_) || warn "Can't open $_: $!\n";
  3392. !         open(MO,">$installman1dir/$new") || 
  3393. !             warn "Can't install $installman1dir/$new: $!\n";
  3394.           print MO ".ds RP Release $release Patchlevel $patchlevel\n";
  3395.           while (<MI>) {
  3396.           print MO;
  3397. ***************
  3398. *** 146,156 ****
  3399.   makedir("$installarchlib/CORE");
  3400.   foreach $file (<*.h libperl*.*>) {
  3401.       cp_if_diff($file,"$installarchlib/CORE/$file");
  3402. -     if ($file =~ /\.a$/ && $osname =~ /^(next|sunos)$/) { 
  3403. -        # on NeXTs and Suns we have to rerun ranlib after copying libraries
  3404. -        # (maybe on all platforms which have ranlib ?)
  3405. -        &cmd("$ranlib $installarchlib/CORE/$file");
  3406. -     }
  3407.   }
  3408.   # AIX needs perl.exp installed as well.
  3409.   cp_if_diff("perl.exp" ,"$installarchlib/CORE/perl.exp") if ($osname eq 'aix');
  3410. --- 159,164 ----
  3411. ***************
  3412. *** 319,329 ****
  3413.       if ($?) {
  3414.           &unlink("$installlib/$name");
  3415.           &makedir("$installlib/$dir");
  3416. !         &cmd("cp $_ $installlib/$dir");
  3417. !         if (/\.a$/ && $osname eq 'next') { 
  3418. !         #on NeXTs we have to rerun ranlib after copying libraries
  3419. !         &cmd("$ranlib $installlib/$dir/$_");
  3420. !         }
  3421.           # HP-UX (at least) needs to maintain execute permissions
  3422.           # on dynamically-loaded libraries.
  3423.           if ($name =~ /\.(so|$dlext)$/o) {
  3424. --- 327,333 ----
  3425.       if ($?) {
  3426.           &unlink("$installlib/$name");
  3427.           &makedir("$installlib/$dir");
  3428. !         cp_if_diff("$_", "$installlib/$dir/$_");
  3429.           # HP-UX (at least) needs to maintain execute permissions
  3430.           # on dynamically-loaded libraries.
  3431.           if ($name =~ /\.(so|$dlext)$/o) {
  3432. ***************
  3433. *** 338,349 ****
  3434. --- 342,367 ----
  3435.       }
  3436.   }
  3437.   
  3438. + # Copy $from to $to, only if $from is different than $to.
  3439. + # Also preserve modification times for .a libraries.
  3440. + # On some systems, if you do
  3441. + #   ranlib libperl.a
  3442. + #   cp libperl.a /usr/local/lib/perl5/archlib/CORE/libperl.a
  3443. + # and then try to link against the installed libperl.a, you might
  3444. + # get an error message to the effect that the symbol table is older
  3445. + # than the library.
  3446.   sub cp_if_diff {
  3447.       my($from,$to)=@_;
  3448.       -f $from || die "$0: $from not found";
  3449.       system "cmp", "-s", $from, $to;
  3450.       if ($?) {
  3451. +     my ($atime, $mtime);
  3452.       unlink($to);   # In case we don't have write permissions.
  3453.       cmd("cp $from $to");
  3454. +     # Restore timestamps if it's a .a library.
  3455. +     if ($to =~ /\.a$/) {
  3456. +         ($atime, $mtime) = (stat $from)[8,9];
  3457. +         utime $atime, $mtime, $to;
  3458. +     }
  3459.       }
  3460.   }
  3461. Index: makedepend.SH
  3462. *** perl5.001h/makedepend.SH    Wed Feb  8 19:43:35 1995
  3463. --- perl5.001i/makedepend.SH    Thu May 25 11:05:52 1995
  3464. ***************
  3465. *** 43,49 ****
  3466.       ;;
  3467.   esac
  3468.   
  3469. ! PATH="$PATH:."
  3470.   export PATH
  3471.   
  3472.   $cat /dev/null >.deptmp
  3473. --- 43,51 ----
  3474.       ;;
  3475.   esac
  3476.   
  3477. ! # We need .. when we are in the x2p directory if we are using the
  3478. ! # cppstdin wrapper script.
  3479. ! PATH="$PATH:.:.."
  3480.   export PATH
  3481.   
  3482.   $cat /dev/null >.deptmp
  3483. Index: opcode.h
  3484. *** perl5.001h/opcode.h    Sun Mar 12 22:27:37 1995
  3485. --- perl5.001i/opcode.h    Tue May  9 14:34:17 1995
  3486. ***************
  3487. *** 2058,2064 ****
  3488.       0x0001111d,    /* shmget */
  3489.       0x0001111d,    /* shmctl */
  3490.       0x0011111d,    /* shmread */
  3491. !     0x0011111c,    /* shmwrite */
  3492.       0x0000111d,    /* msgget */
  3493.       0x0001111d,    /* msgctl */
  3494.       0x0001111d,    /* msgsnd */
  3495. --- 2058,2064 ----
  3496.       0x0001111d,    /* shmget */
  3497.       0x0001111d,    /* shmctl */
  3498.       0x0011111d,    /* shmread */
  3499. !     0x0011111d,    /* shmwrite */
  3500.       0x0000111d,    /* msgget */
  3501.       0x0001111d,    /* msgctl */
  3502.       0x0001111d,    /* msgsnd */
  3503. Index: opcode.pl
  3504. *** perl5.001h/opcode.pl    Mon Mar  6 21:18:48 1995
  3505. --- perl5.001i/opcode.pl    Fri May  5 14:24:57 1995
  3506. ***************
  3507. *** 558,564 ****
  3508.   shmget        shmget            ck_fun        imst    S S S
  3509.   shmctl        shmctl            ck_fun        imst    S S S
  3510.   shmread        shmread            ck_fun        imst    S S S S
  3511. ! shmwrite    shmwrite        ck_fun        ist    S S S S
  3512.   
  3513.   # Message passing.
  3514.   
  3515. --- 558,564 ----
  3516.   shmget        shmget            ck_fun        imst    S S S
  3517.   shmctl        shmctl            ck_fun        imst    S S S
  3518.   shmread        shmread            ck_fun        imst    S S S S
  3519. ! shmwrite    shmwrite        ck_fun        imst    S S S S
  3520.   
  3521.   # Message passing.
  3522.   
  3523. Index: perl.c
  3524. *** perl5.001h/perl.c    Tue Apr 18 14:06:04 1995
  3525. --- perl5.001i/perl.c    Wed May 31 11:40:13 1995
  3526. ***************
  3527. *** 996,1002 ****
  3528.       return s;
  3529.       case 'v':
  3530.       printf("\nThis is perl, version %s\n\n",patchlevel);
  3531. !     fputs("\tUnofficial patchlevel 1e.\n",stdout);
  3532.       fputs("\nCopyright 1987-1994, Larry Wall\n",stdout);
  3533.   #ifdef MSDOS
  3534.       fputs("MS-DOS port Copyright (c) 1989, 1990, Diomidis Spinellis\n",
  3535. --- 996,1002 ----
  3536.       return s;
  3537.       case 'v':
  3538.       printf("\nThis is perl, version %s\n\n",patchlevel);
  3539. !     fputs("\tUnofficial patchlevel 1i.\n",stdout);
  3540.       fputs("\nCopyright 1987-1994, Larry Wall\n",stdout);
  3541.   #ifdef MSDOS
  3542.       fputs("MS-DOS port Copyright (c) 1989, 1990, Diomidis Spinellis\n",
  3543. ***************
  3544. *** 1690,1695 ****
  3545. --- 1690,1698 ----
  3546.           incpush(getenv("PERLLIB"));
  3547.       }
  3548.   
  3549. + #ifdef SITELIB_EXP
  3550. +     incpush(SITELIB_EXP);
  3551. + #endif
  3552.   #ifdef ARCHLIB_EXP
  3553.       incpush(ARCHLIB_EXP);
  3554.   #endif
  3555. Index: perl.h
  3556. *** perl5.001h/perl.h    Thu Apr 13 09:29:16 1995
  3557. --- perl5.001i/perl.h    Tue May 23 11:17:37 1995
  3558. ***************
  3559. *** 127,132 ****
  3560. --- 127,136 ----
  3561.   #   undef HAS_MEMCMP
  3562.   #endif
  3563.   
  3564. + #ifdef I_MEMORY
  3565. + #  include <memory.h>
  3566. + #endif
  3567.   #ifdef HAS_MEMCPY
  3568.   #  if !defined(STANDARD_C) && !defined(I_STRING) && !defined(I_MEMORY)
  3569.   #    ifndef memcpy
  3570. ***************
  3571. *** 525,534 ****
  3572.   typedef struct mgvtbl MGVTBL;
  3573.   typedef union any ANY;
  3574.   
  3575. - typedef int (*cryptswitch_t) _((void));
  3576.   #include "handy.h"
  3577.   
  3578.   #ifdef DOSISH
  3579.   #   include "dosish.h"
  3580.   #else
  3581. --- 529,541 ----
  3582.   typedef struct mgvtbl MGVTBL;
  3583.   typedef union any ANY;
  3584.   
  3585.   #include "handy.h"
  3586.   
  3587. + typedef I32 (*filter_t) _((int, SV *, int));
  3588. + #define FILTER_READ(idx, sv, len)  filter_read(idx, sv, len)
  3589. + #define FILTER_DATA(idx)       (AvARRAY(rsfp_filters)[idx])
  3590. + #define FILTER_ISREADER(idx)       (idx >= AvFILL(rsfp_filters))
  3591.   #ifdef DOSISH
  3592.   #   include "dosish.h"
  3593.   #else
  3594. ***************
  3595. *** 780,786 ****
  3596.   char *getlogin _((void));
  3597.   #endif
  3598.   
  3599. ! #ifdef EUNICE
  3600.   #define UNLINK unlnk
  3601.   I32 unlnk _((char*));
  3602.   #else
  3603. --- 787,793 ----
  3604.   char *getlogin _((void));
  3605.   #endif
  3606.   
  3607. ! #ifdef UNLINK_ALL_VERSIONS /* Currently only makes sense for VMS */
  3608.   #define UNLINK unlnk
  3609.   I32 unlnk _((char*));
  3610.   #else
  3611. ***************
  3612. *** 1080,1086 ****
  3613.   EXT char *    bufend;
  3614.   EXT expectation expect INIT(XSTATE);    /* how to interpret ambiguous tokens */
  3615.   EXT char *    autoboot_preamble INIT(Nullch);
  3616. ! EXT cryptswitch_t cryptswitch_fp;
  3617.   
  3618.   EXT I32        multi_start;    /* 1st line of multi-line string */
  3619.   EXT I32        multi_end;    /* last line of multi-line string */
  3620. --- 1087,1093 ----
  3621.   EXT char *    bufend;
  3622.   EXT expectation expect INIT(XSTATE);    /* how to interpret ambiguous tokens */
  3623.   EXT char *    autoboot_preamble INIT(Nullch);
  3624. ! EXT AV *     rsfp_filters;
  3625.   
  3626.   EXT I32        multi_start;    /* 1st line of multi-line string */
  3627.   EXT I32        multi_end;    /* last line of multi-line string */
  3628. Index: perldoc.SH
  3629. *** /dev/null    Wed May 31 09:31:33 1995
  3630. --- perl5.001i/perldoc.SH    Tue May 30 15:59:09 1995
  3631. ***************
  3632. *** 0 ****
  3633. --- 1,201 ----
  3634. + case $CONFIG in
  3635. + '')
  3636. +     if test -f config.sh; then TOP=.;
  3637. +     elif test -f ../config.sh; then TOP=..;
  3638. +     elif test -f ../../config.sh; then TOP=../..;
  3639. +     elif test -f ../../../config.sh; then TOP=../../..;
  3640. +     elif test -f ../../../../config.sh; then TOP=../../../..;
  3641. +     else
  3642. +         echo "Can't find config.sh."; exit 1
  3643. +     fi
  3644. +     . $TOP/config.sh
  3645. +     ;;
  3646. + esac
  3647. + : This forces SH files to create target in same directory as SH file.
  3648. + : This is so that make depend always knows where to find SH derivatives.
  3649. + case "$0" in
  3650. + */*) cd `expr X$0 : 'X\(.*\)/'` ;;
  3651. + esac
  3652. + echo "Extracting perldoc (with variable substitutions)"
  3653. + $spitshell >perldoc <<!GROK!THIS!
  3654. + #!$bin/perl
  3655. + !GROK!THIS!
  3656. + $spitshell >>perldoc <<'!NO!SUBS!'
  3657. + #
  3658. + # Perldoc revision #1 -- look up a piece of documentation in .pod format that
  3659. + # is embedded in the perl installation tree.
  3660. + #
  3661. + # This is not to be confused with Tom Christianson's perlman, which is a
  3662. + # man replacement, written in perl. This perldoc is strictly for reading
  3663. + # the perl manuals, though it too is written in perl.
  3664. + #
  3665. + # Version 1.01:    Tue May 30 14:47:34 EDT 1995
  3666. + #        Andy Dougherty  <doughera@lafcol.lafayette.edu>
  3667. + #   -added pod documentation.
  3668. + #   -added PATH searching.
  3669. + #   -added searching pod/ subdirectory (mainly to pick up perlfunc.pod
  3670. + #    and friends.
  3671. + =head1 NAME
  3672. + perldoc - Look up Perl documentation in pod format.
  3673. + =head1 SYNOPSIS
  3674. + B<perldoc> [B<-h>] PageName|ModuleName
  3675. + =head1 DESCRIPTION
  3676. + I<perldoc> looks up a piece of documentation in .pod format that is
  3677. + embedded in the perl installation tree or in a perl script, and displays
  3678. + it via pod2man | nroff -man | $PAGER.  This is primarily used for the
  3679. + documentation for the perl library modules. 
  3680. + Your system may also have man pages installed for those modules, in
  3681. + which case you can probably just use the man(1) command.
  3682. + =head1 OPTIONS
  3683. + =over 5
  3684. + =item B<-h> help
  3685. + Prints out a brief help message.
  3686. + =item B<PageName|ModuleName>
  3687. + The item you want to look up.  Nested modules (such as C<File::Basename>)
  3688. + are specified either as C<File::Basename> or C<File/Basename>.  You
  3689. + may also give a descriptive name of a page, such as C<perlfunc>.
  3690. + =back
  3691. + =head1 ENVIRONMENT
  3692. + Any switches in the C<PERLDOC> environment variable will be used before the 
  3693. + command line arguments.  C<perldoc> also searches directories
  3694. + specified by the C<PERL5LIB> (or C<PERLLIB> if C<PERL5LIB> is not
  3695. + defined) and C<PATH> environment variables.
  3696. + (The latter is so that embedded pods for executables, such as
  3697. + C<perldoc> itself, are available.)
  3698. + =head1 AUTHOR
  3699. + Kenneth Albanowski <kjahds@kjahds.com>
  3700. + Minor updates by Andy Dougherty <doughera@lafcol.lafayette.edu>
  3701. + =head1 SEE ALSO
  3702. + =head1 DIAGNOSTICS
  3703. + =cut
  3704. + if(@ARGV<1) {
  3705. +     die <<EOF;
  3706. + Usage: $0 [-h] PageName|ModuleName
  3707. + We suggest you use C<perldoc perldoc> to get aquainted 
  3708. + with the system.
  3709. + EOF
  3710. + }
  3711. + use Getopt::Std;
  3712. + sub usage{
  3713. +         warn "@_\n" if @_;
  3714. +     die <<EOF;
  3715. + perlman [-h] PageName|ModuleName...
  3716. +     -h   Display this help message.
  3717. + PageName|ModuleName...
  3718. +          is the name of a piece of documentation that you want to look at. You 
  3719. +          may either give a descriptive name of the page (as in the case of
  3720. +          `perlfunc') or the name of a module, either like `Term::Info', 
  3721. +          `Term/Info'.
  3722. +          
  3723. + Any switches in the PERLDOC environment variable will be used before the 
  3724. + command line arguments.
  3725. + EOF
  3726. + }
  3727. + use Text::ParseWords;
  3728. + unshift(@ARGV,shellwords($ENV{"PERLDOC"}));
  3729. + getopts("h") || usage;
  3730. + usage if $opt_h;
  3731. + $index = $opt_i;
  3732. + @pages = @ARGV;
  3733. + sub containspod {
  3734. +     my($file) = @_;
  3735. +     local($_);
  3736. +     open(TEST,"<$file");
  3737. +     while(<TEST>) {
  3738. +         if(/^=head/) {
  3739. +             close(TEST);
  3740. +             return 1;
  3741. +         }
  3742. +     }
  3743. +     close(TEST);
  3744. +     return 0;
  3745. + }
  3746. + sub searchfor {
  3747. +     my($s,@dirs) = @_;
  3748. +     $s =~ s!::!/!g;
  3749. +     printf STDERR "looking for $s in @dirs\n";
  3750. +     
  3751. +     foreach $dir (@dirs) {
  3752. +         if( -f "$dir/$s.pod") { return "$dir/$s.pod" }
  3753. +         elsif( -f "$dir/$s.pm" and containspod("$dir/$s.pm"))
  3754. +             { return "$dir/$s.pm" }
  3755. +         elsif( -f "$dir/$s" and containspod("$dir/$s"))
  3756. +             { return "$dir/$s" } 
  3757. +         elsif( -f "$dir/pod/$s.pod") { return "$dir/pod/$s.pod" }
  3758. +         elsif( -f "$dir/pod/$s" and containspod("$dir/pod/$s"))
  3759. +             { return "$dir/pod/$s" } 
  3760. +     }
  3761. +     return ();
  3762. + }
  3763. + $ENV{PAGER} ||= "more";
  3764. + foreach (@pages) {
  3765. +     print STDERR "Searching for $_\n";
  3766. +     # We must look both in @INC for library modules and in PATH
  3767. +     # for executables, like h2xs or perldoc itself.
  3768. +     @searchdirs = @INC;
  3769. +     push(@searchdirs, split(':', $ENV{'PATH'}) );
  3770. +     @files= searchfor($_,@searchdirs);
  3771. +     if( @files ) {
  3772. +         print STDERR "Found as @files\n";
  3773. +     } else {
  3774. +         print STDERR "No documentation found for $_\n";
  3775. +     }
  3776. +     push(@found,@files);
  3777. + }
  3778. + $cmd=$filter="";
  3779. + if( ! -t STDOUT ) { $opt_f = 1 }
  3780. + $cmd = "pod2man - | nroff -man";
  3781. + if( ! $opt_f ) { $filter = "|$ENV{PAGER}" };
  3782. + open(OUT,"|$cmd$filter");
  3783. + foreach (@found) {
  3784. +     open(IN,"<$_");
  3785. +     print OUT while <IN>;
  3786. +     close(IN);
  3787. + }
  3788. + close(OUT);
  3789. + !NO!SUBS!
  3790. + chmod 755 perldoc
  3791. + $eunicefix perldoc
  3792. Index: pod/perl.pod
  3793. *** perl5.001h/pod/perl.pod    Wed Feb  8 19:09:53 1995
  3794. --- perl5.001i/pod/perl.pod    Fri May 26 14:21:34 1995
  3795. ***************
  3796. *** 36,41 ****
  3797. --- 36,57 ----
  3798.   (If you're intending to read these straight through for the first time,
  3799.   the suggested order will tend to reduce the number of forward references.)
  3800.   
  3801. + Additional documentation for perl modules is available in
  3802. + the F</usr/local/lib/perl5/man/man3> directory.  You can view this
  3803. + with a man(1) program by including the following in the
  3804. + appropriate start-up files.  (You may have to adjust the path to
  3805. + match $Config{'man3dir'}.)
  3806. +     .profile (for sh, bash or ksh users):
  3807. +     MANPATH=$MANPATH:/usr/local/lib/perl5/man
  3808. +     export MANPATH
  3809. +     .login (for csh or tcsh users):
  3810. +     setenv MANPATH $MANPATH:/usr/local/lib/perl5/man
  3811. + If that doesn't work for some reason, you can still use the
  3812. + supplied perldoc script to view module information.
  3813.   If something strange has gone wrong with your program and you're not
  3814.   sure where you should look for help, try the B<-w> switch first.  It
  3815.   will often point out exactly where the trouble is.
  3816. ***************
  3817. *** 269,271 ****
  3818. --- 285,288 ----
  3819.   
  3820.   The three principle virtues of a programmer are Laziness,
  3821.   Impatience, and Hubris.  See the Camel Book for why.
  3822. Index: pp_ctl.c
  3823. *** perl5.001h/pp_ctl.c    Wed Mar 15 09:29:43 1995
  3824. --- perl5.001i/pp_ctl.c    Wed May 24 11:48:36 1995
  3825. ***************
  3826. *** 1298,1303 ****
  3827. --- 1298,1305 ----
  3828.   
  3829.       if (stack == sortstack) {
  3830.       if (cxstack_ix == sortcxix || dopoptosub(cxstack_ix) < sortcxix) {
  3831. +         if (cxstack_ix > sortcxix)
  3832. +         dounwind(sortcxix);
  3833.           AvARRAY(stack)[1] = *SP;
  3834.           stack_sp = stack_base + 1;
  3835.           return 0;
  3836. Index: pp_hot.c
  3837. *** perl5.001h/pp_hot.c    Fri Apr 14 10:01:21 1995
  3838. --- perl5.001i/pp_hot.c    Thu May 25 14:27:29 1995
  3839. ***************
  3840. *** 974,980 ****
  3841.           sv_setpvn(tmpcmd, cshname, cshlen);
  3842.           sv_catpv(tmpcmd, " -cf 'set nonomatch; glob ");
  3843.           sv_catsv(tmpcmd, tmpglob);
  3844. !         sv_catpv(tmpcmd, "'|");
  3845.   #else
  3846.           sv_setpv(tmpcmd, "echo ");
  3847.           sv_catsv(tmpcmd, tmpglob);
  3848. --- 974,980 ----
  3849.           sv_setpvn(tmpcmd, cshname, cshlen);
  3850.           sv_catpv(tmpcmd, " -cf 'set nonomatch; glob ");
  3851.           sv_catsv(tmpcmd, tmpglob);
  3852. !         sv_catpv(tmpcmd, "' 2>/dev/null |");
  3853.   #else
  3854.           sv_setpv(tmpcmd, "echo ");
  3855.           sv_catsv(tmpcmd, tmpglob);
  3856. ***************
  3857. *** 1809,1816 ****
  3858.       sv = *(stack_base + TOPMARK + 1);
  3859.       
  3860.       gv = 0;
  3861.       if (SvROK(sv))
  3862. !     ob = SvRV(sv);
  3863.       else {
  3864.       GV* iogv;
  3865.       char* packname = 0;
  3866. --- 1809,1818 ----
  3867.       sv = *(stack_base + TOPMARK + 1);
  3868.       
  3869.       gv = 0;
  3870. +     if (SvGMAGICAL(sv))
  3871. +         mg_get(sv);
  3872.       if (SvROK(sv))
  3873. !     ob = (SV*)SvRV(sv);
  3874.       else {
  3875.       GV* iogv;
  3876.       char* packname = 0;
  3877. Index: pp_sys.c
  3878. *** perl5.001h/pp_sys.c    Tue Apr 11 15:48:46 1995
  3879. --- perl5.001i/pp_sys.c    Thu May 25 17:06:55 1995
  3880. ***************
  3881. *** 17,27 ****
  3882.   #include "EXTERN.h"
  3883.   #include "perl.h"
  3884.   
  3885. ! /* Omit this -- it causes too much grief on mixed systems.
  3886. ! #ifdef I_UNISTD
  3887. ! #include <unistd.h>
  3888. ! #endif
  3889.   */
  3890.   
  3891.   /* Put this after #includes because fork and vfork prototypes may
  3892.      conflict.
  3893. --- 17,31 ----
  3894.   #include "EXTERN.h"
  3895.   #include "perl.h"
  3896.   
  3897. ! /* XXX Omit this -- it causes too much grief on mixed systems.
  3898. !    Next time, I should force broken systems to unset i_unistd in
  3899. !    hint files.
  3900.   */
  3901. + #if 0
  3902. + # ifdef I_UNISTD
  3903. + #  include <unistd.h>
  3904. + # endif
  3905. + #endif
  3906.   
  3907.   /* Put this after #includes because fork and vfork prototypes may
  3908.      conflict.
  3909. ***************
  3910. *** 1242,1248 ****
  3911.       int argtype;
  3912.       GV *gv;
  3913.       FILE *fp;
  3914. ! #ifdef HAS_FLOCK
  3915.       argtype = POPi;
  3916.       if (MAXARG <= 0)
  3917.       gv = last_in_gv;
  3918. --- 1246,1257 ----
  3919.       int argtype;
  3920.       GV *gv;
  3921.       FILE *fp;
  3922. ! #if !defined(HAS_FLOCK) && defined(HAS_LOCKF)
  3923. ! #  define flock lockf_emulate_flock
  3924. ! #endif
  3925. ! #if defined(HAS_FLOCK) || defined(flock)
  3926.       argtype = POPi;
  3927.       if (MAXARG <= 0)
  3928.       gv = last_in_gv;
  3929. ***************
  3930. *** 1260,1270 ****
  3931.       PUSHi(value);
  3932.       RETURN;
  3933.   #else
  3934. - # ifdef HAS_LOCKF
  3935. -     DIE(no_func, "flock()"); /* XXX emulate flock() with lockf()? */
  3936. - # else
  3937.       DIE(no_func, "flock()");
  3938. - # endif
  3939.   #endif
  3940.   }
  3941.   
  3942. --- 1269,1275 ----
  3943. ***************
  3944. *** 2032,2049 ****
  3945.       RETPUSHNO;
  3946.   }
  3947.   
  3948. ! #if defined(USE_STD_STDIO) || defined(atarist) /* this will work with atariST */
  3949. ! # define FBASE(f) ((f)->_base)
  3950. ! # define FSIZE(f) ((f)->_cnt + ((f)->_ptr - (f)->_base))
  3951. ! # define FPTR(f) ((f)->_ptr)
  3952. ! # define FCOUNT(f) ((f)->_cnt)
  3953. ! #else 
  3954. ! # if defined(USE_LINUX_STDIO)
  3955. ! #   define FBASE(f) ((f)->_IO_read_base)
  3956. ! #   define FSIZE(f) ((f)->_IO_read_end - FBASE(f))
  3957. ! #   define FPTR(f) ((f)->_IO_read_ptr)
  3958. ! #   define FCOUNT(f) ((f)->_IO_read_end - FPTR(f))
  3959. ! # endif
  3960.   #endif
  3961.   
  3962.   PP(pp_fttext)
  3963. --- 2037,2048 ----
  3964.       RETPUSHNO;
  3965.   }
  3966.   
  3967. ! #if defined(atarist) /* this will work with atariST. Configure will
  3968. !             make guesses for other systems. */
  3969. ! # define FILE_base(f) ((f)->_base)
  3970. ! # define FILE_ptr(f) ((f)->_ptr)
  3971. ! # define FILE_cnt(f) ((f)->_cnt)
  3972. ! # define FILE_bufsiz(f) ((f)->_cnt + ((f)->_ptr - (f)->_base))
  3973.   #endif
  3974.   
  3975.   PP(pp_fttext)
  3976. ***************
  3977. *** 2073,2094 ****
  3978.           io = GvIO(statgv);
  3979.       }
  3980.       if (io && IoIFP(io)) {
  3981. ! #ifdef FBASE
  3982.           Fstat(fileno(IoIFP(io)), &statcache);
  3983.           if (S_ISDIR(statcache.st_mode))    /* handle NFS glitch */
  3984.           if (op->op_type == OP_FTTEXT)
  3985.               RETPUSHNO;
  3986.           else
  3987.               RETPUSHYES;
  3988. !         if (FCOUNT(IoIFP(io)) <= 0) {
  3989.           i = getc(IoIFP(io));
  3990.           if (i != EOF)
  3991.               (void)ungetc(i, IoIFP(io));
  3992.           }
  3993. !         if (FCOUNT(IoIFP(io)) <= 0)    /* null file is anything */
  3994.           RETPUSHYES;
  3995. !         len = FSIZE(IoIFP(io));
  3996. !         s = FBASE(IoIFP(io));
  3997.   #else
  3998.           DIE("-T and -B not implemented on filehandles");
  3999.   #endif
  4000. --- 2072,2093 ----
  4001.           io = GvIO(statgv);
  4002.       }
  4003.       if (io && IoIFP(io)) {
  4004. ! #ifdef FILE_base
  4005.           Fstat(fileno(IoIFP(io)), &statcache);
  4006.           if (S_ISDIR(statcache.st_mode))    /* handle NFS glitch */
  4007.           if (op->op_type == OP_FTTEXT)
  4008.               RETPUSHNO;
  4009.           else
  4010.               RETPUSHYES;
  4011. !         if (FILE_cnt(IoIFP(io)) <= 0) {
  4012.           i = getc(IoIFP(io));
  4013.           if (i != EOF)
  4014.               (void)ungetc(i, IoIFP(io));
  4015.           }
  4016. !         if (FILE_cnt(IoIFP(io)) <= 0)    /* null file is anything */
  4017.           RETPUSHYES;
  4018. !         len = FILE_bufsiz(IoIFP(io));
  4019. !         s = FILE_base(IoIFP(io));
  4020.   #else
  4021.           DIE("-T and -B not implemented on filehandles");
  4022.   #endif
  4023. ***************
  4024. *** 2321,2327 ****
  4025.   char *filename;
  4026.   {
  4027.       char mybuf[8192];
  4028. !     char *s, 
  4029.        *save_filename = filename;
  4030.       int anum = 1;
  4031.       FILE *myfp;
  4032. --- 2320,2326 ----
  4033.   char *filename;
  4034.   {
  4035.       char mybuf[8192];
  4036. !     char *s,
  4037.        *save_filename = filename;
  4038.       int anum = 1;
  4039.       FILE *myfp;
  4040. ***************
  4041. *** 3871,3873 ****
  4042. --- 3870,3960 ----
  4043.   #endif
  4044.   }
  4045.   
  4046. + #if !defined(HAS_FLOCK) && defined(HAS_LOCKF)
  4047. + /*  XXX Emulate flock() with lockf().  This is just to increase
  4048. +     portability of scripts.  The calls are not completely
  4049. +     interchangeable.  What's really needed is a good file
  4050. +     locking module.
  4051. + */
  4052. + /*  We might need <unistd.h> because it sometimes defines the lockf()
  4053. +     constants.  Unfortunately, <unistd.h> causes troubles on some mixed
  4054. +     (BSD/POSIX) systems, such as SunOS 4.1.3.  We could just try including
  4055. +     <unistd.h> here in this part of the file, but that might
  4056. +     conflict with various other #defines and includes above, such as
  4057. +     #define vfork fork above.
  4058. +    Further, the lockf() constants aren't POSIX, so they might not be
  4059. +    visible if we're compiling with _POSIX_SOURCE defined.  Thus, we'll
  4060. +    just stick in the SVID values and be done with it.  Sigh.
  4061. + */
  4062. + # ifndef F_ULOCK
  4063. + #  define F_ULOCK    0    /* Unlock a previously locked region */
  4064. + # endif
  4065. + # ifndef F_LOCK
  4066. + #  define F_LOCK    1    /* Lock a region for exclusive use */
  4067. + # endif
  4068. + # ifndef F_TLOCK
  4069. + #  define F_TLOCK    2    /* Test and lock a region for exclusive use */
  4070. + # endif
  4071. + # ifndef F_TEST
  4072. + #  define F_TEST    3    /* Test a region for other processes locks */
  4073. + # endif
  4074. + /* These are the flock() constants.  Since this sytems doesn't have
  4075. +    flock(), the values of the constants are probably not available.
  4076. + */
  4077. + # ifndef LOCK_SH
  4078. + #  define LOCK_SH 1
  4079. + # endif
  4080. + # ifndef LOCK_EX
  4081. + #  define LOCK_EX 2
  4082. + # endif
  4083. + # ifndef LOCK_NB
  4084. + #  define LOCK_NB 4
  4085. + # endif
  4086. + # ifndef LOCK_UN
  4087. + #  define LOCK_UN 8
  4088. + # endif
  4089. + int
  4090. + lockf_emulate_flock (fd, operation)
  4091. + int fd;
  4092. + int operation;
  4093. + {
  4094. +     int i;
  4095. +     switch (operation) {
  4096. +     /* LOCK_SH - get a shared lock */
  4097. +     case LOCK_SH:
  4098. +     /* LOCK_EX - get an exclusive lock */
  4099. +     case LOCK_EX:
  4100. +         i = lockf (fd, F_LOCK, 0);
  4101. +         break;
  4102. +     /* LOCK_SH|LOCK_NB - get a non-blocking shared lock */
  4103. +     case LOCK_SH|LOCK_NB:
  4104. +     /* LOCK_EX|LOCK_NB - get a non-blocking exclusive lock */
  4105. +     case LOCK_EX|LOCK_NB:
  4106. +         i = lockf (fd, F_TLOCK, 0);
  4107. +         if (i == -1)
  4108. +         if ((errno == EAGAIN) || (errno == EACCES))
  4109. +             errno = EWOULDBLOCK;
  4110. +         break;
  4111. +     /* LOCK_UN - unlock */
  4112. +     case LOCK_UN:
  4113. +         i = lockf (fd, F_ULOCK, 0);
  4114. +         break;
  4115. +     /* Default - can't decipher operation */
  4116. +     default:
  4117. +         i = -1;
  4118. +         errno = EINVAL;
  4119. +         break;
  4120. +     }
  4121. +     return (i);
  4122. + }
  4123. + #endif
  4124. Index: proto.h
  4125. *** perl5.001h/proto.h    Wed Apr  5 14:50:41 1995
  4126. --- perl5.001i/proto.h    Tue May 23 11:17:38 1995
  4127. ***************
  4128. *** 48,54 ****
  4129.   #ifdef DEBUGGING
  4130.   void    cx_dump _((CONTEXT* cs));
  4131.   #endif
  4132. ! void    cryptswitch_add _((cryptswitch_t funcp));
  4133.   I32    cxinc _((void));
  4134.   void    deb _((char* pat,...)) __attribute__((format(printf,1,2)));
  4135.   void    deb_growlevel _((void));
  4136. --- 48,56 ----
  4137.   #ifdef DEBUGGING
  4138.   void    cx_dump _((CONTEXT* cs));
  4139.   #endif
  4140. ! SV *    filter_add _((filter_t funcp, SV *datasv));
  4141. ! void    filter_del _((filter_t funcp));
  4142. ! I32    filter_read _((int idx, SV *buffer, int maxlen));
  4143.   I32    cxinc _((void));
  4144.   void    deb _((char* pat,...)) __attribute__((format(printf,1,2)));
  4145.   void    deb_growlevel _((void));
  4146. ***************
  4147. *** 448,454 ****
  4148. --- 450,458 ----
  4149.   void    taint_env _((void));
  4150.   void    taint_not _((char *s));
  4151.   void    taint_proper _((char* f, char* s));
  4152. + #ifdef UNLINK_ALL_VERSIONS
  4153.   I32    unlnk _((char* f));
  4154. + #endif
  4155.   void    utilize _((int aver, OP* id, OP* arg));
  4156.   I32    wait4pid _((int pid, int* statusp, int flags));
  4157.   void    warn _((char* pat,...)) __attribute__((format(printf,1,2)));
  4158. Index: sv.c
  4159. *** perl5.001h/sv.c    Wed Apr 12 16:13:08 1995
  4160. --- perl5.001i/sv.c    Wed May 24 14:27:52 1995
  4161. ***************
  4162. *** 1045,1051 ****
  4163.           not_a_number(sv);
  4164.           return (IV)atol(SvPVX(sv));
  4165.       }
  4166. !     return 0;
  4167.       }
  4168.       if (SvTHINKFIRST(sv)) {
  4169.       if (SvROK(sv)) {
  4170. --- 1045,1053 ----
  4171.           not_a_number(sv);
  4172.           return (IV)atol(SvPVX(sv));
  4173.       }
  4174. !         if (!SvROK(sv)) {
  4175. !             return 0;
  4176. !         }
  4177.       }
  4178.       if (SvTHINKFIRST(sv)) {
  4179.       if (SvROK(sv)) {
  4180. ***************
  4181. *** 1123,1129 ****
  4182.       }
  4183.       if (SvIOKp(sv))
  4184.           return (double)SvIVX(sv);
  4185. !     return 0;
  4186.       }
  4187.       if (SvTHINKFIRST(sv)) {
  4188.       if (SvROK(sv)) {
  4189. --- 1125,1133 ----
  4190.       }
  4191.       if (SvIOKp(sv))
  4192.           return (double)SvIVX(sv);
  4193. !         if (!SvROK(sv)) {
  4194. !             return 0;
  4195. !         }
  4196.       }
  4197.       if (SvTHINKFIRST(sv)) {
  4198.       if (SvROK(sv)) {
  4199. ***************
  4200. *** 1202,1209 ****
  4201.           Gconvert(SvNVX(sv), DBL_DIG, 0, tokenbuf);
  4202.           goto tokensave;
  4203.       }
  4204. !     *lp = 0;
  4205. !     return "";
  4206.       }
  4207.       if (SvTHINKFIRST(sv)) {
  4208.       if (SvROK(sv)) {
  4209. --- 1206,1215 ----
  4210.           Gconvert(SvNVX(sv), DBL_DIG, 0, tokenbuf);
  4211.           goto tokensave;
  4212.       }
  4213. !         if (!SvROK(sv)) {
  4214. !             *lp = 0;
  4215. !             return "";
  4216. !         }
  4217.       }
  4218.       if (SvTHINKFIRST(sv)) {
  4219.       if (SvROK(sv)) {
  4220. ***************
  4221. *** 2362,2368 ****
  4222.   I32 append;
  4223.   {
  4224.       register char *bp;        /* we're going to steal some values */
  4225. ! #ifdef USE_STD_STDIO
  4226.       register I32 cnt;        /*  from the stdio struct and put EVERYTHING */
  4227.       register STDCHAR *ptr;    /*   in the innermost loop into registers */
  4228.       STRLEN bpx;
  4229. --- 2368,2374 ----
  4230.   I32 append;
  4231.   {
  4232.       register char *bp;        /* we're going to steal some values */
  4233. ! #ifdef USE_STDIO_PTR
  4234.       register I32 cnt;        /*  from the stdio struct and put EVERYTHING */
  4235.       register STDCHAR *ptr;    /*   in the innermost loop into registers */
  4236.       STRLEN bpx;
  4237. ***************
  4238. *** 2392,2399 ****
  4239.           }
  4240.       } while (i != EOF);
  4241.       }
  4242. ! #ifdef USE_STD_STDIO    /* Here is some breathtakingly efficient cheating */
  4243. !     cnt = fp->_cnt;            /* get count into register */
  4244.       (void)SvPOK_only(sv);        /* validate pointer */
  4245.       if (SvLEN(sv) - append <= cnt + 1) { /* make sure we have the room */
  4246.       if (cnt > 80 && SvLEN(sv) > append) {
  4247. --- 2398,2405 ----
  4248.           }
  4249.       } while (i != EOF);
  4250.       }
  4251. ! #ifdef USE_STDIO_PTR    /* Here is some breathtakingly efficient cheating */
  4252. !     cnt = FILE_cnt(fp);            /* get count into register */
  4253.       (void)SvPOK_only(sv);        /* validate pointer */
  4254.       if (SvLEN(sv) - append <= cnt + 1) { /* make sure we have the room */
  4255.       if (cnt > 80 && SvLEN(sv) > append) {
  4256. ***************
  4257. *** 2408,2414 ****
  4258.       else
  4259.       shortbuffered = 0;
  4260.       bp = SvPVX(sv) + append;        /* move these two too to registers */
  4261. !     ptr = fp->_ptr;
  4262.       for (;;) {
  4263.         screamer:
  4264.       if (cnt > 0) {
  4265. --- 2414,2420 ----
  4266.       else
  4267.       shortbuffered = 0;
  4268.       bp = SvPVX(sv) + append;        /* move these two too to registers */
  4269. !     ptr = FILE_ptr(fp);
  4270.       for (;;) {
  4271.         screamer:
  4272.       if (cnt > 0) {
  4273. ***************
  4274. *** 2428,2438 ****
  4275.           continue;
  4276.       }
  4277.   
  4278. !     fp->_cnt = cnt;            /* deregisterize cnt and ptr */
  4279. !     fp->_ptr = ptr;
  4280.       i = _filbuf(fp);        /* get more characters */
  4281. !     cnt = fp->_cnt;
  4282. !     ptr = fp->_ptr;            /* reregisterize cnt and ptr */
  4283.   
  4284.       if (i == EOF)            /* all done for ever? */
  4285.           goto thats_really_all_folks;
  4286. --- 2434,2444 ----
  4287.           continue;
  4288.       }
  4289.   
  4290. !     FILE_cnt(fp) = cnt;        /* deregisterize cnt and ptr */
  4291. !     FILE_ptr(fp) = ptr;
  4292.       i = _filbuf(fp);        /* get more characters */
  4293. !     cnt = FILE_cnt(fp);
  4294. !     ptr = FILE_ptr(fp);        /* reregisterize cnt and ptr */
  4295.   
  4296.       if (i == EOF)            /* all done for ever? */
  4297.           goto thats_really_all_folks;
  4298. ***************
  4299. *** 2455,2466 ****
  4300.   thats_really_all_folks:
  4301.       if (shortbuffered)
  4302.       cnt += shortbuffered;
  4303. !     fp->_cnt = cnt;            /* put these back or we're in trouble */
  4304. !     fp->_ptr = ptr;
  4305.       *bp = '\0';
  4306.       SvCUR_set(sv, bp - SvPVX(sv));    /* set length */
  4307.   
  4308. ! #else /* !USE_STD_STDIO */    /* The big, slow, and stupid way */
  4309.   
  4310.       {
  4311.       char buf[8192];
  4312. --- 2461,2472 ----
  4313.   thats_really_all_folks:
  4314.       if (shortbuffered)
  4315.       cnt += shortbuffered;
  4316. !     FILE_cnt(fp) = cnt;            /* put these back or we're in trouble */
  4317. !     FILE_ptr(fp) = ptr;
  4318.       *bp = '\0';
  4319.       SvCUR_set(sv, bp - SvPVX(sv));    /* set length */
  4320.   
  4321. ! #else /* !USE_STDIO_PTR */    /* The big, slow, and stupid way */
  4322.   
  4323.       {
  4324.       char buf[8192];
  4325. ***************
  4326. *** 2493,2499 ****
  4327.       }
  4328.       }
  4329.   
  4330. ! #endif /* USE_STD_STDIO */
  4331.   
  4332.       if (rspara) {
  4333.           while (i != EOF) {
  4334. --- 2499,2505 ----
  4335.       }
  4336.       }
  4337.   
  4338. ! #endif /* USE_STDIO_PTR */
  4339.   
  4340.       if (rspara) {
  4341.           while (i != EOF) {
  4342. Index: t/comp/cpp.aux
  4343. *** /dev/null    Wed May 31 09:31:33 1995
  4344. --- perl5.001i/t/comp/cpp.aux    Wed May 24 15:37:50 1995
  4345. ***************
  4346. *** 0 ****
  4347. --- 1,39 ----
  4348. + #!./perl -P
  4349. + # $RCSfile: cpp.t,v $$Revision: 4.1 $$Date: 92/08/07 18:27:18 $
  4350. + print "1..3\n";
  4351. + #this is a comment
  4352. + #define MESS "ok 1\n"
  4353. + print MESS;
  4354. + #If you capitalize, it's a comment.
  4355. + #ifdef MESS
  4356. +     print "ok 2\n";
  4357. + #else
  4358. +     print "not ok 2\n";
  4359. + #endif
  4360. + open(TRY,">Comp.cpp.tmp") || die "Can't open temp perl file.";
  4361. + ($prog = <<'END') =~ s/X//g;
  4362. + X$ok = "not ok 3\n";
  4363. + X#include "Comp.cpp.inc"
  4364. + X#ifdef OK
  4365. + X$ok = OK;
  4366. + X#endif
  4367. + Xprint $ok;
  4368. + END
  4369. + print TRY $prog;
  4370. + close TRY;
  4371. + open(TRY,">Comp.cpp.inc") || (die "Can't open temp include file.");
  4372. + print TRY '#define OK "ok 3\n"' . "\n";
  4373. + close TRY;
  4374. + $pwd=`pwd`;
  4375. + $pwd =~ s/\n//;
  4376. + $x = `./perl -P Comp.cpp.tmp`;
  4377. + print $x;
  4378. + unlink "Comp.cpp.tmp", "Comp.cpp.inc";
  4379. Index: t/comp/cpp.t
  4380. *** perl5.001h/t/comp/cpp.t    Tue Oct 18 12:43:29 1994
  4381. --- perl5.001i/t/comp/cpp.t    Wed May 24 15:37:50 1995
  4382. ***************
  4383. *** 1,51 ****
  4384. ! #!./perl -P
  4385.   
  4386.   # $RCSfile: cpp.t,v $$Revision: 4.1 $$Date: 92/08/07 18:27:18 $
  4387.   
  4388. ! open(CONFIG,"../config.sh") || die;
  4389. ! while (<CONFIG>) {
  4390. !     if (/^cppstdin/) {
  4391. !     if (/^cppstdin='(.*cppstdin)'/ && ! -e $1) {
  4392. !         print "1..0\n";
  4393. !         exit;         # Cannot test till after install, alas.
  4394. !     }
  4395. !     last;
  4396. !     }
  4397.   }
  4398. - close CONFIG;
  4399.   
  4400. ! print "1..3\n";
  4401. ! #this is a comment
  4402. ! #define MESS "ok 1\n"
  4403. ! print MESS;
  4404. ! #If you capitalize, it's a comment.
  4405. ! #ifdef MESS
  4406. !     print "ok 2\n";
  4407. ! #else
  4408. !     print "not ok 2\n";
  4409. ! #endif
  4410. ! open(TRY,">Comp.cpp.tmp") || die "Can't open temp perl file.";
  4411. ! ($prog = <<'END') =~ s/X//g;
  4412. ! X$ok = "not ok 3\n";
  4413. ! X#include "Comp.cpp.inc"
  4414. ! X#ifdef OK
  4415. ! X$ok = OK;
  4416. ! X#endif
  4417. ! Xprint $ok;
  4418. ! END
  4419. ! print TRY $prog;
  4420. ! close TRY;
  4421. ! open(TRY,">Comp.cpp.inc") || (die "Can't open temp include file.");
  4422. ! print TRY '#define OK "ok 3\n"' . "\n";
  4423. ! close TRY;
  4424.   
  4425. ! $pwd=`pwd`;
  4426. ! $pwd =~ s/\n//;
  4427. ! $x = `./perl -P Comp.cpp.tmp`;
  4428. ! print $x;
  4429. ! unlink "Comp.cpp.tmp", "Comp.cpp.inc";
  4430. --- 1,17 ----
  4431. ! #!./perl
  4432.   
  4433.   # $RCSfile: cpp.t,v $$Revision: 4.1 $$Date: 92/08/07 18:27:18 $
  4434.   
  4435. ! BEGIN {
  4436. !     chdir 't' if -d 't';
  4437. !     @INC = '../lib';
  4438.   }
  4439.   
  4440. ! use Config;
  4441. ! if ( ($Config{'cppstdin'} =~ /\bcppstdin\b/) and
  4442. !      ( ! -x $Config{'scriptdir'} . "/cppstdin") ) {
  4443. !     print "1..0\n";
  4444. !     exit;         # Cannot test till after install, alas.
  4445. ! }
  4446.   
  4447. ! system "./perl -P comp/cpp.aux"
  4448. Index: t/op/misc.t
  4449. *** perl5.001h/t/op/misc.t    Tue Oct 18 12:45:28 1994
  4450. --- perl5.001i/t/op/misc.t    Wed May 24 15:45:45 1995
  4451. ***************
  4452. *** 46,54 ****
  4453.           "foo";
  4454.           }
  4455.   ########
  4456. - -P 
  4457. - use POSIX;
  4458. - ########
  4459.   $array[128]=1
  4460.   ########
  4461.   $x=0x0eabcd; print $x->ref;
  4462. --- 46,51 ----
  4463. Index: toke.c
  4464. *** perl5.001h/toke.c    Wed Mar 15 09:29:37 1995
  4465. --- perl5.001i/toke.c    Fri May 26 15:24:57 1995
  4466. ***************
  4467. *** 43,48 ****
  4468. --- 43,49 ----
  4469.   #ifdef CRIPPLED_CC
  4470.   static int uni _((I32 f, char *s));
  4471.   #endif
  4472. + static char * filter_gets _((SV *sv, FILE *fp));
  4473.   
  4474.   /* The following are arranged oddly so that the guard on the switch statement
  4475.    * can get by with a single comparison (if the compiler is smart enough).
  4476. ***************
  4477. *** 329,335 ****
  4478.       }
  4479.       if (s < bufend || !rsfp || lex_state != LEX_NORMAL)
  4480.           return s;
  4481. !     if ((s = sv_gets(linestr, rsfp, 0)) == Nullch) {
  4482.           if (minus_n || minus_p) {
  4483.           sv_setpv(linestr,minus_p ? ";}continue{print" : "");
  4484.           sv_catpv(linestr,";}");
  4485. --- 330,336 ----
  4486.       }
  4487.       if (s < bufend || !rsfp || lex_state != LEX_NORMAL)
  4488.           return s;
  4489. !     if ((s = filter_gets(linestr, rsfp)) == Nullch) {
  4490.           if (minus_n || minus_p) {
  4491.           sv_setpv(linestr,minus_p ? ";}continue{print" : "");
  4492.           sv_catpv(linestr,";}");
  4493. ***************
  4494. *** 982,996 ****
  4495.   }
  4496.   
  4497.   
  4498. ! /* Encrypted script support: cryptswitch_add() may be called to */
  4499. ! /* define a function which may manipulate the input stream      */
  4500. ! /* (via popen() etc) to decode the input if required.           */
  4501. ! /* At the moment we only allow one cryptswitch function.        */
  4502.   void
  4503. ! cryptswitch_add(funcp)
  4504. !     cryptswitch_t funcp;
  4505.   {
  4506. !     cryptswitch_fp = funcp;
  4507.   }
  4508.   
  4509.   
  4510. --- 983,1114 ----
  4511.   }
  4512.   
  4513.   
  4514. ! /* Encoded script support. filter_add() effectively inserts a
  4515. !  * 'pre-processing' function into the current source input stream. 
  4516. !  * Note that the filter function only applies to the current source file
  4517. !  * (e.g., it will not affect files 'require'd or 'use'd by this one).
  4518. !  *
  4519. !  * The datasv parameter (which may be NULL) can be used to pass
  4520. !  * private data to this instance of the filter. The filter function
  4521. !  * can recover the SV using the FILTER_DATA macro and use it to
  4522. !  * store private buffers and state information.
  4523. !  *
  4524. !  * The supplied datasv parameter is upgraded to a PVIO type
  4525. !  * and the IoDIRP field is used to store the function pointer.
  4526. !  * Note that IoTOP_NAME, IoFMT_NAME, IoBOTTOM_NAME, if set for
  4527. !  * private use must be set using malloc'd pointers.
  4528. !  */
  4529. ! static int filter_debug = 0;
  4530. ! SV *
  4531. ! filter_add(funcp, datasv)
  4532. !     filter_t funcp;
  4533. !     SV *datasv;
  4534. ! {
  4535. !     if (!funcp){ /* temporary handy debugging hack to be deleted */
  4536. !     filter_debug = atoi((char*)datasv);
  4537. !     return NULL;
  4538. !     }
  4539. !     if (!rsfp_filters)
  4540. !     rsfp_filters = newAV();
  4541. !     if (!datasv)
  4542. !     datasv = newSV(0);
  4543. !     if (!SvUPGRADE(datasv, SVt_PVIO))
  4544. !         die("Can't upgrade filter_add data to SVt_PVIO");
  4545. !     IoDIRP(datasv) = (DIR*)funcp; /* stash funcp into spare field */
  4546. !     if (filter_debug)
  4547. !     warn("filter_add func %lx (%s)", funcp, SvPV(datasv,na));
  4548. !     av_push(rsfp_filters, datasv);
  4549. !     return(datasv);
  4550. ! }
  4551. !  
  4552. ! /* Delete most recently added instance of this filter function.    */
  4553.   void
  4554. ! filter_del(funcp)
  4555. !     filter_t funcp;
  4556. ! {
  4557. !     if (filter_debug)
  4558. !     warn("filter_del func %lx", funcp);
  4559. !     if (!rsfp_filters || AvFILL(rsfp_filters)<0)
  4560. !     return;
  4561. !     /* if filter is on top of stack (usual case) just pop it off */
  4562. !     if (IoDIRP(FILTER_DATA(AvFILL(rsfp_filters))) == (void*)funcp){
  4563. !     sv_free(av_pop(rsfp_filters));
  4564. !         return;
  4565. !     }
  4566. !     /* we need to search for the correct entry and clear it    */
  4567. !     die("filter_del can only delete in reverse order (currently)");
  4568. ! }
  4569. ! /* Invoke the n'th filter function for the current rsfp.     */
  4570. ! I32
  4571. ! filter_read(idx, buf_sv, maxlen)
  4572. !     int idx;
  4573. !     SV *buf_sv;
  4574. !     int maxlen;        /* 0 = read one text line */
  4575.   {
  4576. !     filter_t funcp;
  4577. !     SV *datasv = NULL;
  4578. !     if (!rsfp_filters)
  4579. !     return -1;
  4580. !     if (idx > AvFILL(rsfp_filters)){       /* Any more filters?    */
  4581. !     /* Provide a default input filter to make life easy.    */
  4582. !     /* Note that we append to the line. This is handy.    */
  4583. !     /* We ignore maxlen here                */
  4584. !     if (filter_debug)
  4585. !         warn("filter_read %d: from rsfp\n", idx);
  4586. !     if (maxlen) { 
  4587. !          /* Want a block */
  4588. !         int len ;
  4589. !         int old_len = SvCUR(buf_sv) ;
  4590. !         /* ensure buf_sv is large enough */
  4591. !         SvGROW(buf_sv, old_len + maxlen) ;
  4592. !         if ((len = fread(SvPVX(buf_sv) + old_len, 1, maxlen, rsfp)) <= 0)
  4593. !         return len ;
  4594. !         SvCUR_set(buf_sv, old_len + len) ;
  4595. !     } else {
  4596. !         /* Want a line */
  4597. !             if (sv_gets(buf_sv, rsfp, (SvCUR(buf_sv)>0) ? 1 : 0) == NULL)
  4598. !             return -1;        /* end of file */
  4599. !     }
  4600. !     return SvCUR(buf_sv);
  4601. !     }
  4602. !     /* Skip this filter slot if filter has been deleted    */
  4603. !     if ( (datasv = FILTER_DATA(idx)) == &sv_undef){
  4604. !     if (filter_debug)
  4605. !         warn("filter_read %d: skipped (filter deleted)\n", idx);
  4606. !     return FILTER_READ(idx+1, buf_sv, maxlen); /* recurse */
  4607. !     }
  4608. !     /* Get function pointer hidden within datasv    */
  4609. !     funcp = (filter_t)IoDIRP(datasv);
  4610. !     if (filter_debug)
  4611. !     warn("filter_read %d: via function %lx (%s)\n",
  4612. !         idx, funcp, SvPV(datasv,na));
  4613. !     /* Call function. The function is expected to     */
  4614. !     /* call "FILTER_READ(idx+1, buf_sv)" first.        */
  4615. !     /* Return: <0:error/eof, >=0:not eof (see yylex())    */
  4616. !     return (*funcp)(idx, buf_sv, maxlen);
  4617. ! }
  4618. ! static char *
  4619. ! filter_gets(sv,fp)
  4620. ! register SV *sv;
  4621. ! register FILE *fp;
  4622. ! {
  4623. !     if (rsfp_filters) {
  4624. !         SvCUR_set(sv, 0);    /* start with empty line    */
  4625. !         if (FILTER_READ(0, sv, 0) > 0)
  4626. !             return ( SvPVX(sv) ) ;
  4627. !         else
  4628. !         return Nullch ;
  4629. !     }
  4630. !     else 
  4631. !         return (sv_gets(sv, fp, 0)) ;
  4632. !     
  4633.   }
  4634.   
  4635.   
  4636. ***************
  4637. *** 1236,1251 ****
  4638.           }
  4639.           goto retry;
  4640.       }
  4641. -     /* Give cryptswitch a chance. Note that cryptswitch_fp may */
  4642. -     /* be either be called once if it redirects rsfp and unregisters */
  4643. -     /* itself, or it may be called on every line if it loads linestr. */
  4644. -     if (cryptswitch_fp && (*cryptswitch_fp)()) {
  4645. -         oldoldbufptr = oldbufptr = s = SvPVX(linestr);
  4646. -         bufend = SvPVX(linestr) + SvCUR(linestr);
  4647. -         goto retry;
  4648. -     }
  4649.       do {
  4650. !         if ((s = sv_gets(linestr, rsfp, 0)) == Nullch) {
  4651.             fake_eof:
  4652.           if (rsfp) {
  4653.               if (preprocess && !in_eval)
  4654. --- 1354,1361 ----
  4655.           }
  4656.           goto retry;
  4657.       }
  4658.       do {
  4659. !         if ((s = filter_gets(linestr, rsfp)) == Nullch) {
  4660.             fake_eof:
  4661.           if (rsfp) {
  4662.               if (preprocess && !in_eval)
  4663. ***************
  4664. *** 1560,1565 ****
  4665. --- 1670,1678 ----
  4666.       OPERATOR(tmp);
  4667.       case ')':
  4668.       tmp = *s++;
  4669. +     s = skipspace(s);
  4670. +     if (*s == '{')
  4671. +         PREBLOCK(tmp);
  4672.       TERM(tmp);
  4673.       case ']':
  4674.       s++;
  4675. ***************
  4676. *** 4246,4252 ****
  4677.       sv_setpvn(tmpstr,"",0);   /* avoid "uninitialized" warning */
  4678.       while (s >= bufend) {    /* multiple line string? */
  4679.       if (!rsfp ||
  4680. !      !(oldoldbufptr = oldbufptr = s = sv_gets(linestr, rsfp, 0))) {
  4681.           curcop->cop_line = multi_start;
  4682.           missingterm(tokenbuf);
  4683.       }
  4684. --- 4359,4365 ----
  4685.       sv_setpvn(tmpstr,"",0);   /* avoid "uninitialized" warning */
  4686.       while (s >= bufend) {    /* multiple line string? */
  4687.       if (!rsfp ||
  4688. !      !(oldoldbufptr = oldbufptr = s = filter_gets(linestr, rsfp))) {
  4689.           curcop->cop_line = multi_start;
  4690.           missingterm(tokenbuf);
  4691.       }
  4692. ***************
  4693. *** 4405,4411 ****
  4694.       if (s < bufend) break;    /* string ends on this line? */
  4695.   
  4696.       if (!rsfp ||
  4697. !      !(oldoldbufptr = oldbufptr = s = sv_gets(linestr, rsfp, 0))) {
  4698.           curcop->cop_line = multi_start;
  4699.           return Nullch;
  4700.       }
  4701. --- 4518,4524 ----
  4702.       if (s < bufend) break;    /* string ends on this line? */
  4703.   
  4704.       if (!rsfp ||
  4705. !      !(oldoldbufptr = oldbufptr = s = filter_gets(linestr, rsfp))) {
  4706.           curcop->cop_line = multi_start;
  4707.           return Nullch;
  4708.       }
  4709. ***************
  4710. *** 4583,4589 ****
  4711.       }
  4712.       s = eol;
  4713.       if (rsfp) {
  4714. !         s = sv_gets(linestr, rsfp, 0);
  4715.           oldoldbufptr = oldbufptr = bufptr = SvPVX(linestr);
  4716.           bufend = bufptr + SvCUR(linestr);
  4717.           if (!s) {
  4718. --- 4696,4702 ----
  4719.       }
  4720.       s = eol;
  4721.       if (rsfp) {
  4722. !         s = filter_gets(linestr, rsfp);
  4723.           oldoldbufptr = oldbufptr = bufptr = SvPVX(linestr);
  4724.           bufend = bufptr + SvCUR(linestr);
  4725.           if (!s) {
  4726. Index: unixish.h
  4727. *** perl5.001h/unixish.h    Wed Feb  8 19:44:04 1995
  4728. --- perl5.001i/unixish.h    Tue May 23 10:59:58 1995
  4729. ***************
  4730. *** 33,38 ****
  4731. --- 33,52 ----
  4732.   
  4733.   #define HAS_KILL
  4734.   #define HAS_WAIT
  4735. +   
  4736. + /* UNLINK_ALL_VERSIONS:
  4737. +  *    This symbol, if defined, indicates that the program should arrange
  4738. +  *    to remove all versions of a file if unlink() is called.  This is
  4739. +  *    probably only relevant for VMS.
  4740. +  */
  4741. + /* #define UNLINK_ALL_VERSIONS        /**/
  4742. + /* VMS:
  4743. +  *    This symbol, if defined, indicates that the program is running under
  4744. +  *    VMS.  It is currently automatically set by cpps running under VMS,
  4745. +  *    and is included here for completeness only.
  4746. +  */
  4747. + /* #define VMS        /**/
  4748.   
  4749.   #if !defined(NSIG) || defined(M_UNIX) || defined(M_XENIX)
  4750.   # include <signal.h>
  4751. Index: util.c
  4752. *** perl5.001h/util.c    Fri Apr 14 09:50:11 1995
  4753. --- perl5.001i/util.c    Mon May 22 15:52:44 1995
  4754. ***************
  4755. *** 1031,1037 ****
  4756.   }
  4757.   #endif /* !VMS */
  4758.   
  4759. ! #ifdef EUNICE
  4760.   I32
  4761.   unlnk(f)    /* unlink all versions of a file */
  4762.   char *f;
  4763. --- 1031,1037 ----
  4764.   }
  4765.   #endif /* !VMS */
  4766.   
  4767. ! #ifdef UNLINK_ALL_VERSIONS
  4768.   I32
  4769.   unlnk(f)    /* unlink all versions of a file */
  4770.   char *f;
  4771. Index: vms/config.vms
  4772. *** perl5.001h/vms/config.vms    Thu Apr  6 11:08:53 1995
  4773. --- perl5.001i/vms/config.vms    Wed May 24 15:50:03 1995
  4774. ***************
  4775. *** 10,16 ****
  4776.    * config.h for VMS
  4777.    */                 
  4778.   
  4779. ! /* Configuration time: 12-Oct-1994 17:00
  4780.    * Configured by: Charles Bailey  bailey@genetics.upenn.edu
  4781.    * Target system: VMS
  4782.    */
  4783. --- 10,16 ----
  4784.    * config.h for VMS
  4785.    */                 
  4786.   
  4787. ! /* Configuration time: 18-Apr-1995 17:00
  4788.    * Configured by: Charles Bailey  bailey@genetics.upenn.edu
  4789.    * Target system: VMS
  4790.    */
  4791. ***************
  4792. *** 460,466 ****
  4793.    *    but not always right so it should be emitted by the program only
  4794.    *    when HAS_SHMAT_PROTOTYPE is not defined to avoid conflicting defs.
  4795.    */
  4796. ! #undef Shmat_t char *    /**/ /* config-skip */
  4797.   #undef HAS_SHMAT_PROTOTYPE    /**/
  4798.   
  4799.   /* USE_STAT_BLOCKS:
  4800. --- 460,466 ----
  4801.    *    but not always right so it should be emitted by the program only
  4802.    *    when HAS_SHMAT_PROTOTYPE is not defined to avoid conflicting defs.
  4803.    */
  4804. ! #undef Shmat_t     /**/ /* config-skip */
  4805.   #undef HAS_SHMAT_PROTOTYPE    /**/
  4806.   
  4807.   /* USE_STAT_BLOCKS:
  4808. ***************
  4809. *** 469,479 ****
  4810.    */
  4811.   #undef USE_STAT_BLOCKS     /**/
  4812.   
  4813. ! /* USE_STD_STDIO:
  4814. !  *    This symbol is defined if this system has a FILE structure declaring
  4815. !  *    _ptr and _cnt in stdio.h.
  4816.    */
  4817. ! #undef USE_STD_STDIO     /**/
  4818.   
  4819.   /* USE_STRUCT_COPY:
  4820.    *    This symbol, if defined, indicates that this C compiler knows how
  4821. --- 469,519 ----
  4822.    */
  4823.   #undef USE_STAT_BLOCKS     /**/
  4824.   
  4825. ! /* USE_STDIO_PTR:
  4826. !  *    This symbol is defined if the _ptr and _cnt fields (or similar)
  4827. !  *    of the stdio FILE structure can be used to access the stdio buffer
  4828. !  *    for a file handle.  If this is defined, then the FILE_ptr(fp)
  4829. !  *    and FILE_cnt(fp) macros will also be defined and should be used
  4830. !  *    to access these fields.
  4831. !  */
  4832. ! /* USE_STDIO_BASE:
  4833. !  *    This symbol is defined if the _base field (or similar) of the
  4834. !  *    stdio FILE structure can be used to access the stdio buffer for
  4835. !  *    a file handle.  If this is defined, then the FILE_base(fp) macro
  4836. !  *    will also be defined and should be used to access this field.
  4837. !  *    Also, the FILE_bufsiz(fp) macro will be defined and should be used
  4838. !  *    to determine the number of bytes in the buffer.  USE_STDIO_BASE
  4839. !  *    will never be defined unless USE_STDIO_PTR is.
  4840. !  */
  4841. ! #undef USE_STDIO_PTR     /**/
  4842. ! #undef USE_STDIO_BASE     /**/
  4843. ! /* FILE_ptr:
  4844. !  *    This macro is used to access the _ptr field (or equivalent) of the
  4845. !  *    FILE structure pointed to by its argument. This macro will always be
  4846. !  *    defined if USE_STDIO_PTR is defined.
  4847. !  */
  4848. ! /* FILE_cnt:
  4849. !  *    This macro is used to access the _cnt field (or equivalent) of the
  4850. !  *    FILE structure pointed to by its argument. This macro will always be
  4851. !  *    defined if USE_STDIO_PTR is defined.
  4852.    */
  4853. ! #ifdef USE_STDIO_PTR
  4854. ! #endif
  4855. ! /* FILE_base:
  4856. !  *    This macro is used to access the _base field (or equivalent) of the
  4857. !  *    FILE structure pointed to by its argument. This macro will always be
  4858. !  *    defined if USE_STDIO_BASE is defined.
  4859. !  */
  4860. ! /* FILE_bufsiz:
  4861. !  *    This macro is used to determine the number of bytes in the I/O
  4862. !  *    buffer pointed to by _base field (or equivalent) of the FILE
  4863. !  *    structure pointed to its argument. This macro will always be defined
  4864. !  *    if USE_STDIO_BASE is defined.
  4865. !  */
  4866. ! #ifdef USE_STDIO_BASE
  4867. ! #endif
  4868.   
  4869.   /* USE_STRUCT_COPY:
  4870.    *    This symbol, if defined, indicates that this C compiler knows how
  4871. ***************
  4872. *** 892,911 ****
  4873.   #define M_VOID            /* Xenix strikes again */     /* config-skip */
  4874.   #endif
  4875.   
  4876. ! /* EUNICE:
  4877. !  *    This symbol, if defined, indicates that the program is being compiled
  4878. !  *    under the EUNICE package under VMS.  The program will need to handle
  4879. !  *    things like files that don't go away the first time you unlink them,
  4880. !  *    due to version numbering.  It will also need to compensate for lack
  4881. !  *    of a respectable link() command.
  4882.    */
  4883.   /* VMS:
  4884.    *    This symbol, if defined, indicates that the program is running under
  4885. !  *    VMS.  It is currently only set in conjunction with the EUNICE symbol.
  4886. !  */
  4887. ! #define EUNICE        /**/
  4888. ! /* This symbol is automagically defined by all VMS C compilers I've seen.
  4889.    * Just in case, however . . . */
  4890.   #ifndef VMS
  4891.   #define VMS        /**/
  4892. --- 932,946 ----
  4893.   #define M_VOID            /* Xenix strikes again */     /* config-skip */
  4894.   #endif
  4895.   
  4896. ! /* UNLINK_ALL_VERSIONS:
  4897. !  *    This symbol, if defined, indicates that the program should arrange
  4898. !  *    to remove all versions of a file if unlink() is called.
  4899.    */
  4900. + #undef UNLINK_ALL_VERSIONS        /**/
  4901.   /* VMS:
  4902.    *    This symbol, if defined, indicates that the program is running under
  4903. !  *    VMS.  It's symbol automagically defined by all VMS C compilers I've seen.
  4904.    * Just in case, however . . . */
  4905.   #ifndef VMS
  4906.   #define VMS        /**/
  4907. Index: vms/ext/MM_VMS.pm
  4908. *** perl5.001h/vms/ext/MM_VMS.pm    Sun Mar 12 03:14:28 1995
  4909. --- perl5.001i/vms/ext/MM_VMS.pm    Mon May 22 15:52:48 1995
  4910. ***************
  4911. *** 83,89 ****
  4912.   # FULLEXT = Pathname for extension directory (eg DBD/Oracle).
  4913.   # BASEEXT = Basename part of FULLEXT. May be just equal FULLEXT.
  4914.   # ROOTEXT = Directory part of FULLEXT with leading slash (e.g /DBD)
  4915. ! FULLEXT = ",vmsify($att{FULLEXT}),"
  4916.   BASEEXT = $att{BASEEXT}
  4917.   ROOTEXT = ",($att{ROOTEXT} eq '') ? '[]' : vmspath($att{ROOTEXT}),"
  4918.   
  4919. --- 83,89 ----
  4920.   # FULLEXT = Pathname for extension directory (eg DBD/Oracle).
  4921.   # BASEEXT = Basename part of FULLEXT. May be just equal FULLEXT.
  4922.   # ROOTEXT = Directory part of FULLEXT with leading slash (e.g /DBD)
  4923. ! FULLEXT = ",vmspath($att{FULLEXT}),"
  4924.   BASEEXT = $att{BASEEXT}
  4925.   ROOTEXT = ",($att{ROOTEXT} eq '') ? '[]' : vmspath($att{ROOTEXT}),"
  4926.   
  4927. Index: vms/ext/VMS/stdio/stdio.xs
  4928. *** perl5.001h/vms/ext/VMS/stdio/stdio.xs    Sun Mar 12 03:14:34 1995
  4929. --- perl5.001i/vms/ext/VMS/stdio/stdio.xs    Mon May 22 15:52:48 1995
  4930. ***************
  4931. *** 20,26 ****
  4932.   
  4933.   /* Use type for FILE * from Perl's XSUB typemap.  This is a bit
  4934.    * of a hack, since all Perl filehandles using this type will permit
  4935. !  * both read & write operations, but it saves to write the PPCODE
  4936.    * directly for updating the Perl filehandles.
  4937.    */
  4938.   typedef FILE * InOutStream;
  4939. --- 20,26 ----
  4940.   
  4941.   /* Use type for FILE * from Perl's XSUB typemap.  This is a bit
  4942.    * of a hack, since all Perl filehandles using this type will permit
  4943. !  * both read & write operations, but it saves having to write the PPCODE
  4944.    * directly for updating the Perl filehandles.
  4945.    */
  4946.   typedef FILE * InOutStream;
  4947. ***************
  4948. *** 46,51 ****
  4949. --- 46,52 ----
  4950.             if (*(name+1) == '>') *mode = 'a', name += 2;
  4951.             else *mode = 'w',  name++;
  4952.           }
  4953. +         else if (*name == '<') name++;
  4954.           myargc = items - 1;
  4955.           for (i = 0; i < myargc; i++) args[i] = SvPV(ST(i+1),na);
  4956.           /* This hack brought to you by C's opaque arglist management */
  4957. Index: vms/perlvms.pod
  4958. *** perl5.001h/vms/perlvms.pod    Mon Mar  6 20:00:00 1995
  4959. --- perl5.001i/vms/perlvms.pod    Tue May 23 11:02:52 1995
  4960. ***************
  4961. *** 271,277 ****
  4962.       setpwent, shift, sin, sleep, sort, splice, split,
  4963.       sprintf, sqrt, srand, stat, study, substr, sysread,
  4964.       system*, syswrite, tell, telldir, tie, time, times*,
  4965. !     tr///, uc, ucfirst, umask, undef, unlink, unpack,
  4966.       untie, unshift, use, utime*, values, vec, wait,
  4967.       waitpid*, wantarray, warn, write, y///
  4968.   
  4969. --- 271,277 ----
  4970.       setpwent, shift, sin, sleep, sort, splice, split,
  4971.       sprintf, sqrt, srand, stat, study, substr, sysread,
  4972.       system*, syswrite, tell, telldir, tie, time, times*,
  4973. !     tr///, uc, ucfirst, umask, undef, unlink*, unpack,
  4974.       untie, unshift, use, utime*, values, vec, wait,
  4975.       waitpid*, wantarray, warn, write, y///
  4976.   
  4977. ***************
  4978. *** 413,418 ****
  4979. --- 413,449 ----
  4980.   subprocesses spawned using L<fork> and L<exec>; it will not
  4981.   accumulate the times of suprocesses spawned via pipes, L<system>,
  4982.   or backticks.
  4983. + =item unlink LIST
  4984. + C<unlink> will delete the highest version of a file only; in
  4985. + order to delete all versions, you need to say
  4986. +     1 while (unlink LIST);
  4987. + You may need to make this change to scripts written for a
  4988. + Unix system which expect that after a call to C<unlink>,
  4989. + no files with the names passed to C<unlink> will exist.
  4990. + (Note: This can be changed at compile time by including
  4991. + C<#define UNLINK_ALL_VERSIONS> in config.h.
  4992. + C<unlink> will delete a file if at all possible, even if it
  4993. + requires changing file protection (though it won't try to
  4994. + change the protection of the parent directory).  You can tell
  4995. + whether you've got explicit delete access to a file by using the
  4996. + C<VMS::Filespec::candelete> operator.  For instance, in order
  4997. + to delete only files to which you have delete access, you could
  4998. + say something like
  4999. +     sub safe_unlink {
  5000. +         my($file,$num);
  5001. +         foreach $file (@_) {
  5002. +             next unless VMS::Filespec::candelete($file);
  5003. +             $num += unlink $file;
  5004. +         }
  5005. +         $num;
  5006. +     }
  5007. + Finally, if C<unlink> has to change the file protection to
  5008. + delete the file, and you interrupt it in midstream, the file
  5009. + may be left intact, but with a changed ACL allowing you delete
  5010. + access.
  5011.   
  5012.   =item utime LIST
  5013.   
  5014. Index: vms/vms.c
  5015. Prereq:  2.2 
  5016. *** perl5.001h/vms/vms.c    Sun Mar 12 03:14:43 1995
  5017. --- perl5.001i/vms/vms.c    Mon May 22 15:52:47 1995
  5018. ***************
  5019. *** 1100,1106 ****
  5020.   
  5021.     if (path == NULL) return NULL;
  5022.     if (buf) rslt = buf;
  5023. !   else if (ts) New(7016,rslt,strlen(path)+1,char);
  5024.     else rslt = __tovmsspec_retbuf;
  5025.     if (strpbrk(path,"]:>") ||
  5026.         (dirend = strrchr(path,'/')) == NULL) {
  5027. --- 1100,1106 ----
  5028.   
  5029.     if (path == NULL) return NULL;
  5030.     if (buf) rslt = buf;
  5031. !   else if (ts) New(7016,rslt,strlen(path)+3,char);
  5032.     else rslt = __tovmsspec_retbuf;
  5033.     if (strpbrk(path,"]:>") ||
  5034.         (dirend = strrchr(path,'/')) == NULL) {
  5035. Index: x2p/Makefile.SH
  5036. *** perl5.001h/x2p/Makefile.SH    Wed Mar 15 14:28:39 1995
  5037. --- perl5.001i/x2p/Makefile.SH    Fri May 26 10:33:48 1995
  5038. ***************
  5039. *** 26,33 ****
  5040.   
  5041.   CC = $cc
  5042.   BYACC = $byacc
  5043. - mansrc = $mansrc
  5044. - manext = $manext
  5045.   LDFLAGS = $ldflags
  5046.   SMALL = $small
  5047.   LARGE = $large $split
  5048. --- 26,31 ----
  5049. ***************
  5050. *** 52,57 ****
  5051. --- 50,57 ----
  5052.   
  5053.   sh = Makefile.SH cflags.SH find2perl.SH s2p.SH
  5054.   
  5055. + addedbyconf = Makefile cflags find2perl s2p
  5056.   h = EXTERN.h INTERN.h ../config.h handy.h hash.h a2p.h str.h util.h
  5057.   
  5058.   c = hash.c $(mallocsrc) str.c util.c walk.c
  5059. ***************
  5060. *** 94,100 ****
  5061.   
  5062.   realclean: clean
  5063.       rm -f *.orig core $(addedbyconf) all malloc.c
  5064. !     rm -f Makefile cflags find2perl s2p makefile makefile.old
  5065.   
  5066.   # The following lint has practically everything turned on.  Unfortunately,
  5067.   # you have to wade through a lot of mumbo jumbo that can't be suppressed.
  5068. --- 94,100 ----
  5069.   
  5070.   realclean: clean
  5071.       rm -f *.orig core $(addedbyconf) all malloc.c
  5072. !     rm -f makefile makefile.old
  5073.   
  5074.   # The following lint has practically everything turned on.  Unfortunately,
  5075.   # you have to wade through a lot of mumbo jumbo that can't be suppressed.
  5076. Index: x2p/str.c
  5077. *** perl5.001h/x2p/str.c    Thu Jan 19 19:08:22 1995
  5078. --- perl5.001i/x2p/str.c    Tue May 23 14:12:27 1995
  5079. ***************
  5080. *** 287,293 ****
  5081.   register STR *str;
  5082.   register FILE *fp;
  5083.   {
  5084. ! #ifdef USE_STD_STDIO        /* Here is some breathtakingly efficient cheating */
  5085.   
  5086.       register char *bp;        /* we're going to steal some values */
  5087.       register int cnt;        /*  from the stdio struct and put EVERYTHING */
  5088. --- 287,293 ----
  5089.   register STR *str;
  5090.   register FILE *fp;
  5091.   {
  5092. ! #ifdef USE_STDIO_PTR        /* Here is some breathtakingly efficient cheating */
  5093.   
  5094.       register char *bp;        /* we're going to steal some values */
  5095.       register int cnt;        /*  from the stdio struct and put EVERYTHING */
  5096. ***************
  5097. *** 296,308 ****
  5098.       int i;
  5099.       int bpx;
  5100.   
  5101. !     cnt = fp->_cnt;            /* get count into register */
  5102.       str->str_nok = 0;            /* invalidate number */
  5103.       str->str_pok = 1;            /* validate pointer */
  5104.       if (str->str_len <= cnt)        /* make sure we have the room */
  5105.       GROWSTR(&(str->str_ptr), &(str->str_len), cnt+1);
  5106.       bp = str->str_ptr;            /* move these two too to registers */
  5107. !     ptr = fp->_ptr;
  5108.       for (;;) {
  5109.       while (--cnt >= 0) {
  5110.           if ((*bp++ = *ptr++) == newline)
  5111. --- 296,308 ----
  5112.       int i;
  5113.       int bpx;
  5114.   
  5115. !     cnt = FILE_cnt(fp);            /* get count into register */
  5116.       str->str_nok = 0;            /* invalidate number */
  5117.       str->str_pok = 1;            /* validate pointer */
  5118.       if (str->str_len <= cnt)        /* make sure we have the room */
  5119.       GROWSTR(&(str->str_ptr), &(str->str_len), cnt+1);
  5120.       bp = str->str_ptr;            /* move these two too to registers */
  5121. !     ptr = FILE_ptr(fp);
  5122.       for (;;) {
  5123.       while (--cnt >= 0) {
  5124.           if ((*bp++ = *ptr++) == newline)
  5125. ***************
  5126. *** 314,324 ****
  5127.           }
  5128.       }
  5129.       
  5130. !     fp->_cnt = cnt;            /* deregisterize cnt and ptr */
  5131. !     fp->_ptr = ptr;
  5132.       i = _filbuf(fp);        /* get more characters */
  5133. !     cnt = fp->_cnt;
  5134. !     ptr = fp->_ptr;            /* reregisterize cnt and ptr */
  5135.   
  5136.       bpx = bp - str->str_ptr;    /* prepare for possible relocation */
  5137.       GROWSTR(&(str->str_ptr), &(str->str_len), str->str_cur + cnt + 1);
  5138. --- 314,324 ----
  5139.           }
  5140.       }
  5141.       
  5142. !     FILE_cnt(fp) = cnt;        /* deregisterize cnt and ptr */
  5143. !     FILE_ptr(fp) = ptr;
  5144.       i = _filbuf(fp);        /* get more characters */
  5145. !     cnt = FILE_cnt(fp);
  5146. !     ptr = FILE_ptr(fp);        /* reregisterize cnt and ptr */
  5147.   
  5148.       bpx = bp - str->str_ptr;    /* prepare for possible relocation */
  5149.       GROWSTR(&(str->str_ptr), &(str->str_len), str->str_cur + cnt + 1);
  5150. ***************
  5151. *** 334,345 ****
  5152.       }
  5153.   
  5154.   thats_all_folks:
  5155. !     fp->_cnt = cnt;            /* put these back or we're in trouble */
  5156. !     fp->_ptr = ptr;
  5157.       *bp = '\0';
  5158.       str->str_cur = bp - str->str_ptr;    /* set length */
  5159.   
  5160. ! #else /* !USE_STD_STDIO */    /* The big, slow, and stupid way */
  5161.   
  5162.       static char buf[4192];
  5163.   
  5164. --- 334,345 ----
  5165.       }
  5166.   
  5167.   thats_all_folks:
  5168. !     FILE_cnt(fp) = cnt;            /* put these back or we're in trouble */
  5169. !     FILE_ptr(fp) = ptr;
  5170.       *bp = '\0';
  5171.       str->str_cur = bp - str->str_ptr;    /* set length */
  5172.   
  5173. ! #else /* !USE_STDIO_PTR */    /* The big, slow, and stupid way */
  5174.   
  5175.       static char buf[4192];
  5176.   
  5177. ***************
  5178. *** 348,354 ****
  5179.       else
  5180.       str_set(str, No);
  5181.   
  5182. ! #endif /* USE_STD_STDIO */
  5183.   
  5184.       return str->str_cur ? str->str_ptr : Nullch;
  5185.   }
  5186. --- 348,354 ----
  5187.       else
  5188.       str_set(str, No);
  5189.   
  5190. ! #endif /* USE_STDIO_PTR */
  5191.   
  5192.       return str->str_cur ? str->str_ptr : Nullch;
  5193.   }
  5194.  
  5195.  
  5196. End of patch.
  5197.