Sender: nate AT cartsys DOT com Message-ID: <35971A4C.9F4F0343@cartsys.com> Date: Sun, 28 Jun 1998 21:38:36 -0700 From: Nate Eldredge MIME-Version: 1.0 To: stdenis CC: djgpp AT delorie DOT com Subject: Re: portable code References: <35966659 DOT 4760AC58 AT compmore DOT net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Precedence: bulk stdenis wrote: > > What is the safest way to make portable code? > > Would this be ok? > > -pendatic -ansi -Wall > > (also is it -Wall or -wall)? -ansi -pedantic (note spelling) -Wall (yes, the W is capital). -W may help also, or it may just give annoying warnings about code that's perfectly fine. -pedantic may or may not be useful, as well. However, it's been my experience that the real portability problems are not in the language (which these try to catch), but in the library. E.g. some systems return different values from `sprintf', the flags for `access' are sometimes missing, etc, etc. This there currently isn't much you can do about automatically, but there's a project in the works to include some info on portability in the DJGPP docs. -- Nate Eldredge nate AT cartsys DOT com