diff options
author | unknown <vtkachenko@quadxeon.mysql.com> | 2005-12-19 14:16:21 +0100 |
---|---|---|
committer | unknown <vtkachenko@quadxeon.mysql.com> | 2005-12-19 14:16:21 +0100 |
commit | ec7a7ac27832c3f4a81d863b03f1ce48b9607e8d (patch) | |
tree | 6788f9806a8c72dd93f39cf381f259bd4c67fc78 | |
parent | 32279956f629edc53ba5ab59af18ba9f0caa8bfc (diff) | |
download | mariadb-git-ec7a7ac27832c3f4a81d863b03f1ce48b9607e8d.tar.gz |
Bug fix for bug #15843 "Added mmap support in myisam creates compile problem
on AIX 5.2"
Added dummy definition of MAP_NORESERVE for systems which doesn't provide it,
removed duplicates
my_sys.h:
added definition for MAP_NORESERVE
(for Irix and AIX systems)
sql_map.cc:
removed definition of MAP_NORESERVE
mi_packrec.c:
removed definition of MAP_NORESERVE and MMAP_PRIVATE
storage/myisam/mi_packrec.c:
removed definition of MAP_NORESERVE and MMAP_PRIVATE
sql/sql_map.cc:
removed definition of MAP_NORESERVE
include/my_sys.h:
added definition for MAP_NORESERVE
(for Irix and AIX systems)
-rw-r--r-- | include/my_sys.h | 3 | ||||
-rw-r--r-- | sql/sql_map.cc | 4 | ||||
-rw-r--r-- | storage/myisam/mi_packrec.c | 7 |
3 files changed, 3 insertions, 11 deletions
diff --git a/include/my_sys.h b/include/my_sys.h index cda308f222a..909aa942968 100644 --- a/include/my_sys.h +++ b/include/my_sys.h @@ -820,6 +820,9 @@ my_bool my_gethwaddr(uchar *to); #ifndef MAP_NOSYNC #define MAP_NOSYNC 0 #endif +#ifndef MAP_NORESERVE +#define MAP_NORESERVE 0 /* For irix and AIX */ +#endif #ifdef HAVE_MMAP64 #define my_mmap(a,b,c,d,e,f) mmap64(a,b,c,d,e,f) diff --git a/sql/sql_map.cc b/sql/sql_map.cc index 56b4b765355..8376b3bbfcc 100644 --- a/sql/sql_map.cc +++ b/sql/sql_map.cc @@ -25,10 +25,6 @@ #include <sys/mman.h> #endif -#ifndef MAP_NORESERVE -#define MAP_NORESERVE 0 // For IRIX -#endif - mapped_files::mapped_files(const my_string filename,byte *magic,uint magic_length) { #ifdef HAVE_MMAP diff --git a/storage/myisam/mi_packrec.c b/storage/myisam/mi_packrec.c index 6a1fca9ede9..aa6ea016070 100644 --- a/storage/myisam/mi_packrec.c +++ b/storage/myisam/mi_packrec.c @@ -1176,13 +1176,6 @@ static uint max_bit(register uint value) static int _mi_read_mempack_record(MI_INFO *info,my_off_t filepos,byte *buf); static int _mi_read_rnd_mempack_record(MI_INFO*, byte *,my_off_t, my_bool); -#ifndef MAP_NORESERVE -#define MAP_NORESERVE 0 /* For irix */ -#endif -#ifndef MAP_FAILED -#define MAP_FAILED -1 -#endif - my_bool _mi_memmap_file(MI_INFO *info) { byte *file_map; |