win32 extras and embedding
[p5sagit/p5-mst-13.2.git] / win32 / makedef.pl
index 7a1ddb2..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__
@@ -207,18 +219,22 @@ perl_call_argv
 perl_call_pv
 perl_call_method
 perl_call_sv
-perl_requirepv
-win32_stat
+perl_require_pv
+perl_eval_pv
+perl_eval_sv
+boot_DynaLoader
 win32_errno
-win32_stderr
+win32_environ
 win32_stdin
 win32_stdout
+win32_stderr
 win32_ferror
 win32_feof
 win32_strerror
 win32_fprintf
 win32_printf
 win32_vfprintf
+win32_vprintf
 win32_fread
 win32_fwrite
 win32_fopen
@@ -240,18 +256,26 @@ win32_rewind
 win32_tmpfile
 win32_abort
 win32_fstat
+win32_stat
 win32_pipe
 win32_popen
 win32_pclose
 win32_setmode
-win32_open
-win32_close
+win32_lseek
+win32_tell
 win32_dup
 win32_dup2
+win32_open
+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
@@ -294,3 +318,6 @@ win32_sethostent
 win32_setnetent
 win32_setprotoent
 win32_setservent
+win32_getenv
+win32_stdio
+Perl_win32_init