summaryrefslogtreecommitdiff
path: root/include/stdlib.h
diff options
context:
space:
mode:
authorKacper <kacper@mail.openlinux.dev>2025-12-07 22:22:16 +0100
committerKacper <kacper@mail.openlinux.dev>2025-12-07 22:22:16 +0100
commit8f9e448b2ef6db7cd905540c21f3c5b190e7a1e7 (patch)
treeae0285dd15042d1e9236a5ce2e60daf65acbdca0 /include/stdlib.h
parentfc00c656c96528112d05cf0edf8631bd5eaea446 (diff)
Add bin/true and bin/false implementations
- Added assembly implementations for `true` and `false` commands. - Updated Kbuild files to include new binaries. - Removed unused libraries and headers. - Cleaned up makefile and unused code.
Diffstat (limited to 'include/stdlib.h')
-rw-r--r--include/stdlib.h23
1 files changed, 9 insertions, 14 deletions
diff --git a/include/stdlib.h b/include/stdlib.h
index 4f9c1eb8..a9480d38 100644
--- a/include/stdlib.h
+++ b/include/stdlib.h
@@ -1,5 +1,11 @@
-#ifndef __STDLIB_H__
-#define __STDLIB_H__
+#ifndef __STDLIB_H
+#define __STDLIB_H
+
+#define __BITS_WAIT_H_
+#include <bits/wait.h>
+
+#define __BITS_ERRNO_H_
+#include <bits/errno.h>
#ifndef NULL
#define NULL ((void *)0)
@@ -8,18 +14,7 @@
#define EXIT_FAILURE 1
#define EXIT_SUCCESS 0
-#define WNOHANG 1
-#define WUNTRACED 2
-
-#define WEXITSTATUS(s) (((s) & 0xff00) >> 8)
-#define WTERMSIG(s) ((s) & 0x7f)
-#define WSTOPSIG(s) WEXITSTATUS(s)
-#define WIFEXITED(s) (!WTERMSIG(s))
-#define WIFSTOPPED(s) ((short)((((s) & 0xffff) * 0x10001U) >> 8) > 0x7f00)
-#define WIFSIGNALED(s) (((s) & 0xffff) - 1U < 0xffu)
-
-int ___mb_cur_max(void);
-#define MB_CUR_MAX (___mb_cur_max())
+#define MB_CUR_MAX 1
#define RAND_MAX (0x7fffffff)