From owner-cvs-src@FreeBSD.ORG Tue Dec 4 01:01:11 2007 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2143A16A417; Tue, 4 Dec 2007 01:01:11 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail02.syd.optusnet.com.au (mail02.syd.optusnet.com.au [211.29.132.183]) by mx1.freebsd.org (Postfix) with ESMTP id 819B213C45B; Tue, 4 Dec 2007 01:01:10 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c211-30-219-213.carlnfd3.nsw.optusnet.com.au (c211-30-219-213.carlnfd3.nsw.optusnet.com.au [211.30.219.213]) by mail02.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id lB410vZY023042 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 4 Dec 2007 12:01:00 +1100 Date: Tue, 4 Dec 2007 12:00:57 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= In-Reply-To: <868x4beu46.fsf@ds4.des.no> Message-ID: <20071204115427.D3192@delplex.bde.org> References: <200711192157.lAJLvSu6057416@repoman.freebsd.org> <868x4beu46.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-641280724-1196730057=:3192" Cc: cvs-src@freebsd.org, src-committers@freebsd.org, Olivier Houchard , cvs-all@freebsd.org Subject: Re: cvs commit: src/lib/libc/gen closedir.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Dec 2007 01:01:11 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-641280724-1196730057=:3192 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Mon, 3 Dec 2007, [utf-8] Dag-Erling Sm=C3=B8rgrav wrote: > Olivier Houchard writes: >> Log: >> Change the casts from (pthread_mutex_t *) to (void *) to keep gcc quie= t. >> Anybody with a cleaner solution feel free to change it. > > Declare dd_lock as a struct pthread_mutex * instead of a void * in > src/include/dirent.h. dd_lock cannot be declared as struct pthread_mutex *, since pthread_mutex is not permitted in the application namespace of dirent.h. dirent.h is (was) careful about namespaces. E.g., it keeps out of the application namespace for its own struct _dirdesc. This doesn't work for pthread_mutex since that is misdesigned. (I think pthread_mutex_t is supposed to hide the implementation and reduce namespace problems, but struct pthread was only declared in where it is permitted in the namespace, so doesn't bother naming it struct _pthread_mutex. Other headers can't define it with a different name (tag) because different tags give different structs.) Bruce --0-641280724-1196730057=:3192--