Let's say I have this:
Is there any way to define INVALID_SEM in the second case? I've been trying to find info on that but all the search engines think I'm looking for is sem_init which is intended to be used during runtime, not compile time.Code:#ifdef _WIN32 typedef HANDLE sem; #define INVALID SEM NULL ... #else typedef sem_t sem; #define INVALID_SEM ... ... #endif sem global_sem = INVALID_SEM; int main(...) { ... }