From: Steve Peters Date: Sat, 29 Oct 2005 11:47:55 +0000 (+0000) Subject: Additional mathoms from doio.c X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=34d367cd32175a42a9ef26bbd4b377c7db3d0498;p=p5sagit%2Fp5-mst-13.2.git Additional mathoms from doio.c p4raw-id: //depot/perl@25873 --- diff --git a/doio.c b/doio.c index aa664a2..102a07a 100644 --- a/doio.c +++ b/doio.c @@ -67,16 +67,6 @@ Perl_do_open(pTHX_ GV *gv, register const char *name, I32 len, int as_raw, } bool -Perl_do_open9(pTHX_ GV *gv, register const char *name, I32 len, int as_raw, - int rawmode, int rawperm, PerlIO *supplied_fp, SV *svs, - I32 num_svs) -{ - PERL_UNUSED_ARG(num_svs); - return do_openn(gv, name, len, as_raw, rawmode, rawperm, - supplied_fp, &svs, 1); -} - -bool Perl_do_openn(pTHX_ GV *gv, register const char *oname, I32 len, int as_raw, int rawmode, int rawperm, PerlIO *supplied_fp, SV **svp, I32 num_svs) @@ -1224,20 +1214,6 @@ fail_discipline: return mode; } -int -Perl_do_binmode(pTHX_ PerlIO *fp, int iotype, int mode) -{ - /* The old body of this is now in non-LAYER part of perlio.c - * This is a stub for any XS code which might have been calling it. - */ - const char *name = ":raw"; -#ifdef PERLIO_USING_CRLF - if (!(mode & O_BINARY)) - name = ":crlf"; -#endif - return PerlIO_binmode(aTHX_ fp, iotype, mode, name); -} - #if !defined(HAS_TRUNCATE) && !defined(HAS_CHSIZE) I32 my_chsize(int fd, Off_t length) diff --git a/mathoms.c b/mathoms.c index 09eb351..d58beb8 100644 --- a/mathoms.c +++ b/mathoms.c @@ -339,6 +339,32 @@ Perl_av_fake(pTHX_ register I32 size, register SV **strp) return av; } +bool +Perl_do_open9(pTHX_ GV *gv, register const char *name, I32 len, int +as_raw, + int rawmode, int rawperm, PerlIO *supplied_fp, SV *svs, + I32 num_svs) +{ + PERL_UNUSED_ARG(num_svs); + return do_openn(gv, name, len, as_raw, rawmode, rawperm, + supplied_fp, &svs, 1); +} + +int +Perl_do_binmode(pTHX_ PerlIO *fp, int iotype, int mode) +{ + /* The old body of this is now in non-LAYER part of perlio.c + * This is a stub for any XS code which might have been calling it. + */ + const char *name = ":raw"; +#ifdef PERLIO_USING_CRLF + if (!(mode & O_BINARY)) + name = ":crlf"; +#endif + return PerlIO_binmode(aTHX_ fp, iotype, mode, name); +} + + /* * Local variables: * c-indentation-style: bsd