From: Nick Ing-Simmons Date: Tue, 30 Apr 2002 19:00:03 +0000 (+0000) Subject: Attempt at sanity in PerlIO/makedef.pl world: X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d892637e7ede1a308d13f1482c6352a1b7bb28e4;p=p5sagit%2Fp5-mst-13.2.git Attempt at sanity in PerlIO/makedef.pl world: 1. Add comments to what each clump of symbols is for 2. Explicitly export layer syms like I thought they were 3. Remove bulk of (now redundant) PerlIO stuff from the section. 4. Re-sort perlio.sym p4raw-id: //depot/perlio@16285 --- diff --git a/makedef.pl b/makedef.pl index 81815a4..d218411 100644 --- a/makedef.pl +++ b/makedef.pl @@ -686,6 +686,9 @@ if ($define{'PERL_GLOBAL_STRUCT'}) { my @syms = ($global_sym, $globvar_sym); # $pp_sym is not part of the API +# Symbols that are the public face of the PerlIO layers implementation +# These are in _addition to_ the public face of the abstraction +# and need to be exported to allow XS modules to implement layers my @layer_syms = qw( PerlIOBase_clearerr PerlIOBase_close @@ -696,7 +699,7 @@ my @layer_syms = qw( PerlIOBase_pushed PerlIOBase_read PerlIOBase_setlinebuf - PerlIOBase_unread + PerlIOBase_unread PerlIOBuf_bufsiz PerlIOBuf_fill PerlIOBuf_flush @@ -710,7 +713,10 @@ my @layer_syms = qw( PerlIOBuf_tell PerlIOBuf_unread PerlIOBuf_write + PerlIO_debug PerlIO_allocate + PerlIO_apply_layera + PerlIO_apply_layers PerlIO_arg_fetch PerlIO_define_layer PerlIO_modestr @@ -726,11 +732,20 @@ my @layer_syms = qw( PL_perlio ); + if ($define{'USE_PERLIO'}) { + # Export the symols that make up the PerlIO abstraction, regardless + # of its implementation - read from a file push @syms, $perlio_sym; + + # This part is then dependent on how the abstraction is implemented if ($define{'USE_SFIO'}) { + # Old legacy non-stdio "PerlIO" skip_symbols \@layer_syms; # 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 + # And emit them skip_symbols [qw( PerlIO_canset_cnt PerlIO_clearerr @@ -798,9 +813,19 @@ if ($define{'USE_PERLIO'}) { Perl_PerlIO_write )]; } + else { + # PerlIO with layers - export implementation + emit_symbols \@layer_syms; + } } else { - # Skip the PerlIO New Generation symbols. + # -Uuseperlio + # Skip the PerlIO layer symbols - although + # nothing should have exported them any way skip_symbols \@layer_syms; + # Also do NOT add abstraction symbols from $perlio_sym + # abstraction is done as #define to stdio + # Remaining remnants that _may_ be functions + # are handled in } for my $syms (@syms) { @@ -1253,44 +1278,11 @@ perl_destruct perl_free perl_parse perl_run -PerlIOBase_clearerr -PerlIOBase_close -PerlIOBase_dup -PerlIOBase_eof -PerlIOBase_error -PerlIOBase_fileno -PerlIOBase_pushed -PerlIOBase_read -PerlIOBase_setlinebuf -PerlIOBase_unread -PerlIOBuf_bufsiz -PerlIOBuf_fill -PerlIOBuf_flush -PerlIOBuf_get_cnt -PerlIOBuf_get_ptr -PerlIOBuf_open -PerlIOBuf_pushed -PerlIOBuf_read -PerlIOBuf_seek -PerlIOBuf_set_ptrcnt -PerlIOBuf_tell -PerlIOBuf_unread -PerlIOBuf_write -PerlIO_allocate -PerlIO_apply_layera -PerlIO_apply_layers -PerlIO_arg_fetch +# Oddities PerlIO_binmode -PerlIO_debug -PerlIO_define_layer -PerlIO_define_layer PerlIO_getpos PerlIO_init -PerlIO_layer_fetch -PerlIO_modestr -PerlIO_pending PerlIO_perlio -PerlIO_push PerlIO_setpos PerlIO_sprintf PerlIO_sv_dup diff --git a/perlio.sym b/perlio.sym index 66a3d1b..f97d750 100644 --- a/perlio.sym +++ b/perlio.sym @@ -1,29 +1,29 @@ # Symbols which arise as part of the PerlIO abstraction -PerlIO_fast_gets -PerlIO_has_cntptr PerlIO_canset_cnt -PerlIO_has_base -PerlIO_puts -PerlIO_open +PerlIO_exportFILE +PerlIO_fast_gets PerlIO_fdopen -PerlIO_reopen -PerlIO_getname +PerlIO_findFILE PerlIO_getc +PerlIO_getname +PerlIO_getpos +PerlIO_has_base +PerlIO_has_cntptr +PerlIO_importFILE +PerlIO_init +PerlIO_modestr +PerlIO_open +PerlIO_printf PerlIO_putc -PerlIO_ungetc -PerlIO_vprintf +PerlIO_puts +PerlIO_releaseFILE +PerlIO_reopen PerlIO_rewind -PerlIO_printf +PerlIO_setpos +PerlIO_sprintf PerlIO_stdoutf PerlIO_tmpfile -PerlIO_importFILE -PerlIO_exportFILE -PerlIO_findFILE -PerlIO_releaseFILE -PerlIO_init -PerlIO_setpos -PerlIO_getpos +PerlIO_ungetc +PerlIO_vprintf PerlIO_vsprintf -PerlIO_sprintf -PerlIO_modestr \ No newline at end of file