From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 92393 invoked by alias); 9 Jan 2017 22:31:11 -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 92362 invoked by uid 89); 9 Jan 2017 22:31:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_20,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=equipped, jas_config.h, UD:jas_config.h, jasper X-HELO: mailout09.t-online.de Received: from mailout09.t-online.de (HELO mailout09.t-online.de) (194.25.134.84) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 09 Jan 2017 22:31:06 +0000 Received: from fwd26.aul.t-online.de (fwd26.aul.t-online.de [172.20.26.131]) by mailout09.t-online.de (Postfix) with SMTP id D1A224250DE9 for ; Mon, 9 Jan 2017 23:31:03 +0100 (CET) Received: from [192.168.2.28] (bNSGQkZSoh8s31NCiBU1ZvrF8I9fllGjErHQIrF5k7NIdnBsOJc9SXRtFbV48dAZ1e@[91.59.23.240]) by fwd26.t-online.de with (TLSv1.2:ECDHE-RSA-AES256-SHA encrypted) esmtp id 1cQiSw-2RpTFI0; Mon, 9 Jan 2017 23:30:58 +0100 Subject: Re: ushort definition To: cygwin@cygwin.com References: <9d119899-88ca-c530-c1b4-1a5613dc6daa@gmail.com> <20170109165932.GA26337@calimero.vinschen.de> <0446748b-9e3d-a3bc-1c2f-e5e556f735c2@gmail.com> <6c9cefe8-b25a-9f63-c3a4-5eaf5ad0ad0f@t-online.de> <20b0921a-0c66-9429-7c88-41d312041feb@gmail.com> From: =?UTF-8?Q?Hans-Bernhard_Br=c3=b6ker?= Message-ID: <5920d91e-43c4-f57b-3711-e423879c6896@t-online.de> Date: Mon, 09 Jan 2017 22:31:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <20b0921a-0c66-9429-7c88-41d312041feb@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2017-01/txt/msg00064.txt.bz2 Am 09.01.2017 um 20:46 schrieb Marco Atzeri: > On 09/01/2017 19:01, Hans-Bernhard Bröker wrote: >> That expectation would only be justified if you added the option `-dD' >> to your command. >> >> `-C' only preserves comments, but not the #define in the source. >> > > Thanks Hans, > I was missing that. FWIW, in cases like this, at least for 'automake' equipped projects, I would probably just 'make cscope' and then used the '1' query to find all definitions of 'ushort' visible to the source. Letting automake build the database makes sure all the include paths are in. But then again, I'm evidently biased, having been cscope's maintainer for quite a while now ;-) > the "#define ushort unsigned short" is in the > /usr/include/jasper/jas_config.h > > It seems jasper configuration had not defined __MISC_VISIBLE, > while gdal does. Neither is supposed to #define __MISC_VISIBLE itself. cscope finds: $ cscope -dL1 __MISC_VISIBLE /usr/include/sys/features.h __MISC_VISIBLE 276 #define __MISC_VISIBLE 1 /usr/include/sys/features.h __MISC_VISIBLE 278 #define __MISC_VISIBLE 0 So let's look at a bit of context: $ sed -n -e '270,280p' /usr/include/sys/features.h #define __LARGEFILE_VISIBLE 1 #else #define __LARGEFILE_VISIBLE 0 #endif #ifdef _DEFAULT_SOURCE #define __MISC_VISIBLE 1 #else #define __MISC_VISIBLE 0 #endif I.e. if jasper didn't have __MISC_VISIBLE on, it must have overridden the default feature test state of _DEFAULT_SOURCE. The lesson to be had from all this: #defining types is just wrong. Don't do it. typedef exists to be used. -- 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