X-Recipient: archive-cygwin@delorie.com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 45CB9384C6B7
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
	s=default; t=1688753927;
	bh=HCigIH8dnsQPteOTiw/WW1YsIA5bcExBQPr7ZGkyYoc=;
	h=Date:To:Cc:Subject:References:In-Reply-To:List-Id:
	 List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe:
	 From:Reply-To:From;
	b=BWfhEiev6tndIhFN7Dxp6MRzyvgpuZCxhBwt1CnnHoVV9gTwskscPZFMmCh+QVqlT
	 KALbh37K5f09LL1pi/r1exY1A7e3MoqRNqc5ykFVsA+LvogPlQ/0gDeaubfxPfmPn7
	 rPCPDuAY5gkU9bAvIg/5Rp/29oHnvaRrcjCUEvHc=
X-Original-To: cygwin@cygwin.com
Delivered-To: cygwin@cygwin.com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AD4BE3858C74
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on
 server2.sourceware.org
X-Spam-Language: en
X-Spam-Relay-Country: 
X-Spam-DCC: B=MGTINTERNET; R=smtp1.atof.net 1170; Body=1 Fuz1=1 Fuz2=1
X-Spam-RBL: 
X-Spam-PYZOR: Reported 0 times.
Date: Fri, 7 Jul 2023 14:18:04 -0400
To: Jon Turney <jon.turney@dronecode.org.uk>
Cc: cygwin@cygwin.com
Subject: Re: iostream doesn't work (clang++)
Message-ID: <ZKhW3CGufLjXpd5F@xps13>
References: <7e07e251-2ec6-b7a5-62da-8578eb638993@gmail.com>
 <47f9e50d-763b-e6a9-b2b0-8d3cc311a63b@maxrnd.com>
 <3c02f650-248e-9e03-94a8-d508c857474e@gmail.com>
 <dbce604a-f7ac-e30f-19db-609a71d2757e@Shaw.ca>
 <c561da52-d1cf-2d45-fdd1-5a11cdfe9ae0@dronecode.org.uk>
Mime-Version: 1.0
Content-Disposition: inline
In-Reply-To: <c561da52-d1cf-2d45-fdd1-5a11cdfe9ae0@dronecode.org.uk>
X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS,
 SPF_HELO_NONE, SPF_PASS, TXREP,
 T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6
X-BeenThere: cygwin@cygwin.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-request@cygwin.com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=subscribe>
From: "gs-cygwin.com--- via Cygwin" <cygwin@cygwin.com>
Reply-To: gs-cygwin.com@gluelogic.com
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cygwin-bounces+archive-cygwin=delorie.com@cygwin.com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie.com@cygwin.com>

On Fri, Jul 07, 2023 at 04:48:08PM +0100, Jon Turney via Cygwin wrote:
> On 06/07/2023 00:08, Brian Inglis via Cygwin wrote:
> > 
> > I have no idea why both compilers would include w32api headers as if
> > they were building Mingw cross compilers!
> 
> You are allowed to use the Win32 API in Cygwin programs (with some caveats).

Interesting.

Is there some collected wisdom somewhere to which you could point me?
(specifically the caveats)

My code runs under cygwin and I more recently ported it to native
Windows.  Windows is not POSIX, but does provide a hodge-podge of
functions named the same as POSIX function, sometimes with slightly
different behavior and sometimes with slightly different function
signatures (!).

For performance under cygwin, it is desirable to use Windows-native API
when the cygwin layer is a simple translation compatibility layer from
POSIX to Windows API.  However, Windows is not simple, and seemingly
never invested in creating a stable and functional set of POSIX-like
interfaces, and is one of the reasons cygwin is so useful to bridge that
gapping chasm.

Cheers, Glenn

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