Loading client/mysqlbinlog.cc +2 −0 Original line number Diff line number Diff line Loading @@ -470,3 +470,5 @@ int main(int argc, char** argv) #else #include "log_event.cc" #endif FIX_GCC_LINKING_PROBLEM configure.in +10 −9 Original line number Diff line number Diff line Loading @@ -319,7 +319,7 @@ then # mysqld doesn't use run-time-type-checking, so we disable it. CXXFLAGS="$CXXFLAGS -fno-implicit-templates -fno-exceptions -fno-rtti" # If you are using 'gcc' 3.0 (not g++) to compile C++ programs, # If you are using 'gcc' 3.0 (not g++) to compile C++ programs on Linux, # we will gets some problems when linking static programs. # The following code is used to fix this problem. Loading @@ -327,8 +327,7 @@ then then if $CXX -v 2>&1 | grep 'version 3' > /dev/null 2>&1 then CXXFLAGS="$CXXFLAGS -DUSE_MYSYS_NEW" CXXLDFLAGS="$CXXLDFLAGS -Wl,--defsym -Wl,__cxa_pure_virtual=0" CXXFLAGS="$CXXFLAGS -DUSE_MYSYS_NEW -DDEFINE_CXA_PURE_VIRTUAL" fi fi fi Loading Loading @@ -368,6 +367,7 @@ AC_PATH_PROG(HOSTNAME, hostname, hostname) # Check for a GNU tar named 'gtar', or 'gnutar' (MacOS X) and # fall back to 'tar' otherwise and hope that it's a GNU tar as well AC_CHECK_PROGS(TAR, gnutar gtar tar) dnl We use a path for perl so the script startup works dnl We make sure to use perl, not perl5, in hopes that the RPMs will dnl not depend on the perl5 binary being installed (probably a bug in RPM) Loading Loading @@ -654,15 +654,13 @@ AC_ARG_WITH(mysqld-user, ) AC_SUBST(MYSQLD_USER) # If we should allove LOAD DATA LOCAL # If we should allow LOAD DATA LOCAL AC_MSG_CHECKING(if we should should enable LOAD DATA LOCAL by default) AC_ARG_ENABLE(local-infile, [ --enable-local-infile Enable LOAD DATA LOCAL INFILE (default: disabled)], [ --enable-local-infile Enable LOAD DATA LOCAL INFILE (default: disabled)], [ ENABLED_LOCAL_INFILE=$enableval ], [ ENABLED_LOCAL_INFILE=no ] ) if test "$ENABLED_LOCAL_INFILE" = "yes" then AC_MSG_RESULT([yes]) Loading Loading @@ -1346,6 +1344,7 @@ else DEBUG_OPTIMIZE_CXX="" OPTIMIZE_CXXFLAGS="-O" fi AC_ARG_WITH(debug, [ --without-debug Build a production version without debugging code], [with_debug=$withval], Loading Loading @@ -1578,13 +1577,15 @@ ac_save_CXXFLAGS="$CXXFLAGS" AC_CACHE_CHECK([style of gethost* routines], mysql_cv_gethost_style, AC_LANG_SAVE AC_LANG_CPLUSPLUS # Do not treat warnings as errors if we are linking agaist other libc # Do not treat warnings as errors if we are linking against other libc # this is to work around gcc not being permissive on non-system includes # with respect to ANSI C++ if test "$ac_cv_prog_gxx" = "yes" -a "$with_other_libc" = "no" then CXXFLAGS="$CXXFLAGS -Werror" fi AC_TRY_COMPILE( [#undef inline #if !defined(SCO) && !defined(__osf__) && !defined(_REENTRANT) Loading include/global.h +40 −19 Original line number Diff line number Diff line Loading @@ -135,6 +135,13 @@ double my_ulonglong2double(unsigned long long A); #define __LONG_MAX__ 2147483647 #endif /* Fix problem when linking c++ programs with gcc 3.x */ #ifdef DEFINE_CXA_PURE_VIRTUAL #define FIX_GCC_LINKING_PROBLEM extern "C" { int __cxa_pure_virtual() {return 0;} } #else #define FIX_GCC_LINKING_PROBLEM #endif /* egcs 1.1.2 has a problem with memcpy on Alpha */ #if defined(__GNUC__) && defined(__alpha__) && ! (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)) #define BAD_MEMCPY Loading Loading @@ -270,7 +277,7 @@ int __void__; #define LINT_INIT(var) #endif /* Define som useful general macros */ /* Define some useful general macros */ #if defined(__cplusplus) && defined(__GNUC__) #define max(a, b) ((a) >? (b)) #define min(a, b) ((a) <? (b)) Loading @@ -296,7 +303,7 @@ typedef unsigned short ushort; #define rint(A) floor((A)+0.5) #endif /* Define som general constants */ /* Define some general constants */ #ifndef TRUE #define TRUE (1) /* Logical true */ #define FALSE (0) /* Logical false */ Loading @@ -316,9 +323,11 @@ typedef unsigned short ushort; /* From old s-system.h */ /* Support macros for non ansi & other old compilers. Since such /* Support macros for non ansi & other old compilers. Since such things are no longer supported we do nothing. We keep then since some of our code may still be needed to upgrade old customers. */ some of our code may still be needed to upgrade old customers. */ #define _VARARGS(X) X #define _STATIC_VARARGS(X) X #define _PC(X) X Loading Loading @@ -440,12 +449,16 @@ typedef SOCKET_SIZE_TYPE size_socket; /* #define FN_NO_CASE_SENCE */ /* #define FN_UPPER_CASE TRUE */ /* Io buffer size; Must be a power of 2 and a multiple of 512. May be /* Io buffer size; Must be a power of 2 and a multiple of 512. May be smaller what the disk page size. This influences the speed of the isam btree library. eg to big to slow. */ isam btree library. eg to big to slow. */ #define IO_SIZE 4096 /* How much overhead does malloc have. The code often allocates something like 1024-MALLOC_OVERHEAD bytes */ /* How much overhead does malloc have. The code often allocates something like 1024-MALLOC_OVERHEAD bytes */ #ifdef SAFEMALLOC #define MALLOC_OVERHEAD (8+24+4) #else Loading Loading @@ -563,8 +576,10 @@ extern double my_atof(const char*); #define FLT_MAX ((float)3.40282346638528860e+38) #endif /* Max size that must be added to a so that we know Size to make adressable obj. */ /* Max size that must be added to a so that we know Size to make adressable obj. */ typedef long my_ptrdiff_t; #define MY_ALIGN(A,L) (((A) + (L) - 1) & ~((L) - 1)) #define ALIGN_SIZE(A) MY_ALIGN((A),sizeof(double)) Loading Loading @@ -635,8 +650,10 @@ typedef long longlong; #endif #ifdef USE_RAID /* The following is done with a if to not get problems with pre-processors with late define evaluation */ /* The following is done with a if to not get problems with pre-processors with late define evaluation */ #if SIZEOF_OFF_T == 4 #define SYSTEM_SIZEOF_OFF_T 4 #else Loading Loading @@ -700,8 +717,10 @@ typedef char bool; /* Ordinary boolean values 0 1 */ #define INT32(v) (int32) (v) #define MYF(v) (myf) (v) /* Defines to make it possible to prioritize register assignments. No longer needed with moder compilers */ /* Defines to make it possible to prioritize register assignments. No longer that important with modern compilers. */ #ifndef USING_X #define reg1 register #define reg2 register Loading Loading @@ -902,9 +921,11 @@ typedef union { #endif /* sint2korr */ /* Define-funktions for reading and storing in machine format from/to /* Define-funktions for reading and storing in machine format from/to short/long to/from some place in memory V should be a (not register) variable, M is a pointer to byte */ register) variable, M is a pointer to byte */ #ifdef WORDS_BIGENDIAN Loading sql/mysqld.cc +2 −0 Original line number Diff line number Diff line Loading @@ -4289,4 +4289,6 @@ template class I_List<THD>; template class I_List_iterator<THD>; template class I_List<i_string>; template class I_List<i_string_pair>; FIX_GCC_LINKING_PROBLEM #endif Loading
client/mysqlbinlog.cc +2 −0 Original line number Diff line number Diff line Loading @@ -470,3 +470,5 @@ int main(int argc, char** argv) #else #include "log_event.cc" #endif FIX_GCC_LINKING_PROBLEM
configure.in +10 −9 Original line number Diff line number Diff line Loading @@ -319,7 +319,7 @@ then # mysqld doesn't use run-time-type-checking, so we disable it. CXXFLAGS="$CXXFLAGS -fno-implicit-templates -fno-exceptions -fno-rtti" # If you are using 'gcc' 3.0 (not g++) to compile C++ programs, # If you are using 'gcc' 3.0 (not g++) to compile C++ programs on Linux, # we will gets some problems when linking static programs. # The following code is used to fix this problem. Loading @@ -327,8 +327,7 @@ then then if $CXX -v 2>&1 | grep 'version 3' > /dev/null 2>&1 then CXXFLAGS="$CXXFLAGS -DUSE_MYSYS_NEW" CXXLDFLAGS="$CXXLDFLAGS -Wl,--defsym -Wl,__cxa_pure_virtual=0" CXXFLAGS="$CXXFLAGS -DUSE_MYSYS_NEW -DDEFINE_CXA_PURE_VIRTUAL" fi fi fi Loading Loading @@ -368,6 +367,7 @@ AC_PATH_PROG(HOSTNAME, hostname, hostname) # Check for a GNU tar named 'gtar', or 'gnutar' (MacOS X) and # fall back to 'tar' otherwise and hope that it's a GNU tar as well AC_CHECK_PROGS(TAR, gnutar gtar tar) dnl We use a path for perl so the script startup works dnl We make sure to use perl, not perl5, in hopes that the RPMs will dnl not depend on the perl5 binary being installed (probably a bug in RPM) Loading Loading @@ -654,15 +654,13 @@ AC_ARG_WITH(mysqld-user, ) AC_SUBST(MYSQLD_USER) # If we should allove LOAD DATA LOCAL # If we should allow LOAD DATA LOCAL AC_MSG_CHECKING(if we should should enable LOAD DATA LOCAL by default) AC_ARG_ENABLE(local-infile, [ --enable-local-infile Enable LOAD DATA LOCAL INFILE (default: disabled)], [ --enable-local-infile Enable LOAD DATA LOCAL INFILE (default: disabled)], [ ENABLED_LOCAL_INFILE=$enableval ], [ ENABLED_LOCAL_INFILE=no ] ) if test "$ENABLED_LOCAL_INFILE" = "yes" then AC_MSG_RESULT([yes]) Loading Loading @@ -1346,6 +1344,7 @@ else DEBUG_OPTIMIZE_CXX="" OPTIMIZE_CXXFLAGS="-O" fi AC_ARG_WITH(debug, [ --without-debug Build a production version without debugging code], [with_debug=$withval], Loading Loading @@ -1578,13 +1577,15 @@ ac_save_CXXFLAGS="$CXXFLAGS" AC_CACHE_CHECK([style of gethost* routines], mysql_cv_gethost_style, AC_LANG_SAVE AC_LANG_CPLUSPLUS # Do not treat warnings as errors if we are linking agaist other libc # Do not treat warnings as errors if we are linking against other libc # this is to work around gcc not being permissive on non-system includes # with respect to ANSI C++ if test "$ac_cv_prog_gxx" = "yes" -a "$with_other_libc" = "no" then CXXFLAGS="$CXXFLAGS -Werror" fi AC_TRY_COMPILE( [#undef inline #if !defined(SCO) && !defined(__osf__) && !defined(_REENTRANT) Loading
include/global.h +40 −19 Original line number Diff line number Diff line Loading @@ -135,6 +135,13 @@ double my_ulonglong2double(unsigned long long A); #define __LONG_MAX__ 2147483647 #endif /* Fix problem when linking c++ programs with gcc 3.x */ #ifdef DEFINE_CXA_PURE_VIRTUAL #define FIX_GCC_LINKING_PROBLEM extern "C" { int __cxa_pure_virtual() {return 0;} } #else #define FIX_GCC_LINKING_PROBLEM #endif /* egcs 1.1.2 has a problem with memcpy on Alpha */ #if defined(__GNUC__) && defined(__alpha__) && ! (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)) #define BAD_MEMCPY Loading Loading @@ -270,7 +277,7 @@ int __void__; #define LINT_INIT(var) #endif /* Define som useful general macros */ /* Define some useful general macros */ #if defined(__cplusplus) && defined(__GNUC__) #define max(a, b) ((a) >? (b)) #define min(a, b) ((a) <? (b)) Loading @@ -296,7 +303,7 @@ typedef unsigned short ushort; #define rint(A) floor((A)+0.5) #endif /* Define som general constants */ /* Define some general constants */ #ifndef TRUE #define TRUE (1) /* Logical true */ #define FALSE (0) /* Logical false */ Loading @@ -316,9 +323,11 @@ typedef unsigned short ushort; /* From old s-system.h */ /* Support macros for non ansi & other old compilers. Since such /* Support macros for non ansi & other old compilers. Since such things are no longer supported we do nothing. We keep then since some of our code may still be needed to upgrade old customers. */ some of our code may still be needed to upgrade old customers. */ #define _VARARGS(X) X #define _STATIC_VARARGS(X) X #define _PC(X) X Loading Loading @@ -440,12 +449,16 @@ typedef SOCKET_SIZE_TYPE size_socket; /* #define FN_NO_CASE_SENCE */ /* #define FN_UPPER_CASE TRUE */ /* Io buffer size; Must be a power of 2 and a multiple of 512. May be /* Io buffer size; Must be a power of 2 and a multiple of 512. May be smaller what the disk page size. This influences the speed of the isam btree library. eg to big to slow. */ isam btree library. eg to big to slow. */ #define IO_SIZE 4096 /* How much overhead does malloc have. The code often allocates something like 1024-MALLOC_OVERHEAD bytes */ /* How much overhead does malloc have. The code often allocates something like 1024-MALLOC_OVERHEAD bytes */ #ifdef SAFEMALLOC #define MALLOC_OVERHEAD (8+24+4) #else Loading Loading @@ -563,8 +576,10 @@ extern double my_atof(const char*); #define FLT_MAX ((float)3.40282346638528860e+38) #endif /* Max size that must be added to a so that we know Size to make adressable obj. */ /* Max size that must be added to a so that we know Size to make adressable obj. */ typedef long my_ptrdiff_t; #define MY_ALIGN(A,L) (((A) + (L) - 1) & ~((L) - 1)) #define ALIGN_SIZE(A) MY_ALIGN((A),sizeof(double)) Loading Loading @@ -635,8 +650,10 @@ typedef long longlong; #endif #ifdef USE_RAID /* The following is done with a if to not get problems with pre-processors with late define evaluation */ /* The following is done with a if to not get problems with pre-processors with late define evaluation */ #if SIZEOF_OFF_T == 4 #define SYSTEM_SIZEOF_OFF_T 4 #else Loading Loading @@ -700,8 +717,10 @@ typedef char bool; /* Ordinary boolean values 0 1 */ #define INT32(v) (int32) (v) #define MYF(v) (myf) (v) /* Defines to make it possible to prioritize register assignments. No longer needed with moder compilers */ /* Defines to make it possible to prioritize register assignments. No longer that important with modern compilers. */ #ifndef USING_X #define reg1 register #define reg2 register Loading Loading @@ -902,9 +921,11 @@ typedef union { #endif /* sint2korr */ /* Define-funktions for reading and storing in machine format from/to /* Define-funktions for reading and storing in machine format from/to short/long to/from some place in memory V should be a (not register) variable, M is a pointer to byte */ register) variable, M is a pointer to byte */ #ifdef WORDS_BIGENDIAN Loading
sql/mysqld.cc +2 −0 Original line number Diff line number Diff line Loading @@ -4289,4 +4289,6 @@ template class I_List<THD>; template class I_List_iterator<THD>; template class I_List<i_string>; template class I_List<i_string_pair>; FIX_GCC_LINKING_PROBLEM #endif