From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp1.atof.net (smtp1.atof.net [52.86.233.228]) by sourceware.org (Postfix) with ESMTPS id AD4BE3858C74 for ; Fri, 7 Jul 2023 18:18:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AD4BE3858C74 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=gluelogic.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gluelogic.com 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 From: gs-cygwin.com@gluelogic.com To: Jon Turney Cc: cygwin@cygwin.com Subject: Re: iostream doesn't work (clang++) Message-ID: References: <7e07e251-2ec6-b7a5-62da-8578eb638993@gmail.com> <47f9e50d-763b-e6a9-b2b0-8d3cc311a63b@maxrnd.com> <3c02f650-248e-9e03-94a8-d508c857474e@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline In-Reply-To: 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 List-Id: 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