]> git.pld-linux.org Git - packages/elfutils.git/blobdiff - elfutils-scanf.patch
- up to 0.141
[packages/elfutils.git] / elfutils-scanf.patch
index 8a98743a73fc8ce24531f7231e1ed95bc4b5b6c1..a8337d19add311f76b488336eb6dff650537d07d 100644 (file)
@@ -1,49 +1,28 @@
 --- elfutils-0.137/src/addr2line.c.orig        2008-08-09 06:06:44.000000000 +0200
 +++ elfutils-0.137/src/addr2line.c     2008-09-09 22:15:16.304992337 +0200
-@@ -374,8 +374,13 @@ handle_address (const char *string, Dwfl
+@@ -437,6 +437,12 @@
+   return false;
+ }
++#if (__GLIBC__ >= 2) && (__GLIBC_MINOR__ >= 7) && (__GNUC__ >= 4) && (__GNUC_MINOR__ >= 3)
++# define SCANF_ADDR "%m"
++#else
++# define SCANF_ADDR "%a"
++#endif
++
+ static int
+ handle_address (const char *string, Dwfl *dwfl)
+ {
+@@ -447,10 +453,10 @@
        bool parsed = false;
        int n;
        char *name = NULL;
-+#if (__GLIBC__ >= 2) && (__GLIBC_MINOR__ >= 7) && (__GNUC__ >= 4) && (__GNUC_MINOR__ >= 3)
-       if (sscanf (string, "(%m[^)])%" PRIiMAX "%n", &name, &addr, &n) == 2
+-      if (sscanf (string, "(%m[^)])%" PRIiMAX "%n", &name, &addr, &n) == 2
++      if (sscanf (string, "(" SCANF_ADDR "[^)])%" PRIiMAX "%n", &name, &addr, &n) == 2
          && string[n] == '\0')
-+#else
-+      if (sscanf (string, "(%a[^)])%" PRIiMAX "%n", &name, &addr, &n) == 2
-+        && string[n] == '\0')
-+#endif
-       {
-         /* It was (section)+offset.  This makes sense if there is
-            only one module to look in for a section.  */
-@@ -415,8 +420,13 @@ handle_address (const char *string, Dwfl
-               }
-           }
-       }
-+#if (__GLIBC__ >= 2) && (__GLIBC_MINOR__ >= 7) && (__GNUC__ >= 4) && (__GNUC_MINOR__ >= 3)
-       else if (sscanf (string, "%m[^-+]%" PRIiMAX "%n", &name, &addr, &n) == 2
+       parsed = adjust_to_section (name, &addr, dwfl);
+-      else if (sscanf (string, "%m[^-+]%" PRIiMAX "%n", &name, &addr, &n) == 2
++      else if (sscanf (string, SCANF_ADDR "[^-+]%" PRIiMAX "%n", &name, &addr, &n) == 2
               && string[n] == '\0')
-+#else
-+      else if (sscanf (string, "%a[^-+]%" PRIiMAX "%n", &name, &addr, &n) == 2
-+             && string[n] == '\0')
-+#endif
        {
          /* It was symbol+offset.  */
-         GElf_Sym sym;
---- elfutils-0.137/src/Makefile.am.orig        2008-09-09 21:30:37.592989823 +0200
-+++ elfutils-0.137/src/Makefile.am     2008-09-09 22:36:04.380988147 +0200
-@@ -35,7 +35,7 @@
- AM_CFLAGS += -Wall -Wshadow -std=gnu99 $(native_ld_cflags) \
-            $(if $($(*F)_no_Werror),,-Werror) \
-            $(if $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) \
--           $(if $($(*F)_no_Wformat),,-Wformat=2) $(CFLAGS_$(*F))
-+           $(if $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $(CFLAGS_$(*F))
- INCLUDES = -I$(srcdir) -I$(srcdir)/../libelf -I$(srcdir)/../libebl \
-          -I$(srcdir)/../libdw -I$(srcdir)/../libdwfl \
-@@ -109,6 +109,7 @@
- nm_no_Wformat = yes
- size_no_Wformat = yes
- strings_no_Wformat = yes
-+addr2line_no_Wformat = yes
- # XXX While the file is not finished, don't warn about this
- ldgeneric_no_Wunused = yes
This page took 0.033694 seconds and 4 git commands to generate.