From 9033e03bbf51af501128de030197f3bf32698e3f Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Sat, 5 Jan 2019 10:53:16 +0100 Subject: [PATCH] mescc: Mes C Library: Support GNU Tar: Add missing defines. * include/errno.h (ENXIO): New macro. * include/sys/stat.h (S_IFIFO, S_ISFIFO): New macro. --- include/errno.h | 4 +++- include/sys/stat.h | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/include/errno.h b/include/errno.h index 63257384..697114da 100644 --- a/include/errno.h +++ b/include/errno.h @@ -38,14 +38,16 @@ int errno; #define ENOENT 2 #define EINTR 4 #define EIO 5 +#define ENXIO 6 #define E2BIG 7 -#define ENOEXEC 8 +#define ENOEXEC 8 #define EBADF 9 #define ECHILD 10 #define EAGAIN 11 #define ENOMEM 12 #define EACCES 13 #define EEXIST 17 +#define EXDEV 18 #define ENOTDIR 20 #define EISDIR 21 #define EINVAL 22 diff --git a/include/sys/stat.h b/include/sys/stat.h index aab69a9a..484cc992 100644 --- a/include/sys/stat.h +++ b/include/sys/stat.h @@ -86,6 +86,7 @@ int chown (char const *file_name, uid_t owner, gid_t group); int rmdir (char const *file_name); int stat (char const *file_name, struct stat *buf); +#define S_IFIFO 0010000 #define S_IFCHR 0020000 #define S_IFDIR 0040000 #define S_IFBLK 0060000 @@ -93,6 +94,7 @@ int stat (char const *file_name, struct stat *buf); #define S_IFLNK 0120000 #define S_IFMT 0170000 +#define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO) #define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) #define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)