public inbox for java-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Dmitrijs Ledkovs <dmitrij.ledkov@ubuntu.com>
To: Tom Tromey <tromey@redhat.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 17:20:00 -0000	[thread overview]
Message-ID: <87ocd74ukg.fsf@ubuntu.com> (raw)
In-Reply-To: <m3tymz4x90.fsf@fleche.redhat.com> (Tom Tromey's message of "Thu,	12 Aug 2010 10:22:03 -0600")

Tom Tromey <tromey@redhat.com> writes:

>>>>>> "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.
>

I was just copying from the natVMSecureRandomPosix.cc

> 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?
>

Works fine with target i686-w64-mingw32. Please apply.

> 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;
>  }

  reply	other threads:[~2010-08-12 17:20 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
2010-08-12 17:20   ` Dmitrijs Ledkovs [this message]
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=87ocd74ukg.fsf@ubuntu.com \
    --to=dmitrij.ledkov@ubuntu.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=java-patches@gcc.gnu.org \
    --cc=tromey@redhat.com \
    /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).