Moved the POSIX *at() functions and AT_* macros out of the default namespace
as long as the full set hasn't been implemented. They are guarded by the B_ENABLE_INCOMPLETE_POSIX_AT_SUPPORT macro until then. Fixes the build. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33990 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
b299a6e9d3
commit
db2b554fa3
@ -64,11 +64,13 @@
|
||||
#define O_SHLOCK 0x01000000 /* obtain shared lock */
|
||||
#define O_EXLOCK 0x02000000 /* obtain exclusive lock */
|
||||
|
||||
#ifdef B_ENABLE_INCOMPLETE_POSIX_AT_SUPPORT
|
||||
#define AT_FDCWD (-1) /* CWD FD for the *at() functions */
|
||||
|
||||
#define AT_SYMLINK_NOFOLLOW 0x1 /* fstatat(), fchmodat(), fchownat(),
|
||||
utimensat() */
|
||||
#define AT_SYMLINK_FOLLOW 0x2 /* linkat() */
|
||||
#endif
|
||||
|
||||
/* advisory file locking */
|
||||
|
||||
@ -89,7 +91,9 @@ extern int creat(const char *path, mode_t mode);
|
||||
extern int open(const char *path, int openMode, ...);
|
||||
/* the third argument is the permissions of the created file when O_CREAT
|
||||
is passed in oflags */
|
||||
#ifdef B_ENABLE_INCOMPLETE_POSIX_AT_SUPPORT
|
||||
extern int openat(int fd, const char *path, int openMode, ...);
|
||||
#endif
|
||||
|
||||
extern int fcntl(int fd, int op, ...);
|
||||
|
||||
|
@ -110,7 +110,9 @@ extern int fchmod(int fd, mode_t mode);
|
||||
extern int stat(const char *path, struct stat *st);
|
||||
extern int fstat(int fd, struct stat *st);
|
||||
extern int lstat(const char *path, struct stat *st);
|
||||
#ifdef B_ENABLE_INCOMPLETE_POSIX_AT_SUPPORT
|
||||
extern int fstatat(int fd, const char *path, struct stat *st, int flag);
|
||||
#endif
|
||||
extern int mkdir(const char *path, mode_t mode);
|
||||
extern int mkfifo(const char *path, mode_t mode);
|
||||
extern mode_t umask(mode_t cmask);
|
||||
|
@ -138,8 +138,10 @@ extern int unlink(const char *name);
|
||||
extern int rmdir(const char *path);
|
||||
|
||||
extern ssize_t readlink(const char *path, char *buffer, size_t bufferSize);
|
||||
#ifdef B_ENABLE_INCOMPLETE_POSIX_AT_SUPPORT
|
||||
extern ssize_t readlinkat(int fd, const char *path, char *buffer,
|
||||
size_t bufferSize);
|
||||
#endif
|
||||
extern int symlink(const char *from, const char *to);
|
||||
|
||||
extern int ftruncate(int fd, off_t newSize);
|
||||
|
@ -7,6 +7,9 @@
|
||||
*/
|
||||
|
||||
|
||||
#define B_ENABLE_INCOMPLETE_POSIX_AT_SUPPORT 1
|
||||
// make the *at() functions and AT_* macros visible
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
|
@ -4,6 +4,9 @@
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
#define B_ENABLE_INCOMPLETE_POSIX_AT_SUPPORT 1
|
||||
// make the *at() functions and AT_* macros visible
|
||||
|
||||
#include <syscalls.h>
|
||||
|
||||
#include <sys/stat.h>
|
||||
|
@ -4,6 +4,9 @@
|
||||
*/
|
||||
|
||||
|
||||
#define B_ENABLE_INCOMPLETE_POSIX_AT_SUPPORT 1
|
||||
// make the *at() functions and AT_* macros visible
|
||||
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <syscalls.h>
|
||||
|
Loading…
Reference in New Issue
Block a user