diff options
author | unknown <msvensson@neptunus.(none)> | 2006-11-23 17:23:29 +0100 |
---|---|---|
committer | unknown <msvensson@neptunus.(none)> | 2006-11-23 17:23:29 +0100 |
commit | 026355d34a27d398ce1d7049b492f41bff361865 (patch) | |
tree | 05fb90d75d7fa858a23feb048c7340bcd4db8816 /include/my_sys.h | |
parent | df333b1ffe189b1338203abf08e6004b86e058d1 (diff) | |
download | mariadb-git-026355d34a27d398ce1d7049b492f41bff361865.tar.gz |
Rework my_getpagesize function
- Put 'my_getpagesize' in it's own .c file
- Map the call 'my_getpagesize' directly to 'getpagesize' if it exists
- Add default implementation for 'my_getpagesize' to be used if no platform
specfic function exists
include/my_sys.h:
Break out the defines for my_getpagesize from HAVE_SYS_MMAN_H as they don't depend on that.
There is a check for the function in configure which defines HAVE_GETPAGESIZE if the function
exists
mysys/CMakeLists.txt:
Add new fil my_getpagesize.c
mysys/Makefile.am:
Add new fil my_getpagesize.c
mysys/my_mmap.c:
Remove my_getpagesize from my_mmap.c as it's now implemented in my_getpagesize.c
mysys/my_getpagesize.c:
New BitKeeper file ``mysys/my_getpagesize.c''
Diffstat (limited to 'include/my_sys.h')
-rw-r--r-- | include/my_sys.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/include/my_sys.h b/include/my_sys.h index ebb518314b2..d19091a85e8 100644 --- a/include/my_sys.h +++ b/include/my_sys.h @@ -842,12 +842,6 @@ my_bool my_gethwaddr(uchar *to); #endif #define my_mmap(a,b,c,d,e,f) mmap(a,b,c,d,e,f) -#ifdef HAVE_GETPAGESIZE -#define my_getpagesize() getpagesize() -#else -/* qnx ? */ -#define my_getpagesize() 8192 -#endif #define my_munmap(a,b) munmap((a),(b)) #else @@ -863,11 +857,17 @@ my_bool my_gethwaddr(uchar *to); #define HAVE_MMAP #endif -int my_getpagesize(void); void *my_mmap(void *, size_t, int, int, int, my_off_t); int my_munmap(void *, size_t); #endif +/* my_getpagesize */ +#ifdef HAVE_GETPAGESIZE +#define my_getpagesize() getpagesize() +#else +int my_getpagesize(void); +#endif + int my_msync(int, void *, size_t, int); /* character sets */ |