Add NT_PPC_PKEY from Linux 4.16 to elf.h.
[glibc.git] / sysdeps / unix / sysv / linux / oldglob.c
bloba034c2d930751c261da81b462b736e4d667dda42
1 #include <shlib-compat.h>
3 #if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_2) \
4 && !defined(GLOB_NO_OLD_VERSION)
6 #include <dirent.h>
7 #include <glob.h>
8 #include <sys/stat.h>
10 #include <olddirent.h>
12 int __old_glob64 (const char *__pattern, int __flags,
13 int (*__errfunc) (const char *, int),
14 glob64_t *__pglob);
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))
20 #undef __readdir
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
31 #undef stat
32 #define stat stat64
33 #undef __stat
34 #define __stat(file, buf) __xstat64 (_STAT_VER, file, buf)
36 /* Avoid calling gl_lstat with GLOB_ALTDIRFUNC. */
37 #define GLOB_NO_LSTAT
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);
46 #endif