From d7219467780f16c1f49c8228b15d5cea6d843392 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 30 Jun 2006 02:25:35 +0300 Subject: Fixed include file usage hp_test2 now works again Fixed wrong cast, which caused problems with gcc 4.0 and floats in prepared statements (Bug #19694) heap/hp_test1.c: Portability fix heap/hp_test2.c: Added max_table_size (fixes that hp_test2 works again) include/my_global.h: Fixed wrong cast, which caused problems with gcc 4.0 (Bug #19694) mysys/my_handler.c: Added missing include file strings/strtod.c: Fixed include files --- heap/hp_test1.c | 3 ++- heap/hp_test2.c | 1 + include/my_global.h | 4 ++-- mysys/my_handler.c | 1 + strings/strtod.c | 4 ++-- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/heap/hp_test1.c b/heap/hp_test1.c index dd696528eb8..1efa97842c7 100644 --- a/heap/hp_test1.c +++ b/heap/hp_test1.c @@ -44,6 +44,7 @@ int main(int argc, char **argv) get_options(argc,argv); bzero(&hp_create_info, sizeof(hp_create_info)); + hp_create_info.max_table_size= 1024L*1024L; keyinfo[0].keysegs=1; keyinfo[0].seg=keyseg; @@ -58,7 +59,7 @@ int main(int argc, char **argv) bzero((gptr) flags,sizeof(flags)); printf("- Creating heap-file\n"); - if (heap_create(filename,1,keyinfo,30,(ulong) flag*100000l,10l, + if (heap_create(filename,1,keyinfo,30,(ulong) flag*100000L,101L, &hp_create_info) || !(file= heap_open(filename, 2))) goto err; diff --git a/heap/hp_test2.c b/heap/hp_test2.c index 2de49bcb66b..ff07b402f4d 100644 --- a/heap/hp_test2.c +++ b/heap/hp_test2.c @@ -74,6 +74,7 @@ int main(int argc, char *argv[]) get_options(argc,argv); bzero(&hp_create_info, sizeof(hp_create_info)); + hp_create_info.max_table_size= 1024L*1024L; write_count=update=opt_delete=0; key_check=0; diff --git a/include/my_global.h b/include/my_global.h index 0f99aacd079..6baa4558d50 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -976,8 +976,8 @@ do { doubleget_union _tmp; \ #define doublestore(T,V) do { *((long *) T) = ((doubleget_union *)&V)->m[0]; \ *(((long *) T)+1) = ((doubleget_union *)&V)->m[1]; \ } while (0) -#define float4get(V,M) do { *((long *) &(V)) = *((long*) (M)); } while(0) -#define float8get(V,M) doubleget((V),(M)) +#define float4get(V,M) do { *((float *) &(V)) = *((float*) (M)); } while(0) +#define float8get(V,M) doubleget((V),(M)) #define float4store(V,M) memcpy((byte*) V,(byte*) (&M),sizeof(float)) #define floatstore(T,V) memcpy((byte*)(T), (byte*)(&V),sizeof(float)) #define floatget(V,M) memcpy((byte*) &V,(byte*) (M),sizeof(float)) diff --git a/mysys/my_handler.c b/mysys/my_handler.c index 3eed0ee6c08..156e7892580 100644 --- a/mysys/my_handler.c +++ b/mysys/my_handler.c @@ -15,6 +15,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ +#include #include "my_handler.h" int mi_compare_text(CHARSET_INFO *charset_info, uchar *a, uint a_length, diff --git a/strings/strtod.c b/strings/strtod.c index 61f2c107abe..da1b4f4baa6 100644 --- a/strings/strtod.c +++ b/strings/strtod.c @@ -26,8 +26,8 @@ */ -#include "my_base.h" /* Includes errno.h */ -#include "m_ctype.h" +#include /* Includes errno.h */ +#include #define MAX_DBL_EXP 308 #define MAX_RESULT_FOR_MAX_EXP 1.79769313486232 -- cgit v1.2.1