mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-10-02 10:31:17 +02:00
Remove outside-the-scanner references to "yyleng".
It seems the flex developers have decided to change yyleng from int to size_t. This has already happened in the latest release of OS X, and will start happening elsewhere once the next release of flex appears. Rather than trying to divine how it's declared in any particular build, let's just remove the one existing not-very-necessary external usage. Back-patch to all supported branches; not so much because users in the field are likely to care about building old branches with cutting-edge flex, as to keep OSX-based buildfarm members from having problems with old branches.
This commit is contained in:
parent
9f0e84a65d
commit
4d3456e85d
@ -1,4 +1,4 @@
|
|||||||
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/ecpg.header,v 1.8 2009/08/07 10:51:20 meskes Exp $ */
|
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/ecpg.header,v 1.9 2009/09/08 04:25:00 tgl Exp $ */
|
||||||
|
|
||||||
/* Copyright comment */
|
/* Copyright comment */
|
||||||
%{
|
%{
|
||||||
@ -184,11 +184,7 @@ make3_str(char *str1, char *str2, char *str3)
|
|||||||
static char *
|
static char *
|
||||||
make_name(void)
|
make_name(void)
|
||||||
{
|
{
|
||||||
char * name = (char *)mm_alloc(yyleng + 1);
|
return mm_strdup(yytext);
|
||||||
|
|
||||||
strncpy(name, yytext, yyleng);
|
|
||||||
name[yyleng] = '\0';
|
|
||||||
return(name);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
@ -220,7 +216,7 @@ create_questionmarks(char *name, bool array)
|
|||||||
for (; count > 0; count --)
|
for (; count > 0; count --)
|
||||||
{
|
{
|
||||||
sprintf(pacounter_buffer, "$%d", pacounter++);
|
sprintf(pacounter_buffer, "$%d", pacounter++);
|
||||||
result = cat_str(3, result, strdup(pacounter_buffer), make_str(" , "));
|
result = cat_str(3, result, mm_strdup(pacounter_buffer), make_str(" , "));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* removed the trailing " ," */
|
/* removed the trailing " ," */
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/extern.h,v 1.74 2009/07/14 20:24:10 tgl Exp $ */
|
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/extern.h,v 1.75 2009/09/08 04:25:00 tgl Exp $ */
|
||||||
|
|
||||||
#ifndef _ECPG_PREPROC_EXTERN_H
|
#ifndef _ECPG_PREPROC_EXTERN_H
|
||||||
#define _ECPG_PREPROC_EXTERN_H
|
#define _ECPG_PREPROC_EXTERN_H
|
||||||
@ -39,8 +39,7 @@ extern char *yytext,
|
|||||||
#ifdef YYDEBUG
|
#ifdef YYDEBUG
|
||||||
extern int yydebug;
|
extern int yydebug;
|
||||||
#endif
|
#endif
|
||||||
extern int yylineno,
|
extern int yylineno;
|
||||||
yyleng;
|
|
||||||
extern FILE *yyin,
|
extern FILE *yyin,
|
||||||
*yyout;
|
*yyout;
|
||||||
extern char *output_filename;
|
extern char *output_filename;
|
||||||
|
Loading…
Reference in New Issue
Block a user