summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane1999-03-21 01:07:07 +0000
committerTom Lane1999-03-21 01:07:07 +0000
commit1b8d9466fbda1072c645a2762658baa27aab883a (patch)
tree034c72063139010945bc9057df294c4cce86d609
parente4274d60a5c2ccadec7b81b42a90580c109ffcc0 (diff)
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.
-rw-r--r--src/pl/plpgsql/src/gram.y11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/pl/plpgsql/src/gram.y b/src/pl/plpgsql/src/gram.y
index a9488eda388..787a0085b5e 100644
--- a/src/pl/plpgsql/src/gram.y
+++ b/src/pl/plpgsql/src/gram.y
@@ -4,7 +4,7 @@
* procedural language
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/pl/plpgsql/src/gram.y,v 1.2 1999/01/28 11:48:30 wieck Exp $
+ * $Header: /cvsroot/pgsql/src/pl/plpgsql/src/gram.y,v 1.3 1999/03/21 01:07:07 tgl Exp $
*
* This software is copyrighted by Jan Wieck - Hamburg.
*
@@ -40,8 +40,9 @@
#include "string.h"
#include "plpgsql.h"
-extern int yylineno;
-extern char yytext[];
+extern int yylineno; /* not always declared by lexer... */
+
+#include "pl_scan.c"
static PLpgSQL_expr *read_sqlstmt(int until, char *s, char *sqlstart);
static PLpgSQL_stmt *make_select_stmt(void);
@@ -1454,7 +1455,3 @@ make_tupret_expr(PLpgSQL_row *row)
plpgsql_dstring_free(&ds);
return expr;
}
-
-
-
-#include "pl_scan.c"