summaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg/test/thread/thread.pgc
diff options
context:
space:
mode:
Diffstat (limited to 'src/interfaces/ecpg/test/thread/thread.pgc')
-rw-r--r--src/interfaces/ecpg/test/thread/thread.pgc10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/interfaces/ecpg/test/thread/thread.pgc b/src/interfaces/ecpg/test/thread/thread.pgc
index 05a23115d62..e3680b3b311 100644
--- a/src/interfaces/ecpg/test/thread/thread.pgc
+++ b/src/interfaces/ecpg/test/thread/thread.pgc
@@ -99,15 +99,17 @@ void *test_thread(void *arg)
{
long threadnum = (long)arg;
-#ifdef WIN32
- _configthreadlocale(_ENABLE_PER_THREAD_LOCALE);
-#endif
-
EXEC SQL BEGIN DECLARE SECTION;
int l_i;
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 WIN32_ONLY_COMPILER
snprintf(l_connection, sizeof(l_connection), "thread_%03ld", threadnum);