libchill/memmove.c

Brad Lucier lucier@math.purdue.edu
Tue May 30 12:36:00 GMT 2000


libchill/memove.c was recently changed to include <string.h>.

On alphaev6-unknown-linux-gnu (RedHat 6.0), memmove is already declared
in string.h, and the prototype is different from the code in memmove.c,
causing a bootstrap failure:

../../../libchill/memmove.c: In function `memmove':
../../../libchill/memmove.c:58: argument `n' doesn't match prototype
/usr/include/string.h:42: prototype declaration
make[2]: *** [memmove.o] Error 1

I would think that the existence of memmove should be tested in the
configure script, or at least the following change should be made to
memmove.c:

RCS file: RCS/memmove.c,v
retrieving revision 1.1
diff -c -r1.1 memmove.c
*** memmove.c   2000/05/30 18:45:14     1.1
--- memmove.c   2000/05/30 19:21:23
***************
*** 54,60 ****
  memmove (s1, s2, n)
       void *s1;
       const void *s2;
!      unsigned int n;
  {
    char *sc1 = s1;
    const char *sc2 = s2;
--- 54,60 ----
  memmove (s1, s2, n)
       void *s1;
       const void *s2;
!      size_t n;
  {
    char *sc1 = s1;
    const char *sc2 = s2;

Brad Lucier


More information about the Gcc-bugs mailing list