News for hackers. Stuff that matters.
Re:Brian's Rules for Writing Cross Platform 'C' Code (2008) by to3m on Saturday June 14, 2014 @04:03PM (#7893545)
_WIN32 used to be defined for Xbox - it probably still is for Xbox360 and XboxOne too... - as well as Win32/Win64. All very different systems. Cue hilarity!

You really, truly are best off making your own defines. (If you absolutely don't want to specify them in the build setup, you can usually autodetect many of your own defines by checking for _WIN32 and _M_IX86 and _MSC_VER and __GNUG__ and so on. Then there's at least only one place to get the logic wrong.)

There are no comments on this comment yet.