Browse Source

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@
OPENBSD_5_2
guenther 12 years ago
parent
commit
cdcacd10ba
1 changed files with 7 additions and 6 deletions
  1. +7
    -6
      src/include/dirent.h

+ 7
- 6
src/include/dirent.h View File

@ -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 $ */ /* $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); void seekdir(DIR *, long);
#endif #endif
#if __POSIX_VISIBLE >= 199506 || __XPG_VISIBLE >= 500 #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 #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 #endif
#if __POSIX_VISIBLE >= 200809 || __XPG_VISIBLE > 600 #if __POSIX_VISIBLE >= 200809 || __XPG_VISIBLE > 600
int (dirfd)(DIR *); int (dirfd)(DIR *);


Loading…
Cancel
Save