From 061430973e82995368d27ff9081391f9475da3c7 Mon Sep 17 00:00:00 2001 From: James McKenzie Date: Mon, 3 Aug 2015 10:34:07 +0100 Subject: fish --- host/project.h | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 host/project.h (limited to 'host/project.h') diff --git a/host/project.h b/host/project.h new file mode 100644 index 0000000..2302570 --- /dev/null +++ b/host/project.h @@ -0,0 +1,38 @@ +#include +#include +#include +#include +#include +#include +#include + +#ifdef HAVE_ERR +# include +#else +# include +# include +# define warnx(...) do {\ + fprintf(stderr, __VA_ARGS__);\ + fprintf(stderr, "\n"); } while (0) +# define errx(eval, ...) do {\ + warnx(__VA_ARGS__);\ + exit(eval); } while (0) +# define warn(...) do {\ + fprintf(stderr, "%s: ", strerror(errno));\ + warnx(__VA_ARGS__); } while (0) +# define err(eval, ...) do {\ + warn(__VA_ARGS__);\ + exit(eval); } while (0) +#endif /* HAVE_ERR */ + + +#ifdef HAVE_SYSEXITS_H +# include +#else +# define EX_OK 0 /* successful termination */ +# define EX_USAGE 64 /* command line usage error */ +# define EX_SOFTWARE 70 /* internal software error */ +# define EX_IOERR 74 /* input/output error */ +#endif /* HAVE_SYSEXITS_H */ + + -- cgit v1.2.3