This is the mail archive of the gcc-bugs@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: libchill/memmove.c


Brad Lucier wrote:

> 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

My suggestion is to get rid of this abomination as follows:

*** memmove.c.orig      Wed May 31 22:09:19 2000
--- memmove.c   Wed May 31 22:11:27 2000
*************** Boston, MA 02111-1307, USA.  */
*** 27,32 ****
     the executable file might be covered by the GNU General Public
License.  */
  
- #include <string.h>
- 
  #define MIN(a, b)  ((a) < (b) ? (a) : (b))
  
--- 27,30 ----
*************** memmove (s1, s2, n)
*** 64,73 ****
        *--sc1 = *--sc2;
    else
- #if 0
      for (; 0 < n; --n)
        *sc1++ = *sc2++;
- #else
-     memcpy (sc1, sc2, n);
- #endif
    return s1;
  }
--- 62,67 ----

-- 
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
GNU Fortran 95: http://g95.sourceforge.net/ (under construction)

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