Author: mturk
Date: Mon Apr 13 10:53:27 2009
New Revision: 764401

URL: http://svn.apache.org/viewvc?rev=764401&view=rev
Log:
Add few more win32 winsock error descriptions

Modified:
    commons/sandbox/runtime/trunk/src/main/native/shared/dbb.c
    commons/sandbox/runtime/trunk/src/main/native/shared/error.c

Modified: commons/sandbox/runtime/trunk/src/main/native/shared/dbb.c
URL: 
http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/shared/dbb.c?rev=764401&r1=764400&r2=764401&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/shared/dbb.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/shared/dbb.c Mon Apr 13 
10:53:27 2009
@@ -83,7 +83,7 @@
                                                           jint offset,
                                                           jint size)
 {
-    void *mem = J2P(addr, void *);
+    char *mem = J2P(addr, char *);
 
     UNREFERENCED_O;
 
@@ -102,7 +102,7 @@
                            ACR_EINVALSIZ);
         return NULL;
     }
-    return (*_E)->NewDirectByteBuffer(_E, (char *)mem + (size_t)offset, 
(jlong)size);
+    return (*_E)->NewDirectByteBuffer(_E, mem + (size_t)offset, (jlong)size);
 }
 
 ACR_JNI_EXPORT_DECLARE(void, DirectByteBuffer, free)(ACR_JNISTDARGS, jobject 
bb)

Modified: commons/sandbox/runtime/trunk/src/main/native/shared/error.c
URL: 
http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/shared/error.c?rev=764401&r1=764400&r2=764401&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/shared/error.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/shared/error.c Mon Apr 13 
10:53:27 2009
@@ -229,7 +229,9 @@
 }
 
 #if defined(WIN32)
-
+/* Winsock error strings
+ * 
+ */
 static const struct {
     int code;
     const char *msg;
@@ -283,6 +285,13 @@
     WSAEDISCON,         "Graceful shutdown in progress",
     WSAHOST_NOT_FOUND,  "Host not found",
     WSANO_DATA,         "No host data of that type was found",
+    /* Extra errors */
+    WSATRY_AGAIN,       "Temporary failure in name resolution",
+    WSANO_RECOVERY,     "Nonrecoverable failure in name resolution",
+    WSA_NOT_ENOUGHT_MEMORY, "Memory allocation failed",
+    WSASERVICE_NOT_FOUND,   "Service not found.",
+    WSATYPE_NOT_FOUND,  "Class type not found.",
+    WSASYSCALLFAILURE,  "System call failure",
     0,                  NULL
 };
 
@@ -364,7 +373,7 @@
         msg = "Unrecognized resolver error";
     }
     return stuffbuffer(buf, bufsize, msg);
-#endif /* HAVE_STRERROR */
+#endif /* HAVE_HSTRERROR */
 }
 #endif
 
@@ -384,7 +393,7 @@
         return buf;
     }
 }
-#else
+#else  /* !HAVE_HSTRERROR_R */
 /* plain old strerror();
  * thread-safe on some platforms (e.g., Solaris, OS/390)
  */


Reply via email to