[gtk/master.msvc: 17/19] tests/testdnd2.c: Don't include unistd.h unconditionally
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/master.msvc: 17/19] tests/testdnd2.c: Don't include unistd.h unconditionally
- Date: Mon, 3 Feb 2020 09:36:57 +0000 (UTC)
commit f2915180a6a09c10f38aed15b4aefeaa86fe12fc
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Thu Jan 30 22:34:53 2020 +0800
tests/testdnd2.c: Don't include unistd.h unconditionally
Instead, on Windows when it is not available, include io.h for close()
tests/testdnd2.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/tests/testdnd2.c b/tests/testdnd2.c
index 11d604fee5..a9a2f6382f 100644
--- a/tests/testdnd2.c
+++ b/tests/testdnd2.c
@@ -1,6 +1,11 @@
-#include <unistd.h>
#include <gtk/gtk.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#elif defined (G_OS_WIN32)
+#include <io.h>
+#endif
+
static GdkTexture *
get_image_texture (GtkImage *image,
int *out_size)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]