home *** CD-ROM | disk | FTP | other *** search
/ Super Net 1 / SUPERNET_1.iso / PC / OTROS / UNIX / ARCHIE / CLIENTS / XARCHIE-.1 / PMACHINE.H < prev    next >
Encoding:
C/C++ Source or Header  |  1992-11-22  |  3.1 KB  |  153 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.  * gf 23 Nov 1992 : Added section for defining malloc() & co.
  10.  */
  11.  
  12. #ifdef u3b2
  13. # define USG
  14. # define NOREGEX
  15. # define MAXPATHLEN 1024       /* There's no maxpathlen in any 3b2 .h file.  */
  16. #endif
  17.  
  18. #ifdef m88k
  19. #define MAXPATHLEN 1024
  20. #endif
  21.  
  22. #ifdef hpux
  23. # ifndef bcopy
  24. #  define FUNCS            /* HP/UX 8.0 has the fns.  */
  25. # endif
  26. # define NOREGEX
  27. # define NEED_STRING_H
  28. #endif
  29.  
  30. /* These are required for a Sequent running Dynix/PTX, their SysV variant.
  31.    Archie builds fine untouched on a system running their BSD-based OS.  */
  32. #ifdef _SEQUENT_
  33. # define NOREGEX
  34. # define USG
  35. #endif
  36.  
  37. #if defined(USG) || defined(SYSV)
  38. # define FUNCS
  39. #endif
  40.  
  41. #ifdef SOLARIS2
  42. #define FUNCS
  43. #define NOREGEX
  44. #define NEED_STRING_H
  45. #endif
  46.  
  47. #ifdef ISC
  48. # define FUNCS
  49. # define STRSPN
  50. # define NOREGEX
  51. #endif
  52.  
  53. #ifdef PCNFS
  54. # define FUNCS
  55. # define NEED_STRING_H
  56. #ifndef MSDOS
  57. # define MSDOS
  58. #endif
  59. #endif
  60.  
  61. #ifdef CUTCP
  62. # define FUNCS
  63. # define NOREGEX
  64. # define NEED_STRING_H
  65. # define SELECTARG int
  66. # ifndef MSDOS
  67. #  define MSDOS
  68. # endif
  69. #endif
  70.  
  71. #ifdef _AUX_SOURCE
  72. # define AUX
  73. # define NOREGEX
  74. # define NBBY 8    /* Number of bits in a byte.  */
  75. typedef long Fd_mask;
  76. # define NFDBITS (sizeof(Fd_mask) * NBBY)    /* bits per mask */
  77. #endif
  78.  
  79. #ifdef OS2
  80. # define NOREGEX
  81. # include <pctcp.h>
  82. #endif
  83. #ifdef MSDOS
  84. # define USG
  85. # define NOREGEX
  86. # include <string.h>
  87. # include <stdlib.h>
  88. #endif
  89.  
  90. #ifdef _AIX
  91. # ifdef u370
  92. #  define FUNCS
  93. # endif /* AIX/370 */
  94. # define _NONSTD_TYPES
  95. # define _BSD_INCLUDES
  96. # define NEED_STRING_H
  97. # define NEED_SELECT_H
  98. # define NEED_TIME_H
  99. #endif
  100.  
  101. /* General problems.  */
  102.  
  103. #ifdef FUNCS
  104. # define index        strchr
  105. /* According to mycroft@gnu.ai.mit.edu. */
  106. # ifdef _IBMR2
  107. char *strchr();
  108. # endif
  109. # define rindex        strrchr
  110. # ifndef _AUX_SOURCE
  111. #  define bcopy(a,b,n)    memcpy(b,a,n)
  112. #  define bzero(a,n)    memset(a,0,n)
  113. # ifdef _IBMR2
  114. char *memset();
  115. # endif
  116. # endif
  117. #endif
  118.  
  119. #if defined(_IBMR2) || defined(_BULL_SOURCE)
  120. # define NEED_SELECT_H
  121. #endif
  122. #if defined(USG) || defined(UTS)
  123. # define NEED_STRING_H
  124. #endif
  125. #if defined(USG) || defined(UTS) || defined(_AUX_SOURCE)
  126. # define NEED_TIME_H
  127. # ifdef UTS
  128. #  define WANT_BOTH_TIME
  129. # endif
  130. #endif
  131.  
  132. #ifdef VMS
  133. /* Get the system status stuff.  */
  134. # include <ssdef.h>
  135. #endif /* VMS */
  136.  
  137. /*
  138.  * FD_SET: lib/pfs/dirsend.c, user/vget/ftp.c
  139.  */
  140. #ifndef CUTCP
  141.  
  142. #define SELECTARG fd_set
  143. #if !defined(FD_SET) && !defined(VMS) && !defined(NEED_SELECT_H)
  144. #define    FD_SETSIZE    32
  145. #define    FD_SET(n, p)    ((p)->fds_bits[(n)/NFDBITS] |= (1 << ((n) % NFDBITS)))
  146. #define    FD_CLR(n, p)    ((p)->fds_bits[(n)/NFDBITS] &= ~(1 << ((n) % NFDBITS)))
  147. #define    FD_ISSET(n, p)    ((p)->fds_bits[(n)/NFDBITS] & (1 << ((n) % NFDBITS)))
  148. #undef FD_ZERO
  149. #define FD_ZERO(p)    bzero((char *)(p), sizeof(*(p)))
  150. #endif
  151.  
  152. #endif /* not CUTCP */
  153.