harakit/include/sysexits.h

39 lines
1.4 KiB
C
Raw Permalink Normal View History

/*
* Copyright (c) 2023 DTB <trinity@trinity.moe>
* Copyright (c) 2023 Emma Tebibyte <emma@tebibyte.media>
* SPDX-License-Identifier: CC0
*
* This work is marked with CC0 1.0. To view a copy of this license, visit
* <http://creativecommons.org/publicdomain/zero/1.0>.
*/
#ifndef _SYSEXITS_H
#define _SYSEXITS_H 2
#ifndef EXIT_FAILURE
#include <stdlib.h>
#endif
#define EX_OK EXIT_SUCCESS
#define EX__BASE EXIT_FAILURE /* base value for error messages */
#define EX_USAGE EXIT_FAILURE /* command line usage error */
#define EX_DATAERR EXIT_FAILURE /* data format error */
#define EX_NOINPUT EXIT_FAILURE /* cannot open input */
#define EX_NOUSER EXIT_FAILURE /* addressee unknown */
#define EX_NOHOST EXIT_FAILURE /* host name unknown */
#define EX_UNAVAILABLE EXIT_FAILURE /* service unavailable */
#define EX_SOFTWARE EXIT_FAILURE /* internal software error */
#define EX_OSERR EXIT_FAILURE /* system error (e.g., can't fork) */
#define EX_OSFILE EXIT_FAILURE /* critical OS file missing */
#define EX_CANTCREAT EXIT_FAILURE /* can't create (user) output file */
#define EX_IOERR EXIT_FAILURE /* input/output error */
#define EX_TEMPFAIL EXIT_FAILURE /* temp failure; user is invited to retry */
#define EX_PROTOCOL EXIT_FAILURE /* remote error in protocol */
#define EX_NOPERM EXIT_FAILURE /* permission denied */
#define EX_CONFIG EXIT_FAILURE /* configuration error */
#define EX__MAX EXIT_FAILURE /* maximum listed value */
#endif