Path: utzoo!attcan!utgpu!news-server.csri.toronto.edu!mailrus!sharkey!sevihc!reso From: sevihc!reso@sharkey.cc.umich.edu (Dennis Reso) Newsgroups: comp.lang.c Subject: C portability Message-ID: <1990Aug8.030538.16906@sevihc.UUCP@sharkey.cc.umich.edu> Date: 8 Aug 90 03:05:38 GMT Distribution: usa Organization: Total Lack Thereof Lines: 29 Where I currently work, we have a lot of FORTRAN programmers and are beginning to use C in several areas only because FORTRAN just *can't* do what we need. The problem is, we need to specify a set of recommendations and checkers to make sure (as best as we can) that code remains portable to several (SYSV, BSD, PrimeOS) machines. We currently have a checker for the FORTRAN, but my experience with C indicates that we are much better off educating programmers rather than spending a lot of time second-guessing and correcting them. Therefore I decided to tap into the collective net-wisdom concerning: 1. Defensive programming. Are there books available which discuss, in depth, programming practices that result in the most machine-portable code? 2. Lint as a portability checker. Is there a description of what lint is supposed to do, for example sufficient to write your own if a machine has none. (Not that we're planning on it, but Prime has no lint and it would be nice to know that there is some kind of "standard" regarding lint). Since it seems to be integrated with the compiler and libraries, how machine-specific are lint runs on the same code/different machines likely to be? ________________________________________________________________________ Dennis Reso sevihc!reso@sharkey.cc.umich.edu Sterling Hieghts, MI USA {sharkey|itivax}!sevihc!reso Ford Motor Company, Dearborn pms415!reso@fmsrl7.srl.ford.com