From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,f890526de6a8a218 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!atl-c05.usenetserver.com!news.usenetserver.com!newsfeed.telusplanet.net!newsfeed.telus.net!clgrps13.POSTED!023a3d7c!not-for-mail Sender: blaak@METROID Newsgroups: comp.lang.ada Subject: Re: How to detect OS type and version? References: <20051013115001.60b6a695@pscube.informatik.uni-stuttgart.de> <4352B2D5.3060701@obry.net> From: Ray Blaak Organization: The Transcend Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 18 Oct 2005 16:58:45 GMT NNTP-Posting-Host: 66.119.186.132 X-Trace: clgrps13 1129654725 66.119.186.132 (Tue, 18 Oct 2005 10:58:45 MDT) NNTP-Posting-Date: Tue, 18 Oct 2005 10:58:45 MDT Xref: g2news1.google.com comp.lang.ada:5776 Date: 2005-10-18T16:58:45+00:00 List-Id: Pascal Obry writes: > Agreed, all this is a configuration management problem. It is far better > in my view to have some kind of script that configure the software > before compilation. This script will check the OS for example and use > the proper bodies for some of the OS specific packages. This is exactly > was the ./configure & make does on most software. I think it is wrong to > try doing that with the language itself. As pointed out there it can > work in some very simple case but it won't generally. In languages like Ada that tend to need to be separately compiled for the target OS, this is reasonable. In languages that can portably run "anywhere", like Java in particular, some sort of runtime query is needed, since the code is built once but executed in multiple environments. And then there is the case of ports of Ada to the JVM, so that Ada apps can in fact run in multiple environments as well. -- Cheers, The Rhythm is around me, The Rhythm has control. Ray Blaak The Rhythm is inside me, rAYblaaK@STRIPCAPStelus.net The Rhythm has my soul.