This reverts commit ec7d7a5b14540ea3b2bab9f11318630338467965, reversing
changes made to 81c441f8855d4c58f0b2ff86d3d007cf0bf395d3.
It looks like this broke colors in Windows Command Prompt (#3147)
and this method of detecting native C ABI isn't working well (#3121).
* `await @asyncCall` generates better code. See #3065
* `@asyncCall` works with a real `@Frame(func)` in addition to
a byte slice. Closes#3072
* `@asyncCall` allows passing `{}` (a void value) as the result
pointer, which uses the result location inside the frame.
Closes#3068
* support `await @asyncCall` on a non-async function. This is in
preparation for safe recursion (#1006).
The previous
[instructions](https://github.com/ziglang/zig/wiki/Updating-libc) for
updating musl libc headers had this (repeated for each architecture):
make DESTDIR=build-all/arm install-headers ARCH=arm
However musl's build system does not properly rebuild alltypes.h and
syscall.h from source, instead using whatever is cached from the
previous build. In the case of the previous time that I updated to musl
1.1.23, this happened to be the aarch64 architecture.
As a workaround, one can remove the obj/ directory to force rebuilding
this file. Now the instructions say this (repeated for each architecture):
rm -rf obj/ && make DESTDIR=build-all/arm install-headers ARCH=arm
This commit updates the resulting headers after this workaround is
applied and the process headers tool is run again.
- Use sys_*stat*64 instead of sys_*stat* where appropriate
- Fix overflow when calculating atime, ctime and mtime on File.stat()
- Fix compilation error casting getEndPos to usize.
This commit reworks the handling of `zig fmt: off/on`. A motivating
example is shown below:
const c = d;
// zig fmt: off
// comment
const a = b;
// zig fmt: on
Before processing the decl `const a = b;`, `renderRoot` looks for
`zig fmt: off` that appears between this decl and the previous one. If
it finds one, it searches for the next `zig fmt: on` that re-enables
reformatting (or EOF if none was found), and copies the input code
between `zig fmt: off` and `zig fmt: on` to the output stream. After
that, it proceeds to the next decl.
The important thing to notice here is that `renderTopLevelDecl` emits
line comment tokens that follow the decl. Therefore, when copying code,
we must be careful not to copy the line comment tokens that already have
been written to the output stream. The original code failed to take this
fact into consideration. It did skip `// zig fmt: off`, but not the
remaining ones. As a result, when the above example is fed as input, it
duplicated the line `// comment`.