Portability / C Language Implementation
Doug Gwyn
gwyn at smoke.brl.mil
Sun Mar 17 08:24:30 AEST 1991
In article <12375 at pt.cs.cmu.edu> hjelm at g.gp.cs.cmu.edu (Mark Hjelm) writes:
>I should clarify: I am well aware of what the Ansi standard says
>about portable programs. As an implementor of tools supporting
>heterogeneous distributed computing, I am interested in specific
>machines that have (or could have) "interesting" C implementations. I
>would like to produce a list of such machines so that I can plan ahead
>in my implementation-level code and recognize the machines when I hear
>their name.
Essentially ALL present-day computer systems are capable of supporting
conforming implementations of C. Rather than trying to catalog lists
of specific system names, which would become quickly obsolete anyway,
you're much better off having the code automatically adjust to the
particular environment by reacting to properties of the environment.
For example, the MUVES "Dx" package supports data interchange between
heterogeneous architectures, but it automatically configures itself
(a) at compile time, using preprocessor arithmetic tests, and (b) at
run time, by exchanging test data between the systems when a connection
is established. Method (a) can in theory be problematic, but in
practice is a fairly reliable method of determining certain properties
of the host architecture. Method (b) is foolproof if you code it
carefully.
More information about the Comp.lang.c
mailing list