-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathflex.patch
More file actions
28 lines (27 loc) · 697 Bytes
/
Copy pathflex.patch
File metadata and controls
28 lines (27 loc) · 697 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Written and placed in public domain by Jeffrey Walton.
# This patch fixes some issues with Flex.
--- src/misc.c
+++ src/misc.c
@@ -338,6 +338,10 @@
void line_directive_out (FILE *output_file, int do_infile)
{
+ /* Based on GCC object size checker */
+ #undef MAXLINE
+ # define MAXLINE (2048+64)
+
char directive[MAXLINE], filename[MAXLINE];
char *s1, *s2, *s3;
static const char line_fmt[] = "#line %d \"%s\"\n";
--- src/filter.c
+++ src/filter.c
@@ -336,6 +336,10 @@
*/
int filter_fix_linedirs (struct filter *chain)
{
+ /* Based on GCC object size checker */
+ #undef MAXLINE
+ # define MAXLINE (2048+64)
+
char *buf;
const size_t readsz = 512;
int lineno = 1;