]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Update.
authorUlrich Drepper <drepper@redhat.com>
Fri, 27 Feb 1998 18:32:03 +0000 (18:32 +0000)
committerUlrich Drepper <drepper@redhat.com>
Fri, 27 Feb 1998 18:32:03 +0000 (18:32 +0000)
* misc/syslog.c: Change to allow user the interpretation of the
outcome even with syslog having no return value.

1998-02-05 20:41  Wolfram Gloger  <wmglo@dent.med.uni-muenchen.de>

* elf/dl-addr.c: Fix search algorithms in dladdr(); don't assume
that the number of program headers is >0 (which is wrong for the
loader itself).

1998-02-27  Ulrich Drepper  <drepper@cygnus.com>

ChangeLog
elf/dl-addr.c
misc/syslog.c

index 5747a62723589ac42e6b15bf76ed59df90819e71..c5e8ff32512ab7462b45337d3c40650923afd18a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+1998-02-27  Ulrich Drepper  <drepper@cygnus.com>
+
+       * misc/syslog.c: Change to allow user the interpretation of the
+       outcome even with syslog having no return value.
+
+1998-02-05 20:41  Wolfram Gloger  <wmglo@dent.med.uni-muenchen.de>
+
+       * elf/dl-addr.c: Fix search algorithms in dladdr(); don't assume
+       that the number of program headers is >0 (which is wrong for the
+       loader itself).
+
 1998-02-27  Ulrich Drepper  <drepper@cygnus.com>
 
        * Makefile (distribute): Add README.libm.
index baa6df593e145b17dade858b176b6b01a123231e..4d78738e6476ee46f4569d430a9bcef8b1d3e50c 100644 (file)
@@ -1,5 +1,5 @@
 /* Locate the shared object symbol nearest a given address.
-   Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+   Copyright (C) 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
@@ -41,13 +41,16 @@ _dl_addr (const void *address, Dl_info *info)
       /* We know ADDRESS lies within MATCH if in any shared object.
         Make sure it isn't past the end of MATCH's segments.  */
       size_t n = match->l_phnum;
-      do
-       --n;
-      while (match->l_phdr[n].p_type != PT_LOAD);
-      if (addr >= (match->l_addr +
-                  match->l_phdr[n].p_vaddr + match->l_phdr[n].p_memsz))
-       /* Off the end of the highest-addressed shared object.  */
-       return 0;
+      if (n > 0)
+       {
+         do
+           --n;
+         while (match->l_phdr[n].p_type != PT_LOAD);
+         if (addr >= (match->l_addr +
+                      match->l_phdr[n].p_vaddr + match->l_phdr[n].p_memsz))
+           /* Off the end of the highest-addressed shared object.  */
+           return 0;
+       }
     }
   else
     return 0;
index 09848456993fa97d21db79d00922a8e298fd886d..0373ee1241d91d0100f24b81c5719eb6bbfefacd 100644 (file)
@@ -252,6 +252,8 @@ openlog_internal(const char *ident, int logstat, int logfac)
                        }
                }
                if (LogFile != -1 && !connected)
+               {
+                       int old_errno = errno;
                        if (__connect(LogFile, &SyslogAddr, sizeof(SyslogAddr))
                            == -1)
                        {
@@ -263,6 +265,7 @@ openlog_internal(const char *ident, int logstat, int logfac)
                                {
                                        /* retry with next SOCK_STREAM: */
                                        LogType = SOCK_STREAM;
+                                       __set_errno (old_errno);
                                        continue;
                                }
                        } else