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

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