Bug 23007

Summary: /usr/include/stdbool.h broken
Product: Ports & Packages Reporter: justin.kolodziej <justin.kolodziej>
Component: Individual Port(s)Assignee: freebsd-ports (Nobody) <ports>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description justin.kolodziej 2000-11-21 17:20:00 UTC
The /usr/include/stdbool.h header file is wrong if the compiler doesn't 
set __STDC_VERSION_ to something less than  199901.  It defines _Bool 
twice and kills the compile.

Fix: 

I guess if the compiler isn't ANSI C99, then use 

typedef int _Bool;
#define true 1
#define false 0

otherwise use the C99 enum typedef and defines.

Or perhaps throw the offending bit out and use the C99 stuff for all 
compilers.
How-To-Repeat: cd /usr/ports/print/a2ps
make install
Comment 1 Donald J. Maddox 2000-11-21 17:28:42 UTC
I submitted a PR on this same problem about a week ago...  The only committer
who has responded was Bruce Evans, who pointed out that this file is even more
broken than I initially thought.  He, however, deferred the fix to the author
who has not expressed any interest in the issue thus far :(

On Tue, Nov 21, 2000 at 09:14:12AM -0800, justin.kolodziej@marquette.edu wrote:
> 
> >Number:         23007
> >Category:       ports
> >Synopsis:       /usr/include/stdbool.h broken
> >Confidential:   no
> >Severity:       non-critical
> >Priority:       medium
> >Responsible:    freebsd-ports
> >State:          open
> >Quarter:        
> >Keywords:       
> >Date-Required:
> >Class:          sw-bug
> >Submitter-Id:   current-users
> >Arrival-Date:   Tue Nov 21 09:20:00 PST 2000
> >Closed-Date:
> >Last-Modified:
> >Originator:     Justin A. Kolodziej
> >Release:        5.0-20001119-CURRENT
> >Organization:
> Marquette University
> >Environment:
> FreeBSD kolodziejj.tower.mu.edu 5.0-20001119-CURRENT FreeBSD 5.0-20001119-CURRENT #0: Sun Nov 19 14:07:24 GMT 2000     root@usw2.freebsd.org:/usr/src/sys/compile/GENERIC  i386
> 
> >Description:
> The /usr/include/stdbool.h header file is wrong if the compiler doesn't 
> set __STDC_VERSION_ to something less than  199901.  It defines _Bool 
> twice and kills the compile.
> >How-To-Repeat:
> cd /usr/ports/print/a2ps
> make install
> 
> >Fix:
> I guess if the compiler isn't ANSI C99, then use 
> 
> typedef int _Bool;
> #define true 1
> #define false 0
> 
> otherwise use the C99 enum typedef and defines.
> 
> Or perhaps throw the offending bit out and use the C99 stuff for all 
> compilers.
> 
> >Release-Note:
> >Audit-Trail:
> >Unformatted:
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-ports" in the body of the message
Comment 2 Ade Lovett freebsd_committer freebsd_triage 2000-11-21 17:28:45 UTC
State Changed
From-To: open->closed

See misc/22936.. In addition, this is nothing to do with ports.