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-bso.h < prev    next >
C/C++ Source or Header  |  1999-01-22  |  5KB  |  181 lines

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