mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-26 07:26:15 +01:00
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
This commit is contained in:
parent
5309d10f8f
commit
6fdcc7ddb2
@ -1,6 +1,7 @@
|
||||
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>
|
||||
|
||||
|
@ -19,12 +19,7 @@ gregex_c =
|
||||
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
|
||||
|
||||
@ -145,7 +140,7 @@ libglib_2_0_la_SOURCES = \
|
||||
gstdio.c \
|
||||
gstrfuncs.c \
|
||||
gstring.c \
|
||||
$(gtestutils_c) \
|
||||
gtestutils.c \
|
||||
gthread.c \
|
||||
gthreadprivate.h \
|
||||
gthreadpool.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
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user