[evolution-data-server] Miscellaneous build fixes for Windows
- From: Fridrich Strba <strba src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Miscellaneous build fixes for Windows
- Date: Mon, 7 Mar 2011 10:07:08 +0000 (UTC)
commit 2a387cbad1842817ba77020e5e776c70a17ea79e
Author: Fridrich Å trba <fridrich strba bluewin ch>
Date: Mon Mar 7 11:06:27 2011 +0100
Miscellaneous build fixes for Windows
Conflicts:
camel/providers/local/camel-maildir-store.c
camel/providers/local/camel-maildir-summary.c
camel/providers/local/camel-mh-store.c
camel/camel-sasl-gssapi.c | 5 ++++
camel/providers/local/Makefile.am | 12 +++++-----
camel/providers/local/camel-maildir-store.c | 28 ++++++++++++------------
camel/providers/local/camel-maildir-summary.c | 6 ++++-
camel/providers/local/camel-mh-store.c | 2 +-
libedataserverui/e-name-selector-dialog.c | 4 +++
6 files changed, 35 insertions(+), 22 deletions(-)
---
diff --git a/camel/camel-sasl-gssapi.c b/camel/camel-sasl-gssapi.c
index cb59919..fac8c83 100644
--- a/camel/camel-sasl-gssapi.c
+++ b/camel/camel-sasl-gssapi.c
@@ -31,6 +31,11 @@
#include <string.h>
#include <sys/types.h>
+#ifndef _WIN32
+#include <netdb.h>
+#include <sys/socket.h>
+#endif
+
#include <gio/gio.h>
#include <glib/gi18n-lib.h>
diff --git a/camel/providers/local/Makefile.am b/camel/providers/local/Makefile.am
index 3f7bc7a..cb52ac9 100644
--- a/camel/providers/local/Makefile.am
+++ b/camel/providers/local/Makefile.am
@@ -5,12 +5,6 @@ if OS_WIN32
SYSDEP_PROVIDER_SOURCES =
else
SYSDEP_PROVIDER_SOURCES = \
- camel-mh-folder.c \
- camel-mh-store.c \
- camel-mh-summary.c \
- camel-maildir-folder.c \
- camel-maildir-store.c \
- camel-maildir-summary.c \
camel-spool-folder.c \
camel-spool-store.c \
camel-spool-summary.c
@@ -32,6 +26,12 @@ libcamellocal_la_SOURCES = \
camel-mbox-folder.c \
camel-mbox-store.c \
camel-mbox-summary.c \
+ camel-mh-folder.c \
+ camel-mh-store.c \
+ camel-mh-summary.c \
+ camel-maildir-folder.c \
+ camel-maildir-store.c \
+ camel-maildir-summary.c \
$(SYSDEP_PROVIDER_SOURCES)
noinst_HEADERS = \
diff --git a/camel/providers/local/camel-maildir-store.c b/camel/providers/local/camel-maildir-store.c
index fa1675e..d0441d7 100644
--- a/camel/providers/local/camel-maildir-store.c
+++ b/camel/providers/local/camel-maildir-store.c
@@ -179,12 +179,12 @@ maildir_store_get_folder_sync (CamelStore *store,
if (!g_ascii_strcasecmp (folder_name, "Inbox")) {
/* special case "." (aka inbox), may need to be created */
- if (g_stat (tmp, &st) != 0 || !S_ISDIR (st.st_mode)
- || g_stat (cur, &st) != 0 || !S_ISDIR (st.st_mode)
- || g_stat (new, &st) != 0 || !S_ISDIR (st.st_mode)) {
- if (mkdir (tmp, 0700) != 0
- || mkdir (cur, 0700) != 0
- || mkdir (new, 0700) != 0) {
+ if (g_stat(tmp, &st) != 0 || !S_ISDIR(st.st_mode)
+ || g_stat (cur, &st) != 0 || !S_ISDIR(st.st_mode)
+ || g_stat (new, &st) != 0 || !S_ISDIR(st.st_mode)) {
+ if (g_mkdir (tmp, 0700) != 0
+ || g_mkdir (cur, 0700) != 0
+ || g_mkdir (new, 0700) != 0) {
g_set_error (
error, G_IO_ERROR,
g_io_error_from_errno (errno),
@@ -212,10 +212,10 @@ maildir_store_get_folder_sync (CamelStore *store,
_("Cannot get folder '%s': folder does not exist."),
folder_name);
} else {
- if (mkdir (name, 0700) != 0
- || mkdir (tmp, 0700) != 0
- || mkdir (cur, 0700) != 0
- || mkdir (new, 0700) != 0) {
+ if (g_mkdir (name, 0700) != 0
+ || g_mkdir (tmp, 0700) != 0
+ || g_mkdir (cur, 0700) != 0
+ || g_mkdir (new, 0700) != 0) {
g_set_error (
error, G_IO_ERROR,
g_io_error_from_errno (errno),
@@ -323,10 +323,10 @@ maildir_store_delete_folder_sync (CamelStore *store,
if (err != 0) {
/* easier just to mkdir all (and let them fail), than remember what we got to */
- mkdir (name, 0700);
- mkdir (cur, 0700);
- mkdir (new, 0700);
- mkdir (tmp, 0700);
+ g_mkdir (name, 0700);
+ g_mkdir (cur, 0700);
+ g_mkdir (new, 0700);
+ g_mkdir (tmp, 0700);
g_set_error (
error, G_IO_ERROR,
g_io_error_from_errno (err),
diff --git a/camel/providers/local/camel-maildir-summary.c b/camel/providers/local/camel-maildir-summary.c
index b116cd5..972d203 100644
--- a/camel/providers/local/camel-maildir-summary.c
+++ b/camel/providers/local/camel-maildir-summary.c
@@ -31,7 +31,11 @@
#include <unistd.h>
#include <sys/stat.h>
#include <sys/types.h>
+#ifndef _WIN32
#include <sys/uio.h>
+#else
+#include <winsock2.h>
+#endif
#include <glib/gstdio.h>
#include <glib/gi18n-lib.h>
@@ -370,7 +374,7 @@ static gchar *maildir_summary_next_uid_string (CamelFolderSummary *s)
if (retry > 0) {
g_free (name);
g_free (uid);
- sleep (2);
+ g_usleep (2*G_USEC_PER_SEC);
}
uid = g_strdup_printf("%ld.%d_%u.%s", time(NULL), getpid(), nextuid, mds->priv->hostname);
name = g_strdup_printf("%s/tmp/%s", cls->folder_path, uid);
diff --git a/camel/providers/local/camel-mh-store.c b/camel/providers/local/camel-mh-store.c
index 7fb31f8..fdc324b 100644
--- a/camel/providers/local/camel-mh-store.c
+++ b/camel/providers/local/camel-mh-store.c
@@ -476,7 +476,7 @@ mh_store_get_folder_sync (CamelStore *store,
return NULL;
}
- if (mkdir (name, 0777) != 0) {
+ if (g_mkdir (name, 0777) != 0) {
g_set_error (
error, G_IO_ERROR,
g_io_error_from_errno (errno),
diff --git a/libedataserverui/e-name-selector-dialog.c b/libedataserverui/e-name-selector-dialog.c
index 9e27124..8376bcb 100644
--- a/libedataserverui/e-name-selector-dialog.c
+++ b/libedataserverui/e-name-selector-dialog.c
@@ -21,6 +21,10 @@
* Author: Hans Petter Jansson <hpj novell com>
*/
+#ifdef GTK_DISABLE_DEPRECATED
+#undef GTK_DISABLE_DEPRECATED
+#endif
+
#include <config.h>
#include <string.h>
#include <gdk/gdkkeysyms.h>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]