1 /* -*- buffer-read-only: t -*- vi: set ro: */
2 /* DO NOT EDIT! GENERATED AUTOMATICALLY! */
3 /* Create a named fifo.
4 Copyright (C) 2009-2011 Free Software Foundation, Inc.
6 This program is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>. */
19 /* written by Eric Blake */
29 /* Mingw lacks mkfifo; always fail with ENOSYS. */
32 mkfifo (char const *name _GL_UNUSED, mode_t mode _GL_UNUSED)
38 #else /* HAVE_MKFIFO */
42 /* Create a named fifo FILE, with access permissions in MODE. Work
43 around trailing slash bugs. */
46 rpl_mkfifo (char const *name, mode_t mode)
48 # if MKFIFO_TRAILING_SLASH_BUG
49 size_t len = strlen (name);
50 if (len && name[len - 1] == '/')
53 if (stat (name, &st) == 0)
58 return mkfifo (name, mode);
60 #endif /* HAVE_MKFIFO */