/* ** Copyright 2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved. ** Distributed under the terms of the Haiku License. */ #include #include #include #define RETURN_AND_SET_ERRNO(err) \ if (err < 0) { \ errno = err; \ return -1; \ } \ return err; int mkfifo(const char *path, mode_t mode) { status_t error = _kern_create_fifo(path, mode); RETURN_AND_SET_ERRNO(error); }