Commit d3d56609 authored by unknown's avatar unknown
Browse files

yassl changeset 2:

  remove FIX_GCC_LINKING_PROBLEM and -DDEFINE_CXA_PURE_VIRTUAL
  replace echo in configure.in with AC_MSG_WARN/AC_MSG_ERROR
  don't set -DUSE_MYSYS_NEW for gcc 2.95
  set $USE_MYSYS_NEW even if CXX is g++
  yassl bugfixes
  instantiate all yassl templates explicitly


client/Makefile.am:
  mysqlbinlog as a c++ program may need my_new.cc (if CXX=gcc)
  no FIX_GCC_LINKING_PROBLEM anymore - it's in my_new.cc
client/mysqladmin.cc:
  no FIX_GCC_LINKING_PROBLEM anymore - it's in my_new.cc
client/mysqlbinlog.cc:
  no FIX_GCC_LINKING_PROBLEM anymore - it's in my_new.cc
configure.in:
  echo should be AC_MSG_WARN or AC_MSG_ERROR
  don't set -DUSE_MYSYS_NEW for gcc 2.95 (to restore old behaviour)
  set $USE_MYSYS_NEW even if CXX is g++ (for yassl, as it can be linked with C programs)
  remove -DDEFINE_CXA_PURE_VIRTUAL - -DUSE_MYSYS_NEW is enough
extra/yassl/mySTL/list.hpp:
  bugfixes
extra/yassl/src/Makefile.am:
  no need to mess with CXXFLAGS anymore. Instantiate all templates explicitly
extra/yassl/src/crypto_wrapper.cpp:
  instantiate templates explicitly
extra/yassl/src/yassl_imp.cpp:
  instantiate templates explicitly
extra/yassl/src/yassl_int.cpp:
  instantiate templates explicitly
extra/yassl/taocrypt/include/runtime.hpp:
  use -DUSE_MYSYS_NEW not -DDEFINE_CXA_PURE_VIRTUAL
  assert in __cxa_pure_virtual
  remove dummy (and thus dangerous) __cxa_guard_acquire/__cxa_guard_release
extra/yassl/taocrypt/src/Makefile.am:
  no need to mess with CXXFLAGS anymore. Instantiate all templates explicitly
extra/yassl/taocrypt/src/integer.cpp:
  instantiate templates explicitly
extra/yassl/taocrypt/src/rsa.cpp:
  instantiate templates explicitly
include/my_global.h:
  no FIX_GCC_LINKING_PROBLEM anymore - it's in my_new.cc
mysys/my_new.cc:
  no FIX_GCC_LINKING_PROBLEM anymore - it's in my_new.cc
server-tools/instance-manager/command.cc:
  no FIX_GCC_LINKING_PROBLEM anymore - it's in my_new.cc
sql/ha_blackhole.cc:
  typo fixed
sql/ha_innodb.cc:
  warning fixed
sql/item_func.cc:
  use LL()
sql/mysqld.cc:
  no FIX_GCC_LINKING_PROBLEM anymore - it's in my_new.cc
parent 927d747a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -30,10 +30,10 @@ noinst_HEADERS = sql_string.h completion_hash.h my_readline.h \
mysql_SOURCES =			mysql.cc readline.cc sql_string.cc completion_hash.cc
mysqladmin_SOURCES =		mysqladmin.cc
mysql_LDADD =			@readline_link@ @TERMCAP_LIB@ $(LDADD) $(CXXLDFLAGS)
mysqlbinlog_LDADD =		$(LDADD) $(CXXLDFLAGS)
mysqltest_SOURCES=		mysqltest.c $(top_srcdir)/mysys/my_getsystime.c
mysqltest_LDADD =		$(top_builddir)/regex/libregex.a $(LDADD)
mysqlbinlog_SOURCES =   mysqlbinlog.cc $(top_srcdir)/mysys/mf_tempdir.c
mysqlbinlog_SOURCES =   mysqlbinlog.cc $(top_srcdir)/mysys/mf_tempdir.c $(top_srcdir)/mysys/my_new.cc
mysqlbinlog_LDADD =		$(LDADD) $(CXXLDFLAGS)
mysqltestmanagerc_SOURCES =   mysqlmanagerc.c 
mysqltestmanager_pwgen_SOURCES =   mysqlmanager-pwgen.c 
sql_src=log_event.h mysql_priv.h log_event.cc my_decimal.h my_decimal.cc
+0 −3
Original line number Diff line number Diff line
@@ -1346,6 +1346,3 @@ static my_bool wait_pidfile(char *pidfile, time_t last_modified,
  }
  DBUG_RETURN(error);
}
#ifdef __GNUC__
FIX_GCC_LINKING_PROBLEM
#endif
+0 −1
Original line number Diff line number Diff line
@@ -1458,4 +1458,3 @@ int main(int argc, char** argv)
#include "log_event.cc"
#endif
FIX_GCC_LINKING_PROBLEM
+40 −34
Original line number Diff line number Diff line
@@ -294,7 +294,7 @@ case "$target_os" in
         AC_SYS_COMPILER_FLAG(-belf,sco_belf_option,CFLAGS,[],[
         case "$LDFLAGS" in
           *-belf*) ;;
           *) echo "Adding -belf option to ldflags."
           *) AC_MSG_WARN([Adding -belf option to ldflags.])
              LDFLAGS="$LDFLAGS -belf"
           ;;
         esac
