From: Nick Ing-Simmons Date: Sat, 9 Jun 2001 16:26:29 +0000 (+0000) Subject: Integrate mainline X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c4ea979ceac56664f1fc8fd2d684b3f750ba2c82;p=p5sagit%2Fp5-mst-13.2.git Integrate mainline p4raw-id: //depot/perlio@10487 --- diff --git a/Changes b/Changes index d83cda9..220c3a3 100644 --- a/Changes +++ b/Changes @@ -31,6 +31,292 @@ or any other branch. Version v5.7.1 Development release working toward v5.8 -------------- ____________________________________________________________________________ +[ 10475] By: jhi on 2001/06/08 00:53:45 + Log: Regen Glossary et alia. + Branch: perl + ! Porting/Glossary Porting/config.sh Porting/config_H +____________________________________________________________________________ +[ 10474] By: jhi on 2001/06/07 22:06:38 + Log: Metaconfig unit changes for #10473. + Branch: metaconfig/U/perl + ! d_modfl.U +____________________________________________________________________________ +[ 10473] By: jhi on 2001/06/07 22:06:16 + Log: Harumph, also AIX will spill its guts (i.e. dump core) + if an executable contains modfl() but it hasn't been + compiled right (in the case of AIX, with cc -qlongdouble). + Branch: perl + ! Configure +____________________________________________________________________________ +[ 10472] By: gsar on 2001/06/07 20:04:28 + Log: integrate change#10471 from mainline + + in change#10451, check that CvOUTSIDE is a CV before looking in + (it can apparently be SVt_NULL during global destruction) + Branch: maint-5.6/perl + !> op.c +____________________________________________________________________________ +[ 10471] By: gsar on 2001/06/07 20:01:31 + Log: in change#10451, check that CvOUTSIDE is a CV before looking in + (it can apparently be SVt_NULL during global destruction) + Branch: perl + ! op.c +____________________________________________________________________________ +[ 10470] By: jhi on 2001/06/07 12:17:51 + Log: Subject: Re: [PATCH perl@10439] diagnostics and long C<=item>s + From: Robin Barker + Date: Thu, 7 Jun 2001 13:01:06 +0100 (BST) + Message-Id: <200106071201.NAA13627@tempest.npl.co.uk> + Branch: perl + ! lib/diagnostics.pm pod/perldiag.pod +____________________________________________________________________________ +[ 10469] By: jhi on 2001/06/07 12:16:12 + Log: Subject: [PATCH perl@10439] long =item + From: Robin Barker + Date: Thu, 7 Jun 2001 12:34:08 +0100 (BST) + Message-Id: <200106071134.MAA10288@tempest.npl.co.uk> + Branch: perl + ! README.amiga lib/Attribute/Handlers.pm + ! lib/ExtUtils/Constant.pm lib/Locale/Maketext.pod +____________________________________________________________________________ +[ 10468] By: jhi on 2001/06/07 12:08:56 + Log: Subject: [PATCH 5.7.1 pod/perlguts.pod] IOK vs pIOK docs + Date: Thu, 7 Jun 2001 10:09:59 +0100 (BST) + Reply-To: Dave Mitchell + Message-Id: <200106070909.KAA25610@gizmo.fdgroup.co.uk> + Branch: perl + ! pod/perlguts.pod +____________________________________________________________________________ +[ 10467] By: jhi on 2001/06/07 12:04:26 + Log: Integrate perlio. + Branch: perl + !> sv.c +____________________________________________________________________________ +[ 10466] By: nick on 2001/06/07 10:25:40 + Log: MULTIPLICITY fix for S_grok_number(), also a few gratuitious trailing + whitespace tweaks. + Still coredumps in pragma/overload.t - what a nice hard fail that is... + Branch: perlio + ! sv.c +____________________________________________________________________________ +[ 10465] By: nick on 2001/06/07 08:41:58 + Log: Raw integrate of mainline for S_grok_number debug + (sv.c has MULTIPLICITY issues as well as whatever else ...) + Branch: perlio + - plan9/perlplan9.doc plan9/perlplan9.pod + !> (integrate 46 files) +____________________________________________________________________________ +[ 10464] By: jhi on 2001/06/06 23:33:58 + Log: The proper prototyping for #10463. + Branch: perl + ! embed.h embed.pl proto.h sv.c +____________________________________________________________________________ +[ 10463] By: jhi on 2001/06/06 23:15:30 + Log: Subject: Re: [PATCH] nuke strtol (was Re: One fix for strtoul not setting errno) + From: Nicholas Clark + Date: Thu, 7 Jun 2001 00:29:59 +0100 + Message-ID: <20010607002959.Z76396@plum.flirble.org> + Branch: perl + ! sv.c +____________________________________________________________________________ +[ 10462] By: jhi on 2001/06/06 23:13:19 + Log: Subject: [PATCH perl@10439] fix old $^S description in perlvms.pod + From: "Craig A. Berry" + Date: Wed, 06 Jun 2001 17:54:30 -0500 + Message-Id: <5.1.0.14.0.20010606174814.03c2c880@exchi01> + Branch: perl + ! vms/perlvms.pod +____________________________________________________________________________ +[ 10461] By: jhi on 2001/06/06 23:10:00 + Log: Podify the remaining README.platform files; + merge README.plan9 and plan9/perlplan9.pod; + delete plan9/perlplan9.* (the perlplan.doc needs to + be regenerated in Plan 9); make the =head1 and =head2 + in the README.platform to be a little more verbose + (skipped README.os2 not to anger Ilya) so that they + look better in the toc; regen toc. + Branch: perl + - plan9/perlplan9.doc plan9/perlplan9.pod + ! MANIFEST README.aix README.amiga README.apollo README.beos + ! README.bs2000 README.cygwin README.dgux README.dos README.epoc + ! README.hpux README.hurd README.machten README.macos + ! README.micro README.mint README.mpeix README.os390 + ! README.plan9 README.qnx README.solaris README.threads + ! README.tru64 README.vmesa README.vms README.vos README.win32 + ! plan9/mkfile pod/buildtoc.PL pod/perl.pod pod/perlport.pod + ! pod/perltoc.pod win32/Makefile win32/makefile.mk +____________________________________________________________________________ +[ 10460] By: jhi on 2001/06/06 20:58:53 + Log: Subject: [PATCH] Re: Bug in perlguts documentation? + From: Mike Guy + Reply-To: mjtg@cam.ac.uk + Message-Id: + Branch: perl + ! pod/perlguts.pod +____________________________________________________________________________ +[ 10459] By: jhi on 2001/06/06 20:58:15 + Log: Subject: [PATCH] Re: [ID 20010604.015] taint + comma = false insecurity + From: Mike Guy + Reply-To: mjtg@cam.ac.uk + Message-Id: + Branch: perl + ! pod/perlsec.pod +____________________________________________________________________________ +[ 10458] By: jhi on 2001/06/06 20:56:04 + Log: Disable long doubles from pre-5.0 Tru64s. + Branch: perl + ! README.tru64 hints/dec_osf.sh +____________________________________________________________________________ +[ 10457] By: jhi on 2001/06/06 20:49:23 + Log: The #10455 exposed that modfl() is fundamentally busted + (as in: dumps core) in pre-5.0 Tru64, so better avoid even + testing it. + Branch: perl + ! hints/dec_osf.sh +____________________________________________________________________________ +[ 10456] By: jhi on 2001/06/06 20:48:35 + Log: Metaconfig unit change for #10455. + Branch: metaconfig/U/perl + ! d_modfl.U +____________________________________________________________________________ +[ 10455] By: jhi on 2001/06/06 20:48:09 + Log: Configure check for geborken modfl(), inspired by + + Subject: Re: [20010118.017] op/int.t failure + From: Hugo + Date: Tue, 05 Jun 2001 13:43:27 +0100 + Message-Id: <200106051243.NAA15525@crypt.compulink.co.uk> + Branch: perl + ! Configure +____________________________________________________________________________ +[ 10454] By: jhi on 2001/06/06 11:45:08 + Log: Integrate changes #10450 and #10451 from maintperl: + + optimize change#10448 slightly (don't repeat search in eval""s lexical + scope, since that has already been searched) + + change#9108 needs subtler treatment for case of closures created + within eval"" + Branch: perl + !> op.c t/op/misc.t +____________________________________________________________________________ +[ 10453] By: jhi on 2001/06/06 11:42:10 + Log: MakeMaker magic to compile (when no dynamic loading) + List/Util.xsc as (ListUtil.c and) ListUtil.o since + POSIX-BC (BS2000) linker has an evil limitation of + being unable to include in the same executable several + object files with the same name - case-insensitively - + because otherwise we conflict with util.c. + Strictly speaking currently required only in POSIX-BC + but probably will do no harm elsewhere where static + linking is required. + Branch: perl + ! ext/List/Util/Makefile.PL +____________________________________________________________________________ +[ 10452] By: nick on 2001/06/06 08:59:51 + Log: Integrate mainline. + Branch: perlio + +> lib/Attribute/Handlers/demo/Demo.pm + +> lib/Attribute/Handlers/demo/Descriptions.pm + +> lib/Attribute/Handlers/demo/MyClass.pm + +> lib/Attribute/Handlers/demo/demo.pl + +> lib/Attribute/Handlers/demo/demo2.pl + +> lib/Attribute/Handlers/demo/demo3.pl + +> lib/Attribute/Handlers/demo/demo4.pl + +> lib/Attribute/Handlers/demo/demo_call.pl + +> lib/Attribute/Handlers/demo/demo_chain.pl + +> lib/Attribute/Handlers/demo/demo_cycle.pl + +> lib/Attribute/Handlers/demo/demo_hashdir.pl + +> lib/Attribute/Handlers/demo/demo_phases.pl + +> lib/Attribute/Handlers/demo/demo_range.pl + +> lib/Attribute/Handlers/demo/demo_rawdata.pl t/op/override.t + +> uts/strtol_wrap.c + !> (integrate 91 files) +____________________________________________________________________________ +[ 10451] By: gsar on 2001/06/06 07:11:36 + Log: change#9108 needs subtler treatment for case of closures created + within eval"" + Branch: maint-5.6/perl + ! op.c t/op/misc.t +____________________________________________________________________________ +[ 10450] By: gsar on 2001/06/06 05:47:25 + Log: optimize change#10448 slightly (don't repeat search in eval""s lexical + scope, since that has already been searched) + Branch: maint-5.6/perl + ! op.c +____________________________________________________________________________ +[ 10449] By: jhi on 2001/06/06 01:33:31 + Log: Integrate change #10448 from maintperl; lexicals + outside an eval"" weren't resolved correctly inside a subroutine + definition inside the eval"" if they were not already referenced + in the toplevel of the eval""-ed code + Branch: perl + !> cop.h op.c pp_ctl.c t/op/misc.t +____________________________________________________________________________ +[ 10448] By: gsar on 2001/06/06 01:03:26 + Log: fix yet another bug of hoary vintage found by change#10394: lexicals + outside an eval"" weren't resolved correctly inside a subroutine + definition inside the eval"" if they were not already referenced + in the toplevel of the eval""-ed code + Branch: maint-5.6/perl + ! cop.h op.c pp_ctl.c t/op/misc.t +____________________________________________________________________________ +[ 10447] By: jhi on 2001/06/06 00:51:04 + Log: Subject: [PATCH] perl570delta.pod + From: Peter Scott + Date: Tue, 05 Jun 2001 18:51:02 -0700 + Message-Id: <4.3.2.7.2.20010605183619.00a94400@psdt.com> + Branch: perl + ! pod/perl570delta.pod +____________________________________________________________________________ +[ 10446] By: jhi on 2001/06/05 23:45:05 + Log: The fudge factor is no more needed. I hope. + Branch: perl + ! t/lib/posix.t +____________________________________________________________________________ +[ 10445] By: jhi on 2001/06/05 23:19:19 + Log: Subject: Re: [ID 20010529.006] String plus zero inconsistent across platforms + From: Hugo + Date: Tue, 05 Jun 2001 12:58:19 +0100 + Message-Id: <200106051158.MAA04605@crypt.compulink.co.uk> + Branch: perl + ! util.c +____________________________________________________________________________ +[ 10444] By: jhi on 2001/06/05 11:09:01 + Log: Make up prototypes only for those who have the functions + but not the prototypes. + Branch: perl + ! perl.h +____________________________________________________________________________ +[ 10443] By: jhi on 2001/06/05 11:02:13 + Log: Subject: Re: Not OK: perl@10439 on win32 + From: Prymmer/Kahn + Date: Mon, 4 Jun 2001 22:11:02 -0700 (PDT) + Message-ID: + Branch: perl + ! perl.h util.c +____________________________________________________________________________ +[ 10442] By: jhi on 2001/06/05 00:55:46 + Log: The metaconfig units changes for #10441. + Branch: metaconfig + ! U/modified/Extract.U U/modified/Extractall.U + ! U/modified/Finish.U +____________________________________________________________________________ +[ 10441] By: jhi on 2001/06/05 00:55:17 + Log: Extraction of the *.SH wasn't quite working with -Dmksymlinks. + Branch: perl + ! Configure +____________________________________________________________________________ +[ 10440] By: jhi on 2001/06/05 00:28:27 + Log: Unnecessary fuzziness undone, noted by Mike Guy. + Branch: perl + ! t/op/tr.t +____________________________________________________________________________ +[ 10439] By: jhi on 2001/06/04 17:14:31 + Log: Update Changes. + Branch: perl + ! Changes patchlevel.h +____________________________________________________________________________ [ 10438] By: jhi on 2001/06/04 17:10:16 Log: Test case for 'eval "a.b.c.d.e.f;sub"' save stack imbalance bug found by Ilmari Karonen; the bug fixed by Sarathy's lexical diff --git a/Configure b/Configure index 7c35f33..7ba331a 100755 --- a/Configure +++ b/Configure @@ -20,7 +20,7 @@ # $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $ # -# Generated on Thu Jun 7 00:46:23 EET DST 2001 [metaconfig 3.0 PL70] +# Generated on Fri Jun 8 18:06:31 EET DST 2001 [metaconfig 3.0 PL70] # (with additional metaconfig patches by perlbug@perl.org) cat >c1$$ <&4 "Your modfl() is broken for large values." - d_modfl="$undef" + d_modfl_pow32_bug="$define" case "$foo" in glibc) echo >&4 "You should upgrade your glibc to at least 2.2.2 to get a fixed modfl()." ;; @@ -10519,6 +10526,9 @@ EOCP echo "I cannot figure out whether your modfl() is okay, assuming it isn't." d_modfl="$undef" fi + case "$osname:$gccversion" in + aix:) $ccflags="saveccflags" ;; # restore + esac ;; esac @@ -16437,6 +16447,7 @@ d_mkstemps='$d_mkstemps' d_mktime='$d_mktime' d_mmap='$d_mmap' d_modfl='$d_modfl' +d_modfl_pow32_bug='$d_modfl_pow32_bug' d_mprotect='$d_mprotect' d_msg='$d_msg' d_msg_ctrunc='$d_msg_ctrunc' diff --git a/MANIFEST b/MANIFEST index 326cfee..0ca5004 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1808,7 +1808,7 @@ t/op/utf8decode.t See if UTF-8 decoding works t/op/vec.t See if vectors work t/op/ver.t See if v-strings and the %v format flag work t/op/wantarray.t See if wantarray works -t/op/write.t See if write works +t/op/write.t See if write works (formats work) t/pod/emptycmd.t Test empty pod directives t/pod/emptycmd.xr Expected results for emptycmd.t t/pod/find.t See if Pod::Find works diff --git a/Porting/Glossary b/Porting/Glossary index f643f8b..6995d08 100644 --- a/Porting/Glossary +++ b/Porting/Glossary @@ -467,6 +467,12 @@ d_dbl_dig (d_dbl_dig.U): header files provide DBL_DIG, which is the number of significant digits in a double precision number. +d_dbminitproto (d_dbminitproto.U): + This variable conditionally defines the HAS_DBMINIT_PROTO symbol, + which indicates to the C program that the system provides + a prototype for the dbminit() function. Otherwise, it is + up to the program to supply one. + d_difftime (d_difftime.U): This variable conditionally defines the HAS_DIFFTIME symbol, which indicates to the C program that the difftime() routine is available. @@ -588,6 +594,12 @@ d_flock (d_flock.U): This variable conditionally defines HAS_FLOCK if flock() is available to do file locking. +d_flockproto (d_flockproto.U): + This variable conditionally defines the HAS_FLOCK_PROTO symbol, + which indicates to the C program that the system provides + a prototype for the flock() function. Otherwise, it is + up to the program to supply one. + d_fork (d_fork.U): This variable conditionally defines the HAS_FORK symbol, which indicates to the C program that the fork() routine is available. @@ -993,6 +1005,13 @@ d_modfl (d_modfl.U): This variable conditionally defines the HAS_MODFL symbol, which indicates to the C program that the modfl() routine is available. +d_modfl_pow32_bug (d_modfl.U): + This variable conditionally defines the HAS_MODFL_POW32_BUG symbol, + which indicates that modfl() is broken for long doubles >= pow(2, 32). + For example from 4294967303.150000 one would get 4294967302.000000 + and 1.150000. The bug has been seen in certain versions of glibc, + release 2.2.2 is known to be okay. + d_mprotect (d_mprotect.U): This variable conditionally defines HAS_MPROTECT if mprotect() is available to modify the access protection of a memory mapped file. @@ -1498,6 +1517,12 @@ d_sockatmark (d_sockatmark.U): This variable conditionally defines the HAS_SOCKATMARK symbol, which indicates to the C program that the sockatmark() routine is available. +d_sockatmarkproto (d_sockatmarkproto.U): + This variable conditionally defines the HAS_SOCKATMARK_PROTO symbol, + which indicates to the C program that the system provides + a prototype for the sockatmark() function. Otherwise, it is + up to the program to supply one. + d_socket (d_socket.U): This variable conditionally defines HAS_SOCKET, which indicates that the BSD socket interface is supported. @@ -1658,6 +1683,12 @@ d_syscall (d_syscall.U): This variable conditionally defines HAS_SYSCALL if syscall() is available call arbitrary system calls. +d_syscallproto (d_syscallproto.U): + This variable conditionally defines the HAS_SYSCALL_PROTO symbol, + which indicates to the C program that the system provides + a prototype for the syscall() function. Otherwise, it is + up to the program to supply one. + d_sysconf (d_sysconf.U): This variable conditionally defines the HAS_SYSCONF symbol, which indicates to the C program that the sysconf() routine is available @@ -1739,6 +1770,12 @@ d_usleep (d_usleep.U): This variable conditionally defines HAS_USLEEP if usleep() is available to do high granularity sleeps. +d_usleepproto (d_usleepproto.U): + This variable conditionally defines the HAS_USLEEP_PROTO symbol, + which indicates to the C program that the system provides + a prototype for the usleep() function. Otherwise, it is + up to the program to supply one. + d_ustat (d_ustat.U): This variable conditionally defines HAS_USTAT if ustat() is available to query file system statistics by dev_t. diff --git a/Porting/config.sh b/Porting/config.sh index 09da24a..f225a7b 100644 --- a/Porting/config.sh +++ b/Porting/config.sh @@ -8,7 +8,7 @@ # Package name : perl5 # Source directory : . -# Configuration time: Mon Jun 4 06:13:47 EET DST 2001 +# Configuration time: Fri Jun 8 18:08:58 EET DST 2001 # Configured by : jhi # Target system : osf1 alpha.hut.fi v4.0 878 alpha @@ -63,7 +63,7 @@ ccsymbols='__alpha=1 __LANGUAGE_C__=1 __osf__=1 __unix__=1 _LONGLONG=1 _SYSTYPE_ ccversion='V5.6-082' cf_by='jhi' cf_email='yourname@yourhost.yourplace.com' -cf_time='Mon Jun 4 06:13:47 EET DST 2001' +cf_time='Fri Jun 8 18:08:58 EET DST 2001' charsize='1' chgrp='' chmod='' @@ -128,6 +128,7 @@ d_crypt='define' d_csh='define' d_cuserid='define' d_dbl_dig='define' +d_dbminitproto='undef' d_difftime='define' d_dirnamlen='define' d_dlerror='define' @@ -155,6 +156,7 @@ d_fds_bits='define' d_fgetpos='define' d_flexfnam='define' d_flock='define' +d_flockproto='undef' d_fork='define' d_fpathconf='define' d_fpos64_t='undef' @@ -240,7 +242,8 @@ d_mkstemp='define' d_mkstemps='undef' d_mktime='define' d_mmap='define' -d_modfl='define' +d_modfl='undef' +d_modfl_pow32_bug='undef' d_mprotect='define' d_msg='define' d_msg_ctrunc='define' @@ -341,6 +344,7 @@ d_sigaction='define' d_sigprocmask='define' d_sigsetjmp='define' d_sockatmark='undef' +d_sockatmarkproto='undef' d_socket='define' d_socklen_t='undef' d_sockpair='define' @@ -377,6 +381,7 @@ d_strxfrm='define' d_suidsafe='undef' d_symlink='define' d_syscall='define' +d_syscallproto='undef' d_sysconf='define' d_sysernlst='' d_syserrlst='define' @@ -395,6 +400,7 @@ d_umask='define' d_uname='define' d_union_semun='undef' d_usleep='define' +d_usleepproto='undef' d_ustat='define' d_vendorarch='undef' d_vendorbin='undef' @@ -664,7 +670,7 @@ patchlevel='7' path_sep=':' perl5='/u/vieraat/vieraat/jhi/Perl/bin/perl' perl='' -perl_patchlevel='10418' +perl_patchlevel='10475' perladmin='yourname@yourhost.yourplace.com' perllibs='-lm -liconv -lutil -lpthread -lexc' perlpath='/opt/perl/bin/perl' @@ -859,7 +865,7 @@ PERL_SUBVERSION=1 PERL_API_REVISION=5 PERL_API_VERSION=5 PERL_API_SUBVERSION=0 -PERL_PATCHLEVEL=10418 +PERL_PATCHLEVEL=10475 PERL_CONFIG_SH=true # Variables propagated from previous config.sh file. pp_sys_cflags='ccflags="$ccflags -DNO_EFF_ONLY_OK"' diff --git a/Porting/config_H b/Porting/config_H index 85c4f3f..fa60e91 100644 --- a/Porting/config_H +++ b/Porting/config_H @@ -17,7 +17,7 @@ /* * Package name : perl5 * Source directory : . - * Configuration time: Mon Jun 4 06:13:47 EET DST 2001 + * Configuration time: Fri Jun 8 18:08:58 EET DST 2001 * Configured by : jhi * Target system : osf1 alpha.hut.fi v4.0 878 alpha */ @@ -1780,7 +1780,15 @@ * available to split a long double x into a fractional part f and * an integer part i such that |f| < 1.0 and (f + i) = x. */ -#define HAS_MODFL /**/ +/* HAS_MODFL_POW32_BUG: + * This symbol, if defined, indicates that the modfl routine is + * broken for long doubles >= pow(2, 32). + * For example from 4294967303.150000 one would get 4294967302.000000 + * and 1.150000. The bug has been seen in certain versions of glibc, + * release 2.2.2 is known to be okay. + */ +/*#define HAS_MODFL / **/ +/*#define HAS_MODFL_POW32_BUG / **/ /* HAS_MPROTECT: * This symbol, if defined, indicates that the mprotect system call is @@ -3336,6 +3344,22 @@ #define PERL_XS_APIVERSION "5.7.1" #define PERL_PM_APIVERSION "5.005" +/* HAS_DBMINIT_PROTO: + * This symbol, if defined, indicates that the system provides + * a prototype for the dbminit() function. Otherwise, it is up + * to the program to supply one. A good guess is + * extern int dbminit(char *); + */ +/*#define HAS_DBMINIT_PROTO / **/ + +/* HAS_FLOCK_PROTO: + * This symbol, if defined, indicates that the system provides + * a prototype for the flock() function. Otherwise, it is up + * to the program to supply one. A good guess is + * extern int flock(int, int); + */ +/*#define HAS_FLOCK_PROTO / **/ + /* HAS_REALPATH: * This symbol, if defined, indicates that the realpath routine is * available to do resolve paths. @@ -3355,6 +3379,14 @@ */ /*#define HAS_SOCKATMARK / **/ +/* HAS_SOCKATMARK_PROTO: + * This symbol, if defined, indicates that the system provides + * a prototype for the sockatmark() function. Otherwise, it is up + * to the program to supply one. A good guess is + * extern int sockatmark _((int)); + */ +/*#define HAS_SOCKATMARK_PROTO / **/ + /* HAS_SETRESGID_PROTO: * This symbol, if defined, indicates that the system provides * a prototype for the setresgid() function. Otherwise, it is up @@ -3377,10 +3409,27 @@ */ #define HAS_STRFTIME /**/ +/* HAS_SYSCALL_PROTO: + * This symbol, if defined, indicates that the system provides + * a prototype for the syscall() function. Otherwise, it is up + * to the program to supply one. Good guesses are + * extern int syscall(int, ...); + * extern int syscall(long, ...); + */ +/*#define HAS_SYSCALL_PROTO / **/ + /* U32_ALIGNMENT_REQUIRED: * This symbol, if defined, indicates that you must access * character data through U32-aligned pointers. */ #define U32_ALIGNMENT_REQUIRED /**/ +/* HAS_USLEEP_PROTO: + * This symbol, if defined, indicates that the system provides + * a prototype for the usleep() function. Otherwise, it is up + * to the program to supply one. A good guess is + * extern int usleep(useconds_t); + */ +/*#define HAS_USLEEP_PROTO / **/ + #endif diff --git a/README.amiga b/README.amiga index b59f535..709fcc8 100644 --- a/README.amiga +++ b/README.amiga @@ -103,14 +103,22 @@ deficiencies in the UNIX-emulation, most notably: =over 6 -=item fork() +=item * -=item some features of the UNIX filesystem regarding link count and file dates +fork() -=item inplace operation (the -i switch) without backup file +=item * -=item umask() works, but the correct permissions are only set when the file is - finally close()d +some features of the UNIX filesystem regarding link count and file dates + +=item * + +inplace operation (the -i switch) without backup file + +=item * + +umask() works, but the correct permissions are only set when the file is +finally close()d =back diff --git a/config_h.SH b/config_h.SH index b8a2481..b3a8c7e 100644 --- a/config_h.SH +++ b/config_h.SH @@ -1800,7 +1800,15 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un * available to split a long double x into a fractional part f and * an integer part i such that |f| < 1.0 and (f + i) = x. */ +/* HAS_MODFL_POW32_BUG: + * This symbol, if defined, indicates that the modfl routine is + * broken for long doubles >= pow(2, 32). + * For example from 4294967303.150000 one would get 4294967302.000000 + * and 1.150000. The bug has been seen in certain versions of glibc, + * release 2.2.2 is known to be okay. + */ #$d_modfl HAS_MODFL /**/ +#$d_modfl_pow32_bug HAS_MODFL_POW32_BUG /**/ /* HAS_MPROTECT: * This symbol, if defined, indicates that the mprotect system call is diff --git a/configure.com b/configure.com index aae059e..b18a1ca 100644 --- a/configure.com +++ b/configure.com @@ -5124,6 +5124,7 @@ $ WC "d_mkstemps='" + d_mkstemps + "'" $ WC "d_mktime='" + d_mktime + "'" $ WC "d_mmap='undef'" $ WC "d_modfl='" + d_modfl + "'" +$ WC "d_modfl_pow32_bug = "undef"' $ WC "d_mprotect='undef'" $ WC "d_msg='undef'" $ WC "d_msg_ctrunc='undef'" diff --git a/epoc/config.sh b/epoc/config.sh index b2e3fe6..e9a5cd6 100644 --- a/epoc/config.sh +++ b/epoc/config.sh @@ -232,6 +232,7 @@ d_mkfifo='undef' d_mktime='define' d_mmap='undef' d_modfl='undef' +d_modfl_pow32_bug='undef' d_mprotect='undef' d_msg='undef' d_msg_ctrunc='undef' diff --git a/ext/re/re.xs b/ext/re/re.xs index e9a9cab..cc4dc69 100644 --- a/ext/re/re.xs +++ b/ext/re/re.xs @@ -1,6 +1,7 @@ /* We need access to debugger hooks */ #ifndef DEBUGGING # define DEBUGGING +# define WAS_NOT_DEBUGGING #endif #define PERL_NO_GET_CONTEXT @@ -8,6 +9,10 @@ #include "perl.h" #include "XSUB.h" +#ifdef WAS_NOT_DEBUGGING +void Perl_deb(pTHX_ const char* pat, ...) { } +#endif + extern regexp* my_regcomp (pTHX_ char* exp, char* xend, PMOP* pm); extern I32 my_regexec (pTHX_ regexp* prog, char* stringarg, char* strend, char* strbeg, I32 minend, SV* screamer, diff --git a/lib/Attribute/Handlers.pm b/lib/Attribute/Handlers.pm index 96d4f68..a0a57fe 100644 --- a/lib/Attribute/Handlers.pm +++ b/lib/Attribute/Handlers.pm @@ -596,27 +596,35 @@ Let's you write: =over -=item C +=item * + +C An attribute handler was specified with an C<:ATTR(I)>, but the type of referent it was defined to handle wasn't one of the five permitted: C, C, C, C, or C. -=item C +=item * + + C A handler for attributes of the specified name I defined, but not for the specified type of declaration. Typically encountered whe trying to apply a C attribute handler to a subroutine, or a C attribute handler to some other type of variable. -=item C +=item * + +C A handler for an attributes with an all-lowercase name was declared. An attribute with an all-lowercase name might have a meaning to Perl itself some day, even though most don't yet. Use a mixed-case attribute name, instead. -=item C +=item * + +C Something is rotten in the state of the program. An attributed subroutine ceased to exist between the point it was declared and the end diff --git a/lib/ExtUtils/Constant.pm b/lib/ExtUtils/Constant.pm index 7bdf585..4efccfe 100644 --- a/lib/ExtUtils/Constant.pm +++ b/lib/ExtUtils/Constant.pm @@ -294,7 +294,9 @@ sub params { return ($use_iv, $use_nv, $use_pv); } -=item dump_names PACKAGE, SUBNAME, DEFAULT_TYPE, TYPES, INDENT, ITEM... +=item dump_names + +dump_names PACKAGE, SUBNAME, DEFAULT_TYPE, TYPES, INDENT, ITEM... An internal function to generate the embedded perl code that will regenerate the constant subroutines. Parameters are the same as for C_constant, except @@ -404,7 +406,9 @@ __END__ $result; } -=item C_constant PACKAGE, SUBNAME, DEFAULT_TYPE, TYPES, INDENT, NAMELEN, ITEM... +=item C_constant + +C_constant PACKAGE, SUBNAME, DEFAULT_TYPE, TYPES, INDENT, NAMELEN, ITEM... A function that returns a B of C subroutine definitions that return the value and type of constants when passed the name by the XS wrapper. diff --git a/lib/Locale/Maketext.pod b/lib/Locale/Maketext.pod index b28a9d8..d32f9d5 100644 --- a/lib/Locale/Maketext.pod +++ b/lib/Locale/Maketext.pod @@ -110,7 +110,9 @@ These are to do with constructing a language handle: =over -=item $lh = YourProjClass->get_handle( ...langtags... ) || die "lg-handle?"; +=item * + +$lh = YourProjClass->get_handle( ...langtags... ) || die "lg-handle?"; This tries loading classes based on the language-tags you give (like C<("en-US", "sk", "kon", "es-MX", "ja", "i-klingon")>, and for the first class @@ -131,7 +133,9 @@ then if nothing comes of that, we use classes named by YourProjClass->fallback_language_classes(). Then in the (probably quite unlikely) event that that fails, we just return undef. -=item $lh = YourProjClass->get_handleB<()> || die "lg-handle?"; +=item * + +$lh = YourProjClass->get_handleB<()> || die "lg-handle?"; When C is called with an empty parameter list, magic happens: diff --git a/lib/diagnostics.pm b/lib/diagnostics.pm index f3e60f5..b027b74 100755 --- a/lib/diagnostics.pm +++ b/lib/diagnostics.pm @@ -343,9 +343,16 @@ my %msg; next; } + if( $for_item ) { $header = $for_item; undef $for_item } + else { + $header = $1; + while( $header =~ /[;,]\z/ ) { + =~ /^\s*(.*?)\s*\z/; + $header .= ' '.$1; + } + } + # strip formatting directives in =item line - $header = $for_item || $1; - undef $for_item; $header =~ s/[A-Z]<(.*?)>/$1/g; if ($header =~ /%[csd]/) { diff --git a/lib/utf8_heavy.pl b/lib/utf8_heavy.pl index a843737..b73cea0 100644 --- a/lib/utf8_heavy.pl +++ b/lib/utf8_heavy.pl @@ -27,9 +27,10 @@ sub SWASHNEW { my $encoding = $enc{$caller} || "unicode"; (my $file = $type) =~ s!::!/!g; if ($file =~ /^In(.+)/) { + my $In = $1; defined %utf8::In || do "$encoding/In.pl"; - if (exists $utf8::In{$1}) { - $file = "$enconding/In/$utf8::In{$1}"; + if (exists $utf8::In{$In}) { + $file = "$encoding/In/$utf8::In{$In}"; } } else { $file =~ s#^(Is|To)([A-Z].*)#$1/$2#; diff --git a/op.c b/op.c index 08e2ed4..6e42527 100644 --- a/op.c +++ b/op.c @@ -4180,7 +4180,8 @@ Perl_cv_undef(pTHX_ CV *cv) * apply to closures generated within eval"", since eval"" CVs are * ephemeral. --GSAR */ if (!CvANON(cv) || CvCLONED(cv) - || (CvOUTSIDE(cv) && CvEVAL(CvOUTSIDE(cv)) && !CvGV(CvOUTSIDE(cv)))) + || (CvOUTSIDE(cv) && SvTYPE(CvOUTSIDE(cv)) == SVt_PVCV + && CvEVAL(CvOUTSIDE(cv)) && !CvGV(CvOUTSIDE(cv)))) { SvREFCNT_dec(CvOUTSIDE(cv)); } @@ -4828,7 +4829,8 @@ Perl_newATTRSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block) * lifetime of the outer CV. Avoids memory leak due to reference * loop. --GSAR */ if (!name && CvOUTSIDE(cv) - && !(CvEVAL(CvOUTSIDE(cv)) && !CvGV(CvOUTSIDE(cv)))) + && !(SvTYPE(CvOUTSIDE(cv)) == SVt_PVCV + && CvEVAL(CvOUTSIDE(cv)) && !CvGV(CvOUTSIDE(cv)))) { SvREFCNT_dec(CvOUTSIDE(cv)); } diff --git a/patchlevel.h b/patchlevel.h index e50d8cd..47ccbe7 100644 --- a/patchlevel.h +++ b/patchlevel.h @@ -70,7 +70,7 @@ #if !defined(PERL_PATCHLEVEL_H_IMPLICIT) && !defined(LOCAL_PATCH_COUNT) static char *local_patches[] = { NULL - ,"DEVEL10438" + ,"DEVEL10475" ,NULL }; diff --git a/pod/perldiag.pod b/pod/perldiag.pod index 2890989..de8956b 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -1448,7 +1448,9 @@ some time before now. Check your control flow. flock() operates on filehandles. Are you attempting to call flock() on a dirhandle by the same name? -=item Quantifier follows nothing in regex; marked by <-- HERE in m/%s/ +=item Quantifier follows nothing in regex; + +marked by <-- HERE in m/%s/ (F) You started a regular expression with a quantifier. Backslash it if you meant it literally. The <-- HERE shows in the regular expression about @@ -1846,7 +1848,9 @@ instead on the filehandle.) values cannot be returned in subroutines used in lvalue context. See L. -=item Lookbehind longer than %d not implemented in regex; marked by <-- HERE in m/%s/ +=item Lookbehind longer than %d not implemented in regex; + +marked by <-- HERE in m/%s/ (F) There is currently a limit on the length of string which lookbehind can handle. This restriction may be eased in a future release. The <-- HERE @@ -1876,7 +1880,9 @@ Perl detected something that didn't comply with UTF-8 encoding rules. Perl thought it was reading UTF-16 encoded character data but while doing it Perl met a malformed Unicode surrogate. -=item %s matches null string many times in regex; marked by <-- HERE in m/%s/ +=item %s matches null string many times in regex; + +marked by <-- HERE in m/%s/ (W regexp) The pattern you've specified would be an infinite loop if the regular expression engine didn't specifically check for that. The <-- HERE @@ -2691,7 +2697,9 @@ value of the environment variable PERLIO. process which isn't a subprocess of the current process. While this is fine from VMS' perspective, it's probably not what you intended. -=item POSIX syntax [%s] belongs inside character classes in regex; marked by <-- HERE in m/%s/ +=item POSIX syntax [%s] belongs inside character classes in regex; + +marked by <-- HERE in m/%s/ (W unsafe) The character class constructs [: :], [= =], and [. .] go I character classes, the [] are part of the construct, for example: @@ -2700,7 +2708,9 @@ implemented; they are simply placeholders for future extensions and will cause fatal errors. The <-- HERE shows in the regular expression about where the problem was discovered. See L. -=item POSIX syntax [. .] is reserved for future extensions in regex; marked by <-- HERE in m/%s/ +=item POSIX syntax [. .] is reserved for future extensions in regex; + +marked by <-- HERE in m/%s/ (F regexp) Within regular expression character classes ([]) the syntax beginning with "[." and ending with ".]" is reserved for future extensions. @@ -2709,7 +2719,9 @@ expression character class, just quote the square brackets with the backslash: "\[." and ".\]". The <-- HERE shows in the regular expression about where the problem was discovered. See L. -=item POSIX syntax [= =] is reserved for future extensions in regex; marked by <-- HERE in m/%s/ +=item POSIX syntax [= =] is reserved for future extensions in regex; + +marked by <-- HERE in m/%s/ (F) Within regular expression character classes ([]) the syntax beginning with "[=" and ending with "=]" is reserved for future extensions. If you @@ -2718,7 +2730,9 @@ character class, just quote the square brackets with the backslash: "\[=" and "=\]". The <-- HERE shows in the regular expression about where the problem was discovered. See L. -=item POSIX class [:%s:] unknown in regex; marked by <-- HERE in m/%s/ +=item POSIX class [:%s:] unknown in regex; + +marked by <-- HERE in m/%s/ (F) The class in the character class [: :] syntax is unknown. The <-- HERE shows in the regular expression about where the problem was discovered. @@ -2846,13 +2860,17 @@ in L. (S unsafe) The subroutine being declared or defined had previously been declared or defined with a different function prototype. -=item Quantifier in {,} bigger than %d in regex; marked by <-- HERE in m/%s/ +=item Quantifier in {,} bigger than %d in regex; + +marked by <-- HERE in m/%s/ (F) There is currently a limit to the size of the min and max values of the {min,max} construct. The <-- HERE shows in the regular expression about where the problem was discovered. See L. -=item Quantifier unexpected on zero-length expression; marked by <-- HERE in m/%s/ +=item Quantifier unexpected on zero-length expression; + +marked by <-- HERE in m/%s/ (W regexp) You applied a regular expression quantifier in a place where it makes no sense, such as on a zero-width assertion. Try putting the @@ -2923,7 +2941,9 @@ Doing so has no effect. (W internal) The internal sv_replace() function was handed a new SV with a reference count of other than 1. -=item Reference to nonexistent group in regex; marked by <-- HERE in m/%s/ +=item Reference to nonexistent group in regex; + +marked by <-- HERE in m/%s/ (F) You used something like C<\7> in your regular expression, but there are not at least seven sets of capturing parentheses in the expression. If you @@ -3053,26 +3073,34 @@ before now. Check your control flow. shows in the regular expression about where the problem was discovered. See L. -=item Sequence (?{...}) not terminated or not {}-balanced in regex; marked by <-- HERE in m/%s/ +=item Sequence (?{...}) not terminated or not {}-balanced in regex; + +marked by <-- HERE in m/%s/ (F) If the contents of a (?{...}) clause contains braces, they must balance for Perl to properly detect the end of the clause. The <-- HERE shows in the regular expression about where the problem was discovered. See L. -=item Sequence (?%s...) not implemented in regex; marked by <-- HERE in m/%s/ +=item Sequence (?%s...) not implemented in regex; + +marked by <-- HERE in m/%s/ (F) A proposed regular expression extension has the character reserved but has not yet been written. The <-- HERE shows in the regular expression about where the problem was discovered. See L. -=item Sequence (?%s...) not recognized in regex; marked by <-- HERE in m/%s/ +=item Sequence (?%s...) not recognized in regex; + +marked by <-- HERE in m/%s/ (F) You used a regular expression extension that doesn't make sense. The <-- HERE shows in the regular expression about where the problem was discovered. See L. -=item Sequence (?#... not terminated in regex; marked by <-- HERE in m/%s/ +=item Sequence (?#... not terminated in regex; + +marked by <-- HERE in m/%s/ (F) A regular expression comment must be terminated by a closing parenthesis. Embedded parentheses aren't allowed. The <-- HERE shows in @@ -3258,7 +3286,9 @@ assignment or as a subroutine argument for example). (F) Your Perl was compiled with B<-D>SETUID_SCRIPTS_ARE_SECURE_NOW, but a version of the setuid emulator somehow got run anyway. -=item Switch (?(condition)... contains too many branches in regex; marked by <-- HERE in m/%s/ +=item Switch (?(condition)... contains too many branches in regex; + +marked by <-- HERE in m/%s/ (F) A (?(condition)if-clause|else-clause) construct can have at most two branches (the if-clause and the else-clause). If you want one or both to @@ -3270,7 +3300,9 @@ clustering parentheses: The <-- HERE shows in the regular expression about where the problem was discovered. See L. -=item Switch condition not recognized in regex; marked by <-- HERE in m/%s/ +=item Switch condition not recognized in regex; + +marked by <-- HERE in m/%s/ (F) If the argument to the (?(...)if-clause|else-clause) construct is a number, it can be only a number. The <-- HERE shows in the regular expression @@ -3555,7 +3587,9 @@ order. You tried to use an unknown subpragma of the "re" pragma. -=item Unknown switch condition (?(%.2s in regex; marked by <-- HERE in m/%s/ +=item Unknown switch condition (?(%.2s in regex; + +marked by <-- HERE in m/%s/ (F) The condition part of a (?(condition)if-clause|else-clause) construct is not known. The condition may be lookahead or lookbehind (the condition @@ -3620,7 +3654,9 @@ script, a binary program, or a directory as a Perl program. recognized by Perl inside character classes. The character was understood literally. -=item Unrecognized escape \\%c passed through in regex; marked by <-- HERE in m/%s/ +=item Unrecognized escape \\%c passed through in regex; + +marked by <-- HERE in m/%s/ (W regexp) You used a backslash-character combination which is not recognized by Perl. This combination appears in an interpolated variable or @@ -3710,7 +3746,9 @@ earlier in the line, and you really meant a "less than". (W untie) A copy of the object returned from C (or C) was still valid when C was called. -=item Useless (?%s) - use /%s modifier in regex; marked by <-- HERE in m/%s/ +=item Useless (?%s) - use /%s modifier in regex; + +marked by <-- HERE in m/%s/ (W regexp) You have used an internal modifier such as (?o) that has no meaning unless applied to the entire regexp: @@ -3724,7 +3762,9 @@ must be written as The <-- HERE shows in the regular expression about where the problem was discovered. See L. -=item Useless (?-%s) - don't use /%s modifier in regex; marked by <-- HERE in m/%s/ +=item Useless (?-%s) - don't use /%s modifier in regex; + +marked by <-- HERE in m/%s/ (W regexp) You have used an internal modifier such as (?-o) that has no meaning unless removed from the entire regexp: @@ -3981,7 +4021,9 @@ anonymous, using the C syntax. When inner anonymous subs that reference variables in outer subroutines are called or referenced, they are automatically rebound to the current values of such variables. -=item Variable length lookbehind not implemented in regex; marked by <-- HERE in m/%s/ +=item Variable length lookbehind not implemented in regex; + +marked by <-- HERE in m/%s/ (F) Lookbehind is allowed only for subexpressions whose length is fixed and known at compile time. The <-- HERE shows in the regular expression about diff --git a/pod/perlguts.pod b/pod/perlguts.pod index 3fea294..aa5de9f 100644 --- a/pod/perlguts.pod +++ b/pod/perlguts.pod @@ -274,6 +274,14 @@ pointer in an SV, you can use the following three macros instead: These will tell you if you truly have an integer, double, or string pointer stored in your SV. The "p" stands for private. +The are various ways in which the private and public flags may differ. +For example, a tied SV may have a valid underlying value in the IV slot +(so SvIOKp is true), but the data should be accessed via the FETCH +routine rather than directly, so SvIOK is false. Another is when +numeric conversion has occured and precision has been lost: only the +private flag is set on 'lossy' values. So when an NV is converted to an +IV with loss, SvIOKp, SvNOKp and SvNOK will be set, while SvIOK wont be. + In general, though, it's best to use the C macros. =head2 Working with AVs diff --git a/pp.c b/pp.c index a8b3e55..ebdf3fd 100644 --- a/pp.c +++ b/pp.c @@ -2598,7 +2598,16 @@ PP(pp_int) SETu(U_V(value)); } else { #if defined(HAS_MODFL) || defined(LONG_DOUBLE_EQUALS_DOUBLE) +# ifdef HAS_MODFL_POW32_BUG +/* some versions of glibc split (i + d) into (i-1, d+1) for 2^32 <= i < 2^64 */ + { + NV offset = Perl_modf(value, &value); + (void)Perl_modf(offset, &offset); + value += offset; + } +# else (void)Perl_modf(value, &value); +# endif #else double tmp = (double)value; (void)Perl_modf(tmp, &tmp); @@ -2612,7 +2621,16 @@ PP(pp_int) SETi(I_V(value)); } else { #if defined(HAS_MODFL) || defined(LONG_DOUBLE_EQUALS_DOUBLE) +# ifdef HAS_MODFL_POW32_BUG +/* some versions of glibc split (i + d) into (i-1, d+1) for 2^32 <= i < 2^64 */ + { + NV offset = Perl_modf(-value, &value); + (void)Perl_modf(offset, &offset); + value += offset; + } +# else (void)Perl_modf(-value, &value); +# endif value = -value; #else double tmp = (double)value; diff --git a/t/op/pat.t b/t/op/pat.t index ab4226c..c59e31f 100755 --- a/t/op/pat.t +++ b/t/op/pat.t @@ -6,7 +6,7 @@ $| = 1; -print "1..625\n"; +print "1..630\n"; BEGIN { chdir 't' if -d 't'; @@ -1743,3 +1743,25 @@ EOT print "not " if $w !~ /^Useless \(\?o\).*\nUseless \(\?g\).*\nUseless \(\?c\)/; print "ok 625\n"; } + +# More Unicode "class" tests + +{ + use charnames ':full'; + + print "not " unless "\N{LATIN CAPITAL LETTER A}" =~ /\p{InBasicLatin}/; + print "ok 626\n"; + + print "not " unless "\N{LATIN CAPITAL LETTER A WITH GRAVE}" =~ /\p{InLatin1Supplement}/; + print "ok 627\n"; + + print "not " unless "\N{LATIN CAPITAL LETTER A WITH MACRON}" =~ /\p{InLatinExtendedA}/; + print "ok 628\n"; + + print "not " unless "\N{LATIN SMALL LETTER B WITH STROKE}" =~ /\p{InLatinExtendedB}/; + print "ok 629\n"; + + print "not " unless "\N{KATAKANA LETTER SMALL A}" =~ /\p{InKatakana}/; + print "ok 630\n"; +} + diff --git a/t/op/write.t b/t/op/write.t index fc155a8..e5baaa4 100755 --- a/t/op/write.t +++ b/t/op/write.t @@ -1,6 +1,11 @@ #!./perl -print "1..11\n"; +BEGIN { + chdir 't' if -d 't'; + @INC = '../lib'; +} + +print "1..44\n"; my $CAT = ($^O eq 'MSWin32') ? 'type' : 'cat'; @@ -263,3 +268,137 @@ if (`$CAT Op_write.tmp` eq $right) { print "ok 11\n"; 1 while unlink 'Op_write.tmp'; } else { print "not ok 11\n"; } + +# 12..44: scary format testing from Merijn H. Brand + +use strict; # Amazed that this hackery can be made strict ... + +# Just a complete test for format, including top-, left- and bottom marging +# and format detection through glob entries + + $= = 7; # Page length +my $ps = $^L; $^L = ""; # Catch the page separator +my $tm = 1; # Top margin (empty lines before first output) +my $bm = 2; # Bottom marging (empty lines between last text and footer) +my $lm = 4; # Left margin (indent in spaces) + +if ($lm > 0 and !open STDOUT, "|-") { # Left margin (in this test ALWAYS set) + my $i = 12; + my $s = " " x $lm; + while () { + s/^/$s/; + print + ($_ eq ? "" : "not "), "ok ", $i++, "\n"; + } + close STDIN; + print + (?"not ":""), "ok ", $i++, "\n"; + close STDOUT; + exit; + } +$tm = "\n" x $tm; +$= -= $bm + 1; # count one for the trailing "----" +my $lastmin = 0; + +my @E; + +sub wryte +{ + $lastmin = $-; + write; + } # wryte; + +sub footer +{ + $% == 1 and return ""; + + $lastmin < $= and print "\n" x $lastmin; + print "\n" x $bm, "----\n", $ps; + $lastmin = $-; + ""; + } # footer + +# Yes, this is sick ;-) +format TOP = +@* ~ +@{[footer]} +@* ~ +$tm +. + +format EmptyTOP = +. + +format ENTRY = +@ @<<<<~~ +@{(shift @E)||["",""]} +. + +format EOR = +- ----- +. + +sub has_format ($) +{ + my $fmt = shift; + exists $::{$fmt} or return 0; + $^O eq "MSWin32" or return defined *{$::{$fmt}}{FORMAT}; + open my $null, "> /dev/null" or die; + my $fh = select $null; + local $~ = $fmt; + eval "write"; + select $fh; + $@?0:1; + } # has_format + +$^ = has_format ("TOP") ? "TOP" : "EmptyTOP"; +has_format ("ENTRY") or die "No format defined for ENTRY"; +foreach my $e ( [ map { [ $_, "Test$_" ] } 1 .. 7 ], + [ map { [ $_, "${_}tseT" ] } 1 .. 5 ]) { + @E = @$e; + local $~ = "ENTRY"; + wryte; + has_format ("EOR") or next; + local $~ = "EOR"; + wryte; + } +if (has_format ("EOF")) { + local $~ = "EOF"; + wryte; + } + +close STDOUT; + +# That was test 44. + +__END__ + + 1 Test1 + 2 Test2 + 3 Test3 + + + ---- + + 4 Test4 + 5 Test5 + 6 Test6 + + + ---- + + 7 Test7 + - ----- + + + + ---- + + 1 1tseT + 2 2tseT + 3 3tseT + + + ---- + + 4 4tseT + 5 5tseT + - ----- diff --git a/uconfig.h b/uconfig.h index 0c788f1..7084a28 100644 --- a/uconfig.h +++ b/uconfig.h @@ -980,9 +980,9 @@ * This symbol contains the value of sizeof(short) so that the C * preprocessor can make decisions based on it. */ -#define INTSIZE 1 /**/ +#define INTSIZE 4 /**/ #define LONGSIZE 4 /**/ -#define SHORTSIZE 1 /**/ +#define SHORTSIZE 2 /**/ /* MULTIARCH: * This symbol, if defined, signifies that the build @@ -1703,7 +1703,7 @@ */ /*#define HAS_LONG_DOUBLE / **/ #ifdef HAS_LONG_DOUBLE -#define LONG_DOUBLESIZE 1 /**/ +#define LONG_DOUBLESIZE 8 /**/ #endif /* HAS_LONG_LONG: @@ -1716,7 +1716,7 @@ */ /*#define HAS_LONG_LONG / **/ #ifdef HAS_LONG_LONG -#define LONGLONGSIZE 1 /**/ +#define LONGLONGSIZE 8 /**/ #endif /* HAS_LSEEK_PROTO: @@ -1776,7 +1776,15 @@ * available to split a long double x into a fractional part f and * an integer part i such that |f| < 1.0 and (f + i) = x. */ +/* HAS_MODFL_POW32_BUG: + * This symbol, if defined, indicates that the modfl routine is + * broken for long doubles >= pow(2, 32). + * For example from 4294967303.150000 one would get 4294967302.000000 + * and 1.150000. The bug has been seen in certain versions of glibc, + * release 2.2.2 is known to be okay. + */ /*#define HAS_MODFL / **/ +/*#define HAS_MODFL_POW32_BUG / **/ /* HAS_MPROTECT: * This symbol, if defined, indicates that the mprotect system call is @@ -2685,8 +2693,8 @@ * This symbol holds the number of bytes used by the Off_t. */ #define Off_t int /* type */ -#define LSEEKSIZE 1 /* size */ -#define Off_t_size 1 /* size */ +#define LSEEKSIZE 4 /* size */ +#define Off_t_size 4 /* size */ /* Free_t: * This variable contains the return type of free(). It is usually @@ -3075,7 +3083,7 @@ /* Size_t_size: * This symbol holds the size of a Size_t in bytes. */ -#define Size_t_size 1 /* */ +#define Size_t_size 4 /* */ /* Size_t: * This symbol holds the type used to declare length parameters diff --git a/uconfig.sh b/uconfig.sh index a6765d4..5fdadea 100755 --- a/uconfig.sh +++ b/uconfig.sh @@ -174,6 +174,7 @@ d_mkstemps='undef' d_mktime='undef' d_mmap='undef' d_modfl='undef' +d_modfl_pow32_bug='undef' d_mprotect='undef' d_msg='undef' d_msg_ctrunc='undef' @@ -460,15 +461,14 @@ inc_version_list_init='NULL' installstyle='lib/perl5' installusrbinperl='undef' intsize='4' -intsize=1 ivdformat='"ld"' ivsize='4' ivtype='long' lib_ext='.a' -longdblsize=1 -longlongsize=1 +longdblsize=8 +longlongsize=8 longsize='4' -lseeksize=1 +lseeksize=4 lseektype=int malloctype='int*' malloctype='void *' @@ -526,12 +526,12 @@ seedfunc='srand' selectminbits='32' selecttype=int shmattype='void *' -shortsize=1 +shortsize=2 sig_name_init='0' sig_num_init='0' sig_size='1' signal_t=int -sizesize=1 +sizesize=4 sizetype=int socksizetype='int' ssizetype=int diff --git a/vms/perlvms.pod b/vms/perlvms.pod index 48deedc..4db64d4 100644 --- a/vms/perlvms.pod +++ b/vms/perlvms.pod @@ -575,7 +575,7 @@ B at the DCL prompt. Perl waits for the subprocess to complete before continuing execution in the current process. As described in L, the return value of C is a fake "status" which follows -POSIX semantics unless the pragma C is in +POSIX semantics unless the pragma C is in effect; see the description of C<$?> in this document for more detail. diff --git a/vos/config.alpha.def b/vos/config.alpha.def index e532eac..18be779 100644 --- a/vos/config.alpha.def +++ b/vos/config.alpha.def @@ -157,6 +157,7 @@ $d_mkstemps='undef' $d_mktime='define' $d_mmap='undef' $d_modfl='undef' +$d_modfl_pow32_bug='undef' $d_mprotect='undef' $d_msg='undef' $d_msg_ctrunc='undef' diff --git a/vos/config.ga.def b/vos/config.ga.def index 56410e2..823bdb0 100644 --- a/vos/config.ga.def +++ b/vos/config.ga.def @@ -157,6 +157,7 @@ $d_mkstemps='undef' $d_mktime='define' $d_mmap='define' $d_modfl='undef' +$d_modfl_pow32_bug='undef' $d_mprotect='undef' $d_msg='undef' $d_msg_ctrunc='undef' diff --git a/win32/config.bc b/win32/config.bc index b8ee924..ee160fd 100644 --- a/win32/config.bc +++ b/win32/config.bc @@ -227,6 +227,7 @@ d_mkstemps='undef' d_mktime='define' d_mmap='undef' d_modfl='undef' +d_modfl_pow32_bug='undef' d_mprotect='undef' d_msg='undef' d_msg_ctrunc='undef' diff --git a/win32/config.gc b/win32/config.gc index 61438a0..8adbe23 100644 --- a/win32/config.gc +++ b/win32/config.gc @@ -227,6 +227,7 @@ d_mkstemps='undef' d_mktime='define' d_mmap='undef' d_modfl='undef' +d_modfl_pow32_bug='undef' d_mprotect='undef' d_msg='undef' d_msg_ctrunc='undef' diff --git a/win32/config.vc b/win32/config.vc index a7e5a1c..5a7b20d 100644 --- a/win32/config.vc +++ b/win32/config.vc @@ -227,6 +227,7 @@ d_mkstemps='undef' d_mktime='define' d_mmap='undef' d_modfl='undef' +d_modfl_pow32_bug='undef' d_mprotect='undef' d_msg='undef' d_msg_ctrunc='undef'