Use .bold instead of .white, the effect is the same for light-on-dark
terminals but greatly improves the readability for dark-on-light ones.
Closes#8761
* std: fix overflow in math.scalbn32
* std: rewrite math.scalbn to be generic
* std: support f128 in math.isNormal
* std: enable f128 tests in math.scalbn
we only effectively need 1 control bit to represent 2 special states for
the metadata (free and tombstone)
this should reduce the number of actual element equality tests, but since
it's very low already, the impact is negligible
The `1 - shift` expression was computed using small unsigned types and
then casted to i32, producing either an underflow error or an incorrect
result.
Reported by `@notviri` in #8733
* for cross testing stage2 tests, we use `darling shell` command
since the path to the tested binary is relative to cwd
* for the `zig test` command, we simply use `darling` since the
path to the binary is absolute
Without this, and with `-Denable-qemu -Denable-foreign-glibc`,
i386-linux-gnu tests failed because the `-L` path passed to qemu
was "i386-linux-gnu" (nonexistent) rather than "i686-linux-gnu".
Fixes std lib and behavior tests when using these options to enable
test coverage with cross compiled glibcs.
The CPU detection code is nearly at feature parity, we do support
detecting the native CPU on Sparc systems and macos, our ARM/AArch64
model list is quite comprehensive and so is our PPC one.
The only missing pieces are:
- ARM32 detection on Darwin hosts (I don't think anybody is planning on
running the compiler on a old-ass iPhone)
- s390x detection on Linux hosts, this can be easily added at a later
stage.
The current spanZ() function will not scan for a 0 terminator if the
type is not 0 terminated. This encourages using 0 terminated array
types to bind C arrays which hold 0 terminated strings. However, this is
a big footgun as nothing in the C type system guarantees there to be a
0 terminator at the end of the array and if there is none this becomes
Illegal Behavior in Zig.
To solve this, deprecate spanZ() and lenZ(), adding a new sliceTo()
function that always scans for the given terminator even if the type is
not sentinel terminated.
It turns out that nothing in the test suite was exercising
preadv/pwritev and so the previous commits silently broke them.
Adding tests revealed readvAll and preadvAll were also broken and not
covered by any test.
While musl decided to hard-wire off_t to a 64bit quantity, glibc is much
older and defaults to 32bit offsets and offers some -64 suffixed
versions of I/O functions.
There's a weird mix-up of types: sometimes off_t is used, sometimes not,
sometimes it's defined as a signed quantity and sometimes as an unsigned
one, but we'll sort this problem later.