@@ -305,7 +305,7 @@ case "$target_os" in
         case "$LDFLAGS" in
           *-belf*) ;;
           *)
	     echo "Adding -belf option to ldflags."
	     AC_MSG_WARN([Adding -belf option to ldflags.])
             LDFLAGS="$LDFLAGS -belf"
           ;;
         esac
@@ -336,7 +336,6 @@ AC_SUBST(LD)
AC_SUBST(INSTALL_SCRIPT)

export CC CXX CFLAGS LD LDFLAGS AR
echo "GXX: $GXX"
if test "$GXX" = "yes"
then
  # mysqld requires -fno-implicit-templates.
@@ -344,22 +343,29 @@ then
  # mysqld doesn't use run-time-type-checking, so we disable it.
  CXXFLAGS="$CXXFLAGS -fno-implicit-templates -fno-exceptions -fno-rtti"

  #CXX_VERNO=`echo $CXX_VERSION | sed -e 's/[[^0-9. ]]//g; s/^ *//g; s/ .*//g'`
  echo "CXX: $CXX"
  CXX_VERNO=`echo $CXX_VERSION | sed -e 's/[[^0-9. ]]//g; s/^ *//g; s/ .*//g'`
  case "$CXX_VERNO" in
    3.*)
      USE_MYSYS_NEW="-DUSE_MYSYS_NEW" # yassl needs it
      if echo $CXX | grep gcc > /dev/null 2>&1
      then
    echo "Setting CXXFLAGS"
        # 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.
    CXXFLAGS="$CXXFLAGS -DUSE_MYSYS_NEW -DDEFINE_CXA_PURE_VIRTUAL"
    echo "Using MYSYS_NEW for static linking with gcc"
        CXXFLAGS="$CXXFLAGS $USE_MYSYS_NEW"
        AC_MSG_WARN([Using MYSYS_NEW for static linking with gcc])
      fi
    ;;
    *)
      USE_MYSYS_NEW=""
    ;;
  esac
  AC_SUBST(USE_MYSYS_NEW)
fi

# Avoid bug in fcntl on some versions of linux
AC_MSG_CHECKING("if we should use 'skip-locking' as default for $target_os")
# Any wariation of Linux
# Any variation of Linux
if expr "$target_os" : "[[Ll]]inux.*" > /dev/null
then
  MYSQLD_DEFAULT_SWITCHES="--skip-locking"
@@ -937,7 +943,7 @@ case $SYSTEM_TYPE in
  *solaris2.7*)
    # Solaris 2.7 has a broken /usr/include/widec.h
    # Make a fixed copy in ./include
    echo "Fixing broken include files for $SYSTEM_TYPE"
    AC_MSG_WARN([Fixing broken include files for $SYSTEM_TYPE])
    echo "  - Creating local copy of widec.h"
    if test ! -d include
    then
@@ -951,7 +957,7 @@ case $SYSTEM_TYPE in
  *solaris2.8*)
    # Solaris 2.8 has a broken /usr/include/widec.h
    # Make a fixed copy in ./include
    echo "Fixing broken include files for $SYSTEM_TYPE"
    AC_MSG_WARN([Fixing broken include files for $SYSTEM_TYPE])
    echo "  - Creating local copy of widec.h"
    if test ! -d include
    then
@@ -963,7 +969,7 @@ case $SYSTEM_TYPE in
    CXXFLAGS="$CXXFLAGS -DHAVE_CURSES_H -I$builddir/include -DHAVE_RWLOCK_T"
    ;;
  *solaris2.5.1*)
    echo "Enabling getpass() workaround for Solaris 2.5.1"
    AC_MSG_WARN([Enabling getpass() workaround for Solaris 2.5.1])
    CFLAGS="$CFLAGS -DHAVE_BROKEN_GETPASS -DSOLARIS -DHAVE_RWLOCK_T";
    CXXFLAGS="$CXXFLAGS -DHAVE_RWLOCK_T -DSOLARIS"
    ;;
