mariadb/mysys/my_new.cc
unknown d3d5660952 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
2005-04-30 19:48:45 +02:00

58 lines
1.3 KiB
C++

/* Copyright (C) 2000 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/*
This is a replacement of new/delete operators to be used when compiling
with gcc 3.0.x to avoid including libstdc++
*/
#include "mysys_priv.h"
#ifdef USE_MYSYS_NEW
void *operator new (size_t sz)
{
return (void *) malloc (sz ? sz : 1);
}
void *operator new[] (size_t sz)
{
return (void *) malloc (sz ? sz : 1);
}
void operator delete (void *ptr)
{
if (ptr)
free(ptr);
}
void operator delete[] (void *ptr) throw ()
{
if (ptr)
free(ptr);
}
C_MODE_START
int __cxa_pure_virtual() {
assert("Pure virtual method called." == "Aborted");
return 0;
}
C_MODE_END
#endif /* USE_MYSYS_NEW */