Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Jul 2012 21:04:05 +1000
From:      Jan Beich <jbeich@tormail.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/169869: [patch] print/fontforge: fix conflict with stdbool.h
Message-ID:  <1Sq08R-0006vv-Ps@internal.tormail.org>
Resent-Message-ID: <201207150350.q6F3oAcI016754@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         169869
>Category:       ports
>Synopsis:       [patch] print/fontforge: fix conflict with stdbool.h
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jul 15 03:50:10 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Jan Beich
>Release:        FreeBSD 10.0-CURRENT amd64
>Organization:
>Environment:
WITH_ICONV= # see src.conf(5), its header pulls stdbool.h
CC = clang
>Description:
>How-To-Repeat:
splineutil2.c:4816:9: error: cannot combine with previous 'int' declaration
      specifier
    int bool;
        ^
/usr/include/stdbool.h:37:14: note: expanded from macro 'bool'
#define bool    _Bool
                ^
splineutil2.c:4816:5: warning: declaration does not declare anything
      [-Wmissing-declarations]
    int bool;
    ^~~~~~~~
splineutil2.c:4830:10: error: expected identifier or '('
    bool = spline->from->nonextcp;
         ^
splineutil2.c:4832:30: error: expected expression
    spline->from->noprevcp = bool;
                             ^
/usr/include/stdbool.h:37:14: note: expanded from macro 'bool'
#define bool    _Bool
                ^
splineutil2.c:4833:10: error: expected identifier or '('
    bool = spline->from->nextcpdef;
         ^
splineutil2.c:4835:31: error: expected expression
    spline->from->prevcpdef = bool;
                              ^
/usr/include/stdbool.h:37:14: note: expanded from macro 'bool'
#define bool    _Bool
                ^
splineutil2.c:4844:11: error: expected identifier or '('
            bool = spline->to->nonextcp;
                 ^
splineutil2.c:4846:29: error: expected expression
            spline->to->noprevcp = bool;
                                   ^
/usr/include/stdbool.h:37:14: note: expanded from macro 'bool'
#define bool    _Bool
                ^
splineutil2.c:4847:11: error: expected identifier or '('
            bool = spline->to->nextcpdef;
                 ^
splineutil2.c:4849:30: error: expected expression
            spline->to->prevcpdef = bool;
                                    ^
/usr/include/stdbool.h:37:14: note: expanded from macro 'bool'
#define bool    _Bool
                ^
1 warning and 9 errors generated.
>Fix:
--- stdbool.diff begins here ---
--- fontforge/splineutil2.c~
+++ fontforge/splineutil2.c
@@ -4813,7 +4813,8 @@ SplineSet *SplineSetReverse(SplineSet *s
     Spline *spline, *first, *next;
     BasePoint tp;
     SplinePoint *temp;
-    int bool;
+    int b;
+#define bool b
     int i;
     /* reverse the splineset so that what was the start point becomes the end */
     /*  and vice versa. This entails reversing every individual spline, and */
--- stdbool.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1Sq08R-0006vv-Ps>