1-- DO NOT EDIT THIS FILE. 2-- It is generated automatically, by program c-posix.c 3------------------------------------------------------------------------------ 4-- -- 5-- FLORIST (FSU Implementation of POSIX.5) COMPONENTS -- 6-- -- 7-- P O S I X . C -- 8-- -- 9-- S p e c -- 10-- -- 11-- -- 12-- Copyright (c) 1996, 1997 Florida State University (FSU), -- 13-- All Rights Reserved. -- 14-- -- 15-- This file is a component of FLORIST, an Ada application program -- 16-- interface for operating system services for use with the GNAT compiler -- 17-- and the Gnu Ada Runtime Library (GNARL). FLORIST is intended to -- 18-- conform to the IEEE POSIX Ada standards, 1003.5-1992 and 1003.5b-1993. -- 19-- It also includes support for Draft 1 of IEEE Project 1003.5c. -- 20-- -- 21-- This is free software; you can redistribute it and/or modify it under -- 22-- terms of the GNU General Public License as published by the Free -- 23-- Software Foundation; either version 2, or (at your option) any later -- 24-- version. This software is distributed in the hope that it will be -- 25-- useful, but WITHOUT ANY WARRANTY; without even the implied warranty -- 26-- of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- 27-- General Public License for more details. You should have received a -- 28-- copy of the GNU General Public License distributed with GNARL; see -- 29-- file COPYING. If not, write to the Free Software Foundation, 59 -- 30-- Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- 31-- -- 32-- -- 33-- -- 34-- -- 35-- -- 36-- -- 37-- -- 38-- -- 39------------------------------------------------------------------------------ 40with System; use System; 41with Unchecked_Conversion; 42package POSIX.C is 43 pragma Elaborate_Body; 44 -- ========= -- 45 -- WARNING -- 46 -- ========= -- 47 48 -- This package should NOT be used directly by an application. 49 -- It is internal to the FLORIST implementation of the POSIX.5 API, 50 -- and may be changed or replaced in future versions of FLORIST. 51 52 ALIGNMENT : constant := Natural'Min (Standard'Maximum_Alignment, 8); 53 -- worst-case alignment requirement 54 55 --------------------- 56 -- basic C types -- 57 --------------------- 58 59 type short is range -2**15 .. (2**15)-1; 60 for short'Size use 16; 61 type int is range -2**31 .. (2**31)-1; 62 for int'Size use 32; 63 type int_ptr is access constant int; 64 pragma Convention (C, int_ptr); 65 type int_var_ptr is access all int; 66 pragma Convention (C, int_var_ptr); 67 type unsigned is mod 2**32; 68 for unsigned'Size use 32; 69 type long is range -2**31 .. (2**31)-1; 70 for long'Size use 32; 71 type unsigned_long is mod 2**32; 72 for unsigned_long'Size use 32; 73 type unsigned_int is mod 2**32; 74 for unsigned_int'Size use 32; 75 type unsigned_short is mod 2**16; 76 for unsigned_short'Size use 16; 77 type caddr_t is mod 2**32; 78 for caddr_t'Size use 32; 79 type size_t is range -2**31 .. (2**31)-1; 80 for size_t'Size use 32; 81 type size_t_ptr is access constant size_t; 82 pragma Convention (C, size_t_ptr); 83 type size_t_var_ptr is access all size_t; 84 pragma Convention (C, size_t_var_ptr); 85 type time_t is range -2**31 .. (2**31)-1; 86 for time_t'Size use 32; 87 type time_t_ptr is access constant time_t; 88 pragma Convention (C, time_t_ptr); 89 type time_t_var_ptr is access all time_t; 90 pragma Convention (C, time_t_var_ptr); 91 type clock_t is mod 2**32; 92 for clock_t'Size use 32; 93 type clock_t_ptr is access constant clock_t; 94 pragma Convention (C, clock_t_ptr); 95 type clock_t_var_ptr is access all clock_t; 96 pragma Convention (C, clock_t_var_ptr); 97 type ptr_as_int is range -2**31 .. (2**31)-1; 98 for ptr_as_int'Size use 32; 99 subtype char is POSIX_Character; 100 type char_ptr is access constant char; 101 pragma Convention (C, char_ptr); 102 type char_var_ptr is access all char; 103 pragma Convention (C, char_var_ptr); 104 function To_Ptr is new Unchecked_Conversion (Address, char_ptr); 105 function To_char_ptr (Addr : Address) return char_ptr renames To_Ptr; 106 function To_Address is new Unchecked_Conversion (char_ptr, Address); 107 type char_ptr_ptr is access constant char_ptr; 108 pragma Convention (C, char_ptr_ptr); 109 type char_ptr_var_ptr is access all char_ptr; 110 pragma Convention (C, char_ptr_var_ptr); 111 function To_Ptr is new Unchecked_Conversion (Address, char_ptr_ptr); 112 function To_Address is new Unchecked_Conversion (char_ptr_ptr, Address); 113 type char_ptr_array is 114 array (Positive range <>) of aliased char_ptr; 115 function malloc (size : in size_t) return char_ptr; 116 function malloc (size : in size_t) return char_ptr_ptr; 117 pragma Import (C, malloc, "malloc"); 118 procedure free (object : in char_ptr); 119 procedure free (object : in char_ptr_ptr); 120 pragma Import (C, free, "free"); 121 procedure Advance (Ptr : in out char_ptr); 122 procedure Advance (Ptr : in out char_ptr_ptr); 123 -- advance Ptr to next location 124 -- pragma Inline (Advance); 125 function Form_POSIX_String (Str : in char_ptr) 126 return POSIX_String; 127 -- makes new copy of string, without null terminator 128 129 ----------------- 130 -- constants -- 131 ----------------- 132 133 AIO_ALLDONE : constant := 1; 134 AIO_CANCELED : constant := 0; 135 AIO_NOTCANCELED : constant := 2; 136 B0 : constant := 0; 137 B110 : constant := 3; 138 B115200 : constant := 0; 139 B1200 : constant := 10; 140 B134 : constant := 4; 141 B150 : constant := 5; 142 B1800 : constant := 11; 143 B19200 : constant := 17; 144 B200 : constant := 6; 145 B230400 : constant := 0; 146 B2400 : constant := 13; 147 B300 : constant := 7; 148 B38400 : constant := 18; 149 B460800 : constant := 0; 150 B4800 : constant := 14; 151 B50 : constant := 1; 152 B57600 : constant := 0; 153 B600 : constant := 8; 154 B75 : constant := 2; 155 B9600 : constant := 16; 156 BRKINT : constant := 2; 157 CLK_TCK : constant := 1000; 158 CLOCAL : constant := 2048; 159 CLOCK_REALTIME : constant := -2; 160 CREAD : constant := 128; 161 CSIZE : constant := 48; 162 CSTOPB : constant := 64; 163 CS5 : constant := 0; 164 CS6 : constant := 16; 165 CS7 : constant := 32; 166 CS8 : constant := 48; 167 -- error code constants are in posix.ads 168 ECHO : constant := 8; 169 ECHOE : constant := 16; 170 ECHOK : constant := 32; 171 ECHONL : constant := 64; 172 FD_CLOEXEC : constant := 1; 173 F_DUPFD : constant := 0; 174 F_GETFD : constant := 1; 175 F_GETFL : constant := 3; 176 F_GETLK : constant := 5; 177 F_OK : constant := 0; 178 F_RDLCK : constant := 1; 179 F_SETFD : constant := 2; 180 F_SETFL : constant := 4; 181 F_SETLK : constant := 6; 182 F_SETLKW : constant := 7; 183 F_UNLCK : constant := 3; 184 F_WRLCK : constant := 2; 185 HUPCL : constant := 1024; 186 ICANON : constant := 2; 187 ICRNL : constant := 256; 188 IEXTEN : constant := 256; 189 IGNBRK : constant := 1; 190 IGNCR : constant := 128; 191 IGNPAR : constant := 4; 192 INLCR : constant := 64; 193 INPCK : constant := 16; 194 ISIG : constant := 1; 195 ISTRIP : constant := 32; 196 IXOFF : constant := 4096; 197 IXON : constant := 1024; 198 L_ctermid : constant := 12; 199 LIO_NOP : constant := -1; 200 LIO_NOWAIT : constant := 2; 201 LIO_READ : constant := 3; 202 LIO_WAIT : constant := 1; 203 LIO_WRITE : constant := 4; 204 205 MAP_FAILED : constant := -1; 206 -- *** MISSING: MAP_FILE *** -- 207 MAP_FILE : constant := 0; 208 MAP_FIXED : constant := 4; 209 MAP_PRIVATE : constant := 2; 210 MAP_SHARED : constant := 1; 211 MAX_CANON : constant := 256; 212 MAX_INPUT : constant := 512; 213 MCL_CURRENT : constant := 1; 214 MCL_FUTURE : constant := 2; 215 MS_ASYNC : constant := 1; 216 MS_INVALIDATE : constant := 2; 217 MS_SYNC : constant := 4; 218 NCCS : constant := 9; 219 NOFLSH : constant := 128; 220 OPOST : constant := 1; 221 O_ACCMODE : constant := 3; 222 O_APPEND : constant := 4; 223 O_CREAT : constant := 8; 224 O_DSYNC : constant := 131072; 225 O_EXCL : constant := 32; 226 O_NOCTTY : constant := 128; 227 O_NONBLOCK : constant := 64; 228 O_RDONLY : constant := 0; 229 O_RDWR : constant := 2; 230 O_RSYNC : constant := 524288; 231 O_SYNC : constant := 262144; 232 O_TRUNC : constant := 16; 233 O_WRONLY : constant := 1; 234 PAGESIZE : constant := 4096; 235 PARENB : constant := 256; 236 PARMRK : constant := 8; 237 PARODD : constant := 512; 238 PROT_EXEC : constant := 8; 239 PROT_NONE : constant := 1; 240 PROT_READ : constant := 2; 241 PROT_WRITE : constant := 4; 242 -- *** MISSING: PROT_UNCACHE *** -- 243 PROT_UNCACHE : constant := 0; 244 PTHREAD_DESTRUCTOR_ITERATIONS : constant := 4; 245 PTHREAD_EXPLICIT_SCHED : constant := 0; 246 PTHREAD_INHERIT_SCHED : constant := 1; 247 PTHREAD_PRIO_INHERIT : constant := 1; 248 PTHREAD_PRIO_NONE : constant := 0; 249 PTHREAD_PRIO_PROTECT : constant := 2; 250 PTHREAD_PROCESS_SHARED : constant := 0; 251 PTHREAD_PROCESS_PRIVATE : constant := 1; 252 PTHREAD_SCOPE_PROCESS : constant := 0; 253 PTHREAD_SCOPE_SYSTEM : constant := 1; 254 R_OK : constant := 4; 255 SA_NOCLDSTOP : constant := 2; 256 SA_SIGINFO : constant := 128; 257 SCHED_FIFO : constant := 2; 258 SCHED_OTHER : constant := 3; 259 SCHED_RR : constant := 1; 260 SEEK_CUR : constant := 1; 261 SEEK_END : constant := 2; 262 SEEK_SET : constant := 0; 263 SIGTRAP : constant := 5; 264 SIGABRT : constant := 6; 265 SIGALRM : constant := 14; 266 SIGBUS : constant := 10; 267 SIGCHLD : constant := 20; 268 SIGCONT : constant := 19; 269 SIGEV_NONE : constant := 1; 270 SIGEV_SIGNAL : constant := 2; 271 SIGEV_THREAD : constant := 3; 272 SIGFPE : constant := 8; 273 SIGHUP : constant := 1; 274 SIGILL : constant := 4; 275 SIGINT : constant := 2; 276 SIGIO : constant := 23; 277 SIGKILL : constant := 9; 278 SIGPIPE : constant := 13; 279 SIGQUIT : constant := 3; 280 SIGRTMAX : constant := 64; 281 SIGRTMIN : constant := 33; 282 NSIGS : constant := 64; 283 SIGSEGV : constant := 11; 284 SIGSTOP : constant := 17; 285 SIGTERM : constant := 15; 286 SIGTSTP : constant := 18; 287 SIGTTIN : constant := 21; 288 SIGTTOU : constant := 22; 289 SIGURG : constant := 16; 290 SIGUSR1 : constant := 30; 291 SIGUSR2 : constant := 31; 292 SIG_BLOCK : constant := 0; 293 SIG_DFL : constant := 0; 294 SIG_IGN : constant := 1; 295 SIG_SETMASK : constant := 2; 296 SIG_UNBLOCK : constant := 1; 297 SI_ASYNCIO : constant := 4; 298 SI_MESGQ : constant := 5; 299 SI_QUEUE : constant := 2; 300 SI_TIMER : constant := 3; 301 SI_USER : constant := 1; 302 S_IFSOCK : constant := 49152; 303 S_IRGRP : constant := 32; 304 S_IROTH : constant := 4; 305 S_IRUSR : constant := 256; 306 S_IRWXG : constant := 56; 307 S_IRWXO : constant := 7; 308 S_IRWXU : constant := 448; 309 S_ISGID : constant := 1024; 310 S_ISUID : constant := 2048; 311 S_IWGRP : constant := 16; 312 S_IWOTH : constant := 2; 313 S_IWUSR : constant := 128; 314 S_IXGRP : constant := 8; 315 S_IXOTH : constant := 1; 316 S_IXUSR : constant := 64; 317 TCIFLUSH : constant := 1; 318 TCIOFF : constant := 3; 319 TCIOFLUSH : constant := 3; 320 TCION : constant := 4; 321 TCOFLUSH : constant := 2; 322 TCOOFF : constant := 1; 323 TCOON : constant := 2; 324 TCSADRAIN : constant := 3; 325 TCSAFLUSH : constant := 4; 326 TCSANOW : constant := 2; 327 TIMER_ABSTIME : constant := 1; 328 -- *** MISSING: TIMER_RELTIME *** -- 329 TIMER_RELTIME : constant := 0; 330 TOSTOP : constant := 512; 331 VEOF : constant := 4; 332 VEOL : constant := 5; 333 VERASE : constant := 2; 334 VINTR : constant := 0; 335 VKILL : constant := 3; 336 VMIN : constant := 4; 337 VQUIT : constant := 1; 338 VSTART : constant := 6; 339 VSTOP : constant := 8; 340 VSUSP : constant := 7; 341 VTIME : constant := 5; 342 WNOHANG : constant := 1; 343 WUNTRACED : constant := 2; 344 W_OK : constant := 2; 345 X_OK : constant := 1; 346 PC_ASYNC_IO : constant := 10; 347 PC_CHOWN_RESTRICTED : constant := 7; 348 PC_LINK_MAX : constant := 1; 349 PC_MAX_CANON : constant := 2; 350 PC_MAX_INPUT : constant := 3; 351 PC_NAME_MAX : constant := 4; 352 PC_NO_TRUNC : constant := 8; 353 PC_PATH_MAX : constant := 5; 354 PC_PIPE_BUF : constant := 6; 355 PC_PRIO_IO : constant := 12; 356 PC_SYNC_IO : constant := 11; 357 -- *** MISSING: PC_SOCK_MAXBUF *** -- 358 PC_SOCK_MAXBUF : constant := 0; 359 SC_AIO_LISTIO_MAX : constant := 11; 360 SC_AIO_MAX : constant := 12; 361 SC_AIO_PRIO_DELTA_MAX : constant := 13; 362 SC_ARG_MAX : constant := 1; 363 SC_ASYNCHRONOUS_IO : constant := 23; 364 SC_CHILD_MAX : constant := 2; 365 SC_CLK_TCK : constant := 3; 366 SC_DELAYTIMER_MAX : constant := 14; 367 SC_FSYNC : constant := 33; 368 SC_JOB_CONTROL : constant := 6; 369 SC_MAPPED_FILES : constant := 24; 370 SC_MEMLOCK : constant := 25; 371 SC_MEMLOCK_RANGE : constant := 26; 372 SC_MEMORY_PROTECTION : constant := 27; 373 SC_MESSAGE_PASSING : constant := 28; 374 SC_MQ_OPEN_MAX : constant := 15; 375 SC_MQ_PRIO_MAX : constant := 16; 376 SC_NGROUPS_MAX : constant := 4; 377 SC_OPEN_MAX : constant := 5; 378 SC_PAGESIZE : constant := 17; 379 -- *** MISSING: SC_PII *** -- 380 SC_PII : constant := 0; 381 -- *** MISSING: SC_PII_XTI *** -- 382 SC_PII_XTI : constant := 0; 383 -- *** MISSING: SC_PII_SOCKET *** -- 384 SC_PII_SOCKET : constant := 0; 385 -- *** MISSING: SC_PII_INTERNET *** -- 386 SC_PII_INTERNET : constant := 0; 387 -- *** MISSING: SC_PII_INTERNET_STREAM *** -- 388 SC_PII_INTERNET_STREAM : constant := 0; 389 -- *** MISSING: SC_PII_INTERNET_DGRAM *** -- 390 SC_PII_INTERNET_DGRAM : constant := 0; 391 -- *** MISSING: SC_PII_OSI *** -- 392 SC_PII_OSI : constant := 0; 393 -- *** MISSING: SC_PII_OSI_M *** -- 394 SC_PII_OSI_M : constant := 0; 395 -- *** MISSING: SC_PII_OSI_COTS *** -- 396 SC_PII_OSI_COTS : constant := 0; 397 -- *** MISSING: SC_PII_OSI_CLTS *** -- 398 SC_PII_OSI_CLTS : constant := 0; 399 -- *** MISSING: SC_PII_NET_SUPPORT *** -- 400 SC_PII_NET_SUPPORT : constant := 0; 401 -- *** MISSING: SC_POLL *** -- 402 SC_POLL : constant := 0; 403 -- *** MISSING: SC_POSIX_PII_NET_SUPPORT *** -- 404 SC_POSIX_PII_NET_SUPPORT : constant := 0; 405 SC_PRIORITIZED_IO : constant := 29; 406 SC_PRIORITY_SCHEDULING : constant := 30; 407 -- *** MISSING: SC_SELECT *** -- 408 SC_SELECT : constant := 0; 409 SC_THREAD_PROCESS_SHARED : constant := 1043; 410 SC_REALTIME_SIGNALS : constant := 31; 411 SC_RTSIG_MAX : constant := 18; 412 SC_SAVED_IDS : constant := 7; 413 SC_SEMAPHORES : constant := 32; 414 SC_SEM_NSEMS_MAX : constant := 19; 415 SC_SEM_VALUE_MAX : constant := 20; 416 SC_SHARED_MEMORY_OBJECTS : constant := 34; 417 SC_SIGQUEUE_MAX : constant := 21; 418 SC_STREAM_MAX : constant := 9; 419 SC_SYNCHRONIZED_IO : constant := 35; 420 SC_THREAD_PRIORITY_SCHEDULING : constant := 1040; 421 SC_THREAD_PRIO_INHERIT : constant := 1041; 422 SC_THREAD_PRIO_PROTECT : constant := 1042; 423 SC_TIMERS : constant := 36; 424 SC_TIMER_MAX : constant := 22; 425 SC_TZNAME_MAX : constant := 10; 426 -- *** MISSING: SC_T_IOV_MAX *** -- 427 SC_T_IOV_MAX : constant := 0; 428 -- *** MISSING: SC_UIO_MAXIOV *** -- 429 SC_UIO_MAXIOV : constant := 0; 430 SC_VERSION : constant := 8; 431 432 ------------------------ 433 -- type definitions -- 434 ------------------------ 435 436 type off_t is range -2**31 .. (2**31)-1; 437 for off_t'Size use 32; 438 type pid_t is range -2**31 .. (2**31)-1; 439 for pid_t'Size use 32; 440 type gid_t is mod 2**32; 441 for gid_t'Size use 32; 442 type uid_t is mod 2**32; 443 for uid_t'Size use 32; 444 type mode_t is mod 2**32; 445 for mode_t'Size use 32; 446 type suseconds_t is range -2**31 .. (2**31)-1; 447 for suseconds_t'Size use 32; 448 type ssize_t is range -2**31 .. (2**31)-1; 449 for ssize_t'Size use 32; 450 type DIR is 451 array (1 .. 1) of int; 452 for DIR'Alignment use ALIGNMENT; 453 for DIR'Size use 32; 454 type DIR_ptr is access constant DIR; 455 pragma Convention (C, DIR_ptr); 456 type DIR_var_ptr is access all DIR; 457 pragma Convention (C, DIR_var_ptr); 458 type ino_t is mod 2**32; 459 for ino_t'Size use 32; 460 type dev_t is mod 2**32; 461 for dev_t'Size use 32; 462 type cc_t is mod 2**8; 463 for cc_t'Size use 8; 464 type nlink_t is mod 2**32; 465 for nlink_t'Size use 32; 466 type tcflag_t is mod 2**16; 467 for tcflag_t'Size use 16; 468 type clockid_t is range -2**31 .. (2**31)-1; 469 for clockid_t'Size use 32; 470 type mqd_t is range -2**31 .. (2**31)-1; 471 for mqd_t'Size use 32; 472 type pthread_attr_t is 473 array (1 .. 16) of int; 474 for pthread_attr_t'Alignment use ALIGNMENT; 475 for pthread_attr_t'Size use 512; 476 type pthread_attr_t_ptr is access constant pthread_attr_t; 477 pragma Convention (C, pthread_attr_t_ptr); 478 type pthread_attr_t_var_ptr is access all pthread_attr_t; 479 pragma Convention (C, pthread_attr_t_var_ptr); 480 type pthread_cond_t is 481 array (1 .. 5) of int; 482 for pthread_cond_t'Alignment use ALIGNMENT; 483 for pthread_cond_t'Size use 160; 484 type pthread_cond_t_ptr is access constant pthread_cond_t; 485 pragma Convention (C, pthread_cond_t_ptr); 486 type pthread_cond_t_var_ptr is access all pthread_cond_t; 487 pragma Convention (C, pthread_cond_t_var_ptr); 488 type pthread_condattr_t is 489 array (1 .. 3) of int; 490 for pthread_condattr_t'Alignment use ALIGNMENT; 491 for pthread_condattr_t'Size use 96; 492 type pthread_condattr_t_ptr is access constant pthread_condattr_t; 493 pragma Convention (C, pthread_condattr_t_ptr); 494 type pthread_condattr_t_var_ptr is access all pthread_condattr_t; 495 pragma Convention (C, pthread_condattr_t_var_ptr); 496 type pthread_key_t is 497 array (1 .. 1) of int; 498 for pthread_key_t'Alignment use ALIGNMENT; 499 for pthread_key_t'Size use 32; 500 type pthread_key_t_ptr is access constant pthread_key_t; 501 pragma Convention (C, pthread_key_t_ptr); 502 type pthread_key_t_var_ptr is access all pthread_key_t; 503 pragma Convention (C, pthread_key_t_var_ptr); 504 type pthread_mutex_t is 505 array (1 .. 7) of int; 506 for pthread_mutex_t'Alignment use ALIGNMENT; 507 for pthread_mutex_t'Size use 224; 508 type pthread_mutex_t_ptr is access constant pthread_mutex_t; 509 pragma Convention (C, pthread_mutex_t_ptr); 510 type pthread_mutex_t_var_ptr is access all pthread_mutex_t; 511 pragma Convention (C, pthread_mutex_t_var_ptr); 512 type pthread_mutexattr_t is 513 array (1 .. 3) of int; 514 for pthread_mutexattr_t'Alignment use ALIGNMENT; 515 for pthread_mutexattr_t'Size use 96; 516 type pthread_mutexattr_t_ptr is access constant pthread_mutexattr_t; 517 pragma Convention (C, pthread_mutexattr_t_ptr); 518 type pthread_mutexattr_t_var_ptr is access all pthread_mutexattr_t; 519 pragma Convention (C, pthread_mutexattr_t_var_ptr); 520 type pthread_once_t is 521 array (1 .. 1) of int; 522 for pthread_once_t'Alignment use ALIGNMENT; 523 for pthread_once_t'Size use 32; 524 type pthread_once_t_ptr is access constant pthread_once_t; 525 pragma Convention (C, pthread_once_t_ptr); 526 type pthread_once_t_var_ptr is access all pthread_once_t; 527 pragma Convention (C, pthread_once_t_var_ptr); 528 type pthread_t is 529 array (1 .. 2) of char; 530 for pthread_t'Alignment use ALIGNMENT; 531 type pthread_t_ptr is access constant pthread_t; 532 pragma Convention (C, pthread_t_ptr); 533 type pthread_t_var_ptr is access all pthread_t; 534 pragma Convention (C, pthread_t_var_ptr); 535 type sem_t is 536 array (1 .. 3) of int; 537 for sem_t'Alignment use ALIGNMENT; 538 for sem_t'Size use 96; 539 type sem_t_ptr is access constant sem_t; 540 pragma Convention (C, sem_t_ptr); 541 type sem_t_var_ptr is access all sem_t; 542 pragma Convention (C, sem_t_var_ptr); 543 type sigset_t is 544 array (1 .. 2) of int; 545 for sigset_t'Alignment use ALIGNMENT; 546 for sigset_t'Size use 64; 547 type sigset_t_ptr is access constant sigset_t; 548 pragma Convention (C, sigset_t_ptr); 549 type sigset_t_var_ptr is access all sigset_t; 550 pragma Convention (C, sigset_t_var_ptr); 551 type speed_t is mod 2**32; 552 for speed_t'Size use 32; 553 type timer_t is mod 2**32; 554 for timer_t'Size use 32; 555 type sigval (Dummy : Boolean := True) is record 556 case Dummy is 557 when True => sival_int : int; 558 when False => sival_ptr : System.Address; 559 end case; 560 end record; 561 pragma Unchecked_Union (sigval); 562 null_sigval : constant sigval := 563 (Dummy => False, sival_ptr => System.Null_Address); 564 sigval_byte_size : constant := 4; 565 sigval_alignment : constant := ALIGNMENT; 566 type siginfo_t is record 567 si_signo : int; 568 si_code : int; 569 si_value : sigval; 570 end record; 571 for siginfo_t use record 572 si_signo at 0 range 0 .. 31; 573 si_code at 8 range 0 .. 31; 574 si_value at 4 range 0 .. 31; 575 end record; 576 pragma Convention (C_Pass_By_Copy, siginfo_t); 577 for siginfo_t'Alignment use ALIGNMENT; 578 pragma Warnings (Off); 579 -- There may be holes in the record, due to 580 -- components not defined by POSIX standard. 581 for siginfo_t'Size use 320; 582 pragma Warnings (On); 583 type siginfo_t_ptr is access constant siginfo_t; 584 pragma Convention (C, siginfo_t_ptr); 585 type siginfo_t_var_ptr is access all siginfo_t; 586 pragma Convention (C, siginfo_t_var_ptr); 587 588 ----------------------- 589 -- structure types -- 590 ----------------------- 591 592 type struct_sigevent is record 593 sigev_notify : int; 594 sigev_signo : int; 595 sigev_value : sigval; 596 sigev_notify_function : System.Address; 597 sigev_notify_attributes : System.Address; 598 end record; 599 for struct_sigevent use record 600 sigev_notify at 0 range 0 .. 31; 601 sigev_signo at 4 range 0 .. 31; 602 sigev_value at 8 range 0 .. 31; 603 sigev_notify_function at 12 range 0 .. 31; 604 sigev_notify_attributes at 16 range 0 .. 31; 605 end record; 606 pragma Convention (C_Pass_By_Copy, struct_sigevent); 607 for struct_sigevent'Alignment use ALIGNMENT; 608 pragma Warnings (Off); 609 -- There may be holes in the record, due to 610 -- components not defined by POSIX standard. 611 for struct_sigevent'Size use 160; 612 pragma Warnings (On); 613 type sigevent_ptr is access constant struct_sigevent; 614 pragma Convention (C, sigevent_ptr); 615 type sigevent_var_ptr is access all struct_sigevent; 616 pragma Convention (C, sigevent_var_ptr); 617 type struct_aiocb is record 618 aio_fildes : int; 619 aio_offset : off_t; 620 aio_buf : System.Address; 621 pragma Volatile (aio_buf); 622 aio_nbytes : size_t; 623 aio_reqprio : int; 624 aio_sigevent : struct_sigevent; 625 aio_lio_opcode : int; 626 aio_errno : int; 627 end record; 628 for struct_aiocb use record 629 aio_fildes at 0 range 0 .. 31; 630 aio_offset at 4 range 0 .. 31; 631 aio_buf at 8 range 0 .. 31; 632 aio_nbytes at 12 range 0 .. 31; 633 aio_reqprio at 16 range 0 .. 31; 634 aio_sigevent at 20 range 0 .. 159; 635 aio_lio_opcode at 40 range 0 .. 31; 636 aio_errno at 52 range 0 .. 31; 637 end record; 638 pragma Convention (C_Pass_By_Copy, struct_aiocb); 639 for struct_aiocb'Alignment use ALIGNMENT; 640 pragma Warnings (Off); 641 -- There may be holes in the record, due to 642 -- components not defined by POSIX standard. 643 for struct_aiocb'Size use 544; 644 pragma Warnings (On); 645 type aiocb_ptr is access constant struct_aiocb; 646 pragma Convention (C, aiocb_ptr); 647 type aiocb_var_ptr is access all struct_aiocb; 648 pragma Convention (C, aiocb_var_ptr); 649 type struct_dirent is record 650 d_name : POSIX_String (1 .. 1); 651 end record; 652 for struct_dirent use record 653 d_name at 8 range 0 .. 7; 654 end record; 655 pragma Convention (C_Pass_By_Copy, struct_dirent); 656 for struct_dirent'Alignment use ALIGNMENT; 657 pragma Warnings (Off); 658 -- There may be holes in the record, due to 659 -- components not defined by POSIX standard. 660 for struct_dirent'Size use 2112; 661 pragma Warnings (On); 662 type dirent_ptr is access constant struct_dirent; 663 pragma Convention (C, dirent_ptr); 664 type dirent_var_ptr is access all struct_dirent; 665 pragma Convention (C, dirent_var_ptr); 666 type struct_flock is record 667 l_type : short; 668 l_whence : short; 669 l_start : off_t; 670 l_len : off_t; 671 l_pid : pid_t; 672 end record; 673 for struct_flock use record 674 l_type at 0 range 0 .. 15; 675 l_whence at 2 range 0 .. 15; 676 l_start at 4 range 0 .. 31; 677 l_len at 8 range 0 .. 31; 678 l_pid at 12 range 0 .. 31; 679 end record; 680 pragma Convention (C_Pass_By_Copy, struct_flock); 681 for struct_flock'Alignment use ALIGNMENT; 682 pragma Warnings (Off); 683 -- There may be holes in the record, due to 684 -- components not defined by POSIX standard. 685 for struct_flock'Size use 128; 686 pragma Warnings (On); 687 type flock_ptr is access constant struct_flock; 688 pragma Convention (C, flock_ptr); 689 type flock_var_ptr is access all struct_flock; 690 pragma Convention (C, flock_var_ptr); 691 type struct_group is record 692 gr_name : char_ptr; 693 gr_gid : gid_t; 694 gr_mem : char_ptr_ptr; 695 end record; 696 for struct_group use record 697 gr_name at 0 range 0 .. 31; 698 gr_gid at 8 range 0 .. 31; 699 gr_mem at 12 range 0 .. 31; 700 end record; 701 pragma Convention (C_Pass_By_Copy, struct_group); 702 for struct_group'Alignment use ALIGNMENT; 703 pragma Warnings (Off); 704 -- There may be holes in the record, due to 705 -- components not defined by POSIX standard. 706 for struct_group'Size use 128; 707 pragma Warnings (On); 708 type group_ptr is access constant struct_group; 709 pragma Convention (C, group_ptr); 710 type group_var_ptr is access all struct_group; 711 pragma Convention (C, group_var_ptr); 712 type struct_mq_attr is record 713 mq_flags : long; 714 mq_maxmsg : long; 715 mq_msgsize : long; 716 mq_curmsgs : long; 717 end record; 718 for struct_mq_attr use record 719 mq_flags at 0 range 0 .. 31; 720 mq_maxmsg at 4 range 0 .. 31; 721 mq_msgsize at 8 range 0 .. 31; 722 mq_curmsgs at 12 range 0 .. 31; 723 end record; 724 pragma Convention (C_Pass_By_Copy, struct_mq_attr); 725 for struct_mq_attr'Alignment use ALIGNMENT; 726 pragma Warnings (Off); 727 -- There may be holes in the record, due to 728 -- components not defined by POSIX standard. 729 for struct_mq_attr'Size use 608; 730 pragma Warnings (On); 731 type mq_attr_ptr is access constant struct_mq_attr; 732 pragma Convention (C, mq_attr_ptr); 733 type mq_attr_var_ptr is access all struct_mq_attr; 734 pragma Convention (C, mq_attr_var_ptr); 735 type struct_passwd is record 736 pw_name : char_ptr; 737 pw_uid : uid_t; 738 pw_gid : gid_t; 739 pw_dir : char_ptr; 740 pw_shell : char_ptr; 741 end record; 742 for struct_passwd use record 743 pw_name at 0 range 0 .. 31; 744 pw_uid at 8 range 0 .. 31; 745 pw_gid at 12 range 0 .. 31; 746 pw_dir at 28 range 0 .. 31; 747 pw_shell at 32 range 0 .. 31; 748 end record; 749 pragma Convention (C_Pass_By_Copy, struct_passwd); 750 for struct_passwd'Alignment use ALIGNMENT; 751 pragma Warnings (Off); 752 -- There may be holes in the record, due to 753 -- components not defined by POSIX standard. 754 for struct_passwd'Size use 288; 755 pragma Warnings (On); 756 type passwd_ptr is access constant struct_passwd; 757 pragma Convention (C, passwd_ptr); 758 type passwd_var_ptr is access all struct_passwd; 759 pragma Convention (C, passwd_var_ptr); 760 type struct_sigaction is record 761 sa_handler : System.Address; 762 sa_mask : sigset_t; 763 sa_flags : int; 764 end record; 765 for struct_sigaction use record 766 sa_handler at 0 range 0 .. 31; 767 sa_mask at 4 range 0 .. 63; 768 sa_flags at 12 range 0 .. 31; 769 end record; 770 pragma Convention (C_Pass_By_Copy, struct_sigaction); 771 for struct_sigaction'Alignment use ALIGNMENT; 772 pragma Warnings (Off); 773 -- There may be holes in the record, due to 774 -- components not defined by POSIX standard. 775 for struct_sigaction'Size use 128; 776 pragma Warnings (On); 777 type sigaction_ptr is access constant struct_sigaction; 778 pragma Convention (C, sigaction_ptr); 779 type sigaction_var_ptr is access all struct_sigaction; 780 pragma Convention (C, sigaction_var_ptr); 781 type struct_sched_param is record 782 sched_priority : int; 783 end record; 784 for struct_sched_param use record 785 sched_priority at 0 range 0 .. 31; 786 end record; 787 pragma Convention (C_Pass_By_Copy, struct_sched_param); 788 for struct_sched_param'Alignment use ALIGNMENT; 789 pragma Warnings (Off); 790 -- There may be holes in the record, due to 791 -- components not defined by POSIX standard. 792 for struct_sched_param'Size use 224; 793 pragma Warnings (On); 794 type sched_param_ptr is access constant struct_sched_param; 795 pragma Convention (C, sched_param_ptr); 796 type sched_param_var_ptr is access all struct_sched_param; 797 pragma Convention (C, sched_param_var_ptr); 798 type cc_t_array is array (0 .. NCCS - 1) of cc_t; 799 type struct_stat is record 800 st_mode : mode_t; 801 st_ino : ino_t; 802 st_dev : dev_t; 803 st_nlink : nlink_t; 804 st_uid : uid_t; 805 st_gid : gid_t; 806 st_size : off_t; 807 st_atime : time_t; 808 st_mtime : time_t; 809 st_ctime : time_t; 810 end record; 811 for struct_stat use record 812 st_mode at 8 range 0 .. 31; 813 st_ino at 4 range 0 .. 31; 814 st_dev at 0 range 0 .. 31; 815 st_nlink at 12 range 0 .. 31; 816 st_uid at 16 range 0 .. 31; 817 st_gid at 20 range 0 .. 31; 818 st_size at 28 range 0 .. 31; 819 st_atime at 32 range 0 .. 31; 820 st_mtime at 36 range 0 .. 31; 821 st_ctime at 40 range 0 .. 31; 822 end record; 823 pragma Convention (C_Pass_By_Copy, struct_stat); 824 for struct_stat'Alignment use ALIGNMENT; 825 pragma Warnings (Off); 826 -- There may be holes in the record, due to 827 -- components not defined by POSIX standard. 828 for struct_stat'Size use 416; 829 pragma Warnings (On); 830 type stat_ptr is access constant struct_stat; 831 pragma Convention (C, stat_ptr); 832 type stat_var_ptr is access all struct_stat; 833 pragma Convention (C, stat_var_ptr); 834 function To_Stat_Ptr is new Unchecked_Conversion (Address, stat_ptr); 835 type struct_termios is record 836 c_iflag : tcflag_t; 837 c_oflag : tcflag_t; 838 c_cflag : tcflag_t; 839 c_lflag : tcflag_t; 840 c_cc : cc_t_array; 841 end record; 842 for struct_termios use record 843 c_iflag at 0 range 0 .. 15; 844 c_oflag at 2 range 0 .. 15; 845 c_cflag at 4 range 0 .. 15; 846 c_lflag at 6 range 0 .. 15; 847 c_cc at 9 range 0 .. 71; 848 end record; 849 pragma Convention (C_Pass_By_Copy, struct_termios); 850 for struct_termios'Alignment use ALIGNMENT; 851 pragma Warnings (Off); 852 -- There may be holes in the record, due to 853 -- components not defined by POSIX standard. 854 for struct_termios'Size use 144; 855 pragma Warnings (On); 856 type termios_ptr is access constant struct_termios; 857 pragma Convention (C, termios_ptr); 858 type termios_var_ptr is access all struct_termios; 859 pragma Convention (C, termios_var_ptr); 860 861 -- timeval structure -- 862 type struct_timeval is record 863 tv_sec : time_t; 864 tv_usec : suseconds_t; 865 end record; 866 for struct_timeval use record 867 tv_sec at 0 range 0 .. 31; 868 tv_usec at 4 range 0 .. 31; 869 end record; 870 pragma Convention (C_Pass_By_Copy, struct_timeval); 871 for struct_timeval'Alignment use ALIGNMENT; 872 pragma Warnings (Off); 873 -- There may be holes in the record, due to 874 -- components not defined by POSIX standard. 875 for struct_timeval'Size use 64; 876 pragma Warnings (On); 877 type timeval_ptr is access constant struct_timeval; 878 pragma Convention (C, timeval_ptr); 879 type timeval_var_ptr is access all struct_timeval; 880 pragma Convention (C, timeval_var_ptr); 881 type struct_timespec is record 882 tv_sec : time_t; 883 tv_nsec : long; 884 end record; 885 for struct_timespec use record 886 tv_sec at 0 range 0 .. 31; 887 tv_nsec at 4 range 0 .. 31; 888 end record; 889 pragma Convention (C_Pass_By_Copy, struct_timespec); 890 for struct_timespec'Alignment use ALIGNMENT; 891 pragma Warnings (Off); 892 -- There may be holes in the record, due to 893 -- components not defined by POSIX standard. 894 for struct_timespec'Size use 64; 895 pragma Warnings (On); 896 type timespec_ptr is access constant struct_timespec; 897 pragma Convention (C, timespec_ptr); 898 type timespec_var_ptr is access all struct_timespec; 899 pragma Convention (C, timespec_var_ptr); 900 type struct_itimerspec is record 901 it_interval : struct_timespec; 902 it_value : struct_timespec; 903 end record; 904 for struct_itimerspec use record 905 it_interval at 0 range 0 .. 63; 906 it_value at 8 range 0 .. 63; 907 end record; 908 pragma Convention (C_Pass_By_Copy, struct_itimerspec); 909 for struct_itimerspec'Alignment use ALIGNMENT; 910 pragma Warnings (Off); 911 -- There may be holes in the record, due to 912 -- components not defined by POSIX standard. 913 for struct_itimerspec'Size use 128; 914 pragma Warnings (On); 915 type itimerspec_ptr is access constant struct_itimerspec; 916 pragma Convention (C, itimerspec_ptr); 917 type itimerspec_var_ptr is access all struct_itimerspec; 918 pragma Convention (C, itimerspec_var_ptr); 919 type struct_tm is record 920 tm_sec : int; 921 tm_min : int; 922 tm_hour : int; 923 tm_mday : int; 924 tm_mon : int; 925 tm_year : int; 926 tm_wday : int; 927 tm_yday : int; 928 tm_isdst : int; 929 end record; 930 for struct_tm use record 931 tm_sec at 0 range 0 .. 31; 932 tm_min at 4 range 0 .. 31; 933 tm_hour at 8 range 0 .. 31; 934 tm_mday at 12 range 0 .. 31; 935 tm_mon at 16 range 0 .. 31; 936 tm_year at 20 range 0 .. 31; 937 tm_wday at 24 range 0 .. 31; 938 tm_yday at 28 range 0 .. 31; 939 tm_isdst at 32 range 0 .. 31; 940 end record; 941 pragma Convention (C_Pass_By_Copy, struct_tm); 942 for struct_tm'Alignment use ALIGNMENT; 943 pragma Warnings (Off); 944 -- There may be holes in the record, due to 945 -- components not defined by POSIX standard. 946 for struct_tm'Size use 288; 947 pragma Warnings (On); 948 type tm_ptr is access constant struct_tm; 949 pragma Convention (C, tm_ptr); 950 type tm_var_ptr is access all struct_tm; 951 pragma Convention (C, tm_var_ptr); 952 type struct_tms is record 953 tms_utime : clock_t; 954 tms_stime : clock_t; 955 tms_cutime : clock_t; 956 tms_cstime : clock_t; 957 end record; 958 for struct_tms use record 959 tms_utime at 0 range 0 .. 31; 960 tms_stime at 4 range 0 .. 31; 961 tms_cutime at 8 range 0 .. 31; 962 tms_cstime at 12 range 0 .. 31; 963 end record; 964 pragma Convention (C_Pass_By_Copy, struct_tms); 965 for struct_tms'Alignment use ALIGNMENT; 966 pragma Warnings (Off); 967 -- There may be holes in the record, due to 968 -- components not defined by POSIX standard. 969 for struct_tms'Size use 128; 970 pragma Warnings (On); 971 type tms_ptr is access constant struct_tms; 972 pragma Convention (C, tms_ptr); 973 type tms_var_ptr is access all struct_tms; 974 pragma Convention (C, tms_var_ptr); 975 type struct_utimbuf is record 976 modtime : time_t; 977 actime : time_t; 978 end record; 979 for struct_utimbuf use record 980 modtime at 4 range 0 .. 31; 981 actime at 0 range 0 .. 31; 982 end record; 983 pragma Convention (C_Pass_By_Copy, struct_utimbuf); 984 for struct_utimbuf'Alignment use ALIGNMENT; 985 pragma Warnings (Off); 986 -- There may be holes in the record, due to 987 -- components not defined by POSIX standard. 988 for struct_utimbuf'Size use 64; 989 pragma Warnings (On); 990 type utimbuf_ptr is access constant struct_utimbuf; 991 pragma Convention (C, utimbuf_ptr); 992 type utimbuf_var_ptr is access all struct_utimbuf; 993 pragma Convention (C, utimbuf_var_ptr); 994 subtype utsname_sysname_string is 995 POSIX_String (1 .. 256); 996 subtype utsname_nodename_string is 997 POSIX_String (1 .. 256); 998 subtype utsname_release_string is 999 POSIX_String (1 .. 9); 1000 subtype utsname_version_string is 1001 POSIX_String (1 .. 9); 1002 subtype utsname_machine_string is 1003 POSIX_String (1 .. 9); 1004 type struct_utsname is record 1005 sysname : utsname_sysname_string; 1006 nodename : utsname_nodename_string; 1007 release : utsname_release_string; 1008 version : utsname_version_string; 1009 machine : utsname_machine_string; 1010 end record; 1011 for struct_utsname use record 1012 sysname at 0 range 0 .. 2047; 1013 nodename at 256 range 0 .. 2047; 1014 release at 512 range 0 .. 71; 1015 version at 521 range 0 .. 71; 1016 machine at 530 range 0 .. 71; 1017 end record; 1018 pragma Convention (C_Pass_By_Copy, struct_utsname); 1019 for struct_utsname'Alignment use ALIGNMENT; 1020 pragma Warnings (Off); 1021 -- There may be holes in the record, due to 1022 -- components not defined by POSIX standard. 1023 for struct_utsname'Size use 4312; 1024 pragma Warnings (On); 1025 type utsname_ptr is access constant struct_utsname; 1026 pragma Convention (C, utsname_ptr); 1027 type utsname_var_ptr is access all struct_utsname; 1028 pragma Convention (C, utsname_var_ptr); 1029 1030 ---------------------------------- 1031 -- link names for C functions -- 1032 ---------------------------------- 1033 1034 HAVE_access : constant Boolean := True; 1035 access_LINKNAME : constant String := "access"; 1036 1037 HAVE_aio_cancel : constant Boolean := True; 1038 aio_cancel_LINKNAME : constant String := "aio_cancel"; 1039 HAVE_aio_error : constant Boolean := True; 1040 aio_error_LINKNAME : constant String := "aio_error"; 1041 HAVE_aio_fsync : constant Boolean := True; 1042 aio_fsync_LINKNAME : constant String := "aio_fsync"; 1043 HAVE_aio_read : constant Boolean := True; 1044 aio_read_LINKNAME : constant String := "aio_read"; 1045 HAVE_aio_return : constant Boolean := True; 1046 aio_return_LINKNAME : constant String := "aio_return"; 1047 HAVE_aio_suspend : constant Boolean := True; 1048 aio_suspend_LINKNAME : constant String := "aio_suspend"; 1049 HAVE_aio_write : constant Boolean := True; 1050 aio_write_LINKNAME : constant String := "aio_write"; 1051 1052 HAVE_cfgetispeed : constant Boolean := True; 1053 cfgetispeed_LINKNAME : constant String := "cfgetispeed"; 1054 HAVE_cfgetospeed : constant Boolean := True; 1055 cfgetospeed_LINKNAME : constant String := "cfgetospeed"; 1056 HAVE_cfsetispeed : constant Boolean := True; 1057 cfsetispeed_LINKNAME : constant String := "cfsetispeed"; 1058 HAVE_cfsetospeed : constant Boolean := True; 1059 cfsetospeed_LINKNAME : constant String := "cfsetospeed"; 1060 HAVE_chdir : constant Boolean := True; 1061 chdir_LINKNAME : constant String := "chdir"; 1062 HAVE_chmod : constant Boolean := True; 1063 chmod_LINKNAME : constant String := "chmod"; 1064 HAVE_chown : constant Boolean := True; 1065 chown_LINKNAME : constant String := "chown"; 1066 HAVE_clock_getres : constant Boolean := True; 1067 clock_getres_LINKNAME : constant String := "clock_getres"; 1068 HAVE_clock_gettime : constant Boolean := True; 1069 clock_gettime_LINKNAME : constant String := "clock_gettime"; 1070 HAVE_clock_settime : constant Boolean := True; 1071 clock_settime_LINKNAME : constant String := "clock_settime"; 1072 HAVE_close : constant Boolean := True; 1073 close_LINKNAME : constant String := "close"; 1074 HAVE_closedir : constant Boolean := True; 1075 closedir_LINKNAME : constant String := "closedir"; 1076 HAVE_ctermid : constant Boolean := True; 1077 ctermid_LINKNAME : constant String := "ctermid"; 1078 HAVE_ctime : constant Boolean := True; 1079 ctime_LINKNAME : constant String := "ctime"; 1080 HAVE_ctime_r : constant Boolean := True; 1081 ctime_r_LINKNAME : constant String := "ctime_r"; 1082 HAVE_dup : constant Boolean := True; 1083 dup_LINKNAME : constant String := "dup"; 1084 HAVE_dup2 : constant Boolean := True; 1085 dup2_LINKNAME : constant String := "dup2"; 1086 HAVE_execl : constant Boolean := True; 1087 execl_LINKNAME : constant String := "execl"; 1088 HAVE_execle : constant Boolean := True; 1089 execle_LINKNAME : constant String := "execle"; 1090 HAVE_execlp : constant Boolean := True; 1091 execlp_LINKNAME : constant String := "execlp"; 1092 HAVE_execv : constant Boolean := True; 1093 execv_LINKNAME : constant String := "execv"; 1094 HAVE_execve : constant Boolean := True; 1095 execve_LINKNAME : constant String := "execve"; 1096 HAVE_execvp : constant Boolean := True; 1097 execvp_LINKNAME : constant String := "execvp"; 1098 HAVE_fchmod : constant Boolean := True; 1099 fchmod_LINKNAME : constant String := "fchmod"; 1100 HAVE_fcntl : constant Boolean := True; 1101 fcntl_LINKNAME : constant String := "fcntl"; 1102 HAVE_fdatasync : constant Boolean := True; 1103 fdatasync_LINKNAME : constant String := "fdatasync"; 1104 HAVE_fork : constant Boolean := True; 1105 fork_LINKNAME : constant String := "fork"; 1106 HAVE_fpathconf : constant Boolean := True; 1107 fpathconf_LINKNAME : constant String := "fpathconf"; 1108 HAVE_fstat : constant Boolean := True; 1109 fstat_LINKNAME : constant String := "fstat"; 1110 HAVE_fsync : constant Boolean := True; 1111 fsync_LINKNAME : constant String := "fsync"; 1112 HAVE_ftruncate : constant Boolean := True; 1113 ftruncate_LINKNAME : constant String := "ftruncate"; 1114 HAVE_getcwd : constant Boolean := True; 1115 getcwd_LINKNAME : constant String := "getcwd"; 1116 HAVE_getegid : constant Boolean := True; 1117 getegid_LINKNAME : constant String := "getegid"; 1118 HAVE_getenv : constant Boolean := True; 1119 getenv_LINKNAME : constant String := "getenv"; 1120 HAVE_geteuid : constant Boolean := True; 1121 geteuid_LINKNAME : constant String := "geteuid"; 1122 HAVE_getgid : constant Boolean := True; 1123 getgid_LINKNAME : constant String := "getgid"; 1124 HAVE_getgrgid : constant Boolean := True; 1125 getgrgid_LINKNAME : constant String := "getgrgid"; 1126 HAVE_getgrnam : constant Boolean := True; 1127 getgrnam_LINKNAME : constant String := "getgrnam"; 1128 HAVE_getgroups : constant Boolean := True; 1129 getgroups_LINKNAME : constant String := "getgroups"; 1130 HAVE_getlogin : constant Boolean := True; 1131 getlogin_LINKNAME : constant String := "getlogin"; 1132 HAVE_getpgrp : constant Boolean := True; 1133 getpgrp_LINKNAME : constant String := "getpgrp"; 1134 HAVE_getpid : constant Boolean := True; 1135 getpid_LINKNAME : constant String := "getpid"; 1136 HAVE_getppid : constant Boolean := True; 1137 getppid_LINKNAME : constant String := "getppid"; 1138 HAVE_getpwnam : constant Boolean := True; 1139 getpwnam_LINKNAME : constant String := "getpwnam"; 1140 HAVE_getpwuid : constant Boolean := True; 1141 getpwuid_LINKNAME : constant String := "getpwuid"; 1142 HAVE_gettimeofday : constant Boolean := True; 1143 gettimeofday_LINKNAME : constant String := "gettimeofday"; 1144 HAVE_getuid : constant Boolean := True; 1145 getuid_LINKNAME : constant String := "getuid"; 1146 HAVE_gmtime_r : constant Boolean := True; 1147 gmtime_r_LINKNAME : constant String := "gmtime_r"; 1148 HAVE_isatty : constant Boolean := True; 1149 isatty_LINKNAME : constant String := "isatty"; 1150 HAVE_kill : constant Boolean := True; 1151 kill_LINKNAME : constant String := "kill"; 1152 HAVE_link : constant Boolean := True; 1153 link_LINKNAME : constant String := "link"; 1154 HAVE_lio_listio : constant Boolean := True; 1155 lio_listio_LINKNAME : constant String := "lio_listio"; 1156 HAVE_lstat : constant Boolean := True; 1157 lstat_LINKNAME : constant String := "lstat"; 1158 HAVE_lseek : constant Boolean := True; 1159 lseek_LINKNAME : constant String := "lseek"; 1160 HAVE_mkdir : constant Boolean := True; 1161 mkdir_LINKNAME : constant String := "mkdir"; 1162 HAVE_mkfifo : constant Boolean := True; 1163 mkfifo_LINKNAME : constant String := "mkfifo"; 1164 HAVE_mlock : constant Boolean := True; 1165 mlock_LINKNAME : constant String := "mlock"; 1166 HAVE_mlockall : constant Boolean := True; 1167 mlockall_LINKNAME : constant String := "mlockall"; 1168 HAVE_mmap : constant Boolean := True; 1169 mmap_LINKNAME : constant String := "mmap"; 1170 HAVE_mprotect : constant Boolean := True; 1171 mprotect_LINKNAME : constant String := "mprotect"; 1172 HAVE_mq_close : constant Boolean := True; 1173 mq_close_LINKNAME : constant String := "mq_close"; 1174 HAVE_mq_getattr : constant Boolean := True; 1175 mq_getattr_LINKNAME : constant String := "mq_getattr"; 1176 HAVE_mq_notify : constant Boolean := True; 1177 mq_notify_LINKNAME : constant String := "mq_notify"; 1178 HAVE_mq_open : constant Boolean := True; 1179 mq_open_LINKNAME : constant String := "mq_open"; 1180 HAVE_mq_receive : constant Boolean := True; 1181 mq_receive_LINKNAME : constant String := "mq_receive"; 1182 HAVE_mq_send : constant Boolean := True; 1183 mq_send_LINKNAME : constant String := "mq_send"; 1184 HAVE_mq_setattr : constant Boolean := True; 1185 mq_setattr_LINKNAME : constant String := "mq_setattr"; 1186 HAVE_mq_unlink : constant Boolean := True; 1187 mq_unlink_LINKNAME : constant String := "mq_unlink"; 1188 HAVE_msync : constant Boolean := True; 1189 msync_LINKNAME : constant String := "msync"; 1190 HAVE_munlock : constant Boolean := True; 1191 munlock_LINKNAME : constant String := "munlock"; 1192 HAVE_munlockall : constant Boolean := True; 1193 munlockall_LINKNAME : constant String := "munlockall"; 1194 HAVE_munmap : constant Boolean := True; 1195 munmap_LINKNAME : constant String := "munmap"; 1196 HAVE_open : constant Boolean := True; 1197 open_LINKNAME : constant String := "open"; 1198 HAVE_opendir : constant Boolean := True; 1199 opendir_LINKNAME : constant String := "opendir"; 1200 HAVE_pathconf : constant Boolean := True; 1201 pathconf_LINKNAME : constant String := "pathconf"; 1202 HAVE_pipe : constant Boolean := True; 1203 pipe_LINKNAME : constant String := "pipe"; 1204 pthread_cond_broadcast_LINKNAME : constant String := 1205 "pthread_cond_broadcast"; 1206 pthread_cond_destroy_LINKNAME : constant String := "pthread_cond_destroy"; 1207 pthread_cond_init_LINKNAME : constant String := "pthread_cond_init"; 1208 pthread_cond_signal_LINKNAME : constant String := "pthread_cond_signal"; 1209 pthread_cond_timedwait_LINKNAME : constant String := 1210 "pthread_cond_timedwait"; 1211 pthread_cond_wait_LINKNAME : constant String := "pthread_cond_wait"; 1212 pthread_condattr_destroy_LINKNAME : constant String := 1213 "pthread_condattr_destroy"; 1214 pthread_condattr_getpshared_LINKNAME : constant String := 1215 "pthread_condattr_getpshared"; 1216 pthread_condattr_init_LINKNAME : constant String := 1217 "pthread_condattr_init"; 1218 pthread_condattr_setpshared_LINKNAME : constant String := 1219 "pthread_condattr_setpshared"; 1220 pthread_mutex_destroy_LINKNAME : constant String := 1221 "pthread_mutex_destroy"; 1222 pthread_mutex_getprioceiling_LINKNAME : constant String := 1223 "pthread_mutex_getprioceiling"; 1224 pthread_mutex_init_LINKNAME : constant String := "pthread_mutex_init"; 1225 pthread_mutex_lock_LINKNAME : constant String := "pthread_mutex_lock"; 1226 pthread_mutex_setprioceiling_LINKNAME : constant String := 1227 "pthread_mutex_setprioceiling"; 1228 pthread_mutex_trylock_LINKNAME : constant String := 1229 "pthread_mutex_trylock"; 1230 pthread_mutex_unlock_LINKNAME : constant String := "pthread_mutex_unlock"; 1231 pthread_mutexattr_destroy_LINKNAME : constant String := 1232 "pthread_mutexattr_destroy"; 1233 pthread_mutexattr_getprioceiling_LINKNAME : constant String := 1234 "pthread_mutexattr_getprioceiling"; 1235 pthread_mutexattr_getprotocol_LINKNAME : constant String := 1236 "pthread_mutexattr_getprotocol"; 1237 pthread_mutexattr_getpshared_LINKNAME : constant String := 1238 "pthread_mutexattr_getpshared"; 1239 pthread_mutexattr_init_LINKNAME : constant String := 1240 "pthread_mutexattr_init"; 1241 pthread_mutexattr_setprioceiling_LINKNAME : constant String := 1242 "pthread_mutexattr_setprioceiling"; 1243 pthread_mutexattr_setprotocol_LINKNAME : constant String := 1244 "pthread_mutexattr_setprotocol"; 1245 pthread_mutexattr_setpshared_LINKNAME : constant String := 1246 "pthread_mutexattr_setpshared"; 1247 pthread_sigmask_LINKNAME : constant String := "pthread_sigmask"; 1248 HAVE_putenv : constant Boolean := True; 1249 putenv_LINKNAME : constant String := "putenv"; 1250 HAVE_read : constant Boolean := True; 1251 read_LINKNAME : constant String := "read"; 1252 HAVE_readdir : constant Boolean := True; 1253 readdir_LINKNAME : constant String := "readdir"; 1254 HAVE_readdir_r : constant Boolean := True; 1255 readdir_r_LINKNAME : constant String := "readdir_r"; 1256 HAVE_rename : constant Boolean := True; 1257 rename_LINKNAME : constant String := "rename"; 1258 HAVE_rmdir : constant Boolean := True; 1259 rmdir_LINKNAME : constant String := "rmdir"; 1260 HAVE_sched_get_priority_max : constant Boolean := True; 1261 sched_get_priority_max_LINKNAME : constant String := 1262 "sched_get_priority_max"; 1263 HAVE_sched_get_priority_min : constant Boolean := True; 1264 sched_get_priority_min_LINKNAME : constant String := 1265 "sched_get_priority_min"; 1266 HAVE_sched_rr_get_interval : constant Boolean := True; 1267 sched_rr_get_interval_LINKNAME : constant String := 1268 "sched_rr_get_interval"; 1269 HAVE_sched_getparam : constant Boolean := True; 1270 sched_getparam_LINKNAME : constant String := "sched_getparam"; 1271 HAVE_sched_getscheduler : constant Boolean := True; 1272 sched_getscheduler_LINKNAME : constant String := "sched_getscheduler"; 1273 HAVE_sched_setparam : constant Boolean := True; 1274 sched_setparam_LINKNAME : constant String := "sched_setparam"; 1275 HAVE_sched_setscheduler : constant Boolean := True; 1276 sched_setscheduler_LINKNAME : constant String := "sched_setscheduler"; 1277 HAVE_sched_yield : constant Boolean := True; 1278 sched_yield_LINKNAME : constant String := "sched_yield"; 1279 HAVE_sem_close : constant Boolean := True; 1280 sem_close_LINKNAME : constant String := "sem_close"; 1281 HAVE_sem_destroy : constant Boolean := True; 1282 sem_destroy_LINKNAME : constant String := "sem_destroy"; 1283 HAVE_sem_getvalue : constant Boolean := True; 1284 sem_getvalue_LINKNAME : constant String := "sem_getvalue"; 1285 HAVE_sem_init : constant Boolean := True; 1286 sem_init_LINKNAME : constant String := "sem_init"; 1287 HAVE_sem_open : constant Boolean := True; 1288 sem_open_LINKNAME : constant String := "sem_open"; 1289 HAVE_sem_post : constant Boolean := True; 1290 sem_post_LINKNAME : constant String := "sem_post"; 1291 HAVE_sem_trywait : constant Boolean := True; 1292 sem_trywait_LINKNAME : constant String := "sem_trywait"; 1293 HAVE_sem_unlink : constant Boolean := True; 1294 sem_unlink_LINKNAME : constant String := "sem_unlink"; 1295 HAVE_sem_wait : constant Boolean := True; 1296 sem_wait_LINKNAME : constant String := "sem_wait"; 1297 HAVE_setenv : constant Boolean := True; 1298 setenv_LINKNAME : constant String := "setenv"; 1299 HAVE_setgid : constant Boolean := True; 1300 setgid_LINKNAME : constant String := "setgid"; 1301 HAVE_setpgid : constant Boolean := True; 1302 setpgid_LINKNAME : constant String := "setpgid"; 1303 HAVE_setsid : constant Boolean := True; 1304 setsid_LINKNAME : constant String := "setsid"; 1305 HAVE_setuid : constant Boolean := True; 1306 setuid_LINKNAME : constant String := "setuid"; 1307 HAVE_shm_open : constant Boolean := True; 1308 shm_open_LINKNAME : constant String := "shm_open"; 1309 HAVE_shm_unlink : constant Boolean := True; 1310 shm_unlink_LINKNAME : constant String := "shm_unlink"; 1311 HAVE_sigaction : constant Boolean := True; 1312 sigaction_LINKNAME : constant String := "sigaction"; 1313 HAVE_sigaddset : constant Boolean := True; 1314 sigaddset_LINKNAME : constant String := "sigaddset"; 1315 HAVE_sigdelset : constant Boolean := True; 1316 sigdelset_LINKNAME : constant String := "sigdelset"; 1317 HAVE_sigemptyset : constant Boolean := True; 1318 sigemptyset_LINKNAME : constant String := "sigemptyset"; 1319 HAVE_sigfillset : constant Boolean := True; 1320 sigfillset_LINKNAME : constant String := "sigfillset"; 1321 HAVE_sigismember : constant Boolean := True; 1322 sigismember_LINKNAME : constant String := "sigismember"; 1323 HAVE_sigpending : constant Boolean := True; 1324 sigpending_LINKNAME : constant String := "sigpending"; 1325 HAVE_sigprocmask : constant Boolean := True; 1326 sigprocmask_LINKNAME : constant String := "sigprocmask"; 1327 HAVE_sigqueue : constant Boolean := True; 1328 sigqueue_LINKNAME : constant String := "sigqueue"; 1329 HAVE_sigtimedwait : constant Boolean := True; 1330 sigtimedwait_LINKNAME : constant String := "sigtimedwait"; 1331 HAVE_sigwait : constant Boolean := True; 1332 sigwait_LINKNAME : constant String := "sigwait"; 1333 HAVE_sigwaitinfo : constant Boolean := True; 1334 sigwaitinfo_LINKNAME : constant String := "sigwaitinfo"; 1335 HAVE_stat : constant Boolean := True; 1336 stat_LINKNAME : constant String := "stat"; 1337 HAVE_sysconf : constant Boolean := True; 1338 sysconf_LINKNAME : constant String := "sysconf"; 1339 HAVE_tcdrain : constant Boolean := True; 1340 tcdrain_LINKNAME : constant String := "tcdrain"; 1341 HAVE_tcflow : constant Boolean := True; 1342 tcflow_LINKNAME : constant String := "tcflow"; 1343 HAVE_tcflush : constant Boolean := True; 1344 tcflush_LINKNAME : constant String := "tcflush"; 1345 HAVE_tcgetattr : constant Boolean := True; 1346 tcgetattr_LINKNAME : constant String := "tcgetattr"; 1347 HAVE_tcgetpgrp : constant Boolean := True; 1348 tcgetpgrp_LINKNAME : constant String := "tcgetpgrp"; 1349 HAVE_tcsendbreak : constant Boolean := True; 1350 tcsendbreak_LINKNAME : constant String := "tcsendbreak"; 1351 HAVE_tcsetattr : constant Boolean := True; 1352 tcsetattr_LINKNAME : constant String := "tcsetattr"; 1353 HAVE_tcsetpgrp : constant Boolean := True; 1354 tcsetpgrp_LINKNAME : constant String := "tcsetpgrp"; 1355 HAVE_time : constant Boolean := True; 1356 time_LINKNAME : constant String := "time"; 1357 HAVE_timer_create : constant Boolean := True; 1358 timer_create_LINKNAME : constant String := "timer_create"; 1359 HAVE_timer_delete : constant Boolean := True; 1360 timer_delete_LINKNAME : constant String := "timer_delete"; 1361 HAVE_timer_getoverrun : constant Boolean := True; 1362 timer_getoverrun_LINKNAME : constant String := "timer_getoverrun"; 1363 HAVE_timer_gettime : constant Boolean := True; 1364 timer_gettime_LINKNAME : constant String := "timer_gettime"; 1365 HAVE_timer_settime : constant Boolean := True; 1366 timer_settime_LINKNAME : constant String := "timer_settime"; 1367 HAVE_times : constant Boolean := True; 1368 times_LINKNAME : constant String := "times"; 1369 HAVE_ttyname : constant Boolean := True; 1370 ttyname_LINKNAME : constant String := "ttyname"; 1371 HAVE_umask : constant Boolean := True; 1372 umask_LINKNAME : constant String := "umask"; 1373 HAVE_uname : constant Boolean := True; 1374 uname_LINKNAME : constant String := "uname"; 1375 HAVE_unlink : constant Boolean := True; 1376 unlink_LINKNAME : constant String := "unlink"; 1377 HAVE_unsetenv : constant Boolean := True; 1378 unsetenv_LINKNAME : constant String := "unsetenv"; 1379 HAVE_utime : constant Boolean := True; 1380 utime_LINKNAME : constant String := "utime"; 1381 HAVE_waitpid : constant Boolean := True; 1382 waitpid_LINKNAME : constant String := "waitpid"; 1383 HAVE_write : constant Boolean := True; 1384 write_LINKNAME : constant String := "write"; 1385 1386 ------------------------------ 1387 -- C functions for macros -- 1388 ------------------------------ 1389 1390 function s_isdir (mode : mode_t) return int; 1391 pragma Import (C, s_isdir, "s_isdir"); 1392 function s_ischr (mode : mode_t) return int; 1393 pragma Import (C, s_ischr, "s_ischr"); 1394 function s_isblk (mode : mode_t) return int; 1395 pragma Import (C, s_isblk, "s_isblk"); 1396 function s_islnk (mode : mode_t) return int; 1397 pragma Import (C, s_islnk, "s_islnk"); 1398 function s_isreg (mode : mode_t) return int; 1399 pragma Import (C, s_isreg, "s_isreg"); 1400 function s_isfifo (mode : mode_t) return int; 1401 pragma Import (C, s_isfifo, "s_isfifo"); 1402 function s_ismsg (mode : mode_t) return int; 1403 pragma Import (C, s_ismsg, "s_ismsg"); 1404 function s_issem (mode : mode_t) return int; 1405 pragma Import (C, s_issem, "s_issem"); 1406 function s_isshm (mode : mode_t) return int; 1407 pragma Import (C, s_isshm, "s_isshm"); 1408 function s_issock (mode : mode_t) return int; 1409 pragma Import (C, s_issock, "s_issock"); 1410 function s_typeismq (stat : stat_ptr) return int; 1411 pragma Import (C, s_typeismq, "s_typeismq"); 1412 function s_typeissem (stat : stat_ptr) return int; 1413 pragma Import (C, s_typeissem, "s_typeissem"); 1414 function s_typeisshm (stat : stat_ptr) return int; 1415 pragma Import (C, s_typeisshm, "s_typeisshm"); 1416 function wifexited (stat_val : int) return int; 1417 pragma Import (C, wifexited, "wifexited"); 1418 function wifexitstatus (stat_val : int) return int; 1419 pragma Import (C, wifexitstatus, "wifexitstatus"); 1420 function wifsignaled (stat_val : int) return int; 1421 pragma Import (C, wifsignaled, "wifsignaled"); 1422 function wiftermsig (stat_val : int) return int; 1423 pragma Import (C, wiftermsig, "wiftermsig"); 1424 function wifstopped (stat_val : int) return int; 1425 pragma Import (C, wifstopped, "wifstopped"); 1426 function wifstopsig (stat_val : int) return int; 1427 pragma Import (C, wifstopsig, "wifstopsig"); 1428 package Sockets is 1429 1430 ---------------- 1431 -- socket.h -- 1432 ---------------- 1433 1434 type sa_family_t is mod 2**8; 1435 for sa_family_t'Size use 8; 1436 -- *** MISSING: in_port_t *** -- 1437 type in_port_t is mod 2**16; 1438 for in_port_t'Size use 16; 1439 1440 ----------------- 1441 -- constants -- 1442 ----------------- 1443 1444 HOST_NOT_FOUND : constant := 1; 1445 NO_DATA : constant := 4; 1446 NO_RECOVERY : constant := 3; 1447 TRY_AGAIN : constant := 2; 1448 -- *** MISSING: MAX_SOCKADDR_EXT *** -- 1449 MAX_SOCKADDR_EXT : constant := 108; 1450 1451 -- sockets protocol level -- 1452 SOL_SOCKET : constant := 65535; 1453 1454 -- socket types -- 1455 SOCK_STREAM : constant := 1; 1456 SOCK_DGRAM : constant := 2; 1457 SOCK_RAW : constant := 3; 1458 SOCK_SEQPACKET : constant := 5; 1459 1460 -- address families -- 1461 AF_MAX : constant := 35; 1462 AF_UNSPEC : constant := 0; 1463 AF_UNIX : constant := 1; 1464 AF_LOCAL : constant := 1; 1465 AF_INET : constant := 2; 1466 AF_OSI : constant := 7; 1467 AF_ISO : constant := 7; 1468 1469 -- protocol families -- 1470 PF_MAX : constant := 35; 1471 PF_UNSPEC : constant := 0; 1472 PF_LOCAL : constant := 1; 1473 PF_UNIX : constant := 1; 1474 PF_INET : constant := 2; 1475 PF_OSI : constant := 7; 1476 PF_ISO : constant := 7; 1477 1478 -- socket options -- 1479 SO_BROADCAST : constant := 32; 1480 SO_DEBUG : constant := 1; 1481 SO_DONTROUTE : constant := 16; 1482 SO_ERROR : constant := 4103; 1483 SO_KEEPALIVE : constant := 8; 1484 SO_LINGER : constant := 128; 1485 SO_OOBINLINE : constant := 256; 1486 SO_RCVBUF : constant := 4098; 1487 SO_RCVLOWAT : constant := 4100; 1488 SO_RCVTIMEO : constant := 4102; 1489 SO_REUSEADDR : constant := 4; 1490 SO_SNDBUF : constant := 4097; 1491 SO_SNDLOWAT : constant := 4099; 1492 SO_SNDTIMEO : constant := 4101; 1493 SO_TYPE : constant := 4104; 1494 1495 -- max queued connections -- 1496 SOMAXCONN : constant := 128; 1497 1498 -- send & receive option flag bits -- 1499 MSG_OOB : constant := 1; 1500 MSG_PEEK : constant := 2; 1501 MSG_DONTROUTE : constant := 4; 1502 MSG_EOR : constant := 128; 1503 MSG_TRUNC : constant := 32; 1504 MSG_CTRUNC : constant := 8; 1505 MSG_WAITALL : constant := 256; 1506 -- *** MISSING: MSG_MAXIOVLEN *** -- 1507 MSG_MAXIOVLEN : constant := 0; 1508 1509 -- socket address information option flag bits -- 1510 AI_PASSIVE : constant := 1; 1511 AI_CANONNAME : constant := 2; 1512 1513 -- scoket shutdown mode flag bits -- 1514 SHUT_RD : constant := 0; 1515 SHUT_WR : constant := 1; 1516 SHUT_RDWR : constant := 2; 1517 1518 ------------------ 1519 -- structures -- 1520 ------------------ 1521 1522 1523 -- generic socket address -- 1524 type struct_sockaddr is record 1525 sa_family : sa_family_t; 1526 sa_data : POSIX_String (1 .. 14); 1527 end record; 1528 for struct_sockaddr use record 1529 sa_family at 1 range 0 .. 7; 1530 sa_data at 2 range 0 .. 111; 1531 end record; 1532 pragma Convention (C_Pass_By_Copy, struct_sockaddr); 1533 for struct_sockaddr'Alignment use ALIGNMENT; 1534 pragma Warnings (Off); 1535 -- There may be holes in the record, due to 1536 -- components not defined by POSIX standard. 1537 for struct_sockaddr'Size use 128; 1538 pragma Warnings (On); 1539 type sockaddr_ptr is access constant struct_sockaddr; 1540 pragma Convention (C, sockaddr_ptr); 1541 type sockaddr_var_ptr is access all struct_sockaddr; 1542 pragma Convention (C, sockaddr_var_ptr); 1543 1544 -- struct addrinfo... -- 1545 type struct_addrinfo; 1546 type addrinfo_ptr is access constant struct_addrinfo; 1547 pragma Convention (C, addrinfo_ptr); 1548 type addrinfo_var_ptr is access all struct_addrinfo; 1549 pragma Convention (C, addrinfo_var_ptr); 1550 type struct_addrinfo is record 1551 ai_flags : int; 1552 ai_family : int; 1553 ai_socktype : int; 1554 ai_protocol : int; 1555 ai_addrlen : size_t; 1556 ai_addr : sockaddr_ptr; 1557 ai_canonname : char_ptr; 1558 ai_next : addrinfo_ptr; 1559 end record; 1560 for struct_addrinfo use record 1561 ai_flags at 0 range 0 .. 31; 1562 ai_family at 4 range 0 .. 31; 1563 ai_socktype at 8 range 0 .. 31; 1564 ai_protocol at 12 range 0 .. 31; 1565 ai_addrlen at 16 range 0 .. 31; 1566 ai_addr at 24 range 0 .. 31; 1567 ai_canonname at 20 range 0 .. 31; 1568 ai_next at 28 range 0 .. 31; 1569 end record; 1570 pragma Convention (C_Pass_By_Copy, struct_addrinfo); 1571 for struct_addrinfo'Alignment use ALIGNMENT; 1572 pragma Warnings (Off); 1573 -- There may be holes in the record, due to 1574 -- components not defined by POSIX standard. 1575 for struct_addrinfo'Size use 256; 1576 pragma Warnings (On); 1577 1578 -- message option header -- 1579 type struct_cmsghdr is record 1580 cmsg_level : int; 1581 cmsg_type : int; 1582 cmsg_len : size_t; 1583 end record; 1584 for struct_cmsghdr use record 1585 cmsg_level at 4 range 0 .. 31; 1586 cmsg_type at 8 range 0 .. 31; 1587 cmsg_len at 0 range 0 .. 31; 1588 end record; 1589 pragma Convention (C_Pass_By_Copy, struct_cmsghdr); 1590 for struct_cmsghdr'Alignment use ALIGNMENT; 1591 pragma Warnings (Off); 1592 -- There may be holes in the record, due to 1593 -- components not defined by POSIX standard. 1594 for struct_cmsghdr'Size use 96; 1595 pragma Warnings (On); 1596 type cmsghdr_ptr is access constant struct_cmsghdr; 1597 pragma Convention (C, cmsghdr_ptr); 1598 type cmsghdr_var_ptr is access all struct_cmsghdr; 1599 pragma Convention (C, cmsghdr_var_ptr); 1600 1601 -- host database entry -- 1602 type struct_hostent is record 1603 h_name : char_ptr; 1604 h_aliases : char_ptr_ptr; 1605 h_addrtype : int; 1606 h_length : int; 1607 h_addr_list : char_ptr_ptr; 1608 end record; 1609 for struct_hostent use record 1610 h_name at 0 range 0 .. 31; 1611 h_aliases at 4 range 0 .. 31; 1612 h_addrtype at 8 range 0 .. 31; 1613 h_length at 12 range 0 .. 31; 1614 h_addr_list at 16 range 0 .. 31; 1615 end record; 1616 pragma Convention (C_Pass_By_Copy, struct_hostent); 1617 for struct_hostent'Alignment use ALIGNMENT; 1618 pragma Warnings (Off); 1619 -- There may be holes in the record, due to 1620 -- components not defined by POSIX standard. 1621 for struct_hostent'Size use 160; 1622 pragma Warnings (On); 1623 type hostent_ptr is access constant struct_hostent; 1624 pragma Convention (C, hostent_ptr); 1625 type hostent_var_ptr is access all struct_hostent; 1626 pragma Convention (C, hostent_var_ptr); 1627 1628 -- internet address -- 1629 type in_addr_t is mod 2**32; 1630 for in_addr_t'Size use 32; 1631 type struct_in_addr is record 1632 s_addr : in_addr_t; 1633 end record; 1634 for struct_in_addr use record 1635 s_addr at 0 range 0 .. 31; 1636 end record; 1637 pragma Convention (C_Pass_By_Copy, struct_in_addr); 1638 for struct_in_addr'Alignment use ALIGNMENT; 1639 pragma Warnings (Off); 1640 -- There may be holes in the record, due to 1641 -- components not defined by POSIX standard. 1642 for struct_in_addr'Size use 32; 1643 pragma Warnings (On); 1644 type in_addr_ptr is access constant struct_in_addr; 1645 pragma Convention (C, in_addr_ptr); 1646 type in_addr_var_ptr is access all struct_in_addr; 1647 pragma Convention (C, in_addr_var_ptr); 1648 1649 -- linger option structure -- 1650 type struct_linger is record 1651 l_onoff : int; 1652 l_linger : int; 1653 end record; 1654 for struct_linger use record 1655 l_onoff at 0 range 0 .. 31; 1656 l_linger at 4 range 0 .. 31; 1657 end record; 1658 pragma Convention (C_Pass_By_Copy, struct_linger); 1659 for struct_linger'Alignment use ALIGNMENT; 1660 pragma Warnings (Off); 1661 -- There may be holes in the record, due to 1662 -- components not defined by POSIX standard. 1663 for struct_linger'Size use 64; 1664 pragma Warnings (On); 1665 type linger_ptr is access constant struct_linger; 1666 pragma Convention (C, linger_ptr); 1667 type linger_var_ptr is access all struct_linger; 1668 pragma Convention (C, linger_var_ptr); 1669 1670 -- I/O vector -- 1671 type struct_iovec is record 1672 iov_base : char_ptr; 1673 iov_len : size_t; 1674 end record; 1675 for struct_iovec use record 1676 iov_base at 0 range 0 .. 31; 1677 iov_len at 4 range 0 .. 31; 1678 end record; 1679 pragma Convention (C_Pass_By_Copy, struct_iovec); 1680 for struct_iovec'Alignment use ALIGNMENT; 1681 pragma Warnings (Off); 1682 -- There may be holes in the record, due to 1683 -- components not defined by POSIX standard. 1684 for struct_iovec'Size use 64; 1685 pragma Warnings (On); 1686 type iovec_ptr is access constant struct_iovec; 1687 pragma Convention (C, iovec_ptr); 1688 type iovec_var_ptr is access all struct_iovec; 1689 pragma Convention (C, iovec_var_ptr); 1690 1691 -- message header -- 1692 type struct_msghdr is record 1693 msg_name : sockaddr_ptr; 1694 msg_namelen : size_t; 1695 msg_iov : iovec_ptr; 1696 msg_iovlen : size_t; 1697 msg_control : char_ptr; 1698 msg_controllen : size_t; 1699 msg_flags : int; 1700 end record; 1701 for struct_msghdr use record 1702 msg_name at 0 range 0 .. 31; 1703 msg_namelen at 4 range 0 .. 31; 1704 msg_iov at 8 range 0 .. 31; 1705 msg_iovlen at 12 range 0 .. 31; 1706 msg_control at 16 range 0 .. 31; 1707 msg_controllen at 20 range 0 .. 31; 1708 msg_flags at 24 range 0 .. 31; 1709 end record; 1710 pragma Convention (C_Pass_By_Copy, struct_msghdr); 1711 for struct_msghdr'Alignment use ALIGNMENT; 1712 pragma Warnings (Off); 1713 -- There may be holes in the record, due to 1714 -- components not defined by POSIX standard. 1715 for struct_msghdr'Size use 224; 1716 pragma Warnings (On); 1717 type msghdr_ptr is access constant struct_msghdr; 1718 pragma Convention (C, msghdr_ptr); 1719 type msghdr_var_ptr is access all struct_msghdr; 1720 pragma Convention (C, msghdr_var_ptr); 1721 1722 -- local socket address -- 1723 subtype sun_path_string is POSIX_String (1 .. 108); 1724 type struct_sockaddr_un is record 1725 sun_family : sa_family_t; 1726 sun_path : sun_path_string; 1727 end record; 1728 for struct_sockaddr_un use record 1729 sun_family at 0 range 0 .. 7; 1730 sun_path at 2 range 0 .. 863; 1731 end record; 1732 pragma Convention (C_Pass_By_Copy, struct_sockaddr_un); 1733 for struct_sockaddr_un'Alignment use ALIGNMENT; 1734 pragma Warnings (Off); 1735 -- There may be holes in the record, due to 1736 -- components not defined by POSIX standard. 1737 for struct_sockaddr_un'Size use 880; 1738 pragma Warnings (On); 1739 type sockaddr_un_ptr is access constant struct_sockaddr_un; 1740 pragma Convention (C, sockaddr_un_ptr); 1741 type sockaddr_un_var_ptr is access all struct_sockaddr_un; 1742 pragma Convention (C, sockaddr_un_var_ptr); 1743 1744 -- internet socket address -- 1745 type struct_sockaddr_in is record 1746 sin_family : sa_family_t; 1747 sin_port : in_port_t; 1748 sin_addr : struct_in_addr; 1749 sin_zero : POSIX_String (1 .. 8); 1750 end record; 1751 for struct_sockaddr_in use record 1752 sin_family at 1 range 0 .. 7; 1753 sin_port at 2 range 0 .. 15; 1754 sin_addr at 4 range 0 .. 31; 1755 sin_zero at 8 range 0 .. 63; 1756 end record; 1757 pragma Convention (C_Pass_By_Copy, struct_sockaddr_in); 1758 for struct_sockaddr_in'Alignment use ALIGNMENT; 1759 pragma Warnings (Off); 1760 -- There may be holes in the record, due to 1761 -- components not defined by POSIX standard. 1762 for struct_sockaddr_in'Size use 128; 1763 pragma Warnings (On); 1764 type sockaddr_in_ptr is access constant struct_sockaddr_in; 1765 pragma Convention (C, sockaddr_in_ptr); 1766 type sockaddr_in_var_ptr is access all struct_sockaddr_in; 1767 pragma Convention (C, sockaddr_in_var_ptr); 1768 1769 -- IP Level ip_opts structure -- 1770 -- *** MISSING: ip_opts *** -- 1771 type struct_ip_opts is record 1772 ip_dst : struct_in_addr; 1773 ip_opts : POSIX.Octet_Array (1 .. 40); 1774 end record; 1775 for struct_ip_opts use record 1776 ip_dst at 0 range 0 .. 31; 1777 ip_opts at 4 range 0 .. 319; 1778 end record; 1779 pragma Convention (C_Pass_By_Copy, struct_ip_opts); 1780 for struct_ip_opts'Alignment use ALIGNMENT; 1781 pragma Warnings (Off); 1782 -- There may be holes in the record, due to 1783 -- components not defined by POSIX standard. 1784 for struct_ip_opts'Size use 352; 1785 pragma Warnings (On); 1786 type ip_opts_ptr is access constant struct_ip_opts; 1787 pragma Convention (C, ip_opts_ptr); 1788 type ip_opts_var_ptr is access all struct_ip_opts; 1789 pragma Convention (C, ip_opts_var_ptr); 1790 1791 -------------------------------- 1792 -- link names for functions -- 1793 -------------------------------- 1794 1795 HAVE_accept : constant Boolean := True; 1796 accept_LINKNAME : constant String := "accept"; 1797 HAVE_bind : constant Boolean := True; 1798 bind_LINKNAME : constant String := "bind"; 1799 HAVE_connect : constant Boolean := True; 1800 connect_LINKNAME : constant String := "connect"; 1801 HAVE_getsockname : constant Boolean := True; 1802 getsockname_LINKNAME : constant String := "getsockname"; 1803 HAVE_getsockopt : constant Boolean := True; 1804 getsockopt_LINKNAME : constant String := "getsockopt"; 1805 -- *** MISSING: function isfdtype *** -- 1806 HAVE_isfdtype : constant Boolean := False; 1807 isfdtype_LINKNAME : constant String := "nosys_neg_one"; 1808 HAVE_listen : constant Boolean := True; 1809 listen_LINKNAME : constant String := "listen"; 1810 HAVE_recv : constant Boolean := True; 1811 recv_LINKNAME : constant String := "recv"; 1812 HAVE_recvfrom : constant Boolean := True; 1813 recvfrom_LINKNAME : constant String := "recvfrom"; 1814 HAVE_recvmsg : constant Boolean := True; 1815 recvmsg_LINKNAME : constant String := "recvmsg"; 1816 HAVE_send : constant Boolean := True; 1817 send_LINKNAME : constant String := "send"; 1818 HAVE_sendto : constant Boolean := True; 1819 sendto_LINKNAME : constant String := "sendto"; 1820 HAVE_sendmsg : constant Boolean := True; 1821 sendmsg_LINKNAME : constant String := "sendmsg"; 1822 HAVE_setsockopt : constant Boolean := True; 1823 setsockopt_LINKNAME : constant String := "setsockopt"; 1824 HAVE_shutdown : constant Boolean := True; 1825 shutdown_LINKNAME : constant String := "shutdown"; 1826 HAVE_socket : constant Boolean := True; 1827 socket_LINKNAME : constant String := "socket"; 1828 -- *** MISSING: function sockatmark *** -- 1829 HAVE_sockatmark : constant Boolean := False; 1830 sockatmark_LINKNAME : constant String := "nosys_neg_one"; 1831 HAVE_socketpair : constant Boolean := True; 1832 socketpair_LINKNAME : constant String := "socketpair"; 1833 1834 end Sockets; 1835 1836 package XTI is 1837 1838 ---------------------- 1839 -- XTI structures -- 1840 ---------------------- 1841 1842 1843 -- netbuf structure -- 1844 type struct_netbuf is record 1845 maxlen : unsigned_int; 1846 len : unsigned_int; 1847 buf : char_ptr; 1848 end record; 1849 for struct_netbuf use record 1850 maxlen at 0 range 0 .. 31; 1851 len at 4 range 0 .. 31; 1852 buf at 8 range 0 .. 31; 1853 end record; 1854 pragma Convention (C_Pass_By_Copy, struct_netbuf); 1855 for struct_netbuf'Alignment use ALIGNMENT; 1856 pragma Warnings (Off); 1857 -- There may be holes in the record, due to 1858 -- components not defined by POSIX standard. 1859 for struct_netbuf'Size use 96; 1860 pragma Warnings (On); 1861 type netbuf_ptr is access constant struct_netbuf; 1862 pragma Convention (C, netbuf_ptr); 1863 type netbuf_var_ptr is access all struct_netbuf; 1864 pragma Convention (C, netbuf_var_ptr); 1865 1866 -- t_info structure -- 1867 type struct_t_info is record 1868 addr : long; 1869 options : long; 1870 tsdu : long; 1871 etsdu : long; 1872 connect : long; 1873 discon : long; 1874 servtype : long; 1875 end record; 1876 for struct_t_info use record 1877 addr at 0 range 0 .. 31; 1878 options at 4 range 0 .. 31; 1879 tsdu at 8 range 0 .. 31; 1880 etsdu at 12 range 0 .. 31; 1881 connect at 16 range 0 .. 31; 1882 discon at 20 range 0 .. 31; 1883 servtype at 24 range 0 .. 31; 1884 end record; 1885 pragma Convention (C_Pass_By_Copy, struct_t_info); 1886 for struct_t_info'Alignment use ALIGNMENT; 1887 pragma Warnings (Off); 1888 -- There may be holes in the record, due to 1889 -- components not defined by POSIX standard. 1890 for struct_t_info'Size use 224; 1891 pragma Warnings (On); 1892 type t_info_ptr is access constant struct_t_info; 1893 pragma Convention (C, t_info_ptr); 1894 type t_info_var_ptr is access all struct_t_info; 1895 pragma Convention (C, t_info_var_ptr); 1896 1897 -- t_opthdr structure -- 1898 -- *** MISSING: t_opthdr *** -- 1899 type struct_t_opthdr is record 1900 len : unsigned_long; 1901 level : unsigned_long; 1902 name : unsigned_long; 1903 status : unsigned_long; 1904 end record; 1905 for struct_t_opthdr use record 1906 len at 0 range 0 .. 31; 1907 level at 4 range 0 .. 31; 1908 name at 8 range 0 .. 31; 1909 status at 12 range 0 .. 31; 1910 end record; 1911 pragma Convention (C_Pass_By_Copy, struct_t_opthdr); 1912 for struct_t_opthdr'Alignment use ALIGNMENT; 1913 pragma Warnings (Off); 1914 -- There may be holes in the record, due to 1915 -- components not defined by POSIX standard. 1916 for struct_t_opthdr'Size use 128; 1917 pragma Warnings (On); 1918 type t_opthdr_ptr is access constant struct_t_opthdr; 1919 pragma Convention (C, t_opthdr_ptr); 1920 type t_opthdr_var_ptr is access all struct_t_opthdr; 1921 pragma Convention (C, t_opthdr_var_ptr); 1922 1923 -- t_bind structure -- 1924 type struct_t_bind is record 1925 addr : struct_netbuf; 1926 qlen : unsigned; 1927 end record; 1928 for struct_t_bind use record 1929 addr at 0 range 0 .. 95; 1930 qlen at 12 range 0 .. 31; 1931 end record; 1932 pragma Convention (C_Pass_By_Copy, struct_t_bind); 1933 for struct_t_bind'Alignment use ALIGNMENT; 1934 pragma Warnings (Off); 1935 -- There may be holes in the record, due to 1936 -- components not defined by POSIX standard. 1937 for struct_t_bind'Size use 128; 1938 pragma Warnings (On); 1939 type t_bind_ptr is access constant struct_t_bind; 1940 pragma Convention (C, t_bind_ptr); 1941 type t_bind_var_ptr is access all struct_t_bind; 1942 pragma Convention (C, t_bind_var_ptr); 1943 1944 -- t_optmgmt structure -- 1945 type struct_t_optmgmt is record 1946 opt : struct_netbuf; 1947 flags : long; 1948 end record; 1949 for struct_t_optmgmt use record 1950 opt at 0 range 0 .. 95; 1951 flags at 12 range 0 .. 31; 1952 end record; 1953 pragma Convention (C_Pass_By_Copy, struct_t_optmgmt); 1954 for struct_t_optmgmt'Alignment use ALIGNMENT; 1955 pragma Warnings (Off); 1956 -- There may be holes in the record, due to 1957 -- components not defined by POSIX standard. 1958 for struct_t_optmgmt'Size use 128; 1959 pragma Warnings (On); 1960 type t_optmgmt_ptr is access constant struct_t_optmgmt; 1961 pragma Convention (C, t_optmgmt_ptr); 1962 type t_optmgmt_var_ptr is access all struct_t_optmgmt; 1963 pragma Convention (C, t_optmgmt_var_ptr); 1964 1965 -- t_discon structure -- 1966 type struct_t_discon is record 1967 udata : struct_netbuf; 1968 reason : int; 1969 sequence : int; 1970 end record; 1971 for struct_t_discon use record 1972 udata at 0 range 0 .. 95; 1973 reason at 12 range 0 .. 31; 1974 sequence at 16 range 0 .. 31; 1975 end record; 1976 pragma Convention (C_Pass_By_Copy, struct_t_discon); 1977 for struct_t_discon'Alignment use ALIGNMENT; 1978 pragma Warnings (Off); 1979 -- There may be holes in the record, due to 1980 -- components not defined by POSIX standard. 1981 for struct_t_discon'Size use 160; 1982 pragma Warnings (On); 1983 type t_discon_ptr is access constant struct_t_discon; 1984 pragma Convention (C, t_discon_ptr); 1985 type t_discon_var_ptr is access all struct_t_discon; 1986 pragma Convention (C, t_discon_var_ptr); 1987 1988 -- t_call structure -- 1989 type struct_t_call is record 1990 addr : struct_netbuf; 1991 opt : struct_netbuf; 1992 udata : struct_netbuf; 1993 sequence : int; 1994 end record; 1995 for struct_t_call use record 1996 addr at 0 range 0 .. 95; 1997 opt at 12 range 0 .. 95; 1998 udata at 24 range 0 .. 95; 1999 sequence at 36 range 0 .. 31; 2000 end record; 2001 pragma Convention (C_Pass_By_Copy, struct_t_call); 2002 for struct_t_call'Alignment use ALIGNMENT; 2003 pragma Warnings (Off); 2004 -- There may be holes in the record, due to 2005 -- components not defined by POSIX standard. 2006 for struct_t_call'Size use 320; 2007 pragma Warnings (On); 2008 type t_call_ptr is access constant struct_t_call; 2009 pragma Convention (C, t_call_ptr); 2010 type t_call_var_ptr is access all struct_t_call; 2011 pragma Convention (C, t_call_var_ptr); 2012 2013 -- t_unitdata structure -- 2014 type struct_t_unitdata is record 2015 addr : struct_netbuf; 2016 opt : struct_netbuf; 2017 udata : struct_netbuf; 2018 end record; 2019 for struct_t_unitdata use record 2020 addr at 0 range 0 .. 95; 2021 opt at 12 range 0 .. 95; 2022 udata at 24 range 0 .. 95; 2023 end record; 2024 pragma Convention (C_Pass_By_Copy, struct_t_unitdata); 2025 for struct_t_unitdata'Alignment use ALIGNMENT; 2026 pragma Warnings (Off); 2027 -- There may be holes in the record, due to 2028 -- components not defined by POSIX standard. 2029 for struct_t_unitdata'Size use 288; 2030 pragma Warnings (On); 2031 type t_unitdata_ptr is access constant struct_t_unitdata; 2032 pragma Convention (C, t_unitdata_ptr); 2033 type t_unitdata_var_ptr is access all struct_t_unitdata; 2034 pragma Convention (C, t_unitdata_var_ptr); 2035 2036 -- t_uderr structure -- 2037 type struct_t_uderr is record 2038 addr : struct_netbuf; 2039 opt : struct_netbuf; 2040 error : long; 2041 end record; 2042 for struct_t_uderr use record 2043 addr at 0 range 0 .. 95; 2044 opt at 12 range 0 .. 95; 2045 error at 24 range 0 .. 31; 2046 end record; 2047 pragma Convention (C_Pass_By_Copy, struct_t_uderr); 2048 for struct_t_uderr'Alignment use ALIGNMENT; 2049 pragma Warnings (Off); 2050 -- There may be holes in the record, due to 2051 -- components not defined by POSIX standard. 2052 for struct_t_uderr'Size use 224; 2053 pragma Warnings (On); 2054 type t_uderr_ptr is access constant struct_t_uderr; 2055 pragma Convention (C, t_uderr_ptr); 2056 type t_uderr_var_ptr is access all struct_t_uderr; 2057 pragma Convention (C, t_uderr_var_ptr); 2058 2059 -- t_iovec structure -- 2060 -- *** MISSING: t_iovec *** -- 2061 type struct_t_iovec is record 2062 iov_base : char_ptr; 2063 iov_len : unsigned_int; 2064 end record; 2065 for struct_t_iovec use record 2066 iov_base at 0 range 0 .. 31; 2067 iov_len at 4 range 0 .. 31; 2068 end record; 2069 pragma Convention (C_Pass_By_Copy, struct_t_iovec); 2070 for struct_t_iovec'Alignment use ALIGNMENT; 2071 pragma Warnings (Off); 2072 -- There may be holes in the record, due to 2073 -- components not defined by POSIX standard. 2074 for struct_t_iovec'Size use 64; 2075 pragma Warnings (On); 2076 type t_iovec_ptr is access constant struct_t_iovec; 2077 pragma Convention (C, t_iovec_ptr); 2078 type t_iovec_var_ptr is access all struct_t_iovec; 2079 pragma Convention (C, t_iovec_var_ptr); 2080 2081 -- t_kpalive structure -- 2082 -- *** MISSING: t_kpalive *** -- 2083 type struct_t_kpalive is record 2084 kp_onoff : long; 2085 kp_timeout : long; 2086 end record; 2087 for struct_t_kpalive use record 2088 kp_onoff at 0 range 0 .. 31; 2089 kp_timeout at 4 range 0 .. 31; 2090 end record; 2091 pragma Convention (C_Pass_By_Copy, struct_t_kpalive); 2092 for struct_t_kpalive'Alignment use ALIGNMENT; 2093 pragma Warnings (Off); 2094 -- There may be holes in the record, due to 2095 -- components not defined by POSIX standard. 2096 for struct_t_kpalive'Size use 64; 2097 pragma Warnings (On); 2098 type t_kpalive_ptr is access constant struct_t_kpalive; 2099 pragma Convention (C, t_kpalive_ptr); 2100 type t_kpalive_var_ptr is access all struct_t_kpalive; 2101 pragma Convention (C, t_kpalive_var_ptr); 2102 2103 -- The following are the events returned from t_look() -- 2104 T_LISTEN : constant := 1; 2105 T_CONNECT : constant := 2; 2106 T_DATA : constant := 4; 2107 T_EXDATA : constant := 8; 2108 T_DISCONNECT : constant := 16; 2109 T_UDERR : constant := 64; 2110 T_ORDREL : constant := 128; 2111 -- *** MISSING: T_GODATA *** -- 2112 T_GODATA : constant := 0; 2113 -- *** MISSING: T_GOEXDATA *** -- 2114 T_GOEXDATA : constant := 0; 2115 T_EVENTS : constant := 255; 2116 T_MORE : constant := 1; 2117 T_EXPEDITED : constant := 2; 2118 -- *** MISSING: T_PUSH *** -- 2119 T_PUSH : constant := 0; 2120 T_NEGOTIATE : constant := 4; 2121 T_CHECK : constant := 8; 2122 T_DEFAULT : constant := 16; 2123 T_SUCCESS : constant := 32; 2124 T_FAILURE : constant := 64; 2125 -- *** MISSING: T_CURRENT *** -- 2126 T_CURRENT : constant := 0; 2127 -- *** MISSING: T_PARTSUCCESS *** -- 2128 T_PARTSUCCESS : constant := 0; 2129 -- *** MISSING: T_READONLY *** -- 2130 T_READONLY : constant := 0; 2131 -- *** MISSING: T_NOTSUPPORT *** -- 2132 T_NOTSUPPORT : constant := 0; 2133 -- *** MISSING: T_RAW *** -- 2134 T_RAW : constant := 0; 2135 2136 -- Service types defines -- 2137 T_COTS : constant := 1; 2138 T_COTS_ORD : constant := 2; 2139 T_CLTS : constant := 3; 2140 -- *** MISSING: T_SENDZERO *** -- 2141 T_SENDZERO : constant := 0; 2142 -- *** MISSING: SENDZERO *** -- 2143 SENDZERO : constant := 0; 2144 -- *** MISSING: T_XPG4_1 *** -- 2145 T_XPG4_1 : constant := 0; 2146 -- *** MISSING: XPG4_1 *** -- 2147 XPG4_1 : constant := 0; 2148 T_BIND : constant := 1; 2149 T_OPTMGMT : constant := 2; 2150 T_CALL : constant := 3; 2151 T_DIS : constant := 4; 2152 T_UNITDATA : constant := 5; 2153 T_UDERROR : constant := 6; 2154 T_INFO : constant := 7; 2155 -- *** MISSING: T_KUNITDATA *** -- 2156 T_KUNITDATA : constant := 0; 2157 T_ADDR : constant := 1; 2158 T_OPT : constant := 2; 2159 T_UDATA : constant := 4; 2160 T_ALL : constant := 7; 2161 T_UNINIT : constant := 0; 2162 T_UNBND : constant := 1; 2163 T_IDLE : constant := 2; 2164 T_OUTCON : constant := 3; 2165 T_INCON : constant := 4; 2166 T_DATAXFER : constant := 5; 2167 T_OUTREL : constant := 6; 2168 T_INREL : constant := 7; 2169 T_YES : constant := 1; 2170 T_NO : constant := 0; 2171 T_UNUSED : constant := -1; 2172 T_NULL : constant := 0; 2173 T_ABSREQ : constant := 32768; 2174 T_INFINITE : constant := -1; 2175 T_INVALID : constant := -2; 2176 2177 -- XTI-level Options -- 2178 XTI_GENERIC : constant := 65535; 2179 XTI_DEBUG : constant := 1; 2180 XTI_LINGER : constant := 128; 2181 XTI_RCVBUF : constant := 4098; 2182 XTI_RCVLOWAT : constant := 4100; 2183 XTI_SNDBUF : constant := 4097; 2184 XTI_SNDLOWAT : constant := 4099; 2185 2186 -- t_linger structure -- 2187 -- *** MISSING: t_linger *** -- 2188 type struct_t_linger is record 2189 l_onoff : long; 2190 l_linger : long; 2191 end record; 2192 for struct_t_linger use record 2193 l_onoff at 0 range 0 .. 31; 2194 l_linger at 4 range 0 .. 31; 2195 end record; 2196 pragma Convention (C_Pass_By_Copy, struct_t_linger); 2197 for struct_t_linger'Alignment use ALIGNMENT; 2198 pragma Warnings (Off); 2199 -- There may be holes in the record, due to 2200 -- components not defined by POSIX standard. 2201 for struct_t_linger'Size use 64; 2202 pragma Warnings (On); 2203 type t_linger_ptr is access constant struct_t_linger; 2204 pragma Convention (C, t_linger_ptr); 2205 type t_linger_var_ptr is access all struct_t_linger; 2206 pragma Convention (C, t_linger_var_ptr); 2207 2208 -- General definitions for option management -- 2209 T_UNSPEC : constant := -3; 2210 T_ALLOPT : constant := 0; 2211 function c_T_ALIGN (p : char_ptr) return int; 2212 pragma Import (C, c_T_ALIGN, "c_T_ALIGN"); 2213 2214 -- TCP Level and Options -- 2215 -- *** MISSING: INET_TCP *** -- 2216 INET_TCP : constant := 0; 2217 TCP_NODELAY : constant := 1; 2218 TCP_MAXSEG : constant := 2; 2219 TCP_KEEPALIVE : constant := 8; 2220 T_GARBAGE : constant := 2; 2221 2222 -- UDP Level and Options -- 2223 -- *** MISSING: INET_UDP *** -- 2224 INET_UDP : constant := 0; 2225 -- *** MISSING: UDP_CHECKSUM *** -- 2226 UDP_CHECKSUM : constant := 0; 2227 2228 -- IP Level and Options -- 2229 -- *** MISSING: INET_IP *** -- 2230 INET_IP : constant := 0; 2231 IP_OPTIONS : constant := 1; 2232 IP_TOS : constant := 3; 2233 IP_TTL : constant := 4; 2234 IP_REUSEADDR : constant := 4; 2235 IP_DONTROUTE : constant := 16; 2236 IP_BROADCAST : constant := 32; 2237 2238 -- IP_TOS precedence levels -- 2239 -- *** MISSING: T_ROUTINE *** -- 2240 T_ROUTINE : constant := 0; 2241 -- *** MISSING: T_PRIORITY *** -- 2242 T_PRIORITY : constant := 0; 2243 -- *** MISSING: T_IMMEDIATE *** -- 2244 T_IMMEDIATE : constant := 0; 2245 -- *** MISSING: T_FLASH *** -- 2246 T_FLASH : constant := 0; 2247 -- *** MISSING: T_OVERRIDEFLASH *** -- 2248 T_OVERRIDEFLASH : constant := 0; 2249 -- *** MISSING: T_CRITIC_ECP *** -- 2250 T_CRITIC_ECP : constant := 0; 2251 -- *** MISSING: T_INETCONTROL *** -- 2252 T_INETCONTROL : constant := 0; 2253 -- *** MISSING: T_NETCONTROL *** -- 2254 T_NETCONTROL : constant := 0; 2255 2256 -- IP_TOS type of service -- 2257 -- *** MISSING: T_NOTOS *** -- 2258 T_NOTOS : constant := 0; 2259 -- *** MISSING: T_LDELAY *** -- 2260 T_LDELAY : constant := 0; 2261 -- *** MISSING: T_HITHRPT *** -- 2262 T_HITHRPT : constant := 0; 2263 -- *** MISSING: T_HIREL *** -- 2264 T_HIREL : constant := 0; 2265 2266 -------------------------------- 2267 -- link names for functions -- 2268 -------------------------------- 2269 2270 -- *** MISSING: function t_accept *** -- 2271 HAVE_t_accept : constant Boolean := False; 2272 t_accept_LINKNAME : constant String := "nosys_neg_one"; 2273 -- *** MISSING: function t_alloc *** -- 2274 HAVE_t_alloc : constant Boolean := False; 2275 t_alloc_LINKNAME : constant String := "nosys_neg_one"; 2276 -- *** MISSING: function t_bind *** -- 2277 HAVE_t_bind : constant Boolean := False; 2278 t_bind_LINKNAME : constant String := "nosys_neg_one"; 2279 -- *** MISSING: function t_blocking *** -- 2280 HAVE_t_blocking : constant Boolean := False; 2281 t_blocking_LINKNAME : constant String := "nosys_neg_one"; 2282 -- *** MISSING: function t_close *** -- 2283 HAVE_t_close : constant Boolean := False; 2284 t_close_LINKNAME : constant String := "nosys_neg_one"; 2285 -- *** MISSING: function t_connect *** -- 2286 HAVE_t_connect : constant Boolean := False; 2287 t_connect_LINKNAME : constant String := "nosys_neg_one"; 2288 -- *** MISSING: function t_error *** -- 2289 HAVE_t_error : constant Boolean := False; 2290 t_error_LINKNAME : constant String := "nosys_neg_one"; 2291 -- *** MISSING: function t_free *** -- 2292 HAVE_t_free : constant Boolean := False; 2293 t_free_LINKNAME : constant String := "nosys_neg_one"; 2294 -- *** MISSING: function t_getinfo *** -- 2295 HAVE_t_getinfo : constant Boolean := False; 2296 t_getinfo_LINKNAME : constant String := "nosys_neg_one"; 2297 -- *** MISSING: function t_getprotaddr *** -- 2298 HAVE_t_getprotaddr : constant Boolean := False; 2299 t_getprotaddr_LINKNAME : constant String := "nosys_neg_one"; 2300 -- *** MISSING: function t_getstate *** -- 2301 HAVE_t_getstate : constant Boolean := False; 2302 t_getstate_LINKNAME : constant String := "nosys_neg_one"; 2303 -- *** MISSING: function t_listen *** -- 2304 HAVE_t_listen : constant Boolean := False; 2305 t_listen_LINKNAME : constant String := "nosys_neg_one"; 2306 -- *** MISSING: function t_look *** -- 2307 HAVE_t_look : constant Boolean := False; 2308 t_look_LINKNAME : constant String := "nosys_neg_one"; 2309 -- *** MISSING: function t_nonblocking *** -- 2310 HAVE_t_nonblocking : constant Boolean := False; 2311 t_nonblocking_LINKNAME : constant String := "nosys_neg_one"; 2312 -- *** MISSING: function t_open *** -- 2313 HAVE_t_open : constant Boolean := False; 2314 t_open_LINKNAME : constant String := "nosys_neg_one"; 2315 -- *** MISSING: function t_optmgmt *** -- 2316 HAVE_t_optmgmt : constant Boolean := False; 2317 t_optmgmt_LINKNAME : constant String := "nosys_neg_one"; 2318 -- *** MISSING: function t_rcv *** -- 2319 HAVE_t_rcv : constant Boolean := False; 2320 t_rcv_LINKNAME : constant String := "nosys_neg_one"; 2321 -- *** MISSING: function t_rcvconnect *** -- 2322 HAVE_t_rcvconnect : constant Boolean := False; 2323 t_rcvconnect_LINKNAME : constant String := "nosys_neg_one"; 2324 -- *** MISSING: function t_rcvdis *** -- 2325 HAVE_t_rcvdis : constant Boolean := False; 2326 t_rcvdis_LINKNAME : constant String := "nosys_neg_one"; 2327 -- *** MISSING: function t_rcvrel *** -- 2328 HAVE_t_rcvrel : constant Boolean := False; 2329 t_rcvrel_LINKNAME : constant String := "nosys_neg_one"; 2330 -- *** MISSING: function t_rcvreldata *** -- 2331 HAVE_t_rcvreldata : constant Boolean := False; 2332 t_rcvreldata_LINKNAME : constant String := "nosys_neg_one"; 2333 -- *** MISSING: function t_rcvudata *** -- 2334 HAVE_t_rcvudata : constant Boolean := False; 2335 t_rcvudata_LINKNAME : constant String := "nosys_neg_one"; 2336 -- *** MISSING: function t_rcvuderr *** -- 2337 HAVE_t_rcvuderr : constant Boolean := False; 2338 t_rcvuderr_LINKNAME : constant String := "nosys_neg_one"; 2339 -- *** MISSING: function t_rcvv *** -- 2340 HAVE_t_rcvv : constant Boolean := False; 2341 t_rcvv_LINKNAME : constant String := "nosys_neg_one"; 2342 -- *** MISSING: function t_rcvvudata *** -- 2343 HAVE_t_rcvvudata : constant Boolean := False; 2344 t_rcvvudata_LINKNAME : constant String := "nosys_neg_one"; 2345 -- *** MISSING: function t_snd *** -- 2346 HAVE_t_snd : constant Boolean := False; 2347 t_snd_LINKNAME : constant String := "nosys_neg_one"; 2348 -- *** MISSING: function t_snddis *** -- 2349 HAVE_t_snddis : constant Boolean := False; 2350 t_snddis_LINKNAME : constant String := "nosys_neg_one"; 2351 -- *** MISSING: function t_sndudata *** -- 2352 HAVE_t_sndudata : constant Boolean := False; 2353 t_sndudata_LINKNAME : constant String := "nosys_neg_one"; 2354 -- *** MISSING: function t_sndrel *** -- 2355 HAVE_t_sndrel : constant Boolean := False; 2356 t_sndrel_LINKNAME : constant String := "nosys_neg_one"; 2357 -- *** MISSING: function t_sndreldata *** -- 2358 HAVE_t_sndreldata : constant Boolean := False; 2359 t_sndreldata_LINKNAME : constant String := "nosys_neg_one"; 2360 -- *** MISSING: function t_sndv *** -- 2361 HAVE_t_sndv : constant Boolean := False; 2362 t_sndv_LINKNAME : constant String := "nosys_neg_one"; 2363 -- *** MISSING: function t_sndvudata *** -- 2364 HAVE_t_sndvudata : constant Boolean := False; 2365 t_sndvudata_LINKNAME : constant String := "nosys_neg_one"; 2366 -- *** MISSING: function t_strerror *** -- 2367 HAVE_t_strerror : constant Boolean := False; 2368 t_strerror_LINKNAME : constant String := "nosys_neg_one"; 2369 -- *** MISSING: function t_sync *** -- 2370 HAVE_t_sync : constant Boolean := False; 2371 t_sync_LINKNAME : constant String := "nosys_neg_one"; 2372 -- *** MISSING: function t_unbind *** -- 2373 HAVE_t_unbind : constant Boolean := False; 2374 t_unbind_LINKNAME : constant String := "nosys_neg_one"; 2375 2376 end XTI; 2377 package Netinet is 2378 2379 ------------------------- 2380 -- From netinet/in.h -- 2381 ------------------------- 2382 2383 IPPROTO_IP : constant := 0; 2384 IPPROTO_ICMP : constant := 1; 2385 IPPROTO_TCP : constant := 6; 2386 IPPROTO_UDP : constant := 17; 2387 IPPROTO_RAW : constant := 255; 2388 IP_OPTIONS : constant := 1; 2389 IP_HDRINCL : constant := 2; 2390 IP_TOS : constant := 3; 2391 IP_TTL : constant := 4; 2392 IP_RECVDSTADDR : constant := 7; 2393 INADDR_NONE : constant := 4294967295; 2394 INADDR_ANY : constant := 0; 2395 INADDR_BROADCAST : constant := 4294967295; 2396 INADDR_LOOPBACK : constant := 2130706433; 2397 INADDR_UNSPEC_GROUP : constant := 3758096384; 2398 INADDR_ALLHOSTS_GROUP : constant := 3758096385; 2399 INADDR_MAX_LOCAL_GROUP : constant := 3758096639; 2400 HAVE_inet_addr : constant Boolean := True; 2401 inet_addr_LINKNAME : constant String := "inet_addr"; 2402 HAVE_inet_makeaddr : constant Boolean := True; 2403 inet_makeaddr_LINKNAME : constant String := "inet_makeaddr"; 2404 HAVE_inet_network : constant Boolean := True; 2405 inet_network_LINKNAME : constant String := "inet_network"; 2406 HAVE_inet_lnaof : constant Boolean := True; 2407 inet_lnaof_LINKNAME : constant String := "inet_lnaof"; 2408 HAVE_inet_netof : constant Boolean := True; 2409 inet_netof_LINKNAME : constant String := "inet_netof"; 2410 HAVE_inet_ntoa : constant Boolean := True; 2411 inet_ntoa_LINKNAME : constant String := "inet_ntoa"; 2412 2413 -------------------------- 2414 -- From netinet/tcp.h -- 2415 -------------------------- 2416 2417 TCP_NODELAY : constant := 1; 2418 TCP_MAXSEG : constant := 2; 2419 -- *** MISSING: TCP_KEEPALIVE *** -- 2420 TCP_KEEPALIVE : constant := 0; 2421 -- *** MISSING: TCP_MAXRXT *** -- 2422 TCP_MAXRXT : constant := 0; 2423 -- *** MISSING: TCP_STDURG *** -- 2424 TCP_STDURG : constant := 0; 2425 2426 ------------------------- 2427 -- From netinet/ip.h -- 2428 ------------------------- 2429 2430 -- *** MISSING: IPTOS_LOWDELAY *** -- 2431 IPTOS_LOWDELAY : constant := 0; 2432 -- *** MISSING: IPTOS_THROUGHPUT *** -- 2433 IPTOS_THROUGHPUT : constant := 0; 2434 -- *** MISSING: IPTOS_RELIABILITY *** -- 2435 IPTOS_RELIABILITY : constant := 0; 2436 2437 end Netinet; 2438 package NetDB is 2439 use Sockets; 2440 type struct_netent is record 2441 n_name : char_ptr; 2442 n_aliases : char_ptr_ptr; 2443 n_addrtype : int; 2444 n_net : in_addr_t; 2445 end record; 2446 for struct_netent use record 2447 n_name at 0 range 0 .. 31; 2448 n_aliases at 4 range 0 .. 31; 2449 n_addrtype at 8 range 0 .. 31; 2450 n_net at 12 range 0 .. 31; 2451 end record; 2452 pragma Convention (C_Pass_By_Copy, struct_netent); 2453 for struct_netent'Alignment use ALIGNMENT; 2454 pragma Warnings (Off); 2455 -- There may be holes in the record, due to 2456 -- components not defined by POSIX standard. 2457 for struct_netent'Size use 128; 2458 pragma Warnings (On); 2459 type netent_ptr is access constant struct_netent; 2460 pragma Convention (C, netent_ptr); 2461 type netent_var_ptr is access all struct_netent; 2462 pragma Convention (C, netent_var_ptr); 2463 2464 -- protocol database entry -- 2465 type struct_protoent is record 2466 p_name : char_ptr; 2467 p_aliases : char_ptr_ptr; 2468 p_proto : int; 2469 end record; 2470 for struct_protoent use record 2471 p_name at 0 range 0 .. 31; 2472 p_aliases at 4 range 0 .. 31; 2473 p_proto at 8 range 0 .. 31; 2474 end record; 2475 pragma Convention (C_Pass_By_Copy, struct_protoent); 2476 for struct_protoent'Alignment use ALIGNMENT; 2477 pragma Warnings (Off); 2478 -- There may be holes in the record, due to 2479 -- components not defined by POSIX standard. 2480 for struct_protoent'Size use 96; 2481 pragma Warnings (On); 2482 type protoent_ptr is access constant struct_protoent; 2483 pragma Convention (C, protoent_ptr); 2484 type protoent_var_ptr is access all struct_protoent; 2485 pragma Convention (C, protoent_var_ptr); 2486 2487 -- local socket address -- 2488 HAVE_endhostent : constant Boolean := True; 2489 endhostent_LINKNAME : constant String := "endhostent"; 2490 HAVE_endnetent : constant Boolean := True; 2491 endnetent_LINKNAME : constant String := "endnetent"; 2492 HAVE_endprotoent : constant Boolean := True; 2493 endprotoent_LINKNAME : constant String := "endprotoent"; 2494 HAVE_endservent : constant Boolean := True; 2495 endservent_LINKNAME : constant String := "endservent"; 2496 HAVE_getaddrinfo : constant Boolean := True; 2497 getaddrinfo_LINKNAME : constant String := "getaddrinfo"; 2498 HAVE_freeaddrinfo : constant Boolean := True; 2499 freeaddrinfo_LINKNAME : constant String := "freeaddrinfo"; 2500 HAVE_getnameinfo : constant Boolean := True; 2501 getnameinfo_LINKNAME : constant String := "getnameinfo"; 2502 HAVE_gethostbyaddr : constant Boolean := True; 2503 gethostbyaddr_LINKNAME : constant String := "gethostbyaddr"; 2504 -- *** MISSING: function gethostbyaddr_r *** -- 2505 HAVE_gethostbyaddr_r : constant Boolean := False; 2506 gethostbyaddr_r_LINKNAME : constant String := "nosys_neg_one"; 2507 HAVE_gethostbyname : constant Boolean := True; 2508 gethostbyname_LINKNAME : constant String := "gethostbyname"; 2509 -- *** MISSING: function gethostbyname_r *** -- 2510 HAVE_gethostbyname_r : constant Boolean := False; 2511 gethostbyname_r_LINKNAME : constant String := "nosys_neg_one"; 2512 HAVE_gethostname : constant Boolean := True; 2513 gethostname_LINKNAME : constant String := "gethostname"; 2514 HAVE_getnetbyaddr : constant Boolean := True; 2515 getnetbyaddr_LINKNAME : constant String := "getnetbyaddr"; 2516 -- *** MISSING: function getnetbyaddr_r *** -- 2517 HAVE_getnetbyaddr_r : constant Boolean := False; 2518 getnetbyaddr_r_LINKNAME : constant String := "nosys_neg_one"; 2519 HAVE_getnetbyname : constant Boolean := True; 2520 getnetbyname_LINKNAME : constant String := "getnetbyname"; 2521 -- *** MISSING: function getnetbyname_r *** -- 2522 HAVE_getnetbyname_r : constant Boolean := False; 2523 getnetbyname_r_LINKNAME : constant String := "nosys_neg_one"; 2524 HAVE_getpeername : constant Boolean := True; 2525 getpeername_LINKNAME : constant String := "getpeername"; 2526 HAVE_getprotobyname : constant Boolean := True; 2527 getprotobyname_LINKNAME : constant String := "getprotobyname"; 2528 -- *** MISSING: function getprotobyname_r *** -- 2529 HAVE_getprotobyname_r : constant Boolean := False; 2530 getprotobyname_r_LINKNAME : constant String := "nosys_neg_one"; 2531 HAVE_getprotobynumber : constant Boolean := True; 2532 getprotobynumber_LINKNAME : constant String := "getprotobynumber"; 2533 -- *** MISSING: function getprotobynumber_r *** -- 2534 HAVE_getprotobynumber_r : constant Boolean := False; 2535 getprotobynumber_r_LINKNAME : constant String := "nosys_neg_one"; 2536 HAVE_getservbyname : constant Boolean := True; 2537 getservbyname_LINKNAME : constant String := "getservbyname"; 2538 -- *** MISSING: function getservbyname_r *** -- 2539 HAVE_getservbyname_r : constant Boolean := False; 2540 getservbyname_r_LINKNAME : constant String := "nosys_neg_one"; 2541 HAVE_getservbyport : constant Boolean := True; 2542 getservbyport_LINKNAME : constant String := "getservbyport"; 2543 -- *** MISSING: function getservbyport_r *** -- 2544 HAVE_getservbyport_r : constant Boolean := False; 2545 getservbyport_r_LINKNAME : constant String := "nosys_neg_one"; 2546 HAVE_sethostent : constant Boolean := True; 2547 sethostent_LINKNAME : constant String := "sethostent"; 2548 HAVE_setnetent : constant Boolean := True; 2549 setnetent_LINKNAME : constant String := "setnetent"; 2550 HAVE_setprotoent : constant Boolean := True; 2551 setprotoent_LINKNAME : constant String := "setprotoent"; 2552 HAVE_setservent : constant Boolean := True; 2553 setservent_LINKNAME : constant String := "setservent"; 2554 2555 end NetDB; 2556 2557 -- pollfd structure -- 2558 type struct_pollfd is record 2559 fd : int; 2560 events : short; 2561 revents : short; 2562 end record; 2563 for struct_pollfd use record 2564 fd at 0 range 0 .. 31; 2565 events at 4 range 0 .. 15; 2566 revents at 6 range 0 .. 15; 2567 end record; 2568 pragma Convention (C_Pass_By_Copy, struct_pollfd); 2569 for struct_pollfd'Alignment use ALIGNMENT; 2570 pragma Warnings (Off); 2571 -- There may be holes in the record, due to 2572 -- components not defined by POSIX standard. 2573 for struct_pollfd'Size use 64; 2574 pragma Warnings (On); 2575 type pollfd_ptr is access constant struct_pollfd; 2576 pragma Convention (C, pollfd_ptr); 2577 type pollfd_var_ptr is access all struct_pollfd; 2578 pragma Convention (C, pollfd_var_ptr); 2579 type fd_mask_array is array (Integer range <>) of unsigned_int; 2580 2581 -- fd_set structure -- 2582 type fd_set is 2583 array (1 .. 8) of int; 2584 for fd_set'Alignment use ALIGNMENT; 2585 for fd_set'Size use 256; 2586 type fd_set_ptr is access constant fd_set; 2587 pragma Convention (C, fd_set_ptr); 2588 type fd_set_var_ptr is access all fd_set; 2589 pragma Convention (C, fd_set_var_ptr); 2590 FD_SETSIZE : constant := 256; 2591 -- *** MISSING: INFTIM *** -- 2592 INFTIM : constant := 0; 2593 POLLIN : constant := 1; 2594 -- *** MISSING: POLLRDNORM *** -- 2595 POLLRDNORM : constant := 0; 2596 -- *** MISSING: POLLRDBAND *** -- 2597 POLLRDBAND : constant := 0; 2598 POLLPRI : constant := 2; 2599 -- *** MISSING: POLLWRNORM *** -- 2600 POLLWRNORM : constant := 0; 2601 -- *** MISSING: POLLWRBAND *** -- 2602 POLLWRBAND : constant := 0; 2603 POLLERR : constant := 8; 2604 POLLNVAL : constant := 32; 2605 -- *** MISSING: function poll *** -- 2606 HAVE_poll : constant Boolean := False; 2607 poll_LINKNAME : constant String := "nosys_neg_one"; 2608 HAVE_select : constant Boolean := True; 2609 select_LINKNAME : constant String := "select"; 2610 2611end POSIX.C; 2612