home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C / Utilities / Mac⁄gnuucp 6.14 / source / includes.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-01-20  |  4.8 KB  |  249 lines  |  [TEXT/KAHL]

  1. /*
  2.  * @(#)includes.h 1.7 87/09/29    Copyright 1987 Free Software Foundation, Inc.
  3.  *
  4.  * Copying and use of this program are controlled by the terms of the
  5.  * GNU Emacs General Public License.
  6.  *
  7.  * Include files for various supported systems:
  8.  * Note that NAMESIZE should be the max length of a file name, including
  9.  * all its directories, drive specifiers, extensions, and the like.
  10.  * E.g. on a Unix with 14-char file names, NAMESIZE is several hundred
  11.  * characters, since the 14-char names can be nested.
  12.  */
  13.  
  14. #define MAC
  15. #undef HAS_GETTY
  16.  
  17. #ifdef BSD
  18. /* Unix Berserkeley systems */
  19. #include <stdio.h>
  20. #include <ctype.h>
  21. #include <sys/param.h>
  22. #include <sys/file.h>
  23. #include <sys/time.h>
  24. #include <sys/types.h>
  25. #include <sys/timeb.h>
  26. #include <sys/dir.h>
  27. #include <sys/stat.h>
  28. #include <sys/wait.h>
  29. #include <strings.h>
  30.  
  31. extern char *strtok();
  32. #define    strchr    index
  33.  
  34. #define STATUS union wait
  35. #define postmaster "postmaster"
  36. #define EXIT_OK 0
  37. #define EXIT_ERR 1
  38.  
  39. #define    UNIX
  40. #define EXEDIR  "/usr/lib/uucp" /* uuxqt executables live here */
  41. #define NULL_DEVICE "/dev/null"
  42. #define    NAMESIZE    MAXPATHLEN
  43. #endif
  44.  
  45. #ifdef SYSV
  46. /* Unix System V */
  47. #include <stdio.h>
  48. #include <ctype.h>
  49. #include <fcntl.h>
  50. #include <string.h>
  51. #include <sys/types.h>
  52. #include <sys/timeb.h>
  53. #include <sys/stat.h>
  54. #include <sys/dirent.h>
  55.  
  56. #define    UNIX
  57. #endif
  58.  
  59. #ifdef UNIX
  60. /* Stuff common to all Unix systems */
  61. #define    remove    unlink    /* Unix-ism for removing a file */
  62. #define    BUFFEREDIO
  63. #define    MULTITASK
  64. #define    STDIN        0
  65. #define    O_BINARY    0    /* No distinction between text and binary */
  66. #endif
  67.  
  68. #ifdef CPM
  69. /* CP/M-80 */
  70. #include <stdio.h>
  71. #include <ctype.h>
  72. #include <fcntl.h>
  73.  
  74. #define    NAMESIZE    50        /* No directories... */
  75. #endif
  76.  
  77. #ifdef MSDOS
  78. /* Microsoft DOS */
  79. #include <stdio.h>
  80. #include <ctype.h>
  81. #include <fcntl.h>
  82. #include <time.h>
  83. #include <signal.h>
  84. #include <dos.h>
  85. #include <conio.h>
  86. #include <stdlib.h>
  87. #include <process.h>
  88. #include <string.h>
  89. #include <direct.h>
  90. #include <memory.h>
  91.  
  92. /* Turn on support for the interrupt driven comm port routines */
  93. #define    COMPORT
  94.  
  95. #ifdef COMPORT
  96. #define    BUFFEREDIO
  97. #include "comport.h"
  98. int handler();
  99. #endif
  100.  
  101. /* FIXME, these should all be uppercase. */
  102. #define    fnamesize    sizeof("FILENAME")    /* 8 chars */
  103. #define    NAMESIZE    128        /* full path size */
  104. #define    ufnamesize      5               /* uux id size */
  105. #endif
  106.  
  107. #ifdef ST
  108. /* Atari ST */
  109. #include <stdio.h>
  110. #include <ctype.h>
  111. #include <osbind.h>
  112. #include <signal.h>
  113. #include <setjmp.h>
  114.  
  115. #define O_RDONLY    0    /* for read only open() */
  116. #define NAMESIZE    13    /* filename size */
  117.  
  118. #endif
  119.  
  120. #ifdef VMS
  121.  
  122. #include <ctype.h>
  123. #include <dcdef.h>
  124. #include <descrip.h>
  125. #include <dvidef.h>
  126. #include <errno.h>
  127. #include <file.h>
  128. #include <file>
  129. #include <iodef.h>
  130. #include <math.h>
  131. #include <rmsdef.h>
  132. #include <setjmp.h>
  133. #include <signal.h>
  134. #include <ssdef.h>
  135. #include <stat.h>
  136. #include <stdlib.h>
  137. #include <stdio.h>
  138. #include <time.h>
  139. #include <tt2def.h>
  140. #include <ttdef.h>
  141. #include <string.h>
  142.  
  143. #define NAMESIZE 255
  144. #define CONTROL         "user2:[uucp.gnuucp]gnuucp.ctl"
  145. #define    LOGCLOSE    /* Logfile must be closed; VMS locks it when open */
  146. #define EXEDIR  "user2:[uucp.gnuucp]"  /* uuxqt executables live here */
  147. #define NULL_DEVICE "NL:"
  148. #define fork vfork
  149. #define STATUS int
  150. #define postmaster "system"
  151. #define EXIT_OK 1
  152. #define EXIT_ERR 0
  153.  
  154. #define    time_t    unsigned
  155. #define index strchr
  156. #define rindex strrchr
  157. #define remove delete    /* Remove a file */
  158. #define qsort pqsort    /* Our own version */
  159.  
  160. #endif
  161.  
  162. #ifdef MAC
  163. /* Macintosh */
  164. #include <Files.h>
  165. #include <Serial.h>
  166. /* #include <HFS.h> */
  167. #include <Menus.h>
  168. #include <signal.h>
  169. #include <Packages.h>
  170. #include <Types.h>
  171. #include <OsUtils.h>
  172. #include <Events.h>
  173. #include <Windows.h>
  174. #include <stdio.h>
  175. #include <console.h>
  176. #include <ctype.h>
  177. #include <setjmp.h>
  178. #include <stdlib.h>
  179. #include <string.h>
  180. #include <time.h>
  181. #include <unix.h>
  182. #include <errno.h>
  183. #include <fcntl.h>
  184. /* #include <io.h> */
  185. #define postmaster "postmaster"
  186. #define NULL_DEVICE ":NULL"
  187. #define off_t long
  188. #define time_t long
  189. #define EXIT_OK 1
  190. #define EXIT_ERR 0
  191. struct STATUS 
  192.     { 
  193.         long w_status;
  194.         };
  195.  
  196. /* struct stat 
  197.     {
  198.         long st_size;
  199.         long st_mtime;
  200.         };
  201. */
  202. struct DIR
  203.     {
  204.         long dirinfo;
  205.         };
  206. struct dirent
  207.     {
  208.         char *d_name;
  209.         };
  210.         
  211. #define    NAMESIZE    512        /* No directories... */
  212. #include "gnuucp_proto.h"
  213. #include "rmail_proto.h"
  214. #include "sysdep.h"
  215. #define    BUFFEREDIO
  216. #endif
  217.  
  218.  
  219. #ifdef MAC_MPW
  220. /* Macintosh Programmers Workshop. */
  221. #include <stdio.h>
  222. #include <ctype.h>
  223. #include <fcntl.h>
  224. #include <setjmp.h>
  225. #include <uumac_mpw.h>
  226.  
  227. #define NAMESIZE 512 /* Hat. */
  228.  
  229. #define    abort()    exit(1);
  230. #endif
  231.  
  232. #ifdef AMIGA
  233. #include <stdio.h>
  234. #include <ctype.h>
  235. #include <fcntl.h>
  236. #include <exec/types.h>
  237. #include <exec/exec.h>
  238. #include <devices/serial.h>
  239. #include <devices/keymap.h>
  240. #include <devices/timer.h>
  241. #include <libraries/dos.h>
  242. #include <signal.h>
  243.  
  244. #define NAMESIZE 50
  245.  
  246. #define    bzero(area, len)    memset(area, '\0', len)
  247. #define    bcopy(from, to, len)    memcpy(to, from, len)
  248. #endif
  249.