1 /* 2 * Copyright 2005-2011, Ingo Weinhold, ingo_weinhold@gmx.de. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef REMAPPED_FUNCTIONS_H 6 #define REMAPPED_FUNCTIONS_H 7 8 9 #ifdef __cplusplus 10 extern "C" { 11 #endif 12 13 int _haiku_build_fchmod(int fd, mode_t mode); 14 int _haiku_build_fchmodat(int fd, const char* path, mode_t mode, int flag); 15 int _haiku_build_fstat(int fd, struct stat* st); 16 int _haiku_build_fstatat(int fd, const char* path, struct stat* st, 17 int flag); 18 int _haiku_build_mkdirat(int fd, const char* path, mode_t mode); 19 int _haiku_build_mkfifoat(int fd, const char* path, mode_t mode); 20 int _haiku_build_utimensat(int fd, const char* path, 21 const struct timespec times[2], int flag); 22 int _haiku_build_futimens(int fd, const struct timespec times[2]); 23 int _haiku_build_faccessat(int fd, const char* path, int accessMode, 24 int flag); 25 int _haiku_build_fchdir(int fd); 26 int _haiku_build_close(int fd); 27 int _haiku_build_dup(int fd); 28 int _haiku_build_dup2(int fd1, int fd2); 29 int _haiku_build_linkat(int toFD, const char* toPath, int pathFD, 30 const char* path, int flag); 31 int _haiku_build_unlinkat(int fd, const char* path, int flag); 32 ssize_t _haiku_build_readlinkat(int fd, const char* path, char* buffer, 33 size_t bufferSize); 34 int _haiku_build_symlinkat(const char* toPath, int fd, 35 const char* symlinkPath); 36 int _haiku_build_ftruncate(int fd, off_t newSize); 37 int _haiku_build_fchown(int fd, uid_t owner, gid_t group); 38 int _haiku_build_fchownat(int fd, const char* path, uid_t owner, 39 gid_t group, int flag); 40 int _haiku_build_mknodat(int fd, const char* name, mode_t mode, dev_t dev); 41 int _haiku_build_creat(const char* path, mode_t mode); 42 int _haiku_build_open(const char* path, int openMode, mode_t permissions); 43 int _haiku_build_openat(int fd, const char* path, int openMode, 44 mode_t permissions); 45 int _haiku_build_fcntl(int fd, int op, int argument); 46 int _haiku_build_renameat(int fromFD, const char* from, int toFD, 47 const char* to); 48 49 #ifdef HAIKU_HOST_PLATFORM_HAIKU 50 51 ssize_t _haiku_build_fs_read_attr(int fd, const char *attribute, uint32 type, 52 off_t pos, void *buffer, size_t readBytes); 53 ssize_t _haiku_build_fs_write_attr(int fd, const char *attribute, uint32 type, 54 off_t pos, const void *buffer, size_t readBytes); 55 int _haiku_build_fs_remove_attr(int fd, const char *attribute); 56 int _haiku_build_fs_stat_attr(int fd, const char *attribute, 57 struct attr_info *attrInfo); 58 59 int _haiku_build_fs_open_attr(const char *path, const char *attribute, 60 uint32 type, int openMode); 61 int _haiku_build_fs_fopen_attr(int fd, const char *attribute, uint32 type, 62 int openMode); 63 int _haiku_build_fs_close_attr(int fd); 64 65 void *_haiku_build_fs_open_attr_dir(const char *path); 66 void *_haiku_build_fs_lopen_attr_dir(const char *path); 67 void *_haiku_build_fs_fopen_attr_dir(int fd); 68 int _haiku_build_fs_close_attr_dir(void *dir); 69 void *_haiku_build_fs_read_attr_dir(void *dir); 70 void _haiku_build_fs_rewind_attr_dir(void *dir); 71 72 #endif 73 74 #ifdef __cplusplus 75 } // extern "C" 76 #endif 77 78 79 #endif // REMAPPED_FUNCTIONS_H 80