summaryrefslogtreecommitdiff
path: root/doio.c
Commit message (Collapse)AuthorAgeFilesLines
* Try to handle platforms that have O_TEXT != O_BINARY butJarkko Hietaniemi2001-12-111-1/+5
| | | | | | | which are not DOSish, BeOS being one of such platforms. Ideally this should be a Configure test, not a hardwired cpp symbol test... p4raw-id: //depot/perl@13621
* Allow multi-arg open() if opening layer declares this legal.Nick Ing-Simmons2001-12-081-6/+6
| | | p4raw-id: //depot/perlio@13530
* Various small nits found by DJGPP build.Jarkko Hietaniemi2001-12-021-4/+4
| | | p4raw-id: //depot/perl@13427
* Skip socket-ness tests on handles (e.g. PerlIO::Scalar) which do notNick Ing-Simmons2001-12-011-20/+28
| | | | | have file descriptors. Noticed a possibly worse problem in the process ... p4raw-id: //depot/perlio@13409
* doio slightly smallerNicholas Clark2001-11-271-5/+4
| | | | | Message-ID: <20011127004023.S37621@plum.flirble.org> p4raw-id: //depot/perl@13290
* Allow dup'ing of PerlIO::Scalar etc.Nick Ing-Simmons2001-11-181-13/+24
| | | p4raw-id: //depot/perlio@13072
* [PATCH] Doc spellcheck + podcheckAbhijit Menon-Sen2001-11-161-1/+1
| | | | | | | | | | | | | | | | | | From: Autrijus Tang <autrijus@egb.elixus.org> Date: Thu, 15 Nov 2001 22:49:05 -0800 Message-Id: <20011116064905.GA44092@egb.elixus.org> Subject: [PATCH] podcheck+spellcheck, the rest of the story From: Autrijus Tang <autrijus@egb.elixus.org> Date: Fri, 16 Nov 2001 00:42:20 -0800 Message-Id: <20011116084220.GA44295@egb.elixus.org> Subject: Re: [PATCH] podcheck+spellcheck, the rest of the story From: Nicholas Clark <nick@ccl4.org> Date: Fri, 16 Nov 2001 10:32:01 +0000 Message-Id: <20011116103200.F62891@plum.flirble.org> (Applied after suitable de-mangling.) p4raw-id: //depot/perl@13041
* open(FH, $file) should strip leading and trailing whitespace.Abhijit Menon-Sen2001-11-081-5/+7
| | | p4raw-id: //depot/perl@12896
* microperl sync.Jarkko Hietaniemi2001-11-021-0/+2
| | | p4raw-id: //depot/perl@12826
* Extract doio.c's open(2) mode to string conversion as PerlIO_intmod2str()Nick Ing-Simmons2001-10-201-40/+2
| | | | | Use for non-PERLIO fdupopen(). p4raw-id: //depot/perlio@12532
* Unix and VMS agree on "*" as a "match any number of any chars"Jarkko Hietaniemi2001-10-101-0/+2
| | | | | | | | wildcards, but differ ("?" vs. "%") for their "match any single char" wildcard. This patch changes "?" chars to "%" before doing a VMS glob...at no loss of functionality, since "?" isn't a valid filename char on VMS. From Charles Lane. p4raw-id: //depot/perl@12388
* Warning incorrectly reported without -wRafael Garcia-Suarez2001-08-151-1/+3
| | | | | Message-ID: <20010814212327.A1919@rafael> p4raw-id: //depot/perl@11673
* Integrate change #11051 from macperl; O_RDONLY is not zeroJarkko Hietaniemi2001-07-301-1/+1
| | | | | | | | | everywhere. p4raw-link: @11051 on //depot/perl: 497b47a829dd93323de2c7f4f6815ab9f23d6ada p4raw-id: //depot/perl@11503 p4raw-integrated: from //depot/maint-5.6/macperl@11502 'merge in' doio.c (@11007..)
* Security hole in taint checking in open()deekoo2001-07-191-0/+1
| | | | | Message-Id: <Pine.LNX.4.33.0107182248330.11996-100000@chaos.tentacle.net> p4raw-id: //depot/perl@11410
* Based onNicholas Clark2001-07-021-3/+32
| | | | | | | | Subject: Re: sizeof(struct sembuf) Message-ID: <20010701222648.W59620@plum.flirble.org> but do semop() always the slow way. p4raw-id: //depot/perl@11098
* [ID 20010625.009] open(FILE,"+foo") [PATCH]Robert Spier2001-06-281-0/+1
| | | | | Message-ID: <15162.41164.618712.841415@rls.cx> p4raw-id: //depot/perl@10999
* gcc -Wall nits picked out by a non-UNIX systemJarkko Hietaniemi2001-06-121-24/+28
| | | | | (courtesy of Mark Bixby) p4raw-id: //depot/perl@10524
* More -Wall sweeping.Jarkko Hietaniemi2001-05-301-4/+4
| | | p4raw-id: //depot/perl@10338
* Medley of -Wall cleanups from Michael Schwen, Hugo van der Sanden,Jarkko Hietaniemi2001-05-301-1/+2
| | | | | and Abhijit Menon-Sen. p4raw-id: //depot/perl@10321
* O_APPEND and O_TRUNC are not portable. (Not available e.g.Jarkko Hietaniemi2001-05-271-1/+8
| | | | | for microperl.) p4raw-id: //depot/perl@10233
* [PATCH] [ID 19991013.005] utime undef, undef, @files Robert Spier2001-05-271-5/+16
| | | | | | | | | | | Date: Sat, 26 May 2001 20:05:23 -0400 Message-ID: <15120.17603.148648.12430@rls.cx> Subject: Re: [PATCH] [ID 19991013.005] utime undef, undef, @files From: rspier@pobox.com (Robert Spier) Date: Sun, 27 May 2001 00:23:12 -0400 Message-ID: <15120.33072.511966.767230@rls.cx> p4raw-id: //depot/perl@10232
* PerlIO for VMSCraig A. Berry2001-05-261-4/+2
| | | | | Message-Id: <a05100e0ab734816701a5@[172.16.52.1]> p4raw-id: //depot/perl@10218
* Fix for ID 20010519.003: sysopen() wasn't tainting :-(Jarkko Hietaniemi2001-05-201-3/+5
| | | p4raw-id: //depot/perl@10172
* Multiplicity and thread fixes for VMSDan Sugalski2001-05-021-2/+2
| | | | | Message-Id: <5.0.2.1.0.20010502112909.01f24e28@24.8.96.48> p4raw-id: //depot/perl@9960
* Make the "STD* opened only for ..." errors more consistent.Jarkko Hietaniemi2001-04-231-3/+5
| | | p4raw-id: //depot/perl@9802
* Avoid core dump onNick Ing-Simmons2001-04-201-1/+4
| | | | | open(STDOUT,">",\$foo); p4raw-id: //depot/perlio@9766
* Downgrade "Wide character in print" to a warning.Nick Ing-Simmons2001-04-041-2/+5
| | | p4raw-id: //depot/perlio@9549
* Fix un-init variable leading to spurious "Out of Memory!"Nick Ing-Simmons2001-03-241-1/+1
| | | p4raw-id: //depot/perlio@9332
* Implement:Nick Ing-Simmons2001-03-241-2/+4
| | | | | | 1. open($fh,"+<",undef); # add test to t/io/open.t 2. open($fh,"+<",\$var); # New test t/lib/io_scalar.t p4raw-id: //depot/perlio@9318
* Check in a stable (working) version before next round of tweaks.Nick Ing-Simmons2001-03-231-28/+7
| | | | | | | | | | Changes include: - Move default layers code out of doio.c and into perlio.c - Single routine for parsing layer specification strings. - Skeleton support for demand loading of layers - Core-dump avoidance if PERLIO environment specifies loadable layer (does not _work_ as need IO to load and need load to do IO ...) p4raw-id: //depot/perlio@9313
* Avoid "reopen" semantics for time being. Fix bug in dup logic.Nick Ing-Simmons2001-03-231-13/+13
| | | | | | -Uuseperlio now works again. -Duseperlio is still poorly. Don't merge yet... p4raw-id: //depot/perlio@9303
* Snapshot of new PerlIO open scheme. Still buggy - mainly in ↵Nick Ing-Simmons2001-03-221-89/+99
| | | | | | | | | | | | | | | open($fh,">&STDOUT!") type code. - Invent PerlIO_openn() - which has "lots" of args a bit like do_openn() which is its main caller. In particular now has access to "extra" args, and can tell when an open handle is "reopened" (or duped?). - In -Duseperlio PerlIO_open() et. al. are now wrappers on PerlIO_openn(). - In -Uuseperlio (untested as yet) PerlIO_openn() is a wrapper on PerlIO_open() et. al. (i.e. other way round). - Collapse "vtable" entries for layers - was fdopen/open/reopen now just open with args close to PerlIO_openn(). p4raw-id: //depot/perlio@9302
* Give a meaning to '&' in n-arg open case:Nick Ing-Simmons2001-03-221-17/+25
| | | | | | | | | | | | | open($fh,"<&",$scalar); $scalar can be: - an integer which does "fdopen" open($fh,"<&",2); # like open($fh,"<&2") - something that will yield a file handle via sv_2io() useful for dup'ing anonymous handles. e.g.: open(my $fh,"<&",\*STDIN); open(my $dup,"<&",$fh); p4raw-id: //depot/perlio@9298
* If stdin, stdout or stderr get opened in unexpected read/write stateNick Ing-Simmons2001-03-221-3/+13
| | | | | then warn at time of open not at time of use. p4raw-id: //depot/perlio@9295
* Die on n-arg open(...,"",xxx,yyy,...)Nick Ing-Simmons2001-03-221-6/+30
| | | | | | - redirect pipe cases to PerlProc_popen_list() (which just croaks for now) - die on read/write cases so we can decide what it means later. p4raw-id: //depot/perlio@9294
* Re: sync sync sync: have I missed any patches?Radu Greab2001-03-021-3/+6
| | | | | | | | | | | Message-ID: <15006.42826.747914.669893@ix.netsoft.ro> Fixes the bugs 20010221.005 and 20010221.008: "the taint checker was checking argv[0] regardless of whether a different pathname will actually be executed." Test case not supplied because drafting that, ironically enough, revealed another bug (or a feature). p4raw-id: //depot/perl@8982
* Re: sync sync sync: have I missed any patches?Tim Jenness2001-02-281-2/+2
| | | | | | | | In-Reply-To: <20010227140737.Y10633@chaos.wustl.edu> Message-ID: <Pine.LNX.4.30.0102271322070.8623-100000@lapaki.jach.hawaii.edu> Replace djSP with dSP. p4raw-id: //depot/perl@8963
* [patch] -WallDoug MacEachern2001-02-171-2/+1
| | | | | Message-ID: <Pine.LNX.4.21.0102161519500.30352-100000@mako.covalent.net> p4raw-id: //depot/perl@8815
* Patch from Inaba Hiroto:Jarkko Hietaniemi2001-01-281-6/+5
| | | | | | | | | | | | | | | | | | | | | | | - canonical UTF-8 hash keys: if a key string for a hash is UTF8-on, try downgrade the string and use it if unicode::distinct is not in effect. For the task, I added a function bytes_from_utf8() to utf8.c. It might resemble utf8_to_bytes() but it is not convenient to the task. Made a test for it and added to t/op/each.t - Changed do_print in doio.c to apply sv_utf8_(downgrade|upgrade) to the mortal copy of the argument SV. And changed t/io/utf8.t test 18 which expects print() to upgrade its argument. - re-implement sv_eq with bytes_from_utf8() - some bug fixes - tr/// does not handle UTF8 range (\x{}-\x{}) - \ before raw UTF8 character produced "Malformed UTF-8 character" warning. - "\x{100}\N{CENT SIGN}" is Malformed. Added tests for these 3. - and one silly bug (by me) with qu operator. p4raw-id: //depot/perl@8583
* Infrastructure to allow:Nick Ing-Simmons2001-01-201-2/+13
| | | | | | | | | | open($fh,"|-",@array); to be implemented i.e. mark pp_open as needing a stack mark, and make pp_open process its args in that style (and pass them _all_ to tied handles OPEN). Invent do_openn() which takes SV ** at allow it to see multiple args. Note this does not _do_ anything yet. p4raw-id: //depot/perlio@8484
* Bump up Larry's copyright.Jarkko Hietaniemi2001-01-011-1/+1
| | | p4raw-id: //depot/perl@8289
* Further VMS piping fixes from Charles Lane:Jarkko Hietaniemi2000-12-291-0/+9
| | | | | | | | | | | | | | | | | In summary, error messages produced when a subprocess terminated abnormally were being sent not just to the parent process, but to grandparents, because of default values for error output that were not completely overridden when the subprocess was started. This patch fixes this behavior by defining user-mode (i.e., temporary for the duration of the program) logical names for SYS$OUTPUT and SYS$ERROR when they are (re)opened inside Perl. And a bunch of other changes to make it so that the user-mode logicals are the ones that control where Perl's error messages go if it terminates abnormally. I also added some gratuitous fixes to the indentation of braces in the piping code. It just looked ugly, before. p4raw-id: //depot/perl@8257
* move startglob out of pp_hot.cNicholas Clark2000-12-131-0/+145
| | | | | Message-ID: <20001211231638.A55550@plum.flirble.org> p4raw-id: //depot/perl@8097
* Make print, syswrite, send, readline, getc honour utf8-ness of PerlIO.Nick Ing-Simmons2000-12-091-6/+8
| | | | | | | | | | | | | | | (sysread, recv and write i.e. formats still to do...) Allow :utf8 or :bytes in PerlIO_apply_layers() so that open($fh,">:utf8","name") etc. work. - "applying" those just sets/clears the UTF8 bit of the top layer, so no extra overhead is involved. Tweak t/comp/require.t to add a 'use bytes' to permit its dubious writing of BOM to a non-utf8 stream. Add initial io/utf8.t Fix SvPVutf8() - sv_2pv() was not expecting to be called with something that was already SvPOK() - (we just fossiked with SvUTF8 bit). Fix that and also just use the SvPV macro in sv_2pvutf8() to avoid the issue/overhead. p4raw-id: //depot/perlio@8054
* dTHR is a nop in 5.6.0 onwards. Ergo, it can go.Jarkko Hietaniemi2000-12-051-39/+8
| | | p4raw-id: //depot/perl@7984
* Quieten some noise in Win32 builds:Nick Ing-Simmons2000-12-041-2/+2
| | | | | | | - win32.h is included after <sys/socket.h>, so need to set Win32SCK_IS_STDSCK earlier to avoid re-defined noise in XSUB.h - GCC (& MSVC?) have execv(...,const char *const *) so need a cast from char **. p4raw-id: //depot/perlio@7971
* Integrate mainline.Nick Ing-Simmons2000-11-251-161/+2
|\ | | | | p4raw-id: //depot/perlio@7859
| * Undo the SOCKS workarounds, instead start using PerlIOJens Hamisch2000-11-251-174/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | if SOCKS is selected. Subject: perl@7847, [ID 20001030.005], close-patch, perlio - The big cleanup Date: Fri, 24 Nov 2000 18:31:30 +0100 Message-ID: <20001124183130.E28337@Strawberry.COM> Subject: Re: perl@7847, [ID 20001030.005], close-patch, perlio - Patch the patch ... From: Jens Hamisch <jens@Strawberry.COM> Date: Fri, 24 Nov 2000 19:11:51 +0100 Message-ID: <20001124191151.A28753@Strawberry.COM> p4raw-id: //depot/perl@7855
| * Integrate perlio:Jarkko Hietaniemi2000-11-241-59/+53
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ 7844] Win32/perlio Now just fails one io/argv.t test - lack of default :crlf on standard streams. [ 7843] Win32 passes all but t/lib/peek.t with perlio and home-grown crlf. peek fail is showing a real problem (multiple crlf layers are getting pushed.) [ 7842] Implement PerlIO_binmode() Fix PerlIOCrlf_unread() (*--ptr rather than *ptr-- ...) Test on UNIX with PERLIO="perlio crlf" to mimic Win32, make binmode in t/lib/io_tell.t unconditional so that works. Checkin just so Win32 machine can see these changes. [ 7836] Implement crlf layer - not ready for merge. p4raw-link: @7844 on //depot/perlio: de6cd452fde5aaf57e339f71b33b6a0852f0f96d p4raw-link: @7843 on //depot/perlio: 63dbdb066b93ac25a070d3a7942d248c23ec6088 p4raw-link: @7842 on //depot/perlio: 60382766f71ec2a2d8e34a951c5c77b494bd86bb p4raw-link: @7836 on //depot/perlio: 99efab1281ccea6f7df2a4d0affc5479291e2350 p4raw-id: //depot/perl@7847
| * | SOCKS wrestling continues, patches from Jens Hamisch.Jarkko Hietaniemi2000-11-231-18/+17
| | | | | | | | | p4raw-id: //depot/perl@7840