In makedef.pl, tidy up the USE_PERLIO logic.
authorNicholas Clark <nick@ccl4.org>
Tue, 26 Jul 2011 20:26:13 +0000 (22:26 +0200)
committerNicholas Clark <nick@ccl4.org>
Mon, 1 Aug 2011 09:53:56 +0000 (11:53 +0200)
No need to call try_symbols() for PL_perlio_mutex, as it is found in
perlvars.h, and no need to duplicate the skip for it if USE_ITHREADS is not
defined.

We do need to skip PL_perlio_mutex if if USE_PERLIO is not defined but
USE_ITHREADS is [not that this is a configuration that Configure will let
you select, until you edit it :-)]

Add a comment describing what the "Oddities from PerlIO" are.

Remove PerlIO_sv_dup from the list, as it's also in @layer_syms, and
inclusion in @layer_syms makes the former redundant. It was added to both in
commit 8437356be6fd345c in 2001.

makedef.pl

index 4207c02..0211694 100644 (file)
@@ -724,14 +724,6 @@ if ($define{'USE_PERLIO'}) {
        # PerlIO with layers - export implementation
        try_symbols(@layer_syms, 'perlsio_binmode');
     }
-    if ($define{'USE_ITHREADS'}) {
-       try_symbols(qw(
-                       PL_perlio_mutex
-                       ));
-    }
-    else {
-       ++$skip{PL_perlio_mutex};
-    }
 } else {
        # -Uuseperlio
        # Skip the PerlIO layer symbols - although
@@ -745,6 +737,7 @@ if ($define{'USE_PERLIO'}) {
                        PL_perlio_debug_fd
                        PL_perlio_fd_refcnt
                        PL_perlio_fd_refcnt_size
+                       PL_perlio_mutex
                             );
 
        # Also do NOT add abstraction symbols from $perlio_sym
@@ -790,13 +783,14 @@ else {
 }
 
 # Oddities from PerlIO
+# All have alternate implementations in perlio.c, so always exist.
+# Should they be considered to be part of the API?
 try_symbols(qw(
                    PerlIO_binmode
                    PerlIO_getpos
                    PerlIO_init
                    PerlIO_setpos
                    PerlIO_sprintf
-                   PerlIO_sv_dup
                    PerlIO_tmpfile
                    PerlIO_vsprintf
             ));