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: Tom Tromey <tromey at redhat dot com>
- To: Rainer Orth <ro at TechFak dot Uni-Bielefeld dot DE>
- Cc: java-patches at gcc dot gnu dot org
- Date: 18 Mar 2004 10:07:44 -0700
- 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>
- Reply-to: tromey at redhat dot com
>>>>> "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.
Tom