Xref: utzoo comp.lang.c:29604 comp.sys.att:9798 Path: utzoo!attcan!uunet!virtech!cpcahil From: cpcahil@virtech.uucp (Conor P. Cahill) Newsgroups: comp.lang.c,comp.sys.att Subject: Re: bcopy and bzero on AT&T sysV Keywords: bcopy bzero AT&T Message-ID: <1990Jun14.233837.22318@virtech.uucp> Date: 14 Jun 90 23:38:37 GMT References: <213@cti1.UUCP> Reply-To: cpcahil@virtech.UUCP (Conor P. Cahill) Organization: Virtual Technologies Inc., Sterling VA Lines: 19 In article <213@cti1.UUCP> kmeek@cti1.UUCP (Meek) writes: >I am trying to compile a C program that uses bcopy() and bzero() >functions. The linker bombs because it doesn't know bcopy and bzero. Use the following: #define bzero(ptr,cnt) memset(ptr,'\0',cnt) #define bcopy(src,dest,cnt) memcpy(dest,src,cnt) Note that memcpy is not guarranteed to handle overlapping moves, while bcopy is assumed to by some programs. I have used these #defines on lots of net code without any problems. -- Conor P. Cahill (703)430-9247 Virtual Technologies, Inc., uunet!virtech!cpcahil 46030 Manekin Plaza, Suite 160 Sterling, VA 22170