From owner-svn-src-all@FreeBSD.ORG Sun Aug 3 15:06:52 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BDDF3DAA for ; Sun, 3 Aug 2014 15:06:52 +0000 (UTC) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 87EC92830 for ; Sun, 3 Aug 2014 15:06:51 +0000 (UTC) Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by gateway1.nyi.internal (Postfix) with ESMTP id 0C3E022345 for ; Sun, 3 Aug 2014 11:06:50 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute6.internal (MEProxy); Sun, 03 Aug 2014 11:06:50 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.net; h= message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; s=mesmtp; bh=soQbXcBDXGQ1hO95Ci/Qb8vYk2Q=; b=liyxdWjFYROPWDZr4QRC9YoxmykM PZHY0/zES4XY50z1MGGgu8sZcOAzh6FUaoV9eMxrwof++8CyIWEsguXa6Hg4KZC1 eprKD+FSFYuKYc5cxm2IMvjbrUVClwQp3Job44UD/KUxSxT6n4rDrSjQpgkxqNl1 bDbnFDCUmPcMmMI= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=message-id:date:from:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; s=smtpout; bh=soQbXcBDXGQ1hO95Ci/Qb8 vYk2Q=; b=lGsU/iN4MElBfNTOf/0lBd8dNs0H/Z5M33rKHDhIg9SGa8OeQInvAz 8V4jmriHuWHOM1ucAGep37rju3OMTDJcMJMtXqFZjJKYnIoQ80OMQ57vm96diZpT 7Cldpi9dnTq4l6FHlSwaYyDZqFP0XwPIgHGOXlhIdVqJermJPX6FE= X-Sasl-enc: vfVrLdsD6sr1ONZML4rG9EwQCR1NcYtBt/9G7KB9WqBs 1407078409 Received: from [192.168.5.197] (unknown [217.40.0.61]) by mail.messagingengine.com (Postfix) with ESMTPA id CAB7FC0000C; Sun, 3 Aug 2014 11:06:48 -0400 (EDT) Message-ID: <53DE5006.6000601@fastmail.net> Date: Sun, 03 Aug 2014 16:06:46 +0100 From: Bruce Simpson User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Warner Losh , Pedro Giffuni Subject: Re: svn commit: r268943 - in head: include lib/libc/stdlib References: <201407211522.s6LFMnQo084633@svn.freebsd.org> <53CD430F.5040604@fastmail.net> <68E8EDB9-64DE-4037-9047-C8BEAD86801A@freebsd.org> <65378493-7F05-4314-9809-E689891F6067@gmail.com> In-Reply-To: <65378493-7F05-4314-9809-E689891F6067@gmail.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Aug 2014 15:06:52 -0000 On 03/08/2014 15:27, Warner Losh wrote: >>> What, if anything, can be done about qsort_r() API incompatibility? >> qsort_r is non-standard and we did it first, plus we will want to stay compatible with Apple :). >> >> I guess we could do some ugly parameter swapping in the case where _GNU_SOURCE >> is defined, but I won’t volunteer to do that. > Are there any ABI considerations for the change? > I'm in agreement with Pedro here. Some form of compile-time checking is the best one can hope for in that situation, as it would be difficult to "ret-con" the qsort_r() ABI itself. The glibc implementation swaps two pointers in its signature. One of those points to executable code. The last time this caused problems for me was when testing the new CScope indexing backend by Elad Lahav on BSD/Mac. He had developed on Linux, however the quick fix was to fall back to using non-reentrant qsort().