From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5628 invoked by alias); 20 Feb 2012 22:58:29 -0000 Received: (qmail 5609 invoked by uid 22791); 20 Feb 2012 22:58:27 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from moutng.kundenserver.de (HELO moutng.kundenserver.de) (212.227.17.8) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 20 Feb 2012 22:58:09 +0000 Received: from [127.0.0.1] (dslb-088-073-004-085.pools.arcor-ip.net [88.73.4.85]) by mrelayeu.kundenserver.de (node=mrbap4) with ESMTP (Nemesis) id 0MKIQ2-1S09sX2bAM-001qhG; Mon, 20 Feb 2012 23:58:08 +0100 Message-ID: <4F42CFFD.2040403@towo.net> Date: Mon, 20 Feb 2012 22:58:00 -0000 From: Thomas Wolff User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: cygwin@cygwin.com Subject: Re: Issues with stdio.h References: <20120220002507.GA16123@ednor.casa.cgf.cx> <4F42BDAE.50006@towo.net> <4F42C4D0.8050108@redhat.com> In-Reply-To: <4F42C4D0.8050108@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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 X-SW-Source: 2012-02/txt/msg00594.txt.bz2 Am 20.02.2012 23:10, schrieb Eric Blake: > On 02/20/2012 02:39 PM, Thomas Wolff wrote: >> Am 20.02.2012 01:25, schrieb Christopher Faylor: >>> On Sun, Feb 19, 2012 at 07:07:04PM -0500, Chris Sutcliffe wrote: >>>> ... >>>> /usr/include/stdio.h:34:20: fatal error: stddef.h: No such file or >>>> directory >>> stddef.h comes from the gcc4-core package. It's located in: >>> >>> usr/lib/gcc/i686-pc-cygwin/4.5.3/include/stddef.h >>> >>> and should be found automatically by the compiler. >> I think it's a weird setup that an include file referred from >> /usr/include is not found in that location but well hidden in >> installation-specific directories. Not the usual setup anyway. > Wrong. GNU/Linux does this too. On my Fedora machine, > > $ printf '#include\n#include\n' | gcc -E -\ > |grep '^# 1 "/' > # 1 "/usr/lib/gcc/x86_64-redhat-linux/4.6.2/include/stddef.h" 1 3 4 > # 1 "/usr/include/stdio.h" 1 3 4 > # 1 "/usr/include/features.h" 1 3 4 > # 1 "/usr/include/sys/cdefs.h" 1 3 4 > # 1 "/usr/include/bits/wordsize.h" 1 3 4 > # 1 "/usr/include/gnu/stubs.h" 1 3 4 > # 1 "/usr/include/bits/wordsize.h" 1 3 4 > # 1 "/usr/include/gnu/stubs-64.h" 1 3 4 > # 1 "/usr/lib/gcc/x86_64-redhat-linux/4.6.2/include/stddef.h" 1 3 4 > # 1 "/usr/include/bits/types.h" 1 3 4 > # 1 "/usr/include/bits/wordsize.h" 1 3 4 > # 1 "/usr/include/bits/typesizes.h" 1 3 4 > # 1 "/usr/include/libio.h" 1 3 4 > # 1 "/usr/include/_G_config.h" 1 3 4 > # 1 "/usr/lib/gcc/x86_64-redhat-linux/4.6.2/include/stddef.h" 1 3 4 > # 1 "/usr/include/wchar.h" 1 3 4 > # 1 "/usr/lib/gcc/x86_64-redhat-linux/4.6.2/include/stdarg.h" 1 3 4 > # 1 "/usr/include/bits/stdio_lim.h" 1 3 4 > # 1 "/usr/include/bits/sys_errlist.h" 1 3 4 > > So it is quite a common practice, and cygwin is merely copying what you > get on a GNU/Linux box. > >> Also >> uncomfortable for people who want to check include files manually. > How so? As far back as C89, and reiterated in newer documents such as > POSIX 2008, there is no guarantee that is an actual file that > lives in any particular directory, only that the<> notation in the > #include directive tells the compiler to find whatever it needs to > provide that standard header. JonY wrote: > So how are you supposed to use headers provided by the compiler anyway > without going into that compiler specific directory? As I interpret this, stddef.h - containing those constants - is the only file with this setup, so be it. (I had actually checked on a SunOS system.) Thomas -- 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