Article View: gnu.gcc.bug
Article #2094Re: a few things
From: Eugene Brooks
Date: Sun, 01 Jan 1989 00:34
Date: Sun, 01 Jan 1989 00:34
42 lines
2476 bytes
2476 bytes
In article <8812301920.AA18876@PTT.LCS.MIT.EDU> shep@ALLSPICE.LCS.MIT.EDU writes:
>Gcc-1.32 seems to be looking in /usr/local/include for things like
>"#include <stdio.h>". I believe this is new with this version. I
>don't know why, but when someone here installed some sort of C++
>compiler here (without sources) they put a bunch of C++ .h files in
>/usr/local/include and needless to say, gcc finding C++ versions of
>things like stdio.h there is confusing things badly. So, I did
>"mv /usr/local/include{,.C++}" which solved the problem for me for now,
>but undoubtably broke the C++ compiler (which fortunately isn't being
>used now).
I guess I am partially responsible for this, the header directories
/usr/include and /usr/local/include should be searched in the same order
that the loader searches the corresponding library directories /usr/lib
and /usr/local/lib. The following patch to cccp.c will provide more
reasonable behavior, and behavior which will not break in the event that
strange stuff has been deposited in /usr/local/include.
Having the C++ headers in /usr/local/include instead of a C++ specific
directory is a bad idea, however. These should be in /usr/include/CC or
/usr/local/include/CC.
*** /tmp/,RCSt1a03022 Sat Dec 31 16:17:57 1988
--- cccp.c Sat Dec 31 16:16:42 1988
***************
*** 315,322
{
#ifndef VMS
{ &include_defaults[1], GCC_INCLUDE_DIR },
! { &include_defaults[2], "/usr/local/include" },
! { 0, "/usr/include" }
#else
{ &include_defaults[1], "GNU_CC_INCLUDE:" }, /* GNU includes */
{ &include_defaults[2], "SYS$SYSROOT:[SYSLIB.]" }, /* VAX-11 "C" includes */
--- 315,322 -----
{
#ifndef VMS
{ &include_defaults[1], GCC_INCLUDE_DIR },
! { &include_defaults[2], "/usr/include" },
! { 0, "/usr/local/include" }
#else
{ &include_defaults[1], "GNU_CC_INCLUDE:" }, /* GNU includes */
{ &include_defaults[2], "SYS$SYSROOT:[SYSLIB.]" }, /* VAX-11 "C" includes */
Technical Details
Message-ID:
<16129@lll-winken.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!watmath!uunet!lll-winken!maddog!brooksReferences:
<8812301920.AA18876@PTT.LCS.MIT.EDU>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watmath!uunet!lll-winken!maddog!brooks From: brooks@maddog.llnl.gov (Eugene Brooks) Newsgroups: gnu.gcc.bug Subject: Re: a few things Message-ID: <16129@lll-winken.UUCP> Date: 1 Jan 89 00:34:17 GMT References: <8812301920.AA18876@PTT.LCS.MIT.EDU> Sender: usenet@lll-winken.UUCP Reply-To: brooks@maddog.llnl.gov.UUCP (Eugene Brooks) Distribution: gnu Organization: Lawrence Livermore National Laboratory Lines: 42