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