Conclusion - Simple rules


1. Don't clutter main code paths

2. Don't nest preprocessor

3. Pick the best possible API, even if it isn't universally supported

4. Replace missing or broken functions in a separate library

5. Wherever possible, use a maintained replacement (e.g. libc)

6. When a simple replacement isn't sufficient to code with variance between systems, abstract back to a superset of their functionality

7. Be alert for subtle platform differences, especially in privileged areas

