From patchwork Thu Aug 12 00:15:39 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitrijs Ledkovs X-Patchwork-Id: 61520 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 4FD82B70DA for ; Thu, 12 Aug 2010 10:20:21 +1000 (EST) Received: (qmail 15974 invoked by alias); 12 Aug 2010 00:20:14 -0000 Received: (qmail 15963 invoked by uid 22791); 12 Aug 2010 00:20:13 -0000 X-SWARE-Spam-Status: No, hits=-0.7 required=5.0 tests=BAYES_00, RCVD_NUMERIC_HELO, SPF_HELO_PASS, TW_IB, T_RP_MATCHES_RCVD, T_TVD_MIME_NO_HEADERS X-Spam-Check-By: sourceware.org Received: from lo.gmane.org (HELO lo.gmane.org) (80.91.229.12) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 12 Aug 2010 00:20:07 +0000 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1OjLWd-0003Yn-Sx for gcc-patches@gcc.gnu.org; Thu, 12 Aug 2010 02:20:03 +0200 Received: from 87.110.8.51 ([87.110.8.51]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 12 Aug 2010 02:20:03 +0200 Received: from dmitrij.ledkov by 87.110.8.51 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 12 Aug 2010 02:20:03 +0200 To: gcc-patches@gcc.gnu.org From: Dmitrijs Ledkovs Subject: [java] [mingw] Fix (typos) compile errors. Date: Thu, 12 Aug 2010 03:15:39 +0300 Lines: 57 Message-ID: <877hjwelec.fsf@ubuntu.com> Mime-Version: 1.0 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cc: java-patches@gcc.gnu.org X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org 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 From 5ddf060889cd985f2c9373ebd5941bc942bb5cfc Mon Sep 17 00:00:00 2001 From: Dmitrijs Ledkovs Date: Sun, 25 Jul 2010 17:01:49 +0100 Subject: [PATCH 1/2] 2010-07-25 Dmitrijs Ledkovs * 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