win32 extras and embedding
[p5sagit/p5-mst-13.2.git] / win32 / makedef.pl
index f080dcd..038c150 100644 (file)
@@ -14,6 +14,8 @@
 # that does not present in the WIN32 port but there is no easy
 # way to find them so I just put a exeception list here
 
+my $CCTYPE = shift || "MSVC";
+
 $skip_sym=<<'!END!OF!SKIP!';
 Perl_SvIV
 Perl_SvNV
@@ -119,23 +121,19 @@ Perl_yyname
 Perl_yyrule
 allgvs
 curblock
-curcop
-curcopdb
 curcsv
-envgv
 lastretstr
 mystack_mark
 perl_init_ext
 perl_requirepv
-siggv
 stack
 statusvalue_vms
-tainting
 Perl_safexcalloc
 Perl_safexmalloc
 Perl_safexfree
 Perl_safexrealloc
 Perl_my_memcmp
+Perl_my_memset
 Perl_cshlen
 Perl_cshname
 !END!OF!SKIP!
@@ -157,8 +155,8 @@ while (<GLOBAL>) {
        next if (/_amg[ \t]*$/);
        $symbol = "Perl_$_";
        next if ($skip_sym =~ m/$symbol/m);
-       print "\t$symbol";
-       };
+       emit_symbol($symbol);
+}
 close(GLOBAL);
 
 # also add symbols from interp.sym
@@ -174,8 +172,8 @@ while (<INTERP>) {
        $symbol = $_;
        next if ($skip_sym =~ m/$symbol/m);
        #print "\t$symbol";
-       print "\tPerl_$symbol";
-       };
+       emit_symbol("Perl_" . $symbol);
+}
 
 #close(INTERP);
 
@@ -185,8 +183,22 @@ while (<DATA>) {
        next if (/^#/);
        $symbol = $_;
        next if ($skip_sym =~ m/^$symbol/m);
-       print "\t$symbol";
-       };
+       emit_symbol($symbol);
+}
+
+sub emit_symbol {
+       my $symbol = shift;
+       chomp $symbol;
+       if ($CCTYPE eq "BORLAND") {
+               # workaround Borland quirk by exporting both the straight
+               # name and a name with leading underscore
+               #print "\t$symbol = _$symbol\n";
+               print "\t_$symbol\n";
+       }
+       else {
+               print "\t$symbol\n";
+       }
+}
 
 1;
 __DATA__
@@ -210,6 +222,7 @@ perl_call_sv
 perl_require_pv
 perl_eval_pv
 perl_eval_sv
+boot_DynaLoader
 win32_errno
 win32_environ
 win32_stdin
@@ -257,11 +270,12 @@ win32_close
 win32_eof
 win32_read
 win32_write
-win32_spawnvpe
-win32_spawnle
+win32_spawnvp
 win32_mkdir
 win32_rmdir
 win32_chdir
+win32_flock
+win32_execvp
 win32_htons
 win32_ntohs
 win32_htonl
@@ -304,3 +318,6 @@ win32_sethostent
 win32_setnetent
 win32_setprotoent
 win32_setservent
+win32_getenv
+win32_stdio
+Perl_win32_init