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=nh7XpTSgNYDIcLsu g+yDko5hz1w/uZmOKXfCdz/P3VuwnvN9yJ74Pj2LGNFaSVX8I4kv23Lks2vdcKfD nGxHBG1dCwQO1qZZrnzTi6SzXYgg1ZAT/7KVLAobSRoPpo9eiB3r+5oXhpJADwy5 dxKVCPWWHDNFpERU4moIzvmb5eE= 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=kuO74cnaMoxIDzGAPOVM2G UBSjk=; b=ZcFxsiNLpn3YpQwc9fNdlPR4odUVQ20Q28UD3BdSgcVO9Mas3I3y5g 2m2qPfezoPlfzfj+ECbLdKBWz80wCmDKRpgxFnU9So/zlDrgh7rWqf5IcCvm4UtT KF4vQqcuRotZsw0F5rUw7j/c3sfECU0O7Ac3TT3fv4cxuDp7TGn9I= 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=2.1 required=5.0 tests=AWL,BAYES_50,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=begins, 17032016, 17.03.2016, H*r:sk:mailout X-HELO: mailout07.t-online.de Subject: Re: clang copy of limits.h misses NAME_MAX To: cygwin AT cygwin DOT com References: <56EAAD1B DOT 4030107 AT t-online DOT de> <56EAB2A8 DOT 4010400 AT gmail DOT com> From: =?UTF-8?Q?Hans-Bernhard_Br=c3=b6ker?= Message-ID: <56EAB8E7.9030507@t-online.de> Date: Thu, 17 Mar 2016 15:02:15 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:38.0) Gecko/20100101 Thunderbird/38.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Am 17.03.2016 um 14:42 schrieb Ismail Donmez: > On Thu, Mar 17, 2016 at 3:35 PM, Marco Atzeri wrote: >> it seems to prefer gcc headers >> >> # 1 "/usr/bin/../lib/clang/3.7.1/include/limits.h" 1 3 4 >> # 37 "/usr/bin/../lib/clang/3.7.1/include/limits.h" 3 4 >> # 1 "/usr/lib/gcc/x86_64-pc-cygwin/5.3.0/include/limits.h" 1 3 4 >> # 38 "/usr/bin/../lib/clang/3.7.1/include/limits.h" 2 3 4 >> # 17 "/usr/include/sys/dirent.h" 2 3 4 > > I am looking at clang 3.7 headers on Linux so this might be not 100% > same on Cygwin but, clang's limits.h has this on top: > > /* The system's limits.h may, in turn, try to #include_next GCC's limits.h. > Avert this #include_next madness. */ > #if defined __GNUC__ && !defined _GCC_LIMITS_H_ > #define _GCC_LIMITS_H_ > #endif > > which should prevent including gcc's own limits.h but looks like it doesn't. Actually, that would only try to prevent expanding the contents of GCC's limits.h, by pre-setting its multiple-inclusion guard macro. Which means that the #include_next following it now begins to look at GCC's version, bounces off the guard macro, and finishes. The actual system would have been #include_next'ed in turn (line 168 of /usr/lib/gcc/.../limits.h), but that was disabled by the above hack. -- 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