From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1914) id 83749395C068; Wed, 7 Jul 2021 16:26:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 83749395C068 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Pierre-Marie de Rodat To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-2126] [Ada] Keepalive control on Windows X-Act-Checkin: gcc X-Git-Author: Dmitriy Anisimkov X-Git-Refname: refs/heads/master X-Git-Oldrev: 29d3965161a8c9337a8b46019eea184ff3a6ac61 X-Git-Newrev: 125bb16bece454843ca420fd033351d1a80976a4 Message-Id: <20210707162636.83749395C068@sourceware.org> Date: Wed, 7 Jul 2021 16:26:36 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jul 2021 16:26:36 -0000 https://gcc.gnu.org/g:125bb16bece454843ca420fd033351d1a80976a4 commit r12-2126-g125bb16bece454843ca420fd033351d1a80976a4 Author: Dmitriy Anisimkov Date: Thu May 20 19:55:02 2021 +0600 [Ada] Keepalive control on Windows gcc/ada/ * s-oscons-tmplt.c (TCP_KEEPCNT TCP_KEEPIDLE, TCP_KEEPINTVL): Hardcode on Windows if undefined. Diff: --- gcc/ada/s-oscons-tmplt.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/gcc/ada/s-oscons-tmplt.c b/gcc/ada/s-oscons-tmplt.c index d42e663fdde..044e203cdb6 100644 --- a/gcc/ada/s-oscons-tmplt.c +++ b/gcc/ada/s-oscons-tmplt.c @@ -1502,18 +1502,36 @@ CNS(MSG_Forced_Flags, "") CND(TCP_NODELAY, "Do not coalesce packets") #ifndef TCP_KEEPCNT +#ifdef __MINGW32__ +/* Windows headers can be too old to have all available constants. + * We know this one. */ +# define TCP_KEEPCNT 16 +#else # define TCP_KEEPCNT -1 #endif +#endif CND(TCP_KEEPCNT, "Maximum number of keepalive probes") #ifndef TCP_KEEPIDLE +#ifdef __MINGW32__ +/* Windows headers can be too old to have all available constants. + * We know this one. */ +# define TCP_KEEPIDLE 3 +#else # define TCP_KEEPIDLE -1 #endif +#endif CND(TCP_KEEPIDLE, "Idle time before TCP starts sending keepalive probes") #ifndef TCP_KEEPINTVL +#ifdef __MINGW32__ +/* Windows headers can be too old to have all available constants. + * We know this one. */ +# define TCP_KEEPINTVL 17 +#else # define TCP_KEEPINTVL -1 #endif +#endif CND(TCP_KEEPINTVL, "Time between individual keepalive probes") #ifndef SO_REUSEADDR