From f5d08e9fa6464c876ab00c03fadc09a64edb5bb5 Mon Sep 17 00:00:00 2001 From: Jeremy Kerr Date: Thu, 13 Dec 2007 16:18:53 +0900 Subject: Use config.h for defines Instead of putting a heap of -D directives in CPPFLAGS, use a config.h header. Signed-off-by: Jeremy Kerr Signed-off-by: Simon Horman --- kexec/crashdump-xen.c | 6 ++++-- kexec/kexec.c | 5 ++++- kexec/kexec.h | 4 +++- 3 files changed, 11 insertions(+), 4 deletions(-) (limited to 'kexec') diff --git a/kexec/crashdump-xen.c b/kexec/crashdump-xen.c index 4d6a25d..1fdaf05 100644 --- a/kexec/crashdump-xen.c +++ b/kexec/crashdump-xen.c @@ -14,7 +14,9 @@ #include "crashdump.h" #include "kexec-syscall.h" -#ifdef HAVE_XENCTRL_H +#include "config.h" + +#ifdef HAVE_LIBXENCTRL #include #endif @@ -36,7 +38,7 @@ int xen_present(void) unsigned long xen_architecture(struct crash_elf_info *elf_info) { unsigned long machine = elf_info->machine; -#ifdef HAVE_XENCTRL_H +#ifdef HAVE_LIBXENCTRL int xc, rc; xen_capabilities_info_t capabilities; diff --git a/kexec/kexec.c b/kexec/kexec.c index fe29dad..abc1cce 100644 --- a/kexec/kexec.c +++ b/kexec/kexec.c @@ -29,6 +29,9 @@ #include #include #include + +#include "config.h" + #ifdef HAVE_ZLIB_H #include #endif @@ -718,7 +721,7 @@ static int my_exec(void) static void version(void) { - printf(PACKAGE " " VERSION " released " RELEASE_DATE "\n"); + printf(PACKAGE_STRING " released " PACKAGE_DATE "\n"); } void usage(void) diff --git a/kexec/kexec.h b/kexec/kexec.h index 2ee48c4..2384c53 100644 --- a/kexec/kexec.h +++ b/kexec/kexec.h @@ -1,6 +1,8 @@ #ifndef KEXEC_H #define KEXEC_H +#include "config.h" + #include #include #define USE_BSD @@ -197,7 +199,7 @@ extern unsigned char purgatory[]; extern size_t purgatory_size; #define BOOTLOADER "kexec" -#define BOOTLOADER_VERSION VERSION +#define BOOTLOADER_VERSION PACKAGE_VERSION void arch_usage(void); int arch_process_options(int argc, char **argv); -- cgit