summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Further eliminate POSIX-emulation under LinuxThreadsavar/remove-linuxthreads-pid-cachingÆvar Arnfjörð Bjarmason2012-02-1213-53/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Under POSIX threads the getpid() and getppid() functions return the same values across multiple threads, i.e. threads don't have their own PID's. This is not the case under the obsolete LinuxThreads where each thread has a different PID, so getpid() and getppid() will return different values across threads. Ever since the first perl 5.0 we've returned POSIX-consistent semantics for $$, until v5.14.0-251-g0e21945 when the getpid() cache was removed. In 5.8.1 Rafael added further explicit POSIX emulation in perl-5.8.0-133-g4d76a34 [1] by explicitly caching getppid(), so that multiple threads would always return the same value. I don't think all this effort to emulate POSIX sematics is worth it. I think $$ and getppid() are OS-level functions that should always return the same as their C equivalents. I shouldn't have to use a module like Linux::Pid to get the OS version of the return values. This is pretty much a complete non-issue in practice these days, LinuxThreads was a Linux 2.4 thread implementation that nobody maintains anymore[2], all modern Linux distros use NPTL threads which don't suffer from this discrepancy. Debian GNU/kFreeBSD does use LinuxThreads in the 6.0 release, but they too will be moving away from it in future releases. This caching makes it unnecessarily tedious to fork an embedded Perl interpreter. When someone that constructs an embedded perl interpreter and forks their application, the fork(2) system call isn't going to run Perl_pp_fork(), and thus the return value of $$ and getppid() doesn't reflect the current process. See [3] for a bug in uWSGI related to this, and Perl::AfterFork for XS code that you need to run after forking a PerlInterpreter unbeknownst to perl. We've already been failing the tests in t/op/getpid.t on these Linux systems that nobody apparently uses, the Debian GNU/kFreeBSD users did notice and filed #96270, this patch fixes that failure by changing the tests to test for different behavior under LinuxThreads, I've tested that this works on my Debian GNU/kFreeBSD 6.0.4 box. If this change is found to be unacceptable (i.e. we want to continue to emulate POSIX thread semantics for the sake of LinuxThreads) we also need to revert v5.14.0-251-g0e21945, because currently we're only emulating POSIX semantics for getppid(), not getpid(). This commit includes a change to embedvar.h made by "make regen_headers". 1. http://www.nntp.perl.org/group/perl.perl5.porters/2002/08/msg64603.html 2. http://pauillac.inria.fr/~xleroy/linuxthreads/ 3. http://projects.unbit.it/uwsgi/ticket/85
* 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'.
* Allow [[:blank:]] to work under localeKarl Williamson2012-02-093-5/+15
| | | | | | This takes advantage of the recently added Configure probe, and if the platform has an isblank library function, calls that under locale. This now matches the documentation
* Use system isascii() when available under localeKarl Williamson2012-02-093-2/+15
| | | | | | | We have code that assumes that ASCII should be locale dependent, but it was missing its final link. This supplies that, and makes the code work as documented. I thought it better to do that then to document yet another exception.