Strange problem with param.h/time.h/timex.h

From: Marc-Christian Petersen (mcp@linux-systeme.de)
Date: Thu May 09 2002 - 11:05:48 EST


Hi there,

i have a strange problem, i don't understand!

In include/asm-i386/param.h i have the following:

#ifndef HZ
#ifdef CONFIG_100HZ
#define HZ 100
#warning Just an info: 100HZ
#endif
#ifdef CONFIG_1000HZ
#define HZ 1000
#warning Just an info: 1000HZ
#endif
#ifdef CONFIG_1024HZ
#define HZ 1024
#warning Just an info: 1024HZ
#endif
#endif

If i do make bzImage i get the following error:

/usr/src/linux-2.4.18/include/asm/param.h:7: warning: #warning Just an info:
100HZ
cc -D__KERNEL__ -I/usr/src/linux-2.4.18/include -Wall -Wstrict-prototypes
-Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno
-common -pipe -mpreferred-stack-boundary=2 -march=i686
-DKBUILD_BASENAME=panic -DEXPORT_SYMTAB -c panic.c
In file included from /usr/src/linux-2.4.18/include/linux/sched.h:14,
                 from panic.c:11:

/usr/src/linux-2.4.18/include/linux/timex.h:78: #error You lose.
In file included from /usr/src/linux-2.4.18/include/linux/affs_fs_i.h:7,
                 from /usr/src/linux-2.4.18/include/linux/fs.h:319,
                 from /usr/src/linux-2.4.18/include/linux/capability.h:17,
                 from /usr/src/linux-2.4.18/include/linux/binfmts.h:6,
                 from /usr/src/linux-2.4.18/include/linux/sched.h:9,
                 from panic.c:11:
/usr/src/linux-2.4.18/include/linux/time.h: In function `timespec_to_jiffies':
/usr/src/linux-2.4.18/include/linux/time.h:37: `HZ' undeclared (first use in
this function)
/usr/src/linux-2.4.18/include/linux/time.h:37: (Each undeclared identifier is
reported only once
/usr/src/linux-2.4.18/include/linux/time.h:37: for each function it appears
in.)
/usr/src/linux-2.4.18/include/linux/time.h: In function `jiffies_to_timespec':
/usr/src/linux-2.4.18/include/linux/time.h:47: `HZ' undeclared (first use in
this function)

So, all the files have an include to asm/param.h, where HZ is defined. The
warning defined in param.h is also printed out, but why i got those
errors?!?! Maybe any have a clue :)

Many thnx!

Please CC, i am not subscribed to the lkml!

-- 
Kind regards
        Marc-Christian Petersen

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue May 14 2002 - 12:00:11 EST