diff options
-rw-r--r-- | generic/tk.decls | 8 | ||||
-rwxr-xr-x | win/configure | 20 | ||||
-rw-r--r-- | win/tcl.m4 | 20 | ||||
-rw-r--r-- | win/tkWinDraw.c | 11 | ||||
-rw-r--r-- | win/tkWinInt.h | 4 | ||||
-rw-r--r-- | xlib/xcolors.c | 2 |
6 files changed, 37 insertions, 28 deletions
diff --git a/generic/tk.decls b/generic/tk.decls index f37be47..2671421 100644 --- a/generic/tk.decls +++ b/generic/tk.decls @@ -746,7 +746,6 @@ declare 194 { declare 195 { void Tk_FreeConfigOptions(char *recordPtr, Tk_OptionTable optionToken, Tk_Window tkwin) - } declare 196 { void Tk_FreeSavedOptions(Tk_SavedOptions *savePtr) @@ -828,15 +827,12 @@ declare 216 { declare 217 { void Tk_CreateSmoothMethod(Tcl_Interp *interp, const Tk_SmoothMethod *method) } - #declare 218 { # void Tk_CreateCanvasVisitor(Tcl_Interp *interp, void *typePtr) #} - #declare 219 { # void *Tk_GetCanvasVisitor(Tcl_Interp *interp, const char *name) #} - declare 220 { int Tk_GetDash(Tcl_Interp *interp, const char *value, Tk_Dash *dash) } @@ -1167,3 +1163,7 @@ export { const char *Tk_PkgInitStubsCheck(Tcl_Interp *interp, const char *version, int exact) } + +# Local Variables: +# mode: tcl +# End: diff --git a/win/configure b/win/configure index 8dfd341..363045e 100755 --- a/win/configure +++ b/win/configure @@ -3296,7 +3296,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #ifdef __WIN32__ + #ifndef __WIN32__ #error cross-compiler #endif @@ -3330,12 +3330,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_cross=yes + ac_cv_cross=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_cross=no +ac_cv_cross=yes fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext @@ -3647,8 +3647,8 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #ifdef _WIN64 - #error 64-bit + #ifndef _WIN64 + #error 32-bit #endif int @@ -3681,12 +3681,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - tcl_win_64bit=no + tcl_win_64bit=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_win_64bit=yes +tcl_win_64bit=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext @@ -4788,9 +4788,13 @@ echo "$as_me: error: Tcl directory $TCL_BIN_DIR does not exist" >&2;} { (exit 1); exit 1; }; } fi if test ! -f $TCL_BIN_DIR/tclConfig.sh; then - { { echo "$as_me:$LINENO: error: There is no tclConfig.sh in $TCL_BIN_DIR: perhaps you did not specify the Tcl *build* directory (not the toplevel Tcl directory) or you forgot to configure Tcl?" >&5 + if test ! -f $TCL_BIN_DIR/../unix/tclConfig.sh; then + { { echo "$as_me:$LINENO: error: There is no tclConfig.sh in $TCL_BIN_DIR: perhaps you did not specify the Tcl *build* directory (not the toplevel Tcl directory) or you forgot to configure Tcl?" >&5 echo "$as_me: error: There is no tclConfig.sh in $TCL_BIN_DIR: perhaps you did not specify the Tcl *build* directory (not the toplevel Tcl directory) or you forgot to configure Tcl?" >&2;} { (exit 1); exit 1; }; } + fi + TCL_BIN_DIR=`cd ${TCL_BIN_DIR}/../unix; pwd` + CFLAGS="$CFLAGS -mwin32" fi echo "$as_me:$LINENO: result: $TCL_BIN_DIR/tclConfig.sh" >&5 echo "${ECHO_T}$TCL_BIN_DIR/tclConfig.sh" >&6 @@ -34,7 +34,11 @@ AC_DEFUN([SC_PATH_TCLCONFIG], [ AC_MSG_ERROR(Tcl directory $TCL_BIN_DIR does not exist) fi if test ! -f $TCL_BIN_DIR/tclConfig.sh; then - AC_MSG_ERROR(There is no tclConfig.sh in $TCL_BIN_DIR: perhaps you did not specify the Tcl *build* directory (not the toplevel Tcl directory) or you forgot to configure Tcl?) + if test ! -f $TCL_BIN_DIR/../unix/tclConfig.sh; then + AC_MSG_ERROR(There is no tclConfig.sh in $TCL_BIN_DIR: perhaps you did not specify the Tcl *build* directory (not the toplevel Tcl directory) or you forgot to configure Tcl?) + fi + TCL_BIN_DIR=`cd ${TCL_BIN_DIR}/../unix; pwd` + CFLAGS="$CFLAGS -mwin32" fi AC_MSG_RESULT($TCL_BIN_DIR/tclConfig.sh) ]) @@ -417,12 +421,12 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ AC_CACHE_CHECK(for cross-compile version of gcc, ac_cv_cross, AC_TRY_COMPILE([ - #ifdef __WIN32__ + #ifndef __WIN32__ #error cross-compiler #endif ], [], - ac_cv_cross=yes, - ac_cv_cross=no) + ac_cv_cross=no, + ac_cv_cross=yes) ) if test "$ac_cv_cross" = "yes"; then @@ -609,12 +613,12 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ ;; *) AC_TRY_COMPILE([ - #ifdef _WIN64 - #error 64-bit + #ifndef _WIN64 + #error 32-bit #endif ], [], - tcl_win_64bit=no, - tcl_win_64bit=yes + tcl_win_64bit=yes, + tcl_win_64bit=no ) if test "$tcl_win_64bit" = "yes" ; then do64bit=amd64 diff --git a/win/tkWinDraw.c b/win/tkWinDraw.c index f770f15..dd482bd 100644 --- a/win/tkWinDraw.c +++ b/win/tkWinDraw.c @@ -23,7 +23,7 @@ * Translation table between X gc functions and Win32 raster op modes. */ -int tkpWinRopModes[] = { +const int tkpWinRopModes[] = { R2_BLACK, /* GXclear */ R2_MASKPEN, /* GXand */ R2_MASKPENNOT, /* GXandReverse */ @@ -54,7 +54,7 @@ int tkpWinRopModes[] = { #define SRCORREVERSE (DWORD)0x00DD0228 /* dest = source OR (NOT dest) */ #define SRCNAND (DWORD)0x007700E6 /* dest = NOT (source AND dest) */ -int tkpWinBltModes[] = { +const int tkpWinBltModes[] = { BLACKNESS, /* GXclear */ SRCAND, /* GXand */ SRCERASE, /* GXandReverse */ @@ -92,9 +92,10 @@ int tkpWinBltModes[] = { /* * Macros used later in the file. */ - -#define MIN(a,b) ((a>b) ? b : a) -#define MAX(a,b) ((a<b) ? b : a) +#ifndef MIN +# define MIN(a,b) ((a>b) ? b : a) +# define MAX(a,b) ((a<b) ? b : a) +#endif /* * The followng typedef is used to pass Windows GDI drawing functions. diff --git a/win/tkWinInt.h b/win/tkWinInt.h index cd4094d..580e58f 100644 --- a/win/tkWinInt.h +++ b/win/tkWinInt.h @@ -125,8 +125,8 @@ typedef struct { * Win32 raster and BitBlt op modes. */ -MODULE_SCOPE int tkpWinRopModes[]; -MODULE_SCOPE int tkpWinBltModes[]; +MODULE_SCOPE const int tkpWinRopModes[]; +MODULE_SCOPE const int tkpWinBltModes[]; /* * The following defines are used with TkWinGetBorderPixels to get the extra 2 diff --git a/xlib/xcolors.c b/xlib/xcolors.c index 04cb1af..9e10175 100644 --- a/xlib/xcolors.c +++ b/xlib/xcolors.c @@ -230,7 +230,7 @@ static const elem xColors[] = { *---------------------------------------------------------------------- */ -#ifdef __WIN32__ +#if defined(__WIN32__) && !defined(__CYGWIN__) # ifdef NO_STRTOI64 /* This version only handles hex-strings without 0x prefix */ static __int64 |