diff options
author | unknown <msvensson@neptunus.(none)> | 2006-11-27 10:48:41 +0100 |
---|---|---|
committer | unknown <msvensson@neptunus.(none)> | 2006-11-27 10:48:41 +0100 |
commit | 277d5db58f03f8489598da3f8d4e1e1fd224e6a3 (patch) | |
tree | 292ef18ec2fc77c56bf281449e3b6b4060929dff /mysys | |
parent | 07da228592ffd33e2d39e6c935e6babeeef95b25 (diff) | |
parent | c4bdfc7bb02c3ae6ab4fa2609858e2a31186ce07 (diff) | |
download | mariadb-git-277d5db58f03f8489598da3f8d4e1e1fd224e6a3.tar.gz |
Merge neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
into neptunus.(none):/home/msvensson/mysql/mysql-5.1-new-maint
BitKeeper/deleted/.del-CMakeLists.txt~14:
Auto merged
BitKeeper/deleted/.del-CMakeLists.txt~7:
Auto merged
client/mysql_upgrade.c:
Auto merged
mysql-test/Makefile.am:
Auto merged
mysql-test/mysql-test-run-shell.sh:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/func_time.result:
Auto merged
mysql-test/t/func_time.test:
Auto merged
mysys/Makefile.am:
Auto merged
mysys/my_mmap.c:
Auto merged
sql-common/my_time.c:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/udf_example.c:
Auto merged
support-files/mysql.spec.sh:
Use local
client/Makefile.am:
Manual merge
include/my_sys.h:
Manual merge
Diffstat (limited to 'mysys')
-rw-r--r-- | mysys/Makefile.am | 2 | ||||
-rw-r--r-- | mysys/my_getpagesize.c | 41 | ||||
-rw-r--r-- | mysys/my_mmap.c | 7 |
3 files changed, 42 insertions, 8 deletions
diff --git a/mysys/Makefile.am b/mysys/Makefile.am index 79d79d41c34..c4ec150bfcc 100644 --- a/mysys/Makefile.am +++ b/mysys/Makefile.am @@ -25,7 +25,7 @@ noinst_HEADERS = mysys_priv.h my_static.h libmysys_a_SOURCES = my_init.c my_getwd.c mf_getdate.c my_mmap.c \ mf_path.c mf_loadpath.c my_file.c \ my_open.c my_create.c my_dup.c my_seek.c my_read.c \ - my_pread.c my_write.c \ + my_pread.c my_write.c my_getpagesize.c \ mf_keycache.c mf_keycaches.c my_crc32.c \ mf_iocache.c mf_iocache2.c mf_cache.c mf_tempfile.c \ mf_tempdir.c my_lock.c mf_brkhant.c my_alarm.c \ diff --git a/mysys/my_getpagesize.c b/mysys/my_getpagesize.c new file mode 100644 index 00000000000..ac4bd775ba9 --- /dev/null +++ b/mysys/my_getpagesize.c @@ -0,0 +1,41 @@ +/* Copyright (C) 2000-2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#include "mysys_priv.h" + +#ifndef HAVE_GETPAGESIZE + +#if defined __WIN__ + +int my_getpagesize(void) +{ + SYSTEM_INFO si; + GetSystemInfo(&si); + return si.dwPageSize; +} + +#else + +/* Default implementation */ +int my_getpagesize(void) +{ + return (int)8192; +} + +#endif + +#endif + diff --git a/mysys/my_mmap.c b/mysys/my_mmap.c index 19d9541a967..79030c0a695 100644 --- a/mysys/my_mmap.c +++ b/mysys/my_mmap.c @@ -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) { |