From: "Marc Poulhiès" <poulhies@adacore.com>
To: gcc-patches@gcc.gnu.org
Cc: Piotr Trojanek <trojanek@adacore.com>
Subject: [COMMITED] ada: Remove socket definitions for ancient MinGW
Date: Mon, 26 Sep 2022 11:13:41 +0200 [thread overview]
Message-ID: <20220926091341.272596-1-poulhies@adacore.com> (raw)
From: Piotr Trojanek <trojanek@adacore.com>
Modern MinGW defines _WIN32_WINNT as 0xa00, so there is no need go guard
against it being lower than 0x0600 or setting it to 0x0501.
gcc/ada/
* gsocket.h: Remove redefinition of _WIN32_WINNT.
* mingw32.h: Remove conditional definition of _WIN32_WINNT.
Tested on x86_64-pc-linux-gnu, committed on master.
---
gcc/ada/gsocket.h | 6 ------
gcc/ada/mingw32.h | 5 -----
2 files changed, 11 deletions(-)
diff --git a/gcc/ada/gsocket.h b/gcc/ada/gsocket.h
index e7284a1ef4e..561f2ffb566 100644
--- a/gcc/ada/gsocket.h
+++ b/gcc/ada/gsocket.h
@@ -80,12 +80,6 @@
#define FD_SETSIZE 1024
#ifdef __MINGW32__
-/* winsock2.h allows WSAPoll related definitions only when
- * _WIN32_WINNT >= 0x0600 */
-#if !defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0600
-#define _WIN32_WINNT 0x0600
-#endif
-
#include <winsock2.h>
#include <ws2tcpip.h>
#include <versionhelpers.h>
diff --git a/gcc/ada/mingw32.h b/gcc/ada/mingw32.h
index a190d51076f..d038211a1dc 100644
--- a/gcc/ada/mingw32.h
+++ b/gcc/ada/mingw32.h
@@ -44,11 +44,6 @@
#define UNICODE /* For Win32 API */
#endif
-/* We need functionality available only starting with Windows XP */
-#ifndef _WIN32_WINNT
-#define _WIN32_WINNT 0x0501
-#endif
-
#ifndef __CYGWIN__
#include <tchar.h>
#endif
--
2.25.1
reply other threads:[~2022-09-26 9:13 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=20220926091341.272596-1-poulhies@adacore.com \
--to=poulhies@adacore.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=trojanek@adacore.com \
/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).