1------------------------------------------------------------------------------ 2-- -- 3-- GNAT COMPILER COMPONENTS -- 4-- -- 5-- S Y S T E M . O S _ C O N S T A N T S -- 6-- -- 7-- S p e c -- 8-- -- 9-- Copyright (C) 2000-2015, Free Software Foundation, Inc. -- 10-- -- 11-- GNAT is free software; you can redistribute it and/or modify it under -- 12-- terms of the GNU General Public License as published by the Free Soft- -- 13-- ware Foundation; either version 3, or (at your option) any later ver- -- 14-- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- 15-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- 16-- or FITNESS FOR A PARTICULAR PURPOSE. -- 17-- -- 18-- As a special exception under Section 7 of GPL version 3, you are granted -- 19-- additional permissions described in the GCC Runtime Library Exception, -- 20-- version 3.1, as published by the Free Software Foundation. -- 21-- -- 22-- You should have received a copy of the GNU General Public License and -- 23-- a copy of the GCC Runtime Library Exception along with this program; -- 24-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- 25-- <http://www.gnu.org/licenses/>. -- 26-- -- 27-- GNAT was originally developed by the GNAT team at New York University. -- 28-- Extensive contributions were provided by Ada Core Technologies Inc. -- 29-- -- 30------------------------------------------------------------------------------ 31 32pragma Style_Checks ("M32766"); 33-- Allow long lines 34 35-- This package provides target dependent definitions of constant for use 36-- by the GNAT runtime library. This package should not be directly with'd 37-- by an application program. 38 39-- This file is generated automatically, do not modify it by hand! Instead, 40-- make changes to s-oscons-tmplt.c and rebuild the GNAT runtime library. 41-- This is the version for x86_64-aux-dragonfly4.1 42 43with Interfaces.C; 44package System.OS_Constants is 45 46 pragma Pure; 47 48 --------------------------------- 49 -- General platform parameters -- 50 --------------------------------- 51 52 type OS_Type is (Windows, Other_OS); 53 Target_OS : constant OS_Type := Other_OS; 54 pragma Warnings (Off, Target_OS); 55 -- Suppress warnings on Target_OS since it is in general tested for 56 -- equality with a constant value to implement conditional compilation, 57 -- which normally generates a constant condition warning. 58 59 Target_Name : constant String := "x86_64-aux-dragonfly4.1"; 60 SIZEOF_unsigned_int : constant := 4; -- Size of unsigned int 61 62 ------------------- 63 -- System limits -- 64 ------------------- 65 66 IOV_MAX : constant := 1024; -- Maximum writev iovcnt 67 NAME_MAX : constant := 255; -- Maximum file name length 68 69 --------------------- 70 -- File open modes -- 71 --------------------- 72 73 O_RDWR : constant := 2; -- Read/write 74 O_NOCTTY : constant := 32768; -- Don't change ctrl tty 75 O_NDELAY : constant := 4; -- Nonblocking 76 77 ---------------------- 78 -- Fcntl operations -- 79 ---------------------- 80 81 F_GETFL : constant := 3; -- Get flags 82 F_SETFL : constant := 4; -- Set flags 83 84 ----------------- 85 -- Fcntl flags -- 86 ----------------- 87 88 FNDELAY : constant := 4; -- Nonblocking 89 90 ---------------------- 91 -- Ioctl operations -- 92 ---------------------- 93 94 subtype IOCTL_Req_T is Interfaces.C.int; 95 FIONBIO : constant := -2147195266; -- Set/clear non-blocking io 96 FIONREAD : constant := 1074030207; -- How many bytes to read 97 98 ------------------ 99 -- Errno values -- 100 ------------------ 101 102 -- The following constants are defined from <errno.h> 103 104 EAGAIN : constant := 35; -- Try again 105 ENOENT : constant := 2; -- File not found 106 ENOMEM : constant := 12; -- Out of memory 107 EACCES : constant := 13; -- Permission denied 108 EADDRINUSE : constant := 48; -- Address already in use 109 EADDRNOTAVAIL : constant := 49; -- Cannot assign address 110 EAFNOSUPPORT : constant := 47; -- Addr family not supported 111 EALREADY : constant := 37; -- Operation in progress 112 EBADF : constant := 9; -- Bad file descriptor 113 ECONNABORTED : constant := 53; -- Connection aborted 114 ECONNREFUSED : constant := 61; -- Connection refused 115 ECONNRESET : constant := 54; -- Connection reset by peer 116 EDESTADDRREQ : constant := 39; -- Destination addr required 117 EFAULT : constant := 14; -- Bad address 118 EHOSTDOWN : constant := 64; -- Host is down 119 EHOSTUNREACH : constant := 65; -- No route to host 120 EINPROGRESS : constant := 36; -- Operation now in progress 121 EINTR : constant := 4; -- Interrupted system call 122 EINVAL : constant := 22; -- Invalid argument 123 EIO : constant := 5; -- Input output error 124 EISCONN : constant := 56; -- Socket already connected 125 ELOOP : constant := 62; -- Too many symbolic links 126 EMFILE : constant := 24; -- Too many open files 127 EMSGSIZE : constant := 40; -- Message too long 128 ENAMETOOLONG : constant := 63; -- Name too long 129 ENETDOWN : constant := 50; -- Network is down 130 ENETRESET : constant := 52; -- Disconn. on network reset 131 ENETUNREACH : constant := 51; -- Network is unreachable 132 ENOBUFS : constant := 55; -- No buffer space available 133 ENOPROTOOPT : constant := 42; -- Protocol not available 134 ENOTCONN : constant := 57; -- Socket not connected 135 ENOTSOCK : constant := 38; -- Operation on non socket 136 EOPNOTSUPP : constant := 45; -- Operation not supported 137 EPIPE : constant := 32; -- Broken pipe 138 EPFNOSUPPORT : constant := 46; -- Unknown protocol family 139 EPROTONOSUPPORT : constant := 43; -- Unknown protocol 140 EPROTOTYPE : constant := 41; -- Unknown protocol type 141 ERANGE : constant := 34; -- Result too large 142 ESHUTDOWN : constant := 58; -- Cannot send once shutdown 143 ESOCKTNOSUPPORT : constant := 44; -- Socket type not supported 144 ETIMEDOUT : constant := 60; -- Connection timed out 145 ETOOMANYREFS : constant := 59; -- Too many references 146 EWOULDBLOCK : constant := 35; -- Operation would block 147 E2BIG : constant := 7; -- Argument list too long 148 EILSEQ : constant := 86; -- Illegal byte sequence 149 150 ---------------------- 151 -- Terminal control -- 152 ---------------------- 153 154 TCSANOW : constant := 0; -- Immediate 155 TCIFLUSH : constant := 1; -- Flush input 156 IXON : constant := 512; -- Output sw flow control 157 CLOCAL : constant := 32768; -- Local 158 CRTSCTS : constant := 196608; -- Output hw flow control 159 CREAD : constant := 2048; -- Read 160 CS5 : constant := 0; -- 5 data bits 161 CS6 : constant := 256; -- 6 data bits 162 CS7 : constant := 512; -- 7 data bits 163 CS8 : constant := 768; -- 8 data bits 164 CSTOPB : constant := 1024; -- 2 stop bits 165 PARENB : constant := 4096; -- Parity enable 166 PARODD : constant := 8192; -- Parity odd 167 B0 : constant := 0; -- 0 bps 168 B50 : constant := 50; -- 50 bps 169 B75 : constant := 75; -- 75 bps 170 B110 : constant := 110; -- 110 bps 171 B134 : constant := 134; -- 134 bps 172 B150 : constant := 150; -- 150 bps 173 B200 : constant := 200; -- 200 bps 174 B300 : constant := 300; -- 300 bps 175 B600 : constant := 600; -- 600 bps 176 B1200 : constant := 1200; -- 1200 bps 177 B1800 : constant := 1800; -- 1800 bps 178 B2400 : constant := 2400; -- 2400 bps 179 B4800 : constant := 4800; -- 4800 bps 180 B9600 : constant := 9600; -- 9600 bps 181 B19200 : constant := 19200; -- 19200 bps 182 B38400 : constant := 38400; -- 38400 bps 183 B57600 : constant := 57600; -- 57600 bps 184 B115200 : constant := 115200; -- 115200 bps 185 B230400 : constant := 230400; -- 230400 bps 186 B460800 : constant := 4294967295; -- 460800 bps 187 B500000 : constant := 4294967295; -- 500000 bps 188 B576000 : constant := 4294967295; -- 576000 bps 189 B921600 : constant := 4294967295; -- 921600 bps 190 B1000000 : constant := 4294967295; -- 1000000 bps 191 B1152000 : constant := 4294967295; -- 1152000 bps 192 B1500000 : constant := 4294967295; -- 1500000 bps 193 B2000000 : constant := 4294967295; -- 2000000 bps 194 B2500000 : constant := 4294967295; -- 2500000 bps 195 B3000000 : constant := 4294967295; -- 3000000 bps 196 B3500000 : constant := 4294967295; -- 3500000 bps 197 B4000000 : constant := 4294967295; -- 4000000 bps 198 199 --------------------------------- 200 -- Terminal control characters -- 201 --------------------------------- 202 203 VINTR : constant := 8; -- Interrupt 204 VQUIT : constant := 9; -- Quit 205 VERASE : constant := 3; -- Erase 206 VKILL : constant := 5; -- Kill 207 VEOF : constant := 0; -- EOF 208 VTIME : constant := 17; -- Read timeout 209 VMIN : constant := 16; -- Read min chars 210 VSWTC : constant := -1; -- Switch 211 VSTART : constant := 12; -- Flow control start 212 VSTOP : constant := 13; -- Flow control stop 213 VSUSP : constant := 10; -- Suspend 214 VEOL : constant := 1; -- EOL 215 VREPRINT : constant := 6; -- Reprint unread 216 VDISCARD : constant := 15; -- Discard pending 217 VWERASE : constant := 4; -- Word erase 218 VLNEXT : constant := 14; -- Literal next 219 VEOL2 : constant := 2; -- Alternative EOL 220 221 ----------------------------- 222 -- Pseudo terminal library -- 223 ----------------------------- 224 225 PTY_Library : constant String := ""; -- for g-exptty 226 227 -------------- 228 -- Families -- 229 -------------- 230 231 AF_INET : constant := 2; -- IPv4 address family 232 AF_INET6 : constant := 28; -- IPv6 address family 233 234 ------------------ 235 -- Socket modes -- 236 ------------------ 237 238 SOCK_STREAM : constant := 1; -- Stream socket 239 SOCK_DGRAM : constant := 2; -- Datagram socket 240 241 ----------------- 242 -- Host errors -- 243 ----------------- 244 245 HOST_NOT_FOUND : constant := 1; -- Unknown host 246 TRY_AGAIN : constant := 2; -- Host name lookup failure 247 NO_DATA : constant := 4; -- No data record for name 248 NO_RECOVERY : constant := 3; -- Non recoverable errors 249 250 -------------------- 251 -- Shutdown modes -- 252 -------------------- 253 254 SHUT_RD : constant := 0; -- No more recv 255 SHUT_WR : constant := 1; -- No more send 256 SHUT_RDWR : constant := 2; -- No more recv/send 257 258 --------------------- 259 -- Protocol levels -- 260 --------------------- 261 262 SOL_SOCKET : constant := 65535; -- Options for socket level 263 IPPROTO_IP : constant := 0; -- Dummy protocol for IP 264 IPPROTO_UDP : constant := 17; -- UDP 265 IPPROTO_TCP : constant := 6; -- TCP 266 267 ------------------- 268 -- Request flags -- 269 ------------------- 270 271 MSG_OOB : constant := 1; -- Process out-of-band data 272 MSG_PEEK : constant := 2; -- Peek at incoming data 273 MSG_EOR : constant := 8; -- Send end of record 274 MSG_WAITALL : constant := 64; -- Wait for full reception 275 MSG_NOSIGNAL : constant := 1024; -- No SIGPIPE on send 276 MSG_Forced_Flags : constant := 0; 277 -- Flags set on all send(2) calls 278 279 -------------------- 280 -- Socket options -- 281 -------------------- 282 283 TCP_NODELAY : constant := 1; -- Do not coalesce packets 284 SO_REUSEADDR : constant := 4; -- Bind reuse local address 285 SO_REUSEPORT : constant := 512; -- Bind reuse port number 286 SO_KEEPALIVE : constant := 8; -- Enable keep-alive msgs 287 SO_LINGER : constant := 128; -- Defer close to flush data 288 SO_BROADCAST : constant := 32; -- Can send broadcast msgs 289 SO_SNDBUF : constant := 4097; -- Set/get send buffer size 290 SO_RCVBUF : constant := 4098; -- Set/get recv buffer size 291 SO_SNDTIMEO : constant := 4101; -- Emission timeout 292 SO_RCVTIMEO : constant := 4102; -- Reception timeout 293 SO_ERROR : constant := 4103; -- Get/clear error status 294 IP_MULTICAST_IF : constant := 9; -- Set/get mcast interface 295 IP_MULTICAST_TTL : constant := 10; -- Set/get multicast TTL 296 IP_MULTICAST_LOOP : constant := 11; -- Set/get mcast loopback 297 IP_ADD_MEMBERSHIP : constant := 12; -- Join a multicast group 298 IP_DROP_MEMBERSHIP : constant := 13; -- Leave a multicast group 299 IP_PKTINFO : constant := -1; -- Get datagram info 300 301 ---------------------- 302 -- Type definitions -- 303 ---------------------- 304 305 -- Sizes (in bytes) of the components of struct timeval 306 SIZEOF_tv_sec : constant := 8; -- tv_sec 307 SIZEOF_tv_usec : constant := 8; -- tv_usec 308 309 -- Maximum allowed value for tv_sec 310 MAX_tv_sec : constant := 2 ** (SIZEOF_tv_sec * 8 - 1) - 1; 311 312 -- Sizes of various data types 313 SIZEOF_sockaddr_in : constant := 16; -- struct sockaddr_in 314 SIZEOF_sockaddr_in6 : constant := 28; -- struct sockaddr_in6 315 SIZEOF_fd_set : constant := 128; -- fd_set 316 FD_SETSIZE : constant := 1024; -- Max fd value 317 SIZEOF_struct_hostent : constant := 32; -- struct hostent 318 SIZEOF_struct_servent : constant := 32; -- struct servent 319 320 -- Fields of struct msghdr 321 subtype Msg_Iovlen_T is Interfaces.C.size_t; 322 323 ---------------------------------------- 324 -- Properties of supported interfaces -- 325 ---------------------------------------- 326 327 Need_Netdb_Buffer : constant := 0; -- Need buffer for Netdb ops 328 Need_Netdb_Lock : constant := 0; -- Need lock for Netdb ops 329 Has_Sockaddr_Len : constant := 1; -- Sockaddr has sa_len field 330 Thread_Blocking_IO : constant Boolean := True; 331 -- Set False for contexts where socket i/o are process blocking 332 333 Inet_Pton_Linkname : constant String := "inet_pton"; 334 335 --------------------- 336 -- Threads support -- 337 --------------------- 338 339 -- Clock identifier definitions 340 341 CLOCK_REALTIME : constant := 0; -- System realtime clock 342 CLOCK_MONOTONIC : constant := 4; -- System monotonic clock 343 CLOCK_THREAD_CPUTIME_ID : constant := 14; -- Thread CPU clock 344 CLOCK_RT_Ada : constant := CLOCK_REALTIME; 345 346 -------------------------------- 347 -- File and directory support -- 348 -------------------------------- 349 350 SIZEOF_struct_file_attributes : constant := 32; -- struct file_attributes 351 SIZEOF_struct_dirent_alloc : constant := 272; -- struct dirent allocation 352 353end System.OS_Constants; 354