summaryrefslogtreecommitdiffstats
path: root/generic/tclInt.h
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-03-07 18:25:27 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-03-07 18:25:27 (GMT)
commit89b0bdb8829f03a5216972f59d54b3fa8a1bef16 (patch)
tree73278c17cb6109836ecaafb24f992889f642b1c0 /generic/tclInt.h
parent467d03dbc94f1e8b6ec74da6ac0f54ce4975bf10 (diff)
downloadtcl-89b0bdb8829f03a5216972f59d54b3fa8a1bef16.zip
tcl-89b0bdb8829f03a5216972f59d54b3fa8a1bef16.tar.gz
tcl-89b0bdb8829f03a5216972f59d54b3fa8a1bef16.tar.bz2
Move TCL_UNUSED to tclInt.h, so we can still deprecate JOIN()
Diffstat (limited to 'generic/tclInt.h')
-rw-r--r--generic/tclInt.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/generic/tclInt.h b/generic/tclInt.h
index 6704789..9126c3b 100644
--- a/generic/tclInt.h
+++ b/generic/tclInt.h
@@ -53,7 +53,18 @@
# endif
#endif
+#ifndef JOIN
+# define JOIN(a,b) JOIN1(a,b)
+# define JOIN1(a,b) a##b
+#endif
+#if defined(__cplusplus)
+# define TCL_UNUSED(T) T
+#elif defined(__GNUC__) && (__GNUC__ > 2)
+# define TCL_UNUSED(T) T JOIN(dummy, __LINE__) __attribute__((unused))
+#else
+# define TCL_UNUSED(T) T JOIN(dummy, __LINE__)
+#endif
/*
* Common include files needed by most of the Tcl source files are included