Commit Graph

209 Commits

Author SHA1 Message Date
f46831f459 libc: Define PATH_MAX
This restriction is actually not enforced by the kernel. It should be.
2022-11-12 14:13:28 +01:00
5fa8569ff9 libc: Add creat() 2022-11-12 14:12:49 +01:00
a3896c2546 libc: Define MB_CUR_MAX 2022-11-12 13:24:04 +01:00
3f867b936e libc: Implement stpcpy
This function is unsafe so it is marked as deprecated, but if programs need it they can use it.
2022-11-12 13:20:28 +01:00
2ac98ed0c1 libc: Define wint_t in wchar.h 2022-11-09 16:29:33 +01:00
0bfe5e27ef libc: Add localeconv()
Always returns the default C locale values.
2022-11-09 11:38:14 +01:00
d3030d2111 libc: Stub out strtod() 2022-11-09 11:37:52 +01:00
da4c0d5184 libc: Stub out strtok() 2022-11-09 11:37:41 +01:00
f8f5968753 libc: Define EOVERFLOW and make every dummy errno value unique 2022-11-09 11:37:32 +01:00
1300b8f5ee libc: Add stubs for signal() and raise() 2022-11-09 11:37:08 +01:00
bbc7a7338c libc: Add fpclassify 2022-11-09 11:36:52 +01:00
59e03d0799 libc: Add DT_* macros to dirent.h 2022-11-09 11:36:41 +01:00
accf7ee417 libc: Add unimplemented st_nlink field 2022-11-09 11:36:21 +01:00
033c41cbd7 Kernel: Rework the uid/gid system to make it compliant 2022-11-09 09:54:07 +01:00
2230ebd969 Wrap math.h around builtins 2022-11-06 21:37:00 +01:00
472192bcf2 libc: Define LC_NUMERIC 2022-11-06 20:47:16 +01:00
78ee6ce34a libc: Stub out scanf() 2022-11-06 20:47:07 +01:00
c9e20fd38e Why are there so many errno values 2022-11-06 20:46:34 +01:00
2eeef9581f libc: Add strxfrm() 2022-11-06 19:56:36 +01:00
c6ce7a5358 libc: Add bsearch (with a test!!) 2022-11-06 17:34:35 +01:00
1025248cc7 libc: Add qsort (with a test!!) 2022-11-06 17:16:08 +01:00
04ae97a6ec libc: Add difftime() 2022-11-06 15:09:38 +01:00
da182f1c2f libc: Add mktemp() and mkdtemp(), along with a test for mktemp 2022-11-05 18:07:45 +01:00
2c08de044f Kernel, libc: Add support for querying the framebuffer's scanline via ioctl() 2022-11-03 20:20:22 +01:00
2cfefc25cc libc: Stub out rename() 2022-11-03 16:52:41 +01:00
249c79f8a3 Kernel, libc: Add ioctl()
Right now, only the framebuffer supports this system call, to query its dimensions.
2022-11-02 20:59:42 +01:00
feab66c0d3 Kernel: Remove the paint() system call
That was a very old one from back in the old days. Now that the framebuffer is finally a device file,
and it can be memory-mapped by user programs for more performance,
this syscall is MORE than obsolete.
2022-11-02 20:35:06 +01:00
dfcc827103 libc: Add PROT_EXEC 2022-11-02 18:40:05 +01:00
534500cda0 Implement enough runtime for binutils to compile 2022-10-31 12:29:53 +01:00
aabff7a1d3 libc: Add mktime() 2022-10-30 20:46:25 +01:00
f83c78bcad libc: Implement gettimeofday() and instantly mark it as deprecated 2022-10-30 20:40:05 +01:00
7bd1cba1e3 libc: Stub out bsearch() 2022-10-30 20:02:03 +01:00
52d4f34f05 Kernel, libc: Implement umask() 2022-10-30 19:55:38 +01:00
0d443385e9 libc: Add system() 2022-10-30 19:43:37 +01:00
e244c150c2 Kernel, libc: Add ECHILD 2022-10-30 19:24:26 +01:00
d186d573dd libc: Document strftime in time.h 2022-10-30 17:48:54 +01:00
e640c6e245 Kernel, libc, userspace: Add file timestamps (atime,ctime,mtime) 2022-10-30 09:57:17 +01:00
324fb42ee2 libc: Add support for the new time functionality in the kernel 2022-10-30 09:08:29 +01:00
32e09d3417 libc: Stub out more functionality so part of binutils builds 2022-10-29 09:39:12 +02:00
7d0e442cde libc: Add /etc/passwd and the pwd.h API
getpwent, getpwnam, getpwuid... they may have been a pain to implement but once they work they're awesome :)

Right now passwords are stored in plaintext in the world-readable passwd file, which is not good.
But I don't have any sort of hashing implemented so it'll stay that way for now.
2022-10-28 20:55:00 +02:00
8f0e358360 libc: Add setuid, setgid, seteuid, setegid 2022-10-28 17:52:39 +02:00
09a615bd99 Kernel, libc: Expose processes' UID and GID in pstat() 2022-10-28 17:31:34 +02:00
17671fd435 libc: Implement getuid, geteuid, getgid, getegid 2022-10-28 17:24:28 +02:00
1c4f1ab867 Kernel, libc: Add setuid() and setgid() system calls 2022-10-28 17:19:26 +02:00
c312d81de4 Kernel, libc: Add st_uid and st_gid to stat, and handle st_mode differently 2022-10-28 17:13:20 +02:00
16dc227a05 Kernel: Add UID and GID fields to Task 2022-10-28 17:06:13 +02:00
d93a4062a2 libc: Do not use the heavy variadic syscall() function for wrappers
That function is meant more for user programs, and should still be rarely used, since it's not portable.
Instead, we already know the number of arguments. We just call __lc_fast_syscallN, which also sets errno.
2022-10-27 17:42:00 +02:00
0eb0ca4028 libc: Add an empty locale.h 2022-10-27 17:23:59 +02:00
7155cf8d6b libc: Add alloca.h 2022-10-27 17:23:50 +02:00
703b0a1435 libc: Make tv_usec in timeval signed, as it should be 2022-10-27 17:20:46 +02:00