Skip to content

Commit 6ddbc11

Browse files
committed
Make ECPG regression tests run with -c only for array_of_struct.pgc
on MSVC. Fix strange nonstandard version of __stdcall specifyer in thread tests on win32.
1 parent ebade3f commit 6ddbc11

File tree

7 files changed

+10
-7
lines changed

7 files changed

+10
-7
lines changed

src/interfaces/ecpg/test/expected/thread-alloc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ struct sqlca_t *ECPGget_sqlca(void);
121121

122122

123123
#ifdef WIN32
124-
static unsigned STDCALL fn(void* arg)
124+
static unsigned __stdcall fn(void* arg)
125125
#else
126126
static void* fn(void* arg)
127127
#endif

src/interfaces/ecpg/test/expected/thread-descriptor.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ struct sqlca_t *ECPGget_sqlca(void);
101101

102102

103103
#if defined(ENABLE_THREAD_SAFETY) && defined(WIN32)
104-
static unsigned STDCALL fn(void* arg)
104+
static unsigned __stdcall fn(void* arg)
105105
#else
106106
static void* fn(void* arg)
107107
#endif

src/interfaces/ecpg/test/expected/thread-prep.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ struct sqlca_t *ECPGget_sqlca(void);
121121

122122

123123
#ifdef WIN32
124-
static unsigned STDCALL fn(void* arg)
124+
static unsigned __stdcall fn(void* arg)
125125
#else
126126
static void* fn(void* arg)
127127
#endif

src/interfaces/ecpg/test/thread/alloc.pgc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ exec sql whenever sqlerror sqlprint;
2828
exec sql whenever not found sqlprint;
2929

3030
#ifdef WIN32
31-
static unsigned STDCALL fn(void* arg)
31+
static unsigned __stdcall fn(void* arg)
3232
#else
3333
static void* fn(void* arg)
3434
#endif

src/interfaces/ecpg/test/thread/descriptor.pgc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ EXEC SQL whenever sqlerror sqlprint;
1717
EXEC SQL whenever not found sqlprint;
1818

1919
#if defined(ENABLE_THREAD_SAFETY) && defined(WIN32)
20-
static unsigned STDCALL fn(void* arg)
20+
static unsigned __stdcall fn(void* arg)
2121
#else
2222
static void* fn(void* arg)
2323
#endif

src/interfaces/ecpg/test/thread/prep.pgc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ exec sql whenever sqlerror sqlprint;
2828
exec sql whenever not found sqlprint;
2929

3030
#ifdef WIN32
31-
static unsigned STDCALL fn(void* arg)
31+
static unsigned __stdcall fn(void* arg)
3232
#else
3333
static void* fn(void* arg)
3434
#endif

src/tools/msvc/ecpg_regression.proj

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,12 @@
3333
<CreateProperty Value="-C INFORMIX -r no_indicator" Condition="'%(Pgc.FileName)'=='rnull'">
3434
<Output TaskParameter="Value" PropertyName="ECPGPARAM" />
3535
</CreateProperty>
36+
<CreateProperty Value="-c" Condition="'%(Pgc.FileName)'=='array_of_struct'">
37+
<Output TaskParameter="Value" PropertyName="ECPGPARAM" />
38+
</CreateProperty>
3639

3740
<!-- Run ECPG and the Visual C++ compiler on the files. Don't bother with dependency check between the steps -->
38-
<Exec WorkingDirectory="%(Pgc.RelativeDir)" Command="$(OUTDIR)ecpg\ecpg -c -I ../../include --regression $(ECPGPARAM) -o %(Pgc.Filename).c %(Pgc.Filename).pgc" />
41+
<Exec WorkingDirectory="%(Pgc.RelativeDir)" Command="$(OUTDIR)ecpg\ecpg -I ../../include --regression $(ECPGPARAM) -o %(Pgc.Filename).c %(Pgc.Filename).pgc" />
3942
<Exec WorkingDirectorY="%(Pgc.RelativeDir)" Command="cl /nologo %(Pgc.FileName).c /TC /MD$(DEBUGLIB) /DENABLE_THREAD_SAFETY /DWIN32 /DWIN32_ONLY_COMPILER /I. /I..\..\include /I..\..\..\libpq /I..\..\..\..\include /link /defaultlib:$(OUTDIR)libecpg\libecpg.lib /defaultlib:$(OUTDIR)libecpg_compat\libecpg_compat.lib /defaultlib:$(OUTDIR)libpgtypes\libpgtypes.lib" />
4043
</Target>
4144

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy