public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-2126] [Ada] Keepalive control on Windows
@ 2021-07-07 16:26 Pierre-Marie de Rodat
0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2021-07-07 16:26 UTC (permalink / raw)
To: gcc-cvs
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-07-07 16:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-07 16:26 [gcc r12-2126] [Ada] Keepalive control on Windows Pierre-Marie de Rodat
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).