Merge branch 'master' into loadergolf

This commit is contained in:
Jōshin 2023-12-24 15:50:48 -05:00
commit bbf69bd432
No known key found for this signature in database
217 changed files with 1938 additions and 1602 deletions

View file

@ -1,5 +1,5 @@
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐ #-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
#── vi: set et ft=make ts=8 sw=8 fenc=utf-8 :vi ──────────────────────┘ #── vi: set noet ft=make ts=8 sw=8 fenc=utf-8 :vi ────────────────────┘
# #
# OVERVIEW # OVERVIEW
# #

View file

@ -1,5 +1,5 @@
/*-*- mode: ld-script; indent-tabs-mode: nil; tab-width: 2; coding: utf-8 -*-│ /*-*- mode: ld-script; indent-tabs-mode: nil; tab-width: 2; coding: utf-8 -*-│
│ vi: set noet sts=2 sw=2 fenc=utf-8 :vi │ │ vi: set et sts=2 sw=2 fenc=utf-8 :vi │
╚─────────────────────────────────────────────────────────────────────────────*/ ╚─────────────────────────────────────────────────────────────────────────────*/
#include "libc/thread/tls.h" #include "libc/thread/tls.h"

View file

@ -316,21 +316,12 @@ __attribute__((__noreturn__)) static void Pexit(const char *c, int failed,
} }
static char AccessCommand(struct PathSearcher *ps, unsigned long pathlen) { static char AccessCommand(struct PathSearcher *ps, unsigned long pathlen) {
char buf[PATH_MAX];
size_t n;
if (pathlen + 1 + ps->namelen + 1 > sizeof(ps->path)) { if (pathlen + 1 + ps->namelen + 1 > sizeof(ps->path)) {
return 0; return 0;
} }
if (pathlen && ps->path[pathlen - 1] != '/') ps->path[pathlen++] = '/'; if (pathlen && ps->path[pathlen - 1] != '/') ps->path[pathlen++] = '/';
memmove(ps->path + pathlen, ps->name, ps->namelen); memmove(ps->path + pathlen, ps->name, ps->namelen);
ps->path[pathlen + ps->namelen] = 0; ps->path[pathlen + ps->namelen] = 0;
if (!realpath(ps->path, buf)) {
Pexit(ps->path, -errno, "realpath");
}
if ((n = strlen(buf)) >= sizeof(ps->path)) {
Pexit(buf, 0, "too long");
}
memcpy(ps->path, buf, n + 1);
if (!access(ps->path, X_OK)) { if (!access(ps->path, X_OK)) {
if (ps->indirect) { if (ps->indirect) {
ps->namelen -= 4; ps->namelen -= 4;

View file

@ -1,5 +1,5 @@
/*-*- mode: ld-script; indent-tabs-mode: nil; tab-width: 2; coding: utf-8 -*-│ /*-*- mode: ld-script; indent-tabs-mode: nil; tab-width: 2; coding: utf-8 -*-│
│ vi: set noet sts=2 sw=2 fenc=utf-8 :vi │ │ vi: set et sts=2 sw=2 fenc=utf-8 :vi │
╞══════════════════════════════════════════════════════════════════════════════╡ ╞══════════════════════════════════════════════════════════════════════════════╡
│ Copyright 2020 Justine Alexandra Roberts Tunney │ │ Copyright 2020 Justine Alexandra Roberts Tunney │
│ │ │ │

View file

@ -545,40 +545,6 @@ __attribute__((__noreturn__)) static void Pexit(int os, const char *c, int rc,
Exit(127, os); Exit(127, os);
} }
#define PSFD "/proc/self/fd/"
static int RealPath(int os, int fd, char *path, char **resolved) {
char buf[PATH_MAX];
int rc;
if (IsLinux()) {
char psfd[sizeof(PSFD) + 19];
MemMove(psfd, PSFD, sizeof(PSFD) - 1);
Utoa(psfd + sizeof(PSFD) - 1, fd);
rc = SystemCall(-100, (long)psfd, (long)buf, PATH_MAX, 0, 0, 0,
IsAarch64() ? 78 : 267);
if (rc >= 0) {
if (rc == PATH_MAX) {
rc = -36;
} else {
buf[rc] = 0;
}
}
} else if (IsXnu()) {
rc = SystemCall(fd, 50, (long)buf, 0, 0, 0, 0, 92 | 0x2000000);
} else if (IsOpenbsd()) {
rc = SystemCall((long)path, (long)buf, 0, 0, 0, 0, 0, 115);
} else {
*resolved = 0;
return 0;
}
if (rc >= 0) {
MemMove(path, buf, StrLen(buf) + 1);
*resolved = path;
rc = 0;
}
return rc;
}
static char AccessCommand(struct PathSearcher *ps, unsigned long pathlen) { static char AccessCommand(struct PathSearcher *ps, unsigned long pathlen) {
if (pathlen + 1 + ps->namelen + 1 > sizeof(ps->path)) return 0; if (pathlen + 1 + ps->namelen + 1 > sizeof(ps->path)) return 0;
if (pathlen && ps->path[pathlen - 1] != '/') ps->path[pathlen++] = '/'; if (pathlen && ps->path[pathlen - 1] != '/') ps->path[pathlen++] = '/';
@ -644,9 +610,8 @@ static char *Commandv(struct PathSearcher *ps, int os, const char *name,
} }
} }
__attribute__((__noreturn__)) static void Spawn(int os, const char *exe, __attribute__((__noreturn__)) static void Spawn(int os, char *exe, int fd,
char *path, int fd, long *sp, long *sp, unsigned long pagesz,
unsigned long pagesz,
struct ElfEhdr *e, struct ElfEhdr *e,
struct ElfPhdr *p) { struct ElfPhdr *p) {
long rc; long rc;
@ -803,12 +768,12 @@ __attribute__((__noreturn__)) static void Spawn(int os, const char *exe,
Msyscall(dynbase + code, codesize, os); Msyscall(dynbase + code, codesize, os);
/* call program entrypoint */ /* call program entrypoint */
Launch(IsFreebsd() ? sp : 0, dynbase + e->e_entry, path, sp, os); Launch(IsFreebsd() ? sp : 0, dynbase + e->e_entry, exe, sp, os);
} }
static const char *TryElf(struct ApeLoader *M, union ElfEhdrBuf *ebuf, static const char *TryElf(struct ApeLoader *M, union ElfEhdrBuf *ebuf,
const char *exe, char *path, int fd, long *sp, char *exe, int fd, long *sp, long *auxv,
long *auxv, unsigned long pagesz, int os) { unsigned long pagesz, int os) {
long i, rc; long i, rc;
unsigned size; unsigned size;
struct ElfEhdr *e; struct ElfEhdr *e;
@ -923,7 +888,7 @@ static const char *TryElf(struct ApeLoader *M, union ElfEhdrBuf *ebuf,
} }
/* we're now ready to load */ /* we're now ready to load */
Spawn(os, exe, path, fd, sp, pagesz, e, p); Spawn(os, exe, fd, sp, pagesz, e, p);
} }
__attribute__((__noreturn__)) static void ShowUsage(int os, int fd, int rc) { __attribute__((__noreturn__)) static void ShowUsage(int os, int fd, int rc) {
@ -1066,8 +1031,6 @@ EXTERN_C __attribute__((__noreturn__)) void ApeLoader(long di, long *sp,
Pexit(os, prog, 0, "not found (maybe chmod +x or ./ needed)"); Pexit(os, prog, 0, "not found (maybe chmod +x or ./ needed)");
} else if ((fd = Open(exe, O_RDONLY, 0, os)) < 0) { } else if ((fd = Open(exe, O_RDONLY, 0, os)) < 0) {
Pexit(os, exe, fd, "open"); Pexit(os, exe, fd, "open");
} else if ((rc = RealPath(os, fd, exe, &prog)) < 0) {
Pexit(os, exe, rc, "realpath");
} else if ((rc = Pread(fd, ebuf->buf, sizeof(ebuf->buf), 0, os)) < 0) { } else if ((rc = Pread(fd, ebuf->buf, sizeof(ebuf->buf), 0, os)) < 0) {
Pexit(os, exe, rc, "read"); Pexit(os, exe, rc, "read");
} else if ((unsigned long)rc < sizeof(ebuf->ehdr)) { } else if ((unsigned long)rc < sizeof(ebuf->ehdr)) {
@ -1107,9 +1070,9 @@ EXTERN_C __attribute__((__noreturn__)) void ApeLoader(long di, long *sp,
} }
} }
if (i >= sizeof(ebuf->ehdr)) { if (i >= sizeof(ebuf->ehdr)) {
TryElf(M, ebuf, exe, prog, fd, sp, auxv, pagesz, os); TryElf(M, ebuf, exe, fd, sp, auxv, pagesz, os);
} }
} }
} }
Pexit(os, exe, 0, TryElf(M, ebuf, exe, prog, fd, sp, auxv, pagesz, os)); Pexit(os, exe, 0, TryElf(M, ebuf, exe, fd, sp, auxv, pagesz, os));
} }

