[gtk+] tests: Include system headers appropriately
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] tests: Include system headers appropriately
- Date: Fri, 21 Jul 2017 15:36:30 +0000 (UTC)
commit 171ff43340a9a0a8a896d067fe83b72bc82b887e
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Fri Jul 21 16:00:44 2017 +0800
tests: Include system headers appropriately
Don't include unistd.h on Windows, and include the appropriate headers on
Windows as necessary.
https://bugzilla.gnome.org/show_bug.cgi?id=773299
tests/testanimation.c | 5 ++++-
testsuite/a11y/accessibility-dump.c | 4 ++++
testsuite/css/nodes/test-css-nodes.c | 4 ++++
testsuite/css/parser/test-css-parser.c | 4 ++++
testsuite/css/style/test-css-style.c | 4 ++++
testsuite/reftests/gtk-reftest.c | 4 ++++
6 files changed, 24 insertions(+), 1 deletions(-)
---
diff --git a/tests/testanimation.c b/tests/testanimation.c
index 45f4602..8190be9 100644
--- a/tests/testanimation.c
+++ b/tests/testanimation.c
@@ -19,11 +19,14 @@
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
-#include <unistd.h>
#include <string.h>
#include <errno.h>
#include <gtk/gtk.h>
+#ifndef G_OS_WIN32
+# include <unistd.h>
+#endif
+
typedef struct _LoadContext LoadContext;
struct _LoadContext
diff --git a/testsuite/a11y/accessibility-dump.c b/testsuite/a11y/accessibility-dump.c
index eb90477..5f848fb 100644
--- a/testsuite/a11y/accessibility-dump.c
+++ b/testsuite/a11y/accessibility-dump.c
@@ -25,6 +25,10 @@
#include <glib/gstdio.h>
#include <gtk/gtk.h>
+#ifdef G_OS_WIN32
+# include <io.h>
+#endif
+
#define DEPTH_INCREMENT 2
static char *
diff --git a/testsuite/css/nodes/test-css-nodes.c b/testsuite/css/nodes/test-css-nodes.c
index bb0b02c..334b60a 100644
--- a/testsuite/css/nodes/test-css-nodes.c
+++ b/testsuite/css/nodes/test-css-nodes.c
@@ -22,6 +22,10 @@
#include <glib/gstdio.h>
#include <gtk/gtk.h>
+#ifdef G_OS_WIN32
+# include <io.h>
+#endif
+
static char *
test_get_reference_file (const char *ui_file)
diff --git a/testsuite/css/parser/test-css-parser.c b/testsuite/css/parser/test-css-parser.c
index ff63409..f79c580 100644
--- a/testsuite/css/parser/test-css-parser.c
+++ b/testsuite/css/parser/test-css-parser.c
@@ -26,6 +26,10 @@
#include <glib/gstdio.h>
#include <gtk/gtk.h>
+#ifdef G_OS_WIN32
+# include <io.h>
+#endif
+
static char *
test_get_reference_file (const char *css_file)
{
diff --git a/testsuite/css/style/test-css-style.c b/testsuite/css/style/test-css-style.c
index 130132a..4555db1 100644
--- a/testsuite/css/style/test-css-style.c
+++ b/testsuite/css/style/test-css-style.c
@@ -22,6 +22,10 @@
#include <glib/gstdio.h>
#include <gtk/gtk.h>
+#ifdef G_OS_WIN32
+# include <io.h>
+#endif
+
/* There shall be no other styles */
#define GTK_STYLE_PROVIDER_PRIORITY_FORCE G_MAXUINT
diff --git a/testsuite/reftests/gtk-reftest.c b/testsuite/reftests/gtk-reftest.c
index d8d82d6..758007a 100644
--- a/testsuite/reftests/gtk-reftest.c
+++ b/testsuite/reftests/gtk-reftest.c
@@ -28,6 +28,10 @@
#include <glib/gstdio.h>
#include <gtk/gtk.h>
+#ifdef G_OS_WIN32
+# include <direct.h>
+#endif
+
typedef enum {
SNAPSHOT_WINDOW,
SNAPSHOT_DRAW
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]