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:subject:to:references:from:message-id:date
	:mime-version:in-reply-to:content-type
	:content-transfer-encoding; q=dns; s=default; b=B8HD+wfuzkudBkJe
	SUdk6RxgKOm/Tk2bv0j1Q+w2fdfAgS3RVzmaWxZWAOHY+PrEfVIvYBhyhHbVcMpm
	7iHMuBVv+LvZsUyZyjmL5RHtAJOzKOKQLFwcQT5EMEOe9bbK4zK1fP7IZjTAy52v
	k1o/puiaj90jB9yJAYTiiwCNJyg=
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=BzNnvaUeycLzuwXj23d0V5
	zLejA=; b=vGK6lB8D0TlCDjeXmiayJpYjZEC+MiD02dvRdQ3RGvPYkusVzrp2cs
	5saal+78CYGaExUfpCzhRAUhJBPEKtePmFRVSb4M04ejcxHUgS9C/y6p2A3lD5Mq
	t8ZfaaOQpTPLJ5idosVoa4dkxnJc9xrhPNyCcKti2y8HxMyIMME58=
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=2.0 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=17032016, 17.03.2016, H*r:sk:mailout, hack
X-HELO: mailout05.t-online.de
Subject: Re: clang copy of limits.h misses NAME_MAX
To: cygwin@cygwin.com
References: <56EAAD1B.4030107@t-online.de> <CAFo71_5=CPzstQq8Vd3sDa6yGVDArp9oE2p1eeu-hqQbt95+nA@mail.gmail.com> <56EAB2A8.4010400@gmail.com> <CAFo71_4e7+aUBduQHYYrrh-FipwJBq7eHkuK57OLDzP9Em1WRA@mail.gmail.com> <56EAB8E7.9030507@t-online.de>
From: =?UTF-8?Q?Hans-Bernhard_Br=c3=b6ker?= <HBBroeker@t-online.de>
Message-ID: <56EB427B.70201@t-online.de>
Date: Fri, 18 Mar 2016 00:49: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: <56EAB8E7.9030507@t-online.de>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
X-IsSubscribed: yes

Am 17.03.2016 um 15:02 schrieb Hans-Bernhard Bröker:
> Am 17.03.2016 um 14:42 schrieb Ismail Donmez:

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

Forgot to say this earlier: the cygwin version is the same in this respect.

> The actual system <limits.h> would have been
> #include_next'ed in turn (line 168 of /usr/lib/gcc/.../limits.h), but
> that was disabled by the above hack.

FWIW, I commented out that hack in my local copy, and it works again. 
See the relevant part of preprocessor output (manually indented for 
clarity):

  #  1 "/usr/bin/../lib/clang/3.7.1/include/limits.h" 1 3 4
  # 39 "/usr/bin/../lib/clang/3.7.1/include/limits.h" 3 4
   #  1 "/usr/lib/gcc/i686-pc-cygwin/5.3.0/include/limits.h" 1 3 4
   # 34 "/usr/lib/gcc/i686-pc-cygwin/5.3.0/include/limits.h" 3 4
    # 1 "/usr/lib/gcc/i686-pc-cygwin/5.3.0/include/syslimits.h" 1 3 4

     #  1 "/usr/include/limits.h" 1 3 4
     # 14 "/usr/include/limits.h" 3 4
      # 1 "/usr/include/features.h" 1 3 4
     # 15 "/usr/include/limits.h" 2 3 4
    #  8 "/usr/lib/gcc/i686-pc-cygwin/5.3.0/include/syslimits.h" 2 3 4
   # 35 "/usr/lib/gcc/i686-pc-cygwin/5.3.0/include/limits.h" 2 3 4
  # 40 "/usr/bin/../lib/clang/3.7.1/include/limits.h" 2 3 4
# 17 "/usr/include/sys/dirent.h" 2 3 4

So that #define _GCC_LIMITS_H_ effectively broke a working GCC limits.h, 
causing all the things it defines to be missing.  That would be fine if 
clang's own version contained replacements for _all_ the system header's 
contents.  But it doesn't.

To me this looks like whatever the actual problem might have been, that 
hack in clang's limits.h was the wrong answer to it.

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

