[q-lang-cvs] q/modules/tk tk.c,1.10,1.11
Brought to you by:
agraef
From: Albert G. <ag...@us...> - 2006-02-27 07:23:04
|
Update of /cvsroot/q-lang/q/modules/tk In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32751/modules/tk Modified Files: tk.c Log Message: work around locale dependencies of strtod on Windows, second attempt Index: tk.c =================================================================== RCS file: /cvsroot/q-lang/q/modules/tk/tk.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** tk.c 27 Feb 2006 06:21:05 -0000 1.10 --- tk.c 27 Feb 2006 07:22:59 -0000 1.11 *************** *** 23,33 **** #endif - /* make sure the WIN32 symbol is defined for windows compilation */ - #if defined(__MINGW32__) || defined(_MSC_VER) - #ifndef WIN32 - #define WIN32 1 - #endif - #endif - /* system headers */ --- 23,26 ---- *************** *** 83,90 **** #endif - #if defined(WIN32) || defined(HAVE_LOCALE_H) - #include <locale.h> - #endif - #define TCL_THREADS #include <tcl.h> --- 76,79 ---- *************** *** 731,746 **** /* work around a bug in recent Tcl/Tk versions */ Tcl_FindExecutable(NULL); - /* Work around a bug in Tcl's code for parsing floating point values, due to - the fact that C library functions like strtod depend on the current - locale. This is supposed to be fixed in Tcl 8.5, so we conditionalize the - patch accordingly. Note that this may still break if the Q script later - calls setlocale itself, but at least the patch should make locale-agnostic - applications work as expected. */ - /* FIXME: For now this patch is only enabled on Windows, as this is the only - system where I noticed this bug. Are there any other systems on which Tcl - exhibits this misbehaviour? */ - #if defined(WIN32) && (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION <= 4) - setlocale(LC_NUMERIC, "C"); - #endif /* check whether Tcl actually supports threads */ Tcl_MutexLock(&mut); --- 720,723 ---- |