mirror of
https://github.com/gcc-mirror/gcc.git
synced 2026-05-06 14:59:39 +02:00
ada: add BACKLOG_MAX OS constant
BACKLOG_MAX represents the number of outstanding connections in the socket's listen queue. gcc/ada/ChangeLog: * libgnat/g-socket.adb (Listen_Socket): Change default value. * libgnat/g-socket.ads (Listen_Socket): Likewise. * s-oscons-tmplt.c (BACKLOG_MAX): New.
This commit is contained in:
committed by
Marc Poulhiès
parent
195b495917
commit
165b029d4d
@@ -1958,7 +1958,7 @@ package body GNAT.Sockets is
|
||||
|
||||
procedure Listen_Socket
|
||||
(Socket : Socket_Type;
|
||||
Length : Natural := 15)
|
||||
Length : Natural := SOSC.BACKLOG_MAX)
|
||||
is
|
||||
Res : constant C.int := C_Listen (C.int (Socket), C.int (Length));
|
||||
begin
|
||||
|
||||
@@ -1219,7 +1219,7 @@ package GNAT.Sockets is
|
||||
|
||||
procedure Listen_Socket
|
||||
(Socket : Socket_Type;
|
||||
Length : Natural := 15);
|
||||
Length : Natural := SOSC.BACKLOG_MAX);
|
||||
-- To accept connections, a socket is first created with Create_Socket,
|
||||
-- a willingness to accept incoming connections and a queue Length for
|
||||
-- incoming connections are specified. Raise Socket_Error on error.
|
||||
|
||||
@@ -1791,6 +1791,9 @@ struct sockaddr_un {
|
||||
#define SIZEOF_sockaddr_un (sizeof (struct sockaddr_un))
|
||||
CND(SIZEOF_sockaddr_un, "struct sockaddr_un")
|
||||
|
||||
#define BACKLOG_MAX 15
|
||||
CND(BACKLOG_MAX, "number of outstanding connections in the socket's listen queue")
|
||||
|
||||
#define SIZEOF_fd_set (sizeof (fd_set))
|
||||
CND(SIZEOF_fd_set, "fd_set")
|
||||
CND(FD_SETSIZE, "Max fd value")
|
||||
|
||||
Reference in New Issue
Block a user