summaryrefslogtreecommitdiff
path: root/sql/sql_map.cc
diff options
context:
space:
mode:
authorunknown <reggie@mdk10.(none)>2005-02-23 16:29:03 -0600
committerunknown <reggie@mdk10.(none)>2005-02-23 16:29:03 -0600
commit52bba384fc034ccc68dbf717f6950049d61eb6bf (patch)
treeab1e727b792d995de827c133c1300251cd725c03 /sql/sql_map.cc
parent47ed1db7465f611603f899773aad6a7d1cd1f925 (diff)
downloadmariadb-git-52bba384fc034ccc68dbf717f6950049d61eb6bf.tar.gz
Changes to allow 5.0.3 to compile on Windows after XA was pushed
logging_ok: Logging to logging@openlogging.org accepted mi_packrec.c: Using HAVE_SYS_MMAN_H to protect include of sys/mman.h and replaced calls to mmap and munmap with my_mmap and my_munmap mi_extra.c: Now using HAVE_SYS_MMAN_H to protect include of sys/mman.h my_mmap.c: Changed how no mmap message is printed for Windows sql_map.cc: Changed HAVE_MMAP to HAVE_SYS_MMAN_H and replaced calls to mmap and munmap with my_mmap and my_munmap sql/sql_map.cc: Changed HAVE_MMAP to HAVE_SYS_MMAN_H and replaced calls to mmap and munmap with my_mmap and my_munmap mysys/my_mmap.c: Changed how no mmap message is printed for Windows myisam/mi_extra.c: Now using HAVE_SYS_MMAN_H to protect include of sys/mman.h myisam/mi_packrec.c: Using HAVE_SYS_MMAN_H to protect include of sys/mman.h and replaced calls to mmap and munmap with my_mmap and my_munmap BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted
Diffstat (limited to 'sql/sql_map.cc')
-rw-r--r--sql/sql_map.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/sql/sql_map.cc b/sql/sql_map.cc
index 687e60b7c72..1b874a4fd88 100644
--- a/sql/sql_map.cc
+++ b/sql/sql_map.cc
@@ -20,7 +20,7 @@
#endif
#include "mysql_priv.h"
-#ifdef HAVE_MMAP
+#ifdef HAVE_SYS_MMAN_H
#include <sys/mman.h>
#include <sys/stat.h>
#endif
@@ -42,7 +42,7 @@ mapped_files::mapped_files(const my_string filename,byte *magic,uint magic_lengt
struct stat stat_buf;
if (!fstat(file,&stat_buf))
{
- if (!(map=(byte*) mmap(0,(size=(ulong) stat_buf.st_size),PROT_READ,
+ if (!(map=(byte*) my_mmap(0,(size=(ulong) stat_buf.st_size),PROT_READ,
MAP_SHARED | MAP_NORESERVE,file,
0L)))
{
@@ -53,7 +53,7 @@ mapped_files::mapped_files(const my_string filename,byte *magic,uint magic_lengt
if (map && memcmp(map,magic,magic_length))
{
my_error(ER_WRONG_MAGIC, MYF(0), name);
- VOID(munmap(map,size));
+ VOID(my_munmap(map,size));
map=0;
}
if (!map)
@@ -71,7 +71,7 @@ mapped_files::~mapped_files()
#ifdef HAVE_MMAP
if (file >= 0)
{
- VOID(munmap((caddr_t) map,size));
+ VOID(my_munmap((caddr_t) map,size));
VOID(my_close(file,MYF(0)));
file= -1; map=0;
}