From 04fbe0e4516d26de9420637f6fc90041e574b4b0 Mon Sep 17 00:00:00 2001 From: Michael Meskes Date: Sat, 26 Aug 2017 19:07:25 +0200 Subject: Changed order of statements and added an additiona MSVC safeguard to make ecpg thread test cases work on Windows. --- src/interfaces/ecpg/test/thread/prep.pgc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/interfaces/ecpg/test/thread/prep.pgc') diff --git a/src/interfaces/ecpg/test/thread/prep.pgc b/src/interfaces/ecpg/test/thread/prep.pgc index 1ec96767af9..3a2467c9abb 100644 --- a/src/interfaces/ecpg/test/thread/prep.pgc +++ b/src/interfaces/ecpg/test/thread/prep.pgc @@ -36,16 +36,18 @@ static void* fn(void* arg) { int i; -#ifdef WIN32 - _configthreadlocale(_ENABLE_PER_THREAD_LOCALE); -#endif - EXEC SQL BEGIN DECLARE SECTION; int value; char name[100]; 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); -- cgit v1.2.3