diff --git a/src/interfaces/ecpg/test/expected/thread-alloc.c b/src/interfaces/ecpg/test/expected/thread-alloc.c index e7b69b387f..9678ebe6fd 100644 --- a/src/interfaces/ecpg/test/expected/thread-alloc.c +++ b/src/interfaces/ecpg/test/expected/thread-alloc.c @@ -145,48 +145,42 @@ static void* fn(void* arg) #line 43 "alloc.pgc" -#ifdef WIN32 -#ifdef _MSC_VER /* requires MSVC */ - _configthreadlocale(_ENABLE_PER_THREAD_LOCALE); -#endif -#endif - value = (long)arg; sprintf(name, "Connection: %d", value); { ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , name, 0); -#line 54 "alloc.pgc" +#line 48 "alloc.pgc" if (sqlca.sqlcode < 0) sqlprint();} -#line 54 "alloc.pgc" +#line 48 "alloc.pgc" { ECPGsetcommit(__LINE__, "on", NULL); -#line 55 "alloc.pgc" +#line 49 "alloc.pgc" if (sqlca.sqlcode < 0) sqlprint();} -#line 55 "alloc.pgc" +#line 49 "alloc.pgc" for (i = 1; i <= REPEATS; ++i) { { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select relname from pg_class where relname = 'pg_class'", ECPGt_EOIT, ECPGt_char,&(r),(long)0,(long)0,(1)*sizeof(char), ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT); -#line 58 "alloc.pgc" +#line 52 "alloc.pgc" if (sqlca.sqlcode == ECPG_NOT_FOUND) sqlprint(); -#line 58 "alloc.pgc" +#line 52 "alloc.pgc" if (sqlca.sqlcode < 0) sqlprint();} -#line 58 "alloc.pgc" +#line 52 "alloc.pgc" free(r); r = NULL; } { ECPGdisconnect(__LINE__, name); -#line 62 "alloc.pgc" +#line 56 "alloc.pgc" if (sqlca.sqlcode < 0) sqlprint();} -#line 62 "alloc.pgc" +#line 56 "alloc.pgc" return 0; diff --git a/src/interfaces/ecpg/test/expected/thread-descriptor.c b/src/interfaces/ecpg/test/expected/thread-descriptor.c index 03cebad603..f56cc25ab0 100644 --- a/src/interfaces/ecpg/test/expected/thread-descriptor.c +++ b/src/interfaces/ecpg/test/expected/thread-descriptor.c @@ -108,25 +108,19 @@ static void* fn(void* arg) { int i; -#ifdef WIN32 -#ifdef _MSC_VER /* requires MSVC */ - _configthreadlocale(_ENABLE_PER_THREAD_LOCALE); -#endif -#endif - for (i = 1; i <= REPEATS; ++i) { ECPGallocate_desc(__LINE__, "mydesc"); -#line 36 "descriptor.pgc" +#line 30 "descriptor.pgc" if (sqlca.sqlcode < 0) sqlprint(); -#line 36 "descriptor.pgc" +#line 30 "descriptor.pgc" ECPGdeallocate_desc(__LINE__, "mydesc"); -#line 37 "descriptor.pgc" +#line 31 "descriptor.pgc" if (sqlca.sqlcode < 0) sqlprint(); -#line 37 "descriptor.pgc" +#line 31 "descriptor.pgc" } diff --git a/src/interfaces/ecpg/test/expected/thread-prep.c b/src/interfaces/ecpg/test/expected/thread-prep.c index 94e02933cd..98861d36f0 100644 --- a/src/interfaces/ecpg/test/expected/thread-prep.c +++ b/src/interfaces/ecpg/test/expected/thread-prep.c @@ -145,58 +145,52 @@ static void* fn(void* arg) #line 43 "prep.pgc" -#ifdef WIN32 -#ifdef _MSC_VER /* requires MSVC */ - _configthreadlocale(_ENABLE_PER_THREAD_LOCALE); -#endif -#endif - value = (long)arg; sprintf(name, "Connection: %d", value); { ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , name, 0); -#line 54 "prep.pgc" +#line 48 "prep.pgc" if (sqlca.sqlcode < 0) sqlprint();} -#line 54 "prep.pgc" +#line 48 "prep.pgc" { ECPGsetcommit(__LINE__, "on", NULL); -#line 55 "prep.pgc" +#line 49 "prep.pgc" if (sqlca.sqlcode < 0) sqlprint();} -#line 55 "prep.pgc" +#line 49 "prep.pgc" for (i = 1; i <= REPEATS; ++i) { { ECPGprepare(__LINE__, NULL, 0, "i", query); -#line 58 "prep.pgc" +#line 52 "prep.pgc" if (sqlca.sqlcode < 0) sqlprint();} -#line 58 "prep.pgc" +#line 52 "prep.pgc" { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_execute, "i", ECPGt_int,&(value),(long)1,(long)1,sizeof(int), ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT); -#line 59 "prep.pgc" +#line 53 "prep.pgc" if (sqlca.sqlcode == ECPG_NOT_FOUND) sqlprint(); -#line 59 "prep.pgc" +#line 53 "prep.pgc" if (sqlca.sqlcode < 0) sqlprint();} -#line 59 "prep.pgc" +#line 53 "prep.pgc" } { ECPGdeallocate(__LINE__, 0, NULL, "i"); -#line 61 "prep.pgc" +#line 55 "prep.pgc" if (sqlca.sqlcode < 0) sqlprint();} -#line 61 "prep.pgc" +#line 55 "prep.pgc" { ECPGdisconnect(__LINE__, name); -#line 62 "prep.pgc" +#line 56 "prep.pgc" if (sqlca.sqlcode < 0) sqlprint();} -#line 62 "prep.pgc" +#line 56 "prep.pgc" return 0; @@ -212,34 +206,34 @@ int main () #endif { ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , NULL, 0); -#line 76 "prep.pgc" +#line 70 "prep.pgc" if (sqlca.sqlcode < 0) sqlprint();} -#line 76 "prep.pgc" +#line 70 "prep.pgc" { ECPGsetcommit(__LINE__, "on", NULL); -#line 77 "prep.pgc" +#line 71 "prep.pgc" if (sqlca.sqlcode < 0) sqlprint();} -#line 77 "prep.pgc" +#line 71 "prep.pgc" { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "drop table if exists T", ECPGt_EOIT, ECPGt_EORT); -#line 78 "prep.pgc" +#line 72 "prep.pgc" if (sqlca.sqlcode < 0) sqlprint();} -#line 78 "prep.pgc" +#line 72 "prep.pgc" { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "create table T ( i int )", ECPGt_EOIT, ECPGt_EORT); -#line 79 "prep.pgc" +#line 73 "prep.pgc" if (sqlca.sqlcode < 0) sqlprint();} -#line 79 "prep.pgc" +#line 73 "prep.pgc" { ECPGdisconnect(__LINE__, "CURRENT"); -#line 80 "prep.pgc" +#line 74 "prep.pgc" if (sqlca.sqlcode < 0) sqlprint();} -#line 80 "prep.pgc" +#line 74 "prep.pgc" #ifdef WIN32 diff --git a/src/interfaces/ecpg/test/expected/thread-thread.c b/src/interfaces/ecpg/test/expected/thread-thread.c index 420bbf194a..68f153e57c 100644 --- a/src/interfaces/ecpg/test/expected/thread-thread.c +++ b/src/interfaces/ecpg/test/expected/thread-thread.c @@ -153,12 +153,6 @@ void *test_thread(void *arg) #line 105 "thread.pgc" -#ifdef WIN32 -#ifdef _MSC_VER /* requires MSVC */ - _configthreadlocale(_ENABLE_PER_THREAD_LOCALE); -#endif -#endif - /* build up connection name, and connect to database */ #ifndef _MSC_VER snprintf(l_connection, sizeof(l_connection), "thread_%03ld", threadnum); @@ -166,13 +160,13 @@ void *test_thread(void *arg) _snprintf(l_connection, sizeof(l_connection), "thread_%03ld", threadnum); #endif /* exec sql whenever sqlerror sqlprint ; */ -#line 119 "thread.pgc" +#line 113 "thread.pgc" { ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , l_connection, 0); -#line 120 "thread.pgc" +#line 114 "thread.pgc" if (sqlca.sqlcode < 0) sqlprint();} -#line 120 "thread.pgc" +#line 114 "thread.pgc" if( sqlca.sqlcode != 0 ) { @@ -180,10 +174,10 @@ if (sqlca.sqlcode < 0) sqlprint();} return NULL; } { ECPGtrans(__LINE__, l_connection, "begin"); -#line 126 "thread.pgc" +#line 120 "thread.pgc" if (sqlca.sqlcode < 0) sqlprint();} -#line 126 "thread.pgc" +#line 120 "thread.pgc" /* insert into test_thread table */ @@ -194,10 +188,10 @@ if (sqlca.sqlcode < 0) sqlprint();} ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_int,&(l_i),(long)1,(long)1,sizeof(int), ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT); -#line 131 "thread.pgc" +#line 125 "thread.pgc" if (sqlca.sqlcode < 0) sqlprint();} -#line 131 "thread.pgc" +#line 125 "thread.pgc" if( sqlca.sqlcode != 0 ) printf("%s: ERROR: insert failed!\n", l_connection); @@ -205,16 +199,16 @@ if (sqlca.sqlcode < 0) sqlprint();} /* all done */ { ECPGtrans(__LINE__, l_connection, "commit"); -#line 137 "thread.pgc" +#line 131 "thread.pgc" if (sqlca.sqlcode < 0) sqlprint();} -#line 137 "thread.pgc" +#line 131 "thread.pgc" { ECPGdisconnect(__LINE__, l_connection); -#line 138 "thread.pgc" +#line 132 "thread.pgc" if (sqlca.sqlcode < 0) sqlprint();} -#line 138 "thread.pgc" +#line 132 "thread.pgc" return NULL; } diff --git a/src/interfaces/ecpg/test/expected/thread-thread_implicit.c b/src/interfaces/ecpg/test/expected/thread-thread_implicit.c index 4bddca9fb9..d035276548 100644 --- a/src/interfaces/ecpg/test/expected/thread-thread_implicit.c +++ b/src/interfaces/ecpg/test/expected/thread-thread_implicit.c @@ -154,12 +154,6 @@ void *test_thread(void *arg) #line 106 "thread_implicit.pgc" -#ifdef WIN32 -#ifdef _MSC_VER /* requires MSVC */ - _configthreadlocale(_ENABLE_PER_THREAD_LOCALE); -#endif -#endif - /* build up connection name, and connect to database */ #ifndef _MSC_VER snprintf(l_connection, sizeof(l_connection), "thread_%03ld", threadnum); @@ -167,13 +161,13 @@ void *test_thread(void *arg) _snprintf(l_connection, sizeof(l_connection), "thread_%03ld", threadnum); #endif /* exec sql whenever sqlerror sqlprint ; */ -#line 120 "thread_implicit.pgc" +#line 114 "thread_implicit.pgc" { ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , l_connection, 0); -#line 121 "thread_implicit.pgc" +#line 115 "thread_implicit.pgc" if (sqlca.sqlcode < 0) sqlprint();} -#line 121 "thread_implicit.pgc" +#line 115 "thread_implicit.pgc" if( sqlca.sqlcode != 0 ) { @@ -181,10 +175,10 @@ if (sqlca.sqlcode < 0) sqlprint();} return NULL; } { ECPGtrans(__LINE__, NULL, "begin"); -#line 127 "thread_implicit.pgc" +#line 121 "thread_implicit.pgc" if (sqlca.sqlcode < 0) sqlprint();} -#line 127 "thread_implicit.pgc" +#line 121 "thread_implicit.pgc" /* insert into test_thread table */ @@ -195,10 +189,10 @@ if (sqlca.sqlcode < 0) sqlprint();} ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_int,&(l_i),(long)1,(long)1,sizeof(int), ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT); -#line 132 "thread_implicit.pgc" +#line 126 "thread_implicit.pgc" if (sqlca.sqlcode < 0) sqlprint();} -#line 132 "thread_implicit.pgc" +#line 126 "thread_implicit.pgc" if( sqlca.sqlcode != 0 ) printf("%s: ERROR: insert failed!\n", l_connection); @@ -206,16 +200,16 @@ if (sqlca.sqlcode < 0) sqlprint();} /* all done */ { ECPGtrans(__LINE__, NULL, "commit"); -#line 138 "thread_implicit.pgc" +#line 132 "thread_implicit.pgc" if (sqlca.sqlcode < 0) sqlprint();} -#line 138 "thread_implicit.pgc" +#line 132 "thread_implicit.pgc" { ECPGdisconnect(__LINE__, l_connection); -#line 139 "thread_implicit.pgc" +#line 133 "thread_implicit.pgc" if (sqlca.sqlcode < 0) sqlprint();} -#line 139 "thread_implicit.pgc" +#line 133 "thread_implicit.pgc" return NULL; } diff --git a/src/interfaces/ecpg/test/thread/alloc.pgc b/src/interfaces/ecpg/test/thread/alloc.pgc index b13bcb860b..c44bc91d78 100644 --- a/src/interfaces/ecpg/test/thread/alloc.pgc +++ b/src/interfaces/ecpg/test/thread/alloc.pgc @@ -42,12 +42,6 @@ static void* fn(void* arg) char **r = NULL; EXEC SQL END DECLARE SECTION; -#ifdef WIN32 -#ifdef _MSC_VER /* requires MSVC */ - _configthreadlocale(_ENABLE_PER_THREAD_LOCALE); -#endif -#endif - value = (long)arg; sprintf(name, "Connection: %d", value); diff --git a/src/interfaces/ecpg/test/thread/descriptor.pgc b/src/interfaces/ecpg/test/thread/descriptor.pgc index 3f28c6d329..76a7a5dff5 100644 --- a/src/interfaces/ecpg/test/thread/descriptor.pgc +++ b/src/interfaces/ecpg/test/thread/descriptor.pgc @@ -25,12 +25,6 @@ static void* fn(void* arg) { int i; -#ifdef WIN32 -#ifdef _MSC_VER /* requires MSVC */ - _configthreadlocale(_ENABLE_PER_THREAD_LOCALE); -#endif -#endif - for (i = 1; i <= REPEATS; ++i) { EXEC SQL ALLOCATE DESCRIPTOR mydesc; diff --git a/src/interfaces/ecpg/test/thread/prep.pgc b/src/interfaces/ecpg/test/thread/prep.pgc index 3a2467c9ab..bdf27e7d5a 100644 --- a/src/interfaces/ecpg/test/thread/prep.pgc +++ b/src/interfaces/ecpg/test/thread/prep.pgc @@ -42,12 +42,6 @@ static void* fn(void* arg) char query[256] = "INSERT INTO T VALUES ( ? )"; EXEC SQL END DECLARE SECTION; -#ifdef WIN32 -#ifdef _MSC_VER /* requires MSVC */ - _configthreadlocale(_ENABLE_PER_THREAD_LOCALE); -#endif -#endif - value = (long)arg; sprintf(name, "Connection: %d", value); diff --git a/src/interfaces/ecpg/test/thread/thread.pgc b/src/interfaces/ecpg/test/thread/thread.pgc index ae6b229962..0e3217ce63 100644 --- a/src/interfaces/ecpg/test/thread/thread.pgc +++ b/src/interfaces/ecpg/test/thread/thread.pgc @@ -104,12 +104,6 @@ void *test_thread(void *arg) char l_connection[128]; EXEC SQL END DECLARE SECTION; -#ifdef WIN32 -#ifdef _MSC_VER /* requires MSVC */ - _configthreadlocale(_ENABLE_PER_THREAD_LOCALE); -#endif -#endif - /* build up connection name, and connect to database */ #ifndef _MSC_VER snprintf(l_connection, sizeof(l_connection), "thread_%03ld", threadnum); diff --git a/src/interfaces/ecpg/test/thread/thread_implicit.pgc b/src/interfaces/ecpg/test/thread/thread_implicit.pgc index 0dfcb7172b..bbc4d7783c 100644 --- a/src/interfaces/ecpg/test/thread/thread_implicit.pgc +++ b/src/interfaces/ecpg/test/thread/thread_implicit.pgc @@ -105,12 +105,6 @@ void *test_thread(void *arg) char l_connection[128]; EXEC SQL END DECLARE SECTION; -#ifdef WIN32 -#ifdef _MSC_VER /* requires MSVC */ - _configthreadlocale(_ENABLE_PER_THREAD_LOCALE); -#endif -#endif - /* build up connection name, and connect to database */ #ifndef _MSC_VER snprintf(l_connection, sizeof(l_connection), "thread_%03ld", threadnum);