aboutsummaryrefslogtreecommitdiff
path: root/src/mbox.c
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-08-05 07:22:10 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-08-05 07:22:10 +0000
commit3ec864159a1792df642a75611363c39fb1fd1cd3 (patch)
tree2441b71b8b443445b7bb1c5d4ac464e70679577f /src/mbox.c
parent6247f6269afff27ecfe2ca9650e151f440ec806a (diff)
enabled compilation with MinGW.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@469 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src/mbox.c')
-rw-r--r--src/mbox.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mbox.c b/src/mbox.c
index 635a4888..05efa69f 100644
--- a/src/mbox.c
+++ b/src/mbox.c
@@ -380,17 +380,23 @@ gint copy_mbox(const gchar *src, const gchar *dest)
void empty_mbox(const gchar *mbox)
{
+#if HAVE_TRUNCATE
if (truncate(mbox, 0) < 0) {
+#endif
FILE *fp;
+#if HAVE_TRUNCATE
FILE_OP_ERROR(mbox, "truncate");
+#endif
if ((fp = fopen(mbox, "wb")) == NULL) {
FILE_OP_ERROR(mbox, "fopen");
g_warning(_("can't truncate mailbox to zero.\n"));
return;
}
fclose(fp);
+#if HAVE_TRUNCATE
}
+#endif
}
/* read all messages in SRC, and store them into one MBOX file. */