about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-02-24 15:22:29 +0000
committerUlrich Drepper <drepper@redhat.com>1998-02-24 15:22:29 +0000
commit14e9dd679a43ef9eb90adc0764152045caab6146 (patch)
tree5fe46c23560e40ecd94ac79fbe1a07cd4b32c7b6
parentdfbad9c855e5aee39492fdc9fbe98eac5846f49c (diff)
downloadglibc-14e9dd679a43ef9eb90adc0764152045caab6146.tar.gz
glibc-14e9dd679a43ef9eb90adc0764152045caab6146.tar.xz
glibc-14e9dd679a43ef9eb90adc0764152045caab6146.zip
Update.
1998-02-24 15:12  Ulrich Drepper  <drepper@cygnus.com>

	* Makeconfig: Filter out frame-pointer effecting options when
	compiling profiling or debugging code.
	* config.h.in (internal_function): Don't define here if PROF is
	defined.
	* gmon/gmon.c (__moncontrol): Don't change state if already in error
	state.
	(__monstartup): If calloc fails set error state and mark array as
	not allocated.
	(_mcleanup): Don't call write_gmon if in error state.  Don't try
	to free array if not  successfully allocated.

	* elf/dl-load.c (STRING): Define to __STRING to enble expansion.
	Include elf.h to get macro definitions.
	Use __ELF?NATIVE?CLASS in message, not __ELF_WORDSIZE.

1998-02-24 09:40  Ulrich Drepper  <drepper@cygnus.com>

	* elf/ldd.sh.in: Add compatibility for broken old shells.
	* elf/ldd.bash.in: Likewise.

1998-02-24 08:11  H.J. Lu  <hjl@gnu.org>

	* sunrpc/rpc_main.c (open_input): Check pipe return error.

	* time/clocktest.c (main): Check signal return error.

1998-02-24  Andreas Jaeger  <aj@arthur.rhein-neckar.de>

	* iconv/Makefile ($(inst_bindir)/iconv): Correct typo, add
	"/" and use do-install-program. Reported by Mark M. Kettenis.
	(subdir_install):  Likewise.

1998-02-22  Thorsten Kukuk  <kukuk@vt.uni-paderborn.de>

	* sunrpc/rpc_sample.c: Fix typo.

	* nscd/connections.c: Use locale.
	* nscd/grpcache.c: Add debug messages, gidtbl should get the
	  calloc result.
	* nscd/nscd.c: Check if init functions fails.
	* nscd/nscd_conf.c: Allow disabling of group cache.
	* nscd/nscd_getgr_r.c: Fix return code if group not found.
	* nscd/pwdcache.c: Fix debug messages.

1998-02-22  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* libc.map: Add __monstartup and _mcleanup for profiling support.

1998-02-20  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* libc.map: Export __getpagesize, for binary compatibility with
	2.0.

1998-02-21  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* posix/globtest.sh: Use --library-path instead of
	LD_LIBRARY_PATH.
	* localedata/sort-test.sh: Likewise.
	* localedata/tst-fmon.sh: Likewise.  Avoid useless use of cat.

1998-02-22  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* sysdeps/unix/sysv/linux/sigaction.c: Translate between struct
	sigaction and struct kernel_sigaction for __syscall_rt_sigaction.
	* sysdeps/unix/sysv/linux/i386/sigaction.c: Likewise.

	* sysdeps/unix/sysv/linux/kernel_sigaction.h (struct
	kernel_sigaction): Define.
	* sysdeps/unix/sysv/linux/alpha/kernel_sigaction.h (struct
	kernel_sigaction): Define.

1998-02-23  Andreas Jaeger  <aj@arthur.rhein-neckar.de>

	* math/libm-test.c: Change epsilons for libm-ieee754.

1998-02-23 12:33  Ulrich Drepper  <drepper@cygnus.com>

	* sysdeps/i386/__longjmp.S: Fix race condition.
	Reported by Bruno Haible <haible@ilog.fr>.
