diff mbox

[java,mingw] Fix (typos) compile errors.

Message ID 877hjwelec.fsf@ubuntu.com
State New
Headers show

Commit Message

Dmitrijs Ledkovs Aug. 12, 2010, 12:15 a.m. UTC
fix natVMSecureRandomWin32.cc for *-*-mingw32 targets.

When compiling build/host=i686-gnu-linux, target=i686-w64-mingw32. Libjava fails like so:

gnu/java/security/jce/prng/natVMSecureRandom.cc: In static member function 'static jint gnu::java::security::jce::prng::VMSecureRandom::natGenerateSeed(jbyteArray, jint, jint)':
gnu/java/security/jce/prng/natVMSecureRandom.cc:29:15: error: expected type-specifier
gnu/java/security/jce/prng/natVMSecureRandom.cc:29:15: error: expected ';'
gnu/java/security/jce/prng/natVMSecureRandom.cc: At global scope:
gnu/java/security/jce/prng/natVMSecureRandom.cc:26:1: warning: unused parameter 'byte_array' [-Wunused-parameter]
gnu/java/security/jce/prng/natVMSecureRandom.cc:26:1: warning: unused parameter 'offset' [-Wunused-parameter]
make[4]: *** [gnu/java/security/jce/prng/natVMSecureRandom.lo] Error 1

Comments

Andrew Haley Aug. 12, 2010, 8:59 a.m. UTC | #1
On 08/12/2010 01:15 AM, Dmitrijs Ledkovs wrote:
>         * gnu/java/security/jce/prng/natVMSecureRandomWin32.cc: Fix compile
>         errors.

OK.

Andrew.
Dmitrijs Ledkovs Aug. 12, 2010, 10:26 a.m. UTC | #2
Andrew Haley <aph@redhat.com> writes:

> On 08/12/2010 01:15 AM, Dmitrijs Ledkovs wrote:
>>         * gnu/java/security/jce/prng/natVMSecureRandomWin32.cc: Fix compile
>>         errors.
>
> OK.
>
> Andrew.
>
>

Thanks, Andrew.

Kai or somebody else, would you please apply this patch =)

Regards,
Dima.
diff mbox

Patch

From 5ddf060889cd985f2c9373ebd5941bc942bb5cfc Mon Sep 17 00:00:00 2001
From: Dmitrijs Ledkovs <dmitrij.ledkov@ubuntu.com>
Date: Sun, 25 Jul 2010 17:01:49 +0100
Subject: [PATCH 1/2] 2010-07-25  Dmitrijs Ledkovs <dmitrij.ledkov@ubuntu.com>

        * gnu/java/security/jce/prng/natVMSecureRandomWin32.cc: Fix compile
        errors.
---
 .../security/jce/prng/natVMSecureRandomWin32.cc    |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
 mode change 100755 => 100644 libjava/gnu/java/security/jce/prng/natVMSecureRandomWin32.cc

diff --git a/libjava/gnu/java/security/jce/prng/natVMSecureRandomWin32.cc b/libjava/gnu/java/security/jce/prng/natVMSecureRandomWin32.cc
old mode 100755
new mode 100644
index 1a9d0d3..f557315
--- a/libjava/gnu/java/security/jce/prng/natVMSecureRandomWin32.cc
+++ b/libjava/gnu/java/security/jce/prng/natVMSecureRandomWin32.cc
@@ -26,8 +26,11 @@  jint
 gnu::java::security::jce::prng::VMSecureRandom::natGenerateSeed(jbyteArray byte_array, jint offset, jint length)
 {
   if (length != 0)
-    throw new java::lang::UnsupportedOperationException (
-      JvNewStringLatin1 ("natGenerateSeed is not available for Win32 target."));
+  {
+      jstring oserr = JvNewStringLatin1 (strerror (errno));
+      throw new ::java::lang::UnsupportedOperationException
+         (JvNewStringLatin1 ("natGenerateSeed is not available for Win32 target.")->concat(oserr));
+  }
   return 0;
 }
 
-- 
1.7.0.4