summaryrefslogtreecommitdiff
path: root/libc/misc/dirent/versionsort.c
blob: 8129f7886f8273af0625008ed5cb54e1ed0334de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/*
 * Copyright (C) 2008-2009 Hai Zaar, Codefidence Ltd <haizaar@codefidence.com>
 *
 * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
 */

#include <dirent.h>
#include <string.h>
#include "dirstream.h"

int versionsort(const struct dirent **a, const struct dirent **b)
{
	return strverscmp((*a)->d_name, (*b)->d_name);
}
#if __WORDSIZE == 64
strong_alias_untyped(versionsort,versionsort64)
#endif