This is the mail archive of the
mailing list for the GCC project.
Re: egcs patch for including both string.h/strings.h (when safe)
- To: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Subject: Re: egcs patch for including both string.h/strings.h (when safe)
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Thu, 03 Sep 1998 00:53:38 -0600
- cc: egcs-patches at cygnus dot com
- Reply-To: law at cygnus dot com
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?
> Sun Aug 30 21:28:32 1998 Kaveh R. Ghazi <firstname.lastname@example.org>
> * 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.