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>
+2018-07-04 Ross Burton <ross.burton@intel.com>
+
+ * color.c: Remove error.h, add system.h include.
+ * system.h: Add error.h include.
+ * xmalloc.c: Remove error.h include.
+
2018-06-01 Mark Wielaard <mark@klomp.org>
* printversion.c (print_version): Update copyright year.
#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"
#define LIB_SYSTEM_H 1
#include <errno.h>
+#include <error.h>
#include <stddef.h>
#include <stdint.h>
#include <sys/param.h>
# include <config.h>
#endif
-#include <error.h>
#include <libintl.h>
#include <stddef.h>
#include <stdlib.h>
+2018-07-04 Ross Burton <ross.burton@intel.com>
+
+ * asm_end.c: Remove error.h include.
+ * asm_newscn.c: Likewise.
+ * i386_gendis.c: Likewise and add system.h include.
+ * i386_lex.l: Likewise.
+ * i386_parse.y: Likewise.
+
2017-02-27 Ulf Hermann <ulf.hermann@qt.io>
* Makefile.am: Use dso_LDFLAGS.
#endif
#include <assert.h>
-#include <error.h>
#include <libintl.h>
#include <stdio.h>
#include <stdlib.h>
#endif
#include <assert.h>
-#include <error.h>
#include <libintl.h>
#include <stdlib.h>
#include <string.h>
# 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);
#endif
#include <ctype.h>
-#include <error.h>
#include <libintl.h>
#include <libeu.h>
+#include "system.h"
#include "i386_parse.h"
#include <assert.h>
#include <ctype.h>
#include <errno.h>
-#include <error.h>
#include <inttypes.h>
#include <libintl.h>
#include <math.h>
+2018-07-04 Ross Burton <ross.burton@intel.com>
+
+ * libdw_alloc.c: Remove error.h include.
+
2018-06-28 Mark Wielaard <mark@klomp.org>
* dwarf_next_cfi.c (dwarf_next_cfi): Check whether length is zero.
# include <config.h>
#endif
-#include <error.h>
#include <errno.h>
#include <stdlib.h>
#include "libdwP.h"
+2018-07-04 Ross Burton <ross.burton@intel.com>
+
+ * eblopenbackend.c: Remove error.h include.
+
2018-04-25 Mark Wielaard <mark@klomp.org>
* eblopenbackend.c (default_debugscn_p): Add new DWARF5 sections
#include <assert.h>
#include <dlfcn.h>
-#include <error.h>
#include <libelfP.h>
#include <dwarf.h>
#include <stdlib.h>
+2018-07-04 Ross Burton <ross.burton@intel.com>
+
+ * addr2line.c: Remove error.h include.
+ * ar.c: Likewise.
+ * arlib.c: Likewise and add system.h include.
+ * arlib2.c: Likewise.
+ * elfcmp.c: Likewise.
+ * elfcompress.c: Likewise.
+ * elflint.c: Likewise.
+ * findtextrel.c: Likewise.
+ * nm.c: Likewise.
+ * objdump.c: Likewise.
+ * ranlib.c: Likewise.
+ * readelf.c: Likewise.
+ * stack.c: Likewise.
+ * strings.c: Likewise.
+ * strip.c: Likewise.
+ * unstrip.c: Likewise.
+
2018-06-25 Mark Wielaard <mark@klomp.org>
* readelf.c (print_decoded_line_section): Use dwarf_next_lines
#include <argp.h>
#include <assert.h>
#include <errno.h>
-#include <error.h>
#include <fcntl.h>
#include <inttypes.h>
#include <libdwfl.h>
#include <argp.h>
#include <assert.h>
-#include <error.h>
#include <fcntl.h>
#include <gelf.h>
#include <libintl.h>
#endif
#include <assert.h>
-#include <error.h>
#include <gelf.h>
#include <inttypes.h>
#include <libintl.h>
#include <libeu.h>
+#include "system.h"
#include "arlib.h"
# include <config.h>
#endif
-#include <error.h>
#include <libintl.h>
#include <limits.h>
#include <string.h>
#include <argp.h>
#include <assert.h>
#include <errno.h>
-#include <error.h>
#include <fcntl.h>
#include <locale.h>
#include <libintl.h>
#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);
#include <config.h>
#include <assert.h>
#include <argp.h>
-#include <error.h>
#include <stdbool.h>
#include <stdlib.h>
#include <inttypes.h>
#include ELFUTILS_HEADER(ebl)
#include ELFUTILS_HEADER(dwelf)
#include <gelf.h>
+#include "system.h"
#include "libeu.h"
#include "printversion.h"
#include <assert.h>
#include <byteswap.h>
#include <endian.h>
-#include <error.h>
#include <fcntl.h>
#include <gelf.h>
#include <inttypes.h>
#include <argp.h>
#include <assert.h>
#include <errno.h>
-#include <error.h>
#include <fcntl.h>
#include <gelf.h>
#include <libdw.h>
#include <unistd.h>
#include <printversion.h>
-
+#include "system.h"
struct segments
{
#include <ctype.h>
#include <dwarf.h>
#include <errno.h>
-#include <error.h>
#include <fcntl.h>
#include <gelf.h>
#include <inttypes.h>
#endif
#include <argp.h>
-#include <error.h>
#include <fcntl.h>
#include <inttypes.h>
#include <libintl.h>
#include <argp.h>
#include <assert.h>
#include <errno.h>
-#include <error.h>
#include <fcntl.h>
#include <gelf.h>
#include <libintl.h>
#include <ctype.h>
#include <dwarf.h>
#include <errno.h>
-#include <error.h>
#include <fcntl.h>
#include <gelf.h>
#include <inttypes.h>
#endif
#include <argp.h>
-#include <error.h>
#include <fcntl.h>
#include <gelf.h>
#include <inttypes.h>
#include <config.h>
#include <assert.h>
#include <argp.h>
-#include <error.h>
#include <stdlib.h>
#include <inttypes.h>
#include <stdio.h>
#include <ctype.h>
#include <endian.h>
#include <errno.h>
-#include <error.h>
#include <fcntl.h>
#include <gelf.h>
#include <inttypes.h>
#include <assert.h>
#include <byteswap.h>
#include <endian.h>
-#include <error.h>
#include <fcntl.h>
#include <fnmatch.h>
#include <gelf.h>
#include <argp.h>
#include <assert.h>
#include <errno.h>
-#include <error.h>
#include <fcntl.h>
#include <fnmatch.h>
#include <libintl.h>
#include <gelf.h>
#include <libebl.h>
#include <libdwfl.h>
+#include "system.h"
#include "libdwelf.h"
#include "libeu.h"
#include "printversion.h"
+2018-07-04 Ross Burton <ross.burton@intel.com>
+
+ * 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 <mark@klomp.org>
* next_cfi.c: New file.
#include <stdio_ext.h>
#include <locale.h>
#include <stdlib.h>
-#include <error.h>
#include <string.h>
+#include "system.h"
static void
#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 *
#include <dirent.h>
#include <stdlib.h>
#include <errno.h>
-#include <error.h>
#include <unistd.h>
#include <dwarf.h>
#if defined(__x86_64__) && defined(__linux__)
#include <string.h>
#include ELFUTILS_HEADER(dwfl)
#endif
+#include "system.h"
#if !defined(__x86_64__) || !defined(__linux__)
#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__
#include <dirent.h>
#include <stdlib.h>
#include <errno.h>
-#include <error.h>
#include <unistd.h>
#include <dwarf.h>
#ifdef __linux__
#include <argp.h>
#include ELFUTILS_HEADER(dwfl)
#endif
+#include "system.h"
#ifndef __linux__
#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[])
#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[])
#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[])
#include <unistd.h>
#include <assert.h>
#include <stdio.h>
-#include <error.h>
#include <errno.h>
#ifdef __linux__
#include <sys/prctl.h>
#include <config.h>
#include <assert.h>
#include <inttypes.h>
-#include <error.h>
#include ELFUTILS_HEADER(dw)
#include <dwarf.h>
#include <argp.h>
#include <stdlib.h>
#include <string.h>
+#include "system.h"
#include "../libdw/known-dwarf.h"
static const char *
#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)
#include <inttypes.h>
#include <stdio.h>
#include <stdio_ext.h>
-#include <error.h>
#include <locale.h>
#include ELFUTILS_HEADER(dwfl)
#include <dirent.h>
#include <stdlib.h>
#include <errno.h>
-#include <error.h>
#include <unistd.h>
#include <dwarf.h>
+#include "system.h"
#ifndef __linux__
int
#include <config.h>
#include ELFUTILS_HEADER(dwfl)
+#include "system.h"
-#include <error.h>
static const Dwfl_Callbacks callbacks =
{
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
-#include <error.h>
#include <unistd.h>
#ifdef __linux__
#include <sys/types.h>
#include ELFUTILS_HEADER(dwfl)
#include <pthread.h>
#endif
+#include "system.h"
#ifndef __linux__
int
#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 =
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <error.h>
+#include "system.h"
int
main (int argc, char *argv[])
#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;
#include <stdio.h>
#include <stdio_ext.h>
#include <stdlib.h>
-#include <error.h>
#include <string.h>
static const char *
#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[])
#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[])
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
-#include <error.h>
#include <stdio.h>
#include <inttypes.h>
#include <unistd.h>
#include <stdio_ext.h>
#include <locale.h>
#include <stdlib.h>
-#include <error.h>
#include <string.h>
#include <fnmatch.h>
+#include "system.h"
struct args
#include <stdio_ext.h>
#include <locale.h>
#include <stdlib.h>
-#include <error.h>
#include <string.h>
#include <fnmatch.h>
+#include "system.h"
struct args
#include <stdio_ext.h>
#include <locale.h>
#include <stdlib.h>
-#include <error.h>
#include <string.h>
#include <fnmatch.h>
+#include "system.h"
static void
#endif
#include <errno.h>
-#include <error.h>
#include <fcntl.h>
#include <inttypes.h>
#include <libelf.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
+#include "system.h"
int
#include <locale.h>
#include <stdlib.h>
#include <string.h>
-#include <error.h>
+#include "system.h"
static void
#include <stdio_ext.h>
#include <locale.h>
#include <stdlib.h>
-#include <error.h>
#include <string.h>
#include <fnmatch.h>
#include <config.h>
#include <assert.h>
#include <inttypes.h>
-#include <error.h>
#include ELFUTILS_HEADER(dw)
#include <dwarf.h>
#include <argp.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#include "system.h"
void
handle_section (const unsigned char e_ident[],
#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[])
#include <config.h>
-#include <error.h>
#include <fcntl.h>
#include <gelf.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
+#include "system.h"
static const char *machines[] =
#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. */
#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
#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