www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/06/29/05:27:39

Sender: nate AT cartsys DOT com
Message-ID: <35971A4C.9F4F0343@cartsys.com>
Date: Sun, 28 Jun 1998 21:38:36 -0700
From: Nate Eldredge <nate AT cartsys DOT com>
MIME-Version: 1.0
To: stdenis <stdenis AT compmore DOT net>
CC: djgpp AT delorie DOT com
Subject: Re: portable code
References: <35966659 DOT 4760AC58 AT compmore DOT net>

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


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019