evolution-data-server r8944 - branches/gnome-2-22/camel



Author: tml
Date: Fri Jun  6 10:59:35 2008
New Revision: 8944
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=8944&view=rev

Log:
2008-06-06  Tor Lillqvist  <tml novell com>

	* camel-private.h
	* camel-win32.c: Drop the Win32 fsync() implementation. Instead
	just use _commit() in the Microsoft C library which does the same.

	* Makefile.am: Link libcamel with ICONV_LIBS.



Modified:
   branches/gnome-2-22/camel/ChangeLog
   branches/gnome-2-22/camel/Makefile.am
   branches/gnome-2-22/camel/camel-private.h
   branches/gnome-2-22/camel/camel-win32.c

Modified: branches/gnome-2-22/camel/Makefile.am
==============================================================================
--- branches/gnome-2-22/camel/Makefile.am	(original)
+++ branches/gnome-2-22/camel/Makefile.am	Fri Jun  6 10:59:35 2008
@@ -291,6 +291,7 @@
 	$(top_builddir)/libedataserver/libedataserver-${API_VERSION}.la \
 	$(CAMEL_LIBS)							\
 	$(SOCKET_LIBS)							\
+	$(ICONV_LIBS)							\
 	$(REGEX_LIBS)
 
 

Modified: branches/gnome-2-22/camel/camel-private.h
==============================================================================
--- branches/gnome-2-22/camel/camel-private.h	(original)
+++ branches/gnome-2-22/camel/camel-private.h	Fri Jun  6 10:59:35 2008
@@ -190,7 +190,7 @@
 	(g_mutex_unlock (((CamelCertDB *) (db))->priv->l))
 
 #ifdef G_OS_WIN32
-int fsync (int fd);
+#define fsync(fd) _commit(fd)
 
 const char *_camel_get_localedir (void) G_GNUC_CONST;
 const char *_camel_get_libexecdir (void) G_GNUC_CONST;

Modified: branches/gnome-2-22/camel/camel-win32.c
==============================================================================
--- branches/gnome-2-22/camel/camel-win32.c	(original)
+++ branches/gnome-2-22/camel/camel-win32.c	Fri Jun  6 10:59:35 2008
@@ -76,31 +76,3 @@
 GETTER(localedir)
 GETTER(libexecdir)
 GETTER(providerdir)
-
-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;
-}
-



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