Mercurial > vim
comparison src/os_unixx.h @ 7:3fc0f57ecb91 v7.0001
updated for version 7.0001
author | vimboss |
---|---|
date | Sun, 13 Jun 2004 20:20:40 +0000 |
parents | |
children | 4424b47a0797 |
comparison
equal
deleted
inserted
replaced
6:c2daee826b8f | 7:3fc0f57ecb91 |
---|---|
1 /* vi:set ts=8 sts=4 sw=4: | |
2 * | |
3 * VIM - Vi IMproved by Bram Moolenaar | |
4 * | |
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. | |
7 */ | |
8 | |
9 /* | |
10 * os_unixx.h -- include files that are only used in os_unix.c | |
11 */ | |
12 | |
13 /* | |
14 * Stuff for signals | |
15 */ | |
16 #if defined(HAVE_SIGSET) && !defined(signal) | |
17 # define signal sigset | |
18 #endif | |
19 | |
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> | |
23 #endif | |
24 | |
25 #ifndef USE_SYSTEM /* use fork/exec to start the shell */ | |
26 | |
27 # if defined(HAVE_SYS_WAIT_H) || defined(HAVE_UNION_WAIT) | |
28 # include <sys/wait.h> | |
29 # endif | |
30 | |
31 # if defined(HAVE_SYS_SELECT_H) && \ | |
32 (!defined(HAVE_SYS_TIME_H) || defined(SYS_SELECT_WITH_SYS_TIME)) | |
33 # include <sys/select.h> | |
34 # endif | |
35 | |
36 # ifndef WEXITSTATUS | |
37 # ifdef HAVE_UNION_WAIT | |
38 # define WEXITSTATUS(stat_val) ((stat_val).w_T.w_Retcode) | |
39 # else | |
40 # define WEXITSTATUS(stat_val) (((stat_val) >> 8) & 0377) | |
41 # endif | |
42 # endif | |
43 | |
44 # ifndef WIFEXITED | |
45 # ifdef HAVE_UNION_WAIT | |
46 # define WIFEXITED(stat_val) ((stat_val).w_T.w_Termsig == 0) | |
47 # else | |
48 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) | |
49 # endif | |
50 # endif | |
51 | |
52 #endif /* !USE_SYSTEM */ | |
53 | |
54 #ifdef HAVE_STROPTS_H | |
55 #ifdef sinix | |
56 #define buf_T __system_buf_t__ | |
57 #endif | |
58 # include <stropts.h> | |
59 #ifdef sinix | |
60 #undef buf_T | |
61 #endif | |
62 #endif | |
63 | |
64 #ifdef HAVE_STRING_H | |
65 # include <string.h> | |
66 #endif | |
67 | |
68 #ifndef HAVE_SELECT | |
69 # ifdef HAVE_SYS_POLL_H | |
70 # include <sys/poll.h> | |
71 # else | |
72 # ifdef HAVE_POLL_H | |
73 # include <poll.h> | |
74 # endif | |
75 # endif | |
76 #endif | |
77 | |
78 #ifdef HAVE_SYS_STREAM_H | |
79 # include <sys/stream.h> | |
80 #endif | |
81 | |
82 #ifdef HAVE_SYS_UTSNAME_H | |
83 # include <sys/utsname.h> | |
84 #endif | |
85 | |
86 #ifdef HAVE_SYS_SYSTEMINFO_H | |
87 /* | |
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 | |
91 */ | |
92 # if defined(HAVE_LIMITS_H) && !defined(_LIMITS_H) | |
93 # include <limits.h> /* for SYS_NMLN (Sinix 5.41 / Unix SysV.4) */ | |
94 # endif | |
95 # include <sys/systeminfo.h> /* for sysinfo */ | |
96 #endif | |
97 | |
98 /* | |
99 * We use termios.h if both termios.h and termio.h are available. | |
100 * Termios is supposed to be a superset of termio.h. Don't include them both, | |
101 * it may give problems on some systems (e.g. hpux). | |
102 * I don't understand why we don't want termios.h for apollo. | |
103 */ | |
104 #if defined(HAVE_TERMIOS_H) && !defined(apollo) | |
105 # include <termios.h> | |
106 #else | |
107 # ifdef HAVE_TERMIO_H | |
108 # include <termio.h> | |
109 # else | |
110 # ifdef HAVE_SGTTY_H | |
111 # include <sgtty.h> | |
112 # endif | |
113 # endif | |
114 #endif | |
115 | |
116 #ifdef HAVE_SYS_PTEM_H | |
117 # include <sys/ptem.h> /* must be after termios.h for Sinix */ | |
118 # ifndef _IO_PTEM_H /* For UnixWare that should check for _IO_PT_PTEM_H */ | |
119 # define _IO_PTEM_H | |
120 # endif | |
121 #endif | |
122 | |
123 /* shared library access */ | |
124 #if defined(HAVE_DLFCN_H) && defined(USE_DLOPEN) | |
125 # include <dlfcn.h> | |
126 #else | |
127 # if defined(HAVE_DL_H) && defined(HAVE_SHL_LOAD) | |
128 # include <dl.h> | |
129 # endif | |
130 #endif |