[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ft-devel] [Patch] Fix ftgrays.c STANDALONE compilation
From: |
David Weber |
Subject: |
[ft-devel] [Patch] Fix ftgrays.c STANDALONE compilation |
Date: |
Sun, 13 Apr 2014 14:27:06 +0200 |
Hi,
attached patch fixes the STANDALONE compilation of ftgrays.c with GCC
4.7 and clang
3.4.
Cheers,
David
>From 2df10600e46f6c0afa5f8f555142a3d32ad992b7 Mon Sep 17 00:00:00 2001
From: David Weber <address@hidden>
Date: Sun, 13 Apr 2014 14:22:04 +0200
Subject: [PATCH] Fix ftgrays.c STANDALONE compilation
These two macros are needed. Otherwise fails with:
LANG=C cc -c -D_STANDALONE_ ftgrays.c
ftgrays.c: In function 'gray_render_scanline':
ftgrays.c:727:5: error: lvalue required as left operand of assignment
ftgrays.c:727:5: error: 'FT_END_STMNT' undeclared (first use in this
function)
ftgrays.c:727:5: note: each undeclared identifier is reported only once
for each function it appears in
ftgrays.c:742:7: error: lvalue required as left operand of assignment
ftgrays.c: In function 'gray_render_line':
ftgrays.c:870:5: error: lvalue required as left operand of assignment
ftgrays.c:870:5: error: 'FT_END_STMNT' undeclared (first use in this
function)
ftgrays.c:881:7: error: lvalue required as left operand of assignment
---
src/smooth/ftgrays.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/smooth/ftgrays.c b/src/smooth/ftgrays.c
index 425911a..349e0e7 100644
--- a/src/smooth/ftgrays.c
+++ b/src/smooth/ftgrays.c
@@ -98,6 +98,8 @@
#define FT_ERR_XCAT( x, y ) x ## y
#define FT_ERR_CAT( x, y ) FT_ERR_XCAT( x, y )
+#define FT_BEGIN_STMNT do {
+#define FT_END_STMNT } while ( 0 )
/* define this to dump debugging information */
/* #define FT_DEBUG_LEVEL_TRACE */
--
1.9.2
0001-Fix-ftgrays.c-STANDALONE-compilation.patch
Description: Text Data
- [ft-devel] [Patch] Fix ftgrays.c STANDALONE compilation,
David Weber <=