derstad@CIM-VAX.HONEYWELL.COM ("DAVE ERSTAD") (08/25/89)
Anyone know a convenient way to test at run time whether one is at SR9.7 or SR10? I need to do this in both Pascal and C. Dave Erstad Principal Design Automation Engineer Honeywell SSEC DERSTAD@cim-vax.honeywell.com
derstad@CIM-VAX.HONEYWELL.COM ("DAVE ERSTAD") (08/26/89)
> Under SR9.7 if you created a file with > the name_$ calls with the name "FOOBAR" > and then tried to read back the name using > the name_$xxx_cc (case correct) calls you > should get "foobar", I think. Testing name > case sensitivity would be the easiest way > I can think of. If the DOWNCASE environment variable is set to FALSE at SR9, this will give an incorrect answer. However, the same person who pointed that out to me also made a related suggestion: Just try creating a file whose leaf is greater than 32 characters. The following function seems to work, for those interested: function sr10 : boolean; %include '/sys/ins/base.ins.pas'; %include '/sys/ins/name.ins.pas'; const file_name = '/tmp/foobarfoobarfoobarfoobarfoobarfoobar'; var is_sr10, is_sr9 : boolean; status : status_$t; begin name_$create_file(file_name, sizeof(file_name), status); is_sr10 := status.all = status_$ok; is_sr9 := status.all = name_$bad_leaf; if not (is_sr10 or is_sr9) then writeln('Abnormal status from SR10 detection function: ', status.modc:8, status.code:8); { cleanup } name_$delete_file(file_name, sizeof(file_name), status); sr10 := is_sr10; end; Dave Erstad Principal Design Automation Engineer Honeywell SSEC DERSTAD@cim-vax.honeywell.com
sasdvp@sas.UUCP (David V. Phillips) (08/30/89)
In article <8908251417.AA05060@umix.cc.umich.edu> derstad@CIM-VAX.HONEYWELL.COM ("DAVE ERSTAD") writes: > >Anyone know a convenient way to test at run time whether one is at >SR9.7 or SR10? I need to do this in both Pascal and C. We're using a subroutine that pgm$invokes /com/sh /com/bldt, then figures out what system was listed in the output. Icky, but it works. Dave