mirror of
git://sourceware.org/git/glibc.git
synced 2026-09-08 23:58:31 +08:00
Compare commits
42
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5107cf1d7d | ||
|
|
d705269e75 | ||
|
|
e7f1f046f5 | ||
|
|
900bec852d | ||
|
|
ce37fa887b | ||
|
|
714a562f0b | ||
|
|
b0de3e9e30 | ||
|
|
5649a1d60d | ||
|
|
2a7b5469dd | ||
|
|
b13927da59 | ||
|
|
f671aeab4e | ||
|
|
d951286f64 | ||
|
|
76b87c039b | ||
|
|
06bdbaa0a6 | ||
|
|
c12f5d3d34 | ||
|
|
ebbad4cc83 | ||
|
|
cf29ffbef9 | ||
|
|
a133e7a4d2 | ||
|
|
0501d60367 | ||
|
|
bfbc57545a | ||
|
|
9498096c93 | ||
|
|
1f205a479b | ||
|
|
43b0e40f85 | ||
|
|
8b13cb56b3 | ||
|
|
a2ef11b29c | ||
|
|
51702635af | ||
|
|
1f07e61775 | ||
|
|
6b00df4189 | ||
|
|
93256cc1ac | ||
|
|
779ae82ecd | ||
|
|
a12ea214db | ||
|
|
47f13fd4ba | ||
|
|
b4012b7542 | ||
|
|
406f977a5a | ||
|
|
db9d4d768f | ||
|
|
29bb8719cf | ||
|
|
307bcd7783 | ||
|
|
dd33e89fb2 | ||
|
|
7799b7b335 | ||
|
|
9d8067d8f2 | ||
|
|
6355131153 | ||
|
|
c131718ccc |
@@ -14,6 +14,13 @@ gpl2lgpl.sed
|
||||
distinfo
|
||||
distinfo
|
||||
|
||||
test-include
|
||||
analysis
|
||||
docs
|
||||
|
||||
crypt
|
||||
linuxthreads
|
||||
localedata
|
||||
secure_rpc
|
||||
|
||||
aio
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
List of known bugs (certainly very incomplete)
|
||||
----------------------------------------------
|
||||
|
||||
Time-stamp: <1997-03-22T04:31:41+0100 drepper>
|
||||
Time-stamp: <1997-05-21T21:25:40+0200 drepper>
|
||||
|
||||
This following list contains those bugs which I'm aware of. Please
|
||||
make sure that bugs you report are not listed here. If you can fix one
|
||||
@@ -10,7 +10,7 @@ of these bugs/limitations I'll certainly be glad to receive a patch.
|
||||
Another source of information about bugs is the problem data base of the
|
||||
GNU project. There is an easy to use WWW interface is available at
|
||||
|
||||
http://pogo.gnu.ai.mit.edu:8080/cgi-bin/wwwgnats.pl
|
||||
http://www-gnats.gnu.ai.mit.edu:8080/cgi-bin/wwwgnats.pl
|
||||
|
||||
I would appreciate it very much if you could verify the problem was not
|
||||
reported before by looking though the database. To make the information
|
||||
@@ -29,8 +29,7 @@ Severity: [ *] to [***]
|
||||
|
||||
[ **] There are problems with signal handling when using LinuxThreads.
|
||||
|
||||
[ **] The `cbrtl' function is inaccurate. The algorithm used for `double'
|
||||
and `float' is not usable for `long double'.
|
||||
[ **] The `cbrtl' function for ix86 does not work in the moment.
|
||||
|
||||
[ **] Not really a bug, but it could lead to such:
|
||||
The RPC code is ugly ugly ugly. It's more or less verbatim taken
|
||||
|
||||
@@ -183,7 +183,12 @@ Library.
|
||||
slow.
|
||||
|
||||
* plenty of time (approx 1h for i?86-linux on i586@133 or 2.5h on
|
||||
i486@66 or 4.5h on i486@33). For Hurd systems times are much higher.
|
||||
i486@66 or 4.5h on i486@33), both for shared and static only).
|
||||
For Hurd systems times are much higher.
|
||||
|
||||
For Atari Falcon (Motorola 68030 @ 16 Mhz, 14 Mb memory) James Troup
|
||||
<J.J.Troup@comp.brad.ac.uk> reports for a full build (shared, static,
|
||||
and profiled) a compile time of 45h34m.
|
||||
|
||||
If you have some more measurements let me know.
|
||||
|
||||
@@ -427,7 +432,7 @@ ship the cryptographic function together with the libc.
|
||||
But of course we provide the code and there is an very easy way to use
|
||||
this code. First get the extra package. People in the US way get it
|
||||
from the same place they got the GNU libc from. People outside the US
|
||||
should get the code from ftp.uni-c.dk [129.142.6.74], or another
|
||||
should get the code from ftp://ftp.ifi.uio.no/pub/gnu, or another
|
||||
archive site outside the USA. The README explains how to install the
|
||||
sources.
|
||||
|
||||
@@ -578,6 +583,10 @@ something like this:
|
||||
|
||||
GROUP ( libc.so.6 ld.so.1 libc.a )
|
||||
|
||||
or in ix86/Linux and alpha/Linux:
|
||||
|
||||
GROUP ( libc.so.6 ld-linux.so.2 libc.a )
|
||||
|
||||
|
||||
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
|
||||
[Q18] ``The prototypes for `connect', `accept', `getsockopt',
|
||||
@@ -699,7 +708,7 @@ Answers were given by:
|
||||
{DMT} David Mosberger-Tang, <davidm@AZStarNet.com>
|
||||
{RM} Roland McGrath, <roland@gnu.ai.mit.edu>
|
||||
{HJL} H.J. Lu, <hjl@gnu.ai.mit.edu>
|
||||
{AJ} Andreas Jaeger, <aj@arthur.pfalz.de>
|
||||
{AJ} Andreas Jaeger, <aj@arthur.rhein-neckar.de>
|
||||
{EY} Eric Youngdale, <eric@andante.jic.com>
|
||||
|
||||
Local Variables:
|
||||
|
||||
@@ -118,8 +118,8 @@ foo:=$(shell echo '+out=$(+out)' >&2; echo foofoo >&2)
|
||||
$(+sysdeps)
|
||||
foo:=$(shell echo 'made +tsrcs=$(+tsrcs)'>&2)
|
||||
foo:=$(shell echo generated='$(generated)' >&2)
|
||||
generated := $(sort $(generated) $(generated:.S=.c) $(generated:.s=.c))
|
||||
foo:=$(shell echo now generated='$(generated)' >&2)
|
||||
#generated := $(sort $(generated) $(generated:.S=.c) $(generated:.s=.c))
|
||||
#foo:=$(shell echo now generated='$(generated)' >&2)
|
||||
+tsrcs := $(sort $(filter-out $(generated),$(+tsrcs)))
|
||||
foo:=$(shell echo '+tsrcs=$(+tsrcs)'>&2)
|
||||
foo:=$(shell echo foobie, dammit! >&2)
|
||||
@@ -195,9 +195,9 @@ dist.tar: README $(tardir) $(+tsrcs)
|
||||
|
||||
$(tardir).tar: dist.tar subdir_dist
|
||||
@echo Files listed here have names exceeding 14 chars.
|
||||
tar xfv $< -C /tmp | sed -n '/[^/]\{15,\}/p'
|
||||
tar covf $@ -C /tmp $(tardir)
|
||||
-rm -fr /tmp/$(tardir) dist.tar &
|
||||
tar xfv $< -C $${TMPDIR-/tmp} | sed -n '/[^/]\{15,\}/p'
|
||||
tar covf $@ -C $${TMPDIR-/tmp} $(tardir)
|
||||
-rm -fr $${TMPDIR-/tmp}/$(tardir) dist.tar &
|
||||
|
||||
%.Z: %
|
||||
compress -c $< > $@
|
||||
|
||||
+29
-11
@@ -83,6 +83,14 @@ export sysdep_dir := $(sysdep_dir)
|
||||
# Get the values defined by options to `configure'.
|
||||
include $(common-objpfx)config.make
|
||||
|
||||
# We have a special subdir for each binary format.
|
||||
# For now, only ELF is fully supported.
|
||||
ifeq ($(elf),yes)
|
||||
binfmt-subdir = elf
|
||||
else
|
||||
binfmt-subdir =
|
||||
endif
|
||||
|
||||
# Complete path to sysdep dirs.
|
||||
full-config-sysdirs := $(filter /%, $(config-sysdirs)) \
|
||||
$(addprefix $(..), $(filter-out /%, $(config-sysdirs)))
|
||||
@@ -318,13 +326,28 @@ ifndef asm-CPPFLAGS
|
||||
asm-CPPFLAGS =
|
||||
endif
|
||||
|
||||
# Installed name of the startup code.
|
||||
ifneq ($(elf),yes)
|
||||
# When not using ELF, there is just one startfile, called crt0.o.
|
||||
start-installed-name = crt0.o
|
||||
else
|
||||
# In the ELF universe, crt0.o is called crt1.o, and there are
|
||||
# some additional bizarre files.
|
||||
start-installed-name = crt1.o
|
||||
have-initfini = yes
|
||||
endif
|
||||
|
||||
|
||||
# Command for linking programs with the C library.
|
||||
ifndef +link
|
||||
+link = $(CC) -nostdlib -nostartfiles -o $@ \
|
||||
$(sysdep-LDFLAGS) $(config-LDFLAGS) $(LDFLAGS) \
|
||||
$(addprefix $(csu-objpfx),start.o) $(+preinit) $(+prector) \
|
||||
$(filter-out $(addprefix $(csu-objpfx),start.o) $(+preinit) \
|
||||
$(link-extra-libs) $(common-objpfx)libc% $(+postinit),$^) \
|
||||
$(addprefix $(csu-objpfx),$(start-installed-name)) \
|
||||
$(+preinit) $(+prector) \
|
||||
$(filter-out $(addprefix $(csu-objpfx),start.o \
|
||||
$(start-installed-name))\
|
||||
$(+preinit) $(link-extra-libs) \
|
||||
$(common-objpfx)libc% $(+postinit),$^) \
|
||||
$(link-extra-libs) $(link-libc) $(+postctor) $(+postinit)
|
||||
endif
|
||||
ifndef config-LDFLAGS
|
||||
@@ -357,6 +380,7 @@ else
|
||||
link-libc = $(common-objpfx)libc.a $(gnulib) $(common-objpfx)libc.a
|
||||
endif
|
||||
endif
|
||||
|
||||
ifndef link-extra-libs
|
||||
ifeq (yes,$(build-shared))
|
||||
ifneq ($(common-objpfx),$(objpfx))
|
||||
@@ -467,14 +491,14 @@ endif # $(+cflags) == ""
|
||||
# and in the parent library source directory.
|
||||
# `+sysdep-includes' will be defined by Makerules.
|
||||
+includes = -I. $(filter-out -I,-I$(patsubst %/,%,$(..))) $($(stdio)-include) \
|
||||
$(includes) $(+sysdep-includes) $(last-includes)
|
||||
$(includes) $(+sysdep-includes) $(last-includes)
|
||||
|
||||
# Since libio has several internal header files, we use a -I instead
|
||||
# of many little headers in the top level source directory.
|
||||
libio-include = -I$(..)libio
|
||||
|
||||
# These are the variables that the implicit compilation rules use.
|
||||
CPPFLAGS = $(+includes) $(defines) -include $(..)libc-symbols.h \
|
||||
CPPFLAGS = $(+includes) $(defines) -include $(..)include/libc-symbols.h \
|
||||
$(sysdep-CPPFLAGS) $(CPPFLAGS-$(suffix $@)) $(CPPFLAGS-$(<F)) \
|
||||
$(CPPFLAGS-$(@F))
|
||||
override CFLAGS = $(+cflags) $(sysdep-CFLAGS) $(CFLAGS-$(suffix $@)) \
|
||||
@@ -536,12 +560,6 @@ endif
|
||||
ifndef BUILD_CC
|
||||
BUILD_CC = $(CC)
|
||||
endif
|
||||
|
||||
ifneq ($(BUILD_CC),$(CC))
|
||||
cross-compiling := yes
|
||||
else
|
||||
cross-compiling := no
|
||||
endif
|
||||
|
||||
# Figure out the version numbers from version.h.
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ subdirs = csu assert ctype db locale intl catgets math setjmp signal stdlib \
|
||||
stdio-common $(stdio) malloc string wcsmbs time dirent grp pwd \
|
||||
posix io termios resource misc login socket sysvipc gmon gnulib \
|
||||
wctype manual shadow md5-crypt nss $(sysdep-subdirs) po argp \
|
||||
$(add-ons) elf
|
||||
$(add-ons) $(binfmt-subdir)
|
||||
export subdirs := $(subdirs) # Benign, useless in GNU make before 3.63.
|
||||
|
||||
# The mach and hurd subdirectories have many generated header files which
|
||||
@@ -82,8 +82,8 @@ subdirs := $(filter mach,$(subdirs)) $(filter hurd,$(subdirs)) \
|
||||
subdir_install \
|
||||
$(addprefix install-, no-libc.a bin lib data headers others)
|
||||
|
||||
headers := errno.h sys/errno.h errnos.h limits.h values.h \
|
||||
features.h gnu-versions.h libc-lock.h xopen_lim.h
|
||||
headers := errno.h sys/errno.h bits/errno.h limits.h values.h \
|
||||
features.h gnu-versions.h bits/libc-lock.h bits/xopen_lim.h
|
||||
aux = sysdep $(libc-init) version
|
||||
before-compile += $(objpfx)version-info.h
|
||||
|
||||
@@ -131,9 +131,6 @@ ifeq (yes,$(build-shared))
|
||||
lib: $(common-objpfx)libc.so
|
||||
endif
|
||||
|
||||
# We have a versioning file for libc.so.
|
||||
#libc-map = libc.map
|
||||
|
||||
all-Subdirs-files = $(wildcard $(addsuffix /Subdirs, $(config-sysdirs)))
|
||||
$(objpfx)sysd-dirs: $(+sysdir_pfx)config.make $(all-Subdirs-files)
|
||||
(echo define sysdep-subdirs; \
|
||||
@@ -184,6 +181,7 @@ subdir-stubs := $(foreach dir,$(subdirs),$(common-objpfx)stub-$(dir))
|
||||
# the subdir's stubs file. Having more direct dependencies would result in
|
||||
# extra iterations over the list for subdirs and many recursive makes.
|
||||
$(inst_includedir)/gnu/stubs.h: subdir_install
|
||||
$(make-target-directory)
|
||||
@rm -f $(objpfx)stubs.h
|
||||
(echo '/* This file is automatically generated.';\
|
||||
echo ' It defines a symbol `__stub_FUNCTION'\'' for each function';\
|
||||
@@ -198,6 +196,7 @@ $(inst_includedir)/gnu/stubs.h: subdir_install
|
||||
ifeq (yes,$(build-shared))
|
||||
|
||||
$(inst_includedir)/gnu/lib-names.h: $(common-objpfx)gnu/lib-names.h
|
||||
$(make-target-directory)
|
||||
if test -r $@ && cmp -s $< $@; \
|
||||
then echo 'gnu/lib-names.h unchanged'; \
|
||||
else $(INSTALL_DATA) $< $@; fi
|
||||
@@ -280,10 +279,12 @@ parent_echo-distinfo:
|
||||
$(addprefix +nodist+,$(generated))
|
||||
|
||||
|
||||
.PHONY: parent-tests
|
||||
tests: parent-tests
|
||||
|
||||
# Run a test on the header files we use.
|
||||
tests: $(objpfx)isomac
|
||||
$(objpfx)./isomac '$(CC)' '$(+sysdep-includes)' \
|
||||
>$(common-objpfx)isomac.out
|
||||
parent-tests: $(objpfx)isomac
|
||||
$(dir $<)$(notdir $<) '$(CC)' '$(+sysdep-includes)' > $<.out
|
||||
|
||||
$(objpfx)isomac: isomac.c
|
||||
$(native-compile)
|
||||
@@ -313,8 +314,9 @@ makeinfo --no-validate --no-warn --no-headers $< -o $@
|
||||
endef
|
||||
INSTALL: manual/maint.texi; $(format-me)
|
||||
NOTES: manual/creature.texi; $(format-me)
|
||||
manual/dir-add.texi:
|
||||
manual/dir-add.texi manual/dir-add.info: FORCE
|
||||
$(MAKE) $(PARALLELMFLAGS) -C $(@D) $(@F)
|
||||
FORCE:
|
||||
|
||||
rpm/%: subdir_distinfo
|
||||
$(MAKE) $(PARALLELMFLAGS) -C $(@D) subdirs='$(subdirs)' $(@F)
|
||||
|
||||
@@ -95,6 +95,10 @@ o-iterator = $(patsubst %,$(..)o-iterator.mk,$(object-suffixes-left))
|
||||
vpath %.h $(subst $(empty) ,:,$(strip $(common-objpfx) $(objpfx) \
|
||||
$(+sysdep_dirs) $(..)))
|
||||
|
||||
# The same is true for RPC source files.
|
||||
vpath %.x $(subst $(empty) ,:,$(strip $(common-objpfx) $(objpfx) \
|
||||
$(+sysdep_dirs) $(..)))
|
||||
|
||||
# Some sysdep makefiles use this to distinguish being included here from
|
||||
# being included individually by a subdir makefile (hurd/Makefile needs this).
|
||||
in-Makerules := yes
|
||||
@@ -332,7 +336,7 @@ ifeq (yes,$(build-shared))
|
||||
# build shared libraries in place from the installed *_pic.a files.
|
||||
# $(LDLIBS-%.so) may contain -l switches to generate run-time dependencies
|
||||
# on other shared objects.
|
||||
lib%.so: lib%_pic.a; $(build-shlib)
|
||||
lib%.so: lib%_pic.a $(lib%-map); $(build-shlib)
|
||||
|
||||
ifeq ($(have-no-whole-archive),yes)
|
||||
no-whole-archive = -Wl,--no-whole-archive
|
||||
@@ -341,7 +345,7 @@ no-whole-archive =
|
||||
endif
|
||||
|
||||
ifeq ($(versioning),yes)
|
||||
load-map-file = $($(@F:%.so=%)-map:%=-Wl,--version-script=%)
|
||||
load-map-file = $($(@F:%.so=%)-map)
|
||||
else
|
||||
load-map-file =
|
||||
endif
|
||||
@@ -357,14 +361,12 @@ $(patsubst %,$(objpfx)%.so,$(extra-libs)): $(interp-obj)
|
||||
|
||||
define build-shlib
|
||||
$(LINK.o) -shared -o $@ $(sysdep-LDFLAGS) $(config-LDFLAGS) \
|
||||
-B$(csu-objpfx) $(load-map-file) \
|
||||
-B$(csu-objpfx) $(load-map-file:%=-Wl,--version-script=%) \
|
||||
-Wl,-soname=lib$(libprefix)$(@F:lib%.so=%).so$($(@F)-version) \
|
||||
$(LDFLAGS.so) $(LDFLAGS-$(@F:lib%.so=%).so) \
|
||||
-L$(subst :, -L,$(rpath-link)) -Wl,-rpath-link=$(rpath-link) \
|
||||
-Wl,--whole-archive $^ $(no-whole-archive) \
|
||||
$(LDLIBS-$(@F:lib%.so=%).so)
|
||||
test -z "$($(@F)-version)" || \
|
||||
(rm -f $@$($(@F)-version); $(LN_S) $(@F) $@$($(@F)-version))
|
||||
-Wl,--whole-archive $(filter-out $(load-map-file),$^) \
|
||||
$(no-whole-archive) $(LDLIBS-$(@F:lib%.so=%).so)
|
||||
endef
|
||||
|
||||
# Don't try to use -lc when making libc.so itself.
|
||||
@@ -375,11 +377,18 @@ LDFLAGS-c.so = -nostdlib -nostartfiles
|
||||
LDLIBS-c.so = -lgcc
|
||||
# Give libc.so an entry point and make it directly runnable itself.
|
||||
LDFLAGS-c.so += -e __libc_main
|
||||
# We have a versioning file for libc.so.
|
||||
libc-map = $(..)libc.map
|
||||
# Use our own special initializer and finalizer files for libc.so.
|
||||
$(common-objpfx)libc.so: $(elfobjdir)/soinit.so \
|
||||
$(common-objpfx)libc_pic.a \
|
||||
$(elfobjdir)/sofini.so $(elfobjdir)/ld.so
|
||||
$(elfobjdir)/sofini.so $(elfobjdir)/ld.so \
|
||||
$(libc-map)
|
||||
$(build-shlib)
|
||||
ifdef libc.so-version
|
||||
$(common-objpfx)libc.so$(libc.so-version): $(common-objpfx)libc.so
|
||||
$(make-link)
|
||||
endif
|
||||
endif
|
||||
|
||||
# Some files must not be compiled with the exception handler mechanism
|
||||
@@ -477,8 +486,8 @@ others: $(addprefix $(objpfx),$(install-lib))
|
||||
ifndef objects
|
||||
|
||||
# Create the stamp$o files to keep the parent makefile happy.
|
||||
subdir_lib: $(foreach o,$(object-suffixes),$(objpfx)stamp$o-$(subdir))
|
||||
$(foreach o,$(object-suffixes),$(objpfx)stamp$o-$(subdir)):
|
||||
subdir_lib: $(foreach o,$(object-suffixes),$(objpfx)stamp$o)
|
||||
$(foreach o,$(object-suffixes),$(objpfx)stamp$o):
|
||||
$(make-target-directory)
|
||||
rm -f $@; > $@
|
||||
else
|
||||
@@ -490,19 +499,19 @@ else
|
||||
define o-iterator-doit
|
||||
$(common-objpfx)$(patsubst %,$(libtype$o),c)(\
|
||||
$(addsuffix .%,$(filter-out $(elide-routines$o),$(notdir $(objects:.o=))))): \
|
||||
$(objpfx)stamp.%-$(subdir) ;
|
||||
$(objpfx)stamp.% ;
|
||||
endef
|
||||
object-suffixes-left := $(object-suffixes)
|
||||
include $(o-iterator)
|
||||
|
||||
# The pattern rule tells Make to remake $(objpfx)stamp.%-$(subdir) as
|
||||
# The pattern rule tells Make to remake $(objpfx)stamp.% as
|
||||
# the way to update all the foo.% object files in $(objects). Now we
|
||||
# define explicit rules to update each $(objpfx)stamp.SUFFIX-$(subdir)
|
||||
# define explicit rules to update each $(objpfx)stamp.SUFFIX
|
||||
# timestamp file; these rules (one explicit rule is generated for each
|
||||
# object suffix) will update the parent archive with ar. Use a static
|
||||
# pattern rule so $* is set to the object type during the commands.
|
||||
define o-iterator-doit
|
||||
$(objpfx)stamp$o-$(subdir): $(objpfx)stamp%-$(subdir): $(o-objects); $$(do-ar)
|
||||
$(objpfx)stamp$o: $(objpfx)stamp%: $(o-objects); $$(do-ar)
|
||||
endef
|
||||
object-suffixes-left := $(object-suffixes)
|
||||
include $(o-iterator)
|
||||
@@ -529,7 +538,7 @@ $(common-objpfx)$(patsubst %,$(libtype$o),c)($(ar-symtab-name)): \
|
||||
$$(RANLIB) $$(common-objpfx)$$(patsubst %,$$(libtype$o),c)
|
||||
endef
|
||||
ifndef subdir
|
||||
subdirs-stamps := $(foreach d,$(subdirs),$(common-objpfx)$d/stamp%-$d)
|
||||
subdirs-stamps := $(foreach d,$(subdirs),$(common-objpfx)$d/stamp%)
|
||||
subdirs-stamp-o = $(subst %,$o,$(subdirs-stamps))
|
||||
$(subdirs-stamps): subdir_lib;
|
||||
endif
|
||||
@@ -836,10 +845,10 @@ ALL_BUILD_CFLAGS = $(BUILD_CFLAGS) -include $(..)config.h
|
||||
check: tests
|
||||
|
||||
.PHONY: TAGS
|
||||
TAGS: $(common-objpfx)distinfo-$(subdir) $(..)MakeTAGS
|
||||
TAGS: $(objpfx)distinfo $(..)MakeTAGS
|
||||
$(MAKE) $(addprefix -f ,$^) $@
|
||||
|
||||
$(..)po/%.pot: $(common-objpfx)distinfo-$(subdir) $(..)MakeTAGS FORCE
|
||||
$(..)po/%.pot: $(objpfx)distinfo $(..)MakeTAGS FORCE
|
||||
$(MAKE) $(addprefix -f ,$(filter-out FORCE,$^)) $@
|
||||
FORCE:
|
||||
|
||||
@@ -866,7 +875,7 @@ common-mostlyclean:
|
||||
$(rmobjs)
|
||||
define rmobjs
|
||||
$(foreach o,$(object-suffixes),
|
||||
-rm -f $(addprefix $(objpfx),stamp$o-$(subdir)) $(o-objects))
|
||||
-rm -f $(objpfx)stamp$o $(o-objects))
|
||||
endef
|
||||
|
||||
# Also remove the dependencies and generated source files.
|
||||
@@ -874,7 +883,7 @@ common-clean: common-mostlyclean
|
||||
-rm -f $(addprefix $(objpfx),$(generated)) $(+depfiles)
|
||||
-rm -fr $(addprefix $(objpfx),$(generated-dirs))
|
||||
-rm -f $(addprefix $(common-objpfx),$(common-generated))
|
||||
-rm -f $(common-objpfx)distinfo-$(subdir)
|
||||
-rm -f $(objpfx)distinfo
|
||||
|
||||
# Produce a file `stub-$(subdir)' which contains `#define __stub_FUNCTION'
|
||||
# for each function which is a stub. We grovel over all the .d files
|
||||
@@ -897,7 +906,7 @@ $(common-objpfx)stub-$(subdir): $(+depfiles)
|
||||
# Make the distribution tar file.
|
||||
|
||||
.PHONY: dist
|
||||
dist: $(common-objpfx)distinfo-$(subdir) $(..)Make-dist
|
||||
dist: $(objpfx)distinfo $(..)Make-dist
|
||||
$(MAKE) -f $< -f $(word 2,$^) $(Make-dist-args)
|
||||
|
||||
# Avoid depending on source files found in sysdeps dirs,
|
||||
@@ -908,14 +917,13 @@ dist: $(filter-out %.c %.S %.s,$(distribute))
|
||||
# environment get too large. Instead, we write all the information into
|
||||
# a generated makefile fragment `distinfo', and then include it with -f in
|
||||
# the sub-make that makes the distribution (above).
|
||||
$(common-objpfx)distinfo-$(subdir): Makefile $(..)Makerules \
|
||||
$(wildcard $(foreach dir,$(sysdirs),\
|
||||
$(dir)/Makefile))
|
||||
$(objpfx)distinfo: Makefile $(..)Makerules \
|
||||
$(wildcard $(foreach dir,$(sysdirs),$(dir)/Makefile))
|
||||
$(make-target-directory)
|
||||
$(distinfo-vars)
|
||||
mv -f $@.new $@
|
||||
.PHONY: subdir_distinfo distinfo
|
||||
subdir_distinfo: distinfo
|
||||
distinfo: $(common-objpfx)distinfo-$(subdir)
|
||||
.PHONY: subdir_distinfo
|
||||
subdir_distinfo: $(objpfx)distinfo
|
||||
|
||||
define distinfo-vars
|
||||
rm -f $@.new
|
||||
|
||||
@@ -57,39 +57,12 @@ contact <bug-glibc@prep.ai.mit.edu>
|
||||
[ 7] Several math functions have to be written:
|
||||
|
||||
- exp2
|
||||
- nearbyint
|
||||
- ceil
|
||||
- round
|
||||
- rinttol
|
||||
- rinttoll
|
||||
- roundtol
|
||||
- roundtoll
|
||||
|
||||
each with float, double, and long double arguments. Writing these
|
||||
functions should be possible when following the implementation of
|
||||
the existing exp/log functions for other bases.
|
||||
each with float, double, and long double arguments.
|
||||
|
||||
Beside this most of the complex math functions which are new in
|
||||
ISO C 9X. gcc already has support for numbers of complex type so the
|
||||
implementation should be possible today. I mention here the names
|
||||
and the way to write them (argument is z = x + iy):
|
||||
|
||||
- sin(z) = 1/(2i) (e^(iz) - e^-(iz)) = sin(x) cosh(y) + i cos(x) sinh(y)
|
||||
- cos(z) = 1/2 (e^(iz) + e^-(iz)) = cos(x) cosh(y) - i sin(x) sinh(y)
|
||||
- tan(z) = 1/i (e^(iz) - e^-(iz))/(e^(iz) + e^-(iz))
|
||||
- cot(z) = i (e^(iz) + e^-(iz))/(e^(iz) - e^-(iz))
|
||||
- asin(z) = -i ln(iz + sqrt(1-z^2))
|
||||
- acos(z) = -i ln(z + sqrt(z^2-1))
|
||||
- atan(z) = 1/(2i) ln((1+iz)/(1-iz))
|
||||
- acot(z) = -1/(2i) ln((iz+1)/(iz-1))
|
||||
- tanh(z) = (e^z - e^-z)/(e^z + e^-z)
|
||||
- coth(z) = (e^z + e^-z)/(e^z - e^-z)
|
||||
|
||||
All functions should we written with all the parallelism in mind.
|
||||
And assembler versions are highly expreciated since, e.g., the ix87
|
||||
FPU provides an `fsincos' instructions which is certainly useful for
|
||||
the `sin' function. The implementations for the normal math functions
|
||||
shows other optimization techniques.
|
||||
ISO C 9X should be improved. Writing some of them in assembler is
|
||||
useful to exploit the parallelism which often is available.
|
||||
|
||||
|
||||
[ 8] If you enjoy assembler programming (as I do --drepper :-) you might
|
||||
@@ -107,12 +80,6 @@ contact <bug-glibc@prep.ai.mit.edu>
|
||||
work.
|
||||
|
||||
|
||||
[ 9] Write nftw() function. Perhaps it might be good to reimplement the
|
||||
ftw() function as well to share most of the code.
|
||||
|
||||
**** Almost done!
|
||||
|
||||
|
||||
[10] Extend regex and/or rx to work with wide characters and complete
|
||||
implementation of character class and collation class handling.
|
||||
|
||||
@@ -125,23 +92,12 @@ contact <bug-glibc@prep.ai.mit.edu>
|
||||
hard and not all services must be supported at once.
|
||||
|
||||
|
||||
[12] Rewrite utmp/wtmp functions to use database functions. This is much
|
||||
better than the normal flat file format.
|
||||
|
||||
**** There are plans for a new approach to this problem. Please contact
|
||||
bug-glibc@prep.ai.mit.edu before starting to work.)
|
||||
|
||||
|
||||
[13] Several more or less small functions have to be written:
|
||||
|
||||
+ tcgetid() and waitid() from XPG4.2
|
||||
+ grantpt(), ptsname(), unlockpt() from XPG4.2
|
||||
+ getdate() from XPG4.2
|
||||
*** Probably underway
|
||||
+ fmtmsg() from SVID
|
||||
*** Probably underway
|
||||
|
||||
More information are available on request.
|
||||
More information is available on request.
|
||||
|
||||
|
||||
[14] We need to write a library for on-the-fly transformation of streams
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
This directory contains the version 2.0.1 test release of the GNU C Library.
|
||||
This directory contains the version 2.0.90 test release of the GNU C Library.
|
||||
Many bugs have been fixed since the last release.
|
||||
Some bugs surely remain.
|
||||
|
||||
As of this release, the GNU C library is known to run on the following
|
||||
configurations:
|
||||
|
||||
*-*-gnu GNU Hurd
|
||||
i[3456]86-*-gnu GNU Hurd
|
||||
i[3456]86-*-linux-gnu Linux-2.0 on Intel
|
||||
m68k-*-linux-gnu Linux-2.0 on Motorola 680x0
|
||||
alpha-*-linux-gnu Linux-2.0 on DEC Alpha
|
||||
@@ -36,17 +36,18 @@ versions) used to run on the following configurations:
|
||||
sparc-sun-solaris2
|
||||
sparc-sun-sunos4
|
||||
|
||||
Whether this is still true for this release is unknown. Porting the
|
||||
library is not hard. If you are interested in doing a port, please
|
||||
get on the mailing list by sending electronic mail to
|
||||
<bug-glibc-request@prep.ai.mit.edu>.
|
||||
Since no one has volunteered to test and fix the above configurations,
|
||||
these are not supported at the moment. It's expected that these don't
|
||||
work anymore. Porting the library is not hard. If you are interested
|
||||
in doing a port, please contact the glibc maintainers by sending
|
||||
electronic mail to <bug-glibc@prep.ai.mit.edu>.
|
||||
|
||||
The GNU C library now includes Michael Glad's Ultra Fast Crypt, which
|
||||
provides the Unix `crypt' function, plus some other entry points.
|
||||
Because of the United States export restriction on DES implementations,
|
||||
we are distributing this code separately from the rest of the C
|
||||
library. There is an extra distribution tar file just for crypt; it is
|
||||
called `glibc-crypt-2.0.1.tar.gz'. You can just unpack the crypt
|
||||
called `glibc-crypt-2.0.90.tar.gz'. You can just unpack the crypt
|
||||
distribution along with the rest of the C library and build; you can
|
||||
also build the library without getting crypt. Users outside the USA
|
||||
can get the crypt distribution via anonymous FTP from ftp.ifi.uio.no
|
||||
|
||||
+6
-5
@@ -5,7 +5,7 @@ Some bugs surely remain.
|
||||
As of this release, the GNU C library is known to run on the following
|
||||
configurations:
|
||||
|
||||
*-*-gnu GNU Hurd
|
||||
i[3456]86-*-gnu GNU Hurd
|
||||
i[3456]86-*-linux-gnu Linux-2.0 on Intel
|
||||
m68k-*-linux-gnu Linux-2.0 on Motorola 680x0
|
||||
alpha-*-linux-gnu Linux-2.0 on DEC Alpha
|
||||
@@ -36,10 +36,11 @@ versions) used to run on the following configurations:
|
||||
sparc-sun-solaris2
|
||||
sparc-sun-sunos4
|
||||
|
||||
Whether this is still true for this release is unknown. Porting the
|
||||
library is not hard. If you are interested in doing a port, please
|
||||
get on the mailing list by sending electronic mail to
|
||||
<bug-glibc-request@prep.ai.mit.edu>.
|
||||
Since no one has volunteered to test and fix the above configurations,
|
||||
these are not supported at the moment. It's expected that these don't
|
||||
work anymore. Porting the library is not hard. If you are interested
|
||||
in doing a port, please contact the glibc maintainers by sending
|
||||
electronic mail to <bug-glibc@prep.ai.mit.edu>.
|
||||
|
||||
The GNU C library now includes Michael Glad's Ultra Fast Crypt, which
|
||||
provides the Unix `crypt' function, plus some other entry points.
|
||||
|
||||
@@ -122,7 +122,7 @@ subdir_echo-headers: echo-headers
|
||||
|
||||
.PHONY: subdir_echo-distinfo
|
||||
subdir_echo-distinfo:
|
||||
@echo $(addprefix +header+,$(headers)) \
|
||||
@echo $(addprefix +header+,$(headers) $(filter %.h,$(distribute))) \
|
||||
$(addprefix +nodist+,$(generated) $(common-generated) $(dont_distribute))
|
||||
|
||||
# We want to install everything except the library itself, but update all
|
||||
|
||||
Vendored
+59
@@ -31,3 +31,62 @@ changequote([,])dnl
|
||||
fi
|
||||
AC_MSG_RESULT($ac_cv_check_symbol_$1)])dnl
|
||||
dnl
|
||||
|
||||
dnl These modifications are to allow for an empty cross compiler tree.
|
||||
dnl In the situation that cross-linking is impossible, the variable
|
||||
dnl `cross_linkable' will be substituted with "yes".
|
||||
AC_DEFUN(AC_PROG_CC_LOCAL,
|
||||
[AC_BEFORE([$0], [AC_PROG_CPP])dnl
|
||||
AC_CHECK_PROG(CC, gcc, gcc)
|
||||
if test -z "$CC"; then
|
||||
AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
|
||||
test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
|
||||
fi
|
||||
|
||||
AC_PROG_CC_WORKS_LOCAL
|
||||
AC_PROG_CC_GNU
|
||||
|
||||
dnl The following differs from the AC_PROG_CC macro in autoconf. Since
|
||||
dnl we require a recent version of gcc to be used we do not need to go
|
||||
dnl into lengths and test for bugs in old versions. It must be gcc 2.7
|
||||
dnl or above.
|
||||
if test $ac_cv_prog_gcc = yes; then
|
||||
GCC=yes
|
||||
|
||||
dnl Check the version
|
||||
cat > conftest.c <<EOF
|
||||
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
|
||||
yes;
|
||||
#endif
|
||||
EOF
|
||||
if AC_TRY_COMMAND(${CC-cc} -E conftest.c) | egrep yes >/dev/null 2>&1; then
|
||||
if test -z "$CFLAGS"; then
|
||||
CFLAGS="-g -O2"
|
||||
fi
|
||||
else
|
||||
AC_MSG_ERROR([We require GNU CC version 2.7 or newer])
|
||||
fi
|
||||
else
|
||||
AC_MSG_ERROR([GNU libc must be compiled using GNU CC])
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN(AC_PROG_CC_WORKS_LOCAL,
|
||||
[AC_MSG_CHECKING([whether the C compiler ($CC $CFLAGS $LDFLAGS) works])
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_C
|
||||
AC_TRY_COMPILER([main(){return(0);}], ac_cv_prog_cc_works, ac_cv_prog_cc_cross)
|
||||
AC_LANG_RESTORE
|
||||
AC_MSG_RESULT($ac_cv_prog_cc_works)
|
||||
if test $ac_cv_prog_cc_works = no; then
|
||||
cross_linkable=no
|
||||
ac_cv_prog_cc_cross=yes
|
||||
dnl AC_MSG_ERROR([installation or configuration problem: C compiler cannot create executables.])
|
||||
else
|
||||
cross_linkable=yes
|
||||
fi
|
||||
AC_MSG_CHECKING([whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler])
|
||||
AC_MSG_RESULT($ac_cv_prog_cc_cross)
|
||||
AC_SUBST(cross_linkable)
|
||||
cross_compiling=$ac_cv_prog_cc_cross
|
||||
])
|
||||
|
||||
-108
@@ -1,108 +0,0 @@
|
||||
/* Copyright (C) 1991 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 General Public License as published by
|
||||
the Free Software Foundation; either version 1, 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 General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with the GNU C Library; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
|
||||
/* ANSI and traditional C compatibility macros
|
||||
|
||||
ANSI C is assumed if __STDC__ is #defined.
|
||||
|
||||
Macro ANSI C definition Traditional C definition
|
||||
----- ---- - ---------- ----------- - ----------
|
||||
PTR `void *' `char *'
|
||||
LONG_DOUBLE `long double' `double'
|
||||
CONST `const' `'
|
||||
VOLATILE `volatile' `'
|
||||
SIGNED `signed' `'
|
||||
PTRCONST `void *const' `char *'
|
||||
|
||||
DEFUN(name, arglist, args)
|
||||
|
||||
Defines function NAME.
|
||||
|
||||
ARGLIST lists the arguments, separated by commas and enclosed in
|
||||
parentheses. ARGLIST becomes the argument list in traditional C.
|
||||
|
||||
ARGS list the arguments with their types. It becomes a prototype in
|
||||
ANSI C, and the type declarations in traditional C. Arguments should
|
||||
be separated with `AND'. For functions with a variable number of
|
||||
arguments, the last thing listed should be `DOTS'.
|
||||
|
||||
DEFUN_VOID(name)
|
||||
|
||||
Defines a function NAME, which takes no arguments.
|
||||
|
||||
EXFUN(name, prototype)
|
||||
|
||||
Is used in an external function declaration.
|
||||
In ANSI C it is `NAMEPROTOTYPE' (so PROTOTYPE should be enclosed in
|
||||
parentheses). In traditional C it is `NAME()'.
|
||||
For a function that takes no arguments, PROTOTYPE should be `(NOARGS)'.
|
||||
|
||||
For example:
|
||||
extern int EXFUN(printf, (CONST char *format DOTS));
|
||||
int DEFUN(fprintf, (stream, format),
|
||||
FILE *stream AND CONST char *format DOTS) { ... }
|
||||
void DEFUN_VOID(abort) { ... }
|
||||
*/
|
||||
|
||||
#ifndef _ANSIDECL_H
|
||||
|
||||
#define _ANSIDECL_H 1
|
||||
|
||||
|
||||
/* Every source file includes this file,
|
||||
so they will all get the switch for lint. */
|
||||
/* LINTLIBRARY */
|
||||
|
||||
|
||||
#ifdef __STDC__
|
||||
|
||||
#define PTR void *
|
||||
#define PTRCONST void *CONST
|
||||
#define LONG_DOUBLE long double
|
||||
|
||||
#define AND ,
|
||||
#define NOARGS void
|
||||
#define CONST const
|
||||
#define VOLATILE volatile
|
||||
#define SIGNED signed
|
||||
#define DOTS , ...
|
||||
|
||||
#define EXFUN(name, proto) name proto
|
||||
#define DEFUN(name, arglist, args) name(args)
|
||||
#define DEFUN_VOID(name) name(NOARGS)
|
||||
|
||||
#else /* Not ANSI C. */
|
||||
|
||||
#define PTR char *
|
||||
#define PTRCONST PTR
|
||||
#define LONG_DOUBLE double
|
||||
|
||||
#define AND ;
|
||||
#define NOARGS
|
||||
#define CONST
|
||||
#define VOLATILE
|
||||
#define SIGNED
|
||||
#define DOTS
|
||||
|
||||
#define EXFUN(name, proto) name()
|
||||
#define DEFUN(name, arglist, args) name arglist args;
|
||||
#define DEFUN_VOID(name) name()
|
||||
|
||||
#endif /* ANSI C. */
|
||||
|
||||
|
||||
#endif /* ansidecl.h */
|
||||
+5
-2
@@ -22,8 +22,11 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <sysexits.h>
|
||||
|
||||
#include "argp.h"
|
||||
|
||||
/* The exit status that argp will use when exiting due to a parsing error.
|
||||
If not defined or set by the user program, this defaults to 1. */
|
||||
error_t argp_err_exit_status = 1;
|
||||
If not defined or set by the user program, this defaults to EX_USAGE from
|
||||
<sysexits.h>. */
|
||||
error_t argp_err_exit_status = EX_USAGE;
|
||||
|
||||
@@ -157,7 +157,7 @@ __argp_fmtstream_update (argp_fmtstream_t fs)
|
||||
the end of the buffer. */
|
||||
nl = fs->p;
|
||||
}
|
||||
else if (fs->point_col + (nl - buf) < fs->rmargin)
|
||||
else if (fs->point_col + (nl - buf) < (ssize_t) fs->rmargin)
|
||||
{
|
||||
/* The buffer contains a full line that fits within the maximum
|
||||
line width. Reset point and scan the next line. */
|
||||
@@ -309,7 +309,7 @@ __argp_fmtstream_update (argp_fmtstream_t fs)
|
||||
int
|
||||
__argp_fmtstream_ensure (struct argp_fmtstream *fs, size_t amount)
|
||||
{
|
||||
if (fs->end - fs->p < amount)
|
||||
if ((size_t) (fs->end - fs->p) < amount)
|
||||
{
|
||||
ssize_t wrote;
|
||||
|
||||
@@ -330,7 +330,7 @@ __argp_fmtstream_ensure (struct argp_fmtstream *fs, size_t amount)
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (fs->end - fs->buf < amount)
|
||||
if ((size_t) (fs->end - fs->buf) < amount)
|
||||
/* Gotta grow the buffer. */
|
||||
{
|
||||
size_t new_size = fs->end - fs->buf + amount;
|
||||
@@ -354,7 +354,7 @@ __argp_fmtstream_ensure (struct argp_fmtstream *fs, size_t amount)
|
||||
ssize_t
|
||||
__argp_fmtstream_printf (struct argp_fmtstream *fs, const char *fmt, ...)
|
||||
{
|
||||
size_t out;
|
||||
int out;
|
||||
size_t size_guess = PRINTF_SIZE_GUESS; /* How much space to reserve. */
|
||||
|
||||
do
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
that. This header file is only used internally while compiling argp, and
|
||||
shouldn't be installed. */
|
||||
|
||||
#ifndef __ARGP_FMTSTREAM_H__
|
||||
#define __ARGP_FMTSTREAM_H__
|
||||
#ifndef _ARGP_FMTSTREAM_H
|
||||
#define _ARGP_FMTSTREAM_H
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
@@ -238,7 +238,7 @@ ARGP_FS_EI size_t
|
||||
__argp_fmtstream_set_lmargin (argp_fmtstream_t __fs, size_t __lmargin)
|
||||
{
|
||||
size_t __old;
|
||||
if (__fs->p - __fs->buf > __fs->point_offs)
|
||||
if ((size_t) (__fs->p - __fs->buf) > __fs->point_offs)
|
||||
__argp_fmtstream_update (__fs);
|
||||
__old = __fs->lmargin;
|
||||
__fs->lmargin = __lmargin;
|
||||
@@ -250,7 +250,7 @@ ARGP_FS_EI size_t
|
||||
__argp_fmtstream_set_rmargin (argp_fmtstream_t __fs, size_t __rmargin)
|
||||
{
|
||||
size_t __old;
|
||||
if (__fs->p - __fs->buf > __fs->point_offs)
|
||||
if ((size_t) (__fs->p - __fs->buf) > __fs->point_offs)
|
||||
__argp_fmtstream_update (__fs);
|
||||
__old = __fs->rmargin;
|
||||
__fs->rmargin = __rmargin;
|
||||
@@ -262,7 +262,7 @@ ARGP_FS_EI size_t
|
||||
__argp_fmtstream_set_wmargin (argp_fmtstream_t __fs, size_t __wmargin)
|
||||
{
|
||||
size_t __old;
|
||||
if (__fs->p - __fs->buf > __fs->point_offs)
|
||||
if ((size_t) (__fs->p - __fs->buf) > __fs->point_offs)
|
||||
__argp_fmtstream_update (__fs);
|
||||
__old = __fs->wmargin;
|
||||
__fs->wmargin = __wmargin;
|
||||
@@ -273,7 +273,7 @@ __argp_fmtstream_set_wmargin (argp_fmtstream_t __fs, size_t __wmargin)
|
||||
ARGP_FS_EI size_t
|
||||
__argp_fmtstream_point (argp_fmtstream_t __fs)
|
||||
{
|
||||
if (__fs->p - __fs->buf > __fs->point_offs)
|
||||
if ((size_t) (__fs->p - __fs->buf) > __fs->point_offs)
|
||||
__argp_fmtstream_update (__fs);
|
||||
return __fs->point_col >= 0 ? __fs->point_col : 0;
|
||||
}
|
||||
@@ -294,4 +294,4 @@ __argp_fmtstream_point (argp_fmtstream_t __fs)
|
||||
|
||||
#endif /* ARGP_FMTSTREAM_USE_LINEWRAP */
|
||||
|
||||
#endif /* __ARGP_FMTSTREAM_H__ */
|
||||
#endif /* argp-fmtstream.h */
|
||||
|
||||
+31
-24
@@ -458,6 +458,7 @@ hol_add_cluster (struct hol *hol, int group, const char *header, int index,
|
||||
cl->index = index;
|
||||
cl->parent = parent;
|
||||
cl->argp = argp;
|
||||
cl->depth = parent ? parent->depth + 1 : 0;
|
||||
|
||||
cl->next = hol->clusters;
|
||||
hol->clusters = cl;
|
||||
@@ -658,12 +659,12 @@ canon_doc_option (const char **name)
|
||||
{
|
||||
int non_opt;
|
||||
/* Skip initial whitespace. */
|
||||
while (isspace (*name))
|
||||
while (isspace (**name))
|
||||
(*name)++;
|
||||
/* Decide whether this looks like an option (leading `-') or not. */
|
||||
non_opt = (**name != '-');
|
||||
/* Skip until part of name used for sorting. */
|
||||
while (**name && !isalnum (*name))
|
||||
while (**name && !isalnum (**name))
|
||||
(*name)++;
|
||||
return non_opt;
|
||||
}
|
||||
@@ -921,7 +922,7 @@ filter_doc (const char *doc, int key, const struct argp *argp,
|
||||
}
|
||||
else
|
||||
/* No filter. */
|
||||
return (char *)doc;
|
||||
return doc;
|
||||
}
|
||||
|
||||
/* Prints STR as a header line, with the margin lines set appropiately, and
|
||||
@@ -973,8 +974,10 @@ comma (unsigned col, struct pentry_state *pest)
|
||||
if (pest->hhstate->sep_groups && pe && pest->entry->group != pe->group)
|
||||
__argp_fmtstream_putc (pest->stream, '\n');
|
||||
|
||||
if (pe && cl && pe->cluster != cl && cl->header && *cl->header
|
||||
&& !hol_cluster_is_child (pe->cluster, cl))
|
||||
if (cl && cl->header && *cl->header
|
||||
&& (!pe
|
||||
|| (pe->cluster != cl
|
||||
&& !hol_cluster_is_child (pe->cluster, cl))))
|
||||
/* If we're changing clusters, then this must be the start of the
|
||||
ENTRY's cluster unless that is an ancestor of the previous one
|
||||
(in which case we had just popped into a sub-cluster for a bit).
|
||||
@@ -1086,14 +1089,14 @@ hol_entry_help (struct hol_entry *entry, const struct argp_state *state,
|
||||
const char *fstr = filter_doc (tstr, real->key, entry->argp, state);
|
||||
if (fstr && *fstr)
|
||||
{
|
||||
unsigned col = __argp_fmtstream_point (stream);
|
||||
unsigned int col = __argp_fmtstream_point (stream);
|
||||
|
||||
__argp_fmtstream_set_lmargin (stream, uparams.opt_doc_col);
|
||||
__argp_fmtstream_set_wmargin (stream, uparams.opt_doc_col);
|
||||
|
||||
if (col > uparams.opt_doc_col + 3)
|
||||
if (col > (unsigned int) (uparams.opt_doc_col + 3))
|
||||
__argp_fmtstream_putc (stream, '\n');
|
||||
else if (col >= uparams.opt_doc_col)
|
||||
else if (col >= (unsigned int) uparams.opt_doc_col)
|
||||
__argp_fmtstream_puts (stream, " ");
|
||||
else
|
||||
indent_to (stream, uparams.opt_doc_col);
|
||||
@@ -1133,7 +1136,7 @@ hol_help (struct hol *hol, const struct argp_state *state,
|
||||
Mandatory or optional arguments to long options are also mandatory or \
|
||||
optional for any corresponding short options.");
|
||||
const char *fstr = filter_doc (tstr, ARGP_KEY_HELP_DUP_ARGS_NOTE,
|
||||
state ? state->argp : 0, state);
|
||||
state ? state->root_argp : 0, state);
|
||||
if (fstr && *fstr)
|
||||
{
|
||||
__argp_fmtstream_putc (stream, '\n');
|
||||
@@ -1305,17 +1308,19 @@ argp_args_levels (const struct argp *argp)
|
||||
updated by this routine for the next call if ADVANCE is true. True is
|
||||
returned as long as there are more patterns to output. */
|
||||
static int
|
||||
argp_args_usage (const struct argp *argp, char **levels, int advance,
|
||||
argp_fmtstream_t stream)
|
||||
argp_args_usage (const struct argp *argp, const struct argp_state *state,
|
||||
char **levels, int advance, argp_fmtstream_t stream)
|
||||
{
|
||||
char *our_level = *levels;
|
||||
int multiple = 0;
|
||||
const struct argp_child *child = argp->children;
|
||||
const char *doc = gettext (argp->args_doc), *nl = 0;
|
||||
const char *tdoc = gettext (argp->args_doc), *nl = 0;
|
||||
const char *fdoc = filter_doc (tdoc, ARGP_KEY_HELP_ARGS_DOC, argp, state);
|
||||
|
||||
if (doc)
|
||||
if (fdoc)
|
||||
{
|
||||
nl = strchr (doc, '\n');
|
||||
const char *cp = fdoc;
|
||||
nl = strchr (cp, '\n');
|
||||
if (nl)
|
||||
/* This is a `multi-level' args doc; advance to the correct position
|
||||
as determined by our state in LEVELS, and update LEVELS. */
|
||||
@@ -1323,22 +1328,24 @@ argp_args_usage (const struct argp *argp, char **levels, int advance,
|
||||
int i;
|
||||
multiple = 1;
|
||||
for (i = 0; i < *our_level; i++)
|
||||
doc = nl + 1, nl = strchr (doc, '\n');
|
||||
cp = nl + 1, nl = strchr (cp, '\n');
|
||||
(*levels)++;
|
||||
}
|
||||
if (! nl)
|
||||
nl = doc + strlen (doc);
|
||||
nl = cp + strlen (cp);
|
||||
|
||||
/* Manually do line wrapping so that it (probably) won't get wrapped at
|
||||
any embedded spaces. */
|
||||
space (stream, 1 + nl - doc);
|
||||
space (stream, 1 + nl - cp);
|
||||
|
||||
__argp_fmtstream_write (stream, doc, nl - doc);
|
||||
__argp_fmtstream_write (stream, cp, nl - cp);
|
||||
}
|
||||
if (fdoc && fdoc != tdoc)
|
||||
free ((char *)fdoc); /* Free user's modified doc string. */
|
||||
|
||||
if (child)
|
||||
while (child->argp)
|
||||
advance = !argp_args_usage ((child++)->argp, levels, advance, stream);
|
||||
advance = !argp_args_usage ((child++)->argp, state, levels, advance, stream);
|
||||
|
||||
if (advance && multiple)
|
||||
/* Need to increment our level. */
|
||||
@@ -1493,7 +1500,7 @@ _help (const struct argp *argp, const struct argp_state *state, FILE *stream,
|
||||
do
|
||||
{
|
||||
int old_lm;
|
||||
int old_wm = __argp_fmtstream_set_wmargin (fs, USAGE_INDENT);
|
||||
int old_wm = __argp_fmtstream_set_wmargin (fs, uparams.usage_indent);
|
||||
char *levels = pattern_levels;
|
||||
|
||||
__argp_fmtstream_printf (fs, "%s %s",
|
||||
@@ -1502,7 +1509,7 @@ _help (const struct argp *argp, const struct argp_state *state, FILE *stream,
|
||||
|
||||
/* We set the lmargin as well as the wmargin, because hol_usage
|
||||
manually wraps options with newline to avoid annoying breaks. */
|
||||
old_lm = __argp_fmtstream_set_lmargin (fs, USAGE_INDENT);
|
||||
old_lm = __argp_fmtstream_set_lmargin (fs, uparams.usage_indent);
|
||||
|
||||
if (flags & ARGP_HELP_SHORT_USAGE)
|
||||
/* Just show where the options go. */
|
||||
@@ -1517,7 +1524,7 @@ _help (const struct argp *argp, const struct argp_state *state, FILE *stream,
|
||||
flags |= ARGP_HELP_SHORT_USAGE; /* But only do so once. */
|
||||
}
|
||||
|
||||
more_patterns = argp_args_usage (argp, &levels, 1, fs);
|
||||
more_patterns = argp_args_usage (argp, state, &levels, 1, fs);
|
||||
|
||||
__argp_fmtstream_set_wmargin (fs, old_wm);
|
||||
__argp_fmtstream_set_lmargin (fs, old_lm);
|
||||
@@ -1594,7 +1601,7 @@ __argp_state_help (const struct argp_state *state, FILE *stream, unsigned flags)
|
||||
if (state && (state->flags & ARGP_LONG_ONLY))
|
||||
flags |= ARGP_HELP_LONG_ONLY;
|
||||
|
||||
_help (state ? state->argp : 0, state, stream, flags,
|
||||
_help (state ? state->root_argp : 0, state, stream, flags,
|
||||
state ? state->name : program_invocation_short_name);
|
||||
|
||||
if (!state || ! (state->flags & ARGP_NO_EXIT))
|
||||
@@ -1612,7 +1619,7 @@ weak_alias (__argp_state_help, argp_state_help)
|
||||
|
||||
/* If appropriate, print the printf string FMT and following args, preceded
|
||||
by the program name and `:', to stderr, and followed by a `Try ... --help'
|
||||
message, then exit (ARGP_ERR_EXIT_STATUS). */
|
||||
message, then exit (1). */
|
||||
void
|
||||
__argp_error (const struct argp_state *state, const char *fmt, ...)
|
||||
{
|
||||
|
||||
+100
-36
@@ -38,10 +38,11 @@
|
||||
# define _(msgid) (msgid)
|
||||
# define gettext(msgid) (msgid)
|
||||
#endif
|
||||
#define N_(msgid) (msgid)
|
||||
#endif
|
||||
|
||||
#if _LIBC - 0
|
||||
#include <libc-lock.h>
|
||||
#include <bits/libc-lock.h>
|
||||
#else
|
||||
#ifdef HAVE_CTHREADS_H
|
||||
#include <cthreads.h>
|
||||
@@ -84,11 +85,11 @@ volatile int _argp_hang = 0;
|
||||
|
||||
static const struct argp_option argp_default_options[] =
|
||||
{
|
||||
{"help", '?', 0, 0, "Give this help list", -1},
|
||||
{"usage", OPT_USAGE, 0, 0, "Give a short usage message"},
|
||||
{"program-name",OPT_PROGNAME,"NAME", OPTION_HIDDEN, "Set the program name"},
|
||||
{"help", '?', 0, 0, N_("Give this help list"), -1},
|
||||
{"usage", OPT_USAGE, 0, 0, N_("Give a short usage message")},
|
||||
{"program-name",OPT_PROGNAME,"NAME", OPTION_HIDDEN, N_("Set the program name")},
|
||||
{"HANG", OPT_HANG, "SECS", OPTION_ARG_OPTIONAL | OPTION_HIDDEN,
|
||||
"Hang for SECS seconds (default 3600)"},
|
||||
N_("Hang for SECS seconds (default 3600)")},
|
||||
{0, 0}
|
||||
};
|
||||
|
||||
@@ -145,7 +146,7 @@ static const struct argp argp_default_argp =
|
||||
|
||||
static const struct argp_option argp_version_options[] =
|
||||
{
|
||||
{"version", 'V', 0, 0, "Print program version", -1},
|
||||
{"version", 'V', 0, 0, N_("Print program version"), -1},
|
||||
{0, 0}
|
||||
};
|
||||
|
||||
@@ -160,7 +161,7 @@ argp_version_parser (int key, char *arg, struct argp_state *state)
|
||||
else if (argp_program_version)
|
||||
fprintf (state->out_stream, "%s\n", argp_program_version);
|
||||
else
|
||||
__argp_error (state, _("No version known!?"));
|
||||
__argp_error (state, _("(PROGRAM ERROR) No version known!?"));
|
||||
if (! (state->flags & ARGP_NO_EXIT))
|
||||
exit (0);
|
||||
break;
|
||||
@@ -526,7 +527,7 @@ parser_init (struct parser *parser, const struct argp *argp,
|
||||
parser_convert (parser, argp, flags);
|
||||
|
||||
memset (&parser->state, 0, sizeof (struct argp_state));
|
||||
parser->state.argp = parser->argp;
|
||||
parser->state.root_argp = parser->argp;
|
||||
parser->state.argc = argc;
|
||||
parser->state.argv = argv;
|
||||
parser->state.flags = flags;
|
||||
@@ -548,6 +549,14 @@ parser_init (struct parser *parser, const struct argp *argp,
|
||||
if (group->parent)
|
||||
/* If a child parser, get the initial input value from the parent. */
|
||||
group->input = group->parent->child_inputs[group->parent_index];
|
||||
|
||||
if (!group->parser
|
||||
&& group->argp->children && group->argp->children->argp)
|
||||
/* For the special case where no parsing function is supplied for an
|
||||
argp, propagate its input to its first child, if any (this just
|
||||
makes very simple wrapper argps more convenient). */
|
||||
group->child_inputs[0] = group->input;
|
||||
|
||||
err = group_parse (group, &parser->state, ARGP_KEY_INIT, 0);
|
||||
}
|
||||
if (err == EBADKEY)
|
||||
@@ -629,8 +638,8 @@ parser_finalize (struct parser *parser,
|
||||
err = EBADKEY;
|
||||
}
|
||||
|
||||
/* Okay, we're all done, with either an error or success. We only call the
|
||||
parsers once more, to indicate which one. */
|
||||
/* Okay, we're all done, with either an error or success; call the parsers
|
||||
to indicate which one. */
|
||||
|
||||
if (err)
|
||||
{
|
||||
@@ -646,7 +655,7 @@ parser_finalize (struct parser *parser,
|
||||
group_parse (group, &parser->state, ARGP_KEY_ERROR, 0);
|
||||
}
|
||||
else
|
||||
/* Do final cleanup, including propagating back values from parsers. */
|
||||
/* Notify parsers of success, and propagate back values from parsers. */
|
||||
{
|
||||
/* We pass over the groups in reverse order so that child groups are
|
||||
given a chance to do there processing before passing back a value to
|
||||
@@ -659,6 +668,10 @@ parser_finalize (struct parser *parser,
|
||||
err = 0; /* Some parser didn't understand. */
|
||||
}
|
||||
|
||||
/* Call parsers once more, to do any final cleanup. Errors are ignored. */
|
||||
for (group = parser->egroup - 1; group >= parser->groups; group--)
|
||||
group_parse (group, &parser->state, ARGP_KEY_FINI, 0);
|
||||
|
||||
if (err == EBADKEY)
|
||||
err = EINVAL;
|
||||
|
||||
@@ -668,28 +681,55 @@ parser_finalize (struct parser *parser,
|
||||
}
|
||||
|
||||
/* Call the user parsers to parse the non-option argument VAL, at the current
|
||||
position, returning any error. */
|
||||
position, returning any error. The state NEXT pointer is assumed to have
|
||||
been adjusted (by getopt) to point after this argument; this function will
|
||||
adjust it correctly to reflect however many args actually end up being
|
||||
consumed. */
|
||||
static error_t
|
||||
parser_parse_arg (struct parser *parser, char *val)
|
||||
{
|
||||
int index = parser->state.next;
|
||||
/* Save the starting value of NEXT, first adjusting it so that the arg
|
||||
we're parsing is again the front of the arg vector. */
|
||||
int index = --parser->state.next;
|
||||
error_t err = EBADKEY;
|
||||
struct group *group;
|
||||
int key = 0; /* Which of ARGP_KEY_ARG[S] we used. */
|
||||
|
||||
/* Try to parse the argument in each parser. */
|
||||
for (group = parser->groups
|
||||
; group < parser->egroup && err == EBADKEY
|
||||
; group++)
|
||||
err = group_parse (group, &parser->state, ARGP_KEY_ARG, val);
|
||||
{
|
||||
parser->state.next++; /* For ARGP_KEY_ARG, consume the arg. */
|
||||
key = ARGP_KEY_ARG;
|
||||
err = group_parse (group, &parser->state, key, val);
|
||||
|
||||
if (!err)
|
||||
if (parser->state.next >= index)
|
||||
/* Remember that we successfully processed a non-option
|
||||
argument -- but only if the user hasn't gotten tricky and set
|
||||
the clock back. */
|
||||
(--group)->args_processed++;
|
||||
else
|
||||
/* The user wants to reparse some args, give getopt another try. */
|
||||
parser->try_getopt = 1;
|
||||
if (err == EBADKEY)
|
||||
/* This parser doesn't like ARGP_KEY_ARG; try ARGP_KEY_ARGS instead. */
|
||||
{
|
||||
parser->state.next--; /* For ARGP_KEY_ARGS, put back the arg. */
|
||||
key = ARGP_KEY_ARGS;
|
||||
err = group_parse (group, &parser->state, key, 0);
|
||||
}
|
||||
}
|
||||
|
||||
if (! err)
|
||||
{
|
||||
if (key == ARGP_KEY_ARGS)
|
||||
/* The default for ARGP_KEY_ARGS is to assume that if NEXT isn't
|
||||
changed by the user, *all* arguments should be considered
|
||||
consumed. */
|
||||
parser->state.next = parser->state.argc;
|
||||
|
||||
if (parser->state.next > index)
|
||||
/* Remember that we successfully processed a non-option
|
||||
argument -- but only if the user hasn't gotten tricky and set
|
||||
the clock back. */
|
||||
(--group)->args_processed += (parser->state.next - index);
|
||||
else
|
||||
/* The user wants to reparse some args, give getopt another try. */
|
||||
parser->try_getopt = 1;
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
@@ -702,6 +742,7 @@ parser_parse_opt (struct parser *parser, int opt, char *val)
|
||||
/* The group key encoded in the high bits; 0 for short opts or
|
||||
group_number + 1 for long opts. */
|
||||
int group_key = opt >> USER_BITS;
|
||||
error_t err = EBADKEY;
|
||||
|
||||
if (group_key == 0)
|
||||
/* A short option. By comparing OPT's position in SHORT_OPTS to the
|
||||
@@ -714,16 +755,39 @@ parser_parse_opt (struct parser *parser, int opt, char *val)
|
||||
if (short_index)
|
||||
for (group = parser->groups; group < parser->egroup; group++)
|
||||
if (group->short_end > short_index)
|
||||
return group_parse (group, &parser->state, opt, optarg);
|
||||
|
||||
return EBADKEY; /* until otherwise asserted */
|
||||
{
|
||||
err = group_parse (group, &parser->state, opt, optarg);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
/* A long option. We use shifts instead of masking for extracting
|
||||
the user value in order to preserve the sign. */
|
||||
return
|
||||
err =
|
||||
group_parse (&parser->groups[group_key - 1], &parser->state,
|
||||
(opt << GROUP_BITS) >> GROUP_BITS, optarg);
|
||||
|
||||
if (err == EBADKEY)
|
||||
/* At least currently, an option not recognized is an error in the
|
||||
parser, because we pre-compute which parser is supposed to deal
|
||||
with each option. */
|
||||
{
|
||||
static const char bad_key_err[] =
|
||||
N_("(PROGRAM ERROR) Option should have been recognized!?");
|
||||
if (group_key == 0)
|
||||
__argp_error (&parser->state, "-%c: %s", opt, _(bad_key_err));
|
||||
else
|
||||
{
|
||||
struct option *long_opt = parser->long_opts;
|
||||
while (long_opt->val != opt && long_opt->name)
|
||||
long_opt++;
|
||||
__argp_error (&parser->state, "--%s: %s",
|
||||
long_opt->name ? long_opt->name : "???",
|
||||
_(bad_key_err));
|
||||
}
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
/* Parse the next argument in PARSER (as indicated by PARSER->state.next).
|
||||
@@ -792,20 +856,20 @@ parser_parse_next (struct parser *parser, int *arg_ebadkey)
|
||||
return EBADKEY;
|
||||
}
|
||||
else
|
||||
/* A non-option arg. */
|
||||
err =
|
||||
parser_parse_arg (parser, parser->state.argv[parser->state.next++]);
|
||||
else if (opt == KEY_ARG)
|
||||
/* A non-option arg; simulate what getopt might have done. */
|
||||
{
|
||||
opt = KEY_ARG;
|
||||
optarg = parser->state.argv[parser->state.next++];
|
||||
}
|
||||
|
||||
if (opt == KEY_ARG)
|
||||
/* A non-option argument; try each parser in turn. */
|
||||
err = parser_parse_arg (parser, optarg);
|
||||
else
|
||||
err = parser_parse_opt (parser, opt, optarg);
|
||||
|
||||
|
||||
if (err == EBADKEY)
|
||||
{
|
||||
*arg_ebadkey = (opt == KEY_END || opt == KEY_ARG);
|
||||
parser->state.next--; /* Put back the unused argument. */
|
||||
}
|
||||
*arg_ebadkey = (opt == KEY_END || opt == KEY_ARG);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
+18
-8
@@ -18,8 +18,8 @@
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifndef __ARGP_H__
|
||||
#define __ARGP_H__
|
||||
#ifndef _ARGP_H
|
||||
#define _ARGP_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
@@ -34,6 +34,7 @@
|
||||
|
||||
#ifndef __error_t_defined
|
||||
typedef int error_t;
|
||||
#define __error_t_defined
|
||||
#endif
|
||||
|
||||
#ifndef __P
|
||||
@@ -159,6 +160,12 @@ typedef error_t (*argp_parser_t)(int key, char *arg, struct argp_state *state);
|
||||
actually modify the argument (perhaps into an option), and have it
|
||||
processed again. */
|
||||
#define ARGP_KEY_ARG 0
|
||||
/* There are remaining arguments not parsed by any parser, which may be found
|
||||
starting at (STATE->argv + STATE->next). If success is returned, but
|
||||
STATE->next left untouched, it's assumed that all arguments were consume,
|
||||
otherwise, the parser should adjust STATE->next to reflect any arguments
|
||||
consumed. */
|
||||
#define ARGP_KEY_ARGS 0x1000006
|
||||
/* There are no more command line arguments at all. */
|
||||
#define ARGP_KEY_END 0x1000001
|
||||
/* Because it's common to want to do some special processing if there aren't
|
||||
@@ -171,11 +178,12 @@ typedef error_t (*argp_parser_t)(int key, char *arg, struct argp_state *state);
|
||||
element of the CHILD_INPUT field, if any, in the state structure is
|
||||
copied to each child's state to be the initial value of the INPUT field. */
|
||||
#define ARGP_KEY_INIT 0x1000003
|
||||
/* Use after all other keys, including SUCCESS & END. */
|
||||
#define ARGP_KEY_FINI 0x1000007
|
||||
/* Passed in when parsing has successfully been completed (even if there are
|
||||
still arguments remaining). */
|
||||
#define ARGP_KEY_SUCCESS 0x1000004
|
||||
/* Passed in if an error occurs (in which case a call with ARGP_KEY_SUCCESS is
|
||||
never made, so any cleanup must be done here). */
|
||||
/* Passed in if an error occurs. */
|
||||
#define ARGP_KEY_ERROR 0x1000005
|
||||
|
||||
/* An argp structure contains a set of options declarations, a function to
|
||||
@@ -241,6 +249,7 @@ struct argp
|
||||
/* Explanatory note emitted when duplicate option arguments have been
|
||||
suppressed. */
|
||||
#define ARGP_KEY_HELP_DUP_ARGS_NOTE 0x2000005
|
||||
#define ARGP_KEY_HELP_ARGS_DOC 0x2000006 /* Argument doc string. */
|
||||
|
||||
/* When an argp has a non-zero CHILDREN field, it should point to a vector of
|
||||
argp_child structures, each of which describes a subsidiary argp. */
|
||||
@@ -272,7 +281,7 @@ struct argp_child
|
||||
struct argp_state
|
||||
{
|
||||
/* The top level ARGP being parsed. */
|
||||
__const struct argp *argp;
|
||||
__const struct argp *root_argp;
|
||||
|
||||
/* The argument vector being parsed. May be modified. */
|
||||
int argc;
|
||||
@@ -394,10 +403,11 @@ extern void (*argp_program_version_hook) __P ((FILE *__stream,
|
||||
argp_help if the ARGP_HELP_BUG_ADDR flag is set (as it is by various
|
||||
standard help messages), embedded in a sentence that says something like
|
||||
`Report bugs to ADDR.'. */
|
||||
__const extern char *argp_program_bug_address;
|
||||
extern __const char *argp_program_bug_address;
|
||||
|
||||
/* The exit status that argp will use when exiting due to a parsing error.
|
||||
If not defined or set by the user program, this defaults to 1. */
|
||||
If not defined or set by the user program, this defaults to EX_USAGE from
|
||||
<sysexits.h>. */
|
||||
extern error_t argp_err_exit_status;
|
||||
|
||||
/* Flags for argp_help. */
|
||||
@@ -541,7 +551,7 @@ __option_is_end (__const struct argp_option *__opt)
|
||||
# undef __option_is_short
|
||||
# undef __option_is_end
|
||||
#endif
|
||||
|
||||
#endif /* argp.h */
|
||||
#endif /* __OPTIMIZE__ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -17,8 +17,12 @@
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifndef _IOCTL_TYPES_H
|
||||
#define _IOCTL_TYPES_H 1
|
||||
/*
|
||||
* Never include this file directly; use <sys/ioctl.h> instead.
|
||||
*/
|
||||
|
||||
#ifndef _BITS_IOCTL_TYPES_H
|
||||
#define _BITS_IOCTL_TYPES_H 1
|
||||
|
||||
|
||||
#if defined(TIOCGETC) || defined(TIOCSETC)
|
||||
@@ -114,4 +118,4 @@ struct ttysize
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* ioctl-types.h */
|
||||
#endif /* bits/ioctl-types.h */
|
||||
@@ -0,0 +1,40 @@
|
||||
/* Copyright (C) 1997 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. */
|
||||
|
||||
#ifndef _MATH_H
|
||||
# error "Never use <bits/mathdef.h> directly; include <math.h> instead"
|
||||
#endif
|
||||
|
||||
|
||||
/* Normally, there is no long double type and the `float' and `double'
|
||||
expressions are evaluated as `double'. */
|
||||
typedef double float_t; /* `float' expressions are evaluated as
|
||||
`double'. */
|
||||
typedef double double_t; /* `double' expressions are evaluated as
|
||||
`double'. */
|
||||
|
||||
/* Signal that both types are `double'. */
|
||||
#define FLT_EVAL_METHOD 1
|
||||
|
||||
/* Define `INFINITY' as value of type `float_t'. */
|
||||
#define INFINITY HUGE_VAL
|
||||
|
||||
|
||||
/* The values returned by `ilogb' for 0 and NaN respectively. */
|
||||
#define FP_ILOGB0 0x80000001
|
||||
#define FP_ILOGBNAN 0x7fffffff
|
||||
@@ -0,0 +1,35 @@
|
||||
/* Definitions of constants and data structure for POSIX 1003.1b-1993
|
||||
scheduling interface.
|
||||
Copyright (C) 1996 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. */
|
||||
|
||||
#ifndef _SCHED_H
|
||||
#error "Never use <bits/sched.h> directly; include <sched.h> instead."
|
||||
#endif
|
||||
|
||||
|
||||
/* Scheduling algorithms. */
|
||||
#define SCHED_OTHER 0
|
||||
#define SCHED_FIFO 1
|
||||
#define SCHED_RR 2
|
||||
|
||||
/* Data structure to describe a process' schedulability. */
|
||||
struct sched_param
|
||||
{
|
||||
int sched_priority;
|
||||
};
|
||||
@@ -16,8 +16,10 @@
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifndef _SELECTBITS_H
|
||||
#define _SELECTBITS_H 1
|
||||
#ifndef _SYS_SELECT_H
|
||||
#error "Never use <bits/select.h> directly; include <sys/select.h> instead."
|
||||
#endif
|
||||
|
||||
|
||||
/* This line MUST be split! Otherwise m4 will not change it. */
|
||||
#define __FD_ZERO(set) \
|
||||
@@ -25,5 +27,3 @@
|
||||
#define __FD_SET(d, set) ((set)->fds_bits[__FDELT(d)] |= __FDMASK(d))
|
||||
#define __FD_CLR(d, set) ((set)->fds_bits[__FDELT(d)] &= ~__FDMASK(d))
|
||||
#define __FD_ISSET(d, set) ((set)->fds_bits[__FDELT(d)] & __FDMASK(d))
|
||||
|
||||
#endif /* selectbits.h */
|
||||
@@ -51,9 +51,9 @@ typedef unsigned long int __sigset_t;
|
||||
#ifdef _GNU_SOURCE
|
||||
# define __sigisemptyset(set) (*(set) == (__sigset_t) 0)
|
||||
# define __sigandset(dest, left, right) \
|
||||
((*(set) = (*(left) & *(right))), 0)
|
||||
((*(dest) = (*(left) & *(right))), 0)
|
||||
# define __sigorset(dest, left, right) \
|
||||
((*(set) = (*(left) | *(right))), 0)
|
||||
((*(dest) = (*(left) | *(right))), 0)
|
||||
#endif
|
||||
|
||||
/* These functions needn't check for a bogus signal number -- error
|
||||
@@ -17,8 +17,12 @@
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifndef _SOCKADDRCOM_H
|
||||
#define _SOCKADDRCOM_H 1
|
||||
/*
|
||||
* Never include this file directly; use <sys/socket.h> instead.
|
||||
*/
|
||||
|
||||
#ifndef _BITS_SOCKADDR_H
|
||||
#define _BITS_SOCKADDR_H 1
|
||||
|
||||
|
||||
/* POSIX.1g specifies this type name for the `sa_family' member. */
|
||||
@@ -34,4 +38,4 @@ typedef unsigned short int sa_family_t;
|
||||
#define __SOCKADDR_COMMON_SIZE (sizeof (unsigned short int))
|
||||
|
||||
|
||||
#endif /* sockaddrcom.h */
|
||||
#endif /* bits/sockaddr.h */
|
||||
@@ -17,9 +17,11 @@
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifndef _SOCKETBITS_H
|
||||
#ifndef _SYS_SOCKET_H
|
||||
#error "Never include <bits/socket.h> directly; use <sys/socket.h> instead."
|
||||
#endif
|
||||
|
||||
|
||||
#define _SOCKETBITS_H 1
|
||||
#include <features.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
@@ -114,7 +116,7 @@ enum __socket_type
|
||||
|
||||
|
||||
/* Get the definition of the macro to define the common sockaddr members. */
|
||||
#include <sockaddrcom.h>
|
||||
#include <bits/sockaddr.h>
|
||||
|
||||
/* Structure describing a generic socket address. */
|
||||
struct sockaddr
|
||||
@@ -196,5 +198,3 @@ struct linger
|
||||
};
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* socketbits.h */
|
||||
@@ -0,0 +1,52 @@
|
||||
/* Definition of `struct statfs', information about a filesystem.
|
||||
Copyright (C) 1996, 1997 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. */
|
||||
|
||||
/*
|
||||
* Never include this file directly; use <sys/statfs.h> instead.
|
||||
*/
|
||||
|
||||
#ifndef _BITS_STATFS_H
|
||||
#define _BITS_STATFS_H 1
|
||||
|
||||
#include <bits/types.h>
|
||||
|
||||
/* GNU Hurd NOTE: The size of this structure (16 ints) is known in
|
||||
<hurd/hurd_types.defs>, since it is used in the `file_statfs' RPC. MiG
|
||||
does not cope at all well with the passed C structure not being of the
|
||||
expected size. There are some filler words at the end to allow for
|
||||
future expansion. To increase the size of the structure used in the RPC
|
||||
and retain binary compatibility, we would need to assign a new message
|
||||
number. */
|
||||
|
||||
struct statfs
|
||||
{
|
||||
unsigned int f_type;
|
||||
unsigned int f_bsize;
|
||||
unsigned int f_blocks;
|
||||
unsigned int f_bfree;
|
||||
unsigned int f_bavail;
|
||||
unsigned int f_files;
|
||||
unsigned int f_ffree;
|
||||
__fsid_t f_fsid;
|
||||
unsigned int f_namelen;
|
||||
unsigned int f_spare[6];
|
||||
};
|
||||
|
||||
|
||||
#endif /* bits/statfs.h */
|
||||
@@ -17,8 +17,9 @@
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* These macros are also defined in some ioctls.h files (with numerically
|
||||
identical values), but this serves to shut up cpp's complaining. */
|
||||
/* These macros are also defined in some <bits/ioctls.h> files (with
|
||||
numerically identical values), but this serves to shut up cpp's
|
||||
complaining. */
|
||||
#ifdef __USE_BSD
|
||||
|
||||
#ifdef MDMBUF
|
||||
@@ -16,9 +16,12 @@
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifndef _GNU_TYPES_H
|
||||
/*
|
||||
* Never include this file directly; use <sys/types.h> instead.
|
||||
*/
|
||||
|
||||
#define _GNU_TYPES_H 1
|
||||
#ifndef _BITS_TYPES_H
|
||||
#define _BITS_TYPES_H 1
|
||||
|
||||
|
||||
/* Convenience types. */
|
||||
@@ -39,6 +42,16 @@ typedef struct
|
||||
__u_long __val[2];
|
||||
} __u_quad_t;
|
||||
#endif
|
||||
typedef signed char __int8_t;
|
||||
typedef unsigned char __uint8_t;
|
||||
typedef signed short int __int16_t;
|
||||
typedef unsigned short int __uint16_t;
|
||||
typedef signed int __int32_t;
|
||||
typedef unsigned int __uint32_t;
|
||||
#ifdef __GNUC__
|
||||
typedef signed long long int __int64_t;
|
||||
typedef unsigned long long int __uint64_t;
|
||||
#endif
|
||||
typedef __quad_t *__qaddr_t;
|
||||
typedef int __dev_t; /* Type of device numbers. */
|
||||
typedef unsigned int __uid_t; /* Type of user identifications. */
|
||||
@@ -78,4 +91,4 @@ typedef struct
|
||||
|
||||
typedef unsigned long int __fd_mask;
|
||||
|
||||
#endif /* gnu/types.h */
|
||||
#endif /* bits/types.h */
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
/* Copyright (C) 1996, 1997 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. */
|
||||
|
||||
#ifndef _SYS_UIO_H
|
||||
#error "Never use <bits/uio.h> directly; include <sys/uio.h> instead."
|
||||
#endif
|
||||
|
||||
|
||||
/* `struct iovec' -- Structure describing a section of memory. */
|
||||
|
||||
struct iovec
|
||||
{
|
||||
/* Starting address. */
|
||||
__ptr_t iov_base;
|
||||
/* Length in bytes. */
|
||||
size_t iov_len;
|
||||
};
|
||||
@@ -1,5 +1,5 @@
|
||||
/* The `struct utmp' type, describing entries in the utmp file. Generic/BSDish
|
||||
Copyright (C) 1993, 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1993, 1996, 1997 Free Software Foundation, Inc.
|
||||
|
||||
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
|
||||
@@ -16,9 +16,11 @@
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifndef _UTMPBITS_H
|
||||
#ifndef _UTMP_H
|
||||
#error "Never use <bits/utmp.h> directly; include <utmp.h> instead."
|
||||
#endif
|
||||
|
||||
|
||||
#define _UTMPBITS_H 1
|
||||
#include <features.h>
|
||||
|
||||
#include <paths.h>
|
||||
@@ -49,5 +51,3 @@ struct utmp {
|
||||
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* utmpbits.h */
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Definitions of status bits for `wait' et al.
|
||||
Copyright (C) 1992, 1994, 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1992, 1994, 1996, 1997 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
|
||||
@@ -17,10 +17,13 @@
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifndef _SYS_WAIT_H
|
||||
#error "Never use <bits/waitstatus.h> directly; include <sys/wait.h> instead."
|
||||
#endif
|
||||
|
||||
|
||||
/* Everything extant so far uses these same bits. */
|
||||
|
||||
#ifndef _WAITSTATUS_H
|
||||
#define _WAITSTATUS_H
|
||||
|
||||
/* If WIFEXITED(STATUS), the low-order 8 bits of the status. */
|
||||
#define __WEXITSTATUS(status) (((status) & 0xff00) >> 8)
|
||||
@@ -99,6 +102,3 @@ union wait
|
||||
#define w_stopval __wait_stopped.__w_stopval
|
||||
|
||||
#endif /* Use BSD. */
|
||||
|
||||
|
||||
#endif /* waitstatus.h */
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
#ifndef _NL_TYPES_H
|
||||
#define _NL_TYPES_H 1
|
||||
|
||||
#include <features.h>
|
||||
|
||||
/* The default message set used by the gencat program. */
|
||||
|
||||
Vendored
+81
-33
@@ -68,8 +68,26 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
echo m68k-cbm-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
amiga:OpenBSD:*:*)
|
||||
echo m68k-cbm-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
arc64:OpenBSD:*:*)
|
||||
echo mips64el-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
arc:OpenBSD:*:*)
|
||||
echo mipsel-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
hkmips:OpenBSD:*:*)
|
||||
echo mips-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
pmax:OpenBSD:*:*)
|
||||
echo mipsel-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
sgi:OpenBSD:*:*)
|
||||
echo mips-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
wgrisc:OpenBSD:*:*)
|
||||
echo mipsel-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
|
||||
echo arm-acorn-riscix${UNAME_RELEASE}
|
||||
exit 0;;
|
||||
@@ -118,19 +136,25 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
echo m68k-atari-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
atari*:OpenBSD:*:*)
|
||||
echo m68k-atari-openbsd${UNAME_RELEASE}
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
sun3*:NetBSD:*:*)
|
||||
echo m68k-sun-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
sun3*:OpenBSD:*:*)
|
||||
echo m68k-sun-openbsd${UNAME_RELEASE}
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mac68k:NetBSD:*:*)
|
||||
echo m68k-apple-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mac68k:OpenBSD:*:*)
|
||||
echo m68k-apple-openbsd${UNAME_RELEASE}
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mvme68k:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mvme88k:OpenBSD:*:*)
|
||||
echo m88k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
powerpc:machten:*:*)
|
||||
echo powerpc-apple-machten${UNAME_RELEASE}
|
||||
@@ -144,6 +168,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
VAX*:ULTRIX*:*:*)
|
||||
echo vax-dec-ultrix${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
2020:CLIX:*:*)
|
||||
echo clipper-intergraph-clix${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mips:*:*:UMIPS | mips:*:*:RISCos)
|
||||
sed 's/^ //' << EOF >dummy.c
|
||||
int main (argc, argv) int argc; char **argv; {
|
||||
@@ -378,8 +405,8 @@ EOF
|
||||
hp3[0-9][05]:NetBSD:*:*)
|
||||
echo m68k-hp-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
hp3[0-9][05]:OpenBSD:*:*)
|
||||
echo m68k-hp-openbsd${UNAME_RELEASE}
|
||||
hp300:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
i?86:BSD/386:*:* | *:BSD/OS:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
|
||||
@@ -403,33 +430,33 @@ EOF
|
||||
echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
||||
exit 0 ;;
|
||||
*:GNU:*:*)
|
||||
echo `echo ${UNAME_MACHINE}|sed -e 's,-.*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
|
||||
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
|
||||
exit 0 ;;
|
||||
*:Linux:*:*)
|
||||
# The BFD linker knows what the default object file format is, so
|
||||
# first see if it will tell us.
|
||||
ld_help_string=`ld --help 2>&1`
|
||||
if echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: elf_i.86"; then
|
||||
echo "${UNAME_MACHINE}-pc-linux-gnu" ; exit 0
|
||||
elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: i.86linux"; then
|
||||
echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0
|
||||
elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: i.86coff"; then
|
||||
echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0
|
||||
elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: m68kelf"; then
|
||||
echo "${UNAME_MACHINE}-unknown-linux-gnu" ; exit 0
|
||||
elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: m68klinux"; then
|
||||
echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0
|
||||
elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: elf32ppc"; then
|
||||
echo "powerpc-unknown-linux-gnu" ; exit 0
|
||||
elif test "${UNAME_MACHINE}" = "alpha" ; then
|
||||
ld_supported_emulations=`echo $ld_help_string \
|
||||
| sed -ne '/supported emulations:/!d
|
||||
s/[ ][ ]*/ /g
|
||||
s/.*supported emulations: *//
|
||||
s/ .*//
|
||||
p'`
|
||||
case "$ld_supported_emulations" in
|
||||
i?86linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 ;;
|
||||
i?86coff) echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 ;;
|
||||
sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
|
||||
m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
|
||||
elf32ppc) echo "powerpc-unknown-linux-gnu" ; exit 0 ;;
|
||||
esac
|
||||
|
||||
if test "${UNAME_MACHINE}" = "alpha" ; then
|
||||
echo alpha-unknown-linux-gnu ; exit 0
|
||||
elif test "${UNAME_MACHINE}" = "sparc" ; then
|
||||
echo sparc-unknown-linux-gnu ; exit 0
|
||||
elif test "${UNAME_MACHINE}" = "mips" ; then
|
||||
cat >dummy.c <<EOF
|
||||
main(argc, argv)
|
||||
int argc;
|
||||
char *argv[];
|
||||
int argc;
|
||||
char *argv[];
|
||||
{
|
||||
#ifdef __MIPSEB__
|
||||
printf ("%s-unknown-linux-gnu\n", argv[1]);
|
||||
@@ -443,20 +470,41 @@ EOF
|
||||
${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
|
||||
rm -f dummy.c dummy
|
||||
else
|
||||
# Either a pre-BFD a.out linker (linux-gnuoldld) or one that does not give us
|
||||
# useful --help. Gcc wants to distinguish between linux-gnuoldld and linux-gnuaout.
|
||||
test ! -d /usr/lib/ldscripts/. \
|
||||
&& echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
|
||||
# Either a pre-BFD a.out linker (linux-gnuoldld)
|
||||
# or one that does not give us useful --help.
|
||||
# GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
|
||||
# If ld does not provide *any* "supported emulations:"
|
||||
# that means it is gnuoldld.
|
||||
echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:"
|
||||
test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
|
||||
|
||||
case "${UNAME_MACHINE}" in
|
||||
i?86)
|
||||
VENDOR=pc;
|
||||
;;
|
||||
*)
|
||||
VENDOR=unknown;
|
||||
;;
|
||||
esac
|
||||
# Determine whether the default compiler is a.out or elf
|
||||
cat >dummy.c <<EOF
|
||||
#include <features.h>
|
||||
main(argc, argv)
|
||||
int argc;
|
||||
char *argv[];
|
||||
int argc;
|
||||
char *argv[];
|
||||
{
|
||||
#ifdef __ELF__
|
||||
printf ("%s-pc-linux-gnu\n", argv[1]);
|
||||
# ifdef __GLIBC__
|
||||
# if __GLIBC__ >= 2
|
||||
printf ("%s-${VENDOR}-linux-gnu\n", argv[1]);
|
||||
# else
|
||||
printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
|
||||
# endif
|
||||
# else
|
||||
printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
|
||||
# endif
|
||||
#else
|
||||
printf ("%s-pc-linux-gnuaout\n", argv[1]);
|
||||
printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -46,6 +46,9 @@
|
||||
/* Define if versioning of the library is wanted. */
|
||||
#undef DO_VERSIONING
|
||||
|
||||
/* Define if static NSS modules are wanted. */
|
||||
#undef DO_STATIC_NSS
|
||||
|
||||
/*
|
||||
*/
|
||||
|
||||
|
||||
@@ -40,8 +40,10 @@ build-shared = @shared@
|
||||
build-profile = @profile@
|
||||
build-omitfp = @omitfp@
|
||||
build-bounded = @bounded@
|
||||
build-static-nss = @static_nss@
|
||||
stdio = @stdio@
|
||||
add-ons = @subdirs@
|
||||
cross-compiling = @cross_compiling@
|
||||
|
||||
# Build tools.
|
||||
CC = @CC@
|
||||
|
||||
Vendored
+4
-4
@@ -391,11 +391,11 @@ case $basic_machine in
|
||||
;;
|
||||
mipsel*-linux*)
|
||||
basic_machine=mipsel-unknown
|
||||
os=-linux
|
||||
os=-linux-gnu
|
||||
;;
|
||||
mips*-linux*)
|
||||
basic_machine=mips-unknown
|
||||
os=-linux
|
||||
os=-linux-gnu
|
||||
;;
|
||||
mips3*-*)
|
||||
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
|
||||
@@ -585,7 +585,7 @@ case $basic_machine in
|
||||
basic_machine=vax-dec
|
||||
os=-vms
|
||||
;;
|
||||
vpp*|vx|vx-*)
|
||||
vpp*|vx|vx-*)
|
||||
basic_machine=f301-fujitsu
|
||||
;;
|
||||
vxworks960)
|
||||
@@ -615,7 +615,7 @@ case $basic_machine in
|
||||
# Here we handle the default manufacturer of certain CPU types. It is in
|
||||
# some cases the only manufacturer, in others, it is the most popular.
|
||||
mips)
|
||||
if [ x$os = x-linux ]; then
|
||||
if [ x$os = x-linux-gnu ]; then
|
||||
basic_machine=mips-unknown
|
||||
else
|
||||
basic_machine=mips-mips
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#! /bin/sh
|
||||
|
||||
# From configure.in CVSid
|
||||
|
||||
|
||||
|
||||
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated automatically using autoconf version 2.12
|
||||
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
|
||||
@@ -41,6 +45,8 @@ ac_help="$ac_help
|
||||
--enable-bounded build with runtime bounds checking [default=no]"
|
||||
ac_help="$ac_help
|
||||
--enable-add-ons=DIR... configure and build named extra directories"
|
||||
ac_help="$ac_help
|
||||
--enable-static-nss build static NSS modules [default=no]"
|
||||
|
||||
# Initialize some variables set by options.
|
||||
# The variables have the same names as the options, with
|
||||
@@ -480,7 +486,7 @@ echo > confdefs.h
|
||||
|
||||
# A filename unique to this package, relative to the directory that
|
||||
# configure is in, which we can look for to find out if srcdir is correct.
|
||||
ac_unique_file=features.h
|
||||
ac_unique_file=include/features.h
|
||||
|
||||
# Find the source files, if location was not specified.
|
||||
if test -z "$srcdir"; then
|
||||
@@ -723,6 +729,21 @@ if test x"$add_ons" != x; then
|
||||
done
|
||||
fi
|
||||
|
||||
# Check whether --enable-static-nss or --disable-static-nss was given.
|
||||
if test "${enable_static_nss+set}" = set; then
|
||||
enableval="$enable_static_nss"
|
||||
static_nss=$enableval
|
||||
else
|
||||
static_nss=no
|
||||
fi
|
||||
|
||||
if test x"$static_nss" = xyes; then
|
||||
cat >> confdefs.h <<\EOF
|
||||
#define DO_STATIC_NSS 1
|
||||
EOF
|
||||
|
||||
fi
|
||||
|
||||
|
||||
# Make sure we can run config.sub.
|
||||
if $ac_config_sub sun4 >/dev/null 2>&1; then :
|
||||
@@ -730,7 +751,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
|
||||
fi
|
||||
|
||||
echo $ac_n "checking host system type""... $ac_c" 1>&6
|
||||
echo "configure:734: checking host system type" >&5
|
||||
echo "configure:755: checking host system type" >&5
|
||||
|
||||
host_alias=$host
|
||||
case "$host_alias" in
|
||||
@@ -776,7 +797,8 @@ gnu* | linux* | bsd4.4* | netbsd* | freebsd*)
|
||||
gnu_ld=yes gnu_as=yes ;;
|
||||
esac
|
||||
case "$host_os" in
|
||||
linux*ecoff*)
|
||||
# i586-linuxaout is mangled into i586-pc-linux-gnuaout
|
||||
linux*ecoff* | linux*aout* | gnu*aout* | gnu*ecoff*)
|
||||
;;
|
||||
gnu* | linux* | sysv4* | solaris2*)
|
||||
# These systems (almost) always use the ELF format.
|
||||
@@ -793,6 +815,7 @@ os=$config_os
|
||||
case "$machine" in
|
||||
a29k | am29000) base_machine=a29k machine=a29k ;;
|
||||
alpha*) base_machine=alpha machine=alpha/$machine ;;
|
||||
arm*) base_machine=arm machine=arm/$machine ;;
|
||||
hppa*) base_machine=hppa machine=hppa/$machine ;;
|
||||
i[3456]86) base_machine=i386 machine=i386/$machine ;;
|
||||
m680?0) base_machine=m68k machine=m68k/$machine ;;
|
||||
@@ -810,7 +833,7 @@ esac
|
||||
# This can take a while to compute.
|
||||
sysdep_dir=$srcdir/sysdeps
|
||||
echo $ac_n "checking sysdep dirs""... $ac_c" 1>&6
|
||||
echo "configure:814: checking sysdep dirs" >&5
|
||||
echo "configure:837: checking sysdep dirs" >&5
|
||||
# Make sco3.2v4 become sco3.2.4 and sunos4.1.1_U1 become sunos4.1.1.U1.
|
||||
os="`echo $os | sed 's/\([0-9A-Z]\)[v_]\([0-9A-Z]\)/\1.\2/g'`"
|
||||
|
||||
@@ -992,10 +1015,10 @@ while test $# -gt 0; do
|
||||
done
|
||||
|
||||
# Add the default directories.
|
||||
sysnames="$names sysdeps/generic sysdeps/stub"
|
||||
sysnames="$names sysdeps/generic sysdeps/stub include"
|
||||
|
||||
# The other names were emitted during the scan.
|
||||
echo "$ac_t""sysdeps/generic sysdeps/stub" 1>&6
|
||||
echo "$ac_t""sysdeps/generic sysdeps/stub include" 1>&6
|
||||
|
||||
|
||||
### Locate tools.
|
||||
@@ -1011,7 +1034,7 @@ echo "$ac_t""sysdeps/generic sysdeps/stub" 1>&6
|
||||
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
|
||||
# ./install, which can be erroneously created by make from ./install.sh.
|
||||
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
|
||||
echo "configure:1015: checking for a BSD compatible install" >&5
|
||||
echo "configure:1038: checking for a BSD compatible install" >&5
|
||||
if test -z "$INSTALL"; then
|
||||
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
@@ -1065,7 +1088,7 @@ if test "$INSTALL" = "${srcdir}/install-sh -c"; then
|
||||
INSTALL='$(..)./install-sh -c'
|
||||
fi
|
||||
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
|
||||
echo "configure:1069: checking whether ln -s works" >&5
|
||||
echo "configure:1092: checking whether ln -s works" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@@ -1090,7 +1113,7 @@ do
|
||||
# Extract the first word of "$ac_prog", so it can be a program name with args.
|
||||
set dummy $ac_prog; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:1094: checking for $ac_word" >&5
|
||||
echo "configure:1117: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_MSGFMT'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@@ -1123,7 +1146,7 @@ test -n "$MSGFMT" || MSGFMT=":"
|
||||
# Extract the first word of "gcc", so it can be a program name with args.
|
||||
set dummy gcc; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:1127: checking for $ac_word" >&5
|
||||
echo "configure:1150: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@@ -1152,7 +1175,7 @@ if test -z "$CC"; then
|
||||
# Extract the first word of "cc", so it can be a program name with args.
|
||||
set dummy cc; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:1156: checking for $ac_word" >&5
|
||||
echo "configure:1179: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@@ -1200,7 +1223,7 @@ fi
|
||||
fi
|
||||
|
||||
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
|
||||
echo "configure:1204: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
|
||||
echo "configure:1227: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
|
||||
|
||||
ac_ext=c
|
||||
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
|
||||
@@ -1210,11 +1233,11 @@ ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS
|
||||
cross_compiling=$ac_cv_prog_cc_cross
|
||||
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1214 "configure"
|
||||
#line 1237 "configure"
|
||||
#include "confdefs.h"
|
||||
main(){return(0);}
|
||||
EOF
|
||||
if { (eval echo configure:1218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
if { (eval echo configure:1241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
ac_cv_prog_cc_works=yes
|
||||
# If we can't run a trivial program, we are probably using a cross compiler.
|
||||
if (./conftest; exit) 2>/dev/null; then
|
||||
@@ -1231,15 +1254,19 @@ rm -fr conftest*
|
||||
|
||||
echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
|
||||
if test $ac_cv_prog_cc_works = no; then
|
||||
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
|
||||
cross_linkable=no
|
||||
ac_cv_prog_cc_cross=yes
|
||||
else
|
||||
cross_linkable=yes
|
||||
fi
|
||||
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
|
||||
echo "configure:1238: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
|
||||
echo "configure:1264: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
|
||||
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
|
||||
|
||||
cross_compiling=$ac_cv_prog_cc_cross
|
||||
|
||||
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
|
||||
echo "configure:1243: checking whether we are using GNU C" >&5
|
||||
echo "configure:1270: checking whether we are using GNU C" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@@ -1248,7 +1275,7 @@ else
|
||||
yes;
|
||||
#endif
|
||||
EOF
|
||||
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1252: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
|
||||
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1279: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
|
||||
ac_cv_prog_gcc=yes
|
||||
else
|
||||
ac_cv_prog_gcc=no
|
||||
@@ -1259,39 +1286,25 @@ echo "$ac_t""$ac_cv_prog_gcc" 1>&6
|
||||
|
||||
if test $ac_cv_prog_gcc = yes; then
|
||||
GCC=yes
|
||||
ac_test_CFLAGS="${CFLAGS+set}"
|
||||
ac_save_CFLAGS="$CFLAGS"
|
||||
CFLAGS=
|
||||
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
|
||||
echo "configure:1267: checking whether ${CC-cc} accepts -g" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
echo 'void f(){}' > conftest.c
|
||||
if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
|
||||
ac_cv_prog_cc_g=yes
|
||||
else
|
||||
ac_cv_prog_cc_g=no
|
||||
fi
|
||||
rm -f conftest*
|
||||
|
||||
fi
|
||||
|
||||
echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
|
||||
if test "$ac_test_CFLAGS" = set; then
|
||||
CFLAGS="$ac_save_CFLAGS"
|
||||
elif test $ac_cv_prog_cc_g = yes; then
|
||||
CFLAGS="-g -O2"
|
||||
cat > conftest.c <<EOF
|
||||
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
|
||||
yes;
|
||||
#endif
|
||||
EOF
|
||||
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1296: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
|
||||
if test -z "$CFLAGS"; then
|
||||
CFLAGS="-g -O2"
|
||||
fi
|
||||
else
|
||||
CFLAGS="-O2"
|
||||
{ echo "configure: error: We require GNU CC version 2.7 or newer" 1>&2; exit 1; }
|
||||
fi
|
||||
else
|
||||
GCC=
|
||||
test "${CFLAGS+set}" = set || CFLAGS="-g"
|
||||
{ echo "configure: error: GNU libc must be compiled using GNU CC" 1>&2; exit 1; }
|
||||
fi
|
||||
|
||||
echo $ac_n "checking build system type""... $ac_c" 1>&6
|
||||
echo "configure:1295: checking build system type" >&5
|
||||
echo "configure:1308: checking build system type" >&5
|
||||
|
||||
build_alias=$build
|
||||
case "$build_alias" in
|
||||
@@ -1314,7 +1327,7 @@ do
|
||||
# Extract the first word of "$ac_prog", so it can be a program name with args.
|
||||
set dummy $ac_prog; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:1318: checking for $ac_word" >&5
|
||||
echo "configure:1331: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_BUILD_CC'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@@ -1343,8 +1356,9 @@ test -n "$BUILD_CC" && break
|
||||
done
|
||||
|
||||
fi
|
||||
|
||||
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
|
||||
echo "configure:1348: checking how to run the C preprocessor" >&5
|
||||
echo "configure:1362: checking how to run the C preprocessor" >&5
|
||||
# On Suns, sometimes $CPP names a directory.
|
||||
if test -n "$CPP" && test -d "$CPP"; then
|
||||
CPP=
|
||||
@@ -1359,13 +1373,13 @@ else
|
||||
# On the NeXT, cc -E runs the code through the compiler's parser,
|
||||
# not just through cpp.
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1363 "configure"
|
||||
#line 1377 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <assert.h>
|
||||
Syntax Error
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:1369: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:1383: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
:
|
||||
@@ -1376,13 +1390,13 @@ else
|
||||
rm -rf conftest*
|
||||
CPP="${CC-cc} -E -traditional-cpp"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1380 "configure"
|
||||
#line 1394 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <assert.h>
|
||||
Syntax Error
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:1386: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:1400: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
:
|
||||
@@ -1413,7 +1427,7 @@ fi
|
||||
# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
|
||||
set dummy ${ac_tool_prefix}ar; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:1417: checking for $ac_word" >&5
|
||||
echo "configure:1431: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@@ -1444,7 +1458,7 @@ fi
|
||||
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
|
||||
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:1448: checking for $ac_word" >&5
|
||||
echo "configure:1462: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@@ -1475,7 +1489,7 @@ if test -n "$ac_tool_prefix"; then
|
||||
# Extract the first word of "ranlib", so it can be a program name with args.
|
||||
set dummy ranlib; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:1479: checking for $ac_word" >&5
|
||||
echo "configure:1493: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@@ -1510,7 +1524,7 @@ fi
|
||||
# Extract the first word of "bash", so it can be a program name with args.
|
||||
set dummy bash; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:1514: checking for $ac_word" >&5
|
||||
echo "configure:1528: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_path_BASH'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@@ -1551,7 +1565,7 @@ if test "$BASH" = no; then
|
||||
# Extract the first word of "ksh", so it can be a program name with args.
|
||||
set dummy ksh; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:1555: checking for $ac_word" >&5
|
||||
echo "configure:1569: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_path_KSH'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@@ -1593,7 +1607,7 @@ fi
|
||||
|
||||
|
||||
echo $ac_n "checking for signed size_t type""... $ac_c" 1>&6
|
||||
echo "configure:1597: checking for signed size_t type" >&5
|
||||
echo "configure:1611: checking for signed size_t type" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_signed_size_t'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@@ -1617,12 +1631,12 @@ EOF
|
||||
fi
|
||||
|
||||
echo $ac_n "checking for libc-friendly stddef.h""... $ac_c" 1>&6
|
||||
echo "configure:1621: checking for libc-friendly stddef.h" >&5
|
||||
echo "configure:1635: checking for libc-friendly stddef.h" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_friendly_stddef'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1626 "configure"
|
||||
#line 1640 "configure"
|
||||
#include "confdefs.h"
|
||||
#define __need_size_t
|
||||
#define __need_wchar_t
|
||||
@@ -1637,7 +1651,7 @@ size_t size; wchar_t wchar;
|
||||
if (&size == NULL || &wchar == NULL) abort ();
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1641: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:1655: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
libc_cv_friendly_stddef=yes
|
||||
else
|
||||
@@ -1656,7 +1670,7 @@ override stddef.h = # The installed <stddef.h> seems to be libc-friendly."
|
||||
fi
|
||||
|
||||
echo $ac_n "checking whether we need to use -P to assemble .S files""... $ac_c" 1>&6
|
||||
echo "configure:1660: checking whether we need to use -P to assemble .S files" >&5
|
||||
echo "configure:1674: checking whether we need to use -P to assemble .S files" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_need_minus_P'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@@ -1679,7 +1693,7 @@ asm-CPPFLAGS = -P # The assembler can't grok cpp's # line directives."
|
||||
fi
|
||||
|
||||
echo $ac_n "checking for assembler global-symbol directive""... $ac_c" 1>&6
|
||||
echo "configure:1683: checking for assembler global-symbol directive" >&5
|
||||
echo "configure:1697: checking for assembler global-symbol directive" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_asm_global_directive'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@@ -1709,7 +1723,7 @@ EOF
|
||||
fi
|
||||
|
||||
echo $ac_n "checking for .set assembler directive""... $ac_c" 1>&6
|
||||
echo "configure:1713: checking for .set assembler directive" >&5
|
||||
echo "configure:1727: checking for .set assembler directive" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_asm_set_directive'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@@ -1743,7 +1757,7 @@ EOF
|
||||
fi
|
||||
|
||||
echo $ac_n "checking for .symver assembler directive""... $ac_c" 1>&6
|
||||
echo "configure:1747: checking for .symver assembler directive" >&5
|
||||
echo "configure:1761: checking for .symver assembler directive" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_asm_symver_directive'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@@ -1762,7 +1776,7 @@ fi
|
||||
|
||||
echo "$ac_t""$libc_cv_asm_symver_directive" 1>&6
|
||||
echo $ac_n "checking for ld --version-script""... $ac_c" 1>&6
|
||||
echo "configure:1766: checking for ld --version-script" >&5
|
||||
echo "configure:1780: checking for ld --version-script" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_ld_version_script_option'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@@ -1779,7 +1793,7 @@ VERS {
|
||||
EOF
|
||||
if ${CC-cc} -c $CFLAGS $CPPFLAGS conftest.s 1>&5 2>&5; then
|
||||
if { ac_try='${CC-cc} $CFLAGS --shared -o conftest.so conftest.o
|
||||
-Wl,--version-script,conftest.map'; { (eval echo configure:1783: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; };
|
||||
-Wl,--version-script,conftest.map'; { (eval echo configure:1797: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; };
|
||||
then
|
||||
libc_cv_ld_version_script_option=yes
|
||||
else
|
||||
@@ -1809,7 +1823,7 @@ fi
|
||||
|
||||
if test $elf = yes; then
|
||||
echo $ac_n "checking for .previous assembler directive""... $ac_c" 1>&6
|
||||
echo "configure:1813: checking for .previous assembler directive" >&5
|
||||
echo "configure:1827: checking for .previous assembler directive" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_asm_previous_directive'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@@ -1817,7 +1831,7 @@ else
|
||||
.section foo_section
|
||||
.previous
|
||||
EOF
|
||||
if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:1821: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
|
||||
if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:1835: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
|
||||
libc_cv_asm_previous_directive=yes
|
||||
else
|
||||
libc_cv_asm_previous_directive=no
|
||||
@@ -1833,7 +1847,7 @@ EOF
|
||||
|
||||
else
|
||||
echo $ac_n "checking for .popsection assembler directive""... $ac_c" 1>&6
|
||||
echo "configure:1837: checking for .popsection assembler directive" >&5
|
||||
echo "configure:1851: checking for .popsection assembler directive" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_asm_popsection_directive'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@@ -1841,7 +1855,7 @@ else
|
||||
.pushsection foo_section
|
||||
.popsection
|
||||
EOF
|
||||
if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:1845: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
|
||||
if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:1859: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
|
||||
libc_cv_asm_popsection_directive=yes
|
||||
else
|
||||
libc_cv_asm_popsection_directive=no
|
||||
@@ -1861,12 +1875,12 @@ fi
|
||||
|
||||
if test $elf != yes; then
|
||||
echo $ac_n "checking for .init and .fini sections""... $ac_c" 1>&6
|
||||
echo "configure:1865: checking for .init and .fini sections" >&5
|
||||
echo "configure:1879: checking for .init and .fini sections" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_have_initfini'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1870 "configure"
|
||||
#line 1884 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main() {
|
||||
@@ -1875,7 +1889,7 @@ asm (".section .init");
|
||||
asm (".text");
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1879: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:1893: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
libc_cv_have_initfini=yes
|
||||
else
|
||||
@@ -1900,19 +1914,19 @@ if test $elf = yes; then
|
||||
libc_cv_asm_underscores=no
|
||||
else
|
||||
echo $ac_n "checking for _ prefix on C symbol names""... $ac_c" 1>&6
|
||||
echo "configure:1904: checking for _ prefix on C symbol names" >&5
|
||||
echo "configure:1918: checking for _ prefix on C symbol names" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_asm_underscores'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1909 "configure"
|
||||
#line 1923 "configure"
|
||||
#include "confdefs.h"
|
||||
asm ("_glibc_foobar:");
|
||||
int main() {
|
||||
glibc_foobar ();
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
if { (eval echo configure:1930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
rm -rf conftest*
|
||||
libc_cv_asm_underscores=yes
|
||||
else
|
||||
@@ -1939,7 +1953,7 @@ if test $elf = yes; then
|
||||
libc_cv_asm_weakext_directive=no
|
||||
else
|
||||
echo $ac_n "checking for assembler .weak directive""... $ac_c" 1>&6
|
||||
echo "configure:1943: checking for assembler .weak directive" >&5
|
||||
echo "configure:1957: checking for assembler .weak directive" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_asm_weak_directive'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@@ -1962,7 +1976,7 @@ echo "$ac_t""$libc_cv_asm_weak_directive" 1>&6
|
||||
|
||||
if test $libc_cv_asm_weak_directive = no; then
|
||||
echo $ac_n "checking for assembler .weakext directive""... $ac_c" 1>&6
|
||||
echo "configure:1966: checking for assembler .weakext directive" >&5
|
||||
echo "configure:1980: checking for assembler .weakext directive" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_asm_weakext_directive'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@@ -1999,7 +2013,7 @@ EOF
|
||||
fi
|
||||
|
||||
echo $ac_n "checking for ld --no-whole-archive""... $ac_c" 1>&6
|
||||
echo "configure:2003: checking for ld --no-whole-archive" >&5
|
||||
echo "configure:2017: checking for ld --no-whole-archive" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_ld_no_whole_archive'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@@ -2010,7 +2024,7 @@ __throw () {}
|
||||
EOF
|
||||
if { ac_try='${CC-cc} $CFLAGS
|
||||
-nostdlib -nostartfiles -Wl,--no-whole-archive
|
||||
-o conftest conftest.c'; { (eval echo configure:2014: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
|
||||
-o conftest conftest.c'; { (eval echo configure:2028: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
|
||||
libc_cv_ld_no_whole_archive=yes
|
||||
else
|
||||
libc_cv_ld_no_whole_archive=no
|
||||
@@ -2021,7 +2035,7 @@ fi
|
||||
echo "$ac_t""$libc_cv_ld_no_whole_archive" 1>&6
|
||||
|
||||
echo $ac_n "checking for gcc -fno-exceptions""... $ac_c" 1>&6
|
||||
echo "configure:2025: checking for gcc -fno-exceptions" >&5
|
||||
echo "configure:2039: checking for gcc -fno-exceptions" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_gcc_no_exceptions'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@@ -2032,7 +2046,7 @@ __throw () {}
|
||||
EOF
|
||||
if { ac_try='${CC-cc} $CFLAGS
|
||||
-nostdlib -nostartfiles -fno-exceptions
|
||||
-o conftest conftest.c'; { (eval echo configure:2036: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
|
||||
-o conftest conftest.c'; { (eval echo configure:2050: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
|
||||
libc_cv_gcc_no_exceptions=yes
|
||||
else
|
||||
libc_cv_gcc_no_exceptions=no
|
||||
@@ -2063,10 +2077,10 @@ for dir in $sysnames; do
|
||||
fi
|
||||
|
||||
if test -z "$uname"; then
|
||||
if test -r $sysdep_dir/$dir/uname.c ||
|
||||
test -r $sysdep_dir/$dir/uname.S ||
|
||||
{ test -r $sysdep_dir/$dir/syscalls.list &&
|
||||
grep '^uname[ ]' $sysdep_dir/$dir/syscalls.list >/dev/null; }; then
|
||||
if test -r $dest/uname.c ||
|
||||
test -r $dest/uname.S ||
|
||||
{ test -r $dest/syscalls.list &&
|
||||
grep '^uname[ ]' $dest/syscalls.list >/dev/null; }; then
|
||||
uname=$dir
|
||||
fi
|
||||
fi
|
||||
@@ -2076,7 +2090,7 @@ done
|
||||
|
||||
# If we will use the generic uname implementation, we must figure out what
|
||||
# it will say by examining the system, and write the results in config-name.h.
|
||||
if test "$uname" = generic; then
|
||||
if test "$uname" = "sysdeps/generic"; then
|
||||
|
||||
uname_sysname=`echo $config_os | sed 's/[0-9.]*$//'`
|
||||
if test $uname_sysname != $config_os; then
|
||||
@@ -2084,7 +2098,7 @@ if test "$uname" = generic; then
|
||||
fi
|
||||
|
||||
echo $ac_n "checking OS release for uname""... $ac_c" 1>&6
|
||||
echo "configure:2088: checking OS release for uname" >&5
|
||||
echo "configure:2102: checking OS release for uname" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_uname_release'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@@ -2106,7 +2120,7 @@ echo "$ac_t""$libc_cv_uname_release" 1>&6
|
||||
uname_release="$libc_cv_uname_release"
|
||||
|
||||
echo $ac_n "checking OS version for uname""... $ac_c" 1>&6
|
||||
echo "configure:2110: checking OS version for uname" >&5
|
||||
echo "configure:2124: checking OS version for uname" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_uname_version'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@@ -2128,7 +2142,7 @@ else
|
||||
fi
|
||||
|
||||
echo $ac_n "checking stdio selection""... $ac_c" 1>&6
|
||||
echo "configure:2132: checking stdio selection" >&5
|
||||
echo "configure:2146: checking stdio selection" >&5
|
||||
|
||||
case $stdio in
|
||||
libio) cat >> confdefs.h <<\EOF
|
||||
@@ -2181,6 +2195,7 @@ fi
|
||||
|
||||
|
||||
|
||||
|
||||
if test "`(cd $srcdir; pwd)`" = "`pwd`"; then
|
||||
config_makefile=
|
||||
else
|
||||
@@ -2334,12 +2349,14 @@ s%@INSTALL_DATA@%$INSTALL_DATA%g
|
||||
s%@LN_S@%$LN_S%g
|
||||
s%@MSGFMT@%$MSGFMT%g
|
||||
s%@CC@%$CC%g
|
||||
s%@cross_linkable@%$cross_linkable%g
|
||||
s%@build@%$build%g
|
||||
s%@build_alias@%$build_alias%g
|
||||
s%@build_cpu@%$build_cpu%g
|
||||
s%@build_vendor@%$build_vendor%g
|
||||
s%@build_os@%$build_os%g
|
||||
s%@BUILD_CC@%$BUILD_CC%g
|
||||
s%@cross_compiling@%$cross_compiling%g
|
||||
s%@CPP@%$CPP%g
|
||||
s%@AR@%$AR%g
|
||||
s%@RANLIB@%$RANLIB%g
|
||||
@@ -2366,6 +2383,7 @@ s%@shared@%$shared%g
|
||||
s%@profile@%$profile%g
|
||||
s%@omitfp@%$omitfp%g
|
||||
s%@bounded@%$bounded%g
|
||||
s%@static_nss@%$static_nss%g
|
||||
s%@DEFINES@%$DEFINES%g
|
||||
s%@VERSION@%$VERSION%g
|
||||
|
||||
@@ -2622,7 +2640,7 @@ while test -n "$ac_sources"; do
|
||||
done
|
||||
EOF
|
||||
cat >> $CONFIG_STATUS <<EOF
|
||||
echo '$config_vars' >> config.make
|
||||
echo '$config_vars' >> config.make; test -d bits || mkdir bits
|
||||
EOF
|
||||
cat >> $CONFIG_STATUS <<\EOF
|
||||
|
||||
|
||||
+24
-11
@@ -1,7 +1,7 @@
|
||||
Dnl Process this file with autoconf to produce a configure script.
|
||||
AC_REVISION([$CVSid$])
|
||||
AC_PREREQ(2.11)dnl dnl Minimum Autoconf version required.
|
||||
AC_INIT(features.h)
|
||||
AC_INIT(include/features.h)
|
||||
AC_CONFIG_HEADER(config.h)
|
||||
|
||||
# This will get text that should go into config.make.
|
||||
@@ -92,6 +92,15 @@ if test x"$add_ons" != x; then
|
||||
done
|
||||
fi
|
||||
|
||||
dnl On some platforms we cannot use dynamic loading. We must provide
|
||||
dnl static NSS modules.
|
||||
AC_ARG_ENABLE(static-nss, dnl
|
||||
[ --enable-static-nss build static NSS modules [default=no]],
|
||||
static_nss=$enableval, static_nss=no)
|
||||
if test x"$static_nss" = xyes; then
|
||||
AC_DEFINE(DO_STATIC_NSS)
|
||||
fi
|
||||
|
||||
AC_CANONICAL_HOST
|
||||
|
||||
# The way shlib-versions is used to generate soversions.mk uses a
|
||||
@@ -119,7 +128,8 @@ gnu* | linux* | bsd4.4* | netbsd* | freebsd*)
|
||||
gnu_ld=yes gnu_as=yes ;;
|
||||
esac
|
||||
case "$host_os" in
|
||||
linux*ecoff*)
|
||||
# i586-linuxaout is mangled into i586-pc-linux-gnuaout
|
||||
linux*ecoff* | linux*aout* | gnu*aout* | gnu*ecoff*)
|
||||
;;
|
||||
gnu* | linux* | sysv4* | solaris2*)
|
||||
# These systems (almost) always use the ELF format.
|
||||
@@ -138,6 +148,7 @@ changequote(,)dnl
|
||||
case "$machine" in
|
||||
a29k | am29000) base_machine=a29k machine=a29k ;;
|
||||
alpha*) base_machine=alpha machine=alpha/$machine ;;
|
||||
arm*) base_machine=arm machine=arm/$machine ;;
|
||||
hppa*) base_machine=hppa machine=hppa/$machine ;;
|
||||
i[3456]86) base_machine=i386 machine=i386/$machine ;;
|
||||
m680?0) base_machine=m68k machine=m68k/$machine ;;
|
||||
@@ -343,10 +354,10 @@ changequote([,])dnl
|
||||
done
|
||||
|
||||
# Add the default directories.
|
||||
sysnames="$names sysdeps/generic sysdeps/stub"
|
||||
sysnames="$names sysdeps/generic sysdeps/stub include"
|
||||
AC_SUBST(sysnames)
|
||||
# The other names were emitted during the scan.
|
||||
AC_MSG_RESULT(sysdeps/generic sysdeps/stub)
|
||||
AC_MSG_RESULT(sysdeps/generic sysdeps/stub include)
|
||||
|
||||
|
||||
### Locate tools.
|
||||
@@ -359,11 +370,12 @@ fi
|
||||
AC_PROG_LN_S
|
||||
AC_CHECK_PROGS(MSGFMT, msgfmt gmsgfmt, :)
|
||||
|
||||
AC_PROG_CC
|
||||
AC_PROG_CC_LOCAL
|
||||
AC_CANONICAL_BUILD
|
||||
if test $host != $build; then
|
||||
AC_CHECK_PROGS(BUILD_CC, gcc cc)
|
||||
fi
|
||||
AC_SUBST(cross_compiling)
|
||||
AC_PROG_CPP
|
||||
AC_CHECK_TOOL(AR, ar)
|
||||
AC_CHECK_TOOL(RANLIB, ranlib, :)
|
||||
@@ -700,10 +712,10 @@ for dir in $sysnames; do
|
||||
fi
|
||||
[
|
||||
if test -z "$uname"; then
|
||||
if test -r $sysdep_dir/$dir/uname.c ||
|
||||
test -r $sysdep_dir/$dir/uname.S ||
|
||||
{ test -r $sysdep_dir/$dir/syscalls.list &&
|
||||
grep '^uname[ ]' $sysdep_dir/$dir/syscalls.list >/dev/null; }; then
|
||||
if test -r $dest/uname.c ||
|
||||
test -r $dest/uname.S ||
|
||||
{ test -r $dest/syscalls.list &&
|
||||
grep '^uname[ ]' $dest/syscalls.list >/dev/null; }; then
|
||||
uname=$dir
|
||||
fi
|
||||
fi
|
||||
@@ -714,7 +726,7 @@ AC_LINK_FILES(`echo $libc_link_sources`, `echo $libc_link_dests`)
|
||||
|
||||
# If we will use the generic uname implementation, we must figure out what
|
||||
# it will say by examining the system, and write the results in config-name.h.
|
||||
if test "$uname" = generic; then
|
||||
if test "$uname" = "sysdeps/generic"; then
|
||||
|
||||
changequote(,)dnl
|
||||
uname_sysname=`echo $config_os | sed 's/[0-9.]*$//'`
|
||||
@@ -808,6 +820,7 @@ fi
|
||||
AC_SUBST(profile)
|
||||
AC_SUBST(omitfp)
|
||||
AC_SUBST(bounded)
|
||||
AC_SUBST(static_nss)
|
||||
|
||||
AC_SUBST(DEFINES)
|
||||
|
||||
@@ -820,5 +833,5 @@ fi
|
||||
VERSION=`sed -e 's/^#define VERSION "\([^"]*\)"/\1/p' -e d < $srcdir/version.h`
|
||||
AC_SUBST(VERSION)
|
||||
|
||||
AC_OUTPUT(config.make glibcbug ${config_makefile} ${config_uname}, ,
|
||||
[echo '$config_vars' >> config.make; test -d bits || mkdir bits])
|
||||
[echo '$config_vars' >> config.make])
|
||||
|
||||
+43
-37
@@ -1,6 +1,6 @@
|
||||
# Makefile for csu code for GNU C library.
|
||||
|
||||
# Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1995, 1996, 1997 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
|
||||
@@ -36,27 +36,14 @@ omit-deps = $(patsubst %.o,%,$(start-installed-name) g$(start-installed-name) \
|
||||
$(csu-dummies))
|
||||
install-lib = $(start-installed-name) g$(start-installed-name) \
|
||||
$(csu-dummies)
|
||||
distribute = initfini.c gmon-start.c start.c
|
||||
distribute = initfini.c gmon-start.c start.c defs.awk abi-note.S abi-tag.h
|
||||
|
||||
all: # Make this the default target; it will be defined in Rules.
|
||||
|
||||
include ../Makeconfig
|
||||
|
||||
ifneq ($(elf),yes)
|
||||
|
||||
# When not using ELF, there is just one startfile, called crt0.o.
|
||||
start-installed-name = crt0.o
|
||||
|
||||
else
|
||||
|
||||
# In the ELF universe, crt0.o is called crt1.o, and there are
|
||||
# some additional bizarre files.
|
||||
start-installed-name = crt1.o
|
||||
have-initfini = yes
|
||||
|
||||
endif
|
||||
|
||||
ifeq (yes,$(have-initfini))
|
||||
ifeq ($(have-initfini),yes)
|
||||
|
||||
CPPFLAGS += -DHAVE_INITFINI
|
||||
|
||||
@@ -67,45 +54,64 @@ crtstuff = crti crtn
|
||||
|
||||
install-lib += $(crtstuff:=.o)
|
||||
extra-objs += $(crtstuff:=.o)
|
||||
generated += $(crtstuff:=.s)
|
||||
generated += $(crtstuff:=.S) initfini.s align.h end.h
|
||||
omit-deps += $(crtstuff)
|
||||
|
||||
# Compile initfini.c to assembly code, which contains embedded shell
|
||||
# commands that produce crti.s-new and crtn.s-new when run. We need to
|
||||
# disable emission of .size directives and debugging information, since
|
||||
# they will get confused by the splitting of the output we do.
|
||||
$(objpfx)cr%i.s $(objpfx)cr%n.s: initfini.c; $(initfini)
|
||||
# Special rules for the building of crti.o and crtn.o
|
||||
$(objpfx)crt%.o: $(objpfx)crt%.S $(objpfx)defs.h
|
||||
$(compile.S) -fPIC -g0 -o $@
|
||||
|
||||
define initfini
|
||||
-rm -f $(objpfx)crtcommon.tmp
|
||||
(echo 'cat > crtcommon.tmp <<\EOF_common'; \
|
||||
$(CC) $< $(CPPFLAGS) $(CFLAGS) \
|
||||
-fPIC -finhibit-size-directive $(no-exceptions) -g0 -S -o -; \
|
||||
echo 'EOF_common') | (cd $(@D); $(SHELL))
|
||||
cat $(objpfx)crtcommon.tmp >> $(objpfx)crti.s-new
|
||||
cat $(objpfx)crtcommon.tmp >> $(objpfx)crtn.s-new
|
||||
rm -f $(objpfx)crtcommon.tmp
|
||||
mv -f $(objpfx)crti.s-new $(subst crtn,crti,$@)
|
||||
mv -f $(objpfx)crtn.s-new $(subst crti,crtn,$@)
|
||||
endef
|
||||
$(objpfx)initfini.s: initfini.c
|
||||
$(compile.c) -g0 -S -fPIC -finhibit-size-directive \
|
||||
$(no-exceptions) -o $@
|
||||
|
||||
$(objpfx)crti.S: $(objpfx)initfini.s
|
||||
sed -n -e '1,/@HEADER_ENDS/p' \
|
||||
-e '/@_.*_PROLOG_BEGINS/,/@_.*_PROLOG_ENDS/p' \
|
||||
-e '/@TRAILER_BEGINS/,$$p' $< > $@
|
||||
|
||||
$(objpfx)crtn.S: $(objpfx)initfini.s
|
||||
sed -n -e '1,/@HEADER_ENDS/p' \
|
||||
-e '/@_.*_EPILOG_BEGINS/,/@_.*_EPILOG_ENDS/p' \
|
||||
-e '/@TRAILER_BEGINS/,$$p' $< > $@
|
||||
|
||||
$(objpfx)defs.h: $(objpfx)initfini.s
|
||||
sed -n -e '/@TESTS_BEGIN/,/@TESTS_END/p' $< | \
|
||||
awk -f defs.awk > $@
|
||||
|
||||
endif
|
||||
|
||||
ifeq (yes,$(elf))
|
||||
extra-objs += abi-note.o
|
||||
endif
|
||||
|
||||
include ../Rules
|
||||
|
||||
define link-relocatable
|
||||
$(CC) -nostdlib -nostartfiles -r -o $@ $^
|
||||
endef
|
||||
|
||||
ifndef start-installed-name-rule
|
||||
ifeq (yes,$(elf))
|
||||
# We link the ELF startfile along with a SHT_NOTE section indicating
|
||||
# the the kernel ABI the binaries linked with this library will require.
|
||||
$(objpfx)$(start-installed-name): $(objpfx)start.o $(objpfx)abi-note.o
|
||||
$(link-relocatable)
|
||||
else
|
||||
# The startfile is installed under different names, so we just call our
|
||||
# source file `start.c' and copy to the installed name after compiling.
|
||||
$(objpfx)$(start-installed-name): $(objpfx)start.o
|
||||
-rm -f $@
|
||||
rm -f $@
|
||||
ln $< $@
|
||||
endif
|
||||
endif
|
||||
|
||||
# The profiling startfile is made by linking together the normal
|
||||
# startfile with gmon-start.o, which defines a constructor function
|
||||
# to turn on profiling code at startup.
|
||||
$(objpfx)g$(start-installed-name): $(objpfx)start.o $(objpfx)gmon-start.o
|
||||
$(CC) -nostdlib -nostartfiles -r -o $@ $^
|
||||
$(objpfx)g$(start-installed-name): $(objpfx)$(start-installed-name) \
|
||||
$(objpfx)gmon-start.o
|
||||
$(link-relocatable)
|
||||
|
||||
# These extra files are sometimes expected by system standard linking
|
||||
# procedures, but we have nothing for them to do. So compile empty files.
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
/* Special .init and .fini section support.
|
||||
Copyright (C) 1997 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.
|
||||
|
||||
In addition to the permissions in the GNU Library General Public
|
||||
License, the Free Software Foundation gives you unlimited
|
||||
permission to link the compiled version of this file with other
|
||||
programs, and to distribute those programs without any restriction
|
||||
coming from the use of this file. (The Library General Public
|
||||
License restrictions do apply in other respects; for example, they
|
||||
cover modification of the file, and distribution when not linked
|
||||
into another program.)
|
||||
|
||||
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, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <sysdep.h>
|
||||
|
||||
/* The basic layout of note sections is specified by the ELF format. */
|
||||
|
||||
#define ELF_NOTE_BEGIN(sectname, sectflags, type, name) \
|
||||
.section sectname, sectflags; \
|
||||
.align 4; /* Notes are 4-byte aligned. */ \
|
||||
.long 1f - 0f; /* 32-bit word: length of name field */ \
|
||||
.long 3f - 2f; /* 32-bit word: length of desc field */ \
|
||||
.long (type); /* 32-bit word: vendor-defined type field */ \
|
||||
0: .asciz name; /* null-terminated string, any length: name */\
|
||||
1: .align 4; /* Name data padded to 4-byte alignment. */ \
|
||||
2: /* Here follows the "note descriptor" data, whose format \
|
||||
is not specified by ELF. The vendor name and type field \
|
||||
indicate what sort of data is found here. */
|
||||
|
||||
#define ELF_NOTE_END \
|
||||
3: .align 4 /* Pad to 4-byte align the next note. */
|
||||
|
||||
|
||||
/* The linker (GNU ld 2.8 and later) recognize an allocated section whose
|
||||
name begins with `.note' and creates a PT_NOTE program header entry
|
||||
pointing at it.
|
||||
|
||||
Such a program header is the canonical way (at least in the free OS
|
||||
community) to identify the OS environment ABI that the executable was
|
||||
created for. The ELF note information identifies a particular OS or
|
||||
coordinated development effort within which the ELF header's e_machine
|
||||
value plus (for dynamically linked programs) the PT_INTERP dynamic
|
||||
linker name and DT_NEEDED shared library names fully identify the
|
||||
runtime environment required by an executable.
|
||||
|
||||
The GNU project and cooperating development efforts (including the Linux
|
||||
community) use a vendor name string of "GNU", and a note type field with
|
||||
value 1 for a note descriptor that indicates ABI requirements. */
|
||||
|
||||
#include <abi-tag.h> /* OS-specific ABI tag value */
|
||||
|
||||
ELF_NOTE_BEGIN(".note.ABI-tag", "a", 1, "GNU")
|
||||
.long ABI_TAG
|
||||
ELF_NOTE_END
|
||||
@@ -0,0 +1,22 @@
|
||||
/.end/ { need_end = 1 }
|
||||
/.align/ { if($2 > max) max = $2; }
|
||||
|
||||
END {
|
||||
if(need_end)
|
||||
{
|
||||
print "#define END_INIT .end _init";
|
||||
print "#define END_FINI .end _fini";
|
||||
}
|
||||
else
|
||||
{
|
||||
print "#define END_INIT";
|
||||
print "#define END_FINI";
|
||||
}
|
||||
if(max)
|
||||
print "#define ALIGN .align", max;
|
||||
else
|
||||
print "#define ALIGN";
|
||||
|
||||
print "#include <libc-symbols.h>";
|
||||
print "weak_extern (__gmon_start__)";
|
||||
}
|
||||
+47
-79
@@ -1,5 +1,5 @@
|
||||
/* Special .init and .fini section support.
|
||||
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it
|
||||
@@ -26,68 +26,40 @@
|
||||
write to the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* This file is compiled into assembly code which is then surrounded by the
|
||||
lines `cat > crtcommon.tmp <<\EOF_common' and `EOF_common' and thus
|
||||
becomes a shell script which creates three files of assembly code.
|
||||
/* This file is compiled into assembly code which is then munged by a sed
|
||||
script into two files: crti.s and crtn.s.
|
||||
|
||||
* The first file is crti.s-new; this puts a function prologue at the
|
||||
beginning of the .init and .fini sections and defines global symbols for
|
||||
* crti.s puts a function prologue at the beginning of the
|
||||
.init and .fini sections and defines global symbols for
|
||||
those addresses, so they can be called as functions.
|
||||
|
||||
* The second file is crtn.s-new; this puts the corresponding function
|
||||
epilogues in the .init and .fini sections.
|
||||
|
||||
* The third file is crtcommon.tmp, which is whatever miscellaneous cruft
|
||||
the compiler generated at the end; it should be appended to both crti.s-new
|
||||
and crtn.s-new. */
|
||||
* crtn.s puts the corresponding function epilogues
|
||||
in the .init and .fini sections. */
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
/* We use embedded asm for .section unconditionally, as this makes it
|
||||
easier to insert the necessary directives into crtn.S. */
|
||||
#define SECTION(x) asm (".section \"" x "\"");
|
||||
|
||||
#ifdef HAVE_ELF
|
||||
/* These declarations make the functions go in the right sections when
|
||||
we define them below. GCC syntax does not allow the attribute
|
||||
specifications to be in the function definitions themselves. */
|
||||
void _init (void) __attribute__ ((section (".init")));
|
||||
void _fini (void) __attribute__ ((section (".fini")));
|
||||
/* Embed an #include to pull in the alignment and .end directives. */
|
||||
asm ("\n#include \"defs.h\"");
|
||||
|
||||
#define SECTION(x) /* Put nothing extra before the defn. */
|
||||
/* The initial common code ends here. */
|
||||
asm ("\n/*@HEADER_ENDS*/");
|
||||
|
||||
#else
|
||||
/* Some non-ELF systems support .init and .fini sections,
|
||||
but the __attribute__ syntax only works for ELF. */
|
||||
#define SECTION(x) asm (".section " x);
|
||||
#endif
|
||||
|
||||
/* End the here document containing the initial common code.
|
||||
Then move the output file crtcommon.tmp to crti.s-new and crtn.s-new. */
|
||||
asm ("\nEOF_common\n\
|
||||
rm -f crti.s-new crtn.s-new\n\
|
||||
mv crtcommon.tmp crti.s-new\n\
|
||||
cp crti.s-new crtn.s-new");
|
||||
|
||||
/* Extract a `.end' if one is produced by the compiler. */
|
||||
asm ("fgrep .end >/dev/null 2>&1 <<\\EOF.end && need_end=yes");
|
||||
/* To determine whether we need .end and .align: */
|
||||
asm ("\n/*@TESTS_BEGIN*/");
|
||||
void
|
||||
useless_function (void)
|
||||
{
|
||||
return;
|
||||
}
|
||||
asm ("\nEOF.end\n");
|
||||
|
||||
/* Find out how much alignment is produced by the compiler. */
|
||||
asm ("align=`awk '$1==\".align\" { if ($2>max) max=$2; } END { print max; }' \
|
||||
<<\\EOF.align");
|
||||
void
|
||||
useless_function2 (void (*foo) (void))
|
||||
dummy (void (*foo) (void))
|
||||
{
|
||||
if (foo)
|
||||
(*foo) ();
|
||||
}
|
||||
asm ("\nEOF.align\n`\n");
|
||||
asm ("\n/*@TESTS_END*/");
|
||||
|
||||
/* Append the .init prologue to crti.s-new. */
|
||||
asm ("cat >> crti.s-new <<\\EOF.crti.init");
|
||||
/* The beginning of _init: */
|
||||
asm ("\n/*@_init_PROLOG_BEGINS*/");
|
||||
|
||||
SECTION (".init")
|
||||
void
|
||||
@@ -99,38 +71,33 @@ _init (void)
|
||||
gcrt1.o to reference a symbol which would be defined by some library
|
||||
module which has a constructor; but then user code's constructors
|
||||
would come first, and not be profiled. */
|
||||
extern void __gmon_start__ (void); weak_extern (__gmon_start__)
|
||||
extern void __gmon_start__ (void) __attribute__ ((weak)); /*weak_extern (__gmon_start__);*/
|
||||
|
||||
if (__gmon_start__)
|
||||
__gmon_start__ ();
|
||||
|
||||
/* End the here document containing the .init prologue code.
|
||||
Then fetch the .section directive just written and append that
|
||||
to crtn.s-new, followed by the function epilogue. */
|
||||
asm ("\n\
|
||||
EOF.crti.init\n\
|
||||
test -n \"$align\" && echo .align $align >> crti.s-new\n\
|
||||
test -n \"$need_end\" && echo .end _init >> crti.s-new\n\
|
||||
fgrep .init crti.s-new >>crtn.s-new\n\
|
||||
fgrep -v .end >> crtn.s-new <<\\EOF.crtn.init");
|
||||
asm ("ALIGN");
|
||||
asm("END_INIT");
|
||||
/* Now the epilog. */
|
||||
asm ("\n/*@_init_PROLOG_ENDS*/");
|
||||
asm ("\n/*@_init_EPILOG_BEGINS*/");
|
||||
SECTION(".init");
|
||||
}
|
||||
asm ("END_INIT");
|
||||
|
||||
/* End the here document containing the .init epilogue code.
|
||||
Then append the .fini prologue to crti.s-new. */
|
||||
asm ("\nEOF.crtn.init\
|
||||
\n\
|
||||
cat >> crti.s-new <<\\EOF.crti.fini");
|
||||
/* End of the _init epilog, beginning of the _fini prolog. */
|
||||
asm ("\n/*@_init_EPILOG_ENDS*/");
|
||||
asm ("\n/*@_fini_PROLOG_BEGINS*/");
|
||||
|
||||
SECTION (".fini")
|
||||
void
|
||||
_fini (void)
|
||||
{
|
||||
/* End the here document containing the .fini prologue code.
|
||||
Then fetch the .section directive just written and append that
|
||||
to crtn.s-new, followed by the function epilogue. */
|
||||
asm ("\nEOF.crti.fini\n\
|
||||
test -n \"$align\" && echo .align $align >> crti.s-new\n\
|
||||
test -n \"$need_end\" && echo .end _fini >> crti.s-new\n\
|
||||
cat > /dev/null <<\\EOF.fini.skip");
|
||||
|
||||
/* End of the _fini prolog. */
|
||||
asm ("ALIGN");
|
||||
asm ("END_FINI");
|
||||
asm ("\n/*@_fini_PROLOG_ENDS*/");
|
||||
|
||||
{
|
||||
/* Let GCC know that _fini is not a leaf function by having a dummy
|
||||
@@ -140,14 +107,15 @@ cat > /dev/null <<\\EOF.fini.skip");
|
||||
i_am_not_a_leaf ();
|
||||
}
|
||||
|
||||
asm ("\nEOF.fini.skip\
|
||||
\n\
|
||||
fgrep .fini crti.s-new >>crtn.s-new\n\
|
||||
fgrep -v .end >> crtn.s-new <<\\EOF.crtn.fini");
|
||||
/* Beginning of the _fini epilog. */
|
||||
asm ("\n/*@_fini_EPILOG_BEGINS*/");
|
||||
SECTION (".fini");
|
||||
}
|
||||
asm ("END_FINI");
|
||||
|
||||
/* End the here document containing the .fini epilogue code.
|
||||
Finally, put the remainder of the generated assembly into crtcommon.tmp. */
|
||||
asm ("\nEOF.crtn.fini\
|
||||
\n\
|
||||
cat > crtcommon.tmp <<\\EOF_common");
|
||||
/* End of the _fini epilog. Any further generated assembly (e.g. .ident)
|
||||
is shared between both crt files. */
|
||||
asm ("\n/*@_fini_EPILOG_ENDS*/");
|
||||
asm ("\n/*@TRAILER_BEGINS*/");
|
||||
|
||||
/* End of file. */
|
||||
|
||||
+5
-5
@@ -17,7 +17,7 @@
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <ctype.h>
|
||||
#include "../locale/localeinfo.h"
|
||||
#include <locale/localeinfo.h>
|
||||
|
||||
/* Defined in locale/C-ctype.c. */
|
||||
extern const char _nl_C_LC_CTYPE_class[];
|
||||
@@ -30,8 +30,8 @@ extern const char _nl_C_LC_CTYPE_width[];
|
||||
#define b(t,x,o) (((const t *) _nl_C_LC_CTYPE_##x) + o);
|
||||
|
||||
const unsigned short int *__ctype_b = b (unsigned short int, class, 128);
|
||||
const unsigned int *__ctype32_b = b (unsigned int, class32, 0);
|
||||
const int *__ctype_tolower = b (int, tolower, 128);
|
||||
const int *__ctype_toupper = b (int, toupper, 128);
|
||||
const unsigned int *__ctype_names = b (unsigned int, names, 0);
|
||||
const __uint32_t *__ctype32_b = b (__uint32_t, class32, 0);
|
||||
const __int32_t *__ctype_tolower = b (__int32_t, tolower, 128);
|
||||
const __int32_t *__ctype_toupper = b (__int32_t, toupper, 128);
|
||||
const __uint32_t *__ctype_names = b (__uint32_t, names, 0);
|
||||
const unsigned char *__ctype_width = b (unsigned char, width, 0);
|
||||
|
||||
+4
-3
@@ -21,9 +21,10 @@
|
||||
*/
|
||||
|
||||
#ifndef _CTYPE_H
|
||||
|
||||
#define _CTYPE_H 1
|
||||
|
||||
#include <features.h>
|
||||
#include <gnu/types.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
@@ -72,8 +73,8 @@ enum
|
||||
doesn't fit into an `unsigned char'. But today more important is that
|
||||
the arrays are also used for multi-byte character sets. */
|
||||
extern __const unsigned short int *__ctype_b; /* Characteristics. */
|
||||
extern __const int *__ctype_tolower; /* Case conversions. */
|
||||
extern __const int *__ctype_toupper; /* Case conversions. */
|
||||
extern __const __int32_t *__ctype_tolower; /* Case conversions. */
|
||||
extern __const __int32_t *__ctype_toupper; /* Case conversions. */
|
||||
|
||||
#define __isctype(c, type) \
|
||||
(__ctype_b[(int) (c)] & (unsigned short int) type)
|
||||
|
||||
@@ -19,6 +19,7 @@ libdb-routines := bt_close bt_conv bt_debug bt_delete bt_get \
|
||||
mpool \
|
||||
rec_close rec_delete rec_get rec_open rec_put rec_search \
|
||||
rec_seq rec_utils
|
||||
libdb-map := libdb.map
|
||||
|
||||
headers := db.h mpool.h ndbm.h
|
||||
distribute := compat.h \
|
||||
@@ -45,3 +46,8 @@ $(objpfx)makedb: $(objpfx)libdb.so$(libdb.so-version)
|
||||
else
|
||||
$(objpfx)makedb: $(objpfx)libdb.a
|
||||
endif
|
||||
|
||||
# Depend on libc.so so a DT_NEEDED is generated in the shared objects.
|
||||
# This ensures they will load libc.so for needed symbols if loaded by
|
||||
# a statically-linked program that hasn't already loaded it.
|
||||
$(objpfx)libdb.so: $(common-objpfx)libc.so
|
||||
|
||||
@@ -259,7 +259,9 @@ __bt_open(fname, flags, mode, openinfo, dflags)
|
||||
* Don't overflow the page offset type.
|
||||
*/
|
||||
if (b.psize == 0) {
|
||||
#ifdef _STATBUF_ST_BLKSIZE
|
||||
b.psize = sb.st_blksize;
|
||||
#endif
|
||||
if (b.psize < MINPSIZE)
|
||||
b.psize = MINPSIZE;
|
||||
if (b.psize > MAX_PAGE_OFFSET + 1)
|
||||
|
||||
@@ -43,6 +43,18 @@
|
||||
|
||||
#include <mpool.h>
|
||||
|
||||
#ifdef _LIBC
|
||||
/* In the GNU C library we must not pollute the namespace because libdb is
|
||||
needed by libnss_db. */
|
||||
#define mpool_open __mpool_open
|
||||
#define mpool_filter __mpool_filter
|
||||
#define mpool_new __mpool_new
|
||||
#define mpool_get __mpool_get
|
||||
#define mpool_put __mpool_put
|
||||
#define mpool_sync __mpool_sync
|
||||
#define mpool_close __mpool_close
|
||||
#endif
|
||||
|
||||
#define DEFMINKEYPAGE (2) /* Minimum keys per page */
|
||||
#define MINCACHE (5) /* Minimum cached pages */
|
||||
#define MINPSIZE (512) /* Minimum page size */
|
||||
|
||||
@@ -33,8 +33,8 @@
|
||||
* @(#)db.h 8.7 (Berkeley) 6/16/94
|
||||
*/
|
||||
|
||||
#ifndef _DB_H_
|
||||
#define _DB_H_
|
||||
#ifndef _DB_H
|
||||
#define _DB_H 1
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/cdefs.h>
|
||||
@@ -224,6 +224,7 @@ typedef struct {
|
||||
#endif
|
||||
|
||||
__BEGIN_DECLS
|
||||
DB *__dbopen __P((const char *, int, int, DBTYPE, const void *));
|
||||
DB *dbopen __P((const char *, int, int, DBTYPE, const void *));
|
||||
|
||||
#ifdef __DBINTERFACE_PRIVATE
|
||||
@@ -233,4 +234,5 @@ DB *__rec_open __P((const char *, int, int, const RECNOINFO *, int));
|
||||
void __dbpanic __P((DB *dbp));
|
||||
#endif
|
||||
__END_DECLS
|
||||
#endif /* !_DB_H_ */
|
||||
|
||||
#endif /* db.h */
|
||||
|
||||
+10
@@ -44,6 +44,12 @@ static char sccsid[] = "@(#)db.c 8.4 (Berkeley) 2/21/94";
|
||||
|
||||
#include <db.h>
|
||||
|
||||
#ifdef _LIBC
|
||||
/* In the GNU C library we must not pollute the namespace, because libdb
|
||||
is needed by libnss_db. */
|
||||
#define dbopen __dbopen
|
||||
#endif
|
||||
|
||||
DB *
|
||||
dbopen(fname, flags, mode, type, openinfo)
|
||||
const char *fname;
|
||||
@@ -72,6 +78,10 @@ dbopen(fname, flags, mode, type, openinfo)
|
||||
errno = EINVAL;
|
||||
return (NULL);
|
||||
}
|
||||
#ifdef _LIBC
|
||||
#undef dbopen
|
||||
weak_alias (__dbopen, dbopen)
|
||||
#endif
|
||||
|
||||
static int
|
||||
__dberr __P((void))
|
||||
|
||||
+1
-1
@@ -52,7 +52,7 @@ void __free_ovflpage __P((HTAB *, BUFHEAD *));
|
||||
BUFHEAD *__get_buf __P((HTAB *, u_int32_t, BUFHEAD *, int));
|
||||
int __get_page __P((HTAB *, char *, u_int32_t, int, int, int));
|
||||
int __ibitmap __P((HTAB *, int, int, int));
|
||||
u_int32_t __log2 __P((u_int32_t));
|
||||
u_int32_t __hash_log2 __P((u_int32_t));
|
||||
int __put_page __P((HTAB *, char *, u_int32_t, int, int));
|
||||
void __reclaim_buf __P((HTAB *, BUFHEAD *));
|
||||
int __split_page __P((HTAB *, u_int32_t, u_int32_t));
|
||||
|
||||
+5
-5
@@ -303,13 +303,13 @@ init_hash(hashp, file, info)
|
||||
if (stat(file, &statbuf))
|
||||
return (NULL);
|
||||
hashp->BSIZE = statbuf.st_blksize;
|
||||
hashp->BSHIFT = __log2(hashp->BSIZE);
|
||||
hashp->BSHIFT = __hash_log2(hashp->BSIZE);
|
||||
}
|
||||
|
||||
if (info) {
|
||||
if (info->bsize) {
|
||||
/* Round pagesize up to power of 2 */
|
||||
hashp->BSHIFT = __log2(info->bsize);
|
||||
hashp->BSHIFT = __hash_log2(info->bsize);
|
||||
hashp->BSIZE = 1 << hashp->BSHIFT;
|
||||
if (hashp->BSIZE > MAX_BSIZE) {
|
||||
errno = EINVAL;
|
||||
@@ -358,7 +358,7 @@ init_htab(hashp, nelem)
|
||||
*/
|
||||
nelem = (nelem - 1) / hashp->FFACTOR + 1;
|
||||
|
||||
l2 = __log2(MAX(nelem, 2));
|
||||
l2 = __hash_log2(MAX(nelem, 2));
|
||||
nbuckets = 1 << l2;
|
||||
|
||||
hashp->SPARES[l2] = l2 + 1;
|
||||
@@ -376,7 +376,7 @@ init_htab(hashp, nelem)
|
||||
hashp->BSHIFT) + 1;
|
||||
|
||||
nsegs = (nbuckets - 1) / hashp->SGSIZE + 1;
|
||||
nsegs = 1 << __log2(nsegs);
|
||||
nsegs = 1 << __hash_log2(nsegs);
|
||||
|
||||
if (nsegs > hashp->DSIZE)
|
||||
hashp->DSIZE = nsegs;
|
||||
@@ -843,7 +843,7 @@ __expand_table(hashp)
|
||||
* * increases), we need to copy the current contents of the spare
|
||||
* split bucket to the next bucket.
|
||||
*/
|
||||
spare_ndx = __log2(hashp->MAX_BUCKET + 1);
|
||||
spare_ndx = __hash_log2(hashp->MAX_BUCKET + 1);
|
||||
if (spare_ndx > hashp->OVFL_POINT) {
|
||||
hashp->SPARES[spare_ndx] = hashp->SPARES[hashp->OVFL_POINT];
|
||||
hashp->OVFL_POINT = spare_ndx;
|
||||
|
||||
+1
-1
@@ -170,7 +170,7 @@ typedef struct htab { /* Memory resident data structure */
|
||||
#define OADDR_OF(S,O) ((u_int32_t)((u_int32_t)(S) << SPLITSHIFT) + (O))
|
||||
|
||||
#define BUCKET_TO_PAGE(B) \
|
||||
(B) + hashp->HDRPAGES + ((B) ? hashp->SPARES[__log2((B)+1)-1] : 0)
|
||||
(B) + hashp->HDRPAGES + ((B) ? hashp->SPARES[__hash_log2((B)+1)-1] : 0)
|
||||
#define OADDR_TO_PAGE(B) \
|
||||
BUCKET_TO_PAGE ( (1 << SPLITNUM((B))) -1 ) + OPAGENUM((B));
|
||||
|
||||
|
||||
+2
-2
@@ -42,10 +42,10 @@ static char sccsid[] = "@(#)hash_log2.c 8.2 (Berkeley) 5/31/94";
|
||||
|
||||
#include <db.h>
|
||||
|
||||
u_int32_t __log2 __P((u_int32_t));
|
||||
u_int32_t __hash_log2 __P((u_int32_t));
|
||||
|
||||
u_int32_t
|
||||
__log2(num)
|
||||
__hash_log2(num)
|
||||
u_int32_t num;
|
||||
{
|
||||
register u_int32_t i, limit;
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
GLIBC_2.0 {
|
||||
global:
|
||||
# the real DB entry point.
|
||||
dbopen; __dbopen;
|
||||
|
||||
# The compatibility functions.
|
||||
dbm_clearerr; dbm_close; dbm_delete; dbm_dirfno; dbm_error;
|
||||
dbm_fetch; dbm_firstkey; dbm_nextkey; dbm_open; dbm_store;
|
||||
|
||||
local:
|
||||
*;
|
||||
};
|
||||
+13
@@ -33,6 +33,9 @@
|
||||
* @(#)mpool.h 8.2 (Berkeley) 7/14/94
|
||||
*/
|
||||
|
||||
#ifndef _MPOOL_H
|
||||
#define _MPOOL_H 1
|
||||
|
||||
#include <sys/queue.h>
|
||||
|
||||
/*
|
||||
@@ -85,15 +88,25 @@ typedef struct MPOOL {
|
||||
} MPOOL;
|
||||
|
||||
__BEGIN_DECLS
|
||||
MPOOL *__mpool_open __P((void *, int, pgno_t, pgno_t));
|
||||
MPOOL *mpool_open __P((void *, int, pgno_t, pgno_t));
|
||||
void __mpool_filter __P((MPOOL *, void (*)(void *, pgno_t, void *),
|
||||
void (*)(void *, pgno_t, void *), void *));
|
||||
void mpool_filter __P((MPOOL *, void (*)(void *, pgno_t, void *),
|
||||
void (*)(void *, pgno_t, void *), void *));
|
||||
void *__mpool_new __P((MPOOL *, pgno_t *));
|
||||
void *mpool_new __P((MPOOL *, pgno_t *));
|
||||
void *__mpool_get __P((MPOOL *, pgno_t, u_int));
|
||||
void *mpool_get __P((MPOOL *, pgno_t, u_int));
|
||||
int __mpool_put __P((MPOOL *, void *, u_int));
|
||||
int mpool_put __P((MPOOL *, void *, u_int));
|
||||
int __mpool_sync __P((MPOOL *));
|
||||
int mpool_sync __P((MPOOL *));
|
||||
int __mpool_close __P((MPOOL *));
|
||||
int mpool_close __P((MPOOL *));
|
||||
#ifdef STATISTICS
|
||||
void mpool_stat __P((MPOOL *));
|
||||
#endif
|
||||
__END_DECLS
|
||||
|
||||
#endif /* mpool.h */
|
||||
|
||||
@@ -50,6 +50,18 @@ static char sccsid[] = "@(#)mpool.c 8.5 (Berkeley) 7/26/94";
|
||||
#define __MPOOLINTERFACE_PRIVATE
|
||||
#include <mpool.h>
|
||||
|
||||
#ifdef _LIBC
|
||||
/* In the GNU C library we must not pollute the namespace because libdb is
|
||||
needed by libnss_db. */
|
||||
#define mpool_open __mpool_open
|
||||
#define mpool_filter __mpool_filter
|
||||
#define mpool_new __mpool_new
|
||||
#define mpool_get __mpool_get
|
||||
#define mpool_put __mpool_put
|
||||
#define mpool_sync __mpool_sync
|
||||
#define mpool_close __mpool_close
|
||||
#endif
|
||||
|
||||
static BKT *mpool_bkt __P((MPOOL *));
|
||||
static BKT *mpool_look __P((MPOOL *, pgno_t));
|
||||
static int mpool_write __P((MPOOL *, BKT *));
|
||||
@@ -301,6 +313,23 @@ mpool_sync(mp)
|
||||
return (fsync(mp->fd) ? RET_ERROR : RET_SUCCESS);
|
||||
}
|
||||
|
||||
#ifdef _LIBC
|
||||
#undef mpool_open
|
||||
#undef mpool_filter
|
||||
#undef mpool_new
|
||||
#undef mpool_get
|
||||
#undef mpool_put
|
||||
#undef mpool_close
|
||||
#undef mpool_sync
|
||||
weak_alias (__mpool_open, mpool_open)
|
||||
weak_alias (__mpool_filter, mpool_filter)
|
||||
weak_alias (__mpool_new, mpool_new)
|
||||
weak_alias (__mpool_get, mpool_get)
|
||||
weak_alias (__mpool_put, mpool_put)
|
||||
weak_alias (__mpool_close, mpool_close)
|
||||
weak_alias (__mpool_sync, mpool_sync)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* mpool_bkt
|
||||
* Get a page from the cache (or create one).
|
||||
|
||||
@@ -36,8 +36,8 @@
|
||||
* @(#)ndbm.h 8.1 (Berkeley) 6/2/93
|
||||
*/
|
||||
|
||||
#ifndef _NDBM_H_
|
||||
#define _NDBM_H_
|
||||
#ifndef _NDBM_H
|
||||
#define _NDBM_H 1
|
||||
|
||||
#include <db.h>
|
||||
|
||||
@@ -76,4 +76,4 @@ int dbm_error __P((DBM *));
|
||||
int dbm_clearerr __P((DBM *));
|
||||
__END_DECLS
|
||||
|
||||
#endif /* !_NDBM_H_ */
|
||||
#endif /* ndbm.h */
|
||||
|
||||
+2
-2
@@ -21,9 +21,9 @@
|
||||
#
|
||||
subdir := dirent
|
||||
|
||||
headers := dirent.h direntry.h
|
||||
headers := dirent.h bits/dirent.h
|
||||
routines := opendir closedir readdir readdir_r rewinddir \
|
||||
seekdir telldir scandir alphasort \
|
||||
seekdir telldir scandir alphasort versionsort \
|
||||
getdents dirfd
|
||||
distribute := dirstream.h
|
||||
|
||||
|
||||
+9
-5
@@ -21,13 +21,13 @@
|
||||
*/
|
||||
|
||||
#ifndef _DIRENT_H
|
||||
|
||||
#define _DIRENT_H 1
|
||||
|
||||
#include <features.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
#include <gnu/types.h>
|
||||
#include <bits/types.h>
|
||||
|
||||
/* This file defines `struct dirent'.
|
||||
|
||||
@@ -44,7 +44,7 @@ __BEGIN_DECLS
|
||||
member that gives the type of the file.
|
||||
*/
|
||||
|
||||
#include <direntry.h>
|
||||
#include <bits/dirent.h>
|
||||
|
||||
#if (defined __USE_BSD || defined __USE_MISC) && !defined d_fileno
|
||||
# define d_ino d_fileno /* Backward compatibility. */
|
||||
@@ -142,7 +142,7 @@ extern int dirfd __P ((DIR *__dirp));
|
||||
|
||||
# ifndef MAXNAMLEN
|
||||
/* Get the definitions of the POSIX.1 limits. */
|
||||
# include <posix1_lim.h>
|
||||
# include <bits/posix1_lim.h>
|
||||
|
||||
/* `MAXNAMLEN' is the BSD name for what POSIX calls `NAME_MAX'. */
|
||||
# ifdef NAME_MAX
|
||||
@@ -152,7 +152,7 @@ extern int dirfd __P ((DIR *__dirp));
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# include <gnu/types.h>
|
||||
# include <bits/types.h>
|
||||
# define __need_size_t
|
||||
# include <stddef.h>
|
||||
|
||||
@@ -175,6 +175,10 @@ extern int scandir __P ((__const char *__dir,
|
||||
/* Function to compare two `struct dirent's alphabetically. */
|
||||
extern int alphasort __P ((__const __ptr_t, __const __ptr_t));
|
||||
|
||||
# ifdef __USE_GNU
|
||||
/* Function to compare two `struct dirent's by name & version. */
|
||||
extern int versionsort __P ((__const __ptr_t, __const __ptr_t));
|
||||
#endif
|
||||
|
||||
/* Read directory entries from FD into BUF, reading at most NBYTES.
|
||||
Reading starts at offset *BASEP, and *BASEP is updated with the new
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
/* Copyright (C) 1992, 1997 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 <dirent.h>
|
||||
#include <string.h>
|
||||
|
||||
int
|
||||
versionsort (const void *a, const void *b)
|
||||
{
|
||||
return strverscmp ((*(const struct dirent **) a)->d_name,
|
||||
(*(const struct dirent **) b)->d_name);
|
||||
}
|
||||
+4
-3
@@ -20,14 +20,14 @@
|
||||
|
||||
subdir := elf
|
||||
|
||||
headers = elf.h elfclass.h link.h dlfcn.h
|
||||
headers = elf.h bits/elfclass.h link.h dlfcn.h
|
||||
routines = $(dl-routines) dl-open dl-close dl-symbol dl-support \
|
||||
dl-version enbl-secure
|
||||
|
||||
# The core dynamic linking functions are in libc for the static and
|
||||
# profiled libraries.
|
||||
dl-routines = $(addprefix dl-,load cache lookup object reloc deps \
|
||||
runtime error init fini debug)
|
||||
runtime error init fini debug misc)
|
||||
# But they are absent from the shared libc, because that code is in ld.so.
|
||||
elide-routines.so = $(dl-routines) dl-support enbl-secure
|
||||
|
||||
@@ -35,11 +35,12 @@ elide-routines.so = $(dl-routines) dl-support enbl-secure
|
||||
# interpreter and operating independent of libc.
|
||||
rtld-routines := rtld $(dl-routines) dl-sysdep dl-minimal
|
||||
distribute = $(rtld-routines:=.c) dynamic-link.h do-rel.h dl-machine.h \
|
||||
soinit.c sofini.c ldd.sh.in ldd.bash.in eval.c
|
||||
dl-hash.h soinit.c sofini.c ldd.sh.in ldd.bash.in eval.c
|
||||
|
||||
extra-libs = libdl
|
||||
extra-libs-others = $(extra-libs)
|
||||
libdl-routines := dlopen dlclose dlsym dlvsym dlerror dladdr
|
||||
libdl-map := libdl.map
|
||||
|
||||
before-compile = $(objpfx)trusted-dirs.h
|
||||
|
||||
|
||||
+40
-20
@@ -17,6 +17,7 @@
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <alloca.h>
|
||||
#include <stddef.h>
|
||||
#include <link.h>
|
||||
#include <assert.h>
|
||||
@@ -24,10 +25,14 @@
|
||||
|
||||
#include "dl-hash.h"
|
||||
#include <dl-machine.h>
|
||||
#include "../stdio-common/_itoa.h"
|
||||
#include <stdio-common/_itoa.h>
|
||||
|
||||
#define VERSTAG(tag) (DT_NUM + DT_PROCNUM + DT_VERSIONTAGIDX (tag))
|
||||
|
||||
/* We need this string more than once. */
|
||||
static const char undefined_msg[] = "undefined symbol: ";
|
||||
|
||||
|
||||
struct sym_val
|
||||
{
|
||||
ElfW(Addr) a;
|
||||
@@ -78,6 +83,11 @@ do_lookup (const char *undef_name, unsigned long int hash,
|
||||
if (skip != NULL && map == skip)
|
||||
continue;
|
||||
|
||||
/* Skip objects that could not be opened, which can occur in trace
|
||||
mode. */
|
||||
if (map->l_opencount == 0)
|
||||
continue;
|
||||
|
||||
/* Don't search the executable when resolving a copy reloc. */
|
||||
if (elf_machine_lookup_noexec_p (reloc_type) &&
|
||||
map->l_type == lt_executable)
|
||||
@@ -104,16 +114,10 @@ do_lookup (const char *undef_name, unsigned long int hash,
|
||||
&& sym->st_shndx == SHN_UNDEF))
|
||||
continue;
|
||||
|
||||
switch (ELFW(ST_TYPE) (sym->st_info))
|
||||
{
|
||||
case STT_NOTYPE:
|
||||
case STT_FUNC:
|
||||
case STT_OBJECT:
|
||||
break;
|
||||
default:
|
||||
/* Not a code/data definition. */
|
||||
continue;
|
||||
}
|
||||
if (ELFW(ST_TYPE) (sym->st_info) > STT_FUNC)
|
||||
/* Ignore all but STT_NOTYPE, STT_OBJECT and STT_FUNC entries
|
||||
since these are no code/data definitions. */
|
||||
continue;
|
||||
|
||||
if (sym != ref && strcmp (strtab + sym->st_name, undef_name))
|
||||
/* Not the symbol we are looking for. */
|
||||
@@ -128,7 +132,7 @@ do_lookup (const char *undef_name, unsigned long int hash,
|
||||
if (verstab != NULL)
|
||||
{
|
||||
ElfW(Half) ndx = verstab[symidx] & 0x7fff;
|
||||
if (map->l_versions[ndx].hash != 0)
|
||||
if (ndx > 2) /* map->l_versions[ndx].hash != 0) */
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -142,7 +146,7 @@ do_lookup (const char *undef_name, unsigned long int hash,
|
||||
symbol must not simply disappear. */
|
||||
if (version->filename != NULL
|
||||
&& _dl_name_match_p (version->filename, map))
|
||||
return -1;
|
||||
return -2;
|
||||
/* Otherwise we accept the symbol. */
|
||||
}
|
||||
else
|
||||
@@ -176,11 +180,14 @@ do_lookup (const char *undef_name, unsigned long int hash,
|
||||
/* Local symbols are ignored. */
|
||||
break;
|
||||
}
|
||||
|
||||
/* There cannot be another entry for this symbol so stop here. */
|
||||
break;
|
||||
}
|
||||
|
||||
/* If this current is the one mentioned in the verneed entry it
|
||||
is a bug. */
|
||||
if (version != NULL && version->filename != NULL
|
||||
/* If this current map is the one mentioned in the verneed entry
|
||||
and we have not found a weak entry, it is a bug. */
|
||||
if (symidx == STN_UNDEF && version != NULL && version->filename != NULL
|
||||
&& _dl_name_match_p (version->filename, map))
|
||||
return -1;
|
||||
}
|
||||
@@ -213,7 +220,7 @@ _dl_lookup_symbol (const char *undef_name, const ElfW(Sym) **ref,
|
||||
(*ref == NULL || ELFW(ST_BIND) ((*ref)->st_info) != STB_WEAK))
|
||||
/* We could find no value for a strong reference. */
|
||||
_dl_signal_error (0, reference_name,
|
||||
make_string ("undefined symbol: ", undef_name));
|
||||
make_string (undefined_msg, undef_name));
|
||||
|
||||
*ref = current_value.s;
|
||||
return current_value.a;
|
||||
@@ -283,19 +290,21 @@ _dl_lookup_versioned_symbol (const char *undef_name, const ElfW(Sym) **ref,
|
||||
if (res < 0)
|
||||
/* Oh, oh. The file named in the relocation entry does not
|
||||
contain the needed symbol. */
|
||||
_dl_signal_error (0, *reference_name ? reference_name : NULL,
|
||||
_dl_signal_error (0, reference_name,
|
||||
make_string ("symbol ", undef_name, ", version ",
|
||||
version->name,
|
||||
" not defined in file ",
|
||||
version->filename,
|
||||
" with link time reference"));
|
||||
" with link time reference",
|
||||
res == -2
|
||||
? " (no version symbols)" : ""));
|
||||
}
|
||||
|
||||
if (current_value.s == NULL &&
|
||||
(*ref == NULL || ELFW(ST_BIND) ((*ref)->st_info) != STB_WEAK))
|
||||
/* We could find no value for a strong reference. */
|
||||
_dl_signal_error (0, reference_name,
|
||||
make_string ("undefined symbol: ", undef_name,
|
||||
make_string (undefined_msg, undef_name,
|
||||
", version ", version->name ?: NULL));
|
||||
|
||||
*ref = current_value.s;
|
||||
@@ -332,6 +341,17 @@ _dl_lookup_versioned_symbol_skip (const char *undef_name,
|
||||
reference_name, version, skip_map, 0))
|
||||
break;
|
||||
|
||||
if (current_value.s == NULL &&
|
||||
(*ref == NULL || ELFW(ST_BIND) ((*ref)->st_info) != STB_WEAK))
|
||||
{
|
||||
/* We could find no value for a strong reference. */
|
||||
const size_t len = strlen (undef_name);
|
||||
char buf[sizeof undefined_msg + len];
|
||||
memcpy (buf, undefined_msg, sizeof undefined_msg - 1);
|
||||
memcpy (&buf[sizeof undefined_msg - 1], undef_name, len + 1);
|
||||
_dl_signal_error (0, reference_name, buf);
|
||||
}
|
||||
|
||||
*ref = current_value.s;
|
||||
return current_value.a;
|
||||
}
|
||||
|
||||
+12
-2
@@ -1,5 +1,5 @@
|
||||
/* Minimal replacements for basic facilities used in the dynamic linker.
|
||||
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995, 1996, 1997 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
|
||||
@@ -77,6 +77,17 @@ malloc (size_t n)
|
||||
return alloc_last_block;
|
||||
}
|
||||
|
||||
/* We use this function occasionally since the real implementation may
|
||||
be optimized when it can assume the memory it returns already is
|
||||
set to NUL. */
|
||||
void * weak_function
|
||||
calloc (size_t nmemb, size_t size)
|
||||
{
|
||||
size_t total = nmemb * size;
|
||||
void *result = malloc (total);
|
||||
return memset (result, '\0', total);
|
||||
}
|
||||
|
||||
/* This will rarely be called. */
|
||||
void weak_function
|
||||
free (void *ptr)
|
||||
@@ -115,7 +126,6 @@ longjmp (jmp_buf env, int val) { __longjmp (env[0].__jmpbuf, val); }
|
||||
char * weak_function
|
||||
__dcgettext (const char *domainname, const char *msgid, int category)
|
||||
{
|
||||
assert (domainname == _libc_intl_domainname);
|
||||
return (char *) msgid;
|
||||
}
|
||||
weak_alias (__dcgettext, dcgettext)
|
||||
|
||||
+122
@@ -0,0 +1,122 @@
|
||||
/* Miscellaneous support functions for dynamic linker
|
||||
Copyright (C) 1997 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 <assert.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#ifndef MAP_ANON
|
||||
/* This is the only dl-sysdep.c function that is actually needed at run-time
|
||||
by _dl_map_object. */
|
||||
|
||||
int
|
||||
_dl_sysdep_open_zero_fill (void)
|
||||
{
|
||||
return __open ("/dev/zero", O_RDONLY);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Read the whole contents of FILE into new mmap'd space with given
|
||||
protections. *SIZEP gets the size of the file. */
|
||||
|
||||
void *
|
||||
_dl_sysdep_read_whole_file (const char *file, size_t *sizep, int prot)
|
||||
{
|
||||
void *result;
|
||||
struct stat st;
|
||||
int fd = __open (file, O_RDONLY);
|
||||
if (fd < 0)
|
||||
return NULL;
|
||||
if (__fxstat (_STAT_VER, fd, &st) < 0)
|
||||
result = NULL;
|
||||
else
|
||||
{
|
||||
/* Map a copy of the file contents. */
|
||||
result = __mmap (0, st.st_size, prot,
|
||||
#ifdef MAP_COPY
|
||||
MAP_COPY
|
||||
#else
|
||||
MAP_PRIVATE
|
||||
#endif
|
||||
#ifdef MAP_FILE
|
||||
| MAP_FILE
|
||||
#endif
|
||||
, fd, 0);
|
||||
if (result == (void *) -1)
|
||||
result = NULL;
|
||||
else
|
||||
*sizep = st.st_size;
|
||||
}
|
||||
__close (fd);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
_dl_sysdep_fatal (const char *msg, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
va_start (ap, msg);
|
||||
do
|
||||
{
|
||||
size_t len = strlen (msg);
|
||||
__write (STDERR_FILENO, msg, len);
|
||||
msg = va_arg (ap, const char *);
|
||||
} while (msg);
|
||||
va_end (ap);
|
||||
|
||||
_exit (127);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
_dl_sysdep_error (const char *msg, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
va_start (ap, msg);
|
||||
do
|
||||
{
|
||||
size_t len = strlen (msg);
|
||||
__write (STDERR_FILENO, msg, len);
|
||||
msg = va_arg (ap, const char *);
|
||||
} while (msg);
|
||||
va_end (ap);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
_dl_sysdep_message (const char *msg, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
va_start (ap, msg);
|
||||
do
|
||||
{
|
||||
size_t len = strlen (msg);
|
||||
__write (STDOUT_FILENO, msg, len);
|
||||
msg = va_arg (ap, const char *);
|
||||
} while (msg);
|
||||
va_end (ap);
|
||||
}
|
||||
+1
-5
@@ -68,11 +68,7 @@ _dl_relocate_object (struct link_map *l, struct link_map *scope[], int lazy)
|
||||
ELF_DYNAMIC_RELOCATE (l, lazy);
|
||||
}
|
||||
|
||||
/* Set up the PLT so its unrelocated entries will jump to
|
||||
_dl_runtime_resolve (dl-runtime.c), which will relocate them. */
|
||||
elf_machine_runtime_setup (l, lazy);
|
||||
|
||||
/* Mark the object so we know ths work has been done. */
|
||||
/* Mark the object so we know this work has been done. */
|
||||
l->l_relocated = 1;
|
||||
|
||||
if (l->l_info[DT_TEXTREL])
|
||||
|
||||
+13
-56
@@ -17,71 +17,28 @@
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <assert.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
/* This file defines some things that for the dynamic linker are defined in
|
||||
rtld.c and dl-sysdep.c in ways appropriate to bootstrap dynamic linking. */
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
extern char *__progname;
|
||||
char **_dl_argv = &__progname; /* This is checked for some error messages. */
|
||||
|
||||
/* This defines the default search path for libraries.
|
||||
For the dynamic linker it is set by -rpath when linking. */
|
||||
const char *_dl_rpath = DEFAULT_RPATH;
|
||||
|
||||
#ifndef MAP_ANON
|
||||
/* This is the only dl-sysdep.c function that is actually needed at run-time
|
||||
by _dl_map_object. */
|
||||
|
||||
int
|
||||
_dl_sysdep_open_zero_fill (void)
|
||||
/* If nonzero print warnings about problematic situations. */
|
||||
int _dl_verbose;
|
||||
|
||||
|
||||
static void init_verbose (void) __attribute__ ((unused));
|
||||
|
||||
static void
|
||||
init_verbose (void)
|
||||
{
|
||||
return __open ("/dev/zero", O_RDONLY);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* This should never be called. */
|
||||
void
|
||||
_dl_sysdep_fatal (void)
|
||||
{
|
||||
assert (! "_dl_sysdep_fatal called");
|
||||
}
|
||||
|
||||
/* Read the whole contents of FILE into new mmap'd space with given
|
||||
protections. *SIZEP gets the size of the file. */
|
||||
|
||||
void *
|
||||
_dl_sysdep_read_whole_file (const char *file, size_t *sizep, int prot)
|
||||
{
|
||||
void *result;
|
||||
struct stat st;
|
||||
int fd = __open (file, O_RDONLY);
|
||||
if (fd < 0)
|
||||
return NULL;
|
||||
if (__fxstat (_STAT_VER, fd, &st) < 0)
|
||||
result = NULL;
|
||||
else
|
||||
{
|
||||
/* Map a copy of the file contents. */
|
||||
result = __mmap (0, st.st_size, prot,
|
||||
#ifdef MAP_COPY
|
||||
MAP_COPY
|
||||
#else
|
||||
MAP_PRIVATE
|
||||
#endif
|
||||
#ifdef MAP_FILE
|
||||
| MAP_FILE
|
||||
#endif
|
||||
, fd, 0);
|
||||
if (result == (void *) -1)
|
||||
result = NULL;
|
||||
else
|
||||
*sizep = st.st_size;
|
||||
}
|
||||
__close (fd);
|
||||
return result;
|
||||
_dl_verbose = *(getenv ("LD_WARN") ?: "") == '\0' ? 0 : 1;
|
||||
}
|
||||
text_set_element (__libc_subinit, init_verbose);
|
||||
|
||||
+16
-15
@@ -25,7 +25,7 @@
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "../stdio-common/_itoa.h"
|
||||
#include <stdio-common/_itoa.h>
|
||||
|
||||
|
||||
/* Set in rtld.c at startup. */
|
||||
@@ -53,13 +53,13 @@ extern char **_dl_argv;
|
||||
|
||||
|
||||
static inline struct link_map *
|
||||
find_needed (struct link_map *map, const char *name)
|
||||
find_needed (const char *name)
|
||||
{
|
||||
unsigned int n;
|
||||
|
||||
for (n = 0; n < map->l_nsearchlist; ++n)
|
||||
if (_dl_name_match_p (name, map->l_searchlist[n]))
|
||||
return map->l_searchlist[n];
|
||||
for (n = 0; n < _dl_loaded->l_nsearchlist; ++n)
|
||||
if (_dl_name_match_p (name, _dl_loaded->l_searchlist[n]))
|
||||
return _dl_loaded->l_searchlist[n];
|
||||
|
||||
/* Should never happen. */
|
||||
return NULL;
|
||||
@@ -72,10 +72,10 @@ match_symbol (const char *name, ElfW(Word) hash, const char *string,
|
||||
{
|
||||
const char *strtab = (const char *) (map->l_addr
|
||||
+ map->l_info[DT_STRTAB]->d_un.d_ptr);
|
||||
ElfW(Addr) def_offset = map->l_info[VERSTAG (DT_VERDEF)]->d_un.d_ptr;
|
||||
ElfW(Addr) def_offset;
|
||||
ElfW(Verdef) *def;
|
||||
|
||||
if (def_offset == 0)
|
||||
if (map->l_info[VERSTAG (DT_VERDEF)] == NULL)
|
||||
{
|
||||
/* The file has no symbol versioning. I.e., the dependent
|
||||
object was linked against another version of this file. We
|
||||
@@ -87,7 +87,10 @@ no version information available (required by ",
|
||||
return 0;
|
||||
}
|
||||
|
||||
def = (ElfW(Verdef) *) (map->l_addr + def_offset);
|
||||
def_offset = map->l_info[VERSTAG (DT_VERDEF)]->d_un.d_ptr;
|
||||
assert (def_offset != 0);
|
||||
|
||||
def = (ElfW(Verdef) *) ((char *) map->l_addr + def_offset);
|
||||
while (1)
|
||||
{
|
||||
/* Currently the version number of the definition entry is 1.
|
||||
@@ -179,7 +182,7 @@ _dl_check_map_versions (struct link_map *map, int verbose)
|
||||
while (1)
|
||||
{
|
||||
ElfW(Vernaux) *aux;
|
||||
struct link_map *needed = find_needed (map, strtab + ent->vn_file);
|
||||
struct link_map *needed = find_needed (strtab + ent->vn_file);
|
||||
|
||||
/* If NEEDED is NULL this means a dependency was not found
|
||||
and no stub entry was created. This should never happen. */
|
||||
@@ -199,7 +202,7 @@ _dl_check_map_versions (struct link_map *map, int verbose)
|
||||
aux->vna_flags & VER_FLG_WEAK);
|
||||
|
||||
/* Compare the version index. */
|
||||
if ((aux->vna_other & 0x7fff) > ndx_high)
|
||||
if ((unsigned int) (aux->vna_other & 0x7fff) > ndx_high)
|
||||
ndx_high = aux->vna_other & 0x7fff;
|
||||
|
||||
if (aux->vna_next == 0)
|
||||
@@ -227,10 +230,10 @@ _dl_check_map_versions (struct link_map *map, int verbose)
|
||||
if (def != NULL)
|
||||
{
|
||||
ElfW(Verdef) *ent;
|
||||
ent = (ElfW(Verdef) *) (map->l_addr + def->d_un.d_ptr);
|
||||
ent = (ElfW(Verdef) *) (map->l_addr + def->d_un.d_ptr);
|
||||
while (1)
|
||||
{
|
||||
if ((ent->vd_ndx & 0x7fff) > ndx_high)
|
||||
if ((unsigned int) (ent->vd_ndx & 0x7fff) > ndx_high)
|
||||
ndx_high = ent->vd_ndx & 0x7fff;
|
||||
|
||||
if (ent->vd_next == 0)
|
||||
@@ -247,9 +250,7 @@ _dl_check_map_versions (struct link_map *map, int verbose)
|
||||
which can be indexed by the version index in the VERSYM
|
||||
section. */
|
||||
map->l_versions = (struct r_found_version *)
|
||||
malloc ((ndx_high + 1) * sizeof (*map->l_versions));
|
||||
memset (map->l_versions, '\0',
|
||||
(ndx_high + 1) * sizeof (*map->l_versions));
|
||||
calloc (ndx_high + 1, sizeof (*map->l_versions));
|
||||
if (map->l_versions == NULL)
|
||||
{
|
||||
_dl_signal_error (ENOMEM, (*map->l_name ? map->l_name : _dl_argv[0]),
|
||||
|
||||
+1
-1
@@ -18,8 +18,8 @@
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifndef _DLFCN_H
|
||||
|
||||
#define _DLFCN_H 1
|
||||
|
||||
#include <features.h>
|
||||
|
||||
/* The MODE argument to `dlopen' contains one of the following: */
|
||||
|
||||
+1
-1
@@ -53,7 +53,7 @@ elf_dynamic_do_rel (struct link_map *map,
|
||||
const ElfW(Sym) *const symtab =
|
||||
(const ElfW(Sym) *) (map->l_addr + map->l_info[DT_SYMTAB]->d_un.d_ptr);
|
||||
|
||||
if (map->l_info[VERSYMIDX (DT_VERNEEDNUM)])
|
||||
if (map->l_info[VERSYMIDX (DT_VERSYM)])
|
||||
{
|
||||
const ElfW(Half) *const version =
|
||||
(const ElfW(Half) *) (map->l_addr
|
||||
|
||||
+11
-3
@@ -22,6 +22,11 @@
|
||||
#include <assert.h>
|
||||
|
||||
|
||||
/* Global read-only variable defined in rtld.c which is nonzero if we
|
||||
shall give more warning messages. */
|
||||
extern int _dl_verbose __attribute__ ((unused));
|
||||
|
||||
|
||||
/* Read the dynamic section at DYN and fill in INFO with indices DT_*. */
|
||||
|
||||
static inline void __attribute__ ((unused))
|
||||
@@ -97,8 +102,11 @@ elf_get_dynamic_info (ElfW(Dyn) *dyn,
|
||||
|
||||
/* This can't just be an inline function because GCC is too dumb
|
||||
to inline functions containing inlines themselves. */
|
||||
#define ELF_DYNAMIC_RELOCATE(map, lazy) \
|
||||
do { ELF_DYNAMIC_DO_REL ((map), (lazy)); \
|
||||
ELF_DYNAMIC_DO_RELA ((map), (lazy)); } while (0)
|
||||
#define ELF_DYNAMIC_RELOCATE(map, lazy) \
|
||||
do { \
|
||||
int edr_lazy = elf_machine_runtime_setup((map), (lazy)); \
|
||||
ELF_DYNAMIC_DO_REL ((map), edr_lazy); \
|
||||
ELF_DYNAMIC_DO_RELA ((map), edr_lazy); \
|
||||
} while (0)
|
||||
|
||||
#endif
|
||||
|
||||
@@ -19,46 +19,47 @@
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifndef _ELF_H
|
||||
|
||||
#define _ELF_H 1
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
/* Standard ELF types. Using __attribute__ mode ensures that GCC
|
||||
will choose the right number of bits for these types. */
|
||||
/* Standard ELF types. */
|
||||
|
||||
#include <inttypes.h>
|
||||
|
||||
/* Type for a 16-bit quantity. */
|
||||
typedef unsigned int Elf32_Half __attribute__ ((mode (HI)));
|
||||
typedef unsigned int Elf64_Half __attribute__ ((mode (HI)));
|
||||
typedef uint16_t Elf32_Half;
|
||||
typedef uint16_t Elf64_Half;
|
||||
|
||||
/* Types for signed and unsigned 32-bit quantities. */
|
||||
typedef unsigned int Elf32_Word __attribute__ ((mode (SI)));
|
||||
typedef int Elf32_Sword __attribute__ ((mode (SI)));
|
||||
typedef unsigned int Elf64_Word __attribute__ ((mode (SI)));
|
||||
typedef int Elf64_Sword __attribute__ ((mode (SI)));
|
||||
typedef uint32_t Elf32_Word;
|
||||
typedef int32_t Elf32_Sword;
|
||||
typedef uint32_t Elf64_Word;
|
||||
typedef int32_t Elf64_Sword;
|
||||
|
||||
/* Types for signed and unsigned 64-bit quantities. */
|
||||
typedef unsigned int Elf32_Xword __attribute__ ((mode (DI)));
|
||||
typedef int Elf32_Sxword __attribute__ ((mode (DI)));
|
||||
typedef unsigned int Elf64_Xword __attribute__ ((mode (DI)));
|
||||
typedef int Elf64_Sxword __attribute__ ((mode (DI)));
|
||||
typedef uint64_t Elf32_Xword;
|
||||
typedef int64_t Elf32_Sxword;
|
||||
typedef uint64_t Elf64_Xword;
|
||||
typedef int64_t Elf64_Sxword;
|
||||
|
||||
/* Type of addresses. */
|
||||
typedef unsigned int Elf32_Addr __attribute__ ((mode (SI)));
|
||||
typedef unsigned int Elf64_Addr __attribute__ ((mode (DI)));
|
||||
typedef uint32_t Elf32_Addr;
|
||||
typedef uint64_t Elf64_Addr;
|
||||
|
||||
/* Type of file offsets. */
|
||||
typedef unsigned int Elf32_Off __attribute__ ((mode (SI)));
|
||||
typedef unsigned int Elf64_Off __attribute__ ((mode (DI)));
|
||||
typedef uint32_t Elf32_Off;
|
||||
typedef uint64_t Elf64_Off;
|
||||
|
||||
/* Type for section indices, which are 16-bit quantities. */
|
||||
typedef unsigned int Elf32_Section __attribute__ ((mode (HI)));
|
||||
typedef unsigned int Elf64_Section __attribute__ ((mode (HI)));
|
||||
typedef uint16_t Elf32_Section;
|
||||
typedef uint16_t Elf64_Section;
|
||||
|
||||
/* Type of symbol indices. */
|
||||
typedef unsigned int Elf32_Symndx __attribute__ ((mode (SI)));
|
||||
typedef unsigned int Elf64_Symndx __attribute__ ((mode (DI)));
|
||||
typedef uint32_t Elf32_Symndx;
|
||||
typedef uint64_t Elf64_Symndx;
|
||||
|
||||
|
||||
/* The ELF file header. This appears at the start of every ELF file. */
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/* You don't really want to know what this hack is for.
|
||||
Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996, 1997 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
|
||||
@@ -128,7 +128,7 @@ _start (void)
|
||||
char *buf = NULL;
|
||||
size_t bufsz = 0;
|
||||
|
||||
while (__getline (&buf, &bufsz, stdin) > 0)
|
||||
while (__getdelim (&buf, &bufsz, '\n', stdin) > 0)
|
||||
{
|
||||
char *p = buf;
|
||||
eval (&p);
|
||||
|
||||
+23
-13
@@ -31,14 +31,16 @@ TEXTDOMAINDIR=@TEXTDOMAINDIR@
|
||||
RTLD=@RTLD@
|
||||
warn=
|
||||
bind_now=
|
||||
verbose=
|
||||
|
||||
while test $# -gt 0; do
|
||||
case "$1" in
|
||||
--v | --ve | --ver | --vers | --versi | --versio | --version)
|
||||
echo $"ldd (GNU libc) @VERSION@
|
||||
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
||||
--vers | --versi | --versio | --version)
|
||||
echo 'ldd (GNU libc) @VERSION@'
|
||||
echo $"Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
Written by Roland McGrath and Ulrich Drepper."
|
||||
exit 0 ;;
|
||||
--h | --he | --hel | --help)
|
||||
echo $"ldd [OPTION]... FILE...
|
||||
@@ -46,6 +48,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||
--version print version information and exit
|
||||
-d, --data-relocs process data relocations
|
||||
-r, --function-relocs process data and function relocations
|
||||
-v, --verbose print all information
|
||||
Report bugs using the \`glibcbug' script to <bugs@gnu.ai.mit.edu>."
|
||||
exit 0 ;;
|
||||
-d | --d | --da | --dat | --data | --data- | --data-r | --data-re | \
|
||||
@@ -58,10 +61,16 @@ Report bugs using the \`glibcbug' script to <bugs@gnu.ai.mit.edu>."
|
||||
warn=yes
|
||||
bind_now=yes
|
||||
shift ;;
|
||||
-v | --verb | --verbo | --verbos | --verbose)
|
||||
verbose=yes
|
||||
shift ;;
|
||||
--v | --ve | --ver)
|
||||
echo >&2 $"ldd: option \`$1' is ambiguous"
|
||||
exit 1 ;;
|
||||
--) # Stop option processing.
|
||||
shift; break ;;
|
||||
-*)
|
||||
echo >&2 $"ldd: unrecognized option" "\`$1'"
|
||||
echo >&2 'ldd:' $"unrecognized option" "\`$1'"
|
||||
echo >&2 $"Try \`ldd --help' for more information."
|
||||
exit 1 ;;
|
||||
*)
|
||||
@@ -70,9 +79,10 @@ Report bugs using the \`glibcbug' script to <bugs@gnu.ai.mit.edu>."
|
||||
done
|
||||
|
||||
add_env="LD_TRACE_LOADED_OBJECTS=1 LD_WARN=$warn LD_BIND_NOW=$bind_now"
|
||||
add_env="$add_env LD_VERBOSE=$verbose"
|
||||
case $# in
|
||||
0)
|
||||
echo >&2 $"ldd: missing file arguments"
|
||||
echo >&2 'ldd:' $"missing file arguments"
|
||||
echo >&2 $"Try \`ldd --help' for more information."
|
||||
exit 1 ;;
|
||||
1)
|
||||
@@ -86,7 +96,7 @@ case $# in
|
||||
exit 1
|
||||
elif test -r "$file"; then
|
||||
test -x "$file" ||
|
||||
echo $"ldd: warning: you do not have execution permission for" "\`$file'"
|
||||
echo 'ldd:' $"warning: you do not have execution permission for" "\`$file'"
|
||||
${RTLD} --verify "$file"
|
||||
case $? in
|
||||
0)
|
||||
@@ -100,12 +110,12 @@ case $# in
|
||||
eval $add_env exec \${RTLD} '"$file"' || exit 1
|
||||
;;
|
||||
*)
|
||||
echo $"ldd: ${RTLD} exited with unknown exit code ($?)" >&2
|
||||
echo 'ldd:' ${RTLD} $"exited with unknown exit code" "($?)" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
else
|
||||
echo $"ldd: error: you do not have read permission for" "\`$file'"
|
||||
echo 'ldd:' $"error: you do not have read permission for" "\`$file'"
|
||||
exit 1
|
||||
fi
|
||||
exit ;;
|
||||
@@ -121,8 +131,8 @@ case $# in
|
||||
echo "ldd: ${file}:" $"no such file"
|
||||
result=1
|
||||
elif test -r "$file"; then
|
||||
test -x "$file" || echo $"\
|
||||
ldd: warning: you do not have execution permission for" "\`$file'"
|
||||
test -x "$file" || echo 'ldd:' $"\
|
||||
warning: you do not have execution permission for" "\`$file'"
|
||||
${RTLD} --verify "$file"
|
||||
case $? in
|
||||
0)
|
||||
@@ -136,12 +146,12 @@ ldd: warning: you do not have execution permission for" "\`$file'"
|
||||
eval $add_env ${RTLD} '"$file"' || result=1
|
||||
;;
|
||||
*)
|
||||
echo $"ldd: ${RTLD} exited with unknown exit code ($?)" >&2
|
||||
echo 'ldd:' ${RTLD} $"exited with unknown exit code" "($?)" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
else
|
||||
echo $"ldd: error: you do not have read permission for" "\`$file'"
|
||||
echo 'ldd:' $"error: you do not have read permission for" "\`$file'"
|
||||
result=1
|
||||
fi
|
||||
done
|
||||
|
||||
+11
-2
@@ -30,11 +30,12 @@ bind_now=
|
||||
|
||||
while test $# -gt 0; do
|
||||
case "$1" in
|
||||
--v | --ve | --ver | --vers | --versi | --versio | --version)
|
||||
--vers | --versi | --versio | --version)
|
||||
echo 'ldd (GNU libc) @VERSION@
|
||||
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.'
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
Written by Roland McGrath and Ulrich Drepper.'
|
||||
exit 0 ;;
|
||||
--h | --he | --hel | --help)
|
||||
echo "ldd [OPTION]... FILE...
|
||||
@@ -42,6 +43,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.'
|
||||
--version print version information and exit
|
||||
-d, --data-relocs process data relocations
|
||||
-r, --function-relocs process data and function relocations
|
||||
-v, --verbose print all information
|
||||
Report bugs using the \`glibcbug' script to <bugs@gnu.ai.mit.edu>."
|
||||
exit 0 ;;
|
||||
-d | --d | --da | --dat | --data | --data- | --data-r | --data-re | \
|
||||
@@ -54,6 +56,12 @@ Report bugs using the \`glibcbug' script to <bugs@gnu.ai.mit.edu>."
|
||||
warn=yes
|
||||
bind_now=yes
|
||||
shift ;;
|
||||
-v | --verb | --verbo | --verbos | --verbose)
|
||||
verbose=yes
|
||||
shift ;;
|
||||
--v | --ve | --ver)
|
||||
echo >&2 "ldd: option \`$1' is ambiguous"
|
||||
exit 1 ;;
|
||||
--) # Stop option processing.
|
||||
shift; break ;;
|
||||
-*)
|
||||
@@ -67,6 +75,7 @@ Try \`ldd --help' for more information."
|
||||
done
|
||||
|
||||
add_env="LD_TRACE_LOADED_OBJECTS=1 LD_WARN=$warn LD_BIND_NOW=$bind_now"
|
||||
add_env="$add_env LD_VERBOSE=$verbose"
|
||||
case $# in
|
||||
0)
|
||||
echo >&2 "\
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
GLIBC_2.0 {
|
||||
global:
|
||||
dladdr; dlclose; dlerror; dlopen; dlsym; dlvsym;
|
||||
|
||||
local:
|
||||
*;
|
||||
};
|
||||
+4
-3
@@ -18,8 +18,8 @@
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifndef _LINK_H
|
||||
|
||||
#define _LINK_H 1
|
||||
|
||||
#include <features.h>
|
||||
|
||||
#define __need_size_t
|
||||
@@ -36,7 +36,8 @@ __BEGIN_DECLS
|
||||
#define ELFW(type) _ElfW (ELF, __ELF_NATIVE_CLASS, type)
|
||||
#define _ElfW(e,w,t) _ElfW_1 (e, w, _##t)
|
||||
#define _ElfW_1(e,w,t) e##w##t
|
||||
#include <elfclass.h> /* Defines __ELF_NATIVE_CLASS. */
|
||||
|
||||
#include <bits/elfclass.h> /* Defines __ELF_NATIVE_CLASS. */
|
||||
|
||||
/* Rendezvous structure used by the run-time dynamic linker to communicate
|
||||
details of shared object loading to the debugger. If the executable's
|
||||
@@ -255,7 +256,7 @@ extern void _dl_receive_error (receiver_fct fct, void (*operate) (void *),
|
||||
|
||||
/* Helper function for <dlfcn.h> functions. Runs the OPERATE function via
|
||||
_dl_catch_error. Returns zero for success, nonzero for failure; and
|
||||
arranges for `dlerror' to return the error details.
|
||||
arranges for `dlerror' to return the error details.
|
||||
ARGS is passed as argument to OPERATE. */
|
||||
extern int _dlerror_run (void (*operate) (void *), void *args);
|
||||
|
||||
|
||||
+158
-24
@@ -23,7 +23,7 @@
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/mman.h> /* Check if MAP_ANON is defined. */
|
||||
#include "../stdio-common/_itoa.h"
|
||||
#include <stdio-common/_itoa.h>
|
||||
#include <assert.h>
|
||||
#include "dynamic-link.h"
|
||||
|
||||
@@ -56,6 +56,7 @@ static void print_missing_version (int errcode, const char *objname,
|
||||
int _dl_argc;
|
||||
char **_dl_argv;
|
||||
const char *_dl_rpath;
|
||||
int _dl_verbose;
|
||||
|
||||
/* Set nonzero during loading and initialization of executable and
|
||||
libraries, cleared before the executable's entry point runs. This
|
||||
@@ -106,8 +107,6 @@ _dl_start (void *arg)
|
||||
|
||||
ELF_DYNAMIC_RELOCATE (&bootstrap_map, 0);
|
||||
|
||||
elf_machine_runtime_setup (&bootstrap_map, 0);
|
||||
|
||||
/* Now life is sane; we can call functions and access global data.
|
||||
Set up to use the operating system facilities, and find out from
|
||||
the operating system's program loader where to find the program
|
||||
@@ -189,6 +188,54 @@ version_check_doit (void *a)
|
||||
_exit (1);
|
||||
}
|
||||
|
||||
|
||||
static inline struct link_map *
|
||||
find_needed (const char *name)
|
||||
{
|
||||
unsigned int n;
|
||||
|
||||
for (n = 0; n < _dl_loaded->l_nsearchlist; ++n)
|
||||
if (_dl_name_match_p (name, _dl_loaded->l_searchlist[n]))
|
||||
return _dl_loaded->l_searchlist[n];
|
||||
|
||||
/* Should never happen. */
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static int
|
||||
match_version (const char *string, struct link_map *map)
|
||||
{
|
||||
const char *strtab = (const char *) (map->l_addr
|
||||
+ map->l_info[DT_STRTAB]->d_un.d_ptr);
|
||||
ElfW(Verdef) *def;
|
||||
|
||||
#define VERDEFTAG (DT_NUM + DT_PROCNUM + DT_VERSIONTAGIDX (DT_VERDEF))
|
||||
if (map->l_info[VERDEFTAG] == NULL)
|
||||
/* The file has no symbol versioning. */
|
||||
return 0;
|
||||
|
||||
def = (ElfW(Verdef) *) ((char *) map->l_addr
|
||||
+ map->l_info[VERDEFTAG]->d_un.d_ptr);
|
||||
while (1)
|
||||
{
|
||||
ElfW(Verdaux) *aux = (ElfW(Verdaux) *) ((char *) def + def->vd_aux);
|
||||
|
||||
/* Compare the version strings. */
|
||||
if (strcmp (string, strtab + aux->vda_name) == 0)
|
||||
/* Bingo! */
|
||||
return 1;
|
||||
|
||||
/* If no more definitions we failed to find what we want. */
|
||||
if (def->vd_next == 0)
|
||||
break;
|
||||
|
||||
/* Next definition. */
|
||||
def = (ElfW(Verdef) *) ((char *) def + def->vd_next);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
unsigned int _dl_skip_args; /* Nonzero if we were run directly. */
|
||||
|
||||
static void
|
||||
@@ -208,12 +255,13 @@ dl_main (const ElfW(Phdr) *phdr,
|
||||
int has_interp = 0;
|
||||
|
||||
mode = getenv ("LD_TRACE_LOADED_OBJECTS") != NULL ? trace : normal;
|
||||
_dl_verbose = *(getenv ("LD_WARN") ?: "") == '\0' ? 0 : 1;
|
||||
|
||||
/* LAZY is determined by the parameters --datadeps and --function-deps
|
||||
if we trace the binary. */
|
||||
/* LAZY is determined by the environment variable LD_WARN and
|
||||
LD_BIND_NOW if we trace the binary. */
|
||||
if (mode == trace)
|
||||
lazy = (*(getenv ("LD_WARN") ?: "") == '\0' ? -1
|
||||
: (*(getenv ("LD_BIND_NOW") ?: "") == '\0' ? 1 : 0));
|
||||
lazy = (_dl_verbose
|
||||
? (*(getenv ("LD_BIND_NOW") ?: "") == '\0' ? 1 : 0) : -1);
|
||||
else
|
||||
lazy = !__libc_enable_secure && *(getenv ("LD_BIND_NOW") ?: "") == '\0';
|
||||
|
||||
@@ -576,27 +624,113 @@ of this helper program; chances are you did not intend to run this program.\n",
|
||||
*--bp = '0';
|
||||
_dl_sysdep_message (" in object at 0x", bp, "\n", NULL);
|
||||
}
|
||||
else if (lazy >= 0)
|
||||
else
|
||||
{
|
||||
/* We have to do symbol dependency testing. */
|
||||
struct relocate_args args;
|
||||
struct link_map *l;
|
||||
|
||||
args.lazy = lazy;
|
||||
|
||||
l = _dl_loaded;
|
||||
while (l->l_next)
|
||||
l = l->l_next;
|
||||
do
|
||||
if (lazy >= 0)
|
||||
{
|
||||
if (l != &_dl_rtld_map && l->l_opencount > 0)
|
||||
/* We have to do symbol dependency testing. */
|
||||
struct relocate_args args;
|
||||
struct link_map *l;
|
||||
|
||||
args.lazy = lazy;
|
||||
|
||||
l = _dl_loaded;
|
||||
while (l->l_next)
|
||||
l = l->l_next;
|
||||
do
|
||||
{
|
||||
args.l = l;
|
||||
_dl_receive_error (print_unresolved, relocate_doit, &args);
|
||||
*_dl_global_scope_end = NULL;
|
||||
if (l != &_dl_rtld_map && l->l_opencount > 0)
|
||||
{
|
||||
args.l = l;
|
||||
_dl_receive_error (print_unresolved, relocate_doit,
|
||||
&args);
|
||||
*_dl_global_scope_end = NULL;
|
||||
}
|
||||
l = l->l_prev;
|
||||
} while (l);
|
||||
}
|
||||
|
||||
#define VERNEEDTAG (DT_NUM + DT_PROCNUM + DT_VERSIONTAGIDX (DT_VERNEED))
|
||||
if (*(getenv ("LD_VERBOSE") ?: "") != '\0')
|
||||
{
|
||||
/* Print more information. This means here, print information
|
||||
about the versions needed. */
|
||||
int first = 1;
|
||||
struct link_map *map = _dl_loaded;
|
||||
|
||||
for (map = _dl_loaded; map != NULL; map = map->l_next)
|
||||
{
|
||||
const char *strtab =
|
||||
(const char *) (map->l_addr
|
||||
+ map->l_info[DT_STRTAB]->d_un.d_ptr);
|
||||
ElfW(Dyn) *dyn = map->l_info[VERNEEDTAG];
|
||||
|
||||
if (dyn != NULL)
|
||||
{
|
||||
ElfW(Verneed) *ent =
|
||||
(ElfW(Verneed) *) (map->l_addr + dyn->d_un.d_ptr);
|
||||
|
||||
if (first)
|
||||
{
|
||||
_dl_sysdep_message ("\n\tVersion information:\n",
|
||||
NULL);
|
||||
first = 0;
|
||||
}
|
||||
|
||||
_dl_sysdep_message ("\t", (map->l_name[0]
|
||||
? map->l_name
|
||||
: _dl_argv[0]), ":\n",
|
||||
NULL);
|
||||
|
||||
while (1)
|
||||
{
|
||||
ElfW(Vernaux) *aux;
|
||||
struct link_map *needed;
|
||||
|
||||
needed = find_needed (strtab + ent->vn_file);
|
||||
aux = (ElfW(Vernaux) *) ((char *) ent + ent->vn_aux);
|
||||
|
||||
while (1)
|
||||
{
|
||||
const char *fname = NULL;
|
||||
|
||||
_dl_sysdep_message ("\t\t",
|
||||
strtab + ent->vn_file,
|
||||
" (", strtab + aux->vna_name,
|
||||
") ",
|
||||
(aux->vna_flags
|
||||
& VER_FLG_WEAK
|
||||
? "[WEAK] " : ""),
|
||||
"=> ", NULL);
|
||||
|
||||
if (needed != NULL
|
||||
&& match_version (strtab + aux->vna_name,
|
||||
needed))
|
||||
fname = needed->l_name;
|
||||
|
||||
_dl_sysdep_message (fname ?: "not found", "\n",
|
||||
NULL);
|
||||
|
||||
if (aux->vna_next == 0)
|
||||
/* No more symbols. */
|
||||
break;
|
||||
|
||||
/* Next symbol. */
|
||||
aux = (ElfW(Vernaux) *) ((char *) aux
|
||||
+ aux->vna_next);
|
||||
}
|
||||
|
||||
if (ent->vn_next == 0)
|
||||
/* No more dependencies. */
|
||||
break;
|
||||
|
||||
/* Next dependency. */
|
||||
ent = (ElfW(Verneed) *) ((char *) ent
|
||||
+ ent->vn_next);
|
||||
}
|
||||
}
|
||||
}
|
||||
l = l->l_prev;
|
||||
} while (l);
|
||||
}
|
||||
}
|
||||
|
||||
_exit (0);
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ endif
|
||||
# The linked shared library is never a dependent of lib-noranlib,
|
||||
# because linking it will depend on libc.so already being built.
|
||||
ifneq (,$(filter .so,$(object-suffixes-$(lib))))
|
||||
others: $(objpfx)$(lib).so
|
||||
others: $(objpfx)$(lib).so$($(lib).so-version)
|
||||
endif
|
||||
|
||||
|
||||
|
||||
@@ -319,5 +319,8 @@ _mcleanup ()
|
||||
/* write basic-block execution counts: */
|
||||
write_bb_counts (fd);
|
||||
|
||||
/* free the memory. */
|
||||
free (_gmonparam.tos);
|
||||
|
||||
__close (fd);
|
||||
}
|
||||
|
||||
+3
-3
@@ -33,9 +33,9 @@
|
||||
* @(#)gmon.h 8.2 (Berkeley) 1/4/94
|
||||
*/
|
||||
|
||||
#ifndef _SYS_GMON_H_
|
||||
#ifndef _SYS_GMON_H
|
||||
#define _SYS_GMON_H 1
|
||||
|
||||
#define _SYS_GMON_H_ 1
|
||||
#include <features.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
@@ -176,4 +176,4 @@ void _mcleanup __P ((void));
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* !_SYS_GMON_H_ */
|
||||
#endif /* sys/gmon.h */
|
||||
|
||||
+2
-2
@@ -26,8 +26,8 @@
|
||||
identifying the type of records, followed by records specific data. */
|
||||
|
||||
#ifndef _SYS_GMON_OUT_H
|
||||
|
||||
#define _SYS_GMON_OUT_H 1
|
||||
|
||||
#include <features.h>
|
||||
|
||||
#define GMON_MAGIC "gmon" /* magic cookie */
|
||||
@@ -74,4 +74,4 @@ struct gmon_cg_arc_record
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* _SYS_GMON_OUT_H */
|
||||
#endif /* sys/gmon_out.h */
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@
|
||||
|
||||
#include <errno.h>
|
||||
#include <grp.h>
|
||||
#include <libc-lock.h>
|
||||
#include <bits/libc-lock.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
|
||||
@@ -21,13 +21,13 @@
|
||||
*/
|
||||
|
||||
#ifndef _GRP_H
|
||||
|
||||
#define _GRP_H 1
|
||||
|
||||
#include <features.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
#include <gnu/types.h>
|
||||
#include <bits/types.h>
|
||||
|
||||
#define __need_size_t
|
||||
#include <stddef.h>
|
||||
|
||||
+1
-1
@@ -73,7 +73,7 @@ include ../Rules
|
||||
# from $(subdirs), and this rule arranges for the headers in question
|
||||
# to get installed.
|
||||
sunrpc-headers = netdb.h pmap_prot.h xdr.h types.h auth.h \
|
||||
rpc_msg.h auth_unix.h
|
||||
rpc_msg.h auth_unix.h clnt.h
|
||||
installed-sunrpc-headers = $(addprefix $(inst_includedir)/rpc/, \
|
||||
$(sunrpc-headers))
|
||||
install-headers-nosubdir: $(installed-sunrpc-headers)
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <ansidecl.h>
|
||||
#include <hurd.h>
|
||||
#include <hurd/term.h>
|
||||
#include <hurd/fd.h>
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@
|
||||
|
||||
#define __need___va_list
|
||||
#include <stdarg.h>
|
||||
#include <ioctls.h>
|
||||
#include <bits/ioctls.h>
|
||||
|
||||
|
||||
/* Type of handler function, called like ioctl to do its entire job. */
|
||||
|
||||
+115
-8
@@ -37,17 +37,124 @@ _S_msg_add_auth (mach_port_t me,
|
||||
{
|
||||
error_t err;
|
||||
auth_t newauth;
|
||||
uid_t *genuids, *gengids, *auxuids, *auxgids;
|
||||
mach_msg_type_number_t ngenuids, ngengids, nauxuids, nauxgids;
|
||||
uid_t *newgenuids, *newgengids, *newauxuids, *newauxgids;
|
||||
mach_msg_type_number_t nnewgenuids, nnewgengids, nnewauxuids, nnewauxgids;
|
||||
|
||||
if (err = __USEPORT (AUTH,
|
||||
__auth_makeauth (port,
|
||||
&addauth, MACH_MSG_TYPE_MOVE_SEND, 1,
|
||||
NULL, 0,
|
||||
NULL, 0,
|
||||
NULL, 0,
|
||||
NULL, 0,
|
||||
&newauth)))
|
||||
/* Create a list of ids and store it in NEWLISTP, length NEWLISTLEN.
|
||||
Keep all the ids in EXIST (len NEXIST), adding in those from NEW
|
||||
(len NNEW) which are not already there. */
|
||||
error_t make_list (uid_t **newlistp, mach_msg_type_number_t *newlistlen,
|
||||
uid_t *exist, mach_msg_type_number_t nexist,
|
||||
uid_t *new, mach_msg_type_number_t nnew)
|
||||
{
|
||||
error_t urp;
|
||||
int i, j, k;
|
||||
vm_size_t offset;
|
||||
|
||||
urp = vm_allocate (mach_task_self (), (vm_address_t *) newlistp,
|
||||
nexist + nnew * sizeof (uid_t), 1);
|
||||
if (urp)
|
||||
return urp;
|
||||
|
||||
j = 0;
|
||||
for (i = 0; i < nexist; i++)
|
||||
(*newlistp)[j++] = exist[i];
|
||||
|
||||
for (i = 0; i < nnew; i++)
|
||||
{
|
||||
for (k = 0; k < nexist; k++)
|
||||
if (exist[k] == new[i])
|
||||
break;
|
||||
if (k < nexist)
|
||||
continue;
|
||||
|
||||
(*newlistp)[j++] = new[i];
|
||||
}
|
||||
|
||||
offset = (round_page (nexist + nnew * sizeof (uid_t))
|
||||
- round_page (j * sizeof (uid_t)));
|
||||
if (offset)
|
||||
vm_deallocate (mach_task_self (),
|
||||
(vm_address_t) (*newlistp
|
||||
+ (nexist + nnew * sizeof (uid_t))),
|
||||
offset);
|
||||
*newlistlen = j;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Find out what ids ADDAUTH refers to */
|
||||
|
||||
genuids = gengids = auxuids = auxgids = 0;
|
||||
ngenuids = ngengids = nauxuids = nauxgids = 0;
|
||||
err = __auth_getids (addauth,
|
||||
&genuids, &ngenuids,
|
||||
&auxuids, &nauxuids,
|
||||
&gengids, &ngengids,
|
||||
&auxgids, &nauxgids);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
/* OR in these ids to what we already have, creating a new list. */
|
||||
|
||||
HURD_CRITICAL_BEGIN;
|
||||
__mutex_lock (&_hurd_id.lock);
|
||||
_hurd_check_ids ();
|
||||
|
||||
#define MAKE(genaux,uidgid) \
|
||||
make_list (&new ## genaux ## uidgid ## s, \
|
||||
&nnew ## genaux ## uidgid ## s, \
|
||||
_hurd_id.genaux.uidgid ## s, \
|
||||
_hurd_id.genaux.n ## uidgid ## s, \
|
||||
genaux ## uidgid ## s, \
|
||||
n ## genaux ## uidgid ## s)
|
||||
|
||||
err = MAKE (gen, uid);
|
||||
if (!err)
|
||||
MAKE (aux, uid);
|
||||
if (!err)
|
||||
MAKE (gen, gid);
|
||||
if (!err)
|
||||
MAKE (aux, gid);
|
||||
#undef MAKE
|
||||
|
||||
__mutex_unlock (&_hurd_id.lock);
|
||||
HURD_CRITICAL_END;
|
||||
|
||||
|
||||
/* Create the new auth port */
|
||||
|
||||
if (!err)
|
||||
err = __USEPORT (AUTH,
|
||||
__auth_makeauth (port,
|
||||
&addauth, MACH_MSG_TYPE_MOVE_SEND, 1,
|
||||
newgenuids, nnewgenuids,
|
||||
newauxuids, nnewauxuids,
|
||||
newgengids, nnewgengids,
|
||||
newauxgids, nnewauxgids,
|
||||
&newauth));
|
||||
|
||||
#define freeup(array, len) \
|
||||
if (array) \
|
||||
vm_deallocate (mach_task_self (), (vm_address_t) array, \
|
||||
len * sizeof (uid_t));
|
||||
|
||||
freeup (genuids, ngenuids);
|
||||
freeup (auxuids, nauxuids);
|
||||
freeup (gengids, ngengids);
|
||||
freeup (auxgids, nauxgids);
|
||||
freeup (newgenuids, nnewgenuids);
|
||||
freeup (newauxuids, nnewauxuids);
|
||||
freeup (newgengids, nnewgengids);
|
||||
freeup (newauxgids, nnewauxgids);
|
||||
#undef freeup
|
||||
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
/* And install it. */
|
||||
|
||||
err = __setauth (newauth);
|
||||
__mach_port_deallocate (__mach_task_self (), newauth);
|
||||
if (err)
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@
|
||||
#include <assert.h>
|
||||
|
||||
jmp_buf _hurdsig_fault_env;
|
||||
struct hurd_signal_preemptor _hurdsig_fault_preemptor;
|
||||
struct hurd_signal_preemptor _hurdsig_fault_preemptor = {0};
|
||||
|
||||
/* XXX temporary to deal with spelling fix */
|
||||
weak_alias (_hurdsig_fault_preemptor, _hurdsig_fault_preempter)
|
||||
|
||||
+2
-2
@@ -426,7 +426,7 @@ abort_all_rpcs (int signo, struct machine_thread_all_state *state, int live)
|
||||
}
|
||||
}
|
||||
|
||||
struct hurd_signal_preemptor *_hurdsig_preemptors;
|
||||
struct hurd_signal_preemptor *_hurdsig_preemptors = 0;
|
||||
sigset_t _hurdsig_preempted_set;
|
||||
|
||||
/* XXX temporary to deal with spelling fix */
|
||||
@@ -1194,7 +1194,7 @@ _hurdsig_init (void)
|
||||
err = __thread_create (__mach_task_self (), &_hurd_msgport_thread);
|
||||
assert_perror (err);
|
||||
|
||||
stacksize = __vm_page_size * 4; /* Small stack for signal thread. */
|
||||
stacksize = __vm_page_size * 8; /* Small stack for signal thread. */
|
||||
err = __mach_setup_thread (__mach_task_self (), _hurd_msgport_thread,
|
||||
_hurd_msgport_receive,
|
||||
(vm_address_t *) &__hurd_sigthread_stack_base,
|
||||
|
||||
+2
-2
@@ -132,8 +132,8 @@ _hurd_intr_rpc_mach_msg (mach_msg_header_t *msg,
|
||||
int i;
|
||||
} check =
|
||||
{ t: {
|
||||
MACH_MSG_TYPE_INTEGER_32,
|
||||
32,
|
||||
MACH_MSG_TYPE_INTEGER_T,
|
||||
MACH_MSG_TYPE_INTEGER_T,
|
||||
1,
|
||||
TRUE,
|
||||
FALSE,
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user