[comp.lang.ada] host OS signature available thru text_io?

CONTR47@NOSC-TECR.ARPA (05/13/88)

We aspire to build a piece of Ada software
that will be portable across VMS, Unix and DOS.
Is there a way to determine the host OS through text_io?
SYSTEM.SYSTEM_NAME seems to be peculiar to the
compiler and we want to be able to use any
validated compiler so I conclude the package system
isn't of any help.
  Any other ideas on getting a host os signature?
(with a smile; Ada was designed for portability so I'm
sure there is a way) Thanks in advance.
regards, sam harbaugh
---------------------

leake@cme-durer.ARPA (Stephe Leake) (05/17/88)

In article <8805131445.AA23183@oldajpo.sei.cmu.edu> sam harbaugh writes:

>   We aspire to build a piece of Ada software
>   that will be portable across VMS, Unix and DOS.
>   Is there a way to determine the host OS through text_io?
>   SYSTEM.SYSTEM_NAME seems to be peculiar to the
>   compiler and we want to be able to use any
>   validated compiler so I conclude the package system
>   isn't of any help.
>	 Any other ideas on getting a host os signature?
   regards, sam harbaugh
   ---------------------

Perhaps you could try opening a file, using OS-specific file syntax,
and then whichever doesn't raise NAME_ERROR or USE_ERROR is the
correct one. (I haven't tried this yet).
-- 
NAME:   Stephe Leake                    TELE: (301) 975-3431
USMAIL: National Bureau of Standards    ARPA: leake@cme-durer.arpa
        Rm. B-124, Bldg. 220            UUCP: uunet!cme-durer!leake
        Gaithersburg, MD  20899