[gjs/meson.msvc: 7/8] gjs/[console|profiler].cpp: Check for XP_WIN
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs/meson.msvc: 7/8] gjs/[console|profiler].cpp: Check for XP_WIN
- Date: Fri, 25 Oct 2019 07:39:47 +0000 (UTC)
commit 93850d04d10c1b5d3a965b41131394b6918abdb5
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Fri Oct 25 15:29:17 2019 +0800
gjs/[console|profiler].cpp: Check for XP_WIN
We don't have sys/signal.h on Windows, nor unistd.h for MSVC builds, so
check for XP_WIN as well so that we include the right headers.
gjs/console.cpp | 2 ++
gjs/profiler.cpp | 4 +++-
2 files changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/gjs/console.cpp b/gjs/console.cpp
index b094f07e..d3441c50 100644
--- a/gjs/console.cpp
+++ b/gjs/console.cpp
@@ -29,6 +29,8 @@
#ifdef HAVE_UNISTD_H
# include <unistd.h> // for close
+#elif defined (XP_WIN)
+# include <io.h>
#endif
#include <gio/gio.h>
diff --git a/gjs/profiler.cpp b/gjs/profiler.cpp
index cce5792c..40c92358 100644
--- a/gjs/profiler.cpp
+++ b/gjs/profiler.cpp
@@ -23,7 +23,9 @@
#include <config.h> // for ENABLE_PROFILER, HAVE_SYS_SYSCALL_H, HAVE_UNISTD_H
-#include <sys/signal.h> // for siginfo_t, sigevent, ...
+#ifndef XP_WIN
+# include <sys/signal.h> // for siginfo_t, sigevent, ...
+#endif
#include <glib-object.h>
#include <glib.h>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]