summaryrefslogtreecommitdiff
path: root/ext/socket/rubysocket.h
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-01-04 10:13:36 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-01-04 10:13:36 +0000
commita3f2fe4e4def0d9e616b0107bf619e3eaf0d788a (patch)
tree61419650bcf504baf8383e62f6b9dae7e7df3dc6 /ext/socket/rubysocket.h
parentde7e488b08ab980db10d21d32b12899f614baf75 (diff)
socket.c: use rb_syserr_fail
* ext/socket/socket.c (rsock_syserr_fail_host_port): add errno argument version anduse rb_syserr_fail_str() instead of rb_sys_fail_str() with restoring errno. * ext/socket/socket.c (rsock_syserr_fail_path): ditto, and rb_syserr_fail(). * ext/socket/socket.c (rsock_sys_fail_sockaddr): ditto, use rsock_syserr_fail_raddrinfo(). * ext/socket/socket.c (rsock_sys_fail_raddrinfo): ditto. * ext/socket/socket.c (setup_domain_and_type): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket/rubysocket.h')
-rw-r--r--ext/socket/rubysocket.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/socket/rubysocket.h b/ext/socket/rubysocket.h
index 97c02fc..c74fb32 100644
--- a/ext/socket/rubysocket.h
+++ b/ext/socket/rubysocket.h
@@ -374,6 +374,12 @@ void rsock_init_sockopt(void);
void rsock_init_sockifaddr(void);
void rsock_init_socket_init(void);
+NORETURN(void rsock_syserr_fail_host_port(int err, const char *, VALUE, VALUE));
+NORETURN(void rsock_syserr_fail_path(int err, const char *, VALUE));
+NORETURN(void rsock_syserr_fail_sockaddr(int err, const char *mesg, struct sockaddr *addr, socklen_t len));
+NORETURN(void rsock_syserr_fail_raddrinfo(int err, const char *mesg, VALUE rai));
+NORETURN(void rsock_syserr_fail_raddrinfo_or_sockaddr(int err, const char *mesg, VALUE addr, VALUE rai));
+
NORETURN(void rsock_sys_fail_host_port(const char *, VALUE, VALUE));
NORETURN(void rsock_sys_fail_path(const char *, VALUE));
NORETURN(void rsock_sys_fail_sockaddr(const char *, struct sockaddr *addr, socklen_t len));