/* ** 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 access(const char *path, int accessMode) { status_t status = _kern_access(path, accessMode); RETURN_AND_SET_ERRNO(status); }