GNU bug report logs - #45821
28.0.50; Add UDP support for Emacs on Windows

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Lars Ingebrigtsen <larsi@HIDDEN>; Keywords: patch; dated Tue, 12 Jan 2021 18:09:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 45821 <at> debbugs.gnu.org:


Received: (at 45821) by debbugs.gnu.org; 11 Oct 2021 12:07:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Oct 11 08:07:06 2021
Received: from localhost ([127.0.0.1]:56881 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mZu5B-0001cG-P1
	for submit <at> debbugs.gnu.org; Mon, 11 Oct 2021 08:07:05 -0400
Received: from mail-wr1-f48.google.com ([209.85.221.48]:35557)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rpluim@HIDDEN>) id 1mZu59-0001b0-Ar
 for 45821 <at> debbugs.gnu.org; Mon, 11 Oct 2021 08:07:04 -0400
Received: by mail-wr1-f48.google.com with SMTP id g25so8973690wrb.2
 for <45821 <at> debbugs.gnu.org>; Mon, 11 Oct 2021 05:07:03 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :mime-version:content-transfer-encoding;
 bh=SxY0G9ZNBho0YwKuQE+2l1lo6yP0gbc+GZQ8C+KqaSI=;
 b=ja6c0NhP00miE7SmwL/8KQy1nes09UwDja7JXTaa7rrlnjbuVp+r6iZ9j2ap9mYA17
 y6AQRj5MUrdtlhIkuzasG9oHax7VaEjpVBQeTvIknY/M5IabWb8YXk2LMM9b0DR9VbTz
 JXc1X/2JxXg6aVwXIQZCppcXdGmrIZWEqKfOLgzUc+XTBrrXxJyIF32lGgb6AyqTRPF0
 mkju27CwEeOlqyR1RgVkyAY0WddDGgJiDyqZRSIWJ4k5Vd7chhcND+Rl7eYEC5C1haG1
 Cm4y85ADAISuUfZnDLn/MM9oX5j1Kg0S8G54AXDf7M43E4o06ZATQtsLM7834+egqsEp
 0UvQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:mime-version:content-transfer-encoding;
 bh=SxY0G9ZNBho0YwKuQE+2l1lo6yP0gbc+GZQ8C+KqaSI=;
 b=V7/X1buTYrfeAav9aI9JJBkq4seQnkPXbPn3STe4efkWyQPPTiADTtyxlMSpK6iRfF
 e7ZhjlsBItnvpzsnu6ufFmfB9qPq5q+Clhl8tqKsZC7FqwhVWA0YJnrOS9bFRSntpin2
 NpOz21LbX/jBGUaxnszLlRweKqOMhoXVRDt9Nr0ANkmaUFqO+v+SnAyAiWHBnEMv/gnL
 2/6pI9YFCdI5lSVD4G/7XTXXdurVls56o/D4WDx3CGkLS3DuB0cn4rtwEgMYGRFo1M/O
 ZXYPDSSvJmyCO43mmFeX/Cbj93VkHj6mfJ/pUVAoatf9YmRfHeywKVEV76TrLbp6ui2h
 armQ==
X-Gm-Message-State: AOAM531od0F246BqxQCBQOTB0q+1zOgdnqDe404m/qAeshwrxEg3mUZm
 tJvXXr/UZvvLFXXxS7z7yGR5KYTfaZQ=
X-Google-Smtp-Source: ABdhPJxbDNQx9HyDvpt2qwIHTLpjFiSm1a+/oAs2qeRRq0hT+V3f2YDSy25ZDyC+U5fvlyWVYrY3Pg==
X-Received: by 2002:a05:6000:10c7:: with SMTP id
 b7mr7702470wrx.36.1633954017521; 
 Mon, 11 Oct 2021 05:06:57 -0700 (PDT)
Received: from rltb ([82.66.8.55])
 by smtp.gmail.com with ESMTPSA id k128sm7419912wme.41.2021.10.11.05.06.56
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 11 Oct 2021 05:06:56 -0700 (PDT)
From: Robert Pluim <rpluim@HIDDEN>
To: Stefan Kangas <stefan@HIDDEN>
Subject: Re: bug#45821: 28.0.50; Add UDP support for Emacs on Windows
References: <87turmhvub.fsf@HIDDEN> <83lfcyc865.fsf@HIDDEN>
 <87k0shqjq0.fsf@HIDDEN> <87k0llngby.fsf@HIDDEN>
 <87czou3qz0.fsf@HIDDEN> <83fstpluvw.fsf@HIDDEN>
 <CADwFkm=3qt9R32WoHi7n927ivCXyR1hcfSn4eFdKrmVv4x79fA@HIDDEN>
