about summary refs log tree commit diff
path: root/sysdeps/gnu/glob64.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove internal usage of extensible stat functionsAdhemerval Zanella2020-09-111-1/+1
| | | | | | | | | | | | It replaces the internal usage of __{f,l}xstat{at}{64} with the __{f,l}stat{at}{64}. It should not change the generate code since sys/stat.h explicit defines redirections to internal calls back to xstat* symbols. Checked with a build for all affected ABIs. I also check on x86_64-linux-gnu and i686-linux-gnu. Reviewed-by: Lukasz Majewski <lukma@denx.de>
* hurd: Fix glob64 compatibility symbolsSamuel Thibault2018-01-061-3/+4
| | | | | | | | | | This follows ccf970c7a ('posix: Add compat glob symbol to not follow dangling symbols') by adding to gnu/ the same compatibility as for Linux. * sysdeps/gnu/glob64.c (__glob): Define macro instead of glob macro. (__glob64): Define GLIBC_2_27 versioned symbol instead of glob64. * sysdeps/gnu/glob-lstat-compat.c: New file. * sysdeps/gnu/glob64-lstat-compat.c: New file.
* posix: Sync glob with gnulib [BZ #1062]Adhemerval Zanella2017-09-081-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch syncs posix/glob.c implementation with gnulib version b5ec983 (glob: simplify symlink detection). The only difference to gnulib code is * DT_UNKNOWN, DT_DIR, and DT_LNK definition in the case there were not already defined. Gnulib code which uses HAVE_STRUCT_DIRENT_D_TYPE will redefine them wrongly because GLIBC does not define HAVE_STRUCT_DIRENT_D_TYPE. Instead the patch check for each definition instead. Also, the patch requires additional globfree and globfree64 files for compatibility version on some architectures. Also the code simplification leads to not macro simplification (not need for NO_GLOB_PATTERN_P anymore). Checked on x86_64-linux-gnu and on a build using build-many-glibcs.py for all major architectures. [BZ #1062] * posix/Makefile (routines): Add globfree, globfree64, and glob_pattern_p. * posix/flexmember.h: New file. * posix/glob_internal.h: Likewise. * posix/glob_pattern_p.c: Likewise. * posix/globfree.c: Likewise. * posix/globfree64.c: Likewise. * sysdeps/gnu/globfree64.c: Likewise. * sysdeps/unix/sysv/linux/alpha/globfree.c: Likewise. * sysdeps/unix/sysv/linux/mips/mips64/n64/globfree64.c: Likewise. * sysdeps/unix/sysv/linux/oldglob.c: Likewise. * sysdeps/unix/sysv/linux/wordsize-64/globfree64.c: Likewise. * sysdeps/unix/sysv/linux/x86_64/x32/globfree.c: Likewise. * sysdeps/wordsize-64/globfree.c: Likewise. * sysdeps/wordsize-64/globfree64.c: Likewise. * posix/glob.c (HAVE_CONFIG_H): Use !_LIBC instead. [NDEBUG): Remove comments. (GLOB_ONLY_P, _AMIGA, VMS): Remove define. (dirent_type): New type. Use uint_fast8_t not uint8_t, as C99 does not require uint8_t. (DT_UNKNOWN, DT_DIR, DT_LNK): New macros. (struct readdir_result): Use dirent_type. Do not define skip_entry unless it is needed; this saves a byte on platforms lacking d_ino. (readdir_result_type, readdir_result_skip_entry): New functions, replacing ... (readdir_result_might_be_symlink, readdir_result_might_be_dir): these functions, which were removed. This makes the callers easier to read. All callers changed. (D_INO_TO_RESULT): Now empty if there is no d_ino. (size_add_wrapv, glob_use_alloca): New static functions. (glob, glob_in_dir): Check for size_t overflow in several places, and fix some size_t checks that were not quite right. Remove old code using SHELL since Bash no longer uses this. (glob, prefix_array): Separate MS code better. (glob_in_dir): Remove old Amiga and VMS code. (globfree, __glob_pattern_type, __glob_pattern_p): Move to separate files. (glob_in_dir): Do not rely on undefined behavior in accessing struct members beyond their bounds. Use a flexible array member instead (link_stat): Rename from link_exists2_p and return -1/0 instead of 0/1. Caller changed. (glob): Fix memory leaks. * posix/glob64 (globfree64): Move to separate file. * sysdeps/gnu/glob64.c (NO_GLOB_PATTERN_P): Remove define. (globfree64): Remove hidden alias. * sysdeps/unix/sysv/linux/Makefile (sysdeps_routines): Add oldglob. * sysdeps/unix/sysv/linux/alpha/glob.c (__new_globfree): Move to separate file. * sysdeps/unix/sysv/linux/i386/glob64.c (NO_GLOB_PATTERN_P): Remove define. Move compat code to separate file. * sysdeps/wordsize-64/glob.c (globfree): Move definitions to separate file.
* * sysdeps/alpha/fpu/s_cacosf.c: Don't use sysdeps/generic/.Roland McGrath2005-12-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sysdeps/alpha/fpu/s_cacoshf.c: Likewise. * sysdeps/alpha/fpu/s_casinf.c: Likewise. * sysdeps/alpha/fpu/s_casinhf.c: Likewise. * sysdeps/alpha/fpu/s_catanf.c: Likewise. * sysdeps/alpha/fpu/s_catanhf.c: Likewise. * sysdeps/alpha/fpu/s_ccosf.c: Likewise. * sysdeps/alpha/fpu/s_ccoshf.c: Likewise. * sysdeps/alpha/fpu/s_cexpf.c: Likewise. * sysdeps/alpha/fpu/s_clog10f.c: Likewise. * sysdeps/alpha/fpu/s_clogf.c: Likewise. * sysdeps/alpha/fpu/s_cpowf.c: Likewise. * sysdeps/alpha/fpu/s_cprojf.c: Likewise. * sysdeps/alpha/fpu/s_csinf.c: Likewise. * sysdeps/alpha/fpu/s_csinhf.c: Likewise. * sysdeps/alpha/fpu/s_csqrtf.c: Likewise. * sysdeps/alpha/fpu/s_ctanf.c: Likewise. * sysdeps/alpha/fpu/s_ctanhf.c: Likewise. * sysdeps/alpha/libc-tls.c: Likewise. * sysdeps/gnu/glob64.c: Likewise. * sysdeps/gnu/updwtmp.c: Likewise. * sysdeps/gnu/utmp_file.c: Likewise. * sysdeps/i386/bzero.c: Likewise. * sysdeps/i386/ffs.c: Likewise. * sysdeps/i386/i686/ffs.c: Likewise. * sysdeps/i386/memset.c: Likewise. * sysdeps/ia64/fpu/printf_fphex.c: Likewise. * sysdeps/ia64/libc-tls.c: Likewise. * sysdeps/ieee754/ldbl-128/printf_fphex.c: Likewise. * sysdeps/m68k/ffs.c: Likewise. * sysdeps/mach/hurd/getdents.c: Likewise. * sysdeps/mach/hurd/init-posix.c: Likewise. * sysdeps/mach/msync.c: Likewise. * sysdeps/mips/libc-tls.c: Likewise. * sysdeps/posix/profil.c: Likewise. * sysdeps/posix/shm_open.c: Likewise. * sysdeps/posix/shm_unlink.c: Likewise. * sysdeps/posix/sprofil.c: Likewise. * sysdeps/powerpc/ffs.c: Likewise. * sysdeps/rs6000/ffs.c: Likewise. * sysdeps/s390/libc-tls.c: Likewise. * sysdeps/unix/sysv/linux/aio_sigqueue.c: Likewise. * sysdeps/unix/sysv/linux/alpha/glob.c: Likewise. * sysdeps/unix/sysv/linux/alpha/wordexp.c: Likewise. * sysdeps/unix/sysv/linux/ftruncate64.c: Likewise. * sysdeps/unix/sysv/linux/gai_sigqueue.c: Likewise. * sysdeps/unix/sysv/linux/i386/getmsg.c: Likewise. * sysdeps/unix/sysv/linux/i386/getresgid.c: Likewise. * sysdeps/unix/sysv/linux/i386/getresuid.c: Likewise. * sysdeps/unix/sysv/linux/i386/lchown.c: Likewise. * sysdeps/unix/sysv/linux/i386/putmsg.c: Likewise. * sysdeps/unix/sysv/linux/i386/readelflib.c: Likewise. * sysdeps/unix/sysv/linux/i386/setresgid.c: Likewise. * sysdeps/unix/sysv/linux/i386/setresuid.c: Likewise. * sysdeps/unix/sysv/linux/ia64/readelflib.c: Likewise. * sysdeps/unix/sysv/linux/mips/ftruncate64.c: Likewise. * sysdeps/unix/sysv/linux/mips/readelflib.c: Likewise. * sysdeps/unix/sysv/linux/mips/truncate64.c: Likewise. * sysdeps/unix/sysv/linux/mq_close.c: Likewise. * sysdeps/unix/sysv/linux/mq_getattr.c: Likewise. * sysdeps/unix/sysv/linux/mq_notify.c: Likewise. * sysdeps/unix/sysv/linux/mq_open.c: Likewise. * sysdeps/unix/sysv/linux/mq_receive.c: Likewise. * sysdeps/unix/sysv/linux/mq_send.c: Likewise. * sysdeps/unix/sysv/linux/mq_unlink.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/ftruncate64.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/truncate64.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/readelflib.c: Likewise. * sysdeps/unix/sysv/linux/s390/readelflib.c: Likewise. * sysdeps/unix/sysv/linux/sched_getaffinity.c: Likewise. * sysdeps/unix/sysv/linux/sched_setaffinity.c: Likewise. * sysdeps/unix/sysv/linux/sigqueue.c: Likewise. * sysdeps/unix/sysv/linux/sigstack.c: Likewise. * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. * sysdeps/unix/sysv/linux/sparc/readelflib.c: Likewise. * sysdeps/unix/sysv/linux/truncate64.c: Likewise. * sysdeps/unix/sysv/linux/vfork.c: Likewise. * sysdeps/unix/sysv/linux/x86_64/readelflib.c: Likewise.
* (CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.Ulrich Drepper2004-12-221-1/+1
|
* 2.5-18.1Jakub Jelinek2007-07-121-1/+1
|
* Update.Ulrich Drepper2004-07-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2004-07-01 Martin Schwidefsky <schwidefsky@de.ibm.com> * sysdeps/s390/fpu/bits/mathinline.h [__LIBC_INTERNAL_MATH_INLINES] (__ieee754_sqrt): Define as __MATH_INLINE using sqdbr instruction. (__ieee754_sqrtf): Define as __MATH_INLINE using sqebr instruction. * sysdeps/s390/fpu/e_sqrt.c: New file. * sysdeps/s390/fpu/e_sqrtf.c: New file. * sysdeps/s390/Implies: New file. * sysdeps/s390/s390-32/Implies: Remove ieee754, move ieee754/dbl-64 and ieee754/flt-32 to s390/Implies. * sysdeps/s390/s390-64/Implies: Likewise. 2004-06-30 Jakub Jelinek <jakub@redhat.com> * sysdeps/unix/sysv/linux/s390/s390-32/sysdep.S: Include tls.h. * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.S: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/clone.S (thread_start): DO_CALL (exit, 1) instead of branching to _exit. * sysdeps/unix/sysv/linux/s390/s390-64/clone.S (thread_start): Likewise. * sysdeps/s390/fpu/bits/mathinline.h: New file. * include/glob.h (glob64): Add libc_hidden_proto. * sysdeps/generic/glob64.c (glob64): Add libc_hidden_def. * sysdeps/gnu/glob64.c (glob64): Likewise. * sysdeps/unix/sysv/linux/i386/glob64.c (glob64): Likewise.
* Update.Ulrich Drepper2002-08-051-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-08-04 Jakub Jelinek <jakub@redhat.com> * sysdeps/generic/glob.c (glob, globfree): Only use libc_hidden_def if glob resp. globfree are not macros. * sysdeps/gnu/glob64.c (globfree64): Add libc_hidden_def. * sysdeps/unix/sysv/linux/alpha/glob.c (glob, globfree, globfree64): Add libc_hidden_ver. * sysdeps/unix/sysv/linux/i386/glob64.c (globfree64): Add libc_hidden_def. * sysdeps/wordsize-64/glob.c (globfree64): Use libc_hidden_ver instead of libc_hidden_weak. * sysdeps/wordsize-64/strtol.c (__strtoll_internal): Use libc_hidden_ver instead of libc_hidden_def. * sysdeps/wordsize-64/wcstol.c (__wcstoll_internal): Use libc_hidden_ver instead of libc_hidden_def. (wcstoll, wcstoq): Remove libc_hidden_weak. * sysdeps/wordsize-64/strtol_l.c (____strtoll_l_internal): Add libc_hidden_ver. * sysdeps/wordsize-64/strtoul.c (__strtoull_internal): Add libc_hidden_ver. * sysdeps/wordsize-64/strtoul_l.c (____strtoull_l_internal): Add libc_hidden_ver. * sysdeps/wordsize-64/wcstoul.c (__wcstoull_internal): Add libc_hidden_ver.
* Update.Ulrich Drepper2001-02-131-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * io/ftw.c: Always use readdir64. * io/ftw64.c: Likewise. * sysdeps/unix/sysv/linux/ttyname.c: Likewise. * sysdeps/unix/sysv/linux/ttyname_r.c: Likewise. * sysdeps/generic/glob.c: Likewise. Convert results if gl_readdir callback to dirent. Still allow compiling outside glibc. * sysdeps/gnu/glob64.c: Define COMPILE_GLOB64. * sysdeps/unix/sysv/linux/i386/glob64.c: Likewise. * malloc/mtrace.c: Use fopen64. * posix/spawni.c: Use __open64. * sysdeps/unix/opendir.c: Likewise. * sysdeps/unix/sysv/linux/gethostid.c: Likewise. * sysdeps/generic/ftruncate64.c: Define __ftruncate64 and make old name a weak alias. * sysdeps/unix/sysv/aix/ftruncate64.c: Likewise. * sysdeps/unix/sysv/linux/ftruncate64.c: Likewise. * sysdeps/unix/sysv/linux/mips/ftruncate64.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/ftruncate64.c: Likewise. * resolv/res_data.c: Add cast to avoid warning. * include/unistd.h: Declare __ftruncate64. * sysdeps/generic/utmp_file.c: Use LFS functions and type.
* Update.Ulrich Drepper2001-01-071-0/+20
2001-01-07 Ulrich Drepper <drepper@redhat.com> * sysdeps/unix/sysv/linux/glob64.c: Moved to ... * sysdeps/gnu/glob64.c: ...here. New file.