commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r1164810 - in /commons/sandbox/runtime/trunk/src/main/native: modules/openssl/api.c os/win32/dirent.c os/win32/posix.c
Date Sat, 03 Sep 2011 07:21:41 GMT
Author: mturk
Date: Sat Sep  3 07:21:40 2011
New Revision: 1164810

URL: http://svn.apache.org/viewvc?rev=1164810&view=rev
Log:
Misc fixes

Modified:
    commons/sandbox/runtime/trunk/src/main/native/modules/openssl/api.c
    commons/sandbox/runtime/trunk/src/main/native/os/win32/dirent.c
    commons/sandbox/runtime/trunk/src/main/native/os/win32/posix.c

Modified: commons/sandbox/runtime/trunk/src/main/native/modules/openssl/api.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/modules/openssl/api.c?rev=1164810&r1=1164809&r2=1164810&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/modules/openssl/api.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/modules/openssl/api.c Sat Sep  3 07:21:40
2011
@@ -37,6 +37,11 @@
 
 ACR_JNI_EXPORT(jboolean, Native, ldopenssl0)(JNI_STDARGS)
 {
+    if (SSLeay() < 0x00908000L) {
+        AcrThrow(env, ACR_EX_ERUNTIME,
+                 "OpenSSL 0.9.8 or greater is required");
+        return JNI_FALSE;
+    }
     return JNI_TRUE;
 }
 

Modified: commons/sandbox/runtime/trunk/src/main/native/os/win32/dirent.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/win32/dirent.c?rev=1164810&r1=1164809&r2=1164810&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/win32/dirent.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/win32/dirent.c Sat Sep  3 07:21:40 2011
@@ -65,8 +65,8 @@ DIR *opendir(const wchar_t *path)
         ACR_SET_OS_ERROR(ACR_ERANGE);
         return 0;
     }
-    if (dir->d_name[len-2] != L'\\')
-        dir->d_name[len]    = L'\\';
+    if (dir->d_name[len-1] != L'\\')
+        dir->d_name[len++]  = L'\\';
     dir->d_star = len;
     dir->d_find = INVALID_HANDLE_VALUE;
     dir->d_stat = 0;

Modified: commons/sandbox/runtime/trunk/src/main/native/os/win32/posix.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/win32/posix.c?rev=1164810&r1=1164809&r2=1164810&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/win32/posix.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/win32/posix.c Sat Sep  3 07:21:40 2011
@@ -148,7 +148,7 @@ wcslcat(wchar_t *dst, const wchar_t *src
     n = siz - dlen;
 
     if (n == 0)
-        return(dlen + wcslen(s));
+        return (dlen + wcslen(s));
     while (*s != L'\0') {
         if (n != 1) {
             *d++ = *s;
@@ -158,7 +158,7 @@ wcslcat(wchar_t *dst, const wchar_t *src
     }
     *d = L'\0';
 
-    return(dlen + (s - src));   /* count does not include NUL */
+    return (dlen + (s - src));  /* count does not include NUL */
 }
 
 int



Mime
View raw message