From 3ec864159a1792df642a75611363c39fb1fd1cd3 Mon Sep 17 00:00:00 2001 From: hiro Date: Fri, 5 Aug 2005 07:22:10 +0000 Subject: enabled compilation with MinGW. git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@469 ee746299-78ed-0310-b773-934348b2243d --- src/mbox.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/mbox.c') 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. */ -- cgit v1.2.3