home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / dbmalloc-1.14-diffs.gz / dbmalloc-1.14-diffs
Text File  |  1996-10-13  |  131KB  |  4,511 lines

  1. This file contains patches that transform the baseline version into
  2. the amiga version.  Assuming that you have unarchived the baseline
  3. version in the current directory, just run the command:
  4.  
  5.     patch -p1 -E -b .pbak <diff-file
  6.  
  7. where 'diff-file' is this patch file.  After running patch you should
  8. remove all the generated *.pbak files, and look for any *.rej files
  9. that indicate a problem patching the baseline source.
  10.  
  11. diff -rup --new-file baseline/contrib/dbmalloc/.configure amiga/contrib/dbmalloc/.configure
  12. --- baseline/contrib/dbmalloc/.configure    Wed Dec 31 17:00:00 1969
  13. +++ amiga/contrib/dbmalloc/.configure    Sat Sep 28 00:00:00 1996
  14. @@ -0,0 +1,37 @@
  15. +
  16. +#if       (__GNUC__ == 2) && __STDC__
  17. +
  18. +#define VOIDTYPE void
  19. +#define CONST const
  20. +#define EXITTYPE void
  21. +#define DATATYPE void
  22. +#define SIZETYPE size_t
  23. +#define FREETYPE void
  24. +#define MEMDATA void
  25. +#define MEMSIZE size_t
  26. +#define MEMCMPTYPE unsigned char
  27. +#define STRSIZE size_t
  28. +#define STRCMPTYPE char
  29. +
  30. +#else  /* (__GNUC__ == 2) && __STDC__ */
  31. +
  32. +
  33. +#if       (__GNUC__ == 2)
  34. +
  35. +#define VOIDTYPE void
  36. +#define CONST 
  37. +#define EXITTYPE void
  38. +#define DATATYPE void
  39. +#define SIZETYPE size_t
  40. +#define FREETYPE void
  41. +#define MEMDATA void
  42. +#define MEMSIZE size_t
  43. +#define MEMCMPTYPE unsigned char
  44. +#define STRSIZE size_t
  45. +#define STRCMPTYPE char
  46. +
  47. +#endif /* (__GNUC__ == 2) */
  48. +
  49. +
  50. +#endif /* (__GNUC__ == 2) && __STDC__ */
  51. +
  52. diff -rup --new-file baseline/contrib/dbmalloc/.configure.s amiga/contrib/dbmalloc/.configure.s
  53. --- baseline/contrib/dbmalloc/.configure.s    Wed Dec 31 17:00:00 1969
  54. +++ amiga/contrib/dbmalloc/.configure.s    Sat Sep 28 00:00:00 1996
  55. @@ -0,0 +1,114 @@
  56. +/*
  57. + * This file is mechanically generated by the Configure script.
  58. + * If there is something wrong here, modify the configure script
  59. + * so that it is no longer generated wrong and please send email
  60. + * to the author so that the fix is included with the next patch
  61. + * release.
  62. + */
  63. +
  64. +#ifndef _SYSDEF_H     /* double inclusion guard */
  65. +#define _SYSDEF_H 1
  66. +
  67. +
  68. +#if       (__GNUC__ == 2) && __STDC__
  69. +
  70. +/*
  71. + * Signal to use to abort program 
  72. + */
  73. +#define ABORT_SIGNAL SIGABRT
  74. +
  75. +/*
  76. + * Use setenv() for env mods
  77. + */
  78. +#define USE_SETENV 1
  79. +
  80. +/*
  81. + * POSIX header files are available
  82. + */
  83. +#define POSIX_HEADERS 1
  84. +
  85. +/*
  86. + * ANSI header files are available
  87. + */
  88. +#define ANSI_HEADERS 1
  89. +
  90. +/*
  91. + * ASM settings that only apply to 80x86 systems 
  92. + */
  93. +
  94. +/*
  95. + * Use Underscores for ASM global symbols
  96. + */
  97. +/* #define USE_UNDERSCORE 1 */
  98. +
  99. +/*
  100. + * Use REPE instruction for ASM repeat op
  101. + */
  102. +/*#define USE_REPE 1*/
  103. +
  104. +#define WRTSIZE   /* *GUESS* */
  105. +
  106. +#else  /* (__GNUC__ == 2) && __STDC__ */
  107. +
  108. +
  109. +#if       (__GNUC__ == 2)
  110. +
  111. +/*
  112. + * Signal to use to abort program 
  113. + */
  114. +#define ABORT_SIGNAL SIGABRT
  115. +
  116. +/*
  117. + * Use setenv() for env mods
  118. + */
  119. +#define USE_SETENV 1
  120. +
  121. +/*
  122. + * POSIX header files are available
  123. + */
  124. +#define POSIX_HEADERS 1
  125. +
  126. +/*
  127. + * ANSI header files are available
  128. + */
  129. +#define ANSI_HEADERS 1
  130. +
  131. +/*
  132. + * ASM settings that only apply to 80x86 systems 
  133. + */
  134. +
  135. +/*
  136. + * Use Underscores for ASM global symbols
  137. + */
  138. +/* #define USE_UNDERSCORE 1 */
  139. +
  140. +/*
  141. + * Use REPE instruction for ASM repeat op
  142. + */
  143. +/*#define USE_REPE 1*/
  144. +
  145. +#define WRTSIZE size_t
  146. +
  147. +#endif /* (__GNUC__ == 2) */
  148. +
  149. +
  150. +#endif /* (__GNUC__ == 2) && __STDC__ */
  151. +
  152. +/*
  153. + * Didn't find X intrinsic file in /ade/include/X11
  154. + */
  155. +/* #define FOUND_X_INTRINSIC 1 */
  156. +
  157. +/*
  158. + * Found wait.h in /ade/include/sys
  159. + */
  160. +#define NEED_WAIT 1
  161. +
  162. +/*
  163. + * don't force inclusion of XtHeap
  164. + */
  165. +#define DONT_FORCE_HEAPSTUFF 1
  166. +
  167. +
  168. +#endif  /* _SYSDEF_H */
  169. +
  170. diff -rup --new-file baseline/contrib/dbmalloc/Configure amiga/contrib/dbmalloc/Configure
  171. --- baseline/contrib/dbmalloc/Configure    Sun May  1 16:28:56 1994
  172. +++ amiga/contrib/dbmalloc/Configure    Wed Dec 31 17:00:00 1969
  173. @@ -1,1293 +0,0 @@
  174. -#!/bin/sh
  175. -#
  176. -#
  177. -# (c) Copyright 1990, 1991, 1992 Conor P. Cahill (cpcahil@virtech.vti.com)
  178. -#
  179. -# This software may be distributed freely as long as the following conditions
  180. -# are met:
  181. -#         * the distribution, or any derivative thereof, may not be
  182. -#          included as part of a commercial product
  183. -#        * full source code is provided including this copyright
  184. -#        * there is no charge for the software itself (there may be
  185. -#          a minimal charge for the copying or distribution effort)
  186. -#        * this copyright notice is not modified or removed from any
  187. -#          source file
  188. -#
  189. -# $Id: Configure,v 1.22 1992/08/22 16:27:13 cpcahil Exp $
  190. -#
  191. -# This shell script attempts to automatically determine the correct settings
  192. -# for the malloc library include file and compile pre-defines.  This script has
  193. -# been tested by the author in the following environments:
  194. -#
  195. -#    Intel 486    ISC UNIX 3.0    cc & gcc 2.1
  196. -#    Intel 486    DELL SVR4     cc & gcc 1.40
  197. -#    HP9000        HP/UX 8.0    cc & cc -Aa -D_POSIX_SOURCE
  198. -#    AT&T 3B2-600    SVR4.1ES    cc (relaxed ansi - no cc flags)
  199. -#    IBM RS6000    AIX 3.1        cc 
  200. -#    Sun Sparc 2    SunOS 4.1.1    cc
  201. -#
  202. -# It has also been reported to work in the following environments:
  203. -#
  204. -#    DG AViiON    DG/UX        gcc 2.1 & cc (which is gcc -traditional)
  205. -#    Sun Sparc 2    SunOS 4.1.1    cc (apparently in the sys5 environment)
  206. -#    Hp 9000/400    HP-UX 7.0x    cc
  207. -#    Hp 9000/700    HP-UX 8.05    cc
  208. -#    Sun Sparc     SunOs 4.1.1    cc (in bsd environment)
  209. -#    Motorola 88K    SysV 3.2
  210. -#    DecStation 5100    Ultrix 4.2    
  211. -#    IBM rs/6000    AIX 3.1.1    
  212. -#    IBM rs/6000    AIX 3.2    
  213. -#    Intel 486    ESIX SysV 4.0
  214. -#
  215. -# If you run this script in a different environment it may not work correctly or
  216. -# it may make an incorrect determination, so be more cautious about the results.
  217. -#
  218. -SP="           "
  219. -CCFILE=CF$$c
  220. -CCLIST="gcc2 gcc como CC g++ c89 cc pcc"
  221. -CONFFILE=.configure
  222. -DIRLIST="`echo $PATH | tr ':' ' '`"
  223. -INCDIR=/usr/include
  224. -LIBDIRS="/lib /usr/lib /usr/ucb/lib"
  225. -TMPDIR=/tmp
  226. -TMPBREAK=${TMPDIR}/CF$$break
  227. -TMPCC=${TMPDIR}/CF$$cc
  228. -TMPCCFILE=${TMPDIR}/${CCFILE}.c
  229. -TMPCOMP=${TMPDIR}/CF$$cmp
  230. -TMPDEF=${TMPDIR}/CF$$def
  231. -TMPEND=${TMPDIR}/CF$$end
  232. -TMPFATAL=${TMPDIR}/CF$$fatal
  233. -TMPFIRST=${TMPDIR}/CF$$first
  234. -TMPFOUND=${TMPDIR}/CF$$fnd
  235. -TMPPREDEF=${TMPDIR}/CF$$pred
  236. -TMPSET=${TMPDIR}/CF$$set
  237. -TMPSKIPPED=${TMPDIR}/CF$$skip
  238. -WARN_REGEXP="[Ww]arning|^w "\"".*"\"",L[0-9]*/C[0-9]*:"
  239. -
  240. -if [ $# != 0 ]; then
  241. -    debug=$1
  242. -
  243. -    if [ $debug -gt 10 ]; then
  244. -        set -x
  245. -    fi
  246. -else
  247. -    debug=0
  248. -fi
  249. -
  250. -#
  251. -# if we already have a configuration 
  252. -#
  253. -if [ $# = 0 -a -s "${CONFFILE}" -a -s "${CONFFILE}.s" ]; then
  254. -
  255. -    echo "Using existing configuration.  If this is not correct, you"
  256. -    echo "need to remove the ${CONFFILE} file and re-run the make"
  257. -
  258. -else
  259. -
  260. -    echo "Determining the correct configuration for malloc.h on this" \
  261. -            "system."
  262. -    echo "This may take a while, please be patient"
  263. -
  264. -    
  265. -    #
  266. -    # Determine default sizetype (for use when we are guessing at 
  267. -    # parameter settings).
  268. -    #
  269. -    grep size_t ${INCDIR}/sys/types.h >/dev/null 2>&1
  270. -    if [ $? = 0 ]; then
  271. -        dfltsize=size_t
  272. -    else
  273. -        dfltsize="unsigned int"
  274. -    fi
  275. -
  276. -    #
  277. -    # determine the compiler(s) that are available on this system
  278. -    #
  279. -
  280. -    echo "    Looking for compilers..."
  281. -    rm -f ${TMPCOMP}
  282. -    touch ${TMPCOMP}
  283. -
  284. -    #
  285. -    # if in debug mode and the compiler is specified as an argument
  286. -    #
  287. -    if [ $# -gt 1 ]; then
  288. -        echo $2 > ${TMPCOMP}
  289. -    else
  290. -
  291. -        #
  292. -        # look for the listed compilers.  Note that cc is last.  This
  293. -        # is as it should be because cc is probably the only compiler
  294. -        # listed that doesn't have one of the pre-defined symbols that
  295. -        # we look for and therefore must be last because the
  296. -        # configuration check loop requires that all compilers other
  297. -        # than the last compiler have one of the pre-defined symbols.
  298. -        #
  299. -        for compiler in ${CCLIST}
  300. -        do
  301. -            for dir in ${DIRLIST}
  302. -            do
  303. -                if [ -s $dir/$compiler ]; then
  304. -                    echo "        found $compiler in $dir"
  305. -                    echo $dir/$compiler >> ${TMPCOMP}
  306. -                    #
  307. -                    # if this is gcc, also add a second 
  308. -                    #   entry with the -traditional flag
  309. -                    #
  310. -                    if [ $compiler = "gcc" ]; then
  311. -                        echo $dir/$compiler \
  312. -                          -traditional >> ${TMPCOMP}
  313. -                    fi
  314. -                    
  315. -                    break
  316. -                fi
  317. -            done
  318. -        done
  319. -
  320. -        #
  321. -        # if we didn't find any compilers
  322. -        #
  323. -        if [ ! -s ${TMPCOMP} ]; then
  324. -            echo "I can't find your compiler"
  325. -            echo 1 > ${TMPFATAL}
  326. -            exit 1
  327. -        fi
  328. -
  329. -    fi
  330. -
  331. -    rm -f ${TMPSET} ${TMPEND} ${TMPSET}.s ${TMPEND}.s ${TMPFIRST} ${TMPSKIPPED}
  332. -
  333. -    cp /dev/null ${TMPSET}
  334. -    cp /dev/null ${TMPSET}.s
  335. -    cp /dev/null ${TMPEND}
  336. -    cp /dev/null ${TMPEND}.s
  337. -    first=1
  338. -    ending=
  339. -    #
  340. -    # for each compiler. 
  341. -    #
  342. -    echo "    checking compiler configuration(s)..."
  343. -    while read cc
  344. -    do
  345. -        (
  346. -        echo "        checking $cc..."
  347. -
  348. -        #
  349. -        # if we should be using any special flags for this compile
  350. -        #
  351. -        if [ -s Config.flags ]; then
  352. -            newcc="`basename $cc`"
  353. -            newcc="`eval grep \"\^$newcc\" Config.flags`"
  354. -            if [ ! -z "$newcc" ]; then
  355. -                cc="$newcc"
  356. -            fi
  357. -        fi
  358. -
  359. -        if [ -s ${TMPFIRST} ]; then
  360. -            #
  361. -            # See if the current set of defines meets the conditions
  362. -            # for this compiler.  If so, there is no need to verify
  363. -            # the parameters further.
  364. -            #
  365. -            rm -f ${TMPCCFILE}
  366. -            cat ${TMPSET} ${TMPEND} cctest.c > ${TMPCCFILE}
  367. -            $cc -DMALLOC_COMPILETEST -DMEM_COMPILETEST \
  368. -               -DSTR_COMPILETEST -DFREE_COMPILETEST -DEXITTEST\
  369. -               -c ${TMPCCFILE} >${TMPCC} 2>&1
  370. -            ccresult=$?
  371. -
  372. -            rm -f ${TMPCCFILE}
  373. -
  374. -            if [ $ccresult = 0 ]; then
  375. -                if egrep "${WARN_REGEXP}" ${TMPCC}>/dev/null; then
  376. -                    rm ${TMPCC};
  377. -                else
  378. -                    continue
  379. -                fi
  380. -            fi
  381. -
  382. -            #
  383. -            # otherwise if the last compiler didn't have a
  384. -            # pre-defined symbol we can't add another set
  385. -            # because it would conflict with the previous 
  386. -            # set of definitions.
  387. -            #
  388. -            if [ ! -s ${TMPPREDEF} ]; then
  389. -            
  390. -                echo "${SP}More than one compiler and no way to tell the" \
  391. -                     "difference between them"
  392. -                echo "${SP}So, hopefully the one set of defs will suffice"
  393. -                echo "break" > ${TMPBREAK}
  394. -                exit
  395. -            fi
  396. -
  397. -            PREDEF=`cat ${TMPPREDEF}`
  398. -
  399. -            if [ ! -s ${TMPSKIPPED} ]; then
  400. -                echo >> ${TMPSET}
  401. -                echo "#else  /* $PREDEF */" >> ${TMPSET}
  402. -                echo >> ${TMPSET}
  403. -    
  404. -                echo >> ${TMPSET}.s
  405. -                echo "#else  /* $PREDEF */" >> ${TMPSET}.s
  406. -                echo >> ${TMPSET}.s
  407. -            fi
  408. -
  409. -        fi
  410. -
  411. -        #
  412. -        # add the appropriate #ifdef to the settings file for this 
  413. -        # compiler (if it has any)
  414. -        #
  415. -        $cc -DPRE_DEFINES -o cctest cctest.c > /dev/null 2>&1
  416. -
  417. -        ./cctest > ${TMPPREDEF}1
  418. -
  419. -        if [ ! -s ${TMPPREDEF}1 ]; then
  420. -            echo "skipped" >> ${TMPSKIPPED}
  421. -            echo "${SP}Failed to determine pre-definitions for this compiler"
  422. -            echo "${SP}    skipping this set of pre-defs.  NOTE: this problem"
  423. -            echo "${SP}    is usually caused by a compiler installed without"
  424. -            echo "${SP}    its libraries (like g++)"
  425. -            exit 0
  426. -            
  427. -        else
  428. -
  429. -            rm -f ${TMPSKIPPED}
  430. -
  431. -            PREDEF=`cat ${TMPPREDEF}1`
  432. -
  433. -            if [ "x${PREDEF}" = "xnone" ]; then
  434. -                cp /dev/null ${TMPPREDEF}
  435. -                PREDEF=""
  436. -            else
  437. -
  438. -                mv ${TMPPREDEF}1 ${TMPPREDEF}
  439. -
  440. -                echo >> ${TMPSET}
  441. -                echo "#if       $PREDEF" >> ${TMPSET}
  442. -                echo >> ${TMPSET}
  443. -
  444. -                if [ -s ${TMPEND}.o ]; then
  445. -                    rm -f ${TMPEND}.o
  446. -                fi
  447. -                if [ -s ${TMPEND} ]; then
  448. -                    mv ${TMPEND} ${TMPEND}.o
  449. -                fi
  450. -                echo > ${TMPEND}
  451. -                echo "#endif /* $PREDEF */" >> ${TMPEND}
  452. -                echo >> ${TMPEND}
  453. -
  454. -                if [ -s ${TMPEND}.o ]; then
  455. -                    cat ${TMPEND}.o >> ${TMPEND}
  456. -                    rm -f ${TMPEND}.o
  457. -                fi
  458. -
  459. -                echo >> ${TMPSET}.s
  460. -                echo "#if       $PREDEF" >> ${TMPSET}.s
  461. -                echo >> ${TMPSET}.s
  462. -
  463. -                if [ -s ${TMPEND}.s.o ]; then
  464. -                    rm -f ${TMPEND}.s.o
  465. -                fi
  466. -                if [ -s ${TMPEND}.s ]; then
  467. -                    mv ${TMPEND}.s ${TMPEND}.s.o
  468. -                fi
  469. -                echo > ${TMPEND}.s
  470. -                echo "#endif /* $PREDEF */" >> ${TMPEND}.s
  471. -                echo >> ${TMPEND}.s
  472. -
  473. -                if [ -s ${TMPEND}.s.o ]; then
  474. -                    cat ${TMPEND}.s.o >> ${TMPEND}.s
  475. -                    rm -f ${TMPEND}.s.o
  476. -                fi
  477. -            fi
  478. -        fi
  479. -
  480. -        #
  481. -        # flag that this is not the first time
  482. -        #
  483. -        echo "second" > ${TMPFIRST}
  484. -
  485. -        #
  486. -        # First step is to determine the correct settings for the
  487. -        # DATATYPE, SIZETYPE and VOIDTYPE pre-defines for this compiler.
  488. -        #
  489. -        # Check void
  490. -        #
  491. -        $cc -DVOIDTEST -c cctest.c > ${TMPCC} 2>&1
  492. -        cc_result=$?
  493. -        egrep "${WARN_REGEXP}" ${TMPCC} > /dev/null 2>&1
  494. -        grep_result=$?
  495. -
  496. -        if [ $cc_result = 0 -a $grep_result != 0 ] ; then
  497. -            voidtype=void
  498. -        else
  499. -            voidtype=int
  500. -        fi
  501. -
  502. -        echo "#define VOIDTYPE $voidtype" >> ${TMPSET}
  503. -
  504. -        #
  505. -        # Check const
  506. -        #
  507. -        $cc -DCONSTTEST -c cctest.c > ${TMPCC} 2>&1
  508. -        cc_result=$?
  509. -        egrep "${WARN_REGEXP}" ${TMPCC} > /dev/null 2>&1
  510. -        grep_result=$?
  511. -
  512. -        if [ $cc_result = 0 -a $grep_result != 0 ] ; then
  513. -            const=const
  514. -        else
  515. -            const=
  516. -        fi
  517. -
  518. -        echo "#define CONST $const" >> ${TMPSET}
  519. -
  520. -        #
  521. -        # Check ABORT_SIGNAL.  Note that this goes into the settings.s
  522. -        # file which eventually goes into sysdefs.h
  523. -        #
  524. -        $cc -DSIGABRTTEST -c cctest.c > ${TMPCC} 2>&1
  525. -        cc_result=$?
  526. -        egrep "${WARN_REGEXP}" ${TMPCC} > /dev/null 2>&1
  527. -        grep_result=$?
  528. -        if [ $cc_result = 0 -a $grep_result != 0 ] ; then
  529. -            abortsig=SIGABRT
  530. -        else
  531. -            $cc -DSIGIOTTEST -c cctest.c > ${TMPCC} 2>&1
  532. -            cc_result=$?
  533. -            egrep "${WARN_REGEXP}" ${TMPCC} > /dev/null 2>&1
  534. -            grep_result=$?
  535. -            if [ $cc_result = 0 -a $grep_result != 0 ] ; then
  536. -                abortsig=SIGIOT
  537. -            else
  538. -                abortsig=6
  539. -            fi
  540. -        fi
  541. -
  542. -        echo "/*" >> ${TMPSET}.s
  543. -        echo " * Signal to use to abort program " >> ${TMPSET}.s
  544. -        echo " */" >> ${TMPSET}.s
  545. -        echo "#define ABORT_SIGNAL $abortsig" >> ${TMPSET}.s
  546. -        echo "" >> ${TMPSET}.s
  547. -
  548. -        #
  549. -        # Check SETENV stuff.  Note that this goes into the settings.s
  550. -        # file which eventually goes into sysdefs.h
  551. -        #
  552. -        $cc -DSETENVTEST cctest.c > ${TMPCC} 2>&1
  553. -        cc_result=$?
  554. -        egrep "${WARN_REGEXP}" ${TMPCC} > /dev/null 2>&1
  555. -        gres=$?
  556. -        grep "setenv" ${TMPCC} > /dev/null 2>&1
  557. -        gres2=$?
  558. -        if [ $cc_result = 0 -a $gres != 0 -a $gres2 != 0 ]; then
  559. -            echo "/*" >> ${TMPSET}.s
  560. -            echo " * Use setenv() for env mods" >> ${TMPSET}.s
  561. -            echo " */" >> ${TMPSET}.s
  562. -            echo "#define USE_SETENV 1" >> ${TMPSET}.s
  563. -            echo "" >> ${TMPSET}.s
  564. -        fi
  565. -
  566. -        #
  567. -        # Check to see if POSIX header files (in particular,
  568. -        # <unistd.h>) are available
  569. -        #
  570. -        $cc -DPOSIXHEADERTEST cctest.c > ${TMPCC} 2>&1
  571. -        cc_result=$?
  572. -        egrep "$WARN_REGEXP" ${TMPCC} > /dev/null 2>&1
  573. -        gres=$?
  574. -        if [ $cc_result = 0 -a $gres != 0 ]; then
  575. -            echo "/*" >> ${TMPSET}.s
  576. -            echo " * POSIX header files are available" >> ${TMPSET}.s
  577. -            echo " */" >> ${TMPSET}.s
  578. -            echo "#define POSIX_HEADERS 1" >> ${TMPSET}.s
  579. -            echo "" >> ${TMPSET}.s
  580. -            USE_UNISTD=-DUSE_UNISTD
  581. -        else
  582. -            USE_UNISTD=
  583. -        fi
  584. -
  585. -        #
  586. -        # Check to see if ANSI header files (in particular,
  587. -        # <stdlib.h>) are available
  588. -        #
  589. -        $cc -DANSIHEADERTEST cctest.c > ${TMPCC} 2>&1
  590. -        cc_result=$?
  591. -        egrep "$WARN_REGEXP" ${TMPCC} > /dev/null 2>&1
  592. -        gres=$?
  593. -        if [ $cc_result = 0 -a $gres != 0 ]; then
  594. -            echo "/*" >> ${TMPSET}.s
  595. -            echo " * ANSI header files are available" >> ${TMPSET}.s
  596. -            echo " */" >> ${TMPSET}.s
  597. -            echo "#define ANSI_HEADERS 1" >> ${TMPSET}.s
  598. -            echo "" >> ${TMPSET}.s
  599. -            USE_STDLIB=-DUSE_STDLIB
  600. -        else
  601. -            USE_STDLIB=
  602. -        fi
  603. -
  604. -        #
  605. -        # Check the type of exit
  606. -        #
  607. -        
  608. -        for type in ${voidtype} int
  609. -        do
  610. -            $cc -DEXITTEST ${USE_UNISTD} ${USE_STDLIB} \
  611. -                -DEXITTYPE=${type} -c cctest.c > ${TMPCC} 2>&1
  612. -            cc_result=$?
  613. -            egrep "${WARN_REGEXP}" ${TMPCC} > /dev/null 2>&1
  614. -            grep_result=$?
  615. -
  616. -            if [ $cc_result = 0 -a $grep_result != 0 ] ; then
  617. -                exittype=${type}
  618. -                break
  619. -            else
  620. -                exittype=
  621. -            fi
  622. -        done
  623. -        
  624. -        if [ "x${exittype}" != "x" ]; then
  625. -            echo "#define EXITTYPE $exittype" >> ${TMPSET}
  626. -        else
  627. -            echo "${SP}couldn't determine the correct setting for"
  628. -            echo "${SP}  the return type of exit, guessing"
  629. -            echo "${SP}  VOIDTYPE"
  630. -            echo "#define EXITTYPE VOIDTYPE  /* *GUESS* */" \
  631. -                >> ${TMPSET}
  632. -        fi
  633. -
  634. -        #
  635. -        # Check to see if <malloc.h> is available -- if it
  636. -        # isn't, we don't have to try using it later in the
  637. -        # script and things will go faster
  638. -        # 
  639. -        $cc -DMALLOCHTEST cctest.c > ${TMPCC} 2>&1
  640. -        cc_result=$?
  641. -        egrep "$WARN_REGEXP" ${TMPCC} > /dev/null 2>&1
  642. -        gres=$?
  643. -        if [ $cc_result = 0 -a $gres != 0 ]; then
  644. -            USE_MALLOC=-DUSE_MALLOC
  645. -        else
  646. -            USE_MALLOC=
  647. -        fi
  648. -
  649. -        #
  650. -        # check ASM stuff for i386 systems (need for underscore and/or repe
  651. -        # instruction
  652. -        #
  653. -        echo "/*" >> ${TMPSET}.s
  654. -        echo " * ASM settings that only apply to 80x86 systems ">> ${TMPSET}.s
  655. -        echo " */" >> ${TMPSET}.s
  656. -        echo "" >> ${TMPSET}.s
  657. -
  658. -        $cc -DASM_UNDTEST cctest.c > ${TMPCC} 2>&1
  659. -        cc_result=$?
  660. -        if [ -s a.out ]; then
  661. -            res=`./a.out 2>&1`
  662. -        else
  663. -            res=""
  664. -        fi
  665. -
  666. -        echo "/*" >> ${TMPSET}.s
  667. -        echo " * Use Underscores for ASM global symbols" >> ${TMPSET}.s
  668. -        echo " */" >> ${TMPSET}.s
  669. -        if [ $cc_result = 0 -a "$res" = "OK" ]; then
  670. -            cflag="-DUSE_UNDERSCORE"
  671. -            echo "#define USE_UNDERSCORE 1" >> ${TMPSET}.s
  672. -        else
  673. -            cflag=""
  674. -            echo "/* #define USE_UNDERSCORE 1 */" >> ${TMPSET}.s
  675. -        fi
  676. -        echo "" >> ${TMPSET}.s
  677. -
  678. -        $cc -DASM_REPTEST $cflag cctest.c > ${TMPCC} 2>&1
  679. -        cc_result=$?
  680. -        if [ -s a.out ]; then
  681. -            res=`./a.out 2>&1`
  682. -        else
  683. -            res=""
  684. -        fi
  685. -
  686. -        echo "/*" >> ${TMPSET}.s
  687. -        echo " * Use REPE instruction for ASM repeat op" >> ${TMPSET}.s
  688. -        echo " */" >> ${TMPSET}.s
  689. -
  690. -        if [ $cc_result = 0 -a "$res" = "OK" ]; then
  691. -            echo "#define USE_REPE 1" >> ${TMPSET}.s
  692. -        else
  693. -            echo "/*#define USE_REPE 1*/" >> ${TMPSET}.s
  694. -        fi
  695. -        echo "" >> ${TMPSET}.s
  696. -
  697. -        #
  698. -        # the only way to test the malloc and size datatypes is to
  699. -        # define them and install them into the test malloc.h to
  700. -        # see if they are valid
  701. -        #
  702. -        # NOTE: this will fail if a prior version of the debug
  703. -        # malloc.h is in the include path for the compiler before
  704. -        # the system malloc.h file.
  705. -        #
  706. -
  707. -        #
  708. -        # check settings for malloc
  709. -        #
  710. -        if [ "$debug" -gt 0 ]; then
  711. -            DSP="${SP}    "
  712. -            echo "${DSP}Checking malloc"
  713. -            DSP="${DSP}    "
  714. -        fi
  715. -
  716. -        rm -f ${TMPDEF}
  717. -        for fileinc in ${USE_STDLIB} ${USE_MALLOC} "${USE_STDLIB} ${USE_MALLOC}"
  718. -        do
  719. -                for datatype in void char
  720. -                do
  721. -                    for sizetype in size_t int "unsigned int" \
  722. -                        long "unsigned long"
  723. -                    do
  724. -                        if [ $debug != 0 ]; then
  725. -                            echo "${DSP}data:$datatype size:$sizetype"
  726. -                        fi
  727. -
  728. -                        #
  729. -                        # compile the test module
  730. -                        #
  731. -                        $cc -DDATATYPE="$datatype" -DSIZETYPE="$sizetype"   \
  732. -                            $fileinc -DCONST="$const" -DMALLOC_COMPILETEST  \
  733. -                            -c cctest.c >${TMPCC} 2>&1
  734. -                        result=$?
  735. -
  736. -                        if [ $debug -gt 5 ]; then
  737. -                            cat ${TMPCC}
  738. -                        fi
  739. -                        if [ $result = 0 ]; then
  740. -                            egrep "${WARN_REGEXP}" ${TMPCC} > /dev/null 2>&1
  741. -                            if [ $? != 0 ]; then
  742. -                                echo "#define DATATYPE $datatype" > ${TMPDEF}
  743. -                                echo "#define SIZETYPE $sizetype" >> ${TMPDEF}
  744. -                                break
  745. -                            fi
  746. -                        fi
  747. -
  748. -                    done
  749. -
  750. -                    if [ -s ${TMPDEF} ]; then
  751. -                        break
  752. -                    fi
  753. -
  754. -                done
  755. -
  756. -                if [ -s ${TMPDEF} ]; then
  757. -                    break
  758. -                fi
  759. -
  760. -        done
  761. -
  762. -        if [ ! -s ${TMPDEF} ]; then
  763. -            #
  764. -            # guess at what the correct settings should be.  If the compiler
  765. -            # supports the void data type, guess that the pointer returned
  766. -            # by malloc is a void * and the size is size_t, otherwise use
  767. -            # char * and unsigned int
  768. -            #
  769. -            if [ "$voidtype" = void ]; then
  770. -                datatype=void
  771. -                sizetype=size_t
  772. -            else
  773. -                datatype=char
  774. -                sizetype="unsigned int"
  775. -            fi
  776. -
  777. -            echo "${SP}couldn't determine the correct settings for the datatype"
  778. -            echo "${SP}  and sizetype parameters for malloc, guessing that the"
  779. -            echo "${SP}  datatype is $datatype and sizetype is $sizetype"
  780. -
  781. -            #
  782. -            # put the guesses into the tmpdef file and flag them as a guess
  783. -            #
  784. -            echo "#define DATATYPE $datatype  /* *GUESS* */" >  ${TMPDEF}
  785. -            echo "#define SIZETYPE $sizetype  /* *GUESS* */" >> ${TMPDEF}
  786. -        fi
  787. -
  788. -        cat < ${TMPDEF} >> ${TMPSET}
  789. -
  790. -        rm -f ${TMPDEF}
  791. -        for fileinc in ${USE_STDLIB} ${USE_MALLOC} "${USE_STDLIB} ${USE_MALLOC}"
  792. -        do
  793. -            for freetype in ${voidtype} int
  794. -            do
  795. -                if [ $debug != 0 ]; then
  796. -                    echo "${DSP}freetype:$freetype"
  797. -                fi
  798. -
  799. -                #
  800. -                # compile the test module
  801. -                #
  802. -                $cc -DFREETYPE="$freetype" -DDATATYPE="$datatype" \
  803. -                    $fileinc -DCONST="$const" -DFREE_COMPILETEST  \
  804. -                    -c cctest.c >${TMPCC} 2>&1
  805. -                result=$?
  806. -
  807. -                if [ $debug -gt 5 ]; then
  808. -                    cat ${TMPCC}
  809. -                fi
  810. -                if [ $result = 0 ]; then
  811. -                    egrep "${WARN_REGEXP}" ${TMPCC} > /dev/null 2>&1
  812. -                    if [ $? != 0 ]; then
  813. -                        echo "#define FREETYPE $freetype" > ${TMPDEF}
  814. -                        break
  815. -                    fi
  816. -                fi
  817. -            done
  818. -
  819. -            if [ -s ${TMPDEF} ]; then
  820. -                break;
  821. -            fi
  822. -        done
  823. -
  824. -        if [ ! -s ${TMPDEF} ]; then
  825. -            #
  826. -            # guess at what the correct settings should be.
  827. -            #
  828. -
  829. -            echo "${SP}couldn't determine the correct settings for the return"
  830. -            echo "${SP}  value of free, guessing VOIDTYPE"
  831. -
  832. -            #
  833. -            # put the guesses into the tmpdef file and flag them as a guess
  834. -            #
  835. -            echo "#define FREETYPE VOIDTYPE  /* *GUESS* */" >  ${TMPDEF}
  836. -        fi
  837. -
  838. -        cat < ${TMPDEF} >> ${TMPSET}
  839. -
  840. -        #
  841. -        # check settings for memory functions
  842. -        #
  843. -        if [ "$debug" -gt 0 ]; then
  844. -            DSP="${SP}    "
  845. -            echo "${DSP}Checking memory functions"
  846. -            DSP="${DSP}    "
  847. -        fi
  848. -        rm -f ${TMPDEF}
  849. -
  850. -        #
  851. -        # see if we should try to use string.h if memory.h fails.
  852. -        #
  853. -        if grep "memcpy" ${INCDIR}/string.h > /dev/null 2>&1; then
  854. -            extra="-DUSE_STRING_H"
  855. -        else
  856. -            extra=""
  857. -        fi
  858. -
  859. -        # 
  860. -        # for each include file we are checking
  861. -        #
  862. -        for fileinc in -DUSE_MEMORY_H  $extra
  863. -        do
  864. -            if [ $debug -ge 1 ]; then
  865. -                echo "${DSP}checking inc: $fileinc"
  866. -                ODSP="${DSP}"
  867. -                DSP="${DSP}    "
  868. -            fi
  869. -            for datatype in void char
  870. -            do
  871. -                for sizetype in size_t int "unsigned int" long "unsigned long"
  872. -                do
  873. -                    if [ $debug -ge 3 ]; then
  874. -                        echo "${DSP}data:$datatype size:$sizetype"
  875. -                    fi
  876. -
  877. -                    #
  878. -                    # compile the test module
  879. -                    #
  880. -                    $cc -DMEMDATA="$datatype" -DMEMSIZE="$sizetype" \
  881. -                        -DCONST="$const" -DMEM_COMPILETEST  \
  882. -                        $fileinc -c cctest.c >${TMPCC} 2>&1
  883. -                    result=$?
  884. -                    if [ $debug -gt 10 ]; then
  885. -                        cat ${TMPCC}
  886. -                    fi
  887. -                    if [ $result = 0 ]; then
  888. -                        egrep "${WARN_REGEXP}" ${TMPCC} > /dev/null 2>&1
  889. -                        if [ $? != 0 ]; then
  890. -                            echo "#define MEMDATA $datatype" > ${TMPDEF}
  891. -                            echo "#define MEMSIZE $sizetype" >> ${TMPDEF}
  892. -                            break
  893. -                        fi
  894. -                    fi
  895. -
  896. -                done
  897. -
  898. -                if [ -s ${TMPDEF} ]; then
  899. -                    break
  900. -                fi
  901. -            done
  902. -
  903. -            if [ $debug -ge 1 ]; then
  904. -                DSP="${ODSP}"
  905. -            fi
  906. -
  907. -            if [ -s ${TMPDEF} ]; then
  908. -                break;
  909. -            fi
  910. -
  911. -        done
  912. -
  913. -        if [ ! -s ${TMPDEF} ]; then
  914. -            #
  915. -            # guess at what the correct settings should be.  If the compiler
  916. -            # supports the void data type, guess that the pointer used by
  917. -            # memcpy is a void * and the size is size_t, otherwise use
  918. -            # char * and unsigned int
  919. -            #
  920. -            if [ "$voidtype" = void ]; then
  921. -                datatype=void
  922. -                sizetype=size_t
  923. -            else
  924. -                datatype=char
  925. -                sizetype="unsigned int"
  926. -            fi
  927. -
  928. -            echo "${SP}Couldn't determine the correct settings for the datatype"
  929. -            echo "${SP}  and sizetype parameters for mem* functions, I will"
  930. -            echo "${SP}  guess that the datatype is $datatype and sizetype"
  931. -            echo "${SP}  is $sizetype"
  932. -
  933. -            #
  934. -            # put the guesses into the tmpdef file and flag them as a guess
  935. -            #
  936. -            echo "#define MEMDATA $datatype  /* *GUESS* */" >  ${TMPDEF}
  937. -            echo "#define MEMSIZE $sizetype  /* *GUESS* */" >> ${TMPDEF}
  938. -        fi
  939. -
  940. -        cat < ${TMPDEF} >> ${TMPSET}
  941. -
  942. -        #
  943. -        # check memory comparison setting
  944. -        #
  945. -        if [ "$debug" -gt 0 ]; then
  946. -            DSP="${SP}    "
  947. -            echo "${DSP}Checking memory func comparision type"
  948. -            DSP="${DSP}    "
  949. -        fi
  950. -        rm -f ${TMPDEF}
  951. -        for comptype in "char" "unsigned char" "signed char"
  952. -        do
  953. -            if [ "x$comptype" = "xchar" ]; then
  954. -                testtype=TESTCHAR
  955. -            else
  956. -                testtype=TESTUCHAR
  957. -            fi
  958. -
  959. -            #
  960. -            # compile the test module
  961. -            #
  962. -            rm -f cctest
  963. -            $cc -D$testtype -DCOMPARETEST=memcmp \
  964. -                cctest.c -o cctest >${TMPCC} 2>&1
  965. -    
  966. -            if [ -s ./cctest ]; then
  967. -                ./cctest
  968. -                if [ $? = 0 ]; then
  969. -                    echo "#define MEMCMPTYPE $comptype" \
  970. -                            > ${TMPDEF}
  971. -                    break
  972. -                fi
  973. -            fi
  974. -            rm -f ${TMPCC};
  975. -        done
  976. -
  977. -        if [ ! -s ${TMPDEF} ]; then
  978. -            #
  979. -            # if we don't know, then guess the natural character type
  980. -            # (which may be signed or unsigned)
  981. -            #
  982. -            comptype=char
  983. -
  984. -            echo "${SP}Couldn't determine the correct settings for the"
  985. -            echo "${SP}  comparison type for the memory funcs, I will guess"
  986. -            echo "${SP}  that the comparison type is $comptype"
  987. -
  988. -            #
  989. -            # put the guesses into the tmpdef file and flag them as a guess
  990. -            #
  991. -            echo "#define MEMCMPTYPE $comptype  /* *GUESS* */" >  ${TMPDEF}
  992. -        fi
  993. -
  994. -        cat < ${TMPDEF} >> ${TMPSET}
  995. -
  996. -        #
  997. -        # check settings for string functions
  998. -        #
  999. -        rm -f ${TMPDEF}
  1000. -        for sizetype in size_t int "unsigned int" long "unsigned long"
  1001. -        do
  1002. -            #
  1003. -            # compile the test module
  1004. -            #
  1005. -            $cc -DSTRSIZE="$sizetype"   -DCONST="$const" \
  1006. -                -DSTR_COMPILETEST  -c cctest.c >${TMPCC} 2>&1
  1007. -            
  1008. -            if [ $? = 0 ]; then
  1009. -                if egrep "${WARN_REGEXP}" ${TMPCC}>/dev/null; then
  1010. -                    rm ${TMPCC};
  1011. -                else
  1012. -                    echo "#define STRSIZE $sizetype" > ${TMPDEF}
  1013. -                    break
  1014. -                fi
  1015. -            fi
  1016. -
  1017. -        done
  1018. -        
  1019. -        if [ ! -s ${TMPDEF} ]; then
  1020. -            #
  1021. -            # guess at what the correct setting should be.  If size_t is in
  1022. -            # /usr/include/string.h, use it, otherwise use the default size 
  1023. -            # type
  1024. -            #
  1025. -            if grep size_t ${INCDIR}/string.h >/dev/null 2>&1; then
  1026. -                sizetype=size_t
  1027. -            else
  1028. -                sizetype="$dfltsize"
  1029. -            fi
  1030. -
  1031. -            echo "${SP}Couldn't determine the correct settings for the sizetype"
  1032. -            echo "${SP}  parameter for the string functions.  I will guess "
  1033. -            echo "${SP}  that the correct setting is $sizetype"
  1034. -
  1035. -            #
  1036. -            # put the guesses into the tmpdef file and flag them as a guess
  1037. -            #
  1038. -            echo "#define STRSIZE $sizetype  /* *GUESS* */" >> ${TMPDEF}
  1039. -        fi
  1040. -
  1041. -        cat < ${TMPDEF} >> ${TMPSET}
  1042. -
  1043. -        #
  1044. -        # check string comparison setting
  1045. -        #
  1046. -        rm -f ${TMPDEF}
  1047. -        for comptype in "char" "unsigned char" "signed char"
  1048. -        do
  1049. -            if [ "x$comptype" = "xchar" ]; then
  1050. -                testtype=TESTCHAR
  1051. -            else
  1052. -                testtype=TESTUCHAR
  1053. -            fi
  1054. -
  1055. -            #
  1056. -            # compile the test module
  1057. -            #
  1058. -            rm -f cctest
  1059. -            $cc -D$testtype -DCOMPARETEST=strncmp \
  1060. -                cctest.c -o cctest >${TMPCC} 2>&1
  1061. -    
  1062. -            if [ -s ./cctest ]; then
  1063. -                ./cctest
  1064. -                if [ $? = 0 ]; then
  1065. -                    echo "#define STRCMPTYPE $comptype" \
  1066. -                            > ${TMPDEF}
  1067. -                    break
  1068. -                fi
  1069. -            fi
  1070. -            rm -f ${TMPCC};
  1071. -        done
  1072. -
  1073. -        if [ ! -s ${TMPDEF} ]; then
  1074. -            #
  1075. -            # if we don't know, then guess the natural character type
  1076. -            # (which may be signed or unsigned)
  1077. -            #
  1078. -            comptype=char
  1079. -
  1080. -            echo "${SP}Couldn't determine the correct settings for the"
  1081. -            echo "${SP}  comparison type for the string funcs, I will guess"
  1082. -            echo "${SP}  that the comparison type is $comptype"
  1083. -
  1084. -            #
  1085. -            # put the guesses into the tmpdef file and flag them as a guess
  1086. -            #
  1087. -            echo "#define STRCMPTYPE $comptype  /* *GUESS* */" >  ${TMPDEF}
  1088. -        fi
  1089. -
  1090. -        cat < ${TMPDEF} >> ${TMPSET}
  1091. -        
  1092. -        #
  1093. -        # check settings for write size
  1094. -        #
  1095. -        rm -f ${TMPDEF}
  1096. -        for fileinc in -DUSE_SYSENT -DUSE_NONE
  1097. -        do
  1098. -            for sizetype in size_t "unsigned int" int long "unsigned long"
  1099. -            do
  1100. -                #
  1101. -                # compile the test module
  1102. -                #
  1103. -                $cc -DWRTSIZE="$sizetype"   $fileinc -DCONST="$const" \
  1104. -                    ${USE_UNISTD} ${USE_STDLIB} \
  1105. -                    -DWRT_COMPILETEST  -c cctest.c >${TMPCC} 2>&1
  1106. -                
  1107. -                if [ $? = 0 ]; then
  1108. -                    if egrep "${WARN_REGEXP}" ${TMPCC} >/dev/null; then
  1109. -                        rm ${TMPCC};
  1110. -                    else
  1111. -                        echo "#define WRTSIZE $sizetype" > ${TMPDEF}
  1112. -                        break
  1113. -                    fi
  1114. -                fi
  1115. -
  1116. -            done
  1117. -        done
  1118. -        
  1119. -        if [ ! -s ${TMPDEF} ]; then
  1120. -            #
  1121. -            # if we don't know, then guess the natural character type
  1122. -            # (which may be signed or unsigned)
  1123. -            #
  1124. -            sizetype="$dfltsize"
  1125. -
  1126. -            echo "${SP}Couldn't determine the correct settings for the"
  1127. -            echo "${SP}  sizetype parameter for the write func, I will guess"
  1128. -            echo "${SP}  that the sizetype is $sizetype"
  1129. -
  1130. -            #
  1131. -            # put the guesses into the tmpdef file and flag them as a guess
  1132. -            #
  1133. -            echo "#define WRTSIZE $siztype  /* *GUESS* */" >  ${TMPDEF}
  1134. -        fi
  1135. -
  1136. -        cat < ${TMPDEF} >> ${TMPSET}.s
  1137. -
  1138. -        #
  1139. -        # now that we have the settings determined, lets see if we have
  1140. -        # any routines that are built in by the compiler.  These will
  1141. -        # typically be string functions like strcpy and/or memory funcs
  1142. -        #
  1143. -        # -- not implemented yet
  1144. -        #
  1145. -        
  1146. -        ) < /dev/null
  1147. -
  1148. -        if [ -s ${TMPBREAK} ]; then
  1149. -            break;
  1150. -        fi
  1151. -
  1152. -    done < ${TMPCOMP}
  1153. -
  1154. -    if [ -s ${TMPFATAL} ]; then
  1155. -        exit `cat ${TMPFATAL}`
  1156. -    fi
  1157. -
  1158. -    cat ${TMPEND} >> ${TMPSET}
  1159. -
  1160. -    cp ${TMPSET} ${CONFFILE}
  1161. -
  1162. -    #
  1163. -    # now make the correct determinations for building the library (see
  1164. -    # what #defs are needed for the compilation).
  1165. -    #
  1166. -
  1167. -    rm -f ${CONFFILE}.s
  1168. -    (
  1169. -    echo "/*"
  1170. -    echo " * This file is mechanically generated by the Configure script."
  1171. -    echo " * If there is something wrong here, modify the configure script"
  1172. -    echo " * so that it is no longer generated wrong and please send email"
  1173. -    echo " * to the author so that the fix is included with the next patch"
  1174. -    echo " * release."
  1175. -    echo " */"
  1176. -    echo ""
  1177. -    echo "#ifndef _SYSDEF_H     /* double inclusion guard */"
  1178. -    echo "#define _SYSDEF_H 1"
  1179. -    echo ""
  1180. -    ) > ${CONFFILE}.s
  1181. -
  1182. -    #
  1183. -    # put in the compiler settings
  1184. -    #
  1185. -    cat ${TMPSET}.s >> ${CONFFILE}.s
  1186. -
  1187. -    if [ -s ${TMPEND}.s ]; then
  1188. -        cat ${TMPEND}.s >> ${CONFFILE}.s
  1189. -    fi
  1190. -
  1191. -    rm -f ${TMPFOUND}
  1192. -
  1193. -    #
  1194. -    # if we have the Intrinsic.h file, then set the flag to indicate so
  1195. -    #
  1196. -    if [ -s /usr/include/X11/Intrinsic.h ]; then
  1197. -        (    
  1198. -        echo "/*" 
  1199. -        echo " * Found X intrinsic file in /usr/include/X11"
  1200. -        echo " */"
  1201. -        echo "#define FOUND_X_INTRINSIC 1"
  1202. -        echo ""
  1203. -        ) >> ${CONFFILE}.s
  1204. -    else
  1205. -        (    
  1206. -        echo "/*" 
  1207. -        echo " * Didn't find X intrinsic file in /usr/include/X11"
  1208. -        echo " */"
  1209. -        echo "/* #define FOUND_X_INTRINSIC 1 */" 
  1210. -        echo ""
  1211. -        ) >> ${CONFFILE}.s
  1212. -    fi
  1213. -    
  1214. -
  1215. -    #
  1216. -    # if wait.h is present in /usr/include/sys/wait.h
  1217. -    #
  1218. -    if [ -s /usr/include/sys/wait.h ]; then
  1219. -        (    
  1220. -        echo "/*" 
  1221. -        echo " * Found wait.h in /usr/include/sys"
  1222. -        echo " */"
  1223. -        echo "#define NEED_WAIT 1"
  1224. -        echo ""
  1225. -        ) >> ${CONFFILE}.s
  1226. -    else
  1227. -        (    
  1228. -        echo "/*" 
  1229. -        echo " * Didn't find wait.h in /usr/include/sys"
  1230. -        echo " */"
  1231. -        echo "/* #define NEED_WAIT 1 */" 
  1232. -        echo ""
  1233. -        ) >> ${CONFFILE}.s
  1234. -    fi
  1235. -    
  1236. -    #
  1237. -    # check to see if the XtAlloc module includes definitions for the Heap
  1238. -    # management.  Note that this is generic for all compilers, so it
  1239. -    # will come after the per-compiler stuff in ${CONFFILE}.s
  1240. -    #
  1241. -    for i in $LIBDIRS
  1242. -    do
  1243. -        if [ -s $i/libXt.a ]; then
  1244. -            ar xv $i/libXt.a Alloc.o > /dev/null 2>&1
  1245. -            heap=`( nm Alloc.o | grep XtHeapInit ) 2>/dev/null`
  1246. -            rm -f Alloc.o
  1247. -            echo found >> ${TMPFOUND}
  1248. -
  1249. -            if [ -z "$heap" ]; then
  1250. -            
  1251. -                (
  1252. -                echo "/*" 
  1253. -                echo " * don't force inclusion of XtHeap"
  1254. -                echo " */"
  1255. -                echo "#define DONT_FORCE_HEAPSTUFF 1"
  1256. -                echo ""
  1257. -                ) >> ${CONFFILE}.s
  1258. -        
  1259. -                break
  1260. -            fi
  1261. -
  1262. -        fi
  1263. -    done
  1264. -
  1265. -    if [ ! -s ${TMPFOUND} ]; then
  1266. -        (
  1267. -        echo "/*" 
  1268. -        echo " * don't force inclusion of XtHeap"
  1269. -        echo " */"
  1270. -        echo "#define DONT_FORCE_HEAPSTUFF 1"
  1271. -        echo ""
  1272. -        ) >> ${CONFFILE}.s
  1273. -    fi
  1274. -
  1275. -    (
  1276. -    echo ""
  1277. -    echo "#endif  /* _SYSDEF_H */"
  1278. -    echo ""
  1279. -    ) >> ${CONFFILE}.s
  1280. -
  1281. -fi
  1282. -
  1283. -#
  1284. -# if we guessed at any of the settings, tell the user about it
  1285. -#
  1286. -if grep "\*GUESS\*" ${CONFFILE} ${CONFFILE}.s > /dev/null 2>&1; then
  1287. -    echo ""
  1288. -    echo "    Warning: There were some settings that I could not determine"
  1289. -    echo "             the correct values for and so I have guessed at the"
  1290. -    echo "             correct settings.  You should review the .configure"
  1291. -    echo "             and .configure.s files and review the settings to"
  1292. -    echo "             make sure they are correct.  The settings that were"
  1293. -    echo "             guessed at will be marked with '/* *GUESS* */'"
  1294. -    echo ""
  1295. -    echo "             See the PROBLEMS file for a description of what the"
  1296. -    echo "             settings are supposed to be"
  1297. -    echo ""
  1298. -    echo "             Most of the time you can ignore this warning and"
  1299. -    echo "             just continue with the compilation of the library"
  1300. -    echo "             and have no problems."
  1301. -    echo ""
  1302. -    echo "             Once you determine that the settings are correct, you"
  1303. -    echo "             can remove the GUESS flags and you will no longer get"
  1304. -    echo "             this warning when building the library"
  1305. -    echo ""
  1306. -fi
  1307. -
  1308. -#
  1309. -# Create malloc.h with the new settings
  1310. -#
  1311. -ed malloc.h.org <<ended > /dev/null 2>&1
  1312. -/^DATATYPES_MARKER/
  1313. -d
  1314. -. r ${CONFFILE}
  1315. -w malloc.h
  1316. -q
  1317. -ended
  1318. -
  1319. -#
  1320. -# and now add in the system definitions
  1321. -#
  1322. -cp ${CONFFILE}.s sysdefs.h
  1323. -
  1324. -#
  1325. -# and now handle the memset and memcpy routines (if it hasn't been done
  1326. -# already)
  1327. -#
  1328. -if [ ! -s ${CONFFILE}.O ]; then
  1329. -
  1330. -    #
  1331. -    # find compiler for testing modified modules Note that we only use cc
  1332. -    # or gcc for this step because we think that these are the only usefull
  1333. -    # compilers to perform this step
  1334. -    #
  1335. -    rm -f ${TMPCC}
  1336. -    for compiler in cc gcc
  1337. -    do
  1338. -        for dir in ${DIRLIST}
  1339. -        do
  1340. -            if [ -s ${dir}/${compiler} ]; then
  1341. -                echo "${dir}/${compiler}" > ${TMPCC}
  1342. -                break
  1343. -            fi
  1344. -        done
  1345. -        if [ -s ${TMPCC} ]; then
  1346. -            break;
  1347. -        fi
  1348. -    done
  1349. -
  1350. -    cc=`cat ${TMPCC} < /dev/null`
  1351. -
  1352. -    #
  1353. -    # find libc.a
  1354. -    #
  1355. -    for i in $LIBDIRS
  1356. -    do
  1357. -        if [ -s $i/libc.a ]; then
  1358. -        
  1359. -            LIBC=$i/libc.a
  1360. -            break
  1361. -        
  1362. -        fi
  1363. -    done
  1364. -
  1365. -    ar xv ${LIBC} memcpy.o memset.o memmove.o > /dev/null 2>&1
  1366. -
  1367. -    #
  1368. -    # If at least one of the modules were found, build the changestr module
  1369. -    #
  1370. -    if [ -s memset.o -o -s memcpy.o  -o -s memmove.o ]; then
  1371. -
  1372. -        ${cc} -DCHANGESTR cctest.c -o changestr > /dev/null 2>&1
  1373. -
  1374. -    fi
  1375. -
  1376. -    if [ -s memmove.o ]; then
  1377. -        TESTPGMS="memset memmove"
  1378. -    else
  1379. -        TESTPGMS="memset memcpy"
  1380. -    fi
  1381. -
  1382. -    #
  1383. -    # if we found memset.o
  1384. -    #
  1385. -    for i in ${TESTPGMS}
  1386. -    do
  1387. -        #
  1388. -        # get the name of the target
  1389. -        #
  1390. -        case $i in
  1391. -            memmove|memcpy)
  1392. -                tgtstr=DataMC
  1393. -                tgtfile=datamc
  1394. -                def=TESTDATAMC
  1395. -                ;;
  1396. -            memset)
  1397. -                tgtstr=DataMS
  1398. -                tgtfile=datams
  1399. -                def=TESTDATAMS
  1400. -                ;;
  1401. -        esac
  1402. -
  1403. -        rm -f ${tgtfile}.O
  1404. -
  1405. -        if [ -s ${i}.o ]; then
  1406. -
  1407. -            #
  1408. -            # change the file
  1409. -            #
  1410. -            chmod +w ${i}.o
  1411. -            ./changestr ${i}.o ${i} ${tgtstr}
  1412. -
  1413. -            if [ $? = 0 ]; then
  1414. -        
  1415. -                #
  1416. -                # test new memset module
  1417. -                # 
  1418. -                rm -f cctest
  1419. -                ${cc} -D${def} cctest.c -o cctest ${i}.o  \
  1420. -                    > /dev/null 2>&1
  1421. -
  1422. -                if [ -s cctest ];  then
  1423. -                    output=`./cctest`
  1424. -                else
  1425. -                    output=0
  1426. -                fi
  1427. -            else
  1428. -                output=0
  1429. -            fi
  1430. -
  1431. -            #
  1432. -            # if the output from the command is correct then
  1433. -            # save the .o file in DataMS.O so that the
  1434. -            # makefile knows to use it
  1435. -            #
  1436. -            if [ "x${output}" = "xx   yyy" ]; then
  1437. -            
  1438. -                #
  1439. -                # move the object module so the makefile
  1440. -                # knows to use it
  1441. -                #
  1442. -                rm -f ${tgtfile}.O
  1443. -                mv ${i}.o ${tgtfile}.O
  1444. -                rm -f ${i}.o
  1445. -        
  1446. -            fi
  1447. -
  1448. -            #
  1449. -            # clean up after ourselves
  1450. -            #
  1451. -            rm -f ${i}.o
  1452. -
  1453. -        fi
  1454. -
  1455. -    done
  1456. -
  1457. -    echo "Configured .O files at `date`" >> ${CONFFILE}.O
  1458. -
  1459. -fi
  1460. -
  1461. -rm -f changestr
  1462. -
  1463. -#
  1464. -# clean up after ourselves
  1465. -#
  1466. -rm  -f ${TMPDIR}/CF$$* cctest cctest.o ${CCFILE}.[co] a.out
  1467. diff -rup --new-file baseline/contrib/dbmalloc/Makefile amiga/contrib/dbmalloc/Makefile
  1468. --- baseline/contrib/dbmalloc/Makefile    Sun May  1 16:28:54 1994
  1469. +++ amiga/contrib/dbmalloc/Makefile    Wed Dec 31 17:00:00 1969
  1470. @@ -1,354 +0,0 @@
  1471. -#
  1472. -# 
  1473. -#  (c) Copyright 1990, 1991, 1992 Conor P. Cahill (uunet!virtech!cpcahil).  
  1474. -# 
  1475. -#  This software may be distributed freely as long as the following conditions
  1476. -#  are met:
  1477. -#          * the distribution, or any derivative thereof, may not be
  1478. -#           included as part of a commercial product
  1479. -#         * full source code is provided including this copyright
  1480. -#         * there is no charge for the software itself (there may be
  1481. -#           a minimal charge for the copying or distribution effort)
  1482. -#         * this copyright notice is not modified or removed from any
  1483. -#           source file
  1484. -#
  1485. -#
  1486. -# $Id: Makefile,v 1.39 1992/08/22 16:27:13 cpcahil Exp $
  1487. -#
  1488. -# This is the Makefile for the malloc debugging library
  1489. -#
  1490. -# NOTE: while most porting changes are made here, the malloc.h file
  1491. -#       may require hand editing (mostly the DATATYPE and SIZETYPE
  1492. -#    typedefs) because of system wierdities.
  1493. -#
  1494. -# Usefull targets:
  1495. -#
  1496. -#    all        make all programs/libs in the local directory
  1497. -#    install        install updated programs/libs
  1498. -#    frcinstall    install all programs/libs
  1499. -#    tests        build tests
  1500. -#    runtests    build and run all tests
  1501. -#    clean        clean up after yourself
  1502. -#    fullclean    clean up everything (including configure stuff)
  1503. -#
  1504. -# NOTE: there are several other targets used by myself for souce code
  1505. -# maintenance related functions.  These are probably specific to my system
  1506. -# and may not do what they are supposed to do in a different environment.
  1507. -# Therefore, unless you know what you are doing, I would suggest not running
  1508. -# them (hence why they are not documented here).
  1509. -#
  1510. -# And now, onto a few definitions that you may need to alter
  1511. -#
  1512. -# The following defines may be added as necessary to the CFLAGS definition:
  1513. -#
  1514. -# -DANSI_NULLS      if you want to allow passing of NULL pointers to realloc
  1515. -#            and/or free (as ANSI does) even if the library is
  1516. -#            compiled by a non-ANSI compiler.
  1517. -# -DNO_ANSI_NULLS     if you DON'T want to allow passing of NULL pointers to
  1518. -#            realloc and/or free, even if the library is compiled by
  1519. -#            an ANSI conforming compiler.
  1520. -# -DDONT_USE_ASM    don't use ASM speedups when replacing system memcpy
  1521. -#            and/or memset routines
  1522. -# -DCTYPE_SUPPORT=x    where x is one of the following
  1523. -#
  1524. -#                1 - use plain-jane ctype.h which is only valid
  1525. -#                    for the ansii character set (DEFAULT)
  1526. -#                2 - use POSIX setlocal() to setup the character
  1527. -#                    set definitions
  1528. -#                3 - use C library islower() & toupper()
  1529. -#                    functions
  1530. -#
  1531. -# NOTE: if you add any flags other than the above to the CFLAGS, you might want
  1532. -#    to add a similar arguement in the Config.flags file.  However, you
  1533. -#     should remember that the malloc.h configuration will depend upon these
  1534. -#    settings and you could have a problem if you attempt to use the file
  1535. -#    in a compile session that doesn't include these flags.
  1536. -#
  1537. -CFLAGS=-g
  1538. -#
  1539. -# Where the code will be installed
  1540. -#
  1541. -#    DESTDIR        root for installation directory
  1542. -#    INSTDIR     installation directory
  1543. -#    LIBINSTDIR    install directory for library
  1544. -#    INCINSTDIR    install directory for include files
  1545. -#    MANINSTDIR    manual installation directory
  1546. -#    MANINSTNAME    name to install the manual as
  1547. -#    MANINSTVER    manual install version (use malloc.3 for troff/nroff
  1548. -#            source and malloc.man for pre-formatted)
  1549. -#
  1550. -DESTDIR=
  1551. -INSTDIR=$(DESTDIR)/usr/local
  1552. -LIBINSTDIR=$(INSTDIR)/lib
  1553. -INCINSTDIR=$(INSTDIR)/debug_include
  1554. -MANINSTDIR=$(INSTDIR)/man/man3
  1555. -RANLIB=/usr/local/bin/ranlib
  1556. -MANINSTNAME=dbmalloc.3
  1557. -MANINSTVER=malloc.3
  1558. -
  1559. -#
  1560. -# miscellaneous commands
  1561. -#
  1562. -# NOTE: if you change CC to a non-K&R compiler be sure to read the 
  1563. -#       PROBLEMS file first.
  1564. -#
  1565. -CC=cc
  1566. -CPROTO=/usr/local/bin/cproto
  1567. -LINT=lint
  1568. -NROFF=nroff
  1569. -SHARCMD=makekit -p -m -nmallocshar.
  1570. -SHELL=/bin/sh
  1571. -
  1572. -LIB=libdbmalloc.a
  1573. -LINTLIB=llib-ldbmal.ln
  1574. -
  1575. -#
  1576. -# You shouldn't have to modify anything below this line
  1577. -#
  1578. -LIBSRCS=    malloc.c    \
  1579. -        datamc.c    \
  1580. -        datams.c    \
  1581. -        dgmalloc.c    \
  1582. -        fill.c        \
  1583. -        free.c        \
  1584. -        realloc.c    \
  1585. -        calloc.c    \
  1586. -        string.c    \
  1587. -        mcheck.c    \
  1588. -        mchain.c    \
  1589. -        memory.c    \
  1590. -        tostring.c    \
  1591. -        m_perror.c    \
  1592. -        m_init.c    \
  1593. -        mallopt.c    \
  1594. -        dump.c         \
  1595. -        stack.c        \
  1596. -        xmalloc.c    \
  1597. -        xheap.c        \
  1598. -        malign.c    \
  1599. -        size.c        \
  1600. -        abort.c        \
  1601. -        leak.c    
  1602. -
  1603. -LIBOBJS=    malloc.o    \
  1604. -        datamc.o    \
  1605. -        datams.o    \
  1606. -        dgmalloc.o    \
  1607. -        fill.o        \
  1608. -        free.o        \
  1609. -        realloc.o    \
  1610. -        calloc.o    \
  1611. -        string.o    \
  1612. -        mcheck.o    \
  1613. -        mchain.o    \
  1614. -        memory.o    \
  1615. -        tostring.o    \
  1616. -        m_perror.o    \
  1617. -        m_init.o    \
  1618. -        mallopt.o    \
  1619. -        dump.o         \
  1620. -        stack.o        \
  1621. -        xmalloc.o    \
  1622. -        xheap.o        \
  1623. -        malign.o    \
  1624. -        size.o        \
  1625. -        abort.o        \
  1626. -        leak.o    
  1627. -
  1628. -SRCS=$(LIBSRCS) testmalloc.c testmem.c testerr.c teststack.c cctest.c
  1629. -HDRS= malloc.h.org mallocin.h debug.h tostring.h
  1630. -
  1631. -BUILDFILES=malloc.man prototypes.h 
  1632. -
  1633. -MANSRCFILES=patchlevel README PROBLEMS CHANGES Buildpatch minipatch Makefile \
  1634. -    malloc.3 malloc.man $(SRCS) $(HDRS) prototypes.h \
  1635. -    Configure Config.flags Runtests testerr.base
  1636. -SRCFILES=MANIFEST $(MANSRCFILES)
  1637. -
  1638. -TESTS=testmalloc testmem testerr teststack
  1639. -
  1640. -all:    $(LIB)
  1641. -
  1642. -install: $(LIBINSTDIR)/$(LIB) $(INCINSTDIR)/malloc.h \
  1643. -    $(MANINSTDIR)/$(MANINSTNAME)
  1644. -
  1645. -frcinstall: rminstall install
  1646. -
  1647. -rminstall:
  1648. -    rm -f $(LIBINSTDIR)/$(LIB) $(INCINSTDIR)/malloc.h \
  1649. -    $(MANINSTDIR)/$(MANINSTNAME)
  1650. -
  1651. -$(LIBINSTDIR)/$(LIB): $(LIB)
  1652. -    -rm -f $@.old
  1653. -    -mv -f $@ $@.old
  1654. -    cp $? $@
  1655. -    @-if test -s $(RANLIB); then $(RANLIB) $@; \
  1656. -         else if test -s /bin/ranlib; then /bin/ranlib $@; \
  1657. -     else if test -s /usr/bin/ranlib; then /usr/bin/ranlib $@; \
  1658. -     else exit 0; fi; fi; fi
  1659. -    -chmod 644 $@
  1660. -    -rm -f $@.old
  1661. -
  1662. -$(INCINSTDIR)/malloc.h: malloc.h
  1663. -    -rm -f $@.old
  1664. -    -mv -f $@ $@.old
  1665. -    cp $? $@
  1666. -    -chmod 644 $@
  1667. -    -rm -f $@.old
  1668. -    
  1669. -$(MANINSTDIR)/$(MANINSTNAME): $(MANINSTVER)
  1670. -    -rm -f $@.old
  1671. -    -mv -f $@ $@.old
  1672. -    cp $? $@
  1673. -    -chmod 644 $@
  1674. -    -rm -f $@.old
  1675. -
  1676. -tests:    $(TESTS)
  1677. -
  1678. -#
  1679. -# runtests - target for building and running the tests.  Note that we 
  1680. -# run testmalloc with fill_area disabled.  This is because testmalloc is
  1681. -# a malloc exerciser and we just want to see if we broke malloc, not verify
  1682. -# that the test doesn't overwrite memory (since it doesn't).
  1683. -#
  1684. -runtests: tests
  1685. -    @echo "Running all of the test programs.  This may take a while so"
  1686. -    @echo "please be patient.  Note that you won't see any output unless"
  1687. -    @echo "a test fails....."
  1688. -    ./Runtests
  1689. -
  1690. -clean:  
  1691. -    rm -f $(TESTS) pgm cctest $(LIB) *.o *.ln Runtests.out malloc.h \
  1692. -        sysdefs.h
  1693. -
  1694. -fullclean: clean
  1695. -    rm -f .configure .configure.[sO] *.O core cscope.out tags
  1696. -
  1697. -sharfile: $(SRCFILES) CHECKSUMS
  1698. -    $(SHARCMD)
  1699. -
  1700. -CHECKSUMS: $(SRCFILES)
  1701. -    echo "SYSV sums:\n" > CHECKSUMS
  1702. -    sum $(SRCFILES) >> CHECKSUMS
  1703. -    echo "\nBSD sums (generated using sum -r on SYSV system):\n" >>CHECKSUMS
  1704. -    sum -r $(SRCFILES) >> CHECKSUMS
  1705. -
  1706. -MANIFEST: $(MANSRCFILES)    
  1707. -    $(SHARCMD) -x
  1708. -    chmod -w MANIFEST
  1709. -    
  1710. -$(LIB): $(LIBOBJS)
  1711. -    ar ru $(LIB) $(LIBOBJS)
  1712. -    @-if test -s $(RANLIB); then $(RANLIB) $@; \
  1713. -         else if test -s /bin/ranlib; then /bin/ranlib $@; \
  1714. -     else if test -s /usr/bin/ranlib; then /usr/bin/ranlib $@; \
  1715. -     else exit 0; fi; fi; fi
  1716. -
  1717. -$(LINTLIB): $(LIBSRCS)
  1718. -    $(LINT) -x -v -o dbmal $(LIBSRCS)
  1719. -
  1720. -malloc.h: malloc.h.org Configure
  1721. -    ./Configure 
  1722. -
  1723. -sysdefs.h: Configure
  1724. -    ./Configure 
  1725. -
  1726. -#
  1727. -# stuff for building the nroffed version of the manual page
  1728. -#
  1729. -man:    malloc.man
  1730. -
  1731. -malloc.man: malloc.3
  1732. -    rm -f malloc.man
  1733. -    $(NROFF) -man malloc.3 | col -b > malloc.man
  1734. -
  1735. -#
  1736. -# stuff for building the test programs
  1737. -#
  1738. -testmalloc:    $(LIB) testmalloc.o
  1739. -    $(CC) $(CFLAGS) -o $@ testmalloc.o $(LIB)
  1740. -
  1741. -testmem:    $(LIB) testmem.o
  1742. -    $(CC) $(CFLAGS) -o $@ testmem.o $(LIB)
  1743. -
  1744. -teststack:    $(LIB) teststack.o
  1745. -    $(CC) $(CFLAGS) -o $@ teststack.o $(LIB)
  1746. -
  1747. -testerr:    $(LIB) testerr.o
  1748. -    $(CC) $(CFLAGS) -o $@ testerr.o $(LIB)
  1749. -
  1750. -#
  1751. -# misc stuff for source code maintenance
  1752. -#
  1753. -lint:    
  1754. -    $(LINT) $(CFLAGS) $(SRCS)
  1755. -
  1756. -proto:
  1757. -    rm -f prototypes.h
  1758. -    make prototypes.h
  1759. -
  1760. -prototypes.h: $(LIBSRCS) $(HDRS) malloc.h
  1761. -    @if [ ! -s $(CPROTO) ]; then \
  1762. -        echo "Need cproto to rebuild prototypes file";\
  1763. -        exit 1; \
  1764. -    else \
  1765. -        exit 0; \
  1766. -    fi
  1767. -    -rm -f prototypes.h
  1768. -    cp /dev/null prototypes.h
  1769. -    $(CPROTO) -Dforce_cproto_to_use_defines -D__STDC__ \
  1770. -         -DDONT_USE_ASM -m__stdcargs -f4 $(LIBSRCS) \
  1771. -         | sed -e "s/const/CONST/g" > prototypes.new
  1772. -    mv prototypes.new prototypes.h
  1773. -    chmod -w prototypes.h
  1774. -    
  1775. -patch: $(SRCFILES)
  1776. -    sh Buildpatch $(SRCFILES)
  1777. -
  1778. -srclist:
  1779. -    @echo $(SRCFILES)
  1780. -
  1781. -rcsclean: $(BUILDFILES)
  1782. -    -rcsclean -q $(SRCFILES)
  1783. -    -ls $(SRCFILES) 2>/dev/null > files.list
  1784. -    -rcs -i -t/dev/null `cat files.list` 2>/dev/null
  1785. -    @set -e; \
  1786. -    echo "files to be checked in: `cat files.list`"; \
  1787. -    echo "\n\tMessage: \c"; \
  1788. -    read message; \
  1789. -    echo ""; \
  1790. -    rcs -q -l `cat files.list`; \
  1791. -    ci -m"$$message" `cat files.list`; \
  1792. -    co -u $(SRCFILES)
  1793. -
  1794. -#
  1795. -# special rules for building datams.o and datamc.o
  1796. -#
  1797. -datams.o: datams.c malloc.h mallocin.h sysdefs.h
  1798. -    @rm -f datams.o; \
  1799. -    if [ -s datams.O ]; then \
  1800. -        echo "        cp datams.O $@"; \
  1801. -        cp datams.O $@; \
  1802. -    else \
  1803. -        echo "        $(CC) $(CFLAGS) -c datams.c"; \
  1804. -        $(CC) $(CFLAGS) -c datams.c; \
  1805. -    fi
  1806. -
  1807. -datamc.o: datamc.c malloc.h mallocin.h sysdefs.h
  1808. -    @rm -f datamc.o; \
  1809. -    if [ -s datamc.O ]; then \
  1810. -        echo "        cp datamc.O $@"; \
  1811. -        cp datamc.O $@; \
  1812. -    else \
  1813. -        echo "        $(CC) $(CFLAGS) -c datamc.c"; \
  1814. -        $(CC) $(CFLAGS) -c datamc.c; \
  1815. -    fi
  1816. -
  1817. -#
  1818. -# include file dependencies
  1819. -#
  1820. -$(LIBOBJS):    malloc.h mallocin.h sysdefs.h
  1821. -
  1822. -testerr.o testmalloc.o testmem.o:    malloc.h sysdefs.h
  1823. -
  1824. -tostring.o malloc.o dump.o:    tostring.h sysdefs.h
  1825. diff -rup --new-file baseline/contrib/dbmalloc/Makefile.in amiga/contrib/dbmalloc/Makefile.in
  1826. --- baseline/contrib/dbmalloc/Makefile.in    Wed Dec 31 17:00:00 1969
  1827. +++ amiga/contrib/dbmalloc/Makefile.in    Sat Sep 28 00:00:00 1996
  1828. @@ -0,0 +1,281 @@
  1829. +#
  1830. +# 
  1831. +#  (c) Copyright 1990, 1991, 1992 Conor P. Cahill (uunet!virtech!cpcahil).  
  1832. +# 
  1833. +#  This software may be distributed freely as long as the following conditions
  1834. +#  are met:
  1835. +#          * the distribution, or any derivative thereof, may not be
  1836. +#           included as part of a commercial product
  1837. +#         * full source code is provided including this copyright
  1838. +#         * there is no charge for the software itself (there may be
  1839. +#           a minimal charge for the copying or distribution effort)
  1840. +#         * this copyright notice is not modified or removed from any
  1841. +#           source file
  1842. +#
  1843. +#
  1844. +# $Id: Makefile,v 1.39 1992/08/22 16:27:13 cpcahil Exp $
  1845. +#
  1846. +# This is the Makefile for the malloc debugging library
  1847. +#
  1848. +# NOTE: while most porting changes are made here, the malloc.h file
  1849. +#       may require hand editing (mostly the DATATYPE and SIZETYPE
  1850. +#    typedefs) because of system wierdities.
  1851. +#
  1852. +# Useful targets:
  1853. +#
  1854. +#    all        make all programs/libs in the local directory
  1855. +#    install        install updated programs/libs
  1856. +#    frcinstall    install all programs/libs
  1857. +#    tests        build tests
  1858. +#    runtests    build and run all tests
  1859. +#    clean        clean up after yourself
  1860. +#    fullclean    clean up everything (including configure stuff)
  1861. +#
  1862. +# NOTE: there are several other targets used by myself for souce code
  1863. +# maintenance related functions.  These are probably specific to my system
  1864. +# and may not do what they are supposed to do in a different environment.
  1865. +# Therefore, unless you know what you are doing, I would suggest not running
  1866. +# them (hence why they are not documented here).
  1867. +#
  1868. +# And now, onto a few definitions that you may need to alter
  1869. +#
  1870. +# The following defines may be added as necessary to the CFLAGS definition:
  1871. +#
  1872. +# -DANSI_NULLS      if you want to allow passing of NULL pointers to realloc
  1873. +#            and/or free (as ANSI does) even if the library is
  1874. +#            compiled by a non-ANSI compiler.
  1875. +# -DNO_ANSI_NULLS     if you DON'T want to allow passing of NULL pointers to
  1876. +#            realloc and/or free, even if the library is compiled by
  1877. +#            an ANSI conforming compiler.
  1878. +# -DDONT_USE_ASM    don't use ASM speedups when replacing system memcpy
  1879. +#            and/or memset routines
  1880. +# -DCTYPE_SUPPORT=x    where x is one of the following
  1881. +#
  1882. +#                1 - use plain-jane ctype.h which is only valid
  1883. +#                    for the ansii character set (DEFAULT)
  1884. +#                2 - use POSIX setlocal() to setup the character
  1885. +#                    set definitions
  1886. +#                3 - use C library islower() & toupper()
  1887. +#                    functions
  1888. +#
  1889. +# NOTE: if you add any flags other than the above to the CFLAGS, you might want
  1890. +#    to add a similar arguement in the Config.flags file.  However, you
  1891. +#     should remember that the malloc.h configuration will depend upon these
  1892. +#    settings and you could have a problem if you attempt to use the file
  1893. +#    in a compile session that doesn't include these flags.
  1894. +#
  1895. +
  1896. +srcdir =    @srcdir@
  1897. +VPATH =        @srcdir@
  1898. +
  1899. +prefix =    @prefix@
  1900. +exec_prefix =    @exec_prefix@
  1901. +
  1902. +bindir =    $(exec_prefix)/bin
  1903. +libdir =    $(exec_prefix)/lib
  1904. +incdir =    $(prefix)/include/dbmalloc
  1905. +infodir =    $(prefix)/info
  1906. +mandir =    $(prefix)/man/man3
  1907. +
  1908. +INSTALL =    @INSTALL@
  1909. +INSTALL_PROGRAM = @INSTALL_PROGRAM@
  1910. +INSTALL_DATA =    @INSTALL_DATA@
  1911. +
  1912. +SHELL =        /bin/sh
  1913. +CC =        @CC@
  1914. +AR =        ar
  1915. +RM =        rm
  1916. +RANLIB =    @RANLIB@
  1917. +DEFS =        @DEFS@
  1918. +LIBS =        @LIBS@
  1919. +CFLAGS =    @CFLAGS@
  1920. +LDFLAGS =    @LDFLAGS@
  1921. +
  1922. +INCLUDES =    -I. -I$(srcdir)
  1923. +OUR_CFLAGS =    $(DEFS) $(INCLUDES) $(CFLAGS)
  1924. +
  1925. +.c.o:
  1926. +        $(CC) -c $(OUR_CFLAGS) $<
  1927. +#
  1928. +# miscellaneous commands
  1929. +#
  1930. +# NOTE: if you change CC to a non-K&R compiler be sure to read the 
  1931. +#       PROBLEMS file first.
  1932. +#
  1933. +CPROTO=/ade/bin/cproto
  1934. +LINT=lint
  1935. +NROFF=nroff
  1936. +SHARCMD=makekit -p -m -nmallocshar.
  1937. +
  1938. +LIB =        libdbmalloc.a
  1939. +LINTLIB =    llib-ldbmal.ln
  1940. +
  1941. +#
  1942. +# You shouldn't have to modify anything below this line
  1943. +#
  1944. +
  1945. +LIBSRCS=    malloc.c datamc.c datams.c dgmalloc.c fill.c free.c realloc.c \
  1946. +        calloc.c string.c mcheck.c mchain.c memory.c tostring.c    \
  1947. +        m_perror.c m_init.c mallopt.c dump.c stack.c xmalloc.c    \
  1948. +        xheap.c malign.c size.c abort.c leak.c sbrk.c
  1949. +
  1950. +LIBOBJS=    $(LIBSRCS:.c=.o)
  1951. +
  1952. +
  1953. +SRCS =        $(LIBSRCS) testmalloc.c testmem.c testerr.c teststack.c cctest.c
  1954. +HDRS =        malloc.h.org mallocin.h debug.h tostring.h
  1955. +
  1956. +BUILDFILES =    malloc.man prototypes.h 
  1957. +
  1958. +MANSRCFILES =    patchlevel README PROBLEMS CHANGES Buildpatch minipatch Makefile \
  1959. +        malloc.3 malloc.man $(SRCS) $(HDRS) prototypes.h \
  1960. +        Configure Config.flags Runtests testerr.base
  1961. +
  1962. +SRCFILES =    MANIFEST $(MANSRCFILES)
  1963. +
  1964. +TESTS =        testmalloc testmem testerr teststack
  1965. +
  1966. +all :        $(LIB) tests
  1967. +
  1968. +install :
  1969. +        $(INSTALL_DATA) $(LIB) $(libdir)/$(LIB)
  1970. +        $(RANLIB) $(libdir)/$(LIB)
  1971. +        $(INSTALL_DATA) $(srcdir)/malloc.h $(incdir)/malloc.h
  1972. +        $(INSTALL_DATA) $(srcdir)/malloc.3 $(mandir)/malloc.3
  1973. +
  1974. +rminstall:
  1975. +        rm -f $(libdir)/$(LIB) $(incdir)/malloc.h $(mandir)/malloc.3
  1976. +
  1977. +tests:        $(TESTS)
  1978. +
  1979. +#
  1980. +# runtests - target for building and running the tests.  Note that we 
  1981. +# run testmalloc with fill_area disabled.  This is because testmalloc is
  1982. +# a malloc exerciser and we just want to see if we broke malloc, not verify
  1983. +# that the test doesn't overwrite memory (since it doesn't).
  1984. +#
  1985. +
  1986. +runtests :    tests
  1987. +        @echo "Running all of the test programs.  This may take a while so"
  1988. +        @echo "please be patient.  Note that you won't see any output unless"
  1989. +        @echo "a test fails....."
  1990. +        ./Runtests
  1991. +
  1992. +clean :  
  1993. +        rm -f $(TESTS) pgm cctest $(LIB) *.o *.ln Runtests.out malloc.h \
  1994. +        sysdefs.h
  1995. +
  1996. +fullclean :    clean
  1997. +        rm -f .configure .configure.[sO] *.O core cscope.out tags
  1998. +
  1999. +sharfile :    $(SRCFILES) CHECKSUMS
  2000. +        $(SHARCMD)
  2001. +
  2002. +CHECKSUMS :    $(SRCFILES)
  2003. +        echo "SYSV sums:\n" > CHECKSUMS
  2004. +        sum $(SRCFILES) >> CHECKSUMS
  2005. +        echo "\nBSD sums (generated using sum -r on SYSV system):\n" >>CHECKSUMS
  2006. +        sum -r $(SRCFILES) >> CHECKSUMS
  2007. +
  2008. +MANIFEST :    $(MANSRCFILES)    
  2009. +        $(SHARCMD) -x
  2010. +        chmod -w MANIFEST
  2011. +    
  2012. +$(LIB) :    $(LIBOBJS)
  2013. +        $(RM) -f $@
  2014. +        $(AR) crv $@ $(LIBOBJS)
  2015. +        $(RANLIB) $@
  2016. +
  2017. +$(LINTLIB) :    $(LIBSRCS)
  2018. +        $(LINT) -x -v -o dbmal $(LIBSRCS)
  2019. +
  2020. +#
  2021. +# stuff for building the nroffed version of the manual page
  2022. +#
  2023. +
  2024. +man :        malloc.man
  2025. +
  2026. +malloc.man :    malloc.3
  2027. +        rm -f malloc.man
  2028. +        $(NROFF) -man malloc.3 | col -b > malloc.man
  2029. +
  2030. +#
  2031. +# stuff for building the test programs
  2032. +#
  2033. +
  2034. +testmalloc :    $(LIB) testmalloc.o
  2035. +        $(CC) $(CFLAGS) -o $@ testmalloc.o $(LIB)
  2036. +
  2037. +testmem :    $(LIB) testmem.o
  2038. +        $(CC) $(CFLAGS) -o $@ testmem.o $(LIB)
  2039. +
  2040. +teststack :    $(LIB) teststack.o
  2041. +        $(CC) $(CFLAGS) -o $@ teststack.o $(LIB)
  2042. +
  2043. +testerr :    $(LIB) testerr.o
  2044. +        $(CC) $(CFLAGS) -o $@ testerr.o $(LIB)
  2045. +
  2046. +#
  2047. +# misc stuff for source code maintenance
  2048. +#
  2049. +
  2050. +lint :    
  2051. +        $(LINT) $(CFLAGS) $(SRCS)
  2052. +
  2053. +proto :
  2054. +        rm -f prototypes.h
  2055. +        make prototypes.h
  2056. +
  2057. +prototypes.h :    $(LIBSRCS) $(HDRS) malloc.h
  2058. +        @if [ ! -s $(CPROTO) ]; then \
  2059. +            echo "Need cproto to rebuild prototypes file";\
  2060. +            exit 1; \
  2061. +        else \
  2062. +            exit 0; \
  2063. +        fi
  2064. +        -rm -f prototypes.h
  2065. +        cp /dev/null prototypes.h
  2066. +        $(CPROTO) -Dforce_cproto_to_use_defines -D__STDC__ \
  2067. +             -DDONT_USE_ASM -m__stdcargs -f4 $(LIBSRCS) \
  2068. +             | sed -e "s/const/CONST/g" > prototypes.new
  2069. +        mv prototypes.new prototypes.h
  2070. +        chmod -w prototypes.h
  2071. +    
  2072. +patch :        $(SRCFILES)
  2073. +        sh Buildpatch $(SRCFILES)
  2074. +
  2075. +srclist :
  2076. +        @echo $(SRCFILES)
  2077. +
  2078. +rcsclean :    $(BUILDFILES)
  2079. +        -rcsclean -q $(SRCFILES)
  2080. +        -ls $(SRCFILES) 2>/dev/null > files.list
  2081. +        -rcs -i -t/dev/null `cat files.list` 2>/dev/null
  2082. +        @set -e; \
  2083. +        echo "files to be checked in: `cat files.list`"; \
  2084. +        echo "\n\tMessage: \c"; \
  2085. +        read message; \
  2086. +        echo ""; \
  2087. +        rcs -q -l `cat files.list`; \
  2088. +        ci -m"$$message" `cat files.list`; \
  2089. +        co -u $(SRCFILES)
  2090. +
  2091. +#
  2092. +# special rules for building datams.o and datamc.o
  2093. +#
  2094. +
  2095. +datams.o :    datams.c malloc.h mallocin.h sysdefs.h
  2096. +datamc.o :    datamc.c malloc.h mallocin.h sysdefs.h
  2097. +
  2098. +#
  2099. +# include file dependencies
  2100. +#
  2101. +
  2102. +$(LIBOBJS) :    malloc.h mallocin.h sysdefs.h
  2103. +
  2104. +testerr.o :    malloc.h sysdefs.h
  2105. +testmalloc.o :    malloc.h sysdefs.h
  2106. +testmem.o :    malloc.h sysdefs.h
  2107. +tostring.o :    tostring.h sysdefs.h
  2108. +malloc.o :    tostring.h sysdefs.h
  2109. +dump.o :    tostring.h sysdefs.h
  2110. diff -rup --new-file baseline/contrib/dbmalloc/Product-Info amiga/contrib/dbmalloc/Product-Info
  2111. --- baseline/contrib/dbmalloc/Product-Info    Wed Dec 31 17:00:00 1969
  2112. +++ amiga/contrib/dbmalloc/Product-Info    Sat Sep 28 00:00:00 1996
  2113. @@ -0,0 +1,66 @@
  2114. +.name
  2115. +dbmalloc
  2116. +.fullname
  2117. +Debug Malloc Library
  2118. +.type
  2119. +Programmer Tool
  2120. +.short
  2121. +Debugging malloc/realloc/free routines.
  2122. +.description
  2123. +This is the malloc debugging library (patchlevel 14).  This library contains
  2124. +a drop-in replacement for the standard dynamic memory allocation routines and 
  2125. +many of the other C modules that are typically used to access and/or manipulate
  2126. +these data areas.  The replacements function almost identically to the original
  2127. +functions with the exception that they perform a significant amount of 
  2128. +error checking and/or validating.  
  2129. +
  2130. +This library can be used with very little (if any) changes to the original
  2131. +code (many times only requiring a re-link of the executable) and provide a
  2132. +full-service debugging capability.
  2133. +
  2134. +The entire library will follow in 10 separate shar files.
  2135. +
  2136. +This new version includes several enhancements over patch level 13 including:
  2137. +
  2138. +    * more auto-configuration tuning
  2139. +    * several bug fixes
  2140. +
  2141. +In addition to the changes listed above, this version contains the
  2142. +following changes since the comp.soures.reviewed release at patch
  2143. +level 7, in Volume 2, Issue 1:
  2144. +
  2145. +    * Much better performance
  2146. +    * automatic configuration on most systems
  2147. +    * addition of XtAlloc routines for X window debugging
  2148. +    * better identification of the source of double frees
  2149. +    * ability to record function stack info so error reports give 
  2150. +      the calling stack for where the data was allocated and/or the
  2151. +      error was detected (note: this is manually maintained by the pgm)
  2152. +    * more support for leak detection (especially with respect to getting
  2153. +      rid of leak reports on things you know are not leaks)
  2154. +    * additional checking of pointesr to make the library more robust
  2155. +    * added case insensitive string comparison routines
  2156. +    * several bug fixes and/or portability changes
  2157. +    * added ability to change the state of the fill area flag
  2158. +    * added capability to disallow reuse of free'd segments (so that
  2159. +      double frees could be more readily identified by the data in 
  2160. +      the segment
  2161. +    * a couple of function name changes
  2162. +    * new funcs: memalign, malloc_abort, malloc_size
  2163. +.version
  2164. +1.14
  2165. +.date
  2166. +1992.09.04
  2167. +.author
  2168. +Conor P. Cahill
  2169. +.distribution
  2170. +Copyrighted but Freely Redistributable
  2171. +.email
  2172. +cpcahil@vti.com
  2173. +.docs
  2174. +FIRST-README
  2175. +README
  2176. +.described-by
  2177. +Fred Fish (fnf@fishpond.cygnus.com)
  2178. +.submittal
  2179. +From comp.sources.misc Vol 32
  2180. diff -rup --new-file baseline/contrib/dbmalloc/configure amiga/contrib/dbmalloc/configure
  2181. --- baseline/contrib/dbmalloc/configure    Wed Dec 31 17:00:00 1969
  2182. +++ amiga/contrib/dbmalloc/configure    Mon Sep 30 22:31:23 1996
  2183. @@ -0,0 +1,1167 @@
  2184. +#! /bin/sh
  2185. +
  2186. +# Guess values for system-dependent variables and create Makefiles.
  2187. +# Generated automatically using autoconf version 2.10 
  2188. +# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
  2189. +#
  2190. +# This configure script is free software; the Free Software Foundation
  2191. +# gives unlimited permission to copy, distribute and modify it.
  2192. +
  2193. +# Defaults:
  2194. +ac_help=
  2195. +ac_default_prefix=/usr/local
  2196. +# Any additions from configure.in:
  2197. +
  2198. +# Initialize some variables set by options.
  2199. +# The variables have the same names as the options, with
  2200. +# dashes changed to underlines.
  2201. +build=NONE
  2202. +cache_file=./config.cache
  2203. +exec_prefix=NONE
  2204. +host=NONE
  2205. +no_create=
  2206. +nonopt=NONE
  2207. +no_recursion=
  2208. +prefix=NONE
  2209. +program_prefix=NONE
  2210. +program_suffix=NONE
  2211. +program_transform_name=s,x,x,
  2212. +silent=
  2213. +site=
  2214. +srcdir=
  2215. +target=NONE
  2216. +verbose=
  2217. +x_includes=NONE
  2218. +x_libraries=NONE
  2219. +bindir='${exec_prefix}/bin'
  2220. +sbindir='${exec_prefix}/sbin'
  2221. +libexecdir='${exec_prefix}/libexec'
  2222. +datadir='${prefix}/share'
  2223. +sysconfdir='${prefix}/etc'
  2224. +sharedstatedir='${prefix}/com'
  2225. +localstatedir='${prefix}/var'
  2226. +libdir='${exec_prefix}/lib'
  2227. +includedir='${prefix}/include'
  2228. +oldincludedir='/usr/include'
  2229. +infodir='${prefix}/info'
  2230. +guidedir='${prefix}/guide'
  2231. +psdir='${prefix}/ps'
  2232. +dvidir='${prefix}/dvi'
  2233. +mandir='${prefix}/man'
  2234. +
  2235. +# Initialize some other variables.
  2236. +subdirs=
  2237. +MFLAGS= MAKEFLAGS=
  2238. +
  2239. +ac_prev=
  2240. +for ac_option
  2241. +do
  2242. +
  2243. +  # If the previous option needs an argument, assign it.
  2244. +  if test -n "$ac_prev"; then
  2245. +    eval "$ac_prev=\$ac_option"
  2246. +    ac_prev=
  2247. +    continue
  2248. +  fi
  2249. +
  2250. +  case "$ac_option" in
  2251. +  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  2252. +  *) ac_optarg= ;;
  2253. +  esac
  2254. +
  2255. +  # Accept the important Cygnus configure options, so we can diagnose typos.
  2256. +
  2257. +  case "$ac_option" in
  2258. +
  2259. +  -bindir | --bindir | --bindi | --bind | --bin | --bi)
  2260. +    ac_prev=bindir ;;
  2261. +  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
  2262. +    bindir="$ac_optarg" ;;
  2263. +
  2264. +  -build | --build | --buil | --bui | --bu)
  2265. +    ac_prev=build ;;
  2266. +  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
  2267. +    build="$ac_optarg" ;;
  2268. +
  2269. +  -cache-file | --cache-file | --cache-fil | --cache-fi \
  2270. +  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  2271. +    ac_prev=cache_file ;;
  2272. +  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  2273. +  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  2274. +    cache_file="$ac_optarg" ;;
  2275. +
  2276. +  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
  2277. +    ac_prev=datadir ;;
  2278. +  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
  2279. +  | --da=*)
  2280. +    datadir="$ac_optarg" ;;
  2281. +
  2282. +  -disable-* | --disable-*)
  2283. +    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  2284. +    # Reject names that are not valid shell variable names.
  2285. +    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  2286. +      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  2287. +    fi
  2288. +    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  2289. +    eval "enable_${ac_feature}=no" ;;
  2290. +
  2291. +  -enable-* | --enable-*)
  2292. +    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  2293. +    # Reject names that are not valid shell variable names.
  2294. +    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  2295. +      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  2296. +    fi
  2297. +    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  2298. +    case "$ac_option" in
  2299. +      *=*) ;;
  2300. +      *) ac_optarg=yes ;;
  2301. +    esac
  2302. +    eval "enable_${ac_feature}='$ac_optarg'" ;;
  2303. +
  2304. +  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  2305. +  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  2306. +  | --exec | --exe | --ex)
  2307. +    ac_prev=exec_prefix ;;
  2308. +  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  2309. +  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  2310. +  | --exec=* | --exe=* | --ex=*)
  2311. +    exec_prefix="$ac_optarg" ;;
  2312. +
  2313. +  -gas | --gas | --ga | --g)
  2314. +    # Obsolete; use --with-gas.
  2315. +    with_gas=yes ;;
  2316. +
  2317. +  -help | --help | --hel | --he)
  2318. +    # Omit some internal or obsolete options to make the list less imposing.
  2319. +    # This message is too long to be a string in the A/UX 3.1 sh.
  2320. +    cat << EOF
  2321. +Usage: configure [options] [host]
  2322. +Options: [defaults in brackets after descriptions]
  2323. +Configuration:
  2324. +  --cache-file=FILE       cache test results in FILE
  2325. +  --help                  print this message
  2326. +  --no-create             do not create output files
  2327. +  --quiet, --silent       do not print \`checking...' messages
  2328. +  --version               print the version of autoconf that created configure
  2329. +Directory and file names:
  2330. +  --prefix=PREFIX         install architecture-independent files in PREFIX
  2331. +                          [$ac_default_prefix]
  2332. +  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
  2333. +                          [same as prefix]
  2334. +  --bindir=DIR            user executables in DIR [EPREFIX/bin]
  2335. +  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
  2336. +  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
  2337. +  --datadir=DIR           read-only architecture-independent data in DIR
  2338. +                          [PREFIX/share]
  2339. +  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
  2340. +  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
  2341. +                          [PREFIX/com]
  2342. +  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
  2343. +  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
  2344. +  --includedir=DIR        C header files in DIR [PREFIX/include]
  2345. +  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
  2346. +  --infodir=DIR           info documentation in DIR [PREFIX/info]
  2347. +  --guidedir=DIR          Amigaguide documentation in DIR [PREFIX/guide]
  2348. +  --psdir=DIR             postscript documentation in DIR [PREFIX/ps]
  2349. +  --dvidir=DIR            TeX dvi documentation in DIR [PREFIX/dvi]
  2350. +  --mandir=DIR            man documentation in DIR [PREFIX/man]
  2351. +  --srcdir=DIR            find the sources in DIR [configure dir or ..]
  2352. +  --program-prefix=PREFIX prepend PREFIX to installed program names
  2353. +  --program-suffix=SUFFIX append SUFFIX to installed program names
  2354. +  --program-transform-name=PROGRAM
  2355. +                          run sed PROGRAM on installed program names
  2356. +EOF
  2357. +    cat << EOF
  2358. +Host type:
  2359. +  --build=BUILD           configure for building on BUILD [BUILD=HOST]
  2360. +  --host=HOST             configure for HOST [guessed]
  2361. +  --target=TARGET         configure for TARGET [TARGET=HOST]
  2362. +Features and packages:
  2363. +  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  2364. +  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  2365. +  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  2366. +  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  2367. +  --x-includes=DIR        X include files are in DIR
  2368. +  --x-libraries=DIR       X library files are in DIR
  2369. +EOF
  2370. +    if test -n "$ac_help"; then
  2371. +      echo "--enable and --with options recognized:$ac_help"
  2372. +    fi
  2373. +    exit 0 ;;
  2374. +
  2375. +  -host | --host | --hos | --ho)
  2376. +    ac_prev=host ;;
  2377. +  -host=* | --host=* | --hos=* | --ho=*)
  2378. +    host="$ac_optarg" ;;
  2379. +
  2380. +  -includedir | --includedir | --includedi | --included | --include \
  2381. +  | --includ | --inclu | --incl | --inc)
  2382. +    ac_prev=includedir ;;
  2383. +  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  2384. +  | --includ=* | --inclu=* | --incl=* | --inc=*)
  2385. +    includedir="$ac_optarg" ;;
  2386. +
  2387. +  -infodir | --infodir | --infodi | --infod | --info | --inf)
  2388. +    ac_prev=infodir ;;
  2389. +  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
  2390. +    infodir="$ac_optarg" ;;
  2391. +
  2392. + -guidedir | --guidedir | --guidedi | --guided | --guide | --gui)
  2393. +   ac_prev=guidedir ;;
  2394. + -guidedir=* | --guidedir=* | --guidedi=* | --guided=* | --guide=* |--gui=*)+    guidedir="$ac_optarg" ;;
  2395. +
  2396. + -psdir | --psdir | --psdi | --psd | --ps)
  2397. +   ac_prev=psdir ;;
  2398. + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)+    psdir="$ac_optarg" ;;
  2399. +
  2400. + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
  2401. +   ac_prev=dvidir ;;
  2402. + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* |--dv=*)+    dvidir="$ac_optarg" ;;
  2403. +
  2404. +  -libdir | --libdir | --libdi | --libd)
  2405. +    ac_prev=libdir ;;
  2406. +  -libdir=* | --libdir=* | --libdi=* | --libd=*)
  2407. +    libdir="$ac_optarg" ;;
  2408. +
  2409. +  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  2410. +  | --libexe | --libex | --libe)
  2411. +    ac_prev=libexecdir ;;
  2412. +  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  2413. +  | --libexe=* | --libex=* | --libe=*)
  2414. +    libexecdir="$ac_optarg" ;;
  2415. +
  2416. +  -localstatedir | --localstatedir | --localstatedi | --localstated \
  2417. +  | --localstate | --localstat | --localsta | --localst \
  2418. +  | --locals | --local | --loca | --loc | --lo)
  2419. +    ac_prev=localstatedir ;;
  2420. +  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  2421. +  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
  2422. +  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
  2423. +    localstatedir="$ac_optarg" ;;
  2424. +
  2425. +  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
  2426. +    ac_prev=mandir ;;
  2427. +  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
  2428. +    mandir="$ac_optarg" ;;
  2429. +
  2430. +  -nfp | --nfp | --nf)
  2431. +    # Obsolete; use --without-fp.
  2432. +    with_fp=no ;;
  2433. +
  2434. +  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  2435. +  | --no-cr | --no-c)
  2436. +    no_create=yes ;;
  2437. +
  2438. +  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  2439. +  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  2440. +    no_recursion=yes ;;
  2441. +
  2442. +  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
  2443. +  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
  2444. +  | --oldin | --oldi | --old | --ol | --o)
  2445. +    ac_prev=oldincludedir ;;
  2446. +  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
  2447. +  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
  2448. +  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
  2449. +    oldincludedir="$ac_optarg" ;;
  2450. +
  2451. +  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  2452. +    ac_prev=prefix ;;
  2453. +  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  2454. +    prefix="$ac_optarg" ;;
  2455. +
  2456. +  -program-prefix | --program-prefix | --program-prefi | --program-pref \
  2457. +  | --program-pre | --program-pr | --program-p)
  2458. +    ac_prev=program_prefix ;;
  2459. +  -program-prefix=* | --program-prefix=* | --program-prefi=* \
  2460. +  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  2461. +    program_prefix="$ac_optarg" ;;
  2462. +
  2463. +  -program-suffix | --program-suffix | --program-suffi | --program-suff \
  2464. +  | --program-suf | --program-su | --program-s)
  2465. +    ac_prev=program_suffix ;;
  2466. +  -program-suffix=* | --program-suffix=* | --program-suffi=* \
  2467. +  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  2468. +    program_suffix="$ac_optarg" ;;
  2469. +
  2470. +  -program-transform-name | --program-transform-name \
  2471. +  | --program-transform-nam | --program-transform-na \
  2472. +  | --program-transform-n | --program-transform- \
  2473. +  | --program-transform | --program-transfor \
  2474. +  | --program-transfo | --program-transf \
  2475. +  | --program-trans | --program-tran \
  2476. +  | --progr-tra | --program-tr | --program-t)
  2477. +    ac_prev=program_transform_name ;;
  2478. +  -program-transform-name=* | --program-transform-name=* \
  2479. +  | --program-transform-nam=* | --program-transform-na=* \
  2480. +  | --program-transform-n=* | --program-transform-=* \
  2481. +  | --program-transform=* | --program-transfor=* \
  2482. +  | --program-transfo=* | --program-transf=* \
  2483. +  | --program-trans=* | --program-tran=* \
  2484. +  | --progr-tra=* | --program-tr=* | --program-t=*)
  2485. +    program_transform_name="$ac_optarg" ;;
  2486. +
  2487. +  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  2488. +  | -silent | --silent | --silen | --sile | --sil)
  2489. +    silent=yes ;;
  2490. +
  2491. +  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
  2492. +    ac_prev=sbindir ;;
  2493. +  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  2494. +  | --sbi=* | --sb=*)
  2495. +    sbindir="$ac_optarg" ;;
  2496. +
  2497. +  -sharedstatedir | --sharedstatedir | --sharedstatedi \
  2498. +  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
  2499. +  | --sharedst | --shareds | --shared | --share | --shar \
  2500. +  | --sha | --sh)
  2501. +    ac_prev=sharedstatedir ;;
  2502. +  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
  2503. +  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
  2504. +  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
  2505. +  | --sha=* | --sh=*)
  2506. +    sharedstatedir="$ac_optarg" ;;
  2507. +
  2508. +  -site | --site | --sit)
  2509. +    ac_prev=site ;;
  2510. +  -site=* | --site=* | --sit=*)
  2511. +    site="$ac_optarg" ;;
  2512. +
  2513. +  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  2514. +    ac_prev=srcdir ;;
  2515. +  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  2516. +    srcdir="$ac_optarg" ;;
  2517. +
  2518. +  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
  2519. +  | --syscon | --sysco | --sysc | --sys | --sy)
  2520. +    ac_prev=sysconfdir ;;
  2521. +  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
  2522. +  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
  2523. +    sysconfdir="$ac_optarg" ;;
  2524. +
  2525. +  -target | --target | --targe | --targ | --tar | --ta | --t)
  2526. +    ac_prev=target ;;
  2527. +  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  2528. +    target="$ac_optarg" ;;
  2529. +
  2530. +  -v | -verbose | --verbose | --verbos | --verbo | --verb)
  2531. +    verbose=yes ;;
  2532. +
  2533. +  -version | --version | --versio | --versi | --vers)
  2534. +    echo "configure generated by autoconf version 2.10"
  2535. +    exit 0 ;;
  2536. +
  2537. +  -with-* | --with-*)
  2538. +    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  2539. +    # Reject names that are not valid shell variable names.
  2540. +    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  2541. +      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  2542. +    fi
  2543. +    ac_package=`echo $ac_package| sed 's/-/_/g'`
  2544. +    case "$ac_option" in
  2545. +      *=*) ;;
  2546. +      *) ac_optarg=yes ;;
  2547. +    esac
  2548. +    eval "with_${ac_package}='$ac_optarg'" ;;
  2549. +
  2550. +  -without-* | --without-*)
  2551. +    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  2552. +    # Reject names that are not valid shell variable names.
  2553. +    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  2554. +      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  2555. +    fi
  2556. +    ac_package=`echo $ac_package| sed 's/-/_/g'`
  2557. +    eval "with_${ac_package}=no" ;;
  2558. +
  2559. +  --x)
  2560. +    # Obsolete; use --with-x.
  2561. +    with_x=yes ;;
  2562. +
  2563. +  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  2564. +  | --x-incl | --x-inc | --x-in | --x-i)
  2565. +    ac_prev=x_includes ;;
  2566. +  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  2567. +  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  2568. +    x_includes="$ac_optarg" ;;
  2569. +
  2570. +  -x-libraries | --x-libraries | --x-librarie | --x-librari \
  2571. +  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  2572. +    ac_prev=x_libraries ;;
  2573. +  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  2574. +  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  2575. +    x_libraries="$ac_optarg" ;;
  2576. +
  2577. +  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
  2578. +    ;;
  2579. +
  2580. +  *)
  2581. +    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  2582. +      echo "configure: warning: $ac_option: invalid host type" 1>&2
  2583. +    fi
  2584. +    if test "x$nonopt" != xNONE; then
  2585. +      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
  2586. +    fi
  2587. +    nonopt="$ac_option"
  2588. +    ;;
  2589. +
  2590. +  esac
  2591. +done
  2592. +
  2593. +if test -n "$ac_prev"; then
  2594. +  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
  2595. +fi
  2596. +
  2597. +trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  2598. +
  2599. +# File descriptor usage:
  2600. +# 0 standard input
  2601. +# 1 file creation
  2602. +# 2 errors and warnings
  2603. +# 3 some systems may open it to /dev/tty
  2604. +# 4 used on the Kubota Titan
  2605. +# 6 checking for... messages and results
  2606. +# 5 compiler messages saved in config.log
  2607. +if test "$silent" = yes; then
  2608. +  exec 6>/dev/null
  2609. +else
  2610. +  exec 6>&1
  2611. +fi
  2612. +exec 5>./config.log
  2613. +
  2614. +echo "\
  2615. +This file contains any messages produced by compilers while
  2616. +running configure, to aid debugging if configure makes a mistake.
  2617. +" 1>&5
  2618. +
  2619. +# Strip out --no-create and --no-recursion so they do not pile up.
  2620. +# Also quote any args containing shell metacharacters.
  2621. +ac_configure_args=
  2622. +for ac_arg
  2623. +do
  2624. +  case "$ac_arg" in
  2625. +  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  2626. +  | --no-cr | --no-c) ;;
  2627. +  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  2628. +  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  2629. +  *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  2630. +  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  2631. +  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  2632. +  esac
  2633. +done
  2634. +
  2635. +# NLS nuisances.
  2636. +# Only set LANG and LC_ALL to C if already set.
  2637. +# These must not be set unconditionally because not all systems understand
  2638. +# e.g. LANG=C (notably SCO).
  2639. +if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  2640. +if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
  2641. +
  2642. +# confdefs.h avoids OS command line length limits that DEFS can exceed.
  2643. +rm -rf conftest* confdefs.h
  2644. +# AIX cpp loses on an empty file, so make sure it contains at least a newline.
  2645. +echo > confdefs.h
  2646. +
  2647. +# A filename unique to this package, relative to the directory that
  2648. +# configure is in, which we can look for to find out if srcdir is correct.
  2649. +ac_unique_file=malloc.h
  2650. +
  2651. +# Find the source files, if location was not specified.
  2652. +if test -z "$srcdir"; then
  2653. +  ac_srcdir_defaulted=yes
  2654. +  # Try the directory containing this script, then its parent.
  2655. +  ac_prog=$0
  2656. +  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  2657. +  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  2658. +  srcdir=$ac_confdir
  2659. +  if test ! -r $srcdir/$ac_unique_file; then
  2660. +    srcdir=..
  2661. +  fi
  2662. +else
  2663. +  ac_srcdir_defaulted=no
  2664. +fi
  2665. +if test ! -r $srcdir/$ac_unique_file; then
  2666. +  if test "$ac_srcdir_defaulted" = yes; then
  2667. +    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  2668. +  else
  2669. +    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  2670. +  fi
  2671. +fi
  2672. +srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
  2673. +
  2674. +# Prefer explicitly selected file to automatically selected ones.
  2675. +if test -z "$CONFIG_SITE"; then
  2676. +  if test "x$prefix" != xNONE; then
  2677. +    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  2678. +  else
  2679. +    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  2680. +  fi
  2681. +fi
  2682. +for ac_site_file in $CONFIG_SITE; do
  2683. +  if test -r "$ac_site_file"; then
  2684. +    echo "loading site script $ac_site_file"
  2685. +    . "$ac_site_file"
  2686. +  fi
  2687. +done
  2688. +
  2689. +if test -r "$cache_file"; then
  2690. +  echo "loading cache $cache_file"
  2691. +  . $cache_file
  2692. +else
  2693. +  echo "creating cache $cache_file"
  2694. +  > $cache_file
  2695. +fi
  2696. +
  2697. +ac_ext=c
  2698. +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  2699. +ac_cpp='$CPP $CPPFLAGS'
  2700. +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  2701. +ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  2702. +
  2703. +if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  2704. +  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  2705. +  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  2706. +    ac_n= ac_c='
  2707. +' ac_t='    '
  2708. +  else
  2709. +    ac_n=-n ac_c= ac_t=
  2710. +  fi
  2711. +else
  2712. +  ac_n= ac_c='\c' ac_t=
  2713. +fi
  2714. +
  2715. +
  2716. +
  2717. +# Extract the first word of "gcc", so it can be a program name with args.
  2718. +set dummy gcc; ac_word=$2
  2719. +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2720. +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  2721. +  echo $ac_n "(cached) $ac_c" 1>&6
  2722. +else
  2723. +  if test -n "$CC"; then
  2724. +  ac_cv_prog_CC="$CC" # Let the user override the test.
  2725. +else
  2726. +  IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  2727. +  for ac_dir in $PATH; do
  2728. +    test -z "$ac_dir" && ac_dir=.
  2729. +    if test -f $ac_dir/$ac_word; then
  2730. +      ac_cv_prog_CC="gcc"
  2731. +      break
  2732. +    fi
  2733. +  done
  2734. +  IFS="$ac_save_ifs"
  2735. +fi
  2736. +fi
  2737. +CC="$ac_cv_prog_CC"
  2738. +if test -n "$CC"; then
  2739. +  echo "$ac_t""$CC" 1>&6
  2740. +else
  2741. +  echo "$ac_t""no" 1>&6
  2742. +fi
  2743. +
  2744. +if test -z "$CC"; then
  2745. +  # Extract the first word of "cc", so it can be a program name with args.
  2746. +set dummy cc; ac_word=$2
  2747. +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2748. +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  2749. +  echo $ac_n "(cached) $ac_c" 1>&6
  2750. +else
  2751. +  if test -n "$CC"; then
  2752. +  ac_cv_prog_CC="$CC" # Let the user override the test.
  2753. +else
  2754. +  IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  2755. +  ac_prog_rejected=no
  2756. +  for ac_dir in $PATH; do
  2757. +    test -z "$ac_dir" && ac_dir=.
  2758. +    if test -f $ac_dir/$ac_word; then
  2759. +      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
  2760. +        ac_prog_rejected=yes
  2761. +    continue
  2762. +      fi
  2763. +      ac_cv_prog_CC="cc"
  2764. +      break
  2765. +    fi
  2766. +  done
  2767. +  IFS="$ac_save_ifs"
  2768. +if test $ac_prog_rejected = yes; then
  2769. +  # We found a bogon in the path, so make sure we never use it.
  2770. +  set dummy $ac_cv_prog_CC
  2771. +  shift
  2772. +  if test $# -gt 0; then
  2773. +    # We chose a different compiler from the bogus one.
  2774. +    # However, it has the same basename, so the bogon will be chosen
  2775. +    # first if we set CC to just the basename; use the full file name.
  2776. +    shift
  2777. +    set dummy "$ac_dir/$ac_word" "$@"
  2778. +    shift
  2779. +    ac_cv_prog_CC="$@"
  2780. +  fi
  2781. +fi
  2782. +fi
  2783. +fi
  2784. +CC="$ac_cv_prog_CC"
  2785. +if test -n "$CC"; then
  2786. +  echo "$ac_t""$CC" 1>&6
  2787. +else
  2788. +  echo "$ac_t""no" 1>&6
  2789. +fi
  2790. +
  2791. +  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
  2792. +fi
  2793. +
  2794. +echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
  2795. +if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
  2796. +  echo $ac_n "(cached) $ac_c" 1>&6
  2797. +else
  2798. +  cat > conftest.c <<EOF
  2799. +#ifdef __GNUC__
  2800. +  yes;
  2801. +#endif
  2802. +EOF
  2803. +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:621: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  2804. +  ac_cv_prog_gcc=yes
  2805. +else
  2806. +  ac_cv_prog_gcc=no
  2807. +fi
  2808. +fi
  2809. +
  2810. +echo "$ac_t""$ac_cv_prog_gcc" 1>&6
  2811. +if test $ac_cv_prog_gcc = yes; then
  2812. +  GCC=yes
  2813. +  if test "${CFLAGS+set}" != set; then
  2814. +    echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
  2815. +if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
  2816. +  echo $ac_n "(cached) $ac_c" 1>&6
  2817. +else
  2818. +  echo 'void f(){}' > conftest.c
  2819. +if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  2820. +  ac_cv_prog_gcc_g=yes
  2821. +else
  2822. +  ac_cv_prog_gcc_g=no
  2823. +fi
  2824. +rm -f conftest*
  2825. +
  2826. +fi
  2827. +
  2828. +echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
  2829. +    if test $ac_cv_prog_gcc_g = yes; then
  2830. +      CFLAGS="-g -O2"
  2831. +    else
  2832. +      CFLAGS="-O2"
  2833. +    fi
  2834. +  fi
  2835. +else
  2836. +  GCC=
  2837. +  test "${CFLAGS+set}" = set || CFLAGS="-g"
  2838. +fi
  2839. +
  2840. +echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
  2841. +# On Suns, sometimes $CPP names a directory.
  2842. +if test -n "$CPP" && test -d "$CPP"; then
  2843. +  CPP=
  2844. +fi
  2845. +if test -z "$CPP"; then
  2846. +if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
  2847. +  echo $ac_n "(cached) $ac_c" 1>&6
  2848. +else
  2849. +    # This must be in double quotes, not single quotes, because CPP may get
  2850. +  # substituted into the Makefile and "${CC-cc}" will confuse make.
  2851. +  CPP="${CC-cc} -E"
  2852. +  # On the NeXT, cc -E runs the code through the compiler's parser,
  2853. +  # not just through cpp.
  2854. +  cat > conftest.$ac_ext <<EOF
  2855. +#line 673 "configure"
  2856. +#include "confdefs.h"
  2857. +#include <assert.h>
  2858. +Syntax Error
  2859. +EOF
  2860. +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2861. +{ (eval echo configure:679: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2862. +ac_err=`grep -v '^ *+' conftest.out`
  2863. +if test -z "$ac_err"; then
  2864. +  :
  2865. +else
  2866. +  echo "$ac_err" >&5
  2867. +  rm -rf conftest*
  2868. +  CPP="${CC-cc} -E -traditional-cpp"
  2869. +  cat > conftest.$ac_ext <<EOF
  2870. +#line 688 "configure"
  2871. +#include "confdefs.h"
  2872. +#include <assert.h>
  2873. +Syntax Error
  2874. +EOF
  2875. +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2876. +{ (eval echo configure:694: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2877. +ac_err=`grep -v '^ *+' conftest.out`
  2878. +if test -z "$ac_err"; then
  2879. +  :
  2880. +else
  2881. +  echo "$ac_err" >&5
  2882. +  rm -rf conftest*
  2883. +  CPP=/lib/cpp
  2884. +fi
  2885. +rm -f conftest*
  2886. +fi
  2887. +rm -f conftest*
  2888. +  ac_cv_prog_CPP="$CPP"
  2889. +fi
  2890. +  CPP="$ac_cv_prog_CPP"
  2891. +else
  2892. +  ac_cv_prog_CPP="$CPP"
  2893. +fi
  2894. +echo "$ac_t""$CPP" 1>&6
  2895. +
  2896. +if test $ac_cv_prog_gcc = yes; then
  2897. +    echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
  2898. +if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
  2899. +  echo $ac_n "(cached) $ac_c" 1>&6
  2900. +else
  2901. +    ac_pattern="Autoconf.*'x'"
  2902. +  cat > conftest.$ac_ext <<EOF
  2903. +#line 721 "configure"
  2904. +#include "confdefs.h"
  2905. +#include <sgtty.h>
  2906. +Autoconf TIOCGETP
  2907. +EOF
  2908. +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2909. +  egrep "$ac_pattern" >/dev/null 2>&1; then
  2910. +  rm -rf conftest*
  2911. +  ac_cv_prog_gcc_traditional=yes
  2912. +else
  2913. +  rm -rf conftest*
  2914. +  ac_cv_prog_gcc_traditional=no
  2915. +fi
  2916. +rm -f conftest*
  2917. +
  2918. +
  2919. +  if test $ac_cv_prog_gcc_traditional = no; then
  2920. +    cat > conftest.$ac_ext <<EOF
  2921. +#line 739 "configure"
  2922. +#include "confdefs.h"
  2923. +#include <termio.h>
  2924. +Autoconf TCGETA
  2925. +EOF
  2926. +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2927. +  egrep "$ac_pattern" >/dev/null 2>&1; then
  2928. +  rm -rf conftest*
  2929. +  ac_cv_prog_gcc_traditional=yes
  2930. +fi
  2931. +rm -f conftest*
  2932. +
  2933. +  fi
  2934. +fi
  2935. +
  2936. +echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
  2937. +  if test $ac_cv_prog_gcc_traditional = yes; then
  2938. +    CC="$CC -traditional"
  2939. +  fi
  2940. +fi
  2941. +
  2942. +ac_aux_dir=
  2943. +for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
  2944. +  if test -f $ac_dir/install-sh; then
  2945. +    ac_aux_dir=$ac_dir
  2946. +    ac_install_sh="$ac_aux_dir/install-sh -c"
  2947. +    break
  2948. +  elif test -f $ac_dir/install.sh; then
  2949. +    ac_aux_dir=$ac_dir
  2950. +    ac_install_sh="$ac_aux_dir/install.sh -c"
  2951. +    break
  2952. +  fi
  2953. +done
  2954. +if test -z "$ac_aux_dir"; then
  2955. +  { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
  2956. +fi
  2957. +ac_config_guess=$ac_aux_dir/config.guess
  2958. +ac_config_sub=$ac_aux_dir/config.sub
  2959. +ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
  2960. +
  2961. +# Find a good install program.  We prefer a C program (faster),
  2962. +# so one script is as good as another.  But avoid the broken or
  2963. +# incompatible versions:
  2964. +# SysV /etc/install, /usr/sbin/install
  2965. +# SunOS /usr/etc/install
  2966. +# IRIX /sbin/install
  2967. +# AIX /bin/install
  2968. +# AmigaOS /c/install
  2969. +# AFS /usr/afsws/bin/install, which mishandles nonexistent args
  2970. +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  2971. +# ./install, which can be erroneously created by make from ./install.sh.
  2972. +echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
  2973. +if test -z "$INSTALL"; then
  2974. +if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
  2975. +  echo $ac_n "(cached) $ac_c" 1>&6
  2976. +else
  2977. +    IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  2978. +  for ac_dir in $PATH; do
  2979. +    # Account for people who put trailing slashes in PATH elements.
  2980. +    case "$ac_dir/" in
  2981. +    /|./|.//|/etc/*|/c/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
  2982. +    *)
  2983. +      # OSF1 and SCO ODT 3.0 have their own names for install.
  2984. +      for ac_prog in ginstall installbsd scoinst install; do
  2985. +        if test -f $ac_dir/$ac_prog; then
  2986. +      if test $ac_prog = install &&
  2987. +            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  2988. +        # AIX install.  It has an incompatible calling convention.
  2989. +        # OSF/1 installbsd also uses dspmsg, but is usable.
  2990. +        :
  2991. +      else
  2992. +        ac_cv_path_install="$ac_dir/$ac_prog -c"
  2993. +        break 2
  2994. +      fi
  2995. +    fi
  2996. +      done
  2997. +      ;;
  2998. +    esac
  2999. +  done
  3000. +  IFS="$ac_save_ifs"
  3001. +
  3002. +fi
  3003. +  if test "${ac_cv_path_install+set}" = set; then
  3004. +    INSTALL="$ac_cv_path_install"
  3005. +  else
  3006. +    # As a last resort, use the slow shell script.  We don't cache a
  3007. +    # path for INSTALL within a source directory, because that will
  3008. +    # break other packages using the cache if that directory is
  3009. +    # removed, or if the path is relative.
  3010. +    INSTALL="$ac_install_sh"
  3011. +  fi
  3012. +fi
  3013. +echo "$ac_t""$INSTALL" 1>&6
  3014. +
  3015. +# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
  3016. +# It thinks the first close brace ends the variable substitution.
  3017. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  3018. +
  3019. +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  3020. +
  3021. +# Extract the first word of "ranlib", so it can be a program name with args.
  3022. +set dummy ranlib; ac_word=$2
  3023. +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  3024. +if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
  3025. +  echo $ac_n "(cached) $ac_c" 1>&6
  3026. +else
  3027. +  if test -n "$RANLIB"; then
  3028. +  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
  3029. +else
  3030. +  IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  3031. +  for ac_dir in $PATH; do
  3032. +    test -z "$ac_dir" && ac_dir=.
  3033. +    if test -f $ac_dir/$ac_word; then
  3034. +      ac_cv_prog_RANLIB="ranlib"
  3035. +      break
  3036. +    fi
  3037. +  done
  3038. +  IFS="$ac_save_ifs"
  3039. +  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
  3040. +fi
  3041. +fi
  3042. +RANLIB="$ac_cv_prog_RANLIB"
  3043. +if test -n "$RANLIB"; then
  3044. +  echo "$ac_t""$RANLIB" 1>&6
  3045. +else
  3046. +  echo "$ac_t""no" 1>&6
  3047. +fi
  3048. +
  3049. +
  3050. +for ac_hdr in stdlib.h string.h unistd.h X11/Intrinsic.h sys/wait.h
  3051. +do
  3052. +ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
  3053. +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  3054. +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  3055. +  echo $ac_n "(cached) $ac_c" 1>&6
  3056. +else
  3057. +  cat > conftest.$ac_ext <<EOF
  3058. +#line 876 "configure"
  3059. +#include "confdefs.h"
  3060. +#include <$ac_hdr>
  3061. +EOF
  3062. +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  3063. +{ (eval echo configure:881: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  3064. +ac_err=`grep -v '^ *+' conftest.out`
  3065. +if test -z "$ac_err"; then
  3066. +  rm -rf conftest*
  3067. +  eval "ac_cv_header_$ac_safe=yes"
  3068. +else
  3069. +  echo "$ac_err" >&5
  3070. +  rm -rf conftest*
  3071. +  eval "ac_cv_header_$ac_safe=no"
  3072. +fi
  3073. +rm -f conftest*
  3074. +fi
  3075. +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  3076. +  echo "$ac_t""yes" 1>&6
  3077. +    ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
  3078. +  cat >> confdefs.h <<EOF
  3079. +#define $ac_tr_hdr 1
  3080. +EOF
  3081. +else
  3082. +  echo "$ac_t""no" 1>&6
  3083. +fi
  3084. +done
  3085. +
  3086. +
  3087. +for ac_func in sbrk
  3088. +do
  3089. +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  3090. +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  3091. +  echo $ac_n "(cached) $ac_c" 1>&6
  3092. +else
  3093. +  cat > conftest.$ac_ext <<EOF
  3094. +#line 913 "configure"
  3095. +#include "confdefs.h"
  3096. +/* System header to define __stub macros and hopefully few prototypes,
  3097. +    which can conflict with char $ac_func(); below.  */
  3098. +#include <assert.h>
  3099. +/* Override any gcc2 internal prototype to avoid an error.  */
  3100. +/* We use char because int might match the return type of a gcc2
  3101. +    builtin and then its argument prototype would still apply.  */
  3102. +char $ac_func();
  3103. +
  3104. +int main() { t(); return 0; }
  3105. +int t() {
  3106. +
  3107. +/* The GNU C library defines this for functions which it implements
  3108. +    to always fail with ENOSYS.  Some functions are actually named
  3109. +    something starting with __ and the normal name is an alias.  */
  3110. +#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  3111. +choke me
  3112. +#else
  3113. +$ac_func();
  3114. +#endif
  3115. +
  3116. +; return 0; }
  3117. +EOF
  3118. +if { (eval echo configure:937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  3119. +  rm -rf conftest*
  3120. +  eval "ac_cv_func_$ac_func=yes"
  3121. +else
  3122. +  rm -rf conftest*
  3123. +  eval "ac_cv_func_$ac_func=no"
  3124. +fi
  3125. +rm -f conftest*
  3126. +
  3127. +fi
  3128. +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  3129. +  echo "$ac_t""yes" 1>&6
  3130. +    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  3131. +  cat >> confdefs.h <<EOF
  3132. +#define $ac_tr_func 1
  3133. +EOF
  3134. +else
  3135. +  echo "$ac_t""no" 1>&6
  3136. +fi
  3137. +done
  3138. +
  3139. +
  3140. +trap '' 1 2 15
  3141. +cat > confcache <<\EOF
  3142. +# This file is a shell script that caches the results of configure
  3143. +# tests run on this system so they can be shared between configure
  3144. +# scripts and configure runs.  It is not useful on other systems.
  3145. +# If it contains results you don't want to keep, you may remove or edit it.
  3146. +#
  3147. +# By default, configure uses ./config.cache as the cache file,
  3148. +# creating it if it does not exist already.  You can give configure
  3149. +# the --cache-file=FILE option to use a different cache file; that is
  3150. +# what configure does when it calls configure scripts in
  3151. +# subdirectories, so they share the cache.
  3152. +# Giving --cache-file=/dev/null disables caching, for debugging configure.
  3153. +# config.status only pays attention to the cache file if you give it the
  3154. +# --recheck option to rerun configure.
  3155. +#
  3156. +EOF
  3157. +# Ultrix sh set writes to stderr and can't be redirected directly,
  3158. +# and sets the high bit in the cache file unless we assign to the vars.
  3159. +(set) 2>&1 |
  3160. +  sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
  3161. +  >> confcache
  3162. +if cmp -s $cache_file confcache; then
  3163. +  :
  3164. +else
  3165. +  if test -w $cache_file; then
  3166. +    echo "updating cache $cache_file"
  3167. +    cat confcache > $cache_file
  3168. +  else
  3169. +    echo "not updating unwritable cache $cache_file"
  3170. +  fi
  3171. +fi
  3172. +rm -f confcache
  3173. +
  3174. +trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  3175. +
  3176. +test "x$prefix" = xNONE && prefix=$ac_default_prefix
  3177. +# Let make expand exec_prefix.
  3178. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  3179. +
  3180. +# Any assignment to VPATH causes Sun make to only execute
  3181. +# the first set of double-colon rules, so remove it if not needed.
  3182. +# If there is a colon in the path, we need to keep it.
  3183. +if test "x$srcdir" = x.; then
  3184. +  ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  3185. +fi
  3186. +
  3187. +trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  3188. +
  3189. +# Transform confdefs.h into DEFS.
  3190. +# Protect against shell expansion while executing Makefile rules.
  3191. +# Protect against Makefile macro expansion.
  3192. +cat > conftest.defs <<\EOF
  3193. +s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
  3194. +s%[     `~#$^&*(){}\\|;'"<>?]%\\&%g
  3195. +s%\[%\\&%g
  3196. +s%\]%\\&%g
  3197. +s%\$%$$%g
  3198. +EOF
  3199. +DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
  3200. +rm -f conftest.defs
  3201. +
  3202. +
  3203. +# Without the "./", some shells look in PATH for config.status.
  3204. +: ${CONFIG_STATUS=./config.status}
  3205. +
  3206. +echo creating $CONFIG_STATUS
  3207. +# Some systems, like AmigaOS, won't allow you to remove a script that is
  3208. +# being executed, so just move it out of the way instead.
  3209. +if test -f $CONFIG_STATUS; then mv $CONFIG_STATUS $CONFIG_STATUS.old; else true; fi
  3210. +cat > $CONFIG_STATUS <<EOF
  3211. +#! /bin/sh
  3212. +# Generated automatically by configure.
  3213. +# Run this file to recreate the current configuration.
  3214. +# This directory was configured as follows,
  3215. +# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  3216. +#
  3217. +# $0 $ac_configure_args
  3218. +#
  3219. +# Compiler output produced by configure, useful for debugging
  3220. +# configure, is in ./config.log if it exists.
  3221. +
  3222. +ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  3223. +for ac_option
  3224. +do
  3225. +  case "\$ac_option" in
  3226. +  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  3227. +    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  3228. +    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  3229. +  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  3230. +    echo "$CONFIG_STATUS generated by autoconf version 2.10"
  3231. +    exit 0 ;;
  3232. +  -help | --help | --hel | --he | --h)
  3233. +    echo "\$ac_cs_usage"; exit 0 ;;
  3234. +  *) echo "\$ac_cs_usage"; exit 1 ;;
  3235. +  esac
  3236. +done
  3237. +
  3238. +ac_given_srcdir=$srcdir
  3239. +ac_given_INSTALL="$INSTALL"
  3240. +
  3241. +trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
  3242. +EOF
  3243. +cat >> $CONFIG_STATUS <<EOF
  3244. +
  3245. +# Protect against being on the right side of a sed subst in config.status.
  3246. +sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
  3247. + s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
  3248. +$ac_vpsub
  3249. +$extrasub
  3250. +s%@CFLAGS@%$CFLAGS%g
  3251. +s%@CPPFLAGS@%$CPPFLAGS%g
  3252. +s%@CXXFLAGS@%$CXXFLAGS%g
  3253. +s%@DEFS@%$DEFS%g
  3254. +s%@LDFLAGS@%$LDFLAGS%g
  3255. +s%@LIBS@%$LIBS%g
  3256. +s%@exec_prefix@%$exec_prefix%g
  3257. +s%@prefix@%$prefix%g
  3258. +s%@program_transform_name@%$program_transform_name%g
  3259. +s%@bindir@%$bindir%g
  3260. +s%@sbindir@%$sbindir%g
  3261. +s%@libexecdir@%$libexecdir%g
  3262. +s%@datadir@%$datadir%g
  3263. +s%@sysconfdir@%$sysconfdir%g
  3264. +s%@sharedstatedir@%$sharedstatedir%g
  3265. +s%@localstatedir@%$localstatedir%g
  3266. +s%@libdir@%$libdir%g
  3267. +s%@includedir@%$includedir%g
  3268. +s%@oldincludedir@%$oldincludedir%g
  3269. +s%@infodir@%$infodir%g
  3270. +s%@guidedir@%$guidedir%g
  3271. +s%@psdir@%$psdir%g
  3272. +s%@dvidir@%$dvidir%g
  3273. +s%@mandir@%$mandir%g
  3274. +s%@CC@%$CC%g
  3275. +s%@CPP@%$CPP%g
  3276. +s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  3277. +s%@INSTALL_DATA@%$INSTALL_DATA%g
  3278. +s%@RANLIB@%$RANLIB%g
  3279. +
  3280. +CEOF
  3281. +EOF
  3282. +cat >> $CONFIG_STATUS <<EOF
  3283. +
  3284. +CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
  3285. +EOF
  3286. +cat >> $CONFIG_STATUS <<\EOF
  3287. +for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  3288. +  # Support "outfile[:infile]", defaulting infile="outfile.in".
  3289. +  case "$ac_file" in
  3290. +  *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
  3291. +       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  3292. +  *) ac_file_in="${ac_file}.in" ;;
  3293. +  esac
  3294. +
  3295. +  # Adjust relative srcdir, etc. for subdirectories.
  3296. +
  3297. +  # Remove last slash and all that follows it.  Not all systems have dirname.
  3298. +  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  3299. +  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  3300. +    # The file is in a subdirectory.
  3301. +    test ! -d "$ac_dir" && mkdir "$ac_dir"
  3302. +    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
  3303. +    # A "../" for each directory in $ac_dir_suffix.
  3304. +    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  3305. +  else
  3306. +    ac_dir_suffix= ac_dots=
  3307. +  fi
  3308. +
  3309. +  case "$ac_given_srcdir" in
  3310. +  .)  srcdir=.
  3311. +      if test -z "$ac_dots"; then top_srcdir=.
  3312. +      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  3313. +  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  3314. +  *) # Relative path.
  3315. +    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  3316. +    top_srcdir="$ac_dots$ac_given_srcdir" ;;
  3317. +  esac
  3318. +
  3319. +  case "$ac_given_INSTALL" in
  3320. +  [/$]*) INSTALL="$ac_given_INSTALL" ;;
  3321. +  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  3322. +  esac
  3323. +  echo creating "$ac_file"
  3324. +  rm -f "$ac_file"
  3325. +  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  3326. +  case "$ac_file" in
  3327. +  *Makefile*) ac_comsub="1i\\
  3328. +# $configure_input" ;;
  3329. +  *) ac_comsub= ;;
  3330. +  esac
  3331. +  sed -e "$ac_comsub
  3332. +s%@configure_input@%$configure_input%g
  3333. +s%@srcdir@%$srcdir%g
  3334. +s%@top_srcdir@%$top_srcdir%g
  3335. +s%@INSTALL@%$INSTALL%g
  3336. +" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
  3337. +fi; done
  3338. +rm -f conftest.subs
  3339. +
  3340. +
  3341. +
  3342. +exit 0
  3343. +EOF
  3344. +chmod +x $CONFIG_STATUS
  3345. +rm -f CONFIG.STATUS.old
  3346. +rm -fr confdefs* $ac_clean_files
  3347. +test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
  3348. +
  3349. diff -rup --new-file baseline/contrib/dbmalloc/configure.in amiga/contrib/dbmalloc/configure.in
  3350. --- baseline/contrib/dbmalloc/configure.in    Wed Dec 31 17:00:00 1969
  3351. +++ amiga/contrib/dbmalloc/configure.in    Sat Sep 28 00:00:00 1996
  3352. @@ -0,0 +1,13 @@
  3353. +dnl Process this file with autoconf to produce a configure script.
  3354. +AC_INIT(malloc.h)
  3355. +
  3356. +AC_PROG_CC
  3357. +AC_GCC_TRADITIONAL
  3358. +AC_PROG_INSTALL
  3359. +AC_PROG_RANLIB
  3360. +
  3361. +AC_HAVE_HEADERS(stdlib.h string.h unistd.h X11/Intrinsic.h sys/wait.h)
  3362. +
  3363. +AC_CHECK_FUNCS(sbrk)
  3364. +
  3365. +AC_OUTPUT(Makefile)
  3366. diff -rup --new-file baseline/contrib/dbmalloc/dump.c amiga/contrib/dbmalloc/dump.c
  3367. --- baseline/contrib/dbmalloc/dump.c    Sun May  1 16:28:59 1994
  3368. +++ amiga/contrib/dbmalloc/dump.c    Sat Sep 28 00:00:00 1996
  3369. @@ -281,10 +281,12 @@ malloc_list_items(fd,list_type,histid1,h
  3370.           */
  3371.          if( (ptr->file != NULL)     && (ptr->file[0] != EOS) )
  3372.          {
  3373. -
  3374. -            for(i=0; (i < FILE_LEN) && (ptr->file[i] != EOS); i++)
  3375. +            const char *filename;
  3376. +            filename = strrchr (ptr->file, '/');
  3377. +            filename = filename ? filename + 1 : ptr->file;
  3378. +            for(i=0; (i < FILE_LEN) && (filename[i] != EOS); i++)
  3379.              {
  3380. -                buffer[detail+9+i] = ptr->file[i];
  3381. +                buffer[detail+9+i] = filename[i];
  3382.              }
  3383.  
  3384.              VOIDCAST tostring(buffer+detail+30,
  3385. diff -rup --new-file baseline/contrib/dbmalloc/install.sh amiga/contrib/dbmalloc/install.sh
  3386. --- baseline/contrib/dbmalloc/install.sh    Wed Dec 31 17:00:00 1969
  3387. +++ amiga/contrib/dbmalloc/install.sh    Sat Sep 28 00:00:00 1996
  3388. @@ -0,0 +1,119 @@
  3389. +#!/bin/sh
  3390. +
  3391. +#
  3392. +# install - install a program, script, or datafile
  3393. +# This comes from X11R5; it is not part of GNU.
  3394. +#
  3395. +# $XConsortium: install.sh,v 1.2 89/12/18 14:47:22 jim Exp $
  3396. +#
  3397. +# This script is compatible with the BSD install script, but was written
  3398. +# from scratch.
  3399. +#
  3400. +
  3401. +
  3402. +# set DOITPROG to echo to test this script
  3403. +
  3404. +# Don't use :- since 4.3BSD and earlier shells don't like it.
  3405. +doit="${DOITPROG-}"
  3406. +
  3407. +
  3408. +# put in absolute paths if you don't have them in your path; or use env. vars.
  3409. +
  3410. +mvprog="${MVPROG-mv}"
  3411. +cpprog="${CPPROG-cp}"
  3412. +chmodprog="${CHMODPROG-chmod}"
  3413. +chownprog="${CHOWNPROG-chown}"
  3414. +chgrpprog="${CHGRPPROG-chgrp}"
  3415. +stripprog="${STRIPPROG-strip}"
  3416. +rmprog="${RMPROG-rm}"
  3417. +
  3418. +instcmd="$mvprog"
  3419. +chmodcmd=""
  3420. +chowncmd=""
  3421. +chgrpcmd=""
  3422. +stripcmd=""
  3423. +rmcmd="$rmprog -f"
  3424. +mvcmd="$mvprog"
  3425. +src=""
  3426. +dst=""
  3427. +
  3428. +while [ x"$1" != x ]; do
  3429. +    case $1 in
  3430. +    -c) instcmd="$cpprog"
  3431. +        shift
  3432. +        continue;;
  3433. +
  3434. +    -m) chmodcmd="$chmodprog $2"
  3435. +        shift
  3436. +        shift
  3437. +        continue;;
  3438. +
  3439. +    -o) chowncmd="$chownprog $2"
  3440. +        shift
  3441. +        shift
  3442. +        continue;;
  3443. +
  3444. +    -g) chgrpcmd="$chgrpprog $2"
  3445. +        shift
  3446. +        shift
  3447. +        continue;;
  3448. +
  3449. +    -s) stripcmd="$stripprog"
  3450. +        shift
  3451. +        continue;;
  3452. +
  3453. +    *)  if [ x"$src" = x ]
  3454. +        then
  3455. +        src=$1
  3456. +        else
  3457. +        dst=$1
  3458. +        fi
  3459. +        shift
  3460. +        continue;;
  3461. +    esac
  3462. +done
  3463. +
  3464. +if [ x"$src" = x ]
  3465. +then
  3466. +    echo "install:  no input file specified"
  3467. +    exit 1
  3468. +fi
  3469. +
  3470. +if [ x"$dst" = x ]
  3471. +then
  3472. +    echo "install:  no destination specified"
  3473. +    exit 1
  3474. +fi
  3475. +
  3476. +
  3477. +# If destination is a directory, append the input filename; if your system
  3478. +# does not like double slashes in filenames, you may need to add some logic
  3479. +
  3480. +if [ -d $dst ]
  3481. +then
  3482. +    dst="$dst"/`basename $src`
  3483. +fi
  3484. +
  3485. +# Make a temp file name in the proper directory.
  3486. +
  3487. +dstdir=`dirname $dst`
  3488. +dsttmp=$dstdir/#inst.$$#
  3489. +
  3490. +# Move or copy the file name to the temp name
  3491. +
  3492. +$doit $instcmd $src $dsttmp
  3493. +
  3494. +# and set any options; do chmod last to preserve setuid bits
  3495. +
  3496. +if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; fi
  3497. +if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; fi
  3498. +if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; fi
  3499. +if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; fi
  3500. +
  3501. +# Now rename the file to the real destination.
  3502. +
  3503. +$doit $rmcmd $dst
  3504. +$doit $mvcmd $dsttmp $dst
  3505. +
  3506. +
  3507. +exit 0
  3508. diff -rup --new-file baseline/contrib/dbmalloc/malloc.c amiga/contrib/dbmalloc/malloc.c
  3509. --- baseline/contrib/dbmalloc/malloc.c    Sun May  1 16:29:03 1994
  3510. +++ amiga/contrib/dbmalloc/malloc.c    Sat Sep 28 00:00:00 1996
  3511. @@ -18,7 +18,7 @@
  3512.  
  3513.  #include "sysdefs.h"
  3514.  
  3515. -#ifdef NEED_WAIT
  3516. +#ifdef HAVE_SYS_WAIT_H
  3517.  #include <sys/wait.h>
  3518.  #endif
  3519.  
  3520. diff -rup --new-file baseline/contrib/dbmalloc/malloc.h amiga/contrib/dbmalloc/malloc.h
  3521. --- baseline/contrib/dbmalloc/malloc.h    Wed Dec 31 17:00:00 1969
  3522. +++ amiga/contrib/dbmalloc/malloc.h    Sat Sep 28 00:00:00 1996
  3523. @@ -0,0 +1,622 @@
  3524. +/*
  3525. + * (c) Copyright 1990, 1991, 1992 Conor P. Cahill (cpcahil@virtech.vti.com)
  3526. + *
  3527. + * This software may be distributed freely as long as the following conditions
  3528. + * are met:
  3529. + *         * the distribution, or any derivative thereof, may not be
  3530. + *          included as part of a commercial product
  3531. + *        * full source code is provided including this copyright
  3532. + *        * there is no charge for the software itself (there may be
  3533. + *          a minimal charge for the copying or distribution effort)
  3534. + *        * this copyright notice is not modified or removed from any
  3535. + *          source file
  3536. + */
  3537. +/*
  3538. + * $Id: malloc.h.org,v 1.38 1992/08/22 16:27:13 cpcahil Exp $
  3539. + */
  3540. +
  3541. +#ifndef _DEBUG_MALLOC_INC
  3542. +#define _DEBUG_MALLOC_INC 1
  3543. +
  3544. +#ifdef    force_cproto_to_use_defines
  3545. +
  3546. +/*
  3547. + * these are just here because cproto used the c-preprocessor to generate
  3548. + * the prototypes and if they were left as #defines the prototypes.h file
  3549. + * would have the contents of the define, not the define itself
  3550. + */
  3551. +
  3552. +typedef char        DATATYPE;
  3553. +typedef int        SIZETYPE;
  3554. +typedef void        VOIDTYPE;
  3555. +typedef char        MEMDATA;
  3556. +typedef int        MEMSIZE;
  3557. +typedef int        STRSIZE;
  3558. +typedef int        FREETYPE;
  3559. +typedef int        EXITTYPE;
  3560. +
  3561. +#if 0
  3562. +#ifdef WRTSIZE
  3563. +#undef WRTSIZE
  3564. +#endif
  3565. +typedef unsigned int    WRTSIZE;
  3566. +#endif
  3567. +
  3568. +/*
  3569. + * for now, define CONST as const.  A sed script in the makefile will change 
  3570. + * this back to CONST in the prototypes.h file.
  3571. + */
  3572. +#define CONST const
  3573. +
  3574. +#else  /* force_cproto_to_use_defines */
  3575. +
  3576. +/*
  3577. + * The following entries are automatically added by the Configure script.
  3578. + * If they are not correct for your system, then Configure is not handling
  3579. + * your system correctly.  Please report this to the author along with
  3580. + * a description of your system and the correct values
  3581. + */
  3582. +
  3583. +
  3584. +
  3585. +#if       (__GNUC__ == 2) && __STDC__
  3586. +
  3587. +#define VOIDTYPE void
  3588. +#define CONST const
  3589. +#define EXITTYPE void
  3590. +#define DATATYPE void
  3591. +#define SIZETYPE size_t
  3592. +#define FREETYPE void
  3593. +#define MEMDATA void
  3594. +#define MEMSIZE size_t
  3595. +#define MEMCMPTYPE unsigned char
  3596. +#define STRSIZE size_t
  3597. +#define STRCMPTYPE char
  3598. +
  3599. +#else  /* (__GNUC__ == 2) && __STDC__ */
  3600. +
  3601. +
  3602. +#if       (__GNUC__ == 2)
  3603. +
  3604. +#define VOIDTYPE void
  3605. +#define CONST 
  3606. +#define EXITTYPE void
  3607. +#define DATATYPE void
  3608. +#define SIZETYPE size_t
  3609. +#define FREETYPE void
  3610. +#define MEMDATA void
  3611. +#define MEMSIZE size_t
  3612. +#define MEMCMPTYPE unsigned char
  3613. +#define STRSIZE size_t
  3614. +#define STRCMPTYPE char
  3615. +
  3616. +#endif /* (__GNUC__ == 2) */
  3617. +
  3618. +
  3619. +#endif /* (__GNUC__ == 2) && __STDC__ */
  3620. +
  3621. +/*
  3622. + * END of automatic configuration stuff.
  3623. + */
  3624. +
  3625. +/*
  3626. + * if DATATYPE is not defined, then the configure script must have had a 
  3627. + * problem, or was used with a different compiler.  So we have to stop
  3628. + * here and get the user to fix the problem.
  3629. + */
  3630. +#ifndef   DATATYPE
  3631. +    /*
  3632. +     * the following string should cause a comilation error and get the
  3633. +     * user to look at this stuff to find out what is wrong.
  3634. +     */
  3635. +    "This file is not configured correctly for this system. Run configure
  3636. +     and check its results"
  3637. +    char * malloc(); /* DON'T REMOVE THIS LINE if you get a compiler error
  3638. +                here it is because the malloc.h file is not 
  3639. +                configured correctly  See the readme/problems
  3640. +                files for more info */
  3641. +
  3642. +#endif /* DATATYPE */
  3643. +
  3644. +#endif /* force_cproto_to_use_defines */
  3645. +
  3646. +#define VOIDCAST (VOIDTYPE)
  3647. +
  3648. +/*
  3649. + * since we redefine much of the stuff that is #defined in string.h and 
  3650. + * memory.h, we should do what we can to make sure that they don't get 
  3651. + * included after us.  This is typically accomplished by a special symbol
  3652. + * (similar to _DEBUG_MALLOC_INC defined above) that is #defined when the
  3653. + * file is included.  Since we don't want the file to be included we will
  3654. + * #define the symbol ourselves.  These will typically have to change from
  3655. + * one system to another.  I have put in several standard mechanisms used to
  3656. + * support this mechanism, so hopefully you won't have to modify this file.
  3657. + */
  3658. +#ifndef _H_STRING
  3659. +#define _H_STRING        1
  3660. +#endif 
  3661. +#ifndef __STRING_H
  3662. +#define __STRING_H        1
  3663. +#endif 
  3664. +#ifndef _STRING_H_
  3665. +#define _STRING_H_        1
  3666. +#endif 
  3667. +#ifndef _STRING_H 
  3668. +#define _STRING_H         1
  3669. +#endif 
  3670. +#ifndef _STRING_INCLUDED
  3671. +#define _STRING_INCLUDED    1
  3672. +#endif
  3673. +#ifndef __string_h
  3674. +#define __string_h        1
  3675. +#endif
  3676. +#ifndef _string_h
  3677. +#define _string_h        1
  3678. +#endif
  3679. +#ifndef __string_h__
  3680. +#define __string_h__        1
  3681. +#endif
  3682. +#ifndef _strings_h
  3683. +#define _strings_h        1
  3684. +#endif
  3685. +#ifndef __strings_h
  3686. +#define __strings_h        1
  3687. +#endif
  3688. +#ifndef __strings_h__
  3689. +#define __strings_h__        1
  3690. +#endif
  3691. +#ifndef _H_MEMORY
  3692. +#define _H_MEMORY        1
  3693. +#endif
  3694. +#ifndef __MEMORY_H
  3695. +#define __MEMORY_H        1
  3696. +#endif
  3697. +#ifndef _MEMORY_H_
  3698. +#define _MEMORY_H_        1
  3699. +#endif
  3700. +#ifndef _MEMORY_H
  3701. +#define _MEMORY_H        1
  3702. +#endif
  3703. +#ifndef _MEMORY_INCLUDED
  3704. +#define _MEMORY_INCLUDED    1
  3705. +#endif
  3706. +#ifndef __memory_h
  3707. +#define __memory_h        1
  3708. +#endif
  3709. +#ifndef _memory_h
  3710. +#define _memory_h        1
  3711. +#endif
  3712. +#ifndef __memory_h__
  3713. +#define __memory_h__        1
  3714. +#endif
  3715. +
  3716. +/*
  3717. + * for NCR, we need to disable their in-line expansion of the str* routines
  3718. + */
  3719. +#define ISTRING    1
  3720. +
  3721. +/*
  3722. + * Malloc warning/fatal error handler defines...
  3723. + */
  3724. +#define M_HANDLE_DUMP    0x80  /* 128 */
  3725. +#define M_HANDLE_IGNORE    0
  3726. +#define M_HANDLE_ABORT    1
  3727. +#define M_HANDLE_EXIT    2
  3728. +#define M_HANDLE_CORE    3
  3729. +    
  3730. +/*
  3731. + * Mallopt commands and defaults
  3732. + *
  3733. + * the first four settings are ignored by the debugging dbmallopt, but are
  3734. + * here to maintain compatibility with the system malloc.h.
  3735. + */
  3736. +#define M_MXFAST    1        /* ignored by mallopt        */
  3737. +#define M_NLBLKS    2        /* ignored by mallopt        */
  3738. +#define M_GRAIN        3        /* ignored by mallopt        */
  3739. +#define M_KEEP        4        /* ignored by mallopt        */
  3740. +#define MALLOC_WARN    100        /* set malloc warning handling    */
  3741. +#define MALLOC_FATAL    101        /* set malloc fatal handling    */
  3742. +#define MALLOC_ERRFILE    102        /* specify malloc error file    */
  3743. +#define MALLOC_CKCHAIN    103        /* turn on chain checking    */
  3744. +#define MALLOC_FILLAREA    104        /* turn off area filling    */
  3745. +#define MALLOC_LOWFRAG    105        /* use best fit allocation mech    */
  3746. +#define MALLOC_CKDATA    106        /* turn off/on data checking    */
  3747. +#define MALLOC_REUSE    107        /* turn off/on freed seg reuse    */
  3748. +#define MALLOC_SHOWLINKS 108        /* turn off/on adjacent link disp */
  3749. +#define MALLOC_DETAIL    109        /* turn off/on detail output    */
  3750. +#define MALLOC_FREEMARK    110        /* warn about freeing marked segs*/
  3751. +#define MALLOC_ZERO    111        /* warn about zero len allocs    */
  3752. +
  3753. +union dbmalloptarg
  3754. +{
  3755. +    int      i;
  3756. +    char    * str;
  3757. +};
  3758. +
  3759. +/*
  3760. + * disable the standard mallopt function
  3761. + */
  3762. +#define mallopt(a,b)    (0)
  3763. +
  3764. +/*
  3765. + * Malloc warning/fatal error codes
  3766. + */
  3767. +#define M_CODE_CHAIN_BROKE    1    /* malloc chain is broken    */
  3768. +#define M_CODE_NO_END        2    /* chain end != endptr        */
  3769. +#define M_CODE_BAD_PTR        3    /* pointer not in malloc area    */
  3770. +#define M_CODE_BAD_MAGIC    4    /* bad magic number in header    */
  3771. +#define M_CODE_BAD_CONNECT    5    /* chain poingers corrupt    */
  3772. +#define M_CODE_OVERRUN        6    /* data overrun in malloc seg    */
  3773. +#define M_CODE_REUSE        7    /* reuse of freed area        */
  3774. +#define M_CODE_NOT_INUSE    8    /* pointer is not in use    */
  3775. +#define M_CODE_NOMORE_MEM    9    /* no more memory available    */
  3776. +#define M_CODE_OUTOF_BOUNDS    10    /* gone beyound bounds         */
  3777. +#define M_CODE_FREELIST_BAD    11    /* inuse segment on freelist    */
  3778. +#define M_CODE_NOBOUND        12    /* can't calculate boundry    */
  3779. +#define M_CODE_STK_NOCUR    13    /* no current element on stack    */
  3780. +#define M_CODE_STK_BADFUNC    14    /* current func doesn't match    */
  3781. +#define M_CODE_UNDERRUN        15    /* data underrun in malloc seg    */
  3782. +#define M_CODE_FREEMARK        16    /* free of marked segment    */
  3783. +#define M_CODE_ZERO_ALLOC    17    /* zero length allocation    */
  3784. +
  3785. +#ifndef __STDCARGS
  3786. +#if  __STDC__ || __cplusplus
  3787. +#define __STDCARGS(a) a
  3788. +#else
  3789. +#define __STDCARGS(a) ()
  3790. +#endif
  3791. +#endif
  3792. +
  3793. +#if __cplusplus
  3794. +extern "C" {
  3795. +#endif
  3796. +
  3797. +VOIDTYPE      malloc_dump __STDCARGS((int));
  3798. +VOIDTYPE      malloc_list __STDCARGS((int,unsigned long, unsigned long));
  3799. +int          dbmallopt __STDCARGS((int, union dbmalloptarg *));
  3800. +DATATYPE    * debug_calloc __STDCARGS((CONST char *,int,SIZETYPE,SIZETYPE));
  3801. +FREETYPE      debug_cfree __STDCARGS((CONST char *, int, DATATYPE *));
  3802. +FREETYPE      debug_free __STDCARGS((CONST char *, int, DATATYPE *));
  3803. +DATATYPE    * debug_malloc __STDCARGS((CONST char *,int, SIZETYPE));
  3804. +DATATYPE    * debug_realloc __STDCARGS((CONST char *,int,
  3805. +                        DATATYPE *,SIZETYPE));
  3806. +VOIDTYPE      DBmalloc_mark __STDCARGS((CONST char *,int, DATATYPE *));
  3807. +unsigned long      DBmalloc_inuse __STDCARGS((CONST char *,int,
  3808. +                        unsigned long *));
  3809. +int          DBmalloc_chain_check __STDCARGS((CONST char *,int,int));
  3810. +SIZETYPE      DBmalloc_size __STDCARGS((CONST char *,int,CONST DATATYPE *));
  3811. +DATATYPE    * DBmemalign __STDCARGS((CONST char *, int,SIZETYPE, SIZETYPE));
  3812. +void          StackEnter __STDCARGS((CONST char *, CONST char *, int));
  3813. +void          StackLeave __STDCARGS((CONST char *, CONST char *, int));
  3814. +
  3815. +/*
  3816. + * X allocation related prototypes
  3817. + */
  3818. +char        * debug_XtMalloc __STDCARGS((CONST char *, int, unsigned int));
  3819. +char        * debug_XtRealloc __STDCARGS((CONST char *, int,
  3820. +                        char *, unsigned int));
  3821. +char        * debug_XtCalloc __STDCARGS((CONST char *, int,
  3822. +                        unsigned int, unsigned int));
  3823. +void          debug_XtFree __STDCARGS((CONST char *, int, char *));
  3824. +void        * debug_XtBCopy  __STDCARGS((CONST char *, int, char *,
  3825. +                        char *, int));
  3826. +extern void    (*XtAllocErrorHandler) __STDCARGS((CONST char *));
  3827. +
  3828. +/*
  3829. + * memory(3) related prototypes
  3830. + */
  3831. +MEMDATA      * DBmemccpy __STDCARGS((CONST char *file, int line,
  3832. +                    MEMDATA  *ptr1, CONST MEMDATA  *ptr2,
  3833. +                    int ch, MEMSIZE len));
  3834. +MEMDATA      * DBmemchr __STDCARGS((CONST char *file, int line,
  3835. +                    CONST MEMDATA  *ptr1, int ch,
  3836. +                    MEMSIZE len));
  3837. +MEMDATA     * DBmemmove __STDCARGS((CONST char *file, int line,
  3838. +                    MEMDATA  *ptr1, CONST MEMDATA  *ptr2,
  3839. +                    MEMSIZE len));
  3840. +MEMDATA     * DBmemcpy __STDCARGS((CONST char *file, int line,
  3841. +                    MEMDATA  *ptr1, CONST MEMDATA  *ptr2,
  3842. +                    MEMSIZE len));
  3843. +int          DBmemcmp __STDCARGS((CONST char *file, int line,
  3844. +                    CONST MEMDATA  *ptr1,
  3845. +                    CONST MEMDATA  *ptr2, MEMSIZE len));
  3846. +MEMDATA     * DBmemset __STDCARGS((CONST char *file, int line,
  3847. +                    MEMDATA  *ptr1, int ch, MEMSIZE len));
  3848. +MEMDATA     * DBbcopy __STDCARGS((CONST char *file, int line,
  3849. +                    CONST MEMDATA  *ptr2, MEMDATA  *ptr1,
  3850. +                    MEMSIZE len));
  3851. +MEMDATA      * DBbzero __STDCARGS((CONST char *file, int line,
  3852. +                    MEMDATA  *ptr1, MEMSIZE len));
  3853. +int          DBbcmp __STDCARGS((CONST char *file, int line,
  3854. +                    CONST MEMDATA  *ptr2,
  3855. +                    CONST MEMDATA  *ptr1, MEMSIZE len));
  3856. +
  3857. +/*
  3858. + * string(3) related prototypes
  3859. + */
  3860. +char        * DBstrcat __STDCARGS((CONST char *file,int line, char *str1,
  3861. +                    CONST char *str2));
  3862. +char        * DBstrdup __STDCARGS((CONST char *file, int line,
  3863. +                    CONST char *str1));
  3864. +char        * DBstrncat __STDCARGS((CONST char *file, int line, char *str1,
  3865. +                    CONST char *str2, STRSIZE len));
  3866. +int          DBstrcmp __STDCARGS((CONST char *file, int line,
  3867. +                    CONST char *str1, CONST char *str2));
  3868. +int          DBstrncmp __STDCARGS((CONST char *file, int line,
  3869. +                    CONST char *str1, CONST char *str2,
  3870. +                    STRSIZE len));
  3871. +int          DBstricmp __STDCARGS((CONST char *file, int line,
  3872. +                    CONST char *str1, CONST char *str2));
  3873. +int          DBstrincmp __STDCARGS((CONST char *file, int line,
  3874. +                    CONST char *str1, CONST char *str2,
  3875. +                    STRSIZE len));
  3876. +char        * DBstrcpy __STDCARGS((CONST char *file, int line, char *str1,
  3877. +                    CONST char *str2));
  3878. +char        * DBstrncpy __STDCARGS((CONST char *file, int line, char *str1,
  3879. +                    CONST char *str2, STRSIZE len));
  3880. +STRSIZE          DBstrlen __STDCARGS((CONST char *file, int line,
  3881. +                    CONST char *str1));
  3882. +char        * DBstrchr __STDCARGS((CONST char *file, int line,
  3883. +                    CONST char *str1, int c));
  3884. +char        * DBstrrchr __STDCARGS((CONST char *file, int line,
  3885. +                    CONST char *str1, int c));
  3886. +char        * DBindex __STDCARGS((CONST char *file, int line,
  3887. +                    CONST char *str1, int c));
  3888. +char        * DBrindex __STDCARGS((CONST char *file, int line,
  3889. +                    CONST char *str1, int c));
  3890. +char        * DBstrpbrk __STDCARGS((CONST char *file, int line,
  3891. +                    CONST char *str1, CONST char *str2));
  3892. +STRSIZE          DBstrspn __STDCARGS((CONST char *file, int line,
  3893. +                    CONST char *str1, CONST char *str2));
  3894. +STRSIZE          DBstrcspn __STDCARGS((CONST char *file, int line,
  3895. +                    CONST char *str1, CONST char *str2));
  3896. +char        * DBstrstr __STDCARGS((CONST char *file, int line,
  3897. +                    CONST char *str1, CONST char *str2));
  3898. +char        * DBstrtok __STDCARGS((CONST char *file, int line, char *str1,
  3899. +                    CONST char *str2));
  3900. +
  3901. +#if __cplusplus
  3902. +};
  3903. +#endif
  3904. +
  3905. +/*
  3906. + * Macro which enables logging of the file and line number for each allocation
  3907. + * so that it is easier to determine where the offending malloc comes from.
  3908. + *
  3909. + * NOTE that only code re-compiled with this include file will have this 
  3910. + * additional info.  Calls from libraries that have not been recompiled will
  3911. + * just have a null string for this info.
  3912. + */
  3913. +#ifndef IN_MALLOC_CODE
  3914. +
  3915. +/*
  3916. + * allocation functions
  3917. + */
  3918. +#define malloc(len)        debug_malloc( __FILE__,__LINE__, (len))
  3919. +#define realloc(ptr,len)    debug_realloc(__FILE__,__LINE__, (ptr), (len))
  3920. +#define calloc(numelem,size)    debug_calloc(__FILE__,__LINE__,(numelem),(size))
  3921. +#define cfree(ptr)        debug_cfree(__FILE__,__LINE__,(ptr))
  3922. +#define free(ptr)        debug_free(__FILE__,__LINE__,(ptr))
  3923. +#define malloc_chain_check(do)  DBmalloc_chain_check(__FILE__,__LINE__,(do))
  3924. +#define malloc_mark(ptr)    DBmalloc_mark(__FILE__,__LINE__,(ptr))
  3925. +#define malloc_inuse(histptr)    DBmalloc_inuse(__FILE__,__LINE__,(histptr))
  3926. +#define malloc_size(ptr)    DBmalloc_size(__FILE__,__LINE__,(ptr))
  3927. +#define memalign(align,size)    DBmemalign(__FILE__,__LINE__,(align),(size))
  3928. +
  3929. +/* 
  3930. + * X allocation routines
  3931. + */
  3932. +#define XtCalloc(_num,_size)    debug_XtCalloc(__FILE__,__LINE__,_num,_size)
  3933. +#define XtMalloc(_size)        debug_XtMalloc(__FILE__,__LINE__,_size)
  3934. +#define XtRealloc(_ptr,_size)    debug_XtRealloc(__FILE__,__LINE__,_ptr,_size)
  3935. +#define XtFree(_ptr)        debug_XtFree(__FILE__,__LINE__,_ptr)
  3936. +#define _XtBCopy(ptr1,ptr2,len) debug_XtBcopy(__FILE__,__LINE__,ptr1,ptr2,len)
  3937. +
  3938. +/*
  3939. + * Other allocation functions
  3940. + */
  3941. +#define _malloc(_size)        debug_malloc(__FILE__,__LINE__,_size)
  3942. +#define _realloc(_ptr,_size)    debug_realloc(__FILE__,__LINE__,_ptr,_size)
  3943. +#define _calloc(_num,_size)    debug_calloc(__FILE__,__LINE__,_num,_size)
  3944. +#define _free(_ptr)        debug_free(__FILE__,__LINE__,_ptr)
  3945. +
  3946. +/*
  3947. + * memory(3) related functions
  3948. + */
  3949. +#ifdef bcopy
  3950. +#undef bcopy
  3951. +#endif
  3952. +#ifdef bzero
  3953. +#undef bzero
  3954. +#endif
  3955. +#ifdef bcmp
  3956. +#undef bcmp
  3957. +#endif
  3958. +#define memccpy(ptr1,ptr2,ch,len) DBmemccpy(__FILE__,__LINE__,ptr1,ptr2,ch,len)
  3959. +#define memchr(ptr1,ch,len)      DBmemchr(__FILE__,__LINE__,ptr1,ch,len)
  3960. +#define memmove(ptr1,ptr2,len)    DBmemmove(__FILE__,__LINE__,ptr1, ptr2, len)
  3961. +#define memcpy(ptr1,ptr2,len)     DBmemcpy(__FILE__, __LINE__, ptr1, ptr2, len)
  3962. +#define memcmp(ptr1,ptr2,len)     DBmemcmp(__FILE__,__LINE__,ptr1, ptr2, len)
  3963. +#define memset(ptr1,ch,len)       DBmemset(__FILE__,__LINE__,ptr1, ch, len)
  3964. +#define bcopy(ptr2,ptr1,len)      DBbcopy(__FILE__,__LINE__,ptr2,ptr1,len)
  3965. +#define bzero(ptr1,len)           DBbzero(__FILE__,__LINE__,ptr1,len)
  3966. +#define bcmp(ptr2,ptr1,len)       DBbcmp(__FILE__, __LINE__, ptr2, ptr1, len)
  3967. +
  3968. +#define _bcopy(ptr2,ptr1,len)     DBbcopy(__FILE__,__LINE__,ptr2,ptr1,len)
  3969. +#define _bzero(ptr1,len)          DBbzero(__FILE__,__LINE__,ptr1,len)
  3970. +#define _bcmp(ptr2,ptr1,len)      DBbcmp(__FILE__,__LINE__,ptr2,ptr1,len)
  3971. +#define __dg_bcopy(ptr2,ptr1,len) DBbcopy(__FILE__,__LINE__,ptr2,ptr1,len)
  3972. +#define __dg_bzero(ptr1,len)      DBbzero(__FILE__,__LINE__,ptr1,len)
  3973. +#define __dg_bcmp(ptr2,ptr1,len)  DBbcmp(__FILE__,__LINE__,ptr2,ptr1,len)
  3974. +
  3975. +/*
  3976. + * string(3) related functions
  3977. + */
  3978. +#ifdef index
  3979. +#undef index
  3980. +#endif
  3981. +#ifdef rindex
  3982. +#undef rindex
  3983. +#endif
  3984. +#ifdef strcpy
  3985. +#undef strcpy
  3986. +#endif
  3987. +#ifdef strcpy
  3988. +#undef strcmp
  3989. +#endif
  3990. +#define index(str1,c)          DBindex(__FILE__, __LINE__, str1, c)
  3991. +#define rindex(str1,c)          DBrindex(__FILE__, __LINE__, str1, c)
  3992. +#define strcat(str1,str2)      DBstrcat(__FILE__,__LINE__,str1,str2)
  3993. +#define strchr(str1,c)          DBstrchr(__FILE__, __LINE__, str1,c)
  3994. +#define strcmp(str1,str2)      DBstrcmp(__FILE__, __LINE__, str1, str2)
  3995. +#define strcpy(str1,str2)      DBstrcpy(__FILE__, __LINE__, str1, str2)
  3996. +#define strcspn(str1,str2)      DBstrcspn(__FILE__, __LINE__, str1,str2)
  3997. +#define strdup(str1)          DBstrdup(__FILE__, __LINE__, str1)
  3998. +#define stricmp(str1,str2)      DBstricmp(__FILE__, __LINE__, str1, str2)
  3999. +#define strincmp(str1,str2,len)      DBstrincmp(__FILE__, __LINE__, str1,str2,len)
  4000. +#define strlen(str1)          DBstrlen(__FILE__, __LINE__, str1)
  4001. +#define strncat(str1,str2,len)      DBstrncat(__FILE__, __LINE__, str1,str2,len)
  4002. +#define strncpy(str1,str2,len)      DBstrncpy(__FILE__,__LINE__,str1,str2,len)
  4003. +#define strncmp(str1,str2,len)      DBstrncmp(__FILE__, __LINE__, str1,str2,len)
  4004. +#define strpbrk(str1,str2)      DBstrpbrk(__FILE__, __LINE__, str1,str2)
  4005. +#define strrchr(str1,c)          DBstrrchr(__FILE__,__LINE__,str1,c)
  4006. +#define strspn(str1,str2)      DBstrspn(__FILE__, __LINE__, str1,str2)
  4007. +#define strstr(str1,str2)      DBstrstr(__FILE__, __LINE__, str1, str2)
  4008. +#define strtok(str1,str2)      DBstrtok(__FILE__, __LINE__, str1, str2)
  4009. +
  4010. +/*
  4011. + * malloc stack related functions
  4012. + */
  4013. +#define malloc_enter(func)      StackEnter(func,__FILE__,__LINE__)
  4014. +#define malloc_leave(func)      StackLeave(func,__FILE__,__LINE__)
  4015. +
  4016. +#endif /* IN_MALLOC_CODE */
  4017. +
  4018. +#ifdef HAVE_SBRK
  4019. +#define ENDPTR (&end)        /* Pointer to first location used by sbrk() */
  4020. +#else
  4021. +extern char *_endptr;
  4022. +#define ENDPTR _endptr
  4023. +#endif
  4024. +
  4025. +#endif /* _DEBUG_MALLOC_INC */
  4026. +
  4027. +/*
  4028. + * $Log: malloc.h.org,v $
  4029. + * Revision 1.38  1992/08/22  16:27:13  cpcahil
  4030. + * final changes for pl14
  4031. + *
  4032. + * Revision 1.37  1992/08/18  11:42:00  cpcahil
  4033. + * added more #defs to preclude memory/string.h inclusion
  4034. + *
  4035. + * Revision 1.36  1992/07/12  15:30:58  cpcahil
  4036. + * Merged in Jonathan I Kamens' changes
  4037. + *
  4038. + * Revision 1.35  1992/07/03  00:03:25  cpcahil
  4039. + * more fixes for pl13, several suggestons from Rich Salz.
  4040. + *
  4041. + * Revision 1.34  1992/07/02  15:35:52  cpcahil
  4042. + * misc cleanups for PL13
  4043. + *
  4044. + * Revision 1.33  1992/07/02  13:49:54  cpcahil
  4045. + * added support for new malloc_size function and additional tests to testerr
  4046. + *
  4047. + * Revision 1.32  1992/06/30  13:06:39  cpcahil
  4048. + * added support for aligned allocations
  4049. + *
  4050. + * Revision 1.31  1992/06/22  23:40:10  cpcahil
  4051. + * many fixes for working on small int systems
  4052. + *
  4053. + * Revision 1.30  1992/05/06  04:53:29  cpcahil
  4054. + * performance enhancments
  4055. + *
  4056. + * Revision 1.29  1992/04/22  18:17:32  cpcahil
  4057. + * added support for Xt Alloc functions, linted code
  4058. + *
  4059. + * Revision 1.28  1992/04/13  19:08:18  cpcahil
  4060. + * fixed case insensitive stuff
  4061. + *
  4062. + * Revision 1.27  1992/04/13  18:41:18  cpcahil
  4063. + * added case insensitive string comparison routines
  4064. + *
  4065. + * Revision 1.26  1992/04/13  17:26:25  cpcahil
  4066. + * minor portability changes
  4067. + *
  4068. + * Revision 1.25  1992/04/13  14:13:18  cpcahil
  4069. + * cleanup of log message.
  4070. + *
  4071. + * Revision 1.24  1992/04/13  03:09:14  cpcahil
  4072. + * lots of changes.
  4073. + *
  4074. + * Revision 1.23  1992/03/01  12:42:38  cpcahil
  4075. + * added support for managing freed areas and fixed doublword bndr problems
  4076. + *
  4077. + * Revision 1.22  1992/02/07  15:51:07  cpcahil
  4078. + * mods for sun4
  4079. + *
  4080. + * Revision 1.21  1992/01/29  01:35:32  cpcahil
  4081. + * added sgi definition.
  4082. + *
  4083. + * Revision 1.20  1992/01/28  21:42:25  cpcahil
  4084. + * changes for the ibmRS6000
  4085. + *
  4086. + * Revision 1.19  1992/01/28  18:05:37  cpcahil
  4087. + * misc fixes for patch 7
  4088. + *
  4089. + * Revision 1.18  1992/01/22  16:21:35  cpcahil
  4090. + * added code to prevent inclusions of string.h and memory.h after malloc.h
  4091. + * was included.
  4092. + *
  4093. + * Revision 1.17  1992/01/10  17:26:46  cpcahil
  4094. + * fixed prototypes use of void.
  4095. + *
  4096. + * Revision 1.16  1992/01/10  16:53:39  cpcahil
  4097. + * added more info on sizetype and datatype. added support for overriding
  4098. + * use of void type.
  4099. + *
  4100. + * Revision 1.15  1992/01/09  17:19:11  cpcahil
  4101. + * put the close brace in the correct position.
  4102. + *
  4103. + * Revision 1.14  1992/01/09  17:12:36  cpcahil
  4104. + * added code to support inclusion in C++ modules
  4105. + *
  4106. + * Revision 1.13  1991/12/31  21:31:26  cpcahil
  4107. + * changes for patch 6.  See CHANGES file for more info
  4108. + *
  4109. + * Revision 1.12  1991/12/26  22:31:29  cpcahil
  4110. + * added check to make sure file is not included twice.
  4111. + *
  4112. + * Revision 1.11  1991/12/06  17:58:46  cpcahil
  4113. + * added cfree() for compatibility with some wierd systems
  4114. + *
  4115. + * Revision 1.10  91/12/06  08:54:18  cpcahil
  4116. + * cleanup of __STDC__ usage and addition of CHANGES file
  4117. + * 
  4118. + * Revision 1.9  91/12/04  09:23:40  cpcahil
  4119. + * several performance enhancements including addition of free list
  4120. + * 
  4121. + * Revision 1.8  91/12/02  19:10:11  cpcahil
  4122. + * changes for patch release 5
  4123. + * 
  4124. + * Revision 1.7  91/11/25  14:42:00  cpcahil
  4125. + * Final changes in preparation for patch 4 release
  4126. + * 
  4127. + * Revision 1.6  91/11/24  00:49:28  cpcahil
  4128. + * first cut at patch 4
  4129. + * 
  4130. + * Revision 1.5  91/11/20  11:54:10  cpcahil
  4131. + * interim checkin
  4132. + * 
  4133. + * Revision 1.4  90/08/29  22:23:38  cpcahil
  4134. + * fixed mallopt to use a union as an argument.
  4135. + * 
  4136. + * Revision 1.3  90/05/11  11:04:10  cpcahil
  4137. + * took out some extraneous lines
  4138. + * 
  4139. + * Revision 1.2  90/05/11  00:13:09  cpcahil
  4140. + * added copyright statment
  4141. + * 
  4142. + * Revision 1.1  90/02/23  07:09:03  cpcahil
  4143. + * Initial revision
  4144. + * 
  4145. + */
  4146. diff -rup --new-file baseline/contrib/dbmalloc/mallocin.h amiga/contrib/dbmalloc/mallocin.h
  4147. --- baseline/contrib/dbmalloc/mallocin.h    Sun May  1 16:29:02 1994
  4148. +++ amiga/contrib/dbmalloc/mallocin.h    Sat Sep 28 00:00:00 1996
  4149. @@ -22,10 +22,10 @@
  4150.   * and therefore, are not needed in malloc.h.
  4151.   */
  4152.  
  4153. -#if POSIX_HEADERS
  4154. +#ifdef HAVE_UNISTD_H
  4155.  #include <unistd.h>
  4156.  #endif
  4157. -#if ANSI_HEADERS
  4158. +#ifdef HAVE_STDLIB_H
  4159.  #include <stdlib.h>
  4160.  #endif
  4161.  
  4162. @@ -222,7 +222,7 @@ struct mlist
  4163.  
  4164.  EXITTYPE      exit __STDCARGS((int));
  4165.  char        * getenv __STDCARGS((CONST char *));
  4166. -DATATYPE    * sbrk __STDCARGS((int));
  4167. +char        * sbrk __STDCARGS((int));
  4168.  
  4169.  /*
  4170.   * stuff for X compatibility routines (needed here so that the prototypes 
  4171. diff -rup --new-file baseline/contrib/dbmalloc/manifests/bin amiga/contrib/dbmalloc/manifests/bin
  4172. --- baseline/contrib/dbmalloc/manifests/bin    Wed Dec 31 17:00:00 1969
  4173. +++ amiga/contrib/dbmalloc/manifests/bin    Sat Sep 28 00:00:00 1996
  4174. @@ -0,0 +1,3 @@
  4175. +include/dbmalloc/malloc.h
  4176. +lib/libdbmalloc.a
  4177. +man/man3/malloc.3
  4178. diff -rup --new-file baseline/contrib/dbmalloc/manifests/src amiga/contrib/dbmalloc/manifests/src
  4179. --- baseline/contrib/dbmalloc/manifests/src    Wed Dec 31 17:00:00 1969
  4180. +++ amiga/contrib/dbmalloc/manifests/src    Sat Sep 28 00:00:00 1996
  4181. @@ -0,0 +1,60 @@
  4182. +contrib/dbmalloc/.configure
  4183. +contrib/dbmalloc/.configure.s
  4184. +contrib/dbmalloc/Buildpatch
  4185. +contrib/dbmalloc/CHANGES
  4186. +contrib/dbmalloc/CHECKSUMS
  4187. +contrib/dbmalloc/Config.flags
  4188. +contrib/dbmalloc/FIRST-README
  4189. +contrib/dbmalloc/MANIFEST
  4190. +contrib/dbmalloc/Makefile.in
  4191. +contrib/dbmalloc/PROBLEMS
  4192. +contrib/dbmalloc/Product-Info
  4193. +contrib/dbmalloc/README
  4194. +contrib/dbmalloc/Runtests
  4195. +contrib/dbmalloc/abort.c
  4196. +contrib/dbmalloc/calloc.c
  4197. +contrib/dbmalloc/cctest.c
  4198. +contrib/dbmalloc/configure
  4199. +contrib/dbmalloc/configure.in
  4200. +contrib/dbmalloc/datamc.c
  4201. +contrib/dbmalloc/datams.c
  4202. +contrib/dbmalloc/debug.h
  4203. +contrib/dbmalloc/dgmalloc.c
  4204. +contrib/dbmalloc/dump.c
  4205. +contrib/dbmalloc/fill.c
  4206. +contrib/dbmalloc/free.c
  4207. +contrib/dbmalloc/install.sh
  4208. +contrib/dbmalloc/leak.c
  4209. +contrib/dbmalloc/m_init.c
  4210. +contrib/dbmalloc/m_perror.c
  4211. +contrib/dbmalloc/malign.c
  4212. +contrib/dbmalloc/malloc.3
  4213. +contrib/dbmalloc/malloc.c
  4214. +contrib/dbmalloc/malloc.h
  4215. +contrib/dbmalloc/malloc.h.org
  4216. +contrib/dbmalloc/malloc.man
  4217. +contrib/dbmalloc/mallocin.h
  4218. +contrib/dbmalloc/mallopt.c
  4219. +contrib/dbmalloc/manifests/bin
  4220. +contrib/dbmalloc/manifests/src
  4221. +contrib/dbmalloc/mchain.c
  4222. +contrib/dbmalloc/mcheck.c
  4223. +contrib/dbmalloc/memory.c
  4224. +contrib/dbmalloc/minipatch
  4225. +contrib/dbmalloc/patchlevel
  4226. +contrib/dbmalloc/prototypes.h
  4227. +contrib/dbmalloc/realloc.c
  4228. +contrib/dbmalloc/sbrk.c
  4229. +contrib/dbmalloc/size.c
  4230. +contrib/dbmalloc/stack.c
  4231. +contrib/dbmalloc/string.c
  4232. +contrib/dbmalloc/sysdefs.h
  4233. +contrib/dbmalloc/testerr.base
  4234. +contrib/dbmalloc/testerr.c
  4235. +contrib/dbmalloc/testmalloc.c
  4236. +contrib/dbmalloc/testmem.c
  4237. +contrib/dbmalloc/teststack.c
  4238. +contrib/dbmalloc/tostring.c
  4239. +contrib/dbmalloc/tostring.h
  4240. +contrib/dbmalloc/xheap.c
  4241. +contrib/dbmalloc/xmalloc.c
  4242. diff -rup --new-file baseline/contrib/dbmalloc/prototypes.h amiga/contrib/dbmalloc/prototypes.h
  4243. --- baseline/contrib/dbmalloc/prototypes.h    Sun May  1 16:29:07 1994
  4244. +++ amiga/contrib/dbmalloc/prototypes.h    Sat Sep 28 00:00:00 1996
  4245. @@ -29,8 +29,10 @@ DATATYPE *_realloc __stdcargs((DATATYPE 
  4246.  DATATYPE *_calloc __stdcargs((SIZETYPE nelem, SIZETYPE elsize));
  4247.  void _free __stdcargs((DATATYPE *cptr));
  4248.  int _mallopt __stdcargs((int cmd, union dbmalloptarg value));
  4249. +#if 0
  4250.  MEMDATA *_bcopy __stdcargs((CONST MEMDATA *ptr2, MEMDATA *ptr1, MEMSIZE len));
  4251.  MEMDATA *_bzero __stdcargs((MEMDATA *ptr1, MEMSIZE len));
  4252. +#endif
  4253.  int _bcmp __stdcargs((CONST MEMDATA *ptr2, CONST MEMDATA *ptr1, MEMSIZE len));
  4254.  MEMDATA *__dg_bcopy __stdcargs((CONST MEMDATA *ptr2, MEMDATA *ptr1, MEMSIZE len));
  4255.  MEMDATA *__dg_bzero __stdcargs((MEMDATA *ptr1, MEMSIZE len));
  4256. @@ -122,9 +124,13 @@ int DBFmemcmp __stdcargs((CONST char *fu
  4257.  MEMDATA *memset __stdcargs((MEMDATA *ptr1, register int ch, register MEMSIZE len));
  4258.  MEMDATA *DBmemset __stdcargs((CONST char *file, int line, MEMDATA *ptr1, register int ch, register MEMSIZE len));
  4259.  MEMDATA *DBFmemset __stdcargs((CONST char *func, CONST char *file, int line, MEMDATA *ptr1, register int ch, register MEMSIZE len));
  4260. +#if 0
  4261.  MEMDATA *bcopy __stdcargs((CONST MEMDATA *ptr2, MEMDATA *ptr1, MEMSIZE len));
  4262. +#endif
  4263.  MEMDATA *DBbcopy __stdcargs((CONST char *file, int line, CONST MEMDATA *ptr2, MEMDATA *ptr1, MEMSIZE len));
  4264. +#if 0
  4265.  MEMDATA *bzero __stdcargs((MEMDATA *ptr1, MEMSIZE len));
  4266. +#endif
  4267.  MEMDATA *DBbzero __stdcargs((CONST char *file, int line, MEMDATA *ptr1, MEMSIZE len));
  4268.  int bcmp __stdcargs((CONST MEMDATA *ptr2, CONST MEMDATA *ptr1, MEMSIZE len));
  4269.  int DBbcmp __stdcargs((CONST char *file, int line, CONST MEMDATA *ptr2, CONST MEMDATA *ptr1, MEMSIZE len));
  4270. diff -rup --new-file baseline/contrib/dbmalloc/sbrk.c amiga/contrib/dbmalloc/sbrk.c
  4271. --- baseline/contrib/dbmalloc/sbrk.c    Wed Dec 31 17:00:00 1969
  4272. +++ amiga/contrib/dbmalloc/sbrk.c    Sat Sep 28 00:00:00 1996
  4273. @@ -0,0 +1,76 @@
  4274. +/*
  4275. + *  Emulation of sbrk() that uses a fixed size preallocated buffer.
  4276. + *  The buffer consumes half of the largest available memory segment,
  4277. + *  or whatever it can get.
  4278. + */
  4279. +
  4280. +#ifndef HAVE_SBRK
  4281. +
  4282. +#include <errno.h>
  4283. +#include <exec/memory.h>
  4284. +#include <proto/exec.h>
  4285. +
  4286. +char *_endptr;            /* Start of sbrk() region */
  4287. +static int sbrksize;        /* Size of the preallocated sbrk buffer */
  4288. +static char *sbrkval;        /* Current pointer into sbrk buffer */
  4289. +
  4290. +static void sbrk_free_all (void)
  4291. +{
  4292. +  FreeMem (_endptr, sbrksize);
  4293. +}
  4294. +
  4295. +char *sbrk (int incr)
  4296. +{
  4297. +  char *sbrkrtn;
  4298. +  char *newbrkval;
  4299. +  extern int atexit (void (*func)(void));
  4300. +
  4301. +  if (_endptr == (char *) 0)
  4302. +    {
  4303. +      sbrksize = AvailMem (MEMF_LARGEST);
  4304. +      while (sbrksize > 0)    /* Should work first time... */
  4305. +    {
  4306. +      sbrksize >>= 1;
  4307. +      sbrkval = _endptr = AllocMem (sbrksize, 0);
  4308. +      if (sbrkval)
  4309. +        {
  4310. +          atexit (sbrk_free_all);
  4311. +          break;
  4312. +        }
  4313. +    }
  4314. +    }
  4315. +  sbrkrtn = sbrkval;
  4316. +  newbrkval = sbrkval + incr;
  4317. +  if ((newbrkval >= _endptr) && (newbrkval < (_endptr + sbrksize)))
  4318. +    {
  4319. +      sbrkval = newbrkval;
  4320. +    }
  4321. +  else
  4322. +    {
  4323. +      sbrkrtn = (char *) -1;
  4324. +      errno = ENOMEM;
  4325. +    }
  4326. +  return (sbrkrtn);
  4327. +}
  4328. +
  4329. +#endif    /* HAVE_SBRK */
  4330. +
  4331. +#ifdef TEST_MAIN
  4332. +
  4333. +main ()
  4334. +{
  4335. +  printf ("Begin value = 0x%x\n", sbrk (0));
  4336. +  printf ("End is at 0x%x\n", _endptr);
  4337. +  printf ("Sbrk buffer is 0x%x (%d) bytes\n", sbrksize, sbrksize);
  4338. +  printf ("sbrk (0) = 0x%x\n", sbrk (0x0));
  4339. +  printf ("sbrk (0x1000) = 0x%x\n", sbrk (0x1000));
  4340. +  printf ("sbrk (0x2000) = 0x%x\n", sbrk (0x2000));
  4341. +  printf ("sbrk (0x5000) = 0x%x\n", sbrk (0x5000));
  4342. +  printf ("sbrk (0) = 0x%x\n", sbrk (0x0));
  4343. +  printf ("sbrk (-0x5000) = 0x%x\n", sbrk (-0x5000));
  4344. +  printf ("sbrk (-0x2000) = 0x%x\n", sbrk (-0x2000));
  4345. +  printf ("sbrk (-0x1000) = 0x%x\n", sbrk (-0x1000));
  4346. +  printf ("sbrk (0) = 0x%x\n", sbrk (0x0));
  4347. +}
  4348. +
  4349. +#endif
  4350. diff -rup --new-file baseline/contrib/dbmalloc/string.c amiga/contrib/dbmalloc/string.c
  4351. --- baseline/contrib/dbmalloc/string.c    Sun May  1 16:29:08 1994
  4352. +++ amiga/contrib/dbmalloc/string.c    Sat Sep 28 00:00:00 1996
  4353. @@ -21,7 +21,7 @@
  4354.   */
  4355.  
  4356.  #include <stdio.h>
  4357. -#if ! defined(_IBMR2) && ! defined(ultrix)
  4358. +#ifdef HAVE_STRING_H
  4359.  #include <string.h>
  4360.  #endif
  4361.  
  4362. diff -rup --new-file baseline/contrib/dbmalloc/sysdefs.h amiga/contrib/dbmalloc/sysdefs.h
  4363. --- baseline/contrib/dbmalloc/sysdefs.h    Wed Dec 31 17:00:00 1969
  4364. +++ amiga/contrib/dbmalloc/sysdefs.h    Sat Sep 28 00:00:00 1996
  4365. @@ -0,0 +1,65 @@
  4366. +/*
  4367. + * This file is mechanically generated by the Configure script.
  4368. + * If there is something wrong here, modify the configure script
  4369. + * so that it is no longer generated wrong and please send email
  4370. + * to the author so that the fix is included with the next patch
  4371. + * release.
  4372. + */
  4373. +
  4374. +#ifndef _SYSDEF_H     /* double inclusion guard */
  4375. +#define _SYSDEF_H 1
  4376. +
  4377. +#if       (__GNUC__ == 2) && __STDC__
  4378. +
  4379. +/*
  4380. + * Signal to use to abort program 
  4381. + */
  4382. +#define ABORT_SIGNAL SIGABRT
  4383. +
  4384. +/*
  4385. + * Use Underscores for ASM global symbols
  4386. + */
  4387. +/* #define USE_UNDERSCORE 1 */
  4388. +
  4389. +/*
  4390. + * Use REPE instruction for ASM repeat op
  4391. + */
  4392. +/*#define USE_REPE 1*/
  4393. +
  4394. +#define WRTSIZE size_t
  4395. +
  4396. +#else  /* (__GNUC__ == 2) && __STDC__ */
  4397. +
  4398. +
  4399. +#if       (__GNUC__ == 2)
  4400. +
  4401. +/*
  4402. + * Signal to use to abort program 
  4403. + */
  4404. +#define ABORT_SIGNAL SIGABRT
  4405. +
  4406. +/*
  4407. + * Use Underscores for ASM global symbols
  4408. + */
  4409. +/* #define USE_UNDERSCORE 1 */
  4410. +
  4411. +/*
  4412. + * Use REPE instruction for ASM repeat op
  4413. + */
  4414. +/*#define USE_REPE 1*/
  4415. +
  4416. +#define WRTSIZE size_t
  4417. +
  4418. +#endif /* (__GNUC__ == 2) */
  4419. +
  4420. +
  4421. +#endif /* (__GNUC__ == 2) && __STDC__ */
  4422. +
  4423. +/*
  4424. + * don't force inclusion of XtHeap
  4425. + */
  4426. +#define DONT_FORCE_HEAPSTUFF 1
  4427. +
  4428. +
  4429. +#endif  /* _SYSDEF_H */
  4430. +
  4431. diff -rup --new-file baseline/contrib/dbmalloc/testerr.c amiga/contrib/dbmalloc/testerr.c
  4432. --- baseline/contrib/dbmalloc/testerr.c    Sun May  1 16:29:06 1994
  4433. +++ amiga/contrib/dbmalloc/testerr.c    Sat Sep 28 00:00:00 1996
  4434. @@ -13,7 +13,7 @@
  4435.   */
  4436.  #include "sysdefs.h"
  4437.  #include <stdio.h>
  4438. -#if ANSI_HEADERS
  4439. +#if HAVE_STDLIB_H
  4440.  #include <stdlib.h>
  4441.  #endif
  4442.  #include <sys/types.h>
  4443. diff -rup --new-file baseline/contrib/dbmalloc/testmalloc.c amiga/contrib/dbmalloc/testmalloc.c
  4444. --- baseline/contrib/dbmalloc/testmalloc.c    Sun May  1 16:29:09 1994
  4445. +++ amiga/contrib/dbmalloc/testmalloc.c    Sat Sep 28 00:00:00 1996
  4446. @@ -120,7 +120,7 @@ char **argv;
  4447.      for( i = 0; i < MAXOBJS; i++ )
  4448.          objs[ i ] = NULL;
  4449.  
  4450. -    startsize = sbrk(0) - &end;
  4451. +    startsize = sbrk(0) - ENDPTR;
  4452.      printf( "Memory use at start: %ld bytes\n", startsize );
  4453.      fflush(stdout);
  4454.  
  4455. @@ -223,7 +223,7 @@ char **argv;
  4456.  
  4457.      printf( "Did %ld iterations, %d objects, %d mallocs, %d reallocs\n",
  4458.          n, cnt, nm, nre );
  4459. -    printf( "Memory use at end: %ld bytes\n", sbrk(0) - &end );
  4460. +    printf( "Memory use at end: %ld bytes\n", sbrk(0) - ENDPTR );
  4461.      fflush( stdout );
  4462.  
  4463.      /* free all the objects */
  4464. @@ -242,7 +242,7 @@ char **argv;
  4465.          }
  4466.      }
  4467.  
  4468. -    endsize = sbrk(0) - &end;
  4469. +    endsize = sbrk(0) - ENDPTR;
  4470.      printf( "Memory use after free: %ld bytes\n", endsize );
  4471.      fflush( stdout );
  4472.  
  4473. diff -rup --new-file baseline/contrib/dbmalloc/teststack.c amiga/contrib/dbmalloc/teststack.c
  4474. --- baseline/contrib/dbmalloc/teststack.c    Sun May  1 16:28:57 1994
  4475. +++ amiga/contrib/dbmalloc/teststack.c    Sat Sep 28 00:00:00 1996
  4476. @@ -14,7 +14,7 @@
  4477.  
  4478.  #include "sysdefs.h"
  4479.  #include <stdio.h>
  4480. -#if ANSI_HEADERS
  4481. +#ifdef HAVE_STDLIB_H
  4482.  #include <stdlib.h>
  4483.  #endif
  4484.  #include <sys/types.h>
  4485. diff -rup --new-file baseline/contrib/dbmalloc/xheap.c amiga/contrib/dbmalloc/xheap.c
  4486. --- baseline/contrib/dbmalloc/xheap.c    Sun May  1 16:29:09 1994
  4487. +++ amiga/contrib/dbmalloc/xheap.c    Sat Sep 28 00:00:00 1996
  4488. @@ -46,7 +46,7 @@ SOFTWARE.
  4489.   * Uses Xlib memory management, which is spec'd to be re-entrant.
  4490.   */
  4491.  
  4492. -#if FOUND_X_INTRINSIC
  4493. +#ifdef HAVE_X11_INTRINSIC_H
  4494.  #include "X11/Intrinsic.h"
  4495.  #endif
  4496.  
  4497. diff -rup --new-file baseline/contrib/dbmalloc/xmalloc.c amiga/contrib/dbmalloc/xmalloc.c
  4498. --- baseline/contrib/dbmalloc/xmalloc.c    Sun May  1 16:29:09 1994
  4499. +++ amiga/contrib/dbmalloc/xmalloc.c    Sat Sep 28 00:00:00 1996
  4500. @@ -45,7 +45,7 @@ SOFTWARE.
  4501.  
  4502.  #include "sysdefs.h"
  4503.  
  4504. -#if FOUND_X_INTRINSIC
  4505. +#ifdef HAVE_X11_INTRINSIC_H
  4506.  #include "X11/Intrinsic.h"
  4507.  #endif
  4508.  
  4509.