Skip to contentSkip to conversation

system.h / pal.h / types.h

Linux-ia64 Joe Griffin 2 participants 5 messages Oct 17, 2002

lore
Share & tools
lore
#0 lore raw

Hello,

The following program fails on my IA64 (tiger) with the 2.4.18 kernel and 2.2.4 glibc. There is an error when system.h includes pal.h:

#include <stdio.h>
#include <asm/system.h>
main ()
{
printf("Hello World \n");
}

system.h has:
#include <asm/pal.h>

pal.h has:
typedef s64 pal_status_t;

But s64 is only defined in asm/types.h if either __KERNEL__ or _ASM_IA64_PAL_H is defined. In the older version, when system.h came from kernel-headers, this error did not exit.

... Or is it a "feature" that I now must compile any program which contains "#include <asm/system.h>" with CCFLAGS="-D_ASM_IA64_PAL_H"?

My actual error is:

In file included from /usr/include/asm/system.h:19,

                from main.c:2:

/usr/include/asm/pal.h:88: parse error before `pal_status_t' /usr/include/asm/pal.h:88: warning: data definition has no type or storage class
/usr/include/asm/pal.h:101: parse error before `pal_cache_level_t'
.....

Does anyone have any comments on this? Is there a new glibc which fixes this error?

Willing to learn,
Thanks in advance,
Joe Griffin

#1 lore raw

Joe Griffin <[email protected]> writes:

|> Hello,
|> 
|> The following program fails on my IA64 (tiger)
|> with the 2.4.18 kernel and 2.2.4 glibc.  There
|> is an error when system.h includes pal.h:
|> 
|> #include <stdio.h>
|> #include <asm/system.h>
|> main ()
|> {
|> printf("Hello World \n");
|> }

What are you trying to do? Kernel headers are just that, kernel headers, and not for use in user programs.

Andreas.

Signature · 4 lines
Andreas Schwab, SuSE Labs, [email protected]
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."
#2 lore raw
In reply to Joe Griffin

Andreas,

I am making a few RPMS from source. The source has an include of asm/system.h. If "asm/system.h" is in a "c" program I do not think a person should have an error.

Are you saying that programs should not have asm/system.h in them?

Joe

Quoted 22 lines · Andreas Schwab

Joe Griffin <[email protected]> writes:

|> Hello,
|> 
|> The following program fails on my IA64 (tiger)
|> with the 2.4.18 kernel and 2.2.4 glibc.  There
|> is an error when system.h includes pal.h:
|> 
|> #include <stdio.h>
|> #include <asm/system.h>
|> main ()
|> {
|> printf("Hello World \n");
|> }

What are you trying to do? Kernel headers are just that, kernel headers, and not for use in user programs.

Andreas.

#3 lore raw
In reply to Joe Griffin

Joe Griffin <[email protected]> writes:

|> Andreas,
|> 
|> I am making a few RPMS from source.  The
|> source has an include of asm/system.h.
|> If "asm/system.h" is in a "c" program
|> I do not think a person should have an error.
|> 
|> Are you saying that programs should
|> not have asm/system.h in them?

Yes, if it's not part of the kernel.

Andreas.

Signature · 4 lines
Andreas Schwab, SuSE Labs, [email protected]
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."
#4 lore raw
In reply to Joe Griffin

Andreas,

Thanks for your time.

Joe Griffin

Quoted 18 lines · Andreas Schwab

Joe Griffin <[email protected]> writes:

|> Andreas,
|> 
|> I am making a few RPMS from source.  The
|> source has an include of asm/system.h.
|> If "asm/system.h" is in a "c" program
|> I do not think a person should have an error.
|> 
|> Are you saying that programs should
|> not have asm/system.h in them?

Yes, if it's not part of the kernel.

Andreas.