Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
f482437c
Commit
f482437c
authored
Dec 21, 2010
by
Tor Didriksen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug #58699 cannot build with gcc dbg on solaris
parent
1e5b7636
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
78 additions
and
14 deletions
+78
-14
cmake/os/SunOS.cmake
cmake/os/SunOS.cmake
+0
-1
config.h.cmake
config.h.cmake
+1
-1
configure.cmake
configure.cmake
+43
-0
include/my_pthread.h
include/my_pthread.h
+4
-0
include/mysql/psi/mysql_file.h
include/mysql/psi/mysql_file.h
+2
-0
mysys/ptr_cmp.c
mysys/ptr_cmp.c
+13
-6
sql/my_decimal.cc
sql/my_decimal.cc
+1
-0
sql/mysqld.cc
sql/mysqld.cc
+2
-2
sql/sql_audit.h
sql/sql_audit.h
+2
-0
sql/sql_plugin.h
sql/sql_plugin.h
+2
-0
sql/sql_show.cc
sql/sql_show.cc
+1
-1
sql/sys_vars.h
sql/sys_vars.h
+6
-2
storage/perfschema/pfs_instr.cc
storage/perfschema/pfs_instr.cc
+1
-1
No files found.
cmake/os/SunOS.cmake
View file @
f482437c
...
@@ -17,7 +17,6 @@ INCLUDE(CheckSymbolExists)
...
@@ -17,7 +17,6 @@ INCLUDE(CheckSymbolExists)
INCLUDE
(
CheckCSourceRuns
)
INCLUDE
(
CheckCSourceRuns
)
INCLUDE
(
CheckCSourceCompiles
)
INCLUDE
(
CheckCSourceCompiles
)
SET
(
TARGET_OS_SOLARIS 1
)
# Enable 64 bit file offsets
# Enable 64 bit file offsets
SET
(
_FILE_OFFSET_BITS 64
)
SET
(
_FILE_OFFSET_BITS 64
)
...
...
config.h.cmake
View file @
f482437c
...
@@ -226,6 +226,7 @@
...
@@ -226,6 +226,7 @@
#cmakedefine HAVE_PTHREAD_THREADMASK 1
#cmakedefine HAVE_PTHREAD_THREADMASK 1
#cmakedefine HAVE_PTHREAD_YIELD_NP 1
#cmakedefine HAVE_PTHREAD_YIELD_NP 1
#cmakedefine HAVE_PTHREAD_YIELD_ZERO_ARG 1
#cmakedefine HAVE_PTHREAD_YIELD_ZERO_ARG 1
#cmakedefine PTHREAD_ONCE_INITIALIZER @PTHREAD_ONCE_INITIALIZER@
#cmakedefine HAVE_PUTENV 1
#cmakedefine HAVE_PUTENV 1
#cmakedefine HAVE_RE_COMP 1
#cmakedefine HAVE_RE_COMP 1
#cmakedefine HAVE_REGCOMP 1
#cmakedefine HAVE_REGCOMP 1
...
@@ -406,7 +407,6 @@
...
@@ -406,7 +407,6 @@
#cmakedefine TARGET_OS_LINUX 1
#cmakedefine TARGET_OS_LINUX 1
#cmakedefine TARGET_OS_SOLARIS 1
#cmakedefine HAVE_WCTYPE_H 1
#cmakedefine HAVE_WCTYPE_H 1
#cmakedefine HAVE_WCHAR_H 1
#cmakedefine HAVE_WCHAR_H 1
...
...
configure.cmake
View file @
f482437c
...
@@ -269,6 +269,49 @@ ENDIF()
...
@@ -269,6 +269,49 @@ ENDIF()
#
#
FIND_PACKAGE
(
Threads
)
FIND_PACKAGE
(
Threads
)
FUNCTION
(
MY_CHECK_PTHREAD_ONCE_INIT
)
CHECK_C_COMPILER_FLAG
(
"-Werror"
HAVE_WERROR_FLAG
)
IF
(
NOT HAVE_WERROR_FLAG
)
RETURN
()
ENDIF
()
SET
(
CMAKE_REQUIRED_FLAGS
"
${
CMAKE_REQUIRED_FLAGS
}
-Werror"
)
CHECK_C_SOURCE_COMPILES
(
"
#include <pthread.h>
void foo(void) {}
int main()
{
pthread_once_t once_control = PTHREAD_ONCE_INIT;
pthread_once(&once_control, foo);
return 0;
}"
HAVE_PTHREAD_ONCE_INIT
)
# http://bugs.opensolaris.org/bugdatabase/printableBug.do?bug_id=6611808
IF
(
NOT HAVE_PTHREAD_ONCE_INIT
)
CHECK_C_SOURCE_COMPILES
(
"
#include <pthread.h>
void foo(void) {}
int main()
{
pthread_once_t once_control = { PTHREAD_ONCE_INIT };
pthread_once(&once_control, foo);
return 0;
}"
HAVE_ARRAY_PTHREAD_ONCE_INIT
)
ENDIF
()
IF
(
HAVE_PTHREAD_ONCE_INIT
)
SET
(
PTHREAD_ONCE_INITIALIZER
"PTHREAD_ONCE_INIT"
PARENT_SCOPE
)
ENDIF
()
IF
(
HAVE_ARRAY_PTHREAD_ONCE_INIT
)
SET
(
PTHREAD_ONCE_INITIALIZER
"{ PTHREAD_ONCE_INIT }"
PARENT_SCOPE
)
ENDIF
()
ENDFUNCTION
()
IF
(
CMAKE_USE_PTHREADS_INIT
)
MY_CHECK_PTHREAD_ONCE_INIT
()
ENDIF
()
#
#
# Tests for functions
# Tests for functions
#
#
...
...
include/my_pthread.h
View file @
f482437c
...
@@ -214,7 +214,11 @@ int pthread_cancel(pthread_t thread);
...
@@ -214,7 +214,11 @@ int pthread_cancel(pthread_t thread);
typedef
void
*
(
*
pthread_handler
)(
void
*
);
typedef
void
*
(
*
pthread_handler
)(
void
*
);
#define my_pthread_once_t pthread_once_t
#define my_pthread_once_t pthread_once_t
#if defined(PTHREAD_ONCE_INITIALIZER)
#define MY_PTHREAD_ONCE_INIT PTHREAD_ONCE_INITIALIZER
#else
#define MY_PTHREAD_ONCE_INIT PTHREAD_ONCE_INIT
#define MY_PTHREAD_ONCE_INIT PTHREAD_ONCE_INIT
#endif
#define my_pthread_once(C,F) pthread_once(C,F)
#define my_pthread_once(C,F) pthread_once(C,F)
/* Test first for RTS or FSU threads */
/* Test first for RTS or FSU threads */
...
...
include/mysql/psi/mysql_file.h
View file @
f482437c
...
@@ -16,6 +16,8 @@
...
@@ -16,6 +16,8 @@
#ifndef MYSQL_FILE_H
#ifndef MYSQL_FILE_H
#define MYSQL_FILE_H
#define MYSQL_FILE_H
#include <my_global.h>
/* For strlen() */
/* For strlen() */
#include <string.h>
#include <string.h>
/* For MY_STAT */
/* For MY_STAT */
...
...
mysys/ptr_cmp.c
View file @
f482437c
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
#include "mysys_priv.h"
#include "mysys_priv.h"
#include <myisampack.h>
#include <myisampack.h>
#ifdef
TARGET_OS_SOLARIS
#ifdef
__sun
/*
/*
* On Solaris, memcmp() is normally faster than the unrolled ptr_compare_N
* On Solaris, memcmp() is normally faster than the unrolled ptr_compare_N
* functions, as memcmp() is usually a platform-specific implementation
* functions, as memcmp() is usually a platform-specific implementation
...
@@ -39,22 +39,25 @@ static int native_compare(size_t *length, unsigned char **a, unsigned char **b)
...
@@ -39,22 +39,25 @@ static int native_compare(size_t *length, unsigned char **a, unsigned char **b)
return
memcmp
(
*
a
,
*
b
,
*
length
);
return
memcmp
(
*
a
,
*
b
,
*
length
);
}
}
#else
/*
TARGET_OS_SOLARIS
*/
#else
/*
__sun
*/
static
int
ptr_compare
(
size_t
*
compare_length
,
uchar
**
a
,
uchar
**
b
);
static
int
ptr_compare
(
size_t
*
compare_length
,
uchar
**
a
,
uchar
**
b
);
static
int
ptr_compare_0
(
size_t
*
compare_length
,
uchar
**
a
,
uchar
**
b
);
static
int
ptr_compare_0
(
size_t
*
compare_length
,
uchar
**
a
,
uchar
**
b
);
static
int
ptr_compare_1
(
size_t
*
compare_length
,
uchar
**
a
,
uchar
**
b
);
static
int
ptr_compare_1
(
size_t
*
compare_length
,
uchar
**
a
,
uchar
**
b
);
static
int
ptr_compare_2
(
size_t
*
compare_length
,
uchar
**
a
,
uchar
**
b
);
static
int
ptr_compare_2
(
size_t
*
compare_length
,
uchar
**
a
,
uchar
**
b
);
static
int
ptr_compare_3
(
size_t
*
compare_length
,
uchar
**
a
,
uchar
**
b
);
static
int
ptr_compare_3
(
size_t
*
compare_length
,
uchar
**
a
,
uchar
**
b
);
#endif
/*
TARGET_OS_SOLARIS
*/
#endif
/*
__sun
*/
/* Get a pointer to a optimal byte-compare function for a given size */
/* Get a pointer to a optimal byte-compare function for a given size */
qsort2_cmp
get_ptr_compare
(
size_t
size
)
#ifdef __sun
qsort2_cmp
get_ptr_compare
(
size_t
size
__attribute__
((
unused
)))
{
{
#ifdef TARGET_OS_SOLARIS
return
(
qsort2_cmp
)
native_compare
;
return
(
qsort2_cmp
)
native_compare
;
}
#else
#else
qsort2_cmp
get_ptr_compare
(
size_t
size
)
{
if
(
size
<
4
)
if
(
size
<
4
)
return
(
qsort2_cmp
)
ptr_compare
;
return
(
qsort2_cmp
)
ptr_compare
;
switch
(
size
&
3
)
{
switch
(
size
&
3
)
{
...
@@ -64,8 +67,8 @@ qsort2_cmp get_ptr_compare (size_t size)
...
@@ -64,8 +67,8 @@ qsort2_cmp get_ptr_compare (size_t size)
case
3
:
return
(
qsort2_cmp
)
ptr_compare_3
;
case
3
:
return
(
qsort2_cmp
)
ptr_compare_3
;
}
}
return
0
;
/* Impossible */
return
0
;
/* Impossible */
#endif
/* TARGET_OS_SOLARIS */
}
}
#endif
/* __sun */
/*
/*
...
@@ -75,6 +78,8 @@ qsort2_cmp get_ptr_compare (size_t size)
...
@@ -75,6 +78,8 @@ qsort2_cmp get_ptr_compare (size_t size)
#define cmp(N) if (first[N] != last[N]) return (int) first[N] - (int) last[N]
#define cmp(N) if (first[N] != last[N]) return (int) first[N] - (int) last[N]
#ifndef __sun
static
int
ptr_compare
(
size_t
*
compare_length
,
uchar
**
a
,
uchar
**
b
)
static
int
ptr_compare
(
size_t
*
compare_length
,
uchar
**
a
,
uchar
**
b
)
{
{
reg3
int
length
=
*
compare_length
;
reg3
int
length
=
*
compare_length
;
...
@@ -177,6 +182,8 @@ static int ptr_compare_3(size_t *compare_length,uchar **a, uchar **b)
...
@@ -177,6 +182,8 @@ static int ptr_compare_3(size_t *compare_length,uchar **a, uchar **b)
return
(
0
);
return
(
0
);
}
}
#endif
/* !__sun */
void
my_store_ptr
(
uchar
*
buff
,
size_t
pack_length
,
my_off_t
pos
)
void
my_store_ptr
(
uchar
*
buff
,
size_t
pack_length
,
my_off_t
pos
)
{
{
switch
(
pack_length
)
{
switch
(
pack_length
)
{
...
...
sql/my_decimal.cc
View file @
f482437c
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
along with this program; if not, write to the Free Software
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include <my_global.h>
#include "sql_priv.h"
#include "sql_priv.h"
#include <time.h>
#include <time.h>
...
...
sql/mysqld.cc
View file @
f482437c
...
@@ -3247,8 +3247,8 @@ static int init_common_variables()
...
@@ -3247,8 +3247,8 @@ static int init_common_variables()
size_t
*
pagesize
=
(
size_t
*
)
malloc
(
sizeof
(
size_t
)
*
nelem
);
size_t
*
pagesize
=
(
size_t
*
)
malloc
(
sizeof
(
size_t
)
*
nelem
);
if
(
pagesize
!=
NULL
&&
getpagesizes
(
pagesize
,
nelem
)
>
0
)
if
(
pagesize
!=
NULL
&&
getpagesizes
(
pagesize
,
nelem
)
>
0
)
{
{
size_t
i
,
max_page_size
=
0
;
size_t
max_page_size
=
0
;
for
(
i
=
0
;
i
<
nelem
;
i
++
)
for
(
i
nt
i
=
0
;
i
<
nelem
;
i
++
)
{
{
if
(
pagesize
[
i
]
>
max_page_size
&&
if
(
pagesize
[
i
]
>
max_page_size
&&
pagesize
[
i
]
<=
max_desired_page_size
)
pagesize
[
i
]
<=
max_desired_page_size
)
...
...
sql/sql_audit.h
View file @
f482437c
...
@@ -17,6 +17,8 @@
...
@@ -17,6 +17,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include <my_global.h>
#include <mysql/plugin_audit.h>
#include <mysql/plugin_audit.h>
#include "sql_class.h"
#include "sql_class.h"
...
...
sql/sql_plugin.h
View file @
f482437c
...
@@ -16,6 +16,8 @@
...
@@ -16,6 +16,8 @@
#ifndef _sql_plugin_h
#ifndef _sql_plugin_h
#define _sql_plugin_h
#define _sql_plugin_h
#include <my_global.h>
/*
/*
the following #define adds server-only members to enum_mysql_show_type,
the following #define adds server-only members to enum_mysql_show_type,
that is defined in plugin.h
that is defined in plugin.h
...
...
sql/sql_show.cc
View file @
f482437c
...
@@ -2255,7 +2255,7 @@ static bool show_status_array(THD *thd, const char *wild,
...
@@ -2255,7 +2255,7 @@ static bool show_status_array(THD *thd, const char *wild,
end
=
int10_to_str
(
*
(
long
*
)
value
,
buff
,
10
);
end
=
int10_to_str
(
*
(
long
*
)
value
,
buff
,
10
);
break
;
break
;
case
SHOW_LONGLONG_STATUS
:
case
SHOW_LONGLONG_STATUS
:
value
=
((
char
*
)
status_var
+
(
ulong
long
)
value
);
value
=
((
char
*
)
status_var
+
(
ulong
)
value
);
/* fall through */
/* fall through */
case
SHOW_LONGLONG
:
case
SHOW_LONGLONG
:
end
=
longlong10_to_str
(
*
(
longlong
*
)
value
,
buff
,
10
);
end
=
longlong10_to_str
(
*
(
longlong
*
)
value
,
buff
,
10
);
...
...
sql/sys_vars.h
View file @
f482437c
...
@@ -1191,7 +1191,8 @@ public:
...
@@ -1191,7 +1191,8 @@ public:
void
global_save_default
(
THD
*
thd
,
set_var
*
var
)
void
global_save_default
(
THD
*
thd
,
set_var
*
var
)
{
{
LEX_STRING
pname
;
LEX_STRING
pname
;
pname
.
str
=
*
(
char
**
)
option
.
def_value
;
char
**
default_value
=
reinterpret_cast
<
char
**>
(
option
.
def_value
);
pname
.
str
=
*
default_value
;
pname
.
length
=
strlen
(
pname
.
str
);
pname
.
length
=
strlen
(
pname
.
str
);
plugin_ref
plugin
;
plugin_ref
plugin
;
...
@@ -1556,7 +1557,10 @@ public:
...
@@ -1556,7 +1557,10 @@ public:
void
session_save_default
(
THD
*
thd
,
set_var
*
var
)
void
session_save_default
(
THD
*
thd
,
set_var
*
var
)
{
var
->
save_result
.
ptr
=
global_var
(
void
*
);
}
{
var
->
save_result
.
ptr
=
global_var
(
void
*
);
}
void
global_save_default
(
THD
*
thd
,
set_var
*
var
)
void
global_save_default
(
THD
*
thd
,
set_var
*
var
)
{
var
->
save_result
.
ptr
=
*
(
void
**
)
option
.
def_value
;
}
{
void
**
default_value
=
reinterpret_cast
<
void
**>
(
option
.
def_value
);
var
->
save_result
.
ptr
=
*
default_value
;
}
bool
check_update_type
(
Item_result
type
)
bool
check_update_type
(
Item_result
type
)
{
return
type
!=
INT_RESULT
&&
type
!=
STRING_RESULT
;
}
{
return
type
!=
INT_RESULT
&&
type
!=
STRING_RESULT
;
}
uchar
*
session_value_ptr
(
THD
*
thd
,
LEX_STRING
*
base
)
uchar
*
session_value_ptr
(
THD
*
thd
,
LEX_STRING
*
base
)
...
...
storage/perfschema/pfs_instr.cc
View file @
f482437c
...
@@ -18,9 +18,9 @@
...
@@ -18,9 +18,9 @@
Performance schema instruments (implementation).
Performance schema instruments (implementation).
*/
*/
#include <my_global.h>
#include <string.h>
#include <string.h>
#include "my_global.h"
#include "my_sys.h"
#include "my_sys.h"
#include "pfs.h"
#include "pfs.h"
#include "pfs_stat.h"
#include "pfs_stat.h"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment