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