Skip to content

Commit

Permalink
- MSVC2022: added variant project files for compiling pthread-win32 i…
Browse files Browse the repository at this point in the history
…n different modes: SEH / C++ exceptions / C; also used to test the amalgamation sourcefiles (pthread.c, pthread-EH.cpp and pthread-JMP.c)

- fix/hack the error about duplicate definitions of the assertion code in (forced) C++ mode (for pthread-EH.cpp); this does NOT affect the other build modes; the default build mode remains as-is.
  • Loading branch information
GerHobbelt committed Jun 5, 2023
1 parent d8b36af commit 5122220
Show file tree
Hide file tree
Showing 9 changed files with 3,255 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/test.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,13 @@ static const char * error_string[] = {
(fprintf(stderr, "Assertion failed: (%s), file %s, line %d\n", \
#e, __FILE__, (int) __LINE__), exit(1), 0))

#if defined(PTW32_CLEANUP_CXX) && defined(__PTHREAD_JUMBO_BUILD__) && defined(MONOLITHIC_PTHREAD_TESTS)
// fix/hack the error about duplicate definitions of the assertion code in (forced) C++ mode (for pthread-EH.cpp); this does NOT affect the other build modes; the default build mode remains as-is.
extern int assertE;
#else
int assertE;
#endif

# define assert_e(e, o, r) \
(((assertE = e) o (r)) ? ((ASSERT_TRACE) ? fprintf(stderr, \
"Assertion succeeded: (%s), file %s, line %d\n", \
Expand Down
5 changes: 5 additions & 0 deletions tests/wrapper4tests_1.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ int main(int argc, char **argv)

#else

// fix/hack the error about duplicate definitions of the assertion code in (forced) C++ mode (for pthread-EH.cpp); this does NOT affect the other build modes; the default build mode remains as-is.
#if defined(PTW32_CLEANUP_CXX) && defined(__PTHREAD_JUMBO_BUILD__)
int assertE;
#endif

int test_affinity1(void);
int test_affinity2(void);
int test_affinity3(void);
Expand Down
489 changes: 489 additions & 0 deletions windows/VS2022/DebugJumbo.2022.vcxproj

Large diffs are not rendered by default.

Loading

0 comments on commit 5122220

Please sign in to comment.