natPlainSocketImpl.cc (_Jv_recv): Added template parameter for `recv' return type.

* java/net/natPlainSocketImpl.cc (_Jv_recv): Added template
	parameter for `recv' return type.

From-SVN: r49345
This commit is contained in:
Tom Tromey 2002-01-30 22:22:36 +00:00 committed by Tom Tromey
parent b3de7ff371
commit 1b8337e7e1
2 changed files with 6 additions and 2 deletions

View File

@ -1,5 +1,8 @@
2002-01-30 Tom Tromey <tromey@redhat.com>
* java/net/natPlainSocketImpl.cc (_Jv_recv): Added template
parameter for `recv' return type.
* verify.cc (handle_ret_insn): Check for subroutine merge here...
(state::merge): ... not here.
(subr_entry_info): New structure.

View File

@ -71,9 +71,10 @@ _Jv_accept (int fd, struct sockaddr *addr, socklen_t *addrlen)
#endif
// A wrapper for recv so we don't have to do configure tests.
template <typename T_fd, typename T_buf, typename T_len, typename T_flags>
template <typename T_ret, typename T_fd, typename T_buf,
typename T_len, typename T_flags>
static inline ssize_t
_Jv_recv (ssize_t (*recv_func) (T_fd s, T_buf buf, T_len len, T_flags flags),
_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);