]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Update.
authorUlrich Drepper <drepper@redhat.com>
Thu, 29 Oct 1998 15:31:47 +0000 (15:31 +0000)
committerUlrich Drepper <drepper@redhat.com>
Thu, 29 Oct 1998 15:31:47 +0000 (15:31 +0000)
* malloc/mtrace.c (tr_where): Replace snprintf call by mempcpy and
_fitoa.

ChangeLog
linuxthreads/ChangeLog
malloc/mtrace.c

index 3ad6c72dd4edacf878e499d20b9167c3241cabad..ab7ddd011cce112c4544f780ab6de8edbfbd3776 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 1998-10-29  Ulrich Drepper  <drepper@cygnus.com>
 
+       * malloc/mtrace.c (tr_where): Replace snprintf call by mempcpy and
+       _fitoa.
+
        * sysdeps/unix/sysv/linux/ttyname_r.c (ttyname_r): Try reading
        /prof/self/fd/FD first.
        * sysdeps/unix/sysv/linux/ttyname.c (ttyname): Likewise.
index 635bc634dd18ff76049cd21f754b413f9694346f..dc044ad2ae239c0d8a7c2542b3ab32794c2879aa 100644 (file)
@@ -1,3 +1,25 @@
+1998-10-29 14:28  Ulrich Drepper  <drepper@cygnus.com>
+
+       * spinlock.h (__pthread_trylock): Define inline.
+       (__pthread_lock): Add extra parameter to declaration.  Declare
+       using internal_function.
+       (__pthread_unlock): Declare using internal_function.
+       * spinlock.c (__pthread_lock): Add new parameter.  Use it instead
+       of local variable self.  Avoid recomputing self.  Define using
+       internal_function.
+       (__pthread_trylock): Remove.
+       (__pthread_unlock): Define using internal_function.
+       * cancel.c: Adjust for __pthread_lock interface change.  Use already
+       computed self value is possible.
+       * condvar.c: Likewise.
+       * join.c: Likewise.
+       * manager.c: Likewise.
+       * mutex.c: Likewise.
+       * pthread.c: Likewise.
+       * rwlock.c: Likewise.
+       * semaphore.c: Likewise.
+       * signals.c: Likewise.
+
 1998-10-27 13:46  Ulrich Drepper  <drepper@cygnus.com>
 
        * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
index 8dd711a3a79dd80fbaea75729a0519c11fa20994..d15569c9d6df06cb68fe2c26627fba1a1dcf394f 100644 (file)
 
 #include <stdio.h>
 #include <string.h>
-
-#ifndef        __GNU_LIBRARY__
-extern char *getenv ();
-#else
 #include <stdlib.h>
-#endif
 
-#if defined _LIBC && defined USE_IN_LIBIO
+#include <stdio-common/_itoa.h>
+
+#ifdef USE_IN_LIBIO
 # include <libio/iolibio.h>
 # define setvbuf(s, b, f, l) _IO_setvbuf (s, b, f, l)
 #endif
@@ -99,14 +96,19 @@ tr_where (caller)
          char *buf = (char *) "";
          if (info.dli_sname && info.dli_sname[0])
            {
-             size_t len = strlen (info.dli_sname) + 22;
-             buf = alloca (len);
-             if (caller >= (const __ptr_t) info.dli_saddr)
-               snprintf (buf, len, "(%s+0x%x)", info.dli_sname,
-                         caller - (const __ptr_t) info.dli_saddr);
-             else
-               snprintf (buf, len, "(%s-0x%x)", info.dli_sname,
-                         (const __ptr_t) info.dli_saddr - caller);
+             size_t len = strlen (info.dli_sname);
+             buf = alloca (len + 6 + 2 * sizeof (void *));
+
+             buf[0] = '(';
+             __stpcpy (_fitoa (caller >= (const __ptr_t) info.dli_saddr
+                               ? caller - (const __ptr_t) info.dli_saddr
+                               : (const __ptr_t) info.dli_saddr - caller,
+                               __stpcpy (__mempcpy (buf + 1, info.dli_sname,
+                                                    len),
+                                         caller >= (__ptr_t) info.dli_saddr
+                                         ? "+0x" : "-0x"),
+                               16, 0),
+                       ")");
            }
 
          fprintf (mallstream, "@ %s%s%s[%p] ",