Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Feb 1997 23:54:38 -0800 (PST)
From:      John-Mark Gurney <jmg@nike.efn.org>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        freebsd-current@freebsd.org
Subject:   Re: bzero and FD_ZERO
Message-ID:  <Pine.BSF.3.95q.970220234324.1532L-100000@hydrogen.nike.efn.org>
In-Reply-To: <199702210506.QAA28404@godzilla.zeta.org.au>

next in thread | previous in thread | raw e-mail | index | archive | help
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().  <string.h> 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)





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.95q.970220234324.1532L-100000>