Age | Commit message (Collapse) | Author |
|
|
|
Some ports require this constant to be defined as it is specified in
the standard[1].
[1] https://www.cplusplus.com/reference/climits/
|
|
With these changes, the userland builds correctly with Clang's ThinLTO
enabled.
|
|
The `wcsxfrm` function copies a wide character string into a buffer,
such that comparing the new string against any similarly pre-processed
string with `wcscmp` produces the same result as if the original strings
were compared with `wcscoll`.
Our current `wcscoll` implementation is simply an alias for `wcscmp`, so
`wcsxfrm` needs to perform no actions other than copying the string.
|
|
|
|
This is how the standard specifies it; similarly to the already
correctly declared wcschr function.
|
|
|
|
|
|
|
|
The ELAST macro is used on many systems to refer to the largest possible
valid errno value. LLVM's libc++ uses errno values of ELAST+1 and
ELAST+2 internally, and defines an arbitrary fallback value for
platforms which don't have the macro. This means that it's possible for
their internal errno numbers could coincide with values we actually use,
which would be a very bad thing.
|
|
The C standard specifies that this forward-declaration be present in
wchar.h, and is needed in order to build libstdc++.
|
|
|
|
|
|
|
|
|
|
|
|
This function converts a single wide character into its multibyte
representation (UTF-8 in our case). It is called from libc++'s
`std::basic_ostream<wchar_t>::flush`, which gets called at program exit
from a global destructor in order to flush `std::wcout`.
|
|
|
|
|
|
|
|
|
|
Otherwise, we may end up preferring those over the more accurate
implementation in ncurses (if available).
|
|
This new implementation of pread saves two lseek system calls and is
thread-safe thanks to it simply forwarding the call to the pread system
call.
|
|
|
|
This ioctl request makes it possible to get the size of a storage device
that has not yet been mounted.
|
|
In QtCreator (and under weird configurations with gcc), this used to
fail with the error messages like: "error: member of anonymous union
redeclares '___'".
This patch gives each member a unique name.
|
|
|
|
|
|
|
|
|
|
This is probably a bit faster than constantly having to look through all
stored bytes. It also helps when we are trying to store actual null
bytes.
|
|
A zero-initialized mbstate_t struct has to be a valid initial state, so
we can just zero-initialize it whenever we need to reset.
Having a helper function for resetting the struct might imply that you
can add additional setup operations afterwards, which is not the case.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
These are found in some libraries, and LibELF doesn't know how to handle
them, not even their name. Adding these definitions should at least help
readelf display information correctly, but more work is needed to
actually implement them.
|
|
Expected behavior left as a FIXME is outlined here:
https://pubs.opengroup.org/onlinepubs/7908799/xsh/getpriority.html
|
|
Expected behavior left as a FIXME is described here:
https://pubs.opengroup.org/onlinepubs/7908799/xsh/chroot.html
It is marked as LEGACY but still used in projects such as PHP.
|
|
Previously, getauxval() got the address of the auxiliary vector by
traversing to the end of the `environ` pointer.
The assumption that the auxiliary vector comes after the environment
array is true at program startup, however the environment array may
be re-allocated and change its address during runtime which would cause
getauxval() to work with an incorrect auxiliary vector address.
To fix this, we now get the address of the auxiliary vector once in
__libc_init and store it in a libc-internal pointer which is then used
by getauxval().
Fixes #10087.
|
|
An IPv4 mapped IPv6 address consist of 80 "0" bits, followed by 16 "1"
bits, followed by the 32-bit IPv4 address.
Example of IPv4 mapped IPv6 address:
IPv4 address: 169.219.13.133
IPv6 address: 0000:0000:0000:0000:FFFF:A9DB:0D85
Simplified : ::FFFF:A9DB:0D85
|
|
This was required before commit 5f724b6ca1aae3a5a8c7189069649e8a9347cca2
when we were building LibC before libstdc++ headers were available in
the sysroot. However as noted in that commit, we never actually needed
to be building LibC before libstdc++, so we can go ahead and remove this
ancient hack.
|