1 #include <shlib-compat.h>
3 #if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_2) \
4 && !defined(GLOB_NO_OLD_VERSION)
10 #include <olddirent.h>
12 int __old_glob64 (const char *__pattern
, int __flags
,
13 int (*__errfunc
) (const char *, int),
15 libc_hidden_proto (__old_glob64
);
17 #define dirent __old_dirent64
18 #define GL_READDIR(pglob, stream) \
19 ((struct __old_dirent64 *) (pglob)->gl_readdir (stream))
21 #define __readdir(dirp) __old_readdir64 (dirp)
23 #define glob_t glob64_t
24 #define __glob(pattern, flags, errfunc, pglob) \
25 __old_glob64 (pattern, flags, errfunc, pglob)
26 #define globfree(pglob) globfree64(pglob)
28 #define convert_dirent __old_convert_dirent
29 #define glob_in_dir __old_glob_in_dir
34 #define __stat(file, buf) __xstat64 (_STAT_VER, file, buf)
36 /* Avoid calling gl_lstat with GLOB_ALTDIRFUNC. */
39 #define GLOB_ATTRIBUTE attribute_compat_text_section
41 #include <posix/glob.c>
43 libc_hidden_def (__old_glob64
);
45 compat_symbol (libc
, __old_glob64
, glob64
, GLIBC_2_1
);