Commits

Iain Buclaw committed 1cf36f6

Uncomment implementations in rt.monitor_ (for MinGW), code cleanups.

Comments (0)

Files changed (3)

      * (as amd64 or s390x) so for full 64-bit archs (as ia64 or alpha) we
      * need to test it more. */
 #  ifdef D_CPU_VERSYM64
-        /* We are "defaulting" to 32-bit, which mean that if both D_CPU_VERSYM
-         * and D_CPU_VERSYM64 are defined, and not TARGET_64BIT, we will use
-         * 32 bits. This will be overidden for full 64-bit archs */
-        global.params.isX86_64 = 0;
+    /* We are "defaulting" to 32-bit, which mean that if both D_CPU_VERSYM
+     * and D_CPU_VERSYM64 are defined, and not TARGET_64BIT, we will use
+     * 32 bits. This will be overidden for full 64-bit archs */
+    global.params.isX86_64 = 0;
 #    ifndef D_CPU_VERSYM
-        /* So this is typically for alpha and ia64 */
-        global.params.isX86_64 = 1;
+    /* So this is typically for alpha and ia64 */
+    global.params.isX86_64 = 1;
 #    endif
 #  else
 #    ifdef D_CPU_VERSYM /* D_CPU_VERSYM is defined and D_CPU_VERSYM64 is not. */
-        global.params.isX86_64 = 0;
+    global.params.isX86_64 = 0;
 #    else
-        /* If none of D_CPU_VERSYM and D_CPU_VERSYM64 defined check size_t
-         * length instead. */
-        switch (sizeof(size_t))
-        {
-            case 4:
-                global.params.isX86_64 = 0;
-                break;
-            case 8:
-                global.params.isX86_64 = 1;
-                break;
-        }
+    /* If none of D_CPU_VERSYM and D_CPU_VERSYM64 defined check size_t
+     * length instead. */
+    switch (sizeof(size_t))
+    {
+        case 4:
+            global.params.isX86_64 = 0;
+            break;
+        case 8:
+            global.params.isX86_64 = 1;
+            break;
+    }
 #    endif
 #  endif
 #endif
     if (strcmp(D_OS_VERSYM, "darwin") == 0)
         VersionCondition::addPredefinedGlobalIdent("OSX");
     if (strcmp(D_OS_VERSYM, "Win32") == 0)
-    {
-        VersionCondition::addPredefinedGlobalIdent("Windows");
         is_target_win32 = true;
-    }
 #endif
 #ifdef D_OS_VERSYM2
     VersionCondition::addPredefinedGlobalIdent(D_OS_VERSYM2);
 
 
 use strict;
+use warnings;
 use Cwd qw(abs_path);
 use File::Basename;
 use File::Spec;
 my $output_parents;
 my $output_file;
 my $header_directory;
-my $header_parents;
 my $header_file;
 my $documentation_directory;
 my $documentation_file;
-my $default_lib;
-my $debug_lib;
 my $debug = 0;
 my $link = 1;
 my $header = 0;
 $gcc_version =~ m/^(\d+)\.(\d+)/;
 my ($gcc_maj, $gcc_min) = ( $1, $2 );
 
-my $target_machine = `$gdc -dumpmachine`;
-chomp $target_machine;
+#my $target_machine = `$gdc -dumpmachine`;
+#chomp $target_machine;
 
 sub addSourceFile($) {
     my ($arg) = @_;
 
     if ( length $target_prefix ) {
         foreach my $dir (split pathSep, $ENV{PATH}) {
-            $path = File::Spec->catfile( $path, $name );
+            $path = File::Spec->catfile( $dir, $name );
             return $name if -x $path; # Could return $path, but this looks better
         }
         errorExit "Could not find archiver command '$name'.";

d/druntime/rt/monitor_.d

 
 version( Windows )
 {
-    /+
     static __gshared CRITICAL_SECTION _monitor_critsec;
 
     extern (C) void _STI_monitor_staticctor()
         LeaveCriticalSection(&getMonitor(h).mon);
         debug(PRINTF) printf("-_d_monitor_release(%p)\n", h);
     }
-    +/
 }
 
 /* =============================== linux ============================ */