mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-01 16:58:30 +00:00
Make improvements
- Add rusage to redbean Lua API - Add more redbean documentation - Add pledge() to redbean Lua API - Polyfill OpenBSD pledge() for Linux - Increase PATH_MAX limit to 1024 characters - Untrack sibling processes after fork() on Windows
This commit is contained in:
parent
9a6bd304a5
commit
47b3274665
212 changed files with 2251 additions and 834 deletions
|
@ -50,7 +50,7 @@ textwindows static const char *FixNtMagicPath(const char *path,
|
|||
}
|
||||
|
||||
textwindows int __mkntpath(const char *path,
|
||||
char16_t path16[hasatleast PATH_MAX + 1]) {
|
||||
char16_t path16[hasatleast PATH_MAX]) {
|
||||
return __mkntpath2(path, path16, -1);
|
||||
}
|
||||
|
||||
|
@ -68,8 +68,7 @@ textwindows int __mkntpath(const char *path,
|
|||
* @error ENAMETOOLONG
|
||||
*/
|
||||
textwindows int __mkntpath2(const char *path,
|
||||
char16_t path16[hasatleast PATH_MAX + 1],
|
||||
int flags) {
|
||||
char16_t path16[hasatleast PATH_MAX], int flags) {
|
||||
/*
|
||||
* 1. Need +1 for NUL-terminator
|
||||
* 2. Need +1 for UTF-16 overflow
|
||||
|
@ -101,7 +100,7 @@ textwindows int __mkntpath2(const char *path,
|
|||
m = 0;
|
||||
}
|
||||
n = tprecode8to16(p, z, q).ax;
|
||||
if (n == z - 1) {
|
||||
if (n >= z - 1) {
|
||||
STRACE("path too long for windows: %#s", path);
|
||||
return enametoolong();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue