mirror of
git://sourceware.org/git/glibc.git
synced 2026-09-08 23:58:31 +08:00
Compare commits
28
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7816fbdf7a | ||
|
|
845dcb57b1 | ||
|
|
daf2bb515b | ||
|
|
8a080f40d8 | ||
|
|
8de8ca1b94 | ||
|
|
c55698973e | ||
|
|
6bbcfbfedb | ||
|
|
ec4b0518a3 | ||
|
|
d66b7b41b8 | ||
|
|
bcc7b35158 | ||
|
|
cd136c56eb | ||
|
|
757dc096f3 | ||
|
|
39a0b05667 | ||
|
|
a8ed817809 | ||
|
|
20e77fa06c | ||
|
|
fafaa44ef0 | ||
|
|
ae2ddc98c1 | ||
|
|
f33b97f913 | ||
|
|
d0045e79eb | ||
|
|
f0f1bf8536 | ||
|
|
158ff48e34 | ||
|
|
da74e90200 | ||
|
|
569c558c88 | ||
|
|
c2bb8cabc5 | ||
|
|
8ca5c11bdf | ||
|
|
499e7464ed | ||
|
|
edf5b2d716 | ||
|
|
474be527c8 |
@@ -49,6 +49,12 @@ please let me know.
|
||||
|
||||
[Q13] ``How do I configure GNU libc so that the essential libraries
|
||||
like libc.so go into /lib and the other into /usr/lib?''
|
||||
|
||||
[Q14] ``When linking with the new libc I get unresolved symbols
|
||||
`crypt' and `setkey'. Why aren't these functions in the
|
||||
libc anymore?''
|
||||
|
||||
[Q15] ``What are these `add-ons'?''
|
||||
|
||||
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
|
||||
[Q1] ``What systems does the GNU C Library run on?''
|
||||
@@ -368,6 +374,56 @@ the second line the directory for file which are by tradition placed
|
||||
in a directory named /etc.
|
||||
|
||||
|
||||
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
|
||||
[Q14] ``When linking with the new libc I get unresolved symbols
|
||||
`crypt' and `setkey'. Why aren't these functions in the
|
||||
libc anymore?''
|
||||
|
||||
[A14] {UD} Remember the US restrictions of exporting cryptographic
|
||||
programs and source code. Until this law gets abolished we cannot
|
||||
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
|
||||
archive site outside the USA. The README explains how to install the
|
||||
sources.
|
||||
|
||||
If you already have the crypt code on your system the reason for the
|
||||
failure is probably that you failed to link with -lcrypt. The crypto
|
||||
functions are in a separate library to make it possible to export GNU
|
||||
libc binaries from the US.
|
||||
|
||||
|
||||
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
|
||||
[Q15] ``What are these `add-ons'?''
|
||||
|
||||
[A15] {UD} To avoid complications with external or external source
|
||||
code some optional parts of the libc are distributed as separate
|
||||
packages (e.g., the crypt package, see Q14).
|
||||
|
||||
To ease the use as part of GNU libc the installer just has to unpack
|
||||
the package and tell the configuration script about these additional
|
||||
subdirectories using the --enable-add-ons option. When you add the
|
||||
crypt add-on you just have to use
|
||||
|
||||
configure --enable-add-ons=crypt,XXX ...
|
||||
|
||||
where XXX are possible other add-ons and ... means the rest of the
|
||||
normal option list.
|
||||
|
||||
You can use add-ons also to overwrite some files in glibc. The add-on
|
||||
system dependent subdirs are search first. It is also possible to add
|
||||
banner files (use a file named `Banner') or create shared libraries.
|
||||
|
||||
Using add-ons has the big advantage that the makefiles of the GNU libc
|
||||
can be used. Only some few stub rules must be written to get
|
||||
everything running. Even handling of architecture dependent
|
||||
compilation is provided. The GNU libc's sysdeps/ directory shows how
|
||||
to use this feature.
|
||||
|
||||
|
||||
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
|
||||
|
||||
Answers were given by:
|
||||
|
||||
@@ -157,7 +157,7 @@ build the GNU C library:
|
||||
recommend you port GNU `make' instead. *Really.* We recommend
|
||||
version GNU `make' version 3.75 or later.
|
||||
|
||||
* GCC 2.7.2
|
||||
* GCC 2.7.2.1
|
||||
|
||||
On most platforms, the GNU C library can only be compiled with the
|
||||
GNU C compiler. We recommend GCC version 2.7.2 or later; earlier
|
||||
@@ -177,14 +177,19 @@ Supported Configurations
|
||||
The GNU C Library currently supports configurations that match the
|
||||
following patterns:
|
||||
|
||||
alpha-dec-osf1
|
||||
alpha-ANYTHING-linux
|
||||
alpha-ANYTHING-linuxecoff
|
||||
iX86-ANYTHING-bsd4.3
|
||||
iX86-ANYTHING-gnu
|
||||
iX86-ANYTHING-linux
|
||||
m68k-ANYTHING-linux
|
||||
|
||||
Former versions of this library used to support the following
|
||||
configurations but the current status is unknown:
|
||||
|
||||
alpha-dec-osf1
|
||||
iX86-ANYTHING-bsd4.3
|
||||
iX86-ANYTHING-isc2.2
|
||||
iX86-ANYTHING-isc3.N
|
||||
iX86-ANYTHING-linux
|
||||
iX86-ANYTHING-sco3.2
|
||||
iX86-ANYTHING-sco3.2v4
|
||||
iX86-ANYTHING-sysv
|
||||
@@ -911,4 +916,3 @@ parts of the library were contributed or worked on by other people.
|
||||
or `Software.Distribution@CS.CMU.EDU' any improvements or
|
||||
extensions that they make and grant Carnegie Mellon the
|
||||
rights to redistribute these changes.
|
||||
|
||||
|
||||
@@ -40,6 +40,9 @@ else
|
||||
sysdep_dirs := $(addprefix $(..),$(sysdep_dirs))
|
||||
endif
|
||||
|
||||
# Don't distribute add-on subdirs.
|
||||
subdirs := $(filter-out $(add-ons),$(subdirs))
|
||||
|
||||
# Make sure both stdio and libio get in, whichever is in use.
|
||||
subdirs += stdio libio
|
||||
|
||||
@@ -110,8 +113,7 @@ sources := $(filter-out $(addsuffix .c,$(basename $(.S.s))),$(sources)) $(.S.s)
|
||||
$(addsuffix .c,$(sysdep_routines)) \
|
||||
$(+subdir-nodist)
|
||||
#foo:=$(shell echo '+out=$(+out)' >&2; echo foofoo >&2)
|
||||
+tsrcs := $(filter-out $(+out) $(addprefix %/,$(+out)), \
|
||||
$(sources) $(all-headers) $(distribute)) \
|
||||
+tsrcs := $(filter-out $(+out), $(sources) $(all-headers) $(distribute)) \
|
||||
$(+sysdeps)
|
||||
foo:=$(shell echo 'made +tsrcs=$(+tsrcs)'>&2)
|
||||
foo:=$(shell echo generated='$(generated)' >&2)
|
||||
@@ -129,8 +131,8 @@ endif
|
||||
$(..)glibc-$(version):
|
||||
ln -s . $@
|
||||
|
||||
+tsrcs := $(+tsrcs) \
|
||||
TAGS
|
||||
#+tsrcs := $(+tsrcs) \
|
||||
# TAGS
|
||||
.PHONY: TAGS
|
||||
TAGS: $(..)MakeTAGS
|
||||
$(MAKE) -f $< $@ -o subdir_TAGS
|
||||
@@ -195,7 +197,7 @@ $(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) &
|
||||
-rm -fr /tmp/$(tardir) dist.tar &
|
||||
|
||||
%.Z: %
|
||||
compress -c $< > $@
|
||||
|
||||
@@ -166,9 +166,12 @@ $P/subdirs.pot: $(subdirs:%=$P/%.pot)
|
||||
include $(common-objpfx)version.mk
|
||||
|
||||
# Combine all the messages into the final sorted template translation file.
|
||||
$P/SYS_libc.pot: $(all-pot)
|
||||
# The following code requires GNU date.
|
||||
$P/libc.pot: $(all-pot)
|
||||
@rm -f $@.new
|
||||
sed -e 's/VERSION/$(version)/' -e "s/DATE/`date +'%Y-%m-%d %k:%M'`/" \
|
||||
disp='set `date -R`; echo $$6'; \
|
||||
sed -e 's/VERSION/$(version)/' \
|
||||
-e "s/DATE/`date +'%Y-%m-%d %I:%M'$$disp/" \
|
||||
po/header.pot > $@.new
|
||||
$(XGETTEXT) -d - --omit-header -n -s $^ >> $@.new
|
||||
mv -f $@.new $@
|
||||
|
||||
+18
-11
@@ -303,7 +303,8 @@ ifndef +link
|
||||
+link = $(CC) -nostdlib -nostartfiles -o $@ \
|
||||
$(sysdep-LDFLAGS) $(config-LDFLAGS) $(LDFLAGS) \
|
||||
$(addprefix $(csu-objpfx),start.o) $(+preinit) \
|
||||
$(filter-out $(common-objpfx)libc%,$^) \
|
||||
$(filter-out $(addprefix $(csu-objpfx),start.o) $(+preinit) \
|
||||
$(link-extra-libs) $(common-objpfx)libc% $(+postinit),$^) \
|
||||
$(link-extra-libs) $(link-libc) $(+postinit)
|
||||
endif
|
||||
ifndef config-LDFLAGS
|
||||
@@ -523,17 +524,23 @@ ifeq (yes, $(build-shared))
|
||||
# version numbers to use when we install shared objects on this system.
|
||||
-include $(common-objpfx)soversions.mk
|
||||
$(common-objpfx)soversions.mk: $(..)shlib-versions $(..)Makeconfig \
|
||||
$(wildcard $(patsubst %, $(..)%/shlib-versions,\
|
||||
$(add-ons))) \
|
||||
$(common-objpfx)config.make
|
||||
sed 's/#.*$$//' $< | while read conf versions; do \
|
||||
test -n "$$versions" || continue; \
|
||||
case '$(config-machine)-$(config-vendor)-$(config-os)' in $$conf)\
|
||||
for v in $$versions; do \
|
||||
lib=`echo $$v | sed 's/=.*$$//'`; \
|
||||
if eval "test -z \"\$$vers_lib$$lib\""; then \
|
||||
eval vers_lib$${lib}=yes; \
|
||||
echo $$v | sed "s/^.*=/$$lib.so-version=./"; \
|
||||
fi; \
|
||||
done ;; esac; done > $@T; exit 0
|
||||
(file="$(wildcard $(patsubst %,$(..)%/shlib-versions,$(add-ons))) \
|
||||
$(..)shlib-versions"; \
|
||||
for f in $$file; do \
|
||||
sed 's/#.*$$//' $$f | while read conf versions; do \
|
||||
test -n "$$versions" || continue; \
|
||||
case '$(config-machine)-$(config-vendor)-$(config-os)' in $$conf)\
|
||||
for v in $$versions; do \
|
||||
lib=`echo $$v | sed 's/=.*$$//'`; \
|
||||
if eval "test -z \"\$$vers_lib$$lib\""; then \
|
||||
eval vers_lib$${lib}=yes; \
|
||||
echo $$v | sed "s/^.*=/$$lib.so-version=./"; \
|
||||
fi; \
|
||||
done ;; esac; done; \
|
||||
done;) > $@T; exit 0
|
||||
mv -f $@T $@
|
||||
|
||||
# Get $(version) defined with the release version number.
|
||||
|
||||
@@ -26,7 +26,7 @@ endif
|
||||
|
||||
# This is the default target; it makes everything except the tests.
|
||||
.PHONY: all
|
||||
all: lib extra_solibs others
|
||||
all: lib others
|
||||
|
||||
define autoconf-it
|
||||
@-rm -f $@.new
|
||||
@@ -73,9 +73,9 @@ subdirs := $(filter mach,$(subdirs)) $(filter hurd,$(subdirs)) \
|
||||
|
||||
|
||||
# These are the targets that are made by making them in each subdirectory.
|
||||
+subdir_targets := subdir_lib extra_solibs objects objs others \
|
||||
subdir_mostlyclean subdir_clean subdir_distclean \
|
||||
subdir_realclean tests subdir_lint.out \
|
||||
+subdir_targets := subdir_lib objects objs others subdir_mostlyclean \
|
||||
subdir_clean subdir_distclean subdir_realclean \
|
||||
tests subdir_lint.out \
|
||||
subdir_distinfo \
|
||||
subdir_echo-headers subdir_echo-distinfo \
|
||||
subdir_install \
|
||||
@@ -84,6 +84,7 @@ subdirs := $(filter mach,$(subdirs)) $(filter hurd,$(subdirs)) \
|
||||
headers := errno.h sys/errno.h errnos.h limits.h values.h \
|
||||
features.h gnu-versions.h libc-lock.h
|
||||
aux = sysdep $(libc-init) version
|
||||
before-compile = $(objpfx)version-info.h
|
||||
|
||||
echo-headers: subdir_echo-headers
|
||||
|
||||
@@ -129,6 +130,23 @@ $(objpfx)sysd-dirs: $(+sysdir_pfx)config.make
|
||||
echo endef) > $@-tmp
|
||||
mv -f $@-tmp $@
|
||||
|
||||
$(objpfx)version-info.h: $(..)Makefile $(+sysdir_pfx)config.make
|
||||
(first=yes; \
|
||||
for dir in $(subdirs); do \
|
||||
if [ -r $$dir/Banner ]; then \
|
||||
if [ $$first = yes ]; then \
|
||||
echo "\"Available extensions:"; \
|
||||
first=no; \
|
||||
fi; \
|
||||
sed -e '/^#/d' -e 's/^[[:space:]]*/ /' $$dir/Banner; \
|
||||
fi; \
|
||||
done; \
|
||||
[ $$first = yes ] || echo "\"") > $@-tmp
|
||||
mv -f $@-tmp $@
|
||||
|
||||
version.c-objects := $(addprefix $(objpfx)version,$(object-suffixes))
|
||||
$(version.c-objects): $(objpfx)version-info.h
|
||||
|
||||
# Makerules creates a file `stub-$(subdir)' for each subdirectory, which
|
||||
# contains `#define __stub_FUNCTION' for each function which is a stub.
|
||||
# Here we paste all of these together into <stubs.h>.
|
||||
@@ -234,12 +252,12 @@ distribute := README INSTALL FAQ NOTES NEWS PROJECTS \
|
||||
ansidecl.h mkinstalldirs move-if-change install-sh \
|
||||
configure configure.in aclocal.m4 config.sub config.guess\
|
||||
config.h.in config.make.in config-name.in Makefile.in \
|
||||
autolock.sh munch-tmpl.c munch.awk \
|
||||
autolock.sh munch-tmpl.c munch.awk interp.c \
|
||||
sysdep.h set-hooks.h libc-symbols.h version.h shlib-versions \
|
||||
rpm/Makefile rpm/template rpm/rpmrc
|
||||
|
||||
distribute := $(strip $(distribute))
|
||||
generated := $(generated) stubs.h
|
||||
generated := $(generated) stubs.h version-info.h
|
||||
|
||||
README: README.template version.c ; # Make-dist should update README.
|
||||
|
||||
|
||||
@@ -316,6 +316,15 @@ else
|
||||
no-whole-archive =
|
||||
endif
|
||||
|
||||
interp-obj = $(common-objpfx)interp.so
|
||||
$(interp-obj): $(common-objpfx)%.so: $(..)%.c
|
||||
$(compile-command.c)
|
||||
common-generated += interp.so
|
||||
CFLAGS-interp.c = -D'RUNTIME_LINKER="$(slibdir)/$(rtld-installed-name)"'
|
||||
|
||||
$(common-objpfx)libc.so: $(interp-obj)
|
||||
$(patsubst %,$(objpfx)%.so,$(extra-libs)): $(interp-obj)
|
||||
|
||||
define build-shlib
|
||||
$(LINK.o) -shared -o $@ $(sysdep-LDFLAGS) $(config-LDFLAGS) \
|
||||
-B$(csu-objpfx) \
|
||||
@@ -643,6 +652,7 @@ object-suffixes-left := $(versioned)
|
||||
include $(o-iterator)
|
||||
|
||||
|
||||
ifeq (,$($(subdir)-version))
|
||||
define o-iterator-doit
|
||||
$(libdir)/$o$($o-version): $(libdir)/$(o:.so=)-$(version).so; $$(make-link)
|
||||
endef
|
||||
@@ -654,6 +664,21 @@ $(libdir)/$(o:.so=)-$(version).so: $(objpfx)$o; $$(do-install-program)
|
||||
endef
|
||||
object-suffixes-left := $(versioned)
|
||||
include $(o-iterator)
|
||||
else
|
||||
define o-iterator-doit
|
||||
$(libdir)/$o$($o-version): $(libdir)/$(o:.so=)-$($(subdir)-version).so;
|
||||
$$(make-link)
|
||||
endef
|
||||
object-suffixes-left := $(versioned)
|
||||
include $(o-iterator)
|
||||
|
||||
define o-iterator-doit
|
||||
$(libdir)/$(o:.so=)-$($(subdir)-version).so: $(objpfx)$o;
|
||||
$$(do-install-program)
|
||||
endef
|
||||
object-suffixes-left := $(versioned)
|
||||
include $(o-iterator)
|
||||
endif
|
||||
endif
|
||||
|
||||
define do-install-so
|
||||
|
||||
@@ -104,7 +104,7 @@ Version 2.0
|
||||
* The new header file <fts.h> and suite of functions simplify programs that
|
||||
operate on directory trees. This code comes from 4.4 BSD.
|
||||
|
||||
* The resolver code has been updated from the BIND 4.9.5-T3A release.
|
||||
* The resolver code has been updated from the BIND 4.9.5-T4B release.
|
||||
|
||||
* The new function `malloc_find_object_address' finds the starting address
|
||||
of a malloc'd block, given any address within the block;
|
||||
|
||||
@@ -1,22 +1,29 @@
|
||||
This directory contains the version 1.93 test release of the GNU C Library.
|
||||
This directory contains the version 1.94 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 has been ported to the following
|
||||
As of this release, the GNU C library is known to run on the following
|
||||
configurations:
|
||||
|
||||
*-*-gnu GNU Hurd
|
||||
i[3456]86-*-linux Linux-2.0 on Intel
|
||||
m68k-*-linux Linux-2.0 on Motorola 680x0
|
||||
alpha-*-linux Linux-2.0 on DEC Alpha
|
||||
|
||||
|
||||
Former releases of this library (version 1.09.1 and perhaps earlier
|
||||
versions) used to run on the following configurations:
|
||||
|
||||
alpha-dec-osf1
|
||||
i[345]86-*-bsd4.3
|
||||
i[345]86-*-gnu
|
||||
i[345]86-*-isc2.2
|
||||
i[345]86-*-isc3
|
||||
i[345]86-*-linux
|
||||
i[345]86-*-sco3.2
|
||||
i[345]86-*-sco3.2v4
|
||||
i[345]86-*-sysv
|
||||
i[345]86-*-sysv4
|
||||
i[345]86-force_cpu386-none
|
||||
i[345]86-sequent-bsd
|
||||
i[3456]86-*-bsd4.3
|
||||
i[3456]86-*-isc2.2
|
||||
i[3456]86-*-isc3
|
||||
i[3456]86-*-sco3.2
|
||||
i[3456]86-*-sco3.2v4
|
||||
i[3456]86-*-sysv
|
||||
i[3456]86-*-sysv4
|
||||
i[3456]86-force_cpu386-none
|
||||
i[3456]86-sequent-bsd
|
||||
i960-nindy960-none
|
||||
m68k-hp-bsd4.3
|
||||
m68k-mvme135-none
|
||||
@@ -29,8 +36,9 @@ configurations:
|
||||
sparc-sun-solaris2
|
||||
sparc-sun-sunos4
|
||||
|
||||
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
|
||||
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.
|
||||
|
||||
The GNU C library now includes Michael Glad's Ultra Fast Crypt, which
|
||||
@@ -38,7 +46,7 @@ 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-1.93-crypt.tar.gz'. You can just unpack the crypt
|
||||
called `glibc-1.94-crypt.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.uni-c.dk
|
||||
|
||||
+22
-14
@@ -2,21 +2,28 @@ This directory contains the version VERSION 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 has been ported to the following
|
||||
As of this release, the GNU C library is known to run on the following
|
||||
configurations:
|
||||
|
||||
*-*-gnu GNU Hurd
|
||||
i[3456]86-*-linux Linux-2.0 on Intel
|
||||
m68k-*-linux Linux-2.0 on Motorola 680x0
|
||||
alpha-*-linux Linux-2.0 on DEC Alpha
|
||||
|
||||
|
||||
Former releases of this library (version 1.09.1 and perhaps earlier
|
||||
versions) used to run on the following configurations:
|
||||
|
||||
alpha-dec-osf1
|
||||
i[345]86-*-bsd4.3
|
||||
i[345]86-*-gnu
|
||||
i[345]86-*-isc2.2
|
||||
i[345]86-*-isc3
|
||||
i[345]86-*-linux
|
||||
i[345]86-*-sco3.2
|
||||
i[345]86-*-sco3.2v4
|
||||
i[345]86-*-sysv
|
||||
i[345]86-*-sysv4
|
||||
i[345]86-force_cpu386-none
|
||||
i[345]86-sequent-bsd
|
||||
i[3456]86-*-bsd4.3
|
||||
i[3456]86-*-isc2.2
|
||||
i[3456]86-*-isc3
|
||||
i[3456]86-*-sco3.2
|
||||
i[3456]86-*-sco3.2v4
|
||||
i[3456]86-*-sysv
|
||||
i[3456]86-*-sysv4
|
||||
i[3456]86-force_cpu386-none
|
||||
i[3456]86-sequent-bsd
|
||||
i960-nindy960-none
|
||||
m68k-hp-bsd4.3
|
||||
m68k-mvme135-none
|
||||
@@ -29,8 +36,9 @@ configurations:
|
||||
sparc-sun-solaris2
|
||||
sparc-sun-sunos4
|
||||
|
||||
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
|
||||
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.
|
||||
|
||||
The GNU C library now includes Michael Glad's Ultra Fast Crypt, which
|
||||
|
||||
@@ -89,7 +89,8 @@ endif
|
||||
|
||||
ifneq "$(strip $(others) $(tests))" ""
|
||||
$(addprefix $(objpfx),$(others) $(tests)): %: %.o \
|
||||
$(sort $(filter $(common-objpfx)libc%,$(link-libc)))
|
||||
$(sort $(filter $(common-objpfx)libc%,$(link-libc))) \
|
||||
$(addprefix $(csu-objpfx),start.o) $(+preinit) $(+postinit)
|
||||
$(+link)
|
||||
endif
|
||||
|
||||
@@ -107,14 +108,13 @@ $(objpfx)%.out: /dev/null $(objpfx)% # Make it 2nd arg for canned sequence.
|
||||
endif # tests
|
||||
|
||||
.PHONY: distclean realclean subdir_distclean subdir_realclean \
|
||||
subdir_clean subdir_mostlyclean extra_solibs
|
||||
subdir_clean subdir_mostlyclean
|
||||
subdir_mostlyclean: mostlyclean
|
||||
subdir_clean: clean
|
||||
subdir_distclean: distclean
|
||||
subdir_realclean: realclean
|
||||
realclean: distclean
|
||||
distclean: clean
|
||||
extra_solibs:
|
||||
|
||||
.PHONY: subdir_echo-headers
|
||||
subdir_echo-headers: echo-headers
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ catopen (const char *cat_name, int flag)
|
||||
__nl_catd result;
|
||||
const char *env_var;
|
||||
|
||||
result = (__nl_catd) malloc (sizeof (__nl_catd));
|
||||
result = (__nl_catd) malloc (sizeof (*result));
|
||||
if (result == NULL)
|
||||
/* We cannot get enough memory. */
|
||||
return (nl_catd) -1;
|
||||
|
||||
+6
-4
@@ -166,7 +166,7 @@ main (int argc, char *argv[])
|
||||
if (do_version)
|
||||
{
|
||||
fprintf (stderr, "%s - GNU %s %s\n", program_invocation_name,
|
||||
"libc", VERSION);
|
||||
PACKAGE, VERSION);
|
||||
exit (EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
@@ -202,7 +202,8 @@ usage (int status)
|
||||
fprintf (stderr, gettext ("Try `%s --help' for more information.\n"),
|
||||
program_invocation_name);
|
||||
else
|
||||
printf(gettext ("\
|
||||
{
|
||||
printf(gettext ("\
|
||||
Usage: %s [OPTION]... -o OUTPUT-FILE [INPUT-FILE]...\n\
|
||||
%s [OPTION]... [OUTPUT-FILE [INPUT-FILE]...]\n\
|
||||
Mandatory arguments to long options are mandatory for short options too.\n\
|
||||
@@ -212,9 +213,10 @@ Mandatory arguments to long options are mandatory for short options too.\n\
|
||||
-o, --output=NAME write output to file NAME\n\
|
||||
-V, --version output version information and exit\n\
|
||||
If INPUT-FILE is -, input is read from standard input. If OUTPUT-FILE\n\
|
||||
is -, output is written to standard output.\n\
|
||||
Report bugs to <bug-glibc@gnu.ai.mit.edu>.\n"),
|
||||
is -, output is written to standard output.\n"),
|
||||
program_invocation_name, program_invocation_name);
|
||||
printf (gettext ("Report bugs to <bug-glibc@prep.ai.mit.edu>.\n"));
|
||||
}
|
||||
|
||||
exit (status);
|
||||
}
|
||||
|
||||
Vendored
+22
-22
@@ -81,7 +81,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
||||
exit 0 ;;
|
||||
i86pc:SunOS:5.*:*)
|
||||
echo i386-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
||||
echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
||||
exit 0 ;;
|
||||
sun4*:SunOS:6*:*)
|
||||
# According to config.sub, this is the proper way to canonicalize
|
||||
@@ -332,7 +332,7 @@ EOF
|
||||
echo m68k-hp-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
i[34]86:BSD/386:*:* | *:BSD/OS:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
|
||||
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:FreeBSD:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
|
||||
@@ -341,7 +341,7 @@ EOF
|
||||
echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
|
||||
exit 0 ;;
|
||||
i*:CYGWIN*:*)
|
||||
echo i386-unknown-cygwin32
|
||||
echo i386-pc-cygwin32
|
||||
exit 0 ;;
|
||||
p*:CYGWIN*:*)
|
||||
echo powerpcle-unknown-cygwin32
|
||||
@@ -357,26 +357,26 @@ EOF
|
||||
# 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[345]86"; then
|
||||
echo "${UNAME_MACHINE}-unknown-linux" ; exit 0
|
||||
echo "${UNAME_MACHINE}-pc-linux-gnu" ; exit 0
|
||||
elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: i[345]86linux"; then
|
||||
echo "${UNAME_MACHINE}-unknown-linuxaout" ; exit 0
|
||||
echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0
|
||||
elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: i[345]86coff"; then
|
||||
echo "${UNAME_MACHINE}-unknown-linuxcoff" ; exit 0
|
||||
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" ; exit 0
|
||||
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-linuxaout" ; exit 0
|
||||
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" ; exit 0
|
||||
echo "powerpc-unknown-linux-gnu" ; exit 0
|
||||
elif test "${UNAME_MACHINE}" = "alpha" ; then
|
||||
echo alpha-unknown-linux ; exit 0
|
||||
echo alpha-unknown-linux-gnu ; exit 0
|
||||
elif test "${UNAME_MACHINE}" = "sparc" ; then
|
||||
echo sparc-unknown-linux ; exit 0
|
||||
echo sparc-unknown-linux-gnu ; exit 0
|
||||
else
|
||||
# Either a pre-BFD a.out linker (linuxoldld) or one that does not give us
|
||||
# useful --help. Gcc wants to distinguish between linuxoldld and linuxaout.
|
||||
# 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}-unknown-linuxoldld" && exit 0
|
||||
&& echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
|
||||
# Determine whether the default compiler is a.out or elf
|
||||
cat >dummy.c <<EOF
|
||||
main(argc, argv)
|
||||
@@ -384,9 +384,9 @@ int argc;
|
||||
char *argv[];
|
||||
{
|
||||
#ifdef __ELF__
|
||||
printf ("%s-unknown-linux\n", argv[1]);
|
||||
printf ("%s-pc-linux-gnu\n", argv[1]);
|
||||
#else
|
||||
printf ("%s-unknown-linuxaout\n", argv[1]);
|
||||
printf ("%s-pc-linux-gnuaout\n", argv[1]);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
@@ -403,25 +403,25 @@ EOF
|
||||
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
|
||||
echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE}
|
||||
else
|
||||
echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}
|
||||
echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
|
||||
fi
|
||||
exit 0 ;;
|
||||
i[34]86:*:3.2:*)
|
||||
if test -f /usr/options/cb.name; then
|
||||
UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
|
||||
echo ${UNAME_MACHINE}-unknown-isc$UNAME_REL
|
||||
echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
|
||||
elif /bin/uname -X 2>/dev/null >/dev/null ; then
|
||||
UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
|
||||
(/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
|
||||
(/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
|
||||
&& UNAME_MACHINE=i586
|
||||
echo ${UNAME_MACHINE}-unknown-sco$UNAME_REL
|
||||
echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
|
||||
else
|
||||
echo ${UNAME_MACHINE}-unknown-sysv32
|
||||
echo ${UNAME_MACHINE}-pc-sysv32
|
||||
fi
|
||||
exit 0 ;;
|
||||
Intel:Mach:3*:*)
|
||||
echo i386-unknown-mach3
|
||||
echo i386-pc-mach3
|
||||
exit 0 ;;
|
||||
paragon:*:*:*)
|
||||
echo i860-intel-osf1
|
||||
@@ -547,7 +547,7 @@ main ()
|
||||
#endif
|
||||
|
||||
#if defined (__386BSD__)
|
||||
printf ("i386-unknown-bsd\n"); exit (0);
|
||||
printf ("i386-pc-bsd\n"); exit (0);
|
||||
#endif
|
||||
|
||||
#if defined (sequent)
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ config-vendor = @host_vendor@
|
||||
config-os = @host_os@
|
||||
config-sysdirs = @sysnames@
|
||||
|
||||
config-defines = @DEFS@
|
||||
defines = @DEFINES@
|
||||
|
||||
elf = @elf@
|
||||
have-initfini = @libc_cv_have_initfini@
|
||||
|
||||
Vendored
+44
-20
@@ -41,6 +41,8 @@
|
||||
# The goal of this file is to map all the various variations of a given
|
||||
# machine specification into a single specification in the form:
|
||||
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
|
||||
# or in some cases, the newer four-part form:
|
||||
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
|
||||
# It is wrong to echo any other type of specification.
|
||||
|
||||
if [ x$1 = x ]
|
||||
@@ -62,11 +64,21 @@ case $1 in
|
||||
;;
|
||||
esac
|
||||
|
||||
# Separate what the user gave into CPU-COMPANY and OS (if any).
|
||||
basic_machine=`echo $1 | sed 's/-[^-]*$//'`
|
||||
if [ $basic_machine != $1 ]
|
||||
then os=`echo $1 | sed 's/.*-/-/'`
|
||||
else os=; fi
|
||||
# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
|
||||
# Here we must recognize all the valid KERNEL-OS combinations.
|
||||
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
|
||||
case $maybe_os in
|
||||
linux-gnu*)
|
||||
os=-$maybe_os
|
||||
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
|
||||
;;
|
||||
*)
|
||||
basic_machine=`echo $1 | sed 's/-[^-]*$//'`
|
||||
if [ $basic_machine != $1 ]
|
||||
then os=`echo $1 | sed 's/.*-/-/'`
|
||||
else os=; fi
|
||||
;;
|
||||
esac
|
||||
|
||||
### Let's recognize common machines as not being operating systems so
|
||||
### that things like config.sub decstation-3100 work. We also
|
||||
@@ -91,33 +103,33 @@ case $os in
|
||||
;;
|
||||
-sco5)
|
||||
os=sco3.2v5
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
-sco4)
|
||||
os=-sco3.2v4
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
-sco3.2.[4-9]*)
|
||||
os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
-sco3.2v[4-9]*)
|
||||
# Don't forget version if it is 3.2v4 or newer.
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
-sco*)
|
||||
os=-sco3.2v2
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
-isc)
|
||||
os=-isc2.2
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
-clix*)
|
||||
basic_machine=clipper-intergraph
|
||||
;;
|
||||
-isc*)
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
-lynx*)
|
||||
os=-lynxos
|
||||
@@ -137,7 +149,7 @@ esac
|
||||
case $basic_machine in
|
||||
# Recognize the basic CPU types without company name.
|
||||
# Some are omitted here because they have special meanings below.
|
||||
tahoe | i[3456]86 | i860 | m68k | m68000 | m88k | ns32k | arm \
|
||||
tahoe | i860 | m68k | m68000 | m88k | ns32k | arm \
|
||||
| arme[lb] | pyramid \
|
||||
| tron | a29k | 580 | i960 | h8300 | hppa1.0 | hppa1.1 \
|
||||
| alpha | we32k | ns16k | clipper | i370 | sh \
|
||||
@@ -146,6 +158,12 @@ case $basic_machine in
|
||||
| sparc | sparclet | sparclite | sparc64)
|
||||
basic_machine=$basic_machine-unknown
|
||||
;;
|
||||
# We use `pc' rather than `unknown'
|
||||
# because (1) that's what they normally are, and
|
||||
# (2) the word "unknown" tends to confuse beginning users.
|
||||
i[3456]86)
|
||||
basic_machine=$basic_machine-pc
|
||||
;;
|
||||
# Object if more than one company name word.
|
||||
*-*-*)
|
||||
echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
|
||||
@@ -325,19 +343,19 @@ case $basic_machine in
|
||||
;;
|
||||
# I'm not sure what "Sysv32" means. Should this be sysv3.2?
|
||||
i[3456]86v32)
|
||||
basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
|
||||
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
|
||||
os=-sysv32
|
||||
;;
|
||||
i[3456]86v4*)
|
||||
basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
|
||||
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
|
||||
os=-sysv4
|
||||
;;
|
||||
i[3456]86v)
|
||||
basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
|
||||
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
|
||||
os=-sysv
|
||||
;;
|
||||
i[3456]86sol2)
|
||||
basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
|
||||
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
|
||||
os=-solaris2
|
||||
;;
|
||||
iris | iris4d)
|
||||
@@ -635,6 +653,8 @@ esac
|
||||
if [ x"$os" != x"" ]
|
||||
then
|
||||
case $os in
|
||||
# First match some system type aliases
|
||||
# that might get confused with valid system types.
|
||||
# -solaris* is a basic system type, with this one exception.
|
||||
-solaris1 | -solaris1.*)
|
||||
os=`echo $os | sed -e 's|solaris1|sunos4|'`
|
||||
@@ -646,7 +666,7 @@ case $os in
|
||||
os=-sysv4
|
||||
;;
|
||||
-gnu/linux*)
|
||||
os=`echo $os | sed -e 's|gnu/linux|linux|'`
|
||||
os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
|
||||
;;
|
||||
# First accept the basic system types.
|
||||
# The portable systems comes first.
|
||||
@@ -657,14 +677,18 @@ case $os in
|
||||
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
|
||||
| -amigados* | -msdos* | -newsos* | -unicos* | -aof* | -aos* \
|
||||
| -nindy* | -vxworks* | -ebmon* | -hms* | -mvs* | -clix* \
|
||||
| -riscos* | -linux* | -uniplus* | -iris* | -rtu* | -xenix* \
|
||||
| -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
|
||||
| -hiux* | -386bsd* | -netbsd* | -freebsd* | -riscix* \
|
||||
| -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \
|
||||
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
|
||||
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
|
||||
| -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems*)
|
||||
| -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
|
||||
| -linux-gnu*)
|
||||
# Remember, each alternative MUST END IN *, to match a version number.
|
||||
;;
|
||||
-linux*)
|
||||
os=`echo $os | sed -e 's|linux|linux-gnu|'`
|
||||
;;
|
||||
-sunos5*)
|
||||
os=`echo $os | sed -e 's|sunos5|solaris2|'`
|
||||
;;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
# From configure.in CVSid
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated automatically using autoconf version 2.99
|
||||
# Generated automatically using autoconf version 2.10
|
||||
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
|
||||
#
|
||||
# This configure script is free software; the Free Software Foundation
|
||||
@@ -355,7 +355,7 @@ EOF
|
||||
verbose=yes ;;
|
||||
|
||||
-version | --version | --versio | --versi | --vers)
|
||||
echo "configure generated by autoconf version 2.99"
|
||||
echo "configure generated by autoconf version 2.10"
|
||||
exit 0 ;;
|
||||
|
||||
-with-* | --with-*)
|
||||
@@ -690,7 +690,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
|
||||
subdirs="$add_ons"
|
||||
|
||||
add_ons_pfx=
|
||||
if test x$add_ons != x; then
|
||||
if test x"$add_ons" != x; then
|
||||
for f in $add_ons; do
|
||||
add_ons_pfx="$add_ons_pfx $f/"
|
||||
done
|
||||
@@ -717,9 +717,9 @@ NONE)
|
||||
esac
|
||||
|
||||
host=`$ac_config_sub $host_alias`
|
||||
host_cpu=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
|
||||
host_vendor=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
|
||||
host_os=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
|
||||
host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
|
||||
host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
|
||||
host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
|
||||
echo "$ac_t""$host" 1>&6
|
||||
|
||||
# We keep the original values in `$config_*' and never modify them, so we
|
||||
@@ -799,6 +799,11 @@ o=`echo $tail | sed 's/[0-9]*$//'`
|
||||
if test $o != $tail; then
|
||||
ostry="$ostry /$o"
|
||||
fi
|
||||
# For linux-gnu, try linux-gnu, then linux.
|
||||
o=`echo $tail | sed 's/-.*$//'`
|
||||
if test $o != $tail; then
|
||||
ostry="$ostry /$o"
|
||||
fi
|
||||
|
||||
# For unix/sysv/sysv4, try unix/sysv/sysv4, then unix/sysv, then unix.
|
||||
base=
|
||||
@@ -878,7 +883,7 @@ if test "$elf" = yes; then
|
||||
esac
|
||||
for m in $mach; do
|
||||
if test -d $xsrcdir${d}sysdeps$m/elf; then
|
||||
elf_dirs="$elf_dirs $d$m/elf"
|
||||
elf_dirs="$elf_dirs ${d}sysdeps$m/elf"
|
||||
fi
|
||||
done
|
||||
done
|
||||
@@ -886,10 +891,6 @@ if test "$elf" = yes; then
|
||||
fi
|
||||
|
||||
|
||||
# Remove the leading slashes.
|
||||
sysnames="`echo $sysnames | sed -e 's@^/@@' -e 's@ /@ @g'`"
|
||||
|
||||
|
||||
# Expand the list of system names into a full list of directories
|
||||
# from each element's parent name and Implies file (if present).
|
||||
set $sysnames
|
||||
@@ -1089,9 +1090,9 @@ NONE)
|
||||
esac
|
||||
|
||||
build=`$ac_config_sub $build_alias`
|
||||
build_cpu=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
|
||||
build_vendor=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
|
||||
build_os=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
|
||||
build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
|
||||
build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
|
||||
build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
|
||||
echo "$ac_t""$build" 1>&6
|
||||
|
||||
if test $host != $build; then
|
||||
@@ -1174,13 +1175,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 1178 "configure"
|
||||
#line 1179 "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:1184: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:1185: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
:
|
||||
@@ -1189,13 +1190,13 @@ else
|
||||
rm -rf conftest*
|
||||
CPP="${CC-cc} -E -traditional-cpp"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1193 "configure"
|
||||
#line 1194 "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:1199: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:1200: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
:
|
||||
@@ -1337,7 +1338,7 @@ 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 1341 "configure"
|
||||
#line 1342 "configure"
|
||||
#include "confdefs.h"
|
||||
#define __need_size_t
|
||||
#define __need_wchar_t
|
||||
@@ -1353,7 +1354,7 @@ size_t size; wchar_t wchar;
|
||||
if (&size == NULL || &wchar == NULL) abort ();
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1357: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:1358: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
libc_cv_friendly_stddef=yes
|
||||
else
|
||||
@@ -1460,7 +1461,7 @@ 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 1464 "configure"
|
||||
#line 1465 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main() { return 0; }
|
||||
@@ -1470,7 +1471,7 @@ asm (".section .init");
|
||||
asm (".text");
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1474: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:1475: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
libc_cv_have_initfini=yes
|
||||
else
|
||||
@@ -1498,7 +1499,7 @@ 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 1502 "configure"
|
||||
#line 1503 "configure"
|
||||
#include "confdefs.h"
|
||||
asm ("_glibc_foobar:");
|
||||
int main() { return 0; }
|
||||
@@ -1506,7 +1507,7 @@ int t() {
|
||||
glibc_foobar ();
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
|
||||
if { (eval echo configure:1511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
libc_cv_asm_underscores=yes
|
||||
else
|
||||
@@ -1600,7 +1601,7 @@ __throw () {}
|
||||
EOF
|
||||
if { ac_try='${CC-cc} $CFLAGS
|
||||
-nostdlib -nostartfiles -Wl,--no-whole-archive
|
||||
-o conftest conftest.c'; { (eval echo configure:1604: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
|
||||
-o conftest conftest.c'; { (eval echo configure:1605: \"$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
|
||||
@@ -1621,7 +1622,7 @@ __throw () {}
|
||||
EOF
|
||||
if { ac_try='${CC-cc} $CFLAGS
|
||||
-nostdlib -nostartfiles -fno-exceptions
|
||||
-o conftest conftest.c'; { (eval echo configure:1625: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
|
||||
-o conftest conftest.c'; { (eval echo configure:1626: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
|
||||
libc_cv_gcc_no_exceptions=yes
|
||||
else
|
||||
libc_cv_gcc_no_exceptions=no
|
||||
@@ -1754,6 +1755,8 @@ fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if test "`(cd $srcdir; pwd)`" = "`pwd`"; then
|
||||
config_makefile=
|
||||
else
|
||||
@@ -1836,7 +1839,7 @@ do
|
||||
echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
|
||||
exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
|
||||
-version | --version | --versio | --versi | --vers | --ver | --ve | --v)
|
||||
echo "$CONFIG_STATUS generated by autoconf version 2.99"
|
||||
echo "$CONFIG_STATUS generated by autoconf version 2.10"
|
||||
exit 0 ;;
|
||||
-help | --help | --hel | --he | --h)
|
||||
echo "\$ac_cs_usage"; exit 0 ;;
|
||||
@@ -1912,6 +1915,7 @@ s%@elf@%$elf%g
|
||||
s%@shared@%$shared%g
|
||||
s%@profile@%$profile%g
|
||||
s%@omitfp@%$omitfp%g
|
||||
s%@DEFINES@%$DEFINES%g
|
||||
|
||||
CEOF
|
||||
EOF
|
||||
|
||||
+9
-6
@@ -78,7 +78,7 @@ AC_ARG_ENABLE(add-ons, dnl
|
||||
[add_ons=])
|
||||
AC_CONFIG_SUBDIRS($add_ons)
|
||||
add_ons_pfx=
|
||||
if test x$add_ons != x; then
|
||||
if test x"$add_ons" != x; then
|
||||
for f in $add_ons; do
|
||||
add_ons_pfx="$add_ons_pfx $f/"
|
||||
done
|
||||
@@ -167,6 +167,11 @@ o=`echo $tail | sed 's/[0-9]*$//'`
|
||||
if test $o != $tail; then
|
||||
ostry="$ostry /$o"
|
||||
fi
|
||||
# For linux-gnu, try linux-gnu, then linux.
|
||||
o=`echo $tail | sed 's/-.*$//'`
|
||||
if test $o != $tail; then
|
||||
ostry="$ostry /$o"
|
||||
fi
|
||||
|
||||
# For unix/sysv/sysv4, try unix/sysv/sysv4, then unix/sysv, then unix.
|
||||
base=
|
||||
@@ -248,7 +253,7 @@ if test "$elf" = yes; then
|
||||
esac
|
||||
for m in $mach; do
|
||||
if test -d $xsrcdir${d}sysdeps$m/elf; then
|
||||
elf_dirs="$elf_dirs $d$m/elf"
|
||||
elf_dirs="$elf_dirs ${d}sysdeps$m/elf"
|
||||
fi
|
||||
done
|
||||
done
|
||||
@@ -256,10 +261,6 @@ if test "$elf" = yes; then
|
||||
fi
|
||||
|
||||
|
||||
# Remove the leading slashes.
|
||||
sysnames="`echo $sysnames | sed -e 's@^/@@' -e 's@ /@ @g'`"
|
||||
|
||||
|
||||
# Expand the list of system names into a full list of directories
|
||||
# from each element's parent name and Implies file (if present).
|
||||
set $sysnames
|
||||
@@ -668,6 +669,8 @@ fi
|
||||
AC_SUBST(profile)
|
||||
AC_SUBST(omitfp)
|
||||
|
||||
AC_SUBST(DEFINES)
|
||||
|
||||
if test "`(cd $srcdir; pwd)`" = "`pwd`"; then
|
||||
config_makefile=
|
||||
else
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
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-1.07-crypt.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.uni-c.dk [129.142.6.74], or another
|
||||
archive site outside the USA. Archive maintainers are encouraged to copy
|
||||
this distribution to their archives outside the USA. Please get it from
|
||||
ftp.uni-c.dk; transferring this distribution from prep.ai.mit.edu (or any
|
||||
other site in the USA) to a site outside the USA is in violation of US
|
||||
export laws.
|
||||
+6
-1
@@ -9,6 +9,7 @@ subdir-dirs = btree db hash mpool recno
|
||||
vpath %.c $(subdir-dirs)
|
||||
|
||||
extra-libs := libdb
|
||||
extra-libs-others := $(extra-libs)
|
||||
libdb-routines := bt_close bt_conv bt_debug bt_delete bt_get \
|
||||
bt_open bt_overflow bt_page bt_put bt_search \
|
||||
bt_seq bt_split bt_utils \
|
||||
@@ -39,4 +40,8 @@ CFLAGS-hash_func.c := -Wno-unused
|
||||
# The db code outsmarts the compiler frequently.
|
||||
override CFLAGS += -Wno-uninitialized
|
||||
|
||||
LDLIBS-makedb := db/libdb
|
||||
ifeq ($(build-shared),yes)
|
||||
$(objpfx)makedb: $(objpfx)libdb.so$(libdb.so-version)
|
||||
else
|
||||
$(objpfx)makedb: $(objpfx)libdb.a
|
||||
endif
|
||||
|
||||
+10
-6
@@ -25,6 +25,7 @@ Boston, MA 02111-1307, USA. */
|
||||
#include <fcntl.h>
|
||||
#include <getopt.h>
|
||||
#include <libintl.h>
|
||||
#include <locale.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -32,6 +33,7 @@ Boston, MA 02111-1307, USA. */
|
||||
/* Get libc version number. */
|
||||
#include "../version.h"
|
||||
|
||||
#define PACKAGE _libc_intl_domainname
|
||||
|
||||
/* Long options. */
|
||||
static const struct option long_options[] =
|
||||
@@ -112,7 +114,7 @@ main (argc, argv)
|
||||
|
||||
/* Version information is requested. */
|
||||
if (do_version)
|
||||
printf ("%s - GNU %s %s\n", program_invocation_name, "libc", VERSION);
|
||||
printf ("%s - GNU %s %s\n", program_invocation_name, PACKAGE, VERSION);
|
||||
|
||||
/* Help is requested. */
|
||||
if (do_help)
|
||||
@@ -196,7 +198,8 @@ usage (status)
|
||||
fprintf (stderr, gettext ("Try `%s --help' for more information.\n"),
|
||||
program_invocation_name);
|
||||
else
|
||||
printf (gettext ("\
|
||||
{
|
||||
printf (gettext ("\
|
||||
Usage: %s [OPTION]... INPUT-FILE OUTPUT-FILE\n\
|
||||
%s [OPTION]... -o OUTPUT-FILE INPUT-FILE\n\
|
||||
%s [OPTION]... -u INPUT-FILE\n\
|
||||
@@ -207,10 +210,11 @@ Mandatory arguments to long options are mandatory for short options too.\n\
|
||||
--quiet don't print messages while building database\n\
|
||||
-u, --undo print content of database file, one entry a line\n\
|
||||
-V, --version output version information and exit\n\
|
||||
If INPUT-FILE is -, input is read from standard input.\n\
|
||||
Report bugs to <bug-glibc@gnu.ai.mit.edu>.\n"),
|
||||
program_invocation_name, program_invocation_name,
|
||||
program_invocation_name);
|
||||
If INPUT-FILE is -, input is read from standard input.\n"),
|
||||
program_invocation_name, program_invocation_name,
|
||||
program_invocation_name);
|
||||
printf (gettext ("Report bugs to <bug-glibc@prep.ai.mit.edu>.\n"));
|
||||
}
|
||||
|
||||
exit (status);
|
||||
}
|
||||
|
||||
+3
-2
@@ -37,7 +37,8 @@ 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 eval.c
|
||||
|
||||
extra-libs = libdl
|
||||
extra-libs = libdl
|
||||
extra-libs-others = $(extra-libs)
|
||||
libdl-routines := dlopen dlclose dlsym dlerror dladdr
|
||||
|
||||
|
||||
@@ -46,7 +47,7 @@ all: # Make this the default target; it will be defined in Rules.
|
||||
include ../Makeconfig
|
||||
|
||||
ifeq (yes,$(build-shared))
|
||||
extra-objs = $(rtld-routines:=.so) soinit.so sofini.so
|
||||
extra-objs = $(rtld-routines:=.so) soinit.so sofini.so eval.so
|
||||
generated = librtld.so dl-allobjs.so
|
||||
install-others = $(slibdir)/$(rtld-installed-name)
|
||||
install-bin = ldd
|
||||
|
||||
+9
-1
@@ -1,6 +1,7 @@
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <dlfcn.h>
|
||||
|
||||
static void *funcall (char **stringp);
|
||||
@@ -27,6 +28,13 @@ funcall (char **stringp)
|
||||
/* Swallow closing paren. */
|
||||
++*stringp;
|
||||
|
||||
if (args[0] == NULL)
|
||||
{
|
||||
static const char unknown[] = "Unknown function\n";
|
||||
write (1, unknown, sizeof unknown - 1);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Do it to it. */
|
||||
__builtin_return (__builtin_apply (args[0],
|
||||
&argcookie,
|
||||
@@ -81,7 +89,7 @@ eval (char **stringp)
|
||||
value = p;
|
||||
do
|
||||
++p;
|
||||
while (*p != '\0' && !isspace (*p) && !ispunct (*p));
|
||||
while (*p != '\0' && !isspace (*p) && (!ispunct (*p) || *p == '_'));
|
||||
c = *p;
|
||||
*p = '\0';
|
||||
value = dlsym (NULL, value);
|
||||
|
||||
+2
-2
@@ -28,7 +28,7 @@ alltypes-$(lib) := $(foreach o,$(object-suffixes-$(lib)),\
|
||||
ifeq (,$(filter $(lib),$(extra-libs-others)))
|
||||
lib-noranlib: $(alltypes-$(lib))
|
||||
ifeq (yes,$(build-shared))
|
||||
extra_solibs: $(objpfx)$(lib).so$($(lib).so-version)
|
||||
lib-noranlib: $(objpfx)$(lib).so$($(lib).so-version)
|
||||
endif
|
||||
else
|
||||
others: $(alltypes-$(lib))
|
||||
@@ -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))))
|
||||
extra_solibs: $(objpfx)$(lib).so
|
||||
others: $(objpfx)$(lib).so
|
||||
endif
|
||||
|
||||
|
||||
|
||||
+5
-1
@@ -29,6 +29,8 @@ Cambridge, MA 02139, USA. */
|
||||
_BSD_SOURCE ANSI, POSIX, and 4.3BSD things.
|
||||
_SVID_SOURCE ANSI, POSIX, and SVID things.
|
||||
_GNU_SOURCE All of the above, plus GNU extensions.
|
||||
_REENTRANT Select additionally reentrant object.
|
||||
_THREAD_SAFE Same as _REENTRANT, often used by other systems.
|
||||
|
||||
The `-ansi' switch to the GNU C compiler defines __STRICT_ANSI__.
|
||||
If none of these are defined, the default is all but _GNU_SOURCE.
|
||||
@@ -137,7 +139,7 @@ Cambridge, MA 02139, USA. */
|
||||
#define __USE_GNU 1
|
||||
#endif
|
||||
|
||||
#if defined (__USE_GNU) || defined (__USE_MISC)
|
||||
#if defined (_REENTRANT) || defined (_THREAD_SAFE)
|
||||
#define __USE_REENTRANT 1
|
||||
#endif
|
||||
|
||||
@@ -160,7 +162,9 @@ Cambridge, MA 02139, USA. */
|
||||
|
||||
|
||||
/* This is here only because every header file already includes this one. */
|
||||
#ifndef __ASSEMBLER__
|
||||
#include <sys/cdefs.h>
|
||||
#endif
|
||||
|
||||
/* This is here only because every header file already includes this one. */
|
||||
#ifndef _LIBC
|
||||
|
||||
-75
@@ -1,75 +0,0 @@
|
||||
#error This file is obsolete.
|
||||
|
||||
/* Copyright (C) 1991, 1992, 1994 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., 675 Mass Ave,
|
||||
Cambridge, MA 02139, USA. */
|
||||
|
||||
#ifndef __GNU_STABS_H
|
||||
|
||||
#define __GNU_STABS_H 1
|
||||
|
||||
#ifdef HAVE_GNU_LD
|
||||
|
||||
/* Alias a function:
|
||||
function_alias(creat, _creat, int, (file, mode),
|
||||
DEFUN(creat, (file, mode),
|
||||
CONST char *file AND int mode))
|
||||
Yes, this is very repetitive. Nothing you can do about it, so shut up. */
|
||||
#define function_alias(name, _name, type, args, defun) \
|
||||
symbol_alias (_name, name);
|
||||
|
||||
#define function_alias_void(name, _name, args, defun) \
|
||||
symbol_alias (_name, name);
|
||||
|
||||
#ifdef NO_UNDERSCORES
|
||||
#define __SYMBOL_PREFIX
|
||||
#else
|
||||
#define __SYMBOL_PREFIX "_"
|
||||
#endif
|
||||
|
||||
/* Make references to ALIAS refer to SYMBOL. */
|
||||
#define symbol_alias(symbol, alias) \
|
||||
asm(".stabs \"" __SYMBOL_PREFIX #alias "\",11,0,0,0\n"\
|
||||
".stabs \"" __SYMBOL_PREFIX #symbol "\",1,0,0,0")
|
||||
|
||||
/* Issue a warning message from the linker whenever SYMBOL is referenced. */
|
||||
#define warn_references(symbol, msg) \
|
||||
asm(".stabs \"" msg "\",30,0,0,0\n" \
|
||||
".stabs \"" __SYMBOL_PREFIX #symbol "\",1,0,0,0")
|
||||
|
||||
#define stub_warning(name) \
|
||||
warn_references(name, \
|
||||
"warning: " #name " is not implemented and will always fail")
|
||||
|
||||
#define text_set_element(set, symbol) \
|
||||
asm(".stabs \"" __SYMBOL_PREFIX #set "\",23,0,0," __SYMBOL_PREFIX #symbol)
|
||||
#define data_set_element(set, symbol) \
|
||||
asm(".stabs \"" __SYMBOL_PREFIX #set "\",25,0,0," __SYMBOL_PREFIX #symbol)
|
||||
#define bss_set_element(set, symbol) \
|
||||
asm(".stabs \"" __SYMBOL_PREFIX #set "\",27,0,0," __SYMBOL_PREFIX #symbol)
|
||||
|
||||
#else /* No GNU stabs. */
|
||||
|
||||
#define function_alias(name, _name, type, args, defun) \
|
||||
type defun { return _name args; }
|
||||
|
||||
#define function_alias_void(name, _name, args, defun) \
|
||||
void defun { _name args; }
|
||||
|
||||
#endif /* GNU stabs. */
|
||||
|
||||
#endif /* gnu-stabs.h */
|
||||
+11
-2
@@ -49,7 +49,7 @@ routines = hurdstartup hurdinit \
|
||||
privports \
|
||||
msgportdemux \
|
||||
fopenport \
|
||||
vpprintf \
|
||||
vpprintf \
|
||||
ports-get ports-set hurdports hurdmsg \
|
||||
$(sig) $(dtable) hurdinline port-cleanup report-wait
|
||||
sig = hurdsig hurdfault siginfo hurd-raise preempt-sig \
|
||||
@@ -59,7 +59,7 @@ dtable = dtable port2fd new-fd alloc-fd intern-fd \
|
||||
getdport openport \
|
||||
fd-close fd-read fd-write hurdioctl ctty-input ctty-output
|
||||
distribute = hurdstartup.h hurdfault.h hurdhost.h \
|
||||
faultexc.defs intr-rpc.defs intr-rpc.h
|
||||
faultexc.defs intr-rpc.defs intr-rpc.h intr-msg.h Notes
|
||||
|
||||
# XXX this is a temporary hack; see hurdmalloc.h
|
||||
routines += hurdmalloc
|
||||
@@ -68,6 +68,15 @@ distribute += hurdmalloc.h
|
||||
include ../mach/Machrules
|
||||
include ../Rules
|
||||
|
||||
# XXX sunrpc doesn't build yet for Hurd, but one of its headers is
|
||||
# crucial nontheless. So sysdeps/mach/hurd/Makefile elides sunrpc
|
||||
# from $(subdirs), and this rule arranges for the header in question
|
||||
# to get installed.
|
||||
install-headers-nosubdir: $(includedir)/rpc/netdb.h
|
||||
$(includedir)/rpc/netdb.h: $(top_srcdir)/sunrpc/rpc/netdb.h
|
||||
$(do-install)
|
||||
|
||||
|
||||
# intr-rpc.defs defines the INTR_INTERFACE macro to make the generated RPC
|
||||
# stubs import <hurd/signal.h> and #define __mach_msg to
|
||||
# _hurd_intr_rpc_mach_msg.
|
||||
|
||||
+2
-1
@@ -31,6 +31,8 @@ struct hurd_port *_hurd_ports;
|
||||
unsigned int _hurd_nports;
|
||||
mode_t _hurd_umask;
|
||||
sigset_t _hurdsig_traced;
|
||||
char **__libc_argv;
|
||||
|
||||
|
||||
error_t
|
||||
_hurd_ports_use (int which, error_t (*operate) (mach_port_t))
|
||||
@@ -165,7 +167,6 @@ _hurd_setproc (process_t procserver)
|
||||
{
|
||||
error_t err;
|
||||
mach_port_t oldmsg;
|
||||
extern char **__libc_argv;
|
||||
|
||||
/* Give the proc server our message port. */
|
||||
if (err = __proc_setmsgport (procserver, _hurd_msgport, &oldmsg))
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
BEGIN { intr=0; wantcall=0; calls=""; }
|
||||
|
||||
$1 == "/*" && $2 == "INTR" && $3 == "*/" { intr=1; }
|
||||
|
||||
NF == 1 && $1 == "routine" { wantcall=1; next; }
|
||||
|
||||
intr != 0 && wantcall == 0 && NF >= 2 && $1 == "routine" \
|
||||
{
|
||||
if (substr($2, length($2)-2, 1) == "(")
|
||||
calls = calls " " substr($2, 0, length($2)-1);
|
||||
else calls = calls " " $2;
|
||||
intr=0;
|
||||
}
|
||||
|
||||
wantcall != 0 && NF >= 1 \
|
||||
{
|
||||
if (substr($1, length($1)-2, 1) == "(")
|
||||
calls = calls " " substr($1, 0, length($1)-1);
|
||||
else calls = calls " " $1;
|
||||
intr=0;
|
||||
}
|
||||
|
||||
{ wantcall=0; }
|
||||
|
||||
END { print varname " :=" calls; }
|
||||
@@ -1,45 +0,0 @@
|
||||
# Icky intimate knowledge of MiG output.
|
||||
|
||||
BEGIN \
|
||||
{
|
||||
nprotolines=0; proto=0;
|
||||
args=""; echo=1; isintr=0;
|
||||
intrcall = "__hurd_intr_rpc_" call;
|
||||
print "#include <hurd/signal.h>";
|
||||
}
|
||||
|
||||
$NF == intrcall { isintr=1; }
|
||||
|
||||
NF == 1 && $1 == ")" { proto=0; }
|
||||
proto \
|
||||
{
|
||||
protolines[nprotolines++] = $0;
|
||||
arg = $NF;
|
||||
if (substr(arg, 1, 1) == "*")
|
||||
arg = substr(arg, 2, length(arg)-1);
|
||||
args = args arg;
|
||||
}
|
||||
NF == 1 && $1 == "(" { proto=1; }
|
||||
|
||||
NF == 3 && $1 == "InP->Head.msgh_request_port" \
|
||||
{ portarg = substr($3, 1, length($3)-1); }
|
||||
|
||||
{ print $0; }
|
||||
|
||||
END \
|
||||
{
|
||||
if (isintr)
|
||||
{
|
||||
print "\n\n/* User-callable interrupt-handling stub. */";
|
||||
print "kern_return_t __" call;
|
||||
print "(";
|
||||
for (i = 0; i < nprotolines; ++i)
|
||||
print protolines[i];
|
||||
print ")";
|
||||
print "{";
|
||||
print " return HURD_EINTR_RPC (" portarg ", " \
|
||||
intrcall "(" args "));";
|
||||
print "}";
|
||||
}
|
||||
print "weak_alias (__" call ", " call ")"
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
/* Copyright (C) 1994 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., 675 Mass Ave,
|
||||
Cambridge, MA 02139, USA. */
|
||||
|
||||
#include <hurd.h>
|
||||
#include <hurd/fs.h>
|
||||
|
||||
error_t
|
||||
__hurd_invoke_translator (file_t file, int flags, file_t *newport)
|
||||
{
|
||||
error_t err;
|
||||
enum retry_type doretry;
|
||||
char retryname[1024]; /* XXX string_t LOSES! */
|
||||
|
||||
err = __file_invoke_translator (file, flags, &doretry, retryname, newport);
|
||||
|
||||
if (! err)
|
||||
err = __USEPORT (CRDIR, __hurd_file_name_lookup_retry (port,
|
||||
doretry, retryname,
|
||||
flags, 0, newport));
|
||||
|
||||
return err;
|
||||
}
|
||||
+1
-1
@@ -22,7 +22,7 @@
|
||||
subdir := inet
|
||||
|
||||
headers := netinet/ether.h netinet/in.h netinet/if_ether.h \
|
||||
$(wildcard arpa/*.h protocols/*.h)
|
||||
netinet/tcp.h $(wildcard arpa/*.h protocols/*.h)
|
||||
|
||||
routines := ntohl ntohs htonl htons \
|
||||
inet_lnaof inet_mkadr \
|
||||
|
||||
+13
-1
@@ -16,7 +16,19 @@ 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 <features.h>
|
||||
|
||||
/* We need to have the error status variable of the resolver
|
||||
accessible in the libc. */
|
||||
int h_errno;
|
||||
int __h_errno = 0;
|
||||
strong_alias (__h_errno, h_errno)
|
||||
|
||||
/* When threaded, h_errno may be a per-process variable. */
|
||||
#ifdef __USE_REENTRANT
|
||||
int *
|
||||
weak_const_function
|
||||
__h_errno_location (void)
|
||||
{
|
||||
return &__h_errno;
|
||||
}
|
||||
#endif
|
||||
|
||||
+1
-1
@@ -173,7 +173,7 @@ rcmd(ahost, rport, locuser, remuser, cmd, fd2p)
|
||||
from.sin_port >= IPPORT_RESERVED ||
|
||||
from.sin_port < IPPORT_RESERVED / 2) {
|
||||
(void)fprintf(stderr,
|
||||
_("socket: protocol failure in circuit setup.\n"));
|
||||
_("socket: protocol failure in circuit setup\n"));
|
||||
goto bad2;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/* Copyright (C) 1995 Free Software Foundation, Inc.
|
||||
/* interp - add information about dynamic loader to shared libray obejcts.
|
||||
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
|
||||
@@ -13,21 +14,8 @@ 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., 675 Mass Ave,
|
||||
Cambridge, MA 02139, USA. */
|
||||
not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#undef __isnanl
|
||||
#undef isnanl
|
||||
|
||||
|
||||
/* Return nonzero if VALUE is not a number. */
|
||||
|
||||
int
|
||||
__isnanl (long double value)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
weak_alias (__isnanl, isnanl);
|
||||
const char __invoke_dynamic_linker__[] __attribute__ ((section (".interp")))
|
||||
= RUNTIME_LINKER;
|
||||
@@ -48,6 +48,8 @@ Cambridge, MA 02139, USA. */
|
||||
|
||||
/* Enable declarations of GNU extensions, since we are compiling them. */
|
||||
#define _GNU_SOURCE 1
|
||||
/* And we also need the data for the reentrant functions. */
|
||||
#define _REENTRANT 1
|
||||
|
||||
#include <config.h>
|
||||
/*
|
||||
@@ -202,6 +204,7 @@ extern const char _libc_intl_domainname[];
|
||||
/* This comes between the return type and function name in
|
||||
a function definition to make that definition weak. */
|
||||
#define weak_function __attribute__ ((weak))
|
||||
#define weak_const_function __attribute__ ((weak, __const__))
|
||||
|
||||
#endif /* HAVE_WEAK_SYMBOLS. */
|
||||
#endif /* Not ASSEMBLER, and GCC 2.7 or later. */
|
||||
@@ -213,6 +216,7 @@ extern const char _libc_intl_domainname[];
|
||||
directive for the function symbol, and a `.weak' directive in addition
|
||||
will produce an error from the assembler. */
|
||||
#define weak_function /* empty */
|
||||
#define weak_const_function /* empty */
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
GNU libio by Per Bothner
|
||||
+10
-1
@@ -36,9 +36,18 @@ routines := \
|
||||
\
|
||||
libc_fatal
|
||||
|
||||
include ../Makeconfig
|
||||
|
||||
ifneq (,$(filter %REENTRANT, $(defines)))
|
||||
routines += clearerr_u feof_u ferror_u fputc_u getc_u getchar_u \
|
||||
iofflush_u putc_u putchar_u
|
||||
|
||||
CPPFLAGS += -D_IO_MTSAFE_IO
|
||||
endif
|
||||
|
||||
aux := \
|
||||
cleanup fileops genops stdfiles stdio strops
|
||||
|
||||
distribute := iolibio.h libioP.h strfile.h
|
||||
distribute := iolibio.h libioP.h strfile.h Banner
|
||||
|
||||
include ../Rules
|
||||
|
||||
+2
-2
@@ -24,9 +24,9 @@ clearerr (fp)
|
||||
FILE *fp;
|
||||
{
|
||||
CHECK_FILE (fp, /*nothing*/);
|
||||
flockfile (fp);
|
||||
_IO_flockfile (fp);
|
||||
_IO_clearerr (fp);
|
||||
funlockfile (fp);
|
||||
_IO_funlockfile (fp);
|
||||
}
|
||||
|
||||
#ifdef _IO_MTSAFE_IO
|
||||
|
||||
+1
-1
@@ -27,4 +27,4 @@ __clearerr_unlocked (fp)
|
||||
_IO_clearerr (fp);
|
||||
}
|
||||
|
||||
weak_alias (clearerr_unlocked, __clearerr_unlocked)
|
||||
weak_alias (__clearerr_unlocked, clearerr_unlocked)
|
||||
|
||||
@@ -24,6 +24,8 @@ the executable file might be covered by the GNU General Public License. */
|
||||
#include "libioP.h"
|
||||
#include "stdio.h"
|
||||
|
||||
#undef feof_unlocked
|
||||
|
||||
int
|
||||
feof_unlocked (fp)
|
||||
_IO_FILE* fp;
|
||||
|
||||
@@ -24,6 +24,8 @@ the executable file might be covered by the GNU General Public License. */
|
||||
#include "libioP.h"
|
||||
#include "stdio.h"
|
||||
|
||||
#undef ferror_unlocked
|
||||
|
||||
int
|
||||
ferror_unlocked (fp)
|
||||
_IO_FILE* fp;
|
||||
|
||||
+3
-2
@@ -31,8 +31,9 @@ fgetc (fp)
|
||||
{
|
||||
int result;
|
||||
CHECK_FILE (fp, EOF);
|
||||
flockfile (fp);
|
||||
__libc_cleanup_region_start (_IO_funlockfile, fp);
|
||||
_IO_flockfile (fp);
|
||||
result = _IO_getc_unlocked (fp);
|
||||
funlockfile (fp);
|
||||
__libc_cleanup_region_end (1);
|
||||
return result;
|
||||
}
|
||||
|
||||
+2
-2
@@ -42,6 +42,6 @@ fileno (fp)
|
||||
it only accesses once a single variable and this is already atomic
|
||||
(at least at thread level). */
|
||||
|
||||
weak_alias (fileno_unlocked, fileno)
|
||||
weak_alias (fileno_locked, fileno)
|
||||
weak_alias (fileno, fileno_unlocked)
|
||||
weak_alias (fileno, fileno_locked)
|
||||
#endif
|
||||
|
||||
+4
-1
@@ -32,8 +32,11 @@ fputc (c, fp)
|
||||
{
|
||||
int result;
|
||||
CHECK_FILE (fp, EOF);
|
||||
__libc_cleanup_region_start (&_IO_funlockfile, fp);
|
||||
_IO_flockfile (fp);
|
||||
result = _IO_putc_unlocked (c, fp);
|
||||
_IO_funlockfile (fp);
|
||||
__libc_cleanup_region_end (1);
|
||||
return result;
|
||||
}
|
||||
|
||||
weak_alias (fputc, fputc_locked)
|
||||
|
||||
+1
-1
@@ -36,4 +36,4 @@ __fputc_unlocked (c, fp)
|
||||
return _IO_putc_unlocked (c, fp);
|
||||
}
|
||||
|
||||
weak_alias (fputc_unlocked, __fputc_unlocked)
|
||||
weak_alias (__fputc_unlocked, fputc_unlocked)
|
||||
|
||||
+3
-2
@@ -35,8 +35,9 @@ freopen (filename, mode, fp)
|
||||
CHECK_FILE (fp, NULL);
|
||||
if (!(fp->_flags & _IO_IS_FILEBUF))
|
||||
return NULL;
|
||||
flockfile (fp);
|
||||
__libc_cleanup_region_start (&_IO_funlockfile, fp);
|
||||
_IO_flockfile (fp);
|
||||
result = _IO_freopen (filename, mode, fp);
|
||||
funlockfile (fp);
|
||||
__libc_cleanup_region_end (1);
|
||||
return result;
|
||||
}
|
||||
|
||||
+5
-4
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright (C) 1993, 1995 Free Software Foundation
|
||||
Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of the GNU IO Library. This library is free
|
||||
software; you can redistribute it and/or modify it under the
|
||||
@@ -22,8 +22,8 @@ the resulting executable to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why
|
||||
the executable file might be covered by the GNU General Public License. */
|
||||
|
||||
#include "stdio.h"
|
||||
#include "libioP.h"
|
||||
#include "stdio.h"
|
||||
|
||||
int
|
||||
fseek (fp, offset, whence)
|
||||
@@ -33,8 +33,9 @@ fseek (fp, offset, whence)
|
||||
{
|
||||
int result;
|
||||
CHECK_FILE (fp, -1);
|
||||
flockfile (fp);
|
||||
__libc_cleanup_region_start (&_IO_funlockfile, fp);
|
||||
_IO_flockfile (fp);
|
||||
result = _IO_fseek (fp, offset, whence);
|
||||
funlockfile (fp);
|
||||
__libc_cleanup_region_end (1);
|
||||
return result;
|
||||
}
|
||||
|
||||
+2
-2
@@ -466,7 +466,7 @@ DEFUN(_IO_init, (fp, flags),
|
||||
fp->_markers = NULL;
|
||||
fp->_cur_column = 0;
|
||||
#ifdef _IO_MTSAFE_IO
|
||||
_IO_mutex_init (fp->_lock);
|
||||
__libc_lock_init (fp->_lock);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -501,7 +501,7 @@ DEFUN(_IO_default_finish, (fp),
|
||||
}
|
||||
|
||||
#ifdef _IO_MTSAFE_IO
|
||||
_IO_mutex_destroy (fp->_lock);
|
||||
__libc_lock_fini (fp->_lock);
|
||||
#endif
|
||||
|
||||
_IO_un_link(fp);
|
||||
|
||||
+3
-2
@@ -33,14 +33,15 @@ getc (fp)
|
||||
{
|
||||
int result;
|
||||
CHECK_FILE (fp, EOF);
|
||||
__libc_cleanup_region_start (&_IO_funlockfile, fp);
|
||||
_IO_flockfile (fp);
|
||||
result = _IO_getc_unlocked (fp);
|
||||
_IO_funlockfile (fp);
|
||||
__libc_cleanup_region_end (1);
|
||||
return result;
|
||||
}
|
||||
|
||||
#ifdef _IO_MTSAFE_IO
|
||||
# undef getc_locked
|
||||
|
||||
weak_alias (getc_locked, getc)
|
||||
weak_alias (getc, getc_locked)
|
||||
#endif
|
||||
|
||||
+1
-1
@@ -35,4 +35,4 @@ __getc_unlocked (fp)
|
||||
return _IO_getc_unlocked (fp);
|
||||
}
|
||||
|
||||
weak_alias (getc_unlocked, __getc_unlocked)
|
||||
weak_alias (__getc_unlocked, getc_unlocked)
|
||||
|
||||
+3
-2
@@ -31,14 +31,15 @@ int
|
||||
getchar ()
|
||||
{
|
||||
int result;
|
||||
__libc_cleanup_region_start (&_IO_funlockfile, stdin);
|
||||
_IO_flockfile (stdin);
|
||||
result = _IO_getc_unlocked (stdin);
|
||||
_IO_funlockfile (stdin);
|
||||
__libc_cleanup_region_end (1);
|
||||
return result;
|
||||
}
|
||||
|
||||
#ifdef _IO_MTSAFE_IO
|
||||
# undef getchar_locked
|
||||
|
||||
weak_alias (getchar_locked, getchar)
|
||||
weak_alias (getchar, getchar_locked)
|
||||
#endif
|
||||
|
||||
+1
-1
@@ -33,4 +33,4 @@ __getchar_unlocked ()
|
||||
return _IO_getc_unlocked (stdin);
|
||||
}
|
||||
|
||||
weak_alias (getchar_unlocked, __getchar_unlocked)
|
||||
weak_alias (__getchar_unlocked, getchar_unlocked)
|
||||
|
||||
+2
-1
@@ -35,6 +35,7 @@ _IO_fclose (fp)
|
||||
|
||||
CHECK_FILE(fp, EOF);
|
||||
|
||||
__libc_cleanup_region_start (&_IO_funlockfile, fp);
|
||||
_IO_flockfile (fp);
|
||||
if (fp->_IO_file_flags & _IO_IS_FILEBUF)
|
||||
status = _IO_file_close_it (fp);
|
||||
@@ -46,7 +47,7 @@ _IO_fclose (fp)
|
||||
fp->_IO_file_flags = 0;
|
||||
free(fp);
|
||||
}
|
||||
_IO_funlockfile (fp);
|
||||
__libc_cleanup_region_end (1);
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
+24
-15
@@ -39,7 +39,13 @@ _IO_fdopen (fd, mode)
|
||||
{
|
||||
int read_write;
|
||||
int posix_mode = 0;
|
||||
struct _IO_FILE_plus *fp;
|
||||
struct locked_FILE
|
||||
{
|
||||
struct _IO_FILE_plus fp;
|
||||
#ifdef _IO_MTSAFE_IO
|
||||
_IO_lock_t lock;
|
||||
#endif
|
||||
} *new_f;
|
||||
int fd_flags;
|
||||
|
||||
switch (*mode++)
|
||||
@@ -97,28 +103,31 @@ _IO_fdopen (fd, mode)
|
||||
}
|
||||
#endif
|
||||
|
||||
fp = (struct _IO_FILE_plus *) malloc (sizeof (struct _IO_FILE_plus));
|
||||
if (fp == NULL)
|
||||
new_f = (struct locked_FILE *) malloc (sizeof (struct locked_FILE));
|
||||
if (new_f == NULL)
|
||||
return NULL;
|
||||
_IO_init (&fp->file, 0);
|
||||
_IO_JUMPS (&fp->file) = &_IO_file_jumps;
|
||||
_IO_file_init (&fp->file);
|
||||
#if !_IO_UNIFIED_JUMPTABLES
|
||||
fp->vtable = NULL;
|
||||
#ifdef _IO_MTSAFE_IO
|
||||
new_f->fp.file._lock = &new_f->lock;
|
||||
#endif
|
||||
if (_IO_file_attach (&fp->file, fd) == NULL)
|
||||
_IO_init (&new_f->fp.file, 0);
|
||||
_IO_JUMPS (&new_f->fp.file) = &_IO_file_jumps;
|
||||
_IO_file_init (&new_f->fp.file);
|
||||
#if !_IO_UNIFIED_JUMPTABLES
|
||||
new_f->fp.vtable = NULL;
|
||||
#endif
|
||||
if (_IO_file_attach (&new_f->fp.file, fd) == NULL)
|
||||
{
|
||||
_IO_un_link (&fp->file);
|
||||
free (fp);
|
||||
_IO_un_link (&new_f->fp.file);
|
||||
free (new_f);
|
||||
return NULL;
|
||||
}
|
||||
fp->file._flags &= ~_IO_DELETE_DONT_CLOSE;
|
||||
new_f->fp.file._flags &= ~_IO_DELETE_DONT_CLOSE;
|
||||
|
||||
fp->file._IO_file_flags =
|
||||
_IO_mask_flags (&fp->file, read_write,
|
||||
new_f->fp.file._IO_file_flags =
|
||||
_IO_mask_flags (&new_f->fp.file, read_write,
|
||||
_IO_NO_READS+_IO_NO_WRITES+_IO_IS_APPENDING);
|
||||
|
||||
return (_IO_FILE *) fp;
|
||||
return (_IO_FILE *) &new_f->fp;
|
||||
}
|
||||
|
||||
weak_alias (_IO_fdopen, fdopen)
|
||||
|
||||
+4
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright (C) 1993, 1995 Free Software Foundation
|
||||
Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of the GNU IO Library. This library is free
|
||||
software; you can redistribute it and/or modify it under the
|
||||
@@ -33,10 +33,11 @@ _IO_fflush (fp)
|
||||
else
|
||||
{
|
||||
int result;
|
||||
_IO_flockfile (fp);
|
||||
CHECK_FILE (fp, EOF);
|
||||
__libc_cleanup_region_start (&_IO_funlockfile, fp);
|
||||
_IO_flockfile (fp);
|
||||
result = _IO_SYNC (fp) ? EOF : 0;
|
||||
_IO_funlockfile (fp);
|
||||
__libc_cleanup_region_end (1);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
+3
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright (C) 1993, 1995 Free Software Foundation
|
||||
Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of the GNU IO Library. This library is free
|
||||
software; you can redistribute it and/or modify it under the
|
||||
@@ -33,9 +33,10 @@ _IO_fgetpos (fp, posp)
|
||||
{
|
||||
_IO_fpos_t pos;
|
||||
CHECK_FILE (fp, EOF);
|
||||
__libc_cleanup_region_start (&_IO_funlockfile, fp);
|
||||
_IO_flockfile (fp);
|
||||
pos = _IO_seekoff (fp, 0, _IO_seek_cur, 0);
|
||||
_IO_funlockfile (fp);
|
||||
__libc_cleanup_region_end (1);
|
||||
if (pos == _IO_pos_BAD)
|
||||
{
|
||||
#ifdef EIO
|
||||
|
||||
+3
-2
@@ -35,7 +35,8 @@ _IO_fgets (buf, n, fp)
|
||||
CHECK_FILE (fp, NULL);
|
||||
if (n <= 0)
|
||||
return NULL;
|
||||
_IO_flockfile (fp);
|
||||
__libc_cleanup_region_start (&__funlockfile, fp);
|
||||
__flockfile (fp);
|
||||
count = _IO_getline (fp, buf, n - 1, '\n', 1);
|
||||
if (count == 0 || (fp->_IO_file_flags & _IO_ERR_SEEN))
|
||||
result = NULL;
|
||||
@@ -44,7 +45,7 @@ _IO_fgets (buf, n, fp)
|
||||
buf[count] = '\0';
|
||||
result = buf;
|
||||
}
|
||||
_IO_funlockfile (fp);
|
||||
__libc_cleanup_region_end (1);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
Copyright (C) 1996 Free Software Foundation
|
||||
|
||||
This file is part of the GNU IO Library. This 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 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This 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 this library; see the file COPYING. If not, write to the Free
|
||||
Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
As a special exception, if you link this library with files
|
||||
compiled with a GNU compiler to produce an executable, this does not cause
|
||||
the resulting executable to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why
|
||||
the executable file might be covered by the GNU General Public License. */
|
||||
|
||||
#include "libioP.h"
|
||||
#include <libc-lock.h>
|
||||
|
||||
void
|
||||
_IO_flockfile (s)
|
||||
_IO_FILE *s;
|
||||
{
|
||||
__libc_lock_lock (s->_lock);
|
||||
}
|
||||
weak_alias (_IO_flockfile, flockfile)
|
||||
|
||||
|
||||
void
|
||||
_IO_funlockfile (s)
|
||||
_IO_FILE *s;
|
||||
{
|
||||
__libc_lock_unlock (s->_lock);
|
||||
}
|
||||
weak_alias (_IO_funlockfile, funlockfile)
|
||||
+22
-13
@@ -32,20 +32,29 @@ _IO_fopen (filename, mode)
|
||||
const char *filename;
|
||||
const char *mode;
|
||||
{
|
||||
struct _IO_FILE_plus *fp =
|
||||
(struct _IO_FILE_plus *) malloc (sizeof (struct _IO_FILE_plus));
|
||||
if (fp == NULL)
|
||||
return NULL;
|
||||
_IO_init (&fp->file, 0);
|
||||
_IO_JUMPS (&fp->file) = &_IO_file_jumps;
|
||||
_IO_file_init (&fp->file);
|
||||
#if !_IO_UNIFIED_JUMPTABLES
|
||||
fp->vtable = NULL;
|
||||
struct locked_FILE
|
||||
{
|
||||
struct _IO_FILE_plus fp;
|
||||
#ifdef _IO_MTSAFE_IO
|
||||
_IO_lock_t lock;
|
||||
#endif
|
||||
if (_IO_file_fopen (&fp->file, filename, mode) != NULL)
|
||||
return (_IO_FILE *) fp;
|
||||
_IO_un_link (&fp->file);
|
||||
free (fp);
|
||||
} *new_f = (struct locked_FILE *) malloc (sizeof (struct locked_FILE));
|
||||
|
||||
if (new_f == NULL)
|
||||
return NULL;
|
||||
#ifdef _IO_MTSAFE_IO
|
||||
new_f->fp.file._lock = &new_f->lock;
|
||||
#endif
|
||||
_IO_init (&new_f->fp.file, 0);
|
||||
_IO_JUMPS (&new_f->fp.file) = &_IO_file_jumps;
|
||||
_IO_file_init (&new_f->fp.file);
|
||||
#if !_IO_UNIFIED_JUMPTABLES
|
||||
new_f->fp.vtable = NULL;
|
||||
#endif
|
||||
if (_IO_file_fopen (&new_f->fp.file, filename, mode) != NULL)
|
||||
return (_IO_FILE *) &new_f->fp;
|
||||
_IO_un_link (&new_f->fp.file);
|
||||
free (new_f);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
+20
-12
@@ -128,7 +128,13 @@ fopencookie (cookie, mode, io_functions)
|
||||
_IO_cookie_io_functions_t io_functions;
|
||||
{
|
||||
int read_write;
|
||||
struct _IO_cookie_file *cfile;
|
||||
struct locked_FILE
|
||||
{
|
||||
struct _IO_cookie_file cfile;
|
||||
#ifdef _IO_MTSAFE_IO
|
||||
_IO_lock_t lock;
|
||||
#endif
|
||||
} *new_f;
|
||||
|
||||
switch (*mode++)
|
||||
{
|
||||
@@ -147,21 +153,23 @@ fopencookie (cookie, mode, io_functions)
|
||||
if (mode[0] == '+' || (mode[0] == 'b' && mode[1] == '+'))
|
||||
read_write &= _IO_IS_APPENDING;
|
||||
|
||||
cfile = (struct _IO_cookie_file *) malloc (sizeof (struct _IO_cookie_file));
|
||||
if (cfile == NULL)
|
||||
new_f = (struct locked_FILE *) malloc (sizeof (struct locked_FILE));
|
||||
if (new_f == NULL)
|
||||
return NULL;
|
||||
#ifdef _IO_MTSAFE_IO
|
||||
new_f->cfile.file._lock = &new_f->lock;
|
||||
#endif
|
||||
|
||||
_IO_init (&cfile->file, 0);
|
||||
_IO_JUMPS (&cfile->file) = &_IO_cookie_jumps;
|
||||
cfile->cookie = cookie;
|
||||
cfile->io_functions = io_functions;
|
||||
_IO_init (&new_f->cfile.file, 0);
|
||||
_IO_JUMPS (&new_f->cfile.file) = &_IO_cookie_jumps;
|
||||
new_f->cfile.cookie = cookie;
|
||||
new_f->cfile.io_functions = io_functions;
|
||||
|
||||
_IO_file_init(&cfile->file);
|
||||
_IO_file_init(&new_f->cfile.file);
|
||||
|
||||
cfile->file._IO_file_flags =
|
||||
_IO_mask_flags (&cfile->file, read_write,
|
||||
new_f->cfile.file._IO_file_flags =
|
||||
_IO_mask_flags (&new_f->cfile.file, read_write,
|
||||
_IO_NO_READS+_IO_NO_WRITES+_IO_IS_APPENDING);
|
||||
|
||||
return &cfile->file;
|
||||
return &new_f->cfile.file;
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -33,12 +33,13 @@ _IO_fputs (str, fp)
|
||||
_IO_size_t len = strlen (str);
|
||||
int result;
|
||||
CHECK_FILE (fp, EOF);
|
||||
__libc_cleanup_region_start (&_IO_funlockfile, fp);
|
||||
_IO_flockfile (fp);
|
||||
if (_IO_sputn (fp, str, len) != len)
|
||||
result = EOF;
|
||||
else
|
||||
result = 1;
|
||||
_IO_funlockfile (fp);
|
||||
__libc_cleanup_region_end (1);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -36,9 +36,10 @@ _IO_fread (buf, size, count, fp)
|
||||
CHECK_FILE (fp, 0);
|
||||
if (bytes_requested == 0)
|
||||
return 0;
|
||||
__libc_cleanup_region_start (&_IO_funlockfile, fp);
|
||||
_IO_flockfile (fp);
|
||||
bytes_read = _IO_sgetn (fp, (char *) buf, bytes_requested);
|
||||
_IO_funlockfile (fp);
|
||||
__libc_cleanup_region_end (1);
|
||||
return bytes_requested == bytes_read ? count : bytes_read / size;
|
||||
}
|
||||
weak_alias (_IO_fread, fread)
|
||||
|
||||
+2
-1
@@ -32,6 +32,7 @@ _IO_fsetpos (fp, posp)
|
||||
{
|
||||
int result;
|
||||
CHECK_FILE (fp, EOF);
|
||||
__libc_cleanup_region_start (&_IO_funlockfile, fp);
|
||||
_IO_flockfile (fp);
|
||||
if (_IO_seekpos (fp, *posp, _IOS_INPUT|_IOS_OUTPUT) == _IO_pos_BAD)
|
||||
{
|
||||
@@ -44,7 +45,7 @@ _IO_fsetpos (fp, posp)
|
||||
}
|
||||
else
|
||||
result = 0;
|
||||
_IO_funlockfile (fp);
|
||||
__libc_cleanup_region_end (1);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
+3
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright (C) 1993, 1995 Free Software Foundation
|
||||
Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of the GNU IO Library. This library is free
|
||||
software; you can redistribute it and/or modify it under the
|
||||
@@ -32,9 +32,10 @@ _IO_ftell (fp)
|
||||
{
|
||||
_IO_pos_t pos;
|
||||
CHECK_FILE (fp, -1L);
|
||||
__libc_cleanup_region_start (&_IO_funlockfile, fp);
|
||||
_IO_flockfile (fp);
|
||||
pos = _IO_seekoff (fp, 0, _IO_seek_cur, 0);
|
||||
_IO_funlockfile (fp);
|
||||
__libc_cleanup_region_end (1);
|
||||
if (pos == _IO_pos_BAD)
|
||||
{
|
||||
#ifdef EIO
|
||||
|
||||
+3
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright (C) 1993 Free Software Foundation
|
||||
Copyright (C) 1993, 1996 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of the GNU IO Library. This library is free
|
||||
software; you can redistribute it and/or modify it under the
|
||||
@@ -36,9 +36,10 @@ _IO_fwrite (buf, size, count, fp)
|
||||
CHECK_FILE (fp, 0);
|
||||
if (request == 0)
|
||||
return 0;
|
||||
__libc_cleanup_region_start (&_IO_funlockfile, fp);
|
||||
_IO_flockfile (fp);
|
||||
written = _IO_sputn (fp, (const char *) buf, request);
|
||||
_IO_funlockfile (fp);
|
||||
__libc_cleanup_region_end (1);
|
||||
/* Many traditional implementations return 0 if size==0 && count > 0,
|
||||
but ANSI seems to require us to return count in this case. */
|
||||
if (written == request)
|
||||
|
||||
+3
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright (C) 1994 Free Software Foundation
|
||||
Copyright (C) 1994, 1996 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of the GNU IO Library. This library is free
|
||||
software; you can redistribute it and/or modify it under the
|
||||
@@ -54,6 +54,7 @@ _IO_getdelim (lineptr, n, delimiter, fp)
|
||||
return -1;
|
||||
}
|
||||
CHECK_FILE (fp, -1);
|
||||
__libc_cleanup_region_start (&_IO_funlockfile, fp);
|
||||
_IO_flockfile (fp);
|
||||
if (_IO_ferror_unlocked (fp))
|
||||
{
|
||||
@@ -115,7 +116,7 @@ _IO_getdelim (lineptr, n, delimiter, fp)
|
||||
result = cur_len;
|
||||
|
||||
unlock_return:
|
||||
_IO_funlockfile (fp);
|
||||
__libc_cleanup_region_end (1);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
+3
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright (C) 1993 Free Software Foundation
|
||||
Copyright (C) 1993, 1996 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of the GNU IO Library. This library is free
|
||||
software; you can redistribute it and/or modify it under the
|
||||
@@ -32,6 +32,7 @@ _IO_gets (buf)
|
||||
_IO_size_t count;
|
||||
int ch;
|
||||
|
||||
__libc_cleanup_region_start (&_IO_funlockfile, _IO_stdin);
|
||||
_IO_flockfile (_IO_stdin);
|
||||
ch = _IO_getc_unlocked (_IO_stdin);
|
||||
if (ch == EOF)
|
||||
@@ -45,7 +46,7 @@ _IO_gets (buf)
|
||||
if (_IO_stdin->_IO_file_flags & _IO_ERR_SEEN)
|
||||
return NULL;
|
||||
}
|
||||
_IO_funlockfile (_IO_stdin);
|
||||
__libc_cleanup_region_end (1);
|
||||
buf[count] = 0;
|
||||
return buf;
|
||||
}
|
||||
|
||||
+16
-4
@@ -149,10 +149,22 @@ _IO_FILE *
|
||||
DEFUN(_IO_popen, (command, mode),
|
||||
const char *command AND const char *mode)
|
||||
{
|
||||
_IO_proc_file *fpx = (_IO_proc_file*)malloc(sizeof(_IO_proc_file));
|
||||
_IO_FILE *fp = (_IO_FILE*)fpx;
|
||||
if (fp == NULL)
|
||||
struct locked_FILE
|
||||
{
|
||||
struct _IO_proc_file fpx;
|
||||
#ifdef _IO_MTSAFE_IO
|
||||
_IO_lock_t lock;
|
||||
#endif
|
||||
} *new_f;
|
||||
_IO_FILE *fp;
|
||||
|
||||
new_f = (struct locked_FILE *) malloc (sizeof (struct locked_FILE));
|
||||
if (new_f == NULL)
|
||||
return NULL;
|
||||
#ifdef _IO_MTSAFE_IO
|
||||
new_f->fpx.file.file._lock = &new_f->lock;
|
||||
#endif
|
||||
fp = (_IO_FILE*)&new_f->fpx;
|
||||
_IO_init(fp, 0);
|
||||
_IO_JUMPS(fp) = &_IO_proc_jumps;
|
||||
_IO_file_init(fp);
|
||||
@@ -161,7 +173,7 @@ DEFUN(_IO_popen, (command, mode),
|
||||
#endif
|
||||
if (_IO_proc_open (fp, command, mode) != NULL)
|
||||
return fp;
|
||||
free (fpx);
|
||||
free (new_f);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
+3
-2
@@ -30,13 +30,14 @@ _IO_puts (str)
|
||||
{
|
||||
int result;
|
||||
_IO_size_t len = strlen (str);
|
||||
_IO_flockfile (fp);
|
||||
__libc_cleanup_region_start (&_IO_funlockfile, _IO_stdout);
|
||||
_IO_flockfile (_IO_stdout);
|
||||
if (_IO_sputn (_IO_stdout, str, len) == len
|
||||
&& _IO_putc_unlocked ('\n', _IO_stdout) != EOF)
|
||||
result = len + 1;
|
||||
else
|
||||
result = EOF;
|
||||
_IO_funlockfile (fp);
|
||||
__libc_cleanup_region_end (1);
|
||||
return result;
|
||||
}
|
||||
weak_alias (_IO_puts, puts)
|
||||
|
||||
+2
-1
@@ -31,12 +31,13 @@ _IO_setbuffer (fp, buf, size)
|
||||
_IO_size_t size;
|
||||
{
|
||||
CHECK_FILE (fp, );
|
||||
__libc_cleanup_region_start (&_IO_funlockfile, fp);
|
||||
_IO_flockfile (fp);
|
||||
fp->_flags &= ~_IO_LINE_BUF;
|
||||
if (!buf)
|
||||
size = 0;
|
||||
(void) _IO_SETBUF (fp, buf, size);
|
||||
_IO_funlockfile (fp);
|
||||
__libc_cleanup_region_end (1);
|
||||
}
|
||||
|
||||
weak_alias (_IO_setbuffer, setbuffer)
|
||||
|
||||
+3
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright (C) 1993 Free Software Foundation
|
||||
Copyright (C) 1993, 1996 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of the GNU IO Library. This library is free
|
||||
software; you can redistribute it and/or modify it under the
|
||||
@@ -37,6 +37,7 @@ _IO_setvbuf (fp, buf, mode, size)
|
||||
{
|
||||
int result;
|
||||
CHECK_FILE (fp, EOF);
|
||||
__libc_cleanup_region_start (&_IO_funlockfile, fp);
|
||||
_IO_flockfile (fp);
|
||||
switch (mode)
|
||||
{
|
||||
@@ -88,7 +89,7 @@ _IO_setvbuf (fp, buf, mode, size)
|
||||
}
|
||||
result = _IO_SETBUF (fp, buf, size) == NULL ? EOF : 0;
|
||||
unlock_return:
|
||||
_IO_funlockfile (fp);
|
||||
__libc_cleanup_region_end (1);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -33,9 +33,10 @@ _IO_ungetc (c, fp)
|
||||
CHECK_FILE (fp, EOF);
|
||||
if (c == EOF)
|
||||
return EOF;
|
||||
__libc_cleanup_region_start (&_IO_funlockfile, fp);
|
||||
_IO_flockfile (fp);
|
||||
result = _IO_sputbackc (fp, (unsigned char) c);
|
||||
_IO_funlockfile (fp);
|
||||
__libc_cleanup_region_end (1);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,14 @@ _IO_vsprintf (string, format, args)
|
||||
_IO_va_list args;
|
||||
{
|
||||
_IO_strfile sf;
|
||||
#ifdef _IO_MTSAFE_IO
|
||||
_IO_lock_t lock;
|
||||
#endif
|
||||
int ret;
|
||||
|
||||
#ifdef _IO_MTSAFE_IO
|
||||
sf._f._lock = &lock;
|
||||
#endif
|
||||
_IO_init ((_IO_FILE *) &sf, 0);
|
||||
_IO_JUMPS ((_IO_FILE *) &sf) = &_IO_str_jumps;
|
||||
_IO_str_init_static ((_IO_FILE *) &sf, string, -1, string);
|
||||
|
||||
@@ -30,6 +30,10 @@ DEFUN(_IO_vsscanf, (string, format, args),
|
||||
const char *string AND const char *format AND _IO_va_list args)
|
||||
{
|
||||
_IO_strfile sf;
|
||||
#ifdef _IO_MTSAFE_IO
|
||||
_IO_lock_t lock;
|
||||
sf._f._lock = &lock;
|
||||
#endif
|
||||
_IO_init((_IO_FILE*)&sf, 0);
|
||||
_IO_JUMPS((_IO_FILE*)&sf) = &_IO_str_jumps;
|
||||
_IO_str_init_static ((_IO_FILE*)&sf, (char*)string, 0, NULL);
|
||||
|
||||
+3
-3
@@ -150,7 +150,7 @@ typedef struct
|
||||
|
||||
/* Handle lock. */
|
||||
#ifdef _IO_MTSAFE_IO
|
||||
typedef pthread_mutex_t _IO_lock_t;
|
||||
#include <stdio-lock.h>
|
||||
#else
|
||||
typedef void _IO_lock_t;
|
||||
#endif
|
||||
@@ -272,10 +272,10 @@ extern int _IO_putc_locked __P ((int, _IO_FILE *));
|
||||
extern void _IO_flockfile __P ((_IO_FILE *));
|
||||
extern void _IO_funlockfile __P ((_IO_FILE *));
|
||||
|
||||
#if !defined(_REENTRANT) && !defined(_THREAD_SAFE)
|
||||
#ifndef _IO_MTSAFE_IO
|
||||
# define _IO_flockfile(FILE) /**/
|
||||
# define _IO_funlockfile(FILE) /**/
|
||||
#endif /* _REENTRANT || _THREAD_SAFE */
|
||||
#endif /* !_IO_MTSAFE_IO */
|
||||
|
||||
|
||||
extern int _IO_vfscanf __P((_IO_FILE*, const char*, _IO_va_list, int*));
|
||||
|
||||
+10
-1
@@ -26,6 +26,7 @@ the executable file might be covered by the GNU General Public License. */
|
||||
#ifndef errno
|
||||
extern int errno;
|
||||
#endif
|
||||
#include <libc-lock.h>
|
||||
|
||||
#include "iolibio.h"
|
||||
|
||||
@@ -341,10 +342,18 @@ extern int _IO_vscanf __P((const char *, _IO_va_list));
|
||||
#else
|
||||
#define _IO_FJUMP &_IO_file_jumps,
|
||||
#endif
|
||||
#ifdef _IO_MTSAFE_IO
|
||||
/* check following! */
|
||||
#define FILEBUF_LITERAL(CHAIN, FLAGS, FD) \
|
||||
{ _IO_MAGIC+_IO_LINKED+_IO_IS_FILEBUF+FLAGS, \
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, CHAIN, _IO_FJUMP FD}
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, CHAIN, _IO_FJUMP FD, \
|
||||
0, 0, 0, 0, { 0 }, &_IO_stdfile_##FD##_lock }
|
||||
#else
|
||||
/* check following! */
|
||||
#define FILEBUF_LITERAL(CHAIN, FLAGS, FD) \
|
||||
{ _IO_MAGIC+_IO_LINKED+_IO_IS_FILEBUF+FLAGS, \
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, CHAIN, _IO_FJUMP FD }
|
||||
#endif
|
||||
|
||||
/* VTABLE_LABEL defines NAME as of the CLASS class.
|
||||
CNLENGTH is strlen(#CLASS). */
|
||||
|
||||
+22
-14
@@ -16,8 +16,8 @@ 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 "strfile.h"
|
||||
#include "libioP.h"
|
||||
#include "strfile.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
@@ -64,26 +64,34 @@ open_memstream (bufloc, sizeloc)
|
||||
char **bufloc;
|
||||
_IO_size_t *sizeloc;
|
||||
{
|
||||
struct _IO_FILE_memstream *fp;
|
||||
struct locked_FILE
|
||||
{
|
||||
struct _IO_FILE_memstream fp;
|
||||
#ifdef _IO_MTSAFE_IO
|
||||
_IO_lock_t lock;
|
||||
#endif
|
||||
} *new_f;
|
||||
char *buf;
|
||||
|
||||
fp = (struct _IO_FILE_memstream *)
|
||||
malloc (sizeof (struct _IO_FILE_memstream));
|
||||
if (fp == NULL)
|
||||
new_f = (struct locked_FILE *) malloc (sizeof (struct locked_FILE));
|
||||
if (new_f == NULL)
|
||||
return NULL;
|
||||
#ifdef _IO_MTSAFE_IO
|
||||
new_f->fp._sf._f._lock = &new_f->lock;
|
||||
#endif
|
||||
|
||||
buf = ALLOC_BUF (_IO_BUFSIZ);
|
||||
_IO_init (&fp->_sf._f, 0);
|
||||
_IO_JUMPS (&fp->_sf._f) = &_IO_mem_jumps;
|
||||
_IO_str_init_static (&fp->_sf._f, buf, _IO_BUFSIZ, buf);
|
||||
fp->_sf._f._flags &= ~_IO_USER_BUF;
|
||||
fp->_sf._s._allocate_buffer = (_IO_alloc_type) malloc;
|
||||
fp->_sf._s._free_buffer = (_IO_free_type) free;
|
||||
_IO_init (&new_f->fp._sf._f, 0);
|
||||
_IO_JUMPS (&new_f->fp._sf._f) = &_IO_mem_jumps;
|
||||
_IO_str_init_static (&new_f->fp._sf._f, buf, _IO_BUFSIZ, buf);
|
||||
new_f->fp._sf._f._flags &= ~_IO_USER_BUF;
|
||||
new_f->fp._sf._s._allocate_buffer = (_IO_alloc_type) malloc;
|
||||
new_f->fp._sf._s._free_buffer = (_IO_free_type) free;
|
||||
|
||||
fp->bufloc = bufloc;
|
||||
fp->sizeloc = sizeloc;
|
||||
new_f->fp.bufloc = bufloc;
|
||||
new_f->fp.sizeloc = sizeloc;
|
||||
|
||||
return &fp->_sf._f;
|
||||
return &new_f->fp._sf._f;
|
||||
}
|
||||
|
||||
|
||||
|
||||
+3
-2
@@ -28,14 +28,15 @@ putc (c, fp)
|
||||
{
|
||||
int result;
|
||||
CHECK_FILE (fp, EOF);
|
||||
__libc_cleanup_region_start (&_IO_funlockfile, fp);
|
||||
_IO_flockfile (fp);
|
||||
result = _IO_putc_unlocked (c, fp);
|
||||
_IO_funlockfile (fp);
|
||||
__libc_cleanup_region_end (1);
|
||||
return result;
|
||||
}
|
||||
|
||||
#ifdef _IO_MTSAFE_IO
|
||||
# undef putc_locked
|
||||
|
||||
weak_alias (putc_locked, putc)
|
||||
weak_alias (putc, putc_locked)
|
||||
#endif
|
||||
|
||||
@@ -29,3 +29,7 @@ putc_unlocked (c, fp)
|
||||
CHECK_FILE (fp, EOF);
|
||||
return _IO_putc_unlocked (c, fp);
|
||||
}
|
||||
|
||||
#ifdef _LIBC_REENTRANT
|
||||
weak_alias (putc_unlocked, _IO_putc_unlocked)
|
||||
#endif
|
||||
|
||||
+3
-2
@@ -26,14 +26,15 @@ putchar (c)
|
||||
int c;
|
||||
{
|
||||
int result;
|
||||
__libc_cleanup_region_start (&_IO_funlockfile, _IO_stdout);
|
||||
_IO_flockfile (_IO_stdout);
|
||||
result = _IO_putc_unlocked (c, _IO_stdout);
|
||||
_IO_funlockfile (_IO_stdout);
|
||||
__libc_cleanup_region_end (1);
|
||||
return result;
|
||||
}
|
||||
|
||||
#ifdef _IO_MTSAFE_IO
|
||||
# undef putchar_locked
|
||||
|
||||
weak_alias (putchar_locked, putchar)
|
||||
weak_alias (putchar, putchar_locked)
|
||||
#endif
|
||||
|
||||
+2
-2
@@ -25,6 +25,6 @@ int
|
||||
putchar_unlocked (c)
|
||||
int c;
|
||||
{
|
||||
CHECK_FILE (fp, EOF);
|
||||
return _IO_putc_unlocked (c, fp);
|
||||
CHECK_FILE (stdout, EOF);
|
||||
return _IO_putc_unlocked (c, stdout);
|
||||
}
|
||||
|
||||
+3
-2
@@ -21,15 +21,16 @@ the resulting executable to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why
|
||||
the executable file might be covered by the GNU General Public License. */
|
||||
|
||||
#include "stdio.h"
|
||||
#include "libioP.h"
|
||||
#include "stdio.h"
|
||||
|
||||
void
|
||||
rewind (fp)
|
||||
_IO_FILE* fp;
|
||||
{
|
||||
CHECK_FILE (fp, );
|
||||
__libc_cleanup_region_start (&_IO_funlockfile, fp);
|
||||
_IO_flockfile (fp);
|
||||
_IO_rewind (fp);
|
||||
_IO_funlockfile (fp);
|
||||
__libc_cleanup_region_end (1);
|
||||
}
|
||||
|
||||
+7
-1
@@ -31,10 +31,16 @@ the executable file might be covered by the GNU General Public License. */
|
||||
|
||||
#include "libioP.h"
|
||||
|
||||
|
||||
#ifdef _IO_MTSAFE_IO
|
||||
#define DEF_STDFILE(NAME, FD, CHAIN, FLAGS) \
|
||||
static _IO_lock_t _IO_stdfile_##FD##_lock = _IO_lock_init; \
|
||||
struct _IO_FILE_plus NAME \
|
||||
= {FILEBUF_LITERAL(CHAIN, FLAGS, FD), &_IO_file_jumps}
|
||||
#else
|
||||
#define DEF_STDFILE(NAME, FD, CHAIN, FLAGS) \
|
||||
struct _IO_FILE_plus NAME \
|
||||
= {FILEBUF_LITERAL(CHAIN, FLAGS, FD), &_IO_file_jumps}
|
||||
#endif
|
||||
|
||||
DEF_STDFILE(_IO_stdin_, 0, 0, _IO_NO_WRITES);
|
||||
DEF_STDFILE(_IO_stdout_, 1, &_IO_stdin_.file, _IO_NO_READS);
|
||||
|
||||
+29
-24
@@ -40,7 +40,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#define EOF (-1)
|
||||
#endif
|
||||
#ifndef BUFSIZ
|
||||
#define BUFSIZ 1024
|
||||
#define BUFSIZ _IO_BUFSIZ
|
||||
#endif
|
||||
|
||||
#define _IOFBF 0 /* Fully buffered. */
|
||||
@@ -206,39 +206,44 @@ extern const char *const _sys_errlist[];
|
||||
#endif
|
||||
|
||||
/* Handle locking of streams. */
|
||||
#if defined(_REENTRANT) || defined(_THREAD_SAFE)
|
||||
#ifdef __USE_REENTRANT
|
||||
extern void clearerr_locked __P ((FILE *));
|
||||
extern void clearerr_unlocked __P ((FILE *));
|
||||
extern void fileno_unlocked __P ((FILE *));
|
||||
extern int feof_locked __P ((FILE *));
|
||||
extern int feof_unlocked __P ((FILE *));
|
||||
extern int ferror_locked __P ((FILE*));
|
||||
extern int ferror_unlocked __P ((FILE*));
|
||||
extern int fileno_locked __P ((FILE *));
|
||||
extern int fileno_unlocked __P ((FILE *));
|
||||
extern void flockfile __P ((FILE *));
|
||||
extern void funlockfile __P ((FILE *));
|
||||
extern int fclose_unlocked __P ((FILE *));
|
||||
extern int fflush_locked __P ((FILE *));
|
||||
extern int fflush_unlocked __P ((FILE *));
|
||||
extern size_t fread_unlocked __P ((void *, size_t, size_t, FILE *));
|
||||
extern size_t fwrite_unlocked __P ((const void *, size_t, size_t, FILE *));
|
||||
|
||||
# define getc_unlocked(fp) _IO_getc_unlocked (fp)
|
||||
# define getc_locked(fp) _IO_fgetc (fp)
|
||||
# define getchar_unlocked() getc_unlocked (stdin)
|
||||
# define getchar_locked() getc_locked (stdin)
|
||||
# define getc(fp) getc_locked (fp)
|
||||
extern int fputc_locked __P ((int, FILE*));
|
||||
extern int fputc_unlocked __P ((int, FILE*));
|
||||
extern int getc_locked __P ((FILE *));
|
||||
extern int getc_unlocked __P ((FILE *));
|
||||
extern int getchar_locked __P ((void));
|
||||
extern int getchar_unlocked __P ((void));
|
||||
extern int putc_locked __P ((int, FILE *));
|
||||
extern int putc_unlocked __P ((int, FILE *));
|
||||
extern int putchar_locked __P ((int));
|
||||
extern int putchar_unlocked __P ((int));
|
||||
|
||||
# define putc_unlocked(c, fp) _IO_putc_unlocked (c, fp)
|
||||
# define putc_locked(c, fp) _IO_putc_locked (c, fp)
|
||||
# define putchar_unlocked(c) putc_unlocked (c, stdout)
|
||||
# define putchar_locked(c) putc_locked (c, stdout)
|
||||
# define putc(c, fp) putc_locked (c, fp)
|
||||
# ifndef _LIBC
|
||||
# define getc_unlocked(fp) _IO_getc_unlocked (fp)
|
||||
# define getc_locked(fp) fgetc (fp)
|
||||
# define getchar_unlocked() _IO_getc_unlocked (stdin)
|
||||
# define getchar_locked() getc (stdin)
|
||||
# define putchar_unlocked(c) _IO_putc_unlocked (c, stdout)
|
||||
# define putchar_locked(c) putc (c, stdout)
|
||||
# endif
|
||||
|
||||
# define feof_unlocked(fp) _IO_feof_unlocked (fp)
|
||||
# define ferror_unlocked(fp) _IO_ferror_unlocked (fp)
|
||||
|
||||
#else
|
||||
# define getc(fp) _IO_getc_unlocked (fp)
|
||||
# define putc(c, fp) _IO_putc_unlocked (c, fp)
|
||||
|
||||
#endif /* _REENTRANT || _THREAD_SAFE */
|
||||
|
||||
#define flockfile(FILE) _IO_flockfile (FILE)
|
||||
#define funlockfile(FILE) _IO_funlockfile (FILE)
|
||||
#endif /* __USE_REENTRANT */
|
||||
|
||||
#define putchar(c) putc (c, stdout)
|
||||
#define getchar() getc (stdin)
|
||||
|
||||
@@ -38,10 +38,16 @@ _IO_vasprintf (result_ptr, format, args)
|
||||
const _IO_size_t init_string_size = 100;
|
||||
char *string;
|
||||
_IO_strfile sf;
|
||||
#ifdef _IO_MTSAFE_IO
|
||||
_IO_lock_t lock;
|
||||
#endif
|
||||
int ret;
|
||||
string = ALLOC_BUF(init_string_size);
|
||||
if (string == NULL)
|
||||
return -1;
|
||||
#ifdef _IO_MTSAFE_IO
|
||||
sf._f._lock = &lock;
|
||||
#endif
|
||||
_IO_init((_IO_FILE*)&sf, 0);
|
||||
_IO_JUMPS((_IO_FILE*)&sf) = &_IO_str_jumps;
|
||||
_IO_str_init_static ((_IO_FILE*)&sf, string, init_string_size, string);
|
||||
|
||||
@@ -32,8 +32,14 @@ _IO_vdprintf (d, format, arg)
|
||||
_IO_va_list arg;
|
||||
{
|
||||
struct _IO_FILE_plus tmpfil;
|
||||
#ifdef _IO_MTSAFE_IO
|
||||
_IO_lock_t lock;
|
||||
#endif
|
||||
int done;
|
||||
|
||||
#ifdef _IO_MTSAFE_IO
|
||||
tmpfil.file._lock = &lock;
|
||||
#endif
|
||||
_IO_init (&tmpfil.file, 0);
|
||||
_IO_JUMPS (&tmpfil.file) = &_IO_file_jumps;
|
||||
_IO_file_init (&tmpfil.file);
|
||||
|
||||
@@ -34,6 +34,10 @@ _IO_vsnprintf (string, maxlen, format, args)
|
||||
{
|
||||
_IO_strfile sf;
|
||||
int ret;
|
||||
#ifdef _IO_MTSAFE_IO
|
||||
_IO_lock_t lock;
|
||||
sf._f._lock = &lock;
|
||||
#endif
|
||||
_IO_init ((_IO_FILE *) &sf, 0);
|
||||
_IO_JUMPS ((_IO_FILE *) &sf) = &_IO_str_jumps;
|
||||
_IO_str_init_static ((_IO_FILE *) &sf, string, maxlen - 1, string);
|
||||
|
||||
@@ -25,6 +25,7 @@ headers = locale.h langinfo.h
|
||||
distribute = localeinfo.h categories.def iso-4217.def weight.h \
|
||||
strlen-hash.h \
|
||||
$(addprefix programs/, \
|
||||
locale.c localedef.c \
|
||||
$(localedef-modules:=.c) $(locale-modules:=.c) \
|
||||
$(lib-modules:=.c) config.h simple-hash.h \
|
||||
charmap-kw.gperf charmap-kw.h locfile-token.h \
|
||||
|
||||
+1
-3
@@ -1,6 +1,4 @@
|
||||
/* Define a constant for the dgettext domainname for libc internal messages,
|
||||
so the string constant is not repeated in dozens of object files. */
|
||||
|
||||
#include "../version.h"
|
||||
|
||||
const char _libc_intl_domainname[] = "SYS_GNU_libc-" VERSION;
|
||||
const char _libc_intl_domainname[] = "libc";
|
||||
|
||||
@@ -137,12 +137,15 @@ DEFINE_CATEGORY
|
||||
DEFINE_ELEMENT (D_FMT, "d_fmt", std, string)
|
||||
DEFINE_ELEMENT (T_FMT, "t_fmt", std, string)
|
||||
DEFINE_ELEMENT (T_FMT_AMPM, "t_fmt_ampm", std, string)
|
||||
DEFINE_ELEMENT (ERA, "era", opt, string)
|
||||
DEFINE_ELEMENT (ERA, "era", opt, stringarray, 0, 100)/*XXX*/
|
||||
DEFINE_ELEMENT (ERA_YEAR, "era_year", opt, string)
|
||||
DEFINE_ELEMENT (ERA_D_FMT, "era_d_fmt", opt, string)
|
||||
DEFINE_ELEMENT (ALT_DIGITS, "alt_digits", opt, stringarray, 0, 100)
|
||||
DEFINE_ELEMENT (ERA_D_T_FMT, "era_d_t_fmt", opt, string)
|
||||
DEFINE_ELEMENT (ERA_T_FMT, "era_t_fmt", opt, string)
|
||||
DEFINE_ELEMENT (_NL_TIME_ERA_NUM_ENTRIES, "time-era-num-entries", opt, word)
|
||||
DEFINE_ELEMENT (_NL_TIME_ERA_ENTRIES_EB, "time-era-entries-eb", opt, string)
|
||||
DEFINE_ELEMENT (_NL_TIME_ERA_ENTRIES_EL, "time-era-entries-el", opt, string)
|
||||
), NO_POSTLOAD, NULL, NULL, NULL)
|
||||
|
||||
|
||||
|
||||
@@ -101,6 +101,10 @@ typedef enum
|
||||
ERA_D_T_FMT, /* Date and time in alternate era format. */
|
||||
ERA_T_FMT, /* Time in alternate era format. */
|
||||
|
||||
_NL_TIME_ERA_NUM_ENTRIES, /* Number entries in the era arrays. */
|
||||
_NL_TIME_ERA_ENTRIES_EB, /* Structure with era entries in usable form.*/
|
||||
_NL_TIME_ERA_ENTRIES_EL,
|
||||
|
||||
_NL_NUM_LC_TIME, /* Number of indices in LC_TIME category. */
|
||||
|
||||
/* LC_COLLATE category: text sorting.
|
||||
|
||||
@@ -217,21 +217,3 @@ _nl_load_locale (struct loaded_l10nfile *file, int category)
|
||||
__close (fd);
|
||||
file->data = newdata;
|
||||
}
|
||||
|
||||
void
|
||||
_nl_free_locale (const struct locale_data *data)
|
||||
{
|
||||
int save = errno;
|
||||
if (data == NULL)
|
||||
/* Ignore a null pointer, like free does. */
|
||||
return;
|
||||
if (data->name != NULL)
|
||||
free ((void *) data->name);
|
||||
if (__munmap ((caddr_t) data->filedata, data->filesize) < 0)
|
||||
{
|
||||
if (errno == ENOSYS)
|
||||
free ((void *) data->filedata);
|
||||
errno = save;
|
||||
}
|
||||
free ((void *) data);
|
||||
}
|
||||
|
||||
+1
-4
@@ -64,7 +64,7 @@ enum coll_sort_rule
|
||||
sort_mask
|
||||
};
|
||||
|
||||
/* We can map the types of the entries into four categories. */
|
||||
/* We can map the types of the entries into a few categories. */
|
||||
enum value_type
|
||||
{
|
||||
none,
|
||||
@@ -113,9 +113,6 @@ extern const struct locale_data *_nl_find_locale (const char *locale_path,
|
||||
/* Try to load the file described by FILE. */
|
||||
extern void _nl_load_locale (struct loaded_l10nfile *file, int category);
|
||||
|
||||
/* Free the locale data read in by a `_nl_load_locale' call. */
|
||||
extern void _nl_free_locale (const struct locale_data *);
|
||||
|
||||
|
||||
/* Global variables for LC_COLLATE category data. */
|
||||
extern const u_int32_t *__collate_table;
|
||||
|
||||
+30
-12
@@ -34,6 +34,7 @@ Boston, MA 02111-1307, USA. */
|
||||
|
||||
|
||||
void *xmalloc (size_t __n);
|
||||
void *xrealloc (void *__p, size_t __n);
|
||||
|
||||
|
||||
/* The real definition of the struct for the LC_TIME locale. */
|
||||
@@ -53,7 +54,8 @@ struct locale_time_t
|
||||
const char *d_fmt;
|
||||
const char *t_fmt;
|
||||
const char *t_fmt_ampm;
|
||||
const char *era;
|
||||
const char **era;
|
||||
size_t era_num;
|
||||
const char *era_year;
|
||||
const char *era_d_t_fmt;
|
||||
const char *era_t_fmt;
|
||||
@@ -115,6 +117,7 @@ time_output (struct localedef_t *locale, const char *output_path)
|
||||
{
|
||||
struct locale_time_t *time = locale->categories[LC_TIME].time;
|
||||
struct iovec iov[2 + _NL_ITEM_INDEX (_NL_NUM_LC_TIME)
|
||||
+ (time->era_num > 0 ? time->era_num - 1 : 0)
|
||||
+ time->cur_num_alt_digits];
|
||||
struct locale_file data;
|
||||
u_int32_t idx[_NL_ITEM_INDEX (_NL_NUM_LC_TIME)];
|
||||
@@ -203,22 +206,27 @@ time_output (struct localedef_t *locale, const char *output_path)
|
||||
iov[2 + cnt].iov_base = (void *) (time->t_fmt_ampm ?: "");
|
||||
iov[2 + cnt].iov_len = strlen (iov[2 + cnt].iov_base) + 1;
|
||||
idx[1 + cnt] = idx[cnt] + iov[2 + cnt].iov_len;
|
||||
++cnt;
|
||||
last_idx = ++cnt;
|
||||
|
||||
iov[2 + cnt].iov_base = (void *) (time->era ?: "");
|
||||
iov[2 + cnt].iov_len = strlen (iov[2 + cnt].iov_base) + 1;
|
||||
idx[1 + cnt] = idx[cnt] + iov[2 + cnt].iov_len;
|
||||
++cnt;
|
||||
idx[1 + last_idx] = idx[last_idx];
|
||||
for (num = 0; num < time->era_num; ++num, ++cnt)
|
||||
{
|
||||
iov[2 + cnt].iov_base = (void *) time->era[num];
|
||||
iov[2 + cnt].iov_len = strlen (iov[2 + cnt].iov_base) + 1;
|
||||
}
|
||||
++last_idx;
|
||||
|
||||
iov[2 + cnt].iov_base = (void *) (time->era_year ?: "");
|
||||
iov[2 + cnt].iov_len = strlen (iov[2 + cnt].iov_base) + 1;
|
||||
idx[1 + cnt] = idx[cnt] + iov[2 + cnt].iov_len;
|
||||
idx[1 + last_idx] = idx[last_idx] + iov[2 + cnt].iov_len;
|
||||
++cnt;
|
||||
++last_idx;
|
||||
|
||||
iov[2 + cnt].iov_base = (void *) (time->era_d_fmt ?: "");
|
||||
iov[2 + cnt].iov_len = strlen (iov[2 + cnt].iov_base) + 1;
|
||||
idx[1 + cnt] = idx[cnt] + iov[2 + cnt].iov_len;
|
||||
last_idx = ++cnt;
|
||||
idx[1 + last_idx] = idx[last_idx] + iov[2 + cnt].iov_len;
|
||||
++cnt;
|
||||
++last_idx;
|
||||
|
||||
idx[1 + last_idx] = idx[last_idx];
|
||||
for (num = 0; num < time->cur_num_alt_digits; ++num, ++cnt)
|
||||
@@ -267,8 +275,7 @@ too many values for field `%s' in category `LC_TIME'"), \
|
||||
time->cat[time->cur_num_##cat++] = ""; \
|
||||
} \
|
||||
else \
|
||||
time->cat[time->cur_num_##cat++] \
|
||||
= code->val.str.start; \
|
||||
time->cat[time->cur_num_##cat++] = code->val.str.start; \
|
||||
break
|
||||
|
||||
STRARR_ELEM (abday, 7);
|
||||
@@ -278,6 +285,18 @@ too many values for field `%s' in category `LC_TIME'"), \
|
||||
STRARR_ELEM (am_pm, 2);
|
||||
STRARR_ELEM (alt_digits, 100);
|
||||
|
||||
case tok_era:
|
||||
if (code->val.str.start == NULL)
|
||||
lr_error (lr, _("unknown character in field `%s' of category `%s'"),
|
||||
"era", "LC_TIME");
|
||||
else
|
||||
{
|
||||
++time->era_num;
|
||||
time->era = xrealloc (time->era, time->era_num * sizeof (char *));
|
||||
time->era[time->era_num - 1] = code->val.str.start;
|
||||
}
|
||||
break;
|
||||
|
||||
#define STR_ELEM(cat) \
|
||||
case tok_##cat: \
|
||||
if (time->cat != NULL) \
|
||||
@@ -298,7 +317,6 @@ field `%s' in category `%s' declared more than once"), \
|
||||
STR_ELEM (d_fmt);
|
||||
STR_ELEM (t_fmt);
|
||||
STR_ELEM (t_fmt_ampm);
|
||||
STR_ELEM (era);
|
||||
STR_ELEM (era_year);
|
||||
STR_ELEM (era_d_t_fmt);
|
||||
STR_ELEM (era_d_fmt);
|
||||
|
||||
@@ -183,7 +183,7 @@ main (int argc, char *argv[])
|
||||
/* Version information is requested. */
|
||||
if (do_version)
|
||||
{
|
||||
fprintf (stderr, "%s - GNU %s %s\n", __progname, "libc", VERSION);
|
||||
fprintf (stderr, "%s - GNU %s %s\n", __progname, PACKAGE, VERSION);
|
||||
exit (EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
@@ -234,7 +234,8 @@ usage (int status)
|
||||
fprintf (stderr, gettext ("Try `%s --help' for more information.\n"),
|
||||
__progname);
|
||||
else
|
||||
printf (gettext ("\
|
||||
{
|
||||
printf (gettext ("\
|
||||
Usage: %s [OPTION]... name\n\
|
||||
Mandatory arguments to long options are mandatory for short options too.\n\
|
||||
-h, --help display this help and exit\n\
|
||||
@@ -244,9 +245,10 @@ Mandatory arguments to long options are mandatory for short options too.\n\
|
||||
-m, --charmaps write names of available charmaps\n\
|
||||
\n\
|
||||
-c, --category-name write names of selected categories\n\
|
||||
-k, --keyword-name write names of selected keywords\n\
|
||||
Report bugs to <bug-glibc@gnu.ai.mit.edu>."),
|
||||
__progname);
|
||||
-k, --keyword-name write names of selected keywords\n"),
|
||||
__progname);
|
||||
printf (gettext ("Report bugs to <bug-glibc@prep.ai.mit.edu>.\n"));
|
||||
}
|
||||
|
||||
exit (status);
|
||||
}
|
||||
|
||||
@@ -174,7 +174,7 @@ main (int argc, char *argv[])
|
||||
if (do_version)
|
||||
{
|
||||
fprintf (stderr, "%s - GNU %s %s\n", program_invocation_short_name,
|
||||
"libc", VERSION);
|
||||
PACKAGE, VERSION);
|
||||
exit (0);
|
||||
}
|
||||
|
||||
@@ -383,7 +383,8 @@ usage (int status)
|
||||
fprintf (stderr, _("Try `%s --help' for more information.\n"),
|
||||
program_invocation_name);
|
||||
else
|
||||
printf (_("\
|
||||
{
|
||||
printf (_("\
|
||||
Usage: %s [OPTION]... name\n\
|
||||
Mandatory arguments to long options are mandatory for short options too.\n\
|
||||
-c, --force create output even if warning messages were issued\n\
|
||||
@@ -396,9 +397,10 @@ Mandatory arguments to long options are mandatory for short options too.\n\
|
||||
--posix be strictly POSIX conform\n\
|
||||
\n\
|
||||
System's directory for character maps: %s\n\
|
||||
locale files : %s\n\
|
||||
Report bugs to <bug-glibc@gnu.ai.mit.edu>."),
|
||||
program_invocation_name, CHARMAP_PATH, LOCALE_PATH);
|
||||
locale files : %s\n"),
|
||||
program_invocation_name, CHARMAP_PATH, LOCALE_PATH);
|
||||
printf (gettext ("Report bugs to <bug-glibc@prep.ai.mit.edu>.\n"));
|
||||
}
|
||||
|
||||
exit (status);
|
||||
}
|
||||
|
||||
+9
-35
@@ -326,40 +326,22 @@ setlocale (int category, const char *locale)
|
||||
&newnames[category]);
|
||||
|
||||
if (newdata[category] == NULL)
|
||||
goto abort_composite;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* The data is never used; just change the name. */
|
||||
newnames[category] = clever_copy (newnames[category]);
|
||||
if (newnames[category] == NULL)
|
||||
goto abort_composite;
|
||||
break;
|
||||
}
|
||||
|
||||
/* Create new composite name. */
|
||||
composite = new_composite_name (LC_ALL, newnames);
|
||||
if (composite == NULL)
|
||||
{
|
||||
/* Loading this part of the locale failed. Abort the
|
||||
composite load. */
|
||||
int save_errno;
|
||||
|
||||
category = -1;
|
||||
abort_composite:
|
||||
save_errno = errno;
|
||||
|
||||
while (++category < LC_ALL)
|
||||
if (_nl_current[category] != NULL
|
||||
&& newdata[category] != _nl_C[category])
|
||||
_nl_free_locale (newdata[category]);
|
||||
else
|
||||
if (_nl_current[category] == NULL
|
||||
&& newnames[category] != _nl_C_name)
|
||||
free (newnames[category]);
|
||||
|
||||
errno = save_errno;
|
||||
composite = NULL;
|
||||
}
|
||||
if (category >= 0
|
||||
|| (composite = new_composite_name (LC_ALL, newnames)) == NULL)
|
||||
/* Loading this part of the locale failed. Abort the
|
||||
composite load. */
|
||||
composite = NULL;
|
||||
else
|
||||
{
|
||||
/* Now we have loaded all the new data. Put it in place. */
|
||||
@@ -379,7 +361,7 @@ setlocale (int category, const char *locale)
|
||||
else
|
||||
{
|
||||
const struct locale_data *newdata = NULL;
|
||||
char *newname = NULL;
|
||||
char *newname = (char *) locale;
|
||||
|
||||
/* Protect global data. */
|
||||
__libc_lock_lock (lock);
|
||||
@@ -387,7 +369,6 @@ setlocale (int category, const char *locale)
|
||||
if (_nl_current[category] != NULL)
|
||||
{
|
||||
/* Only actually load the data if anything will use it. */
|
||||
newname = (char *) locale;
|
||||
newdata = _nl_find_locale (locale_path, locale_path_len, category,
|
||||
(char **) &newname);
|
||||
if (newdata == NULL)
|
||||
@@ -398,14 +379,7 @@ setlocale (int category, const char *locale)
|
||||
composite = new_composite_name (category, &newname);
|
||||
if (composite == NULL)
|
||||
{
|
||||
/* If anything went wrong free what we managed to allocate
|
||||
so far. */
|
||||
int save_errno = errno;
|
||||
|
||||
if (_nl_current[category] != NULL)
|
||||
_nl_free_locale (newdata);
|
||||
|
||||
errno = save_errno;
|
||||
/* Say that we don't have any data loaded. */
|
||||
abort_single:
|
||||
newname = NULL;
|
||||
}
|
||||
|
||||
+1
-1
@@ -56,7 +56,7 @@ tests := hello
|
||||
# `err_*.sub'. Leaving the wildcard allows Make-dist to find all matching
|
||||
# files in all sysdep directories.
|
||||
distribute += Machrules syscalls.awk shortcut.awk \
|
||||
errorlib.h err_*.sub
|
||||
errorlib.h err_*.sub errsystems.awk
|
||||
|
||||
|
||||
# Clear any environment value.
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user