Yes, and also no.muazzam wrote:I think porting software on a unix like os is easy. Is it true?
In principle, all you need to do is implement the applicable standard and then cross-port the software. This isn't that easy, it's a significant amount of work to get this far. However, after you get this far, you get to deal with ports that pull all sorts of crap. The majority of the time I spend porting software isn't actually spent teaching the software what my OS is, but actually spent fixing stupid things that break on my OS. For instance, I aggressively deprecate and remove undesirable system interfaces (like gets(3), but also much more) and this causes ports to break. Other times, the ports just break on their own because they make non-portable assumptions. Sometimes they don't cross-compile properly and pull in stuff from the Linux environment. Sometimes they just do extremely stupid stuff. Sometimes the ports try to be portable but the portability layer causes even more trouble.
Implementing the Unix semantics merely make porting possible, it doesn't make it straightforward unless the software is well made, and unfortunately a lot of it isn't well made. I explicitly make design choices so stupid stuff breaks on my OS, this makes it likely that I discover any stupid stuff they do.
Porting is good if you want to port, not if you want maximum quality.