From 30187cf93ff470bf1ef0bfc56418e058fcd1a791 Mon Sep 17 00:00:00 2001 From: mainzelm Date: Thu, 10 Jan 2002 10:08:14 +0000 Subject: [PATCH] Replace s48_raise_string_os_error by s48_raise_string_os_error_X for compatibility with import-os-error. --- scsh/network1.c | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/scsh/network1.c b/scsh/network1.c index 2472c80..4662857 100644 --- a/scsh/network1.c +++ b/scsh/network1.c @@ -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();