From 64026b2057cc20136ebfb3d3aaf3fccd81e8b640 Mon Sep 17 00:00:00 2001 From: Ryan Schmidt Date: Wed, 18 May 2022 05:53:08 -0500 Subject: [PATCH] src/tclx/src/tclxgdat.y: Micropolis build fixes for recent macOS Fix: y.tab.c:1310:16: error: implicit declaration of function 'yylex' is invalid in C99 [-Werror,-Wimplicit-function-declaration] yychar = YYLEX; ^ y.tab.c:1586:7: error: implicit declaration of function 'yyerror' is invalid in C99 [-Werror,-Wimplicit-function-declaration] yyerror (YY_("syntax error")); ^ y.tab.c:1732:3: error: implicit declaration of function 'yyerror' is invalid in C99 [-Werror,-Wimplicit-function-declaration] yyerror (YY_("memory exhausted")); ^ --- src/tclx/src/tclxgdat.y | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/tclx/src/tclxgdat.y b/src/tclx/src/tclxgdat.y index 93b1610..aea9f3d 100644 --- a/src/tclx/src/tclxgdat.y +++ b/src/tclx/src/tclxgdat.y @@ -58,6 +58,9 @@ #define DAYLIGHT 1 #define STANDARD 2 #define MAYBE 3 + +int yylex(void); +void yyerror(const char *); %} %% @@ -229,6 +232,7 @@ time_t daylcorr(future, now) time_t future, now; static char *lptr; //static +int yylex() { #ifndef YYSTYPE @@ -580,7 +584,7 @@ Tcl_GetDate (p, now, zone) * Error message are not used, so discard with dummy function. */ -int +void yyerror(msg) const char *msg; { -- 2.39.2