Browse Source

Fix ctest.h to build using clang on windows

tags/v0.3.18
Niyas Sait 4 years ago
parent
commit
c6c2a71fb7
1 changed files with 7 additions and 2 deletions
  1. +7
    -2
      utest/ctest.h

+ 7
- 2
utest/ctest.h View File

@@ -65,9 +65,14 @@ struct ctest {
#undef CTEST_SEGFAULT #undef CTEST_SEGFAULT
#endif #endif


#if defined(_WIN32) && defined(_MSC_VER)
#if defined(_WIN32)
#if defined(__clang__)
#define __CTEST_NO_TIME
#undef CTEST_SEGFAULT
#elif defined(_MSC_VER)
#define __CTEST_MSVC #define __CTEST_MSVC
#endif #endif
#endif


//config for MSVC compiler //config for MSVC compiler
#ifdef __CTEST_MSVC #ifdef __CTEST_MSVC
@@ -286,7 +291,7 @@ void assert_dbl_far(double exp, double real, double tol, const char* caller, int
#endif #endif
#include <stdint.h> #include <stdint.h>


#ifdef __CTEST_MSVC
#ifdef _WIN32
#include <io.h> #include <io.h>
#else #else
#include <unistd.h> #include <unistd.h>


Loading…
Cancel
Save