From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23183 invoked by alias); 18 Jul 2009 19:09:05 -0000 Received: (qmail 23166 invoked by uid 22791); 18 Jul 2009 19:09:04 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 18 Jul 2009 19:08:57 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n6IJ8te4017046; Sat, 18 Jul 2009 15:08:55 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n6IJ8s6D012868; Sat, 18 Jul 2009 15:08:54 -0400 Received: from pearl.pink (vpn-12-54.rdu.redhat.com [10.11.12.54]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n6IJ8qSL007652; Sat, 18 Jul 2009 15:08:52 -0400 Message-ID: <4A621DC3.9080403@redhat.com> Date: Sat, 18 Jul 2009 19:09:00 -0000 From: Andrew Haley User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1b3pre) Gecko/20090513 Fedora/3.0-2.3.beta2.fc11 Thunderbird/3.0b2 MIME-Version: 1.0 To: Dave Korn CC: Kai Tietz , gcc@gcc.gnu.org, java@gcc.gnu.org Subject: Re: RFA: libjava seems to miss some files for win32 References: <90baa01f0907180506h1a58152du5d45d66628043ad9@mail.gmail.com> <4A61D6D6.7030707@gmail.com> <90baa01f0907180901o4dc45cedx795f9cf5650af5ca@mail.gmail.com> <4A6204A3.6040704@gmail.com> <90baa01f0907181027q47631936ib9fd57b733586ce4@mail.gmail.com> <4A621422.502@gmail.com> In-Reply-To: <4A621422.502@gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2009-07/txt/msg00351.txt.bz2 On 07/18/2009 07:27 PM, Dave Korn wrote: > Kai Tietz wrote: > >> Yes, I agree to this as I said in the patch post. Can we assume that >> any win32 target has a working wincrypt.h file? > > Hmmm... it is supported since win2k. I imagine DGJPP runs on 9x targets, > and believe it or not there are still some Cygwin users on NT4. I would think > it needs an autoconf test, and on platforms that don't support CryptoAPI it > should probably throw an exception to indicate 'not implemented' rather than > (e.g.) fall back to rand(), but that's a policy decision for the Java > maintainers really. Either this is a cryptographically strong random number or it must throw NotImplemented. >> I just suggested this patch, to have at least an implementation here >> for win32 for further improvement (Btw I missed in my initial patch to >> include explicit here, too). >> I am just running through libjava for an initial port for x64 windows. >> There are a lot of assumptions about sizeof (long) == sizeof (void*), >> but the worse thing I see is the casting of HANDLE values to jint. For >> x86 this is fine, but for x64 this can lead to serious troubles. > > Ouch, yes! You'll probably be best off replacing those with something based > on uintptr_t, which may or may not have a j* equivalent already. Don't use uintptr_t, use unsigned int __attribute__((mode(PTR)). This is built-in to gcc, not a dependency on the host libc which might not be c99.. Andrew.