public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Pierre-Marie de Rodat <pmderodat@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r12-2126] [Ada] Keepalive control on Windows
Date: Wed,  7 Jul 2021 16:26:36 +0000 (GMT)	[thread overview]
Message-ID: <20210707162636.83749395C068@sourceware.org> (raw)

https://gcc.gnu.org/g:125bb16bece454843ca420fd033351d1a80976a4

commit r12-2126-g125bb16bece454843ca420fd033351d1a80976a4
Author: Dmitriy Anisimkov <anisimko@adacore.com>
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


                 reply	other threads:[~2021-07-07 16:26 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210707162636.83749395C068@sourceware.org \
    --to=pmderodat@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).