X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-workers-bounces using -f From: sandmann AT clio DOT rice DOT edu (Charles Sandmann) Message-Id: <10202061905.AA25442@clio.rice.edu> Subject: Re: conflicting types for bzero (gcc303) To: djgpp-workers AT delorie DOT com Date: Wed, 6 Feb 2002 13:05:59 -0600 (CST) Cc: ST001906 AT HRZ1 DOT HRZ DOT TU-Darmstadt DOT De In-Reply-To: <1280AC10535@HRZ1.hrz.tu-darmstadt.de> from "Juan Manuel Guerrero" at Feb 06, 2002 05:37:18 PM X-Mailer: ELM [version 2.5 PL2] Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > While I was trying to port(compiling) gettext 0.11 I got a warning similar > to this one in almost every file: Jeff Williams suggested a define in the source to clear up a similar problem with bcopy: > Don't know if this will help in resolving the issue, but recently > I encountered a problem with bcopy when compiling GNU termcap-1.3 > under djgpp; in termcap.c you'll find: > > /* Do this after the include, in case string.h prototypes bcopy. */ > #if (defined(HAVE_STRING_H) || defined(STDC_HEADERS)) && !defined(bcopy) > #define bcopy(s, d, n) memcpy ((d), (s), (n)) > #endif We discussed some sort of refresh hackery to fix the warnings with GCC 3.x I'm guessing that GCC is trying to inline these? If so, what about something like this in string.h? (refresh only, CVS is already fixed) #if __GNUC__ >= 3 #define bcopy(s, d, n) memcpy(d, s, n) #define bzero(s, n) memset(s, 0, n) #else void * bcopy(const void *_a, void *_b, size_t _len); void * bzero(void *ptr, size_t _len); #endif Or can the prototypes be removed completely with GCC 3.x if they are built-in? #if __GNUC__ < 3 void * bcopy(const void *_a, void *_b, size_t _len); void * bzero(void *ptr, size_t _len); #endif I don't have the time currently to test (I can't even finish my current items...)