summaryrefslogtreecommitdiff
path: root/pp_sys.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix compiler warnings:Jerry D. Hedden2009-11-131-5/+5
| | | | | | | | | | | pp_sys.c: In function `Perl_pp_tie': pp_sys.c:788: warning: 'gv' might be used uninitialized in this function pp_sys.c: In function `Perl_pp_dbmopen': pp_sys.c:936: warning: 'gv' might be used uninitialized in this function pp_sys.c: In function `Perl_pp_enterwrite': pp_sys.c:1274: warning: 'cv' might be used uninitialized in this function pp_sys.c: In function `Perl_pp_ghostent': pp_sys.c:4711: warning: 'hent' might be used uninitialized in this function
* flock() should return EWOULDBLOCK instead of EAGAIN.Jan Dubois2009-11-121-1/+5
| | | | | | | POSIX requires fcntl() to return EAGAIN or EACCES, whereas BSD requires flock() to return EWOULDBLOCK. On most systems EAGAIN and EWOULDBLOCK use the same number, but on some (e.g. Linux on PA-RISC) they do not.
* Add ENTER_with_name and LEAVE_with_name to automaticly check for matching ↵Gerard Goossen2009-11-121-17/+17
| | | | ENTER/LEAVE when debugging is enabled
* SvREFCNT_dec already checks if the SV is non-NULL (continued)Vincent Pit2009-11-081-2/+1
|
* Add a "return NORMAL" to a DIE at the end of a function to prevent compiler ↵Gerard Goossen2009-11-061-0/+51
| | | | warnings (the "return NORMAL"s are never reached).
* move JMPENV_JUMP to die_where and mark it as "noreturn"Gerard Goossen2009-11-061-0/+1
|
* Allow syswrite with offset same as length of string [perl #70095]Gisle Aas2009-10-291-1/+1
| | | | | | You are not really outside of the string then, but the effect will always be a noop since the number of bytes written will be capped to not exceed the length of the string as for other offsets.
* Enable deprecation warnings by default.Nicholas Clark2009-10-161-4/+6
|
* Add Perl_ck_warner(), which combines Perl_ckwarn() and Perl_warner().Nicholas Clark2009-10-121-43/+30
| | | | | | | Replace ckWARN{,2,3,4}() && Perl_warner() with it, which trades reduced code size (about 0.2%), for 1 more function call if warnings are not enabled. However, if we're now in the L1 or L2 cache when we weren't previously, that's still going to be a speed win.
* Let tell() report warnings on unopened filehandlesRafael Garcia-Suarez2009-10-081-1/+1
| | | | (fixes a bug introduced by previous patch)
* Make tell() fail properly if called without an argument and when no previous ↵Rafael Garcia-Suarez2009-10-081-0/+6
| | | | | | | file was read This makes tell() return -1, and sets errno to EBADF, thus restoring the 5.8.x behaviour
* syswrite prints garbage if called with empty scalar and non-zero offsetchromatic2009-07-271-1/+1
|
* Remove all the 5005threads specific mutex macros, which are now vestigial.Nicholas Clark2009-05-211-2/+0
|
* Remove all #ifdef MACOS_TRADITIONAL code in core and non-dual-life XS code.Nicholas Clark2009-04-271-2/+2
| | | | | | | | (MacOS support was removed from MakeMaker in 6.22, and merged to blead on 15th December 2004 with 5dca256ec738057dc331fb644a93eca44ad5fa14. After this point MacOS wouldn't even have been able to build the perl binary, because it would not have been able to build DynaLoader. If anyone wishes to resurrect MacOS, start by reversing this commit and the relevant part of that commit.)
* Make time64 use NV for time_t, I32 for year, not Quad_t.Craig A. Berry2009-04-251-29/+2
| | | | | | | This means it should run on anything that does not have a 64-bit integer type available but does have a double. Presumably this includes platforms that define PERL_MICRO, so we now use the same extended time implementation for everything that runs Perl.
* GvUNIQUE* have been defined as 0 since 2005/06/30 - high time to remove them.Nicholas Clark2009-04-131-5/+0
|
* Merge commit 'mauzo/over-X' into bleadRafael Garcia-Suarez2009-03-271-2/+52
|\
| * -l was missing an SPAGAIN.Ben Morrow2009-03-251-1/+3
| |
| * Stacked overloaded -X.Ben Morrow2009-03-251-36/+33
| |
| * Finish the rest of the -X ops.Ben Morrow2009-03-251-2/+40
| |
| * Move magic logic into tryAMAGICftest macro.Ben Morrow2009-03-251-11/+1
| |
| * Call -X magic from pp_ftread.Ben Morrow2009-03-251-1/+24
| |
* | Namespace clean-up for time64.Craig A. Berry2009-03-261-2/+2
|/ | | | | | | | | | | | | | | | | | | | All of the time64 functions are only visible within pp_sys.c and are not part of the public API, so make them all static and give them the S_ prefix. A side effect of this is that we now unambiguously use S_localtime64_r and S_gmtime64_r and should no longer collide with system-supplied versions, if any. One possible future direction is that if and when Configure detects any system-supplied *time64_r functions, their prototypes, and their valid time ranges, we could optionally select those instead of the home-grown ones. Another possible future direction is that we could s/S_/Perl_/ and make the *time64_r functions part of the public API in some post-5.10.x release. Currently they are only exposed to the outside world via Perl_pp_gmtime. Also gave some TRACE macros more specific names.
* Ignore the decimal part of any floating point argument passed to localtime ↵Rafael Garcia-Suarez2009-03-131-1/+1
| | | | | | | or gmtime That way the overload warning won't be emitted for non-overflowing floating point values.
* Make overflow warnings in gmtime/localtime only occur when warnings are onRafael Garcia-Suarez2009-03-131-2/+2
|
* Fixing the cast for the result of (getgrent())->gr_gidDavid M. Syzdek2009-03-071-0/+8
| | | | | | | | | | The gr_gid member of struct group is being cast as an int even if system uses an unsigned int. This patch tests for the use of an unsigned int for the gr_gid member and casts the value as appropiate. Created with Arthur Corliss <corliss@corliss@digitalmages.com>. Signed-off-by: David M. Syzdek <david@syzdek.net>
* Skip time64 when there is no 64-bit integer type available.Craig A. Berry2009-02-201-3/+3
| | | | | | | | | | The y2038 code currently requires that a 64-bit integer type be available, so the build falls down hard if we try to use it where there isn't one. A better fix might be to try NV for time_t and a 32-bit integer for year. N.B. We test for the definedness of Quad_t rather than HAS_QUAD since the latter is explicitly undef'd in the case where 64-bit types are available but are not being used for Perl's IV and UV.
* pp_send() doesn't need to allocate 1000 stack slots for syswrite ↵Vincent Pit2009-02-071-3/+2
| | | | $tiedhandle, $buf
* setpgrp() should extend the stack before modifying itNiko Tyni2009-02-041-0/+1
| | | | | As reported by Marcin Owsiany in <http://bugs.debian.org/512796>, invoking setpgrp without any arguments could corrupt the stack.
* Revert "do_exec() is a mathom, so call its replacement directly"Gisle Aas2009-01-291-1/+1
| | | | | | | The change breaks the build on Windows as this function is really only a mathom when PERL_DEFAULT_DO_EXEC3_IMPLEMENTATION is defined. This reverts commit 06ba78de6df7f363272e855cc63710a634eb6100.
* do_exec() is a mathom, so call its replacement directlyGisle Aas2009-01-291-1/+1
|
* microperl has no idea about 64 bit types, so don't use the y2038 code for it.Nicholas Clark2009-01-251-2/+25
|
* consting goodness for time64Robin Barker2009-01-181-1/+1
|
* Merge branch 'schwern/y2038' into bleadRafael Garcia-Suarez2009-01-031-85/+58
|\ | | | | | | | | | | | | | | Conflicts: lib/Time/Local.pm lib/Time/Local.t reentr.h
| * Fix gmtime() and localtime() so they can pop times larger than 2**55 off the ↵Michael G. Schwern2009-01-031-7/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | stack. Neither POPn nor SvNVx work when casted to (Time64_T). Had to use a double and then cast. Also POPq uses an SvIV so that's no good. This causes an unfortunate loss in accuracy near 2**63 up to 8 minutes. %lld is broken, it uses regular integers. Need to use doubles and %.0f instead, again losing accuracy. Now things can go out to 2**63-512.
| * Fix pulling a large time off the stack by using a real double. What I really ↵Michael G. Schwern2009-01-031-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | need is SvQV. Fix list context with large years. List context can now go to 2**63-513. I don't know why that's not 2**63-1 but I'll take it. Maybe double imprecision. Scalar context with large years still busted. It appears to be something inside Perl_newSVpvf().
| * Remove the AIX work around code. Instead it should just set it's ↵Michael G. Schwern2009-01-031-52/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LOCALTIME_MAX to 0x7fff573e. Update from y2038. Use the new TM64 struct so years can go out past y2**31 Defines a Year type to avoid converting years to ints. Remove the TIMGM work around code, using timegm64() is fine and it saves us from having to convert from TM to tm. Make functions private with static rather than the _foo convention. Even faster for distant dates.
| * Rename localtime64.[ch] to time64.[ch] to mirror change in y2038, and the ↵Michael G. Schwern2009-01-031-2/+2
| | | | | | | | file isn't about just localtime() anymore.
| * Fix the overflow warning to just check for an error.Michael G Schwern2009-01-031-2/+4
| | | | | | | | Fix the overflow warning to identify the right op.
| * Patch in a 64 bit clean gmtime_r() and localtime_r() from the y2038 project. ↵Michael G Schwern2009-01-031-34/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | http://y2038.googlecode.com/ so Perl is no longer subject to the y2038 bug. Use Quad_t for our 64 bit time_t replacement. Temporarily through out the "broken localtime work around". That will have to be integrated into localtime64_r(). Fix Time::Local to handle the new expanded date range. "use integer" had to go as it pegged scalars to 32 bit integers which aren't large enough to hold the new time range. There are probably portability issues. timegm, for example, is not portable. Also the assumption that "long" is 64 bits is probably wrong.
* | [perl #60978] [PATCH] Tied filehandles can't distinguish eof formsChip Salzenberg2008-12-111-38/+47
| | | | | | | | | | Message-ID: <20081210224524.GD18817@tytlal.topaz.cx> p4raw-id: //depot/perl@35074
* | standardize save/restore of errno & vaxc$errnoChip Salzenberg2008-12-051-4/+4
| | | | | | | | | | Message-ID: <20081127070141.GD17663@tytlal.topaz.cx> p4raw-id: //depot/perl@35018
* | Promote Perl_setdefout() to the public API.Nicholas Clark2008-11-241-0/+11
| | | | | | p4raw-id: //depot/perl@34904
* | PATCH: Large omnibus patch to clean up the JRRT quotesTom Christiansen2008-11-021-0/+2
| | | | | | | | | | | | Message-ID: <25940.1225611819@chthon> Date: Sun, 02 Nov 2008 01:43:39 -0600 p4raw-id: //depot/perl@34698
* | Explicitly specify some printf formats for constant strings.Rafael Garcia-Suarez2008-11-021-1/+1
| | | | | | | | | | | | This is mostly to silence gcc's warning, "format not a string literal and no format arguments". p4raw-id: //depot/perl@34694
* | Add MUTABLE_GV(), and eliminate (V *) casts in *.c.Nicholas Clark2008-10-311-47/+48
| | | | | | | | | | | | Can't easily do gv.h, as GvGP() (at least) needs to split into two macros - one const for reading, one non-const for writing. p4raw-id: //depot/perl@34679
* | Eliminate (SV *) casts from the rest of *.c, picking up one (further)Nicholas Clark2008-10-301-36/+36
| | | | | | | | | | erroneous const in dump.c. p4raw-id: //depot/perl@34675
* | The file test operators -s, -A, -C and -M can return false valuesRafael Garcia-Suarez2008-10-301-1/+1
| | | | | | | | | | | | that are not undef or "no". Take that into account when stacking them. This fixes bug #60214. p4raw-id: //depot/perl@34660
* | Add MUTABLE_IO(), and eliminate (IO *) casts in *.c.Nicholas Clark2008-10-291-2/+2
| | | | | | p4raw-id: //depot/perl@34654
* | Use pvs macros instead of pvn where possible.Marcus Holland-Moritz2008-10-291-7/+7
| | | | | | p4raw-id: //depot/perl@34653