Commit f082b27
committed
feat(libaio): add compat.libaio 0.3.113, and move the descriptor catalog out of the README
libaio is the userspace wrapper over Linux's native AIO syscalls. Shape A
(C-source compat): upstream's own `libaio_srcs` list from src/Makefile,
twelve TUs, no configure step. Linux-only in the strong sense — `struct
iocb` IS the kernel's, so there is no other platform section to write and
consumers gate it with `[target.'cfg(linux)'.dependencies]`.
Three things the descriptor had to answer:
* Upstream installs exactly one header, `libaio.h`, but the tarball keeps
it in `src/` next to the private ones — one of which is `syscall.h` and
would shadow glibc's for every consumer TU. So `include_dirs` names a
`generated_files` forwarder and nothing else; the package's own sources
reach the real header through it while their quote-form includes still
resolve next to the including `.c`, so no `-I` into `src/` is needed.
* `-std=c11` sets __STRICT_ANSI__, which hides `syscall()` and `sigset_t`
and makes even the public header fail to parse. `c_standard = "gnu11"`
looks like the fix and is a trap: mcpp 2026.8.27.2 accepts the string
and still emits `-std=c11`. `-D_GNU_SOURCE` in `cflags` is what works.
* `io_getevents`/`io_cancel` have no ordinary definitions upstream — the
short names come from `.symver … @@LIBAIO_0.4`. Verified to resolve for
an executable under both ld.bfd and lld; building a `.so` straight out
of these objects still needs upstream's libaio.map, exactly as with
upstream's own libaio.a.
No features: the only sources not compiled are a build-time assertion TU
(restated as static_asserts in the test) and the harness, which carries a
main() and so cannot be a feature at all.
CN mirror published at gitcode mcpp-res/libaio, byte-identical to GLOBAL.
Verified with the CI-pinned mcpp: `mcpp test -p libaio` green from cold,
12 objects actually compiled, and the assertions confirmed failable.
Also, in the same pass: the "Reference examples" table had grown to ~22 KB
of the 28 KB README and buried everything around it. The full catalog now
lives in docs/descriptor-examples.md (+ zh), with libaio's own entry; the
README keeps a six-row table of one starting point per shape and links
out. README 28693 -> 6151 bytes. Fixes a stale pkgs/o/opencv.lua link
along the way.1 parent 7c3afc4 commit f082b27
13 files changed
Lines changed: 700 additions & 59 deletions
File tree
- .agents/docs
- docs
- zh
- pkgs/c
- tests/examples/libaio
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
0 commit comments