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

login
register
mail settings
Submitter Dmitrijs Ledkovs
Date Aug. 12, 2010, 12:15 a.m.
Message ID <877hjwelec.fsf@ubuntu.com>
Download mbox | patch
Permalink /patch/61520/
State New
Headers show

Comments

Dmitrijs Ledkovs - Aug. 12, 2010, 12:15 a.m.
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
Andrew Haley - Aug. 12, 2010, 8:59 a.m.
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.
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.

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