diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2007-12-13 16:18:53 +0900 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2007-12-19 14:50:06 +0900 |
commit | f5d08e9fa6464c876ab00c03fadc09a64edb5bb5 (patch) | |
tree | f0265be55c7d40723e2868f2540262bc5078330f /kexec | |
parent | 0151e38f0d87528c8856fcb0b4d53ed547c139b0 (diff) |
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 <jk@ozlabs.org>
Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'kexec')
-rw-r--r-- | kexec/crashdump-xen.c | 6 | ||||
-rw-r--r-- | kexec/kexec.c | 5 | ||||
-rw-r--r-- | kexec/kexec.h | 4 |
3 files changed, 11 insertions, 4 deletions
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 <xenctrl.h> #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 <unistd.h> #include <fcntl.h> #include <getopt.h> + +#include "config.h" + #ifdef HAVE_ZLIB_H #include <zlib.h> #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 <sys/types.h> #include <stdint.h> #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); |