diff options
| -rw-r--r-- | ChangeLog | 86 | ||||
| -rw-r--r-- | Makeconfig | 8 | ||||
| -rw-r--r-- | Makefile | 8 | ||||
| -rw-r--r-- | Makerules | 33 | ||||
| -rw-r--r-- | Rules | 3 | ||||
| -rw-r--r-- | catgets/gencat.c | 2 | ||||
| -rw-r--r-- | config.make.in | 5 | ||||
| -rwxr-xr-x | configure | 4 | ||||
| -rw-r--r-- | configure.in | 4 | ||||
| -rw-r--r-- | db/makedb.c | 2 | ||||
| -rw-r--r-- | elf/Makefile | 25 | ||||
| -rw-r--r-- | elf/dl-load.c | 2 | ||||
| -rw-r--r-- | locale/programs/locale.c | 2 | ||||
| -rw-r--r-- | locale/programs/localedef.c | 2 | ||||
| -rw-r--r-- | manual/examples/subopt.c | 2 | ||||
| -rw-r--r-- | nis/Makefile | 3 | ||||
| -rw-r--r-- | posix/getopt.c | 12 | ||||
| -rw-r--r-- | posix/getopt.h | 4 | ||||
| -rw-r--r-- | posix/getopt1.c | 5 | ||||
| -rw-r--r-- | stdio-common/bug4.c | 2 | ||||
| -rw-r--r-- | sunrpc/rpcinfo.c | 2 | ||||
| -rw-r--r-- | sunrpc/xdr.c | 2 | ||||
| -rw-r--r-- | sysdeps/unix/sysv/linux/a.out.h | 6 | ||||
| -rw-r--r-- | sysdeps/unix/sysv/linux/alpha/Dist | 1 | ||||
| -rw-r--r-- | sysdeps/unix/sysv/linux/configure | 9 | ||||
| -rw-r--r-- | sysdeps/unix/sysv/linux/configure.in | 7 | ||||
| -rw-r--r-- | time/Banner | 1 | ||||
| -rw-r--r-- | time/Makefile | 5 | ||||
| -rw-r--r-- | time/antarctica | 44 | ||||
| -rw-r--r-- | time/australasia | 3 | ||||
| -rw-r--r-- | time/zdump.c | 4 | ||||
| -rw-r--r-- | time/zic.c | 4 | ||||
| -rw-r--r-- | time/zone.tab | 2 | ||||
| -rw-r--r-- | version.h | 2 |
34 files changed, 254 insertions, 52 deletions
@@ -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. diff --git a/Makeconfig b/Makeconfig index 37d5f62173..46d9b72e79 100644 --- a/Makeconfig +++ b/Makeconfig @@ -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 @@ -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 @@ -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 @@ -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 @@ -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) @@ -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) @@ -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) @@ -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) @@ -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)) \ @@ -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. @@ -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 := diff --git a/catgets/gencat.c b/catgets/gencat.c index 1616abfa1e..7047057832 100644 --- a/catgets/gencat.c +++ b/catgets/gencat.c @@ -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. */ diff --git a/config.make.in b/config.make.in index a4a667625e..0e61a145f1 100644 --- a/config.make.in +++ b/config.make.in @@ -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@ @@ -1950,6 +1950,8 @@ echo "$ac_t""$malloc" 1>&6 + + if test $gnu_ld = yes; then cat >> confdefs.h <<\EOF @@ -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 diff --git a/configure.in b/configure.in index 6cd3291bf1..7b17d88528 100644 --- a/configure.in +++ b/configure.in @@ -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 diff --git a/db/makedb.c b/db/makedb.c index ebdb9014c8..7ce9548788 100644 --- a/db/makedb.c +++ b/db/makedb.c @@ -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. */ diff --git a/elf/Makefile b/elf/Makefile index 87f2d0d67d..63a63127f8 100644 --- a/elf/Makefile +++ b/elf/Makefile @@ -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) \ @@ -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 @@ -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 \ diff --git a/elf/dl-load.c b/elf/dl-load.c index 6a3d919976..7368858f64 100644 --- a/elf/dl-load.c +++ b/elf/dl-load.c @@ -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. */ diff --git a/locale/programs/locale.c b/locale/programs/locale.c index d42081bb53..8587345bf2 100644 --- a/locale/programs/locale.c +++ b/locale/programs/locale.c @@ -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. */ diff --git a/locale/programs/localedef.c b/locale/programs/localedef.c index 950f0d0e31..580816b37e 100644 --- a/locale/programs/localedef.c +++ b/locale/programs/localedef.c @@ -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. */ diff --git a/manual/examples/subopt.c b/manual/examples/subopt.c index 4a89f6441e..df71720fe9 100644 --- a/manual/examples/subopt.c +++ b/manual/examples/subopt.c @@ -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': diff --git a/nis/Makefile b/nis/Makefile index a6d4d4f56a..98ef4090a2 100644 --- a/nis/Makefile +++ b/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 @@ -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. diff --git a/posix/getopt.c b/posix/getopt.c index 1c79eaaae2..f57f281297 100644 --- a/posix/getopt.c +++ b/posix/getopt.c @@ -126,7 +126,7 @@ char *optarg = NULL; On entry to `getopt', zero means this is the first call; initialize. - When `getopt' returns EOF, this is the index of the first of the + When `getopt' returns -1, this is the index of the first of the non-option elements that the caller should itself scan. Otherwise, `optind' communicates from one call to the next @@ -188,7 +188,7 @@ int optopt = '?'; The special argument `--' forces an end of option-scanning regardless of the value of `ordering'. In the case of RETURN_IN_ORDER, only - `--' can cause `getopt' to return EOF with `optind' != ARGC. */ + `--' can cause `getopt' to return -1 with `optind' != ARGC. */ static enum |
