Avoid linker conflicts on DescribeFoo symbols

These symbols belong to the user. It caused a confusing error for Blink.
This commit is contained in:
Justine Tunney 2024-08-24 18:10:22 -07:00
parent 38cc4b3c68
commit bb06230f1e
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
120 changed files with 346 additions and 347 deletions

View file

@ -5,9 +5,9 @@ COSMOPOLITAN_C_START_
int sys_getgroups(int size, uint32_t list[]);
int sys_setgroups(size_t size, const uint32_t list[]);
const char *DescribeGidList(char[128], int, int, const uint32_t list[]);
const char *_DescribeGidList(char[128], int, int, const uint32_t list[]);
#define DescribeGidList(rc, length, gidlist) \
DescribeGidList(alloca(128), rc, length, gidlist)
_DescribeGidList(alloca(128), rc, length, gidlist)
COSMOPOLITAN_C_END_
#endif /* COSMOPOLITAN_LIBC_CALLS_GROUPS_INTERNAL_H_ */

View file

@ -18,8 +18,8 @@
*/
#include "libc/calls/internal.h"
#include "libc/calls/state.internal.h"
#include "libc/intrin/fds.h"
#include "libc/intrin/describeflags.h"
#include "libc/intrin/fds.h"
#include "libc/intrin/kprintf.h"
static const char *__fdkind2str(int x) {
@ -55,7 +55,7 @@ void __printfds(struct Fd *fds, size_t fdslen) {
continue;
kprintf("%3d %s", i, __fdkind2str(fds[i].kind));
if (fds[i].flags) {
kprintf(" flags=%s", (DescribeOpenFlags)(buf, fds[i].flags));
kprintf(" flags=%s", _DescribeOpenFlags(buf, fds[i].flags));
}
if (fds[i].mode)
kprintf(" mode=%#o", fds[i].mode);

View file

@ -82,7 +82,7 @@ int seccomp(unsigned operation, unsigned flags, void *args) {
} else {
rc = enosys();
}
STRACE("seccomp(%s, %#x, %p) → %d% m", DescribeSeccompOperation(operation),
STRACE("seccomp(%s, %#x, %p) → %d% m", _DescribeSeccompOperation(operation),
flags, args, rc);
return rc;
}

View file

@ -194,7 +194,7 @@ textwindows int __sig_raise(volatile int sig, int sic) {
char ssbuf[128];
siginfo_t si = {.si_signo = sig, .si_code = sic};
STRACE("__sig_raise(%G, %t) mask %s", sig, __sig_handler(rva),
(DescribeSigset)(ssbuf, 0, (sigset_t *)&pt->tib->tib_sigmask));
_DescribeSigset(ssbuf, 0, (sigset_t *)&pt->tib->tib_sigmask));
__sig_handler(rva)(sig, &si, &ctx);
// record this handler
@ -265,8 +265,8 @@ static textwindows wontreturn void __sig_tramp(struct SignalFrame *sf) {
// call the user's signal handler
char ssbuf[2][128];
STRACE("__sig_tramp(%G, %t) mask %s → %s", sig, __sig_handler(sf->rva),
(DescribeSigset)(ssbuf[0], 0, &sf->ctx.uc_sigmask),
(DescribeSigset)(ssbuf[1], 0, (sigset_t *)&tib->tib_sigmask));
_DescribeSigset(ssbuf[0], 0, &sf->ctx.uc_sigmask),
_DescribeSigset(ssbuf[1], 0, (sigset_t *)&tib->tib_sigmask));
__sig_handler(sf->rva)(sig, &sf->si, &sf->ctx);
// restore the signal mask that was used by the interrupted code

View file

@ -4,8 +4,8 @@
#include "libc/mem/alloca.h"
COSMOPOLITAN_C_START_
const char *DescribeFlock(char[300], int, const struct flock *);
#define DescribeFlock(c, l) DescribeFlock(alloca(300), c, l)
const char *_DescribeFlock(char[300], int, const struct flock *);
#define DescribeFlock(c, l) _DescribeFlock(alloca(300), c, l)
COSMOPOLITAN_C_END_
#endif /* COSMOPOLITAN_LIBC_CALLS_STRUCT_FLOCK_INTERNAL_H_ */

View file

@ -1,7 +1,7 @@
#ifndef COSMOPOLITAN_LIBC_CALLS_STRUCT_IOVEC_INTERNAL_H_
#define COSMOPOLITAN_LIBC_CALLS_STRUCT_IOVEC_INTERNAL_H_
#include "libc/intrin/fds.h"
#include "libc/calls/struct/iovec.h"
#include "libc/intrin/fds.h"
#include "libc/mem/alloca.h"
COSMOPOLITAN_C_START_
@ -22,8 +22,8 @@ ssize_t sys_send_nt(int, const struct iovec *, size_t, uint32_t);
ssize_t sys_sendto_nt(int, const struct iovec *, size_t, uint32_t, const void *,
uint32_t);
const char *DescribeIovec(char[300], ssize_t, const struct iovec *, int);
#define DescribeIovec(x, y, z) DescribeIovec(alloca(300), x, y, z)
const char *_DescribeIovec(char[300], ssize_t, const struct iovec *, int);
#define DescribeIovec(x, y, z) _DescribeIovec(alloca(300), x, y, z)
COSMOPOLITAN_C_END_
#endif /* COSMOPOLITAN_LIBC_CALLS_STRUCT_IOVEC_INTERNAL_H_ */

View file

@ -8,8 +8,8 @@ int sys_getitimer(int, struct itimerval *);
int sys_setitimer(int, const struct itimerval *, struct itimerval *);
int sys_setitimer_nt(int, const struct itimerval *, struct itimerval *);
const char *DescribeItimerval(char[90], int, const struct itimerval *);
#define DescribeItimerval(rc, ts) DescribeItimerval(alloca(90), rc, ts)
const char *_DescribeItimerval(char[90], int, const struct itimerval *);
#define DescribeItimerval(rc, ts) _DescribeItimerval(alloca(90), rc, ts)
COSMOPOLITAN_C_END_
#endif /* COSMOPOLITAN_LIBC_CALLS_STRUCT_ITIMERVAL_INTERNAL_H_ */

View file

@ -8,8 +8,8 @@ int sys_getrlimit(int, struct rlimit *);
int sys_setrlimit(int, const struct rlimit *);
int sys_setrlimit_nt(int, const struct rlimit *);
const char *DescribeRlimit(char[64], int, const struct rlimit *);
#define DescribeRlimit(rc, rl) DescribeRlimit(alloca(64), rc, rl)
const char *_DescribeRlimit(char[64], int, const struct rlimit *);
#define DescribeRlimit(rc, rl) _DescribeRlimit(alloca(64), rc, rl)
COSMOPOLITAN_C_END_
#endif /* COSMOPOLITAN_LIBC_CALLS_STRUCT_RLIMIT_INTERNAL_H_ */

View file

@ -4,8 +4,8 @@
#include "libc/mem/alloca.h"
COSMOPOLITAN_C_START_
const char *DescribeSchedParam(char[32], const struct sched_param *);
#define DescribeSchedParam(x) DescribeSchedParam(alloca(32), x)
const char *_DescribeSchedParam(char[32], const struct sched_param *);
#define DescribeSchedParam(x) _DescribeSchedParam(alloca(32), x)
COSMOPOLITAN_C_END_
#endif /* COSMOPOLITAN_LIBC_CALLS_STRUCT_SCHED_PARAM_INTERNAL_H_ */

View file

@ -66,8 +66,8 @@ void __sigenter_netbsd(int, siginfo_t *, void *);
void __sigenter_freebsd(int, siginfo_t *, void *);
void __sigenter_openbsd(int, siginfo_t *, void *);
const char *DescribeSigaction(char[256], int, const struct sigaction *);
#define DescribeSigaction(rc, sa) DescribeSigaction(alloca(256), rc, sa)
const char *_DescribeSigaction(char[256], int, const struct sigaction *);
#define DescribeSigaction(rc, sa) _DescribeSigaction(alloca(256), rc, sa)
void _init_onntconsoleevent(void);

View file

@ -4,8 +4,8 @@
#include "libc/mem/alloca.h"
COSMOPOLITAN_C_START_
const char *DescribeSigaltstack(char[128], int, const struct sigaltstack *);
#define DescribeSigaltstack(rc, ss) DescribeSigaltstack(alloca(128), rc, ss)
const char *_DescribeSigaltstack(char[128], int, const struct sigaltstack *);
#define DescribeSigaltstack(rc, ss) _DescribeSigaltstack(alloca(128), rc, ss)
COSMOPOLITAN_C_END_
#endif /* COSMOPOLITAN_LIBC_CALLS_STRUCT_SIGALTSTACK_INTERNAL_H_ */

View file

@ -6,8 +6,8 @@ COSMOPOLITAN_C_START_
int sys_sigqueueinfo(int, const siginfo_t *);
const char *DescribeSiginfo(char[300], int, const siginfo_t *);
#define DescribeSiginfo(x, y) DescribeSiginfo(alloca(300), x, y)
const char *_DescribeSiginfo(char[300], int, const siginfo_t *);
#define DescribeSiginfo(x, y) _DescribeSiginfo(alloca(300), x, y)
COSMOPOLITAN_C_END_
#endif /* COSMOPOLITAN_LIBC_CALLS_STRUCT_SIGINFO_INTERNAL_H_ */

View file

@ -34,8 +34,8 @@ int sys_sigprocmask(int, const sigset_t *, sigset_t *);
int sys_sigsuspend(const uint64_t *, uint64_t);
int sys_sigpending(uint64_t *, size_t);
const char *DescribeSigset(char[128], int, const sigset_t *);
#define DescribeSigset(rc, ss) DescribeSigset(alloca(128), rc, ss)
const char *_DescribeSigset(char[128], int, const sigset_t *);
#define DescribeSigset(rc, ss) _DescribeSigset(alloca(128), rc, ss)
COSMOPOLITAN_C_END_
#endif /* COSMOPOLITAN_LIBC_CALLS_STRUCT_SIGSET_INTERNAL_H_ */

View file

@ -13,8 +13,8 @@ int sys_fstatat_nt(int, const char *, struct stat *, int);
int sys_lstat_nt(const char *, struct stat *);
int sys_fstat_metal(int, struct stat *);
const char *DescribeStat(char[300], int, const struct stat *);
#define DescribeStat(rc, st) DescribeStat(alloca(300), rc, st)
const char *_DescribeStat(char[300], int, const struct stat *);
#define DescribeStat(rc, st) _DescribeStat(alloca(300), rc, st)
COSMOPOLITAN_C_END_
#endif /* COSMOPOLITAN_LIBC_CALLS_STRUCT_STAT_INTERNAL_H_ */

View file

@ -12,8 +12,8 @@ int sys_fstatfs_nt(int64_t, struct statfs *);
int sys_statfs_nt(const char *, struct statfs *);
void statfs2statvfs(struct statvfs *, const struct statfs *);
const char *DescribeStatfs(char[300], int, const struct statfs *);
#define DescribeStatfs(rc, sf) DescribeStatfs(alloca(300), rc, sf)
const char *_DescribeStatfs(char[300], int, const struct statfs *);
#define DescribeStatfs(rc, sf) _DescribeStatfs(alloca(300), rc, sf)
COSMOPOLITAN_C_END_
#endif /* COSMOPOLITAN_LIBC_CALLS_STRUCT_STATFS_INTERNAL_H_ */

View file

@ -4,9 +4,9 @@
#include "libc/mem/alloca.h"
COSMOPOLITAN_C_START_
const char *DescribeTermios(char[1024], ssize_t, const struct termios *);
const char *_DescribeTermios(char[1024], ssize_t, const struct termios *);
#define DescribeTermios(rc, tio) DescribeTermios(alloca(1024), rc, tio)
#define DescribeTermios(rc, tio) _DescribeTermios(alloca(1024), rc, tio)
COSMOPOLITAN_C_END_
#endif /* COSMOPOLITAN_LIBC_CALLS_STRUCT_TERMIOS_INTERNAL_H_ */

View file

@ -26,8 +26,8 @@ int sys_utimensat(int, const char *, const struct timespec[2], int);
int sys_utimensat_nt(int, const char *, const struct timespec[2], int);
int sys_utimensat_old(int, const char *, const struct timespec[2], int);
const char *DescribeTimespec(char[45], int, const struct timespec *);
#define DescribeTimespec(rc, ts) DescribeTimespec(alloca(45), rc, ts)
const char *_DescribeTimespec(char[45], int, const struct timespec *);
#define DescribeTimespec(rc, ts) _DescribeTimespec(alloca(45), rc, ts)
COSMOPOLITAN_C_END_
#endif /* COSMOPOLITAN_LIBC_CALLS_STRUCT_TIMESPEC_INTERNAL_H_ */

View file

@ -11,8 +11,8 @@ int sys_lutimes(const char *, const struct timeval *);
int sys_utimes(const char *, const struct timeval *);
int sys_utimes_nt(const char *, const struct timeval[2]);
const char *DescribeTimeval(char[45], int, const struct timeval *);
#define DescribeTimeval(rc, ts) DescribeTimeval(alloca(45), rc, ts)
const char *_DescribeTimeval(char[45], int, const struct timeval *);
#define DescribeTimeval(rc, ts) _DescribeTimeval(alloca(45), rc, ts)
COSMOPOLITAN_C_END_
#endif /* COSMOPOLITAN_LIBC_CALLS_STRUCT_TIMEVAL_INTERNAL_H_ */

View file

@ -1,13 +1,13 @@
#ifndef COSMOPOLITAN_LIBC_CALLS_STRUCT_WINSIZE_INTERNAL_H_
#define COSMOPOLITAN_LIBC_CALLS_STRUCT_WINSIZE_INTERNAL_H_
#include "libc/intrin/fds.h"
#include "libc/calls/struct/winsize.h"
#include "libc/intrin/fds.h"
#include "libc/mem/alloca.h"
COSMOPOLITAN_C_START_
int tcgetwinsize_nt(int, struct winsize *);
const char *DescribeWinsize(char[64], int, const struct winsize *);
#define DescribeWinsize(rc, ws) DescribeWinsize(alloca(64), rc, ws)
const char *_DescribeWinsize(char[64], int, const struct winsize *);
#define DescribeWinsize(rc, ws) _DescribeWinsize(alloca(64), rc, ws)
COSMOPOLITAN_C_END_
#endif /* COSMOPOLITAN_LIBC_CALLS_STRUCT_WINSIZE_INTERNAL_H_ */