Fix user headers (time_t)

This commit is contained in:
Mark
2020-08-09 15:32:08 +03:00
parent 44a3dc21b4
commit 66bb54d8cd
3 changed files with 24 additions and 15 deletions
+3
View File
@@ -38,10 +38,13 @@
#define ENOSYS 38
#define ELOOP 40
#define EOVERFLOW 75
#define EADDRINUSE 98
#define ECONNRESET 104
#define ECONNREFUSED 111
#define ENOTSUP 9926
#if defined(__KERNEL__)
const char *kstrerror(int e);
#endif
+16 -12
View File
@@ -18,23 +18,27 @@
// execution
#define O_EXEC (1 << 2)
#define O_ACCMODE 00000003
#define O_RDONLY 00000000
#define O_WRONLY 00000001
#define O_RDWR 00000002
#define O_CREAT 00000100
// #define O_EXCL 00000200
#define O_ACCMODE (3 << 0)
#define O_RDONLY (0 << 0)
#define O_WRONLY (1 << 0)
#define O_RDWR (2 << 0)
#define O_CREAT (1 << 6)
#define O_EXCL (1 << 7)
#define O_TRUNC (1 << 9)
#define O_APPEND (1 << 10)
#define O_DIRECTORY (1 << 16)
#define O_CLOEXEC (1 << 19)
// #define O_NOCTTY 00000400
#define O_TRUNC 00001000
#define O_APPEND 00002000
// #define O_NONBLOCK 00004000
// #define O_DSYNC 00010000
// #define FASYNC 00020000
// #define O_DIRECT 00040000
// #define O_LARGEFILE 00100000
//#define O_DIRECTORY 00200000
#define O_DIRECTORY 0x200000
// #define O_NOFOLLOW 00400000
// #define O_NOATIME 01000000
// #define O_CLOEXEC 02000000
#define O_CLOEXEC (1 << 19)
#define FD_CLOEXEC (1 << 0)
// fcntl() commands
#define F_GETFD 1
#define F_SETFD 2
+5 -3
View File
@@ -5,8 +5,10 @@
#pragma once
#if defined(__KERNEL__)
#include "sys/types.h"
#include "user/time.h"
#else
#include <ygg/types.h>
#include <ygg/time.h>
#endif
#define S_IFMT 0170000
@@ -56,7 +58,7 @@ struct stat {
uint32_t st_size;
uint32_t st_blksize;
uint32_t st_blocks;
uint32_t st_atime;
uint32_t st_mtime;
uint32_t st_ctime;
time_t st_atime;
time_t st_mtime;
time_t st_ctime;
};