File tree Expand file tree Collapse file tree 6 files changed +40
-5
lines changed Expand file tree Collapse file tree 6 files changed +40
-5
lines changed Original file line number Diff line number Diff line change 71
71
#include " llvm/Option/Option.h"
72
72
#include " llvm/Support/CommandLine.h"
73
73
#include " llvm/Support/ErrorHandling.h"
74
+ #include " llvm/Support/ExitCodes.h"
74
75
#include " llvm/Support/FileSystem.h"
75
76
#include " llvm/Support/FormatVariadic.h"
76
77
#include " llvm/Support/Host.h"
87
88
#include < utility>
88
89
#if LLVM_ON_UNIX
89
90
#include < unistd.h> // getpid
90
- #include < sysexits.h> // EX_IOERR
91
91
#endif
92
92
93
93
using namespace clang ::driver;
Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ check_include_file(sys/resource.h HAVE_SYS_RESOURCE_H)
54
54
check_include_file (sys/stat.h HAVE_SYS_STAT_H )
55
55
check_include_file (sys/time.h HAVE_SYS_TIME_H )
56
56
check_include_file (sys/types.h HAVE_SYS_TYPES_H )
57
+ check_include_file (sysexits.h HAVE_SYSEXITS_H )
57
58
check_include_file (termios.h HAVE_TERMIOS_H )
58
59
check_include_file (unistd.h HAVE_UNISTD_H )
59
60
check_include_file (valgrind/valgrind.h HAVE_VALGRIND_VALGRIND_H )
Original file line number Diff line number Diff line change 208
208
/* Define to 1 if you have the <sys/types.h> header file . */
209
209
#cmakedefine HAVE_SYS_TYPES_H ${HAVE_SYS_TYPES_H}
210
210
211
+ /* Define to 1 if you have the <sysexits.h> header file . */
212
+ #cmakedefine HAVE_SYSEXITS_H ${HAVE_SYSEXITS_H}
213
+
211
214
/* Define if the setupterm () function is supported this platform. */
212
215
#cmakedefine LLVM_ENABLE_TERMINFO ${LLVM_ENABLE_TERMINFO}
213
216
Original file line number Diff line number Diff line change
1
+ // ===-- llvm/Support/ExitCodes.h - Exit codes for exit() -------*- C++ -*-===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ //
7
+ // ===----------------------------------------------------------------------===//
8
+ // /
9
+ // / \file
10
+ // / This file contains definitions of exit codes for exit() function. They are
11
+ // / either defined by sysexits.h if it is supported, or defined here if
12
+ // / sysexits.h is not supported.
13
+ // /
14
+ // ===----------------------------------------------------------------------===//
15
+
16
+ #ifndef LLVM_SUPPORT_EXITCODES_H
17
+ #define LLVM_SUPPORT_EXITCODES_H
18
+
19
+ #include " llvm/Config/config.h"
20
+
21
+ #if HAVE_SYSEXITS_H
22
+ #include < sysexits.h>
23
+ #elif __MVS__
24
+ // <sysexits.h> does not exist on z/OS. The only value used in LLVM is
25
+ // EX_IOERR, which is used to signal a special error condition (broken pipe).
26
+ // Define the macro with its usual value from BSD systems, which is chosen to
27
+ // not clash with more standard exit codes like 1.
28
+ #define EX_IOERR 74
29
+ #elif LLVM_ON_UNIX
30
+ #error Exit code EX_IOERR not available
31
+ #endif
32
+
33
+ #endif
Original file line number Diff line number Diff line change 9
9
#include " llvm/Support/CrashRecoveryContext.h"
10
10
#include " llvm/Config/llvm-config.h"
11
11
#include " llvm/Support/ErrorHandling.h"
12
+ #include " llvm/Support/ExitCodes.h"
12
13
#include " llvm/Support/ManagedStatic.h"
13
14
#include " llvm/Support/Signals.h"
14
15
#include " llvm/Support/ThreadLocal.h"
15
16
#include < mutex>
16
17
#include < setjmp.h>
17
- #if LLVM_ON_UNIX
18
- #include < sysexits.h> // EX_IOERR
19
- #endif
20
18
21
19
using namespace llvm ;
22
20
Original file line number Diff line number Diff line change 36
36
#include " llvm/ADT/STLExtras.h"
37
37
#include " llvm/Config/config.h"
38
38
#include " llvm/Demangle/Demangle.h"
39
+ #include " llvm/Support/ExitCodes.h"
39
40
#include " llvm/Support/FileSystem.h"
40
41
#include " llvm/Support/FileUtilities.h"
41
42
#include " llvm/Support/Format.h"
46
47
#include " llvm/Support/raw_ostream.h"
47
48
#include < algorithm>
48
49
#include < string>
49
- #include < sysexits.h>
50
50
#ifdef HAVE_BACKTRACE
51
51
# include BACKTRACE_HEADER // For backtrace().
52
52
#endif
You can’t perform that action at this time.
0 commit comments