From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 130137 invoked by alias); 1 Oct 2015 22:11:15 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 130128 invoked by uid 89); 1 Oct 2015 22:11:14 -0000 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 Received: from mail-yk0-f171.google.com (HELO mail-yk0-f171.google.com) (209.85.160.171) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Thu, 01 Oct 2015 22:11:13 +0000 Received: by ykdt18 with SMTP id t18so94044009ykd.3 for ; Thu, 01 Oct 2015 15:11:11 -0700 (PDT) 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) Received: by 10.37.42.194 with HTTP; Thu, 1 Oct 2015 15:11:10 -0700 (PDT) In-Reply-To: <1443720905.8588.17.camel@cygwin.com> References: <56095DBC.6090308@gmail.com> <1443720905.8588.17.camel@cygwin.com> Date: Thu, 01 Oct 2015 22:11:00 -0000 Message-ID: Subject: Re: [Cygwin-ports-general] Ncview From: Michael Enright To: cygwin@cygwin.com Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-10/txt/msg00010.txt.bz2 On Thu, Oct 1, 2015 at 10:35 AM, Yaakov Selkowitz 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