From owner-freebsd-current Thu Feb 20 23:55:46 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id XAA12247 for current-outgoing; Thu, 20 Feb 1997 23:55:46 -0800 (PST) Received: from hydrogen.nike.efn.org (resnet.uoregon.edu [128.223.170.28]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id XAA12234 for ; Thu, 20 Feb 1997 23:55:38 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by hydrogen.nike.efn.org (8.8.4/8.8.4) with SMTP id XAA05391; Thu, 20 Feb 1997 23:54:38 -0800 (PST) Date: Thu, 20 Feb 1997 23:54:38 -0800 (PST) From: John-Mark Gurney Reply-To: John-Mark Gurney To: Bruce Evans cc: freebsd-current@freebsd.org Subject: Re: bzero and FD_ZERO In-Reply-To: <199702210506.QAA28404@godzilla.zeta.org.au> Message-ID: X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk On Fri, 21 Feb 1997, Bruce Evans wrote: > >today I was writing a program that uses FD_ZERO... but I wasn't using > >string.h... if you compile it with -Wall you will get a warning about > >implicet declaration of bzero... > > > >should this happen? and what is the proper fix for it? (do we really > >require including string.h? should I document that as a header that is > >required? ) > > The library should use a private or reserved function, e.g., __bzero() > or memset(). shouldn't be included or a prerequisite. hmm... I did a quick nm of libc.a, looks like the only bzero call is normal bzero... same with memset... is it time that we possible break these functions into a "specialized" header? something like memfcn.h that will hold b* and mem* set of functions? it looks like both sys/types.h and sys/buf.h require bzero... machine/pcaudioio.h requires memset... and machine/soundcard.h on memcpy... and thanks for pointing out that addinition -W options... I'll make sure I keep a copy of the list... ttyl.. John-Mark gurney_j@efn.org http://resnet.uoregon.edu/~gurney_j/ Modem/FAX: (541) 683-6954 (FreeBSD Box) Live in Peace, destroy Micro$oft, support free software, run FreeBSD (unix)