| 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=JUf88SbZKyW7375FMXTq0jsrU7gx04/ExTQTgt8NIWNyN0K5eOHkh | |
| h8rGvIPiYC4nAD0A9bJWs2ms0npPY6eElDhId/cOW4ql4Sc466gQBpsHQzUEopie | |
| +BDCMZZ2hbZEm5rycLChbUyMx3i9lvplbpE//i22EBBZahRI22Ozmc= | |
| 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=v+GvEBSbN8cNW5S/2HRgzgsO0AE=; b=beCB42Nm6Hgu6WpbCSOYdWFxqc1A | |
| WQWVDPxfenAFIR2z+x7AxVi22mNXFWThB9DOqv8QBcxRgvm9r66xhHbA7Ynfdwqk | |
| j1+19SQd+UGxiX0kB3e7JqaWKvZ2cRUYswnPatxF7mlzIRZISe/k33xo+FGZDJGJ | |
| BktWtlUV+HgoV4c= | |
| 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 |
| X-Spam-SWARE-Status: | No, score=-1.8 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.1 |
| Date: | Wed, 24 Apr 2013 19:44:01 +0200 |
| From: | Corinna Vinschen <corinna-cygwin AT cygwin DOT com> |
| To: | cygwin AT cygwin DOT com |
| Subject: | Re: Porting to 64 bit Cygwin (was Re: Difference in 32/64-bit curl.) |
| Message-ID: | <20130424174401.GY26397@calimero.vinschen.de> |
| Reply-To: | cygwin AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| References: | <51766C22 DOT 10702 AT bahnhof DOT se> <51770372 DOT 4070408 AT t-online DOT de> <20130424125930 DOT GQ26397 AT calimero DOT vinschen DOT de> <20130424134749 DOT GR26397 AT calimero DOT vinschen DOT de> <517803D9 DOT 3060504 AT t-online DOT de> |
| MIME-Version: | 1.0 |
| In-Reply-To: | <517803D9.3060504@t-online.de> |
| User-Agent: | Mutt/1.5.21 (2010-09-15) |
On Apr 24 18:10, Christian Franke wrote:
> Corinna Vinschen wrote:
> >For clearness I decided to add a quick lecture. Hope that's ok.
>
> Makes much sense. I would suggest two additions:
>
> >...
> >- DON'T mix up int and long in printf/scanf. This:
> >
> > int i; long l;
> > printf ("%d %ld\n", l, i);
> >
> > may not print what you think it should.
>
> - DON'T forget to enable -Wformat gcc warnings, try also -Wformat=2.
>
> (-Wformat is included in -Wall, -Wformat=2 is neither included in
> -Wall nor in -W[extra]).
Thanks, I added something along these lines to the new FAQ entry. See
http://cygwin.com/faq-nochunks.html#faq.programming.64bitporting
> >- DON'T use C base types together with Win32 functions. Keep in mind
> > that DWORD, LONG, ULONG are *not* the same as long and unsigned long.
> > Try to use only Win32 datatypes in conjunction with Win32 API function
> > calls to avoid type problems.
>
> - DON'T forget to add casts if such Win32 API types are used with
> printf(). This:
>
> printf("Win32 Error=%lu\n", GetLastError());
>
> worked for all i686 and Windows x86_64, but fails now on Cygwin x86_64.
I skipped that because the FAQ entry is not exactly what I wrote in my
mail. Do you still think this is necessary?
Thanks,
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
--
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
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |