[gmime/gmime-2-4] Fixed build for MingW
- From: Jeffrey Stedfast <fejj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gmime/gmime-2-4] Fixed build for MingW
- Date: Tue, 13 Apr 2010 13:08:51 +0000 (UTC)
commit fce848f1189c2b883adfbc0689f6804794a88dc5
Author: Jeffrey Stedfast <fejj gnome org>
Date: Tue Apr 13 09:08:01 2010 -0400
Fixed build for MingW
2010-04-13 Jeffrey Stedfast <fejj novell com>
* Applied patch by pier11 operamail com to fix the build for
MingW. Fixes bug #615068.
ChangeLog | 5 +++++
gmime/gmime-utils.c | 2 +-
src/uudecode.c | 2 +-
tests/test-parser.c | 2 +-
tests/test-streams.c | 8 +++++++-
5 files changed, 15 insertions(+), 4 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index f58467f..9049d4b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-04-13 Jeffrey Stedfast <fejj novell com>
+
+ * Applied patch by pier11 operamail com to fix the build for
+ MingW. Fixes bug #615068.
+
2010-03-26 Jeffrey Stedfast <fejj novell com>
Fixes for bug #613653
diff --git a/gmime/gmime-utils.c b/gmime/gmime-utils.c
index 507462b..6f02178 100644
--- a/gmime/gmime-utils.c
+++ b/gmime/gmime-utils.c
@@ -476,7 +476,7 @@ mktime_utc (struct tm *tm)
tm->tm_isdst = -1;
tt = mktime (tm);
-#if defined (G_OS_WIN32)
+#if defined (G_OS_WIN32) && !defined (__MINGW32__)
_get_timezone (&tz);
if (tm->tm_isdst > 0) {
int dst;
diff --git a/src/uudecode.c b/src/uudecode.c
index 64a07f4..ab22ab0 100644
--- a/src/uudecode.c
+++ b/src/uudecode.c
@@ -34,7 +34,7 @@
#endif
#include <fcntl.h>
#include <errno.h>
-#ifdef G_OS_WIN32
+#if defined (G_OS_WIN32) && !defined (__MINGW32__)
#include <io.h>
typedef int mode_t;
#endif
diff --git a/tests/test-parser.c b/tests/test-parser.c
index f2562ff..be7c349 100644
--- a/tests/test-parser.c
+++ b/tests/test-parser.c
@@ -32,7 +32,7 @@
#include <gmime/gmime.h>
-#ifndef G_OS_WIN32
+#if !defined (G_OS_WIN32) || defined (__MINGW32__)
#define ENABLE_ZENTIMER
#include "zentimer.h"
#endif
diff --git a/tests/test-streams.c b/tests/test-streams.c
index dcf6d4d..91e7185 100644
--- a/tests/test-streams.c
+++ b/tests/test-streams.c
@@ -29,7 +29,9 @@
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
+#ifdef HAVE_SYS_MMAN_H
#include <sys/mman.h>
+#endif
#include <unistd.h>
#include <dirent.h>
#include <fcntl.h>
@@ -305,6 +307,7 @@ check_stream_file (const char *input, const char *output, const char *filename,
return TRUE;
}
+#ifdef HAVE_SYS_MMAN_H
static gboolean
check_stream_mmap (const char *input, const char *output, const char *filename, gint64 start, gint64 end)
{
@@ -337,6 +340,7 @@ check_stream_mmap (const char *input, const char *output, const char *filename,
return TRUE;
}
+#endif
static gboolean
check_stream_buffer_block (const char *input, const char *output, const char *filename, gint64 start, gint64 end)
@@ -417,7 +421,9 @@ static struct {
} checks[] = {
{ "GMimeStreamFs", check_stream_fs },
{ "GMimeStreamFile", check_stream_file },
+#ifdef HAVE_SYS_MMAN_H
{ "GMimeStreamMmap", check_stream_mmap },
+#endif
{ "GMimeStreamBuffer (block mode)", check_stream_buffer_block },
{ "GMimeStreamBuffer (cache mode)", check_stream_buffer_cache },
};
@@ -541,7 +547,7 @@ gen_test_data (const char *datadir, char **stream_name)
*name++ = G_DIR_SEPARATOR;
strcpy (name, "streamXXXXXX");
- if ((fd = mkstemp (input)) == -1)
+ if ((fd = g_mkstemp (input)) == -1)
return -1;
*stream_name = g_strdup (name);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]