Progmasoft Git

catch3

Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.

Clonegit clone https://git.progmasoft.com/catch3

Moved definition of _BSD_SOURCE earlier

Commit
673ec550f5688b920a264e69efb1915031cb5796
Author
Phil Nash ·
Parents
ff78e7c45af8

Files · Download .tar.gz

Changes

 include/internal/catch_compiler_capabilities.h | 4 ++++
 include/internal/catch_timer.hpp               | 7 +------
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/include/internal/catch_compiler_capabilities.h b/include/internal/catch_compiler_capabilities.h
index 16417b52..735d3d4b 100644
--- a/include/internal/catch_compiler_capabilities.h
+++ b/include/internal/catch_compiler_capabilities.h
@@ -81,6 +81,10 @@
 #       define CATCH_INTERNAL_CONFIG_NO_POSIX_SIGNALS
 #   endif
 
+// Required for some versions of Cygwin to declare gettimeofday
+// see: http://stackoverflow.com/questions/36901803/gettimeofday-not-declared-in-this-scope-cygwin
+#   define _BSD_SOURCE
+
 #endif // __CYGWIN__
 
 ////////////////////////////////////////////////////////////////////////////////
diff --git a/include/internal/catch_timer.hpp b/include/internal/catch_timer.hpp
index 881d890e..dfb7811f 100644
--- a/include/internal/catch_timer.hpp
+++ b/include/internal/catch_timer.hpp
@@ -20,13 +20,8 @@
 
 #else
 
-// Required for some versions of Cygwin to declare gettimeofday
-// see: http://stackoverflow.com/questions/36901803/gettimeofday-not-declared-in-this-scope-cygwin
-#   ifdef __CYGWIN__
-#       define _BSD_SOURCE
-#   endif
-
 #include <sys/time.h>
+
 #endif
 
 namespace Catch {