home *** CD-ROM | disk | FTP | other *** search
/ ftp.uv.es / 2014.11.ftp.uv.es.tar / ftp.uv.es / pub / unix / pine4.10.tar.gz / pine4.10.tar / pine4.10 / pico / osdep / os-sco.h < prev    next >
C/C++ Source or Header  |  1998-10-08  |  6KB  |  202 lines

  1. #ifndef _PICO_OS_INCLUDED
  2. #define _PICO_OS_INCLUDED
  3.  
  4.  
  5. /*----------------------------------------------------------------------
  6.  
  7.    OS dependencies, SCO version.  See also the os-sco.c file.
  8.    The following stuff may need to be changed for a new port, but once
  9.    the port is done, it won't change.  At the bottom of the file are a few
  10.    constants that you may want to configure differently than they
  11.    are configured, but probably not.
  12.  
  13.  ----*/
  14.  
  15.  
  16.  
  17. /*----------------- Are we ANSI? ---------------------------------------*/
  18. #define ANSI          /* this is an ANSI compiler */
  19.  
  20. /*------ If our compiler doesn't understand type void ------------------*/
  21. /* #define void char */  /* no void in compiler */
  22.  
  23.  
  24. #include <stdlib.h>
  25. #include <string.h>
  26. #include <sys/types.h>
  27.  
  28. #define  USE_DIRENT
  29. #include <dirent.h>
  30. #include <sys/stream.h>
  31. #include <sys/ptem.h>
  32.  
  33.  
  34. /*------- Some more includes that should usually be correct ------------*/
  35. #include <pwd.h>
  36. #include <sys/wait.h>
  37. #include <sys/stat.h>
  38. #include <fcntl.h>
  39. #include <netdb.h>
  40.  
  41.  
  42.  
  43. /*----------------- locale.h -------------------------------------------*/
  44. /* #include <locale.h> */ /* To make matching and sorting work right */
  45. #define collator strucmp
  46.  
  47.  
  48.  
  49. /*----------------- time.h ---------------------------------------------*/
  50. #include <time.h>
  51. /* plain time.h isn't enough on some systems */
  52. #include <sys/time.h>  /* For struct timeval usually in time.h */ 
  53.  
  54.  
  55.  
  56. /*--------------- signal.h ---------------------------------------------*/
  57. #include <signal.h>      /* sometimes both required, sometimes */
  58. /* signal handling is broken in the delivered SCO shells, so punt on
  59.    suspending the current session */
  60. #if defined(SIGTSTP)
  61. #undef SIGTSTP
  62. #endif
  63.  
  64. #define SigType void     /* value returned by sig handlers is void */
  65. /* #define SigType int */   /* value returned by sig handlers is int */
  66.  
  67. /* #define POSIX_SIGNALS */ /* use POSIX signal semantics (ttyin.c) */
  68. #define SYSV_SIGNALS    /* use System-V signal semantics (ttyin.c) */
  69.  
  70. #define    SIG_PROTO(args) ()
  71.  
  72.  
  73.  
  74. /*-------------- A couple typedef's for integer sizes ------------------*/
  75. typedef unsigned int usign32_t;
  76. typedef unsigned short usign16_t;
  77.  
  78.  
  79.  
  80. /*-------------- qsort argument type -----------------------------------*/
  81. #define QSType void  /* qsort arg is of type void * */
  82. /* #define QSType char */
  83.  
  84.  
  85.  
  86. /*-------------- fcntl flag to set non-blocking IO ---------------------*/
  87. /*#define    NON_BLOCKING_IO    O_NONBLOCK */        /* POSIX style */
  88. /*#define    NON_BLOCKING_IO    FNDELAY    */    /* good ol' bsd style  */
  89.  
  90.  
  91.  
  92. /*
  93.  * Choose one of the following three terminal drivers
  94.  */
  95.  
  96. /*--------- Good 'ol BSD -----------------------------------------------*/
  97. /* #include <sgtty.h> */   /* BSD-based systems */
  98.  
  99. /*--------- System V terminal driver -----------------------------------*/
  100. #define HAVE_TERMIO     /* this is for pure System V */
  101. #include <termio.h>     /* Sys V */
  102.  
  103. /*--------- POSIX terminal driver --------------------------------------*/
  104. /* #define HAVE_TERMIOS */ /* this is an alternative */
  105. /* #include <termios.h> */ /* POSIX */
  106.  
  107.  
  108.  
  109. /* Don't need to define this but do need to use either read.sel or read.pol
  110.  * in osdep. */
  111. /*-------- Use poll system call instead of select ----------------------*/
  112. /* #define USE_POLL */     /* use the poll() system call instead of select() */
  113.  
  114.  
  115.  
  116. /*-------- Use terminfo database instead of termcap --------------------*/
  117. #define USE_TERMINFO    /* use terminfo instead of termcap */
  118. /* #define USE_TERMCAP */ /* use termcap */
  119.  
  120.  
  121.  
  122. /*-- What argument does wait(2) take? Define this if it is a union -----*/
  123. /* #define HAVE_WAIT_UNION */ /* the arg to wait is a union wait * */
  124.  
  125.  
  126.  
  127. /*-------- Is window resizing available? -------------------------------*/
  128. /* NOTE: Current reports are that ioctl(TIOCGWINSZ) either fails or */
  129. /*       reports constant values, so there is no utility in having  */
  130. /*       RESIZING enabled for SCO Unix. */
  131. /* #if defined(TIOCGWINSZ) && defined(SIGWINCH) */
  132. /* #define RESIZING  */
  133. /* #endif */
  134.  
  135.  
  136.  
  137. /*-------- If no vfork, use regular fork -------------------------------*/
  138. #define vfork fork  /* vfork is just a lightweight fork, so can use fork */
  139.  
  140.  
  141.  
  142. /*---- When no screen size can be discovered this is the size used -----*/
  143. #define DEFAULT_LINES_ON_TERMINAL    (24)
  144. #define DEFAULT_COLUMNS_ON_TERMINAL    (80)
  145. #define NROW    DEFAULT_LINES_ON_TERMINAL
  146. #define NCOL    DEFAULT_COLUMNS_ON_TERMINAL
  147.  
  148.  
  149. /*----------------------------------------------------------------------
  150.  
  151.    Pico OS dependencies.
  152.  
  153.  ----*/
  154.  
  155.  
  156. /*
  157.  * File name separator, as a char and string
  158.  */
  159. #define C_FILESEP    '/'
  160. #define S_FILESEP    "/"
  161.  
  162. /*
  163.  * Place where mail gets delivered (for pico's new mail checking)
  164.  */
  165. #define MAILDIR        "/usr/spool/mail"
  166.  
  167. /*
  168.  * What and where the tool that checks spelling is located.  If this is
  169.  * undefined, then the spelling checker is not compiled into pico.
  170.  */
  171. #define SPELLER        "/usr/bin/spell"
  172.  
  173. #ifdef    MOUSE
  174. #define    XTERM_MOUSE_ON    "\033[?1000h"    /* DECSET with parm 1000 */
  175. #define    XTERM_MOUSE_OFF    "\033[?1000l"    /* DECRST with parm 1000  */
  176. #endif
  177.  
  178. /*
  179.  * Mode passed chmod() to make tmp files exclusively user read/write-able
  180.  */
  181. #define    MODE_READONLY    (0600)
  182.  
  183.  
  184. /* memcpy() is no good for overlapping blocks.  If that's a problem, use
  185.  * the memmove() in ../c-client
  186.  */
  187. #define bcopy(a,b,s) memcpy (b, a, s)
  188.  
  189. /*
  190.  * Make sys_errlist visible
  191.  */
  192. extern char *sys_errlist[];
  193. extern int   sys_nerr;
  194.  
  195. /*
  196.  * ftruncate is missing on SCO UNIX (availabe from OpenServer 5 on)
  197.  */
  198. #define    ftruncate    chsize
  199.  
  200.  
  201. #endif /* _PICO_OS_INCLUDED */
  202.