2016-01-04 16:05:18 +00:00
|
|
|
|
/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
|
2001-07-06 04:58:11 +00:00
|
|
|
|
This file is part of the GNU C Library.
|
1995-02-18 01:27:10 +00:00
|
|
|
|
|
2001-07-06 04:58:11 +00:00
|
|
|
|
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.
|
1995-02-18 01:27:10 +00:00
|
|
|
|
|
2001-07-06 04:58:11 +00:00
|
|
|
|
The GNU C Library is distributed in the hope that it will be useful,
|
1996-12-04 01:41:39 +00:00
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
2001-07-06 04:58:11 +00:00
|
|
|
|
Lesser General Public License for more details.
|
1995-02-18 01:27:10 +00:00
|
|
|
|
|
2001-07-06 04:58:11 +00:00
|
|
|
|
You should have received a copy of the GNU Lesser General Public
|
2012-02-09 23:18:22 +00:00
|
|
|
|
License along with the GNU C Library; if not, see
|
|
|
|
|
<http://www.gnu.org/licenses/>. */
|
1995-02-18 01:27:10 +00:00
|
|
|
|
|
|
|
|
|
#ifdef HAVE_CONFIG_H
|
1997-09-16 00:42:43 +00:00
|
|
|
|
# include <config.h>
|
1995-02-18 01:27:10 +00:00
|
|
|
|
#endif
|
|
|
|
|
|
2006-01-11 05:30:12 +00:00
|
|
|
|
#include <glob.h>
|
1996-01-19 10:00:23 +00:00
|
|
|
|
|
1995-02-18 01:27:10 +00:00
|
|
|
|
#include <errno.h>
|
|
|
|
|
#include <sys/types.h>
|
1995-04-25 21:16:39 +00:00
|
|
|
|
#include <sys/stat.h>
|
2006-01-11 05:30:12 +00:00
|
|
|
|
#include <stddef.h>
|
1995-02-18 01:27:10 +00:00
|
|
|
|
|
1997-03-21 20:00:48 +00:00
|
|
|
|
/* Outcomment the following line for production quality code. */
|
|
|
|
|
/* #define NDEBUG 1 */
|
|
|
|
|
#include <assert.h>
|
|
|
|
|
|
Update.
1997-08-14 03:14 Ulrich Drepper <drepper@cygnus.com>
* elf/dl-minimal.c: Don't use relative #include paths.
(malloc): Don't try to initialize _dl_pagesize, it already is.
(__sigjmp_save, longjmp): Reformat.
* sysdeps/generic/dl-sysdep.c: Implement _dl_show_auxv function to
show content of auxiliary array.
(_dl_sysdep_start): Remember start of auxiliary vector.
* sysdeps/mach/hurd/dl-sysdep.c: (_dl_show_auxv): New dummy function.
* elf/link.h: Add prototype for _dl_show_auxv.
* elf/rtld.c (dl_main): Call _dl_show_auxv if LD_SHOW_AUXV envvar
is present.
* libio/iofdopen.c: Better prepare for use in libstdc++.
* libio/iofflush.c: Likewise.
* libio/iofgetpos.c: Likewise.
* libio/iofgets.c: Likewise.
* libio/iofopen.c: Likewise.
* libio/iofputs.c: Likewise.
* libio/iofread.c: Likewise.
* libio/iofsetpos.c: Likewise.
* libio/ioftell.c: Likewise.
* libio/iofwrite.c: Likewise.
* libio/iogetdelim.c: Likewise.
* libio/iogets.c: Likewise.
* libio/iopopen.c: Likewise.
* libio/ioputs.c: Likewise.
* libio/iosetbuffer.c: Likewise.
* libio/iosetvbuf.c: Likewise.
* libio/ioungetc.c: Likewise.
* libio/iovsprintf.c: Likewise.
* libio/iovsscanf.c: Likewise.
* manual/creature.texi: Mention _XOPEN_SOURCE_EXTENDED in correct
place.
* manual/math.texi: Add comment to sincos decsription to say it's a
GNU extension.
Fix description of random function.
* posix/fnmatch.h: Recognize Windog by _WINDOWS32 not WIN32.
* posix/glob.c: Likewise. Handle stupid system headers on SunOS.
Add casts for all __alloca calls.
* posix/glob.h: Recognize Windog by _WINDOWS32 not WIN32.
Declare additional GLOB_* constants also if _GNU_SOURCE is defined.
Patches by Paul D. Smith <psmith@BayNetworks.COM>.
* stdio-common/_itoa.c: Don't use relateive #include paths.
* sysdeps/i386/fpu/bits/mathinline.h: Enable optimizations even for
gcc 2.7.
(atan): Loading 1.0 from memory does not pay off.
(asinh): Fix typo.
1997-08-13 09:44 Philip Blundell <Philip.Blundell@pobox.com>
* sysdeps/stub/accept.c: Use socklen_t where necessary.
* sysdeps/stub/bind.c: Likewise.
* sysdeps/stub/connect.c: Likewise.
* sysdeps/stub/getsockname.c: Likewise.
* sysdeps/stub/getsockopt.c: Likewise.
* sysdeps/stub/recvfrom.c: Likewise.
* sysdeps/stub/sendto.c: Likewise.
* sysdeps/stub/setsockopt.c: Likewise.
1997-08-11 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* io/ftw.c (object_compare): Avoid memcmp when comparing scalar
types.
1997-08-12 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* math/libm-test.c (cbrt_test): Add epsilon for long double to
`cbrt (-0.001)'.
1997-08-11 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/stub/bits/string.h: Fix comment.
1997-08-01 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* elf/Makefile (routines): Remove dl-version.
(dl-routines): Add it here instead. This removes dead code from
libc.so.
1997-08-12 17:17 Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>
* malloc/thread-m.h (thread_atfork, thread_atfork_static): New
macros to encapsulate pthread_atfork's functionality.
* malloc/malloc.c (ptmalloc_lock_all, ptmalloc_unlock_all): New
functions, registered via thread_atfork in the initialization
routine or via thread_atfork_static in global scope. This
ensures a consistent state of all locks across fork().
1997-08-11 23:00:32 1997 Mark Kettenis <kettenis@phys.uva.nl>
* login/programs/xtmp.c (compare_entry):
Partially undo patch made by Klaus Espenlaub. There
was no xtmp/utmp typo. Added comment to cclarify this.
* login/programs/xtmp.h: Likewise.
* posix/getopt.c: Recognize Windog by _WINDOWS32 not WIN32.
Patch by Paul D. Smith <psmith@BayNetworks.COM>.
1997-08-12 13:51 Ulrich Drepper <drepper@cygnus.com>
* login/getutid.c: Rename to __getutid and make getutid and getutxid
weak aliases.
Patch by ir. Mark M._Kettenis <kettenis@phys.uva.nl>.
1997-08-11 23:55 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/unix/sysv/linux/Makefile [subdir=misc] (sysdep_headers):
Add bits/mman.h.
1997-08-11 08:51:21 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
* stdlib/fmtmsg.c (fmtmsg): Add static to
__libc_once_define macro.
* libc.map (__progname_full, __progname): Added.
1997-08-04 08:31 H.J. Lu <hjl@gnu.ai.mit.edu>
* sysdeps/unix/sysv/linux/if_index.c (if_nametoindex): Return 0
if SIOGIFINDEX is not defined.
(if_indextoname): Initialize "result" to NULL.
(if_nametoindex, if_nameindex): Fix ENOSYS setting.
1997-08-11 11:58 Richard Henderson <rth@cygnus.com>
Sparc ISO C 9x exception handling:
* sysdeps/sparc/fpu/bits/mathdef.h: New file.
* sysdeps/sparc/fpu/fclrexcpt.c: New file.
* sysdeps/sparc/fpu/fegetenv.c: New file.
* sysdeps/sparc/fpu/fegetround.c: New file.
* sysdeps/sparc/fpu/feholdexcpt.c: New file.
* sysdeps/sparc/fpu/fesetenv.c: New file.
* sysdeps/sparc/fpu/fesetround.c: New file.
* sysdeps/sparc/fpu/feupdateenv.c: New file.
* sysdeps/sparc/fpu/fgetexcptflg.c: New file.
* sysdeps/sparc/fpu/fraiseexcpt.c: New file.
* sysdeps/sparc/fpu/fsetexcptflg.c: New file.
* sysdeps/sparc/fpu/ftestexcept.c: New file.
* sysdeps/sparc/sparc32/fpu/bits/fenv.h: New file.
* sysdeps/sparc/sparc64/fpu/bits/fenv.h: New file.
1997-08-11 11:58 Richard Henderson <rth@cygnus.com>
Sparc64 merge:
* configure.in: Change up subdirectories, rename sparc8->sparcv8.
* csu/Makefile: Nuke need-nopic-initfini bits. The problem was
that sparc64 ld did not recognize pic relocs at all.
* elf/dl-deps.c: Include <string.h>.
* elf/do-rel.h (elf_dynamic_do_rel): Take reloc address and size
directly instead of the DT names to get them from.
* elf/dynamic-link.h (_ELF_DYNAMIC_DO_RELOC): New macro distilled
from ELF_DYNAMIC_DO_REL{,A}. Define a second version that accounts
for the possibility that DT_RELA and DT_JMPPLT overlap, as such is
the case on the Sparc.
* elf/elf.h: Stub out Elf64_Ver*, and make them the same as the
Elf32_Ver* bits. The linker does not even know to differentiate
between the word sizes. Someone should examine this and figure
out what the proper sizes of things should be for 64-bit hosts
before the sparc64 libraries are distributed.
* shlib-versions: Rename sparc64 ld.so to not conflict with sparc32
on the same machine.
Move old sysdeps/sparc contents to sysdeps/sparc/sparc32,
rename sparc8 subdir to sparcv8, move sysdeps/sparc64 content to
sysdeps/sparc/sparc64. Same for sysdeps/unix/sysv/linux/sparc.
* sysdeps/sparc/Implies: Do ieee754 here.
* sysdeps/sparc/configure.in: Move from sparc32/.
* sysdeps/sparc/sparc32/Implies: Do wordsize here.
* sysdeps/sparc/sparc64/Implies: Likewise.
* sysdeps/sparc/sparc32/dl-machine.h (elf_machine_load_address):
Use uninitialized .got to find load address instead of AT_BASE, as
the later does not exist when running ld.so directly.
* sysdeps/sparc/sparc32/fpu/fpu_control.h: Move from ../.
* sysdeps/sparc/sparc64/fpu/fpu_control.h: Likewise.
* sysdeps/sparc/sparc32/udiv_qrnnd.S: Clean up PIC support.
* sysdeps/sparc/sparc64/Makefile (sysdep_routines): Add s_finitel
and s_signbitl for stdio.
* sysdeps/sparc/sparc64/configure.in: Remove, we no longer need
nopic_initfini.
* sysdeps/sparc/sparc64/bsd-_setjmp.S: Remove.
* sysdeps/sparc/sparc64/bsd-setjmp.S: Remove.
* sysdeps/unix/sysv/linux/sparc/sparc64/bsd-_setjmp.S: New empty file.
* sysdeps/unix/sysv/linux/sparc/sparc64/bsd-setjmp.S: New empty file.
* sysdeps/unix/sysv/linux/sparc/sparc64/longjmp.S: Add __longjmp alias.
* sysdeps/unix/sysv/linux/sparc/sparc64/setjmp.S: Add weak _setjmp
and setjmp entry points.
* sysdeps/sparc/sparc64/dl-machine.h: Finish real implementation.
* sysdeps/sparc/sparc64/elf/crtbegin.S: Add copyright, fix PIC.
* sysdeps/sparc/sparc64/elf/crtend.S: Likewise.
* sysdeps/unix/sysv/linux/sparc/bits/sigaction.h (struct sigaction):
Fix sa_flags size for sparc64; add sa_restorer for kernel.
* sysdeps/unix/sysv/linux/sparc/sparc64/brk.S: Fix PIC.
* sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/init-first.h: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/syscall.S: New file.
1997-08-10 18:29:08 1997 Mark Kettenis <kettenis@phys.uva.nl>
* login/login.c (login): Check for correct return value of
utmpname.
1997-08-11 16:49 Ulrich Drepper <drepper@cygnus.com>
* time/tzset.c (__tzset_internal): Correctly handle TZ strings
following incorrect old POSIX specs.
Patch by Paul Eggert <eggert@twinsun.com>.
* sysdeps/generic/bits/sigaction.h: Correct comment for SA_RESTART.
* sysdeps/unix/bsd/osf/bits/sigaction.h: Likewise.
* sysdeps/unix/sysv/linux/alpha/bits/sigaction.h: Likewise.
* sysdeps/unix/sysv/linux/bits/sigaction.h: Likewise.
* sysdeps/unix/sysv/linux/mips/bits/sigaction.h: Likewise.
* sysdeps/unix/sysv/linux/sparc/bits/sigaction.h: Likewise.
* sysdeps/unix/sysv/minix/bits/sigaction.h: Likewise.
* sysdeps/unix/sysv/sysv4/bits/sigaction.h: Likewise.
Reported by NIIBE Yutaka <gniibe@mri.co.jp>.
1997-08-09 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* manual/math.texi: Define the macros @mul and @infinity and use
them to format the multiplication and infinity signs.
(FP Comparison Functions): Use @code, not @math, for C code
examples.
* elf/dl-profile.c: Add descriptions and implement reading of
1997-08-14 01:54:13 +00:00
|
|
|
|
#include <stdio.h> /* Needed on stupid SunOS for assert. */
|
|
|
|
|
|
2000-08-19 16:58:09 +00:00
|
|
|
|
#if !defined _LIBC || !defined GLOB_ONLY_P
|
1996-12-02 04:00:15 +00:00
|
|
|
|
#if defined HAVE_UNISTD_H || defined _LIBC
|
1997-09-16 00:42:43 +00:00
|
|
|
|
# include <unistd.h>
|
|
|
|
|
# ifndef POSIX
|
|
|
|
|
# ifdef _POSIX_VERSION
|
|
|
|
|
# define POSIX
|
|
|
|
|
# endif
|
|
|
|
|
# endif
|
1995-02-18 01:27:10 +00:00
|
|
|
|
#endif
|
|
|
|
|
|
2006-01-11 05:30:12 +00:00
|
|
|
|
#include <pwd.h>
|
Fri Dec 8 13:04:51 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* locale/error.c, locale/error.h: Files removed.
* locale/Makefile (distribute): Remove error.h.
(lib-modules): Remove error.
* hurd/hurdlookup.c (__hurd_file_name_lookup_retry): For "tty"
magic, return ENXIO if no ctty.
* sysdeps/mach/hurd/mmap.c: For MAP_FIXED, deallocate a previous
mapping if vm_map fails for that reason.
* posix/glob.c: Implement new options GLOB_ALTDIRFUNC, GLOB_BRACE,
GLOB_TILDE, GLOB_NOMAGIC.
(glob): Use stat instead of lstat to determine directoriness.
* posix/glob.h (GLOB_ALTDIRFUNC, GLOB_BRACE, GLOB_NOMAGIC, GLOB_TILDE):
New flag bits.
(__GLOB_FLAGS): Include them.
(glob_t): New members gl_closedir, gl_readdir, gl_opendir, gl_lstat,
gl_stat.
* elf/elf.h (ET_NUM, SHT_NUM, STB_NUM, STT_NUM, PT_NUM): New macros.
* sysdeps/unix/sysv/linux/sys/mman.h: Include <linux/mman.h> to
define all the bit values.
(MAP_*, MCL_*): Macros removed.
1995-12-09 10:00:22 +00:00
|
|
|
|
|
2011-07-21 02:53:58 +00:00
|
|
|
|
#if defined HAVE_STDINT_H || defined _LIBC
|
|
|
|
|
# include <stdint.h>
|
|
|
|
|
#elif !defined UINTPTR_MAX
|
|
|
|
|
# define UINTPTR_MAX (~((size_t) 0))
|
|
|
|
|
#endif
|
|
|
|
|
|
2006-01-11 05:30:12 +00:00
|
|
|
|
#include <errno.h>
|
update from main archive
Mon Sep 23 15:31:04 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
* hurd/Makefile ($(includedir)/rpc/netdb.h): There is no make
variable `top_srcdir' in libc; use $(..) instead.
* sysdeps/mach/hurd/Makefile (rtld-installed-name): Delete special
definition. It was a *Mistake*. (With a capital M.)
* sysdeps/mach/getsysstats.c (__get_nprocs): Renamed from
__get_nproc.
(__get_nprocs_conf): Renamed from __get_nproc_conf.
Fri Sep 27 03:49:56 1996 Ulrich Drepper <drepper@cygnus.com>
Add support for cancelable system calls.
* csu/initfini.c: Make in crti.o reference to symbol
__libc_force_cancel_wrapper when compiling reentrant version.
* misc/Makefile (routines): Add force-wrapper.
* misc/force-wrapper.c: New file.
* posix/system.c: Rename function to __libc_system and make system
a weak alias.
* sysdeps/stub/system.c: Likewise.
* posix/wait.c: Rename function to __libc_wait and make __wait a
weak alias. De-ANSI-fy.
* sysdeps/standalone/read.c: Rename function to __libc_read and
make __read a weak alias.
* sysdeps/stub/read.c: Likewise.
* sysdeps/standalone/write.c: Rename function to __libc_write and
make __write a weak alias.
* sysdeps/stub/write.c: Likewise.
* sysdeps/stub/tcdrain.c: Rename function to __libc_tcdrain and
make tcdrain a weak alias.
* sysdeps/unix/bsd/tcdrain.c: Likewise.
* sysdeps/unix/bsd/bsd4.4/tcdrain.c: Likewise.
* sysdeps/unix/sysv/tcdrain.c: Likewise.
* sysdeps/unix/sysv/linux/tcdrain.c: Likewise.
* sysdeps/unix/bsd/bsd4.4/wait.c: Rename function to __libc_wait
and make __wait a weak alias.
* sysdeps/stub/waitpid.c: Rename function to __libc_waitpid and
make __waitpid a weak alias.
* sysdeps/unix/bsd/bsd4.4/waitpid.c: Likewise.
* sysdeps/unix/sysv/linux/waitpid.c: Likewise.
* sysdeps/unix/sysv/sysv4/waitpid.c: Likewise.
* sysdeps/unix/common/pause.c: Rename function to __libc_pause
and make pause a weak alias. De-ANSI-fy.
* sysdeps/unix/syscalls.list: Change name for close, fcntl, fsync,
lseek, open, read, and write to have __libc_ prefix and make old
names a weak alias.
* sysdeps/unix/mman/syscalls.list: Likewise for msync.
* sysdeps/unix/sysv/linux/syscalls.list: Likewise for nanosleep.
* io/creat.c: De-ANSI-fy.
* sysdeps/unix/sysv/linux/syscalls.list: Add pause.
Thu Sep 26 19:15:55 1996 Ulrich Drepper <drepper@cygnus.com>
* misc/mntent.h: Add MNTTYPE_* and MNTOPT_* macros.
Reported by Hans Grobler <grobh@nolian.ee.sun.ac.za>.
Thu Sep 26 14:40:10 1996 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/posix/pathconf.c: Pass descriptor for just opened file
to fpathconf.
Reported by Martin von Loewis <martin@mira.isdn.cs.tu-berlin.de>.
Thu Sep 26 04:02:43 1996 Ulrich Drepper <drepper@cygnus.com>
* locale/programs/locfile.c (write_locale_data): Allocate room
even for file name for LC_MESSAGES locale.
(locafile_read): `tok_era' must be handled as a string list.
* locale/programs/ld-time.c: Finish correction of handling `era'.
* locale/C-time.c (_nl_C_LC_TIME): Add initializer for new fields.
* locale/categories.def: Add postload function for LC_TIME.
* locale/setlocale.c: Make lock global and rename to
__libc_setlocale_lock.
* locale/localeinfo.h (struct era_entry): New type. Used in strftime.
Add prototypes for _nl_get_era_entry and _nl_get_alt_digit.
* locale/lc-time.c (_nl_postload_time): New function. Initialize
lazy intialization.
(_nl_get_era_entry): New function. Return era entry which corresponds
to given year.
(_nl_get_alt_digit): New function. Return string with alternate
digit representation for given number.
* time/strftime.c (strftime): Use _nl_get_alt_digit to get
string representing alternate digit notation.
Wed Sep 25 17:31:55 1996 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/generic/waitstatus.h (union wait): Add w_status field.
Reported by Hans Grobler <grobh@nolian.ee.sun.ac.za>.
* elf/rtld.c (dl_main): Process LD_PRELOAD before loading
ld.so.preload. Suggested by David Engel <david@elo.ods.com>.
Wed Sep 25 13:10:57 1996 Ulrich Drepper <drepper@cygnus.com>
* catgets/gencat.c (main): Change --version again because RMS wants
the package name in parentheses.
* db/makedb.c: Likewise.
* locale/programs/locale.c: Likewise.
* locale/programs/localedef.c: Likewise.
Tue Sep 24 01:28:05 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* Makefile ($(objpfx)sysd-dirs): Depend on Subdirs files, command
rewritten.
($(objpfx)version-info.h): Depend on Banner files, command
rewritten.
Wed Sep 25 02:44:41 1996 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/unix/sysv/linux/sleep.c: New file. Based on nanosleep.
Tue Sep 24 21:46:02 1996 Ulrich Drepper <drepper@cygnus.com>
* shadow/lckpwdf.c (PWD_LOCKFILE): Change to /etc/lock.pwd to be
on the same device as the password file.
* shadow/shadow.h (struct spwd): Change type of numeric fields
to `long int' since there value are days, not seconds.
* shadow/putspent.c: Change casts from time_t to `long int'.
* shadow/sgetspent_r.c (LINE_READER): Likewise.
Mon Sep 23 23:05:24 1996 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/unix/sysv/linux/errnos.h: Define __set_errno to make
sure the thread specific variable is set as well as the global
variable.
* sysdeps/mach/hurd/errnos.awk: Define macro for source code
compatibility.
* sysdeps/stub/errnos.h: Likewise.
* sysdeps/unix/bsd/bsd4.4/errnos.h: Likewise.
* shadow/putspent.c: Don't include <errno.h>.
* dirent/scandir.c (scandir): Use __set_errno to set errno
variable.
* elf/dl-load.c (open_path): Likewise.
* inet/rcmd.c (rcmd): Likewise.
(rresvport): Likewise.
* intl/dcgettext.c [!__set_errno]: Define __set_errno.
(DCGETTEXT): Use __set_errno to set errno variable.
* io/fts.c (fts_open): Likewise.
(fts_close): Likewise.
(fts_read): Likewise.
(fts_set): Likewise.
(fts_children): Likewise.
(fts_build): Likewise.
(fts_stat): Likewise.
* io/ftw.c (ftw_dir): Likewise.
(ftw): Likewise.
* io/getwd.c (getwd): Likewise.
* io/lockf.c (lockf): Likewise.
* libio/libioP.h [EINVAL]: Use __set_errno to define MAYBE_SET_EINVAL.
* libio/iofdopen.c (_IO_fdopen): Use MAYBE_SET_EINVAL to errno.
* libio/iogetdelim.c (_IO_getdelim): Likewise.
* libio/fileops.c (_IO_file_open): Use __set_errno to set errno
variable.
* libio/iofgetpos.c (_IO_fgetpos): Likewise.
* libio/iofsetpos.c (_IO_fsetpos): Likewise.
* libio/ioftell.c (_IO_ftell): Likewise.
* locale/loadlocale.c (_nl_load_locale): Likewise.
* locale/nl_langinfo.c (nl_langinfo): Likewise.
* locale/setlocale.c (ERROR_RETURN): Likewise.
* login/getutid_r (__getutid_r): Likewise.
* login/getutline_r (__getutline_r): Likewise.
* login/login.c (tty_name): Likewise.
* login/oututline_r.c (__pututline_r): Likewise.
* malloc/malloc.c (morecore): Likewise.
* misc/efgcvt_r.c (fcvt_r): Likewise.
* misc/hsearch_r.c (hcreate_r): Likewise.
(hdestroy_r): Likewise.
(hsearch_r): Likewise.
* nss/nsswitch.c (__nss_configure_lookup): Likewise.
* nss/nss_dns/dns-host.c (_nss_dns_gethostbyname2_r): Likewise.
(_nss_dns_gethostbyaddr_r): Likewise.
* nss/nss_files/files-XXX.c (internal_getent): Likewise.
* nss/nss_files/files-parse.c (parse_list): Likewise.
* posix/confstr.c (confstr): Likewise. De-ANSI-fy.
* posix/execvp.c (execvp): Likewise.
* posix/glob.c: Define __set_errno.
(glob): Use __set_errno to set errno variable.
(glob_in_dir): Likewise.
* pwd/getpw.c: Likewise. De-ANSI-fy.
* pwd/putpwent.c: Likewise.
* resolv/inet_net_ntop.c: Likewise.
* resolv/inet_net_pton.c: Likewise.
* resolv/inet_neta.c: Likewise.
* resolv/inet_ntop.c: Likewise.
* resolv/inet_pton.c: Likewise.
* resolv/res_query.c (res_search): Likewise.
* resolv/res_send.c (Aerror): Likewise.
(Perror): Likewise.
(res_send): Likewise.
* signal/sigaddset.c: Likewise. De-ANSI-fy.
* signal/sigdelset.c: Likewise.
* signal/sigempty.c: Likewise.
* signal/sigfillset.c: Likewise.
* signal/sigismem.c: Likewise.
* stdio/fclose.c: Likewise.
* stdio/feof.c: Likewise.
* stdio/ferror.c: Likewise.
* stdio/fflush.c: Likewise.
* stdio/fgetc.c: Likewise.
* stdio/fgetpos.c: Likewise.
* stdio/fgets.c: Likewise.
* stdio/fileno.c: Likewise.
* stdio/fmemopen.c: Likewise.
* stdio/fopen.c: Likewise.
* stdio/fputc.c: Likewise.
* stdio/fread.c: Likewise.
* stdio/freopen.c: Likewise.
* stdio/fseek.c: Likewise.
* stdio/fsetpos.c: Likewise.
* stdio/ftell.c: Likewise.
* stdio/fwrite.c: Likewise.
* stdio/getdelim.c: Likewise.
* stdio/gets.c: Likewise.
* stdio/glue.c: Likewise.
* stdio/internals.c: Likewise.
* stdio/memstream.c: Likewise.
* stdio/setvbuf.c: Likewise.
* stdio/ungetc.c: Likewise.
* stdio/vsscanf.c: Likewise.
* stdio-common/reg-printf.c: Likewise.
* stdio-common/vfprintf.c: Likewise.
* stdio-common/vfscanf.c: Likewise.
* stdlib/canonicalize.c: Likewise.
* stdlib/msort.c: Likewise.
* stdlib/random_r.c: Likewise.
* stdlib/strfmon.c: Likewise.
* stdlib/strtod.c: Likewise.
* stdlib/strtol.c: Likewise.
* sunrpc/bindrsvprt.c: Likewise.
* time/asctime.c: Likewise.
* time/localtime.c: Likewise.
* wcsmbs/mbrtowc.c: Likewise.
* wcsmbs/mbsnrtowcs.c: Likewise.
* wcsmbs/mbsrtowcs.c: Likewise.
* wcsmbs/wcrtomb.c: Likewise.
* wcsmbs/wcsnrtombs.c: Likewise.
* wcsmbs/wcsrtombs.c: Likewise.
* wcsmbs/wcstok.c: Likewise.
* sysdeps/generic/ftime.c: Likewise.
* sysdeps/generic/pty.c: Likewise.
* sysdeps/generic/setenv.c: Likewise.
* sysdeps/generic/speed.c: Likewise.
* sysdeps/generic/sysd-stdio.c: Likewise.
* sysdeps/generic/uname.c: Likewise.
* sysdeps/generic/vlimit.c: Likewise.
* sysdeps/libm-ieee754/k_standard.c: Likewise.
* sysdeps/libm-ieee754/s_ldexp.c: Likewise.
* sysdeps/libm-ieee754/s_ldexpf.c: Likewise.
* sysdeps/libm-ieee754/s_ldexpl.c: Likewise.
* sysdeps/libm-ieee754/w_scalb.c: Likewise.
* sysdeps/libm-ieee754/w_scalbf.c: Likewise.
* sysdeps/libm-ieee754/w_scalbl.c: Likewise.
* sysdeps/posix/dup2.c: Likewise.
* sysdeps/posix/euidaccess.c: Likewise.
* sysdeps/posix/fdopen.c: Likewise.
* sysdeps/posix/flock.c: Likewise.
* sysdeps/posix/fpathconf.c: Likewise.
* sysdeps/posix/getcwd.c: Likewise.
* sysdeps/posix/gettimeofday.c: Likewise.
* sysdeps/posix/isatty.c: Likewise.
* sysdeps/posix/isfdtype.c: Likewise.
* sysdeps/posix/killpg.c: Likewise.
* sysdeps/posix/mkstemp.c: Likewise.
* sysdeps/posix/mktemp.c: Likewise.
* sysdeps/posix/pathconf.c: Likewise.
* sysdeps/posix/pipestream.c: Likewise.
* sysdeps/posix/remove.c: Likewise.
* sysdeps/posix/rename.c: Likewise.
* sysdeps/posix/sigintr.c: Likewise.
* sysdeps/posix/signal.c: Likewise.
* sysdeps/posix/sigsuspend.c: Likewise.
* sysdeps/posix/sigvec.c: Likewise.
* sysdeps/posix/sleep.c: Likewise.
* sysdeps/posix/sysconf.c: Likewise.
* sysdeps/posix/system.c: Likewise.
* sysdeps/posix/tempname.c: Likewise.
* sysdeps/posix/truncate.c: Likewise.
* sysdeps/posix/ttyname.c: Likewise.
* sysdeps/posix/ttyname_r.c: Likewise.
* sysdeps/posix/wait3.c: Likewise.
* sysdeps/standalone/close.c: Likewise.
* sysdeps/standalone/open.c: Likewise.
* sysdeps/standalone/read.c: Likewise.
* sysdeps/standalone/write.c: Likewise.
* sysdeps/stub/__longjmp.c: Likewise.
* sysdeps/stub/accept.c: Likewise.
* sysdeps/stub/access.c: Likewise.
* sysdeps/stub/acct.c: Likewise.
* sysdeps/stub/adjtime.c: Likewise.
* sysdeps/stub/alarm.c: Likewise.
* sysdeps/stub/bind.c: Likewise.
* sysdeps/stub/brk.c: Likewise.
* sysdeps/stub/chdir.c: Likewise.
* sysdeps/stub/chflags.c: Likewise.
* sysdeps/stub/chmod.c: Likewise.
* sysdeps/stub/chown.c: Likewise.
* sysdeps/stub/chroot.c: Likewise.
* sysdeps/stub/clock.c: Likewise.
* sysdeps/stub/close.c: Likewise.
* sysdeps/stub/closedir.c: Likewise.
* sysdeps/stub/connect.c: Likewise.
* sysdeps/stub/ctermid.c: Likewise.
* sysdeps/stub/cuserid.c: Likewise.
* sysdeps/stub/dirfd.c: Likewise.
* sysdeps/stub/dup.c: Likewise.
* sysdeps/stub/dup2.c: Likewise.
* sysdeps/stub/euidaccess.c: Likewise.
* sysdeps/stub/execve.c: Likewise.
* sysdeps/stub/fchdir.c: Likewise.
* sysdeps/stub/fchflags.c: Likewise.
* sysdeps/stub/fchmod.c: Likewise.
* sysdeps/stub/fchown.c: Likewise.
* sysdeps/stub/fcntl.c: Likewise.
* sysdeps/stub/fdopen.c: Likewise.
* sysdeps/stub/fexecve.c: Likewise.
* sysdeps/stub/flock.c: Likewise.
* sysdeps/stub/fork.c: Likewise.
* sysdeps/stub/fpathconf.c: Likewise.
* sysdeps/stub/fstatfs.c: Likewise.
* sysdeps/stub/fsync.c: Likewise.
* sysdeps/stub/ftruncate.c: Likewise.
* sysdeps/stub/fxstat.c: Likewise.
* sysdeps/stub/getcwd.c: Likewise.
* sysdeps/stub/getdents.c: Likewise.
* sysdeps/stub/getdomain.c: Likewise.
* sysdeps/stub/getdtsz.c: Likewise.
* sysdeps/stub/getegid.c: Likewise.
* sysdeps/stub/getenv.c: Likewise.
* sysdeps/stub/geteuid.c: Likewise.
* sysdeps/stub/getgid.c: Likewise.
* sysdeps/stub/getgroups.c: Likewise.
* sysdeps/stub/gethostid.c: Likewise.
* sysdeps/stub/gethostname.c: Likewise.
* sysdeps/stub/getitimer.c: Likewise.
* sysdeps/stub/getlogin.c: Likewise.
* sysdeps/stub/getlogin_r.c: Likewise.
* sysdeps/stub/getpagesize.c: Likewise.
* sysdeps/stub/getpeername.c: Likewise.
* sysdeps/stub/getpid.c: Likewise.
* sysdeps/stub/getppid.c: Likewise.
* sysdeps/stub/getpriority.c: Likewise.
* sysdeps/stub/getrlimit.c: Likewise.
* sysdeps/stub/getrusage.c: Likewise.
* sysdeps/stub/getsid.c: Likewise.
* sysdeps/stub/getsockname.c: Likewise.
* sysdeps/stub/getsockopt.c: Likewise.
* sysdeps/stub/getsysstats.c: Likewise.
* sysdeps/stub/gettimeofday.c: Likewise.
* sysdeps/stub/getuid.c: Likewise.
* sysdeps/stub/gtty.c: Likewise.
* sysdeps/stub/ioctl.c: Likewise.
* sysdeps/stub/isatty.c: Likewise.
* sysdeps/stub/isfdtype.c: Likewise.
* sysdeps/stub/kill.c: Likewise.
* sysdeps/stub/killpg.c: Likewise.
* sysdeps/stub/link.c: Likewise.
* sysdeps/stub/listen.c: Likewise.
* sysdeps/stub/lseek.c: Likewise.
* sysdeps/stub/lxstat.c: Likewise.
* sysdeps/stub/madvice.c: Likewise.
* sysdeps/stub/mkdir.c: Likewise.
* sysdeps/stub/mkfifo.c: Likewise.
* sysdeps/stub/mkstemp.c: Likewise.
* sysdeps/stub/mktemp.c: Likewise.
* sysdeps/stub/mmap.c: Likewise.
* sysdeps/stub/morecore.c: Likewise.
* sysdeps/stub/mprotect.c: Likewise.
* sysdeps/stub/msgctl.c: Likewise.
* sysdeps/stub/msgget.c: Likewise.
* sysdeps/stub/msgrcv.c: Likewise.
* sysdeps/stub/msgsnd.c: Likewise.
* sysdeps/stub/msync.c: Likewise.
* sysdeps/stub/munmap.c: Likewise.
* sysdeps/stub/nanosleep.c: Likewise.
* sysdeps/stub/nice.c: Likewise.
* sysdeps/stub/nlist.c: Likewise.
* sysdeps/stub/open.c: Likewise.
* sysdeps/stub/opendir.c: Likewise.
* sysdeps/stub/pathconf.c: Likewise.
* sysdeps/stub/pause.c: Likewise.
* sysdeps/stub/pipe.c: Likewise.
* sysdeps/stub/pipestream.c: Likewise.
* sysdeps/stub/poll.c: Likewise.
* sysdeps/stub/profil.c: Likewise.
* sysdeps/stub/ptrace.c: Likewise.
* sysdeps/stub/putenv.c: Likewise.
* sysdeps/stub/raise.c: Likewise.
* sysdeps/stub/read.c: Likewise.
* sysdeps/stub/readdir.c: Likewise.
* sysdeps/stub/readlink.c: Likewise.
* sysdeps/stub/readv.c: Likewise.
* sysdeps/stub/reboot.c: Likewise.
* sysdeps/stub/recv.c: Likewise.
* sysdeps/stub/recvfrom.c: Likewise.
* sysdeps/stub/recvmsg.c: Likewise.
* sysdeps/stub/remove.c: Likewise.
* sysdeps/stub/rename.c: Likewise.
* sysdeps/stub/revoke.c: Likewise.
* sysdeps/stub/rewinddir.c: Likewise.
* sysdeps/stub/rmdir.c: Likewise.
* sysdeps/stub/sbrk.c: Likewise.
* sysdeps/stub/sched_getp.c: Likewise.
* sysdeps/stub/sched_gets.c: Likewise.
* sysdeps/stub/sched_primax.c: Likewise.
* sysdeps/stub/sched_primin.c: Likewise.
* sysdeps/stub/sched_rr_gi.c: Likewise.
* sysdeps/stub/sched_setp.c: Likewise.
* sysdeps/stub/sched_sets.c: Likewise.
* sysdeps/stub/sched_yield.c: Likewise.
* sysdeps/stub/seekdir.c: Likewise.
* sysdeps/stub/select.c: Likewise.
* sysdeps/stub/semctl.c: Likewise.
* sysdeps/stub/semget.c: Likewise.
* sysdeps/stub/semop.c: Likewise.
* sysdeps/stub/send.c: Likewise.
* sysdeps/stub/sendmsg.c: Likewise.
* sysdeps/stub/sendto.c: Likewise.
* sysdeps/stub/setdomain.c: Likewise.
* sysdeps/stub/setegid.c: Likewise.
* sysdeps/stub/setenv.c: Likewise.
* sysdeps/stub/seteuid.c: Likewise.
* sysdeps/stub/setgid.c: Likewise.
* sysdeps/stub/setgroups.c: Likewise.
* sysdeps/stub/sethostid.c: Likewise.
* sysdeps/stub/sethostname.c: Likewise.
* sysdeps/stub/setitimer.c: Likewise.
* sysdeps/stub/setjmp.c: Likewise.
* sysdeps/stub/setlogin.c: Likewise.
* sysdeps/stub/setpgid.c: Likewise.
* sysdeps/stub/setpriority.c: Likewise.
* sysdeps/stub/setregid.c: Likewise.
* sysdeps/stub/setreuid.c: Likewise.
* sysdeps/stub/setrlimit.c: Likewise.
* sysdeps/stub/setsid.c: Likewise.
* sysdeps/stub/setsockopt.c: Likewise.
* sysdeps/stub/settimeofday.c: Likewise.
* sysdeps/stub/setuid.c: Likewise.
* sysdeps/stub/shmat.c: Likewise.
* sysdeps/stub/shmctl.c: Likewise.
* sysdeps/stub/shmdt.c: Likewise.
* sysdeps/stub/shmget.c: Likewise.
* sysdeps/stub/shutdown.c: Likewise.
* sysdeps/stub/sigaction.c: Likewise.
* sysdeps/stub/sigaltstack.c: Likewise.
* sysdeps/stub/sigblock.c: Likewise.
* sysdeps/stub/sigintr.c: Likewise.
* sysdeps/stub/signal.c: Likewise.
* sysdeps/stub/sigpause.c: Likewise.
* sysdeps/stub/sigpending.c: Likewise.
* sysdeps/stub/sigprocmask.c: Likewise.
* sysdeps/stub/sigreturn.c: Likewise.
* sysdeps/stub/sigsetmask.c: Likewise.
* sysdeps/stub/sigstack.c: Likewise.
* sysdeps/stub/sigsuspend.c: Likewise.
* sysdeps/stub/sigvec.c: Likewise.
* sysdeps/stub/sleep.c: Likewise.
* sysdeps/stub/socket.c: Likewise.
* sysdeps/stub/socketpair.c: Likewise.
* sysdeps/stub/sstk.c: Likewise.
* sysdeps/stub/statfs.c: Likewise.
* sysdeps/stub/stime.c: Likewise.
* sysdeps/stub/stty.c: Likewise.
* sysdeps/stub/swapoff.c: Likewise.
* sysdeps/stub/swapon.c: Likewise.
* sysdeps/stub/symlink.c: Likewise.
* sysdeps/stub/sync.c: Likewise.
* sysdeps/stub/syscall.c: Likewise.
* sysdeps/stub/sysconf.c: Likewise.
* sysdeps/stub/sysd-stdio.c: Likewise.
* sysdeps/stub/system.c: Likewise.
* sysdeps/stub/tcdrain.c: Likewise.
* sysdeps/stub/tcflow.c: Likewise.
* sysdeps/stub/tcflush.c: Likewise.
* sysdeps/stub/tcgetattr.c: Likewise.
* sysdeps/stub/tcgetpgrp.c: Likewise.
* sysdeps/stub/tcsendbrk.c: Likewise.
* sysdeps/stub/tcsetattr.c: Likewise.
* sysdeps/stub/tcsetpgrp.c: Likewise.
* sysdeps/stub/telldir.c: Likewise.
* sysdeps/stub/tempname.c: Likewise.
* sysdeps/stub/time.c: Likewise.
* sysdeps/stub/times.c: Likewise.
* sysdeps/stub/truncate.c: Likewise.
* sysdeps/stub/ttyname.c: Likewise.
* sysdeps/stub/ttyname_r.c: Likewise.
* sysdeps/stub/ualarm.c: Likewise.
* sysdeps/stub/ulimit.c: Likewise.
* sysdeps/stub/umask.c: Likewise.
* sysdeps/stub/unlink.c: Likewise.
* sysdeps/stub/usleep.c: Likewise.
* sysdeps/stub/ustat.c: Likewise.
* sysdeps/stub/utime.c: Likewise.
* sysdeps/stub/utimes.c: Likewise.
* sysdeps/stub/vhangup.c: Likewise.
* sysdeps/stub/wait.c: Likewise.
* sysdeps/stub/wait3.c: Likewise.
* sysdeps/stub/wait4.c: Likewise.
* sysdeps/stub/waitpid.c: Likewise.
* sysdeps/stub/write.c: Likewise.
* sysdeps/stub/writev.c: Likewise.
* sysdeps/stub/xmknod.c: Likewise.
* sysdeps/stub/xstat.c: Likewise.
* sysdeps/unix/closedir.c: Likewise.
* sysdeps/unix/fxstat.c: Likewise.
* sysdeps/unix/getlogin.c: Likewise.
* sysdeps/unix/getlogin_r.c: Likewise.
* sysdeps/unix/mkdir.c: Likewise.
* sysdeps/unix/nice.c: Likewise.
* sysdeps/unix/nlist.c: Likewise.
* sysdeps/unix/opendir.c: Likewise.
* sysdeps/unix/readdir.c: Likewise.
* sysdeps/unix/rmdir.c: Likewise.
* sysdeps/unix/stime.c: Likewise.
* sysdeps/unix/xmknod.c: Likewise.
* sysdeps/unix/xstat.c: Likewise.
* sysdeps/unix/bsd/isatty.c: Likewise.
* sysdeps/unix/bsd/setegid.c: Likewise.
* sysdeps/unix/bsd/seteuid.c: Likewise.
* sysdeps/unix/bsd/setsid.c: Likewise.
* sysdeps/unix/bsd/sigaction.c: Likewise.
* sysdeps/unix/bsd/sigprocmask.c: Likewise.
* sysdeps/unix/bsd/sigsuspend.c: Likewise.
* sysdeps/unix/bsd/tcflow.c: Likewise.
* sysdeps/unix/bsd/tcflush.c: Likewise.
* sysdeps/unix/bsd/tcgetattr.c: Likewise.
* sysdeps/unix/bsd/tcsetattr.c: Likewise.
* sysdeps/unix/bsd/times.c: Likewise.
* sysdeps/unix/bsd/ulimit.c: Likewise.
* sysdeps/unix/common/lxstat.c: Likewise.
* sysdeps/unix/common/tcsendbrk.c: Likewise.
* sysdeps/unix/sysv/setrlimit.c: Likewise.
* sysdeps/unix/sysv/settimeofday.c: Likewise.
* sysdeps/unix/sysv/sigaction.c: Likewise.
* sysdeps/unix/sysv/tcflow.c: Likewise.
* sysdeps/unix/sysv/tcflush.c: Likewise.
* sysdeps/unix/sysv/tcgetattr.c: Likewise.
* sysdeps/unix/sysv/tcsendbrk.c: Likewise.
* sysdeps/unix/sysv/tcsetattr.c: Likewise.
* sysdeps/unix/bsd/ultrix4/sysconf.c: Likewise.
* sysdeps/unix/sysv/irix4/getpriority.c: Likewise.
* sysdeps/unix/sysv/irix4/setpriority.c: Likewise.
* sysdeps/unix/sysv/linux/adjtime.c: Likewise.
* sysdeps/unix/sysv/linux/gethostid.c: Likewise.
* sysdeps/unix/sysv/linux/gethostname.c: Likewise.
* sysdeps/unix/sysv/linux/getsysstats.c: Likewise.
* sysdeps/unix/sysv/linux/ptrace.c: Likewise.
* sysdeps/unix/sysv/linux/speed.c: Likewise.
* sysdeps/unix/sysv/linux/ulimit.c: Likewise.
* sysdeps/unix/sysv/sysv4/sigaction.c: Likewise.
* sysdeps/unix/sysv/sysv4/sysconf.c: Likewise.
* sysdeps/unix/bsd/sun/m68k/sigtramp.c: Likewise.
* sysdeps/unix/bsd/sun/sparc/sigtramp.c: Likewise.
* sysdeps/unix/bsd/sun/sunos4/speed.c: Likewise.
* sysdeps/unix/bsd/sun/sunos4/tcsetattr.c: Likewise.
* sysdeps/unix/sysv/linux/alpha/ioperm.c: Likewise.
* sysdeps/unix/sysv/linux/i386/brk.c: Likewise.
* sysdeps/unix/sysv/linux/i386/sigaction.c: Likewise.
* sysdeps/unix/sysv/linux/m68k/brk.c: Likewise.
* sunrpc/clnt_tcp.c: Protect declaration of errno by #ifndef.
* sunrpc/clnt_udp.c: Likewise.
* sunrpc/bindrsvprt.c: Likewise.
* sunrpc/pm_getmaps.c: Likewise.
* sunrpc/pmap_rmt.c: Likewise.
* sunrpc/svc.c: Likewise.
* sunrpc/svc_run.c: Likewise.
* sunrpc/svc_tcp.c: Likewise.
* sunrpc/svc_udp.c: Likewise.
* sysdeps/generic/strtok.c: Don't check argument, just crash.
* sysdeps/generic/strtok_r.c: Likewise.
* sysdeps/stub/start.c: Make __errno a strong alias of errno.
* sysdeps/unix/start.c: Likewise. De-ANSI-fy.
* sysdeps/unix/sparc/start.c: Likewise.
* sysdeps/standalone/m68k/m68020/start.S: Likewise.
* sysdeps/unix/sysv/irix4/start.c: Likewise.
* sysdeps/unix/bsd/ultrix4/mips/start.S: Likewise.
* sysdeps/unix/sysv/linux/i386/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/m68k/sysdep.S: Likewise.
Mon Sep 23 17:54:57 1996 Ulrich Drepper <drepper@cygnus.com>
* catgets/gencat.c (main): Put package name in --version message
in parantheses. Reported by Jim Meyering.
* db/makedb.c: Likewise.
* locale/programs/locale.c: Likewise.
* locale/programs/localedef.c: Likewise.
* sysdeps/i386/fpu/__math.h (tan): Make sure gcc knows we use
two registers. Patch by John Bowman.
Sat Sep 21 15:08:25 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/mach/libc-lock.h: Fix comment.
* sysdeps/stubs/libc-lock.h: Likewise.
Sat Sep 21 13:50:40 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* libio/genops.c (_IO_init) [_IO_MTSAFE_IO]: Dereference pointer
to lock when passing it to __libc_lock_init macro.
(_IO_default_finish) [_IO_MTSAFE_IO]: Dereference pointer to lock
when passing it to __libc_lock_fini macro.
Sat Sep 21 14:35:40 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/unix/sysv/linux/m68k/sysdep.h (SYSCALL_ERROR_HANDLER)
[_LIBC_REENTRANT]: Add missing semicolon.
* sysdeps/unix/sysv/linux/m68k/sysdep.S: Move inclusion of
sysdep.h to the top outside of #ifndef PIC. Don't include errnos.h.
Use the ENTRY macro.
Sat Sep 21 14:33:41 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* libio/Makefile: Make `all' the default target.
* po/Makefile: Likewise.
Mon Sep 23 15:49:47 1996 Ulrich Drepper <drepper@cygnus.com>
* stdlib/test-canon.c: Correct patch from Thu Sep 12 23:01:16 1996.
I applied it incorrectly.
* sysdeps/m68k/fpu/s_scalbn.c: Likewise.
* sysdeps/m68k/fpu/s_scalbnf.c: Likewise.
* sysdeps/m68k/fpu/s_scalbnl.c: Likewise.
Mon Sep 23 03:00:10 1996 Ulrich Drepper <drepper@cygnus.com>
* shadow/sgetspent_r.c (LINE_PARSER): Accept empty 9th field.
Patch by NIIBE Yutaka <gniibe@mri.co.jp>.
* shadow/sgetspent_r.c (LINE_PARSER): Don't accept any chars after
9th field.
* sysdeps/unix/sysv/linux/Makefile [$(subdir)==misc]
(sysdep_headers): Add sys/debugreg.h, sys/kd.h, sys/soundcard.h,
and sys/vt.h.
* sysdeps/unix/sysv/linux/sys/debugreg.h: New file.
* sysdeps/unix/sysv/linux/sys/kd.h: New file.
* sysdeps/unix/sysv/linux/sys/soundcard.h: New file.
* sysdeps/unix/sysv/linux/sys/vt.h: New file.
Reported by NIIBE Yutaka <gniibe@mri.co.jp>.
1996-09-27 03:45:24 +00:00
|
|
|
|
#ifndef __set_errno
|
1997-09-16 00:42:43 +00:00
|
|
|
|
# define __set_errno(val) errno = (val)
|
update from main archive
Mon Sep 23 15:31:04 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
* hurd/Makefile ($(includedir)/rpc/netdb.h): There is no make
variable `top_srcdir' in libc; use $(..) instead.
* sysdeps/mach/hurd/Makefile (rtld-installed-name): Delete special
definition. It was a *Mistake*. (With a capital M.)
* sysdeps/mach/getsysstats.c (__get_nprocs): Renamed from
__get_nproc.
(__get_nprocs_conf): Renamed from __get_nproc_conf.
Fri Sep 27 03:49:56 1996 Ulrich Drepper <drepper@cygnus.com>
Add support for cancelable system calls.
* csu/initfini.c: Make in crti.o reference to symbol
__libc_force_cancel_wrapper when compiling reentrant version.
* misc/Makefile (routines): Add force-wrapper.
* misc/force-wrapper.c: New file.
* posix/system.c: Rename function to __libc_system and make system
a weak alias.
* sysdeps/stub/system.c: Likewise.
* posix/wait.c: Rename function to __libc_wait and make __wait a
weak alias. De-ANSI-fy.
* sysdeps/standalone/read.c: Rename function to __libc_read and
make __read a weak alias.
* sysdeps/stub/read.c: Likewise.
* sysdeps/standalone/write.c: Rename function to __libc_write and
make __write a weak alias.
* sysdeps/stub/write.c: Likewise.
* sysdeps/stub/tcdrain.c: Rename function to __libc_tcdrain and
make tcdrain a weak alias.
* sysdeps/unix/bsd/tcdrain.c: Likewise.
* sysdeps/unix/bsd/bsd4.4/tcdrain.c: Likewise.
* sysdeps/unix/sysv/tcdrain.c: Likewise.
* sysdeps/unix/sysv/linux/tcdrain.c: Likewise.
* sysdeps/unix/bsd/bsd4.4/wait.c: Rename function to __libc_wait
and make __wait a weak alias.
* sysdeps/stub/waitpid.c: Rename function to __libc_waitpid and
make __waitpid a weak alias.
* sysdeps/unix/bsd/bsd4.4/waitpid.c: Likewise.
* sysdeps/unix/sysv/linux/waitpid.c: Likewise.
* sysdeps/unix/sysv/sysv4/waitpid.c: Likewise.
* sysdeps/unix/common/pause.c: Rename function to __libc_pause
and make pause a weak alias. De-ANSI-fy.
* sysdeps/unix/syscalls.list: Change name for close, fcntl, fsync,
lseek, open, read, and write to have __libc_ prefix and make old
names a weak alias.
* sysdeps/unix/mman/syscalls.list: Likewise for msync.
* sysdeps/unix/sysv/linux/syscalls.list: Likewise for nanosleep.
* io/creat.c: De-ANSI-fy.
* sysdeps/unix/sysv/linux/syscalls.list: Add pause.
Thu Sep 26 19:15:55 1996 Ulrich Drepper <drepper@cygnus.com>
* misc/mntent.h: Add MNTTYPE_* and MNTOPT_* macros.
Reported by Hans Grobler <grobh@nolian.ee.sun.ac.za>.
Thu Sep 26 14:40:10 1996 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/posix/pathconf.c: Pass descriptor for just opened file
to fpathconf.
Reported by Martin von Loewis <martin@mira.isdn.cs.tu-berlin.de>.
Thu Sep 26 04:02:43 1996 Ulrich Drepper <drepper@cygnus.com>
* locale/programs/locfile.c (write_locale_data): Allocate room
even for file name for LC_MESSAGES locale.
(locafile_read): `tok_era' must be handled as a string list.
* locale/programs/ld-time.c: Finish correction of handling `era'.
* locale/C-time.c (_nl_C_LC_TIME): Add initializer for new fields.
* locale/categories.def: Add postload function for LC_TIME.
* locale/setlocale.c: Make lock global and rename to
__libc_setlocale_lock.
* locale/localeinfo.h (struct era_entry): New type. Used in strftime.
Add prototypes for _nl_get_era_entry and _nl_get_alt_digit.
* locale/lc-time.c (_nl_postload_time): New function. Initialize
lazy intialization.
(_nl_get_era_entry): New function. Return era entry which corresponds
to given year.
(_nl_get_alt_digit): New function. Return string with alternate
digit representation for given number.
* time/strftime.c (strftime): Use _nl_get_alt_digit to get
string representing alternate digit notation.
Wed Sep 25 17:31:55 1996 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/generic/waitstatus.h (union wait): Add w_status field.
Reported by Hans Grobler <grobh@nolian.ee.sun.ac.za>.
* elf/rtld.c (dl_main): Process LD_PRELOAD before loading
ld.so.preload. Suggested by David Engel <david@elo.ods.com>.
Wed Sep 25 13:10:57 1996 Ulrich Drepper <drepper@cygnus.com>
* catgets/gencat.c (main): Change --version again because RMS wants
the package name in parentheses.
* db/makedb.c: Likewise.
* locale/programs/locale.c: Likewise.
* locale/programs/localedef.c: Likewise.
Tue Sep 24 01:28:05 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* Makefile ($(objpfx)sysd-dirs): Depend on Subdirs files, command
rewritten.
($(objpfx)version-info.h): Depend on Banner files, command
rewritten.
Wed Sep 25 02:44:41 1996 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/unix/sysv/linux/sleep.c: New file. Based on nanosleep.
Tue Sep 24 21:46:02 1996 Ulrich Drepper <drepper@cygnus.com>
* shadow/lckpwdf.c (PWD_LOCKFILE): Change to /etc/lock.pwd to be
on the same device as the password file.
* shadow/shadow.h (struct spwd): Change type of numeric fields
to `long int' since there value are days, not seconds.
* shadow/putspent.c: Change casts from time_t to `long int'.
* shadow/sgetspent_r.c (LINE_READER): Likewise.
Mon Sep 23 23:05:24 1996 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/unix/sysv/linux/errnos.h: Define __set_errno to make
sure the thread specific variable is set as well as the global
variable.
* sysdeps/mach/hurd/errnos.awk: Define macro for source code
compatibility.
* sysdeps/stub/errnos.h: Likewise.
* sysdeps/unix/bsd/bsd4.4/errnos.h: Likewise.
* shadow/putspent.c: Don't include <errno.h>.
* dirent/scandir.c (scandir): Use __set_errno to set errno
variable.
* elf/dl-load.c (open_path): Likewise.
* inet/rcmd.c (rcmd): Likewise.
(rresvport): Likewise.
* intl/dcgettext.c [!__set_errno]: Define __set_errno.
(DCGETTEXT): Use __set_errno to set errno variable.
* io/fts.c (fts_open): Likewise.
(fts_close): Likewise.
(fts_read): Likewise.
(fts_set): Likewise.
(fts_children): Likewise.
(fts_build): Likewise.
(fts_stat): Likewise.
* io/ftw.c (ftw_dir): Likewise.
(ftw): Likewise.
* io/getwd.c (getwd): Likewise.
* io/lockf.c (lockf): Likewise.
* libio/libioP.h [EINVAL]: Use __set_errno to define MAYBE_SET_EINVAL.
* libio/iofdopen.c (_IO_fdopen): Use MAYBE_SET_EINVAL to errno.
* libio/iogetdelim.c (_IO_getdelim): Likewise.
* libio/fileops.c (_IO_file_open): Use __set_errno to set errno
variable.
* libio/iofgetpos.c (_IO_fgetpos): Likewise.
* libio/iofsetpos.c (_IO_fsetpos): Likewise.
* libio/ioftell.c (_IO_ftell): Likewise.
* locale/loadlocale.c (_nl_load_locale): Likewise.
* locale/nl_langinfo.c (nl_langinfo): Likewise.
* locale/setlocale.c (ERROR_RETURN): Likewise.
* login/getutid_r (__getutid_r): Likewise.
* login/getutline_r (__getutline_r): Likewise.
* login/login.c (tty_name): Likewise.
* login/oututline_r.c (__pututline_r): Likewise.
* malloc/malloc.c (morecore): Likewise.
* misc/efgcvt_r.c (fcvt_r): Likewise.
* misc/hsearch_r.c (hcreate_r): Likewise.
(hdestroy_r): Likewise.
(hsearch_r): Likewise.
* nss/nsswitch.c (__nss_configure_lookup): Likewise.
* nss/nss_dns/dns-host.c (_nss_dns_gethostbyname2_r): Likewise.
(_nss_dns_gethostbyaddr_r): Likewise.
* nss/nss_files/files-XXX.c (internal_getent): Likewise.
* nss/nss_files/files-parse.c (parse_list): Likewise.
* posix/confstr.c (confstr): Likewise. De-ANSI-fy.
* posix/execvp.c (execvp): Likewise.
* posix/glob.c: Define __set_errno.
(glob): Use __set_errno to set errno variable.
(glob_in_dir): Likewise.
* pwd/getpw.c: Likewise. De-ANSI-fy.
* pwd/putpwent.c: Likewise.
* resolv/inet_net_ntop.c: Likewise.
* resolv/inet_net_pton.c: Likewise.
* resolv/inet_neta.c: Likewise.
* resolv/inet_ntop.c: Likewise.
* resolv/inet_pton.c: Likewise.
* resolv/res_query.c (res_search): Likewise.
* resolv/res_send.c (Aerror): Likewise.
(Perror): Likewise.
(res_send): Likewise.
* signal/sigaddset.c: Likewise. De-ANSI-fy.
* signal/sigdelset.c: Likewise.
* signal/sigempty.c: Likewise.
* signal/sigfillset.c: Likewise.
* signal/sigismem.c: Likewise.
* stdio/fclose.c: Likewise.
* stdio/feof.c: Likewise.
* stdio/ferror.c: Likewise.
* stdio/fflush.c: Likewise.
* stdio/fgetc.c: Likewise.
* stdio/fgetpos.c: Likewise.
* stdio/fgets.c: Likewise.
* stdio/fileno.c: Likewise.
* stdio/fmemopen.c: Likewise.
* stdio/fopen.c: Likewise.
* stdio/fputc.c: Likewise.
* stdio/fread.c: Likewise.
* stdio/freopen.c: Likewise.
* stdio/fseek.c: Likewise.
* stdio/fsetpos.c: Likewise.
* stdio/ftell.c: Likewise.
* stdio/fwrite.c: Likewise.
* stdio/getdelim.c: Likewise.
* stdio/gets.c: Likewise.
* stdio/glue.c: Likewise.
* stdio/internals.c: Likewise.
* stdio/memstream.c: Likewise.
* stdio/setvbuf.c: Likewise.
* stdio/ungetc.c: Likewise.
* stdio/vsscanf.c: Likewise.
* stdio-common/reg-printf.c: Likewise.
* stdio-common/vfprintf.c: Likewise.
* stdio-common/vfscanf.c: Likewise.
* stdlib/canonicalize.c: Likewise.
* stdlib/msort.c: Likewise.
* stdlib/random_r.c: Likewise.
* stdlib/strfmon.c: Likewise.
* stdlib/strtod.c: Likewise.
* stdlib/strtol.c: Likewise.
* sunrpc/bindrsvprt.c: Likewise.
* time/asctime.c: Likewise.
* time/localtime.c: Likewise.
* wcsmbs/mbrtowc.c: Likewise.
* wcsmbs/mbsnrtowcs.c: Likewise.
* wcsmbs/mbsrtowcs.c: Likewise.
* wcsmbs/wcrtomb.c: Likewise.
* wcsmbs/wcsnrtombs.c: Likewise.
* wcsmbs/wcsrtombs.c: Likewise.
* wcsmbs/wcstok.c: Likewise.
* sysdeps/generic/ftime.c: Likewise.
* sysdeps/generic/pty.c: Likewise.
* sysdeps/generic/setenv.c: Likewise.
* sysdeps/generic/speed.c: Likewise.
* sysdeps/generic/sysd-stdio.c: Likewise.
* sysdeps/generic/uname.c: Likewise.
* sysdeps/generic/vlimit.c: Likewise.
* sysdeps/libm-ieee754/k_standard.c: Likewise.
* sysdeps/libm-ieee754/s_ldexp.c: Likewise.
* sysdeps/libm-ieee754/s_ldexpf.c: Likewise.
* sysdeps/libm-ieee754/s_ldexpl.c: Likewise.
* sysdeps/libm-ieee754/w_scalb.c: Likewise.
* sysdeps/libm-ieee754/w_scalbf.c: Likewise.
* sysdeps/libm-ieee754/w_scalbl.c: Likewise.
* sysdeps/posix/dup2.c: Likewise.
* sysdeps/posix/euidaccess.c: Likewise.
* sysdeps/posix/fdopen.c: Likewise.
* sysdeps/posix/flock.c: Likewise.
* sysdeps/posix/fpathconf.c: Likewise.
* sysdeps/posix/getcwd.c: Likewise.
* sysdeps/posix/gettimeofday.c: Likewise.
* sysdeps/posix/isatty.c: Likewise.
* sysdeps/posix/isfdtype.c: Likewise.
* sysdeps/posix/killpg.c: Likewise.
* sysdeps/posix/mkstemp.c: Likewise.
* sysdeps/posix/mktemp.c: Likewise.
* sysdeps/posix/pathconf.c: Likewise.
* sysdeps/posix/pipestream.c: Likewise.
* sysdeps/posix/remove.c: Likewise.
* sysdeps/posix/rename.c: Likewise.
* sysdeps/posix/sigintr.c: Likewise.
* sysdeps/posix/signal.c: Likewise.
* sysdeps/posix/sigsuspend.c: Likewise.
* sysdeps/posix/sigvec.c: Likewise.
* sysdeps/posix/sleep.c: Likewise.
* sysdeps/posix/sysconf.c: Likewise.
* sysdeps/posix/system.c: Likewise.
* sysdeps/posix/tempname.c: Likewise.
* sysdeps/posix/truncate.c: Likewise.
* sysdeps/posix/ttyname.c: Likewise.
* sysdeps/posix/ttyname_r.c: Likewise.
* sysdeps/posix/wait3.c: Likewise.
* sysdeps/standalone/close.c: Likewise.
* sysdeps/standalone/open.c: Likewise.
* sysdeps/standalone/read.c: Likewise.
* sysdeps/standalone/write.c: Likewise.
* sysdeps/stub/__longjmp.c: Likewise.
* sysdeps/stub/accept.c: Likewise.
* sysdeps/stub/access.c: Likewise.
* sysdeps/stub/acct.c: Likewise.
* sysdeps/stub/adjtime.c: Likewise.
* sysdeps/stub/alarm.c: Likewise.
* sysdeps/stub/bind.c: Likewise.
* sysdeps/stub/brk.c: Likewise.
* sysdeps/stub/chdir.c: Likewise.
* sysdeps/stub/chflags.c: Likewise.
* sysdeps/stub/chmod.c: Likewise.
* sysdeps/stub/chown.c: Likewise.
* sysdeps/stub/chroot.c: Likewise.
* sysdeps/stub/clock.c: Likewise.
* sysdeps/stub/close.c: Likewise.
* sysdeps/stub/closedir.c: Likewise.
* sysdeps/stub/connect.c: Likewise.
* sysdeps/stub/ctermid.c: Likewise.
* sysdeps/stub/cuserid.c: Likewise.
* sysdeps/stub/dirfd.c: Likewise.
* sysdeps/stub/dup.c: Likewise.
* sysdeps/stub/dup2.c: Likewise.
* sysdeps/stub/euidaccess.c: Likewise.
* sysdeps/stub/execve.c: Likewise.
* sysdeps/stub/fchdir.c: Likewise.
* sysdeps/stub/fchflags.c: Likewise.
* sysdeps/stub/fchmod.c: Likewise.
* sysdeps/stub/fchown.c: Likewise.
* sysdeps/stub/fcntl.c: Likewise.
* sysdeps/stub/fdopen.c: Likewise.
* sysdeps/stub/fexecve.c: Likewise.
* sysdeps/stub/flock.c: Likewise.
* sysdeps/stub/fork.c: Likewise.
* sysdeps/stub/fpathconf.c: Likewise.
* sysdeps/stub/fstatfs.c: Likewise.
* sysdeps/stub/fsync.c: Likewise.
* sysdeps/stub/ftruncate.c: Likewise.
* sysdeps/stub/fxstat.c: Likewise.
* sysdeps/stub/getcwd.c: Likewise.
* sysdeps/stub/getdents.c: Likewise.
* sysdeps/stub/getdomain.c: Likewise.
* sysdeps/stub/getdtsz.c: Likewise.
* sysdeps/stub/getegid.c: Likewise.
* sysdeps/stub/getenv.c: Likewise.
* sysdeps/stub/geteuid.c: Likewise.
* sysdeps/stub/getgid.c: Likewise.
* sysdeps/stub/getgroups.c: Likewise.
* sysdeps/stub/gethostid.c: Likewise.
* sysdeps/stub/gethostname.c: Likewise.
* sysdeps/stub/getitimer.c: Likewise.
* sysdeps/stub/getlogin.c: Likewise.
* sysdeps/stub/getlogin_r.c: Likewise.
* sysdeps/stub/getpagesize.c: Likewise.
* sysdeps/stub/getpeername.c: Likewise.
* sysdeps/stub/getpid.c: Likewise.
* sysdeps/stub/getppid.c: Likewise.
* sysdeps/stub/getpriority.c: Likewise.
* sysdeps/stub/getrlimit.c: Likewise.
* sysdeps/stub/getrusage.c: Likewise.
* sysdeps/stub/getsid.c: Likewise.
* sysdeps/stub/getsockname.c: Likewise.
* sysdeps/stub/getsockopt.c: Likewise.
* sysdeps/stub/getsysstats.c: Likewise.
* sysdeps/stub/gettimeofday.c: Likewise.
* sysdeps/stub/getuid.c: Likewise.
* sysdeps/stub/gtty.c: Likewise.
* sysdeps/stub/ioctl.c: Likewise.
* sysdeps/stub/isatty.c: Likewise.
* sysdeps/stub/isfdtype.c: Likewise.
* sysdeps/stub/kill.c: Likewise.
* sysdeps/stub/killpg.c: Likewise.
* sysdeps/stub/link.c: Likewise.
* sysdeps/stub/listen.c: Likewise.
* sysdeps/stub/lseek.c: Likewise.
* sysdeps/stub/lxstat.c: Likewise.
* sysdeps/stub/madvice.c: Likewise.
* sysdeps/stub/mkdir.c: Likewise.
* sysdeps/stub/mkfifo.c: Likewise.
* sysdeps/stub/mkstemp.c: Likewise.
* sysdeps/stub/mktemp.c: Likewise.
* sysdeps/stub/mmap.c: Likewise.
* sysdeps/stub/morecore.c: Likewise.
* sysdeps/stub/mprotect.c: Likewise.
* sysdeps/stub/msgctl.c: Likewise.
* sysdeps/stub/msgget.c: Likewise.
* sysdeps/stub/msgrcv.c: Likewise.
* sysdeps/stub/msgsnd.c: Likewise.
* sysdeps/stub/msync.c: Likewise.
* sysdeps/stub/munmap.c: Likewise.
* sysdeps/stub/nanosleep.c: Likewise.
* sysdeps/stub/nice.c: Likewise.
* sysdeps/stub/nlist.c: Likewise.
* sysdeps/stub/open.c: Likewise.
* sysdeps/stub/opendir.c: Likewise.
* sysdeps/stub/pathconf.c: Likewise.
* sysdeps/stub/pause.c: Likewise.
* sysdeps/stub/pipe.c: Likewise.
* sysdeps/stub/pipestream.c: Likewise.
* sysdeps/stub/poll.c: Likewise.
* sysdeps/stub/profil.c: Likewise.
* sysdeps/stub/ptrace.c: Likewise.
* sysdeps/stub/putenv.c: Likewise.
* sysdeps/stub/raise.c: Likewise.
* sysdeps/stub/read.c: Likewise.
* sysdeps/stub/readdir.c: Likewise.
* sysdeps/stub/readlink.c: Likewise.
* sysdeps/stub/readv.c: Likewise.
* sysdeps/stub/reboot.c: Likewise.
* sysdeps/stub/recv.c: Likewise.
* sysdeps/stub/recvfrom.c: Likewise.
* sysdeps/stub/recvmsg.c: Likewise.
* sysdeps/stub/remove.c: Likewise.
* sysdeps/stub/rename.c: Likewise.
* sysdeps/stub/revoke.c: Likewise.
* sysdeps/stub/rewinddir.c: Likewise.
* sysdeps/stub/rmdir.c: Likewise.
* sysdeps/stub/sbrk.c: Likewise.
* sysdeps/stub/sched_getp.c: Likewise.
* sysdeps/stub/sched_gets.c: Likewise.
* sysdeps/stub/sched_primax.c: Likewise.
* sysdeps/stub/sched_primin.c: Likewise.
* sysdeps/stub/sched_rr_gi.c: Likewise.
* sysdeps/stub/sched_setp.c: Likewise.
* sysdeps/stub/sched_sets.c: Likewise.
* sysdeps/stub/sched_yield.c: Likewise.
* sysdeps/stub/seekdir.c: Likewise.
* sysdeps/stub/select.c: Likewise.
* sysdeps/stub/semctl.c: Likewise.
* sysdeps/stub/semget.c: Likewise.
* sysdeps/stub/semop.c: Likewise.
* sysdeps/stub/send.c: Likewise.
* sysdeps/stub/sendmsg.c: Likewise.
* sysdeps/stub/sendto.c: Likewise.
* sysdeps/stub/setdomain.c: Likewise.
* sysdeps/stub/setegid.c: Likewise.
* sysdeps/stub/setenv.c: Likewise.
* sysdeps/stub/seteuid.c: Likewise.
* sysdeps/stub/setgid.c: Likewise.
* sysdeps/stub/setgroups.c: Likewise.
* sysdeps/stub/sethostid.c: Likewise.
* sysdeps/stub/sethostname.c: Likewise.
* sysdeps/stub/setitimer.c: Likewise.
* sysdeps/stub/setjmp.c: Likewise.
* sysdeps/stub/setlogin.c: Likewise.
* sysdeps/stub/setpgid.c: Likewise.
* sysdeps/stub/setpriority.c: Likewise.
* sysdeps/stub/setregid.c: Likewise.
* sysdeps/stub/setreuid.c: Likewise.
* sysdeps/stub/setrlimit.c: Likewise.
* sysdeps/stub/setsid.c: Likewise.
* sysdeps/stub/setsockopt.c: Likewise.
* sysdeps/stub/settimeofday.c: Likewise.
* sysdeps/stub/setuid.c: Likewise.
* sysdeps/stub/shmat.c: Likewise.
* sysdeps/stub/shmctl.c: Likewise.
* sysdeps/stub/shmdt.c: Likewise.
* sysdeps/stub/shmget.c: Likewise.
* sysdeps/stub/shutdown.c: Likewise.
* sysdeps/stub/sigaction.c: Likewise.
* sysdeps/stub/sigaltstack.c: Likewise.
* sysdeps/stub/sigblock.c: Likewise.
* sysdeps/stub/sigintr.c: Likewise.
* sysdeps/stub/signal.c: Likewise.
* sysdeps/stub/sigpause.c: Likewise.
* sysdeps/stub/sigpending.c: Likewise.
* sysdeps/stub/sigprocmask.c: Likewise.
* sysdeps/stub/sigreturn.c: Likewise.
* sysdeps/stub/sigsetmask.c: Likewise.
* sysdeps/stub/sigstack.c: Likewise.
* sysdeps/stub/sigsuspend.c: Likewise.
* sysdeps/stub/sigvec.c: Likewise.
* sysdeps/stub/sleep.c: Likewise.
* sysdeps/stub/socket.c: Likewise.
* sysdeps/stub/socketpair.c: Likewise.
* sysdeps/stub/sstk.c: Likewise.
* sysdeps/stub/statfs.c: Likewise.
* sysdeps/stub/stime.c: Likewise.
* sysdeps/stub/stty.c: Likewise.
* sysdeps/stub/swapoff.c: Likewise.
* sysdeps/stub/swapon.c: Likewise.
* sysdeps/stub/symlink.c: Likewise.
* sysdeps/stub/sync.c: Likewise.
* sysdeps/stub/syscall.c: Likewise.
* sysdeps/stub/sysconf.c: Likewise.
* sysdeps/stub/sysd-stdio.c: Likewise.
* sysdeps/stub/system.c: Likewise.
* sysdeps/stub/tcdrain.c: Likewise.
* sysdeps/stub/tcflow.c: Likewise.
* sysdeps/stub/tcflush.c: Likewise.
* sysdeps/stub/tcgetattr.c: Likewise.
* sysdeps/stub/tcgetpgrp.c: Likewise.
* sysdeps/stub/tcsendbrk.c: Likewise.
* sysdeps/stub/tcsetattr.c: Likewise.
* sysdeps/stub/tcsetpgrp.c: Likewise.
* sysdeps/stub/telldir.c: Likewise.
* sysdeps/stub/tempname.c: Likewise.
* sysdeps/stub/time.c: Likewise.
* sysdeps/stub/times.c: Likewise.
* sysdeps/stub/truncate.c: Likewise.
* sysdeps/stub/ttyname.c: Likewise.
* sysdeps/stub/ttyname_r.c: Likewise.
* sysdeps/stub/ualarm.c: Likewise.
* sysdeps/stub/ulimit.c: Likewise.
* sysdeps/stub/umask.c: Likewise.
* sysdeps/stub/unlink.c: Likewise.
* sysdeps/stub/usleep.c: Likewise.
* sysdeps/stub/ustat.c: Likewise.
* sysdeps/stub/utime.c: Likewise.
* sysdeps/stub/utimes.c: Likewise.
* sysdeps/stub/vhangup.c: Likewise.
* sysdeps/stub/wait.c: Likewise.
* sysdeps/stub/wait3.c: Likewise.
* sysdeps/stub/wait4.c: Likewise.
* sysdeps/stub/waitpid.c: Likewise.
* sysdeps/stub/write.c: Likewise.
* sysdeps/stub/writev.c: Likewise.
* sysdeps/stub/xmknod.c: Likewise.
* sysdeps/stub/xstat.c: Likewise.
* sysdeps/unix/closedir.c: Likewise.
* sysdeps/unix/fxstat.c: Likewise.
* sysdeps/unix/getlogin.c: Likewise.
* sysdeps/unix/getlogin_r.c: Likewise.
* sysdeps/unix/mkdir.c: Likewise.
* sysdeps/unix/nice.c: Likewise.
* sysdeps/unix/nlist.c: Likewise.
* sysdeps/unix/opendir.c: Likewise.
* sysdeps/unix/readdir.c: Likewise.
* sysdeps/unix/rmdir.c: Likewise.
* sysdeps/unix/stime.c: Likewise.
* sysdeps/unix/xmknod.c: Likewise.
* sysdeps/unix/xstat.c: Likewise.
* sysdeps/unix/bsd/isatty.c: Likewise.
* sysdeps/unix/bsd/setegid.c: Likewise.
* sysdeps/unix/bsd/seteuid.c: Likewise.
* sysdeps/unix/bsd/setsid.c: Likewise.
* sysdeps/unix/bsd/sigaction.c: Likewise.
* sysdeps/unix/bsd/sigprocmask.c: Likewise.
* sysdeps/unix/bsd/sigsuspend.c: Likewise.
* sysdeps/unix/bsd/tcflow.c: Likewise.
* sysdeps/unix/bsd/tcflush.c: Likewise.
* sysdeps/unix/bsd/tcgetattr.c: Likewise.
* sysdeps/unix/bsd/tcsetattr.c: Likewise.
* sysdeps/unix/bsd/times.c: Likewise.
* sysdeps/unix/bsd/ulimit.c: Likewise.
* sysdeps/unix/common/lxstat.c: Likewise.
* sysdeps/unix/common/tcsendbrk.c: Likewise.
* sysdeps/unix/sysv/setrlimit.c: Likewise.
* sysdeps/unix/sysv/settimeofday.c: Likewise.
* sysdeps/unix/sysv/sigaction.c: Likewise.
* sysdeps/unix/sysv/tcflow.c: Likewise.
* sysdeps/unix/sysv/tcflush.c: Likewise.
* sysdeps/unix/sysv/tcgetattr.c: Likewise.
* sysdeps/unix/sysv/tcsendbrk.c: Likewise.
* sysdeps/unix/sysv/tcsetattr.c: Likewise.
* sysdeps/unix/bsd/ultrix4/sysconf.c: Likewise.
* sysdeps/unix/sysv/irix4/getpriority.c: Likewise.
* sysdeps/unix/sysv/irix4/setpriority.c: Likewise.
* sysdeps/unix/sysv/linux/adjtime.c: Likewise.
* sysdeps/unix/sysv/linux/gethostid.c: Likewise.
* sysdeps/unix/sysv/linux/gethostname.c: Likewise.
* sysdeps/unix/sysv/linux/getsysstats.c: Likewise.
* sysdeps/unix/sysv/linux/ptrace.c: Likewise.
* sysdeps/unix/sysv/linux/speed.c: Likewise.
* sysdeps/unix/sysv/linux/ulimit.c: Likewise.
* sysdeps/unix/sysv/sysv4/sigaction.c: Likewise.
* sysdeps/unix/sysv/sysv4/sysconf.c: Likewise.
* sysdeps/unix/bsd/sun/m68k/sigtramp.c: Likewise.
* sysdeps/unix/bsd/sun/sparc/sigtramp.c: Likewise.
* sysdeps/unix/bsd/sun/sunos4/speed.c: Likewise.
* sysdeps/unix/bsd/sun/sunos4/tcsetattr.c: Likewise.
* sysdeps/unix/sysv/linux/alpha/ioperm.c: Likewise.
* sysdeps/unix/sysv/linux/i386/brk.c: Likewise.
* sysdeps/unix/sysv/linux/i386/sigaction.c: Likewise.
* sysdeps/unix/sysv/linux/m68k/brk.c: Likewise.
* sunrpc/clnt_tcp.c: Protect declaration of errno by #ifndef.
* sunrpc/clnt_udp.c: Likewise.
* sunrpc/bindrsvprt.c: Likewise.
* sunrpc/pm_getmaps.c: Likewise.
* sunrpc/pmap_rmt.c: Likewise.
* sunrpc/svc.c: Likewise.
* sunrpc/svc_run.c: Likewise.
* sunrpc/svc_tcp.c: Likewise.
* sunrpc/svc_udp.c: Likewise.
* sysdeps/generic/strtok.c: Don't check argument, just crash.
* sysdeps/generic/strtok_r.c: Likewise.
* sysdeps/stub/start.c: Make __errno a strong alias of errno.
* sysdeps/unix/start.c: Likewise. De-ANSI-fy.
* sysdeps/unix/sparc/start.c: Likewise.
* sysdeps/standalone/m68k/m68020/start.S: Likewise.
* sysdeps/unix/sysv/irix4/start.c: Likewise.
* sysdeps/unix/bsd/ultrix4/mips/start.S: Likewise.
* sysdeps/unix/sysv/linux/i386/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/m68k/sysdep.S: Likewise.
Mon Sep 23 17:54:57 1996 Ulrich Drepper <drepper@cygnus.com>
* catgets/gencat.c (main): Put package name in --version message
in parantheses. Reported by Jim Meyering.
* db/makedb.c: Likewise.
* locale/programs/locale.c: Likewise.
* locale/programs/localedef.c: Likewise.
* sysdeps/i386/fpu/__math.h (tan): Make sure gcc knows we use
two registers. Patch by John Bowman.
Sat Sep 21 15:08:25 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/mach/libc-lock.h: Fix comment.
* sysdeps/stubs/libc-lock.h: Likewise.
Sat Sep 21 13:50:40 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* libio/genops.c (_IO_init) [_IO_MTSAFE_IO]: Dereference pointer
to lock when passing it to __libc_lock_init macro.
(_IO_default_finish) [_IO_MTSAFE_IO]: Dereference pointer to lock
when passing it to __libc_lock_fini macro.
Sat Sep 21 14:35:40 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/unix/sysv/linux/m68k/sysdep.h (SYSCALL_ERROR_HANDLER)
[_LIBC_REENTRANT]: Add missing semicolon.
* sysdeps/unix/sysv/linux/m68k/sysdep.S: Move inclusion of
sysdep.h to the top outside of #ifndef PIC. Don't include errnos.h.
Use the ENTRY macro.
Sat Sep 21 14:33:41 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* libio/Makefile: Make `all' the default target.
* po/Makefile: Likewise.
Mon Sep 23 15:49:47 1996 Ulrich Drepper <drepper@cygnus.com>
* stdlib/test-canon.c: Correct patch from Thu Sep 12 23:01:16 1996.
I applied it incorrectly.
* sysdeps/m68k/fpu/s_scalbn.c: Likewise.
* sysdeps/m68k/fpu/s_scalbnf.c: Likewise.
* sysdeps/m68k/fpu/s_scalbnl.c: Likewise.
Mon Sep 23 03:00:10 1996 Ulrich Drepper <drepper@cygnus.com>
* shadow/sgetspent_r.c (LINE_PARSER): Accept empty 9th field.
Patch by NIIBE Yutaka <gniibe@mri.co.jp>.
* shadow/sgetspent_r.c (LINE_PARSER): Don't accept any chars after
9th field.
* sysdeps/unix/sysv/linux/Makefile [$(subdir)==misc]
(sysdep_headers): Add sys/debugreg.h, sys/kd.h, sys/soundcard.h,
and sys/vt.h.
* sysdeps/unix/sysv/linux/sys/debugreg.h: New file.
* sysdeps/unix/sysv/linux/sys/kd.h: New file.
* sysdeps/unix/sysv/linux/sys/soundcard.h: New file.
* sysdeps/unix/sysv/linux/sys/vt.h: New file.
Reported by NIIBE Yutaka <gniibe@mri.co.jp>.
1996-09-27 03:45:24 +00:00
|
|
|
|
#endif
|
1995-02-18 01:27:10 +00:00
|
|
|
|
|
1997-09-16 00:42:43 +00:00
|
|
|
|
#if defined HAVE_DIRENT_H || defined __GNU_LIBRARY__
|
1996-03-01 17:40:28 +00:00
|
|
|
|
# include <dirent.h>
|
|
|
|
|
# define NAMLEN(dirent) strlen((dirent)->d_name)
|
|
|
|
|
#else
|
|
|
|
|
# define dirent direct
|
|
|
|
|
# define NAMLEN(dirent) (dirent)->d_namlen
|
|
|
|
|
# ifdef HAVE_SYS_NDIR_H
|
|
|
|
|
# include <sys/ndir.h>
|
|
|
|
|
# endif
|
|
|
|
|
# ifdef HAVE_SYS_DIR_H
|
|
|
|
|
# include <sys/dir.h>
|
|
|
|
|
# endif
|
|
|
|
|
# ifdef HAVE_NDIR_H
|
|
|
|
|
# include <ndir.h>
|
|
|
|
|
# endif
|
1996-05-22 21:28:03 +00:00
|
|
|
|
# ifdef HAVE_VMSDIR_H
|
|
|
|
|
# include "vmsdir.h"
|
|
|
|
|
# endif /* HAVE_VMSDIR_H */
|
1996-03-01 17:40:28 +00:00
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* In GNU systems, <dirent.h> defines this macro for us. */
|
|
|
|
|
#ifdef _D_NAMLEN
|
1997-09-16 00:42:43 +00:00
|
|
|
|
# undef NAMLEN
|
|
|
|
|
# define NAMLEN(d) _D_NAMLEN(d)
|
1996-03-01 17:40:28 +00:00
|
|
|
|
#endif
|
|
|
|
|
|
1997-10-31 22:55:02 +00:00
|
|
|
|
/* When used in the GNU libc the symbol _DIRENT_HAVE_D_TYPE is available
|
2006-01-11 05:30:12 +00:00
|
|
|
|
if the `d_type' member for `struct dirent' is available.
|
|
|
|
|
HAVE_STRUCT_DIRENT_D_TYPE plays the same role in GNULIB. */
|
|
|
|
|
#if defined _DIRENT_HAVE_D_TYPE || defined HAVE_STRUCT_DIRENT_D_TYPE
|
|
|
|
|
/* True if the directory entry D must be of type T. */
|
|
|
|
|
# define DIRENT_MUST_BE(d, t) ((d)->d_type == (t))
|
|
|
|
|
|
|
|
|
|
/* True if the directory entry D might be a symbolic link. */
|
|
|
|
|
# define DIRENT_MIGHT_BE_SYMLINK(d) \
|
|
|
|
|
((d)->d_type == DT_UNKNOWN || (d)->d_type == DT_LNK)
|
|
|
|
|
|
|
|
|
|
/* True if the directory entry D might be a directory. */
|
|
|
|
|
# define DIRENT_MIGHT_BE_DIR(d) \
|
|
|
|
|
((d)->d_type == DT_DIR || DIRENT_MIGHT_BE_SYMLINK (d))
|
|
|
|
|
|
|
|
|
|
#else /* !HAVE_D_TYPE */
|
|
|
|
|
# define DIRENT_MUST_BE(d, t) false
|
|
|
|
|
# define DIRENT_MIGHT_BE_SYMLINK(d) true
|
|
|
|
|
# define DIRENT_MIGHT_BE_DIR(d) true
|
|
|
|
|
#endif /* HAVE_D_TYPE */
|
2001-02-13 22:17:17 +00:00
|
|
|
|
|
|
|
|
|
/* If the system has the `struct dirent64' type we use it internally. */
|
2006-01-11 05:30:12 +00:00
|
|
|
|
#if defined _LIBC && !defined COMPILE_GLOB64
|
2001-02-13 22:17:17 +00:00
|
|
|
|
# if defined HAVE_DIRENT_H || defined __GNU_LIBRARY__
|
|
|
|
|
# define CONVERT_D_NAMLEN(d64, d32)
|
|
|
|
|
# else
|
|
|
|
|
# define CONVERT_D_NAMLEN(d64, d32) \
|
|
|
|
|
(d64)->d_namlen = (d32)->d_namlen;
|
|
|
|
|
# endif
|
|
|
|
|
|
|
|
|
|
# if (defined POSIX || defined WINDOWS32) && !defined __GNU_LIBRARY__
|
|
|
|
|
# define CONVERT_D_INO(d64, d32)
|
|
|
|
|
# else
|
|
|
|
|
# define CONVERT_D_INO(d64, d32) \
|
|
|
|
|
(d64)->d_ino = (d32)->d_ino;
|
|
|
|
|
# endif
|
|
|
|
|
|
2006-01-11 05:30:12 +00:00
|
|
|
|
# ifdef _DIRENT_HAVE_D_TYPE
|
2001-02-13 22:17:17 +00:00
|
|
|
|
# define CONVERT_D_TYPE(d64, d32) \
|
|
|
|
|
(d64)->d_type = (d32)->d_type;
|
|
|
|
|
# else
|
|
|
|
|
# define CONVERT_D_TYPE(d64, d32)
|
|
|
|
|
# endif
|
|
|
|
|
|
|
|
|
|
# define CONVERT_DIRENT_DIRENT64(d64, d32) \
|
2001-02-14 19:01:03 +00:00
|
|
|
|
memcpy ((d64)->d_name, (d32)->d_name, NAMLEN (d32) + 1); \
|
2001-02-13 22:17:17 +00:00
|
|
|
|
CONVERT_D_NAMLEN (d64, d32) \
|
|
|
|
|
CONVERT_D_INO (d64, d32) \
|
|
|
|
|
CONVERT_D_TYPE (d64, d32)
|
|
|
|
|
#endif
|
|
|
|
|
|
1995-02-18 01:27:10 +00:00
|
|
|
|
|
1997-09-16 00:42:43 +00:00
|
|
|
|
#if (defined POSIX || defined WINDOWS32) && !defined __GNU_LIBRARY__
|
1995-02-18 01:27:10 +00:00
|
|
|
|
/* Posix does not require that the d_ino field be present, and some
|
|
|
|
|
systems do not provide it. */
|
1997-09-16 00:42:43 +00:00
|
|
|
|
# define REAL_DIR_ENTRY(dp) 1
|
1995-02-18 01:27:10 +00:00
|
|
|
|
#else
|
1997-09-16 00:42:43 +00:00
|
|
|
|
# define REAL_DIR_ENTRY(dp) (dp->d_ino != 0)
|
1995-02-18 01:27:10 +00:00
|
|
|
|
#endif /* POSIX */
|
|
|
|
|
|
2006-01-11 05:30:12 +00:00
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
#include <string.h>
|
1995-02-18 01:27:10 +00:00
|
|
|
|
|
* locale/programs/ld-ctype.c (ctype_read): When given a repertoire
name of "", store a null pointer instead.
* configure.in (elf): Set to yes for freebsd*, netbsd*.
* configure: Regenerated.
* locale/xlocale.c [! (USE_TLS && HAVE___THREAD)] (__libc_tsd_LOCALE):
Initialize this instead of __libc_tsd_LOCALE_data.
* sysdeps/unix/grantpt.c (pts_name): Convert ENOTTY return from
ptsname_r to EINVAL.
* sysdeps/generic/ptsname.c (__ptsname_r): Return ENOSYS instead of 0.
* rt/Makefile: Revert last change, it was inappropriate to presume aio
implementations depend on pthreads.
* rt/tst-aio.c (do_test): Exit happy if first failure is ENOSYS.
* rt/tst-aio64.c (do_test): Likewise.
* rt/tst-aio2.c (do_test): Likewise.
* rt/tst-aio3.c (do_test): Likewise.
* rt/tst-aio4.c (do_test): Likewise.
* rt/tst-aio5.c (do_test): Likewise.
* rt/tst-aio6.c (do_test): Likewise.
* rt/tst-aio7.c (do_test): Likewise.
* sysdeps/generic/bits/libc-lock.h (__libc_setspecific): Use a cast to
void so as to avoid compiler warnings.
* libio/oldstdfiles.c [! _IO_MTSAFE_IO] (DEF_STDFILE): Don't define
_IO_wide_data_FD, which is never used here.
* libio/iofread.c
[! _IO_MTSAFE_IO] (fread_unlocked): Add libc_hidden_ver defn.
* libio/iofputs.c [! _IO_MTSAFE_IO] (fputs_unlocked): Likewise.
* libio/iofgets.c [! _IO_MTSAFE_IO] (fgets_unlocked): Likewise.
* include/resolv.h [! _LIBC_REENTRANT] (_res): #undef it before decl.
* include/netdb.h [! _LIBC_REENTRANT] (h_errno): Declare normal extern.
* misc/syslog.c (openlog): Conditionalize locking on [_LIBC_REENTRANT].
(closelog): Likewise.
2002-07-06 Bruno Haible <bruno@clisp.org>
* sysdeps/alpha/fpu/fpu_control.h: Comment fix.
* sysdeps/unix/sysv/linux/alpha/pipe.S: Moved to ...
* sysdeps/unix/alpha/pipe.S: ... here.
* sysdeps/unix/bsd/osf/alpha/pipe.S: File removed.
* sysdeps/unix/i386/brk.S: Rename local label to '.Lhere' in ELF.
* sysdeps/unix/i386/brk.S: Add PSEUDO_END invocation.
* sysdeps/unix/i386/fork.S: Likewise.
* sysdeps/unix/i386/pipe.S: Likewise.
* sysdeps/unix/i386/wait.S: Likewise.
* sysdeps/unix/fork.S: Fix PSEUDO_END argument.
* sysdeps/unix/arm/fork.S: Likewise.
* sysdeps/unix/sysv/linux/arm/sysdep.h (PSEUDO): Swap DO_CALL
arguments.
(DO_CALL): Swap argument order.
* sysdeps/unix/sysv/linux/hppa/sysdep.h (PSEUDO): Swap DO_CALL
arguments.
(DO_CALL): Swap argument order.
* sysdeps/unix/sysv/linux/i386/sysdep.h (PSEUDO): Swap DO_CALL
arguments.
(DO_CALL): Swap argument order.
* sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h (PSEUDO): Swap DO_CALL
arguments.
(DO_CALL): Swap argument order.
* sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h (PSEUDO): Swap DO_CALL
arguments.
(DO_CALL): Swap argument order.
* sysdeps/unix/sysv/linux/sh/sysdep.h (PSEUDO): Swap DO_CALL
arguments.
(DO_CALL): Swap argument order.
* sysdeps/unix/sysv/linux/x86_64/sysdep.h (PSEUDO): Swap DO_CALL
arguments.
(DO_CALL): Swap argument order.
* sysdeps/i386/sysdep.h (PSEUDO): Fix syntax error.
(L): Define right for ELF.
* sysdeps/unix/sysv/linux/i386/sysdep.h (L): Remove definition.
Now defined in sysdeps/i386/sysdep.h.
* sysdeps/posix/readv.c: Ansify function definition.
* sysdeps/posix/writev.c: Likewise.
* stdio-common/tst-fseek.c (main): Don't assume that off_t and size_t
have the same size. Avoid direct cast from size_t to off_t.
* login/tst-utmp.c (simulate_login): Don't leave garbage after the
nul byte in entry[n].ut_user.
(simulate_logout): Likewise.
* login/programs/utmpdump.c (print_entry): Test _HAVE_UT_TYPE,
_HAVE_UT_PID, _HAVE_UT_ID, _HAVE_UT_HOST, instead of assuming the
existence of corresponding members of 'struct utmp'.
* login/tst-utmp.c: Trivialize the test if testing 'struct utmp' and
!_HAVE_UT_TYPE.
* sysdeps/unix/opendir.c (__opendir): If st_blksize is 0 or too small,
allocate a buffer of at least BUFSIZ bytes, not just of
sizeof (struct dirent).
* sysdeps/generic/glob.c: Include <limits.h>.
(NAME_MAX): Define a fallback.
(glob_in_dir): Allocate enough room for a 'struct dirent64' on the
stack.
* posix/tst-dir.c: Include <stddef.h>, for offsetof.
(main): Allocate enough room for a 'struct dirent64' on the stack.
* posix/tst-gnuglob.c (my_DIR): Allocate enough room for a
'struct dirent'.
* sysdeps/unix/sysv/linux/init-first.c: Don't include
kernel-features.h.
* inet/htontest.c: Include <sys/types.h>.
* sysdeps/generic/sys/sysinfo.h: Surround with __{BEGIN,END}_DECLS.
* include/sys/sysctl.h: Comment fix.
* elf/rtld.c (_rtld_global) [! _LIBC_REENTRANT]: Don't initialize
_dl_load_lock.
* libio/fileno.c (fileno_unlocked): Define regardless of _IO_MTSAFE_IO.
* sysdeps/unix/bsd/bsd4.4/syscalls.list (__sigaltstack): New alias.
* sysdeps/unix/inet/syscalls.list (__connect_internal): New alias.
(__getpeername): New alias.
(__getsockname): New alias.
(__socket): New alias.
* sysdeps/unix/common/syscalls.list (getpgid): Remove.
* sysdeps/unix/syscalls.list (__chown_internal): New alias.
(__fcntl_internal): New alias.
(__profil): New alias.
2002-08-26 11:39:12 +00:00
|
|
|
|
/* NAME_MAX is usually defined in <dirent.h> or <limits.h>. */
|
2006-01-11 05:30:12 +00:00
|
|
|
|
#include <limits.h>
|
* locale/programs/ld-ctype.c (ctype_read): When given a repertoire
name of "", store a null pointer instead.
* configure.in (elf): Set to yes for freebsd*, netbsd*.
* configure: Regenerated.
* locale/xlocale.c [! (USE_TLS && HAVE___THREAD)] (__libc_tsd_LOCALE):
Initialize this instead of __libc_tsd_LOCALE_data.
* sysdeps/unix/grantpt.c (pts_name): Convert ENOTTY return from
ptsname_r to EINVAL.
* sysdeps/generic/ptsname.c (__ptsname_r): Return ENOSYS instead of 0.
* rt/Makefile: Revert last change, it was inappropriate to presume aio
implementations depend on pthreads.
* rt/tst-aio.c (do_test): Exit happy if first failure is ENOSYS.
* rt/tst-aio64.c (do_test): Likewise.
* rt/tst-aio2.c (do_test): Likewise.
* rt/tst-aio3.c (do_test): Likewise.
* rt/tst-aio4.c (do_test): Likewise.
* rt/tst-aio5.c (do_test): Likewise.
* rt/tst-aio6.c (do_test): Likewise.
* rt/tst-aio7.c (do_test): Likewise.
* sysdeps/generic/bits/libc-lock.h (__libc_setspecific): Use a cast to
void so as to avoid compiler warnings.
* libio/oldstdfiles.c [! _IO_MTSAFE_IO] (DEF_STDFILE): Don't define
_IO_wide_data_FD, which is never used here.
* libio/iofread.c
[! _IO_MTSAFE_IO] (fread_unlocked): Add libc_hidden_ver defn.
* libio/iofputs.c [! _IO_MTSAFE_IO] (fputs_unlocked): Likewise.
* libio/iofgets.c [! _IO_MTSAFE_IO] (fgets_unlocked): Likewise.
* include/resolv.h [! _LIBC_REENTRANT] (_res): #undef it before decl.
* include/netdb.h [! _LIBC_REENTRANT] (h_errno): Declare normal extern.
* misc/syslog.c (openlog): Conditionalize locking on [_LIBC_REENTRANT].
(closelog): Likewise.
2002-07-06 Bruno Haible <bruno@clisp.org>
* sysdeps/alpha/fpu/fpu_control.h: Comment fix.
* sysdeps/unix/sysv/linux/alpha/pipe.S: Moved to ...
* sysdeps/unix/alpha/pipe.S: ... here.
* sysdeps/unix/bsd/osf/alpha/pipe.S: File removed.
* sysdeps/unix/i386/brk.S: Rename local label to '.Lhere' in ELF.
* sysdeps/unix/i386/brk.S: Add PSEUDO_END invocation.
* sysdeps/unix/i386/fork.S: Likewise.
* sysdeps/unix/i386/pipe.S: Likewise.
* sysdeps/unix/i386/wait.S: Likewise.
* sysdeps/unix/fork.S: Fix PSEUDO_END argument.
* sysdeps/unix/arm/fork.S: Likewise.
* sysdeps/unix/sysv/linux/arm/sysdep.h (PSEUDO): Swap DO_CALL
arguments.
(DO_CALL): Swap argument order.
* sysdeps/unix/sysv/linux/hppa/sysdep.h (PSEUDO): Swap DO_CALL
arguments.
(DO_CALL): Swap argument order.
* sysdeps/unix/sysv/linux/i386/sysdep.h (PSEUDO): Swap DO_CALL
arguments.
(DO_CALL): Swap argument order.
* sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h (PSEUDO): Swap DO_CALL
arguments.
(DO_CALL): Swap argument order.
* sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h (PSEUDO): Swap DO_CALL
arguments.
(DO_CALL): Swap argument order.
* sysdeps/unix/sysv/linux/sh/sysdep.h (PSEUDO): Swap DO_CALL
arguments.
(DO_CALL): Swap argument order.
* sysdeps/unix/sysv/linux/x86_64/sysdep.h (PSEUDO): Swap DO_CALL
arguments.
(DO_CALL): Swap argument order.
* sysdeps/i386/sysdep.h (PSEUDO): Fix syntax error.
(L): Define right for ELF.
* sysdeps/unix/sysv/linux/i386/sysdep.h (L): Remove definition.
Now defined in sysdeps/i386/sysdep.h.
* sysdeps/posix/readv.c: Ansify function definition.
* sysdeps/posix/writev.c: Likewise.
* stdio-common/tst-fseek.c (main): Don't assume that off_t and size_t
have the same size. Avoid direct cast from size_t to off_t.
* login/tst-utmp.c (simulate_login): Don't leave garbage after the
nul byte in entry[n].ut_user.
(simulate_logout): Likewise.
* login/programs/utmpdump.c (print_entry): Test _HAVE_UT_TYPE,
_HAVE_UT_PID, _HAVE_UT_ID, _HAVE_UT_HOST, instead of assuming the
existence of corresponding members of 'struct utmp'.
* login/tst-utmp.c: Trivialize the test if testing 'struct utmp' and
!_HAVE_UT_TYPE.
* sysdeps/unix/opendir.c (__opendir): If st_blksize is 0 or too small,
allocate a buffer of at least BUFSIZ bytes, not just of
sizeof (struct dirent).
* sysdeps/generic/glob.c: Include <limits.h>.
(NAME_MAX): Define a fallback.
(glob_in_dir): Allocate enough room for a 'struct dirent64' on the
stack.
* posix/tst-dir.c: Include <stddef.h>, for offsetof.
(main): Allocate enough room for a 'struct dirent64' on the stack.
* posix/tst-gnuglob.c (my_DIR): Allocate enough room for a
'struct dirent'.
* sysdeps/unix/sysv/linux/init-first.c: Don't include
kernel-features.h.
* inet/htontest.c: Include <sys/types.h>.
* sysdeps/generic/sys/sysinfo.h: Surround with __{BEGIN,END}_DECLS.
* include/sys/sysctl.h: Comment fix.
* elf/rtld.c (_rtld_global) [! _LIBC_REENTRANT]: Don't initialize
_dl_load_lock.
* libio/fileno.c (fileno_unlocked): Define regardless of _IO_MTSAFE_IO.
* sysdeps/unix/bsd/bsd4.4/syscalls.list (__sigaltstack): New alias.
* sysdeps/unix/inet/syscalls.list (__connect_internal): New alias.
(__getpeername): New alias.
(__getsockname): New alias.
(__socket): New alias.
* sysdeps/unix/common/syscalls.list (getpgid): Remove.
* sysdeps/unix/syscalls.list (__chown_internal): New alias.
(__fcntl_internal): New alias.
(__profil): New alias.
2002-08-26 11:39:12 +00:00
|
|
|
|
#ifndef NAME_MAX
|
|
|
|
|
# define NAME_MAX (sizeof (((struct dirent *) 0)->d_name))
|
|
|
|
|
#endif
|
|
|
|
|
|
2006-01-11 05:30:12 +00:00
|
|
|
|
#include <alloca.h>
|
1995-04-25 21:16:39 +00:00
|
|
|
|
|
1998-07-16 11:44:36 +00:00
|
|
|
|
#ifdef _LIBC
|
1998-07-31 11:14:46 +00:00
|
|
|
|
# undef strdup
|
1998-07-27 22:28:11 +00:00
|
|
|
|
# define strdup(str) __strdup (str)
|
1998-07-16 11:44:36 +00:00
|
|
|
|
# define sysconf(id) __sysconf (id)
|
|
|
|
|
# define closedir(dir) __closedir (dir)
|
|
|
|
|
# define opendir(name) __opendir (name)
|
2001-02-13 22:17:17 +00:00
|
|
|
|
# define readdir(str) __readdir64 (str)
|
1998-07-29 12:34:57 +00:00
|
|
|
|
# define getpwnam_r(name, bufp, buf, len, res) \
|
|
|
|
|
__getpwnam_r (name, bufp, buf, len, res)
|
2000-03-20 00:46:01 +00:00
|
|
|
|
# ifndef __stat64
|
|
|
|
|
# define __stat64(fname, buf) __xstat64 (_STAT_VER, fname, buf)
|
1998-08-20 17:40:36 +00:00
|
|
|
|
# endif
|
2006-01-11 05:30:12 +00:00
|
|
|
|
# define struct_stat64 struct stat64
|
|
|
|
|
#else /* !_LIBC */
|
|
|
|
|
# include "getlogin_r.h"
|
|
|
|
|
# include "mempcpy.h"
|
|
|
|
|
# include "stat-macros.h"
|
|
|
|
|
# include "strdup.h"
|
|
|
|
|
# define __stat64(fname, buf) stat (fname, buf)
|
|
|
|
|
# define struct_stat64 struct stat
|
|
|
|
|
# define __stat(fname, buf) stat (fname, buf)
|
|
|
|
|
# define __alloca alloca
|
|
|
|
|
# define __readdir readdir
|
|
|
|
|
# define __readdir64 readdir64
|
|
|
|
|
# define __glob_pattern_p glob_pattern_p
|
|
|
|
|
#endif /* _LIBC */
|
1998-07-16 11:44:36 +00:00
|
|
|
|
|
1995-02-18 01:27:10 +00:00
|
|
|
|
#include <fnmatch.h>
|
|
|
|
|
|
2006-01-11 05:30:12 +00:00
|
|
|
|
#ifdef _SC_GETPW_R_SIZE_MAX
|
|
|
|
|
# define GETPW_R_SIZE_MAX() sysconf (_SC_GETPW_R_SIZE_MAX)
|
|
|
|
|
#else
|
|
|
|
|
# define GETPW_R_SIZE_MAX() (-1)
|
1998-06-22 17:08:51 +00:00
|
|
|
|
#endif
|
2006-01-11 05:30:12 +00:00
|
|
|
|
#ifdef _SC_LOGIN_NAME_MAX
|
|
|
|
|
# define GET_LOGIN_NAME_MAX() sysconf (_SC_LOGIN_NAME_MAX)
|
1999-07-25 23:21:20 +00:00
|
|
|
|
#else
|
2006-01-11 05:30:12 +00:00
|
|
|
|
# define GET_LOGIN_NAME_MAX() (-1)
|
1999-07-25 23:21:20 +00:00
|
|
|
|
#endif
|
1995-02-18 01:27:10 +00:00
|
|
|
|
|
2013-09-04 23:02:47 +00:00
|
|
|
|
static const char *next_brace_sub (const char *begin, int flags) __THROWNL;
|
2000-08-19 16:58:09 +00:00
|
|
|
|
|
2006-01-11 05:30:12 +00:00
|
|
|
|
#endif /* !defined _LIBC || !defined GLOB_ONLY_P */
|
2000-08-19 16:58:09 +00:00
|
|
|
|
|
2007-02-14 19:52:38 +00:00
|
|
|
|
#ifndef attribute_hidden
|
|
|
|
|
# define attribute_hidden
|
|
|
|
|
#endif
|
|
|
|
|
|
2004-09-14 04:41:35 +00:00
|
|
|
|
static int glob_in_dir (const char *pattern, const char *directory,
|
|
|
|
|
int flags, int (*errfunc) (const char *, int),
|
2011-05-23 03:04:16 +00:00
|
|
|
|
glob_t *pglob, size_t alloca_used);
|
2007-02-14 19:52:38 +00:00
|
|
|
|
extern int __glob_pattern_type (const char *pattern, int quote)
|
|
|
|
|
attribute_hidden;
|
2000-08-19 16:58:09 +00:00
|
|
|
|
|
|
|
|
|
#if !defined _LIBC || !defined GLOB_ONLY_P
|
2013-09-04 23:02:47 +00:00
|
|
|
|
static int prefix_array (const char *prefix, char **array, size_t n) __THROWNL;
|
|
|
|
|
static int collated_compare (const void *, const void *) __THROWNL;
|
1995-02-18 01:27:10 +00:00
|
|
|
|
|
1997-03-21 20:00:48 +00:00
|
|
|
|
|
2003-10-26 20:47:33 +00:00
|
|
|
|
/* Find the end of the sub-pattern in a brace expression. */
|
|
|
|
|
static const char *
|
2006-01-11 05:30:12 +00:00
|
|
|
|
next_brace_sub (const char *cp, int flags)
|
1997-03-21 20:00:48 +00:00
|
|
|
|
{
|
2012-09-25 19:38:15 +00:00
|
|
|
|
size_t depth = 0;
|
2003-10-26 20:47:33 +00:00
|
|
|
|
while (*cp != '\0')
|
|
|
|
|
if ((flags & GLOB_NOESCAPE) == 0 && *cp == '\\')
|
|
|
|
|
{
|
|
|
|
|
if (*++cp == '\0')
|
|
|
|
|
break;
|
|
|
|
|
++cp;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
if ((*cp == '}' && depth-- == 0) || (*cp == ',' && depth == 0))
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
if (*cp++ == '{')
|
|
|
|
|
depth++;
|
|
|
|
|
}
|
|
|
|
|
|
2001-11-29 21:53:29 +00:00
|
|
|
|
return *cp != '\0' ? cp : NULL;
|
1997-03-21 20:00:48 +00:00
|
|
|
|
}
|
|
|
|
|
|
2006-01-11 05:30:12 +00:00
|
|
|
|
#endif /* !defined _LIBC || !defined GLOB_ONLY_P */
|
2000-08-19 16:58:09 +00:00
|
|
|
|
|
1995-02-18 01:27:10 +00:00
|
|
|
|
/* Do glob searching for PATTERN, placing results in PGLOB.
|
|
|
|
|
The bits defined above may be set in FLAGS.
|
|
|
|
|
If a directory cannot be opened or read and ERRFUNC is not nil,
|
|
|
|
|
it is called with the pathname that caused the error, and the
|
|
|
|
|
`errno' value from the failing call; if it returns non-zero
|
Update.
<1997-06-12 21:22 Ulrich Drepper <drepper@cygnus.com>
* Makefile (libc-map): Define before including Makerules.
* Makerules (lib%.so): Depend on $(lib%-map).
(build-shlib): Adapt rule for above change.
(libc.so): Depend on $(libc-map).
* db/Makefile (libcdb-map): New definition.
* elf/Makefile (libdl-map): New definition.
* elf/dl-lookup.c: Don't use relative include path.
(undefined_msg): New variable. Use single string in all functions.
(do_lookup): Correctly recognize default version.
Return -2 if no version information is available.
Stop processing hash entries when string was found.
Don't bark about missing versioned symbol in file with original
reference if it is a weak symbol.
(_dl_lookup_symbol): Use undefined_msg.
(_dl_lookup_versioned_symbol): Likewise.
Give extra information if no verdef info is available.
* elf/dl-version.c (file_needed): Remove first argument. We must
seek in the whole search list.
(match_symbol): Correct check for available verdef info.
(_dl_check_map_versions): Correct call of find_needed.
* locale/Makefile (libBrokenLocale-map): New definition.
* login/Makefile (libutil-map): New definition.
* math/Makefile (libm-map): New definition.
* md5-crypt/Makefile (libcrypt-map): New definition.
* nis/Makefile (libnsl-map, libnss_compat-map, libnss_nis-map,
libnss_nisplus-map): New definition.
* nss/Makefile (libnss_files-map, libnss_db-map): New definitions.
* resolv/Makefile (libresolv-map, libnss_dns-map): New definitions.
* libc.map: New file.
* db/libdb.map: New file.
* elf/libdl.map: New file.
* locale/libBrokenLocale.map: New file.
* login/libutil.map: New file.
* math/libm.map: New file.
* md5-crypt/libcrypt.map: New file.
* nis/libnss_compat.map: New file.
* nis/libnsl.map: New file.
* nis/libnss_nis.map: New file.
* nis/libnss_nisplus.map: New file.
* nss/libnss_files.map: New file.
* nss/libnss_db.map: New file.
* resolv/libnss_dns.map: New file.
* resolv/libresolv.map: New file.
* sysdeps/i386/dl-machine.h (elf_machine_rel): Don't do anything
for R_386_NONE entries.
* Makefile (manual/dir-add.info): New rule.
* Makerules: Add vpath definition for .x files.
* Makerules (distinfo): Make sure target directory exists.
* argp/argp-help.c (argp_args_usage): Don't modify `fdoc' value
since it is used to distinguish filtered strings from unmodifed
strings.
* elf/dl-lookup.c (do_lookup): Optimize STT_* recognition.
* elf/dl-reloc.c: Fix typo.
* inet/arpa/tftp.h (struct tftphdr): Change type of tu_block to
`unsigned short'.
* manual/Makefile (dir-add.texi): Also emit wrapper text for
info/install-info.
(distribute): Add dir-add.texi and dir-add.info.
(mostlyclean): Add dir-add.info.
(realclean): Add dir-add.texi.
(install): Add entries in `dir' file using install-info.
* manual/libc.texinfo: Add @dircategory and @direntry text.
Reported by Miles Bader <miles@gnu.ai.mit.edu>.
* manual/pattern.texi: Correct description of GLOB_MAGCHAR and
GLOB_NOMAGIC. Changes by Roland McGrath <roland@gnu.ai.mit.edu>.
* nis/nis_addmember.c: Little optimizations.
* nis/nis_call.c: Likewise.
* nis/nis_creategroup.c: Likewise.
* nis/nis_defaults.c: Likewise.
* nis/nis_destroygroup.c: Likewise.
* nis/nis_ismember.c: Likewise.
* nis/nis_local_names.c: Likewise.
* nis/nis_print_group_entry.c: Likewise.
* nis/nis_verifygroup.c: Likewise.
* posix/unistd.h: Fix comment for getcwd.
* stdlib/Makefile (headers): Remove inttypes.h. It's a system
dependent header.
* sysdeps/wordsize-32/Dist: New file.
* sysdeps/wordsize-32/Makefile: New file.
* sysdeps/wordsize-64/Dist: New file.
* sysdeps/wordsize-64/Makefile: New file.
* sunrpc/Makefile: Adopt comment for real situation.
* sysdeps/i386/add_n.S: Add ASM_TYPE_DIRECTIVE and AS_SIZE_DIRECTIVE.
* sysdeps/i386/addmul_1.s: Likewise.
* sysdeps/i386/lshist.s: Likewise.
* sysdeps/i386/rshift.s: Likewise.
* sysdeps/i386/sub_n.s: Likewise.
* sysdeps/i386/submul_1.s: Likewise.
* sysdeps/unix/sysv/linux/i386/sysdep.h (SYSCALL_ERROR_HANDLER):
Add .type and .size.
1997-06-12 13:32 Philip Blundell <Philip.Blundell@pobox.com>
* libc/sysdeps/unix/arm/brk.S: New file.
* libc/sysdeps/unix/arm/sysdep.S: Likewise.
* libc/sysdeps/unix/sysv/linux/arm/sysdep.S: Likewise.
1997-06-11 11:51 Thorsten Kukuk <kukuk@vt.uni-paderborn.de>
* nis/nss_nisplus/nisplus-spwd.c (_nss_nisplus_parse_spent):
Check if we have shadow information.
1997-06-08 19:33 Thorsten Kukuk <kukuk@vt.uni-paderborn.de>
* nis/nis_getservlist.c (nis_getservlist): Use calloc instead of
malloc, alloc memory for nis_server struct.
* nis/nis_getservlist.c (nis_freeservlist): Give the memory for
the nis_server struct free, too.
* nis/nis_removemember (nis_removemember): Fix for loop.
1997-06-12 12:45 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/i386/fpu/__math.h (__M_SQRT2): Define here since we
cannot rely on M_SQRT2 being defined. (log1p): Use __M_SQRT2 not
M_SQRT2.
* math/math.h (_Mldbl): Define even if M_* constants are not
defined.
Reported by corsepiu@faw.uni-ulm.de.
1997-06-12 03:08 Philip Blundell <Philip.Blundell@pobox.com>
* nss/getXXbyYY_r.c (do_weak_alias): Remove extra parentheses.
1997-06-11 13:22 Ulrich Drepper <drepper@cygnus.com>
* misc/regexp.h (compile): Allow use of macro INIT for variable
declaration. Add documentation for INIT.
Reported by Robert Bihlmeyer <robbe@orcus.priv.at>.
1997-06-11 10:47 Philip Blundell <Philip.Blundell@pobox.com>
* sysdeps/unix/sysv/linux/net/if_arp.h: Add two new hardware types.
1997-06-10 11:31 H.J. Lu <hjl@gnu.ai.mit.edu>
* sysdeps/powerpc/strlen.s: Use -0x101 instead of 0xfffffeff
for a signed 16-bit value.
1997-06-07 07:54 H.J. Lu <hjl@gnu.ai.mit.edu>
* sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c
(_dl_sysdep_read_whole_file): Deleted.
* sysdeps/powerpc/fenvbits.h (__FE_ALL_INVALID): Changed
to FE_ALL_INVALID.
* sysdeps/powerpc/fraiseexcpt.c (__FE_INVALID_SOFTWARE):
Changed to FE_INVALID_SOFTWARE.
(__FPSCR_STICKY_BITS): Changed to FPSCR_STICKY_BITS.
* sysdeps/libm-ieee754/s_fmin.c: Fix a typo.
1997-06-07 18:48 H.J. Lu <hjl@gnu.ai.mit.edu>
* shlib-versions (.*-.*-linux.*): Set libc to 6.
1997-06-08 15:35 Thorsten Kukuk <kukuk@vt.uni-paderborn.de>
* nis/nis_add.c (nis_add): Use nis_leaf_of_r instead of nis_name_of_r.
* nis/nis_addmember.c (nis_addmember): Fix a lot of pointer errors.
* nis/nis_clone.c: Likewise.
* nis/nis_removemember.c (nis_removemember): Likewise.
* nis/nis_table.c: Likewise.
* nis/nss_nis/nis-hosts.c: Use addr, not p for inet_pton call.
* nis/nss_nisplus/nisplus-hosts.c: Likewise.
* nis/nss_nis/nis-netgrp.c (_nss_nis_setnetgrent): Check for
group == NULL.
1997-06-08 21:21 Mark Kettenis <kettenis@phys.uva.nl>
* login/login.c, login/utmp_daemon.c, login/utmp_file.c,
login/getutent_r.c, login/utmpname.c: Cleanup `#if _LIBC' and
`#ifndef _LIBC' fragments.
* login/programs/utmpd.c: Define DEFAULT_USER.
(drop_priviliges): Use it.
(main): Set locale and text domain.
* login/programs/utmpd-private.h: Declare proc_utmp_eq.
* login/programs/database.c (proc_utmp_eq): Removed.
* login/programs/request.c (proc_utmp_eq): Made global. Only use
ut_id field if valid.
* login/utmp_file.c (proc_utmp_eq): Restore patch made by Miles
Bader that was lost when adding the daemon backend; Only use ut_id
field if valid.
1997-06-05 23:10 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/unix/sysv/linux/Dist: Remove netatalk/atalk.h and
netinet/icmp.h, add netatalk/at.h.
* sysdeps/unix/sysv/linux/powerpc/Dist: Remove termios.h.
* sysdeps/unix/sysv/linux/sparc/Dist: Remove start.c.
1997-06-04 19:22 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* stdlib/testsort.c (compare): Fix parameter types.
1997-06-04 19:05 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* md5-crypt/Makefile (distribute): Fix name of file.
1997-06-04 19:02 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* login/Makefile (utmpd-routines): Remove utmpd again, which is
already added implicitly through $(others).
1997-06-05 13:43 Fila Kolodny <fila@filapc.ibi.com>
* sysdeps/unix/sysv/linux/Makefile (sysdep_headers): Add netipx/ipx.h.
1997-06-05 13:25 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* md5-crypt/md5-crypt.c: Add prototype for __md5_crypt.
1997-06-05 17:08 Ulrich Drepper <drepper@cygnus.com>
* string/argz-addsep.c: Correct weak alias.
Reported by Ben Pfaff <pfaffben@pilot.msu.edu>.
* locale/setlocale.c (setlocale): Free variable with locale path
before returning.
(setname): Don't test for _nl_current[category] being NULL before
freeing.
Reported by Ben Pfaff <pfaffben@pilot.msu.edu>.
1997-06-04 12:41 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* manual/intro.texi (XPG): Correct some typos.
* manual/libc.texinfo (Program Arguments): Menu updated.
* nis/nis_local_names.c (nis_local_host): Fix pointer errors.
1997-06-12 21:38:55 +00:00
|
|
|
|
`glob' returns GLOB_ABORTED; if it returns zero, the error is ignored.
|
1995-02-18 01:27:10 +00:00
|
|
|
|
If memory cannot be allocated for PGLOB, GLOB_NOSPACE is returned.
|
|
|
|
|
Otherwise, `glob' returns zero. */
|
|
|
|
|
int
|
2004-03-10 09:29:17 +00:00
|
|
|
|
#ifdef GLOB_ATTRIBUTE
|
|
|
|
|
GLOB_ATTRIBUTE
|
|
|
|
|
#endif
|
Convert miscellaneous function definitions to prototype style.
This patch converts various miscellaneous functions definitions in
glibc, found with grep and not covered by my previous scripted
conversions, from old-style K&R to prototype-style. These changes
were made manually. This is not necessarily exhaustive as formatting
variants may have prevented my grep from finding some such
definitions.
Regarding the changes to files from GMP, they may originally have been
omitted when removing __STDC__ conditionals because of the files
coming from another package, but (a) GMP no longer has __STDC__
conditionals there anyway and (b) we don't try to keep these files
verbatim in sync with GMP (and there are licensing differences), so
making the change to them in glibc seems reasonable.
Tested for x86_64 and x86 (testsuite - this patch affects files
containing assertions).
* debug/fortify_fail.c (__fortify_fail): Convert to
prototype-style function definition. Use internal_function.
* libio/genops.c (save_for_backup): Convert to prototype-style
function definition.
* libio/wgenops.c (save_for_wbackup): Likewise.
* login/grantpt.c (grantpt): Likewise.
* login/ptsname.c (ptsname): Likewise.
(__ptsname_r): Likewise.
* login/unlockpt.c (unlockpt): Likewise.
* mach/msgserver.c (__mach_msg_server): Likewise.
* misc/efgcvt.c (__APPEND (FUNC_PREFIX, fcvt)): Likewise.
(__APPEND (FUNC_PREFIX, ecvt)): Likewise.
(__APPEND (FUNC_PREFIX, gcvt)): Likewise.
* misc/efgcvt_r.c (__APPEND (FUNC_PREFIX, fcvt_r)): Likewise.
(__APPEND (FUNC_PREFIX, ecvt_r)): Likewise.
* nptl/cleanup_compat.c (_pthread_cleanup_push): Likewise.
* nptl/cleanup_defer_compat.c (_pthread_cleanup_push_defer):
Likewise.
* nptl/libc_pthread_init.c (__libc_pthread_init): Likewise. Use
internal_function.
* nptl/pthread_atfork.c (__pthread_atfork): Convert to
prototype-style function definition.
* nptl/pthread_create.c (__pthread_create_2_1): Likewise.
[SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_1)]
(__pthread_create_2_0): Likewise.
* nptl/pthread_key_create.c (__pthread_key_create): Likewise.
* nptl/register-atfork.c (__register_atfork): Likewise.
* posix/glob.c (glob): Likewise.
* posix/regcomp.c (re_comp): Likewise.
* posix/regexec.c (re_exec): Likewise.
* stdlib/add_n.c [__STDC__]: Make code unconditional.
[!__STDC__]: Remove conditional code.
* stdlib/cmp.c [__STDC__]: Make code unconditional.
[!__STDC__]: Remove conditional code.
* stdlib/divmod_1.c [__STDC__]: Make code unconditional.
[!__STDC__]: Remove conditional code.
* stdlib/divrem.c [__STDC__]: Make code unconditional.
[!__STDC__]: Remove conditional code.
* stdlib/lshift.c [__STDC__]: Make code unconditional.
[!__STDC__]: Remove conditional code.
* stdlib/mod_1.c [__STDC__]: Make code unconditional.
[!__STDC__]: Remove conditional code.
* stdlib/mul.c [__STDC__]: Make code unconditional.
[!__STDC__]: Remove conditional code.
* stdlib/mul_n.c [__STDC__]: Make code unconditional.
[!__STDC__]: Remove conditional code.
* stdlib/rshift.c [__STDC__]: Make code unconditional.
[!__STDC__]: Remove conditional code.
* stdlib/strtod.c (INTERNAL (STRTOF)): Convert to prototype-style
function definition.
(STRTOF): Likewise.
* stdlib/strtod_l.c (__STRTOF): Likewise.
* stdlib/strtol.c (INTERNAL (strtol)): Likewise.
* stdlib/strtol_l.c (INTERNAL (__strtol_l)): Likewise.
(__strtol_l): Likewise.
* stdlib/sub_n.c [__STDC__]: Make code unconditional.
[!__STDC__]: Remove conditional code.
* string/memrchr.c (MEMRCHR): Convert to prototype-style function
definition.
* string/strcasecmp.c (LOCALE_PARAM_DECL): Remove macro.
[USE_IN_EXTENDED_LOCALE_MODEL] (LOCALE_PARAM): Include argument
type.
(__strcasecmp): Convert to prototype-style function definition.
* string/strncase.c (LOCALE_PARAM_DECL): Remove macro.
[USE_IN_EXTENDED_LOCALE_MODEL] (LOCALE_PARAM): Include argument
type.
(__strncasecmp): Convert to prototype-style function definition.
* sunrpc/pm_getport.c (__libc_rpc_getport): Likewise.
* sunrpc/xdr.c (xdr_union): Likewise.
* sunrpc/xdr_array.c (xdr_array): Likewise.
* sunrpc/xdr_ref.c (xdr_reference): Likewise.
* sysdeps/m68k/m680x0/fpu/s_atan.c (__CONCATX(__,FUNC)): Likewise.
* sysdeps/m68k/m680x0/fpu/s_isinf.c (__CONCATX(__,FUNC)):
Likewise.
* sysdeps/m68k/m680x0/fpu/s_scalbn.c (__CONCATX(__scalbn,suffix):
Likewise.
* sysdeps/m68k/m680x0/fpu/s_sincos.c (CONCATX(__,FUNC)): Likewise.
* sysdeps/unix/sysv/linux/i386/scandir64.c (__old_scandir64):
Likewise.
* time/strftime_l.c (LOCALE_PARAM_DECL): Remove macro.
(LOCALE_PARAM_PROTO): Likewise.
[_LIBC && USE_IN_EXTENDED_LOCALE_MODEL] (LOCALE_PARAM): Include
argument type.
(ut_argument_spec): Remove macro.
(ut_argument_spec_iso): Rename to ut_argument_spec.
(memcpy_lowcase): Use LOCALE_PARAM in declaration. Convert to
prototype-style function definition.
(memcpy_uppcase): Likewise.
(__strftime_internal): Likewise.
(my_strftime): Likewise.
* time/strptime_l.c (LOCALE_PARAM_PROTO): Remove macro.
(LOCALE_PARAM_DECL): Likewise.
[_LIBC] (LOCALE_PARAM): Include argument type.
(__strptime_internal): Convert to prototype-style function
definition.
(strptime): Likewise.
* wcsmbs/wcscasecmp.c (LOCALE_PARAM_DECL): Remove macro.
[USE_IN_EXTENDED_LOCALE_MODEL] (LOCALE_PARAM): Include argument
type.
(__wcscasecmp): Convert to prototype-style function definition.
* wcsmbs/wcsncase.c (LOCALE_PARAM_DECL): Remove macro.
[USE_IN_EXTENDED_LOCALE_MODEL] (LOCALE_PARAM): Include argument
type.
(__wcsncasecmp): Convert to prototype-style function definition.
2015-10-20 21:27:22 +00:00
|
|
|
|
glob (const char *pattern, int flags, int (*errfunc) (const char *, int),
|
|
|
|
|
glob_t *pglob)
|
1995-02-18 01:27:10 +00:00
|
|
|
|
{
|
|
|
|
|
const char *filename;
|
2011-05-23 03:04:16 +00:00
|
|
|
|
char *dirname = NULL;
|
1995-02-18 01:27:10 +00:00
|
|
|
|
size_t dirlen;
|
|
|
|
|
int status;
|
2000-12-02 08:18:55 +00:00
|
|
|
|
size_t oldcount;
|
2007-02-14 19:52:38 +00:00
|
|
|
|
int meta;
|
|
|
|
|
int dirname_modified;
|
2011-05-23 03:04:16 +00:00
|
|
|
|
int malloc_dirname = 0;
|
2007-02-14 19:52:38 +00:00
|
|
|
|
glob_t dirs;
|
2011-05-23 03:04:16 +00:00
|
|
|
|
int retval = 0;
|
|
|
|
|
#ifdef _LIBC
|
|
|
|
|
size_t alloca_used = 0;
|
|
|
|
|
#endif
|
1995-02-18 01:27:10 +00:00
|
|
|
|
|
|
|
|
|
if (pattern == NULL || pglob == NULL || (flags & ~__GLOB_FLAGS) != 0)
|
|
|
|
|
{
|
update from main archive
Mon Sep 23 15:31:04 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
* hurd/Makefile ($(includedir)/rpc/netdb.h): There is no make
variable `top_srcdir' in libc; use $(..) instead.
* sysdeps/mach/hurd/Makefile (rtld-installed-name): Delete special
definition. It was a *Mistake*. (With a capital M.)
* sysdeps/mach/getsysstats.c (__get_nprocs): Renamed from
__get_nproc.
(__get_nprocs_conf): Renamed from __get_nproc_conf.
Fri Sep 27 03:49:56 1996 Ulrich Drepper <drepper@cygnus.com>
Add support for cancelable system calls.
* csu/initfini.c: Make in crti.o reference to symbol
__libc_force_cancel_wrapper when compiling reentrant version.
* misc/Makefile (routines): Add force-wrapper.
* misc/force-wrapper.c: New file.
* posix/system.c: Rename function to __libc_system and make system
a weak alias.
* sysdeps/stub/system.c: Likewise.
* posix/wait.c: Rename function to __libc_wait and make __wait a
weak alias. De-ANSI-fy.
* sysdeps/standalone/read.c: Rename function to __libc_read and
make __read a weak alias.
* sysdeps/stub/read.c: Likewise.
* sysdeps/standalone/write.c: Rename function to __libc_write and
make __write a weak alias.
* sysdeps/stub/write.c: Likewise.
* sysdeps/stub/tcdrain.c: Rename function to __libc_tcdrain and
make tcdrain a weak alias.
* sysdeps/unix/bsd/tcdrain.c: Likewise.
* sysdeps/unix/bsd/bsd4.4/tcdrain.c: Likewise.
* sysdeps/unix/sysv/tcdrain.c: Likewise.
* sysdeps/unix/sysv/linux/tcdrain.c: Likewise.
* sysdeps/unix/bsd/bsd4.4/wait.c: Rename function to __libc_wait
and make __wait a weak alias.
* sysdeps/stub/waitpid.c: Rename function to __libc_waitpid and
make __waitpid a weak alias.
* sysdeps/unix/bsd/bsd4.4/waitpid.c: Likewise.
* sysdeps/unix/sysv/linux/waitpid.c: Likewise.
* sysdeps/unix/sysv/sysv4/waitpid.c: Likewise.
* sysdeps/unix/common/pause.c: Rename function to __libc_pause
and make pause a weak alias. De-ANSI-fy.
* sysdeps/unix/syscalls.list: Change name for close, fcntl, fsync,
lseek, open, read, and write to have __libc_ prefix and make old
names a weak alias.
* sysdeps/unix/mman/syscalls.list: Likewise for msync.
* sysdeps/unix/sysv/linux/syscalls.list: Likewise for nanosleep.
* io/creat.c: De-ANSI-fy.
* sysdeps/unix/sysv/linux/syscalls.list: Add pause.
Thu Sep 26 19:15:55 1996 Ulrich Drepper <drepper@cygnus.com>
* misc/mntent.h: Add MNTTYPE_* and MNTOPT_* macros.
Reported by Hans Grobler <grobh@nolian.ee.sun.ac.za>.
Thu Sep 26 14:40:10 1996 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/posix/pathconf.c: Pass descriptor for just opened file
to fpathconf.
Reported by Martin von Loewis <martin@mira.isdn.cs.tu-berlin.de>.
Thu Sep 26 04:02:43 1996 Ulrich Drepper <drepper@cygnus.com>
* locale/programs/locfile.c (write_locale_data): Allocate room
even for file name for LC_MESSAGES locale.
(locafile_read): `tok_era' must be handled as a string list.
* locale/programs/ld-time.c: Finish correction of handling `era'.
* locale/C-time.c (_nl_C_LC_TIME): Add initializer for new fields.
* locale/categories.def: Add postload function for LC_TIME.
* locale/setlocale.c: Make lock global and rename to
__libc_setlocale_lock.
* locale/localeinfo.h (struct era_entry): New type. Used in strftime.
Add prototypes for _nl_get_era_entry and _nl_get_alt_digit.
* locale/lc-time.c (_nl_postload_time): New function. Initialize
lazy intialization.
(_nl_get_era_entry): New function. Return era entry which corresponds
to given year.
(_nl_get_alt_digit): New function. Return string with alternate
digit representation for given number.
* time/strftime.c (strftime): Use _nl_get_alt_digit to get
string representing alternate digit notation.
Wed Sep 25 17:31:55 1996 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/generic/waitstatus.h (union wait): Add w_status field.
Reported by Hans Grobler <grobh@nolian.ee.sun.ac.za>.
* elf/rtld.c (dl_main): Process LD_PRELOAD before loading
ld.so.preload. Suggested by David Engel <david@elo.ods.com>.
Wed Sep 25 13:10:57 1996 Ulrich Drepper <drepper@cygnus.com>
* catgets/gencat.c (main): Change --version again because RMS wants
the package name in parentheses.
* db/makedb.c: Likewise.
* locale/programs/locale.c: Likewise.
* locale/programs/localedef.c: Likewise.
Tue Sep 24 01:28:05 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* Makefile ($(objpfx)sysd-dirs): Depend on Subdirs files, command
rewritten.
($(objpfx)version-info.h): Depend on Banner files, command
rewritten.
Wed Sep 25 02:44:41 1996 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/unix/sysv/linux/sleep.c: New file. Based on nanosleep.
Tue Sep 24 21:46:02 1996 Ulrich Drepper <drepper@cygnus.com>
* shadow/lckpwdf.c (PWD_LOCKFILE): Change to /etc/lock.pwd to be
on the same device as the password file.
* shadow/shadow.h (struct spwd): Change type of numeric fields
to `long int' since there value are days, not seconds.
* shadow/putspent.c: Change casts from time_t to `long int'.
* shadow/sgetspent_r.c (LINE_READER): Likewise.
Mon Sep 23 23:05:24 1996 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/unix/sysv/linux/errnos.h: Define __set_errno to make
sure the thread specific variable is set as well as the global
variable.
* sysdeps/mach/hurd/errnos.awk: Define macro for source code
compatibility.
* sysdeps/stub/errnos.h: Likewise.
* sysdeps/unix/bsd/bsd4.4/errnos.h: Likewise.
* shadow/putspent.c: Don't include <errno.h>.
* dirent/scandir.c (scandir): Use __set_errno to set errno
variable.
* elf/dl-load.c (open_path): Likewise.
* inet/rcmd.c (rcmd): Likewise.
(rresvport): Likewise.
* intl/dcgettext.c [!__set_errno]: Define __set_errno.
(DCGETTEXT): Use __set_errno to set errno variable.
* io/fts.c (fts_open): Likewise.
(fts_close): Likewise.
(fts_read): Likewise.
(fts_set): Likewise.
(fts_children): Likewise.
(fts_build): Likewise.
(fts_stat): Likewise.
* io/ftw.c (ftw_dir): Likewise.
(ftw): Likewise.
* io/getwd.c (getwd): Likewise.
* io/lockf.c (lockf): Likewise.
* libio/libioP.h [EINVAL]: Use __set_errno to define MAYBE_SET_EINVAL.
* libio/iofdopen.c (_IO_fdopen): Use MAYBE_SET_EINVAL to errno.
* libio/iogetdelim.c (_IO_getdelim): Likewise.
* libio/fileops.c (_IO_file_open): Use __set_errno to set errno
variable.
* libio/iofgetpos.c (_IO_fgetpos): Likewise.
* libio/iofsetpos.c (_IO_fsetpos): Likewise.
* libio/ioftell.c (_IO_ftell): Likewise.
* locale/loadlocale.c (_nl_load_locale): Likewise.
* locale/nl_langinfo.c (nl_langinfo): Likewise.
* locale/setlocale.c (ERROR_RETURN): Likewise.
* login/getutid_r (__getutid_r): Likewise.
* login/getutline_r (__getutline_r): Likewise.
* login/login.c (tty_name): Likewise.
* login/oututline_r.c (__pututline_r): Likewise.
* malloc/malloc.c (morecore): Likewise.
* misc/efgcvt_r.c (fcvt_r): Likewise.
* misc/hsearch_r.c (hcreate_r): Likewise.
(hdestroy_r): Likewise.
(hsearch_r): Likewise.
* nss/nsswitch.c (__nss_configure_lookup): Likewise.
* nss/nss_dns/dns-host.c (_nss_dns_gethostbyname2_r): Likewise.
(_nss_dns_gethostbyaddr_r): Likewise.
* nss/nss_files/files-XXX.c (internal_getent): Likewise.
* nss/nss_files/files-parse.c (parse_list): Likewise.
* posix/confstr.c (confstr): Likewise. De-ANSI-fy.
* posix/execvp.c (execvp): Likewise.
* posix/glob.c: Define __set_errno.
(glob): Use __set_errno to set errno variable.
(glob_in_dir): Likewise.
* pwd/getpw.c: Likewise. De-ANSI-fy.
* pwd/putpwent.c: Likewise.
* resolv/inet_net_ntop.c: Likewise.
* resolv/inet_net_pton.c: Likewise.
* resolv/inet_neta.c: Likewise.
* resolv/inet_ntop.c: Likewise.
* resolv/inet_pton.c: Likewise.
* resolv/res_query.c (res_search): Likewise.
* resolv/res_send.c (Aerror): Likewise.
(Perror): Likewise.
(res_send): Likewise.
* signal/sigaddset.c: Likewise. De-ANSI-fy.
* signal/sigdelset.c: Likewise.
* signal/sigempty.c: Likewise.
* signal/sigfillset.c: Likewise.
* signal/sigismem.c: Likewise.
* stdio/fclose.c: Likewise.
* stdio/feof.c: Likewise.
* stdio/ferror.c: Likewise.
* stdio/fflush.c: Likewise.
* stdio/fgetc.c: Likewise.
* stdio/fgetpos.c: Likewise.
* stdio/fgets.c: Likewise.
* stdio/fileno.c: Likewise.
* stdio/fmemopen.c: Likewise.
* stdio/fopen.c: Likewise.
* stdio/fputc.c: Likewise.
* stdio/fread.c: Likewise.
* stdio/freopen.c: Likewise.
* stdio/fseek.c: Likewise.
* stdio/fsetpos.c: Likewise.
* stdio/ftell.c: Likewise.
* stdio/fwrite.c: Likewise.
* stdio/getdelim.c: Likewise.
* stdio/gets.c: Likewise.
* stdio/glue.c: Likewise.
* stdio/internals.c: Likewise.
* stdio/memstream.c: Likewise.
* stdio/setvbuf.c: Likewise.
* stdio/ungetc.c: Likewise.
* stdio/vsscanf.c: Likewise.
* stdio-common/reg-printf.c: Likewise.
* stdio-common/vfprintf.c: Likewise.
* stdio-common/vfscanf.c: Likewise.
* stdlib/canonicalize.c: Likewise.
* stdlib/msort.c: Likewise.
* stdlib/random_r.c: Likewise.
* stdlib/strfmon.c: Likewise.
* stdlib/strtod.c: Likewise.
* stdlib/strtol.c: Likewise.
* sunrpc/bindrsvprt.c: Likewise.
* time/asctime.c: Likewise.
* time/localtime.c: Likewise.
* wcsmbs/mbrtowc.c: Likewise.
* wcsmbs/mbsnrtowcs.c: Likewise.
* wcsmbs/mbsrtowcs.c: Likewise.
* wcsmbs/wcrtomb.c: Likewise.
* wcsmbs/wcsnrtombs.c: Likewise.
* wcsmbs/wcsrtombs.c: Likewise.
* wcsmbs/wcstok.c: Likewise.
* sysdeps/generic/ftime.c: Likewise.
* sysdeps/generic/pty.c: Likewise.
* sysdeps/generic/setenv.c: Likewise.
* sysdeps/generic/speed.c: Likewise.
* sysdeps/generic/sysd-stdio.c: Likewise.
* sysdeps/generic/uname.c: Likewise.
* sysdeps/generic/vlimit.c: Likewise.
* sysdeps/libm-ieee754/k_standard.c: Likewise.
* sysdeps/libm-ieee754/s_ldexp.c: Likewise.
* sysdeps/libm-ieee754/s_ldexpf.c: Likewise.
* sysdeps/libm-ieee754/s_ldexpl.c: Likewise.
* sysdeps/libm-ieee754/w_scalb.c: Likewise.
* sysdeps/libm-ieee754/w_scalbf.c: Likewise.
* sysdeps/libm-ieee754/w_scalbl.c: Likewise.
* sysdeps/posix/dup2.c: Likewise.
* sysdeps/posix/euidaccess.c: Likewise.
* sysdeps/posix/fdopen.c: Likewise.
* sysdeps/posix/flock.c: Likewise.
* sysdeps/posix/fpathconf.c: Likewise.
* sysdeps/posix/getcwd.c: Likewise.
* sysdeps/posix/gettimeofday.c: Likewise.
* sysdeps/posix/isatty.c: Likewise.
* sysdeps/posix/isfdtype.c: Likewise.
* sysdeps/posix/killpg.c: Likewise.
* sysdeps/posix/mkstemp.c: Likewise.
* sysdeps/posix/mktemp.c: Likewise.
* sysdeps/posix/pathconf.c: Likewise.
* sysdeps/posix/pipestream.c: Likewise.
* sysdeps/posix/remove.c: Likewise.
* sysdeps/posix/rename.c: Likewise.
* sysdeps/posix/sigintr.c: Likewise.
* sysdeps/posix/signal.c: Likewise.
* sysdeps/posix/sigsuspend.c: Likewise.
* sysdeps/posix/sigvec.c: Likewise.
* sysdeps/posix/sleep.c: Likewise.
* sysdeps/posix/sysconf.c: Likewise.
* sysdeps/posix/system.c: Likewise.
* sysdeps/posix/tempname.c: Likewise.
* sysdeps/posix/truncate.c: Likewise.
* sysdeps/posix/ttyname.c: Likewise.
* sysdeps/posix/ttyname_r.c: Likewise.
* sysdeps/posix/wait3.c: Likewise.
* sysdeps/standalone/close.c: Likewise.
* sysdeps/standalone/open.c: Likewise.
* sysdeps/standalone/read.c: Likewise.
* sysdeps/standalone/write.c: Likewise.
* sysdeps/stub/__longjmp.c: Likewise.
* sysdeps/stub/accept.c: Likewise.
* sysdeps/stub/access.c: Likewise.
* sysdeps/stub/acct.c: Likewise.
* sysdeps/stub/adjtime.c: Likewise.
* sysdeps/stub/alarm.c: Likewise.
* sysdeps/stub/bind.c: Likewise.
* sysdeps/stub/brk.c: Likewise.
* sysdeps/stub/chdir.c: Likewise.
* sysdeps/stub/chflags.c: Likewise.
* sysdeps/stub/chmod.c: Likewise.
* sysdeps/stub/chown.c: Likewise.
* sysdeps/stub/chroot.c: Likewise.
* sysdeps/stub/clock.c: Likewise.
* sysdeps/stub/close.c: Likewise.
* sysdeps/stub/closedir.c: Likewise.
* sysdeps/stub/connect.c: Likewise.
* sysdeps/stub/ctermid.c: Likewise.
* sysdeps/stub/cuserid.c: Likewise.
* sysdeps/stub/dirfd.c: Likewise.
* sysdeps/stub/dup.c: Likewise.
* sysdeps/stub/dup2.c: Likewise.
* sysdeps/stub/euidaccess.c: Likewise.
* sysdeps/stub/execve.c: Likewise.
* sysdeps/stub/fchdir.c: Likewise.
* sysdeps/stub/fchflags.c: Likewise.
* sysdeps/stub/fchmod.c: Likewise.
* sysdeps/stub/fchown.c: Likewise.
* sysdeps/stub/fcntl.c: Likewise.
* sysdeps/stub/fdopen.c: Likewise.
* sysdeps/stub/fexecve.c: Likewise.
* sysdeps/stub/flock.c: Likewise.
* sysdeps/stub/fork.c: Likewise.
* sysdeps/stub/fpathconf.c: Likewise.
* sysdeps/stub/fstatfs.c: Likewise.
* sysdeps/stub/fsync.c: Likewise.
* sysdeps/stub/ftruncate.c: Likewise.
* sysdeps/stub/fxstat.c: Likewise.
* sysdeps/stub/getcwd.c: Likewise.
* sysdeps/stub/getdents.c: Likewise.
* sysdeps/stub/getdomain.c: Likewise.
* sysdeps/stub/getdtsz.c: Likewise.
* sysdeps/stub/getegid.c: Likewise.
* sysdeps/stub/getenv.c: Likewise.
* sysdeps/stub/geteuid.c: Likewise.
* sysdeps/stub/getgid.c: Likewise.
* sysdeps/stub/getgroups.c: Likewise.
* sysdeps/stub/gethostid.c: Likewise.
* sysdeps/stub/gethostname.c: Likewise.
* sysdeps/stub/getitimer.c: Likewise.
* sysdeps/stub/getlogin.c: Likewise.
* sysdeps/stub/getlogin_r.c: Likewise.
* sysdeps/stub/getpagesize.c: Likewise.
* sysdeps/stub/getpeername.c: Likewise.
* sysdeps/stub/getpid.c: Likewise.
* sysdeps/stub/getppid.c: Likewise.
* sysdeps/stub/getpriority.c: Likewise.
* sysdeps/stub/getrlimit.c: Likewise.
* sysdeps/stub/getrusage.c: Likewise.
* sysdeps/stub/getsid.c: Likewise.
* sysdeps/stub/getsockname.c: Likewise.
* sysdeps/stub/getsockopt.c: Likewise.
* sysdeps/stub/getsysstats.c: Likewise.
* sysdeps/stub/gettimeofday.c: Likewise.
* sysdeps/stub/getuid.c: Likewise.
* sysdeps/stub/gtty.c: Likewise.
* sysdeps/stub/ioctl.c: Likewise.
* sysdeps/stub/isatty.c: Likewise.
* sysdeps/stub/isfdtype.c: Likewise.
* sysdeps/stub/kill.c: Likewise.
* sysdeps/stub/killpg.c: Likewise.
* sysdeps/stub/link.c: Likewise.
* sysdeps/stub/listen.c: Likewise.
* sysdeps/stub/lseek.c: Likewise.
* sysdeps/stub/lxstat.c: Likewise.
* sysdeps/stub/madvice.c: Likewise.
* sysdeps/stub/mkdir.c: Likewise.
* sysdeps/stub/mkfifo.c: Likewise.
* sysdeps/stub/mkstemp.c: Likewise.
* sysdeps/stub/mktemp.c: Likewise.
* sysdeps/stub/mmap.c: Likewise.
* sysdeps/stub/morecore.c: Likewise.
* sysdeps/stub/mprotect.c: Likewise.
* sysdeps/stub/msgctl.c: Likewise.
* sysdeps/stub/msgget.c: Likewise.
* sysdeps/stub/msgrcv.c: Likewise.
* sysdeps/stub/msgsnd.c: Likewise.
* sysdeps/stub/msync.c: Likewise.
* sysdeps/stub/munmap.c: Likewise.
* sysdeps/stub/nanosleep.c: Likewise.
* sysdeps/stub/nice.c: Likewise.
* sysdeps/stub/nlist.c: Likewise.
* sysdeps/stub/open.c: Likewise.
* sysdeps/stub/opendir.c: Likewise.
* sysdeps/stub/pathconf.c: Likewise.
* sysdeps/stub/pause.c: Likewise.
* sysdeps/stub/pipe.c: Likewise.
* sysdeps/stub/pipestream.c: Likewise.
* sysdeps/stub/poll.c: Likewise.
* sysdeps/stub/profil.c: Likewise.
* sysdeps/stub/ptrace.c: Likewise.
* sysdeps/stub/putenv.c: Likewise.
* sysdeps/stub/raise.c: Likewise.
* sysdeps/stub/read.c: Likewise.
* sysdeps/stub/readdir.c: Likewise.
* sysdeps/stub/readlink.c: Likewise.
* sysdeps/stub/readv.c: Likewise.
* sysdeps/stub/reboot.c: Likewise.
* sysdeps/stub/recv.c: Likewise.
* sysdeps/stub/recvfrom.c: Likewise.
* sysdeps/stub/recvmsg.c: Likewise.
* sysdeps/stub/remove.c: Likewise.
* sysdeps/stub/rename.c: Likewise.
* sysdeps/stub/revoke.c: Likewise.
* sysdeps/stub/rewinddir.c: Likewise.
* sysdeps/stub/rmdir.c: Likewise.
* sysdeps/stub/sbrk.c: Likewise.
* sysdeps/stub/sched_getp.c: Likewise.
* sysdeps/stub/sched_gets.c: Likewise.
* sysdeps/stub/sched_primax.c: Likewise.
* sysdeps/stub/sched_primin.c: Likewise.
* sysdeps/stub/sched_rr_gi.c: Likewise.
* sysdeps/stub/sched_setp.c: Likewise.
* sysdeps/stub/sched_sets.c: Likewise.
* sysdeps/stub/sched_yield.c: Likewise.
* sysdeps/stub/seekdir.c: Likewise.
* sysdeps/stub/select.c: Likewise.
* sysdeps/stub/semctl.c: Likewise.
* sysdeps/stub/semget.c: Likewise.
* sysdeps/stub/semop.c: Likewise.
* sysdeps/stub/send.c: Likewise.
* sysdeps/stub/sendmsg.c: Likewise.
* sysdeps/stub/sendto.c: Likewise.
* sysdeps/stub/setdomain.c: Likewise.
* sysdeps/stub/setegid.c: Likewise.
* sysdeps/stub/setenv.c: Likewise.
* sysdeps/stub/seteuid.c: Likewise.
* sysdeps/stub/setgid.c: Likewise.
* sysdeps/stub/setgroups.c: Likewise.
* sysdeps/stub/sethostid.c: Likewise.
* sysdeps/stub/sethostname.c: Likewise.
* sysdeps/stub/setitimer.c: Likewise.
* sysdeps/stub/setjmp.c: Likewise.
* sysdeps/stub/setlogin.c: Likewise.
* sysdeps/stub/setpgid.c: Likewise.
* sysdeps/stub/setpriority.c: Likewise.
* sysdeps/stub/setregid.c: Likewise.
* sysdeps/stub/setreuid.c: Likewise.
* sysdeps/stub/setrlimit.c: Likewise.
* sysdeps/stub/setsid.c: Likewise.
* sysdeps/stub/setsockopt.c: Likewise.
* sysdeps/stub/settimeofday.c: Likewise.
* sysdeps/stub/setuid.c: Likewise.
* sysdeps/stub/shmat.c: Likewise.
* sysdeps/stub/shmctl.c: Likewise.
* sysdeps/stub/shmdt.c: Likewise.
* sysdeps/stub/shmget.c: Likewise.
* sysdeps/stub/shutdown.c: Likewise.
* sysdeps/stub/sigaction.c: Likewise.
* sysdeps/stub/sigaltstack.c: Likewise.
* sysdeps/stub/sigblock.c: Likewise.
* sysdeps/stub/sigintr.c: Likewise.
* sysdeps/stub/signal.c: Likewise.
* sysdeps/stub/sigpause.c: Likewise.
* sysdeps/stub/sigpending.c: Likewise.
* sysdeps/stub/sigprocmask.c: Likewise.
* sysdeps/stub/sigreturn.c: Likewise.
* sysdeps/stub/sigsetmask.c: Likewise.
* sysdeps/stub/sigstack.c: Likewise.
* sysdeps/stub/sigsuspend.c: Likewise.
* sysdeps/stub/sigvec.c: Likewise.
* sysdeps/stub/sleep.c: Likewise.
* sysdeps/stub/socket.c: Likewise.
* sysdeps/stub/socketpair.c: Likewise.
* sysdeps/stub/sstk.c: Likewise.
* sysdeps/stub/statfs.c: Likewise.
* sysdeps/stub/stime.c: Likewise.
* sysdeps/stub/stty.c: Likewise.
* sysdeps/stub/swapoff.c: Likewise.
* sysdeps/stub/swapon.c: Likewise.
* sysdeps/stub/symlink.c: Likewise.
* sysdeps/stub/sync.c: Likewise.
* sysdeps/stub/syscall.c: Likewise.
* sysdeps/stub/sysconf.c: Likewise.
* sysdeps/stub/sysd-stdio.c: Likewise.
* sysdeps/stub/system.c: Likewise.
* sysdeps/stub/tcdrain.c: Likewise.
* sysdeps/stub/tcflow.c: Likewise.
* sysdeps/stub/tcflush.c: Likewise.
* sysdeps/stub/tcgetattr.c: Likewise.
* sysdeps/stub/tcgetpgrp.c: Likewise.
* sysdeps/stub/tcsendbrk.c: Likewise.
* sysdeps/stub/tcsetattr.c: Likewise.
* sysdeps/stub/tcsetpgrp.c: Likewise.
* sysdeps/stub/telldir.c: Likewise.
* sysdeps/stub/tempname.c: Likewise.
* sysdeps/stub/time.c: Likewise.
* sysdeps/stub/times.c: Likewise.
* sysdeps/stub/truncate.c: Likewise.
* sysdeps/stub/ttyname.c: Likewise.
* sysdeps/stub/ttyname_r.c: Likewise.
* sysdeps/stub/ualarm.c: Likewise.
* sysdeps/stub/ulimit.c: Likewise.
* sysdeps/stub/umask.c: Likewise.
* sysdeps/stub/unlink.c: Likewise.
* sysdeps/stub/usleep.c: Likewise.
* sysdeps/stub/ustat.c: Likewise.
* sysdeps/stub/utime.c: Likewise.
* sysdeps/stub/utimes.c: Likewise.
* sysdeps/stub/vhangup.c: Likewise.
* sysdeps/stub/wait.c: Likewise.
* sysdeps/stub/wait3.c: Likewise.
* sysdeps/stub/wait4.c: Likewise.
* sysdeps/stub/waitpid.c: Likewise.
* sysdeps/stub/write.c: Likewise.
* sysdeps/stub/writev.c: Likewise.
* sysdeps/stub/xmknod.c: Likewise.
* sysdeps/stub/xstat.c: Likewise.
* sysdeps/unix/closedir.c: Likewise.
* sysdeps/unix/fxstat.c: Likewise.
* sysdeps/unix/getlogin.c: Likewise.
* sysdeps/unix/getlogin_r.c: Likewise.
* sysdeps/unix/mkdir.c: Likewise.
* sysdeps/unix/nice.c: Likewise.
* sysdeps/unix/nlist.c: Likewise.
* sysdeps/unix/opendir.c: Likewise.
* sysdeps/unix/readdir.c: Likewise.
* sysdeps/unix/rmdir.c: Likewise.
* sysdeps/unix/stime.c: Likewise.
* sysdeps/unix/xmknod.c: Likewise.
* sysdeps/unix/xstat.c: Likewise.
* sysdeps/unix/bsd/isatty.c: Likewise.
* sysdeps/unix/bsd/setegid.c: Likewise.
* sysdeps/unix/bsd/seteuid.c: Likewise.
* sysdeps/unix/bsd/setsid.c: Likewise.
* sysdeps/unix/bsd/sigaction.c: Likewise.
* sysdeps/unix/bsd/sigprocmask.c: Likewise.
* sysdeps/unix/bsd/sigsuspend.c: Likewise.
* sysdeps/unix/bsd/tcflow.c: Likewise.
* sysdeps/unix/bsd/tcflush.c: Likewise.
* sysdeps/unix/bsd/tcgetattr.c: Likewise.
* sysdeps/unix/bsd/tcsetattr.c: Likewise.
* sysdeps/unix/bsd/times.c: Likewise.
* sysdeps/unix/bsd/ulimit.c: Likewise.
* sysdeps/unix/common/lxstat.c: Likewise.
* sysdeps/unix/common/tcsendbrk.c: Likewise.
* sysdeps/unix/sysv/setrlimit.c: Likewise.
* sysdeps/unix/sysv/settimeofday.c: Likewise.
* sysdeps/unix/sysv/sigaction.c: Likewise.
* sysdeps/unix/sysv/tcflow.c: Likewise.
* sysdeps/unix/sysv/tcflush.c: Likewise.
* sysdeps/unix/sysv/tcgetattr.c: Likewise.
* sysdeps/unix/sysv/tcsendbrk.c: Likewise.
* sysdeps/unix/sysv/tcsetattr.c: Likewise.
* sysdeps/unix/bsd/ultrix4/sysconf.c: Likewise.
* sysdeps/unix/sysv/irix4/getpriority.c: Likewise.
* sysdeps/unix/sysv/irix4/setpriority.c: Likewise.
* sysdeps/unix/sysv/linux/adjtime.c: Likewise.
* sysdeps/unix/sysv/linux/gethostid.c: Likewise.
* sysdeps/unix/sysv/linux/gethostname.c: Likewise.
* sysdeps/unix/sysv/linux/getsysstats.c: Likewise.
* sysdeps/unix/sysv/linux/ptrace.c: Likewise.
* sysdeps/unix/sysv/linux/speed.c: Likewise.
* sysdeps/unix/sysv/linux/ulimit.c: Likewise.
* sysdeps/unix/sysv/sysv4/sigaction.c: Likewise.
* sysdeps/unix/sysv/sysv4/sysconf.c: Likewise.
* sysdeps/unix/bsd/sun/m68k/sigtramp.c: Likewise.
* sysdeps/unix/bsd/sun/sparc/sigtramp.c: Likewise.
* sysdeps/unix/bsd/sun/sunos4/speed.c: Likewise.
* sysdeps/unix/bsd/sun/sunos4/tcsetattr.c: Likewise.
* sysdeps/unix/sysv/linux/alpha/ioperm.c: Likewise.
* sysdeps/unix/sysv/linux/i386/brk.c: Likewise.
* sysdeps/unix/sysv/linux/i386/sigaction.c: Likewise.
* sysdeps/unix/sysv/linux/m68k/brk.c: Likewise.
* sunrpc/clnt_tcp.c: Protect declaration of errno by #ifndef.
* sunrpc/clnt_udp.c: Likewise.
* sunrpc/bindrsvprt.c: Likewise.
* sunrpc/pm_getmaps.c: Likewise.
* sunrpc/pmap_rmt.c: Likewise.
* sunrpc/svc.c: Likewise.
* sunrpc/svc_run.c: Likewise.
* sunrpc/svc_tcp.c: Likewise.
* sunrpc/svc_udp.c: Likewise.
* sysdeps/generic/strtok.c: Don't check argument, just crash.
* sysdeps/generic/strtok_r.c: Likewise.
* sysdeps/stub/start.c: Make __errno a strong alias of errno.
* sysdeps/unix/start.c: Likewise. De-ANSI-fy.
* sysdeps/unix/sparc/start.c: Likewise.
* sysdeps/standalone/m68k/m68020/start.S: Likewise.
* sysdeps/unix/sysv/irix4/start.c: Likewise.
* sysdeps/unix/bsd/ultrix4/mips/start.S: Likewise.
* sysdeps/unix/sysv/linux/i386/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/m68k/sysdep.S: Likewise.
Mon Sep 23 17:54:57 1996 Ulrich Drepper <drepper@cygnus.com>
* catgets/gencat.c (main): Put package name in --version message
in parantheses. Reported by Jim Meyering.
* db/makedb.c: Likewise.
* locale/programs/locale.c: Likewise.
* locale/programs/localedef.c: Likewise.
* sysdeps/i386/fpu/__math.h (tan): Make sure gcc knows we use
two registers. Patch by John Bowman.
Sat Sep 21 15:08:25 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/mach/libc-lock.h: Fix comment.
* sysdeps/stubs/libc-lock.h: Likewise.
Sat Sep 21 13:50:40 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* libio/genops.c (_IO_init) [_IO_MTSAFE_IO]: Dereference pointer
to lock when passing it to __libc_lock_init macro.
(_IO_default_finish) [_IO_MTSAFE_IO]: Dereference pointer to lock
when passing it to __libc_lock_fini macro.
Sat Sep 21 14:35:40 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/unix/sysv/linux/m68k/sysdep.h (SYSCALL_ERROR_HANDLER)
[_LIBC_REENTRANT]: Add missing semicolon.
* sysdeps/unix/sysv/linux/m68k/sysdep.S: Move inclusion of
sysdep.h to the top outside of #ifndef PIC. Don't include errnos.h.
Use the ENTRY macro.
Sat Sep 21 14:33:41 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* libio/Makefile: Make `all' the default target.
* po/Makefile: Likewise.
Mon Sep 23 15:49:47 1996 Ulrich Drepper <drepper@cygnus.com>
* stdlib/test-canon.c: Correct patch from Thu Sep 12 23:01:16 1996.
I applied it incorrectly.
* sysdeps/m68k/fpu/s_scalbn.c: Likewise.
* sysdeps/m68k/fpu/s_scalbnf.c: Likewise.
* sysdeps/m68k/fpu/s_scalbnl.c: Likewise.
Mon Sep 23 03:00:10 1996 Ulrich Drepper <drepper@cygnus.com>
* shadow/sgetspent_r.c (LINE_PARSER): Accept empty 9th field.
Patch by NIIBE Yutaka <gniibe@mri.co.jp>.
* shadow/sgetspent_r.c (LINE_PARSER): Don't accept any chars after
9th field.
* sysdeps/unix/sysv/linux/Makefile [$(subdir)==misc]
(sysdep_headers): Add sys/debugreg.h, sys/kd.h, sys/soundcard.h,
and sys/vt.h.
* sysdeps/unix/sysv/linux/sys/debugreg.h: New file.
* sysdeps/unix/sysv/linux/sys/kd.h: New file.
* sysdeps/unix/sysv/linux/sys/soundcard.h: New file.
* sysdeps/unix/sysv/linux/sys/vt.h: New file.
Reported by NIIBE Yutaka <gniibe@mri.co.jp>.
1996-09-27 03:45:24 +00:00
|
|
|
|
__set_errno (EINVAL);
|
1995-02-18 01:27:10 +00:00
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
|
2013-10-20 08:00:31 +00:00
|
|
|
|
/* POSIX requires all slashes to be matched. This means that with
|
|
|
|
|
a trailing slash we must match only directories. */
|
|
|
|
|
if (pattern[0] && pattern[strlen (pattern) - 1] == '/')
|
|
|
|
|
flags |= GLOB_ONLYDIR;
|
|
|
|
|
|
2000-03-20 00:46:01 +00:00
|
|
|
|
if (!(flags & GLOB_DOOFFS))
|
|
|
|
|
/* Have to do this so `globfree' knows where to start freeing. It
|
|
|
|
|
also makes all the code that uses gl_offs simpler. */
|
|
|
|
|
pglob->gl_offs = 0;
|
|
|
|
|
|
Fri Dec 8 13:04:51 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* locale/error.c, locale/error.h: Files removed.
* locale/Makefile (distribute): Remove error.h.
(lib-modules): Remove error.
* hurd/hurdlookup.c (__hurd_file_name_lookup_retry): For "tty"
magic, return ENXIO if no ctty.
* sysdeps/mach/hurd/mmap.c: For MAP_FIXED, deallocate a previous
mapping if vm_map fails for that reason.
* posix/glob.c: Implement new options GLOB_ALTDIRFUNC, GLOB_BRACE,
GLOB_TILDE, GLOB_NOMAGIC.
(glob): Use stat instead of lstat to determine directoriness.
* posix/glob.h (GLOB_ALTDIRFUNC, GLOB_BRACE, GLOB_NOMAGIC, GLOB_TILDE):
New flag bits.
(__GLOB_FLAGS): Include them.
(glob_t): New members gl_closedir, gl_readdir, gl_opendir, gl_lstat,
gl_stat.
* elf/elf.h (ET_NUM, SHT_NUM, STB_NUM, STT_NUM, PT_NUM): New macros.
* sysdeps/unix/sysv/linux/sys/mman.h: Include <linux/mman.h> to
define all the bit values.
(MAP_*, MCL_*): Macros removed.
1995-12-09 10:00:22 +00:00
|
|
|
|
if (flags & GLOB_BRACE)
|
|
|
|
|
{
|
2003-10-26 20:47:33 +00:00
|
|
|
|
const char *begin;
|
|
|
|
|
|
|
|
|
|
if (flags & GLOB_NOESCAPE)
|
|
|
|
|
begin = strchr (pattern, '{');
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
begin = pattern;
|
|
|
|
|
while (1)
|
|
|
|
|
{
|
|
|
|
|
if (*begin == '\0')
|
|
|
|
|
{
|
|
|
|
|
begin = NULL;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (*begin == '\\' && begin[1] != '\0')
|
|
|
|
|
++begin;
|
|
|
|
|
else if (*begin == '{')
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
++begin;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
Fri Dec 8 13:04:51 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* locale/error.c, locale/error.h: Files removed.
* locale/Makefile (distribute): Remove error.h.
(lib-modules): Remove error.
* hurd/hurdlookup.c (__hurd_file_name_lookup_retry): For "tty"
magic, return ENXIO if no ctty.
* sysdeps/mach/hurd/mmap.c: For MAP_FIXED, deallocate a previous
mapping if vm_map fails for that reason.
* posix/glob.c: Implement new options GLOB_ALTDIRFUNC, GLOB_BRACE,
GLOB_TILDE, GLOB_NOMAGIC.
(glob): Use stat instead of lstat to determine directoriness.
* posix/glob.h (GLOB_ALTDIRFUNC, GLOB_BRACE, GLOB_NOMAGIC, GLOB_TILDE):
New flag bits.
(__GLOB_FLAGS): Include them.
(glob_t): New members gl_closedir, gl_readdir, gl_opendir, gl_lstat,
gl_stat.
* elf/elf.h (ET_NUM, SHT_NUM, STB_NUM, STT_NUM, PT_NUM): New macros.
* sysdeps/unix/sysv/linux/sys/mman.h: Include <linux/mman.h> to
define all the bit values.
(MAP_*, MCL_*): Macros removed.
1995-12-09 10:00:22 +00:00
|
|
|
|
if (begin != NULL)
|
|
|
|
|
{
|
1997-03-21 20:00:48 +00:00
|
|
|
|
/* Allocate working buffer large enough for our work. Note that
|
|
|
|
|
we have at least an opening and closing brace. */
|
2000-12-02 08:18:55 +00:00
|
|
|
|
size_t firstc;
|
1997-03-21 20:00:48 +00:00
|
|
|
|
char *alt_start;
|
|
|
|
|
const char *p;
|
|
|
|
|
const char *next;
|
|
|
|
|
const char *rest;
|
|
|
|
|
size_t rest_len;
|
2011-05-23 03:04:16 +00:00
|
|
|
|
char *onealt;
|
|
|
|
|
size_t pattern_len = strlen (pattern) - 1;
|
|
|
|
|
#ifdef _LIBC
|
|
|
|
|
int alloca_onealt = __libc_use_alloca (alloca_used + pattern_len);
|
|
|
|
|
if (alloca_onealt)
|
|
|
|
|
onealt = alloca_account (pattern_len, alloca_used);
|
|
|
|
|
else
|
|
|
|
|
#endif
|
1997-03-21 20:00:48 +00:00
|
|
|
|
{
|
2011-05-23 03:04:16 +00:00
|
|
|
|
onealt = (char *) malloc (pattern_len);
|
|
|
|
|
if (onealt == NULL)
|
2002-02-10 23:36:05 +00:00
|
|
|
|
{
|
2011-05-23 03:04:16 +00:00
|
|
|
|
if (!(flags & GLOB_APPEND))
|
|
|
|
|
{
|
|
|
|
|
pglob->gl_pathc = 0;
|
|
|
|
|
pglob->gl_pathv = NULL;
|
|
|
|
|
}
|
|
|
|
|
return GLOB_NOSPACE;
|
2002-02-10 23:36:05 +00:00
|
|
|
|
}
|
1997-03-21 20:00:48 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* We know the prefix for all sub-patterns. */
|
1997-11-06 00:02:46 +00:00
|
|
|
|
alt_start = mempcpy (onealt, pattern, begin - pattern);
|
1997-03-21 20:00:48 +00:00
|
|
|
|
|
|
|
|
|
/* Find the first sub-pattern and at the same time find the
|
|
|
|
|
rest after the closing brace. */
|
2003-10-26 20:47:33 +00:00
|
|
|
|
next = next_brace_sub (begin + 1, flags);
|
1997-03-21 20:00:48 +00:00
|
|
|
|
if (next == NULL)
|
Fri Dec 8 13:04:51 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* locale/error.c, locale/error.h: Files removed.
* locale/Makefile (distribute): Remove error.h.
(lib-modules): Remove error.
* hurd/hurdlookup.c (__hurd_file_name_lookup_retry): For "tty"
magic, return ENXIO if no ctty.
* sysdeps/mach/hurd/mmap.c: For MAP_FIXED, deallocate a previous
mapping if vm_map fails for that reason.
* posix/glob.c: Implement new options GLOB_ALTDIRFUNC, GLOB_BRACE,
GLOB_TILDE, GLOB_NOMAGIC.
(glob): Use stat instead of lstat to determine directoriness.
* posix/glob.h (GLOB_ALTDIRFUNC, GLOB_BRACE, GLOB_NOMAGIC, GLOB_TILDE):
New flag bits.
(__GLOB_FLAGS): Include them.
(glob_t): New members gl_closedir, gl_readdir, gl_opendir, gl_lstat,
gl_stat.
* elf/elf.h (ET_NUM, SHT_NUM, STB_NUM, STT_NUM, PT_NUM): New macros.
* sysdeps/unix/sysv/linux/sys/mman.h: Include <linux/mman.h> to
define all the bit values.
(MAP_*, MCL_*): Macros removed.
1995-12-09 10:00:22 +00:00
|
|
|
|
{
|
1997-03-21 20:00:48 +00:00
|
|
|
|
/* It is an illegal expression. */
|
2011-05-23 03:04:16 +00:00
|
|
|
|
illegal_brace:
|
|
|
|
|
#ifdef _LIBC
|
2014-02-10 13:45:42 +00:00
|
|
|
|
if (__glibc_unlikely (!alloca_onealt))
|
1997-03-21 20:00:48 +00:00
|
|
|
|
#endif
|
2011-05-23 03:04:16 +00:00
|
|
|
|
free (onealt);
|
1997-03-21 20:00:48 +00:00
|
|
|
|
return glob (pattern, flags & ~GLOB_BRACE, errfunc, pglob);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Now find the end of the whole brace expression. */
|
|
|
|
|
rest = next;
|
|
|
|
|
while (*rest != '}')
|
|
|
|
|
{
|
2003-10-26 20:47:33 +00:00
|
|
|
|
rest = next_brace_sub (rest + 1, flags);
|
1997-03-21 20:00:48 +00:00
|
|
|
|
if (rest == NULL)
|
2011-05-23 03:04:16 +00:00
|
|
|
|
/* It is an illegal expression. */
|
|
|
|
|
goto illegal_brace;
|
Sat Mar 16 20:08:22 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/alpha/memchr.S: new file.
* sysdeps/alpha/memchr.c: obsolete file removed.
Sat Mar 16 16:26:09 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* misc/Makefile (headers): Add sysexits.h.
* misc/sysexits.h: New file.
Thu Mar 14 15:20:45 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/libm-ieee754/e_atan2.c (__ieee754_atan2): Change atan
call to __atan.
* sysdeps/libm-ieee754/e_atan2f.c (__ieee754_atan2f): Change atanf
call to __atanf.
* sysdeps/m68k/fpu/e_acos.c, sysdeps/m68k/fpu/e_acosf.c,
sysdeps/m68k/fpu/e_asin.c, sysdeps/m68k/fpu/e_asinf.c,
sysdeps/m68k/fpu/e_atanh.c, sysdeps/m68k/fpu/e_atanhf.c,
sysdeps/m68k/fpu/e_cosh.c, sysdeps/m68k/fpu/e_coshf.c,
sysdeps/m68k/fpu/e_exp.c, sysdeps/m68k/fpu/e_expf.c,
sysdeps/m68k/fpu/e_fmod.c, sysdeps/m68k/fpu/e_fmodf.c,
sysdeps/m68k/fpu/e_log.c, sysdeps/m68k/fpu/e_log10.c,
sysdeps/m68k/fpu/e_log10f.c, sysdeps/m68k/fpu/e_logf.c,
sysdeps/m68k/fpu/e_pow.c, sysdeps/m68k/fpu/e_powf.c,
sysdeps/m68k/fpu/e_remainder.c, sysdeps/m68k/fpu/e_remainderf.c,
sysdeps/m68k/fpu/e_scalb.c, sysdeps/m68k/fpu/e_scalbf.c,
sysdeps/m68k/fpu/e_sinh.c, sysdeps/m68k/fpu/e_sinhf.c,
sysdeps/m68k/fpu/e_sqrt.c, sysdeps/m68k/fpu/e_sqrtf.c,
sysdeps/m68k/fpu/k_cos.c, sysdeps/m68k/fpu/k_cosf.c,
sysdeps/m68k/fpu/k_sin.c, sysdeps/m68k/fpu/k_sinf.c,
sysdeps/m68k/fpu/k_tan.c, sysdeps/m68k/fpu/k_tanf.c,
sysdeps/m68k/fpu/s_atan.c, sysdeps/m68k/fpu/s_atanf.c,
sysdeps/m68k/fpu/s_ceil.c, sysdeps/m68k/fpu/s_ceilf.c,
sysdeps/m68k/fpu/s_cos.c, sysdeps/m68k/fpu/s_cosf.c,
sysdeps/m68k/fpu/s_expm1.c, sysdeps/m68k/fpu/s_expm1f.c,
sysdeps/m68k/fpu/s_fabs.c, sysdeps/m68k/fpu/s_fabsf.c,
sysdeps/m68k/fpu/s_finite.c, sysdeps/m68k/fpu/s_finitef.c,
sysdeps/m68k/fpu/s_floor.c, sysdeps/m68k/fpu/s_floorf.c,
sysdeps/m68k/fpu/s_frexp.c, sysdeps/m68k/fpu/s_frexpf.c,
sysdeps/m68k/fpu/s_ilogb.c, sysdeps/m68k/fpu/s_ilogbf.c,
sysdeps/m68k/fpu/s_isinf.c, sysdeps/m68k/fpu/s_isinff.c,
sysdeps/m68k/fpu/s_isnan.c, sysdeps/m68k/fpu/s_isnanf.c,
sysdeps/m68k/fpu/s_ldexp.c, sysdeps/m68k/fpu/s_ldexpf.c,
sysdeps/m68k/fpu/s_log1p.c, sysdeps/m68k/fpu/s_log1pf.c,
sysdeps/m68k/fpu/s_logb.c, sysdeps/m68k/fpu/s_logbf.c,
sysdeps/m68k/fpu/s_modf.c, sysdeps/m68k/fpu/s_modff.c,
sysdeps/m68k/fpu/s_rint.c, sysdeps/m68k/fpu/s_rintf.c,
sysdeps/m68k/fpu/s_scalbn.c, sysdeps/m68k/fpu/s_scalbnf.c,
sysdeps/m68k/fpu/s_significand.c,
sysdeps/m68k/fpu/s_significandf.c, sysdeps/m68k/fpu/s_sin.c,
sysdeps/m68k/fpu/s_sinf.c, sysdeps/m68k/fpu/s_tan.c,
sysdeps/m68k/fpu/s_tanf.c, sysdeps/m68k/fpu/s_tanh.c,
sysdeps/m68k/fpu/s_tanhf.c: New files, for m68881 port of fdlibm.
* sysdeps/m68k/fpu/__math.h: Rewritten for fdlibm.
* sysdeps/m68k/fpu/isinfl.c: Rewritten to get argument type right.
* sysdeps/m68k/fpu/isnanl.c: Likewise.
Thu Mar 14 06:01:07 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* posix/glob.c (glob): In GLOB_BRACE brace expansion, fix buffer size
calculation to include trailing invariant portion. Don't use alloca;
instead use a dynamic auto array for GCC, malloc for non-GCC.
Handle nested braces properly.
* elf/elf.h (Elf32_auxv_t): Specify prototype (void) for `a_un.a_fcn'.
* libc-symbols.h (lint): New macro.
Fri Mar 15 01:18:00 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* libio/iosetvbuf.c: Add weak alias setvbuf.
1996-03-17 01:58:17 +00:00
|
|
|
|
}
|
1997-03-21 20:00:48 +00:00
|
|
|
|
/* Please note that we now can be sure the brace expression
|
|
|
|
|
is well-formed. */
|
|
|
|
|
rest_len = strlen (++rest) + 1;
|
Sat Mar 16 20:08:22 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/alpha/memchr.S: new file.
* sysdeps/alpha/memchr.c: obsolete file removed.
Sat Mar 16 16:26:09 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* misc/Makefile (headers): Add sysexits.h.
* misc/sysexits.h: New file.
Thu Mar 14 15:20:45 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/libm-ieee754/e_atan2.c (__ieee754_atan2): Change atan
call to __atan.
* sysdeps/libm-ieee754/e_atan2f.c (__ieee754_atan2f): Change atanf
call to __atanf.
* sysdeps/m68k/fpu/e_acos.c, sysdeps/m68k/fpu/e_acosf.c,
sysdeps/m68k/fpu/e_asin.c, sysdeps/m68k/fpu/e_asinf.c,
sysdeps/m68k/fpu/e_atanh.c, sysdeps/m68k/fpu/e_atanhf.c,
sysdeps/m68k/fpu/e_cosh.c, sysdeps/m68k/fpu/e_coshf.c,
sysdeps/m68k/fpu/e_exp.c, sysdeps/m68k/fpu/e_expf.c,
sysdeps/m68k/fpu/e_fmod.c, sysdeps/m68k/fpu/e_fmodf.c,
sysdeps/m68k/fpu/e_log.c, sysdeps/m68k/fpu/e_log10.c,
sysdeps/m68k/fpu/e_log10f.c, sysdeps/m68k/fpu/e_logf.c,
sysdeps/m68k/fpu/e_pow.c, sysdeps/m68k/fpu/e_powf.c,
sysdeps/m68k/fpu/e_remainder.c, sysdeps/m68k/fpu/e_remainderf.c,
sysdeps/m68k/fpu/e_scalb.c, sysdeps/m68k/fpu/e_scalbf.c,
sysdeps/m68k/fpu/e_sinh.c, sysdeps/m68k/fpu/e_sinhf.c,
sysdeps/m68k/fpu/e_sqrt.c, sysdeps/m68k/fpu/e_sqrtf.c,
sysdeps/m68k/fpu/k_cos.c, sysdeps/m68k/fpu/k_cosf.c,
sysdeps/m68k/fpu/k_sin.c, sysdeps/m68k/fpu/k_sinf.c,
sysdeps/m68k/fpu/k_tan.c, sysdeps/m68k/fpu/k_tanf.c,
sysdeps/m68k/fpu/s_atan.c, sysdeps/m68k/fpu/s_atanf.c,
sysdeps/m68k/fpu/s_ceil.c, sysdeps/m68k/fpu/s_ceilf.c,
sysdeps/m68k/fpu/s_cos.c, sysdeps/m68k/fpu/s_cosf.c,
sysdeps/m68k/fpu/s_expm1.c, sysdeps/m68k/fpu/s_expm1f.c,
sysdeps/m68k/fpu/s_fabs.c, sysdeps/m68k/fpu/s_fabsf.c,
sysdeps/m68k/fpu/s_finite.c, sysdeps/m68k/fpu/s_finitef.c,
sysdeps/m68k/fpu/s_floor.c, sysdeps/m68k/fpu/s_floorf.c,
sysdeps/m68k/fpu/s_frexp.c, sysdeps/m68k/fpu/s_frexpf.c,
sysdeps/m68k/fpu/s_ilogb.c, sysdeps/m68k/fpu/s_ilogbf.c,
sysdeps/m68k/fpu/s_isinf.c, sysdeps/m68k/fpu/s_isinff.c,
sysdeps/m68k/fpu/s_isnan.c, sysdeps/m68k/fpu/s_isnanf.c,
sysdeps/m68k/fpu/s_ldexp.c, sysdeps/m68k/fpu/s_ldexpf.c,
sysdeps/m68k/fpu/s_log1p.c, sysdeps/m68k/fpu/s_log1pf.c,
sysdeps/m68k/fpu/s_logb.c, sysdeps/m68k/fpu/s_logbf.c,
sysdeps/m68k/fpu/s_modf.c, sysdeps/m68k/fpu/s_modff.c,
sysdeps/m68k/fpu/s_rint.c, sysdeps/m68k/fpu/s_rintf.c,
sysdeps/m68k/fpu/s_scalbn.c, sysdeps/m68k/fpu/s_scalbnf.c,
sysdeps/m68k/fpu/s_significand.c,
sysdeps/m68k/fpu/s_significandf.c, sysdeps/m68k/fpu/s_sin.c,
sysdeps/m68k/fpu/s_sinf.c, sysdeps/m68k/fpu/s_tan.c,
sysdeps/m68k/fpu/s_tanf.c, sysdeps/m68k/fpu/s_tanh.c,
sysdeps/m68k/fpu/s_tanhf.c: New files, for m68881 port of fdlibm.
* sysdeps/m68k/fpu/__math.h: Rewritten for fdlibm.
* sysdeps/m68k/fpu/isinfl.c: Rewritten to get argument type right.
* sysdeps/m68k/fpu/isnanl.c: Likewise.
Thu Mar 14 06:01:07 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* posix/glob.c (glob): In GLOB_BRACE brace expansion, fix buffer size
calculation to include trailing invariant portion. Don't use alloca;
instead use a dynamic auto array for GCC, malloc for non-GCC.
Handle nested braces properly.
* elf/elf.h (Elf32_auxv_t): Specify prototype (void) for `a_un.a_fcn'.
* libc-symbols.h (lint): New macro.
Fri Mar 15 01:18:00 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* libio/iosetvbuf.c: Add weak alias setvbuf.
1996-03-17 01:58:17 +00:00
|
|
|
|
|
|
|
|
|
/* We have a brace expression. BEGIN points to the opening {,
|
|
|
|
|
NEXT points past the terminator of the first element, and END
|
|
|
|
|
points past the final }. We will accumulate result names from
|
|
|
|
|
recursive runs for each brace alternative in the buffer using
|
|
|
|
|
GLOB_APPEND. */
|
|
|
|
|
|
|
|
|
|
if (!(flags & GLOB_APPEND))
|
|
|
|
|
{
|
|
|
|
|
/* This call is to set a new vector, so clear out the
|
|
|
|
|
vector so we can append to it. */
|
|
|
|
|
pglob->gl_pathc = 0;
|
|
|
|
|
pglob->gl_pathv = NULL;
|
|
|
|
|
}
|
|
|
|
|
firstc = pglob->gl_pathc;
|
|
|
|
|
|
|
|
|
|
p = begin + 1;
|
|
|
|
|
while (1)
|
|
|
|
|
{
|
|
|
|
|
int result;
|
1997-03-21 20:00:48 +00:00
|
|
|
|
|
|
|
|
|
/* Construct the new glob expression. */
|
Update.
1997-10-29 21:20 Ulrich Drepper <drepper@cygnus.com>
* libio/strops.c (_IO_str_seekoff): If mode is zero and the read/write
pointers are tied set mode according to current stream mode.
* include/features.h [_GNU_SOURCE] (_POSIX_C_SOURCE): Define to
199506L.
Define _XOPEN_SOURCE to 500 if _POSIX_C_SOURCE is defined.
* manual/creature.texi: Describe this.
* manual/socket.texi: Describe connect, accept, send, sendmsg, sendto,
recv, recvfrom, and recvmsg as cancelation points.
* sysdeps/unix/inet/syscalls.list: Add __libc_* names for these
functions.
1997-10-17 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* Make-dist (try-sysdeps): Don't look for stub files anymore.
* manual/maint.texi (Porting): Remove another reference to stub
directory.
* sysdeps/unix/bsd/sun/sethostid.c: Include stub version from
generic subdir.
* sysdeps/unix/sysv/irix4/reboot.c: Likewise.
* sysdeps/unix/sysv/irix4/swapon.c: Likewise
1997-10-29 03:54 Ulrich Drepper <drepper@cygnus.com>
* resolv/nss_dns/dns-host.c: Change variable pointed to by h_errnop
in all error cases (PR 244).
1997-10-29 00:56 Ulrich Drepper <drepper@cygnus.com>
* posix/glob.c: Fix handling of expressions like "*/" (PR 325).
Optimize by using mempcpy.
1997-10-17 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* po/Makefile ($(mo-installed)): Don't fail during installation if
files don't exist (might happen if msgfmt doesn't exist) (PR 328).
Suggested by Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>.
1997-10-24 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* sysdeps/generic/bits/errno.h (ENOMSG): Define it.
Pointed out by Klaus Espenlaub
<kespenla@hydra.informatik.uni-ulm.de> (PR libc/259).
1997-10-28 17:40 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/libm-ieee754/s_cbrt.c: Testing the returned exponent for
zero isn't enough to determine illegal arguments.
* sysdeps/libm-ieee754/s_cbrtf.c: Likewise.
* sysdeps/libm-ieee754/s_cbrtl.c: Likewise.
1997-10-28 17:14 Ulrich Drepper <drepper@cygnus.com>
* manual/filesys.texi (S_ISVTX): Describe that it is available with
_BSD_SOURCE only.
Reported by Jochen Hein <jochen.hein@delphi.central.de>.
1997-10-28 04:26 Ulrich Drepper <drepper@cygnus.com>
* time/tzfile.c (__tzfile_compute): Use negated value of offset for
timezone variable.
* time/tzset.c (tz_compute): Likewise.
Reported by Erik Troan <ewt@redhat.com>.
1997-10-28 02:51 Ulrich Drepper <drepper@cygnus.com>
* manual/filesys.texi: Correct prototype in readdir_r description.
Reported by Jim Meyering <meyering@eng.ascend.com>.
1997-10-27 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* math/libm-test.c (cbrt_test): Add test for cbrt(0.970299).
1997-10-26 19:39 Zack Weinberg <zack@rabi.phys.columbia.edu>
* stdlib/l64a.c: Produce a useful result for n < 0.
* stdlib/a64l.c: Use unsigned type for working variable.
* manual/string.texi (general): Grammar, typo, overfull fixes.
(strlen): Insert warning about sizeof(char *).
(a64l, l64a): Make documentation agree with implementation.
* libio/iofdopen.c: Use _IO_FILE_complete, not _IO_FILE_plus.
* posix/unistd.h: Add prototypes for __pread, __pread64, __pwrite
1997-10-29 20:33:40 +00:00
|
|
|
|
mempcpy (mempcpy (alt_start, p, next - p), rest, rest_len);
|
1997-03-21 20:00:48 +00:00
|
|
|
|
|
Sat Mar 16 20:08:22 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/alpha/memchr.S: new file.
* sysdeps/alpha/memchr.c: obsolete file removed.
Sat Mar 16 16:26:09 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* misc/Makefile (headers): Add sysexits.h.
* misc/sysexits.h: New file.
Thu Mar 14 15:20:45 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/libm-ieee754/e_atan2.c (__ieee754_atan2): Change atan
call to __atan.
* sysdeps/libm-ieee754/e_atan2f.c (__ieee754_atan2f): Change atanf
call to __atanf.
* sysdeps/m68k/fpu/e_acos.c, sysdeps/m68k/fpu/e_acosf.c,
sysdeps/m68k/fpu/e_asin.c, sysdeps/m68k/fpu/e_asinf.c,
sysdeps/m68k/fpu/e_atanh.c, sysdeps/m68k/fpu/e_atanhf.c,
sysdeps/m68k/fpu/e_cosh.c, sysdeps/m68k/fpu/e_coshf.c,
sysdeps/m68k/fpu/e_exp.c, sysdeps/m68k/fpu/e_expf.c,
sysdeps/m68k/fpu/e_fmod.c, sysdeps/m68k/fpu/e_fmodf.c,
sysdeps/m68k/fpu/e_log.c, sysdeps/m68k/fpu/e_log10.c,
sysdeps/m68k/fpu/e_log10f.c, sysdeps/m68k/fpu/e_logf.c,
sysdeps/m68k/fpu/e_pow.c, sysdeps/m68k/fpu/e_powf.c,
sysdeps/m68k/fpu/e_remainder.c, sysdeps/m68k/fpu/e_remainderf.c,
sysdeps/m68k/fpu/e_scalb.c, sysdeps/m68k/fpu/e_scalbf.c,
sysdeps/m68k/fpu/e_sinh.c, sysdeps/m68k/fpu/e_sinhf.c,
sysdeps/m68k/fpu/e_sqrt.c, sysdeps/m68k/fpu/e_sqrtf.c,
sysdeps/m68k/fpu/k_cos.c, sysdeps/m68k/fpu/k_cosf.c,
sysdeps/m68k/fpu/k_sin.c, sysdeps/m68k/fpu/k_sinf.c,
sysdeps/m68k/fpu/k_tan.c, sysdeps/m68k/fpu/k_tanf.c,
sysdeps/m68k/fpu/s_atan.c, sysdeps/m68k/fpu/s_atanf.c,
sysdeps/m68k/fpu/s_ceil.c, sysdeps/m68k/fpu/s_ceilf.c,
sysdeps/m68k/fpu/s_cos.c, sysdeps/m68k/fpu/s_cosf.c,
sysdeps/m68k/fpu/s_expm1.c, sysdeps/m68k/fpu/s_expm1f.c,
sysdeps/m68k/fpu/s_fabs.c, sysdeps/m68k/fpu/s_fabsf.c,
sysdeps/m68k/fpu/s_finite.c, sysdeps/m68k/fpu/s_finitef.c,
sysdeps/m68k/fpu/s_floor.c, sysdeps/m68k/fpu/s_floorf.c,
sysdeps/m68k/fpu/s_frexp.c, sysdeps/m68k/fpu/s_frexpf.c,
sysdeps/m68k/fpu/s_ilogb.c, sysdeps/m68k/fpu/s_ilogbf.c,
sysdeps/m68k/fpu/s_isinf.c, sysdeps/m68k/fpu/s_isinff.c,
sysdeps/m68k/fpu/s_isnan.c, sysdeps/m68k/fpu/s_isnanf.c,
sysdeps/m68k/fpu/s_ldexp.c, sysdeps/m68k/fpu/s_ldexpf.c,
sysdeps/m68k/fpu/s_log1p.c, sysdeps/m68k/fpu/s_log1pf.c,
sysdeps/m68k/fpu/s_logb.c, sysdeps/m68k/fpu/s_logbf.c,
sysdeps/m68k/fpu/s_modf.c, sysdeps/m68k/fpu/s_modff.c,
sysdeps/m68k/fpu/s_rint.c, sysdeps/m68k/fpu/s_rintf.c,
sysdeps/m68k/fpu/s_scalbn.c, sysdeps/m68k/fpu/s_scalbnf.c,
sysdeps/m68k/fpu/s_significand.c,
sysdeps/m68k/fpu/s_significandf.c, sysdeps/m68k/fpu/s_sin.c,
sysdeps/m68k/fpu/s_sinf.c, sysdeps/m68k/fpu/s_tan.c,
sysdeps/m68k/fpu/s_tanf.c, sysdeps/m68k/fpu/s_tanh.c,
sysdeps/m68k/fpu/s_tanhf.c: New files, for m68881 port of fdlibm.
* sysdeps/m68k/fpu/__math.h: Rewritten for fdlibm.
* sysdeps/m68k/fpu/isinfl.c: Rewritten to get argument type right.
* sysdeps/m68k/fpu/isnanl.c: Likewise.
Thu Mar 14 06:01:07 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* posix/glob.c (glob): In GLOB_BRACE brace expansion, fix buffer size
calculation to include trailing invariant portion. Don't use alloca;
instead use a dynamic auto array for GCC, malloc for non-GCC.
Handle nested braces properly.
* elf/elf.h (Elf32_auxv_t): Specify prototype (void) for `a_un.a_fcn'.
* libc-symbols.h (lint): New macro.
Fri Mar 15 01:18:00 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* libio/iosetvbuf.c: Add weak alias setvbuf.
1996-03-17 01:58:17 +00:00
|
|
|
|
result = glob (onealt,
|
2002-04-29 04:32:06 +00:00
|
|
|
|
((flags & ~(GLOB_NOCHECK | GLOB_NOMAGIC))
|
1997-03-21 20:00:48 +00:00
|
|
|
|
| GLOB_APPEND), errfunc, pglob);
|
Sat Mar 16 20:08:22 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/alpha/memchr.S: new file.
* sysdeps/alpha/memchr.c: obsolete file removed.
Sat Mar 16 16:26:09 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* misc/Makefile (headers): Add sysexits.h.
* misc/sysexits.h: New file.
Thu Mar 14 15:20:45 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/libm-ieee754/e_atan2.c (__ieee754_atan2): Change atan
call to __atan.
* sysdeps/libm-ieee754/e_atan2f.c (__ieee754_atan2f): Change atanf
call to __atanf.
* sysdeps/m68k/fpu/e_acos.c, sysdeps/m68k/fpu/e_acosf.c,
sysdeps/m68k/fpu/e_asin.c, sysdeps/m68k/fpu/e_asinf.c,
sysdeps/m68k/fpu/e_atanh.c, sysdeps/m68k/fpu/e_atanhf.c,
sysdeps/m68k/fpu/e_cosh.c, sysdeps/m68k/fpu/e_coshf.c,
sysdeps/m68k/fpu/e_exp.c, sysdeps/m68k/fpu/e_expf.c,
sysdeps/m68k/fpu/e_fmod.c, sysdeps/m68k/fpu/e_fmodf.c,
sysdeps/m68k/fpu/e_log.c, sysdeps/m68k/fpu/e_log10.c,
sysdeps/m68k/fpu/e_log10f.c, sysdeps/m68k/fpu/e_logf.c,
sysdeps/m68k/fpu/e_pow.c, sysdeps/m68k/fpu/e_powf.c,
sysdeps/m68k/fpu/e_remainder.c, sysdeps/m68k/fpu/e_remainderf.c,
sysdeps/m68k/fpu/e_scalb.c, sysdeps/m68k/fpu/e_scalbf.c,
sysdeps/m68k/fpu/e_sinh.c, sysdeps/m68k/fpu/e_sinhf.c,
sysdeps/m68k/fpu/e_sqrt.c, sysdeps/m68k/fpu/e_sqrtf.c,
sysdeps/m68k/fpu/k_cos.c, sysdeps/m68k/fpu/k_cosf.c,
sysdeps/m68k/fpu/k_sin.c, sysdeps/m68k/fpu/k_sinf.c,
sysdeps/m68k/fpu/k_tan.c, sysdeps/m68k/fpu/k_tanf.c,
sysdeps/m68k/fpu/s_atan.c, sysdeps/m68k/fpu/s_atanf.c,
sysdeps/m68k/fpu/s_ceil.c, sysdeps/m68k/fpu/s_ceilf.c,
sysdeps/m68k/fpu/s_cos.c, sysdeps/m68k/fpu/s_cosf.c,
sysdeps/m68k/fpu/s_expm1.c, sysdeps/m68k/fpu/s_expm1f.c,
sysdeps/m68k/fpu/s_fabs.c, sysdeps/m68k/fpu/s_fabsf.c,
sysdeps/m68k/fpu/s_finite.c, sysdeps/m68k/fpu/s_finitef.c,
sysdeps/m68k/fpu/s_floor.c, sysdeps/m68k/fpu/s_floorf.c,
sysdeps/m68k/fpu/s_frexp.c, sysdeps/m68k/fpu/s_frexpf.c,
sysdeps/m68k/fpu/s_ilogb.c, sysdeps/m68k/fpu/s_ilogbf.c,
sysdeps/m68k/fpu/s_isinf.c, sysdeps/m68k/fpu/s_isinff.c,
sysdeps/m68k/fpu/s_isnan.c, sysdeps/m68k/fpu/s_isnanf.c,
sysdeps/m68k/fpu/s_ldexp.c, sysdeps/m68k/fpu/s_ldexpf.c,
sysdeps/m68k/fpu/s_log1p.c, sysdeps/m68k/fpu/s_log1pf.c,
sysdeps/m68k/fpu/s_logb.c, sysdeps/m68k/fpu/s_logbf.c,
sysdeps/m68k/fpu/s_modf.c, sysdeps/m68k/fpu/s_modff.c,
sysdeps/m68k/fpu/s_rint.c, sysdeps/m68k/fpu/s_rintf.c,
sysdeps/m68k/fpu/s_scalbn.c, sysdeps/m68k/fpu/s_scalbnf.c,
sysdeps/m68k/fpu/s_significand.c,
sysdeps/m68k/fpu/s_significandf.c, sysdeps/m68k/fpu/s_sin.c,
sysdeps/m68k/fpu/s_sinf.c, sysdeps/m68k/fpu/s_tan.c,
sysdeps/m68k/fpu/s_tanf.c, sysdeps/m68k/fpu/s_tanh.c,
sysdeps/m68k/fpu/s_tanhf.c: New files, for m68881 port of fdlibm.
* sysdeps/m68k/fpu/__math.h: Rewritten for fdlibm.
* sysdeps/m68k/fpu/isinfl.c: Rewritten to get argument type right.
* sysdeps/m68k/fpu/isnanl.c: Likewise.
Thu Mar 14 06:01:07 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* posix/glob.c (glob): In GLOB_BRACE brace expansion, fix buffer size
calculation to include trailing invariant portion. Don't use alloca;
instead use a dynamic auto array for GCC, malloc for non-GCC.
Handle nested braces properly.
* elf/elf.h (Elf32_auxv_t): Specify prototype (void) for `a_un.a_fcn'.
* libc-symbols.h (lint): New macro.
Fri Mar 15 01:18:00 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* libio/iosetvbuf.c: Add weak alias setvbuf.
1996-03-17 01:58:17 +00:00
|
|
|
|
|
|
|
|
|
/* If we got an error, return it. */
|
|
|
|
|
if (result && result != GLOB_NOMATCH)
|
Fri Dec 8 13:04:51 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* locale/error.c, locale/error.h: Files removed.
* locale/Makefile (distribute): Remove error.h.
(lib-modules): Remove error.
* hurd/hurdlookup.c (__hurd_file_name_lookup_retry): For "tty"
magic, return ENXIO if no ctty.
* sysdeps/mach/hurd/mmap.c: For MAP_FIXED, deallocate a previous
mapping if vm_map fails for that reason.
* posix/glob.c: Implement new options GLOB_ALTDIRFUNC, GLOB_BRACE,
GLOB_TILDE, GLOB_NOMAGIC.
(glob): Use stat instead of lstat to determine directoriness.
* posix/glob.h (GLOB_ALTDIRFUNC, GLOB_BRACE, GLOB_NOMAGIC, GLOB_TILDE):
New flag bits.
(__GLOB_FLAGS): Include them.
(glob_t): New members gl_closedir, gl_readdir, gl_opendir, gl_lstat,
gl_stat.
* elf/elf.h (ET_NUM, SHT_NUM, STB_NUM, STT_NUM, PT_NUM): New macros.
* sysdeps/unix/sysv/linux/sys/mman.h: Include <linux/mman.h> to
define all the bit values.
(MAP_*, MCL_*): Macros removed.
1995-12-09 10:00:22 +00:00
|
|
|
|
{
|
2011-05-23 03:04:16 +00:00
|
|
|
|
#ifdef _LIBC
|
2014-02-10 13:45:42 +00:00
|
|
|
|
if (__glibc_unlikely (!alloca_onealt))
|
1997-03-21 20:00:48 +00:00
|
|
|
|
#endif
|
2011-05-23 03:04:16 +00:00
|
|
|
|
free (onealt);
|
Sat Mar 16 20:08:22 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/alpha/memchr.S: new file.
* sysdeps/alpha/memchr.c: obsolete file removed.
Sat Mar 16 16:26:09 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* misc/Makefile (headers): Add sysexits.h.
* misc/sysexits.h: New file.
Thu Mar 14 15:20:45 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/libm-ieee754/e_atan2.c (__ieee754_atan2): Change atan
call to __atan.
* sysdeps/libm-ieee754/e_atan2f.c (__ieee754_atan2f): Change atanf
call to __atanf.
* sysdeps/m68k/fpu/e_acos.c, sysdeps/m68k/fpu/e_acosf.c,
sysdeps/m68k/fpu/e_asin.c, sysdeps/m68k/fpu/e_asinf.c,
sysdeps/m68k/fpu/e_atanh.c, sysdeps/m68k/fpu/e_atanhf.c,
sysdeps/m68k/fpu/e_cosh.c, sysdeps/m68k/fpu/e_coshf.c,
sysdeps/m68k/fpu/e_exp.c, sysdeps/m68k/fpu/e_expf.c,
sysdeps/m68k/fpu/e_fmod.c, sysdeps/m68k/fpu/e_fmodf.c,
sysdeps/m68k/fpu/e_log.c, sysdeps/m68k/fpu/e_log10.c,
sysdeps/m68k/fpu/e_log10f.c, sysdeps/m68k/fpu/e_logf.c,
sysdeps/m68k/fpu/e_pow.c, sysdeps/m68k/fpu/e_powf.c,
sysdeps/m68k/fpu/e_remainder.c, sysdeps/m68k/fpu/e_remainderf.c,
sysdeps/m68k/fpu/e_scalb.c, sysdeps/m68k/fpu/e_scalbf.c,
sysdeps/m68k/fpu/e_sinh.c, sysdeps/m68k/fpu/e_sinhf.c,
sysdeps/m68k/fpu/e_sqrt.c, sysdeps/m68k/fpu/e_sqrtf.c,
sysdeps/m68k/fpu/k_cos.c, sysdeps/m68k/fpu/k_cosf.c,
sysdeps/m68k/fpu/k_sin.c, sysdeps/m68k/fpu/k_sinf.c,
sysdeps/m68k/fpu/k_tan.c, sysdeps/m68k/fpu/k_tanf.c,
sysdeps/m68k/fpu/s_atan.c, sysdeps/m68k/fpu/s_atanf.c,
sysdeps/m68k/fpu/s_ceil.c, sysdeps/m68k/fpu/s_ceilf.c,
sysdeps/m68k/fpu/s_cos.c, sysdeps/m68k/fpu/s_cosf.c,
sysdeps/m68k/fpu/s_expm1.c, sysdeps/m68k/fpu/s_expm1f.c,
sysdeps/m68k/fpu/s_fabs.c, sysdeps/m68k/fpu/s_fabsf.c,
sysdeps/m68k/fpu/s_finite.c, sysdeps/m68k/fpu/s_finitef.c,
sysdeps/m68k/fpu/s_floor.c, sysdeps/m68k/fpu/s_floorf.c,
sysdeps/m68k/fpu/s_frexp.c, sysdeps/m68k/fpu/s_frexpf.c,
sysdeps/m68k/fpu/s_ilogb.c, sysdeps/m68k/fpu/s_ilogbf.c,
sysdeps/m68k/fpu/s_isinf.c, sysdeps/m68k/fpu/s_isinff.c,
sysdeps/m68k/fpu/s_isnan.c, sysdeps/m68k/fpu/s_isnanf.c,
sysdeps/m68k/fpu/s_ldexp.c, sysdeps/m68k/fpu/s_ldexpf.c,
sysdeps/m68k/fpu/s_log1p.c, sysdeps/m68k/fpu/s_log1pf.c,
sysdeps/m68k/fpu/s_logb.c, sysdeps/m68k/fpu/s_logbf.c,
sysdeps/m68k/fpu/s_modf.c, sysdeps/m68k/fpu/s_modff.c,
sysdeps/m68k/fpu/s_rint.c, sysdeps/m68k/fpu/s_rintf.c,
sysdeps/m68k/fpu/s_scalbn.c, sysdeps/m68k/fpu/s_scalbnf.c,
sysdeps/m68k/fpu/s_significand.c,
sysdeps/m68k/fpu/s_significandf.c, sysdeps/m68k/fpu/s_sin.c,
sysdeps/m68k/fpu/s_sinf.c, sysdeps/m68k/fpu/s_tan.c,
sysdeps/m68k/fpu/s_tanf.c, sysdeps/m68k/fpu/s_tanh.c,
sysdeps/m68k/fpu/s_tanhf.c: New files, for m68881 port of fdlibm.
* sysdeps/m68k/fpu/__math.h: Rewritten for fdlibm.
* sysdeps/m68k/fpu/isinfl.c: Rewritten to get argument type right.
* sysdeps/m68k/fpu/isnanl.c: Likewise.
Thu Mar 14 06:01:07 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* posix/glob.c (glob): In GLOB_BRACE brace expansion, fix buffer size
calculation to include trailing invariant portion. Don't use alloca;
instead use a dynamic auto array for GCC, malloc for non-GCC.
Handle nested braces properly.
* elf/elf.h (Elf32_auxv_t): Specify prototype (void) for `a_un.a_fcn'.
* libc-symbols.h (lint): New macro.
Fri Mar 15 01:18:00 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* libio/iosetvbuf.c: Add weak alias setvbuf.
1996-03-17 01:58:17 +00:00
|
|
|
|
if (!(flags & GLOB_APPEND))
|
2002-02-10 23:36:05 +00:00
|
|
|
|
{
|
|
|
|
|
globfree (pglob);
|
|
|
|
|
pglob->gl_pathc = 0;
|
|
|
|
|
}
|
Sat Mar 16 20:08:22 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/alpha/memchr.S: new file.
* sysdeps/alpha/memchr.c: obsolete file removed.
Sat Mar 16 16:26:09 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* misc/Makefile (headers): Add sysexits.h.
* misc/sysexits.h: New file.
Thu Mar 14 15:20:45 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/libm-ieee754/e_atan2.c (__ieee754_atan2): Change atan
call to __atan.
* sysdeps/libm-ieee754/e_atan2f.c (__ieee754_atan2f): Change atanf
call to __atanf.
* sysdeps/m68k/fpu/e_acos.c, sysdeps/m68k/fpu/e_acosf.c,
sysdeps/m68k/fpu/e_asin.c, sysdeps/m68k/fpu/e_asinf.c,
sysdeps/m68k/fpu/e_atanh.c, sysdeps/m68k/fpu/e_atanhf.c,
sysdeps/m68k/fpu/e_cosh.c, sysdeps/m68k/fpu/e_coshf.c,
sysdeps/m68k/fpu/e_exp.c, sysdeps/m68k/fpu/e_expf.c,
sysdeps/m68k/fpu/e_fmod.c, sysdeps/m68k/fpu/e_fmodf.c,
sysdeps/m68k/fpu/e_log.c, sysdeps/m68k/fpu/e_log10.c,
sysdeps/m68k/fpu/e_log10f.c, sysdeps/m68k/fpu/e_logf.c,
sysdeps/m68k/fpu/e_pow.c, sysdeps/m68k/fpu/e_powf.c,
sysdeps/m68k/fpu/e_remainder.c, sysdeps/m68k/fpu/e_remainderf.c,
sysdeps/m68k/fpu/e_scalb.c, sysdeps/m68k/fpu/e_scalbf.c,
sysdeps/m68k/fpu/e_sinh.c, sysdeps/m68k/fpu/e_sinhf.c,
sysdeps/m68k/fpu/e_sqrt.c, sysdeps/m68k/fpu/e_sqrtf.c,
sysdeps/m68k/fpu/k_cos.c, sysdeps/m68k/fpu/k_cosf.c,
sysdeps/m68k/fpu/k_sin.c, sysdeps/m68k/fpu/k_sinf.c,
sysdeps/m68k/fpu/k_tan.c, sysdeps/m68k/fpu/k_tanf.c,
sysdeps/m68k/fpu/s_atan.c, sysdeps/m68k/fpu/s_atanf.c,
sysdeps/m68k/fpu/s_ceil.c, sysdeps/m68k/fpu/s_ceilf.c,
sysdeps/m68k/fpu/s_cos.c, sysdeps/m68k/fpu/s_cosf.c,
sysdeps/m68k/fpu/s_expm1.c, sysdeps/m68k/fpu/s_expm1f.c,
sysdeps/m68k/fpu/s_fabs.c, sysdeps/m68k/fpu/s_fabsf.c,
sysdeps/m68k/fpu/s_finite.c, sysdeps/m68k/fpu/s_finitef.c,
sysdeps/m68k/fpu/s_floor.c, sysdeps/m68k/fpu/s_floorf.c,
sysdeps/m68k/fpu/s_frexp.c, sysdeps/m68k/fpu/s_frexpf.c,
sysdeps/m68k/fpu/s_ilogb.c, sysdeps/m68k/fpu/s_ilogbf.c,
sysdeps/m68k/fpu/s_isinf.c, sysdeps/m68k/fpu/s_isinff.c,
sysdeps/m68k/fpu/s_isnan.c, sysdeps/m68k/fpu/s_isnanf.c,
sysdeps/m68k/fpu/s_ldexp.c, sysdeps/m68k/fpu/s_ldexpf.c,
sysdeps/m68k/fpu/s_log1p.c, sysdeps/m68k/fpu/s_log1pf.c,
sysdeps/m68k/fpu/s_logb.c, sysdeps/m68k/fpu/s_logbf.c,
sysdeps/m68k/fpu/s_modf.c, sysdeps/m68k/fpu/s_modff.c,
sysdeps/m68k/fpu/s_rint.c, sysdeps/m68k/fpu/s_rintf.c,
sysdeps/m68k/fpu/s_scalbn.c, sysdeps/m68k/fpu/s_scalbnf.c,
sysdeps/m68k/fpu/s_significand.c,
sysdeps/m68k/fpu/s_significandf.c, sysdeps/m68k/fpu/s_sin.c,
sysdeps/m68k/fpu/s_sinf.c, sysdeps/m68k/fpu/s_tan.c,
sysdeps/m68k/fpu/s_tanf.c, sysdeps/m68k/fpu/s_tanh.c,
sysdeps/m68k/fpu/s_tanhf.c: New files, for m68881 port of fdlibm.
* sysdeps/m68k/fpu/__math.h: Rewritten for fdlibm.
* sysdeps/m68k/fpu/isinfl.c: Rewritten to get argument type right.
* sysdeps/m68k/fpu/isnanl.c: Likewise.
Thu Mar 14 06:01:07 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* posix/glob.c (glob): In GLOB_BRACE brace expansion, fix buffer size
calculation to include trailing invariant portion. Don't use alloca;
instead use a dynamic auto array for GCC, malloc for non-GCC.
Handle nested braces properly.
* elf/elf.h (Elf32_auxv_t): Specify prototype (void) for `a_un.a_fcn'.
* libc-symbols.h (lint): New macro.
Fri Mar 15 01:18:00 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* libio/iosetvbuf.c: Add weak alias setvbuf.
1996-03-17 01:58:17 +00:00
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
1997-03-21 20:00:48 +00:00
|
|
|
|
if (*next == '}')
|
|
|
|
|
/* We saw the last entry. */
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
p = next + 1;
|
2003-10-26 20:47:33 +00:00
|
|
|
|
next = next_brace_sub (p, flags);
|
1997-03-21 20:00:48 +00:00
|
|
|
|
assert (next != NULL);
|
Fri Dec 8 13:04:51 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* locale/error.c, locale/error.h: Files removed.
* locale/Makefile (distribute): Remove error.h.
(lib-modules): Remove error.
* hurd/hurdlookup.c (__hurd_file_name_lookup_retry): For "tty"
magic, return ENXIO if no ctty.
* sysdeps/mach/hurd/mmap.c: For MAP_FIXED, deallocate a previous
mapping if vm_map fails for that reason.
* posix/glob.c: Implement new options GLOB_ALTDIRFUNC, GLOB_BRACE,
GLOB_TILDE, GLOB_NOMAGIC.
(glob): Use stat instead of lstat to determine directoriness.
* posix/glob.h (GLOB_ALTDIRFUNC, GLOB_BRACE, GLOB_NOMAGIC, GLOB_TILDE):
New flag bits.
(__GLOB_FLAGS): Include them.
(glob_t): New members gl_closedir, gl_readdir, gl_opendir, gl_lstat,
gl_stat.
* elf/elf.h (ET_NUM, SHT_NUM, STB_NUM, STT_NUM, PT_NUM): New macros.
* sysdeps/unix/sysv/linux/sys/mman.h: Include <linux/mman.h> to
define all the bit values.
(MAP_*, MCL_*): Macros removed.
1995-12-09 10:00:22 +00:00
|
|
|
|
}
|
Sat Mar 16 20:08:22 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/alpha/memchr.S: new file.
* sysdeps/alpha/memchr.c: obsolete file removed.
Sat Mar 16 16:26:09 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* misc/Makefile (headers): Add sysexits.h.
* misc/sysexits.h: New file.
Thu Mar 14 15:20:45 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/libm-ieee754/e_atan2.c (__ieee754_atan2): Change atan
call to __atan.
* sysdeps/libm-ieee754/e_atan2f.c (__ieee754_atan2f): Change atanf
call to __atanf.
* sysdeps/m68k/fpu/e_acos.c, sysdeps/m68k/fpu/e_acosf.c,
sysdeps/m68k/fpu/e_asin.c, sysdeps/m68k/fpu/e_asinf.c,
sysdeps/m68k/fpu/e_atanh.c, sysdeps/m68k/fpu/e_atanhf.c,
sysdeps/m68k/fpu/e_cosh.c, sysdeps/m68k/fpu/e_coshf.c,
sysdeps/m68k/fpu/e_exp.c, sysdeps/m68k/fpu/e_expf.c,
sysdeps/m68k/fpu/e_fmod.c, sysdeps/m68k/fpu/e_fmodf.c,
sysdeps/m68k/fpu/e_log.c, sysdeps/m68k/fpu/e_log10.c,
sysdeps/m68k/fpu/e_log10f.c, sysdeps/m68k/fpu/e_logf.c,
sysdeps/m68k/fpu/e_pow.c, sysdeps/m68k/fpu/e_powf.c,
sysdeps/m68k/fpu/e_remainder.c, sysdeps/m68k/fpu/e_remainderf.c,
sysdeps/m68k/fpu/e_scalb.c, sysdeps/m68k/fpu/e_scalbf.c,
sysdeps/m68k/fpu/e_sinh.c, sysdeps/m68k/fpu/e_sinhf.c,
sysdeps/m68k/fpu/e_sqrt.c, sysdeps/m68k/fpu/e_sqrtf.c,
sysdeps/m68k/fpu/k_cos.c, sysdeps/m68k/fpu/k_cosf.c,
sysdeps/m68k/fpu/k_sin.c, sysdeps/m68k/fpu/k_sinf.c,
sysdeps/m68k/fpu/k_tan.c, sysdeps/m68k/fpu/k_tanf.c,
sysdeps/m68k/fpu/s_atan.c, sysdeps/m68k/fpu/s_atanf.c,
sysdeps/m68k/fpu/s_ceil.c, sysdeps/m68k/fpu/s_ceilf.c,
sysdeps/m68k/fpu/s_cos.c, sysdeps/m68k/fpu/s_cosf.c,
sysdeps/m68k/fpu/s_expm1.c, sysdeps/m68k/fpu/s_expm1f.c,
sysdeps/m68k/fpu/s_fabs.c, sysdeps/m68k/fpu/s_fabsf.c,
sysdeps/m68k/fpu/s_finite.c, sysdeps/m68k/fpu/s_finitef.c,
sysdeps/m68k/fpu/s_floor.c, sysdeps/m68k/fpu/s_floorf.c,
sysdeps/m68k/fpu/s_frexp.c, sysdeps/m68k/fpu/s_frexpf.c,
sysdeps/m68k/fpu/s_ilogb.c, sysdeps/m68k/fpu/s_ilogbf.c,
sysdeps/m68k/fpu/s_isinf.c, sysdeps/m68k/fpu/s_isinff.c,
sysdeps/m68k/fpu/s_isnan.c, sysdeps/m68k/fpu/s_isnanf.c,
sysdeps/m68k/fpu/s_ldexp.c, sysdeps/m68k/fpu/s_ldexpf.c,
sysdeps/m68k/fpu/s_log1p.c, sysdeps/m68k/fpu/s_log1pf.c,
sysdeps/m68k/fpu/s_logb.c, sysdeps/m68k/fpu/s_logbf.c,
sysdeps/m68k/fpu/s_modf.c, sysdeps/m68k/fpu/s_modff.c,
sysdeps/m68k/fpu/s_rint.c, sysdeps/m68k/fpu/s_rintf.c,
sysdeps/m68k/fpu/s_scalbn.c, sysdeps/m68k/fpu/s_scalbnf.c,
sysdeps/m68k/fpu/s_significand.c,
sysdeps/m68k/fpu/s_significandf.c, sysdeps/m68k/fpu/s_sin.c,
sysdeps/m68k/fpu/s_sinf.c, sysdeps/m68k/fpu/s_tan.c,
sysdeps/m68k/fpu/s_tanf.c, sysdeps/m68k/fpu/s_tanh.c,
sysdeps/m68k/fpu/s_tanhf.c: New files, for m68881 port of fdlibm.
* sysdeps/m68k/fpu/__math.h: Rewritten for fdlibm.
* sysdeps/m68k/fpu/isinfl.c: Rewritten to get argument type right.
* sysdeps/m68k/fpu/isnanl.c: Likewise.
Thu Mar 14 06:01:07 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* posix/glob.c (glob): In GLOB_BRACE brace expansion, fix buffer size
calculation to include trailing invariant portion. Don't use alloca;
instead use a dynamic auto array for GCC, malloc for non-GCC.
Handle nested braces properly.
* elf/elf.h (Elf32_auxv_t): Specify prototype (void) for `a_un.a_fcn'.
* libc-symbols.h (lint): New macro.
Fri Mar 15 01:18:00 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* libio/iosetvbuf.c: Add weak alias setvbuf.
1996-03-17 01:58:17 +00:00
|
|
|
|
|
2011-05-23 03:04:16 +00:00
|
|
|
|
#ifdef _LIBC
|
2014-02-10 13:45:42 +00:00
|
|
|
|
if (__glibc_unlikely (!alloca_onealt))
|
1997-03-21 20:00:48 +00:00
|
|
|
|
#endif
|
2011-05-23 03:04:16 +00:00
|
|
|
|
free (onealt);
|
1997-03-21 20:00:48 +00:00
|
|
|
|
|
|
|
|
|
if (pglob->gl_pathc != firstc)
|
|
|
|
|
/* We found some entries. */
|
|
|
|
|
return 0;
|
|
|
|
|
else if (!(flags & (GLOB_NOCHECK|GLOB_NOMAGIC)))
|
Sat Mar 16 20:08:22 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/alpha/memchr.S: new file.
* sysdeps/alpha/memchr.c: obsolete file removed.
Sat Mar 16 16:26:09 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* misc/Makefile (headers): Add sysexits.h.
* misc/sysexits.h: New file.
Thu Mar 14 15:20:45 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/libm-ieee754/e_atan2.c (__ieee754_atan2): Change atan
call to __atan.
* sysdeps/libm-ieee754/e_atan2f.c (__ieee754_atan2f): Change atanf
call to __atanf.
* sysdeps/m68k/fpu/e_acos.c, sysdeps/m68k/fpu/e_acosf.c,
sysdeps/m68k/fpu/e_asin.c, sysdeps/m68k/fpu/e_asinf.c,
sysdeps/m68k/fpu/e_atanh.c, sysdeps/m68k/fpu/e_atanhf.c,
sysdeps/m68k/fpu/e_cosh.c, sysdeps/m68k/fpu/e_coshf.c,
sysdeps/m68k/fpu/e_exp.c, sysdeps/m68k/fpu/e_expf.c,
sysdeps/m68k/fpu/e_fmod.c, sysdeps/m68k/fpu/e_fmodf.c,
sysdeps/m68k/fpu/e_log.c, sysdeps/m68k/fpu/e_log10.c,
sysdeps/m68k/fpu/e_log10f.c, sysdeps/m68k/fpu/e_logf.c,
sysdeps/m68k/fpu/e_pow.c, sysdeps/m68k/fpu/e_powf.c,
sysdeps/m68k/fpu/e_remainder.c, sysdeps/m68k/fpu/e_remainderf.c,
sysdeps/m68k/fpu/e_scalb.c, sysdeps/m68k/fpu/e_scalbf.c,
sysdeps/m68k/fpu/e_sinh.c, sysdeps/m68k/fpu/e_sinhf.c,
sysdeps/m68k/fpu/e_sqrt.c, sysdeps/m68k/fpu/e_sqrtf.c,
sysdeps/m68k/fpu/k_cos.c, sysdeps/m68k/fpu/k_cosf.c,
sysdeps/m68k/fpu/k_sin.c, sysdeps/m68k/fpu/k_sinf.c,
sysdeps/m68k/fpu/k_tan.c, sysdeps/m68k/fpu/k_tanf.c,
sysdeps/m68k/fpu/s_atan.c, sysdeps/m68k/fpu/s_atanf.c,
sysdeps/m68k/fpu/s_ceil.c, sysdeps/m68k/fpu/s_ceilf.c,
sysdeps/m68k/fpu/s_cos.c, sysdeps/m68k/fpu/s_cosf.c,
sysdeps/m68k/fpu/s_expm1.c, sysdeps/m68k/fpu/s_expm1f.c,
sysdeps/m68k/fpu/s_fabs.c, sysdeps/m68k/fpu/s_fabsf.c,
sysdeps/m68k/fpu/s_finite.c, sysdeps/m68k/fpu/s_finitef.c,
sysdeps/m68k/fpu/s_floor.c, sysdeps/m68k/fpu/s_floorf.c,
sysdeps/m68k/fpu/s_frexp.c, sysdeps/m68k/fpu/s_frexpf.c,
sysdeps/m68k/fpu/s_ilogb.c, sysdeps/m68k/fpu/s_ilogbf.c,
sysdeps/m68k/fpu/s_isinf.c, sysdeps/m68k/fpu/s_isinff.c,
sysdeps/m68k/fpu/s_isnan.c, sysdeps/m68k/fpu/s_isnanf.c,
sysdeps/m68k/fpu/s_ldexp.c, sysdeps/m68k/fpu/s_ldexpf.c,
sysdeps/m68k/fpu/s_log1p.c, sysdeps/m68k/fpu/s_log1pf.c,
sysdeps/m68k/fpu/s_logb.c, sysdeps/m68k/fpu/s_logbf.c,
sysdeps/m68k/fpu/s_modf.c, sysdeps/m68k/fpu/s_modff.c,
sysdeps/m68k/fpu/s_rint.c, sysdeps/m68k/fpu/s_rintf.c,
sysdeps/m68k/fpu/s_scalbn.c, sysdeps/m68k/fpu/s_scalbnf.c,
sysdeps/m68k/fpu/s_significand.c,
sysdeps/m68k/fpu/s_significandf.c, sysdeps/m68k/fpu/s_sin.c,
sysdeps/m68k/fpu/s_sinf.c, sysdeps/m68k/fpu/s_tan.c,
sysdeps/m68k/fpu/s_tanf.c, sysdeps/m68k/fpu/s_tanh.c,
sysdeps/m68k/fpu/s_tanhf.c: New files, for m68881 port of fdlibm.
* sysdeps/m68k/fpu/__math.h: Rewritten for fdlibm.
* sysdeps/m68k/fpu/isinfl.c: Rewritten to get argument type right.
* sysdeps/m68k/fpu/isnanl.c: Likewise.
Thu Mar 14 06:01:07 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* posix/glob.c (glob): In GLOB_BRACE brace expansion, fix buffer size
calculation to include trailing invariant portion. Don't use alloca;
instead use a dynamic auto array for GCC, malloc for non-GCC.
Handle nested braces properly.
* elf/elf.h (Elf32_auxv_t): Specify prototype (void) for `a_un.a_fcn'.
* libc-symbols.h (lint): New macro.
Fri Mar 15 01:18:00 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* libio/iosetvbuf.c: Add weak alias setvbuf.
1996-03-17 01:58:17 +00:00
|
|
|
|
return GLOB_NOMATCH;
|
Fri Dec 8 13:04:51 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* locale/error.c, locale/error.h: Files removed.
* locale/Makefile (distribute): Remove error.h.
(lib-modules): Remove error.
* hurd/hurdlookup.c (__hurd_file_name_lookup_retry): For "tty"
magic, return ENXIO if no ctty.
* sysdeps/mach/hurd/mmap.c: For MAP_FIXED, deallocate a previous
mapping if vm_map fails for that reason.
* posix/glob.c: Implement new options GLOB_ALTDIRFUNC, GLOB_BRACE,
GLOB_TILDE, GLOB_NOMAGIC.
(glob): Use stat instead of lstat to determine directoriness.
* posix/glob.h (GLOB_ALTDIRFUNC, GLOB_BRACE, GLOB_NOMAGIC, GLOB_TILDE):
New flag bits.
(__GLOB_FLAGS): Include them.
(glob_t): New members gl_closedir, gl_readdir, gl_opendir, gl_lstat,
gl_stat.
* elf/elf.h (ET_NUM, SHT_NUM, STB_NUM, STT_NUM, PT_NUM): New macros.
* sysdeps/unix/sysv/linux/sys/mman.h: Include <linux/mman.h> to
define all the bit values.
(MAP_*, MCL_*): Macros removed.
1995-12-09 10:00:22 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2010-03-24 18:58:05 +00:00
|
|
|
|
if (!(flags & GLOB_APPEND))
|
|
|
|
|
{
|
|
|
|
|
pglob->gl_pathc = 0;
|
|
|
|
|
if (!(flags & GLOB_DOOFFS))
|
|
|
|
|
pglob->gl_pathv = NULL;
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
size_t i;
|
2011-07-21 02:53:58 +00:00
|
|
|
|
|
|
|
|
|
if (pglob->gl_offs >= ~((size_t) 0) / sizeof (char *))
|
|
|
|
|
return GLOB_NOSPACE;
|
|
|
|
|
|
2010-03-24 18:58:05 +00:00
|
|
|
|
pglob->gl_pathv = (char **) malloc ((pglob->gl_offs + 1)
|
|
|
|
|
* sizeof (char *));
|
|
|
|
|
if (pglob->gl_pathv == NULL)
|
|
|
|
|
return GLOB_NOSPACE;
|
|
|
|
|
|
|
|
|
|
for (i = 0; i <= pglob->gl_offs; ++i)
|
|
|
|
|
pglob->gl_pathv[i] = NULL;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2010-03-27 12:48:17 +00:00
|
|
|
|
oldcount = pglob->gl_pathc + pglob->gl_offs;
|
|
|
|
|
|
1995-02-18 01:27:10 +00:00
|
|
|
|
/* Find the filename. */
|
|
|
|
|
filename = strrchr (pattern, '/');
|
1998-07-29 14:52:00 +00:00
|
|
|
|
#if defined __MSDOS__ || defined WINDOWS32
|
|
|
|
|
/* The case of "d:pattern". Since `:' is not allowed in
|
|
|
|
|
file names, we can safely assume that wherever it
|
|
|
|
|
happens in pattern, it signals the filename part. This
|
|
|
|
|
is so we could some day support patterns like "[a-z]:foo". */
|
|
|
|
|
if (filename == NULL)
|
|
|
|
|
filename = strchr (pattern, ':');
|
|
|
|
|
#endif /* __MSDOS__ || WINDOWS32 */
|
2007-02-14 19:52:38 +00:00
|
|
|
|
dirname_modified = 0;
|
1995-02-18 01:27:10 +00:00
|
|
|
|
if (filename == NULL)
|
|
|
|
|
{
|
2000-02-22 09:00:35 +00:00
|
|
|
|
/* This can mean two things: a simple name or "~name". The latter
|
1998-07-24 12:58:36 +00:00
|
|
|
|
case is nothing but a notation for a directory. */
|
1998-07-28 20:47:08 +00:00
|
|
|
|
if ((flags & (GLOB_TILDE|GLOB_TILDE_CHECK)) && pattern[0] == '~')
|
1998-07-24 12:58:36 +00:00
|
|
|
|
{
|
2011-05-23 03:04:16 +00:00
|
|
|
|
dirname = (char *) pattern;
|
1998-07-24 12:58:36 +00:00
|
|
|
|
dirlen = strlen (pattern);
|
|
|
|
|
|
1998-07-27 22:28:11 +00:00
|
|
|
|
/* Set FILENAME to NULL as a special flag. This is ugly but
|
1998-07-29 14:52:00 +00:00
|
|
|
|
other solutions would require much more code. We test for
|
1998-07-27 22:28:11 +00:00
|
|
|
|
this special case below. */
|
|
|
|
|
filename = NULL;
|
1998-07-24 12:58:36 +00:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2014-02-10 13:45:42 +00:00
|
|
|
|
if (__glibc_unlikely (pattern[0] == '\0'))
|
2010-03-24 18:58:05 +00:00
|
|
|
|
{
|
|
|
|
|
dirs.gl_pathv = NULL;
|
|
|
|
|
goto no_matches;
|
|
|
|
|
}
|
|
|
|
|
|
1998-07-24 12:58:36 +00:00
|
|
|
|
filename = pattern;
|
1996-05-13 20:27:12 +00:00
|
|
|
|
#ifdef _AMIGA
|
2011-05-23 03:04:16 +00:00
|
|
|
|
dirname = (char *) "";
|
1996-05-13 20:27:12 +00:00
|
|
|
|
#else
|
2011-05-23 03:04:16 +00:00
|
|
|
|
dirname = (char *) ".";
|
1996-05-13 20:27:12 +00:00
|
|
|
|
#endif
|
1998-07-24 12:58:36 +00:00
|
|
|
|
dirlen = 0;
|
|
|
|
|
}
|
1995-02-18 01:27:10 +00:00
|
|
|
|
}
|
2007-10-07 18:54:52 +00:00
|
|
|
|
else if (filename == pattern
|
2007-10-07 22:09:38 +00:00
|
|
|
|
|| (filename == pattern + 1 && pattern[0] == '\\'
|
|
|
|
|
&& (flags & GLOB_NOESCAPE) == 0))
|
1995-02-18 01:27:10 +00:00
|
|
|
|
{
|
2007-10-07 18:54:52 +00:00
|
|
|
|
/* "/pattern" or "\\/pattern". */
|
2011-05-23 03:04:16 +00:00
|
|
|
|
dirname = (char *) "/";
|
1995-02-18 01:27:10 +00:00
|
|
|
|
dirlen = 1;
|
|
|
|
|
++filename;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
1998-07-29 12:34:57 +00:00
|
|
|
|
char *newp;
|
1995-02-18 01:27:10 +00:00
|
|
|
|
dirlen = filename - pattern;
|
1998-07-29 14:52:00 +00:00
|
|
|
|
#if defined __MSDOS__ || defined WINDOWS32
|
|
|
|
|
if (*filename == ':'
|
|
|
|
|
|| (filename > pattern + 1 && filename[-1] == ':'))
|
|
|
|
|
{
|
|
|
|
|
char *drive_spec;
|
|
|
|
|
|
|
|
|
|
++dirlen;
|
|
|
|
|
drive_spec = (char *) __alloca (dirlen + 1);
|
|
|
|
|
*((char *) mempcpy (drive_spec, pattern, dirlen)) = '\0';
|
|
|
|
|
/* For now, disallow wildcards in the drive spec, to
|
|
|
|
|
prevent infinite recursion in glob. */
|
|
|
|
|
if (__glob_pattern_p (drive_spec, !(flags & GLOB_NOESCAPE)))
|
|
|
|
|
return GLOB_NOMATCH;
|
|
|
|
|
/* If this is "d:pattern", we need to copy `:' to DIRNAME
|
|
|
|
|
as well. If it's "d:/pattern", don't remove the slash
|
|
|
|
|
from "d:/", since "d:" and "d:/" are not the same.*/
|
|
|
|
|
}
|
|
|
|
|
#endif
|
2011-05-23 03:04:16 +00:00
|
|
|
|
#ifdef _LIBC
|
|
|
|
|
if (__libc_use_alloca (alloca_used + dirlen + 1))
|
|
|
|
|
newp = alloca_account (dirlen + 1, alloca_used);
|
|
|
|
|
else
|
|
|
|
|
#endif
|
|
|
|
|
{
|
|
|
|
|
newp = malloc (dirlen + 1);
|
|
|
|
|
if (newp == NULL)
|
|
|
|
|
return GLOB_NOSPACE;
|
|
|
|
|
malloc_dirname = 1;
|
|
|
|
|
}
|
1998-07-29 12:34:57 +00:00
|
|
|
|
*((char *) mempcpy (newp, pattern, dirlen)) = '\0';
|
|
|
|
|
dirname = newp;
|
1995-02-18 01:27:10 +00:00
|
|
|
|
++filename;
|
|
|
|
|
|
1998-07-29 14:52:00 +00:00
|
|
|
|
if (filename[0] == '\0'
|
|
|
|
|
#if defined __MSDOS__ || defined WINDOWS32
|
2010-03-24 18:58:05 +00:00
|
|
|
|
&& dirname[dirlen - 1] != ':'
|
1998-07-29 14:52:00 +00:00
|
|
|
|
&& (dirlen < 3 || dirname[dirlen - 2] != ':'
|
|
|
|
|
|| dirname[dirlen - 1] != '/')
|
|
|
|
|
#endif
|
|
|
|
|
&& dirlen > 1)
|
1998-07-24 12:58:36 +00:00
|
|
|
|
/* "pattern/". Expand "pattern", appending slashes. */
|
|
|
|
|
{
|
2007-02-14 19:52:38 +00:00
|
|
|
|
int orig_flags = flags;
|
|
|
|
|
if (!(flags & GLOB_NOESCAPE) && dirname[dirlen - 1] == '\\')
|
|
|
|
|
{
|
|
|
|
|
/* "pattern\\/". Remove the final backslash if it hasn't
|
|
|
|
|
been quoted. */
|
|
|
|
|
char *p = (char *) &dirname[dirlen - 1];
|
|
|
|
|
|
|
|
|
|
while (p > dirname && p[-1] == '\\') --p;
|
|
|
|
|
if ((&dirname[dirlen] - p) & 1)
|
|
|
|
|
{
|
|
|
|
|
*(char *) &dirname[--dirlen] = '\0';
|
|
|
|
|
flags &= ~(GLOB_NOCHECK | GLOB_NOMAGIC);
|
|
|
|
|
}
|
|
|
|
|
}
|
1998-07-24 12:58:36 +00:00
|
|
|
|
int val = glob (dirname, flags | GLOB_MARK, errfunc, pglob);
|
|
|
|
|
if (val == 0)
|
|
|
|
|
pglob->gl_flags = ((pglob->gl_flags & ~GLOB_MARK)
|
|
|
|
|
| (flags & GLOB_MARK));
|
2007-02-14 19:52:38 +00:00
|
|
|
|
else if (val == GLOB_NOMATCH && flags != orig_flags)
|
|
|
|
|
{
|
|
|
|
|
/* Make sure globfree (&dirs); is a nop. */
|
|
|
|
|
dirs.gl_pathv = NULL;
|
|
|
|
|
flags = orig_flags;
|
|
|
|
|
oldcount = pglob->gl_pathc + pglob->gl_offs;
|
|
|
|
|
goto no_matches;
|
|
|
|
|
}
|
2011-05-23 03:04:16 +00:00
|
|
|
|
retval = val;
|
|
|
|
|
goto out;
|
1998-07-24 12:58:36 +00:00
|
|
|
|
}
|
1995-02-18 01:27:10 +00:00
|
|
|
|
}
|
|
|
|
|
|
1996-05-22 21:28:03 +00:00
|
|
|
|
#ifndef VMS
|
1998-07-28 20:47:08 +00:00
|
|
|
|
if ((flags & (GLOB_TILDE|GLOB_TILDE_CHECK)) && dirname[0] == '~')
|
Fri Dec 8 13:04:51 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* locale/error.c, locale/error.h: Files removed.
* locale/Makefile (distribute): Remove error.h.
(lib-modules): Remove error.
* hurd/hurdlookup.c (__hurd_file_name_lookup_retry): For "tty"
magic, return ENXIO if no ctty.
* sysdeps/mach/hurd/mmap.c: For MAP_FIXED, deallocate a previous
mapping if vm_map fails for that reason.
* posix/glob.c: Implement new options GLOB_ALTDIRFUNC, GLOB_BRACE,
GLOB_TILDE, GLOB_NOMAGIC.
(glob): Use stat instead of lstat to determine directoriness.
* posix/glob.h (GLOB_ALTDIRFUNC, GLOB_BRACE, GLOB_NOMAGIC, GLOB_TILDE):
New flag bits.
(__GLOB_FLAGS): Include them.
(glob_t): New members gl_closedir, gl_readdir, gl_opendir, gl_lstat,
gl_stat.
* elf/elf.h (ET_NUM, SHT_NUM, STB_NUM, STT_NUM, PT_NUM): New macros.
* sysdeps/unix/sysv/linux/sys/mman.h: Include <linux/mman.h> to
define all the bit values.
(MAP_*, MCL_*): Macros removed.
1995-12-09 10:00:22 +00:00
|
|
|
|
{
|
2007-02-14 19:52:38 +00:00
|
|
|
|
if (dirname[1] == '\0' || dirname[1] == '/'
|
|
|
|
|
|| (!(flags & GLOB_NOESCAPE) && dirname[1] == '\\'
|
|
|
|
|
&& (dirname[2] == '\0' || dirname[2] == '/')))
|
Fri Dec 8 13:04:51 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* locale/error.c, locale/error.h: Files removed.
* locale/Makefile (distribute): Remove error.h.
(lib-modules): Remove error.
* hurd/hurdlookup.c (__hurd_file_name_lookup_retry): For "tty"
magic, return ENXIO if no ctty.
* sysdeps/mach/hurd/mmap.c: For MAP_FIXED, deallocate a previous
mapping if vm_map fails for that reason.
* posix/glob.c: Implement new options GLOB_ALTDIRFUNC, GLOB_BRACE,
GLOB_TILDE, GLOB_NOMAGIC.
(glob): Use stat instead of lstat to determine directoriness.
* posix/glob.h (GLOB_ALTDIRFUNC, GLOB_BRACE, GLOB_NOMAGIC, GLOB_TILDE):
New flag bits.
(__GLOB_FLAGS): Include them.
(glob_t): New members gl_closedir, gl_readdir, gl_opendir, gl_lstat,
gl_stat.
* elf/elf.h (ET_NUM, SHT_NUM, STB_NUM, STT_NUM, PT_NUM): New macros.
* sysdeps/unix/sysv/linux/sys/mman.h: Include <linux/mman.h> to
define all the bit values.
(MAP_*, MCL_*): Macros removed.
1995-12-09 10:00:22 +00:00
|
|
|
|
{
|
|
|
|
|
/* Look up home directory. */
|
2011-05-23 03:04:16 +00:00
|
|
|
|
char *home_dir = getenv ("HOME");
|
|
|
|
|
int malloc_home_dir = 0;
|
1997-09-16 00:42:43 +00:00
|
|
|
|
# ifdef _AMIGA
|
1997-03-21 20:00:48 +00:00
|
|
|
|
if (home_dir == NULL || home_dir[0] == '\0')
|
|
|
|
|
home_dir = "SYS:";
|
1997-09-16 00:42:43 +00:00
|
|
|
|
# else
|
|
|
|
|
# ifdef WINDOWS32
|
1997-03-21 20:00:48 +00:00
|
|
|
|
if (home_dir == NULL || home_dir[0] == '\0')
|
2010-03-24 18:58:05 +00:00
|
|
|
|
home_dir = "c:/users/default"; /* poor default */
|
1997-09-16 00:42:43 +00:00
|
|
|
|
# else
|
1997-03-21 20:00:48 +00:00
|
|
|
|
if (home_dir == NULL || home_dir[0] == '\0')
|
Fri Dec 8 13:04:51 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* locale/error.c, locale/error.h: Files removed.
* locale/Makefile (distribute): Remove error.h.
(lib-modules): Remove error.
* hurd/hurdlookup.c (__hurd_file_name_lookup_retry): For "tty"
magic, return ENXIO if no ctty.
* sysdeps/mach/hurd/mmap.c: For MAP_FIXED, deallocate a previous
mapping if vm_map fails for that reason.
* posix/glob.c: Implement new options GLOB_ALTDIRFUNC, GLOB_BRACE,
GLOB_TILDE, GLOB_NOMAGIC.
(glob): Use stat instead of lstat to determine directoriness.
* posix/glob.h (GLOB_ALTDIRFUNC, GLOB_BRACE, GLOB_NOMAGIC, GLOB_TILDE):
New flag bits.
(__GLOB_FLAGS): Include them.
(glob_t): New members gl_closedir, gl_readdir, gl_opendir, gl_lstat,
gl_stat.
* elf/elf.h (ET_NUM, SHT_NUM, STB_NUM, STT_NUM, PT_NUM): New macros.
* sysdeps/unix/sysv/linux/sys/mman.h: Include <linux/mman.h> to
define all the bit values.
(MAP_*, MCL_*): Macros removed.
1995-12-09 10:00:22 +00:00
|
|
|
|
{
|
1996-12-02 04:00:15 +00:00
|
|
|
|
int success;
|
1998-07-29 12:34:57 +00:00
|
|
|
|
char *name;
|
2006-01-11 05:30:12 +00:00
|
|
|
|
size_t buflen = GET_LOGIN_NAME_MAX () + 1;
|
1996-12-02 04:00:15 +00:00
|
|
|
|
|
|
|
|
|
if (buflen == 0)
|
|
|
|
|
/* `sysconf' does not support _SC_LOGIN_NAME_MAX. Try
|
|
|
|
|
a moderate value. */
|
1998-07-29 12:34:57 +00:00
|
|
|
|
buflen = 20;
|
2011-05-23 03:04:16 +00:00
|
|
|
|
name = alloca_account (buflen, alloca_used);
|
1996-12-02 04:00:15 +00:00
|
|
|
|
|
2015-06-12 20:02:30 +00:00
|
|
|
|
success = __getlogin_r (name, buflen) == 0;
|
1996-12-02 04:00:15 +00:00
|
|
|
|
if (success)
|
Fri Dec 8 13:04:51 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* locale/error.c, locale/error.h: Files removed.
* locale/Makefile (distribute): Remove error.h.
(lib-modules): Remove error.
* hurd/hurdlookup.c (__hurd_file_name_lookup_retry): For "tty"
magic, return ENXIO if no ctty.
* sysdeps/mach/hurd/mmap.c: For MAP_FIXED, deallocate a previous
mapping if vm_map fails for that reason.
* posix/glob.c: Implement new options GLOB_ALTDIRFUNC, GLOB_BRACE,
GLOB_TILDE, GLOB_NOMAGIC.
(glob): Use stat instead of lstat to determine directoriness.
* posix/glob.h (GLOB_ALTDIRFUNC, GLOB_BRACE, GLOB_NOMAGIC, GLOB_TILDE):
New flag bits.
(__GLOB_FLAGS): Include them.
(glob_t): New members gl_closedir, gl_readdir, gl_opendir, gl_lstat,
gl_stat.
* elf/elf.h (ET_NUM, SHT_NUM, STB_NUM, STT_NUM, PT_NUM): New macros.
* sysdeps/unix/sysv/linux/sys/mman.h: Include <linux/mman.h> to
define all the bit values.
(MAP_*, MCL_*): Macros removed.
1995-12-09 10:00:22 +00:00
|
|
|
|
{
|
1998-07-29 12:34:57 +00:00
|
|
|
|
struct passwd *p;
|
1997-09-16 00:42:43 +00:00
|
|
|
|
# if defined HAVE_GETPWNAM_R || defined _LIBC
|
2006-01-11 05:30:12 +00:00
|
|
|
|
long int pwbuflen = GETPW_R_SIZE_MAX ();
|
1996-12-02 04:00:15 +00:00
|
|
|
|
char *pwtmpbuf;
|
1998-07-29 12:34:57 +00:00
|
|
|
|
struct passwd pwbuf;
|
2011-05-23 03:04:16 +00:00
|
|
|
|
int malloc_pwtmpbuf = 0;
|
1999-02-21 14:29:07 +00:00
|
|
|
|
int save = errno;
|
1996-12-02 04:00:15 +00:00
|
|
|
|
|
2003-01-17 01:02:24 +00:00
|
|
|
|
# ifndef _LIBC
|
1998-07-29 12:34:57 +00:00
|
|
|
|
if (pwbuflen == -1)
|
|
|
|
|
/* `sysconf' does not support _SC_GETPW_R_SIZE_MAX.
|
|
|
|
|
Try a moderate value. */
|
|
|
|
|
pwbuflen = 1024;
|
2003-01-17 01:02:24 +00:00
|
|
|
|
# endif
|
2011-05-23 03:04:16 +00:00
|
|
|
|
if (__libc_use_alloca (alloca_used + pwbuflen))
|
|
|
|
|
pwtmpbuf = alloca_account (pwbuflen, alloca_used);
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
pwtmpbuf = malloc (pwbuflen);
|
|
|
|
|
if (pwtmpbuf == NULL)
|
|
|
|
|
{
|
|
|
|
|
retval = GLOB_NOSPACE;
|
|
|
|
|
goto out;
|
|
|
|
|
}
|
|
|
|
|
malloc_pwtmpbuf = 1;
|
|
|
|
|
}
|
1996-12-02 04:00:15 +00:00
|
|
|
|
|
1999-06-28 12:43:04 +00:00
|
|
|
|
while (getpwnam_r (name, &pwbuf, pwtmpbuf, pwbuflen, &p)
|
|
|
|
|
!= 0)
|
1999-02-21 09:55:41 +00:00
|
|
|
|
{
|
|
|
|
|
if (errno != ERANGE)
|
|
|
|
|
{
|
1999-06-30 17:41:35 +00:00
|
|
|
|
p = NULL;
|
1999-02-21 09:55:41 +00:00
|
|
|
|
break;
|
|
|
|
|
}
|
2011-05-23 03:04:16 +00:00
|
|
|
|
|
|
|
|
|
if (!malloc_pwtmpbuf
|
|
|
|
|
&& __libc_use_alloca (alloca_used
|
|
|
|
|
+ 2 * pwbuflen))
|
|
|
|
|
pwtmpbuf = extend_alloca_account (pwtmpbuf, pwbuflen,
|
|
|
|
|
2 * pwbuflen,
|
|
|
|
|
alloca_used);
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
char *newp = realloc (malloc_pwtmpbuf
|
|
|
|
|
? pwtmpbuf : NULL,
|
2003-01-17 01:02:24 +00:00
|
|
|
|
2 * pwbuflen);
|
2011-05-23 03:04:16 +00:00
|
|
|
|
if (newp == NULL)
|
|
|
|
|
{
|
2014-02-10 13:45:42 +00:00
|
|
|
|
if (__glibc_unlikely (malloc_pwtmpbuf))
|
2011-05-23 03:04:16 +00:00
|
|
|
|
free (pwtmpbuf);
|
|
|
|
|
retval = GLOB_NOSPACE;
|
|
|
|
|
goto out;
|
|
|
|
|
}
|
|
|
|
|
pwtmpbuf = newp;
|
|
|
|
|
pwbuflen = 2 * pwbuflen;
|
|
|
|
|
malloc_pwtmpbuf = 1;
|
|
|
|
|
}
|
1999-02-21 14:29:07 +00:00
|
|
|
|
__set_errno (save);
|
1999-02-21 09:55:41 +00:00
|
|
|
|
}
|
1997-09-16 00:42:43 +00:00
|
|
|
|
# else
|
1998-07-29 12:34:57 +00:00
|
|
|
|
p = getpwnam (name);
|
1997-09-16 00:42:43 +00:00
|
|
|
|
# endif
|
1999-06-30 17:41:35 +00:00
|
|
|
|
if (p != NULL)
|
2011-05-23 03:04:16 +00:00
|
|
|
|
{
|
|
|
|
|
if (!malloc_pwtmpbuf)
|
|
|
|
|
home_dir = p->pw_dir;
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
size_t home_dir_len = strlen (p->pw_dir) + 1;
|
|
|
|
|
if (__libc_use_alloca (alloca_used + home_dir_len))
|
|
|
|
|
home_dir = alloca_account (home_dir_len,
|
|
|
|
|
alloca_used);
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
home_dir = malloc (home_dir_len);
|
|
|
|
|
if (home_dir == NULL)
|
|
|
|
|
{
|
|
|
|
|
free (pwtmpbuf);
|
|
|
|
|
retval = GLOB_NOSPACE;
|
|
|
|
|
goto out;
|
|
|
|
|
}
|
|
|
|
|
malloc_home_dir = 1;
|
|
|
|
|
}
|
|
|
|
|
memcpy (home_dir, p->pw_dir, home_dir_len);
|
|
|
|
|
|
|
|
|
|
free (pwtmpbuf);
|
|
|
|
|
}
|
|
|
|
|
}
|
Fri Dec 8 13:04:51 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* locale/error.c, locale/error.h: Files removed.
* locale/Makefile (distribute): Remove error.h.
(lib-modules): Remove error.
* hurd/hurdlookup.c (__hurd_file_name_lookup_retry): For "tty"
magic, return ENXIO if no ctty.
* sysdeps/mach/hurd/mmap.c: For MAP_FIXED, deallocate a previous
mapping if vm_map fails for that reason.
* posix/glob.c: Implement new options GLOB_ALTDIRFUNC, GLOB_BRACE,
GLOB_TILDE, GLOB_NOMAGIC.
(glob): Use stat instead of lstat to determine directoriness.
* posix/glob.h (GLOB_ALTDIRFUNC, GLOB_BRACE, GLOB_NOMAGIC, GLOB_TILDE):
New flag bits.
(__GLOB_FLAGS): Include them.
(glob_t): New members gl_closedir, gl_readdir, gl_opendir, gl_lstat,
gl_stat.
* elf/elf.h (ET_NUM, SHT_NUM, STB_NUM, STT_NUM, PT_NUM): New macros.
* sysdeps/unix/sysv/linux/sys/mman.h: Include <linux/mman.h> to
define all the bit values.
(MAP_*, MCL_*): Macros removed.
1995-12-09 10:00:22 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
1997-03-21 20:00:48 +00:00
|
|
|
|
if (home_dir == NULL || home_dir[0] == '\0')
|
1998-09-09 11:53:19 +00:00
|
|
|
|
{
|
|
|
|
|
if (flags & GLOB_TILDE_CHECK)
|
2011-05-23 03:04:16 +00:00
|
|
|
|
{
|
2014-02-10 13:45:42 +00:00
|
|
|
|
if (__glibc_unlikely (malloc_home_dir))
|
2011-05-23 03:04:16 +00:00
|
|
|
|
free (home_dir);
|
|
|
|
|
retval = GLOB_NOMATCH;
|
|
|
|
|
goto out;
|
|
|
|
|
}
|
1998-09-09 11:53:19 +00:00
|
|
|
|
else
|
2011-05-23 03:04:16 +00:00
|
|
|
|
home_dir = (char *) "~"; /* No luck. */
|
1998-09-09 11:53:19 +00:00
|
|
|
|
}
|
1997-09-16 00:42:43 +00:00
|
|
|
|
# endif /* WINDOWS32 */
|
|
|
|
|
# endif
|
1997-03-21 20:00:48 +00:00
|
|
|
|
/* Now construct the full directory. */
|
|
|
|
|
if (dirname[1] == '\0')
|
2007-02-14 19:52:38 +00:00
|
|
|
|
{
|
2014-02-10 13:45:42 +00:00
|
|
|
|
if (__glibc_unlikely (malloc_dirname))
|
2011-05-23 03:04:16 +00:00
|
|
|
|
free (dirname);
|
|
|
|
|
|
2007-02-14 19:52:38 +00:00
|
|
|
|
dirname = home_dir;
|
|
|
|
|
dirlen = strlen (dirname);
|
2011-05-23 03:04:16 +00:00
|
|
|
|
malloc_dirname = malloc_home_dir;
|
2007-02-14 19:52:38 +00:00
|
|
|
|
}
|
1997-03-21 20:00:48 +00:00
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
char *newp;
|
|
|
|
|
size_t home_len = strlen (home_dir);
|
2011-05-23 03:04:16 +00:00
|
|
|
|
int use_alloca = __libc_use_alloca (alloca_used
|
|
|
|
|
+ home_len + dirlen);
|
|
|
|
|
if (use_alloca)
|
|
|
|
|
newp = alloca_account (home_len + dirlen, alloca_used);
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
newp = malloc (home_len + dirlen);
|
|
|
|
|
if (newp == NULL)
|
|
|
|
|
{
|
2014-02-10 13:45:42 +00:00
|
|
|
|
if (__glibc_unlikely (malloc_home_dir))
|
2011-05-23 03:04:16 +00:00
|
|
|
|
free (home_dir);
|
|
|
|
|
retval = GLOB_NOSPACE;
|
|
|
|
|
goto out;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
Update.
1997-10-29 21:20 Ulrich Drepper <drepper@cygnus.com>
* libio/strops.c (_IO_str_seekoff): If mode is zero and the read/write
pointers are tied set mode according to current stream mode.
* include/features.h [_GNU_SOURCE] (_POSIX_C_SOURCE): Define to
199506L.
Define _XOPEN_SOURCE to 500 if _POSIX_C_SOURCE is defined.
* manual/creature.texi: Describe this.
* manual/socket.texi: Describe connect, accept, send, sendmsg, sendto,
recv, recvfrom, and recvmsg as cancelation points.
* sysdeps/unix/inet/syscalls.list: Add __libc_* names for these
functions.
1997-10-17 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* Make-dist (try-sysdeps): Don't look for stub files anymore.
* manual/maint.texi (Porting): Remove another reference to stub
directory.
* sysdeps/unix/bsd/sun/sethostid.c: Include stub version from
generic subdir.
* sysdeps/unix/sysv/irix4/reboot.c: Likewise.
* sysdeps/unix/sysv/irix4/swapon.c: Likewise
1997-10-29 03:54 Ulrich Drepper <drepper@cygnus.com>
* resolv/nss_dns/dns-host.c: Change variable pointed to by h_errnop
in all error cases (PR 244).
1997-10-29 00:56 Ulrich Drepper <drepper@cygnus.com>
* posix/glob.c: Fix handling of expressions like "*/" (PR 325).
Optimize by using mempcpy.
1997-10-17 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* po/Makefile ($(mo-installed)): Don't fail during installation if
files don't exist (might happen if msgfmt doesn't exist) (PR 328).
Suggested by Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>.
1997-10-24 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* sysdeps/generic/bits/errno.h (ENOMSG): Define it.
Pointed out by Klaus Espenlaub
<kespenla@hydra.informatik.uni-ulm.de> (PR libc/259).
1997-10-28 17:40 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/libm-ieee754/s_cbrt.c: Testing the returned exponent for
zero isn't enough to determine illegal arguments.
* sysdeps/libm-ieee754/s_cbrtf.c: Likewise.
* sysdeps/libm-ieee754/s_cbrtl.c: Likewise.
1997-10-28 17:14 Ulrich Drepper <drepper@cygnus.com>
* manual/filesys.texi (S_ISVTX): Describe that it is available with
_BSD_SOURCE only.
Reported by Jochen Hein <jochen.hein@delphi.central.de>.
1997-10-28 04:26 Ulrich Drepper <drepper@cygnus.com>
* time/tzfile.c (__tzfile_compute): Use negated value of offset for
timezone variable.
* time/tzset.c (tz_compute): Likewise.
Reported by Erik Troan <ewt@redhat.com>.
1997-10-28 02:51 Ulrich Drepper <drepper@cygnus.com>
* manual/filesys.texi: Correct prototype in readdir_r description.
Reported by Jim Meyering <meyering@eng.ascend.com>.
1997-10-27 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* math/libm-test.c (cbrt_test): Add test for cbrt(0.970299).
1997-10-26 19:39 Zack Weinberg <zack@rabi.phys.columbia.edu>
* stdlib/l64a.c: Produce a useful result for n < 0.
* stdlib/a64l.c: Use unsigned type for working variable.
* manual/string.texi (general): Grammar, typo, overfull fixes.
(strlen): Insert warning about sizeof(char *).
(a64l, l64a): Make documentation agree with implementation.
* libio/iofdopen.c: Use _IO_FILE_complete, not _IO_FILE_plus.
* posix/unistd.h: Add prototypes for __pread, __pread64, __pwrite
1997-10-29 20:33:40 +00:00
|
|
|
|
mempcpy (mempcpy (newp, home_dir, home_len),
|
|
|
|
|
&dirname[1], dirlen);
|
2011-05-23 03:04:16 +00:00
|
|
|
|
|
2014-02-10 13:45:42 +00:00
|
|
|
|
if (__glibc_unlikely (malloc_dirname))
|
2011-05-23 03:04:16 +00:00
|
|
|
|
free (dirname);
|
|
|
|
|
|
1997-03-21 20:00:48 +00:00
|
|
|
|
dirname = newp;
|
2007-02-14 19:52:38 +00:00
|
|
|
|
dirlen += home_len - 1;
|
2011-05-23 03:04:16 +00:00
|
|
|
|
malloc_dirname = !use_alloca;
|
1997-03-21 20:00:48 +00:00
|
|
|
|
}
|
2007-02-14 19:52:38 +00:00
|
|
|
|
dirname_modified = 1;
|
Fri Dec 8 13:04:51 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* locale/error.c, locale/error.h: Files removed.
* locale/Makefile (distribute): Remove error.h.
(lib-modules): Remove error.
* hurd/hurdlookup.c (__hurd_file_name_lookup_retry): For "tty"
magic, return ENXIO if no ctty.
* sysdeps/mach/hurd/mmap.c: For MAP_FIXED, deallocate a previous
mapping if vm_map fails for that reason.
* posix/glob.c: Implement new options GLOB_ALTDIRFUNC, GLOB_BRACE,
GLOB_TILDE, GLOB_NOMAGIC.
(glob): Use stat instead of lstat to determine directoriness.
* posix/glob.h (GLOB_ALTDIRFUNC, GLOB_BRACE, GLOB_NOMAGIC, GLOB_TILDE):
New flag bits.
(__GLOB_FLAGS): Include them.
(glob_t): New members gl_closedir, gl_readdir, gl_opendir, gl_lstat,
gl_stat.
* elf/elf.h (ET_NUM, SHT_NUM, STB_NUM, STT_NUM, PT_NUM): New macros.
* sysdeps/unix/sysv/linux/sys/mman.h: Include <linux/mman.h> to
define all the bit values.
(MAP_*, MCL_*): Macros removed.
1995-12-09 10:00:22 +00:00
|
|
|
|
}
|
1997-09-16 00:42:43 +00:00
|
|
|
|
# if !defined _AMIGA && !defined WINDOWS32
|
Fri Dec 8 13:04:51 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* locale/error.c, locale/error.h: Files removed.
* locale/Makefile (distribute): Remove error.h.
(lib-modules): Remove error.
* hurd/hurdlookup.c (__hurd_file_name_lookup_retry): For "tty"
magic, return ENXIO if no ctty.
* sysdeps/mach/hurd/mmap.c: For MAP_FIXED, deallocate a previous
mapping if vm_map fails for that reason.
* posix/glob.c: Implement new options GLOB_ALTDIRFUNC, GLOB_BRACE,
GLOB_TILDE, GLOB_NOMAGIC.
(glob): Use stat instead of lstat to determine directoriness.
* posix/glob.h (GLOB_ALTDIRFUNC, GLOB_BRACE, GLOB_NOMAGIC, GLOB_TILDE):
New flag bits.
(__GLOB_FLAGS): Include them.
(glob_t): New members gl_closedir, gl_readdir, gl_opendir, gl_lstat,
gl_stat.
* elf/elf.h (ET_NUM, SHT_NUM, STB_NUM, STT_NUM, PT_NUM): New macros.
* sysdeps/unix/sysv/linux/sys/mman.h: Include <linux/mman.h> to
define all the bit values.
(MAP_*, MCL_*): Macros removed.
1995-12-09 10:00:22 +00:00
|
|
|
|
else
|
|
|
|
|
{
|
1997-03-21 20:00:48 +00:00
|
|
|
|
char *end_name = strchr (dirname, '/');
|
2011-05-23 03:04:16 +00:00
|
|
|
|
char *user_name;
|
|
|
|
|
int malloc_user_name = 0;
|
2007-02-14 19:52:38 +00:00
|
|
|
|
char *unescape = NULL;
|
1997-03-21 20:00:48 +00:00
|
|
|
|
|
2007-02-14 19:52:38 +00:00
|
|
|
|
if (!(flags & GLOB_NOESCAPE))
|
|
|
|
|
{
|
|
|
|
|
if (end_name == NULL)
|
|
|
|
|
{
|
|
|
|
|
unescape = strchr (dirname, '\\');
|
|
|
|
|
if (unescape)
|
|
|
|
|
end_name = strchr (unescape, '\0');
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
unescape = memchr (dirname, '\\', end_name - dirname);
|
|
|
|
|
}
|
1997-03-21 20:00:48 +00:00
|
|
|
|
if (end_name == NULL)
|
|
|
|
|
user_name = dirname + 1;
|
|
|
|
|
else
|
|
|
|
|
{
|
1998-07-29 12:34:57 +00:00
|
|
|
|
char *newp;
|
2011-05-23 03:04:16 +00:00
|
|
|
|
if (__libc_use_alloca (alloca_used + (end_name - dirname)))
|
|
|
|
|
newp = alloca_account (end_name - dirname, alloca_used);
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
newp = malloc (end_name - dirname);
|
|
|
|
|
if (newp == NULL)
|
|
|
|
|
{
|
|
|
|
|
retval = GLOB_NOSPACE;
|
|
|
|
|
goto out;
|
|
|
|
|
}
|
|
|
|
|
malloc_user_name = 1;
|
|
|
|
|
}
|
2007-02-14 19:52:38 +00:00
|
|
|
|
if (unescape != NULL)
|
|
|
|
|
{
|
|
|
|
|
char *p = mempcpy (newp, dirname + 1,
|
|
|
|
|
unescape - dirname - 1);
|
|
|
|
|
char *q = unescape;
|
|
|
|
|
while (*q != '\0')
|
|
|
|
|
{
|
|
|
|
|
if (*q == '\\')
|
|
|
|
|
{
|
|
|
|
|
if (q[1] == '\0')
|
|
|
|
|
{
|
|
|
|
|
/* "~fo\\o\\" unescape to user_name "foo\\",
|
|
|
|
|
but "~fo\\o\\/" unescape to user_name
|
|
|
|
|
"foo". */
|
|
|
|
|
if (filename == NULL)
|
|
|
|
|
*p++ = '\\';
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
++q;
|
|
|
|
|
}
|
|
|
|
|
*p++ = *q++;
|
|
|
|
|
}
|
|
|
|
|
*p = '\0';
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
*((char *) mempcpy (newp, dirname + 1, end_name - dirname))
|
|
|
|
|
= '\0';
|
1998-07-29 12:34:57 +00:00
|
|
|
|
user_name = newp;
|
1997-03-21 20:00:48 +00:00
|
|
|
|
}
|
|
|
|
|
|
Fri Dec 8 13:04:51 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* locale/error.c, locale/error.h: Files removed.
* locale/Makefile (distribute): Remove error.h.
(lib-modules): Remove error.
* hurd/hurdlookup.c (__hurd_file_name_lookup_retry): For "tty"
magic, return ENXIO if no ctty.
* sysdeps/mach/hurd/mmap.c: For MAP_FIXED, deallocate a previous
mapping if vm_map fails for that reason.
* posix/glob.c: Implement new options GLOB_ALTDIRFUNC, GLOB_BRACE,
GLOB_TILDE, GLOB_NOMAGIC.
(glob): Use stat instead of lstat to determine directoriness.
* posix/glob.h (GLOB_ALTDIRFUNC, GLOB_BRACE, GLOB_NOMAGIC, GLOB_TILDE):
New flag bits.
(__GLOB_FLAGS): Include them.
(glob_t): New members gl_closedir, gl_readdir, gl_opendir, gl_lstat,
gl_stat.
* elf/elf.h (ET_NUM, SHT_NUM, STB_NUM, STT_NUM, PT_NUM): New macros.
* sysdeps/unix/sysv/linux/sys/mman.h: Include <linux/mman.h> to
define all the bit values.
(MAP_*, MCL_*): Macros removed.
1995-12-09 10:00:22 +00:00
|
|
|
|
/* Look up specific user's home directory. */
|
1997-03-21 20:00:48 +00:00
|
|
|
|
{
|
1998-07-29 12:34:57 +00:00
|
|
|
|
struct passwd *p;
|
1997-09-16 00:42:43 +00:00
|
|
|
|
# if defined HAVE_GETPWNAM_R || defined _LIBC
|
2006-01-11 05:30:12 +00:00
|
|
|
|
long int buflen = GETPW_R_SIZE_MAX ();
|
1998-07-29 12:34:57 +00:00
|
|
|
|
char *pwtmpbuf;
|
2011-05-23 03:04:16 +00:00
|
|
|
|
int malloc_pwtmpbuf = 0;
|
1998-07-29 12:34:57 +00:00
|
|
|
|
struct passwd pwbuf;
|
1999-02-21 14:29:07 +00:00
|
|
|
|
int save = errno;
|
1998-07-29 12:34:57 +00:00
|
|
|
|
|
2003-01-17 01:02:24 +00:00
|
|
|
|
# ifndef _LIBC
|
1998-07-29 12:34:57 +00:00
|
|
|
|
if (buflen == -1)
|
|
|
|
|
/* `sysconf' does not support _SC_GETPW_R_SIZE_MAX. Try a
|
|
|
|
|
moderate value. */
|
|
|
|
|
buflen = 1024;
|
2003-01-17 01:02:24 +00:00
|
|
|
|
# endif
|
2011-05-23 03:04:16 +00:00
|
|
|
|
if (__libc_use_alloca (alloca_used + buflen))
|
|
|
|
|
pwtmpbuf = alloca_account (buflen, alloca_used);
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
pwtmpbuf = malloc (buflen);
|
|
|
|
|
if (pwtmpbuf == NULL)
|
|
|
|
|
{
|
|
|
|
|
nomem_getpw:
|
2014-02-10 13:45:42 +00:00
|
|
|
|
if (__glibc_unlikely (malloc_user_name))
|
2011-05-23 03:04:16 +00:00
|
|
|
|
free (user_name);
|
|
|
|
|
retval = GLOB_NOSPACE;
|
|
|
|
|
goto out;
|
|
|
|
|
}
|
|
|
|
|
malloc_pwtmpbuf = 1;
|
|
|
|
|
}
|
1998-07-29 12:34:57 +00:00
|
|
|
|
|
1999-06-28 12:43:04 +00:00
|
|
|
|
while (getpwnam_r (user_name, &pwbuf, pwtmpbuf, buflen, &p) != 0)
|
1999-02-21 09:55:41 +00:00
|
|
|
|
{
|
|
|
|
|
if (errno != ERANGE)
|
|
|
|
|
{
|
|
|
|
|
p = NULL;
|
|
|
|
|
break;
|
|
|
|
|
}
|
2011-05-23 03:04:16 +00:00
|
|
|
|
if (!malloc_pwtmpbuf
|
|
|
|
|
&& __libc_use_alloca (alloca_used + 2 * buflen))
|
|
|
|
|
pwtmpbuf = extend_alloca_account (pwtmpbuf, buflen,
|
|
|
|
|
2 * buflen, alloca_used);
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
char *newp = realloc (malloc_pwtmpbuf ? pwtmpbuf : NULL,
|
|
|
|
|
2 * buflen);
|
|
|
|
|
if (newp == NULL)
|
|
|
|
|
{
|
2014-02-10 13:45:42 +00:00
|
|
|
|
if (__glibc_unlikely (malloc_pwtmpbuf))
|
2011-05-23 03:04:16 +00:00
|
|
|
|
free (pwtmpbuf);
|
|
|
|
|
goto nomem_getpw;
|
|
|
|
|
}
|
|
|
|
|
pwtmpbuf = newp;
|
|
|
|
|
malloc_pwtmpbuf = 1;
|
|
|
|
|
}
|
1999-02-21 14:29:07 +00:00
|
|
|
|
__set_errno (save);
|
1999-02-21 09:55:41 +00:00
|
|
|
|
}
|
1997-09-16 00:42:43 +00:00
|
|
|
|
# else
|
1998-07-29 12:34:57 +00:00
|
|
|
|
p = getpwnam (user_name);
|
1999-02-21 09:55:41 +00:00
|
|
|
|
# endif
|
2011-05-23 03:04:16 +00:00
|
|
|
|
|
2014-02-10 13:45:42 +00:00
|
|
|
|
if (__glibc_unlikely (malloc_user_name))
|
2011-05-23 03:04:16 +00:00
|
|
|
|
free (user_name);
|
|
|
|
|
|
|
|
|
|
/* If we found a home directory use this. */
|
1997-03-21 20:00:48 +00:00
|
|
|
|
if (p != NULL)
|
2011-05-23 03:04:16 +00:00
|
|
|
|
{
|
|
|
|
|
size_t home_len = strlen (p->pw_dir);
|
|
|
|
|
size_t rest_len = end_name == NULL ? 0 : strlen (end_name);
|
|
|
|
|
|
2014-02-10 13:45:42 +00:00
|
|
|
|
if (__glibc_unlikely (malloc_dirname))
|
2011-05-23 03:04:16 +00:00
|
|
|
|
free (dirname);
|
|
|
|
|
malloc_dirname = 0;
|
|
|
|
|
|
|
|
|
|
if (__libc_use_alloca (alloca_used + home_len + rest_len + 1))
|
|
|
|
|
dirname = alloca_account (home_len + rest_len + 1,
|
|
|
|
|
alloca_used);
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
dirname = malloc (home_len + rest_len + 1);
|
|
|
|
|
if (dirname == NULL)
|
|
|
|
|
{
|
2014-02-10 13:45:42 +00:00
|
|
|
|
if (__glibc_unlikely (malloc_pwtmpbuf))
|
2011-05-23 03:04:16 +00:00
|
|
|
|
free (pwtmpbuf);
|
|
|
|
|
retval = GLOB_NOSPACE;
|
|
|
|
|
goto out;
|
|
|
|
|
}
|
|
|
|
|
malloc_dirname = 1;
|
|
|
|
|
}
|
|
|
|
|
*((char *) mempcpy (mempcpy (dirname, p->pw_dir, home_len),
|
|
|
|
|
end_name, rest_len)) = '\0';
|
|
|
|
|
|
|
|
|
|
dirlen = home_len + rest_len;
|
|
|
|
|
dirname_modified = 1;
|
|
|
|
|
|
2014-02-10 13:45:42 +00:00
|
|
|
|
if (__glibc_unlikely (malloc_pwtmpbuf))
|
2011-05-23 03:04:16 +00:00
|
|
|
|
free (pwtmpbuf);
|
|
|
|
|
}
|
1997-03-21 20:00:48 +00:00
|
|
|
|
else
|
2011-05-23 03:04:16 +00:00
|
|
|
|
{
|
2014-02-10 13:45:42 +00:00
|
|
|
|
if (__glibc_unlikely (malloc_pwtmpbuf))
|
2011-05-23 03:04:16 +00:00
|
|
|
|
free (pwtmpbuf);
|
|
|
|
|
|
|
|
|
|
if (flags & GLOB_TILDE_CHECK)
|
|
|
|
|
/* We have to regard it as an error if we cannot find the
|
|
|
|
|
home directory. */
|
|
|
|
|
return GLOB_NOMATCH;
|
|
|
|
|
}
|
1997-03-21 20:00:48 +00:00
|
|
|
|
}
|
Fri Dec 8 13:04:51 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* locale/error.c, locale/error.h: Files removed.
* locale/Makefile (distribute): Remove error.h.
(lib-modules): Remove error.
* hurd/hurdlookup.c (__hurd_file_name_lookup_retry): For "tty"
magic, return ENXIO if no ctty.
* sysdeps/mach/hurd/mmap.c: For MAP_FIXED, deallocate a previous
mapping if vm_map fails for that reason.
* posix/glob.c: Implement new options GLOB_ALTDIRFUNC, GLOB_BRACE,
GLOB_TILDE, GLOB_NOMAGIC.
(glob): Use stat instead of lstat to determine directoriness.
* posix/glob.h (GLOB_ALTDIRFUNC, GLOB_BRACE, GLOB_NOMAGIC, GLOB_TILDE):
New flag bits.
(__GLOB_FLAGS): Include them.
(glob_t): New members gl_closedir, gl_readdir, gl_opendir, gl_lstat,
gl_stat.
* elf/elf.h (ET_NUM, SHT_NUM, STB_NUM, STT_NUM, PT_NUM): New macros.
* sysdeps/unix/sysv/linux/sys/mman.h: Include <linux/mman.h> to
define all the bit values.
(MAP_*, MCL_*): Macros removed.
1995-12-09 10:00:22 +00:00
|
|
|
|
}
|
1997-09-16 00:42:43 +00:00
|
|
|
|
# endif /* Not Amiga && not WINDOWS32. */
|
Fri Dec 8 13:04:51 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* locale/error.c, locale/error.h: Files removed.
* locale/Makefile (distribute): Remove error.h.
(lib-modules): Remove error.
* hurd/hurdlookup.c (__hurd_file_name_lookup_retry): For "tty"
magic, return ENXIO if no ctty.
* sysdeps/mach/hurd/mmap.c: For MAP_FIXED, deallocate a previous
mapping if vm_map fails for that reason.
* posix/glob.c: Implement new options GLOB_ALTDIRFUNC, GLOB_BRACE,
GLOB_TILDE, GLOB_NOMAGIC.
(glob): Use stat instead of lstat to determine directoriness.
* posix/glob.h (GLOB_ALTDIRFUNC, GLOB_BRACE, GLOB_NOMAGIC, GLOB_TILDE):
New flag bits.
(__GLOB_FLAGS): Include them.
(glob_t): New members gl_closedir, gl_readdir, gl_opendir, gl_lstat,
gl_stat.
* elf/elf.h (ET_NUM, SHT_NUM, STB_NUM, STT_NUM, PT_NUM): New macros.
* sysdeps/unix/sysv/linux/sys/mman.h: Include <linux/mman.h> to
define all the bit values.
(MAP_*, MCL_*): Macros removed.
1995-12-09 10:00:22 +00:00
|
|
|
|
}
|
1996-05-22 21:28:03 +00:00
|
|
|
|
#endif /* Not VMS. */
|
Fri Dec 8 13:04:51 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* locale/error.c, locale/error.h: Files removed.
* locale/Makefile (distribute): Remove error.h.
(lib-modules): Remove error.
* hurd/hurdlookup.c (__hurd_file_name_lookup_retry): For "tty"
magic, return ENXIO if no ctty.
* sysdeps/mach/hurd/mmap.c: For MAP_FIXED, deallocate a previous
mapping if vm_map fails for that reason.
* posix/glob.c: Implement new options GLOB_ALTDIRFUNC, GLOB_BRACE,
GLOB_TILDE, GLOB_NOMAGIC.
(glob): Use stat instead of lstat to determine directoriness.
* posix/glob.h (GLOB_ALTDIRFUNC, GLOB_BRACE, GLOB_NOMAGIC, GLOB_TILDE):
New flag bits.
(__GLOB_FLAGS): Include them.
(glob_t): New members gl_closedir, gl_readdir, gl_opendir, gl_lstat,
gl_stat.
* elf/elf.h (ET_NUM, SHT_NUM, STB_NUM, STT_NUM, PT_NUM): New macros.
* sysdeps/unix/sysv/linux/sys/mman.h: Include <linux/mman.h> to
define all the bit values.
(MAP_*, MCL_*): Macros removed.
1995-12-09 10:00:22 +00:00
|
|
|
|
|
1998-07-27 22:28:11 +00:00
|
|
|
|
/* Now test whether we looked for "~" or "~NAME". In this case we
|
|
|
|
|
can give the answer now. */
|
|
|
|
|
if (filename == NULL)
|
|
|
|
|
{
|
|
|
|
|
struct stat st;
|
2006-01-11 05:30:12 +00:00
|
|
|
|
struct_stat64 st64;
|
1998-07-27 22:28:11 +00:00
|
|
|
|
|
|
|
|
|
/* Return the directory if we don't check for error or if it exists. */
|
|
|
|
|
if ((flags & GLOB_NOCHECK)
|
2007-10-15 04:22:46 +00:00
|
|
|
|
|| (((__builtin_expect (flags & GLOB_ALTDIRFUNC, 0))
|
2000-03-20 00:46:01 +00:00
|
|
|
|
? ((*pglob->gl_stat) (dirname, &st) == 0
|
|
|
|
|
&& S_ISDIR (st.st_mode))
|
|
|
|
|
: (__stat64 (dirname, &st64) == 0 && S_ISDIR (st64.st_mode)))))
|
1998-07-27 22:28:11 +00:00
|
|
|
|
{
|
2012-09-25 19:38:15 +00:00
|
|
|
|
size_t newcount = pglob->gl_pathc + pglob->gl_offs;
|
2001-12-29 15:57:15 +00:00
|
|
|
|
char **new_gl_pathv;
|
2000-03-20 00:46:01 +00:00
|
|
|
|
|
2011-07-21 02:53:58 +00:00
|
|
|
|
if (newcount > UINTPTR_MAX - (1 + 1)
|
|
|
|
|
|| newcount + 1 + 1 > ~((size_t) 0) / sizeof (char *))
|
2001-12-29 15:57:15 +00:00
|
|
|
|
{
|
|
|
|
|
nospace:
|
|
|
|
|
free (pglob->gl_pathv);
|
|
|
|
|
pglob->gl_pathv = NULL;
|
|
|
|
|
pglob->gl_pathc = 0;
|
|
|
|
|
return GLOB_NOSPACE;
|
|
|
|
|
}
|
2011-07-21 02:53:58 +00:00
|
|
|
|
|
|
|
|
|
new_gl_pathv
|
|
|
|
|
= (char **) realloc (pglob->gl_pathv,
|
|
|
|
|
(newcount + 1 + 1) * sizeof (char *));
|
|
|
|
|
if (new_gl_pathv == NULL)
|
|
|
|
|
goto nospace;
|
2001-12-29 15:57:15 +00:00
|
|
|
|
pglob->gl_pathv = new_gl_pathv;
|
1998-07-27 22:28:11 +00:00
|
|
|
|
|
2007-02-14 19:52:38 +00:00
|
|
|
|
if (flags & GLOB_MARK)
|
|
|
|
|
{
|
|
|
|
|
char *p;
|
|
|
|
|
pglob->gl_pathv[newcount] = malloc (dirlen + 2);
|
|
|
|
|
if (pglob->gl_pathv[newcount] == NULL)
|
|
|
|
|
goto nospace;
|
|
|
|
|
p = mempcpy (pglob->gl_pathv[newcount], dirname, dirlen);
|
|
|
|
|
p[0] = '/';
|
|
|
|
|
p[1] = '\0';
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
pglob->gl_pathv[newcount] = strdup (dirname);
|
|
|
|
|
if (pglob->gl_pathv[newcount] == NULL)
|
|
|
|
|
goto nospace;
|
|
|
|
|
}
|
2000-03-20 00:46:01 +00:00
|
|
|
|
pglob->gl_pathv[++newcount] = NULL;
|
|
|
|
|
++pglob->gl_pathc;
|
1998-07-27 22:28:11 +00:00
|
|
|
|
pglob->gl_flags = flags;
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Not found. */
|
|
|
|
|
return GLOB_NOMATCH;
|
|
|
|
|
}
|
|
|
|
|
|
2007-02-14 19:52:38 +00:00
|
|
|
|
meta = __glob_pattern_type (dirname, !(flags & GLOB_NOESCAPE));
|
|
|
|
|
/* meta is 1 if correct glob pattern containing metacharacters.
|
|
|
|
|
If meta has bit (1 << 2) set, it means there was an unterminated
|
|
|
|
|
[ which we handle the same, using fnmatch. Broken unterminated
|
|
|
|
|
pattern bracket expressions ought to be rare enough that it is
|
|
|
|
|
not worth special casing them, fnmatch will do the right thing. */
|
|
|
|
|
if (meta & 5)
|
1995-02-18 01:27:10 +00:00
|
|
|
|
{
|
|
|
|
|
/* The directory name contains metacharacters, so we
|
|
|
|
|
have to glob for the directory, and then glob for
|
|
|
|
|
the pattern in each directory found. */
|
2000-12-02 08:18:55 +00:00
|
|
|
|
size_t i;
|
1995-02-18 01:27:10 +00:00
|
|
|
|
|
2007-02-14 19:52:38 +00:00
|
|
|
|
if (!(flags & GLOB_NOESCAPE) && dirlen > 0 && dirname[dirlen - 1] == '\\')
|
|
|
|
|
{
|
|
|
|
|
/* "foo\\/bar". Remove the final backslash from dirname
|
|
|
|
|
if it has not been quoted. */
|
|
|
|
|
char *p = (char *) &dirname[dirlen - 1];
|
|
|
|
|
|
|
|
|
|
while (p > dirname && p[-1] == '\\') --p;
|
|
|
|
|
if ((&dirname[dirlen] - p) & 1)
|
|
|
|
|
*(char *) &dirname[--dirlen] = '\0';
|
|
|
|
|
}
|
|
|
|
|
|
2014-02-10 13:45:42 +00:00
|
|
|
|
if (__glibc_unlikely ((flags & GLOB_ALTDIRFUNC) != 0))
|
Update.
1999-12-23 Ulrich Drepper <drepper@cygnus.com>
* locale/programs/ld-monetary.c (monetary_finish): Add cast to
prevent warning.
* locale/programs/ld-collate.c: Implement writing out multibyte
collation data.
* locale/setlocale.c (setlocale): Allow setting LC_COLLATE again.
* locale/localeinfo.h: Declare variables only for currently implemented
collate functionality. Remove FORWARD_CHAR and ELLIPSIS_CHAR.
* locale/lc-collate.c: Define variables only for currently implemented
functionality.
* locale/langinfo.h: Define symbols only for currently implemented
functionality.
* locale/categories.def: Define elements for currently implemented
functionality.
* locale/C-collate.c: Comment out definitions of arrays with symbol
name definitions etc.
(_nl_C_LC_COLLATE): Update for currently defined information.
* intl/libintl.h: Remove dcgettext macro definition.
* intl/gettextP.h: Declare _nl_msg_cat_cntr.
* locale/iso-4217.def: Add NAD. Remove a few obsolete entries.
* sysdeps/generic/glob.c (glob): Pass alternate file access functions
also in recursive call. Patch by Joe Orton <joe@orton.demon.co.uk>.
1999-12-22 Jakub Jelinek <jakub@redhat.com>
* sysdeps/sparc/fpu/ftestexcept.c (fetestexcept): Use proper type
for __fenv_stfsr argument.
* sysdeps/unix/sysv/linux/sparc/sparc32/syscalls.list: Add
truncate64, ftruncate64, fstat64, lstat64, stat64 and mmap2.
Remove ugetrlimit.
* sysdeps/unix/sysv/linux/sparc/sparc32/mmap64.c: New file.
* sysdeps/unix/sysv/linux/sparc/sparc64/kernel_stat.h
(XSTAT_IS_XSTAT64): Define.
* sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list: Add
__libc_lseek64, __libc_pread, __libc_pread64, __libc_pwrite
and __libc_pwrite64.
Remove oldgetrlimit and oldsetrlimit.
* sysdeps/unix/sysv/linux/sparc/sparc64/fxstat64.c: New file.
* sysdeps/unix/sysv/linux/sparc/sparc64/lxstat64.c: New file.
* sysdeps/unix/sysv/linux/sparc/sparc64/xstat64.c: New file.
* sysdeps/unix/sysv/linux/fxstat64.c (__fxstat64): Pass the buf
pointer to the syscall, not address of that pointer.
* sysdeps/unix/sysv/linux/lxstat64.c (__lxstat64): Likewise.
* sysdeps/unix/sysv/linux/xstat64.c (__xstat64): Likewise.
(__syscall_stat64): Provide proper prototype.
* sysdeps/unix/sysv/linux/ftruncate64.c (ftruncate64): Share
has_no_truncate64 between truncate64 and ftruncate64.
* sysdeps/unix/sysv/linux/truncate64.c (truncate64): Likewise.
* sysdeps/unix/sysv/linux/kernel-features.h
(__ASSUME_TRUNCATE64_SYSCALL, __ASSUME_MMAP2_SYSCALL,
__ASSUME_STAT64_SYSCALL): Define on Sparc for kernels >= 2.3.35.
1999-12-22 Andreas Jaeger <aj@suse.de>
* sysdeps/unix/sysv/linux/alpha/syscalls.list: Add __libc_lseek64,
__libc_pread, __libc_pread64, __libc_pwrite and __libc_pwrite64.
1999-12-24 05:55:50 +00:00
|
|
|
|
{
|
|
|
|
|
/* Use the alternative access functions also in the recursive
|
|
|
|
|
call. */
|
|
|
|
|
dirs.gl_opendir = pglob->gl_opendir;
|
|
|
|
|
dirs.gl_readdir = pglob->gl_readdir;
|
|
|
|
|
dirs.gl_closedir = pglob->gl_closedir;
|
|
|
|
|
dirs.gl_stat = pglob->gl_stat;
|
|
|
|
|
dirs.gl_lstat = pglob->gl_lstat;
|
|
|
|
|
}
|
|
|
|
|
|
1995-02-18 01:27:10 +00:00
|
|
|
|
status = glob (dirname,
|
2007-02-14 19:52:38 +00:00
|
|
|
|
((flags & (GLOB_ERR | GLOB_NOESCAPE
|
Update.
1999-12-23 Ulrich Drepper <drepper@cygnus.com>
* locale/programs/ld-monetary.c (monetary_finish): Add cast to
prevent warning.
* locale/programs/ld-collate.c: Implement writing out multibyte
collation data.
* locale/setlocale.c (setlocale): Allow setting LC_COLLATE again.
* locale/localeinfo.h: Declare variables only for currently implemented
collate functionality. Remove FORWARD_CHAR and ELLIPSIS_CHAR.
* locale/lc-collate.c: Define variables only for currently implemented
functionality.
* locale/langinfo.h: Define symbols only for currently implemented
functionality.
* locale/categories.def: Define elements for currently implemented
functionality.
* locale/C-collate.c: Comment out definitions of arrays with symbol
name definitions etc.
(_nl_C_LC_COLLATE): Update for currently defined information.
* intl/libintl.h: Remove dcgettext macro definition.
* intl/gettextP.h: Declare _nl_msg_cat_cntr.
* locale/iso-4217.def: Add NAD. Remove a few obsolete entries.
* sysdeps/generic/glob.c (glob): Pass alternate file access functions
also in recursive call. Patch by Joe Orton <joe@orton.demon.co.uk>.
1999-12-22 Jakub Jelinek <jakub@redhat.com>
* sysdeps/sparc/fpu/ftestexcept.c (fetestexcept): Use proper type
for __fenv_stfsr argument.
* sysdeps/unix/sysv/linux/sparc/sparc32/syscalls.list: Add
truncate64, ftruncate64, fstat64, lstat64, stat64 and mmap2.
Remove ugetrlimit.
* sysdeps/unix/sysv/linux/sparc/sparc32/mmap64.c: New file.
* sysdeps/unix/sysv/linux/sparc/sparc64/kernel_stat.h
(XSTAT_IS_XSTAT64): Define.
* sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list: Add
__libc_lseek64, __libc_pread, __libc_pread64, __libc_pwrite
and __libc_pwrite64.
Remove oldgetrlimit and oldsetrlimit.
* sysdeps/unix/sysv/linux/sparc/sparc64/fxstat64.c: New file.
* sysdeps/unix/sysv/linux/sparc/sparc64/lxstat64.c: New file.
* sysdeps/unix/sysv/linux/sparc/sparc64/xstat64.c: New file.
* sysdeps/unix/sysv/linux/fxstat64.c (__fxstat64): Pass the buf
pointer to the syscall, not address of that pointer.
* sysdeps/unix/sysv/linux/lxstat64.c (__lxstat64): Likewise.
* sysdeps/unix/sysv/linux/xstat64.c (__xstat64): Likewise.
(__syscall_stat64): Provide proper prototype.
* sysdeps/unix/sysv/linux/ftruncate64.c (ftruncate64): Share
has_no_truncate64 between truncate64 and ftruncate64.
* sysdeps/unix/sysv/linux/truncate64.c (truncate64): Likewise.
* sysdeps/unix/sysv/linux/kernel-features.h
(__ASSUME_TRUNCATE64_SYSCALL, __ASSUME_MMAP2_SYSCALL,
__ASSUME_STAT64_SYSCALL): Define on Sparc for kernels >= 2.3.35.
1999-12-22 Andreas Jaeger <aj@suse.de>
* sysdeps/unix/sysv/linux/alpha/syscalls.list: Add __libc_lseek64,
__libc_pread, __libc_pread64, __libc_pwrite and __libc_pwrite64.
1999-12-24 05:55:50 +00:00
|
|
|
|
| GLOB_ALTDIRFUNC))
|
1997-10-31 22:55:02 +00:00
|
|
|
|
| GLOB_NOSORT | GLOB_ONLYDIR),
|
1995-02-18 01:27:10 +00:00
|
|
|
|
errfunc, &dirs);
|
|
|
|
|
if (status != 0)
|
2007-02-14 19:52:38 +00:00
|
|
|
|
{
|
|
|
|
|
if ((flags & GLOB_NOCHECK) == 0 || status != GLOB_NOMATCH)
|
|
|
|
|
return status;
|
|
|
|
|
goto no_matches;
|
|
|
|
|
}
|
1995-02-18 01:27:10 +00:00
|
|
|
|
|
|
|
|
|
/* We have successfully globbed the preceding directory name.
|
|
|
|
|
For each name we found, call glob_in_dir on it and FILENAME,
|
|
|
|
|
appending the results to PGLOB. */
|
|
|
|
|
for (i = 0; i < dirs.gl_pathc; ++i)
|
|
|
|
|
{
|
2012-09-25 19:38:15 +00:00
|
|
|
|
size_t old_pathc;
|
1995-02-18 01:27:10 +00:00
|
|
|
|
|
|
|
|
|
#ifdef SHELL
|
|
|
|
|
{
|
|
|
|
|
/* Make globbing interruptible in the bash shell. */
|
|
|
|
|
extern int interrupt_state;
|
|
|
|
|
|
|
|
|
|
if (interrupt_state)
|
|
|
|
|
{
|
|
|
|
|
globfree (&dirs);
|
Update.
<1997-06-12 21:22 Ulrich Drepper <drepper@cygnus.com>
* Makefile (libc-map): Define before including Makerules.
* Makerules (lib%.so): Depend on $(lib%-map).
(build-shlib): Adapt rule for above change.
(libc.so): Depend on $(libc-map).
* db/Makefile (libcdb-map): New definition.
* elf/Makefile (libdl-map): New definition.
* elf/dl-lookup.c: Don't use relative include path.
(undefined_msg): New variable. Use single string in all functions.
(do_lookup): Correctly recognize default version.
Return -2 if no version information is available.
Stop processing hash entries when string was found.
Don't bark about missing versioned symbol in file with original
reference if it is a weak symbol.
(_dl_lookup_symbol): Use undefined_msg.
(_dl_lookup_versioned_symbol): Likewise.
Give extra information if no verdef info is available.
* elf/dl-version.c (file_needed): Remove first argument. We must
seek in the whole search list.
(match_symbol): Correct check for available verdef info.
(_dl_check_map_versions): Correct call of find_needed.
* locale/Makefile (libBrokenLocale-map): New definition.
* login/Makefile (libutil-map): New definition.
* math/Makefile (libm-map): New definition.
* md5-crypt/Makefile (libcrypt-map): New definition.
* nis/Makefile (libnsl-map, libnss_compat-map, libnss_nis-map,
libnss_nisplus-map): New definition.
* nss/Makefile (libnss_files-map, libnss_db-map): New definitions.
* resolv/Makefile (libresolv-map, libnss_dns-map): New definitions.
* libc.map: New file.
* db/libdb.map: New file.
* elf/libdl.map: New file.
* locale/libBrokenLocale.map: New file.
* login/libutil.map: New file.
* math/libm.map: New file.
* md5-crypt/libcrypt.map: New file.
* nis/libnss_compat.map: New file.
* nis/libnsl.map: New file.
* nis/libnss_nis.map: New file.
* nis/libnss_nisplus.map: New file.
* nss/libnss_files.map: New file.
* nss/libnss_db.map: New file.
* resolv/libnss_dns.map: New file.
* resolv/libresolv.map: New file.
* sysdeps/i386/dl-machine.h (elf_machine_rel): Don't do anything
for R_386_NONE entries.
* Makefile (manual/dir-add.info): New rule.
* Makerules: Add vpath definition for .x files.
* Makerules (distinfo): Make sure target directory exists.
* argp/argp-help.c (argp_args_usage): Don't modify `fdoc' value
since it is used to distinguish filtered strings from unmodifed
strings.
* elf/dl-lookup.c (do_lookup): Optimize STT_* recognition.
* elf/dl-reloc.c: Fix typo.
* inet/arpa/tftp.h (struct tftphdr): Change type of tu_block to
`unsigned short'.
* manual/Makefile (dir-add.texi): Also emit wrapper text for
info/install-info.
(distribute): Add dir-add.texi and dir-add.info.
(mostlyclean): Add dir-add.info.
(realclean): Add dir-add.texi.
(install): Add entries in `dir' file using install-info.
* manual/libc.texinfo: Add @dircategory and @direntry text.
Reported by Miles Bader <miles@gnu.ai.mit.edu>.
* manual/pattern.texi: Correct description of GLOB_MAGCHAR and
GLOB_NOMAGIC. Changes by Roland McGrath <roland@gnu.ai.mit.edu>.
* nis/nis_addmember.c: Little optimizations.
* nis/nis_call.c: Likewise.
* nis/nis_creategroup.c: Likewise.
* nis/nis_defaults.c: Likewise.
* nis/nis_destroygroup.c: Likewise.
* nis/nis_ismember.c: Likewise.
* nis/nis_local_names.c: Likewise.
* nis/nis_print_group_entry.c: Likewise.
* nis/nis_verifygroup.c: Likewise.
* posix/unistd.h: Fix comment for getcwd.
* stdlib/Makefile (headers): Remove inttypes.h. It's a system
dependent header.
* sysdeps/wordsize-32/Dist: New file.
* sysdeps/wordsize-32/Makefile: New file.
* sysdeps/wordsize-64/Dist: New file.
* sysdeps/wordsize-64/Makefile: New file.
* sunrpc/Makefile: Adopt comment for real situation.
* sysdeps/i386/add_n.S: Add ASM_TYPE_DIRECTIVE and AS_SIZE_DIRECTIVE.
* sysdeps/i386/addmul_1.s: Likewise.
* sysdeps/i386/lshist.s: Likewise.
* sysdeps/i386/rshift.s: Likewise.
* sysdeps/i386/sub_n.s: Likewise.
* sysdeps/i386/submul_1.s: Likewise.
* sysdeps/unix/sysv/linux/i386/sysdep.h (SYSCALL_ERROR_HANDLER):
Add .type and .size.
1997-06-12 13:32 Philip Blundell <Philip.Blundell@pobox.com>
* libc/sysdeps/unix/arm/brk.S: New file.
* libc/sysdeps/unix/arm/sysdep.S: Likewise.
* libc/sysdeps/unix/sysv/linux/arm/sysdep.S: Likewise.
1997-06-11 11:51 Thorsten Kukuk <kukuk@vt.uni-paderborn.de>
* nis/nss_nisplus/nisplus-spwd.c (_nss_nisplus_parse_spent):
Check if we have shadow information.
1997-06-08 19:33 Thorsten Kukuk <kukuk@vt.uni-paderborn.de>
* nis/nis_getservlist.c (nis_getservlist): Use calloc instead of
malloc, alloc memory for nis_server struct.
* nis/nis_getservlist.c (nis_freeservlist): Give the memory for
the nis_server struct free, too.
* nis/nis_removemember (nis_removemember): Fix for loop.
1997-06-12 12:45 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/i386/fpu/__math.h (__M_SQRT2): Define here since we
cannot rely on M_SQRT2 being defined. (log1p): Use __M_SQRT2 not
M_SQRT2.
* math/math.h (_Mldbl): Define even if M_* constants are not
defined.
Reported by corsepiu@faw.uni-ulm.de.
1997-06-12 03:08 Philip Blundell <Philip.Blundell@pobox.com>
* nss/getXXbyYY_r.c (do_weak_alias): Remove extra parentheses.
1997-06-11 13:22 Ulrich Drepper <drepper@cygnus.com>
* misc/regexp.h (compile): Allow use of macro INIT for variable
declaration. Add documentation for INIT.
Reported by Robert Bihlmeyer <robbe@orcus.priv.at>.
1997-06-11 10:47 Philip Blundell <Philip.Blundell@pobox.com>
* sysdeps/unix/sysv/linux/net/if_arp.h: Add two new hardware types.
1997-06-10 11:31 H.J. Lu <hjl@gnu.ai.mit.edu>
* sysdeps/powerpc/strlen.s: Use -0x101 instead of 0xfffffeff
for a signed 16-bit value.
1997-06-07 07:54 H.J. Lu <hjl@gnu.ai.mit.edu>
* sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c
(_dl_sysdep_read_whole_file): Deleted.
* sysdeps/powerpc/fenvbits.h (__FE_ALL_INVALID): Changed
to FE_ALL_INVALID.
* sysdeps/powerpc/fraiseexcpt.c (__FE_INVALID_SOFTWARE):
Changed to FE_INVALID_SOFTWARE.
(__FPSCR_STICKY_BITS): Changed to FPSCR_STICKY_BITS.
* sysdeps/libm-ieee754/s_fmin.c: Fix a typo.
1997-06-07 18:48 H.J. Lu <hjl@gnu.ai.mit.edu>
* shlib-versions (.*-.*-linux.*): Set libc to 6.
1997-06-08 15:35 Thorsten Kukuk <kukuk@vt.uni-paderborn.de>
* nis/nis_add.c (nis_add): Use nis_leaf_of_r instead of nis_name_of_r.
* nis/nis_addmember.c (nis_addmember): Fix a lot of pointer errors.
* nis/nis_clone.c: Likewise.
* nis/nis_removemember.c (nis_removemember): Likewise.
* nis/nis_table.c: Likewise.
* nis/nss_nis/nis-hosts.c: Use addr, not p for inet_pton call.
* nis/nss_nisplus/nisplus-hosts.c: Likewise.
* nis/nss_nis/nis-netgrp.c (_nss_nis_setnetgrent): Check for
group == NULL.
1997-06-08 21:21 Mark Kettenis <kettenis@phys.uva.nl>
* login/login.c, login/utmp_daemon.c, login/utmp_file.c,
login/getutent_r.c, login/utmpname.c: Cleanup `#if _LIBC' and
`#ifndef _LIBC' fragments.
* login/programs/utmpd.c: Define DEFAULT_USER.
(drop_priviliges): Use it.
(main): Set locale and text domain.
* login/programs/utmpd-private.h: Declare proc_utmp_eq.
* login/programs/database.c (proc_utmp_eq): Removed.
* login/programs/request.c (proc_utmp_eq): Made global. Only use
ut_id field if valid.
* login/utmp_file.c (proc_utmp_eq): Restore patch made by Miles
Bader that was lost when adding the daemon backend; Only use ut_id
field if valid.
1997-06-05 23:10 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/unix/sysv/linux/Dist: Remove netatalk/atalk.h and
netinet/icmp.h, add netatalk/at.h.
* sysdeps/unix/sysv/linux/powerpc/Dist: Remove termios.h.
* sysdeps/unix/sysv/linux/sparc/Dist: Remove start.c.
1997-06-04 19:22 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* stdlib/testsort.c (compare): Fix parameter types.
1997-06-04 19:05 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* md5-crypt/Makefile (distribute): Fix name of file.
1997-06-04 19:02 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* login/Makefile (utmpd-routines): Remove utmpd again, which is
already added implicitly through $(others).
1997-06-05 13:43 Fila Kolodny <fila@filapc.ibi.com>
* sysdeps/unix/sysv/linux/Makefile (sysdep_headers): Add netipx/ipx.h.
1997-06-05 13:25 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* md5-crypt/md5-crypt.c: Add prototype for __md5_crypt.
1997-06-05 17:08 Ulrich Drepper <drepper@cygnus.com>
* string/argz-addsep.c: Correct weak alias.
Reported by Ben Pfaff <pfaffben@pilot.msu.edu>.
* locale/setlocale.c (setlocale): Free variable with locale path
before returning.
(setname): Don't test for _nl_current[category] being NULL before
freeing.
Reported by Ben Pfaff <pfaffben@pilot.msu.edu>.
1997-06-04 12:41 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* manual/intro.texi (XPG): Correct some typos.
* manual/libc.texinfo (Program Arguments): Menu updated.
* nis/nis_local_names.c (nis_local_host): Fix pointer errors.
1997-06-12 21:38:55 +00:00
|
|
|
|
return GLOB_ABORTED;
|
1995-02-18 01:27:10 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
#endif /* SHELL. */
|
|
|
|
|
|
1998-07-23 14:59:16 +00:00
|
|
|
|
old_pathc = pglob->gl_pathc;
|
1995-02-18 01:27:10 +00:00
|
|
|
|
status = glob_in_dir (filename, dirs.gl_pathv[i],
|
2002-04-29 04:32:06 +00:00
|
|
|
|
((flags | GLOB_APPEND)
|
|
|
|
|
& ~(GLOB_NOCHECK | GLOB_NOMAGIC)),
|
2011-05-23 03:04:16 +00:00
|
|
|
|
errfunc, pglob, alloca_used);
|
1995-02-18 01:27:10 +00:00
|
|
|
|
if (status == GLOB_NOMATCH)
|
|
|
|
|
/* No matches in this directory. Try the next. */
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
|
|
if (status != 0)
|
|
|
|
|
{
|
|
|
|
|
globfree (&dirs);
|
|
|
|
|
globfree (pglob);
|
2002-02-10 23:36:05 +00:00
|
|
|
|
pglob->gl_pathc = 0;
|
1995-02-18 01:27:10 +00:00
|
|
|
|
return status;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Stick the directory on the front of each name. */
|
|
|
|
|
if (prefix_array (dirs.gl_pathv[i],
|
2000-03-20 00:46:01 +00:00
|
|
|
|
&pglob->gl_pathv[old_pathc + pglob->gl_offs],
|
1998-07-23 14:59:16 +00:00
|
|
|
|
pglob->gl_pathc - old_pathc))
|
1995-02-18 01:27:10 +00:00
|
|
|
|
{
|
|
|
|
|
globfree (&dirs);
|
|
|
|
|
globfree (pglob);
|
2002-02-10 23:36:05 +00:00
|
|
|
|
pglob->gl_pathc = 0;
|
1995-02-18 01:27:10 +00:00
|
|
|
|
return GLOB_NOSPACE;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
flags |= GLOB_MAGCHAR;
|
|
|
|
|
|
1998-07-28 16:26:04 +00:00
|
|
|
|
/* We have ignored the GLOB_NOCHECK flag in the `glob_in_dir' calls.
|
2000-03-20 00:46:01 +00:00
|
|
|
|
But if we have not found any matching entry and the GLOB_NOCHECK
|
2001-12-29 15:57:15 +00:00
|
|
|
|
flag was set we must return the input pattern itself. */
|
2000-03-20 00:46:01 +00:00
|
|
|
|
if (pglob->gl_pathc + pglob->gl_offs == oldcount)
|
1998-09-09 11:53:19 +00:00
|
|
|
|
{
|
2007-02-14 19:52:38 +00:00
|
|
|
|
no_matches:
|
1998-09-09 11:53:19 +00:00
|
|
|
|
/* No matches. */
|
|
|
|
|
if (flags & GLOB_NOCHECK)
|
|
|
|
|
{
|
2012-09-25 19:38:15 +00:00
|
|
|
|
size_t newcount = pglob->gl_pathc + pglob->gl_offs;
|
2001-12-29 15:57:15 +00:00
|
|
|
|
char **new_gl_pathv;
|
1998-09-09 11:53:19 +00:00
|
|
|
|
|
2011-07-21 02:53:58 +00:00
|
|
|
|
if (newcount > UINTPTR_MAX - 2
|
|
|
|
|
|| newcount + 2 > ~((size_t) 0) / sizeof (char *))
|
1998-09-09 11:53:19 +00:00
|
|
|
|
{
|
2011-07-21 02:53:58 +00:00
|
|
|
|
nospace2:
|
1998-09-09 11:53:19 +00:00
|
|
|
|
globfree (&dirs);
|
|
|
|
|
return GLOB_NOSPACE;
|
|
|
|
|
}
|
2011-07-21 02:53:58 +00:00
|
|
|
|
|
|
|
|
|
new_gl_pathv = (char **) realloc (pglob->gl_pathv,
|
|
|
|
|
(newcount + 2)
|
|
|
|
|
* sizeof (char *));
|
|
|
|
|
if (new_gl_pathv == NULL)
|
|
|
|
|
goto nospace2;
|
2001-12-29 15:57:15 +00:00
|
|
|
|
pglob->gl_pathv = new_gl_pathv;
|
1995-02-18 01:27:10 +00:00
|
|
|
|
|
2001-12-10 12:21:07 +00:00
|
|
|
|
pglob->gl_pathv[newcount] = __strdup (pattern);
|
|
|
|
|
if (pglob->gl_pathv[newcount] == NULL)
|
1998-09-09 11:53:19 +00:00
|
|
|
|
{
|
2001-12-10 12:21:07 +00:00
|
|
|
|
globfree (&dirs);
|
|
|
|
|
globfree (pglob);
|
2002-02-10 23:36:05 +00:00
|
|
|
|
pglob->gl_pathc = 0;
|
2001-12-10 12:21:07 +00:00
|
|
|
|
return GLOB_NOSPACE;
|
1998-09-09 11:53:19 +00:00
|
|
|
|
}
|
1998-07-28 16:26:04 +00:00
|
|
|
|
|
2001-12-10 12:21:07 +00:00
|
|
|
|
++pglob->gl_pathc;
|
|
|
|
|
++newcount;
|
|
|
|
|
|
2000-03-20 00:46:01 +00:00
|
|
|
|
pglob->gl_pathv[newcount] = NULL;
|
1998-09-09 11:53:19 +00:00
|
|
|
|
pglob->gl_flags = flags;
|
|
|
|
|
}
|
|
|
|
|
else
|
2000-07-13 12:12:01 +00:00
|
|
|
|
{
|
|
|
|
|
globfree (&dirs);
|
|
|
|
|
return GLOB_NOMATCH;
|
|
|
|
|
}
|
1998-09-09 11:53:19 +00:00
|
|
|
|
}
|
1998-07-28 16:26:04 +00:00
|
|
|
|
|
|
|
|
|
globfree (&dirs);
|
1995-02-18 01:27:10 +00:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2012-09-25 19:38:15 +00:00
|
|
|
|
size_t old_pathc = pglob->gl_pathc;
|
2007-02-14 19:52:38 +00:00
|
|
|
|
int orig_flags = flags;
|
2000-03-20 00:46:01 +00:00
|
|
|
|
|
2007-02-14 19:52:38 +00:00
|
|
|
|
if (meta & 2)
|
|
|
|
|
{
|
|
|
|
|
char *p = strchr (dirname, '\\'), *q;
|
|
|
|
|
/* We need to unescape the dirname string. It is certainly
|
|
|
|
|
allocated by alloca, as otherwise filename would be NULL
|
|
|
|
|
or dirname wouldn't contain backslashes. */
|
|
|
|
|
q = p;
|
|
|
|
|
do
|
|
|
|
|
{
|
|
|
|
|
if (*p == '\\')
|
|
|
|
|
{
|
|
|
|
|
*q = *++p;
|
|
|
|
|
--dirlen;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
*q = *p;
|
|
|
|
|
++q;
|
|
|
|
|
}
|
|
|
|
|
while (*p++ != '\0');
|
|
|
|
|
dirname_modified = 1;
|
|
|
|
|
}
|
|
|
|
|
if (dirname_modified)
|
|
|
|
|
flags &= ~(GLOB_NOCHECK | GLOB_NOMAGIC);
|
2011-05-23 03:04:16 +00:00
|
|
|
|
status = glob_in_dir (filename, dirname, flags, errfunc, pglob,
|
|
|
|
|
alloca_used);
|
1995-02-18 01:27:10 +00:00
|
|
|
|
if (status != 0)
|
2007-02-14 19:52:38 +00:00
|
|
|
|
{
|
|
|
|
|
if (status == GLOB_NOMATCH && flags != orig_flags
|
|
|
|
|
&& pglob->gl_pathc + pglob->gl_offs == oldcount)
|
|
|
|
|
{
|
|
|
|
|
/* Make sure globfree (&dirs); is a nop. */
|
|
|
|
|
dirs.gl_pathv = NULL;
|
|
|
|
|
flags = orig_flags;
|
|
|
|
|
goto no_matches;
|
|
|
|
|
}
|
|
|
|
|
return status;
|
|
|
|
|
}
|
1995-02-18 01:27:10 +00:00
|
|
|
|
|
|
|
|
|
if (dirlen > 0)
|
|
|
|
|
{
|
|
|
|
|
/* Stick the directory on the front of each name. */
|
|
|
|
|
if (prefix_array (dirname,
|
2000-03-20 00:46:01 +00:00
|
|
|
|
&pglob->gl_pathv[old_pathc + pglob->gl_offs],
|
|
|
|
|
pglob->gl_pathc - old_pathc))
|
1995-02-18 01:27:10 +00:00
|
|
|
|
{
|
|
|
|
|
globfree (pglob);
|
2002-02-10 23:36:05 +00:00
|
|
|
|
pglob->gl_pathc = 0;
|
1995-02-18 01:27:10 +00:00
|
|
|
|
return GLOB_NOSPACE;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
1995-04-25 21:16:39 +00:00
|
|
|
|
if (flags & GLOB_MARK)
|
|
|
|
|
{
|
1995-09-11 17:59:24 +00:00
|
|
|
|
/* Append slashes to directory names. */
|
2000-12-02 08:18:55 +00:00
|
|
|
|
size_t i;
|
1995-04-25 21:16:39 +00:00
|
|
|
|
struct stat st;
|
2006-01-11 05:30:12 +00:00
|
|
|
|
struct_stat64 st64;
|
2000-03-20 00:46:01 +00:00
|
|
|
|
|
|
|
|
|
for (i = oldcount; i < pglob->gl_pathc + pglob->gl_offs; ++i)
|
2007-10-15 04:22:46 +00:00
|
|
|
|
if ((__builtin_expect (flags & GLOB_ALTDIRFUNC, 0)
|
2000-03-20 00:46:01 +00:00
|
|
|
|
? ((*pglob->gl_stat) (pglob->gl_pathv[i], &st) == 0
|
|
|
|
|
&& S_ISDIR (st.st_mode))
|
|
|
|
|
: (__stat64 (pglob->gl_pathv[i], &st64) == 0
|
|
|
|
|
&& S_ISDIR (st64.st_mode))))
|
1995-08-31 00:02:32 +00:00
|
|
|
|
{
|
2010-03-27 13:19:03 +00:00
|
|
|
|
size_t len = strlen (pglob->gl_pathv[i]) + 2;
|
1995-08-31 00:02:32 +00:00
|
|
|
|
char *new = realloc (pglob->gl_pathv[i], len);
|
2010-03-27 13:19:03 +00:00
|
|
|
|
if (new == NULL)
|
1995-08-31 00:02:32 +00:00
|
|
|
|
{
|
|
|
|
|
globfree (pglob);
|
2002-02-10 23:36:05 +00:00
|
|
|
|
pglob->gl_pathc = 0;
|
1995-08-31 00:02:32 +00:00
|
|
|
|
return GLOB_NOSPACE;
|
|
|
|
|
}
|
|
|
|
|
strcpy (&new[len - 2], "/");
|
|
|
|
|
pglob->gl_pathv[i] = new;
|
|
|
|
|
}
|
1995-04-25 21:16:39 +00:00
|
|
|
|
}
|
|
|
|
|
|
1995-02-18 01:27:10 +00:00
|
|
|
|
if (!(flags & GLOB_NOSORT))
|
1998-07-23 14:59:16 +00:00
|
|
|
|
{
|
|
|
|
|
/* Sort the vector. */
|
2006-01-11 05:30:12 +00:00
|
|
|
|
qsort (&pglob->gl_pathv[oldcount],
|
2000-03-20 00:46:01 +00:00
|
|
|
|
pglob->gl_pathc + pglob->gl_offs - oldcount,
|
1998-07-23 14:59:16 +00:00
|
|
|
|
sizeof (char *), collated_compare);
|
|
|
|
|
}
|
1995-02-18 01:27:10 +00:00
|
|
|
|
|
2011-05-23 03:04:16 +00:00
|
|
|
|
out:
|
2014-02-10 13:45:42 +00:00
|
|
|
|
if (__glibc_unlikely (malloc_dirname))
|
2011-05-23 03:04:16 +00:00
|
|
|
|
free (dirname);
|
|
|
|
|
|
|
|
|
|
return retval;
|
1995-02-18 01:27:10 +00:00
|
|
|
|
}
|
2002-08-05 00:43:00 +00:00
|
|
|
|
#if defined _LIBC && !defined glob
|
* include/unistd.h: Use libc_hidden_proto for _exit, alarm, confstr,
execl, execle, execlp, execvp, getpid, getsid.
* sysdeps/generic/alarm.c: Add libc_hidden_def.
* sysdeps/unix/alarm.c: Likewise.
* posix/confstr.c: Likewise.
* posix/execvp.c: Likewise.
* posix/execlp.c: Likewise.
* posix/execle.c: Likewise.
* posix/execl.c: Likewise.
* sysdeps/generic/getsid.c: Likewise.
* sysdeps/mach/hurd/getsid.c: Likewise.
* sysdeps/generic/getpid.c: Add libc_hidden_weak.
* sysdeps/mach/hurd/getpid.c: Likewise.
* include/stdlib.h: Use libc_hidden_proto for ecvt_r, fcvt_r,
qecvt_r, qfcvt_r, lrand48_r.
* misc/efgcvt_r.c: Add libc_hidden_def.
* include/wordexp.h: Use libc_hidden_proto for wordfree.
* sysdeps/generic/wordexp.c: Add libc_hidden_def.
* include/langinfo.h: Use libc_hidden_proto for nl_langinfo.
* locale/nl_langinfo.c: Add libc_hidden_def.
* include/glob.h: Use libc_hidden_proto for glob, globfree, globfree64.
* sysdeps/generic/glob.c: Add libc_hidden_def.
* sysdeps/generic/glob64.c: Likewise.
* sysdeps/wordsize-64/glob.c (globfree64): Add libc_hidden_weak.
2002-08-04 03:30:56 +00:00
|
|
|
|
libc_hidden_def (glob)
|
|
|
|
|
#endif
|
1995-02-18 01:27:10 +00:00
|
|
|
|
|
|
|
|
|
|
2000-08-19 16:58:09 +00:00
|
|
|
|
#if !defined _LIBC || !defined GLOB_ONLY_P
|
|
|
|
|
|
1995-02-18 01:27:10 +00:00
|
|
|
|
/* Free storage allocated in PGLOB by a previous `glob' call. */
|
|
|
|
|
void
|
2015-10-20 11:54:09 +00:00
|
|
|
|
globfree (glob_t *pglob)
|
1995-02-18 01:27:10 +00:00
|
|
|
|
{
|
|
|
|
|
if (pglob->gl_pathv != NULL)
|
|
|
|
|
{
|
2000-12-02 08:18:55 +00:00
|
|
|
|
size_t i;
|
1995-02-18 01:27:10 +00:00
|
|
|
|
for (i = 0; i < pglob->gl_pathc; ++i)
|
2008-05-27 06:04:07 +00:00
|
|
|
|
free (pglob->gl_pathv[pglob->gl_offs + i]);
|
2006-01-11 05:30:12 +00:00
|
|
|
|
free (pglob->gl_pathv);
|
2004-10-27 18:23:53 +00:00
|
|
|
|
pglob->gl_pathv = NULL;
|
1995-02-18 01:27:10 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
2002-08-05 00:43:00 +00:00
|
|
|
|
#if defined _LIBC && !defined globfree
|
* include/unistd.h: Use libc_hidden_proto for _exit, alarm, confstr,
execl, execle, execlp, execvp, getpid, getsid.
* sysdeps/generic/alarm.c: Add libc_hidden_def.
* sysdeps/unix/alarm.c: Likewise.
* posix/confstr.c: Likewise.
* posix/execvp.c: Likewise.
* posix/execlp.c: Likewise.
* posix/execle.c: Likewise.
* posix/execl.c: Likewise.
* sysdeps/generic/getsid.c: Likewise.
* sysdeps/mach/hurd/getsid.c: Likewise.
* sysdeps/generic/getpid.c: Add libc_hidden_weak.
* sysdeps/mach/hurd/getpid.c: Likewise.
* include/stdlib.h: Use libc_hidden_proto for ecvt_r, fcvt_r,
qecvt_r, qfcvt_r, lrand48_r.
* misc/efgcvt_r.c: Add libc_hidden_def.
* include/wordexp.h: Use libc_hidden_proto for wordfree.
* sysdeps/generic/wordexp.c: Add libc_hidden_def.
* include/langinfo.h: Use libc_hidden_proto for nl_langinfo.
* locale/nl_langinfo.c: Add libc_hidden_def.
* include/glob.h: Use libc_hidden_proto for glob, globfree, globfree64.
* sysdeps/generic/glob.c: Add libc_hidden_def.
* sysdeps/generic/glob64.c: Likewise.
* sysdeps/wordsize-64/glob.c (globfree64): Add libc_hidden_weak.
2002-08-04 03:30:56 +00:00
|
|
|
|
libc_hidden_def (globfree)
|
|
|
|
|
#endif
|
1995-02-18 01:27:10 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Do a collated comparison of A and B. */
|
|
|
|
|
static int
|
2006-01-11 05:30:12 +00:00
|
|
|
|
collated_compare (const void *a, const void *b)
|
1995-02-18 01:27:10 +00:00
|
|
|
|
{
|
|
|
|
|
const char *const s1 = *(const char *const * const) a;
|
|
|
|
|
const char *const s2 = *(const char *const * const) b;
|
|
|
|
|
|
|
|
|
|
if (s1 == s2)
|
|
|
|
|
return 0;
|
|
|
|
|
if (s1 == NULL)
|
|
|
|
|
return 1;
|
|
|
|
|
if (s2 == NULL)
|
|
|
|
|
return -1;
|
|
|
|
|
return strcoll (s1, s2);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Prepend DIRNAME to each of N members of ARRAY, replacing ARRAY's
|
|
|
|
|
elements in place. Return nonzero if out of memory, zero if successful.
|
|
|
|
|
A slash is inserted between DIRNAME and each elt of ARRAY,
|
|
|
|
|
unless DIRNAME is just "/". Each old element of ARRAY is freed. */
|
|
|
|
|
static int
|
2006-01-11 05:30:12 +00:00
|
|
|
|
prefix_array (const char *dirname, char **array, size_t n)
|
1995-02-18 01:27:10 +00:00
|
|
|
|
{
|
2013-06-07 22:24:35 +00:00
|
|
|
|
size_t i;
|
1995-02-18 01:27:10 +00:00
|
|
|
|
size_t dirlen = strlen (dirname);
|
1998-07-29 14:52:00 +00:00
|
|
|
|
#if defined __MSDOS__ || defined WINDOWS32
|
|
|
|
|
int sep_char = '/';
|
|
|
|
|
# define DIRSEP_CHAR sep_char
|
|
|
|
|
#else
|
|
|
|
|
# define DIRSEP_CHAR '/'
|
|
|
|
|
#endif
|
1995-02-18 01:27:10 +00:00
|
|
|
|
|
|
|
|
|
if (dirlen == 1 && dirname[0] == '/')
|
|
|
|
|
/* DIRNAME is just "/", so normal prepending would get us "//foo".
|
|
|
|
|
We want "/foo" instead, so don't prepend any chars from DIRNAME. */
|
|
|
|
|
dirlen = 0;
|
1998-07-29 14:52:00 +00:00
|
|
|
|
#if defined __MSDOS__ || defined WINDOWS32
|
|
|
|
|
else if (dirlen > 1)
|
|
|
|
|
{
|
1999-11-01 03:04:49 +00:00
|
|
|
|
if (dirname[dirlen - 1] == '/' && dirname[dirlen - 2] == ':')
|
1998-07-29 14:52:00 +00:00
|
|
|
|
/* DIRNAME is "d:/". Don't prepend the slash from DIRNAME. */
|
|
|
|
|
--dirlen;
|
|
|
|
|
else if (dirname[dirlen - 1] == ':')
|
|
|
|
|
{
|
|
|
|
|
/* DIRNAME is "d:". Use `:' instead of `/'. */
|
|
|
|
|
--dirlen;
|
|
|
|
|
sep_char = ':';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
#endif
|
1995-02-18 01:27:10 +00:00
|
|
|
|
|
|
|
|
|
for (i = 0; i < n; ++i)
|
|
|
|
|
{
|
|
|
|
|
size_t eltlen = strlen (array[i]) + 1;
|
|
|
|
|
char *new = (char *) malloc (dirlen + 1 + eltlen);
|
|
|
|
|
if (new == NULL)
|
|
|
|
|
{
|
|
|
|
|
while (i > 0)
|
2006-01-11 05:30:12 +00:00
|
|
|
|
free (array[--i]);
|
1995-02-18 01:27:10 +00:00
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
|
Update.
1997-10-29 21:20 Ulrich Drepper <drepper@cygnus.com>
* libio/strops.c (_IO_str_seekoff): If mode is zero and the read/write
pointers are tied set mode according to current stream mode.
* include/features.h [_GNU_SOURCE] (_POSIX_C_SOURCE): Define to
199506L.
Define _XOPEN_SOURCE to 500 if _POSIX_C_SOURCE is defined.
* manual/creature.texi: Describe this.
* manual/socket.texi: Describe connect, accept, send, sendmsg, sendto,
recv, recvfrom, and recvmsg as cancelation points.
* sysdeps/unix/inet/syscalls.list: Add __libc_* names for these
functions.
1997-10-17 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* Make-dist (try-sysdeps): Don't look for stub files anymore.
* manual/maint.texi (Porting): Remove another reference to stub
directory.
* sysdeps/unix/bsd/sun/sethostid.c: Include stub version from
generic subdir.
* sysdeps/unix/sysv/irix4/reboot.c: Likewise.
* sysdeps/unix/sysv/irix4/swapon.c: Likewise
1997-10-29 03:54 Ulrich Drepper <drepper@cygnus.com>
* resolv/nss_dns/dns-host.c: Change variable pointed to by h_errnop
in all error cases (PR 244).
1997-10-29 00:56 Ulrich Drepper <drepper@cygnus.com>
* posix/glob.c: Fix handling of expressions like "*/" (PR 325).
Optimize by using mempcpy.
1997-10-17 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* po/Makefile ($(mo-installed)): Don't fail during installation if
files don't exist (might happen if msgfmt doesn't exist) (PR 328).
Suggested by Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>.
1997-10-24 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* sysdeps/generic/bits/errno.h (ENOMSG): Define it.
Pointed out by Klaus Espenlaub
<kespenla@hydra.informatik.uni-ulm.de> (PR libc/259).
1997-10-28 17:40 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/libm-ieee754/s_cbrt.c: Testing the returned exponent for
zero isn't enough to determine illegal arguments.
* sysdeps/libm-ieee754/s_cbrtf.c: Likewise.
* sysdeps/libm-ieee754/s_cbrtl.c: Likewise.
1997-10-28 17:14 Ulrich Drepper <drepper@cygnus.com>
* manual/filesys.texi (S_ISVTX): Describe that it is available with
_BSD_SOURCE only.
Reported by Jochen Hein <jochen.hein@delphi.central.de>.
1997-10-28 04:26 Ulrich Drepper <drepper@cygnus.com>
* time/tzfile.c (__tzfile_compute): Use negated value of offset for
timezone variable.
* time/tzset.c (tz_compute): Likewise.
Reported by Erik Troan <ewt@redhat.com>.
1997-10-28 02:51 Ulrich Drepper <drepper@cygnus.com>
* manual/filesys.texi: Correct prototype in readdir_r description.
Reported by Jim Meyering <meyering@eng.ascend.com>.
1997-10-27 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* math/libm-test.c (cbrt_test): Add test for cbrt(0.970299).
1997-10-26 19:39 Zack Weinberg <zack@rabi.phys.columbia.edu>
* stdlib/l64a.c: Produce a useful result for n < 0.
* stdlib/a64l.c: Use unsigned type for working variable.
* manual/string.texi (general): Grammar, typo, overfull fixes.
(strlen): Insert warning about sizeof(char *).
(a64l, l64a): Make documentation agree with implementation.
* libio/iofdopen.c: Use _IO_FILE_complete, not _IO_FILE_plus.
* posix/unistd.h: Add prototypes for __pread, __pread64, __pwrite
1997-10-29 20:33:40 +00:00
|
|
|
|
{
|
2006-01-11 05:30:12 +00:00
|
|
|
|
char *endp = mempcpy (new, dirname, dirlen);
|
1998-07-29 14:52:00 +00:00
|
|
|
|
*endp++ = DIRSEP_CHAR;
|
Update.
1997-10-29 21:20 Ulrich Drepper <drepper@cygnus.com>
* libio/strops.c (_IO_str_seekoff): If mode is zero and the read/write
pointers are tied set mode according to current stream mode.
* include/features.h [_GNU_SOURCE] (_POSIX_C_SOURCE): Define to
199506L.
Define _XOPEN_SOURCE to 500 if _POSIX_C_SOURCE is defined.
* manual/creature.texi: Describe this.
* manual/socket.texi: Describe connect, accept, send, sendmsg, sendto,
recv, recvfrom, and recvmsg as cancelation points.
* sysdeps/unix/inet/syscalls.list: Add __libc_* names for these
functions.
1997-10-17 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* Make-dist (try-sysdeps): Don't look for stub files anymore.
* manual/maint.texi (Porting): Remove another reference to stub
directory.
* sysdeps/unix/bsd/sun/sethostid.c: Include stub version from
generic subdir.
* sysdeps/unix/sysv/irix4/reboot.c: Likewise.
* sysdeps/unix/sysv/irix4/swapon.c: Likewise
1997-10-29 03:54 Ulrich Drepper <drepper@cygnus.com>
* resolv/nss_dns/dns-host.c: Change variable pointed to by h_errnop
in all error cases (PR 244).
1997-10-29 00:56 Ulrich Drepper <drepper@cygnus.com>
* posix/glob.c: Fix handling of expressions like "*/" (PR 325).
Optimize by using mempcpy.
1997-10-17 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* po/Makefile ($(mo-installed)): Don't fail during installation if
files don't exist (might happen if msgfmt doesn't exist) (PR 328).
Suggested by Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>.
1997-10-24 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* sysdeps/generic/bits/errno.h (ENOMSG): Define it.
Pointed out by Klaus Espenlaub
<kespenla@hydra.informatik.uni-ulm.de> (PR libc/259).
1997-10-28 17:40 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/libm-ieee754/s_cbrt.c: Testing the returned exponent for
zero isn't enough to determine illegal arguments.
* sysdeps/libm-ieee754/s_cbrtf.c: Likewise.
* sysdeps/libm-ieee754/s_cbrtl.c: Likewise.
1997-10-28 17:14 Ulrich Drepper <drepper@cygnus.com>
* manual/filesys.texi (S_ISVTX): Describe that it is available with
_BSD_SOURCE only.
Reported by Jochen Hein <jochen.hein@delphi.central.de>.
1997-10-28 04:26 Ulrich Drepper <drepper@cygnus.com>
* time/tzfile.c (__tzfile_compute): Use negated value of offset for
timezone variable.
* time/tzset.c (tz_compute): Likewise.
Reported by Erik Troan <ewt@redhat.com>.
1997-10-28 02:51 Ulrich Drepper <drepper@cygnus.com>
* manual/filesys.texi: Correct prototype in readdir_r description.
Reported by Jim Meyering <meyering@eng.ascend.com>.
1997-10-27 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* math/libm-test.c (cbrt_test): Add test for cbrt(0.970299).
1997-10-26 19:39 Zack Weinberg <zack@rabi.phys.columbia.edu>
* stdlib/l64a.c: Produce a useful result for n < 0.
* stdlib/a64l.c: Use unsigned type for working variable.
* manual/string.texi (general): Grammar, typo, overfull fixes.
(strlen): Insert warning about sizeof(char *).
(a64l, l64a): Make documentation agree with implementation.
* libio/iofdopen.c: Use _IO_FILE_complete, not _IO_FILE_plus.
* posix/unistd.h: Add prototypes for __pread, __pread64, __pwrite
1997-10-29 20:33:40 +00:00
|
|
|
|
mempcpy (endp, array[i], eltlen);
|
|
|
|
|
}
|
2006-01-11 05:30:12 +00:00
|
|
|
|
free (array[i]);
|
1995-02-18 01:27:10 +00:00
|
|
|
|
array[i] = new;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
1998-08-10 15:54:54 +00:00
|
|
|
|
/* We must not compile this function twice. */
|
1998-08-12 17:06:39 +00:00
|
|
|
|
#if !defined _LIBC || !defined NO_GLOB_PATTERN_P
|
Update.
1997-03-27 02:28 Ulrich Drepper <drepper@cygnus.com>
* gmon/gmon.c (monstartup): Mark all messages.
(write_call_graph): Rewrite to use larger I/O vector for writev
call to reduce syscall overhead.
(write_bb_counts): Simplify writev handling.
* inet/rexec.c: Make string parameters `const'.
* resolv/netdb.h: Add prototypes for rcmd, rexec, ruserok, and
rresvport.
* math/Makefile: Don't define CFLAGS-* macros to prevent inlining
in libm-test.
* math/libm-test.c (this_does_nothing): Remove functions. It's
notuseful on any platform but ix86.
(inverse_func_pair_test): Don't use this_does_nothing. Use
memory reference.
(identities1_test): Likewise.
(identities2_test): Likewise.
(identities3_test): Likewise.
(basic_test): Likewise.
Patch by Andreas Schwab.
(BUILD_COMPLEX): New macro. Create complex number from real and
imaginary parts. This works around bugs/inefficiencies in current
gcc.
(cexp_test): Use BUILD_COMPLEX. Add more tests.
* nss/nsswitch.c: Fix typo.
* posix/glob.h: Add declaration for glob_pattern_p.
* posix/glob.c: Rename glob_pattern_p to __glob_pattern_p and
make glob_pattern_p a weak alias. This function is used in other
packages (e.g. bash).
* signal/Makefile (routines): Add sigisempty, sigandset, and
sigorset.
* signal/signal.h: Add prototypes for sigisempty, sigandset, and
sigorset.
* signal/sigisempty.c: New file.
* signal/sigandset.c: New file.
* signal/sigorset.c: New file.
* sysdeps/generic/sigset.h: Define __sigisemptyset, __sigandset,
and __sigorset.
* sysdeps/unix/sysv/linux/sigset.h: Likewise.
* stdlib/strtod.c: Handle `n-char-sequence' in NaN parsing. It
determines the bits in the mantissa part of the NaN.
* stdlib/strtof.c: Define SET_MANTISSA for float type.
* wcsmbs/wcstof.c: Define SET_MANTISSA for float type.
* stdlib/strtold.c: Define SET_MANTISSA for long double type.
* wcsmbs/wcstold.c: Define SET_MANTISSA for long double type.
* sysdeps/libm-ieee754/s_cexp.c: Use explicit assignment to
complex number components. Some more corrects for special cases.
* sysdeps/libm-ieee754/s_cexpf.c: Likewise.
* sysdeps/libm-ieee754/s_cexpl.c: Likewise.
* sysdeps/sparc/elf/start.S: Remove as per request of Miguel de Icaza.
* sysdeps/unix/sysv/linux/netinet/icmp.h: Remove since we have
ip_icmp.h. Reported by HJ Lu.
1997-03-25 03:50 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/m68k/Makefile (CFLAGS-rtld.c): Add -Wno-unused.
* sysdeps/m68k/dl-machine.h (elf_machine_rela): Rewritten as for
i386.
(elf_machine_lookup_noexec_p, elf_machine_lookup_noplt_p,
ELF_MACHINE_RELOC_NOPLT): Define.
1997-03-25 03:48 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* grp/grp.h: Include <stddef.h> only once.
1997-03-25 09:38 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/unix/sysv/linux/termbits.h (OXTABS): Don't define.
* sysdeps/unix/sysv/linux/alpha/termbits.h (OXTABS): Likewise.
* termios/sys/ttydefaults.h (TTYDEF_OFLAG): Use either OXTABS or
TAB3, if one of them is defined.
1997-03-26 04:53 Ulrich Drepper <drepper@cygnus.com>
* posix/glob.c (next_brace_sub): Decrement depth counter when '}'
is found.
Patch by Dennis Henriksen <opus@flamingo.osrl.dk>.
1997-03-25 16:25 Thorsten Kukuk <kukuk@vt.uni-paderborn.de>
* sunrpc/Makefile: Comment gccwarn out.
* sunrpc/auth_none.c: Fix prototypes and parameters for compiling
with enabled warnings.
* sunrpc/auth_unix.c: Likewise.
* sunrpc/authuxprot.c: Likewise.
* sunrpc/bindrsvprt.c: Likewise.
* sunrpc/clnt_gen.c: Likewise.
* sunrpc/clnt_perr.c: Likewise.
* sunrpc/clnt_raw.c: Likewise.
* sunrpc/clnt_simp.c: Likewise.
* sunrpc/clnt_tcp.c: Likewise.
* sunrpc/clnt_udp.c: Likewise.
* sunrpc/get_myaddr.c: Likewise.
* sunrpc/getrpcport.c: Likewise.
* sunrpc/pm_getmaps.c: Likewise.
* sunrpc/pm_getport.c: Likewise.
* sunrpc/pmap_clnt.c: Likewise.
* sunrpc/pmap_prot.c: Likewise.
* sunrpc/pmap_prot2.c: Likewise.
* sunrpc/pmap_rmt.c: Likewise.
* sunrpc/rpc/auth.h: Likewise.
* sunrpc/rpc/clnt.h: Likewise.
* sunrpc/rpc/pmap_clnt.h: Likewise.
* sunrpc/rpc/svc.h: Likewise.
* sunrpc/rpc/svc_auth.h: Likewise.
* sunrpc/rpc/types.h: Likewise.
* sunrpc/rpc/xdr.h: Likewise.
* sunrpc/rpc_clntout.c: Likewise.
* sunrpc/rpc_cmsg.c: Likewise.
* sunrpc/rpc_dtable.c: Likewise.
* sunrpc/rpc_prot.c: Likewise.
* sunrpc/svc.c: Likewise.
* sunrpc/svc_auth.c: Likewise.
* sunrpc/svc_authux.c: Likewise.
* sunrpc/svc_raw.c: Likewise.
* sunrpc/svc_run.c: Likewise.
* sunrpc/svc_simple.c: Likewise.
* sunrpc/svc_tcp.c: Likewise.
* sunrpc/svc_udp.c: Likewise.
* sunrpc/xdr.c: Likewise.
* sunrpc/xdr_array.c: Likewise.
* sunrpc/xdr_mem.c: Likewise.
* sunrpc/xdr_rec.c: Likewise.
* sunrpc/xdr_ref.c: Likewise.
* sunrpc/xdr_stdio.c: Likewise.
1997-03-25 13:39 Ulrich Drepper <drepper@cygnus.com>
* math/libm-test.c (log2_test): Compile this function and call it.
(exp2_test): Likewise, but check whether function really exists
before testing.
* math/Makefile (libm-calls): Add s_log2 and s_exp2.
1997-03-25 04:50 Ulrich Drepper <drepper@cygnus.com>
Implement exp2 function.
* sysdeps/libm-i387/s_exp2.S: New file.
* sysdeps/libm-i387/s_exp2f.S: New file.
* sysdeps/libm-i387/s_exp2l.S: New file.
Implement log2 function.
* sysdeps/libm-i387/s_log2.S: New file.
* sysdeps/libm-i387/s_log2f.S: New file.
* sysdeps/libm-i387/s_log2l.S: New file.
* sysdeps/libm-ieee754/s_log2.c: New file.
* sysdeps/libm-ieee754/s_log2f.c: New file.
* sysdeps/stub/s_log2.c: New file. Stub version.
1997-03-27 01:59:53 +00:00
|
|
|
|
int
|
2015-10-20 11:54:09 +00:00
|
|
|
|
__glob_pattern_type (const char *pattern, int quote)
|
1995-02-18 01:27:10 +00:00
|
|
|
|
{
|
2013-06-07 22:24:35 +00:00
|
|
|
|
const char *p;
|
2007-02-14 19:52:38 +00:00
|
|
|
|
int ret = 0;
|
1995-02-18 01:27:10 +00:00
|
|
|
|
|
|
|
|
|
for (p = pattern; *p != '\0'; ++p)
|
|
|
|
|
switch (*p)
|
|
|
|
|
{
|
|
|
|
|
case '?':
|
|
|
|
|
case '*':
|
|
|
|
|
return 1;
|
|
|
|
|
|
|
|
|
|
case '\\':
|
2007-02-14 19:52:38 +00:00
|
|
|
|
if (quote)
|
|
|
|
|
{
|
|
|
|
|
if (p[1] != '\0')
|
|
|
|
|
++p;
|
|
|
|
|
ret |= 2;
|
|
|
|
|
}
|
1995-02-18 01:27:10 +00:00
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case '[':
|
2007-02-14 19:52:38 +00:00
|
|
|
|
ret |= 4;
|
1995-02-18 01:27:10 +00:00
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case ']':
|
2007-02-14 19:52:38 +00:00
|
|
|
|
if (ret & 4)
|
1995-02-18 01:27:10 +00:00
|
|
|
|
return 1;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
2007-02-14 19:52:38 +00:00
|
|
|
|
return ret;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Return nonzero if PATTERN contains any metacharacters.
|
|
|
|
|
Metacharacters can be quoted with backslashes if QUOTE is nonzero. */
|
|
|
|
|
int
|
2015-10-20 11:54:09 +00:00
|
|
|
|
__glob_pattern_p (const char *pattern, int quote)
|
2007-02-14 19:52:38 +00:00
|
|
|
|
{
|
|
|
|
|
return __glob_pattern_type (pattern, quote) == 1;
|
1995-02-18 01:27:10 +00:00
|
|
|
|
}
|
1998-08-10 15:54:54 +00:00
|
|
|
|
# ifdef _LIBC
|
Update.
1997-03-27 02:28 Ulrich Drepper <drepper@cygnus.com>
* gmon/gmon.c (monstartup): Mark all messages.
(write_call_graph): Rewrite to use larger I/O vector for writev
call to reduce syscall overhead.
(write_bb_counts): Simplify writev handling.
* inet/rexec.c: Make string parameters `const'.
* resolv/netdb.h: Add prototypes for rcmd, rexec, ruserok, and
rresvport.
* math/Makefile: Don't define CFLAGS-* macros to prevent inlining
in libm-test.
* math/libm-test.c (this_does_nothing): Remove functions. It's
notuseful on any platform but ix86.
(inverse_func_pair_test): Don't use this_does_nothing. Use
memory reference.
(identities1_test): Likewise.
(identities2_test): Likewise.
(identities3_test): Likewise.
(basic_test): Likewise.
Patch by Andreas Schwab.
(BUILD_COMPLEX): New macro. Create complex number from real and
imaginary parts. This works around bugs/inefficiencies in current
gcc.
(cexp_test): Use BUILD_COMPLEX. Add more tests.
* nss/nsswitch.c: Fix typo.
* posix/glob.h: Add declaration for glob_pattern_p.
* posix/glob.c: Rename glob_pattern_p to __glob_pattern_p and
make glob_pattern_p a weak alias. This function is used in other
packages (e.g. bash).
* signal/Makefile (routines): Add sigisempty, sigandset, and
sigorset.
* signal/signal.h: Add prototypes for sigisempty, sigandset, and
sigorset.
* signal/sigisempty.c: New file.
* signal/sigandset.c: New file.
* signal/sigorset.c: New file.
* sysdeps/generic/sigset.h: Define __sigisemptyset, __sigandset,
and __sigorset.
* sysdeps/unix/sysv/linux/sigset.h: Likewise.
* stdlib/strtod.c: Handle `n-char-sequence' in NaN parsing. It
determines the bits in the mantissa part of the NaN.
* stdlib/strtof.c: Define SET_MANTISSA for float type.
* wcsmbs/wcstof.c: Define SET_MANTISSA for float type.
* stdlib/strtold.c: Define SET_MANTISSA for long double type.
* wcsmbs/wcstold.c: Define SET_MANTISSA for long double type.
* sysdeps/libm-ieee754/s_cexp.c: Use explicit assignment to
complex number components. Some more corrects for special cases.
* sysdeps/libm-ieee754/s_cexpf.c: Likewise.
* sysdeps/libm-ieee754/s_cexpl.c: Likewise.
* sysdeps/sparc/elf/start.S: Remove as per request of Miguel de Icaza.
* sysdeps/unix/sysv/linux/netinet/icmp.h: Remove since we have
ip_icmp.h. Reported by HJ Lu.
1997-03-25 03:50 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/m68k/Makefile (CFLAGS-rtld.c): Add -Wno-unused.
* sysdeps/m68k/dl-machine.h (elf_machine_rela): Rewritten as for
i386.
(elf_machine_lookup_noexec_p, elf_machine_lookup_noplt_p,
ELF_MACHINE_RELOC_NOPLT): Define.
1997-03-25 03:48 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* grp/grp.h: Include <stddef.h> only once.
1997-03-25 09:38 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/unix/sysv/linux/termbits.h (OXTABS): Don't define.
* sysdeps/unix/sysv/linux/alpha/termbits.h (OXTABS): Likewise.
* termios/sys/ttydefaults.h (TTYDEF_OFLAG): Use either OXTABS or
TAB3, if one of them is defined.
1997-03-26 04:53 Ulrich Drepper <drepper@cygnus.com>
* posix/glob.c (next_brace_sub): Decrement depth counter when '}'
is found.
Patch by Dennis Henriksen <opus@flamingo.osrl.dk>.
1997-03-25 16:25 Thorsten Kukuk <kukuk@vt.uni-paderborn.de>
* sunrpc/Makefile: Comment gccwarn out.
* sunrpc/auth_none.c: Fix prototypes and parameters for compiling
with enabled warnings.
* sunrpc/auth_unix.c: Likewise.
* sunrpc/authuxprot.c: Likewise.
* sunrpc/bindrsvprt.c: Likewise.
* sunrpc/clnt_gen.c: Likewise.
* sunrpc/clnt_perr.c: Likewise.
* sunrpc/clnt_raw.c: Likewise.
* sunrpc/clnt_simp.c: Likewise.
* sunrpc/clnt_tcp.c: Likewise.
* sunrpc/clnt_udp.c: Likewise.
* sunrpc/get_myaddr.c: Likewise.
* sunrpc/getrpcport.c: Likewise.
* sunrpc/pm_getmaps.c: Likewise.
* sunrpc/pm_getport.c: Likewise.
* sunrpc/pmap_clnt.c: Likewise.
* sunrpc/pmap_prot.c: Likewise.
* sunrpc/pmap_prot2.c: Likewise.
* sunrpc/pmap_rmt.c: Likewise.
* sunrpc/rpc/auth.h: Likewise.
* sunrpc/rpc/clnt.h: Likewise.
* sunrpc/rpc/pmap_clnt.h: Likewise.
* sunrpc/rpc/svc.h: Likewise.
* sunrpc/rpc/svc_auth.h: Likewise.
* sunrpc/rpc/types.h: Likewise.
* sunrpc/rpc/xdr.h: Likewise.
* sunrpc/rpc_clntout.c: Likewise.
* sunrpc/rpc_cmsg.c: Likewise.
* sunrpc/rpc_dtable.c: Likewise.
* sunrpc/rpc_prot.c: Likewise.
* sunrpc/svc.c: Likewise.
* sunrpc/svc_auth.c: Likewise.
* sunrpc/svc_authux.c: Likewise.
* sunrpc/svc_raw.c: Likewise.
* sunrpc/svc_run.c: Likewise.
* sunrpc/svc_simple.c: Likewise.
* sunrpc/svc_tcp.c: Likewise.
* sunrpc/svc_udp.c: Likewise.
* sunrpc/xdr.c: Likewise.
* sunrpc/xdr_array.c: Likewise.
* sunrpc/xdr_mem.c: Likewise.
* sunrpc/xdr_rec.c: Likewise.
* sunrpc/xdr_ref.c: Likewise.
* sunrpc/xdr_stdio.c: Likewise.
1997-03-25 13:39 Ulrich Drepper <drepper@cygnus.com>
* math/libm-test.c (log2_test): Compile this function and call it.
(exp2_test): Likewise, but check whether function really exists
before testing.
* math/Makefile (libm-calls): Add s_log2 and s_exp2.
1997-03-25 04:50 Ulrich Drepper <drepper@cygnus.com>
Implement exp2 function.
* sysdeps/libm-i387/s_exp2.S: New file.
* sysdeps/libm-i387/s_exp2f.S: New file.
* sysdeps/libm-i387/s_exp2l.S: New file.
Implement log2 function.
* sysdeps/libm-i387/s_log2.S: New file.
* sysdeps/libm-i387/s_log2f.S: New file.
* sysdeps/libm-i387/s_log2l.S: New file.
* sysdeps/libm-ieee754/s_log2.c: New file.
* sysdeps/libm-ieee754/s_log2f.c: New file.
* sysdeps/stub/s_log2.c: New file. Stub version.
1997-03-27 01:59:53 +00:00
|
|
|
|
weak_alias (__glob_pattern_p, glob_pattern_p)
|
1998-08-10 15:54:54 +00:00
|
|
|
|
# endif
|
Update.
1997-03-27 02:28 Ulrich Drepper <drepper@cygnus.com>
* gmon/gmon.c (monstartup): Mark all messages.
(write_call_graph): Rewrite to use larger I/O vector for writev
call to reduce syscall overhead.
(write_bb_counts): Simplify writev handling.
* inet/rexec.c: Make string parameters `const'.
* resolv/netdb.h: Add prototypes for rcmd, rexec, ruserok, and
rresvport.
* math/Makefile: Don't define CFLAGS-* macros to prevent inlining
in libm-test.
* math/libm-test.c (this_does_nothing): Remove functions. It's
notuseful on any platform but ix86.
(inverse_func_pair_test): Don't use this_does_nothing. Use
memory reference.
(identities1_test): Likewise.
(identities2_test): Likewise.
(identities3_test): Likewise.
(basic_test): Likewise.
Patch by Andreas Schwab.
(BUILD_COMPLEX): New macro. Create complex number from real and
imaginary parts. This works around bugs/inefficiencies in current
gcc.
(cexp_test): Use BUILD_COMPLEX. Add more tests.
* nss/nsswitch.c: Fix typo.
* posix/glob.h: Add declaration for glob_pattern_p.
* posix/glob.c: Rename glob_pattern_p to __glob_pattern_p and
make glob_pattern_p a weak alias. This function is used in other
packages (e.g. bash).
* signal/Makefile (routines): Add sigisempty, sigandset, and
sigorset.
* signal/signal.h: Add prototypes for sigisempty, sigandset, and
sigorset.
* signal/sigisempty.c: New file.
* signal/sigandset.c: New file.
* signal/sigorset.c: New file.
* sysdeps/generic/sigset.h: Define __sigisemptyset, __sigandset,
and __sigorset.
* sysdeps/unix/sysv/linux/sigset.h: Likewise.
* stdlib/strtod.c: Handle `n-char-sequence' in NaN parsing. It
determines the bits in the mantissa part of the NaN.
* stdlib/strtof.c: Define SET_MANTISSA for float type.
* wcsmbs/wcstof.c: Define SET_MANTISSA for float type.
* stdlib/strtold.c: Define SET_MANTISSA for long double type.
* wcsmbs/wcstold.c: Define SET_MANTISSA for long double type.
* sysdeps/libm-ieee754/s_cexp.c: Use explicit assignment to
complex number components. Some more corrects for special cases.
* sysdeps/libm-ieee754/s_cexpf.c: Likewise.
* sysdeps/libm-ieee754/s_cexpl.c: Likewise.
* sysdeps/sparc/elf/start.S: Remove as per request of Miguel de Icaza.
* sysdeps/unix/sysv/linux/netinet/icmp.h: Remove since we have
ip_icmp.h. Reported by HJ Lu.
1997-03-25 03:50 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/m68k/Makefile (CFLAGS-rtld.c): Add -Wno-unused.
* sysdeps/m68k/dl-machine.h (elf_machine_rela): Rewritten as for
i386.
(elf_machine_lookup_noexec_p, elf_machine_lookup_noplt_p,
ELF_MACHINE_RELOC_NOPLT): Define.
1997-03-25 03:48 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* grp/grp.h: Include <stddef.h> only once.
1997-03-25 09:38 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/unix/sysv/linux/termbits.h (OXTABS): Don't define.
* sysdeps/unix/sysv/linux/alpha/termbits.h (OXTABS): Likewise.
* termios/sys/ttydefaults.h (TTYDEF_OFLAG): Use either OXTABS or
TAB3, if one of them is defined.
1997-03-26 04:53 Ulrich Drepper <drepper@cygnus.com>
* posix/glob.c (next_brace_sub): Decrement depth counter when '}'
is found.
Patch by Dennis Henriksen <opus@flamingo.osrl.dk>.
1997-03-25 16:25 Thorsten Kukuk <kukuk@vt.uni-paderborn.de>
* sunrpc/Makefile: Comment gccwarn out.
* sunrpc/auth_none.c: Fix prototypes and parameters for compiling
with enabled warnings.
* sunrpc/auth_unix.c: Likewise.
* sunrpc/authuxprot.c: Likewise.
* sunrpc/bindrsvprt.c: Likewise.
* sunrpc/clnt_gen.c: Likewise.
* sunrpc/clnt_perr.c: Likewise.
* sunrpc/clnt_raw.c: Likewise.
* sunrpc/clnt_simp.c: Likewise.
* sunrpc/clnt_tcp.c: Likewise.
* sunrpc/clnt_udp.c: Likewise.
* sunrpc/get_myaddr.c: Likewise.
* sunrpc/getrpcport.c: Likewise.
* sunrpc/pm_getmaps.c: Likewise.
* sunrpc/pm_getport.c: Likewise.
* sunrpc/pmap_clnt.c: Likewise.
* sunrpc/pmap_prot.c: Likewise.
* sunrpc/pmap_prot2.c: Likewise.
* sunrpc/pmap_rmt.c: Likewise.
* sunrpc/rpc/auth.h: Likewise.
* sunrpc/rpc/clnt.h: Likewise.
* sunrpc/rpc/pmap_clnt.h: Likewise.
* sunrpc/rpc/svc.h: Likewise.
* sunrpc/rpc/svc_auth.h: Likewise.
* sunrpc/rpc/types.h: Likewise.
* sunrpc/rpc/xdr.h: Likewise.
* sunrpc/rpc_clntout.c: Likewise.
* sunrpc/rpc_cmsg.c: Likewise.
* sunrpc/rpc_dtable.c: Likewise.
* sunrpc/rpc_prot.c: Likewise.
* sunrpc/svc.c: Likewise.
* sunrpc/svc_auth.c: Likewise.
* sunrpc/svc_authux.c: Likewise.
* sunrpc/svc_raw.c: Likewise.
* sunrpc/svc_run.c: Likewise.
* sunrpc/svc_simple.c: Likewise.
* sunrpc/svc_tcp.c: Likewise.
* sunrpc/svc_udp.c: Likewise.
* sunrpc/xdr.c: Likewise.
* sunrpc/xdr_array.c: Likewise.
* sunrpc/xdr_mem.c: Likewise.
* sunrpc/xdr_rec.c: Likewise.
* sunrpc/xdr_ref.c: Likewise.
* sunrpc/xdr_stdio.c: Likewise.
1997-03-25 13:39 Ulrich Drepper <drepper@cygnus.com>
* math/libm-test.c (log2_test): Compile this function and call it.
(exp2_test): Likewise, but check whether function really exists
before testing.
* math/Makefile (libm-calls): Add s_log2 and s_exp2.
1997-03-25 04:50 Ulrich Drepper <drepper@cygnus.com>
Implement exp2 function.
* sysdeps/libm-i387/s_exp2.S: New file.
* sysdeps/libm-i387/s_exp2f.S: New file.
* sysdeps/libm-i387/s_exp2l.S: New file.
Implement log2 function.
* sysdeps/libm-i387/s_log2.S: New file.
* sysdeps/libm-i387/s_log2f.S: New file.
* sysdeps/libm-i387/s_log2l.S: New file.
* sysdeps/libm-ieee754/s_log2.c: New file.
* sysdeps/libm-ieee754/s_log2f.c: New file.
* sysdeps/stub/s_log2.c: New file. Stub version.
1997-03-27 01:59:53 +00:00
|
|
|
|
#endif
|
1995-02-18 01:27:10 +00:00
|
|
|
|
|
2000-08-19 16:58:09 +00:00
|
|
|
|
#endif /* !GLOB_ONLY_P */
|
|
|
|
|
|
1995-02-18 01:27:10 +00:00
|
|
|
|
|
2004-09-30 06:42:39 +00:00
|
|
|
|
/* We put this in a separate function mainly to allow the memory
|
|
|
|
|
allocated with alloca to be recycled. */
|
|
|
|
|
#if !defined _LIBC || !defined GLOB_ONLY_P
|
|
|
|
|
static int
|
2007-10-15 04:59:16 +00:00
|
|
|
|
__attribute_noinline__
|
|
|
|
|
link_exists2_p (const char *dir, size_t dirlen, const char *fname,
|
|
|
|
|
glob_t *pglob
|
|
|
|
|
# ifndef _LIBC
|
|
|
|
|
, int flags
|
|
|
|
|
# endif
|
|
|
|
|
)
|
2004-09-30 06:42:39 +00:00
|
|
|
|
{
|
|
|
|
|
size_t fnamelen = strlen (fname);
|
|
|
|
|
char *fullname = (char *) __alloca (dirlen + 1 + fnamelen + 1);
|
|
|
|
|
struct stat st;
|
2007-10-15 04:59:16 +00:00
|
|
|
|
# ifndef _LIBC
|
2006-01-11 05:30:12 +00:00
|
|
|
|
struct_stat64 st64;
|
2007-10-15 04:59:16 +00:00
|
|
|
|
# endif
|
2004-09-30 06:42:39 +00:00
|
|
|
|
|
|
|
|
|
mempcpy (mempcpy (mempcpy (fullname, dir, dirlen), "/", 1),
|
|
|
|
|
fname, fnamelen + 1);
|
|
|
|
|
|
2007-10-15 04:59:16 +00:00
|
|
|
|
# ifdef _LIBC
|
|
|
|
|
return (*pglob->gl_stat) (fullname, &st) == 0;
|
|
|
|
|
# else
|
2007-10-15 04:22:46 +00:00
|
|
|
|
return ((__builtin_expect (flags & GLOB_ALTDIRFUNC, 0)
|
2004-09-30 06:42:39 +00:00
|
|
|
|
? (*pglob->gl_stat) (fullname, &st)
|
|
|
|
|
: __stat64 (fullname, &st64)) == 0);
|
2007-10-15 04:59:16 +00:00
|
|
|
|
# endif
|
2004-09-30 06:42:39 +00:00
|
|
|
|
}
|
2007-10-15 04:59:16 +00:00
|
|
|
|
# ifdef _LIBC
|
|
|
|
|
# define link_exists_p(dfd, dirname, dirnamelen, fname, pglob, flags) \
|
|
|
|
|
(__builtin_expect (flags & GLOB_ALTDIRFUNC, 0) \
|
|
|
|
|
? link_exists2_p (dirname, dirnamelen, fname, pglob) \
|
|
|
|
|
: ({ struct stat64 st64; \
|
|
|
|
|
__fxstatat64 (_STAT_VER, dfd, fname, &st64, 0) == 0; }))
|
|
|
|
|
# else
|
|
|
|
|
# define link_exists_p(dfd, dirname, dirnamelen, fname, pglob, flags) \
|
|
|
|
|
link_exists2_p (dirname, dirnamelen, fname, pglob, flags)
|
|
|
|
|
# endif
|
2004-09-30 06:42:39 +00:00
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
1995-02-18 01:27:10 +00:00
|
|
|
|
/* Like `glob', but PATTERN is a final pathname component,
|
|
|
|
|
and matches are searched for in DIRECTORY.
|
|
|
|
|
The GLOB_NOSORT bit in FLAGS is ignored. No sorting is ever done.
|
|
|
|
|
The GLOB_APPEND flag is assumed to be set (always appends). */
|
|
|
|
|
static int
|
2006-01-11 05:30:12 +00:00
|
|
|
|
glob_in_dir (const char *pattern, const char *directory, int flags,
|
|
|
|
|
int (*errfunc) (const char *, int),
|
2011-05-23 03:04:16 +00:00
|
|
|
|
glob_t *pglob, size_t alloca_used)
|
1995-02-18 01:27:10 +00:00
|
|
|
|
{
|
2004-09-30 06:42:39 +00:00
|
|
|
|
size_t dirlen = strlen (directory);
|
2006-01-11 05:30:12 +00:00
|
|
|
|
void *stream = NULL;
|
2006-09-25 15:33:09 +00:00
|
|
|
|
struct globnames
|
1995-02-18 01:27:10 +00:00
|
|
|
|
{
|
2006-09-25 15:33:09 +00:00
|
|
|
|
struct globnames *next;
|
|
|
|
|
size_t count;
|
|
|
|
|
char *name[64];
|
1995-02-18 01:27:10 +00:00
|
|
|
|
};
|
2006-09-25 15:33:09 +00:00
|
|
|
|
#define INITIAL_COUNT sizeof (init_names.name) / sizeof (init_names.name[0])
|
|
|
|
|
struct globnames init_names;
|
|
|
|
|
struct globnames *names = &init_names;
|
|
|
|
|
struct globnames *names_alloca = &init_names;
|
|
|
|
|
size_t nfound = 0;
|
|
|
|
|
size_t cur = 0;
|
1997-11-06 00:02:46 +00:00
|
|
|
|
int meta;
|
|
|
|
|
int save;
|
|
|
|
|
|
2011-05-23 03:04:16 +00:00
|
|
|
|
alloca_used += sizeof (init_names);
|
|
|
|
|
|
2006-09-25 15:33:09 +00:00
|
|
|
|
init_names.next = NULL;
|
|
|
|
|
init_names.count = INITIAL_COUNT;
|
|
|
|
|
|
2007-02-14 19:52:38 +00:00
|
|
|
|
meta = __glob_pattern_type (pattern, !(flags & GLOB_NOESCAPE));
|
2000-03-20 00:46:01 +00:00
|
|
|
|
if (meta == 0 && (flags & (GLOB_NOCHECK|GLOB_NOMAGIC)))
|
1995-02-18 01:27:10 +00:00
|
|
|
|
{
|
2000-03-20 00:46:01 +00:00
|
|
|
|
/* We need not do any tests. The PATTERN contains no meta
|
|
|
|
|
characters and we must not return an error therefore the
|
|
|
|
|
result will always contain exactly one name. */
|
|
|
|
|
flags |= GLOB_NOCHECK;
|
|
|
|
|
}
|
2007-02-14 19:52:38 +00:00
|
|
|
|
else if (meta == 0)
|
2000-03-20 00:46:01 +00:00
|
|
|
|
{
|
|
|
|
|
/* Since we use the normal file functions we can also use stat()
|
|
|
|
|
to verify the file is there. */
|
2011-05-23 03:04:16 +00:00
|
|
|
|
union
|
|
|
|
|
{
|
|
|
|
|
struct stat st;
|
|
|
|
|
struct_stat64 st64;
|
|
|
|
|
} ust;
|
2000-03-20 00:46:01 +00:00
|
|
|
|
size_t patlen = strlen (pattern);
|
2011-05-23 03:04:16 +00:00
|
|
|
|
int alloca_fullname = __libc_use_alloca (alloca_used
|
|
|
|
|
+ dirlen + 1 + patlen + 1);
|
|
|
|
|
char *fullname;
|
|
|
|
|
if (alloca_fullname)
|
|
|
|
|
fullname = alloca_account (dirlen + 1 + patlen + 1, alloca_used);
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
fullname = malloc (dirlen + 1 + patlen + 1);
|
|
|
|
|
if (fullname == NULL)
|
|
|
|
|
return GLOB_NOSPACE;
|
|
|
|
|
}
|
Update.
1998-07-20 17:09 Ulrich Drepper <drepper@cygnus.com>
* shlib-versions: Remove definition for libSegFault.
* memory.texi: Comment out the relocating allocator description.
* manual/signal.texi: Remove reference to relocating allocator.
* manual/top-menu.texi: Regenerated.
* posix/fnmatch.c: Implement [: :] and change to recognize
^ as negation only when not _POSIXLY_CORRECT.
* sysdeps/generic/glob.c: Add several optimizations.
* posix/glob.h: Undefine __PMT to prevent warnings.
Reported by Roland McGrath.
* posix/regex.c: Define namespace macros only for _LIBC.
* sysdeps/arm/dl-machine.h: Fix typo.
* sysdeps/unix/sysv/sysv4/solaris2/sigpending.c: New file.
* sysdeps/unix/sysv/sysv4/solaris2/sigstack.c: New file.
* sysdeps/unix/sysv/sysv4/solaris2/sigwaitinfo.c: New file.
* sysdeps/unix/sysv/sysv4/solaris2/syscalls.list: Add sigaltstack,
sigpending, sigqueue, and sigtimedwait.
* sysdeps/unix/sysv/sysv4/solaris2/sparc/sparc32/syscall.S: New file.
* timezone/leapseconds: Update from tzdata1998f.
1998-07-18 Mark Kettenis <kettenis@phys.uva.nl>
* stdio/stdio.h [__USE_GNU]: Add prototype for fputs_unlocked.
* stdio/Versions [GLIBC_2.1]: Add fputs_unlocked.
* libio/stdio.h: Fix typo.
1998-07-19 Roland McGrath <roland@baalperazim.frob.com>
* sysdeps/mach/hurd/dl-sysdep.c (_dl_sysdep_start): #if 0 out the
magic memobj port arg parsing stuff. Fix it someday when we are ready
to really use it.
(_dl_sysdep_output): New function, modified from _dl_sysdep_error.
(_dl_sysdep_error, _dl_sysdep_message, _dl_sysdep_fatal): Removed.
1998-07-19 Roland McGrath <roland@baalperazim.frob.com>
* stdio/fputs.c: Add fputs_unlocked as weak alias for fputs.
1998-07-19 Roland McGrath <roland@baalperazim.frob.com>
* sysdeps/posix/sigsuspend.c: Define __sigsuspend with sigsuspend as
a weak alias.
* sysdeps/mach/hurd/sigsuspend.c: Likewise.
* sysdeps/generic/sigsuspend.c: Likewise.
1998-07-19 Roland McGrath <roland@baalperazim.frob.com>
* sysdeps/mach/hurd/i386/sigcontextinfo.h: New file.
1998-07-19 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* Makerules (map-file): Don't use $(wildcard) to find the
generated version script, instead look in $(version-maps).
($(common-objpfx)libc.so): Only depend on libc.map if versioning
is used.
* extra-lib.mk ($(objpfx)$(lib).so): Only depend on version script
if versioning is used. Don't use $(wildcard) to find the
generated version script, instead look in $(verson-maps).
1998-07-17 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/generic/segfault.c: Rename GET_EIP to GET_PC. Remove
unused function handle.
* sysdeps/generic/sigcontextinfo.h: Rename GET_EIP to GET_PC.
* sysdeps/unix/sysv/linux/i386/sigcontextinfo.h: Likewise.
* debug/catchsegv.sh: Fix argument processing, quoting and various
typos. Put the crash info always in the current directory. Find
program in $PATH if it contains no directory component.
* Makerules (install-lib.so-versioned,
install-lib.so-unversioned): New variables.
(install-lib-nosubdir): Depend on unversioned libs in
slibdir, not libdir.
1998-07-19 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* Make-dist (+tsrcs): Remove references to %-map variables and
*.map files. Add Versions in subdirs.
* Makerules (distinfo-vars): Don't write out %-map variables.
1998-07-20 13:55 Ulrich Drepper <drepper@cygnus.com>
* inet/protocols/rwhod.h: Remove definition of _PATH_RWHODIR.
Include <paths.h> instead.
* sysdeps/generic/paths.h: Define _PATH_RWHODIR.
* sysdeps/unix/sysv/linux/paths.h: Likewise.
Reported by Dale Scheetz <dwarf@polaris.net>.
1998-07-17 21:44 Ulrich Drepper <drepper@cygnus.com>
* catgets/open_catalog.c: Strictly check whether catalog file is
larger enough for the data. Reported by Andries.Brouwer@cwi.nl.
1998-07-20 17:25:48 +00:00
|
|
|
|
|
2000-03-20 00:46:01 +00:00
|
|
|
|
mempcpy (mempcpy (mempcpy (fullname, directory, dirlen),
|
|
|
|
|
"/", 1),
|
|
|
|
|
pattern, patlen + 1);
|
2007-10-15 04:22:46 +00:00
|
|
|
|
if ((__builtin_expect (flags & GLOB_ALTDIRFUNC, 0)
|
2011-05-23 03:04:16 +00:00
|
|
|
|
? (*pglob->gl_stat) (fullname, &ust.st)
|
|
|
|
|
: __stat64 (fullname, &ust.st64)) == 0)
|
2000-03-20 00:46:01 +00:00
|
|
|
|
/* We found this file to be existing. Now tell the rest
|
|
|
|
|
of the function to copy this name into the result. */
|
|
|
|
|
flags |= GLOB_NOCHECK;
|
2011-05-23 03:04:16 +00:00
|
|
|
|
|
2014-02-10 13:45:42 +00:00
|
|
|
|
if (__glibc_unlikely (!alloca_fullname))
|
2011-05-23 03:04:16 +00:00
|
|
|
|
free (fullname);
|
1995-02-18 01:27:10 +00:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2007-10-15 04:22:46 +00:00
|
|
|
|
stream = (__builtin_expect (flags & GLOB_ALTDIRFUNC, 0)
|
2007-02-14 19:52:38 +00:00
|
|
|
|
? (*pglob->gl_opendir) (directory)
|
|
|
|
|
: opendir (directory));
|
|
|
|
|
if (stream == NULL)
|
1995-02-18 01:27:10 +00:00
|
|
|
|
{
|
2007-02-14 19:52:38 +00:00
|
|
|
|
if (errno != ENOTDIR
|
|
|
|
|
&& ((errfunc != NULL && (*errfunc) (directory, errno))
|
|
|
|
|
|| (flags & GLOB_ERR)))
|
|
|
|
|
return GLOB_ABORTED;
|
Update.
1998-07-20 17:09 Ulrich Drepper <drepper@cygnus.com>
* shlib-versions: Remove definition for libSegFault.
* memory.texi: Comment out the relocating allocator description.
* manual/signal.texi: Remove reference to relocating allocator.
* manual/top-menu.texi: Regenerated.
* posix/fnmatch.c: Implement [: :] and change to recognize
^ as negation only when not _POSIXLY_CORRECT.
* sysdeps/generic/glob.c: Add several optimizations.
* posix/glob.h: Undefine __PMT to prevent warnings.
Reported by Roland McGrath.
* posix/regex.c: Define namespace macros only for _LIBC.
* sysdeps/arm/dl-machine.h: Fix typo.
* sysdeps/unix/sysv/sysv4/solaris2/sigpending.c: New file.
* sysdeps/unix/sysv/sysv4/solaris2/sigstack.c: New file.
* sysdeps/unix/sysv/sysv4/solaris2/sigwaitinfo.c: New file.
* sysdeps/unix/sysv/sysv4/solaris2/syscalls.list: Add sigaltstack,
sigpending, sigqueue, and sigtimedwait.
* sysdeps/unix/sysv/sysv4/solaris2/sparc/sparc32/syscall.S: New file.
* timezone/leapseconds: Update from tzdata1998f.
1998-07-18 Mark Kettenis <kettenis@phys.uva.nl>
* stdio/stdio.h [__USE_GNU]: Add prototype for fputs_unlocked.
* stdio/Versions [GLIBC_2.1]: Add fputs_unlocked.
* libio/stdio.h: Fix typo.
1998-07-19 Roland McGrath <roland@baalperazim.frob.com>
* sysdeps/mach/hurd/dl-sysdep.c (_dl_sysdep_start): #if 0 out the
magic memobj port arg parsing stuff. Fix it someday when we are ready
to really use it.
(_dl_sysdep_output): New function, modified from _dl_sysdep_error.
(_dl_sysdep_error, _dl_sysdep_message, _dl_sysdep_fatal): Removed.
1998-07-19 Roland McGrath <roland@baalperazim.frob.com>
* stdio/fputs.c: Add fputs_unlocked as weak alias for fputs.
1998-07-19 Roland McGrath <roland@baalperazim.frob.com>
* sysdeps/posix/sigsuspend.c: Define __sigsuspend with sigsuspend as
a weak alias.
* sysdeps/mach/hurd/sigsuspend.c: Likewise.
* sysdeps/generic/sigsuspend.c: Likewise.
1998-07-19 Roland McGrath <roland@baalperazim.frob.com>
* sysdeps/mach/hurd/i386/sigcontextinfo.h: New file.
1998-07-19 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* Makerules (map-file): Don't use $(wildcard) to find the
generated version script, instead look in $(version-maps).
($(common-objpfx)libc.so): Only depend on libc.map if versioning
is used.
* extra-lib.mk ($(objpfx)$(lib).so): Only depend on version script
if versioning is used. Don't use $(wildcard) to find the
generated version script, instead look in $(verson-maps).
1998-07-17 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/generic/segfault.c: Rename GET_EIP to GET_PC. Remove
unused function handle.
* sysdeps/generic/sigcontextinfo.h: Rename GET_EIP to GET_PC.
* sysdeps/unix/sysv/linux/i386/sigcontextinfo.h: Likewise.
* debug/catchsegv.sh: Fix argument processing, quoting and various
typos. Put the crash info always in the current directory. Find
program in $PATH if it contains no directory component.
* Makerules (install-lib.so-versioned,
install-lib.so-unversioned): New variables.
(install-lib-nosubdir): Depend on unversioned libs in
slibdir, not libdir.
1998-07-19 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* Make-dist (+tsrcs): Remove references to %-map variables and
*.map files. Add Versions in subdirs.
* Makerules (distinfo-vars): Don't write out %-map variables.
1998-07-20 13:55 Ulrich Drepper <drepper@cygnus.com>
* inet/protocols/rwhod.h: Remove definition of _PATH_RWHODIR.
Include <paths.h> instead.
* sysdeps/generic/paths.h: Define _PATH_RWHODIR.
* sysdeps/unix/sysv/linux/paths.h: Likewise.
Reported by Dale Scheetz <dwarf@polaris.net>.
1998-07-17 21:44 Ulrich Drepper <drepper@cygnus.com>
* catgets/open_catalog.c: Strictly check whether catalog file is
larger enough for the data. Reported by Andries.Brouwer@cwi.nl.
1998-07-20 17:25:48 +00:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2007-10-15 04:59:16 +00:00
|
|
|
|
#ifdef _LIBC
|
|
|
|
|
int dfd = (__builtin_expect (flags & GLOB_ALTDIRFUNC, 0)
|
|
|
|
|
? -1 : dirfd ((DIR *) stream));
|
|
|
|
|
#endif
|
2007-02-14 19:52:38 +00:00
|
|
|
|
int fnm_flags = ((!(flags & GLOB_PERIOD) ? FNM_PERIOD : 0)
|
|
|
|
|
| ((flags & GLOB_NOESCAPE) ? FNM_NOESCAPE : 0)
|
Update.
1998-07-20 17:09 Ulrich Drepper <drepper@cygnus.com>
* shlib-versions: Remove definition for libSegFault.
* memory.texi: Comment out the relocating allocator description.
* manual/signal.texi: Remove reference to relocating allocator.
* manual/top-menu.texi: Regenerated.
* posix/fnmatch.c: Implement [: :] and change to recognize
^ as negation only when not _POSIXLY_CORRECT.
* sysdeps/generic/glob.c: Add several optimizations.
* posix/glob.h: Undefine __PMT to prevent warnings.
Reported by Roland McGrath.
* posix/regex.c: Define namespace macros only for _LIBC.
* sysdeps/arm/dl-machine.h: Fix typo.
* sysdeps/unix/sysv/sysv4/solaris2/sigpending.c: New file.
* sysdeps/unix/sysv/sysv4/solaris2/sigstack.c: New file.
* sysdeps/unix/sysv/sysv4/solaris2/sigwaitinfo.c: New file.
* sysdeps/unix/sysv/sysv4/solaris2/syscalls.list: Add sigaltstack,
sigpending, sigqueue, and sigtimedwait.
* sysdeps/unix/sysv/sysv4/solaris2/sparc/sparc32/syscall.S: New file.
* timezone/leapseconds: Update from tzdata1998f.
1998-07-18 Mark Kettenis <kettenis@phys.uva.nl>
* stdio/stdio.h [__USE_GNU]: Add prototype for fputs_unlocked.
* stdio/Versions [GLIBC_2.1]: Add fputs_unlocked.
* libio/stdio.h: Fix typo.
1998-07-19 Roland McGrath <roland@baalperazim.frob.com>
* sysdeps/mach/hurd/dl-sysdep.c (_dl_sysdep_start): #if 0 out the
magic memobj port arg parsing stuff. Fix it someday when we are ready
to really use it.
(_dl_sysdep_output): New function, modified from _dl_sysdep_error.
(_dl_sysdep_error, _dl_sysdep_message, _dl_sysdep_fatal): Removed.
1998-07-19 Roland McGrath <roland@baalperazim.frob.com>
* stdio/fputs.c: Add fputs_unlocked as weak alias for fputs.
1998-07-19 Roland McGrath <roland@baalperazim.frob.com>
* sysdeps/posix/sigsuspend.c: Define __sigsuspend with sigsuspend as
a weak alias.
* sysdeps/mach/hurd/sigsuspend.c: Likewise.
* sysdeps/generic/sigsuspend.c: Likewise.
1998-07-19 Roland McGrath <roland@baalperazim.frob.com>
* sysdeps/mach/hurd/i386/sigcontextinfo.h: New file.
1998-07-19 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* Makerules (map-file): Don't use $(wildcard) to find the
generated version script, instead look in $(version-maps).
($(common-objpfx)libc.so): Only depend on libc.map if versioning
is used.
* extra-lib.mk ($(objpfx)$(lib).so): Only depend on version script
if versioning is used. Don't use $(wildcard) to find the
generated version script, instead look in $(verson-maps).
1998-07-17 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/generic/segfault.c: Rename GET_EIP to GET_PC. Remove
unused function handle.
* sysdeps/generic/sigcontextinfo.h: Rename GET_EIP to GET_PC.
* sysdeps/unix/sysv/linux/i386/sigcontextinfo.h: Likewise.
* debug/catchsegv.sh: Fix argument processing, quoting and various
typos. Put the crash info always in the current directory. Find
program in $PATH if it contains no directory component.
* Makerules (install-lib.so-versioned,
install-lib.so-unversioned): New variables.
(install-lib-nosubdir): Depend on unversioned libs in
slibdir, not libdir.
1998-07-19 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* Make-dist (+tsrcs): Remove references to %-map variables and
*.map files. Add Versions in subdirs.
* Makerules (distinfo-vars): Don't write out %-map variables.
1998-07-20 13:55 Ulrich Drepper <drepper@cygnus.com>
* inet/protocols/rwhod.h: Remove definition of _PATH_RWHODIR.
Include <paths.h> instead.
* sysdeps/generic/paths.h: Define _PATH_RWHODIR.
* sysdeps/unix/sysv/linux/paths.h: Likewise.
Reported by Dale Scheetz <dwarf@polaris.net>.
1998-07-17 21:44 Ulrich Drepper <drepper@cygnus.com>
* catgets/open_catalog.c: Strictly check whether catalog file is
larger enough for the data. Reported by Andries.Brouwer@cwi.nl.
1998-07-20 17:25:48 +00:00
|
|
|
|
#if defined _AMIGA || defined VMS
|
2007-02-14 19:52:38 +00:00
|
|
|
|
| FNM_CASEFOLD
|
Update.
1998-07-20 17:09 Ulrich Drepper <drepper@cygnus.com>
* shlib-versions: Remove definition for libSegFault.
* memory.texi: Comment out the relocating allocator description.
* manual/signal.texi: Remove reference to relocating allocator.
* manual/top-menu.texi: Regenerated.
* posix/fnmatch.c: Implement [: :] and change to recognize
^ as negation only when not _POSIXLY_CORRECT.
* sysdeps/generic/glob.c: Add several optimizations.
* posix/glob.h: Undefine __PMT to prevent warnings.
Reported by Roland McGrath.
* posix/regex.c: Define namespace macros only for _LIBC.
* sysdeps/arm/dl-machine.h: Fix typo.
* sysdeps/unix/sysv/sysv4/solaris2/sigpending.c: New file.
* sysdeps/unix/sysv/sysv4/solaris2/sigstack.c: New file.
* sysdeps/unix/sysv/sysv4/solaris2/sigwaitinfo.c: New file.
* sysdeps/unix/sysv/sysv4/solaris2/syscalls.list: Add sigaltstack,
sigpending, sigqueue, and sigtimedwait.
* sysdeps/unix/sysv/sysv4/solaris2/sparc/sparc32/syscall.S: New file.
* timezone/leapseconds: Update from tzdata1998f.
1998-07-18 Mark Kettenis <kettenis@phys.uva.nl>
* stdio/stdio.h [__USE_GNU]: Add prototype for fputs_unlocked.
* stdio/Versions [GLIBC_2.1]: Add fputs_unlocked.
* libio/stdio.h: Fix typo.
1998-07-19 Roland McGrath <roland@baalperazim.frob.com>
* sysdeps/mach/hurd/dl-sysdep.c (_dl_sysdep_start): #if 0 out the
magic memobj port arg parsing stuff. Fix it someday when we are ready
to really use it.
(_dl_sysdep_output): New function, modified from _dl_sysdep_error.
(_dl_sysdep_error, _dl_sysdep_message, _dl_sysdep_fatal): Removed.
1998-07-19 Roland McGrath <roland@baalperazim.frob.com>
* stdio/fputs.c: Add fputs_unlocked as weak alias for fputs.
1998-07-19 Roland McGrath <roland@baalperazim.frob.com>
* sysdeps/posix/sigsuspend.c: Define __sigsuspend with sigsuspend as
a weak alias.
* sysdeps/mach/hurd/sigsuspend.c: Likewise.
* sysdeps/generic/sigsuspend.c: Likewise.
1998-07-19 Roland McGrath <roland@baalperazim.frob.com>
* sysdeps/mach/hurd/i386/sigcontextinfo.h: New file.
1998-07-19 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* Makerules (map-file): Don't use $(wildcard) to find the
generated version script, instead look in $(version-maps).
($(common-objpfx)libc.so): Only depend on libc.map if versioning
is used.
* extra-lib.mk ($(objpfx)$(lib).so): Only depend on version script
if versioning is used. Don't use $(wildcard) to find the
generated version script, instead look in $(verson-maps).
1998-07-17 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/generic/segfault.c: Rename GET_EIP to GET_PC. Remove
unused function handle.
* sysdeps/generic/sigcontextinfo.h: Rename GET_EIP to GET_PC.
* sysdeps/unix/sysv/linux/i386/sigcontextinfo.h: Likewise.
* debug/catchsegv.sh: Fix argument processing, quoting and various
typos. Put the crash info always in the current directory. Find
program in $PATH if it contains no directory component.
* Makerules (install-lib.so-versioned,
install-lib.so-unversioned): New variables.
(install-lib-nosubdir): Depend on unversioned libs in
slibdir, not libdir.
1998-07-19 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* Make-dist (+tsrcs): Remove references to %-map variables and
*.map files. Add Versions in subdirs.
* Makerules (distinfo-vars): Don't write out %-map variables.
1998-07-20 13:55 Ulrich Drepper <drepper@cygnus.com>
* inet/protocols/rwhod.h: Remove definition of _PATH_RWHODIR.
Include <paths.h> instead.
* sysdeps/generic/paths.h: Define _PATH_RWHODIR.
* sysdeps/unix/sysv/linux/paths.h: Likewise.
Reported by Dale Scheetz <dwarf@polaris.net>.
1998-07-17 21:44 Ulrich Drepper <drepper@cygnus.com>
* catgets/open_catalog.c: Strictly check whether catalog file is
larger enough for the data. Reported by Andries.Brouwer@cwi.nl.
1998-07-20 17:25:48 +00:00
|
|
|
|
#endif
|
2007-02-14 19:52:38 +00:00
|
|
|
|
);
|
|
|
|
|
flags |= GLOB_MAGCHAR;
|
Update.
1998-07-20 17:09 Ulrich Drepper <drepper@cygnus.com>
* shlib-versions: Remove definition for libSegFault.
* memory.texi: Comment out the relocating allocator description.
* manual/signal.texi: Remove reference to relocating allocator.
* manual/top-menu.texi: Regenerated.
* posix/fnmatch.c: Implement [: :] and change to recognize
^ as negation only when not _POSIXLY_CORRECT.
* sysdeps/generic/glob.c: Add several optimizations.
* posix/glob.h: Undefine __PMT to prevent warnings.
Reported by Roland McGrath.
* posix/regex.c: Define namespace macros only for _LIBC.
* sysdeps/arm/dl-machine.h: Fix typo.
* sysdeps/unix/sysv/sysv4/solaris2/sigpending.c: New file.
* sysdeps/unix/sysv/sysv4/solaris2/sigstack.c: New file.
* sysdeps/unix/sysv/sysv4/solaris2/sigwaitinfo.c: New file.
* sysdeps/unix/sysv/sysv4/solaris2/syscalls.list: Add sigaltstack,
sigpending, sigqueue, and sigtimedwait.
* sysdeps/unix/sysv/sysv4/solaris2/sparc/sparc32/syscall.S: New file.
* timezone/leapseconds: Update from tzdata1998f.
1998-07-18 Mark Kettenis <kettenis@phys.uva.nl>
* stdio/stdio.h [__USE_GNU]: Add prototype for fputs_unlocked.
* stdio/Versions [GLIBC_2.1]: Add fputs_unlocked.
* libio/stdio.h: Fix typo.
1998-07-19 Roland McGrath <roland@baalperazim.frob.com>
* sysdeps/mach/hurd/dl-sysdep.c (_dl_sysdep_start): #if 0 out the
magic memobj port arg parsing stuff. Fix it someday when we are ready
to really use it.
(_dl_sysdep_output): New function, modified from _dl_sysdep_error.
(_dl_sysdep_error, _dl_sysdep_message, _dl_sysdep_fatal): Removed.
1998-07-19 Roland McGrath <roland@baalperazim.frob.com>
* stdio/fputs.c: Add fputs_unlocked as weak alias for fputs.
1998-07-19 Roland McGrath <roland@baalperazim.frob.com>
* sysdeps/posix/sigsuspend.c: Define __sigsuspend with sigsuspend as
a weak alias.
* sysdeps/mach/hurd/sigsuspend.c: Likewise.
* sysdeps/generic/sigsuspend.c: Likewise.
1998-07-19 Roland McGrath <roland@baalperazim.frob.com>
* sysdeps/mach/hurd/i386/sigcontextinfo.h: New file.
1998-07-19 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* Makerules (map-file): Don't use $(wildcard) to find the
generated version script, instead look in $(version-maps).
($(common-objpfx)libc.so): Only depend on libc.map if versioning
is used.
* extra-lib.mk ($(objpfx)$(lib).so): Only depend on version script
if versioning is used. Don't use $(wildcard) to find the
generated version script, instead look in $(verson-maps).
1998-07-17 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/generic/segfault.c: Rename GET_EIP to GET_PC. Remove
unused function handle.
* sysdeps/generic/sigcontextinfo.h: Rename GET_EIP to GET_PC.
* sysdeps/unix/sysv/linux/i386/sigcontextinfo.h: Likewise.
* debug/catchsegv.sh: Fix argument processing, quoting and various
typos. Put the crash info always in the current directory. Find
program in $PATH if it contains no directory component.
* Makerules (install-lib.so-versioned,
install-lib.so-unversioned): New variables.
(install-lib-nosubdir): Depend on unversioned libs in
slibdir, not libdir.
1998-07-19 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* Make-dist (+tsrcs): Remove references to %-map variables and
*.map files. Add Versions in subdirs.
* Makerules (distinfo-vars): Don't write out %-map variables.
1998-07-20 13:55 Ulrich Drepper <drepper@cygnus.com>
* inet/protocols/rwhod.h: Remove definition of _PATH_RWHODIR.
Include <paths.h> instead.
* sysdeps/generic/paths.h: Define _PATH_RWHODIR.
* sysdeps/unix/sysv/linux/paths.h: Likewise.
Reported by Dale Scheetz <dwarf@polaris.net>.
1998-07-17 21:44 Ulrich Drepper <drepper@cygnus.com>
* catgets/open_catalog.c: Strictly check whether catalog file is
larger enough for the data. Reported by Andries.Brouwer@cwi.nl.
1998-07-20 17:25:48 +00:00
|
|
|
|
|
2007-02-14 19:52:38 +00:00
|
|
|
|
while (1)
|
|
|
|
|
{
|
|
|
|
|
const char *name;
|
|
|
|
|
size_t len;
|
2006-01-11 05:30:12 +00:00
|
|
|
|
#if defined _LIBC && !defined COMPILE_GLOB64
|
2007-02-14 19:52:38 +00:00
|
|
|
|
struct dirent64 *d;
|
|
|
|
|
union
|
|
|
|
|
{
|
|
|
|
|
struct dirent64 d64;
|
|
|
|
|
char room [offsetof (struct dirent64, d_name[0])
|
|
|
|
|
+ NAME_MAX + 1];
|
|
|
|
|
}
|
|
|
|
|
d64buf;
|
2001-02-13 22:17:17 +00:00
|
|
|
|
|
2014-02-10 13:45:42 +00:00
|
|
|
|
if (__glibc_unlikely (flags & GLOB_ALTDIRFUNC))
|
2007-02-14 19:52:38 +00:00
|
|
|
|
{
|
|
|
|
|
struct dirent *d32 = (*pglob->gl_readdir) (stream);
|
|
|
|
|
if (d32 != NULL)
|
2001-02-13 22:17:17 +00:00
|
|
|
|
{
|
2007-02-14 19:52:38 +00:00
|
|
|
|
CONVERT_DIRENT_DIRENT64 (&d64buf.d64, d32);
|
|
|
|
|
d = &d64buf.d64;
|
2001-02-13 22:17:17 +00:00
|
|
|
|
}
|
|
|
|
|
else
|
2007-02-14 19:52:38 +00:00
|
|
|
|
d = NULL;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
d = __readdir64 (stream);
|
2001-02-13 22:17:17 +00:00
|
|
|
|
#else
|
2007-10-15 04:22:46 +00:00
|
|
|
|
struct dirent *d = (__builtin_expect (flags & GLOB_ALTDIRFUNC, 0)
|
2007-02-14 19:52:38 +00:00
|
|
|
|
? ((struct dirent *)
|
|
|
|
|
(*pglob->gl_readdir) (stream))
|
|
|
|
|
: __readdir (stream));
|
2001-02-13 22:17:17 +00:00
|
|
|
|
#endif
|
2007-02-14 19:52:38 +00:00
|
|
|
|
if (d == NULL)
|
|
|
|
|
break;
|
|
|
|
|
if (! REAL_DIR_ENTRY (d))
|
|
|
|
|
continue;
|
Fri Dec 8 13:04:51 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* locale/error.c, locale/error.h: Files removed.
* locale/Makefile (distribute): Remove error.h.
(lib-modules): Remove error.
* hurd/hurdlookup.c (__hurd_file_name_lookup_retry): For "tty"
magic, return ENXIO if no ctty.
* sysdeps/mach/hurd/mmap.c: For MAP_FIXED, deallocate a previous
mapping if vm_map fails for that reason.
* posix/glob.c: Implement new options GLOB_ALTDIRFUNC, GLOB_BRACE,
GLOB_TILDE, GLOB_NOMAGIC.
(glob): Use stat instead of lstat to determine directoriness.
* posix/glob.h (GLOB_ALTDIRFUNC, GLOB_BRACE, GLOB_NOMAGIC, GLOB_TILDE):
New flag bits.
(__GLOB_FLAGS): Include them.
(glob_t): New members gl_closedir, gl_readdir, gl_opendir, gl_lstat,
gl_stat.
* elf/elf.h (ET_NUM, SHT_NUM, STB_NUM, STT_NUM, PT_NUM): New macros.
* sysdeps/unix/sysv/linux/sys/mman.h: Include <linux/mman.h> to
define all the bit values.
(MAP_*, MCL_*): Macros removed.
1995-12-09 10:00:22 +00:00
|
|
|
|
|
2007-02-14 19:52:38 +00:00
|
|
|
|
/* If we shall match only directories use the information
|
|
|
|
|
provided by the dirent call if possible. */
|
|
|
|
|
if ((flags & GLOB_ONLYDIR) && !DIRENT_MIGHT_BE_DIR (d))
|
|
|
|
|
continue;
|
1997-10-31 22:55:02 +00:00
|
|
|
|
|
2007-02-14 19:52:38 +00:00
|
|
|
|
name = d->d_name;
|
1997-11-06 00:02:46 +00:00
|
|
|
|
|
2007-02-14 19:52:38 +00:00
|
|
|
|
if (fnmatch (pattern, name, fnm_flags) == 0)
|
|
|
|
|
{
|
|
|
|
|
/* If the file we found is a symlink we have to
|
|
|
|
|
make sure the target file exists. */
|
|
|
|
|
if (!DIRENT_MIGHT_BE_SYMLINK (d)
|
2007-10-15 04:59:16 +00:00
|
|
|
|
|| link_exists_p (dfd, directory, dirlen, name, pglob,
|
2007-02-14 19:52:38 +00:00
|
|
|
|
flags))
|
Update.
1998-07-20 17:09 Ulrich Drepper <drepper@cygnus.com>
* shlib-versions: Remove definition for libSegFault.
* memory.texi: Comment out the relocating allocator description.
* manual/signal.texi: Remove reference to relocating allocator.
* manual/top-menu.texi: Regenerated.
* posix/fnmatch.c: Implement [: :] and change to recognize
^ as negation only when not _POSIXLY_CORRECT.
* sysdeps/generic/glob.c: Add several optimizations.
* posix/glob.h: Undefine __PMT to prevent warnings.
Reported by Roland McGrath.
* posix/regex.c: Define namespace macros only for _LIBC.
* sysdeps/arm/dl-machine.h: Fix typo.
* sysdeps/unix/sysv/sysv4/solaris2/sigpending.c: New file.
* sysdeps/unix/sysv/sysv4/solaris2/sigstack.c: New file.
* sysdeps/unix/sysv/sysv4/solaris2/sigwaitinfo.c: New file.
* sysdeps/unix/sysv/sysv4/solaris2/syscalls.list: Add sigaltstack,
sigpending, sigqueue, and sigtimedwait.
* sysdeps/unix/sysv/sysv4/solaris2/sparc/sparc32/syscall.S: New file.
* timezone/leapseconds: Update from tzdata1998f.
1998-07-18 Mark Kettenis <kettenis@phys.uva.nl>
* stdio/stdio.h [__USE_GNU]: Add prototype for fputs_unlocked.
* stdio/Versions [GLIBC_2.1]: Add fputs_unlocked.
* libio/stdio.h: Fix typo.
1998-07-19 Roland McGrath <roland@baalperazim.frob.com>
* sysdeps/mach/hurd/dl-sysdep.c (_dl_sysdep_start): #if 0 out the
magic memobj port arg parsing stuff. Fix it someday when we are ready
to really use it.
(_dl_sysdep_output): New function, modified from _dl_sysdep_error.
(_dl_sysdep_error, _dl_sysdep_message, _dl_sysdep_fatal): Removed.
1998-07-19 Roland McGrath <roland@baalperazim.frob.com>
* stdio/fputs.c: Add fputs_unlocked as weak alias for fputs.
1998-07-19 Roland McGrath <roland@baalperazim.frob.com>
* sysdeps/posix/sigsuspend.c: Define __sigsuspend with sigsuspend as
a weak alias.
* sysdeps/mach/hurd/sigsuspend.c: Likewise.
* sysdeps/generic/sigsuspend.c: Likewise.
1998-07-19 Roland McGrath <roland@baalperazim.frob.com>
* sysdeps/mach/hurd/i386/sigcontextinfo.h: New file.
1998-07-19 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* Makerules (map-file): Don't use $(wildcard) to find the
generated version script, instead look in $(version-maps).
($(common-objpfx)libc.so): Only depend on libc.map if versioning
is used.
* extra-lib.mk ($(objpfx)$(lib).so): Only depend on version script
if versioning is used. Don't use $(wildcard) to find the
generated version script, instead look in $(verson-maps).
1998-07-17 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/generic/segfault.c: Rename GET_EIP to GET_PC. Remove
unused function handle.
* sysdeps/generic/sigcontextinfo.h: Rename GET_EIP to GET_PC.
* sysdeps/unix/sysv/linux/i386/sigcontextinfo.h: Likewise.
* debug/catchsegv.sh: Fix argument processing, quoting and various
typos. Put the crash info always in the current directory. Find
program in $PATH if it contains no directory component.
* Makerules (install-lib.so-versioned,
install-lib.so-unversioned): New variables.
(install-lib-nosubdir): Depend on unversioned libs in
slibdir, not libdir.
1998-07-19 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* Make-dist (+tsrcs): Remove references to %-map variables and
*.map files. Add Versions in subdirs.
* Makerules (distinfo-vars): Don't write out %-map variables.
1998-07-20 13:55 Ulrich Drepper <drepper@cygnus.com>
* inet/protocols/rwhod.h: Remove definition of _PATH_RWHODIR.
Include <paths.h> instead.
* sysdeps/generic/paths.h: Define _PATH_RWHODIR.
* sysdeps/unix/sysv/linux/paths.h: Likewise.
Reported by Dale Scheetz <dwarf@polaris.net>.
1998-07-17 21:44 Ulrich Drepper <drepper@cygnus.com>
* catgets/open_catalog.c: Strictly check whether catalog file is
larger enough for the data. Reported by Andries.Brouwer@cwi.nl.
1998-07-20 17:25:48 +00:00
|
|
|
|
{
|
2007-02-14 19:52:38 +00:00
|
|
|
|
if (cur == names->count)
|
2004-09-30 06:42:39 +00:00
|
|
|
|
{
|
2007-02-14 19:52:38 +00:00
|
|
|
|
struct globnames *newnames;
|
|
|
|
|
size_t count = names->count * 2;
|
|
|
|
|
size_t size = (sizeof (struct globnames)
|
|
|
|
|
+ ((count - INITIAL_COUNT)
|
|
|
|
|
* sizeof (char *)));
|
2011-05-23 03:04:16 +00:00
|
|
|
|
if (__libc_use_alloca (alloca_used + size))
|
|
|
|
|
newnames = names_alloca
|
|
|
|
|
= alloca_account (size, alloca_used);
|
2007-02-14 19:52:38 +00:00
|
|
|
|
else if ((newnames = malloc (size))
|
|
|
|
|
== NULL)
|
2004-09-30 06:42:39 +00:00
|
|
|
|
goto memory_error;
|
2007-02-14 19:52:38 +00:00
|
|
|
|
newnames->count = count;
|
|
|
|
|
newnames->next = names;
|
|
|
|
|
names = newnames;
|
|
|
|
|
cur = 0;
|
2004-09-30 06:42:39 +00:00
|
|
|
|
}
|
2007-02-14 19:52:38 +00:00
|
|
|
|
len = NAMLEN (d);
|
|
|
|
|
names->name[cur] = (char *) malloc (len + 1);
|
|
|
|
|
if (names->name[cur] == NULL)
|
|
|
|
|
goto memory_error;
|
|
|
|
|
*((char *) mempcpy (names->name[cur++], name, len))
|
|
|
|
|
= '\0';
|
|
|
|
|
++nfound;
|
Update.
1998-07-20 17:09 Ulrich Drepper <drepper@cygnus.com>
* shlib-versions: Remove definition for libSegFault.
* memory.texi: Comment out the relocating allocator description.
* manual/signal.texi: Remove reference to relocating allocator.
* manual/top-menu.texi: Regenerated.
* posix/fnmatch.c: Implement [: :] and change to recognize
^ as negation only when not _POSIXLY_CORRECT.
* sysdeps/generic/glob.c: Add several optimizations.
* posix/glob.h: Undefine __PMT to prevent warnings.
Reported by Roland McGrath.
* posix/regex.c: Define namespace macros only for _LIBC.
* sysdeps/arm/dl-machine.h: Fix typo.
* sysdeps/unix/sysv/sysv4/solaris2/sigpending.c: New file.
* sysdeps/unix/sysv/sysv4/solaris2/sigstack.c: New file.
* sysdeps/unix/sysv/sysv4/solaris2/sigwaitinfo.c: New file.
* sysdeps/unix/sysv/sysv4/solaris2/syscalls.list: Add sigaltstack,
sigpending, sigqueue, and sigtimedwait.
* sysdeps/unix/sysv/sysv4/solaris2/sparc/sparc32/syscall.S: New file.
* timezone/leapseconds: Update from tzdata1998f.
1998-07-18 Mark Kettenis <kettenis@phys.uva.nl>
* stdio/stdio.h [__USE_GNU]: Add prototype for fputs_unlocked.
* stdio/Versions [GLIBC_2.1]: Add fputs_unlocked.
* libio/stdio.h: Fix typo.
1998-07-19 Roland McGrath <roland@baalperazim.frob.com>
* sysdeps/mach/hurd/dl-sysdep.c (_dl_sysdep_start): #if 0 out the
magic memobj port arg parsing stuff. Fix it someday when we are ready
to really use it.
(_dl_sysdep_output): New function, modified from _dl_sysdep_error.
(_dl_sysdep_error, _dl_sysdep_message, _dl_sysdep_fatal): Removed.
1998-07-19 Roland McGrath <roland@baalperazim.frob.com>
* stdio/fputs.c: Add fputs_unlocked as weak alias for fputs.
1998-07-19 Roland McGrath <roland@baalperazim.frob.com>
* sysdeps/posix/sigsuspend.c: Define __sigsuspend with sigsuspend as
a weak alias.
* sysdeps/mach/hurd/sigsuspend.c: Likewise.
* sysdeps/generic/sigsuspend.c: Likewise.
1998-07-19 Roland McGrath <roland@baalperazim.frob.com>
* sysdeps/mach/hurd/i386/sigcontextinfo.h: New file.
1998-07-19 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* Makerules (map-file): Don't use $(wildcard) to find the
generated version script, instead look in $(version-maps).
($(common-objpfx)libc.so): Only depend on libc.map if versioning
is used.
* extra-lib.mk ($(objpfx)$(lib).so): Only depend on version script
if versioning is used. Don't use $(wildcard) to find the
generated version script, instead look in $(verson-maps).
1998-07-17 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/generic/segfault.c: Rename GET_EIP to GET_PC. Remove
unused function handle.
* sysdeps/generic/sigcontextinfo.h: Rename GET_EIP to GET_PC.
* sysdeps/unix/sysv/linux/i386/sigcontextinfo.h: Likewise.
* debug/catchsegv.sh: Fix argument processing, quoting and various
typos. Put the crash info always in the current directory. Find
program in $PATH if it contains no directory component.
* Makerules (install-lib.so-versioned,
install-lib.so-unversioned): New variables.
(install-lib-nosubdir): Depend on unversioned libs in
slibdir, not libdir.
1998-07-19 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* Make-dist (+tsrcs): Remove references to %-map variables and
*.map files. Add Versions in subdirs.
* Makerules (distinfo-vars): Don't write out %-map variables.
1998-07-20 13:55 Ulrich Drepper <drepper@cygnus.com>
* inet/protocols/rwhod.h: Remove definition of _PATH_RWHODIR.
Include <paths.h> instead.
* sysdeps/generic/paths.h: Define _PATH_RWHODIR.
* sysdeps/unix/sysv/linux/paths.h: Likewise.
Reported by Dale Scheetz <dwarf@polaris.net>.
1998-07-17 21:44 Ulrich Drepper <drepper@cygnus.com>
* catgets/open_catalog.c: Strictly check whether catalog file is
larger enough for the data. Reported by Andries.Brouwer@cwi.nl.
1998-07-20 17:25:48 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
1997-11-06 00:02:46 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
1995-02-18 01:27:10 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (nfound == 0 && (flags & GLOB_NOCHECK))
|
|
|
|
|
{
|
|
|
|
|
size_t len = strlen (pattern);
|
|
|
|
|
nfound = 1;
|
2006-09-25 15:33:09 +00:00
|
|
|
|
names->name[cur] = (char *) malloc (len + 1);
|
|
|
|
|
if (names->name[cur] == NULL)
|
1995-02-18 01:27:10 +00:00
|
|
|
|
goto memory_error;
|
2006-09-25 15:33:09 +00:00
|
|
|
|
*((char *) mempcpy (names->name[cur++], pattern, len)) = '\0';
|
1995-02-18 01:27:10 +00:00
|
|
|
|
}
|
|
|
|
|
|
2006-09-25 15:33:09 +00:00
|
|
|
|
int result = GLOB_NOMATCH;
|
1997-09-16 00:42:43 +00:00
|
|
|
|
if (nfound != 0)
|
|
|
|
|
{
|
2006-09-25 15:33:09 +00:00
|
|
|
|
result = 0;
|
2004-12-22 20:10:10 +00:00
|
|
|
|
|
2011-07-21 02:53:58 +00:00
|
|
|
|
if (pglob->gl_pathc > UINTPTR_MAX - pglob->gl_offs
|
|
|
|
|
|| pglob->gl_pathc + pglob->gl_offs > UINTPTR_MAX - nfound
|
|
|
|
|
|| pglob->gl_pathc + pglob->gl_offs + nfound > UINTPTR_MAX - 1
|
|
|
|
|
|| (pglob->gl_pathc + pglob->gl_offs + nfound + 1
|
|
|
|
|
> UINTPTR_MAX / sizeof (char *)))
|
|
|
|
|
goto memory_error;
|
|
|
|
|
|
2006-09-25 15:33:09 +00:00
|
|
|
|
char **new_gl_pathv;
|
2001-12-29 15:57:15 +00:00
|
|
|
|
new_gl_pathv
|
1997-09-16 00:42:43 +00:00
|
|
|
|
= (char **) realloc (pglob->gl_pathv,
|
2000-03-20 00:46:01 +00:00
|
|
|
|
(pglob->gl_pathc + pglob->gl_offs + nfound + 1)
|
|
|
|
|
* sizeof (char *));
|
2001-12-29 15:57:15 +00:00
|
|
|
|
if (new_gl_pathv == NULL)
|
2006-09-25 15:33:09 +00:00
|
|
|
|
{
|
|
|
|
|
memory_error:
|
|
|
|
|
while (1)
|
|
|
|
|
{
|
|
|
|
|
struct globnames *old = names;
|
|
|
|
|
for (size_t i = 0; i < cur; ++i)
|
|
|
|
|
free (names->name[i]);
|
|
|
|
|
names = names->next;
|
2006-09-30 15:09:35 +00:00
|
|
|
|
/* NB: we will not leak memory here if we exit without
|
|
|
|
|
freeing the current block assigned to OLD. At least
|
|
|
|
|
the very first block is always allocated on the stack
|
|
|
|
|
and this is the block assigned to OLD here. */
|
2006-09-25 15:33:09 +00:00
|
|
|
|
if (names == NULL)
|
2006-09-30 15:09:35 +00:00
|
|
|
|
{
|
|
|
|
|
assert (old == &init_names);
|
|
|
|
|
break;
|
|
|
|
|
}
|
2006-09-25 15:33:09 +00:00
|
|
|
|
cur = names->count;
|
|
|
|
|
if (old == names_alloca)
|
|
|
|
|
names_alloca = names;
|
|
|
|
|
else
|
|
|
|
|
free (old);
|
|
|
|
|
}
|
|
|
|
|
result = GLOB_NOSPACE;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
while (1)
|
|
|
|
|
{
|
|
|
|
|
struct globnames *old = names;
|
|
|
|
|
for (size_t i = 0; i < cur; ++i)
|
|
|
|
|
new_gl_pathv[pglob->gl_offs + pglob->gl_pathc++]
|
|
|
|
|
= names->name[i];
|
|
|
|
|
names = names->next;
|
2006-09-30 15:09:35 +00:00
|
|
|
|
/* NB: we will not leak memory here if we exit without
|
|
|
|
|
freeing the current block assigned to OLD. At least
|
|
|
|
|
the very first block is always allocated on the stack
|
|
|
|
|
and this is the block assigned to OLD here. */
|
2006-09-25 15:33:09 +00:00
|
|
|
|
if (names == NULL)
|
2006-09-30 15:09:35 +00:00
|
|
|
|
{
|
|
|
|
|
assert (old == &init_names);
|
|
|
|
|
break;
|
|
|
|
|
}
|
2006-09-25 15:33:09 +00:00
|
|
|
|
cur = names->count;
|
|
|
|
|
if (old == names_alloca)
|
|
|
|
|
names_alloca = names;
|
|
|
|
|
else
|
|
|
|
|
free (old);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
pglob->gl_pathv = new_gl_pathv;
|
1995-02-18 01:27:10 +00:00
|
|
|
|
|
2006-09-25 15:33:09 +00:00
|
|
|
|
pglob->gl_pathv[pglob->gl_offs + pglob->gl_pathc] = NULL;
|
1995-02-18 01:27:10 +00:00
|
|
|
|
|
2006-09-25 15:33:09 +00:00
|
|
|
|
pglob->gl_flags = flags;
|
|
|
|
|
}
|
1997-09-16 00:42:43 +00:00
|
|
|
|
}
|
1995-02-18 01:27:10 +00:00
|
|
|
|
|
Update.
1998-07-20 17:09 Ulrich Drepper <drepper@cygnus.com>
* shlib-versions: Remove definition for libSegFault.
* memory.texi: Comment out the relocating allocator description.
* manual/signal.texi: Remove reference to relocating allocator.
* manual/top-menu.texi: Regenerated.
* posix/fnmatch.c: Implement [: :] and change to recognize
^ as negation only when not _POSIXLY_CORRECT.
* sysdeps/generic/glob.c: Add several optimizations.
* posix/glob.h: Undefine __PMT to prevent warnings.
Reported by Roland McGrath.
* posix/regex.c: Define namespace macros only for _LIBC.
* sysdeps/arm/dl-machine.h: Fix typo.
* sysdeps/unix/sysv/sysv4/solaris2/sigpending.c: New file.
* sysdeps/unix/sysv/sysv4/solaris2/sigstack.c: New file.
* sysdeps/unix/sysv/sysv4/solaris2/sigwaitinfo.c: New file.
* sysdeps/unix/sysv/sysv4/solaris2/syscalls.list: Add sigaltstack,
sigpending, sigqueue, and sigtimedwait.
* sysdeps/unix/sysv/sysv4/solaris2/sparc/sparc32/syscall.S: New file.
* timezone/leapseconds: Update from tzdata1998f.
1998-07-18 Mark Kettenis <kettenis@phys.uva.nl>
* stdio/stdio.h [__USE_GNU]: Add prototype for fputs_unlocked.
* stdio/Versions [GLIBC_2.1]: Add fputs_unlocked.
* libio/stdio.h: Fix typo.
1998-07-19 Roland McGrath <roland@baalperazim.frob.com>
* sysdeps/mach/hurd/dl-sysdep.c (_dl_sysdep_start): #if 0 out the
magic memobj port arg parsing stuff. Fix it someday when we are ready
to really use it.
(_dl_sysdep_output): New function, modified from _dl_sysdep_error.
(_dl_sysdep_error, _dl_sysdep_message, _dl_sysdep_fatal): Removed.
1998-07-19 Roland McGrath <roland@baalperazim.frob.com>
* stdio/fputs.c: Add fputs_unlocked as weak alias for fputs.
1998-07-19 Roland McGrath <roland@baalperazim.frob.com>
* sysdeps/posix/sigsuspend.c: Define __sigsuspend with sigsuspend as
a weak alias.
* sysdeps/mach/hurd/sigsuspend.c: Likewise.
* sysdeps/generic/sigsuspend.c: Likewise.
1998-07-19 Roland McGrath <roland@baalperazim.frob.com>
* sysdeps/mach/hurd/i386/sigcontextinfo.h: New file.
1998-07-19 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* Makerules (map-file): Don't use $(wildcard) to find the
generated version script, instead look in $(version-maps).
($(common-objpfx)libc.so): Only depend on libc.map if versioning
is used.
* extra-lib.mk ($(objpfx)$(lib).so): Only depend on version script
if versioning is used. Don't use $(wildcard) to find the
generated version script, instead look in $(verson-maps).
1998-07-17 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/generic/segfault.c: Rename GET_EIP to GET_PC. Remove
unused function handle.
* sysdeps/generic/sigcontextinfo.h: Rename GET_EIP to GET_PC.
* sysdeps/unix/sysv/linux/i386/sigcontextinfo.h: Likewise.
* debug/catchsegv.sh: Fix argument processing, quoting and various
typos. Put the crash info always in the current directory. Find
program in $PATH if it contains no directory component.
* Makerules (install-lib.so-versioned,
install-lib.so-unversioned): New variables.
(install-lib-nosubdir): Depend on unversioned libs in
slibdir, not libdir.
1998-07-19 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* Make-dist (+tsrcs): Remove references to %-map variables and
*.map files. Add Versions in subdirs.
* Makerules (distinfo-vars): Don't write out %-map variables.
1998-07-20 13:55 Ulrich Drepper <drepper@cygnus.com>
* inet/protocols/rwhod.h: Remove definition of _PATH_RWHODIR.
Include <paths.h> instead.
* sysdeps/generic/paths.h: Define _PATH_RWHODIR.
* sysdeps/unix/sysv/linux/paths.h: Likewise.
Reported by Dale Scheetz <dwarf@polaris.net>.
1998-07-17 21:44 Ulrich Drepper <drepper@cygnus.com>
* catgets/open_catalog.c: Strictly check whether catalog file is
larger enough for the data. Reported by Andries.Brouwer@cwi.nl.
1998-07-20 17:25:48 +00:00
|
|
|
|
if (stream != NULL)
|
1998-09-09 11:53:19 +00:00
|
|
|
|
{
|
2006-09-25 15:33:09 +00:00
|
|
|
|
save = errno;
|
2014-02-10 13:45:42 +00:00
|
|
|
|
if (__glibc_unlikely (flags & GLOB_ALTDIRFUNC))
|
1998-09-09 11:53:19 +00:00
|
|
|
|
(*pglob->gl_closedir) (stream);
|
|
|
|
|
else
|
2006-01-11 05:30:12 +00:00
|
|
|
|
closedir (stream);
|
2006-09-25 15:33:09 +00:00
|
|
|
|
__set_errno (save);
|
1998-09-09 11:53:19 +00:00
|
|
|
|
}
|
1995-02-18 01:27:10 +00:00
|
|
|
|
|
2006-09-25 15:33:09 +00:00
|
|
|
|
return result;
|
1995-02-18 01:27:10 +00:00
|
|
|
|
}
|