summaryrefslogtreecommitdiffstats
path: root/Include/mymalloc.h
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1994-08-01 11:34:53 (GMT)
committerGuido van Rossum <guido@python.org>1994-08-01 11:34:53 (GMT)
commitb6775db241f5fe5e3dc2ca09fc6c9e6164d4b2af (patch)
tree9362939305b2d088b8f19a530c9015d886bc2801 /Include/mymalloc.h
parent2979b01ff88ac4c5b316d9bf98edbaaaffac8e24 (diff)
downloadcpython-b6775db241f5fe5e3dc2ca09fc6c9e6164d4b2af.zip
cpython-b6775db241f5fe5e3dc2ca09fc6c9e6164d4b2af.tar.gz
cpython-b6775db241f5fe5e3dc2ca09fc6c9e6164d4b2af.tar.bz2
Merge alpha100 branch back to main trunk
Diffstat (limited to 'Include/mymalloc.h')
-rw-r--r--Include/mymalloc.h39
1 files changed, 11 insertions, 28 deletions
diff --git a/Include/mymalloc.h b/Include/mymalloc.h
index 24e2125..ea676c3 100644
--- a/Include/mymalloc.h
+++ b/Include/mymalloc.h
@@ -5,7 +5,7 @@ extern "C" {
#endif
/***********************************************************
-Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
+Copyright 1991, 1992, 1993, 1994 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
All Rights Reserved
@@ -32,41 +32,35 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifdef macintosh
#define ANY void
-#ifndef THINK_C_3_0
-#define HAVE_STDLIB
-#endif
-#endif
-
-#ifdef sun
-/* Maybe not for very old versions of SunOS ? */
-#define HAVE_STDLIB
-#endif
-
-#ifdef sgi
-#define HAVE_STDLIB
#endif
#ifdef __STDC__
#define ANY void
-#define HAVE_STDLIB
#endif
#ifdef __TURBOC__
#define ANY void
-#define HAVE_STDLIB
#endif
#ifdef __GNUC__
#define ANY void
-#define HAVE_STDLIB
#endif
#ifndef ANY
#define ANY char
#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#else /* !HAVE_STDLIB */
+extern ANY *malloc PROTO((size_t));
+extern ANY *calloc PROTO((size_t, size_t));
+extern ANY *realloc PROTO((ANY *, size_t));
+extern void free PROTO((ANY *)); /* XXX sometimes int on Unix old systems */
+#endif /* !HAVE_STDLIB */
+
#ifndef NULL
-#define NULL 0
+#define NULL ((ANY *)0)
#endif
/* XXX Always allocate one extra byte, since some malloc's return NULL
@@ -80,17 +74,6 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define DEL(p) free((ANY *)p)
#define XDEL(p) if ((p) == NULL) ; else DEL(p)
-#ifdef HAVE_STDLIB
-#include <stdlib.h>
-#define MALLARG size_t
-#else
-#define MALLARG size_t
-extern ANY *malloc PROTO((MALLARG));
-extern ANY *calloc PROTO((MALLARG, MALLARG));
-extern ANY *realloc PROTO((ANY *, MALLARG));
-extern void free PROTO((ANY *)); /* XXX sometimes int on Unix old systems */
-#endif
-
#ifdef __cplusplus
}
#endif