mirror of
https://github.com/postgres/postgres.git
synced 2025-10-13 18:28:01 +03:00
Allow redeclaration of typedef yyscan_t
This is allowed in C11, so we don't need the workaround guards against
it anymore. This effectively reverts commit 382092a0cd
that put
these guards in place.
Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Discussion: https://www.postgresql.org/message-id/flat/10d32190-f31b-40a5-b177-11db55597355@eisentraut.org
This commit is contained in:
@@ -62,10 +62,7 @@ typedef struct NDBOX
|
|||||||
/* for cubescan.l and cubeparse.y */
|
/* for cubescan.l and cubeparse.y */
|
||||||
/* All grammar constructs return strings */
|
/* All grammar constructs return strings */
|
||||||
#define YYSTYPE char *
|
#define YYSTYPE char *
|
||||||
#ifndef YY_TYPEDEF_YY_SCANNER_T
|
|
||||||
#define YY_TYPEDEF_YY_SCANNER_T
|
|
||||||
typedef void *yyscan_t;
|
typedef void *yyscan_t;
|
||||||
#endif
|
|
||||||
|
|
||||||
/* in cubescan.l */
|
/* in cubescan.l */
|
||||||
extern int cube_yylex(YYSTYPE *yylval_param, yyscan_t yyscanner);
|
extern int cube_yylex(YYSTYPE *yylval_param, yyscan_t yyscanner);
|
||||||
|
@@ -16,10 +16,7 @@ extern int significant_digits(const char *s);
|
|||||||
|
|
||||||
/* for segscan.l and segparse.y */
|
/* for segscan.l and segparse.y */
|
||||||
union YYSTYPE;
|
union YYSTYPE;
|
||||||
#ifndef YY_TYPEDEF_YY_SCANNER_T
|
|
||||||
#define YY_TYPEDEF_YY_SCANNER_T
|
|
||||||
typedef void *yyscan_t;
|
typedef void *yyscan_t;
|
||||||
#endif
|
|
||||||
|
|
||||||
/* in segscan.l */
|
/* in segscan.l */
|
||||||
extern int seg_yylex(union YYSTYPE *yylval_param, yyscan_t yyscanner);
|
extern int seg_yylex(union YYSTYPE *yylval_param, yyscan_t yyscanner);
|
||||||
|
@@ -22,10 +22,7 @@ typedef struct JsonPathString
|
|||||||
int total;
|
int total;
|
||||||
} JsonPathString;
|
} JsonPathString;
|
||||||
|
|
||||||
#ifndef YY_TYPEDEF_YY_SCANNER_T
|
|
||||||
#define YY_TYPEDEF_YY_SCANNER_T
|
|
||||||
typedef void *yyscan_t;
|
typedef void *yyscan_t;
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "utils/jsonpath.h"
|
#include "utils/jsonpath.h"
|
||||||
#include "jsonpath_gram.h"
|
#include "jsonpath_gram.h"
|
||||||
|
@@ -20,10 +20,7 @@
|
|||||||
* here looking like the definitions in exprscan.l. exprparse.y and
|
* here looking like the definitions in exprscan.l. exprparse.y and
|
||||||
* pgbench.c also use this to be able to declare things as "yyscan_t".
|
* pgbench.c also use this to be able to declare things as "yyscan_t".
|
||||||
*/
|
*/
|
||||||
#ifndef YY_TYPEDEF_YY_SCANNER_T
|
|
||||||
#define YY_TYPEDEF_YY_SCANNER_T
|
|
||||||
typedef void *yyscan_t;
|
typedef void *yyscan_t;
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Likewise, we can't see exprparse.y's definition of union YYSTYPE here,
|
* Likewise, we can't see exprparse.y's definition of union YYSTYPE here,
|
||||||
|
@@ -56,10 +56,7 @@ extern void boot_get_type_io_data(Oid typid,
|
|||||||
Oid *typoutput);
|
Oid *typoutput);
|
||||||
|
|
||||||
union YYSTYPE;
|
union YYSTYPE;
|
||||||
#ifndef YY_TYPEDEF_YY_SCANNER_T
|
|
||||||
#define YY_TYPEDEF_YY_SCANNER_T
|
|
||||||
typedef void *yyscan_t;
|
typedef void *yyscan_t;
|
||||||
#endif
|
|
||||||
|
|
||||||
extern int boot_yyparse(yyscan_t yyscanner);
|
extern int boot_yyparse(yyscan_t yyscanner);
|
||||||
extern int boot_yylex_init(yyscan_t *yyscannerp);
|
extern int boot_yylex_init(yyscan_t *yyscannerp);
|
||||||
|
@@ -51,14 +51,8 @@
|
|||||||
* validity checking; in actual use, this file should always be included
|
* validity checking; in actual use, this file should always be included
|
||||||
* from the body of a flex file, where these symbols are already defined.
|
* from the body of a flex file, where these symbols are already defined.
|
||||||
*/
|
*/
|
||||||
#ifndef YY_TYPEDEF_YY_BUFFER_STATE
|
|
||||||
#define YY_TYPEDEF_YY_BUFFER_STATE
|
|
||||||
typedef struct yy_buffer_state *YY_BUFFER_STATE;
|
typedef struct yy_buffer_state *YY_BUFFER_STATE;
|
||||||
#endif
|
|
||||||
#ifndef YY_TYPEDEF_YY_SCANNER_T
|
|
||||||
#define YY_TYPEDEF_YY_SCANNER_T
|
|
||||||
typedef void *yyscan_t;
|
typedef void *yyscan_t;
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We use a stack of flex buffers to handle substitution of psql variables.
|
* We use a stack of flex buffers to handle substitution of psql variables.
|
||||||
|
@@ -97,10 +97,7 @@ extern void SyncRepUpdateSyncStandbysDefined(void);
|
|||||||
* in syncrep_gram.y and syncrep_scanner.l
|
* in syncrep_gram.y and syncrep_scanner.l
|
||||||
*/
|
*/
|
||||||
union YYSTYPE;
|
union YYSTYPE;
|
||||||
#ifndef YY_TYPEDEF_YY_SCANNER_T
|
|
||||||
#define YY_TYPEDEF_YY_SCANNER_T
|
|
||||||
typedef void *yyscan_t;
|
typedef void *yyscan_t;
|
||||||
#endif
|
|
||||||
extern int syncrep_yyparse(SyncRepConfigData **syncrep_parse_result_p, char **syncrep_parse_error_msg_p, yyscan_t yyscanner);
|
extern int syncrep_yyparse(SyncRepConfigData **syncrep_parse_result_p, char **syncrep_parse_error_msg_p, yyscan_t yyscanner);
|
||||||
extern int syncrep_yylex(union YYSTYPE *yylval_param, char **syncrep_parse_error_msg_p, yyscan_t yyscanner);
|
extern int syncrep_yylex(union YYSTYPE *yylval_param, char **syncrep_parse_error_msg_p, yyscan_t yyscanner);
|
||||||
extern void syncrep_yyerror(SyncRepConfigData **syncrep_parse_result_p, char **syncrep_parse_error_msg_p, yyscan_t yyscanner, const char *str);
|
extern void syncrep_yyerror(SyncRepConfigData **syncrep_parse_result_p, char **syncrep_parse_error_msg_p, yyscan_t yyscanner, const char *str);
|
||||||
|
@@ -141,10 +141,7 @@ extern void WalSndSetState(WalSndState state);
|
|||||||
* repl_scanner.l
|
* repl_scanner.l
|
||||||
*/
|
*/
|
||||||
union YYSTYPE;
|
union YYSTYPE;
|
||||||
#ifndef YY_TYPEDEF_YY_SCANNER_T
|
|
||||||
#define YY_TYPEDEF_YY_SCANNER_T
|
|
||||||
typedef void *yyscan_t;
|
typedef void *yyscan_t;
|
||||||
#endif
|
|
||||||
extern int replication_yyparse(Node **replication_parse_result_p, yyscan_t yyscanner);
|
extern int replication_yyparse(Node **replication_parse_result_p, yyscan_t yyscanner);
|
||||||
extern int replication_yylex(union YYSTYPE *yylval_param, yyscan_t yyscanner);
|
extern int replication_yylex(union YYSTYPE *yylval_param, yyscan_t yyscanner);
|
||||||
pg_noreturn extern void replication_yyerror(Node **replication_parse_result_p, yyscan_t yyscanner, const char *message);
|
pg_noreturn extern void replication_yyerror(Node **replication_parse_result_p, yyscan_t yyscanner, const char *message);
|
||||||
|
@@ -1307,10 +1307,7 @@ extern void plpgsql_dumptree(PLpgSQL_function *func);
|
|||||||
*/
|
*/
|
||||||
union YYSTYPE;
|
union YYSTYPE;
|
||||||
#define YYLTYPE int
|
#define YYLTYPE int
|
||||||
#ifndef YY_TYPEDEF_YY_SCANNER_T
|
|
||||||
#define YY_TYPEDEF_YY_SCANNER_T
|
|
||||||
typedef void *yyscan_t;
|
typedef void *yyscan_t;
|
||||||
#endif
|
|
||||||
extern int plpgsql_yylex(union YYSTYPE *yylvalp, YYLTYPE *yyllocp, yyscan_t yyscanner);
|
extern int plpgsql_yylex(union YYSTYPE *yylvalp, YYLTYPE *yyllocp, yyscan_t yyscanner);
|
||||||
extern int plpgsql_token_length(yyscan_t yyscanner);
|
extern int plpgsql_token_length(yyscan_t yyscanner);
|
||||||
extern void plpgsql_push_back_token(int token, union YYSTYPE *yylvalp, YYLTYPE *yyllocp, yyscan_t yyscanner);
|
extern void plpgsql_push_back_token(int token, union YYSTYPE *yylvalp, YYLTYPE *yyllocp, yyscan_t yyscanner);
|
||||||
|
Reference in New Issue
Block a user