mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-03-19 20:00:51 +08:00
- Removed duplicate include of ecpgtype.h which meant I had to adapt all expected results.
- Changed INFORMIX mode symbol definition yet again because the old way didn't work on NetBSD. Hopefully this one does.
This commit is contained in:
parent
b120382353
commit
a9bc069c0b
@ -2317,3 +2317,8 @@ Fri, 15 Feb 2008 12:01:13 +0100
|
||||
|
||||
- Changed the way symbols are defined in C in INFORMIX mode.
|
||||
|
||||
Sun, 17 Feb 2008 18:45:39 +0100
|
||||
|
||||
- Removed duplicate include of ecpgtype.h.
|
||||
- Changed INFORMIX mode symbol definition yet again because the old
|
||||
way didn't work on NetBSD.
|
||||
|
@ -1,12 +1,13 @@
|
||||
/* $PostgreSQL: pgsql/src/interfaces/ecpg/include/datetime.h,v 1.15 2008/02/15 11:20:21 meskes Exp $ */
|
||||
/* $PostgreSQL: pgsql/src/interfaces/ecpg/include/datetime.h,v 1.16 2008/02/17 18:14:29 meskes Exp $ */
|
||||
|
||||
#ifndef _ECPG_DATETIME_H
|
||||
#define _ECPG_DATETIME_H
|
||||
|
||||
#include <ecpg_informix.h>
|
||||
|
||||
/* brought in by ecpg_informix.h nowadays
|
||||
* typedef timestamp dtime_t;
|
||||
* typedef interval intrvl_t; */
|
||||
#ifndef _ECPGLIB_H /* source created by ecpg which defines these symbols */
|
||||
typedef timestamp dtime_t;
|
||||
typedef interval intrvl_t;
|
||||
#endif /* ndef _ECPGLIB_H */
|
||||
|
||||
#endif /* ndef _ECPG_DATETIME_H */
|
||||
|
@ -1,11 +1,12 @@
|
||||
/* $PostgreSQL: pgsql/src/interfaces/ecpg/include/decimal.h,v 1.17 2008/02/15 11:20:21 meskes Exp $ */
|
||||
/* $PostgreSQL: pgsql/src/interfaces/ecpg/include/decimal.h,v 1.18 2008/02/17 18:14:29 meskes Exp $ */
|
||||
|
||||
#ifndef _ECPG_DECIMAL_H
|
||||
#define _ECPG_DECIMAL_H
|
||||
|
||||
#include <ecpg_informix.h>
|
||||
|
||||
/* brought in by ecpg_informix.h nowadays
|
||||
* typedef decimal dec_t; */
|
||||
#ifndef _ECPGLIB_H /* source created by ecpg which defines this symbol */
|
||||
typedef decimal dec_t;
|
||||
#endif /* ndef _ECPGLIB_H */
|
||||
|
||||
#endif /* ndef _ECPG_DECIMAL_H */
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file contains stuff needed to be as compatible to Informix as possible.
|
||||
* $PostgreSQL: pgsql/src/interfaces/ecpg/include/ecpg_informix.h,v 1.21 2008/02/15 11:20:21 meskes Exp $
|
||||
* $PostgreSQL: pgsql/src/interfaces/ecpg/include/ecpg_informix.h,v 1.22 2008/02/17 18:14:29 meskes Exp $
|
||||
*/
|
||||
#ifndef _ECPG_INFORMIX_H
|
||||
#define _ECPG_INFORMIX_H
|
||||
@ -82,11 +82,6 @@ extern int dttofmtasc(timestamp *, char *, int, char *);
|
||||
extern int intoasc(interval *, char *);
|
||||
extern int dtcvfmtasc(char *, char *, timestamp *);
|
||||
|
||||
/* we also define Informix datatypes here */
|
||||
typedef timestamp dtime_t;
|
||||
typedef interval intrvl_t;
|
||||
typedef decimal dec_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/ecpg.c,v 1.103 2007/12/21 14:33:20 meskes Exp $ */
|
||||
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/ecpg.c,v 1.104 2008/02/17 18:14:29 meskes Exp $ */
|
||||
|
||||
/* New main for ecpg, the PostgreSQL embedded SQL precompiler. */
|
||||
/* (C) Michael Meskes <meskes@postgresql.org> Feb 5th, 1998 */
|
||||
@ -439,7 +439,7 @@ main(int argc, char *const argv[])
|
||||
|
||||
if (header_mode == false)
|
||||
{
|
||||
fprintf(yyout, "/* These include files are added by the preprocessor */\n#include <ecpgtype.h>\n#include <ecpglib.h>\n#include <ecpgerrno.h>\n#include <sqlca.h>\n");
|
||||
fprintf(yyout, "/* These include files are added by the preprocessor */\n#include <ecpglib.h>\n#include <ecpgerrno.h>\n#include <sqlca.h>\n");
|
||||
|
||||
/* add some compatibility headers */
|
||||
if (INFORMIX_MODE)
|
||||
|
@ -12,7 +12,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.162 2008/02/15 11:20:21 meskes Exp $
|
||||
* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.163 2008/02/17 18:14:29 meskes Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -47,6 +47,7 @@ static void addlitchar (unsigned char);
|
||||
static void parse_include (void);
|
||||
static bool ecpg_isspace(char ch);
|
||||
static bool isdefine(void);
|
||||
static bool isinformixdefine(void);
|
||||
|
||||
char *token_start;
|
||||
int state_before;
|
||||
@ -743,7 +744,9 @@ cppline {space}*#(.*\\{space})*.*{newline}
|
||||
<C>{identifier} {
|
||||
const ScanKeyword *keyword;
|
||||
|
||||
if (!isdefine())
|
||||
/* Informix uses SQL defines only in SQL space */
|
||||
/* however, some defines have to be taken care of for compatibility */
|
||||
if ((!INFORMIX_MODE || !isinformixdefine()) && !isdefine())
|
||||
{
|
||||
keyword = ScanCKeywordLookup(yytext);
|
||||
if (keyword != NULL)
|
||||
@ -1315,6 +1318,36 @@ static bool isdefine(void)
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool isinformixdefine(void)
|
||||
{
|
||||
const char *new = NULL;
|
||||
|
||||
if (strcmp(yytext, "dec_t") == 0)
|
||||
new = "decimal";
|
||||
else if (strcmp(yytext, "intrvl_t") == 0)
|
||||
new = "interval";
|
||||
else if (strcmp(yytext, "dtime_t") == 0)
|
||||
new = "timestamp";
|
||||
|
||||
if (new)
|
||||
{
|
||||
struct _yy_buffer *yb;
|
||||
|
||||
yb = mm_alloc(sizeof(struct _yy_buffer));
|
||||
|
||||
yb->buffer = YY_CURRENT_BUFFER;
|
||||
yb->lineno = yylineno;
|
||||
yb->filename = mm_strdup(input_filename);
|
||||
yb->next = yy_buffer;
|
||||
yy_buffer = yb;
|
||||
|
||||
yy_scan_string(new);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
* Called before any actual parsing is done
|
||||
*/
|
||||
|
@ -1,6 +1,5 @@
|
||||
/* Processed by ecpg (regression mode) */
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
#include <ecpgerrno.h>
|
||||
#include <sqlca.h>
|
||||
|
@ -1,6 +1,5 @@
|
||||
/* Processed by ecpg (regression mode) */
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
#include <ecpgerrno.h>
|
||||
#include <sqlca.h>
|
||||
|
@ -1,6 +1,5 @@
|
||||
/* Processed by ecpg (regression mode) */
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
#include <ecpgerrno.h>
|
||||
#include <sqlca.h>
|
||||
|
@ -1,6 +1,5 @@
|
||||
/* Processed by ecpg (regression mode) */
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
#include <ecpgerrno.h>
|
||||
#include <sqlca.h>
|
||||
|
@ -1,6 +1,5 @@
|
||||
/* Processed by ecpg (regression mode) */
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
#include <ecpgerrno.h>
|
||||
#include <sqlca.h>
|
||||
|
@ -1,6 +1,5 @@
|
||||
/* Processed by ecpg (regression mode) */
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
#include <ecpgerrno.h>
|
||||
#include <sqlca.h>
|
||||
|
@ -1,6 +1,5 @@
|
||||
/* Processed by ecpg (regression mode) */
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
#include <ecpgerrno.h>
|
||||
#include <sqlca.h>
|
||||
|
@ -1,6 +1,5 @@
|
||||
/* Processed by ecpg (regression mode) */
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
#include <ecpgerrno.h>
|
||||
#include <sqlca.h>
|
||||
|
@ -1,6 +1,5 @@
|
||||
/* Processed by ecpg (regression mode) */
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
#include <ecpgerrno.h>
|
||||
#include <sqlca.h>
|
||||
|
@ -1,6 +1,5 @@
|
||||
/* Processed by ecpg (regression mode) */
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
#include <ecpgerrno.h>
|
||||
#include <sqlca.h>
|
||||
|
@ -1,6 +1,5 @@
|
||||
/* Processed by ecpg (regression mode) */
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
#include <ecpgerrno.h>
|
||||
#include <sqlca.h>
|
||||
|
@ -1,6 +1,5 @@
|
||||
/* Processed by ecpg (regression mode) */
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
#include <ecpgerrno.h>
|
||||
#include <sqlca.h>
|
||||
|
@ -1,6 +1,5 @@
|
||||
/* Processed by ecpg (regression mode) */
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
#include <ecpgerrno.h>
|
||||
#include <sqlca.h>
|
||||
|
@ -1,6 +1,5 @@
|
||||
/* Processed by ecpg (regression mode) */
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
#include <ecpgerrno.h>
|
||||
#include <sqlca.h>
|
||||
|
@ -1,6 +1,5 @@
|
||||
/* Processed by ecpg (regression mode) */
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
#include <ecpgerrno.h>
|
||||
#include <sqlca.h>
|
||||
|
@ -1,6 +1,5 @@
|
||||
/* Processed by ecpg (regression mode) */
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
#include <ecpgerrno.h>
|
||||
#include <sqlca.h>
|
||||
|
@ -1,6 +1,5 @@
|
||||
/* Processed by ecpg (regression mode) */
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
#include <ecpgerrno.h>
|
||||
#include <sqlca.h>
|
||||
|
@ -1,6 +1,5 @@
|
||||
/* Processed by ecpg (regression mode) */
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
#include <ecpgerrno.h>
|
||||
#include <sqlca.h>
|
||||
|
@ -1,6 +1,5 @@
|
||||
/* Processed by ecpg (regression mode) */
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
#include <ecpgerrno.h>
|
||||
#include <sqlca.h>
|
||||
|
@ -1,6 +1,5 @@
|
||||
/* Processed by ecpg (regression mode) */
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
#include <ecpgerrno.h>
|
||||
#include <sqlca.h>
|
||||
|
@ -1,6 +1,5 @@
|
||||
/* Processed by ecpg (regression mode) */
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
#include <ecpgerrno.h>
|
||||
#include <sqlca.h>
|
||||
|
@ -1,6 +1,5 @@
|
||||
/* Processed by ecpg (regression mode) */
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
#include <ecpgerrno.h>
|
||||
#include <sqlca.h>
|
||||
|
@ -1,6 +1,5 @@
|
||||
/* Processed by ecpg (regression mode) */
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
#include <ecpgerrno.h>
|
||||
#include <sqlca.h>
|
||||
|
@ -1,6 +1,5 @@
|
||||
/* Processed by ecpg (regression mode) */
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
#include <ecpgerrno.h>
|
||||
#include <sqlca.h>
|
||||
|
@ -1,6 +1,5 @@
|
||||
/* Processed by ecpg (regression mode) */
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
#include <ecpgerrno.h>
|
||||
#include <sqlca.h>
|
||||
|
@ -1,6 +1,5 @@
|
||||
/* Processed by ecpg (regression mode) */
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
#include <ecpgerrno.h>
|
||||
#include <sqlca.h>
|
||||
|
@ -1,6 +1,5 @@
|
||||
/* Processed by ecpg (regression mode) */
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
#include <ecpgerrno.h>
|
||||
#include <sqlca.h>
|
||||
|
@ -1,6 +1,5 @@
|
||||
/* Processed by ecpg (regression mode) */
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
#include <ecpgerrno.h>
|
||||
#include <sqlca.h>
|
||||
|
@ -1,6 +1,5 @@
|
||||
/* Processed by ecpg (regression mode) */
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
#include <ecpgerrno.h>
|
||||
#include <sqlca.h>
|
||||
|
@ -1,6 +1,5 @@
|
||||
/* Processed by ecpg (regression mode) */
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
#include <ecpgerrno.h>
|
||||
#include <sqlca.h>
|
||||
|
@ -1,6 +1,5 @@
|
||||
/* Processed by ecpg (regression mode) */
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
#include <ecpgerrno.h>
|
||||
#include <sqlca.h>
|
||||
|
@ -1,6 +1,5 @@
|
||||
/* Processed by ecpg (regression mode) */
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
#include <ecpgerrno.h>
|
||||
#include <sqlca.h>
|
||||
|
@ -1,6 +1,5 @@
|
||||
/* Processed by ecpg (regression mode) */
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
#include <ecpgerrno.h>
|
||||
#include <sqlca.h>
|
||||
|
@ -1,6 +1,5 @@
|
||||
/* Processed by ecpg (regression mode) */
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
#include <ecpgerrno.h>
|
||||
#include <sqlca.h>
|
||||
|
@ -1,6 +1,5 @@
|
||||
/* Processed by ecpg (regression mode) */
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
#include <ecpgerrno.h>
|
||||
#include <sqlca.h>
|
||||
|
@ -1,6 +1,5 @@
|
||||
/* Processed by ecpg (regression mode) */
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
#include <ecpgerrno.h>
|
||||
#include <sqlca.h>
|
||||
|
@ -1,6 +1,5 @@
|
||||
/* Processed by ecpg (regression mode) */
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
#include <ecpgerrno.h>
|
||||
#include <sqlca.h>
|
||||
|
@ -1,6 +1,5 @@
|
||||
/* Processed by ecpg (regression mode) */
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
#include <ecpgerrno.h>
|
||||
#include <sqlca.h>
|
||||
|
@ -1,6 +1,5 @@
|
||||
/* Processed by ecpg (regression mode) */
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
#include <ecpgerrno.h>
|
||||
#include <sqlca.h>
|
||||
|
@ -1,6 +1,5 @@
|
||||
/* Processed by ecpg (regression mode) */
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
#include <ecpgerrno.h>
|
||||
#include <sqlca.h>
|
||||
|
@ -1,6 +1,5 @@
|
||||
/* Processed by ecpg (regression mode) */
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
#include <ecpgerrno.h>
|
||||
#include <sqlca.h>
|
||||
|
@ -1,6 +1,5 @@
|
||||
/* Processed by ecpg (regression mode) */
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
#include <ecpgerrno.h>
|
||||
#include <sqlca.h>
|
||||
|
@ -1,6 +1,5 @@
|
||||
/* Processed by ecpg (regression mode) */
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
#include <ecpgerrno.h>
|
||||
#include <sqlca.h>
|
||||
|
@ -1,6 +1,5 @@
|
||||
/* Processed by ecpg (regression mode) */
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
#include <ecpgerrno.h>
|
||||
#include <sqlca.h>
|
||||
|
@ -1,6 +1,5 @@
|
||||
/* Processed by ecpg (regression mode) */
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
#include <ecpgerrno.h>
|
||||
#include <sqlca.h>
|
||||
|
@ -1,6 +1,5 @@
|
||||
/* Processed by ecpg (regression mode) */
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
#include <ecpgerrno.h>
|
||||
#include <sqlca.h>
|
||||
|
Loading…
x
Reference in New Issue
Block a user