mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-10 11:14:05 +02:00
win32: fix build g_spawn_check_exit_status() with mingw
With mingw, only gspawn-win32.c is compiled, but it is missing some new symbols. https://bugzilla.gnome.org/show_bug.cgi?id=679691
This commit is contained in:
committed by
Colin Walters
parent
ce1b50bf2a
commit
d9af4259f7
@@ -211,6 +211,12 @@ g_spawn_error_quark (void)
|
|||||||
return g_quark_from_static_string ("g-exec-error-quark");
|
return g_quark_from_static_string ("g-exec-error-quark");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GQuark
|
||||||
|
g_spawn_exit_error_quark (void)
|
||||||
|
{
|
||||||
|
return g_quark_from_static_string ("g-spawn-exit-error-quark");
|
||||||
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
g_spawn_async_utf8 (const gchar *working_directory,
|
g_spawn_async_utf8 (const gchar *working_directory,
|
||||||
gchar **argv,
|
gchar **argv,
|
||||||
@@ -1221,6 +1227,25 @@ g_spawn_close_pid (GPid pid)
|
|||||||
CloseHandle (pid);
|
CloseHandle (pid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
g_spawn_check_exit_status (gint exit_status,
|
||||||
|
GError **error)
|
||||||
|
{
|
||||||
|
gboolean ret = FALSE;
|
||||||
|
|
||||||
|
if (exit_status != 0)
|
||||||
|
{
|
||||||
|
g_set_error (error, G_SPAWN_EXIT_ERROR, exit_status,
|
||||||
|
_("Child process exited with code %ld"),
|
||||||
|
(long) exit_status);
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
|
ret = TRUE;
|
||||||
|
out:
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
#if !defined (_WIN64)
|
#if !defined (_WIN64)
|
||||||
|
|
||||||
/* Binary compatibility versions that take system codepage pathnames,
|
/* Binary compatibility versions that take system codepage pathnames,
|
||||||
|
@@ -855,7 +855,6 @@ g_spawn_check_exit_status (gint exit_status,
|
|||||||
{
|
{
|
||||||
gboolean ret = FALSE;
|
gboolean ret = FALSE;
|
||||||
|
|
||||||
#ifdef G_OS_UNIX
|
|
||||||
if (WIFEXITED (exit_status))
|
if (WIFEXITED (exit_status))
|
||||||
{
|
{
|
||||||
if (WEXITSTATUS (exit_status) != 0)
|
if (WEXITSTATUS (exit_status) != 0)
|
||||||
@@ -886,15 +885,6 @@ g_spawn_check_exit_status (gint exit_status,
|
|||||||
_("Child process exited abnormally"));
|
_("Child process exited abnormally"));
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
if (exit_status != 0)
|
|
||||||
{
|
|
||||||
g_set_error (error, G_SPAWN_EXIT_ERROR, exit_status,
|
|
||||||
_("Child process exited with code %ld"),
|
|
||||||
(long) exit_status);
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
ret = TRUE;
|
ret = TRUE;
|
||||||
out:
|
out:
|
||||||
|
Reference in New Issue
Block a user