home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 9 / FreshFishVol9-CD2.bin / bbs / gnu / dbmalloc-1.14-diffs.lha / GNU / diffs / dbmalloc-1.14.diffs
Encoding:
Text File  |  1995-04-14  |  121.9 KB  |  4,335 lines

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