freetype
[Top][All Lists]
Advanced

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

[Freetype] FreeType 2 changes required for XFree86


From: Juliusz Chroboczek
Subject: [Freetype] FreeType 2 changes required for XFree86
Date: 04 Apr 2002 02:24:43 +0200

Dear David, dear all,

I'm currently working on a FreeType 2 backend for XFree86.  My goal
was to use pristine FreeType sources and only have a private set of
config files; unfortunately, that has proven impossible for two
reasons.  I would like to suggest that a number of minor changes to
FreeType should be made to fix this situation.

1. Include files

An XFree86 module does not include the files in /usr/include; instead,
it includes the file "xf86_ansic.h".  Thus, code that goes into a font
module typically starts with code such as the following:

  #ifndef FONTMODULE
  #include <string.h>
  #include <math.h>
  #else
  #include "Xmd.h"
  #include "Xdefs.h"
  #include "xf86_ansic.h"
  #endif

Unfortunately, the FreeType 2 sources contain a number of includes
within C files.  I suggest that a new file (which I called ftstdlib.h
-- see attachment) should be created that includes all the needed
headers.  This single file would be easier to customise for us.

2. Structure member names

Because things like ``read'' are actually #defines in XFree86 codes,
they should not be used for structure and union members.  FreeType 2
uses at least the following names for structure members:

  malloc, realloc, free, close, read

I have worked around the problem by creative use of #undef; I see no
good solution to this issue other than renaming the structure members.

I am attaching the complete changes against FreeType 2 that I have
needed to use.  Anything that will make this list smaller is welcome.

Thanks a lot,

                                        Juliusz

Attachment: xfree86-freetype2.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]