How to detect reliably Mac OS X, iOS, Linux, Windows in C preprocessor? [duplicate]

This question already has answers here: How do I check OS with a preprocessor directive? (16 answers) Closed 2 years ago. The community reviewed whether to reopen this question 3 months ago and left it closed: Original close reason(s) were not resolved If there’s some cross-platform C/C++ code that should be compiled on Mac OS … Read more