This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: 3.5 PATCH: Fix Tru64 UNIX V4.0F libjava bootstrap failure in natFileChannelPosix.cc


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]