This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Accommodate POSIX-style arguments to heapgen.tcl under Cygwin


The following patch allows POSIX-style arguments to be processed when
invoking heapgen.tcl under Cygwin.

John Dallaway
eCosCentric Limited

--cut here--

Index: ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/packages/services/memalloc/common/current/ChangeLog,v
retrieving revision 1.25
diff -u -5 -r1.25 ChangeLog
--- ChangeLog	29 Jan 2003 12:45:02 -0000	1.25
+++ ChangeLog	4 Feb 2003 09:53:02 -0000
@@ -1,5 +1,10 @@
+2003-02-04  John Dallaway  <jld@ecoscentric.com>
+
+	* src/heapgen.tcl: Accommodate POSIX-style arguments
+	under Cygwin.
+
 2003-01-29  John Dallaway  <jld@ecoscentric.com>

 	* src/heapgen.tcl: Accommodate latest Cygwin Tcl shell
 	(tclsh83.exe)

Index: src/heapgen.tcl
===================================================================
RCS file: /cvs/ecos/ecos/packages/services/memalloc/common/current/src/heapgen.tcl,v
retrieving revision 1.7
diff -u -5 -r1.7 heapgen.tcl
--- src/heapgen.tcl	29 Jan 2003 12:45:03 -0000	1.7
+++ src/heapgen.tcl	4 Feb 2003 09:53:04 -0000
@@ -70,19 +70,28 @@
         }
         puts ""
     }
 }
 
+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

 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
 dputs "pwd=" [pwd]


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]