]> Savannah Git Hosting - gnulib.git/commit
dup, dup2, fcntl: support a directory fd on OS/2 kLIBC
authorKO Myung-Hun <komh78@gmail.com>
Thu, 14 Jan 2016 02:23:47 +0000 (11:23 +0900)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 15 Jan 2016 00:45:38 +0000 (16:45 -0800)
commitc7e1cc415cd60f989fc75b99596e3bd656d3004e
tree0410bcb7a34539d6aaab79772cf9cf9e75ab122e
parentcb05f28617541bcc4bf800d7c9567107f1603c29
dup, dup2, fcntl: support a directory fd on OS/2 kLIBC

On OS/2 kLIBC, dup(), dup2() and fcntl() do not work on a directory
fd.

* lib/dup.c (dup_nothrow): New.
* lib/dup2.c (klibc_dup2dirfd): New. dup2() for a directory fd.
(klibc_dup2): New.
* lib/fcntl.c (klibc_fcntl): New.
* m4/dup.m4 (gl_FUNC_DUP): Check if dup() works on a directory fd.
* m4/dup2.m4 (gl_FUNC_DUP2): Check if dup2() works on a directory fd.
* m4/fcntl.m4 (gl_FUNC_FCNTL): Check if F_DUPFD works on a directory
fd.
lib/dup.c
lib/dup2.c
lib/fcntl.c
m4/dup.m4
m4/dup2.m4
m4/fcntl.m4