[PATCH 2/2] Consolidate error.h inclusion in system.h

Ross Burton ross.burton@intel.com
Wed Jul 4 11:11:00 GMT 2018


error.h isn't standard and so isn't part of the musl C library.  To easy future
porting, consolidate the inclusion of error.h into system.h.

https://sourceware.org/bugzilla/show_bug.cgi?id=21008

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 lib/color.c                    | 2 +-
 lib/system.h                   | 1 +
 lib/xmalloc.c                  | 1 -
 libasm/asm_end.c               | 1 -
 libasm/asm_newscn.c            | 1 -
 libcpu/i386_gendis.c           | 3 +--
 libcpu/i386_lex.l              | 2 +-
 libcpu/i386_parse.y            | 1 -
 libdw/libdw_alloc.c            | 1 -
 libebl/eblopenbackend.c        | 1 -
 src/addr2line.c                | 1 -
 src/ar.c                       | 1 -
 src/arlib.c                    | 2 +-
 src/arlib2.c                   | 1 -
 src/elfcmp.c                   | 3 +--
 src/elfcompress.c              | 2 +-
 src/elflint.c                  | 1 -
 src/findtextrel.c              | 3 +--
 src/nm.c                       | 1 -
 src/objdump.c                  | 1 -
 src/ranlib.c                   | 1 -
 src/readelf.c                  | 1 -
 src/size.c                     | 1 -
 src/stack.c                    | 1 -
 src/strings.c                  | 1 -
 src/strip.c                    | 1 -
 src/unstrip.c                  | 2 +-
 tests/addrscopes.c             | 2 +-
 tests/allregs.c                | 2 +-
 tests/backtrace-data.c         | 2 +-
 tests/backtrace-dwarf.c        | 2 +-
 tests/backtrace.c              | 2 +-
 tests/buildid.c                | 2 +-
 tests/debugaltlink.c           | 2 +-
 tests/debuglink.c              | 2 +-
 tests/deleted.c                | 1 -
 tests/dwarfcfi.c               | 2 +-
 tests/dwfl-addr-sect.c         | 2 +-
 tests/dwfl-bug-addr-overflow.c | 1 -
 tests/dwfl-bug-fd-leak.c       | 2 +-
 tests/dwfl-bug-getmodules.c    | 2 +-
 tests/dwfl-proc-attach.c       | 2 +-
 tests/dwfl-report-elf-align.c  | 2 +-
 tests/dwfllines.c              | 2 +-
 tests/dwflmodtest.c            | 2 +-
 tests/dwflsyms.c               | 1 -
 tests/early-offscn.c           | 2 +-
 tests/ecp.c                    | 2 +-
 tests/elfstrmerge.c            | 1 -
 tests/find-prologues.c         | 2 +-
 tests/funcretval.c             | 2 +-
 tests/funcscopes.c             | 2 +-
 tests/getsrc_die.c             | 2 +-
 tests/line2addr.c              | 2 +-
 tests/low_high_pc.c            | 1 -
 tests/next_cfi.c               | 2 +-
 tests/rdwrmmap.c               | 2 +-
 tests/saridx.c                 | 2 +-
 tests/sectiondump.c            | 2 +-
 tests/varlocs.c                | 2 +-
 tests/vdsosyms.c               | 2 +-
 61 files changed, 38 insertions(+), 63 deletions(-)

diff --git a/lib/color.c b/lib/color.c
index f62389d5..9ffbf55f 100644
--- a/lib/color.c
+++ b/lib/color.c
@@ -32,11 +32,11 @@
 #endif
 
 #include <argp.h>
-#include <error.h>
 #include <libintl.h>
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
+#include "system.h"
 #include "libeu.h"
 #include "color.h"
 
diff --git a/lib/system.h b/lib/system.h
index 92033355..292082bd 100644
--- a/lib/system.h
+++ b/lib/system.h
@@ -30,6 +30,7 @@
 #define LIB_SYSTEM_H	1
 
 #include <errno.h>
