| 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=fu7IiMiEcYV2KpD7VF/tFyAdk5aNiFrmXgoKNcvda20a+dz/d5yKj | |
| EGE15eSy/6cXBHCMvIzH5M9Q1QmlKCQ+wD1AKAES6DdDrfaznY7y7BjRfzzQbXee | |
| /Z6K0CRiyk62zO2SJsouGCmWip4vpxZP+drHzyfG92RpdcmdU5/toY= | |
| 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=hgfNrBTAvQq+Mc8ia2N6uRB380A=; b=y2nuUrUkVJtRVI6dixw0XhnYWTvQ | |
| Dzt1cYF9A1ouwzYzqTHV0fRZ5z3zUNSCBhcn88hwP9Tc7n/Hkeu6uvMhopE4nU4k | |
| barsb/yZOPdIcCRkYIQ5v+33w3OoB8nTIEeWt9ejjZF57HQvilH3V4B2sCO2+mjP | |
| JUc+U/AkndF0l6s= | |
| 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=Hx-languages-length:2047, H*R:D*cygwin.com |
| X-HELO: | calimero.vinschen.de |
| Date: | Fri, 15 Apr 2016 22:47:32 +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: | <20160415204732.GF24565@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> <20160415204150 DOT GE24565 AT calimero DOT vinschen DOT de> |
| MIME-Version: | 1.0 |
| In-Reply-To: | <20160415204150.GE24565@calimero.vinschen.de> |
| User-Agent: | Mutt/1.5.24 (2015-08-30) |
--3Gf/FFewwPeBMqCJ
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Apr 15 22:41, Corinna Vinschen wrote:
> On Apr 15 12:56, Nicolas Noble wrote:
> > This is an issue
> > when trying to compile a 64 bits binary that uses the win32 api,
> > nothing more.
>=20
> 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.
Btw., the preceeding paragraph is even more true after fixing Mingw-w64's
winsock headers because in this case values like FIONREAD, FIOASYNC,
etc (*) will *collide* when using WinSock and Cygwin headers due to their
different values.
So, again, to be very clear: Never mix Cygwin's POSIX socket functions
and Cygwin's POSIX socket headers with Winsock headers and functions.
In theory only Cygwin should be a consumer of the Winsock headers and
functions in a Cygwin environment.
> 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.
>=20
> 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 :)
>=20
> OTOH, u_long in an LP64 environment *must* have the same size as long,
> thus 8 bytes.
>=20
> 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:
>=20
> #define FIONBIO _IOW('f',126,__ms_u_long)
Corinna
(*) FIONBIO is an exception beacuse its value in the Cygwin headers
is hardcoded to 0x8004667e for historical reasons.
--=20
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
--3Gf/FFewwPeBMqCJ
Content-Type: application/pgp-signature; name="signature.asc"
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAEBCAAGBQJXEVNkAAoJEPU2Bp2uRE+gTmMP/R/3MraRSk315NphY4xZAwyG
k9gmq1pLowXZkMY5ivB3cErRS7JwgRFngzDDC+NK3StJ2lDrn7nekDWCWmzj6RvT
pS9oxYzDu5w1BCtTug5VDyp4CPNn4TWHW4w/2D6mox1Mtu+AQddK5k4tdwVL63dC
aWdTixxpRwD3BBtMdalUC5iSXOS+CENcvgCX2zGiFx++enP2oqc6g5vqDcSEQ+oy
kerzUKgOCBwQA+E4HB41/GPujR2S5uxTFqu9kQp6s0DHstXzGDHpDslX5qFNOybV
x6UHU7QYue1htJ4QTrv+GqC4isGsAVVx/CH3Bz2+I3pCMZCHoHHxjaC9ajCMFClo
Xkk7O68hvW/2fJ2iZ1ObT1+0J61F2NRBqzS2JZVCu6gVs4hYAs3qfIqhQywg2dI0
BoKcEuvIDlLd6y56T+Lbnfkxud8l7NHieEGRX28royoEwVJ+kVjdTM46ezinVHoC
R5Ha5UQzNmpDsljuUkR+j8MnDIEIsZDr69iWB0Vf5jH4J3GUCY2oZ/Tr9ZXVXfz7
8YPyTWJrz54spLTQJAlPA/uBh8bvpkPD9Ursb7OVd0PBgRa0xSl2sQAdTBpfAkj4
TuZ6p5Yz9M1mQAO3hecBMFt7z5z5aXJy/dCShRbeWT0zo/Is4KDrXiP7pFC0fN74
4pOG6hkuCXrwlk1iy+XI
=qbPV
-----END PGP SIGNATURE-----
--3Gf/FFewwPeBMqCJ--
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |