diff options
Diffstat (limited to 'include/my_global.h')
-rw-r--r-- | include/my_global.h | 7 |
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. |