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
This commit is contained in:
Руслан Ижбулатов 2014-04-21 15:44:47 +00:00
parent 7e0cb48dee
commit 4f73487300
4 changed files with 7 additions and 4 deletions

View File

@ -32,6 +32,7 @@
#endif
#ifdef G_OS_WIN32
#include <io.h>
#ifndef STDOUT_FILENO
#define STDOUT_FILENO 1
#endif

View File

@ -7,6 +7,8 @@
#include <unistd.h>
#include <gio/gunixinputstream.h>
#include <gio/gunixoutputstream.h>
#else
#include <io.h>
#endif
static GOptionEntry options[] = {

View File

@ -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,

View File

@ -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