public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* [patch libjava]: Add missing file for Win32
@ 2009-07-24  9:20 Kai Tietz
  2009-07-24 12:02 ` Dave Korn
  0 siblings, 1 reply; 2+ 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] 2+ 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 12:02 ` Dave Korn
  0 siblings, 0 replies; 2+ 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] 2+ messages in thread

end of thread, other threads:[~2009-07-24 12:02 UTC | newest]

Thread overview: 2+ 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 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).