[evolution-data-server] Level the differencies with the alternative runtime/header set



commit c2dfca032b60f0cd567ff1165659fc37c9642b73
Author: Fridrich Strba <fridrich strba bluewin ch>
Date:   Thu Jan 28 12:08:37 2010 +0530

    Level the differencies with the alternative runtime/header set

 addressbook/backends/ldap/e-book-backend-ldap.c |    8 ++++++++
 addressbook/backends/ldap/openldap-extract.h    |   13 +++++++++++++
 libedataserver/e-proxy.c                        |    4 ++++
 3 files changed, 25 insertions(+), 0 deletions(-)
---
diff --git a/addressbook/backends/ldap/e-book-backend-ldap.c b/addressbook/backends/ldap/e-book-backend-ldap.c
index f147f4d..5ca2bff 100644
--- a/addressbook/backends/ldap/e-book-backend-ldap.c
+++ b/addressbook/backends/ldap/e-book-backend-ldap.c
@@ -81,11 +81,19 @@
         ldap_compare_extW(ld,dn,a,0,v,sc,cc,msg)
 #    define ldap_search_ext(ld,base,scope,f,a,o,sc,cc,(t),s,msg) \
         ldap_search_extW(ld,base,scope,f,a,o,sc,cc,((PLDAP_TIMEVAL)t)?((PLDAP_TIMEVAL)t)->tv_sec:0,s,msg)
+# if defined (__MINGW64_VERSION_MAJOR) || defined (_MSC_VER)
+#    define ldap_start_tls_s(ld,sc,cc) \
+        ldap_start_tls_sW(ld,0,0,sc,cc)
+# endif
 #  else /* !UNICODE */
 #    define ldap_compare_ext(ld,dn,a,v,sc,cc,msg) \
         ldap_compare_extA(ld,dn,a,0,v,sc,cc,msg)
 #    define ldap_search_ext(ld,base,scope,f,a,o,sc,cc,t,s,msg) \
         ldap_search_extA(ld,base,scope,f,a,o,sc,cc,((PLDAP_TIMEVAL)t)?((PLDAP_TIMEVAL)t)->tv_sec:0,s,msg)
+# if defined (__MINGW64_VERSION_MAJOR) || defined (_MSC_VER)
+#    define ldap_start_tls_s(ld,sc,cc) \
+        ldap_start_tls_sA(ld,0,0,sc,cc)
+# endif
 #  endif /* UNICODE */
 
 #endif
diff --git a/addressbook/backends/ldap/openldap-extract.h b/addressbook/backends/ldap/openldap-extract.h
index c416b0d..2dcf5f6 100644
--- a/addressbook/backends/ldap/openldap-extract.h
+++ b/addressbook/backends/ldap/openldap-extract.h
@@ -70,6 +70,19 @@
 #ifdef G_OS_WIN32
 #define ldap_msgtype(lm) (lm)->lm_msgtype
 #define ldap_msgid(lm) (lm)->lm_msgid
+#ifndef LDAP_TYPE_OR_VALUE_EXISTS
+#define LDAP_TYPE_OR_VALUE_EXISTS 0x14
+#endif
+#ifndef LDAP_SCOPE_DEFAULT
+#define LDAP_SCOPE_DEFAULT -1
+#endif
+#ifndef LDAP_OPT_SUCCESS
+#define LDAP_OPT_SUCCESS 0x00
+#endif
+#ifndef LDAP_INSUFFICIENT_ACCESS
+#define LDAP_INSUFFICIENT_ACCESS 0x32
+#endif
+ 
 #endif
 
 #define LDAP_SCHERR_OUTOFMEM		1
diff --git a/libedataserver/e-proxy.c b/libedataserver/e-proxy.c
index aef6203..bc88cb7 100644
--- a/libedataserver/e-proxy.c
+++ b/libedataserver/e-proxy.c
@@ -30,6 +30,10 @@
 
 #ifdef _WIN32
 #include <winsock2.h>
+#ifndef IN6_ARE_ADDR_EQUAL
+#define IN6_ARE_ADDR_EQUAL(a, b)	\
+    (memcmp ((void*)(a), (void*)(b), sizeof (struct in6_addr)) == 0)
+#endif
 #else
 #include <netinet/in.h>
 #include <sys/socket.h>



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