Replace s48_raise_string_os_error by s48_raise_string_os_error_X
for compatibility with import-os-error.
This commit is contained in:
parent
978f8a71eb
commit
30187cf93f
|
@ -51,7 +51,7 @@ s48_value scheme_bind(s48_value sock, s48_value family, s48_value scheme_name)
|
|||
scheme_length); /* copy to c string */
|
||||
name.sun_path[scheme_length]='\0'; /* add null */
|
||||
if ( bind(sockfd,(struct sockaddr *)&name,sizeof(name)) < 0)
|
||||
s48_raise_os_error (errno);
|
||||
s48_raise_os_error_3 (errno, sock, family, scheme_name);
|
||||
return S48_UNSPECIFIC;
|
||||
}
|
||||
case AF_INET:
|
||||
|
@ -65,7 +65,7 @@ s48_value scheme_bind(s48_value sock, s48_value family, s48_value scheme_name)
|
|||
name.sin_addr.s_addr=addr;
|
||||
name.sin_port=port;
|
||||
if (bind(sockfd,(struct sockaddr *)&name,sizeof(name)) < 0)
|
||||
s48_raise_os_error (errno);
|
||||
s48_raise_os_error_3(errno, sock, family, scheme_name);
|
||||
|
||||
return S48_UNSPECIFIC;
|
||||
}
|
||||
|
@ -101,7 +101,7 @@ s48_value scheme_connect(s48_value sock, s48_value family, s48_value scheme_name
|
|||
|
||||
if (errno != EWOULDBLOCK && errno != EINTR && errno != EALREADY
|
||||
&& errno != EINPROGRESS && errno != EAGAIN)
|
||||
s48_raise_os_error(errno);
|
||||
s48_raise_os_error_3(errno, sock, family, scheme_name);
|
||||
|
||||
if (! (s48_add_pending_fd(sockfd, 0)))
|
||||
s48_raise_out_of_memory_error();
|
||||
|
@ -129,7 +129,7 @@ s48_value scheme_connect(s48_value sock, s48_value family, s48_value scheme_name
|
|||
|
||||
if (errno != EWOULDBLOCK && errno != EINTR && errno != EALREADY
|
||||
&& errno != EINPROGRESS && errno != EAGAIN)
|
||||
s48_raise_os_error(errno);
|
||||
s48_raise_os_error_3(errno, sock, family, scheme_name);
|
||||
|
||||
if (! (s48_add_pending_fd(sockfd, 0)))
|
||||
s48_raise_out_of_memory_error();
|
||||
|
@ -168,7 +168,7 @@ s48_value scheme_accept(s48_value sockfd_tagged, s48_value family)
|
|||
if (newsockfd < 0)
|
||||
{
|
||||
if ((errno != EWOULDBLOCK) && (errno != EINTR) && (errno != EAGAIN))
|
||||
s48_raise_os_error(errno);
|
||||
s48_raise_os_error_2(errno, sockfd_tagged, family);
|
||||
if (! s48_add_pending_fd(sockfd, 1))// 1 for is_input
|
||||
s48_raise_out_of_memory_error();
|
||||
return S48_FALSE;
|
||||
|
@ -190,7 +190,7 @@ s48_value scheme_accept(s48_value sockfd_tagged, s48_value family)
|
|||
if (newsockfd < 0)
|
||||
{
|
||||
if ((errno != EWOULDBLOCK) && (errno != EINTR) && (errno != EAGAIN))
|
||||
s48_raise_os_error(errno);
|
||||
s48_raise_os_error_2(errno, sockfd_tagged, family);
|
||||
if (! s48_add_pending_fd(sockfd, 1))// 1 for is_input
|
||||
s48_raise_out_of_memory_error();
|
||||
return S48_FALSE;
|
||||
|
@ -236,7 +236,7 @@ s48_value scheme_peer_name(s48_value sock, s48_value family)
|
|||
socklen_t namelen=sizeof(name);
|
||||
int value=getpeername(sockfd,(struct sockaddr *)&name,&namelen);
|
||||
|
||||
if (value < 0) s48_raise_os_error (errno);
|
||||
if (value < 0) s48_raise_os_error_2(errno, sock, family);
|
||||
|
||||
return (make_addr (name.sin_addr.s_addr, name.sin_port));
|
||||
break;
|
||||
|
@ -267,7 +267,7 @@ s48_value scheme_socket_name(s48_value sock, s48_value family)
|
|||
socklen_t namelen=sizeof(name);
|
||||
int value=getsockname(sockfd,(struct sockaddr *)&name,&namelen);
|
||||
|
||||
if (value < 0) s48_raise_os_error (errno);
|
||||
if (value < 0) s48_raise_os_error_2(errno, sock, family);
|
||||
|
||||
return(make_addr (name.sin_addr.s_addr,
|
||||
name.sin_port));
|
||||
|
@ -315,7 +315,7 @@ recv_substring(s48_value scm_sockfd, s48_value flags, s48_value buf,
|
|||
|
||||
|
||||
if ((errno != EWOULDBLOCK) && (errno != EINTR) && (errno != EAGAIN))
|
||||
s48_raise_os_error(errno);
|
||||
s48_raise_os_error_5(errno, scm_sockfd, flags, buf, scm_start, scm_end);
|
||||
if (! s48_add_pending_fd(sockfd, 1))// 1 for is_input
|
||||
s48_raise_out_of_memory_error();
|
||||
return S48_FALSE;
|
||||
|
@ -391,7 +391,14 @@ s48_value send_substring(s48_value scm_sockfd,
|
|||
return s48_enter_fixnum (n);
|
||||
|
||||
if ((errno != EWOULDBLOCK) && (errno != EINTR) && (errno != EAGAIN))
|
||||
s48_raise_os_error(errno);
|
||||
s48_raise_os_error_7(errno,
|
||||
scm_sockfd,
|
||||
scm_flags,
|
||||
buf,
|
||||
scm_start,
|
||||
scm_end,
|
||||
scm_family,
|
||||
scheme_name);
|
||||
|
||||
if (! s48_add_pending_fd(s, 0))// 0 for is_input
|
||||
s48_raise_out_of_memory_error();
|
||||
|
|
Loading…
Reference in New Issue