From 1b355863e42164110a074a9313966ffebf880fb7 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 4 Jan 2017 21:33:40 +0000 Subject: remove PIPE_BUF constant definition This was never in any released version of "sleepy_penguin", and the same information may be queried via the 'etc' extension since Ruby 2.2: require 'etc' IO.pipe { |r, w| w.pathconf(Etc::PC_PIPE_BUF) } --- ext/sleepy_penguin/splice.c | 8 -------- test/test_splice.rb | 1 - 2 files changed, 9 deletions(-) diff --git a/ext/sleepy_penguin/splice.c b/ext/sleepy_penguin/splice.c index 0000244..d291796 100644 --- a/ext/sleepy_penguin/splice.c +++ b/ext/sleepy_penguin/splice.c @@ -5,7 +5,6 @@ #include #include #include -#include #include static VALUE sym_EAGAIN; @@ -146,13 +145,6 @@ void sleepy_penguin_init_splice(void) */ rb_define_const(mod, "F_MORE", UINT2NUM(SPLICE_F_MORE)); - /* - * The maximum size of an atomic write to a pipe - * POSIX requires this to be at least 512 bytes. - * Under Linux, this is 4096 bytes. - */ - rb_define_const(mod, "PIPE_BUF", UINT2NUM(PIPE_BUF)); - /* * fcntl() command constant used to return the size of a pipe. * This constant is only defined when running Linux 2.6.35 diff --git a/test/test_splice.rb b/test/test_splice.rb index 71e0117..3650ee3 100644 --- a/test/test_splice.rb +++ b/test/test_splice.rb @@ -245,7 +245,6 @@ class TestSplice < Test::Unit::TestCase end def test_constants - assert SleepyPenguin::PIPE_BUF > 0 %w(move nonblock more).each { |x| assert Integer === SleepyPenguin.const_get("F_#{x.upcase}") } -- cgit v1.2.3-24-ge0c7