public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: Ulf Hermann <ulf.hermann@qt.io>
To: elfutils-devel@sourceware.org
Subject: Re: [PATCH] Check for existence of asprintf and vasprintf
Date: Thu, 23 Feb 2017 09:39:00 -0000	[thread overview]
Message-ID: <8bc5640c-cb84-bda2-50be-f7b1bb7c35de@qt.io> (raw)
In-Reply-To: <20170222185737.GE28432@vapier>

> basename() is in the dirname module

That's the POSIX variant. We're using the GNU variant everywhere and the GNU variant is a whopping two lines of code:

char *base = strrchr(path, '/');
return base ? base + 1 : (char *)path;

> you're correct that GNU strerror_r is not handled by gnulib.
> that doesn't look like it's too hard to deal with, but it is
> something that'd have to be considered.

We're using strerror_r in exactly one place and my proposal is to just return a fixed string if we hit that on platforms where GNU strerror_r is not available.

Ulf

  parent reply	other threads:[~2017-02-23  9:39 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-22 12:50 Ulf Hermann
2017-02-22 14:40 ` Mike Frysinger
2017-02-22 16:01   ` Ulf Hermann
2017-02-22 16:32     ` Mike Frysinger
2017-02-22 16:45       ` Ulf Hermann
2017-02-22 17:04         ` Mike Frysinger
2017-02-22 17:43           ` Ulf Hermann
2017-02-22 18:57             ` Mike Frysinger
2017-02-23  7:27               ` John Ogness
2017-02-23  9:39               ` Ulf Hermann [this message]
2017-02-23 18:51                 ` Mike Frysinger
2017-02-24  9:42                   ` Ulf Hermann
2017-02-24 19:15                     ` Mike Frysinger
2017-02-23 10:18           ` Ulf Hermann
2017-02-23 11:04             ` Mark Wielaard
2017-02-22 16:38     ` Mark Wielaard
2017-02-23 10:46 ` Ulf Hermann

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=8bc5640c-cb84-bda2-50be-f7b1bb7c35de@qt.io \
    --to=ulf.hermann@qt.io \
    --cc=elfutils-devel@sourceware.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).