summaryrefslogtreecommitdiff
path: root/include/my_global.h
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2011-04-25 17:22:25 +0200
committerSergei Golubchik <sergii@pisem.net>2011-04-25 17:22:25 +0200
commit0accbd0364e0333e0b119aa9ce93e34ded9df6cb (patch)
treebdf0738c29dc1f57fbfba3a1754524e238f15b52 /include/my_global.h
parent37f87d73ae8dc6c30594867b40a5d70159acf63c (diff)
downloadmariadb-git-0accbd0364e0333e0b119aa9ce93e34ded9df6cb.tar.gz
lots of post-merge changes
Diffstat (limited to 'include/my_global.h')
-rw-r--r--include/my_global.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/my_global.h b/include/my_global.h
index ad8607de2a3..5d874d9f5f8 100644
--- a/include/my_global.h
+++ b/include/my_global.h
@@ -880,6 +880,7 @@ typedef long long my_ptrdiff_t;
#define ALIGN_PTR(A, t) ((t*) MY_ALIGN((A), sizeof(double)))
#define ADD_TO_PTR(ptr,size,type) (type) ((uchar*) (ptr)+size)
#define PTR_BYTE_DIFF(A,B) (my_ptrdiff_t) ((uchar*) (A) - (uchar*) (B))
+#define PREV_BITS(type,A) ((type) (((type) 1 << (A)) -1))
/*
Custom version of standard offsetof() macro which can be used to get
@@ -1007,6 +1008,10 @@ typedef unsigned long my_off_t;
typedef ulonglong table_map; /* Used for table bits in join */
typedef ulong nesting_map; /* Used for flags of nesting constructs */
+/* often used type names - opaque declarations */
+typedef const struct charset_info_st CHARSET_INFO;
+typedef struct st_mysql_lex_string LEX_STRING;
+
#if defined(__WIN__)
#define socket_errno WSAGetLastError()
#define SOCKET_EINTR WSAEINTR
@@ -1444,6 +1449,8 @@ do { doubleget_union _tmp; \
#define min(a, b) ((a) < (b) ? (a) : (b))
#endif
+#define CMP_NUM(a,b) (((a) < (b)) ? -1 : ((a) == (b)) ? 0 : 1)
+
/*
Only Linux is known to need an explicit sync of the directory to make sure a
file creation/deletion/renaming in(from,to) this directory durable.