From owner-freebsd-current Thu Feb 27 8:58:16 2003 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7563A37B401; Thu, 27 Feb 2003 08:58:14 -0800 (PST) Received: from h00609772adf0.ne.client2.attbi.com (h00609772adf0.ne.client2.attbi.com [24.61.43.152]) by mx1.FreeBSD.org (Postfix) with ESMTP id 57B1A43FAF; Thu, 27 Feb 2003 08:58:13 -0800 (PST) (envelope-from rodrigc@h00609772adf0.ne.client2.attbi.com) Received: from h00609772adf0.ne.client2.attbi.com (localhost.ne.attbi.com [127.0.0.1]) by h00609772adf0.ne.client2.attbi.com (8.12.7/8.12.7) with ESMTP id h1RGxGUE022007; Thu, 27 Feb 2003 11:59:16 -0500 (EST) (envelope-from rodrigc@h00609772adf0.ne.client2.attbi.com) Received: (from rodrigc@localhost) by h00609772adf0.ne.client2.attbi.com (8.12.7/8.12.7/Submit) id h1RGxGRH022006; Thu, 27 Feb 2003 11:59:16 -0500 (EST) Date: Thu, 27 Feb 2003 11:59:15 -0500 From: Craig Rodrigues To: John Polstra Cc: current@freebsd.org, freebsd-security@freebsd.org Subject: Re: OpenSSL question for id_function() Message-ID: <20030227165915.GA21958@attbi.com> References: <20030225155724.GB9400@attbi.com> <200302271640.h1RGeMx2029701@vashon.polstra.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200302271640.h1RGeMx2029701@vashon.polstra.com> User-Agent: Mutt/1.4i Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Thu, Feb 27, 2003 at 08:40:22AM -0800, John Polstra wrote: > FreeBSD violates POSIX in this respect. Doh! I just looked at: http://www.openbsd.org/cgi-bin/cvsweb/src/lib/libpthread/include/pthread.h and it looks like OpenBSD does the same thing. Just wondering, is the FreeBSD KSE project implementing a POSIX compliant pthread_t? > thread-related types: > > pthread_attr_t > pthread_mutex_t > pthread_mutexattr_t > pthread_cond_t > pthread_condattr_t > pthread_once_t > > We got it right for pthread_key_t, though. :-) Cool. Sometimes standards are a pain in the neck, but my main interest in FreeBSD's POSIX compliance for threads is to be more and more of a drop-in replacement for Linux. :) So is OpenSSL stuff which requires id_function() broken on FreeBSD then? The C++-style work-around for my code is to do: return reinterpret_cast(pthread_self()); which is similar to Lev Walkin's suggestion for a C style cast. This gets things to compile, but seems like trying to fit a square peg in a round hole.... Thanks. -- Craig Rodrigues http://home.attbi.com/~rodrigc rodrigc@attbi.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message