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
1ea6eb14
Commit
1ea6eb14
authored
Mar 26, 2013
by
Andrei Elkin
Browse files
Options
Browse Files
Download
Plain Diff
merge from 5.1 repo.
parents
9eb64ec5
ecf834b9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
16 deletions
+17
-16
config/ac-macros/misc.m4
config/ac-macros/misc.m4
+17
-16
No files found.
config/ac-macros/misc.m4
View file @
1ea6eb14
...
@@ -460,22 +460,23 @@ AC_DEFUN([MYSQL_STACK_DIRECTION],
...
@@ -460,22 +460,23 @@ AC_DEFUN([MYSQL_STACK_DIRECTION],
#if defined(__HP_cc) || defined (__HP_aCC) || defined (__hpux)
#if defined(__HP_cc) || defined (__HP_aCC) || defined (__hpux)
#pragma noinline
#pragma noinline
#endif
#endif
int find_stack_direction ()
/* Check stack direction (-1 down, 1 up) */
{
int f(int *a)
static char *addr = 0;
{
auto char dummy;
int b;
if (addr == 0)
return(&b > a)?1:-1;
{
}
addr = &dummy;
/*
return find_stack_direction ();
Prevent compiler optimizations by calling function
}
through pointer.
else
*/
return (&dummy > addr) ? 1 : -1;
volatile int (*ptr_f)(int *) = f;
}
int main()
int main ()
{
{
int a;
exit (find_stack_direction() < 0);
exit(ptr_f(&a) < 0);
}], ac_cv_c_stack_direction=1, ac_cv_c_stack_direction=-1,
}
], ac_cv_c_stack_direction=1, ac_cv_c_stack_direction=-1,
ac_cv_c_stack_direction=)])
ac_cv_c_stack_direction=)])
AC_DEFINE_UNQUOTED(STACK_DIRECTION, $ac_cv_c_stack_direction)
AC_DEFINE_UNQUOTED(STACK_DIRECTION, $ac_cv_c_stack_direction)
])dnl
])dnl
...
...
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