This is the mail archive of the java@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: libjava bootstrap failure on irix6.5


>>>>> "Rainer" == Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> writes:

Rainer> The problem is that IRIX 6.5.17 and 6.5.18 introduced a
Rainer> definition of socklen_t in <sys/socket.h>.  libjava assumes
Rainer> that if socklen_t is defined, it can be used e.g. as the type
Rainer> of accept's last arg.

Has this been fixed in fixincludes yet?
I assume not since PR 9652 is still open.

Is the accept() bit the only problem?  We can fix that quite easily
with a template.  Try putting something like the appended code
(untested -- you'll have to clean up) in libjava/include/posix.h.

We already use this idiom in other places.  One more use is no big
deal.

Tom


template<typename T>
inline int
_Jv_accept_adaptor (int (*acceptor) (int fd, struct sockaddr *addr,
				     T *addrlen),
		    int fd, struct sockaddr *addr, socklet_t *addrlen)
{
  T wraplen = (T) *addrlen;
  int result = (*acceptor) (fd, addr, &wraplen);
  *addrlen = (socklet_t) wraplen;
  return result;
}

inline int
_Jv_accept (int fd, struct sockaddr *addr, socklen_t *addrlen)
{
  return _Jv_accept_adaptor (::accept, fd, addr, addrlen);
}


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