From 2bce8a37ecffbb368b9c5444168c6bb7b9652532 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C5=8Dshin?= Date: Sat, 16 Dec 2023 22:39:26 -0500 Subject: [PATCH] spaces -> tab --- libc/intrin/kpollnames.S | 2 +- libc/nexgen32e/blink_linux_aarch64.S | 2 +- libc/nexgen32e/blink_xnu_aarch64.S | 2 +- libc/tinymath/expm1f.c | 10 ++-- libc/tinymath/ktan.c | 26 ++++----- third_party/musl/res_msend.c | 86 ++++++++++++++-------------- third_party/musl/resolvconf.c | 2 +- 7 files changed, 65 insertions(+), 65 deletions(-) diff --git a/libc/intrin/kpollnames.S b/libc/intrin/kpollnames.S index 5d763e46b..21e0d4038 100644 --- a/libc/intrin/kpollnames.S +++ b/libc/intrin/kpollnames.S @@ -31,7 +31,7 @@ .balign 4 .underrun kPollNames: - .e POLLNVAL "POLLNVAL" + .e POLLNVAL "POLLNVAL" .e POLLWRNORM "POLLWRNORM" .e POLLWRBAND "POLLWRBAND" .e POLLRDNORM "POLLRDNORM" diff --git a/libc/nexgen32e/blink_linux_aarch64.S b/libc/nexgen32e/blink_linux_aarch64.S index e85295581..586281e91 100644 --- a/libc/nexgen32e/blink_linux_aarch64.S +++ b/libc/nexgen32e/blink_linux_aarch64.S @@ -36,7 +36,7 @@ blink_linux_aarch64: .endobj blink_linux_aarch64,globl blink_linux_aarch64_size = . - blink_linux_aarch64 - .section .emush,"a",@progbits + .section .emush,"a",@progbits .ascii "if [ \"$s\" = Linux ]; then\n" .ascii "if [ \"$m\" = aarch64 ] || [ \"$m\" = arm64 ]; then\n" .ascii "if ! [ -x \"$e\" ]; then\n" diff --git a/libc/nexgen32e/blink_xnu_aarch64.S b/libc/nexgen32e/blink_xnu_aarch64.S index f589916a5..bef3e8247 100644 --- a/libc/nexgen32e/blink_xnu_aarch64.S +++ b/libc/nexgen32e/blink_xnu_aarch64.S @@ -36,7 +36,7 @@ blink_xnu_aarch64: .endobj blink_xnu_aarch64,globl blink_xnu_aarch64_size = . - blink_xnu_aarch64 - .section .emush,"a",@progbits + .section .emush,"a",@progbits .ascii "if [ \"$s\" = Darwin ] && [ \"$m\" = arm64 ]; then\n" .ascii "if ! [ -x \"$e\" ]; then\n" .ascii "echo \"extracting blink-darwin-aarch64 to ${e}\" >&2\n" diff --git a/libc/tinymath/expm1f.c b/libc/tinymath/expm1f.c index 6500aec27..e9e3b8530 100644 --- a/libc/tinymath/expm1f.c +++ b/libc/tinymath/expm1f.c @@ -81,11 +81,11 @@ expm1f(float x) /* filter out huge and non-finite argument */ if(hx >= 0x4195b844) { /* if |x|>=27*ln2 */ if(hx >= 0x42b17218) { /* if |x|>=88.721... */ - if(hx>0x7f800000) + if(hx>0x7f800000) return x+x; /* NaN */ if(hx==0x7f800000) return (xsb==0)? x:-1.0;/* exp(+-inf)={inf,-1} */ - if(x > o_threshold) return huge*huge; /* overflow */ + if(x > o_threshold) return huge*huge; /* overflow */ } if(xsb!=0) { /* x < -27*ln2, return -1.0 with inexact */ if(x+tiny<(float)0.0) /* raise inexact */ @@ -132,14 +132,14 @@ expm1f(float x) else return one+(float)2.0*(x-e); } if (k <= -2 || k>56) { /* suffice to return exp(x)-1 */ - y = one-(e-x); + y = one-(e-x); if (k == 128) y = y*2.0F*0x1p127F; else y = y*twopk; - return y-one; + return y-one; } t = one; if(k<23) { - SET_FLOAT_WORD(t,0x3f800000 - (0x1000000>>k)); /* t=1-2^-k */ + SET_FLOAT_WORD(t,0x3f800000 - (0x1000000>>k)); /* t=1-2^-k */ y = t-(e-x); y = y*twopk; } else { diff --git a/libc/tinymath/ktan.c b/libc/tinymath/ktan.c index 695c6b70e..1d7da7d8e 100644 --- a/libc/tinymath/ktan.c +++ b/libc/tinymath/ktan.c @@ -90,19 +90,19 @@ asm(".include \"libc/disclaimer.inc\""); #define INSERT(d,hi,lo) (d)=ASDOUBLE((uint64_t)(hi)<<32|(uint32_t)(lo)) static const double T[] = { - 3.33333333333334091986e-01, /* 3FD55555, 55555563 */ - 1.33333333333201242699e-01, /* 3FC11111, 1110FE7A */ - 5.39682539762260521377e-02, /* 3FABA1BA, 1BB341FE */ - 2.18694882948595424599e-02, /* 3F9664F4, 8406D637 */ - 8.86323982359930005737e-03, /* 3F8226E3, E96E8493 */ - 3.59207910759131235356e-03, /* 3F6D6D22, C9560328 */ - 1.45620945432529025516e-03, /* 3F57DBC8, FEE08315 */ - 5.88041240820264096874e-04, /* 3F4344D8, F2F26501 */ - 2.46463134818469906812e-04, /* 3F3026F7, 1A8D1068 */ - 7.81794442939557092300e-05, /* 3F147E88, A03792A6 */ - 7.14072491382608190305e-05, /* 3F12B80F, 32F0A7E9 */ - -1.85586374855275456654e-05, /* BEF375CB, DB605373 */ - 2.59073051863633712884e-05, /* 3EFB2A70, 74BF7AD4 */ + 3.33333333333334091986e-01, /* 3FD55555, 55555563 */ + 1.33333333333201242699e-01, /* 3FC11111, 1110FE7A */ + 5.39682539762260521377e-02, /* 3FABA1BA, 1BB341FE */ + 2.18694882948595424599e-02, /* 3F9664F4, 8406D637 */ + 8.86323982359930005737e-03, /* 3F8226E3, E96E8493 */ + 3.59207910759131235356e-03, /* 3F6D6D22, C9560328 */ + 1.45620945432529025516e-03, /* 3F57DBC8, FEE08315 */ + 5.88041240820264096874e-04, /* 3F4344D8, F2F26501 */ + 2.46463134818469906812e-04, /* 3F3026F7, 1A8D1068 */ + 7.81794442939557092300e-05, /* 3F147E88, A03792A6 */ + 7.14072491382608190305e-05, /* 3F12B80F, 32F0A7E9 */ + -1.85586374855275456654e-05, /* BEF375CB, DB605373 */ + 2.59073051863633712884e-05, /* 3EFB2A70, 74BF7AD4 */ }, pio4 = 7.85398163397448278999e-01, /* 3FE921FB, 54442D18 */ pio4lo = 3.06161699786838301793e-17; /* 3C81A626, 33145C07 */ diff --git a/third_party/musl/res_msend.c b/third_party/musl/res_msend.c index 8671d74c9..b76c7124c 100644 --- a/third_party/musl/res_msend.c +++ b/third_party/musl/res_msend.c @@ -53,7 +53,7 @@ static void cleanup(void *p) struct pollfd *pfd = p; for (int i=0; pfd[i].fd >= -1; i++) if (pfd[i].fd >= 0) - close(pfd[i].fd); + close(pfd[i].fd); } static unsigned long mtime() @@ -299,51 +299,51 @@ int __res_msend_rc(int nqueries, const unsigned char *const *queries, } for (i=0; i>8, qlens[i] }, .iov_len = 2 }, - { .iov_base = (void *)queries[i], .iov_len = qlens[i] } } - }; - step_mh(&mh, qpos[i]); - r = sendmsg(pfd[i].fd, &mh, MSG_NOSIGNAL); - if (r < 0) goto out; - qpos[i] += r; - if (qpos[i] == qlens[i]+2) - pfd[i].events = POLLIN; - } - } + if (pfd[i].revents & POLLOUT) { + struct msghdr mh = { + .msg_iovlen = 2, + .msg_iov = (struct iovec [2]){ + { .iov_base = (uint8_t[]){ qlens[i]>>8, qlens[i] }, .iov_len = 2 }, + { .iov_base = (void *)queries[i], .iov_len = qlens[i] } } + }; + step_mh(&mh, qpos[i]); + r = sendmsg(pfd[i].fd, &mh, MSG_NOSIGNAL); + if (r < 0) goto out; + qpos[i] += r; + if (qpos[i] == qlens[i]+2) + pfd[i].events = POLLIN; + } + } for (i=0; i