Below is the list of changes that have just been committed into a local
5.0 repository of msvensson. When msvensson does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2006-11-23 17:23:29+01:00, msvensson@neptunus.(none) +5 -0
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@stripped, 2006-11-23 17:23:27+01:00, msvensson@neptunus.(none) +7 -7
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@stripped, 2006-11-23 17:23:27+01:00, msvensson@neptunus.(none) +2 -1
Add new fil my_getpagesize.c
mysys/Makefile.am@stripped, 2006-11-23 17:23:27+01:00, msvensson@neptunus.(none) +1 -1
Add new fil my_getpagesize.c
mysys/my_getpagesize.c@stripped, 2006-11-23 17:23:27+01:00, msvensson@neptunus.(none) +41 -0
New BitKeeper file ``mysys/my_getpagesize.c''
mysys/my_getpagesize.c@stripped, 2006-11-23 17:23:27+01:00, msvensson@neptunus.(none) +0 -0
mysys/my_mmap.c@stripped, 2006-11-23 17:23:27+01:00, msvensson@neptunus.(none) +0 -7
Remove my_getpagesize from my_mmap.c as it's now implemented in my_getpagesize.c
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: msvensson
# Host: neptunus.(none)
# Root: /home/msvensson/mysql/mysql-5.0-maint
--- 1.188/include/my_sys.h 2006-11-23 17:23:35 +01:00
+++ 1.189/include/my_sys.h 2006-11-23 17:23:35 +01:00
@@ -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,9 +857,15 @@ 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);
--- 1.71/mysys/Makefile.am 2006-11-23 17:23:35 +01:00
+++ 1.72/mysys/Makefile.am 2006-11-23 17:23:35 +01:00
@@ -29,7 +29,7 @@ noinst_HEADERS = mysys_priv.h my_static.
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 \
--- 1.1/mysys/CMakeLists.txt 2006-11-23 17:23:35 +01:00
+++ 1.2/mysys/CMakeLists.txt 2006-11-23 17:23:35 +01:00
@@ -26,4 +26,5 @@ ADD_LIBRARY(mysys array.c charset-def.c
my_static.c my_symlink.c my_symlink2.c my_sync.c my_thr_init.c my_wincond.c
my_windac.c my_winsem.c my_winthread.c my_write.c ptr_cmp.c queues.c
rijndael.c safemalloc.c sha1.c string.c thr_alarm.c thr_lock.c thr_mutex.c
- thr_rwlock.c tree.c typelib.c base64.c my_memmem.c)
+ thr_rwlock.c tree.c typelib.c base64.c my_memmem.c
+ my_getpagesize.c)
--- New file ---
+++ mysys/my_getpagesize.c 06/11/23 17:23:27
/* 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
--- 1.8/mysys/my_mmap.c 2006-11-23 17:23:35 +01:00
+++ 1.9/mysys/my_mmap.c 2006-11-23 17:23:35 +01:00
@@ -33,13 +33,6 @@ int my_msync(int fd, void *addr, size_t
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)
{
| Thread |
|---|
| • bk commit into 5.0 tree (msvensson:1.2332) | msvensson | 23 Nov |