2016-12-29 03:53:45 +00:00
|
|
|
https://sourceware.org/bugzilla/show_bug.cgi?id=21002
|
|
|
|
|
2018-06-17 09:08:51 +00:00
|
|
|
--- a/lib/system.h
|
|
|
|
+++ b/lib/system.h
|
2017-05-05 23:05:56 +00:00
|
|
|
@@ -29,7 +29,18 @@
|
|
|
|
#ifndef LIB_SYSTEM_H
|
|
|
|
#define LIB_SYSTEM_H 1
|
2015-06-14 17:43:40 +00:00
|
|
|
|
2016-12-29 03:53:45 +00:00
|
|
|
+#ifdef HAVE_ERROR_H
|
|
|
|
+#include "error.h"
|
|
|
|
+#else
|
|
|
|
+#include "err.h"
|
2017-05-05 23:05:56 +00:00
|
|
|
#include <errno.h>
|
|
|
|
+#include <stdio.h>
|
2016-12-29 03:53:45 +00:00
|
|
|
+#define error(status, errno, ...) \
|
|
|
|
+ fflush(stdout); \
|
|
|
|
+ warn(__VA_ARGS__); \
|
|
|
|
+ if (status) exit(status)
|
2015-06-14 17:43:40 +00:00
|
|
|
+#endif
|
|
|
|
+
|
2017-05-05 23:05:56 +00:00
|
|
|
#include <stddef.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <sys/param.h>
|
|
|
|
@@ -37,6 +48,10 @@
|
|
|
|
#include <byteswap.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
|
2016-12-29 03:53:45 +00:00
|
|
|
+#ifndef __GLIBC__
|
|
|
|
+#define canonicalize_file_name(name) realpath(name,NULL)
|
|
|
|
+#endif
|
2017-05-05 23:05:56 +00:00
|
|
|
+
|
|
|
|
#if __BYTE_ORDER == __LITTLE_ENDIAN
|
|
|
|
# define LE32(n) (n)
|
|
|
|
# define LE64(n) (n)
|
2018-06-17 09:08:51 +00:00
|
|
|
--- a/lib/color.c
|
|
|
|
+++ b/lib/color.c
|
2017-05-05 23:05:56 +00:00
|
|
|
@@ -32,13 +32,13 @@
|
2015-06-14 17:43:40 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <argp.h>
|
|
|
|
-#include <error.h>
|
|
|
|
#include <libintl.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
2016-12-29 03:53:45 +00:00
|
|
|
#include <unistd.h>
|
|
|
|
#include "libeu.h"
|
2017-05-05 23:05:56 +00:00
|
|
|
#include "color.h"
|
2016-12-29 03:53:45 +00:00
|
|
|
+#include "system.h"
|
|
|
|
|
|
|
|
/* Prototype for option handler. */
|
2017-05-05 23:05:56 +00:00
|
|
|
static error_t parse_opt (int key, char *arg, struct argp_state *state);
|
2018-06-17 09:08:51 +00:00
|
|
|
--- a/lib/xmalloc.c
|
|
|
|
+++ b/lib/xmalloc.c
|
2016-12-29 03:53:45 +00:00
|
|
|
@@ -30,7 +30,6 @@
|
2015-06-14 17:43:40 +00:00
|
|
|
# include <config.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
-#include <error.h>
|
|
|
|
#include <libintl.h>
|
|
|
|
#include <stddef.h>
|
|
|
|
#include <stdlib.h>
|
2018-06-17 09:08:51 +00:00
|
|
|
--- a/src/addr2line.c
|
|
|
|
+++ b/src/addr2line.c
|
2016-12-29 03:53:45 +00:00
|
|
|
@@ -23,7 +23,6 @@
|
2015-06-14 17:43:40 +00:00
|
|
|
#include <argp.h>
|
|
|
|
#include <assert.h>
|
|
|
|
#include <errno.h>
|
|
|
|
-#include <error.h>
|
|
|
|
#include <fcntl.h>
|
|
|
|
#include <inttypes.h>
|
|
|
|
#include <libdwfl.h>
|
2018-06-17 09:08:51 +00:00
|
|
|
--- a/src/ar.c
|
|
|
|
+++ b/src/ar.c
|
2016-12-29 03:53:45 +00:00
|
|
|
@@ -22,7 +22,6 @@
|
2015-06-14 17:43:40 +00:00
|
|
|
|
|
|
|
#include <argp.h>
|
|
|
|
#include <assert.h>
|
|
|
|
-#include <error.h>
|
|
|
|
#include <fcntl.h>
|
|
|
|
#include <gelf.h>
|
|
|
|
#include <libintl.h>
|
2018-06-17 09:08:51 +00:00
|
|
|
--- a/src/arlib2.c
|
|
|
|
+++ b/src/arlib2.c
|
2016-12-29 03:53:45 +00:00
|
|
|
@@ -20,7 +20,6 @@
|
2015-06-14 17:43:40 +00:00
|
|
|
# include <config.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
-#include <error.h>
|
|
|
|
#include <libintl.h>
|
|
|
|
#include <limits.h>
|
|
|
|
#include <string.h>
|
2018-06-17 09:08:51 +00:00
|
|
|
--- a/src/arlib.c
|
|
|
|
+++ b/src/arlib.c
|
2016-12-29 03:53:45 +00:00
|
|
|
@@ -21,7 +21,6 @@
|
2015-06-14 17:43:40 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <assert.h>
|
|
|
|
-#include <error.h>
|
|
|
|
#include <gelf.h>
|
2016-12-29 03:53:45 +00:00
|
|
|
#include <inttypes.h>
|
2015-06-14 17:43:40 +00:00
|
|
|
#include <libintl.h>
|
2018-06-17 09:08:51 +00:00
|
|
|
--- a/src/elfcmp.c
|
|
|
|
+++ b/src/elfcmp.c
|
2016-12-29 03:53:45 +00:00
|
|
|
@@ -23,7 +23,6 @@
|
2015-06-14 17:43:40 +00:00
|
|
|
#include <argp.h>
|
|
|
|
#include <assert.h>
|
|
|
|
#include <errno.h>
|
|
|
|
-#include <error.h>
|
|
|
|
#include <fcntl.h>
|
|
|
|
#include <locale.h>
|
|
|
|
#include <libintl.h>
|
2018-06-17 09:08:51 +00:00
|
|
|
--- a/src/elflint.c
|
|
|
|
+++ b/src/elflint.c
|
2016-12-29 03:53:45 +00:00
|
|
|
@@ -24,7 +24,6 @@
|
2015-06-14 17:43:40 +00:00
|
|
|
#include <assert.h>
|
|
|
|
#include <byteswap.h>
|
|
|
|
#include <endian.h>
|
|
|
|
-#include <error.h>
|
|
|
|
#include <fcntl.h>
|
|
|
|
#include <gelf.h>
|
|
|
|
#include <inttypes.h>
|
2018-06-17 09:08:51 +00:00
|
|
|
--- a/src/findtextrel.c
|
|
|
|
+++ b/src/findtextrel.c
|
2016-12-29 03:53:45 +00:00
|
|
|
@@ -23,7 +23,6 @@
|
2015-06-14 17:43:40 +00:00
|
|
|
#include <argp.h>
|
|
|
|
#include <assert.h>
|
|
|
|
#include <errno.h>
|
|
|
|
-#include <error.h>
|
|
|
|
#include <fcntl.h>
|
|
|
|
#include <gelf.h>
|
|
|
|
#include <libdw.h>
|
2018-06-17 09:08:51 +00:00
|
|
|
--- a/src/nm.c
|
|
|
|
+++ b/src/nm.c
|
2016-12-29 03:53:45 +00:00
|
|
|
@@ -26,7 +26,6 @@
|
2015-06-14 17:43:40 +00:00
|
|
|
#include <ctype.h>
|
|
|
|
#include <dwarf.h>
|
|
|
|
#include <errno.h>
|
|
|
|
-#include <error.h>
|
|
|
|
#include <fcntl.h>
|
|
|
|
#include <gelf.h>
|
|
|
|
#include <inttypes.h>
|
2018-06-17 09:08:51 +00:00
|
|
|
--- a/src/objdump.c
|
|
|
|
+++ b/src/objdump.c
|
2016-12-29 03:53:45 +00:00
|
|
|
@@ -21,7 +21,6 @@
|
2015-06-14 17:43:40 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <argp.h>
|
|
|
|
-#include <error.h>
|
|
|
|
#include <fcntl.h>
|
|
|
|
#include <inttypes.h>
|
|
|
|
#include <libintl.h>
|
2018-06-17 09:08:51 +00:00
|
|
|
--- a/src/ranlib.c
|
|
|
|
+++ b/src/ranlib.c
|
2016-12-29 03:53:45 +00:00
|
|
|
@@ -24,7 +24,6 @@
|
2015-06-14 17:43:40 +00:00
|
|
|
#include <argp.h>
|
|
|
|
#include <assert.h>
|
|
|
|
#include <errno.h>
|
|
|
|
-#include <error.h>
|
|
|
|
#include <fcntl.h>
|
|
|
|
#include <gelf.h>
|
|
|
|
#include <libintl.h>
|
2018-06-17 09:08:51 +00:00
|
|
|
--- a/src/readelf.c
|
|
|
|
+++ b/src/readelf.c
|
|
|
|
@@ -24,7 +24,6 @@
|
2015-06-14 17:43:40 +00:00
|
|
|
#include <ctype.h>
|
|
|
|
#include <dwarf.h>
|
|
|
|
#include <errno.h>
|
|
|
|
-#include <error.h>
|
|
|
|
#include <fcntl.h>
|
|
|
|
#include <gelf.h>
|
|
|
|
#include <inttypes.h>
|
2018-06-17 09:08:51 +00:00
|
|
|
--- a/src/size.c
|
|
|
|
+++ b/src/size.c
|
2016-12-29 03:53:45 +00:00
|
|
|
@@ -21,7 +21,6 @@
|
2015-06-14 17:43:40 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <argp.h>
|
|
|
|
-#include <error.h>
|
|
|
|
#include <fcntl.h>
|
|
|
|
#include <gelf.h>
|
|
|
|
#include <inttypes.h>
|
2018-06-17 09:08:51 +00:00
|
|
|
--- a/src/stack.c
|
|
|
|
+++ b/src/stack.c
|
2016-12-29 03:53:45 +00:00
|
|
|
@@ -18,7 +18,6 @@
|
2015-06-14 17:43:40 +00:00
|
|
|
#include <config.h>
|
|
|
|
#include <assert.h>
|
|
|
|
#include <argp.h>
|
|
|
|
-#include <error.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <inttypes.h>
|
|
|
|
#include <stdio.h>
|
2018-06-17 09:08:51 +00:00
|
|
|
--- a/src/strings.c
|
|
|
|
+++ b/src/strings.c
|
2016-12-29 03:53:45 +00:00
|
|
|
@@ -25,7 +25,6 @@
|
2015-06-14 17:43:40 +00:00
|
|
|
#include <ctype.h>
|
|
|
|
#include <endian.h>
|
|
|
|
#include <errno.h>
|
|
|
|
-#include <error.h>
|
|
|
|
#include <fcntl.h>
|
|
|
|
#include <gelf.h>
|
|
|
|
#include <inttypes.h>
|
2018-06-17 09:08:51 +00:00
|
|
|
--- a/src/strip.c
|
|
|
|
+++ b/src/strip.c
|
2016-12-29 03:53:45 +00:00
|
|
|
@@ -24,7 +24,6 @@
|
2015-06-14 17:43:40 +00:00
|
|
|
#include <assert.h>
|
|
|
|
#include <byteswap.h>
|
|
|
|
#include <endian.h>
|
|
|
|
-#include <error.h>
|
|
|
|
#include <fcntl.h>
|
2018-06-17 09:08:51 +00:00
|
|
|
#include <fnmatch.h>
|
2015-06-14 17:43:40 +00:00
|
|
|
#include <gelf.h>
|
2018-06-17 09:08:51 +00:00
|
|
|
--- a/src/unstrip.c
|
|
|
|
+++ b/src/unstrip.c
|
2016-12-29 03:53:45 +00:00
|
|
|
@@ -31,7 +31,6 @@
|
2015-06-14 17:43:40 +00:00
|
|
|
#include <argp.h>
|
|
|
|
#include <assert.h>
|
|
|
|
#include <errno.h>
|
|
|
|
-#include <error.h>
|
|
|
|
#include <fcntl.h>
|
|
|
|
#include <fnmatch.h>
|
|
|
|
#include <libintl.h>
|
2018-06-17 09:08:51 +00:00
|
|
|
--- a/tests/addrscopes.c
|
|
|
|
+++ b/tests/addrscopes.c
|
2016-12-29 03:53:45 +00:00
|
|
|
@@ -25,7 +25,6 @@
|
2015-06-14 17:43:40 +00:00
|
|
|
#include <stdio_ext.h>
|
|
|
|
#include <locale.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
-#include <error.h>
|
|
|
|
#include <string.h>
|
|
|
|
|
|
|
|
|
2018-06-17 09:08:51 +00:00
|
|
|
--- a/tests/allregs.c
|
|
|
|
+++ b/tests/allregs.c
|
2016-12-29 03:53:45 +00:00
|
|
|
@@ -21,7 +21,6 @@
|
2015-06-14 17:43:40 +00:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
-#include <error.h>
|
|
|
|
#include <locale.h>
|
|
|
|
#include <argp.h>
|
|
|
|
#include <assert.h>
|
2018-06-17 09:08:51 +00:00
|
|
|
--- a/tests/backtrace.c
|
|
|
|
+++ b/tests/backtrace.c
|
2016-12-29 03:53:45 +00:00
|
|
|
@@ -24,7 +24,6 @@
|
2015-06-14 17:43:40 +00:00
|
|
|
#include <dirent.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <errno.h>
|
|
|
|
-#include <error.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
#include <dwarf.h>
|
2015-11-11 08:32:28 +00:00
|
|
|
#ifdef __linux__
|
2018-06-17 09:08:51 +00:00
|
|
|
--- a/tests/backtrace-data.c
|
|
|
|
+++ b/tests/backtrace-data.c
|
2016-12-29 03:53:45 +00:00
|
|
|
@@ -27,7 +27,6 @@
|
2015-06-14 17:43:40 +00:00
|
|
|
#include <dirent.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <errno.h>
|
|
|
|
-#include <error.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
#include <dwarf.h>
|
2015-11-11 08:32:28 +00:00
|
|
|
#if defined(__x86_64__) && defined(__linux__)
|
2018-06-17 09:08:51 +00:00
|
|
|
--- a/tests/buildid.c
|
|
|
|
+++ b/tests/buildid.c
|
2016-12-29 03:53:45 +00:00
|
|
|
@@ -23,7 +23,6 @@
|
2015-06-14 17:43:40 +00:00
|
|
|
#include ELFUTILS_HEADER(elf)
|
|
|
|
#include ELFUTILS_HEADER(dwelf)
|
|
|
|
#include <stdio.h>
|
|
|
|
-#include <error.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <sys/types.h>
|
2018-06-17 09:08:51 +00:00
|
|
|
--- a/tests/debugaltlink.c
|
|
|
|
+++ b/tests/debugaltlink.c
|
2016-12-29 03:53:45 +00:00
|
|
|
@@ -23,7 +23,6 @@
|
2015-06-14 17:43:40 +00:00
|
|
|
#include ELFUTILS_HEADER(dw)
|
|
|
|
#include ELFUTILS_HEADER(dwelf)
|
|
|
|
#include <stdio.h>
|
|
|
|
-#include <error.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <sys/types.h>
|
2018-06-17 09:08:51 +00:00
|
|
|
--- a/tests/debuglink.c
|
|
|
|
+++ b/tests/debuglink.c
|
2016-12-29 03:53:45 +00:00
|
|
|
@@ -21,7 +21,6 @@
|
2015-06-14 17:43:40 +00:00
|
|
|
#include <errno.h>
|
|
|
|
#include ELFUTILS_HEADER(dwelf)
|
|
|
|
#include <stdio.h>
|
|
|
|
-#include <error.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <sys/types.h>
|
2018-06-17 09:08:51 +00:00
|
|
|
--- a/tests/dwfl-addr-sect.c
|
|
|
|
+++ b/tests/dwfl-addr-sect.c
|
2016-12-29 03:53:45 +00:00
|
|
|
@@ -23,7 +23,6 @@
|
2015-06-14 17:43:40 +00:00
|
|
|
#include <stdio_ext.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
-#include <error.h>
|
|
|
|
#include <locale.h>
|
|
|
|
#include <argp.h>
|
|
|
|
#include ELFUTILS_HEADER(dwfl)
|
2018-06-17 09:08:51 +00:00
|
|
|
--- a/tests/dwfl-bug-addr-overflow.c
|
|
|
|
+++ b/tests/dwfl-bug-addr-overflow.c
|
2016-12-29 03:53:45 +00:00
|
|
|
@@ -20,7 +20,6 @@
|
2015-06-14 17:43:40 +00:00
|
|
|
#include <inttypes.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdio_ext.h>
|
|
|
|
-#include <error.h>
|
|
|
|
#include <locale.h>
|
|
|
|
#include ELFUTILS_HEADER(dwfl)
|
|
|
|
|
2018-06-17 09:08:51 +00:00
|
|
|
--- a/tests/dwfl-bug-fd-leak.c
|
|
|
|
+++ b/tests/dwfl-bug-fd-leak.c
|
2016-12-29 03:53:45 +00:00
|
|
|
@@ -24,7 +24,6 @@
|
2015-06-14 17:43:40 +00:00
|
|
|
#include <dirent.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <errno.h>
|
|
|
|
-#include <error.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
#include <dwarf.h>
|
2016-10-14 00:02:47 +00:00
|
|
|
|
2018-06-17 09:08:51 +00:00
|
|
|
--- a/tests/dwfl-bug-getmodules.c
|
|
|
|
+++ b/tests/dwfl-bug-getmodules.c
|
2016-12-29 03:53:45 +00:00
|
|
|
@@ -18,7 +18,6 @@
|
2015-06-14 17:43:40 +00:00
|
|
|
#include <config.h>
|
|
|
|
#include ELFUTILS_HEADER(dwfl)
|
|
|
|
|
|
|
|
-#include <error.h>
|
|
|
|
|
|
|
|
static const Dwfl_Callbacks callbacks =
|
|
|
|
{
|
2018-06-17 09:08:51 +00:00
|
|
|
--- a/tests/dwfllines.c
|
|
|
|
+++ b/tests/dwfllines.c
|
2016-12-29 03:53:45 +00:00
|
|
|
@@ -27,7 +27,6 @@
|
2015-06-14 17:43:40 +00:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
-#include <error.h>
|
|
|
|
|
|
|
|
int
|
|
|
|
main (int argc, char *argv[])
|
2018-06-17 09:08:51 +00:00
|
|
|
--- a/tests/dwflmodtest.c
|
|
|
|
+++ b/tests/dwflmodtest.c
|
2016-12-29 03:53:45 +00:00
|
|
|
@@ -23,7 +23,6 @@
|
2015-06-14 17:43:40 +00:00
|
|
|
#include <stdio_ext.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
-#include <error.h>
|
|
|
|
#include <locale.h>
|
|
|
|
#include <argp.h>
|
|
|
|
#include ELFUTILS_HEADER(dwfl)
|
2018-06-17 09:08:51 +00:00
|
|
|
--- a/tests/dwfl-report-elf-align.c
|
|
|
|
+++ b/tests/dwfl-report-elf-align.c
|
2016-12-29 03:53:45 +00:00
|
|
|
@@ -20,7 +20,6 @@
|
2015-06-14 17:43:40 +00:00
|
|
|
#include <inttypes.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdio_ext.h>
|
|
|
|
-#include <error.h>
|
|
|
|
#include <locale.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <stdlib.h>
|
2018-06-17 09:08:51 +00:00
|
|
|
--- a/tests/dwflsyms.c
|
|
|
|
+++ b/tests/dwflsyms.c
|
2016-12-29 03:53:45 +00:00
|
|
|
@@ -25,7 +25,6 @@
|
2015-06-14 17:43:40 +00:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdio_ext.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
-#include <error.h>
|
|
|
|
#include <string.h>
|
|
|
|
|
|
|
|
static const char *
|
2018-06-17 09:08:51 +00:00
|
|
|
--- a/tests/early-offscn.c
|
|
|
|
+++ b/tests/early-offscn.c
|
2016-12-29 03:53:45 +00:00
|
|
|
@@ -19,7 +19,6 @@
|
2015-06-14 17:43:40 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <errno.h>
|
|
|
|
-#include <error.h>
|
|
|
|
#include <fcntl.h>
|
|
|
|
#include <gelf.h>
|
|
|
|
#include <stdio.h>
|
2018-06-17 09:08:51 +00:00
|
|
|
--- a/tests/ecp.c
|
|
|
|
+++ b/tests/ecp.c
|
2016-12-29 03:53:45 +00:00
|
|
|
@@ -20,7 +20,6 @@
|
2015-11-11 08:32:28 +00:00
|
|
|
#endif
|
2015-06-14 17:43:40 +00:00
|
|
|
|
|
|
|
#include <errno.h>
|
|
|
|
-#include <error.h>
|
|
|
|
#include <fcntl.h>
|
|
|
|
#include <gelf.h>
|
|
|
|
#include <stdlib.h>
|
2018-06-17 09:08:51 +00:00
|
|
|
--- a/tests/find-prologues.c
|
|
|
|
+++ b/tests/find-prologues.c
|
2016-12-29 03:53:45 +00:00
|
|
|
@@ -25,7 +25,6 @@
|
2015-06-14 17:43:40 +00:00
|
|
|
#include <stdio_ext.h>
|
|
|
|
#include <locale.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
-#include <error.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <fnmatch.h>
|
|
|
|
|
2018-06-17 09:08:51 +00:00
|
|
|
--- a/tests/funcretval.c
|
|
|
|
+++ b/tests/funcretval.c
|
2016-12-29 03:53:45 +00:00
|
|
|
@@ -25,7 +25,6 @@
|
2015-06-14 17:43:40 +00:00
|
|
|
#include <stdio_ext.h>
|
|
|
|
#include <locale.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
-#include <error.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <fnmatch.h>
|
|
|
|
|
2018-06-17 09:08:51 +00:00
|
|
|
--- a/tests/funcscopes.c
|
|
|
|
+++ b/tests/funcscopes.c
|
2016-12-29 03:53:45 +00:00
|
|
|
@@ -25,7 +25,6 @@
|
2015-06-14 17:43:40 +00:00
|
|
|
#include <stdio_ext.h>
|
|
|
|
#include <locale.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
-#include <error.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <fnmatch.h>
|
|
|
|
|
2018-06-17 09:08:51 +00:00
|
|
|
--- a/tests/line2addr.c
|
|
|
|
+++ b/tests/line2addr.c
|
2016-12-29 03:53:45 +00:00
|
|
|
@@ -26,7 +26,6 @@
|
2015-06-14 17:43:40 +00:00
|
|
|
#include <locale.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
-#include <error.h>
|
|
|
|
|
|
|
|
|
|
|
|
static void
|
2018-06-17 09:08:51 +00:00
|
|
|
--- a/tests/low_high_pc.c
|
|
|
|
+++ b/tests/low_high_pc.c
|
2016-12-29 03:53:45 +00:00
|
|
|
@@ -25,7 +25,6 @@
|
2015-06-14 17:43:40 +00:00
|
|
|
#include <stdio_ext.h>
|
|
|
|
#include <locale.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
-#include <error.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <fnmatch.h>
|
|
|
|
|
2018-06-17 09:08:51 +00:00
|
|
|
--- a/tests/rdwrmmap.c
|
|
|
|
+++ b/tests/rdwrmmap.c
|
2016-12-29 03:53:45 +00:00
|
|
|
@@ -19,7 +19,6 @@
|
2015-11-11 08:32:28 +00:00
|
|
|
#endif
|
2015-06-14 17:43:40 +00:00
|
|
|
|
|
|
|
#include <errno.h>
|
|
|
|
-#include <error.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <fcntl.h>
|
|
|
|
#include <unistd.h>
|
2018-06-17 09:08:51 +00:00
|
|
|
--- a/tests/saridx.c
|
|
|
|
+++ b/tests/saridx.c
|
2016-12-29 03:53:45 +00:00
|
|
|
@@ -17,7 +17,6 @@
|
2015-06-14 17:43:40 +00:00
|
|
|
|
|
|
|
#include <config.h>
|
|
|
|
|
|
|
|
-#include <error.h>
|
|
|
|
#include <fcntl.h>
|
|
|
|
#include <gelf.h>
|
|
|
|
#include <stdio.h>
|
2018-06-17 09:08:51 +00:00
|
|
|
--- a/tests/sectiondump.c
|
|
|
|
+++ b/tests/sectiondump.c
|
2016-12-29 03:53:45 +00:00
|
|
|
@@ -18,7 +18,6 @@
|
2015-06-14 17:43:40 +00:00
|
|
|
#include <config.h>
|
|
|
|
|
|
|
|
#include <errno.h>
|
|
|
|
-#include <error.h>
|
|
|
|
#include <fcntl.h>
|
|
|
|
#include <gelf.h>
|
|
|
|
#include <inttypes.h>
|
2018-06-17 09:08:51 +00:00
|
|
|
--- a/tests/varlocs.c
|
|
|
|
+++ b/tests/varlocs.c
|
2016-12-29 03:53:45 +00:00
|
|
|
@@ -25,7 +25,6 @@
|
2015-06-14 17:43:40 +00:00
|
|
|
#include <dwarf.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
-#include <error.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/stat.h>
|
2018-06-17 09:08:51 +00:00
|
|
|
--- a/libasm/asm_end.c
|
|
|
|
+++ b/libasm/asm_end.c
|
2016-12-29 03:53:45 +00:00
|
|
|
@@ -32,7 +32,6 @@
|
2015-06-14 17:43:40 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <assert.h>
|
|
|
|
-#include <error.h>
|
|
|
|
#include <libintl.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
2018-06-17 09:08:51 +00:00
|
|
|
--- a/libasm/asm_newscn.c
|
|
|
|
+++ b/libasm/asm_newscn.c
|
2016-12-29 03:53:45 +00:00
|
|
|
@@ -32,7 +32,6 @@
|
2015-06-14 17:43:40 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <assert.h>
|
|
|
|
-#include <error.h>
|
|
|
|
#include <libintl.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
2018-06-17 09:08:51 +00:00
|
|
|
--- a/libcpu/i386_gendis.c
|
|
|
|
+++ b/libcpu/i386_gendis.c
|
2016-12-29 03:53:45 +00:00
|
|
|
@@ -31,7 +31,6 @@
|
2015-06-14 17:43:40 +00:00
|
|
|
# include <config.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
-#include <error.h>
|
|
|
|
#include <errno.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
2018-06-17 09:08:51 +00:00
|
|
|
--- a/libcpu/i386_lex.c
|
|
|
|
+++ b/libcpu/i386_lex.c
|
|
|
|
@@ -808,7 +808,6 @@ char *yytext;
|
2015-06-14 17:43:40 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <ctype.h>
|
|
|
|
-#include <error.h>
|
|
|
|
#include <libintl.h>
|
|
|
|
|
2016-12-29 03:53:45 +00:00
|
|
|
#include <libeu.h>
|
2018-06-17 09:08:51 +00:00
|
|
|
--- a/libcpu/i386_lex.l
|
|
|
|
+++ b/libcpu/i386_lex.l
|
2016-12-29 03:53:45 +00:00
|
|
|
@@ -31,7 +31,6 @@
|
2015-06-14 17:43:40 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <ctype.h>
|
|
|
|
-#include <error.h>
|
|
|
|
#include <libintl.h>
|
|
|
|
|
2016-12-29 03:53:45 +00:00
|
|
|
#include <libeu.h>
|
2018-06-17 09:08:51 +00:00
|
|
|
--- a/libcpu/i386_parse.c
|
|
|
|
+++ b/libcpu/i386_parse.c
|
2016-12-29 03:53:45 +00:00
|
|
|
@@ -107,7 +107,6 @@
|
2015-06-14 17:43:40 +00:00
|
|
|
#include <assert.h>
|
|
|
|
#include <ctype.h>
|
|
|
|
#include <errno.h>
|
|
|
|
-#include <error.h>
|
|
|
|
#include <inttypes.h>
|
|
|
|
#include <libintl.h>
|
|
|
|
#include <math.h>
|
2018-06-17 09:08:51 +00:00
|
|
|
--- a/libdw/libdw_alloc.c
|
|
|
|
+++ b/libdw/libdw_alloc.c
|
2016-12-29 03:53:45 +00:00
|
|
|
@@ -31,7 +31,6 @@
|
2015-06-14 17:43:40 +00:00
|
|
|
# include <config.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
-#include <error.h>
|
|
|
|
#include <errno.h>
|
|
|
|
#include <stdlib.h>
|
2016-12-29 03:53:45 +00:00
|
|
|
#include "libdwP.h"
|
2018-06-17 09:08:51 +00:00
|
|
|
@@ -74,5 +73,5 @@ __attribute ((noreturn)) attribute_hidde
|
2015-06-14 17:43:40 +00:00
|
|
|
__libdw_oom (void)
|
|
|
|
{
|
|
|
|
while (1)
|
|
|
|
- error (EXIT_FAILURE, ENOMEM, "libdw");
|
2016-12-29 03:53:45 +00:00
|
|
|
+ error (EXIT_FAILURE, errno, gettext ("cannot allocate memory"));
|
2015-06-14 17:43:40 +00:00
|
|
|
}
|
2018-06-17 09:08:51 +00:00
|
|
|
--- a/libebl/eblopenbackend.c
|
|
|
|
+++ b/libebl/eblopenbackend.c
|
2016-12-29 03:53:45 +00:00
|
|
|
@@ -32,7 +32,6 @@
|
2015-06-14 17:43:40 +00:00
|
|
|
|
|
|
|
#include <assert.h>
|
|
|
|
#include <dlfcn.h>
|
|
|
|
-#include <error.h>
|
|
|
|
#include <libelfP.h>
|
|
|
|
#include <dwarf.h>
|
|
|
|
#include <stdlib.h>
|
2018-06-17 09:08:51 +00:00
|
|
|
--- a/libdwfl/dwfl_error.c
|
|
|
|
+++ b/libdwfl/dwfl_error.c
|
2015-11-11 08:32:28 +00:00
|
|
|
@@ -140,6 +140,7 @@ __libdwfl_seterrno (Dwfl_Error error)
|
|
|
|
const char *
|
|
|
|
dwfl_errmsg (int error)
|
2015-06-14 17:43:40 +00:00
|
|
|
{
|
|
|
|
+ static __thread char s[64] = "";
|
|
|
|
if (error == 0 || error == -1)
|
|
|
|
{
|
|
|
|
int last_error = global_error;
|
2015-11-11 08:32:28 +00:00
|
|
|
@@ -154,7 +155,8 @@ dwfl_errmsg (int error)
|
2015-06-14 17:43:40 +00:00
|
|
|
switch (error &~ 0xffff)
|
|
|
|
{
|
|
|
|
case OTHER_ERROR (ERRNO):
|
|
|
|
- return strerror_r (error & 0xffff, "bad", 0);
|
|
|
|
+ strerror_r (error & 0xffff, s, sizeof(s));
|
|
|
|
+ return s;
|
|
|
|
case OTHER_ERROR (LIBELF):
|
|
|
|
return elf_errmsg (error & 0xffff);
|
|
|
|
case OTHER_ERROR (LIBDW):
|