Add Open Perl IDE, remove Perl Code Magic (the site seems
[p5sagit/p5-mst-13.2.git] / vms / gen_shrfls.pl
index c668120..48499d4 100644 (file)
@@ -68,16 +68,21 @@ if ($docc) {
   elsif (-f '[-]perl.h') { $dir = '[-]'; }
   else { die "$0: Can't find perl.h\n"; }
 
-  # Go see if debugging is enabled in config.h
-  $config = $dir . "config.h";
+  $use_threads = $use_mymalloc = $case_about_case = $debugging_enabled = 0;
+  $hide_mymalloc = $isgcc = 0;
+
+  # Go see what is enabled in config.sh
+  $config = $dir . "config.sh";
   open CONFIG, "< $config";
   while(<CONFIG>) {
-    $debugging_enabled++ if /define\s+DEBUGGING/;
-    $use_mymalloc++ if /define\s+MYMALLOC/;
-    $hide_mymalloc++ if /define\s+EMBEDMYMALLOC/;
-    $use_threads++ if /define\s+USE_THREADS/;
-    $care_about_case++ if /define\s+VMS_WE_ARE_CASE_SENSITIVE/;
+    $use_threads++ if /usethreads='define'/;
+    $use_mymalloc++ if /usemymalloc='Y'/;
+    $care_about_case++ if /d_vms_case_sensitive_symbols='define'/;
+    $debugging_enabled++ if /usedebugging_perl='Y'/;
+    $hide_mymalloc++ if /embedmymalloc='Y'/;
+    $isgcc++ if /gccversion='[^']/;
   }
+  close CONFIG;
   
   # put quotes back onto defines - they were removed by DCL on the way in
   if (($prefix,$defines,$suffix) =
@@ -92,8 +97,7 @@ if ($docc) {
 
   # check for gcc - if present, we'll need to use MACRO hack to
   # define global symbols for shared variables
-  $isgcc = `$cc_cmd _nla0:/Version` =~ /GNU/
-           or 0; # make debug output nice
+
   print "\$isgcc: $isgcc\n" if $debug;
   print "\$debugging_enabled: $debugging_enabled\n" if $debug;
 
@@ -168,7 +172,7 @@ if ($docc) {
 else {
   open(CPP,"$cpp_file") or die "$0: Can't read preprocessed file $cpp_file: $!\n";
 }
-%checkh = map { $_,1 } qw( thread bytecode byterun proto );
+%checkh = map { $_,1 } qw( thread bytecode byterun proto perlio );
 $ckfunc = 0;
 LINE: while (<CPP>) {
   while (/^#.*vmsish\.h/i .. /^#.*perl\.h/i) {
@@ -186,12 +190,6 @@ LINE: while (<CPP>) {
     print "opcode.h>> $_" if $debug > 2;
     if (/^OP \*\s/) { &scan_func($_); }
     if (/^\s*EXT/) { &scan_var($_); }
-    if (/^\s+OP_/) { &scan_enum($_); }
-    last LINE unless defined($_ = <CPP>);
-  }
-  while (/^typedef enum/ .. /^\s*\}/) {
-    print "global enum>> $_" if $debug > 2;
-    &scan_enum($_);
     last LINE unless defined($_ = <CPP>);
   }
   # Check for transition to new header file
@@ -334,6 +332,7 @@ if ($ENV{PERLSHR_USE_GSMATCH}) {
     # number in the top four bits and use the bottom four for build options
     # that'll cause incompatibilities
     ($ver, $sub) = $] =~ /\.(\d\d\d)(\d\d)/;
+    $ver += 0; $sub += 0;
     $gsmatch = ($sub >= 50) ? "equal" : "lequal"; # Force an equal match for
                                                  # dev, but be more forgiving
                                                  # for releases