diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2009-09-17 08:31:22 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2009-09-17 08:31:22 +0000 |
commit | cd87d5c742ab84c90e4338d46a23f17f9dbf9d2b (patch) | |
tree | 3172298fc3002ea24714876527910c013b585f64 /libsylph | |
parent | 6bd6601fd7c6a36d1b95550632d86ca13ea33381 (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')
-rw-r--r-- | libsylph/socket.c | 2 | ||||
-rw-r--r-- | libsylph/utils.c | 11 |
2 files changed, 10 insertions, 3 deletions
diff --git a/libsylph/socket.c b/libsylph/socket.c index 431d95f1..5e6df275 100644 --- a/libsylph/socket.c +++ b/libsylph/socket.c @@ -1325,7 +1325,7 @@ static gint sock_get_address_info_async_cancel(SockLookupData *lookup_data) } #else /* G_OS_UNIX */ -gpointer sock_connect_async_func(gpointer data) +static gpointer sock_connect_async_func(gpointer data) { SockConnectData *conn_data = (SockConnectData *)data; 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) { |