From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 88463 invoked by alias); 29 May 2019 14:18:40 -0000 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 Received: (qmail 88447 invoked by uid 89); 29 May 2019 14:18:40 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.0 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 spammy=Easy, HX-Languages-Length:1765, H*f:sk:yddmuj5, honestly X-HELO: userp2130.oracle.com Received: from userp2130.oracle.com (HELO userp2130.oracle.com) (156.151.31.86) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 29 May 2019 14:18:39 +0000 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x4TE8t5g195236; Wed, 29 May 2019 14:18:33 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : references : date : in-reply-to : message-id : mime-version : content-type; s=corp-2018-07-02; bh=tkB1373GCxDz4J+QjSEQq3EOST5BH4dUPbZgMt+gtHo=; b=i3tmhiJ88p/j4d6IggZ5tOHYTb0QvL0a3u4uzD6b9EMP9DOIP3GeAdKXFqZiDb3kGixH zmdui40N8I/jTxY4V0aetYVc7JUeSpqMEMm+4wrpuZ3wXIqWNI8KrcB7B1cXNl7/qpow MCy6+M/w75DG8QDUOl36ssI4HNwrrpf9UUs5Tyr5XeLwPwRi8TJxcDKRXfSQGq4rR8n0 LBa+HlccLBP4rmiXaWLMf6PFN35uhhM39GzuY9+vv35Vl28r6IQpkJ5cj0iDtkcL1Avx +jHdLr5vn2PPyCHJzSUfs/ywtU/mAZp/rVEMY1f48HyGBbmYxldl9aPVqlhsa/HgCR6m /w== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by userp2130.oracle.com with ESMTP id 2spw4tj385-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 29 May 2019 14:18:33 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x4TEHq70049127; Wed, 29 May 2019 14:18:32 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userp3030.oracle.com with ESMTP id 2ss1fng70c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 29 May 2019 14:18:32 +0000 Received: from abhmp0010.oracle.com (abhmp0010.oracle.com [141.146.116.16]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x4TEIQZG011265; Wed, 29 May 2019 14:18:26 GMT Received: from loom (/81.187.191.129) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 29 May 2019 07:18:26 -0700 From: Nick Alcock To: Rainer Orth Cc: Simon Marchi , gdb-patches@sourceware.org, binutils@sourceware.org Subject: Re: Oh dear. I regret to inform you that commit 0e65dfbaf3a0299e4837216a103c28625d4b4f1d might be unfortunate References: <0e65dfbaf3a0299e4837216a103c28625d4b4f1d-master-breakage@gdb-build> <87r28h5sz0.fsf@esperi.org.uk> Date: Wed, 29 May 2019 14:18:00 -0000 In-Reply-To: (Rainer Orth's message of "Wed, 29 May 2019 15:38:44 +0200") Message-ID: <87blzl5opc.fsf@esperi.org.uk> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2019-05/txt/msg00629.txt.bz2 On 29 May 2019, Rainer Orth uttered the following: > Nix writes: >> Does Solaris seriously not have this header? It's in Illumos, but I >> guess it's a later addition... > > As even the Linux htole64(3) man page notes, this stuff is highly > unportable: I've implemented my own in terms of swap.h. It was only about five lines. :) >> OK, I'll have to reimplement it (using qsort() would massively uglify >> the code). > > The gnulib docs for qsort_r gives ... and I've taken an implementation from gnulib. This seems to be an acceptable source for this stuff. (I'd change it to use globals instead, but it would be going in the opposite direction to the one I'd like to go in, of increasing threadsafety, since the linker plugin might end up multithreading if it turns out that parallelization helps.) >>> /vol/src/gnu/gdb/hg/master/local/libctf/ctf-create.c:1352:24: warning: >>> implicit declaration of function 'MAX' [-Wimplicit-function-declaration] >>> 1352 | off = roundup (off, MAX (malign, 1)); >>> | ^~~ >> >> Augh, roundup() is a glibc-specific extension? (But this is as old as >> the import from Solaris, so it was clearly a Solaris extension once, >> too.) > > On Solaris, it lives in , but even in /usr/include it's > almost exclusively used in lowlevel system headers (, , > ). Honestly it's a one-liner. Easy enough to reimplement. :) (And part of the portability push for this many years ago did indeed strip out a reference to . All is explained.) Testing a fix for all of these annoying problems now. Sorry to spoil your day with broken builds :(