mirror of
https://gcc.gnu.org/git/gcc.git
synced 2025-01-11 05:23:55 +08:00
natPlainSocketImpl.cc (_Jv_recv): Removed.
* java/net/natPlainSocketImpl.cc (_Jv_recv): Removed. (read): Call recv() directly, not _Jv_recv(). From-SVN: r50391
This commit is contained in:
parent
f2d1ae3879
commit
a72f7227af
@ -1,3 +1,8 @@
|
||||
2002-03-07 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
|
||||
|
||||
* java/net/natPlainSocketImpl.cc (_Jv_recv): Removed.
|
||||
(read): Call recv() directly, not _Jv_recv().
|
||||
|
||||
2002-03-06 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* java/io/natFileDescriptorEcos.cc (init): Don't use
|
||||
|
@ -72,15 +72,6 @@ _Jv_accept (int fd, struct sockaddr *addr, socklen_t *addrlen)
|
||||
#undef accept
|
||||
#endif
|
||||
|
||||
// A wrapper for recv so we don't have to do configure tests.
|
||||
template <typename T_ret, typename T_fd, typename T_buf,
|
||||
typename T_len, typename T_flags>
|
||||
static inline ssize_t
|
||||
_Jv_recv (T_ret (*recv_func) (T_fd s, T_buf buf, T_len len, T_flags flags),
|
||||
int s, void *buf, size_t len, int flags)
|
||||
{
|
||||
return recv_func ((T_fd) s, (T_buf) buf, (T_len) len, (T_flags) flags);
|
||||
}
|
||||
#endif /* DISABLE_JAVA_NET */
|
||||
|
||||
#include <gcj/cni.h>
|
||||
@ -551,7 +542,7 @@ java::net::PlainSocketImpl::read(jbyteArray buffer, jint offset, jint count)
|
||||
}
|
||||
}
|
||||
// Read the socket.
|
||||
int r = _Jv_recv (::recv, fnum, (void *) bytes, count, 0);
|
||||
int r = ::recv (fnum, (char *) bytes, count, 0);
|
||||
if (r == 0)
|
||||
return -1;
|
||||
if (java::lang::Thread::interrupted())
|
||||
|
Loading…
Reference in New Issue
Block a user