Bugzilla – Bug 154988
bad preprocessor directives in /usr/inclide/asm/pci-direct.h and others
Last modified: 2006-03-03 16:48:45 UTC
Some of the glibc bi-arch asm headers have invalid syntax, due to a bug in the create_biarch_asm.sh shell script used to create them The problem is, that a hypen in the header file name is NOT translated into an underscore as it ought to be. In the generated /usr/include/asm/pci-direct.h this results in #ifndef __X86_64_ASM_STUB__PCI-DIRECT_H__ #define __X86_64_ASM_STUB__PCI-DIRECT_H__ instead of #ifndef __X86_64_ASM_STUB__PCI_DIRECT_H__ #define __X86_64_ASM_STUB__PCI_DIRECT_H__ This doesn't matter much because these headers are hardly ever included, but should nevertheless be corrected.
Let's use the following in the script: J=`echo $I | tr a-z.- A-Z__`
which results in the desired: #ifndef __X86_64_ASM_STUB__PCI_DIRECT_H__ #define __X86_64_ASM_STUB__PCI_DIRECT_H__
(In reply to comment #2) > which results in the desired: > > #ifndef __X86_64_ASM_STUB__PCI_DIRECT_H__ > #define __X86_64_ASM_STUB__PCI_DIRECT_H__ > Exactly what I wanted to trigger. A related question: Should these header wrappers really be protected from multiple inclusions? Some of the real headers in asm-i386 and asm-x86_64 are not so protected! Is that on purpose or just an oversight?
I guess that's an oversight. AFAIR these defines are just an optimization, they are not really needed. If they break anything, we should look at them.