aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg/preproc/ecpg.c
diff options
context:
space:
mode:
authorMichael Meskes <meskes@postgresql.org>2003-05-01 17:16:57 +0000
committerMichael Meskes <meskes@postgresql.org>2003-05-01 17:16:57 +0000
commit9e9d8d54e32e3ce9fa839b9b23192bc698eca5d0 (patch)
treed1e20a88b90f303530715c7d7c8d8d0701c581aa /src/interfaces/ecpg/preproc/ecpg.c
parentcffded96ead867c4dced4870f066b51341771d91 (diff)
downloadpostgresql-9e9d8d54e32e3ce9fa839b9b23192bc698eca5d0.tar.gz
postgresql-9e9d8d54e32e3ce9fa839b9b23192bc698eca5d0.zip
Added an option to force ecpg to also parse files includes via '#include' and some more Informix stuff.
Diffstat (limited to 'src/interfaces/ecpg/preproc/ecpg.c')
-rw-r--r--src/interfaces/ecpg/preproc/ecpg.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/interfaces/ecpg/preproc/ecpg.c b/src/interfaces/ecpg/preproc/ecpg.c
index f1c39edba66..2634eeee9c6 100644
--- a/src/interfaces/ecpg/preproc/ecpg.c
+++ b/src/interfaces/ecpg/preproc/ecpg.c
@@ -1,4 +1,4 @@
-/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/ecpg.c,v 1.66 2003/04/08 12:34:25 meskes Exp $ */
+/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/ecpg.c,v 1.67 2003/05/01 17:16:57 meskes Exp $ */
/* New main for ecpg, the PostgreSQL embedded SQL precompiler. */
/* (C) Michael Meskes <meskes@postgresql.org> Feb 5th, 1998 */
@@ -19,7 +19,8 @@ extern char *optarg;
int ret_value = 0,
autocommit = false,
- auto_create_c = false;
+ auto_create_c = false,
+ system_includes = false;
enum COMPAT_MODE compat = ECPG_COMPAT_PGSQL;
@@ -43,11 +44,13 @@ help(const char *progname)
printf(" -d generate parser debug output\n");
#endif
printf(" -C <mode> set compatibility mode\n"
- " mode may be INFORMIX only at the moment\n");
+ " mode may be INFORMIX only at the moment\n"
+ " INFORMIX mode implies '-i'\n");
printf(" -D SYMBOL define SYMBOL\n");
printf(" -I DIRECTORY search DIRECTORY for include files\n");
printf(" -o OUTFILE write result to OUTFILE\n");
printf(" -t turn on autocommit of transactions\n");
+ printf(" -i parse system include files as well\n");
printf(" --help show this help, then exit\n");
printf(" --version output version information, then exit\n");
printf("\nIf no output file is specified, the name is formed by adding .c to the\n"
@@ -127,7 +130,7 @@ main(int argc, char *const argv[])
add_include_path("/usr/local/include");
add_include_path(".");
- while ((c = getopt(argc, argv, "vco:I:tD:dC:")) != -1)
+ while ((c = getopt(argc, argv, "vcio:I:tD:dC:")) != -1)
{
switch (c)
{
@@ -150,10 +153,14 @@ main(int argc, char *const argv[])
case 'c':
auto_create_c = true;
break;
+ case 'i':
+ system_includes = true;
+ break;
case 'C':
if (strcmp(optarg, "INFORMIX") == 0)
{
compat = ECPG_COMPAT_INFORMIX;
+ system_includes = true;
add_preprocessor_define("dec_t=Numeric");
add_preprocessor_define("intrvl_t=Interval");
}