This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: libchill/memmove.c
- To: Brad Lucier <lucier at math dot purdue dot edu>
- Subject: Re: libchill/memmove.c
- From: Toon Moene <toon at moene dot indiv dot nluug dot nl>
- Date: Wed, 31 May 2000 22:13:40 +0200
- CC: gcc-bugs at gcc dot gnu dot org, zack at wolery dot cumb dot org
- Organization: Moene Computational Physics, Maartensdijk, The Netherlands
- References: <200005301932.OAA11456@polya.math.purdue.edu>
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)