aboutsummaryrefslogtreecommitdiffstats
path: root/ports/darwin/wrapfuncs.in
blob: 39d9893826b6be1494568e41f2f35544cdbb08bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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 */