Remove x32/iofopen.c and x32/iofopen64.c
[glibc.git] / dirent / scandir.c
blob8b0a87ba062efb4fe4b3c2b63f26405b1cb9abe9
1 /* Copyright (C) 1992-1998,2000,2002,2003,2009,2011
2 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
5 The GNU C Library is free software; you can redistribute it and/or
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.
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
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
19 #include <dirent.h>
20 #include <fcntl.h>
22 #ifndef SCANDIR
23 # define SCANDIR scandir
24 # define SCANDIRAT scandirat
25 # define DIRENT_TYPE struct dirent
26 #endif
29 int
30 SCANDIR (dir, namelist, select, cmp)
31 const char *dir;
32 DIRENT_TYPE ***namelist;
33 int (*select) (const DIRENT_TYPE *);
34 int (*cmp) (const DIRENT_TYPE **, const DIRENT_TYPE **);
36 return SCANDIRAT (AT_FDCWD, dir, namelist, select, cmp);