home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-04-14 | 121.9 KB | 4,335 lines |
- diff -rc --new-file dbmalloc-1.14-base/.configure dbmalloc-1.14/.configure
- *** dbmalloc-1.14-base/.configure Thu Jan 1 00:00:00 1970
- --- dbmalloc-1.14/.configure Mon Aug 15 17:55:54 1994
- ***************
- *** 0 ****
- --- 1,37 ----
- +
- + #if (__GNUC__ == 2) && __STDC__
- +
- + #define VOIDTYPE void
- + #define CONST const
- + #define EXITTYPE void
- + #define DATATYPE void
- + #define SIZETYPE size_t
- + #define FREETYPE void
- + #define MEMDATA void
- + #define MEMSIZE size_t
- + #define MEMCMPTYPE unsigned char
- + #define STRSIZE size_t
- + #define STRCMPTYPE char
- +
- + #else /* (__GNUC__ == 2) && __STDC__ */
- +
- +
- + #if (__GNUC__ == 2)
- +
- + #define VOIDTYPE void
- + #define CONST
- + #define EXITTYPE void
- + #define DATATYPE void
- + #define SIZETYPE size_t
- + #define FREETYPE void
- + #define MEMDATA void
- + #define MEMSIZE size_t
- + #define MEMCMPTYPE unsigned char
- + #define STRSIZE size_t
- + #define STRCMPTYPE char
- +
- + #endif /* (__GNUC__ == 2) */
- +
- +
- + #endif /* (__GNUC__ == 2) && __STDC__ */
- +
- diff -rc --new-file dbmalloc-1.14-base/.configure.s dbmalloc-1.14/.configure.s
- *** dbmalloc-1.14-base/.configure.s Thu Jan 1 00:00:00 1970
- --- dbmalloc-1.14/.configure.s Thu Jan 12 13:50:14 1995
- ***************
- *** 0 ****
- --- 1,114 ----
- + /*
- + * This file is mechanically generated by the Configure script.
- + * If there is something wrong here, modify the configure script
- + * so that it is no longer generated wrong and please send email
- + * to the author so that the fix is included with the next patch
- + * release.
- + */
- +
- + #ifndef _SYSDEF_H /* double inclusion guard */
- + #define _SYSDEF_H 1
- +
- +
- + #if (__GNUC__ == 2) && __STDC__
- +
- + /*
- + * Signal to use to abort program
- + */
- + #define ABORT_SIGNAL SIGABRT
- +
- + /*
- + * Use setenv() for env mods
- + */
- + #define USE_SETENV 1
- +
- + /*
- + * POSIX header files are available
- + */
- + #define POSIX_HEADERS 1
- +
- + /*
- + * ANSI header files are available
- + */
- + #define ANSI_HEADERS 1
- +
- + /*
- + * ASM settings that only apply to 80x86 systems
- + */
- +
- + /*
- + * Use Underscores for ASM global symbols
- + */
- + /* #define USE_UNDERSCORE 1 */
- +
- + /*
- + * Use REPE instruction for ASM repeat op
- + */
- + /*#define USE_REPE 1*/
- +
- + #define WRTSIZE /* *GUESS* */
- +
- + #else /* (__GNUC__ == 2) && __STDC__ */
- +
- +
- + #if (__GNUC__ == 2)
- +
- + /*
- + * Signal to use to abort program
- + */
- + #define ABORT_SIGNAL SIGABRT
- +
- + /*
- + * Use setenv() for env mods
- + */
- + #define USE_SETENV 1
- +
- + /*
- + * POSIX header files are available
- + */
- + #define POSIX_HEADERS 1
- +
- + /*
- + * ANSI header files are available
- + */
- + #define ANSI_HEADERS 1
- +
- + /*
- + * ASM settings that only apply to 80x86 systems
- + */
- +
- + /*
- + * Use Underscores for ASM global symbols
- + */
- + /* #define USE_UNDERSCORE 1 */
- +
- + /*
- + * Use REPE instruction for ASM repeat op
- + */
- + /*#define USE_REPE 1*/
- +
- + #define WRTSIZE size_t
- +
- + #endif /* (__GNUC__ == 2) */
- +
- +
- + #endif /* (__GNUC__ == 2) && __STDC__ */
- +
- + /*
- + * Didn't find X intrinsic file in /gnu/include/X11
- + */
- + /* #define FOUND_X_INTRINSIC 1 */
- +
- + /*
- + * Found wait.h in /gnu/include/sys
- + */
- + #define NEED_WAIT 1
- +
- + /*
- + * don't force inclusion of XtHeap
- + */
- + #define DONT_FORCE_HEAPSTUFF 1
- +
- +
- + #endif /* _SYSDEF_H */
- +
- diff -rc --new-file dbmalloc-1.14-base/Configure dbmalloc-1.14/Configure
- *** dbmalloc-1.14-base/Configure Sun May 1 23:28:56 1994
- --- dbmalloc-1.14/Configure Thu Jan 1 00:00:00 1970
- ***************
- *** 1,1293 ****
- - #!/bin/sh
- - #
- - #
- - # (c) Copyright 1990, 1991, 1992 Conor P. Cahill (cpcahil@virtech.vti.com)
- - #
- - # This software may be distributed freely as long as the following conditions
- - # are met:
- - # * the distribution, or any derivative thereof, may not be
- - # included as part of a commercial product
- - # * full source code is provided including this copyright
- - # * there is no charge for the software itself (there may be
- - # a minimal charge for the copying or distribution effort)
- - # * this copyright notice is not modified or removed from any
- - # source file
- - #
- - # $Id: Configure,v 1.22 1992/08/22 16:27:13 cpcahil Exp $
- - #
- - # This shell script attempts to automatically determine the correct settings
- - # for the malloc library include file and compile pre-defines. This script has
- - # been tested by the author in the following environments:
- - #
- - # Intel 486 ISC UNIX 3.0 cc & gcc 2.1
- - # Intel 486 DELL SVR4 cc & gcc 1.40
- - # HP9000 HP/UX 8.0 cc & cc -Aa -D_POSIX_SOURCE
- - # AT&T 3B2-600 SVR4.1ES cc (relaxed ansi - no cc flags)
- - # IBM RS6000 AIX 3.1 cc
- - # Sun Sparc 2 SunOS 4.1.1 cc
- - #
- - # It has also been reported to work in the following environments:
- - #
- - # DG AViiON DG/UX gcc 2.1 & cc (which is gcc -traditional)
- - # Sun Sparc 2 SunOS 4.1.1 cc (apparently in the sys5 environment)
- - # Hp 9000/400 HP-UX 7.0x cc
- - # Hp 9000/700 HP-UX 8.05 cc
- - # Sun Sparc SunOs 4.1.1 cc (in bsd environment)
- - # Motorola 88K SysV 3.2
- - # DecStation 5100 Ultrix 4.2
- - # IBM rs/6000 AIX 3.1.1
- - # IBM rs/6000 AIX 3.2
- - # Intel 486 ESIX SysV 4.0
- - #
- - # If you run this script in a different environment it may not work correctly or
- - # it may make an incorrect determination, so be more cautious about the results.
- - #
- - SP=" "
- - CCFILE=CF$$c
- - CCLIST="gcc2 gcc como CC g++ c89 cc pcc"
- - CONFFILE=.configure
- - DIRLIST="`echo $PATH | tr ':' ' '`"
- - INCDIR=/usr/include
- - LIBDIRS="/lib /usr/lib /usr/ucb/lib"
- - TMPDIR=/tmp
- - TMPBREAK=${TMPDIR}/CF$$break
- - TMPCC=${TMPDIR}/CF$$cc
- - TMPCCFILE=${TMPDIR}/${CCFILE}.c
- - TMPCOMP=${TMPDIR}/CF$$cmp
- - TMPDEF=${TMPDIR}/CF$$def
- - TMPEND=${TMPDIR}/CF$$end
- - TMPFATAL=${TMPDIR}/CF$$fatal
- - TMPFIRST=${TMPDIR}/CF$$first
- - TMPFOUND=${TMPDIR}/CF$$fnd
- - TMPPREDEF=${TMPDIR}/CF$$pred
- - TMPSET=${TMPDIR}/CF$$set
- - TMPSKIPPED=${TMPDIR}/CF$$skip
- - WARN_REGEXP="[Ww]arning|^w "\"".*"\"",L[0-9]*/C[0-9]*:"
- -
- - if [ $# != 0 ]; then
- - debug=$1
- -
- - if [ $debug -gt 10 ]; then
- - set -x
- - fi
- - else
- - debug=0
- - fi
- -
- - #
- - # if we already have a configuration
- - #
- - if [ $# = 0 -a -s "${CONFFILE}" -a -s "${CONFFILE}.s" ]; then
- -
- - echo "Using existing configuration. If this is not correct, you"
- - echo "need to remove the ${CONFFILE} file and re-run the make"
- -
- - else
- -
- - echo "Determining the correct configuration for malloc.h on this" \
- - "system."
- - echo "This may take a while, please be patient"
- -
- -
- - #
- - # Determine default sizetype (for use when we are guessing at
- - # parameter settings).
- - #
- - grep size_t ${INCDIR}/sys/types.h >/dev/null 2>&1
- - if [ $? = 0 ]; then
- - dfltsize=size_t
- - else
- - dfltsize="unsigned int"
- - fi
- -
- - #
- - # determine the compiler(s) that are available on this system
- - #
- -
- - echo " Looking for compilers..."
- - rm -f ${TMPCOMP}
- - touch ${TMPCOMP}
- -
- - #
- - # if in debug mode and the compiler is specified as an argument
- - #
- - if [ $# -gt 1 ]; then
- - echo $2 > ${TMPCOMP}
- - else
- -
- - #
- - # look for the listed compilers. Note that cc is last. This
- - # is as it should be because cc is probably the only compiler
- - # listed that doesn't have one of the pre-defined symbols that
- - # we look for and therefore must be last because the
- - # configuration check loop requires that all compilers other
- - # than the last compiler have one of the pre-defined symbols.
- - #
- - for compiler in ${CCLIST}
- - do
- - for dir in ${DIRLIST}
- - do
- - if [ -s $dir/$compiler ]; then
- - echo " found $compiler in $dir"
- - echo $dir/$compiler >> ${TMPCOMP}
- - #
- - # if this is gcc, also add a second
- - # entry with the -traditional flag
- - #
- - if [ $compiler = "gcc" ]; then
- - echo $dir/$compiler \
- - -traditional >> ${TMPCOMP}
- - fi
- -
- - break
- - fi
- - done
- - done
- -
- - #
- - # if we didn't find any compilers
- - #
- - if [ ! -s ${TMPCOMP} ]; then
- - echo "I can't find your compiler"
- - echo 1 > ${TMPFATAL}
- - exit 1
- - fi
- -
- - fi
- -
- - rm -f ${TMPSET} ${TMPEND} ${TMPSET}.s ${TMPEND}.s ${TMPFIRST} ${TMPSKIPPED}
- -
- - cp /dev/null ${TMPSET}
- - cp /dev/null ${TMPSET}.s
- - cp /dev/null ${TMPEND}
- - cp /dev/null ${TMPEND}.s
- - first=1
- - ending=
- - #
- - # for each compiler.
- - #
- - echo " checking compiler configuration(s)..."
- - while read cc
- - do
- - (
- - echo " checking $cc..."
- -
- - #
- - # if we should be using any special flags for this compile
- - #
- - if [ -s Config.flags ]; then
- - newcc="`basename $cc`"
- - newcc="`eval grep \"\^$newcc\" Config.flags`"
- - if [ ! -z "$newcc" ]; then
- - cc="$newcc"
- - fi
- - fi
- -
- - if [ -s ${TMPFIRST} ]; then
- - #
- - # See if the current set of defines meets the conditions
- - # for this compiler. If so, there is no need to verify
- - # the parameters further.
- - #
- - rm -f ${TMPCCFILE}
- - cat ${TMPSET} ${TMPEND} cctest.c > ${TMPCCFILE}
- - $cc -DMALLOC_COMPILETEST -DMEM_COMPILETEST \
- - -DSTR_COMPILETEST -DFREE_COMPILETEST -DEXITTEST\
- - -c ${TMPCCFILE} >${TMPCC} 2>&1
- - ccresult=$?
- -
- - rm -f ${TMPCCFILE}
- -
- - if [ $ccresult = 0 ]; then
- - if egrep "${WARN_REGEXP}" ${TMPCC}>/dev/null; then
- - rm ${TMPCC};
- - else
- - continue
- - fi
- - fi
- -
- - #
- - # otherwise if the last compiler didn't have a
- - # pre-defined symbol we can't add another set
- - # because it would conflict with the previous
- - # set of definitions.
- - #
- - if [ ! -s ${TMPPREDEF} ]; then
- -
- - echo "${SP}More than one compiler and no way to tell the" \
- - "difference between them"
- - echo "${SP}So, hopefully the one set of defs will suffice"
- - echo "break" > ${TMPBREAK}
- - exit
- - fi
- -
- - PREDEF=`cat ${TMPPREDEF}`
- -
- - if [ ! -s ${TMPSKIPPED} ]; then
- - echo >> ${TMPSET}
- - echo "#else /* $PREDEF */" >> ${TMPSET}
- - echo >> ${TMPSET}
- -
- - echo >> ${TMPSET}.s
- - echo "#else /* $PREDEF */" >> ${TMPSET}.s
- - echo >> ${TMPSET}.s
- - fi
- -
- - fi
- -
- - #
- - # add the appropriate #ifdef to the settings file for this
- - # compiler (if it has any)
- - #
- - $cc -DPRE_DEFINES -o cctest cctest.c > /dev/null 2>&1
- -
- - ./cctest > ${TMPPREDEF}1
- -
- - if [ ! -s ${TMPPREDEF}1 ]; then
- - echo "skipped" >> ${TMPSKIPPED}
- - echo "${SP}Failed to determine pre-definitions for this compiler"
- - echo "${SP} skipping this set of pre-defs. NOTE: this problem"
- - echo "${SP} is usually caused by a compiler installed without"
- - echo "${SP} its libraries (like g++)"
- - exit 0
- -
- - else
- -
- - rm -f ${TMPSKIPPED}
- -
- - PREDEF=`cat ${TMPPREDEF}1`
- -
- - if [ "x${PREDEF}" = "xnone" ]; then
- - cp /dev/null ${TMPPREDEF}
- - PREDEF=""
- - else
- -
- - mv ${TMPPREDEF}1 ${TMPPREDEF}
- -
- - echo >> ${TMPSET}
- - echo "#if $PREDEF" >> ${TMPSET}
- - echo >> ${TMPSET}
- -
- - if [ -s ${TMPEND}.o ]; then
- - rm -f ${TMPEND}.o
- - fi
- - if [ -s ${TMPEND} ]; then
- - mv ${TMPEND} ${TMPEND}.o
- - fi
- - echo > ${TMPEND}
- - echo "#endif /* $PREDEF */" >> ${TMPEND}
- - echo >> ${TMPEND}
- -
- - if [ -s ${TMPEND}.o ]; then
- - cat ${TMPEND}.o >> ${TMPEND}
- - rm -f ${TMPEND}.o
- - fi
- -
- - echo >> ${TMPSET}.s
- - echo "#if $PREDEF" >> ${TMPSET}.s
- - echo >> ${TMPSET}.s
- -
- - if [ -s ${TMPEND}.s.o ]; then
- - rm -f ${TMPEND}.s.o
- - fi
- - if [ -s ${TMPEND}.s ]; then
- - mv ${TMPEND}.s ${TMPEND}.s.o
- - fi
- - echo > ${TMPEND}.s
- - echo "#endif /* $PREDEF */" >> ${TMPEND}.s
- - echo >> ${TMPEND}.s
- -
- - if [ -s ${TMPEND}.s.o ]; then
- - cat ${TMPEND}.s.o >> ${TMPEND}.s
- - rm -f ${TMPEND}.s.o
- - fi
- - fi
- - fi
- -
- - #
- - # flag that this is not the first time
- - #
- - echo "second" > ${TMPFIRST}
- -
- - #
- - # First step is to determine the correct settings for the
- - # DATATYPE, SIZETYPE and VOIDTYPE pre-defines for this compiler.
- - #
- - # Check void
- - #
- - $cc -DVOIDTEST -c cctest.c > ${TMPCC} 2>&1
- - cc_result=$?
- - egrep "${WARN_REGEXP}" ${TMPCC} > /dev/null 2>&1
- - grep_result=$?
- -
- - if [ $cc_result = 0 -a $grep_result != 0 ] ; then
- - voidtype=void
- - else
- - voidtype=int
- - fi
- -
- - echo "#define VOIDTYPE $voidtype" >> ${TMPSET}
- -
- - #
- - # Check const
- - #
- - $cc -DCONSTTEST -c cctest.c > ${TMPCC} 2>&1
- - cc_result=$?
- - egrep "${WARN_REGEXP}" ${TMPCC} > /dev/null 2>&1
- - grep_result=$?
- -
- - if [ $cc_result = 0 -a $grep_result != 0 ] ; then
- - const=const
- - else
- - const=
- - fi
- -
- - echo "#define CONST $const" >> ${TMPSET}
- -
- - #
- - # Check ABORT_SIGNAL. Note that this goes into the settings.s
- - # file which eventually goes into sysdefs.h
- - #
- - $cc -DSIGABRTTEST -c cctest.c > ${TMPCC} 2>&1
- - cc_result=$?
- - egrep "${WARN_REGEXP}" ${TMPCC} > /dev/null 2>&1
- - grep_result=$?
- - if [ $cc_result = 0 -a $grep_result != 0 ] ; then
- - abortsig=SIGABRT
- - else
- - $cc -DSIGIOTTEST -c cctest.c > ${TMPCC} 2>&1
- - cc_result=$?
- - egrep "${WARN_REGEXP}" ${TMPCC} > /dev/null 2>&1
- - grep_result=$?
- - if [ $cc_result = 0 -a $grep_result != 0 ] ; then
- - abortsig=SIGIOT
- - else
- - abortsig=6
- - fi
- - fi
- -
- - echo "/*" >> ${TMPSET}.s
- - echo " * Signal to use to abort program " >> ${TMPSET}.s
- - echo " */" >> ${TMPSET}.s
- - echo "#define ABORT_SIGNAL $abortsig" >> ${TMPSET}.s
- - echo "" >> ${TMPSET}.s
- -
- - #
- - # Check SETENV stuff. Note that this goes into the settings.s
- - # file which eventually goes into sysdefs.h
- - #
- - $cc -DSETENVTEST cctest.c > ${TMPCC} 2>&1
- - cc_result=$?
- - egrep "${WARN_REGEXP}" ${TMPCC} > /dev/null 2>&1
- - gres=$?
- - grep "setenv" ${TMPCC} > /dev/null 2>&1
- - gres2=$?
- - if [ $cc_result = 0 -a $gres != 0 -a $gres2 != 0 ]; then
- - echo "/*" >> ${TMPSET}.s
- - echo " * Use setenv() for env mods" >> ${TMPSET}.s
- - echo " */" >> ${TMPSET}.s
- - echo "#define USE_SETENV 1" >> ${TMPSET}.s
- - echo "" >> ${TMPSET}.s
- - fi
- -
- - #
- - # Check to see if POSIX header files (in particular,
- - # <unistd.h>) are available
- - #
- - $cc -DPOSIXHEADERTEST cctest.c > ${TMPCC} 2>&1
- - cc_result=$?
- - egrep "$WARN_REGEXP" ${TMPCC} > /dev/null 2>&1
- - gres=$?
- - if [ $cc_result = 0 -a $gres != 0 ]; then
- - echo "/*" >> ${TMPSET}.s
- - echo " * POSIX header files are available" >> ${TMPSET}.s
- - echo " */" >> ${TMPSET}.s
- - echo "#define POSIX_HEADERS 1" >> ${TMPSET}.s
- - echo "" >> ${TMPSET}.s
- - USE_UNISTD=-DUSE_UNISTD
- - else
- - USE_UNISTD=
- - fi
- -
- - #
- - # Check to see if ANSI header files (in particular,
- - # <stdlib.h>) are available
- - #
- - $cc -DANSIHEADERTEST cctest.c > ${TMPCC} 2>&1
- - cc_result=$?
- - egrep "$WARN_REGEXP" ${TMPCC} > /dev/null 2>&1
- - gres=$?
- - if [ $cc_result = 0 -a $gres != 0 ]; then
- - echo "/*" >> ${TMPSET}.s
- - echo " * ANSI header files are available" >> ${TMPSET}.s
- - echo " */" >> ${TMPSET}.s
- - echo "#define ANSI_HEADERS 1" >> ${TMPSET}.s
- - echo "" >> ${TMPSET}.s
- - USE_STDLIB=-DUSE_STDLIB
- - else
- - USE_STDLIB=
- - fi
- -
- - #
- - # Check the type of exit
- - #
- -
- - for type in ${voidtype} int
- - do
- - $cc -DEXITTEST ${USE_UNISTD} ${USE_STDLIB} \
- - -DEXITTYPE=${type} -c cctest.c > ${TMPCC} 2>&1
- - cc_result=$?
- - egrep "${WARN_REGEXP}" ${TMPCC} > /dev/null 2>&1
- - grep_result=$?
- -
- - if [ $cc_result = 0 -a $grep_result != 0 ] ; then
- - exittype=${type}
- - break
- - else
- - exittype=
- - fi
- - done
- -
- - if [ "x${exittype}" != "x" ]; then
- - echo "#define EXITTYPE $exittype" >> ${TMPSET}
- - else
- - echo "${SP}couldn't determine the correct setting for"
- - echo "${SP} the return type of exit, guessing"
- - echo "${SP} VOIDTYPE"
- - echo "#define EXITTYPE VOIDTYPE /* *GUESS* */" \
- - >> ${TMPSET}
- - fi
- -
- - #
- - # Check to see if <malloc.h> is available -- if it
- - # isn't, we don't have to try using it later in the
- - # script and things will go faster
- - #
- - $cc -DMALLOCHTEST cctest.c > ${TMPCC} 2>&1
- - cc_result=$?
- - egrep "$WARN_REGEXP" ${TMPCC} > /dev/null 2>&1
- - gres=$?
- - if [ $cc_result = 0 -a $gres != 0 ]; then
- - USE_MALLOC=-DUSE_MALLOC
- - else
- - USE_MALLOC=
- - fi
- -
- - #
- - # check ASM stuff for i386 systems (need for underscore and/or repe
- - # instruction
- - #
- - echo "/*" >> ${TMPSET}.s
- - echo " * ASM settings that only apply to 80x86 systems ">> ${TMPSET}.s
- - echo " */" >> ${TMPSET}.s
- - echo "" >> ${TMPSET}.s
- -
- - $cc -DASM_UNDTEST cctest.c > ${TMPCC} 2>&1
- - cc_result=$?
- - if [ -s a.out ]; then
- - res=`./a.out 2>&1`
- - else
- - res=""
- - fi
- -
- - echo "/*" >> ${TMPSET}.s
- - echo " * Use Underscores for ASM global symbols" >> ${TMPSET}.s
- - echo " */" >> ${TMPSET}.s
- - if [ $cc_result = 0 -a "$res" = "OK" ]; then
- - cflag="-DUSE_UNDERSCORE"
- - echo "#define USE_UNDERSCORE 1" >> ${TMPSET}.s
- - else
- - cflag=""
- - echo "/* #define USE_UNDERSCORE 1 */" >> ${TMPSET}.s
- - fi
- - echo "" >> ${TMPSET}.s
- -
- - $cc -DASM_REPTEST $cflag cctest.c > ${TMPCC} 2>&1
- - cc_result=$?
- - if [ -s a.out ]; then
- - res=`./a.out 2>&1`
- - else
- - res=""
- - fi
- -
- - echo "/*" >> ${TMPSET}.s
- - echo " * Use REPE instruction for ASM repeat op" >> ${TMPSET}.s
- - echo " */" >> ${TMPSET}.s
- -
- - if [ $cc_result = 0 -a "$res" = "OK" ]; then
- - echo "#define USE_REPE 1" >> ${TMPSET}.s
- - else
- - echo "/*#define USE_REPE 1*/" >> ${TMPSET}.s
- - fi
- - echo "" >> ${TMPSET}.s
- -
- - #
- - # the only way to test the malloc and size datatypes is to
- - # define them and install them into the test malloc.h to
- - # see if they are valid
- - #
- - # NOTE: this will fail if a prior version of the debug
- - # malloc.h is in the include path for the compiler before
- - # the system malloc.h file.
- - #
- -
- - #
- - # check settings for malloc
- - #
- - if [ "$debug" -gt 0 ]; then
- - DSP="${SP} "
- - echo "${DSP}Checking malloc"
- - DSP="${DSP} "
- - fi
- -
- - rm -f ${TMPDEF}
- - for fileinc in ${USE_STDLIB} ${USE_MALLOC} "${USE_STDLIB} ${USE_MALLOC}"
- - do
- - for datatype in void char
- - do
- - for sizetype in size_t int "unsigned int" \
- - long "unsigned long"
- - do
- - if [ $debug != 0 ]; then
- - echo "${DSP}data:$datatype size:$sizetype"
- - fi
- -
- - #
- - # compile the test module
- - #
- - $cc -DDATATYPE="$datatype" -DSIZETYPE="$sizetype" \
- - $fileinc -DCONST="$const" -DMALLOC_COMPILETEST \
- - -c cctest.c >${TMPCC} 2>&1
- - result=$?
- -
- - if [ $debug -gt 5 ]; then
- - cat ${TMPCC}
- - fi
- - if [ $result = 0 ]; then
- - egrep "${WARN_REGEXP}" ${TMPCC} > /dev/null 2>&1
- - if [ $? != 0 ]; then
- - echo "#define DATATYPE $datatype" > ${TMPDEF}
- - echo "#define SIZETYPE $sizetype" >> ${TMPDEF}
- - break
- - fi
- - fi
- -
- - done
- -
- - if [ -s ${TMPDEF} ]; then
- - break
- - fi
- -
- - done
- -
- - if [ -s ${TMPDEF} ]; then
- - break
- - fi
- -
- - done
- -
- - if [ ! -s ${TMPDEF} ]; then
- - #
- - # guess at what the correct settings should be. If the compiler
- - # supports the void data type, guess that the pointer returned
- - # by malloc is a void * and the size is size_t, otherwise use
- - # char * and unsigned int
- - #
- - if [ "$voidtype" = void ]; then
- - datatype=void
- - sizetype=size_t
- - else
- - datatype=char
- - sizetype="unsigned int"
- - fi
- -
- - echo "${SP}couldn't determine the correct settings for the datatype"
- - echo "${SP} and sizetype parameters for malloc, guessing that the"
- - echo "${SP} datatype is $datatype and sizetype is $sizetype"
- -
- - #
- - # put the guesses into the tmpdef file and flag them as a guess
- - #
- - echo "#define DATATYPE $datatype /* *GUESS* */" > ${TMPDEF}
- - echo "#define SIZETYPE $sizetype /* *GUESS* */" >> ${TMPDEF}
- - fi
- -
- - cat < ${TMPDEF} >> ${TMPSET}
- -
- - rm -f ${TMPDEF}
- - for fileinc in ${USE_STDLIB} ${USE_MALLOC} "${USE_STDLIB} ${USE_MALLOC}"
- - do
- - for freetype in ${voidtype} int
- - do
- - if [ $debug != 0 ]; then
- - echo "${DSP}freetype:$freetype"
- - fi
- -
- - #
- - # compile the test module
- - #
- - $cc -DFREETYPE="$freetype" -DDATATYPE="$datatype" \
- - $fileinc -DCONST="$const" -DFREE_COMPILETEST \
- - -c cctest.c >${TMPCC} 2>&1
- - result=$?
- -
- - if [ $debug -gt 5 ]; then
- - cat ${TMPCC}
- - fi
- - if [ $result = 0 ]; then
- - egrep "${WARN_REGEXP}" ${TMPCC} > /dev/null 2>&1
- - if [ $? != 0 ]; then
- - echo "#define FREETYPE $freetype" > ${TMPDEF}
- - break
- - fi
- - fi
- - done
- -
- - if [ -s ${TMPDEF} ]; then
- - break;
- - fi
- - done
- -
- - if [ ! -s ${TMPDEF} ]; then
- - #
- - # guess at what the correct settings should be.
- - #
- -
- - echo "${SP}couldn't determine the correct settings for the return"
- - echo "${SP} value of free, guessing VOIDTYPE"
- -
- - #
- - # put the guesses into the tmpdef file and flag them as a guess
- - #
- - echo "#define FREETYPE VOIDTYPE /* *GUESS* */" > ${TMPDEF}
- - fi
- -
- - cat < ${TMPDEF} >> ${TMPSET}
- -
- - #
- - # check settings for memory functions
- - #
- - if [ "$debug" -gt 0 ]; then
- - DSP="${SP} "
- - echo "${DSP}Checking memory functions"
- - DSP="${DSP} "
- - fi
- - rm -f ${TMPDEF}
- -
- - #
- - # see if we should try to use string.h if memory.h fails.
- - #
- - if grep "memcpy" ${INCDIR}/string.h > /dev/null 2>&1; then
- - extra="-DUSE_STRING_H"
- - else
- - extra=""
- - fi
- -
- - #
- - # for each include file we are checking
- - #
- - for fileinc in -DUSE_MEMORY_H $extra
- - do
- - if [ $debug -ge 1 ]; then
- - echo "${DSP}checking inc: $fileinc"
- - ODSP="${DSP}"
- - DSP="${DSP} "
- - fi
- - for datatype in void char
- - do
- - for sizetype in size_t int "unsigned int" long "unsigned long"
- - do
- - if [ $debug -ge 3 ]; then
- - echo "${DSP}data:$datatype size:$sizetype"
- - fi
- -
- - #
- - # compile the test module
- - #
- - $cc -DMEMDATA="$datatype" -DMEMSIZE="$sizetype" \
- - -DCONST="$const" -DMEM_COMPILETEST \
- - $fileinc -c cctest.c >${TMPCC} 2>&1
- - result=$?
- - if [ $debug -gt 10 ]; then
- - cat ${TMPCC}
- - fi
- - if [ $result = 0 ]; then
- - egrep "${WARN_REGEXP}" ${TMPCC} > /dev/null 2>&1
- - if [ $? != 0 ]; then
- - echo "#define MEMDATA $datatype" > ${TMPDEF}
- - echo "#define MEMSIZE $sizetype" >> ${TMPDEF}
- - break
- - fi
- - fi
- -
- - done
- -
- - if [ -s ${TMPDEF} ]; then
- - break
- - fi
- - done
- -
- - if [ $debug -ge 1 ]; then
- - DSP="${ODSP}"
- - fi
- -
- - if [ -s ${TMPDEF} ]; then
- - break;
- - fi
- -
- - done
- -
- - if [ ! -s ${TMPDEF} ]; then
- - #
- - # guess at what the correct settings should be. If the compiler
- - # supports the void data type, guess that the pointer used by
- - # memcpy is a void * and the size is size_t, otherwise use
- - # char * and unsigned int
- - #
- - if [ "$voidtype" = void ]; then
- - datatype=void
- - sizetype=size_t
- - else
- - datatype=char
- - sizetype="unsigned int"
- - fi
- -
- - echo "${SP}Couldn't determine the correct settings for the datatype"
- - echo "${SP} and sizetype parameters for mem* functions, I will"
- - echo "${SP} guess that the datatype is $datatype and sizetype"
- - echo "${SP} is $sizetype"
- -
- - #
- - # put the guesses into the tmpdef file and flag them as a guess
- - #
- - echo "#define MEMDATA $datatype /* *GUESS* */" > ${TMPDEF}
- - echo "#define MEMSIZE $sizetype /* *GUESS* */" >> ${TMPDEF}
- - fi
- -
- - cat < ${TMPDEF} >> ${TMPSET}
- -
- - #
- - # check memory comparison setting
- - #
- - if [ "$debug" -gt 0 ]; then
- - DSP="${SP} "
- - echo "${DSP}Checking memory func comparision type"
- - DSP="${DSP} "
- - fi
- - rm -f ${TMPDEF}
- - for comptype in "char" "unsigned char" "signed char"
- - do
- - if [ "x$comptype" = "xchar" ]; then
- - testtype=TESTCHAR
- - else
- - testtype=TESTUCHAR
- - fi
- -
- - #
- - # compile the test module
- - #
- - rm -f cctest
- - $cc -D$testtype -DCOMPARETEST=memcmp \
- - cctest.c -o cctest >${TMPCC} 2>&1
- -
- - if [ -s ./cctest ]; then
- - ./cctest
- - if [ $? = 0 ]; then
- - echo "#define MEMCMPTYPE $comptype" \
- - > ${TMPDEF}
- - break
- - fi
- - fi
- - rm -f ${TMPCC};
- - done
- -
- - if [ ! -s ${TMPDEF} ]; then
- - #
- - # if we don't know, then guess the natural character type
- - # (which may be signed or unsigned)
- - #
- - comptype=char
- -
- - echo "${SP}Couldn't determine the correct settings for the"
- - echo "${SP} comparison type for the memory funcs, I will guess"
- - echo "${SP} that the comparison type is $comptype"
- -
- - #
- - # put the guesses into the tmpdef file and flag them as a guess
- - #
- - echo "#define MEMCMPTYPE $comptype /* *GUESS* */" > ${TMPDEF}
- - fi
- -
- - cat < ${TMPDEF} >> ${TMPSET}
- -
- - #
- - # check settings for string functions
- - #
- - rm -f ${TMPDEF}
- - for sizetype in size_t int "unsigned int" long "unsigned long"
- - do
- - #
- - # compile the test module
- - #
- - $cc -DSTRSIZE="$sizetype" -DCONST="$const" \
- - -DSTR_COMPILETEST -c cctest.c >${TMPCC} 2>&1
- -
- - if [ $? = 0 ]; then
- - if egrep "${WARN_REGEXP}" ${TMPCC}>/dev/null; then
- - rm ${TMPCC};
- - else
- - echo "#define STRSIZE $sizetype" > ${TMPDEF}
- - break
- - fi
- - fi
- -
- - done
- -
- - if [ ! -s ${TMPDEF} ]; then
- - #
- - # guess at what the correct setting should be. If size_t is in
- - # /usr/include/string.h, use it, otherwise use the default size
- - # type
- - #
- - if grep size_t ${INCDIR}/string.h >/dev/null 2>&1; then
- - sizetype=size_t
- - else
- - sizetype="$dfltsize"
- - fi
- -
- - echo "${SP}Couldn't determine the correct settings for the sizetype"
- - echo "${SP} parameter for the string functions. I will guess "
- - echo "${SP} that the correct setting is $sizetype"
- -
- - #
- - # put the guesses into the tmpdef file and flag them as a guess
- - #
- - echo "#define STRSIZE $sizetype /* *GUESS* */" >> ${TMPDEF}
- - fi
- -
- - cat < ${TMPDEF} >> ${TMPSET}
- -
- - #
- - # check string comparison setting
- - #
- - rm -f ${TMPDEF}
- - for comptype in "char" "unsigned char" "signed char"
- - do
- - if [ "x$comptype" = "xchar" ]; then
- - testtype=TESTCHAR
- - else
- - testtype=TESTUCHAR
- - fi
- -
- - #
- - # compile the test module
- - #
- - rm -f cctest
- - $cc -D$testtype -DCOMPARETEST=strncmp \
- - cctest.c -o cctest >${TMPCC} 2>&1
- -
- - if [ -s ./cctest ]; then
- - ./cctest
- - if [ $? = 0 ]; then
- - echo "#define STRCMPTYPE $comptype" \
- - > ${TMPDEF}
- - break
- - fi
- - fi
- - rm -f ${TMPCC};
- - done
- -
- - if [ ! -s ${TMPDEF} ]; then
- - #
- - # if we don't know, then guess the natural character type
- - # (which may be signed or unsigned)
- - #
- - comptype=char
- -
- - echo "${SP}Couldn't determine the correct settings for the"
- - echo "${SP} comparison type for the string funcs, I will guess"
- - echo "${SP} that the comparison type is $comptype"
- -
- - #
- - # put the guesses into the tmpdef file and flag them as a guess
- - #
- - echo "#define STRCMPTYPE $comptype /* *GUESS* */" > ${TMPDEF}
- - fi
- -
- - cat < ${TMPDEF} >> ${TMPSET}
- -
- - #
- - # check settings for write size
- - #
- - rm -f ${TMPDEF}
- - for fileinc in -DUSE_SYSENT -DUSE_NONE
- - do
- - for sizetype in size_t "unsigned int" int long "unsigned long"
- - do
- - #
- - # compile the test module
- - #
- - $cc -DWRTSIZE="$sizetype" $fileinc -DCONST="$const" \
- - ${USE_UNISTD} ${USE_STDLIB} \
- - -DWRT_COMPILETEST -c cctest.c >${TMPCC} 2>&1
- -
- - if [ $? = 0 ]; then
- - if egrep "${WARN_REGEXP}" ${TMPCC} >/dev/null; then
- - rm ${TMPCC};
- - else
- - echo "#define WRTSIZE $sizetype" > ${TMPDEF}
- - break
- - fi
- - fi
- -
- - done
- - done
- -
- - if [ ! -s ${TMPDEF} ]; then
- - #
- - # if we don't know, then guess the natural character type
- - # (which may be signed or unsigned)
- - #
- - sizetype="$dfltsize"
- -
- - echo "${SP}Couldn't determine the correct settings for the"
- - echo "${SP} sizetype parameter for the write func, I will guess"
- - echo "${SP} that the sizetype is $sizetype"
- -
- - #
- - # put the guesses into the tmpdef file and flag them as a guess
- - #
- - echo "#define WRTSIZE $siztype /* *GUESS* */" > ${TMPDEF}
- - fi
- -
- - cat < ${TMPDEF} >> ${TMPSET}.s
- -
- - #
- - # now that we have the settings determined, lets see if we have
- - # any routines that are built in by the compiler. These will
- - # typically be string functions like strcpy and/or memory funcs
- - #
- - # -- not implemented yet
- - #
- -
- - ) < /dev/null
- -
- - if [ -s ${TMPBREAK} ]; then
- - break;
- - fi
- -
- - done < ${TMPCOMP}
- -
- - if [ -s ${TMPFATAL} ]; then
- - exit `cat ${TMPFATAL}`
- - fi
- -
- - cat ${TMPEND} >> ${TMPSET}
- -
- - cp ${TMPSET} ${CONFFILE}
- -
- - #
- - # now make the correct determinations for building the library (see
- - # what #defs are needed for the compilation).
- - #
- -
- - rm -f ${CONFFILE}.s
- - (
- - echo "/*"
- - echo " * This file is mechanically generated by the Configure script."
- - echo " * If there is something wrong here, modify the configure script"
- - echo " * so that it is no longer generated wrong and please send email"
- - echo " * to the author so that the fix is included with the next patch"
- - echo " * release."
- - echo " */"
- - echo ""
- - echo "#ifndef _SYSDEF_H /* double inclusion guard */"
- - echo "#define _SYSDEF_H 1"
- - echo ""
- - ) > ${CONFFILE}.s
- -
- - #
- - # put in the compiler settings
- - #
- - cat ${TMPSET}.s >> ${CONFFILE}.s
- -
- - if [ -s ${TMPEND}.s ]; then
- - cat ${TMPEND}.s >> ${CONFFILE}.s
- - fi
- -
- - rm -f ${TMPFOUND}
- -
- - #
- - # if we have the Intrinsic.h file, then set the flag to indicate so
- - #
- - if [ -s /usr/include/X11/Intrinsic.h ]; then
- - (
- - echo "/*"
- - echo " * Found X intrinsic file in /usr/include/X11"
- - echo " */"
- - echo "#define FOUND_X_INTRINSIC 1"
- - echo ""
- - ) >> ${CONFFILE}.s
- - else
- - (
- - echo "/*"
- - echo " * Didn't find X intrinsic file in /usr/include/X11"
- - echo " */"
- - echo "/* #define FOUND_X_INTRINSIC 1 */"
- - echo ""
- - ) >> ${CONFFILE}.s
- - fi
- -
- -
- - #
- - # if wait.h is present in /usr/include/sys/wait.h
- - #
- - if [ -s /usr/include/sys/wait.h ]; then
- - (
- - echo "/*"
- - echo " * Found wait.h in /usr/include/sys"
- - echo " */"
- - echo "#define NEED_WAIT 1"
- - echo ""
- - ) >> ${CONFFILE}.s
- - else
- - (
- - echo "/*"
- - echo " * Didn't find wait.h in /usr/include/sys"
- - echo " */"
- - echo "/* #define NEED_WAIT 1 */"
- - echo ""
- - ) >> ${CONFFILE}.s
- - fi
- -
- - #
- - # check to see if the XtAlloc module includes definitions for the Heap
- - # management. Note that this is generic for all compilers, so it
- - # will come after the per-compiler stuff in ${CONFFILE}.s
- - #
- - for i in $LIBDIRS
- - do
- - if [ -s $i/libXt.a ]; then
- - ar xv $i/libXt.a Alloc.o > /dev/null 2>&1
- - heap=`( nm Alloc.o | grep XtHeapInit ) 2>/dev/null`
- - rm -f Alloc.o
- - echo found >> ${TMPFOUND}
- -
- - if [ -z "$heap" ]; then
- -
- - (
- - echo "/*"
- - echo " * don't force inclusion of XtHeap"
- - echo " */"
- - echo "#define DONT_FORCE_HEAPSTUFF 1"
- - echo ""
- - ) >> ${CONFFILE}.s
- -
- - break
- - fi
- -
- - fi
- - done
- -
- - if [ ! -s ${TMPFOUND} ]; then
- - (
- - echo "/*"
- - echo " * don't force inclusion of XtHeap"
- - echo " */"
- - echo "#define DONT_FORCE_HEAPSTUFF 1"
- - echo ""
- - ) >> ${CONFFILE}.s
- - fi
- -
- - (
- - echo ""
- - echo "#endif /* _SYSDEF_H */"
- - echo ""
- - ) >> ${CONFFILE}.s
- -
- - fi
- -
- - #
- - # if we guessed at any of the settings, tell the user about it
- - #
- - if grep "\*GUESS\*" ${CONFFILE} ${CONFFILE}.s > /dev/null 2>&1; then
- - echo ""
- - echo " Warning: There were some settings that I could not determine"
- - echo " the correct values for and so I have guessed at the"
- - echo " correct settings. You should review the .configure"
- - echo " and .configure.s files and review the settings to"
- - echo " make sure they are correct. The settings that were"
- - echo " guessed at will be marked with '/* *GUESS* */'"
- - echo ""
- - echo " See the PROBLEMS file for a description of what the"
- - echo " settings are supposed to be"
- - echo ""
- - echo " Most of the time you can ignore this warning and"
- - echo " just continue with the compilation of the library"
- - echo " and have no problems."
- - echo ""
- - echo " Once you determine that the settings are correct, you"
- - echo " can remove the GUESS flags and you will no longer get"
- - echo " this warning when building the library"
- - echo ""
- - fi
- -
- - #
- - # Create malloc.h with the new settings
- - #
- - ed malloc.h.org <<ended > /dev/null 2>&1
- - /^DATATYPES_MARKER/
- - d
- - . r ${CONFFILE}
- - w malloc.h
- - q
- - ended
- -
- - #
- - # and now add in the system definitions
- - #
- - cp ${CONFFILE}.s sysdefs.h
- -
- - #
- - # and now handle the memset and memcpy routines (if it hasn't been done
- - # already)
- - #
- - if [ ! -s ${CONFFILE}.O ]; then
- -
- - #
- - # find compiler for testing modified modules Note that we only use cc
- - # or gcc for this step because we think that these are the only usefull
- - # compilers to perform this step
- - #
- - rm -f ${TMPCC}
- - for compiler in cc gcc
- - do
- - for dir in ${DIRLIST}
- - do
- - if [ -s ${dir}/${compiler} ]; then
- - echo "${dir}/${compiler}" > ${TMPCC}
- - break
- - fi
- - done
- - if [ -s ${TMPCC} ]; then
- - break;
- - fi
- - done
- -
- - cc=`cat ${TMPCC} < /dev/null`
- -
- - #
- - # find libc.a
- - #
- - for i in $LIBDIRS
- - do
- - if [ -s $i/libc.a ]; then
- -
- - LIBC=$i/libc.a
- - break
- -
- - fi
- - done
- -
- - ar xv ${LIBC} memcpy.o memset.o memmove.o > /dev/null 2>&1
- -
- - #
- - # If at least one of the modules were found, build the changestr module
- - #
- - if [ -s memset.o -o -s memcpy.o -o -s memmove.o ]; then
- -
- - ${cc} -DCHANGESTR cctest.c -o changestr > /dev/null 2>&1
- -
- - fi
- -
- - if [ -s memmove.o ]; then
- - TESTPGMS="memset memmove"
- - else
- - TESTPGMS="memset memcpy"
- - fi
- -
- - #
- - # if we found memset.o
- - #
- - for i in ${TESTPGMS}
- - do
- - #
- - # get the name of the target
- - #
- - case $i in
- - memmove|memcpy)
- - tgtstr=DataMC
- - tgtfile=datamc
- - def=TESTDATAMC
- - ;;
- - memset)
- - tgtstr=DataMS
- - tgtfile=datams
- - def=TESTDATAMS
- - ;;
- - esac
- -
- - rm -f ${tgtfile}.O
- -
- - if [ -s ${i}.o ]; then
- -
- - #
- - # change the file
- - #
- - chmod +w ${i}.o
- - ./changestr ${i}.o ${i} ${tgtstr}
- -
- - if [ $? = 0 ]; then
- -
- - #
- - # test new memset module
- - #
- - rm -f cctest
- - ${cc} -D${def} cctest.c -o cctest ${i}.o \
- - > /dev/null 2>&1
- -
- - if [ -s cctest ]; then
- - output=`./cctest`
- - else
- - output=0
- - fi
- - else
- - output=0
- - fi
- -
- - #
- - # if the output from the command is correct then
- - # save the .o file in DataMS.O so that the
- - # makefile knows to use it
- - #
- - if [ "x${output}" = "xx yyy" ]; then
- -
- - #
- - # move the object module so the makefile
- - # knows to use it
- - #
- - rm -f ${tgtfile}.O
- - mv ${i}.o ${tgtfile}.O
- - rm -f ${i}.o
- -
- - fi
- -
- - #
- - # clean up after ourselves
- - #
- - rm -f ${i}.o
- -
- - fi
- -
- - done
- -
- - echo "Configured .O files at `date`" >> ${CONFFILE}.O
- -
- - fi
- -
- - rm -f changestr
- -
- - #
- - # clean up after ourselves
- - #
- - rm -f ${TMPDIR}/CF$$* cctest cctest.o ${CCFILE}.[co] a.out
- --- 0 ----
- diff -rc --new-file dbmalloc-1.14-base/Makefile dbmalloc-1.14/Makefile
- *** dbmalloc-1.14-base/Makefile Sun May 1 23:28:54 1994
- --- dbmalloc-1.14/Makefile Thu Jan 1 00:00:00 1970
- ***************
- *** 1,354 ****
- - #
- - #
- - # (c) Copyright 1990, 1991, 1992 Conor P. Cahill (uunet!virtech!cpcahil).
- - #
- - # This software may be distributed freely as long as the following conditions
- - # are met:
- - # * the distribution, or any derivative thereof, may not be
- - # included as part of a commercial product
- - # * full source code is provided including this copyright
- - # * there is no charge for the software itself (there may be
- - # a minimal charge for the copying or distribution effort)
- - # * this copyright notice is not modified or removed from any
- - # source file
- - #
- - #
- - # $Id: Makefile,v 1.39 1992/08/22 16:27:13 cpcahil Exp $
- - #
- - # This is the Makefile for the malloc debugging library
- - #
- - # NOTE: while most porting changes are made here, the malloc.h file
- - # may require hand editing (mostly the DATATYPE and SIZETYPE
- - # typedefs) because of system wierdities.
- - #
- - # Usefull targets:
- - #
- - # all make all programs/libs in the local directory
- - # install install updated programs/libs
- - # frcinstall install all programs/libs
- - # tests build tests
- - # runtests build and run all tests
- - # clean clean up after yourself
- - # fullclean clean up everything (including configure stuff)
- - #
- - # NOTE: there are several other targets used by myself for souce code
- - # maintenance related functions. These are probably specific to my system
- - # and may not do what they are supposed to do in a different environment.
- - # Therefore, unless you know what you are doing, I would suggest not running
- - # them (hence why they are not documented here).
- - #
- - # And now, onto a few definitions that you may need to alter
- - #
- - # The following defines may be added as necessary to the CFLAGS definition:
- - #
- - # -DANSI_NULLS if you want to allow passing of NULL pointers to realloc
- - # and/or free (as ANSI does) even if the library is
- - # compiled by a non-ANSI compiler.
- - # -DNO_ANSI_NULLS if you DON'T want to allow passing of NULL pointers to
- - # realloc and/or free, even if the library is compiled by
- - # an ANSI conforming compiler.
- - # -DDONT_USE_ASM don't use ASM speedups when replacing system memcpy
- - # and/or memset routines
- - # -DCTYPE_SUPPORT=x where x is one of the following
- - #
- - # 1 - use plain-jane ctype.h which is only valid
- - # for the ansii character set (DEFAULT)
- - # 2 - use POSIX setlocal() to setup the character
- - # set definitions
- - # 3 - use C library islower() & toupper()
- - # functions
- - #
- - # NOTE: if you add any flags other than the above to the CFLAGS, you might want
- - # to add a similar arguement in the Config.flags file. However, you
- - # should remember that the malloc.h configuration will depend upon these
- - # settings and you could have a problem if you attempt to use the file
- - # in a compile session that doesn't include these flags.
- - #
- - CFLAGS=-g
- - #
- - # Where the code will be installed
- - #
- - # DESTDIR root for installation directory
- - # INSTDIR installation directory
- - # LIBINSTDIR install directory for library
- - # INCINSTDIR install directory for include files
- - # MANINSTDIR manual installation directory
- - # MANINSTNAME name to install the manual as
- - # MANINSTVER manual install version (use malloc.3 for troff/nroff
- - # source and malloc.man for pre-formatted)
- - #
- - DESTDIR=
- - INSTDIR=$(DESTDIR)/usr/local
- - LIBINSTDIR=$(INSTDIR)/lib
- - INCINSTDIR=$(INSTDIR)/debug_include
- - MANINSTDIR=$(INSTDIR)/man/man3
- - RANLIB=/usr/local/bin/ranlib
- - MANINSTNAME=dbmalloc.3
- - MANINSTVER=malloc.3
- -
- - #
- - # miscellaneous commands
- - #
- - # NOTE: if you change CC to a non-K&R compiler be sure to read the
- - # PROBLEMS file first.
- - #
- - CC=cc
- - CPROTO=/usr/local/bin/cproto
- - LINT=lint
- - NROFF=nroff
- - SHARCMD=makekit -p -m -nmallocshar.
- - SHELL=/bin/sh
- -
- - LIB=libdbmalloc.a
- - LINTLIB=llib-ldbmal.ln
- -
- - #
- - # You shouldn't have to modify anything below this line
- - #
- - LIBSRCS= malloc.c \
- - datamc.c \
- - datams.c \
- - dgmalloc.c \
- - fill.c \
- - free.c \
- - realloc.c \
- - calloc.c \
- - string.c \
- - mcheck.c \
- - mchain.c \
- - memory.c \
- - tostring.c \
- - m_perror.c \
- - m_init.c \
- - mallopt.c \
- - dump.c \
- - stack.c \
- - xmalloc.c \
- - xheap.c \
- - malign.c \
- - size.c \
- - abort.c \
- - leak.c
- -
- - LIBOBJS= malloc.o \
- - datamc.o \
- - datams.o \
- - dgmalloc.o \
- - fill.o \
- - free.o \
- - realloc.o \
- - calloc.o \
- - string.o \
- - mcheck.o \
- - mchain.o \
- - memory.o \
- - tostring.o \
- - m_perror.o \
- - m_init.o \
- - mallopt.o \
- - dump.o \
- - stack.o \
- - xmalloc.o \
- - xheap.o \
- - malign.o \
- - size.o \
- - abort.o \
- - leak.o
- -
- - SRCS=$(LIBSRCS) testmalloc.c testmem.c testerr.c teststack.c cctest.c
- - HDRS= malloc.h.org mallocin.h debug.h tostring.h
- -
- - BUILDFILES=malloc.man prototypes.h
- -
- - MANSRCFILES=patchlevel README PROBLEMS CHANGES Buildpatch minipatch Makefile \
- - malloc.3 malloc.man $(SRCS) $(HDRS) prototypes.h \
- - Configure Config.flags Runtests testerr.base
- - SRCFILES=MANIFEST $(MANSRCFILES)
- -
- - TESTS=testmalloc testmem testerr teststack
- -
- - all: $(LIB)
- -
- - install: $(LIBINSTDIR)/$(LIB) $(INCINSTDIR)/malloc.h \
- - $(MANINSTDIR)/$(MANINSTNAME)
- -
- - frcinstall: rminstall install
- -
- - rminstall:
- - rm -f $(LIBINSTDIR)/$(LIB) $(INCINSTDIR)/malloc.h \
- - $(MANINSTDIR)/$(MANINSTNAME)
- -
- - $(LIBINSTDIR)/$(LIB): $(LIB)
- - -rm -f $@.old
- - -mv -f $@ $@.old
- - cp $? $@
- - @-if test -s $(RANLIB); then $(RANLIB) $@; \
- - else if test -s /bin/ranlib; then /bin/ranlib $@; \
- - else if test -s /usr/bin/ranlib; then /usr/bin/ranlib $@; \
- - else exit 0; fi; fi; fi
- - -chmod 644 $@
- - -rm -f $@.old
- -
- - $(INCINSTDIR)/malloc.h: malloc.h
- - -rm -f $@.old
- - -mv -f $@ $@.old
- - cp $? $@
- - -chmod 644 $@
- - -rm -f $@.old
- -
- - $(MANINSTDIR)/$(MANINSTNAME): $(MANINSTVER)
- - -rm -f $@.old
- - -mv -f $@ $@.old
- - cp $? $@
- - -chmod 644 $@
- - -rm -f $@.old
- -
- - tests: $(TESTS)
- -
- - #
- - # runtests - target for building and running the tests. Note that we
- - # run testmalloc with fill_area disabled. This is because testmalloc is
- - # a malloc exerciser and we just want to see if we broke malloc, not verify
- - # that the test doesn't overwrite memory (since it doesn't).
- - #
- - runtests: tests
- - @echo "Running all of the test programs. This may take a while so"
- - @echo "please be patient. Note that you won't see any output unless"
- - @echo "a test fails....."
- - ./Runtests
- -
- - clean:
- - rm -f $(TESTS) pgm cctest $(LIB) *.o *.ln Runtests.out malloc.h \
- - sysdefs.h
- -
- - fullclean: clean
- - rm -f .configure .configure.[sO] *.O core cscope.out tags
- -
- - sharfile: $(SRCFILES) CHECKSUMS
- - $(SHARCMD)
- -
- - CHECKSUMS: $(SRCFILES)
- - echo "SYSV sums:\n" > CHECKSUMS
- - sum $(SRCFILES) >> CHECKSUMS
- - echo "\nBSD sums (generated using sum -r on SYSV system):\n" >>CHECKSUMS
- - sum -r $(SRCFILES) >> CHECKSUMS
- -
- - MANIFEST: $(MANSRCFILES)
- - $(SHARCMD) -x
- - chmod -w MANIFEST
- -
- - $(LIB): $(LIBOBJS)
- - ar ru $(LIB) $(LIBOBJS)
- - @-if test -s $(RANLIB); then $(RANLIB) $@; \
- - else if test -s /bin/ranlib; then /bin/ranlib $@; \
- - else if test -s /usr/bin/ranlib; then /usr/bin/ranlib $@; \
- - else exit 0; fi; fi; fi
- -
- - $(LINTLIB): $(LIBSRCS)
- - $(LINT) -x -v -o dbmal $(LIBSRCS)
- -
- - malloc.h: malloc.h.org Configure
- - ./Configure
- -
- - sysdefs.h: Configure
- - ./Configure
- -
- - #
- - # stuff for building the nroffed version of the manual page
- - #
- - man: malloc.man
- -
- - malloc.man: malloc.3
- - rm -f malloc.man
- - $(NROFF) -man malloc.3 | col -b > malloc.man
- -
- - #
- - # stuff for building the test programs
- - #
- - testmalloc: $(LIB) testmalloc.o
- - $(CC) $(CFLAGS) -o $@ testmalloc.o $(LIB)
- -
- - testmem: $(LIB) testmem.o
- - $(CC) $(CFLAGS) -o $@ testmem.o $(LIB)
- -
- - teststack: $(LIB) teststack.o
- - $(CC) $(CFLAGS) -o $@ teststack.o $(LIB)
- -
- - testerr: $(LIB) testerr.o
- - $(CC) $(CFLAGS) -o $@ testerr.o $(LIB)
- -
- - #
- - # misc stuff for source code maintenance
- - #
- - lint:
- - $(LINT) $(CFLAGS) $(SRCS)
- -
- - proto:
- - rm -f prototypes.h
- - make prototypes.h
- -
- - prototypes.h: $(LIBSRCS) $(HDRS) malloc.h
- - @if [ ! -s $(CPROTO) ]; then \
- - echo "Need cproto to rebuild prototypes file";\
- - exit 1; \
- - else \
- - exit 0; \
- - fi
- - -rm -f prototypes.h
- - cp /dev/null prototypes.h
- - $(CPROTO) -Dforce_cproto_to_use_defines -D__STDC__ \
- - -DDONT_USE_ASM -m__stdcargs -f4 $(LIBSRCS) \
- - | sed -e "s/const/CONST/g" > prototypes.new
- - mv prototypes.new prototypes.h
- - chmod -w prototypes.h
- -
- - patch: $(SRCFILES)
- - sh Buildpatch $(SRCFILES)
- -
- - srclist:
- - @echo $(SRCFILES)
- -
- - rcsclean: $(BUILDFILES)
- - -rcsclean -q $(SRCFILES)
- - -ls $(SRCFILES) 2>/dev/null > files.list
- - -rcs -i -t/dev/null `cat files.list` 2>/dev/null
- - @set -e; \
- - echo "files to be checked in: `cat files.list`"; \
- - echo "\n\tMessage: \c"; \
- - read message; \
- - echo ""; \
- - rcs -q -l `cat files.list`; \
- - ci -m"$$message" `cat files.list`; \
- - co -u $(SRCFILES)
- -
- - #
- - # special rules for building datams.o and datamc.o
- - #
- - datams.o: datams.c malloc.h mallocin.h sysdefs.h
- - @rm -f datams.o; \
- - if [ -s datams.O ]; then \
- - echo " cp datams.O $@"; \
- - cp datams.O $@; \
- - else \
- - echo " $(CC) $(CFLAGS) -c datams.c"; \
- - $(CC) $(CFLAGS) -c datams.c; \
- - fi
- -
- - datamc.o: datamc.c malloc.h mallocin.h sysdefs.h
- - @rm -f datamc.o; \
- - if [ -s datamc.O ]; then \
- - echo " cp datamc.O $@"; \
- - cp datamc.O $@; \
- - else \
- - echo " $(CC) $(CFLAGS) -c datamc.c"; \
- - $(CC) $(CFLAGS) -c datamc.c; \
- - fi
- -
- - #
- - # include file dependencies
- - #
- - $(LIBOBJS): malloc.h mallocin.h sysdefs.h
- -
- - testerr.o testmalloc.o testmem.o: malloc.h sysdefs.h
- -
- - tostring.o malloc.o dump.o: tostring.h sysdefs.h
- --- 0 ----
- diff -rc --new-file dbmalloc-1.14-base/Makefile.in dbmalloc-1.14/Makefile.in
- *** dbmalloc-1.14-base/Makefile.in Thu Jan 1 00:00:00 1970
- --- dbmalloc-1.14/Makefile.in Mon Mar 27 14:03:38 1995
- ***************
- *** 0 ****
- --- 1,281 ----
- + #
- + #
- + # (c) Copyright 1990, 1991, 1992 Conor P. Cahill (uunet!virtech!cpcahil).
- + #
- + # This software may be distributed freely as long as the following conditions
- + # are met:
- + # * the distribution, or any derivative thereof, may not be
- + # included as part of a commercial product
- + # * full source code is provided including this copyright
- + # * there is no charge for the software itself (there may be
- + # a minimal charge for the copying or distribution effort)
- + # * this copyright notice is not modified or removed from any
- + # source file
- + #
- + #
- + # $Id: Makefile,v 1.39 1992/08/22 16:27:13 cpcahil Exp $
- + #
- + # This is the Makefile for the malloc debugging library
- + #
- + # NOTE: while most porting changes are made here, the malloc.h file
- + # may require hand editing (mostly the DATATYPE and SIZETYPE
- + # typedefs) because of system wierdities.
- + #
- + # Useful targets:
- + #
- + # all make all programs/libs in the local directory
- + # install install updated programs/libs
- + # frcinstall install all programs/libs
- + # tests build tests
- + # runtests build and run all tests
- + # clean clean up after yourself
- + # fullclean clean up everything (including configure stuff)
- + #
- + # NOTE: there are several other targets used by myself for souce code
- + # maintenance related functions. These are probably specific to my system
- + # and may not do what they are supposed to do in a different environment.
- + # Therefore, unless you know what you are doing, I would suggest not running
- + # them (hence why they are not documented here).
- + #
- + # And now, onto a few definitions that you may need to alter
- + #
- + # The following defines may be added as necessary to the CFLAGS definition:
- + #
- + # -DANSI_NULLS if you want to allow passing of NULL pointers to realloc
- + # and/or free (as ANSI does) even if the library is
- + # compiled by a non-ANSI compiler.
- + # -DNO_ANSI_NULLS if you DON'T want to allow passing of NULL pointers to
- + # realloc and/or free, even if the library is compiled by
- + # an ANSI conforming compiler.
- + # -DDONT_USE_ASM don't use ASM speedups when replacing system memcpy
- + # and/or memset routines
- + # -DCTYPE_SUPPORT=x where x is one of the following
- + #
- + # 1 - use plain-jane ctype.h which is only valid
- + # for the ansii character set (DEFAULT)
- + # 2 - use POSIX setlocal() to setup the character
- + # set definitions
- + # 3 - use C library islower() & toupper()
- + # functions
- + #
- + # NOTE: if you add any flags other than the above to the CFLAGS, you might want
- + # to add a similar arguement in the Config.flags file. However, you
- + # should remember that the malloc.h configuration will depend upon these
- + # settings and you could have a problem if you attempt to use the file
- + # in a compile session that doesn't include these flags.
- + #
- +
- + srcdir = @srcdir@
- + VPATH = @srcdir@
- +
- + prefix = @prefix@
- + exec_prefix = @exec_prefix@
- +
- + bindir = $(exec_prefix)/bin
- + libdir = $(exec_prefix)/lib
- + incdir = $(prefix)/include/dbmalloc
- + infodir = $(prefix)/info
- + mandir = $(prefix)/man/man3
- +
- + INSTALL = @INSTALL@
- + INSTALL_PROGRAM = @INSTALL_PROGRAM@
- + INSTALL_DATA = @INSTALL_DATA@
- +
- + SHELL = /bin/sh
- + CC = @CC@
- + AR = ar
- + RM = rm
- + RANLIB = @RANLIB@
- + DEFS = @DEFS@
- + LIBS = @LIBS@
- + CFLAGS = @CFLAGS@
- + LDFLAGS = @LDFLAGS@
- +
- + INCLUDES = -I. -I$(srcdir)
- + OUR_CFLAGS = $(DEFS) $(INCLUDES) $(CFLAGS)
- +
- + .c.o:
- + $(CC) -c $(OUR_CFLAGS) $<
- + #
- + # miscellaneous commands
- + #
- + # NOTE: if you change CC to a non-K&R compiler be sure to read the
- + # PROBLEMS file first.
- + #
- + CPROTO=/gnu/bin/cproto
- + LINT=lint
- + NROFF=nroff
- + SHARCMD=makekit -p -m -nmallocshar.
- +
- + LIB = libdbmalloc.a
- + LINTLIB = llib-ldbmal.ln
- +
- + #
- + # You shouldn't have to modify anything below this line
- + #
- +
- + LIBSRCS= malloc.c datamc.c datams.c dgmalloc.c fill.c free.c realloc.c \
- + calloc.c string.c mcheck.c mchain.c memory.c tostring.c \
- + m_perror.c m_init.c mallopt.c dump.c stack.c xmalloc.c \
- + xheap.c malign.c size.c abort.c leak.c sbrk.c
- +
- + LIBOBJS= $(LIBSRCS:.c=.o)
- +
- +
- + SRCS = $(LIBSRCS) testmalloc.c testmem.c testerr.c teststack.c cctest.c
- + HDRS = malloc.h.org mallocin.h debug.h tostring.h
- +
- + BUILDFILES = malloc.man prototypes.h
- +
- + MANSRCFILES = patchlevel README PROBLEMS CHANGES Buildpatch minipatch Makefile \
- + malloc.3 malloc.man $(SRCS) $(HDRS) prototypes.h \
- + Configure Config.flags Runtests testerr.base
- +
- + SRCFILES = MANIFEST $(MANSRCFILES)
- +
- + TESTS = testmalloc testmem testerr teststack
- +
- + all : $(LIB) tests
- +
- + install :
- + $(INSTALL_DATA) $(LIB) $(libdir)/$(LIB)
- + $(RANLIB) $(libdir)/$(LIB)
- + $(INSTALL_DATA) $(srcdir)/malloc.h $(incdir)/malloc.h
- + $(INSTALL_DATA) $(srcdir)/malloc.3 $(mandir)/malloc.3
- +
- + rminstall:
- + rm -f $(libdir)/$(LIB) $(incdir)/malloc.h $(mandir)/malloc.3
- +
- + tests: $(TESTS)
- +
- + #
- + # runtests - target for building and running the tests. Note that we
- + # run testmalloc with fill_area disabled. This is because testmalloc is
- + # a malloc exerciser and we just want to see if we broke malloc, not verify
- + # that the test doesn't overwrite memory (since it doesn't).
- + #
- +
- + runtests : tests
- + @echo "Running all of the test programs. This may take a while so"
- + @echo "please be patient. Note that you won't see any output unless"
- + @echo "a test fails....."
- + ./Runtests
- +
- + clean :
- + rm -f $(TESTS) pgm cctest $(LIB) *.o *.ln Runtests.out malloc.h \
- + sysdefs.h
- +
- + fullclean : clean
- + rm -f .configure .configure.[sO] *.O core cscope.out tags
- +
- + sharfile : $(SRCFILES) CHECKSUMS
- + $(SHARCMD)
- +
- + CHECKSUMS : $(SRCFILES)
- + echo "SYSV sums:\n" > CHECKSUMS
- + sum $(SRCFILES) >> CHECKSUMS
- + echo "\nBSD sums (generated using sum -r on SYSV system):\n" >>CHECKSUMS
- + sum -r $(SRCFILES) >> CHECKSUMS
- +
- + MANIFEST : $(MANSRCFILES)
- + $(SHARCMD) -x
- + chmod -w MANIFEST
- +
- + $(LIB) : $(LIBOBJS)
- + $(RM) -f $@
- + $(AR) crv $@ $(LIBOBJS)
- + $(RANLIB) $@
- +
- + $(LINTLIB) : $(LIBSRCS)
- + $(LINT) -x -v -o dbmal $(LIBSRCS)
- +
- + #
- + # stuff for building the nroffed version of the manual page
- + #
- +
- + man : malloc.man
- +
- + malloc.man : malloc.3
- + rm -f malloc.man
- + $(NROFF) -man malloc.3 | col -b > malloc.man
- +
- + #
- + # stuff for building the test programs
- + #
- +
- + testmalloc : $(LIB) testmalloc.o
- + $(CC) $(CFLAGS) -o $@ testmalloc.o $(LIB)
- +
- + testmem : $(LIB) testmem.o
- + $(CC) $(CFLAGS) -o $@ testmem.o $(LIB)
- +
- + teststack : $(LIB) teststack.o
- + $(CC) $(CFLAGS) -o $@ teststack.o $(LIB)
- +
- + testerr : $(LIB) testerr.o
- + $(CC) $(CFLAGS) -o $@ testerr.o $(LIB)
- +
- + #
- + # misc stuff for source code maintenance
- + #
- +
- + lint :
- + $(LINT) $(CFLAGS) $(SRCS)
- +
- + proto :
- + rm -f prototypes.h
- + make prototypes.h
- +
- + prototypes.h : $(LIBSRCS) $(HDRS) malloc.h
- + @if [ ! -s $(CPROTO) ]; then \
- + echo "Need cproto to rebuild prototypes file";\
- + exit 1; \
- + else \
- + exit 0; \
- + fi
- + -rm -f prototypes.h
- + cp /dev/null prototypes.h
- + $(CPROTO) -Dforce_cproto_to_use_defines -D__STDC__ \
- + -DDONT_USE_ASM -m__stdcargs -f4 $(LIBSRCS) \
- + | sed -e "s/const/CONST/g" > prototypes.new
- + mv prototypes.new prototypes.h
- + chmod -w prototypes.h
- +
- + patch : $(SRCFILES)
- + sh Buildpatch $(SRCFILES)
- +
- + srclist :
- + @echo $(SRCFILES)
- +
- + rcsclean : $(BUILDFILES)
- + -rcsclean -q $(SRCFILES)
- + -ls $(SRCFILES) 2>/dev/null > files.list
- + -rcs -i -t/dev/null `cat files.list` 2>/dev/null
- + @set -e; \
- + echo "files to be checked in: `cat files.list`"; \
- + echo "\n\tMessage: \c"; \
- + read message; \
- + echo ""; \
- + rcs -q -l `cat files.list`; \
- + ci -m"$$message" `cat files.list`; \
- + co -u $(SRCFILES)
- +
- + #
- + # special rules for building datams.o and datamc.o
- + #
- +
- + datams.o : datams.c malloc.h mallocin.h sysdefs.h
- + datamc.o : datamc.c malloc.h mallocin.h sysdefs.h
- +
- + #
- + # include file dependencies
- + #
- +
- + $(LIBOBJS) : malloc.h mallocin.h sysdefs.h
- +
- + testerr.o : malloc.h sysdefs.h
- + testmalloc.o : malloc.h sysdefs.h
- + testmem.o : malloc.h sysdefs.h
- + tostring.o : tostring.h sysdefs.h
- + malloc.o : tostring.h sysdefs.h
- + dump.o : tostring.h sysdefs.h
- diff -rc --new-file dbmalloc-1.14-base/Product-Info dbmalloc-1.14/Product-Info
- *** dbmalloc-1.14-base/Product-Info Thu Jan 1 00:00:00 1970
- --- dbmalloc-1.14/Product-Info Sat Jan 21 15:28:56 1995
- ***************
- *** 0 ****
- --- 1,66 ----
- + .name
- + dbmalloc
- + .fullname
- + Debug Malloc Library
- + .type
- + Programmer Tool
- + .short
- + Debugging malloc/realloc/free routines.
- + .description
- + This is the malloc debugging library (patchlevel 14). This library contains
- + a drop-in replacement for the standard dynamic memory allocation routines and
- + many of the other C modules that are typically used to access and/or manipulate
- + these data areas. The replacements function almost identically to the original
- + functions with the exception that they perform a significant amount of
- + error checking and/or validating.
- +
- + This library can be used with very little (if any) changes to the original
- + code (many times only requiring a re-link of the executable) and provide a
- + full-service debugging capability.
- +
- + The entire library will follow in 10 separate shar files.
- +
- + This new version includes several enhancements over patch level 13 including:
- +
- + * more auto-configuration tuning
- + * several bug fixes
- +
- + In addition to the changes listed above, this version contains the
- + following changes since the comp.soures.reviewed release at patch
- + level 7, in Volume 2, Issue 1:
- +
- + * Much better performance
- + * automatic configuration on most systems
- + * addition of XtAlloc routines for X window debugging
- + * better identification of the source of double frees
- + * ability to record function stack info so error reports give
- + the calling stack for where the data was allocated and/or the
- + error was detected (note: this is manually maintained by the pgm)
- + * more support for leak detection (especially with respect to getting
- + rid of leak reports on things you know are not leaks)
- + * additional checking of pointesr to make the library more robust
- + * added case insensitive string comparison routines
- + * several bug fixes and/or portability changes
- + * added ability to change the state of the fill area flag
- + * added capability to disallow reuse of free'd segments (so that
- + double frees could be more readily identified by the data in
- + the segment
- + * a couple of function name changes
- + * new funcs: memalign, malloc_abort, malloc_size
- + .version
- + 1.14
- + .date
- + 1992.09.04
- + .author
- + Conor P. Cahill
- + .distribution
- + Copyrighted but Freely Redistributable
- + .email
- + cpcahil@vti.com
- + .docs
- + FIRST-README
- + README
- + .described-by
- + Fred Fish (fnf@fishpond.cygnus.com)
- + .submittal
- + From comp.sources.misc Vol 32
- diff -rc --new-file dbmalloc-1.14-base/configure dbmalloc-1.14/configure
- *** dbmalloc-1.14-base/configure Thu Jan 1 00:00:00 1970
- --- dbmalloc-1.14/configure Thu Jan 12 14:44:12 1995
- ***************
- *** 0 ****
- --- 1,942 ----
- + #!/bin/sh
- +
- + # Guess values for system-dependent variables and create Makefiles.
- + # Generated automatically using autoconf version 2.1
- + # Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
- + #
- + # This configure script is free software; the Free Software Foundation
- + # gives unlimited permission to copy, distribute and modify it.
- +
- + # Defaults:
- + ac_help=
- + ac_default_prefix=/gnu
- + # Any additions from configure.in:
- +
- + # Initialize some variables set by options.
- + # The variables have the same names as the options, with
- + # dashes changed to underlines.
- + build=NONE
- + cache_file=./config.cache
- + exec_prefix=NONE
- + host=NONE
- + no_create=
- + nonopt=NONE
- + no_recursion=
- + prefix=NONE
- + program_prefix=NONE
- + program_suffix=NONE
- + program_transform_name=s,x,x,
- + silent=
- + site=
- + srcdir=
- + target=NONE
- + verbose=
- + x_includes=NONE
- + x_libraries=NONE
- +
- + # Initialize some other variables.
- + subdirs=
- +
- + ac_prev=
- + for ac_option
- + do
- +
- + # If the previous option needs an argument, assign it.
- + if test -n "$ac_prev"; then
- + eval "$ac_prev=\$ac_option"
- + ac_prev=
- + continue
- + fi
- +
- + case "$ac_option" in
- + -*=*) ac_optarg=`/bin/echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- + *) ac_optarg= ;;
- + esac
- +
- + # Accept the important Cygnus configure options, so we can diagnose typos.
- +
- + case "$ac_option" in
- +
- + -build | --build | --buil | --bui | --bu | --b)
- + ac_prev=build ;;
- + -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
- + build="$ac_optarg" ;;
- +
- + -cache-file | --cache-file | --cache-fil | --cache-fi \
- + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- + ac_prev=cache_file ;;
- + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- + cache_file="$ac_optarg" ;;
- +
- + -disable-* | --disable-*)
- + ac_feature=`/bin/echo $ac_option|sed -e 's/-*disable-//'`
- + # Reject names that are not valid shell variable names.
- + if test -n "`/bin/echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- + { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- + fi
- + ac_feature=`/bin/echo $ac_feature| sed 's/-/_/g'`
- + eval "enable_${ac_feature}=no" ;;
- +
- + -enable-* | --enable-*)
- + ac_feature=`/bin/echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
- + # Reject names that are not valid shell variable names.
- + if test -n "`/bin/echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- + { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- + fi
- + ac_feature=`/bin/echo $ac_feature| sed 's/-/_/g'`
- + case "$ac_option" in
- + *=*) ;;
- + *) ac_optarg=yes ;;
- + esac
- + eval "enable_${ac_feature}='$ac_optarg'" ;;
- +
- + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- + | --exec | --exe | --ex)
- + ac_prev=exec_prefix ;;
- + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- + | --exec=* | --exe=* | --ex=*)
- + exec_prefix="$ac_optarg" ;;
- +
- + -gas | --gas | --ga | --g)
- + # Obsolete; use --with-gas.
- + with_gas=yes ;;
- +
- + -help | --help | --hel | --he)
- + # Omit some internal or obsolete options to make the list less imposing.
- + # This message is too long to be a string in the A/UX 3.1 sh.
- + cat << EOF
- + Usage: configure [options] [host]
- + Options: [defaults in brackets after descriptions]
- + Configuration:
- + --cache-file=FILE cache test results in FILE
- + --help print this message
- + --no-create do not create output files
- + --quiet, --silent do not print \`checking...' messages
- + --version print the version of autoconf that created configure
- + Directory and file names:
- + --prefix=PREFIX install architecture-independent files in PREFIX
- + [$ac_default_prefix]
- + --exec-prefix=PREFIX install architecture-dependent files in PREFIX
- + [same as prefix]
- + --srcdir=DIR find the sources in DIR [configure dir or ..]
- + --program-prefix=PREFIX prepend PREFIX to installed program names
- + --program-suffix=SUFFIX append SUFFIX to installed program names
- + --program-transform-name=PROGRAM run sed PROGRAM on installed program names
- + Host type:
- + --build=BUILD configure for building on BUILD [BUILD=HOST]
- + --host=HOST configure for HOST [guessed]
- + --target=TARGET configure for TARGET [TARGET=HOST]
- + Features and packages:
- + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- + --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- + --x-includes=DIR X include files are in DIR
- + --x-libraries=DIR X library files are in DIR
- + --enable and --with options recognized:$ac_help
- + EOF
- + exit 0 ;;
- +
- + -host | --host | --hos | --ho)
- + ac_prev=host ;;
- + -host=* | --host=* | --hos=* | --ho=*)
- + host="$ac_optarg" ;;
- +
- + -nfp | --nfp | --nf)
- + # Obsolete; use --without-fp.
- + with_fp=no ;;
- +
- + -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- + | --no-cr | --no-c)
- + no_create=yes ;;
- +
- + -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- + no_recursion=yes ;;
- +
- + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- + ac_prev=prefix ;;
- + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- + prefix="$ac_optarg" ;;
- +
- + -program-prefix | --program-prefix | --program-prefi | --program-pref \
- + | --program-pre | --program-pr | --program-p)
- + ac_prev=program_prefix ;;
- + -program-prefix=* | --program-prefix=* | --program-prefi=* \
- + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- + program_prefix="$ac_optarg" ;;
- +
- + -program-suffix | --program-suffix | --program-suffi | --program-suff \
- + | --program-suf | --program-su | --program-s)
- + ac_prev=program_suffix ;;
- + -program-suffix=* | --program-suffix=* | --program-suffi=* \
- + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- + program_suffix="$ac_optarg" ;;
- +
- + -program-transform-name | --program-transform-name \
- + | --program-transform-nam | --program-transform-na \
- + | --program-transform-n | --program-transform- \
- + | --program-transform | --program-transfor \
- + | --program-transfo | --program-transf \
- + | --program-trans | --program-tran \
- + | --progr-tra | --program-tr | --program-t)
- + ac_prev=program_transform_name ;;
- + -program-transform-name=* | --program-transform-name=* \
- + | --program-transform-nam=* | --program-transform-na=* \
- + | --program-transform-n=* | --program-transform-=* \
- + | --program-transform=* | --program-transfor=* \
- + | --program-transfo=* | --program-transf=* \
- + | --program-trans=* | --program-tran=* \
- + | --progr-tra=* | --program-tr=* | --program-t=*)
- + program_transform_name="$ac_optarg" ;;
- +
- + -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- + | -silent | --silent | --silen | --sile | --sil)
- + silent=yes ;;
- +
- + -site | --site | --sit)
- + ac_prev=site ;;
- + -site=* | --site=* | --sit=*)
- + site="$ac_optarg" ;;
- +
- + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- + ac_prev=srcdir ;;
- + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- + srcdir="$ac_optarg" ;;
- +
- + -target | --target | --targe | --targ | --tar | --ta | --t)
- + ac_prev=target ;;
- + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- + target="$ac_optarg" ;;
- +
- + -v | -verbose | --verbose | --verbos | --verbo | --verb)
- + verbose=yes ;;
- +
- + -version | --version | --versio | --versi | --vers)
- + echo "configure generated by autoconf version 2.1"
- + exit 0 ;;
- +
- + -with-* | --with-*)
- + ac_package=`/bin/echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
- + # Reject names that are not valid shell variable names.
- + if test -n "`/bin/echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- + { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- + fi
- + ac_package=`/bin/echo $ac_package| sed 's/-/_/g'`
- + case "$ac_option" in
- + *=*) ;;
- + *) ac_optarg=yes ;;
- + esac
- + eval "with_${ac_package}='$ac_optarg'" ;;
- +
- + -without-* | --without-*)
- + ac_package=`/bin/echo $ac_option|sed -e 's/-*without-//'`
- + # Reject names that are not valid shell variable names.
- + if test -n "`/bin/echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- + { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- + fi
- + ac_package=`/bin/echo $ac_package| sed 's/-/_/g'`
- + eval "with_${ac_package}=no" ;;
- +
- + --x)
- + # Obsolete; use --with-x.
- + with_x=yes ;;
- +
- + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- + | --x-incl | --x-inc | --x-in | --x-i)
- + ac_prev=x_includes ;;
- + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- + x_includes="$ac_optarg" ;;
- +
- + -x-libraries | --x-libraries | --x-librarie | --x-librari \
- + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- + ac_prev=x_libraries ;;
- + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- + x_libraries="$ac_optarg" ;;
- +
- + -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
- + ;;
- +
- + *)
- + if test -n "`/bin/echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- + echo "configure: warning: $ac_option: invalid host type" 1>&2
- + fi
- + if test "x$nonopt" != xNONE; then
- + { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- + fi
- + nonopt="$ac_option"
- + ;;
- +
- + esac
- + done
- +
- + if test -n "$ac_prev"; then
- + { echo "configure: error: missing argument to --`/bin/echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
- + fi
- +
- + trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15
- +
- + # File descriptor usage:
- + # 0 unused; standard input
- + # 1 file creation
- + # 2 errors and warnings
- + # 3 unused; some systems may open it to /dev/tty
- + # 4 checking for... messages and results
- + # 5 compiler messages saved in config.log
- + if test "$silent" = yes; then
- + exec 4>/dev/null
- + else
- + exec 4>&1
- + fi
- + exec 5>./config.log
- +
- + echo "\
- + This file contains any messages produced by compilers while
- + running configure, to aid debugging if configure makes a mistake.
- + " 1>&5
- +
- + # Strip out --no-create and --no-recursion so they do not pile up.
- + # Also quote any args containing shell metacharacters.
- + ac_configure_args=
- + for ac_arg
- + do
- + case "$ac_arg" in
- + -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- + | --no-cr | --no-c) ;;
- + -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- + ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- + *) ac_configure_args="$ac_configure_args $ac_arg" ;;
- + esac
- + done
- +
- + # NLS nuisances.
- + # Only set LANG and LC_ALL to C if already set.
- + # These must not be set unconditionally because not all systems understand
- + # e.g. LANG=C (notably SCO).
- + if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
- + if test "${LANG+set}" = set; then LANG=C; export LANG; fi
- +
- + # confdefs.h avoids OS command line length limits that DEFS can exceed.
- + rm -rf conftest* confdefs.h
- + # AIX cpp loses on an empty file, so make sure it contains at least a newline.
- + /bin/echo > confdefs.h
- +
- + # A filename unique to this package, relative to the directory that
- + # configure is in, which we can look for to find out if srcdir is correct.
- + ac_unique_file=malloc.h
- +
- + # Find the source files, if location was not specified.
- + if test -z "$srcdir"; then
- + ac_srcdir_defaulted=yes
- + # Try the directory containing this script, then its parent.
- + ac_prog=$0
- + ac_confdir=`/bin/echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- + test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
- + srcdir=$ac_confdir
- + if test ! -r $srcdir/$ac_unique_file; then
- + srcdir=..
- + fi
- + else
- + ac_srcdir_defaulted=no
- + fi
- + if test ! -r $srcdir/$ac_unique_file; then
- + if test "$ac_srcdir_defaulted" = yes; then
- + { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
- + else
- + { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
- + fi
- + fi
- + srcdir=`/bin/echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
- +
- + # Prefer explicitly selected file to automatically selected ones.
- + if test -z "$CONFIG_SITE"; then
- + if test "x$prefix" != xNONE; then
- + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- + else
- + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- + fi
- + fi
- + for ac_site_file in $CONFIG_SITE; do
- + if test -r "$ac_site_file"; then
- + echo "loading site script $ac_site_file"
- + . "$ac_site_file"
- + fi
- + done
- +
- + if test -r "$cache_file"; then
- + echo "loading cache $cache_file"
- + . $cache_file
- + else
- + echo "creating cache $cache_file"
- + > $cache_file
- + fi
- +
- + ac_ext=c
- + # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
- + ac_cpp='$CPP $CPPFLAGS'
- + ac_compile='${CC-cc} $CFLAGS $CPPFLAGS conftest.$ac_ext -c 1>&5 2>&5'
- + ac_link='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext -o conftest $LIBS 1>&5 2>&5'
- +
- + if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- + # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- + if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- + ac_n= ac_c='
- + ' ac_t=' '
- + else
- + ac_n=-n ac_c= ac_t=
- + fi
- + else
- + ac_n= ac_c='\c' ac_t=
- + fi
- +
- +
- +
- + # Extract the first word of "gcc", so it can be a program name with args.
- + set dummy gcc; ac_word=$2
- + /bin/echo $ac_n "checking for $ac_word""... $ac_c" 1>&4
- + if eval "test \"`echo '${'ac_cv_prog_CC'+set}'`\" = set"; then
- + /bin/echo $ac_n "(cached) $ac_c" 1>&4
- + else
- + if test -n "$CC"; then
- + ac_cv_prog_CC="$CC" # Let the user override the test.
- + else
- + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- + for ac_dir in $PATH; do
- + test -z "$ac_dir" && ac_dir=.
- + if test -f $ac_dir/$ac_word; then
- + ac_cv_prog_CC="gcc"
- + break
- + fi
- + done
- + IFS="$ac_save_ifs"
- + test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc"
- + fi
- + fi
- + CC="$ac_cv_prog_CC"
- + if test -n "$CC"; then
- + /bin/echo "$ac_t""$CC" 1>&4
- + else
- + /bin/echo "$ac_t""no" 1>&4
- + fi
- +
- +
- + /bin/echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&4
- + if eval "test \"`echo '${'ac_cv_prog_gcc'+set}'`\" = set"; then
- + /bin/echo $ac_n "(cached) $ac_c" 1>&4
- + else
- + cat > conftest.c <<EOF
- + #ifdef __GNUC__
- + yes;
- + #endif
- + EOF
- + if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then
- + ac_cv_prog_gcc=yes
- + else
- + ac_cv_prog_gcc=no
- + fi
- + fi
- + /bin/echo "$ac_t""$ac_cv_prog_gcc" 1>&4
- + if test $ac_cv_prog_gcc = yes; then
- + GCC=yes
- + if test "${CFLAGS+set}" != set; then
- + /bin/echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&4
- + if eval "test \"`echo '${'ac_cv_prog_gcc_g'+set}'`\" = set"; then
- + /bin/echo $ac_n "(cached) $ac_c" 1>&4
- + else
- + echo 'void f(){}' > conftest.c
- + if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- + ac_cv_prog_gcc_g=yes
- + else
- + ac_cv_prog_gcc_g=no
- + fi
- + rm -f conftest*
- +
- + fi
- + /bin/echo "$ac_t""$ac_cv_prog_gcc_g" 1>&4
- + if test $ac_cv_prog_gcc_g = yes; then
- + # Amiga hack - suppress automatically using -g for now
- + # Also default to using -O2
- + CFLAGS="-O2"
- + else
- + CFLAGS="-O2"
- + fi
- + fi
- + else
- + GCC=
- + test "${CFLAGS+set}" = set || CFLAGS="-g"
- + fi
- +
- + /bin/echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&4
- + # On Suns, sometimes $CPP names a directory.
- + if test -n "$CPP" && test -d "$CPP"; then
- + CPP=
- + fi
- + if test -z "$CPP"; then
- + if eval "test \"`echo '${'ac_cv_prog_CPP'+set}'`\" = set"; then
- + /bin/echo $ac_n "(cached) $ac_c" 1>&4
- + else
- + # This must be in double quotes, not single quotes, because CPP may get
- + # substituted into the Makefile and "${CC-cc}" will confuse make.
- + CPP="${CC-cc} -E"
- + # On the NeXT, cc -E runs the code through the compiler's parser,
- + # not just through cpp.
- + cat > conftest.$ac_ext <<EOF
- + #line 492 "configure"
- + #include "confdefs.h"
- + #include <assert.h>
- + Syntax Error
- + EOF
- + eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
- + ac_err=`grep -v '^ *+' conftest.out`
- + if test -z "$ac_err"; then
- + :
- + else
- + /bin/echo "$ac_err" >&5
- + rm -rf conftest*
- + CPP="${CC-cc} -E -traditional-cpp"
- + cat > conftest.$ac_ext <<EOF
- + #line 506 "configure"
- + #include "confdefs.h"
- + #include <assert.h>
- + Syntax Error
- + EOF
- + eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
- + ac_err=`grep -v '^ *+' conftest.out`
- + if test -z "$ac_err"; then
- + :
- + else
- + /bin/echo "$ac_err" >&5
- + rm -rf conftest*
- + CPP=/lib/cpp
- + fi
- + rm -f conftest*
- + fi
- + rm -f conftest*
- + ac_cv_prog_CPP="$CPP"
- + fi
- + fi
- + CPP="$ac_cv_prog_CPP"
- + /bin/echo "$ac_t""$CPP" 1>&4
- +
- + if test $ac_cv_prog_gcc = yes; then
- + /bin/echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&4
- + if eval "test \"`echo '${'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
- + /bin/echo $ac_n "(cached) $ac_c" 1>&4
- + else
- + ac_pattern="Autoconf.*'x'"
- + cat > conftest.$ac_ext <<EOF
- + #line 536 "configure"
- + #include "confdefs.h"
- + #include <sgtty.h>
- + Autoconf TIOCGETP
- + EOF
- + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- + egrep "$ac_pattern" >/dev/null 2>&1; then
- + rm -rf conftest*
- + ac_cv_prog_gcc_traditional=yes
- + else
- + rm -rf conftest*
- + ac_cv_prog_gcc_traditional=no
- + fi
- + rm -f conftest*
- +
- +
- + if test $ac_cv_prog_gcc_traditional = no; then
- + cat > conftest.$ac_ext <<EOF
- + #line 554 "configure"
- + #include "confdefs.h"
- + #include <termio.h>
- + Autoconf TCGETA
- + EOF
- + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- + egrep "$ac_pattern" >/dev/null 2>&1; then
- + rm -rf conftest*
- + ac_cv_prog_gcc_traditional=yes
- + fi
- + rm -f conftest*
- +
- + fi
- + fi
- + /bin/echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&4
- + if test $ac_cv_prog_gcc_traditional = yes; then
- + CC="$CC -traditional"
- + fi
- + fi
- +
- + ac_aux_dir=
- + for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
- + if test -f $ac_dir/install-sh; then
- + ac_aux_dir=$ac_dir
- + ac_install_sh="$ac_aux_dir/install-sh -c"
- + break
- + elif test -f $ac_dir/install.sh; then
- + ac_aux_dir=$ac_dir
- + ac_install_sh="$ac_aux_dir/install.sh -c"
- + break
- + fi
- + done
- + if test -z "$ac_aux_dir"; then
- + { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
- + fi
- + ac_config_guess=$ac_aux_dir/config.guess
- + ac_config_sub=$ac_aux_dir/config.sub
- + ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
- +
- + # Find a good install program. We prefer a C program (faster),
- + # so one script is as good as another. But avoid the broken or
- + # incompatible versions:
- + # SysV /etc/install, /usr/sbin/install
- + # SunOS /usr/etc/install
- + # IRIX /sbin/install
- + # AIX /bin/install
- + # AFS /usr/afsws/bin/install, which mishandles nonexistent args
- + # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
- + # ./install, which can be erroneously created by make from ./install.sh.
- + /bin/echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&4
- + if test -z "$INSTALL"; then
- + if eval "test \"`echo '${'ac_cv_path_install'+set}'`\" = set"; then
- + /bin/echo $ac_n "(cached) $ac_c" 1>&4
- + else
- + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- + for ac_dir in $PATH; do
- + case "$ac_dir" in
- + ''|.|/gnu/etc) ;;
- + *)
- + # OSF1 and SCO ODT 3.0 have their own names for install.
- + for ac_prog in ginstall installbsd scoinst install; do
- + if test -f $ac_dir/$ac_prog; then
- + if test $ac_prog = install &&
- + grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- + # AIX install. It has an incompatible calling convention.
- + # OSF/1 installbsd also uses dspmsg, but is usable.
- + :
- + else
- + ac_cv_path_install="$ac_dir/$ac_prog -c"
- + break 2
- + fi
- + fi
- + done
- + ;;
- + esac
- + done
- + IFS="$ac_save_ifs"
- + # As a last resort, use the slow shell script.
- + test -z "$ac_cv_path_install" && ac_cv_path_install="$ac_install_sh"
- + fi
- + INSTALL="$ac_cv_path_install"
- + fi
- + /bin/echo "$ac_t""$INSTALL" 1>&4
- +
- + # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
- + # It thinks the first close brace ends the variable substitution.
- + test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
- +
- + test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
- +
- + # Extract the first word of "ranlib", so it can be a program name with args.
- + set dummy ranlib; ac_word=$2
- + /bin/echo $ac_n "checking for $ac_word""... $ac_c" 1>&4
- + if eval "test \"`echo '${'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- + /bin/echo $ac_n "(cached) $ac_c" 1>&4
- + else
- + if test -n "$RANLIB"; then
- + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
- + else
- + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- + for ac_dir in $PATH; do
- + test -z "$ac_dir" && ac_dir=.
- + if test -f $ac_dir/$ac_word; then
- + ac_cv_prog_RANLIB="ranlib"
- + break
- + fi
- + done
- + IFS="$ac_save_ifs"
- + test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
- + fi
- + fi
- + RANLIB="$ac_cv_prog_RANLIB"
- + if test -n "$RANLIB"; then
- + /bin/echo "$ac_t""$RANLIB" 1>&4
- + else
- + /bin/echo "$ac_t""no" 1>&4
- + fi
- +
- +
- + for ac_hdr in stdlib.h string.h unistd.h X11/Intrinsic.h sys/wait.h
- + do
- + ac_safe=`/bin/echo "$ac_hdr" | tr './\055' '___'`
- + /bin/echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&4
- + if eval "test \"`echo '${'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- + /bin/echo $ac_n "(cached) $ac_c" 1>&4
- + else
- + cat > conftest.$ac_ext <<EOF
- + #line 681 "configure"
- + #include "confdefs.h"
- + #include <$ac_hdr>
- + EOF
- + eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
- + ac_err=`grep -v '^ *+' conftest.out`
- + if test -z "$ac_err"; then
- + rm -rf conftest*
- + eval "ac_cv_header_$ac_safe=yes"
- + else
- + /bin/echo "$ac_err" >&5
- + rm -rf conftest*
- + eval "ac_cv_header_$ac_safe=no"
- + fi
- + rm -f conftest*
- + fi
- + if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- + /bin/echo "$ac_t""yes" 1>&4
- + ac_tr_hdr=HAVE_`/bin/echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
- + cat >> confdefs.h <<EOF
- + #define $ac_tr_hdr 1
- + EOF
- +
- + else
- + /bin/echo "$ac_t""no" 1>&4
- + fi
- + done
- +
- +
- + for ac_func in sbrk
- + do
- + /bin/echo $ac_n "checking for $ac_func""... $ac_c" 1>&4
- + if eval "test \"`echo '${'ac_cv_func_$ac_func'+set}'`\" = set"; then
- + /bin/echo $ac_n "(cached) $ac_c" 1>&4
- + else
- + cat > conftest.$ac_ext <<EOF
- + #line 717 "configure"
- + #include "confdefs.h"
- + #include <ctype.h> /* Arbitrary system header to define __stub macros. */
- + /* Override any gcc2 internal prototype to avoid an error. */
- + char $ac_func();
- +
- + int main() { return 0; }
- + int t() {
- +
- + /* The GNU C library defines this for functions which it implements
- + to always fail with ENOSYS. Some functions are actually named
- + something starting with __ and the normal name is an alias. */
- + #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
- + choke me
- + #else
- + $ac_func();
- + #endif
- +
- + ; return 0; }
- + EOF
- + if eval $ac_link; then
- + rm -rf conftest*
- + eval "ac_cv_func_$ac_func=yes"
- + else
- + rm -rf conftest*
- + eval "ac_cv_func_$ac_func=no"
- + fi
- + rm -f conftest*
- +
- + fi
- + if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- + /bin/echo "$ac_t""yes" 1>&4
- + ac_tr_func=HAVE_`/bin/echo $ac_func | tr '[a-z]' '[A-Z]'`
- + cat >> confdefs.h <<EOF
- + #define $ac_tr_func 1
- + EOF
- +
- + else
- + /bin/echo "$ac_t""no" 1>&4
- + fi
- + done
- +
- +
- + trap '' 1 2 15
- + if test -w $cache_file; then
- + echo "updating cache $cache_file"
- + cat > $cache_file <<\EOF
- + # This file is a shell script that caches the results of configure
- + # tests run on this system so they can be shared between configure
- + # scripts and configure runs. It is not useful on other systems.
- + # If it contains results you don't want to keep, you may remove or edit it.
- + #
- + # By default, configure uses ./config.cache as the cache file,
- + # creating it if it does not exist already. You can give configure
- + # the --cache-file=FILE option to use a different cache file; that is
- + # what configure does when it calls configure scripts in
- + # subdirectories, so they share the cache.
- + # Giving --cache-file=/dev/null disables caching, for debugging configure.
- + # config.status only pays attention to the cache file if you give it the
- + # --recheck option to rerun configure.
- + #
- + EOF
- + # Ultrix sh set writes to stderr and can't be redirected directly.
- + (set) 2>&1 |
- + sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/: \${\1='\2'}/p" \
- + >> $cache_file
- + else
- + echo "not updating unwritable cache $cache_file"
- + fi
- +
- + trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15
- +
- + test "x$prefix" = xNONE && prefix=$ac_default_prefix
- + # Let make expand exec_prefix.
- + test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
- +
- + # Any assignment to VPATH causes Sun make to only execute
- + # the first set of double-colon rules, so remove it if not needed.
- + # If there is a colon in the path, we need to keep it.
- + if test "x$srcdir" = x.; then
- + ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
- + fi
- +
- + trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
- +
- + # Transform confdefs.h into DEFS.
- + # Protect against shell expansion while executing Makefile rules.
- + # Protect against Makefile macro expansion.
- + cat > conftest.defs <<\EOF
- + s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%-D\1=\2%g
- + s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
- + s%\[%\\&%g
- + s%\]%\\&%g
- + s%\$%$$%g
- + EOF
- + DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
- + rm -f conftest.defs
- +
- +
- + # Without the "./", some shells look in PATH for config.status.
- + : ${CONFIG_STATUS=./config.status}
- +
- + echo creating $CONFIG_STATUS
- + # Some systems, like AmigaDOS, won't allow you to remove a script that is
- + # being executed, so just move it out of the way instead.
- + if test -f $CONFIG_STATUS; then mv $CONFIG_STATUS $CONFIG_STATUS.old; else true; fi
- + cat > $CONFIG_STATUS <<EOF
- + #!/bin/sh
- + # Generated automatically by configure.
- + # Run this file to recreate the current configuration.
- + # This directory was configured as follows,
- + # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
- + #
- + # $0 $ac_configure_args
- + #
- + # Compiler output produced by configure, useful for debugging
- + # configure, is in ./config.log if it exists.
- +
- + ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
- + for ac_option
- + do
- + case "\$ac_option" in
- + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- + echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- + exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- + -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- + /bin/echo "$CONFIG_STATUS generated by autoconf version 2.1"
- + exit 0 ;;
- + -help | --help | --hel | --he | --h)
- + echo "\$ac_cs_usage"; exit 0 ;;
- + *) echo "\$ac_cs_usage"; exit 1 ;;
- + esac
- + done
- +
- + ac_given_srcdir=$srcdir
- + ac_given_INSTALL="$INSTALL"
- +
- + trap 'rm -f Makefile; exit 1' 1 2 15
- +
- + # Protect against being on the right side of a sed subst in config.status.
- + sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g;
- + s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
- + $ac_vpsub
- + $extrasub
- + s%@CFLAGS@%$CFLAGS%g
- + s%@CPPFLAGS@%$CPPFLAGS%g
- + s%@CXXFLAGS@%$CXXFLAGS%g
- + s%@DEFS@%$DEFS%g
- + s%@LDFLAGS@%$LDFLAGS%g
- + s%@LIBS@%$LIBS%g
- + s%@exec_prefix@%$exec_prefix%g
- + s%@prefix@%$prefix%g
- + s%@program_transform_name@%$program_transform_name%g
- + s%@CC@%$CC%g
- + s%@CPP@%$CPP%g
- + s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
- + s%@INSTALL_DATA@%$INSTALL_DATA%g
- + s%@RANLIB@%$RANLIB%g
- +
- + CEOF
- + EOF
- + cat >> $CONFIG_STATUS <<EOF
- +
- + CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
- + EOF
- + cat >> $CONFIG_STATUS <<\EOF
- + for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- + # Support "outfile[:infile]", defaulting infile="outfile.in".
- + case "$ac_file" in
- + *:*) ac_file_in=`/bin/echo "$ac_file"|sed 's%.*:%%'`
- + ac_file=`/bin/echo "$ac_file"|sed 's%:.*%%'` ;;
- + *) ac_file_in="${ac_file}.in" ;;
- + esac
- +
- + # Adjust relative srcdir, etc. for subdirectories.
- +
- + # Remove last slash and all that follows it. Not all systems have dirname.
- + ac_dir=`/bin/echo $ac_file|sed 's%/[^/][^/]*$%%'`
- + if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- + # The file is in a subdirectory.
- + test ! -d "$ac_dir" && mkdir "$ac_dir"
- + ac_dir_suffix="/$ac_dir"
- + # A "../" for each directory in $ac_dir_suffix.
- + ac_dots=`/bin/echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- + else
- + ac_dir_suffix= ac_dots=
- + fi
- +
- + case "$ac_given_srcdir" in
- + .) srcdir=.
- + if test -z "$ac_dots"; then top_srcdir=.
- + else top_srcdir=`/bin/echo $ac_dots|sed 's%/$%%'`; fi ;;
- + /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- + *) # Relative path.
- + srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- + top_srcdir="$ac_dots$ac_given_srcdir" ;;
- + esac
- +
- + case "$ac_given_INSTALL" in
- + [/$]*) INSTALL="$ac_given_INSTALL" ;;
- + *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
- + esac
- + echo creating "$ac_file"
- + rm -f "$ac_file"
- + configure_input="Generated automatically from `/bin/echo $ac_file_in|sed 's%.*/%%'` by configure."
- + case "$ac_file" in
- + *Makefile*) ac_comsub="1i\\
- + # $configure_input" ;;
- + *) ac_comsub= ;;
- + esac
- + sed -e "$ac_comsub
- + s%@configure_input@%$configure_input%g
- + s%@srcdir@%$srcdir%g
- + s%@top_srcdir@%$top_srcdir%g
- + s%@INSTALL@%$INSTALL%g
- + " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
- + fi; done
- + rm -f conftest.subs
- +
- +
- +
- + exit 0
- + EOF
- + chmod +x $CONFIG_STATUS
- + rm -fr confdefs* $ac_clean_files
- + test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS
- +
- diff -rc --new-file dbmalloc-1.14-base/configure.in dbmalloc-1.14/configure.in
- *** dbmalloc-1.14-base/configure.in Thu Jan 1 00:00:00 1970
- --- dbmalloc-1.14/configure.in Thu Jan 12 14:41:50 1995
- ***************
- *** 0 ****
- --- 1,13 ----
- + dnl Process this file with autoconf to produce a configure script.
- + AC_INIT(malloc.h)
- +
- + AC_PROG_CC
- + AC_GCC_TRADITIONAL
- + AC_PROG_INSTALL
- + AC_PROG_RANLIB
- +
- + AC_HAVE_HEADERS(stdlib.h string.h unistd.h X11/Intrinsic.h sys/wait.h)
- +
- + AC_CHECK_FUNCS(sbrk)
- +
- + AC_OUTPUT(Makefile)
- diff -rc --new-file dbmalloc-1.14-base/dump.c dbmalloc-1.14/dump.c
- *** dbmalloc-1.14-base/dump.c Sun May 1 23:28:59 1994
- --- dbmalloc-1.14/dump.c Thu Jan 12 15:09:32 1995
- ***************
- *** 281,290 ****
- */
- if( (ptr->file != NULL) && (ptr->file[0] != EOS) )
- {
- !
- ! for(i=0; (i < FILE_LEN) && (ptr->file[i] != EOS); i++)
- {
- ! buffer[detail+9+i] = ptr->file[i];
- }
-
- VOIDCAST tostring(buffer+detail+30,
- --- 281,292 ----
- */
- if( (ptr->file != NULL) && (ptr->file[0] != EOS) )
- {
- ! const char *filename;
- ! filename = strrchr (ptr->file, '/');
- ! filename = filename ? filename + 1 : ptr->file;
- ! for(i=0; (i < FILE_LEN) && (filename[i] != EOS); i++)
- {
- ! buffer[detail+9+i] = filename[i];
- }
-
- VOIDCAST tostring(buffer+detail+30,
- diff -rc --new-file dbmalloc-1.14-base/install.sh dbmalloc-1.14/install.sh
- *** dbmalloc-1.14-base/install.sh Thu Jan 1 00:00:00 1970
- --- dbmalloc-1.14/install.sh Thu Jan 12 13:51:34 1995
- ***************
- *** 0 ****
- --- 1,119 ----
- + #!/bin/sh
- +
- + #
- + # install - install a program, script, or datafile
- + # This comes from X11R5; it is not part of GNU.
- + #
- + # $XConsortium: install.sh,v 1.2 89/12/18 14:47:22 jim Exp $
- + #
- + # This script is compatible with the BSD install script, but was written
- + # from scratch.
- + #
- +
- +
- + # set DOITPROG to echo to test this script
- +
- + # Don't use :- since 4.3BSD and earlier shells don't like it.
- + doit="${DOITPROG-}"
- +
- +
- + # put in absolute paths if you don't have them in your path; or use env. vars.
- +
- + mvprog="${MVPROG-mv}"
- + cpprog="${CPPROG-cp}"
- + chmodprog="${CHMODPROG-chmod}"
- + chownprog="${CHOWNPROG-chown}"
- + chgrpprog="${CHGRPPROG-chgrp}"
- + stripprog="${STRIPPROG-strip}"
- + rmprog="${RMPROG-rm}"
- +
- + instcmd="$mvprog"
- + chmodcmd=""
- + chowncmd=""
- + chgrpcmd=""
- + stripcmd=""
- + rmcmd="$rmprog -f"
- + mvcmd="$mvprog"
- + src=""
- + dst=""
- +
- + while [ x"$1" != x ]; do
- + case $1 in
- + -c) instcmd="$cpprog"
- + shift
- + continue;;
- +
- + -m) chmodcmd="$chmodprog $2"
- + shift
- + shift
- + continue;;
- +
- + -o) chowncmd="$chownprog $2"
- + shift
- + shift
- + continue;;
- +
- + -g) chgrpcmd="$chgrpprog $2"
- + shift
- + shift
- + continue;;
- +
- + -s) stripcmd="$stripprog"
- + shift
- + continue;;
- +
- + *) if [ x"$src" = x ]
- + then
- + src=$1
- + else
- + dst=$1
- + fi
- + shift
- + continue;;
- + esac
- + done
- +
- + if [ x"$src" = x ]
- + then
- + echo "install: no input file specified"
- + exit 1
- + fi
- +
- + if [ x"$dst" = x ]
- + then
- + echo "install: no destination specified"
- + exit 1
- + fi
- +
- +
- + # If destination is a directory, append the input filename; if your system
- + # does not like double slashes in filenames, you may need to add some logic
- +
- + if [ -d $dst ]
- + then
- + dst="$dst"/`basename $src`
- + fi
- +
- + # Make a temp file name in the proper directory.
- +
- + dstdir=`dirname $dst`
- + dsttmp=$dstdir/#inst.$$#
- +
- + # Move or copy the file name to the temp name
- +
- + $doit $instcmd $src $dsttmp
- +
- + # and set any options; do chmod last to preserve setuid bits
- +
- + if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; fi
- + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; fi
- + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; fi
- + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; fi
- +
- + # Now rename the file to the real destination.
- +
- + $doit $rmcmd $dst
- + $doit $mvcmd $dsttmp $dst
- +
- +
- + exit 0
- diff -rc --new-file dbmalloc-1.14-base/malloc.c dbmalloc-1.14/malloc.c
- *** dbmalloc-1.14-base/malloc.c Sun May 1 23:29:03 1994
- --- dbmalloc-1.14/malloc.c Thu Jan 12 14:41:38 1995
- ***************
- *** 18,24 ****
-
- #include "sysdefs.h"
-
- ! #ifdef NEED_WAIT
- #include <sys/wait.h>
- #endif
-
- --- 18,24 ----
-
- #include "sysdefs.h"
-
- ! #ifdef HAVE_SYS_WAIT_H
- #include <sys/wait.h>
- #endif
-
- diff -rc --new-file dbmalloc-1.14-base/malloc.h dbmalloc-1.14/malloc.h
- *** dbmalloc-1.14-base/malloc.h Thu Jan 1 00:00:00 1970
- --- dbmalloc-1.14/malloc.h Thu Jan 12 13:46:46 1995
- ***************
- *** 0 ****
- --- 1,622 ----
- + /*
- + * (c) Copyright 1990, 1991, 1992 Conor P. Cahill (cpcahil@virtech.vti.com)
- + *
- + * This software may be distributed freely as long as the following conditions
- + * are met:
- + * * the distribution, or any derivative thereof, may not be
- + * included as part of a commercial product
- + * * full source code is provided including this copyright
- + * * there is no charge for the software itself (there may be
- + * a minimal charge for the copying or distribution effort)
- + * * this copyright notice is not modified or removed from any
- + * source file
- + */
- + /*
- + * $Id: malloc.h.org,v 1.38 1992/08/22 16:27:13 cpcahil Exp $
- + */
- +
- + #ifndef _DEBUG_MALLOC_INC
- + #define _DEBUG_MALLOC_INC 1
- +
- + #ifdef force_cproto_to_use_defines
- +
- + /*
- + * these are just here because cproto used the c-preprocessor to generate
- + * the prototypes and if they were left as #defines the prototypes.h file
- + * would have the contents of the define, not the define itself
- + */
- +
- + typedef char DATATYPE;
- + typedef int SIZETYPE;
- + typedef void VOIDTYPE;
- + typedef char MEMDATA;
- + typedef int MEMSIZE;
- + typedef int STRSIZE;
- + typedef int FREETYPE;
- + typedef int EXITTYPE;
- +
- + #if 0
- + #ifdef WRTSIZE
- + #undef WRTSIZE
- + #endif
- + typedef unsigned int WRTSIZE;
- + #endif
- +
- + /*
- + * for now, define CONST as const. A sed script in the makefile will change
- + * this back to CONST in the prototypes.h file.
- + */
- + #define CONST const
- +
- + #else /* force_cproto_to_use_defines */
- +
- + /*
- + * The following entries are automatically added by the Configure script.
- + * If they are not correct for your system, then Configure is not handling
- + * your system correctly. Please report this to the author along with
- + * a description of your system and the correct values
- + */
- +
- +
- +
- + #if (__GNUC__ == 2) && __STDC__
- +
- + #define VOIDTYPE void
- + #define CONST const
- + #define EXITTYPE void
- + #define DATATYPE void
- + #define SIZETYPE size_t
- + #define FREETYPE void
- + #define MEMDATA void
- + #define MEMSIZE size_t
- + #define MEMCMPTYPE unsigned char
- + #define STRSIZE size_t
- + #define STRCMPTYPE char
- +
- + #else /* (__GNUC__ == 2) && __STDC__ */
- +
- +
- + #if (__GNUC__ == 2)
- +
- + #define VOIDTYPE void
- + #define CONST
- + #define EXITTYPE void
- + #define DATATYPE void
- + #define SIZETYPE size_t
- + #define FREETYPE void
- + #define MEMDATA void
- + #define MEMSIZE size_t
- + #define MEMCMPTYPE unsigned char
- + #define STRSIZE size_t
- + #define STRCMPTYPE char
- +
- + #endif /* (__GNUC__ == 2) */
- +
- +
- + #endif /* (__GNUC__ == 2) && __STDC__ */
- +
- + /*
- + * END of automatic configuration stuff.
- + */
- +
- + /*
- + * if DATATYPE is not defined, then the configure script must have had a
- + * problem, or was used with a different compiler. So we have to stop
- + * here and get the user to fix the problem.
- + */
- + #ifndef DATATYPE
- + /*
- + * the following string should cause a comilation error and get the
- + * user to look at this stuff to find out what is wrong.
- + */
- + "This file is not configured correctly for this system. Run configure
- + and check its results"
- + char * malloc(); /* DON'T REMOVE THIS LINE if you get a compiler error
- + here it is because the malloc.h file is not
- + configured correctly See the readme/problems
- + files for more info */
- +
- + #endif /* DATATYPE */
- +
- + #endif /* force_cproto_to_use_defines */
- +
- + #define VOIDCAST (VOIDTYPE)
- +
- + /*
- + * since we redefine much of the stuff that is #defined in string.h and
- + * memory.h, we should do what we can to make sure that they don't get
- + * included after us. This is typically accomplished by a special symbol
- + * (similar to _DEBUG_MALLOC_INC defined above) that is #defined when the
- + * file is included. Since we don't want the file to be included we will
- + * #define the symbol ourselves. These will typically have to change from
- + * one system to another. I have put in several standard mechanisms used to
- + * support this mechanism, so hopefully you won't have to modify this file.
- + */
- + #ifndef _H_STRING
- + #define _H_STRING 1
- + #endif
- + #ifndef __STRING_H
- + #define __STRING_H 1
- + #endif
- + #ifndef _STRING_H_
- + #define _STRING_H_ 1
- + #endif
- + #ifndef _STRING_H
- + #define _STRING_H 1
- + #endif
- + #ifndef _STRING_INCLUDED
- + #define _STRING_INCLUDED 1
- + #endif
- + #ifndef __string_h
- + #define __string_h 1
- + #endif
- + #ifndef _string_h
- + #define _string_h 1
- + #endif
- + #ifndef __string_h__
- + #define __string_h__ 1
- + #endif
- + #ifndef _strings_h
- + #define _strings_h 1
- + #endif
- + #ifndef __strings_h
- + #define __strings_h 1
- + #endif
- + #ifndef __strings_h__
- + #define __strings_h__ 1
- + #endif
- + #ifndef _H_MEMORY
- + #define _H_MEMORY 1
- + #endif
- + #ifndef __MEMORY_H
- + #define __MEMORY_H 1
- + #endif
- + #ifndef _MEMORY_H_
- + #define _MEMORY_H_ 1
- + #endif
- + #ifndef _MEMORY_H
- + #define _MEMORY_H 1
- + #endif
- + #ifndef _MEMORY_INCLUDED
- + #define _MEMORY_INCLUDED 1
- + #endif
- + #ifndef __memory_h
- + #define __memory_h 1
- + #endif
- + #ifndef _memory_h
- + #define _memory_h 1
- + #endif
- + #ifndef __memory_h__
- + #define __memory_h__ 1
- + #endif
- +
- + /*
- + * for NCR, we need to disable their in-line expansion of the str* routines
- + */
- + #define ISTRING 1
- +
- + /*
- + * Malloc warning/fatal error handler defines...
- + */
- + #define M_HANDLE_DUMP 0x80 /* 128 */
- + #define M_HANDLE_IGNORE 0
- + #define M_HANDLE_ABORT 1
- + #define M_HANDLE_EXIT 2
- + #define M_HANDLE_CORE 3
- +
- + /*
- + * Mallopt commands and defaults
- + *
- + * the first four settings are ignored by the debugging dbmallopt, but are
- + * here to maintain compatibility with the system malloc.h.
- + */
- + #define M_MXFAST 1 /* ignored by mallopt */
- + #define M_NLBLKS 2 /* ignored by mallopt */
- + #define M_GRAIN 3 /* ignored by mallopt */
- + #define M_KEEP 4 /* ignored by mallopt */
- + #define MALLOC_WARN 100 /* set malloc warning handling */
- + #define MALLOC_FATAL 101 /* set malloc fatal handling */
- + #define MALLOC_ERRFILE 102 /* specify malloc error file */
- + #define MALLOC_CKCHAIN 103 /* turn on chain checking */
- + #define MALLOC_FILLAREA 104 /* turn off area filling */
- + #define MALLOC_LOWFRAG 105 /* use best fit allocation mech */
- + #define MALLOC_CKDATA 106 /* turn off/on data checking */
- + #define MALLOC_REUSE 107 /* turn off/on freed seg reuse */
- + #define MALLOC_SHOWLINKS 108 /* turn off/on adjacent link disp */
- + #define MALLOC_DETAIL 109 /* turn off/on detail output */
- + #define MALLOC_FREEMARK 110 /* warn about freeing marked segs*/
- + #define MALLOC_ZERO 111 /* warn about zero len allocs */
- +
- + union dbmalloptarg
- + {
- + int i;
- + char * str;
- + };
- +
- + /*
- + * disable the standard mallopt function
- + */
- + #define mallopt(a,b) (0)
- +
- + /*
- + * Malloc warning/fatal error codes
- + */
- + #define M_CODE_CHAIN_BROKE 1 /* malloc chain is broken */
- + #define M_CODE_NO_END 2 /* chain end != endptr */
- + #define M_CODE_BAD_PTR 3 /* pointer not in malloc area */
- + #define M_CODE_BAD_MAGIC 4 /* bad magic number in header */
- + #define M_CODE_BAD_CONNECT 5 /* chain poingers corrupt */
- + #define M_CODE_OVERRUN 6 /* data overrun in malloc seg */
- + #define M_CODE_REUSE 7 /* reuse of freed area */
- + #define M_CODE_NOT_INUSE 8 /* pointer is not in use */
- + #define M_CODE_NOMORE_MEM 9 /* no more memory available */
- + #define M_CODE_OUTOF_BOUNDS 10 /* gone beyound bounds */
- + #define M_CODE_FREELIST_BAD 11 /* inuse segment on freelist */
- + #define M_CODE_NOBOUND 12 /* can't calculate boundry */
- + #define M_CODE_STK_NOCUR 13 /* no current element on stack */
- + #define M_CODE_STK_BADFUNC 14 /* current func doesn't match */
- + #define M_CODE_UNDERRUN 15 /* data underrun in malloc seg */
- + #define M_CODE_FREEMARK 16 /* free of marked segment */
- + #define M_CODE_ZERO_ALLOC 17 /* zero length allocation */
- +
- + #ifndef __STDCARGS
- + #if __STDC__ || __cplusplus
- + #define __STDCARGS(a) a
- + #else
- + #define __STDCARGS(a) ()
- + #endif
- + #endif
- +
- + #if __cplusplus
- + extern "C" {
- + #endif
- +
- + VOIDTYPE malloc_dump __STDCARGS((int));
- + VOIDTYPE malloc_list __STDCARGS((int,unsigned long, unsigned long));
- + int dbmallopt __STDCARGS((int, union dbmalloptarg *));
- + DATATYPE * debug_calloc __STDCARGS((CONST char *,int,SIZETYPE,SIZETYPE));
- + FREETYPE debug_cfree __STDCARGS((CONST char *, int, DATATYPE *));
- + FREETYPE debug_free __STDCARGS((CONST char *, int, DATATYPE *));
- + DATATYPE * debug_malloc __STDCARGS((CONST char *,int, SIZETYPE));
- + DATATYPE * debug_realloc __STDCARGS((CONST char *,int,
- + DATATYPE *,SIZETYPE));
- + VOIDTYPE DBmalloc_mark __STDCARGS((CONST char *,int, DATATYPE *));
- + unsigned long DBmalloc_inuse __STDCARGS((CONST char *,int,
- + unsigned long *));
- + int DBmalloc_chain_check __STDCARGS((CONST char *,int,int));
- + SIZETYPE DBmalloc_size __STDCARGS((CONST char *,int,CONST DATATYPE *));
- + DATATYPE * DBmemalign __STDCARGS((CONST char *, int,SIZETYPE, SIZETYPE));
- + void StackEnter __STDCARGS((CONST char *, CONST char *, int));
- + void StackLeave __STDCARGS((CONST char *, CONST char *, int));
- +
- + /*
- + * X allocation related prototypes
- + */
- + char * debug_XtMalloc __STDCARGS((CONST char *, int, unsigned int));
- + char * debug_XtRealloc __STDCARGS((CONST char *, int,
- + char *, unsigned int));
- + char * debug_XtCalloc __STDCARGS((CONST char *, int,
- + unsigned int, unsigned int));
- + void debug_XtFree __STDCARGS((CONST char *, int, char *));
- + void * debug_XtBCopy __STDCARGS((CONST char *, int, char *,
- + char *, int));
- + extern void (*XtAllocErrorHandler) __STDCARGS((CONST char *));
- +
- + /*
- + * memory(3) related prototypes
- + */
- + MEMDATA * DBmemccpy __STDCARGS((CONST char *file, int line,
- + MEMDATA *ptr1, CONST MEMDATA *ptr2,
- + int ch, MEMSIZE len));
- + MEMDATA * DBmemchr __STDCARGS((CONST char *file, int line,
- + CONST MEMDATA *ptr1, int ch,
- + MEMSIZE len));
- + MEMDATA * DBmemmove __STDCARGS((CONST char *file, int line,
- + MEMDATA *ptr1, CONST MEMDATA *ptr2,
- + MEMSIZE len));
- + MEMDATA * DBmemcpy __STDCARGS((CONST char *file, int line,
- + MEMDATA *ptr1, CONST MEMDATA *ptr2,
- + MEMSIZE len));
- + int DBmemcmp __STDCARGS((CONST char *file, int line,
- + CONST MEMDATA *ptr1,
- + CONST MEMDATA *ptr2, MEMSIZE len));
- + MEMDATA * DBmemset __STDCARGS((CONST char *file, int line,
- + MEMDATA *ptr1, int ch, MEMSIZE len));
- + MEMDATA * DBbcopy __STDCARGS((CONST char *file, int line,
- + CONST MEMDATA *ptr2, MEMDATA *ptr1,
- + MEMSIZE len));
- + MEMDATA * DBbzero __STDCARGS((CONST char *file, int line,
- + MEMDATA *ptr1, MEMSIZE len));
- + int DBbcmp __STDCARGS((CONST char *file, int line,
- + CONST MEMDATA *ptr2,
- + CONST MEMDATA *ptr1, MEMSIZE len));
- +
- + /*
- + * string(3) related prototypes
- + */
- + char * DBstrcat __STDCARGS((CONST char *file,int line, char *str1,
- + CONST char *str2));
- + char * DBstrdup __STDCARGS((CONST char *file, int line,
- + CONST char *str1));
- + char * DBstrncat __STDCARGS((CONST char *file, int line, char *str1,
- + CONST char *str2, STRSIZE len));
- + int DBstrcmp __STDCARGS((CONST char *file, int line,
- + CONST char *str1, CONST char *str2));
- + int DBstrncmp __STDCARGS((CONST char *file, int line,
- + CONST char *str1, CONST char *str2,
- + STRSIZE len));
- + int DBstricmp __STDCARGS((CONST char *file, int line,
- + CONST char *str1, CONST char *str2));
- + int DBstrincmp __STDCARGS((CONST char *file, int line,
- + CONST char *str1, CONST char *str2,
- + STRSIZE len));
- + char * DBstrcpy __STDCARGS((CONST char *file, int line, char *str1,
- + CONST char *str2));
- + char * DBstrncpy __STDCARGS((CONST char *file, int line, char *str1,
- + CONST char *str2, STRSIZE len));
- + STRSIZE DBstrlen __STDCARGS((CONST char *file, int line,
- + CONST char *str1));
- + char * DBstrchr __STDCARGS((CONST char *file, int line,
- + CONST char *str1, int c));
- + char * DBstrrchr __STDCARGS((CONST char *file, int line,
- + CONST char *str1, int c));
- + char * DBindex __STDCARGS((CONST char *file, int line,
- + CONST char *str1, int c));
- + char * DBrindex __STDCARGS((CONST char *file, int line,
- + CONST char *str1, int c));
- + char * DBstrpbrk __STDCARGS((CONST char *file, int line,
- + CONST char *str1, CONST char *str2));
- + STRSIZE DBstrspn __STDCARGS((CONST char *file, int line,
- + CONST char *str1, CONST char *str2));
- + STRSIZE DBstrcspn __STDCARGS((CONST char *file, int line,
- + CONST char *str1, CONST char *str2));
- + char * DBstrstr __STDCARGS((CONST char *file, int line,
- + CONST char *str1, CONST char *str2));
- + char * DBstrtok __STDCARGS((CONST char *file, int line, char *str1,
- + CONST char *str2));
- +
- + #if __cplusplus
- + };
- + #endif
- +
- + /*
- + * Macro which enables logging of the file and line number for each allocation
- + * so that it is easier to determine where the offending malloc comes from.
- + *
- + * NOTE that only code re-compiled with this include file will have this
- + * additional info. Calls from libraries that have not been recompiled will
- + * just have a null string for this info.
- + */
- + #ifndef IN_MALLOC_CODE
- +
- + /*
- + * allocation functions
- + */
- + #define malloc(len) debug_malloc( __FILE__,__LINE__, (len))
- + #define realloc(ptr,len) debug_realloc(__FILE__,__LINE__, (ptr), (len))
- + #define calloc(numelem,size) debug_calloc(__FILE__,__LINE__,(numelem),(size))
- + #define cfree(ptr) debug_cfree(__FILE__,__LINE__,(ptr))
- + #define free(ptr) debug_free(__FILE__,__LINE__,(ptr))
- + #define malloc_chain_check(do) DBmalloc_chain_check(__FILE__,__LINE__,(do))
- + #define malloc_mark(ptr) DBmalloc_mark(__FILE__,__LINE__,(ptr))
- + #define malloc_inuse(histptr) DBmalloc_inuse(__FILE__,__LINE__,(histptr))
- + #define malloc_size(ptr) DBmalloc_size(__FILE__,__LINE__,(ptr))
- + #define memalign(align,size) DBmemalign(__FILE__,__LINE__,(align),(size))
- +
- + /*
- + * X allocation routines
- + */
- + #define XtCalloc(_num,_size) debug_XtCalloc(__FILE__,__LINE__,_num,_size)
- + #define XtMalloc(_size) debug_XtMalloc(__FILE__,__LINE__,_size)
- + #define XtRealloc(_ptr,_size) debug_XtRealloc(__FILE__,__LINE__,_ptr,_size)
- + #define XtFree(_ptr) debug_XtFree(__FILE__,__LINE__,_ptr)
- + #define _XtBCopy(ptr1,ptr2,len) debug_XtBcopy(__FILE__,__LINE__,ptr1,ptr2,len)
- +
- + /*
- + * Other allocation functions
- + */
- + #define _malloc(_size) debug_malloc(__FILE__,__LINE__,_size)
- + #define _realloc(_ptr,_size) debug_realloc(__FILE__,__LINE__,_ptr,_size)
- + #define _calloc(_num,_size) debug_calloc(__FILE__,__LINE__,_num,_size)
- + #define _free(_ptr) debug_free(__FILE__,__LINE__,_ptr)
- +
- + /*
- + * memory(3) related functions
- + */
- + #ifdef bcopy
- + #undef bcopy
- + #endif
- + #ifdef bzero
- + #undef bzero
- + #endif
- + #ifdef bcmp
- + #undef bcmp
- + #endif
- + #define memccpy(ptr1,ptr2,ch,len) DBmemccpy(__FILE__,__LINE__,ptr1,ptr2,ch,len)
- + #define memchr(ptr1,ch,len) DBmemchr(__FILE__,__LINE__,ptr1,ch,len)
- + #define memmove(ptr1,ptr2,len) DBmemmove(__FILE__,__LINE__,ptr1, ptr2, len)
- + #define memcpy(ptr1,ptr2,len) DBmemcpy(__FILE__, __LINE__, ptr1, ptr2, len)
- + #define memcmp(ptr1,ptr2,len) DBmemcmp(__FILE__,__LINE__,ptr1, ptr2, len)
- + #define memset(ptr1,ch,len) DBmemset(__FILE__,__LINE__,ptr1, ch, len)
- + #define bcopy(ptr2,ptr1,len) DBbcopy(__FILE__,__LINE__,ptr2,ptr1,len)
- + #define bzero(ptr1,len) DBbzero(__FILE__,__LINE__,ptr1,len)
- + #define bcmp(ptr2,ptr1,len) DBbcmp(__FILE__, __LINE__, ptr2, ptr1, len)
- +
- + #define _bcopy(ptr2,ptr1,len) DBbcopy(__FILE__,__LINE__,ptr2,ptr1,len)
- + #define _bzero(ptr1,len) DBbzero(__FILE__,__LINE__,ptr1,len)
- + #define _bcmp(ptr2,ptr1,len) DBbcmp(__FILE__,__LINE__,ptr2,ptr1,len)
- + #define __dg_bcopy(ptr2,ptr1,len) DBbcopy(__FILE__,__LINE__,ptr2,ptr1,len)
- + #define __dg_bzero(ptr1,len) DBbzero(__FILE__,__LINE__,ptr1,len)
- + #define __dg_bcmp(ptr2,ptr1,len) DBbcmp(__FILE__,__LINE__,ptr2,ptr1,len)
- +
- + /*
- + * string(3) related functions
- + */
- + #ifdef index
- + #undef index
- + #endif
- + #ifdef rindex
- + #undef rindex
- + #endif
- + #ifdef strcpy
- + #undef strcpy
- + #endif
- + #ifdef strcpy
- + #undef strcmp
- + #endif
- + #define index(str1,c) DBindex(__FILE__, __LINE__, str1, c)
- + #define rindex(str1,c) DBrindex(__FILE__, __LINE__, str1, c)
- + #define strcat(str1,str2) DBstrcat(__FILE__,__LINE__,str1,str2)
- + #define strchr(str1,c) DBstrchr(__FILE__, __LINE__, str1,c)
- + #define strcmp(str1,str2) DBstrcmp(__FILE__, __LINE__, str1, str2)
- + #define strcpy(str1,str2) DBstrcpy(__FILE__, __LINE__, str1, str2)
- + #define strcspn(str1,str2) DBstrcspn(__FILE__, __LINE__, str1,str2)
- + #define strdup(str1) DBstrdup(__FILE__, __LINE__, str1)
- + #define stricmp(str1,str2) DBstricmp(__FILE__, __LINE__, str1, str2)
- + #define strincmp(str1,str2,len) DBstrincmp(__FILE__, __LINE__, str1,str2,len)
- + #define strlen(str1) DBstrlen(__FILE__, __LINE__, str1)
- + #define strncat(str1,str2,len) DBstrncat(__FILE__, __LINE__, str1,str2,len)
- + #define strncpy(str1,str2,len) DBstrncpy(__FILE__,__LINE__,str1,str2,len)
- + #define strncmp(str1,str2,len) DBstrncmp(__FILE__, __LINE__, str1,str2,len)
- + #define strpbrk(str1,str2) DBstrpbrk(__FILE__, __LINE__, str1,str2)
- + #define strrchr(str1,c) DBstrrchr(__FILE__,__LINE__,str1,c)
- + #define strspn(str1,str2) DBstrspn(__FILE__, __LINE__, str1,str2)
- + #define strstr(str1,str2) DBstrstr(__FILE__, __LINE__, str1, str2)
- + #define strtok(str1,str2) DBstrtok(__FILE__, __LINE__, str1, str2)
- +
- + /*
- + * malloc stack related functions
- + */
- + #define malloc_enter(func) StackEnter(func,__FILE__,__LINE__)
- + #define malloc_leave(func) StackLeave(func,__FILE__,__LINE__)
- +
- + #endif /* IN_MALLOC_CODE */
- +
- + #ifdef HAVE_SBRK
- + #define ENDPTR (&end) /* Pointer to first location used by sbrk() */
- + #else
- + extern char *_endptr;
- + #define ENDPTR _endptr
- + #endif
- +
- + #endif /* _DEBUG_MALLOC_INC */
- +
- + /*
- + * $Log: malloc.h.org,v $
- + * Revision 1.38 1992/08/22 16:27:13 cpcahil
- + * final changes for pl14
- + *
- + * Revision 1.37 1992/08/18 11:42:00 cpcahil
- + * added more #defs to preclude memory/string.h inclusion
- + *
- + * Revision 1.36 1992/07/12 15:30:58 cpcahil
- + * Merged in Jonathan I Kamens' changes
- + *
- + * Revision 1.35 1992/07/03 00:03:25 cpcahil
- + * more fixes for pl13, several suggestons from Rich Salz.
- + *
- + * Revision 1.34 1992/07/02 15:35:52 cpcahil
- + * misc cleanups for PL13
- + *
- + * Revision 1.33 1992/07/02 13:49:54 cpcahil
- + * added support for new malloc_size function and additional tests to testerr
- + *
- + * Revision 1.32 1992/06/30 13:06:39 cpcahil
- + * added support for aligned allocations
- + *
- + * Revision 1.31 1992/06/22 23:40:10 cpcahil
- + * many fixes for working on small int systems
- + *
- + * Revision 1.30 1992/05/06 04:53:29 cpcahil
- + * performance enhancments
- + *
- + * Revision 1.29 1992/04/22 18:17:32 cpcahil
- + * added support for Xt Alloc functions, linted code
- + *
- + * Revision 1.28 1992/04/13 19:08:18 cpcahil
- + * fixed case insensitive stuff
- + *
- + * Revision 1.27 1992/04/13 18:41:18 cpcahil
- + * added case insensitive string comparison routines
- + *
- + * Revision 1.26 1992/04/13 17:26:25 cpcahil
- + * minor portability changes
- + *
- + * Revision 1.25 1992/04/13 14:13:18 cpcahil
- + * cleanup of log message.
- + *
- + * Revision 1.24 1992/04/13 03:09:14 cpcahil
- + * lots of changes.
- + *
- + * Revision 1.23 1992/03/01 12:42:38 cpcahil
- + * added support for managing freed areas and fixed doublword bndr problems
- + *
- + * Revision 1.22 1992/02/07 15:51:07 cpcahil
- + * mods for sun4
- + *
- + * Revision 1.21 1992/01/29 01:35:32 cpcahil
- + * added sgi definition.
- + *
- + * Revision 1.20 1992/01/28 21:42:25 cpcahil
- + * changes for the ibmRS6000
- + *
- + * Revision 1.19 1992/01/28 18:05:37 cpcahil
- + * misc fixes for patch 7
- + *
- + * Revision 1.18 1992/01/22 16:21:35 cpcahil
- + * added code to prevent inclusions of string.h and memory.h after malloc.h
- + * was included.
- + *
- + * Revision 1.17 1992/01/10 17:26:46 cpcahil
- + * fixed prototypes use of void.
- + *
- + * Revision 1.16 1992/01/10 16:53:39 cpcahil
- + * added more info on sizetype and datatype. added support for overriding
- + * use of void type.
- + *
- + * Revision 1.15 1992/01/09 17:19:11 cpcahil
- + * put the close brace in the correct position.
- + *
- + * Revision 1.14 1992/01/09 17:12:36 cpcahil
- + * added code to support inclusion in C++ modules
- + *
- + * Revision 1.13 1991/12/31 21:31:26 cpcahil
- + * changes for patch 6. See CHANGES file for more info
- + *
- + * Revision 1.12 1991/12/26 22:31:29 cpcahil
- + * added check to make sure file is not included twice.
- + *
- + * Revision 1.11 1991/12/06 17:58:46 cpcahil
- + * added cfree() for compatibility with some wierd systems
- + *
- + * Revision 1.10 91/12/06 08:54:18 cpcahil
- + * cleanup of __STDC__ usage and addition of CHANGES file
- + *
- + * Revision 1.9 91/12/04 09:23:40 cpcahil
- + * several performance enhancements including addition of free list
- + *
- + * Revision 1.8 91/12/02 19:10:11 cpcahil
- + * changes for patch release 5
- + *
- + * Revision 1.7 91/11/25 14:42:00 cpcahil
- + * Final changes in preparation for patch 4 release
- + *
- + * Revision 1.6 91/11/24 00:49:28 cpcahil
- + * first cut at patch 4
- + *
- + * Revision 1.5 91/11/20 11:54:10 cpcahil
- + * interim checkin
- + *
- + * Revision 1.4 90/08/29 22:23:38 cpcahil
- + * fixed mallopt to use a union as an argument.
- + *
- + * Revision 1.3 90/05/11 11:04:10 cpcahil
- + * took out some extraneous lines
- + *
- + * Revision 1.2 90/05/11 00:13:09 cpcahil
- + * added copyright statment
- + *
- + * Revision 1.1 90/02/23 07:09:03 cpcahil
- + * Initial revision
- + *
- + */
- diff -rc --new-file dbmalloc-1.14-base/mallocin.h dbmalloc-1.14/mallocin.h
- *** dbmalloc-1.14-base/mallocin.h Sun May 1 23:29:02 1994
- --- dbmalloc-1.14/mallocin.h Thu Jan 12 14:47:22 1995
- ***************
- *** 22,31 ****
- * and therefore, are not needed in malloc.h.
- */
-
- ! #if POSIX_HEADERS
- #include <unistd.h>
- #endif
- ! #if ANSI_HEADERS
- #include <stdlib.h>
- #endif
-
- --- 22,31 ----
- * and therefore, are not needed in malloc.h.
- */
-
- ! #ifdef HAVE_UNISTD_H
- #include <unistd.h>
- #endif
- ! #ifdef HAVE_STDLIB_H
- #include <stdlib.h>
- #endif
-
- ***************
- *** 222,228 ****
-
- EXITTYPE exit __STDCARGS((int));
- char * getenv __STDCARGS((CONST char *));
- ! DATATYPE * sbrk __STDCARGS((int));
-
- /*
- * stuff for X compatibility routines (needed here so that the prototypes
- --- 222,228 ----
-
- EXITTYPE exit __STDCARGS((int));
- char * getenv __STDCARGS((CONST char *));
- ! char * sbrk __STDCARGS((int));
-
- /*
- * stuff for X compatibility routines (needed here so that the prototypes
- diff -rc --new-file dbmalloc-1.14-base/prototypes.h dbmalloc-1.14/prototypes.h
- *** dbmalloc-1.14-base/prototypes.h Sun May 1 23:29:07 1994
- --- dbmalloc-1.14/prototypes.h Thu Jan 12 14:53:30 1995
- ***************
- *** 29,36 ****
- --- 29,38 ----
- DATATYPE *_calloc __stdcargs((SIZETYPE nelem, SIZETYPE elsize));
- void _free __stdcargs((DATATYPE *cptr));
- int _mallopt __stdcargs((int cmd, union dbmalloptarg value));
- + #if 0
- MEMDATA *_bcopy __stdcargs((CONST MEMDATA *ptr2, MEMDATA *ptr1, MEMSIZE len));
- MEMDATA *_bzero __stdcargs((MEMDATA *ptr1, MEMSIZE len));
- + #endif
- int _bcmp __stdcargs((CONST MEMDATA *ptr2, CONST MEMDATA *ptr1, MEMSIZE len));
- MEMDATA *__dg_bcopy __stdcargs((CONST MEMDATA *ptr2, MEMDATA *ptr1, MEMSIZE len));
- MEMDATA *__dg_bzero __stdcargs((MEMDATA *ptr1, MEMSIZE len));
- ***************
- *** 122,130 ****
- --- 124,136 ----
- MEMDATA *memset __stdcargs((MEMDATA *ptr1, register int ch, register MEMSIZE len));
- MEMDATA *DBmemset __stdcargs((CONST char *file, int line, MEMDATA *ptr1, register int ch, register MEMSIZE len));
- MEMDATA *DBFmemset __stdcargs((CONST char *func, CONST char *file, int line, MEMDATA *ptr1, register int ch, register MEMSIZE len));
- + #if 0
- MEMDATA *bcopy __stdcargs((CONST MEMDATA *ptr2, MEMDATA *ptr1, MEMSIZE len));
- + #endif
- MEMDATA *DBbcopy __stdcargs((CONST char *file, int line, CONST MEMDATA *ptr2, MEMDATA *ptr1, MEMSIZE len));
- + #if 0
- MEMDATA *bzero __stdcargs((MEMDATA *ptr1, MEMSIZE len));
- + #endif
- MEMDATA *DBbzero __stdcargs((CONST char *file, int line, MEMDATA *ptr1, MEMSIZE len));
- int bcmp __stdcargs((CONST MEMDATA *ptr2, CONST MEMDATA *ptr1, MEMSIZE len));
- int DBbcmp __stdcargs((CONST char *file, int line, CONST MEMDATA *ptr2, CONST MEMDATA *ptr1, MEMSIZE len));
- diff -rc --new-file dbmalloc-1.14-base/sbrk.c dbmalloc-1.14/sbrk.c
- *** dbmalloc-1.14-base/sbrk.c Thu Jan 1 00:00:00 1970
- --- dbmalloc-1.14/sbrk.c Thu Jan 12 14:25:40 1995
- ***************
- *** 0 ****
- --- 1,79 ----
- + /*
- + * Emulation of sbrk() that uses a fixed size preallocated buffer.
- + * The buffer consumes half of the largest available memory segment,
- + * or whatever it can get.
- + */
- +
- + #ifndef HAVE_SBRK
- +
- + #include <errno.h>
- + #include <exec/memory.h>
- +
- + char *_endptr; /* Start of sbrk() region */
- + static int sbrksize; /* Size of the preallocated sbrk buffer */
- + static char *sbrkval; /* Current pointer into sbrk buffer */
- +
- + static void sbrk_free_all (void)
- + {
- + extern void FreeMem (char *, int);
- +
- + FreeMem (_endptr, sbrksize);
- + }
- +
- + char *sbrk (int incr)
- + {
- + char *sbrkrtn;
- + char *newbrkval;
- + extern char *AllocMem (int, int);
- + extern int AvailMem (int);
- + extern int atexit (void (*func)(void));
- +
- + if (_endptr == (char *) 0)
- + {
- + sbrksize = AvailMem (MEMF_LARGEST);
- + while (sbrksize > 0) /* Should work first time... */
- + {
- + sbrksize >>= 1;
- + sbrkval = _endptr = AllocMem (sbrksize, 0);
- + if (sbrkval)
- + {
- + atexit (sbrk_free_all);
- + break;
- + }
- + }
- + }
- + sbrkrtn = sbrkval;
- + newbrkval = sbrkval + incr;
- + if ((newbrkval >= _endptr) && (newbrkval < (_endptr + sbrksize)))
- + {
- + sbrkval = newbrkval;
- + }
- + else
- + {
- + sbrkrtn = (char *) -1;
- + errno = ENOMEM;
- + }
- + return (sbrkrtn);
- + }
- +
- + #endif /* HAVE_SBRK */
- +
- + #ifdef TEST_MAIN
- +
- + main ()
- + {
- + printf ("Begin value = 0x%x\n", sbrk (0));
- + printf ("End is at 0x%x\n", _endptr);
- + printf ("Sbrk buffer is 0x%x (%d) bytes\n", sbrksize, sbrksize);
- + printf ("sbrk (0) = 0x%x\n", sbrk (0x0));
- + printf ("sbrk (0x1000) = 0x%x\n", sbrk (0x1000));
- + printf ("sbrk (0x2000) = 0x%x\n", sbrk (0x2000));
- + printf ("sbrk (0x5000) = 0x%x\n", sbrk (0x5000));
- + printf ("sbrk (0) = 0x%x\n", sbrk (0x0));
- + printf ("sbrk (-0x5000) = 0x%x\n", sbrk (-0x5000));
- + printf ("sbrk (-0x2000) = 0x%x\n", sbrk (-0x2000));
- + printf ("sbrk (-0x1000) = 0x%x\n", sbrk (-0x1000));
- + printf ("sbrk (0) = 0x%x\n", sbrk (0x0));
- + }
- +
- + #endif
- diff -rc --new-file dbmalloc-1.14-base/string.c dbmalloc-1.14/string.c
- *** dbmalloc-1.14-base/string.c Sun May 1 23:29:08 1994
- --- dbmalloc-1.14/string.c Thu Jan 12 14:33:18 1995
- ***************
- *** 21,27 ****
- */
-
- #include <stdio.h>
- ! #if ! defined(_IBMR2) && ! defined(ultrix)
- #include <string.h>
- #endif
-
- --- 21,27 ----
- */
-
- #include <stdio.h>
- ! #ifdef HAVE_STRING_H
- #include <string.h>
- #endif
-
- diff -rc --new-file dbmalloc-1.14-base/sysdefs.h dbmalloc-1.14/sysdefs.h
- *** dbmalloc-1.14-base/sysdefs.h Thu Jan 1 00:00:00 1970
- --- dbmalloc-1.14/sysdefs.h Thu Jan 12 14:43:18 1995
- ***************
- *** 0 ****
- --- 1,65 ----
- + /*
- + * This file is mechanically generated by the Configure script.
- + * If there is something wrong here, modify the configure script
- + * so that it is no longer generated wrong and please send email
- + * to the author so that the fix is included with the next patch
- + * release.
- + */
- +
- + #ifndef _SYSDEF_H /* double inclusion guard */
- + #define _SYSDEF_H 1
- +
- + #if (__GNUC__ == 2) && __STDC__
- +
- + /*
- + * Signal to use to abort program
- + */
- + #define ABORT_SIGNAL SIGABRT
- +
- + /*
- + * Use Underscores for ASM global symbols
- + */
- + /* #define USE_UNDERSCORE 1 */
- +
- + /*
- + * Use REPE instruction for ASM repeat op
- + */
- + /*#define USE_REPE 1*/
- +
- + #define WRTSIZE size_t
- +
- + #else /* (__GNUC__ == 2) && __STDC__ */
- +
- +
- + #if (__GNUC__ == 2)
- +
- + /*
- + * Signal to use to abort program
- + */
- + #define ABORT_SIGNAL SIGABRT
- +
- + /*
- + * Use Underscores for ASM global symbols
- + */
- + /* #define USE_UNDERSCORE 1 */
- +
- + /*
- + * Use REPE instruction for ASM repeat op
- + */
- + /*#define USE_REPE 1*/
- +
- + #define WRTSIZE size_t
- +
- + #endif /* (__GNUC__ == 2) */
- +
- +
- + #endif /* (__GNUC__ == 2) && __STDC__ */
- +
- + /*
- + * don't force inclusion of XtHeap
- + */
- + #define DONT_FORCE_HEAPSTUFF 1
- +
- +
- + #endif /* _SYSDEF_H */
- +
- diff -rc --new-file dbmalloc-1.14-base/testerr.c dbmalloc-1.14/testerr.c
- *** dbmalloc-1.14-base/testerr.c Sun May 1 23:29:06 1994
- --- dbmalloc-1.14/testerr.c Thu Jan 12 14:34:36 1995
- ***************
- *** 13,19 ****
- */
- #include "sysdefs.h"
- #include <stdio.h>
- ! #if ANSI_HEADERS
- #include <stdlib.h>
- #endif
- #include <sys/types.h>
- --- 13,19 ----
- */
- #include "sysdefs.h"
- #include <stdio.h>
- ! #if HAVE_STDLIB_H
- #include <stdlib.h>
- #endif
- #include <sys/types.h>
- diff -rc --new-file dbmalloc-1.14-base/testmalloc.c dbmalloc-1.14/testmalloc.c
- *** dbmalloc-1.14-base/testmalloc.c Sun May 1 23:29:09 1994
- --- dbmalloc-1.14/testmalloc.c Thu Jan 12 13:48:24 1995
- ***************
- *** 120,126 ****
- for( i = 0; i < MAXOBJS; i++ )
- objs[ i ] = NULL;
-
- ! startsize = sbrk(0) - &end;
- printf( "Memory use at start: %ld bytes\n", startsize );
- fflush(stdout);
-
- --- 120,126 ----
- for( i = 0; i < MAXOBJS; i++ )
- objs[ i ] = NULL;
-
- ! startsize = sbrk(0) - ENDPTR;
- printf( "Memory use at start: %ld bytes\n", startsize );
- fflush(stdout);
-
- ***************
- *** 223,229 ****
-
- printf( "Did %ld iterations, %d objects, %d mallocs, %d reallocs\n",
- n, cnt, nm, nre );
- ! printf( "Memory use at end: %ld bytes\n", sbrk(0) - &end );
- fflush( stdout );
-
- /* free all the objects */
- --- 223,229 ----
-
- printf( "Did %ld iterations, %d objects, %d mallocs, %d reallocs\n",
- n, cnt, nm, nre );
- ! printf( "Memory use at end: %ld bytes\n", sbrk(0) - ENDPTR );
- fflush( stdout );
-
- /* free all the objects */
- ***************
- *** 242,248 ****
- }
- }
-
- ! endsize = sbrk(0) - &end;
- printf( "Memory use after free: %ld bytes\n", endsize );
- fflush( stdout );
-
- --- 242,248 ----
- }
- }
-
- ! endsize = sbrk(0) - ENDPTR;
- printf( "Memory use after free: %ld bytes\n", endsize );
- fflush( stdout );
-
- diff -rc --new-file dbmalloc-1.14-base/teststack.c dbmalloc-1.14/teststack.c
- *** dbmalloc-1.14-base/teststack.c Sun May 1 23:28:57 1994
- --- dbmalloc-1.14/teststack.c Thu Jan 12 14:29:38 1995
- ***************
- *** 14,20 ****
-
- #include "sysdefs.h"
- #include <stdio.h>
- ! #if ANSI_HEADERS
- #include <stdlib.h>
- #endif
- #include <sys/types.h>
- --- 14,20 ----
-
- #include "sysdefs.h"
- #include <stdio.h>
- ! #ifdef HAVE_STDLIB_H
- #include <stdlib.h>
- #endif
- #include <sys/types.h>
- diff -rc --new-file dbmalloc-1.14-base/xheap.c dbmalloc-1.14/xheap.c
- *** dbmalloc-1.14-base/xheap.c Sun May 1 23:29:09 1994
- --- dbmalloc-1.14/xheap.c Thu Jan 12 14:39:20 1995
- ***************
- *** 46,52 ****
- * Uses Xlib memory management, which is spec'd to be re-entrant.
- */
-
- ! #if FOUND_X_INTRINSIC
- #include "X11/Intrinsic.h"
- #endif
-
- --- 46,52 ----
- * Uses Xlib memory management, which is spec'd to be re-entrant.
- */
-
- ! #ifdef HAVE_X11_INTRINSIC_H
- #include "X11/Intrinsic.h"
- #endif
-
- diff -rc --new-file dbmalloc-1.14-base/xmalloc.c dbmalloc-1.14/xmalloc.c
- *** dbmalloc-1.14-base/xmalloc.c Sun May 1 23:29:09 1994
- --- dbmalloc-1.14/xmalloc.c Thu Jan 12 14:39:12 1995
- ***************
- *** 45,51 ****
-
- #include "sysdefs.h"
-
- ! #if FOUND_X_INTRINSIC
- #include "X11/Intrinsic.h"
- #endif
-
- --- 45,51 ----
-
- #include "sysdefs.h"
-
- ! #ifdef HAVE_X11_INTRINSIC_H
- #include "X11/Intrinsic.h"
- #endif
-
-