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

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