summaryrefslogtreecommitdiff
path: root/perlio.c
Commit message (Collapse)AuthorAgeFilesLines
* fileno() was failing when passed a NULL. I'm guessing that we don't really ↵Steve Peters2009-02-231-1/+3
| | | | need to increase the refcount on a NULL fd.
* Add get_cvs() as a shortcut for STR_WITH_LEN() and Perl_get_cvn_flags(), andNicholas Clark2009-01-211-1/+1
| | | | use it where possible.
* Silence compiler warning in perlio.cJerry D. Hedden2008-12-101-0/+2
| | | | | | From: "Jerry D. Hedden" <jdhedden@cpan.org> Message-ID: <1ff86f510812090909y11947acfy317e46417b9ae91d@mail.gmail.com> p4raw-id: //depot/perl@35073
* standardize save/restore of errno & vaxc$errnoChip Salzenberg2008-12-051-5/+5
| | | | | Message-ID: <20081127070141.GD17663@tytlal.topaz.cx> p4raw-id: //depot/perl@35018
* From change #34775, reverting perlio.c change for now. Also,Steve Peters2008-11-081-14/+3
| | | | | | setting the tests to TODO. p4raw-link: @34775 on //depot/perl: 2556f95e0f4f5e8e95c9766374614ab52edefe3d p4raw-id: //depot/perl@34778
* Re: [perl #56644] PerlIO resource leaks on open() and then :pop in :unix and ↵Goro Fuji2008-11-081-3/+14
| | | | | | | | :stdio From: "Goro Fuji" <gfuji@cpan.org> Message-ID: <efb9c59b0807061604q476025e9n85893f131a6bf23e@mail.gmail.com> p4raw-id: //depot/perl@34775
* [perl #54828] perlio.c has a problem (both 5.8 and 5.10) Goro Fuji2008-11-081-3/+1
| | | | | | | | | From: "Goro Fuji" (via RT) <perlbug-followup@perl.org> Message-ID: <rt-3.6.HEAD-11257-1211782242-1590.54828-75-0@perl.org> The second part of the patch. The first part was in change #33978. p4raw-link: @33978 on //depot/perl: 9d97e8b8cac47626e28c79994e7ab0d5c8589515 p4raw-id: //depot/perl@34774
* 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
* Add MUTABLE_GV(), and eliminate (V *) casts in *.c.Nicholas Clark2008-10-311-2/+2
| | | | | | 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-2/+2
| | | | | erroneous const in dump.c. p4raw-id: //depot/perl@34675
* Cope with brain damage in PerlIO::via, which will let you fclose() theNicholas Clark2008-10-261-1/+8
| | | | | | | same FILE * twice, thanks to it calling out to Perl space inside the close call tree, with the underlying PerlIO * already closed, but not unlinked. p4raw-id: //depot/perl@34596
* Update copyright years.Nicholas Clark2008-10-251-1/+1
| | | p4raw-id: //depot/perl@34585
* [perl #54828] perlio.c has a problem (both 5.8 and 5.10) Goro Fuji2008-06-011-1/+1
| | | | | | | | From: "Goro Fuji" (via RT) <perlbug-followup@perl.org> Message-ID: <rt-3.6.HEAD-11257-1211782242-1590.54828-75-0@perl.org> First chunk of the patch only p4raw-id: //depot/perl@33978
* Add two missing dVAR's.Marcus Holland-Moritz2008-04-131-0/+3
| | | p4raw-id: //depot/perl@33671
* Correct two spelling mistakes, and reformat some comments.Nicholas Clark2008-03-131-8/+8
| | | p4raw-id: //depot/perl@33504
* Change 33492 did not spread the protection wide enough. There wereNicholas Clark2008-03-121-13/+24
| | | | | | | | | | | | | still two more races to be lost. 1: The close() could still happen after the (premature) mutex release allowed another thread to dup() to that file descriptor. 2: The initial dup() could happen whilst another thread was in the mutex protected region, and had temporarily closed the file descriptor. Race conditions remain with any other thread that actually does I/O during the execution of the mutex protected region (as noted in a comment), and dup() failure is not handled gracefully (also noted). p4raw-id: //depot/perl@33498
* We need mutex protection in PerlIOStdio_close() for the duration ofNicholas Clark2008-03-121-1/+22
| | | | | | | | | | holding our true love file handle open, to stop anything else temporarily using it for a quick dup() fling, and then closing the file handle underneath us. I suspect that the lack of this protection was the cause of the threads free.t and blocks.t failures on OS X on 5.8.x, where usefaststdio is the default, and PerlIO is unable to "invalidate" the FILE *. p4raw-id: //depot/perl@33492
* Correct logic error in PerlIOStdio_close() - 0 is an acceptable valueNicholas Clark2008-03-121-2/+2
| | | | | from dup(), so it can't also be the "don't do anything later" value. p4raw-id: //depot/perl@33491
* Silence Borland compiler warnings (except for warnings from zlib) here:Steve Hay2008-02-251-1/+1
| | | | | http://www.nntp.perl.org/group/perl.daily-build.reports/2008/02/msg53937.html p4raw-id: //depot/perl@33370
* Unused var in perlio.c (revised)Jerry D. Hedden2008-02-131-0/+3
| | | | | | From: "Jerry D. Hedden" <jdhedden@cpan.org> Message-ID: <1ff86f510802120700q689fb457ya5939bb440626157@mail.gmail.com> p4raw-id: //depot/perl@33296
* assert() that every NN argument is not NULL. Otherwise we have theNicholas Clark2008-02-121-0/+6
| | | | | | | | | | | | ability to create landmines that will explode under someone in the future when they upgrade their compiler to one with better optimisation. We've already done this at least twice. (Yes, some of the assertions are after code that would already have SEGVd because it already deferences a pointer, but they are put in to make it easier to automate checking that each and every case is covered.) Add a tool, checkARGS_ASSERT.pl, to check that every case is covered. p4raw-id: //depot/perl@33291
* Remove an unneeded if statement.Steve Peters2008-02-081-3/+1
| | | p4raw-id: //depot/perl@33261
* Remove redundant checkRafael Garcia-Suarez2008-02-081-4/+2
| | | p4raw-id: //depot/perl@33248
* In XS_PerlIO_get_layers() take advantage of the implementation ofNicholas Clark2008-02-021-0/+5
| | | | | | PerlIO_get_layers(), by co-opting the new SVs it creates, rather than copying them. p4raw-id: //depot/perl@33182
* Disable debugging output in PerlIO_teardown;Dave Mitchell2007-11-071-0/+7
| | | | | it still relies on an interpreter being present. p4raw-id: //depot/perl@32235
* As reported in bug #46207, change 30633 to PerlIO_exportFILE() andNicholas Clark2007-11-051-1/+14
| | | | | | | | | | | | | PerlIO_releaseFILE() to manage the reference counts of fds correctly has the side effect of making some XS modules "leak" descriptors. This is because the typemap calls PerlIO_findFILE(), which sometimes (but not always) calls PerlIO_exportFILE(). To be consistent, PerlIO_fildFILE() needs to either always give you a reference, or always not give you a reference. It seems better to do the latter as the call to PerlIO_exportFILE() is only an implementation detail, so arrange for it to immediately free up the reference that PerlIO_exportFILE() created. p4raw-id: //depot/perl@32224
* Re: building mod_perl-2.0.3 with Perl 5.10.0 (DEVEL32096)Jarkko Hietaniemi2007-11-031-4/+11
| | | | | | | | Message-Id: <472BD128.9080105@iki.fi> PerlIO_teardown is called when there may no longer be an interpreter available p4raw-id: //depot/perl@32215
* Use vnewSVpvf() rather than sv_vcatpvf() onto a newly created emptyNicholas Clark2007-10-061-3/+3
| | | | | string. p4raw-id: //depot/perl@32044
* Directly create the SV with Perl_newSVpvf() rather than usingNicholas Clark2007-10-061-3/+2
| | | | | Perl_catSVpvf() to extend a zero-length SV. p4raw-id: //depot/perl@32042
* When dup'ing a filehandle, retain the :utf8 layerRafael Garcia-Suarez2007-03-301-0/+2
| | | p4raw-id: //depot/perl@30781
* PerlIO_exportFILE() and PerlIO_releaseFILE() should manage the fdNicholas Clark2007-03-191-0/+4
| | | | | reference counts correctly. p4raw-id: //depot/perl@30633
* PerlIO_importFILE() should increase the reference count on the fdNicholas Clark2007-03-171-0/+1
| | | | | | that it brings into PerlIO managed space. (A long standing problem reported by Steve Hay) p4raw-id: //depot/perl@30610
* Compilation warnings fixes by Jerry D. HeddenRafael Garcia-Suarez2007-03-031-0/+7
| | | p4raw-id: //depot/perl@30447
* perlio.c (PerlIO_tmpfile): fix memory leakAlexey Tourbin2007-02-241-1/+1
| | | | | Message-ID: <20070224114735.GA3454@localhost.localdomain> p4raw-id: //depot/perl@30389
* Split the storage of the layers specificied by open.pm into one hintNicholas Clark2007-02-171-20/+20
| | | | | | | for input, and one for output, as this better reflects how they are used. The original "concatenate with \0" plan was really only a compramise to avoid needing to increase every COP by 2 pointers. p4raw-id: //depot/perl@30334
* The last parameter to gv_stashpv/gv_stashpvn/gv_stashsv is a bitmaskNicholas Clark2007-01-251-1/+1
| | | | | of flags, not a boolean, so correct the documenation and callers. p4raw-id: //depot/perl@29977
* Re: Race condition in IPC::Open3 / Mac OS?Bo Lindbergh2007-01-201-3/+9
| | | | | Message-Id: <D256CF03-D814-4973-9DF6-60EA4F26FE10@hagernas.com> p4raw-id: //depot/perl@29894
* Add get_cvn_flags(), which is like get_cv() but takes a length. ThisNicholas Clark2007-01-151-1/+1
| | | | | allows symbolic code references with embeded NULs to work. p4raw-id: //depot/perl@29830
* Normalize copyright of perlio.c for years >= 2006Rafael Garcia-Suarez2007-01-051-1/+1
| | | p4raw-id: //depot/perl@29700
* Update copyright for perlio.cRafael Garcia-Suarez2007-01-051-3/+6
| | | p4raw-id: //depot/perl@29694
* Re: [PATCH] perlio.c repairBo Lindbergh2007-01-051-23/+26
| | | | | Message-Id: <E22DC961-6821-4AC2-BA2F-9B5B06927758@hagernas.com> p4raw-id: //depot/perl@29691
* 4th patch from: Marcus Holland-Moritz2007-01-041-5/+7
| | | | | | | | | Subject: [PATCH] Cleanup SVf arguments (2nd try) Message-ID: <20070101201613.4120d9ef@r2d2> Introduce an SVfARG() macro for %SVf (%-p here) arguments to perl's printf p4raw-id: //depot/perl@29687
* The first three patches from:Marcus Holland-Moritz2007-01-041-9/+9
| | | | | | | | Subject: [PATCH] Cleanup SVf arguments (2nd try) Message-ID: <20070101201613.4120d9ef@r2d2> Adds (void*) casts to %-p and %p printf arguments p4raw-id: //depot/perl@29686
* Symbian port: add Series 90 supportJarkko Hietaniemi2007-01-011-3/+1
| | | | | Message-ID: <4599114F.8020307@iki.fi> p4raw-id: //depot/perl@29650
* Re: When should PERL_SYS_TERM() be called? [was: Re: [PATCH] Re: [PATCH] Re: ↵Jarkko Hietaniemi2006-12-061-10/+6
| | | | | | | | | | | | | | | | | [PATCH] abstract mempool header testing] Message-ID: <4575DFD1.1060108@iki.fi> Fixes a problem spotted by Jan Dubois: The PerlMemShared pool is only shared between the interpreters that can share data structures (interpreters created by perl_clone(), which mean pseudo-fork, and threads.xs). The pool is not shared between interpreters that are created separately by perl_alloc(). [...] I guess this means PL_perlio_fd_refcnt needs to be allocated and freed by standard malloc() and not go through any abstraction. p4raw-id: //depot/perl@29477
* Re: When should PERL_SYS_TERM() be called? [was: Re: [PATCH] Re: [PATCH] Re: ↵Jarkko Hietaniemi2006-12-051-7/+7
| | | | | | | | | | | [PATCH] abstract mempool header testing] Message-ID: <4574ED1F.40508@iki.fi> Re-instates #29424 (previously reverted by #29451), now fixed to work with PERL_IMPLICIT_SYS, thanks to Jan Dubois. Also adds PERLIO_TERM to the Symbian port. p4raw-id: //depot/perl@29465
* Re: [PATCH] Re: [PATCH] Re: [PATCH] abstract mempool header testingYves Orton2006-12-031-12/+5
| | | | | Message-ID: <9b18b3110612020548l7c5aefd4m19cb0b5c4395abb4@mail.gmail.com> p4raw-id: //depot/perl@29442
* Tweaks needed to get Perl compiling with g++ on OpenBSD.Steve Peters2006-11-181-1/+1
| | | p4raw-id: //depot/perl@29313
* Initial cleanups to support compiling Win32 with MinGW g++.Steve Peters2006-10-301-1/+1
| | | p4raw-id: //depot/perl@29155
* Change the non-mkstemp, non-win32 code path of PerlIO_tmpfileCraig A. Berry2006-10-301-10/+3
| | | | | | to use PerlIO_fdopen so that when the tmpfile is closed we do not decrement a ref count that doesn't exist or is zero. p4raw-id: //depot/perl@29143