X-Recipient: archive-cygwin AT delorie DOT com 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 Message-ID: <4F42CFFD.2040403@towo.net> Date: Mon, 20 Feb 2012 23:58:05 +0100 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 AT cygwin DOT com Subject: Re: Issues with stdio.h References: <20120220002507 DOT GA16123 AT ednor DOT casa DOT cgf DOT cx> <4F42BDAE DOT 50006 AT towo DOT net> <4F42C4D0 DOT 8050108 AT redhat DOT 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 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 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