public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: Saleem Abdulrasool <abdulras@google.com>
To: "Érico Nogueira" <ericonr@disroot.org>
Cc: elfutils-devel@sourceware.org
Subject: Re: [PATCH] lib: remove usage of `sys/cdefs.h`
Date: Mon, 23 Aug 2021 08:23:08 -0700	[thread overview]
Message-ID: <CAO8XFHshoUwMkARqnGQc904pG3iTVAYm_1ZPtm3B=Re1VLk2gA@mail.gmail.com> (raw)
In-Reply-To: <CDQWFM6CZI13.191O78G6OTJOZ@mussels>

Hi Érico,

Yes, it seems that `STROF` can be removed as well.  However, I'd
prefer to do that in a separate change.  This way the change is a
separate clean up rather than just happens to come along with the
sys/cdefs.h removal.

On Mon, Aug 23, 2021 at 5:48 AM Érico Nogueira <ericonr@disroot.org> wrote:
>
> On Fri Aug 20, 2021 at 3:20 PM -03, Saleem Abdulrasool via Elfutils-devel wrote:
> > This header is a BSD header that is also available in glibc. However,
> > this is a not a standard C header and was used for `__CONCAT`. Because
> > this is not a standard header, not all libc implementations provide the
> > header. Remove the usage of the header and always use the previously
> > fallback path. This is needed in order to build with musl.
>
> On Void we provide our own <sys/cdefs.h> file, since way too many
> packages require them. Explains why I missed this :)
>
> >
> > Signed-off-by: Saleem Abdulrasool <abdulras@google.com>
> > ---
> > lib/fixedsizehash.h | 5 -----
> > 1 file changed, 5 deletions(-)
> >
> > diff --git a/lib/fixedsizehash.h b/lib/fixedsizehash.h
> > index dac2a5f5..f333ad99 100644
> > --- a/lib/fixedsizehash.h
> > +++ b/lib/fixedsizehash.h
> > @@ -30,17 +30,12 @@
> > #include <errno.h>
> > #include <stdlib.h>
> > #include <string.h>
> > -#include <sys/cdefs.h>
> >
> > #include <system.h>
> >
> > -#ifdef __CONCAT
> > -#define CONCAT(t1,t2) __CONCAT (t1,t2)
> > -#else
> > #define STROF(t2) t2
> > #define CONCAT_EXPANDED(t1,t2) t1 ## t2
> > #define CONCAT(t1,t2) CONCAT_EXPANDED(t1,t2)
> > -#endif
>
> I think you can remove STROF from here too, can't you? I don't see it
> being used anywhere.
>
> >
> > /* Before including this file the following macros must be defined:
> >
> > --
> > 2.33.0.rc2.250.ged5fa647cd-goog
>

  reply	other threads:[~2021-08-23 15:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-20 18:20 Saleem Abdulrasool
2021-08-23 12:42 ` Érico Nogueira
2021-08-23 15:23   ` Saleem Abdulrasool [this message]
2021-08-27 15:11     ` Mark Wielaard

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='CAO8XFHshoUwMkARqnGQc904pG3iTVAYm_1ZPtm3B=Re1VLk2gA@mail.gmail.com' \
    --to=abdulras@google.com \
    --cc=elfutils-devel@sourceware.org \
    --cc=ericonr@disroot.org \
    /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).