~ubuntu-branches/ubuntu/maverick/clamav/maverick-backports

« back to all changes in this revision

Viewing changes to libclamav/c++/llvm/autoconf/m4/header_mmap_anonymous.m4

  • Committer: Bazaar Package Importer
  • Author(s): Stephen Gran, Stephen Gran, Michael Tautschnig
  • Date: 2010-04-26 21:41:18 UTC
  • mfrom: (2.1.6 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100426214118-i6lo606wnh7ywfj6
Tags: 0.96+dfsg-4
[ Stephen Gran ]
* Fixed typo in clamav-milter's postinst

[ Michael Tautschnig ]
* Fixed typo in clamav-freshclam's postinst (closes: #579271)
* Debconf translation updates
  - Portuguese (closes: #579068)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
# Check for anonymous mmap macros.  This is modified from
 
3
# http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_have_ext_slist.html
 
4
#
 
5
AC_DEFUN([AC_HEADER_MMAP_ANONYMOUS],
 
6
[AC_CACHE_CHECK(for MAP_ANONYMOUS vs. MAP_ANON,
 
7
ac_cv_header_mmap_anon,
 
8
[ AC_LANG_PUSH([C])
 
9
  AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
 
10
    [[#include <sys/mman.h>
 
11
#include <unistd.h>
 
12
#include <fcntl.h>]],
 
13
  [[mmap (0, 1, PROT_READ, MAP_ANONYMOUS, -1, 0); return (0);]])],
 
14
  ac_cv_header_mmap_anon=yes, 
 
15
  ac_cv_header_mmap_anon=no)
 
16
  AC_LANG_POP([C])
 
17
])
 
18
if test "$ac_cv_header_mmap_anon" = yes; then
 
19
   AC_DEFINE([HAVE_MMAP_ANONYMOUS],[1],[Define if mmap() uses MAP_ANONYMOUS to map anonymous pages, or undefine if it uses MAP_ANON])
 
20
fi
 
21
])