home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / c / condor40.zip / CONDOR / src / h / machdep.h < prev    next >
C/C++ Source or Header  |  1989-08-30  |  4KB  |  125 lines

  1. /* 
  2. ** Copyright 1986, 1987, 1988, 1989 University of Wisconsin
  3. ** 
  4. ** Permission to use, copy, modify, and distribute this software and its
  5. ** documentation for any purpose and without fee is hereby granted,
  6. ** provided that the above copyright notice appear in all copies and that
  7. ** both that copyright notice and this permission notice appear in
  8. ** supporting documentation, and that the name of the University of
  9. ** Wisconsin not be used in advertising or publicity pertaining to
  10. ** distribution of the software without specific, written prior
  11. ** permission.  The University of Wisconsin makes no representations about
  12. ** the suitability of this software for any purpose.  It is provided "as
  13. ** is" without express or implied warranty.
  14. ** 
  15. ** THE UNIVERSITY OF WISCONSIN DISCLAIMS ALL WARRANTIES WITH REGARD TO
  16. ** THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
  17. ** FITNESS. IN NO EVENT SHALL THE UNIVERSITY OF WISCONSIN  BE LIABLE FOR
  18. ** ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  19. ** WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  20. ** ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  21. ** OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  22. ** 
  23. ** Authors:  Allan Bricker and Michael J. Litzkow,
  24. **              University of Wisconsin, Computer Sciences Dept.
  25. ** 
  26. */ 
  27.  
  28.  
  29. #include <machine/vmparam.h>
  30.  
  31. /*
  32. **    Machine dependent things are defined here
  33. **    These constants are derived from a.out.h.
  34. **    We assume here that the program is loaded
  35. **    with separate text and data (ZMAGIC).
  36. */
  37.  
  38. #if defined(vax)
  39. #define PAGSIZ        1024
  40. #define SEGSIZE        PAGSIZ
  41. /*
  42. **    When the stack is grown, the system allocates 4 pages more
  43. **    than actually needed.  Hopefully, this value can be found
  44. **    in an include file somewhere (when pokey comes back up).
  45. */
  46. #define STACKGROW    (ctob(4))
  47.  
  48. #define TXTOFF        PAGSIZ        /* Offset in a.out */
  49. #endif defined(vax)
  50.  
  51. #if defined(bobcat)
  52. #define PAGSIZ        NBPG
  53. #define SEGSIZE        PAGSIZ
  54. /*
  55. **    When the stack is grown, the system allocates 4 pages more
  56. **    than actually needed.  Hopefully, this value can be found
  57. **    in an include file somewhere (when pokey comes back up).
  58. */
  59. #define STACKGROW    (ctob(4))
  60.  
  61. #define TXTOFF        PAGSIZ        /* Offset in a.out */
  62. #endif defined(bobcat)
  63.  
  64. #ifdef sun
  65. #define STACKGROW    0
  66. #define TXTOFF        0
  67. #endif sun
  68.  
  69. #ifdef MIPS
  70. #define STACKGROW    0
  71. #endif MIPS
  72.  
  73. #ifdef sequent
  74. #define PAGSIZ        NBPG
  75. #define SEGSIZ        PAGSIZ
  76. #define STACKGROW    0
  77.  
  78. #define TXTOFF        0            /* Offset in a.out */
  79. #endif sequent
  80.  
  81. #if defined(ibm032)
  82. /*
  83. **    This is really only important if checkpointing has been implemented
  84. **    for the IBM032.  As of now (April 1st, 1989) it has not been.  These
  85. **    constants will have to be determined for real when/if it is implemented.
  86. */
  87.  
  88. #define PAGSIZ        1024
  89. #define SEGSIZE        PAGSIZ
  90. /*
  91. **    When the stack is grown, the system allocates 4 pages more
  92. **    than actually needed.  Hopefully, this value can be found
  93. **    in an include file somewhere (when pokey comes back up).
  94. */
  95. #define STACKGROW    0
  96.  
  97. #define TXTOFF        PAGSIZ        /* Offset in a.out */
  98. #endif defined(ibm032)
  99.  
  100. #ifndef N_TROFF
  101. #define N_TROFF(x) \
  102.     (N_TXTOFF(x) + (x).a_text + (x).a_data)
  103. #endif N_TROFF
  104.  
  105. #ifndef N_DROFF
  106. #define N_DROFF(x) \
  107.     (N_TXTOFF(x) + (x).a_text + (x).a_data + (x).a_trsize)
  108. #endif N_DROFF
  109.  
  110. #ifdef notdef
  111.  
  112. #if !defined(vax) && !defined(ntohl) && !defined(lint)
  113. #define ntohl(x)    (x)
  114. #define ntohs(x)    (x)
  115. #define htonl(x)    (x)
  116. #define htons(x)    (x)
  117. #endif !defined(vax) && !defined(ntohl) && !defined(lint)
  118.  
  119. #if !defined(ntohl) && (defined(vax) || defined(lint))
  120. u_short ntohs(), htons();
  121. u_long  ntohl(), htonl();
  122. #endif !defined(ntohl) && (defined(vax) || defined(lint))
  123.  
  124. #endif notdef
  125.