[email protected]
[Top] [All Lists]

Re2: [PATCH] AIX BOOL conflict in tdb + largefile issue

Subject: Re2: [PATCH] AIX BOOL conflict in tdb + largefile issue
From: Peter Somogyi
Date: Thu, 21 Sep 2006 12:17:41 +0200
On Thursday 21 September 2006 11:26, Peter Somogyi wrote:
> Hi Stefan,
> On Wednesday 20 September 2006 19:46, Stefan (metze) Metzmacher wrote:
> > we currently define BOOL_DEFINED, _BOOL_EXISTS and
> > __bool_true_false_are_defined in lib/replace/replace.h
> That could also cause problem because on AIX it's also defined
> in /usr/include/stdbool.h. Fortunately (!) it doesn't harm - now.
> See also
> http://www.opengroup.org/onlinepubs/000095399/basedefs/stdbool.h.html
Oops, I've got the source of problem:
- include/include.h includes replace.h
- lib/replace/replace.h includes stdbool.h (if HAVE_STDBOOL_H - autodetect by 
configure script) - and if we have it, we have the conflict with many of 

#ifndef _BOOL
typedef int BOOL;
#define _BOOL       /* So we don't typedef BOOL again in vfs.h */

I suggest removal in replace.h:
#include <stdbool.h>

OR resolve the conflict with capital letter BOOL above.

> However, most likely I'd insert an prefix _SMB_ to each bool marco/typedef
> to avoid future conflicts. (e.g. SMB_BOOL, _SMB_BOOL and so on.)
Sorry, that was a bad idea. (I guess nobody wants to have smbtrue/smbfalse 
values everywhere in the code...)

Peter Somogyi
Gamax Kft
Bartok Bela ut 15/D
H-1114, Budapest, Hungary
e-mail: [email protected]
phone: +36 1 382 5469

<Prev in Thread] Current Thread [Next in Thread>