#ifndef __MMALLOC_H
#define __MMALLOC_H 1
-/* Ugly kludge to work around problem with some vendors (Sun for example)
- that ship the ANSI <stdlib.h> file with non-ANSI compliant declarations
- for malloc(), realloc(), calloc(), and free(). Since we don't use
- these functions internally, but simply provide compatible replacements
- layered on top of the m* equivalents, just hide whatever definitions
- <stdlib.h> might supply. */
-
-#define malloc hide_malloc
-#define calloc hide_calloc
-#define realloc hide_realloc
-#define free hide_free
-
#ifdef __STDC__
# include <stddef.h>
-# include <stdlib.h>
# define PTR void *
# define CONST const
# define PARAMS(paramlist) paramlist
# define NULL (void *) 0
# endif
#else
-# undef size_t
-# define size_t unsigned int
-# define CHAR_BIT 8
# define PTR char *
# define CONST /* nothing */
# define PARAMS(paramlist) ()
+# ifndef size_t
+# define size_t unsigned int
+# endif
+# ifndef CHAR_BIT
+# define CHAR_BIT 8
+# endif
# ifndef NULL
# define NULL 0
# endif
#endif
-#undef malloc /* Undo the kludge to hide non-ANSI compliant declarations */
-#undef calloc
-#undef realloc
-#undef free
-
-#if defined(USG)
-# include <string.h>
-#endif
-
#ifndef MIN
# define MIN(A, B) ((A) < (B) ? (A) : (B))
#endif