Date: Sun, 1 Nov 1998 21:42:04 +0000 (GMT) From: Terry Lambert <tlambert@primenet.com> To: dennis@etinc.com (Dennis) Cc: archie@whistle.com, hackers@FreeBSD.ORG Subject: Re: scanf in the kernel? Message-ID: <199811012142.OAA27464@usr05.primenet.com> In-Reply-To: <199810301830.SAA28485@etinc.com> from "Dennis" at Oct 30, 98 06:44:25 pm
next in thread | previous in thread | raw e-mail | index | archive | help
> >Also- > >Seems like the kernel was missing memmove(), memcpy(), and/or memset() > >at some point. I like using these better than bcopy()/bzero() because > >they are more ANSI and portable... Not that this matters in kernel code, since FreeBSD is not portable to non-FreeBSD systems. 8-). > #define memcpy(d,s,n) bcopy(s,d,n) > > not exactly rocket science :-) Actually, bcopy is closer to memmove, since it supports overlapping ranges as its arguments. I really hate memcpy because of its non-guarantee inre: overlapping arguments. It's intentional stupidity which suffers vendors existing implementations, for no good reason other than to compromise with fools. Stupid ANSI Committe, bend over and pick up that draft standard for me, will you? Why yes, that committe member *was* at Shawshank for a while; why do you ask? If the vendor has a faster implementation that works with their processor instruction set, but only for non-overlapped regions, let them test for overlap, and then use their weenie instruction. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199811012142.OAA27464>