mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-23 22:16:16 +01:00
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:
parent
7e0cb48dee
commit
4f73487300
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user