tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
stdbool.h #define bool _Bool
hi folks,
while building an updated Mono, I came across a familiar issue:
icall.c:9175:35: error: ‘ICALL_SIG_TYPE__Bool’ undeclared here (not in a function); did you mean ‘ICALL_SIG_TYPE_bool’?
#define ICALL_SIG_TYPES_1(a) ICALL_SIG_TYPE_ ## a,
I've had this issue before with macros, but in this case, the macro is
mandated by the C standard, so there's no escaping it.
A reduced version of it is:
#include <stdbool.h>
#define function(name, type) int name##_##type() { return 3; }
#define useless_wrapper(name, type) function(name, type)
useless_wrapper(something, bool)
int main() {
return something_bool();
}
-----
In this case, Mono doesn't include stdbool.h, it's side-loaded for us.
I can avoid the issue with a hack #undef bool, but I'd like to see a
future where Mono works unmodified on unmodified NetBSD, without the use
of hacks.
I'm thinking of the following solution: avoid directly including
stdbool.h in any regular userland headers, and having headers use
_Bool as a type.
I needed to change net/if.h, net/route.h and sys/psref.h.
Thoughts?
Home |
Main Index |
Thread Index |
Old Index