* [patch libjava]: Add missing file for Win32
@ 2009-07-24 9:20 Kai Tietz
2009-07-24 11:03 ` Andrew Haley
2009-07-24 12:02 ` Dave Korn
0 siblings, 2 replies; 6+ messages in thread
From: Kai Tietz @ 2009-07-24 9:20 UTC (permalink / raw)
To: Andrew Haley; +Cc: gcc, java
[-- Attachment #1: Type: text/plain, Size: 545 bytes --]
Hello,
This patch adds dummy implementation for
gnu/java/security/jce/prng/natVMSecureRandomWin32.cc file for Win32 build.
It throws just an exception for not supporting this method.
ChangeLog
2009-07-24 Kai Tietz <kai.tietz@onevision.com>
* gnu/java/security/jce/prng/natVMSecureRandomWin32.cc: New Win32
specific implementation.
Tested for i686-pc-mingw32. Ok for apply to trunk?
Cheers,
Kai
| (\_/) This is Bunny. Copy and paste Bunny
| (='.'=) into your signature to help him gain
| (")_(") world domination.
[-- Attachment #2: w32_java.diff --]
[-- Type: application/octet-stream, Size: 1181 bytes --]
Index: gcc/libjava/gnu/java/security/jce/prng/natVMSecureRandomWin32.cc
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gcc/libjava/gnu/java/security/jce/prng/natVMSecureRandomWin32.cc 2009-07-24 11:15:22.296091500 +0200
@@ -0,0 +1,32 @@
+// natVMSecureRandomWin32.cc - Native part of VMSecureRandom class for Win32.
+
+/* Copyright (C) 2009 Free Software Foundation
+
+ This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
+details. */
+
+#include <config.h>
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <string.h>
+#include <errno.h>
+
+#include <gcj/cni.h>
+#include <java/lang/InternalError.h>
+#include <gnu/java/security/jce/prng/VMSecureRandom.h>
+
+jint
+gnu::java::security::jce::prng::VMSecureRandom::natGenerateSeed(jbyteArray byte_array, jint offset, jint length)
+{
+ if (length != 0)
+ throw new ::java::lang::InternalError
+ (JvNewStringLatin1 ("Error function not implemented for Win32 target."));
+ return 0;
+}
+
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [patch libjava]: Add missing file for Win32
2009-07-24 9:20 [patch libjava]: Add missing file for Win32 Kai Tietz
@ 2009-07-24 11:03 ` Andrew Haley
2009-07-24 11:17 ` Kai Tietz
2009-07-24 12:02 ` Dave Korn
1 sibling, 1 reply; 6+ messages in thread
From: Andrew Haley @ 2009-07-24 11:03 UTC (permalink / raw)
To: Kai Tietz; +Cc: java
On 07/24/2009 11:19 AM, Kai Tietz wrote:
> This patch adds dummy implementation for
> gnu/java/security/jce/prng/natVMSecureRandomWin32.cc file for Win32 build.
> It throws just an exception for not supporting this method.
This should be an UnsupportedOperationException.
Andrew.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [patch libjava]: Add missing file for Win32
2009-07-24 11:03 ` Andrew Haley
@ 2009-07-24 11:17 ` Kai Tietz
2009-07-24 11:19 ` Andrew Haley
0 siblings, 1 reply; 6+ messages in thread
From: Kai Tietz @ 2009-07-24 11:17 UTC (permalink / raw)
To: Andrew Haley; +Cc: java
[-- Attachment #1: Type: text/plain, Size: 510 bytes --]
Andrew Haley <aph@redhat.com> wrote on 24.07.2009 13:03:28:
> On 07/24/2009 11:19 AM, Kai Tietz wrote:
>
> > This patch adds dummy implementation for
> > gnu/java/security/jce/prng/natVMSecureRandomWin32.cc file for Win32
build.
> > It throws just an exception for not supporting this method.
>
> This should be an UnsupportedOperationException.
>
> Andrew.
>
Ok, adjusted.
Kai
| (\_/) This is Bunny. Copy and paste Bunny
| (='.'=) into your signature to help him gain
| (")_(") world domination.
[-- Attachment #2: w32_java.diff --]
[-- Type: application/octet-stream, Size: 1186 bytes --]
Index: gcc/libjava/gnu/java/security/jce/prng/natVMSecureRandomWin32.cc
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gcc/libjava/gnu/java/security/jce/prng/natVMSecureRandomWin32.cc 2009-07-24 13:14:44.000916000 +0200
@@ -0,0 +1,32 @@
+// natVMSecureRandomWin32.cc - Native part of VMSecureRandom class for Win32.
+
+/* Copyright (C) 2009 Free Software Foundation
+
+ This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
+details. */
+
+#include <config.h>
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <string.h>
+#include <errno.h>
+
+#include <gcj/cni.h>
+#include <java/lang/InternalError.h>
+#include <gnu/java/security/jce/prng/VMSecureRandom.h>
+
+jint
+gnu::java::security::jce::prng::VMSecureRandom::natGenerateSeed(jbyteArray byte_array, jint offset, jint length)
+{
+ if (length != 0)
+ throw new UnsupportedOperationException (
+ JvNewStringLatin1 ("natGenerateSeed is not available for Win32 target."));
+ return 0;
+}
+
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [patch libjava]: Add missing file for Win32
2009-07-24 11:17 ` Kai Tietz
@ 2009-07-24 11:19 ` Andrew Haley
2009-07-24 11:28 ` Kai Tietz
0 siblings, 1 reply; 6+ messages in thread
From: Andrew Haley @ 2009-07-24 11:19 UTC (permalink / raw)
To: Kai Tietz; +Cc: java
On 07/24/2009 01:17 PM, Kai Tietz wrote:
> Andrew Haley <aph@redhat.com> wrote on 24.07.2009 13:03:28:
>
>> On 07/24/2009 11:19 AM, Kai Tietz wrote:
>>
>>> This patch adds dummy implementation for
>>> gnu/java/security/jce/prng/natVMSecureRandomWin32.cc file for Win32
> build.
>>> It throws just an exception for not supporting this method.
>> This should be an UnsupportedOperationException.
>>
>> Andrew.
>>
>
> Ok, adjusted.
OK.
Andrew.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [patch libjava]: Add missing file for Win32
2009-07-24 11:19 ` Andrew Haley
@ 2009-07-24 11:28 ` Kai Tietz
0 siblings, 0 replies; 6+ messages in thread
From: Kai Tietz @ 2009-07-24 11:28 UTC (permalink / raw)
To: Andrew Haley; +Cc: java
Andrew Haley <aph@redhat.com> wrote on 24.07.2009 13:19:06:
> OK.
Applied at rev. 150048.
Kai
| (\_/) This is Bunny. Copy and paste Bunny
| (='.'=) into your signature to help him gain
| (")_(") world domination.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [patch libjava]: Add missing file for Win32
2009-07-24 9:20 [patch libjava]: Add missing file for Win32 Kai Tietz
2009-07-24 11:03 ` Andrew Haley
@ 2009-07-24 12:02 ` Dave Korn
1 sibling, 0 replies; 6+ messages in thread
From: Dave Korn @ 2009-07-24 12:02 UTC (permalink / raw)
To: Kai Tietz; +Cc: Andrew Haley, gcc, java
Kai Tietz wrote:
> * gnu/java/security/jce/prng/natVMSecureRandomWin32.cc: New Win32
> specific implementation.
> + (JvNewStringLatin1 ("Error function not implemented for Win32 target."));
That's slightly ambiguous; it needs a colon after 'Error', to make clear it
isn't an "error function" that is not implemented!
cheers,
DaveK
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-07-24 12:02 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-24 9:20 [patch libjava]: Add missing file for Win32 Kai Tietz
2009-07-24 11:03 ` Andrew Haley
2009-07-24 11:17 ` Kai Tietz
2009-07-24 11:19 ` Andrew Haley
2009-07-24 11:28 ` Kai Tietz
2009-07-24 12:02 ` Dave Korn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).