View file

@ -1,5 +1,5 @@
/*-*- mode: ld-script; indent-tabs-mode: nil; tab-width: 2; coding: utf-8 -*-│ /*-*- mode: ld-script; indent-tabs-mode: nil; tab-width: 2; coding: utf-8 -*-│
│ vi: set noet sts=2 sw=2 fenc=utf-8 :vi │ │ vi: set et sts=2 sw=2 fenc=utf-8 :vi │
╞══════════════════════════════════════════════════════════════════════════════╡ ╞══════════════════════════════════════════════════════════════════════════════╡
│ Copyright 2023 Justine Alexandra Roberts Tunney │ │ Copyright 2023 Justine Alexandra Roberts Tunney │
│ │ │ │

View file

@ -1,5 +1,5 @@
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐ #-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
#── vi: set et ft=make ts=8 sw=8 fenc=utf-8 :vi ──────────────────────┘ #── vi: set noet ft=make ts=8 sw=8 fenc=utf-8 :vi ────────────────────┘
.PHONY: o/$(MODE)/dsp .PHONY: o/$(MODE)/dsp
o/$(MODE)/dsp: o/$(MODE)/dsp/core \ o/$(MODE)/dsp: o/$(MODE)/dsp/core \

View file

@ -1,5 +1,5 @@
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐ #-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
#── vi: set et ft=make ts=8 sw=8 fenc=utf-8 :vi ──────────────────────┘ #── vi: set noet ft=make ts=8 sw=8 fenc=utf-8 :vi ────────────────────┘
PKGS += DSP_CORE PKGS += DSP_CORE

View file

@ -9,8 +9,9 @@ int mulaw(int);
int unmulaw(int); int unmulaw(int);
void *double2byte(long, const void *, double, double) vallocesque; void *double2byte(long, const void *, double, double) vallocesque;
void *byte2double(long, const void *, double, double) vallocesque; void *byte2double(long, const void *, double, double) vallocesque;
void *dct(float[8][8], float, float, float, float, float); void *dct(float[restrict hasatleast 8][8], unsigned,
void *dctjpeg(float[8][8]); float, float, float, float, float);
void *dctjpeg(float[restrict hasatleast 8][8], unsigned);
double det3(const double[3][3]) nosideeffect; double det3(const double[3][3]) nosideeffect;
void *inv3(double[restrict 3][3], const double[restrict 3][3], double); void *inv3(double[restrict 3][3], const double[restrict 3][3], double);
void *matmul3(double[restrict 3][3], const double[3][3], const double[3][3]); void *matmul3(double[restrict 3][3], const double[3][3], const double[3][3]);

View file

@ -18,40 +18,40 @@
*/ */
#include "dsp/core/core.h" #include "dsp/core/core.h"
#define DCT(A, B, C, D, E, F, G, H, T, C0, C1, C2, C3, C4) \ #define DCT(A, B, C, D, E, F, G, H, T, C0, C1, C2, C3, C4) \
do { \ do { \
T z1, z2, z3, z4, z5, z11, z13; \ T z1, z2, z3, z4, z5, z11, z13; \
T t0, t1, t2, t3, t4, t5, t6, t7, t10, t11, t12, t13; \ T t0, t1, t2, t3, t4, t5, t6, t7, t10, t11, t12, t13; \
t0 = A + H; \ t0 = A + H; \
t7 = A - H; \ t7 = A - H; \
t1 = B + G; \ t1 = B + G; \
t6 = B - G; \ t6 = B - G; \
t2 = C + F; \ t2 = C + F; \
t5 = C - F; \ t5 = C - F; \
t3 = D + E; \ t3 = D + E; \
t4 = D - E; \ t4 = D - E; \
t10 = t0 + t3; \ t10 = t0 + t3; \
t13 = t0 - t3; \ t13 = t0 - t3; \
t11 = t1 + t2; \ t11 = t1 + t2; \
t12 = t1 - t2; \ t12 = t1 - t2; \
A = t10 + t11; \ A = t10 + t11; \
E = t10 - t11; \ E = t10 - t11; \
z1 = (t12 + t13) * C0; \ z1 = (t12 + t13) * C0; \
C = t13 + z1; \ C = t13 + z1; \
G = t13 - z1; \ G = t13 - z1; \
t10 = t4 + t5; \ t10 = t4 + t5; \
t11 = t5 + t6; \ t11 = t5 + t6; \
t12 = t6 + t7; \ t12 = t6 + t7; \
z5 = (t10 - t12) * C1; \ z5 = (t10 - t12) * C1; \
z2 = t10 * C2 + z5; \ z2 = t10 * C2 + z5; \
z4 = t12 * C3 + z5; \ z4 = t12 * C3 + z5; \
z3 = t11 * C4; \ z3 = t11 * C4; \
z11 = t7 + z3; \ z11 = t7 + z3; \
z13 = t7 - z3; \ z13 = t7 - z3; \
F = z13 + z2; \ F = z13 + z2; \
D = z13 - z2; \ D = z13 - z2; \
B = z11 + z4; \ B = z11 + z4; \
H = z11 - z4; \ H = z11 - z4; \
} while (0) } while (0)
/** /**
@ -65,20 +65,21 @@
* *
* @cost ~100ns * @cost ~100ns
*/ */
void *dct(float M[8][8], float c0, float c1, float c2, float c3, float c4) { void *dct(float M[restrict hasatleast 8][8], unsigned stride,
float c0, float c1, float c2, float c3, float c4) {
unsigned y, x; unsigned y, x;
for (y = 0; y < 8; ++y) { for (y = 0; y < stride * 8; y += stride) {
DCT(M[y][0], M[y][1], M[y][2], M[y][3], M[y][4], M[y][5], M[y][6], M[y][7], DCT(M[y][0], M[y][1], M[y][2], M[y][3], M[y][4], M[y][5], M[y][6], M[y][7],
float, c0, c1, c2, c3, c4); float, c0, c1, c2, c3, c4);
} }
for (x = 0; x < 8; ++x) { for (x = 0; x < stride * 8; x += stride) {
DCT(M[0][x], M[1][x], M[2][x], M[3][x], M[4][x], M[5][x], M[6][x], M[7][x], DCT(M[0][x], M[1][x], M[2][x], M[3][x], M[4][x], M[5][x], M[6][x], M[7][x],
float, c0, c1, c2, c3, c4); float, c0, c1, c2, c3, c4);
} }
return M; return M;
} }
void *dctjpeg(float M[8][8]) { void *dctjpeg(float M[restrict hasatleast 8][8], unsigned stride) {
return dct(M, .707106781f, .382683433f, .541196100f, 1.306562965f, return dct(M, stride, .707106781f, .382683433f, .541196100f, 1.306562965f,
.707106781f); .707106781f);
} }

View file

@ -1,5 +1,5 @@
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐ #-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
#── vi: set et ft=make ts=8 sw=8 fenc=utf-8 :vi ──────────────────────┘ #── vi: set noet ft=make ts=8 sw=8 fenc=utf-8 :vi ────────────────────┘
PKGS += DSP_MPEG PKGS += DSP_MPEG

View file

