Make fixes and improvements

- Invent iso8601us() for faster timestamps
- Improve --strace descriptions of sigset_t
- Rebuild the Landlock Make bootstrap binary
- Introduce MODE=sysv for non-Windows builds
- Permit OFD fcntl() locks under pledge(flock)
- redbean can now protect your kernel from ddos
- Have vfork() fallback to sys_fork() not fork()
- Change kmalloc() to not die when out of memory
- Improve documentation for some termios functions
- Rewrite putenv() and friends to conform to POSIX
- Fix linenoise + strace verbosity issue on Windows
- Fix regressions in our ability to show backtraces
- Change redbean SetHeader() to no-op if value is nil
- Improve fcntl() so SQLite locks work in non-WAL mode
- Remove some unnecessary work during fork() on Windows
- Create redbean-based SSL reverse proxy for IPv4 TurfWar
- Fix ape/apeinstall.sh warning when using non-bash shells
- Add ProgramTrustedIp(), and IsTrustedIp() APIs to redbean
- Support $PWD, $UID, $GID, and $EUID in command interpreter
- Introduce experimental JTqFpD APE prefix for non-Windows builds
- Invent blackhole daemon for firewalling IP addresses via UNIX named socket
- Add ProgramTokenBucket(), AcquireToken(), and CountTokens() APIs to redbean
This commit is contained in:
Justine Tunney 2022-10-17 11:02:04 -07:00
parent 648bf6555c
commit f7ff77d865
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
209 changed files with 3818 additions and 998 deletions

View file

@ -1934,88 +1934,6 @@ int bfcopy(n)
return ZE_OK;
}
#ifdef NO_RENAME
int rename(from, to)
ZCONST char *from;
ZCONST char *to;
{
unlink(to);
if (link(from, to) == -1)
return -1;
if (unlink(from) == -1)
return -1;
return 0;
}
#endif /* NO_RENAME */
#ifdef ZMEM
/************************/
/* Function memset() */
/************************/
/*
* memset - for systems without it
* bill davidsen - March 1990
*/
char *
memset(buf, init, len)
register char *buf; /* buffer loc */
register int init; /* initializer */
register unsigned int len; /* length of the buffer */
{
char *start;
start = buf;
while (len--) *(buf++) = init;
return(start);
}
/************************/
/* Function memcpy() */
/************************/
char *
memcpy(dst,src,len) /* v2.0f */
register char *dst, *src;
register unsigned int len;
{
char *start;
start = dst;
while (len--)
*dst++ = *src++;
return(start);
}
/************************/
/* Function memcmp() */
/************************/
int
memcmp(b1,b2,len) /* jpd@usl.edu -- 11/16/90 */
register char *b1, *b2;
register unsigned int len;
{
if (len) do { /* examine each byte (if any) */
if (*b1++ != *b2++)
return (*((uch *)b1-1) - *((uch *)b2-1)); /* exit when miscompare */
} while (--len);
return(0); /* no miscompares, yield 0 result */
}
#endif /* ZMEM */
/*------------------------------------------------------------------
* Split archives
*/