From 6974d3fcf986b2e2246827fa1fc68f687dd9976d Mon Sep 17 00:00:00 2001 From: Mark Meredith Date: Sun, 24 Dec 2017 12:38:52 -0500 Subject: [PATCH 1/7] Use gmtime_s on MinGW --- include/crow/http_server.h | 2 +- include/crow/logging.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/crow/http_server.h b/include/crow/http_server.h index 6aa070e46..548ea7a30 100644 --- a/include/crow/http_server.h +++ b/include/crow/http_server.h @@ -82,7 +82,7 @@ namespace crow auto last_time_t = time(0); tm my_tm; -#ifdef _MSC_VER +#if defined(_MSC_VER) or defined(__MINGW32__) gmtime_s(&my_tm, &last_time_t); #else gmtime_r(&last_time_t, &my_tm); diff --git a/include/crow/logging.h b/include/crow/logging.h index 9c8bfbbd3..db8f72f93 100644 --- a/include/crow/logging.h +++ b/include/crow/logging.h @@ -51,7 +51,7 @@ namespace crow tm my_tm; -#ifdef _MSC_VER +#if defined(_MSC_VER) or defined(__MINGW32__) gmtime_s(&my_tm, &t); #else gmtime_r(&t, &my_tm); From 704d7fe5979b9e55363376ba69a9620071442ca7 Mon Sep 17 00:00:00 2001 From: Mark Meredith Date: Sun, 24 Dec 2017 17:23:21 -0500 Subject: [PATCH 2/7] Add MinGW test --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index d7a50c45f..5aa4173bb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,6 +15,7 @@ env: - COMPILER=g++-4.9 CCOMPILER=gcc-4.9 - COMPILER=g++-5 CCOMPILER=gcc-5 - COMPILER=clang++-3.6 CCOMPILER=clang-3.6 + - COMPILER=x86_64-w64-mingw32-g++-posix CCOMPILER=x86_64-w64-mingw32-gcc-posix addons: apt: @@ -30,6 +31,7 @@ addons: - clang-3.6 - libboost1.55-all-dev - python-pip + - mingw-w64 install: - if [ "$PUSH_COVERAGE" == "ON" ]; then pip install --user git+git://github.com/eddyxu/cpp-coveralls.git; fi From d30c99f997650ab3e009c376d3a205c43c286370 Mon Sep 17 00:00:00 2001 From: Mark Meredith Date: Sun, 24 Dec 2017 18:01:11 -0500 Subject: [PATCH 3/7] Fix compiler command --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 5aa4173bb..059ea3dc8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,7 +15,7 @@ env: - COMPILER=g++-4.9 CCOMPILER=gcc-4.9 - COMPILER=g++-5 CCOMPILER=gcc-5 - COMPILER=clang++-3.6 CCOMPILER=clang-3.6 - - COMPILER=x86_64-w64-mingw32-g++-posix CCOMPILER=x86_64-w64-mingw32-gcc-posix + - COMPILER=x86_64-w64-mingw32-g++ CCOMPILER=x86_64-w64-mingw32-gcc addons: apt: From d29c47a85bb00c9c1a680baf9cac05a9fb08d8a2 Mon Sep 17 00:00:00 2001 From: Mark Meredith Date: Sun, 24 Dec 2017 21:43:32 -0500 Subject: [PATCH 4/7] Test MinGW Travis build --- .travis.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 059ea3dc8..f1a318dae 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,10 +11,10 @@ compiler: env: matrix: - - COMPILER=g++-4.8 CCOMPILER=gcc-4.8 PUSH_COVERAGE=ON - - COMPILER=g++-4.9 CCOMPILER=gcc-4.9 - - COMPILER=g++-5 CCOMPILER=gcc-5 - - COMPILER=clang++-3.6 CCOMPILER=clang-3.6 + #- COMPILER=g++-4.8 CCOMPILER=gcc-4.8 PUSH_COVERAGE=ON + #- COMPILER=g++-4.9 CCOMPILER=gcc-4.9 + # - COMPILER=g++-5 CCOMPILER=gcc-5 + #- COMPILER=clang++-3.6 CCOMPILER=clang-3.6 - COMPILER=x86_64-w64-mingw32-g++ CCOMPILER=x86_64-w64-mingw32-gcc addons: @@ -41,7 +41,7 @@ before_script: - mkdir build - cd build - cmake --version - - cmake .. + - cmake .. -DCMAKE_SYSTEM_NAME=Windows script: make -j2 && ctest -j2 From 1d95d16aa669f015223440a119750164da41324f Mon Sep 17 00:00:00 2001 From: Mark Meredith Date: Tue, 26 Dec 2017 07:28:13 -0500 Subject: [PATCH 5/7] Revert "Test MinGW Travis build" This reverts commit d29c47a85bb00c9c1a680baf9cac05a9fb08d8a2. --- .travis.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index f1a318dae..059ea3dc8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,10 +11,10 @@ compiler: env: matrix: - #- COMPILER=g++-4.8 CCOMPILER=gcc-4.8 PUSH_COVERAGE=ON - #- COMPILER=g++-4.9 CCOMPILER=gcc-4.9 - # - COMPILER=g++-5 CCOMPILER=gcc-5 - #- COMPILER=clang++-3.6 CCOMPILER=clang-3.6 + - COMPILER=g++-4.8 CCOMPILER=gcc-4.8 PUSH_COVERAGE=ON + - COMPILER=g++-4.9 CCOMPILER=gcc-4.9 + - COMPILER=g++-5 CCOMPILER=gcc-5 + - COMPILER=clang++-3.6 CCOMPILER=clang-3.6 - COMPILER=x86_64-w64-mingw32-g++ CCOMPILER=x86_64-w64-mingw32-gcc addons: @@ -41,7 +41,7 @@ before_script: - mkdir build - cd build - cmake --version - - cmake .. -DCMAKE_SYSTEM_NAME=Windows + - cmake .. script: make -j2 && ctest -j2 From c62634c589323e0bacd3a22a7af3bd4c37479d43 Mon Sep 17 00:00:00 2001 From: Mark Meredith Date: Tue, 26 Dec 2017 07:28:15 -0500 Subject: [PATCH 6/7] Revert "Fix compiler command" This reverts commit d30c99f997650ab3e009c376d3a205c43c286370. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 059ea3dc8..5aa4173bb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,7 +15,7 @@ env: - COMPILER=g++-4.9 CCOMPILER=gcc-4.9 - COMPILER=g++-5 CCOMPILER=gcc-5 - COMPILER=clang++-3.6 CCOMPILER=clang-3.6 - - COMPILER=x86_64-w64-mingw32-g++ CCOMPILER=x86_64-w64-mingw32-gcc + - COMPILER=x86_64-w64-mingw32-g++-posix CCOMPILER=x86_64-w64-mingw32-gcc-posix addons: apt: From f4d187a1a64232e91cf23f262c01930df0e0353a Mon Sep 17 00:00:00 2001 From: Mark Meredith Date: Tue, 26 Dec 2017 07:28:15 -0500 Subject: [PATCH 7/7] Revert "Add MinGW test" This reverts commit 704d7fe5979b9e55363376ba69a9620071442ca7. --- .travis.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5aa4173bb..d7a50c45f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,7 +15,6 @@ env: - COMPILER=g++-4.9 CCOMPILER=gcc-4.9 - COMPILER=g++-5 CCOMPILER=gcc-5 - COMPILER=clang++-3.6 CCOMPILER=clang-3.6 - - COMPILER=x86_64-w64-mingw32-g++-posix CCOMPILER=x86_64-w64-mingw32-gcc-posix addons: apt: @@ -31,7 +30,6 @@ addons: - clang-3.6 - libboost1.55-all-dev - python-pip - - mingw-w64 install: - if [ "$PUSH_COVERAGE" == "ON" ]; then pip install --user git+git://github.com/eddyxu/cpp-coveralls.git; fi