Mail Archives: djgpp/1998/06/29/05:27:39
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 -