public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Nick Alcock <nick.alcock@oracle.com>
To: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Cc: Simon Marchi <simark@simark.ca>,
	gdb-patches@sourceware.org,        binutils@sourceware.org
Subject: Re: Oh dear. I regret to inform you that commit 0e65dfbaf3a0299e4837216a103c28625d4b4f1d might be unfortunate
Date: Wed, 29 May 2019 14:18:00 -0000	[thread overview]
Message-ID: <87blzl5opc.fsf@esperi.org.uk> (raw)
In-Reply-To: <yddmuj59y8r.fsf@CeBiTec.Uni-Bielefeld.DE> (Rainer Orth's message	of "Wed, 29 May 2019 15:38:44 +0200")

On 29 May 2019, Rainer Orth uttered the following:

> Nix <nix@esperi.org.uk> 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 <sys/sysmacros.h>, but even in /usr/include it's
> almost exclusively used in lowlevel system headers (<nfs/*.h>, <vm/*.h>,
> <sys/*.h>).

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 <sys/sysmacros.h>. All is explained.)

Testing a fix for all of these annoying problems now. Sorry to spoil your
day with broken builds :(

  reply	other threads:[~2019-05-29 14:18 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <0e65dfbaf3a0299e4837216a103c28625d4b4f1d-master-breakage@gdb-build>
     [not found] ` <f7125ecf-6285-0143-2808-14c9efe932e0@simark.ca>
2019-05-29 10:21   ` Rainer Orth
2019-05-29 12:46     ` Nix
2019-05-29 13:14       ` Andreas Schwab
2019-05-29 13:38       ` Rainer Orth
2019-05-29 14:18         ` Nick Alcock [this message]
2019-05-29 16:33         ` [PATCH] Fix a number of build problems found on Solaris and NetBSD (was Re: Oh dear. I regret to inform you that commit 0e65dfbaf3a0299e4837216a103c28625d4b4f1d might be unfortunate) Nick Alcock
2019-05-29 18:22           ` Rainer Orth
2019-05-29 20:34             ` Nick Alcock
2019-05-29 20:58           ` Kamil Rytarowski
2019-05-29 22:37             ` Nick Alcock
2019-05-30  7:14               ` Sergio Durigan Junior
2019-05-30  9:35               ` Kamil Rytarowski
2019-05-30 10:29                 ` Nick Alcock
2019-05-29 16:04     ` Oh dear. I regret to inform you that commit 0e65dfbaf3a0299e4837216a103c28625d4b4f1d might be unfortunate Nick Alcock

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87blzl5opc.fsf@esperi.org.uk \
    --to=nick.alcock@oracle.com \
    --cc=binutils@sourceware.org \
    --cc=gdb-patches@sourceware.org \
    --cc=ro@CeBiTec.Uni-Bielefeld.DE \
    --cc=simark@simark.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).