Quoting Craig Bradney <cbradney@...242...>:
On a side note re the #ifdefs, how do you handle platform or OS specific code? Makefiles that include or exclude particular versions? Some very specific ifdefs? or isnt anything required?
The platonic ideal (which we don't necessarily achieve) is:
1. write as little platform-specific code as possible
2. agressively use portable library facilities in favor of rolling our own stuff
3. hide the rest behind OS-neutral interfaces (e.g. tables of function pointers or abstract base classes) which won't require #ifdefs in client code
4. make things configurable at run-time, not compile-time
5. do the rest (e.g. calling chosen initialization functions, or extracting data from certain fields) with extremely specific #ifdefs (one or two lines of code each)
-mental