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:message-id:date:from:mime-version:to:subject
	:references:in-reply-to:content-type:content-transfer-encoding;
	 q=dns; s=default; b=ycdilKem9ZYCjupOoIBoYxAbKBPNp/0RXBH88G60sfL
	TEw3QFbTn1YvVskE3uWmYzAzNngUMUAnxExK/wJwnY7HEBijI1eL3ti2bvVfT2oR
	RcCkqcKnijGnnPbzmhMRYDYG7qSmpI28a1SPcWnvTTbZKKaUe6AXGBo9epIm6xxU
	=
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:message-id:date:from:mime-version:to:subject
	:references:in-reply-to:content-type:content-transfer-encoding;
	 s=default; bh=hHJHu3qkE3ZC5FoHtzef7PzDKHA=; b=ct9KeUE3+AtUftogP
	i08m+z+Vyu71vB73IBw1FE0Jqr3lY8lOUvITOMZRCwfHFGPVLx2Cu+Tb2j61fzOA
	r1SqOS6yS8CJasmGO4/0vvtBljiU6xW69tE7Uox0Lsjt7XMeTGJH94PPcOEmuyGy
	ONUdq0igyRMN5iUCK+OwkAMkkA=
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
X-Spam-SWARE-Status: No, score=-3.7 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_NO,RP_MATCHES_RCVD autolearn=ham version=3.3.1
Message-ID: <5178266D.20209@xs4all.nl>
Date: Wed, 24 Apr 2013 20:37:33 +0200
From: Erwin Waterlander <waterlan@xs4all.nl>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130328 Thunderbird/17.0.5
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: Porting to 64 bit Cygwin (was Re: Difference in 32/64-bit curl.)
References: <51766C22.10702@bahnhof.se> <51770372.4070408@t-online.de> <20130424125930.GQ26397@calimero.vinschen.de> <20130424134749.GR26397@calimero.vinschen.de> <517823A4.8060001@xs4all.nl> <20130424183042.GC26397@calimero.vinschen.de>
In-Reply-To: <20130424183042.GC26397@calimero.vinschen.de>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Op 24-4-2013 20:30, Corinna Vinschen schreef:
> On Apr 24 20:25, Erwin Waterlander wrote:
>> Op 24-4-2013 15:47, Corinna Vinschen schreef:
>>> On Apr 24 14:59, Corinna Vinschen wrote:
>>>> On Apr 23 23:56, Christian Franke wrote:
>>>>> Possibly a __builtin_va_list related gcc bug.
>>>> This is rather unlikely.  That code is shared between Cygwin and
>>>> Mingw, and chances are that the bug would have been found already.
>>>>
>>>> What about a type issue?  int vs. long?
>>> For clearness I decided to add a quick lecture.  Hope that's ok.
>>>
>>> The Cygwin x86_64 toolchain is using the LP64(*) data model.  That means,
>>> in contrast to Windows, which uses an LLP64(*) data model, sizeof(long)
>>> != sizeof(int), just as on Linux.
>>>
>>> For comparison:
>>>
>>>                   Cygwin   Windows  Cygwin
>>> 		 Linux    x86_64   Linux
>>> 		 Windows           x86_64
>>> 		 i686
>>>
>>> sizeof(int)         4        4        4
>>> sizeof(long)        4        4        8
>>> sizeof(size_t)      4        8        8
>>> sizeof(void*)       4        8        8
>> And these. Interesting for people handling Unicode (wide) text:
>>
>> sizeof(wchar_t)       2        2        2
>> sizeof(wint_t)          2        2        4
> No, that's not correct:
>
>    sizeof(wint_t)          4        4        4
>
> This is very important because of WEOF.
>
>

We are both incorrect. I tried and got these results.

sizeof(wint_t) will give:

Cygwin i686:     4
MinGW32 :        2
MinGW-w64:    2
Cygwin x86_64:   4

-- 
Erwin Waterlander
http://waterlan.home.xs4all.nl/


--
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

