Re: [osv-dev] include/api/$ARCH/bits/alltypes.h.sh and musl upgrade

2020-08-11 Thread Nadav Har'El
On Mon, Aug 10, 2020 at 5:21 PM Waldek Kozaczuk wrote: > Can anyone explain the motivation behind this script and how the generated > alltypes.h is intended to be used? I can try. I think we took this idea from Musl. The C library has type definitions in a lot of different header files. For ex

Re: [osv-dev] [RFC 2] libc: replace syscall call with variadic macro and inlined function

2020-08-11 Thread Nadav Har'El
On Mon, Aug 10, 2020 at 6:50 PM Waldek Kozaczuk wrote: > > There is one thing to discuss. While I agree that we should use ' > --include libc/*syscall_to*_function.h' for all musl source and have > compiler detect any undefined individual translation macros (like > __OSV_TO_FUNCTION_SYS_clock_get

Re: [osv-dev] syscall() call in libc/network/if_nameindex.c

2020-08-11 Thread Nadav Har'El
On Mon, Aug 10, 2020 at 5:17 PM Waldek Kozaczuk wrote: > Any reason why we use __syscall(SYS_close, ...) vs close()? > > struct if_nameindex *if_nameindex() > { > size_t n; > void *p = 0; > int s = socket(AF_INET, SOCK_DGRAM|SOCK_CLOEXEC, 0); > if (s>=0) { > for (n=0; (p=do_nameindex(s, n)) == (v