-rw-r--r--ChangeLog82
-rw-r--r--Makeconfig11
-rw-r--r--config.h.in2
-rw-r--r--elf/dl-load.c5
-rw-r--r--gmon/gmon.c14
-rw-r--r--libc.map4
-rw-r--r--localedata/sort-test.sh22
-rwxr-xr-xlocaledata/tst-fmon.sh12
-rw-r--r--math/libm-test.c12
-rw-r--r--nscd/connections.c2
-rw-r--r--nscd/grpcache.c26
-rw-r--r--nscd/nscd.c9
-rw-r--r--nscd/nscd_conf.c5
-rw-r--r--nscd/nscd_getgr_r.c9
-rw-r--r--nscd/pwdcache.c21
-rwxr-xr-xposix/globtest.sh28
-rw-r--r--sunrpc/rpc_sample.c2
-rw-r--r--sysdeps/i386/__longjmp.S7
-rw-r--r--sysdeps/unix/sysv/linux/alpha/kernel_sigaction.h8
-rw-r--r--sysdeps/unix/sysv/linux/i386/sigaction.c31
-rw-r--r--sysdeps/unix/sysv/linux/kernel_sigaction.h9
-rw-r--r--sysdeps/unix/sysv/linux/sigaction.c40
22 files changed, 269 insertions, 92 deletions
diff --git a/ChangeLog b/ChangeLog
index cb9c484c34..6a636083c1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,85 @@
+1998-02-24 15:12  Ulrich Drepper  <drepper@cygnus.com>
+
+	* Makeconfig: Filter out frame-pointer effecting options when
+	compiling profiling or debugging code.
+	* config.h.in (internal_function): Don't define here if PROF is
+	defined.
+	* gmon/gmon.c (__moncontrol): Don't change state if already in error
+	state.
+	(__monstartup): If calloc fails set error state and mark array as
+	not allocated.
+	(_mcleanup): Don't call write_gmon if in error state.  Don't try
+	to free array if not  successfully allocated.
+
+	* elf/dl-load.c (STRING): Define to __STRING to enble expansion.
+	Include elf.h to get macro definitions.
+	Use __ELF?NATIVE?CLASS in message, not __ELF_WORDSIZE.
+
+1998-02-24 09:40  Ulrich Drepper  <drepper@cygnus.com>
+
+	* elf/ldd.sh.in: Add compatibility for broken old shells.
+	* elf/ldd.bash.in: Likewise.
+
+1998-02-24 08:11  H.J. Lu  <hjl@gnu.org>
+
+	* sunrpc/rpc_main.c (open_input): Check pipe return error.
+
+	* time/clocktest.c (main): Check signal return error.
+
+1998-02-24  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
+
+	* iconv/Makefile ($(inst_bindir)/iconv): Correct typo, add
+	"/" and use do-install-program. Reported by Mark M. Kettenis.
+	(subdir_install):  Likewise.
+
+1998-02-22  Thorsten Kukuk  <kukuk@vt.uni-paderborn.de>
+
+	* sunrpc/rpc_sample.c: Fix typo.
+
+	* nscd/connections.c: Use locale.
+	* nscd/grpcache.c: Add debug messages, gidtbl should get the
+	  calloc result.
+	* nscd/nscd.c: Check if init functions fails.
+	* nscd/nscd_conf.c: Allow disabling of group cache.
+	* nscd/nscd_getgr_r.c: Fix return code if group not found.
+	* nscd/pwdcache.c: Fix debug messages.
+
+1998-02-22  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
+
+	* libc.map: Add __monstartup and _mcleanup for profiling support.
+
+1998-02-20  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
+
+	* libc.map: Export __getpagesize, for binary compatibility with
+	2.0.
+
+1998-02-21  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
+
+	* posix/globtest.sh: Use --library-path instead of
+	LD_LIBRARY_PATH.
+	* localedata/sort-test.sh: Likewise.
+	* localedata/tst-fmon.sh: Likewise.  Avoid useless use of cat.
+
+1998-02-22  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
+
+	* sysdeps/unix/sysv/linux/sigaction.c: Translate between struct
+	sigaction and struct kernel_sigaction for __syscall_rt_sigaction.
+	* sysdeps/unix/sysv/linux/i386/sigaction.c: Likewise.
+
+	* sysdeps/unix/sysv/linux/kernel_sigaction.h (struct
+	kernel_sigaction): Define.
+	* sysdeps/unix/sysv/linux/alpha/kernel_sigaction.h (struct
+	kernel_sigaction): Define.
+
+1998-02-23  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
+
+	* math/libm-test.c: Change epsilons for libm-ieee754.
+
+1998-02-23 12:33  Ulrich Drepper  <drepper@cygnus.com>
+
+	* sysdeps/i386/__longjmp.S: Fix race condition.
+	Reported by Bruno Haible <haible@ilog.fr>.
+
 1998-02-20 18:43  Ulrich Drepper  <drepper@cygnus.com>
 
 	* hesiod/hesiod.c: Pretty print.  Don't use __ protected names.
diff --git a/Makeconfig b/Makeconfig
index f4c5573087..b4634cc507 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -551,8 +551,8 @@ libio-include = -I$(..)libio
 CPPFLAGS = $(+includes) $(defines) -include $(..)include/libc-symbols.h \
 	   $(sysdep-CPPFLAGS) $(CPPFLAGS-$(suffix $@)) $(CPPFLAGS-$(<F)) \
 	   $(CPPFLAGS-$(@F))
-override CFLAGS	= $(+cflags) $(sysdep-CFLAGS) $(CFLAGS-$(suffix $@)) \
-		  $(CFLAGS-$(<F)) $(CFLAGS-$(@F))
+override CFLAGS	= $(filter-out %frame-pointer,$(+cflags)) $(sysdep-CFLAGS) \
+		  $(CFLAGS-$(suffix $@)) $(CFLAGS-$(<F)) $(CFLAGS-$(@F))
 
 
 # This is the macro that the implicit linking rules use.
@@ -576,6 +576,7 @@ all-object-suffixes := .o .os .op .og .ob
 object-suffixes :=
 ifeq (yes,$(build-static))
 CPPFLAGS-.o = $(pic-default)
+CFLAGS-.o = $(filter %frame-pointer,$(+cflags))
 libtype.o := lib%.a
 object-suffixes += .o
 endif
@@ -584,7 +585,7 @@ ifeq (yes,$(build-shared))
 # The PIC object files are named foo.os.
 object-suffixes += .os
 CPPFLAGS-.os = -DPIC
-CFLAGS-.os = $(pic-ccflag)
+CFLAGS-.os = $(filter %frame-pointer,$(+cflags)) $(pic-ccflag)
 libtype.os := lib%_pic.a
 # This can be changed by a sysdep makefile
 pic-ccflag = -fPIC
@@ -604,8 +605,8 @@ ifeq (yes,$(build-omitfp))
 object-suffixes += .og
 CPPFLAGS-.og = $(pic-default)
 CFLAGS-.og = -g
-CFLAGS-.o = -g0 -O99 -fomit-frame-pointer -D__USE_STRING_INLINES
-CFLAGS-.os += $(CFLAGS-.o)
+CFLAGS-.o = $(filter %frame-pointer,$(+cflags)) -g0 -O99 -fomit-frame-pointer -D__USE_STRING_INLINES
+CFLAGS-.os += -g0 -O99 -fomit-frame-pointer -D__USE_STRING_INLINES
 libtype.og = lib%_g.a
 endif
 ifeq (yes,$(build-bounded))
