tags 557632 + patch forwarded 557632 bug-autoc...@gnu.org thanks On Mon, Nov 23, 2009 at 01:27:43PM +0100, Michal Čihař wrote: > Package: autoconf > Version: 2.65-1 > Severity: serious > File: /usr/share/autoconf/autoconf/functions.m4
> the mmap test currently present in autoconf fails to compile: > > conftest.cpp:154: warning: deprecated conversion from string constant to > 'char*' > conftest.cpp:157: error: invalid conversion from 'void*' to 'char*' This is a regression introduced recently upstream in commit 19629fa9. Attached is a trivial patch.
>From 75c25892e136b43862fc7028c12d50f592a3cf41 Mon Sep 17 00:00:00 2001 From: Yavor Doganov <ya...@gnu.org> Date: Tue, 24 Nov 2009 12:18:20 +0200 Subject: [PATCH] Fix AC_FUNC_MMAP regression from 2009-11-09. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * lib/autoconf/functions.m4 (AC_FUNC_MMAP): Add a cast to char * to make the test work for C++ compilers. * THANKS: Update. Reported by Michal Čihař. --- ChangeLog | 8 ++++++++ THANKS | 1 + lib/autoconf/functions.m4 | 3 ++- 3 files changed, 11 insertions(+), 1 deletions(-) diff --git a/ChangeLog b/ChangeLog index aeacaa4..5b05ed3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2009-11-24 Yavor Doganov <ya...@gnu.org> (tiny change) + + Fix AC_FUNC_MMAP regression from 2009-11-09. + * lib/autoconf/functions.m4 (AC_FUNC_MMAP): Add a cast to char * + to make the test work for C++ compilers. + * THANKS: Update. + Reported by Michal Čihař. + 2009-11-22 Bruno Haible <br...@clisp.org> Fix failure of test 35 when the user has a .autom4te.cfg file. diff --git a/THANKS b/THANKS index b288163..d93ed4c 100644 --- a/THANKS +++ b/THANKS @@ -255,6 +255,7 @@ Michael Jenning ? Michael Matz m...@kde.org Michael Schoene m...@mlc.de Michael Wardle ? +Michal Čihař ni...@debian.org Mike Frysinger vap...@gentoo.org Mike Hopkirk h...@sco.com Mike Stump m...@wrs.com diff --git a/lib/autoconf/functions.m4 b/lib/autoconf/functions.m4 index 6b6e7fc..9a79479 100644 --- a/lib/autoconf/functions.m4 +++ b/lib/autoconf/functions.m4 @@ -1285,7 +1285,8 @@ main () data2 = ""; if (write (fd2, data2, 1) != 1) return 5; - data2 = mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); + data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, + fd2, 0L); if (data2 == MAP_FAILED) return 6; for (i = 0; i < pagesize; ++i) -- 1.6.5