diff packages/services/memalloc/common/current/src/heapgen.tcl @ 564:b2555133d1ad

* src/heapgen.tcl: Accommodate POSIX-style arguments under Cygwin.
author jld
date Tue, 04 Feb 2003 10:25:19 +0000
parents 181928a65a25
children
line wrap: on
line diff
--- a/packages/services/memalloc/common/current/src/heapgen.tcl
+++ b/packages/services/memalloc/common/current/src/heapgen.tcl
@@ -72,6 +72,15 @@ proc dputs { args } {
     }
 }
 
+proc tcl_path { posix_path } {
+    global tcl_platform
+    if { $tcl_platform(platform) == "windows" } {
+        return [ exec cygpath -w $posix_path ]
+    } else {
+        return $posix_path
+    }
+}
+
 dputs "argc=" $argc
 dputs "argv=" $argv
 
@@ -79,8 +88,8 @@ if { $argc != 2 } {
     error "Usage: heapgen.tcl installdir builddir"
 }
 
-set installdir [ lindex $argv 0 ]
-set builddir   [ lindex $argv 1 ]
+set installdir [ tcl_path [ lindex $argv 0 ] ]
+set builddir   [ tcl_path [ lindex $argv 1 ] ]
 
 dputs "builddir=" $builddir
 dputs "installdir=" $installdir