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.
This commit is contained in:
Jan Nieuwenhuizen 2019-07-09 11:53:16 +02:00
parent 860f5ce7d5
commit 203ef4944b
No known key found for this signature in database
GPG key ID: F3C1A0D9C1D65273
2 changed files with 5 additions and 1 deletions

View file

@ -38,6 +38,7 @@ int errno;
#define ENOENT 2 #define ENOENT 2
#define EINTR 4 #define EINTR 4
#define EIO 5 #define EIO 5
#define ENXIO 6
#define E2BIG 7 #define E2BIG 7
#define ENOEXEC 8 #define ENOEXEC 8
#define EBADF 9 #define EBADF 9
@ -46,6 +47,7 @@ int errno;
#define ENOMEM 12 #define ENOMEM 12
#define EACCES 13 #define EACCES 13
#define EEXIST 17 #define EEXIST 17
#define EXDEV 18
#define ENOTDIR 20 #define ENOTDIR 20
#define EISDIR 21 #define EISDIR 21
#define EINVAL 22 #define EINVAL 22

View file

@ -89,6 +89,7 @@ int chown (char const *file_name, uid_t owner, gid_t group);
int rmdir (char const *file_name); int rmdir (char const *file_name);
int stat (char const *file_name, struct stat *buf); int stat (char const *file_name, struct stat *buf);
#define S_IFIFO 0010000
#define S_IFCHR 0020000 #define S_IFCHR 0020000
#define S_IFDIR 0040000 #define S_IFDIR 0040000
#define S_IFBLK 0060000 #define S_IFBLK 0060000
@ -96,6 +97,7 @@ int stat (char const *file_name, struct stat *buf);
#define S_IFLNK 0120000 #define S_IFLNK 0120000
#define S_IFMT 0170000 #define S_IFMT 0170000
#define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) #define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) #define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)