diff options
author | Jim Meyering <meyering@redhat.com> | 2008-04-02 13:52:04 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2008-04-02 18:22:59 +0200 |
commit | f3653f0d204a07d80444c261126360901b849e37 (patch) | |
tree | 56a40253f27783bf6aecc0a20a7c2bb6e81b8d81 | |
parent | 184a0298f345a82f484d5281ee14217513703cc1 (diff) | |
download | coreutils-f3653f0d204a07d80444c261126360901b849e37.tar.xz |
copy.c: remove an in-function #ifdef
* src/copy.c (rpl_mkfifo) [! HAVE_MKFIFO]: New function.
(mkfifo) [! HAVE_MKFIFO]: Define to rpl_mkfifo.
(copy_internal): Remove #ifdef.
Signed-off-by: Jim Meyering <meyering@redhat.com>
-rw-r--r-- | src/copy.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/copy.c b/src/copy.c index 208a67413..4e38e0021 100644 --- a/src/copy.c +++ b/src/copy.c @@ -65,6 +65,16 @@ # define lchown(name, uid, gid) chown (name, uid, gid) #endif +#ifndef HAVE_MKFIFO +static int +rpl_mkfifo (char const *file, mode_t mode) +{ + errno = ENOTSUP; + return -1; +} +#define mkfifo rpl_mkfifo +#endif + #ifndef USE_ACL # define USE_ACL 0 #endif @@ -1828,9 +1838,7 @@ copy_internal (char const *src_name, char const *dst_name, does not. But fall back on mkfifo, because on some BSD systems, mknod always fails when asked to create a FIFO. */ if (mknod (dst_name, src_mode & ~omitted_permissions, 0) != 0) -#if HAVE_MKFIFO if (mkfifo (dst_name, src_mode & ~S_IFIFO & ~omitted_permissions) != 0) -#endif { error (0, errno, _("cannot create fifo %s"), quote (dst_name)); goto un_backup; |