forked from bminor/bash
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig-bot.hh
144 lines (111 loc) · 4.27 KB
/
config-bot.hh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
/* config-bot.h */
/* modify settings or make new ones based on what autoconf tells us. */
/* Copyright (C) 1989-2021 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
Bash is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Bash is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Bash. If not, see <http://www.gnu.org/licenses/>.
*/
/*********************************************************/
/* Modify or set defines based on the configure results. */
/*********************************************************/
#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wmacro-redefined"
#endif
#if defined(HAVE_SYS_RESOURCE_H) && defined(HAVE_GETRLIMIT)
#define HAVE_RESOURCE
#endif
#define PREFER_STDARG
#define USE_VARARGS
#if defined(HAVE_SYS_SOCKET_H) && defined(HAVE_GETPEERNAME) \
&& defined(HAVE_NETINET_IN_H)
#define HAVE_NETWORK
#endif
#if defined(HAVE_REGEX_H) && defined(HAVE_REGCOMP) && defined(HAVE_REGEXEC)
#define HAVE_POSIX_REGEXP
#endif
/***********************************************************************/
/* Unset defines based on what configure reports as missing or broken. */
/***********************************************************************/
#if !defined(HAVE_DEV_FD) && defined(NAMED_PIPES_MISSING)
#undef PROCESS_SUBSTITUTION
#endif
#if defined(JOB_CONTROL_MISSING)
#undef JOB_CONTROL
#endif
#if !defined(HAVE_POSIX_REGEXP)
#undef COND_REGEXP
#endif
#if !defined(HAVE_MKSTEMP)
#undef USE_MKSTEMP
#endif
#if !defined(HAVE_MKDTEMP)
#undef USE_MKDTMP
#endif
/* If the shell is called by this name, it will become restricted. */
#if defined(RESTRICTED_SHELL)
#define RESTRICTED_SHELL_NAME "rbash"
#endif
/***********************************************************/
/* Make sure feature defines have necessary prerequisites. */
/***********************************************************/
/* BANG_HISTORY requires HISTORY. */
#if defined(BANG_HISTORY) && !defined(HISTORY)
#define HISTORY
#endif /* BANG_HISTORY && !HISTORY */
#if defined(READLINE) && !defined(HISTORY)
#define HISTORY
#endif
#if defined(PROGRAMMABLE_COMPLETION) && !defined(READLINE)
#undef PROGRAMMABLE_COMPLETION
#endif
#if !defined(V9_ECHO)
#undef DEFAULT_ECHO_TO_XPG
#endif
#if !defined(PROMPT_STRING_DECODE)
#undef PPROMPT
#define PPROMPT "$ "
#endif
#if !defined(HAVE_SYSLOG) || !defined(HAVE_SYSLOG_H)
#undef SYSLOG_HISTORY
#endif
#if !defined(PREFER_POSIX_SPAWN) && !defined(HAVE_FORK)
#define PREFER_POSIX_SPAWN
#elif defined(PREFER_POSIX_SPAWN) && !defined(HAVE_VFORK) \
&& (!defined(POSIX_SPAWN) || !defined(POSIX_SPAWNATTR_INIT) \
|| !defined(POSIX_SPAWN_FILE_ACTIONS_INIT))
#undef PREFER_POSIX_SPAWN
#endif
/************************************************/
/* check multibyte capability for I18N code */
/************************************************/
/* For platforms which support the ISO C amendment 1 functionality we
support user defined character classes. */
#include <cwchar>
#include <cwctype>
/* If we don't want multibyte chars even on a system that supports them, let
the configuring user turn multibyte support off. */
#if defined(NO_MULTIBYTE_SUPPORT)
#undef HANDLE_MULTIBYTE
#endif
/************************************************/
/* end of multibyte capability checks for I18N */
/************************************************/
/******************************************************************/
/* Placeholder for builders to #undef any unwanted features from */
/* config-top.h or created by configure (such as the default mail */
/* file for mail checking). */
/******************************************************************/
/* If you don't want bash to provide a default mail file to check. */
/* #undef DEFAULT_MAIL_DIRECTORY */
#if defined(__clang__)
#pragma clang diagnostic pop
#endif