Commit graph

79 commits

Author SHA1 Message Date
Jonas 'Sortie' Termansen
40fd0fa3dc Fix the environment functions not rejecting the empty name.
Found by musl's libc-test.
2014-08-23 21:47:04 +02:00
Jonas 'Sortie' Termansen
0adfceef87 Fix strtol("0xz", &s, 16) handling.
Found by musl's libc-test.
2014-08-23 21:47:04 +02:00
Jonas 'Sortie' Termansen
a8b8514272 Fix clearenv(3) leaving internal pointer alive after free.
This causes use-after-free and double-free bugs when other environment
functions are subsequently called.
2014-08-23 21:04:39 +02:00
Jonas 'Sortie' Termansen
5f9da2a651 Fix format string problems in error(3) calls. 2014-08-23 21:04:39 +02:00
Jonas 'Sortie' Termansen
30cd318c17 Implement signals.
Note: This is an incompatible ABI change.
2014-07-22 13:25:39 +02:00
Jonas 'Sortie' Termansen
a1ccba00f7 Thread-secure rand(3). 2014-07-08 17:41:52 +02:00
Jonas 'Sortie' Termansen
e1db06c1c9 Thread-secure exit(3). 2014-07-08 17:41:52 +02:00
Jonas 'Sortie' Termansen
a96aca09c1 Thread-secure user-space heap. 2014-07-08 17:41:52 +02:00
Jonas 'Sortie' Termansen
534eb3ddd8 Fix libk being built with -mmmx, -msse and -msse2 on x86_64. 2014-05-28 17:42:19 +02:00
Jonas 'Sortie' Termansen
73cea916d9 Fix suboptimal heap chunk spliting. 2014-05-16 14:48:27 +02:00
Jonas 'Sortie' Termansen
01b8acbc90 Fix calloc not erroring on multiplication overflow. 2014-04-24 00:03:51 +02:00
Jonas 'Sortie' Termansen
2161a0e0e3 Fix canonicalize_file_name_at(3) not handling file paths correctly. 2014-03-31 19:08:57 +02:00
Jonas 'Sortie' Termansen
e91cde379a Rewrite getenv(3), setenv(3), unsetenv(3) and clearenv(3). 2014-03-17 19:22:11 +01:00
Jonas 'Sortie' Termansen
1b3f4b36d8 Fix strtol(3) handling negative numbers incorrectly. 2014-03-17 17:00:00 +01:00
Jonas 'Sortie' Termansen
df666103b3 Update libc/stdlib/rand.cpp to current coding conventions. 2014-03-01 14:37:41 +01:00
Jonas 'Sortie' Termansen
bfc8570bb8 Fix libc function implementations without extern "C" linkage. 2014-01-18 16:30:56 +01:00
Jonas 'Sortie' Termansen
a4220d5b5f Fix incorrect usage of __is_sortix_foo macros in preprocessor conditionals.
These macros might not be defined, in which case this usage would have
generated warnings had they not been in system headers.
2014-01-18 16:30:55 +01:00
Jonas 'Sortie' Termansen
2302350d78 Remove <sortix/kernel/platform.h>. 2013-12-17 14:30:45 +01:00
Jonas 'Sortie' Termansen
9d4bc2a15f Grow kernel heap upwards.
Previously the kernel heap grew downwards for historical reasons. There is no
reason for this and it simplifies the heap implementation if it only grows
upwards. This also rearranges how the kernel virtual memory is allocated to
suit an upwards-growing heap.
2013-12-17 14:30:45 +01:00
Jonas 'Sortie' Termansen
b9e463965b Split libc/stdlib/on_exit.cpp into multiple files. 2013-12-17 14:30:45 +01:00
Jonas 'Sortie' Termansen
8018a85a30 Fix wrong base parsing in strtol(3). 2013-12-17 14:30:45 +01:00
Jonas 'Sortie' Termansen
ad84bc75c8 Change kernel internal build macro to __is_sortix_kernel. 2013-12-17 14:30:42 +01:00
Jonas 'Sortie' Termansen
fd4b35f986 Add mkstemp(3). 2013-12-17 14:30:42 +01:00
Jonas 'Sortie' Termansen
070a319006 Split stdlib/abs.cpp into multiple files. 2013-12-17 14:30:40 +01:00
Jonas 'Sortie' Termansen
8d674a43e1 Add wcsto{l,ll,ul,ull,imax,umax}(3). 2013-12-17 14:30:40 +01:00
Jonas 'Sortie' Termansen
5a127a429c Add overflow support to strtol and clean up the code. 2013-12-17 14:30:40 +01:00
Jonas 'Sortie' Termansen
1df749498a Refactor strtol functions. 2013-12-17 14:30:40 +01:00
Jonas 'Sortie' Termansen
cdc5a9673e Add strtoimax(3) and strtoumax(3). 2013-12-17 14:30:40 +01:00
Jonas 'Sortie' Termansen
18356edb69 Move stdlib.h functions into their own directory. 2013-12-17 14:30:37 +01:00