+#include <error.h>
 #include <stddef.h>
 #include <stdint.h>
 #include <sys/param.h>
diff --git a/lib/xmalloc.c b/lib/xmalloc.c
index 0cde384f..0424afc8 100644
--- a/lib/xmalloc.c
+++ b/lib/xmalloc.c
@@ -30,7 +30,6 @@
 # include <config.h>
 #endif
 
-#include <error.h>
 #include <libintl.h>
 #include <stddef.h>
 #include <stdlib.h>
diff --git a/libasm/asm_end.c b/libasm/asm_end.c
index ced24f50..5aab8dfa 100644
--- a/libasm/asm_end.c
+++ b/libasm/asm_end.c
@@ -32,7 +32,6 @@
 #endif
 
 #include <assert.h>
-#include <error.h>
 #include <libintl.h>
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/libasm/asm_newscn.c b/libasm/asm_newscn.c
index ddbb25df..7cdf484f 100644
--- a/libasm/asm_newscn.c
+++ b/libasm/asm_newscn.c
@@ -32,7 +32,6 @@
 #endif
 
 #include <assert.h>
-#include <error.h>
 #include <libintl.h>
 #include <stdlib.h>
 #include <string.h>
diff --git a/libcpu/i386_gendis.c b/libcpu/i386_gendis.c
index aae5eae6..37d2ecd6 100644
--- a/libcpu/i386_gendis.c
+++ b/libcpu/i386_gendis.c
@@ -31,12 +31,11 @@
 # include <config.h>
 #endif
 
-#include <error.h>
 #include <errno.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-
+#include "system.h"
 
 extern int i386_parse (void);
 
diff --git a/libcpu/i386_lex.l b/libcpu/i386_lex.l
index ef1b53b6..a4705aa9 100644
--- a/libcpu/i386_lex.l
+++ b/libcpu/i386_lex.l
@@ -31,10 +31,10 @@
 #endif
 
 #include <ctype.h>
-#include <error.h>
 #include <libintl.h>
 
 #include <libeu.h>
+#include "system.h"
 #include "i386_parse.h"
 
 
diff --git a/libcpu/i386_parse.y b/libcpu/i386_parse.y
index 5fc06825..910d5458 100644
--- a/libcpu/i386_parse.y
+++ b/libcpu/i386_parse.y
@@ -34,7 +34,6 @@
 #include <assert.h>
 #include <ctype.h>
 #include <errno.h>
-#include <error.h>
 #include <inttypes.h>
 #include <libintl.h>
 #include <math.h>
diff --git a/libdw/libdw_alloc.c b/libdw/libdw_alloc.c
index d6af23a2..f1e08714 100644
--- a/libdw/libdw_alloc.c
+++ b/libdw/libdw_alloc.c
@@ -31,7 +31,6 @@
 # include <config.h>
 #endif
 
-#include <error.h>
 #include <errno.h>
 #include <stdlib.h>
 #include "libdwP.h"
diff --git a/libebl/eblopenbackend.c b/libebl/eblopenbackend.c
index 8b063f41..1962e608 100644
--- a/libebl/eblopenbackend.c
+++ b/libebl/eblopenbackend.c
@@ -32,7 +32,6 @@
 
 #include <assert.h>
 #include <dlfcn.h>
-#include <error.h>
 #include <libelfP.h>
 #include <dwarf.h>
 #include <stdlib.h>
diff --git a/src/addr2line.c b/src/addr2line.c
index 5acafa00..b7eb893e 100644
--- a/src/addr2line.c
+++ b/src/addr2line.c
@@ -23,7 +23,6 @@
 #include <argp.h>
 #include <assert.h>
 #include <errno.h>
-#include <error.h>
 #include <fcntl.h>
 #include <inttypes.h>
 #include <libdwfl.h>
diff --git a/src/ar.c b/src/ar.c
index 818115bd..6f98f75d 100644
--- a/src/ar.c
+++ b/src/ar.c
@@ -22,7 +22,6 @@
 
 #include <argp.h>
 #include <assert.h>
