[win32] re-add PERLVARI?C? change that somehow went missing in makedef.pl
[p5sagit/p5-mst-13.2.git] / win32 / makedef.pl
index 1bda71e..75bd1c7 100644 (file)
 # that does not present in the WIN32 port but there is no easy
 # way to find them so I just put a exception list here
 
-while (@ARGV && $ARGV[0] =~ /^-/)
+my $CCTYPE = "MSVC";   # default
+
+while (@ARGV)
  {
   my $flag = shift;
   $define{$1} = 1 if ($flag =~ /^-D(\w+)$/);
+  $CCTYPE = $1 if ($flag =~ /^CCTYPE=(\w+)$/);
  } 
 
 open(CFG,'config.h') || die "Cannot open config.h:$!";
@@ -29,8 +32,6 @@ close(CFG);
 
 warn join(' ',keys %define)."\n";
 
-my $CCTYPE = shift || "MSVC";
-
 if ($CCTYPE ne 'GCC') 
  {
   print "LIBRARY Perl\n";
@@ -167,11 +168,6 @@ Perl_wait4pid
 Perl_watch
 Perl_yyname
 Perl_yyrule
-Perl_Yes
-Perl_No
-Perl_hexdigit
-Perl_patleave
-Perl_vert
 allgvs
 curblock
 curcsv
@@ -235,7 +231,11 @@ Perl_sv_true
 Perl_sv_uv
 Perl_sv_pvn
 Perl_newRV_noinc)];
+ }
 
+unless ($define{'FAKE_THREADS'})
+ {
+  skip_symbols [qw(Perl_curthr)];
  }
 
 sub readvar
@@ -247,7 +247,7 @@ sub readvar
   {
    # All symbols have a Perl_ prefix because that's what embed.h
    # sticks in front of them.
-   push(@syms,"Perl_".$1) if (/\bPERLVARI?\([IGT](\w+)/);
+   push(@syms,"Perl_".$1) if (/\bPERLVARI?C?\([IGT](\w+)/);
   } 
  close(VARS); 
  return \@syms;