Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Sep 1999 19:06:10 +0200
From:      Marcel Moolenaar <marcel@scc.nl>
To:        Matthew Dillon <dillon@apollo.backplane.com>
Cc:        Peter Wemm <peter@netplex.com.au>, Marcel Moolenaar <marcel@FreeBSD.ORG>, cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG
Subject:   Re: cvs commit: src/lib/libtermcap termcap.c
Message-ID:  <37F0F581.C8CB9CE2@scc.nl>
References:  <19990928145514.05BF31CBF@overcee.netplex.com.au> <199909281624.JAA90525@apollo.backplane.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Matthew Dillon wrote:
> 
> :Marcel Moolenaar wrote:
> :>   Modified files:
> :>     lib/libtermcap       termcap.c
> :>   Log:
> :>   Explicitly use sigemptyset to clear a sigset_t. Explicit
> :>   initialization of sa_flags added so that we can lose the bzero.
> :
> :Do NOT "loose" the bzero!
> :
> :Cheers,
> :-Peter
> 
>     What peter is saying is that the bzero is necessary because the structure
>     may change in the future, perhaps adding a new field that termcap does
>     not know about.

I don't think that's a particular good argument. You don't simply add a
field to sigaction. You create a complete new interface to handle all
the compatibility issues. To put it differently; 
the argument holds if it is done for every structure there is, not just
for sigaction alone.

>     Also, other operating systems may implement additional
>     fields that termcap doesn't know about.

Yes, but is this termcap not specific to this OS? Isn't it our goal to
provide an efficient and compatible libc? Efficiency is improved.
Compatibility isn't broken...

>     This is why you generally bzero a structure before initializing it, even
>     if you 'know' you are initializing all the fields.  It makes for better
>     portability and compatibility.

I understand that, but portability isn't an issue in this case, is it?
And as for compatibility; it now uses sigemptyset, and thus is finally
compatible.

-- 
Marcel Moolenaar                        mailto:marcel@scc.nl
SCC Internetworking & Databases           http://www.scc.nl/
The FreeBSD project                mailto:marcel@FreeBSD.org


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




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