public inbox for java-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Dmitrijs Ledkovs <dmitrij.ledkov@ubuntu.com>
Cc: gcc-patches@gcc.gnu.org, java-patches@gcc.gnu.org
Subject: Re: [java] [mingw] Fix (typos) compile errors.
Date: Thu, 12 Aug 2010 16:22:00 -0000	[thread overview]
Message-ID: <m3tymz4x90.fsf@fleche.redhat.com> (raw)
In-Reply-To: <877hjwelec.fsf@ubuntu.com> (Dmitrijs Ledkovs's message of "Thu,	12 Aug 2010 03:15:39 +0300")

>>>>> "Dmitrijs" == Dmitrijs Ledkovs <dmitrij.ledkov@ubuntu.com> writes:

Dmitrijs> +  {
Dmitrijs> +      jstring oserr = JvNewStringLatin1 (strerror (errno));
Dmitrijs> +      throw new ::java::lang::UnsupportedOperationException
Dmitrijs> +         (JvNewStringLatin1 ("natGenerateSeed is not available for Win32 target.")->concat(oserr));
Dmitrijs> +  }


Andrew> OK.

Actually, I don't think this is ok.

Nothing sets errno here, so using it is incorrect.
And, even if it were correct, the error message would be formatted
strangely.

Based on the error messages, I think all that is needed here is the
addition of a "::" before "java".

Dmitrijs, could you test the appended?

Tom

Index: natVMSecureRandomWin32.cc
===================================================================
--- natVMSecureRandomWin32.cc	(revision 162345)
+++ natVMSecureRandomWin32.cc	(working copy)
@@ -1,6 +1,6 @@
 // natVMSecureRandomWin32.cc - Native part of VMSecureRandom class for Win32.
 
-/* Copyright (C) 2009 Free Software Foundation
+/* Copyright (C) 2009, 2010 Free Software Foundation
 
    This file is part of libgcj.
 
@@ -26,7 +26,7 @@
 gnu::java::security::jce::prng::VMSecureRandom::natGenerateSeed(jbyteArray byte_array, jint offset, jint length)
 {
   if (length != 0)
-    throw new java::lang::UnsupportedOperationException (
+    throw new ::java::lang::UnsupportedOperationException (
       JvNewStringLatin1 ("natGenerateSeed is not available for Win32 target."));
   return 0;
 }

  parent reply	other threads:[~2010-08-12 16:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-12  0:25 Dmitrijs Ledkovs
2010-08-12  8:59 ` Andrew Haley
2010-08-12 16:22 ` Tom Tromey [this message]
2010-08-12 17:20   ` Dmitrijs Ledkovs
2010-08-12 18:22     ` Tom Tromey

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=m3tymz4x90.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=dmitrij.ledkov@ubuntu.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=java-patches@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).