[Cbe-oss-dev] [patch 1/4] MARS: Header file cleanups

Geoff Levand geoffrey.levand at am.sony.com
Sun Aug 31 13:31:33 EST 2008


On 08/24/2008 07:18 PM, Kazunori Asayama wrote:
> Geoff Levand wrote:
>> Cleanup header files:
> (snip)
>>  o Use system include path for installed headers.
> 
> Why is that needed? Many software, such as OpenGL, OpenSSL, X11 and 
> more, follow the same way as the current MARS's one. IMO, it's better to 
>    create a sub directory for MARS headers rather than to put many 
> random MARS headers in the system include directory directly.

This is not related to where the headers are installed, but to the
search path the pre-processor uses.  The search order is different
for files included with "" and <>.

By using <> in installed headers, MARS will behave like the standard
include files in regards to pre-processor options and error messages.

I don't have OpenGL installed, but I checked the others:

$ (find /usr/include/openssl/ -type f -exec cat {} \;) | egrep -c '#include <openssl'
174
$ (find /usr/include/openssl/ -type f -exec cat {} \;) | egrep -c '#include "openssl'
8

$ (find /usr/include/X11/ -type f -exec cat {} \;) | egrep -c '#include <X11'
533
$ (find /usr/include/X11/ -type f -exec cat {} \;) | egrep -c '#include "X11'
0

So it seems those use <>, not "".

>>  o Remove hard-coded include path.
> 
> Which is 'hard-coded'? I guess 'hard-coded' means 'mars/*.h', but I 
> don't think it is 'hard-coded'. I understand it is just *relative* to
> include paths.

The relative path is hard coded.  Having these paths goes against the
GNU coding standard, but we have no obligation to follow that.
I'll need to fix the makefiles to support it.

-Geoff









More information about the cbe-oss-dev mailing list