Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
update from main archive 970121
1997-01-21  Paul Eggert  <eggert@twinsun.com>

	* posix/getopt.c (_getopt_internal): Return -1, not EOF, when args
	are exhausted; this is required by POSIX.2.
	* catgets/gencat.c, db/makedb.c, locale/programs/locale.c,
	locale/programs/localedef.c, manual/examples/subopt.c,
	posix/getopt.c, posix/getopt1.c, stdio-common/bug4.c,
	sunrpc/rpcinfo.c (main): Check getopt return value against -1, not EOF.

Tue Jan 21 23:10:40 1997  Ulrich Drepper  <drepper@cygnus.com>

	* version.h (VERSION): Bump to 1.102.

	* sysdeps/unix/sysv/linux/alpha/Dist: Add kernel_sigaction.h.

	* elf/Makefile: Don't use CFLAGS-dl-load.c, but instead
	CPPFLAGS-dl-load.c so that dependencies can be determined correctly.
	* elf/dl-load.c: Fix comment.

	* time/Banner: New file.
	* time/Makefile (distribute): Add Banner.

	Update from ADO tzcode1997a and tzdata1997a.
	* time/antarctica: Update.
	* time/australia: Update.
	* time/zdump.c: Update.
	* time/zic.c: Update.
	* time/zone.tab: Update.

Mon Jan 20 08:38:32 1997  H.J. Lu  <hjl@gnu.ai.mit.edu>

	* config.make.in (has-ldconfig): New variable.

	* configure, configure.in (has_ldconfig): New substitute.

	* sysdeps/unix/sysv/linux/configure.in (has_ldconfig): New,
	check if $srcdir/elf/ldconfig.c exists.

	* Makeconfig (rootsbindir): New, default as
	$(exec_prefix)/sbin.
	(rtld-version-installed-name): New, default as
	ld-$(version).so.

	* Makefile (install): Call `$(common-objpfx)elf/ldconfig -d'
	only if $(cross-compiling) is no and $(build-shared) is yes.

	* Makerules (make-shlib-link): New macro.
	($(slibdir)/libfoo.so.$(libfoo.so-version)): Use
	$(make-shlib-link) for symlink.
	(install-rootsbin, install-rootsbin-nosubdir): New.
	(install-no-libc.a-nosubdir): Add
	install-rootsbin-nosubdir.

	* Rules (others): Add $(install-rootsbin).

	* config.make.in (rootsbindir): New.

	* configure, configure.in (libc_cv_rootsbindir): New
	substitute.

	* elf/Makefile (others, install-rootsbin): New, set to
	ldconfig.
	(+link): New for static linking.
	($(slibdir)/$(rtld-version-installed-name)): New.
	($(slibdir)/$(rtld-installed-name)): Depend on
	$(slibdir)/$(rtld-version-installed-name) and use
	$(make-shlib-link) for symlink.

	* sunrpc/xdr.c (xdr_string): Return FALSE if sp == NULL
	while XDR_ENCODE.

	* sysdeps/unix/sysv/linux/a.out.h: Use #include_next for
	glibc internals.

	* sysdeps/unix/sysv/linux/configure.in (libc_cv_rootsbindir):
	New, set to "/sbin" if "$prefix" == "/usr".

Tue Jan 21 13:38:39 1997  Ulrich Drepper  <drepper@cygnus.com>

	* Makefile (distribute): Add glibcbug.in.
	Reported by Philip Blundell <pjb27@cam.ac.uk>.

	* elf/Makefile ($(objpfx)trusted-dirs.h): Create elf/ subdir in
	build directory if necessary.
	Reported by marcus@shannon.sysc.pdx.edu (Marcus G. Daniels).
  • Loading branch information
Ulrich Drepper committed Jan 22, 1997
1 parent fd26970 commit 1ef32c3
Show file tree
Hide file tree
Showing 34 changed files with 254 additions and 52 deletions.
86 changes: 86 additions & 0 deletions ChangeLog
@@ -1,3 +1,89 @@
1997-01-21 Paul Eggert <eggert@twinsun.com>

* posix/getopt.c (_getopt_internal): Return -1, not EOF, when args
are exhausted; this is required by POSIX.2.
* catgets/gencat.c, db/makedb.c, locale/programs/locale.c,
locale/programs/localedef.c, manual/examples/subopt.c,
posix/getopt.c, posix/getopt1.c, stdio-common/bug4.c,
sunrpc/rpcinfo.c (main): Check getopt return value against -1, not EOF.

Tue Jan 21 23:10:40 1997 Ulrich Drepper <drepper@cygnus.com>

* version.h (VERSION): Bump to 1.102.

* sysdeps/unix/sysv/linux/alpha/Dist: Add kernel_sigaction.h.

* elf/Makefile: Don't use CFLAGS-dl-load.c, but instead
CPPFLAGS-dl-load.c so that dependencies can be determined correctly.
* elf/dl-load.c: Fix comment.

* time/Banner: New file.
* time/Makefile (distribute): Add Banner.

Update from ADO tzcode1997a and tzdata1997a.
* time/antarctica: Update.
* time/australia: Update.
* time/zdump.c: Update.
* time/zic.c: Update.
* time/zone.tab: Update.

Mon Jan 20 08:38:32 1997 H.J. Lu <hjl@gnu.ai.mit.edu>

* config.make.in (has-ldconfig): New variable.

* configure, configure.in (has_ldconfig): New substitute.

* sysdeps/unix/sysv/linux/configure.in (has_ldconfig): New,
check if $srcdir/elf/ldconfig.c exists.

* Makeconfig (rootsbindir): New, default as
$(exec_prefix)/sbin.
(rtld-version-installed-name): New, default as
ld-$(version).so.

* Makefile (install): Call `$(common-objpfx)elf/ldconfig -d'
only if $(cross-compiling) is no and $(build-shared) is yes.

