From 7aefedb2ea921fbeb0f6d6b99afeb1224a319318 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Sun, 9 Aug 2009 21:20:33 +0000 Subject: Eliminate various gcc warnings include only when available --- ChangeLog | 10 ++++ generic/tkBind.c | 151 +++++++++++++++++++++++++------------------------- generic/tkText.c | 34 ++++++------ generic/tkUtil.c | 20 +++---- generic/ttk/ttkInit.c | 20 +++---- win/configure | 57 +++++++++++++++++++ win/configure.in | 5 +- win/ttkWinXPTheme.c | 4 +- 8 files changed, 185 insertions(+), 116 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6d6755e..b7499b7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2009-08-09 Jan Nijtmans + + * generic/ttk/ttkInit.c Eliminate gcc warning + * generic/tkBind.c + * generic/tkText.c + * generic/tkUtil.c + * win/ttkWinXPTheme.c: include only when available + * win/configure.in: check for vssym32.h, available in newer SDK's + * win/configure (regenerated) + 2009-08-08 Donal K. Fellows * library/demos/pendulum.tcl: Make the display handle being resized diff --git a/generic/tkBind.c b/generic/tkBind.c index 0213111..395fca3 100644 --- a/generic/tkBind.c +++ b/generic/tkBind.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkBind.c,v 1.55 2009/07/23 22:21:35 dkf Exp $ + * RCS: @(#) $Id: tkBind.c,v 1.56 2009/08/09 21:20:33 nijtmans Exp $ */ #include "tkInt.h" @@ -3253,7 +3253,7 @@ HandleEventGenerate( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - XEvent event; + union {XEvent general; XVirtualEvent virtual;} event; const char *p; const char *name, *windowName; int count, flags, synch, i, number, warp; @@ -3321,18 +3321,18 @@ HandleEventGenerate( } memset(&event, 0, sizeof(event)); - event.xany.type = pat.eventType; - event.xany.serial = NextRequest(Tk_Display(tkwin)); - event.xany.send_event = False; + event.general.xany.type = pat.eventType; + event.general.xany.serial = NextRequest(Tk_Display(tkwin)); + event.general.xany.send_event = False; if (windowName[0]) { - event.xany.window = Tk_WindowId(tkwin); + event.general.xany.window = Tk_WindowId(tkwin); } else { - event.xany.window = + event.general.xany.window = RootWindow(Tk_Display(tkwin), Tk_ScreenNumber(tkwin)); } - event.xany.display = Tk_Display(tkwin); + event.general.xany.display = Tk_Display(tkwin); - flags = flagArray[event.xany.type]; + flags = flagArray[event.general.xany.type]; if (flags & DESTROY) { /* * Event DesotryNotify should be generated by destroying the window. @@ -3342,26 +3342,26 @@ HandleEventGenerate( return TCL_OK; } if (flags & KEY_BUTTON_MOTION_VIRTUAL) { - event.xkey.state = pat.needMods; - if ((flags & KEY) && (event.xany.type != MouseWheelEvent)) { - TkpSetKeycodeAndState(tkwin, pat.detail.keySym, &event); + event.general.xkey.state = pat.needMods; + if ((flags & KEY) && (event.general.xany.type != MouseWheelEvent)) { + TkpSetKeycodeAndState(tkwin, pat.detail.keySym, &event.general); } else if (flags & BUTTON) { - event.xbutton.button = pat.detail.button; + event.general.xbutton.button = pat.detail.button; } else if (flags & VIRTUAL) { - ((XVirtualEvent *) &event)->name = pat.detail.name; + event.virtual.name = pat.detail.name; } } if (flags & (CREATE|UNMAP|MAP|REPARENT|CONFIG|GRAVITY|CIRC)) { - event.xcreatewindow.window = event.xany.window; + event.general.xcreatewindow.window = event.general.xany.window; } if (flags & KEY_BUTTON_MOTION_CROSSING) { - event.xkey.x_root = -1; - event.xkey.y_root = -1; + event.general.xkey.x_root = -1; + event.general.xkey.y_root = -1; } - if (event.xany.type == FocusIn || event.xany.type == FocusOut) { - event.xany.send_event = GENERATED_FOCUS_EVENT_MAGIC; + if (event.general.xany.type == FocusIn || event.general.xany.type == FocusOut) { + event.general.xany.send_event = GENERATED_FOCUS_EVENT_MAGIC; } /* @@ -3421,7 +3421,7 @@ HandleEventGenerate( return TCL_ERROR; } if (flags & CONFIG) { - event.xconfigure.above = Tk_WindowId(tkwin2); + event.general.xconfigure.above = Tk_WindowId(tkwin2); } else { goto badopt; } @@ -3431,7 +3431,7 @@ HandleEventGenerate( return TCL_ERROR; } if (flags & (CREATE|CONFIG)) { - event.xcreatewindow.border_width = number; + event.general.xcreatewindow.border_width = number; } else { goto badopt; } @@ -3441,7 +3441,7 @@ HandleEventGenerate( return TCL_ERROR; } if (flags & BUTTON) { - event.xbutton.button = number; + event.general.xbutton.button = number; } else { goto badopt; } @@ -3451,7 +3451,7 @@ HandleEventGenerate( return TCL_ERROR; } if (flags & EXPOSE) { - event.xexpose.count = number; + event.general.xexpose.count = number; } else { goto badopt; } @@ -3473,8 +3473,8 @@ HandleEventGenerate( if (Tcl_GetIntFromObj(interp, valuePtr, &number) != TCL_OK) { return TCL_ERROR; } - if ((flags & KEY) && (event.xkey.type == MouseWheelEvent)) { - event.xkey.keycode = number; + if ((flags & KEY) && (event.general.xkey.type == MouseWheelEvent)) { + event.general.xkey.keycode = number; } else { goto badopt; } @@ -3486,9 +3486,9 @@ HandleEventGenerate( return TCL_ERROR; } if (flags & FOCUS) { - event.xfocus.detail = number; + event.general.xfocus.detail = number; } else if (flags & CROSSING) { - event.xcrossing.detail = number; + event.general.xcrossing.detail = number; } else { goto badopt; } @@ -3498,7 +3498,7 @@ HandleEventGenerate( return TCL_ERROR; } if (flags & CROSSING) { - event.xcrossing.focus = number; + event.general.xcrossing.focus = number; } else { goto badopt; } @@ -3509,9 +3509,9 @@ HandleEventGenerate( return TCL_ERROR; } if (flags & EXPOSE) { - event.xexpose.height = number; + event.general.xexpose.height = number; } else if (flags & CONFIG) { - event.xconfigure.height = number; + event.general.xconfigure.height = number; } else { goto badopt; } @@ -3520,8 +3520,8 @@ HandleEventGenerate( if (Tcl_GetIntFromObj(interp, valuePtr, &number) != TCL_OK) { return TCL_ERROR; } - if ((flags & KEY) && (event.xkey.type != MouseWheelEvent)) { - event.xkey.keycode = number; + if ((flags & KEY) && (event.general.xkey.type != MouseWheelEvent)) { + event.general.xkey.keycode = number; } else { goto badopt; } @@ -3538,13 +3538,13 @@ HandleEventGenerate( return TCL_ERROR; } - TkpSetKeycodeAndState(tkwin, keysym, &event); - if (event.xkey.keycode == 0) { + TkpSetKeycodeAndState(tkwin, keysym, &event.general); + if (event.general.xkey.keycode == 0) { Tcl_AppendResult(interp, "no keycode for keysym \"", value, "\"", NULL); return TCL_ERROR; } - if (!(flags & KEY) || (event.xkey.type == MouseWheelEvent)) { + if (!(flags & KEY) || (event.general.xkey.type == MouseWheelEvent)) { goto badopt; } break; @@ -3555,9 +3555,9 @@ HandleEventGenerate( return TCL_ERROR; } if (flags & CROSSING) { - event.xcrossing.mode = number; + event.general.xcrossing.mode = number; } else if (flags & FOCUS) { - event.xfocus.mode = number; + event.general.xfocus.mode = number; } else { goto badopt; } @@ -3567,13 +3567,13 @@ HandleEventGenerate( return TCL_ERROR; } if (flags & CREATE) { - event.xcreatewindow.override_redirect = number; + event.general.xcreatewindow.override_redirect = number; } else if (flags & MAP) { - event.xmap.override_redirect = number; + event.general.xmap.override_redirect = number; } else if (flags & REPARENT) { - event.xreparent.override_redirect = number; + event.general.xreparent.override_redirect = number; } else if (flags & CONFIG) { - event.xconfigure.override_redirect = number; + event.general.xconfigure.override_redirect = number; } else { goto badopt; } @@ -3584,7 +3584,7 @@ HandleEventGenerate( return TCL_ERROR; } if (flags & CIRC) { - event.xcirculate.place = number; + event.general.xcirculate.place = number; } else { goto badopt; } @@ -3594,7 +3594,7 @@ HandleEventGenerate( return TCL_ERROR; } if (flags & KEY_BUTTON_MOTION_CROSSING) { - event.xkey.root = Tk_WindowId(tkwin2); + event.general.xkey.root = Tk_WindowId(tkwin2); } else { goto badopt; } @@ -3604,7 +3604,7 @@ HandleEventGenerate( return TCL_ERROR; } if (flags & KEY_BUTTON_MOTION_CROSSING) { - event.xkey.x_root = number; + event.general.xkey.x_root = number; } else { goto badopt; } @@ -3614,7 +3614,7 @@ HandleEventGenerate( return TCL_ERROR; } if (flags & KEY_BUTTON_MOTION_CROSSING) { - event.xkey.y_root = number; + event.general.xkey.y_root = number; } else { goto badopt; } @@ -3637,14 +3637,14 @@ HandleEventGenerate( return TCL_ERROR; } } - event.xany.send_event = number; + event.general.xany.send_event = number; break; } case EVENT_SERIAL: if (Tcl_GetIntFromObj(interp, valuePtr, &number) != TCL_OK) { return TCL_ERROR; } - event.xany.serial = number; + event.general.xany.serial = number; break; case EVENT_STATE: if (flags & KEY_BUTTON_MOTION_CROSSING) { @@ -3652,9 +3652,9 @@ HandleEventGenerate( return TCL_ERROR; } if (flags & KEY_BUTTON_MOTION_VIRTUAL) { - event.xkey.state = number; + event.general.xkey.state = number; } else { - event.xcrossing.state = number; + event.general.xcrossing.state = number; } } else if (flags & VISIBILITY) { number = TkFindStateNumObj(interp, optionPtr, visNotify, @@ -3662,7 +3662,7 @@ HandleEventGenerate( if (number < 0) { return TCL_ERROR; } - event.xvisibility.state = number; + event.general.xvisibility.state = number; } else { goto badopt; } @@ -3672,7 +3672,7 @@ HandleEventGenerate( return TCL_ERROR; } if (flags & KEY_BUTTON_MOTION_CROSSING) { - event.xkey.subwindow = Tk_WindowId(tkwin2); + event.general.xkey.subwindow = Tk_WindowId(tkwin2); } else { goto badopt; } @@ -3682,9 +3682,9 @@ HandleEventGenerate( return TCL_ERROR; } if (flags & KEY_BUTTON_MOTION_CROSSING) { - event.xkey.time = (Time) number; + event.general.xkey.time = (Time) number; } else if (flags & PROP) { - event.xproperty.time = (Time) number; + event.general.xproperty.time = (Time) number; } else { goto badopt; } @@ -3694,9 +3694,9 @@ HandleEventGenerate( return TCL_ERROR; } if (flags & EXPOSE) { - event.xexpose.width = number; + event.general.xexpose.width = number; } else if (flags & (CREATE|CONFIG)) { - event.xcreatewindow.width = number; + event.general.xcreatewindow.width = number; } else { goto badopt; } @@ -3706,7 +3706,7 @@ HandleEventGenerate( return TCL_ERROR; } if (flags & (CREATE|UNMAP|MAP|REPARENT|CONFIG|GRAVITY|CIRC)) { - event.xcreatewindow.window = Tk_WindowId(tkwin2); + event.general.xcreatewindow.window = Tk_WindowId(tkwin2); } else { goto badopt; } @@ -3716,24 +3716,24 @@ HandleEventGenerate( return TCL_ERROR; } if (flags & KEY_BUTTON_MOTION_CROSSING) { - event.xkey.x = number; + event.general.xkey.x = number; /* * Only modify rootx as well if it hasn't been changed. */ - if (event.xkey.x_root == -1) { + if (event.general.xkey.x_root == -1) { int rootX, rootY; Tk_GetRootCoords(tkwin, &rootX, &rootY); - event.xkey.x_root = rootX + number; + event.general.xkey.x_root = rootX + number; } } else if (flags & EXPOSE) { - event.xexpose.x = number; + event.general.xexpose.x = number; } else if (flags & (CREATE|CONFIG|GRAVITY)) { - event.xcreatewindow.x = number; + event.general.xcreatewindow.x = number; } else if (flags & REPARENT) { - event.xreparent.x = number; + event.general.xreparent.x = number; } else { goto badopt; } @@ -3743,24 +3743,24 @@ HandleEventGenerate( return TCL_ERROR; } if (flags & KEY_BUTTON_MOTION_CROSSING) { - event.xkey.y = number; + event.general.xkey.y = number; /* * Only modify rooty as well if it hasn't been changed. */ - if (event.xkey.y_root == -1) { + if (event.general.xkey.y_root == -1) { int rootX, rootY; Tk_GetRootCoords(tkwin, &rootX, &rootY); - event.xkey.y_root = rootY + number; + event.general.xkey.y_root = rootY + number; } } else if (flags & EXPOSE) { - event.xexpose.y = number; + event.general.xexpose.y = number; } else if (flags & (CREATE|CONFIG|GRAVITY)) { - event.xcreatewindow.y = number; + event.general.xcreatewindow.y = number; } else if (flags & REPARENT) { - event.xreparent.y = number; + event.general.xreparent.y = number; } else { goto badopt; } @@ -3774,7 +3774,6 @@ HandleEventGenerate( return TCL_ERROR; } if (userDataObj != NULL) { - XVirtualEvent *vePtr = (XVirtualEvent *) &event; /* * Must be virtual event to set that variable to non-NULL. Now we want @@ -3783,7 +3782,7 @@ HandleEventGenerate( * refcount will be decremented once the event has been processed. */ - vePtr->user_data = userDataObj; + event.virtual.user_data = userDataObj; Tcl_IncrRefCount(userDataObj); } @@ -3793,9 +3792,9 @@ HandleEventGenerate( */ if (synch != 0) { - Tk_HandleEvent(&event); + Tk_HandleEvent(&event.general); } else { - Tk_QueueWindowEvent(&event, pos); + Tk_QueueWindowEvent(&event.general, pos); } /* @@ -3803,15 +3802,15 @@ HandleEventGenerate( */ if ((warp != 0) && Tk_IsMapped(tkwin)) { - TkDisplay *dispPtr = TkGetDisplay(event.xmotion.display); + TkDisplay *dispPtr = TkGetDisplay(event.general.xmotion.display); if (!(dispPtr->flags & TK_DISPLAY_IN_WARP)) { Tcl_DoWhenIdle(DoWarp, dispPtr); dispPtr->flags |= TK_DISPLAY_IN_WARP; } - dispPtr->warpWindow = event.xany.window; - dispPtr->warpX = event.xkey.x; - dispPtr->warpY = event.xkey.y; + dispPtr->warpWindow = event.general.xany.window; + dispPtr->warpX = event.general.xkey.x; + dispPtr->warpY = event.general.xkey.y; } Tcl_ResetResult(interp); return TCL_OK; diff --git a/generic/tkText.c b/generic/tkText.c index 4e605ce..7a5fa46 100644 --- a/generic/tkText.c +++ b/generic/tkText.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkText.c,v 1.89 2009/02/06 08:12:07 das Exp $ + * RCS: @(#) $Id: tkText.c,v 1.90 2009/08/09 21:20:33 nijtmans Exp $ */ #include "default.h" @@ -3402,16 +3402,16 @@ TkTextSelectionEvent( * event generate $textWidget <> */ - XEvent event; + union {XEvent general; XVirtualEvent virtual;} event; memset(&event, 0, sizeof(event)); - event.xany.type = VirtualEvent; - event.xany.serial = NextRequest(Tk_Display(textPtr->tkwin)); - event.xany.send_event = False; - event.xany.window = Tk_WindowId(textPtr->tkwin); - event.xany.display = Tk_Display(textPtr->tkwin); - ((XVirtualEvent *) &event)->name = Tk_GetUid("Selection"); - Tk_HandleEvent(&event); + event.general.xany.type = VirtualEvent; + event.general.xany.serial = NextRequest(Tk_Display(textPtr->tkwin)); + event.general.xany.send_event = False; + event.general.xany.window = Tk_WindowId(textPtr->tkwin); + event.general.xany.display = Tk_Display(textPtr->tkwin); + event.virtual.name = Tk_GetUid("Selection"); + Tk_HandleEvent(&event.general); } /* @@ -5173,18 +5173,18 @@ static void GenerateModifiedEvent( TkText *textPtr) /* Information about text widget. */ { - XEvent event; + union {XEvent general; XVirtualEvent virtual;} event; Tk_MakeWindowExist(textPtr->tkwin); memset(&event, 0, sizeof(event)); - event.xany.type = VirtualEvent; - event.xany.serial = NextRequest(Tk_Display(textPtr->tkwin)); - event.xany.send_event = False; - event.xany.window = Tk_WindowId(textPtr->tkwin); - event.xany.display = Tk_Display(textPtr->tkwin); - ((XVirtualEvent *) &event)->name = Tk_GetUid("Modified"); - Tk_HandleEvent(&event); + event.general.xany.type = VirtualEvent; + event.general.xany.serial = NextRequest(Tk_Display(textPtr->tkwin)); + event.general.xany.send_event = False; + event.general.xany.window = Tk_WindowId(textPtr->tkwin); + event.general.xany.display = Tk_Display(textPtr->tkwin); + event.virtual.name = Tk_GetUid("Modified"); + Tk_HandleEvent(&event.general); } /* diff --git a/generic/tkUtil.c b/generic/tkUtil.c index ffa392f..342020c 100644 --- a/generic/tkUtil.c +++ b/generic/tkUtil.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkUtil.c,v 1.29 2009/04/10 16:00:12 das Exp $ + * RCS: @(#) $Id: tkUtil.c,v 1.30 2009/08/09 21:20:33 nijtmans Exp $ */ #include "tkInt.h" @@ -1163,17 +1163,17 @@ TkMakeEnsemble( void TkSendVirtualEvent(Tk_Window target, const char *eventName) { - XEvent event; + union {XEvent general; XVirtualEvent virtual;} event; memset(&event, 0, sizeof(event)); - event.xany.type = VirtualEvent; - event.xany.serial = NextRequest(Tk_Display(target)); - event.xany.send_event = False; - event.xany.window = Tk_WindowId(target); - event.xany.display = Tk_Display(target); - ((XVirtualEvent *) &event)->name = Tk_GetUid(eventName); - - Tk_QueueWindowEvent(&event, TCL_QUEUE_TAIL); + event.general.xany.type = VirtualEvent; + event.general.xany.serial = NextRequest(Tk_Display(target)); + event.general.xany.send_event = False; + event.general.xany.window = Tk_WindowId(target); + event.general.xany.display = Tk_Display(target); + event.virtual.name = Tk_GetUid(eventName); + + Tk_QueueWindowEvent(&event.general, TCL_QUEUE_TAIL); } /* * Local Variables: diff --git a/generic/ttk/ttkInit.c b/generic/ttk/ttkInit.c index 76d1768..4294a9e 100644 --- a/generic/ttk/ttkInit.c +++ b/generic/ttk/ttkInit.c @@ -1,4 +1,4 @@ -/* $Id: ttkInit.c,v 1.8 2008/04/27 22:41:12 dkf Exp $ +/* $Id: ttkInit.c,v 1.9 2009/08/09 21:20:34 nijtmans Exp $ * Copyright (c) 2003, Joe English * * Ttk package: initialization routine and miscellaneous utilities. @@ -114,17 +114,17 @@ void TtkCheckStateOption(WidgetCore *corePtr, Tcl_Obj *objPtr) */ void TtkSendVirtualEvent(Tk_Window tgtWin, const char *eventName) { - XEvent event; + union {XEvent general; XVirtualEvent virtual;} event; memset(&event, 0, sizeof(event)); - event.xany.type = VirtualEvent; - event.xany.serial = NextRequest(Tk_Display(tgtWin)); - event.xany.send_event = False; - event.xany.window = Tk_WindowId(tgtWin); - event.xany.display = Tk_Display(tgtWin); - ((XVirtualEvent *) &event)->name = Tk_GetUid(eventName); - - Tk_QueueWindowEvent(&event, TCL_QUEUE_TAIL); + event.general.xany.type = VirtualEvent; + event.general.xany.serial = NextRequest(Tk_Display(tgtWin)); + event.general.xany.send_event = False; + event.general.xany.window = Tk_WindowId(tgtWin); + event.general.xany.display = Tk_Display(tgtWin); + event.virtual.name = Tk_GetUid(eventName); + + Tk_QueueWindowEvent(&event.general, TCL_QUEUE_TAIL); } /* TtkEnumerateOptions, TtkGetOptionValue -- diff --git a/win/configure b/win/configure index 41a6ef0..6747d73 100755 --- a/win/configure +++ b/win/configure @@ -3925,6 +3925,63 @@ echo "$as_me: xpnative theme will be unavailable" >&6;} fi +echo "$as_me:$LINENO: checking for vssym32.h" >&5 +echo $ECHO_N "checking for vssym32.h... $ECHO_C" >&6 +if test "${ac_cv_header_vssym32_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include + +#include +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 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_objext' + { (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 + ac_cv_header_vssym32_h=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_header_vssym32_h=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_header_vssym32_h" >&5 +echo "${ECHO_T}$ac_cv_header_vssym32_h" >&6 +if test $ac_cv_header_vssym32_h = yes; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_VSSYM32_H 1 +_ACEOF + +fi + + #-------------------------------------------------------------------- # Set the default compiler switches based on the --enable-symbols diff --git a/win/configure.in b/win/configure.in index 250040e..f29e05e 100644 --- a/win/configure.in +++ b/win/configure.in @@ -3,7 +3,7 @@ # generate the file "configure", which is run during Tk installation # to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.86 2009/02/16 18:14:47 hobbs Exp $ +# RCS: @(#) $Id: configure.in,v 1.87 2009/08/09 21:20:34 nijtmans Exp $ AC_INIT(../generic/tk.h) AC_PREREQ(2.59) @@ -146,6 +146,9 @@ AC_SUBST(MAN2TCLFLAGS) AC_CHECK_HEADER([uxtheme.h], [AC_DEFINE(HAVE_UXTHEME_H)], [AC_MSG_NOTICE([xpnative theme will be unavailable])], [#include ]) +AC_CHECK_HEADER([vssym32.h], [AC_DEFINE(HAVE_VSSYM32_H)], [], + [#include +#include ]) #-------------------------------------------------------------------- # Set the default compiler switches based on the --enable-symbols diff --git a/win/ttkWinXPTheme.c b/win/ttkWinXPTheme.c index d4cb16c..42e1e0e 100644 --- a/win/ttkWinXPTheme.c +++ b/win/ttkWinXPTheme.c @@ -1,5 +1,5 @@ /* - * $Id: ttkWinXPTheme.c,v 1.25 2009/08/02 21:40:17 nijtmans Exp $ + * $Id: ttkWinXPTheme.c,v 1.26 2009/08/09 21:20:34 nijtmans Exp $ * * Tk theme engine which uses the Windows XP "Visual Styles" API * Adapted from Georgios Petasis' XP theme patch. @@ -27,7 +27,7 @@ int TtkXPTheme_Init(Tcl_Interp *interp, HWND hwnd) { return TCL_OK; } #include #include -#if defined(_MSC_VER) && (NTDDI_VERSION >= NTDDI_LONGHORN) +#ifdef HAVE_VSSYM32_H # include #else # include -- cgit v0.12