1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-29 10:18:30 +00:00
freebsd-ports/math/oleo/files/patch-src_posixtm.y
Stefan Eßer fde784537a Fix build
The configure script ran into an infinite loop due to an optimization
that assumes multiplication of 2 positive numbers was always positive
(ignoring wrap-around). Pass "-fwrapv" to the configure script and build
the package with that option.

Two parsers are generated and both use the same global variables. Fix
the build with -fno-common by use of pre-processor macros that rename
the variables used in one of those source files. Passing -p to set a
non-conflicting prefix other than "yy" does not work with implicit
".c.y" rules and was therefore not applicable.
2020-09-23 13:34:56 +00:00

23 lines
517 B
Plaintext

--- src/posixtm.y.orig 2000-07-22 06:13:16 UTC
+++ src/posixtm.y
@@ -40,6 +40,11 @@ char *alloca ();
#include <time.h>
#define YYDEBUG 1
+#define yychar yychar_posixtm
+#define yyerrflag yyerrflag_posixtm
+#define yylval yylval_posixtm
+#define yynerrs yynerrs_posixtm
+#define yyval yyval_posixtm
/* Lexical analyzer's current scan position in the input string. */
static char *curpos;
@@ -85,6 +90,7 @@ date :
YYABORT;
}
}
+ ;
year : digitpair {
t.tm_year = $1;