mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-09-20 23:18:00 +03:00
Merge branch 'master' of github.com:urbit/urbit
This commit is contained in:
commit
0dc82fc41a
2
f/trac.c
2
f/trac.c
@ -82,7 +82,7 @@
|
|||||||
if ( 0 == (dis_k = _tx_knot_new()) ) {
|
if ( 0 == (dis_k = _tx_knot_new()) ) {
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
strcpy(dis_k->lic_c, hed_c);
|
strncpy(dis_k->lic_c, hed_c, 31);
|
||||||
dis_k->fin_w = 1;
|
dis_k->fin_w = 1;
|
||||||
dis_k->fam_k = 0;
|
dis_k->fam_k = 0;
|
||||||
dis_k->nex_k = par_k->fam_k;
|
dis_k->nex_k = par_k->fam_k;
|
||||||
|
20
f/unix.c
20
f/unix.c
@ -148,8 +148,8 @@ u2_ux_read(u2_ray wir_r,
|
|||||||
|
|
||||||
nam_c = alloca(len_w + 1);
|
nam_c = alloca(len_w + 1);
|
||||||
if ( ext_c ) {
|
if ( ext_c ) {
|
||||||
sprintf(nam_c, "%s.%s", paf_c, ext_c);
|
snprintf(nam_c, len_w + 1, "%s.%s", paf_c, ext_c);
|
||||||
} else sprintf(nam_c, "%s", paf_c);
|
} else snprintf(nam_c, len_w + 1, "%s", paf_c);
|
||||||
|
|
||||||
{
|
{
|
||||||
c3_i fid_i;
|
c3_i fid_i;
|
||||||
@ -194,8 +194,8 @@ u2_ux_read_deep(u2_wire wir_r,
|
|||||||
|
|
||||||
nam_c = alloca(len_w + 1);
|
nam_c = alloca(len_w + 1);
|
||||||
if ( ext_c ) {
|
if ( ext_c ) {
|
||||||
sprintf(nam_c, "%s.%s", paf_c, ext_c);
|
snprintf(nam_c, len_w + 1, "%s.%s", paf_c, ext_c);
|
||||||
} else sprintf(nam_c, "%s", paf_c);
|
} else snprintf(nam_c, len_w + 1, "%s", paf_c);
|
||||||
|
|
||||||
{
|
{
|
||||||
FILE* fil;
|
FILE* fil;
|
||||||
@ -227,8 +227,8 @@ u2_ux_write(u2_wire wir_r,
|
|||||||
|
|
||||||
nam_c = alloca(len_w + 1);
|
nam_c = alloca(len_w + 1);
|
||||||
if ( ext_c ) {
|
if ( ext_c ) {
|
||||||
sprintf(nam_c, "%s.%s", paf_c, ext_c);
|
snprintf(nam_c, len_w + 1, "%s.%s", paf_c, ext_c);
|
||||||
} else sprintf(nam_c, "%s", paf_c);
|
} else snprintf(nam_c, len_w + 1, "%s", paf_c);
|
||||||
|
|
||||||
{
|
{
|
||||||
c3_i fid_i;
|
c3_i fid_i;
|
||||||
@ -269,8 +269,8 @@ u2_ux_write_deep(u2_wire wir_r,
|
|||||||
|
|
||||||
nam_c = alloca(len_w + 1);
|
nam_c = alloca(len_w + 1);
|
||||||
if ( ext_c ) {
|
if ( ext_c ) {
|
||||||
sprintf(nam_c, "%s.%s", paf_c, ext_c);
|
snprintf(nam_c, len_w + 1, "%s.%s", paf_c, ext_c);
|
||||||
} else sprintf(nam_c, "%s", paf_c);
|
} else snprintf(nam_c, len_w + 1, "%s", paf_c);
|
||||||
|
|
||||||
{
|
{
|
||||||
FILE* fil;
|
FILE* fil;
|
||||||
@ -298,8 +298,8 @@ u2_ux_fresh(const c3_c* paf_c,
|
|||||||
c3_c* nom_c = alloca(nom_w + 1);
|
c3_c* nom_c = alloca(nom_w + 1);
|
||||||
struct stat nam_stat, nom_stat;
|
struct stat nam_stat, nom_stat;
|
||||||
|
|
||||||
sprintf(nam_c, "%s.%s", paf_c, ext_c);
|
snprintf(nam_c, nam_w + 1, "%s.%s", paf_c, ext_c);
|
||||||
sprintf(nom_c, "%s.%s", paf_c, oxt_c);
|
snprintf(nom_c, nom_w + 1, "%s.%s", paf_c, oxt_c);
|
||||||
|
|
||||||
if ( stat(nam_c, &nam_stat) < 0 ) {
|
if ( stat(nam_c, &nam_stat) < 0 ) {
|
||||||
return u2_no;
|
return u2_no;
|
||||||
|
6
f/wire.c
6
f/wire.c
@ -110,13 +110,13 @@ _wr_open(c3_c* cpu_c, c3_c* fil_c, c3_c* suf_c)
|
|||||||
c3_c ful_c[8193];
|
c3_c ful_c[8193];
|
||||||
c3_i fid_i;
|
c3_i fid_i;
|
||||||
|
|
||||||
sprintf(ful_c, "%s", cpu_c);
|
snprintf(ful_c, 8193, "%s", cpu_c);
|
||||||
mkdir(ful_c, 0700);
|
mkdir(ful_c, 0700);
|
||||||
|
|
||||||
sprintf(ful_c, "%s/chk", cpu_c);
|
snprintf(ful_c, 8193, "%s/chk", cpu_c);
|
||||||
mkdir(ful_c, 0700);
|
mkdir(ful_c, 0700);
|
||||||
|
|
||||||
sprintf(ful_c, "%s/chk/%s.%s", cpu_c, fil_c, suf_c);
|
snprintf(ful_c, 8193, "%s/chk/%s.%s", cpu_c, fil_c, suf_c);
|
||||||
fid_i = open(ful_c, O_RDWR | O_CREAT, 0666);
|
fid_i = open(ful_c, O_RDWR | O_CREAT, 0666);
|
||||||
if ( -1 == fid_i ) {
|
if ( -1 == fid_i ) {
|
||||||
perror(ful_c); exit(1);
|
perror(ful_c); exit(1);
|
||||||
|
@ -335,12 +335,14 @@ static int uv__bind(uv_udp_t* handle,
|
|||||||
* None of the above applies to Linux: SO_REUSEADDR implies SO_REUSEPORT on
|
* None of the above applies to Linux: SO_REUSEADDR implies SO_REUSEPORT on
|
||||||
* Linux and hence it does not have SO_REUSEPORT at all.
|
* Linux and hence it does not have SO_REUSEPORT at all.
|
||||||
*/
|
*/
|
||||||
|
#ifndef __linux__
|
||||||
#ifdef SO_REUSEPORT
|
#ifdef SO_REUSEPORT
|
||||||
yes = 1;
|
yes = 1;
|
||||||
if (setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, &yes, sizeof yes) == -1) {
|
if (setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, &yes, sizeof yes) == -1) {
|
||||||
uv__set_sys_error(handle->loop, errno);
|
uv__set_sys_error(handle->loop, errno);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (flags & UV_UDP_IPV6ONLY) {
|
if (flags & UV_UDP_IPV6ONLY) {
|
||||||
|
4
v/ames.c
4
v/ames.c
@ -298,7 +298,7 @@ u2_ames_io_init()
|
|||||||
u2z(num);
|
u2z(num);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( 0 != uv_udp_init(u2L, &sam_u->wax_u) ) {
|
if ( 0 != uv_udp_init(u2L, &u2_Host.sam_u.wax_u) ) {
|
||||||
uL(fprintf(uH, "ames: init: %s\n", uv_strerror(uv_last_error(u2L))));
|
uL(fprintf(uH, "ames: init: %s\n", uv_strerror(uv_last_error(u2L))));
|
||||||
c3_assert(0);
|
c3_assert(0);
|
||||||
}
|
}
|
||||||
@ -314,7 +314,7 @@ u2_ames_io_init()
|
|||||||
add_u.sin_port = htons(por_s);
|
add_u.sin_port = htons(por_s);
|
||||||
|
|
||||||
if ( uv_udp_bind(&sam_u->wax_u, add_u, 0) != 0 ) {
|
if ( uv_udp_bind(&sam_u->wax_u, add_u, 0) != 0 ) {
|
||||||
uL(fprintf(uH, "ames: init: %s\n",
|
uL(fprintf(uH, "ames: bind: %s\n",
|
||||||
uv_strerror(uv_last_error(u2L))));
|
uv_strerror(uv_last_error(u2L))));
|
||||||
c3_assert(0);
|
c3_assert(0);
|
||||||
}
|
}
|
||||||
|
2
v/main.c
2
v/main.c
@ -101,7 +101,7 @@ _main_getopt(c3_i argc, c3_c** argv)
|
|||||||
|
|
||||||
if ( u2_Host.ops_u.hom_c == 0 ) {
|
if ( u2_Host.ops_u.hom_c == 0 ) {
|
||||||
c3_c* hom_c = getenv("HOME");
|
c3_c* hom_c = getenv("HOME");
|
||||||
c3_w hom_w = strlen(hom_c + 6);
|
c3_w hom_w = strlen(hom_c) + 6;
|
||||||
|
|
||||||
if ( !hom_c ) {
|
if ( !hom_c ) {
|
||||||
fprintf(stderr, "$URBIT_HOME or $HOME must be set\n");
|
fprintf(stderr, "$URBIT_HOME or $HOME must be set\n");
|
||||||
|
2
v/term.c
2
v/term.c
@ -392,7 +392,7 @@ _term_it_write_strnum(u2_utty* uty_u, const c3_c* str_c, c3_w num_w)
|
|||||||
{
|
{
|
||||||
c3_c buf_c[16];
|
c3_c buf_c[16];
|
||||||
|
|
||||||
sprintf(buf_c, "#%ud", num_w); // XX slow
|
snprintf(buf_c, 16, "#%ud", num_w); // XX slow
|
||||||
_term_it_write_str(uty_u, str_c);
|
_term_it_write_str(uty_u, str_c);
|
||||||
_term_it_write_str(uty_u, buf_c);
|
_term_it_write_str(uty_u, buf_c);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user