diff --git a/config.h.in b/config.h.in
index 9e85c7e5cd..8cee659dfa 100644
--- a/config.h.in
+++ b/config.h.in
@@ -66,7 +66,7 @@
 
 /* Defined to some form of __attribute__ ((...)) if the compiler supports
    a different, more efficient calling convention.  */
-#ifdef USE_REGPARMS
+#if defined USE_REGPARMS && !defined PROF
 # define internal_function __attribute__ ((regparm (3), stdcall))
 #endif
 
diff --git a/elf/dl-load.c b/elf/dl-load.c
index c93446a737..7adb6612d0 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -17,6 +17,7 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#include <elf.h>
 #include <errno.h>
 #include <fcntl.h>
 #include <link.h>
@@ -67,7 +68,7 @@
 #define byteorder ELFDATANONE
 #endif
 
-#define STRING(x) #x
+#define STRING(x) __STRING (x)
 
 #ifdef MAP_ANON
 /* The fd is not examined when using MAP_ANON.  */
@@ -561,7 +562,7 @@ _dl_map_object_from_fd (char *name, int fd, char *realname,
 #define ELF32_CLASS ELFCLASS32
 #define ELF64_CLASS ELFCLASS64
   if (header->e_ident[EI_CLASS] != ELFW(CLASS))
-    LOSE ("ELF file class not " STRING(__ELF_WORDSIZE) "-bit");
+    LOSE ("ELF file class not " STRING(__ELF_NATIVE_CLASS) "-bit");
   if (header->e_ident[EI_DATA] != byteorder)
     LOSE ("ELF file data encoding not " byteorder_name);
   if (header->e_ident[EI_VERSION] != EV_CURRENT)
diff --git a/gmon/gmon.c b/gmon/gmon.c
index 787da5a7e7..c3e7c51b8c 100644
--- a/gmon/gmon.c
+++ b/gmon/gmon.c
@@ -79,6 +79,10 @@ __moncontrol (mode)
 {
   struct gmonparam *p = &_gmonparam;
 
+  /* Don't change the state if we ran into an error.  */
+  if (p->state == GMON_PROF_ERROR)
+    return;
+
   if (mode)
     {
       /* start */
@@ -131,7 +135,9 @@ __monstartup (lowpc, highpc)
   cp = calloc (p->kcountsize + p->fromssize + p->tossize, 1);
   if (! cp)
     {
-      ERR(_("monstartup: out of memory\n"));
+      ERR("monstartup: out of memory\n");
+      p->tos = NULL;
+      p->state = GMON_PROF_ERROR;
       return;
     }
   p->tos = (struct tostruct *)cp;
@@ -350,10 +356,12 @@ weak_alias (__write_profiling, write_profiling)
 void
 _mcleanup (void)
 {
-    __moncontrol (0);
+  __moncontrol (0);
 
+  if (_gmonparam.state != GMON_PROF_ERROR)
     write_gmon ();
 
-    /* free the memory. */
+  /* free the memory. */
+  if (_gmonparam.tos != NULL)
     free (_gmonparam.tos);
 }
diff --git a/libc.map b/libc.map
index d39fadc0cd..d2e63ec80e 100644
--- a/libc.map
+++ b/libc.map
@@ -45,6 +45,7 @@ GLIBC_2.0 {
     __malloc_initialize_hook; __free_hook; __malloc_hook; __realloc_hook;
     __memalign_hook; __after_morecore_hook;
     __malloc_initialized; __default_morecore; __morecore; __sbrk;
+    __getpagesize;
 
     # functions with required interface outside normal name space
     _exit; __ivaliduser; __open_catalog;
@@ -103,6 +104,9 @@ GLIBC_2.0 {
     __register_frame; __register_frame_table; __deregister_frame;
     __register_frame_info; __deregister_frame_info;
 
+    # Profiling support
+    __monstartup; _mcleanup;
+
     # variables in normal name space
     argp_err_exit_status; argp_program_bug_address; argp_program_version;
     argp_program_version_hook;
diff --git a/localedata/sort-test.sh b/localedata/sort-test.sh
index 8f9bb55b72..affbb26312 100644
--- a/localedata/sort-test.sh
+++ b/localedata/sort-test.sh
@@ -11,7 +11,7 @@ for l in $lang; do
   cns=`echo $l | sed 's/\(.*\)[.][^.]*/\1/'`
   cn=locales/$cns
   fn=charmaps/`echo $l | sed 's/.*[.]\([^.]*\)/\1/'`
-  LD_LIBRARY_PATH=$common_objpfx I18NPATH=./locales ${common_objpfx}elf/ld.so \
+  I18NPATH=./locales ${common_objpfx}elf/ld.so --library-path $common_objpfx \
    ${common_objpfx}locale/localedef --quiet -i $cn -f $fn \
    ${common_objpfx}localedata/$cns
 done
@@ -20,17 +20,17 @@ done
 status=0
 for l in $lang; do
   cns=`echo $l | sed 's/\(.*\)[.][^.]*/\1/'`
-  LOCPATH=$common_objpfx/localedata LC_ALL=$cns \
-   LD_LIBRARY_PATH=$common_objpfx $common_objpfx/elf/ld.so \
-   $common_objpfx/localedata/collate-test $id < $cns.in \
-   > $common_objpfx/localedata/$cns.out || status=1
-  cmp -s $cns.in $common_objpfx/localedata/$cns.out || status=1
+  LOCPATH=${common_objpfx}localedata LC_ALL=$cns \
+   ${common_objpfx}elf/ld.so --library-path $common_objpfx \
+   ${common_objpfx}localedata/collate-test $id < $cns.in \
+   > ${common_objpfx}localedata/$cns.out || status=1
+  cmp -s $cns.in ${common_objpfx}localedata/$cns.out || status=1
 
-  LOCPATH=$common_objpfx/localedata LC_ALL=$cns \
-   LD_LIBRARY_PATH=$common_objpfx $common_objpfx/elf/ld.so \
-   $common_objpfx/localedata/xfrm-test $id < $cns.in \
-   > $common_objpfx/localedata/$cns.xout || status=1
-  cmp -s $cns.in $common_objpfx/localedata/$cns.xout || status=1
+  LOCPATH=${common_objpfx}localedata LC_ALL=$cns \
+   ${common_objpfx}elf/ld.so --library-path $common_objpfx \
+   ${common_objpfx}localedata/xfrm-test $id < $cns.in \
+   > ${common_objpfx}localedata/$cns.xout || status=1
+  cmp -s $cns.in ${common_objpfx}localedata/$cns.xout || status=1
 done
 
 exit $status
diff --git a/localedata/tst-fmon.sh b/localedata/tst-fmon.sh
index aadc40cbf6..4192a405d6 100755
--- a/localedata/tst-fmon.sh
+++ b/localedata/tst-fmon.sh
@@ -32,19 +32,19 @@ for l in $lang; do
     cns=`echo $l | sed 's/\(.*\)[.][^.]*/\1/'`
     cn=locales/$cns
     fn=charmaps/`echo $l | sed 's/.*[.]\([^.]*\)/\1/'`
-    LD_LIBRARY_PATH=$common_objpfx I18NPATH=./locales \
-    ${common_objpfx}elf/ld.so ${common_objpfx}locale/localedef \
+    I18NPATH=./locales \
+    ${common_objpfx}elf/ld.so --library-path $common_objpfx \
+    ${common_objpfx}locale/localedef \
     --quiet -i $cn -f $fn ${common_objpfx}localedata/$cns
 done
 
 # Run the tests.
 IFS="	"                # This is a TAB
-cat $datafile |
 while read locale format value expect; do
     if [ -n "$format" ]; then
 	LOCPATH=${common_objpfx}localedata \
-	LD_LIBRARY_PATH=$common_objpfx \
-	${common_objpfx}elf/ld.so ${common_objpfx}localedata/tst-fmon \
+	${common_objpfx}elf/ld.so --library-path $common_objpfx \
+        ${common_objpfx}localedata/tst-fmon \
 	    "$locale" "$format" "$value" "$expect"
 	if [ $? -eq 0 ]; then
 	    if [ $DEBUG -eq 1 ]; then
@@ -57,7 +57,7 @@ while read locale format value expect; do
 	    exit 1
 	fi
     fi
-done
+done < $datafile
 
 exit $?
 # Local Variables:
diff --git a/math/libm-test.c b/math/libm-test.c
index ea5716ff81..7093fdcf14 100644
--- a/math/libm-test.c
+++ b/math/libm-test.c
@@ -902,7 +902,7 @@ asin_test (void)
   check ("asin (1.0) ==  pi/2", FUNC(asin) (1.0), M_PI_2l);
   check ("asin (-1.0) ==  -pi/2", FUNC(asin) (-1.0), -M_PI_2l);
   check_eps ("asin (0.7) ==  0.775397496...", FUNC(asin) (0.7),
-	     0.7753974966107530637L, CHOOSE(7e-17L, 2e-16, 0));
+	     0.7753974966107530637L, CHOOSE(7e-17L, 2e-16, 2e-7));
 }
 
 
@@ -917,7 +917,7 @@ asinh_test (void)
   check_isinfn ("asinh(-inf) == -inf", FUNC(asinh) (minus_infty));
 #endif
   check_eps ("asinh(0.7) == 0.652666566...", FUNC(asinh) (0.7),
-	     0.652666566082355786L, CHOOSE(4e-17L, 0, 0));
+	     0.652666566082355786L, CHOOSE(4e-17L, 0, 6e-8));
 
 }
 
@@ -1945,7 +1945,7 @@ tanh_test (void)
   check ("tanh (-inf) == -1", FUNC(tanh) (minus_infty), -1);
 #endif
   check_eps ("tanh (0.7) == 0.6043677771...", FUNC(tanh) (0.7),
-	     0.60436777711716349631L, CHOOSE(3e-17L, 0, 0));
+	     0.60436777711716349631L, CHOOSE(3e-17L, 0, 6e-8));
 }
 
 
