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