diff options
author | Zack Weinberg <zackw@panix.com> | 2020-10-09 09:02:47 -0400 |
---|---|---|
committer | Zack Weinberg <zackw@panix.com> | 2020-10-10 11:23:09 -0400 |
commit | 326c9a547423d25c621bc5c0ef76edbf6eda8c92 (patch) | |
tree | d98731fcaf9ca5a5fecb7e3c77d487c607a84d82 /NEWS | |
parent | 09346f1a776b1bba3634f2d3ccf30460fc372d44 (diff) | |
download | autoconf-326c9a547423d25c621bc5c0ef76edbf6eda8c92.tar.gz |
Fix regressions when using the C++ compiler to perform tests.
The Debian project has done an archive rebuild using autoconf 2.69c,
which found several serious regressions from 2.69 where test programs
used to be accepted by a C++ compiler, but are now rejected. Part of
the problem is that newer C++ compilers are more likely to reject
“traditional” sloppy C, but part of it is that bug fixes since 2.69
did not consider the possibility of test macros being used with
AC_LANG([C++]) in effect.
I’m still working on test suite improvements that will catch these
regressions in the future, but I don’t see any reason to delay the
actual bugfixes. (I’ve gotten far enough on the test suite changes
that I know they _will_ catch the bugs.)
* NEWS: Document that AC_FUNC_STRERROR_R no longer tries to detect a
strerror_r that exists in the C library but isn’t declared by string.h.
* lib/autoconf/c.m4
(AC_LANG_CALL(C++)): New macro. Use a more robust technique for
avoiding a type conflict with any intrinsic prototype.
(AC_LANG_CALL(C)): Remove #ifdef __cplusplus, this macro is no longer
used to generate C++ code.
* lib/autoconf/functions.m4
(AC_FUNC_CLOSEDIR_VOID): Rely on <dirent.h> to declare closedir.
Simplify test program. Use AC_COMPILE_IFELSE, not AC_RUN_IFELSE.
(_AC_FUNC_MALLOC_IF, _AC_FUNC_REALLOC_IF): Use void *, not char *,
for variable holding a value returned by malloc/realloc respectively.
(AC_FUNC_STRERROR_R): Don’t AC_CHECK_FUNCS_ONCE strerror_r.
AC_DEFINE HAVE_STRERROR_R if and only if we are also going to define
HAVE_DECL_STRERROR_R. Remove AC_RUN_IFELSE fallback when strerror_r
is not declared.
* lib/autoconf/headers.m4 (AC_USG): Use "", not 0, for the first
argument to rindex.
Diffstat (limited to 'NEWS')
-rw-r--r-- | NEWS | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -124,6 +124,16 @@ GNU Autoconf NEWS - User visible changes. support for Solaris 2.4. Most programs will want to avoid ‘vfork’ on this OS because of this bug. +*** AC_FUNC_STRERROR_R assumes strerror_r is unavailable if it’s not declared. + + The fallback technique it used to probe strerror_r’s return type + when the function was present in the C library, but not declared by + <string.h>, was fragile and did not work at all when cross-compiling. + The systems where this fallback was necessary were all obsolete. + + Programs that use AC_FUNC_STRERROR_R should make sure to test the + preprocessor macro HAVE_DECL_STRERROR_R before using strerror_r at all. + ** New features *** Configure scripts now support a ‘--runstatedir’ option. |