2007-11-25 Tor Lillqvist <tml@novell.com>
- * glib/Makefile.am: Build gtestutils etc on OS_UNIX only.
+ * glib/gtestutils.c: Add conditionals for non-Unix. Just g_error()
+ unless G_OS_UNIX for now.
2007-11-25 Matthias Clasen <mclasen@redhat.com>
gregex_h =
endif
-if OS_UNIX
-gtestutils_c = gtestutils.c
-tests_subdir = tests
-endif
-
-SUBDIRS = libcharset $(PRINTF_SUBDIR) $(MAYBE_PCRE) update-pcre . $(tests_subdir)
+SUBDIRS = libcharset $(PRINTF_SUBDIR) $(MAYBE_PCRE) update-pcre . tests
DIST_SUBDIRS = libcharset gnulib pcre update-pcre
gstdio.c \
gstrfuncs.c \
gstring.c \
- $(gtestutils_c) \
+ gtestutils.c \
gthread.c \
gthreadprivate.h \
gthreadpool.c \
#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
return strcmp (str1, str2);
}
+#ifdef G_OS_UNIX
static int /* 0 on success */
kill_child (int pid,
int *status,
while (wr < 0 && errno == EINTR);
return wr;
}
+#endif
static inline int
g_string_must_read (GString *gstring,
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 };
test_trap_last_stderr = g_string_free (serr, FALSE);
return FALSE;
}
+#else
+ g_error ("Not implemented: g_test_trap_fork");
+#endif
}
/**