summaryrefslogtreecommitdiff
path: root/include
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 /include
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 'include')
-rw-r--r--include/my_global.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/my_global.h b/include/my_global.h
index be6e667057d..f3d42106458 100644
--- a/include/my_global.h
+++ b/include/my_global.h
@@ -310,6 +310,10 @@ C_MODE_END
#undef setrlimit
#define setrlimit cma_setrlimit64
#endif
+/* Declare madvise where it is not declared for C++, like Solaris */
+#if HAVE_MADVISE && !HAVE_DECL_MADVISE && defined(__cplusplus)
+extern "C" int madvise(void *addr, size_t len, int behav);
+#endif
#ifdef __QNXNTO__
/* This has to be after include limits.h */