Skip to content

Commit 1b8d946

Browse files
committed
Hmm, it seems some versions of flex declare yytext as extern char[]
but others declare it as extern char *. gcc complains (quite rightly too). Worked around it by rearranging the order of inclusions so that we don't have to explicitly declare yytext; this should work with either variant.
1 parent e4274d6 commit 1b8d946

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/pl/plpgsql/src/gram.y

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* procedural language
55
*
66
* IDENTIFICATION
7-
* $Header: /cvsroot/pgsql/src/pl/plpgsql/src/gram.y,v 1.2 1999/01/28 11:48:30 wieck Exp $
7+
* $Header: /cvsroot/pgsql/src/pl/plpgsql/src/gram.y,v 1.3 1999/03/21 01:07:07 tgl Exp $
88
*
99
* This software is copyrighted by Jan Wieck - Hamburg.
1010
*
@@ -40,8 +40,9 @@
4040
#include "string.h"
4141
#include "plpgsql.h"
4242

43-
extern int yylineno;
44-
extern char yytext[];
43+
extern int yylineno; /* not always declared by lexer... */
44+
45+
#include "pl_scan.c"
4546

4647
static PLpgSQL_expr *read_sqlstmt(int until, char *s, char *sqlstart);
4748
static PLpgSQL_stmt *make_select_stmt(void);
@@ -1454,7 +1455,3 @@ make_tupret_expr(PLpgSQL_row *row)
14541455
plpgsql_dstring_free(&ds);
14551456
return expr;
14561457
}
1457-
1458-
1459-
1460-
#include "pl_scan.c"

0 commit comments

Comments
 (0)