delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/05/12/18:44:19

From: "Mark E." <snowball3 AT bigfoot DOT com>
To: djgpp-workers AT delorie DOT com
Date: Fri, 12 May 2000 19:21:50 -0400
MIME-Version: 1.0
Subject: patch for bzero and bcopy
Message-ID: <391C59CE.6976.5491FE@localhost>
X-mailer: Pegasus Mail for Win32 (v3.12c)
Reply-To: djgpp-workers AT delorie DOT com

Besides bzero, bcopy also needs fixing.

*** src/libc/compat/bsd/bzero.c.orig	Wed Aug 23 00:48:00 1995
--- src/libc/compat/bsd/bzero.c	Fri May 12 19:11:22 2000
***************
*** 1,9 ****
  /* 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,10 ----
+ /* 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)
  {
    return 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 19:16:36 2000
***************
*** 1,9 ****
  /* 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,10 ----
+ /* 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)
  {
    return memmove(b, a, len);
*** 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);


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019