aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpavel <pavel.rosicky@easy.cz>2020-02-17 18:34:21 +0100
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2020-06-09 21:13:34 +0900
commit31419f46fcfa754428ba7526ee7c300c8a28670a (patch)
tree0160209103ba72db20143155a44484595aabd786
parentbee63ab97a29ecf951d42c5c85d7e0383e170a99 (diff)
downloadruby-31419f46fcfa754428ba7526ee7c300c8a28670a.tar.gz
[ruby/fcntl] add F_GETPIPE_SZ and F_SETPIPE_SZ
https://github.com/ruby/fcntl/commit/39e0faedc5
-rw-r--r--ext/fcntl/fcntl.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/ext/fcntl/fcntl.c b/ext/fcntl/fcntl.c
index c93694c431..ee42d2abe5 100644
--- a/ext/fcntl/fcntl.c
+++ b/ext/fcntl/fcntl.c
@@ -159,6 +159,20 @@ Init_fcntl(void)
*/
rb_define_const(mFcntl, "F_WRLCK", INT2NUM(F_WRLCK));
#endif
+#ifdef F_SETPIPE_SZ
+ /* Document-const: F_SETPIPE_SZ
+ *
+ * Change the capacity of the pipe referred to by fd to be at least arg bytes.
+ */
+ rb_define_const(mFcntl, "F_SETPIPE_SZ", INT2NUM(F_SETPIPE_SZ));
+#endif
+#ifdef F_GETPIPE_SZ
+ /* Document-const: F_GETPIPE_SZ
+ *
+ * Return (as the function result) the capacity of the pipe referred to by fd.
+ */
+ rb_define_const(mFcntl, "F_GETPIPE_SZ", INT2NUM(F_GETPIPE_SZ));
+#endif
#ifdef O_CREAT
/* Document-const: O_CREAT
*