]> Savannah Git Hosting - gnulib.git/commit
strerror_r-posix: Fix override of AC_FUNC_STRERROR_R
authorEric Blake <eblake@redhat.com>
Fri, 4 Nov 2016 19:06:39 +0000 (14:06 -0500)
committerEric Blake <eblake@redhat.com>
Sat, 12 Nov 2016 20:50:11 +0000 (14:50 -0600)
commit5ddd9d713d58d6c6d10494a28ceee6988d20ff98
tree9bcede3c0c79b09f1328ec8401f0b570a9538641
parente7ddcc62797dafff0b66a2b2212b282aef6b7c52
strerror_r-posix: Fix override of AC_FUNC_STRERROR_R

Requiring autoconf's AC_FUNC_STRERROR_R and then calling AC_DEFINE
ourselves leads to two insertions of #define STRERROR_R_CHAR_P
in confdefs.h, but with different values (at least on glibc).  This
in turn sparks a gcc warning about redeclaring the macro, and kills
any subsequent tests that use -Werror (which now error because of
the conflicting define, whether or not the test used to error).

A better approach is to replace the autoconf macro with a version
of our own that doesn't probe anything, so that the AC_DEFINE is
reached exactly once.

* m4/strerror_r.m4 (AC_FUNC_STRERROR_R): New override.
(gl_FUNC_STRERROR_R): Don't reuse AC_DEFINE() with a potentially
different value.

Signed-off-by: Eric Blake <eblake@redhat.com>
ChangeLog
m4/strerror_r.m4