From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Date: 15 Sep 93 14:02:35 GMT From: emery@mitre-bedford.arpa (David Emery) Subject: Re: Pragma's for Ada ???? Message-ID: List-Id: System.System_Name is NOT the same as host ID. For instance, System.System_Name on my Sparc is "sun_4_unix", and the host_id is 55433bc7. System.System_Name is generally the 'architecture' or computer name, while Hostid is a per-machine unique identifier (sort of a serial number.) On a Sun/Sparc, the following should do the trick: function hostid return string is type C_int is new integer; -- assuming Standard.integer is the same as C's int. function gethostid return C_int; pragma interface (C, gethostid); id : C_int; begin id := gethostid; return c_int'image(id); end hostid; Here's the man page entry for gethostid from Sun/SPARC: NAME gethostid - get unique identifier of current host SYNOPSIS gethostid() DESCRIPTION gethostid() returns the 32-bit identifier for the current host, which should be unique across all hosts. On a Sun workstation, this number is taken from the CPU board's ID PROM. SEE ALSO hostid(1)