Mail Archives: djgpp-workers/2000/05/12/21:14:20
> 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 <sys/movedata.h>
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 <sys/movedata.h>
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 <string.h>
#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 <string.h>
#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 <string.h>
#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 <string.h>
#undef bcopy
! void
bcopy(const void *a, void *b, size_t len)
{
! memmove(b, a, len);
}
- Raw text -