* Makerules (make-shlib-link): New macro.
($(slibdir)/libfoo.so.$(libfoo.so-version)): Use
$(make-shlib-link) for symlink.
(install-rootsbin, install-rootsbin-nosubdir): New.
(install-no-libc.a-nosubdir): Add
install-rootsbin-nosubdir.

* Rules (others): Add $(install-rootsbin).

* config.make.in (rootsbindir): New.

* configure, configure.in (libc_cv_rootsbindir): New
substitute.

* elf/Makefile (others, install-rootsbin): New, set to
ldconfig.
(+link): New for static linking.
($(slibdir)/$(rtld-version-installed-name)): New.
($(slibdir)/$(rtld-installed-name)): Depend on
$(slibdir)/$(rtld-version-installed-name) and use
$(make-shlib-link) for symlink.

* sunrpc/xdr.c (xdr_string): Return FALSE if sp == NULL
while XDR_ENCODE.

* sysdeps/unix/sysv/linux/a.out.h: Use #include_next for
glibc internals.

* sysdeps/unix/sysv/linux/configure.in (libc_cv_rootsbindir):
New, set to "/sbin" if "$prefix" == "/usr".

Tue Jan 21 13:38:39 1997 Ulrich Drepper <drepper@cygnus.com>

* Makefile (distribute): Add glibcbug.in.
Reported by Philip Blundell <pjb27@cam.ac.uk>.

* elf/Makefile ($(objpfx)trusted-dirs.h): Create elf/ subdir in
build directory if necessary.
Reported by marcus@shannon.sysc.pdx.edu (Marcus G. Daniels).

Tue Jan 21 04:05:20 1997 Ulrich Drepper <drepper@cygnus.com>

* version.h (VERSION): Bump to 1.101.
Expand Down
8 changes: 8 additions & 0 deletions Makeconfig
Expand Up @@ -194,6 +194,10 @@ bindir = $(exec_prefix)/bin
endif

# Where to install administrative programs.
ifndef rootsbindir
rootsbindir = $(exec_prefix)/sbin
endif

ifndef sbindir
sbindir = $(exec_prefix)/sbin
endif
Expand Down Expand Up @@ -561,6 +565,10 @@ rtld-installed-name = ld.so.1
endif
endif

ifndef rtld-version-installed-name
rtld-version-installed-name = ld-$(version).so
endif

endif # build-shared

endif # Makeconfig not yet included
8 changes: 7 additions & 1 deletion Makefile
Expand Up @@ -111,6 +111,12 @@ include Makerules

# Install from subdirectories too.
install: subdir_install
ifeq (no,$(cross-compiling))
ifeq (yes,$(build-shared))
test ! -x $(common-objpfx)elf/ldconfig || \
$(common-objpfx)elf/ldconfig -d
endif
endif

