diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-08-15 02:05:20 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-08-15 02:05:20 +0000 |
commit | 438955efde680aba4f5ae4f0e7c521465205e073 (patch) | |
tree | 319cd7b56c19f3700a112b55799f4d5e15812baa /spec | |
parent | 36e41fd950dc119bd4ce3868d746cdaff43b4dda (diff) | |
download | ruby-438955efde680aba4f5ae4f0e7c521465205e073.tar.gz |
-Wsuggest-attribute=noreturn on io_spec_rb_io_wait_readable
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64367 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec')
-rw-r--r-- | spec/ruby/optional/capi/ext/io_spec.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/ruby/optional/capi/ext/io_spec.c b/spec/ruby/optional/capi/ext/io_spec.c index 1b47830fa4..2f86bf9f62 100644 --- a/spec/ruby/optional/capi/ext/io_spec.c +++ b/spec/ruby/optional/capi/ext/io_spec.c @@ -21,6 +21,7 @@ static int set_non_blocking(int fd) { int flags = 1; return ioctl(fd, FIOBIO, &flags); #else +# define SET_NON_BLOCKING_FAILS_ALWAYS 1 errno = ENOSYS; return -1; #endif @@ -137,6 +138,10 @@ VALUE io_spec_rb_io_taint_check(VALUE self, VALUE io) { #ifdef HAVE_RB_IO_WAIT_READABLE #define RB_IO_WAIT_READABLE_BUF 13 +#if SET_NON_BLOCKING_FAILS_ALWAYS +NORETURN(VALUE io_spec_rb_io_wait_readable(VALUE self, VALUE io, VALUE read_p)); +#endif + VALUE io_spec_rb_io_wait_readable(VALUE self, VALUE io, VALUE read_p) { int fd = io_spec_get_fd(io); char buf[RB_IO_WAIT_READABLE_BUF]; |