summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Remove gete?[ug]id cachingavar/remove-get-uid-cachingÆvar Arnfjörð Bjarmason2012-02-1414-121/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently we cache the UID/GID and effective UID/GID similarly to how we used to cache getpid() before v5.14.0-251-g0e21945. Remove this magical behavior in favor of always calling getpid(), getgid() etc. This resolves RT #96208. A minimal testcase for this is the following by Leon Timmermans attached to RT #96208: eval { require 'syscall.ph'; 1 } or eval { require 'sys/syscall.ph'; 1 } or die $@; if (syscall(&SYS_setuid, $ARGV[0] + 0 || 1000) >= 0 or die "$!") { printf "\$< = %d, getuid = %d\n", $<, syscall(&SYS_getuid); } I.e. if we call the sete?[ug]id() functions unbeknownst to perl the $<, $>, $( and $) variables won't be updated. This results in the same sort of issues we had with $$ before v5.14.0-251-g0e21945, and getppid() before my "Further eliminate POSIX-emulation under LinuxThreads" patch. I'm completely eliminating the PL_egid, PL_euid, PL_gid and PL_uid variables as part of this patch, this will break some CPAN modules, but it'll be really easy before the v5.16.0 final to reinstate them. I'd like to remove them to see what breaks, and how easy it is to fix it. The new PL_delaymagic_(egid|euid|gid|uid) variables I'm adding are only intended to be used internally in the interpreter to facilitate the delaymagic in sassign. There's probably some way not to export these to programs that embed perl, but I haven't found out how to do that. I don't *think* this has any bugs, but I haven't extensively tested it, and it seems there's no extensive tests for these variables in our test suite, this needs to be fixed before this patch goes into blead.
* VMS does have strptime.Craig A. Berry2012-02-121-1/+1
| | | | And has had since version 6.2 in 1995.
* Use the strptime() probe in POSIX.xs & testsÆvar Arnfjörð Bjarmason2012-02-122-58/+68
| | | | | | | | | | | | | | | | My merge of strptime() in v5.15.7-367-g0e58213 would break systems that didn't have strptime in the C library, use the probe H.Merijn Brand kindly provided in v5.15.7-370-g8852e31 to deal with that. Now we'll just croak on systems without strptime(3) if the POSIX::strptime() function is called, in the same way we croak for other unimplemented functions in there: $ ./perl -Ilib -MPOSIX=strptime -e 'strptime(qw/foo bar/)' POSIX::strptime not implemented on this architecture at -e line 1. This patch is best viewed with the -w option to show or git log, I've re-indented some code in time.t for the new SKIP block I've added.
* Add strptime probeH.Merijn Brand2012-02-1220-3/+41
|
* Cast around signedness warnings in POSIX's new strptime.Craig A. Berry2012-02-121-3/+3
|
* fix -DPERL_GLOBAL_STRUCT compilation error introduced in e8570548Tony Cook2012-02-121-0/+2
|
* Merge branch 'avar/POSIX-strptime' into bleadÆvar Arnfjörð Bjarmason2012-02-117-9/+311
|\ | | | | | | | | | | | | | | | | | | Merge my rebased version of Paul "LeoNerd" Evans's branch to blead after I'd cherry-picked the unrelated a748fe1 commit out of it. This may or may not be the perfect implementation of strptime, but it seems to work well enough for me, the bugs that have been raised against it have been addressed, and it's going to work a hell of a lot better than not having any strptime support at all.
| * More obvious variable names and neater code in strptime()Paul "LeoNerd" Evans2012-02-111-13/+19
| |
| * str_offset ought to be a STRLEN, not an intPaul "LeoNerd" Evans2012-02-111-1/+1
| |
| * If strptime() is called with UTf-8 string but legacy format, then downgrade ↵Paul "LeoNerd" Evans2012-02-112-9/+38
| | | | | | | | the string to match; taking care to handle pos() counts both sides
| * If strptime() is called with legacy string but UTF-8 format, then upgrade ↵Paul "LeoNerd" Evans2012-02-112-2/+47
| | | | | | | | the string to match; taking care to handle pos() counts both sides
| * Small refactor of string offset code in POSIX::strptime() to hopefully ↵Paul "LeoNerd" Evans2012-02-111-8/+8
| | | | | | | | better handle mixed UTF-8/non between str and fmt
| * When strptime() receives a reference, ensure it's a mutable scalarPaul "LeoNerd" Evans2012-02-112-2/+26
| |
| * Yield -1 as undef from POSIX::strptime(); ensure that mktime() isn't biased ↵Paul "LeoNerd" Evans2012-02-112-10/+23
| | | | | | | | by sec/min/hour = -1
| * Actually implement @EXPORT_OK of strptime correctly; delete'ing an undef ↵Paul "LeoNerd" Evans2012-02-112-3/+6
| | | | | | | | element yields false so ... and push ... would never have worked
| * Solaris needs _STRPTIME_DONTZERO in order not to zero out all the untouched ↵Paul "LeoNerd" Evans2012-02-111-0/+3
| | | | | | | | fields in strptime(3)
| * Fix ext/POSIX/t/time.t test 17's name to be a) unique, and b) factually accuratePaul "LeoNerd" Evans2012-02-111-1/+1
| |
| * Remember to init_tm() the struct tm before strptime()ing it; a workaround ↵Paul "LeoNerd" Evans2012-02-111-0/+1
| | | | | | | | for some architectures that have extra fields
| * Detect failure of mktime(), return errorPaul "LeoNerd" Evans2012-02-111-2/+4
| |
| * Don't use 1906 to test strptime/mktime because it yields a negative time_t valuePaul "LeoNerd" Evans2012-02-111-2/+3
| |
| * Bump version number in POSIX.pmPaul "LeoNerd" Evans2012-02-111-1/+1
| |
| * Added some docs about new POSIX::strptime()Paul "LeoNerd" Evans2012-02-111-0/+59
| |
| * mktime() before returning result from strptime(), to ensure wday/yday/isdst ↵Paul "LeoNerd" Evans2012-02-112-7/+13
| | | | | | | | fields are correct
| * Accept strptime \$str, "format" to use/set pos() magic at parsing positionPaul "LeoNerd" Evans2012-02-112-3/+45
| |
| * Initial hack at strptime(); just literal strings for nowPaul "LeoNerd" Evans2012-02-114-6/+66
|/
* Ammend comment referring to init_tm() to point to its correct locationPaul "LeoNerd" Evans2012-02-111-1/+1
|
* perldelta: Note is_utf8_char_buf() and is_utf8_char()Karl Williamson2012-02-111-0/+19
|
* Change =head1 to =head2 in perldeltaKarl Williamson2012-02-111-1/+1
|
* Deprecate is_utf8_char()Karl Williamson2012-02-113-4/+9
| | | | | | | This function assumes that there is enough space in the buffer to read however many bytes are indicated by the first byte in the alleged UTF-8 encoded string. This may not be true, and so it can read beyond the buffer end. is_utf8_char_buf() should be used instead.
* Add is_utf8_char_buf()Karl Williamson2012-02-114-8/+54
| | | | | | | | | | This function is to replace is_utf8_char(), and requires an extra parameter to ensure that it doesn't read beyond the end of the buffer. Convert is_utf8_char() and the only place in the Perl core to use the new one, assuming in each that there is enough space. Thanks to Jarkko Hietaniemi for suggesting this function name
* ExtUtils::Install: Fix POD errorDominic Hargreaves2012-02-112-5/+7
|
* Term-Cap/Cap.pm: Fix POD errorsDominic Hargreaves2012-02-111-2/+2
|
* intrpvar.h: Rmv no longer used PL_ variableKarl Williamson2012-02-112-3/+0
| | | | | Commit 24caacbccae7b938deecdcc3f13dd66c9c6a684e removed all uses of this variable, but failed to remove it.
* regcomp.c: /[[:lower:]]/i should match the same as /\p{Lower}/iKarl Williamson2012-02-117-6/+45
| | | | | | Same for [[:upper:]] and \p{Upper}. These were matching instead all of [[:alpha:]] or \p{Alpha}. What /\p{Lower}/i and /\p{Upper}/i match instead is \p{Cased}, and so that is what these should match.
* General-purpose symbol shortening for VMS.Craig A. Berry2012-02-111-19/+108
| | | | | | | | | | | | | | | | | | | | | | | | Some folks like to write long sentences and then use them as variable names, which doesn't come up that often, but when it does, the build on VMS falls down hard if any of the resulting symbols is longer than 31 characters. The problem is not for the compiler, which when using /NAMES=SHORTENED (which we now do by default) will shorten the symbols, but for the linker, which must have an exact list of the symbol names to be exported when creating the perlshr.exe shareable image. That list of potentially shortened symbols goes in a linker options file created by vms/gen_shrfls.pl. Until now we had no recourse but to hard-code there a mapping of long symbols to shortened ones, but the AUTODIN-II polynomial used by the compiler to do the shortening is (partially) documented under the help for CC/NAMES, and it was possible to extrapolate from there and create a pure- Perl implementation that mimics precisely what the C compiler (and the C++ compiler under "extern C" declarations) use for shortening long symbol names. Symbols like Perl__it_was_the_best_of_times_it_was_the_worst_of_times can now be created freely without causing the VMS linker to seize up.
* regcomp.c: Remove outdated #undefKarl Williamson2012-02-111-1/+0
|
* mktables: Update comments, variable namesKarl Williamson2012-02-111-36/+38
| | | | | | | | | Commit d11155ec2b4e3f6cf952e2a25615aec506a8e296 changed the format of some of the generated tables, but I left some of the old comments and variable names the same in order to not make this already large commit bigger. This updates these to reflect the new format. It also refactors one 'if' statement to not use a block.
* regcomp.c: Remove duplicate inversion listKarl Williamson2012-02-114-34/+4
| | | | | \h and \p{XPosixBlank} contain the same code points, so there is no need to have both of them.
* handle conditional definition of PL_check_mutexZefram2012-02-111-0/+1
| | | | | PL_check_mutex only exists on threading builds, so makedef.pl needs to know about that conditionality to produce correct export lists.
* add wrap_op_checker() API functionZefram2012-02-1114-2/+180
| | | | | This function provides a convenient and thread-safe way for modules to hook op checking.
* restore ExtUtils-ParseXS portability to Perl 5.6Zefram2012-02-1111-38/+84
|
* update ExtUtils-ParseXS to CPAN version 3.15Zefram2012-02-1111-7/+15
| | | | | Ensure that every module in the ExtUtils-ParseXS distribution has a $VERSION.
* UCD.t: white-space onlyKarl Williamson2012-02-101-13/+13
| | | | This outdents some statements that are no longer enclosed in a block
* mktables: Fix up some comments in the generated filesKarl Williamson2012-02-101-9/+28
| | | | | These were incorrectly stating that some tables are accessible via Unicode::UCD, and giving the wrong name in some instances.
* Unicode::UCD::prop_invmap: Store Nv property as adjusted typeKarl Williamson2012-02-103-25/+41
| | | | | By converting this property to requiring adjustments to get the proper values, its storage size decreases by more than half.
* Unicode::UCD::prop_invmap(): New improved APIKarl Williamson2012-02-104-208/+306
| | | | | | | | | | | | Thanks to Tony Cook for suggesting this. The API is changed from returning deltas of code points, to storing the actual correct values, but requiring adjustments for the non-initial elements in a range, as explained in the pod. This makes the data less confusing to look at, and gets rid of inconsistencies if we didn't make the same sort of deltas for entries that were, e.g. arrays of code points.
* Unicode::UCD: move common directory to subroutineKarl Williamson2012-02-101-15/+11
| | | | | | | All the files that should ever be read by the subroutine will be found in the unicore directory, so can specify it in the subroutine instead of in each call to it. This makes things slightly easier in future commits.
* Unicode::UCD: pod and comment nitsKarl Williamson2012-02-101-33/+30
| | | | | One comment is out-dated, also moves a line of code so that the comments flow better.
* Avoid null pointer dereference in tovmsspec.Craig A. Berry2012-02-091-2/+1
| | | | | | | Before 360732b5267d5, when dirend was either never set at all or set to NULL, the routine always returned early before executing the parts that look at dirend. But after that change it became possible to dereference a null dirend pointer. Let's not do that.
* perrebackslash, perlrecharclass: Note locale effectsKarl Williamson2012-02-092-7/+18
| | | | This adds text to specify what happens under 'use locale'.