This commit was manufactured by cvs2svn to create branch 'captive'.
[reactos.git] / lib / freetype / builds / unix / ft-munmap.m4
1 ## FreeType specific autoconf tests
2
3 # serial 1 FT_MUNMAP_DECL
4
5 AC_DEFUN(FT_MUNMAP_DECL,
6 [AC_MSG_CHECKING([whether munmap must be declared])
7 AC_CACHE_VAL(ft_cv_munmap_decl,
8 [AC_TRY_COMPILE([
9 #ifdef HAVE_UNISTD_H
10 #include <unistd.h>
11 #endif
12 #include <sys/mman.h>],
13 [char *(*pfn) = (char *(*))munmap],
14 ft_cv_munmap_decl=no,
15 ft_cv_munmap_decl=yes)])
16 AC_MSG_RESULT($ft_cv_munmap_decl)
17 if test $ft_cv_munmap_decl = yes; then
18   AC_DEFINE(NEED_MUNMAP_DECL,,
19   [Define to 1 if munmap() is not defined in <sys/mman.h>])
20 fi])
21
22 AC_DEFUN(FT_MUNMAP_PARAM,
23 [AC_MSG_CHECKING([for munmap's first parameter type])
24 AC_TRY_COMPILE([
25 #include <unistd.h>
26 #include <sys/mman.h>
27 int munmap(void *, size_t);],,
28   AC_MSG_RESULT([void *]);AC_DEFINE(MUNMAP_USES_VOIDP,,
29     [Define to 1 if the first argument of munmap is of type void *]),
30   AC_MSG_RESULT([char *]))
31 ])