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

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