diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/my_base.h | 2 | ||||
-rw-r--r-- | include/my_global.h | 55 | ||||
-rw-r--r-- | include/my_sys.h | 8 |
3 files changed, 32 insertions, 33 deletions
diff --git a/include/my_base.h b/include/my_base.h index c2eb6a040c1..947f7695215 100644 --- a/include/my_base.h +++ b/include/my_base.h @@ -250,6 +250,8 @@ enum ha_base_keytype { HA_BINARY_PACK_KEY | HA_FULLTEXT | HA_UNIQUE_CHECK | \ HA_SPATIAL | HA_NULL_ARE_EQUAL | HA_GENERATED_KEY) +#define HA_KEY_HAS_PART_KEY_SEG 65536 /* Key contains partial segments */ + /* Automatic bits in key-flag */ #define HA_SPACE_PACK_USED 4 /* Test for if SPACE_PACK used */ diff --git a/include/my_global.h b/include/my_global.h index ce76aeaec20..4b0786aa826 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -116,36 +116,31 @@ The macros below are used to allow build of Universal/fat binaries of MySQL and MySQL applications under darwin. */ -#ifdef TARGET_FAT_BINARY -# undef SIZEOF_CHARP -# undef SIZEOF_INT -# undef SIZEOF_LONG -# undef SIZEOF_LONG_LONG -# undef SIZEOF_OFF_T -# undef SIZEOF_SHORT - -#if defined(__i386__) -# undef WORDS_BIGENDIAN -# define SIZEOF_CHARP 4 -# define SIZEOF_INT 4 -# define SIZEOF_LONG 4 -# define SIZEOF_LONG_LONG 8 -# define SIZEOF_OFF_T 8 -# define SIZEOF_SHORT 2 - -#elif defined(__ppc__) -# define WORDS_BIGENDIAN -# define SIZEOF_CHARP 4 -# define SIZEOF_INT 4 -# define SIZEOF_LONG 4 -# define SIZEOF_LONG_LONG 8 -# define SIZEOF_OFF_T 8 -# define SIZEOF_SHORT 2 - -#else -# error Building FAT binary for an unknown architecture. -#endif -#endif /* TARGET_FAT_BINARY */ +#if defined(__APPLE__) && defined(__MACH__) +# undef SIZEOF_CHARP +# undef SIZEOF_SHORT +# undef SIZEOF_INT +# undef SIZEOF_LONG +# undef SIZEOF_LONG_LONG +# undef SIZEOF_OFF_T +# undef WORDS_BIGENDIAN +# define SIZEOF_SHORT 2 +# define SIZEOF_INT 4 +# define SIZEOF_LONG_LONG 8 +# define SIZEOF_OFF_T 8 +# if defined(__i386__) || defined(__ppc__) +# define SIZEOF_CHARP 4 +# define SIZEOF_LONG 4 +# elif defined(__x86_64__) || defined(__ppc64__) +# define SIZEOF_CHARP 8 +# define SIZEOF_LONG 8 +# else +# error Building FAT binary for an unknown architecture. +# endif +# if defined(__ppc__) || defined(__ppc64__) +# define WORDS_BIGENDIAN +# endif +#endif /* defined(__APPLE__) && defined(__MACH__) */ /* diff --git a/include/my_sys.h b/include/my_sys.h index 7ae05bb96f7..e13c4cde78b 100644 --- a/include/my_sys.h +++ b/include/my_sys.h @@ -712,8 +712,10 @@ extern sig_handler my_set_alarm_variable(int signo); extern void my_string_ptr_sort(uchar *base, uint items, size_t size); extern void radixsort_for_str_ptr(uchar* base[], uint number_of_elements, size_t size_of_element,uchar *buffer[]); -extern qsort_t qsort2(void *base_ptr, size_t total_elems, size_t size, - qsort2_cmp cmp, void *cmp_argument); +extern qsort_t my_qsort(void *base_ptr, size_t total_elems, size_t size, + qsort_cmp cmp); +extern qsort_t my_qsort2(void *base_ptr, size_t total_elems, size_t size, + qsort2_cmp cmp, void *cmp_argument); extern qsort2_cmp get_ptr_compare(size_t); void my_store_ptr(uchar *buff, size_t pack_length, my_off_t pos); my_off_t my_get_ptr(uchar *ptr, size_t pack_length); @@ -784,7 +786,7 @@ extern int get_index_dynamic(DYNAMIC_ARRAY *array, uchar * element); #define dynamic_element(array,array_index,type) ((type)((array)->buffer) +(array_index)) #define push_dynamic(A,B) insert_dynamic((A),(B)) #define reset_dynamic(array) ((array)->elements= 0) -#define sort_dynamic(A,cmp) qsort((A)->buffer, (A)->elements, (A)->size_of_element, (cmp)) +#define sort_dynamic(A,cmp) my_qsort((A)->buffer, (A)->elements, (A)->size_of_element, (cmp)) extern my_bool init_dynamic_string(DYNAMIC_STRING *str, const char *init_str, size_t init_alloc,size_t alloc_increment); |