Undefined platform #1329
-
Trying following code to determine the platform an application is run on to handle different paths to libraries:
However, this always returns the determined platform as error. In gcc this compiles even without the else branch and properly determines the platform. Is this not supported or what am I missing? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Those are checks you need to make at runtime with functions like (making such checks at compile time would not be possible by definition since the platform Cosmopolitan runs on is determined at runtime) |
Beta Was this translation helpful? Give feedback.
Those are checks you need to make at runtime with functions like
IsWindows
/IsLinux
/IsXnu
/IsBsd
/IsAarch64
/IsFreebsd
/IsOpenbsd
/IsNetBsd
/IsMetal
/etc.(making such checks at compile time would not be possible by definition since the platform Cosmopolitan runs on is determined at runtime)