lkml.org 
[lkml]   [1996]   [Oct]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectPOSIX test suite - including header files
I was playing around with the POSIX test suite and noticed a potential
problem:

- A .c file includes errno.h
- errno.h #define's _ERRNO_H, does other stuff, and then includes
linux/errno.h
- linux/errno.h #define's _LINUX_ERRNO_H, does stuff, and then includes
asm/errno.h
- asm/errno.h #define's _I386_ERRNO_H (on my sys, at least) and does stuff

So far so good.

- The .c file #undef's all the EXXX errno constants.
- The .c file #include's errno.h
- The .c file tries to use all the EXXX constants

Problem is those *_ERRNO_H constants are still defined, so the rest of the
header files don't get included.

Solutions? The easiest would be just to get rid of the #ifndef's
bracketing all header files (obviously the test suite cannot be altered
without breaking its validity). I'm asking for ideas on solving this
problem with regards to header files in general, and the kernel includes
specifically.

Suggestions are appreciated,
-- Elliot Lee


\
 
 \ /
  Last update: 2005-03-22 13:38    [W:0.043 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site