-#include <error.h>
 #include <fcntl.h>
 #include <gelf.h>
 #include <libintl.h>
diff --git a/src/arlib.c b/src/arlib.c
index e0839aab..778e0878 100644
--- a/src/arlib.c
+++ b/src/arlib.c
@@ -21,7 +21,6 @@
 #endif
 
 #include <assert.h>
-#include <error.h>
 #include <gelf.h>
 #include <inttypes.h>
 #include <libintl.h>
@@ -31,6 +30,7 @@
 
 #include <libeu.h>
 
+#include "system.h"
 #include "arlib.h"
 
 
diff --git a/src/arlib2.c b/src/arlib2.c
index 553fc57b..11f44e5d 100644
--- a/src/arlib2.c
+++ b/src/arlib2.c
@@ -20,7 +20,6 @@
 # include <config.h>
 #endif
 
-#include <error.h>
 #include <libintl.h>
 #include <limits.h>
 #include <string.h>
diff --git a/src/elfcmp.c b/src/elfcmp.c
index 50464207..b40df8bf 100644
--- a/src/elfcmp.c
+++ b/src/elfcmp.c
@@ -23,7 +23,6 @@
 #include <argp.h>
 #include <assert.h>
 #include <errno.h>
-#include <error.h>
 #include <fcntl.h>
 #include <locale.h>
 #include <libintl.h>
@@ -36,7 +35,7 @@
 #include <printversion.h>
 #include "../libelf/elf-knowledge.h"
 #include "../libebl/libeblP.h"
-
+#include "system.h"
 
 /* Prototypes of local functions.  */
 static Elf *open_file (const char *fname, int *fdp, Ebl **eblp);
diff --git a/src/elfcompress.c b/src/elfcompress.c
index 25378a45..bdb0e3b5 100644
--- a/src/elfcompress.c
+++ b/src/elfcompress.c
@@ -18,7 +18,6 @@
 #include <config.h>
 #include <assert.h>
 #include <argp.h>
-#include <error.h>
 #include <stdbool.h>
 #include <stdlib.h>
 #include <inttypes.h>
@@ -34,6 +33,7 @@
 #include ELFUTILS_HEADER(ebl)
 #include ELFUTILS_HEADER(dwelf)
 #include <gelf.h>
+#include "system.h"
 #include "libeu.h"
 #include "printversion.h"
 
diff --git a/src/elflint.c b/src/elflint.c
index 0a26d97d..eec799b2 100644
--- a/src/elflint.c
+++ b/src/elflint.c
@@ -24,7 +24,6 @@
 #include <assert.h>
 #include <byteswap.h>
 #include <endian.h>
-#include <error.h>
 #include <fcntl.h>
 #include <gelf.h>
 #include <inttypes.h>
diff --git a/src/findtextrel.c b/src/findtextrel.c
index 8f1e239a..49731592 100644
--- a/src/findtextrel.c
+++ b/src/findtextrel.c
@@ -23,7 +23,6 @@
 #include <argp.h>
 #include <assert.h>
 #include <errno.h>
-#include <error.h>
 #include <fcntl.h>
 #include <gelf.h>
 #include <libdw.h>
@@ -37,7 +36,7 @@
 #include <unistd.h>
 
 #include <printversion.h>
