summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authornijtmans <nijtmans>2009-08-09 21:20:33 (GMT)
committernijtmans <nijtmans>2009-08-09 21:20:33 (GMT)
commit7aefedb2ea921fbeb0f6d6b99afeb1224a319318 (patch)
treece53da0fddc1c8e4847bca5680922173a39e21b2 /win
parent7dc7cda6232cfd38f3af5083634039d33b1959c2 (diff)
downloadtk-7aefedb2ea921fbeb0f6d6b99afeb1224a319318.zip
tk-7aefedb2ea921fbeb0f6d6b99afeb1224a319318.tar.gz
tk-7aefedb2ea921fbeb0f6d6b99afeb1224a319318.tar.bz2
Eliminate various gcc warnings
include <vssym32.h> only when available
Diffstat (limited to 'win')
-rwxr-xr-xwin/configure57
-rw-r--r--win/configure.in5
-rw-r--r--win/ttkWinXPTheme.c4
3 files changed, 63 insertions, 3 deletions
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 <windows.h>
+#include <uxtheme.h>
+
+#include <vssym32.h>
+_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 <windows.h>])
+AC_CHECK_HEADER([vssym32.h], [AC_DEFINE(HAVE_VSSYM32_H)], [],
+ [#include <windows.h>
+#include <uxtheme.h>])
#--------------------------------------------------------------------
# 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 <windows.h>
#include <uxtheme.h>
-#if defined(_MSC_VER) && (NTDDI_VERSION >= NTDDI_LONGHORN)
+#ifdef HAVE_VSSYM32_H
# include <vssym32.h>
#else
# include <tmschema.h>