OSDN Git Service

Fix out-of-tree clang build due to sysexits change
[android-x86/external-llvm-project.git] / llvm / include / llvm / Support / ExitCodes.h
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/llvm-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