summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/sys/stat.h4
-rw-r--r--userland/libc/include/dirent.h7
2 files changed, 4 insertions, 7 deletions
diff --git a/include/sys/stat.h b/include/sys/stat.h
index 8fc5f25..cf4a805 100644
--- a/include/sys/stat.h
+++ b/include/sys/stat.h
@@ -3,8 +3,8 @@
#include <sys/types.h>
#include <time.h>
-#define STAT_REG 0
-#define STAT_DIR 1
+#define STAT_REG (1 << 0)
+#define STAT_DIR (1 << 1)
struct stat {
dev_t st_dev; // Device ID of device containing file.
diff --git a/userland/libc/include/dirent.h b/userland/libc/include/dirent.h
index eda2b04..9f25cbf 100644
--- a/userland/libc/include/dirent.h
+++ b/userland/libc/include/dirent.h
@@ -7,11 +7,8 @@
#include <sys/types.h>
#include <unistd.h>
-#define STAT_REG 0
-#define STAT_DIR 1
-
-#define S_ISREG(_m) (_m & (1 << STAT_REG))
-#define S_ISDIR(_m) (_m & (1 << STAT_DIR))
+#define S_ISREG(_m) (_m & (STAT_REG))
+#define S_ISDIR(_m) (_m & (STAT_DIR))
struct dirent {
ino_t d_ino; // File serial number.