freetype-devel
[Top][All Lists]
Advanced

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

[ft-devel] patch for makedepend failure when building FreeType


From: Graham Asher
Subject: [ft-devel] patch for makedepend failure when building FreeType
Date: Tue, 8 May 2007 15:46:40 +0100

Dear FreeTypers,

here's a patch for something that has bitten me twice recently - once while
building FreeType using the Mozilla build system and once in another system,
both of which use makedepend (also known as mkdepend) to parse C files and
create dependencies.

The makedepend tool fails with a divide-by-zero error because it apparently
assigns the value 0 to macros; it does not actually work like a real C
preprocessor.

I'm not sure whether some better fix can be incorporated into FreeType
(i.e., not a hack), but here is the patch if you need it. Add the following
at line 73 of include\freetype\config\ftconfig.h:

/*
PATCH TO AVOID DIVIDE-BY-ZERO ERROR IN MAKEDEPEND.
The makedepend tool (also known as mkdepend) sets FT_CHAR_BIT to
zero and thus fails with a divide-by-zero error when it evaluates
the expression (16 / FT_CHAR_BIT) below.

This works only for systems that have 8-bit characters,
which is not a burdensome restriction.
*/
#undef FT_CHAR_BIT
#define FT_CHAR_BIT 8

Best wishes,

Graham Asher






reply via email to

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