mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-08-07 10:20:29 +00:00
spaces -> tab
This commit is contained in:
parent
71e6245186
commit
2bce8a37ec
7 changed files with 65 additions and 65 deletions
|
@ -31,7 +31,7 @@
|
|||
.balign 4
|
||||
.underrun
|
||||
kPollNames:
|
||||
.e POLLNVAL "POLLNVAL"
|
||||
.e POLLNVAL "POLLNVAL"
|
||||
.e POLLWRNORM "POLLWRNORM"
|
||||
.e POLLWRBAND "POLLWRBAND"
|
||||
.e POLLRDNORM "POLLRDNORM"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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 */
|
||||
|
|
86
third_party/musl/res_msend.c
vendored
86
third_party/musl/res_msend.c
vendored
|
@ -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<nqueries; i++) {
|
||||
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;
|
||||
}
|
||||
}
|
||||
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<nqueries; i++) {
|
||||
if (pfd[i].revents & POLLIN) {
|
||||
struct msghdr mh = {
|
||||
.msg_iovlen = 2,
|
||||
.msg_iov = (struct iovec [2]){
|
||||
{ .iov_base = alen_buf[i], .iov_len = 2 },
|
||||
{ .iov_base = answers[i], .iov_len = asize } }
|
||||
};
|
||||
step_mh(&mh, apos[i]);
|
||||
r = recvmsg(pfd[i].fd, &mh, 0);
|
||||
if (r <= 0) goto out;
|
||||
apos[i] += r;
|
||||
if (apos[i] < 2) continue;
|
||||
int alen = alen_buf[i][0]*256 + alen_buf[i][1];
|
||||
if (alen < 13) goto out;
|
||||
if (apos[i] < alen+2 && apos[i] < asize+2)
|
||||
continue;
|
||||
int rcode = answers[i][3] & 15;
|
||||
if (rcode != 0 && rcode != 3)
|
||||
goto out;
|
||||
if (pfd[i].revents & POLLIN) {
|
||||
struct msghdr mh = {
|
||||
.msg_iovlen = 2,
|
||||
.msg_iov = (struct iovec [2]){
|
||||
{ .iov_base = alen_buf[i], .iov_len = 2 },
|
||||
{ .iov_base = answers[i], .iov_len = asize } }
|
||||
};
|
||||
step_mh(&mh, apos[i]);
|
||||
r = recvmsg(pfd[i].fd, &mh, 0);
|
||||
if (r <= 0) goto out;
|
||||
apos[i] += r;
|
||||
if (apos[i] < 2) continue;
|
||||
int alen = alen_buf[i][0]*256 + alen_buf[i][1];
|
||||
if (alen < 13) goto out;
|
||||
if (apos[i] < alen+2 && apos[i] < asize+2)
|
||||
continue;
|
||||
int rcode = answers[i][3] & 15;
|
||||
if (rcode != 0 && rcode != 3)
|
||||
goto out;
|
||||
|
||||
/* Storing the length here commits the accepted answer.
|
||||
* Immediately close TCP socket so as not to consume
|
||||
* resources we no longer need. */
|
||||
alens[i] = alen;
|
||||
close(pfd[i].fd);
|
||||
pfd[i].fd = -1;
|
||||
}
|
||||
}
|
||||
/* Storing the length here commits the accepted answer.
|
||||
* Immediately close TCP socket so as not to consume
|
||||
* resources we no longer need. */
|
||||
alens[i] = alen;
|
||||
close(pfd[i].fd);
|
||||
pfd[i].fd = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
out:
|
||||
pthread_cleanup_pop(1);
|
||||
|
|
2
third_party/musl/resolvconf.c
vendored
2
third_party/musl/resolvconf.c
vendored
|
@ -128,7 +128,7 @@ int __get_resolv_conf(struct resolvconf *conf, char *search, size_t search_sz)
|
|||
} else {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
while (fgets(line, sizeof line, f)) {
|
||||
char *p, *z;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue