bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gnulib] mmap-anon.m4 problem


From: Bruno Haible
Subject: Re: [bug-gnulib] mmap-anon.m4 problem
Date: Mon, 7 Mar 2005 18:22:52 +0100
User-agent: KMail/1.5

Mark D. Baushke wrote:

> The problem is that on a FreeBSD 4.2-RELEASE system this will lead to
> a warning when compiling pagealign_alloc.c
>
> In file included from pagealign_alloc.c:40:
> /usr/include/sys/mman.h:100: warning: `MAP_FILE' redefined
> ../config.h:767: warning: this is the location of the previous definition
>
> because config.h is included before the <sys/mman.h> file the macros are
> always defined by the AH_VERBATIM code.

Thanks for the report; this should fix it.

Bruno


diff -c -3 -r1.3 mmap-anon.m4
*** m4/mmap-anon.m4     3 Mar 2005 20:33:06 -0000       1.3
--- m4/mmap-anon.m4     7 Mar 2005 17:28:38 -0000
***************
*** 1,4 ****
! # mmap-anon.m4 serial 1
  dnl Copyright (C) 2005 Free Software Foundation, Inc.
  dnl This file is free software; the Free Software Foundation
  dnl gives unlimited permission to copy and/or distribute it,
--- 1,4 ----
! # mmap-anon.m4 serial 2
  dnl Copyright (C) 2005 Free Software Foundation, Inc.
  dnl This file is free software; the Free Software Foundation
  dnl gives unlimited permission to copy and/or distribute it,
***************
*** 44,59 ****
          [Define to 1 if mmap()'s MAP_ANONYMOUS flag is available after 
including
           config.h and <sys/mman.h>.])
      fi
- 
-     AH_VERBATIM([MAP_FILE],
- [/* Define MAP_FILE when it isn't otherwise.  */
- #ifndef MAP_FILE
- # define MAP_FILE 0
- #endif
- 
- /* Define MAP_FAILED for old systems which neglect to.  */
- #ifndef MAP_FAILED
- # define MAP_FAILED ((void *)-1)
- #endif])
    fi
  ])
--- 44,48 ----
diff -c -3 -r1.5 pagealign_alloc.c
*** lib/pagealign_alloc.c       4 Mar 2005 12:28:13 -0000       1.5
--- lib/pagealign_alloc.c       7 Mar 2005 17:28:38 -0000
***************
*** 48,53 ****
--- 48,64 ----
  
  #define _(str) gettext (str)
  
+ #if HAVE_MMAP
+ /* Define MAP_FILE when it isn't otherwise.  */
+ # ifndef MAP_FILE
+ #  define MAP_FILE 0
+ # endif
+ /* Define MAP_FAILED for old systems which neglect to.  */
+ # ifndef MAP_FAILED
+ #  define MAP_FAILED ((void *)-1)
+ # endif
+ #endif
+ 
  
  #if HAVE_MMAP || ! HAVE_POSIX_MEMALIGN
  





reply via email to

[Prev in Thread] Current Thread [Next in Thread]