diff options
author | unknown <jimw@mysql.com> | 2005-08-31 10:08:55 -0700 |
---|---|---|
committer | unknown <jimw@mysql.com> | 2005-08-31 10:08:55 -0700 |
commit | b34af8cde47ec0168b5878988b791cbc69dc65b4 (patch) | |
tree | c1f9152e88243517c07aabc96a903ee85dc2a24c /myisam | |
parent | 7b8ab0e1cff25108f3b044189db879fd39073290 (diff) | |
download | mariadb-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 'myisam')
-rw-r--r-- | myisam/mi_extra.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/myisam/mi_extra.c b/myisam/mi_extra.c index 4b011ca424f..1827aed98c3 100644 --- a/myisam/mi_extra.c +++ b/myisam/mi_extra.c @@ -62,7 +62,7 @@ int mi_extra(MI_INFO *info, enum ha_extra_function function, void *extra_arg) } if (share->base.blobs) mi_alloc_rec_buff(info, -1, &info->rec_buff); -#if defined(HAVE_MMAP) && defined(HAVE_MADVICE) +#if defined(HAVE_MMAP) && defined(HAVE_MADVISE) if (info->opt_flag & MEMMAP_USED) madvise(share->file_map,share->state.state.data_file_length,MADV_RANDOM); #endif @@ -93,7 +93,7 @@ int mi_extra(MI_INFO *info, enum ha_extra_function function, void *extra_arg) my_errno=EACCES; break; } -#if defined(HAVE_MMAP) && defined(HAVE_MADVICE) +#if defined(HAVE_MMAP) && defined(HAVE_MADVISE) if ((share->options & HA_OPTION_COMPRESS_RECORD)) { pthread_mutex_lock(&share->intern_lock); @@ -177,7 +177,7 @@ int mi_extra(MI_INFO *info, enum ha_extra_function function, void *extra_arg) error=end_io_cache(&info->rec_cache); /* Sergei will insert full text index caching here */ } -#if defined(HAVE_MMAP) && defined(HAVE_MADVICE) +#if defined(HAVE_MMAP) && defined(HAVE_MADVISE) if (info->opt_flag & MEMMAP_USED) madvise(share->file_map,share->state.state.data_file_length,MADV_RANDOM); #endif |