G_END_DECLS
#endif
-#ifndef G_OS_WIN32
+#if !defined (G_OS_WIN32) && defined (HAVE_FORK) && defined (HAVE_EXECV)
static int
safe_read (int fd, gchar *buffer, gint count, GError **gerror)
{
if (out_closed && err_closed)
break;
-#ifdef _MSC_VER
-#pragma warning(push)
-#pragma warning(disable:4389)
-#endif
-
FD_ZERO (&rfds);
if (!out_closed && outfd >= 0)
FD_SET (outfd, &rfds);
if (!err_closed && errfd >= 0)
FD_SET (errfd, &rfds);
-#ifdef _MSC_VER
-#pragma warning(pop)
-#endif
-
res = select (MAX (outfd, errfd) + 1, &rfds, NULL, NULL, NULL);
if (res > 0) {
if (buffer == NULL)
}
return TRUE;
}
-#endif /* G_OS_WIN32 */
static int
write_all (int fd, const void *vbuf, size_t n)
return nwritten;
}
+#endif /* !defined (G_OS_WIN32) && defined (HAVE_FORK) && defined (HAVE_EXECV) */
#if !defined(G_OS_WIN32) && defined(HAVE_GETDTABLESIZE)
int
GError **gerror)
{
#ifdef G_OS_WIN32
+ return TRUE;
#elif !defined (HAVE_FORK) || !defined (HAVE_EXECV)
fprintf (stderr, "g_spawn_command_line_sync not supported on this platform\n");
return FALSE;
if (WIFEXITED (status) && exit_status) {
*exit_status = WEXITSTATUS (status);
}
-#endif
return TRUE;
+#endif
}
/*
GError **gerror)
{
#ifdef G_OS_WIN32
+ return TRUE;
#elif !defined (HAVE_FORK) || !defined (HAVE_EXECVE)
fprintf (stderr, "g_spawn_async_with_pipes is not supported on this platform\n");
return FALSE;
*standard_output = out_pipe [0];
if (standard_error)
*standard_error = err_pipe [0];
-#endif
return TRUE;
+#endif
}
-
-