Re: CVS Insight running on Windows 7 x64 using ActiveTCL, mingw/msys, built for arm-none-eabi

George Najarian <[email protected]>
Newsgroups gmane.comp.debugging.insight
Message-ID <[email protected]>
This is what I needed to do to compile insight for mingw on win7.

Download:
MSYS and MINGW - I used the trolltech mingw and msys from sourceforge
ftp://ftp.trolltech.com/misc/MinGW-gcc440_1.zip
http://cdnetworks-us-1.dl.sourceforge.net/project/mingw-w64/External%20binary%20packages%20%28Win64%20hosted%29/MSYS%20%2832-bit%29/MSYS-20100707.zip
ActiveTCL 8.5.8
TCL and TK 8.5.8 sources

install the activetcl files and unzip the tcl and tk sources into a build directory
create build directories for tcl and tk and configure/make all them from the win
directory. Do not make install.

Grab insight cvs source tree. Apply patch. create a build directory and configure/make all 
install.

No warranty is expressed or implied. YMMV. everything should work.

george


On 7/9/2010 2:10 PM, Keith Seitz wrote:
> On 07/09/2010 01:48 PM, George Najarian wrote:
>> Would it make any sense to put together a patch file and short writeup
>> on how I got all this to work?
>
> It couldn't hurt! Heaven knows, I've never tried mingw at all... [But then, my windows box
> is about fifteen years old.]
>
> Perhaps I can add your information to the FAQ.
>
> Keith
>
insight_tcl85_mingw.patch (text/plain, 23.4 KB)
Index: src/config/tcl.m4
===================================================================
RCS file: /cvs/src/src/config/tcl.m4,v
retrieving revision 1.3
diff -u -r1.3 tcl.m4
--- src/config/tcl.m4	2 Feb 2009 23:18:05 -0000	1.3
+++ src/config/tcl.m4	10 Jul 2010 07:16:26 -0000
@@ -33,7 +33,7 @@
 
 	    # First check to see if --with-tcl was specified.
 	    case "${host}" in
-		*-*-cygwin*) platDir="win" ;;
+		*-*-cygwin* | *-*-mingw*) platDir="win" ;;
 		*) platDir="unix" ;;
 	    esac
 	    if test x"${with_tclconfig}" != x ; then
@@ -165,7 +165,7 @@
 
 	    # then check for a private Tk library
 	    case "${host}" in
-		*-*-cygwin*) platDir="win" ;;
+		*-*-cygwin* | *-*-mingw*) platDir="win" ;;
 		*) platDir="unix" ;;
 	    esac
 	    if test x"${ac_cv_c_tkconfig}" = x ; then
Index: src/gdb/acinclude.m4
===================================================================
RCS file: /cvs/src/src/gdb/acinclude.m4,v
retrieving revision 1.36
diff -u -r1.36 acinclude.m4
--- src/gdb/acinclude.m4	27 May 2010 03:40:45 -0000	1.36
+++ src/gdb/acinclude.m4	10 Jul 2010 07:16:30 -0000
@@ -362,14 +362,14 @@
 ])
 
 dnl Find the location of the private Tcl headers
-dnl When Tcl is installed, this is TCL_INCLUDE_SPEC/tcl-private/generic
+dnl When Tcl is installed, this is TCL_INCLUDE_SPEC/generic
 dnl When Tcl is in the build tree, this is not needed.
 dnl
 dnl Note: you must use first use SC_LOAD_TCLCONFIG!
 AC_DEFUN([CY_AC_TCL_PRIVATE_HEADERS], [
   AC_MSG_CHECKING([for Tcl private headers])
   private_dir=""
-  dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
+  dir=`echo ${TCL_SRC_DIR}/generic | sed -e s/-I//`
   if test -f ${dir}/tclInt.h ; then
     private_dir=${dir}
   fi
@@ -383,20 +383,20 @@
 ])
 
 dnl Find the location of the private Tk headers
