[前][次][番号順一覧][スレッド一覧]

ruby-changes:70886

From: David <ko1@a...>
Date: Sat, 15 Jan 2022 18:56:28 +0900 (JST)
Subject: [ruby-changes:70886] 670f3e6cd7 (master): [ruby/fcntl] adding few FreeBSD specific flags.

https://git.ruby-lang.org/ruby.git/commit/?id=670f3e6cd7

From 670f3e6cd7b6ea03810af3606139021471019017 Mon Sep 17 00:00:00 2001
From: David CARLIER <devnexen@g...>
Date: Sat, 15 Jan 2022 05:25:35 +0000
Subject: [ruby/fcntl] adding few FreeBSD specific flags.

https://github.com/ruby/fcntl/commit/03d9a7937d
---
 ext/fcntl/fcntl.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/ext/fcntl/fcntl.c b/ext/fcntl/fcntl.c
index ee42d2abe5e..3bccc41e4c4 100644
--- a/ext/fcntl/fcntl.c
+++ b/ext/fcntl/fcntl.c
@@ -256,4 +256,21 @@ Init_fcntl(void) https://github.com/ruby/ruby/blob/trunk/ext/fcntl/fcntl.c#L256
      */
     rb_define_const(mFcntl, "O_ACCMODE", INT2FIX(O_RDONLY | O_WRONLY | O_RDWR));
 #endif
+#ifdef F_DUP2FD
+    /* Document-const: F_DUP2FD
+     *
+     * It is a FreeBSD specific constant and equivalent
+     * to dup2 call.
+     */
+    rb_define_const(mFcntl, "F_DUP2FD", INT2NUM(F_DUP2FD));
+#endif
+#ifdef F_DUP2FD_CLOEXEC
+    /* Document-const: F_DUP2FD_CLOEXEC
+     *
+     * It is a FreeBSD specific constant and acts
+     * similarly as F_DUP2FD but set the FD_CLOEXEC
+     * flag in addition.
+     */
+    rb_define_const(mFcntl, "F_DUP2FD_CLOEXEC", INT2NUM(F_DUP2FD_CLOEXEC));
+#endif
 }
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]