comp.lang.ada
 help / color / mirror / Atom feed
From: Lucretia <laguest9000@googlemail.com>
Subject: Re: How to find the type of operating system.
Date: Thu, 7 Apr 2016 04:20:49 -0700 (PDT)
Date: 2016-04-07T04:20:49-07:00	[thread overview]
Message-ID: <1be0537a-7ab3-416f-80e6-fc6ee4dfcdc6@googlegroups.com> (raw)
In-Reply-To: <57053167$0$4216$e4fe514c@news.kpn.nl>

On Wednesday, 6 April 2016 16:55:51 UTC+1, ldries46  wrote:
> How can I fin in which operating system a program runs and other details of 
> that operating system.

You know what OS you're compiling on, so define a variable in GPR OS and set it on compile. During compile, set the source dirs to include an os specific one and in there put a package which defines the OS:

package OS is
   type OSes is (Linux, Windows, MacOS, iOS, etc.);

   This : OSes := Linux; --  For the linux/os.ads file.
end OS;


  parent reply	other threads:[~2016-04-07 11:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-06 15:55 How to find the type of operating system ldries46
2016-04-06 21:41 ` Randy Brukardt
2016-04-06 22:42   ` Anh Vo
2016-04-07  6:45     ` Simon Wright
2016-04-07  7:31       ` Randy Brukardt
2016-04-07 16:33         ` Jeffrey R. Carter
2016-04-07 11:20 ` Lucretia [this message]
2016-06-24 21:12   ` Victor Porton
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox