with Ada.Text_IO;
with System; use System;
with Gnatvsn;
procedure GnatPsys is
pragma Ident (Gnatvsn.Gnat_Version_String);
procedure P (Item : String) renames Ada.Text_IO.Put_Line;
begin
P ("package System is");
P ("pragma Pure (System);");
P ("");
P (" type Name is (SYSTEM_NAME_GNAT);");
P (" System_Name : constant Name := SYSTEM_NAME_GNAT;");
P ("");
P (" -- System-Dependent Named Numbers");
P ("");
P (" Min_Int : constant := -(2 **" &
Long_Long_Integer'Image (Long_Long_Integer'Size - 1) & ");");
P (" Max_Int : constant := 2 **" &
Long_Long_Integer'Image (Long_Long_Integer'Size - 1) & " - 1;");
P ("");
P (" Max_Binary_Modulus : constant := 2 **" &
Long_Long_Integer'Image (Long_Long_Integer'Size) & ";");
P (" Max_Nonbinary_Modulus : constant :=" &
Integer'Image (Integer'Last) & ";");
P ("");
P (" Max_Base_Digits : constant :=" &
Natural'Image (Long_Long_Float'Digits) & ";");
P (" Max_Digits : constant :=" &
Natural'Image (Long_Long_Float'Digits) & ";");
P ("");
P (" Max_Mantissa : constant := 63;");
P (" Fine_Delta : constant := 2.0 ** (-Max_Mantissa);");
P ("");
P (" Tick : constant :=" &
Duration'Image (Duration (Standard'Tick)) & ";");
P ("");
P (" -- Storage-related Declarations");
P ("");
P (" type Address is private;");
P (" Null_Address : constant Address;");
P ("");
P (" Storage_Unit : constant :=" &
Natural'Image (Standard'Storage_Unit) & ";");
P (" Word_Size : constant :=" &
Natural'Image (Standard'Word_Size) & ";");
P (" Memory_Size : constant := 2 **" &
Natural'Image (Standard'Address_Size) & ";");
P ("");
P (" -- Address comparison");
P ("");
P (" function ""<"" (Left, Right : Address) return Boolean;");
P (" function ""<="" (Left, Right : Address) return Boolean;");
P (" function "">"" (Left, Right : Address) return Boolean;");
P (" function "">="" (Left, Right : Address) return Boolean;");
P (" function ""="" (Left, Right : Address) return Boolean;");
P ("");
P (" pragma Import (Intrinsic, ""<""); ");
P (" pragma Import (Intrinsic, ""<="");");
P (" pragma Import (Intrinsic, "">""); ");
P (" pragma Import (Intrinsic, "">="");");
P (" pragma Import (Intrinsic, ""=""); ");
P ("");
P (" -- Other System-Dependent Declarations");
P ("");
P (" type Bit_Order is (High_Order_First, Low_Order_First);");
P (" Default_Bit_Order : constant Bit_Order;");
P ("");
P (" -- Priority-related Declarations (RM D.1)");
P ("");
P (" subtype Any_Priority is Integer range 0 .." &
Natural'Image (Standard'Max_Interrupt_Priority) & ";");
P ("");
P (" subtype Priority is Any_Priority range 0 .." &
Natural'Image (Standard'Max_Priority) & ";");
P ("");
P (" subtype Interrupt_Priority is Any_Priority range" &
Natural'Image (Standard'Max_Priority + 1) & " .." &
Natural'Image (Standard'Max_Interrupt_Priority) & ";");
P ("");
P (" Default_Priority : constant Priority :=" &
Natural'Image ((Priority'First + Priority'Last) / 2) & ";");
P ("");
P ("private");
P ("");
P (" type Address is mod Memory_Size; ");
P (" Null_Address : constant Address := 0; ");
P (" ");
P (" Default_Bit_Order : constant Bit_Order := " &
Bit_Order'Image (Bit_Order'Val (Standard'Default_Bit_Order)) & ";");
P ("");
P ("end System;");
end GnatPsys;