summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2017-05-19 08:53:58 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2017-05-19 12:29:37 +0300
commit13a350ac29eeb43153c7bca65b73b5dfa9f8ffb5 (patch)
treeb13da72226623745f0607609e2bb3dcaac4a11c6 /include
parentd0eb4ee96b32caec1d6bba6dc376016b2bf2ac0f (diff)
parent54bb04f7efc1d0842b3d8befb670f5d9f05cb211 (diff)
downloadmariadb-git-13a350ac29eeb43153c7bca65b73b5dfa9f8ffb5.tar.gz
Merge 10.0 into 10.1
Diffstat (limited to 'include')
-rw-r--r--include/my_sys.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/my_sys.h b/include/my_sys.h
index ca933ed574e..6eadec05124 100644
--- a/include/my_sys.h
+++ b/include/my_sys.h
@@ -934,6 +934,12 @@ extern ulonglong my_getcputime(void);
#define hrtime_sec_part(X) ((ulong)((X).val % HRTIME_RESOLUTION))
#define my_time(X) hrtime_to_time(my_hrtime())
+#if STACK_DIRECTION < 0
+#define available_stack_size(CUR,END) (long) ((char*)(CUR) - (char*)(END))
+#else
+#define available_stack_size(CUR,END) (long) ((char*)(END) - (char*)(CUR))
+#endif
+
#ifdef HAVE_SYS_MMAN_H
#include <sys/mman.h>