Originally Posted by
cyberfish
Unless you are doing very platform-specific stuff, it's usually sufficient to just support 2 categories - Windows and the "rest of the world", since Mac/Linux/Unix/BSD/Solaris... all behave similarly. Windows just likes to be different - case insensitivity, forward slashes, multi-root (whatever the proper name is), strange headers..., so we make a special case for it.
For the rare instances where a function is defined on a platform but not on another (or defined differently), I would just make a wrapper function for it, and hide all the nasty platform-detection stuff inside.