Commit c7d920ad by Thomas Quinot Committed by Arnaud Charlet

gen-soccon.c: Rename to gen-oscons.c

2008-08-05  Thomas Quinot  <quinot@adacore.com>

	* gen-soccon.c: Rename to gen-oscons.c

	* gen-oscons.c: New file. Now generate System.OS_Constants instead of
	GNAT.Sockets.Constants.
	Add new constants for GNAT.Serial_Communications and System.File_IO.

From-SVN: r138679
parent faa76152
2008-08-05 Thomas Quinot <quinot@adacore.com>
* a-rttiev.adb: Minor reformatting (comments)
* gen-soccon.c: Rename to gen-oscons.c
* gen-oscons.c: New file. Now generate System.OS_Constants instead of
GNAT.Sockets.Constants.
Add new constants for GNAT.Serial_Communications and System.File_IO.
2008-08-05 Javier Miranda <miranda@adacore.com> 2008-08-05 Javier Miranda <miranda@adacore.com>
* sem_util.adb (Collect_Interfaces_Info): Minor reformating. * sem_util.adb (Collect_Interfaces_Info): Minor reformating.
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* * * *
* GNAT SYSTEM UTILITIES * * GNAT SYSTEM UTILITIES *
* * * *
* G E N - S O C C O N * * G E N - O S C O N *
* * * *
* Copyright (C) 2004-2008, Free Software Foundation, Inc. * * Copyright (C) 2004-2008, Free Software Foundation, Inc. *
* * * *
...@@ -22,18 +22,18 @@ ...@@ -22,18 +22,18 @@
* * * *
****************************************************************************/ ****************************************************************************/
/* This program generates g-soccon.ads */ /* This program generates s-oscons.ads */
/* /*
* To build using DEC C: * To build using DEC C:
* *
* CC/DEFINE="TARGET=""OpenVMS""" gen-soccon * CC/DEFINE="TARGET=""OpenVMS""" gen-oscon
* LINK gen-soccon * LINK gen-oscon
* RUN gen-soccon * RUN gen-oscon
* *
* Note: OpenVMS versions older than 8.3 provide an incorrect value in * Note: OpenVMS versions older than 8.3 provide an incorrect value in
* the DEC C header files for MSG_WAITALL. To generate the VMS version * the DEC C header files for MSG_WAITALL. To generate the VMS version
* of g-soccon.ads, gen-soccon should be run on an 8.3 or later machine. * of s-oscons.ads, gen-oscon should be run on an 8.3 or later machine.
*/ */
#ifndef TARGET #ifndef TARGET
...@@ -44,9 +44,10 @@ ...@@ -44,9 +44,10 @@
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <limits.h> #include <limits.h>
#ifdef __MINGW32__
#include <fcntl.h> #include <fcntl.h>
#ifndef __vxworks
# include <termios.h>
#endif #endif
#include "gsocket.h" #include "gsocket.h"
...@@ -103,7 +104,7 @@ TXT("--------------------------------------------------------------------------- ...@@ -103,7 +104,7 @@ TXT("---------------------------------------------------------------------------
TXT("-- --") TXT("-- --")
TXT("-- GNAT COMPILER COMPONENTS --") TXT("-- GNAT COMPILER COMPONENTS --")
TXT("-- --") TXT("-- --")
TXT("-- G N A T . S O C K E T S . C O N S T A N T S --") TXT("-- S Y S T E M . O S _ C O N S T A N T S --")
TXT("-- --") TXT("-- --")
TXT("-- S p e c --") TXT("-- S p e c --")
TXT("-- --") TXT("-- --")
...@@ -133,15 +134,381 @@ TXT("-- ...@@ -133,15 +134,381 @@ TXT("--
TXT("------------------------------------------------------------------------------") TXT("------------------------------------------------------------------------------")
_NL _NL
TXT("-- This package provides target dependent definitions of constant for use") TXT("-- This package provides target dependent definitions of constant for use")
TXT("-- by the GNAT.Sockets package (g-socket.ads). This package should not be") TXT("-- by the GNAT runtime library. This package should not be directly with'd")
TXT("-- directly with'ed by an applications program.") TXT("-- by an application program.")
_NL _NL
TXT("-- This is the version for " TARGET) TXT("-- This is the version for " TARGET)
TXT("-- This file is generated automatically, do not modify it by hand! Instead,") TXT("-- This file is generated automatically, do not modify it by hand! Instead,")
TXT("-- make changes to gen-soccon.c and re-run it on each target.") TXT("-- make changes to gen-oscon.c and re-run it on each target.")
_NL _NL
TXT("with Interfaces.C;") TXT("with Interfaces.C;")
TXT("package GNAT.Sockets.Constants is") TXT("package System.OS_Constants is")
_NL
TXT(" pragma Pure;")
_NL
TXT(" ---------------------")
TXT(" -- File open modes --")
TXT(" ---------------------")
_NL
#ifndef O_RDWR
# define O_RDWR -1
#endif
CND(O_RDWR, "Read/write")
#ifndef O_NOCTTY
# define O_NOCTTY -1
#endif
CND(O_NOCTTY, "Don't change ctrl tty")
#ifndef O_NDELAY
# define O_NDELAY -1
#endif
CND(O_NDELAY, "Nonblocking")
_NL
TXT(" ----------------------")
TXT(" -- Fcntl operations --")
TXT(" ----------------------")
_NL
#ifndef F_GETFL
# define F_GETFL -1
#endif
CND(F_GETFL, "Get flags")
#ifndef F_SETFL
# define F_SETFL -1
#endif
CND(F_SETFL, "Set flags")
_NL
TXT(" -----------------")
TXT(" -- Fcntl flags --")
TXT(" -----------------")
_NL
#ifndef FNDELAY
# define FNDELAY -1
#endif
CND(FNDELAY, "Nonblocking")
#if !defined(__vxworks)
_NL
TXT(" ----------------------")
TXT(" -- Termical control --")
TXT(" ----------------------")
_NL
#ifndef TCSANOW
# define TCSANOW -1
#endif
CND(TCSANOW, "Immediate")
#ifndef TCIFLUSH
# define TCIFLUSH -1
#endif
CND(TCIFLUSH, "Flush input")
#ifndef CLOCAL
# define CLOCAL -1
#endif
CND(CLOCAL, "Local")
#ifndef CRTSCTS
# define CRTSCTS -1
#endif
CND(CRTSCTS, "Hardware flow control")
#ifndef CREAD
# define CREAD -1
#endif
CND(CREAD, "Read")
#ifndef CS5
# define CS5 -1
#endif
CND(CS5, "5 data bits")
#ifndef CS6
# define CS6 -1
#endif
CND(CS6, "6 data bits")
#ifndef CS7
# define CS7 -1
#endif
CND(CS7, "7 data bits")
#ifndef CS8
# define CS8 -1
#endif
CND(CS8, "8 data bits")
#ifndef CSTOPB
# define CSTOPB -1
#endif
CND(CSTOPB, "2 stop bits")
#ifndef PARENB
# define PARENB -1
#endif
CND(PARENB, "Parity enable")
#ifndef PARODD
# define PARODD -1
#endif
CND(PARODD, "Parity odd")
#ifndef B0
# define B0 -1
#endif
CND(B0, "0 bps")
#ifndef B50
# define B50 -1
#endif
CND(B50, "50 bps")
#ifndef B75
# define B75 -1
#endif
CND(B75, "75 bps")
#ifndef B110
# define B110 -1
#endif
CND(B110, "110 bps")
#ifndef B134
# define B134 -1
#endif
CND(B134, "134 bps")
#ifndef B150
# define B150 -1
#endif
CND(B150, "150 bps")
#ifndef B200
# define B200 -1
#endif
CND(B200, "200 bps")
#ifndef B300
# define B300 -1
#endif
CND(B300, "300 bps")
#ifndef B600
# define B600 -1
#endif
CND(B600, "600 bps")
#ifndef B1200
# define B1200 -1
#endif
CND(B1200, "1200 bps")
#ifndef B1800
# define B1800 -1
#endif
CND(B1800, "1800 bps")
#ifndef B2400
# define B2400 -1
#endif
CND(B2400, "2400 bps")
#ifndef B4800
# define B4800 -1
#endif
CND(B4800, "4800 bps")
#ifndef B9600
# define B9600 -1
#endif
CND(B9600, "9600 bps")
#ifndef B19200
# define B19200 -1
#endif
CND(B19200, "19200 bps")
#ifndef B38400
# define B38400 -1
#endif
CND(B38400, "38400 bps")
#ifndef B57600
# define B57600 -1
#endif
CND(B57600, "57600 bps")
#ifndef B115200
# define B115200 -1
#endif
CND(B115200, "115200 bps")
#ifndef B230400
# define B230400 -1
#endif
CND(B230400, "230400 bps")
#ifndef B460800
# define B460800 -1
#endif
CND(B460800, "460800 bps")
#ifndef B500000
# define B500000 -1
#endif
CND(B500000, "500000 bps")
#ifndef B576000
# define B576000 -1
#endif
CND(B576000, "576000 bps")
#ifndef B921600
# define B921600 -1
#endif
CND(B921600, "921600 bps")
#ifndef B1000000
# define B1000000 -1
#endif
CND(B1000000, "1000000 bps")
#ifndef B1152000
# define B1152000 -1
#endif
CND(B1152000, "1152000 bps")
#ifndef B1500000
# define B1500000 -1
#endif
CND(B1500000, "1500000 bps")
#ifndef B2000000
# define B2000000 -1
#endif
CND(B2000000, "2000000 bps")
#ifndef B2500000
# define B2500000 -1
#endif
CND(B2500000, "2500000 bps")
#ifndef B3000000
# define B3000000 -1
#endif
CND(B3000000, "3000000 bps")
#ifndef B3500000
# define B3500000 -1
#endif
CND(B3500000, "3500000 bps")
#ifndef B4000000
# define B4000000 -1
#endif
CND(B4000000, "4000000 bps")
_NL
TXT(" ---------------------------------")
TXT(" -- Terminal control characters --")
TXT(" ---------------------------------")
_NL
#ifndef VINTR
# define VINTR -1
#endif
CND(VINTR, "Interrupt")
#ifndef VQUIT
# define VQUIT -1
#endif
CND(VQUIT, "Quit")
#ifndef VERASE
# define VERASE -1
#endif
CND(VERASE, "Erase")
#ifndef VKILL
# define VKILL -1
#endif
CND(VKILL, "Kill")
#ifndef VEOF
# define VEOF -1
#endif
CND(VEOF, "EOF")
#ifndef VTIME
# define VTIME -1
#endif
CND(VTIME, "Read timeout")
#ifndef VMIN
# define VMIN -1
#endif
CND(VMIN, "Read min chars")
#ifndef VSWTC
# define VSWTC -1
#endif
CND(VSWTC, "Switch")
#ifndef VSTART
# define VSTART -1
#endif
CND(VSTART, "Flow control start")
#ifndef VSTOP
# define VSTOP -1
#endif
CND(VSTOP, "Flow control stop")
#ifndef VSUSP
# define VSUSP -1
#endif
CND(VSUSP, "Suspend")
#ifndef VEOL
# define VEOL -1
#endif
CND(VEOL, "EOL")
#ifndef VREPRINT
# define VREPRINT -1
#endif
CND(VREPRINT, "Reprint unread")
#ifndef VDISCARD
# define VDISCARD -1
#endif
CND(VDISCARD, "Discard pending")
#ifndef VWERASE
# define VWERASE -1
#endif
CND(VWERASE, "Word erase")
#ifndef VLNEXT
# define VLNEXT -1
#endif
CND(VLNEXT, "Literal next")
#ifndef VEOL2
# define VEOL2 -1
#endif
CND(VEOL2, "Alternative EOL")
#endif /* !defined(__vxworks) */
_NL _NL
TXT(" --------------") TXT(" --------------")
TXT(" -- Families --") TXT(" -- Families --")
...@@ -160,213 +527,228 @@ CND(AF_INET, "IPv4 address family") ...@@ -160,213 +527,228 @@ CND(AF_INET, "IPv4 address family")
#endif #endif
CND(AF_INET6, "IPv6 address family") CND(AF_INET6, "IPv6 address family")
_NL _NL
TXT(" -----------") TXT(" ------------------")
TXT(" -- Modes --") TXT(" -- Socket modes --")
TXT(" -----------") TXT(" ------------------")
_NL _NL
#ifndef SOCK_STREAM #ifndef SOCK_STREAM
#define SOCK_STREAM -1 # define SOCK_STREAM -1
#endif #endif
CND(SOCK_STREAM, "Stream socket") CND(SOCK_STREAM, "Stream socket")
#ifndef SOCK_DGRAM #ifndef SOCK_DGRAM
#define SOCK_DGRAM -1 # define SOCK_DGRAM -1
#endif #endif
CND(SOCK_DGRAM, "Datagram socket") CND(SOCK_DGRAM, "Datagram socket")
_NL _NL
TXT(" -------------------") TXT(" ------------------")
TXT(" -- Socket errors --") TXT(" -- Errno values --")
TXT(" -------------------") TXT(" ------------------")
_NL _NL
#ifndef EACCES #ifndef EACCES
#define EACCES -1 # define EACCES -1
#endif #endif
CND(EACCES, "Permission denied") CND(EACCES, "Permission denied")
#ifndef EADDRINUSE #ifndef EADDRINUSE
#define EADDRINUSE -1 # define EADDRINUSE -1
#endif #endif
CND(EADDRINUSE, "Address already in use") CND(EADDRINUSE, "Address already in use")
#ifndef EADDRNOTAVAIL #ifndef EADDRNOTAVAIL
#define EADDRNOTAVAIL -1 # define EADDRNOTAVAIL -1
#endif #endif
CND(EADDRNOTAVAIL, "Cannot assign address") CND(EADDRNOTAVAIL, "Cannot assign address")
#ifndef EAFNOSUPPORT #ifndef EAFNOSUPPORT
#define EAFNOSUPPORT -1 # define EAFNOSUPPORT -1
#endif #endif
CND(EAFNOSUPPORT, "Addr family not supported") CND(EAFNOSUPPORT, "Addr family not supported")
#ifndef EAGAIN
# define EAGAIN -1
#endif
CND(EAGAIN, "Try again")
#ifndef EALREADY #ifndef EALREADY
#define EALREADY -1 # define EALREADY -1
#endif #endif
CND(EALREADY, "Operation in progress") CND(EALREADY, "Operation in progress")
#ifndef EBADF #ifndef EBADF
#define EBADF -1 # define EBADF -1
#endif #endif
CND(EBADF, "Bad file descriptor") CND(EBADF, "Bad file descriptor")
#ifndef ECONNABORTED #ifndef ECONNABORTED
#define ECONNABORTED -1 # define ECONNABORTED -1
#endif #endif
CND(ECONNABORTED, "Connection aborted") CND(ECONNABORTED, "Connection aborted")
#ifndef ECONNREFUSED #ifndef ECONNREFUSED
#define ECONNREFUSED -1 # define ECONNREFUSED -1
#endif #endif
CND(ECONNREFUSED, "Connection refused") CND(ECONNREFUSED, "Connection refused")
#ifndef ECONNRESET #ifndef ECONNRESET
#define ECONNRESET -1 # define ECONNRESET -1
#endif #endif
CND(ECONNRESET, "Connection reset by peer") CND(ECONNRESET, "Connection reset by peer")
#ifndef EDESTADDRREQ #ifndef EDESTADDRREQ
#define EDESTADDRREQ -1 # define EDESTADDRREQ -1
#endif #endif
CND(EDESTADDRREQ, "Destination addr required") CND(EDESTADDRREQ, "Destination addr required")
#ifndef EFAULT #ifndef EFAULT
#define EFAULT -1 # define EFAULT -1
#endif #endif
CND(EFAULT, "Bad address") CND(EFAULT, "Bad address")
#ifndef EHOSTDOWN #ifndef EHOSTDOWN
#define EHOSTDOWN -1 # define EHOSTDOWN -1
#endif #endif
CND(EHOSTDOWN, "Host is down") CND(EHOSTDOWN, "Host is down")
#ifndef EHOSTUNREACH #ifndef EHOSTUNREACH
#define EHOSTUNREACH -1 # define EHOSTUNREACH -1
#endif #endif
CND(EHOSTUNREACH, "No route to host") CND(EHOSTUNREACH, "No route to host")
#ifndef EINPROGRESS #ifndef EINPROGRESS
#define EINPROGRESS -1 # define EINPROGRESS -1
#endif #endif
CND(EINPROGRESS, "Operation now in progress") CND(EINPROGRESS, "Operation now in progress")
#ifndef EINTR #ifndef EINTR
#define EINTR -1 # define EINTR -1
#endif #endif
CND(EINTR, "Interrupted system call") CND(EINTR, "Interrupted system call")
#ifndef EINVAL #ifndef EINVAL
#define EINVAL -1 # define EINVAL -1
#endif #endif
CND(EINVAL, "Invalid argument") CND(EINVAL, "Invalid argument")
#ifndef EIO #ifndef EIO
#define EIO -1 # define EIO -1
#endif #endif
CND(EIO, "Input output error") CND(EIO, "Input output error")
#ifndef EISCONN #ifndef EISCONN
#define EISCONN -1 # define EISCONN -1
#endif #endif
CND(EISCONN, "Socket already connected") CND(EISCONN, "Socket already connected")
#ifndef ELOOP #ifndef ELOOP
#define ELOOP -1 # define ELOOP -1
#endif #endif
CND(ELOOP, "Too many symbolic links") CND(ELOOP, "Too many symbolic links")
#ifndef EMFILE #ifndef EMFILE
#define EMFILE -1 # define EMFILE -1
#endif #endif
CND(EMFILE, "Too many open files") CND(EMFILE, "Too many open files")
#ifndef EMSGSIZE #ifndef EMSGSIZE
#define EMSGSIZE -1 # define EMSGSIZE -1
#endif #endif
CND(EMSGSIZE, "Message too long") CND(EMSGSIZE, "Message too long")
#ifndef ENAMETOOLONG #ifndef ENAMETOOLONG
#define ENAMETOOLONG -1 # define ENAMETOOLONG -1
#endif #endif
CND(ENAMETOOLONG, "Name too long") CND(ENAMETOOLONG, "Name too long")
#ifndef ENETDOWN #ifndef ENETDOWN
#define ENETDOWN -1 # define ENETDOWN -1
#endif #endif
CND(ENETDOWN, "Network is down") CND(ENETDOWN, "Network is down")
#ifndef ENETRESET #ifndef ENETRESET
#define ENETRESET -1 # define ENETRESET -1
#endif #endif
CND(ENETRESET, "Disconn. on network reset") CND(ENETRESET, "Disconn. on network reset")
#ifndef ENETUNREACH #ifndef ENETUNREACH
#define ENETUNREACH -1 # define ENETUNREACH -1
#endif #endif
CND(ENETUNREACH, "Network is unreachable") CND(ENETUNREACH, "Network is unreachable")
#ifndef ENOBUFS #ifndef ENOBUFS
#define ENOBUFS -1 # define ENOBUFS -1
#endif #endif
CND(ENOBUFS, "No buffer space available") CND(ENOBUFS, "No buffer space available")
#ifndef ENOENT
# define ENOENT -1
#endif
CND(ENOENT, "File not found")
#ifndef ENOMEM
# define ENOMEM -1
#endif
CND(ENOMEM, "Out of memory")
#ifndef ENOPROTOOPT #ifndef ENOPROTOOPT
#define ENOPROTOOPT -1 # define ENOPROTOOPT -1
#endif #endif
CND(ENOPROTOOPT, "Protocol not available") CND(ENOPROTOOPT, "Protocol not available")
#ifndef ENOTCONN #ifndef ENOTCONN
#define ENOTCONN -1 # define ENOTCONN -1
#endif #endif
CND(ENOTCONN, "Socket not connected") CND(ENOTCONN, "Socket not connected")
#ifndef ENOTSOCK #ifndef ENOTSOCK
#define ENOTSOCK -1 # define ENOTSOCK -1
#endif #endif
CND(ENOTSOCK, "Operation on non socket") CND(ENOTSOCK, "Operation on non socket")
#ifndef EOPNOTSUPP #ifndef EOPNOTSUPP
#define EOPNOTSUPP -1 # define EOPNOTSUPP -1
#endif #endif
CND(EOPNOTSUPP, "Operation not supported") CND(EOPNOTSUPP, "Operation not supported")
#ifndef EPFNOSUPPORT #ifndef EPFNOSUPPORT
#define EPFNOSUPPORT -1 # define EPFNOSUPPORT -1
#endif #endif
CND(EPFNOSUPPORT, "Unknown protocol family") CND(EPFNOSUPPORT, "Unknown protocol family")
#ifndef EPROTONOSUPPORT #ifndef EPROTONOSUPPORT
#define EPROTONOSUPPORT -1 # define EPROTONOSUPPORT -1
#endif #endif
CND(EPROTONOSUPPORT, "Unknown protocol") CND(EPROTONOSUPPORT, "Unknown protocol")
#ifndef EPROTOTYPE #ifndef EPROTOTYPE
#define EPROTOTYPE -1 # define EPROTOTYPE -1
#endif #endif
CND(EPROTOTYPE, "Unknown protocol type") CND(EPROTOTYPE, "Unknown protocol type")
#ifndef ESHUTDOWN #ifndef ESHUTDOWN
#define ESHUTDOWN -1 # define ESHUTDOWN -1
#endif #endif
CND(ESHUTDOWN, "Cannot send once shutdown") CND(ESHUTDOWN, "Cannot send once shutdown")
#ifndef ESOCKTNOSUPPORT #ifndef ESOCKTNOSUPPORT
#define ESOCKTNOSUPPORT -1 # define ESOCKTNOSUPPORT -1
#endif #endif
CND(ESOCKTNOSUPPORT, "Socket type not supported") CND(ESOCKTNOSUPPORT, "Socket type not supported")
#ifndef ETIMEDOUT #ifndef ETIMEDOUT
#define ETIMEDOUT -1 # define ETIMEDOUT -1
#endif #endif
CND(ETIMEDOUT, "Connection timed out") CND(ETIMEDOUT, "Connection timed out")
#ifndef ETOOMANYREFS #ifndef ETOOMANYREFS
#define ETOOMANYREFS -1 # define ETOOMANYREFS -1
#endif #endif
CND(ETOOMANYREFS, "Too many references") CND(ETOOMANYREFS, "Too many references")
#ifndef EWOULDBLOCK #ifndef EWOULDBLOCK
#define EWOULDBLOCK -1 # define EWOULDBLOCK -1
#endif #endif
CND(EWOULDBLOCK, "Operation would block") CND(EWOULDBLOCK, "Operation would block")
_NL _NL
...@@ -376,37 +758,37 @@ TXT(" -----------------") ...@@ -376,37 +758,37 @@ TXT(" -----------------")
_NL _NL
#ifndef HOST_NOT_FOUND #ifndef HOST_NOT_FOUND
#define HOST_NOT_FOUND -1 # define HOST_NOT_FOUND -1
#endif #endif
CND(HOST_NOT_FOUND, "Unknown host") CND(HOST_NOT_FOUND, "Unknown host")
#ifndef TRY_AGAIN #ifndef TRY_AGAIN
#define TRY_AGAIN -1 # define TRY_AGAIN -1
#endif #endif
CND(TRY_AGAIN, "Host name lookup failure") CND(TRY_AGAIN, "Host name lookup failure")
#ifndef NO_DATA #ifndef NO_DATA
#define NO_DATA -1 # define NO_DATA -1
#endif #endif
CND(NO_DATA, "No data record for name") CND(NO_DATA, "No data record for name")
#ifndef NO_RECOVERY #ifndef NO_RECOVERY
#define NO_RECOVERY -1 # define NO_RECOVERY -1
#endif #endif
CND(NO_RECOVERY, "Non recoverable errors") CND(NO_RECOVERY, "Non recoverable errors")
_NL _NL
TXT(" -------------------") TXT(" ----------------------")
TXT(" -- Control flags --") TXT(" -- Ioctl operatings --")
TXT(" -------------------") TXT(" ----------------------")
_NL _NL
#ifndef FIONBIO #ifndef FIONBIO
#define FIONBIO -1 # define FIONBIO -1
#endif #endif
CND(FIONBIO, "Set/clear non-blocking io") CND(FIONBIO, "Set/clear non-blocking io")
#ifndef FIONREAD #ifndef FIONREAD
#define FIONREAD -1 # define FIONREAD -1
#endif #endif
CND(FIONREAD, "How many bytes to read") CND(FIONREAD, "How many bytes to read")
_NL _NL
...@@ -416,17 +798,17 @@ TXT(" --------------------") ...@@ -416,17 +798,17 @@ TXT(" --------------------")
_NL _NL
#ifndef SHUT_RD #ifndef SHUT_RD
#define SHUT_RD -1 # define SHUT_RD -1
#endif #endif
CND(SHUT_RD, "No more recv") CND(SHUT_RD, "No more recv")
#ifndef SHUT_WR #ifndef SHUT_WR
#define SHUT_WR -1 # define SHUT_WR -1
#endif #endif
CND(SHUT_WR, "No more send") CND(SHUT_WR, "No more send")
#ifndef SHUT_RDWR #ifndef SHUT_RDWR
#define SHUT_RDWR -1 # define SHUT_RDWR -1
#endif #endif
CND(SHUT_RDWR, "No more recv/send") CND(SHUT_RDWR, "No more recv/send")
_NL _NL
...@@ -436,22 +818,22 @@ TXT(" ---------------------") ...@@ -436,22 +818,22 @@ TXT(" ---------------------")
_NL _NL
#ifndef SOL_SOCKET #ifndef SOL_SOCKET
#define SOL_SOCKET -1 # define SOL_SOCKET -1
#endif #endif
CND(SOL_SOCKET, "Options for socket level") CND(SOL_SOCKET, "Options for socket level")
#ifndef IPPROTO_IP #ifndef IPPROTO_IP
#define IPPROTO_IP -1 # define IPPROTO_IP -1
#endif #endif
CND(IPPROTO_IP, "Dummy protocol for IP") CND(IPPROTO_IP, "Dummy protocol for IP")
#ifndef IPPROTO_UDP #ifndef IPPROTO_UDP
#define IPPROTO_UDP -1 # define IPPROTO_UDP -1
#endif #endif
CND(IPPROTO_UDP, "UDP") CND(IPPROTO_UDP, "UDP")
#ifndef IPPROTO_TCP #ifndef IPPROTO_TCP
#define IPPROTO_TCP -1 # define IPPROTO_TCP -1
#endif #endif
CND(IPPROTO_TCP, "TCP") CND(IPPROTO_TCP, "TCP")
_NL _NL
...@@ -461,27 +843,27 @@ TXT(" -------------------") ...@@ -461,27 +843,27 @@ TXT(" -------------------")
_NL _NL
#ifndef MSG_OOB #ifndef MSG_OOB
#define MSG_OOB -1 # define MSG_OOB -1
#endif #endif
CND(MSG_OOB, "Process out-of-band data") CND(MSG_OOB, "Process out-of-band data")
#ifndef MSG_PEEK #ifndef MSG_PEEK
#define MSG_PEEK -1 # define MSG_PEEK -1
#endif #endif
CND(MSG_PEEK, "Peek at incoming data") CND(MSG_PEEK, "Peek at incoming data")
#ifndef MSG_EOR #ifndef MSG_EOR
#define MSG_EOR -1 # define MSG_EOR -1
#endif #endif
CND(MSG_EOR, "Send end of record") CND(MSG_EOR, "Send end of record")
#ifndef MSG_WAITALL #ifndef MSG_WAITALL
#define MSG_WAITALL -1 # define MSG_WAITALL -1
#endif #endif
CND(MSG_WAITALL, "Wait for full reception") CND(MSG_WAITALL, "Wait for full reception")
#ifndef MSG_NOSIGNAL #ifndef MSG_NOSIGNAL
#define MSG_NOSIGNAL -1 # define MSG_NOSIGNAL -1
#endif #endif
CND(MSG_NOSIGNAL, "No SIGPIPE on send") CND(MSG_NOSIGNAL, "No SIGPIPE on send")
...@@ -500,87 +882,87 @@ TXT(" --------------------") ...@@ -500,87 +882,87 @@ TXT(" --------------------")
_NL _NL
#ifndef TCP_NODELAY #ifndef TCP_NODELAY
#define TCP_NODELAY -1 # define TCP_NODELAY -1
#endif #endif
CND(TCP_NODELAY, "Do not coalesce packets") CND(TCP_NODELAY, "Do not coalesce packets")
#ifndef SO_REUSEADDR #ifndef SO_REUSEADDR
#define SO_REUSEADDR -1 # define SO_REUSEADDR -1
#endif #endif
CND(SO_REUSEADDR, "Bind reuse local address") CND(SO_REUSEADDR, "Bind reuse local address")
#ifndef SO_REUSEPORT #ifndef SO_REUSEPORT
#define SO_REUSEPORT -1 # define SO_REUSEPORT -1
#endif #endif
CND(SO_REUSEPORT, "Bind reuse port number") CND(SO_REUSEPORT, "Bind reuse port number")
#ifndef SO_KEEPALIVE #ifndef SO_KEEPALIVE
#define SO_KEEPALIVE -1 # define SO_KEEPALIVE -1
#endif #endif
CND(SO_KEEPALIVE, "Enable keep-alive msgs") CND(SO_KEEPALIVE, "Enable keep-alive msgs")
#ifndef SO_LINGER #ifndef SO_LINGER
#define SO_LINGER -1 # define SO_LINGER -1
#endif #endif
CND(SO_LINGER, "Defer close to flush data") CND(SO_LINGER, "Defer close to flush data")
#ifndef SO_BROADCAST #ifndef SO_BROADCAST
#define SO_BROADCAST -1 # define SO_BROADCAST -1
#endif #endif
CND(SO_BROADCAST, "Can send broadcast msgs") CND(SO_BROADCAST, "Can send broadcast msgs")
#ifndef SO_SNDBUF #ifndef SO_SNDBUF
#define SO_SNDBUF -1 # define SO_SNDBUF -1
#endif #endif
CND(SO_SNDBUF, "Set/get send buffer size") CND(SO_SNDBUF, "Set/get send buffer size")
#ifndef SO_RCVBUF #ifndef SO_RCVBUF
#define SO_RCVBUF -1 # define SO_RCVBUF -1
#endif #endif
CND(SO_RCVBUF, "Set/get recv buffer size") CND(SO_RCVBUF, "Set/get recv buffer size")
#ifndef SO_SNDTIMEO #ifndef SO_SNDTIMEO
#define SO_SNDTIMEO -1 # define SO_SNDTIMEO -1
#endif #endif
CND(SO_SNDTIMEO, "Emission timeout") CND(SO_SNDTIMEO, "Emission timeout")
#ifndef SO_RCVTIMEO #ifndef SO_RCVTIMEO
#define SO_RCVTIMEO -1 # define SO_RCVTIMEO -1
#endif #endif
CND(SO_RCVTIMEO, "Reception timeout") CND(SO_RCVTIMEO, "Reception timeout")
#ifndef SO_ERROR #ifndef SO_ERROR
#define SO_ERROR -1 # define SO_ERROR -1
#endif #endif
CND(SO_ERROR, "Get/clear error status") CND(SO_ERROR, "Get/clear error status")
#ifndef IP_MULTICAST_IF #ifndef IP_MULTICAST_IF
#define IP_MULTICAST_IF -1 # define IP_MULTICAST_IF -1
#endif #endif
CND(IP_MULTICAST_IF, "Set/get mcast interface") CND(IP_MULTICAST_IF, "Set/get mcast interface")
#ifndef IP_MULTICAST_TTL #ifndef IP_MULTICAST_TTL
#define IP_MULTICAST_TTL -1 # define IP_MULTICAST_TTL -1
#endif #endif
CND(IP_MULTICAST_TTL, "Set/get multicast TTL") CND(IP_MULTICAST_TTL, "Set/get multicast TTL")
#ifndef IP_MULTICAST_LOOP #ifndef IP_MULTICAST_LOOP
#define IP_MULTICAST_LOOP -1 # define IP_MULTICAST_LOOP -1
#endif #endif
CND(IP_MULTICAST_LOOP, "Set/get mcast loopback") CND(IP_MULTICAST_LOOP, "Set/get mcast loopback")
#ifndef IP_ADD_MEMBERSHIP #ifndef IP_ADD_MEMBERSHIP
#define IP_ADD_MEMBERSHIP -1 # define IP_ADD_MEMBERSHIP -1
#endif #endif
CND(IP_ADD_MEMBERSHIP, "Join a multicast group") CND(IP_ADD_MEMBERSHIP, "Join a multicast group")
#ifndef IP_DROP_MEMBERSHIP #ifndef IP_DROP_MEMBERSHIP
#define IP_DROP_MEMBERSHIP -1 # define IP_DROP_MEMBERSHIP -1
#endif #endif
CND(IP_DROP_MEMBERSHIP, "Leave a multicast group") CND(IP_DROP_MEMBERSHIP, "Leave a multicast group")
#ifndef IP_PKTINFO #ifndef IP_PKTINFO
#define IP_PKTINFO -1 # define IP_PKTINFO -1
#endif #endif
CND(IP_PKTINFO, "Get datagram info") CND(IP_PKTINFO, "Get datagram info")
...@@ -591,7 +973,7 @@ TXT(" -------------------") ...@@ -591,7 +973,7 @@ TXT(" -------------------")
_NL _NL
#ifndef IOV_MAX #ifndef IOV_MAX
#define IOV_MAX INT_MAX # define IOV_MAX INT_MAX
#endif #endif
CND(IOV_MAX, "Maximum writev iovcnt") CND(IOV_MAX, "Maximum writev iovcnt")
...@@ -681,7 +1063,7 @@ CND(WSAEDISCON, "Disconnected") ...@@ -681,7 +1063,7 @@ CND(WSAEDISCON, "Disconnected")
#endif #endif
_NL _NL
TXT("end GNAT.Sockets.Constants;") TXT("end System.OS_Constants;")
output (); output ();
return 0; return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment