diff options
author | Руслан Ижбулатов <lrn1986@gmail.com> | 2014-04-21 15:44:47 +0000 |
---|---|---|
committer | Руслан Ижбулатов <lrn1986@gmail.com> | 2014-08-02 12:41:14 +0000 |
commit | 4f734873006729d18551c215d9dcf22392dbeaf3 (patch) | |
tree | ac4282c865539aedc0906393406617872ababdf7 | |
parent | 7e0cb48dee9a8ecd87d403b7941ad3209eee658c (diff) |
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
-rw-r--r-- | gio/tests/filter-cat.c | 1 | ||||
-rw-r--r-- | gio/tests/gsubprocess-testprog.c | 2 | ||||
-rw-r--r-- | gio/tests/win32-streams.c | 6 | ||||
-rw-r--r-- | 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 66974055f..320aebd91 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 2f00b5512..745724672 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 b9d95f9ae..6451a9faa 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 eada60469..1f6639262 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 |