Primos portability report

Richard Harter g-rh at cca.CCA.COM
Sat Feb 20 22:08:54 AEST 1988


In article <7048 at oberon.USC.EDU> blarson at skat.usc.edu (Bob Larson) writes:
>
>>Also, as far as I know, C programs should be compiled using the -oldfortran
>>option.
>
>Huh what?  Always use -newfortran or -32ix unless you have code
>specificly writen for the old meathod of calling "fortran" (other
>language) procedures.  (If you do have such code, I recomend fixing
>it.) -32ix is a big win in some cases.

	I don't have all that much information.  However the genesis of
the remark is this.  We have a ~40,000 line program which we maintain
across several operating systems (primos, vms, flavors of unix).  The
original development environment is UNIX; ports are done to the other
operating systems.  About once a year we do a major port from unix to
primos.  When we did a port in late 1986 we hit the need for -oldfortran.

	The problem is not (on the surface) a problem with calls to other
language procedures, since these are not used.  However we do use a
minimum set of library routines (read, write, open, access, fopen,
fprint, close, fclose, malloc, free).  My understanding is that the 
library routines conceal calls to system utilities.  The problem may
involve passing literals as arguments (I am told that there was a problem
with this at one time.)

	In any case, the effect was that the program got confused about
returning from routines and produced the usual infinitely helpful primos
error messages.  All problems went away when we recompiled everything
with the -oldfortran option.  Mind you, this is not a straightforward
matter of fixing code -- everything is lint free and all calls to system
utilities appear to follow the manual.  It may be that there was a problem
with the C run time library that is now fixed.  However our situation is
that -oldfortan works; -newfortran didn't work a year ago; and there is
no obvious reason why.  We haven't checked to see if the problem is still
there.
-- 

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