summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <kent@mysql.com>2005-11-06 02:19:51 +0100
committerunknown <kent@mysql.com>2005-11-06 02:19:51 +0100
commitdbfe5a961ff419d8b515532cb1008ede6f6c6d69 (patch)
tree110a87351fc10cd11592347379f00eb49b6325f5
parentefe3703aaca1736455541e8be8d832a6a2f65e40 (diff)
downloadmariadb-git-dbfe5a961ff419d8b515532cb1008ede6f6c6d69.tar.gz
Reapplied portability changes, from changesets by kent, joerg and msvensson
mysys/base64.c: Portability change for SCO/HP, compiler don't like doing pointer arithmetic on void* variable include/my_bitmap.h: "inline" functions (especially in header files) should be declared "static", or else we may get "multiply defined" when they are used in several modules. (Solaris compiler problem) sql/handler.h: Compatibility change for AIX compiler storage/bdb/Makefile.in: Added bdb "sequence" directory to "make dist" cmd-line-utils/readline/complete.c: Avoid FreeBSD 5.3 problems including <sys/file.h> mysql-test/t/disabled.def: Disable compress.test for now storage/bdb/build_unix/.IGNORE_ME: File that is copied to prevent empty directories in source TAR
-rw-r--r--cmd-line-utils/readline/complete.c3
-rw-r--r--include/my_bitmap.h8
-rw-r--r--mysql-test/t/disabled.def1
-rw-r--r--mysys/base64.c7
-rw-r--r--sql/handler.h1
-rw-r--r--storage/bdb/Makefile.in2
-rw-r--r--storage/bdb/build_unix/.IGNORE_ME3
7 files changed, 15 insertions, 10 deletions
diff --git a/cmd-line-utils/readline/complete.c b/cmd-line-utils/readline/complete.c
index df0a698b81f..ea459b2118c 100644
--- a/cmd-line-utils/readline/complete.c
+++ b/cmd-line-utils/readline/complete.c
@@ -33,7 +33,8 @@
#include <fcntl.h>
-#if defined (HAVE_SYS_FILE_H)
+/* FreeBSD 5.3 will not declare u_int in sys/types.h, file.h needs it */
+#if defined (HAVE_SYS_FILE_H) && !defined(__FreeBSD__)
# include <sys/file.h>
#endif
diff --git a/include/my_bitmap.h b/include/my_bitmap.h
index 98dd49a1228..b7ad575b2d3 100644
--- a/include/my_bitmap.h
+++ b/include/my_bitmap.h
@@ -96,25 +96,25 @@ extern void bitmap_lock_invert(MY_BITMAP *map);
#define _bitmap_is_set(MAP, BIT) (((uchar*)(MAP)->bitmap)[(BIT) / 8] \
& (1 << ((BIT) & 7)))
#ifndef DBUG_OFF
-inline uint32
+static inline uint32
bitmap_set_bit(MY_BITMAP *map,uint bit)
{
DBUG_ASSERT(bit < (map)->n_bits);
return _bitmap_set_bit(map,bit);
}
-inline uint32
+static inline uint32
bitmap_flip_bit(MY_BITMAP *map,uint bit)
{
DBUG_ASSERT(bit < (map)->n_bits);
return _bitmap_flip_bit(map,bit);
}
-inline uint32
+static inline uint32
bitmap_clear_bit(MY_BITMAP *map,uint bit)
{
DBUG_ASSERT(bit < (map)->n_bits);
return _bitmap_clear_bit(map,bit);
}
-inline uint32
+static inline uint32
bitmap_is_set(const MY_BITMAP *map,uint bit)
{
DBUG_ASSERT(bit < (map)->n_bits);
diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def
index eedf4b30e73..2a4a7b356e7 100644
--- a/mysql-test/t/disabled.def
+++ b/mysql-test/t/disabled.def
@@ -16,3 +16,4 @@ rpl_until : Unstable test case, bug#12429
rpl_deadlock : Unstable test case, bug#12429
kill : Unstable test case, bug#9712
archive_gis : The test fails on 32bit Linux
+compress : Magnus will fix
diff --git a/mysys/base64.c b/mysys/base64.c
index c521f352690..b29c8ff8360 100644
--- a/mysys/base64.c
+++ b/mysys/base64.c
@@ -15,7 +15,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include <base64.h>
-#include <m_string.h> // strchr()
+#include <m_string.h> /* strchr() */
#ifndef MAIN
@@ -134,7 +134,8 @@ base64_decode(const char *src, size_t size, void *dst)
{
char b[3];
size_t i= 0;
- unsigned char *d= (unsigned char*)dst;
+ char *dst_base= (char *)dst;
+ char *d= dst_base;
size_t j;
while (i < size)
@@ -193,7 +194,7 @@ base64_decode(const char *src, size_t size, void *dst)
{
return -1;
}
- return d - (unsigned char*)dst;
+ return d - dst_base;
}
diff --git a/sql/handler.h b/sql/handler.h
index f5f0afa00d5..3912d7720a8 100644
--- a/sql/handler.h
+++ b/sql/handler.h
@@ -491,7 +491,6 @@ typedef struct {
longlong list_value;
uint partition_id;
} LIST_PART_ENTRY;
-enum Item_result;
class partition_info;
diff --git a/storage/bdb/Makefile.in b/storage/bdb/Makefile.in
index c83d40ac8b2..7ba61d847dd 100644
--- a/storage/bdb/Makefile.in
+++ b/storage/bdb/Makefile.in
@@ -30,7 +30,7 @@ subdirs = btree build_vxworks build_win32 clib common cxx db dbinc \
db_verify dbm dbreg dist env examples_c examples_cxx fileops hash \
hsearch hmac include java libdb_java lock log mp mutex os os_vxworks \
os_win32 perl.BerkeleyDB perl.DB_File qam rep rpc_client rpc_server tcl \
- test txn xa
+ test txn xa sequence
@SET_MAKE@
diff --git a/storage/bdb/build_unix/.IGNORE_ME b/storage/bdb/build_unix/.IGNORE_ME
new file mode 100644
index 00000000000..558fd496f0c
--- /dev/null
+++ b/storage/bdb/build_unix/.IGNORE_ME
@@ -0,0 +1,3 @@
+Some combinations of the gzip and tar archive exploders found
+on Linux systems ignore directories that don't have any files
+(other than symbolic links) in them. So, here's a file.