diff options
author | Tor Lillqvist <tml@novell.com> | 2005-12-17 19:45:52 +0800 |
---|---|---|
committer | Tor Lillqvist <tml@src.gnome.org> | 2005-12-17 19:45:52 +0800 |
commit | 22e9edd52a0e6ca23edc14e3ef24fba4da8dc13a (patch) | |
tree | 470287f82c9473740aea30e4e64be315258fb64e /e-util/e-util.c | |
parent | 4ded439d958853c6e276162fb8dc6f2724477cbc (diff) | |
download | gsoc2013-evolution-22e9edd52a0e6ca23edc14e3ef24fba4da8dc13a.tar.gz gsoc2013-evolution-22e9edd52a0e6ca23edc14e3ef24fba4da8dc13a.tar.zst gsoc2013-evolution-22e9edd52a0e6ca23edc14e3ef24fba4da8dc13a.zip |
e-util-private.h (fsync) Don't bother with a Win32 implementation of
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.
svn path=/trunk/; revision=30796
Diffstat (limited to 'e-util/e-util.c')
-rw-r--r-- | e-util/e-util.c | 31 |
1 files changed, 0 insertions, 31 deletions
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 |