Skip to content
Tcl Source Code Attachment Details
Login

Attachment Details

Overview

Artifact ID: f33e072fef53d80c538cefe3062a19f75d6b5af8
Ticket: 2819611fffffffffffffffffffffffffffffffff
Date: 2009-08-16 17:27:31
User: nijtmans
Artifact Attached: ed7c04d43127f15ab46a0a3f72c301b2bf429979
Filename:patch.txt
Description:implementation
Content:
     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
   100
   101
   102
   103
   104
   105
   106
   107
   108
   109
   110
   111
   112
   113
   114
   115
   116
   117
   118
   119
   120
   121
   122
   123
   124
   125
   126
   127
   128
   129
   130
   131
   132
   133
   134
   135
   136
   137
   138
   139
   140
   141
   142
   143
   144
   145
   146
   147
   148
   149
   150
   151
   152
   153
   154
   155
   156
   157
   158
   159
Index: win/tclWinInit.c
===================================================================
RCS file: /cvsroot/tcl/tcl/win/tclWinInit.c,v
retrieving revision 1.83
diff -u -r1.83 tclWinInit.c
--- win/tclWinInit.c	2 Aug 2009 10:41:09 -0000	1.83
+++ win/tclWinInit.c	14 Aug 2009 05:34:57 -0000
@@ -435,6 +435,15 @@
     int useWide;
 
     useWide = (TclWinGetPlatformId() != VER_PLATFORM_WIN32_WINDOWS);
+#ifdef HAVE_UNICOWS
+    if (!useWide) {
+	HINSTANCE hInstance = LoadLibraryA("unicows");
+	if (hInstance != NULL) {
+	    useWide = 1;
+	    FreeLibrary(hInstance);
+	}
+    }
+#endif
     TclWinSetInterfaces(useWide);
 }
 
Index: win/configure
===================================================================
RCS file: /cvsroot/tcl/tcl/win/configure,v
retrieving revision 1.125
diff -u -r1.125 configure
--- win/configure	26 Jul 2009 07:57:56 -0000	1.125
+++ win/configure	14 Aug 2009 05:34:57 -0000
@@ -4325,8 +4325,62 @@
 #define TCL_CFG_DO64BIT 1
 _ACEOF
 
-    fi
+    else
+
+	cat >>conftest.$ac_ext <<_ACEOF
+extern char _stdcall LoadGodot();
+void main() {LoadGodot();}
+_ACEOF
+	rm -f conftest.$ac_objext conftest$ac_exeext
+	ac_func_search_save_LIBS=$LIBS
+	if test "${GCC}" = "yes" ; then
+	    LIBS="-lunicows $ac_func_search_save_LIBS"
+	else
+	    LIBS="unicows.lib $ac_func_search_save_LIBS"
+	fi
+	if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+	    (eval $ac_link) 2>conftest.er1
+	    ac_status=$?
+	    grep -v '^ *+' conftest.er1 >conftest.err
+	    rm -f conftest.er1
+	    cat conftest.err >&5
+	    echo "$as_me:$LINENO: \$? = $ac_status" >&5
+	    (exit $ac_status); } &&
+		 { ac_try='test -z "$ac_c_werror_flag"
+				 || test ! -s conftest.err'
+	    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+	    (eval $ac_try) 2>&5
+	    ac_status=$?
+	    echo "$as_me:$LINENO: \$? = $ac_status" >&5
+	    (exit $ac_status); }; } &&
+		 { ac_try='test -s conftest$ac_exeext'
+	    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+	    (eval $ac_try) 2>&5
+	    ac_status=$?
+	    echo "$as_me:$LINENO: \$? = $ac_status" >&5
+	    (exit $ac_status); }; }; then
+	    if test "${GCC}" = "yes" ; then
+		LIBS_GUI="-lunicows $LIBS_GUI"
+	    else
+		LIBS_GUI="unicows.lib $LIBS_GUI"
+	    fi
+	    echo "$as_me:$LINENO: result: unicows library found" >&5
+echo "${ECHO_T}unicows library found" >&6
+	    cat >>confdefs.h <<\_ACEOF
+#define HAVE_UNICOWS 1
+_ACEOF
 
+	    UNICOWS_DLL_FILE=\${UNICOWS_DLL_FILE}
+
+	else
+	    echo "$as_me:$LINENO: result: unicows library not found" >&5
+echo "${ECHO_T}unicows library not found" >&6
+	    echo "$as_me: failed program was:" >&5
+	    sed 's/^/| /' conftest.$ac_ext >&5
+	    LIBS="$ac_func_search_save_LIBS"
+	fi
+
+    fi
 
     # DL_LIBS is empty, but then we match the Unix version
 
Index: win/tcl.m4
===================================================================
RCS file: /cvsroot/tcl/tcl/win/tcl.m4,v
retrieving revision 1.76
diff -u -r1.76 tcl.m4
--- win/tcl.m4	26 Jul 2009 07:57:57 -0000	1.76
+++ win/tcl.m4	14 Aug 2009 05:34:57 -0000
@@ -776,8 +776,56 @@
 
     if test "$do64bit" != "no" ; then
 	AC_DEFINE(TCL_CFG_DO64BIT)
+    else
+
+	cat >>conftest.$ac_ext <<_ACEOF
+extern char _stdcall LoadGodot();
+void main() {LoadGodot();}
+_ACEOF
+	rm -f conftest.$ac_objext conftest$ac_exeext
+	ac_func_search_save_LIBS=$LIBS
+	if test "${GCC}" = "yes" ; then
+	    LIBS="-lunicows $ac_func_search_save_LIBS"
+	else
+	    LIBS="unicows.lib $ac_func_search_save_LIBS"
+	fi
+	if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+	    (eval $ac_link) 2>conftest.er1
+	    ac_status=$?
+	    grep -v '^ *+' conftest.er1 >conftest.err
+	    rm -f conftest.er1
+	    cat conftest.err >&5
+	    echo "$as_me:$LINENO: \$? = $ac_status" >&5
+	    (exit $ac_status); } &&
+		 { ac_try='test -z "$ac_c_werror_flag"
+				 || test ! -s conftest.err'
+	    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+	    (eval $ac_try) 2>&5
+	    ac_status=$?
+	    echo "$as_me:$LINENO: \$? = $ac_status" >&5
+	    (exit $ac_status); }; } &&
+		 { ac_try='test -s conftest$ac_exeext'
+	    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+	    (eval $ac_try) 2>&5
+	    ac_status=$?
+	    echo "$as_me:$LINENO: \$? = $ac_status" >&5
+	    (exit $ac_status); }; }; then
+	    if test "${GCC}" = "yes" ; then
+		LIBS_GUI="-lunicows $LIBS_GUI"
+	    else
+		LIBS_GUI="unicows.lib $LIBS_GUI"
+	    fi
+	    AC_MSG_RESULT([unicows library found])
+	    AC_DEFINE(HAVE_UNICOWS)
+	    AC_SUBST(UNICOWS_DLL_FILE,[\${UNICOWS_DLL_FILE}])
+	else
+	    AC_MSG_RESULT([unicows library not found])
+	    echo "$as_me: failed program was:" >&5
+	    sed 's/^/| /' conftest.$ac_ext >&5
+	    LIBS="$ac_func_search_save_LIBS"
+	fi
+
     fi
-    AC_SUBST(UNICOWS_DLL_FILE)
 
     # DL_LIBS is empty, but then we match the Unix version
     AC_SUBST(DL_LIBS)