system detection

  1. Bill Evans at Mariposa

    C detecting that I'm compiling for FreeBSD

    If, say, I'm compiling with gcc under Linux, a section of code will compile if it looks like this: #if __linux__ /* your ad here */ #endif How do I do such conditional compilation for FreeBSD (other than inverting the __linux__ test)? I'm hoping the answer would apply equally to clang and gcc...
Back
Top