@@ -972,26 +978,26 @@ case $SYSTEM_TYPE in
    CXXFLAGS="$CXXFLAGS -DHAVE_RWLOCK_T"
    ;;
  *SunOS*)
    echo "Enabling getpass() workaround for SunOS"
    AC_MSG_WARN([Enabling getpass() workaround for SunOS])
    CFLAGS="$CFLAGS -DHAVE_BROKEN_GETPASS -DSOLARIS";
    ;;
  *hpux10.20*)
    echo "Enabling workarounds for hpux 10.20"
    AC_MSG_WARN([Enabling workarounds for hpux 10.20])
    CFLAGS="$CFLAGS -DHAVE_BROKEN_SNPRINTF -DSIGNALS_DONT_BREAK_READ -DDO_NOT_REMOVE_THREAD_WRAPPERS -DHPUX10 -DSIGNAL_WITH_VIO_CLOSE -DHAVE_BROKEN_PTHREAD_COND_TIMEDWAIT -DHAVE_POSIX1003_4a_MUTEX"
    CXXFLAGS="$CXXFLAGS -DHAVE_BROKEN_SNPRINTF -D_INCLUDE_LONGLONG -DSIGNALS_DONT_BREAK_READ -DDO_NOT_REMOVE_THREAD_WRAPPERS -DHPUX10 -DSIGNAL_WITH_VIO_CLOSE -DHAVE_BROKEN_PTHREAD_COND_TIMEDWAIT -DHAVE_POSIX1003_4a_MUTEX"
    if test "$with_named_thread" = "no"
    then 
      echo "Using --with-named-thread=-lpthread"
      AC_MSG_WARN([Using --with-named-thread=-lpthread])
      with_named_thread="-lcma"
    fi
    ;;
  *hpux11.*)
    echo "Enabling workarounds for hpux 11"
    AC_MSG_WARN([Enabling workarounds for hpux 11])
    CFLAGS="$CFLAGS -DHPUX11  -DSNPRINTF_RETURN_TRUNC -DHAVE_BROKEN_PREAD -DDONT_USE_FINITE -DHAVE_BROKEN_GETPASS -DNO_FCNTL_NONBLOCK -DDO_NOT_REMOVE_THREAD_WRAPPERS -DHAVE_BROKEN_PTHREAD_COND_TIMEDWAIT"
    CXXFLAGS="$CXXFLAGS -DHPUX11  -DSNPRINTF_RETURN_TRUNC -DHAVE_BROKEN_PREAD -DDONT_USE_FINITE -D_INCLUDE_LONGLONG -DNO_FCNTL_NONBLOCK -DDO_NOT_REMOVE_THREAD_WRAPPERS -DHAVE_BROKEN_PTHREAD_COND_TIMEDWAIT"
    if test "$with_named_thread" = "no"
    then 
      echo "Using --with-named-thread=-lpthread"
      AC_MSG_WARN([Using --with-named-thread=-lpthread])
      with_named_thread="-lpthread"
    fi
    # Fixes for HPUX 11.0 compiler
@@ -1047,7 +1053,7 @@ case $SYSTEM_TYPE in
    fi
    ;;
  *freebsd*)
    echo "Adding fix for interrupted reads"
    AC_MSG_WARN([Adding fix for interrupted reads])
    OSVERSION=`sysctl -a | grep osreldate | awk '{ print $2 }'`
    if test "$OSVERSION" -gt "480100" && \
       test "$OSVERSION" -lt "500000" || \
@@ -1060,13 +1066,13 @@ case $SYSTEM_TYPE in
    fi
    ;;
  *netbsd*)
    echo "Adding flag -Dunix"
    AC_MSG_WARN([Adding flag -Dunix])
    CFLAGS="$CFLAGS -Dunix"
    CXXFLAGS="$CXXFLAGS -Dunix"
    OVERRIDE_MT_LD_ADD="\$(top_srcdir)/mit-pthreads/obj/libpthread.a"
    ;;
  *bsdi*)
    echo "Adding fix for BSDI"
    AC_MSG_WARN([Adding fix for BSDI])
    CFLAGS="$CFLAGS -D__BSD__ -DHAVE_BROKEN_REALPATH"
    AC_DEFINE_UNQUOTED([SOCKOPT_OPTLEN_TYPE], [size_t],
                       [Last argument to get/setsockopt])
