Machines for testing portability (was Re: "Numerical Recipes in C" is nonportable code)

Richard Harter g-rh at cca.CCA.COM
Thu Sep 1 17:46:46 AEST 1988


In article <795 at ns.UUCP> ddb at ns.UUCP (David Dyer-Bennet) writes:

>  Also, while I haven't tried it personally, I remember a LONG string of
>articles years ago in some group with the subject "Porting to PRIME seen
>as a probable negative experience"; I seem to remember it has to do with
>different types of pointers being of different sizes, none of which would
>fit in in an int.

	This is somewhat of a bum rap.  Prime C at one time had 48 bit
char pointers versus 32 bit word pointers.  Currently all pointers are
48 bits.  This makes for problems for people who blithely stuff pointers
into ints.  But it really isn't a problem for people who port from UNIX
to PRIMOS who run their code through lint (and act on the results).

	Primos C does have some oddities.  They set the high bit on in
ascii chars.  Setting a file pointer to stdin or stdout has to be done
at the top level.  Library routines sometimes have different calling
sequences.  There is a 128K limit on array sizes (machine architecture).
But it really isn't all that bad; I've never seen the C compiler break
on standard portable C which is more than I can say for VMS C.

-- 

In the fields of Hell where the grass grows high
Are the graves of dreams allowed to die.
	Richard Harter, SMDS  Inc.



More information about the Comp.lang.c mailing list