From cd1c6e220de1730615c145b5337f7cce554dfdae Mon Sep 17 00:00:00 2001 From: Davi Arnaut Date: Wed, 10 Nov 2010 19:14:47 -0200 Subject: Bug#58057: 5.1 libmysql/libmysql.c unused variable/compile failure Bug#57995: Compiler flag change build error on OSX 10.4: my_getncpus.c Bug#57996: Compiler flag change build error on OSX 10.5 : bind.c Bug#57994: Compiler flag change build error : my_redel.c Bug#57993: Compiler flag change build error on FreeBsd 7.0 : regexec.c Bug#57992: Compiler flag change build error on FreeBsd : mf_keycache.c Bug#57997: Compiler flag change build error on OSX 10.6: debug_sync.cc Fix assorted compiler generated warnings. cmd-line-utils/readline/bind.c: Bug#57996: Compiler flag change build error on OSX 10.5 : bind.c Initialize variable to work around a false positive warning. include/m_string.h: Bug#57994: Compiler flag change build error : my_redel.c The expansion of stpcpy (in glibc) causes warnings if the return value of strmov is not being used. Since stpcpy is a GNU extension and the expansion ends up using a built-in provided by GCC, use the compiler provided built-in directly when possible. include/my_compiler.h: Define a dummy MY_GNUC_PREREQ when not compiling with GCC. libmysql/libmysql.c: Bug#58057: 5.1 libmysql/libmysql.c unused variable/compile failure Variable might not be used in some cases. So, tag it as unused. mysys/mf_keycache.c: Bug#57992: Compiler flag change build error on FreeBsd : mf_keycache.c Use UNINIT_VAR to work around a false positive warning. mysys/my_getncpus.c: Bug#57995: Compiler flag change build error on OSX 10.4: my_getncpus.c Declare variable in the same block where it is used. regex/regexec.c: Bug#57993: Compiler flag change build error on FreeBsd 7.0 : regexec.c Work around a compiler bug which causes the cast to not be enforced. sql/debug_sync.cc: Bug#57997: Compiler flag change build error on OSX 10.6: debug_sync.cc Use UNINIT_VAR to work around a false positive warning. sql/handler.cc: Use UNINIT_VAR to work around a false positive warning. sql/slave.cc: Use UNINIT_VAR to work around a false positive warning. sql/sql_partition.cc: Use UNINIT_VAR to work around a false positive warning. storage/myisam/ft_nlq_search.c: Use UNINIT_VAR to work around a false positive warning. storage/myisam/mi_create.c: Use UNINIT_VAR to work around a false positive warning. storage/myisammrg/myrg_open.c: Use UNINIT_VAR to work around a false positive warning. tests/mysql_client_test.c: Change function to take a pointer to const, no need for a cast. --- include/m_string.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include/m_string.h') diff --git a/include/m_string.h b/include/m_string.h index 3e5cd063b7b..933da84c336 100644 --- a/include/m_string.h +++ b/include/m_string.h @@ -73,7 +73,9 @@ extern "C" { extern void *(*my_str_malloc)(size_t); extern void (*my_str_free)(void *); -#if defined(HAVE_STPCPY) +#if MY_GNUC_PREREQ(3, 4) +#define strmov(dest, src) __builtin_stpcpy(dest, src) +#elif defined(HAVE_STPCPY) #define strmov(A,B) stpcpy((A),(B)) #ifndef stpcpy extern char *stpcpy(char *, const char *); /* For AIX with gcc 2.95.3 */ -- cgit v1.2.1 From c324624291a8c7cfbfcc728ce9fa86feb8d4e904 Mon Sep 17 00:00:00 2001 From: Davi Arnaut Date: Wed, 17 Nov 2010 07:41:29 -0200 Subject: Bug#57994: Compiler flag change build error : my_redel.c Use __builtin_stpcpy only if the system supports stpcpy. This is necessary as in some cases a call to stpcpy will be emitted if the built-in can not optimized. include/m_string.h: The expansion of stpcpy (in glibc) causes warnings if the return value of strmov is not being used. Since stpcpy is a GNU extension and the expansion ends up using a built-in provided by GCC, use the compiler provided built-in directly when possible. Nonetheless, the C library must have stpcpy as a call be emitted if the built-in can not optimized. --- include/m_string.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/m_string.h') diff --git a/include/m_string.h b/include/m_string.h index 933da84c336..c963e605501 100644 --- a/include/m_string.h +++ b/include/m_string.h @@ -73,8 +73,8 @@ extern "C" { extern void *(*my_str_malloc)(size_t); extern void (*my_str_free)(void *); -#if MY_GNUC_PREREQ(3, 4) -#define strmov(dest, src) __builtin_stpcpy(dest, src) +#if defined(HAVE_STPCPY) && MY_GNUC_PREREQ(3, 4) +#define strmov(A,B) __builtin_stpcpy((A),(B)) #elif defined(HAVE_STPCPY) #define strmov(A,B) stpcpy((A),(B)) #ifndef stpcpy -- cgit v1.2.1 From a6294cd5cbd02c48b28fe8b380f8c259f14f9d8c Mon Sep 17 00:00:00 2001 From: Davi Arnaut Date: Sat, 20 Nov 2010 12:29:51 -0200 Subject: Bug#57994: Compiler flag change build error : my_redel.c Although ICC identifies itself as GCC, even in version numbers, it does not support the stpcpy built-in. include/m_string.h: Work around ICC. Hacks... --- include/m_string.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/m_string.h') diff --git a/include/m_string.h b/include/m_string.h index c963e605501..0d248ea0ad3 100644 --- a/include/m_string.h +++ b/include/m_string.h @@ -73,7 +73,7 @@ extern "C" { extern void *(*my_str_malloc)(size_t); extern void (*my_str_free)(void *); -#if defined(HAVE_STPCPY) && MY_GNUC_PREREQ(3, 4) +#if defined(HAVE_STPCPY) && MY_GNUC_PREREQ(3, 4) && !defined(__INTEL_COMPILER) #define strmov(A,B) __builtin_stpcpy((A),(B)) #elif defined(HAVE_STPCPY) #define strmov(A,B) stpcpy((A),(B)) -- cgit v1.2.1 From af67d8ae02d024d2d2de41584e0befc87518f3fd Mon Sep 17 00:00:00 2001 From: Davi Arnaut Date: Sat, 20 Nov 2010 20:56:09 -0200 Subject: WL#5665: Removal of the autotools-based build system Remove some more leftovers from the initial removal: o Update relevant mentions of configure.in throughout the source code. o Remove win/configure.js, which at this point just duplicates logic already present in CMake based build system. o Remove support files which relied on the autotools build system. In any case, MySQL is no longer officially supported on SCO. o Remove files which are no longer part of the build. --- include/m_string.h | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'include/m_string.h') diff --git a/include/m_string.h b/include/m_string.h index 77ec603464f..d2194858589 100644 --- a/include/m_string.h +++ b/include/m_string.h @@ -52,8 +52,6 @@ # define memmove(d, s, n) bmove ((d), (s), (n)) #elif defined(HAVE_MEMMOVE) # define bmove(d, s, n) memmove((d), (s), (n)) -#else -# define memmove(d, s, n) bmove((d), (s), (n)) /* our bmove */ #endif /* Unixware 7 */ @@ -96,14 +94,6 @@ extern char _dig_vec_lower[]; /* Prototypes for string functions */ -#if !defined(bfill) && !defined(HAVE_BFILL) -extern void bfill(uchar *dst,size_t len,pchar fill); -#endif - -#if !defined(HAVE_BMOVE) && !defined(bmove) -extern void bmove(uuchar *dst, const uchar *src,size_t len); -#endif - extern void bmove_upp(uchar *dst,const uchar *src,size_t len); extern void bchange(uchar *dst,size_t old_len,const uchar *src, size_t new_len,size_t tot_len); @@ -128,11 +118,6 @@ extern char *strxnmov(char *dst, size_t len, const char *src, ...); extern size_t strnlen(const char *s, size_t n); #endif -#if !defined(__cplusplus) -#ifndef HAVE_STRSTR -extern char *strstr(const char *, const char *); -#endif -#endif extern int is_prefix(const char *, const char *); /* Conversion routines */ -- cgit v1.2.1