[glib] Fix tests to compile again - add missing headers to W32, call correct process-id-getting function
- From: Руслан Ижбулатов <ruslanizhb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Fix tests to compile again - add missing headers to W32, call correct process-id-getting function
- Date: Sat, 2 Aug 2014 12:41:44 +0000 (UTC)
commit 4f734873006729d18551c215d9dcf22392dbeaf3
Author: Руслан Ижбулатов <lrn1986 gmail com>
Date: Mon Apr 21 15:44:47 2014 +0000
Fix tests to compile again - add missing headers to W32, call correct process-id-getting function
https://bugzilla.gnome.org/show_bug.cgi?id=725513
gio/tests/filter-cat.c | 1 +
gio/tests/gsubprocess-testprog.c | 2 ++
gio/tests/win32-streams.c | 6 +++---
glib/tests/fileutils.c | 2 +-
4 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/gio/tests/filter-cat.c b/gio/tests/filter-cat.c
index 6697405..320aebd 100644
--- a/gio/tests/filter-cat.c
+++ b/gio/tests/filter-cat.c
@@ -32,6 +32,7 @@
#endif
#ifdef G_OS_WIN32
+#include <io.h>
#ifndef STDOUT_FILENO
#define STDOUT_FILENO 1
#endif
diff --git a/gio/tests/gsubprocess-testprog.c b/gio/tests/gsubprocess-testprog.c
index 2f00b55..7457246 100644
--- a/gio/tests/gsubprocess-testprog.c
+++ b/gio/tests/gsubprocess-testprog.c
@@ -7,6 +7,8 @@
#include <unistd.h>
#include <gio/gunixinputstream.h>
#include <gio/gunixoutputstream.h>
+#else
+#include <io.h>
#endif
static GOptionEntry options[] = {
diff --git a/gio/tests/win32-streams.c b/gio/tests/win32-streams.c
index b9d95f9..6451a9f 100644
--- a/gio/tests/win32-streams.c
+++ b/gio/tests/win32-streams.c
@@ -339,7 +339,7 @@ test_pipe_io_overlap (void)
gchar name[256];
g_snprintf (name, sizeof (name),
- "\\\\.\\pipe\\gtest-io-overlap-%u", (guint) getpid ());
+ "\\\\.\\pipe\\gtest-io-overlap-%u", (guint) GetCurrentProcessId ());
server = CreateNamedPipe (name,
PIPE_ACCESS_DUPLEX | FILE_FLAG_OVERLAPPED,
@@ -418,7 +418,7 @@ test_pipe_io_concurrent (void)
gchar name[256], c;
g_snprintf (name, sizeof (name),
- "\\\\.\\pipe\\gtest-io-concurrent-%u", (guint) getpid ());
+ "\\\\.\\pipe\\gtest-io-concurrent-%u", (guint) GetCurrentProcessId ());
server = CreateNamedPipe (name,
PIPE_ACCESS_DUPLEX | FILE_FLAG_OVERLAPPED,
@@ -490,7 +490,7 @@ test_pipe_io_cancel (void)
gchar name[256];
g_snprintf (name, sizeof (name),
- "\\\\.\\pipe\\gtest-io-cancel-%u", (guint) getpid ());
+ "\\\\.\\pipe\\gtest-io-cancel-%u", (guint) GetCurrentProcessId ());
in_handle = CreateNamedPipe (name,
PIPE_ACCESS_INBOUND | FILE_FLAG_OVERLAPPED,
diff --git a/glib/tests/fileutils.c b/glib/tests/fileutils.c
index eada604..1f66392 100644
--- a/glib/tests/fileutils.c
+++ b/glib/tests/fileutils.c
@@ -36,9 +36,9 @@
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
+#endif
#include <fcntl.h>
#include <utime.h>
-#endif
#ifdef G_OS_WIN32
#include <windows.h>
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]