From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32152 invoked by alias); 29 Sep 2011 02:19:24 -0000 Received: (qmail 32134 invoked by uid 22791); 29 Sep 2011 02:19:23 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from barfooze.de (HELO barfooze.de) (78.46.117.212) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 29 Sep 2011 02:19:10 +0000 Received: from xdsl-188-155-204-78.adslplus.ch ([188.155.204.78] helo=[172.16.0.230]) by barfooze.de with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.76) (envelope-from ) id 1R96DM-00038H-Ui for gdb-patches@sourceware.org; Thu, 29 Sep 2011 04:19:09 +0200 Message-ID: <4E83D50B.60002@barfooze.de> Date: Thu, 29 Sep 2011 02:31:00 -0000 From: John Spencer User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.14) Gecko/20110221 SUSE/3.1.8 Mail/1.0 MIME-Version: 1.0 To: gdb-patches@sourceware.org Subject: Re: wrong assumptions about pthread_t being numeric References: <4E73D06F.603@barfooze.de> <201109170000.43306.pedro@codesourcery.com> <4E73D806.2040302@barfooze.de> <201109170130.42276.pedro@codesourcery.com> <4E73F1A4.2020606@barfooze.de> <20110917022840.GD17681@adacore.com> <4E74C031.8050603@barfooze.de> In-Reply-To: <4E74C031.8050603@barfooze.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-09/txt/msg00495.txt.bz2 On 09/17/2011 05:43 PM, John Spencer wrote: > On 09/17/2011 04:28 AM, Joel Brobecker wrote: >>> i disagree. adding a proper solution once is superior to creating >>> dozens of special case hacks. also it saves a lot of time in the long >>> term. >> Based on my experience so far, I have to agree with Pedro. >> But if you do have a superior solution, we'll take a look. >> I still have to tell you that I won't like it if your solution >> makes the code harder to read. Sometimes, that's OK because it >> helps achieving portability. But when there is no such need for >> portability, it just gets in the way. Let's also be pragmatic, >> here and fix the problems that we know we have. >> > it would be nice to have an approach which would just work anywhere > and respect the spec, > however i currently have not the resources to implement it. > > thus, as you suggested, i came up with a small patch fixing the issue > at hand. the solution should work on any sys/libc combination where > sizeof(long) == sizeof(void*) and pthread_t is either a pointer or an > int with sizeof equal or less than sizeof long. > this should cover all currently existing combinations. > > i may find more spots in the future which need the application of the > macro, and will eventually be sending more patches applying the > conversion macro to it. > > -- JS > > knock, knock. anybody here ? please tell me wether you accept my patch or not. -- JS