diff options
Diffstat (limited to 'ports/darwin/wrapfuncs.in')
-rw-r--r-- | ports/darwin/wrapfuncs.in | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/ports/darwin/wrapfuncs.in b/ports/darwin/wrapfuncs.in new file mode 100644 index 0000000..39d9893 --- /dev/null +++ b/ports/darwin/wrapfuncs.in @@ -0,0 +1,25 @@ +# On Darwin, mode_t promotes to int, so you have to use int for va_arg +int open(const char *path, int flags, ...{int mode}); /* flags=0 */ +int stat(const char *path, struct stat *buf); /* inode64=1 */ +int lstat(const char *path, struct stat *buf); /* flags=AT_SYMLINK_NOFOLLOW, inode64=1 */ +int fstat(int fd, struct stat *buf); /* inode64=1 */ +int fcntl(int fd, int cmd, ...{struct flock *lock}); +# just so we know the inums of symlinks +# for emulation of passwd utilities +int getgrouplist(const char *user, gid_t group, gid_t *groups, int *ngroups); +# we use "pathname" to avoid canonicalizing paths, because these functions are +# unimplemented +ssize_t getxattr(const char *pathname, const char *name, void *value, size_t size, u_int32_t position, int options); +ssize_t fgetxattr(int filedes, const char *name, void *value, size_t size, u_int32_t position, int options); +ssize_t listxattr(const char *pathname, char *list, size_t size, int options); +ssize_t flistxattr(int filedes, char *list, size_t size, int options); +int setxattr(const char *pathname, const char *name, const void *value, size_t size, u_int32_t position, int options); +int fsetxattr(int filedes, const char *name, const void *value, size_t size, u_int32_t position, int options); +# local color UIDs +int getgrouplist(const char *name, int basegid, int *groups, int *ngroups); +int scandir(const char *path, struct dirent ***namelist, int (*filter)(struct dirent *), int (*compar)()); +int getgroups(int size, gid_t *list); +int fgetgrent_r(FILE *fp, struct group *gbuf, char *buf, size_t buflen, struct group **gbufp); /* real_func=pseudo_fgetgrent_r */ +int fgetpwent_r(FILE *fp, struct passwd *pbuf, char *buf, size_t buflen, struct passwd **pbufp); /* real_func=pseudo_fgetpwent_r */ +int getpwent_r(struct passwd *pwbuf, char *buf, size_t buflen, struct passwd **pwbufp); /* real_func=pseudo_getpwent_r */ +int getgrent_r(struct group *gbuf, char *buf, size_t buflen, struct group **gbufp); /* real_func=pseudo_getgrent_r */ |