@@ -2708,7 +2708,7 @@ cexp_test (void)
 
   result = FUNC(cexp) (BUILD_COMPLEX (0.7, 1.2));
   check_eps ("real(cexp(0.7 + i 1.2)) == 0.72969...", __real__ result,
-	     0.7296989091503236012L, CHOOSE(6e-17L, 0, 2e-7));
+	     0.7296989091503236012L, CHOOSE(6e-17L, 2e-16, 2e-7));
   check_eps ("imag(cexp(0.7 + i 1.2)) == 1.87689...", __imag__ result,
 	     1.8768962328348102821L, CHOOSE(2e-16L, 0, 3e-7));
 
@@ -4603,9 +4603,9 @@ ctanh_test (void)
 
   result = FUNC(ctanh) (BUILD_COMPLEX (0.7, 1.2));
   check_eps ("real(ctanh(0.7 + i 1.2)) == 1.34721...", __real__ result,
-	     1.3472197399061191630L, CHOOSE(4e-17L, 6e-17, 2e-7));
+	     1.3472197399061191630L, CHOOSE(4e-17L, 3e-16, 2e-7));
   check_eps ("imag(ctanh(0.7 + i 1.2)) == -0.47786...", __imag__ result,
-	     0.4778641038326365540L, CHOOSE(9e-17L, 6e-17, 0));
+	     0.4778641038326365540L, CHOOSE(9e-17L, 6e-17, 9e-8));
 
   result = FUNC(ctanh) (BUILD_COMPLEX (-2, -3));
   check_eps ("real(ctanh(-2 - i 3)) == -0.96538...", __real__ result,
diff --git a/nscd/connections.c b/nscd/connections.c
index abde747a8a..36e89fa25d 100644
--- a/nscd/connections.c
+++ b/nscd/connections.c
@@ -393,7 +393,7 @@ pw_send_disabled (int conn)
 
   if (sock[conn] == 0)
     {
-      dbg_log ("bad connection id on send response [%d|%d]",
+      dbg_log (_("bad connection id on send response [%d|%d]"),
 	       conn, sock[conn]);
       return;
     }
diff --git a/nscd/grpcache.c b/nscd/grpcache.c
index 9734d08510..2b837f8bc1 100644
--- a/nscd/grpcache.c
+++ b/nscd/grpcache.c
@@ -109,7 +109,7 @@ cache_grpinit ()
   grptbl = calloc (modulo, sizeof (grphash));
   if (grptbl == NULL)
     return -1;
-  calloc (modulo, sizeof (grphash));
+  gidtbl = calloc (modulo, sizeof (grphash));
   if (gidtbl == NULL)
     return -1;
   negtbl = calloc (modulo, sizeof (neghash));
@@ -179,6 +179,9 @@ add_cache (struct group *grp)
   unsigned long int hash = __nis_hash (grp->gr_name,
 				       strlen (grp->gr_name)) % modulo;
 
+  if (debug_flag)
+    dbg_log (_("grp_add_cache (%s)"), grp->gr_name);
+
   work = &grptbl[hash];
 
   if (grptbl[hash].grp == NULL)
@@ -244,10 +247,16 @@ add_negcache (char *key)
   neghash *work;
   unsigned long int hash = __nis_hash (key, strlen (key)) % modulo;
 
+  if (debug_flag)
+    dbg_log (_("grp_add_netgache (%s|%ld)"), key, hash);
+
   work = &negtbl[hash];
 
   if (negtbl[hash].key == NULL)
-    negtbl[hash].key = strdup (key);
+    {
+      negtbl[hash].key = strdup (key);
+      negtbl[hash].next = NULL;
+    }
   else
     {
       while (work->next != NULL)
@@ -268,6 +277,9 @@ cache_search_neg (const char *key)
   neghash *work;
   unsigned long int hash = __nis_hash (key, strlen (key)) % modulo;
 
+  if (debug_flag)
+    dbg_log (_("grp_cache_search_neg (%s|%ld)"), key, hash);
+
   work = &negtbl[hash];
 
   while (work->key != NULL)
@@ -286,7 +298,7 @@ void *
 cache_getgrnam (void *v_param)
 {
   param_t *param = (param_t *)v_param;
-  struct group *grp, resultbuf;
+  struct group *grp;
 
   pthread_rwlock_rdlock (&grplock);
   grp = cache_search_name (param->key);
@@ -294,7 +306,7 @@ cache_getgrnam (void *v_param)
   /* I don't like it to hold the read only lock longer, but it is
      necessary to avoid to much malloc/free/strcpy.  */
 
-  if (grp)
+  if (grp != NULL)
     {
       if (debug_flag)
 	dbg_log (_("Found \"%s\" in cache !"), param->key);
@@ -307,9 +319,10 @@ cache_getgrnam (void *v_param)
     }
   else
     {
+      int status;
       int buflen = 1024;
       char *buffer = calloc (1, buflen);
-      int status;
+      struct group resultbuf;
 
       if (debug_flag)
 	dbg_log (_("Doesn't found \"%s\" in cache !"), param->key);
@@ -371,6 +384,9 @@ cache_gr_disabled (void *v_param)
 {
   param_t *param = (param_t *)v_param;
 
+  if (debug_flag)
+    dbg_log (_("\tgroup cache is disabled\n"));
+
   gr_send_disabled (param->conn);
   return NULL;
 }
diff --git a/nscd/nscd.c b/nscd/nscd.c
index 7e0b32ae19..a53abc1fe0 100644
--- a/nscd/nscd.c
+++ b/nscd/nscd.c
@@ -107,7 +107,7 @@ main (int argc, char **argv)
   /* Parse and process arguments.  */
   argp_parse (&argp, argc, argv, 0, &remaining, NULL);
 
-  if (remaining != 0)
+  if (remaining != argc)
     {
       error (0, 0, gettext ("wrong number of arguments"));
       argp_help (&argp, stdout, ARGP_HELP_SEE, program_invocation_short_name);
@@ -152,8 +152,11 @@ main (int argc, char **argv)
   /* Create first sockets */
   init_sockets ();
   /* Init databases */
-  cache_pwdinit ();
-  cache_grpinit ();
+  if ((cache_pwdinit () < 0) || (cache_grpinit () < 0))
+    {
+      fputs (_("Not enough memory\n"), stderr);
+      return 1;
+    }
   /* Handle incoming requests */
   handle_requests ();
 
diff --git a/nscd/nscd_conf.c b/nscd/nscd_conf.c
index 59c225e566..62a1e6cbd1 100644
--- a/nscd/nscd_conf.c
+++ b/nscd/nscd_conf.c
@@ -122,6 +122,11 @@ nscd_parse_file (const char *fname)
 	  if (strcmp (arg1, "passwd") == 0
 	      && strcmp (arg2, "no") == 0)
 	    disabled_passwd = 1;
+	  else if (strcmp (arg1, "group") == 0
+		   && strcmp (arg2, "no") == 0)
+	    disabled_group = 1;
+	  else
+	    dbg_log (_("service %s is not supported"), arg1);
 	}
       else if (strcmp (entry, "logfile") == 0)
 	{
diff --git a/nscd/nscd_getgr_r.c b/nscd/nscd_getgr_r.c
index 6739657e48..f133530f9f 100644
--- a/nscd/nscd_getgr_r.c
+++ b/nscd/nscd_getgr_r.c
@@ -205,7 +205,12 @@ __nscd_getgr_r (const char *key, request_type type, struct group *resultbuf,
 	      return 1;
 	    }
 	}
+      close (sock);
+      return 0;
+    }
+  else
+    {
+      close (sock);
+      return -1;
     }
-  close (sock);
-  return 0;
 }
diff --git a/nscd/pwdcache.c b/nscd/pwdcache.c
index 82a26efc25..721e77b7c9 100644
--- a/nscd/pwdcache.c
+++ b/nscd/pwdcache.c
@@ -163,7 +163,7 @@ add_cache (struct passwd *pwd)
 				       strlen (pwd->pw_name)) % modulo;
 
   if (debug_flag)
-    dbg_log (_("add_cache (%s)"), pwd->pw_name);
+    dbg_log (_("pwd_add_cache (%s)"), pwd->pw_name);
 
   work = &pwdtbl[hash];
 
@@ -231,7 +231,7 @@ add_negcache (char *key)
   unsigned long int hash = __nis_hash (key, strlen (key)) % modulo;
 
   if (debug_flag)
-    dbg_log (_("add_netgache (%s|%ld)"), key, hash);
+    dbg_log (_("pwd_add_netgache (%s|%ld)"), key, hash);
 
   work = &negtbl[hash];
 
@@ -249,7 +249,7 @@ add_negcache (char *key)
       work->next->key = strdup (key);
       work = work->next;
     }
-  /* Set a pointer from the pwuid hash table to the pwname hash table */
+
   time (&work->create);
 
   return 0;
@@ -261,10 +261,10 @@ cache_search_neg (const char *key)
   neghash *work;
   unsigned long int hash = __nis_hash (key, strlen (key)) % modulo;
 
-  work = &negtbl[hash];
-
   if (debug_flag)
-    dbg_log (_("cache_search_neg (%s|%ld)"), key, hash);
+    dbg_log (_("pwd_cache_search_neg (%s|%ld)"), key, hash);
+
+  work = &negtbl[hash];
 
   while (work->key != NULL)
     {
@@ -281,8 +281,8 @@ cache_search_neg (const char *key)
 void *
 cache_getpwnam (void *v_param)
 {
+  struct passwd *pwd;
   param_t *param = (param_t *)v_param;
-  struct passwd *pwd, resultbuf;
 
   pthread_rwlock_rdlock (&pwdlock);
   pwd = cache_search_name (param->key);
@@ -300,13 +300,13 @@ cache_getpwnam (void *v_param)
       close_socket (param->conn);
 
       pthread_rwlock_unlock (&pwdlock);
-      pwd = &resultbuf;
     }
   else
     {
       int status;
       int buflen = 1024;
-      char *buffer = malloc (buflen);
+      char *buffer = calloc (1, buflen);
+      struct passwd resultbuf;
 
       if (debug_flag)
 	dbg_log (_("Doesn't found \"%s\" in cache !"), param->key);
@@ -367,6 +367,9 @@ cache_pw_disabled (void *v_param)
 {
   param_t *param = (param_t *)v_param;
 
+  if (debug_flag)
+    dbg_log (_("\tpasswd cache is disabled\n"));
+
   pw_send_disabled (param->conn);
   return NULL;
 }
diff --git a/posix/globtest.sh b/posix/globtest.sh
index 48328af032..d0b78b2ecd 100755
--- a/posix/globtest.sh
+++ b/posix/globtest.sh
@@ -23,8 +23,8 @@ echo 1_2 > $testdir/dir1/file1_2
 # Run some tests.
 result=0
 
-LD_LIBRARY_PATH=$common_objpfx \
-${elf_objpfx}${rtld_installed_name} ${common_objpfx}posix/globtest "$testdir" "*" |
+${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} \
+${common_objpfx}posix/globtest "$testdir" "*" |
 sort > $testout
 cat <<"EOF" | cmp - $testout || result=1
 `dir1'
@@ -34,8 +34,8 @@ cat <<"EOF" | cmp - $testout || result=1
 not NULL
 EOF
 
-LD_LIBRARY_PATH=$common_objpfx \
-${elf_objpfx}${rtld_installed_name} ${common_objpfx}posix/globtest "$testdir" "*/*" |
+${elf_objpfx}${rtld_installed_name} --library-path $common_objpfx \
+${common_objpfx}posix/globtest "$testdir" "*/*" |
 sort > $testout
 cat <<"EOF" | cmp - $testout || result=1
 `dir1/file1_1'
@@ -43,40 +43,40 @@ cat <<"EOF" | cmp - $testout || result=1
 not NULL
 EOF
 
-LD_LIBRARY_PATH=$common_objpfx \
-${elf_objpfx}${rtld_installed_name} ${common_objpfx}posix/globtest "$testdir" "*/1" |
+${elf_objpfx}${rtld_installed_name} --library-path $common_objpfx \
+${common_objpfx}posix/globtest "$testdir" "*/1" |
 sort > $testout
 cat <<"EOF" | cmp - $testout || result=1
 GLOB_NOMATCH
 NULL
 EOF
 
-LD_LIBRARY_PATH=$common_objpfx \
-${elf_objpfx}${rtld_installed_name} ${common_objpfx}posix/globtest "$testdir" "*/*1_1" |
+${elf_objpfx}${rtld_installed_name} --library-path $common_objpfx \
+${common_objpfx}posix/globtest "$testdir" "*/*1_1" |
 sort > $testout
 cat <<"EOF" | cmp - $testout || result=1
 `dir1/file1_1'
 not NULL
 EOF
 
-LD_LIBRARY_PATH=$common_objpfx \
-${elf_objpfx}${rtld_installed_name} ${common_objpfx}posix/globtest "$testdir" "*/file1_1" |
+${elf_objpfx}${rtld_installed_name} --library-path $common_objpfx \
+${common_objpfx}posix/globtest "$testdir" "*/file1_1" |
 sort > $testout
 cat <<"EOF" | cmp - $testout || result=1
 `dir1/file1_1'
 not NULL
 EOF
 
-LD_LIBRARY_PATH=$common_objpfx \
-${elf_objpfx}${rtld_installed_name} ${common_objpfx}posix/globtest "$testdir" "*-/*" |
+${elf_objpfx}${rtld_installed_name} --library-path $common_objpfx \
+${common_objpfx}posix/globtest "$testdir" "*-/*" |
 sort > $testout
 cat <<"EOF" | cmp - $testout || result=1
 GLOB_NOMATCH
 NULL
 EOF
 
-LD_LIBRARY_PATH=$common_objpfx \
-${elf_objpfx}${rtld_installed_name} ${common_objpfx}posix/globtest "$testdir" "*-" |
+${elf_objpfx}${rtld_installed_name} --library-path $common_objpfx \
+${common_objpfx}posix/globtest "$testdir" "*-" |
 sort > $testout
 cat <<"EOF" | cmp - $testout || result=1
 GLOB_NOMATCH
diff --git a/sunrpc/rpc_sample.c b/sunrpc/rpc_sample.c
index 89bfc7f5a0..959f0a1780 100644
--- a/sunrpc/rpc_sample.c
+++ b/sunrpc/rpc_sample.c
@@ -278,7 +278,7 @@ write_sample_server (definition * def)
 	  f_print(fout, "\txdr_free (xdr_result, result);\n");
 	  f_print(fout,
 		  "\n\t/*\n\t * Insert additional freeing code here, if needed\n\t */\n");
-	  f_print(fout, "\n\treturn 0;\n}\n");
+	  f_print(fout, "\n\treturn 1;\n}\n");
 	}
     }
 }
