Fix compile errors if CONFIG_FS_PAYLOAD=1:
authorJens Rottmann <JRottmann@LiPPERTEmbedded.de>
Mon, 3 Nov 2008 23:16:00 +0000 (23:16 +0000)
committerStefan Reinauer <stepan@openbios.org>
Mon, 3 Nov 2008 23:16:00 +0000 (23:16 +0000)
Compile error in filo.c if AUTOBOOT_DELAY=0. Replace
#ifndef AUTOBOOT_DELAY
with
#if !AUTOBOOT_DELAY
which should work for both the #undef and the =0 case.

In ext2fs.c, fat.c
#if ARCH == 'i386'
results in a compile warning: "multi-character character constant" and
the condition ARCH == 'i386' is mis-evaluated as FALSE, eventually
choking the assembler on a PPC instruction. Change it to
#ifdef __i386

Signed-off-by: Jens Rottmann <JRottmann@LiPPERTEmbedded.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3729 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1

src/boot/filo.c
src/stream/fs/ext2fs.c
src/stream/fs/fat.c

index 157bec205758f95ba1ce5037b49a3664da244899..cd14fa13b346dc3211244e852528ee2ffa05c5a1 100644 (file)
@@ -18,7 +18,7 @@
 #define autoboot(mem)
 #endif
 
-#ifndef AUTOBOOT_DELAY
+#if !AUTOBOOT_DELAY
 #define autoboot_delay() 0 /* success */
 #endif
 
index f29fd8aeb13d4a261d3fd9c341cdbbdb3055f5a8..9cf0bc650056da5679b1c91d29a86d8c011396ba 100644 (file)
@@ -239,7 +239,7 @@ struct ext2_dir_entry
  * ffz = Find First Zero in word. Undefined if no zero exists,
  * so code should check against ~0UL first..
  */
-#if ARCH == 'i386'
+#ifdef __i386
 static __inline__ unsigned long
 ffz (unsigned long word)
 {
index 540cac370ec2c53d686753fba133fed70ead2a4d..01e4e03cc2ed607d1f9b2c6bd4c55429f2390976 100644 (file)
@@ -54,7 +54,7 @@ struct fat_superblock
 
 #define FAT_CACHE_SIZE 2048
 
-#if ARCH == 'i386'
+#ifdef __i386
 static __inline__ unsigned long
 log2 (unsigned long word)
 {