@ -1,5 +1,5 @@
/*-*- mode:c;indent-tabs-mode:t;c-basic-offset:4;tab-width:4;coding:utf-8 -*-│ /*-*- mode:c;indent-tabs-mode:t;c-basic-offset:4;tab-width:4;coding:utf-8 -*-│
vi: set noet ft=c ts=4 sw=4 fenc=utf-8 :vi vi: set et ft=c ts=4 sw=4 fenc=utf-8 :vi
PL_MPEG - MPEG1 Video decoder, MP2 Audio decoder, MPEG-PS demuxer PL_MPEG - MPEG1 Video decoder, MP2 Audio decoder, MPEG-PS demuxer
Dominic Szablewski - https://phoboslab.org │ Dominic Szablewski - https://phoboslab.org │

View file

@ -1,5 +1,5 @@
/*-*- mode:c;indent-tabs-mode:t;c-basic-offset:4;tab-width:4;coding:utf-8 -*-│ /*-*- mode:c;indent-tabs-mode:t;c-basic-offset:4;tab-width:4;coding:utf-8 -*-│
vi: set noet ft=c ts=4 sw=4 fenc=utf-8 :vi vi: set et ft=c ts=4 sw=4 fenc=utf-8 :vi
PL_MPEG - MPEG1 Video decoder, MP2 Audio decoder, MPEG-PS demuxer PL_MPEG - MPEG1 Video decoder, MP2 Audio decoder, MPEG-PS demuxer
Dominic Szablewski - https://phoboslab.org │ Dominic Szablewski - https://phoboslab.org │

View file

@ -1,5 +1,5 @@
/*-*- mode:c;indent-tabs-mode:t;c-basic-offset:4;tab-width:4;coding:utf-8 -*-│ /*-*- mode:c;indent-tabs-mode:t;c-basic-offset:4;tab-width:4;coding:utf-8 -*-│
vi: set noet ft=c ts=4 sw=4 fenc=utf-8 :vi vi: set et ft=c ts=4 sw=4 fenc=utf-8 :vi
PL_MPEG - MPEG1 Video decoder, MP2 Audio decoder, MPEG-PS demuxer PL_MPEG - MPEG1 Video decoder, MP2 Audio decoder, MPEG-PS demuxer
Dominic Szablewski - https://phoboslab.org │ Dominic Szablewski - https://phoboslab.org │

View file

@ -1,5 +1,5 @@
/*-*- mode:c;indent-tabs-mode:t;c-basic-offset:4;tab-width:4;coding:utf-8 -*-│ /*-*- mode:c;indent-tabs-mode:t;c-basic-offset:4;tab-width:4;coding:utf-8 -*-│
vi: set noet ft=c ts=4 sw=4 fenc=utf-8 :vi vi: set et ft=c ts=4 sw=4 fenc=utf-8 :vi
PL_MPEG - MPEG1 Video decoder, MP2 Audio decoder, MPEG-PS demuxer PL_MPEG - MPEG1 Video decoder, MP2 Audio decoder, MPEG-PS demuxer
Dominic Szablewski - https://phoboslab.org │ Dominic Szablewski - https://phoboslab.org │

View file

@ -1,5 +1,5 @@
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐ #-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
#── vi: set et ft=make ts=8 sw=8 fenc=utf-8 :vi ──────────────────────┘ #── vi: set noet ft=make ts=8 sw=8 fenc=utf-8 :vi ────────────────────┘
PKGS += DSP_SCALE PKGS += DSP_SCALE

View file

@ -1,5 +1,5 @@
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐ #-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
#── vi: set et ft=make ts=8 sw=8 fenc=utf-8 :vi ──────────────────────┘ #── vi: set noet ft=make ts=8 sw=8 fenc=utf-8 :vi ────────────────────┘
PKGS += DSP_TTY PKGS += DSP_TTY

View file

@ -1,5 +1,5 @@
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐ #-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
#── vi: set et ft=make ts=8 sw=8 fenc=utf-8 :vi ──────────────────────┘ #── vi: set noet ft=make ts=8 sw=8 fenc=utf-8 :vi ────────────────────┘
PKGS += EXAMPLES PKGS += EXAMPLES

View file

@ -1,5 +1,5 @@
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐ #-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
#── vi: set et ft=make ts=8 sw=8 fenc=utf-8 :vi ──────────────────────┘ #── vi: set noet ft=make ts=8 sw=8 fenc=utf-8 :vi ────────────────────┘
# #
# SYNOPSIS # SYNOPSIS
# #

View file

@ -1,5 +1,5 @@
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐ #-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
#── vi: set et ft=make ts=8 sw=8 fenc=utf-8 :vi ──────────────────────┘ #── vi: set noet ft=make ts=8 sw=8 fenc=utf-8 :vi ────────────────────┘
# #
# SYNOPSIS # SYNOPSIS
# #

View file

@ -1,5 +1,5 @@
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐ #-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
#── vi: set et ft=make ts=8 sw=8 fenc=utf-8 :vi ──────────────────────┘ #── vi: set noet ft=make ts=8 sw=8 fenc=utf-8 :vi ────────────────────┘
# #
# SYNOPSIS # SYNOPSIS
# #

View file

@ -1,5 +1,5 @@
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐ #-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
#── vi: set et ft=make ts=8 sw=8 fenc=utf-8 :vi ──────────────────────┘ #── vi: set noet ft=make ts=8 sw=8 fenc=utf-8 :vi ────────────────────┘
# #
# SYNOPSIS # SYNOPSIS
# #

View file

@ -157,14 +157,14 @@
/* /*
* The follow should be set to reflect the type of system you have: * The follow should be set to reflect the type of system you have:
* JOBS -> 1 if you have Berkeley job control, 0 otherwise. * JOBS -> 1 if you have Berkeley job control, 0 otherwise.
* SHORTNAMES -> 1 if your linker cannot handle long names. * SHORTNAMES -> 1 if your linker cannot handle long names.
* define BSD if you are running 4.2 BSD or later. * define BSD if you are running 4.2 BSD or later.
* define SYSV if you are running under System V. * define SYSV if you are running under System V.
* define DEBUG=1 to compile in debugging ('set -o debug' to turn on) * define DEBUG=1 to compile in debugging ('set -o debug' to turn on)
* define DEBUG=2 to compile in and turn on debugging. * define DEBUG=2 to compile in and turn on debugging.
* define DO_SHAREDVFORK to indicate that vfork(2) shares its address * define DO_SHAREDVFORK to indicate that vfork(2) shares its address
* with its parent. * with its parent.
* *
* When debugging is on, debugging info will be written to ./trace and * When debugging is on, debugging info will be written to ./trace and
* a quit signal will generate a core dump. * a quit signal will generate a core dump.
@ -6604,10 +6604,10 @@ static struct job *growjobtab(void) {
* own process group. Jp is a job structure that the job is to be added to. * own process group. Jp is a job structure that the job is to be added to.
* N is the command that will be evaluated by the child. Both jp and n may * N is the command that will be evaluated by the child. Both jp and n may
* be NULL. The mode parameter can be one of the following: * be NULL. The mode parameter can be one of the following:
* FORK_FG - Fork off a foreground process. * FORK_FG - Fork off a foreground process.
* FORK_BG - Fork off a background process. * FORK_BG - Fork off a background process.
* FORK_NOJOB - Like FORK_FG, but don't give the process its own * FORK_NOJOB - Like FORK_FG, but don't give the process its own
* process group even if job control is on. * process group even if job control is on.
* *
* When job control is turned off, background processes have their standard * When job control is turned off, background processes have their standard
* input redirected to /dev/null (except for the second and later processes * input redirected to /dev/null (except for the second and later processes
@ -8403,10 +8403,10 @@ static void nlnoprompt(void) {
/* /*
* Read the next input token. * Read the next input token.
* If the token is a word, we set backquotelist to the list of cmds in * If the token is a word, we set backquotelist to the list of cmds in
* backquotes. We set quoteflag to true if any part of the word was * backquotes. We set quoteflag to true if any part of the word was
* quoted. * quoted.
* If the token is TREDIR, then we set redirnode to a structure containing * If the token is TREDIR, then we set redirnode to a structure containing
* the redirection. * the redirection.
* *
* [Change comment: here documents and internal procedures] * [Change comment: here documents and internal procedures]
* [Readtoken shouldn't have any arguments. Perhaps we should make the * [Readtoken shouldn't have any arguments. Perhaps we should make the
@ -9767,7 +9767,7 @@ out:
/* /*
* Print SysV echo(1) style escape string * Print SysV echo(1) style escape string
* Halts processing string if a \c escape is encountered. * Halts processing string if a \c escape is encountered.
*/ */
static int conv_escape_str(char *str, char **sp) { static int conv_escape_str(char *str, char **sp) {
int c; int c;
@ -9941,10 +9941,10 @@ static int echocmd(int argc, char **argv) {
*/ */
/* test(1) accepts the following grammar: /* test(1) accepts the following grammar:
oexpr ::= aexpr | aexpr "-o" oexpr ; oexpr ::= aexpr | aexpr "-o" oexpr ;
aexpr ::= nexpr | nexpr "-a" aexpr ; aexpr ::= nexpr | nexpr "-a" aexpr ;
nexpr ::= primary | "!" primary nexpr ::= primary | "!" primary
primary ::= unary-operator operand primary ::= unary-operator operand
| operand binary-operator operand | operand binary-operator operand
| operand | operand
| "(" oexpr ")" | "(" oexpr ")"

View file

@ -1,5 +1,5 @@
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐ #-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
#── vi: set et ft=make ts=8 sw=8 fenc=utf-8 :vi ──────────────────────┘ #── vi: set noet ft=make ts=8 sw=8 fenc=utf-8 :vi ────────────────────┘
PKGS += LIBC PKGS += LIBC

View file

@ -1,5 +1,5 @@
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐ #-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
#── vi: set et ft=make ts=8 sw=8 fenc=utf-8 :vi ──────────────────────┘ #── vi: set noet ft=make ts=8 sw=8 fenc=utf-8 :vi ────────────────────┘
# #
# SYNOPSIS # SYNOPSIS
# #

View file

@ -23,6 +23,7 @@
#include "libc/cosmo.h" #include "libc/cosmo.h"
#include "libc/dce.h" #include "libc/dce.h"
#include "libc/errno.h" #include "libc/errno.h"
#include "libc/fmt/libgen.h"
#include "libc/intrin/getenv.internal.h" #include "libc/intrin/getenv.internal.h"
#include "libc/serialize.h" #include "libc/serialize.h"
#include "libc/limits.h" #include "libc/limits.h"
@ -50,15 +51,65 @@ static inline int IsAlpha(int c) {
return ('A' <= c && c <= 'Z') || ('a' <= c && c <= 'z'); return ('A' <= c && c <= 'Z') || ('a' <= c && c <= 'z');
} }
static inline int AllNumDot(const char *s) {
while (true) {
switch (*s++) {
default: return 0;
case 0: return 1;
case '0': case '1': case '2': case '3': case '4':
case '5': case '6': case '7': case '8': case '9': case '.':
; /* continue */
}
}
}
// old loaders do not pass __program_executable_name, so we need to
// check for them when we use KERN_PROC_PATHNAME et al.
static int OldApeLoader(char *s) {
char *b;
return !strcmp(s, "/usr/bin/ape") ||
(!strncmp((b = basename(s)), ".ape-", 5) &&
AllNumDot(b + 5));
}
// if q exists then turn it into an absolute path. we also try adding
// a .com suffix since the ape auto-appends it when resolving
static int TryPath(const char *q, int com) {
char c, *p, *e;
if (!q) return 0;
p = g_prog.u.buf;
e = p + sizeof(g_prog.u.buf);
if (*q != '/') {
if (q[0] == '.' && q[1] == '/') {
q += 2;
}
int got = __getcwd(p, e - p - 1 /* '/' */ - com * 4);
if (got != -1) {
p += got - 1;
*p++ = '/';
}
}
while ((c = *q++)) {
if (p + com * 4 + 1 /* nul */ < e) {
*p++ = c;
} else {
return 0;
}
}
*p = 0;
if (!sys_faccessat(AT_FDCWD, g_prog.u.buf, F_OK, 0)) return 1;
if (!com) return 0;
p = WRITE32LE(p, READ32LE(".com"));
*p = 0;
if (!sys_faccessat(AT_FDCWD, g_prog.u.buf, F_OK, 0)) return 1;
return 0;
}
static inline void InitProgramExecutableNameImpl(void) { static inline void InitProgramExecutableNameImpl(void) {
size_t n; size_t n;
ssize_t got; ssize_t got;
char c, *q, *b; char c, *q, *b;
if (__program_executable_name) {
/* already set by the loader */
return;
}
if (IsWindows()) { if (IsWindows()) {
int n = GetModuleFileName(0, g_prog.u.buf16, ARRAYLEN(g_prog.u.buf16)); int n = GetModuleFileName(0, g_prog.u.buf16, ARRAYLEN(g_prog.u.buf16));
for (int i = 0; i < n; ++i) { for (int i = 0; i < n; ++i) {
@ -83,6 +134,22 @@ static inline void InitProgramExecutableNameImpl(void) {
return; return;
} }
// loader passed us a path. it may be relative.
if (__program_executable_name) {
if (*__program_executable_name == '/') {
return;
}
if (TryPath(__program_executable_name, 0)) {
goto UseBuf;
}
/* if TryPath fails, it probably failed because getcwd() was too long.
we are out of options now; KERN_PROC_PATHNAME et al will return the
name of the loader not the binary, and argv et al will at best have
the same problem. just use the relative path we got from the loader
as-is, and accept that if we chdir then things will break. */
return;
}
b = g_prog.u.buf; b = g_prog.u.buf;
n = sizeof(g_prog.u.buf) - 1; n = sizeof(g_prog.u.buf) - 1;
if (IsFreebsd() || IsNetbsd()) { if (IsFreebsd() || IsNetbsd()) {
@ -96,7 +163,7 @@ static inline void InitProgramExecutableNameImpl(void) {
} }
cmd[3] = -1; // current process cmd[3] = -1; // current process
if (sys_sysctl(cmd, ARRAYLEN(cmd), b, &n, 0, 0) != -1) { if (sys_sysctl(cmd, ARRAYLEN(cmd), b, &n, 0, 0) != -1) {
if (strcmp(b, "/usr/bin/ape")) { // XX old loader; warn? if (!OldApeLoader(b)) {
goto UseBuf; goto UseBuf;
} }
} }
@ -105,54 +172,27 @@ static inline void InitProgramExecutableNameImpl(void) {
if ((got = sys_readlinkat(AT_FDCWD, "/proc/self/exe", b, n)) > 0 || if ((got = sys_readlinkat(AT_FDCWD, "/proc/self/exe", b, n)) > 0 ||
(got = sys_readlinkat(AT_FDCWD, "/proc/curproc/file", b, n)) > 0) { (got = sys_readlinkat(AT_FDCWD, "/proc/curproc/file", b, n)) > 0) {
b[got] = 0; b[got] = 0;
if (strcmp(b, "/usr/bin/ape")) { if (!OldApeLoader(b)) {
goto UseBuf; goto UseBuf;
} }
} }
} }
// don't trust argument parsing if set-id.
if (issetugid()) { if (issetugid()) {
/* give up prior to using less secure methods */
goto UseEmpty; goto UseEmpty;
} }
// if argv[0] exists then turn it into an absolute path. we also try // try argv[0], then argv[0].com, then $_, then $_.com.
// adding a .com suffix since the ape auto-appends it when resolving if (TryPath(__argv[0], 1) ||
if ((q = __argv[0])) { /* TODO(mrdomino): remove after next loader mint */
char *p = g_prog.u.buf; TryPath(__getenv(__envp, "COSMOPOLITAN_PROGRAM_EXECUTABLE").s, 0) ||
char *e = p + sizeof(g_prog.u.buf); TryPath(__getenv(__envp, "_").s, 1)) {
if (*q != '/') { goto UseBuf;
if (q[0] == '.' && q[1] == '/') {
q += 2;
}
int got = __getcwd(p, e - p - 1 - 4); // for / and .com
if (got != -1) {
p += got - 1;
*p++ = '/';
}
}
while ((c = *q++)) {
if (p + 1 + 4 < e) { // for nul and .com
*p++ = c;
}
}
*p = 0;
if (!sys_faccessat(AT_FDCWD, g_prog.u.buf, F_OK, 0)) goto UseBuf;
p = WRITE32LE(p, READ32LE(".com"));
*p = 0;
if (!sys_faccessat(AT_FDCWD, g_prog.u.buf, F_OK, 0)) goto UseBuf;
}
/* the previous loader supplied the full program path as the first
environment variable. we also try "_". */
if ((q = __getenv(__envp, "COSMOPOLITAN_PROGRAM_EXECUTABLE").s) ||
(q = __getenv(__envp, "_").s)) {
goto CopyString;
} }
// give up and just copy argv[0] into it // give up and just copy argv[0] into it
if ((q = __argv[0])) { if ((q = __argv[0])) {
CopyString:
char *p = g_prog.u.buf; char *p = g_prog.u.buf;
char *e = p + sizeof(g_prog.u.buf); char *e = p + sizeof(g_prog.u.buf);
while ((c = *q++)) { while ((c = *q++)) {
@ -164,8 +204,8 @@ static inline void InitProgramExecutableNameImpl(void) {
goto UseBuf; goto UseBuf;
} }
// if we don't even have that then empty the string
UseEmpty: UseEmpty:
// if we don't even have that then empty the string
g_prog.u.buf[0] = 0; g_prog.u.buf[0] = 0;
UseBuf: UseBuf:

View file

@ -38,8 +38,8 @@
* @param tz is completely ignored * @param tz is completely ignored
* @return 0 on success, or -1 w/ errno * @return 0 on success, or -1 w/ errno
* @raise EFAULT if `tv` points to invalid memory * @raise EFAULT if `tv` points to invalid memory
* @see clock_gettime() for nanosecond precision * @see clock_gettime() for nanosecond precision
* @see strftime() for string formatting * @see strftime() for string formatting
* @asyncsignalsafe * @asyncsignalsafe
* @vforksafe * @vforksafe
*/ */

View file

@ -1,5 +1,5 @@
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐ #-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
#── vi: set et ft=make ts=8 sw=8 fenc=utf-8 :vi ──────────────────────┘ #── vi: set noet ft=make ts=8 sw=8 fenc=utf-8 :vi ────────────────────┘
# #
# SYNOPSIS # SYNOPSIS
# #

View file

@ -1,5 +1,5 @@
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐ #-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
#── vi: set et ft=make ts=8 sw=8 fenc=utf-8 :vi ──────────────────────┘ #── vi: set noet ft=make ts=8 sw=8 fenc=utf-8 :vi ────────────────────┘
PKGS += LIBC_DLOPEN PKGS += LIBC_DLOPEN

View file

@ -1,5 +1,5 @@
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐ #-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
#── vi: set et ft=make ts=8 sw=8 fenc=utf-8 :vi ──────────────────────┘ #── vi: set noet ft=make ts=8 sw=8 fenc=utf-8 :vi ────────────────────┘
PKGS += LIBC_DNS PKGS += LIBC_DNS

View file

@ -1,5 +1,5 @@
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐ #-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
#── vi: set et ft=make ts=8 sw=8 fenc=utf-8 :vi ──────────────────────┘ #── vi: set noet ft=make ts=8 sw=8 fenc=utf-8 :vi ────────────────────┘
PKGS += LIBC_ELF PKGS += LIBC_ELF

View file

@ -1,5 +1,5 @@
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐ #-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
#── vi: set et ft=make ts=8 sw=8 fenc=utf-8 :vi ──────────────────────┘ #── vi: set noet ft=make ts=8 sw=8 fenc=utf-8 :vi ────────────────────┘
# #
# SYNOPSIS # SYNOPSIS
# #

View file

@ -1,5 +1,5 @@
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐ #-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
#── vi: set et ft=make ts=8 sw=8 fenc=utf-8 :vi ──────────────────────┘ #── vi: set noet ft=make ts=8 sw=8 fenc=utf-8 :vi ────────────────────┘
PKGS += LIBC_INTRIN PKGS += LIBC_INTRIN

View file

@ -31,7 +31,7 @@
.balign 4 .balign 4
.underrun .underrun
kPollNames: kPollNames:
.e POLLNVAL "POLLNVAL" .e POLLNVAL "POLLNVAL"
.e POLLWRNORM "POLLWRNORM" .e POLLWRNORM "POLLWRNORM"
.e POLLWRBAND "POLLWRBAND" .e POLLWRBAND "POLLWRBAND"
.e POLLRDNORM "POLLRDNORM" .e POLLRDNORM "POLLRDNORM"

View file

@ -20,7 +20,7 @@
/** /**
* Timestamp of process start. * Timestamp of process start.
* *
* @see libc/runtime/winmain.greg.h * @see libc/runtime/winmain.greg.h
* @see libc/crt/crt.S * @see libc/crt/crt.S
*/ */
uint64_t kStartTsc; uint64_t kStartTsc;

View file

@ -1,5 +1,5 @@
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐ #-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
#── vi: set et ft=make ts=8 sw=8 fenc=utf-8 :vi ──────────────────────┘ #── vi: set noet ft=make ts=8 sw=8 fenc=utf-8 :vi ────────────────────┘
PKGS += LIBC_IRQ PKGS += LIBC_IRQ

View file

@ -1,5 +1,5 @@
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐ #-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
#── vi: set et ft=make ts=8 sw=8 fenc=utf-8 :vi ──────────────────────┘ #── vi: set noet ft=make ts=8 sw=8 fenc=utf-8 :vi ────────────────────┘
PKGS += LIBC_LOG PKGS += LIBC_LOG

View file

@ -1,5 +1,5 @@
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐ #-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
#── vi: set et ft=make ts=8 sw=8 fenc=utf-8 :vi ──────────────────────┘ #── vi: set noet ft=make ts=8 sw=8 fenc=utf-8 :vi ────────────────────┘
PKGS += LIBC_MEM PKGS += LIBC_MEM

View file

@ -63,7 +63,7 @@ static inline void swapfunc(char *, char *, size_t, int);
TYPE t = *pi; \ TYPE t = *pi; \
*pi++ = *pj; \ *pi++ = *pj; \
*pj++ = t; \ *pj++ = t; \
} while (--i > 0); \ } while (--i > 0); \
} }
static inline void static inline void
@ -110,7 +110,7 @@ med3(char *a, char *b, char *c, CMPPAR)
{ {
return CMP(a, b) < 0 ? return CMP(a, b) < 0 ?
(CMP(b, c) < 0 ? b : (CMP(a, c) < 0 ? c : a )) (CMP(b, c) < 0 ? b : (CMP(a, c) < 0 ? c : a ))
:(CMP(b, c) > 0 ? b : (CMP(a, c) < 0 ? a : c )); :(CMP(b, c) > 0 ? b : (CMP(a, c) < 0 ? a : c ));
} }
static void static void

View file

@ -1,5 +1,5 @@
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐ #-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
#── vi: set et ft=make ts=8 sw=8 fenc=utf-8 :vi ──────────────────────┘ #── vi: set noet ft=make ts=8 sw=8 fenc=utf-8 :vi ────────────────────┘
PKGS += LIBC_NEXGEN32E PKGS += LIBC_NEXGEN32E

View file

@ -36,7 +36,7 @@ blink_linux_aarch64:
.endobj blink_linux_aarch64,globl .endobj blink_linux_aarch64,globl
blink_linux_aarch64_size = . - blink_linux_aarch64 blink_linux_aarch64_size = . - blink_linux_aarch64
.section .emush,"a",@progbits .section .emush,"a",@progbits
.ascii "if [ \"$s\" = Linux ]; then\n" .ascii "if [ \"$s\" = Linux ]; then\n"
.ascii "if [ \"$m\" = aarch64 ] || [ \"$m\" = arm64 ]; then\n" .ascii "if [ \"$m\" = aarch64 ] || [ \"$m\" = arm64 ]; then\n"
.ascii "if ! [ -x \"$e\" ]; then\n" .ascii "if ! [ -x \"$e\" ]; then\n"

View file

@ -36,7 +36,7 @@ blink_xnu_aarch64:
.endobj blink_xnu_aarch64,globl .endobj blink_xnu_aarch64,globl
blink_xnu_aarch64_size = . - blink_xnu_aarch64 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 [ \"$s\" = Darwin ] && [ \"$m\" = arm64 ]; then\n"
.ascii "if ! [ -x \"$e\" ]; then\n" .ascii "if ! [ -x \"$e\" ]; then\n"
.ascii "echo \"extracting blink-darwin-aarch64 to ${e}\" >&2\n" .ascii "echo \"extracting blink-darwin-aarch64 to ${e}\" >&2\n"

View file

@ -1,5 +1,5 @@
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐ #-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
#── vi: set et ft=make ts=8 sw=8 fenc=utf-8 :vi ──────────────────────┘ #── vi: set noet ft=make ts=8 sw=8 fenc=utf-8 :vi ────────────────────┘
PKGS += LIBC_NT PKGS += LIBC_NT

View file

@ -1,5 +1,5 @@
/usr/bin/env echo ' -*-mode:sh;indent-tabs-mode:nil;tab-width:8;coding:utf-8-*-│ /usr/bin/env echo ' -*-mode:sh;indent-tabs-mode:nil;tab-width:8;coding:utf-8-*-│
│ vi: set et ft=sh ts=2 sts=2 sw=2 fenc=utf-8 :vi │ │ vi: set et ft=sh ts=8 sts=2 sw=2 fenc=utf-8 :vi │
╞══════════════════════════════════════════════════════════════════════════════╡ ╞══════════════════════════════════════════════════════════════════════════════╡
│ Copyright 2020 Justine Alexandra Roberts Tunney │ │ Copyright 2020 Justine Alexandra Roberts Tunney │
│ │ │ │
@ -61,9 +61,9 @@ imp() {
thunk() { thunk() {
printf ' printf '
.text.windows .text.windows
.ftrace1 .ftrace1
%s: %s:
.ftrace2 .ftrace2
#ifdef __x86_64__ #ifdef __x86_64__
push %%rbp push %%rbp
mov %%rsp,%%rbp mov %%rsp,%%rbp
@ -81,9 +81,9 @@ thunk() {
thunk0() { thunk0() {
printf ' printf '
.text.windows .text.windows
.ftrace1 .ftrace1
%s: %s:
.ftrace2 .ftrace2
#ifdef __x86_64__ #ifdef __x86_64__
push %%rbp push %%rbp
mov %%rsp,%%rbp mov %%rsp,%%rbp
@ -102,9 +102,9 @@ thunk0() {
thunk1() { thunk1() {
printf ' printf '
.text.windows .text.windows
.ftrace1 .ftrace1
%s: %s:
.ftrace2 .ftrace2
#ifdef __x86_64__ #ifdef __x86_64__
push %%rbp push %%rbp
mov %%rsp,%%rbp mov %%rsp,%%rbp

View file

@ -1,5 +1,5 @@
/usr/bin/env echo ' -*-mode:sh;indent-tabs-mode:nil;tab-width:8;coding:utf-8-*-│ /usr/bin/env echo ' -*-mode:sh;indent-tabs-mode:nil;tab-width:8;coding:utf-8-*-│
│ vi: set et ft=sh ts=2 sts=2 sw=2 fenc=utf-8 :vi │ │ vi: set noet ft=sh ts=8 sts=8 sw=8 fenc=utf-8 :vi │
╚────────────────────────────────────────────────────────────────'>/dev/null #*/ ╚────────────────────────────────────────────────────────────────'>/dev/null #*/
. libc/nt/codegen.sh . libc/nt/codegen.sh

View file

@ -1,5 +1,5 @@
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐ #-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
#── vi: set et ft=make ts=8 sw=8 fenc=utf-8 :vi ──────────────────────┘ #── vi: set noet ft=make ts=8 sw=8 fenc=utf-8 :vi ────────────────────┘
PKGS += LIBC_PROC PKGS += LIBC_PROC

View file

@ -1,5 +1,5 @@
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐ #-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
#── vi: set et ft=make ts=8 sw=8 fenc=utf-8 :vi ──────────────────────┘ #── vi: set noet ft=make ts=8 sw=8 fenc=utf-8 :vi ────────────────────┘
# #
# SYNOPSIS # SYNOPSIS
# #

View file

@ -1,5 +1,5 @@
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐ #-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
#── vi: set et ft=make ts=8 sw=8 fenc=utf-8 :vi ──────────────────────┘ #── vi: set noet ft=make ts=8 sw=8 fenc=utf-8 :vi ────────────────────┘
PKGS += LIBC_SOCK PKGS += LIBC_SOCK

View file

@ -1,5 +1,5 @@
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐ #-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
#── vi: set et ft=make ts=8 sw=8 fenc=utf-8 :vi ──────────────────────┘ #── vi: set noet ft=make ts=8 sw=8 fenc=utf-8 :vi ────────────────────┘
PKGS += LIBC_STDIO PKGS += LIBC_STDIO

View file

@ -22,7 +22,7 @@
* Clears eof and error state indicators on stream. * Clears eof and error state indicators on stream.
* *
* @param f is file object stream pointer * @param f is file object stream pointer
* @see clearerr_unlocked() * @see clearerr_unlocked()
*/ */
void clearerr(FILE *f) { void clearerr(FILE *f) {
flockfile(f); flockfile(f);

View file

@ -23,7 +23,7 @@
* Clears eof and error state indicators on stream. * Clears eof and error state indicators on stream.
* *
* @param f is file object stream pointer * @param f is file object stream pointer
* @see clearerr() * @see clearerr()
*/ */
void clearerr_unlocked(FILE *f) { void clearerr_unlocked(FILE *f) {
f->state = 0; f->state = 0;

View file

@ -22,7 +22,7 @@
* Returns true if stream is in end-of-file state. * Returns true if stream is in end-of-file state.
* *
* @param f is file object stream pointer * @param f is file object stream pointer
* @see feof_unlocked() * @see feof_unlocked()
*/ */
int feof(FILE *f) { int feof(FILE *f) {
int rc; int rc;

View file

@ -23,7 +23,7 @@
* Returns true if stream is in end-of-file state. * Returns true if stream is in end-of-file state.
* *
* @param f is file object stream pointer * @param f is file object stream pointer
* @see feof() * @see feof()
*/ */
int feof_unlocked(FILE *f) { int feof_unlocked(FILE *f) {
return f->state == -1; return f->state == -1;

View file

@ -1,5 +1,5 @@
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-│ /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-│
vi: set et ft=c ts=2 sts=2 sw=2 fenc=utf-8 :vi vi: set noet ft=c ts=2 sts=2 sw=2 fenc=utf-8 :vi
Musl Libc Musl Libc

View file

@ -1,5 +1,5 @@
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐ #-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
#── vi: set et ft=make ts=8 sw=8 fenc=utf-8 :vi ──────────────────────┘ #── vi: set noet ft=make ts=8 sw=8 fenc=utf-8 :vi ────────────────────┘
PKGS += LIBC_STR PKGS += LIBC_STR

View file

@ -1,5 +1,5 @@
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐ #-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
#── vi: set et ft=make ts=8 sw=8 fenc=utf-8 :vi ──────────────────────┘ #── vi: set noet ft=make ts=8 sw=8 fenc=utf-8 :vi ────────────────────┘
PKGS += LIBC_SYSV PKGS += LIBC_SYSV
LIBC_SYSV_LIBS = $(foreach x,$(LIBC_SYSV_ARTIFACTS),$($(x)_A)) LIBC_SYSV_LIBS = $(foreach x,$(LIBC_SYSV_ARTIFACTS),$($(x)_A))

View file

@ -1,5 +1,5 @@
/*bin/echo ' -*- mode:sh; indent-tabs-mode:nil; tab-width:8; coding:utf-8 -*-│ /*bin/echo ' -*- mode:sh; indent-tabs-mode:nil; tab-width:8; coding:utf-8 -*-│
│ vi: set et ft=sh ts=2 sts=2 sw=2 fenc=utf-8 :vi │ │ vi: set noet ft=sh ts=8 sts=8 sw=8 fenc=utf-8 :vi │
╞══════════════════════════════════════════════════════════════════════════════╡ ╞══════════════════════════════════════════════════════════════════════════════╡
│ Copyright 2020 Justine Alexandra Roberts Tunney │ │ Copyright 2020 Justine Alexandra Roberts Tunney │
│ │ │ │

View file

@ -1,5 +1,5 @@
/*bin/echo ' -*- mode:sh; indent-tabs-mode:nil; tab-width:8; coding:utf-8 -*-│ /*bin/echo ' -*- mode:sh; indent-tabs-mode:nil; tab-width:8; coding:utf-8 -*-│
│ vi: set et ft=sh ts=2 sts=2 sw=2 fenc=utf-8 :vi │ │ vi: set noet ft=sh ts=8 sts=8 sw=8 fenc=utf-8 :vi │
╞══════════════════════════════════════════════════════════════════════════════╡ ╞══════════════════════════════════════════════════════════════════════════════╡
│ Copyright 2020 Justine Alexandra Roberts Tunney │ │ Copyright 2020 Justine Alexandra Roberts Tunney │
│ │ │ │

View file

@ -27,9 +27,9 @@
* defined as variables. By convention, system calls and other * defined as variables. By convention, system calls and other
* functions do not update this variable when nothing's broken. * functions do not update this variable when nothing's broken.
* *
* @see libc/sysv/consts.sh * @see libc/sysv/consts.sh
* @see libc/sysv/errfuns.h * @see libc/sysv/errfuns.h
* @see __errno_location() stable abi * @see __errno_location() stable abi
*/ */
errno_t __errno; errno_t __errno;

View file

@ -1,5 +1,5 @@
/*bin/echo ' -*- mode:sh; indent-tabs-mode:nil; tab-width:8; coding:utf-8 -*-│ /*bin/echo ' -*- mode:sh; indent-tabs-mode:nil; tab-width:8; coding:utf-8 -*-│
│ vi: set et ft=sh ts=2 sts=2 sw=2 fenc=utf-8 :vi │ │ vi: set et ft=sh ts=8 sts=2 sw=2 fenc=utf-8 :vi │
╞══════════════════════════════════════════════════════════════════════════════╡ ╞══════════════════════════════════════════════════════════════════════════════╡
│ Copyright 2020 Justine Alexandra Roberts Tunney │ │ Copyright 2020 Justine Alexandra Roberts Tunney │
│ │ │ │

View file

@ -1,5 +1,5 @@
/*bin/echo ' -*- mode:sh; indent-tabs-mode:nil; tab-width:8; coding:utf-8 -*-│ /*bin/echo ' -*- mode:sh; indent-tabs-mode:nil; tab-width:8; coding:utf-8 -*-│
│ vi: set et ft=sh ts=2 sts=2 sw=2 fenc=utf-8 :vi │ │ vi: set noet ft=sh ts=8 sts=8 sw=8 fenc=utf-8 :vi │
╞══════════════════════════════════════════════════════════════════════════════╡ ╞══════════════════════════════════════════════════════════════════════════════╡
│ Copyright 2020 Justine Alexandra Roberts Tunney │ │ Copyright 2020 Justine Alexandra Roberts Tunney │
│ │ │ │

View file

@ -1,5 +1,5 @@
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐ #-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
#── vi: set et ft=make ts=8 sw=8 fenc=utf-8 :vi ──────────────────────┘ #── vi: set noet ft=make ts=8 sw=8 fenc=utf-8 :vi ────────────────────┘
# Description: # Description:
# Cosmopolitan Testing Library. # Cosmopolitan Testing Library.

View file

@ -1,5 +1,5 @@
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐ #-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
#── vi: set et ft=make ts=8 sw=8 fenc=utf-8 :vi ──────────────────────┘ #── vi: set noet ft=make ts=8 sw=8 fenc=utf-8 :vi ────────────────────┘
PKGS += LIBC_THREAD PKGS += LIBC_THREAD

View file

@ -1,5 +1,5 @@
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐ #-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
#── vi: set et ft=make ts=8 sw=8 fenc=utf-8 :vi ──────────────────────┘ #── vi: set noet ft=make ts=8 sw=8 fenc=utf-8 :vi ────────────────────┘
PKGS += LIBC_TIME PKGS += LIBC_TIME

View file

@ -118,7 +118,7 @@ static const char gmt[] = "GMT";
#endif #endif
struct ttinfo { /* time type information */ struct ttinfo { /* time type information */
int32_t tt_utoff; /* UT offset in seconds */ int32_t tt_utoff; /* UT offset in seconds */
bool tt_isdst; /* used to set tm_isdst */ bool tt_isdst; /* used to set tm_isdst */
int tt_desigidx; /* abbreviation list index */ int tt_desigidx; /* abbreviation list index */
bool tt_ttisstd; /* transition is std time */ bool tt_ttisstd; /* transition is std time */
@ -127,7 +127,7 @@ struct ttinfo { /* time type information */
struct lsinfo { /* leap second information */ struct lsinfo { /* leap second information */
time_t ls_trans; /* transition time */ time_t ls_trans; /* transition time */
int32_t ls_corr; /* correction to apply */ int32_t ls_corr; /* correction to apply */
}; };
#define SMALLEST(a, b) (((a) < (b)) ? (a) : (b)) #define SMALLEST(a, b) (((a) < (b)) ? (a) : (b))
@ -1093,8 +1093,8 @@ localtime_tzparse(const char *name, struct state *sp, struct state *basep)
size_t stdlen; size_t stdlen;
size_t dstlen; size_t dstlen;
size_t charcnt; size_t charcnt;
int32_t stdoffset; int32_t stdoffset;
int32_t dstoffset; int32_t dstoffset;
register char * cp; register char * cp;
register bool load_ok; register bool load_ok;
time_t atlo = TIME_T_MIN, leaplo = TIME_T_MIN; time_t atlo = TIME_T_MIN, leaplo = TIME_T_MIN;

View file

@ -1,5 +1,5 @@
/*-*- mode:c;indent-tabs-mode:t;c-basic-offset:2;tab-width:8;coding:utf-8 -*-│ /*-*- mode:c;indent-tabs-mode:t;c-basic-offset:2;tab-width:8;coding:utf-8 -*-│
vi: set noet ft=c ts=2 sw=8 fenc=utf-8 :vi vi: set et ft=c ts=2 sw=8 fenc=utf-8 :vi
Musl Libc Musl Libc

View file

@ -1,5 +1,5 @@
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐ #-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
#── vi: set et ft=make ts=8 sw=8 fenc=utf-8 :vi ──────────────────────┘ #── vi: set noet ft=make ts=8 sw=8 fenc=utf-8 :vi ────────────────────┘
PKGS += LIBC_TINYMATH PKGS += LIBC_TINYMATH

View file

@ -1,5 +1,5 @@
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-│ /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-│
vi: set et ft=c ts=2 sts=2 sw=2 fenc=utf-8 :vi vi: set et ft=c ts=8 sts=2 sw=2 fenc=utf-8 :vi
Optimized Routines Optimized Routines

View file

@ -1,5 +1,5 @@
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-│ /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-│
vi: set et ft=c ts=2 sts=2 sw=2 fenc=utf-8 :vi vi: set et ft=c ts=8 sts=2 sw=2 fenc=utf-8 :vi
Optimized Routines Optimized Routines

View file

@ -1,5 +1,5 @@
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-│ /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-│
vi: set et ft=c ts=2 sts=2 sw=2 fenc=utf-8 :vi vi: set et ft=c ts=8 sts=2 sw=2 fenc=utf-8 :vi
Optimized Routines Optimized Routines

View file

@ -1,5 +1,5 @@
/*-*- mode:c;indent-tabs-mode:t;c-basic-offset:8;tab-width:8;coding:utf-8 -*-│ /*-*- mode:c;indent-tabs-mode:t;c-basic-offset:8;tab-width:8;coding:utf-8 -*-│
vi: set noet ft=c ts=8 sw=8 fenc=utf-8 :vi vi: set et ft=c ts=8 sw=8 fenc=utf-8 :vi
Musl Libc Musl Libc

View file

@ -1,5 +1,5 @@
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-│ /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-│
vi: set et ft=c ts=2 sts=2 sw=2 fenc=utf-8 :vi vi: set noet ft=c ts=2 sts=2 sw=2 fenc=utf-8 :vi
Copyright 2023 Justine Alexandra Roberts Tunney Copyright 2023 Justine Alexandra Roberts Tunney

View file

@ -1,5 +1,5 @@
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-│ /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-│
vi: set et ft=c ts=2 sts=2 sw=2 fenc=utf-8 :vi vi: set et ft=c ts=8 sts=2 sw=2 fenc=utf-8 :vi
Optimized Routines Optimized Routines

View file

@ -1,5 +1,5 @@
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-│ /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-│
vi: set et ft=c ts=2 sts=2 sw=2 fenc=utf-8 :vi vi: set et ft=c ts=8 sts=2 sw=2 fenc=utf-8 :vi
Optimized Routines Optimized Routines

View file

@ -1,5 +1,5 @@
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-│ /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-│
vi: set et ft=c ts=2 sts=2 sw=2 fenc=utf-8 :vi vi: set et ft=c ts=8 sts=2 sw=2 fenc=utf-8 :vi
Copyright 2021 Justine Alexandra Roberts Tunney Copyright 2021 Justine Alexandra Roberts Tunney

View file

@ -1,5 +1,5 @@
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-│ /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-│
vi: set et ft=c ts=2 sts=2 sw=2 fenc=utf-8 :vi vi: set et ft=c ts=8 sts=2 sw=2 fenc=utf-8 :vi
Copyright 2023 Justine Alexandra Roberts Tunney Copyright 2023 Justine Alexandra Roberts Tunney

View file

@ -1,5 +1,5 @@
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-│ /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-│
vi: set et ft=c ts=2 sts=2 sw=2 fenc=utf-8 :vi vi: set et ft=c ts=8 sts=2 sw=2 fenc=utf-8 :vi
Optimized Routines Optimized Routines

View file

@ -1,5 +1,5 @@
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-│ /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-│
vi: set et ft=c ts=2 sts=2 sw=2 fenc=utf-8 :vi vi: set et ft=c ts=8 sts=2 sw=2 fenc=utf-8 :vi
Optimized Routines Optimized Routines

View file

@ -1,5 +1,5 @@
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐ #-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
#── vi: set et ft=make ts=8 sw=8 fenc=utf-8 :vi ──────────────────────┘ #── vi: set noet ft=make ts=8 sw=8 fenc=utf-8 :vi ────────────────────┘
PKGS += LIBC_VGA PKGS += LIBC_VGA

View file

@ -1,5 +1,5 @@
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐ #-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
#── vi: set et ft=make ts=8 sw=8 fenc=utf-8 :vi ──────────────────────┘ #── vi: set noet ft=make ts=8 sw=8 fenc=utf-8 :vi ────────────────────┘
# #
# SYNOPSIS # SYNOPSIS
# #

View file

@ -1,5 +1,5 @@
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐ #-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
#── vi: set et ft=make ts=8 sw=8 fenc=utf-8 :vi ──────────────────────┘ #── vi: set noet ft=make ts=8 sw=8 fenc=utf-8 :vi ────────────────────┘
.PHONY: o/$(MODE)/net .PHONY: o/$(MODE)/net
o/$(MODE)/net: o/$(MODE)/net/finger \ o/$(MODE)/net: o/$(MODE)/net/finger \

View file

@ -1,5 +1,5 @@
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐ #-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
#── vi: set et ft=make ts=8 sw=8 fenc=utf-8 :vi ──────────────────────┘ #── vi: set noet ft=make ts=8 sw=8 fenc=utf-8 :vi ────────────────────┘
PKGS += NET_FINGER PKGS += NET_FINGER

View file

@ -1,5 +1,5 @@
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐ #-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
#── vi: set et ft=make ts=8 sw=8 fenc=utf-8 :vi ──────────────────────┘ #── vi: set noet ft=make ts=8 sw=8 fenc=utf-8 :vi ────────────────────┘
PKGS += NET_HTTP PKGS += NET_HTTP

View file

@ -1,5 +1,5 @@
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐ #-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
#── vi: set et ft=make ts=8 sw=8 fenc=utf-8 :vi ──────────────────────┘ #── vi: set noet ft=make ts=8 sw=8 fenc=utf-8 :vi ────────────────────┘
PKGS += NET_HTTPS PKGS += NET_HTTPS

View file

@ -1,5 +1,5 @@
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐ #-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
#── vi: set et ft=make ts=8 sw=8 fenc=utf-8 :vi ──────────────────────┘ #── vi: set noet ft=make ts=8 sw=8 fenc=utf-8 :vi ────────────────────┘
PKGS += NET_TURFWAR PKGS += NET_TURFWAR

View file

@ -1,5 +1,5 @@
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐ #-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
#── vi: set et ft=make ts=8 sw=8 fenc=utf-8 :vi ──────────────────────┘ #── vi: set noet ft=make ts=8 sw=8 fenc=utf-8 :vi ────────────────────┘
.PHONY: o/$(MODE)/test .PHONY: o/$(MODE)/test
o/$(MODE)/test: o/$(MODE)/test/dsp \ o/$(MODE)/test: o/$(MODE)/test/dsp \

View file

@ -1,5 +1,5 @@
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐ #-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
#── vi: set et ft=make ts=8 sw=8 fenc=utf-8 :vi ──────────────────────┘ #── vi: set noet ft=make ts=8 sw=8 fenc=utf-8 :vi ────────────────────┘
.PHONY: o/$(MODE)/test/dsp .PHONY: o/$(MODE)/test/dsp
o/$(MODE)/test/dsp: o/$(MODE)/test/dsp/core \ o/$(MODE)/test/dsp: o/$(MODE)/test/dsp/core \

View file

@ -1,5 +1,5 @@
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐ #-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
#── vi: set et ft=make ts=8 sw=8 fenc=utf-8 :vi ──────────────────────┘ #── vi: set noet ft=make ts=8 sw=8 fenc=utf-8 :vi ────────────────────┘
PKGS += TEST_DSP_CORE PKGS += TEST_DSP_CORE

View file

@ -1,5 +1,5 @@
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐ #-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
#── vi: set et ft=make ts=8 sw=8 fenc=utf-8 :vi ──────────────────────┘ #── vi: set noet ft=make ts=8 sw=8 fenc=utf-8 :vi ────────────────────┘
PKGS += TEST_DSP_SCALE PKGS += TEST_DSP_SCALE

View file

@ -1,5 +1,5 @@
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐ #-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
#── vi: set et ft=make ts=8 sw=8 fenc=utf-8 :vi ──────────────────────┘ #── vi: set noet ft=make ts=8 sw=8 fenc=utf-8 :vi ────────────────────┘
PKGS += TEST_DSP_TTY PKGS += TEST_DSP_TTY

View file

@ -1,5 +1,5 @@
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐ #-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
#── vi: set et ft=make ts=8 sw=8 fenc=utf-8 :vi ──────────────────────┘ #── vi: set noet ft=make ts=8 sw=8 fenc=utf-8 :vi ────────────────────┘
.PHONY: o/$(MODE)/test/libc .PHONY: o/$(MODE)/test/libc
o/$(MODE)/test/libc: \ o/$(MODE)/test/libc: \

View file

@ -1,5 +1,5 @@
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐ #-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
#── vi: set et ft=make ts=8 sw=8 fenc=utf-8 :vi ──────────────────────┘ #── vi: set noet ft=make ts=8 sw=8 fenc=utf-8 :vi ────────────────────┘
PKGS += TEST_LIBC_CALLS PKGS += TEST_LIBC_CALLS

View file

@ -1,5 +1,5 @@
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐ #-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
#── vi: set et ft=make ts=8 sw=8 fenc=utf-8 :vi ──────────────────────┘ #── vi: set noet ft=make ts=8 sw=8 fenc=utf-8 :vi ────────────────────┘
PKGS += TEST_LIBC_DNS PKGS += TEST_LIBC_DNS

View file

@ -1,5 +1,5 @@
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐ #-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
#── vi: set et ft=make ts=8 sw=8 fenc=utf-8 :vi ──────────────────────┘ #── vi: set noet ft=make ts=8 sw=8 fenc=utf-8 :vi ────────────────────┘
PKGS += TEST_LIBC_FMT PKGS += TEST_LIBC_FMT

View file

@ -1,5 +1,5 @@
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐ #-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
#── vi: set et ft=make ts=8 sw=8 fenc=utf-8 :vi ──────────────────────┘ #── vi: set noet ft=make ts=8 sw=8 fenc=utf-8 :vi ────────────────────┘
PKGS += TEST_LIBC_INTRIN PKGS += TEST_LIBC_INTRIN

View file

@ -1,5 +1,5 @@
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐ #-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
#── vi: set et ft=make ts=8 sw=8 fenc=utf-8 :vi ──────────────────────┘ #── vi: set noet ft=make ts=8 sw=8 fenc=utf-8 :vi ────────────────────┘
PKGS += TEST_LIBC_LOG PKGS += TEST_LIBC_LOG

View file

@ -1,5 +1,5 @@
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐ #-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
#── vi: set et ft=make ts=8 sw=8 fenc=utf-8 :vi ──────────────────────┘ #── vi: set noet ft=make ts=8 sw=8 fenc=utf-8 :vi ────────────────────┘
PKGS += TEST_LIBC_MEM PKGS += TEST_LIBC_MEM

View file

@ -1,5 +1,5 @@
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐ #-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
#── vi: set et ft=make ts=8 sw=8 fenc=utf-8 :vi ──────────────────────┘ #── vi: set noet ft=make ts=8 sw=8 fenc=utf-8 :vi ────────────────────┘
PKGS += TEST_LIBC_NEXGEN32E PKGS += TEST_LIBC_NEXGEN32E

View file

@ -1,5 +1,5 @@
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐ #-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
#── vi: set et ft=make ts=8 sw=8 fenc=utf-8 :vi ──────────────────────┘ #── vi: set noet ft=make ts=8 sw=8 fenc=utf-8 :vi ────────────────────┘
PKGS += TEST_LIBC_PROC PKGS += TEST_LIBC_PROC

View file

@ -1,5 +1,5 @@
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐ #-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
#── vi: set et ft=make ts=8 sw=8 fenc=utf-8 :vi ──────────────────────┘ #── vi: set noet ft=make ts=8 sw=8 fenc=utf-8 :vi ────────────────────┘
ifneq ($(MODE), dbg) ifneq ($(MODE), dbg)
ifneq ($(MODE), asan) ifneq ($(MODE), asan)

Some files were not shown because too many files have changed in this diff Show more