Mercurial > vim
annotate src/os_unixx.h @ 32613:de4b01b2d7d1 v9.0.1638
patch 9.0.1638: crypt tests hang and cause memory errors
Commit: https://github.com/vim/vim/commit/438d0c5e58aa475179ade9a1b99013733c5b8f06
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jun 17 15:00:27 2023 +0100
patch 9.0.1638: crypt tests hang and cause memory errors
Problem: crypt tests hang and cause memory errors
Solution: Move variable to start of function.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 17 Jun 2023 16:15:04 +0200 |
parents | c0b3e3c7786c |
children | 448aef880252 |
rev | line source |
---|---|
10042
4aead6a9b7a9
commit https://github.com/vim/vim/commit/edf3f97ae2af024708ebb4ac614227327033ca47
Christian Brabandt <cb@256bit.org>
parents:
2109
diff
changeset
|
1 /* vi:set ts=8 sts=4 sw=4 noet: |
7 | 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 | |
32425
c0b3e3c7786c
patch 9.0.1544: recent glibc marks sigset() as a deprecated
Bram Moolenaar <Bram@vim.org>
parents:
19816
diff
changeset
|
13 // Sun's sys/ioctl.h redefines symbols from termio world |
10460
7fd589f46801
commit https://github.com/vim/vim/commit/a899e6ecc4523c7e411eaf6fbaa4197d70f6f39e
Christian Brabandt <cb@256bit.org>
parents:
10042
diff
changeset
|
14 #if defined(HAVE_SYS_IOCTL_H) && !defined(SUN_SYSTEM) |
7 | 15 # include <sys/ioctl.h> |
16 #endif | |
17 | |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
10914
diff
changeset
|
18 #ifndef USE_SYSTEM // use fork/exec to start the shell |
7 | 19 |
20 # if defined(HAVE_SYS_WAIT_H) || defined(HAVE_UNION_WAIT) | |
21 # include <sys/wait.h> | |
22 # endif | |
23 | |
24 # ifndef WEXITSTATUS | |
25 # ifdef HAVE_UNION_WAIT | |
26 # define WEXITSTATUS(stat_val) ((stat_val).w_T.w_Retcode) | |
27 # else | |
28 # define WEXITSTATUS(stat_val) (((stat_val) >> 8) & 0377) | |
29 # endif | |
30 # endif | |
31 | |
32 # ifndef WIFEXITED | |
33 # ifdef HAVE_UNION_WAIT | |
34 # define WIFEXITED(stat_val) ((stat_val).w_T.w_Termsig == 0) | |
35 # else | |
36 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) | |
37 # endif | |
38 # endif | |
39 | |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
10914
diff
changeset
|
40 #endif // !USE_SYSTEM |
7 | 41 |
42 #ifdef HAVE_STROPTS_H | |
19816
f37028184d6a
patch 8.2.0464: typos and other small problems
Bram Moolenaar <Bram@vim.org>
parents:
18753
diff
changeset
|
43 # ifdef sinix |
f37028184d6a
patch 8.2.0464: typos and other small problems
Bram Moolenaar <Bram@vim.org>
parents:
18753
diff
changeset
|
44 # define buf_T __system_buf_t__ |
f37028184d6a
patch 8.2.0464: typos and other small problems
Bram Moolenaar <Bram@vim.org>
parents:
18753
diff
changeset
|
45 # endif |
7 | 46 # include <stropts.h> |
19816
f37028184d6a
patch 8.2.0464: typos and other small problems
Bram Moolenaar <Bram@vim.org>
parents:
18753
diff
changeset
|
47 # ifdef sinix |
f37028184d6a
patch 8.2.0464: typos and other small problems
Bram Moolenaar <Bram@vim.org>
parents:
18753
diff
changeset
|
48 # undef buf_T |
f37028184d6a
patch 8.2.0464: typos and other small problems
Bram Moolenaar <Bram@vim.org>
parents:
18753
diff
changeset
|
49 # endif |
7 | 50 #endif |
51 | |
52 #ifdef HAVE_STRING_H | |
53 # include <string.h> | |
54 #endif | |
55 | |
56 #ifdef HAVE_SYS_STREAM_H | |
57 # include <sys/stream.h> | |
58 #endif | |
59 | |
60 #ifdef HAVE_SYS_UTSNAME_H | |
61 # include <sys/utsname.h> | |
62 #endif | |
63 | |
64 #ifdef HAVE_SYS_SYSTEMINFO_H | |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
10914
diff
changeset
|
65 // <sys/systeminfo.h> uses SYS_NMLN but it may not be defined (CrayT3E). |
11 | 66 # ifndef SYS_NMLN |
67 # define SYS_NMLN 32 | |
68 # endif | |
69 | |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
10914
diff
changeset
|
70 # include <sys/systeminfo.h> // for sysinfo |
7 | 71 #endif |
72 | |
73 /* | |
74 * We use termios.h if both termios.h and termio.h are available. | |
75 * Termios is supposed to be a superset of termio.h. Don't include them both, | |
76 * it may give problems on some systems (e.g. hpux). | |
77 * I don't understand why we don't want termios.h for apollo. | |
78 */ | |
79 #if defined(HAVE_TERMIOS_H) && !defined(apollo) | |
80 # include <termios.h> | |
81 #else | |
82 # ifdef HAVE_TERMIO_H | |
83 # include <termio.h> | |
84 # else | |
85 # ifdef HAVE_SGTTY_H | |
86 # include <sgtty.h> | |
87 # endif | |
88 # endif | |
89 #endif | |
90 | |
91 #ifdef HAVE_SYS_PTEM_H | |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
10914
diff
changeset
|
92 # include <sys/ptem.h> // must be after termios.h for Sinix |
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
10914
diff
changeset
|
93 # ifndef _IO_PTEM_H // For UnixWare that should check for _IO_PT_PTEM_H |
7 | 94 # define _IO_PTEM_H |
95 # endif | |
96 #endif | |
97 | |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
10914
diff
changeset
|
98 // shared library access |
7 | 99 #if defined(HAVE_DLFCN_H) && defined(USE_DLOPEN) |
10567
82c2c450dad0
patch 8.0.0173: build fails with EBCDIC defined
Christian Brabandt <cb@256bit.org>
parents:
10460
diff
changeset
|
100 # if defined(__MVS__) && !defined (__SUSV3) |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
10914
diff
changeset
|
101 // needed to define RTLD_LAZY (Anthony Giorgio) |
802 | 102 # define __SUSV3 |
103 # endif | |
7 | 104 # include <dlfcn.h> |
105 #else | |
106 # if defined(HAVE_DL_H) && defined(HAVE_SHL_LOAD) | |
107 # include <dl.h> | |
108 # endif | |
109 #endif |