diff --git a/sysdeps/i386/__longjmp.S b/sysdeps/i386/__longjmp.S
index 7e039deb8f..a8049e9de3 100644
--- a/sysdeps/i386/__longjmp.S
+++ b/sysdeps/i386/__longjmp.S
@@ -1,5 +1,5 @@
 /* longjmp for i386.
-   Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -25,6 +25,8 @@
 ENTRY (__longjmp)
 	movl 4(%esp), %ecx	/* User's jmp_buf in %ecx.  */
 	movl 8(%esp), %eax	/* Second argument is return value.  */
+	/* Save the return address now.  */
+	movl (JB_PC*4)(%ecx), %edx
      	/* Restore registers.  */
 	movl (JB_BX*4)(%ecx), %ebx
 	movl (JB_SI*4)(%ecx), %esi
@@ -32,6 +34,5 @@ ENTRY (__longjmp)
 	movl (JB_BP*4)(%ecx), %ebp
 	movl (JB_SP*4)(%ecx), %esp
 	/* Jump to saved PC.  */
-     	movl (JB_PC*4)(%ecx), %ecx
-     	jmp *%ecx
+     	jmp *%edx
 END (__longjmp)
diff --git a/sysdeps/unix/sysv/linux/alpha/kernel_sigaction.h b/sysdeps/unix/sysv/linux/alpha/kernel_sigaction.h
index f8c42e0a1e..4c35d969cf 100644
--- a/sysdeps/unix/sysv/linux/alpha/kernel_sigaction.h
+++ b/sysdeps/unix/sysv/linux/alpha/kernel_sigaction.h
@@ -5,3 +5,11 @@ struct old_kernel_sigaction {
 	unsigned long sa_mask;
 	unsigned int sa_flags;
 };
