Age | Commit message (Collapse) | Author |
|
header
GCC installs a fixed version of the <limits.h> header as per https://gcc.gnu.org/onlinedocs/gcc/Fixed-Headers.html.
The fixed header doesn't include the target's <limits.h> which in turn means that some definitions (such as PATH_MAX)
aren't available. This change requires rebuilding the toolchain (Toolchain/BuildIt.sh).
This fixes the flatbuffers port.
The commit also removes some non-standard defines (U*_MIN) which don't appear to be used
anywhere. By definition they're always 0 though so they're not strictly necessary.
|
|
These are required for the 'tr' port.
|
|
According to the Single UNIX Specification, Version 2 the <arpa/inet.h>
header may optionally include <netinet/in.h> and <inttypes.h>. This
helps with porting software like c-ray that expects this to be the case.
|
|
This commit makes the user-facing StdLibExtras templates and utilities
arguably more nice-looking by removing the need to reach into the
wrapper structs generated by them to get the value/type needed.
The C++ standard library had to invent `_v` and `_t` variants (likely
because of backwards compat), but we don't need to cater to any codebase
except our own, so might as well have good things for free. :^)
|
|
I dont know why we do a fast path in the Kernel, but not in Userspace
Also simplified the byte explosion in memset to "explode_byte"
it even seemed so, that we missed the highest byte when memseting something
|
|
|
|
They are the same as strtol() and strtoul() but if there is
overflow/underflow then the maximum integer val/lower integer
val/maximum uint val will be returned while also setting errno to
ERANGE.
|
|
Previously, `vsscanf()` would crash whenever it encountered a width
specification. Now, it consumes the width specification but does not
yet do anything with it.
|
|
These are not POSIX-defined but are almost always present in <netdb.h>.
|
|
...for 'long long' and 'unsigned long long', instead of reading them as
'long's and 'unsigned long's.
Also add a test for values that can only fit in (unsigned) long long.
Fixes #6096.
|
|
This was a regression from the 64-bit off_t changes.
When dropping buffered data after a flush, we would subtract the
buffered amount from zero to get the seek offset. This didn't work
right since the subtraction was done with a 32-bit size_t and we
ended up with e.g (i64)0xfffffffc as the offset.
Fixes #6003.
|
|
This will be useful for traceroute and any other packet related
application, so this will reduce code duplication.
|
|
Added a dummy TIOCSTI ioctl placeholder. This is a dangerous ioctl that
can be used to inject input into a tty. Added for compatibility. Always
fails with EIO.
|
|
|
|
This guards as from recursing into an atexit callback if exit() is called
from within it.
|
|
These simply use StringBuilder::appendvf() internally which is not
optimal in terms of heap allocations, but simple enough and I don't
think they are performance sensitive functions anyway.
|
|
This is another (older) way of making a file descriptor non-blocking.
|
|
I don't know if we should implement optimized vfork(). I'm adding it
here since SDL2 uses it.
|
|
|
|
|
|
|
|
These map as follows:
S_IREAD -> S_IRUSR
S_IWRITE -> S_IWUSR
S_IEXEC -> S_IXUSR
|
|
|
|
Previously, libc.a contained undefined symbols from ssp and libsystem,
which caused static compilation to fail.
We now generate libc.a with a custom CMake rule that combines all
object files from libc, ssp and libsystem to form libc.a
Closes #5758.
|
|
|
|
Unbreaks the hatari port.
|
|
This will also help with making ports compile again :D
https://github.com/SerenityOS/serenity/pull/5762#issuecomment-798779561
|
|
Good-bye LogStream. Long live AK::Format!
|
|
Userland has no reason to access 'kmalloc'.
|
|
Get rid of the awkward secret handshake sequence between malloc and UE
and simply use sys$emuctl() to notify UE of malloc, free and realloc.
|
|
Since UE is keeping track of the heap anyway, we can skip the scrubbing
and drastically improve the speed of malloc and free when emulating.
|
|
This doesn't define FLT_EVAL_METHOD as I'm not sure what I should actually use for that
|
|
|
|
|
|
|
|
`FE_TOWARDSZERO` is actually spelled `FE_TOWARDZERO` (without the 'S')
|
|
Mostly due to the fact that clang-format allows aligned comments via
AlignTrailingComments.
We could also use raw string literals in inline asm, which clang-format
deals with properly (and would be nicer in a lot of places).
|
|
|
|
This allows the parser to deal with crazy patterns like the one
in #5517.
|
|
It won't actually work on 64-bit yet, but let's do our future selves
a favor and make it compile.
|
|
|
|
calloc() was internally calling malloc_impl() which would scrub out
all the allocated memory with the scrub byte (0xdc). We would then
immediately zero-fill the memory.
This was obviously a waste of time, and our hash tables were doing
it all the time. :^)
|
|
Instead of having a special case in the dynamic loader where we ignore
TM-related GCC symbols, just stub them out in LibC like we already do
for various other things we don't support.
|
|
|
|
(...and ASSERT_NOT_REACHED => VERIFY_NOT_REACHED)
Since all of these checks are done in release builds as well,
let's rename them to VERIFY to prevent confusion, as everyone is
used to assertions being compiled out in release.
We can introduce a new ASSERT macro that is specifically for debug
checks, but I'm doing this wholesale conversion first since we've
accumulated thousands of these already, and it's not immediately
obvious which ones are suitable for ASSERT.
|
|
That would force anything that includes this to have language-specific
linkage, and absolutely break `sys/cdefs.h`.
Fixes #5452.
|
|
Everything has been moved to dbgln() or other AK::Format-based APIs.
We can finally get rid of this old thing.
|
|
|
|
This makes it work when compiling as C.
|
|
|