-dnl When Tk is installed, this is TK_INCLUDE_SPEC/tk-private/generic
+dnl When Tk is installed, this is TK_INCLUDE_SPEC/generic
 dnl When Tk is in the build tree, this not needed.
 dnl
 dnl Note: you must first use SC_LOAD_TKCONFIG
 AC_DEFUN([CY_AC_TK_PRIVATE_HEADERS], [
-  AC_MSG_CHECKING([for Tk private headers])
+  AC_MSG_CHECKING([for Tk headers])
   private_dir=""
-  dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
+  dir=`echo ${TK_SRC_DIR}/generic | sed -e s/-I//`
   if test -f ${dir}/tkInt.h; then
     private_dir=${dir}
   fi
 
   if test x"${private_dir}" = x; then
-    AC_ERROR(could not find Tk private headers)
+    AC_ERROR(could not find Tk headers)
   else
     TK_PRIVATE_INCLUDE="-I${private_dir}"
     AC_MSG_RESULT(${private_dir})
Index: src/gdb/configure
===================================================================
RCS file: /cvs/src/src/gdb/configure,v
retrieving revision 1.310
diff -u -r1.310 configure
--- src/gdb/configure	23 Jun 2010 10:12:14 -0000	1.310
+++ src/gdb/configure	10 Jul 2010 07:16:32 -0000
@@ -14988,7 +14988,7 @@
 
 	    # First check to see if --with-tcl was specified.
 	    case "${host}" in
-		*-*-cygwin*) platDir="win" ;;
+		*-*-cygwin* | *-*-mingw*) platDir="win" ;;
 		*) platDir="unix" ;;
 	    esac
 	    if test x"${with_tclconfig}" != x ; then
@@ -15117,7 +15117,7 @@
 
 	    # then check for a private Tk library
 	    case "${host}" in
-		*-*-cygwin*) platDir="win" ;;
+		*-*-cygwin* | *-*-mingw*) platDir="win" ;;
 		*) platDir="unix" ;;
 	    esac
 	    if test x"${ac_cv_c_tkconfig}" = x ; then
@@ -15285,16 +15285,16 @@
         # Find Tcl private headers
         if test x"${intree}" = xno; then
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl headers" >&5
 $as_echo_n "checking for Tcl private headers... " >&6; }
   private_dir=""
-  dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
+  dir=`echo ${TCL_SRC_DIR}/generic | sed -e s/-I//`
   if test -f ${dir}/tclInt.h ; then
     private_dir=${dir}
   fi
 
   if test x"${private_dir}" = x; then
-    as_fn_error "could not find private Tcl headers" "$LINENO" 5
+    as_fn_error "could not findTcl headers" "$LINENO" 5
   else
     TCL_PRIVATE_INCLUDE="-I${private_dir}"
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
@@ -15394,16 +15394,16 @@
         # Find Tk private headers
         if test x"${intree}" = xno; then
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
-$as_echo_n "checking for Tk private headers... " >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tkheaders" >&5
+$as_echo_n "checking for Tkheaders... " >&6; }
   private_dir=""
-  dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
+  dir=`echo ${TK_SRC_DIR}/generic | sed -e s/-I//`
   if test -f ${dir}/tkInt.h; then
     private_dir=${dir}
   fi
 
   if test x"${private_dir}" = x; then
-    as_fn_error "could not find Tk private headers" "$LINENO" 5
+    as_fn_error "could not find Tkheaders" "$LINENO" 5
   else
     TK_PRIVATE_INCLUDE="-I${private_dir}"
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
Index: src/gdb/configure.ac
===================================================================
RCS file: /cvs/src/src/gdb/configure.ac,v
retrieving revision 1.124
diff -u -r1.124 configure.ac
--- src/gdb/configure.ac	23 Jun 2010 10:12:14 -0000	1.124
+++ src/gdb/configure.ac	10 Jul 2010 07:16:32 -0000
@@ -1910,7 +1910,7 @@
           # If building tcl in the same src tree, private headers
           # are not needed, but we need to be sure to use the right
           # headers library
-	  TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"          
+	  TCL_INCLUDE="-I${TCL_SRC_DIR}/generic -I${TCL_SRC_DIR}/${platDir}"          
           TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
           TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
         fi
@@ -1933,7 +1933,7 @@
 	  TK_LIBRARY=${TK_LIB_SPEC}
           TK_DEPS=""
         else
-          TK_INCLUDE="-I${TK_SRC_DIR}/generic"
+          TK_INCLUDE="-I${TK_SRC_DIR}/generic -I${TK_SRC_DIR}/${platDir}"
           TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
           TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
         fi
