summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRoss Burton <[email protected]>2018-07-04 12:11:08 +0100
committerMark Wielaard <[email protected]>2018-07-05 21:06:40 +0200
commite893aab0d12284c8909ebacfca529c0b554abb9c (patch)
tree7c50c7de9492e68b36ef7dbfedca4404aa198c60 /tests
parentd612684109f0395b86e4aaad9ba94e02f79a099a (diff)
Consolidate error.h inclusion in system.h
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 <[email protected]>
Diffstat (limited to 'tests')
-rw-r--r--tests/ChangeLog37
-rw-r--r--tests/addrscopes.c2
-rw-r--r--tests/allregs.c2
-rw-r--r--tests/backtrace-data.c2
-rw-r--r--tests/backtrace-dwarf.c2
-rw-r--r--tests/backtrace.c2
-rw-r--r--tests/buildid.c2
-rw-r--r--tests/debugaltlink.c2
-rw-r--r--tests/debuglink.c2
-rw-r--r--tests/deleted.c1
-rw-r--r--tests/dwarfcfi.c2
-rw-r--r--tests/dwfl-addr-sect.c2
-rw-r--r--tests/dwfl-bug-addr-overflow.c1
-rw-r--r--tests/dwfl-bug-fd-leak.c2
-rw-r--r--tests/dwfl-bug-getmodules.c2
-rw-r--r--tests/dwfl-proc-attach.c2
-rw-r--r--tests/dwfl-report-elf-align.c2
-rw-r--r--tests/dwfllines.c2
-rw-r--r--tests/dwflmodtest.c2
-rw-r--r--tests/dwflsyms.c1
-rw-r--r--tests/early-offscn.c2
-rw-r--r--tests/ecp.c2
-rw-r--r--tests/elfstrmerge.c1
-rw-r--r--tests/find-prologues.c2
-rw-r--r--tests/funcretval.c2
-rw-r--r--tests/funcscopes.c2
-rw-r--r--tests/getsrc_die.c2
-rw-r--r--tests/line2addr.c2
-rw-r--r--tests/low_high_pc.c1
-rw-r--r--tests/next_cfi.c2
-rw-r--r--tests/rdwrmmap.c2
-rw-r--r--tests/saridx.c2
-rw-r--r--tests/sectiondump.c2
-rw-r--r--tests/varlocs.c2
-rw-r--r--tests/vdsosyms.c2
35 files changed, 66 insertions, 34 deletions
diff --git a/tests/ChangeLog b/tests/ChangeLog
index 765a874b..61b50371 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,3 +1,40 @@
+2018-07-04 Ross Burton <[email protected]>
+
+ * addrscopes.c: Remove error.h include, add system.h include.
+ * allregs.c: Likewise.
+ * backtrace-data.c: Likewise.
+ * backtrace-dwarf.c: Likewise.
+ * backtrace.c: Likewise.
+ * buildid.c: Likewise.
+ * debugaltlink.c: Likewise.
+ * debuglink.c: Likewise.
+ * deleted.c : Likewise.
+ * dwarfcfi.c: Likewise.
+ * dwfl-addr-sect.c: Likewise.
+ * dwfl-bug-addr-overflow.c: Likewise.
+ * dwfl-bug-fd-leak.c: Likewise.
+ * dwfl-bug-getmodules.c: Likewise.
+ * dwfl-proc-attach.c: Likewise.
+ * dwfl-report-elf-align.c: Likewise.
+ * dwfllines.c: Likewise.
+ * dwflmodtest.c: Likewise.
+ * dwflsyms.c: Likewise.
+ * early-offscn.c: Likewise
+ * ecp.c: Likewise.
+ * elfstrmerge.c: Likewise.
+ * find-prologues.c: Likewise.
+ * funcretval.c: Likewise.
+ * funcscopes.c: Likewise.
+ * getsrc_die.c: Likewise.
+ * line2addr.c: Likewise.
+ * low_high_pc.c: Likewise.
+ * next_cfi.c: Likewise.
+ * rdwrmmap.c: Likewise.
+ * saridx.c: Likewise.
+ * sectiondump.c: Likewise.
+ * varlocs.c: Likewise.
+ * vdsosyms.c: Likewise.
+
2018-06-28 Mark Wielaard <[email protected]>
* next_cfi.c: New file.
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