This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: 3.5 PATCH: Fix Tru64 UNIX V4.0F libjava bootstrap failure in natFileChannelPosix.cc
- From: Michael Koch <konqueror at gmx dot de>
- To: tromey at redhat dot com, Rainer Orth <ro at techfak dot uni-bielefeld dot de>
- Cc: java-patches at gcc dot gnu dot org, Per Bothner <per at bothner dot com>
- Date: Thu, 18 Mar 2004 18:35:14 +0100
- Subject: Re: 3.5 PATCH: Fix Tru64 UNIX V4.0F libjava bootstrap failure in natFileChannelPosix.cc
- References: <16472.36454.775067.486850@xayide.TechFak.Uni-Bielefeld.DE> <878yhy13tr.fsf@fleche.redhat.com>
Am Donnerstag, 18. März 2004 18:07 schrieb Tom Tromey:
> >>>>> "Rainer" == Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> writes:
>
> Rainer> * gnu/java/nio/channels/natFileChannelPosix.cc (mapImpl):
> Cast Rainer> MAP_FAILED to void *.
>
> Ok.
>
>
>
> Michael, question for you:
>
> Rainer> MappedByteBufferImpl *buf
> Rainer> = new MappedByteBufferImpl ((RawData *) ((char *) ptr +
> align), Rainer> size, mmode == 'r');
> Rainer> - if (ptr == MAP_FAILED)
> Rainer> + if (ptr == (void *) MAP_FAILED)
> Rainer> throw new IOException (JvNewStringLatin1 (strerror
> (errno))); Rainer> buf->implPtr = reinterpret_cast<RawData*>
> (ptr);
> Rainer> buf->implLen = size+align;
>
> ... why are we checking `ptr' after creating the new
> MappedByteBufferImpl? It seems more efficient and correct to check
> first.
That is Per's code. Her is probably a better person to ask.
Michael