diff options
author | Philip Guenthe <guenther@cvs.openbsd.org> | 2012-03-22 01:44:20 +0000 |
---|---|---|
committer | Philip Guenthe <guenther@cvs.openbsd.org> | 2012-03-22 01:44:20 +0000 |
commit | 2e2475e8d275a770779144663fee23b401a6ce13 (patch) | |
tree | 5a88ea7fc8280d284edc70b122ae860aee8515d7 /include | |
parent | 28b53b23fb896b2ac25241cc161d67f65b88b054 (diff) |
Update alphasort() and scandir()'s argument types to match POSIX:
use "const struct dirent **" instead of "const void *". Also, add
__restrict to readdir_r().
ok matthew@
Diffstat (limited to 'include')
-rw-r--r-- | include/dirent.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/include/dirent.h b/include/dirent.h index c59fc1e0461..0d5884cb3cb 100644 --- a/include/dirent.h +++ b/include/dirent.h @@ -1,4 +1,4 @@ -/* $OpenBSD: dirent.h,v 1.25 2012/03/22 01:13:40 matthew Exp $ */ +/* $OpenBSD: dirent.h,v 1.26 2012/03/22 01:44:19 guenther Exp $ */ /* $NetBSD: dirent.h,v 1.9 1995/03/26 20:13:37 jtc Exp $ */ /*- @@ -112,12 +112,13 @@ long telldir(DIR *); void seekdir(DIR *, long); #endif #if __POSIX_VISIBLE >= 199506 || __XPG_VISIBLE >= 500 -int readdir_r(DIR *, struct dirent *, struct dirent **); +int readdir_r(DIR *__restrict, struct dirent *__restrict, + struct dirent **__restrict); #endif -#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200809 -int scandir(const char *, struct dirent ***, - int (*)(struct dirent *), int (*)(const void *, const void *)); -int alphasort(const void *, const void *); +#if __POSIX_VISIBLE >= 200809 +int scandir(const char *, struct dirent ***, int (*)(struct dirent *), + int (*)(const struct dirent **, const struct dirent **)); +int alphasort(const struct dirent **, const struct dirent **); #endif #if __POSIX_VISIBLE >= 200809 || __XPG_VISIBLE > 600 int (dirfd)(DIR *); |