diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-01-30 18:13:38 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-01-30 18:13:38 +0000 |
commit | 2eb25c996f78f171b9e185efef03146c255a8fd3 (patch) | |
tree | 20a494200ab76bd7070241c194f068ab7fa259ff | |
parent | f34ff0a86757211b63e07b9af6f912d0bd126d80 (diff) | |
download | perl-2eb25c996f78f171b9e185efef03146c255a8fd3.tar.gz |
Integrate changes #8608,8609,8610,8611,8612,8613 from maintperl.
perl's internal variables are not for public consumption,
move their docs from perlapi.pod to perlintern.pod
support for -Dusethreads build under HP-UX 10.20 and DCE threads
library (11.0 and later have pthreads but 10.x don't)
avoid uninitialized value warnings
canonicalize paths when doing chdir() on windows (or Cwd::getcwd()
gets weird results)
perldoc nit on windows
make it possible to run the tests outside the source tree
(there's still a dependency on ../lib being the library
location)
p4raw-link: @8612 on //depot/maint-5.6/perl: 21b80573951053245624647c6ea0077acae22b99
p4raw-link: @8611 on //depot/maint-5.6/perl: 706e8e4d2d0a6985197cb1cb76dc3d2575cd159e
p4raw-link: @8610 on //depot/maint-5.6/perl: fc1aae957f18d75529c72450055ab0d424b7d318
p4raw-link: @8609 on //depot/maint-5.6/perl: 13b98125bf15a4dfacaa2c6f56d3742c97180500
p4raw-link: @8608 on //depot/maint-5.6/perl: f893c726cdaa1ccdec167db9b2ff5c2fdc19e29b
p4raw-id: //depot/perl@8614
p4raw-integrated: from //depot/maint-5.6/perl@8596 'copy in'
t/lib/dprof/V.pm t/op/flip.t utils/perldoc.PL (@8159..)
win32/bin/search.pl (@8166..) t/io/tell.t (@8175..)
hints/hpux.sh (@8601..) thread.h (@8606..) 'ignore'
pod/perlintern.pod (@7766..) pod/perlapi.pod (@8605..) 'merge
in' intrpvar.h t/base/term.t (@7895..) win32/vdir.h (@8156..)
thrdvar.h (@8602..) perlapi.c (@8606..)
-rw-r--r-- | hints/hpux.sh | 4 | ||||
-rw-r--r-- | intrpvar.h | 8 | ||||
-rw-r--r-- | pod/perlapi.pod | 86 | ||||
-rw-r--r-- | pod/perlintern.pod | 72 | ||||
-rwxr-xr-x | t/base/term.t | 2 | ||||
-rwxr-xr-x | t/io/tell.t | 4 | ||||
-rw-r--r-- | t/lib/dprof/V.pm | 5 | ||||
-rwxr-xr-x | t/op/flip.t | 2 | ||||
-rw-r--r-- | thrdvar.h | 6 | ||||
-rw-r--r-- | thread.h | 10 | ||||
-rw-r--r-- | utils/perldoc.PL | 5 | ||||
-rw-r--r-- | win32/bin/search.pl | 7 | ||||
-rw-r--r-- | win32/vdir.h | 8 |
13 files changed, 121 insertions, 98 deletions
diff --git a/hints/hpux.sh b/hints/hpux.sh index ca5c50b3b0..ddcb62feb0 100644 --- a/hints/hpux.sh +++ b/hints/hpux.sh @@ -348,9 +348,7 @@ EOM fi # HP-UX 10.X uses the old pthreads API - case "$d_oldpthreads" in - '') d_oldpthreads="$define" ;; - esac + d_oldpthreads="$define" # include libcma before all the others libswanted="cma $libswanted" diff --git a/intrpvar.h b/intrpvar.h index c9219041cc..8b2aa29321 100644 --- a/intrpvar.h +++ b/intrpvar.h @@ -34,7 +34,7 @@ PERLVAR(Iminus_F, bool) PERLVAR(Idoswitches, bool) /* -=for apidoc Amn|bool|PL_dowarn +=for apidoc mn|bool|PL_dowarn The C variable which corresponds to Perl's $^W warning variable. @@ -89,20 +89,20 @@ PERLVAR(IDBgv, GV *) PERLVAR(IDBline, GV *) /* -=for apidoc Amn|GV *|PL_DBsub +=for apidoc mn|GV *|PL_DBsub When Perl is run in debugging mode, with the B<-d> switch, this GV contains the SV which holds the name of the sub being debugged. This is the C variable which corresponds to Perl's $DB::sub variable. See C<PL_DBsingle>. -=for apidoc Amn|SV *|PL_DBsingle +=for apidoc mn|SV *|PL_DBsingle When Perl is run in debugging mode, with the B<-d> switch, this SV is a boolean which indicates whether subs are being single-stepped. Single-stepping is automatically turned on after every step. This is the C variable which corresponds to Perl's $DB::single variable. See C<PL_DBsub>. -=for apidoc Amn|SV *|PL_DBtrace +=for apidoc mn|SV *|PL_DBtrace Trace variable used when Perl is run in debugging mode, with the B<-d> switch. This is the C variable which corresponds to Perl's $DB::trace variable. See C<PL_DBsingle>. diff --git a/pod/perlapi.pod b/pod/perlapi.pod index 1828b55e29..60cb725cda 100644 --- a/pod/perlapi.pod +++ b/pod/perlapi.pod @@ -1482,60 +1482,6 @@ Tells a Perl interpreter to run. See L<perlembed>. =for hackers Found in file perl.c -=item PL_DBsingle - -When Perl is run in debugging mode, with the B<-d> switch, this SV is a -boolean which indicates whether subs are being single-stepped. -Single-stepping is automatically turned on after every step. This is the C -variable which corresponds to Perl's $DB::single variable. See -C<PL_DBsub>. - - SV * PL_DBsingle - -=for hackers -Found in file intrpvar.h - -=item PL_DBsub - -When Perl is run in debugging mode, with the B<-d> switch, this GV contains -the SV which holds the name of the sub being debugged. This is the C -variable which corresponds to Perl's $DB::sub variable. See -C<PL_DBsingle>. - - GV * PL_DBsub - -=for hackers -Found in file intrpvar.h - -=item PL_DBtrace - -Trace variable used when Perl is run in debugging mode, with the B<-d> -switch. This is the C variable which corresponds to Perl's $DB::trace -variable. See C<PL_DBsingle>. - - SV * PL_DBtrace - -=for hackers -Found in file intrpvar.h - -=item PL_dowarn - -The C variable which corresponds to Perl's $^W warning variable. - - bool PL_dowarn - -=for hackers -Found in file intrpvar.h - -=item PL_last_in_gv - -The GV which was last used for a filehandle input operation. (C<< <FH> >>) - - GV* PL_last_in_gv - -=for hackers -Found in file thrdvar.h - =item PL_modglobal C<PL_modglobal> is a general purpose, interpreter global HV for use by @@ -1561,24 +1507,6 @@ C<SvPV_nolen> macro. =for hackers Found in file thrdvar.h -=item PL_ofs_sv - -The output field separator - C<$,> in Perl space. - - SV* PL_ofs_sv - -=for hackers -Found in file thrdvar.h - -=item PL_rs - -The input record separator - C<$/> in Perl space. - - SV* PL_rs - -=for hackers -Found in file thrdvar.h - =item PL_sv_no This is the C<false> SV. See C<PL_sv_yes>. Always refer to this as @@ -2437,19 +2365,19 @@ false, defined or undefined. Does not handle 'get' magic. =for hackers Found in file sv.h -=item SvTYPE - -Returns the type of the SV. See C<svtype>. +=item svtype - svtype SvTYPE(SV* sv) +An enum of flags for Perl types. These are found in the file B<sv.h> +in the C<svtype> enum. Test these flags with the C<SvTYPE> macro. =for hackers Found in file sv.h -=item svtype +=item SvTYPE -An enum of flags for Perl types. These are found in the file B<sv.h> -in the C<svtype> enum. Test these flags with the C<SvTYPE> macro. +Returns the type of the SV. See C<svtype>. + + svtype SvTYPE(SV* sv) =for hackers Found in file sv.h diff --git a/pod/perlintern.pod b/pod/perlintern.pod index 6af18b507c..8bfe5a3cd3 100644 --- a/pod/perlintern.pod +++ b/pod/perlintern.pod @@ -46,6 +46,78 @@ True if this op will be the return value of an lvalue subroutine =for hackers Found in file pp.h +=item PL_DBsingle + +When Perl is run in debugging mode, with the B<-d> switch, this SV is a +boolean which indicates whether subs are being single-stepped. +Single-stepping is automatically turned on after every step. This is the C +variable which corresponds to Perl's $DB::single variable. See +C<PL_DBsub>. + + SV * PL_DBsingle + +=for hackers +Found in file intrpvar.h + +=item PL_DBsub + +When Perl is run in debugging mode, with the B<-d> switch, this GV contains +the SV which holds the name of the sub being debugged. This is the C +variable which corresponds to Perl's $DB::sub variable. See +C<PL_DBsingle>. + + GV * PL_DBsub + +=for hackers +Found in file intrpvar.h + +=item PL_DBtrace + +Trace variable used when Perl is run in debugging mode, with the B<-d> +switch. This is the C variable which corresponds to Perl's $DB::trace +variable. See C<PL_DBsingle>. + + SV * PL_DBtrace + +=for hackers +Found in file intrpvar.h + +=item PL_dowarn + +The C variable which corresponds to Perl's $^W warning variable. + + bool PL_dowarn + +=for hackers +Found in file intrpvar.h + +=item PL_last_in_gv + +The GV which was last used for a filehandle input operation. (C<< <FH> >>) + + GV* PL_last_in_gv + +=for hackers +Found in file thrdvar.h + +=item PL_ofs_sv + +The output field separator - C<$,> in Perl space. + + SV* PL_ofs_sv + +=for hackers +Found in file thrdvar.h + +=item PL_rs + +The input record separator - C<$/> in Perl space. + + SV* PL_rs + +=for hackers +Found in file thrdvar.h + =item start_glob Function called by C<do_readline> to spawn a glob (or do the glob inside diff --git a/t/base/term.t b/t/base/term.t index 49df11fa31..061cd33b1e 100755 --- a/t/base/term.t +++ b/t/base/term.t @@ -48,5 +48,5 @@ else { die "/dev/null IS NOT A CHARACTER SPECIAL FILE!!!!\n" unless -c '/dev/null'; } -open(try, "../Configure") || (die "Can't open ../Configure."); +open(try, "harness") || (die "Can't open harness."); if (<try> ne '') {print "ok 7\n";} else {print "not ok 7\n";} diff --git a/t/io/tell.t b/t/io/tell.t index 560836d5e0..c840c9232a 100755 --- a/t/io/tell.t +++ b/t/io/tell.t @@ -9,7 +9,7 @@ $TST = 'tst'; $Is_Dosish = ($^O eq 'MSWin32' or $^O eq 'dos' or $^O eq 'os2' or $^O eq 'mint' or $^O eq 'cygwin'); -open($TST, '../Configure') || (die "Can't open ../Configure"); +open($TST, 'harness') || (die "Can't open harness"); binmode $TST if $Is_Dosish; if (eof(tst)) { print "not ok 1\n"; } else { print "ok 1\n"; } @@ -49,7 +49,7 @@ unless (eof) { print "not ok 13\n"; } else { print "ok 13\n"; } if ($. == 0) { print "not ok 14\n"; } else { print "ok 14\n"; } $curline = $.; -open(other, '../Configure') || (die "Can't open ../Configure"); +open(other, 'harness') || (die "Can't open harness: $!"); binmode other if $^O eq 'MSWin32'; { diff --git a/t/lib/dprof/V.pm b/t/lib/dprof/V.pm index cbdeca4eda..152cddc253 100644 --- a/t/lib/dprof/V.pm +++ b/t/lib/dprof/V.pm @@ -17,7 +17,10 @@ $dpp .= '.com' if $^O eq 'VMS'; print "\nperl: $perl\n" if $opt_v; if( ! -f $perl ){ die "Where's Perl?" } -if( ! -f $dpp ){ die "Where's dprofpp?" } +if( ! -f $dpp ) { + ($dpp = $^X) =~ s@(^.*)[/|\\].*@$1/dprofpp@; + die "Where's dprofpp?" if( ! -f $dpp ); +} sub dprofpp { my $switches = shift; diff --git a/t/op/flip.t b/t/op/flip.t index f66af27d4d..99b22eff94 100755 --- a/t/op/flip.t +++ b/t/op/flip.t @@ -17,7 +17,7 @@ if ($y eq '12E0123E0') {print "ok 7\n";} else {print "not ok 7\n";} @a = ('a','b','c','d','e','f','g'); -open(of,'../Configure'); +open(of,'harness') or die "Can't open harness: $!"; while (<of>) { (3 .. 5) && ($foo .= $_); } @@ -84,15 +84,15 @@ PERLVAR(Tcurpm, PMOP *) /* what to do \ interps in REs from */ PERLVAR(Tnrs, SV *) /* -=for apidoc Amn|SV*|PL_rs +=for apidoc mn|SV*|PL_rs The input record separator - C<$/> in Perl space. -=for apidoc Amn|GV*|PL_last_in_gv +=for apidoc mn|GV*|PL_last_in_gv The GV which was last used for a filehandle input operation. (C<< <FH> >>) -=for apidoc Amn|SV*|PL_ofs_sv +=for apidoc mn|SV*|PL_ofs_sv The output field separator - C<$,> in Perl space. @@ -32,13 +32,23 @@ # define pthread_mutexattr_init(a) pthread_mutexattr_create(a) # define pthread_mutexattr_settype(a,t) pthread_mutexattr_setkind_np(a,t) # endif +# if defined(__hpux) && defined(__ux_version) && __ux_version <= 1020 +# define pthread_attr_init(a) pthread_attr_create(a) + /* XXX pthread_setdetach_np() missing in DCE threads on HP-UX 10.20 */ +# define PTHREAD_CREATE(t,a,s,d) pthread_create(t,a,s,d) +# define pthread_key_create(k,d) pthread_keycreate(k,(pthread_destructor_t)(d)) +# define pthread_mutexattr_init(a) pthread_mutexattr_create(a) +# define pthread_mutexattr_settype(a,t) pthread_mutexattr_setkind_np(a,t) +# endif # if defined(DJGPP) || defined(__OPEN_VM) # define PTHREAD_ATTR_SETDETACHSTATE(a,s) pthread_attr_setdetachstate(a,&(s)) # define YIELD pthread_yield(NULL) # endif # endif +# if !defined(__hpux) || !defined(__ux_version) || __ux_version > 1020 # define pthread_mutexattr_default NULL # define pthread_condattr_default NULL +# endif #endif #ifndef PTHREAD_CREATE diff --git a/utils/perldoc.PL b/utils/perldoc.PL index 313be205dd..be2435f745 100644 --- a/utils/perldoc.PL +++ b/utils/perldoc.PL @@ -559,7 +559,10 @@ eval q{ sub END { cleanup($tmp, $buffer) } 1; } || die; -eval q{ use sigtrap qw(die INT TERM HUP QUIT) }; + +# exit/die in a windows sighandler is dangerous, so let it do the +# default thing, which is to exit +eval q{ use sigtrap qw(die INT TERM HUP QUIT) } unless $^O eq 'MSWin32'; if ($opt_m) { foreach my $pager (@pagers) { diff --git a/win32/bin/search.pl b/win32/bin/search.pl index 5c3d65e06e..f647b8426f 100644 --- a/win32/bin/search.pl +++ b/win32/bin/search.pl @@ -47,7 +47,12 @@ $version = "950918.5"; $stripped=0; &init; -$rc_file = join('/', $ENV{'HOME'}, ".search"); +if (exists $ENV{'HOME'}) { + $rc_file = join('/', $ENV{'HOME'}, ".search"); +} +else { + $rc_file = ""; +} &check_args; diff --git a/win32/vdir.h b/win32/vdir.h index af769f1549..2dd7e34cc6 100644 --- a/win32/vdir.h +++ b/win32/vdir.h @@ -452,7 +452,9 @@ int VDir::SetCurrentDirectoryA(char *lpBuffer) DWORD r = GetFileAttributesA(pPtr); if ((r != 0xffffffff) && (r & FILE_ATTRIBUTE_DIRECTORY)) { - SetDefaultDirA(pPtr, DriveIndex(pPtr[0])); + char szBuffer[(MAX_PATH+1)*2]; + DoGetFullPathNameA(pPtr, sizeof(szBuffer), szBuffer); + SetDefaultDirA(szBuffer, DriveIndex(szBuffer[0])); nRet = 0; } @@ -677,7 +679,9 @@ int VDir::SetCurrentDirectoryW(WCHAR *lpBuffer) DWORD r = GetFileAttributesW(pPtr); if ((r != 0xffffffff) && (r & FILE_ATTRIBUTE_DIRECTORY)) { - SetDefaultDirW(pPtr, DriveIndex((char)pPtr[0])); + WCHAR wBuffer[(MAX_PATH+1)*2]; + DoGetFullPathNameW(pPtr, (sizeof(wBuffer)/sizeof(WCHAR)), wBuffer); + SetDefaultDirW(wBuffer, DriveIndex((char)wBuffer[0])); nRet = 0; } |