diff options
author | Nick Ing-Simmons <nik@tiuk.ti.com> | 2000-12-31 10:06:15 +0000 |
---|---|---|
committer | Nick Ing-Simmons <nik@tiuk.ti.com> | 2000-12-31 10:06:15 +0000 |
commit | eb73becae469f5299394486e1d7e01e96646e994 (patch) | |
tree | 1b5d928f45d2d705ac73843e78c84d40e51fd64e /perlio.c | |
parent | 568ad336973732c4d3fa134b7dcb8e82359c1f11 (diff) | |
download | perl-eb73becae469f5299394486e1d7e01e96646e994.tar.gz |
Tweak perlio.c so that makedef.pl-exported perlsio_binmode()
is available to be exported
p4raw-id: //depot/perlio@8281
Diffstat (limited to 'perlio.c')
-rw-r--r-- | perlio.c | 28 |
1 files changed, 14 insertions, 14 deletions
@@ -33,20 +33,6 @@ #undef PerlMemShared_free #define PerlMemShared_free(x) free(x) - -#ifndef PERLIO_LAYERS -int -PerlIO_apply_layers(pTHX_ PerlIO *f, const char *mode, const char *names) -{ - if (!names || !*names || strEQ(names,":crlf") || strEQ(names,":raw")) - { - return 0; - } - Perl_croak(aTHX_ "Cannot apply \"%s\" in non-PerlIO perl",names); - /* NOTREACHED */ - return -1; -} - int perlsio_binmode(FILE *fp, int iotype, int mode) { @@ -62,6 +48,7 @@ perlsio_binmode(FILE *fp, int iotype, int mode) } return 0; # else + dTHX; if (PerlLIO_setmode(fileno(fp), mode) != -1) { # if defined(WIN32) && defined(__BORLANDC__) /* The translation mode of the stream is maintained independent @@ -93,6 +80,19 @@ perlsio_binmode(FILE *fp, int iotype, int mode) #endif } +#ifndef PERLIO_LAYERS +int +PerlIO_apply_layers(pTHX_ PerlIO *f, const char *mode, const char *names) +{ + if (!names || !*names || strEQ(names,":crlf") || strEQ(names,":raw")) + { + return 0; + } + Perl_croak(aTHX_ "Cannot apply \"%s\" in non-PerlIO perl",names); + /* NOTREACHED */ + return -1; +} + int PerlIO_binmode(pTHX_ PerlIO *fp, int iotype, int mode, const char *names) { |