This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: libchill/memmove.c won't compile
- To: rearnsha at arm dot com
- Subject: Re: libchill/memmove.c won't compile
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Tue, 30 May 2000 09:37:40 -0600
- cc: zack at wolery dot cumb dot org, gcc-bugs at gcc dot gnu dot org
- Reply-To: law at cygnus dot com
In message <200005301400.PAA29176@cam-mail2.cambridge.arm.com>you write:
>
> [Arghh!, Maybe this time I've got all the headers right.. ]
>
> Zack,
>
> Your patch
> 2000-05-29 Zack Weinberg <zack@wolery.cumb.org>
>
> * concatstr.c, exh.c: Include stdlib.h and string.h.
> * delaycase.c, eqstr.c, memmove.c, printbuffer.c,
> printevent.c, sendbuffer.c, waitbuffer.c: Include string.h.
>
> breaks a cross build on the ARM with Newlib, since the prototype for
> memmove in string.h conflicts with the function definition in memove.c
>
> Why isn't the third argument of memmove (in libchill/memmove.c) of type
> size_t as required by the standard?
No clue, other than laziness I suspect.
I suspect we can just fix memmove.c to do something like this:
#include <ansidecl.h>
#ifdef __STDC__
#include <stddef.h>
#else
#define size_t unsigned long
#endif
Then size size_t as the 3rd argument.
[ That's what libiberty/memmove.c does. ]
Can you try that and see if it fixes your build?
jeff