diff --git a/src/interfaces/ecpg/ecpglib/connect.c b/src/interfaces/ecpg/ecpglib/connect.c index b3cfd80bdc93bfcb0a2cc624ef5e895711aa321e..369c92f48ade986faeb0feac024fa97a5a0df04e 100644 --- a/src/interfaces/ecpg/ecpglib/connect.c +++ b/src/interfaces/ecpg/ecpglib/connect.c @@ -1,4 +1,4 @@ -/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/connect.c,v 1.38 2007/01/11 15:47:33 meskes Exp $ */ +/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/connect.c,v 1.39 2007/01/12 10:00:12 meskes Exp $ */ #define POSTGRES_ECPG_INTERNAL #include "postgres_fe.h" @@ -19,7 +19,6 @@ static pthread_once_t actual_connection_key_once = PTHREAD_ONCE_INIT; #endif static struct connection *actual_connection = NULL; static struct connection *all_connections = NULL; -extern int ecpg_internal_regression_mode; #ifdef ENABLE_THREAD_SAFETY static void diff --git a/src/interfaces/ecpg/ecpglib/data.c b/src/interfaces/ecpg/ecpglib/data.c index 6b2bbfa64bed7c87a74e5f3e87326ad89220785d..3d8842b2aa9d2fcb62dfe76233e3c75b3a6341d2 100644 --- a/src/interfaces/ecpg/ecpglib/data.c +++ b/src/interfaces/ecpg/ecpglib/data.c @@ -1,4 +1,4 @@ -/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/data.c,v 1.36 2007/01/11 15:47:33 meskes Exp $ */ +/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/data.c,v 1.37 2007/01/12 10:00:12 meskes Exp $ */ #define POSTGRES_ECPG_INTERNAL #include "postgres_fe.h" @@ -16,8 +16,6 @@ #include "pgtypes_timestamp.h" #include "pgtypes_interval.h" -extern int ecpg_internal_regression_mode; - static bool garbage_left(enum ARRAY_TYPE isarray, char *scan_length, enum COMPAT_MODE compat) { diff --git a/src/interfaces/ecpg/ecpglib/extern.h b/src/interfaces/ecpg/ecpglib/extern.h index 8759fac4fdb5cc52185400909d0d968cb4ea60ff..d5d44a79c0ce73f76486979e30ffb78b7a412da4 100644 --- a/src/interfaces/ecpg/ecpglib/extern.h +++ b/src/interfaces/ecpg/ecpglib/extern.h @@ -1,4 +1,4 @@ -/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/extern.h,v 1.20 2006/10/04 00:30:11 momjian Exp $ */ +/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/extern.h,v 1.21 2007/01/12 10:00:13 meskes Exp $ */ #ifndef _ECPG_LIB_EXTERN_H #define _ECPG_LIB_EXTERN_H @@ -12,6 +12,8 @@ enum COMPAT_MODE ECPG_COMPAT_PGSQL = 0, ECPG_COMPAT_INFORMIX, ECPG_COMPAT_INFORMIX_SE }; +extern bool ecpg_internal_regression_mode; + #define INFORMIX_MODE(X) ((X) == ECPG_COMPAT_INFORMIX || (X) == ECPG_COMPAT_INFORMIX_SE) enum ARRAY_TYPE diff --git a/src/interfaces/ecpg/ecpglib/misc.c b/src/interfaces/ecpg/ecpglib/misc.c index 122c7d63289a6e73dc6d2cfa030db2c6bcde74c0..4273819e79d8a391ca56cc50614acdf586e503f0 100644 --- a/src/interfaces/ecpg/ecpglib/misc.c +++ b/src/interfaces/ecpg/ecpglib/misc.c @@ -1,4 +1,4 @@ -/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/misc.c,v 1.33 2007/01/11 15:47:33 meskes Exp $ */ +/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/misc.c,v 1.34 2007/01/12 10:00:13 meskes Exp $ */ #define POSTGRES_ECPG_INTERNAL #include "postgres_fe.h" @@ -28,7 +28,7 @@ #endif #endif -extern int ecpg_internal_regression_mode; +bool ecpg_internal_regression_mode = false; static struct sqlca_t sqlca_init = { @@ -228,8 +228,16 @@ ECPGdebug(int n, FILE *dbgs) pthread_mutex_lock(&debug_init_mutex); #endif - simple_debug = n; + if (n > 100) + { + ecpg_internal_regression_mode = true; + simple_debug = n-100; + } + else + simple_debug = n; + debugstream = dbgs; + ECPGlog("ECPGdebug: set to %d\n", simple_debug); #ifdef ENABLE_THREAD_SAFETY diff --git a/src/interfaces/ecpg/preproc/ecpg.c b/src/interfaces/ecpg/preproc/ecpg.c index 66b4138c89b289900a5915cb08f933ebcc39ddb1..c8b2327289bb4b7991cd838698c51d39d9222860 100644 --- a/src/interfaces/ecpg/preproc/ecpg.c +++ b/src/interfaces/ecpg/preproc/ecpg.c @@ -1,4 +1,4 @@ -/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/ecpg.c,v 1.95 2007/01/11 15:47:33 meskes Exp $ */ +/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/ecpg.c,v 1.96 2007/01/12 10:00:13 meskes Exp $ */ /* New main for ecpg, the PostgreSQL embedded SQL precompiler. */ /* (C) Michael Meskes <meskes@postgresql.org> Feb 5th, 1998 */ @@ -425,7 +425,6 @@ main(int argc, char *const argv[]) else fprintf(yyout, "/* Processed by ecpg (%d.%d.%d) */\n", MAJOR_VERSION, MINOR_VERSION, PATCHLEVEL); - fprintf(yyout, "int ecpg_internal_regression_mode = %d;\n", regression_mode); 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"); @@ -437,6 +436,9 @@ main(int argc, char *const argv[]) fprintf(yyout, "/* End of automatic include section */\n"); } + if (regression_mode) + fprintf(yyout, "#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))\n"); + output_line_number(); /* and parse the source */ diff --git a/src/interfaces/ecpg/test/expected/compat_informix-charfuncs.c b/src/interfaces/ecpg/test/expected/compat_informix-charfuncs.c index f0090cc1976f5376036783cef1819bee2a8991b0..79ab5af5aea805eb7330965d7568fdfece5f96f8 100644 --- a/src/interfaces/ecpg/test/expected/compat_informix-charfuncs.c +++ b/src/interfaces/ecpg/test/expected/compat_informix-charfuncs.c @@ -1,5 +1,4 @@ /* Processed by ecpg (regression mode) */ -int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include <ecpgtype.h> #include <ecpglib.h> @@ -8,6 +7,7 @@ int ecpg_internal_regression_mode = 1; /* Needed for informix compatibility */ #include <ecpg_informix.h> /* End of automatic include section */ +#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y)) #line 1 "charfuncs.pgc" #include <stdio.h> diff --git a/src/interfaces/ecpg/test/expected/compat_informix-dec_test.c b/src/interfaces/ecpg/test/expected/compat_informix-dec_test.c index 323e2082a905fb11b13e6b4f1ea0148fe3c072c0..d71be24e4e9f241f880dc5eaaaa30d555b16238b 100644 --- a/src/interfaces/ecpg/test/expected/compat_informix-dec_test.c +++ b/src/interfaces/ecpg/test/expected/compat_informix-dec_test.c @@ -1,5 +1,4 @@ /* Processed by ecpg (regression mode) */ -int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include <ecpgtype.h> #include <ecpglib.h> @@ -8,6 +7,7 @@ int ecpg_internal_regression_mode = 1; /* Needed for informix compatibility */ #include <ecpg_informix.h> /* End of automatic include section */ +#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y)) #line 1 "dec_test.pgc" #include <stdio.h> diff --git a/src/interfaces/ecpg/test/expected/compat_informix-rfmtdate.c b/src/interfaces/ecpg/test/expected/compat_informix-rfmtdate.c index 6ec78475afc9e66665aff217b986fc43230b73c7..167535a59b7aa9138789aac457fc34b9a7de5556 100644 --- a/src/interfaces/ecpg/test/expected/compat_informix-rfmtdate.c +++ b/src/interfaces/ecpg/test/expected/compat_informix-rfmtdate.c @@ -1,5 +1,4 @@ /* Processed by ecpg (regression mode) */ -int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include <ecpgtype.h> #include <ecpglib.h> @@ -8,6 +7,7 @@ int ecpg_internal_regression_mode = 1; /* Needed for informix compatibility */ #include <ecpg_informix.h> /* End of automatic include section */ +#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y)) #line 1 "rfmtdate.pgc" #include <stdio.h> diff --git a/src/interfaces/ecpg/test/expected/compat_informix-rfmtlong.c b/src/interfaces/ecpg/test/expected/compat_informix-rfmtlong.c index 2c96cc0e76b7a2d1d60ce56418b67562d1fbc411..0b0466ae14463a4a13e5f30e1c615ed99c9e0ac4 100644 --- a/src/interfaces/ecpg/test/expected/compat_informix-rfmtlong.c +++ b/src/interfaces/ecpg/test/expected/compat_informix-rfmtlong.c @@ -1,5 +1,4 @@ /* Processed by ecpg (regression mode) */ -int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include <ecpgtype.h> #include <ecpglib.h> @@ -8,6 +7,7 @@ int ecpg_internal_regression_mode = 1; /* Needed for informix compatibility */ #include <ecpg_informix.h> /* End of automatic include section */ +#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y)) #line 1 "rfmtlong.pgc" #include <stdio.h> diff --git a/src/interfaces/ecpg/test/expected/compat_informix-rnull.c b/src/interfaces/ecpg/test/expected/compat_informix-rnull.c index 9a6df4dbefc31ed4859e4229ed1f4db72a227bda..84acd62309bb96c2b55719eca1f686a0d2e8d171 100644 --- a/src/interfaces/ecpg/test/expected/compat_informix-rnull.c +++ b/src/interfaces/ecpg/test/expected/compat_informix-rnull.c @@ -1,5 +1,4 @@ /* Processed by ecpg (regression mode) */ -int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include <ecpgtype.h> #include <ecpglib.h> @@ -8,6 +7,7 @@ int ecpg_internal_regression_mode = 1; /* Needed for informix compatibility */ #include <ecpg_informix.h> /* End of automatic include section */ +#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y)) #line 1 "rnull.pgc" #include "sqltypes.h" diff --git a/src/interfaces/ecpg/test/expected/compat_informix-test_informix.c b/src/interfaces/ecpg/test/expected/compat_informix-test_informix.c index 8aab843540b640bab65679f94041f1a59c9ac226..bd36a2a5e33943b990903fdfc61a972e8b3eed09 100644 --- a/src/interfaces/ecpg/test/expected/compat_informix-test_informix.c +++ b/src/interfaces/ecpg/test/expected/compat_informix-test_informix.c @@ -1,5 +1,4 @@ /* Processed by ecpg (regression mode) */ -int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include <ecpgtype.h> #include <ecpglib.h> @@ -8,6 +7,7 @@ int ecpg_internal_regression_mode = 1; /* Needed for informix compatibility */ #include <ecpg_informix.h> /* End of automatic include section */ +#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y)) #line 1 "test_informix.pgc" #include "sqltypes.h" diff --git a/src/interfaces/ecpg/test/expected/compat_informix-test_informix2.c b/src/interfaces/ecpg/test/expected/compat_informix-test_informix2.c index 8b0495d7a1a7e26fa792660fa6ac7c9485ca27af..db94fdf86e962117b7d3a32f2d22f7b9344de6a8 100644 --- a/src/interfaces/ecpg/test/expected/compat_informix-test_informix2.c +++ b/src/interfaces/ecpg/test/expected/compat_informix-test_informix2.c @@ -1,5 +1,4 @@ /* Processed by ecpg (regression mode) */ -int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include <ecpgtype.h> #include <ecpglib.h> @@ -8,6 +7,7 @@ int ecpg_internal_regression_mode = 1; /* Needed for informix compatibility */ #include <ecpg_informix.h> /* End of automatic include section */ +#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y)) #line 1 "test_informix2.pgc" #include <stdio.h> diff --git a/src/interfaces/ecpg/test/expected/connect-test1.c b/src/interfaces/ecpg/test/expected/connect-test1.c index 2f1cdbec1b2e3f74cec93c8c76fbf8dd6db7dd52..aee8e26f1bfe033a8a04e35404aacb194145da45 100644 --- a/src/interfaces/ecpg/test/expected/connect-test1.c +++ b/src/interfaces/ecpg/test/expected/connect-test1.c @@ -1,11 +1,11 @@ /* Processed by ecpg (regression mode) */ -int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include <ecpgtype.h> #include <ecpglib.h> #include <ecpgerrno.h> #include <sqlca.h> /* End of automatic include section */ +#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y)) #line 1 "test1.pgc" /* diff --git a/src/interfaces/ecpg/test/expected/connect-test2.c b/src/interfaces/ecpg/test/expected/connect-test2.c index 2a591867ae1bfa0df73209f4fbc45f4990a26910..a5ab29da3f5779ec88240d9c158cb47854d8413a 100644 --- a/src/interfaces/ecpg/test/expected/connect-test2.c +++ b/src/interfaces/ecpg/test/expected/connect-test2.c @@ -1,11 +1,11 @@ /* Processed by ecpg (regression mode) */ -int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include <ecpgtype.h> #include <ecpglib.h> #include <ecpgerrno.h> #include <sqlca.h> /* End of automatic include section */ +#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y)) #line 1 "test2.pgc" /* diff --git a/src/interfaces/ecpg/test/expected/connect-test3.c b/src/interfaces/ecpg/test/expected/connect-test3.c index ba0cc5529b128d2622b151c458931f84501cc10e..f601f9b900519ec97a68586d78493c4bdd69ca86 100644 --- a/src/interfaces/ecpg/test/expected/connect-test3.c +++ b/src/interfaces/ecpg/test/expected/connect-test3.c @@ -1,11 +1,11 @@ /* Processed by ecpg (regression mode) */ -int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include <ecpgtype.h> #include <ecpglib.h> #include <ecpgerrno.h> #include <sqlca.h> /* End of automatic include section */ +#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y)) #line 1 "test3.pgc" /* diff --git a/src/interfaces/ecpg/test/expected/connect-test4.c b/src/interfaces/ecpg/test/expected/connect-test4.c index 5ebee6235572ec9f3c68be827361bc6302e6e50b..42c017471e8cdb9d3d5aa56e83c0ca173a89fcc5 100644 --- a/src/interfaces/ecpg/test/expected/connect-test4.c +++ b/src/interfaces/ecpg/test/expected/connect-test4.c @@ -1,11 +1,11 @@ /* Processed by ecpg (regression mode) */ -int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include <ecpgtype.h> #include <ecpglib.h> #include <ecpgerrno.h> #include <sqlca.h> /* End of automatic include section */ +#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y)) #line 1 "test4.pgc" #include <stdlib.h> diff --git a/src/interfaces/ecpg/test/expected/connect-test5.c b/src/interfaces/ecpg/test/expected/connect-test5.c index 1335a919911b3ecb3100499627285fa2a4a2fcc5..b226b46a03f1f4dbe67d60781a25c938a342a24a 100644 --- a/src/interfaces/ecpg/test/expected/connect-test5.c +++ b/src/interfaces/ecpg/test/expected/connect-test5.c @@ -1,11 +1,11 @@ /* Processed by ecpg (regression mode) */ -int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include <ecpgtype.h> #include <ecpglib.h> #include <ecpgerrno.h> #include <sqlca.h> /* End of automatic include section */ +#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y)) #line 1 "test5.pgc" /* diff --git a/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test.c b/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test.c index d6bf060aa40bd30aef4f7e69ebc86164b80086fe..413ff7acd05f029a165f8fd4271f2cfcee3f3d1d 100644 --- a/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test.c +++ b/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test.c @@ -1,11 +1,11 @@ /* Processed by ecpg (regression mode) */ -int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include <ecpgtype.h> #include <ecpglib.h> #include <ecpgerrno.h> #include <sqlca.h> /* End of automatic include section */ +#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y)) #line 1 "dt_test.pgc" #include <stdio.h> diff --git a/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test2.c b/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test2.c index 8d9e180e5b7ea9d7edbf9febeac50c0a3d11a1b8..bac2dd69240cbd4a471ae58bb98a236c6a4c55e2 100644 --- a/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test2.c +++ b/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test2.c @@ -1,11 +1,11 @@ /* Processed by ecpg (regression mode) */ -int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include <ecpgtype.h> #include <ecpglib.h> #include <ecpgerrno.h> #include <sqlca.h> /* End of automatic include section */ +#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y)) #line 1 "dt_test2.pgc" #include <stdio.h> diff --git a/src/interfaces/ecpg/test/expected/pgtypeslib-num_test.c b/src/interfaces/ecpg/test/expected/pgtypeslib-num_test.c index 3d06dfdf999ad94aff31fc5976c0a11460aabe59..48d0e6f9b1a081f3ba6636ca866a8c7b7fad9b0b 100644 --- a/src/interfaces/ecpg/test/expected/pgtypeslib-num_test.c +++ b/src/interfaces/ecpg/test/expected/pgtypeslib-num_test.c @@ -1,11 +1,11 @@ /* Processed by ecpg (regression mode) */ -int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include <ecpgtype.h> #include <ecpglib.h> #include <ecpgerrno.h> #include <sqlca.h> /* End of automatic include section */ +#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y)) #line 1 "num_test.pgc" #include <stdio.h> diff --git a/src/interfaces/ecpg/test/expected/pgtypeslib-num_test2.c b/src/interfaces/ecpg/test/expected/pgtypeslib-num_test2.c index ec8477fdc9121ed65be17cdc7c80f9014091b1de..9b6bada22a1a3e547df69cd0b513a1eac1e4a1c7 100644 --- a/src/interfaces/ecpg/test/expected/pgtypeslib-num_test2.c +++ b/src/interfaces/ecpg/test/expected/pgtypeslib-num_test2.c @@ -1,11 +1,11 @@ /* Processed by ecpg (regression mode) */ -int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include <ecpgtype.h> #include <ecpglib.h> #include <ecpgerrno.h> #include <sqlca.h> /* End of automatic include section */ +#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y)) #line 1 "num_test2.pgc" #include <stdio.h> diff --git a/src/interfaces/ecpg/test/expected/preproc-comment.c b/src/interfaces/ecpg/test/expected/preproc-comment.c index 6bbc77579a9caebd5d8b4b65ea0280a7d636bdbf..57cd4f5e2ad9bd0c19950a9cb397626be1b54009 100644 --- a/src/interfaces/ecpg/test/expected/preproc-comment.c +++ b/src/interfaces/ecpg/test/expected/preproc-comment.c @@ -1,11 +1,11 @@ /* Processed by ecpg (regression mode) */ -int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include <ecpgtype.h> #include <ecpglib.h> #include <ecpgerrno.h> #include <sqlca.h> /* End of automatic include section */ +#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y)) #line 1 "comment.pgc" #include <stdlib.h> diff --git a/src/interfaces/ecpg/test/expected/preproc-define.c b/src/interfaces/ecpg/test/expected/preproc-define.c index a2d1489520497e60b4ab86c27701ca29be3a7c8c..44cd6eecc5659785cceb106ef9ce17fcbc5aadc6 100644 --- a/src/interfaces/ecpg/test/expected/preproc-define.c +++ b/src/interfaces/ecpg/test/expected/preproc-define.c @@ -1,11 +1,11 @@ /* Processed by ecpg (regression mode) */ -int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include <ecpgtype.h> #include <ecpglib.h> #include <ecpgerrno.h> #include <sqlca.h> /* End of automatic include section */ +#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y)) #line 1 "define.pgc" #include <stdlib.h> diff --git a/src/interfaces/ecpg/test/expected/preproc-init.c b/src/interfaces/ecpg/test/expected/preproc-init.c index 052a4af051e3db43c8cee0cb6a06926a090c7e23..e0fc30b63bec9fc7c94c3599bbca033c3a5320e7 100644 --- a/src/interfaces/ecpg/test/expected/preproc-init.c +++ b/src/interfaces/ecpg/test/expected/preproc-init.c @@ -1,11 +1,11 @@ /* Processed by ecpg (regression mode) */ -int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include <ecpgtype.h> #include <ecpglib.h> #include <ecpgerrno.h> #include <sqlca.h> /* End of automatic include section */ +#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y)) #line 1 "init.pgc" diff --git a/src/interfaces/ecpg/test/expected/preproc-type.c b/src/interfaces/ecpg/test/expected/preproc-type.c index 034787875e70e0056b44b1b4935c0606daa106ed..68805fa25367bc900e4da9e593352c0a0afad3a9 100644 --- a/src/interfaces/ecpg/test/expected/preproc-type.c +++ b/src/interfaces/ecpg/test/expected/preproc-type.c @@ -1,11 +1,11 @@ /* Processed by ecpg (regression mode) */ -int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include <ecpgtype.h> #include <ecpglib.h> #include <ecpgerrno.h> #include <sqlca.h> /* End of automatic include section */ +#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y)) #line 1 "type.pgc" #include <stdio.h> diff --git a/src/interfaces/ecpg/test/expected/preproc-variable.c b/src/interfaces/ecpg/test/expected/preproc-variable.c index 0913ecd06be2807aa5403e3ef2b402873d3907b4..a6beea09c80a45293f8cedab65b440eca60db038 100644 --- a/src/interfaces/ecpg/test/expected/preproc-variable.c +++ b/src/interfaces/ecpg/test/expected/preproc-variable.c @@ -1,11 +1,11 @@ /* Processed by ecpg (regression mode) */ -int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include <ecpgtype.h> #include <ecpglib.h> #include <ecpgerrno.h> #include <sqlca.h> /* End of automatic include section */ +#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y)) #line 1 "variable.pgc" #include <stdlib.h> diff --git a/src/interfaces/ecpg/test/expected/preproc-whenever.c b/src/interfaces/ecpg/test/expected/preproc-whenever.c index 446541edfb49c510771cde29b004def67001e7af..63a7d09f293d0ec95958687553f3c2d226724ec1 100644 --- a/src/interfaces/ecpg/test/expected/preproc-whenever.c +++ b/src/interfaces/ecpg/test/expected/preproc-whenever.c @@ -1,11 +1,11 @@ /* Processed by ecpg (regression mode) */ -int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include <ecpgtype.h> #include <ecpglib.h> #include <ecpgerrno.h> #include <sqlca.h> /* End of automatic include section */ +#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y)) #line 1 "whenever.pgc" #include <stdlib.h> diff --git a/src/interfaces/ecpg/test/expected/sql-array.c b/src/interfaces/ecpg/test/expected/sql-array.c index 7b996b3db8feda8eacae3320a36204b73359958a..fc64d7220d78ade3fc31b5f50c7149725db8210f 100644 --- a/src/interfaces/ecpg/test/expected/sql-array.c +++ b/src/interfaces/ecpg/test/expected/sql-array.c @@ -1,11 +1,11 @@ /* Processed by ecpg (regression mode) */ -int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include <ecpgtype.h> #include <ecpglib.h> #include <ecpgerrno.h> #include <sqlca.h> /* End of automatic include section */ +#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y)) #line 1 "array.pgc" #include <locale.h> diff --git a/src/interfaces/ecpg/test/expected/sql-binary.c b/src/interfaces/ecpg/test/expected/sql-binary.c index 418605be6ff00bd4226d74d848b24b29a16246d3..8c9a5f286adcd406492e7ab33f117c00542ec344 100644 --- a/src/interfaces/ecpg/test/expected/sql-binary.c +++ b/src/interfaces/ecpg/test/expected/sql-binary.c @@ -1,11 +1,11 @@ /* Processed by ecpg (regression mode) */ -int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include <ecpgtype.h> #include <ecpglib.h> #include <ecpgerrno.h> #include <sqlca.h> /* End of automatic include section */ +#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y)) #line 1 "binary.pgc" #include <stdio.h> diff --git a/src/interfaces/ecpg/test/expected/sql-code100.c b/src/interfaces/ecpg/test/expected/sql-code100.c index 2368b21f33fab039fa3b2a7f7124932d6bc330d5..96822bedcff95c262ed2b59b9e4416c12f7ab927 100644 --- a/src/interfaces/ecpg/test/expected/sql-code100.c +++ b/src/interfaces/ecpg/test/expected/sql-code100.c @@ -1,11 +1,11 @@ /* Processed by ecpg (regression mode) */ -int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include <ecpgtype.h> #include <ecpglib.h> #include <ecpgerrno.h> #include <sqlca.h> /* End of automatic include section */ +#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y)) #line 1 "code100.pgc" diff --git a/src/interfaces/ecpg/test/expected/sql-copystdout.c b/src/interfaces/ecpg/test/expected/sql-copystdout.c index 4ae3e9d92e8f9a61a1e90206e056fa5e0eb77f08..d0356475177ec7d8c425acec923eabd66e96283e 100644 --- a/src/interfaces/ecpg/test/expected/sql-copystdout.c +++ b/src/interfaces/ecpg/test/expected/sql-copystdout.c @@ -1,11 +1,11 @@ /* Processed by ecpg (regression mode) */ -int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include <ecpgtype.h> #include <ecpglib.h> #include <ecpgerrno.h> #include <sqlca.h> /* End of automatic include section */ +#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y)) #line 1 "copystdout.pgc" #include <stdio.h> diff --git a/src/interfaces/ecpg/test/expected/sql-define.c b/src/interfaces/ecpg/test/expected/sql-define.c index e66aa1994bf909da8b0987c037e76883bca470dc..69122812c27cb2e993ac1aa10fb083dc20926ee7 100644 --- a/src/interfaces/ecpg/test/expected/sql-define.c +++ b/src/interfaces/ecpg/test/expected/sql-define.c @@ -1,11 +1,11 @@ /* Processed by ecpg (regression mode) */ -int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include <ecpgtype.h> #include <ecpglib.h> #include <ecpgerrno.h> #include <sqlca.h> /* End of automatic include section */ +#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y)) #line 1 "define.pgc" diff --git a/src/interfaces/ecpg/test/expected/sql-desc.c b/src/interfaces/ecpg/test/expected/sql-desc.c index c735f2749f915e91ad9f20cd3a25cd17e9a8d612..708875a971d1d424aa220bca6eed68f1ce6df434 100644 --- a/src/interfaces/ecpg/test/expected/sql-desc.c +++ b/src/interfaces/ecpg/test/expected/sql-desc.c @@ -1,11 +1,11 @@ /* Processed by ecpg (regression mode) */ -int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include <ecpgtype.h> #include <ecpglib.h> #include <ecpgerrno.h> #include <sqlca.h> /* End of automatic include section */ +#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y)) #line 1 "desc.pgc" diff --git a/src/interfaces/ecpg/test/expected/sql-dynalloc.c b/src/interfaces/ecpg/test/expected/sql-dynalloc.c index 5fe0584042d7e426d06389c5a6d9bc0fdf32696d..ce178e8ce949277d91327a64978e700548a119f5 100644 --- a/src/interfaces/ecpg/test/expected/sql-dynalloc.c +++ b/src/interfaces/ecpg/test/expected/sql-dynalloc.c @@ -1,11 +1,11 @@ /* Processed by ecpg (regression mode) */ -int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include <ecpgtype.h> #include <ecpglib.h> #include <ecpgerrno.h> #include <sqlca.h> /* End of automatic include section */ +#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y)) #line 1 "dynalloc.pgc" #include <stdio.h> diff --git a/src/interfaces/ecpg/test/expected/sql-dynalloc2.c b/src/interfaces/ecpg/test/expected/sql-dynalloc2.c index 7d38c019b28fa16f2812ecedc34c582b50c8d3a5..19fd84fe94d231107955dc2d0d5fb460d5a1a256 100644 --- a/src/interfaces/ecpg/test/expected/sql-dynalloc2.c +++ b/src/interfaces/ecpg/test/expected/sql-dynalloc2.c @@ -1,11 +1,11 @@ /* Processed by ecpg (regression mode) */ -int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include <ecpgtype.h> #include <ecpglib.h> #include <ecpgerrno.h> #include <sqlca.h> /* End of automatic include section */ +#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y)) #line 1 "dynalloc2.pgc" #include <stdio.h> diff --git a/src/interfaces/ecpg/test/expected/sql-dyntest.c b/src/interfaces/ecpg/test/expected/sql-dyntest.c index 94d84e76ddf98f81f385cb2d237cd68e3b248942..242c93a395c870188076c09c44c823b84cc9497b 100644 --- a/src/interfaces/ecpg/test/expected/sql-dyntest.c +++ b/src/interfaces/ecpg/test/expected/sql-dyntest.c @@ -1,11 +1,11 @@ /* Processed by ecpg (regression mode) */ -int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include <ecpgtype.h> #include <ecpglib.h> #include <ecpgerrno.h> #include <sqlca.h> /* End of automatic include section */ +#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y)) #line 1 "dyntest.pgc" /* dynamic SQL test program diff --git a/src/interfaces/ecpg/test/expected/sql-execute.c b/src/interfaces/ecpg/test/expected/sql-execute.c index 0fcc0126ae54db11a6ab328e9d23f00f02f733ec..4d0ed38eb0466486f5c1ea7b7b4e8cba489ad0cc 100644 --- a/src/interfaces/ecpg/test/expected/sql-execute.c +++ b/src/interfaces/ecpg/test/expected/sql-execute.c @@ -1,11 +1,11 @@ /* Processed by ecpg (regression mode) */ -int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include <ecpgtype.h> #include <ecpglib.h> #include <ecpgerrno.h> #include <sqlca.h> /* End of automatic include section */ +#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y)) #line 1 "execute.pgc" #include <stdlib.h> diff --git a/src/interfaces/ecpg/test/expected/sql-fetch.c b/src/interfaces/ecpg/test/expected/sql-fetch.c index b39ac3ffe14966b4f02bb8a81c7411efb61ad37d..78fc79e8dac6318d543039bf5872e93fc4f6e862 100644 --- a/src/interfaces/ecpg/test/expected/sql-fetch.c +++ b/src/interfaces/ecpg/test/expected/sql-fetch.c @@ -1,11 +1,11 @@ /* Processed by ecpg (regression mode) */ -int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include <ecpgtype.h> #include <ecpglib.h> #include <ecpgerrno.h> #include <sqlca.h> /* End of automatic include section */ +#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y)) #line 1 "fetch.pgc" #include <stdio.h> diff --git a/src/interfaces/ecpg/test/expected/sql-func.c b/src/interfaces/ecpg/test/expected/sql-func.c index 881c2a64e5b0118bcf6f89bc52f3bfb89e783cb1..bfa7bbdd9449a64b6fad6216654931ba66b74452 100644 --- a/src/interfaces/ecpg/test/expected/sql-func.c +++ b/src/interfaces/ecpg/test/expected/sql-func.c @@ -1,11 +1,11 @@ /* Processed by ecpg (regression mode) */ -int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include <ecpgtype.h> #include <ecpglib.h> #include <ecpgerrno.h> #include <sqlca.h> /* End of automatic include section */ +#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y)) #line 1 "func.pgc" #include <stdio.h> diff --git a/src/interfaces/ecpg/test/expected/sql-indicators.c b/src/interfaces/ecpg/test/expected/sql-indicators.c index ca3fc391e9244b87f1bca16f3d3c0edb5018641b..99be1bfc39626b16f011983a39eedd12089008f8 100644 --- a/src/interfaces/ecpg/test/expected/sql-indicators.c +++ b/src/interfaces/ecpg/test/expected/sql-indicators.c @@ -1,11 +1,11 @@ /* Processed by ecpg (regression mode) */ -int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include <ecpgtype.h> #include <ecpglib.h> #include <ecpgerrno.h> #include <sqlca.h> /* End of automatic include section */ +#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y)) #line 1 "indicators.pgc" #include <stdio.h> diff --git a/src/interfaces/ecpg/test/expected/sql-quote.c b/src/interfaces/ecpg/test/expected/sql-quote.c index 5fbf964b573eea60c1408c5433b7de2a0e6f11b9..170c27c3dca4b127c87143ef14baf6d3941ab4fd 100644 --- a/src/interfaces/ecpg/test/expected/sql-quote.c +++ b/src/interfaces/ecpg/test/expected/sql-quote.c @@ -1,11 +1,11 @@ /* Processed by ecpg (regression mode) */ -int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include <ecpgtype.h> #include <ecpglib.h> #include <ecpgerrno.h> #include <sqlca.h> /* End of automatic include section */ +#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y)) #line 1 "quote.pgc" #include <stdio.h> diff --git a/src/interfaces/ecpg/test/expected/sql-show.c b/src/interfaces/ecpg/test/expected/sql-show.c index 79ff09f1766e36144d4d4ab7b3a916418322e24c..d64b6d2953500ab1adb11d66f0f582a70300063b 100644 --- a/src/interfaces/ecpg/test/expected/sql-show.c +++ b/src/interfaces/ecpg/test/expected/sql-show.c @@ -1,11 +1,11 @@ /* Processed by ecpg (regression mode) */ -int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include <ecpgtype.h> #include <ecpglib.h> #include <ecpgerrno.h> #include <sqlca.h> /* End of automatic include section */ +#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y)) #line 1 "show.pgc" #include <stdio.h> diff --git a/src/interfaces/ecpg/test/expected/sql-update.c b/src/interfaces/ecpg/test/expected/sql-update.c index 69052ef8eafd94eafd303ed125c442f74cfe50bf..ca35ed8437574b21484e5bb22ef3fc1869bba37d 100644 --- a/src/interfaces/ecpg/test/expected/sql-update.c +++ b/src/interfaces/ecpg/test/expected/sql-update.c @@ -1,11 +1,11 @@ /* Processed by ecpg (regression mode) */ -int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include <ecpgtype.h> #include <ecpglib.h> #include <ecpgerrno.h> #include <sqlca.h> /* End of automatic include section */ +#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y)) #line 1 "update.pgc" #include <stdio.h> diff --git a/src/interfaces/ecpg/test/expected/thread-thread.c b/src/interfaces/ecpg/test/expected/thread-thread.c index 890276c2f87e0d39f328759496c53e5a6b4a93e3..41100f7cc349018e98bd0ed54c734539dce1791e 100644 --- a/src/interfaces/ecpg/test/expected/thread-thread.c +++ b/src/interfaces/ecpg/test/expected/thread-thread.c @@ -1,11 +1,11 @@ /* Processed by ecpg (regression mode) */ -int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include <ecpgtype.h> #include <ecpglib.h> #include <ecpgerrno.h> #include <sqlca.h> /* End of automatic include section */ +#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y)) #line 1 "thread.pgc" /* diff --git a/src/interfaces/ecpg/test/expected/thread-thread_implicit.c b/src/interfaces/ecpg/test/expected/thread-thread_implicit.c index 21cf8e3c2b95c56611fbc0d9468e569e96f1d2f1..9a8bbcc434bd6fa3fd82d87a537eceae41471b4f 100644 --- a/src/interfaces/ecpg/test/expected/thread-thread_implicit.c +++ b/src/interfaces/ecpg/test/expected/thread-thread_implicit.c @@ -1,11 +1,11 @@ /* Processed by ecpg (regression mode) */ -int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include <ecpgtype.h> #include <ecpglib.h> #include <ecpgerrno.h> #include <sqlca.h> /* End of automatic include section */ +#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y)) #line 1 "thread_implicit.pgc" /* diff --git a/src/interfaces/ecpg/test/pg_regress.sh b/src/interfaces/ecpg/test/pg_regress.sh index 108f4140881975d12069042c0696a0c61df6ba45..1396257bbaf2dd7d1f639424313ffea53364a800 100644 --- a/src/interfaces/ecpg/test/pg_regress.sh +++ b/src/interfaces/ecpg/test/pg_regress.sh @@ -1,5 +1,5 @@ #! /bin/sh -# $PostgreSQL: pgsql/src/interfaces/ecpg/test/pg_regress.sh,v 1.16 2007/01/11 15:47:33 meskes Exp $ +# $PostgreSQL: pgsql/src/interfaces/ecpg/test/pg_regress.sh,v 1.17 2007/01/12 10:00:13 meskes Exp $ me=`basename $0` @@ -740,6 +740,11 @@ for i in \ *-*-mingw32*) PLATFORM_TAG="-MinGW32" ;; + *-*-openbsd3.8) + # OpenBSD 3.8 is buggy: + # http://archives.postgresql.org/pgsql-hackers/2006-09/msg00593.php + PLATFORM_TAG="-OpenBSD3.8.broken" + ;; esac outfile_stderr="$outputdir/$outprg.stderr" @@ -749,24 +754,6 @@ for i in \ # echo "$runprg > $outfile_stdout 2> $outfile_stderr" $runprg > "$outfile_stdout" 2> "$outfile_stderr" - # If we don't run on the default port we'll get different output - # so tweak output files and replace the port number (we put a warning - # but the price to pay is that we have to tweak the files every time - # now not only if the port differs from the standard port). - #if [ "$i" = "connect/test1.pgc" ]; then - # can we use sed -i on all platforms? - # for f in "$outfile_stderr" "$outfile_stdout" "$outfile_source"; do - # mv $f $f.tmp - # echo >> $f - # echo "THE PORT NUMBER MIGHT HAVE BEEN CHANGED BY THE REGRESSION SCRIPT" >> $f - # echo >> $f - # MinGW could return such a line: - # "could not connect to server: Connection refused (0x0000274D/10061)" - #cat $f.tmp | sed -e s,$PGPORT,55432,g | sed -e "s,could not connect to server: Connection refused (0x.*/.*),could not connect to server: Connection refused,g" >> $f - # rm $f.tmp - # done - #fi - mv "$outfile_source" "$outfile_source.tmp" cat "$outfile_source.tmp" | sed -e 's,^\(#line [0-9]*\) ".*/\([^/]*\)",\1 "\2",' > "$outfile_source" rm "$outfile_source.tmp"