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:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=xibgpxc/AHAr3/Ox K19qEh0hUDePvxV1eXIPVtFNwkKjdOvAdFztTCbXu2AAotO1d1LiuNWv+jHZzfUo r4OM9OZtScuP5xNtVAQ2DRA148Nowbbf0V43Fw7YfCGjxkTgI35GDwA8Oc9C6V2B B6WZGOZvPHxDXEHEhEsxAzRXCU8= 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:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=pC1tKClARpyd751aE7qKpK D8uB0=; b=cg4PELlj9cDv5sVIqIBT71UZp/wcamEs41yv7adoJmUrkNbNYmx6k5 SQz/mG7fmEKhefshSCHj362RbhRpEqTqm25hMRXYbVLiPmmXJif95A8dzEchwsFe 2Wcm71GUFdDseNOcX9WR83yXHnDoZdFXW0TppMo+2q/AsNG5jTJQk= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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 Subject: Re: ushort definition To: cygwin AT cygwin DOT com References: <9d119899-88ca-c530-c1b4-1a5613dc6daa AT gmail DOT com> <20170109165932 DOT GA26337 AT calimero DOT vinschen DOT de> <0446748b-9e3d-a3bc-1c2f-e5e556f735c2 AT gmail DOT com> <6c9cefe8-b25a-9f63-c3a4-5eaf5ad0ad0f AT t-online DOT de> <20b0921a-0c66-9429-7c88-41d312041feb AT gmail DOT com> From: =?UTF-8?Q?Hans-Bernhard_Br=c3=b6ker?= Message-ID: <5920d91e-43c4-f57b-3711-e423879c6896@t-online.de> Date: Mon, 9 Jan 2017 23:30:43 +0100 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 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