[gjs/meson.msvc: 6/11] 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: 6/11] gjs/[console|profiler].cpp: Check for XP_WIN
- Date: Mon, 28 Oct 2019 06:56:05 +0000 (UTC)
commit d308092c1d75612953e24b75ad4cbb5d8bc390ac
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]