From patchwork Wed Oct 3 19:43:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philippe Blain via GitGitGadget X-Patchwork-Id: 10625229 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5482D17E0 for ; Wed, 3 Oct 2018 19:43:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 42ECE26CFF for ; Wed, 3 Oct 2018 19:43:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 36F0F2906E; Wed, 3 Oct 2018 19:43:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1583629026 for ; Wed, 3 Oct 2018 19:43:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727344AbeJDCda (ORCPT ); Wed, 3 Oct 2018 22:33:30 -0400 Received: from mail-pl1-f179.google.com ([209.85.214.179]:43601 "EHLO mail-pl1-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727283AbeJDCda (ORCPT ); Wed, 3 Oct 2018 22:33:30 -0400 Received: by mail-pl1-f179.google.com with SMTP id 30-v6so3963774plb.10 for ; Wed, 03 Oct 2018 12:43:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:message-id:in-reply-to:references:from:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=eaCap+4eG7xnx8/kcNiGRQmECQLgnN8QRuovxIBGM1I=; b=IFTHDuUphSOmIxgrznYilkp4VQ4++2MceQ8k6Or8W3Qc8pxHdjpv7f+QqB0EGbX/SZ pMahDoHNg2QBkqKsVhzN9VWRzYn8GjqfmjVfHKMmCC+LU4ONsoLXi7EMuBBvny+dV4+6 ZCNw228lcojk1vyte/GvGR9c6eAGST/LoebdC0Ukk0i9YDEPqfQQKKFp91Yj7oxjzmel UmSSz7UIojG8Phf181Oy73CgBe58ru4358v4JPH34JZGGZCjbpQAvMqNdxakasH6clKP p0zWX2qyDRGw6mjS7weiqWeVwQZbFuf7a6K7qS0HNzJc+2strFk6BJLM76rY7uGRvP0M K8hA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:in-reply-to:references:from :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=eaCap+4eG7xnx8/kcNiGRQmECQLgnN8QRuovxIBGM1I=; b=WvE7y7edhT/sEbfAF517FWMY/7uPpRglxPkPgHeYmtbw/J+Z+INfeIzDDUOv4ERBUL q/cLURp64ZaeewjCQ+oYwpOM/8nINmZNJ2XuD4om+GkMMnauWi2bDo/Vb2d7+EFRgqkR 7jr429dzzXGAc5X1cpm4Iwb5y5+nf7whI/nFDwyvPfqS64Bc2b0rHRsdjvKQapdeGQJg iTzemgq3OXEXsCvNa+W8tYq6cSbrMNKiLuBio9Ym+9wNPk1Vj87RP2gFZh6U4721Mxam F07RSjz/hYce0GfvEdA8SsfZyHVjZ/vPxZDDS4L4b2tMRy4rwQSOf/zc8S1JzlWaK29/ 8epQ== X-Gm-Message-State: ABuFfohIEK6nM6nvTvZsduEnlu8s1fUSKB1H5fzPb7FOljFFdCslyuLI pAoQI+mB4g7USgi/bif4LGggNblF X-Google-Smtp-Source: ACcGV61zwC9csSNIY9QFfBbAZCLo7qw32LclIO51Uqw5dnbxjUocw3TwQcKUP56IE7+3v+YCBZeglQ== X-Received: by 2002:a17:902:7e49:: with SMTP id a9-v6mr3097018pln.149.1538595822281; Wed, 03 Oct 2018 12:43:42 -0700 (PDT) Received: from [127.0.0.1] ([40.112.137.127]) by smtp.gmail.com with ESMTPSA id o62-v6sm3521322pfb.0.2018.10.03.12.43.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Oct 2018 12:43:41 -0700 (PDT) Date: Wed, 03 Oct 2018 12:43:41 -0700 (PDT) X-Google-Original-Date: Wed, 03 Oct 2018 19:43:35 GMT Message-Id: <1c2dba41189e97c2dfa7d98da3b52589eb9091cc.1538595818.git.gitgitgadget@gmail.com> In-Reply-To: References: From: "Johannes Schindelin via GitGitGadget" Subject: [PATCH 1/3] compat/poll: prepare for targeting Windows Vista Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Junio C Hamano , Johannes Schindelin Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Johannes Schindelin Windows Vista (and later) actually have a working poll(), but we still cannot use it because it only works on sockets. So let's detect when we are targeting Windows Vista and undefine those constants, and define `pollfd` so that we can declare our own pollfd struct. We also need to make sure that we override those constants *after* `winsock2.h` has been `#include`d (otherwise we would not really override those constants). Signed-off-by: Johannes Schindelin --- compat/poll/poll.c | 6 +++--- compat/poll/poll.h | 15 +++++++++++++++ 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/compat/poll/poll.c b/compat/poll/poll.c index 7ed3fbbea1..ad5dcde439 100644 --- a/compat/poll/poll.c +++ b/compat/poll/poll.c @@ -29,9 +29,6 @@ #include -/* Specification. */ -#include - #include #include #include @@ -55,6 +52,9 @@ # include #endif +/* Specification. */ +#include "poll.h" + #ifdef HAVE_SYS_IOCTL_H # include #endif diff --git a/compat/poll/poll.h b/compat/poll/poll.h index cd1995292a..1e1597360f 100644 --- a/compat/poll/poll.h +++ b/compat/poll/poll.h @@ -21,6 +21,21 @@ #ifndef _GL_POLL_H #define _GL_POLL_H +#if defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x600 +/* Vista has its own, socket-only poll() */ +#undef POLLIN +#undef POLLPRI +#undef POLLOUT +#undef POLLERR +#undef POLLHUP +#undef POLLNVAL +#undef POLLRDNORM +#undef POLLRDBAND +#undef POLLWRNORM +#undef POLLWRBAND +#define pollfd compat_pollfd +#endif + /* fake a poll(2) environment */ #define POLLIN 0x0001 /* any readable data available */ #define POLLPRI 0x0002 /* OOB/Urgent readable data */ From patchwork Wed Oct 3 19:43:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philippe Blain via GitGitGadget X-Patchwork-Id: 10625231 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D02C41515 for ; Wed, 3 Oct 2018 19:43:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C073326CFF for ; Wed, 3 Oct 2018 19:43:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B48362906E; Wed, 3 Oct 2018 19:43:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6741F26CFF for ; Wed, 3 Oct 2018 19:43:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727361AbeJDCdd (ORCPT ); Wed, 3 Oct 2018 22:33:33 -0400 Received: from mail-pg1-f173.google.com ([209.85.215.173]:38138 "EHLO mail-pg1-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727279AbeJDCdb (ORCPT ); Wed, 3 Oct 2018 22:33:31 -0400 Received: by mail-pg1-f173.google.com with SMTP id r77-v6so2025941pgr.5 for ; Wed, 03 Oct 2018 12:43:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:message-id:in-reply-to:references:from:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=qwETXbBpa/3IfIxTJyl7x12RlJkCss0KRrjInvB0RW0=; b=LIPrzj2TwZGxfzwvIcvmNJV7x4c5GynlcLF8Ijln9P0qQYf4OwbNC9uu9113P6jt3q RlyTx3Js7fwiWvuvvTtyf6z2TclXpqa9v1ZrLJvsxeKqkHN/p72IEDZHnRd/flqe0qW3 L1AHtHzfUnRswMAL/7+PQPT09P6LLzXvxo/xnTynWrrp4UP+pjD42lS/1kYQ7/kwISn3 VxdPva0eqTTz2/jhfmga0/zKAVcyVqqn0+0Ky2EbObfRsfPOknbU3js1mm5iTL9spWku +76PGD9ptwgybcuU8mzKJCzk54WD4cmllyMIKsai5AQ776vqP423yH+q7Puw9kiUBa6f /D6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:in-reply-to:references:from :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=qwETXbBpa/3IfIxTJyl7x12RlJkCss0KRrjInvB0RW0=; b=EHcTtUSnU7/K5AKd/VE0kgxXtAWfz0FVsL1TvaY23izh/c1OWsNUEh+pfx/hzygbs2 rwx4o+VfbFe/ZO9nmYAUTfaOOA7X/hxlEkYdDZJL9/YfaX1xHRysY+XiEOIuYBqSADA/ PDaHw6DMeMzFtU2PehMuCB4fCOYisN90hCy7uaRw0nS6eUsUEBBYRPesdvB4wOFF6v/j 90aQWIfB1KfUH7JRLrtzJY6U1l9/fKxTJW0QAtDBMDKyJMI/3ZoQp63rabkID7g9kgG/ FWL7Q0PiVyPFIrAcvjBXeBW0s0u3AgVy+N7W0zL5FLtCyHtztmqlmLk3lBx5FNiAOuJe aigw== X-Gm-Message-State: ABuFfoh+GBWd5cZdGH0PT3CkJzgf0ARkA8TC/ZnvolPcYVLWDCxT66Hd nhqNK6zvlmmFbrU7E3KHg8DlCnJq X-Google-Smtp-Source: ACcGV62+/fOCOilGP81FXd5VpzosWF7P5Y/ZPfwB9S/kFtiqqiWpKcRb09AXIH670WH4k+A+Vsx2kQ== X-Received: by 2002:a63:525c:: with SMTP id s28-v6mr2689902pgl.78.1538595823777; Wed, 03 Oct 2018 12:43:43 -0700 (PDT) Received: from [127.0.0.1] ([40.112.137.127]) by smtp.gmail.com with ESMTPSA id l10-v6sm4782297pgs.45.2018.10.03.12.43.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Oct 2018 12:43:43 -0700 (PDT) Date: Wed, 03 Oct 2018 12:43:43 -0700 (PDT) X-Google-Original-Date: Wed, 03 Oct 2018 19:43:36 GMT Message-Id: <47966fb1f55bf3014d93b8aa2d746ef22f8b5a7c.1538595818.git.gitgitgadget@gmail.com> In-Reply-To: References: From: "Johannes Schindelin via GitGitGadget" Subject: [PATCH 2/3] mingw: set _WIN32_WINNT explicitly for Git for Windows Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Junio C Hamano , Johannes Schindelin Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Johannes Schindelin Previously, we only ever declared a target Windows version if compiling with Visual C. Which meant that we were relying on the MinGW headers to guess which Windows version we want to target... Let's be explicit about it, in particular because we actually want to bump the target Windows version to Vista (which we will do in the next commit). Signed-off-by: Johannes Schindelin --- git-compat-util.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-compat-util.h b/git-compat-util.h index 5f2e90932f..3ba93d9c15 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -146,7 +146,7 @@ #define _SGI_SOURCE 1 #if defined(WIN32) && !defined(__CYGWIN__) /* Both MinGW and MSVC */ -# if defined (_MSC_VER) && !defined(_WIN32_WINNT) +# if !defined(_WIN32_WINNT) # define _WIN32_WINNT 0x0502 # endif #define WIN32_LEAN_AND_MEAN /* stops windows.h including winsock.h */ From patchwork Wed Oct 3 19:43:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philippe Blain via GitGitGadget X-Patchwork-Id: 10625233 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6C6211515 for ; Wed, 3 Oct 2018 19:43:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5BDDF26CFF for ; Wed, 3 Oct 2018 19:43:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4FEC12906E; Wed, 3 Oct 2018 19:43:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DD00726CFF for ; Wed, 3 Oct 2018 19:43:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727372AbeJDCde (ORCPT ); Wed, 3 Oct 2018 22:33:34 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:40894 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727283AbeJDCdd (ORCPT ); Wed, 3 Oct 2018 22:33:33 -0400 Received: by mail-pg1-f195.google.com with SMTP id n31-v6so2017745pgm.7 for ; Wed, 03 Oct 2018 12:43:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:message-id:in-reply-to:references:from:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=xP8s7pZODrNTqCuygyKg4o8kzCijz1sOlFFcG6lhGQM=; b=De6kHP04zfh5xnXJ0veaEN0bR6L6i8eWQ00noaw72MnwtDETfQVtWZjut3c3cehIRM 1g6XYepR6GladXXps5eQKdEItDC/jhmf9S4UcL2cny2bXOjLwKdaJ3i5JdP4FCI5neg7 YTbjJZu+Y1vw6qi08b8CF/9X9dVCXIFvd/Tto6txBwBjW3+CU1RP3ulgNXtia8/q/p78 VQfPmENF6SyryeNmFnquRApFCrhWM3LRZtUW9ttqNHGzZ6UmuaiDm7BtlMs/VxDEYcVa FM/h2SelEOaHk3DwsUWEYVGrvOw8YS/rXjfh8bksBt9MipieClSokJ+ewN4i2En6zJNp YGIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:in-reply-to:references:from :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=xP8s7pZODrNTqCuygyKg4o8kzCijz1sOlFFcG6lhGQM=; b=lzh2wnVDn7shF26RNhQoqas3Ha5f5Qe3fGzB1mlj4s8uu1OttUzYGfXTx788LX3XCF /xjq3VvqQdZsd6Vk+WVt3ho7qDddOPftnpM9ClrrOTew18NMS6k41D4KnZJiVoBDOjCa WGxToMOwkTFNPH8TeYnUqZFT9yZHrIFDlzWoOpDHS2Qz70iHC0U/QDBaCm/wOOFUmiWk mtkVYwxMBsUVODs7ppSvw73X0k0jGjqnii0QhaIpKp5CZWypyYULJ+2qc5AVxnm2zjCJ dL4t0lEhq1ymJ3nLIZr9euxmUc+QuJwIBPqtt1nAJ/uS6pAoQnB+B8Bs6tkFL2grlQ/B ir4w== X-Gm-Message-State: ABuFfojgB7jUTb1Fu430M+/W0Hq9VGcR1q6OLEcCQRiJBCcOFlAZxD4c b64fDkmFaErH49r/JbZdJLU9zg7Y X-Google-Smtp-Source: ACcGV60f18OOz5iFxoPmD49YX9bABnvhNs0soORa610ydvtrEg9vMeapnD1MtxRX1KTOrhMf0D65eg== X-Received: by 2002:a62:6786:: with SMTP id t6-v6mr3200634pfj.92.1538595825261; Wed, 03 Oct 2018 12:43:45 -0700 (PDT) Received: from [127.0.0.1] ([40.112.137.127]) by smtp.gmail.com with ESMTPSA id z7-v6sm3704788pff.146.2018.10.03.12.43.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Oct 2018 12:43:44 -0700 (PDT) Date: Wed, 03 Oct 2018 12:43:44 -0700 (PDT) X-Google-Original-Date: Wed, 03 Oct 2018 19:43:37 GMT Message-Id: <2b127d9669aa7b73ced7611b6e77044f5efed11d.1538595818.git.gitgitgadget@gmail.com> In-Reply-To: References: From: "Johannes Schindelin via GitGitGadget" Subject: [PATCH 3/3] mingw: bump the minimum Windows version to Vista Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Junio C Hamano , Johannes Schindelin Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Johannes Schindelin Quite some time ago, a last plea to the XP users out there who want to see Windows XP support in Git for Windows, asking them to get engaged and help, vanished into the depths of the universe. We tried for a long time to play nice with the last remaining XP users who somehow manage to build Git from source, but a recent update of mingw-w64 (7.0.0.5233.e0c09544 -> 7.0.0.5245.edf66197) finally dropped the last sign of XP support, and Git for Windows' SDK is no longer able to build core Git's `master` branch as a consequence. (Git for Windows' `master` branch already bumped the minimum Windows version to Vista a while ago, so it is fine.) It is time to require Windows Vista or later to build Git from source. This, incidentally, lets us use quite a few nice new APIs. It also means that we no longer need the inet_pton() and inet_ntop() emulation, which is nice. Signed-off-by: Johannes Schindelin --- config.mak.uname | 4 ---- git-compat-util.h | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/config.mak.uname b/config.mak.uname index e47af72e01..8acdeb71fd 100644 --- a/config.mak.uname +++ b/config.mak.uname @@ -381,8 +381,6 @@ ifeq ($(uname_S),Windows) NO_PYTHON = YesPlease BLK_SHA1 = YesPlease ETAGS_TARGET = ETAGS - NO_INET_PTON = YesPlease - NO_INET_NTOP = YesPlease NO_POSIX_GOODIES = UnfortunatelyYes NATIVE_CRLF = YesPlease DEFAULT_HELP_FORMAT = html @@ -529,8 +527,6 @@ ifneq (,$(findstring MINGW,$(uname_S))) NO_REGEX = YesPlease NO_PYTHON = YesPlease ETAGS_TARGET = ETAGS - NO_INET_PTON = YesPlease - NO_INET_NTOP = YesPlease NO_POSIX_GOODIES = UnfortunatelyYes DEFAULT_HELP_FORMAT = html COMPAT_CFLAGS += -DNOGDI -Icompat -Icompat/win32 diff --git a/git-compat-util.h b/git-compat-util.h index 3ba93d9c15..48c955541e 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -147,7 +147,7 @@ #if defined(WIN32) && !defined(__CYGWIN__) /* Both MinGW and MSVC */ # if !defined(_WIN32_WINNT) -# define _WIN32_WINNT 0x0502 +# define _WIN32_WINNT 0x0600 # endif #define WIN32_LEAN_AND_MEAN /* stops windows.h including winsock.h */ #include