ci: msys2
diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml
index 4625e5c..2114fe7 100644
--- a/.github/workflows/android.yml
+++ b/.github/workflows/android.yml
@@ -4,6 +4,7 @@
jobs:
build-android:
+ if: false
name: NDK-C++${{matrix.std}}-${{matrix.abi}}-${{matrix.build_type}}
runs-on: ubuntu-22.04
permissions:
diff --git a/.github/workflows/cifuzz.yml b/.github/workflows/cifuzz.yml
index edb0949..f40d0c3 100644
--- a/.github/workflows/cifuzz.yml
+++ b/.github/workflows/cifuzz.yml
@@ -2,6 +2,7 @@
on: [pull_request]
jobs:
Fuzzing:
+ if: false
runs-on: ubuntu-latest
steps:
- name: Build Fuzzers
diff --git a/.github/workflows/emscripten.yml b/.github/workflows/emscripten.yml
index 90125f0..064a92a 100644
--- a/.github/workflows/emscripten.yml
+++ b/.github/workflows/emscripten.yml
@@ -4,6 +4,7 @@
jobs:
build-linux:
+ if: false
defaults:
run:
shell: bash
diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml
index ac2b490..3a8544e 100644
--- a/.github/workflows/linux.yml
+++ b/.github/workflows/linux.yml
@@ -4,6 +4,7 @@
jobs:
build-linux:
+ if: false
defaults:
run:
shell: bash
diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml
index 7fc2966..833b59b 100644
--- a/.github/workflows/macos.yml
+++ b/.github/workflows/macos.yml
@@ -4,6 +4,7 @@
jobs:
build-macos:
+ if: false
name: AppleClang-C++${{matrix.std}}-${{matrix.build_type}}
runs-on: macos-12
permissions:
diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml
index ab3ea94..2bb3841 100644
--- a/.github/workflows/windows.yml
+++ b/.github/workflows/windows.yml
@@ -4,6 +4,7 @@
jobs:
build-msvc:
+ if: false
name: ${{matrix.msvc}}-${{matrix.arch}}-C++${{matrix.std}}-${{matrix.build_type}}-${{matrix.lib}}
runs-on: ${{matrix.os}}
permissions:
@@ -157,11 +158,9 @@
build_type: [Debug]
lib: [shared, static]
std: [14, 17, 20, 23]
- sys: [mingw32, mingw64]
+ sys: [msys]
include:
- - sys: mingw32
- env: i686
- - sys: mingw64
+ - sys: msys
env: x86_64
steps:
@@ -173,6 +172,21 @@
languages: cpp
- uses: msys2/setup-msys2@v2
+ if: ${{matrix.sys == 'msys'}}
+ with:
+ msystem: ${{matrix.sys}}
+ install: >-
+ cmake
+ gcc
+ gtest
+ ninja
+ python-jinja
+ python-lxml
+ python-pip
+ python-pygments
+
+ - uses: msys2/setup-msys2@v2
+ if: ${{matrix.sys != 'msys'}}
with:
msystem: ${{matrix.sys}}
install: >-
diff --git a/src/cleanup_immediately_unittest.cc b/src/cleanup_immediately_unittest.cc
index 5d97006..ed6d972 100644
--- a/src/cleanup_immediately_unittest.cc
+++ b/src/cleanup_immediately_unittest.cc
@@ -27,6 +27,8 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#define _XOPEN_SOURCE 500
+
#include "base/commandlineflags.h"
#include "glog/logging.h"
#include "glog/raw_logging.h"
diff --git a/src/cleanup_with_absolute_prefix_unittest.cc b/src/cleanup_with_absolute_prefix_unittest.cc
index 8b9e243..0b81e94 100644
--- a/src/cleanup_with_absolute_prefix_unittest.cc
+++ b/src/cleanup_with_absolute_prefix_unittest.cc
@@ -27,6 +27,8 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#define _XOPEN_SOURCE 500
+
#include "base/commandlineflags.h"
#include "glog/logging.h"
#include "glog/raw_logging.h"
diff --git a/src/cleanup_with_relative_prefix_unittest.cc b/src/cleanup_with_relative_prefix_unittest.cc
index 3d9ef33..63b99fb 100644
--- a/src/cleanup_with_relative_prefix_unittest.cc
+++ b/src/cleanup_with_relative_prefix_unittest.cc
@@ -27,6 +27,8 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#define _XOPEN_SOURCE 500
+
#include "base/commandlineflags.h"
#include "glog/logging.h"
#include "glog/raw_logging.h"
diff --git a/src/demangle_unittest.cc b/src/demangle_unittest.cc
index a851664..a0f93b9 100644
--- a/src/demangle_unittest.cc
+++ b/src/demangle_unittest.cc
@@ -31,6 +31,8 @@
//
// Unit tests for functions in demangle.c.
+#define _XOPEN_SOURCE 500
+
#include "demangle.h"
#include <fstream>
diff --git a/src/logging.cc b/src/logging.cc
index 8fc5bd9..100f434 100644
--- a/src/logging.cc
+++ b/src/logging.cc
@@ -28,6 +28,7 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define _GNU_SOURCE 1 // needed for O_NOFOLLOW and pread()/pwrite()
+#define _POSIX_C_SOURCE 1
#include "glog/logging.h"
diff --git a/src/logging_unittest.cc b/src/logging_unittest.cc
index 74d6f41..d54fd5f 100644
--- a/src/logging_unittest.cc
+++ b/src/logging_unittest.cc
@@ -29,24 +29,15 @@
//
// Author: Ray Sidney
-#include <fcntl.h>
+#define _POSIX_C_SOURCE 200112L
+#define _XOPEN_SOURCE 500
-#include "config.h"
-#include "utilities.h"
-#ifdef HAVE_GLOB_H
-# include <glob.h>
-#endif
-#include <sys/stat.h>
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-#ifdef HAVE_SYS_WAIT_H
-# include <sys/wait.h>
-#endif
+#include <fcntl.h>
#include <chrono>
#include <cstdio>
#include <cstdlib>
+#include <cstring>
#include <fstream>
#include <iomanip>
#include <iostream>
@@ -58,16 +49,29 @@
#include <thread>
#include <vector>
-#include "base/commandlineflags.h"
-#include "glog/logging.h"
-#include "glog/raw_logging.h"
-#include "googletest.h"
+#include "config.h"
+#ifdef HAVE_GLOB_H
+# include <glob.h>
+#endif
+#include <sys/stat.h>
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+#ifdef HAVE_SYS_WAIT_H
+# include <sys/wait.h>
+#endif
#ifdef GLOG_USE_GFLAGS
# include <gflags/gflags.h>
using namespace GFLAGS_NAMESPACE;
#endif
+#include "base/commandlineflags.h"
+#include "glog/logging.h"
+#include "glog/raw_logging.h"
+#include "googletest.h"
+#include "utilities.h"
+
#ifdef HAVE_LIB_GMOCK
# include <gmock/gmock.h>
diff --git a/src/mock-log_unittest.cc b/src/mock-log_unittest.cc
index 97b83c9..aa0a20e 100644
--- a/src/mock-log_unittest.cc
+++ b/src/mock-log_unittest.cc
@@ -31,6 +31,8 @@
// Tests the ScopedMockLog class.
+#define _XOPEN_SOURCE 500
+
#include "mock-log.h"
#include <gmock/gmock.h>
diff --git a/src/signalhandler.cc b/src/signalhandler.cc
index 992fffb..5f27be1 100644
--- a/src/signalhandler.cc
+++ b/src/signalhandler.cc
@@ -31,6 +31,8 @@
//
// Implementation of InstallFailureSignalHandler().
+#define _POSIX_C_SOURCE 199309L
+
#include <algorithm>
#include <csignal>
#include <ctime>
diff --git a/src/stl_logging_unittest.cc b/src/stl_logging_unittest.cc
index 5a8ae2a..984c3bb 100644
--- a/src/stl_logging_unittest.cc
+++ b/src/stl_logging_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2003, Google Inc.
+// Copyright (c) 2024, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
@@ -27,6 +27,8 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#define _XOPEN_SOURCE 500
+
#include "glog/stl_logging.h"
#include <functional>
diff --git a/src/utilities.cc b/src/utilities.cc
index 4b1f5e0..f1eabf0 100644
--- a/src/utilities.cc
+++ b/src/utilities.cc
@@ -29,6 +29,8 @@
//
// Author: Shinichiro Hamaji
+#define _POSIX_C_SOURCE 1
+
#include "utilities.h"
#include <atomic>
diff --git a/src/utilities_unittest.cc b/src/utilities_unittest.cc
index 1818479..f304ada 100644
--- a/src/utilities_unittest.cc
+++ b/src/utilities_unittest.cc
@@ -28,6 +28,9 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Author: Shinichiro Hamaji
+
+#define _XOPEN_SOURCE 500
+
#include "utilities.h"
#include "glog/logging.h"