BOOL vs. bool [was Re: svn commit: samba r25126]

Jelmer Vernooij jelmer at samba.org
Thu Sep 13 15:37:25 GMT 2007


Am Donnerstag, den 13.09.2007, 10:11 -0500 schrieb Gerald (Jerry)
Carter:
> metze at samba.org wrote:
> > Author: metze
> > Date: 2007-09-13 12:27:10 +0000 (Thu, 13 Sep 2007)
> > New Revision: 25126
> > 
> > WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=25126
> > 
> > Log:
> > create prototypes for 'bool ' functions
> Does anyone else think we need to simply consolidate on
> either BOOL or bool ?  Same for uint[8|16|32][_t] ?
> And document the convention in the README.Coding?
It'd be nice if Samba 3 could also start using bool, false and true for
new code (not much point in converting everything at once imho).

bool is C99 (<stdbool.h>) and will be defined by libreplace if not
defined by the host system. Some compilers may have specific
optimizations for it. Samba's use of BOOL predates the standardization
of 'bool', but I don't see a reason to not start using the standardized
type now that it's there. 

Same goes for uint\d_t, which are defined in stdint.h as of C99 and for
which libreplace will also provided replacements if necessary.

Cheers,

Jelmer

-- 
Jelmer Vernooij <jelmer at samba.org> - http://samba.org/~jelmer/
Jabber: jelmer at jabber.fsfe.org


More information about the samba-technical mailing list