Fix #include's for diskdump.c

AFAICS the stdio.h header file is not needed for anything.
OTOH pread() is declared in <unistd.h>, which is not #included.

Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
Add byteorder macros for compatibility with older glibc versions

These macros must be defined here if missing from the header files.

Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
Add kdump_architecture enum

This type may be used later to easily compare against architecture
(rather than string-based).

Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
kdump_arch_ptr_size: map architecture enum to pointer size

Make it easy to determine target pointer size based on architecture.

Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
Support for ELF core dump files

This is quite a bit ugly, because it also handles Xen core files.
Copied shamelessly from kdumpid, just like all the other dump file
formats.

Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
Remove messages to stderr from lkcd.c

Some perror() calls were forgotten after copying from kdumpid.

Signed-off-by: Petr Tesarik <ptesarik@suse.cz>