Newsgroups: gnu.gcc Path: utzoo!utgpu!jarvis.csri.toronto.edu!snow.white.toronto.edu!cks From: cks@white.toronto.edu (Chris Siebenmann) Subject: Re: cbreak(?) mode and gcc Message-ID: <89May3.161817edt.30759@snow.white.toronto.edu> Keywords: gcc, less, scrabble, screen mode Reply-To: cks@white.toronto.edu (Chris Siebenmann) Organization: Ziebmef home away from home References: <1776@leah.Albany.Edu> <8904281417.AA13699@tiktok.dg.com> Distribution: gnu Date: Wed, 3 May 89 16:18:09 EDT In article <8904281417.AA13699@tiktok.dg.com> Michael Meissner writes: ... | which GCC searches before /usr/include. I have noticed that | the include files that are fixed don't work with non-ANSI | compilers or GCC's -traditional switch. I consider this a definate bug, and have a patch that papers over the problem (I don't consider it a 100% true fix). My fix causes gcc to skip its include directory when -traditional is given. Since other necessary things may live in there, this isn't a perfect solution, but sort of adding a -ansi-specific include directory I can't think of one. My patch (apply to cccp.c): *** /tmp/,RCSt1022929 Wed May 3 16:16:49 1989 --- cccp.c Tue Mar 7 21:08:35 1989 *************** *** 769,779 **** /* Unless -fnostdinc, tack on the standard include file dirs to the specified list */ if (!no_standard_includes) { ! if (include == 0) ! include = (cplusplus ? cplusplus_include_defaults : include_defaults); ! else last_include->next = (cplusplus ? cplusplus_include_defaults : include_defaults); } /* Initialize output buffer */ --- 769,788 ---- /* Unless -fnostdinc, tack on the standard include file dirs to the specified list */ if (!no_standard_includes) { ! /* cks@white.toronto.edu Sept 28/1988: Skip GCC include directory ! with ANSI-ied files if -traditional set. ! */ ! if (include == 0) { ! include = (cplusplus ? cplusplus_include_defaults : include_defaults); ! if (traditional) ! include ++; ! } ! else { last_include->next = (cplusplus ? cplusplus_include_defaults : include_defaults); + if (traditional) + last_include->next ++; + } } /* Initialize output buffer */ -- "I shall clasp my hands together and bow to the corners of the world." Number Ten Ox, "Bridge of Birds" Chris Siebenmann ...!utgpu!{ncrcan,ontmoh!moore}!ziebmef!cks cks@white.toronto.edu or ...!utgpu!{,csri!}cks