From: "Mark E." To: djgpp-workers AT delorie DOT com Date: Fri, 12 May 2000 21:45:07 -0400 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: patch for bzero and bcopy Message-ID: <391C7B63.28509.5D559@localhost> X-mailer: Pegasus Mail for Win32 (v3.12c) Reply-To: djgpp-workers AT delorie DOT com > Besides bzero, bcopy also needs fixing. > Close. If you change the return type to "void" you should remove the > "return" also, since the function no longer returns anything. Yep, I passed over the 'return'. Below is a revised patch that should be correct. Sorry about that. *** include/string.h.orig Sun Jun 28 20:02:34 1998 --- include/string.h Fri May 12 19:16:20 2000 *************** *** 1,3 **** --- 1,4 ---- + /* Copyright (C) 2000 DJ Delorie, see COPYING.DJ for details */ /* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ #ifndef __dj_include_string_h_ *************** size_t strxfrm(char *_s1, const char *_s *** 49,56 **** #include int bcmp(const void *_ptr1, const void *_ptr2, int _length); ! void * bcopy(const void *_a, void *_b, size_t _len); ! void * bzero(void *ptr, size_t _len); int ffs(int _mask); char * index(const char *_string, int _c); void * memccpy(void *_to, const void *_from, int c, size_t n); --- 50,57 ---- #include int bcmp(const void *_ptr1, const void *_ptr2, int _length); ! void bcopy(const void *_a, void *_b, size_t _len); ! void bzero(void *ptr, size_t _len); int ffs(int _mask); char * index(const char *_string, int _c); void * memccpy(void *_to, const void *_from, int c, size_t n); *** src/libc/compat/bsd/bzero.c.orig Wed Aug 23 00:48:00 1995 --- src/libc/compat/bsd/bzero.c Fri May 12 21:39:40 2000 *************** *** 1,10 **** /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ #include #undef bzero ! void * bzero(void *a, size_t b) { ! return memset(a,0,b); } --- 1,11 ---- + /* Copyright (C) 2000 DJ Delorie, see COPYING.DJ for details */ /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ #include #undef bzero ! void bzero(void *a, size_t b) { ! memset(a,0,b); } *** src/libc/compat/bsd/bcopy.c.orig Wed Aug 23 00:48:00 1995 --- src/libc/compat/bsd/bcopy.c Fri May 12 21:39:58 2000 *************** *** 1,10 **** /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ #include #undef bcopy ! void * bcopy(const void *a, void *b, size_t len) { ! return memmove(b, a, len); } --- 1,11 ---- + /* Copyright (C) 2000 DJ Delorie, see COPYING.DJ for details */ /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ #include #undef bcopy ! void bcopy(const void *a, void *b, size_t len) { ! memmove(b, a, len); }