X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:from:subject:reply-to:to:references:message-id
	:date:mime-version:in-reply-to:content-type
	:content-transfer-encoding; q=dns; s=default; b=v1JMY9pcnquAxLW7
	BYz04cQQeaLViwuuliUCx1xEiu7mNsggFK9iyWvQjMTro80yfktrb7IoCtWq4QEs
	tcKbWfb+1pnkBIMSRlXdsXG/Vl/YyPDkoqIlGu933v2yCwuRmrqSMFyixytI8beY
	N63tbHv2MdWlexzqJKbBo2GLEMk=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:from:subject:reply-to:to:references:message-id
	:date:mime-version:in-reply-to:content-type
	:content-transfer-encoding; s=default; bh=ZBbki1XAdfmaf1Cf41NIad
	o4MZ8=; b=Qvy3R3tIxzXCl/8+CQ/OJFOFRHUZoxA5EiuVoJUF87vLnNmkwntB8O
	zum90W3I/yvZnJPcTdaYUm8leum1N1M4csunT2R+PAOuk6tg4KBobOLpglKgV9eM
	7/z3fuDk3zEl2y3SqtV/4PPDdzC6jx2Dk7i0bTvfYLVSscgMILlU0=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=xilinx, Who, Xilinx
X-HELO: smtp-out-no.shaw.ca
From: Brian Inglis <Brian.Inglis@SystematicSw.ab.ca>
Subject: Re: TCP_CORK (aka TCP_NOPUSH) does not work
Reply-To: Brian.Inglis@SystematicSw.ab.ca
To: cygwin@cygwin.com
References: <BL0PR0901MB43082AA9A6D57C92F4D314E6A5DF0@BL0PR0901MB4308.namprd09.prod.outlook.com>
Openpgp: preference=signencrypt
Message-ID: <e4a7d5aa-d774-3b60-5c1c-9265a1e98554@SystematicSw.ab.ca>
Date: Wed, 31 Jul 2019 13:32:22 -0600
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0
MIME-Version: 1.0
In-Reply-To: <BL0PR0901MB43082AA9A6D57C92F4D314E6A5DF0@BL0PR0901MB4308.namprd09.prod.outlook.com>
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes

On 2019-07-30 22:48, Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin wrote:
>> Regular SO options on Windows:
> 
> I did not ask about Windows options.  I asked about a feature that is
> defined in Cygwin yet appears not functional.

You are running Windows sockets under Cygwin emulation.
Linux and BSD options are not available, whatever the .h #defines.

>> You can abuse Nagle to get similar behaviour cross-platform:
> This is not the same thing!

This is your only option.

>> ENOPROTOOPT (109)... "The option is not supported by the protocol."
> 
> Indeed the textual description does not match, and should be changed in Cygwin.  Although, I'm sure it was copied over from Linux, which does not define it properly (probably, historically), either:
> 
> #define ENOPROTOOPT     92      /* Protocol not available */
> 
> BTW, Windows does that correctly:
> 
> WSAENOPROTOOPT (10042) = "Bad protocol option"

>> If a socket option is defined, perhaps for compatibility, it should either be
>> used or ignored, rather than giving an error.
>> If you are not going to support a socket option, and generate an error, it would
>> be better to not define the option and generate the error at compile time,
>> instead of failing at run time.
> Who are you suggesting this to?

Anyone who wants to volunteer to remove non-functional socket options: that's
how Cygwin works.
Input from folks who use and maintain this stuff would be good, before any of us
jump in and delete stuff.
Many header and library files are shared with newlib, which is used by Cygwin,
RTEMS, other embedded non-Linux OSes, many common boards using ARM, Renesas, and
Xilinx chips, most commercial and non-commercial GCC ports and distributions for
non-Linux embedded systems, so conditionalization is often required, unless
newlib provides its own separate version(s) of a header or library file.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

