zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@apache.org
Subject svn commit: r1683164 - in /zookeeper/branches/branch-3.5: CHANGES.txt src/c/include/winconfig.h src/c/src/zookeeper.c
Date Tue, 02 Jun 2015 19:17:30 GMT
Author: rgs
Date: Tue Jun  2 19:17:30 2015
New Revision: 1683164

URL: http://svn.apache.org/r1683164
Log:
ZOOKEEPER-2096: C client builds with incorrect error codes in VisualStudio 2010+
(Vitaly Stakhovsky via rgs)

Modified:
    zookeeper/branches/branch-3.5/CHANGES.txt
    zookeeper/branches/branch-3.5/src/c/include/winconfig.h
    zookeeper/branches/branch-3.5/src/c/src/zookeeper.c

Modified: zookeeper/branches/branch-3.5/CHANGES.txt
URL: http://svn.apache.org/viewvc/zookeeper/branches/branch-3.5/CHANGES.txt?rev=1683164&r1=1683163&r2=1683164&view=diff
==============================================================================
--- zookeeper/branches/branch-3.5/CHANGES.txt (original)
+++ zookeeper/branches/branch-3.5/CHANGES.txt Tue Jun  2 19:17:30 2015
@@ -108,6 +108,9 @@ BUGFIXES:
   ZOOKEEPER-2197 non-ascii character in FinalRequestProcessor.java
   (Michi Mutsuzaki via rgs)
 
+  ZOOKEEPER-2096: C client builds with incorrect error codes in VisualStudio 2010+
+  (Vitaly Stakhovsky via rgs)
+
 IMPROVEMENTS:
   ZOOKEEPER-1660 Documentation for Dynamic Reconfiguration (Reed Wanderman-Milne via shralex)
 

Modified: zookeeper/branches/branch-3.5/src/c/include/winconfig.h
URL: http://svn.apache.org/viewvc/zookeeper/branches/branch-3.5/src/c/include/winconfig.h?rev=1683164&r1=1683163&r2=1683164&view=diff
==============================================================================
--- zookeeper/branches/branch-3.5/src/c/include/winconfig.h (original)
+++ zookeeper/branches/branch-3.5/src/c/include/winconfig.h Tue Jun  2 19:17:30 2015
@@ -184,8 +184,13 @@
 #define EHOSTDOWN EPIPE
 #define ESTALE ENODEV
 
+#ifndef EWOULDBLOCK
 #define EWOULDBLOCK WSAEWOULDBLOCK
+#endif
+
+#ifndef EINPROGRESS
 #define EINPROGRESS WSAEINPROGRESS
+#endif
 
 typedef int pid_t;
 #endif

Modified: zookeeper/branches/branch-3.5/src/c/src/zookeeper.c
URL: http://svn.apache.org/viewvc/zookeeper/branches/branch-3.5/src/c/src/zookeeper.c?rev=1683164&r1=1683163&r2=1683164&view=diff
==============================================================================
--- zookeeper/branches/branch-3.5/src/c/src/zookeeper.c (original)
+++ zookeeper/branches/branch-3.5/src/c/src/zookeeper.c Tue Jun  2 19:17:30 2015
@@ -2109,6 +2109,16 @@ static socket_t zookeeper_connect(zhandl
 
 #ifdef _WIN32
     get_errno();
+#if _MSC_VER >= 1600
+    switch(errno) {
+    case WSAEWOULDBLOCK:
+        errno = EWOULDBLOCK;
+        break;
+    case WSAEINPROGRESS:
+        errno = EINPROGRESS;
+        break;
+    }
+#endif
 #endif
 
     return rc;



Mime
View raw message