This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
alias to $^V to $PERL_VERSION_TUPLE
[perl5.git] / makedef.pl
index eb599c9..1b77855 100644 (file)
@@ -91,41 +91,24 @@ unless ($PLATFORM eq 'win32') {
 open(CFG,$config_h) || die "Cannot open $config_h: $!\n";
 while (<CFG>) {
     $define{$1} = 1 if /^\s*#\s*define\s+(MYMALLOC)\b/;
-    $define{$1} = 1 if /^\s*#\s*define\s+(USE_THREADS)\b/;
+    $define{$1} = 1 if /^\s*#\s*define\s+(USE_5005THREADS)\b/;
+    $define{$1} = 1 if /^\s*#\s*define\s+(USE_ITHREADS)\b/;
     $define{$1} = 1 if /^\s*#\s*define\s+(USE_PERLIO)\b/;
     $define{$1} = 1 if /^\s*#\s*define\s+(MULTIPLICITY)\b/;
+    $define{$1} = 1 if /^\s*#\s*define\s+(PERL_IMPLICIT_SYS)\b/;
     $define{$1} = 1 if /^\s*#\s*define\s+(PERL_BINCOMPAT_5005)\b/;
 }
 close(CFG);
 
 if ($PLATFORM eq 'win32') {
     warn join(' ',keys %define)."\n";
-    if ($define{PERL_OBJECT}) {
-       print "LIBRARY Perl56\n";
-       print "DESCRIPTION 'Perl interpreter'\n";
-       print "EXPORTS\n";
-#    output_symbol("perl_alloc");
+    print "LIBRARY Perl56\n";
+    print "DESCRIPTION 'Perl interpreter'\n";
+    print "EXPORTS\n";
+    if ($define{PERL_IMPLICIT_SYS}) {
        output_symbol("perl_get_host_info");
        output_symbol("perl_alloc_override");
-#    output_symbol("perl_construct");
-#    output_symbol("perl_destruct");
-#    output_symbol("perl_free");
-#    output_symbol("perl_parse");
-#    output_symbol("perl_run");
-#    output_symbol("RunPerl");
-#    exit(0);
     }
-    else {
-       if ($CCTYPE ne 'GCC') {
-           print "LIBRARY Perl\n";
-           print "DESCRIPTION 'Perl interpreter, export autogenerated'\n";
-       }
-       else {
-           $define{'PERL_GLOBAL_STRUCT'} = 1;
-           $define{'MULTIPLICITY'} = 1;
-       }
-       print "EXPORTS\n";
-    } 
 }
 elsif ($PLATFORM eq 'os2') {
     ($v = $]) =~ s/(\d\.\d\d\d)(\d\d)$/$1_$2/;
@@ -168,7 +151,7 @@ sub emit_symbols {
     foreach my $symbol (@$list) {
        my $skipsym = $symbol;
        # XXX hack
-       if ($define{PERL_OBJECT}) {
+       if ($define{PERL_OBJECT} || $define{MULTIPLICITY}) {
            $skipsym =~ s/^Perl_[GIT](\w+)_ptr$/PL_$1/;
        }
        emit_symbol($symbol) unless exists $skip{$skipsym};
@@ -244,6 +227,7 @@ elsif ($PLATFORM eq 'aix') {
                     Perl_safexrealloc
                     Perl_same_dirent
                     Perl_unlnk
+                    Perl_sys_intern_dup
                     PL_cryptseen
                     PL_opsave
                     PL_statusvalue_vms
@@ -338,7 +322,7 @@ if ($define{'MYMALLOC'}) {
                    Perl_realloc
                    Perl_calloc
                    )];
-    if ($define{'USE_THREADS'} || $define{'USE_ITHREADS'}) {
+    if ($define{'USE_5005THREADS'} || $define{'USE_ITHREADS'}) {
        emit_symbols [qw(
                        PL_malloc_mutex
                        )];
@@ -356,7 +340,7 @@ else {
                    )];
 }
 
-unless ($define{'USE_THREADS'}) {
+unless ($define{'USE_5005THREADS'}) {
     skip_symbols [qw(
                    PL_thr_key
                    PL_sv_mutex
@@ -451,16 +435,11 @@ sub readvar {
     return \@syms;
 }
 
-if ($define{'USE_THREADS'} || $define{'MULTIPLICITY'}) {
+if ($define{'USE_5005THREADS'}) {
     my $thrd = readvar($thrdvar_h);
     skip_symbols $thrd;
 }
 
-if ($define{'MULTIPLICITY'}) {
-    my $interp = readvar($intrpvar_h);
-    skip_symbols $interp;
-}
-
 if ($define{'PERL_GLOBAL_STRUCT'}) {
     my $global = readvar($perlvars_h);
     skip_symbols $global;
@@ -470,7 +449,7 @@ if ($define{'PERL_GLOBAL_STRUCT'}) {
 
 # functions from *.sym files
 
-my @syms = ($global_sym, $pp_sym, $globvar_sym);
+my @syms = ($global_sym, $globvar_sym); # $pp_sym is not part of the API
 
 if ($define{'USE_PERLIO'}) {
      push @syms, $perlio_sym;
@@ -492,7 +471,7 @@ for my $syms (@syms) {
 
 # variables
 
-if ($define{'PERL_OBJECT'}) {
+if ($define{'PERL_OBJECT'} || $define{'MULTIPLICITY'}) {
     for my $f ($perlvars_h, $intrpvar_h, $thrdvar_h) {
        my $glob = readvar($f, sub { "Perl_" . $_[1] . $_[2] . "_ptr" });
        emit_symbols $glob;
@@ -507,7 +486,7 @@ else {
        my $glob = readvar($intrpvar_h);
        emit_symbols $glob;
     } 
-    unless ($define{'MULTIPLICITY'} || $define{'USE_THREADS'}) {
+    unless ($define{'MULTIPLICITY'} || $define{'USE_5005THREADS'}) {
        my $glob = readvar($thrdvar_h);
        emit_symbols $glob;
     }