diff options
Diffstat (limited to 'sysdeps')
28 files changed, 148 insertions, 17 deletions
diff --git a/sysdeps/gnu/glob64-lstat-compat.c b/sysdeps/gnu/glob64-lstat-compat.c index 6764f1d..ade4cca 100644 --- a/sysdeps/gnu/glob64-lstat-compat.c +++ b/sysdeps/gnu/glob64-lstat-compat.c @@ -39,7 +39,8 @@ #define GLOB_ATTRIBUTE attribute_compat_text_section /* Avoid calling gl_lstat with GLOB_ALTDIRFUNC. */ -#define GLOB_NO_LSTAT +#define GLOB_LSTAT gl_stat +#define GLOB_LSTAT64 __stat64 #include <posix/glob.c> diff --git a/sysdeps/unix/sysv/linux/Versions b/sysdeps/unix/sysv/linux/Versions index 8fb05da..0070ffc 100644 --- a/sysdeps/unix/sysv/linux/Versions +++ b/sysdeps/unix/sysv/linux/Versions @@ -209,6 +209,8 @@ libc { __getitimer64; __getrusage64; __gettimeofday64; + __glob64_time64; + __globfree64_time64; __gmtime64; __gmtime64_r; __localtime64; diff --git a/sysdeps/unix/sysv/linux/arm/be/libc.abilist b/sysdeps/unix/sysv/linux/arm/be/libc.abilist index 1d32514..8e3101b 100644 --- a/sysdeps/unix/sysv/linux/arm/be/libc.abilist +++ b/sysdeps/unix/sysv/linux/arm/be/libc.abilist @@ -209,6 +209,8 @@ GLIBC_2.34 __futimesat64 F GLIBC_2.34 __getitimer64 F GLIBC_2.34 __getrusage64 F GLIBC_2.34 __gettimeofday64 F +GLIBC_2.34 __glob64_time64 F +GLIBC_2.34 __globfree64_time64 F GLIBC_2.34 __gmtime64 F GLIBC_2.34 __gmtime64_r F GLIBC_2.34 __libc_start_main F diff --git a/sysdeps/unix/sysv/linux/arm/le/libc.abilist b/sysdeps/unix/sysv/linux/arm/le/libc.abilist index 05d0878..b29a0e3 100644 --- a/sysdeps/unix/sysv/linux/arm/le/libc.abilist +++ b/sysdeps/unix/sysv/linux/arm/le/libc.abilist @@ -206,6 +206,8 @@ GLIBC_2.34 __futimesat64 F GLIBC_2.34 __getitimer64 F GLIBC_2.34 __getrusage64 F GLIBC_2.34 __gettimeofday64 F +GLIBC_2.34 __glob64_time64 F +GLIBC_2.34 __globfree64_time64 F GLIBC_2.34 __gmtime64 F GLIBC_2.34 __gmtime64_r F GLIBC_2.34 __libc_start_main F diff --git a/sysdeps/unix/sysv/linux/csky/libc.abilist b/sysdeps/unix/sysv/linux/csky/libc.abilist index ac9f009..5f5427c 100644 --- a/sysdeps/unix/sysv/linux/csky/libc.abilist +++ b/sysdeps/unix/sysv/linux/csky/libc.abilist @@ -2296,6 +2296,8 @@ GLIBC_2.34 __futimesat64 F GLIBC_2.34 __getitimer64 F GLIBC_2.34 __getrusage64 F GLIBC_2.34 __gettimeofday64 F +GLIBC_2.34 __glob64_time64 F +GLIBC_2.34 __globfree64_time64 F GLIBC_2.34 __gmtime64 F GLIBC_2.34 __gmtime64_r F GLIBC_2.34 __libc_start_main F diff --git a/sysdeps/unix/sysv/linux/glob-lstat-compat.c b/sysdeps/unix/sysv/linux/glob-lstat-compat.c index 1f502e3..7729e0d 100644 --- a/sysdeps/unix/sysv/linux/glob-lstat-compat.c +++ b/sysdeps/unix/sysv/linux/glob-lstat-compat.c @@ -30,7 +30,11 @@ #define GLOB_ATTRIBUTE attribute_compat_text_section /* Avoid calling gl_lstat with GLOB_ALTDIRFUNC. */ -#define GLOB_NO_LSTAT +#define struct_stat struct stat +#define struct_stat64 struct stat64 +#define GLOB_LSTAT gl_stat +#define GLOB_STAT64 __stat64 +#define GLOB_LSTAT64 __stat64 #include <posix/glob.c> diff --git a/sysdeps/unix/sysv/linux/glob.c b/sysdeps/unix/sysv/linux/glob.c index 1be4885..89c287d 100644 --- a/sysdeps/unix/sysv/linux/glob.c +++ b/sysdeps/unix/sysv/linux/glob.c @@ -19,6 +19,12 @@ #include <sys/stat.h> #include <kernel_stat.h> +#define struct_stat struct stat +#define struct_stat64 struct stat64 +#define GLOB_LSTAT gl_lstat +#define GLOB_STAT64 __stat64 +#define GLOB_LSTAT64 __lstat64 + #define glob64 __no_glob64_decl #define __glob64 __no___glob64_decl #include <posix/glob.c> diff --git a/sysdeps/unix/sysv/linux/glob64-lstat-compat.c b/sysdeps/unix/sysv/linux/glob64-lstat-compat.c index 40ad625..302a44d 100644 --- a/sysdeps/unix/sysv/linux/glob64-lstat-compat.c +++ b/sysdeps/unix/sysv/linux/glob64-lstat-compat.c @@ -33,15 +33,15 @@ # define __glob __glob64_lstat_compat # define globfree globfree64 -# undef stat -# define stat stat64 - -# define COMPILE_GLOB64 1 - # define GLOB_ATTRIBUTE attribute_compat_text_section /* Avoid calling gl_lstat with GLOB_ALTDIRFUNC. */ -# define GLOB_NO_LSTAT +# define COMPILE_GLOB64 1 +# define struct_stat struct stat64 +# define struct_stat64 struct stat64 +# define GLOB_LSTAT gl_stat +# define GLOB_STAT64 __stat64 +# define GLOB_LSTAT64 __stat64 # include <posix/glob.c> diff --git a/sysdeps/unix/sysv/linux/glob64-time64.c b/sysdeps/unix/sysv/linux/glob64-time64.c new file mode 100644 index 0000000..260f067 --- /dev/null +++ b/sysdeps/unix/sysv/linux/glob64-time64.c @@ -0,0 +1,44 @@ +/* Find pathnames matching a pattern. Linux version. + Copyright (C) 2021 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +#include <sys/stat.h> + +#if __TIMESIZE != 64 +# include <glob.h> +# include <dirent.h> +# include <sys/stat.h> + +# define dirent dirent64 +# define __readdir(dirp) __readdir64 (dirp) + +# define glob_t glob64_time64_t +# define __glob __glob64_time64 + +# define globfree(pglob) __globfree64_time64 (pglob) + +# define COMPILE_GLOB64 1 +# define struct_stat struct __stat64_t64 +# define struct_stat64 struct __stat64_t64 +# define GLOB_LSTAT gl_lstat +# define GLOB_STAT64 __stat64_time64 +# define GLOB_LSTAT64 __lstat64_time64 + +# define COMPILE_GLOB64 1 + +# include <posix/glob.c> +#endif diff --git a/sysdeps/unix/sysv/linux/glob64.c b/sysdeps/unix/sysv/linux/glob64.c index 3cbadf3..572ca21 100644 --- a/sysdeps/unix/sysv/linux/glob64.c +++ b/sysdeps/unix/sysv/linux/glob64.c @@ -31,10 +31,12 @@ # define __glob __glob64 # define globfree(pglob) globfree64 (pglob) -# undef stat -# define stat stat64 - # define COMPILE_GLOB64 1 +# define struct_stat struct stat64 +# define struct_stat64 struct stat64 +# define GLOB_LSTAT gl_lstat +# define GLOB_STAT64 __stat64 +# define GLOB_LSTAT64 __lstat64 # include <posix/glob.c> diff --git a/sysdeps/unix/sysv/linux/globfree64-time64.c b/sysdeps/unix/sysv/linux/globfree64-time64.c new file mode 100644 index 0000000..d6b1e6a --- /dev/null +++ b/sysdeps/unix/sysv/linux/globfree64-time64.c @@ -0,0 +1,35 @@ +/* Frees the dynamically allocated storage from an earlier call to glob. + Linux version. + Copyright (C) 2021 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +#include <sys/stat.h> + +#if __TIMESIZE != 64 +# include <glob.h> +# include <dirent.h> +# include <sys/stat.h> + +# define glob_t glob64_time64_t +# define globfree(pglob) __globfree64_time64 (pglob) + +# undef stat +# define stat __stat64_t64 + +# include <posix/globfree.c> +libc_hidden_def (__globfree64_time64) +#endif diff --git a/sysdeps/unix/sysv/linux/hppa/libc.abilist b/sysdeps/unix/sysv/linux/hppa/libc.abilist index d2770a4..ca8f7c3 100644 --- a/sysdeps/unix/sysv/linux/hppa/libc.abilist +++ b/sysdeps/unix/sysv/linux/hppa/libc.abilist @@ -2250,6 +2250,8 @@ GLIBC_2.34 __futimesat64 F GLIBC_2.34 __getitimer64 F GLIBC_2.34 __getrusage64 F GLIBC_2.34 __gettimeofday64 F +GLIBC_2.34 __glob64_time64 F +GLIBC_2.34 __globfree64_time64 F GLIBC_2.34 __gmtime64 F GLIBC_2.34 __gmtime64_r F GLIBC_2.34 __libc_start_main F diff --git a/sysdeps/unix/sysv/linux/i386/libc.abilist b/sysdeps/unix/sysv/linux/i386/libc.abilist index eb20d66..d2b7b4d 100644 --- a/sysdeps/unix/sysv/linux/i386/libc.abilist +++ b/sysdeps/unix/sysv/linux/i386/libc.abilist @@ -2433,6 +2433,8 @@ GLIBC_2.34 __futimesat64 F GLIBC_2.34 __getitimer64 F GLIBC_2.34 __getrusage64 F GLIBC_2.34 __gettimeofday64 F +GLIBC_2.34 __glob64_time64 F +GLIBC_2.34 __globfree64_time64 F GLIBC_2.34 __gmtime64 F GLIBC_2.34 __gmtime64_r F GLIBC_2.34 __isnanf128 F diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist index 044cec5..515e383 100644 --- a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist +++ b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist @@ -210,6 +210,8 @@ GLIBC_2.34 __futimesat64 F GLIBC_2.34 __getitimer64 F GLIBC_2.34 __getrusage64 F GLIBC_2.34 __gettimeofday64 F +GLIBC_2.34 __glob64_time64 F +GLIBC_2.34 __globfree64_time64 F GLIBC_2.34 __gmtime64 F GLIBC_2.34 __gmtime64_r F GLIBC_2.34 __libc_start_main F diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist index 3a6463a..6915fa1 100644 --- a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist +++ b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist @@ -2377,6 +2377,8 @@ GLIBC_2.34 __futimesat64 F GLIBC_2.34 __getitimer64 F GLIBC_2.34 __getrusage64 F GLIBC_2.34 __gettimeofday64 F +GLIBC_2.34 __glob64_time64 F +GLIBC_2.34 __globfree64_time64 F GLIBC_2.34 __gmtime64 F GLIBC_2.34 __gmtime64_r F GLIBC_2.34 __libc_start_main F diff --git a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist index 612d7f1..9293872 100644 --- a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist +++ b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist @@ -2347,6 +2347,8 @@ GLIBC_2.34 __futimesat64 F GLIBC_2.34 __getitimer64 F GLIBC_2.34 __getrusage64 F GLIBC_2.34 __gettimeofday64 F +GLIBC_2.34 __glob64_time64 F +GLIBC_2.34 __globfree64_time64 F GLIBC_2.34 __gmtime64 F GLIBC_2.34 __gmtime64_r F GLIBC_2.34 __libc_start_main F diff --git a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist index 685cb97..cb671c5 100644 --- a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist +++ b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist @@ -2344,6 +2344,8 @@ GLIBC_2.34 __futimesat64 F GLIBC_2.34 __getitimer64 F GLIBC_2.34 __getrusage64 F GLIBC_2.34 __gettimeofday64 F +GLIBC_2.34 __glob64_time64 F +GLIBC_2.34 __globfree64_time64 F GLIBC_2.34 __gmtime64 F GLIBC_2.34 __gmtime64_r F GLIBC_2.34 __libc_start_main F diff --git a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist index d17b5a0..f5effe3 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist @@ -2342,6 +2342,8 @@ GLIBC_2.34 __futimesat64 F GLIBC_2.34 __getitimer64 F GLIBC_2.34 __getrusage64 F GLIBC_2.34 __gettimeofday64 F +GLIBC_2.34 __glob64_time64 F +GLIBC_2.34 __globfree64_time64 F GLIBC_2.34 __gmtime64 F GLIBC_2.34 __gmtime64_r F GLIBC_2.34 __libc_start_main F diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist index aba6bd2..2b66d26 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist @@ -2340,6 +2340,8 @@ GLIBC_2.34 __futimesat64 F GLIBC_2.34 __getitimer64 F GLIBC_2.34 __getrusage64 F GLIBC_2.34 __gettimeofday64 F +GLIBC_2.34 __glob64_time64 F +GLIBC_2.34 __globfree64_time64 F GLIBC_2.34 __gmtime64 F GLIBC_2.34 __gmtime64_r F GLIBC_2.34 __libc_start_main F diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist index 88d8e2a..bd76490 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist @@ -2348,6 +2348,8 @@ GLIBC_2.34 __futimesat64 F GLIBC_2.34 __getitimer64 F GLIBC_2.34 __getrusage64 F GLIBC_2.34 __gettimeofday64 F +GLIBC_2.34 __glob64_time64 F +GLIBC_2.34 __globfree64_time64 F GLIBC_2.34 __gmtime64 F GLIBC_2.34 __gmtime64_r F GLIBC_2.34 __libc_start_main F diff --git a/sysdeps/unix/sysv/linux/nios2/libc.abilist b/sysdeps/unix/sysv/linux/nios2/libc.abilist index 3b64e2c..e62a2a5 100644 --- a/sysdeps/unix/sysv/linux/nios2/libc.abilist +++ b/sysdeps/unix/sysv/linux/nios2/libc.abilist @@ -2386,6 +2386,8 @@ GLIBC_2.34 __futimesat64 F GLIBC_2.34 __getitimer64 F GLIBC_2.34 __getrusage64 F GLIBC_2.34 __gettimeofday64 F +GLIBC_2.34 __glob64_time64 F +GLIBC_2.34 __globfree64_time64 F GLIBC_2.34 __gmtime64 F GLIBC_2.34 __gmtime64_r F GLIBC_2.34 __libc_start_main F diff --git a/sysdeps/unix/sysv/linux/oldglob.c b/sysdeps/unix/sysv/linux/oldglob.c index 59bf89d..a9a4439 100644 --- a/sysdeps/unix/sysv/linux/oldglob.c +++ b/sysdeps/unix/sysv/linux/oldglob.c @@ -28,13 +28,12 @@ libc_hidden_proto (__old_glob64); #define convert_dirent __old_convert_dirent #define glob_in_dir __old_glob_in_dir -#undef stat -#define stat stat64 -#undef __stat -#define __stat(file, buf) __stat64 (file, buf) - /* Avoid calling gl_lstat with GLOB_ALTDIRFUNC. */ -#define GLOB_NO_LSTAT +#define struct_stat struct stat64 +#define struct_stat64 struct stat64 +#define GLOB_LSTAT gl_stat +#define GLOB_STAT64 __stat64 +#define GLOB_LSTAT64 __stat64 #define GLOB_ATTRIBUTE attribute_compat_text_section diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist index 5404fde..bc5b23c 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist @@ -2404,6 +2404,8 @@ GLIBC_2.34 __futimesat64 F GLIBC_2.34 __getitimer64 F GLIBC_2.34 __getrusage64 F GLIBC_2.34 __gettimeofday64 F +GLIBC_2.34 __glob64_time64 F +GLIBC_2.34 __globfree64_time64 F GLIBC_2.34 __gmtime64 F GLIBC_2.34 __gmtime64_r F GLIBC_2.34 __libc_start_main F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist index 506fa36..f9421c7 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist @@ -2437,6 +2437,8 @@ GLIBC_2.34 __futimesat64 F GLIBC_2.34 __getitimer64 F GLIBC_2.34 __getrusage64 F GLIBC_2.34 __gettimeofday64 F +GLIBC_2.34 __glob64_time64 F +GLIBC_2.34 __globfree64_time64 F GLIBC_2.34 __gmtime64 F GLIBC_2.34 __gmtime64_r F GLIBC_2.34 __libc_start_main F diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist index 99b6d6d..7581354 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist +++ b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist @@ -2402,6 +2402,8 @@ GLIBC_2.34 __futimesat64 F GLIBC_2.34 __getitimer64 F GLIBC_2.34 __getrusage64 F GLIBC_2.34 __gettimeofday64 F +GLIBC_2.34 __glob64_time64 F +GLIBC_2.34 __globfree64_time64 F GLIBC_2.34 __gmtime64 F GLIBC_2.34 __gmtime64_r F GLIBC_2.34 __libc_start_main F diff --git a/sysdeps/unix/sysv/linux/sh/be/libc.abilist b/sysdeps/unix/sysv/linux/sh/be/libc.abilist index 68a631b..0e45f7f 100644 --- a/sysdeps/unix/sysv/linux/sh/be/libc.abilist +++ b/sysdeps/unix/sysv/linux/sh/be/libc.abilist @@ -2257,6 +2257,8 @@ GLIBC_2.34 __futimesat64 F GLIBC_2.34 __getitimer64 F GLIBC_2.34 __getrusage64 F GLIBC_2.34 __gettimeofday64 F +GLIBC_2.34 __glob64_time64 F +GLIBC_2.34 __globfree64_time64 F GLIBC_2.34 __gmtime64 F GLIBC_2.34 __gmtime64_r F GLIBC_2.34 __libc_start_main F diff --git a/sysdeps/unix/sysv/linux/sh/le/libc.abilist b/sysdeps/unix/sysv/linux/sh/le/libc.abilist index 61a29e6..ece6721 100644 --- a/sysdeps/unix/sysv/linux/sh/le/libc.abilist +++ b/sysdeps/unix/sysv/linux/sh/le/libc.abilist @@ -2254,6 +2254,8 @@ GLIBC_2.34 __futimesat64 F GLIBC_2.34 __getitimer64 F GLIBC_2.34 __getrusage64 F GLIBC_2.34 __gettimeofday64 F +GLIBC_2.34 __glob64_time64 F +GLIBC_2.34 __globfree64_time64 F GLIBC_2.34 __gmtime64 F GLIBC_2.34 __gmtime64_r F GLIBC_2.34 __libc_start_main F diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist index fa3ae95..6073443 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist +++ b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist @@ -2395,6 +2395,8 @@ GLIBC_2.34 __futimesat64 F GLIBC_2.34 __getitimer64 F GLIBC_2.34 __getrusage64 F GLIBC_2.34 __gettimeofday64 F +GLIBC_2.34 __glob64_time64 F +GLIBC_2.34 __globfree64_time64 F GLIBC_2.34 __gmtime64 F GLIBC_2.34 __gmtime64_r F GLIBC_2.34 __libc_start_main F |