int (*select) __P ((const struct dirent *));
int (*cmp) __P ((const void *, const void *));
{
- DIR *dp = opendir (dir);
+ DIR *dp = __opendir (dir);
struct dirent **v = NULL;
size_t vsize = 0, i;
struct dirent *d;
if (errno != 0)
{
save = errno;
- (void) closedir (dp);
+ (void) __closedir (dp);
while (i > 0)
free (v[--i]);
free (v);
return -1;
}
- (void) closedir (dp);
+ (void) __closedir (dp);
__set_errno (save);
/* Sort the list if we have a comparison function to sort with. */
int (*select) __P ((const struct dirent64 *));
int (*cmp) __P ((const void *, const void *));
{
- DIR *dp = opendir (dir);
+ DIR *dp = __opendir (dir);
struct dirent64 **v = NULL;
size_t vsize = 0, i;
struct dirent64 *d;
if (errno != 0)
{
save = errno;
- (void) closedir (dp);
+ (void) __closedir (dp);
while (i > 0)
free (v[--i]);
free (v);
return -1;
}
- (void) closedir (dp);
+ (void) __closedir (dp);
__set_errno (save);
/* Sort the list if we have a comparison function to sort with. */
int
versionsort (const void *a, const void *b)
{
- return strverscmp ((*(const struct dirent **) a)->d_name,
- (*(const struct dirent **) b)->d_name);
+ return __strverscmp ((*(const struct dirent **) a)->d_name,
+ (*(const struct dirent **) b)->d_name);
}
int
versionsort64 (const void *a, const void *b)
{
- return strverscmp ((*(const struct dirent64 **) a)->d_name,
- (*(const struct dirent64 **) b)->d_name);
+ return __strverscmp ((*(const struct dirent64 **) a)->d_name,
+ (*(const struct dirent64 **) b)->d_name);
}