home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
perl501m.zip
/
patches
/
patch.1d
< prev
next >
Wrap
Text File
|
1995-04-20
|
63KB
|
2,295 lines
# This is my patch patch.1d for perl5.001. See description below.
# Andy Dougherty doughera@lafcol.lafayette.edu
#
# Please execute the following commands in your perl directory
# and then apply the patch below.
#
mv pod/pod2latex pod/pod2latex.SH
mv pod/pod2html pod/pod2html.SH
mv pod/pod2man pod/pod2man.SH
exit 0
This is my patch patch.1d for perl5.001. A complete description is
given below, but here are the basic changes.
1. Linux: more tweaks so dynamic loading works under ELF
or (maybe) under dld. There are so many different dld versions
and so many different tool sets, it's hard to be more specific.
2. perl -e '$v=1e19+0' no longer dumps core on Intel x86
processors.
3. pod stuff:
a. Wrapped pod2* translators in a 'SH' wrapper so that they
have the proper path to perl at the top.
b. Fixed pod/ Makefile to call the pod2html translator
correctly. (Why do pod2man and pod2html work differently?)
c. Include latest (Feb 2, 1995) version of pod2html, fresh from
ftp.metronet.com.
4. MakeMaker 4.093.
5. GIMME and installperl patches from Tim Bunce.
6. Miscellaneous hint file updates.
To apply, change to your perl directory, run the commands above, then
apply with
patch -p1 -N < thispatch.
If you've applied any of my "unofficial" patches since patch.1c, you
should probably remove them first with a patch -R. Otherwise, you will
get rejects from this patch.
Patch and enjoy,
Andy Dougherty doughera@lafcol.lafayette.edu
Dept. of Physics
Lafayette College, Easton PA
Configure
Allow ' ' to mean 'none' in a few more places. This provides
a way for hint files to set something to an empty value and to
ensure that the empty value will be maintained when config.sh is
reused.
Fix silly ld typo that prevented hint file from actually setting
$ld.
MANIFEST
Now has pod/pod2*.SH.
Makefile.SH
Remove old libperl.a instead of blindly adding to it. Failure to
do this causes a problem if you originally used perl's malloc but
later changed your mind. The old malloc.o would still be in
libperl.a
ext/DynaLoader/dl_dlopen.xs
Use strerror(errno) instead of dlerror for NetBSD.
handy.h
Clarify & rework HAS_BOOL comments and code. No functionality is
changed, but I hope this is easier to follow.
hints/freebsd.sh
hints/isc.sh
hints/linux.sh
hints/netbsd.sh
hints/next_3_0.sh
hints/next_3_2.sh
hints/sco_3.sh
Miscellaneous updates. See the individual comments in the patches.
installperl
Run ranlib on installed .a libraries.
unlink() old versions of files before installing new ones, in
case the old ones are are write-protected.
lib/ExtUtils/MakeMaker.pm
Updated to 4.092 by Andreas Koenig. This features better
selection of shared library versions and shorter command lines for
static linking of new extensions. It is also more robust against
broken csh on Linux. (There's still a glob in the library
selection loop, however.)
I further updated it to 4.093 because I didn't like the
distclean target :-). It's just a sloppy quick fix, but that's
all I have time for now. I've also worked on the library version
selection stuff and the $(CC) command stuff a little more.
lib/TieHash.pm
Overdue removal of ambiguous ${pack} construction.
perl.h
New U_V macro to cast to the UV type (usually unsigned long).
pod/Makefile
Updated.
pod/pod2html.SH
Updated.
Converted to 'SH' wrapper so correct #!/path/to/perl gets used.
pod/pod2latex.SH
pod/pod2man.SH
Converted to 'SH' wrapper so correct #!/path/to/perl gets used.
pp_hot.c
GIMME patch from Tim Bunce.
pp_sys.c
Allow use of F_FREESP fcntl() directive to truncate files.
If HAS_MKDIR is not defined, the stat() call to check the result
of the system "mkdir" call was failing because the filename
pointer no longer pointed to the right location.
sv.c
Protect some (UV) casts by the new U_V() macro.
util.c
New cast_uv() function to support the U_V() macro, if needed.
cast_iv() and cast_uv() no longer assume 32-bit longs.
The various cast_() functions have also been simplified.
Index: Configure
Prereq: 3.0.1.7
*** perl5.001c/Configure Thu Apr 6 11:16:18 1995
--- perl5.001d/Configure Fri Apr 14 15:46:27 1995
***************
*** 20,26 ****
# $Id: Head.U,v 3.0.1.7 1995/03/21 08:46:15 ram Exp $
#
! # Generated on Thu Apr 6 11:09:32 EDT 1995 [metaconfig 3.0 PL53]
cat >/tmp/c1$$ <<EOF
ARGGGHHHH!!!!!
--- 20,26 ----
# $Id: Head.U,v 3.0.1.7 1995/03/21 08:46:15 ram Exp $
#
! # Generated on Fri Apr 14 15:43:12 EDT 1995 [metaconfig 3.0 PL53]
cat >/tmp/c1$$ <<EOF
ARGGGHHHH!!!!!
***************
*** 4241,4247 ****
rp="Any special flags to pass to $cc -c to compile shared library modules?"
. ./myread
case "$ans" in
! none) cccdlflags='' ;;
*) cccdlflags="$ans" ;;
esac
--- 4241,4247 ----
rp="Any special flags to pass to $cc -c to compile shared library modules?"
. ./myread
case "$ans" in
! none) cccdlflags=' ' ;;
*) cccdlflags="$ans" ;;
esac
***************
*** 4278,4288 ****
fi
rm -f try.c a.out
;;
! *) dflt=ld
;;
esac
! rp="What comnmand should be used to create dynamic libraries?"
. ./myread
ld="$ans"
--- 4278,4288 ----
fi
rm -f try.c a.out
;;
! *) dflt="$ld"
;;
esac
! rp="What command should be used to create dynamic libraries?"
. ./myread
ld="$ans"
***************
*** 4311,4317 ****
rp="Any special flags to pass to $ld to create a dynamically loaded library?"
. ./myread
case "$ans" in
! none) lddlflags='' ;;
*) lddlflags="$ans" ;;
esac
--- 4311,4317 ----
rp="Any special flags to pass to $ld to create a dynamically loaded library?"
. ./myread
case "$ans" in
! none) lddlflags=' ' ;;
*) lddlflags="$ans" ;;
esac
***************
*** 4335,4341 ****
rp="Any special flags to pass to $cc to use dynamic loading?"
. ./myread
case "$ans" in
! none) ccdlflags='' ;;
*) ccdlflags="$ans" ;;
esac
;;
--- 4335,4341 ----
rp="Any special flags to pass to $cc to use dynamic loading?"
. ./myread
case "$ans" in
! none) ccdlflags=' ' ;;
*) ccdlflags="$ans" ;;
esac
;;
***************
*** 6438,6444 ****
EOM
case "$dynamic_ext" in
! ''|' ') dflt="$avail_ext" ;;
*) dflt="$dynamic_ext" ;;
esac
case "$dflt" in
--- 6438,6444 ----
EOM
case "$dynamic_ext" in
! '') dflt="$avail_ext" ;;
*) dflt="$dynamic_ext" ;;
esac
case "$dflt" in
***************
*** 6447,6458 ****
rp="What extensions do you wish to load dynamically?"
. ./myread
case "$ans" in
! none) dynamic_ext='' ;;
*) dynamic_ext="$ans" ;;
esac
case "$static_ext" in
! ''|' ')
: Exclude those already listed in dynamic linking
dflt=''
for xxx in $avail_ext; do
--- 6447,6458 ----
rp="What extensions do you wish to load dynamically?"
. ./myread
case "$ans" in
! none) dynamic_ext=' ' ;;
*) dynamic_ext="$ans" ;;
esac
case "$static_ext" in
! '')
: Exclude those already listed in dynamic linking
dflt=''
for xxx in $avail_ext; do
***************
*** 6475,6481 ****
rp="What extensions do you wish to load statically?"
. ./myread
case "$ans" in
! none) static_ext='' ;;
*) static_ext="$ans" ;;
esac
;;
--- 6475,6481 ----
rp="What extensions do you wish to load statically?"
. ./myread
case "$ans" in
! none) static_ext=' ' ;;
*) static_ext="$ans" ;;
esac
;;
***************
*** 6486,6492 ****
EOM
case "$static_ext" in
! ''|' ') dflt="$avail_ext" ;;
*) dflt="$static_ext" ;;
esac
--- 6486,6492 ----
EOM
case "$static_ext" in
! '') dflt="$avail_ext" ;;
*) dflt="$static_ext" ;;
esac
***************
*** 6496,6502 ****
rp="What extensions do you wish to include?"
. ./myread
case "$ans" in
! none) static_ext='' ;;
*) static_ext="$ans" ;;
esac
;;
--- 6496,6502 ----
rp="What extensions do you wish to include?"
. ./myread
case "$ans" in
! none) static_ext=' ' ;;
*) static_ext="$ans" ;;
esac
;;
Index: MANIFEST
*** perl5.001c/MANIFEST Sun Mar 12 22:14:06 1995
--- perl5.001d/MANIFEST Thu Apr 13 10:38:43 1995
***************
*** 402,410 ****
pod/perlsyn.pod Syntax info
pod/perltrap.pod Trap info
pod/perlvar.pod Variable info
! pod/pod2html Translator to turn pod into HTML
! pod/pod2latex Translator to turn pod into LaTeX
! pod/pod2man Translator to turn pod into manpage
pod/splitman Splits perlfunc into multiple man pages
pp.c Push/Pop code
pp.h Push/Pop code defs
--- 402,410 ----
pod/perlsyn.pod Syntax info
pod/perltrap.pod Trap info
pod/perlvar.pod Variable info
! pod/pod2html.SH Precursor for translator to turn pod into HTML
! pod/pod2latex.SH Precursor for translator to turn pod into LaTeX
! pod/pod2man.SH Precursor for translator to turn pod into manpage
pod/splitman Splits perlfunc into multiple man pages
pp.c Push/Pop code
pp.h Push/Pop code defs
Index: Makefile.SH
*** perl5.001c/Makefile.SH Thu Apr 6 13:59:46 1995
--- perl5.001d/Makefile.SH Sat Apr 15 11:32:18 1995
***************
*** 227,232 ****
--- 227,233 ----
;;
*)
$spitshell >>Makefile <<'!NO!SUBS!'
+ rm -f $(perllib)
ar rcu $(perllib) perl.o $(obj)
@$(ranlib) $(perllib)
!NO!SUBS!
***************
*** 329,334 ****
--- 330,336 ----
realclean: clean
-cd x2p; $(MAKE) realclean
+ -cd pod; $(MAKE) realclean
@for x in $(DYNALOADER) $(dynamic_ext) $(static_ext) ; do \
sh ext/util/make_ext realclean $$x ; \
done
Index: ext/DynaLoader/dl_dlopen.xs
*** perl5.001c/ext/DynaLoader/dl_dlopen.xs Tue Oct 18 12:28:19 1994
--- perl5.001d/ext/DynaLoader/dl_dlopen.xs Thu Apr 13 10:15:28 1995
***************
*** 115,121 ****
#endif
#ifndef HAS_DLERROR
! #define dlerror() "Unknown error - dlerror() not implemented"
#endif
--- 115,125 ----
#endif
#ifndef HAS_DLERROR
! # ifdef __NetBSD__
! # define dlerror() strerror(errno)
! # else
! # define dlerror() "Unknown error - dlerror() not implemented"
! # endif
#endif
Index: handy.h
*** perl5.001c/handy.h Sun Apr 2 16:13:10 1995
--- perl5.001d/handy.h Mon Apr 10 16:29:06 1995
***************
*** 24,38 ****
#define Nullsv Null(SV*)
/* bool is built-in for g++-2.6.3, which might be used for an extension.
! gcc-2.6.2 under Linux defines _G_HAVE_BOOL to 0, and does not
! define bool. */
! #if !defined(HAS_BOOL) && !(_G_HAVE_BOOL)
! #ifdef UTS
! #define bool int
! #else
! #define bool char
#endif
- #endif /* !defined(HAS_BOOL) && !(_G_HAVE_BOOL) */
#ifdef TRUE
#undef TRUE
--- 24,49 ----
#define Nullsv Null(SV*)
/* bool is built-in for g++-2.6.3, which might be used for an extension.
! If the extension includes <_G_config.h> before this file then
! _G_HAVE_BOOL will be properly set. If, however, the extension includes
! this file first, then you will have to manually set -DHAS_BOOL in
! your command line to avoid a conflict.
! */
! #ifdef _G_HAVE_BOOL
! # if _G_HAVE_BOOL
! # ifndef HAS_BOOL
! # define HAS_BOOL 1
! # endif
! # endif
! #endif
!
! #ifndef HAS_BOOL
! # ifdef UTS
! # define bool int
! # else
! # define bool char
! # endif
#endif
#ifdef TRUE
#undef TRUE
Index: hints/cxux.sh
*** perl5.001c/hints/cxux.sh Tue Feb 28 19:42:47 1995
--- perl5.001d/hints/cxux.sh Fri Apr 14 10:40:15 1995
***************
*** 72,78 ****
cc='/bin/cc -Xa'
cccdlflags='-Zelf -Zpic'
ccdlflags='-Zelf -Zlink=dynamic -Wl,-Bexport -u sigaction'
! lddlflags='-G'
# Configure imagines that stdio.h is "standard", but it really isn't.
# Things like the -T and -B file test operators (on file handles) fail when
--- 72,78 ----
cc='/bin/cc -Xa'
cccdlflags='-Zelf -Zpic'
ccdlflags='-Zelf -Zlink=dynamic -Wl,-Bexport -u sigaction'
! lddlflags='-Zlink=so'
# Configure imagines that stdio.h is "standard", but it really isn't.
# Things like the -T and -B file test operators (on file handles) fail when
Index: hints/freebsd.sh
*** perl5.001c/hints/freebsd.sh Thu Jan 19 19:08:36 1995
--- perl5.001d/hints/freebsd.sh Tue Apr 11 11:34:29 1995
***************
*** 1,4 ****
! # Oringal based on info from
# Carl M. Fongheiser <cmf@ins.infonet.net>
# Date: Thu, 28 Jul 1994 19:17:05 -0500 (CDT)
#
--- 1,4 ----
! # Original based on info from
# Carl M. Fongheiser <cmf@ins.infonet.net>
# Date: Thu, 28 Jul 1994 19:17:05 -0500 (CDT)
#
***************
*** 6,26 ****
# Ollivier Robert <Ollivier.Robert@keltia.frmug.fr.net>
# Date: Wed, 28 Sep 1994 00:37:46 +0100 (MET)
#
case "$osvers" in
0.*|1.0*)
usedl="$undef"
;;
! *) d_dlopen="$define"
cccdlflags='-DPIC -fpic'
! lddlflags='-Bshareable'
malloctype='void *'
groupstype='int'
d_setregid='undef'
d_setreuid='undef'
d_setrgid='undef'
d_setruid='undef'
! i_unistd='undef'
;;
esac
# Avoid telldir prototype conflict in pp_sys.c (FreeBSD uses const DIR *)
pp_sys_cflags='ccflags="$ccflags -DHAS_TELLDIR_PROTOTYPE"'
--- 6,50 ----
# Ollivier Robert <Ollivier.Robert@keltia.frmug.fr.net>
# Date: Wed, 28 Sep 1994 00:37:46 +0100 (MET)
#
+ # Additional 2.* defines from
+ # Ollivier Robert <Ollivier.Robert@keltia.frmug.fr.net>
+ # Date: Sat, 8 Apr 1995 20:53:41 +0200 (MET DST)
+ #
+ # FreeBSD has the dynamic loading dl*() functions in /usr/lib/crt0.o,
+ # so Configure doesn't find them (unless you abandon the nm scan).
+ #
+ # The two flags "-fpic -DPIC" are used to indicate a
+ # will-be-shared object. Configure will guess the -fpic, (and the
+ # -DPIC is not used by perl proper) but the full define is included to
+ # be consistent with the FreeBSD general shared libs building process.
+ #
+ # setreuid and friends are inherently broken in all versions of FreeBSD.
+ #
+
case "$osvers" in
0.*|1.0*)
usedl="$undef"
;;
! 1.1*) d_dlopen="$define"
cccdlflags='-DPIC -fpic'
! lddlflags='-Bshareable $lddlflags'
malloctype='void *'
groupstype='int'
d_setregid='undef'
d_setreuid='undef'
d_setrgid='undef'
d_setruid='undef'
! ;;
! *)
! d_dlopen="$define"
! cccdlflags='-DPIC -fpic'
! lddlflags='-Bshareable $lddlflags'
! d_setregid='undef'
! d_setreuid='undef'
! d_setrgid='undef'
! d_setruid='undef'
;;
esac
# Avoid telldir prototype conflict in pp_sys.c (FreeBSD uses const DIR *)
+ # Configure should test for this. Volunteers?
pp_sys_cflags='ccflags="$ccflags -DHAS_TELLDIR_PROTOTYPE"'
Index: hints/isc.sh
*** perl5.001c/hints/isc.sh Tue Oct 18 12:33:12 1994
--- perl5.001d/hints/isc.sh Sat Apr 15 10:30:51 1995
***************
*** 6,14 ****
#
# Use Configure -Dcc=gcc to use gcc
#
! set `echo X "$libswanted "| sed -e 's/ c / /'`
shift
libswanted="$*"
case "$cc" in
*gcc*) ccflags="$ccflags -posix"
ldflags="$ldflags -posix"
--- 6,24 ----
#
# Use Configure -Dcc=gcc to use gcc
#
!
! # We don't want to explicitly mention -lc (since we're using POSIX mode.)
! # We also don't want -lx (the Xenix compatability libraries.) The only
! # thing that it seems to pick up is chsize(), which has been reported to
! # not work. chsize() can also be implemented via fcntl() in perl (if you
! # define -D_SYSV3). We'll leave in -lPW since it's harmless. Some
! # extension might eventually need it for alloca, though perl doesn't use
! # it.
!
! set `echo X "$libswanted "| sed -e 's/ c / /' -e 's/ x / /'`
shift
libswanted="$*"
+
case "$cc" in
*gcc*) ccflags="$ccflags -posix"
ldflags="$ldflags -posix"
***************
*** 17,21 ****
--- 27,37 ----
ldflags="$ldflags -Xp"
;;
esac
+
+ # You can also include -D_SYSV3 to pick up "traditionally visible"
+ # symbols hidden by name-space pollution rules. This raises some
+ # compilation "redefinition" warnings, but they appear harmless.
+ # ccflags="$ccflags -D_SYSV3"
+
# Pick up dbm.h in <rpcsvc/dbm.h>
ccflags="$ccflags -I/usr/include/rpcsvc"
Index: hints/linux.sh
*** perl5.001c/hints/linux.sh Fri Apr 7 09:20:47 1995
--- perl5.001d/hints/linux.sh Mon Apr 10 16:20:22 1995
***************
*** 24,32 ****
esac
# Perl expects BSD style signal handling.
! ccflags="-D__USE_BSD_SIGNAL $ccflags"
! # The following functions are gcc built-ins, but the Configure test
# may fail because it doesn't supply a proper prototype.
d_memcmp=define
d_memcpy=define
--- 24,33 ----
esac
# Perl expects BSD style signal handling.
! # gcc defines _G_HAVE_BOOL to 1, but doesn't actually supply bool.
! ccflags="-D__USE_BSD_SIGNAL -Dbool=char -DHAS_BOOL $ccflags"
! # The following functions are gcc built-ins, but the Configure tests
# may fail because it doesn't supply a proper prototype.
d_memcmp=define
d_memcpy=define
***************
*** 68,84 ****
You appear to have ELF support. I'll try to use it for dynamic loading.
EOM
! # Be careful not to overwrite lddlflags, since the user might
! # have specified some -L/path options on the Configure command line.
! lddlflags="-shared $lddlflags"
! ccdlflags='-rdynamic'
! so='so'
! dlext='so'
! ld=gcc
else
echo "You don't have an ELF gcc, using dld if available."
# We might possibly have a version of DLD around.
lddlflags="-r $lddlflags"
so='sa'
dlext='o'
## If you are using DLD 3.2.4 which does not support shared libs,
--- 69,83 ----
You appear to have ELF support. I'll try to use it for dynamic loading.
EOM
! # Configure now handles these automatically.
else
echo "You don't have an ELF gcc, using dld if available."
# We might possibly have a version of DLD around.
lddlflags="-r $lddlflags"
+ # These empty values are so that Configure doesn't put in the
+ # Linux ELF values.
+ ccdlflags=' '
+ cccdlflags=' '
so='sa'
dlext='o'
## If you are using DLD 3.2.4 which does not support shared libs,
Index: hints/netbsd.sh
*** perl5.001c/hints/netbsd.sh Fri Mar 31 15:29:47 1995
--- perl5.001d/hints/netbsd.sh Mon Apr 10 10:14:41 1995
***************
*** 1,5 ****
# hints/netbsd.sh
! # netbsd keeps dynamic loading dl*() functions in /lib/crt0.o,
# so Configure doesn't find them (unless you abandon the nm scan).
case "$osvers" in
0.9*|0.8*)
--- 1,5 ----
# hints/netbsd.sh
! # netbsd keeps dynamic loading dl*() functions in /usr/lib/crt0.o,
# so Configure doesn't find them (unless you abandon the nm scan).
case "$osvers" in
0.9*|0.8*)
Index: hints/next_3_0.sh
*** perl5.001c/hints/next_3_0.sh Mon Feb 13 20:15:00 1995
--- perl5.001d/hints/next_3_0.sh Tue Apr 11 11:20:16 1995
***************
*** 21,27 ****
--- 21,32 ----
useposix='undef'
ldflags='-u libsys_s'
libswanted='dbm gdbm db'
+ #
lddlflags='-r'
+ # Give cccdlflags an empty value since Configure will detect we are
+ # using GNU cc and try to specify -fpic for cccdlflags.
+ cccdlflags=' '
+ #
i_utime='undef'
groupstype='int'
direntrytype='struct direct'
Index: hints/next_3_2.sh
*** perl5.001c/hints/next_3_2.sh Wed Feb 22 14:36:59 1995
--- perl5.001d/hints/next_3_2.sh Mon Apr 10 10:14:22 1995
***************
*** 5,11 ****
--- 5,16 ----
POSIX_cflags='ccflags="-posix $ccflags"'
ldflags='-u libsys_s'
libswanted='dbm gdbm db'
+
lddlflags='-r'
+ # Give cccdlflags an empty value since Configure will detect we are
+ # using GNU cc and try to specify -fpic for cccdlflags.
+ cccdlflags=' '
+
i_utime='undef'
groupstype='int'
direntrytype='struct direct'
Index: hints/powerunix.sh
*** perl5.001c/hints/powerunix.sh Tue Feb 28 19:42:55 1995
--- perl5.001d/hints/powerunix.sh Fri Apr 14 10:40:15 1995
***************
*** 49,55 ****
cc='/bin/cc'
cccdlflags='-Zpic'
ccdlflags='-Zlink=dynamic -Wl,-Bexport'
! lddlflags='-G'
# Configure imagines that stdio.h is "standard", but it really isn't.
# Things like the -T and -B file test operators (on file handles) fail when
--- 49,55 ----
cc='/bin/cc'
cccdlflags='-Zpic'
ccdlflags='-Zlink=dynamic -Wl,-Bexport'
! lddlflags='-Zlink=so'
# Configure imagines that stdio.h is "standard", but it really isn't.
# Things like the -T and -B file test operators (on file handles) fail when
Index: hints/sco_3.sh
*** perl5.001c/hints/sco_3.sh Tue Oct 18 12:33:50 1994
--- perl5.001d/hints/sco_3.sh Tue Apr 11 16:14:41 1995
***************
*** 22,30 ****
--- 22,41 ----
ccflags="$ccflags -U M_XENIX"
optimize="$optimize -O2"
;;
+ scocc) ;;
+
*)
ccflags="$ccflags -W0 -U M_XENIX"
;;
esac
i_varargs=undef
+
+ # I have received one report that nm extraction doesn't work if you're
+ # using the scocc compiler. This system had the following 'myconfig'
+ # uname='xxx xxx 3.2 2 i386 '
+ # cc='scocc', optimize='-O'
+ usenm='false'
+
+ # If you want to use nm, you'll probably have to use nm -p. The
+ # following does that for you:
nm_opt='-p'
Index: installperl
*** perl5.001c/installperl Tue Apr 4 11:55:03 1995
--- perl5.001d/installperl Sat Apr 15 11:14:10 1995
***************
*** 146,153 ****
makedir("$installarchlib/CORE");
foreach $file (<*.h libperl*.*>) {
cp_if_diff($file,"$installarchlib/CORE/$file");
! if ($file =~ /\.a$/ && $osname eq 'next') {
! #on NeXTs we have to rerun ranlib after copying libraries
&cmd("$ranlib $installarchlib/CORE/$file");
}
}
--- 146,154 ----
makedir("$installarchlib/CORE");
foreach $file (<*.h libperl*.*>) {
cp_if_diff($file,"$installarchlib/CORE/$file");
! if ($file =~ /\.a$/ && $osname =~ /^(next|sunos)$/) {
! # on NeXTs and Suns we have to rerun ranlib after copying libraries
! # (maybe on all platforms which have ranlib ?)
&cmd("$ranlib $installarchlib/CORE/$file");
}
}
***************
*** 342,347 ****
--- 343,349 ----
-f $from || die "$0: $from not found";
system "cmp", "-s", $from, $to;
if ($?) {
+ unlink($to); # In case we don't have write permissions.
cmd("cp $from $to");
}
}
Index: lib/ExtUtils/MakeMaker.pm
*** perl5.001c/lib/ExtUtils/MakeMaker.pm Mon Apr 3 15:52:47 1995
--- perl5.001d/lib/ExtUtils/MakeMaker.pm Fri Apr 14 17:18:56 1995
***************
*** 1,9 ****
package ExtUtils::MakeMaker;
! $Version = 4.091; # Last edited 31 Mar 1995 by Andreas Koenig
use Config;
- check_hints();
use Carp;
use Cwd;
--- 1,8 ----
package ExtUtils::MakeMaker;
! $Version = 4.093; # Last edited 12 Apr 1995 by Andy Dougherty
use Config;
use Carp;
use Cwd;
***************
*** 48,58 ****
hash table of Config.pm by supplying hints files in a C<hints/>
directory. The hints files are expected to be named like their
counterparts in C<PERL_SRC/hints>, but with an C<.pl> file name
! extension (eg. C<next_3_2.sh>). They are simply C<eval>ed by MakeMaker
! and can be used to execute commands as well as to include special
! variables. If there is no hintsfile for the actual system, but for
! some previous releases of the same operating system, the latest one of
! those is used.
=head2 Default Makefile Behaviour
--- 47,57 ----
hash table of Config.pm by supplying hints files in a C<hints/>
directory. The hints files are expected to be named like their
counterparts in C<PERL_SRC/hints>, but with an C<.pl> file name
! extension (eg. C<next_3_2.pl>). They are simply C<eval>ed by MakeMaker
! within the WriteMakefile() subroutine, and can be used to execute
! commands as well as to include special variables. If there is no
! hintsfile for the actual system, but for some previous releases of the
! same operating system, the latest one of those is used.
=head2 Default Makefile Behaviour
***************
*** 80,86 ****
make config # to check if the Makefile is up-to-date
make clean # delete local temporary files (Makefile gets renamed)
make realclean # delete all derived files (including installed files)
! make distclean # produce a gzipped file ready for shipping
The macros in the produced Makefile may be overridden on the command
line to the make call as in the following example:
--- 79,85 ----
make config # to check if the Makefile is up-to-date
make clean # delete local temporary files (Makefile gets renamed)
make realclean # delete all derived files (including installed files)
! make dist # produce a gzipped file ready for shipping
The macros in the produced Makefile may be overridden on the command
line to the make call as in the following example:
***************
*** 276,283 ****
=cut
sub check_hints {
! # We allow extension-specific hints files. If we find one we act as if Config.pm
! # had read the contents
# First we look for the best hintsfile we have
my(@goodhints);
--- 275,281 ----
=cut
sub check_hints {
! # We allow extension-specific hints files.
# First we look for the best hintsfile we have
my(@goodhints);
***************
*** 300,312 ****
closedir DIR;
return unless @goodhints; # There was no hintsfile
# the last one in lexical ordering is our choice:
! $hint=(reverse sort @goodhints)[0];
# execute the hintsfile:
open HINTS, "hints/$hint.pl";
@goodhints = <HINTS>;
close HINTS;
eval join('',@goodhints);
}
# Setup dummy package:
--- 298,312 ----
closedir DIR;
return unless @goodhints; # There was no hintsfile
# the last one in lexical ordering is our choice:
! $hint=(sort @goodhints)[-1];
# execute the hintsfile:
open HINTS, "hints/$hint.pl";
@goodhints = <HINTS>;
close HINTS;
+ print STDOUT "Processing hints file hints/$hint.pl";
eval join('',@goodhints);
+ print STDOUT $@ if $@;
}
# Setup dummy package:
***************
*** 444,450 ****
dynamic_lib: {ARMAYBE => 'ar', OTHERLDFLAGS => '...'}
clean: {FILES => "*.xyz foo"}
realclean: {FILES => '$(INST_ARCHAUTODIR)/*.xyz'}
! distclean: {TARNAME=>'MyTarFile', TARFLAGS=>'cvfF', COMPRESS=>'gzip'}
tool_autosplit: {MAXLEN => 8}
END
--- 444,450 ----
dynamic_lib: {ARMAYBE => 'ar', OTHERLDFLAGS => '...'}
clean: {FILES => "*.xyz foo"}
realclean: {FILES => '$(INST_ARCHAUTODIR)/*.xyz'}
! dist: {TARNAME=>'MyTarFile', TARFLAGS=>'cvfF', COMPRESS=>'gzip'}
tool_autosplit: {MAXLEN => 8}
END
***************
*** 478,484 ****
'subdirs' => {},
'clean' => {},
'realclean' => {},
! 'distclean' => {},
'test' => {},
'install' => {},
'force' => {},
--- 478,484 ----
'subdirs' => {},
'clean' => {},
'realclean' => {},
! 'dist' => {},
'test' => {},
'install' => {},
'force' => {},
***************
*** 534,539 ****
--- 534,542 ----
parse_args(\%att, @ARGV);
my(%initial_att) = %att; # record initial attributes
+
+ check_hints();
+
my($key);
MY->init_main();
***************
*** 570,576 ****
} else {
my(%a) = %{$att{$section} || {}};
print MAKE "\n# --- MakeMaker $section section:";
! print MAKE "# ",%a if $Verbose;
print(MAKE MY->nicetext(MY->$section( %a )));
}
}
--- 573,579 ----
} else {
my(%a) = %{$att{$section} || {}};
print MAKE "\n# --- MakeMaker $section section:";
! print MAKE "# ", join ", ", %a if $Verbose;
print(MAKE MY->nicetext(MY->$section( %a )));
}
}
***************
*** 1003,1009 ****
sub find_perl{
my($self, $ver, $names, $dirs, $trace) = @_;
my($name, $dir);
! if ($trace){
print "Looking for perl $ver by these names: ";
print "@$names, ";
print "in these dirs:";
--- 1006,1012 ----
sub find_perl{
my($self, $ver, $names, $dirs, $trace) = @_;
my($name, $dir);
! if ($trace >= 2){
print "Looking for perl $ver by these names: ";
print "@$names, ";
print "in these dirs:";
***************
*** 1017,1023 ****
$name .= ".exe" unless -x "$dir/$name";
}
next unless -x "$dir/$name";
! print "Executing $dir/$name" if ($trace);
my($out);
if ($Is_VMS) {
my($vmscmd) = 'MCR ' . vmsify("$dir/$name");
--- 1020,1026 ----
$name .= ".exe" unless -x "$dir/$name";
}
next unless -x "$dir/$name";
! print "Executing $dir/$name" if ($trace >= 2);
my($out);
if ($Is_VMS) {
my($vmscmd) = 'MCR ' . vmsify("$dir/$name");
***************
*** 1025,1031 ****
} else {
$out = `$dir/$name -e 'require $ver; print "VER_OK\n" ' 2>&1`;
}
! return "$dir/$name" if $out =~ /VER_OK/;
}
}
print STDOUT "Unable to find a perl $ver (by these names: @$names, in these dirs: @$dirs)\n";
--- 1028,1037 ----
} else {
$out = `$dir/$name -e 'require $ver; print "VER_OK\n" ' 2>&1`;
}
! if ($out =~ /VER_OK/) {
! print "Using $dir/$name" if $trace;
! return "$dir/$name";
! }
}
}
print STDOUT "Unable to find a perl $ver (by these names: @$names, in these dirs: @$dirs)\n";
***************
*** 1223,1228 ****
--- 1229,1235 ----
."Please notify perl5-porters\@nicoh.com\n";
}
my($cccmd)=($old) ? $old : $new;
+ $cccmd =~ s/\b\Q$Config{'cc'}\E\b/\$(CC)/;
"CCCMD = $cccmd\n";
}
***************
*** 1617,1624 ****
# This method provides a mechanism to automatically deal with
# subdirectories containing further Makefile.PL scripts.
# It calls the subdir_x() method for each subdirectory.
! foreach(<*/Makefile.PL>){
! s:/Makefile\.PL$:: ;
print "Including $_ subdirectory" if ($Verbose);
push(@m, MY->subdir_x($_));
}
--- 1624,1632 ----
# This method provides a mechanism to automatically deal with
# subdirectories containing further Makefile.PL scripts.
# It calls the subdir_x() method for each subdirectory.
! foreach(grep -d, &lsdir()){
! next if /^\./;
! next unless -f "$_/Makefile\.PL" ;
print "Including $_ subdirectory" if ($Verbose);
push(@m, MY->subdir_x($_));
}
***************
*** 1718,1724 ****
}
! sub distclean {
my($self, %attribs) = @_;
# VERSION should be sanitised before use as a file name
my($tarname) = $attribs{TARNAME} || '$(DISTNAME)-$(VERSION)';
--- 1726,1732 ----
}
! sub dist {
my($self, %attribs) = @_;
# VERSION should be sanitised before use as a file name
my($tarname) = $attribs{TARNAME} || '$(DISTNAME)-$(VERSION)';
***************
*** 1728,1734 ****
my($postop) = $attribs{POSTOP} || '@:';
my($mkfiles) = join(' ', map("$_/$att{MAKEFILE} $_/$att{MAKEFILE}.old", ".", @{$att{DIR}}));
"
! distclean: clean
$preop
$att{RM_F} $mkfiles
cd .. && tar $tarflags $tarname.tar \$(BASEEXT)
--- 1736,1742 ----
my($postop) = $attribs{POSTOP} || '@:';
my($mkfiles) = join(' ', map("$_/$att{MAKEFILE} $_/$att{MAKEFILE}.old", ".", @{$att{DIR}}));
"
! dist: clean
$preop
$att{RM_F} $mkfiles
cd .. && tar $tarflags $tarname.tar \$(BASEEXT)
***************
*** 1913,1919 ****
$cccmd .= " $Config{'cccdlflags'}" if ($Config{'d_shrplib'});
# The front matter of the linkcommand...
! $linkcmd = join ' ', $Config{'cc'},
grep($_, @Config{qw(large split ldflags ccdlflags)});
$linkcmd =~ s/\s+/ /g;
--- 1921,1927 ----
$cccmd .= " $Config{'cccdlflags'}" if ($Config{'d_shrplib'});
# The front matter of the linkcommand...
! $linkcmd = join ' ', "\$(CC)",
grep($_, @Config{qw(large split ldflags ccdlflags)});
$linkcmd =~ s/\s+/ /g;
***************
*** 1935,1941 ****
for (sort keys %static) {
next unless /\.a$/;
$_ = dirname($_) . "/extralibs.ld";
! push @$extra, "`cat $_`";
}
grep(s/^/-I/, @$perlinc);
--- 1943,1949 ----
for (sort keys %static) {
next unless /\.a$/;
$_ = dirname($_) . "/extralibs.ld";
! push @$extra, $_;
}
grep(s/^/-I/, @$perlinc);
***************
*** 1951,1957 ****
MAP_PERLINC = @{$perlinc}
MAP_STATIC = ",
join(" ", sort keys %static), "
- MAP_EXTRA = @{$extra}
MAP_PRELIBS = $Config{'libs'} $Config{'cryptlib'}
";
--- 1959,1964 ----
***************
*** 1969,1976 ****
";
push @m, "
! \$(MAP_TARGET): $tmp/perlmain.o \$(MAP_LIBPERL) \$(MAP_STATIC)
! \$(MAP_LINKCMD) -o \$\@ $tmp/perlmain.o \$(MAP_LIBPERL) \$(MAP_STATIC) \$(MAP_EXTRA) \$(MAP_PRELIBS)
@ echo 'To install the new \"\$(MAP_TARGET)\" binary, call'
@ echo ' make -f $makefilename inst_perl MAP_TARGET=\$(MAP_TARGET)'
@ echo 'To remove the intermediate files say'
--- 1976,1993 ----
";
push @m, "
! extralibs.ld: @$extra
! \@ $att{RM_F} \$\@
! \@ \$(TOUCH) \$\@
! ";
!
! foreach (@$extra){
! push @m, "\tcat $_ >> \$\@\n";
! }
!
! push @m, "
! \$(MAP_TARGET): $tmp/perlmain.o \$(MAP_LIBPERL) \$(MAP_STATIC) extralibs.ld
! \$(MAP_LINKCMD) -o \$\@ $tmp/perlmain.o \$(MAP_LIBPERL) \$(MAP_STATIC) `cat extralibs.ld` \$(MAP_PRELIBS)
@ echo 'To install the new \"\$(MAP_TARGET)\" binary, call'
@ echo ' make -f $makefilename inst_perl MAP_TARGET=\$(MAP_TARGET)'
@ echo 'To remove the intermediate files say'
***************
*** 1988,1999 ****
};
! # We write MAP_EXTRA outside the perl program to have it eval'd by the shell
push @m, q{
doc_inst_perl:
@ $(FULLPERL) -e 'use ExtUtils::MakeMaker; MM->writedoc("Perl binary",' \\
-e '"$(MAP_TARGET)", "MAP_STATIC=$(MAP_STATIC)",' \\
! -e '"MAP_EXTRA=@ARGV", "MAP_LIBPERL=$(MAP_LIBPERL)")' -- $(MAP_EXTRA)
};
push @m, qq{
--- 2005,2016 ----
};
! # We write EXTRA outside the perl program to have it eval'd by the shell
push @m, q{
doc_inst_perl:
@ $(FULLPERL) -e 'use ExtUtils::MakeMaker; MM->writedoc("Perl binary",' \\
-e '"$(MAP_TARGET)", "MAP_STATIC=$(MAP_STATIC)",' \\
! -e '"MAP_EXTRA=@ARGV", "MAP_LIBPERL=$(MAP_LIBPERL)")' -- `cat extralibs.ld`
};
push @m, qq{
***************
*** 2004,2009 ****
--- 2021,2028 ----
realclean :: map_clean
+ distclean :: realclean
+
map_clean :
$att{RM_F} $tmp/perlmain.o $tmp/perlmain.c $makefilename
};
***************
*** 2068,2079 ****
# For gcc-2.6.2 on linux (March 1995), DLD can not load
# .sa libraries, with the exception of libm.sa, so we
# deliberately skip them.
! if (@fullname=<${thispth}/lib${thislib}.${so}.[0-9]*>){
! $fullname=$fullname[-1]; #ATTN: 10 looses against 9!
} elsif (-f ($fullname="$thispth/lib$thislib.$so")
! && (($Config{'dlsrc'} ne "dl_dld.xs") || ($thislib eq "m"))){
} elsif (-f ($fullname="$thispth/lib${thislib}_s.a")
! && ($thislib .= "_s") ){ # we must explicitly ask for _s version
} elsif (-f ($fullname="$thispth/lib$thislib.a")){
} elsif (-f ($fullname="$thispth/Slib$thislib.a")){
} else {
--- 2087,2120 ----
# For gcc-2.6.2 on linux (March 1995), DLD can not load
# .sa libraries, with the exception of libm.sa, so we
# deliberately skip them.
! if (@fullname = lsdir($thispth,"^lib$thislib\.$so\.[0-9]+")){
! # Take care that libfoo.so.10 wins against libfoo.so.9.
! # Compare two libraries to find the most recent version
! # number. E.g. if you have libfoo.so.9.0.7 and
! # libfoo.so.10.1, first convert all digits into two
! # decimal places. Then we'll add ".00" to the shorter
! # strings so that we're comparing strings of equal length
! # Thus we'll compare libfoo.so.09.07.00 with
! # libfoo.so.10.01.00. Some libraries might have letters
! # in the version. We don't know what they mean, but will
! # try to skip them gracefully -- we'll set any letter to
! # '0'. Finally, sort in reverse so we can take the
! # first element.
! $fullname = "$thispth/" .
! (sort { my($ma) = $a;
! my($mb) = $b;
! $ma =~ tr/A-Za-z/0/s;
! $ma =~ s/\b(\d)\b/0$1/g;
! $mb =~ tr/A-Za-z/0/s;
! $mb =~ s/\b(\d)\b/0$1/g;
! while (length($ma) < length($mb)) { $ma .= ".00"; }
! while (length($mb) < length($ma)) { $mb .= ".00"; }
! # Comparison deliberately backwards
! $mb cmp $ma;} @fullname)[0];
} elsif (-f ($fullname="$thispth/lib$thislib.$so")
! && (($Config{'dlsrc'} ne "dl_dld.xs") || ($thislib eq "m"))){
} elsif (-f ($fullname="$thispth/lib${thislib}_s.a")
! && ($thislib .= "_s") ){ # we must explicitly use _s version
} elsif (-f ($fullname="$thispth/lib$thislib.a")){
} elsif (-f ($fullname="$thispth/Slib$thislib.a")){
} else {
***************
*** 2092,2103 ****
# Do not add it into the list if it is already linked in
# with the main perl executable.
! # We have to special-case the NeXT, because all the math is also in libsys_s
! unless ( $in_perl || ($Config{'osname'} eq 'next' && $thislib eq 'm') ){
push(@extralibs, "-l$thislib");
}
-
# We might be able to load this archive file dynamically
if ( $Config{'dlsrc'} =~ /dl_next|dl_dld/){
# We push -l$thislib instead of $fullname because
--- 2133,2145 ----
# Do not add it into the list if it is already linked in
# with the main perl executable.
! # We have to special-case the NeXT, because all the math
! # is also in libsys_s
! unless ($in_perl ||
! ($Config{'osname'} eq 'next' && $thislib eq 'm') ){
push(@extralibs, "-l$thislib");
}
# We might be able to load this archive file dynamically
if ( $Config{'dlsrc'} =~ /dl_next|dl_dld/){
# We push -l$thislib instead of $fullname because
***************
*** 2120,2126 ****
}
last; # found one here so don't bother looking further
}
! print STDOUT "Warning (non-fatal): No library found for -l$thislib" unless $found_lib>0;
}
return ('','','') unless $found;
("@extralibs", "@bsloadlibs", "@ldloadlibs");
--- 2162,2169 ----
}
last; # found one here so don't bother looking further
}
! print STDOUT "Warning (non-fatal): No library found for -l$thislib"
! unless $found_lib>0;
}
return ('','','') unless $found;
("@extralibs", "@bsloadlibs", "@ldloadlibs");
***************
*** 2393,2398 ****
--- 2436,2476 ----
Another attempt to fix writedoc() from Dean Roehrich.
+
+ v4.092 April 11 1994 by Andreas Koenig
+
+ Fixed a docu bug in hint file description. Added printing of a warning
+ from eval in the hintfile section if the eval has errors. Moved
+ check_hints() into the WriteMakefile() subroutine to avoid evaling
+ hintsfiles for other uses of the module (mkbootstrap, mksymlists).
+
+ Eliminated csh globbing to work around buggy Linux csh.
+
+ In extliblist() libfoo.so.10 now wins against libfoo.so.9.
+
+ Use $(CC) instead of $Config{'cc'} everywhere to allow overriding
+ according to a patch by Dean Roehrich.
+
+ Introduce a ./extralibs.ld file that contains the contents of all
+ relevant extralibs.ld files for a static build to shorten the command
+ line for the linking of a new static perl.
+
+ Minor cosmetics.
+
+ v4.093 April 12 1994 by Andy Dougherty
+
+ Rename distclean target to plain dist. Insert a dummy distclean
+ target that's the same as realclean. This is more consistent with the
+ main perl makefile.
+
+ Fix up extliblist() so even bizarre names like libfoo.so.10.0.1
+ are handled.
+
+ Include Tim's suggestions about $verbose and more careful substitution
+ of $(CC) for $Config{'cc'}.
+
+ Minor cosmetic fixes for my 80-character wide terminal.
+
=head1 NOTES
MakeMaker development work still to be done:
***************
*** 2401,2406 ****
--- 2479,2489 ----
Add a html: target when there has been found a general solution to
installing html files.
+
+ Add an uninstall target.
+
+ Add a FLAVOR variable that makes it easier to build debugging,
+ embedded or multiplicity perls.
=cut
Index: lib/TieHash.pm
*** perl5.001c/lib/TieHash.pm Thu Apr 6 11:04:26 1995
--- perl5.001d/lib/TieHash.pm Thu Apr 13 09:40:40 1995
***************
*** 10,17 ****
sub TIEHASH {
my $pack = shift;
! if (defined &{"{$pack}::new"}) {
! carp "WARNING: calling ${pack}->new since ${pack}->TIEHASH is missing"
if $^W;
$pack->new(@_);
}
--- 10,17 ----
sub TIEHASH {
my $pack = shift;
! if (defined &{"$pack\::new"}) {
! carp "WARNING: calling $pack\->new since $pack\->TIEHASH is missing"
if $^W;
$pack->new(@_);
}
Index: perl.h
*** perl5.001c/perl.h Wed Apr 5 16:43:59 1995
--- perl5.001d/perl.h Thu Apr 13 09:29:16 1995
***************
*** 647,657 ****
--- 647,660 ----
#ifdef CASTI32
#define I_32(what) ((I32)(what))
#define I_V(what) ((IV)(what))
+ #define U_V(what) ((UV)(what))
#else
I32 cast_i32 _((double));
#define I_32(what) (cast_i32((double)(what)))
IV cast_iv _((double));
#define I_V(what) (cast_iv((double)(what)))
+ UV cast_uv _((double));
+ #define U_V(what) (cast_uv((double)(what)))
#endif
struct Outrec {
Index: pod/Makefile
*** perl5.001c/pod/Makefile Thu Jan 19 19:08:44 1995
--- perl5.001d/pod/Makefile Sat Apr 15 11:26:57 1995
***************
*** 1,5 ****
--- 1,7 ----
all: man
+ PERL = ../miniperl
+
POD = \
perl.pod \
perlapi.pod \
***************
*** 89,107 ****
man: $(MAN)
! html: $(HTML)
.SUFFIXES: .pod .man
.pod.man:
! ../miniperl pod2man $*.pod >$*.man
.SUFFIXES: .pod .html
.pod.html:
! ../miniperl pod2html $*.pod >$*.html
clean:
rm -f $(MAN) $(HTML)
realclean: clean
--- 91,125 ----
man: $(MAN)
! # pod2html runs on all the pods at once in order to build up
! # cross-references.
! html:
! $(PERL) pod2html *.pod
.SUFFIXES: .pod .man
.pod.man:
! $(PERL) pod2man $*.pod >$*.man
.SUFFIXES: .pod .html
.pod.html:
! $(PERL) pod2html $*.pod
clean:
rm -f $(MAN) $(HTML)
realclean: clean
+ rm -f pod2man pod2latex pod2html
+
+ distclean: realclean
+
+ # Dependencies.
+ pod2latex: pod2latex.SH ../config.sh
+ sh pod2latex.SH
+
+ pod2html: pod2html.SH ../config.sh
+ sh pod2html.SH
+
+ pod2man: pod2man.SH ../config.sh
+ sh pod2man.SH
Index: pod/pod2html.SH
*** perl5.001c/pod/pod2html.SH Thu Jan 19 20:04:59 1995
--- perl5.001d/pod/pod2html.SH Thu Apr 13 10:34:13 1995
***************
*** 1,4 ****
! #!/usr/bin/perl
#
# pod2html - convert pod format to html
#
--- 1,28 ----
! case $CONFIG in
! '')
! if test -f config.sh; then TOP=.;
! elif test -f ../config.sh; then TOP=..;
! elif test -f ../../config.sh; then TOP=../..;
! elif test -f ../../../config.sh; then TOP=../../..;
! elif test -f ../../../../config.sh; then TOP=../../../..;
! else
! echo "Can't find config.sh."; exit 1
! fi
! . $TOP/config.sh
! ;;
! esac
! case "$0" in
! */*) cd `expr X$0 : 'X\(.*\)/'` ;;
! esac
! echo "Extracting pod/pod2html (with variable substitutions)"
! rm -f pod2html
! $spitshell >pod2html <<!GROK!THIS!
! #!$bin/perl
! eval 'exec $bin/perl -S \$0 \${1+"\$@"}'
! if \$running_under_some_shell;
! !GROK!THIS!
!
! $spitshell >>pod2html <<'!NO!SUBS!'
#
# pod2html - convert pod format to html
#
***************
*** 46,54 ****
--- 70,80 ----
# loop twice through the pods, first to learn the links, then to produce html
for $count (0,1){
+ (print "Scanning pods...\n") unless $count;
foreach $podfh ( @Pods ) {
($pod = $podfh) =~ s/\.pod$//;
Debug("files", "opening 2 $podfh" );
+ (print "Creating $pod.html from $podfh\n") if $count;
$RS = "\n=";
open($podfh,"<".$podfh) || die "can't open $podfh: $ERRNO";
@all=<$podfh>;
***************
*** 60,70 ****
$in_list=0;
$html=$pod.".html";
if($count){
- #open(HTML,">&STDOUT") || die "can't create $html: $ERRNO";
open(HTML,">$html") || die "can't create $html: $ERRNO";
print HTML <<'HTML__EOQ', <<"HTML__EOQQ";
! <!-- $RCSfile$$Date$ -->
! <!-- $Log$ -->
<HTML>
HTML__EOQ
<TITLE> \U$pod\E </TITLE>
--- 86,95 ----
$in_list=0;
$html=$pod.".html";
if($count){
open(HTML,">$html") || die "can't create $html: $ERRNO";
print HTML <<'HTML__EOQ', <<"HTML__EOQQ";
! <!-- \$RCSfile\$\$Revision\$\$Date\$ -->
! <!-- \$Log\$ -->
<HTML>
HTML__EOQ
<TITLE> \U$pod\E </TITLE>
***************
*** 77,120 ****
($cmd, $title, $rest) = ($1,$2,$3);
if ($cmd eq "item") {
if($count ){
! ($depth) or &do_list("over",$all[$i],\$in_list,\$depth);
! &do_item($title,$rest,$in_list);
}
else{
# scan item
! &scan_thing("item",$title,$pod);
}
}
elsif ($cmd =~ /^head([12])/){
$num=$1;
if($count){
! &do_hdr($num,$title,$rest,$depth);
}
else{
# header scan
! &scan_thing($cmd,$title,$pod); # skip head1
}
}
elsif ($cmd =~ /^over/) {
! $depth and &do_list("over",$all[$i+1],\$in_list,\$depth);
}
elsif ($cmd =~ /^back/) {
if($count){
($depth) or next; # just skip it
! &do_list("back",$all[$i+1],\$in_list,\$depth);
! &do_rest("$title.$rest");
}
}
elsif ($cmd =~ /^cut/) {
! &do_rest($rest);
}
! else {
! warn "unrecognized header: $cmd";
}
}
if($count){
while($depth){
! &do_list("back",$all[$i+1],\$in_list,\$depth);
}
print HTML "\n</HTML>\n";
}
--- 102,146 ----
($cmd, $title, $rest) = ($1,$2,$3);
if ($cmd eq "item") {
if($count ){
! ($depth) or do_list("over",$all[$i],\$in_list,\$depth);
! do_item($title,$rest,$in_list);
}
else{
# scan item
! scan_thing("item",$title,$pod);
}
}
elsif ($cmd =~ /^head([12])/){
$num=$1;
if($count){
! do_hdr($num,$title,$rest,$depth);
}
else{
# header scan
! scan_thing($cmd,$title,$pod); # skip head1
}
}
elsif ($cmd =~ /^over/) {
! $count and $depth and do_list("over",$all[$i+1],\$in_list,\$depth);
}
elsif ($cmd =~ /^back/) {
if($count){
($depth) or next; # just skip it
! do_list("back",$all[$i+1],\$in_list,\$depth);
! do_rest("$title.$rest");
}
}
elsif ($cmd =~ /^cut/) {
! next;
}
! elsif($Debug){
! (warn "unrecognized header: $cmd") if $Debug;
}
}
+ # close open lists without '=back' stmts
if($count){
while($depth){
! do_list("back",$all[$i+1],\$in_list,\$depth);
}
print HTML "\n</HTML>\n";
}
***************
*** 125,131 ****
my($which,$next_one,$list_type,$depth)=@_;
my($key);
if($which eq "over"){
! ($next_one =~ /^item\s+(.*)/ ) or warn "Bad list, $1\n";
$key=$1;
if($key =~ /^1\.?/){
$$list_type = "OL";
--- 151,157 ----
my($which,$next_one,$list_type,$depth)=@_;
my($key);
if($which eq "over"){
! ($next_one =~ /^item\s+(.*)/ ) or (warn "Bad list, $1\n") if $Debug;
$key=$1;
if($key =~ /^1\.?/){
$$list_type = "OL";
***************
*** 137,143 ****
$$list_type="DL";
}
else{
! warn "unknown list type for item $key";
}
print HTML qq{\n};
print HTML qq{<$$list_type>};
--- 163,169 ----
$$list_type="DL";
}
else{
! (warn "unknown list type for item $key") if $Debug;
}
print HTML qq{\n};
print HTML qq{<$$list_type>};
***************
*** 152,167 ****
sub do_hdr{
my($num,$title,$rest,$depth)=@_;
($num == 1) and print HTML qq{<p><hr>\n};
! &process_thing(\$title,"NAME");
print HTML qq{\n<H$num> };
print HTML $title;
print HTML qq{</H$num>\n};
! &do_rest($rest);
}
sub do_item{
my($title,$rest,$list_type)=@_;
! &process_thing(\$title,"NAME");
if($list_type eq "DL"){
print HTML qq{\n<DT><STRONG>\n};
print HTML $title;
--- 178,193 ----
sub do_hdr{
my($num,$title,$rest,$depth)=@_;
($num == 1) and print HTML qq{<p><hr>\n};
! process_thing(\$title,"NAME");
print HTML qq{\n<H$num> };
print HTML $title;
print HTML qq{</H$num>\n};
! do_rest($rest);
}
sub do_item{
my($title,$rest,$list_type)=@_;
! process_thing(\$title,"NAME");
if($list_type eq "DL"){
print HTML qq{\n<DT><STRONG>\n};
print HTML $title;
***************
*** 172,184 ****
print HTML qq{\n<LI>};
($list_type ne "OL") && (print HTML $title,"\n");
}
! &do_rest($rest);
print HTML ($list_type eq "DL" )? qq{</DD>} : qq{</LI>};
}
sub do_rest{
my($rest)=@_;
! my(@lines,$p,$q,$line,@paras,$inpre);
@paras=split(/\n\n+/,$rest);
for($p=0;$p<=$#paras;$p++){
@lines=split(/\n/,$paras[$p]);
--- 198,210 ----
print HTML qq{\n<LI>};
($list_type ne "OL") && (print HTML $title,"\n");
}
! do_rest($rest);
print HTML ($list_type eq "DL" )? qq{</DD>} : qq{</LI>};
}
sub do_rest{
my($rest)=@_;
! my(@lines,$p,$q,$line,,@paras,$inpre);
@paras=split(/\n\n+/,$rest);
for($p=0;$p<=$#paras;$p++){
@lines=split(/\n/,$paras[$p]);
***************
*** 207,219 ****
foreach $q (@lines){
if($paras[$p]=~/>>|<</){
if($inpre){
! &process_thing(\$q,"HTML");
}
else {
print HTML qq{\n</XMP>\n};
print HTML qq{<PRE>\n};
$inpre=1;
! &process_thing(\$q,"HTML");
}
}
while($q =~ s/\t+/' 'x (length($&) * 8 - length($`) % 8)/e){
--- 233,245 ----
foreach $q (@lines){
if($paras[$p]=~/>>|<</){
if($inpre){
! process_thing(\$q,"HTML");
}
else {
print HTML qq{\n</XMP>\n};
print HTML qq{<PRE>\n};
$inpre=1;
! process_thing(\$q,"HTML");
}
}
while($q =~ s/\t+/' 'x (length($&) * 8 - length($`) % 8)/e){
***************
*** 229,235 ****
else{ # other text
@lines=split(/\n/,$paras[$p]);
foreach $line (@lines){
! &process_thing(\$line,"HTML");
print HTML qq{$line\n};
}
}
--- 255,261 ----
else{ # other text
@lines=split(/\n/,$paras[$p]);
foreach $line (@lines){
! process_thing(\$line,"HTML");
print HTML qq{$line\n};
}
}
***************
*** 239,247 ****
sub process_thing{
my($thing,$htype)=@_;
! &pre_escapes($thing);
! &find_refs($thing,$htype);
! &post_escapes($thing);
}
sub scan_thing{
--- 265,273 ----
sub process_thing{
my($thing,$htype)=@_;
! pre_escapes($thing);
! find_refs($thing,$htype);
! post_escapes($thing);
}
sub scan_thing{
***************
*** 284,290 ****
Debug("headers", "header $_");
}
else {
! warn "unrecognized header: $cmd";
}
}
--- 310,316 ----
Debug("headers", "header $_");
}
else {
! (warn "unrecognized header: $cmd") if $Debug;
}
}
***************
*** 316,324 ****
}
if ($char =~ /[IF]/) {
return "<EM> $bigkey </EM>";
} else {
return "<STRONG> $bigkey </STRONG>";
! }
}
sub find_refs {
--- 342,352 ----
}
if ($char =~ /[IF]/) {
return "<EM> $bigkey </EM>";
+ } elsif($char =~ /C/) {
+ return "<CODE> $bigkey </CODE>";
} else {
return "<STRONG> $bigkey </STRONG>";
! }
}
sub find_refs {
***************
*** 329,335 ****
$$thing=~s/L<([^>]*)>/lrefs($1,$htype)/ge;
$$thing=~s/([CIBF])<(\W*?(-?\w*).*?)>/picrefs($1, $2, $3, $htype)/ge;
$$thing=~s/((\w+)\(\))/picrefs("I", $1, $2,$htype)/ge;
! $$thing=~s/([\$\@%]([\w:]+|\W\b))/varrefs($1,$htype)/ge;
(($$thing eq $orig) && ($htype eq "NAME")) &&
($$thing=picrefs("I", $$thing, "", $htype));
}
--- 357,363 ----
$$thing=~s/L<([^>]*)>/lrefs($1,$htype)/ge;
$$thing=~s/([CIBF])<(\W*?(-?\w*).*?)>/picrefs($1, $2, $3, $htype)/ge;
$$thing=~s/((\w+)\(\))/picrefs("I", $1, $2,$htype)/ge;
! $$thing=~s/([\$\@%](?!&[gl]t)([\w:]+|\W\b))/varrefs($1,$htype)/ge;
(($$thing eq $orig) && ($htype eq "NAME")) &&
($$thing=picrefs("I", $$thing, "", $htype));
}
***************
*** 354,360 ****
if (!defined $section && defined $Podnames{$page}) {
return "\n$type$page.html\">\nthe <EM> $page </EM> manpage<\/A>\n";
} else {
! warn "Bizarre entry $page/$item";
return "the <EM> $_[0] </EM> manpage\n";
}
}
--- 382,388 ----
if (!defined $section && defined $Podnames{$page}) {
return "\n$type$page.html\">\nthe <EM> $page </EM> manpage<\/A>\n";
} else {
! (warn "Bizarre entry $page/$item") if $Debug;
return "the <EM> $_[0] </EM> manpage\n";
}
}
***************
*** 385,391 ****
}
}
}
! warn "No $ref reference for $item (@_)";
return $text;
}
--- 413,419 ----
}
}
}
! (warn "No $ref reference for $item (@_)") if $Debug;
return $text;
}
***************
*** 433,439 ****
sub post_escapes {
my($thing)=@_;
$$thing=~s/[^GM]>>/\>\;\>\;/g;
! $$thing=~s/([^"MGA])>/$1\>\;/g;
$$thing=~tr/\200-\377/\000-\177/;
}
--- 461,467 ----
sub post_escapes {
my($thing)=@_;
$$thing=~s/[^GM]>>/\>\;\>\;/g;
! $$thing=~s/([^"MGAE])>/$1\>\;/g;
$$thing=~tr/\200-\377/\000-\177/;
}
***************
*** 457,459 ****
--- 485,490 ----
}
+ !NO!SUBS!
+ chmod 755 pod2html
+ $eunicefix pod2html
Index: pod/pod2latex.SH
*** perl5.001c/pod/pod2latex.SH Sat Mar 11 16:55:04 1995
--- perl5.001d/pod/pod2latex.SH Thu Apr 13 12:20:39 1995
***************
*** 1,4 ****
! #!/usr/bin/perl
# pod2latex, version 1.1
# by Taro Kawagish (kawagish@imslab.co.jp), Jan 11, 1995.
#
--- 1,29 ----
! case $CONFIG in
! '')
! if test -f config.sh; then TOP=.;
! elif test -f ../config.sh; then TOP=..;
! elif test -f ../../config.sh; then TOP=../..;
! elif test -f ../../../config.sh; then TOP=../../..;
! elif test -f ../../../../config.sh; then TOP=../../../..;
! else
! echo "Can't find config.sh."; exit 1
! fi
! . $TOP/config.sh
! ;;
! esac
! case "$0" in
! */*) cd `expr X$0 : 'X\(.*\)/'` ;;
! esac
! echo "Extracting pod/pod2latex (with variable substitutions)"
! rm -f pod2latex
! $spitshell >pod2latex <<!GROK!THIS!
! #!$bin/perl
! eval 'exec $bin/perl -S \$0 \${1+"\$@"}'
! if \$running_under_some_shell;
! !GROK!THIS!
!
! $spitshell >>pod2latex <<'!NO!SUBS!'
! #
# pod2latex, version 1.1
# by Taro Kawagish (kawagish@imslab.co.jp), Jan 11, 1995.
#
***************
*** 630,632 ****
--- 655,660 ----
"yuml" => '\\"{y}', # small y, dieresis or umlaut mark
);
}
+ !NO!SUBS!
+ chmod 755 pod2latex
+ $eunicefix pod2latex
Index: pod/pod2man.SH
Prereq: 1.5
*** perl5.001c/pod/pod2man.SH Wed Feb 8 19:10:04 1995
--- perl5.001d/pod/pod2man.SH Thu Apr 13 10:34:04 1995
***************
*** 1,4 ****
! #!/usr/bin/perl
$/ = "";
$cutting = 1;
--- 1,28 ----
! case $CONFIG in
! '')
! if test -f config.sh; then TOP=.;
! elif test -f ../config.sh; then TOP=..;
! elif test -f ../../config.sh; then TOP=../..;
! elif test -f ../../../config.sh; then TOP=../../..;
! elif test -f ../../../../config.sh; then TOP=../../../..;
! else
! echo "Can't find config.sh."; exit 1
! fi
! . $TOP/config.sh
! ;;
! esac
! case "$0" in
! */*) cd `expr X$0 : 'X\(.*\)/'` ;;
! esac
! echo "Extracting pod/pod2man (with variable substitutions)"
! rm -f pod2man
! $spitshell >pod2man <<!GROK!THIS!
! #!$bin/perl
! eval 'exec $bin/perl -S \$0 \${1+"\$@"}'
! if \$running_under_some_shell;
! !GROK!THIS!
!
! $spitshell >>pod2man <<'!NO!SUBS!'
$/ = "";
$cutting = 1;
***************
*** 623,625 ****
--- 647,652 ----
"yuml" => "y\\*:", # small y, dieresis or umlaut mark
);
}
+ !NO!SUBS!
+ chmod 755 pod2man
+ $eunicefix pod2man
Index: pp_hot.c
*** perl5.001c/pp_hot.c Thu Mar 16 10:23:30 1995
--- perl5.001d/pp_hot.c Fri Apr 14 10:01:21 1995
***************
*** 1560,1565 ****
--- 1560,1566 ----
HV *stash;
register CV *cv;
register CONTEXT *cx;
+ I32 gimme;
if (!sv)
DIE("Not a CODE reference");
***************
*** 1632,1637 ****
--- 1633,1640 ----
DIE("No DBsub routine");
}
+ gimme = GIMME;
+
if (CvXSUB(cv)) {
if (CvOLDSTYLE(cv)) {
I32 (*fp3)_((int,int,int));
***************
*** 1655,1661 ****
(void)(*CvXSUB(cv))(cv);
/* Enforce some sanity in scalar context. */
! if (GIMME == G_SCALAR && ++markix != stack_sp - stack_base ) {
if (markix > stack_sp - stack_base)
*(stack_base + markix) = &sv_undef;
else
--- 1658,1664 ----
(void)(*CvXSUB(cv))(cv);
/* Enforce some sanity in scalar context. */
! if (gimme == G_SCALAR && ++markix != stack_sp - stack_base ) {
if (markix > stack_sp - stack_base)
*(stack_base + markix) = &sv_undef;
else
***************
*** 1670,1676 ****
dMARK;
register I32 items = SP - MARK;
I32 hasargs = (op->op_flags & OPf_STACKED) != 0;
- I32 gimme = GIMME;
AV* padlist = CvPADLIST(cv);
SV** svp = AvARRAY(padlist);
push_return(op->op_next);
--- 1673,1678 ----
Index: pp_sys.c
*** perl5.001c/pp_sys.c Sat Mar 11 00:09:30 1995
--- perl5.001d/pp_sys.c Tue Apr 11 15:48:46 1995
***************
*** 1116,1122 ****
GV *tmpgv;
SETERRNO(0,0);
! #if defined(HAS_TRUNCATE) || defined(HAS_CHSIZE)
#ifdef HAS_TRUNCATE
if (op->op_flags & OPf_SPECIAL) {
tmpgv = gv_fetchpv(POPp,FALSE, SVt_PVIO);
--- 1116,1122 ----
GV *tmpgv;
SETERRNO(0,0);
! #if defined(HAS_TRUNCATE) || defined(HAS_CHSIZE) || defined(F_FREESP)
#ifdef HAS_TRUNCATE
if (op->op_flags & OPf_SPECIAL) {
tmpgv = gv_fetchpv(POPp,FALSE, SVt_PVIO);
***************
*** 2321,2327 ****
char *filename;
{
char mybuf[8192];
! char *s, *tmps;
int anum = 1;
FILE *myfp;
--- 2321,2328 ----
char *filename;
{
char mybuf[8192];
! char *s,
! *save_filename = filename;
int anum = 1;
FILE *myfp;
***************
*** 2373,2379 ****
return 0;
}
else { /* some mkdirs return no failure indication */
! anum = (Stat(filename, &statbuf) >= 0);
if (op->op_type == OP_RMDIR)
anum = !anum;
if (anum)
--- 2374,2380 ----
return 0;
}
else { /* some mkdirs return no failure indication */
! anum = (Stat(save_filename, &statbuf) >= 0);
if (op->op_type == OP_RMDIR)
anum = !anum;
if (anum)
Index: sv.c
*** perl5.001c/sv.c Wed Mar 15 14:28:08 1995
--- perl5.001d/sv.c Wed Apr 12 16:13:08 1995
***************
*** 1038,1044 ****
if (SvNVX(sv) < 0.0)
return I_V(SvNVX(sv));
else
! return (IV)(UV)SvNVX(sv);
}
if (SvPOKp(sv) && SvLEN(sv)) {
if (dowarn && !looks_like_number(sv))
--- 1038,1044 ----
if (SvNVX(sv) < 0.0)
return I_V(SvNVX(sv));
else
! return (IV) U_V(SvNVX(sv));
}
if (SvPOKp(sv) && SvLEN(sv)) {
if (dowarn && !looks_like_number(sv))
***************
*** 1061,1067 ****
if (SvNVX(sv) < 0.0)
return I_V(SvNVX(sv));
else
! return (IV)(UV)SvNVX(sv);
}
if (SvPOKp(sv) && SvLEN(sv)) {
if (dowarn && !looks_like_number(sv))
--- 1061,1067 ----
if (SvNVX(sv) < 0.0)
return I_V(SvNVX(sv));
else
! return (IV) U_V(SvNVX(sv));
}
if (SvPOKp(sv) && SvLEN(sv)) {
if (dowarn && !looks_like_number(sv))
***************
*** 1088,1094 ****
if (SvNVX(sv) < 0.0)
SvIVX(sv) = I_V(SvNVX(sv));
else
! SvIVX(sv) = (IV)(UV)SvNVX(sv);
}
else if (SvPOKp(sv) && SvLEN(sv)) {
if (dowarn && !looks_like_number(sv))
--- 1088,1094 ----
if (SvNVX(sv) < 0.0)
SvIVX(sv) = I_V(SvNVX(sv));
else
! SvIVX(sv) = (IV) U_V(SvNVX(sv));
}
else if (SvPOKp(sv) && SvLEN(sv)) {
if (dowarn && !looks_like_number(sv))
Index: util.c
*** perl5.001c/util.c Wed Apr 5 15:52:50 1995
--- perl5.001d/util.c Fri Apr 14 09:50:11 1995
***************
*** 29,34 ****
--- 29,38 ----
# include <vfork.h>
#endif
+ #ifdef I_LIMITS /* Needed for cast_xxx() functions below. */
+ # include <limits.h>
+ #endif
+
/* Put this after #includes because fork and vfork prototypes may
conflict.
*/
***************
*** 1575,1610 ****
#endif
#ifndef CASTI32
I32
cast_i32(f)
double f;
{
! # define BIGDOUBLE 2147483647.0 /* Assume 32 bit int's ! */
! # define BIGNEGDOUBLE (-2147483648.0)
! if (f >= BIGDOUBLE)
! return (I32) BIGDOUBLE;
! if (f <= BIGNEGDOUBLE)
! return (I32) BIGNEGDOUBLE;
return (I32) f;
}
- # undef BIGDOUBLE
- # undef BIGNEGDOUBLE
IV
cast_iv(f)
double f;
{
! /* XXX This should be fixed. It assumes 32 bit IV's. */
! # define BIGDOUBLE 2147483647.0 /* Assume 32 bit IV's ! */
! # define BIGNEGDOUBLE (-2147483648.0)
! if (f >= BIGDOUBLE)
! return (IV) BIGDOUBLE;
! if (f <= BIGNEGDOUBLE)
! return (IV) BIGNEGDOUBLE;
return (IV) f;
}
! # undef BIGDOUBLE
! # undef BIGNEGDOUBLE
#endif
#ifndef HAS_RENAME
--- 1579,1653 ----
#endif
#ifndef CASTI32
+
+ /* Look for MAX and MIN integral values. If we can't find them,
+ we'll use 32-bit two's complement defaults.
+ */
+ #ifndef LONG_MAX
+ # ifdef MAXLONG /* Often used in <values.h> */
+ # define LONG_MAX MAXLONG
+ # else
+ # define LONG_MAX 2147483647L
+ # endif
+ #endif
+
+ #ifndef LONG_MIN
+ # define LONG_MIN (-LONG_MAX - 1)
+ #endif
+
+ #ifndef ULONG_MAX
+ # ifdef MAXULONG
+ # define LONG_MAX MAXULONG
+ # else
+ # define ULONG_MAX 4294967295L
+ # endif
+ #endif
+
+ /* Unfortunately, on some systems the cast_uv() function doesn't
+ work with the system-supplied definition of ULONG_MAX. The
+ comparison (f >= ULONG_MAX) always comes out true. It must be a
+ problem with the compiler constant folding.
+
+ In any case, this workaround should be fine on any two's complement
+ system. If it's not, supply a '-DMY_ULONG_MAX=whatever' in your
+ ccflags.
+ --Andy Dougherty <doughera@lafcol.lafayette.edu>
+ */
+ #ifndef MY_ULONG_MAX
+ # define MY_ULONG_MAX ((UV)LONG_MAX * (UV)2 + (UV)1)
+ #endif
+
I32
cast_i32(f)
double f;
{
! if (f >= LONG_MAX)
! return (I32) LONG_MAX;
! if (f <= LONG_MIN)
! return (I32) LONG_MIN;
return (I32) f;
}
IV
cast_iv(f)
double f;
{
! if (f >= LONG_MAX)
! return (IV) LONG_MAX;
! if (f <= LONG_MIN)
! return (IV) LONG_MIN;
return (IV) f;
}
!
! UV
! cast_uv(f)
! double f;
! {
! if (f >= MY_ULONG_MAX)
! return (UV) MY_ULONG_MAX;
! return (UV) f;
! }
!
#endif
#ifndef HAS_RENAME
End of patch.