aboutsummaryrefslogtreecommitdiff
path: root/libsylph/utils.c
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2009-09-17 08:31:22 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2009-09-17 08:31:22 +0000
commitcd87d5c742ab84c90e4338d46a23f17f9dbf9d2b (patch)
tree3172298fc3002ea24714876527910c013b585f64 /libsylph/utils.c
parent6bd6601fd7c6a36d1b95550632d86ca13ea33381 (diff)
disable threading if USE_THREADS is not set.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@2257 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'libsylph/utils.c')
-rw-r--r--libsylph/utils.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/libsylph/utils.c b/libsylph/utils.c
index 0139302e..2898ef76 100644
--- a/libsylph/utils.c
+++ b/libsylph/utils.c
@@ -3862,10 +3862,11 @@ gint execute_command_line(const gchar *cmdline, gboolean async)
return ret;
}
+#if USE_THREADS
typedef struct _CmdData
{
const gchar *cmdline;
- gint flag;
+ volatile gint flag;
gint status;
} CmdData;
@@ -3888,7 +3889,7 @@ static gpointer execute_command_line_async_func(gpointer data)
gint execute_command_line_async_wait(const gchar *cmdline)
{
- volatile CmdData data = {NULL, 0, 0};
+ CmdData data = {NULL, 0, 0};
GThread *thread;
if (debug_mode) {
@@ -3917,6 +3918,12 @@ gint execute_command_line_async_wait(const gchar *cmdline)
return data.status;
}
+#else /* USE_THREADS */
+gint execute_command_line_async_wait(const gchar *cmdline)
+{
+ return execute_command_line(cmdline, FALSE);
+}
+#endif /* USE_THREADS */
gint execute_open_file(const gchar *file, const gchar *content_type)
{