Index: src/gdb/gdbtk/generic/gdbtk-bp.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk-bp.c,v
retrieving revision 1.36
diff -u -r1.36 gdbtk-bp.c
--- src/gdb/gdbtk/generic/gdbtk-bp.c	2 Apr 2010 23:39:55 -0000	1.36
+++ src/gdb/gdbtk/generic/gdbtk-bp.c	10 Jul 2010 07:16:52 -0000
@@ -179,11 +179,11 @@
 
 /* set a breakpoint by source file and line number
    flags are as follows:
-   least significant 2 bits are disposition, rest is 
+   least significant 2 bits are disposition, rest is
    type (normally 0).
 
    enum bptype {
-   bp_breakpoint,                Normal breakpoint 
+   bp_breakpoint,                Normal breakpoint
    bp_hardware_breakpoint,      Hardware assisted breakpoint
    }
 
@@ -191,8 +191,8 @@
    enum bpdisp {
    del,                         Delete it
    del_at_next_stop,            Delete at next stop, whether hit or not
-   disable,                     Disable it 
-   donttouch                    Leave it alone 
+   disable,                     Disable it
+   donttouch                    Leave it alone
    };
 */
 
@@ -217,7 +217,7 @@
       Tcl_WrongNumArgs (interp, 1, objv, "address");
       return TCL_ERROR;
     }
-  
+
   if (Tcl_GetWideIntFromObj (interp, objv[1], &waddr) != TCL_OK)
     return TCL_ERROR;
   addr = waddr;
@@ -319,7 +319,7 @@
 
   isPending = (b->loc == NULL);
   Tcl_SetListObj (result_ptr->obj_ptr, 0, NULL);
-  /* Pending breakpoints will display "<PENDING>" as the file name and the 
+  /* Pending breakpoints will display "<PENDING>" as the file name and the
      user expression into the Function field of the breakpoint view.
     "0" and "0" in the line number and address field.  */
   if (isPending)