@@ -1074,13 +1080,13 @@ case $SYSTEM_TYPE in
   *sgi-irix6*)
    if test "$with_named_thread" = "no"
    then 
      echo "Using --with-named-thread=-lpthread"
      AC_MSG_WARN([Using --with-named-thread=-lpthread])
      with_named_thread="-lpthread"
    fi
    CXXFLAGS="$CXXFLAGS -D_BOOL"
    ;;
    *aix4.3*)
      echo "Adding defines for AIX"
      AC_MSG_WARN([Adding defines for AIX])
      CFLAGS="$CFLAGS -Wa,-many -DUNDEF_HAVE_INITGROUPS -DSIGNALS_DONT_BREAK_READ"
      CXXFLAGS="$CXXFLAGS -Wa,-many -DUNDEF_HAVE_INITGROUPS -DSIGNALS_DONT_BREAK_READ"
    ;;
@@ -1088,11 +1094,11 @@ dnl Is this the right match for DEC OSF on alpha?
    *dec-osf*)
      if test "$ac_cv_prog_gcc" = "yes" && test "$host_cpu" = "alpha"
      then
	  echo "Adding defines for DEC OSF on alpha"
	  AC_MSG_WARN([Adding defines for DEC OSF on alpha])
	  CFLAGS="$CFLAGS -mieee"
	  CXXFLAGS="$CXXFLAGS -mieee"
      fi
      echo "Adding defines for OSF1"
      AC_MSG_WARN([Adding defines for OSF1])
      # gethostbyname_r is deprecated and doesn't work ok on OSF1
      CFLAGS="$CFLAGS -DUNDEF_HAVE_GETHOSTBYNAME_R -DSNPRINTF_RETURN_TRUNC"
      CXXFLAGS="$CXXFLAGS -DUNDEF_HAVE_GETHOSTBYNAME_R -DSNPRINTF_RETURN_TRUNC"
@@ -1379,7 +1385,7 @@ then
	    CXX="$CXX -Kthread -DUNIXWARE_7 -DHAVE_BROKEN_RWLOCK";
          fi
        else
          { echo "configure: error: Can't find thread libs on SCO UnixWare7. See the Installation chapter in the Reference Manual." 1>&2; exit 1; };
          { AC_MSG_ERROR([configure: error: Can't find thread libs on SCO UnixWare7. See the Installation chapter in the Reference Manual.]) };
        fi
      else
        AC_MSG_RESULT("no")
@@ -1425,7 +1431,7 @@ then
      fi
      AC_MSG_RESULT("yes")
    else
      { echo "configure: error: Can't find thread libs on SCO UnixWare7. See the Installation chapter in the Reference Manual." 1>&2; exit 1; };
      { AC_MSG_ERROR([configure: error: Can't find thread libs on SCO UnixWare7. See the Installation chapter in the Reference Manual.]) };
    fi
  else
    AC_MSG_RESULT("no")
@@ -1468,7 +1474,7 @@ then
      fi
      AC_MSG_RESULT("yes")
    else
      { echo "configure: error: Can't find thread libs on Caldera OpenUNIX 8. See the Installation chapter in the Reference Manual." 1>&2; exit 1; };
      { AC_MSG_ERROR([configure: error: Can't find thread libs on Caldera OpenUNIX 8. See the Installation chapter in the Reference Manual.]) };
    fi
  else
    AC_MSG_RESULT("no")
@@ -2239,7 +2245,7 @@ if test "$with_tools" = "yes"
then
  if test "$THREAD_SAFE_CLIENT" = "no"
  then
    echo "Warning: extra-tools disabled because --enable-thread-safe-client wasn't used"
    AC_MSG_WARN([extra-tools disabled because --enable-thread-safe-client wasn't used])
  else
    tools_dirs="tools"
  fi
+5 −5
Original line number Diff line number Diff line
@@ -91,14 +91,14 @@ public:
        {
            iterator tmp = *this;
            current_ = current_->next_;
            return tmp;
            return *this;
        }

        iterator& operator--(int)
        {
            iterator tmp = *this;
            current_ = current_->prev_;
            return tmp;
            return *this;
        }

        bool operator==(const iterator& other) const
@@ -237,8 +237,8 @@ void list<T>::pop_back()
template<typename T> 
T list<T>::back() const
{
    if (back == 0) return 0;
    return back->value_;
    if (tail_ == 0) return 0;
    return tail_->value_;
}


Loading