# Build subdirectory lib objects.
lib-noranlib: subdir_lib
Expand Down Expand Up @@ -296,7 +302,7 @@ distribute := README INSTALL FAQ NOTES NEWS PROJECTS \
autolock.sh rellns-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 nsswitch.h netgroup.h \
mcheck.h
mcheck.h glibcbug.in

distribute := $(strip $(distribute))
generated := $(generated) stubs.h version-info.h
Expand Down
33 changes: 27 additions & 6 deletions Makerules
Expand Up @@ -616,13 +616,27 @@ mv -f $@.new $@
endef
endif

# XXX The following will have to be changed when `ldconfig' is available.
ifneq (yes,$(cross-compiling))
ifeq (yes,$(has-ldconfig))
define make-shlib-link
@:
endef
endif
endif
ifndef make-shlib-link
define make-shlib-link
$(make-link)
endef
endif

ifdef libc.so-version
# For a library specified to be version N, install three files:
# libc.so -> libc.so.N (e.g. libc.so.6)
# libc.so.6 -> libc-VERSION.so (e.g. libc-1.10.so)

$(slibdir)/libc.so$(libc.so-version): $(slibdir)/libc-$(version).so
$(make-link)
$(make-shlib-link)
$(slibdir)/libc-$(version).so: $(common-objpfx)libc.so; $(do-install-program)
install: $(slibdir)/libc.so$(libc.so-version)

Expand Down Expand Up @@ -672,7 +686,8 @@ include $(o-iterator)

ifeq (,$($(subdir)-version))
define o-iterator-doit
$(slibdir)/$o$($o-version): $(slibdir)/$(o:.so=)-$(version).so; $$(make-link)
$(slibdir)/$o$($o-version): $(slibdir)/$(o:.so=)-$(version).so;
$$(make-shlib-link)
endef
object-suffixes-left := $(versioned)
include $(o-iterator)
Expand All @@ -685,7 +700,7 @@ include $(o-iterator)
else
define o-iterator-doit
$(slibdir)/$o$($o-version): $(slibdir)/$(o:.so=)-$($(subdir)-version).so;
$$(make-link)
$$(make-shlib-link)
endef
object-suffixes-left := $(versioned)
include $(o-iterator)
Expand Down Expand Up @@ -718,6 +733,10 @@ ifdef install-bin
$(addprefix $(bindir)/,$(install-bin)): $(bindir)/%: $(objpfx)%
$(do-install-program)
endif
ifdef install-rootsbin
$(addprefix $(rootsbindir)/,$(install-rootsbin)): $(rootsbindir)/%: $(objpfx)%
$(do-install-program)
endif
ifdef install-sbin
$(addprefix $(sbindir)/,$(install-sbin)): $(sbindir)/%: $(objpfx)%
$(do-install-program)
Expand Down Expand Up @@ -746,9 +765,10 @@ $(addprefix $(includedir)/,$(headers)): \
$(includedir)/%: %;$(do-install)
endif # headers

.PHONY: install-bin-nosubdir install-sbin-nosubdir install-lib-nosubdir \
install-data-nosubdir install-headers-nosubdir
.PHONY: install-bin-nosubdir install-rootsbin-nosubdir install-sbin-nosubdir \
install-lib-nosubdir install-data-nosubdir install-headers-nosubdir
install-bin-nosubdir: $(addprefix $(bindir)/,$(install-bin))
install-rootsbin-nosubdir: $(addprefix $(rootsbindir)/,$(install-rootsbin))
install-sbin-nosubdir: $(addprefix $(sbindir)/,$(install-sbin))
install-lib-nosubdir: $(addprefix $(libdir)/,\
$(patsubst lib%.a,lib$(libprefix)%.a,$(install-lib.a)) \
Expand All @@ -766,7 +786,8 @@ install-%:: install-%-nosubdir ;
.PHONY: install install-no-libc.a-nosubdir
install-no-libc.a-nosubdir: install-headers-nosubdir install-data-nosubdir\
install-bin-nosubdir install-lib-nosubdir \
install-others-nosubdir install-sbin-nosubdir
install-others-nosubdir install-rootsbin-nosubdir \
install-sbin-nosubdir
install: install-no-libc.a-nosubdir

# Command to compile $< in $(objdir) using the native libraries.
Expand Down
3 changes: 2 additions & 1 deletion Rules
Expand Up @@ -39,7 +39,8 @@ export subdir := $(subdir)
all: objs lib others

others: $(addprefix $(objpfx),$(extra-objs) \
$(install-lib) $(install-bin) $(install-sbin))
$(install-lib) $(install-bin) \
$(install-rootsbin) $(install-sbin))

