[evolution-patches] Patch: Unbreak build of cvs eds/camel on non-win32 systems
- From: David Malcolm <dmalcolm redhat com>
- To: evolution-patches gnome org
- Subject: [evolution-patches] Patch: Unbreak build of cvs eds/camel on non-win32 systems
- Date: Fri, 09 Dec 2005 01:49:42 -0500
Looks like this commit slightly broke the build of camel on non-Win32
systems:
2005-12-08 Tor Lillqvist <tml novell com>
* *.c: Use gstdio wrappers. Use GLib portable path manipulation
API. No symlinks on Win32. Use GDir instead of dirent.
Attached patch should fix it; OK to commit?
Dave
? depcomp
? evolution-data-server-zip
? gtk-doc.make
? iconv-detect.h
? calendar/config.guess
? calendar/config.sub
? calendar/depcomp
? calendar/install-sh
? calendar/ltmain.sh
? calendar/missing
? calendar/ylwrap
? calendar/tests/ecal/test-recur
? camel/camel-mime-tables.c
? camel/providers/hula/Makefile
? camel/providers/hula/Makefile.in
? libedataserverui/test-contact-store
? libedataserverui/test-name-selector
? po/stamp-it
? servers/exchange/Makefile
? servers/exchange/Makefile.in
? servers/exchange/lib/Makefile
? servers/exchange/lib/Makefile.in
? servers/exchange/storage/Makefile
? servers/exchange/storage/Makefile.in
? servers/exchange/storage/libexchange-storage.pc
? servers/exchange/xntlm/Makefile
? servers/exchange/xntlm/Makefile.in
? src/GNOME_Evolution_DataServer_1.2.server
? win32/Makefile
? win32/Makefile.in
Index: camel/providers/local/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/providers/local/ChangeLog,v
retrieving revision 1.15
diff -u -p -r1.15 ChangeLog
--- camel/providers/local/ChangeLog 8 Dec 2005 11:28:47 -0000 1.15
+++ camel/providers/local/ChangeLog 9 Dec 2005 06:35:44 -0000
@@ -1,3 +1,10 @@
+2005-12-09 David Malcolm <dmalcolm redhat com>
+
+ * camel-local-folder.c: restore missing declarations for non-Win32
+ systems.
+
+ * camel-mbox-folder.c: avoid use of O_BINARY on non-Win32 systems.
+
2005-12-08 Tor Lillqvist <tml novell com>
* *.c: Use gstdio wrappers. Use GLib portable path manipulation
Index: camel/providers/local/camel-local-folder.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/providers/local/camel-local-folder.c,v
retrieving revision 1.58
diff -u -p -r1.58 camel-local-folder.c
--- camel/providers/local/camel-local-folder.c 8 Dec 2005 11:28:47 -0000 1.58
+++ camel/providers/local/camel-local-folder.c 9 Dec 2005 06:35:44 -0000
@@ -210,6 +210,10 @@ camel_local_folder_construct(CamelLocalF
const char *root_dir_path;
char *name;
char *tmp, *statepath;
+#ifndef G_OS_WIN32
+ char folder_path[PATH_MAX];
+ struct stat st;
+#endif
int forceindex, len;
CamelURL *url;
CamelLocalStore *ls = (CamelLocalStore *)parent_store;
Index: camel/providers/local/camel-mbox-folder.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/providers/local/camel-mbox-folder.c,v
retrieving revision 1.40
diff -u -p -r1.40 camel-mbox-folder.c
--- camel/providers/local/camel-mbox-folder.c 8 Dec 2005 11:28:47 -0000 1.40
+++ camel/providers/local/camel-mbox-folder.c 9 Dec 2005 06:35:44 -0000
@@ -185,6 +185,7 @@ mbox_append_message(CamelFolder *folder,
char *fromline = NULL;
int fd, retval;
struct stat st;
+ int mode;
#if 0
char *xev;
#endif
@@ -287,7 +288,12 @@ fail_write:
g_free(fromline);
/* reset the file to original size */
- fd = g_open(lf->folder_path, O_WRONLY | O_BINARY, 0600);
+#ifdef G_OS_WIN32
+ mode = O_WRONLY | O_BINARY;
+#else
+ mode = O_WRONLY;
+#endif
+ fd = g_open(lf->folder_path, mode, 0600);
if (fd != -1) {
ftruncate(fd, mbs->folder_size);
close(fd);
@@ -323,6 +329,7 @@ mbox_get_message(CamelFolder *folder, co
int fd, retval;
int retried = FALSE;
off_t frompos;
+ int mode;
d(printf("Getting message %s\n", uid));
@@ -358,7 +365,13 @@ retry:
with no stream). This means we dont have to lock the mbox for the life of the message, but only
while it is being created. */
- fd = g_open(lf->folder_path, O_RDONLY | O_BINARY, 0);
+#ifdef G_OS_WIN32
+ mode = O_RDONLY | O_BINARY;
+#else
+ mode = O_RDONLY;
+#endif
+
+ fd = g_open(lf->folder_path, mode, 0);
if (fd == -1) {
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
_("Cannot get message: %s from folder %s\n %s"),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]