summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2016-06-14 09:12:46 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2016-06-14 09:12:46 (GMT)
commite83f835a195b90a303657bda68904f37b14b50aa (patch)
treef31fd3297f23c483902930e6afe09b6823820cd7
parent5fee89b1cba2dec073fe621b65f34c480fe15483 (diff)
downloadtcl-e83f835a195b90a303657bda68904f37b14b50aa.zip
tcl-e83f835a195b90a303657bda68904f37b14b50aa.tar.gz
tcl-e83f835a195b90a303657bda68904f37b14b50aa.tar.bz2
(cherry-pick): Fix [e14c77b845]: Compilation error over typedef.
-rw-r--r--generic/tclDate.c8
-rw-r--r--generic/tclInt.h3
2 files changed, 3 insertions, 8 deletions
diff --git a/generic/tclDate.c b/generic/tclDate.c
index 0bda22f..1adcf1e 100644
--- a/generic/tclDate.c
+++ b/generic/tclDate.c
@@ -359,14 +359,8 @@ typedef short int yytype_int16;
#ifndef YYSIZE_T
# ifdef __SIZE_TYPE__
# define YYSIZE_T __SIZE_TYPE__
-# elif defined size_t
-# define YYSIZE_T size_t
-# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
-# define YYSIZE_T size_t
# else
-# define YYSIZE_T unsigned int
+# define YYSIZE_T size_t
# endif
#endif
diff --git a/generic/tclInt.h b/generic/tclInt.h
index 18574c3..6113f23 100644
--- a/generic/tclInt.h
+++ b/generic/tclInt.h
@@ -48,7 +48,8 @@
#else
#include <string.h>
#endif
-#ifdef STDC_HEADERS
+#if defined(STDC_HEADERS) || defined(__STDC__) || defined(__C99__FUNC__) \
+ || defined(__cplusplus) || defined(_MSC_VER)
#include <stddef.h>
#else
typedef int ptrdiff_t;