diff options
author | Tor Lillqvist <tml@novell.com> | 2007-11-25 22:47:39 +0000 |
---|---|---|
committer | Tor Lillqvist <tml@src.gnome.org> | 2007-11-25 22:47:39 +0000 |
commit | 6fdcc7ddb2be5a978482fe8e919064fc85745d0a (patch) | |
tree | 38f38ab1eaa3ca61bd4851b0b9a64464bd991b79 /glib/gtestutils.c | |
parent | 5309d10f8f68f5c66937ec96615c1197fd7f263c (diff) | |
download | glib-6fdcc7ddb2be5a978482fe8e919064fc85745d0a.tar.gz |
Add conditionals for non-Unix. Just g_error() unless G_OS_UNIX for now.
2007-11-25 Tor Lillqvist <tml@novell.com>
* glib/gtestutils.c: Add conditionals for non-Unix. Just g_error()
unless G_OS_UNIX for now.
svn path=/trunk/; revision=5936
Diffstat (limited to 'glib/gtestutils.c')
-rw-r--r-- | glib/gtestutils.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/glib/gtestutils.c b/glib/gtestutils.c index 4543017fb..8a55d454e 100644 --- a/glib/gtestutils.c +++ b/glib/gtestutils.c @@ -21,11 +21,15 @@ #include "gtestutils.h" #include "galias.h" #include <sys/types.h> +#ifdef G_OS_UNIX #include <sys/wait.h> #include <fcntl.h> +#endif #include <string.h> #include <stdlib.h> +#ifdef HAVE_UNISTD_H #include <unistd.h> +#endif #include <errno.h> #include <signal.h> #ifdef HAVE_SYS_SELECT_H @@ -1130,6 +1134,7 @@ g_strcmp0 (const char *str1, return strcmp (str1, str2); } +#ifdef G_OS_UNIX static int /* 0 on success */ kill_child (int pid, int *status, @@ -1175,6 +1180,7 @@ kill_child (int pid, while (wr < 0 && errno == EINTR); return wr; } +#endif static inline int g_string_must_read (GString *gstring, @@ -1297,6 +1303,7 @@ gboolean g_test_trap_fork (guint64 usec_timeout, GTestTrapFlags test_trap_flags) { +#ifdef G_OS_UNIX int stdout_pipe[2] = { -1, -1 }; int stderr_pipe[2] = { -1, -1 }; int stdtst_pipe[2] = { -1, -1 }; @@ -1424,6 +1431,9 @@ g_test_trap_fork (guint64 usec_timeout, test_trap_last_stderr = g_string_free (serr, FALSE); return FALSE; } +#else + g_error ("Not implemented: g_test_trap_fork"); +#endif } /** |