summaryrefslogtreecommitdiff
path: root/mysys/my_new.cc
diff options
context:
space:
mode:
authorunknown <monty@hundin.mysql.fi>2002-02-07 21:34:35 +0200
committerunknown <monty@hundin.mysql.fi>2002-02-07 21:34:35 +0200
commit3942e44524777ead3d8c5dd314fd0b7bc3e13f32 (patch)
tree67009f11ad55cd9073d02909883f5369a74f101f /mysys/my_new.cc
parent8a56717c4ce14aa7e36e04a8dc880dcc1311ea28 (diff)
downloadmariadb-git-3942e44524777ead3d8c5dd314fd0b7bc3e13f32.tar.gz
Update to autoconf 2.52
Fix of InnoDB variables in SHOW VARIABLES Fix for ALTER TABLE and InnoDB BUILD/FINISH.sh: Update to autoconf 2.52 BUILD/SETUP.sh: Update to autoconf 2.52 BUILD/compile-alpha: Update to autoconf 2.52 BUILD/compile-pentium-gcov: Update to autoconf 2.52 BUILD/compile-pentium-gprof: Update to autoconf 2.52 BUILD/compile-pentium: Update to autoconf 2.52 Docs/manual.texi: Changelog acconfig.h: Update to autoconf 2.52 acinclude.m4: Update to autoconf 2.52 bdb/dist/configure.in: Update to autoconf 2.52 client/Makefile.am: Update to autoconf 2.52 configure.in: Update to autoconf 2.52 mysql-test/r/innodb.result: Update of InnoDB Cardinality values mysys/Makefile.am: Update to autoconf 2.52 scripts/Makefile.am: Update to autoconf 2.52 sql/ha_innobase.cc: Fix of InnoDB variables in SHOW VARIABLES sql/ha_innobase.h: Fix of InnoDB variables in SHOW VARIABLES sql/sql_table.cc: Fix for ALTER TABLE and InnoDB support-files/my-huge.cnf.sh: Fixed typo support-files/my-large.cnf.sh: Fixed typo support-files/my-medium.cnf.sh: Fixed typo support-files/my-small.cnf.sh: Fixed typo
Diffstat (limited to 'mysys/my_new.cc')
-rw-r--r--mysys/my_new.cc49
1 files changed, 49 insertions, 0 deletions
diff --git a/mysys/my_new.cc b/mysys/my_new.cc
new file mode 100644
index 00000000000..5cc291af9aa
--- /dev/null
+++ b/mysys/my_new.cc
@@ -0,0 +1,49 @@
+/* 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 : sz);
+}
+
+void *operator new[] (size_t sz)
+{
+ return (void *) malloc (sz ? sz+1 : sz);
+}
+
+void operator delete (void *ptr)
+{
+ if (ptr)
+ free(ptr);
+}
+
+void operator delete[] (void *ptr) throw ()
+{
+ if (ptr)
+ free(ptr);
+}
+
+#endif /* USE_MYSYS_NEW */
+