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:mime-version:in-reply-to:references:date
	:message-id:subject:from:to:content-type; q=dns; s=default; b=yf
	rzzNEJTmpIk6kikJFuabCz4Yap/Q2zqntLitk8fT70lD/vovmEfjOBzpjQtVN+Ht
	U1IcRa5PZH7iD1qys0K27cRFEqavvry/3zbuGqCtRo37xf+V8i8m0liogSKiSZmM
	YxpIU+SouXRT841SmTOqZUXmbAgFY8B7a/m68ASlo=
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:mime-version:in-reply-to:references:date
	:message-id:subject:from:to:content-type; s=default; bh=Q6iN1Da8
	fGfuRyIXqZUlRsdRIWU=; b=jLG8ZBxYpecq7Q/tqoGnv2F7zAhmehP3kLWSgftX
	AX0e4nZkoifCPID7XLKU9PiaOzrTZsSYI4xHziAavCE6UYsNgTJ5HXjj1mWQifp6
	2iJh3WCYvAguO6foMHeLXTG5+ppDnUerzbgF3sA2xZgX3/NGlx6KBkYmkubTviQp
	1Zc=
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
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2
X-HELO: mail-yk0-f171.google.com
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;        d=1e100.net; s=20130820;        h=x-gm-message-state:mime-version:in-reply-to:references:date         :message-id:subject:from:to:content-type;        bh=XePFf3xpIwstumkmuBccCTwGVLqP+3PVgfQBCBNj9W4=;        b=RaZiT7tNdRqfN2yLj2k4eFBs0F7fRxro0AnQnJlI7IiPGJirPNkRxjAW0dHh7B9B+n         Eb8LQMcTWMpAKklUendRKw1tJeedIhU7ABdWB1NdDjq20BuTe5zaDP+DeP6/ZmnLv/gt         ZUN2SnekOOvzbcNpxDXQx/NN+d4ZjHphMx0p56IZAvVzeFIm3jWQWJNOgdCm3JGI/5iF         G+MjjcdYf1KRUHbVLK/uHE2Zoz8ORv/e94hN8LTw12eIM4xoM6SLzDNNV2E85SpbGNOu         JTJrrsDPhOd1V+SCgZjcu1OXF7lmmxTSlyLsW4pxnRs07+SgAddaR5PdV+TzTfcNQMxq         zEAg==
X-Gm-Message-State: ALoCoQnBX9xocDliBLaXoz3OTEp1uO0cuGMVraLS5pAJQC3BWH4BJqp9+xF2/BG3rsokwR//wC/l
MIME-Version: 1.0
X-Received: by 10.129.83.87 with SMTP id h84mr10736846ywb.156.1443737470897; Thu, 01 Oct 2015 15:11:10 -0700 (PDT)
In-Reply-To: <1443720905.8588.17.camel@cygwin.com>
References: <CAKmU=T_XtcOf1MOa_31oTfNYzUZ6QZD1xU9eTG-ERkvsua+gZQ@mail.gmail.com>	<56095DBC.6090308@gmail.com>	<1443720905.8588.17.camel@cygwin.com>
Date: Thu, 1 Oct 2015 15:11:10 -0700
Message-ID: <CAOC2fq_vWAMCYjmaW1VH5bkAhrUB810X3Dqnjf9nX0Y5_vwoew@mail.gmail.com>
Subject: Re: [Cygwin-ports-general] Ncview
From: Michael Enright <mike@kmcardiff.com>
To: cygwin@cygwin.com
Content-Type: text/plain; charset=UTF-8
X-IsSubscribed: yes

On Thu, Oct 1, 2015 at 10:35 AM, Yaakov Selkowitz <yselkowitz@cygwin.com> wrote:
>
> Confirmed.  Often 64-bit-only issues come down to one or more of the
> following:
>
> * implicit function declarations.  Per the C standard, argument types
> are assumed to match whatever is given (which may be wrong if e.g. 0 is
> used instead of 0L or (PointerType)0 or NULL etc.) and the return type
> is assumed to be int (which will truncate the actual return value when
> it is actually a long/pointer).
>
> * vararg types.  Because these types aren't declared, the compiler can't
> automatically cast values to the correct type, so literal values and
> symbolic constants must be explicitly cast if they are not meant to be
> an int and are not obviously a long/pointer.
>

Good list. I would also add attempting to store pointer differences in
an "int" instead of ptrdiff_t and the issue you can see from
https://en.wikipedia.org/wiki/64-bit_computing#64-bit_data_models,
which is that the integer types other than long long on 64-bit Windows
are 32-bits while on 64-bit Linux 'long' and 'long long' are both
64-bit. This issue means that 'long' is a good-enough hack for
ptrdiff_t on 64-bit Linux but not 64-bit Windows. Does Cygwin differ
from Windows itself on this issue? Most 32-bit-designed code is
probably more sensitive to the pointer-difference aspect of this.

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

