Return to BSD News archive
Xref: sserve comp.unix.bsd:15479 comp.lang.c:87467 comp.unix.sys5.r3:2309
Newsgroups: comp.unix.bsd,comp.lang.c,comp.unix.sys5.r3
Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!msunews!caen!math.ohio-state.edu!howland.reston.ans.net!swrinde!pipex!sunic!news.tele.fi!news.funet.fi!news.eunet.fi!KremlSun!satisfy.kiae.su!kiae!relcom!elvisti!store!office.elvisti.kiev.ua!alex
From: alex@elvisti.kiev.ua (Alex A. Tatmaniants)
Subject: Re: how to completely get rid of bcopy, bzero, bcmp?
Followup-To: comp.unix.bsd,comp.lang.c,comp.unix.sys5.r3
X-Newsreader: TIN [version 1.2 PL2]
Sender: usenet@store.elvisti.kiev.ua (USENET subsystem)
Nntp-Posting-Host: office.elvisti.kiev.ua
Organization: Electronni Visti InformAgency (ElVisti)
Message-ID: <D0ECuA.3ME@store.elvisti.kiev.ua>
References: <3bksus$fg4@spruce.cic.net>
Date: Tue, 6 Dec 1994 16:08:30 GMT
Lines: 43
Paul Southworth (pauls@locust.cic.net) wrote:
: I'm not much of a System V user, and I've always been lazy and fooled
: with compatibility libs on most SVR[34] machines (I know I know, for
: shame) to get bzero, bcopy and bcmp functionality. Anyway, now I have
: to build BSD telnetd for a Sequent running DYNIX/ptx 2.1.0 and lo, it's
: just SVR3(?) no compatibility anything. So anyway, for example, we
: have a bcopy in slc.c:
: /*
: * save this slc buffer if it is the first, otherwise dump
: * it.
: */
: if (def_slcbuf == (unsigned char *)0) {
: def_slclen = len;
: def_slcbuf = (unsigned char *)malloc((unsigned)len);
: if (def_slcbuf == (unsigned char *)0)
: return; /* too bad */
: bcopy(ptr, def_slcbuf, len);
Why do u want rid it?
At any case u can do it with
# define bcopy (x, y, z) memcopy (y, x, z)
: }
: What should that bcopy() look like to make this SVR3 system happy?
: Is there a "right" way to implement bcopy() etc on this system so I could
: generate my own compatibility library and not bother with altering the
: code every time?
: Working with gcc 2.6.2 if it matters.
: --
: Paul Southworth
: CICNet Systems Support
: pauls@cic.net
--
With best wishes -- Alex.