Change 16287 by jhi@alpha on 2002/04/30 19:51:08
Integrate perlio;
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 <DATA>
section.
4. Re-sort perlio.sym
Affected files ...
.... //depot/perl/makedef.pl#115 integrate
.... //depot/perl/perlio.sym#7 integrate
Differences ...
==== //depot/perl/makedef.pl#115 (text) ====
Index: perl/makedef.pl
--- perl/makedef.pl.~1~ Tue Apr 30 14:00:05 2002
+++ perl/makedef.pl Tue Apr 30 14:00:05 2002
@@ -686,6 +686,9 @@
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 @@
PerlIOBase_pushed
PerlIOBase_read
PerlIOBase_setlinebuf
- PerlIOBase_unread
+ PerlIOBase_unread
PerlIOBuf_bufsiz
PerlIOBuf_fill
PerlIOBuf_flush
@@ -710,7 +713,10 @@
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 @@
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 @@
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 <DATA>
}
for my $syms (@syms) {
@@ -1253,44 +1278,11 @@
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
==== //depot/perl/perlio.sym#7 (text) ====
Index: perl/perlio.sym
--- perl/perlio.sym.~1~ Tue Apr 30 14:00:05 2002
+++ perl/perlio.sym Tue Apr 30 14:00:05 2002
@@ -1,29 +1,29 @@
# Symbols which arise as part of the PerlIO abstraction
+PerlIO_canset_cnt
+PerlIO_exportFILE
PerlIO_fast_gets
+PerlIO_fdopen
+PerlIO_findFILE
+PerlIO_getc
+PerlIO_getname
+PerlIO_getpos
+PerlIO_has_base
PerlIO_has_cntptr
-PerlIO_canset_cnt
-PerlIO_has_base
+PerlIO_importFILE
+PerlIO_init
+PerlIO_modestr
+PerlIO_open
+PerlIO_printf
+PerlIO_putc
PerlIO_puts
-PerlIO_open
-PerlIO_fdopen
+PerlIO_releaseFILE
PerlIO_reopen
-PerlIO_getname
-PerlIO_getc
-PerlIO_putc
-PerlIO_ungetc
-PerlIO_vprintf
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
End of Patch.