home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / historic / v92.tgz / v92.tar / v92 / src / h / sys.h < prev    next >
C/C++ Source or Header  |  1996-03-22  |  6KB  |  324 lines

  1. /*
  2.  * sys.h -- system include files.
  3.  */
  4.  
  5. /*
  6.  * The const storage-class qualifier causes conflicts between some of
  7.  *  our prototypes and those from system include files on some platforms.
  8.  *  In addition, some RTL code uses casts to const pointers to keep rtt
  9.  *  from printing warnings about possible indirect modifications. However,
  10.  *  these casts do not pass non-ANSI-standard C compilers.
  11.  */
  12. #ifndef AllowConst
  13. #define const  /* make const disapear */
  14. #endif                    /* StandardLib */
  15.  
  16. /*
  17.  * The following code is operating-system dependent [@sys.01].  Include files
  18.  *  that are system-dependent.
  19.  */
  20.  
  21. #if PORT
  22. #include <signal.h>
  23.    /* probably needs something more */
  24. Deliberate Syntax Error
  25. #endif                    /* PORT */
  26.  
  27. #if AMIGA
  28. #include <signal.h>
  29. #include <fcntl.h>
  30. #include <ios1.h>
  31. #include <string.h>
  32. #include <libraries/dosextens.h>
  33.  
  34. #if AZTEC_C
  35. #include <ctype.h>
  36. #endif                    /* AZTEC_C */
  37. #endif                    /* AMIGA */
  38.  
  39. #if ARM
  40. #include <ctype.h>
  41. #include <stdio.h>
  42. #include <stdlib.h>
  43. #include <string.h>
  44. #include <signal.h>
  45. #endif                    /* ARM */
  46.  
  47. #if ATARI_ST
  48. #include <fcntl.h>
  49. #include <osbind.h>
  50. #endif                    /* ATARI_ST */
  51.  
  52. #if MACINTOSH
  53. #include <signal.h>
  54. #if LSC
  55. #include <unix.h>
  56. #endif                    /* LSC */
  57. #if MPW
  58. #define create xx_create    /* prevent duplicate definition of create() */
  59. #include <stdlib.h>
  60. #include <stdio.h>
  61. #include <Types.h>
  62. #include <Events.h>
  63. #include <Files.h>
  64. #include <FCntl.h>
  65. #include <Files.h>
  66. #include <IOCtl.h>
  67. #include <fp.h>
  68. #include <OSUtils.h>
  69. #include <Memory.h>
  70. #include <Errors.h>
  71. #include "time.h"
  72. #include <Quickdraw.h>
  73. #include <ToolUtils.h>
  74. #include <CursorCtl.h>
  75. #endif                    /* MPW */
  76. #if THINK_C
  77. #include <time.h>
  78. #include <stdio.h>
  79. #include <stdlib.h>
  80. #include <string.h>
  81. #include <time.h>
  82. #endif
  83. #ifdef MacGraph         /* MacGraph */
  84. #include <console.h>
  85. #include <time.h>
  86. #include <stdio.h>
  87. #include <stdlib.h>
  88. #include <string.h>
  89. #include <time.h>
  90. #include <AppleEvents.h>
  91. #include <GestaltEqu.h>
  92. #include <fp.h>
  93. #include <QDOffscreen.h>
  94. #include <Palettes.h>
  95. #include <Quickdraw.h>
  96. #endif                  /* MacGraph */
  97. #endif                    /* MACINTOSH */
  98.  
  99. #if MSDOS
  100. #include <sys/types.h>
  101. #include <sys/stat.h>
  102. #include <fcntl.h>
  103. #include <signal.h>
  104. #include <time.h>
  105.  
  106. #ifdef MSWindows
  107. #define int_PASCAL int PASCAL
  108. #define LRESULT_CALLBACK LRESULT CALLBACK
  109. #if BORLAND_286
  110. #include <time.h>
  111. #include <dir.h>
  112. #endif
  113. #include <windows.h>
  114. #include "::wincap:dibutil.h"
  115. #endif                    /* MSWindows */
  116. #include <setjmp.h>
  117. #endif                    /* MSDOS */
  118.  
  119. #if MVS || VM
  120. #ifdef RecordIO
  121. #if SASC
  122. #include <lcio.h>
  123. #endif                    /* SASC */
  124. #endif                    /* RecordIO */
  125. #if SASC
  126. #include <lcsignal.h>
  127. #else                    /* SASC */
  128. #include <signal.h>
  129. #endif                    /* SASC */
  130. #endif                    /* MVS || VM */
  131.  
  132. #if OS2
  133. #define INCL_DOS
  134. #define INCL_ERRORS
  135. #define INCL_RESOURCES
  136. #define INCL_DOSMODULEMGR
  137.  
  138. #ifdef PresentationManager
  139. #define INCL_PM
  140. #endif                    /* PresentationManager */
  141.  
  142. #include <os2.h>
  143. #include <stdio.h>
  144. #include <time.h>
  145. #include <signal.h>
  146. /* Pipe support for OS/2 */
  147. #include <stddef.h>
  148. #include <process.h>
  149. #include <fcntl.h>
  150. #include <errno.h>
  151.  
  152. #if CSET2V2
  153. #include <io.h>
  154. #include <direct.h>
  155. #define IN_SYS_H
  156. #include "::h/local.h"                 /* Include #pragmas *:
  157. #undef IN_SYS_H
  158. #endif                    /* CSet/2 version 2 */
  159.  
  160. #endif                    /* OS2 */
  161. #ifdef ConsoleWindow
  162. /*
  163.  * pull in variable arg lists
  164.  */
  165. #include <stdarg.h>
  166. #endif                    /* ConsoleWindow */
  167.  
  168. #if UNIX
  169.  
  170. #ifdef ATT3B
  171. #include <sys/types.h>
  172. #include <sys/stat.h>
  173. #endif                    /* ATT3B */
  174.  
  175. #ifdef XENIX_386
  176.  
  177. #ifdef StandardLib
  178. #include <unistd.h>
  179. #endif                    /* StandardLib */
  180.  
  181. #endif                    /* XENIX_386 */
  182.  
  183. #ifdef SuppressAlignmentMsg
  184. #include <sys/sysinfo.h>
  185. #include <sys/proc.h>
  186. #endif                    /* SuppressAlignmentMsg */
  187.  
  188. #include <signal.h>
  189.  
  190. #ifndef XWindows
  191. #include <sys/types.h>
  192. #endif                    /* XWindows */
  193. #include <sys/time.h>
  194.  
  195. #ifdef UtsName
  196. #include <sys/utsname.h>
  197. #endif                    /* UtsName */
  198.  
  199. #ifdef KeyboardFncs
  200. #ifdef HaveTermio
  201.  
  202. #ifndef Linux
  203. #include <sys/termio.h>
  204. #else                    /* Linux */
  205. #include <termio.h>
  206. #endif                    /* Linux */
  207.  
  208. #include <sys/ioctl.h>
  209. #include <sys/errno.h>
  210. #include <sys/signal.h>
  211. #endif                    /* HaveTermio */
  212.  
  213. #ifdef HaveTioc
  214. #include <sys/ioctl.h>
  215. #include <errno.h>
  216. #include <sys/signal.h>
  217. #endif                    /* HaveTioc */
  218.  
  219. #endif                    /* KeyboardFncs */
  220.  
  221. #ifdef LoadFunc
  222. #include <dlfcn.h>
  223. #endif                    /* LoadFunc */
  224.  
  225. #endif                    /* UNIX */
  226.  
  227. #if VMS
  228. #include <signal.h>
  229. #include <types.h>
  230. #include <dvidef>
  231. #include <iodef>
  232. #include <stsdef.h>
  233. #endif                    /* VMS */
  234.  
  235. #ifdef ConsoleWindow
  236. #undef printf
  237. #undef fprintf
  238. #undef fflush
  239. #endif
  240.  
  241. #include <stdio.h>
  242.  
  243. #ifdef ConsoleWindow
  244. #define printf Consoleprintf
  245. #define fprintf Consolefprintf
  246. #define fflush Consolefflush
  247. #endif
  248.  
  249. #ifdef XWindows
  250. /*
  251.  * DECstation X Window #includes check for #ifdef VMS, so if it's 0, undef it.
  252.  * DECwindows #includes check for #ifdef UNIX, so if VMS is 1, undef UNIX.
  253.  */
  254.  
  255. #if !VMS
  256. #undef VMS
  257. #endif                    /* VMS */
  258.  
  259. #if VMS
  260. #undef UNIX
  261. #include "decw$include:Xlib.h"
  262. #include "decw$include:Xutil.h"
  263. #include "decw$include:Xos.h"
  264. #include "decw$include:Xatom.h"
  265.  
  266. #ifdef HaveXpmFormat
  267. #include "::xpm:xpm.h"
  268. #endif                    /* HaveXpmFormat */
  269.  
  270. #undef UNIX
  271. #define UNIX 0
  272. #else                    /* VMS */
  273.  
  274. #ifdef HaveXpmFormat
  275. #include "::xpm:xpm.h"
  276. #else                    /* HaveXpmFormat */
  277. #include <X11/Xlib.h>
  278. #endif                    /* HaveXpmFormat */
  279.  
  280. #include <X11/Xutil.h>
  281. #include <X11/Xos.h>
  282. #include <X11/Xatom.h>
  283.  
  284. #ifndef VMS
  285. #define VMS 0
  286. #endif                    /* VMS */
  287.  
  288. #endif                    /* VMS */
  289.  
  290. #endif                    /* XWindows */
  291.  
  292. /*
  293.  * End of operating-system specific code.
  294.  */
  295.  
  296. #include <ctype.h>
  297. #include <errno.h>
  298. #include <math.h>
  299.  
  300.  
  301. /*
  302.  *  The following symbols should be in <stdio.h>; define them if they aren't.
  303.  */
  304. #ifndef SEEK_SET
  305. #define SEEK_SET 0
  306. #endif                    /* SEEK_SET */
  307. #ifndef SEEK_CUR
  308. #define SEEK_CUR 1
  309. #endif                    /* SEEK_CUR */
  310. #ifndef SEEK_END
  311. #define SEEK_END 2
  312. #endif                    /* SEEK_END */
  313.  
  314. /*
  315.  * The following depends on <sys/types.h>, which is included at different
  316.  *  points above depending on XWindows.  It's unneeded but harmless if
  317.  *  not Unix.
  318.  */
  319. #ifdef FD_SET
  320. #define FD_NULL ((fd_set *) 0)
  321. #else                                   /* FD_SET */
  322. #define FD_NULL ((long *) 0)
  323. #endif                                  /* FD_SET */
  324.