summaryrefslogtreecommitdiffstats
path: root/generic/tcl.h
diff options
context:
space:
mode:
authornijtmans <nijtmans>2011-01-19 14:11:23 (GMT)
committernijtmans <nijtmans>2011-01-19 14:11:23 (GMT)
commit3303939db5a5fbd9104a93d8281ec09d2eef0d37 (patch)
treef9c54372b2148f5797574165044efd955074c609 /generic/tcl.h
parent0aacc9808d7002c1ed7a351d189fb25059c1b330 (diff)
downloadtcl-3303939db5a5fbd9104a93d8281ec09d2eef0d37.zip
tcl-3303939db5a5fbd9104a93d8281ec09d2eef0d37.tar.gz
tcl-3303939db5a5fbd9104a93d8281ec09d2eef0d37.tar.bz2
[Enh #3159920]: Tcl_ObjPrintf() crashes with bad format specifier.
Diffstat (limited to 'generic/tcl.h')
-rw-r--r--generic/tcl.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/generic/tcl.h b/generic/tcl.h
index 54a6579..670e716 100644
--- a/generic/tcl.h
+++ b/generic/tcl.h
@@ -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: tcl.h,v 1.311 2010/12/14 21:51:53 nijtmans Exp $
+ * RCS: @(#) $Id: tcl.h,v 1.312 2011/01/19 14:11:23 nijtmans Exp $
*/
#ifndef _TCL
@@ -158,6 +158,11 @@ extern "C" {
# define TCL_VARARGS_DEF(type, name) (type name, ...)
# define TCL_VARARGS_START(type, name, list) (va_start(list, name), name)
#endif
+#if defined(__GNUC__) && (__GNUC__ > 2)
+# define TCL_FORMAT_PRINTF(a,b) __attribute__ ((__format__ (__printf__, a, b)))
+#else
+# define TCL_FORMAT_PRINTF(a,b)
+#endif
/*
*----------------------------------------------------------------------------