gio/tests/tls-certificates: fix
[platform/upstream/glib.git] / gio / tests / win32-streams.c
index b7ff0b3..6451a9f 100644 (file)
@@ -27,7 +27,6 @@
 #include <string.h>
 #include <fcntl.h>
 #include <io.h>
-#include <unistd.h>
 
 #include <windows.h>
 
@@ -340,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,
@@ -419,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,
@@ -491,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,