From: Kai Tietz <Kai.Tietz@onevision.com>
To: Andrew Haley <aph@redhat.com>
Cc: gcc@gcc.gnu.org, java@gcc.gnu.org
Subject: [patch libjava]: Add missing file for Win32
Date: Fri, 24 Jul 2009 09:20:00 -0000 [thread overview]
Message-ID: <OF02665440.EF8B0A6B-ONC12575FD.0032DF7A-C12575FD.00333BBB@onevision.de> (raw)
[-- 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;
+}
+
next reply other threads:[~2009-07-24 9:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-24 9:20 Kai Tietz [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=OF02665440.EF8B0A6B-ONC12575FD.0032DF7A-C12575FD.00333BBB@onevision.de \
--to=kai.tietz@onevision.com \
--cc=aph@redhat.com \
--cc=gcc@gcc.gnu.org \
--cc=java@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).