Mail Archives: djgpp/1998/06/29/10:06:45
On Mon, 29 Jun 1998, stdenis wrote:
> > In this particular example, yes. But ``portability'' isn't limited to
> > ANSI-compliant systems.
>
> Well I am really only concerned with portability among GNU C systems (systems
> that can run GNU C).
The concerns which Nate was expressing still apply. You cannot write a
useful, non-toy program with only ANSI C functionality. You *must* use
library functions and OS features which are outside ANSI. Even Posix is
not always enough to write any given program.
When that happens, you need a way to write the non-ANSI code so that it
works on every supported platform. In general, it's a very hard job.
Try looking at the sources of any GNU package, and you will see why.
Even if you consider only compatibility between DOS/Windows (i.e. DJGPP)
and Unix, there are a lot of issues to take care of. This could be a
subject of a large book (hmmm... there's a thought! ;-). Some examples:
- text vs. binary I/O
- file name format (multiple root directories, drive letters etc.)
- the way subsidiary programs are invoked
...and so on and so on--even the list is so long it cannot be posted
here.
- Raw text -