[cairo] Re : internal cairo include syntax seems not flexible enough, backward-compatible fix proposal.
David Turner
david at freetype.org
Mon Sep 22 06:14:45 PDT 2008
As far as I remember, the implementation of #include "file" is unspecified
by the standard. while Visual C++ and GCC do first look at 'directory where
the current file is',
some other compilers are known to have a different scheme (e.g. Borland C++
uses 'current directory when compiling, then system dirs').
I would not recommend using #include "file" in any public API unless you
really like debugging weird install/path bugs on other people's computers...
2008/9/20 Fabien Costantini <fab672000 at yahoo.fr>
>
>
>
>
> Behdad wrote:
> >>Fabien Costantini wrote:
> >> Replace all cairo internal includes syntax using "" instead of <> when
> the include file concerned is in the cairo include directory.
> >I made this change back in May. Will be in 1.8. But now I wonder if I
> should
> >not have done that. Code having #include <cairo/cairo.h> is wrong as far
> as
> >cairo API is concerned.
>
> IHMO, it is _not_ wrong, it is simply not possible today because internal
> includes are indeed wrong.
> You can easily check that my suggestion makes possible both constructions
> <cairo/cairo.h> and <cairo.h>.
> Last but not least, it *prevents* adding an useless include path in most
> cases...
> Now, if you think of the current include scheme, cairo shoots its users in
> the the foot as it prevents users to choose how they want to use the lib.
> BTW, just to be sure, I just patched the internal includes as I explained
> and it just works fine in both cases.
>
> So what would be this good reason why you would prevent such a
> functionality to work as it already does in so many libs ? Just curious, as
> I see no advantages, just what looks for me like a bug in the current
> implementation.
>
> Fabien
>
> _______________________________________________
> cairo mailing list
> cairo at cairographics.org
> http://lists.cairographics.org/mailman/listinfo/cairo
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cairographics.org/archives/cairo/attachments/20080922/bfc1fccb/attachment.html
More information about the cairo
mailing list