delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT 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:date:from:to:subject:message-id:reply-to | |
:references:mime-version:content-type:in-reply-to; q=dns; s= | |
default; b=m/kDC3zrJvLHR3drIgqgt3gviubGhyn53Eh7/RGvshNfARidwtGyy | |
TM5fXBs+/pKRh6gLH74j/osD22PBd/k+Unfl9qeZdMRFhspzZDbsB9XfX0RKJgyR | |
1zC8/DLAp/wsE4yaJN5xycgZgMHn1dKX/Yni1pmNylw20ygRBy4rKY= | |
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:date:from:to:subject:message-id:reply-to | |
:references:mime-version:content-type:in-reply-to; s=default; | |
bh=IJPHQqf3ITAi8k/KHB3fnorBjCE=; b=pqA3bYrAyZo6D6bI0olk/xFGz5lE | |
qpKyLBOEZKqq6LuuCdU5bgUKdZCmUzB+aQVuxSzcSpMmKQ8FH/2TGxDcDe41P3Jf | |
sOFSESsWsO2KHPd75N4zTq5K8jml9huhetOqA2B5XDZnxNzGczl8wyutGNIDJFCj | |
azHq3V0/gaXPZoQ= | |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Authentication-Results: | sourceware.org; auth=none |
X-Virus-Found: | No |
X-Spam-SWARE-Status: | No, score=-96.6 required=5.0 tests=BAYES_00,GOOD_FROM_CORINNA_CYGWIN,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_PBL,RDNS_DYNAMIC autolearn=ham version=3.3.2 spammy=incidentally, H*i:sk:Fv0UH74, H*i:sk:uhSv8EP, H*MI:sk:Fv0UH74 |
X-HELO: | calimero.vinschen.de |
Date: | Fri, 15 Apr 2016 22:41:50 +0200 |
From: | Corinna Vinschen <corinna-cygwin AT cygwin DOT com> |
To: | cygwin AT cygwin DOT com |
Subject: | Re: Cygwin 64bits gcc produces erroneous constants with the win32 headers. |
Message-ID: | <20160415204150.GE24565@calimero.vinschen.de> |
Reply-To: | cygwin AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
References: | <CAAkR8+sqWOntu_zZ3K_CvkVA5mjnJEM1N=GN1SzK-oFvJ3BxsA AT mail DOT gmail DOT com> <20160415192350 DOT GD24565 AT calimero DOT vinschen DOT de> <CAAkR8+uhSv8EPFJyYgt48H05O+uFqfTaVG+Fv0UH74OYinYWkQ AT mail DOT gmail DOT com> |
MIME-Version: | 1.0 |
In-Reply-To: | <CAAkR8+uhSv8EPFJyYgt48H05O+uFqfTaVG+Fv0UH74OYinYWkQ@mail.gmail.com> |
User-Agent: | Mutt/1.5.24 (2015-08-30) |
--4jXrM3lyYWu4nBt5 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Apr 15 12:56, Nicolas Noble wrote: > On Fri, Apr 15, 2016 at 12:23 PM, Corinna Vinschen > <corinna-cygwin AT cygwin DOT com> wrote: > > On Apr 15 12:05, Nicolas Noble wrote: > >> I originally entered a bug on msys2's bug tracker, but it turns out > >> they only repackage cygwin packages, and I have verified this is an > >> issue on cygwin too, so I am now sending that report here. > >> > >> Original entry: > >> > >> https://github.com/Alexpux/MSYS2-packages/issues/555 > >> > >> > >> > >> Basically, the 64 bits "gcc-core" and "w32api-headers" cygwin packages > >> aren't really compatible with each others. > > > > They are not supposed to. You have to make sure to separate the > > win32 and Cygwin headers carefully. >=20 > I'm not sure I am getting that reply. The gcc-core package is only a > compiler, and I am talking about the "gcc" binary contained within. > The example I am showing is technically using only the w32api-headers, > trying to use the win32 api as described here: > https://cygwin.com/faq-nochunks.html#faq.programming.win32-api >=20 > > > >> As far as I understand, > >> this isn't an issue already documented here: > >> https://cygwin.com/faq-nochunks.html#faq.programming.win32-api > > > > It's documented in https://cygwin.com/faq.html#faq.programming.64bitpor= ting >=20 > Right, but that isn't the same thing. I am well aware of the various > issues tied with sizeof(long), Sorry, I wasn't aware of this since you wrote something along the lines of gcc should make sizeof(long) =3D=3D 4 which just doesn't make sense in an LP64 environment. > otherwise it would have taken me a lot > more time to understand what was going on here. I am talking about the > fact that the cygwin-provided w32api-headers package doesn't properly > work with the cygwin-provided 64 bits gcc. Unless I am mistaken > somewhere, this isn't an issue with the example code. This is an issue > when trying to compile a 64 bits binary that uses the win32 api, > nothing more. One problem is that you're not supposed to use WinSock or the winsock headers when compiling Cygwin applications. Use the Cygwin POSIX headers and Cygwin socket functions instead. If you use WinSock headers and/or functions and it breaks, you got to keep the pieces. The problem with the WInSock definition of FIONBIO (and probably others) is a bug in the w32api-headers and thus might be most effectifely handled upstream in the Mingw-w64 community. You're basically right about the redefinition of FIONBIO, but u_long is the type used by Microsoft and thus the Mingw-w64 project would probably like to keep it that way for compatibility with their upstream :) OTOH, u_long in an LP64 environment *must* have the same size as long, thus 8 bytes. However, Mingw-w64 already contains a lot of changes to accommodate the Cygwin LP64 environment, and incidentally there's already a type available which does the right thing, so it might be a good idea to suggest using that: #define FIONBIO _IOW('f',126,__ms_u_long) Corinna --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --4jXrM3lyYWu4nBt5 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJXEVIOAAoJEPU2Bp2uRE+g2icP/AkJ6leOyq6aMhTc/rwlUCAt lwzp1G5qeskFLAUdA8Y876UulfgGajrD0LCnIY4xYUCNOAi1hITZvGnrfU0zaCKR PA9kOFhBI6/ZYUb5KbamRNAVF/Vx+zx9Qk1ovsNg9BKRKkiqJPOJAdAYys1TNIf/ yRwhrolcWzZlmctHMPuOZgdPEykkxQFxm2NtCj8Xb1/xecQeZyFu8e6BH3tMqF96 e7z71oqH5iC8ToEoxw4hXHraxU9xBKemxMELFvRt7dokWlm80n5xoPNowU2pRyy6 793TgoGC9C8Cygc2CdcRBBBklAhz2mJvCQdV7WkfDXHio3OGR2mX9JwIeZywtWbk d//4scyVuXQeQXmMHGEXcA3dLN19/twpdkR77cLQjI3p81zzZwMS4fq4UpylFDNG fW0hLeBOC6gYSDBV+IenBY9ZB4Em/KLgO1apsMfpChDj3Uo1oI+UL7PHQ7W5Mrue 7Nm1crqO4uYo2yMzlpN//LGbHEreUtBh6Pjr/6jsVw9hKPGIs0i3ugl73L9+FlVb a1y/PhQxzR+f3UEPT55tsdr50PhSqKgQQkBbgViugDTUUK0DKHNTrGoyGIwtCHpW utcAFQ/CK9gjN4iTeRrzCOpvqaDNleAGLLekOEMC0mu7dc/l+jFv9wT/LPm2q4uC U7qOV/gT8pe5gN6vlt7u =5FEv -----END PGP SIGNATURE----- --4jXrM3lyYWu4nBt5--
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |