lib/replace: Do not typedef int bool
authorAndrew Bartlett <abartlet@samba.org>
Tue, 22 Mar 2022 03:12:00 +0000 (16:12 +1300)
committerAndreas Schneider <asn@cryptomilk.org>
Wed, 23 Mar 2022 12:31:47 +0000 (12:31 +0000)
commitc0f5af21acb8018a5e53d25f1560d2a96b79a7c0
treec86ad31da026e30d83687c0251f125c4d5d89502
parent1bde388ba854e320a390126155c7aeb60ecfbb90
lib/replace: Do not typedef int bool

We need a genuine boolean type, as otherwise expressions like

bool foo = (4 & 4);
if (foo == true) {
exit(1);
} else {
exit(2);
}

could evaluate differently on non-modern platforms, and
that would be a real pain to debug.

_Bool and bool are in C99

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15028

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Mar 23 12:31:47 UTC 2022 on sn-devel-184
examples/perfcounter/perf.h
lib/replace/replace.h
lib/replace/wscript