home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / Tools / archie-1.4.1 / pmachine.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-06-18  |  3.0 KB  |  160 lines

  1. /*
  2.  * This is where we drop in the various dependencies for different systems.
  3.  * Someday this might be remotely complete.
  4.  *
  5.  * I kept the name pmachine.h because it was already in all of the files...this
  6.  * barely resembles the pmachine.h that comes with the real Prospero, though.
  7.  *
  8.  * $Revision: 1.12 $
  9.  */
  10.  
  11. #ifdef u3b2
  12. # define USG
  13. # define NOREGEX
  14. # define MAXPATHLEN 1024       /* There's no maxpathlen in any 3b2 .h file.  */
  15. #endif
  16.  
  17. #ifdef m88k
  18. #define MAXPATHLEN 1024
  19. #endif
  20.  
  21. #ifdef hpux
  22. # ifndef bcopy
  23. #  define FUNCS            /* HP/UX 8.0 has the fns.  */
  24. # endif
  25. # define NOREGEX
  26. # define NEED_STRING_H
  27. #endif
  28.  
  29. /* These are required for a Sequent running Dynix/PTX, their SysV variant.
  30.    Archie builds fine untouched on a system running their BSD-based OS.  */
  31. #ifdef _SEQUENT_
  32. # define NOREGEX
  33. # define USG
  34. #endif
  35.  
  36. #if defined(USG) || defined(SYSV)
  37. # define FUNCS
  38. #endif
  39.  
  40. #ifdef SOLARIS2
  41. #define FUNCS
  42. #define NOREGEX
  43. #define NEED_STRING_H
  44. #endif
  45.  
  46. #ifdef ISC
  47. # define FUNCS
  48. # define STRSPN
  49. # define NOREGEX
  50. #endif
  51.  
  52. #ifdef SCO
  53. # define MAXPATHLEN 1024
  54. # define NEED_TIME_H
  55. # define WANT_BOTH_TIME
  56. # define NEED_STRING_H
  57. # define NOREGEX
  58. #endif
  59.  
  60. #ifdef PCNFS
  61. # define FUNCS
  62. # define NEED_STRING_H
  63. #ifndef MSDOS
  64. # define MSDOS
  65. #endif
  66. #endif
  67.  
  68. #ifdef CUTCP
  69. # define FUNCS
  70. # define NOREGEX
  71. # define NEED_STRING_H
  72. # define SELECTARG int
  73. # ifndef MSDOS
  74. #  define MSDOS
  75. # endif
  76. #endif
  77.  
  78. #ifdef _AUX_SOURCE
  79. # define AUX
  80. # define NOREGEX
  81. # define NBBY 8    /* Number of bits in a byte.  */
  82. typedef long Fd_mask;
  83. # define NFDBITS (sizeof(Fd_mask) * NBBY)    /* bits per mask */
  84. #endif
  85.  
  86. #ifdef OS2
  87. # define NOREGEX
  88. # include <pctcp.h>
  89. #endif
  90. #ifdef MSDOS
  91. # define USG
  92. # define NOREGEX
  93. # include <string.h>
  94. # include <stdlib.h>
  95. #endif
  96.  
  97. #ifdef _AIX
  98. # ifdef u370
  99. #  define FUNCS
  100. # endif /* AIX/370 */
  101. # define _NONSTD_TYPES
  102. # define _BSD_INCLUDES
  103. # define NEED_STRING_H
  104. # define NEED_SELECT_H
  105. # define NEED_TIME_H
  106. #endif
  107.  
  108. /* General problems.  */
  109.  
  110. #ifdef FUNCS
  111. # define index        strchr
  112. /* According to mycroft@gnu.ai.mit.edu. */
  113. # ifdef _IBMR2
  114. char *strchr();
  115. # endif
  116. # define rindex        strrchr
  117. # ifndef _AUX_SOURCE
  118. #  define bcopy(a,b,n)    memcpy(b,a,n)
  119. #  define bzero(a,n)    memset(a,0,n)
  120. # ifdef _IBMR2
  121. char *memset();
  122. # endif
  123. # endif
  124. #endif
  125.  
  126. #if defined(_IBMR2) || defined(_BULL_SOURCE)
  127. # define NEED_SELECT_H
  128. #endif
  129. #if defined(USG) || defined(UTS)
  130. # define NEED_STRING_H
  131. #endif
  132. #if defined(USG) || defined(UTS) || defined(_AUX_SOURCE)
  133. # define NEED_TIME_H
  134. # ifdef UTS
  135. #  define WANT_BOTH_TIME
  136. # endif
  137. #endif
  138.  
  139. #ifdef VMS
  140. /* Get the system status stuff.  */
  141. # include <ssdef.h>
  142. #endif /* VMS */
  143.  
  144. /*
  145.  * FD_SET: lib/pfs/dirsend.c, user/vget/ftp.c
  146.  */
  147. #ifndef CUTCP
  148.  
  149. #define SELECTARG fd_set
  150. #if !defined(FD_SET) && !defined(VMS) && !defined(NEED_SELECT_H)
  151. #define    FD_SETSIZE    32
  152. #define    FD_SET(n, p)    ((p)->fds_bits[(n)/NFDBITS] |= (1 << ((n) % NFDBITS)))
  153. #define    FD_CLR(n, p)    ((p)->fds_bits[(n)/NFDBITS] &= ~(1 << ((n) % NFDBITS)))
  154. #define    FD_ISSET(n, p)    ((p)->fds_bits[(n)/NFDBITS] & (1 << ((n) % NFDBITS)))
  155. #undef FD_ZERO
  156. #define FD_ZERO(p)    bzero((char *)(p), sizeof(*(p)))
  157. #endif
  158.  
  159. #endif /* not CUTCP */
  160.