fix issue with tcl time/date library

this seems to be an issue with conflocting behaviour of different
tcl library versions
This commit is contained in:
2024-11-14 09:04:10 +01:00
parent f3d95891ad
commit 68f2042d8f
2 changed files with 22 additions and 18 deletions

View File

@ -117,7 +117,7 @@ static int LookupWord _ANSI_ARGS_((char *buff));
static int TclDatelex _ANSI_ARGS_((void));
int
TclDateparse _ANSI_ARGS_((void));
TclDateparseX _ANSI_ARGS_((void));
typedef union
#ifdef __cplusplus
YYSTYPE
@ -161,7 +161,7 @@ extern "C" {
#ifndef TclDatelex
int TclDatelex(void);
#endif
int TclDateparse(void);
int TclDateparseX(void);
#if defined(__cplusplus) && defined(__EXTERN_C__)
}
#endif
@ -877,7 +877,7 @@ TclGetDate(p, now, zone, timePtr)
TclDateHaveTime = 0;
TclDateHaveZone = 0;
if (TclDateparse() || TclDateHaveTime > 1 || TclDateHaveZone > 1 || TclDateHaveDate > 1 ||
if (TclDateparseX() || TclDateHaveTime > 1 || TclDateHaveZone > 1 || TclDateHaveDate > 1 ||
TclDateHaveDay > 1 || TclDateHaveOrdinalMonth > 1) {
return -1;
}
@ -1231,9 +1231,9 @@ int TclDatecvtok(i) int i;
** TclDateparse - return 0 if worked, 1 if syntax error not recovered from
*/
#if defined(__STDC__) || defined(__cplusplus)
int TclDateparse(void)
int TclDateparseX(void)
#else
int TclDateparse()
int TclDateparseX()
#endif
{
register YYSTYPE *TclDatepvt = 0; /* top of value stack for $vars */