Skip site navigation (1) Skip section navigation (2)

Re: bool: symbol name collision

From: bryanh(at)giraffe-data(dot)com (Bryan Henderson)
To: robertmhaas(at)gmail(dot)com
Cc: peter_e(at)gmx(dot)net, tgl(at)sss(dot)pgh(dot)pa(dot)us, pgsql-bugs(at)postgresql(dot)org
Subject: Re: bool: symbol name collision
Date: 2010-05-11 21:12:27
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
>On the flip side if the code that purports to cope with other
>definitions of bool is useless, we should remove it so as to avoid
>giving the impression that we have any ability to so cope.

Indeed, that code is what led me to believe I could work around my bool
conflict problem with a "#define bool bool" in my code.  It appeared to work
at first -- the code compiled and even ran, but later when I added a Version 1
function (that's an interface that has a structure with a "bool" member),
things fell apart (my compiler's bool is 4 bytes) and it took hours to trace
it back to my workaround and try something else.

So it would be an improvement to remove the code that purports to cope with
other definitions of bool.  And maybe add a comment emphasizing that "bool" is
part of the binary interface between server extensions and the base server.

Bryan Henderson                                   San Jose, California

In response to

pgsql-bugs by date

Next:From: Mason HaleDate: 2010-05-11 21:29:06
Subject: BUG #5459: Unable to cancel query while in send()
Previous:From: Peter EisentrautDate: 2010-05-11 20:15:17
Subject: Re: bool: symbol name collision

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group