I wonder why on MacOSX the macro __unix__
is not defined.
Isn't MacOSX a BSD UNIX derivative?
If I define the __unix__
macro in my code, could I have some issues?
In general, when checking the current platform, I prefer to do something like:
#ifdef __unix__
...
#endif
instead of:
#if defined(__unix__) || defined(__APPLE__) || defined(__linux__) || defined(BSD) ...
...
#endif
Could the best option be to define my own macro in a single place? E.g.:
#if defined(__unix__) || defined(__APPLE__) || defined(__linux__) || defined(BSD) ...
#define UNIX_
#endif