home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / perl501m.zip / patches / patch.1d < prev    next >
Text File  |  1995-04-20  |  63KB  |  2,295 lines

  1. # This is my patch  patch.1d for perl5.001.  See description below.
  2. #    Andy Dougherty        doughera@lafcol.lafayette.edu
  3. #
  4. # Please execute the following commands in your perl directory
  5. # and then apply the patch below.
  6. #
  7. mv pod/pod2latex pod/pod2latex.SH
  8. mv pod/pod2html pod/pod2html.SH
  9. mv pod/pod2man pod/pod2man.SH
  10. exit 0
  11.  
  12. This is my patch  patch.1d  for perl5.001.   A complete description is
  13. given below, but here are the basic changes.
  14.  
  15.     1.  Linux:  more tweaks so dynamic loading works under ELF
  16.     or (maybe) under dld.  There are so many different dld versions
  17.     and so many different tool sets, it's hard to be more specific.
  18.     2.  perl -e '$v=1e19+0' no longer dumps core on Intel x86
  19.     processors.
  20.     3.  pod stuff:  
  21.     a.  Wrapped pod2* translators in a 'SH' wrapper so that they
  22.         have the proper path to perl at the top.
  23.     b.  Fixed pod/ Makefile to call the pod2html translator
  24.         correctly.  (Why do pod2man and pod2html work differently?)
  25.     c.  Include latest (Feb 2, 1995) version of pod2html, fresh from
  26.         ftp.metronet.com.
  27.     4.  MakeMaker 4.093.
  28.     5.  GIMME and installperl patches from Tim Bunce.
  29.     6.  Miscellaneous hint file updates.
  30.     
  31. To apply, change to your perl directory, run the commands above, then
  32. apply with 
  33.     patch -p1 -N  < thispatch.
  34.  
  35. If you've applied any of my "unofficial" patches since patch.1c, you
  36. should probably remove them first with a patch -R.  Otherwise, you will
  37. get rejects from this patch.
  38.  
  39.     Patch and enjoy,
  40.  
  41.     Andy Dougherty            doughera@lafcol.lafayette.edu
  42.     Dept. of Physics
  43.     Lafayette College, Easton PA
  44.  
  45.  
  46. Configure
  47.     Allow ' ' to mean 'none' in a few more places.  This provides
  48.     a way for hint files to set something to an empty value and to
  49.     ensure that the empty value will be maintained when config.sh is
  50.     reused.
  51.  
  52.     Fix silly ld typo that prevented hint file from actually setting
  53.     $ld.
  54.  
  55.  
  56. MANIFEST
  57.     Now has pod/pod2*.SH.
  58.  
  59. Makefile.SH
  60.     Remove old libperl.a instead of blindly adding to it.  Failure to
  61.     do this causes a problem if you originally used perl's malloc but
  62.     later changed your mind.  The old malloc.o would still be in
  63.     libperl.a
  64.     
  65. ext/DynaLoader/dl_dlopen.xs
  66.     Use strerror(errno) instead of dlerror for NetBSD.
  67.  
  68. handy.h
  69.     Clarify & rework HAS_BOOL comments and code.  No functionality is
  70.     changed, but I hope this is easier to follow.
  71.  
  72. hints/freebsd.sh
  73. hints/isc.sh
  74. hints/linux.sh
  75. hints/netbsd.sh
  76. hints/next_3_0.sh
  77. hints/next_3_2.sh
  78. hints/sco_3.sh
  79.     Miscellaneous updates.  See the individual comments in the patches.
  80.  
  81. installperl
  82.     Run ranlib on installed .a libraries.
  83.     unlink() old versions of files before installing new ones, in
  84.     case the old ones are are write-protected.
  85.  
  86. lib/ExtUtils/MakeMaker.pm
  87.     Updated to 4.092 by Andreas Koenig.  This features better
  88.     selection of shared library versions and shorter command lines for
  89.     static linking of new extensions.  It is also more robust against
  90.     broken csh on Linux.  (There's still a glob in the library
  91.     selection loop, however.)
  92.     
  93.     I further updated it to 4.093 because I didn't like the 
  94.     distclean target :-).  It's just a sloppy quick fix, but that's
  95.     all I have time for now.  I've also worked on the library version
  96.     selection stuff and the $(CC) command stuff a little more.
  97.  
  98. lib/TieHash.pm
  99.     Overdue removal of ambiguous ${pack} construction.
  100.  
  101. perl.h
  102.     New U_V macro to cast to the UV type (usually unsigned long).
  103.  
  104. pod/Makefile
  105.     Updated.
  106.  
  107. pod/pod2html.SH
  108.     Updated.
  109.     Converted to 'SH' wrapper so correct #!/path/to/perl gets used.
  110.  
  111. pod/pod2latex.SH
  112. pod/pod2man.SH
  113.     Converted to 'SH' wrapper so correct #!/path/to/perl gets used.
  114.  
  115. pp_hot.c
  116.     GIMME patch from Tim Bunce.
  117.  
  118. pp_sys.c
  119.     Allow use of F_FREESP fcntl() directive to truncate files.
  120.  
  121.     If HAS_MKDIR is not defined, the stat() call to check the result
  122.     of the system "mkdir" call was failing because the filename
  123.     pointer no longer pointed to the right location.
  124.  
  125. sv.c
  126.     Protect some (UV) casts by the new U_V() macro.
  127.  
  128. util.c
  129.     New cast_uv() function to support the U_V() macro, if needed.
  130.     cast_iv() and cast_uv() no longer assume 32-bit longs.
  131.     The various cast_() functions have also been simplified.
  132.  
  133. Index: Configure
  134. Prereq:  3.0.1.7 
  135. *** perl5.001c/Configure    Thu Apr  6 11:16:18 1995
  136. --- perl5.001d/Configure    Fri Apr 14 15:46:27 1995
  137. ***************
  138. *** 20,26 ****
  139.   
  140.   # $Id: Head.U,v 3.0.1.7 1995/03/21 08:46:15 ram Exp $
  141.   #
  142. ! # Generated on Thu Apr  6 11:09:32 EDT 1995 [metaconfig 3.0 PL53]
  143.   
  144.   cat >/tmp/c1$$ <<EOF
  145.   ARGGGHHHH!!!!!
  146. --- 20,26 ----
  147.   
  148.   # $Id: Head.U,v 3.0.1.7 1995/03/21 08:46:15 ram Exp $
  149.   #
  150. ! # Generated on Fri Apr 14 15:43:12 EDT 1995 [metaconfig 3.0 PL53]
  151.   
  152.   cat >/tmp/c1$$ <<EOF
  153.   ARGGGHHHH!!!!!
  154. ***************
  155. *** 4241,4247 ****
  156.       rp="Any special flags to pass to $cc -c to compile shared library modules?"
  157.       . ./myread
  158.       case "$ans" in
  159. !     none) cccdlflags='' ;;
  160.       *) cccdlflags="$ans" ;;
  161.       esac
  162.   
  163. --- 4241,4247 ----
  164.       rp="Any special flags to pass to $cc -c to compile shared library modules?"
  165.       . ./myread
  166.       case "$ans" in
  167. !     none) cccdlflags=' ' ;;
  168.       *) cccdlflags="$ans" ;;
  169.       esac
  170.   
  171. ***************
  172. *** 4278,4288 ****
  173.           fi
  174.           rm -f try.c a.out
  175.           ;;
  176. !     *)    dflt=ld
  177.           ;;
  178.       esac
  179.   
  180. !     rp="What comnmand should be used to create dynamic libraries?"
  181.       . ./myread
  182.       ld="$ans"
  183.   
  184. --- 4278,4288 ----
  185.           fi
  186.           rm -f try.c a.out
  187.           ;;
  188. !     *)    dflt="$ld"
  189.           ;;
  190.       esac
  191.   
  192. !     rp="What command should be used to create dynamic libraries?"
  193.       . ./myread
  194.       ld="$ans"
  195.   
  196. ***************
  197. *** 4311,4317 ****
  198.       rp="Any special flags to pass to $ld to create a dynamically loaded library?"
  199.       . ./myread
  200.       case "$ans" in
  201. !     none) lddlflags='' ;;
  202.       *) lddlflags="$ans" ;;
  203.       esac
  204.   
  205. --- 4311,4317 ----
  206.       rp="Any special flags to pass to $ld to create a dynamically loaded library?"
  207.       . ./myread
  208.       case "$ans" in
  209. !     none) lddlflags=' ' ;;
  210.       *) lddlflags="$ans" ;;
  211.       esac
  212.   
  213. ***************
  214. *** 4335,4341 ****
  215.       rp="Any special flags to pass to $cc to use dynamic loading?"
  216.       . ./myread
  217.       case "$ans" in
  218. !     none) ccdlflags='' ;;
  219.       *) ccdlflags="$ans" ;;
  220.       esac
  221.       ;;
  222. --- 4335,4341 ----
  223.       rp="Any special flags to pass to $cc to use dynamic loading?"
  224.       . ./myread
  225.       case "$ans" in
  226. !     none) ccdlflags=' ' ;;
  227.       *) ccdlflags="$ans" ;;
  228.       esac
  229.       ;;
  230. ***************
  231. *** 6438,6444 ****
  232.   
  233.   EOM
  234.       case "$dynamic_ext" in
  235. !     ''|' ') dflt="$avail_ext" ;;
  236.       *)    dflt="$dynamic_ext" ;;
  237.       esac
  238.       case "$dflt" in
  239. --- 6438,6444 ----
  240.   
  241.   EOM
  242.       case "$dynamic_ext" in
  243. !     '') dflt="$avail_ext" ;;
  244.       *)    dflt="$dynamic_ext" ;;
  245.       esac
  246.       case "$dflt" in
  247. ***************
  248. *** 6447,6458 ****
  249.       rp="What extensions do you wish to load dynamically?"
  250.       . ./myread
  251.       case "$ans" in
  252. !     none) dynamic_ext='' ;;
  253.       *) dynamic_ext="$ans" ;;
  254.       esac
  255.   
  256.       case "$static_ext" in
  257. !     ''|' ')
  258.           : Exclude those already listed in dynamic linking
  259.           dflt=''
  260.           for xxx in $avail_ext; do
  261. --- 6447,6458 ----
  262.       rp="What extensions do you wish to load dynamically?"
  263.       . ./myread
  264.       case "$ans" in
  265. !     none) dynamic_ext=' ' ;;
  266.       *) dynamic_ext="$ans" ;;
  267.       esac
  268.   
  269.       case "$static_ext" in
  270. !     '')
  271.           : Exclude those already listed in dynamic linking
  272.           dflt=''
  273.           for xxx in $avail_ext; do
  274. ***************
  275. *** 6475,6481 ****
  276.       rp="What extensions do you wish to load statically?"
  277.       . ./myread
  278.       case "$ans" in
  279. !     none) static_ext='' ;;
  280.       *) static_ext="$ans" ;;
  281.       esac
  282.       ;;
  283. --- 6475,6481 ----
  284.       rp="What extensions do you wish to load statically?"
  285.       . ./myread
  286.       case "$ans" in
  287. !     none) static_ext=' ' ;;
  288.       *) static_ext="$ans" ;;
  289.       esac
  290.       ;;
  291. ***************
  292. *** 6486,6492 ****
  293.   
  294.   EOM
  295.       case "$static_ext" in
  296. !     ''|' ') dflt="$avail_ext" ;;
  297.       *)    dflt="$static_ext" ;;
  298.       esac
  299.   
  300. --- 6486,6492 ----
  301.   
  302.   EOM
  303.       case "$static_ext" in
  304. !     '') dflt="$avail_ext" ;;
  305.       *)    dflt="$static_ext" ;;
  306.       esac
  307.   
  308. ***************
  309. *** 6496,6502 ****
  310.       rp="What extensions do you wish to include?"
  311.       . ./myread
  312.       case "$ans" in
  313. !     none) static_ext='' ;;
  314.       *) static_ext="$ans" ;;
  315.       esac
  316.       ;;
  317. --- 6496,6502 ----
  318.       rp="What extensions do you wish to include?"
  319.       . ./myread
  320.       case "$ans" in
  321. !     none) static_ext=' ' ;;
  322.       *) static_ext="$ans" ;;
  323.       esac
  324.       ;;
  325. Index: MANIFEST
  326. *** perl5.001c/MANIFEST    Sun Mar 12 22:14:06 1995
  327. --- perl5.001d/MANIFEST    Thu Apr 13 10:38:43 1995
  328. ***************
  329. *** 402,410 ****
  330.   pod/perlsyn.pod        Syntax info
  331.   pod/perltrap.pod    Trap info
  332.   pod/perlvar.pod        Variable info
  333. ! pod/pod2html        Translator to turn pod into HTML
  334. ! pod/pod2latex        Translator to turn pod into LaTeX
  335. ! pod/pod2man        Translator to turn pod into manpage
  336.   pod/splitman        Splits perlfunc into multiple man pages
  337.   pp.c            Push/Pop code
  338.   pp.h            Push/Pop code defs
  339. --- 402,410 ----
  340.   pod/perlsyn.pod        Syntax info
  341.   pod/perltrap.pod    Trap info
  342.   pod/perlvar.pod        Variable info
  343. ! pod/pod2html.SH        Precursor for translator to turn pod into HTML
  344. ! pod/pod2latex.SH    Precursor for translator to turn pod into LaTeX
  345. ! pod/pod2man.SH        Precursor for translator to turn pod into manpage
  346.   pod/splitman        Splits perlfunc into multiple man pages
  347.   pp.c            Push/Pop code
  348.   pp.h            Push/Pop code defs
  349. Index: Makefile.SH
  350. *** perl5.001c/Makefile.SH    Thu Apr  6 13:59:46 1995
  351. --- perl5.001d/Makefile.SH    Sat Apr 15 11:32:18 1995
  352. ***************
  353. *** 227,232 ****
  354. --- 227,233 ----
  355.   ;;
  356.   *)
  357.   $spitshell >>Makefile <<'!NO!SUBS!'
  358. +     rm -f $(perllib)
  359.       ar rcu $(perllib) perl.o $(obj)
  360.       @$(ranlib) $(perllib)
  361.   !NO!SUBS!
  362. ***************
  363. *** 329,334 ****
  364. --- 330,336 ----
  365.   
  366.   realclean: clean
  367.       -cd x2p; $(MAKE) realclean
  368. +     -cd pod; $(MAKE) realclean
  369.       @for x in $(DYNALOADER) $(dynamic_ext) $(static_ext) ; do \
  370.       sh ext/util/make_ext realclean $$x ; \
  371.       done
  372. Index: ext/DynaLoader/dl_dlopen.xs
  373. *** perl5.001c/ext/DynaLoader/dl_dlopen.xs    Tue Oct 18 12:28:19 1994
  374. --- perl5.001d/ext/DynaLoader/dl_dlopen.xs    Thu Apr 13 10:15:28 1995
  375. ***************
  376. *** 115,121 ****
  377.   #endif
  378.   
  379.   #ifndef HAS_DLERROR
  380. ! #define dlerror() "Unknown error - dlerror() not implemented"
  381.   #endif
  382.   
  383.   
  384. --- 115,125 ----
  385.   #endif
  386.   
  387.   #ifndef HAS_DLERROR
  388. ! # ifdef __NetBSD__
  389. ! #  define dlerror() strerror(errno)
  390. ! # else
  391. ! #  define dlerror() "Unknown error - dlerror() not implemented"
  392. ! # endif
  393.   #endif
  394.   
  395.   
  396. Index: handy.h
  397. *** perl5.001c/handy.h    Sun Apr  2 16:13:10 1995
  398. --- perl5.001d/handy.h    Mon Apr 10 16:29:06 1995
  399. ***************
  400. *** 24,38 ****
  401.   #define Nullsv Null(SV*)
  402.   
  403.   /* bool is built-in for g++-2.6.3, which might be used for an extension.
  404. !    gcc-2.6.2 under Linux defines _G_HAVE_BOOL to 0, and does not
  405. !    define bool. */
  406. ! #if !defined(HAS_BOOL) && !(_G_HAVE_BOOL)
  407. ! #ifdef UTS
  408. ! #define bool int
  409. ! #else
  410. ! #define bool char
  411.   #endif
  412. - #endif /* !defined(HAS_BOOL) && !(_G_HAVE_BOOL) */
  413.   
  414.   #ifdef TRUE
  415.   #undef TRUE
  416. --- 24,49 ----
  417.   #define Nullsv Null(SV*)
  418.   
  419.   /* bool is built-in for g++-2.6.3, which might be used for an extension.
  420. !    If the extension includes <_G_config.h> before this file then
  421. !    _G_HAVE_BOOL will be properly set.  If, however, the extension includes
  422. !    this file first, then you will have to manually set -DHAS_BOOL in 
  423. !    your command line to avoid a conflict.
  424. ! */
  425. ! #ifdef _G_HAVE_BOOL
  426. ! # if _G_HAVE_BOOL
  427. ! #  ifndef HAS_BOOL
  428. ! #   define HAS_BOOL 1
  429. ! #  endif
  430. ! # endif
  431. ! #endif
  432. ! #ifndef HAS_BOOL
  433. ! # ifdef UTS
  434. ! #  define bool int
  435. ! # else
  436. ! #  define bool char
  437. ! # endif
  438.   #endif
  439.   
  440.   #ifdef TRUE
  441.   #undef TRUE
  442. Index: hints/cxux.sh
  443. *** perl5.001c/hints/cxux.sh    Tue Feb 28 19:42:47 1995
  444. --- perl5.001d/hints/cxux.sh    Fri Apr 14 10:40:15 1995
  445. ***************
  446. *** 72,78 ****
  447.   cc='/bin/cc -Xa'
  448.   cccdlflags='-Zelf -Zpic'
  449.   ccdlflags='-Zelf -Zlink=dynamic -Wl,-Bexport -u sigaction'
  450. ! lddlflags='-G'
  451.   
  452.   # Configure imagines that stdio.h is "standard", but it really isn't.
  453.   # Things like the -T and -B file test operators (on file handles) fail when
  454. --- 72,78 ----
  455.   cc='/bin/cc -Xa'
  456.   cccdlflags='-Zelf -Zpic'
  457.   ccdlflags='-Zelf -Zlink=dynamic -Wl,-Bexport -u sigaction'
  458. ! lddlflags='-Zlink=so'
  459.   
  460.   # Configure imagines that stdio.h is "standard", but it really isn't.
  461.   # Things like the -T and -B file test operators (on file handles) fail when
  462. Index: hints/freebsd.sh
  463. *** perl5.001c/hints/freebsd.sh    Thu Jan 19 19:08:36 1995
  464. --- perl5.001d/hints/freebsd.sh    Tue Apr 11 11:34:29 1995
  465. ***************
  466. *** 1,4 ****
  467. ! # Oringal based on info from
  468.   # Carl M. Fongheiser <cmf@ins.infonet.net>
  469.   # Date: Thu, 28 Jul 1994 19:17:05 -0500 (CDT)
  470.   #
  471. --- 1,4 ----
  472. ! # Original based on info from
  473.   # Carl M. Fongheiser <cmf@ins.infonet.net>
  474.   # Date: Thu, 28 Jul 1994 19:17:05 -0500 (CDT)
  475.   #
  476. ***************
  477. *** 6,26 ****
  478.   # Ollivier Robert <Ollivier.Robert@keltia.frmug.fr.net>
  479.   # Date: Wed, 28 Sep 1994 00:37:46 +0100 (MET)
  480.   #
  481.   case "$osvers" in
  482.   0.*|1.0*)
  483.       usedl="$undef"
  484.       ;;
  485. ! *)    d_dlopen="$define"
  486.       cccdlflags='-DPIC -fpic'
  487. !     lddlflags='-Bshareable'
  488.       malloctype='void *'
  489.       groupstype='int'
  490.       d_setregid='undef'
  491.       d_setreuid='undef'
  492.       d_setrgid='undef'
  493.       d_setruid='undef'
  494. !     i_unistd='undef'
  495.       ;;
  496.   esac
  497.   # Avoid telldir prototype conflict in pp_sys.c  (FreeBSD uses const DIR *)
  498.   pp_sys_cflags='ccflags="$ccflags -DHAS_TELLDIR_PROTOTYPE"'
  499. --- 6,50 ----
  500.   # Ollivier Robert <Ollivier.Robert@keltia.frmug.fr.net>
  501.   # Date: Wed, 28 Sep 1994 00:37:46 +0100 (MET)
  502.   #
  503. + # Additional 2.* defines from
  504. + # Ollivier Robert <Ollivier.Robert@keltia.frmug.fr.net>
  505. + # Date: Sat, 8 Apr 1995 20:53:41 +0200 (MET DST)
  506. + #
  507. + # FreeBSD has the dynamic loading dl*() functions in /usr/lib/crt0.o,
  508. + # so Configure doesn't find them (unless you abandon the nm scan).
  509. + #
  510. + # The two flags "-fpic -DPIC" are used to indicate a
  511. + # will-be-shared object.  Configure will guess the -fpic, (and the
  512. + # -DPIC is not used by perl proper) but the full define is included to 
  513. + # be consistent with the FreeBSD general shared libs building process.
  514. + #
  515. + # setreuid and friends are inherently broken in all versions of FreeBSD.
  516. + #
  517.   case "$osvers" in
  518.   0.*|1.0*)
  519.       usedl="$undef"
  520.       ;;
  521. ! 1.1*)    d_dlopen="$define"
  522.       cccdlflags='-DPIC -fpic'
  523. !     lddlflags='-Bshareable $lddlflags'
  524.       malloctype='void *'
  525.       groupstype='int'
  526.       d_setregid='undef'
  527.       d_setreuid='undef'
  528.       d_setrgid='undef'
  529.       d_setruid='undef'
  530. !     ;;
  531. ! *)
  532. !     d_dlopen="$define"
  533. !     cccdlflags='-DPIC -fpic'
  534. !     lddlflags='-Bshareable $lddlflags'
  535. !     d_setregid='undef'
  536. !     d_setreuid='undef'
  537. !     d_setrgid='undef'
  538. !     d_setruid='undef'
  539.       ;;
  540.   esac
  541.   # Avoid telldir prototype conflict in pp_sys.c  (FreeBSD uses const DIR *)
  542. + # Configure should test for this.  Volunteers?
  543.   pp_sys_cflags='ccflags="$ccflags -DHAS_TELLDIR_PROTOTYPE"'
  544. Index: hints/isc.sh
  545. *** perl5.001c/hints/isc.sh    Tue Oct 18 12:33:12 1994
  546. --- perl5.001d/hints/isc.sh    Sat Apr 15 10:30:51 1995
  547. ***************
  548. *** 6,14 ****
  549.   #
  550.   # Use Configure -Dcc=gcc to use gcc
  551.   #
  552. ! set `echo X "$libswanted "| sed -e 's/ c / /'`
  553.   shift
  554.   libswanted="$*"
  555.   case "$cc" in
  556.   *gcc*)    ccflags="$ccflags -posix"
  557.       ldflags="$ldflags -posix"
  558. --- 6,24 ----
  559.   #
  560.   # Use Configure -Dcc=gcc to use gcc
  561.   #
  562. ! # We don't want to explicitly mention -lc (since we're using POSIX mode.)
  563. ! # We also don't want -lx (the Xenix compatability libraries.) The only
  564. ! # thing that it seems to pick up is chsize(), which has been reported to
  565. ! # not work.  chsize() can also be implemented via fcntl() in perl (if you
  566. ! # define -D_SYSV3).  We'll leave in -lPW since it's harmless.  Some
  567. ! # extension might eventually need it for alloca, though perl doesn't use
  568. ! # it. 
  569. ! set `echo X "$libswanted "| sed -e 's/ c / /' -e 's/ x / /'`
  570.   shift
  571.   libswanted="$*"
  572.   case "$cc" in
  573.   *gcc*)    ccflags="$ccflags -posix"
  574.       ldflags="$ldflags -posix"
  575. ***************
  576. *** 17,21 ****
  577. --- 27,37 ----
  578.       ldflags="$ldflags -Xp"
  579.           ;;
  580.   esac
  581. + # You can also include -D_SYSV3 to pick up "traditionally visible"
  582. + # symbols hidden by name-space pollution rules.  This raises some
  583. + # compilation "redefinition" warnings, but they appear harmless.
  584. + # ccflags="$ccflags -D_SYSV3"
  585.   # Pick up dbm.h in <rpcsvc/dbm.h>
  586.   ccflags="$ccflags -I/usr/include/rpcsvc"
  587. Index: hints/linux.sh
  588. *** perl5.001c/hints/linux.sh    Fri Apr  7 09:20:47 1995
  589. --- perl5.001d/hints/linux.sh    Mon Apr 10 16:20:22 1995
  590. ***************
  591. *** 24,32 ****
  592.   esac
  593.   
  594.   # Perl expects BSD style signal handling.
  595. ! ccflags="-D__USE_BSD_SIGNAL $ccflags"
  596.   
  597. ! # The following functions are gcc built-ins, but the Configure test
  598.   # may fail because it doesn't supply a proper prototype.
  599.   d_memcmp=define
  600.   d_memcpy=define
  601. --- 24,33 ----
  602.   esac
  603.   
  604.   # Perl expects BSD style signal handling.
  605. ! # gcc defines _G_HAVE_BOOL to 1, but doesn't actually supply bool.
  606. ! ccflags="-D__USE_BSD_SIGNAL -Dbool=char -DHAS_BOOL $ccflags"
  607.   
  608. ! # The following functions are gcc built-ins, but the Configure tests
  609.   # may fail because it doesn't supply a proper prototype.
  610.   d_memcmp=define
  611.   d_memcpy=define
  612. ***************
  613. *** 68,84 ****
  614.   
  615.   You appear to have ELF support.  I'll try to use it for dynamic loading.
  616.   EOM
  617. !     # Be careful not to overwrite lddlflags, since the user might
  618. !     # have specified some -L/path options on the Configure command line.
  619. !     lddlflags="-shared $lddlflags"
  620. !     ccdlflags='-rdynamic'
  621. !     so='so'
  622. !     dlext='so'
  623. !     ld=gcc
  624.   else
  625.       echo "You don't have an ELF gcc, using dld if available."
  626.       # We might possibly have a version of DLD around.
  627.       lddlflags="-r $lddlflags"
  628.       so='sa'
  629.       dlext='o'
  630.       ## If you are using DLD 3.2.4 which does not support shared libs,
  631. --- 69,83 ----
  632.   
  633.   You appear to have ELF support.  I'll try to use it for dynamic loading.
  634.   EOM
  635. !     # Configure now handles these automatically.
  636.   else
  637.       echo "You don't have an ELF gcc, using dld if available."
  638.       # We might possibly have a version of DLD around.
  639.       lddlflags="-r $lddlflags"
  640. +     # These empty values are so that Configure doesn't put in the
  641. +     # Linux ELF values.
  642. +     ccdlflags=' '
  643. +     cccdlflags=' '
  644.       so='sa'
  645.       dlext='o'
  646.       ## If you are using DLD 3.2.4 which does not support shared libs,
  647. Index: hints/netbsd.sh
  648. *** perl5.001c/hints/netbsd.sh    Fri Mar 31 15:29:47 1995
  649. --- perl5.001d/hints/netbsd.sh    Mon Apr 10 10:14:41 1995
  650. ***************
  651. *** 1,5 ****
  652.   # hints/netbsd.sh
  653. ! # netbsd keeps  dynamic loading dl*() functions in /lib/crt0.o,
  654.   # so Configure doesn't find them (unless you abandon the nm scan).
  655.   case "$osvers" in
  656.   0.9*|0.8*)
  657. --- 1,5 ----
  658.   # hints/netbsd.sh
  659. ! # netbsd keeps  dynamic loading dl*() functions in /usr/lib/crt0.o,
  660.   # so Configure doesn't find them (unless you abandon the nm scan).
  661.   case "$osvers" in
  662.   0.9*|0.8*)
  663. Index: hints/next_3_0.sh
  664. *** perl5.001c/hints/next_3_0.sh    Mon Feb 13 20:15:00 1995
  665. --- perl5.001d/hints/next_3_0.sh    Tue Apr 11 11:20:16 1995
  666. ***************
  667. *** 21,27 ****
  668. --- 21,32 ----
  669.   useposix='undef'
  670.   ldflags='-u libsys_s'
  671.   libswanted='dbm gdbm db'
  672. + #
  673.   lddlflags='-r'
  674. + # Give cccdlflags an empty value since Configure will detect we are
  675. + # using GNU cc and try to specify -fpic for cccdlflags.
  676. + cccdlflags=' '
  677. + #
  678.   i_utime='undef'
  679.   groupstype='int'
  680.   direntrytype='struct direct'
  681. Index: hints/next_3_2.sh
  682. *** perl5.001c/hints/next_3_2.sh    Wed Feb 22 14:36:59 1995
  683. --- perl5.001d/hints/next_3_2.sh    Mon Apr 10 10:14:22 1995
  684. ***************
  685. *** 5,11 ****
  686. --- 5,16 ----
  687.   POSIX_cflags='ccflags="-posix $ccflags"'
  688.   ldflags='-u libsys_s'
  689.   libswanted='dbm gdbm db'
  690.   lddlflags='-r'
  691. + # Give cccdlflags an empty value since Configure will detect we are
  692. + # using GNU cc and try to specify -fpic for cccdlflags.
  693. + cccdlflags=' '
  694.   i_utime='undef'
  695.   groupstype='int'
  696.   direntrytype='struct direct'
  697. Index: hints/powerunix.sh
  698. *** perl5.001c/hints/powerunix.sh    Tue Feb 28 19:42:55 1995
  699. --- perl5.001d/hints/powerunix.sh    Fri Apr 14 10:40:15 1995
  700. ***************
  701. *** 49,55 ****
  702.   cc='/bin/cc'
  703.   cccdlflags='-Zpic'
  704.   ccdlflags='-Zlink=dynamic -Wl,-Bexport'
  705. ! lddlflags='-G'
  706.   
  707.   # Configure imagines that stdio.h is "standard", but it really isn't.
  708.   # Things like the -T and -B file test operators (on file handles) fail when
  709. --- 49,55 ----
  710.   cc='/bin/cc'
  711.   cccdlflags='-Zpic'
  712.   ccdlflags='-Zlink=dynamic -Wl,-Bexport'
  713. ! lddlflags='-Zlink=so'
  714.   
  715.   # Configure imagines that stdio.h is "standard", but it really isn't.
  716.   # Things like the -T and -B file test operators (on file handles) fail when
  717. Index: hints/sco_3.sh
  718. *** perl5.001c/hints/sco_3.sh    Tue Oct 18 12:33:50 1994
  719. --- perl5.001d/hints/sco_3.sh    Tue Apr 11 16:14:41 1995
  720. ***************
  721. *** 22,30 ****
  722. --- 22,41 ----
  723.       ccflags="$ccflags -U M_XENIX"
  724.       optimize="$optimize -O2"
  725.       ;;
  726. + scocc)    ;;
  727.   *)
  728.       ccflags="$ccflags -W0 -U M_XENIX"
  729.       ;;
  730.   esac
  731.   i_varargs=undef
  732. + # I have received one report that nm extraction doesn't work if you're
  733. + # using the scocc compiler.  This system had the following 'myconfig'
  734. + # uname='xxx xxx 3.2 2 i386 '
  735. + # cc='scocc', optimize='-O'
  736. + usenm='false'
  737. + # If you want to use nm, you'll probably have to use nm -p.  The
  738. + # following does that for you:
  739.   nm_opt='-p'
  740. Index: installperl
  741. *** perl5.001c/installperl    Tue Apr  4 11:55:03 1995
  742. --- perl5.001d/installperl    Sat Apr 15 11:14:10 1995
  743. ***************
  744. *** 146,153 ****
  745.   makedir("$installarchlib/CORE");
  746.   foreach $file (<*.h libperl*.*>) {
  747.       cp_if_diff($file,"$installarchlib/CORE/$file");
  748. !     if ($file =~ /\.a$/ && $osname eq 'next') { 
  749. !        #on NeXTs we have to rerun ranlib after copying libraries
  750.          &cmd("$ranlib $installarchlib/CORE/$file");
  751.       }
  752.   }
  753. --- 146,154 ----
  754.   makedir("$installarchlib/CORE");
  755.   foreach $file (<*.h libperl*.*>) {
  756.       cp_if_diff($file,"$installarchlib/CORE/$file");
  757. !     if ($file =~ /\.a$/ && $osname =~ /^(next|sunos)$/) { 
  758. !        # on NeXTs and Suns we have to rerun ranlib after copying libraries
  759. !        # (maybe on all platforms which have ranlib ?)
  760.          &cmd("$ranlib $installarchlib/CORE/$file");
  761.       }
  762.   }
  763. ***************
  764. *** 342,347 ****
  765. --- 343,349 ----
  766.       -f $from || die "$0: $from not found";
  767.       system "cmp", "-s", $from, $to;
  768.       if ($?) {
  769. +     unlink($to);   # In case we don't have write permissions.
  770.       cmd("cp $from $to");
  771.       }
  772.   }
  773. Index: lib/ExtUtils/MakeMaker.pm
  774. *** perl5.001c/lib/ExtUtils/MakeMaker.pm    Mon Apr  3 15:52:47 1995
  775. --- perl5.001d/lib/ExtUtils/MakeMaker.pm    Fri Apr 14 17:18:56 1995
  776. ***************
  777. *** 1,9 ****
  778.   package ExtUtils::MakeMaker;
  779.   
  780. ! $Version = 4.091; # Last edited 31 Mar 1995 by Andreas Koenig
  781.   
  782.   use Config;
  783. - check_hints();
  784.   use Carp;
  785.   use Cwd;
  786.   
  787. --- 1,8 ----
  788.   package ExtUtils::MakeMaker;
  789.   
  790. ! $Version = 4.093; # Last edited 12 Apr 1995 by Andy Dougherty
  791.   
  792.   use Config;
  793.   use Carp;
  794.   use Cwd;
  795.   
  796. ***************
  797. *** 48,58 ****
  798.   hash table of Config.pm by supplying hints files in a C<hints/>
  799.   directory. The hints files are expected to be named like their
  800.   counterparts in C<PERL_SRC/hints>, but with an C<.pl> file name
  801. ! extension (eg. C<next_3_2.sh>). They are simply C<eval>ed by MakeMaker
  802. ! and can be used to execute commands as well as to include special
  803. ! variables. If there is no hintsfile for the actual system, but for
  804. ! some previous releases of the same operating system, the latest one of
  805. ! those is used.
  806.   
  807.   =head2 Default Makefile Behaviour
  808.   
  809. --- 47,57 ----
  810.   hash table of Config.pm by supplying hints files in a C<hints/>
  811.   directory. The hints files are expected to be named like their
  812.   counterparts in C<PERL_SRC/hints>, but with an C<.pl> file name
  813. ! extension (eg. C<next_3_2.pl>). They are simply C<eval>ed by MakeMaker
  814. ! within the WriteMakefile() subroutine, and can be used to execute
  815. ! commands as well as to include special variables. If there is no
  816. ! hintsfile for the actual system, but for some previous releases of the
  817. ! same operating system, the latest one of those is used.
  818.   
  819.   =head2 Default Makefile Behaviour
  820.   
  821. ***************
  822. *** 80,86 ****
  823.     make config     # to check if the Makefile is up-to-date
  824.     make clean      # delete local temporary files (Makefile gets renamed)
  825.     make realclean  # delete all derived files (including installed files)
  826. !   make distclean  # produce a gzipped file ready for shipping
  827.   
  828.   The macros in the produced Makefile may be overridden on the command
  829.   line to the make call as in the following example:
  830. --- 79,85 ----
  831.     make config     # to check if the Makefile is up-to-date
  832.     make clean      # delete local temporary files (Makefile gets renamed)
  833.     make realclean  # delete all derived files (including installed files)
  834. !   make dist       # produce a gzipped file ready for shipping
  835.   
  836.   The macros in the produced Makefile may be overridden on the command
  837.   line to the make call as in the following example:
  838. ***************
  839. *** 276,283 ****
  840.   =cut
  841.   
  842.   sub check_hints {
  843. !     # We allow extension-specific hints files. If we find one we act as if Config.pm
  844. !     # had read the contents
  845.   
  846.       # First we look for the best hintsfile we have
  847.       my(@goodhints);
  848. --- 275,281 ----
  849.   =cut
  850.   
  851.   sub check_hints {
  852. !     # We allow extension-specific hints files.
  853.   
  854.       # First we look for the best hintsfile we have
  855.       my(@goodhints);
  856. ***************
  857. *** 300,312 ****
  858.       closedir DIR;
  859.       return unless @goodhints; # There was no hintsfile
  860.       # the last one in lexical ordering is our choice:
  861. !     $hint=(reverse sort @goodhints)[0];
  862.   
  863.       # execute the hintsfile:
  864.       open HINTS, "hints/$hint.pl";
  865.       @goodhints = <HINTS>;
  866.       close HINTS;
  867.       eval join('',@goodhints);
  868.   }
  869.   
  870.   # Setup dummy package:
  871. --- 298,312 ----
  872.       closedir DIR;
  873.       return unless @goodhints; # There was no hintsfile
  874.       # the last one in lexical ordering is our choice:
  875. !     $hint=(sort @goodhints)[-1];
  876.   
  877.       # execute the hintsfile:
  878.       open HINTS, "hints/$hint.pl";
  879.       @goodhints = <HINTS>;
  880.       close HINTS;
  881. +     print STDOUT "Processing hints file hints/$hint.pl";
  882.       eval join('',@goodhints);
  883. +     print STDOUT $@ if $@;
  884.   }
  885.   
  886.   # Setup dummy package:
  887. ***************
  888. *** 444,450 ****
  889.    dynamic_lib:    {ARMAYBE => 'ar', OTHERLDFLAGS => '...'}
  890.    clean:        {FILES => "*.xyz foo"}
  891.    realclean:    {FILES => '$(INST_ARCHAUTODIR)/*.xyz'}
  892. !  distclean:    {TARNAME=>'MyTarFile', TARFLAGS=>'cvfF', COMPRESS=>'gzip'}
  893.    tool_autosplit:    {MAXLEN => 8}
  894.   END
  895.   
  896. --- 444,450 ----
  897.    dynamic_lib:    {ARMAYBE => 'ar', OTHERLDFLAGS => '...'}
  898.    clean:        {FILES => "*.xyz foo"}
  899.    realclean:    {FILES => '$(INST_ARCHAUTODIR)/*.xyz'}
  900. !  dist:        {TARNAME=>'MyTarFile', TARFLAGS=>'cvfF', COMPRESS=>'gzip'}
  901.    tool_autosplit:    {MAXLEN => 8}
  902.   END
  903.   
  904. ***************
  905. *** 478,484 ****
  906.       'subdirs'        => {},
  907.       'clean'        => {},
  908.       'realclean'        => {},
  909. !     'distclean'        => {},
  910.       'test'        => {},
  911.       'install'        => {},
  912.       'force'        => {},
  913. --- 478,484 ----
  914.       'subdirs'        => {},
  915.       'clean'        => {},
  916.       'realclean'        => {},
  917. !     'dist'        => {},
  918.       'test'        => {},
  919.       'install'        => {},
  920.       'force'        => {},
  921. ***************
  922. *** 534,539 ****
  923. --- 534,542 ----
  924.   
  925.       parse_args(\%att, @ARGV);
  926.       my(%initial_att) = %att; # record initial attributes
  927. +     check_hints();
  928.       my($key);
  929.   
  930.       MY->init_main();
  931. ***************
  932. *** 570,576 ****
  933.       } else {
  934.           my(%a) = %{$att{$section} || {}};
  935.           print MAKE "\n# --- MakeMaker $section section:";
  936. !         print MAKE "# ",%a if $Verbose;
  937.           print(MAKE MY->nicetext(MY->$section( %a )));
  938.       }
  939.       }
  940. --- 573,579 ----
  941.       } else {
  942.           my(%a) = %{$att{$section} || {}};
  943.           print MAKE "\n# --- MakeMaker $section section:";
  944. !         print MAKE "# ", join ", ", %a if $Verbose;
  945.           print(MAKE MY->nicetext(MY->$section( %a )));
  946.       }
  947.       }
  948. ***************
  949. *** 1003,1009 ****
  950.   sub find_perl{
  951.       my($self, $ver, $names, $dirs, $trace) = @_;
  952.       my($name, $dir);
  953. !     if ($trace){
  954.       print "Looking for perl $ver by these names: ";
  955.       print "@$names, ";
  956.       print "in these dirs:";
  957. --- 1006,1012 ----
  958.   sub find_perl{
  959.       my($self, $ver, $names, $dirs, $trace) = @_;
  960.       my($name, $dir);
  961. !     if ($trace >= 2){
  962.       print "Looking for perl $ver by these names: ";
  963.       print "@$names, ";
  964.       print "in these dirs:";
  965. ***************
  966. *** 1017,1023 ****
  967.             $name .= ".exe" unless -x "$dir/$name";
  968.           }
  969.           next unless -x "$dir/$name";
  970. !         print "Executing $dir/$name" if ($trace);
  971.           my($out);
  972.           if ($Is_VMS) {
  973.             my($vmscmd) = 'MCR ' . vmsify("$dir/$name");
  974. --- 1020,1026 ----
  975.             $name .= ".exe" unless -x "$dir/$name";
  976.           }
  977.           next unless -x "$dir/$name";
  978. !         print "Executing $dir/$name" if ($trace >= 2);
  979.           my($out);
  980.           if ($Is_VMS) {
  981.             my($vmscmd) = 'MCR ' . vmsify("$dir/$name");
  982. ***************
  983. *** 1025,1031 ****
  984.           } else {
  985.             $out = `$dir/$name -e 'require $ver; print "VER_OK\n" ' 2>&1`;
  986.           }
  987. !         return "$dir/$name" if $out =~ /VER_OK/;
  988.       }
  989.       }
  990.       print STDOUT "Unable to find a perl $ver (by these names: @$names, in these dirs: @$dirs)\n";
  991. --- 1028,1037 ----
  992.           } else {
  993.             $out = `$dir/$name -e 'require $ver; print "VER_OK\n" ' 2>&1`;
  994.           }
  995. !         if ($out =~ /VER_OK/) {
  996. !         print "Using $dir/$name" if $trace;
  997. !         return "$dir/$name";
  998. !         }
  999.       }
  1000.       }
  1001.       print STDOUT "Unable to find a perl $ver (by these names: @$names, in these dirs: @$dirs)\n";
  1002. ***************
  1003. *** 1223,1228 ****
  1004. --- 1229,1235 ----
  1005.       ."Please notify perl5-porters\@nicoh.com\n";
  1006.       }
  1007.       my($cccmd)=($old) ? $old : $new;
  1008. +     $cccmd =~ s/\b\Q$Config{'cc'}\E\b/\$(CC)/;
  1009.       "CCCMD = $cccmd\n";
  1010.   }
  1011.   
  1012. ***************
  1013. *** 1617,1624 ****
  1014.       # This method provides a mechanism to automatically deal with
  1015.       # subdirectories containing further Makefile.PL scripts.
  1016.       # It calls the subdir_x() method for each subdirectory.
  1017. !     foreach(<*/Makefile.PL>){
  1018. !     s:/Makefile\.PL$:: ;
  1019.       print "Including $_ subdirectory" if ($Verbose);
  1020.       push(@m, MY->subdir_x($_));
  1021.       }
  1022. --- 1624,1632 ----
  1023.       # This method provides a mechanism to automatically deal with
  1024.       # subdirectories containing further Makefile.PL scripts.
  1025.       # It calls the subdir_x() method for each subdirectory.
  1026. !     foreach(grep -d, &lsdir()){
  1027. !     next if /^\./;
  1028. !     next unless -f "$_/Makefile\.PL" ;
  1029.       print "Including $_ subdirectory" if ($Verbose);
  1030.       push(@m, MY->subdir_x($_));
  1031.       }
  1032. ***************
  1033. *** 1718,1724 ****
  1034.   }
  1035.   
  1036.   
  1037. ! sub distclean {
  1038.       my($self, %attribs) = @_;
  1039.       # VERSION should be sanitised before use as a file name
  1040.       my($tarname)  = $attribs{TARNAME}  || '$(DISTNAME)-$(VERSION)';
  1041. --- 1726,1732 ----
  1042.   }
  1043.   
  1044.   
  1045. ! sub dist {
  1046.       my($self, %attribs) = @_;
  1047.       # VERSION should be sanitised before use as a file name
  1048.       my($tarname)  = $attribs{TARNAME}  || '$(DISTNAME)-$(VERSION)';
  1049. ***************
  1050. *** 1728,1734 ****
  1051.       my($postop)   = $attribs{POSTOP} || '@:';
  1052.       my($mkfiles)  = join(' ', map("$_/$att{MAKEFILE} $_/$att{MAKEFILE}.old", ".", @{$att{DIR}}));
  1053.       "
  1054. ! distclean:     clean
  1055.       $preop
  1056.       $att{RM_F} $mkfiles
  1057.       cd .. && tar $tarflags $tarname.tar \$(BASEEXT)
  1058. --- 1736,1742 ----
  1059.       my($postop)   = $attribs{POSTOP} || '@:';
  1060.       my($mkfiles)  = join(' ', map("$_/$att{MAKEFILE} $_/$att{MAKEFILE}.old", ".", @{$att{DIR}}));
  1061.       "
  1062. ! dist:     clean
  1063.       $preop
  1064.       $att{RM_F} $mkfiles
  1065.       cd .. && tar $tarflags $tarname.tar \$(BASEEXT)
  1066. ***************
  1067. *** 1913,1919 ****
  1068.       $cccmd .= " $Config{'cccdlflags'}" if ($Config{'d_shrplib'});
  1069.   
  1070.       # The front matter of the linkcommand...
  1071. !     $linkcmd = join ' ', $Config{'cc'},
  1072.           grep($_, @Config{qw(large split ldflags ccdlflags)});
  1073.       $linkcmd =~ s/\s+/ /g;
  1074.   
  1075. --- 1921,1927 ----
  1076.       $cccmd .= " $Config{'cccdlflags'}" if ($Config{'d_shrplib'});
  1077.   
  1078.       # The front matter of the linkcommand...
  1079. !     $linkcmd = join ' ', "\$(CC)",
  1080.           grep($_, @Config{qw(large split ldflags ccdlflags)});
  1081.       $linkcmd =~ s/\s+/ /g;
  1082.   
  1083. ***************
  1084. *** 1935,1941 ****
  1085.       for (sort keys %static) {
  1086.       next unless /\.a$/;
  1087.       $_ = dirname($_) . "/extralibs.ld";
  1088. !     push @$extra, "`cat $_`";
  1089.       }
  1090.   
  1091.       grep(s/^/-I/, @$perlinc);
  1092. --- 1943,1949 ----
  1093.       for (sort keys %static) {
  1094.       next unless /\.a$/;
  1095.       $_ = dirname($_) . "/extralibs.ld";
  1096. !     push @$extra, $_;
  1097.       }
  1098.   
  1099.       grep(s/^/-I/, @$perlinc);
  1100. ***************
  1101. *** 1951,1957 ****
  1102.   MAP_PERLINC   = @{$perlinc}
  1103.   MAP_STATIC    = ",
  1104.   join(" ", sort keys %static), "
  1105. - MAP_EXTRA     = @{$extra}
  1106.   MAP_PRELIBS   = $Config{'libs'} $Config{'cryptlib'}
  1107.   ";
  1108.   
  1109. --- 1959,1964 ----
  1110. ***************
  1111. *** 1969,1976 ****
  1112.   ";
  1113.   
  1114.       push @m, "
  1115. ! \$(MAP_TARGET): $tmp/perlmain.o \$(MAP_LIBPERL) \$(MAP_STATIC)
  1116. !     \$(MAP_LINKCMD) -o \$\@ $tmp/perlmain.o \$(MAP_LIBPERL) \$(MAP_STATIC) \$(MAP_EXTRA) \$(MAP_PRELIBS)
  1117.       @ echo 'To install the new \"\$(MAP_TARGET)\" binary, call'
  1118.       @ echo '    make -f $makefilename inst_perl MAP_TARGET=\$(MAP_TARGET)'
  1119.       @ echo 'To remove the intermediate files say'
  1120. --- 1976,1993 ----
  1121.   ";
  1122.   
  1123.       push @m, "
  1124. ! extralibs.ld: @$extra
  1125. !     \@ $att{RM_F} \$\@
  1126. !     \@ \$(TOUCH) \$\@
  1127. ! ";
  1128. !     foreach (@$extra){
  1129. !     push @m, "\tcat $_ >> \$\@\n";
  1130. !     }
  1131. !     push @m, "
  1132. ! \$(MAP_TARGET): $tmp/perlmain.o \$(MAP_LIBPERL) \$(MAP_STATIC) extralibs.ld
  1133. !     \$(MAP_LINKCMD) -o \$\@ $tmp/perlmain.o \$(MAP_LIBPERL) \$(MAP_STATIC) `cat extralibs.ld` \$(MAP_PRELIBS)
  1134.       @ echo 'To install the new \"\$(MAP_TARGET)\" binary, call'
  1135.       @ echo '    make -f $makefilename inst_perl MAP_TARGET=\$(MAP_TARGET)'
  1136.       @ echo 'To remove the intermediate files say'
  1137. ***************
  1138. *** 1988,1999 ****
  1139.   
  1140.   };
  1141.   
  1142. ! # We write MAP_EXTRA outside the perl program to have it eval'd by the shell
  1143.       push @m, q{
  1144.   doc_inst_perl:
  1145.       @ $(FULLPERL) -e 'use ExtUtils::MakeMaker; MM->writedoc("Perl binary",' \\
  1146.           -e '"$(MAP_TARGET)", "MAP_STATIC=$(MAP_STATIC)",' \\
  1147. !         -e '"MAP_EXTRA=@ARGV", "MAP_LIBPERL=$(MAP_LIBPERL)")' -- $(MAP_EXTRA)
  1148.   };
  1149.   
  1150.       push @m, qq{
  1151. --- 2005,2016 ----
  1152.   
  1153.   };
  1154.   
  1155. ! # We write EXTRA outside the perl program to have it eval'd by the shell
  1156.       push @m, q{
  1157.   doc_inst_perl:
  1158.       @ $(FULLPERL) -e 'use ExtUtils::MakeMaker; MM->writedoc("Perl binary",' \\
  1159.           -e '"$(MAP_TARGET)", "MAP_STATIC=$(MAP_STATIC)",' \\
  1160. !         -e '"MAP_EXTRA=@ARGV", "MAP_LIBPERL=$(MAP_LIBPERL)")' -- `cat extralibs.ld`
  1161.   };
  1162.   
  1163.       push @m, qq{
  1164. ***************
  1165. *** 2004,2009 ****
  1166. --- 2021,2028 ----
  1167.   
  1168.   realclean :: map_clean
  1169.   
  1170. + distclean :: realclean
  1171.   map_clean :
  1172.       $att{RM_F} $tmp/perlmain.o $tmp/perlmain.c $makefilename
  1173.   };
  1174. ***************
  1175. *** 2068,2079 ****
  1176.           # For gcc-2.6.2 on linux (March 1995), DLD can not load
  1177.           # .sa libraries, with the exception of libm.sa, so we
  1178.           # deliberately skip them.
  1179. !         if (@fullname=<${thispth}/lib${thislib}.${so}.[0-9]*>){
  1180. !         $fullname=$fullname[-1]; #ATTN: 10 looses against 9!
  1181.           } elsif (-f ($fullname="$thispth/lib$thislib.$so")
  1182. !              && (($Config{'dlsrc'} ne "dl_dld.xs") || ($thislib eq "m"))){
  1183.           } elsif (-f ($fullname="$thispth/lib${thislib}_s.a")
  1184. !              && ($thislib .= "_s") ){ # we must explicitly ask for _s version
  1185.           } elsif (-f ($fullname="$thispth/lib$thislib.a")){
  1186.           } elsif (-f ($fullname="$thispth/Slib$thislib.a")){
  1187.           } else {
  1188. --- 2087,2120 ----
  1189.           # For gcc-2.6.2 on linux (March 1995), DLD can not load
  1190.           # .sa libraries, with the exception of libm.sa, so we
  1191.           # deliberately skip them.
  1192. !         if (@fullname = lsdir($thispth,"^lib$thislib\.$so\.[0-9]+")){
  1193. !         # Take care that libfoo.so.10 wins against libfoo.so.9.
  1194. !         # Compare two libraries to find the most recent version
  1195. !         # number.  E.g.  if you have libfoo.so.9.0.7 and
  1196. !         # libfoo.so.10.1, first convert all digits into two
  1197. !         # decimal places.  Then we'll add ".00" to the shorter
  1198. !         # strings so that we're comparing strings of equal length
  1199. !         # Thus we'll compare libfoo.so.09.07.00 with
  1200. !         # libfoo.so.10.01.00.  Some libraries might have letters
  1201. !         # in the version.  We don't know what they mean, but will
  1202. !         # try to skip them gracefully -- we'll set any letter to
  1203. !         # '0'.  Finally, sort in reverse so we can take the
  1204. !         # first element.
  1205. !         $fullname = "$thispth/" .
  1206. !         (sort { my($ma) = $a;
  1207. !             my($mb) = $b;
  1208. !             $ma =~ tr/A-Za-z/0/s;
  1209. !             $ma =~ s/\b(\d)\b/0$1/g;
  1210. !             $mb =~ tr/A-Za-z/0/s;
  1211. !             $mb =~ s/\b(\d)\b/0$1/g;
  1212. !             while (length($ma) < length($mb)) { $ma .= ".00"; }
  1213. !             while (length($mb) < length($ma)) { $mb .= ".00"; }
  1214. !             # Comparison deliberately backwards
  1215. !             $mb cmp $ma;} @fullname)[0];
  1216.           } elsif (-f ($fullname="$thispth/lib$thislib.$so")
  1217. !          && (($Config{'dlsrc'} ne "dl_dld.xs") || ($thislib eq "m"))){
  1218.           } elsif (-f ($fullname="$thispth/lib${thislib}_s.a")
  1219. !          && ($thislib .= "_s") ){ # we must explicitly use _s version
  1220.           } elsif (-f ($fullname="$thispth/lib$thislib.a")){
  1221.           } elsif (-f ($fullname="$thispth/Slib$thislib.a")){
  1222.           } else {
  1223. ***************
  1224. *** 2092,2103 ****
  1225.   
  1226.           # Do not add it into the list if it is already linked in
  1227.           # with the main perl executable.
  1228. !         # We have to special-case the NeXT, because all the math is also in libsys_s
  1229. !         unless ( $in_perl || ($Config{'osname'} eq 'next' && $thislib eq 'm') ){
  1230.           push(@extralibs, "-l$thislib");
  1231.           }
  1232.   
  1233.           # We might be able to load this archive file dynamically
  1234.           if ( $Config{'dlsrc'} =~ /dl_next|dl_dld/){
  1235.           # We push -l$thislib instead of $fullname because
  1236. --- 2133,2145 ----
  1237.   
  1238.           # Do not add it into the list if it is already linked in
  1239.           # with the main perl executable.
  1240. !         # We have to special-case the NeXT, because all the math 
  1241. !         # is also in libsys_s
  1242. !         unless ($in_perl || 
  1243. !             ($Config{'osname'} eq 'next' && $thislib eq 'm') ){
  1244.           push(@extralibs, "-l$thislib");
  1245.           }
  1246.   
  1247.           # We might be able to load this archive file dynamically
  1248.           if ( $Config{'dlsrc'} =~ /dl_next|dl_dld/){
  1249.           # We push -l$thislib instead of $fullname because
  1250. ***************
  1251. *** 2120,2126 ****
  1252.           }
  1253.           last;    # found one here so don't bother looking further
  1254.       }
  1255. !     print STDOUT "Warning (non-fatal): No library found for -l$thislib" unless $found_lib>0;
  1256.       }
  1257.       return ('','','') unless $found;
  1258.       ("@extralibs", "@bsloadlibs", "@ldloadlibs");
  1259. --- 2162,2169 ----
  1260.           }
  1261.           last;    # found one here so don't bother looking further
  1262.       }
  1263. !     print STDOUT "Warning (non-fatal): No library found for -l$thislib" 
  1264. !         unless $found_lib>0;
  1265.       }
  1266.       return ('','','') unless $found;
  1267.       ("@extralibs", "@bsloadlibs", "@ldloadlibs");
  1268. ***************
  1269. *** 2393,2398 ****
  1270. --- 2436,2476 ----
  1271.   
  1272.   Another attempt to fix writedoc() from Dean Roehrich.
  1273.   
  1274. + v4.092 April 11 1994 by Andreas Koenig
  1275. + Fixed a docu bug in hint file description. Added printing of a warning
  1276. + from eval in the hintfile section if the eval has errors.  Moved
  1277. + check_hints() into the WriteMakefile() subroutine to avoid evaling
  1278. + hintsfiles for other uses of the module (mkbootstrap, mksymlists).
  1279. + Eliminated csh globbing to work around buggy Linux csh.
  1280. + In extliblist() libfoo.so.10 now wins against libfoo.so.9.
  1281. + Use $(CC) instead of $Config{'cc'} everywhere to allow overriding
  1282. + according to a patch by Dean Roehrich.
  1283. + Introduce a ./extralibs.ld file that contains the contents of all
  1284. + relevant extralibs.ld files for a static build to shorten the command
  1285. + line for the linking of a new static perl.
  1286. + Minor cosmetics.
  1287. + v4.093 April 12 1994 by Andy Dougherty
  1288. + Rename distclean target to plain dist.  Insert a dummy distclean
  1289. + target that's the same as realclean.  This is more consistent with the
  1290. + main perl makefile.
  1291. + Fix up extliblist() so even bizarre names like libfoo.so.10.0.1
  1292. + are handled.
  1293. + Include Tim's suggestions about $verbose and more careful substitution
  1294. + of $(CC) for $Config{'cc'}.
  1295. + Minor cosmetic fixes for my 80-character wide terminal.
  1296.   =head1 NOTES
  1297.   
  1298.   MakeMaker development work still to be done:
  1299. ***************
  1300. *** 2401,2406 ****
  1301. --- 2479,2489 ----
  1302.   
  1303.   Add a html: target when there has been found a general solution to
  1304.   installing html files.
  1305. + Add an uninstall target.
  1306. + Add a FLAVOR variable that makes it easier to build debugging,
  1307. + embedded or multiplicity perls.
  1308.   
  1309.   =cut
  1310.   
  1311. Index: lib/TieHash.pm
  1312. *** perl5.001c/lib/TieHash.pm    Thu Apr  6 11:04:26 1995
  1313. --- perl5.001d/lib/TieHash.pm    Thu Apr 13 09:40:40 1995
  1314. ***************
  1315. *** 10,17 ****
  1316.   
  1317.   sub TIEHASH {
  1318.       my $pack = shift;
  1319. !     if (defined &{"{$pack}::new"}) {
  1320. !     carp "WARNING: calling ${pack}->new since ${pack}->TIEHASH is missing"
  1321.           if $^W;
  1322.       $pack->new(@_);
  1323.       }
  1324. --- 10,17 ----
  1325.   
  1326.   sub TIEHASH {
  1327.       my $pack = shift;
  1328. !     if (defined &{"$pack\::new"}) {
  1329. !     carp "WARNING: calling $pack\->new since $pack\->TIEHASH is missing"
  1330.           if $^W;
  1331.       $pack->new(@_);
  1332.       }
  1333. Index: perl.h
  1334. *** perl5.001c/perl.h    Wed Apr  5 16:43:59 1995
  1335. --- perl5.001d/perl.h    Thu Apr 13 09:29:16 1995
  1336. ***************
  1337. *** 647,657 ****
  1338. --- 647,660 ----
  1339.   #ifdef CASTI32
  1340.   #define I_32(what) ((I32)(what))
  1341.   #define I_V(what) ((IV)(what))
  1342. + #define U_V(what) ((UV)(what))
  1343.   #else
  1344.   I32 cast_i32 _((double));
  1345.   #define I_32(what) (cast_i32((double)(what)))
  1346.   IV cast_iv _((double));
  1347.   #define I_V(what) (cast_iv((double)(what)))
  1348. + UV cast_uv _((double));
  1349. + #define U_V(what) (cast_uv((double)(what)))
  1350.   #endif
  1351.   
  1352.   struct Outrec {
  1353. Index: pod/Makefile
  1354. *** perl5.001c/pod/Makefile    Thu Jan 19 19:08:44 1995
  1355. --- perl5.001d/pod/Makefile    Sat Apr 15 11:26:57 1995
  1356. ***************
  1357. *** 1,5 ****
  1358. --- 1,7 ----
  1359.   all: man
  1360.   
  1361. + PERL = ../miniperl
  1362.   POD = \
  1363.       perl.pod    \
  1364.       perlapi.pod    \
  1365. ***************
  1366. *** 89,107 ****
  1367.   
  1368.   man: $(MAN)
  1369.   
  1370. ! html: $(HTML)
  1371.   
  1372.   .SUFFIXES: .pod .man
  1373.   
  1374.   .pod.man:
  1375. !     ../miniperl pod2man $*.pod >$*.man
  1376.   
  1377.   .SUFFIXES: .pod .html
  1378.   
  1379.   .pod.html:
  1380. !     ../miniperl pod2html $*.pod >$*.html
  1381.   
  1382.   clean:
  1383.       rm -f $(MAN) $(HTML)
  1384.   
  1385.   realclean:    clean
  1386. --- 91,125 ----
  1387.   
  1388.   man: $(MAN)
  1389.   
  1390. ! # pod2html runs on all the pods at once in order to build up
  1391. ! # cross-references.
  1392. ! html:
  1393. !     $(PERL) pod2html *.pod
  1394.   
  1395.   .SUFFIXES: .pod .man
  1396.   
  1397.   .pod.man:
  1398. !     $(PERL) pod2man $*.pod >$*.man
  1399.   
  1400.   .SUFFIXES: .pod .html
  1401.   
  1402.   .pod.html:
  1403. !     $(PERL) pod2html $*.pod
  1404.   
  1405.   clean:
  1406.       rm -f $(MAN) $(HTML)
  1407.   
  1408.   realclean:    clean
  1409. +     rm -f pod2man pod2latex pod2html
  1410. + distclean:    realclean
  1411. + # Dependencies.
  1412. + pod2latex:    pod2latex.SH ../config.sh
  1413. +     sh pod2latex.SH
  1414. + pod2html:    pod2html.SH ../config.sh
  1415. +     sh pod2html.SH
  1416. + pod2man:    pod2man.SH ../config.sh
  1417. +     sh pod2man.SH
  1418. Index: pod/pod2html.SH
  1419. *** perl5.001c/pod/pod2html.SH    Thu Jan 19 20:04:59 1995
  1420. --- perl5.001d/pod/pod2html.SH    Thu Apr 13 10:34:13 1995
  1421. ***************
  1422. *** 1,4 ****
  1423. ! #!/usr/bin/perl 
  1424.   #
  1425.   # pod2html - convert pod format to html
  1426.   # 
  1427. --- 1,28 ----
  1428. ! case $CONFIG in
  1429. ! '')
  1430. !     if test -f config.sh; then TOP=.;
  1431. !     elif test -f ../config.sh; then TOP=..;
  1432. !     elif test -f ../../config.sh; then TOP=../..;
  1433. !     elif test -f ../../../config.sh; then TOP=../../..;
  1434. !     elif test -f ../../../../config.sh; then TOP=../../../..;
  1435. !     else
  1436. !         echo "Can't find config.sh."; exit 1
  1437. !     fi
  1438. !     . $TOP/config.sh
  1439. !     ;;
  1440. ! esac
  1441. ! case "$0" in
  1442. ! */*) cd `expr X$0 : 'X\(.*\)/'` ;;
  1443. ! esac
  1444. ! echo "Extracting pod/pod2html (with variable substitutions)"
  1445. ! rm -f pod2html
  1446. ! $spitshell >pod2html <<!GROK!THIS!
  1447. ! #!$bin/perl
  1448. ! eval 'exec $bin/perl -S \$0 \${1+"\$@"}'
  1449. !     if \$running_under_some_shell;
  1450. ! !GROK!THIS!
  1451. ! $spitshell >>pod2html <<'!NO!SUBS!'
  1452.   #
  1453.   # pod2html - convert pod format to html
  1454.   # 
  1455. ***************
  1456. *** 46,54 ****
  1457. --- 70,80 ----
  1458.   
  1459.   # loop twice through the pods, first to learn the links, then to produce html
  1460.   for $count (0,1){
  1461. +     (print "Scanning pods...\n") unless $count;
  1462.       foreach $podfh ( @Pods ) {
  1463.       ($pod = $podfh) =~ s/\.pod$//;
  1464.       Debug("files", "opening 2 $podfh" );
  1465. +     (print "Creating $pod.html from $podfh\n") if $count;
  1466.       $RS = "\n=";
  1467.       open($podfh,"<".$podfh)  || die "can't open $podfh: $ERRNO";
  1468.       @all=<$podfh>;
  1469. ***************
  1470. *** 60,70 ****
  1471.       $in_list=0;
  1472.       $html=$pod.".html";
  1473.       if($count){
  1474. -             #open(HTML,">&STDOUT") || die "can't create $html: $ERRNO";
  1475.           open(HTML,">$html") || die "can't create $html: $ERRNO";
  1476.           print HTML <<'HTML__EOQ', <<"HTML__EOQQ";
  1477. !         <!-- $RCSfile$$Date$ -->
  1478. !         <!-- $Log$  -->
  1479.           <HTML>
  1480.   HTML__EOQ
  1481.           <TITLE> \U$pod\E </TITLE>
  1482. --- 86,95 ----
  1483.       $in_list=0;
  1484.       $html=$pod.".html";
  1485.       if($count){
  1486.           open(HTML,">$html") || die "can't create $html: $ERRNO";
  1487.           print HTML <<'HTML__EOQ', <<"HTML__EOQQ";
  1488. !         <!-- \$RCSfile\$\$Revision\$\$Date\$ -->
  1489. !         <!-- \$Log\$ -->
  1490.           <HTML>
  1491.   HTML__EOQ
  1492.           <TITLE> \U$pod\E </TITLE>
  1493. ***************
  1494. *** 77,120 ****
  1495.           ($cmd, $title, $rest) = ($1,$2,$3);
  1496.           if ($cmd eq "item") {
  1497.           if($count ){
  1498. !             ($depth) or &do_list("over",$all[$i],\$in_list,\$depth);
  1499. !             &do_item($title,$rest,$in_list);
  1500.           }
  1501.           else{
  1502.               # scan item
  1503. !             &scan_thing("item",$title,$pod);
  1504.           }
  1505.           }
  1506.           elsif ($cmd =~ /^head([12])/){
  1507.           $num=$1;
  1508.           if($count){
  1509. !             &do_hdr($num,$title,$rest,$depth);
  1510.           }
  1511.           else{
  1512.               # header scan
  1513. !             &scan_thing($cmd,$title,$pod); # skip head1
  1514.           }
  1515.           }
  1516.           elsif ($cmd =~ /^over/) {
  1517. !         $depth and &do_list("over",$all[$i+1],\$in_list,\$depth);
  1518.           }
  1519.           elsif ($cmd =~ /^back/) {
  1520.           if($count){
  1521.               ($depth) or next; # just skip it
  1522. !             &do_list("back",$all[$i+1],\$in_list,\$depth);
  1523. !             &do_rest("$title.$rest");
  1524.           }
  1525.           }
  1526.           elsif ($cmd =~ /^cut/) {
  1527. !         &do_rest($rest);
  1528.           }
  1529. !         else {
  1530. !         warn "unrecognized header: $cmd";
  1531.           }
  1532.       }
  1533.       if($count){
  1534.           while($depth){
  1535. !          &do_list("back",$all[$i+1],\$in_list,\$depth);
  1536.           }
  1537.           print HTML "\n</HTML>\n";
  1538.       }
  1539. --- 102,146 ----
  1540.           ($cmd, $title, $rest) = ($1,$2,$3);
  1541.           if ($cmd eq "item") {
  1542.           if($count ){
  1543. !             ($depth) or do_list("over",$all[$i],\$in_list,\$depth);
  1544. !             do_item($title,$rest,$in_list);
  1545.           }
  1546.           else{
  1547.               # scan item
  1548. !             scan_thing("item",$title,$pod);
  1549.           }
  1550.           }
  1551.           elsif ($cmd =~ /^head([12])/){
  1552.           $num=$1;
  1553.           if($count){
  1554. !             do_hdr($num,$title,$rest,$depth);
  1555.           }
  1556.           else{
  1557.               # header scan
  1558. !             scan_thing($cmd,$title,$pod); # skip head1
  1559.           }
  1560.           }
  1561.           elsif ($cmd =~ /^over/) {
  1562. !         $count and $depth and do_list("over",$all[$i+1],\$in_list,\$depth);
  1563.           }
  1564.           elsif ($cmd =~ /^back/) {
  1565.           if($count){
  1566.               ($depth) or next; # just skip it
  1567. !             do_list("back",$all[$i+1],\$in_list,\$depth);
  1568. !             do_rest("$title.$rest");
  1569.           }
  1570.           }
  1571.           elsif ($cmd =~ /^cut/) {
  1572. !         next;
  1573.           }
  1574. !         elsif($Debug){
  1575. !         (warn "unrecognized header: $cmd") if $Debug;
  1576.           }
  1577.       }
  1578. +         # close open lists without '=back' stmts
  1579.       if($count){
  1580.           while($depth){
  1581. !          do_list("back",$all[$i+1],\$in_list,\$depth);
  1582.           }
  1583.           print HTML "\n</HTML>\n";
  1584.       }
  1585. ***************
  1586. *** 125,131 ****
  1587.       my($which,$next_one,$list_type,$depth)=@_;
  1588.       my($key);
  1589.       if($which eq "over"){
  1590. !     ($next_one =~ /^item\s+(.*)/ ) or warn "Bad list, $1\n";
  1591.       $key=$1;
  1592.       if($key =~ /^1\.?/){
  1593.       $$list_type = "OL";
  1594. --- 151,157 ----
  1595.       my($which,$next_one,$list_type,$depth)=@_;
  1596.       my($key);
  1597.       if($which eq "over"){
  1598. !     ($next_one =~ /^item\s+(.*)/ ) or (warn "Bad list, $1\n") if $Debug;
  1599.       $key=$1;
  1600.       if($key =~ /^1\.?/){
  1601.       $$list_type = "OL";
  1602. ***************
  1603. *** 137,143 ****
  1604.       $$list_type="DL";
  1605.       }
  1606.       else{
  1607. !     warn "unknown list type for item $key";
  1608.       }
  1609.       print HTML qq{\n};
  1610.       print HTML qq{<$$list_type>};
  1611. --- 163,169 ----
  1612.       $$list_type="DL";
  1613.       }
  1614.       else{
  1615. !     (warn "unknown list type for item $key") if $Debug;
  1616.       }
  1617.       print HTML qq{\n};
  1618.       print HTML qq{<$$list_type>};
  1619. ***************
  1620. *** 152,167 ****
  1621.   sub do_hdr{
  1622.       my($num,$title,$rest,$depth)=@_;
  1623.       ($num == 1) and print HTML qq{<p><hr>\n};
  1624. !     &process_thing(\$title,"NAME");
  1625.       print HTML qq{\n<H$num> };
  1626.       print HTML $title; 
  1627.       print HTML qq{</H$num>\n};
  1628. !     &do_rest($rest);
  1629.   }
  1630.   
  1631.   sub do_item{
  1632.       my($title,$rest,$list_type)=@_;
  1633. !     &process_thing(\$title,"NAME");
  1634.       if($list_type eq "DL"){
  1635.       print HTML qq{\n<DT><STRONG>\n};
  1636.       print HTML $title; 
  1637. --- 178,193 ----
  1638.   sub do_hdr{
  1639.       my($num,$title,$rest,$depth)=@_;
  1640.       ($num == 1) and print HTML qq{<p><hr>\n};
  1641. !     process_thing(\$title,"NAME");
  1642.       print HTML qq{\n<H$num> };
  1643.       print HTML $title; 
  1644.       print HTML qq{</H$num>\n};
  1645. !     do_rest($rest);
  1646.   }
  1647.   
  1648.   sub do_item{
  1649.       my($title,$rest,$list_type)=@_;
  1650. !     process_thing(\$title,"NAME");
  1651.       if($list_type eq "DL"){
  1652.       print HTML qq{\n<DT><STRONG>\n};
  1653.       print HTML $title; 
  1654. ***************
  1655. *** 172,184 ****
  1656.       print HTML qq{\n<LI>};
  1657.       ($list_type ne "OL") && (print HTML $title,"\n");
  1658.       }
  1659. !     &do_rest($rest);
  1660.       print HTML ($list_type eq "DL" )? qq{</DD>} : qq{</LI>};
  1661.   }
  1662.   
  1663.   sub do_rest{
  1664.       my($rest)=@_;
  1665. !     my(@lines,$p,$q,$line,@paras,$inpre);
  1666.       @paras=split(/\n\n+/,$rest);
  1667.       for($p=0;$p<=$#paras;$p++){
  1668.       @lines=split(/\n/,$paras[$p]);
  1669. --- 198,210 ----
  1670.       print HTML qq{\n<LI>};
  1671.       ($list_type ne "OL") && (print HTML $title,"\n");
  1672.       }
  1673. !     do_rest($rest);
  1674.       print HTML ($list_type eq "DL" )? qq{</DD>} : qq{</LI>};
  1675.   }
  1676.   
  1677.   sub do_rest{
  1678.       my($rest)=@_;
  1679. !     my(@lines,$p,$q,$line,,@paras,$inpre);
  1680.       @paras=split(/\n\n+/,$rest);
  1681.       for($p=0;$p<=$#paras;$p++){
  1682.       @lines=split(/\n/,$paras[$p]);
  1683. ***************
  1684. *** 207,219 ****
  1685.           foreach $q (@lines){
  1686.               if($paras[$p]=~/>>|<</){
  1687.               if($inpre){
  1688. !                 &process_thing(\$q,"HTML");
  1689.               }
  1690.               else {
  1691.                   print HTML qq{\n</XMP>\n};
  1692.                   print HTML qq{<PRE>\n};
  1693.                   $inpre=1;
  1694. !                 &process_thing(\$q,"HTML");
  1695.               }
  1696.               }
  1697.               while($q =~  s/\t+/' 'x (length($&) * 8 - length($`) % 8)/e){
  1698. --- 233,245 ----
  1699.           foreach $q (@lines){
  1700.               if($paras[$p]=~/>>|<</){
  1701.               if($inpre){
  1702. !                 process_thing(\$q,"HTML");
  1703.               }
  1704.               else {
  1705.                   print HTML qq{\n</XMP>\n};
  1706.                   print HTML qq{<PRE>\n};
  1707.                   $inpre=1;
  1708. !                 process_thing(\$q,"HTML");
  1709.               }
  1710.               }
  1711.               while($q =~  s/\t+/' 'x (length($&) * 8 - length($`) % 8)/e){
  1712. ***************
  1713. *** 229,235 ****
  1714.       else{                             # other text
  1715.           @lines=split(/\n/,$paras[$p]);
  1716.           foreach $line (@lines){
  1717. !                 &process_thing(\$line,"HTML");
  1718.           print HTML qq{$line\n};
  1719.           }
  1720.       }
  1721. --- 255,261 ----
  1722.       else{                             # other text
  1723.           @lines=split(/\n/,$paras[$p]);
  1724.           foreach $line (@lines){
  1725. !                 process_thing(\$line,"HTML");
  1726.           print HTML qq{$line\n};
  1727.           }
  1728.       }
  1729. ***************
  1730. *** 239,247 ****
  1731.   
  1732.   sub process_thing{
  1733.       my($thing,$htype)=@_;
  1734. !     &pre_escapes($thing);
  1735. !     &find_refs($thing,$htype);
  1736. !     &post_escapes($thing);
  1737.   }
  1738.   
  1739.   sub scan_thing{
  1740. --- 265,273 ----
  1741.   
  1742.   sub process_thing{
  1743.       my($thing,$htype)=@_;
  1744. !     pre_escapes($thing);
  1745. !     find_refs($thing,$htype);
  1746. !     post_escapes($thing);
  1747.   }
  1748.   
  1749.   sub scan_thing{
  1750. ***************
  1751. *** 284,290 ****
  1752.           Debug("headers", "header $_");
  1753.       } 
  1754.       else {
  1755. !         warn "unrecognized header: $cmd";
  1756.       } 
  1757.   }
  1758.   
  1759. --- 310,316 ----
  1760.           Debug("headers", "header $_");
  1761.       } 
  1762.       else {
  1763. !         (warn "unrecognized header: $cmd") if $Debug;
  1764.       } 
  1765.   }
  1766.   
  1767. ***************
  1768. *** 316,324 ****
  1769.       }
  1770.       if ($char =~ /[IF]/) {
  1771.       return "<EM> $bigkey </EM>";
  1772.       } else {
  1773.       return "<STRONG> $bigkey </STRONG>";
  1774. !     } 
  1775.   } 
  1776.   
  1777.   sub find_refs { 
  1778. --- 342,352 ----
  1779.       }
  1780.       if ($char =~ /[IF]/) {
  1781.       return "<EM> $bigkey </EM>";
  1782. +     } elsif($char =~ /C/) {
  1783. +     return "<CODE> $bigkey </CODE>";
  1784.       } else {
  1785.       return "<STRONG> $bigkey </STRONG>";
  1786. !     }
  1787.   } 
  1788.   
  1789.   sub find_refs { 
  1790. ***************
  1791. *** 329,335 ****
  1792.       $$thing=~s/L<([^>]*)>/lrefs($1,$htype)/ge;
  1793.       $$thing=~s/([CIBF])<(\W*?(-?\w*).*?)>/picrefs($1, $2, $3, $htype)/ge;
  1794.       $$thing=~s/((\w+)\(\))/picrefs("I", $1, $2,$htype)/ge;
  1795. !     $$thing=~s/([\$\@%]([\w:]+|\W\b))/varrefs($1,$htype)/ge;
  1796.       (($$thing eq $orig) && ($htype eq "NAME")) && 
  1797.       ($$thing=picrefs("I", $$thing, "", $htype));
  1798.   }
  1799. --- 357,363 ----
  1800.       $$thing=~s/L<([^>]*)>/lrefs($1,$htype)/ge;
  1801.       $$thing=~s/([CIBF])<(\W*?(-?\w*).*?)>/picrefs($1, $2, $3, $htype)/ge;
  1802.       $$thing=~s/((\w+)\(\))/picrefs("I", $1, $2,$htype)/ge;
  1803. !     $$thing=~s/([\$\@%](?!&[gl]t)([\w:]+|\W\b))/varrefs($1,$htype)/ge;
  1804.       (($$thing eq $orig) && ($htype eq "NAME")) && 
  1805.       ($$thing=picrefs("I", $$thing, "", $htype));
  1806.   }
  1807. ***************
  1808. *** 354,360 ****
  1809.           if (!defined $section && defined $Podnames{$page}) {
  1810.           return "\n$type$page.html\">\nthe <EM> $page </EM> manpage<\/A>\n";
  1811.       } else {
  1812. !         warn "Bizarre entry $page/$item";
  1813.           return "the <EM> $_[0] </EM>  manpage\n";
  1814.       } 
  1815.       } 
  1816. --- 382,388 ----
  1817.           if (!defined $section && defined $Podnames{$page}) {
  1818.           return "\n$type$page.html\">\nthe <EM> $page </EM> manpage<\/A>\n";
  1819.       } else {
  1820. !         (warn "Bizarre entry $page/$item") if $Debug;
  1821.           return "the <EM> $_[0] </EM>  manpage\n";
  1822.       } 
  1823.       } 
  1824. ***************
  1825. *** 385,391 ****
  1826.               }
  1827.       }
  1828.       }
  1829. !     warn "No $ref reference for $item (@_)";
  1830.       return $text;
  1831.   } 
  1832.   
  1833. --- 413,419 ----
  1834.               }
  1835.       }
  1836.       }
  1837. !     (warn "No $ref reference for $item (@_)") if $Debug;
  1838.       return $text;
  1839.   } 
  1840.   
  1841. ***************
  1842. *** 433,439 ****
  1843.   sub post_escapes {
  1844.       my($thing)=@_;
  1845.       $$thing=~s/[^GM]>>/\>\;\>\;/g;
  1846. !     $$thing=~s/([^"MGA])>/$1\>\;/g;
  1847.       $$thing=~tr/\200-\377/\000-\177/;
  1848.   }
  1849.   
  1850. --- 461,467 ----
  1851.   sub post_escapes {
  1852.       my($thing)=@_;
  1853.       $$thing=~s/[^GM]>>/\>\;\>\;/g;
  1854. !     $$thing=~s/([^"MGAE])>/$1\>\;/g;
  1855.       $$thing=~tr/\200-\377/\000-\177/;
  1856.   }
  1857.   
  1858. ***************
  1859. *** 457,459 ****
  1860. --- 485,490 ----
  1861.   }
  1862.   
  1863.   
  1864. + !NO!SUBS!
  1865. + chmod 755 pod2html
  1866. + $eunicefix pod2html
  1867. Index: pod/pod2latex.SH
  1868. *** perl5.001c/pod/pod2latex.SH    Sat Mar 11 16:55:04 1995
  1869. --- perl5.001d/pod/pod2latex.SH    Thu Apr 13 12:20:39 1995
  1870. ***************
  1871. *** 1,4 ****
  1872. ! #!/usr/bin/perl
  1873.   # pod2latex, version 1.1
  1874.   # by Taro Kawagish (kawagish@imslab.co.jp),  Jan 11, 1995.
  1875.   #
  1876. --- 1,29 ----
  1877. ! case $CONFIG in
  1878. ! '')
  1879. !     if test -f config.sh; then TOP=.;
  1880. !     elif test -f ../config.sh; then TOP=..;
  1881. !     elif test -f ../../config.sh; then TOP=../..;
  1882. !     elif test -f ../../../config.sh; then TOP=../../..;
  1883. !     elif test -f ../../../../config.sh; then TOP=../../../..;
  1884. !     else
  1885. !         echo "Can't find config.sh."; exit 1
  1886. !     fi
  1887. !     . $TOP/config.sh
  1888. !     ;;
  1889. ! esac
  1890. ! case "$0" in
  1891. ! */*) cd `expr X$0 : 'X\(.*\)/'` ;;
  1892. ! esac
  1893. ! echo "Extracting pod/pod2latex (with variable substitutions)"
  1894. ! rm -f pod2latex
  1895. ! $spitshell >pod2latex <<!GROK!THIS!
  1896. ! #!$bin/perl
  1897. ! eval 'exec $bin/perl -S \$0 \${1+"\$@"}'
  1898. !     if \$running_under_some_shell;
  1899. ! !GROK!THIS!
  1900. ! $spitshell >>pod2latex <<'!NO!SUBS!'
  1901. ! #
  1902.   # pod2latex, version 1.1
  1903.   # by Taro Kawagish (kawagish@imslab.co.jp),  Jan 11, 1995.
  1904.   #
  1905. ***************
  1906. *** 630,632 ****
  1907. --- 655,660 ----
  1908.       "yuml"    =>    '\\"{y}',    #   small y, dieresis or umlaut mark
  1909.   );
  1910.   }
  1911. + !NO!SUBS!
  1912. + chmod 755 pod2latex
  1913. + $eunicefix pod2latex
  1914. Index: pod/pod2man.SH
  1915. Prereq:  1.5 
  1916. *** perl5.001c/pod/pod2man.SH    Wed Feb  8 19:10:04 1995
  1917. --- perl5.001d/pod/pod2man.SH    Thu Apr 13 10:34:04 1995
  1918. ***************
  1919. *** 1,4 ****
  1920. ! #!/usr/bin/perl
  1921.   
  1922.   $/ = "";
  1923.   $cutting = 1;
  1924. --- 1,28 ----
  1925. ! case $CONFIG in
  1926. ! '')
  1927. !     if test -f config.sh; then TOP=.;
  1928. !     elif test -f ../config.sh; then TOP=..;
  1929. !     elif test -f ../../config.sh; then TOP=../..;
  1930. !     elif test -f ../../../config.sh; then TOP=../../..;
  1931. !     elif test -f ../../../../config.sh; then TOP=../../../..;
  1932. !     else
  1933. !         echo "Can't find config.sh."; exit 1
  1934. !     fi
  1935. !     . $TOP/config.sh
  1936. !     ;;
  1937. ! esac
  1938. ! case "$0" in
  1939. ! */*) cd `expr X$0 : 'X\(.*\)/'` ;;
  1940. ! esac
  1941. ! echo "Extracting pod/pod2man (with variable substitutions)"
  1942. ! rm -f pod2man
  1943. ! $spitshell >pod2man <<!GROK!THIS!
  1944. ! #!$bin/perl
  1945. ! eval 'exec $bin/perl -S \$0 \${1+"\$@"}'
  1946. !     if \$running_under_some_shell;
  1947. ! !GROK!THIS!
  1948. ! $spitshell >>pod2man <<'!NO!SUBS!'
  1949.   
  1950.   $/ = "";
  1951.   $cutting = 1;
  1952. ***************
  1953. *** 623,625 ****
  1954. --- 647,652 ----
  1955.       "yuml"    =>    "y\\*:",    #   small y, dieresis or umlaut mark
  1956.   );
  1957.   }
  1958. + !NO!SUBS!
  1959. + chmod 755 pod2man
  1960. + $eunicefix pod2man
  1961. Index: pp_hot.c
  1962. *** perl5.001c/pp_hot.c    Thu Mar 16 10:23:30 1995
  1963. --- perl5.001d/pp_hot.c    Fri Apr 14 10:01:21 1995
  1964. ***************
  1965. *** 1560,1565 ****
  1966. --- 1560,1566 ----
  1967.       HV *stash;
  1968.       register CV *cv;
  1969.       register CONTEXT *cx;
  1970. +     I32 gimme;
  1971.   
  1972.       if (!sv)
  1973.       DIE("Not a CODE reference");
  1974. ***************
  1975. *** 1632,1637 ****
  1976. --- 1633,1640 ----
  1977.           DIE("No DBsub routine");
  1978.       }
  1979.   
  1980. +     gimme = GIMME;
  1981.       if (CvXSUB(cv)) {
  1982.       if (CvOLDSTYLE(cv)) {
  1983.           I32 (*fp3)_((int,int,int));
  1984. ***************
  1985. *** 1655,1661 ****
  1986.           (void)(*CvXSUB(cv))(cv);
  1987.   
  1988.           /* Enforce some sanity in scalar context. */
  1989. !         if (GIMME == G_SCALAR && ++markix != stack_sp - stack_base ) {
  1990.           if (markix > stack_sp - stack_base)
  1991.               *(stack_base + markix) = &sv_undef;
  1992.           else
  1993. --- 1658,1664 ----
  1994.           (void)(*CvXSUB(cv))(cv);
  1995.   
  1996.           /* Enforce some sanity in scalar context. */
  1997. !         if (gimme == G_SCALAR && ++markix != stack_sp - stack_base ) {
  1998.           if (markix > stack_sp - stack_base)
  1999.               *(stack_base + markix) = &sv_undef;
  2000.           else
  2001. ***************
  2002. *** 1670,1676 ****
  2003.       dMARK;
  2004.       register I32 items = SP - MARK;
  2005.       I32 hasargs = (op->op_flags & OPf_STACKED) != 0;
  2006. -     I32 gimme = GIMME;
  2007.       AV* padlist = CvPADLIST(cv);
  2008.       SV** svp = AvARRAY(padlist);
  2009.       push_return(op->op_next);
  2010. --- 1673,1678 ----
  2011. Index: pp_sys.c
  2012. *** perl5.001c/pp_sys.c    Sat Mar 11 00:09:30 1995
  2013. --- perl5.001d/pp_sys.c    Tue Apr 11 15:48:46 1995
  2014. ***************
  2015. *** 1116,1122 ****
  2016.       GV *tmpgv;
  2017.   
  2018.       SETERRNO(0,0);
  2019. ! #if defined(HAS_TRUNCATE) || defined(HAS_CHSIZE)
  2020.   #ifdef HAS_TRUNCATE
  2021.       if (op->op_flags & OPf_SPECIAL) {
  2022.       tmpgv = gv_fetchpv(POPp,FALSE, SVt_PVIO);
  2023. --- 1116,1122 ----
  2024.       GV *tmpgv;
  2025.   
  2026.       SETERRNO(0,0);
  2027. ! #if defined(HAS_TRUNCATE) || defined(HAS_CHSIZE) || defined(F_FREESP)
  2028.   #ifdef HAS_TRUNCATE
  2029.       if (op->op_flags & OPf_SPECIAL) {
  2030.       tmpgv = gv_fetchpv(POPp,FALSE, SVt_PVIO);
  2031. ***************
  2032. *** 2321,2327 ****
  2033.   char *filename;
  2034.   {
  2035.       char mybuf[8192];
  2036. !     char *s, *tmps;
  2037.       int anum = 1;
  2038.       FILE *myfp;
  2039.   
  2040. --- 2321,2328 ----
  2041.   char *filename;
  2042.   {
  2043.       char mybuf[8192];
  2044. !     char *s, 
  2045. !      *save_filename = filename;
  2046.       int anum = 1;
  2047.       FILE *myfp;
  2048.   
  2049. ***************
  2050. *** 2373,2379 ****
  2051.           return 0;
  2052.       }
  2053.       else {    /* some mkdirs return no failure indication */
  2054. !         anum = (Stat(filename, &statbuf) >= 0);
  2055.           if (op->op_type == OP_RMDIR)
  2056.           anum = !anum;
  2057.           if (anum)
  2058. --- 2374,2380 ----
  2059.           return 0;
  2060.       }
  2061.       else {    /* some mkdirs return no failure indication */
  2062. !         anum = (Stat(save_filename, &statbuf) >= 0);
  2063.           if (op->op_type == OP_RMDIR)
  2064.           anum = !anum;
  2065.           if (anum)
  2066. Index: sv.c
  2067. *** perl5.001c/sv.c    Wed Mar 15 14:28:08 1995
  2068. --- perl5.001d/sv.c    Wed Apr 12 16:13:08 1995
  2069. ***************
  2070. *** 1038,1044 ****
  2071.           if (SvNVX(sv) < 0.0)
  2072.           return I_V(SvNVX(sv));
  2073.           else
  2074. !         return (IV)(UV)SvNVX(sv);
  2075.       }
  2076.       if (SvPOKp(sv) && SvLEN(sv)) {
  2077.           if (dowarn && !looks_like_number(sv))
  2078. --- 1038,1044 ----
  2079.           if (SvNVX(sv) < 0.0)
  2080.           return I_V(SvNVX(sv));
  2081.           else
  2082. !         return (IV) U_V(SvNVX(sv));
  2083.       }
  2084.       if (SvPOKp(sv) && SvLEN(sv)) {
  2085.           if (dowarn && !looks_like_number(sv))
  2086. ***************
  2087. *** 1061,1067 ****
  2088.           if (SvNVX(sv) < 0.0)
  2089.               return I_V(SvNVX(sv));
  2090.           else
  2091. !             return (IV)(UV)SvNVX(sv);
  2092.           }
  2093.           if (SvPOKp(sv) && SvLEN(sv)) {
  2094.           if (dowarn && !looks_like_number(sv))
  2095. --- 1061,1067 ----
  2096.           if (SvNVX(sv) < 0.0)
  2097.               return I_V(SvNVX(sv));
  2098.           else
  2099. !             return (IV) U_V(SvNVX(sv));
  2100.           }
  2101.           if (SvPOKp(sv) && SvLEN(sv)) {
  2102.           if (dowarn && !looks_like_number(sv))
  2103. ***************
  2104. *** 1088,1094 ****
  2105.       if (SvNVX(sv) < 0.0)
  2106.           SvIVX(sv) = I_V(SvNVX(sv));
  2107.       else
  2108. !         SvIVX(sv) = (IV)(UV)SvNVX(sv);
  2109.       }
  2110.       else if (SvPOKp(sv) && SvLEN(sv)) {
  2111.       if (dowarn && !looks_like_number(sv))
  2112. --- 1088,1094 ----
  2113.       if (SvNVX(sv) < 0.0)
  2114.           SvIVX(sv) = I_V(SvNVX(sv));
  2115.       else
  2116. !         SvIVX(sv) = (IV) U_V(SvNVX(sv));
  2117.       }
  2118.       else if (SvPOKp(sv) && SvLEN(sv)) {
  2119.       if (dowarn && !looks_like_number(sv))
  2120. Index: util.c
  2121. *** perl5.001c/util.c    Wed Apr  5 15:52:50 1995
  2122. --- perl5.001d/util.c    Fri Apr 14 09:50:11 1995
  2123. ***************
  2124. *** 29,34 ****
  2125. --- 29,38 ----
  2126.   #  include <vfork.h>
  2127.   #endif
  2128.   
  2129. + #ifdef I_LIMITS  /* Needed for cast_xxx() functions below. */
  2130. + #  include <limits.h>
  2131. + #endif
  2132.   /* Put this after #includes because fork and vfork prototypes may
  2133.      conflict.
  2134.   */
  2135. ***************
  2136. *** 1575,1610 ****
  2137.   #endif
  2138.   
  2139.   #ifndef CASTI32
  2140.   I32
  2141.   cast_i32(f)
  2142.   double f;
  2143.   {
  2144. ! #   define BIGDOUBLE 2147483647.0        /* Assume 32 bit int's ! */
  2145. ! #   define BIGNEGDOUBLE (-2147483648.0)
  2146. !     if (f >= BIGDOUBLE)
  2147. !     return (I32) BIGDOUBLE;
  2148. !     if (f <= BIGNEGDOUBLE)
  2149. !     return (I32) BIGNEGDOUBLE;
  2150.       return (I32) f;
  2151.   }
  2152. - # undef BIGDOUBLE
  2153. - # undef BIGNEGDOUBLE
  2154.   
  2155.   IV
  2156.   cast_iv(f)
  2157.   double f;
  2158.   {
  2159. !     /* XXX  This should be fixed.  It assumes 32 bit IV's. */
  2160. ! #   define BIGDOUBLE 2147483647.0        /* Assume 32 bit IV's ! */
  2161. ! #   define BIGNEGDOUBLE (-2147483648.0)
  2162. !     if (f >= BIGDOUBLE)
  2163. !     return (IV) BIGDOUBLE;
  2164. !     if (f <= BIGNEGDOUBLE)
  2165. !     return (IV) BIGNEGDOUBLE;
  2166.       return (IV) f;
  2167.   }
  2168. ! # undef BIGDOUBLE
  2169. ! # undef BIGNEGDOUBLE
  2170.   #endif
  2171.   
  2172.   #ifndef HAS_RENAME
  2173. --- 1579,1653 ----
  2174.   #endif
  2175.   
  2176.   #ifndef CASTI32
  2177. + /* Look for MAX and MIN integral values.  If we can't find them,
  2178. +    we'll use 32-bit two's complement defaults.
  2179. + */
  2180. + #ifndef LONG_MAX
  2181. + #  ifdef MAXLONG    /* Often used in <values.h> */
  2182. + #    define LONG_MAX MAXLONG
  2183. + #  else
  2184. + #    define LONG_MAX        2147483647L
  2185. + #  endif
  2186. + #endif
  2187. + #ifndef LONG_MIN
  2188. + #    define LONG_MIN        (-LONG_MAX - 1)
  2189. + #endif
  2190. + #ifndef ULONG_MAX
  2191. + #  ifdef MAXULONG 
  2192. + #    define LONG_MAX MAXULONG
  2193. + #  else
  2194. + #    define ULONG_MAX       4294967295L
  2195. + #  endif
  2196. + #endif
  2197. + /* Unfortunately, on some systems the cast_uv() function doesn't
  2198. +    work with the system-supplied definition of ULONG_MAX.  The
  2199. +    comparison  (f >= ULONG_MAX) always comes out true.  It must be a
  2200. +    problem with the compiler constant folding.
  2201. +    In any case, this workaround should be fine on any two's complement
  2202. +    system.  If it's not, supply a '-DMY_ULONG_MAX=whatever' in your
  2203. +    ccflags.
  2204. +            --Andy Dougherty      <doughera@lafcol.lafayette.edu>
  2205. + */
  2206. + #ifndef MY_ULONG_MAX
  2207. + #  define MY_ULONG_MAX ((UV)LONG_MAX * (UV)2 + (UV)1)
  2208. + #endif
  2209.   I32
  2210.   cast_i32(f)
  2211.   double f;
  2212.   {
  2213. !     if (f >= LONG_MAX)
  2214. !     return (I32) LONG_MAX;
  2215. !     if (f <= LONG_MIN)
  2216. !     return (I32) LONG_MIN;
  2217.       return (I32) f;
  2218.   }
  2219.   
  2220.   IV
  2221.   cast_iv(f)
  2222.   double f;
  2223.   {
  2224. !     if (f >= LONG_MAX)
  2225. !     return (IV) LONG_MAX;
  2226. !     if (f <= LONG_MIN)
  2227. !     return (IV) LONG_MIN;
  2228.       return (IV) f;
  2229.   }
  2230. ! UV
  2231. ! cast_uv(f)
  2232. ! double f;
  2233. ! {
  2234. !     if (f >= MY_ULONG_MAX)
  2235. !     return (UV) MY_ULONG_MAX;
  2236. !     return (UV) f;
  2237. ! }
  2238.   #endif
  2239.   
  2240.   #ifndef HAS_RENAME
  2241.  
  2242.  
  2243. End of patch.
  2244.