16

If I want to know if I'm compiling on Cygwin, what is the standard macro to check for?

I've seen #ifdef _WIN32, but this doesn't seem future-proof or Cygwin specific.

Brian Tompsett - 汤莱恩
  • 5,438
  • 68
  • 55
  • 126
OregonTrail
  • 7,916
  • 6
  • 38
  • 56

1 Answers1

23

Seems like #ifdef __CYGWIN__ works.

Found it on this list

OregonTrail
  • 7,916
  • 6
  • 38
  • 56