From 203ef4944bf3547a6adf5873f73b2634ec06213b Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Tue, 9 Jul 2019 11:53:16 +0200 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 8b640e99..7ac1ebe9 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 23e10775..6db24496 100644 --- a/include/sys/stat.h +++ b/include/sys/stat.h @@ -89,6 +89,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 @@ -96,6 +97,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)