diff -urN glib.old/tests/spawn-test-win32-gui.c glib/tests/spawn-test-win32-gui.c
--- glib.old/tests/spawn-test-win32-gui.c	2004-03-10 22:59:14.000000000 +0000
+++ glib/tests/spawn-test-win32-gui.c	2004-03-29 11:48:21.968848000 +0100
@@ -1,9 +1,18 @@
 #include <windows.h>
+#include <errno.h>
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
 #include <fcntl.h>
 
+#ifdef __CYGWIN__
+/* For read() and write() */
+#include <unistd.h>
+/* Cygwin does not prototype __argc and __argv in stdlib.h */
+extern int __argc;
+extern char** __argv;
+#endif
+
 int _stdcall
 WinMain (struct HINSTANCE__ *hInstance,
 	struct HINSTANCE__ *hPrevInstance,
