This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: egcs patch for including both string.h/strings.h (when safe)



  In message <199808310143.VAA06164@caip.rutgers.edu>you write:
  > 	Working on the principle that getting prototypes from system
  > headers (when they're available) is better than rolling your own, I
  > wanted to include strings.h for bzero/bcmp/bcopy/index/rindex function
  > prototypes even if we're getting string.h.
  > 
  > 	However since I recall rumors that including both can cause some
  > platform to choke, I wrote an autoconf macro patterned after
  > AC_HEADER_TIME to deal with that. 
  > 
  > 	The immediate benefit is that most system header prototypes
  > contain function arguments, whereas the backup prototypes in system.h
  > don't do so (on purpose.)
  > 
  > 	Okay to install?
  > 
  > 		--Kaveh
  > 
  > Sun Aug 30 21:28:32 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
  > 
  > 	* aclocal.m4 (GCC_HEADER_STRING): New macro to detect if it is
  >  	safe to include both string.h and strings.h together.
  >   	(GCC_NEED_DECLARATION): Test STRING_WITH_STRINGS when deciding
  >  	which headers to search for function declarations.  Continue to
  >  	prefer string.h over strings.h when both are not acceptable.
  > 
  > 	* acconfig.h (STRING_WITH_STRINGS): Add stub.
  > 
  > 	* configure.in: Call GCC_HEADER_STRING.
  > 
  > 	* system.h: Test STRING_WITH_STRINGS when deciding which headers
  >  	to include.  Continue to prefer string.h over strings.h when both
  >  	are not acceptable.
Looks good to me.  

Thanks!

jeff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]