News for hackers. Stuff that matters.
Re:How to write cross-platform code by adolgert on Friday October 22, 2010 @11:50AM (#1820098)
An #ifdef _WIN32 is a platform ifdef. Especially to cross-compile Unix flavors, it can help to use capability ifdefs, such as #ifdef HAVE_VSNPRINTF. This approach replaces if-then-else logic on platforms in the source with tests in the configure (or CMake) script.

Nice article. Is the GoF Abstract Factory pattern not popular for #5, "developing cross-platform base libraries?"

There are no comments on this comment yet.