make 4-arg win32_select() sleep more reasonably on false values
[p5sagit/p5-mst-13.2.git] / win32 / makedef.pl
index 07dfa04..6592e46 100644 (file)
@@ -33,12 +33,18 @@ close(CFG);
 
 warn join(' ',keys %define)."\n";
 
+if ($define{PERL_OBJECT}) {
+    print "LIBRARY PerlCore\n";
+    print "DESCRIPTION 'Perl interpreter'\n";
+    print "EXPORTS\n";
+    output_symbol("perl_alloc");
+    exit(0);
+}
+
 if ($CCTYPE ne 'GCC') 
  {
   print "LIBRARY Perl\n";
   print "DESCRIPTION 'Perl interpreter, export autogenerated'\n";
-  print "CODE LOADONCALL\n";
-  print "DATA LOADONCALL NONSHARED MULTIPLE\n";
  }
 else
  {
@@ -104,7 +110,6 @@ Perl_dump_packsubs
 Perl_dump_pm
 Perl_dump_sub
 Perl_expectterm
-Perl_error_no
 Perl_extralen
 Perl_fetch_gv
 Perl_fetch_io
@@ -166,7 +171,7 @@ Perl_regmystartp
 Perl_regnarrate
 Perl_regnaughty
 Perl_regnpar
-Perl_regparse
+Perl_regcomp_parse
 Perl_regprecomp
 Perl_regprev
 Perl_regprogram
@@ -177,7 +182,7 @@ Perl_regsize
 Perl_regstartp
 Perl_regtill
 Perl_regxend
-Perl_rx
+Perl_regcomp_rx
 Perl_same_dirent
 Perl_saw_return
 Perl_scan_const
@@ -242,10 +247,17 @@ if ($define{'MYMALLOC'})
     Perl_realloc
     Perl_calloc)];
  }
+else
+ {
+  skip_symbols [qw(
+    Perl_malloced_size)];
+ }
 
 unless ($define{'USE_THREADS'})
  {
   skip_symbols [qw(
+Perl_getTHR
+Perl_setTHR
 Perl_condpair_magic
 Perl_thr_key
 Perl_sv_mutex
@@ -311,6 +323,8 @@ if ($define{'PERL_GLOBAL_STRUCT'})
  {
   my $global = readvar("../perlvars.h");
   skip_symbols $global;
+  emit_symbols [qw(Perl_GetVars)];
+  emit_symbols [qw(Perl_Vars Perl_VarsPtr)] unless $CCTYPE eq 'GCC';
  } 
 
 unless ($define{'DEBUGGING'})
@@ -351,11 +365,7 @@ close(GLOBAL);
 # doesn't hurt to include them anyway.
 # these don't have Perl prefix
 
-if ($define{'PERL_GLOBAL_STRUCT'})
- {
-  emit_symbol( ($CCTYPE eq 'GCC') ? 'Perl_GetVars' : 'Perl_VarsPtr')
- }
-else
+unless ($define{'PERL_GLOBAL_STRUCT'})
  {
   my $glob = readvar("../perlvars.h");
   emit_symbols $glob;
@@ -386,25 +396,7 @@ while (<DATA>) {
 
 foreach my $symbol (sort keys %export)
  {
-       if ($CCTYPE eq "BORLAND") {
-               # workaround Borland quirk by exporting both the straight
-               # name and a name with leading underscore.  Note the
-               # alias *must* come after the symbol itself, if both
-               # are to be exported. (Linker bug?)
-               print "\t_$symbol\n";
-               print "\t$symbol = _$symbol\n";
-       }
-        elsif ($CCTYPE eq 'GCC') {
-                # Symbols have leading _ whole process is $%£"% slow
-                # so skip aliases for now
-               print "\t$symbol\n";
-        }
-       else {
-               # for binary coexistence, export both the symbol and
-               # alias with leading underscore
-               print "\t$symbol\n";
-               print "\t_$symbol = $symbol\n";
-       }
+   output_symbol($symbol);
  }
 
 sub emit_symbol {
@@ -413,12 +405,36 @@ sub emit_symbol {
        $export{$symbol} = 1;
 }
 
+sub output_symbol {
+    my $symbol = shift;
+    if ($CCTYPE eq "BORLAND") {
+           # workaround Borland quirk by exporting both the straight
+           # name and a name with leading underscore.  Note the
+           # alias *must* come after the symbol itself, if both
+           # are to be exported. (Linker bug?)
+           print "\t_$symbol\n";
+           print "\t$symbol = _$symbol\n";
+    }
+    elsif ($CCTYPE eq 'GCC') {
+           # Symbols have leading _ whole process is $%£"% slow
+           # so skip aliases for now
+           print "\t$symbol\n";
+    }
+    else {
+           # for binary coexistence, export both the symbol and
+           # alias with leading underscore
+           print "\t$symbol\n";
+           print "\t_$symbol = $symbol\n";
+    }
+}
+
 1;
 __DATA__
 # extra globals not included above.
 perl_init_i18nl10n
 perl_init_ext
 perl_alloc
+perl_atexit
 perl_construct
 perl_destruct
 perl_free
@@ -435,6 +451,11 @@ perl_call_sv
 perl_require_pv
 perl_eval_pv
 perl_eval_sv
+perl_new_ctype
+perl_new_collate
+perl_new_numeric
+perl_set_numeric_standard
+perl_set_numeric_local
 boot_DynaLoader
 Perl_thread_create
 win32_errno
@@ -489,6 +510,7 @@ win32_mkdir
 win32_rmdir
 win32_chdir
 win32_flock
+win32_execv
 win32_execvp
 win32_htons
 win32_ntohs
@@ -558,7 +580,15 @@ win32_get_osfhandle
 win32_ioctl
 win32_utime
 win32_wait
+win32_waitpid
+win32_kill
 win32_str_os_error
+win32_opendir
+win32_readdir
+win32_telldir
+win32_seekdir
+win32_rewinddir
+win32_closedir
 Perl_win32_init
 Perl_init_os_extras
 Perl_getTHR