This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Oops. Forgot to propagate the rename of Perl_re_dup to Perl_re_dup_guts
[perl5.git] / makedef.pl
index ea06236..dad466a 100644 (file)
@@ -6,7 +6,7 @@
 # and by AIX for creating libperl.a when -Dusershrplib is in effect,
 # and by MacOS Classic.
 #
-# reads global.sym, pp.sym, perlvars.h, intrpvar.h, thrdvar.h, config.h
+# reads global.sym, pp.sym, perlvars.h, intrpvar.h, config.h
 # On OS/2 reads miniperl.map and the previous version of perl5.def as well
 
 BEGIN { unshift @INC, "lib" }
@@ -72,7 +72,6 @@ my $exportperlmalloc = $PLATFORM eq 'os2';
 
 my $config_sh   = "config.sh";
 my $config_h    = "config.h";
-my $thrdvar_h   = "thrdvar.h";
 my $intrpvar_h  = "intrpvar.h";
 my $perlvars_h  = "perlvars.h";
 my $global_sym  = "global.sym";
@@ -86,13 +85,13 @@ if ($PLATFORM eq 'aix') {
 }
 elsif ($PLATFORM =~ /^win(?:32|ce)$/ || $PLATFORM eq 'netware') {
     $CCTYPE = "MSVC" unless defined $CCTYPE;
-    foreach ($thrdvar_h, $intrpvar_h, $perlvars_h, $global_sym,
+    foreach ($intrpvar_h, $perlvars_h, $global_sym,
             $pp_sym, $globvar_sym, $perlio_sym) {
        s!^!..\\!;
     }
 }
 elsif ($PLATFORM eq 'MacOS') {
-    foreach ($thrdvar_h, $intrpvar_h, $perlvars_h, $global_sym,
+    foreach ($intrpvar_h, $perlvars_h, $global_sym,
             $pp_sym, $globvar_sym, $perlio_sym) {
        s!^!::!;
     }
@@ -160,9 +159,13 @@ my $sym_ord = 0;
 print STDERR "Defines: (" . join(' ', sort keys %define) . ")\n";
 
 if ($PLATFORM =~ /^win(?:32|ce)$/) {
-    (my $dll = ($define{PERL_DLL} || "perl59")) =~ s/\.dll$//i;
+    (my $dll = ($define{PERL_DLL} || "perl511")) =~ s/\.dll$//i;
     print "LIBRARY $dll\n";
-    print "DESCRIPTION 'Perl interpreter'\n";
+    # The DESCRIPTION module definition file statement is not supported
+    # by VC7 onwards.
+    if ($CCTYPE !~ /^MSVC7/ && $CCTYPE !~ /^MSVC8/ && $CCTYPE !~ /^MSVC9/) {
+       print "DESCRIPTION 'Perl interpreter'\n";
+    }
     print "EXPORTS\n";
     if ($define{PERL_IMPLICIT_SYS}) {
        output_symbol("perl_get_host_info");
@@ -212,7 +215,7 @@ elsif ($PLATFORM eq 'aix') {
 }
 elsif ($PLATFORM eq 'netware') {
        if ($FILETYPE eq 'def') {
-       print "LIBRARY perl59\n";
+       print "LIBRARY perl511\n";
        print "DESCRIPTION 'Perl interpreter for NetWare'\n";
        print "EXPORTS\n";
        }
@@ -730,7 +733,8 @@ unless ($define{'USE_ITHREADS'}) {
                    Perl_gp_dup
                    Perl_he_dup
                    Perl_mg_dup
-                   Perl_re_dup
+                   Perl_mro_meta_dup
+                   Perl_re_dup_guts
                    Perl_sv_dup
                    Perl_rvpv_dup
                    Perl_hek_dup
@@ -796,6 +800,13 @@ unless ($define{'PL_OP_SLAB_ALLOC'}) {
                     )];
 }
 
+unless ($define{'PERL_DEBUG_READONLY_OPS'}) {
+    skip_symbols [qw(
+                   PL_slab_count
+                   PL_slabs
+                  )];
+}
+
 unless ($define{'THREADS_HAVE_PIDS'}) {
     skip_symbols [qw(PL_ppid)];
 }
@@ -880,6 +891,19 @@ if ($define{'PERL_MAD'}) {
                    )];
 }
 
+unless ($define{'MULTIPLICITY'}) {
+    skip_symbols [qw(
+                   PL_interp_size
+                   PL_interp_size_5_10_0
+                   )];
+}
+
+unless ($define{'PERL_GLOBAL_STRUCT'}) {
+    skip_symbols [qw(
+                   PL_global_struct_size
+                   )];
+}
+
 unless ($define{'PERL_GLOBAL_STRUCT_PRIVATE'}) {
     skip_symbols [qw(
                    PL_my_cxt_keys
@@ -1150,7 +1174,7 @@ for my $syms (@syms) {
 # variables
 
 if ($define{'MULTIPLICITY'}) {
-    for my $f ($perlvars_h, $intrpvar_h, $thrdvar_h) {
+    for my $f ($perlvars_h, $intrpvar_h) {
        my $glob = readvar($f, sub { "Perl_" . $_[1] . $_[2] . "_ptr" });
        emit_symbols $glob;
     }
@@ -1169,10 +1193,6 @@ else {
        my $glob = readvar($intrpvar_h);
        emit_symbols $glob;
     }
-    unless ($define{'MULTIPLICITY'}) {
-       my $glob = readvar($thrdvar_h);
-       emit_symbols $glob;
-    }
 }
 
 sub try_symbol {
@@ -1532,6 +1552,8 @@ foreach my $symbol (@stat_mods)
        try_symbol($symbol);
     }
 
+try_symbol("init_Win32CORE") if $static_ext =~ /\bWin32CORE\b/;
+
 # Now all symbols should be defined because
 # next we are going to output them.