------------------------------------------------------------------------ -- These package specifications were extracted from IEEE Std 1003.5-1992, -- IEEE Standard for Information Technology--POSIX Ada Language -- Interfaces--Part 1: Binding System Application Program Interface, -- copyright (c)1992 by the Institute of Electrical and Electronics -- Engineers, Inc. These package specifications represent only a portion -- of the document and are not to be interpreteted as the approved -- consensus standard. The IEEE Std 1003.5-1992 must be used in -- conjunction with these package specifications in order to claim -- conformance. The IEEE takes no responsibility for and will assume no -- liability for damages resulting from the reader's misinpretation of -- said information resulting from its out of context nature. To order -- copies of the IEEE Std 1003.5-1992, please contact the IEEE Service -- Center at 445 Hoes Lane, PO Box 1331, Piscataway, NJ 08855-1331; via -- phone at 1-800-678-IEEE, 908-981-1393; or via fax at 908-981-9667. ------------------------------------------------------------------------ package POSIX is -- Symbolic subtypes and constants -- Optional Facilities subtype Job_Control_Support is Boolean range @P .. @P; subtype Saved_IDs_Support is Boolean range @P .. @P; subtype Change_Owner_Restriction is Boolean range @P .. @P; subtype Filename_Truncation is Boolean range @P .. @P; System_POSIX_Version : constant := 1990_09; POSIX_Ada_Version : constant := @P; -- I/O Count type IO_Count is @P range 0..@P; subtype IO_Count_Maxima is IO_Count range 32767..IO_Count'Last; -- System Limits Portable_Groups_Maximum : constant Natural := 0; subtype Groups_Maxima is Natural range @P .. @P; Portable_Argument_List_Maximum : constant Natural := 4096; subtype Argument_List_Maxima is Natural range @P .. @P; Portable_Child_Processes_Maximum : constant Natural := 6; subtype Child_Processes_Maxima is Natural range @P .. @P; Portable_Open_Files_Maximum : constant Natural := 16; subtype Open_Files_Maxima is Natural range @P .. @P; Portable_Stream_Maximum : constant Natural := 8; subtype Stream_Maxima is Natural range @P .. @P; Portable_Time_Zone_String_Maximum : constant Natural := 3; subtype Time_Zone_String_Maxima is Natural range @P .. @P; -- Pathname Variable Values Portable_Link_Limit_Maximum : constant Natural := 8; subtype Link_Limit_Maxima is Natural range @P .. @P; Portable_Input_Line_Limit_Maximum : constant IO_Count := 255; subtype Input_Line_Limit_Maxima is IO_Count range @P .. @P; Portable_Input_Queue_Limit_Maximum : constant IO_Count := 255; subtype Input_Queue_Limit_Maxima is IO_Count range @P .. @P; Portable_Filename_Limit_Maximum : constant Natural := 14; subtype Filename_Limit_Maxima is Natural range @P .. @P; Portable_Pathname_Limit_Maximum : constant Natural := 255; subtype Pathname_Limit_Maxima is Natural range @P .. @P; Portable_Pipe_Limit_Maximum : constant IO_Count := 512; subtype Pipe_Limit_Maxima is IO_Count range @P .. @P; -- Blocking Behavior Values type Blocking_Behavior is (Tasks, Program); subtype Text_IO_Blocking_Behavior is Blocking_Behavior range @P .. @P; IO_Blocking_Behavior : constant Blocking_Behavior := @P; File_Lock_Blocking_Behavior : constant Blocking_Behavior := @P; Wait_For_Child_Blocking_Behavior : constant Blocking_Behavior := @P; -- Signal Masking type Signal_Masking is (No_Signals, RTS_Signals, All_Signals); -- Characters and Strings type POSIX_Character is ( -- ' ','0','1','2','3','4','5','6','7','8','9', -- 'A','B','C','D','E','F','G','H','I','J','K','L','M', -- 'N','O','P','Q','R','S','T','U','V','W','X','Y','Z', -- 'a','b','c','d','e','f','g','h','i','j','k','l','m', -- 'n','o','p','q','r','s','t','u','v','w','x','y','z', -- '.','_','-','/','"', '#', '&', ''', '(', ')', -- '*', '+', ',', ':', ';', '<', '=', '>', '|' @P); type POSIX_String is array (Positive range <>) of POSIX_Character; function To_POSIX_String (Str : string) return POSIX_String; function To_String (Str : POSIX_String) return string; subtype Filename is POSIX_String; subtype Pathname is POSIX_String; function Is_Filename (Str : POSIX_String) return Boolean; function Is_Pathname (Str : POSIX_String) return Boolean; function Is_Portable_Filename (Str : POSIX_String) return Boolean; function Is_Portable_Pathname (Str : POSIX_String) return Boolean; -- String Lists type POSIX_String_List is limited private; Empty_String_List : constant POSIX_String_List; procedure Make_Empty (List : in out POSIX_String_List); procedure Append (List : in out POSIX_String_List; Str : in POSIX_String); generic with procedure Action (Item : in POSIX_String; Quit : in out Boolean); procedure For_Every_Item (List : in POSIX_String_List); function Length (List : POSIX_String_List) return Natural; function Value (List : POSIX_String_List; Index : Positive) return POSIX_String; -- option sets type Option_Set is private; function Empty_Set return Option_Set; function "+" (L, R : Option_Set) return Option_Set; function "-" (L, R : Option_Set) return Option_Set; -- Exceptions and error codes POSIX_Error: exception; type Error_Code is @P; function Get_Error_Code return Error_Code; procedure Set_Error_Code (Error: in Error_Code); function Is_POSIX_Error (Error: Error_Code) return Boolean; function Image (Error: Error_Code) return String; No_Error : constant Error_Code := 0; Argument_List_Too_Long : constant Error_Code := @P; Bad_File_Descriptor : constant Error_Code := @P; Broken_Pipe : constant Error_Code := @P; Directory_Not_Empty : constant Error_Code := @P; Exec_Format_Error : constant Error_Code := @P; File_Exists : constant Error_Code := @P; File_Too_Large : constant Error_Code := @P; Filename_Too_Long : constant Error_Code := @P; Improper_Link : constant Error_Code := @P; Inappropriate_IO_Control_Operation: constant Error_Code := @P; Input_Output_Error : constant Error_Code := @P; Interrupted_Operation : constant Error_Code := @P Invalid_Argument : constant Error_Code := @P; Invalid_Seek : constant Error_Code := @P; Is_A_Directory : constant Error_Code := @P; No_Child_Process : constant Error_Code := @P; No_Locks_Available : constant Error_Code := @P; No_Space_Left_On_Device : constant Error_Code := @P; No_Such_Operation_On_Device : constant Error_Code := @P; No_Such_Device_Or_Address : constant Error_Code := @P; No_Such_File_Or_Directory : constant Error_Code := @P No_Such_Process : constant Error_Code := @P; Not_A_Directory : constant Error_Code := @P; Not_Enough_Space : constant Error_Code := @P; Operation_Not_Implemented : constant Error_Code := @P; Operation_Not_Permitted : constant Error_Code := @P; Permission_Denied : constant Error_Code := @P; Read_Only_File_System : constant Error_Code := @P; Resource_Busy : constant Error_Code := @P; Resource_Deadlock_Avoided : constant Error_Code := @P; Resource_Temporarily_Unavailable : constant Error_Code := @P; Too_Many_Links : constant Error_Code := @P; Too_Many_Open_Files : constant Error_Code := @P; Too_Many_Open_Files_In_System: constant Error_Code := @P; -- System Identification function System_Name return POSIX_String; function Node_Name return POSIX_String; function Release return POSIX_String; function Version return POSIX_String; function Machine return POSIX_String; private type POSIX_String_List is @P; Empty_String_List : constant POSIX_String_List := @P; type Option_Set is @P; end POSIX;