[gmime] Fixes for undefined errno values on Windows



commit 974839dc9249ca4c4a38e13861baf76c31776378
Author: Jeffrey Stedfast <fejj gnome org>
Date:   Wed Sep 30 19:06:27 2009 -0400

    Fixes for undefined errno values on Windows
    
    2009-09-30  Jeffrey Stedfast  <fejj novell com>
    
    	* gmime/gmime-stream-gio.c (set_errno): Fixes to build on Windows.

 ChangeLog                |    2 ++
 gmime/gmime-stream-gio.c |    8 +++++++-
 2 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 0e28a70..c799895 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2009-09-30  Jeffrey Stedfast  <fejj novell com>
 
+	* gmime/gmime-stream-gio.c (set_errno): Fixes to build on Windows.
+
 	* tests/test-streams.c: Use GDir instead of POSIX's dirent API and
 	also conditionally disable mmap tests.
 
diff --git a/gmime/gmime-stream-gio.c b/gmime/gmime-stream-gio.c
index 3d38225..5da17c3 100644
--- a/gmime/gmime-stream-gio.c
+++ b/gmime/gmime-stream-gio.c
@@ -155,14 +155,20 @@ set_errno (GError *err)
 	case G_IO_ERROR_NOT_DIRECTORY: errno = ENOTDIR; break;
 	case G_IO_ERROR_NOT_EMPTY: errno = ENOTEMPTY; break;
 	case G_IO_ERROR_FILENAME_TOO_LONG: errno = ENAMETOOLONG; break;
-	case G_IO_ERROR_TOO_MANY_LINKS: errno = ELOOP; break;
+	case G_IO_ERROR_TOO_MANY_LINKS: errno = EMLINK; break;
 	case G_IO_ERROR_NO_SPACE: errno = ENOSPC; break; // or ENOMEM
 	case G_IO_ERROR_INVALID_ARGUMENT: errno = EINVAL; break;
 	case G_IO_ERROR_PERMISSION_DENIED: errno = EACCES; break; // or EPERM
+#ifdef ENOTSUP
 	case G_IO_ERROR_NOT_SUPPORTED: errno = ENOTSUP; break;
+#endif
+#ifdef ECANCELED
 	case G_IO_ERROR_CANCELLED: errno = ECANCELED; break;
+#endif
 	case G_IO_ERROR_READ_ONLY: errno = EROFS; break;
+#ifdef ETIMEDOUT
 	case G_IO_ERROR_TIMED_OUT: errno = ETIMEDOUT; break;
+#endif
 	case G_IO_ERROR_BUSY: errno = EBUSY; break;
 	case G_IO_ERROR_WOULD_BLOCK: errno = EAGAIN; break;
 	case G_IO_ERROR_FAILED:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]