[BUGS] base_yylex undefined in src/interface/ecpg/preproc/parser.c
От | Дилян Палаузов |
---|---|
Тема | [BUGS] base_yylex undefined in src/interface/ecpg/preproc/parser.c |
Дата | |
Msg-id | d845c1af-e18d-6651-178f-9f08cdf37e10@aegee.org обсуждение исходный текст |
Ответы |
Re: [BUGS] base_yylex undefined in src/interface/ecpg/preproc/parser.c
|
Список | pgsql-bugs |
Hello, with the newest flex (v2.6.2-19-g6bea32e, which is newer than 2.6.3) I need this patch to compile postgres: diff --git a/src/interfaces/ecpg/preproc/pgc.l b/src/interfaces/ecpg/preproc/pgc.l index 0453409d37..1c82b58e18 100644 --- a/src/interfaces/ecpg/preproc/pgc.l +++ b/src/interfaces/ecpg/preproc/pgc.l @@ -30,7 +30,7 @@ static int xcdepth = 0; /* depth of nesting in slash-star comments */ static char *dolqstart = NULL; /* current $foo$ quote start string */ static YY_BUFFER_STATE scanbufhandle; static char *scanbuf; - +#define yylex base_yylex /* * literalbuf is used to accumulate literal values when multiple rules * are needed to parse a single literal. Call startlit to reset buffer otherwise the linker fails with: gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -O0 -pthread -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS -DECPG_COMPILE -L../../../../src/port -L../../../../src/common -L/usr/local/lib -L/usr/local/lib -L/usr/local/lib -Wl,--as-needed -Wl,-rpath,'/usr/local/lib',--enable-new-dtags preproc.o type.o ecpg.o output.o parser.o keywords.o c_keywords.o ecpg_keywords.o kwlookup.o ../ecpglib/typename.o descriptor.o variable.o -lpgcommon -lpgport -lxslt -lxml2 -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lrt -lcrypt -ldl -lm -lpthread -o ecpg parser.o: In function `filtered_base_yylex': /git/postgresql/src/interfaces/ecpg/preproc/parser.c:68: undefined reference to `base_yylex' /git/postgresql/src/interfaces/ecpg/preproc/parser.c:105: undefined reference to `base_yylex' collect2: error: ld returned 1 exit status make: *** [Makefile:42: ecpg] Error 1 because of ecpg/preproc/parser.c:68 (in REL9_5_STABLE) With previous versions of flex the compilation has worked. But I do not find in the code where is supposed yylex to be renamed to base_yylex when parser.c is proccessed. pgc.l also does not use %option prefix=base_yy, which would be the right way to rename yylex (apart from #define YY_DECL). What is the purpose to rename yylex to base_yylex? Greetings Дилян -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
В списке pgsql-bugs по дате отправления: