harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mloe...@apache.org
Subject svn commit: r425373 - in /incubator/harmony/enhanced/classlib/trunk: make/build-native.xml modules/security/src/main/native/security/ modules/security/src/main/native/security/windows/getWindowsRandom.c
Date Tue, 25 Jul 2006 11:24:55 GMT
Author: mloenko
Date: Tue Jul 25 04:24:54 2006
New Revision: 425373

URL: http://svn.apache.org/viewvc?rev=425373&view=rev
Log:
fix build problems (thanks to Oliver!)

Modified:
    incubator/harmony/enhanced/classlib/trunk/make/build-native.xml
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/native/security/ 
 (props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/native/security/windows/getWindowsRandom.c

Modified: incubator/harmony/enhanced/classlib/trunk/make/build-native.xml
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/make/build-native.xml?rev=425373&r1=425372&r2=425373&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/make/build-native.xml (original)
+++ incubator/harmony/enhanced/classlib/trunk/make/build-native.xml Tue Jul 25 04:24:54 2006
@@ -177,6 +177,10 @@
     	     target="clean.native.includes" />
     	<ant dir="modules/luni" antfile="build.xml" 
     	     target="clean.native.includes" />
+
+        <!-- delete the deploy/include and deploy/jdk/include directories -->
+        <delete dir="${hy.hdk}/include" />
+        <delete dir="${hy.hdk}/jdk/include" />
     </target>
 
     <!-- ================================= 

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/native/security/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Tue Jul 25 04:24:54 2006
@@ -0,0 +1,4 @@
+
+hysecurity.dll
+hysecurity.map
+hysecurity.pdb

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/native/security/windows/getWindowsRandom.c
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/native/security/windows/getWindowsRandom.c?rev=425373&r1=425372&r2=425373&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/native/security/windows/getWindowsRandom.c
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/native/security/windows/getWindowsRandom.c
Tue Jul 25 04:24:54 2006
@@ -17,15 +17,10 @@
 #undef _WIN32_WINNT
 #define _WIN32_WINNT 0x0500
 
-#include <stdio.h>
-
 #include <windows.h>
 #include <wincrypt.h>
-#include <winerror.h>
-
-#include <sddl.h>
 
-#include "harmony.h"
+#include "vmi.h"
 #include "jni.h"
 
 JNIEXPORT jint JNICALL
@@ -33,25 +28,23 @@
 {
     HCRYPTPROV hcrypt_provider;
 
-    byte * random_bits;
-    int true  = 1;
-    int false = 0;
+    byte *random_bits;
 
     int b;
 
     b = CryptAcquireContext( &hcrypt_provider, NULL, NULL, PROV_DSS, CRYPT_VERIFYCONTEXT
);
 
-     if ( !b ) {
-        return false;
+    if ( !b ) {
+        return 0;
     }
 
-	random_bits  = malloc(numBytes);
+    random_bits = malloc(numBytes);
 
     b = CryptGenRandom( hcrypt_provider, numBytes, random_bits );
 
-      if ( !b ){
-		free(random_bits);
-        return false;
+    if ( !b ) {
+        free(random_bits);
+        return 0;
     }
 
     b = CryptReleaseContext(hcrypt_provider, 0);
@@ -59,6 +52,6 @@
     (*env)->SetByteArrayRegion(env, bytes, 0, numBytes, (signed char*)random_bits);
     free(random_bits);
 
-    return true;
+    return 1;
 }
 



Mime
View raw message