Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/MojoLlama/blob/main/src/mojollama/mojo_engine/quant_io.c # MojoLlama Archived Mojo/MAX quantizer and serving research repository (read-only history) Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `MojoLlama / src / mojollama / mojo_engine / quant_io.c` 15 lines ยท 506 bytes Raw Blame History 1 /* I/O bridge for MojoLlama Quantizer 2 Wraps POSIX write() so Mojo can call it without @extern("write") stdlib conflict. 3 WHY: Mojo 1.0.0b1 std/ffi declares @extern("write") and @extern("close") which 4 conflicts with Mojo code declaring the same extern. Our C helper uses different 5 function names ("qwrite", "qclose") that don't conflict. 6 */ 7 #include 8 9 long qwrite(int fd, const void *buf, unsigned long n) { 10 return write(fd, buf, n); 11 } 12 13 int qclose(int fd) { 14 return close(fd); 15 }