From owner-freebsd-current Wed Feb 26 23:31:18 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 92BD837B401 for ; Wed, 26 Feb 2003 23:31:16 -0800 (PST) Received: from smtp.netli.com (ip2-pal-focal.netli.com [66.243.52.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5C59E43F3F for ; Wed, 26 Feb 2003 23:31:15 -0800 (PST) (envelope-from vlm@netli.com) Received: (qmail 31340 invoked by uid 84); 27 Feb 2003 07:31:15 -0000 Received: from vlm@netli.com by l3-1 with qmail-scanner-0.96 (uvscan: v4.1.40/v4121. . Clean. Processed in 0.123263 secs); 27 Feb 2003 07:31:15 -0000 Received: from unknown (HELO netli.com) (192.168.238.32) by mx01-pal-lan.netli.lan with SMTP; 27 Feb 2003 07:31:14 -0000 Message-ID: <3E5DBE9E.7060302@netli.com> Date: Wed, 26 Feb 2003 23:30:38 -0800 From: Lev Walkin Organization: Netli, Inc. User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.2.1) Gecko/20030125 X-Accept-Language: ru, en-us, en MIME-Version: 1.0 To: Craig Rodrigues Cc: freebsd-current@freebsd.org, freebsd-security@freebsd.org Subject: Re: OpenSSL question for id_function() References: <20030225155724.GB9400@attbi.com> In-Reply-To: <20030225155724.GB9400@attbi.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit 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 Craig Rodrigues wrote: > return static_cast(pthread_self()); > > pthread_self() returns something of type pthread_t. > This code works under Linux, because pthread_t is mapped to an integer value. > > However, on FreeBSD, pthread_t is a pointer to struct pthread, so this > code does not compile: > > OpenSSLPluginI.cpp: In function `long unsigned int IceSSL::idFunction()': > OpenSSLPluginI.cpp:153: invalid static_cast from type `pthread*' to type `long > unsigned int' > > > Is there a way to implement the id_function() for OpenSSL so that > it works portably across FreeBSD and Linux? return (unsigned long)(void *)(pthread_self()); -- Lev Walkin vlm@netli.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message