diff options
author | Nick Ing-Simmons <nik@tiuk.ti.com> | 2003-01-01 19:14:32 +0000 |
---|---|---|
committer | Nick Ing-Simmons <nik@tiuk.ti.com> | 2003-01-01 19:14:32 +0000 |
commit | 6e6ca6c3d8f9eaf6e2364f1fef07b3f472f0a846 (patch) | |
tree | 401e00ad9c830b818dcc4a8202654b3038ab8079 /ext | |
parent | 3e4a31ba50c4f768e53207843155793ca70b3ba1 (diff) | |
parent | 498d7dc446852be2217fba65d8c41a0242e7402a (diff) | |
download | perl-6e6ca6c3d8f9eaf6e2364f1fef07b3f472f0a846.tar.gz |
Integrate mainline
p4raw-id: //depot/perlio@18384
Diffstat (limited to 'ext')
-rw-r--r-- | ext/B/B/Debug.pm | 12 | ||||
-rw-r--r-- | ext/B/B/Deparse.pm | 13 | ||||
-rw-r--r-- | ext/B/defsubs_h.PL | 2 | ||||
-rw-r--r-- | ext/Devel/DProf/DProf.xs | 2 | ||||
-rw-r--r-- | ext/Devel/Peek/Peek.t | 4 | ||||
-rw-r--r-- | ext/Filter/Util/Call/Call.xs | 3 | ||||
-rw-r--r-- | ext/Filter/t/call.t | 37 | ||||
-rw-r--r-- | ext/List/Util/ChangeLog | 8 | ||||
-rw-r--r-- | ext/List/Util/Util.xs | 4 | ||||
-rw-r--r-- | ext/List/Util/lib/List/Util.pm | 2 | ||||
-rw-r--r-- | ext/ODBM_File/hints/dec_osf.pl | 2 | ||||
-rw-r--r-- | ext/ODBM_File/hints/hpux.pl | 2 | ||||
-rw-r--r-- | ext/ODBM_File/hints/ultrix.pl | 2 | ||||
-rw-r--r-- | ext/POSIX/POSIX.pod | 116 | ||||
-rw-r--r-- | ext/POSIX/POSIX.xs | 8 | ||||
-rw-r--r-- | ext/POSIX/t/is.t | 6 | ||||
-rw-r--r-- | ext/POSIX/t/posix.t | 1 | ||||
-rw-r--r-- | ext/PerlIO/scalar/scalar.xs | 10 | ||||
-rw-r--r-- | ext/PerlIO/via/via.xs | 7 | ||||
-rw-r--r-- | ext/SDBM_File/sdbm/README.too | 2 | ||||
-rw-r--r-- | ext/Sys/Syslog/Syslog.pm | 9 | ||||
-rw-r--r-- | ext/Time/HiRes/Changes | 3 | ||||
-rw-r--r-- | ext/Time/HiRes/HiRes.pm | 2 | ||||
-rw-r--r-- | ext/Time/HiRes/Makefile.PL | 4 |
24 files changed, 177 insertions, 84 deletions
diff --git a/ext/B/B/Debug.pm b/ext/B/B/Debug.pm index da8b1474f4..efc618ebc1 100644 --- a/ext/B/B/Debug.pm +++ b/ext/B/B/Debug.pm @@ -40,9 +40,9 @@ sub B::LOOP::debug { my ($op) = @_; $op->B::BINOP::debug(); printf <<'EOT', ${$op->redoop}, ${$op->nextop}, ${$op->lastop}; - op_redoop 0x%x - op_nextop 0x%x - op_lastop 0x%x + op_redoop 0x%x + op_nextop 0x%x + op_lastop 0x%x EOT } @@ -205,7 +205,7 @@ sub B::CV::debug { GV 0x%x FILE %s DEPTH %d - PADLIST 0x%x + PADLIST 0x%x OUTSIDE 0x%x OUTSIDE_SEQ %d EOT @@ -221,13 +221,13 @@ sub B::AV::debug { my(@array) = $av->ARRAY; print "\tARRAY\t\t(", join(", ", map("0x" . $$_, @array)), ")\n"; printf <<'EOT', scalar(@array), $av->MAX, $av->OFF, $av->AvFLAGS; - FILL %d + FILL %d MAX %d OFF %d AvFLAGS %d EOT } - + sub B::GV::debug { my ($gv) = @_; if ($done_gv{$$gv}++) { diff --git a/ext/B/B/Deparse.pm b/ext/B/B/Deparse.pm index b54a5af97b..37b98a0343 100644 --- a/ext/B/B/Deparse.pm +++ b/ext/B/B/Deparse.pm @@ -15,7 +15,7 @@ use B qw(class main_root main_start main_cv svref_2object opnumber perlstring OPpTRANS_SQUASH OPpTRANS_DELETE OPpTRANS_COMPLEMENT OPpTARGET_MY OPpCONST_ARYBASE OPpEXISTS_SUB OPpSORT_NUMERIC OPpSORT_INTEGER OPpSORT_REVERSE - SVf_IOK SVf_NOK SVf_ROK SVf_POK SVpad_OUR + SVf_IOK SVf_NOK SVf_ROK SVf_POK SVpad_OUR SVf_FAKE CVf_METHOD CVf_LOCKED CVf_LVALUE PMf_KEEP PMf_GLOBAL PMf_CONTINUE PMf_EVAL PMf_ONCE PMf_SKIPWHITE PMf_MULTILINE PMf_SINGLELINE PMf_FOLD PMf_EXTENDED); @@ -1130,7 +1130,10 @@ sub lex_in_scope { sub populate_curcvlex { my $self = shift; for (my $cv = $self->{'curcv'}; class($cv) eq "CV"; $cv = $cv->OUTSIDE) { - my @padlist = $cv->PADLIST->ARRAY; + my $padlist = $cv->PADLIST; + # an undef CV still in lexical chain + next if class($padlist) eq "SPECIAL"; + my @padlist = $padlist->ARRAY; my @ns = $padlist[0]->ARRAY; for (my $i=0; $i<@ns; ++$i) { @@ -1141,8 +1144,10 @@ sub populate_curcvlex { next; } my $name = $ns[$i]->PVX; - my $seq_st = $ns[$i]->NVX; - my $seq_en = int($ns[$i]->IVX); + my ($seq_st, $seq_en) = + ($ns[$i]->FLAGS & SVf_FAKE) + ? (0, 999999) + : ($ns[$i]->NVX, $ns[$i]->IVX); push @{$self->{'curcvlex'}{$name}}, [$seq_st, $seq_en]; } diff --git a/ext/B/defsubs_h.PL b/ext/B/defsubs_h.PL index 37bfeb7e9d..2c2aecf6af 100644 --- a/ext/B/defsubs_h.PL +++ b/ext/B/defsubs_h.PL @@ -13,7 +13,7 @@ foreach my $const (qw( GVf_IMPORTED_AV GVf_IMPORTED_HV GVf_IMPORTED_SV GVf_IMPORTED_CV CVf_METHOD CVf_LOCKED CVf_LVALUE CVf_CONST - SVpad_OUR SVf_IOK SVf_IVisUV SVf_NOK SVf_POK + SVpad_OUR SVf_FAKE SVf_IOK SVf_IVisUV SVf_NOK SVf_POK SVf_ROK SVp_IOK SVp_POK SVp_NOK )) { diff --git a/ext/Devel/DProf/DProf.xs b/ext/Devel/DProf/DProf.xs index 3525a27a8d..78ea3c9e56 100644 --- a/ext/Devel/DProf/DProf.xs +++ b/ext/Devel/DProf/DProf.xs @@ -84,7 +84,7 @@ typedef struct { U32 dprof_ticks; char* out_file_name; /* output file (defaults to tmon.out) */ PerlIO* fp; /* pointer to tmon.out file */ - long TIMES_LOCATION; /* Where in the file to store the time totals */ + Off_t TIMES_LOCATION; /* Where in the file to store the time totals */ int SAVE_STACK; /* How much data to buffer until end of run */ int prof_pid; /* pid of profiled process */ struct tms prof_start; diff --git a/ext/Devel/Peek/Peek.t b/ext/Devel/Peek/Peek.t index cdcf8114e1..a1ed214d19 100644 --- a/ext/Devel/Peek/Peek.t +++ b/ext/Devel/Peek/Peek.t @@ -206,7 +206,7 @@ do_test(13, RV = $ADDR SV = PVCV\\($ADDR\\) at $ADDR REFCNT = 2 - FLAGS = \\(PADBUSY,PADMY,POK,pPOK,ANON\\) + FLAGS = \\(PADBUSY,PADMY,POK,pPOK,ANON,WEAKOUTSIDE\\) IV = 0 NV = 0 PROTOTYPE = "" @@ -220,7 +220,7 @@ do_test(13, DEPTH = 0 (?: MUTEXP = $ADDR OWNER = $ADDR -)? FLAGS = 0x4 +)? FLAGS = 0x404 OUTSIDE_SEQ = \\d+ PADLIST = $ADDR PADNAME = $ADDR\\($ADDR\\) PAD = $ADDR\\($ADDR\\) diff --git a/ext/Filter/Util/Call/Call.xs b/ext/Filter/Util/Call/Call.xs index 0215fa620d..05fe95fbfe 100644 --- a/ext/Filter/Util/Call/Call.xs +++ b/ext/Filter/Util/Call/Call.xs @@ -235,7 +235,8 @@ void filter_del() CODE: dMY_CXT; - FILTER_ACTIVE(FILTER_DATA(IDX)) = FALSE ; + if (PL_rsfp_filters && IDX <= av_len(PL_rsfp_filters) && FILTER_DATA(IDX) && FILTER_ACTIVE(FILTER_DATA(IDX))) + FILTER_ACTIVE(FILTER_DATA(IDX)) = FALSE ; diff --git a/ext/Filter/t/call.t b/ext/Filter/t/call.t index a145ab2ceb..0f9b452125 100644 --- a/ext/Filter/t/call.t +++ b/ext/Filter/t/call.t @@ -15,7 +15,7 @@ use warnings; use vars qw($Inc $Perl); -print "1..28\n" ; +print "1..32\n" ; $Perl = "$Perl -w" ; @@ -24,12 +24,14 @@ my $here = getcwd ; my $filename = "call.tst" ; +my $filename2 = "call2.tst" ; my $filenamebin = "call.bin" ; my $module = "MyTest" ; my $module2 = "MyTest2" ; my $module3 = "MyTest3" ; my $module4 = "MyTest4" ; my $module5 = "MyTest5" ; +my $module6 = "MyTest6" ; my $nested = "nested" ; my $block = "block" ; my $redir = $^O eq 'MacOS' ? "" : "2>&1"; @@ -781,14 +783,47 @@ EOM } +{ + +# no without use +# see Message-ID: <20021106212427.A15377@ttul.org> +#################### + +writeFile("${module6}.pm", <<EOM); +package ${module6} ; +#use Filter::Simple; +#FILTER {} +use Filter::Util::Call; +sub import { filter_add(sub{}) } +sub unimport { filter_del() } +1; +EOM + +writeFile($filename2, <<EOM); +no ${module6} ; +print "ok"; +EOM + +my $a = `$Perl "-I." $Inc -e "no ${module6}; print q{ok}"`; +ok(29, ($? >>8) == 0); +ok(30, $a eq 'ok'); + +$a = `$Perl "-I." $Inc $filename2`; +ok(31, ($? >>8) == 0); +ok(32, $a eq 'ok'); + +} + END { 1 while unlink $filename ; + 1 while unlink $filename2 ; 1 while unlink $filenamebin ; 1 while unlink "${module}.pm" ; 1 while unlink "${module2}.pm" ; 1 while unlink "${module3}.pm" ; 1 while unlink "${module4}.pm" ; 1 while unlink "${module5}.pm" ; + 1 while unlink "${module6}.pm" ; 1 while unlink $nested ; 1 while unlink "${block}.pm" ; } diff --git a/ext/List/Util/ChangeLog b/ext/List/Util/ChangeLog index 89e33e91d9..eef04916b0 100644 --- a/ext/List/Util/ChangeLog +++ b/ext/List/Util/ChangeLog @@ -1,3 +1,11 @@ +Change 759 on 2002/12/12 by <gbarr@pobox.com> (Graham Barr) + + Release 1.09 + +Change 758 on 2002/12/12 by <gbarr@pobox.com> (Graham Barr) + + Use UV to return refaddr + Change 757 on 2002/11/03 by <gbarr@pobox.com> (Graham Barr) Add XS_VERSION diff --git a/ext/List/Util/Util.xs b/ext/List/Util/Util.xs index 0b080c515f..f96b45162b 100644 --- a/ext/List/Util/Util.xs +++ b/ext/List/Util/Util.xs @@ -402,7 +402,7 @@ CODE: OUTPUT: RETVAL -IV +UV refaddr(sv) SV * sv PROTOTYPE: $ @@ -411,7 +411,7 @@ CODE: if(!SvROK(sv)) { XSRETURN_UNDEF; } - RETVAL = PTR2IV(SvRV(sv)); + RETVAL = PTR2UV(SvRV(sv)); } OUTPUT: RETVAL diff --git a/ext/List/Util/lib/List/Util.pm b/ext/List/Util/lib/List/Util.pm index 8975b10094..87b7e6c1d3 100644 --- a/ext/List/Util/lib/List/Util.pm +++ b/ext/List/Util/lib/List/Util.pm @@ -11,7 +11,7 @@ require DynaLoader; our @ISA = qw(Exporter DynaLoader); our @EXPORT_OK = qw(first min max minstr maxstr reduce sum shuffle); -our $VERSION = "1.08_00"; +our $VERSION = "1.09_00"; our $XS_VERSION = $VERSION; $VERSION = eval $VERSION; diff --git a/ext/ODBM_File/hints/dec_osf.pl b/ext/ODBM_File/hints/dec_osf.pl index febb7cdb21..70d721871f 100644 --- a/ext/ODBM_File/hints/dec_osf.pl +++ b/ext/ODBM_File/hints/dec_osf.pl @@ -1,5 +1,5 @@ # The -hidden option causes compilation to fail on Digital Unix. -# Andy Dougherty <doughera@lafcol.lafayette.edu> +# Andy Dougherty <doughera@lafayette.edu> # Sat Jan 13 16:29:52 EST 1996 $self->{LDDLFLAGS} = $Config{lddlflags}; $self->{LDDLFLAGS} =~ s/-hidden//; diff --git a/ext/ODBM_File/hints/hpux.pl b/ext/ODBM_File/hints/hpux.pl index 31f9d24bca..b9b99ab8b5 100644 --- a/ext/ODBM_File/hints/hpux.pl +++ b/ext/ODBM_File/hints/hpux.pl @@ -1,4 +1,4 @@ # Try to work around "bad free" messages. See note in ODBM_File.xs. -# Andy Dougherty <doughera@lafcol.lafayette.edu> +# Andy Dougherty <doughera@lafayette.edu> # Sun Sep 8 12:57:52 EDT 1996 $self->{CCFLAGS} = $Config{ccflags} . ' -DDBM_BUG_DUPLICATE_FREE' ; diff --git a/ext/ODBM_File/hints/ultrix.pl b/ext/ODBM_File/hints/ultrix.pl index 31f9d24bca..b9b99ab8b5 100644 --- a/ext/ODBM_File/hints/ultrix.pl +++ b/ext/ODBM_File/hints/ultrix.pl @@ -1,4 +1,4 @@ # Try to work around "bad free" messages. See note in ODBM_File.xs. -# Andy Dougherty <doughera@lafcol.lafayette.edu> +# Andy Dougherty <doughera@lafayette.edu> # Sun Sep 8 12:57:52 EDT 1996 $self->{CCFLAGS} = $Config{ccflags} . ' -DDBM_BUG_DUPLICATE_FREE' ; diff --git a/ext/POSIX/POSIX.pod b/ext/POSIX/POSIX.pod index a4550855a0..4d1ded6d56 100644 --- a/ext/POSIX/POSIX.pod +++ b/ext/POSIX/POSIX.pod @@ -580,15 +580,20 @@ see L<perlfunc/gmtime>. =item isalnum -This is identical to the C function, except that it can apply to a single -character or to a whole string. Consider using regular expressions and the -C</[[:alnum:]]/> construct instead, or possibly the C</\w/> construct. +This is identical to the C function, except that it can apply to a +single character or to a whole string. Note that locale settings may +affect what characters are considered C<isalnum>. Does not work on +Unicode characters code point 256 or higher. Consider using regular +expressions and the C</[[:alnum:]]/> construct instead, or possibly +the C</\w/> construct. =item isalpha -This is identical to the C function, except that it can apply to a single -character or to a whole string. Consider using regular expressions and the -C</[[:alpha:]]/> construct instead. +This is identical to the C function, except that it can apply to +a single character or to a whole string. Note that locale settings +may affect what characters are considered C<isalpha>. Does not work +on Unicode characters code point 256 or higher. Consider using regular +expressions and the C</[[:alpha:]]/> construct instead. =item isatty @@ -597,60 +602,82 @@ to a tty. Similar to the C<-t> operator, see L<perlfunc/-X>. =item iscntrl -This is identical to the C function, except that it can apply to a single -character or to a whole string. Consider using regular expressions and the -C</[[:cntrl:]]/> construct instead. +This is identical to the C function, except that it can apply to +a single character or to a whole string. Note that locale settings +may affect what characters are considered C<iscntrl>. Does not work +on Unicode characters code point 256 or higher. Consider using regular +expressions and the C</[[:cntrl:]]/> construct instead. =item isdigit -This is identical to the C function, except that it can apply to a single -character or to a whole string. Consider using regular expressions and the -C</[[:digit:]]/> construct instead, or the C</\d/> construct. +This is identical to the C function, except that it can apply to +a single character or to a whole string. Note that locale settings +may affect what characters are considered C<isdigit> (unlikely, but +still possible). Does not work on Unicode characters code point 256 +or higher. Consider using regular expressions and the C</[[:digit:]]/> +construct instead, or the C</\d/> construct. =item isgraph -This is identical to the C function, except that it can apply to a single -character or to a whole string. Consider using regular expressions and the -C</[[:graph:]]/> construct instead. +This is identical to the C function, except that it can apply to +a single character or to a whole string. Note that locale settings +may affect what characters are considered C<isgraph>. Does not work +on Unicode characters code point 256 or higher. Consider using regular +expressions and the C</[[:graph:]]/> construct instead. =item islower -This is identical to the C function, except that it can apply to a single -character or to a whole string. Consider using regular expressions and the -C</[[:lower:]]/> construct instead. Do B<not> use C</[a-z]/>. +This is identical to the C function, except that it can apply to +a single character or to a whole string. Note that locale settings +may affect what characters are considered C<islower>. Does not work +on Unicode characters code point 256 or higher. Consider using regular +expressions and the C</[[:lower:]]/> construct instead. Do B<not> use +C</[a-z]/>. =item isprint -This is identical to the C function, except that it can apply to a single -character or to a whole string. Consider using regular expressions and the -C</[[:print:]]/> construct instead. +This is identical to the C function, except that it can apply to +a single character or to a whole string. Note that locale settings +may affect what characters are considered C<isprint>. Does not work +on Unicode characters code point 256 or higher. Consider using regular +expressions and the C</[[:print:]]/> construct instead. =item ispunct -This is identical to the C function, except that it can apply to a single -character or to a whole string. Consider using regular expressions and the -C</[[:punct:]]/> construct instead. +This is identical to the C function, except that it can apply to +a single character or to a whole string. Note that locale settings +may affect what characters are considered C<ispunct>. Does not work +on Unicode characters code point 256 or higher. Consider using regular +expressions and the C</[[:punct:]]/> construct instead. =item isspace -This is identical to the C function, except that it can apply to a single -character or to a whole string. Consider using regular expressions and the -C</[[:space:]]/> construct instead, or the C</\s/> construct. -(Note that C</\s/> and C</[[:space:]]/> are slightly different in that -C</[[:space:]]/> can normally match a vertical tab, while C</\s/> does -not.) +This is identical to the C function, except that it can apply to +a single character or to a whole string. Note that locale settings +may affect what characters are considered C<isspace>. Does not work +on Unicode characters code point 256 or higher. Consider using regular +expressions and the C</[[:space:]]/> construct instead, or the C</\s/> +construct. (Note that C</\s/> and C</[[:space:]]/> are slightly +different in that C</[[:space:]]/> can normally match a vertical tab, +while C</\s/> does not.) =item isupper -This is identical to the C function, except that it can apply to a single -character or to a whole string. Consider using regular expressions and the -C</[[:upper:]]/> construct instead. Do B<not> use C</[A-Z]/>. +This is identical to the C function, except that it can apply to +a single character or to a whole string. Note that locale settings +may affect what characters are considered C<isupper>. Does not work +on Unicode characters code point 256 or higher. Consider using regular +expressions and the C</[[:upper:]]/> construct instead. Do B<not> use +C</[A-Z]/>. =item isxdigit This is identical to the C function, except that it can apply to a single -character or to a whole string. Consider using regular expressions and the -C</[[:xdigit:]]/> construct instead, or simply C</[0-9a-f]/i>. +character or to a whole string. Note that locale settings may affect what +characters are considered C<isxdigit> (unlikely, but still possible). +Does not work on Unicode characters code point 256 or higher. +Consider using regular expressions and the C</[[:xdigit:]]/> +construct instead, or simply C</[0-9a-f]/i>. =item kill @@ -1224,12 +1251,23 @@ I.e. January is 0, not 1; Sunday is 0, not 1; January 1st is 0, not 1. The year (C<year>) is given in years since 1900. I.e., the year 1995 is 95; the year 2001 is 101. Consult your system's C<strftime()> manpage for details about these and the other arguments. + If you want your code to be portable, your format (C<fmt>) argument should use only the conversion specifiers defined by the ANSI C -standard. These are C<aAbBcdHIjmMpSUwWxXyYZ%>. -The given arguments are made consistent -as though by calling C<mktime()> before calling your system's -C<strftime()> function, except that the C<isdst> value is not affected. +standard (C89, to play safe). These are C<aAbBcdHIjmMpSUwWxXyYZ%>. +But even then, the B<results> of some of the conversion specifiers are +non-portable. For example, the specifiers C<aAbBcpZ> change according +to the locale settings of the user, and both how to set locales (the +locale names) and what output to expect are non-standard. +The specifier C<c> changes according to the timezone settings of the +user and the timezone computation rules of the operating system. +The C<Z> specifier is notoriously unportable since the names of +timezones are non-standard. Sticking to the numeric specifiers is the +safest route. + +The given arguments are made consistent as though by calling +C<mktime()> before calling your system's C<strftime()> function, +except that the C<isdst> value is not affected. The string for Tuesday, December 12, 1995. diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs index 9a4fc02e46..519f741512 100644 --- a/ext/POSIX/POSIX.xs +++ b/ext/POSIX/POSIX.xs @@ -1374,11 +1374,17 @@ dup2(fd1, fd2) int fd1 int fd2 -SysRetLong +SV * lseek(fd, offset, whence) int fd Off_t offset int whence + CODE: + Off_t pos = PerlLIO_lseek(fd, offset, whence); + RETVAL = sizeof(Off_t) > sizeof(IV) + ? newSVnv((NV)pos) : newSViv((IV)pos); + OUTPUT: + RETVAL SysRet nice(incr) diff --git a/ext/POSIX/t/is.t b/ext/POSIX/t/is.t index 6aa96f0b7c..9ab851cd4e 100644 --- a/ext/POSIX/t/is.t +++ b/ext/POSIX/t/is.t @@ -10,12 +10,14 @@ BEGIN { } } - use POSIX; use strict ; -$| = 1; +# E.g. \t might or might not be isprint() depending on the locale, +# so let's reset to the default. +setlocale(LC_ALL, 'C') if $Config{d_setlocale}; +$| = 1; # List of characters (and strings) to feed to the is<xxx> functions. # diff --git a/ext/POSIX/t/posix.t b/ext/POSIX/t/posix.t index 01dba7f748..6ce418cccb 100644 --- a/ext/POSIX/t/posix.t +++ b/ext/POSIX/t/posix.t @@ -13,7 +13,6 @@ BEGIN { require "./test.pl"; plan(tests => 61); - use POSIX qw(fcntl_h signal_h limits_h _exit getcwd open read strftime write errno); use strict 'subs'; diff --git a/ext/PerlIO/scalar/scalar.xs b/ext/PerlIO/scalar/scalar.xs index 7bcee5774e..d92ef83aa2 100644 --- a/ext/PerlIO/scalar/scalar.xs +++ b/ext/PerlIO/scalar/scalar.xs @@ -105,10 +105,10 @@ SSize_t PerlIOScalar_unread(pTHX_ PerlIO * f, const void *vbuf, Size_t count) { PerlIOScalar *s = PerlIOSelf(f, PerlIOScalar); - char *dst = SvGROW(s->var, s->posn + count); + char *dst = SvGROW(s->var, (STRLEN)s->posn + count); Move(vbuf, dst + s->posn, count, char); s->posn += count; - SvCUR_set(s->var, s->posn); + SvCUR_set(s->var, (STRLEN)s->posn); SvPOK_on(s->var); return count; } @@ -128,7 +128,7 @@ PerlIOScalar_write(pTHX_ PerlIO * f, const void *vbuf, Size_t count) } else { if ((s->posn + count) > SvCUR(sv)) - dst = SvGROW(sv, s->posn + count); + dst = SvGROW(sv, (STRLEN)s->posn + count); else dst = SvPV_nolen(sv); offset = s->posn; @@ -136,7 +136,7 @@ PerlIOScalar_write(pTHX_ PerlIO * f, const void *vbuf, Size_t count) } Move(vbuf, dst + offset, count, char); if ((STRLEN) s->posn > SvCUR(sv)) - SvCUR_set(sv, s->posn); + SvCUR_set(sv, (STRLEN)s->posn); SvPOK_on(s->var); return count; } @@ -182,7 +182,7 @@ PerlIOScalar_get_cnt(pTHX_ PerlIO * f) if (PerlIOBase(f)->flags & PERLIO_F_CANREAD) { PerlIOScalar *s = PerlIOSelf(f, PerlIOScalar); if (SvCUR(s->var) > (STRLEN) s->posn) - return SvCUR(s->var) - s->posn; + return SvCUR(s->var) - (STRLEN)s->posn; else return 0; } diff --git a/ext/PerlIO/via/via.xs b/ext/PerlIO/via/via.xs index d4546781e6..524d24a69c 100644 --- a/ext/PerlIO/via/via.xs +++ b/ext/PerlIO/via/via.xs @@ -350,7 +350,8 @@ IV PerlIOVia_seek(pTHX_ PerlIO * f, Off_t offset, int whence) { PerlIOVia *s = PerlIOSelf(f, PerlIOVia); - SV *offsv = sv_2mortal(newSViv(offset)); + SV *offsv = sv_2mortal(sizeof(Off_t) > sizeof(IV) + ? newSVnv((NV)offset) : newSViv((IV)offset)); SV *whsv = sv_2mortal(newSViv(whence)); SV *result = PerlIOVia_method(aTHX_ f, MYMethod(SEEK), G_SCALAR, offsv, whsv, @@ -364,7 +365,9 @@ PerlIOVia_tell(pTHX_ PerlIO * f) PerlIOVia *s = PerlIOSelf(f, PerlIOVia); SV *result = PerlIOVia_method(aTHX_ f, MYMethod(TELL), G_SCALAR, Nullsv); - return (result) ? (Off_t) SvIV(result) : (Off_t) - 1; + return (result) + ? (SvNOK(result) ? (Off_t)SvNV(result) : (Off_t)SvIV(result)) + : (Off_t) - 1; } SSize_t diff --git a/ext/SDBM_File/sdbm/README.too b/ext/SDBM_File/sdbm/README.too index 1fec3156dd..cc86fb4dd5 100644 --- a/ext/SDBM_File/sdbm/README.too +++ b/ext/SDBM_File/sdbm/README.too @@ -6,7 +6,7 @@ the bad() macro redefined to allow a zero-length key.) Fri Apr 15 10:15:30 EDT 1994. Additional portability/configuration changes for libsdbm by Andy Dougherty -doughera@lafcol.lafayette.edu. +doughera@lafayette.edu. Mon Mar 22 03:24:47 PST 1999. diff --git a/ext/Sys/Syslog/Syslog.pm b/ext/Sys/Syslog/Syslog.pm index a7fd2c93fc..e255067449 100644 --- a/ext/Sys/Syslog/Syslog.pm +++ b/ext/Sys/Syslog/Syslog.pm @@ -26,15 +26,6 @@ my $fail_time = undef; use Socket; use Sys::Hostname; -# adapted from syslog.pl -# -# Tom Christiansen <tchrist@convex.com> -# modified to use sockets by Larry Wall <lwall@jpl-devvax.jpl.nasa.gov> -# NOTE: openlog now takes three arguments, just like openlog(3) -# Modified to add UNIX domain sockets by Sean Robinson <robinson_s@sc.maricopa.edu> -# with support from Tim Bunce <Tim.Bunce@ig.co.uk> and the perl5-porters mailing list -# Modified to use an XS backend instead of syslog.ph by Tom Hughes <tom@compton.nu> - =head1 NAME Sys::Syslog, openlog, closelog, setlogmask, syslog - Perl interface to the UNIX syslog(3) calls diff --git a/ext/Time/HiRes/Changes b/ext/Time/HiRes/Changes index 3ba982d67f..2340fb558a 100644 --- a/ext/Time/HiRes/Changes +++ b/ext/Time/HiRes/Changes @@ -1,5 +1,8 @@ Revision history for Perl extension Time::HiRes. +1.39 + - fix from Craig Berry for better building in VMS with PERL_CORE + 1.38 - no functional changes - move lib/Time/HiRes.pm as Hires.pm diff --git a/ext/Time/HiRes/HiRes.pm b/ext/Time/HiRes/HiRes.pm index 9886138b53..532484e414 100644 --- a/ext/Time/HiRes/HiRes.pm +++ b/ext/Time/HiRes/HiRes.pm @@ -15,7 +15,7 @@ require DynaLoader; d_usleep d_ualarm d_gettimeofday d_getitimer d_setitimer d_nanosleep); -$VERSION = '1.38'; +$VERSION = '1.39'; $XS_VERSION = $VERSION; $VERSION = eval $VERSION; diff --git a/ext/Time/HiRes/Makefile.PL b/ext/Time/HiRes/Makefile.PL index ea8b85f993..586823984f 100644 --- a/ext/Time/HiRes/Makefile.PL +++ b/ext/Time/HiRes/Makefile.PL @@ -83,7 +83,9 @@ sub try_compile_and_link { my $ccflags = $Config{'ccflags'} . ' ' . "-I$COREincdir"; if ($^O eq 'VMS') { if ($ENV{PERL_CORE}) { - $cccmd = "$Config{'cc'} /include=(perl_root:[000000]) $tmp.c"; + # Fragile if the extensions change hierachy within + # the Perl core but this should do for now. + $cccmd = "$Config{'cc'} /include=([---]) $tmp.c"; } else { my $perl_core = $Config{'installarchlib'}; $perl_core =~ s/\]$/.CORE]/; |