summaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg/test/thread/thread_implicit.pgc
diff options
context:
space:
mode:
authorMagnus Hagander <magnus@hagander.net>2007-06-12 11:07:34 +0000
committerMagnus Hagander <magnus@hagander.net>2007-06-12 11:07:34 +0000
commit09922597c5f460ab02882716c371b2a5c47e742e (patch)
tree50c02e13bf202463570cf107fbcda70b42812bcc /src/interfaces/ecpg/test/thread/thread_implicit.pgc
parente514740e699d306b744849e43bcd2ef9728d464b (diff)
Rewrite ECPG regression test driver in C, by splitting the standard
regression driver into two parts and reusing half of it. Required to run ECPG tests without a shell on MSVC builds. Fix ECPG thread tests for MSVC build (incl output files). Joachim Wieland and Magnus Hagander
Diffstat (limited to 'src/interfaces/ecpg/test/thread/thread_implicit.pgc')
-rw-r--r--src/interfaces/ecpg/test/thread/thread_implicit.pgc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/interfaces/ecpg/test/thread/thread_implicit.pgc b/src/interfaces/ecpg/test/thread/thread_implicit.pgc
index 010a8e52051..299f8e61186 100644
--- a/src/interfaces/ecpg/test/thread/thread_implicit.pgc
+++ b/src/interfaces/ecpg/test/thread/thread_implicit.pgc
@@ -104,7 +104,11 @@ void *test_thread(void *arg)
EXEC SQL END DECLARE SECTION;
/* build up connection name, and connect to database */
+#ifndef WIN32_ONLY_COMPILER
snprintf(l_connection, sizeof(l_connection), "thread_%03ld", threadnum);
+#else
+ _snprintf(l_connection, sizeof(l_connection), "thread_%03ld", threadnum);
+#endif
EXEC SQL WHENEVER sqlerror sqlprint;
EXEC SQL CONNECT TO REGRESSDB1 AS :l_connection;
if( sqlca.sqlcode != 0 )