Re: fontconfig error



On Sun, Aug 27, 2006 at 02:23:38PM -0700, Sergei Steshenko wrote:
> 
> I tried to compile fontconfig, and a part of fontconfig, namely fcfreetype.c file,
> wont'c compile.
> 
> Here is how the '#include ...' part of the file looks:
> 
> 
> "
> ...
>      47 #include <stdlib.h>
>      48 #include <stdio.h>
>      49 #include <string.h>
>      50 #include "fcint.h"
>      51 #include <ft2build.h>
>      52 #include FT_FREETYPE_H
>      53 #include FT_INTERNAL_OBJECTS_H
>      54 #include FT_TRUETYPE_TABLES_H
>      55 #include FT_SFNT_NAMES_H
>      56 #include FT_TRUETYPE_IDS_H
>      57 #include FT_TYPE1_TABLES_H
>      58 #include FT_INTERNAL_STREAM_H
>      59 #include FT_INTERNAL_SFNT_H
>      60 #include FT_INTERNAL_TRUETYPE_TYPES_H
>      61 #if HAVE_FT_GET_X11_FONT_FORMAT
>      62 #include FT_XFREE86_H
>      63 #endif
>      64
>      65 #if HAVE_FT_GET_BDF_PROPERTY
>      66 #include FT_BDF_H
>      67 #include FT_MODULE_H
> ...
> ".
> 
> As one can see, in addition to traditional
> 
> #include <file>
> 
> or
> 
> # include "file"
> 
> there are lines like these:
> 
>      52 #include FT_FREETYPE_H
>      53 #include FT_INTERNAL_OBJECTS_H
>      54 #include FT_TRUETYPE_TABLES_H
>      55 #include FT_SFNT_NAMES_H
>      56 #include FT_TRUETYPE_IDS_H
>      57 #include FT_TYPE1_TABLES_H
>      58 #include FT_INTERNAL_STREAM_H
>      59 #include FT_INTERNAL_SFNT_H
>      60 #include FT_INTERNAL_TRUETYPE_TYPES_H
>      61 #if HAVE_FT_GET_X11_FONT_FORMAT
>      62 #include FT_XFREE86_H
>      63 #endif
> .
> 
> These lines are peculiar in that they have neither '"', nor '<', '>' to
> enclose the file names

ISO C allows

    1. #include <systemheader.h>
    2. #include "localheader.h"
    3. #include MACRO

where MACRO has to -- after all expansions -- give one of
the former two cases.  The FT_* macros are defined in
freetype/config/ftheader.h and freetype/internal/internal.h.

Except that the internal headers no longer exist in FreeType
2.2+.  Neither are defined the corresponding FT_INTERNAL_*
macros.  When a FT_* macro is undefined none of the cases
1.-3. occurs, the preprocessor sees literal

    #include FT_INTERNAL_OBJECTS_H

and complains.  Thus you get errors on lines correspoding to
inclusion of internal headers (through FT_INTERNAL_*
macros).

Yeti


--
Anonyms eat their boogers.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]