Security, cost-savings, performance and innovation are the primary reasons to move to Linux, says Novell Linux developer evangelist Darren R. Davis, stating what is to him the obvious. Rather than dillydallying with that question, he'd rather help IT shops and developers get moving to Linux. Davis explains how to port Unix and Windows applications to Linux and how to make those Linux apps support multiple distributions in this interview.

Write your code to ONLY use call that are supported on ALL the platforms you want to run on.
wrt Windows, install Services for Unix as their posix interface seems to have gone from their default install.
I do this all the time in C. 98% of my code runs unaltered on Windows, Solaris, Linux & VMS. I expect other platforms would be not a great problem to port to.

The big problems lie in the area of the GUI. Pretty well, the only language that has this ability on different platforms is JAVA even though its performance sucks when using Swing or SWT as your GUI interface..

My starting point with any S/W development is to think outside the box that it is initially aimed at and in all cases, try to write the application in a way that it can be ported to several different platforms without difficulty.
thats my 0.2rbl take on the subject.