home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / sa104os2.zip / SATHR104.ZIP / SATHER / SYSTEM / GC / CONFIG.H < prev    next >
C/C++ Source or Header  |  1994-12-02  |  19KB  |  627 lines

  1. /* 
  2.  * Copyright 1988, 1989 Hans-J. Boehm, Alan J. Demers
  3.  * Copyright (c) 1991-1994 by Xerox Corporation.  All rights reserved.
  4.  *
  5.  * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
  6.  * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
  7.  *
  8.  * Permission is hereby granted to use or copy this program
  9.  * for any purpose,  provided the above notices are retained on all copies.
  10.  * Permission to modify the code and to distribute modified code is granted,
  11.  * provided the above notices are retained, and a notice that the code was
  12.  * modified is included with the above copyright notice.
  13.  */
  14. /* Boehm, November 22, 1994 11:55 am PST */
  15.  
  16. #ifndef CONFIG_H
  17.  
  18. # define CONFIG_H
  19.  
  20. /* Machine dependent parameters.  Some tuning parameters can be found    */
  21. /* near the top of gc_private.h.                    */
  22.  
  23. /* Machine specific parts contributed by various people.  See README file. */
  24.  
  25. /* Determine the machine type: */
  26. # if defined(sun) && defined(mc68000)
  27. #    define M68K
  28. #    define SUNOS4
  29. #    define mach_type_known
  30. # endif
  31. # if defined(hp9000s300)
  32. #    define M68K
  33. #    define HP
  34. #    define mach_type_known
  35. # endif
  36. # if defined(vax)
  37. #    define VAX
  38. #    ifdef ultrix
  39. #    define ULTRIX
  40. #    else
  41. #    define BSD
  42. #    endif
  43. #    define mach_type_known
  44. # endif
  45. # if defined(mips) || defined(__mips)
  46. #    define MIPS
  47. #    if defined(ultrix) || defined(__ultrix)
  48. #    define ULTRIX
  49. #    else
  50. #    ifdef _SYSTYPE_SVR4
  51. #      define IRIX5
  52. #    else
  53. #      define RISCOS  /* or IRIX 4.X */
  54. #    endif
  55. #    endif
  56. #    define mach_type_known
  57. # endif
  58. # if defined(sequent) && defined(i386)
  59. #    define I386
  60. #    define SEQUENT
  61. #    define mach_type_known
  62. # endif
  63. # if defined(sun) && defined(i386)
  64. #    define I386
  65. #    define SUNOS5
  66. #    define mach_type_known
  67. # endif
  68. # if (defined(__OS2__) || defined(__EMX__)) && defined(__32BIT__)
  69. #    define I386
  70. #    define OS2
  71. #    define mach_type_known
  72. # endif
  73. # if defined(ibm032)
  74. #   define RT
  75. #   define mach_type_known
  76. # endif
  77. # if defined(sun) && defined(sparc)
  78. #   define SPARC
  79.     /* Test for SunOS 5.x */
  80. #     include <errno.h>
  81. #     ifdef ECHRNG
  82. #       define SUNOS5
  83. #     else
  84. #    define SUNOS4
  85. #     endif
  86. #   define mach_type_known
  87. # endif
  88. # if defined(sparc) && defined(unix) && !defined(sun)
  89. #   define SPARC
  90. #   define DRSNX
  91. #   define mach_type_known
  92. # endif
  93. # if defined(_IBMR2)
  94. #   define RS6000
  95. #   define mach_type_known
  96. # endif
  97. # if defined(_M_XENIX) && defined(_M_SYSV) && defined(_M_I386)
  98.     /* The above test may need refinement    */
  99. #   define I386
  100. #   define SCO
  101. #   define mach_type_known
  102. # endif
  103. # if defined(_AUX_SOURCE)
  104. #   define M68K
  105. #   define SYSV
  106. #   define mach_type_known
  107. # endif
  108. # if defined(_PA_RISC1_0) || defined(_PA_RISC1_1)
  109. #   define HP_PA
  110. #   define mach_type_known
  111. # endif
  112. # if defined(linux) && defined(i386)
  113. #    define I386
  114. #    define LINUX
  115. #    define mach_type_known
  116. # endif
  117. # if defined(__alpha)
  118. #   define ALPHA
  119. #   define mach_type_known
  120. # endif
  121. # if defined(_AMIGA)
  122. #   define M68K
  123. #   define AMIGA
  124. #   define mach_type_known
  125. # endif
  126. # if defined(THINK_C) || defined(__MWERKS__) && !defined(__powerc)
  127. #   define M68K
  128. #   define MACOS
  129. #   define mach_type_known
  130. # endif
  131. # if defined(__MWERKS__) && defined(__powerc)
  132. #   define POWERPC
  133. #   define MACOS
  134. # endif
  135. # if defined(NeXT) && defined(mc68000)
  136. #   define M68K
  137. #   define NEXT
  138. #   define mach_type_known
  139. # endif
  140. # if defined(NeXT) && defined(i386)
  141. #   define I386
  142. #   define NEXT
  143. #   define mach_type_known
  144. # endif
  145. # if defined(__FreeBSD__) && defined(i386)
  146. #   define I386
  147. #   define FREEBSD
  148. #   define mach_type_known
  149. # endif
  150. # if defined(__NetBSD__) && defined(i386)
  151. #   define I386
  152. #   define NETBSD
  153. #   define mach_type_known
  154. # endif
  155. # if defined(bsdi) && defined(i386)
  156. #    define I386
  157. #    define BSDI
  158. #    define mach_type_known
  159. # endif
  160. # if !defined(mach_type_known) && defined(__386BSD__)
  161. #   define I386
  162. #   define THREE86BSD
  163. #   define mach_type_known
  164. # endif
  165. # if defined(_CX_UX) && defined(_M88K)
  166. #   define M88K
  167. #   define CX_UX
  168. #   define mach_type_known
  169. # endif
  170. # if defined(DGUX)
  171. #   define M88K
  172.     /* DGUX defined */
  173. #   define mach_type_known
  174. # endif
  175. # if defined(_MSDOS) && (_M_IX86 == 300) || (_M_IX86 == 400)
  176. #   define I386
  177. #   define MSWIN32    /* or Win32s */
  178. #   define mach_type_known
  179. # endif
  180.  
  181. /* Feel free to add more clauses here */
  182.  
  183. /* Or manually define the machine type here.  A machine type is     */
  184. /* characterized by the architecture.  Some                */
  185. /* machine types are further subdivided by OS.                */
  186. /* the macros ULTRIX, RISCOS, and BSD to distinguish.            */
  187. /* Note that SGI IRIX is treated identically to RISCOS.            */
  188. /* SYSV on an M68K actually means A/UX.                    */
  189. /* The distinction in these cases is usually the stack starting address */
  190. # ifndef mach_type_known
  191.     --> unknown machine type
  192. # endif
  193.             /* Mapping is: M68K       ==> Motorola 680X0    */
  194.             /*           (SUNOS4,HP,NEXT, and SYSV (A/UX),    */
  195.             /*           MACOS and AMIGA variants)        */
  196.             /*             I386       ==> Intel 386         */
  197.             /*            (SEQUENT, OS2, SCO, LINUX, NETBSD,    */
  198.             /*             FREEBSD, THREE86BSD, MSWIN32,    */
  199.             /*              BSDI, SUNOS5, NEXT    variants)    */
  200.                     /*             NS32K      ==> Encore Multimax     */
  201.                     /*             MIPS       ==> R2000 or R3000    */
  202.                     /*            (RISCOS, ULTRIX variants)    */
  203.                     /*           VAX          ==> DEC VAX        */
  204.                     /*            (BSD, ULTRIX variants)        */
  205.                     /*           RS6000     ==> IBM RS/6000 AIX3.X    */
  206.                     /*           RT          ==> IBM PC/RT        */
  207.                     /*           HP_PA      ==> HP9000/700 & /800    */
  208.                     /*                  HP/UX            */
  209.             /*           SPARC      ==> SPARC under SunOS    */
  210.             /*            (SUNOS4, SUNOS5,        */
  211.             /*             DRSNX variants)        */
  212.             /*            ALPHA      ==> DEC Alpha OSF/1    */
  213.             /*            M88K       ==> Motorola 88XX0        */
  214.             /*                 (CX_UX and DGUX)        */
  215.  
  216.  
  217. /*
  218.  * For each architecture and OS, the following need to be defined:
  219.  *
  220.  * CPP_WORD_SZ is a simple integer constant representing the word size.
  221.  * in bits.  We assume byte addressibility, where a byte has 8 bits.
  222.  * We also assume CPP_WORD_SZ is either 32 or 64.
  223.  * (We care about the length of pointers, not hardware
  224.  * bus widths.  Thus a 64 bit processor with a C compiler that uses
  225.  * 32 bit pointers should use CPP_WORD_SZ of 32, not 64. Default is 32.)
  226.  *
  227.  * MACH_TYPE is a string representation of the machine type.
  228.  * OS_TYPE is analogous for the OS.
  229.  *
  230.  * ALIGNMENT is the largest N, such that
  231.  * all pointer are guaranteed to be aligned on N byte boundaries.
  232.  * defining it to be 1 will always work, but perform poorly.
  233.  *
  234.  * DATASTART is the beginning of the data segment.
  235.  * On UNIX systems, the collector will scan the area between DATASTART
  236.  * and &end for root pointers.
  237.  *
  238.  * STACKBOTTOM is the cool end of the stack, which is usually the
  239.  * highest address in the stack.
  240.  * Under PCR or OS/2, we have other ways of finding thread stacks.
  241.  * For each machine, the following should:
  242.  * 1) define STACK_GROWS_UP if the stack grows toward higher addresses, and
  243.  * 2) define exactly one of
  244.  *    STACKBOTTOM (should be defined to be an expression)
  245.  *    HEURISTIC1
  246.  *    HEURISTIC2
  247.  * If either of the last two macros are defined, then STACKBOTTOM is computed
  248.  * during collector startup using one of the following two heuristics:
  249.  * HEURISTIC1:  Take an address inside GC_init's frame, and round it up to
  250.  *        the next multiple of STACK_GRAN.
  251.  * HEURISTIC2:  Take an address inside GC_init's frame, increment it repeatedly
  252.  *        in small steps (decrement if STACK_GROWS_UP), and read the value
  253.  *        at each location.  Remember the value when the first
  254.  *        Segmentation violation or Bus error is signalled.  Round that
  255.  *        to the nearest plausible page boundary, and use that instead
  256.  *        of STACKBOTTOM.
  257.  *
  258.  * If no expression for STACKBOTTOM can be found, and neither of the above
  259.  * heuristics are usable, the collector can still be used with all of the above
  260.  * undefined, provided one of the following is done:
  261.  * 1) GC_mark_roots can be changed to somehow mark from the correct stack(s)
  262.  *    without reference to STACKBOTTOM.  This is appropriate for use in
  263.  *    conjunction with thread packages, since there will be multiple stacks.
  264.  *    (Allocating thread stacks in the heap, and treating them as ordinary
  265.  *    heap data objects is also possible as a last resort.  However, this is
  266.  *    likely to introduce significant amounts of excess storage retention
  267.  *    unless the dead parts of the thread stacks are periodically cleared.)
  268.  * 2) Client code may set GC_stackbottom before calling any GC_ routines.
  269.  *    If the author of the client code controls the main program, this is
  270.  *    easily accomplished by introducing a new main program, setting
  271.  *    GC_stackbottom to the address of a local variable, and then calling
  272.  *    the original main program.  The new main program would read something
  273.  *    like:
  274.  *
  275.  *        # include "gc_private.h"
  276.  *
  277.  *        main(argc, argv, envp)
  278.  *        int argc;
  279.  *        char **argv, **envp;
  280.  *        {
  281.  *            int dummy;
  282.  *
  283.  *            GC_stackbottom = (ptr_t)(&dummy);
  284.  *            return(real_main(argc, argv, envp));
  285.  *        }
  286.  *
  287.  *
  288.  * Each architecture may also define the style of virtual dirty bit
  289.  * implementation to be used:
  290.  *   MPROTECT_VDB: Write protect the heap and catch faults.
  291.  *   PROC_VDB: Use the SVR4 /proc primitives to read dirty bits.
  292.  *
  293.  * An architecture may define DYNAMIC_LOADING if dynamic_load.c
  294.  * defined GC_register_dynamic_libraries() for the architecture.
  295.  */
  296.  
  297.  
  298. # define STACK_GRAN 0x1000000
  299. # ifdef M68K
  300. #   define MACH_TYPE "M68K"
  301. #   define ALIGNMENT 2
  302. #   ifdef SUNOS4
  303. #    define OS_TYPE "SUNOS4"
  304.     extern char etext;
  305. #    define DATASTART ((ptr_t)((((word) (&etext)) + 0x1ffff) & ~0x1ffff))
  306. #    define HEURISTIC1    /* differs    */
  307. #    define DYNAMIC_LOADING
  308. #   endif
  309. #   ifdef HP
  310. #    define OS_TYPE "HP"
  311.     extern char etext;
  312. #       define DATASTART ((ptr_t)((((word) (&etext)) + 0xfff) & ~0xfff))
  313. #       define STACKBOTTOM ((ptr_t) 0xffeffffc)
  314.                   /* empirically determined.  seems to work. */
  315. #   endif
  316. #   ifdef SYSV
  317. #    define OS_TYPE "SYSV"
  318.     extern etext;
  319. #       define DATASTART ((ptr_t)((((word) (&etext)) + 0x3fffff) \
  320.                    & ~0x3fffff) \
  321.                   +((word)&etext & 0x1fff))
  322.     /* This only works for shared-text binaries with magic number 0413.
  323.        The other sorts of SysV binaries put the data at the end of the text,
  324.        in which case the default of &etext would work.  Unfortunately,
  325.        handling both would require having the magic-number available.
  326.                       -- Parag
  327.        */
  328. #    define STACKBOTTOM ((ptr_t)0xFFFFFFFE)
  329.             /* The stack starts at the top of memory, but   */
  330.             /* 0x0 cannot be used as setjump_test complains */
  331.             /* that the stack direction is incorrect.  Two  */
  332.             /* bytes down from 0x0 should be safe enough.   */
  333.             /*         --Parag                */
  334. #   endif
  335. #   ifdef AMIGA
  336. #    define OS_TYPE "AMIGA"
  337.              /* STACKBOTTOM and DATASTART handled specially    */
  338.              /* in os_dep.c                    */
  339. #   endif
  340. #   ifdef MACOS
  341. #     ifndef __LOWMEM__
  342. #     include <LowMem.h>
  343. #     endif
  344. #     define OS_TYPE "MACOS"
  345.             /* see os_dep.c for details of global data segments. */
  346. #     define STACKBOTTOM ((ptr_t) LMGetCurStackBase())
  347. #   endif
  348. #   ifdef NEXT
  349. #    define OS_TYPE "NEXT"
  350. #    define DATASTART ((ptr_t) get_etext())
  351. #    define STACKBOTTOM ((ptr_t) 0x4000000)
  352. #   endif
  353. # endif
  354.  
  355. # ifdef VAX
  356. #   define MACH_TYPE "VAX"
  357. #   define ALIGNMENT 4    /* Pointers are longword aligned by 4.2 C compiler */
  358.     extern char etext;
  359. #   define DATASTART ((ptr_t)(&etext))
  360. #   ifdef BSD
  361. #    define OS_TYPE "BSD"
  362. #    define HEURISTIC1
  363.             /* HEURISTIC2 may be OK, but it's hard to test. */
  364. #   endif
  365. #   ifdef ULTRIX
  366. #    define OS_TYPE "ULTRIX"
  367. #    define STACKBOTTOM ((ptr_t) 0x7fffc800)
  368. #   endif
  369. # endif
  370.  
  371. # ifdef RT
  372. #   define MACH_TYPE "RT"
  373. #   define ALIGNMENT 4
  374. #   define DATASTART ((ptr_t) 0x10000000)
  375. #   define STACKBOTTOM ((ptr_t) 0x1fffd800)
  376. # endif
  377.  
  378. # ifdef SPARC
  379. #   define MACH_TYPE "SPARC"
  380. #   define ALIGNMENT 4    /* Required by hardware    */
  381.     extern int etext;
  382. #   ifdef SUNOS5
  383. #    define OS_TYPE "SUNOS5"
  384.     extern int etext;
  385.     extern char * GC_SysVGetDataStart();
  386. #       define DATASTART (ptr_t)GC_SysVGetDataStart(0x10000, &etext)
  387. #    define PROC_VDB
  388. #    define HEURISTIC1
  389. #   endif
  390. #   ifdef SUNOS4
  391. #    define OS_TYPE "SUNOS4"
  392.     /* [If you have a weak stomach, don't read this.]        */
  393.     /* We would like to use:                    */
  394. /* #       define DATASTART ((ptr_t)((((word) (&etext)) + 0x1fff) & ~0x1fff)) */
  395.     /* This fails occasionally, due to an ancient, but very     */
  396.     /* persistent ld bug.  &etext is set 32 bytes too high.        */
  397.     /* We instead read the text segment size from the a.out        */
  398.     /* header, which happens to be mapped into our address space    */
  399.     /* at the start of the text segment.  The detective work here    */
  400.     /* was done by Robert Ehrlich, Manuel Serrano, and Bernard    */
  401.     /* Serpette of INRIA.                        */
  402.     /* This assumes ZMAGIC, i.e. demand-loadable executables.    */
  403. #       define DATASTART ((ptr_t)(*(int *)0x2004+0x2000))
  404. #    define MPROTECT_VDB
  405. #    define HEURISTIC1
  406. #   endif
  407. #   ifdef DRSNX
  408. #       define CPP_WORDSZ 32
  409. #    define OS_TYPE "DRSNX"
  410.     extern char * GC_SysVGetDataStart();
  411.     extern int etext;
  412. #       define DATASTART (ptr_t)GC_SysVGetDataStart(0x10000, &etext)
  413. #    define MPROTECT_VDB
  414. #       define STACKBOTTOM ((ptr_t) 0xdfff0000)
  415. #   endif
  416. #   define DYNAMIC_LOADING
  417. # endif
  418.  
  419. # ifdef I386
  420. #   define MACH_TYPE "I386"
  421. #   define ALIGNMENT 4    /* Appears to hold for all "32 bit" compilers */
  422. #   ifdef SEQUENT
  423. #    define OS_TYPE "SEQUENT"
  424.     extern int etext;
  425. #       define DATASTART ((ptr_t)((((word) (&etext)) + 0xfff) & ~0xfff))
  426. #       define STACKBOTTOM ((ptr_t) 0x3ffff000) 
  427. #   endif
  428. #   ifdef SUNOS5
  429. #    define OS_TYPE "SUNOS5"
  430.       extern int etext, _start;
  431.       extern char * GC_SysVGetDataStart();
  432. #       define DATASTART GC_SysVGetDataStart(0x1000, &etext)
  433. #    define STACKBOTTOM ((ptr_t)(&_start))
  434. #    define PROC_VDB
  435. #   endif
  436. #   ifdef SCO
  437. #    define OS_TYPE "SCO"
  438.     extern int etext;
  439. #       define DATASTART ((ptr_t)((((word) (&etext)) + 0x3fffff) \
  440.                   & ~0x3fffff) \
  441.                  +((word)&etext & 0xfff))
  442. #    define STACKBOTTOM ((ptr_t) 0x7ffffffc)
  443. #   endif
  444. #   ifdef LINUX
  445. #    define OS_TYPE "LINUX"
  446.     extern int etext;
  447. #       define DATASTART ((ptr_t)((((word) (&etext)) + 0xfff) & ~0xfff))
  448. #    define STACKBOTTOM ((ptr_t)0xc0000000)
  449. #   endif
  450. #   ifdef OS2
  451. #    define OS_TYPE "OS2"
  452.              /* STACKBOTTOM and DATASTART are handled specially in     */
  453.         /* os_dep.c. OS2 actually has the right            */
  454.         /* system call!                        */
  455. #   endif
  456. #   ifdef MSWIN32
  457. #    define OS_TYPE "MSWIN32"
  458.         /* STACKBOTTOM and DATASTART are handled specially in     */
  459.         /* os_dep.c.                        */
  460. #   endif
  461. #   ifdef FREEBSD
  462. #    define OS_TYPE "FREEBSD"
  463. #    define MPROTECT_VDB
  464. #   endif
  465. #   ifdef NETBSD
  466. #    define OS_TYPE "NETBSD"
  467. #   endif
  468. #   ifdef THREE86BSD
  469. #    define OS_TYPE "THREE86BSD"
  470. #   endif
  471. #   ifdef BSDI
  472. #    define OS_TYPE "BSDI"
  473. #   endif
  474. #   if defined(FREEBSD) || defined(NETBSD) \
  475.         || defined(THREE86BSD) || defined(BSDI)
  476. #    define HEURISTIC2
  477.     extern char etext;
  478. #    define DATASTART ((ptr_t)(&etext))
  479. #   endif
  480. #   ifdef NEXT
  481. #    define OS_TYPE "NEXT"
  482. #    define DATASTART ((ptr_t) get_etext())
  483. #    define STACKBOTTOM ((ptr_t)0xc0000000)
  484. #   endif
  485. # endif
  486.  
  487. # ifdef NS32K
  488. #   define MACH_TYPE "NS32K"
  489. #   define ALIGNMENT 4
  490.     extern char **environ;
  491. #   define DATASTART ((ptr_t)(&environ))
  492.                   /* hideous kludge: environ is the first   */
  493.                   /* word in crt0.o, and delimits the start */
  494.                   /* of the data segment, no matter which   */
  495.                   /* ld options were passed through.        */
  496. #   define STACKBOTTOM ((ptr_t) 0xfffff000) /* for Encore */
  497. # endif
  498.  
  499. # ifdef MIPS
  500. #   define MACH_TYPE "MIPS"
  501. #   define ALIGNMENT 4    /* Required by hardware    */
  502. #   define DATASTART 0x10000000
  503.                   /* Could probably be slightly higher since */
  504.                   /* startup code allocates lots of junk     */
  505. #   define HEURISTIC2
  506. #   ifdef ULTRIX
  507. #    define OS_TYPE "ULTRIX"
  508. #   endif
  509. #   ifdef RISCOS
  510. #    define OS_TYPE "RISCOS"
  511. #   endif
  512. #   ifdef IRIX5
  513. #    define OS_TYPE "IRIX5"
  514. #    define MPROTECT_VDB
  515.         /* The above is dubious.  Mprotect and signals do work,    */
  516.         /* and dirty bits are implemented under IRIX5.  But,    */
  517.         /* at least under IRIX5.2, mprotect seems to be so    */
  518.         /* slow relative to the hardware that incremental    */
  519.         /* collection is likely to be rarely useful.        */
  520. #    define DYNAMIC_LOADING
  521. #   endif
  522. # endif
  523.  
  524. # ifdef RS6000
  525. #   define MACH_TYPE "RS6000"
  526. #   define ALIGNMENT 4
  527. #   define DATASTART ((ptr_t)0x20000000)
  528. #   define STACKBOTTOM ((ptr_t)0x2ff80000)
  529. # endif
  530.  
  531. # ifdef HP_PA
  532. #   define MACH_TYPE "HP_PA"
  533. #   define ALIGNMENT 4
  534.     extern int __data_start;
  535. #   define DATASTART ((ptr_t)(&__data_start))
  536. #   define HEURISTIC2
  537. #   define STACK_GROWS_UP
  538. # endif
  539.  
  540. # ifdef ALPHA
  541. #   define MACH_TYPE "ALPHA"
  542. #   define ALIGNMENT 8
  543. #   define DATASTART ((ptr_t) 0x140000000)
  544. #   define HEURISTIC2
  545.     /* Normally HEURISTIC2 is too conervative, since        */
  546.     /* the text segment immediately follows the stack.        */
  547.     /* Hence we give an upper pound.                */
  548.     extern __start;
  549. #   define HEURISTIC2_LIMIT ((ptr_t)((word)(&__start) & ~(getpagesize()-1)))
  550. #   define CPP_WORDSZ 64
  551. #   define MPROTECT_VDB
  552. # endif
  553.  
  554. # ifdef M88K
  555. #   define MACH_TYPE "M88K"
  556. #   define ALIGNMENT 4
  557. #   ifdef CX_UX
  558. #       define DATASTART ((((word)&etext + 0x3fffff) & ~0x3fffff) + 0x10000)
  559. #   endif
  560. #   ifdef  DGUX
  561.     extern char * GC_SysVGetDataStart();
  562. #       define DATASTART (ptr_t)GC_SysVGetDataStart(0x10000, &etext)
  563. #   endif
  564. #   define STACKBOTTOM ((char*)0xf0000000) /* determined empirically */
  565. # endif
  566.  
  567. # ifndef STACK_GROWS_UP
  568. #   define STACK_GROWS_DOWN
  569. # endif
  570.  
  571. # ifndef CPP_WORDSZ
  572. #   define CPP_WORDSZ 32
  573. # endif
  574.  
  575. # ifndef OS_TYPE
  576. #   define OS_TYPE ""
  577. # endif
  578.  
  579. # if defined(SUNOS5) || defined(DRSNX)
  580.     /* OS has SVR4 generic features.  Probably others also qualify.    */
  581. #   define SVR4
  582. # endif
  583.  
  584. # if defined(SUNOS5) || defined(DRSNX)
  585.     /* OS has SUNOS5 style semi-undocumented interface to dynamic     */
  586.     /* loader.                                */
  587. #   define SUNOS5DL
  588.     /* OS has SUNOS5 style signal handlers.                */
  589. #   define SUNOS5SIGS
  590. # endif
  591.  
  592. # if CPP_WORDSZ != 32 && CPP_WORDSZ != 64
  593.    -> bad word size
  594. # endif
  595.  
  596. # ifdef PCR
  597. #   undef DYNAMIC_LOADING
  598. #   undef STACKBOTTOM
  599. #   undef HEURISTIC1
  600. #   undef HEURISTIC2
  601. #   undef PROC_VDB
  602. #   undef MPROTECT_VDB
  603. #   define PCR_VDB
  604. # endif
  605.  
  606. # ifdef SRC_M3
  607. /* Postponed for now. */
  608. #   undef PROC_VDB
  609. #   undef MPROTECT_VDB
  610. # endif
  611.  
  612. # ifdef SMALL_CONFIG
  613. /* Presumably not worth the space it takes. */
  614. #   undef PROC_VDB
  615. #   undef MPROTECT_VDB
  616. # endif
  617.  
  618. # if !defined(PCR_VDB) && !defined(PROC_VDB) && !defined(MPROTECT_VDB)
  619. #   define DEFAULT_VDB
  620. # endif
  621.  
  622. # if defined(SPARC)
  623. #   define SAVE_CALL_CHAIN
  624. # endif
  625.  
  626. # endif
  627.