-
+#include "system.h"
 
 struct segments
 {
diff --git a/src/nm.c b/src/nm.c
index 969c6d35..ffe8ca69 100644
--- a/src/nm.c
+++ b/src/nm.c
@@ -26,7 +26,6 @@
 #include <ctype.h>
 #include <dwarf.h>
 #include <errno.h>
-#include <error.h>
 #include <fcntl.h>
 #include <gelf.h>
 #include <inttypes.h>
diff --git a/src/objdump.c b/src/objdump.c
index 0dd9a6aa..6b365d5c 100644
--- a/src/objdump.c
+++ b/src/objdump.c
@@ -21,7 +21,6 @@
 #endif
 
 #include <argp.h>
-#include <error.h>
 #include <fcntl.h>
 #include <inttypes.h>
 #include <libintl.h>
diff --git a/src/ranlib.c b/src/ranlib.c
index cc0ee233..b9083484 100644
--- a/src/ranlib.c
+++ b/src/ranlib.c
@@ -24,7 +24,6 @@
 #include <argp.h>
 #include <assert.h>
 #include <errno.h>
-#include <error.h>
 #include <fcntl.h>
 #include <gelf.h>
 #include <libintl.h>
diff --git a/src/readelf.c b/src/readelf.c
index faed61a6..7cf0d18a 100644
--- a/src/readelf.c
+++ b/src/readelf.c
@@ -24,7 +24,6 @@
 #include <ctype.h>
 #include <dwarf.h>
 #include <errno.h>
-#include <error.h>
 #include <fcntl.h>
 #include <gelf.h>
 #include <inttypes.h>
diff --git a/src/size.c b/src/size.c
index ad8dbcbb..5ff3f2af 100644
--- a/src/size.c
+++ b/src/size.c
@@ -21,7 +21,6 @@
 #endif
 
 #include <argp.h>
-#include <error.h>
 #include <fcntl.h>
 #include <gelf.h>
 #include <inttypes.h>
diff --git a/src/stack.c b/src/stack.c
index 52ae3a86..c5f347e1 100644
--- a/src/stack.c
+++ b/src/stack.c
@@ -18,7 +18,6 @@
 #include <config.h>
 #include <assert.h>
 #include <argp.h>
-#include <error.h>
 #include <stdlib.h>
 #include <inttypes.h>
 #include <stdio.h>
diff --git a/src/strings.c b/src/strings.c
index 03d0f133..ef40d5ec 100644
--- a/src/strings.c
+++ b/src/strings.c
@@ -25,7 +25,6 @@
 #include <ctype.h>
 #include <endian.h>
 #include <errno.h>
-#include <error.h>
 #include <fcntl.h>
 #include <gelf.h>
 #include <inttypes.h>
diff --git a/src/strip.c b/src/strip.c
index 773ed548..791347c1 100644
--- a/src/strip.c
+++ b/src/strip.c
@@ -24,7 +24,6 @@
 #include <assert.h>
 #include <byteswap.h>
 #include <endian.h>
-#include <error.h>
 #include <fcntl.h>
 #include <fnmatch.h>
 #include <gelf.h>
diff --git a/src/unstrip.c b/src/unstrip.c
index f368e696..057efef3 100644
--- a/src/unstrip.c
+++ b/src/unstrip.c
@@ -31,7 +31,6 @@
 #include <argp.h>
 #include <assert.h>
 #include <errno.h>
-#include <error.h>
 #include <fcntl.h>
 #include <fnmatch.h>
 #include <libintl.h>
@@ -48,6 +47,7 @@
 #include <gelf.h>
 #include <libebl.h>
 #include <libdwfl.h>
+#include "system.h"
 #include "libdwelf.h"
 #include "libeu.h"
 #include "printversion.h"
diff --git a/tests/addrscopes.c b/tests/addrscopes.c
index 791569f5..b231b6a9 100644
--- a/tests/addrscopes.c
+++ b/tests/addrscopes.c
@@ -25,8 +25,8 @@
 #include <stdio_ext.h>
 #include <locale.h>
 #include <stdlib.h>
-#include <error.h>
 #include <string.h>
+#include "system.h"
 
 
 static void
diff --git a/tests/allregs.c b/tests/allregs.c
index 286f7e3c..f18f0b28 100644
--- a/tests/allregs.c
+++ b/tests/allregs.c
@@ -21,13 +21,13 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <error.h>
 #include <locale.h>
 #include <argp.h>
 #include <assert.h>
 #include ELFUTILS_HEADER(dwfl)
 #include <dwarf.h>
 
+#include "system.h"
 #include "../libdw/known-dwarf.h"
 
 static const char *
diff --git a/tests/backtrace-data.c b/tests/backtrace-data.c
index a387d8ff..67ecd475 100644
--- a/tests/backtrace-data.c
+++ b/tests/backtrace-data.c
@@ -27,7 +27,6 @@
 #include <dirent.h>
 #include <stdlib.h>
 #include <errno.h>
-#include <error.h>
 #include <unistd.h>
 #include <dwarf.h>
 #if defined(__x86_64__) && defined(__linux__)
@@ -41,6 +40,7 @@
 #include <string.h>
 #include ELFUTILS_HEADER(dwfl)
 #endif
+#include "system.h"
 
 #if !defined(__x86_64__) || !defined(__linux__)
 
diff --git a/tests/backtrace-dwarf.c b/tests/backtrace-dwarf.c
index 7ff826cd..e1eb4928 100644
--- a/tests/backtrace-dwarf.c
+++ b/tests/backtrace-dwarf.c
@@ -21,10 +21,10 @@
 #include <stdio_ext.h>
 #include <locale.h>
 #include <errno.h>
-#include <error.h>
 #include <unistd.h>
 #include <sys/types.h>
 #include ELFUTILS_HEADER(dwfl)
+#include "system.h"
 
 #ifndef __linux__
 
diff --git a/tests/backtrace.c b/tests/backtrace.c
index f5dd761f..24ab68dd 100644
--- a/tests/backtrace.c
+++ b/tests/backtrace.c
@@ -24,7 +24,6 @@
 #include <dirent.h>
 #include <stdlib.h>
 #include <errno.h>
-#include <error.h>
 #include <unistd.h>
 #include <dwarf.h>
 #ifdef __linux__
@@ -39,6 +38,7 @@
 #include <argp.h>
 #include ELFUTILS_HEADER(dwfl)
 #endif
+#include "system.h"
 
 #ifndef __linux__
 
diff --git a/tests/buildid.c b/tests/buildid.c
index 87c18773..2390eff7 100644
--- a/tests/buildid.c
+++ b/tests/buildid.c
@@ -23,13 +23,13 @@
 #include ELFUTILS_HEADER(elf)
 #include ELFUTILS_HEADER(dwelf)
 #include <stdio.h>
-#include <error.h>
 #include <string.h>
 #include <stdlib.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <unistd.h>
+#include "system.h"
 
 int
 main (int argc, char *argv[])
diff --git a/tests/debugaltlink.c b/tests/debugaltlink.c
index 6d97d500..e7dc8623 100644
--- a/tests/debugaltlink.c
+++ b/tests/debugaltlink.c
@@ -23,13 +23,13 @@
 #include ELFUTILS_HEADER(dw)
 #include ELFUTILS_HEADER(dwelf)
 #include <stdio.h>
-#include <error.h>
 #include <string.h>
 #include <stdlib.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <unistd.h>
+#include "system.h"
 
 int
 main (int argc, char *argv[])
diff --git a/tests/debuglink.c b/tests/debuglink.c
index 935d1029..f92b9b59 100644
--- a/tests/debuglink.c
+++ b/tests/debuglink.c
@@ -21,13 +21,13 @@
 #include <errno.h>
 #include ELFUTILS_HEADER(dwelf)
 #include <stdio.h>
-#include <error.h>
 #include <string.h>
 #include <stdlib.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <unistd.h>
+#include "system.h"
 
 int
 main (int argc, char *argv[])
diff --git a/tests/deleted.c b/tests/deleted.c
index 6be35bc2..f4e8f768 100644
--- a/tests/deleted.c
+++ b/tests/deleted.c
@@ -21,7 +21,6 @@
 #include <unistd.h>
 #include <assert.h>
 #include <stdio.h>
-#include <error.h>
 #include <errno.h>
 #ifdef __linux__
 #include <sys/prctl.h>
diff --git a/tests/dwarfcfi.c b/tests/dwarfcfi.c
index db4a36ff..29849e71 100644
--- a/tests/dwarfcfi.c
+++ b/tests/dwarfcfi.c
@@ -18,7 +18,6 @@
 #include <config.h>
 #include <assert.h>
 #include <inttypes.h>
-#include <error.h>
 #include ELFUTILS_HEADER(dw)
 #include <dwarf.h>
 #include <argp.h>
@@ -30,6 +29,7 @@
 #include <stdlib.h>
 #include <string.h>
 
+#include "system.h"
 #include "../libdw/known-dwarf.h"
 
 static const char *
diff --git a/tests/dwfl-addr-sect.c b/tests/dwfl-addr-sect.c
index 21e470a3..4d85c007 100644
--- a/tests/dwfl-addr-sect.c
+++ b/tests/dwfl-addr-sect.c
@@ -23,11 +23,11 @@
 #include <stdio_ext.h>
 #include <stdlib.h>
 #include <string.h>
-#include <error.h>
 #include <locale.h>
 #include <argp.h>
 #include ELFUTILS_HEADER(dwfl)
 #include <dwarf.h>
+#include "system.h"
 
 static int
 handle_address (Dwfl *dwfl, Dwarf_Addr address)
diff --git a/tests/dwfl-bug-addr-overflow.c b/tests/dwfl-bug-addr-overflow.c
index aa8030e1..9a3373a6 100644
--- a/tests/dwfl-bug-addr-overflow.c
+++ b/tests/dwfl-bug-addr-overflow.c
@@ -20,7 +20,6 @@
 #include <inttypes.h>
 #include <stdio.h>
 #include <stdio_ext.h>
-#include <error.h>
 #include <locale.h>
 #include ELFUTILS_HEADER(dwfl)
 
diff --git a/tests/dwfl-bug-fd-leak.c b/tests/dwfl-bug-fd-leak.c
index 689cdd79..ee3a916b 100644
--- a/tests/dwfl-bug-fd-leak.c
+++ b/tests/dwfl-bug-fd-leak.c
@@ -24,9 +24,9 @@
 #include <dirent.h>
 #include <stdlib.h>
 #include <errno.h>
-#include <error.h>
 #include <unistd.h>
 #include <dwarf.h>
+#include "system.h"
 
 #ifndef __linux__
 int
diff --git a/tests/dwfl-bug-getmodules.c b/tests/dwfl-bug-getmodules.c
index 1ee989f8..2783f65c 100644
--- a/tests/dwfl-bug-getmodules.c
+++ b/tests/dwfl-bug-getmodules.c
@@ -17,8 +17,8 @@
 
 #include <config.h>
 #include ELFUTILS_HEADER(dwfl)
+#include "system.h"
 
-#include <error.h>
 
 static const Dwfl_Callbacks callbacks =
   {
diff --git a/tests/dwfl-proc-attach.c b/tests/dwfl-proc-attach.c
index e7bb2010..102ba181 100644
--- a/tests/dwfl-proc-attach.c
+++ b/tests/dwfl-proc-attach.c
@@ -20,7 +20,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <errno.h>
-#include <error.h>
 #include <unistd.h>
 #ifdef __linux__
 #include <sys/types.h>
@@ -31,6 +30,7 @@
 #include ELFUTILS_HEADER(dwfl)
 #include <pthread.h>
 #endif
+#include "system.h"
 
 #ifndef __linux__
 int
diff --git a/tests/dwfl-report-elf-align.c b/tests/dwfl-report-elf-align.c
index a4e97d3c..6558ab81 100644
--- a/tests/dwfl-report-elf-align.c
+++ b/tests/dwfl-report-elf-align.c
@@ -20,11 +20,11 @@
 #include <inttypes.h>
 #include <stdio.h>
 #include <stdio_ext.h>
-#include <error.h>
 #include <locale.h>
 #include <string.h>
 #include <stdlib.h>
 #include ELFUTILS_HEADER(dwfl)
+#include "system.h"
 
 
 static const Dwfl_Callbacks offline_callbacks =
diff --git a/tests/dwfllines.c b/tests/dwfllines.c
index 90379dd2..d732e401 100644
--- a/tests/dwfllines.c
+++ b/tests/dwfllines.c
@@ -27,7 +27,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <error.h>
+#include "system.h"
 
 int
 main (int argc, char *argv[])
diff --git a/tests/dwflmodtest.c b/tests/dwflmodtest.c
index 0027f96b..9251d158 100644
--- a/tests/dwflmodtest.c
+++ b/tests/dwflmodtest.c
@@ -23,11 +23,11 @@
 #include <stdio_ext.h>
 #include <stdlib.h>
 #include <string.h>
-#include <error.h>
 #include <locale.h>
 #include <argp.h>
 #include ELFUTILS_HEADER(dwfl)
 #include <dwarf.h>
+#include "system.h"
 
 static bool show_inlines;
 
diff --git a/tests/dwflsyms.c b/tests/dwflsyms.c
index 49ac3346..bc23cb63 100644
--- a/tests/dwflsyms.c
+++ b/tests/dwflsyms.c
@@ -25,7 +25,6 @@
 #include <stdio.h>
 #include <stdio_ext.h>
 #include <stdlib.h>
-#include <error.h>
 #include <string.h>
 
 static const char *
diff --git a/tests/early-offscn.c b/tests/early-offscn.c
index 924cb9ef..af29da5a 100644
--- a/tests/early-offscn.c
+++ b/tests/early-offscn.c
@@ -19,11 +19,11 @@
 #endif
 
 #include <errno.h>
-#include <error.h>
 #include <fcntl.h>
 #include <gelf.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include "system.h"
 
 int
 main (int argc, char *argv[])
diff --git a/tests/ecp.c b/tests/ecp.c
index 38a6859e..1df40a32 100644
--- a/tests/ecp.c
+++ b/tests/ecp.c
@@ -20,11 +20,11 @@
 #endif
 
 #include <errno.h>
-#include <error.h>
 #include <fcntl.h>
 #include <gelf.h>
 #include <stdlib.h>
 #include <unistd.h>
+#include "system.h"
 
 int
 main (int argc, char *argv[])
diff --git a/tests/elfstrmerge.c b/tests/elfstrmerge.c
index 3bb90c42..ba0d68df 100644
--- a/tests/elfstrmerge.c
+++ b/tests/elfstrmerge.c
@@ -24,7 +24,6 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
-#include <error.h>
 #include <stdio.h>
 #include <inttypes.h>
 #include <unistd.h>
diff --git a/tests/find-prologues.c b/tests/find-prologues.c
index ba8ae371..b0bf9362 100644
--- a/tests/find-prologues.c
+++ b/tests/find-prologues.c
@@ -25,9 +25,9 @@
 #include <stdio_ext.h>
 #include <locale.h>
 #include <stdlib.h>
-#include <error.h>
 #include <string.h>
 #include <fnmatch.h>
+#include "system.h"
 
 
 struct args
diff --git a/tests/funcretval.c b/tests/funcretval.c
index 8d19d117..16cd1a44 100644
--- a/tests/funcretval.c
+++ b/tests/funcretval.c
@@ -25,9 +25,9 @@
 #include <stdio_ext.h>
 #include <locale.h>
 #include <stdlib.h>
-#include <error.h>
 #include <string.h>
 #include <fnmatch.h>
+#include "system.h"
 
 
 struct args
diff --git a/tests/funcscopes.c b/tests/funcscopes.c
index 9c901858..689d376a 100644
--- a/tests/funcscopes.c
+++ b/tests/funcscopes.c
@@ -25,9 +25,9 @@
 #include <stdio_ext.h>
 #include <locale.h>
 #include <stdlib.h>
-#include <error.h>
 #include <string.h>
 #include <fnmatch.h>
+#include "system.h"
 
 
 static void
diff --git a/tests/getsrc_die.c b/tests/getsrc_die.c
index 055aede0..f878fa62 100644
--- a/tests/getsrc_die.c
+++ b/tests/getsrc_die.c
@@ -19,7 +19,6 @@
 #endif
 
 #include <errno.h>
-#include <error.h>
 #include <fcntl.h>
 #include <inttypes.h>
 #include <libelf.h>
@@ -27,6 +26,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
+#include "system.h"
 
 
 int
diff --git a/tests/line2addr.c b/tests/line2addr.c
index e0d65d3d..663746fd 100644
--- a/tests/line2addr.c
+++ b/tests/line2addr.c
@@ -26,7 +26,7 @@
 #include <locale.h>
 #include <stdlib.h>
 #include <string.h>
-#include <error.h>
+#include "system.h"
 
 
 static void
diff --git a/tests/low_high_pc.c b/tests/low_high_pc.c
index 5c6b343c..78b6ad08 100644
--- a/tests/low_high_pc.c
+++ b/tests/low_high_pc.c
@@ -25,7 +25,6 @@
 #include <stdio_ext.h>
 #include <locale.h>
 #include <stdlib.h>
-#include <error.h>
 #include <string.h>
 #include <fnmatch.h>
 
diff --git a/tests/next_cfi.c b/tests/next_cfi.c
index b923744f..fae0028c 100644
--- a/tests/next_cfi.c
+++ b/tests/next_cfi.c
@@ -18,7 +18,6 @@
 #include <config.h>
 #include <assert.h>
 #include <inttypes.h>
-#include <error.h>
 #include ELFUTILS_HEADER(dw)
 #include <dwarf.h>
 #include <argp.h>
@@ -31,6 +30,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
+#include "system.h"
 
 void
 handle_section (const unsigned char e_ident[],
diff --git a/tests/rdwrmmap.c b/tests/rdwrmmap.c
index 6f027dfe..490a4eea 100644
--- a/tests/rdwrmmap.c
+++ b/tests/rdwrmmap.c
@@ -19,11 +19,11 @@
 #endif
 
 #include <errno.h>
-#include <error.h>
 #include <stdio.h>
 #include <fcntl.h>
 #include <unistd.h>
 #include <libelf.h>
+#include "system.h"
 
 int
 main (int argc __attribute__ ((unused)), char *argv[])
diff --git a/tests/saridx.c b/tests/saridx.c
index 8a450d82..e7f0c566 100644
--- a/tests/saridx.c
+++ b/tests/saridx.c
@@ -17,7 +17,6 @@
 
 #include <config.h>
 
-#include <error.h>
 #include <fcntl.h>
 #include <gelf.h>
 #include <stdio.h>
@@ -25,6 +24,7 @@
 #include <string.h>
 #include <time.h>
 #include <unistd.h>
+#include "system.h"
 
 
 static const char *machines[] =
diff --git a/tests/sectiondump.c b/tests/sectiondump.c
index 3033fedc..f33484f9 100644
--- a/tests/sectiondump.c
+++ b/tests/sectiondump.c
@@ -18,13 +18,13 @@
 #include <config.h>
 
 #include <errno.h>
-#include <error.h>
 #include <fcntl.h>
 #include <gelf.h>
 #include <inttypes.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
+#include "system.h"
 
 
 /* Prototypes for local functions.  */
diff --git a/tests/varlocs.c b/tests/varlocs.c
index 25124399..40505196 100644
--- a/tests/varlocs.c
+++ b/tests/varlocs.c
@@ -25,13 +25,13 @@
 #include <dwarf.h>
 #include <stdio.h>
 #include <stdlib.h>
-#include <error.h>
 #include <string.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <unistd.h>
 
+#include "system.h"
 #include "../libdw/known-dwarf.h"
 
 // The Dwarf, Dwarf_CFIs and address bias of
diff --git a/tests/vdsosyms.c b/tests/vdsosyms.c
index b876c10b..7bfa7381 100644
--- a/tests/vdsosyms.c
+++ b/tests/vdsosyms.c
@@ -18,13 +18,13 @@
 #include <config.h>
 #include <assert.h>
 #include <errno.h>
-#include <error.h>
 #include <inttypes.h>
 #include <stdio.h>
 #include <string.h>
 #include <sys/types.h>
 #include <unistd.h>
 #include ELFUTILS_HEADER(dwfl)
+#include "system.h"
 
 #ifndef __linux__
 int
-- 
2.11.0



More information about the Elfutils-devel mailing list