This is the mail archive of the
elfutils-devel@sourceware.org
mailing list for the elfutils project.
Re: [PATCH v2] Do not depend on some non-POSIX features.
- From: Mark Wielaard <mjw at redhat dot com>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Thu, 13 Oct 2016 11:31:35 +0200
- Subject: Re: [PATCH v2] Do not depend on some non-POSIX features.
On Thu, 2016-10-13 at 09:16 +0900, Akihiko Odaki wrote:
> Define/open code memrchr, rawmemchr, powerof2 and TEMP_FAILURE_RETRY if
> not available through system headers.
>
> Signed-off-by: Akihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp>
> Signed-off-by: Mark Wielaard <mjw@redhat.com>
> ---
> ChangeLog | 4 ++++
> configure.ac | 3 +++
> lib/ChangeLog | 7 +++++++
> lib/fixedsizehash.h | 6 ++++++
> lib/system.h | 16 ++++++++++++++++
> libelf/ChangeLog | 8 ++++++++
> libelf/elf_getarsym.c | 8 ++++++++
> libelf/elf_strptr.c | 30 ++++++++++++++++++++++--------
> 8 files changed, 74 insertions(+), 8 deletions(-)
>
> diff --git a/ChangeLog b/ChangeLog
> index 07e8f57..8d61572 100644
> --- a/ChangeLog
> +++ b/ChangeLog
> @@ -1,3 +1,7 @@
> +2015-10-11 Akihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp>
> +
> + * configure.ac: Add memrchr, rawmemchr and powerof2 checks.
> +
> 2016-08-04 Mark Wielaard <mjw@redhat.com>
>
> * configure.ac: Set version to 0.167.
> diff --git a/configure.ac b/configure.ac
> index e5503f1..feb2ed5 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -245,6 +245,9 @@ zip_LIBS="$LIBS"
> LIBS="$save_LIBS"
> AC_SUBST([zip_LIBS])
>
> +AC_CHECK_DECLS([memrchr rawmemchr])
> +AC_CHECK_DECLS(powerof2, , , [#include <sys/param.h>])
As I said in another email, the memrchr and rawmemchr check doesn't
work. It should be something like:
AC_CHECK_DECLS([memrchr, rawmemchr],[],[],
[#define _GNU_SOURCE
#include <string.h>])
The rest of the patch looks fine though. So I have pushed it with the
above fix.
Cheers,
Mark