diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mbox.c | 4 | ||||
-rw-r--r-- | src/mh.c | 4 | ||||
-rw-r--r-- | src/session.c | 2 |
3 files changed, 10 insertions, 0 deletions
@@ -257,6 +257,7 @@ gint proc_mbox(FolderItem *dest, const gchar *mbox, GHashTable *folder_table) gint lock_mbox(const gchar *base, LockType type) { +#ifdef G_OS_UNIX gint retval = 0; if (type == LOCK_FILE) { @@ -327,6 +328,9 @@ gint lock_mbox(const gchar *base, LockType type) } return retval; +#else + return -1; +#endif /* G_OS_UNIX */ } gint unlock_mbox(const gchar *base, gint fd, LockType type) @@ -405,14 +405,18 @@ static gint mh_add_msgs(Folder *folder, FolderItem *dest, GSList *file_list, if (first_ == 0 || first_ > dest->last_num + 1) first_ = dest->last_num + 1; +#ifdef G_OS_UNIX if (link(fileinfo->file, destfile) < 0) { +#endif if (copy_file(fileinfo->file, destfile, TRUE) < 0) { g_warning(_("can't copy message %s to %s\n"), fileinfo->file, destfile); g_free(destfile); return -1; } +#ifdef G_OS_UNIX } +#endif g_free(destfile); dest->last_num++; diff --git a/src/session.c b/src/session.c index 0aecb335..6e7fa4e9 100644 --- a/src/session.c +++ b/src/session.c @@ -275,11 +275,13 @@ static gint session_close(Session *session) { g_return_val_if_fail(session != NULL, -1); +#ifdef G_OS_UNIX if (session->conn_id > 0) { sock_connect_async_cancel(session->conn_id); session->conn_id = 0; debug_print("session (%p): connection cancelled\n", session); } +#endif session_set_timeout(session, 0); |