[En-Nut-Discussion] RFC - Compiler Specific Header Files

Harald Kipp harald.kipp at egnite.de
Thu Oct 4 09:29:50 CEST 2007


Hi all,

I'd like to move to C99 header files:
http://en.wikipedia.org/wiki/C99#C99

The problem is, that not all compilers or libraries fully support them. 
They may, for example, provide inttypes.h, but not stdint.h.

I suggest to create new subdirectories, like

  include/compiler/generic/
  include/compiler/iccavr/
  include/compiler/gcc4bsd/
  include/compiler/gcc4newlib/
  include/compiler/gcc4unixemu/

If compiling for iccavr, the path to include/compiler/iccavr/ will be 
added to the compiler arguments as the first include path to be searched.

Moving all standard include files to include/compiler/generic/ and 
creating for example include/compiler/iccavr/stdint.h with the following 
contents

  #include <../generic/stdint.h>

will avoid multiple copies of the same header file.

Furthermore, this way we may get rid of the foobar_nut_wrapper.h, which 
current need to be created for the emulation running on *nix systems.

Did I miss anything?

Thanks,

Harald






More information about the En-Nut-Discussion mailing list