1 /* vi:set ts=8 sts=4 sw=4:
3 * VIM - Vi IMproved by Bram Moolenaar
5 * Do ":help uganda" in Vim to read copying and usage conditions.
6 * Do ":help credits" in Vim to see a list of people who contributed.
10 * os_unixx.h -- include files that are only used in os_unix.c
16 #if defined(HAVE_SIGSET) && !defined(signal)
17 # define signal sigset
20 /* sun's sys/ioctl.h redefines symbols from termio world */
21 #if defined(HAVE_SYS_IOCTL_H) && !defined(sun)
22 # include <sys/ioctl.h>
25 #ifndef USE_SYSTEM /* use fork/exec to start the shell */
27 # if defined(HAVE_SYS_WAIT_H) || defined(HAVE_UNION_WAIT)
28 # include <sys/wait.h>
31 # if defined(HAVE_SYS_SELECT_H) && \
32 (!defined(HAVE_SYS_TIME_H) || defined(SYS_SELECT_WITH_SYS_TIME))
33 # include <sys/select.h>
37 # ifdef HAVE_UNION_WAIT
38 # define WEXITSTATUS(stat_val) ((stat_val).w_T.w_Retcode)
40 # define WEXITSTATUS(stat_val) (((stat_val) >> 8) & 0377)
45 # ifdef HAVE_UNION_WAIT
46 # define WIFEXITED(stat_val) ((stat_val).w_T.w_Termsig == 0)
48 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
52 #endif /* !USE_SYSTEM */
56 #define buf_T __system_buf_t__
69 # ifdef HAVE_SYS_POLL_H
70 # include <sys/poll.h>
78 #ifdef HAVE_SYS_STREAM_H
79 # include <sys/stream.h>
82 #ifdef HAVE_SYS_UTSNAME_H
83 # include <sys/utsname.h>
86 #ifdef HAVE_SYS_SYSTEMINFO_H
88 * foolish Sinix <sys/systeminfo.h> uses SYS_NMLN but doesn't include
89 * <limits.h>, where it is defined. Perhaps other systems have the same
90 * problem? Include it here. -- Slootman
92 # if defined(HAVE_LIMITS_H) && !defined(_LIMITS_H)
93 # include <limits.h> /* for SYS_NMLN (Sinix 5.41 / Unix SysV.4) */
96 /* Define SYS_NMLN ourselves if it still isn't defined (for CrayT3E). */
101 # include <sys/systeminfo.h> /* for sysinfo */
105 * We use termios.h if both termios.h and termio.h are available.
106 * Termios is supposed to be a superset of termio.h. Don't include them both,
107 * it may give problems on some systems (e.g. hpux).
108 * I don't understand why we don't want termios.h for apollo.
110 #if defined(HAVE_TERMIOS_H) && !defined(apollo)
111 # include <termios.h>
113 # ifdef HAVE_TERMIO_H
122 #ifdef HAVE_SYS_PTEM_H
123 # include <sys/ptem.h> /* must be after termios.h for Sinix */
124 # ifndef _IO_PTEM_H /* For UnixWare that should check for _IO_PT_PTEM_H */
129 /* shared library access */
130 #if defined(HAVE_DLFCN_H) && defined(USE_DLOPEN)
132 /* needed to define RTLD_LAZY (Anthony Giorgio) */
137 # if defined(HAVE_DL_H) && defined(HAVE_SHL_LOAD)