mirror of
git://sourceware.org/git/glibc.git
synced 2025-03-06 20:58:33 +01: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.
This commit is contained in:
parent
8f1c9b09f9
commit
a9ddb79305
36 changed files with 556 additions and 234 deletions
101
ChangeLog
101
ChangeLog
|
@ -1,3 +1,104 @@
|
||||||
|
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-17 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
|
1998-07-17 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
|
||||||
|
|
||||||
* sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h: New file.
|
* sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h: New file.
|
||||||
|
|
2
FAQ.in
2
FAQ.in
|
@ -826,7 +826,7 @@ new type.
|
||||||
|
|
||||||
{UD,AJ} On Linux, the use of kernel headers is reduced to the minimum. This
|
{UD,AJ} On Linux, the use of kernel headers is reduced to the minimum. This
|
||||||
gives Linus the ability to change the headers more freely. Also, user
|
gives Linus the ability to change the headers more freely. Also, user
|
||||||
programs are not insulated from changes in the size of kernel data
|
programs are now insulated from changes in the size of kernel data
|
||||||
structures.
|
structures.
|
||||||
|
|
||||||
For example, the sigset_t type is 32 or 64 bits wide in the kernel. In
|
For example, the sigset_t type is 32 or 64 bits wide in the kernel. In
|
||||||
|
|
|
@ -122,8 +122,7 @@ sources := $(filter-out $(addsuffix .c,$(basename $(.S.s))),$(sources)) $(.S.s)
|
||||||
$(+subdir-nodist) $(dont_distribute)
|
$(+subdir-nodist) $(dont_distribute)
|
||||||
foo:=$(shell echo '+out=$(+out)' >&2; echo foofoo >&2)
|
foo:=$(shell echo '+out=$(+out)' >&2; echo foofoo >&2)
|
||||||
+tsrcs := $(filter-out $(+out), $(sources) $(all-headers) $(distribute)) \
|
+tsrcs := $(filter-out $(+out), $(sources) $(all-headers) $(distribute)) \
|
||||||
$(foreach l,$(extra-libs),$($l-map)) \
|
$(+sysdeps)
|
||||||
$(wildcard $(addsuffix .map,$(extra-libs))) $(+sysdeps)
|
|
||||||
foo:=$(shell echo 'made +tsrcs=$(+tsrcs)'>&2)
|
foo:=$(shell echo 'made +tsrcs=$(+tsrcs)'>&2)
|
||||||
foo:=$(shell echo generated='$(generated)' >&2)
|
foo:=$(shell echo generated='$(generated)' >&2)
|
||||||
#generated := $(sort $(generated) $(generated:.S=.c) $(generated:.s=.c))
|
#generated := $(sort $(generated) $(generated:.S=.c) $(generated:.s=.c))
|
||||||
|
@ -149,7 +148,7 @@ ifdef subdir
|
||||||
|
|
||||||
foo:=$(shell echo subdir foo >&2)
|
foo:=$(shell echo subdir foo >&2)
|
||||||
|
|
||||||
+tsrcs := Makefile $(+tsrcs) \
|
+tsrcs := Makefile $(wildcard Versions) $(+tsrcs) \
|
||||||
$(addsuffix .c,$(others) $(tests) $(tests-static) $(test-srcs)) \
|
$(addsuffix .c,$(others) $(tests) $(tests-static) $(test-srcs)) \
|
||||||
$(wildcard $(addsuffix .input,$(tests) (tests-static) $(test-srcs)) \
|
$(wildcard $(addsuffix .input,$(tests) (tests-static) $(test-srcs)) \
|
||||||
$(addsuffix .args,$(tests) $(tests-static) $(test-srcs)))
|
$(addsuffix .args,$(tests) $(tests-static) $(test-srcs)))
|
||||||
|
|
31
Makerules
31
Makerules
|
@ -350,8 +350,9 @@ ifeq (yes,$(build-shared))
|
||||||
# Reference map file only when versioning is selected and a map file name
|
# Reference map file only when versioning is selected and a map file name
|
||||||
# is given.
|
# is given.
|
||||||
ifeq ($(versioning),yes)
|
ifeq ($(versioning),yes)
|
||||||
map-file = $(firstword $(wildcard $($(@F:.so=-map)) \
|
map-file = $(firstword $($(@F:.so=-map)) \
|
||||||
$(common-objpfx)$(@F:.so=.map)))
|
$(addprefix $(common-objpfx), \
|
||||||
|
$(filter $(@F:.so=.map),$(version-maps))))
|
||||||
load-map-file = $(map-file:%=-Wl,--version-script=%)
|
load-map-file = $(map-file:%=-Wl,--version-script=%)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -370,8 +371,7 @@ $(LINK.o) -shared -o $@ $(sysdep-LDFLAGS) $(config-LDFLAGS) \
|
||||||
$(LDFLAGS.so) $(LDFLAGS-$(@F:lib%.so=%).so) \
|
$(LDFLAGS.so) $(LDFLAGS-$(@F:lib%.so=%).so) \
|
||||||
-L$(subst :, -L,$(rpath-link)) -Wl,-rpath-link=$(rpath-link) \
|
-L$(subst :, -L,$(rpath-link)) -Wl,-rpath-link=$(rpath-link) \
|
||||||
-Wl,--whole-archive \
|
-Wl,--whole-archive \
|
||||||
$(filter-out $(map-file) $(common-objpfx)$(@F:.so=.map) \
|
$(filter-out $(map-file) $(+preinit) $(+postinit),$^) \
|
||||||
$(+preinit) $(+postinit),$^) \
|
|
||||||
$(no-whole-archive) $(LDLIBS-$(@F:lib%.so=%).so)
|
$(no-whole-archive) $(LDLIBS-$(@F:lib%.so=%).so)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
@ -411,9 +411,11 @@ $(common-objpfx)libc_pic.os: $(common-objpfx)libc_pic.a
|
||||||
$(common-objpfx)libc.so: $(elfobjdir)/soinit.os \
|
$(common-objpfx)libc.so: $(elfobjdir)/soinit.os \
|
||||||
$(common-objpfx)libc_pic.os \
|
$(common-objpfx)libc_pic.os \
|
||||||
$(elfobjdir)/sofini.os \
|
$(elfobjdir)/sofini.os \
|
||||||
$(elfobjdir)/interp.os $(elfobjdir)/ld.so \
|
$(elfobjdir)/interp.os $(elfobjdir)/ld.so
|
||||||
$(common-objpfx)libc.map
|
|
||||||
$(build-shlib)
|
$(build-shlib)
|
||||||
|
ifeq ($(versioning),yes)
|
||||||
|
$(common-objpfx)libc.so: $(common-objpfx)libc.map
|
||||||
|
endif
|
||||||
common-generated += libc.so libc_pic.os
|
common-generated += libc.so libc_pic.os
|
||||||
ifdef libc.so-version
|
ifdef libc.so-version
|
||||||
$(common-objpfx)libc.so$(libc.so-version): $(common-objpfx)libc.so
|
$(common-objpfx)libc.so$(libc.so-version): $(common-objpfx)libc.so
|
||||||
|
@ -615,17 +617,22 @@ endef
|
||||||
|
|
||||||
install-lib.so := $(filter %.so,$(install-lib:%_pic.a=%.so))
|
install-lib.so := $(filter %.so,$(install-lib:%_pic.a=%.so))
|
||||||
install-lib := $(filter-out %.so %_pic.a,$(install-lib))
|
install-lib := $(filter-out %.so %_pic.a,$(install-lib))
|
||||||
|
|
||||||
ifeq (yes,$(build-shared))
|
ifeq (yes,$(build-shared))
|
||||||
|
|
||||||
install-lib-nosubdir: $(install-lib.so:%=$(inst_libdir)/%)
|
|
||||||
|
|
||||||
# Find which .so's have versions.
|
# Find which .so's have versions.
|
||||||
versioned := $(strip $(foreach so,$(install-lib.so),\
|
versioned := $(strip $(foreach so,$(install-lib.so),\
|
||||||
$(patsubst %,$(so),$($(so)-version))))
|
$(patsubst %,$(so),$($(so)-version))))
|
||||||
|
|
||||||
|
install-lib.so-versioned := $(filter $(versioned), $(install-lib.so))
|
||||||
|
install-lib.so-unversioned := $(filter-out $(versioned), $(install-lib.so))
|
||||||
|
|
||||||
|
install-lib-nosubdir: $(install-lib.so-versioned:%=$(inst_libdir)/%) \
|
||||||
|
$(install-lib.so-unversioned:%=$(inst_slibdir)/%)
|
||||||
|
|
||||||
# Install all the unversioned shared libraries.
|
# Install all the unversioned shared libraries.
|
||||||
$(addprefix $(inst_slibdir)/, $(filter-out $(versioned),$(install-lib.so))): \
|
$(install-lib.so-unversioned:%=$(inst_slibdir)/%): $(inst_slibdir)/%.so: \
|
||||||
$(inst_slibdir)/%.so: $(objpfx)%.so $(+force); $(do-install-program)
|
$(objpfx)%.so $(+force)
|
||||||
|
$(do-install-program)
|
||||||
|
|
||||||
ifneq ($(findstring -s,$(LN_S)),)
|
ifneq ($(findstring -s,$(LN_S)),)
|
||||||
define make-link
|
define make-link
|
||||||
|
@ -954,7 +961,7 @@ echo > $@.new 'subdir := $(subdir)'
|
||||||
$(foreach var,subdir-dirs sources elided-routines sysdep_routines \
|
$(foreach var,subdir-dirs sources elided-routines sysdep_routines \
|
||||||
headers sysdep_headers distribute dont_distribute generated \
|
headers sysdep_headers distribute dont_distribute generated \
|
||||||
others tests test-srcs extra-libs $(extra-libs:%=%-routines) \
|
others tests test-srcs extra-libs $(extra-libs:%=%-routines) \
|
||||||
tests-static $(extra-libs:%=%-map) versioned \
|
tests-static versioned \
|
||||||
$(addprefix install-,lib lib.so data bin sbin others),
|
$(addprefix install-,lib lib.so data bin sbin others),
|
||||||
echo >> $@.new '$(subdir)-$(var) := $($(var))'
|
echo >> $@.new '$(subdir)-$(var) := $($(var))'
|
||||||
echo >> $@.new '$(var) = $$($(subdir)-$(var))')
|
echo >> $@.new '$(var) = $$($(subdir)-$(var))')
|
||||||
|
|
|
@ -19,9 +19,14 @@
|
||||||
# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
# Boston, MA 02111-1307, USA.
|
# Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
|
if test $# -eq 0; then
|
||||||
|
echo "$0: missing programm name" >&2
|
||||||
|
echo "Try \`$0 --help' for more information." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
prog="$1"
|
prog="$1"
|
||||||
shift
|
shift
|
||||||
args="$*"
|
|
||||||
|
|
||||||
if test $# -eq 0; then
|
if test $# -eq 0; then
|
||||||
case "$prog" in
|
case "$prog" in
|
||||||
|
@ -45,31 +50,43 @@ Written by Ulrich Drepper.'
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
LD_PRELOAD="${LD_PRELOAD:+${LD_PRELOAD}:}@SLIB@/libSegFault.so@SOVER@"
|
segv_output=`basename "$prog"`.segv.$$
|
||||||
export LD_PRELOAD
|
|
||||||
SEGFAULT_USE_ALTSTACK=1
|
|
||||||
export SEGFAULT_USE_ALTSTACK
|
|
||||||
SEGFAULT_OUTPUT_NAME="${TMPDIR:-/tmp}/`basename $prog`.segv.$$"
|
|
||||||
export SEGFAULT_OUTPUT_NAME
|
|
||||||
|
|
||||||
$prog $args
|
LD_PRELOAD=${LD_PRELOAD:+${LD_PRELOAD}:}@SLIB@/libSegFault.so \
|
||||||
|
SEGFAULT_USE_ALTSTACK=1 \
|
||||||
|
SEGFAULT_OUTPUT_NAME=$segv_output \
|
||||||
|
"$prog" ${1+"$@"}
|
||||||
exval=$?
|
exval=$?
|
||||||
|
|
||||||
unset LD_PRELOAD
|
# Check for a segmentation error.
|
||||||
# Check for an segmentation error.
|
if test $exval -eq 139 && test -f "$segv_output"; then
|
||||||
if test $exval -eq 139; then
|
|
||||||
# We caught a segmentation error. The output is in the file with the
|
# We caught a segmentation error. The output is in the file with the
|
||||||
# name we have in SEGFAULT_OUTPUT_NAME. In the output the names of
|
# name we have in SEGFAULT_OUTPUT_NAME. In the output the names of
|
||||||
# functions in shared objects are available, but names in the static
|
# functions in shared objects are available, but names in the static
|
||||||
# part of the program are not. We use addr2line to get this information.
|
# part of the program are not. We use addr2line to get this information.
|
||||||
|
case $prog in
|
||||||
|
*/*) ;;
|
||||||
|
*)
|
||||||
|
old_IFS=$IFS
|
||||||
|
IFS=:
|
||||||
|
for p in $PATH; do
|
||||||
|
test -n "$p" || p=.
|
||||||
|
if test -f "$p/$prog"; then
|
||||||
|
prog=$p/$prog
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
IFS=$old_IFS
|
||||||
|
;;
|
||||||
|
esac
|
||||||
(read line; echo "$line"
|
(read line; echo "$line"
|
||||||
read line; echo "$line"
|
read line; echo "$line"
|
||||||
while read line; do
|
while read line; do
|
||||||
case "$line" in
|
case "$line" in
|
||||||
[*) addr="`echo $line | sed 's/^\[\(.*\)\]$/\1/'`"
|
[*) addr=`echo $line | sed 's/^\[\(.*\)\]$/\1/'`
|
||||||
complete="`addr2line -f -e $prog $addr 2>/dev/null`"
|
complete=`addr2line -f -e "$prog" $addr 2>/dev/null`
|
||||||
if test $? -eq 0; then
|
if test $? -eq 0; then
|
||||||
echo "`echo $complete|sed 's/\(.*\) \(.*\)/\2(\1)/;'`$line"
|
echo "`echo "$complete"|sed 'N;s/\(.*\)\n\(.*\)/\2(\1)/;'`$line"
|
||||||
else
|
else
|
||||||
echo "$line"
|
echo "$line"
|
||||||
fi
|
fi
|
||||||
|
@ -77,8 +94,8 @@ if test $exval -eq 139; then
|
||||||
*) echo "$line"
|
*) echo "$line"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done) < $SEGFAULT_OUTPUT_NAME
|
done) < "$segv_output"
|
||||||
rm $SEGFAULT_OUTPUT_NAME
|
rm -f "$segv_output"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exit $exval
|
exit $exval
|
||||||
|
|
|
@ -49,7 +49,12 @@ endef
|
||||||
object-suffixes-left = $(object-suffixes-$(lib))
|
object-suffixes-left = $(object-suffixes-$(lib))
|
||||||
include $(patsubst %,$(..)o-iterator.mk,$(object-suffixes-$(lib)))
|
include $(patsubst %,$(..)o-iterator.mk,$(object-suffixes-$(lib)))
|
||||||
|
|
||||||
|
ifeq ($(versioning),yes)
|
||||||
# Add the version script to the dependencies of the shared library.
|
# Add the version script to the dependencies of the shared library.
|
||||||
$(objpfx)$(lib).so: $(firstword $(wildcard $($(lib)-map) $(lib).map $(..)$(lib).map))
|
$(objpfx)$(lib).so: $(firstword $($(lib)-map) \
|
||||||
|
$(addprefix $(common-objpfx), \
|
||||||
|
$(filter $(lib).map, \
|
||||||
|
$(version-maps))))
|
||||||
|
endif
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -65,6 +65,7 @@ struct whod {
|
||||||
#define WHODVERSION 1
|
#define WHODVERSION 1
|
||||||
#define WHODTYPE_STATUS 1 /* host status */
|
#define WHODTYPE_STATUS 1 /* host status */
|
||||||
|
|
||||||
#define _PATH_RWHODIR "/var/rwho"
|
/* We used to define _PATH_RWHOD here but it's now in <paths.h>. */
|
||||||
|
#include <paths.h>
|
||||||
|
|
||||||
#endif /* protocols/rwhod.h */
|
#endif /* protocols/rwhod.h */
|
||||||
|
|
|
@ -518,10 +518,11 @@ extern int fputs __P ((__const char *__restrict __s,
|
||||||
FILE *__restrict __stream));
|
FILE *__restrict __stream));
|
||||||
|
|
||||||
#ifdef __USE_GNU
|
#ifdef __USE_GNU
|
||||||
/* This function does the same as `fgets' but does not lock the stream. */
|
/* This function does the same as `fputs' but does not lock the stream. */
|
||||||
extern int fputs_unlocked __P ((__const char *__restrict __s,
|
extern int fputs_unlocked __P ((__const char *__restrict __s,
|
||||||
FILE *__restrict __stream));
|
FILE *__restrict __stream));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Write a string, followed by a newline, to stdout. */
|
/* Write a string, followed by a newline, to stdout. */
|
||||||
extern int puts __P ((__const char *__s));
|
extern int puts __P ((__const char *__s));
|
||||||
|
|
||||||
|
|
|
@ -38,8 +38,6 @@ will be freed automatically. @xref{Variable Size Automatic}.
|
||||||
* Variable Size Automatic:: Allocation of variable-sized blocks
|
* Variable Size Automatic:: Allocation of variable-sized blocks
|
||||||
of automatic storage that are freed when the
|
of automatic storage that are freed when the
|
||||||
calling function returns.
|
calling function returns.
|
||||||
* Relocating Allocator:: Waste less memory, if you can tolerate
|
|
||||||
automatic relocation of the blocks you get.
|
|
||||||
@end menu
|
@end menu
|
||||||
|
|
||||||
@node Memory Concepts
|
@node Memory Concepts
|
||||||
|
@ -2030,7 +2028,8 @@ within one function, exiting a scope in which a variable-sized array was
|
||||||
declared frees all blocks allocated with @code{alloca} during the
|
declared frees all blocks allocated with @code{alloca} during the
|
||||||
execution of that scope.
|
execution of that scope.
|
||||||
|
|
||||||
|
@ignore
|
||||||
|
@c This was never actually implemented. -zw
|
||||||
@node Relocating Allocator
|
@node Relocating Allocator
|
||||||
@section Relocating Allocator
|
@section Relocating Allocator
|
||||||
|
|
||||||
|
@ -2040,10 +2039,10 @@ space it uses is more than the amount the program asks for. The
|
||||||
@dfn{relocating memory allocator} achieves very low overhead by moving
|
@dfn{relocating memory allocator} achieves very low overhead by moving
|
||||||
blocks in memory as necessary, on its own initiative.
|
blocks in memory as necessary, on its own initiative.
|
||||||
|
|
||||||
@menu
|
@c @menu
|
||||||
* Relocator Concepts:: How to understand relocating allocation.
|
@c * Relocator Concepts:: How to understand relocating allocation.
|
||||||
* Using Relocator:: Functions for relocating allocation.
|
@c * Using Relocator:: Functions for relocating allocation.
|
||||||
@end menu
|
@c @end menu
|
||||||
|
|
||||||
@node Relocator Concepts
|
@node Relocator Concepts
|
||||||
@subsection Concepts of Relocating Allocation
|
@subsection Concepts of Relocating Allocation
|
||||||
|
@ -2085,7 +2084,7 @@ extensions.
|
||||||
|
|
||||||
@comment malloc.h
|
@comment malloc.h
|
||||||
@comment GNU
|
@comment GNU
|
||||||
@deftypefun {void *} r_alloc (void **@var{handleptr}, size_t @var{size})
|
@c @deftypefun {void *} r_alloc (void **@var{handleptr}, size_t @var{size})
|
||||||
This function allocates a relocatable block of size @var{size}. It
|
This function allocates a relocatable block of size @var{size}. It
|
||||||
stores the block's address in @code{*@var{handleptr}} and returns
|
stores the block's address in @code{*@var{handleptr}} and returns
|
||||||
a non-null pointer to indicate success.
|
a non-null pointer to indicate success.
|
||||||
|
@ -2096,7 +2095,7 @@ in @code{*@var{handleptr}}, and returns a null pointer.
|
||||||
|
|
||||||
@comment malloc.h
|
@comment malloc.h
|
||||||
@comment GNU
|
@comment GNU
|
||||||
@deftypefun void r_alloc_free (void **@var{handleptr})
|
@c @deftypefun void r_alloc_free (void **@var{handleptr})
|
||||||
This function is the way to free a relocatable block. It frees the
|
This function is the way to free a relocatable block. It frees the
|
||||||
block that @code{*@var{handleptr}} points to, and stores a null pointer
|
block that @code{*@var{handleptr}} points to, and stores a null pointer
|
||||||
in @code{*@var{handleptr}} to show it doesn't point to an allocated
|
in @code{*@var{handleptr}} to show it doesn't point to an allocated
|
||||||
|
@ -2105,7 +2104,7 @@ block any more.
|
||||||
|
|
||||||
@comment malloc.h
|
@comment malloc.h
|
||||||
@comment GNU
|
@comment GNU
|
||||||
@deftypefun {void *} r_re_alloc (void **@var{handleptr}, size_t @var{size})
|
@c @deftypefun {void *} r_re_alloc (void **@var{handleptr}, size_t @var{size})
|
||||||
The function @code{r_re_alloc} adjusts the size of the block that
|
The function @code{r_re_alloc} adjusts the size of the block that
|
||||||
@code{*@var{handleptr}} points to, making it @var{size} bytes long. It
|
@code{*@var{handleptr}} points to, making it @var{size} bytes long. It
|
||||||
stores the address of the resized block in @code{*@var{handleptr}} and
|
stores the address of the resized block in @code{*@var{handleptr}} and
|
||||||
|
@ -2114,6 +2113,7 @@ returns a non-null pointer to indicate success.
|
||||||
If enough memory is not available, this function returns a null pointer
|
If enough memory is not available, this function returns a null pointer
|
||||||
and does not modify @code{*@var{handleptr}}.
|
and does not modify @code{*@var{handleptr}}.
|
||||||
@end deftypefun
|
@end deftypefun
|
||||||
|
@end ignore
|
||||||
|
|
||||||
@ignore
|
@ignore
|
||||||
@comment No longer available...
|
@comment No longer available...
|
||||||
|
|
|
@ -1900,8 +1900,11 @@ handlers. The obstack allocation functions are safe as long as you
|
||||||
don't use the same obstack both inside and outside of a signal handler.
|
don't use the same obstack both inside and outside of a signal handler.
|
||||||
@end ignore
|
@end ignore
|
||||||
|
|
||||||
|
@ignore
|
||||||
|
@comment Once we have r_alloc again add this paragraph.
|
||||||
The relocating allocation functions (@pxref{Relocating Allocator})
|
The relocating allocation functions (@pxref{Relocating Allocator})
|
||||||
are certainly not safe to use in a signal handler.
|
are certainly not safe to use in a signal handler.
|
||||||
|
@end ignore
|
||||||
|
|
||||||
@item
|
@item
|
||||||
Any function that modifies @code{errno} is non-reentrant, but you can
|
Any function that modifies @code{errno} is non-reentrant, but you can
|
||||||
|
|
|
@ -116,8 +116,6 @@ Memory Allocation
|
||||||
* Variable Size Automatic:: Allocation of variable-sized blocks
|
* Variable Size Automatic:: Allocation of variable-sized blocks
|
||||||
of automatic storage that are freed when the
|
of automatic storage that are freed when the
|
||||||
calling function returns.
|
calling function returns.
|
||||||
* Relocating Allocator:: Waste less memory, if you can tolerate
|
|
||||||
automatic relocation of the blocks you get.
|
|
||||||
|
|
||||||
Unconstrained Allocation
|
Unconstrained Allocation
|
||||||
|
|
||||||
|
@ -176,11 +174,6 @@ Variable Size Automatic
|
||||||
method of allocating dynamically and
|
method of allocating dynamically and
|
||||||
freeing automatically.
|
freeing automatically.
|
||||||
|
|
||||||
Relocating Allocator
|
|
||||||
|
|
||||||
* Relocator Concepts:: How to understand relocating allocation.
|
|
||||||
* Using Relocator:: Functions for relocating allocation.
|
|
||||||
|
|
||||||
Character Handling
|
Character Handling
|
||||||
|
|
||||||
* Classification of Characters:: Testing whether characters are
|
* Classification of Characters:: Testing whether characters are
|
||||||
|
|
183
posix/fnmatch.c
183
posix/fnmatch.c
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (C) 1991, 1992, 1993, 1996, 1997 Free Software Foundation, Inc.
|
/* Copyright (C) 1991, 92, 93, 96, 97, 98 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
This library is free software; you can redistribute it and/or
|
This library is free software; you can redistribute it and/or
|
||||||
|
@ -29,6 +29,23 @@
|
||||||
#include <fnmatch.h>
|
#include <fnmatch.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
|
#if HAVE_STRING_H
|
||||||
|
# include <string.h>
|
||||||
|
#else
|
||||||
|
# include <strings.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef STDC_HEADERS
|
||||||
|
# include <stdlib.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* For platform which support the ISO C amendement 1 functionality we
|
||||||
|
support user defined character classes. */
|
||||||
|
#if defined _LIBC || (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H)
|
||||||
|
/* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>. */
|
||||||
|
# include <wchar.h>
|
||||||
|
# include <wctype.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Comment out all this code if we are using the GNU C Library, and are not
|
/* Comment out all this code if we are using the GNU C Library, and are not
|
||||||
actually compiling the library itself. This code is part of the GNU C
|
actually compiling the library itself. This code is part of the GNU C
|
||||||
|
@ -47,8 +64,64 @@
|
||||||
# define ISASCII(c) isascii(c)
|
# define ISASCII(c) isascii(c)
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
# define ISUPPER(c) (ISASCII (c) && isupper (c))
|
#ifdef isblank
|
||||||
|
# define ISBLANK(c) (ISASCII (c) && isblank (c))
|
||||||
|
#else
|
||||||
|
# define ISBLANK(c) ((c) == ' ' || (c) == '\t')
|
||||||
|
#endif
|
||||||
|
#ifdef isgraph
|
||||||
|
# define ISGRAPH(c) (ISASCII (c) && isgraph (c))
|
||||||
|
#else
|
||||||
|
# define ISGRAPH(c) (ISASCII (c) && isprint (c) && !isspace (c))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define ISPRINT(c) (ISASCII (c) && isprint (c))
|
||||||
|
#define ISDIGIT(c) (ISASCII (c) && isdigit (c))
|
||||||
|
#define ISALNUM(c) (ISASCII (c) && isalnum (c))
|
||||||
|
#define ISALPHA(c) (ISASCII (c) && isalpha (c))
|
||||||
|
#define ISCNTRL(c) (ISASCII (c) && iscntrl (c))
|
||||||
|
#define ISLOWER(c) (ISASCII (c) && islower (c))
|
||||||
|
#define ISPUNCT(c) (ISASCII (c) && ispunct (c))
|
||||||
|
#define ISSPACE(c) (ISASCII (c) && isspace (c))
|
||||||
|
#define ISUPPER(c) (ISASCII (c) && isupper (c))
|
||||||
|
#define ISXDIGIT(c) (ISASCII (c) && isxdigit (c))
|
||||||
|
|
||||||
|
# define STREQ(s1, s2) ((strcmp (s1, s2) == 0))
|
||||||
|
|
||||||
|
# if defined _LIBC || (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H)
|
||||||
|
/* The GNU C library provides support for user-defined character classes
|
||||||
|
and the functions from ISO C amendement 1. */
|
||||||
|
# ifdef CHARCLASS_NAME_MAX
|
||||||
|
# define CHAR_CLASS_MAX_LENGTH CHARCLASS_NAME_MAX
|
||||||
|
# else
|
||||||
|
/* This shouldn't happen but some implementation might still have this
|
||||||
|
problem. Use a reasonable default value. */
|
||||||
|
# define CHAR_CLASS_MAX_LENGTH 256
|
||||||
|
# endif
|
||||||
|
|
||||||
|
# ifdef _LIBC
|
||||||
|
# define IS_CHAR_CLASS(string) __wctype (string)
|
||||||
|
# else
|
||||||
|
# define IS_CHAR_CLASS(string) wctype (string)
|
||||||
|
# endif
|
||||||
|
# else
|
||||||
|
# define CHAR_CLASS_MAX_LENGTH 6 /* Namely, `xdigit'. */
|
||||||
|
|
||||||
|
# define IS_CHAR_CLASS(string) \
|
||||||
|
(STREQ (string, "alpha") || STREQ (string, "upper") \
|
||||||
|
|| STREQ (string, "lower") || STREQ (string, "digit") \
|
||||||
|
|| STREQ (string, "alnum") || STREQ (string, "xdigit") \
|
||||||
|
|| STREQ (string, "space") || STREQ (string, "print") \
|
||||||
|
|| STREQ (string, "punct") || STREQ (string, "graph") \
|
||||||
|
|| STREQ (string, "cntrl") || STREQ (string, "blank"))
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/* Avoid depending on library functions or files
|
||||||
|
whose names are inconsistent. */
|
||||||
|
|
||||||
|
# if !defined _LIBC && !defined getenv
|
||||||
|
extern char *getenv ();
|
||||||
|
# endif
|
||||||
|
|
||||||
# ifndef errno
|
# ifndef errno
|
||||||
extern int errno;
|
extern int errno;
|
||||||
|
@ -66,7 +139,11 @@ fnmatch (pattern, string, flags)
|
||||||
register char c;
|
register char c;
|
||||||
|
|
||||||
/* Note that this evaluates C many times. */
|
/* Note that this evaluates C many times. */
|
||||||
# define FOLD(c) ((flags & FNM_CASEFOLD) && ISUPPER (c) ? tolower (c) : (c))
|
# ifdef _LIBC
|
||||||
|
# define FOLD(c) ((flags & FNM_CASEFOLD) ? tolower (c) : (c))
|
||||||
|
# else
|
||||||
|
# define FOLD(c) ((flags & FNM_CASEFOLD) && ISUPPER (c) ? tolower (c) : (c))
|
||||||
|
# endif
|
||||||
|
|
||||||
while ((c = *p++) != '\0')
|
while ((c = *p++) != '\0')
|
||||||
{
|
{
|
||||||
|
@ -137,67 +214,104 @@ fnmatch (pattern, string, flags)
|
||||||
case '[':
|
case '[':
|
||||||
{
|
{
|
||||||
/* Nonzero if the sense of the character class is inverted. */
|
/* Nonzero if the sense of the character class is inverted. */
|
||||||
|
static int posixly_correct;
|
||||||
register int not;
|
register int not;
|
||||||
|
|
||||||
|
if (posixly_correct == 0)
|
||||||
|
posixly_correct = getenv ("POSIXLY_CORRECT") != NULL ? 1 : -1;
|
||||||
|
|
||||||
if (*n == '\0')
|
if (*n == '\0')
|
||||||
return FNM_NOMATCH;
|
return FNM_NOMATCH;
|
||||||
|
|
||||||
if ((flags & FNM_PERIOD) && *n == '.' &&
|
if (*n == '.' && (flags & FNM_PERIOD) &&
|
||||||
(n == string || ((flags & FNM_FILE_NAME) && n[-1] == '/')))
|
(n == string || ((flags & FNM_FILE_NAME) && n[-1] == '/')))
|
||||||
return FNM_NOMATCH;
|
return FNM_NOMATCH;
|
||||||
|
|
||||||
not = (*p == '!' || *p == '^');
|
not = (*p == '!' || (posixly_correct < 0 && *p == '^'));
|
||||||
if (not)
|
if (not)
|
||||||
++p;
|
++p;
|
||||||
|
|
||||||
c = *p++;
|
c = *p++;
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
register char cstart = c, cend = c;
|
int fn = FOLD (*n);
|
||||||
|
|
||||||
if (!(flags & FNM_NOESCAPE) && c == '\\')
|
if (!(flags & FNM_NOESCAPE) && c == '\\')
|
||||||
{
|
{
|
||||||
if (*p == '\0')
|
if (*p == '\0')
|
||||||
return FNM_NOMATCH;
|
return FNM_NOMATCH;
|
||||||
cstart = cend = *p++;
|
c = FOLD (*p++);
|
||||||
|
|
||||||
|
if (c == fn)
|
||||||
|
goto matched;
|
||||||
}
|
}
|
||||||
|
else if (c == '[' && *p == ':')
|
||||||
|
{
|
||||||
|
/* Leave room for the null. */
|
||||||
|
char str[CHAR_CLASS_MAX_LENGTH + 1];
|
||||||
|
size_t c1 = 0;
|
||||||
|
# if defined _LIBC || (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H)
|
||||||
|
wctype_t wt;
|
||||||
|
# endif
|
||||||
|
|
||||||
cstart = cend = FOLD (cstart);
|
for (;;)
|
||||||
|
{
|
||||||
|
if (c1 == CHAR_CLASS_MAX_LENGTH)
|
||||||
|
/* The name is too long and therefore the pattern
|
||||||
|
is ill-formed. */
|
||||||
|
return FNM_NOMATCH;
|
||||||
|
|
||||||
if (c == '\0')
|
c = *++p;
|
||||||
|
if (c == ':' && p[1] == ']')
|
||||||
|
{
|
||||||
|
p += 2;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
str[c1++] = 'c';
|
||||||
|
}
|
||||||
|
str[c1] = '\0';
|
||||||
|
|
||||||
|
# if defined _LIBC || (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H)
|
||||||
|
wt = IS_CHAR_CLASS (str);
|
||||||
|
if (wt == 0)
|
||||||
|
/* Invalid character class name. */
|
||||||
|
return FNM_NOMATCH;
|
||||||
|
|
||||||
|
if (__iswctype (__btowc (*n), wt))
|
||||||
|
goto matched;
|
||||||
|
# else
|
||||||
|
if ((STREQ (str, "alnum") && ISALNUM (*n))
|
||||||
|
|| (STREQ (str, "alpha") && ISALPHA (*n))
|
||||||
|
|| (STREQ (str, "blank") && ISBLANK (*n))
|
||||||
|
|| (STREQ (str, "cntrl") && ISCNTRL (*n))
|
||||||
|
|| (STREQ (str, "digit") && ISDIGIT (*n))
|
||||||
|
|| (STREQ (str, "graph") && ISGRAPH (*n))
|
||||||
|
|| (STREQ (str, "lower") && ISLOWER (*n))
|
||||||
|
|| (STREQ (str, "print") && ISPRINT (*n))
|
||||||
|
|| (STREQ (str, "punct") && ISPUNCT (*n))
|
||||||
|
|| (STREQ (str, "space") && ISSPACE (*n))
|
||||||
|
|| (STREQ (str, "upper") && ISUPPER (*n))
|
||||||
|
|| (STREQ (str, "xdigit") && ISXDIGIT (*n)))
|
||||||
|
goto matched;
|
||||||
|
# endif
|
||||||
|
}
|
||||||
|
else if (c == '\0')
|
||||||
/* [ (unterminated) loses. */
|
/* [ (unterminated) loses. */
|
||||||
return FNM_NOMATCH;
|
return FNM_NOMATCH;
|
||||||
|
else if (FOLD (c) == fn)
|
||||||
|
goto matched;
|
||||||
|
|
||||||
c = *p++;
|
c = *p++;
|
||||||
c = FOLD (c);
|
|
||||||
|
|
||||||
if ((flags & FNM_FILE_NAME) && c == '/')
|
|
||||||
/* [/] can never match. */
|
|
||||||
return FNM_NOMATCH;
|
|
||||||
|
|
||||||
if (c == '-' && *p != ']')
|
|
||||||
{
|
|
||||||
cend = *p++;
|
|
||||||
if (!(flags & FNM_NOESCAPE) && cend == '\\')
|
|
||||||
cend = *p++;
|
|
||||||
if (cend == '\0')
|
|
||||||
return FNM_NOMATCH;
|
|
||||||
cend = FOLD (cend);
|
|
||||||
|
|
||||||
c = *p++;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (FOLD (*n) >= cstart && FOLD (*n) <= cend)
|
|
||||||
goto matched;
|
|
||||||
|
|
||||||
if (c == ']')
|
if (c == ']')
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!not)
|
if (!not)
|
||||||
return FNM_NOMATCH;
|
return FNM_NOMATCH;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
matched:;
|
matched:
|
||||||
/* Skip the rest of the [...] that already matched. */
|
/* Skip the rest of the [...] that already matched. */
|
||||||
while (c != ']')
|
while (c != ']')
|
||||||
{
|
{
|
||||||
|
@ -213,6 +327,15 @@ fnmatch (pattern, string, flags)
|
||||||
/* XXX 1003.2d11 is unclear if this is right. */
|
/* XXX 1003.2d11 is unclear if this is right. */
|
||||||
++p;
|
++p;
|
||||||
}
|
}
|
||||||
|
else if (c == '[' && *p == ':')
|
||||||
|
{
|
||||||
|
do
|
||||||
|
if (*++p == '\0')
|
||||||
|
return FNM_NOMATCH;
|
||||||
|
while (*p != ':' || p[1] == ']');
|
||||||
|
p += 2;
|
||||||
|
c = *p;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (not)
|
if (not)
|
||||||
return FNM_NOMATCH;
|
return FNM_NOMATCH;
|
||||||
|
|
|
@ -25,6 +25,7 @@ extern "C" {
|
||||||
#undef __ptr_t
|
#undef __ptr_t
|
||||||
#if defined __cplusplus || (defined __STDC__ && __STDC__) || defined WINDOWS32
|
#if defined __cplusplus || (defined __STDC__ && __STDC__) || defined WINDOWS32
|
||||||
# undef __P
|
# undef __P
|
||||||
|
# undef __PMT
|
||||||
# define __P(protos) protos
|
# define __P(protos) protos
|
||||||
# define __PMT(protos) protos
|
# define __PMT(protos) protos
|
||||||
# define __ptr_t void *
|
# define __ptr_t void *
|
||||||
|
@ -34,6 +35,7 @@ extern "C" {
|
||||||
# endif
|
# endif
|
||||||
#else /* Not C++ or ANSI C. */
|
#else /* Not C++ or ANSI C. */
|
||||||
# undef __P
|
# undef __P
|
||||||
|
# undef __PMT
|
||||||
# define __P(protos) ()
|
# define __P(protos) ()
|
||||||
# define __PMT(protos) ()
|
# define __PMT(protos) ()
|
||||||
# undef __const
|
# undef __const
|
||||||
|
|
|
@ -52,7 +52,9 @@
|
||||||
/* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>. */
|
/* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>. */
|
||||||
# include <wchar.h>
|
# include <wchar.h>
|
||||||
# include <wctype.h>
|
# include <wctype.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef _LIBC
|
||||||
/* We have to keep the namespace clean. */
|
/* We have to keep the namespace clean. */
|
||||||
# define regfree(preg) __regfree (preg)
|
# define regfree(preg) __regfree (preg)
|
||||||
# define regexec(pr, st, nm, pm, ef) __regexec (pr, st, nm, pm, ef)
|
# define regexec(pr, st, nm, pm, ef) __regexec (pr, st, nm, pm, ef)
|
||||||
|
|
|
@ -82,6 +82,3 @@ alpha.*-.*-linux.* libBrokenLocale=1.1
|
||||||
|
|
||||||
# The real-time library from POSIX.1b.
|
# The real-time library from POSIX.1b.
|
||||||
.*-.*-.* librt=1
|
.*-.*-.* librt=1
|
||||||
|
|
||||||
# Preloading modules.
|
|
||||||
.*-.*-.* libSegFault=1
|
|
||||||
|
|
|
@ -53,7 +53,8 @@ libc {
|
||||||
|
|
||||||
# f*
|
# f*
|
||||||
feof_unlocked; ferror_unlocked; fflush_unlocked; fgets_unlocked;
|
feof_unlocked; ferror_unlocked; fflush_unlocked; fgets_unlocked;
|
||||||
fileno_unlocked; fputc_unlocked; fread_unlocked; fwrite_unlocked;
|
fileno_unlocked; fputc_unlocked; fputs_unlocked;
|
||||||
|
fread_unlocked; fwrite_unlocked;
|
||||||
|
|
||||||
# g*
|
# g*
|
||||||
getc_unlocked; getchar_unlocked;
|
getc_unlocked; getchar_unlocked;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (C) 1991, 1992, 1997 Free Software Foundation, Inc.
|
/* Copyright (C) 1991, 1992, 1997, 1998 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
@ -32,3 +32,4 @@ fputs (const char *s, FILE *stream)
|
||||||
return EOF;
|
return EOF;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
weak_alias (fputs, fputs_unlocked)
|
||||||
|
|
|
@ -684,6 +684,13 @@ getline (char **__lineptr, size_t *__n, FILE *__stream)
|
||||||
/* Write a string to STREAM. */
|
/* Write a string to STREAM. */
|
||||||
extern int fputs __P ((__const char *__restrict __s,
|
extern int fputs __P ((__const char *__restrict __s,
|
||||||
FILE *__restrict __stream));
|
FILE *__restrict __stream));
|
||||||
|
|
||||||
|
#ifdef __USE_GNU
|
||||||
|
/* This function does the same as `fputs' but does not lock the stream. */
|
||||||
|
extern int fputs_unlocked __P ((__const char *__restrict __s,
|
||||||
|
FILE *__restrict __stream));
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Write a string, followed by a newline, to stdout. */
|
/* Write a string, followed by a newline, to stdout. */
|
||||||
extern int puts __P ((__const char *__s));
|
extern int puts __P ((__const char *__s));
|
||||||
|
|
||||||
|
|
|
@ -313,7 +313,7 @@ _dl_start_user:
|
||||||
/* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */
|
/* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */
|
||||||
#define ELF_MACHINE_JMP_SLOT R_ARM_JUMP_SLOT
|
#define ELF_MACHINE_JMP_SLOT R_ARM_JUMP_SLOT
|
||||||
|
|
||||||
/* The i386 never uses Elf32_Rela relocations. */
|
/* The ARM never uses Elf32_Rela relocations. */
|
||||||
#define ELF_MACHINE_NO_RELA 1
|
#define ELF_MACHINE_NO_RELA 1
|
||||||
|
|
||||||
/* We define an initialization functions. This is called very early in
|
/* We define an initialization functions. This is called very early in
|
||||||
|
|
|
@ -797,10 +797,10 @@ glob (pattern, flags, errfunc, pglob)
|
||||||
int i;
|
int i;
|
||||||
struct stat st;
|
struct stat st;
|
||||||
for (i = oldcount; i < pglob->gl_pathc; ++i)
|
for (i = oldcount; i < pglob->gl_pathc; ++i)
|
||||||
if (((flags & GLOB_ALTDIRFUNC) ?
|
if (((flags & GLOB_ALTDIRFUNC)
|
||||||
(*pglob->gl_stat) (pglob->gl_pathv[i], &st) :
|
? (*pglob->gl_stat) (pglob->gl_pathv[i], &st)
|
||||||
__stat (pglob->gl_pathv[i], &st)) == 0 &&
|
: __stat (pglob->gl_pathv[i], &st)) == 0
|
||||||
S_ISDIR (st.st_mode))
|
&& S_ISDIR (st.st_mode))
|
||||||
{
|
{
|
||||||
size_t len = strlen (pglob->gl_pathv[i]) + 2;
|
size_t len = strlen (pglob->gl_pathv[i]) + 2;
|
||||||
char *new = realloc (pglob->gl_pathv[i], len);
|
char *new = realloc (pglob->gl_pathv[i], len);
|
||||||
|
@ -958,7 +958,7 @@ glob_in_dir (pattern, directory, flags, errfunc, pglob)
|
||||||
int (*errfunc) __P ((const char *, int));
|
int (*errfunc) __P ((const char *, int));
|
||||||
glob_t *pglob;
|
glob_t *pglob;
|
||||||
{
|
{
|
||||||
__ptr_t stream;
|
__ptr_t stream = NULL;
|
||||||
|
|
||||||
struct globlink
|
struct globlink
|
||||||
{
|
{
|
||||||
|
@ -970,92 +970,127 @@ glob_in_dir (pattern, directory, flags, errfunc, pglob)
|
||||||
int meta;
|
int meta;
|
||||||
int save;
|
int save;
|
||||||
|
|
||||||
stream = ((flags & GLOB_ALTDIRFUNC) ?
|
meta = __glob_pattern_p (pattern, !(flags & GLOB_NOESCAPE));
|
||||||
(*pglob->gl_opendir) (directory) :
|
if (meta == 0)
|
||||||
(__ptr_t) opendir (directory));
|
|
||||||
if (stream == NULL)
|
|
||||||
{
|
{
|
||||||
if ((errfunc != NULL && (*errfunc) (directory, errno)) ||
|
if (flags & (GLOB_NOCHECK|GLOB_NOMAGIC))
|
||||||
(flags & GLOB_ERR))
|
/* We need not do any tests. The PATTERN contains no meta
|
||||||
return GLOB_ABORTED;
|
characters and we must not return an error therefore the
|
||||||
|
result will always contain exactly the one name. */
|
||||||
|
flags |= GLOB_NOCHECK;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* Since we use the normal file functions we can also use stat()
|
||||||
|
to verify the file is there. */
|
||||||
|
struct stat st;
|
||||||
|
size_t patlen = strlen (pattern);
|
||||||
|
size_t dirlen = strlen (directory);
|
||||||
|
char *fullname = __alloca (dirlen + 1 + patlen + 1);
|
||||||
|
|
||||||
|
# ifdef HAVE_MEMPCPY
|
||||||
|
mempcpy (mempcpy (mempcpy (fullname, directory, dirlen),
|
||||||
|
"/", 1),
|
||||||
|
pattern, patlen + 1);
|
||||||
|
# else
|
||||||
|
memcpy (fullname, directory, dirlen);
|
||||||
|
fullname[dirlen] = '/';
|
||||||
|
memcpy (&fullname[dirlen + 1], pattern, patlen + 1);
|
||||||
|
# endif
|
||||||
|
if (((flags & GLOB_ALTDIRFUNC)
|
||||||
|
? (*pglob->gl_stat) (fullname, &st)
|
||||||
|
: __stat (fullname, &st)) == 0)
|
||||||
|
/* We found this file to be existing. No tell the rest
|
||||||
|
of the function to copy this name into the result. */
|
||||||
|
flags |= GLOB_NOCHECK;
|
||||||
|
}
|
||||||
|
|
||||||
nfound = 0;
|
nfound = 0;
|
||||||
meta = 0;
|
|
||||||
}
|
|
||||||
else if (pattern[0] == '\0')
|
|
||||||
{
|
|
||||||
/* This is a special case for matching directories like in
|
|
||||||
"*a/". */
|
|
||||||
names = (struct globlink *) __alloca (sizeof (struct globlink));
|
|
||||||
names->name = (char *) malloc (1);
|
|
||||||
if (names->name == NULL)
|
|
||||||
goto memory_error;
|
|
||||||
names->name[0] = '\0';
|
|
||||||
names->next = NULL;
|
|
||||||
nfound = 1;
|
|
||||||
meta = 0;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
nfound = 0;
|
if (pattern[0] == '\0')
|
||||||
meta = __glob_pattern_p (pattern, !(flags & GLOB_NOESCAPE));
|
|
||||||
if(meta)
|
|
||||||
flags |= GLOB_MAGCHAR;
|
|
||||||
|
|
||||||
while (1)
|
|
||||||
{
|
{
|
||||||
const char *name;
|
/* This is a special case for matching directories like in
|
||||||
size_t len;
|
"*a/". */
|
||||||
struct dirent *d = ((flags & GLOB_ALTDIRFUNC) ?
|
names = (struct globlink *) __alloca (sizeof (struct globlink));
|
||||||
(*pglob->gl_readdir) (stream) :
|
names->name = (char *) malloc (1);
|
||||||
readdir ((DIR *) stream));
|
if (names->name == NULL)
|
||||||
if (d == NULL)
|
goto memory_error;
|
||||||
break;
|
names->name[0] = '\0';
|
||||||
if (! REAL_DIR_ENTRY (d))
|
names->next = NULL;
|
||||||
continue;
|
nfound = 1;
|
||||||
|
meta = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
stream = ((flags & GLOB_ALTDIRFUNC)
|
||||||
|
? (*pglob->gl_opendir) (directory)
|
||||||
|
: (__ptr_t) opendir (directory));
|
||||||
|
if (stream == NULL)
|
||||||
|
{
|
||||||
|
if ((errfunc != NULL && (*errfunc) (directory, errno))
|
||||||
|
|| (flags & GLOB_ERR))
|
||||||
|
return GLOB_ABORTED;
|
||||||
|
nfound = 0;
|
||||||
|
meta = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
int fnm_flags = ((!(flags & GLOB_PERIOD) ? FNM_PERIOD : 0)
|
||||||
|
| ((flags & GLOB_NOESCAPE) ? FNM_NOESCAPE : 0)
|
||||||
|
#if defined _AMIGA || defined VMS
|
||||||
|
| FNM_CASEFOLD
|
||||||
|
#endif
|
||||||
|
);
|
||||||
|
nfound = 0;
|
||||||
|
flags |= GLOB_MAGCHAR;
|
||||||
|
|
||||||
|
while (1)
|
||||||
|
{
|
||||||
|
const char *name;
|
||||||
|
size_t len;
|
||||||
|
struct dirent *d = ((flags & GLOB_ALTDIRFUNC)
|
||||||
|
? (*pglob->gl_readdir) (stream)
|
||||||
|
: readdir ((DIR *) stream));
|
||||||
|
if (d == NULL)
|
||||||
|
break;
|
||||||
|
if (! REAL_DIR_ENTRY (d))
|
||||||
|
continue;
|
||||||
|
|
||||||
#ifdef HAVE_D_TYPE
|
#ifdef HAVE_D_TYPE
|
||||||
/* If we shall match only directories use the information
|
/* If we shall match only directories use the information
|
||||||
provided by the dirent call if possible. */
|
provided by the dirent call if possible. */
|
||||||
if ((flags & GLOB_ONLYDIR)
|
if ((flags & GLOB_ONLYDIR)
|
||||||
&& d->d_type != DT_UNKNOWN && d->d_type != DT_DIR)
|
&& d->d_type != DT_UNKNOWN && d->d_type != DT_DIR)
|
||||||
continue;
|
continue;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
name = d->d_name;
|
name = d->d_name;
|
||||||
|
|
||||||
if ((!meta && strcmp (pattern, name) == 0)
|
if (fnmatch (pattern, name, fnm_flags) == 0)
|
||||||
|| fnmatch (pattern, name,
|
{
|
||||||
(!(flags & GLOB_PERIOD) ? FNM_PERIOD : 0) |
|
struct globlink *new = (struct globlink *)
|
||||||
((flags & GLOB_NOESCAPE) ? FNM_NOESCAPE : 0)
|
__alloca (sizeof (struct globlink));
|
||||||
#if defined _AMIGA || defined VMS
|
len = NAMLEN (d);
|
||||||
| FNM_CASEFOLD
|
new->name = (char *) malloc (len + 1);
|
||||||
#endif
|
if (new->name == NULL)
|
||||||
) == 0)
|
goto memory_error;
|
||||||
{
|
|
||||||
struct globlink *new
|
|
||||||
= (struct globlink *) __alloca (sizeof (struct globlink));
|
|
||||||
len = NAMLEN (d);
|
|
||||||
new->name = (char *) malloc (len + 1);
|
|
||||||
if (new->name == NULL)
|
|
||||||
goto memory_error;
|
|
||||||
#ifdef HAVE_MEMPCPY
|
#ifdef HAVE_MEMPCPY
|
||||||
*((char *) mempcpy ((__ptr_t) new->name, name, len)) = '\0';
|
*((char *) mempcpy ((__ptr_t) new->name, name, len))
|
||||||
|
= '\0';
|
||||||
#else
|
#else
|
||||||
memcpy ((__ptr_t) new->name, name, len);
|
memcpy ((__ptr_t) new->name, name, len);
|
||||||
new->name[len] = '\0';
|
new->name[len] = '\0';
|
||||||
#endif
|
#endif
|
||||||
new->next = names;
|
new->next = names;
|
||||||
names = new;
|
names = new;
|
||||||
++nfound;
|
++nfound;
|
||||||
if (!meta)
|
}
|
||||||
break;
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nfound == 0 && (flags & GLOB_NOMAGIC) && !meta)
|
|
||||||
flags |= GLOB_NOCHECK;
|
|
||||||
|
|
||||||
if (nfound == 0 && (flags & GLOB_NOCHECK))
|
if (nfound == 0 && (flags & GLOB_NOCHECK))
|
||||||
{
|
{
|
||||||
size_t len = strlen (pattern);
|
size_t len = strlen (pattern);
|
||||||
|
@ -1096,10 +1131,11 @@ glob_in_dir (pattern, directory, flags, errfunc, pglob)
|
||||||
}
|
}
|
||||||
|
|
||||||
save = errno;
|
save = errno;
|
||||||
if (flags & GLOB_ALTDIRFUNC)
|
if (stream != NULL)
|
||||||
(*pglob->gl_closedir) (stream);
|
if (flags & GLOB_ALTDIRFUNC)
|
||||||
else
|
(*pglob->gl_closedir) (stream);
|
||||||
closedir ((DIR *) stream);
|
else
|
||||||
|
closedir ((DIR *) stream);
|
||||||
__set_errno (save);
|
__set_errno (save);
|
||||||
|
|
||||||
return nfound == 0 ? GLOB_NOMATCH : 0;
|
return nfound == 0 ? GLOB_NOMATCH : 0;
|
||||||
|
|
|
@ -57,6 +57,7 @@
|
||||||
#define _PATH_MOUNTED "/var/run/mtab"
|
#define _PATH_MOUNTED "/var/run/mtab"
|
||||||
#define _PATH_NOLOGIN "/etc/nologin"
|
#define _PATH_NOLOGIN "/etc/nologin"
|
||||||
#define _PATH_PRESERVE "/var/preserve"
|
#define _PATH_PRESERVE "/var/preserve"
|
||||||
|
#define _PATH_RWHODIR "/var/rwho"
|
||||||
#define _PATH_SENDMAIL "/usr/sbin/sendmail"
|
#define _PATH_SENDMAIL "/usr/sbin/sendmail"
|
||||||
#define _PATH_SHADOW "/etc/shadow"
|
#define _PATH_SHADOW "/etc/shadow"
|
||||||
#define _PATH_SHELLS "/etc/shells"
|
#define _PATH_SHELLS "/etc/shells"
|
||||||
|
|
|
@ -63,12 +63,6 @@ struct layout
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
handle (int fd, void *addr)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* This function is called when a segmentation fault is caught. The system
|
/* This function is called when a segmentation fault is caught. The system
|
||||||
is in an instable state now. This means especially that malloc() might
|
is in an instable state now. This means especially that malloc() might
|
||||||
not work anymore. */
|
not work anymore. */
|
||||||
|
@ -115,7 +109,7 @@ catch_segfault (int signal, SIGCONTEXT ctx)
|
||||||
arr = alloca (cnt * sizeof (void *));
|
arr = alloca (cnt * sizeof (void *));
|
||||||
|
|
||||||
/* First handle the program counter from the structure. */
|
/* First handle the program counter from the structure. */
|
||||||
arr[0] = GET_EIP (ctx);
|
arr[0] = GET_PC (ctx);
|
||||||
|
|
||||||
current = (struct layout *) top_frame;
|
current = (struct layout *) top_frame;
|
||||||
cnt = 1;
|
cnt = 1;
|
||||||
|
|
|
@ -19,6 +19,6 @@
|
||||||
|
|
||||||
/* In general we cannot provide any information. */
|
/* In general we cannot provide any information. */
|
||||||
#define SIGCONTEXT struct sigcontext *
|
#define SIGCONTEXT struct sigcontext *
|
||||||
#define GET_EIP(ctx) ((void *) 0)
|
#define GET_PC(ctx) ((void *) 0)
|
||||||
#define GET_FRAME(ctx) ((void *) 0)
|
#define GET_FRAME(ctx) ((void *) 0)
|
||||||
#define GET_STACK(ctx) ((void *) 0)
|
#define GET_STACK(ctx) ((void *) 0)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (C) 1991, 1995, 1996, 1997 Free Software Foundation, Inc.
|
/* Copyright (C) 1991, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
@ -23,13 +23,14 @@
|
||||||
/* Change the set of blocked signals to SET,
|
/* Change the set of blocked signals to SET,
|
||||||
wait until a signal arrives, and restore the set of blocked signals. */
|
wait until a signal arrives, and restore the set of blocked signals. */
|
||||||
int
|
int
|
||||||
sigsuspend (set)
|
__sigsuspend (set)
|
||||||
const sigset_t *set;
|
const sigset_t *set;
|
||||||
{
|
{
|
||||||
__set_errno (ENOSYS);
|
__set_errno (ENOSYS);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
weak_alias (__sigsuspend, sigsuspend)
|
||||||
|
|
||||||
stub_warning (sigsuspend)
|
stub_warning (sigsuspend)
|
||||||
|
stub_warning (__sigsuspend)
|
||||||
#include <stub-tag.h>
|
#include <stub-tag.h>
|
||||||
|
|
|
@ -122,6 +122,7 @@ _dl_sysdep_start (void **start_argptr,
|
||||||
|
|
||||||
unfmh(); /* XXX */
|
unfmh(); /* XXX */
|
||||||
|
|
||||||
|
#if 0 /* XXX make this work for real someday... */
|
||||||
if (_dl_hurd_data->user_entry == (vm_address_t) &ENTRY_POINT)
|
if (_dl_hurd_data->user_entry == (vm_address_t) &ENTRY_POINT)
|
||||||
/* We were invoked as a command, not as the program interpreter.
|
/* We were invoked as a command, not as the program interpreter.
|
||||||
The generic ld.so code supports this: it will parse the args
|
The generic ld.so code supports this: it will parse the args
|
||||||
|
@ -166,6 +167,7 @@ unfmh(); /* XXX */
|
||||||
can be retrieved by the program later. */
|
can be retrieved by the program later. */
|
||||||
l->l_info[DT_NULL] = (void *) memobj;
|
l->l_info[DT_NULL] = (void *) memobj;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Call elf/rtld.c's main program. It will set everything
|
/* Call elf/rtld.c's main program. It will set everything
|
||||||
up and leave us to transfer control to USER_ENTRY. */
|
up and leave us to transfer control to USER_ENTRY. */
|
||||||
|
@ -643,11 +645,14 @@ _dl_important_hwcaps (const char *platform, size_t platform_len, size_t *sz,
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void weak_function
|
void weak_function
|
||||||
_dl_sysdep_fatal (const char *msg, ...)
|
_dl_sysdep_output (int fd, const char *msg, ...)
|
||||||
{
|
{
|
||||||
va_list ap;
|
va_list ap;
|
||||||
|
|
||||||
|
assert(fd < _hurd_init_dtablesize);
|
||||||
|
|
||||||
va_start (ap, msg);
|
va_start (ap, msg);
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
|
@ -655,55 +660,7 @@ _dl_sysdep_fatal (const char *msg, ...)
|
||||||
mach_msg_type_number_t nwrote;
|
mach_msg_type_number_t nwrote;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
if (__io_write (_hurd_init_dtable[2], msg, len, -1, &nwrote))
|
if (__io_write (_hurd_init_dtable[fd], msg, len, -1, &nwrote))
|
||||||
break;
|
|
||||||
len -= nwrote;
|
|
||||||
msg += nwrote;
|
|
||||||
} while (nwrote > 0);
|
|
||||||
msg = va_arg (ap, const char *);
|
|
||||||
} while (msg);
|
|
||||||
va_end (ap);
|
|
||||||
|
|
||||||
_exit (127);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void weak_function
|
|
||||||
_dl_sysdep_error (const char *msg, ...)
|
|
||||||
{
|
|
||||||
va_list ap;
|
|
||||||
|
|
||||||
va_start (ap, msg);
|
|
||||||
do
|
|
||||||
{
|
|
||||||
size_t len = strlen (msg);
|
|
||||||
mach_msg_type_number_t nwrote;
|
|
||||||
do
|
|
||||||
{
|
|
||||||
if (__io_write (_hurd_init_dtable[2], msg, len, -1, &nwrote))
|
|
||||||
break;
|
|
||||||
len -= nwrote;
|
|
||||||
msg += nwrote;
|
|
||||||
} while (nwrote > 0);
|
|
||||||
msg = va_arg (ap, const char *);
|
|
||||||
} while (msg);
|
|
||||||
va_end (ap);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void weak_function
|
|
||||||
_dl_sysdep_message (const char *msg, ...)
|
|
||||||
{
|
|
||||||
va_list ap;
|
|
||||||
|
|
||||||
va_start (ap, msg);
|
|
||||||
do
|
|
||||||
{
|
|
||||||
size_t len = strlen (msg);
|
|
||||||
mach_msg_type_number_t nwrote;
|
|
||||||
do
|
|
||||||
{
|
|
||||||
if (__io_write (_hurd_init_dtable[1], msg, len, -1, &nwrote))
|
|
||||||
break;
|
break;
|
||||||
len -= nwrote;
|
len -= nwrote;
|
||||||
msg += nwrote;
|
msg += nwrote;
|
||||||
|
|
22
sysdeps/mach/hurd/i386/sigcontextinfo.h
Normal file
22
sysdeps/mach/hurd/i386/sigcontextinfo.h
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
/* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||||
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Library General Public License as
|
||||||
|
published by the Free Software Foundation; either version 2 of the
|
||||||
|
License, or (at your option) any later version.
|
||||||
|
|
||||||
|
The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Library General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Library General Public
|
||||||
|
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||||
|
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
|
#define SIGCONTEXT struct sigcontext
|
||||||
|
#define GET_PC(ctx) ((void *) (ctx).sc_eip)
|
||||||
|
#define GET_FRAME(ctx) ((void *) (ctx).sc_ebp)
|
||||||
|
#define GET_STACK(ctx) ((void *) (ctx).sc_uesp)
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (C) 1991, 92, 93, 94, 95, 96, 97 Free Software Foundation, Inc.
|
/* Copyright (C) 1991,92,93,94,95,96,97,98 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
@ -23,9 +23,8 @@
|
||||||
|
|
||||||
/* Change the set of blocked signals to SET,
|
/* Change the set of blocked signals to SET,
|
||||||
wait until a signal arrives, and restore the set of blocked signals. */
|
wait until a signal arrives, and restore the set of blocked signals. */
|
||||||
/* XXX should be __sigsuspend ? */
|
|
||||||
int
|
int
|
||||||
sigsuspend (set)
|
__sigsuspend (set)
|
||||||
const sigset_t *set;
|
const sigset_t *set;
|
||||||
{
|
{
|
||||||
struct hurd_sigstate *ss;
|
struct hurd_sigstate *ss;
|
||||||
|
@ -80,3 +79,4 @@ sigsuspend (set)
|
||||||
errno = EINTR;
|
errno = EINTR;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
weak_alias (__sigsuspend, sigsuspend)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (C) 1991, 1996, 1997 Free Software Foundation, Inc.
|
/* Copyright (C) 1991, 1996, 1997, 1998 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
/* Change the set of blocked signals to SET,
|
/* Change the set of blocked signals to SET,
|
||||||
wait until a signal arrives, and restore the set of blocked signals. */
|
wait until a signal arrives, and restore the set of blocked signals. */
|
||||||
int
|
int
|
||||||
sigsuspend (set)
|
__sigsuspend (set)
|
||||||
const sigset_t *set;
|
const sigset_t *set;
|
||||||
{
|
{
|
||||||
sigset_t oset;
|
sigset_t oset;
|
||||||
|
@ -49,3 +49,4 @@ sigsuspend (set)
|
||||||
__set_errno (save);
|
__set_errno (save);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
weak_alias (__sigsuspend, sigsuspend)
|
||||||
|
|
|
@ -18,6 +18,6 @@
|
||||||
Boston, MA 02111-1307, USA. */
|
Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
#define SIGCONTEXT struct sigcontext
|
#define SIGCONTEXT struct sigcontext
|
||||||
#define GET_EIP(ctx) ((void *) ctx.eip)
|
#define GET_PC(ctx) ((void *) ctx.eip)
|
||||||
#define GET_FRAME(ctx) ((void *) ctx.ebp)
|
#define GET_FRAME(ctx) ((void *) ctx.ebp)
|
||||||
#define GET_STACK(ctx) ((void *) ctx.esp_at_signal)
|
#define GET_STACK(ctx) ((void *) ctx.esp_at_signal)
|
||||||
|
|
|
@ -58,6 +58,7 @@
|
||||||
#define _PATH_MOUNTED "/etc/mtab"
|
#define _PATH_MOUNTED "/etc/mtab"
|
||||||
#define _PATH_NOLOGIN "/etc/nologin"
|
#define _PATH_NOLOGIN "/etc/nologin"
|
||||||
#define _PATH_PRESERVE "/var/preserve"
|
#define _PATH_PRESERVE "/var/preserve"
|
||||||
|
#define _PATH_RWHODIR "/var/spool/rwho"
|
||||||
#define _PATH_SENDMAIL "/usr/sbin/sendmail"
|
#define _PATH_SENDMAIL "/usr/sbin/sendmail"
|
||||||
#define _PATH_SHADOW "/etc/shadow"
|
#define _PATH_SHADOW "/etc/shadow"
|
||||||
#define _PATH_SHELLS "/etc/shells"
|
#define _PATH_SHELLS "/etc/shells"
|
||||||
|
|
37
sysdeps/unix/sysv/sysv4/solaris2/sigpending.c
Normal file
37
sysdeps/unix/sysv/sysv4/solaris2/sigpending.c
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
/* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||||
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Library General Public License as
|
||||||
|
published by the Free Software Foundation; either version 2 of the
|
||||||
|
License, or (at your option) any later version.
|
||||||
|
|
||||||
|
The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Library General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Library General Public
|
||||||
|
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||||
|
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
|
#include <errno.h>
|
||||||
|
#include <stddef.h>
|
||||||
|
#include <signal.h>
|
||||||
|
|
||||||
|
extern int __syscall_sigpending (int subcode, sigset_t *set);
|
||||||
|
|
||||||
|
|
||||||
|
/* Store in SET all signals that are blocked and pending. */
|
||||||
|
int
|
||||||
|
sigpending (sigset_t *set)
|
||||||
|
{
|
||||||
|
if (set == NULL)
|
||||||
|
{
|
||||||
|
__set_errno (EINVAL);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return __syscall_sigpending (1, set);
|
||||||
|
}
|
3
sysdeps/unix/sysv/sysv4/solaris2/sigstack.c
Normal file
3
sysdeps/unix/sysv/sysv4/solaris2/sigstack.c
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
/* We can reuse the Linux implementation with some tricks. */
|
||||||
|
#define __NR_sigaltstack 1
|
||||||
|
#include <sysdeps/unix/sysv/linux/sigstack.c>
|
2
sysdeps/unix/sysv/sysv4/solaris2/sigwaitinfo.c
Normal file
2
sysdeps/unix/sysv/sysv4/solaris2/sigwaitinfo.c
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
/* We can reuse the Linux implementation. */
|
||||||
|
#include <sysdeps/unix/sysv/linux/sigwaitinfo.h>
|
2
sysdeps/unix/sysv/sysv4/solaris2/sparc/sparc32/syscall.S
Normal file
2
sysdeps/unix/sysv/sysv4/solaris2/sparc/sparc32/syscall.S
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
/* Bets are that the Linux code works... */
|
||||||
|
#include <sysdeps/unix/sysv/linux/sparc/sparc32/syscall.S>
|
|
@ -1,3 +1,7 @@
|
||||||
# File name Caller Syscall name # args Strong name Weak names
|
# File name Caller Syscall name # args Strong name Weak names
|
||||||
|
|
||||||
sigaction - sigaction 3 __sigaction sigaction
|
sigaction - sigaction 3 __sigaction sigaction
|
||||||
|
sigaltstack - sigaltstack 2 sigaltstack
|
||||||
|
sigpending - sigpending 2 __syscall_sigpending
|
||||||
|
sigqueue - sigqueue 3 __sigqueue sigqueue
|
||||||
|
sigtimedwait - sigtimedwait 3 __sigtimedwait sigtime
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# @(#)leapseconds 7.10
|
# @(#)leapseconds 7.11
|
||||||
|
|
||||||
# Allowance for leapseconds added to each timezone file.
|
# Allowance for leapseconds added to each timezone file.
|
||||||
|
|
||||||
|
@ -41,3 +41,4 @@ Leap 1993 Jun 30 23:59:60 + S
|
||||||
Leap 1994 Jun 30 23:59:60 + S
|
Leap 1994 Jun 30 23:59:60 + S
|
||||||
Leap 1995 Dec 31 23:59:60 + S
|
Leap 1995 Dec 31 23:59:60 + S
|
||||||
Leap 1997 Jun 30 23:59:60 + S
|
Leap 1997 Jun 30 23:59:60 + S
|
||||||
|
Leap 1998 Dec 31 23:59:60 + S
|
||||||
|
|
Loading…
Add table
Reference in a new issue