------------------------------------------------------------------------------ -- -- -- POSIX ADA LANGUAGE INTERFACES COMPONENTS -- -- -- -- P O S I X . L O W _ L E V E L S -- -- -- -- S p e c -- -- -- -- $Revision: 1.14 $ -- -- -- -- -- -- -- -- This package specification is part of the Florida State -- -- University (FSU) prototype implementation of IEEE Draft Std -- -- 1003.5b, for use with the Gnu NYU Ada Translator (GNAT) and the -- -- FSU Gnu Ada Runtime Library (GNARL). -- -- -- -- This package specification contains some text extracted from IEEE -- -- Draft Std 1003.5b/D5 (August 1995), IEEE Draft Standard for -- -- Information Technology -- POSIX Ada Language Interfaces -- Part 1: -- -- Binding for System Application Program Interface, Amendment 1: -- -- Realtime Extensions, copyright 1995 by the Institute of Electrical -- -- and Electronics Engineers, Inc. -- -- -- -- This package specification differs from the package specifications -- -- in IEEE Draft Std 1003.5/D5 in several respects. For example, it -- -- includes additional with-clause dependences, comments, and -- -- complete definitions for certain types, ranges, and constants that -- -- are left implementation-defined in the draft standard. These -- -- differences appear to be within the scope of variation which the -- -- draft standard permits for implementations, but no warranty is -- -- made to that effect. -- -- -- -- These package specifications are distributed in the hope that they -- -- will be useful, but WITHOUT ANY WARRANTY; without even the implied -- -- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- The package specifications in IEEE Draft Std 1003.5b/D5 represent -- -- only a portion of the document and are not to be interpreteted -- -- outside the context of the document, nor is the draft document to -- -- be interpreted as an approved consensus standard. -- -- -- -- When IEEE Std 1003.5b is approved, it must be used in conjunction -- -- with the final version of the package specifications contained in -- -- that document in order to claim conformance. The IEEE takes no -- -- responsibility for and will assume no liability for damages -- -- resulting from the reader's misinterpretation of said information -- -- resulting from its out-of-context nature. To order copies of the -- -- IEEE Draft Std 1003.5/D5, 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. -- -- -- -- For bodies to these packages, and other free products of the FSU -- -- POSIX/Ada Real-Time project, see the ftp site "ftp.cs.fsu.edu", -- -- subdirectory "pub/PART", or send e-mail to "part@ada.cs.fsu.edu". -- -- -- ------------------------------------------------------------------------------ with System; with Interfaces.C; with Interfaces.C.Strings; with Interfaces.C.POSIX_Error; with Implementation_Defined; with Implementation_Constants; package Low_Levels is package ID renames Implementation_Defined; package C renames Interfaces.C; package ICS renames Interfaces.C.Strings; use C; use Interfaces.C.POSIX_Error; -- POSIX.Identification package related dot 1 definitions type size_t is new C.Unsigned; type ssize_t is new C.Int; type off_t is new ID.off_t; type time_t is new ID.time_t; type time_t_ptr is access all time_t; function address_to_timeptr is new Unchecked_Conversion (System.Address, time_t_ptr); type ino_t is new ID.ino_t; type dev_t is new ID.dev_t; type nlink_t is new ID.nlink_t; type dir_t is new ID.dir_t; type dir_t_ptr is access all dir_t; type pid_t is new ID.pid_t; type uid_t is new ID.uid_t; type gid_t is new ID.gid_t; type gid_t_ptr is access all gid_t; type stat_t is new ID.stat_t; type stat_t_ptr is access all stat_t; -- function address_to_stat_t_ptr is new Unchecked_Conversion -- (System.Address, stat_t_ptr); validation : constant integer := 16#1234#; type ada_stat is record valid : integer; -- magic cookie for validation st_mode : ID.mode_t; st_ino : ino_t; st_dev : dev_t; st_nlink : nlink_t; st_uid : uid_t; st_gid : gid_t; st_size : off_t; st_atime : time_t; st_mtime : time_t; st_ctime : time_t; is_dir : C.int; -- 0 if FALSE, TRUE otherwise is_chr : C.int; -- 0 if FALSE, TRUE otherwise is_blk : C.int; -- 0 if FALSE, TRUE otherwise is_reg : C.int; -- 0 if FALSE, TRUE otherwise is_fifo : C.int; -- 0 if FALSE, TRUE otherwise is_mq : C.int; -- 0 if FALSE, TRUE otherwise is_shm : C.int; -- 0 if FALSE, TRUE otherwise is_sem : C.int; -- 0 if FALSE, TRUE otherwise end record; function Address_to_gid_t_ptr is new Unchecked_Conversion (System.Address, gid_t_ptr); -- type MQattr, Ptr_MQattr, Message_Queue_Descriptor used in meassage_que -- type MQattr is new ID.mq_attr_t; type Ptr_MQattr is access all MQattr; type Message_Queue_Descriptor is new C.Int; -- correspoding to mqd_t (typedef void *mqd_t) in c -- type Ptr_Long is access all C.Long; type Ptr_Unsigned is access all C.Unsigned; function Address_To_Ptr_MQattr is new Unchecked_Conversion (System.Address, Ptr_MQattr); function Address_To_Ptr_Long is new Unchecked_Conversion (System.Address, Ptr_Long); function Address_To_Ptr_Unsigned is new Unchecked_Conversion (System.Address, Ptr_Unsigned); -- type clockid_t, Ptr_Clockid_t used in i-postim -- type clockid_t is new C.Int; type timer_t is new C.Int; type Ptr_Timer_t is access all timer_t; type Ptr_Clockid_t is access all clockid_t; function Address_To_Ptrtimer_t is new Unchecked_Conversion (System.Address, Ptr_Timer_t); -- Sigevent, Sigval, Siginfo for i-possig -- -- Ptr_Sigevent_t type Sigevent used in i-postim, i-possig -- type Sigevent is new ID.sigevent_t; type Ptr_Sigevent_t is access all Sigevent; type Sigval is new ID.sigval_t; type Ptr_Sigval_t is access all Sigval; type Siginfo is new ID.siginfo_t; type Ptr_Siginfo_t is access all Siginfo; function Address_To_Ptrsigevent is new Unchecked_Conversion (System.Address, Ptr_Sigevent_t); function Address_To_Ptrsigval is new Unchecked_Conversion (System.Address, Ptr_Sigval_t); function Address_To_Ptrsiginfo is new Unchecked_Conversion (System.Address, Ptr_Siginfo_t); -- C_timespec, Ptr_Timespec used in i-poasio,i-pocova,i-possch,i-postim -- type c_time_t is new C.long; type c_Nanoseconds is new C.long; subtype c_Fractional_Second is c_Nanoseconds range 0 .. 10#1#E9 - 1; type C_timespec is record tv_sec : c_time_t; tv_nsec : c_Fractional_Second; end record; type Ptr_Timespec is access all C_timespec; function Address_To_Ptrtime is new Unchecked_Conversion (System.Address, Ptr_Timespec); -- type C_itimerspec used in i-postim -- type C_itimerspec is record it_value : C_timespec; it_interval : C_timespec; end record; type Ptr_itimerspec is access all C_itimerspec; function Address_To_Ptritimer is new Unchecked_Conversion (System.Address, Ptr_itimerspec); -- type Semaphore_Descriptor for package Semaphore -- type Semaphore_Descriptor is access all Implementation_Defined.sem_t; -- Mutex related types -- type Mutex_Descriptor is access all Implementation_Defined.mutex_t; type Mutexattr_Descriptor is access all Implementation_Defined.mutexattr_t; -- Condition Variable related types -- type Condition_Descriptor is access all Implementation_Defined.cond_t; type Condattr_Descriptor is access all Implementation_Defined.condattr_t; -- Access_Scheduling_Parameters type -- type Access_Scheduling_Parameters is access all Implementation_Defined.sched_param_t; function getpid return pid_t; function getppid return pid_t; function getpgrp (pid : pid_t) return pid_t; procedure setpgid (pid : in pid_t; pgid : in gid_t; result : out Return_Code); function setsid return pid_t; function getuid return uid_t; function geteuid return uid_t; procedure setuid (uid : in uid_t; result : out Return_Code); function getlogin return ICS.chars_ptr; function getgid return gid_t; function getegid return gid_t; procedure setgid (gid : in gid_t; result : out Return_Code); type gid_array is array (C.int range <>) of gid_t; function groups_size return C.int; procedure getgroups (grouplist : in out gid_array; size : C.int; result : out C.int); -- POSIX.Signal package related dot 1 definitions type sigset_t is new C.Int; type sigset_t_ptr is access sigset_t; procedure sigaddset (set : sigset_t_ptr; sig : C.Int; result : out Return_Code); procedure sigfillset (set : sigset_t_ptr; result : out Return_Code); procedure sigdelset (set : sigset_t_ptr; sig : C.Int; result : out Return_Code); procedure sigemptyset (set : sigset_t_ptr; result : out Return_Code); procedure sigismember (set : sigset_t_ptr; sig : C.Int; result : out Return_Code); procedure kill (pid : pid_t; sig : C.Int; Result : out Return_Code); procedure sigpending (set : sigset_t_ptr; result : out Return_Code); -- Some internal definition and routines to return separate info out of -- dot 1 functions: uname function sysname return ICS.chars_ptr; function release return ICS.chars_ptr; function nodename return ICS.chars_ptr; function version return ICS.chars_ptr; function machine return ICS.chars_ptr; -- POSIX.Process_Primitive package related dot 1 definitions function fork return pid_t; procedure execv (pathname : ICS.chars_ptr; argv : ICS.chars_ptr_array; result : out C.Int); procedure execve (pathname : ICS.chars_ptr; argv : ICS.chars_ptr_array; envp : ICS.chars_ptr_array; result : out C.Int); procedure execvp (filename : ICS.chars_ptr; argv : ICS.chars_ptr_array; result : out C.Int); procedure sys_exit (status : C.Int); type int_ptr is access all C.Int; function Address_To_Intptr is new Unchecked_Conversion (System.Address, int_ptr); function Intptr_To_Address is new Unchecked_Conversion (int_ptr, System.Address); procedure waitpid (pid : pid_t; staloc : int_ptr; options : C.Int; result : out pid_t); function get_termination_cause (statevalue : C.Int) return C.Int; function get_cause_value (statevalue : C.Int) return C.Int; procedure sigprocmask (how : in C.Int; newset : in sigset_t_ptr; oldset : sigset_t_ptr; result : out Return_Code); procedure pthread_sigmask (how : C.Int; newset : sigset_t_ptr; oldset : sigset_t_ptr; result : out Return_Code); -- Package POSIX.Semaphores related -- procedure sem_init (sem_p : in out Semaphore_Descriptor; value : in Natural; is_shared : in Boolean := False; result : out Return_Code); procedure sem_destroy (sem_p : in out Semaphore_Descriptor; result : out Return_Code); function sem_open (name : ICS.chars_ptr; perm : ID.mode_t; value : Natural; opt : C.Int) return Semaphore_Descriptor; procedure sem_close (sem_p : in out Semaphore_Descriptor; result : out Return_Code); procedure sem_unlink (name : in ICS.chars_ptr; result : out Return_Code); procedure sem_wait (sem_p : in Semaphore_Descriptor; result : out Return_Code); procedure sem_trywait (sem_p : Semaphore_Descriptor; result : out Return_Code); procedure sem_post (sem_p : in Semaphore_Descriptor; result : out Return_Code); procedure sem_getvalue (sem_p : Semaphore_Descriptor; value : out C.Int; ret : out Return_Code); -- mutex related procedures and functions -- procedure mutexattr_init (mutexattr_p : in out Mutexattr_Descriptor; result : out Return_Code); procedure mutexattr_destroy (mutexattr_p : in out Mutexattr_Descriptor; result : out Return_Code); procedure mutexattr_getpshared (mutexattr_p : Mutexattr_Descriptor; value : out C.Int; ret : out Return_Code); procedure mutexattr_setpshared (mutexattr_p : Mutexattr_Descriptor; value : in C.Int; ret : out Return_Code); procedure mutexattr_setprotocol (mutexattr_p : Mutexattr_Descriptor; value : in C.Int; ret : out Return_Code); procedure mutexattr_getprotocol (mutexattr_p : Mutexattr_Descriptor; value : out C.Int; ret : out Return_Code); procedure mutexattr_setprioceiling (mutexattr_p : Mutexattr_Descriptor; value : in C.Int; ret : out Return_Code); procedure mutexattr_getprioceiling (mutexattr_p : Mutexattr_Descriptor; value : out C.Int; ret : out Return_Code); procedure mutex_init (mutex_p : in out Mutex_Descriptor; mutexattr_p : in Mutexattr_Descriptor; result : out Return_Code); procedure mutex_destroy (mutex_p : in out Mutex_Descriptor; result : out Return_Code); procedure mutex_setprioceiling (mutex_p : Mutex_Descriptor; value : in C.Int; result : out C.Int; ret : out Return_Code); procedure mutex_getprioceiling (mutex_p : Mutex_Descriptor; value : out C.Int; ret : out Return_Code); procedure mutex_lock (mutex_p : in Mutex_Descriptor; result : out Return_Code); procedure mutex_trylock (mutex_p : Mutex_Descriptor; result : out Return_Code); procedure mutex_unlock (mutex_p : in Mutex_Descriptor; result : out Return_Code); procedure condattr_init (condattr_p : in out Condattr_Descriptor; result : out Return_Code); procedure condattr_destroy (condattr_p : in out Condattr_Descriptor; result : out Return_Code); procedure condattr_getpshared (condattr_p : Condattr_Descriptor; value : out C.Int; ret : out Return_Code); procedure condattr_setpshared (condattr_p : Condattr_Descriptor; value : in C.Int; ret : out Return_Code); procedure cond_init (cond_p : in out Condition_Descriptor; condattr_p : in Condattr_Descriptor; result : out Return_Code); procedure cond_destroy (cond_p : in out Condition_Descriptor; result : out Return_Code); procedure cond_signal (cond_p : in Condition_Descriptor; result : out Return_Code); procedure cond_broadcast (cond_p : in Condition_Descriptor; result : out Return_Code); procedure cond_wait (cond_p : in Condition_Descriptor; mutex_p : in Mutex_Descriptor; result : out Return_Code); procedure cond_timedwait (cond_p : Condition_Descriptor; mutex_p : Mutex_Descriptor; abstime : Ptr_Timespec; result : out Return_Code); procedure mlockall (option : in C.Int; result : out Return_Code); procedure munlockall (result : out Return_Code); procedure mlock (first : in System.Address; length : size_t; result : out Return_Code); procedure munlock (first : in System.Address; length : in size_t; result : out Return_Code); function mmap (first : System.Address; length : size_t; prot : C.Int; maflag : C.Int; loflag : C.Int; fd : C.Int; offset : off_t) return int_ptr; procedure munmap (first : in System.Address; length : in size_t; result : out Return_Code); procedure mprotect (first : in System.Address; length : in size_t; prot : in C.Int; result : out Return_Code); procedure msync (first : in System.Address; length : in size_t; opt : in C.Int; result : out Return_Code); function shm_open (name : ICS.chars_ptr; opt : C.Int; perm : ID.mode_t) return C.Int; procedure shm_unlink (name : in ICS.chars_ptr; result : out Return_Code); procedure get_priority (Parameters : ID.sched_param_t; result : out C.Int); procedure set_priority (Parameters : ID.sched_param_t; Priority : C.Int; result : out Return_Code); procedure set_sched_param (Process : pid_t; Parameters : ID.sched_param_t; result : out Return_Code); procedure get_sched_param (Process : pid_t; result : out ID.sched_param_t; ret : out Return_Code); procedure sched_setscheduler (Process : pid_t; Policy : C.Int; Parameters : ID.sched_param_t; ret : out Return_Code); procedure sched_getscheduler (Process : pid_t; ret : out C.Int); procedure sched_yield (ret : out Return_Code); procedure sched_get_priority_max (Policy : C.Int; ret : out C.Int); procedure sched_get_priority_min (Policy : C.Int; ret : out C.Int); procedure sched_rr_get_interval (Process : pid_t; interval : in out Ptr_Timespec; ret : out Return_Code); procedure set_initial (timer_state_ptr : in out Ptr_itimerspec; initial : in Ptr_Timespec; ret : out Return_Code); procedure get_initial (timer_state_ptr : Ptr_itimerspec; initial : out Ptr_Timespec; ret : out Return_Code); procedure get_interval (timer_state_ptr : Ptr_itimerspec; interval : out Ptr_Timespec; ret : out Return_Code); procedure set_interval (timer_state_ptr : in out Ptr_itimerspec; interval : in Ptr_Timespec; ret : out Return_Code); procedure clock_settime (Clock : in clockid_t; Value_ptr : in Ptr_Timespec; ret : out Return_Code); procedure clock_gettime (Clock : in clockid_t; Value_ptr : in out Ptr_Timespec; ret : out Return_Code); procedure clock_getres (Clock : in clockid_t; Value_ptr : in out Ptr_Timespec; ret : out Return_Code); procedure timer_create (Clock : in clockid_t; Event : in Ptr_Sigevent_t; Value_ptr : in out Ptr_Timer_t; ret : out Return_Code); procedure timer_delete (Timer : in out timer_t; ret : out Return_Code); procedure timer_settime (Timer : in timer_t; Flags : in C.Int; Value : in Ptr_itimerspec; Ovalue : in out Ptr_itimerspec; ret : out Return_Code); procedure timer_settime2 (Timer : in timer_t; Flags : in C.Int; Value : in Ptr_itimerspec; ret : out Return_Code); procedure timer_gettime (Timer : in timer_t; Value : in out Ptr_itimerspec; ret : out Return_Code); procedure timer_getoverrun (Timer : timer_t; ret : out C.Int); -- Message Passing related procedures -- procedure set_max_messages (Attr_ptr : in out Ptr_MQattr; Value : in C.Long; ret : out Return_Code); procedure get_max_messages (Attr_ptr : in Ptr_MQattr; Value_ptr : in out Ptr_Long; ret : out Return_Code); procedure set_message_length (Attr_ptr : in out Ptr_MQattr; Value : in C.Long; ret : out Return_Code); procedure get_message_length (Attr_ptr : in Ptr_MQattr; Value_ptr : in out Ptr_Long; ret : out Return_Code); procedure set_options (Attr_ptr : in out Ptr_MQattr; Value : in C.Long; ret : out Return_Code); procedure get_options (Attr_ptr : in Ptr_MQattr; Value_ptr : in out Ptr_Long; ret : out Return_Code); procedure get_message_count (Attr_ptr : in Ptr_MQattr; Value_ptr : in out Ptr_Long; ret : out Return_Code); procedure mq_open (Name : in ICS.chars_ptr; Flags : in C.Int; mode : in ID.mode_t; attr_ptr : Ptr_MQattr; Result : out Message_Queue_Descriptor); procedure mq_close (MQ : Message_Queue_Descriptor; ret : out Return_Code); procedure mq_unlink (Name : in ICS.chars_ptr; ret : out Return_Code); procedure mq_send (MQD : in Message_Queue_Descriptor; Char_ptr : in System.Address; Length : in size_t; Priority : in C.Unsigned; ret : out Return_Code); procedure mq_receive (MQD : in Message_Queue_Descriptor; Char_ptr : System.Address; Length : in size_t; Priority : in Ptr_Unsigned; ret_size : out ssize_t); procedure mq_notify (MQ : in Message_Queue_Descriptor; Event_ptr : in Ptr_Sigevent_t; ret : out Return_Code); procedure mq_setattr (MQ : in Message_Queue_Descriptor; New_Attrs : in Ptr_MQattr; Old_Attrs : Ptr_MQattr; ret : out Return_Code); procedure mq_getattr (MQ : in Message_Queue_Descriptor; Attr : out Ptr_MQattr; ret : out Return_Code); procedure sig_get_signal (Event_ptr : in Ptr_Sigevent_t; Signo : out C.Int); procedure sig_set_signal (Event_ptr : in out Ptr_Sigevent_t; Signo : in C.Int; ret : out Return_Code); procedure sig_get_notification (Event_ptr : in Ptr_Sigevent_t; Note : out C.Int; ret : out Return_Code); procedure sig_set_notify (Event_ptr : in out Ptr_Sigevent_t; Notify : in C.Int; ret : out Return_Code); procedure sig_get_data (Event_ptr : in Ptr_Sigevent_t; Data_ptr : in Ptr_Sigval_t; ret : out Return_Code); procedure sig_set_data (Event_ptr : in Ptr_Sigevent_t; Data_ptr : in Ptr_Sigval_t; ret : out Return_Code); procedure sig_get_signal2 (Info_ptr : in Ptr_Siginfo_t; Signo : out C.Int); procedure sig_set_signal2 (Info_ptr : in out Ptr_Siginfo_t; Signo : in C.Int; ret : out Return_Code); procedure sig_get_source (Info_ptr : in Ptr_Siginfo_t; Source : out C.Int; ret : out Return_Code); procedure sig_set_source (Info_ptr : in out Ptr_Siginfo_t; Source : in C.Int; ret : out Return_Code); procedure sig_get_data2 (Info_ptr : in Ptr_Siginfo_t; Data_ptr : in Ptr_Sigval_t; ret : out Return_Code); procedure sig_set_data2 (Info_ptr : in Ptr_Siginfo_t; Data_ptr : in Ptr_Sigval_t; ret : out Return_Code); procedure sigtimedwait (set : sigset_t_ptr; info : Ptr_Siginfo_t; timeout : Ptr_Timespec; result : out Return_Code); procedure sigwaitinfo (set : sigset_t_ptr; info : Ptr_Siginfo_t; result : out Return_Code); procedure sigqueue (pid : pid_t; signo : C.Int; data_ptr : Ptr_Sigval_t; result : out Return_Code); procedure sigwait (set : sigset_t_ptr; result : out C.Int); -- POSIX.Configuratable_System_Limits related declaration function sysconf (name : C.Int) return C.long; -- POSIX.IO related functions procedure fchmod (fildes : C.Int; mode : ID.mode_t; result : out C.int); procedure ftruncate (fildes : C.Int; length : ID.off_t; result : out C.int); procedure fsync (fildes : C.int; result : out C.int); procedure fdatasync (fildes : C.int; result : out C.int); -- POSIX.Calendar related declaration function mktime (tm_sec : C.int; tm_min : C.int; tm_hour : C.int; tm_day : C.int; tm_mon : C.int; tm_year : C.int) return time_t; function localyear (time : System.Address) return C.int; function localmonth (time : System.Address) return C.int; function localday (time : System.Address) return C.int; function localleft (time : System.Address) return C.int; procedure utime (path : ICS.chars_ptr; actime : time_t; modtime : time_t; result : out C.int); -- POSIX.Files related declaration function opendir (path : ICS.chars_ptr) return dir_t_ptr; procedure readdir (dirp : dir_t_ptr; direntry : out ICS.chars_ptr); procedure closedir (dirp : dir_t_ptr; result : out C.int); -- POSIX.Process_Environment related declaration type int_array is array (C.size_t range <>) of C.int; function get_env_count return C.size_t; procedure get_env_lengths (envlen : in out int_array); procedure get_1env (index : in C.int; str : in out ICS.chars_ptr); procedure get_envs (env : in out ICS.chars_ptr_array); -- POSIX.File_Status related declaration procedure stat (path : ICS.chars_ptr; ada_buf : out ada_stat; result : out C.int); procedure fstat (fildes : C.int; ada_buf : out ada_stat; result : out C.int); procedure posix_access (path : ICS.chars_ptr; amode : C.int; result : out C.int); function get_wd_size return C.size_t; procedure getcwd (buf : in out C.char_array; size : C.size_t); -- POSIX.File_Locking related declaration type flock_struct is record l_type : C.Short; l_whence : C.Short; l_start : off_t; l_len : off_t; l_pid : pid_t; end record; type p_flock_struct is access flock_struct; procedure fcntl (fildes : C.Int; cmd : C.Int; lock_ptr : flock_struct; result : out C.Int); -- POSIX.User_Database related declaration and subprogram type passwd is record pw_name : ICS.chars_ptr; pw_uid : uid_t; pw_gid : gid_t; pw_dir : ICS.chars_ptr; pw_shell : ICS.chars_ptr; end record; procedure getnamesize1 (Uid : uid_t; size : out C.int); procedure getdirsize1 (Uid : uid_t; size : out C.int); procedure getshellsize1 (Uid : in uid_t; size : out C.int); procedure getpwuid (Uid : uid_t; P : in out passwd; Dummy : out C.int); procedure getnamesize2 (N : ICS.chars_ptr; size : out C.int); procedure getdirsize2 (N : ICS.chars_ptr; size : out C.int); procedure getshellsize2 (N : ICS.chars_ptr; size : out C.int); procedure getpwname (N : ICS.chars_ptr; P : in out passwd; Dummy : out C.int); -- Add POSIX.Group_Database related type definition and subprograms function test_gvalid (gid : gid_t) return C.int; function get_ggrmem_length (gid : gid_t) return C.size_t; procedure fetch_gname (gid : gid_t; grname : out ICS.chars_ptr); procedure fetch_ggid (gid : gid_t; grgid : out gid_t); procedure fetch_gmem (gid : gid_t; grmem : in out ICS.chars_ptr_array); function test_nvalid (name : ICS.chars_ptr) return C.int; function get_ngrmem_length (name : ICS.chars_ptr) return C.size_t; procedure fetch_nname (name : ICS.chars_ptr; grname : out ICS.chars_ptr); procedure fetch_ngid (name : ICS.chars_ptr; grgid : out gid_t); procedure fetch_nmem (name : ICS.chars_ptr; grmem : in out ICS.chars_ptr_array); -- POSIX.Process_times related type and subprograms declaration. type clock_t is new ID.clock_t; type tms is record tms_utime : clock_t; tms_stime : clock_t; tms_cutime : clock_t; tms_cstime : clock_t; end record; procedure times (buffer : in out tms; result : out clock_t); end Low_Levels;