aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFred Fish <fnf@specifix.com>1996-12-28 22:33:53 +0000
committerFred Fish <fnf@specifix.com>1996-12-28 22:33:53 +0000
commitd6eecef07b2d34a41f1e4f37cc5a01cdb4570b73 (patch)
tree6e67893858b295a0820037419eee28e13edf9103
parent39bf0ef4e6797058928dc5c8fe44fb3a26d4f5c4 (diff)
downloadfsf-binutils-gdb-d6eecef07b2d34a41f1e4f37cc5a01cdb4570b73.zip
fsf-binutils-gdb-d6eecef07b2d34a41f1e4f37cc5a01cdb4570b73.tar.gz
fsf-binutils-gdb-d6eecef07b2d34a41f1e4f37cc5a01cdb4570b73.tar.bz2
* Makefile.in (mm.o): New target that combines all the functions
into a single object module. This avoids client programs picking up part of the allocation routines from mmalloc and part from libc, which can lead to undefined behavior. (CFILES): Add mm.c (TARGETOBJS): Define to be either the individual objects or the single combined object. (TARGETLIB): Create the archive using TARGETOBJS. * mm.c: New file that simply #includes the other source C files.
-rw-r--r--mmalloc/.Sanitize1
-rw-r--r--mmalloc/mm.c37
2 files changed, 38 insertions, 0 deletions
diff --git a/mmalloc/.Sanitize b/mmalloc/.Sanitize
index cd8b13d..48c5377 100644
--- a/mmalloc/.Sanitize
+++ b/mmalloc/.Sanitize
@@ -34,6 +34,7 @@ detach.c
keys.c
mcalloc.c
mfree.c
+mm.c
mmalloc.c
mmalloc.h
mmalloc.texi
diff --git a/mmalloc/mm.c b/mmalloc/mm.c
new file mode 100644
index 0000000..b555f09
--- /dev/null
+++ b/mmalloc/mm.c
@@ -0,0 +1,37 @@
+/* Build the entire mmalloc library as a single object module. This
+ avoids having clients pick up part of their allocation routines
+ from mmalloc and part from libc, which results in undefined
+ behavior. It should also still be possible to build the library
+ as a standard library with multiple objects.
+
+ Copyright 1996 Free Software Foundation
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library 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
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+#include "mcalloc.c"
+#include "mfree.c"
+#include "mmalloc.c"
+#include "mmcheck.c"
+#include "mmemalign.c"
+#include "mmstats.c"
+#include "mmtrace.c"
+#include "mrealloc.c"
+#include "mvalloc.c"
+#include "mmap-sup.c"
+#include "attach.c"
+#include "detach.c"
+#include "keys.c"
+#include "sbrk-sup.c"