diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-21 05:05:26 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-21 05:05:26 +0000 |
commit | e75d99818dd3940be997520e64db8c9e3b207e39 (patch) | |
tree | 0003ca0de74fcc8d18433e34ea68d2e7aaf06b7c /src/interfaces/ecpg/test/expected/sql-define.c | |
parent | Releasing progress-linux version 15.6-0+deb12u1~progress6.99u1. (diff) | |
download | postgresql-15-e75d99818dd3940be997520e64db8c9e3b207e39.tar.xz postgresql-15-e75d99818dd3940be997520e64db8c9e3b207e39.zip |
Merging upstream version 15.7.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/interfaces/ecpg/test/expected/sql-define.c')
-rw-r--r-- | src/interfaces/ecpg/test/expected/sql-define.c | 65 |
1 files changed, 63 insertions, 2 deletions
diff --git a/src/interfaces/ecpg/test/expected/sql-define.c b/src/interfaces/ecpg/test/expected/sql-define.c index 29583ec..e97caec 100644 --- a/src/interfaces/ecpg/test/expected/sql-define.c +++ b/src/interfaces/ecpg/test/expected/sql-define.c @@ -6,6 +6,21 @@ /* End of automatic include section */ #define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y)) +#line 1 "define_prelim.pgc" +/* + * Test that the effects of these commands don't carry over to the next + * file named on the ecpg command line. + */ + + +/* Processed by ecpg (regression mode) */ +/* These include files are added by the preprocessor */ +#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" #line 1 "sqlca.h" @@ -195,11 +210,57 @@ if (sqlca.sqlcode < 0) sqlprint ( );} + /* test handling of a macro defined on the command line */ + { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select 123", ECPGt_EOIT, + ECPGt_int,&(i),(long)1,(long)1,sizeof(int), + ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT); +#line 57 "define.pgc" + +if (sqlca.sqlcode < 0) sqlprint ( );} +#line 57 "define.pgc" + + printf("original CMDLINESYM: %d\n", i); + + + + { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select 42", ECPGt_EOIT, + ECPGt_int,&(i),(long)1,(long)1,sizeof(int), + ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT); +#line 62 "define.pgc" + +if (sqlca.sqlcode < 0) sqlprint ( );} +#line 62 "define.pgc" + + printf("redefined CMDLINESYM: %d\n", i); + + + + { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select 43", ECPGt_EOIT, + ECPGt_int,&(i),(long)1,(long)1,sizeof(int), + ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT); +#line 67 "define.pgc" + +if (sqlca.sqlcode < 0) sqlprint ( );} +#line 67 "define.pgc" + + printf("redefined CMDLINESYM: %d\n", i); + + + + + + + + /* this macro should not have carried over from define_prelim.pgc */ + + + + { ECPGdisconnect(__LINE__, "CURRENT"); -#line 56 "define.pgc" +#line 81 "define.pgc" if (sqlca.sqlcode < 0) sqlprint ( );} -#line 56 "define.pgc" +#line 81 "define.pgc" return 0; } |