+
+/* This is the sigaction structure from the Linux 2.1.68 kernel.  */
+
+struct kernel_sigaction {
+	__sighandler_t k_sa_handler;
+	unsigned int sa_flags;
+	sigset_t sa_mask;
+};
diff --git a/sysdeps/unix/sysv/linux/i386/sigaction.c b/sysdeps/unix/sysv/linux/i386/sigaction.c
index 6e26a5e6e2..a6d2b63634 100644
--- a/sysdeps/unix/sysv/linux/i386/sigaction.c
+++ b/sysdeps/unix/sysv/linux/i386/sigaction.c
@@ -28,8 +28,8 @@
 #include <kernel_sigaction.h>
 
 
-extern int __syscall_rt_sigaction (int, const struct sigaction *,
-				   struct sigaction *, size_t);
+extern int __syscall_rt_sigaction (int, const struct kernel_sigaction *,
+				   struct kernel_sigaction *, size_t);
 
 /* The variable is shared between all wrappers around signal handling
    functions which have RT equivalents.  */
@@ -47,27 +47,34 @@ __sigaction (int sig, const struct sigaction *act, struct sigaction *oact)
   /* First try the RT signals.  */
   if (!__libc_missing_rt_sigs)
     {
-      struct sigaction nact, *nactp;
+      struct kernel_sigaction kact, koact;
 
       if (act)
 	{
-	  nact.sa_handler = act->sa_handler;
-	  memcpy (&nact.sa_mask, &act->sa_mask, sizeof (sigset_t));
-	  nact.sa_flags = act->sa_flags;
+	  kact.k_sa_handler = act->sa_handler;
+	  memcpy (&kact.sa_mask, &act->sa_mask, sizeof (sigset_t));
+	  kact.sa_flags = act->sa_flags;
 
-	  nact.sa_restorer = ((act->sa_flags & SA_NOMASK)
+	  kact.sa_restorer = ((act->sa_flags & SA_NOMASK)
 			      ? &&restore_nomask : &&restore);
-	  nactp = &nact;
 	}
-      else
-	nactp = NULL;
 
       /* XXX The size argument hopefully will have to be changed to the
 	 real size of the user-level sigset_t.  */
-      result = __syscall_rt_sigaction (sig, nactp, oact, _NSIG / 8);
+      result = __syscall_rt_sigaction (sig, act ? &kact : NULL,
+				       oact ? &koact : NULL, _NSIG / 8);
 
       if (result >= 0 || errno != ENOSYS)
-	return result;
+	{
+	  if (oact && result >= 0)
+	    {
+	      oact->sa_handler = koact.k_sa_handler;
+	      memcpy (&oact->sa_mask, &koact.sa_mask, sizeof (sigset_t));
+	      oact->sa_flags = koact.sa_flags;
+	      oact->sa_restorer = koact.sa_restorer;
+	    }
+	  return result;
+	}
 
       __libc_missing_rt_sigs = 1;
     }
diff --git a/sysdeps/unix/sysv/linux/kernel_sigaction.h b/sysdeps/unix/sysv/linux/kernel_sigaction.h
index e3901cfe5c..1ce2be20a1 100644
--- a/sysdeps/unix/sysv/linux/kernel_sigaction.h
+++ b/sysdeps/unix/sysv/linux/kernel_sigaction.h
@@ -8,3 +8,12 @@ struct old_kernel_sigaction {
 	unsigned long sa_flags;
 	void (*sa_restorer) __P ((void));
 };
+
+/* This is the sigaction structure from the Linux 2.1.68 kernel.  */
+
+struct kernel_sigaction {
+	__sighandler_t k_sa_handler;
+	unsigned long sa_flags;
+	void (*sa_restorer) __P ((void));
+	sigset_t sa_mask;
+};
diff --git a/sysdeps/unix/sysv/linux/sigaction.c b/sysdeps/unix/sysv/linux/sigaction.c
index 510cbe7040..5f9a7feac3 100644
--- a/sysdeps/unix/sysv/linux/sigaction.c
+++ b/sysdeps/unix/sysv/linux/sigaction.c
@@ -26,8 +26,8 @@
 
 extern int __syscall_sigaction (int, const struct old_kernel_sigaction *,
 				struct old_kernel_sigaction *);
-extern int __syscall_rt_sigaction (int, const struct sigaction *,
-				   struct sigaction *, size_t);
+extern int __syscall_rt_sigaction (int, const struct kernel_sigaction *,
+				   struct kernel_sigaction *, size_t);
 
 /* The variable is shared between all wrappers around signal handling
    functions which have RT equivalents.  */
@@ -43,17 +43,41 @@ __sigaction (sig, act, oact)
      struct sigaction *oact;
 {
   struct old_kernel_sigaction k_sigact, k_osigact;
-  int error;
+  int result;
 
   /* First try the RT signals.  */
   if (!__libc_missing_rt_sigs)
     {
+      struct kernel_sigaction kact, koact;
+
+      if (act)
+	{
+	  kact.k_sa_handler = act->sa_handler;
+	  memcpy (&kact.sa_mask, &act->sa_mask, sizeof (sigset_t));
+	  kact.sa_flags = act->sa_flags;
+#ifdef HAVE_SA_RESTORER
+	  kact.sa_restorer = act->sa_restorer;
+#endif
+	}
+
       /* XXX The size argument hopefully will have to be changed to the
 	 real size of the user-level sigset_t.  */
-      int result = __syscall_rt_sigaction (sig, act, oact, _NSIG / 8);
+      result = __syscall_rt_sigaction (sig, act ? &kact : 0,
+				       oact ? &koact : 0, _NSIG / 8);
 
       if (result >= 0 || errno != ENOSYS)
-	return result;
+	{
+	  if (oact && result >= 0)
+	    {
+	      oact->sa_handler = koact.k_sa_handler;
+	      memcpy (&oact->sa_mask, &koact.sa_mask, sizeof (sigset_t));
+	      oact->sa_flags = koact.sa_flags;
+#ifdef HAVE_SA_RESTORER
+	      oact->sa_restorer = koact.sa_restorer;
+#endif
+	    }
+	  return result;
+	}
 
       __libc_missing_rt_sigs = 1;
     }
@@ -67,9 +91,9 @@ __sigaction (sig, act, oact)
       k_sigact.sa_restorer = act->sa_restorer;
 #endif
     }
-  error = __syscall_sigaction (sig, act ? &k_sigact : 0,
+  result = __syscall_sigaction (sig, act ? &k_sigact : 0,
 			       oact ? &k_osigact : 0);
-  if (oact && error >= 0)
+  if (oact && result >= 0)
     {
       oact->sa_handler = k_osigact.k_sa_handler;
       oact->sa_mask.__val[0] = k_osigact.sa_mask;
@@ -78,7 +102,7 @@ __sigaction (sig, act, oact)
       oact->sa_restorer = k_osigact.sa_restorer;
 #endif
     }
-  return error;
+  return result;
 }
 
 weak_alias (__sigaction, sigaction)