@@ -546,11 +546,11 @@
 
   TRY_CATCH (e, RETURN_MASK_ALL)
     {
-      create_breakpoint (get_current_arch (), address, condition, thread,
-			 0	/* condition and thread are valid */,
-			 temp,
-			 0	/* hardware flag */,
-			 0	/* trace flag */,
+      create_breakpoint (get_current_arch (), address,
+             condition, thread,
+			 0,
+			 temp,
+			 bp_breakpoint /* type wanted */,
 			 ignore_count,
 			 (pending ? AUTO_BOOLEAN_TRUE : AUTO_BOOLEAN_FALSE),
 			 NULL	/* breakpoint ops */,
@@ -569,7 +569,7 @@
  * events from gdb.
  */
 
-/* The next three functions use breakpoint_notify to allow the GUI 
+/* The next three functions use breakpoint_notify to allow the GUI
  * to handle creating, deleting and modifying breakpoints.  These three
  * functions are put into the appropriate gdb hooks in gdbtk_init.
  */
@@ -644,7 +644,7 @@
 
   if (Tcl_Eval (gdbtk_interp, buf) != TCL_OK)
     report_error ();
-  free(buf); 
+  free(buf);
 }
 
 /*
@@ -689,7 +689,7 @@
 			  &gdbtk_obj_array);
   gdbtk_obj_array_ptr = 1;
   commands = read_command_lines_1 (gdbtk_read_next_line, 1,
-				   check_tracepoint_command, tp);  
+				   check_tracepoint_command, tp);
 
   breakpoint_set_commands (tp, commands);
   return TCL_OK;
@@ -919,5 +919,5 @@
 
   if (Tcl_Eval (gdbtk_interp, buf) != TCL_OK)
     report_error ();
-  free(buf); 
+  free(buf);
 }
Index: src/gdb/gdbtk/library/main.tcl
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/main.tcl,v
retrieving revision 1.19
diff -u -r1.19 main.tcl
--- src/gdb/gdbtk/library/main.tcl	2 Aug 2008 22:08:32 -0000	1.19
+++ src/gdb/gdbtk/library/main.tcl	10 Jul 2010 07:16:52 -0000
@@ -56,7 +56,7 @@
 # Require the packages we need.  Most are loaded already, but this will catch 
 # any odd errors... :
 
-foreach p {{Tcl 8.4} {Tk 8.4} {Itcl 3.3} {Itk 3.3} {Iwidgets 4.0} {Gdbtk 1.0} {combobox 2.2} {debug 1.0}} {
+foreach p {{Tcl 8.5} {Tk 8.5} {Itcl 3.4} {Itk 3.4} {Iwidgets 4.0} {Gdbtk 1.0} {combobox 2.2} {debug 1.0}} {
   if {[catch {package require [lindex $p 0] [lindex $p 1]} msg]} {
     if {![info exists ::env(GDBTK_TEST_RUNNING)] || $::env(GDBTK_TEST_RUNNING) == 0} {
       if {$::tcl_platform(platform) != "windows"} {
Index: src/gdb/gdbtk/library/targetselection.itb
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/targetselection.itb,v
retrieving revision 1.24
diff -u -r1.24 targetselection.itb
--- src/gdb/gdbtk/library/targetselection.itb	24 Apr 2009 03:04:56 -0000	1.24
+++ src/gdb/gdbtk/library/targetselection.itb	10 Jul 2010 07:16:53 -0000
@@ -39,8 +39,8 @@
 
 itcl::body TargetSelection::init_target_db {} {
   # check to see if we already initialized this database
-  if {$db_inited} { 
-    return 
+  if {$db_inited} {
+    return
   }
   set db_inited 1
 
@@ -296,7 +296,7 @@
     IRIX    { set port /dev/foo1 }
     OSF1    { set port /dev/foo1 }
     NetBSD  { set port /dev/foo1 }
-    HP-UX   { 
+    HP-UX   {
       # Special case...
       switch -regexp $gdbtk_platform(osVersion) {
 	A.09 { set port /dev/tty00 }
@@ -306,7 +306,7 @@
     }
     default { set port /dev/ttya }
   }
-  
+
   return $port
 }
 
@@ -345,14 +345,14 @@
   if {$target == "" || [string compare $target CANCEL] == 0} {
     set target default
   }
-    
+
   set defbaud $gdb_target($target,defbaud)
   pref define gdb/load/$target-baud $defbaud
   pref define gdb/load/$target-port [pref get gdb/load/default-port]
   pref define gdb/load/$target-verbose [pref get gdb/load/default-verbose]
   pref define gdb/load/$target-portname 1000
   pref define gdb/load/$target-hostname [pref get gdb/load/default-hostname]
-  
+
   set err [catch {pref get gdb/load/$target-runlist} run_list]
   if {$err} {
     set run_list $gdb_target($target,runlist)
@@ -362,7 +362,7 @@
   pref set gdb/src/run_load   [lindex $run_list 1]
   pref set gdb/src/run_run    [lindex $run_list 2]
   pref set gdb/src/run_cont   [lindex $run_list 3]
-  
+
   set err [catch {pref get gdb/load/$target-after_attaching} aa]
   if {$err} {
     set aa $gdb_target($target,after_attaching)
@@ -463,7 +463,7 @@
       IRIX   { set ports [list /dev/foo1 /dev/foo2] }
       OSF1   { set ports [list /dev/foo1 /dev/foo2] }
       NetBSD { set ports [list /dev/foo1 /dev/foo2] }
-      HP-UX  { 
+      HP-UX  {
 	# Special case...
 	switch -regexp $gdbtk_platform(osVersion) {
 	  A.09 { set ports [list /dev/tty00 /dev/tty01] }
@@ -562,7 +562,7 @@
   set var [pref varname gdb/src/run_cont]
   radiobutton $RunMethod.cont -text {Continue from Last Stop} -value 1 -variable $var \
     -command [code $this set_run run]
-  
+
   set var [pref varname gdb/src/run_run]
   radiobutton $RunMethod.run -text {Run Program} -value 1 -variable $var \
     -command [code $this set_run cont]
@@ -576,7 +576,7 @@
 
   grid $RunMethod.run -column 0 -row 1 -sticky w -ipady 2
   grid $RunMethod.cont -column 0 -row 2 -sticky w -ipady 2
-  
+
   grid $rm_frame -column 1 -row 1 -rowspan 2 -sticky nsew -ipady 2
 
   grid $frame.afterl -row 4 -sticky we -columnspan 2 -ipady 2
@@ -612,7 +612,7 @@
 
   pack $btns -side bottom -anchor e
   focus $btns.ok
-  
+
   # set up balloon help
   balloon register $f.fr.bp.at_func "Set User-Speficied Breakpoints at Run Time"
   balloon register $f.fr.bp.func "Enter a List of Functions for Breakpoints"
@@ -765,7 +765,7 @@
     }
     $fr.cbl configure -text "Baud Rate:"
     $fr.cb configure -textvariable [pref varname gdb/load/$t-baud]
-    
+
     if {$mapped2 != "$fr.port"} {
       grid forget $mapped2
       set mapped2 $fr.port
@@ -893,10 +893,10 @@
 # ------------------------------------------------------------------
 itcl::body TargetSelection::port_list {} {
   global gdbtk_platform
-  if {[string compare $gdbtk_platform(os) "cygwin"] == 0} {
-    set device "/dev/com"
+  if {[string compare $gdbtk_platform(platform) "windows"] == 0} {
+    set device "/dev/ttyS"
   } else {
-    set device "COM"
+    set device "\\\\.\\com"
   }
   set plist ""
   # Scan com1 - com8 trying to open each one.
@@ -906,19 +906,21 @@
   # a terminal program.
   set quit 0
   for {set i 1} {!$quit} {incr i} {
-    if {[catch { set fd [::open COM$i: RDWR] } msg]} {
+    if {[catch { set fd [::open $device$i rw+] } msg]} {
       # Failed.  Find out why.
       if {[string first "permission denied" $msg] != -1} {
 	# Port is there, but busy right now. That's OK.
 	lappend plist $device$i
       } elseif {$i > 4} {
-	# if we've scanned the first 4 ports, then quit when we find no more 
+	# if we've scanned the first 4 ports, then quit when we find no more
 	set quit 1
       }
     } else {
       # We got it.  Now close it and add to list.
-      close $fd
+      if {[catch { close $fd } msg]} {
+      } else {
       lappend plist $device$i
+      }
     }
   }
   return $plist
@@ -967,7 +969,7 @@
   } else {
     tk_messageBox -message "The current target is not valid."
   }
-  
+
 }
 
 
@@ -989,7 +991,7 @@
 }
 
 # ------------------------------------------------------------------
-#  METHOD: set_check_button - enable/disable compare-section command 
+#  METHOD: set_check_button - enable/disable compare-section command
 # ------------------------------------------------------------------
 itcl::body TargetSelection::set_check_button {name} {
   if {[winfo exists  $itk_interior.f.fr.check]} {
Index: src/gdb/gdbtk/plugins/configure
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/plugins/configure,v
retrieving revision 1.6
diff -u -r1.6 configure
--- src/gdb/gdbtk/plugins/configure	9 Nov 2009 19:27:29 -0000	1.6
+++ src/gdb/gdbtk/plugins/configure	10 Jul 2010 07:16:53 -0000
@@ -3826,6 +3826,7 @@
 supported=yes
 case "${host}" in
   *cygwin*) ;;
+  *mingw*) ;;
   *solaris*) ;;
   *linux*) ;;
   *) supported=no ;;
Index: src/libgui/acinclude.m4
===================================================================
RCS file: /cvs/src/src/libgui/acinclude.m4,v
retrieving revision 1.4
diff -u -r1.4 acinclude.m4
--- src/libgui/acinclude.m4	2 Aug 2008 23:33:36 -0000	1.4
+++ src/libgui/acinclude.m4	10 Jul 2010 07:17:13 -0000
@@ -1,20 +1,20 @@
 sinclude(../config/tcl.m4)
 
 dnl Find the location of the private Tcl headers
-dnl When Tcl is installed, this is TCL_INCLUDE_SPEC/tcl-private/generic
+dnl When Tcl is installed, this is TCL_INCLUDE_SPEC/generic
 dnl When Tcl is in the build tree, this is not needed.
 dnl
 dnl Note: you must use first use SC_LOAD_TCLCONFIG!
 AC_DEFUN([CY_AC_TCL_PRIVATE_HEADERS], [
-  AC_MSG_CHECKING([for Tcl private headers])
+  AC_MSG_CHECKING([for Tcl headers])
   private_dir=""
-  dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
+  dir=`echo ${TCL_SRC_DIR}/generic | sed -e s/-I//`
   if test -f ${dir}/tclInt.h ; then
     private_dir=${dir}
   fi
 
   if test x"${private_dir}" = x; then
-    AC_ERROR(could not find private Tcl headers)
+    AC_ERROR(could not find Tcl headers)
   else
     TCL_PRIVATE_INCLUDE="-I${private_dir}"
     AC_MSG_RESULT(${private_dir})
@@ -27,15 +27,15 @@
 dnl
 dnl Note: you must first use SC_LOAD_TKCONFIG
 AC_DEFUN([CY_AC_TK_PRIVATE_HEADERS], [
-  AC_MSG_CHECKING([for Tk private headers])
+  AC_MSG_CHECKING([for Tkheaders])
   private_dir=""
-  dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
+  dir=`echo ${TK_SRC_DIR}/generic | sed -e s/-I//`
   if test -f ${dir}/tkInt.h; then
     private_dir=${dir}
   fi
 
   if test x"${private_dir}" = x; then
-    AC_ERROR(could not find Tk private headers)
+    AC_ERROR(could not find Tkheaders)
   else
     TK_PRIVATE_INCLUDE="-I${private_dir}"
     AC_MSG_RESULT(${private_dir})
Index: src/libgui/configure
===================================================================
RCS file: /cvs/src/src/libgui/configure,v
retrieving revision 1.20
diff -u -r1.20 configure
--- src/libgui/configure	9 Nov 2009 19:23:12 -0000	1.20
+++ src/libgui/configure	10 Jul 2010 07:17:13 -0000
@@ -4673,7 +4673,7 @@
 
 	    # First check to see if --with-tcl was specified.
 	    case "${host}" in
-		*-*-cygwin*) platDir="win" ;;
+		*-*-cygwin* | *-*-mingw*) platDir="win" ;;
 		*) platDir="unix" ;;
 	    esac
 	    if test x"${with_tclconfig}" != x ; then
@@ -4868,7 +4868,7 @@
 
 	    # then check for a private Tk library
 	    case "${host}" in
-		*-*-cygwin*) platDir="win" ;;
+		*-*-cygwin* | *-*-mingw*) platDir="win" ;;
 		*) platDir="unix" ;;
 	    esac
 	    if test x"${ac_cv_c_tkconfig}" = x ; then
@@ -5027,7 +5027,7 @@
 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
   # Using in-tree Tcl/Tk
   case "${host}" in
-    *-*-cygwin*) platDir="win" ;;
+    *-*-cygwin* | *-*-mingw*) platDir="win" ;;
     *) platDir="unix" ;;
   esac
 
@@ -5038,16 +5038,17 @@
 else
   # Using installed Tcl/Tk
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
-$as_echo_n "checking for Tcl private headers... " >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl headers" >&5
+$as_echo_n "checking for Tcl headers... " >&6; }
   private_dir=""
-  dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
+  dir=`echo ${TCL_SRC_DIR}/generic | sed -e s/-I//`
+$as_echo ${TCL_INCLUDE_SPEC} $dir >&5
   if test -f ${dir}/tclInt.h ; then
     private_dir=${dir}
   fi
 
   if test x"${private_dir}" = x; then
-    as_fn_error "could not find private Tcl headers" "$LINENO" 5
+    as_fn_error "could not find Tcl headers" "$LINENO" 5
   else
     TCL_PRIVATE_INCLUDE="-I${private_dir}"
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
@@ -5055,25 +5056,25 @@
   fi
 
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
-$as_echo_n "checking for Tk private headers... " >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tkheaders" >&5
+$as_echo_n "checking for Tkheaders... " >&6; }
   private_dir=""
-  dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
+  dir=`echo ${TK_SRC_DIR}/generic | sed -e s/-I//`
   if test -f ${dir}/tkInt.h; then
     private_dir=${dir}
   fi
 
   if test x"${private_dir}" = x; then
-    as_fn_error "could not find Tk private headers" "$LINENO" 5
+    as_fn_error "could not find Tk headers" "$LINENO" 5
   else
     TK_PRIVATE_INCLUDE="-I${private_dir}"
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
 $as_echo "${private_dir}" >&6; }
   fi
 
-  TCL_INCLUDES="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
+  TCL_INCLUDES="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE} -I${TCL_SRC_DIR}/${platDir}"
   TCL_LIBRARY=${TCL_LIB_SPEC}
-  TK_INCLUDES="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
+  TK_INCLUDES="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE} -I${TK_SRC_DIR}/${platDir}"
   TK_LIBRARY=${TK_LIB_SPEC}
 fi
 
Index: src/libgui/configure.ac
===================================================================
RCS file: /cvs/src/src/libgui/configure.ac,v
retrieving revision 1.4
diff -u -r1.4 configure.ac
--- src/libgui/configure.ac	2 Aug 2008 23:33:36 -0000	1.4
+++ src/libgui/configure.ac	10 Jul 2010 07:17:14 -0000
@@ -93,7 +93,7 @@
 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
   # Using in-tree Tcl/Tk
   case "${host}" in
-    *-*-cygwin*) platDir="win" ;;
+    *-*-cygwin* | *-*-mingw*) platDir="win" ;;
     *) platDir="unix" ;;
   esac
 
@@ -105,9 +105,9 @@
   # Using installed Tcl/Tk
   CY_AC_TCL_PRIVATE_HEADERS
   CY_AC_TK_PRIVATE_HEADERS
-  TCL_INCLUDES="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
+  TCL_INCLUDES="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE} -I${TCL_SRC_DIR}/${platDir}"
   TCL_LIBRARY=${TCL_LIB_SPEC}
-  TK_INCLUDES="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
+  TK_INCLUDES="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE} -I${TK_SRC_DIR}/${platDir}"
   TK_LIBRARY=${TK_LIB_SPEC}
 fi
 
Index: src/libgui/src/tkWinPrintText.c
===================================================================
RCS file: /cvs/src/src/libgui/src/tkWinPrintText.c,v
retrieving revision 1.5
diff -u -r1.5 tkWinPrintText.c
--- src/libgui/src/tkWinPrintText.c	8 Sep 2001 22:34:48 -0000	1.5
+++ src/libgui/src/tkWinPrintText.c	10 Jul 2010 07:17:15 -0000
@@ -358,15 +358,15 @@
     /* Make the text widget big enough for all the
     text to be seen. */
 
-    numLines = TkBTreeNumLines(textPtr->tree);
+    numLines = TkBTreeNumLines(textPtr->sharedTextPtr->tree, textPtr);
 #if (TCL_MAJOR_VERSION >= 8) && (TCL_MINOR_VERSION >= 1)
-    TkTextMakeByteIndex(textPtr->tree, 0, 0, &first);
-    TkTextMakeByteIndex(textPtr->tree, numLines, 100, &last);
+    TkTextMakeByteIndex(textPtr->sharedTextPtr->tree, textPtr, 0, 0, &first);
+    TkTextMakeByteIndex(textPtr->sharedTextPtr->tree, textPtr, numLines, 100, &last);
 #else
     TkTextMakeIndex(textPtr->tree, 0, 0, &first);
     TkTextMakeIndex(textPtr->tree, numLines, 100, &last);
 #endif
-    TkTextChanged(textPtr, &first, &last);
+    TkTextChanged(textPtr->sharedTextPtr, textPtr, &first, &last);
 
     /*
      * Set the display info flag to out-of-date.
@@ -437,7 +437,7 @@
     /*
      * Pitch the info again.
      */
-    TkTextChanged(textPtr, &first, &last);
+    TkTextChanged(textPtr->sharedTextPtr, textPtr, &first, &last);
 
     /*
      * Display info not valid anymore.
@@ -519,13 +519,13 @@
 	} else {
 	    x = chunkPtr->x + dInfoPtr->x - dInfoPtr->curPixelOffset;
 	    if ((x + chunkPtr->width <= 0) || (x >= dInfoPtr->maxX)) {
-	        (*chunkPtr->displayProc)(chunkPtr, -chunkPtr->width,
+	        (*chunkPtr->displayProc)(textPtr, chunkPtr, -chunkPtr->width,
 		    dlPtr->y,
 		    dlPtr->height - dlPtr->spaceAbove - dlPtr->spaceBelow,
 		    dlPtr->baseline - dlPtr->spaceAbove, display, (unsigned long)drawable,
 		    dlPtr->y + dlPtr->spaceAbove);
 	    } else {
-	        (*chunkPtr->displayProc)(chunkPtr, x, dlPtr->y,
+	        (*chunkPtr->displayProc)(textPtr, chunkPtr, x, dlPtr->y,
 		    dlPtr->height - dlPtr->spaceAbove - dlPtr->spaceBelow,
 		    dlPtr->baseline - dlPtr->spaceAbove, display, (unsigned long)drawable,
 		    dlPtr->y + dlPtr->spaceAbove);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.