Date: Mon, 11 Oct 2021 14:06:55 +0200
In-Reply-To: <CADwFkm=3qt9R32WoHi7n927ivCXyR1hcfSn4eFdKrmVv4x79fA@HIDDEN>
 (Stefan Kangas's message of "Mon, 11 Oct 2021 04:56:43 -0700")
Message-ID: <87ee8ru5nk.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 45821
Cc: Eli Zaretskii <eliz@HIDDEN>, larsi@HIDDEN, 45821 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

>>>>> On Mon, 11 Oct 2021 04:56:43 -0700, Stefan Kangas <stefan@HIDDEN>=
 said:

    Stefan> Eli Zaretskii <eliz@HIDDEN> writes:
    >>> From: Robert Pluim <rpluim@HIDDEN>
    >>> Cc: Eli Zaretskii <eliz@HIDDEN>,  45821 <at> debbugs.gnu.org
    >>> Date: Mon, 27 Sep 2021 18:47:47 +0200
    >>>=20
    >>> I=CA=BCve resurrected this patch, it seems to be working nicely. Ad=
ding a
    >>> lisp-level control variable seems more trouble than it=CA=BCs worth=
, I
    >>> think the risk of breaking stuff on all platforms is higher than
    >>> that of breaking stuff on Windows.
    >>>=20
    >>> Are we too late for emacs-28?
    >>=20
    >> Yes, please wait until the release branch is cut.

    Stefan> I guess it's time to push this to master now?

No, because it breaks TLS connections.

I am in fact amazed that the existing code works at all on MS-Windows,
since we end up doing multiple 1-byte reads whilst also doing
gnutls_try_handshake, but work it does. And this patch doesn=CA=BCt.

Robert
--=20




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#45821; Package emacs. Full text available.

Message received at 45821 <at> debbugs.gnu.org:


Received: (at 45821) by debbugs.gnu.org; 11 Oct 2021 11:56:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Oct 11 07:56:52 2021
Received: from localhost ([127.0.0.1]:56814 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mZtvH-0007XM-TI
	for submit <at> debbugs.gnu.org; Mon, 11 Oct 2021 07:56:52 -0400
Received: from mail-pj1-f44.google.com ([209.85.216.44]:42540)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stefankangas@HIDDEN>) id 1mZtvF-0007X9-JZ
 for 45821 <at> debbugs.gnu.org; Mon, 11 Oct 2021 07:56:49 -0400
Received: by mail-pj1-f44.google.com with SMTP id
 nn3-20020a17090b38c300b001a03bb6c4ebso10804501pjb.1
 for <45821 <at> debbugs.gnu.org>; Mon, 11 Oct 2021 04:56:49 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:from:in-reply-to:references:user-agent
 :mime-version:date:message-id:subject:to:cc
 :content-transfer-encoding;
 bh=BPuLye1hp9PidO98+pJU5I6EQPJ3XYiL1MZeif6v9Q8=;
 b=UEWXngyXsGwrItfwhwdgNOS6IJPyQXHZelg8PYVm24fcLMptt31JFxCc1xt53QjpoU
 iyQqv2YeN0vUOzvMK3rNM5zMNvJ9XgoYx8X8u0bqyZKUaBsRCSfq881kNHP9DDGTnUFK
 oX7k+5LpkepY7v4MNmwdnvC72g293AuJShsVXIvOM6e5nNH9ZrcliZQzsGDFb1E5uzmT
 8TtLonlsia/2ej/N3rkcL51xUU/yx1JG2fnEP4DJvwj6CLCMZLSirsRAc+CHo8tr97s3
 dtyO7w57jycRwHYH2qpq10kymgglAlDLB7+8KU6d0kGEQ3UudUq7unELBJKj4O0G9Dwu
 j93A==
X-Gm-Message-State: AOAM531Ru06c+vf0E68BYXsMpCqPSCluKhlgChkd4Of96z/vK97tXfyw
 ALxW001oLPG/B2z5JwI/vsxPsj7t9XpDbLFnaKg=
X-Google-Smtp-Source: ABdhPJw0fSp3XysOTIMjWShgNpczBsJ1iOjLxyKSHMFibRUKlL8Xsrg4KsK4J8wISnMJsDWX5UMfi5lnhSjp0bwEj34=
X-Received: by 2002:a17:902:6b07:b0:13e:d5ba:3d8f with SMTP id
 o7-20020a1709026b0700b0013ed5ba3d8fmr24200749plk.32.1633953403735; Mon, 11
 Oct 2021 04:56:43 -0700 (PDT)
Received: from 753933720722 named unknown by gmailapi.google.com with
 HTTPREST; Mon, 11 Oct 2021 04:56:43 -0700
From: Stefan Kangas <stefan@HIDDEN>
In-Reply-To: <83fstpluvw.fsf@HIDDEN> (Eli Zaretskii's message of "Mon, 27 Sep
 2021 21:45:55 +0300")
References: <87turmhvub.fsf@HIDDEN> <83lfcyc865.fsf@HIDDEN>
 <87k0shqjq0.fsf@HIDDEN> <87k0llngby.fsf@HIDDEN>
 <87czou3qz0.fsf@HIDDEN> <83fstpluvw.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.60 (gnu/linux)
MIME-Version: 1.0
Date: Mon, 11 Oct 2021 04:56:43 -0700
Message-ID: <CADwFkm=3qt9R32WoHi7n927ivCXyR1hcfSn4eFdKrmVv4x79fA@HIDDEN>
Subject: Re: bug#45821: 28.0.50; Add UDP support for Emacs on Windows
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 45821
Cc: Robert Pluim <rpluim@HIDDEN>, larsi@HIDDEN, 45821 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

Eli Zaretskii <eliz@HIDDEN> writes:

>> From: Robert Pluim <rpluim@HIDDEN>
>> Cc: Eli Zaretskii <eliz@HIDDEN>,  45821 <at> debbugs.gnu.org
>> Date: Mon, 27 Sep 2021 18:47:47 +0200
>>
>> I=CA=BCve resurrected this patch, it seems to be working nicely. Adding =
a
>> lisp-level control variable seems more trouble than it=CA=BCs worth, I
>> think the risk of breaking stuff on all platforms is higher than
>> that of breaking stuff on Windows.
>>
>> Are we too late for emacs-28?
>
> Yes, please wait until the release branch is cut.

I guess it's time to push this to master now?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#45821; Package emacs. Full text available.

Message received at 45821 <at> debbugs.gnu.org:


Received: (at 45821) by debbugs.gnu.org; 4 Oct 2021 17:59:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Oct 04 13:59:48 2021
Received: from localhost ([127.0.0.1]:38354 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mXSFf-0007CP-Qt
	for submit <at> debbugs.gnu.org; Mon, 04 Oct 2021 13:59:48 -0400
Received: from eggs.gnu.org ([209.51.188.92]:44066)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1mXSFd-0007CB-L5
 for 45821 <at> debbugs.gnu.org; Mon, 04 Oct 2021 13:59:46 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:53864)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1mXSFY-0005jZ-92; Mon, 04 Oct 2021 13:59:40 -0400
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4960
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1mXSFX-0008Tz-Pw; Mon, 04 Oct 2021 13:59:40 -0400
Date: Mon, 04 Oct 2021 20:59:29 +0300
Message-Id: <838rz8658e.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Robert Pluim <rpluim@HIDDEN>
In-Reply-To: <87o884y94w.fsf@HIDDEN> (message from Robert Pluim on Mon, 04
 Oct 2021 19:47:43 +0200)
Subject: Re: bug#45821: 28.0.50; Add UDP support for Emacs on Windows
References: <87turmhvub.fsf@HIDDEN> <83lfcyc865.fsf@HIDDEN>
 <87k0shqjq0.fsf@HIDDEN> <87k0llngby.fsf@HIDDEN>
 <87czou3qz0.fsf@HIDDEN> <87k0j13ob1.fsf@HIDDEN>
 <87o884y94w.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 45821
Cc: larsi@HIDDEN, 45821 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Robert Pluim <rpluim@HIDDEN>
> Cc: Eli Zaretskii <eliz@HIDDEN>,  45821 <at> debbugs.gnu.org
> Date: Mon, 04 Oct 2021 19:47:43 +0200
> 
> I did some more debugging on this. What's happening is that in
> 'wait_reading_process_output', when calling gnutls_try_handshake,
> weʼre exceeding GNUTLS_EMACS_HANDSHAKES_LIMIT. That has a value of
> 6000, so my suspicion is that because the reader_thread no longer
> actually reads, but just calls pfn_WSAEventSelect,
> 'wait_reading_process_output' just spins.

It spins why? because sys_select doesn't wait at all? or doesn't wait
on a handle of the reader thread?

IOW, that would mean the simple state machine between the reader
thread and sys_select somehow became broken, and the question is how?

Or looking at it from a different aspect: how is calling
pfn_WSAEventSelect different from calling _sys_read_ahead, for the
purposes of the dance between the reader thread and sys_select?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#45821; Package emacs. Full text available.

Message received at 45821 <at> debbugs.gnu.org:


Received: (at 45821) by debbugs.gnu.org; 4 Oct 2021 17:47:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Oct 04 13:47:54 2021
Received: from localhost ([127.0.0.1]:38332 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mXS4A-0006vC-HN
	for submit <at> debbugs.gnu.org; Mon, 04 Oct 2021 13:47:54 -0400
Received: from mail-wr1-f47.google.com ([209.85.221.47]:45752)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rpluim@HIDDEN>) id 1mXS46-0006ub-T8
 for 45821 <at> debbugs.gnu.org; Mon, 04 Oct 2021 13:47:52 -0400
Received: by mail-wr1-f47.google.com with SMTP id r10so15712070wra.12
 for <45821 <at> debbugs.gnu.org>; Mon, 04 Oct 2021 10:47:50 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=from:to:cc:subject:references:date:message-id:mime-version
 :content-transfer-encoding;
 bh=+Bvrii5A1Y/yuuP15The++PyWQMe+hW+1I0EFKX5gc4=;
 b=BSSpu7nOfbByfF2LiR3x1N59Yf+xsLNeMAHH5ifK/2r1v5zLWgykDaCQnKkaVoC11v
 maGf2jeKpjwM7/JCzzEwGKGhWqavpzUv7qnG/y6kERg0G32/85CwAdA/t78sHfWy1Ria
 WUymidFeoc3FjB9ZGxX5Q3Op7/Hkqm8yPCVbHNoYq3oaqBpbz2Kq/CtNYLYAfm69XE/Q
 /eXDRnNM5JuZlwM92XDTx6HIBLbm38AgoCMV0S+AxHpJz/FYW8w2UoARxbBl64E6ggCq
 yYyybvhjAzk7Ab1rIzsfWapjqpL49A9m7OrW356vQTyecRnxqBM0hSTJp8oqtqXtw3A/
 HyAw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:from:to:cc:subject:references:date:message-id
 :mime-version:content-transfer-encoding;
 bh=+Bvrii5A1Y/yuuP15The++PyWQMe+hW+1I0EFKX5gc4=;
 b=lBRRQOd/HObRi2AF0m3eLKTGAS7HhI+kib+glSMcgMEANMWHVskB88ZeSFRIxRcATa
 FViHlzMneiEx1pTOeITNd5hhuarg4vmypdblr8SG2kL3B+V64Coln/fba6VjsITG109f
 8B9mq0AueJcT6r86U3yXoZlQJbzHkqh1YSbsZ5gH1FsyLmjc2zfVpM8N738qxPeZ8QVR
 K6oh3anBegMgSjPtN1BFK9etG7l6X050TQOJBzPPNuCEJtX9yjakgXv/XDSiArrmMnY6
 M6G1h+Yc1Xz3Qvw7KzqexQX4nUe2VLzLpKm4Bhukshd5THYFlnsvDv5hFNkGmd7TyNC5
 8AbA==
X-Gm-Message-State: AOAM532sPAMLsokXLyJQR7Zyun7jNrbH4xTCnR9AdeqXFsDJFbLDCdSq
 VKHnlw074ZiFRZ46K3sRfFXvati+mSY=
X-Google-Smtp-Source: ABdhPJyaN7fc9/CSJSmaOHmemgXpoKAS7zXo0q5n3XKs9bCKnuEWIpohL8ewjhfb0m8Q/nLpNiW29A==
X-Received: by 2002:adf:bb0a:: with SMTP id r10mr15570638wrg.23.1633369664651; 
 Mon, 04 Oct 2021 10:47:44 -0700 (PDT)
Received: from rltb ([82.66.8.55])
 by smtp.gmail.com with ESMTPSA id a63sm16200343wme.18.2021.10.04.10.47.43
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 04 Oct 2021 10:47:44 -0700 (PDT)
From: Robert Pluim <rpluim@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
Subject: Re: bug#45821: 28.0.50; Add UDP support for Emacs on Windows
References: <87turmhvub.fsf@HIDDEN> <83lfcyc865.fsf@HIDDEN>
 <87k0shqjq0.fsf@HIDDEN> <87k0llngby.fsf@HIDDEN>
 <87czou3qz0.fsf@HIDDEN> <87k0j13ob1.fsf@HIDDEN>
Date: Mon, 04 Oct 2021 19:47:43 +0200
Message-ID: <87o884y94w.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 45821
Cc: Eli Zaretskii <eliz@HIDDEN>, 45821 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

>>>>> On Mon, 27 Sep 2021 19:45:22 +0200, Robert Pluim <rpluim@HIDDEN> s=
aid:

>>>>> On Mon, 27 Sep 2021 18:47:47 +0200, Robert Pluim <rpluim@HIDDEN> s=
aid:
    Robert> I=CA=BCve resurrected this patch, it seems to be working nicely=
. Adding a
    Robert> lisp-level control variable seems more trouble than it=CA=BCs w=
orth, I
    Robert> think the risk of breaking stuff on all platforms is higher than
    Robert> that of breaking stuff on Windows.

    Robert> Are we too late for emacs-28?

    Robert> Although I=CA=BCve broken TLS connections in the process (but n=
ot http), so
    Robert> maybe we=CA=BCre too late.

I did some more debugging on this. What's happening is that in
'wait_reading_process_output', when calling gnutls_try_handshake,
we=CA=BCre exceeding GNUTLS_EMACS_HANDSHAKES_LIMIT. That has a value of
6000, so my suspicion is that because the reader_thread no longer
actually reads, but just calls pfn_WSAEventSelect,
'wait_reading_process_output' just spins. With the original code,
we=CA=BCre calling gnutls_try_handshake perhaps 2 or 3 times, so I don=CA=
=BCt
understand why the new code behaves so differently (and this
definitely won't make emacs-28).

Interestingly: only 'M-x eww RET https://www.gnu.org' causes
this. 'M-x eww RET https://www.google.com' works fine with both
implementations.

Robert
--=20




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#45821; Package emacs. Full text available.

Message received at 45821 <at> debbugs.gnu.org:


Received: (at 45821) by debbugs.gnu.org; 27 Sep 2021 18:45:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 27 14:45:58 2021
Received: from localhost ([127.0.0.1]:42849 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mUvdW-00011a-GD
	for submit <at> debbugs.gnu.org; Mon, 27 Sep 2021 14:45:58 -0400
Received: from eggs.gnu.org ([209.51.188.92]:42710)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1mUvdU-00011O-I2
 for 45821 <at> debbugs.gnu.org; Mon, 27 Sep 2021 14:45:56 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:38784)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1mUvdP-000522-5v; Mon, 27 Sep 2021 14:45:51 -0400
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4444
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1mUvdO-0008Aj-Pe; Mon, 27 Sep 2021 14:45:51 -0400
Date: Mon, 27 Sep 2021 21:45:55 +0300
Message-Id: <83fstpluvw.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Robert Pluim <rpluim@HIDDEN>
In-Reply-To: <87czou3qz0.fsf@HIDDEN> (message from Robert Pluim on Mon, 27
 Sep 2021 18:47:47 +0200)
Subject: Re: bug#45821: 28.0.50; Add UDP support for Emacs on Windows
References: <87turmhvub.fsf@HIDDEN> <83lfcyc865.fsf@HIDDEN>
 <87k0shqjq0.fsf@HIDDEN> <87k0llngby.fsf@HIDDEN>
 <87czou3qz0.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 45821
Cc: larsi@HIDDEN, 45821 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Robert Pluim <rpluim@HIDDEN>
> Cc: Eli Zaretskii <eliz@HIDDEN>,  45821 <at> debbugs.gnu.org
> Date: Mon, 27 Sep 2021 18:47:47 +0200
> 
> Iʼve resurrected this patch, it seems to be working nicely. Adding a
> lisp-level control variable seems more trouble than itʼs worth, I
> think the risk of breaking stuff on all platforms is higher than
> that of breaking stuff on Windows.
> 
> Are we too late for emacs-28?

Yes, please wait until the release branch is cut.

Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#45821; Package emacs. Full text available.

Message received at 45821 <at> debbugs.gnu.org:


Received: (at 45821) by debbugs.gnu.org; 27 Sep 2021 17:45:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 27 13:45:32 2021
Received: from localhost ([127.0.0.1]:42746 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mUuh1-0007nG-Pk
	for submit <at> debbugs.gnu.org; Mon, 27 Sep 2021 13:45:31 -0400
Received: from mail-wm1-f48.google.com ([209.85.128.48]:53963)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rpluim@HIDDEN>) id 1mUuh0-0007my-80
 for 45821 <at> debbugs.gnu.org; Mon, 27 Sep 2021 13:45:30 -0400
Received: by mail-wm1-f48.google.com with SMTP id z2so1191053wmc.3
 for <45821 <at> debbugs.gnu.org>; Mon, 27 Sep 2021 10:45:30 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :mime-version:content-transfer-encoding;
 bh=Be9VsSBc/C1/RuWsMBaI578ICmlqLz7wA3+PqIWrGKs=;
 b=Xhyfrcz2ipkHJOPtTw+Laf2kEy9iTwGrIzgSIFUJGAz7+MOwW5F9DlesAuW6KxaCsT
 eRjWdVZZbGcZGsvIIsSiNinnK/vIDxI8dk7EAq/OXtP3P6mWZfi4t1+mG05ki05YPmgH
 1uKt5SJITibpRHrQIzAf0VlZrjDd3yWqpVMgg3HGzd03hw1NAQDly7lXzNTZzq0RZHJ1
 JVyLrrvL0TEsmeHeMpU4+EVbIBRB88zy4ltN6sCeAHE82GMQ9mSrCuB+ix2S9KJ+LRTP
 nrooZUVDtUxYWnll4l/jQ76otTWb3tVoxHsd8z1+UiGkKGFYgpFFMofsDCnxONb0dbWj
 010A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:mime-version:content-transfer-encoding;
 bh=Be9VsSBc/C1/RuWsMBaI578ICmlqLz7wA3+PqIWrGKs=;
 b=R6QusEhSsnTHy+gHfquZl7BZDIzv/drZQeSJa4x2WieZk4VOpP5qQZb/ZC5wdO3KS8
 DfOLmLDCKj9bXEieHdWayjKMR2lfJCW7hmsUi7JQ0HZmYvpJvUPMkpcMXnYduzMO2+HN
 uK+FtAwGOaQpe9yex0dnMJhYBIj0TrvmHMBdFj7hdv5LgZB7QWMzc5BrFcTjcGwcNUhJ
 qQ6iqDSASuispAmP4MMiedidkWL/NTBwIZk+ZMEnkhEk1Uvk8oRWc9KfJMtkqq9ioRgl
 Cg+7mMnUN14cuqy8joHnu608IrhCAzVZzoFHuOk6UoJ5IxY4CGe1MjTz8T8Th6pEfNg8
 I+uA==
X-Gm-Message-State: AOAM532VFZRciTKNUv5JccVb4nGwnOFsB9cBHX4I3LioKKIOktKaOoE2
 GT6t/4rrZtEhJmS40liFUaIMF3SQiLuyAg==
X-Google-Smtp-Source: ABdhPJyk/FksAsNsLL2HQSLtgm4ptM1XgtR87Mqaqv8yrJkMD5ugW6MnVRfu5O3iVK9GNdTfIPP1Vg==
X-Received: by 2002:a1c:d4:: with SMTP id 203mr321781wma.87.1632764724118;
 Mon, 27 Sep 2021 10:45:24 -0700 (PDT)
Received: from rltb ([82.66.8.55])
 by smtp.gmail.com with ESMTPSA id g12sm195355wmh.36.2021.09.27.10.45.23
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 27 Sep 2021 10:45:23 -0700 (PDT)
From: Robert Pluim <rpluim@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
Subject: Re: bug#45821: 28.0.50; Add UDP support for Emacs on Windows
References: <87turmhvub.fsf@HIDDEN> <83lfcyc865.fsf@HIDDEN>
 <87k0shqjq0.fsf@HIDDEN> <87k0llngby.fsf@HIDDEN>
 <87czou3qz0.fsf@HIDDEN>
Date: Mon, 27 Sep 2021 19:45:22 +0200
In-Reply-To: <87czou3qz0.fsf@HIDDEN> (Robert Pluim's message of "Mon, 27
 Sep 2021 18:47:47 +0200")
Message-ID: <87k0j13ob1.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 45821
Cc: Eli Zaretskii <eliz@HIDDEN>, 45821 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

>>>>> On Mon, 27 Sep 2021 18:47:47 +0200, Robert Pluim <rpluim@HIDDEN> s=
aid:
    Robert> I=CA=BCve resurrected this patch, it seems to be working nicely=
. Adding a
    Robert> lisp-level control variable seems more trouble than it=CA=BCs w=
orth, I
    Robert> think the risk of breaking stuff on all platforms is higher than
    Robert> that of breaking stuff on Windows.

    Robert> Are we too late for emacs-28?

Although I=CA=BCve broken TLS connections in the process (but not http), so
maybe we=CA=BCre too late.

Robert
--=20




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#45821; Package emacs. Full text available.

Message received at 45821 <at> debbugs.gnu.org:


Received: (at 45821) by debbugs.gnu.org; 27 Sep 2021 16:47:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 27 12:47:57 2021
Received: from localhost ([127.0.0.1]:42667 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mUtnI-00066p-VP
	for submit <at> debbugs.gnu.org; Mon, 27 Sep 2021 12:47:57 -0400
Received: from mail-wr1-f41.google.com ([209.85.221.41]:39788)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rpluim@HIDDEN>) id 1mUtnH-00066a-9l
 for 45821 <at> debbugs.gnu.org; Mon, 27 Sep 2021 12:47:55 -0400
Received: by mail-wr1-f41.google.com with SMTP id r23so27733898wra.6
 for <45821 <at> debbugs.gnu.org>; Mon, 27 Sep 2021 09:47:55 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :mime-version:content-transfer-encoding;
 bh=ZeEqBVXuoxoWsKDVkXNlT14RrqsTIWIJQt11AtTs3Mk=;
 b=avqlzdMdj59h22k21fdNMjpFaaZCXnqqLhRBnWo+Q12rUdQyC+K0LwhM/5GoOLpUN/
 nC/+wrIcdWwt5+1y5qBuVen/DslSvExjUldoseAd2txtUTzCcDcSmmEMD4zEojJ6r68u
 kxWzHgHDyfvAbczYbtjDBc89kpP4BCaebNWfSmPhRm4OthX7tWMcekNHwK9IAzR4/OaF
 Bd5SnuzT7kJMhbe1BZk9XNGt9no4gpIiFdtao7JGdrnitV4jkqtdU6aE730l43Jnh0f3
 Ip4ICFzxN/VHl4pibHP3BTRgStZvHuTXT+EqhPgsOHYr8V2JayqmyNHXp1ROCKgLV4gH
 PomA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:mime-version:content-transfer-encoding;
 bh=ZeEqBVXuoxoWsKDVkXNlT14RrqsTIWIJQt11AtTs3Mk=;
 b=exN5O/tRfEKp8MveLXvoJ15+iQVYYjYE0BYAp01X8HU5KBVEV4EQCDYKjGeJaUyV24
 BGIldF9rqzZ+a7tUc1C665tqUHQPanSCHVwLQr+gqFDcx0NDO2goR6P8svtYJWTH8JZi
 7nv/LKdd4+fUtzEcyTREEhqk/cQxYHbwQ66w4fOl11kfFBtwww2qJ1x5uc98tC+V71Zi
 B8L9enI6tWQdaWQZYYJfukEE2KPjkMvWXnsfidsntdCAE6urSHM/bZXT58eOJbmwIDXW
 eJzmoczzCzlUvgG9cVorjWMoRRtfyDn63mdPKW3PWLnd8jrKzwKxaEl+pQ54aeyPMdx2
 GbnQ==
X-Gm-Message-State: AOAM533PD+BF6bZBYiw/aELntGZiNxooP4IPS0IG/ywNIyI2r9ebFTnj
 zfCPKpvCN1kPG3Mj3AFYcVxyl2zFYsI0Rw==
X-Google-Smtp-Source: ABdhPJzuOgdf3gMjiEkq3Uvov99TwslQpXwfK33MyDIDYZ5nb9aKP6nrJVK5ukTuXeZbCd8V5RCd/w==
X-Received: by 2002:a5d:6ac7:: with SMTP id u7mr957457wrw.219.1632761269020;
 Mon, 27 Sep 2021 09:47:49 -0700 (PDT)
Received: from rltb ([82.66.8.55])
 by smtp.gmail.com with ESMTPSA id z8sm7877505wrm.63.2021.09.27.09.47.48
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 27 Sep 2021 09:47:48 -0700 (PDT)
From: Robert Pluim <rpluim@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
Subject: Re: bug#45821: 28.0.50; Add UDP support for Emacs on Windows
References: <87turmhvub.fsf@HIDDEN> <83lfcyc865.fsf@HIDDEN>
 <87k0shqjq0.fsf@HIDDEN> <87k0llngby.fsf@HIDDEN>
Date: Mon, 27 Sep 2021 18:47:47 +0200
In-Reply-To: <87k0llngby.fsf@HIDDEN> (Lars Ingebrigtsen's message of "Tue,
 20 Jul 2021 17:41:05 +0200")
Message-ID: <87czou3qz0.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 45821
Cc: Eli Zaretskii <eliz@HIDDEN>, 45821 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

>>>>> On Tue, 20 Jul 2021 17:41:05 +0200, Lars Ingebrigtsen <larsi@HIDDEN=
> said:

    Lars> Robert Pluim <rpluim@HIDDEN> writes:
    >>>> This patch from Robert Pluim adds that support, but needs somebody=
 that
    >>>> actually uses Windows to test it.
    >>>>=20
    >>>> As it stands you need to arrange for WORKING_SELECT_EMULATION to be
    >>>> defined.
    >>>=20
    >>> Why do we need that #ifdef?  Leaving it there means this is dead co=
de
    >>> that will never be tested.
    >>=20
    >> It=CA=BCs a WIP testing patch. If we applied it we=CA=BCd remove the=
 ifdef (and
    >> maybe add a lisp-level control var to turn it off)

    Lars> I tried applying the patch and building on Windows and...  er...
    Lars> nothing happened?  That is, touching w32.c didn't lead to anythin=
g being
    Lars> compiled.  So I guess I don't understand how this works under Win=
dows.
    Lars> (A mingw/non-mingw thing?)

    Lars> I still think it would be very nice if we had UDP support under W=
indows,
    Lars> so if somebody else could poke at this, that'd be cool.

I=CA=BCve resurrected this patch, it seems to be working nicely. Adding a
lisp-level control variable seems more trouble than it=CA=BCs worth, I
think the risk of breaking stuff on all platforms is higher than
that of breaking stuff on Windows.

Are we too late for emacs-28?

Robert
--=20




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#45821; Package emacs. Full text available.

Message received at 45821 <at> debbugs.gnu.org:


Received: (at 45821) by debbugs.gnu.org; 20 Jul 2021 15:41:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 20 11:41:17 2021
Received: from localhost ([127.0.0.1]:35131 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1m5rrw-00019J-Il
	for submit <at> debbugs.gnu.org; Tue, 20 Jul 2021 11:41:16 -0400
Received: from quimby.gnus.org ([95.216.78.240]:58888)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1m5rru-000193-SC
 for 45821 <at> debbugs.gnu.org; Tue, 20 Jul 2021 11:41:15 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID
 :In-Reply-To:Date:References:Subject:To:From:Sender:Reply-To:Cc:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=D61ZEO+hOkPOrp4fDDgWfsonJOFik2NWj/Oxf8MSt6w=; b=d0GQAL1xiv84BsZHZi2FSfXLEi
 00Jpz95yWgoX3mrjyq18O/4TJ19iBoM9lJYVAYJ+xYOLr40L3RGnqGeM+6yxMVumiumJT7HNPoqwm
 vuT2vv0ORF6tXsRbK4FD1X4JQKDmyqLgoqxZyRnv25dosQHSz4ixP58ax6GJzphKQFcE=;
Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=elva)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1m5rrl-0004iN-P2; Tue, 20 Jul 2021 17:41:08 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>,  45821 <at> debbugs.gnu.org
Subject: Re: bug#45821: 28.0.50; Add UDP support for Emacs on Windows
References: <87turmhvub.fsf@HIDDEN> <83lfcyc865.fsf@HIDDEN>
 <87k0shqjq0.fsf@HIDDEN>
X-Now-Playing: Mr. Jones's _Sounds For The Mute_: "Continuous Sounds"
Date: Tue, 20 Jul 2021 17:41:05 +0200
In-Reply-To: <87k0shqjq0.fsf@HIDDEN> (Robert Pluim's message of "Wed, 13
 Jan 2021 10:17:27 +0100")
Message-ID: <87k0llngby.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview: Robert Pluim <rpluim@HIDDEN> writes: >>> This patch from
 Robert Pluim adds that support, but needs somebody that >>> actually uses
 Windows to test it. >>> >>> As it stands you need to arrange for
 WORKING_SELECT_EMULATION to be >>> define [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 45821
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Robert Pluim <rpluim@HIDDEN> writes:

>>> This patch from Robert Pluim adds that support, but needs somebody that
>>> actually uses Windows to test it.
>>>=20
>>> As it stands you need to arrange for WORKING_SELECT_EMULATION to be
>>> defined.
>>
>> Why do we need that #ifdef?  Leaving it there means this is dead code
>> that will never be tested.
>
> It=CA=BCs a WIP testing patch. If we applied it we=CA=BCd remove the ifde=
f (and
> maybe add a lisp-level control var to turn it off)

I tried applying the patch and building on Windows and...  er...
nothing happened?  That is, touching w32.c didn't lead to anything being
compiled.  So I guess I don't understand how this works under Windows.
(A mingw/non-mingw thing?)

I still think it would be very nice if we had UDP support under Windows,
so if somebody else could poke at this, that'd be cool.

--=20
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#45821; Package emacs. Full text available.
Added tag(s) patch. Request was from Lars Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 45821 <at> debbugs.gnu.org:


Received: (at 45821) by debbugs.gnu.org; 13 Jan 2021 09:17:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 13 04:17:47 2021
Received: from localhost ([127.0.0.1]:34256 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kzcHj-0006UO-64
	for submit <at> debbugs.gnu.org; Wed, 13 Jan 2021 04:17:47 -0500
Received: from mail-wr1-f42.google.com ([209.85.221.42]:39634)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rpluim@HIDDEN>) id 1kzcHW-0006Tm-Lp
 for 45821 <at> debbugs.gnu.org; Wed, 13 Jan 2021 04:17:42 -0500
Received: by mail-wr1-f42.google.com with SMTP id c5so1281897wrp.6
 for <45821 <at> debbugs.gnu.org>; Wed, 13 Jan 2021 01:17:34 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:references:mail-copies-to:gmane-reply-to-list
 :date:in-reply-to:message-id:mime-version:content-transfer-encoding;
 bh=1OX8QTKesGXtrW832OoJOkrvCSwlz99qNRpeGSzoXcY=;
 b=W1Jj7R9PTE7d1MJF/VK7ac3c1CL5zbxqEBejJ71jr4D0Cdtq3RPrmMoEN59dy+1oV1
 kn8LrIX77y2sreszqVch/58C/8x7qeXKQjmVPXV6Dyh43uT2zFzfTaq6hGp8SRolT3sJ
 b94w397BoUqEDt5Fnet3SurgKLRvh3DZha59PJqXotgasnHmkYI64otcS4uTI7H/NrBK
 elpGYXLqCn0R24Lad9ZO6L5X+OCwJD0aarcH2FeO9PkCZN9172FxYpPKiZz1HZvFkHKY
 wHPGluuy5PugGVdbSMLjTM82NjK+2QpN56FCtL1sZImW9PbDbPbfSw4uLu/SNiGpVzgR
 38pQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:mail-copies-to
 :gmane-reply-to-list:date:in-reply-to:message-id:mime-version
 :content-transfer-encoding;
 bh=1OX8QTKesGXtrW832OoJOkrvCSwlz99qNRpeGSzoXcY=;
 b=pOy7XHhLY42VL1NGhxPGtmmWPyfYTSDQISBZqJmrq4eh35JCkE2n1CLr1H4JK9MFNV
 8cM64FEVY6YyFacvaIeOthDF96S+fGcgvHJ+2rKsPQGbRZVS6Uafx64+Ikrc65VLxIfn
 htpjiZKLL23GzEo5CF38qor7KQox60YOmuyJBqEprjYiYmvsmC1fW/MjS6+NvqM/0ih9
 z+CgMEfc5hfVukolpOEl4JOsiIN2WqhBitpbouE+5BwiyF9v59h3psv1Ud6kpVj/mGua
 tAN9KQAj3ecCQh+/4OnvLlBVJ6zxMdWOrwYGPO873VYutBR4Gb5w7l+W3KzdUKewAbGm
 lUWg==
X-Gm-Message-State: AOAM532q8NCXLPTvHDIl9bzmMK2eLH4fpxVE9dT9NI9er3safoPAQOzW
 Afx5upK2VHCS0CKyHG1mbGJGe4vEZ6k=
X-Google-Smtp-Source: ABdhPJzzaOkRDfpYLixsmXAQSe+mRUAQ86nP6kGDDFz2UPX1gVvecEVpFUS3KBQvGBiqp1QuALiRMQ==
X-Received: by 2002:adf:f58a:: with SMTP id f10mr1570377wro.338.1610529448817; 
 Wed, 13 Jan 2021 01:17:28 -0800 (PST)
Received: from rltb ([2a01:e34:ecfc:a861:69b6:6aaf:dbd3:8964])
 by smtp.gmail.com with ESMTPSA id r1sm2153848wrl.95.2021.01.13.01.17.27
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Wed, 13 Jan 2021 01:17:28 -0800 (PST)
From: Robert Pluim <rpluim@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#45821: 28.0.50; Add UDP support for Emacs on Windows
References: <87turmhvub.fsf@HIDDEN> <83lfcyc865.fsf@HIDDEN>
X-Debbugs-No-Ack: yes
Mail-Copies-To: never
Gmane-Reply-To-List: yes
Date: Wed, 13 Jan 2021 10:17:27 +0100
In-Reply-To: <83lfcyc865.fsf@HIDDEN> (Eli Zaretskii's message of "Tue, 12 Jan
 2021 20:38:26 +0200")
Message-ID: <87k0shqjq0.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 45821
Cc: Lars Ingebrigtsen <larsi@HIDDEN>, 45821 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Eli Zaretskii <eliz@HIDDEN> writes:

>> From: Lars Ingebrigtsen <larsi@HIDDEN>
>> Date: Tue, 12 Jan 2021 19:08:12 +0100
>>=20
>>=20
>> This patch from Robert Pluim adds that support, but needs somebody that
>> actually uses Windows to test it.
>>=20
>> As it stands you need to arrange for WORKING_SELECT_EMULATION to be
>> defined.
>
> Why do we need that #ifdef?  Leaving it there means this is dead code
> that will never be tested.

It=CA=BCs a WIP testing patch. If we applied it we=CA=BCd remove the ifdef =
(and
maybe add a lisp-level control var to turn it off)

Robert




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#45821; Package emacs. Full text available.

Message received at 45821 <at> debbugs.gnu.org:


Received: (at 45821) by debbugs.gnu.org; 12 Jan 2021 18:38:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jan 12 13:38:21 2021
Received: from localhost ([127.0.0.1]:33102 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kzOYe-0003SD-VA
	for submit <at> debbugs.gnu.org; Tue, 12 Jan 2021 13:38:21 -0500
Received: from eggs.gnu.org ([209.51.188.92]:34434)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1kzOYa-0003Rx-Jw
 for 45821 <at> debbugs.gnu.org; Tue, 12 Jan 2021 13:38:20 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:37618)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1kzOYV-00082c-CQ; Tue, 12 Jan 2021 13:38:11 -0500
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3440
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1kzOYU-00040E-Iq; Tue, 12 Jan 2021 13:38:11 -0500
Date: Tue, 12 Jan 2021 20:38:26 +0200
Message-Id: <83lfcyc865.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
In-Reply-To: <87turmhvub.fsf@HIDDEN> (message from Lars Ingebrigtsen on Tue, 
 12 Jan 2021 19:08:12 +0100)
Subject: Re: bug#45821: 28.0.50; Add UDP support for Emacs on Windows
References: <87turmhvub.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 45821
Cc: 45821 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Lars Ingebrigtsen <larsi@HIDDEN>
> Date: Tue, 12 Jan 2021 19:08:12 +0100
> 
> 
> This patch from Robert Pluim adds that support, but needs somebody that
> actually uses Windows to test it.
> 
> As it stands you need to arrange for WORKING_SELECT_EMULATION to be
> defined.

Why do we need that #ifdef?  Leaving it there means this is dead code
that will never be tested.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#45821; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 12 Jan 2021 18:08:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jan 12 13:08:23 2021
Received: from localhost ([127.0.0.1]:33053 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kzO5f-0002e9-6E
	for submit <at> debbugs.gnu.org; Tue, 12 Jan 2021 13:08:23 -0500
Received: from lists.gnu.org ([209.51.188.17]:54772)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1kzO5d-0002e1-2L
 for submit <at> debbugs.gnu.org; Tue, 12 Jan 2021 13:08:22 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:48974)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <larsi@HIDDEN>) id 1kzO5c-000232-Ts
 for bug-gnu-emacs@HIDDEN; Tue, 12 Jan 2021 13:08:20 -0500
Received: from quimby.gnus.org ([2a01:4f9:2b:f0f::2]:56370)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <larsi@HIDDEN>) id 1kzO5Z-0006SA-Ua
 for bug-gnu-emacs@HIDDEN; Tue, 12 Jan 2021 13:08:20 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:Subject:To:From:
 Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID:Content-Description:
 Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:
 In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=E4mChs0GRyoXyIa4Ko4TGtyt7Uvcze6Z17aKy775xTI=; b=AeQHjOka9+sjze3IcdWExvhGJE
 2OawoBAUjDQIE0uxI3d69lMHzFoAZT/1n7zyIGFU02TitESPOtgJhp8W2IDDVcCPvlWHul4yXUkzO
 ux97x7huMrwaOZnFlAtr/ZqkS1sPNHw2xX/6Nqn9EWClrguvdVP70rE6DSgEvdLsLb6U=;
Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>) id 1kzO5V-0000Ox-PF
 for bug-gnu-emacs@HIDDEN; Tue, 12 Jan 2021 19:08:16 +0100
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 28.0.50; Add UDP support for Emacs on Windows
X-Now-Playing: Kevin Hewick & New Order's _From Brussels With Love (1)_:
 "Haystack"
Date: Tue, 12 Jan 2021 19:08:12 +0100
Message-ID: <87turmhvub.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview:  This patch from Robert Pluim adds that support, but needs
 somebody that actually uses Windows to test it. As it stands you need to
 arrange
 for WORKING_SELECT_EMULATION to be defined. diff --git i/nt/inc/ms-w32.h
 w/nt/inc/ms-w32.h index 1cce2c3062..ea6ba38dea 100644 --- i/nt/inc/ms-w32.h
 +++ w/nt/inc/ms-w32.h @@ -63,10 +63,11 @@ #define _CALLBACK_ __cdecl Look
 in <sys/time.h> for a [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
Received-SPF: pass client-ip=2a01:4f9:2b:f0f::2; envelope-from=larsi@HIDDEN;
 helo=quimby.gnus.org
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)


This patch from Robert Pluim adds that support, but needs somebody that
actually uses Windows to test it.

As it stands you need to arrange for WORKING_SELECT_EMULATION to be
defined.

diff --git i/nt/inc/ms-w32.h w/nt/inc/ms-w32.h
index 1cce2c3062..ea6ba38dea 100644
--- i/nt/inc/ms-w32.h
+++ w/nt/inc/ms-w32.h
@@ -63,10 +63,11 @@ #define _CALLBACK_ __cdecl
    Look in <sys/time.h> for a timeval structure.  */
 #define HAVE_TIMEVAL 1

+#ifndef WORKING_SELECT_EMULATION
 /* Our select emulation does 1-byte read-ahead waiting for received
    packets, so datagrams are broken.  */
 #define BROKEN_DATAGRAM_SOCKETS 1
-
+#endif
 #define MAIL_USE_SYSTEM_LOCK 1

 /* Define to 1 if GCC-style __attribute__ ((__aligned__ (expr))) works. */
diff --git i/src/w32.c w/src/w32.c
index 698e10e234..c0457ff00f 100644
--- i/src/w32.c
+++ w/src/w32.c
@@ -8798,6 +8798,45 @@ _sys_wait_accept (int fd)
   return cp->status;
 }

+#ifdef WORKING_SELECT_EMULATION
+int
+_sys_wait_readable (int fd)
+{
+  HANDLE hEv;
+  child_process * cp;
+  int rc;
+
+  if (fd < 0 || fd >= MAXDESC)
+    return STATUS_READ_ERROR;
+
+  cp = fd_info[fd].cp;
+
+  if (cp == NULL || cp->fd != fd || cp->status != STATUS_READ_READY)
+    return STATUS_READ_ERROR;
+
+  cp->status = STATUS_READ_FAILED;
+
+  hEv = pfn_WSACreateEvent ();
+  rc = pfn_WSAEventSelect (SOCK_HANDLE (fd), hEv, FD_READ);
+  if (rc != SOCKET_ERROR)
+    {
+      do
+        {
+          rc = WaitForSingleObject (hEv, 500);
+          Sleep (5);
+        } while (rc == WAIT_TIMEOUT
+                 && cp->status != STATUS_READ_ERROR
+                 && cp->char_avail);
+      pfn_WSAEventSelect (SOCK_HANDLE (fd), NULL, 0);
+      if (rc == WAIT_OBJECT_0)
+        cp->status = STATUS_READ_SUCCEEDED;
+    }
+  pfn_WSACloseEvent (hEv);
+
+  return cp->status;
+}
+#endif
+
 int
 _sys_wait_connect (int fd)
 {
@@ -8923,10 +8962,16 @@ sys_read (int fd, char * buffer, unsigned int count)
 	      return -1;

 	    case STATUS_READ_SUCCEEDED:
-	      /* consume read-ahead char */
-	      *buffer++ = cp->chr;
-	      count--;
-	      nchars++;
+#ifdef WORKING_SELECT_EMULATION
+              /* select on sockets no longer requires a 1-byte read.  */
+              if (fd_info[fd].flags & FILE_SOCKET == 0)
+#endif
+		{
+		  /* consume read-ahead char */
+		  *buffer++ = cp->chr;
+		  count--;
+		  nchars++;
+		}
 	      cp->status = STATUS_READ_ACKNOWLEDGED;
 	      ResetEvent (cp->char_avail);

diff --git i/src/w32.h w/src/w32.h
index cf1dadf64c..cabe39fb6d 100644
--- i/src/w32.h
+++ w/src/w32.h
@@ -175,6 +175,9 @@ #define FILE_SERIAL             0x0800

 extern int _sys_read_ahead (int fd);
 extern int _sys_wait_accept (int fd);
+#ifdef WORKING_SELECT_EMULATION
+extern int _sys_wait_readable (int fd);
+#endif
 extern int _sys_wait_connect (int fd);

 extern HMODULE w32_delayed_load (Lisp_Object);
diff --git i/src/w32proc.c w/src/w32proc.c
index de33726905..376e49d13d 100644
--- i/src/w32proc.c
+++ w/src/w32proc.c
@@ -1225,7 +1225,12 @@ reader_thread (void *arg)
       else if (cp->fd >= 0 && (fd_info[cp->fd].flags & FILE_LISTEN) != 0)
 	rc = _sys_wait_accept (cp->fd);
       else
-	rc = _sys_read_ahead (cp->fd);
+#ifdef WORKING_SELECT_EMULATION
+        if (fd_info[cp->fd].flags & FILE_SOCKET)
+          rc = _sys_wait_readable (cp->fd);
+        else
+#endif
+          rc = _sys_read_ahead (cp->fd);

       /* Don't bother waiting for the event if we already have been
 	 told to exit by delete_child.  */



In GNU Emacs 28.0.50 (build 20, x86_64-pc-linux-gnu, GTK+ Version 3.24.23, cairo version 1.16.0)
 of 2021-01-12 built on xo
Repository revision: 78ef0a72fa57c05c4be1401b2304c106a02c257d
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12008000
System Description: Debian GNU/Linux bullseye/sid


-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





Acknowledgement sent to Lars Ingebrigtsen <larsi@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#45821; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 11 Oct 2021 12:15:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.