ifneq "$(findstring env,$(origin headers))" ""
headers :=
Expand Down
2 changes: 1 addition & 1 deletion catgets/gencat.c
Expand Up @@ -141,7 +141,7 @@ main (int argc, char *argv[])
header_name = NULL;
result = NULL;

while ((opt = getopt_long (argc, argv, "hH:o:V", long_options, NULL)) != EOF)
while ((opt = getopt_long (argc, argv, "hH:o:V", long_options, NULL)) != -1)
switch (opt)
{
case '\0': /* Long option. */
Expand Down
5 changes: 5 additions & 0 deletions config.make.in
Expand Up @@ -7,6 +7,11 @@ prefix = @prefix@
exec_prefix = @exec_prefix@
slibdir = @libc_cv_slibdir@
sysconfdir = @libc_cv_sysconfdir@
rootsbindir = $(install_root)@libc_cv_rootsbindir@

# If ldconfig exists. This will go away as soon as `ldconfig' is available
# in GNU libc.
has-ldconfig = @has_ldconfig@

# System configuration.
config-machine = @host_cpu@
Expand Down
4 changes: 4 additions & 0 deletions configure
Expand Up @@ -1950,6 +1950,8 @@ echo "$ac_t""$malloc" 1>&6






if test $gnu_ld = yes; then
cat >> confdefs.h <<\EOF
Expand Down Expand Up @@ -2162,6 +2164,8 @@ s%@malloc@%$malloc%g
s%@USE_NEW_MALLOC@%$USE_NEW_MALLOC%g
s%@libc_cv_slibdir@%$libc_cv_slibdir%g
s%@libc_cv_sysconfdir@%$libc_cv_sysconfdir%g
s%@libc_cv_rootsbindir@%$libc_cv_rootsbindir%g
s%@has_ldconfig@%$has_ldconfig%g
s%@gnu_ld@%$gnu_ld%g
s%@gnu_as@%$gnu_as%g
s%@elf@%$elf%g
Expand Down
4 changes: 3 additions & 1 deletion configure.in
Expand Up @@ -745,9 +745,11 @@ esac
AC_SUBST(USE_NEW_MALLOC)
AC_MSG_RESULT($malloc)


AC_SUBST(libc_cv_slibdir)
AC_SUBST(libc_cv_sysconfdir)
AC_SUBST(libc_cv_rootsbindir)

AC_SUBST(has_ldconfig)

AC_SUBST(gnu_ld) AC_SUBST(gnu_as) AC_SUBST(elf)
if test $gnu_ld = yes; then
Expand Down
2 changes: 1 addition & 1 deletion db/makedb.c
Expand Up @@ -86,7 +86,7 @@ main (argc, argv)
be_quiet = 0;
output_name = NULL;

while ((opt = getopt_long (argc, argv, "fho:uV", long_options, NULL)) != EOF)
while ((opt = getopt_long (argc, argv, "fho:uV", long_options, NULL)) != -1)
switch (opt)
{
case '\0': /* Long option. */
Expand Down
25 changes: 21 additions & 4 deletions elf/Makefile
Expand Up @@ -55,10 +55,22 @@ install-others = $(slibdir)/$(rtld-installed-name)
install-bin = ldd
endif

ifeq (yes,$(has-ldconfig))
others = ldconfig
install-rootsbin = ldconfig

$(objpfx)ldconfig: ldconfig.o
$(CC) -nostdlib -nostartfiles -o $@ $(sysdep-LDFLAGS) -static \
$(addprefix $(csu-objpfx),start.o) $(+preinit) \
$(filter-out $(addprefix $(csu-objpfx),start.o) $(+preinit) \
$(link-extra-libs) $(common-objpfx)libc% $(+postinit),$^) \
$(link-extra-libs) $(common-objpfx)libc.a $(gnulib) $(+postinit)
endif

include ../Rules


ifeq (yes, $(build-shared))
ifeq (yes,$(build-shared))
# Make sure these things are built in the `make lib' pass so they can be used
# to run programs during the `make others' pass.
lib-noranlib: $(objpfx)$(rtld-installed-name) \
Expand Down Expand Up @@ -86,7 +98,7 @@ endef
# The dl code in the static libc needs a default library path.
CFLAGS-dl-support.c = -D'DEFAULT_RPATH="$(default-rpath)"'

ifneq (ld.so, $(rtld-installed-name))
ifneq (ld.so,$(rtld-installed-name))
# Make sure ld.so.1 exists in the build directory so we can link
# against it.
$(objpfx)$(rtld-installed-name): $(objpfx)ld.so
Expand All @@ -99,18 +111,23 @@ endif
# add directories to the list by defining $(user-defined-trusted-dirs)
# before starting make.
$(objpfx)trusted-dirs.h: Makefile
$(make-target-directory)
(for dir in `echo "$(default-rpath) $(user-defined-trusted-dirs)" | \
sed 's/:/ /g'`; do \
echo " \"$$dir\","; \
done;) > $@T
mv -f $@T $@
CFLAGS-dl-load.c = -I$(objdir)/$(subdir)
CPPFLAGS-dl-load.c = -I$(objdir)/$(subdir)

# Specify the dependencies of libdl.so; its commands come from the generic
# rule to build a shared library.
$(objpfx)libdl.so: $(objpfx)libdl_pic.a $(common-objpfx)libc.so $(objpfx)ld.so

$(slibdir)/$(rtld-installed-name): $(objpfx)ld.so; $(do-install-program)
$(slibdir)/$(rtld-version-installed-name): $(objpfx)ld.so
$(do-install-program)

$(slibdir)/$(rtld-installed-name): $(slibdir)/$(rtld-version-installed-name)
$(make-shlib-link)

ifneq ($(have-bash2),yes)
$(objpfx)ldd: ldd.sh.in $(common-objpfx)version.mk \
Expand Down
2 changes: 1 addition & 1 deletion elf/dl-load.c
Expand Up @@ -627,7 +627,7 @@ _dl_map_object (struct link_map *loader, const char *name, int type,
/* We haven't found an appropriate library. But since we
are only interested in the list of libraries this isn't
so severe. Fake an entry with all the information we
have (in fact only the name). */
have. */
static const ElfW(Symndx) dummy_bucket = STN_UNDEF;

/* Enter the new object in the list of loaded objects. */
Expand Down
2 changes: 1 addition & 1 deletion locale/programs/locale.c
Expand Up @@ -153,7 +153,7 @@ main (int argc, char *argv[])
textdomain (PACKAGE);

while ((optchar = getopt_long (argc, argv, "achkmV", long_options, NULL))
!= EOF)
!= -1)
switch (optchar)
{
case '\0': /* Long option. */
Expand Down
2 changes: 1 addition & 1 deletion locale/programs/localedef.c
Expand Up @@ -127,7 +127,7 @@ main (int argc, char *argv[])
textdomain (_libc_intl_domainname);

while ((optchar = getopt_long (argc, argv, "cf:hi:u:vV", long_options, NULL))
!= EOF)
!= -1)
switch (optchar)
{
case '\0': /* Long option. */
Expand Down
2 changes: 1 addition & 1 deletion manual/examples/subopt.c
Expand Up @@ -29,7 +29,7 @@ main (int argc, char *argv[])
char *subopts, *value;
int opt;

while ((opt = getopt (argc, argv, "at:o:")) != EOF)
while ((opt = getopt (argc, argv, "at:o:")) != -1)
switch (opt)
{
case 'a':
Expand Down
3 changes: 2 additions & 1 deletion nis/Makefile
@@ -1,4 +1,4 @@
# Copyright (C) 1996 Free Software Foundation, Inc.
# Copyright (C) 1996, 1997 Free Software Foundation, Inc.
# This file is part of the GNU C Library.

# The GNU C Library is free software; you can redistribute it and/or
Expand All @@ -22,6 +22,7 @@
subdir := nis

headers := $(wildcard rpcsvc/*.[hx])
distribute := nss-nis.h

# These are the databases available for the nis (and perhaps later nisplus)
# service. This must be a superset of the services in nss.
Expand Down

0 comments on commit 1ef32c3

Please sign in to comment.