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-osf.h < prev    next >
C/C++ Source or Header  |  1998-10-08  |  5KB  |  185 lines

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