summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorunknown <jimw@mysql.com>2005-08-31 10:08:55 -0700
committerunknown <jimw@mysql.com>2005-08-31 10:08:55 -0700
commitb34af8cde47ec0168b5878988b791cbc69dc65b4 (patch)
treec1f9152e88243517c07aabc96a903ee85dc2a24c /configure.in
parent7b8ab0e1cff25108f3b044189db879fd39073290 (diff)
downloadmariadb-git-b34af8cde47ec0168b5878988b791cbc69dc65b4.tar.gz
Add test for madvise() being declared in C++ code, because it is not
on Solaris even though it is available, and declare it ourselves in that case. (Bug #7156) configure.in: Add test for madvise() being declared when C++ compiler is used. include/my_global.h: Handle madvise() being available but not declared in C++ isam/extra.c: Fix typo in define test myisam/mi_extra.c: Fix typo in define test sql/examples/ha_tina.cc: Test that we have madvise() before trying to call it.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in7
1 files changed, 7 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index 1d6df1dd55e..f3840e6f1a8 100644
--- a/configure.in
+++ b/configure.in
@@ -2043,6 +2043,13 @@ AC_CACHE_CHECK([style of gethost* routines], mysql_cv_gethost_style,
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
+# Test whether madvise() is declared in C++ code -- it is not on some
+# systems, such as Solaris
+AC_CHECK_DECLS(madvise, [], [], [#if HAVE_SYS_MMAN_H
+#include <sys/types.h>
+#include <sys/mman.h>
+#endif])
+
# Do not treat warnings as errors if we are linking against other libc
# this is to work around gcc not being permissive on non-system includes
# with respect to ANSI C++