Ticket #23380: 0001-Fix-AC_FUNC_MMAP-regression-with-C-compiler-in-2.65.patch

File 0001-Fix-AC_FUNC_MMAP-regression-with-C-compiler-in-2.65.patch, 2.8 KB (added by neil_mayhew@…, 14 years ago)

[PATCH 1/2] Fix AC_FUNC_MMAP regression with C++ compiler in 2.65.

  • ChangeLog

    From a6bf8d5c754dcde068dedd2e826ae95af50c197e Mon Sep 17 00:00:00 2001
    From: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
    Date: Tue, 24 Nov 2009 11:36:53 +0100
    Subject: [PATCH 1/2] Fix AC_FUNC_MMAP regression with C++ compiler in 2.65.
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    
    * lib/autoconf/functions.m4 (AC_FUNC_MMAP): Use const char*
    for the constant string.  Cast void* to char* for assignment.
    * NEWS, THANKS: Update.
    Report by Michal Čihař.
    
    Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
    ---
     ChangeLog                 |    8 ++++++++
     NEWS                      |    2 ++
     THANKS                    |    1 +
     lib/autoconf/functions.m4 |    7 ++++---
     4 files changed, 15 insertions(+), 3 deletions(-)
    
    diff --git ChangeLog ChangeLog
    index d8d0f9b..521ef79 100644
     
     12009-11-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
     2
     3        Fix AC_FUNC_MMAP regression with C++ compiler in 2.65.
     4        * lib/autoconf/functions.m4 (AC_FUNC_MMAP): Use const char*
     5        for the constant string.  Cast void* to char* for assignment.
     6        * NEWS, THANKS: Update.
     7        Report by Michal Čihař.
     8
    192009-11-21  Eric Blake  <ebb9@byu.net>
    210
    311        Release Version 2.65.
  • NEWS

    diff --git NEWS NEWS
    index b72eb17..d05b78c 100644
     
    11GNU Autoconf NEWS - User visible changes.
    22
     3** AC_FUNC_MMAP works in C++ mode again.  Regression introduced in 2.65.
     4
    35* Major changes in Autoconf 2.65 (2009-11-21) [stable]
    46  Released by Eric Blake, based on git versions 2.64.*.
    57
  • THANKS

    diff --git THANKS THANKS
    index b288163..fdd6930 100644
    Matthew D. Langston langston@SLAC.Stanford.EDU 
    250250Matthew Mueller             donut@azstarnet.com
    251251Matthew Woehlke             mw_triad@users.sourceforge.net
    252252Matthias Andree             matthias.andree@gmx.de
     253Michal Čihař                nijel@debian.org
    253254Michael Elizabeth Chastain  chastain@cygnus.com
    254255Michael Jenning             ?
    255256Michael Matz                matz@kde.org
  • lib/autoconf/functions.m4

    diff --git lib/autoconf/functions.m4 lib/autoconf/functions.m4
    index 6b6e7fc..14a8cb9 100644
    int 
    12581258main ()
    12591259{
    12601260  char *data, *data2, *data3;
     1261  const char *cdata2;
    12611262  int i, pagesize;
    12621263  int fd, fd2;
    12631264
    main () 
    12821283  fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
    12831284  if (fd2 < 0)
    12841285    return 4;
    1285   data2 = "";
    1286   if (write (fd2, data2, 1) != 1)
     1286  cdata2 = "";
     1287  if (write (fd2, cdata2, 1) != 1)
    12871288    return 5;
    1288   data2 = mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
     1289  data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
    12891290  if (data2 == MAP_FAILED)
    12901291    return 6;
    12911292  for (i = 0; i < pagesize; ++i)