]> git.ipfire.org Git - thirdparty/glibc.git/blame - dirent/scandir.c
Remove pre-ISO C support
[thirdparty/glibc.git] / dirent / scandir.c
CommitLineData
879165f2
UD
1/* Copyright (C) 1992-1998,2000,2002,2003,2009,2011
2 Free Software Foundation, Inc.
47707456 3 This file is part of the GNU C Library.
28f540f4 4
47707456 5 The GNU C Library is free software; you can redistribute it and/or
41bdb6e2
AJ
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
28f540f4 9
47707456
UD
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
41bdb6e2 13 Lesser General Public License for more details.
28f540f4 14
41bdb6e2
AJ
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, write to the Free
17 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
18 02111-1307 USA. */
28f540f4 19
28f540f4 20#include <dirent.h>
c55fbd1e 21#include <fcntl.h>
28f540f4 22
56ddf355 23#ifndef SCANDIR
879165f2 24# define SCANDIR scandir
c55fbd1e 25# define SCANDIRAT scandirat
879165f2 26# define DIRENT_TYPE struct dirent
56ddf355
UD
27#endif
28
70e1c930 29
28f540f4 30int
56ddf355 31SCANDIR (dir, namelist, select, cmp)
c4029823 32 const char *dir;
56ddf355
UD
33 DIRENT_TYPE ***namelist;
34 int (*select) (const DIRENT_TYPE *);
eee6b143 35 int (*cmp) (const DIRENT_TYPE **, const DIRENT_TYPE **);
28f540f4 36{
c55fbd1e 37 return SCANDIRAT (AT_FDCWD, dir, namelist, select, cmp);
28f540f4 38}