Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Mar 2000 21:43:11 -0500 (EST)
From:      Spidey <beaupran@iro.umontreal.ca>
To:        freebsd-questions@freebsd.org
Subject:   select(2) FD* macros
Message-ID:  <14562.48959.924396.432891@anarcat.dyndns.org>

next in thread | raw e-mail | index | archive | help

Hi!

I was wondering why I had such warnings in my latest program
compilation:

talk.c:104: warning: implicit declaration of function `bzero'

The line 104 is:

  FD_ZERO(&set);

After investigation, I found out it was because the FD_ZERO macro
defined in <sys/types.h> is defined as:

#define	FD_ZERO(p)	bzero(p, sizeof(*(p)))

So it uses bzero, a function from <strings.h>. It's kinda problematic
since the select(2) manpage does not advise to include <strings.h>
neither than the types.h manpage include strings.h. And what's worse,
the bzero and bcopy() (used by FD_COPY) are non-standard functions..

My program compiles and runs correctly, but I would like to see this
warning go away... :)

What should be changed? Is this 'fixed' in 4.0? Should I make a send-pr?

I'm using the standard c compiler on:

FreeBSD anarcat.dyndns.org 3.4-STABLE FreeBSD 3.4-STABLE #1: Wed Dec 29 14:37:01 EST 1999     spidey@anarcat.dyndns.org:/usr/src/sys/compile/HALL  i386

Thanks.

the anarcat

-- 
Si l'image donne l'illusion de savoir
C'est que l'adage pretend que pour croire,
L'important ne serait que de voir

Lofofora


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?14562.48959.924396.432891>