summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Perkin <jperkin@sun.com>2009-08-14 17:18:52 +0200
committerJonathan Perkin <jperkin@sun.com>2009-08-14 17:18:52 +0200
commiteb8a34e7b2f37fbcf0e2d48223a15c3be09d5b81 (patch)
tree357bfb250262e00ce901f945f167016febe406d1
parent0e913a78fdf613b62f1e5f7091cbda9ba55a956d (diff)
downloadmariadb-git-eb8a34e7b2f37fbcf0e2d48223a15c3be09d5b81.tar.gz
Build fixes for Windows, AIX, HP/UX and Sun Studio11, from Timothy Smith.
-rwxr-xr-xCMakeLists.txt1
-rw-r--r--cmd-line-utils/readline/util.c9
-rw-r--r--storage/innodb_plugin/handler/i_s.cc18
-rw-r--r--storage/innodb_plugin/include/univ.i3
4 files changed, 20 insertions, 11 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 947dc1786ff..7d91e39eb6d 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -137,6 +137,7 @@ ENDIF(MSVC)
IF(WIN32)
ADD_DEFINITIONS("-D_WINDOWS -D__WIN__ -D_CRT_SECURE_NO_DEPRECATE")
+ ADD_DEFINITIONS("-D_WIN32_WINNT=0x0501")
ENDIF(WIN32)
# default to x86 platform. We'll check for X64 in a bit
diff --git a/cmd-line-utils/readline/util.c b/cmd-line-utils/readline/util.c
index 50cfea75cb9..342224facd7 100644
--- a/cmd-line-utils/readline/util.c
+++ b/cmd-line-utils/readline/util.c
@@ -81,8 +81,13 @@ rl_alphabetic (c)
#if defined (HANDLE_MULTIBYTE)
int
-_rl_walphabetic (wc)
- wchar_t wc;
+/*
+ Portability issue with VisualAge C++ Professional / C for AIX Compiler, Version 6:
+ "util.c", line 84.1: 1506-343 (S) Redeclaration of _rl_walphabetic differs
+ from previous declaration on line 110 of "rlmbutil.h".
+ So, put type in the function signature here.
+*/
+_rl_walphabetic (wchar_t wc)
{
int c;
diff --git a/storage/innodb_plugin/handler/i_s.cc b/storage/innodb_plugin/handler/i_s.cc
index c0d488d1c49..524fe696de2 100644
--- a/storage/innodb_plugin/handler/i_s.cc
+++ b/storage/innodb_plugin/handler/i_s.cc
@@ -69,14 +69,16 @@ do { \
#define STRUCT_FLD(name, value) value
#endif
-static const ST_FIELD_INFO END_OF_ST_FIELD_INFO =
- {STRUCT_FLD(field_name, NULL),
- STRUCT_FLD(field_length, 0),
- STRUCT_FLD(field_type, MYSQL_TYPE_NULL),
- STRUCT_FLD(value, 0),
- STRUCT_FLD(field_flags, 0),
- STRUCT_FLD(old_name, ""),
- STRUCT_FLD(open_method, SKIP_OPEN_TABLE)};
+/* Don't use a static const variable here, as some C++ compilers (notably
+HPUX aCC: HP ANSI C++ B3910B A.03.65) can't handle it. */
+#define END_OF_ST_FIELD_INFO \
+ {STRUCT_FLD(field_name, NULL), \
+ STRUCT_FLD(field_length, 0), \
+ STRUCT_FLD(field_type, MYSQL_TYPE_NULL), \
+ STRUCT_FLD(value, 0), \
+ STRUCT_FLD(field_flags, 0), \
+ STRUCT_FLD(old_name, ""), \
+ STRUCT_FLD(open_method, SKIP_OPEN_TABLE)}
/*
Use the following types mapping:
diff --git a/storage/innodb_plugin/include/univ.i b/storage/innodb_plugin/include/univ.i
index 6bce6dd765e..023a6c9cd89 100644
--- a/storage/innodb_plugin/include/univ.i
+++ b/storage/innodb_plugin/include/univ.i
@@ -408,7 +408,8 @@ it is read. */
/* Minimize cache-miss latency by moving data at addr into a cache before
it is read or written. */
# define UNIV_PREFETCH_RW(addr) __builtin_prefetch(addr, 1, 3)
-#elif defined(__SUNPRO_C) || defined(__SUNPRO_CC)
+/* Sun Studio includes sun_prefetch.h as of version 5.9 */
+#elif (defined(__SUNPRO_C) && __SUNPRO_C >= 0x590) || (defined(__SUNPRO_CC) && __SUNPRO_CC >= 0x590)
# include <sun_prefetch.h>
#if __SUNPRO_C >= 0x550
# undef UNIV_INTERN