1 | #include <shlib-compat.h> |
2 | |
3 | #if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_2) |
4 | |
5 | #include <dirent.h> |
6 | #include <glob.h> |
7 | #include <sys/stat.h> |
8 | |
9 | #include <sysdeps/unix/sysv/linux/i386/olddirent.h> |
10 | |
11 | int __old_glob64 (const char *__pattern, int __flags, |
12 | int (*__errfunc) (const char *, int), |
13 | glob64_t *__pglob); |
14 | libc_hidden_proto (__old_glob64); |
15 | |
16 | #define dirent __old_dirent64 |
17 | #define GL_READDIR(pglob, stream) \ |
18 | ((struct __old_dirent64 *) (pglob)->gl_readdir (stream)) |
19 | #undef __readdir |
20 | #define __readdir(dirp) __old_readdir64 (dirp) |
21 | |
22 | #define glob_t glob64_t |
23 | #define glob(pattern, flags, errfunc, pglob) \ |
24 | __old_glob64 (pattern, flags, errfunc, pglob) |
25 | #define globfree(pglob) globfree64(pglob) |
26 | |
27 | #define convert_dirent __old_convert_dirent |
28 | #define glob_in_dir __old_glob_in_dir |
29 | |
30 | #undef stat |
31 | #define stat stat64 |
32 | #undef __stat |
33 | #define __stat(file, buf) __xstat64 (_STAT_VER, file, buf) |
34 | |
35 | #define GLOB_ATTRIBUTE attribute_compat_text_section |
36 | |
37 | #include <posix/glob.c> |
38 | |
39 | libc_hidden_def (__old_glob64); |
40 | |
41 | compat_symbol (libc, __old_glob64, glob64, GLIBC_2_1); |
42 | #endif |
43 | |