mirror of
https://github.com/MariaDB/server.git
synced 2026-05-06 23:25:34 +02:00
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''
This commit is contained in:
parent
df333b1ffe
commit
026355d34a
5 changed files with 51 additions and 16 deletions
|
|
@ -33,13 +33,6 @@ int my_msync(int fd, void *addr, size_t len, int flags)
|
|||
static SECURITY_ATTRIBUTES mmap_security_attributes=
|
||||
{sizeof(SECURITY_ATTRIBUTES), 0, TRUE};
|
||||
|
||||
int my_getpagesize(void)
|
||||
{
|
||||
SYSTEM_INFO si;
|
||||
GetSystemInfo(&si);
|
||||
return si.dwPageSize;
|
||||
}
|
||||
|
||||
void *my_mmap(void *addr, size_t len, int prot,
|
||||
int flags, int fd, my_off_t offset)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue