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-bs2.h < prev    next >
C/C++ Source or Header  |  1998-10-07  |  5KB  |  179 lines

  1. #ifndef _PICO_OS_INCLUDED
  2. #define _PICO_OS_INCLUDED
  3.  
  4.  
  5. /*----------------------------------------------------------------------
  6.  
  7.    OS dependencies, BSDI V2-V4 version.  See also the os-bs2.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 <sys/dir.h>
  25. #include <stdlib.h>
  26. #include <string.h>
  27.  
  28.  
  29. /*------- Some more includes that should usually be correct ------------*/
  30. #include <pwd.h>
  31. #include <sys/wait.h>
  32. #include <sys/stat.h>
  33. #include <fcntl.h>
  34. #include <netdb.h>
  35.  
  36.  
  37.  
  38. /*----------------- locale.h -------------------------------------------*/
  39. /* #include <locale.h> */ /* To make matching and sorting work right */
  40. #define collator strucmp
  41.  
  42.  
  43.  
  44. /*----------------- time.h ---------------------------------------------*/
  45. #include <time.h>
  46. /* plain time.h isn't enough on some systems */
  47. /* #include <sys/time.h> */ /* For struct timeval usually in time.h */ 
  48.  
  49.  
  50.  
  51. /*--------------- signal.h ---------------------------------------------*/
  52. /* #include <signal.h> */   /* sometimes both required, sometimes */
  53. #include <sys/signal.h>  /* only one or the other */
  54.  
  55. #define SigType void     /* value returned by sig handlers is void */
  56. /* #define SigType int */   /* value returned by sig handlers is int */
  57.  
  58. #define POSIX_SIGNALS    /* use POSIX signal semantics (ttyin.c) */
  59. /* #define SYSV_SIGNALS */ /* use System-V signal semantics (ttyin.c) */
  60.  
  61. #define    SIG_PROTO(args) ()
  62.  
  63.  
  64.  
  65. /*-------------- A couple typedef's for integer sizes ------------------*/
  66. typedef unsigned int usign32_t;
  67. typedef unsigned short usign16_t;
  68.  
  69.  
  70.  
  71. /*-------------- qsort argument type -----------------------------------*/
  72. #define QSType void  /* qsort arg is of type void * */
  73. /* #define QSType char */
  74.  
  75.  
  76.  
  77. /*-------------- fcntl flag to set non-blocking IO ---------------------*/
  78. /*#define    NON_BLOCKING_IO    O_NONBLOCK */        /* POSIX style */
  79. #define    NON_BLOCKING_IO    FNDELAY        /* good ol' bsd style  */
  80.  
  81.  
  82.  
  83. /*
  84.  * Choose one of the following three terminal drivers
  85.  */
  86.  
  87. /*--------- Good 'ol BSD -----------------------------------------------*/
  88. /* #include <sgtty.h>  */  /* BSD-based systems */
  89.  
  90. /*--------- System V terminal driver -----------------------------------*/
  91. /* #define HAVE_TERMIO  */ /* this is for pure System V */
  92. /* #include <termio.h>  */ /* Sys V */
  93.  
  94. /*--------- POSIX terminal driver --------------------------------------*/
  95. #define HAVE_TERMIOS    /* this is an alternative */
  96. #include <termios.h>    /* POSIX */
  97.  
  98.  
  99.  
  100. /* Don't need to define this but do need to use either read.sel or read.pol
  101.  * in osdep. */
  102. /*-------- Use poll system call instead of select ----------------------*/
  103. /* #define USE_POLL   */   /* use the poll() system call instead of select() */
  104.  
  105.  
  106.  
  107. /*-------- Use terminfo database instead of termcap --------------------*/
  108. /* #define USE_TERMINFO */ /* use terminfo instead of termcap */
  109. #define USE_TERMCAP    /* use termcap */
  110.  
  111.  
  112.  
  113. /*-- What argument does wait(2) take? Define this if it is a union -----*/
  114. #define HAVE_WAIT_UNION  /* the arg to wait is a union wait * */
  115.  
  116.  
  117.  
  118. /*-------- Is window resizing available? -------------------------------*/
  119. #if defined(TIOCGWINSZ) && defined(SIGWINCH)
  120. #define RESIZING  /* SIGWINCH and friends */
  121. #endif
  122.  
  123.  
  124.  
  125. /*-------- If no vfork, use regular fork -------------------------------*/
  126. /* #define vfork fork */ /* vfork is just a lightweight fork, so can use fork */
  127.  
  128.  
  129.  
  130. /*---- When no screen size can be discovered this is the size used -----*/
  131. #define DEFAULT_LINES_ON_TERMINAL    (24)
  132. #define DEFAULT_COLUMNS_ON_TERMINAL    (80)
  133. #define NROW    DEFAULT_LINES_ON_TERMINAL
  134. #define NCOL    DEFAULT_COLUMNS_ON_TERMINAL
  135.  
  136.  
  137. /*----------------------------------------------------------------------
  138.  
  139.    Pico OS dependencies.
  140.  
  141.  ----*/
  142.  
  143.  
  144. /*
  145.  * File name separator, as a char and string
  146.  */
  147. #define C_FILESEP    '/'
  148. #define S_FILESEP    "/"
  149.  
  150. /*
  151.  * Place where mail gets delivered (for pico's new mail checking)
  152.  */
  153. #define MAILDIR        "/var/mail"
  154.  
  155. /*
  156.  * What and where the tool that checks spelling is located.  If this is
  157.  * undefined, then the spelling checker is not compiled into pico.
  158.  */
  159. #define SPELLER        "/usr/bin/spell"
  160.  
  161. #ifdef    MOUSE
  162. #define    XTERM_MOUSE_ON    "\033[?1000h"    /* DECSET with parm 1000 */
  163. #define    XTERM_MOUSE_OFF    "\033[?1000l"    /* DECRST with parm 1000  */
  164. #endif
  165.  
  166. /*
  167.  * Mode passed chmod() to make tmp files exclusively user read/write-able
  168.  */
  169. #define    MODE_READONLY    (0600)
  170.  
  171. /*
  172.  * Make sys_errlist visible
  173.  */
  174. /* extern char *sys_errlist[]; */
  175. /* extern int   sys_nerr; */
  176.  
  177.  
  178. #endif /* _PICO_OS_INCLUDED */
  179.