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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
0886cc3b
Commit
0886cc3b
authored
Jul 23, 2007
by
kent@mysql.com/kent-amd64.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Many files:
Put back old code to check stack direction at configure time
parent
8b5f22a0
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
39 additions
and
1 deletion
+39
-1
config/ac-macros/misc.m4
config/ac-macros/misc.m4
+23
-0
configure.in
configure.in
+2
-0
include/config-netware.h
include/config-netware.h
+3
-0
include/config-win.h
include/config-win.h
+2
-0
include/my_global.h
include/my_global.h
+4
-0
sql/sql_parse.cc
sql/sql_parse.cc
+5
-1
No files found.
config/ac-macros/misc.m4
View file @
0886cc3b
...
...
@@ -450,6 +450,29 @@ AC_DEFINE([HAVE_BOOL], [1], [bool is not defined by all C++ compilators])
fi
])dnl
AC_DEFUN([MYSQL_STACK_DIRECTION],
[AC_CACHE_CHECK(stack direction for C alloca, ac_cv_c_stack_direction,
[AC_TRY_RUN([#include <stdlib.h>
int find_stack_direction ()
{
static char *addr = 0;
auto char dummy;
if (addr == 0)
{
addr = &dummy;
return find_stack_direction ();
}
else
return (&dummy > addr) ? 1 : -1;
}
int main ()
{
exit (find_stack_direction() < 0);
}], ac_cv_c_stack_direction=1, ac_cv_c_stack_direction=-1,
ac_cv_c_stack_direction=)])
AC_DEFINE_UNQUOTED(STACK_DIRECTION, $ac_cv_c_stack_direction)
])dnl
AC_DEFUN([MYSQL_CHECK_LONGLONG_TO_FLOAT],
[
AC_MSG_CHECKING(if conversion of longlong to float works)
...
...
configure.in
View file @
0886cc3b
...
...
@@ -1792,6 +1792,8 @@ MYSQL_TYPE_ACCEPT
#---END:
# Figure out what type of struct rlimit to use with setrlimit
MYSQL_TYPE_STRUCT_RLIMIT
# Find where the stack goes
MYSQL_STACK_DIRECTION
# We want to skip alloca on irix unconditionally. It may work on some version..
MYSQL_FUNC_ALLOCA
# Do struct timespec have members tv_sec or ts_sec
...
...
include/config-netware.h
View file @
0886cc3b
...
...
@@ -112,6 +112,9 @@ extern "C" {
/* signal by closing the sockets */
#define SIGNAL_WITH_VIO_CLOSE 1
/* On NetWare, stack grows towards lower address */
#define STACK_DIRECTION -1
/* On NetWare, we need to set stack size for threads, otherwise default 16K is used */
#define NW_THD_STACKSIZE 65536
...
...
include/config-win.h
View file @
0886cc3b
...
...
@@ -250,6 +250,8 @@ inline double ulonglong2double(ulonglong value)
#endif
#define STACK_DIRECTION -1
/* Optimized store functions for Intel x86 */
#ifndef _WIN64
...
...
include/my_global.h
View file @
0886cc3b
...
...
@@ -804,6 +804,10 @@ typedef SOCKET_SIZE_TYPE size_socket;
#define ulong_to_double(X) ((double) (ulong) (X))
#define SET_STACK_SIZE(X)
/* Not needed on real machines */
#ifndef STACK_DIRECTION
#error "please add -DSTACK_DIRECTION=1 or -1 to your CPPFLAGS"
#endif
#if !defined(HAVE_STRTOK_R)
#define strtok_r(A,B,C) strtok((A),(B))
#endif
...
...
sql/sql_parse.cc
View file @
0886cc3b
...
...
@@ -5042,7 +5042,11 @@ bool check_merge_table_access(THD *thd, char *db,
#ifndef EMBEDDED_LIBRARY
#define used_stack(A,B) (long)(A > B ? A - B : B - A)
#if STACK_DIRECTION < 0
#define used_stack(A,B) (long) (A - B)
#else
#define used_stack(A,B) (long) (B - A)
#endif
#ifndef DBUG_OFF
long
max_stack_used
;
...
...
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