Commit 4f734873 authored by LRN's avatar LRN

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
parent 7e0cb48d
......@@ -32,6 +32,7 @@
#endif
#ifdef G_OS_WIN32
#include <io.h>
#ifndef STDOUT_FILENO
#define STDOUT_FILENO 1
#endif
......
......@@ -7,6 +7,8 @@
#include <unistd.h>
#include <gio/gunixinputstream.h>
#include <gio/gunixoutputstream.h>
#else
#include <io.h>
#endif
static GOptionEntry options[] = {
......
......@@ -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,
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment