I an developing a lib for use on an embedded platform. I have code in a header that is part of the lib with
typdef enum bool {false, true} bool;
If the lib user has already defined a type named bool, how can I code this so that my lib does not attempt to re-declare it?
Currently I have used #defines
#ifndef _BOOL
#define _BOOL
typedef enum bool{...
#endif
however this depends on a user that has bool defined also defining _BOOL
Is there a way of checking if types`with specific names already exist?
(Note this is a C Question, not C++, and neither I nor my assumed lib user is using stdbool, Ta)