aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--e-util/ChangeLog7
-rw-r--r--e-util/e-util-private.h2
-rw-r--r--e-util/e-util.c31
3 files changed, 8 insertions, 32 deletions
diff --git a/e-util/ChangeLog b/e-util/ChangeLog
index 4065a68ca2..bd66cbe4bb 100644
--- a/e-util/ChangeLog
+++ b/e-util/ChangeLog
@@ -1,3 +1,10 @@
+2005-12-17 Tor Lillqvist <tml@novell.com>
+
+ * e-util-private.h (fsync)
+ * e-util.c: Don't bother with a Win32 implementation of fsync() as
+ the uses of fsync() in evo are pretty irrelevant. Just #define
+ fsync() away on Win32.
+
2005-12-12 Irene Huang <Irene.Huang@sun.com>
reviewed by: Veerapuram Varadhan <vvaradhan@novell.com>
diff --git a/e-util/e-util-private.h b/e-util/e-util-private.h
index f40b09f674..35cf0cf5c2 100644
--- a/e-util/e-util-private.h
+++ b/e-util/e-util-private.h
@@ -33,7 +33,7 @@
#ifdef G_OS_WIN32
-int fsync (int fd);
+#define fsync(fd) 0
const char *_e_get_category_icons (void) G_GNUC_CONST;
const char *_e_get_datadir (void) G_GNUC_CONST;
diff --git a/e-util/e-util.c b/e-util/e-util.c
index 5b7875293d..b2efe75f95 100644
--- a/e-util/e-util.c
+++ b/e-util/e-util.c
@@ -1276,34 +1276,3 @@ e_gettext (const char *msgid)
return dgettext (E_I18N_DOMAIN, msgid);
}
-
-#ifdef G_OS_WIN32
-
-int
-fsync (int fd)
-{
- int handle;
- struct stat st;
-
- handle = _get_osfhandle (fd);
- if (handle == -1)
- return -1;
-
- fstat (fd, &st);
-
- /* FlushFileBuffers() fails if called on a handle to the
- * console output. As we cannot know whether fd refers to the
- * console output or not, punt, and call FlushFileBuffers()
- * only for regular files and pipes.
- */
- if (!(S_ISREG (st.st_mode) || S_ISFIFO (st.st_mode)))
- return 0;
-
- if (FlushFileBuffers ((HANDLE) handle))
- return 0;
-
- errno = EIO;
- return -1;
-}
-
-#endif