Hostname: Difference between revisions

Line 6:
Works with GCC/GNAT
<pre>
with GNAT.Sockets;
Name : constant string := GNAT.Sockets.Host_Name);
--------
 
with GNAT.Sockets
with Ada.Strings.Unbounded;use Ada.Strings.Unbounded;
Name : Unbounded_String;
Name := TO_Unbounded(GNAT.Sockets.Host_Name);
---------
 
with GNAT.Sockets
Name : Access String;
Name := new String'(GNAT.Sockets.Host_Name);
Anonymous user