/*
 * machine configuration flags
 *
 * Copyright 1992 by Gray Watson and the Antaire Corporation
 *
 * This file is part of the malloc-debug package.
 *
 * This 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.
 *
 * This 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 this library (see COPYING-LIB); if not, write to the
 * Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 *
 * The author of the program may be contacted at gray.watson@antaire.com
 *
 * $Id: conf.h.in,v 1.1 2006/06/22 19:35:29 itk Exp $
 */

/*
 ************************************************************************
 * USER SETTINGS:
 ************************************************************************
 */

/*
 * include the RCS ids in the .c files and the installed library
 */
#define INCLUDE_RCS_IDS 1

/*
 * should we allow zero length allocations or should be registered as errors.
 * WARNING: this has not been tested although some code does exist for it.
 */
#define ALLOW_ALLOC_ZERO_SIZE 1

/*
 * should we allow realloc of a NULL pointer.  this is useful when you are
 * extending an array in a loop and do not want to allocate it specially the
 * first time.
 */
#define ALLOW_REALLOC_NULL 1

/*
 ************************************************************************
 * SPECIAL DEFINES:
 ************************************************************************
 */

/*
 * (char *)sbrk(int incr) is the main system memory allocation routine.  this
 * extends the program's data space by INCR bytes.
 */
#define HAVE_SBRK 0

/*
 * does your heap grow up?  Hopefully it does because there is not too much
 * support for growing-down heaps because I do not have a system to test it on.
 */
#define HEAP_GROWS_UP 1

/*
 * the alignment value of all allocations in number of bits (i.e. 2 ^ X) for
 * fence-post checking.  it needs to be a base 2 number and 3 (i.e. 2 ^ 3 == 8)
 * should work.  2 bits may also work on i386/i486 systems (for instance) but
 * some RISC boxes (sparc for instance) require certain memory to be base 8
 * (stack frames, code, etc.).
 *
 * NOTE: larger the number the more memory will be wasted when fence-checking
 * NOTE: this is not necessarily the smallest possible allocated memory chunk
 */
#define ALLOCATION_ALIGNMENT_IN_BITS 3

/*
 ************************************************************************
 * LIBRARY DEFINES:
 ************************************************************************
 */

/*
 * the Malloc-Debug library provides its own versions of the following
 * functions,  or knows how to work around their absence.
 */
#define HAVE_BCMP 0
#define HAVE_BCOPY 0

#define HAVE_MEMCMP 0
#define HAVE_MEMCPY 0
#define HAVE_MEMSET 0

#define HAVE_INDEX 0
#define HAVE_RINDEX 0

#define HAVE_STRCAT 0
#define HAVE_STRCMP 0
#define HAVE_STRLEN 0
#define HAVE_STRTOK 0

/*
 * the below functions are here to provide function argument checking only.
 */
#define HAVE_BZERO 0

#define HAVE_MEMCCPY 0
#define HAVE_MEMCHR 0

#define HAVE_STRCHR 0
#define HAVE_STRRCHR 0
#define HAVE_STRCPY 0
#define HAVE_STRNCPY 0
#define HAVE_STRCASECMP 0
#define HAVE_STRNCASECMP 0
#define HAVE_STRSPN 0
#define HAVE_STRCSPN 0
#define HAVE_STRNCAT 0
#define HAVE_STRNCMP 0
#define HAVE_STRPBRK 0
#define HAVE_STRSTR 0

/*
 * some defines to standardize memory functions
 */
#if HAVE_BCMP == 0
#define bcmp(s1, s2, len)	(void)memcmp((char *)(s1), (char *)(s2), (len))
#endif

#if HAVE_BCOPY == 0
#define bcopy(from, to, len)	(void)memcpy((char *)(to), (char *)(from), len)
#endif
