Writing Portable Unix Software

Guides to writing portable Unix software

        Various resources for writing optimally portable Unix software. If you can't find what you are looking for, drop us a note and we will do our best to help you out.

General coding standards

        Nothing enhances portability more than code that other programmers can read and work with! An outstanding guide in this area is the Indian Hill Recommended C Style and Coding Standards. Also highly recommended are the classic Notes on Writing Portable Programs in C, and the GNU document GNU Coding Standards, which suggests conventions for error messages, command line interfaces, consistent APIs, etc.

Other portability guides

        The Well-Tempered Unix Application is, according to the author, an "attempt to spell out some general principles that Unix application developers should consider in order to make the products of their work portable, easy to install and maintain, and flexible". Sounds good to us!

        The Ergonomics of Software Porting (a.k.a. Enquire, a.k.a. "Everything you wanted to know about your C compiler, but didn't know who to ask") can be revealing if you are running into compiler-specific problems.

        The definitive guide to writing portable Perl code is available, as is the FreeBSD guide to writing portable assembler code(!). Another site we recommend is the online book for Autoconf, Automake and Libtool, three packages for making your software more portable and easier to build when moving to new systems.

64-bit porting issues

        Intel provides many guides to developing software for the Itanium architecture. Other related IA-64 porting documents are available at Intel's Itanium site.

        Also in the IA-64 realm, Hewlett-Packard provides a number of porting documents and tools in their software transition kits.