clean up the makedepend temp file
[p5sagit/p5-mst-13.2.git] / makedef.pl
index 1b77855..ed3f1cc 100644 (file)
@@ -100,6 +100,33 @@ while (<CFG>) {
 }
 close(CFG);
 
+# perl.h logic duplication begins
+
+if ($define{USE_ITHREADS}) {
+    if (!$define{MULTIPLICITY} && !defined{PERL_OBJECT}) {
+        $define{MULTIPLICITY} = 1;
+    }
+}
+
+$define{PERL_IMPLICIT_CONTEXT} ||=
+    $define{USE_ITHREADS} ||
+    $define{USE_THREADS}  ||
+    $define{MULTIPLICITY} ;
+
+if ($define{PERL_CAPI}) {
+    delete $define{PERL_OBJECT};
+    $define{MULTIPLICITY} = 1; 
+    $define{PERL_IMPLICIT_CONTEXT} = 1;
+    $define{PERL_IMPLICIT_SYS}     = 1;
+}
+
+if ($define{PERL_OBJECT}) {
+    $define{PERL_IMPLICIT_CONTEXT} = 1;
+    $define{PERL_IMPLICIT_SYS}     = 1;
+}
+
+# perl.h logic duplication ends
+
 if ($PLATFORM eq 'win32') {
     warn join(' ',keys %define)."\n";
     print "LIBRARY Perl56\n";
@@ -243,6 +270,7 @@ elsif ($PLATFORM eq 'os2') {
                    dlopen
                    dlsym
                    dlerror
+                   dlclose
                    my_tmpfile
                    my_tmpnam
                    my_flock
@@ -314,9 +342,18 @@ else {
                    )];
 }
 
+unless ($define{'PERL_FLEXIBLE_EXCEPTIONS'}) {
+    skip_symbols [qw(
+                   PL_protect
+                   Perl_default_protect
+                   Perl_vdefault_protect
+                   )];
+}
+
 if ($define{'MYMALLOC'}) {
     emit_symbols [qw(
                    Perl_dump_mstats
+                   Perl_get_mstats
                    Perl_malloc
                    Perl_mfree
                    Perl_realloc
@@ -327,11 +364,17 @@ if ($define{'MYMALLOC'}) {
                        PL_malloc_mutex
                        )];
     }
+    else {
+       skip_symbols [qw(
+                       PL_malloc_mutex
+                       )];
+    }
 }
 else {
     skip_symbols [qw(
                    PL_malloc_mutex
                    Perl_dump_mstats
+                   Perl_get_mstats
                    Perl_malloc
                    Perl_mfree
                    Perl_realloc
@@ -357,8 +400,6 @@ unless ($define{'USE_5005THREADS'}) {
                    PL_threadsv_names
                    PL_thrsv
                    PL_vtbl_mutex
-                   Perl_getTHR
-                   Perl_setTHR
                    Perl_condpair_magic
                    Perl_new_struct_thread
                    Perl_per_thread_magicals
@@ -476,6 +517,11 @@ if ($define{'PERL_OBJECT'} || $define{'MULTIPLICITY'}) {
        my $glob = readvar($f, sub { "Perl_" . $_[1] . $_[2] . "_ptr" });
        emit_symbols $glob;
     }
+    # XXX AIX seems to want the perlvars.h symbols, for some reason
+    if ($PLATFORM eq 'aix') {
+       my $glob = readvar($perlvars_h);
+       emit_symbols $glob;
+    }
 }
 else {
     unless ($define{'PERL_GLOBAL_STRUCT'}) {
@@ -510,14 +556,10 @@ while (<DATA>) {
 if ($PLATFORM eq 'win32') {
     foreach my $symbol (qw(
                            boot_DynaLoader
-                           Perl_getTHR
                            Perl_init_os_extras
-                           Perl_setTHR
                            Perl_thread_create
                            Perl_win32_init
                            RunPerl
-                           GetPerlInterpreter
-                           SetPerlInterpreter
                            win32_errno
                            win32_environ
                            win32_stdin