This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix perlsio_binmode() export breakage caused by change #24338
authorSteve Hay <SteveHay@planit.com>
Thu, 28 Apr 2005 08:44:28 +0000 (08:44 +0000)
committerSteve Hay <SteveHay@planit.com>
Thu, 28 Apr 2005 08:44:28 +0000 (08:44 +0000)
Define and export perlsio_binmode() based on the same condition,
namely, that USE_PERLIO is defined and USE_SFIO is not.
p4raw-link: @24338 on //depot/perl: de009b76d60bdeb88f1d812ac755ae225805a071

p4raw-id: //depot/perl@24341

makedef.pl
perlio.c

index 28b7b3d..3a85ffc 100644 (file)
@@ -909,6 +909,7 @@ if ($define{'USE_PERLIO'}) {
     if ($define{'USE_SFIO'}) {
        # Old legacy non-stdio "PerlIO"
        skip_symbols \@layer_syms;
+       skip_symbols [qw(perlsio_binmode)];
        # SFIO defines most of the PerlIO routines as macros
        # So undo most of what $perlio_sym has just done - d'oh !
        # Perhaps it would be better to list the ones which do exist
@@ -986,12 +987,14 @@ if ($define{'USE_PERLIO'}) {
     else {
        # PerlIO with layers - export implementation
        emit_symbols \@layer_syms;
+       emit_symbols [qw(perlsio_binmode)];
     }
 } else {
        # -Uuseperlio
        # Skip the PerlIO layer symbols - although
        # nothing should have exported them anyway.
        skip_symbols \@layer_syms;
+       skip_symbols [qw(perlsio_binmode)];
         skip_symbols [qw(PL_def_layerlist PL_known_layers PL_perlio)];
 
        # Also do NOT add abstraction symbols from $perlio_sym
@@ -1483,4 +1486,3 @@ PerlIO_sprintf
 PerlIO_sv_dup
 PerlIO_tmpfile
 PerlIO_vsprintf
-perlsio_binmode
index cf77059..dae7f9b 100644 (file)
--- a/perlio.c
+++ b/perlio.c
@@ -112,8 +112,8 @@ int mkstemp(char*);
        else                                                    \
                SETERRNO(EBADF, SS_IVCHAN)
 
-#ifdef USE_SFIO
-static int
+#ifndef USE_SFIO
+int
 perlsio_binmode(FILE *fp, int iotype, int mode)
 {
     /*