summaryrefslogtreecommitdiff
path: root/ext/socket/unixsocket.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-04-18 14:10:06 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-04-18 14:10:06 +0000
commit05a278b4cdc8456580e51055ccb89fe4d1cd46ed (patch)
treebe02312738c84536b2ab08ccadbbec3c031fff76 /ext/socket/unixsocket.c
parentbe2d3f5979f10cd06f6d1512ee367b2ec43ef315 (diff)
* ext/readline/readline.c: use rb_f_notimplement for methods not
implemented. * ext/openssl/ossl_engine.c: ditto. * ext/openssl/ossl_config.c: ditto. * ext/openssl/ossl_cipher.c: ditto. * ext/openssl/ossl_pkcs5.c: ditto. * ext/openssl/ossl_x509ext.c: ditto. * ext/socket/socket.c: ditto. * ext/socket/basicsocket.c: ditto. * ext/socket/ancdata.c: ditto. * ext/socket/unixsocket.c: ditto. * ext/iconv/iconv.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23204 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket/unixsocket.c')
-rw-r--r--ext/socket/unixsocket.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/ext/socket/unixsocket.c b/ext/socket/unixsocket.c
index d3ebbf3..df1a11d 100644
--- a/ext/socket/unixsocket.c
+++ b/ext/socket/unixsocket.c
@@ -171,6 +171,7 @@ sendmsg_blocking(void *data)
return sendmsg(arg->fd, &arg->msg, 0);
}
+#if defined(HAVE_SENDMSG) && (FD_PASSING_BY_MSG_CONTROL || FD_PASSING_BY_MSG_ACCRIGHTS)
/*
* call-seq:
* unixsocket.send_io(io) => nil
@@ -190,7 +191,6 @@ sendmsg_blocking(void *data)
static VALUE
unix_send_io(VALUE sock, VALUE val)
{
-#if defined(HAVE_SENDMSG) && (FD_PASSING_BY_MSG_CONTROL || FD_PASSING_BY_MSG_ACCRIGHTS)
int fd;
rb_io_t *fptr;
struct iomsg_arg arg;
@@ -248,11 +248,10 @@ unix_send_io(VALUE sock, VALUE val)
rb_sys_fail("sendmsg(2)");
return Qnil;
+}
#else
- rb_notimplement();
- return Qnil; /* not reached */
+#define unix_send_io rb_f_notimplement
#endif
-}
static VALUE
recvmsg_blocking(void *data)
@@ -261,6 +260,7 @@ recvmsg_blocking(void *data)
return recvmsg(arg->fd, &arg->msg, 0);
}
+#if defined(HAVE_RECVMSG) && (FD_PASSING_BY_MSG_CONTROL || FD_PASSING_BY_MSG_ACCRIGHTS)
/*
* call-seq:
* unixsocket.recv_io([klass [, mode]]) => io
@@ -283,7 +283,6 @@ recvmsg_blocking(void *data)
static VALUE
unix_recv_io(int argc, VALUE *argv, VALUE sock)
{
-#if defined(HAVE_RECVMSG) && (FD_PASSING_BY_MSG_CONTROL || FD_PASSING_BY_MSG_ACCRIGHTS)
VALUE klass, mode;
rb_io_t *fptr;
struct iomsg_arg arg;
@@ -390,11 +389,10 @@ unix_recv_io(int argc, VALUE *argv, VALUE sock)
ff_argv[1] = mode;
return rb_funcall2(klass, for_fd, ff_argc, ff_argv);
}
+}
#else
- rb_notimplement();
- return Qnil; /* not reached */
+#define unix_recv_io rb_f_notimplement
#endif
-}
/*
* call-seq: